mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-09-03 00:53:49 -04:00
Merge pull request #305 from Cuyler36/ef_effect_control
This commit is contained in:
@@ -408,7 +408,7 @@ typedef struct effect_work_s {
|
||||
eEC_Effect_c effects[eEC_EFFECT_ACTIVE_MAX];
|
||||
u8 effect_active_flags[eEC_EFFECT_ACTIVE_MAX];
|
||||
Lights light_info;
|
||||
int _24A8;
|
||||
Light_list* light_list;
|
||||
} eEC_work_c;
|
||||
|
||||
struct effect_control_s {
|
||||
|
||||
+63
-63
@@ -22,107 +22,107 @@ extern "C" {
|
||||
|
||||
#define mEnv_WEATHER_TERM_NUM 20
|
||||
#define mEnv_WIND_TERM_NUM 4u
|
||||
#define mEnv_WIND_CHANGE_RATE (f32)(10*mTM_SECONDS_IN_MINUTE*60) // 60fps, 10 minutes
|
||||
#define mEnv_WIND_CHANGE_RATE (f32)(10 * mTM_SECONDS_IN_MINUTE * 60) // 60fps, 10 minutes
|
||||
|
||||
enum weather {
|
||||
mEnv_WEATHER_CLEAR,
|
||||
mEnv_WEATHER_RAIN,
|
||||
mEnv_WEATHER_SNOW,
|
||||
mEnv_WEATHER_SAKURA,
|
||||
mEnv_WEATHER_LEAVES,
|
||||
|
||||
mEnv_WEATHER_NUM
|
||||
mEnv_WEATHER_CLEAR,
|
||||
mEnv_WEATHER_RAIN,
|
||||
mEnv_WEATHER_SNOW,
|
||||
mEnv_WEATHER_SAKURA,
|
||||
mEnv_WEATHER_LEAVES,
|
||||
|
||||
mEnv_WEATHER_NUM
|
||||
};
|
||||
|
||||
enum weather_intensity {
|
||||
mEnv_WEATHER_INTENSITY_NONE,
|
||||
mEnv_WEATHER_INTENSITY_LIGHT,
|
||||
mEnv_WEATHER_INTENSITY_NORMAL,
|
||||
mEnv_WEATHER_INTENSITY_HEAVY,
|
||||
mEnv_WEATHER_INTENSITY_NONE,
|
||||
mEnv_WEATHER_INTENSITY_LIGHT,
|
||||
mEnv_WEATHER_INTENSITY_NORMAL,
|
||||
mEnv_WEATHER_INTENSITY_HEAVY,
|
||||
|
||||
mEnv_WEATHER_INTENSITY_NUM,
|
||||
mEnv_WEATHER_INTENSITY_NUM,
|
||||
};
|
||||
|
||||
enum {
|
||||
mEnv_LIGHT_TYPE_PLAYER,
|
||||
mEnv_LIGHT_TYPE_TENT,
|
||||
mEnv_LIGHT_TYPE_LIGHTHOUSE,
|
||||
mEnv_LIGHT_TYPE_PLAYER,
|
||||
mEnv_LIGHT_TYPE_TENT,
|
||||
mEnv_LIGHT_TYPE_LIGHTHOUSE,
|
||||
|
||||
mEnv_LIGHT_TYPE_NUM
|
||||
mEnv_LIGHT_TYPE_NUM
|
||||
};
|
||||
|
||||
enum {
|
||||
mEnv_SWITCH_STATUS_ON,
|
||||
mEnv_SWITCH_STATUS_OFF,
|
||||
mEnv_SWITCH_STATUS_TURNING_OFF,
|
||||
mEnv_SWITCH_STATUS_TURNING_ON,
|
||||
mEnv_SWITCH_STATUS_ON,
|
||||
mEnv_SWITCH_STATUS_OFF,
|
||||
mEnv_SWITCH_STATUS_TURNING_OFF,
|
||||
mEnv_SWITCH_STATUS_TURNING_ON,
|
||||
|
||||
mEnv_SWITCH_STATUS_NUM
|
||||
mEnv_SWITCH_STATUS_NUM
|
||||
};
|
||||
|
||||
enum {
|
||||
mEnv_WIND_STATE_STEADY,
|
||||
mEnv_WIND_STATE_FAST,
|
||||
mEnv_WIND_STATE_SLOW,
|
||||
mEnv_WIND_STATE_REDUCING,
|
||||
|
||||
mEnv_WIND_STATE_NUM
|
||||
mEnv_WIND_STATE_STEADY,
|
||||
mEnv_WIND_STATE_FAST,
|
||||
mEnv_WIND_STATE_SLOW,
|
||||
mEnv_WIND_STATE_REDUCING,
|
||||
|
||||
mEnv_WIND_STATE_NUM
|
||||
};
|
||||
|
||||
#define mEnv_SAVE_GET_WEATHER_TYPE(w) (((w) & 0xF0) >> 4)
|
||||
#define mEnv_SAVE_GET_WEATHER_INTENSITY(w) ((w) & 0xF)
|
||||
|
||||
typedef struct base_light_s {
|
||||
u8 ambient_color[3];
|
||||
s8 sun_dir[3];
|
||||
u8 sun_color[3];
|
||||
s8 moon_dir[3];
|
||||
u8 moon_color[3];
|
||||
u8 fog_color[3];
|
||||
s16 fog_near;
|
||||
s16 fog_far;
|
||||
u8 shadow_color[3];
|
||||
u8 room_color[3];
|
||||
u8 sun_color_window[3];
|
||||
u8 moon_color_window[3];
|
||||
u8 background_color[3];
|
||||
u8 ambient_color[3];
|
||||
s8 sun_dir[3];
|
||||
u8 sun_color[3];
|
||||
s8 moon_dir[3];
|
||||
u8 moon_color[3];
|
||||
u8 fog_color[3];
|
||||
s16 fog_near;
|
||||
s16 fog_far;
|
||||
u8 shadow_color[3];
|
||||
u8 room_color[3];
|
||||
u8 sun_color_window[3];
|
||||
u8 moon_color_window[3];
|
||||
u8 background_color[3];
|
||||
} BaseLight;
|
||||
|
||||
typedef struct add_light_info_s {
|
||||
s16 ambient_color[3];
|
||||
s16 diffuse_color[3];
|
||||
s16 fog_color[3];
|
||||
s16 fog_near;
|
||||
s16 fog_far;
|
||||
s16 ambient_color[3];
|
||||
s16 diffuse_color[3];
|
||||
s16 fog_color[3];
|
||||
s16 fog_near;
|
||||
s16 fog_far;
|
||||
} AddLightInfo;
|
||||
|
||||
typedef void (*NATURE_PROC)(ACTOR*);
|
||||
|
||||
typedef struct nature_s {
|
||||
NATURE_PROC proc;
|
||||
void* arg;
|
||||
NATURE_PROC proc;
|
||||
void* arg;
|
||||
} Nature;
|
||||
|
||||
typedef struct kankyo_s {
|
||||
/* 0x00 */ Lights sun_light;
|
||||
/* 0x0E */ Lights moon_light;
|
||||
/* 0x1C */ Lights* lamp_light;
|
||||
/* 0x20 */ Lights point_light;
|
||||
/* 0x30 */ int _30;
|
||||
/* 0x34 */ u8 _34[0x78 - 0x34];
|
||||
/* 0x78 */ AddLightInfo add_light_info; /* extra values added to specific light parameters */
|
||||
/* 0x90 */ int _90;
|
||||
/* 0x94 */ BaseLight base_light;
|
||||
/* 0xBA */ u8 _BA[0xC0 - 0xBA];
|
||||
/* 0xC0 */ f32 shadow_pos;
|
||||
/* 0xC4 */ u8 shadow_alpha;
|
||||
/* 0xC5 */ u8 countdown_timer;
|
||||
/* 0xC8 */ Nature nature;
|
||||
/* 0x00 */ Lights sun_light;
|
||||
/* 0x0E */ Lights moon_light;
|
||||
/* 0x1C */ Lights* lamp_light;
|
||||
/* 0x20 */ Lights point_light;
|
||||
/* 0x30 */ int _30;
|
||||
/* 0x34 */ u8 _34[0x78 - 0x34];
|
||||
/* 0x78 */ AddLightInfo add_light_info; /* extra values added to specific light parameters */
|
||||
/* 0x90 */ int _90;
|
||||
/* 0x94 */ BaseLight base_light;
|
||||
/* 0xBA */ u8 _BA[0xC0 - 0xBA];
|
||||
/* 0xC0 */ f32 shadow_pos;
|
||||
/* 0xC4 */ u8 shadow_alpha;
|
||||
/* 0xC5 */ u8 countdown_timer;
|
||||
/* 0xC8 */ Nature nature;
|
||||
} Kankyo;
|
||||
|
||||
extern void mEnv_regist_nature(Kankyo* kankyo, NATURE_PROC nature_proc, void* arg);
|
||||
extern int mEnv_unregist_nature(Kankyo* kankyo, NATURE_PROC nature_proc);
|
||||
extern void Global_kankyo_ct(GAME_PLAY* play, Kankyo* kankyo);
|
||||
extern void Global_kankyo_ct(GAME* game, Kankyo* kankyo);
|
||||
extern void mEnv_GetRoomPrimColor(u8* r, u8* g, u8* b, GAME_PLAY* play);
|
||||
extern void Global_kankyo_set_room_prim(GAME_PLAY* play);
|
||||
extern int mEnv_RequestChangeLightON(GAME_PLAY* play, int light_on_type, int play_sfx);
|
||||
|
||||
+4
-5
@@ -36,20 +36,19 @@ typedef struct lights_s {
|
||||
LightParams lights;
|
||||
} Lights;
|
||||
|
||||
|
||||
typedef struct light_list {
|
||||
/* 0x0 */ Lights* info;
|
||||
/* 0x4 */ struct light_list* prev;
|
||||
/* 0x8 */ struct light_list* next;
|
||||
} Light_list; // size = 0xC
|
||||
|
||||
typedef struct light_buf_s{
|
||||
typedef struct light_buf_s {
|
||||
int current;
|
||||
int idx;
|
||||
Light_list lights[32];
|
||||
} Light_buffer;
|
||||
|
||||
typedef struct lightsn_s{
|
||||
typedef struct lightsn_s {
|
||||
u8 diffuse_count;
|
||||
Ambient a;
|
||||
Light_new l[7];
|
||||
@@ -60,7 +59,7 @@ typedef struct global_light_s {
|
||||
/* 0x4 */ u8 ambientColor[3];
|
||||
/* 0x7 */ u8 fogColor[3];
|
||||
/* 0xA */ s16 fogNear;
|
||||
/* 0xC */ s16 fogFar;
|
||||
/* 0xC */ s16 fogFar;
|
||||
} Global_light; // size = 0x10
|
||||
|
||||
typedef void (*light_point_proc)(LightsN*, LightParams*, xyz_t*);
|
||||
@@ -73,7 +72,7 @@ extern void LightsN_disp(LightsN* lights, GRAPH* graph);
|
||||
extern void LightsN_list_check(LightsN* lights, Light_list* node, xyz_t* pos);
|
||||
extern void Global_light_ct(Global_light* glight);
|
||||
extern LightsN* Global_light_read(Global_light* glight, GRAPH* graph);
|
||||
extern Light_list* Global_light_list_new(GAME_PLAY*, Global_light* glight, Lights* light);
|
||||
extern Light_list* Global_light_list_new(GAME* game, Global_light* glight, Lights* light);
|
||||
extern void Global_light_list_delete(Global_light* glight, Light_list* light);
|
||||
extern void Light_list_point_draw(GAME_PLAY* play);
|
||||
|
||||
|
||||
+74
-74
@@ -27,52 +27,52 @@ typedef void (*PLAY_WIPE_PROC)(GAME_PLAY*);
|
||||
|
||||
/* sizeof(struct game_play_s) == 0x2600 */
|
||||
struct game_play_s {
|
||||
/* 0x0000 */ GAME game;
|
||||
// TODO: finish
|
||||
/* 0x00E0 */ s16 scene_id;
|
||||
/* 0x00E4 */ mFI_block_tbl_c block_table;
|
||||
/* 0x00F4 */ mFI_block_tbl_c last_block_table;
|
||||
/* 0x0104 */ u8 _0104[0x010C - 0x0104];
|
||||
/* 0x010C */ Scene_Word_u* current_scene_data;
|
||||
/* 0x0110 */ Object_Exchange_c object_exchange;
|
||||
/* 0x1A68 */ View view;
|
||||
/* 0x1B88 */ Camera2 camera;
|
||||
/* 0x1CC0 */ Kankyo kankyo;
|
||||
/* 0x1D90 */ Global_light global_light;
|
||||
/* 0x1DA0 */ pause_t pause;
|
||||
/* 0x1DA8 */ Actor_info actor_info;
|
||||
/* 0x1DEC */ Submenu submenu;
|
||||
/* 0x1FA4 */ s8 submenu_ground_idx;
|
||||
/* 0x1FA8 */ char* submenu_ground_tex[2];
|
||||
/* 0x1FB0 */ char* submenu_ground_pallet[2];
|
||||
/* 0x1FB8 */ PreRender prerender;
|
||||
/* 0x2000 */ Door_info_c door_info;
|
||||
/* 0x2008 */ int next_scene_no;
|
||||
/* 0x200C */ MtxF projection_matrix;
|
||||
/* 0x204C */ MtxF billboard_matrix;
|
||||
/* 0x208C */ Mtx* _208C;
|
||||
/* 0x2090 */ u32 game_frame;
|
||||
/* 0x2094 */ u8 _2094;
|
||||
/* 0x2095 */ u8 actor_data_num;
|
||||
/* 0x2096 */ u8 ctrl_actor_data_num;
|
||||
/* 0x2097 */ u8 obj_bank_data_num;
|
||||
/* 0x2098 */ Actor_data* player_data;
|
||||
/* 0x209C */ Actor_data* actor_data;
|
||||
/* 0x20A0 */ s16* ctrl_actor_data;
|
||||
/* 0x20A4 */ s16* obj_bank_data;
|
||||
/* 0x20A8 */ int _20A8;
|
||||
/* 0x20AC */ Event_c event;
|
||||
/* 0x20D0 */ u8 fb_fade_type;
|
||||
/* 0x20D1 */ u8 fb_wipe_type;
|
||||
/* 0x20D2 */ u8 fb_mode;
|
||||
/* 0x20D3 */ u8 fb_wipe_mode;
|
||||
/* 0x20D8 */ fbdemo_wipe fbdemo_wipe;
|
||||
/* 0x2318 */ fbdemo_fade color_fade;
|
||||
/* 0x2328 */ CollisionCheck_c collision_check;
|
||||
/* 0x23F8 */ DRAW_CHK_PROC draw_chk_proc; // only used by mikanbox actor
|
||||
/* 0x23FC */ rgba8888 fade_color_value;
|
||||
/* 0x2400 */ Scene_data_status_c* scene_data_status;
|
||||
/* 0x2404 */ u8 _2400[0x2600 - 0x2404];
|
||||
/* 0x0000 */ GAME game;
|
||||
// TODO: finish
|
||||
/* 0x00E0 */ s16 scene_id;
|
||||
/* 0x00E4 */ mFI_block_tbl_c block_table;
|
||||
/* 0x00F4 */ mFI_block_tbl_c last_block_table;
|
||||
/* 0x0104 */ u8 _0104[0x010C - 0x0104];
|
||||
/* 0x010C */ Scene_Word_u* current_scene_data;
|
||||
/* 0x0110 */ Object_Exchange_c object_exchange;
|
||||
/* 0x1A68 */ View view;
|
||||
/* 0x1B88 */ Camera2 camera;
|
||||
/* 0x1CC0 */ Kankyo kankyo;
|
||||
/* 0x1D90 */ Global_light global_light;
|
||||
/* 0x1DA0 */ pause_t pause;
|
||||
/* 0x1DA8 */ Actor_info actor_info;
|
||||
/* 0x1DEC */ Submenu submenu;
|
||||
/* 0x1FA4 */ s8 submenu_ground_idx;
|
||||
/* 0x1FA8 */ char* submenu_ground_tex[2];
|
||||
/* 0x1FB0 */ char* submenu_ground_pallet[2];
|
||||
/* 0x1FB8 */ PreRender prerender;
|
||||
/* 0x2000 */ Door_info_c door_info;
|
||||
/* 0x2008 */ int next_scene_no;
|
||||
/* 0x200C */ MtxF projection_matrix;
|
||||
/* 0x204C */ MtxF billboard_matrix;
|
||||
/* 0x208C */ Mtx* billboard_mtx_p;
|
||||
/* 0x2090 */ u32 game_frame;
|
||||
/* 0x2094 */ u8 _2094;
|
||||
/* 0x2095 */ u8 actor_data_num;
|
||||
/* 0x2096 */ u8 ctrl_actor_data_num;
|
||||
/* 0x2097 */ u8 obj_bank_data_num;
|
||||
/* 0x2098 */ Actor_data* player_data;
|
||||
/* 0x209C */ Actor_data* actor_data;
|
||||
/* 0x20A0 */ s16* ctrl_actor_data;
|
||||
/* 0x20A4 */ s16* obj_bank_data;
|
||||
/* 0x20A8 */ int _20A8;
|
||||
/* 0x20AC */ Event_c event;
|
||||
/* 0x20D0 */ u8 fb_fade_type;
|
||||
/* 0x20D1 */ u8 fb_wipe_type;
|
||||
/* 0x20D2 */ u8 fb_mode;
|
||||
/* 0x20D3 */ u8 fb_wipe_mode;
|
||||
/* 0x20D8 */ fbdemo_wipe fbdemo_wipe;
|
||||
/* 0x2318 */ fbdemo_fade color_fade;
|
||||
/* 0x2328 */ CollisionCheck_c collision_check;
|
||||
/* 0x23F8 */ DRAW_CHK_PROC draw_chk_proc; // only used by mikanbox actor
|
||||
/* 0x23FC */ rgba8888 fade_color_value;
|
||||
/* 0x2400 */ Scene_data_status_c* scene_data_status;
|
||||
/* 0x2404 */ u8 _2400[0x2600 - 0x2404];
|
||||
};
|
||||
|
||||
extern fbdemo_c fbdemo;
|
||||
@@ -80,35 +80,35 @@ extern fbdemo_c fbdemo;
|
||||
extern void Game_play_Reset_destiny();
|
||||
extern void event_title_flag_on();
|
||||
extern void event_title_flag_off();
|
||||
extern void Game_play_camera_proc(GAME_PLAY *);
|
||||
extern void Game_play_fbdemo_wipe_destroy(GAME_PLAY *);
|
||||
extern void Game_play_fbdemo_wipe_create_sub(GAME_PLAY *);
|
||||
extern void Game_play_fbdemo_wipe_create(GAME_PLAY *);
|
||||
extern void Game_play_fbdemo_wipe_init(GAME_PLAY *);
|
||||
extern void Game_play_fbdemo_fade_in_move_end(GAME_PLAY *);
|
||||
extern void Game_play_fbdemo_fade_out_start_emu_move_end(GAME_PLAY *);
|
||||
extern void Game_play_fbdemo_fade_out_game_end_move_end(GAME_PLAY *);
|
||||
extern void Game_play_change_scene_move_end(GAME_PLAY *);
|
||||
extern void Game_play_fbdemo_wipe_move(GAME_PLAY *);
|
||||
extern void Game_play_fbdemo_wipe_proc(GAME_PLAY *);
|
||||
extern Gfx* game_play_set_fog(GAME_PLAY *, Gfx *);
|
||||
extern void Game_play_fbdemo_proc(GAME_PLAY *);
|
||||
extern void play_cleanup(GAME *);
|
||||
extern void VR_Box_ct(GAME_PLAY *);
|
||||
extern void play_init(GAME *);
|
||||
extern void Game_play_move_fbdemo_not_move(GAME_PLAY *);
|
||||
extern void Game_play_move(GAME_PLAY *);
|
||||
extern void setupFog(GAME_PLAY *, GRAPH *);
|
||||
extern void setupViewer(GAME_PLAY *);
|
||||
extern void setupViewMatrix(GAME_PLAY *, GRAPH *, GRAPH *);
|
||||
extern void copy_efb_to_texture(Gfx **, void *);
|
||||
extern int makeBumpTexture(GAME_PLAY *, GRAPH *, GRAPH *);
|
||||
extern void draw_version(GRAPH *);
|
||||
extern void Game_play_draw(GAME *);
|
||||
extern void play_main(GAME *);
|
||||
extern void Gameplay_Scene_Init(GAME_PLAY *);
|
||||
extern void Game_play_camera_proc(GAME_PLAY*);
|
||||
extern void Game_play_fbdemo_wipe_destroy(GAME_PLAY*);
|
||||
extern void Game_play_fbdemo_wipe_create_sub(GAME_PLAY*);
|
||||
extern void Game_play_fbdemo_wipe_create(GAME_PLAY*);
|
||||
extern void Game_play_fbdemo_wipe_init(GAME_PLAY*);
|
||||
extern void Game_play_fbdemo_fade_in_move_end(GAME_PLAY*);
|
||||
extern void Game_play_fbdemo_fade_out_start_emu_move_end(GAME_PLAY*);
|
||||
extern void Game_play_fbdemo_fade_out_game_end_move_end(GAME_PLAY*);
|
||||
extern void Game_play_change_scene_move_end(GAME_PLAY*);
|
||||
extern void Game_play_fbdemo_wipe_move(GAME_PLAY*);
|
||||
extern void Game_play_fbdemo_wipe_proc(GAME_PLAY*);
|
||||
extern Gfx* game_play_set_fog(GAME_PLAY*, Gfx*);
|
||||
extern void Game_play_fbdemo_proc(GAME_PLAY*);
|
||||
extern void play_cleanup(GAME*);
|
||||
extern void VR_Box_ct(GAME_PLAY*);
|
||||
extern void play_init(GAME*);
|
||||
extern void Game_play_move_fbdemo_not_move(GAME_PLAY*);
|
||||
extern void Game_play_move(GAME_PLAY*);
|
||||
extern void setupFog(GAME_PLAY*, GRAPH*);
|
||||
extern void setupViewer(GAME_PLAY*);
|
||||
extern void setupViewMatrix(GAME_PLAY*, GRAPH*, GRAPH*);
|
||||
extern void copy_efb_to_texture(Gfx**, void*);
|
||||
extern int makeBumpTexture(GAME_PLAY*, GRAPH*, GRAPH*);
|
||||
extern void draw_version(GRAPH*);
|
||||
extern void Game_play_draw(GAME*);
|
||||
extern void play_main(GAME*);
|
||||
extern void Gameplay_Scene_Init(GAME_PLAY*);
|
||||
extern u8 mPl_SceneNo2SoundRoomType(int);
|
||||
extern void Gameplay_Scene_Read(GAME_PLAY *, s16);
|
||||
extern void Gameplay_Scene_Read(GAME_PLAY*, s16);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user