mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-06-28 09:13:12 -04:00
Implement & link ac_station
This commit is contained in:
@@ -3,11 +3,72 @@
|
||||
|
||||
#include "types.h"
|
||||
#include "m_actor.h"
|
||||
#include "ac_npc.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum {
|
||||
aSTM_THINK_INIT_NONE,
|
||||
aSTM_THINK_INIT_GET_OFF_WAIT,
|
||||
aSTM_THINK_INIT_INTRO_DEMO_WAIT,
|
||||
aSTM_THINK_INIT_INTERRUPT_TURN,
|
||||
aSTM_THINK_INIT_INTERRUPT_MOVE,
|
||||
aSTM_THINK_INIT_MAKE_TRAIN,
|
||||
aSTM_THINK_INIT_MAKE_TRAIN_BF,
|
||||
aSTM_THINK_INIT_MOVE_TURN,
|
||||
aSTM_THINK_INIT_MOVE,
|
||||
aSTM_THINK_INIT_LOOK_P,
|
||||
aSTM_THINK_INIT_SEE_OFF,
|
||||
aSTM_THINK_INIT_GAME_END,
|
||||
|
||||
aSTM_THINK_INIT_NUM
|
||||
};
|
||||
|
||||
enum {
|
||||
aSTM_THINK_PROC_NONE,
|
||||
aSTM_THINK_PROC_GET_OFF_WAIT,
|
||||
aSTM_THINK_PROC_TURN,
|
||||
aSTM_THINK_PROC_LOOK_PLAYER,
|
||||
aSTM_THINK_PROC_INTERRUPT_TURN,
|
||||
aSTM_THINK_PROC_INTERRUPT_MOVE,
|
||||
aSTM_THINK_PROC_MAKE_TRAIN_BF,
|
||||
aSTM_THINK_PROC_MAKE_TRAIN,
|
||||
aSTM_THINK_PROC_TRAIN_ARRIVE_WAIT,
|
||||
aSTM_THINK_PROC_MOVE_TURN_BF,
|
||||
aSTM_THINK_PROC_MOVE,
|
||||
aSTM_THINK_PROC_IN_TRAIN,
|
||||
aSTM_THINK_PROC_IN_TRAIN2,
|
||||
aSTM_THINK_PROC_SEE_OFF,
|
||||
aSTM_THINK_PROC_TALK_WAIT,
|
||||
|
||||
aSTM_THINK_PROC_NUM
|
||||
};
|
||||
|
||||
typedef struct npc_station_actor_s NPC_STATION_MASTER_ACTOR;
|
||||
|
||||
typedef void (*aSTM_TALK_PROC)(NPC_STATION_MASTER_ACTOR*, GAME_PLAY*);
|
||||
|
||||
struct npc_station_actor_s {
|
||||
NPC_ACTOR npc_class;
|
||||
aSTM_TALK_PROC talk_proc;
|
||||
ACTOR* train_actor_p;
|
||||
f32 move_ofs_x;
|
||||
u8 think_idx;
|
||||
u8 next_think_idx;
|
||||
u8 talk_idx;
|
||||
u8 melody_save;
|
||||
u8 think_proc_idx;
|
||||
u8 sound;
|
||||
u8 happening_sound;
|
||||
u8 timer;
|
||||
u8 talk_proc_idx;
|
||||
u8 station_check_res;
|
||||
u8 chan;
|
||||
u8 station_err;
|
||||
};
|
||||
|
||||
extern ACTOR_PROFILE Npc_Station_Master_Profile;
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -15,4 +76,3 @@ extern ACTOR_PROFILE Npc_Station_Master_Profile;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -3,11 +3,18 @@
|
||||
|
||||
#include "types.h"
|
||||
#include "m_actor.h"
|
||||
#include "ac_structure.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct station_actor_s STATION_ACTOR;
|
||||
|
||||
struct station_actor_s {
|
||||
STRUCTURE_ACTOR struct_class;
|
||||
};
|
||||
|
||||
extern ACTOR_PROFILE Station_Profile;
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -15,4 +22,3 @@ extern ACTOR_PROFILE Station_Profile;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
#ifndef AC_STATION_CLIP_H
|
||||
#define AC_STATION_CLIP_H
|
||||
|
||||
#include "types.h"
|
||||
#include "m_actor.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum {
|
||||
aSTM_TALK_CHK_LEAVE_TALK,
|
||||
aSTM_TALK_CHK_LEAVE_TALK2,
|
||||
aSTM_TALK_SAYONARA,
|
||||
aSTM_TALK_CHK_TRAIN_TALK,
|
||||
aSTM_TALK_CHK_TRAIN2_TALK,
|
||||
aSTM_TALK_BEFORE_SAVE_TALK,
|
||||
aSTM_TALK_SAVE_TALK,
|
||||
aSTM_TALK_CHK_OVER_SAVE_TALK,
|
||||
aSTM_TALK_SAVE_TALK_END,
|
||||
aSTM_TALK_SAVE_ERROR,
|
||||
aSTM_TALK_CHK_REPAIRID,
|
||||
aSTM_TALK_REPAIRID_BF,
|
||||
aSTM_TALK_REPAIRID,
|
||||
aSTM_TALK_REPAIRID_AFTER,
|
||||
aSTM_TALK_CARDPROC,
|
||||
aSTM_TALK_END_WAIT,
|
||||
|
||||
aSTM_TALK_NUM
|
||||
};
|
||||
|
||||
typedef int (*aSTC_CHANGE_TALK_PROC)(ACTOR*, int);
|
||||
|
||||
typedef struct station_clip_s {
|
||||
aSTC_CHANGE_TALK_PROC change_talk_proc;
|
||||
} aSTC_clip_c;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+21
-21
@@ -192,32 +192,32 @@ typedef void (*aSTR_MOVE_PROC)(STRUCTURE_ACTOR*, GAME_PLAY*);
|
||||
|
||||
// sizeof(actor_structure_s) == 0x2DC
|
||||
struct actor_structure_s {
|
||||
/* 0x000*/ ACTOR actor_class;
|
||||
/* 0x174*/ int keyframe_state;
|
||||
/* 0x178*/ cKF_SkeletonInfo_R_c keyframe;
|
||||
/* 0x1E8*/ int keyframe_saved_keyframe;
|
||||
/* 0x1EC*/ s_xyz work_area[15];
|
||||
/* 0x246*/ s_xyz morph_area[15];
|
||||
/* 0x2A0*/ aSTR_MOVE_PROC action_proc;
|
||||
/* 0x2A4*/ int _2A4;
|
||||
/* 0x2A8*/ int structure_type; /* aSTR_TYPE_* */
|
||||
/* 0x2AC*/ int structure_pal; /* aSTR_PAL_* */
|
||||
/* 0x2B0*/ int request_type;
|
||||
/* 0x2B4*/ int action;
|
||||
/* 0x000 */ ACTOR actor_class;
|
||||
/* 0x174 */ int keyframe_state;
|
||||
/* 0x178 */ cKF_SkeletonInfo_R_c keyframe;
|
||||
/* 0x1E8 */ int keyframe_saved_keyframe;
|
||||
/* 0x1EC */ s_xyz work_area[15];
|
||||
/* 0x246 */ s_xyz morph_area[15];
|
||||
/* 0x2A0 */ aSTR_MOVE_PROC action_proc;
|
||||
/* 0x2A4 */ int _2A4;
|
||||
/* 0x2A8 */ int structure_type; /* aSTR_TYPE_* */
|
||||
/* 0x2AC */ int structure_pal; /* aSTR_PAL_* */
|
||||
/* 0x2B0 */ int request_type;
|
||||
/* 0x2B4 */ int action;
|
||||
|
||||
/* general purpose members with unique usage between structure actors */
|
||||
/* 0x2B8*/ int arg0;
|
||||
/* 0x2BC*/ int arg1;
|
||||
/* 0x2C0*/ int arg2;
|
||||
/* 0x2C4*/ int arg3;
|
||||
/* 0x2B8 */ int arg0;
|
||||
/* 0x2BC */ int arg1;
|
||||
/* 0x2C0 */ int arg2;
|
||||
/* 0x2C4 */ int arg3;
|
||||
|
||||
/* general purpose float members with unique usage between structure actors*/
|
||||
/* 0x2C8*/ f32 arg0_f;
|
||||
/* 0x2CC*/ f32 arg1_f;
|
||||
/* 0x2D0*/ f32 arg2_f;
|
||||
/* 0x2D4*/ f32 arg3_f;
|
||||
/* 0x2C8 */ f32 arg0_f;
|
||||
/* 0x2CC */ f32 arg1_f;
|
||||
/* 0x2D0 */ f32 arg2_f;
|
||||
/* 0x2D4 */ f32 arg3_f;
|
||||
|
||||
/* 0x2D8*/ u32 season;
|
||||
/* 0x2D8 */ u32 season;
|
||||
};
|
||||
|
||||
typedef struct actor_overlay_info_s {
|
||||
|
||||
+2
-18
@@ -5,28 +5,13 @@
|
||||
#include "m_actor.h"
|
||||
#include "c_keyframe.h"
|
||||
#include "m_lib.h"
|
||||
#include "ac_structure.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct train0_s {
|
||||
ACTOR actor_class;
|
||||
int steam_available;
|
||||
cKF_SkeletonInfo_R_c keyframe;
|
||||
int steam_timer;
|
||||
s_xyz work[15];
|
||||
s_xyz target[15];
|
||||
u8 pad4[0x2b4 - 0x2A0];
|
||||
int tr_action;
|
||||
u8 pad5[0x2BC - 0x2B8];
|
||||
int effect_num;
|
||||
int unk2c0;
|
||||
ACTOR* tr_actor_p;
|
||||
f32 tr1_pos;
|
||||
f32 tr_speed;
|
||||
u8 pad6[0x2D8 - 0x2CC];
|
||||
} TRAIN0_ACTOR;
|
||||
typedef STRUCTURE_ACTOR TRAIN0_ACTOR;
|
||||
|
||||
extern ACTOR_PROFILE Train0_Profile;
|
||||
|
||||
@@ -35,4 +20,3 @@ extern ACTOR_PROFILE Train0_Profile;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
+2
-17
@@ -5,28 +5,13 @@
|
||||
#include "m_actor.h"
|
||||
#include "c_keyframe.h"
|
||||
#include "m_lib.h"
|
||||
#include "ac_structure.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct train1_s {
|
||||
ACTOR actor_class;
|
||||
int anim_state;
|
||||
cKF_SkeletonInfo_R_c keyframe;
|
||||
int timer;
|
||||
s_xyz work[15];
|
||||
s_xyz morph[15];
|
||||
u8 pad4[0x2b4 - 0x2A0];
|
||||
int tr_action;
|
||||
int player_pass_exists;
|
||||
int player_pass_leaving; // Not sure about this one
|
||||
int unk2c0;
|
||||
ACTOR* tr_actor_p;
|
||||
f32 tr_speed;
|
||||
f32 tr0_pos;
|
||||
u8 pad2[0x2D8 - 0x2CC];
|
||||
} TRAIN1_ACTOR;
|
||||
typedef STRUCTURE_ACTOR TRAIN1_ACTOR;
|
||||
|
||||
extern ACTOR_PROFILE Train1_Profile;
|
||||
|
||||
|
||||
+11
-7
@@ -84,11 +84,11 @@ enum {
|
||||
/* This is also a priority table where lower = higher priority */
|
||||
enum {
|
||||
mCD_TRANS_ERR_NONE,
|
||||
mCD_TRANS_ERR_1,
|
||||
mCD_TRANS_ERR_NONE_NEXTLAND, // leave town
|
||||
mCD_TRANS_ERR_IOERROR,
|
||||
mCD_TRANS_ERR_3,
|
||||
mCD_TRANS_ERR_DAMAGED,
|
||||
mCD_TRANS_ERR_BROKEN_WRONGENCODING,
|
||||
mCD_TRANS_ERR_5,
|
||||
mCD_TRANS_ERR_REPAIR,
|
||||
mCD_TRANS_ERR_NOT_MEMCARD,
|
||||
mCD_TRANS_ERR_WRONG_LAND,
|
||||
mCD_TRANS_ERR_INVALID_NOLAND_CODE,
|
||||
@@ -100,13 +100,13 @@ enum {
|
||||
mCD_TRANS_ERR_OTHER_TOWN,
|
||||
mCD_TRANS_ERR_15,
|
||||
mCD_TRANS_ERR_16,
|
||||
mCD_TRANS_ERR_17,
|
||||
mCD_TRANS_ERR_CORRUPT,
|
||||
mCD_TRANS_ERR_18,
|
||||
mCD_TRANS_ERR_19,
|
||||
mCD_TRANS_ERR_20,
|
||||
mCD_TRANS_ERR_TRAVEL_DATA_MISSING,
|
||||
mCD_TRANS_ERR_TRAVEL_DATA_EXISTS,
|
||||
mCD_TRANS_ERR_WRONGDEVICE,
|
||||
mCD_TRANS_ERR_NOCARD,
|
||||
mCD_TRANS_ERR_23,
|
||||
mCD_TRANS_ERR_NO_TOWN_DATA,
|
||||
mCD_TRANS_ERR_GENERIC,
|
||||
mCD_TRANS_ERR_BUSY,
|
||||
|
||||
@@ -242,6 +242,10 @@ extern int mCD_CheckPassportFile(void);
|
||||
extern int mCD_CheckBrokenPassportFile(int slot);
|
||||
extern int mCD_GetPlayerNum(void);
|
||||
|
||||
extern int mCD_CheckStation_bg(s32* chan);
|
||||
extern int mCD_SaveStation_NextLand_bg(s32* chan);
|
||||
extern int mCD_SaveStation_Passport_bg(s32* chan);
|
||||
|
||||
extern void mCD_PrintErrInfo(gfxprint_t* gfxprint);
|
||||
extern void mCD_InitAll();
|
||||
extern void mCD_LoadLand();
|
||||
|
||||
+2
-1
@@ -33,6 +33,7 @@
|
||||
#include "ac_garagara.h"
|
||||
#include "ac_turi_clip.h"
|
||||
#include "ac_hatumode_control.h"
|
||||
#include "ac_station_clip.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -91,7 +92,7 @@ typedef struct clip_s {
|
||||
/* 0x0D4 */ CLIP_NONE_PROC ball_redma_proc; /* removed in DnM+ */
|
||||
/* 0x0D8 */ void* _0D8;
|
||||
/* 0x0DC */ aAL_Clip_c* animal_logo_clip;
|
||||
/* 0x0E0 */ void* _0E0;
|
||||
/* 0x0E0 */ aSTC_clip_c* station_clip;
|
||||
/* 0x0E4 */ aTRC_clip_c* turi_clip;
|
||||
/* 0x0E8 */ SIGN_ACTOR* sign_control_actor;
|
||||
/* 0x0EC */ aAPC_Clip_c* aprilfool_control_clip;
|
||||
|
||||
@@ -3028,6 +3028,7 @@ extern int mNT_check_unknown(mActor_name_t item_no);
|
||||
#define DUMMY_HANIWA3 (DUMMY_HANIWA2 + 1)
|
||||
#define DUMMY_POST_OFFICE 0xF0FF
|
||||
#define DUMMY_NEEDLEWORK_SHOP 0xF0FF
|
||||
#define DUMMY_STATION 0xF100
|
||||
#define DUMMY_POLICE_STATION 0xF101
|
||||
#define DUMMY_RESERVE 0xF102
|
||||
#define DUMMY_SHRINE 0xF103
|
||||
|
||||
Reference in New Issue
Block a user