diff --git a/include/functions.h b/include/functions.h index 775661b7b5..7d88f80380 100644 --- a/include/functions.h +++ b/include/functions.h @@ -118,6 +118,7 @@ void update_enemy_shadows(void); void update_hero_shadows(void); // append gfx funcs +void appendGfx_background_texture(void); void func_80257B28(void*); void func_8025595C(void*); void func_80257B68(void*); @@ -530,14 +531,52 @@ void func_80266D6C(ActorPart*, s32); char* int_to_string(s32, char*, s32); Evt* get_script_by_index(s32 index); +Evt* get_script_by_id(s32 id); +s32 partner_test_enemy_collision(s32 arg0); s32 get_lava_reset_pos(f32* x, f32* y, f32* z); void start_rumble(s32, s32); void update_locomotion_state(void); void start_rumble_type(u32); void start_falling(void); +void start_bounce_a(void); void start_bounce_b(void); +void update_input(void); +void update_max_rumble_duration(void); +void func_8011BAE8(void); +void update_generic_entities(void); +void update_triggers(void); +void update_scripts(void); +void update_messages(void); +void step_current_game_mode(void); +void update_entities(void); +void func_80138198(void); +void bgm_update_music_settings(void); +void update_ambient_sounds(void); +void sfx_update_looping_sound_params(void); +void update_windows(void); +void sfx_stop_env_sounds(void); +void player_render_interact_prompts(void); +void func_802C3EE4(void); +void render_screen_overlay_backUI(void); +void render_generic_entities_backUI(void); +void render_effects_UI(void); +void state_render_backUI(void); +void render_window_root(void); +void render_messages(void); +void render_generic_entities_frontUI(void); +void render_screen_overlay_frontUI(void); +void render_curtains(void); +void state_render_frontUI(void); +void fio_init_flash(void); +void func_80028838(void); +void clear_screen_overlays(void); +void bgm_reset_sequence_players(void); +void reset_ambient_sounds(void); +void sfx_clear_sounds(void); +void poll_rumble(void); + void set_action_state(s32 actionState); s32 get_collider_type_by_id(s32 colliderID); void suggest_player_anim_setUnkFlag(s32 arg0); @@ -881,6 +920,9 @@ void func_8025DE88(ActorPart*, s32); void func_800E9894(void); void func_8013A854(u32); +void set_script_flags(Evt* script, s32 flags); +void clear_script_flags(Evt* script, s32 flags); + void disable_player_blur(void); void enable_player_blur(void); void func_80254950(void); diff --git a/include/npc.h b/include/npc.h index c96c5b10a8..531169122c 100644 --- a/include/npc.h +++ b/include/npc.h @@ -284,7 +284,9 @@ typedef struct Enemy { /* 0xD0 */ EnemyTerritory* territory; /* 0xD4 */ EnemyDrops* drops; /* 0xD8 */ u32 tattleMsg; - /* 0xDC */ char unk_DC[20]; + /* 0xDC */ s32 unk_DC; + /* 0xE0 */ s16 unk_E0; + /* 0xE2 */ char unk_E2[0xE]; } Enemy; // size = 0xF0 typedef struct Encounter { diff --git a/src/5B320.c b/src/5B320.c index 7065ea4155..42fada610b 100644 --- a/src/5B320.c +++ b/src/5B320.c @@ -162,8 +162,10 @@ s32 D_8008EEF0[] = { 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000000, 0x00000006, 0x00000007, 0x00000008, 0x00000005, 0x00000000, 0x00000000 }; +const char D_800989A0[] = "なし"; + s32 gPartnerPopupProperties[][4] = { - {0x800989A0, 0x00000000, 0x00000000, 0x00000000}, + {&D_800989A0, 0x00000000, 0x00000000, 0x00000000}, {0x001D0007, 0x00000002, 0x00280000, 0x00280001}, {0x001D0008, 0x00000003, 0x0028000D, 0x0028000E}, {0x001D0009, 0x00000004, 0x0028001A, 0x0028001B}, diff --git a/src/main_loop.c b/src/main_loop.c index 4a9d95c9e8..455a055551 100644 --- a/src/main_loop.c +++ b/src/main_loop.c @@ -382,6 +382,12 @@ void gfx_transfer_frame_to_depth(u16* frameBuffer0, u16* frameBuffer1, u16* zBuf for (x = 2; x < SCREEN_WIDTH - 2; x++) { s32 pixel = SCREEN_WIDTH * y + x; + /* + The application of gfx_frame_filter_pass_0 is done to the following pixels, where x is the current pixel. + . . + . x . + . . + */ if (((frameBuffer1[pixel] >> 2) & 0xF) < 8) { gfx_frame_filter_pass_0(frameBuffer0, frameBuffer1, y - 1, x - 1, &filterBuf0[0]); gfx_frame_filter_pass_0(frameBuffer0, frameBuffer1, y - 1, x + 1, &filterBuf0[4]); @@ -390,7 +396,10 @@ void gfx_transfer_frame_to_depth(u16* frameBuffer0, u16* frameBuffer1, u16* zBuf gfx_frame_filter_pass_0(frameBuffer0, frameBuffer1, y + 1, x - 1, &filterBuf0[16]); gfx_frame_filter_pass_0(frameBuffer0, frameBuffer1, y + 1, x + 1, &filterBuf0[20]); gfx_frame_filter_pass_0(frameBuffer0, frameBuffer1, y, x, &filterBuf1[0]); - gfx_frame_filter_pass_1(&filterBuf0, (filterBuf1[0] << 24) | (filterBuf1[1] << 16) | (filterBuf1[2] << 8) | filterBuf1[3], &zBuffer[pixel]); + gfx_frame_filter_pass_1(filterBuf0, (filterBuf1[0] << 24) | + (filterBuf1[1] << 16) | + (filterBuf1[2] << 8) | + (filterBuf1[3] << 0), &zBuffer[pixel]); } else { // Don't apply any filters to the edges of the screen zBuffer[pixel] = frameBuffer0[pixel] | 1; diff --git a/src/move_table.inc.c b/src/move_table.inc.c index 5dc5fa9ba9..29464e3745 100644 --- a/src/move_table.inc.c +++ b/src/move_table.inc.c @@ -550,7 +550,7 @@ MoveData gMoveTable[] = { .costBP = 3 }, { // move 37: Unused_37 - .nameMsg = 0x80098A04, + .nameMsg = "つうじょう", .fullDescMsg = 0, .shortDescMsg = 0, .flags = 0, @@ -570,7 +570,7 @@ MoveData gMoveTable[] = { .costBP = 4 }, { // move 39: Unused_39 - .nameMsg = 0x80098A04, + .nameMsg = "つうじょう", .fullDescMsg = 0, .shortDescMsg = 0, .flags = MOVE_DATA_FLAG_SINGLE_TARGET | MOVE_DATA_FLAG_4 | MOVE_DATA_FLAG_10000, @@ -580,7 +580,7 @@ MoveData gMoveTable[] = { .costBP = 0 }, { // move 3A: Unused_3A - .nameMsg = 0x80098A04, + .nameMsg = "つうじょう", .fullDescMsg = 0, .shortDescMsg = 0, .flags = 0, @@ -630,7 +630,7 @@ MoveData gMoveTable[] = { .costBP = 2 }, { // move 3F: Unused_3F - .nameMsg = 0x80098A04, + .nameMsg = "つうじょう", .fullDescMsg = 0, .shortDescMsg = 0, .flags = MOVE_DATA_FLAG_SINGLE_TARGET | MOVE_DATA_FLAG_4 | MOVE_DATA_FLAG_10000, @@ -750,7 +750,7 @@ MoveData gMoveTable[] = { .costBP = 1 }, { // move 4B: Unused_4B - .nameMsg = 0x80098A04, + .nameMsg = "つうじょう", .fullDescMsg = 0, .shortDescMsg = 0, .flags = 0, @@ -810,7 +810,7 @@ MoveData gMoveTable[] = { .costBP = 5 }, { // move 51: Unused_51 - .nameMsg = 0x80098A04, + .nameMsg = "つうじょう", .fullDescMsg = 0, .shortDescMsg = 0, .flags = MOVE_DATA_FLAG_SINGLE_TARGET | MOVE_DATA_FLAG_4 | MOVE_DATA_FLAG_10000, @@ -1110,7 +1110,7 @@ MoveData gMoveTable[] = { .costBP = 1 }, { // move 6F: Unused_FinalGoompa - .nameMsg = 0x800989F0, + .nameMsg = "ファイナルクリジイ", .fullDescMsg = 0, .shortDescMsg = 0, .flags = MOVE_DATA_FLAG_2, @@ -1120,7 +1120,7 @@ MoveData gMoveTable[] = { .costBP = 1 }, { // move 70: Unused_FinalBombomb - .nameMsg = 0x800989DC, + .nameMsg = "ファイナルボムヘイ", .fullDescMsg = 0, .shortDescMsg = 0, .flags = MOVE_DATA_FLAG_2, @@ -1550,7 +1550,7 @@ MoveData gMoveTable[] = { .costBP = 0 }, { // move 9B: Unused_LoneFool1 - .nameMsg = 0x800989D0, + .nameMsg = "ひとりぼけ", .fullDescMsg = 0, .shortDescMsg = 0, .flags = MOVE_DATA_FLAG_SINGLE_TARGET | MOVE_DATA_FLAG_2, @@ -1560,7 +1560,7 @@ MoveData gMoveTable[] = { .costBP = 0 }, { // move 9C: Unused_LoneFool2 - .nameMsg = 0x800989D0, + .nameMsg = "ひとりぼけ", .fullDescMsg = 0, .shortDescMsg = 0, .flags = MOVE_DATA_FLAG_SINGLE_TARGET | MOVE_DATA_FLAG_2, @@ -1570,7 +1570,7 @@ MoveData gMoveTable[] = { .costBP = 0 }, { // move 9D: Unused_LoneFool3 - .nameMsg = 0x800989D0, + .nameMsg = "ひとりぼけ", .fullDescMsg = 0, .shortDescMsg = 0, .flags = MOVE_DATA_FLAG_SINGLE_TARGET | MOVE_DATA_FLAG_2, @@ -1580,7 +1580,7 @@ MoveData gMoveTable[] = { .costBP = 0 }, { // move 9E: Unused_Mumble - .nameMsg = 0x800989C0, + .nameMsg = "むにゃむにゃ", .fullDescMsg = 0, .shortDescMsg = 0, .flags = MOVE_DATA_FLAG_4, @@ -1590,7 +1590,7 @@ MoveData gMoveTable[] = { .costBP = 0 }, { // move 9F: Unused_Preach - .nameMsg = 0x800989B4, + .nameMsg = "せっきょう", .fullDescMsg = 0, .shortDescMsg = 0, .flags = MOVE_DATA_FLAG_SINGLE_TARGET | MOVE_DATA_FLAG_2, @@ -1600,7 +1600,7 @@ MoveData gMoveTable[] = { .costBP = 0 }, { // move A0: Unused_Awakening - .nameMsg = 0x800989A8, + .nameMsg = "かくせい", .fullDescMsg = 0, .shortDescMsg = 0, .flags = MOVE_DATA_FLAG_SINGLE_TARGET | MOVE_DATA_FLAG_2, diff --git a/src/world/world.c b/src/world/world.c index 6912d94687..85ac3b6a33 100644 --- a/src/world/world.c +++ b/src/world/world.c @@ -11,17 +11,6 @@ s32 D_8008FF60[] = { 0, 1, 2, 3 }; -// rodata -const s32 D_800989A0[] = { - 0x82C882B5, 0x00000000, 0x82A982AD, 0x82B982A2, - 0x00000000, 0x82B982C1, 0x82AB82E5, 0x82A40000, - 0x82DE82C9, 0x82E182DE, 0x82C982E1, 0x00000000, - 0x82D082C6, 0x82E882DA, 0x82AF0000, 0x83748340, - 0x83438369, 0x838B837B, 0x83808377, 0x83430000, - 0x83748340, 0x83438369, 0x838B834E, 0x838A8357, - 0x83430000, 0x82C282A4, 0x82B682E5, 0x82A40000, -}; - // bss extern MapConfig gMapConfig; extern s32 gMap; diff --git a/ver/us/splat.yaml b/ver/us/splat.yaml index 4ed0d07ddd..58f3b7b0b7 100644 --- a/ver/us/splat.yaml +++ b/ver/us/splat.yaml @@ -91,6 +91,7 @@ segments: - [0x31650, c, 31650] - [0x33450, c] - [0x341D0, c, 341d0] + - [0x341D0, c, 5B320] - [0x35080, c, effects] - [0x35AC0, c, world/world] - [0x362A0, c, collision] diff --git a/ver/us/symbol_addrs.txt b/ver/us/symbol_addrs.txt index e9b21b86d0..b236cf7755 100644 --- a/ver/us/symbol_addrs.txt +++ b/ver/us/symbol_addrs.txt @@ -2499,11 +2499,6 @@ D_80098710 = 0x80098710; // type:data rom:0x73B10 D_80098718 = 0x80098718; // type:data rom:0x73B18 D_80098720 = 0x80098720; // type:data rom:0x73B20 D_800988C0 = 0x800988C0; // type:data rom:0x73CC0 -D_80098930 = 0x80098930; // type:data rom:0x73D30 -D_80098938 = 0x80098938; // type:data rom:0x73D38 -D_80098968 = 0x80098968; // type:data rom:0x73D68 -D_80098990 = 0x80098990; // type:data rom:0x73D90 -D_800989A0 = 0x800989A0; // type:data rom:0x73DA0 D_80098A10 = 0x80098A10; // type:data rom:0x73E10 D_80098A1C = 0x80098A1C; // type:data rom:0x73E1C D_80098A24 = 0x80098A24; // type:data rom:0x73E24 diff --git a/ver/us/undefined_syms.txt b/ver/us/undefined_syms.txt index 3c29a8552d..a4e38d5618 100644 --- a/ver/us/undefined_syms.txt +++ b/ver/us/undefined_syms.txt @@ -48,7 +48,6 @@ D_B0000000 = 0xB0000000; D_B0000008 = 0xB0000008; D_B0000010 = 0xB0000010; D_D9FCFFFF = 0xD9FCFFFF; -D_E007EC2F = 0xE007EC2F; D_E1000010 = 0xE1000010; D_E7000008 = 0xE7000008; D_E8000008 = 0xE8000008; @@ -67,6 +66,8 @@ D_8004AA85 = 0x8004AA85; fx_sun_undeclared = fx_sun; +D_E007EC2F = 0xE007EC2F; + // effect_1 D_09000FA0 = 0x09000FA0; D_09001060 = 0x09001060; @@ -428,7 +429,11 @@ D_80079540 = 0x80079540; // TODO below // misc unsorted +osTvType = 0x80000300; +osRomBase = 0x80000308; +osMemSize = 0x80000318; gBackgroundImage = 0x80200000; + func_80242040_8B20B0 = 0x80242040; spiked_goomba = 0x8021B0AC; paragoomba = 0x8021CD00; @@ -449,10 +454,7 @@ D_802EF0D0 = 0x802EF0D0; D_800FBB60 = 0x800FBB60; D_800FBBE0 = 0x800FBBE0; D_80200000 = 0x80200000; -osTvType = 0x80000300; -osRomBase = 0x80000308; D_8000030C = 0x8000030C; -osMemSize = 0x80000318; D_8000031C = 0x8000031C; D_800A08C0 = 0x800A08C0; D_80164000 = 0x80164000;