From ff2c968335e4cb237fa7bc330e943397ebda6557 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Thu, 26 Aug 2021 05:32:48 +0900 Subject: [PATCH] Getting rid of warnings and removing function decl from INCLUDE_ASM (#396) * Fix some fx stuff * INCLUDE_ASM doesn't emit a function decl anymore --- include/functions.h | 3 --- include/include_asm.h | 1 - include/nu/nusys.h | 2 +- include/variables.h | 3 --- src/190B20.c | 1 + src/25f00_len_940.c | 2 ++ src/7bb60_len_41b0.c | 1 + src/battle/partner/goombario.c | 5 +++++ src/camera.c | 1 + src/encounter_api.c | 1 + src/entity/BlueWarpPipe.c | 2 ++ src/entity/SaveBlock.c | 2 ++ src/entity/SuperBlock.c | 2 ++ src/evt/player_api.c | 3 +++ src/os/nusys/nuGfxThread.c | 1 - src/world/area_arn/arn_02/events.c | 1 + src/world/area_arn/arn_04/events.c | 1 + src/world/area_flo/flo_08/CAFAC0.c | 1 + src/world/area_flo/flo_10/CB96B0.c | 3 +-- src/world/area_flo/flo_23/CEE2A0.c | 1 + src/world/area_trd/trd_05/9AEE20.c | 1 + src/world/common/UnkFunc13.inc.c | 1 + src/world/common/UnkFunc13_copy.inc.c | 1 + src/world/common/UnkFunc4.inc.c | 1 + src/world/common/UnkFunc8.inc.c | 1 + src/world/common/UnkNpcAIFunc11.inc.c | 1 + src/world/common/UnkNpcAIFunc8.inc.c | 1 + src/world/partner/goombario.c | 5 +++++ src/world/partner/goompa.c | 2 ++ src/world/partners.c | 1 + 30 files changed, 41 insertions(+), 11 deletions(-) diff --git a/include/functions.h b/include/functions.h index 88fa0ebfab..b4a7a7cb0d 100644 --- a/include/functions.h +++ b/include/functions.h @@ -202,9 +202,6 @@ void intro_logos_set_fade_alpha(s16 alpha); void set_game_mode(s16 idx); -void fx_walk(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5); -void fx_emote(s32, Npc*, f32, f32, f32, f32, f32, s32, s32*); - f32 get_xz_dist_to_player(f32, f32); void func_800E06C0(s32); void close_status_menu(void); diff --git a/include/include_asm.h b/include/include_asm.h index 0d434f3acc..4e9a1b007e 100644 --- a/include/include_asm.h +++ b/include/include_asm.h @@ -7,7 +7,6 @@ #if !defined(SPLAT) && !defined(__CTX__) && !defined(PERMUTER) #ifndef INCLUDE_ASM #define INCLUDE_ASM(TYPE, FOLDER, NAME, ARGS...) \ - TYPE NAME(ARGS); \ __asm__( \ ".section .text\n" \ "\t.align\t2\n" \ diff --git a/include/nu/nusys.h b/include/nu/nusys.h index f58c594efe..7ad807c6fe 100644 --- a/include/nu/nusys.h +++ b/include/nu/nusys.h @@ -676,7 +676,7 @@ extern u16* nuGfxZBuffer; /* Pointer to the Z buffer */ extern volatile u32 nuGfxTaskSpool; /* Number of tasks in queue */ extern u32 nuGfxDisplay; /* Display on/off flag */ extern u32 nuGfxCfbCounter; /* For frame buffer swapping */ -extern OSMesgQueue nuGfxMesgQ; +//extern OSMesgQueue nuGfxMesgQ; extern OSThread nuGfxThread; /* graphic thread */ /*--------------------------------------*/ diff --git a/include/variables.h b/include/variables.h index 9b7cd4a7d0..cdb3b2a2c0 100644 --- a/include/variables.h +++ b/include/variables.h @@ -295,9 +295,6 @@ extern s32 D_8010C978; extern PartnerActionStatus gPartnerActionStatus; // something with partners extern Temp8010F250 D_8010F250; // sfx_play_sound state struct? -// Effects -extern EffectTableEntry gEffectTable[135]; - extern SaveData gCurrentSaveFile; extern u32* gMapFlags; diff --git a/src/190B20.c b/src/190B20.c index eec9c42bb5..6a013d1053 100644 --- a/src/190B20.c +++ b/src/190B20.c @@ -1658,6 +1658,7 @@ void remove_player_buffs(PlayerBuff buffs) { INCLUDE_ASM(s32, "190B20", btl_update_ko_status); +void btl_appendGfx_prim_quad(u8 arg0, u8 arg1, u8 arg2, u8 arg3, u16 arg4, u16 arg5, u16 arg6, u16 arg7); INCLUDE_ASM(s32, "190B20", btl_appendGfx_prim_quad, u8 arg0, u8 arg1, u8 arg2, u8 arg3, u16 arg4, u16 arg5, u16 arg6, u16 arg7); // extern s32 D_80293970; diff --git a/src/25f00_len_940.c b/src/25f00_len_940.c index b3214a965b..a6e10e826e 100644 --- a/src/25f00_len_940.c +++ b/src/25f00_len_940.c @@ -13,6 +13,8 @@ u8 D_80078181 = 1; //bss //static u16 D_800A0F50; +s32 nuAuDmaCallBack(s32 addr, s32 len, void* state, s32 arg3); + INCLUDE_ASM(s32, "25f00_len_940", create_audio_system); void nuAuPreNMIFuncSet(NUAuPreNMIFunc func) { diff --git a/src/7bb60_len_41b0.c b/src/7bb60_len_41b0.c index c368fdfe79..68f4639952 100644 --- a/src/7bb60_len_41b0.c +++ b/src/7bb60_len_41b0.c @@ -214,6 +214,7 @@ INCLUDE_ASM(f32, "7bb60_len_41b0", player_check_collision_below, f32 arg0, s32* INCLUDE_ASM(s32, "7bb60_len_41b0", collision_main_lateral); +s32 collision_check_player_intersecting_world(s32 arg0, s32 arg1, f32 arg2); //something weird with hitID #ifdef NON_MATCHING s32 collision_check_player_intersecting_world(s32 arg0, s32 arg1, f32 arg2) { diff --git a/src/battle/partner/goombario.c b/src/battle/partner/goombario.c index 34b992d2ae..f10abd19c5 100644 --- a/src/battle/partner/goombario.c +++ b/src/battle/partner/goombario.c @@ -29,6 +29,11 @@ extern EvtSource N(idle_80239350); extern EvtSource N(nextTurn_80239A3C); extern EvtSource N(takeTurn_802396D8); +void func_802380E4_6F11C4(); +void func_8023817C_6F125C(); +void func_80238BCC_6F1CAC(); +void func_80238EDC_6F1FBC(); + ApiStatus N(func_80238000_6F10E0)(Evt* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; Actor* partnerActor = battleStatus->partnerActor; diff --git a/src/camera.c b/src/camera.c index 2d002466b5..fc2b96c1d4 100644 --- a/src/camera.c +++ b/src/camera.c @@ -3,6 +3,7 @@ s32 gCurrentCameraID = 0; s32 func_800328A4(Camera* camera, f32 arg1, f32 arg2); +s32 func_80032970(Camera* camera, f32 arg1); void create_camera_leadplayer_matrix(Camera* camera); INCLUDE_ASM(s32, "camera", test_ray_zone); diff --git a/src/encounter_api.c b/src/encounter_api.c index 1848ef6882..6cb7d0b576 100644 --- a/src/encounter_api.c +++ b/src/encounter_api.c @@ -1,5 +1,6 @@ #include "common.h" #include "map.h" +#include "effects.h" ApiStatus SetEncounterStatusFlags(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; diff --git a/src/entity/BlueWarpPipe.c b/src/entity/BlueWarpPipe.c index 2215a3817f..21abc5e274 100644 --- a/src/entity/BlueWarpPipe.c +++ b/src/entity/BlueWarpPipe.c @@ -11,6 +11,8 @@ typedef struct struct802E89B0 { /* 0x18 */ f32 unk_18; } struct802E89B0; +void entity_BlueWarpPipe_setupGfx(); + void entity_BlueWarpPipe_check_if_active(Entity* entity) { struct802E89B0* temp_s0; diff --git a/src/entity/SaveBlock.c b/src/entity/SaveBlock.c index 1bdd7ab69b..f5b3395665 100644 --- a/src/entity/SaveBlock.c +++ b/src/entity/SaveBlock.c @@ -5,6 +5,8 @@ typedef struct struct802E10F4 { s16 angle; } struct802E10F4; +void entity_SaveBlock_setupGfx(); + void entity_Shadow_init(Shadow* shadow) { shadow->scale.x = 0.1f; shadow->scale.y = 0.1f; diff --git a/src/entity/SuperBlock.c b/src/entity/SuperBlock.c index 85a77ccf00..4e00b4300d 100644 --- a/src/entity/SuperBlock.c +++ b/src/entity/SuperBlock.c @@ -3,6 +3,8 @@ extern StaticEntityData D_802EA934; +void entity_SuperBlock_HitEffect_setupGfx(); + f32 entity_SuperBlockContent_get_previous_yaw(struct802E4B10* arg0, s32 arg1) { s32 idx = arg0->unk_D0 - arg1; diff --git a/src/evt/player_api.c b/src/evt/player_api.c index 694bc71cdd..527befd16b 100644 --- a/src/evt/player_api.c +++ b/src/evt/player_api.c @@ -7,6 +7,9 @@ extern VirtualEntityList D_802DB5C0; extern VirtualEntityList D_802DB6C0; extern VirtualEntityList* D_802DB7C0; +void virtual_entity_list_render_world(void); +void virtual_entity_list_render_UI(void); + ApiStatus HidePlayerShadow(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 hideShadow = get_variable(script, *args++); diff --git a/src/os/nusys/nuGfxThread.c b/src/os/nusys/nuGfxThread.c index 2f0f225b11..d5b6eaa39e 100644 --- a/src/os/nusys/nuGfxThread.c +++ b/src/os/nusys/nuGfxThread.c @@ -6,7 +6,6 @@ void gfxThread(void); extern s32 nuContWaitMesgBuf; extern OSThread D_800B1B90; extern OSMesg nuGfxMesgBuf[NU_GFX_MESGS]; -extern OSMesgQueue nuGfxMesgQ; void nuGfxThreadStart(void) { osCreateThread(&D_800B1B90, 4, gfxThread, NULL, &nuContWaitMesgBuf, NU_GFX_THREAD_PRI); diff --git a/src/world/area_arn/arn_02/events.c b/src/world/area_arn/arn_02/events.c index 31b4a76b3a..9b289331e3 100644 --- a/src/world/area_arn/arn_02/events.c +++ b/src/world/area_arn/arn_02/events.c @@ -1,6 +1,7 @@ #include "arn_02.h" #include "sprite/npc/cleft.h" #include "sprite/npc/goomba.h" +#include "effects.h" EvtSource N(exitWalk_802410F0) = EXIT_WALK_SCRIPT(60, 0, "arn_05", 1); diff --git a/src/world/area_arn/arn_04/events.c b/src/world/area_arn/arn_04/events.c index 9900c85a98..08e168ddce 100644 --- a/src/world/area_arn/arn_04/events.c +++ b/src/world/area_arn/arn_04/events.c @@ -2,6 +2,7 @@ #include "sprite/npc/paragoomba.h" #include "sprite/npc/goomba.h" #include "sprite/npc/cleft.h" +#include "effects.h" EvtSource N(exitWalk_80243480) = EXIT_WALK_SCRIPT(60, 0, "arn_02", 1); diff --git a/src/world/area_flo/flo_08/CAFAC0.c b/src/world/area_flo/flo_08/CAFAC0.c index 7b971879e1..e4a3573c1a 100644 --- a/src/world/area_flo/flo_08/CAFAC0.c +++ b/src/world/area_flo/flo_08/CAFAC0.c @@ -2,6 +2,7 @@ #include "message_ids.h" #include "sprite/npc/dayzee.h" #include "sprite/npc/gate_flower.h" +#include "effects.h" enum { NPC_GATE_FLOWER, diff --git a/src/world/area_flo/flo_10/CB96B0.c b/src/world/area_flo/flo_10/CB96B0.c index d466f0b2ff..2ad5e99023 100644 --- a/src/world/area_flo/flo_10/CB96B0.c +++ b/src/world/area_flo/flo_10/CB96B0.c @@ -1,10 +1,9 @@ #include "flo_10.h" #include "nu/nusys.h" -extern u16* nuGfxZBuffer; - // in no way close at all, may as well start over // good luck have fun +void N(func_802404B0_CB96B0)(s32 arg0, s32 arg1, s32 arg2, s32 arg3); #ifdef NON_MATCHING void N(func_802404B0_CB96B0)(s32 arg0, s32 arg1, s32 arg2, s32 arg3) { s32 i; diff --git a/src/world/area_flo/flo_23/CEE2A0.c b/src/world/area_flo/flo_23/CEE2A0.c index 96b9b5d7ef..ccb9293dcf 100644 --- a/src/world/area_flo/flo_23/CEE2A0.c +++ b/src/world/area_flo/flo_23/CEE2A0.c @@ -2,6 +2,7 @@ #include "message_ids.h" #include "sprite/npc/gate_flower.h" #include "sprite/npc/spiny.h" +#include "effects.h" enum { NPC_SPINY0, diff --git a/src/world/area_trd/trd_05/9AEE20.c b/src/world/area_trd/trd_05/9AEE20.c index 1a83e1898c..25a0c2d90b 100644 --- a/src/world/area_trd/trd_05/9AEE20.c +++ b/src/world/area_trd/trd_05/9AEE20.c @@ -1,4 +1,5 @@ #include "trd_05.h" +#include "effects.h" ApiStatus func_80240720_9AEE20(Evt* script, s32 isInitialCall) { fx_walk(2, script->varTable[0], script->varTable[1], script->varTable[2], 0, 0); diff --git a/src/world/common/UnkFunc13.inc.c b/src/world/common/UnkFunc13.inc.c index ba9a678e35..c94f9ef47d 100644 --- a/src/world/common/UnkFunc13.inc.c +++ b/src/world/common/UnkFunc13.inc.c @@ -1,5 +1,6 @@ #include "common.h" #include "map.h" +#include "effects.h" void N(UnkFunc13)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/UnkFunc13_copy.inc.c b/src/world/common/UnkFunc13_copy.inc.c index a7c2ce0311..cb7a2a7b1d 100644 --- a/src/world/common/UnkFunc13_copy.inc.c +++ b/src/world/common/UnkFunc13_copy.inc.c @@ -1,5 +1,6 @@ #include "common.h" #include "map.h" +#include "effects.h" void N(UnkFunc13_copy)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/UnkFunc4.inc.c b/src/world/common/UnkFunc4.inc.c index 39abc99f44..f797032f0d 100644 --- a/src/world/common/UnkFunc4.inc.c +++ b/src/world/common/UnkFunc4.inc.c @@ -1,5 +1,6 @@ #include "common.h" #include "map.h" +#include "effects.h" void N(UnkFunc4)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/UnkFunc8.inc.c b/src/world/common/UnkFunc8.inc.c index 4f64484339..558b2dedd6 100644 --- a/src/world/common/UnkFunc8.inc.c +++ b/src/world/common/UnkFunc8.inc.c @@ -1,5 +1,6 @@ #include "common.h" #include "map.h" +#include "effects.h" void N(UnkFunc8)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/UnkNpcAIFunc11.inc.c b/src/world/common/UnkNpcAIFunc11.inc.c index 4695af6541..aebb2cfe36 100644 --- a/src/world/common/UnkNpcAIFunc11.inc.c +++ b/src/world/common/UnkNpcAIFunc11.inc.c @@ -1,5 +1,6 @@ #include "common.h" #include "map.h" +#include "effects.h" void N(UnkNpcAIFunc11)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* arg2) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/common/UnkNpcAIFunc8.inc.c b/src/world/common/UnkNpcAIFunc8.inc.c index e1e9013e54..d2e380b9db 100644 --- a/src/world/common/UnkNpcAIFunc8.inc.c +++ b/src/world/common/UnkNpcAIFunc8.inc.c @@ -1,5 +1,6 @@ #include "common.h" #include "map.h" +#include "effects.h" void N(UnkNpcAIFunc8)(Evt* script) { Enemy* enemy = script->owner1.enemy; diff --git a/src/world/partner/goombario.c b/src/world/partner/goombario.c index 80bd76f91e..e0bda0f577 100644 --- a/src/world/partner/goombario.c +++ b/src/world/partner/goombario.c @@ -2,6 +2,11 @@ #include "sprite/npc/world_goombario.h" #include "goombario.h" +ApiStatus func_802BD188_3170A8(Evt* script, s32 isInitialCall); +ApiStatus func_802BD1D0_3170F0(Evt* script, s32 isInitialCall); +ApiStatus func_802BD5D8_3174F8(Evt* script, s32 isInitialCall); +ApiStatus func_802BDB30_317A50(Evt* script, s32 isInitialCall); + s32 func_802BD100_317020(s32 arg0) { s32 i; diff --git a/src/world/partner/goompa.c b/src/world/partner/goompa.c index 890ef12b31..a8d0bfe7fb 100644 --- a/src/world/partner/goompa.c +++ b/src/world/partner/goompa.c @@ -3,6 +3,8 @@ static s32 goompa_802BD600; +ApiStatus func_802BD14C_324A5C(Evt* script, s32 isInitialCall); + void world_goompa_init(Npc* partner) { partner->collisionHeight = 24; partner->collisionRadius = 20; diff --git a/src/world/partners.c b/src/world/partners.c index 0a51ef8ad4..2ce9cbf7ff 100644 --- a/src/world/partners.c +++ b/src/world/partners.c @@ -39,6 +39,7 @@ extern s32 D_802C0000; s32 partner_is_idle(Npc* partner); s32 world_partner_can_player_pause_default(Npc* partner); NpcID _create_npc_basic(NpcBlueprint* blueprint); +void _use_partner_ability(); // Partner icons s32 D_800F7F00[] = {