From 2c723299b7be54a8ae9d45977d8133044d066fbf Mon Sep 17 00:00:00 2001 From: Yanis <35189056+Yanis002@users.noreply.github.com> Date: Wed, 7 Oct 2026 15:51:47 +0200 Subject: [PATCH] Merge every `extern "C"` to a common header (#157) * create CommonFuncs.hpp * merge every `extern "C"` to a common header * fix regressions * I'm dumb --- config/eur/arm9/overlays/ov031/symbols.txt | 2 +- config/eur1/arm9/overlays/ov031/symbols.txt | 2 +- config/jp/arm9/overlays/ov031/symbols.txt | 2 +- config/usa/arm9/overlays/ov031/symbols.txt | 2 +- include/Actor/ActorUnkZLSL_ZSRS.hpp | 4 +- include/CommonFuncs.hpp | 433 ++++++++++++++++++ include/Unknown/Common.hpp | 7 + include/Unknown/UnkStruct_ov000_0208f820.hpp | 8 +- src/000_Second/Actor/ActorUnkEFIK.cpp | 3 +- src/000_Second/Actor/ActorUnkSWOB.cpp | 4 +- src/000_Second/MapObject/MapObject.cpp | 7 +- .../MapObject/MapObjectMiniBlocks.cpp | 3 +- .../MapObject/MapObjectPot_Base.cpp | 3 +- .../MapObjectProfile_Derived2_20.cpp | 6 +- .../MapObject/MapObjectSwitchStep.cpp | 3 +- src/001_SceneInit/Actor/ActorManager_001.cpp | 12 +- .../Game/AdventureModeManager_001.cpp | 3 +- .../Game/GameModeAdventure_001.cpp | 3 +- .../MapObject/MapObjectManager_001.cpp | 3 +- src/001_SceneInit/PassengerManager_001.cpp | 3 +- .../Player/PlayerActorBase_001.cpp | 6 +- .../Player/PlayerActorBase_70_001.cpp | 3 +- src/001_SceneInit/Save/SaveManager_001.cpp | 3 +- src/001_SceneInit/SceneInitializers_001.cpp | 4 +- src/001_SceneInit/SysNew_001.cpp | 8 +- src/001_SceneInit/UnkStruct_0204a110_001.cpp | 5 +- src/001_SceneInit/UnkStruct_027e095c_001.cpp | 6 +- src/001_SceneInit/UnkStruct_027e09ac_001.cpp | 4 +- src/001_SceneInit/UnkStruct_027e09b8_001.cpp | 2 +- src/001_SceneInit/UnkStruct_027e0cd8_001.cpp | 6 +- .../UnkStruct_027e0cd8_0C_001.cpp | 3 +- .../UnkStruct_027e0ce0_1C_001.cpp | 4 +- .../UnkStruct_027e0ce0_30_001.cpp | 3 +- .../UnkStruct_027e0ce0_34_001.cpp | 4 +- src/001_SceneInit/UnkStruct_027e0cec_001.cpp | 3 +- .../UnkStruct_027e0cec_18_001.cpp | 3 +- src/001_SceneInit/UnkStruct_027e0d00_001.cpp | 4 +- .../UnkStruct_ov000_020b504c_001.cpp | 2 +- .../UnkStruct_ov000_020b50c0_001.cpp | 5 +- src/001_SceneInit/ZeldaCollisionBinary.cpp | 3 +- src/001_SceneInit/ZeldaMapBinary.cpp | 10 +- src/017_CourseExec/Actor/Actor_017.cpp | 22 +- .../Game/AdventureModeManager_15C_017.cpp | 3 +- .../AdventureModeManager_15C_20_00_017.cpp | 3 +- .../MapObject/MapObjectManager_017.cpp | 6 +- .../MapObject/MapObjectSwitchStep_017.cpp | 4 +- .../Player/PlayerActorBase_70_017.cpp | 9 +- .../Player/PlayerLinkActor_017.cpp | 3 +- src/017_CourseExec/Save/SaveManager_017.cpp | 4 +- .../UnkStackStruct_ov017_020c1104_017.cpp | 7 +- src/017_CourseExec/UnkStruct_027e09b4_017.cpp | 10 +- .../UnkStruct_027e0ce0_30_017.cpp | 14 +- .../UnkStruct_027e0ce0_40_017.cpp | 5 +- .../UnkStruct_027e0ce0_40_Base_94_017.cpp | 4 +- .../UnkStruct_027e0cec_18_017.cpp | 7 +- src/017_CourseExec/code_020be2ec_017.cpp | 14 +- src/018_StartUp/GameModeStartUp.cpp | 32 +- src/018_StartUp/StartUpInitializers.cpp | 20 +- src/019_MainSelect/019_SaveManager.cpp | 30 +- src/019_MainSelect/019_UnkSubStruct9.cpp | 13 +- src/019_MainSelect/FileSelectMain.cpp | 7 +- src/019_MainSelect/FileSelectManager_160.cpp | 3 +- src/019_MainSelect/FileSelectMicTest.cpp | 8 +- src/019_MainSelect/FileSelectOptions.cpp | 12 +- src/019_MainSelect/FileSelectSubScreen.cpp | 6 +- .../Actor/Actor_Derived1_EC_024.cpp | 23 +- .../Game/AdventureModeManager_024.cpp | 9 +- .../Game/AdventureModeManager_160_024.cpp | 5 +- .../Game/AdventureModeManager_170_024.cpp | 3 +- .../Game/AdventureModeManager_174_024.cpp | 5 +- .../Game/AdventureModeManager_178_024.cpp | 3 +- .../Game/AdventureModeManager_180_024.cpp | 3 +- .../Game/AdventureModeManager_184_024.cpp | 5 +- .../Game/AdventureModeManager_18C_024.cpp | 5 +- .../Game/AdventureModeManager_190_024.cpp | 3 +- .../AdventureModeManager_1B8_Base_024.cpp | 11 +- .../Game/GameModeAdventure_024.cpp | 5 +- src/024_MainGame/MiscAdvManager.cpp | 3 +- .../Player/PlayerActor_A0_38_024.cpp | 4 +- .../TitleCard/UnkTitleCardSystem1_024.cpp | 4 +- src/024_MainGame/Train/PassengerManager.cpp | 4 +- src/024_MainGame/Train/UnkDataStruct4.cpp | 5 +- src/024_MainGame/Train/UnkDataStruct4_14.cpp | 5 +- .../Train/UnkStruct_027e0cf8_00_0C_024.cpp | 3 +- .../Train/UnkStruct_027e0cf8_08_00_024.cpp | 3 +- .../Train/UnkStruct_027e0cf8_08_024.cpp | 3 +- src/024_MainGame/Train/UnkStruct_027e0d00.cpp | 6 +- .../Train/UnkTrainSystem1_024.cpp | 4 +- .../Train/UnkTrainSystem2_024.cpp | 6 +- src/024_MainGame/UICounterManager.cpp | 4 +- .../Unknown/UnkStruct_027e0d08_024.cpp | 4 +- src/025_Title/GameModeTitleScreen.cpp | 6 +- src/025_Title/TitleScreen.cpp | 6 +- src/031_Land/Actor/ActorBlast.cpp | 8 +- src/031_Land/Actor/ActorBomb.cpp | 33 +- src/031_Land/Actor/ActorHeart.cpp | 18 +- src/031_Land/Actor/ActorItemBoomerang.cpp | 10 +- src/031_Land/Actor/ActorItemDrop.cpp | 6 +- src/031_Land/Actor/ActorItemTornado.cpp | 18 +- src/031_Land/Actor/ActorRollingStone.cpp | 18 +- src/031_Land/Actor/ActorRupee.cpp | 28 +- src/031_Land/Actor/ActorShotArrow.cpp | 33 +- src/031_Land/Actor/ActorUnkATTG.cpp | 3 +- src/031_Land/Actor/ActorUnkEFSB.cpp | 3 +- src/031_Land/Actor/ActorUnkFLEN.cpp | 5 +- src/031_Land/Actor/ActorUnkMLCK.cpp | 3 +- src/031_Land/Actor/ActorUnkNFSP.cpp | 3 +- src/031_Land/Actor/ActorUnkNORE.cpp | 3 +- src/031_Land/Actor/ActorUnkRMTG.cpp | 5 +- src/031_Land/Actor/ActorUnkROCK.cpp | 3 +- src/031_Land/Actor/ActorUnkSCCN.cpp | 3 +- src/031_Land/Actor/ActorUnkSKDO.cpp | 3 +- src/031_Land/Actor/ActorUnkSWBM.cpp | 7 +- src/031_Land/Actor/ActorUnkTGTZ.cpp | 6 +- src/031_Land/Actor/ActorUnkTLKT.cpp | 4 +- src/031_Land/Actor/ActorUnkZLSL_ZSRS.cpp | 35 +- .../MapObject/MapObjectBombFlower.cpp | 5 +- src/031_Land/MapObject/MapObjectChestBase.cpp | 6 +- src/031_Land/MapObject/MapObjectDoorBase.cpp | 6 +- src/031_Land/MapObject/MapObjectDoorClick.cpp | 8 +- .../MapObject/MapObjectDoorDangerSpawn.cpp | 4 +- src/031_Land/MapObject/MapObjectDoorKey.cpp | 4 +- .../MapObject/MapObjectDoorSwitch.cpp | 5 +- src/031_Land/MapObject/MapObjectPot.cpp | 6 +- src/031_Land/MapObject/MapObjectUnkSWHT.cpp | 3 +- src/032_MapA1/Actor/ActorFleeingSpinut.cpp | 21 +- src/032_MapA1/Actor/ActorKeese.cpp | 19 +- src/032_MapA1/Actor/ActorSpinut.cpp | 29 +- src/032_MapA1/MapObject/MapObjectUnkSWSW.cpp | 20 +- src/063_Shrine/Actor/ActorUnkCANS.cpp | 22 +- src/063_Shrine/Actor/ActorUnkCASE.cpp | 8 +- src/063_Shrine/Actor/ActorUnkRBLS.cpp | 3 +- src/063_Shrine/Actor/ActorUnkRMSV.cpp | 4 +- src/063_Shrine/MapObject/MapObjectUnkLTRW.cpp | 2 +- src/063_Shrine/MapObject/MapObjectUnkMTJR.cpp | 2 +- src/063_Shrine/MapObject/MapObjectUnkSTAT.cpp | 8 +- src/071_Tower/Actor/ActorTearLight.cpp | 10 +- .../UnkStruct_027e0cd8_0C_101.cpp | 2 +- .../MapObjectUnkPTFL_102.cpp | 4 +- .../MapObjectUnkSAND_102.cpp | 2 +- .../UnkStruct_027e0ce0_40_102.cpp | 7 +- src/110_PlayerGet/PlayerGet.cpp | 19 +- .../PlayerSceneChange.cpp | 53 +-- .../PlayerSceneChange2.cpp | 23 +- src/ITCM/ITCM_MapObjectManager.cpp | 36 +- src/Main/Game/Game.cpp | 7 +- src/Main/Main.cpp | 1 + src/Main/System/OverlayManager.cpp | 3 +- src/Main/System/Random.cpp | 4 +- src/Main/System/SysFault.cpp | 11 +- src/Main/System/SysNew.cpp | 13 +- src/Main/UnkFileSystem.cpp | 7 +- src/Main/func_02017ea4.cpp | 1 + src/Main/func_020196fc.cpp | 10 +- 154 files changed, 745 insertions(+), 911 deletions(-) create mode 100644 include/CommonFuncs.hpp diff --git a/config/eur/arm9/overlays/ov031/symbols.txt b/config/eur/arm9/overlays/ov031/symbols.txt index 9d68878d..b9ead01f 100644 --- a/config/eur/arm9/overlays/ov031/symbols.txt +++ b/config/eur/arm9/overlays/ov031/symbols.txt @@ -615,7 +615,7 @@ _ZN19ActorProfileUnkZLSLC1Ev kind:function(thumb,size=0x3c) addr:0x020ea078 _ZN24UnkStruct_ov031_0211361c8vfunc_00EP5Actor kind:function(thumb,size=0x30) addr:0x020ea0b4 _ZN26ModelRender_ov031_02113670C2EP10G3d_Model_ kind:function(thumb,size=0x14) addr:0x020ea0e4 _ZN26ModelRender_ov031_021136708vfunc_0CEv kind:function(thumb,size=0x8) addr:0x020ea0f8 -func_ov031_020ea100 kind:function(thumb,size=0x40) addr:0x020ea100 +_ZN12ActorUnkZLSL19func_ov031_020ea100Ev kind:function(thumb,size=0x40) addr:0x020ea100 _ZN12ActorUnkZLSLC1Ev kind:function(thumb,size=0x3b4) addr:0x020ea140 _ZN24UnkStruct_ov031_0211372cD1Ev kind:function(thumb,size=0xc) addr:0x020ea4f4 _ZN26ModelRender_ov031_02113670D1Ev kind:function(thumb,size=0xc) addr:0x020ea500 diff --git a/config/eur1/arm9/overlays/ov031/symbols.txt b/config/eur1/arm9/overlays/ov031/symbols.txt index ef89cc40..cf40ad85 100644 --- a/config/eur1/arm9/overlays/ov031/symbols.txt +++ b/config/eur1/arm9/overlays/ov031/symbols.txt @@ -615,7 +615,7 @@ _ZN19ActorProfileUnkZLSLC1Ev kind:function(thumb,size=0x3c) addr:0x020ea198 _ZN24UnkStruct_ov031_0211361c8vfunc_00EP5Actor kind:function(thumb,size=0x30) addr:0x020ea1d4 _ZN26ModelRender_ov031_02113670C2EP10G3d_Model_ kind:function(thumb,size=0x14) addr:0x020ea204 _ZN26ModelRender_ov031_021136708vfunc_0CEv kind:function(thumb,size=0x8) addr:0x020ea218 -func_ov031_020ea100 kind:function(thumb,size=0x40) addr:0x020ea220 +_ZN12ActorUnkZLSL19func_ov031_020ea100Ev kind:function(thumb,size=0x40) addr:0x020ea220 _ZN12ActorUnkZLSLC1Ev kind:function(thumb,size=0x3b4) addr:0x020ea260 _ZN24UnkStruct_ov031_0211372cD1Ev kind:function(thumb,size=0xc) addr:0x020ea614 _ZN26ModelRender_ov031_02113670D1Ev kind:function(thumb,size=0xc) addr:0x020ea620 diff --git a/config/jp/arm9/overlays/ov031/symbols.txt b/config/jp/arm9/overlays/ov031/symbols.txt index 75eafb16..01b1b340 100644 --- a/config/jp/arm9/overlays/ov031/symbols.txt +++ b/config/jp/arm9/overlays/ov031/symbols.txt @@ -615,7 +615,7 @@ _ZN19ActorProfileUnkZLSLC1Ev kind:function(thumb,size=0x3c) addr:0x020eba64 _ZN24UnkStruct_ov031_0211361c8vfunc_00EP5Actor kind:function(thumb,size=0x30) addr:0x020ebaa0 func_ov031_020ebad0 kind:function(thumb,size=0x14) addr:0x020ebad0 _ZN26ModelRender_ov031_021136708vfunc_0CEv kind:function(thumb,size=0x8) addr:0x020ebae4 -func_ov031_020ea100 kind:function(thumb,size=0x40) addr:0x020ebaec +_ZN12ActorUnkZLSL19func_ov031_020ea100Ev kind:function(thumb,size=0x40) addr:0x020ebaec _ZN12ActorUnkZLSLC1Ev kind:function(thumb,size=0x3b4) addr:0x020ebb2c func_ov031_020ebee0 kind:function(thumb,size=0xc) addr:0x020ebee0 _ZN26ModelRender_ov031_02113670D1Ev kind:function(thumb,size=0xc) addr:0x020ebeec diff --git a/config/usa/arm9/overlays/ov031/symbols.txt b/config/usa/arm9/overlays/ov031/symbols.txt index a7e11b89..eef97870 100644 --- a/config/usa/arm9/overlays/ov031/symbols.txt +++ b/config/usa/arm9/overlays/ov031/symbols.txt @@ -615,7 +615,7 @@ _ZN19ActorProfileUnkZLSLC1Ev kind:function(thumb,size=0x3c) addr:0x020ea058 _ZN24UnkStruct_ov031_0211361c8vfunc_00EP5Actor kind:function(thumb,size=0x30) addr:0x020ea094 _ZN26ModelRender_ov031_02113670C2EP10G3d_Model_ kind:function(thumb,size=0x14) addr:0x020ea0c4 _ZN26ModelRender_ov031_021136708vfunc_0CEv kind:function(thumb,size=0x8) addr:0x020ea0d8 -func_ov031_020ea100 kind:function(thumb,size=0x40) addr:0x020ea0e0 +_ZN12ActorUnkZLSL19func_ov031_020ea100Ev kind:function(thumb,size=0x40) addr:0x020ea0e0 _ZN12ActorUnkZLSLC1Ev kind:function(thumb,size=0x3b4) addr:0x020ea120 _ZN24UnkStruct_ov031_0211372cD1Ev kind:function(thumb,size=0xc) addr:0x020ea4d4 _ZN26ModelRender_ov031_02113670D1Ev kind:function(thumb,size=0xc) addr:0x020ea4e0 diff --git a/include/Actor/ActorUnkZLSL_ZSRS.hpp b/include/Actor/ActorUnkZLSL_ZSRS.hpp index 1c353c4c..16c76e06 100644 --- a/include/Actor/ActorUnkZLSL_ZSRS.hpp +++ b/include/Actor/ActorUnkZLSL_ZSRS.hpp @@ -317,9 +317,11 @@ public: void func_ov031_020eaa8c(); void func_ov031_020ec164(); void func_ov031_020eba58(); - static void func_ov031_020ee1f4(); bool func_ov031_020ee724(); + static void func_ov031_020ea100(); + static void func_ov031_020ee1f4(); + // not sure where they go void func_ov031_020ea8c0(); void func_ov031_020ea8c4(); diff --git a/include/CommonFuncs.hpp b/include/CommonFuncs.hpp new file mode 100644 index 00000000..62e07ce6 --- /dev/null +++ b/include/CommonFuncs.hpp @@ -0,0 +1,433 @@ +#pragma once + +#include "Actor/ActorId.hpp" +#include "Course/Course.hpp" +#include "Map/MapObjectId.hpp" +#include "Player/PlayerActorBase.hpp" +#include "System/SysNew.hpp" +#include "types.h" + +#include +#include +#include + +struct UnkStruct_ov021_02106c5c; +struct ZMBFileInfos; +struct UnkStruct_027e0cd8_0C_Base; +struct UnkStruct_027e0cd8_0C_Base_148_00_Base; +struct EntranceInfo; +struct UnkAngleStruct; +struct ModelRender; +struct Cylinder; +struct UnkStruct_ov031_020eeee8; +struct Actor; +struct ActorRef; +struct UnkStruct_ov031_Items_00; +struct UnkStruct_ov031_Items_00_Base; +struct UnkStruct_027e0ce0; +struct UnkStruct_02011e10_Sub1; +struct UnkResourceStruct2; +struct UnkStruct_027e0cec_18_04; +struct UnkSystem5; +struct UnkStruct_027e0960_TableEntry; +struct BMDSectionModel; +struct UnkStruct_027e09ac_14; +struct UnkStackStruct1; +struct ActorUnkCASE_174; +struct UnkStruct_ov000_0208f820_28; +struct UnkStruct_027e0ce0_30_00; +struct Actor_Derived2; +struct ActorUnkCANS; +struct UnkStruct_ov063_02162e88; +struct UnkStruct_ActorUnkCANS_224; +struct ActorUnkZLSL_AnimationTag; +struct UnkStruct_ov063_02163784; +struct UnkStruct_ov063_021632e4; +struct AdventureModeManager_160_14; +struct GameModeManagerBase_104; +struct AdventureModeManager_160_18; +struct AdventureModeManager_184_10; +struct AdventureModeManager_184_14; +struct AdventureModeManager_190_10; +struct AdventureModeManager_18C_10; +struct UnkStruct_027e0ce0_40_Base_78; +struct UnkStruct_ov070_0214dc74; +struct ActorShotArrow; +struct UnkStruct_027e0960_TableEntry_04_Base; + +union Vec2bCpp; +union Vec3s; +union Vec2s; + +extern "C" { + +// itcm +void FlushGfxQueue(); +bool func_01ff916c(fx32 *, unk32, unk32); +void func_01ff91b8(unk16 *, fx32, fx32); +void func_01ff9218(fx32 *, fx32, fx32); +unk32 func_01ff9258(fx32, fx32); +unk32 func_01ff930c(s16 *, s16, unk32); +void func_01ff9318(void *, unk32, unk32); +unk32 func_01ff9364(u16 *, UnkAngleStruct); +void func_01ff93c0(VecFx32 *, fx32); +void func_01ff941c(VecFx32 *, VecFx32 *); +void func_01ff94cc(VecFx32 *, VecFx32 *, VecFx32 *); +void func_01ff95a0(VecFx32 *, unk16); +void func_01ff9638(VecFx32 *vec, s16 angle); +void func_01ff9770(VecFx32 *, unk32); +void func_01ff97c8(VecFx32 *, int); +void func_01ff993c(VecFx32 *, VecFx32 *, unk32); +fx32 func_01ff9a5c(VecFx32 *, VecFx32 *, VecFx32 *); +void func_01ff9fbc(MtxFx22 *, unk32, MtxFx22 *); +void func_01ffa60c(const MtxFx33 *, MtxFx33 *, MtxFx33 *); +void func_01ffa7a0(VecFx32 *, MtxFx33 *, VecFx32 *); +void func_01ffa9e8(MtxFx43 *, MtxFx43 *); +void func_01ffad5c(MtxFx43 *, MtxFx43 *, MtxFx43 *); +void func_01ffaf74(VecFx32 *, MtxFx43 *, VecFx32 *); +fx32 func_01ffb428(unk32, unk32); +fx32 func_01ffb464(fx32); +fx32 func_01ffb66c(unk32, unk32); +unk32 func_01ffb6a8(unk32, unk32); +void func_01ffb6e4(unk32, const void *, void *); +void func_01ffb714(const VecFx32 *, const VecFx32 *, VecFx32 *); +void func_01ffb974(unk32, VecFx32 *, VecFx32 *, VecFx32 *); +fx32 func_01ffb9cc(VecFx32 *, VecFx32 *); +u16 func_01ffbbe0(fx32 x, fx32 z); +void func_01ffc5a0(ModelRender *, unk32, UnkAngleStruct, void *); +void func_01ffcb94(unk16, unk16, MtxFx33 *); +bool func_01ffccf4(Cylinder *, VecFx32 *, VecFx32 *, unk32 *); +void func_01ffce1c(Cylinder *, Cylinder *); +int func_01ffcea0(unk32, UnkStruct_ov031_020eeee8 *); +void func_01ffcfcc(VecFx32 *, VecFx32 *, VecFx32 *); +void func_01ffd054(VecFx32 *, VecFx32 *); +void func_01ffd1b4(VecFx32 *, VecFx32 *); +void func_01ffe6c4(Actor **, ActorRef, VecFx32 *, VecFx32 *, s32, VecFx32 *, UnkStruct_ov031_Items_00_Base *); +fx32 func_01ffe868(VecFx32 *, unk32, unk32); +bool func_01ffecdc(unk32 param1, Cylinder *param2); +void func_01ffedac(Vec2bCpp *, VecFx32 *); +void func_01fff05c(u32 *, UnkStruct_027e0cd8_0C_Base *, VecFx32 *); +void func_01fff17c(unk16 *, UnkStruct_027e0ce0 *, unk32); +void func_01fff6d0(void *, VecFx32 *param1, s32 *param2, s32 *param3); +void func_01ffb644(fx32 x, fx32 y); +unk32 func_01ffb558(); + +// main +UnkStruct_02011e10_Sub1 *func_02001098(void *, size_t, unk32); +void func_020010b8(void *); +size_t func_020010e0(UnkStruct_02011e10_Sub1 *heapID, void *pFile, unk32 param3); +UnkStruct_02011e10_Sub1 *func_020012e0(void *, size_t, unk32); +void func_02001300(void *); +void *func_02001308(void *, size_t, u32); +unk32 func_020013ac(void *param1); +BOOL func_0200169c(void *, int, int, int, int, void *, int); +void func_0200174c(); +void func_0200240c(unk32); +BOOL NNS_SndArcLoadBank(unk32 param1, unk32 param2); +void func_02006aa8(unk32, unk32); +void func_02006d8c(u16, unk32); +void func_0200b578(G3d_RenderObject *, void (*)(), unk32, unk32, unk32); +void func_0200b58c(G3d_RenderObject *); +void G3d_GetCurrentMtx(MtxFx43 *mtx1, MtxFx33 *mtx2); +void func_0200ea38(G3d_Model *, unk32, unk32); +void func_0200eab0(G3d_Model *, unk32, u8); +void func_0200ef9c(G3d_Model *); +UnkResourceStruct2 *func_0200f05c(G3d_NameList *, char *); +unk32 func_0200f218(unk32, const char *); +void *func_02012ec8(unk32, unk16, const char *, size_t *, unk32, u8); +void *func_02012ee4(const char *, unk32, unk32, size_t *, u8); +void *func_02012f6c(const char *, size_t *); +BOOL func_02012fa8(const char *); +unk32 func_02012fc4(unk32); +void func_020131ec(); +void func_02013214(); +void func_0201328c(); +void func_020132c8(); +void func_020132dc(); +void func_02013354(); +unk32 func_020147a8(); +void func_02014d38(void *, int); +unk32 func_02014fe0(); +void func_02015300(unk32 *); +HeapIndex16 func_02015338(); +void func_02015628(char *, char *, unk32, void *, size_t); +void func_02015644(char *); +void func_02015664(char *, unk32); +void func_020156c8(char *, char *, unk32); +void func_020156f4(char *); +unk32 func_02015788(u16 param1); +u8 func_020157c0(unk32 param1, unk32 param2); +u8 func_020157f0(unk32 param1, unk32 param2); +fx32 func_02015a18(u16, unk32, unk32, unk32, u16, unk32, unk32); +void func_02015ea8(u32 resourceId, void *); +void func_0201659c(); +unk16 func_02016958(VecFx32 *, VecFx32 *); +void func_020169d4(VecFx32 *, VecFx32 *, unk16 *, const char *); +bool func_02016ae0(VecFx32 *, VecFx32 *, UnkAngleStruct, unk32, unk32); +bool func_02016b8c(VecFx32 *, VecFx32 *, unk32, UnkAngleStruct, u16, unk32); +bool func_02016c68(VecFx32 *, VecFx32 *, ActorRef); +Actor *func_02016fbc(ActorId, VecFx32 *, unk32); +unk32 func_02017158(); +bool func_02017930(UnkStruct_027e0960_TableEntry_04_Base *, UnkStruct_027e0960_TableEntry_04_Base *); +unk8 func_02017e8c(unk16 *); +fx32 func_02017f54(s16 *, UnkAngleStruct); +void func_02018114(unk16 *, unk16); +s16 func_020196b0(unk32 param1); +void func_020196fc(); +void func_02019a74(); +void func_02019b3c(); +void func_02019c4c(); +void func_02019cec(u16 param1, unk32 param2); +unk16 func_0201a710(unk16); +void func_0201b180(bool, bool); +void func_0201b278(bool, bool); +void *func_02022884(unk32); +void SetBrightColor(void *, int); +void func_020241f4(); +void func_02024208(); +void func_02024264(); +void func_02024278(); +void func_0202428c(); +void func_020242a0(); +void func_020242b4(); +void func_020242c8(); +u32 func_0202447c(); +u32 func_02024494(); +void func_02024a84(MtxFx33 *param1); +void func_02024df0(u16 *); +void func_02024fc4(fx16 sin, fx16 cos); +void func_02028450(void *param1); +void CopySingle288(MtxFx43 *, MtxFx33 *); +unk32 func_02032784(unk32 param1); +unk32 func_020328c8(void *, void *, size_t); +u16 func_02032920(void *param1, size_t param2); +unk32 func_02039d60(f32, unk32); +f32 func_02039f04(unk32); +f32 func_0203ab58(unk32, f32); +f32 func_0203ad88(f32, unk32); +void func_02097bb8(void); +void func_02098388(void); +BOOL ZMB_020ba350(ZMBFileInfos *pFileInfos, u8 param2, UnkStruct_027e0cd8_0C_Base *pDst); +void ZMB_020ba388(CustomVector *pVector, size_t param2); +void ZMB_020ba408(CustomVector *pVector, size_t param2); +void func_0201245c(); +void func_02027a28(void *param1, unk32 param2); +void func_02013184(); +void func_020131b0(); +void func_02031e48(void *param1); +unk32 func_0202d624(void *param1, unk32 param2); +void *func_02001fd4(void *param1, size_t param2); +unk32 func_020011f4(void *); +void func_0200a7b0(unk32 param1, void *param2, void *param3, void *param4, unk32 param5, unk32 param6, unk32 param7, + unk32 param8); +unk32 func_0200e234(); +void func_02029058(void *, void *); +u32 func_0202955c(void *, int, void *, int, void *); +void *func_02001654(void *); +void *func_020145b0(UnkId *, s32); +void *func_020010c0(void *, size_t, uint); +UnkId *func_02001488(void); +UnkId *func_02014704(); +UnkId *func_020011c8(UnkId *, void *); +UnkId *func_02014630(UnkId *, void *); +UnkId *func_02001684(UnkId *, void *); +void func_020327c8(void *param1, unk32 param2); +void func_0201bdd0(); +void NNS_SndInit(); +void NNS_SndArcInit(void *param1, const char *soundDataPath, unk32 param2, unk32 param3); +void NNS_SndArcPlayerSetup(unk32 param1); +void func_02004d2c(unk32 param1, unk32 param2); +void func_02001778(unk32 param1); +void func_02003f98(unk32 param1, unk32 param2); +void NNS_SndHeapSaveState(unk32 param1); +void func_0202ee0c(); +void func_0202f910(unk32 param1); +void func_0202f958(unk32 param1); +void func_02005030(void *param1); +void NNS_SndHandleInit(void *param1); +void NNS_SndPlayerStopSeq(void *param1, unk32 param2); + +// overlay 0 +void func_ov000_02052238(void *, void *); +void func_ov000_02052bcc(void *); +void func_ov000_02054548(void *, unk32); +unk32 func_ov000_020545d0(void *, void *); +UnkStruct_027e0cec_18_04 *func_ov000_02054690(void *, unk32, unk32, unk32, unk32, unk32); +void func_ov000_020578a4(UnkSystem5 *); +void func_ov000_02057c98(ModelRender *param1, UnkSystem5 *param2); +void func_ov000_02058c74(void *, int, int, int, int); +s8 func_ov000_02059da4(UnkStruct_027e0960_TableEntry *, VecFx32 *param1); +BMDSectionModel *func_ov000_0205abcc(void *, void *, unk32, unk32, void *); +bool func_ov000_0205adfc(VecFx32 *, VecFx32 *); +bool func_ov000_0205aeac(); +unk32 func_ov000_0205b090(); +unk32 func_ov000_0205b0ac(s16 param1); +void func_ov000_0205be34(void *thisx, unk16 param1); +void func_ov000_0205be44(void *thisx, Vec2s *param1, Vec2s *param2, bool param3, bool param4); +void func_ov000_0205c1f0(unk32 *, u16); +void func_ov000_0205c204(void *, VecFx32 *, int, int, u8); +unk32 func_ov000_0205c384(VecFx32 *param1, VecFx32 *param2); +void func_ov000_0205c584(void *, int, int); +bool func_ov000_0205c74c(unk32, unk32, unk32, unk32); +unk32 func_ov000_0205c7ac(unk32, unk32); +SceneIndex func_ov000_0205c984(); +u32 func_ov000_0205c9b4(); +bool func_ov000_0205c9d0(unk32 stationSceneIdx); +bool func_ov000_0205ca18(unk32 param1, unk32 param2); +void func_ov000_0205ca74(unk32); +VecFx32 *func_ov000_0205d524(unk32, unk32); +void func_ov000_0205d65c(void *, VecFx32 *, VecFx32 *, UnkAngleStruct); +void func_ov000_0205db44(void *, void *, unk32); +void func_ov000_0205dbe4(u16); +void func_ov000_02062e44(Vec2s *param1, void *param2); +void *func_ov000_02066294(); +unk32 func_ov000_02068504(int); +void func_ov000_02072344(u16 *, UnkStruct_027e09ac_14 *); +void func_ov000_02072fd0(UnkStackStruct1 *); +void func_ov000_02073080(void *); +unk32 func_ov000_02077480(); +fx32 func_ov000_020775d8(fx32); +unk32 func_ov000_02078aec(); +void func_ov000_0207b6c0(); +void func_ov000_0207b70c(ActorUnkCASE_174 *param1, Actor *param2); +unk32 func_ov000_0207df88(unk32 *, Cylinder *, unk32); +void Unknown_func_ov000_0207fd7c(void *, void *, unk32); +fx32 func_ov000_02080068(fx32 x); +fx32 func_ov000_02080080(fx32 x); +unk32 func_ov000_02080098(void *, void *, int, int, int, int); +bool func_ov000_02080998(VecFx32 *); +void func_ov000_020814ec(void *, void *); +void func_ov000_02081520(void *, void *, u8); +void func_ov000_020830a4(unk32, unk32, unk32, unk32, unk32, unk32); +void func_ov000_020830d4(unk32, u16, unk32, unk32, unk32); +void func_ov000_02085d1c(void *); +bool func_ov000_020864f8(void *, UnkAngleStruct, void *, void *); +void func_ov000_02087ee8(); +unk32 func_ov000_0208832c(s16, unk32); +void func_ov000_02089bbc(void *, unk32); +void func_ov000_0208a7a4(void *, void *); +void func_ov000_0208abc4(ActorRef *, void *, Vec2s *); +void func_ov000_0208ba10(void *, void *, unk32); +void func_ov000_0208bc00(UnkStruct_027e0ce0 *, unk16, unk16 *); +void func_ov000_0208bd20(UnkStruct_027e0ce0 *param1, unk32 param2, unk32 param3, unk32 param4); +void func_ov000_0208cac8(UnkStruct_ov000_0208f820_28 *, VecFx32 *, unk32); +unk32 func_ov000_0208dc98(unk32); +void func_ov000_0208dd60(void *, UnkStruct_027e0ce0_30_00 *); +const char *func_ov000_0208e830(int); +bool func_ov000_0208e874(const u8 *, int, int, int); +void func_ov000_0208f820(); +void func_ov000_020977e4(); +void func_ov000_02097d4c(VecFx32 *); +void func_ov000_02097e04(VecFx32 *); +void func_ov000_02097ea0(VecFx32 *); +void func_ov000_02097f38(VecFx32 *); +void func_ov000_02097fcc(VecFx32 *); +void func_ov000_0209807c(void *); +void func_ov000_020980e0(void *); +void func_ov000_02098244(VecFx32 *); +void func_ov000_020986b4(s16 *param1, Actor_Derived2 *param2, unk32 param3); +unk32 func_ov000_02098d7c(ActorUnkCANS *param1, UnkStruct_ov063_02162e88 *param2); +void func_ov000_02099870(UnkStruct_ActorUnkCANS_224 *, VecFx32 *, u16); +void func_ov000_02099e58(UnkStruct_ov063_021632e4 *param1, ActorUnkZLSL_AnimationTag param2, unk32 param8); +void func_ov000_02099f64(UnkStruct_ov063_02163784 *param1, ActorUnkZLSL_AnimationTag param2, unk32 param3); +bool func_ov000_020a0a90(size_t, unk32, size_t); +void func_ov000_020a1330(u16, ActorRef, VecFx32, UnkAngleStruct, unk32, unk32); +void func_ov000_020a14e4(unk8, VecFx32 *); +u8 func_ov000_020a9a50(); +void func_ov000_0205bedc(void *param1, void *param2, void *param3, void *param4, unk32 param5, int); +void func_ov000_020623d8(void *param1, unk32 param2); +unk8 func_ov000_02070164(void *); //! TODO: turn to a class +void func_ov000_0205a950(u8 bgType, bool isTopScreen, bool); +void func_ov000_0205a944(u8 bgType, bool isTopScreen, bool); +void *func_ov000_0208ea70(PlayerCharacter, unk32, bool); // returns pointer to .NSBTX + +// overlay 2 +AdventureModeManager_160_14 *func_ov002_020b6520(void *, void *, int); +unk32 func_ov002_020b6cf4(void *, unk32 param1); +void func_ov002_020b6d50(void *); +void func_ov002_020b6d68(void *); + +// overlay 3 +GameModeManagerBase_104 *func_ov003_020b6520(void *param1, void *param2); + +// overlay 4 +unk32 func_ov004_020b697c(void *, unk32 param1); + +// overlay 6 +AdventureModeManager_160_18 *func_ov006_020b6ab0(void *, void *); + +// overlay 7 +void func_ov007_02102850(uint **); +void func_ov007_021028a0(uint **); + +// overlay 8 +GameModeManagerBase_104 *func_ov008_020b6520(void *); + +// overlay 10 +AdventureModeManager_184_10 *func_ov010_020b6520(void *); +AdventureModeManager_184_10 *func_ov010_020b65fc(void *); +AdventureModeManager_184_14 *func_ov010_020b88c4(void *); + +// overlay 11 +AdventureModeManager_18C_10 *func_ov011_020b6520(void *, int); +void func_ov011_020b84f0(s16 *param1, void *, unk32 param2); +AdventureModeManager_190_10 *func_ov011_020b8e54(void *, int); + +// overlay 14 +unk32 func_ov014_020b6520(void *, int, int); + +// overlay 20 +void func_ov020_020c86d8(void *); + +// overlay 21 +const UnkStruct_ov021_02106c5c *func_ov021_020ea868(int index); +void func_ov021_020f8818(); + +// overlay 26 +void func_ov026_020e9208(); +void func_ov026_020efc40(unk32 param1); +void func_ov026_020f46a8(Actor *param1, VecFx32 *param2, bool param3); +bool func_ov026_020f4be0(int, int); +unk32 func_ov026_020f4c9c(SceneIndex); +u16 func_ov026_02106564(void *); +bool func_ov026_0210d664(SceneIndex sceneIndex, MapObjectId mapObjId); +unk32 func_ov026_0212e54c(); + +// overlay 31 +void func_ov031_020dcea4(void *, UnkStruct_027e0ce0_40_Base_78 *, UnkAngleStruct); +void func_ov031_020e0f30(ActorRef); +unk16 func_ov031_020e3dd0(Actor *param0); +void func_ov031_020f439c(void *, Vec3s *, unk32); +bool func_ov031_020f7538(Actor *param1, unk32 param2); +void func_ov031_020f7574(Actor *param1, unk32 param2); +void func_ov031_0210acd4(Vec2bCpp); +unk32 func_ov031_0210af50(Vec2bCpp, unk32 *); +void func_ov031_0210b0e4(Vec2bCpp, unk32); + +// overlay 34 +void func_ov034_02121de4(void *); + +// overlay 70 +UnkStruct_ov070_0214dc74 *func_ov070_02143fe4(int index); + +// overlay 71 +void func_ov071_0215e8d4(); + +// overlay 75 +void func_ov075_02160864(ActorShotArrow *, unk32); + +// overlay 84 +void func_ov084_0216122c(); +void func_ov084_021612ac(); + +// overlay 89 +void func_ov089_02165b18(void *); +void func_ov089_02165c34(void *); + +// overlay 95 +void func_ov095_0217aa88(void *, unk16 *, unk32, UnkAngleStruct); +void func_ov095_0217aaa8(void *, unk16 *, unk32); + +// overlay 96 +bool func_ov096_02179c14(); +} diff --git a/include/Unknown/Common.hpp b/include/Unknown/Common.hpp index efe739f1..0fb6761d 100644 --- a/include/Unknown/Common.hpp +++ b/include/Unknown/Common.hpp @@ -1363,3 +1363,10 @@ struct UnkStackStruct_ov017_020c1104 { void func_ov017_020c12fc(u8 param2, unk16 param3); void func_ov017_020c13b4(); }; + +struct UnkStruct_ov021_02106c5c { + /* 00 */ PAD(0x00, 0x10); + /* 10 */ u16 unk_10; + /* 12 */ u8 unk_12; + /* 13 */ u8 unk_13; +}; diff --git a/include/Unknown/UnkStruct_ov000_0208f820.hpp b/include/Unknown/UnkStruct_ov000_0208f820.hpp index 501df26d..4eb49ea2 100644 --- a/include/Unknown/UnkStruct_ov000_0208f820.hpp +++ b/include/Unknown/UnkStruct_ov000_0208f820.hpp @@ -87,12 +87,6 @@ public: /* 150 */ ActorRef mUnk_150; }; -class UnkStruct_ov000_0208f820_40 { -public: - /* 00 */ u16 mUnk_00; - /* 00 */ s16 mUnk_02; -}; - class UnkStruct_PlayerGet_vfunc_0C_param1 { public: /* 00 */ unk32 mUnk_00; @@ -144,7 +138,7 @@ public: /* 34 */ VecFx32 *mUnk_34; /* 38 */ VecFx32 *mUnk_38; /* 3C */ VecFx32 *mUnk_3C; - /* 40 */ UnkStruct_ov000_0208f820_40 *mUnk_40; + /* 40 */ UnkAngleStruct *mUnk_40; /* 44 */ UnkStruct_ov000_0208f820_44 *mUnk_44; /* 48 */ diff --git a/src/000_Second/Actor/ActorUnkEFIK.cpp b/src/000_Second/Actor/ActorUnkEFIK.cpp index f77ee30c..c2a79f63 100644 --- a/src/000_Second/Actor/ActorUnkEFIK.cpp +++ b/src/000_Second/Actor/ActorUnkEFIK.cpp @@ -1,4 +1,5 @@ #include "Actor/ActorUnkEFIK.hpp" +#include "CommonFuncs.hpp" #include "System/Random.hpp" #include "System/SysNew.hpp" #include "Unknown/UnkStruct_0204a110.hpp" @@ -6,8 +7,6 @@ #include "Unknown/UnkStruct_027e0cec.hpp" #include "Unknown/UnkStruct_ov000_020aed1c.hpp" -extern "C" void Unknown_func_ov000_0207fd7c(void *, void *, unk32); - DECL_PROFILE(ActorProfileUnkEFIK); Actor *ActorProfileUnkEFIK::Create() { diff --git a/src/000_Second/Actor/ActorUnkSWOB.cpp b/src/000_Second/Actor/ActorUnkSWOB.cpp index 2604723f..8ffa6c70 100644 --- a/src/000_Second/Actor/ActorUnkSWOB.cpp +++ b/src/000_Second/Actor/ActorUnkSWOB.cpp @@ -1,14 +1,12 @@ #include "Actor/ActorUnkSWOB.hpp" #include "Actor/ActorManager.hpp" +#include "CommonFuncs.hpp" #include "System/Random.hpp" #include "System/SysNew.hpp" #include "Unknown/UnkStruct_027e0cd8.hpp" #include "Unknown/UnkStruct_027e0ce0.hpp" #include "Unknown/UnkStruct_ov000_020b5214.hpp" -extern "C" void func_01ffedac(Vec2bCpp *, VecFx32 *); -extern "C" void func_01ffb9cc(void *, VecFx32 *); - DECL_PROFILE(ActorProfileUnkSWOB); Actor *ActorProfileUnkSWOB::Create() { diff --git a/src/000_Second/MapObject/MapObject.cpp b/src/000_Second/MapObject/MapObject.cpp index 69158f52..6dc40d73 100644 --- a/src/000_Second/MapObject/MapObject.cpp +++ b/src/000_Second/MapObject/MapObject.cpp @@ -1,6 +1,7 @@ #include "MapObject/MapObject.hpp" #include "Actor/Actor.hpp" #include "Actor/ActorManager.hpp" +#include "CommonFuncs.hpp" #include "Physics/Cylinder.hpp" #include "Unknown/UnkStruct_0204af1c.hpp" #include "Unknown/UnkStruct_027e0998.hpp" @@ -11,12 +12,6 @@ #include "Unknown/UnkStruct_ov000_020b5d34.hpp" #include -extern "C" void func_01ffb714(VecFx32 *, VecFx32 *, void *); -extern "C" void func_01ffb9cc(VecFx32 *, VecFx32 *); -extern "C" u16 func_01ffbbe0(fx32 x, fx32 z); -extern "C" unk32 func_01ffecdc(unk32 param1, Cylinder *param2); -extern "C" void func_01fff6d0(void *, VecFx32 *param1, s32 *param2, s32 *param3); - MapObject::MapObject() { this->mUnk_10 = NULL; this->mState = MapObjState_None; diff --git a/src/000_Second/MapObject/MapObjectMiniBlocks.cpp b/src/000_Second/MapObject/MapObjectMiniBlocks.cpp index 43a9ecdd..c8869d31 100644 --- a/src/000_Second/MapObject/MapObjectMiniBlocks.cpp +++ b/src/000_Second/MapObject/MapObjectMiniBlocks.cpp @@ -1,9 +1,8 @@ #include "MapObject/MapObjectMiniBlocks.hpp" +#include "CommonFuncs.hpp" #include "System/SysNew.hpp" #include "Unknown/UnkStruct_027e0cd8.hpp" -extern "C" void func_01ff9638(void *, s16); - enum { MiniBlocksVariant_BLCM, MiniBlocksVariant_BKCT, diff --git a/src/000_Second/MapObject/MapObjectPot_Base.cpp b/src/000_Second/MapObject/MapObjectPot_Base.cpp index 88c73db1..029f261b 100644 --- a/src/000_Second/MapObject/MapObjectPot_Base.cpp +++ b/src/000_Second/MapObject/MapObjectPot_Base.cpp @@ -1,6 +1,5 @@ #include "MapObject/MapObjectPot_Base.hpp" - -extern "C" void func_ov000_020a14e4(unk8, VecFx32 *); +#include "CommonFuncs.hpp" MapObjectPot_Base::MapObjectPot_Base() { this->mUnk_40 = 0; diff --git a/src/000_Second/MapObject/MapObjectProfile_Derived2_20.cpp b/src/000_Second/MapObject/MapObjectProfile_Derived2_20.cpp index 00d9efe9..42d030cf 100644 --- a/src/000_Second/MapObject/MapObjectProfile_Derived2_20.cpp +++ b/src/000_Second/MapObject/MapObjectProfile_Derived2_20.cpp @@ -1,12 +1,8 @@ #include "MapObject/MapObjectProfile_Derived2_20.hpp" +#include "CommonFuncs.hpp" #include -extern "C" { -void func_02015ea8(u32 resourceId, void *); -unk32 func_02012fa8(const char *); -} - MapObjectProfile_Derived2_20::MapObjectProfile_Derived2_20(MapObjectId mapObjId2) : MapObjectProfile_Derived2_20_Base("MapObj", (const char *) &mUnk_94, (const char *) &mUnk_94, (const char *) &mUnk_94, 0, 0), diff --git a/src/000_Second/MapObject/MapObjectSwitchStep.cpp b/src/000_Second/MapObject/MapObjectSwitchStep.cpp index d4093acc..d8029dcd 100644 --- a/src/000_Second/MapObject/MapObjectSwitchStep.cpp +++ b/src/000_Second/MapObject/MapObjectSwitchStep.cpp @@ -1,4 +1,5 @@ #include "MapObject/MapObjectSwitchStep.hpp" +#include "CommonFuncs.hpp" #include "System/SysNew.hpp" #include "Unknown/UnkStruct_0204af1c.hpp" #include "Unknown/UnkStruct_027e0998.hpp" @@ -7,8 +8,6 @@ #include "Unknown/UnkStruct_ov000_020b5214.hpp" #include -extern "C" unk32 func_0200f218(unk32, const char *); - static const char data_ov000_020af550[] = "switch"; static const char data_ov000_020af560[] = "switchB"; diff --git a/src/001_SceneInit/Actor/ActorManager_001.cpp b/src/001_SceneInit/Actor/ActorManager_001.cpp index d63aaae0..e66d721a 100644 --- a/src/001_SceneInit/Actor/ActorManager_001.cpp +++ b/src/001_SceneInit/Actor/ActorManager_001.cpp @@ -1,4 +1,6 @@ #include "Actor/ActorManager.hpp" +#include "Actor/ActorUnkZLSL_ZSRS.hpp" +#include "CommonFuncs.hpp" #include "System/OverlayManager.hpp" #include "Unknown/UnkStruct_027e09a0.hpp" #include "Unknown/UnkStruct_027e09a4.hpp" @@ -10,14 +12,6 @@ #include "global.h" #include -extern "C" { -void func_ov000_020977e4(); -void func_ov021_020f8818(); -void func_ov071_0215e8d4(); -} - -extern "C" void func_ov031_020ea100(); - struct UnkStruct_ov000_020ab1ac { /* 00 */ u32 mUnk_00; /* 04 */ u32 mUnk_04; @@ -228,7 +222,7 @@ void ActorManager::func_ov001_020bb488() { case 0x03: case 0x06: if (data_027e0cd8->GetUnk0C()->mUnk_128 & 0x800) { - func_ov031_020ea100(); + ActorUnkZLSL::func_ov031_020ea100(); } break; default: diff --git a/src/001_SceneInit/Game/AdventureModeManager_001.cpp b/src/001_SceneInit/Game/AdventureModeManager_001.cpp index 7cc3297b..79b15286 100644 --- a/src/001_SceneInit/Game/AdventureModeManager_001.cpp +++ b/src/001_SceneInit/Game/AdventureModeManager_001.cpp @@ -1,3 +1,4 @@ +#include "CommonFuncs.hpp" #include "Game/Game.hpp" #include "Game/GameModeAdventure.hpp" #include "MainGame/AdventureMode.hpp" @@ -15,8 +16,6 @@ #include -extern "C" void *func_ov000_02066294(); - static const s16 data_ov001_020c27a8[] = { 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F, 0x0010, 0x0011, 0x0012, 0x0014, 0x0015, 0x0018, 0x001C, 0x0019, 0x001A, 0x001D, 0x001E, 0x001F, diff --git a/src/001_SceneInit/Game/GameModeAdventure_001.cpp b/src/001_SceneInit/Game/GameModeAdventure_001.cpp index e291c55b..eded8302 100644 --- a/src/001_SceneInit/Game/GameModeAdventure_001.cpp +++ b/src/001_SceneInit/Game/GameModeAdventure_001.cpp @@ -1,11 +1,10 @@ +#include "CommonFuncs.hpp" #include "Game/Game.hpp" #include "Game/GameModeAdventure.hpp" #include "MainGame/AdventureMode.hpp" #include "Unknown/UnkStruct_0204a110.hpp" #include "Unknown/UnkStruct_ov024_020d8660.hpp" -extern "C" void func_0201659c(); - GameModeAdventure::GameModeAdventure() { func_0201659c(); gGame.func_02013370(2); diff --git a/src/001_SceneInit/MapObject/MapObjectManager_001.cpp b/src/001_SceneInit/MapObject/MapObjectManager_001.cpp index 9675eff1..f569293e 100644 --- a/src/001_SceneInit/MapObject/MapObjectManager_001.cpp +++ b/src/001_SceneInit/MapObject/MapObjectManager_001.cpp @@ -1,5 +1,6 @@ #include "Actor/ActorUnkPMST.hpp" #include "Actor/ActorUnkPMTT.hpp" +#include "CommonFuncs.hpp" #include "MapObject/MapObjectManager.hpp" #include "System/OverlayManager.hpp" #include "System/SysNew.hpp" @@ -9,8 +10,6 @@ #include -extern "C" bool func_ov026_0210d664(SceneIndex sceneIndex, MapObjectId mapObjId); - MapObjectManager *MapObjectManager::Create() { return new(HeapIndex_1) MapObjectManager(); } diff --git a/src/001_SceneInit/PassengerManager_001.cpp b/src/001_SceneInit/PassengerManager_001.cpp index dcd0acbe..4649e5f1 100644 --- a/src/001_SceneInit/PassengerManager_001.cpp +++ b/src/001_SceneInit/PassengerManager_001.cpp @@ -1,9 +1,8 @@ +#include "CommonFuncs.hpp" #include "MainGame/PassengerManager.hpp" #include "Unknown/UnkStruct_02049bac.hpp" #include "Unknown/UnkStruct_027e09b8.hpp" -extern "C" bool func_ov000_0205c9d0(unk32 stationSceneIdx); - bool PassengerManager::func_ov001_020bf870() { s32 *pSceneIndex = &data_027e09a4->mUnk_00.sceneIndex; diff --git a/src/001_SceneInit/Player/PlayerActorBase_001.cpp b/src/001_SceneInit/Player/PlayerActorBase_001.cpp index b12b4fb9..7cf67767 100644 --- a/src/001_SceneInit/Player/PlayerActorBase_001.cpp +++ b/src/001_SceneInit/Player/PlayerActorBase_001.cpp @@ -1,10 +1,8 @@ +#include "CommonFuncs.hpp" #include "Player/PlayerActorBase.hpp" #include "System/SysNew.hpp" #include "Unknown/UnkStruct_027e09a4.hpp" -extern "C" u16 *func_ov021_020ea868(int); -extern "C" void func_ov000_0205c584(void *, int, int); - static const char data_ov001_020c264c[][16] = { "swA", "sheath", "swB", "sheathB", "belt", "cap", "body_all", }; @@ -71,7 +69,7 @@ PlayerActorBase::PlayerActorBase(PlayerCharacter character, unk32 param2, ItemMa if (this->mUnk_4C == -1) { this->func_ov000_0208c914(); } else { - u16 temp = func_ov021_020ea868(this->mUnk_4C)[8]; + u16 temp = func_ov021_020ea868(this->mUnk_4C)->unk_10; this->mUnk_84.func_ov000_0205fc20(0x78, temp, NULL, NULL); } } diff --git a/src/001_SceneInit/Player/PlayerActorBase_70_001.cpp b/src/001_SceneInit/Player/PlayerActorBase_70_001.cpp index 3147871c..1eb0f717 100644 --- a/src/001_SceneInit/Player/PlayerActorBase_70_001.cpp +++ b/src/001_SceneInit/Player/PlayerActorBase_70_001.cpp @@ -1,9 +1,8 @@ +#include "CommonFuncs.hpp" #include "Player/PlayerActorBase.hpp" #include "System/SysNew.hpp" #include "Unknown/UnkStruct_027e09a4.hpp" -extern "C" void *func_ov000_0208ea70(PlayerCharacter, unk32, bool); // returns pointer to .NSBTX - extern unk16 data_ov000_020ab314; ModelRender_UnkSystem1 *func_ov001_020bbac4(BOOL isNotLink, G3d_Model *pModel, unk32 param3, bool param4) { diff --git a/src/001_SceneInit/Save/SaveManager_001.cpp b/src/001_SceneInit/Save/SaveManager_001.cpp index bf92dcf0..2b015d81 100644 --- a/src/001_SceneInit/Save/SaveManager_001.cpp +++ b/src/001_SceneInit/Save/SaveManager_001.cpp @@ -1,10 +1,9 @@ +#include "CommonFuncs.hpp" #include "Game/Game.hpp" #include "Save/SaveManager.hpp" #include "Unknown/UnkStruct_02049b80.hpp" #include "Unknown/UnkStruct_ov000_020b50c0.hpp" -extern "C" unk32 func_020328c8(void *, void *, size_t); - void SaveManager::func_ov001_020ba670() { this->mUnk_000 = new(HeapIndex_1) SaveManager_00(0); diff --git a/src/001_SceneInit/SceneInitializers_001.cpp b/src/001_SceneInit/SceneInitializers_001.cpp index e84389c9..7bdccfd9 100644 --- a/src/001_SceneInit/SceneInitializers_001.cpp +++ b/src/001_SceneInit/SceneInitializers_001.cpp @@ -1,4 +1,5 @@ #include "Actor/ActorManager.hpp" +#include "CommonFuncs.hpp" #include "Cutscene/Cutscene.hpp" #include "Game/GameModeManager.hpp" #include "MainGame/AdventureMode.hpp" @@ -30,9 +31,6 @@ #include #include -extern "C" void func_01fff17c(unk16 *, UnkStruct_027e0ce0 *, unk32); -extern "C" u16 func_ov026_02106564(void *); - extern const OverlayIndex data_ov000_020b21c4[]; extern const OverlayIndex data_ov000_020b21e0[]; diff --git a/src/001_SceneInit/SysNew_001.cpp b/src/001_SceneInit/SysNew_001.cpp index 2f460be0..796ff572 100644 --- a/src/001_SceneInit/SysNew_001.cpp +++ b/src/001_SceneInit/SysNew_001.cpp @@ -1,13 +1,7 @@ +#include "CommonFuncs.hpp" #include "System/SysNew.hpp" #include "Unknown/UnkStruct_027e09a4.hpp" -extern "C" UnkStruct_02011e10_Sub1 *func_02001098(void *, size_t, unk32); -extern "C" UnkStruct_02011e10_Sub1 *func_020012e0(void *, size_t, unk32); -extern "C" void func_020010b8(void *); -extern "C" void func_02001300(void *); -extern "C" unk32 func_020013ac(void *param1); -extern "C" size_t func_020010e0(UnkStruct_02011e10_Sub1 *heapID, void *pFile, unk32 param3); - void UnkStruct_02011e10::func_ov001_020ba588(unk32 param1, unk32 param2) { this->mUnk_2C.func_020144cc(param1, param2, 0x01); this->mUnk_00[HeapIndex_2] = this->mUnk_2C.mUnk_00; diff --git a/src/001_SceneInit/UnkStruct_0204a110_001.cpp b/src/001_SceneInit/UnkStruct_0204a110_001.cpp index 4e19dc05..255c9884 100644 --- a/src/001_SceneInit/UnkStruct_0204a110_001.cpp +++ b/src/001_SceneInit/UnkStruct_0204a110_001.cpp @@ -1,3 +1,4 @@ +#include "CommonFuncs.hpp" #include "System/SysNew.hpp" #include "Unknown/UnkStruct_0204a088.hpp" #include "Unknown/UnkStruct_0204a110.hpp" @@ -5,10 +6,6 @@ #include -extern "C" void func_02019a74(); -extern "C" void func_02019b3c(); -extern "C" void func_02019c4c(); - void UnkStruct_0204a110::func_ov001_020bd514(unk32 param1, GameModeMgrCreateCallback createCallback, bool param3, bool param4) { this->func_02018c90(param1); diff --git a/src/001_SceneInit/UnkStruct_027e095c_001.cpp b/src/001_SceneInit/UnkStruct_027e095c_001.cpp index 9c26d0f0..1bd5f683 100644 --- a/src/001_SceneInit/UnkStruct_027e095c_001.cpp +++ b/src/001_SceneInit/UnkStruct_027e095c_001.cpp @@ -1,11 +1,7 @@ +#include "CommonFuncs.hpp" #include "System/SysNew.hpp" #include "Unknown/UnkStruct_027e095c.hpp" -extern "C" u32 func_0202447c(); -extern "C" u32 func_02024494(); -extern "C" void func_02006d8c(u16, unk32); -extern "C" void func_02006aa8(unk32, unk32); - UnkStruct_027e095c *UnkStruct_027e095c::Create() { return new(HeapIndex_1) UnkStruct_027e095c(); } diff --git a/src/001_SceneInit/UnkStruct_027e09ac_001.cpp b/src/001_SceneInit/UnkStruct_027e09ac_001.cpp index 1b49ac95..dd182f55 100644 --- a/src/001_SceneInit/UnkStruct_027e09ac_001.cpp +++ b/src/001_SceneInit/UnkStruct_027e09ac_001.cpp @@ -1,3 +1,4 @@ +#include "CommonFuncs.hpp" #include "System/SysNew.hpp" #include "Unknown/Common.hpp" #include "Unknown/UnkStruct_027e09a4.hpp" @@ -11,9 +12,6 @@ #include #include -extern "C" void func_ov000_02072344(u16 *, UnkStruct_027e09ac_14 *); -extern "C" void func_02024df0(u16 *); - UnkStruct_027e09ac *UnkStruct_027e09ac::Create() { return new(HeapIndex_1) UnkStruct_027e09ac(); } diff --git a/src/001_SceneInit/UnkStruct_027e09b8_001.cpp b/src/001_SceneInit/UnkStruct_027e09b8_001.cpp index 3714692b..75913851 100644 --- a/src/001_SceneInit/UnkStruct_027e09b8_001.cpp +++ b/src/001_SceneInit/UnkStruct_027e09b8_001.cpp @@ -1,3 +1,4 @@ +#include "CommonFuncs.hpp" #include "System/SysNew.hpp" #include "Unknown/UnkStruct_0204a088.hpp" #include "Unknown/UnkStruct_027e09b8.hpp" @@ -11,7 +12,6 @@ struct UnkStruct_ov000_02073080 { /* 0C */ PAD(0x0C, 0x1C); /* 1C */ }; -extern "C" void func_ov000_02073080(void *); UnkStruct_027e09b8 *UnkStruct_027e09b8::Create() { return new(HeapIndex_1) UnkStruct_027e09b8(); diff --git a/src/001_SceneInit/UnkStruct_027e0cd8_001.cpp b/src/001_SceneInit/UnkStruct_027e0cd8_001.cpp index e225b381..1d285bb9 100644 --- a/src/001_SceneInit/UnkStruct_027e0cd8_001.cpp +++ b/src/001_SceneInit/UnkStruct_027e0cd8_001.cpp @@ -1,4 +1,5 @@ #include "Actor/ActorManager.hpp" +#include "CommonFuncs.hpp" #include "MapObject/MapObjectManager.hpp" #include "Save/SaveManager.hpp" #include "System/OverlayManager.hpp" @@ -24,11 +25,6 @@ #include #include -extern "C" void func_ov026_020e9208(); -extern "C" void func_ov000_02081520(void *, void *, u8); -extern "C" void func_ov000_020814ec(void *, void *); -extern "C" void func_ov084_0216122c(); -extern "C" void func_ov084_021612ac(); extern void *data_ov084_02164690; struct UnkStruct7 { diff --git a/src/001_SceneInit/UnkStruct_027e0cd8_0C_001.cpp b/src/001_SceneInit/UnkStruct_027e0cd8_0C_001.cpp index c839a286..b2120a74 100644 --- a/src/001_SceneInit/UnkStruct_027e0cd8_0C_001.cpp +++ b/src/001_SceneInit/UnkStruct_027e0cd8_0C_001.cpp @@ -1,4 +1,5 @@ #include "Actor/ActorManager.hpp" +#include "CommonFuncs.hpp" #include "Cutscene/Cutscene.hpp" #include "Game/GameModeManager.hpp" #include "MapObject/MapObjectManager.hpp" @@ -15,8 +16,6 @@ #include #include -extern "C" BMDSectionModel *func_ov000_0205abcc(void *, void *, unk32, unk32, void *); -extern "C" void func_ov089_02165c34(void *); extern AABB data_027e0ca8; extern AABB data_027e0cc0; extern AABB data_027e0c90; diff --git a/src/001_SceneInit/UnkStruct_027e0ce0_1C_001.cpp b/src/001_SceneInit/UnkStruct_027e0ce0_1C_001.cpp index c0c70d7f..0a279b93 100644 --- a/src/001_SceneInit/UnkStruct_027e0ce0_1C_001.cpp +++ b/src/001_SceneInit/UnkStruct_027e0ce0_1C_001.cpp @@ -1,4 +1,5 @@ #include "Actor/ActorManager.hpp" +#include "CommonFuncs.hpp" #include "System/OverlayManager.hpp" #include "Unknown/Common.hpp" #include "Unknown/UnkStruct_027e09b8.hpp" @@ -9,9 +10,6 @@ #include #include -extern "C" bool func_ov000_0208e874(const u8 *, int, int, int); -extern "C" const char *func_ov000_0208e830(int); - UnkStruct_027e0ce0_1C::UnkStruct_027e0ce0_1C() { this->mUnk_D4 = NULL; this->mUnk_D8 = NULL; diff --git a/src/001_SceneInit/UnkStruct_027e0ce0_30_001.cpp b/src/001_SceneInit/UnkStruct_027e0ce0_30_001.cpp index 87ba7625..8dce3c8b 100644 --- a/src/001_SceneInit/UnkStruct_027e0ce0_30_001.cpp +++ b/src/001_SceneInit/UnkStruct_027e0ce0_30_001.cpp @@ -1,10 +1,9 @@ +#include "CommonFuncs.hpp" #include "System/OverlayManager.hpp" #include "Unknown/UnkStruct_027e0ce0.hpp" #include -extern "C" void func_ov000_0208dd60(void *, UnkStruct_027e0ce0_30_00 *); - extern fx32 data_ov000_020afd14; UnkStruct_027e0ce0_30_00::UnkStruct_027e0ce0_30_00(UnkStruct_027e0ce0_38 *param1, UnkStruct_027e0ce0_3C *param2, diff --git a/src/001_SceneInit/UnkStruct_027e0ce0_34_001.cpp b/src/001_SceneInit/UnkStruct_027e0ce0_34_001.cpp index 54ef2d95..c120d40b 100644 --- a/src/001_SceneInit/UnkStruct_027e0ce0_34_001.cpp +++ b/src/001_SceneInit/UnkStruct_027e0ce0_34_001.cpp @@ -1,3 +1,4 @@ +#include "CommonFuncs.hpp" #include "MainGame/CargoManager.hpp" #include "MainGame/PassengerManager.hpp" #include "System/SysNew.hpp" @@ -6,9 +7,6 @@ #include "Unknown/UnkStruct_027e0ce0.hpp" #include "Unknown/UnkStruct_027e0d00.hpp" -extern "C" SceneIndex func_ov000_0205c984(); -extern "C" unk32 func_ov026_020f4c9c(SceneIndex); - UnkStruct_027e0ce0_34::UnkStruct_027e0ce0_34() { this->mUnk_20 = NULL; this->mUnk_24 = 0x03; diff --git a/src/001_SceneInit/UnkStruct_027e0cec_001.cpp b/src/001_SceneInit/UnkStruct_027e0cec_001.cpp index a3c5a6e2..1c842344 100644 --- a/src/001_SceneInit/UnkStruct_027e0cec_001.cpp +++ b/src/001_SceneInit/UnkStruct_027e0cec_001.cpp @@ -1,3 +1,4 @@ +#include "CommonFuncs.hpp" #include "Cutscene/Cutscene.hpp" #include "System/OverlayManager.hpp" #include "System/SysNew.hpp" @@ -7,8 +8,6 @@ #include -extern "C" BOOL func_02012fa8(const char *); - DATA_ALIGN_FIX2(); enum EffectPathIndex_ { diff --git a/src/001_SceneInit/UnkStruct_027e0cec_18_001.cpp b/src/001_SceneInit/UnkStruct_027e0cec_18_001.cpp index 1e8a9a47..b2a88f43 100644 --- a/src/001_SceneInit/UnkStruct_027e0cec_18_001.cpp +++ b/src/001_SceneInit/UnkStruct_027e0cec_18_001.cpp @@ -1,3 +1,4 @@ +#include "CommonFuncs.hpp" #include "Unknown/UnkStruct_0204a110.hpp" #include "Unknown/UnkStruct_027e09a0.hpp" #include "Unknown/UnkStruct_027e09a4.hpp" @@ -6,8 +7,6 @@ #include #include -extern "C" void *func_02001308(void *, size_t, u32); -extern "C" UnkStruct_027e0cec_18_04 *func_ov000_02054690(void *, unk32, unk32, unk32, unk32, unk32); extern unk32 data_027e0154; void *UnkStruct_027e0cec_18::func_ov001_020bf0a0(size_t length) { diff --git a/src/001_SceneInit/UnkStruct_027e0d00_001.cpp b/src/001_SceneInit/UnkStruct_027e0d00_001.cpp index 46f190a2..684a7cc0 100644 --- a/src/001_SceneInit/UnkStruct_027e0d00_001.cpp +++ b/src/001_SceneInit/UnkStruct_027e0d00_001.cpp @@ -1,11 +1,9 @@ +#include "CommonFuncs.hpp" #include "MainGame/CargoManager.hpp" #include "Unknown/UnkStruct_027e09a4.hpp" #include "Unknown/UnkStruct_027e0ce0.hpp" #include "Unknown/UnkStruct_027e0d00.hpp" -extern "C" unk32 func_ov000_0205c984(); -extern "C" void func_ov026_020efc40(unk32 param1); - UnkStruct_027e0d00::UnkStruct_027e0d00() { this->mUnk_0E0 = NULL; this->mUnk_0F4 = NULL; diff --git a/src/001_SceneInit/UnkStruct_ov000_020b504c_001.cpp b/src/001_SceneInit/UnkStruct_ov000_020b504c_001.cpp index a332e2e9..ccb4534c 100644 --- a/src/001_SceneInit/UnkStruct_ov000_020b504c_001.cpp +++ b/src/001_SceneInit/UnkStruct_ov000_020b504c_001.cpp @@ -1,3 +1,4 @@ +#include "CommonFuncs.hpp" #include "System/SysNew.hpp" #include "Unknown/UnkStruct_027e09a0.hpp" #include "Unknown/UnkStruct_027e09a4.hpp" @@ -5,7 +6,6 @@ #include -extern "C" void *func_02022884(unk32); extern u8 gBufferTrainMsg[0x8C00]; static const char *data_ov001_020c2cf4[] = { diff --git a/src/001_SceneInit/UnkStruct_ov000_020b50c0_001.cpp b/src/001_SceneInit/UnkStruct_ov000_020b50c0_001.cpp index 34bba127..694eb712 100644 --- a/src/001_SceneInit/UnkStruct_ov000_020b50c0_001.cpp +++ b/src/001_SceneInit/UnkStruct_ov000_020b50c0_001.cpp @@ -1,3 +1,4 @@ +#include "CommonFuncs.hpp" #include "Unknown/UnkStruct_027e09a0.hpp" #include "Unknown/UnkStruct_027e09a4.hpp" #include "Unknown/UnkStruct_027e09b8.hpp" @@ -8,10 +9,6 @@ #include "Unknown/UnkStruct_ov000_020b52e8.hpp" #include "versions.h" -extern "C" BOOL NNS_SndArcLoadBank(unk32 param1, unk32 param2); -extern "C" void func_0200240c(unk32); -extern "C" unk32 func_ov026_0212e54c(); - void UnkStruct_ov000_020b50c0::func_ov001_020bd854(void) { data_027e099c->func_ov001_020bde6c(); data_ov000_020b51b8.func_ov000_0206bbfc(0x01); diff --git a/src/001_SceneInit/ZeldaCollisionBinary.cpp b/src/001_SceneInit/ZeldaCollisionBinary.cpp index fe45c7cb..41fbb15b 100644 --- a/src/001_SceneInit/ZeldaCollisionBinary.cpp +++ b/src/001_SceneInit/ZeldaCollisionBinary.cpp @@ -1,10 +1,9 @@ +#include "CommonFuncs.hpp" #include "Unknown/UnkFileSystem.hpp" #include "Unknown/UnkStruct_027e09e8.hpp" #include "Unknown/UnkStruct_027e0cd8.hpp" #include "files.h" -extern "C" void func_01ffd1b4(VecFx32 *, VecFx32 *); - BOOL ZCB_ParseFile(ZCBFileInfos *pFileInfos, UnkStruct_027e09e8 *pDst, UnkStruct_027e0cd8_0C_Base *param3) { int i; ZCBHeader *pHeader; diff --git a/src/001_SceneInit/ZeldaMapBinary.cpp b/src/001_SceneInit/ZeldaMapBinary.cpp index 6b0a66ea..c61a46b1 100644 --- a/src/001_SceneInit/ZeldaMapBinary.cpp +++ b/src/001_SceneInit/ZeldaMapBinary.cpp @@ -1,4 +1,5 @@ #include "Actor/ActorManager.hpp" +#include "CommonFuncs.hpp" #include "MapObject/MapObjectManager.hpp" #include "Physics/AABB.hpp" #include "System/OverlayManager.hpp" @@ -13,15 +14,6 @@ extern AABB data_027e0c90; extern int data_ov089_02171540; -extern "C" fx32 func_ov000_02080068(fx32 x); -extern "C" fx32 func_ov000_02080080(fx32 x); -extern "C" void func_ov089_02165b18(void *); -extern "C" fx32 func_ov000_020775d8(fx32); - -extern "C" BOOL ZMB_020ba350(ZMBFileInfos *pFileInfos, u8 param2, UnkStruct_027e0cd8_0C_Base *pDst); -extern "C" void ZMB_020ba388(CustomVector *pVector, size_t param2); -extern "C" void ZMB_020ba408(CustomVector *pVector, size_t param2); - BOOL ZMB_ParseFile(ZMBFileInfos *pFileInfos, UnkStruct_027e0cd8_0C_Base *pDst, bool param3) { bool isVersion2; ZMBHeader *pHeader; diff --git a/src/017_CourseExec/Actor/Actor_017.cpp b/src/017_CourseExec/Actor/Actor_017.cpp index f006e376..2c78d806 100644 --- a/src/017_CourseExec/Actor/Actor_017.cpp +++ b/src/017_CourseExec/Actor/Actor_017.cpp @@ -7,6 +7,7 @@ #include "Actor/ActorRupee.hpp" #include "Actor/ActorUnkKEYN.hpp" #include "Actor/ActorUnkSWBM.hpp" +#include "CommonFuncs.hpp" #include "Physics/Cylinder.hpp" #include "Unknown/UnkStruct_0204af1c.hpp" #include "Unknown/UnkStruct_027e0998.hpp" @@ -20,27 +21,6 @@ #include "nitro/fx.h" #include "nitro/math.h" -extern "C" bool func_01ffecdc(unk32 param1, Cylinder *param2); -extern "C" u16 func_01ffbbe0(fx32 x, fx32 z); -extern "C" void func_01ff93c0(VecFx32 *, fx32); -extern "C" void func_01ff9770(VecFx32 *, unk32); -extern "C" void func_01ffb714(VecFx32 *, VecFx32 *, void *); -extern "C" void func_01ff97c8(VecFx32 *, int); -extern "C" void func_01ffce1c(Cylinder *, Cylinder *); -extern "C" unk32 func_01ff9258(fx32, fx32); - -extern "C" void func_ov000_0209807c(void *); -extern "C" void func_ov000_020980e0(void *); -extern "C" void func_ov000_02098244(VecFx32 *); -extern "C" void func_ov000_02097f38(VecFx32 *); -extern "C" void func_ov000_02097fcc(VecFx32 *); -extern "C" void func_ov000_02097ea0(VecFx32 *); -extern "C" void func_ov000_02097e04(VecFx32 *); -extern "C" void func_ov000_02097d4c(VecFx32 *); -extern "C" void func_ov000_02099870(UnkStruct_ActorUnkCANS_224 *, VecFx32 *, u16); -extern "C" void func_ov000_020a1330(u16, ActorRef, VecFx32, UnkAngleStruct, unk32, unk32); -extern "C" void func_ov031_020f439c(void *, Vec3s *, unk32); - extern unk32 data_ov000_020aed08; extern unk32 data_ov000_020aed04; extern unk32 data_ov000_020aecfc; diff --git a/src/017_CourseExec/Game/AdventureModeManager_15C_017.cpp b/src/017_CourseExec/Game/AdventureModeManager_15C_017.cpp index 79913edf..eddc5199 100644 --- a/src/017_CourseExec/Game/AdventureModeManager_15C_017.cpp +++ b/src/017_CourseExec/Game/AdventureModeManager_15C_017.cpp @@ -1,3 +1,4 @@ +#include "CommonFuncs.hpp" #include "Game/GameModeManager.hpp" #include "MainGame/AdventureMode.hpp" #include "Unknown/UnkStruct_0204a110.hpp" @@ -7,8 +8,6 @@ #include "Unknown/UnkStruct_ov024_020d8660.hpp" #include "types.h" -extern "C" unk32 func_020196b0(unk32); - struct UnkStruct_ov017_020c3f3c { /* 00 */ unk32 unk_00; diff --git a/src/017_CourseExec/Game/AdventureModeManager_15C_20_00_017.cpp b/src/017_CourseExec/Game/AdventureModeManager_15C_20_00_017.cpp index 02234eb1..aae91449 100644 --- a/src/017_CourseExec/Game/AdventureModeManager_15C_20_00_017.cpp +++ b/src/017_CourseExec/Game/AdventureModeManager_15C_20_00_017.cpp @@ -1,11 +1,10 @@ +#include "CommonFuncs.hpp" #include "MainGame/AdventureMode.hpp" #include "Unknown/UnkStruct_0204af1c.hpp" #include "Unknown/UnkStruct_ov024_020d8660.hpp" #include "math.hpp" #include "nitro/fx.h" -extern "C" void func_ov000_02062e44(Vec2s *param1, void *param2); - struct UnkStruct_ov017_020c3f14 { struct Vectors { /* 00 */ Vec2s unk_00; diff --git a/src/017_CourseExec/MapObject/MapObjectManager_017.cpp b/src/017_CourseExec/MapObject/MapObjectManager_017.cpp index 34fa6d1c..5553c190 100644 --- a/src/017_CourseExec/MapObject/MapObjectManager_017.cpp +++ b/src/017_CourseExec/MapObject/MapObjectManager_017.cpp @@ -1,3 +1,4 @@ +#include "CommonFuncs.hpp" #include "MapObject/MapObject.hpp" #include "MapObject/MapObjectManager.hpp" #include "Physics/AABB.hpp" @@ -9,11 +10,6 @@ #include "math.hpp" #include "nitro/fx.h" -extern "C" void func_01ffedac(Vec2bCpp *, VecFx32 *); - -extern "C" unk32 func_ov000_02077480(); -extern "C" unk32 func_ov000_02080098(void *, void *, int, int, int, int); - extern AABB data_027e0c90; bool MapObjectManager::func_ov017_020c007c(unk32 param1) { diff --git a/src/017_CourseExec/MapObject/MapObjectSwitchStep_017.cpp b/src/017_CourseExec/MapObject/MapObjectSwitchStep_017.cpp index 757aa626..ac147e94 100644 --- a/src/017_CourseExec/MapObject/MapObjectSwitchStep_017.cpp +++ b/src/017_CourseExec/MapObject/MapObjectSwitchStep_017.cpp @@ -1,9 +1,7 @@ +#include "CommonFuncs.hpp" #include "MapObject/MapObjectSwitchStep.hpp" #include "nitro/math.h" -extern "C" void func_01ff91b8(unk16 *, fx32, fx32); -extern "C" fx32 func_01ffb464(fx32); - void MapObjectSwitchStep::vfunc_08() { s16 sp0 = this->mUnk_40.mUnk_60; diff --git a/src/017_CourseExec/Player/PlayerActorBase_70_017.cpp b/src/017_CourseExec/Player/PlayerActorBase_70_017.cpp index c220b27c..fb86e405 100644 --- a/src/017_CourseExec/Player/PlayerActorBase_70_017.cpp +++ b/src/017_CourseExec/Player/PlayerActorBase_70_017.cpp @@ -1,3 +1,4 @@ +#include "CommonFuncs.hpp" #include "Player/PlayerActorBase.hpp" #include "Unknown/UnkStruct_027e09ac.hpp" #include "Unknown/UnkStruct_027e09b4.hpp" @@ -7,8 +8,6 @@ #include "nitro/fx.h" #include "nitro/math.h" -extern "C" void func_01ffb714(VecFx32 *, VecFx32 *, void *); - void PlayerActorBase_70::func_ov017_020bbaa8(VecFx32 *param1, UnkAngleStruct param2) { if (this->mCharacter == PlayerCharacter_Link) { ModelRender_Derived4 *var_r5 = this->mUnk_00C.GetUnk08OrUnk0C(this->mUnk_126 != 0); @@ -55,12 +54,6 @@ void PlayerActorBase_70::func_ov017_020bbaa8(VecFx32 *param1, UnkAngleStruct par extern unk16 data_ov000_020ab318; extern unk16 data_ov000_020ab31c; -struct UnkStruct_ov021_02106c5c { - /* 00 */ PAD(0x00, 0x13); - /* 13 */ u8 unk_13; -}; -extern "C" const UnkStruct_ov021_02106c5c *func_ov021_020ea868(int index); - void PlayerActorBase_70::func_ov017_020bbcd8(VecFx32 *param1, UnkAngleStruct param2) { UnkStackStruct_ov017_020c1104 sp28; VecFx32 sp1C; diff --git a/src/017_CourseExec/Player/PlayerLinkActor_017.cpp b/src/017_CourseExec/Player/PlayerLinkActor_017.cpp index 929342b5..406b4438 100644 --- a/src/017_CourseExec/Player/PlayerLinkActor_017.cpp +++ b/src/017_CourseExec/Player/PlayerLinkActor_017.cpp @@ -1,3 +1,4 @@ +#include "CommonFuncs.hpp" #include "Player/PlayerLink.hpp" #include "Unknown/UnkStruct_0204a088.hpp" #include "Unknown/UnkStruct_0204a110.hpp" @@ -11,8 +12,6 @@ #include "nitro/math.h" #include "nitro/types.h" -extern "C" bool func_ov000_020864f8(void *, UnkAngleStruct, void *, void *); - bool PlayerLinkActor::func_ov017_020bd6b8() { bool ret = false; diff --git a/src/017_CourseExec/Save/SaveManager_017.cpp b/src/017_CourseExec/Save/SaveManager_017.cpp index e29f5cef..8b98d5f6 100644 --- a/src/017_CourseExec/Save/SaveManager_017.cpp +++ b/src/017_CourseExec/Save/SaveManager_017.cpp @@ -1,3 +1,4 @@ +#include "CommonFuncs.hpp" #include "Save/SaveFile.hpp" #include "Save/SaveManager.hpp" #include "Unknown/UnkStruct_027e09b8.hpp" @@ -7,9 +8,6 @@ #include "nitro/math.h" #include "nitro/types.h" -extern "C" bool func_ov000_020a0a90(u32, unk32, size_t); -extern "C" unk32 func_020328c8(void *, void *, size_t); - void SaveManager::func_ov017_020c2b68(u16 param1) { CARD_LockBackup(gSaveManager.mCardId); diff --git a/src/017_CourseExec/UnkStackStruct_ov017_020c1104_017.cpp b/src/017_CourseExec/UnkStackStruct_ov017_020c1104_017.cpp index 31764737..332d708e 100644 --- a/src/017_CourseExec/UnkStackStruct_ov017_020c1104_017.cpp +++ b/src/017_CourseExec/UnkStackStruct_ov017_020c1104_017.cpp @@ -1,3 +1,4 @@ +#include "CommonFuncs.hpp" #include "Unknown/Common.hpp" #include "Unknown/UnkStruct_027e09ac.hpp" @@ -8,12 +9,6 @@ #include #include -extern "C" void FlushGfxQueue(); -extern "C" u16 func_01ffbbe0(fx32 x, fx32 z); -extern "C" unk32 func_01ff9258(fx32, fx32); -extern "C" void func_01ffb714(const VecFx32 *, const VecFx32 *, VecFx32 *); -extern "C" unk32 func_01ffb428(unk32, unk32); - void UnkStackStruct_ov017_020c1104::func_ov017_020c1104(const VecFx32 *param2, s32 param3, u16 param4) { s16 var_r1; diff --git a/src/017_CourseExec/UnkStruct_027e09b4_017.cpp b/src/017_CourseExec/UnkStruct_027e09b4_017.cpp index 6f3e9ef4..0fa9f1cc 100644 --- a/src/017_CourseExec/UnkStruct_027e09b4_017.cpp +++ b/src/017_CourseExec/UnkStruct_027e09b4_017.cpp @@ -1,3 +1,4 @@ +#include "CommonFuncs.hpp" #include "Unknown/UnkStruct_027e095c.hpp" #include "Unknown/UnkStruct_027e09ac.hpp" #include "Unknown/UnkStruct_027e09b0.hpp" @@ -11,15 +12,6 @@ #include #include -extern "C" void FlushGfxQueue(); -extern "C" void func_ov000_0205dbe4(u16); -extern "C" void func_02024a84(MtxFx33 *param1); -extern "C" u16 func_01ffbbe0(fx32 x, fx32 z); -extern "C" unk32 func_01ff9258(fx32, fx32); -extern "C" void func_01ffcb94(s16, s16, MtxFx33 *); -extern "C" fx32 func_01ffb66c(unk32, unk32); -extern "C" void func_02024fc4(fx16 sin, fx16 cos); - static const fx16 data_ov017_020c3dec[] = { 0x1000, 0x1000, 0x0000, 0x0800, 0x0800, 0xF000, 0x1000, 0xF000, 0x0000, 0x0800, 0xF800, 0xF000, 0xF000, 0x1000, 0x0000, 0xF800, 0x0800, 0xF000, 0xF000, 0xF000, 0x0000, 0xF800, 0xF800, 0xF000, 0x0000, 0x0000, 0x0266, 0x0000, diff --git a/src/017_CourseExec/UnkStruct_027e0ce0_30_017.cpp b/src/017_CourseExec/UnkStruct_027e0ce0_30_017.cpp index b6464730..3a3cdf34 100644 --- a/src/017_CourseExec/UnkStruct_027e0ce0_30_017.cpp +++ b/src/017_CourseExec/UnkStruct_027e0ce0_30_017.cpp @@ -1,3 +1,4 @@ +#include "CommonFuncs.hpp" #include "Player/PlayerActorBase.hpp" #include "Unknown/Common.hpp" #include "Unknown/UnkStruct_0204a088.hpp" @@ -8,17 +9,6 @@ #include "nitro/math.h" #include "nitro/types.h" -extern "C" unk32 func_01ffb9cc(VecFx32 *, VecFx32 *); -extern "C" void func_01ff9770(VecFx32 *, unk32); -extern "C" void func_01ffb714(VecFx32 *, VecFx32 *, void *); -extern "C" void func_01ff97c8(VecFx32 *, int); -extern "C" unk32 func_ov000_02078aec(); -extern "C" unk32 func_ov000_0205b090(); -extern "C" unk32 func_ov000_0205b0ac(s16 param1); -extern "C" unk32 func_01ffb428(unk32, unk32); -extern "C" unk32 func_01ffbbe0(); -extern "C" unk32 func_ov000_0208832c(s16, unk32); - extern u16 data_ov000_020afd08; extern unk32 data_ov000_020afd0c; extern unk32 data_ov000_020afd10; @@ -199,7 +189,7 @@ void UnkStruct_027e0ce0_30_00::func_ov017_020bbf7c(ItemManager *pItemMgr) { VecFx32_SubXZ(&this->mUnk_00, &temp_r10_2->mPos.vec, &sp8); PlayerLinkActor_9C *ptr = this->mpPlayer->mUnk_90; - s16 value1 = func_01ffbbe0(); + s16 value1 = func_01ffbbe0(sp8.x, sp8.z); temp_r8_5 = func_ov000_0208832c(value1, ptr->func_ov000_02084944()); if (VecFx32_Length(&sp8) <= temp_r8_5) { diff --git a/src/017_CourseExec/UnkStruct_027e0ce0_40_017.cpp b/src/017_CourseExec/UnkStruct_027e0ce0_40_017.cpp index 4d2429b0..60d54071 100644 --- a/src/017_CourseExec/UnkStruct_027e0ce0_40_017.cpp +++ b/src/017_CourseExec/UnkStruct_027e0ce0_40_017.cpp @@ -1,3 +1,4 @@ +#include "CommonFuncs.hpp" #include "Item/Item.hpp" #include "Player/PlayerActorBase.hpp" #include "System/OverlayManager.hpp" @@ -15,10 +16,6 @@ #include "nitro/fx.h" #include "nitro/math.h" -extern "C" unk32 func_ov000_02080998(VecFx32 *); -extern "C" void func_ov000_02085d1c(void *); -extern "C" void func_ov000_0208a7a4(void *, void *); - extern const unk16 data_ov000_020ab3b8; extern const unk16 data_ov000_020ab3bc; extern const unk16 data_ov000_020ab3c0; diff --git a/src/017_CourseExec/UnkStruct_027e0ce0_40_Base_94_017.cpp b/src/017_CourseExec/UnkStruct_027e0ce0_40_Base_94_017.cpp index 438aa67e..c2d1513f 100644 --- a/src/017_CourseExec/UnkStruct_027e0ce0_40_Base_94_017.cpp +++ b/src/017_CourseExec/UnkStruct_027e0ce0_40_Base_94_017.cpp @@ -1,10 +1,8 @@ +#include "CommonFuncs.hpp" #include "Player/TouchControl.hpp" #include "Unknown/UnkStruct_027e0ce0.hpp" #include "math.hpp" -extern "C" void func_ov000_02089bbc(void *, unk32); -extern "C" void func_ov000_0208abc4(ActorRef *, void *, Vec2s *); - extern unk16 data_ov000_020ab3c8; // https://decomp.me/scratch/6j77v diff --git a/src/017_CourseExec/UnkStruct_027e0cec_18_017.cpp b/src/017_CourseExec/UnkStruct_027e0cec_18_017.cpp index 77ea254f..61241616 100644 --- a/src/017_CourseExec/UnkStruct_027e0cec_18_017.cpp +++ b/src/017_CourseExec/UnkStruct_027e0cec_18_017.cpp @@ -1,12 +1,7 @@ +#include "CommonFuncs.hpp" #include "LinkList.hpp" #include "Unknown/UnkStruct_027e0cec.hpp" -extern "C" void FlushGfxQueue(); -extern "C" void func_ov000_02052238(void *, void *); -extern "C" void func_ov000_02052bcc(void *); -extern "C" unk32 func_ov000_020545d0(void *, void *); -extern "C" void func_ov000_02054548(void *, unk32); - void UnkStruct_027e0cec_18::func_ov017_020c297c(unk32 param1, unk32 param2) { UnkStruct_027e0cec_18_04 *pIt = GetBeginIterReverse(*this->mUnk_04); UnkStruct_027e0cec_18_04 *pNext; diff --git a/src/017_CourseExec/code_020be2ec_017.cpp b/src/017_CourseExec/code_020be2ec_017.cpp index e0abd3a6..40e4d670 100644 --- a/src/017_CourseExec/code_020be2ec_017.cpp +++ b/src/017_CourseExec/code_020be2ec_017.cpp @@ -1,3 +1,4 @@ +#include "CommonFuncs.hpp" #include "Unknown/UnkStruct_02049b18.hpp" #include "Unknown/UnkStruct_0204a088.hpp" #include "Unknown/UnkStruct_027e09bc.hpp" @@ -10,19 +11,6 @@ #include "nitro/fx.h" #include "nitro/math.h" -extern "C" bool func_01ff916c(void *, int, int); -extern "C" void func_01ffb974(unk32, VecFx32 *, VecFx32 *, VecFx32 *); -extern "C" void func_01ffb714(VecFx32 *, VecFx32 *, VecFx32 *); -extern "C" void func_01ff9770(VecFx32 *, unk32); -extern "C" unk32 func_01ffb428(unk32, unk32); -extern "C" u16 func_01ffbbe0(fx32 x, fx32 z); -extern "C" unk32 func_01ff9364(u16 *, UnkAngleStruct); -extern "C" bool func_ov000_02080998(VecFx32 *); -extern "C" VecFx32 *func_ov000_0205d524(unk32, unk32); -extern "C" unk32 func_ov000_02077480(); -extern "C" unk16 func_0201a710(unk16); -extern "C" void func_ov000_0205db44(void *, void *, unk32); - void UnkStruct_027e0ce0_40_Base_7C::func_ov017_020be2ec(UnkStruct_027e0ce0_40_Base_14 *param1, bool param2, UnkParamStruct1 param3) { STACK_PAD(0x04); diff --git a/src/018_StartUp/GameModeStartUp.cpp b/src/018_StartUp/GameModeStartUp.cpp index ec86f433..fab4f3eb 100644 --- a/src/018_StartUp/GameModeStartUp.cpp +++ b/src/018_StartUp/GameModeStartUp.cpp @@ -1,4 +1,5 @@ #include "Game/GameModeStartUp.hpp" +#include "CommonFuncs.hpp" #include "Game/Game.hpp" #include "System/OverlayManager.hpp" #include "System/SysFault.hpp" @@ -15,23 +16,6 @@ #include #include -extern "C" { -void func_0201245c(); -void func_02027a28(void *param1, unk32 param2); -void func_02013184(); -void func_020131b0(); -void func_02031e48(void *param1); - -UnkStruct_02011e10_Sub1 *func_020012e0(unk32 param1, unk32 param2, unk32 param3); -unk32 func_0202d624(void *param1, unk32 param2); -void *func_02001fd4(void *param1, size_t param2); -void func_020013ac(void *param1); -UnkStruct_02011e10_Sub1 *func_02001098(unk32 param1, unk32 param2, unk32 param3); -unk32 func_020011f4(); -void func_0200a7b0(unk32 param1, void *param2, void *param3, void *param4, unk32 param5, unk32 param6, unk32 param7, - unk32 param8); -} - static u8 data_ov018_020c5bc0; void SysFault::func_ov018_020c4840() { @@ -75,8 +59,8 @@ UnkStruct_02049b18::UnkStruct_02049b18() { } void UnkStruct_02011e10::func_ov018_020c4980() { - uintptr_t arenaLo = (uintptr_t) OS_GetMainArenaLo(); - uintptr_t arenaHi = (uintptr_t) OS_GetMainArenaHi(); + u8 *arenaLo = (u8 *) OS_GetMainArenaLo(); + u8 *arenaHi = (u8 *) OS_GetMainArenaHi(); for (int i = 0; i < HeapIndex_Max; i++) { this->mUnk_00[i] = NULL; @@ -108,19 +92,19 @@ void UnkStruct_02011e10::func_ov018_020c4980() { void UnkStruct_02011e10::func_ov018_020c4a5c() { UnkStruct_02011e10_Sub1 *temp_r2; uintptr_t temp_r5; - uintptr_t temp_r7; - uintptr_t temp_r0; + u8 *temp_r7; + u8 *temp_r0; func_020013ac(this->mUnk_00[0]); temp_r2 = this->mUnk_00[0]; temp_r5 = ((uintptr_t) temp_r2->mUnk_1C - (uintptr_t) temp_r2); //! TODO: fake match? - temp_r7 = (uintptr_t) OS_GetArenaLo(0); + temp_r7 = (u8 *) OS_GetArenaLo(0); temp_r7 += temp_r5; - temp_r0 = (uintptr_t) OS_GetMainArenaHi(); + temp_r0 = (u8 *) OS_GetMainArenaHi(); this->mUnk_00[1] = func_02001098(temp_r7, temp_r0 - temp_r7, 2); - this->mUnk_5C = func_020011f4(); + this->mUnk_5C = func_020011f4(this->mUnk_00[1]); OS_SetMainArenaLo((void *) temp_r0); this->mUnk_74 = 1; } diff --git a/src/018_StartUp/StartUpInitializers.cpp b/src/018_StartUp/StartUpInitializers.cpp index 5bbba455..5917e529 100644 --- a/src/018_StartUp/StartUpInitializers.cpp +++ b/src/018_StartUp/StartUpInitializers.cpp @@ -1,3 +1,4 @@ +#include "CommonFuncs.hpp" #include "Save/SaveManager.hpp" #include "System/Random.hpp" #include "System/SysFault.hpp" @@ -24,25 +25,6 @@ #include #include -extern "C" { -unk32 func_02014fe0(); -void func_020327c8(void *param1, unk32 param2); -void func_0201bdd0(); -void NNS_SndInit(); -void NNS_SndArcInit(void *param1, const char *soundDataPath, unk32 param2, unk32 param3); -void NNS_SndArcPlayerSetup(unk32 param1); -void func_02004d2c(unk32 param1, unk32 param2); -void func_02001778(unk32 param1); -void func_02003f98(unk32 param1, unk32 param2); -void NNS_SndHeapSaveState(unk32 param1); -void func_0202ee0c(); -void func_0202f910(unk32 param1); -void func_0202f958(unk32 param1); -void func_02005030(void *param1); -void NNS_SndHandleInit(void *param1); -void NNS_SndPlayerStopSeq(void *param1, unk32 param2); -} - void func_ov018_020c4e8c(void) { RTC_Init(); gRandom.Init(); diff --git a/src/019_MainSelect/019_SaveManager.cpp b/src/019_MainSelect/019_SaveManager.cpp index b1aaaf9d..2aac7705 100644 --- a/src/019_MainSelect/019_SaveManager.cpp +++ b/src/019_MainSelect/019_SaveManager.cpp @@ -1,3 +1,4 @@ +#include "CommonFuncs.hpp" #include "Save/SaveManager.hpp" #include "Unknown/UnkStruct_02049b80.hpp" @@ -7,11 +8,6 @@ #include #include -extern "C" { -unk32 func_020328c8(void *, void *, size_t); -bool func_ov000_020a0a90(size_t param1, void *param2, size_t param3); -}; - const size_t data_ov019_020d1bd4[] = { sizeof(SaveInfoData), sizeof(SaveTreasureData), @@ -205,24 +201,24 @@ void SaveFile::func_ov019_020d0e18(unk32 param1) { size_t offset = SAVE_FILE_OFFSET(param1); SaveSlot *puVar3 = &this->mSlots[param1]; - if (!func_ov000_020a0a90(offset + offsetof(SaveSlot, mInfoData), &puVar3->mInfoData, sizeof(puVar3->mInfoData))) { + if (!func_ov000_020a0a90(offset + offsetof(SaveSlot, mInfoData), (unk32) &puVar3->mInfoData, sizeof(puVar3->mInfoData))) { return; } - if (!func_ov000_020a0a90(offset + offsetof(SaveSlot, mTreasureData), &puVar3->mTreasureData, + if (!func_ov000_020a0a90(offset + offsetof(SaveSlot, mTreasureData), (unk32) &puVar3->mTreasureData, sizeof(puVar3->mTreasureData))) { return; } - if (!func_ov000_020a0a90(offset + offsetof(SaveSlot, mUnk_1D00), &puVar3->mUnk_1D00, sizeof(puVar3->mUnk_1D00))) { + if (!func_ov000_020a0a90(offset + offsetof(SaveSlot, mUnk_1D00), (unk32) &puVar3->mUnk_1D00, sizeof(puVar3->mUnk_1D00))) { return; } - if (!func_ov000_020a0a90(offset + offsetof(SaveSlot, mUnk_2500), &puVar3->mUnk_2500, sizeof(puVar3->mUnk_2500))) { + if (!func_ov000_020a0a90(offset + offsetof(SaveSlot, mUnk_2500), (unk32) &puVar3->mUnk_2500, sizeof(puVar3->mUnk_2500))) { return; } - if (!func_ov000_020a0a90(offset + offsetof(SaveSlot, mUnk_2600), &puVar3->mUnk_2600, sizeof(puVar3->mUnk_2600))) { + if (!func_ov000_020a0a90(offset + offsetof(SaveSlot, mUnk_2600), (unk32) &puVar3->mUnk_2600, sizeof(puVar3->mUnk_2600))) { return; } } @@ -240,7 +236,7 @@ void SaveFile::func_ov019_020d13b8() { SaveSlot::func_ov019_020d1400(this->mSlots[this->mSaveSlotIndex].mUnk_2600); func_ov000_020a0a90(saveSlotIndex * SAVE_DATA_SIZE + offsetof(SaveSlot, mUnk_2600), - this->mSlots[this->mSaveSlotIndex].mUnk_2600, sizeof(this->mSlots->mUnk_2600)); + (unk32) this->mSlots[this->mSaveSlotIndex].mUnk_2600, sizeof(this->mSlots->mUnk_2600)); } void SaveSlot::func_ov019_020d1400(SaveFile_00000_2600_Data *param1) { @@ -252,13 +248,13 @@ void SaveFile::func_ov019_020d1434() { size_t offset = SAVE_FILE_OFFSET(this->mSaveSlotIndex); SaveSlot::func_ov019_020d14fc(this->mSlots[this->mSaveSlotIndex].mInfoData); - if (!func_ov000_020a0a90(offset, &this->mSlots[this->mSaveSlotIndex].mInfoData, + if (!func_ov000_020a0a90(offset, (unk32) & this->mSlots[this->mSaveSlotIndex].mInfoData, sizeof(this->mSlots[this->mSaveSlotIndex].mInfoData))) { return; } SaveSlot::func_ov019_020d14c0(this->mSlots[this->mSaveSlotIndex].mUnk_1D00); - if (!func_ov000_020a0a90(offset + offsetof(SaveSlot, mUnk_1D00), &this->mSlots[this->mSaveSlotIndex].mUnk_1D00, + if (!func_ov000_020a0a90(offset + offsetof(SaveSlot, mUnk_1D00), (unk32) & this->mSlots[this->mSaveSlotIndex].mUnk_1D00, sizeof(this->mSlots[this->mSaveSlotIndex].mUnk_1D00))) { return; } @@ -280,13 +276,13 @@ void SaveFile::func_ov019_020d1538() { size_t offset = this->mSaveSlotIndex * SAVE_DATA_SIZE; SaveSlot::func_ov019_020d1600(this->mSlots[this->mSaveSlotIndex].mTreasureData); - if (!func_ov000_020a0a90(offset + offsetof(SaveSlot, mTreasureData), &this->mSlots[this->mSaveSlotIndex].mTreasureData, - sizeof(SaveInfoData) * 2)) { + if (!func_ov000_020a0a90(offset + offsetof(SaveSlot, mTreasureData), + (unk32) & this->mSlots[this->mSaveSlotIndex].mTreasureData, sizeof(SaveInfoData) * 2)) { return; } SaveSlot::func_ov019_020d15cc(this->mSlots[this->mSaveSlotIndex].mUnk_2500); - if (!func_ov000_020a0a90(offset + offsetof(SaveSlot, mUnk_2500), &this->mSlots[this->mSaveSlotIndex].mUnk_2500, + if (!func_ov000_020a0a90(offset + offsetof(SaveSlot, mUnk_2500), (unk32) & this->mSlots[this->mSaveSlotIndex].mUnk_2500, sizeof(SaveFile_00000_1D00_Data) * 2)) { return; } @@ -339,7 +335,7 @@ void SaveFile::func_ov019_020d16d0() { for (int i = 0; i < NUM_UNK_BLOCKS; i++) { if (pSub2->mInfoData[i >> 5].unk_C84.unk_00[0] & (1 << (i & 0x1F))) { func_ov000_020a0a90(SAVE_FILE_OFFSET(saveSlotIndex) + i * SIZE_UNK_BLOCK + sizeof(SaveSlot), - &this->mUnk_04E0C[i * SIZE_UNK_BLOCK], SIZE_UNK_BLOCK); + (unk32) & this->mUnk_04E0C[i * SIZE_UNK_BLOCK], SIZE_UNK_BLOCK); } } } diff --git a/src/019_MainSelect/019_UnkSubStruct9.cpp b/src/019_MainSelect/019_UnkSubStruct9.cpp index d95b03f7..17010994 100644 --- a/src/019_MainSelect/019_UnkSubStruct9.cpp +++ b/src/019_MainSelect/019_UnkSubStruct9.cpp @@ -1,12 +1,9 @@ +#include "CommonFuncs.hpp" #include "FileSelect/FileSelect.hpp" #include "FileSelect/UnkSubStruct9.hpp" #include "Save/AdventureFlags.hpp" #include "Unknown/UnkStruct_0204af1c.hpp" -extern "C" { -void func_ov000_02062e44(void *param1, void *param2); -}; - // non-matching UnkSubStruct9::UnkSubStruct9(stack_struct1 param1) : mSaveSlotIndex(param1.arg2), @@ -100,7 +97,7 @@ struct struct_sStack_100 { struct_sStack_100(UnkSubStruct9 *thisx, UnkStruct_ov019_020d24c8_28_258 *pUnkSub258, Vec2s *pLocal_c4, u16 iVar12, u16 iVar11) { - func_ov000_02062e44(this, &thisx->mUnk_004); + func_ov000_02062e44((Vec2s *) this, &thisx->mUnk_004); this->mUnk_06 = pUnkSub258->mPos.x - this->mUnk_02; this->mUnk_04 = pUnkSub258->mPos.y - this->mUnk_00; this->mUnk_08 = pLocal_c4->x + thisx->mUnk_77C.x + iVar11 + this->mUnk_00; @@ -135,7 +132,7 @@ void UnkSubStruct9::func_ov019_020cbc0c() { Vec2s pos = this->mUnk_004.mPos; - func_ov000_02062e44(local_d0, (void *) &this->mUnk_004); + func_ov000_02062e44((Vec2s *) local_d0, (void *) &this->mUnk_004); unk16 test[2]; unk16 sVar4 = this->mUnk_77C.y; @@ -146,7 +143,7 @@ void UnkSubStruct9::func_ov019_020cbc0c() { this->mUnk_064.mUnk_142 = test[1]; this->mUnk_064.func_0201f4b4(0); - func_ov000_02062e44(local_d8, &this->mUnk_004); + func_ov000_02062e44((Vec2s *) local_d8, &this->mUnk_004); local_dc[0] = local_c4.x + pos.x + this->mUnk_29C.mPos.x - local_d8[0]; local_dc[1] = local_c4.y + pos.y + this->mUnk_29C.mPos.y - local_d8[1]; @@ -179,7 +176,7 @@ void UnkSubStruct9::func_ov019_020cbc0c() { unk16 sStack_e0[2]; unk16 uVar3 = data_ov019_020d1e98[i]; UnkStruct_ov019_020d24c8_28_258 uStack_40(0x89, uVar3); - func_ov000_02062e44(&sStack_e0, &this->mUnk_004.mPos); + func_ov000_02062e44((Vec2s *) &sStack_e0, &this->mUnk_004.mPos); unk16 iVar5 = uStack_40.mPos.x - sStack_e0[0]; unk16 iVar2 = uStack_40.mPos.y - sStack_e0[1]; diff --git a/src/019_MainSelect/FileSelectMain.cpp b/src/019_MainSelect/FileSelectMain.cpp index a833e988..5011d452 100644 --- a/src/019_MainSelect/FileSelectMain.cpp +++ b/src/019_MainSelect/FileSelectMain.cpp @@ -1,3 +1,4 @@ +#include "CommonFuncs.hpp" #include "FileSelect/FileSelect.hpp" #include "Game/Game.hpp" #include "Game/GameModeFileSelect.hpp" @@ -10,10 +11,6 @@ #include -extern "C" { -void func_ov000_02062e44(void *param1, void *param2); -}; - class UnkStruct_ov019_020d24c0 { public: Vec2s mUnk_00; @@ -244,7 +241,7 @@ void FileSelectMain::func_ov019_020c6d48() { for (int i = 0; i < MAX_SAVE_SLOTS; i++) { this->GetUnk03E0(i).func_ov019_020cbaec(); - func_ov000_02062e44(&auStack_2c, &this->GetUnk03E0(i).mUnk_004); + func_ov000_02062e44((Vec2s *) &auStack_2c, &this->GetUnk03E0(i).mUnk_004); local_34.x = UnkStruct_ov019_020d1e70::data_ov019_020d1e4c.mUnk_20; local_34.y = UnkStruct_ov019_020d1e70::data_ov019_020d1e4c.mUnk_0C; diff --git a/src/019_MainSelect/FileSelectManager_160.cpp b/src/019_MainSelect/FileSelectManager_160.cpp index cfcbe67a..41ba80de 100644 --- a/src/019_MainSelect/FileSelectManager_160.cpp +++ b/src/019_MainSelect/FileSelectManager_160.cpp @@ -1,11 +1,10 @@ +#include "CommonFuncs.hpp" #include "FileSelect/FileSelect.hpp" #include "Unknown/UnkStruct_0204a088.hpp" #include "Unknown/UnkStruct_0204a110.hpp" #include -extern "C" GameModeManagerBase_104 *func_ov003_020b6520(void *param1, void *param2); - FileSelectManager_160::FileSelectManager_160(GameModeManagerBase_104 *param1, FileSelectMain *param2) { this->mUnk_10 = param2; this->mUnk_14 = NULL; diff --git a/src/019_MainSelect/FileSelectMicTest.cpp b/src/019_MainSelect/FileSelectMicTest.cpp index 3f16f2a9..d15b7be6 100644 --- a/src/019_MainSelect/FileSelectMicTest.cpp +++ b/src/019_MainSelect/FileSelectMicTest.cpp @@ -1,4 +1,5 @@ #include "FileSelect/FileSelectMicTest.hpp" +#include "CommonFuncs.hpp" #include "FileSelect/FileSelect.hpp" #include "FileSelect/FileSelectOptionsManager.hpp" #include "Unknown/UnkStruct_0204a110.hpp" @@ -6,13 +7,6 @@ #include "Unknown/UnkStruct_ov000_020b51b8.hpp" #include "Unknown/UnkStruct_ov000_020b5214.hpp" -extern "C" { -unk32 func_01ffb428(unk32, unk32); - -void func_ov000_02062e44(Vec2s *param1, void *param2); -unk8 func_ov000_02070164(void *); //! TODO: turn to a class -}; - class UnkStruct_ov019_020d2248 { public: u16 mUnk_00; diff --git a/src/019_MainSelect/FileSelectOptions.cpp b/src/019_MainSelect/FileSelectOptions.cpp index 7852b5c5..a397290f 100644 --- a/src/019_MainSelect/FileSelectOptions.cpp +++ b/src/019_MainSelect/FileSelectOptions.cpp @@ -3,6 +3,7 @@ #include "FileSelect/FileSelectOptions.hpp" // clang-format on +#include "CommonFuncs.hpp" #include "FileSelect/FileSelect.hpp" #include "Unknown/UnkStruct_0204a088.hpp" #include "Unknown/UnkStruct_0204a110.hpp" @@ -10,11 +11,6 @@ #include "Unknown/UnkStruct_ov000_020b50c0.hpp" #include "Unknown/UnkStruct_ov000_020b5214.hpp" -extern "C" { -void func_ov000_02062e44(void *param1, void *param2); -void func_ov000_020623d8(void *param1, unk32 param2); -}; - class UnkStruct_ov019_020d215c { public: /* 00 */ Vec2sC mUnk_00; @@ -454,14 +450,14 @@ void FileSelectOptions::func_ov019_020cd614() { } this->mUnk_1064.mUnk_08 = 0; - func_ov000_02062e44(&local_34, &this->mUnk_1388); + func_ov000_02062e44((Vec2s *) &local_34, &this->mUnk_1388); this->mUnk_1420.func_ov000_0206415c(&local_34, 0, 0xC, 0); - func_ov000_02062e44(&local_40, &this->mUnk_16AC); + func_ov000_02062e44((Vec2s *) &local_40, &this->mUnk_16AC); local_34 = local_40; this->mUnk_1744.func_ov000_0206415c(&local_34, 0, 0xC, 0); - func_ov000_02062e44(&local_44, &this->mUnk_19D0); + func_ov000_02062e44((Vec2s *) &local_44, &this->mUnk_19D0); local_34 = local_44; this->mUnk_1A68.func_ov000_0206415c(&local_34, 0, 0xC, 0); } diff --git a/src/019_MainSelect/FileSelectSubScreen.cpp b/src/019_MainSelect/FileSelectSubScreen.cpp index 2f46fe86..7c4065a4 100644 --- a/src/019_MainSelect/FileSelectSubScreen.cpp +++ b/src/019_MainSelect/FileSelectSubScreen.cpp @@ -1,3 +1,4 @@ +#include "CommonFuncs.hpp" #include "FileSelect/FileSelect.hpp" #include "FileSelect/FileSelectOptionsManager.hpp" #include "System/Random.hpp" @@ -7,11 +8,6 @@ #include #include -extern "C" { -void func_0200a7b0(unk32 param1, void *param2, void *param3, void *param4, unk32 param5, unk32 param6, unk32 param7, - unk32 param8); -}; - FileSelectOptionsManager *gpFSOptionsManager = NULL; static unk8 data_ov019_020fb8cc[0xDC00]; diff --git a/src/024_MainGame/Actor/Actor_Derived1_EC_024.cpp b/src/024_MainGame/Actor/Actor_Derived1_EC_024.cpp index de9595cc..d9ce76bf 100644 --- a/src/024_MainGame/Actor/Actor_Derived1_EC_024.cpp +++ b/src/024_MainGame/Actor/Actor_Derived1_EC_024.cpp @@ -1,16 +1,7 @@ #include "Actor/Actor_Derived1.hpp" +#include "CommonFuncs.hpp" #include "Unknown/UnkStruct_027e0960.hpp" -struct UnkFuncStruct1 { - s16 unk_00; -}; - -extern "C" void func_01ffb714(VecFx32 *, VecFx32 *, void *); -extern "C" u16 func_01ffbbe0(fx32 x, fx32 z); -extern "C" unk32 func_01ff930c(s16 *, unk16, unk32); -extern "C" unk32 func_01ff9258(int, int); -extern "C" fx32 func_02017f54(s16 *pAngle, UnkFuncStruct1); - //! TODO: probably not there? bool data_ov024_020d86b4 = false; @@ -171,7 +162,7 @@ u16 *Actor_Derived1_EC::func_ov024_020d69d8(VecFx32 *pPos, s16 *pAngle, VecFx32 VecFx32 sp1C; VecFx32 sp10; VecFx32 sp4; - UnkFuncStruct1 sp0; + UnkAngleStruct sp0; s16 temp_r1; s32 var_r0; s32 temp_r4; @@ -186,8 +177,8 @@ u16 *Actor_Derived1_EC::func_ov024_020d69d8(VecFx32 *pPos, s16 *pAngle, VecFx32 func_01ffb714(&sp1C, pPos, &sp10); - temp_r1 = func_01ffbbe0(sp10.x, sp10.z); - sp0.unk_00 = temp_r1; + temp_r1 = func_01ffbbe0(sp10.x, sp10.z); + sp0.angle_s = temp_r1; func_01ff930c((s16 *) pAngle, temp_r1, param5); temp_r4 = func_01ff9258(sp1C.x - pPos->x, sp1C.z - pPos->z); @@ -221,7 +212,7 @@ u16 *Actor_Derived1_EC::func_ov024_020d6b7c(VecFx32 *pPos, s16 *pAngle, VecFx32 VecFx32 sp1C; VecFx32 sp10; VecFx32 sp4; - UnkFuncStruct1 sp0; + UnkAngleStruct sp0; s16 temp_r1; s32 var_r0; s32 temp_r4; @@ -237,8 +228,8 @@ u16 *Actor_Derived1_EC::func_ov024_020d6b7c(VecFx32 *pPos, s16 *pAngle, VecFx32 func_01ffb714(&sp28, pPos, &sp1C); func_01ffb714(&sp28, &this->mUnk_0C, &sp10); - temp_r1 = func_01ffbbe0(sp1C.x, sp1C.z); - sp0.unk_00 = temp_r1; + temp_r1 = func_01ffbbe0(sp1C.x, sp1C.z); + sp0.angle_s = temp_r1; func_01ff930c((s16 *) pAngle, temp_r1, param5); temp_r4 = func_01ff9258(sp28.x - pPos->x, sp28.z - pPos->z); diff --git a/src/024_MainGame/Game/AdventureModeManager_024.cpp b/src/024_MainGame/Game/AdventureModeManager_024.cpp index b9209243..caf8374f 100644 --- a/src/024_MainGame/Game/AdventureModeManager_024.cpp +++ b/src/024_MainGame/Game/AdventureModeManager_024.cpp @@ -1,4 +1,5 @@ #include "Actor/ActorUnkTUTO.hpp" +#include "CommonFuncs.hpp" #include "Game/GameModeAdventure.hpp" #include "MainGame/AdventureMode.hpp" #include "System/OverlayManager.hpp" @@ -30,14 +31,6 @@ #include #include -extern "C" { -void func_02019b3c(); -void func_02019c4c(); -void func_02019a74(); -void func_0200a7b0(unk32 param1, void *param2, void *param3, void *param4, unk32 param5, unk32 param6, unk32 param7, - unk32 param8); -} - extern void *data_ov000_020b64f8; AdventureModeManager::~AdventureModeManager() { diff --git a/src/024_MainGame/Game/AdventureModeManager_160_024.cpp b/src/024_MainGame/Game/AdventureModeManager_160_024.cpp index 9107101d..5e2267fd 100644 --- a/src/024_MainGame/Game/AdventureModeManager_160_024.cpp +++ b/src/024_MainGame/Game/AdventureModeManager_160_024.cpp @@ -1,3 +1,4 @@ +#include "CommonFuncs.hpp" #include "MainGame/AdventureMode.hpp" #include "Unknown/UnkStruct_0204a088.hpp" #include "Unknown/UnkStruct_0204a110.hpp" @@ -11,11 +12,7 @@ #include #include -extern "C" void func_02019b3c(); -extern "C" AdventureModeManager_160_18 *func_ov006_020b6ab0(void *, void *); - //! TODO: this is fake according to GameModeTitleScreen::GameModeTitleScreen() -extern "C" AdventureModeManager_160_14 *func_ov002_020b6520(void *, void *, int); void AdventureModeManager_160_4C::vfunc_0C() { data_0204a088->func_ov000_02061224(); diff --git a/src/024_MainGame/Game/AdventureModeManager_170_024.cpp b/src/024_MainGame/Game/AdventureModeManager_170_024.cpp index 563c8f39..a5a0dafd 100644 --- a/src/024_MainGame/Game/AdventureModeManager_170_024.cpp +++ b/src/024_MainGame/Game/AdventureModeManager_170_024.cpp @@ -1,3 +1,4 @@ +#include "CommonFuncs.hpp" #include "MainGame/AdventureMode.hpp" #include "Unknown/UnkStruct_0204a088.hpp" #include "Unknown/UnkStruct_0204a110.hpp" @@ -9,8 +10,6 @@ #include -extern "C" GameModeManagerBase_104 *func_ov008_020b6520(void *); - void AdventureModeManager_170_14::vfunc_0C() { data_0204a088->func_ov000_02061224(); } diff --git a/src/024_MainGame/Game/AdventureModeManager_174_024.cpp b/src/024_MainGame/Game/AdventureModeManager_174_024.cpp index 4c0a1d7b..fca5eb51 100644 --- a/src/024_MainGame/Game/AdventureModeManager_174_024.cpp +++ b/src/024_MainGame/Game/AdventureModeManager_174_024.cpp @@ -1,12 +1,9 @@ +#include "CommonFuncs.hpp" #include "MainGame/AdventureMode.hpp" #include "Unknown/UnkStruct_0204a088.hpp" #include "Unknown/UnkStruct_0204a110.hpp" #include "Unknown/UnkStruct_0204e5f8.hpp" -extern "C" void func_ov002_020b6d50(void *); -extern "C" void func_ov002_020b6d68(void *); -extern "C" unk32 func_ov002_020b6cf4(void *, unk32 param1); - THUMB_BEGIN AdventureModeManager_174::AdventureModeManager_174(GameModeManagerBase_104 *param1) : diff --git a/src/024_MainGame/Game/AdventureModeManager_178_024.cpp b/src/024_MainGame/Game/AdventureModeManager_178_024.cpp index 431f3d90..d4796384 100644 --- a/src/024_MainGame/Game/AdventureModeManager_178_024.cpp +++ b/src/024_MainGame/Game/AdventureModeManager_178_024.cpp @@ -1,9 +1,8 @@ +#include "CommonFuncs.hpp" #include "MainGame/AdventureMode.hpp" #include "Unknown/UnkStruct_0204a088.hpp" #include "Unknown/UnkStruct_0204a110.hpp" -extern "C" unk32 func_ov004_020b697c(void *, unk32 param1); - THUMB_BEGIN AdventureModeManager_178::AdventureModeManager_178(GameModeManagerBase_104 *param1) : diff --git a/src/024_MainGame/Game/AdventureModeManager_180_024.cpp b/src/024_MainGame/Game/AdventureModeManager_180_024.cpp index 22bcafc1..3fcb3889 100644 --- a/src/024_MainGame/Game/AdventureModeManager_180_024.cpp +++ b/src/024_MainGame/Game/AdventureModeManager_180_024.cpp @@ -1,3 +1,4 @@ +#include "CommonFuncs.hpp" #include "MainGame/AdventureMode.hpp" #include "MapObject/MapObjectManager.hpp" #include "MapObject/MapObjectUnkSPTB.hpp" @@ -7,8 +8,6 @@ #include "Unknown/UnkStruct_027e09a4.hpp" #include "Unknown/UnkStruct_ov000_020b4f70.hpp" -extern "C" unk32 func_ov014_020b6520(void *, int, int); - THUMB_BEGIN void AdventureModeManager_180_18::vfunc_0C(void) { diff --git a/src/024_MainGame/Game/AdventureModeManager_184_024.cpp b/src/024_MainGame/Game/AdventureModeManager_184_024.cpp index 9522d6d0..3df9b0f2 100644 --- a/src/024_MainGame/Game/AdventureModeManager_184_024.cpp +++ b/src/024_MainGame/Game/AdventureModeManager_184_024.cpp @@ -1,3 +1,4 @@ +#include "CommonFuncs.hpp" #include "MainGame/AdventureMode.hpp" #include "Unknown/UICounterManager.hpp" #include "Unknown/UnkStruct_0204a088.hpp" @@ -9,10 +10,6 @@ #include "Unknown/UnkStruct_ov000_020b504c.hpp" #include "Unknown/UnkStruct_ov024_020d8660.hpp" -extern "C" AdventureModeManager_184_10 *func_ov010_020b65fc(void *); -extern "C" AdventureModeManager_184_10 *func_ov010_020b6520(void *); -extern "C" AdventureModeManager_184_14 *func_ov010_020b88c4(void *); - THUMB_BEGIN AdventureModeManager_184::AdventureModeManager_184(GameModeManagerBase_104 *param1) { diff --git a/src/024_MainGame/Game/AdventureModeManager_18C_024.cpp b/src/024_MainGame/Game/AdventureModeManager_18C_024.cpp index 6f185f91..f58bd4da 100644 --- a/src/024_MainGame/Game/AdventureModeManager_18C_024.cpp +++ b/src/024_MainGame/Game/AdventureModeManager_18C_024.cpp @@ -1,3 +1,4 @@ +#include "CommonFuncs.hpp" #include "MainGame/AdventureMode.hpp" #include "Save/AdventureFlags.hpp" #include "Unknown/UnkStruct_02049f8c.hpp" @@ -11,10 +12,6 @@ #include -extern "C" AdventureModeManager_18C_10 *func_ov011_020b6520(void *, int); -extern "C" void func_ov011_020b84f0(s16 *param1, void *, unk32 param2); -extern "C" void func_02019b3c(); - THUMB_BEGIN AdventureModeManager_18C_14::AdventureModeManager_18C_14() {} diff --git a/src/024_MainGame/Game/AdventureModeManager_190_024.cpp b/src/024_MainGame/Game/AdventureModeManager_190_024.cpp index 21b28017..f9d00b27 100644 --- a/src/024_MainGame/Game/AdventureModeManager_190_024.cpp +++ b/src/024_MainGame/Game/AdventureModeManager_190_024.cpp @@ -1,3 +1,4 @@ +#include "CommonFuncs.hpp" #include "MainGame/AdventureMode.hpp" #include "Unknown/UnkStruct_0204a088.hpp" #include "Unknown/UnkStruct_0204e5f8.hpp" @@ -5,8 +6,6 @@ #include -extern "C" AdventureModeManager_190_10 *func_ov011_020b8e54(void *, int); - THUMB_BEGIN void AdventureModeManager_190_14::vfunc_0C() { diff --git a/src/024_MainGame/Game/AdventureModeManager_1B8_Base_024.cpp b/src/024_MainGame/Game/AdventureModeManager_1B8_Base_024.cpp index 9410a848..decdf93f 100644 --- a/src/024_MainGame/Game/AdventureModeManager_1B8_Base_024.cpp +++ b/src/024_MainGame/Game/AdventureModeManager_1B8_Base_024.cpp @@ -1,3 +1,4 @@ +#include "CommonFuncs.hpp" #include "MainGame/AdventureMode.hpp" #include "Save/SaveManager.hpp" #include "System/SysNew.hpp" @@ -10,16 +11,6 @@ #include #include -extern "C" { -void func_ov000_0205a950(u8 bgType, bool isTopScreen, bool); -void func_ov000_0205a944(u8 bgType, bool isTopScreen, bool); -void func_01ffb644(fx32 x, fx32 y); -unk32 func_01ffb558(); - -void func_02029058(void *, void *); -u32 func_0202955c(void *, int, void *, int, void *); -} - static const bool data_ov024_020d7544[] = {true, false, true}; static const u8 data_ov024_020d7547[] = {0x03, 0x01, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00}; static u16 data_ov024_020d869c; diff --git a/src/024_MainGame/Game/GameModeAdventure_024.cpp b/src/024_MainGame/Game/GameModeAdventure_024.cpp index f817e54a..b5d7bf0a 100644 --- a/src/024_MainGame/Game/GameModeAdventure_024.cpp +++ b/src/024_MainGame/Game/GameModeAdventure_024.cpp @@ -1,3 +1,4 @@ +#include "CommonFuncs.hpp" #include "Game/GameModeAdventure.hpp" #include "Save/SaveManager.hpp" #include "Unknown/UnkStruct_0204a088.hpp" @@ -9,10 +10,6 @@ #include "Unknown/UnkStruct_ov024_020d8660.hpp" #include "versions.h" -extern "C" { -unk32 func_0200e234(); -} - THUMB_BEGIN GameModeAdventure::~GameModeAdventure() { diff --git a/src/024_MainGame/MiscAdvManager.cpp b/src/024_MainGame/MiscAdvManager.cpp index 2b4f602d..cf0f0dd8 100644 --- a/src/024_MainGame/MiscAdvManager.cpp +++ b/src/024_MainGame/MiscAdvManager.cpp @@ -1,11 +1,10 @@ #include "MainGame/MiscAdvManager.hpp" +#include "CommonFuncs.hpp" #include "Item/ItemManager.hpp" #include "System/SysNew.hpp" #include -extern "C" u8 func_ov000_020a9a50(); - MiscAdvManager *gpMiscAdvManager = NULL; MiscAdvManager *MiscAdvManager::Create() { diff --git a/src/024_MainGame/Player/PlayerActor_A0_38_024.cpp b/src/024_MainGame/Player/PlayerActor_A0_38_024.cpp index e63e1dc8..b2e8d02d 100644 --- a/src/024_MainGame/Player/PlayerActor_A0_38_024.cpp +++ b/src/024_MainGame/Player/PlayerActor_A0_38_024.cpp @@ -1,8 +1,6 @@ +#include "CommonFuncs.hpp" #include "Player/PlayerLink.hpp" -extern "C" void func_ov000_0205be34(void *thisx, unk16 param1); -extern "C" void func_ov000_0205be44(void *thisx, Vec2s *param1, Vec2s *param2, bool param3, bool param4); - struct UnkStruct_auStack_14 { unk16 unk_00; unk8 unk_02; diff --git a/src/024_MainGame/TitleCard/UnkTitleCardSystem1_024.cpp b/src/024_MainGame/TitleCard/UnkTitleCardSystem1_024.cpp index c6c61489..3c3deeda 100644 --- a/src/024_MainGame/TitleCard/UnkTitleCardSystem1_024.cpp +++ b/src/024_MainGame/TitleCard/UnkTitleCardSystem1_024.cpp @@ -1,3 +1,4 @@ +#include "CommonFuncs.hpp" #include "Game/GameModeManager.hpp" #include "System/OverlayManager.hpp" #include "Unknown/UnkStruct_02049be0.hpp" @@ -12,9 +13,6 @@ #include "Unknown/UnkStruct_ov024_020d8694.hpp" #include -extern "C" unk32 func_02014fe0(); -extern "C" fx32 func_01ffb428(unk32, unk32); - UnkTitleCardSystem1::UnkTitleCardSystem1(GameModeManagerBase_004 *param1) : mUnk_004(4), mUnk_008(NULL), diff --git a/src/024_MainGame/Train/PassengerManager.cpp b/src/024_MainGame/Train/PassengerManager.cpp index ee632039..c29fe776 100644 --- a/src/024_MainGame/Train/PassengerManager.cpp +++ b/src/024_MainGame/Train/PassengerManager.cpp @@ -1,12 +1,10 @@ #include "MainGame/PassengerManager.hpp" +#include "CommonFuncs.hpp" #include "System/Random.hpp" #include "System/SysNew.hpp" #include "Unknown/UnkStruct_02049bac.hpp" #include "Unknown/UnkStruct_027e09b8.hpp" -extern "C" SceneIndex func_ov000_0205c984(); -extern "C" u32 func_ov000_0205c9b4(); - const s16 data_ov024_020d7598[] = {0x29, 0x2F, 0x2B, 0x2C, 0x2E}; struct PassengerInfos { diff --git a/src/024_MainGame/Train/UnkDataStruct4.cpp b/src/024_MainGame/Train/UnkDataStruct4.cpp index e8fce303..76dd363e 100644 --- a/src/024_MainGame/Train/UnkDataStruct4.cpp +++ b/src/024_MainGame/Train/UnkDataStruct4.cpp @@ -1,3 +1,4 @@ +#include "CommonFuncs.hpp" #include "MainGame/AdventureMode.hpp" #include "Unknown/Common.hpp" #include "Unknown/UnkFileSystem.hpp" @@ -8,10 +9,6 @@ #include #include -extern "C" unk32 func_02032784(unk32 param1); -extern "C" unk32 func_ov000_0205c7ac(unk32, unk32); -extern "C" bool func_ov000_0205c74c(unk32, unk32, unk32, unk32); - static const u8 data_ov024_020d756c[] = {0x01, 0x04, 0x10, 0x40}; UnkDataStruct4::UnkDataStruct4() { diff --git a/src/024_MainGame/Train/UnkDataStruct4_14.cpp b/src/024_MainGame/Train/UnkDataStruct4_14.cpp index 64efa978..94e187f1 100644 --- a/src/024_MainGame/Train/UnkDataStruct4_14.cpp +++ b/src/024_MainGame/Train/UnkDataStruct4_14.cpp @@ -1,12 +1,9 @@ +#include "CommonFuncs.hpp" #include "MainGame/AdventureMode.hpp" #include "Unknown/Common.hpp" #include "Unknown/UnkStruct_027e09a4.hpp" #include "Unknown/UnkStruct_027e0ce0.hpp" -extern "C" unk32 func_02032784(unk32 param1); -extern "C" u8 func_020157f0(unk32 param1, unk32 param2); -extern "C" u8 func_020157c0(unk32 param1, unk32 param2); - static const u8 data_ov024_020d7550[] = {0x01, 0x04, 0x10, 0x40, 0x00}; static const u8 data_ov024_020d7555[] = {0x20, 0x10, 0x08, 0x40, 0x00, 0x04, 0x80, 0x01, 0x02, 0x00, 0x00}; static const unk32 data_ov024_020d7560[] = {0x01, 0x00, 0x02}; diff --git a/src/024_MainGame/Train/UnkStruct_027e0cf8_00_0C_024.cpp b/src/024_MainGame/Train/UnkStruct_027e0cf8_00_0C_024.cpp index 053829cf..430a90b2 100644 --- a/src/024_MainGame/Train/UnkStruct_027e0cf8_00_0C_024.cpp +++ b/src/024_MainGame/Train/UnkStruct_027e0cf8_00_0C_024.cpp @@ -1,11 +1,10 @@ +#include "CommonFuncs.hpp" #include "Unknown/UnkStruct_027e0998.hpp" #include "Unknown/UnkStruct_027e09a4.hpp" #include "Unknown/UnkStruct_027e09b8.hpp" #include "Unknown/UnkStruct_027e0cf8.hpp" #include "versions.h" -extern "C" bool func_ov000_0205ca18(unk32 param1, unk32 param2); -extern "C" bool func_ov000_0205c9d0(unk32 stationSceneIdx); extern VecFx32 data_027e07d4; static const Vec2sb data_ov024_020d8094(0x7F, 0x7F); diff --git a/src/024_MainGame/Train/UnkStruct_027e0cf8_08_00_024.cpp b/src/024_MainGame/Train/UnkStruct_027e0cf8_08_00_024.cpp index 2cb0d680..6c06256c 100644 --- a/src/024_MainGame/Train/UnkStruct_027e0cf8_08_00_024.cpp +++ b/src/024_MainGame/Train/UnkStruct_027e0cf8_08_00_024.cpp @@ -1,9 +1,8 @@ +#include "CommonFuncs.hpp" #include "Unknown/UnkStruct_027e0cf8.hpp" #include -extern "C" fx32 func_01ffb66c(unk32, unk32); - bool UnkStruct_027e0cf8_08_00::func_ov024_020d3900(Vec2s *param1, fx32 *param2, fx32 *param3, unk32 param4, unk32 param5) { return UnkStruct_027e0cf8_08_00::func_ov024_020d3970(param1, param2, param3, param4, param5); } diff --git a/src/024_MainGame/Train/UnkStruct_027e0cf8_08_024.cpp b/src/024_MainGame/Train/UnkStruct_027e0cf8_08_024.cpp index 36b9cc2f..2a4d63c5 100644 --- a/src/024_MainGame/Train/UnkStruct_027e0cf8_08_024.cpp +++ b/src/024_MainGame/Train/UnkStruct_027e0cf8_08_024.cpp @@ -1,9 +1,8 @@ +#include "CommonFuncs.hpp" #include "Unknown/UnkStruct_027e0cf8.hpp" #include -extern "C" void func_02019cec(u16 param1, unk32 param2); - u8 UnkStruct_027e0cf8_08::func_ov024_020d3158(SceneIndex sceneIndex) { switch (sceneIndex) { case SceneIndex_test_trn: diff --git a/src/024_MainGame/Train/UnkStruct_027e0d00.cpp b/src/024_MainGame/Train/UnkStruct_027e0d00.cpp index 32bb7edc..95564c8e 100644 --- a/src/024_MainGame/Train/UnkStruct_027e0d00.cpp +++ b/src/024_MainGame/Train/UnkStruct_027e0d00.cpp @@ -1,13 +1,11 @@ #include "Unknown/UnkStruct_027e0d00.hpp" +#include "CommonFuncs.hpp" #include "MainGame/CargoManager.hpp" #include "System/SysNew.hpp" #include "Unknown/UnkStruct_027e09a4.hpp" #include "Unknown/UnkStruct_027e0ce0.hpp" #include "versions.h" -extern "C" bool func_ov026_020f4be0(int, int); -extern "C" unk32 func_02012fc4(unk32); - const UnkStruct_ov024_020d7624 data_ov024_020d7624 = {0x13, {0}}; static const unk32 data_ov024_020d764c[] = {0x0320, 0x0300, 0x0500, 0x0200}; static const unk32 data_ov024_020d763c[] = {0x0270, 0x0140, 0x0240, 0x0100}; @@ -96,7 +94,7 @@ void UnkStruct_027e0d00::func_ov024_020d4ab4() { } #if IS_JP -extern "C" void func_ov000_02058c74(void *, int, int, int, int); + #endif void UnkStruct_027e0d00::func_ov024_020d4af4() { diff --git a/src/024_MainGame/Train/UnkTrainSystem1_024.cpp b/src/024_MainGame/Train/UnkTrainSystem1_024.cpp index 1cab243e..2c631997 100644 --- a/src/024_MainGame/Train/UnkTrainSystem1_024.cpp +++ b/src/024_MainGame/Train/UnkTrainSystem1_024.cpp @@ -1,3 +1,4 @@ +#include "CommonFuncs.hpp" #include "MainGame/AdventureMode.hpp" #include "MainGame/PassengerManager.hpp" #include "MainGame/UnkTrainSystems.hpp" @@ -8,9 +9,6 @@ #include "types.h" #include "versions.h" -extern "C" void func_ov000_0205c1f0(unk32 *, u16); -extern "C" void func_ov000_0205c204(void *, VecFx32 *, int, int, u8); - struct UnkStruct_ov024_020d86a8_Mgr { const UnkStruct_ov024_020d86a8 *pInstance; diff --git a/src/024_MainGame/Train/UnkTrainSystem2_024.cpp b/src/024_MainGame/Train/UnkTrainSystem2_024.cpp index 3fcbf228..f88b59cc 100644 --- a/src/024_MainGame/Train/UnkTrainSystem2_024.cpp +++ b/src/024_MainGame/Train/UnkTrainSystem2_024.cpp @@ -1,3 +1,4 @@ +#include "CommonFuncs.hpp" #include "MainGame/AdventureMode.hpp" #include "MainGame/CargoManager.hpp" #include "MainGame/UnkTrainSystems.hpp" @@ -8,9 +9,6 @@ #include "Unknown/UnkStruct_027e0d00.hpp" #include "Unknown/UnkStruct_ov000_020b5214.hpp" -extern "C" void func_01ffcb94(unk16, unk16, MtxFx33 *); -extern "C" void func_01ffa60c(const MtxFx33 *, MtxFx33 *, MtxFx33 *); - const UnkStruct_ov024_020d86a8 data_ov024_020d78bc = {0}; const UnkCargoStruct data_ov024_020d78c0[] = { @@ -43,8 +41,6 @@ UnkTrainSystem2::UnkTrainSystem2() : UnkTrainSystem2::~UnkTrainSystem2() {} -extern "C" bool func_01ff916c(void *, int, int); - void UnkTrainSystem2::func_ov024_020d5990() { if (this->func_ov024_020d5c40()) { this->mUnk_00 = 0x1000; diff --git a/src/024_MainGame/UICounterManager.cpp b/src/024_MainGame/UICounterManager.cpp index 5a92d63f..63564dfe 100644 --- a/src/024_MainGame/UICounterManager.cpp +++ b/src/024_MainGame/UICounterManager.cpp @@ -1,4 +1,5 @@ #include "Unknown/UICounterManager.hpp" +#include "CommonFuncs.hpp" #include "MainGame/CargoManager.hpp" #include "Unknown/UnkStruct_0204a110.hpp" #include "Unknown/UnkStruct_0204af1c.hpp" @@ -11,9 +12,6 @@ #include "Unknown/UnkStruct_ov024_020d8660.hpp" #include "versions.h" -extern "C" s16 func_020196b0(unk32 param1); -extern "C" unk32 func_02015788(u16 param1); - UICounterManager *gpUICounterManager = NULL; static const u16 data_ov024_020d73d8[] = { diff --git a/src/024_MainGame/Unknown/UnkStruct_027e0d08_024.cpp b/src/024_MainGame/Unknown/UnkStruct_027e0d08_024.cpp index 4f0c0d74..1531b057 100644 --- a/src/024_MainGame/Unknown/UnkStruct_027e0d08_024.cpp +++ b/src/024_MainGame/Unknown/UnkStruct_027e0d08_024.cpp @@ -1,3 +1,4 @@ +#include "CommonFuncs.hpp" #include "System/SysNew.hpp" #include "Unknown/UnkStruct_027e0d08.hpp" #include "Unknown/UnkStruct_ov000_020b50c0.hpp" @@ -5,9 +6,6 @@ #include #include -extern "C" BOOL func_0200169c(void *, int, int, int, int, void *, int); -extern "C" void func_0200174c(); - UnkStruct_027e0d08::UnkStruct_027e0d08() { this->mUnk_00 = NULL; this->mUnk_04 = NULL; diff --git a/src/025_Title/GameModeTitleScreen.cpp b/src/025_Title/GameModeTitleScreen.cpp index 1de6b093..07b1bc76 100644 --- a/src/025_Title/GameModeTitleScreen.cpp +++ b/src/025_Title/GameModeTitleScreen.cpp @@ -1,4 +1,5 @@ #include "Game/GameModeTitleScreen.hpp" +#include "CommonFuncs.hpp" #include "Cutscene/Cutscene.hpp" #include "Game/Game.hpp" #include "TitleScreen/TitleScreen.hpp" @@ -6,11 +7,6 @@ #include "Unknown/UnkStruct_0204a110.hpp" #include "Unknown/UnkStruct_027e09a4.hpp" -extern "C" { -void func_0201659c(); -void func_0200e234(); -} - GameModeTitleScreen::GameModeTitleScreen() { func_0201659c(); gGame.func_02013370(2); diff --git a/src/025_Title/TitleScreen.cpp b/src/025_Title/TitleScreen.cpp index 783f06e9..31891da5 100644 --- a/src/025_Title/TitleScreen.cpp +++ b/src/025_Title/TitleScreen.cpp @@ -1,4 +1,5 @@ #include "TitleScreen/TitleScreen.hpp" +#include "CommonFuncs.hpp" #include "Game/GameMode.hpp" #include "Unknown/UnkStruct_02049be0.hpp" #include "Unknown/UnkStruct_0204a060.hpp" @@ -11,11 +12,6 @@ #include -extern "C" { -void func_ov000_0205be34(void *param1, unk32 param2); -void func_ov000_0205bedc(void *param1, void *param2, void *param3, void *param4, unk32 param5, int); -} - static TitleScreenPTMF data_ov025_020c5aec[TitleScreenState_Max] = { &TitleScreen::func_ov025_020c5200, // TitleScreenState_None &TitleScreen::func_ov025_020c5204, // TitleScreenState_IdleBeforeUI diff --git a/src/031_Land/Actor/ActorBlast.cpp b/src/031_Land/Actor/ActorBlast.cpp index c7358457..508b291c 100644 --- a/src/031_Land/Actor/ActorBlast.cpp +++ b/src/031_Land/Actor/ActorBlast.cpp @@ -1,4 +1,5 @@ #include "Actor/ActorBlast.hpp" +#include "CommonFuncs.hpp" #include "Actor/ActorManager.hpp" #include "System/SysNew.hpp" @@ -14,10 +15,7 @@ struct UnkStruct_ov031_020e5d18_00 { /* 18 */ }; -extern "C" VecFx32 data_027e07d4; - -extern "C" void func_01ffe6c4(UnkStruct_ov031_020e5d18_00 *, ActorRef, VecFx32 *, VecFx32 *, s32, VecFx32 *, - UnkStruct_ov031_Items_00_Base *); +extern VecFx32 data_027e07d4; DECL_PROFILE(ActorProfileBlast); @@ -114,7 +112,7 @@ void ActorBlast::Update() { UnkStruct_ov031_020e5d18_00 sp14; sp14.mUnk_00 = NULL; - func_01ffe6c4(&sp14, this->mRef, &data_027e07d4, &data_027e07d4, 0x1C, NULL, &this->mUnk_E8); + func_01ffe6c4(&sp14.mUnk_00, this->mRef, &data_027e07d4, &data_027e07d4, 0x1C, NULL, &this->mUnk_E8); sp14.mUnk_00->func_ov000_0207df88(&this->mUnk_C8, 0x0); diff --git a/src/031_Land/Actor/ActorBomb.cpp b/src/031_Land/Actor/ActorBomb.cpp index 02d474fb..070a8139 100644 --- a/src/031_Land/Actor/ActorBomb.cpp +++ b/src/031_Land/Actor/ActorBomb.cpp @@ -1,4 +1,5 @@ #include "Actor/ActorBomb.hpp" +#include "CommonFuncs.hpp" #include "Actor/ActorBlast.hpp" #include "Actor/ActorManager.hpp" @@ -23,25 +24,13 @@ struct UnkStruct_ov031_020e5d18_00 { /* 18 */ }; -extern "C" VecFx32 data_027e07d4; -extern "C" unk32 data_ov000_020aecf8; -extern "C" VecFx32 data_ov031_02110a10; -extern "C" VecFx32 data_ov031_02110a28; -extern "C" char data_ov031_02110a50; -extern "C" char data_ov031_02110a60; -extern "C" char data_ov031_02110a70; - -extern "C" bool func_01ff916c(void *, int, int); -extern "C" void func_01ff9218(fx32 *, fx32, fx32); -extern "C" unk32 func_01ff9258(fx32, fx32); -extern "C" void func_01ff94cc(VecFx32 *, VecFx32 *, VecFx32 *); -extern "C" fx32 func_01ffb464(fx32); -extern "C" void func_01ffb714(VecFx32 *, VecFx32 *, VecFx32 *); -extern "C" void func_01ffb974(unk32, VecFx32 *, VecFx32 *, VecFx32 *); -extern "C" void func_01ffc5a0(ModelRender *, unk32, UnkAngleStruct, void *); -extern "C" void func_01ffe6c4(UnkStruct_ov031_020e5d18_00 *, ActorRef, VecFx32 *, VecFx32 *, s32, VecFx32 *, - UnkStruct_ov031_Items_00_Base *); -extern "C" void func_0200b578(G3d_RenderObject *, void (*)(), unk32, unk32, unk32); +extern VecFx32 data_027e07d4; +extern unk32 data_ov000_020aecf8; +extern VecFx32 data_ov031_02110a10; +extern VecFx32 data_ov031_02110a28; +extern char data_ov031_02110a50; +extern char data_ov031_02110a60; +extern char data_ov031_02110a70; static ActorUnkZLSL_AnimationTag data_ov031_02112be8 = {.index = 0, .name = "bomb_clanim", .unknown = 0}; static PTMF data_ov031_02112c00[ActorBombState_Max] = { @@ -691,7 +680,7 @@ fx32 ActorBomb::func_ov031_020e2820(UnkStruct_ov031_Items_00 *param1) { func_01ffb974(sp3CLength, &sp18, &sp24, &sp24); sp3CLength = FX_F32_TO_FX32(0.0f); } - func_01ffe6c4(&sp60, this->mRef, &sp24, &sp30, (s16) this->mUnk_44, &this->mPos, param1); + func_01ffe6c4(&sp60.mUnk_00, this->mRef, &sp24, &sp30, (s16) this->mUnk_44, &this->mPos, param1); if (!this->Actor::func_ov000_0207e294(this->mUnk_30)) { VecFx32_Copy(&sp24, &sp30); @@ -727,7 +716,7 @@ fx32 ActorBomb::func_ov031_020e295c(UnkStruct_ov031_Items_00 *param1) { func_01ffb974(sp3CLength, &sp18, &sp24, &sp24); sp3CLength = FX_F32_TO_FX32(0.0f); } - func_01ffe6c4(&sp60, this->mRef, &sp24, &sp30, (s16) this->mUnk_44, &this->mPos, param1); + func_01ffe6c4(&sp60.mUnk_00, this->mRef, &sp24, &sp30, (s16) this->mUnk_44, &this->mPos, param1); if (!this->Actor::func_ov000_0207df88(this->mUnk_30, 0x10)) { VecFx32_Copy(&sp24, &sp30); @@ -744,7 +733,7 @@ void ActorBomb::func_ov031_020e2a9c() { VecFx32_Init(FX_F32_TO_FX32(0.0f), FX_F32_TO_FX32(0.0f), FX_F32_TO_FX32(0.0f), &this->mUnk_180.mUnk_0C); - func_01ffe6c4(&s0C, this->mRef, &this->mPos, &this->mPrevPos, (s16) this->mUnk_44, &this->mPos, &this->mUnk_180); + func_01ffe6c4(&s0C.mUnk_00, this->mRef, &this->mPos, &this->mPrevPos, (s16) this->mUnk_44, &this->mPos, &this->mUnk_180); unk32 value = this->func_ov031_020e295c(&this->mUnk_180) | this->func_ov031_020e2820(&this->mUnk_180); if (this->mUnk_1E0.type_index != 0x0) { diff --git a/src/031_Land/Actor/ActorHeart.cpp b/src/031_Land/Actor/ActorHeart.cpp index 8d0f3d23..9a4cdf0d 100644 --- a/src/031_Land/Actor/ActorHeart.cpp +++ b/src/031_Land/Actor/ActorHeart.cpp @@ -1,11 +1,12 @@ #include "Actor/ActorHeart.hpp" +#include "CommonFuncs.hpp" #include "System/Random.hpp" #include "Unknown/UnkStruct_027e09a8.hpp" #include "Unknown/UnkStruct_027e0cd8.hpp" #include "Unknown/UnkStruct_027e0ce0.hpp" #include "nitro/fx.h" -typedef struct { +typedef struct UnkStruct_ov031_020eeee8 { unk16 mUnk_00; unk16 mUnk_02; unk16 mUnk_04; @@ -22,17 +23,6 @@ typedef struct { PAD(0x2A, 0x3C); } UnkStruct_ov031_020eeee8; -extern "C" void func_01ffce1c(unk16 *, unk16 *); -extern "C" int func_01ffcea0(unk32, UnkStruct_ov031_020eeee8 *); -extern "C" void func_01ffedac(Vec2bCpp *, VecFx32 *); -extern "C" void func_01fff17c(UnkStruct_ov031_020eeee8 *, UnkStruct_027e0ce0 *, unk32); -extern "C" void func_02018114(unk16 *, unk16); -extern "C" void func_02098388(void); -extern "C" void func_02097bb8(void); -extern "C" void func_ov000_0205c1f0(unk32 *, unk16); -extern "C" void func_ov000_0205c204(unk32 *, VecFx32 *, unk32, unk32, unk32); -extern "C" void func_ov000_0208bc00(UnkStruct_027e0ce0 *, unk16, unk16 *); - const Cylinder data_ov031_02113d64(0x800); DECL_PROFILE(ActorProfileHeart); @@ -110,7 +100,7 @@ void ActorHeart::Update() { stack.mUnk_04 = 0x666; stack.mUnk_06 = 0xFB33; - func_01fff17c(&stack, data_027e0ce0, 0); + func_01fff17c(&stack.mUnk_00, data_027e0ce0, 0); func_02018114(&stack.mUnk_02, stack.mUnk_00); this->mUnk_C8.mUnk_08 = stack.mUnk_02; // d0 @@ -142,7 +132,7 @@ void ActorHeart::Update() { if (this->mState == ActorHeartState_1) { func_ov000_0208bc00(data_027e0ce0, 0, &stack.mUnk_08); - func_01ffce1c(&stack.mUnk_18, &stack.mUnk_08); + func_01ffce1c((Cylinder *) &stack.mUnk_18, (Cylinder *) &stack.mUnk_08); stack.mUnk_28 += stack.mUnk_14 + (stack.mUnk_14 << 1); stack.mUnk_1C -= stack.mUnk_14; diff --git a/src/031_Land/Actor/ActorItemBoomerang.cpp b/src/031_Land/Actor/ActorItemBoomerang.cpp index 94508478..84438657 100644 --- a/src/031_Land/Actor/ActorItemBoomerang.cpp +++ b/src/031_Land/Actor/ActorItemBoomerang.cpp @@ -1,4 +1,5 @@ #include "Actor/ActorItemBoomerang.hpp" +#include "CommonFuncs.hpp" #include "MapObject/MapObjectManager.hpp" #include "MapObject/MapObjectUnkICEB.hpp" @@ -10,15 +11,6 @@ #include "Unknown/UnkStruct_027e0cec.hpp" #include "Unknown/UnkStruct_027e0d2c.hpp" -extern "C" void func_01ff916c(void *, int, int); -extern "C" void func_01ff93c0(VecFx32 *, unk32); -extern "C" void func_01ff97c8(VecFx32 *, int); -extern "C" void func_01ffb714(VecFx32 *, VecFx32 *, void *); -extern "C" unk32 func_01ffb9cc(VecFx32 *, VecFx32 *); -extern "C" void func_01ffe6c4(Actor **, ActorRef, VecFx32 *, VecFx32 *, s32, VecFx32 *, UnkStruct_ov031_Items_00 *); -extern "C" void func_01ffedac(Vec2bCpp *, VecFx32 *); -extern "C" bool func_ov000_0205aeac(); - DECL_PROFILE(ActorProfileItemBoomerang); Actor *ActorProfileItemBoomerang::Create() { diff --git a/src/031_Land/Actor/ActorItemDrop.cpp b/src/031_Land/Actor/ActorItemDrop.cpp index 8f64e219..0346b511 100644 --- a/src/031_Land/Actor/ActorItemDrop.cpp +++ b/src/031_Land/Actor/ActorItemDrop.cpp @@ -1,4 +1,5 @@ #include "Actor/ActorItemDrop.hpp" +#include "CommonFuncs.hpp" #include "Actor/ActorManager.hpp" #include "System/SysNew.hpp" @@ -10,11 +11,6 @@ #include "nitro/fx.h" #include "versions.h" -extern "C" void func_01ffedac(Vec2bCpp *, VecFx32 *); -extern "C" void func_01fff05c(u32 *, UnkStruct_027e0cd8_0C_Base *, VecFx32 *); -extern "C" void func_ov000_0205c1f0(unk32 *, u16); -extern "C" void func_ov000_0205c204(unk32 *, VecFx32 *, unk32, unk32, unk32); - static const Cylinder data_ov031_02114ba0(0x800); static const u32 data_ov031_02110bc8[] = { diff --git a/src/031_Land/Actor/ActorItemTornado.cpp b/src/031_Land/Actor/ActorItemTornado.cpp index 01798c8b..6e233546 100644 --- a/src/031_Land/Actor/ActorItemTornado.cpp +++ b/src/031_Land/Actor/ActorItemTornado.cpp @@ -1,4 +1,5 @@ #include "Actor/ActorItemTornado.hpp" +#include "CommonFuncs.hpp" #include "System/SysNew.hpp" #include "Unknown/UnkStruct_027e0958.hpp" #include "Unknown/UnkStruct_027e09a8.hpp" @@ -12,19 +13,8 @@ struct UnkStruct_ov031_020e5d18_00 { u8 mUnk_04[0x14]; }; -extern "C" char *data_ov031_02110a88; -extern "C" Cylinder data_ov031_02112fdc; - -extern "C" void func_01ff916c(void *, unk32, unk32); -extern "C" void func_01ff93c0(VecFx32 *, unk32); -extern "C" void func_01ff993c(VecFx32 *, VecFx32 *, unk32); -extern "C" fx32 func_01ffb66c(unk32, u16); -extern "C" void func_01ffe6c4(UnkStruct_ov031_020e5d18_00 *, ActorRef, VecFx32 *, VecFx32 *, s32, VecFx32 *, - UnkStruct_ov031_Items_00 *); -extern "C" void func_0200ea38(G3d_Model *, unk32, unk32); -extern "C" void func_0200ef9c(G3d_Model *); - -extern "C" bool func_ov000_02080998(VecFx32 *); +extern char *data_ov031_02110a88; +extern Cylinder data_ov031_02112fdc; DECL_PROFILE(ActorProfileItemTornado); @@ -199,7 +189,7 @@ void ActorItemTornado::func_ov031_020e5d18(unk32 param1) { } else { UnkStruct_ov031_020e5d18_00 var_sp0C; var_sp0C.mUnk_00 = NULL; - func_01ffe6c4(&var_sp0C, this->mRef, &this->mPos, &this->mPrevPos, (s32) (s16) this->mUnk_44, &this->mPos, + func_01ffe6c4(&var_sp0C.mUnk_00, this->mRef, &this->mPos, &this->mPrevPos, (s32) (s16) this->mUnk_44, &this->mPos, &this->mUnk_174); Actor *actor = var_sp0C.mUnk_00; unk32 temp_r5 = actor->func_ov000_0207df88(this->mUnk_30, 4); diff --git a/src/031_Land/Actor/ActorRollingStone.cpp b/src/031_Land/Actor/ActorRollingStone.cpp index 955cd3ce..05cc4f03 100644 --- a/src/031_Land/Actor/ActorRollingStone.cpp +++ b/src/031_Land/Actor/ActorRollingStone.cpp @@ -1,4 +1,5 @@ #include "Actor/ActorRollingStone.hpp" +#include "CommonFuncs.hpp" #include "Actor/ActorManager.hpp" #include "Physics/Cylinder.hpp" @@ -10,18 +11,13 @@ #include "Unknown/UnkStruct_027e0d38.hpp" #include "Unknown/UnkStruct_027e0d8c.hpp" -extern "C" MtxFx33 data_027e0130; -extern "C" unk32 data_ov000_020aecf8; +extern MtxFx33 data_027e0130; +extern unk32 data_ov000_020aecf8; -extern "C" VecFx32 data_ov031_02110b98; -extern "C" VecFx32 data_ov031_02110ba4; -extern "C" VecFx32 data_ov031_02110bb0; -extern "C" VecFx32 data_ov031_02110bbc; - -extern "C" void func_01ff916c(unk32 *, unk32, unk32); -extern "C" void func_01ffa60c(const MtxFx33 *, MtxFx33 *, MtxFx33 *); -extern "C" unk32 func_01ffb9cc(VecFx32 *, VecFx32 *); -extern "C" unk8 func_02017e8c(unk16 *); +extern VecFx32 data_ov031_02110b98; +extern VecFx32 data_ov031_02110ba4; +extern VecFx32 data_ov031_02110bb0; +extern VecFx32 data_ov031_02110bbc; static PTMF data_ov031_02114aec[0xB] = { &ActorRollingStone::func_ov031_020f89f4, // ActorRollingStoneState_0 diff --git a/src/031_Land/Actor/ActorRupee.cpp b/src/031_Land/Actor/ActorRupee.cpp index 8e2cc372..b6d8ca57 100644 --- a/src/031_Land/Actor/ActorRupee.cpp +++ b/src/031_Land/Actor/ActorRupee.cpp @@ -1,4 +1,5 @@ #include "Actor/ActorRupee.hpp" +#include "CommonFuncs.hpp" #include "System/Random.hpp" #include "Unknown/UnkStruct_027e09a8.hpp" #include "Unknown/UnkStruct_027e09b8.hpp" @@ -40,13 +41,6 @@ static PTMF data_ov031_02113520[0xD] = { &ActorRupee::func_ov031_020e9838, // ActorRupeeState_12 }; -extern "C" void func_01ffedac(u16 *, VecFx32 *); -extern "C" void func_01fff05c(u32 *, UnkStruct_027e0cd8_0C_Base *, VecFx32 *); -extern "C" unk32 func_02017158(); -extern "C" void func_ov031_0210acd4(u8); -extern "C" unk32 func_ov031_0210af50(u16, unk32 *); -extern void func_ov031_0210b0e4(u16, unk32); - extern Cylinder data_ov031_02113478; DECL_PROFILE(ActorProfileRupee); @@ -468,9 +462,8 @@ void ActorRupee::func_ov031_020e9638() { this->mPos.y -= FX_F32_TO_FX32(1.2); } -// non-matching void ActorRupee::func_ov031_020e96bc() { - u16 sp0; + Vec2bCpp sp0; func_01ffedac(&sp0, &this->mPos); @@ -490,9 +483,8 @@ void ActorRupee::func_ov031_020e970c() { this->mTimer.Reset(); } -// non-matching void ActorRupee::func_ov031_020e9740() { - u16 sp0; + Vec2bCpp sp0; unk32 sp4; unk32 *psp4; s32 temp_r2; @@ -522,7 +514,7 @@ void ActorRupee::func_ov031_020e9740() { // non-matching void ActorRupee::func_ov031_020e9838() { - u16 sp2; + Vec2bCpp sp2; func_01ffedac(&sp2, &this->mPos); this->mUnk_C4.mUnk_04 = 1; @@ -532,9 +524,8 @@ void ActorRupee::func_ov031_020e9838() { data_027e0cec->func_ov000_020a0110(&this->mUnk_F0); } -// non-matching void ActorRupee::func_ov031_020e98c4() { - u16 sp0; + Vec2bCpp sp0; func_01ffedac(&sp0, &this->mPos); func_ov031_0210b0e4(sp0, 1); @@ -548,9 +539,6 @@ void ActorRupee::SetState(ActorState state) { CALL_PTMF(PTMF, data_ov031_02113520[this->mState]); } -extern "C" void func_01fff17c(unk16 *, UnkStruct_027e0ce0 *, unk32); -extern "C" void func_02018114(unk16 *, unk32); - // non-matching void ActorRupee::Update() { short sVar1; @@ -564,8 +552,8 @@ void ActorRupee::Update() { unk16 uStack_18; unk16 uStack_1a; short sStack_1c; - u16 uStack_1e; - u16 uStack_20; + Vec2bCpp uStack_1e; + Vec2bCpp uStack_20; VecFx32 test; uStack_1a = 0; @@ -680,10 +668,8 @@ void ActorRupee::func_ov031_020e9be8() { } } -extern "C" void func_ov000_0205c1f0(unk32 *, unk16); extern unk32 data_ov031_02110aa0[]; extern unk32 data_ov031_02113468[]; -extern "C" void func_ov000_0205c204(unk32 *, VecFx32 *, unk32, unk32, unk32); // non-matching void ActorRupee::vfunc_2C(Actor_vfunc_30 *param1) { diff --git a/src/031_Land/Actor/ActorShotArrow.cpp b/src/031_Land/Actor/ActorShotArrow.cpp index 545c95f0..64ccc0be 100644 --- a/src/031_Land/Actor/ActorShotArrow.cpp +++ b/src/031_Land/Actor/ActorShotArrow.cpp @@ -1,4 +1,5 @@ #include "Actor/ActorShotArrow.hpp" +#include "CommonFuncs.hpp" #include "Actor/ActorManager.hpp" #include "Actor/ActorUnkGYAM.hpp" @@ -72,12 +73,12 @@ struct UnkStruct_020f1b04 { /* 24 */ }; -extern "C" u8 data_ov031_02110b01[]; // = {0x08, 0x02, 0x02, 0x0C, 0x04, 0x00}; -extern "C" char data_ov031_02110b3c[0x10]; // = "arrow"; -extern "C" char data_ov031_02110b4c[0x10]; // = "arrow_s"; +extern u8 data_ov031_02110b01[]; // = {0x08, 0x02, 0x02, 0x0C, 0x04, 0x00}; +extern char data_ov031_02110b3c[0x10]; // = "arrow"; +extern char data_ov031_02110b4c[0x10]; // = "arrow_s"; -extern "C" char data_ov031_02110b5c[0x14]; // = "ef_arrowB"; -extern "C" char data_ov031_02110b08[0x34]; // = "ef_arrowB"; +extern char data_ov031_02110b5c[0x14]; // = "ef_arrowB"; +extern char data_ov031_02110b08[0x34]; // = "ef_arrowB"; extern MtxFx43 data_027e0964; extern ActorUnkIWTS *data_027e0d80; @@ -85,28 +86,6 @@ extern bool data_ov060_02163fe0; extern UnkStruct_ov060_02163ff4 data_ov060_02163ff4; extern ActorUnkMRD2 *data_ov075_02163518; -extern "C" unk32 func_01ff9258(fx32, fx32); -extern "C" void func_01ff93c0(VecFx32 *, unk32); -extern "C" void func_01ff94cc(VecFx32 *, VecFx32 *, VecFx32 *); -extern "C" void func_01ff95a0(VecFx32 *, unk16); -extern "C" void func_01ff9638(VecFx32 *vec, s16 angle); -extern "C" void func_01ffa7a0(VecFx32 *, MtxFx33 *, VecFx32 *); -extern "C" void func_01ffa9e8(MtxFx43 *, MtxFx43 *); -extern "C" void func_01ffad5c(MtxFx43 *, MtxFx43 *, MtxFx43 *); -extern "C" void func_01ffb714(VecFx32 *, VecFx32 *, VecFx32 *); -extern "C" fx16 func_01ffbbe0(fx32, fx32); -extern "C" bool func_01ffccf4(Cylinder *, VecFx32 *, VecFx32 *, unk32 *); -extern "C" void func_01ffe6c4(Actor **, ActorRef, VecFx32 *, VecFx32 *, s32, VecFx32 *, unk32); -extern "C" void func_0200eab0(G3d_Model *, unk16, u8); -extern "C" UnkResourceStruct2 *func_0200f05c(G3d_NameList *, char *); -extern "C" bool func_ov000_0205aeac(); -extern "C" void func_ov000_0207b6c0(); -extern "C" unk32 func_ov000_0207df88(unk32 *, Cylinder *, unk32); -extern "C" void func_ov075_02160864(ActorShotArrow *, unk32); -extern "C" void GX_func_02024a84(MtxFx33 *param1); -extern "C" void CopySingle288(MtxFx43 *, MtxFx33 *); -extern "C" void func_01ffa60c(const MtxFx33 *, MtxFx33 *, MtxFx33 *); - MapObjectProfile_Derived2_20_Base *func_ov031_020f1404() { return data_027e0ce0->mUnk_1C->mUnk_08[PlayerCharacter_Link][1]; } diff --git a/src/031_Land/Actor/ActorUnkATTG.cpp b/src/031_Land/Actor/ActorUnkATTG.cpp index 3fb4a450..568738d4 100644 --- a/src/031_Land/Actor/ActorUnkATTG.cpp +++ b/src/031_Land/Actor/ActorUnkATTG.cpp @@ -1,11 +1,10 @@ #include "Actor/ActorUnkATTG.hpp" +#include "CommonFuncs.hpp" #include "System/SysNew.hpp" #include "Unknown/UnkStruct_027e09b8.hpp" #include "Unknown/UnkStruct_027e0cd8.hpp" #include "Unknown/UnkStruct_ov000_020b5214.hpp" -extern "C" void func_ov000_02072fd0(UnkStackStruct1 *); - DECL_PROFILE(ActorProfileUnkATTG); Actor *ActorProfileUnkATTG::Create() { diff --git a/src/031_Land/Actor/ActorUnkEFSB.cpp b/src/031_Land/Actor/ActorUnkEFSB.cpp index 875ef0c5..1d695b0d 100644 --- a/src/031_Land/Actor/ActorUnkEFSB.cpp +++ b/src/031_Land/Actor/ActorUnkEFSB.cpp @@ -1,8 +1,7 @@ #include "Actor/ActorUnkEFSB.hpp" +#include "CommonFuncs.hpp" #include "System/SysNew.hpp" -extern "C" unk32 func_01ffb428(unk32, unk32); - static ActorUnkZLSL_AnimationTag data_ov031_02114ed0[0x2] = { {.index = 0x0, .name = "statue_beam"}, {.index = 0x1, .name = "statue_beam"}, diff --git a/src/031_Land/Actor/ActorUnkFLEN.cpp b/src/031_Land/Actor/ActorUnkFLEN.cpp index 76a106f7..f830b168 100644 --- a/src/031_Land/Actor/ActorUnkFLEN.cpp +++ b/src/031_Land/Actor/ActorUnkFLEN.cpp @@ -1,8 +1,9 @@ #include "Actor/ActorUnkFLEN.hpp" +#include "CommonFuncs.hpp" #include "System/SysNew.hpp" -extern "C" u16 data_ov031_02110b90[]; -extern "C" ActorId data_ov031_02110b94[]; +extern u16 data_ov031_02110b90[]; +extern ActorId data_ov031_02110b94[]; DECL_PROFILE(ActorProfileUnkFLEN); diff --git a/src/031_Land/Actor/ActorUnkMLCK.cpp b/src/031_Land/Actor/ActorUnkMLCK.cpp index 75fa1998..8868dc42 100644 --- a/src/031_Land/Actor/ActorUnkMLCK.cpp +++ b/src/031_Land/Actor/ActorUnkMLCK.cpp @@ -1,4 +1,5 @@ #include "Actor/ActorUnkMLCK.hpp" +#include "CommonFuncs.hpp" #include "Actor/ActorManager.hpp" #include "MainGame/AdventureMode.hpp" @@ -12,7 +13,7 @@ #include "Unknown/UnkStruct_ov000_020b52e8.hpp" #include "nitro/math.h" -extern "C" unk32 data_ov031_02110bec[]; +extern unk32 data_ov031_02110bec[]; struct UnkStruct_ov031_02114d28 { /* 00 */ u32 mUnk_00; diff --git a/src/031_Land/Actor/ActorUnkNFSP.cpp b/src/031_Land/Actor/ActorUnkNFSP.cpp index bee0611f..b994909a 100644 --- a/src/031_Land/Actor/ActorUnkNFSP.cpp +++ b/src/031_Land/Actor/ActorUnkNFSP.cpp @@ -1,4 +1,5 @@ #include "Actor/ActorUnkNFSP.hpp" +#include "CommonFuncs.hpp" #include "Actor/ActorManager.hpp" #include "MapObject/MapObjectUnkSWFS.hpp" @@ -21,8 +22,6 @@ public: /* F4 */ }; -extern "C" void func_01ff993c(VecFx32 *, VecFx32 *, unk32); - DECL_PROFILE(ActorProfileUnkNFSP); Actor *ActorProfileUnkNFSP::Create() { diff --git a/src/031_Land/Actor/ActorUnkNORE.cpp b/src/031_Land/Actor/ActorUnkNORE.cpp index 07151edb..5a237458 100644 --- a/src/031_Land/Actor/ActorUnkNORE.cpp +++ b/src/031_Land/Actor/ActorUnkNORE.cpp @@ -1,10 +1,9 @@ #include "Actor/ActorUnkNORE.hpp" +#include "CommonFuncs.hpp" #include "System/SysNew.hpp" #include "Unknown/UnkStruct_027e0cd8.hpp" -extern "C" void func_01ffedac(Vec2bCpp *, VecFx32 *); - DECL_PROFILE(ActorProfileUnkNORE); Actor *ActorProfileUnkNORE::Create() { diff --git a/src/031_Land/Actor/ActorUnkRMTG.cpp b/src/031_Land/Actor/ActorUnkRMTG.cpp index e92b7c78..bec0e5d1 100644 --- a/src/031_Land/Actor/ActorUnkRMTG.cpp +++ b/src/031_Land/Actor/ActorUnkRMTG.cpp @@ -1,11 +1,10 @@ #include "Actor/ActorUnkRMTG.hpp" +#include "CommonFuncs.hpp" #include "System/SysNew.hpp" #include "Unknown/UnkStruct_027e09bc.hpp" #include "Unknown/UnkStruct_027e0cd8.hpp" -extern "C" const char data_ov031_02110ad0; - -extern "C" void func_01ffedac(Vec2bCpp *, VecFx32 *); +extern const char data_ov031_02110ad0; DECL_PROFILE(ActorProfileUnkRMTG); diff --git a/src/031_Land/Actor/ActorUnkROCK.cpp b/src/031_Land/Actor/ActorUnkROCK.cpp index 70c2e3a7..3da5f842 100644 --- a/src/031_Land/Actor/ActorUnkROCK.cpp +++ b/src/031_Land/Actor/ActorUnkROCK.cpp @@ -1,4 +1,5 @@ #include "Actor/ActorUnkROCK.hpp" +#include "CommonFuncs.hpp" #include "MapObject/MapObject_10_Pot.hpp" #include "System/SysNew.hpp" @@ -6,7 +7,7 @@ #include "Unknown/UnkStruct_027e09b4.hpp" #include "Unknown/UnkStruct_027e09c0.hpp" -extern "C" MtxFx33 data_027e0130; +extern MtxFx33 data_027e0130; static MapObject_10_Pot data_ov031_021166b8; diff --git a/src/031_Land/Actor/ActorUnkSCCN.cpp b/src/031_Land/Actor/ActorUnkSCCN.cpp index 670f4f5d..3481f279 100644 --- a/src/031_Land/Actor/ActorUnkSCCN.cpp +++ b/src/031_Land/Actor/ActorUnkSCCN.cpp @@ -1,10 +1,9 @@ #include "Actor/ActorUnkSCCN.hpp" +#include "CommonFuncs.hpp" #include "System/SysNew.hpp" #include "Unknown/UnkStruct_027e09c0.hpp" #include "Unknown/UnkStruct_027e0cd8.hpp" -extern "C" void func_01ffd054(VecFx32 *, VecFx32 *); - DECL_PROFILE(ActorProfileUnkSCCN); Actor *ActorProfileUnkSCCN::Create() { diff --git a/src/031_Land/Actor/ActorUnkSKDO.cpp b/src/031_Land/Actor/ActorUnkSKDO.cpp index 76cd47be..21f0c942 100644 --- a/src/031_Land/Actor/ActorUnkSKDO.cpp +++ b/src/031_Land/Actor/ActorUnkSKDO.cpp @@ -1,12 +1,11 @@ #include "Actor/ActorUnkSKDO.hpp" +#include "CommonFuncs.hpp" #include "Map/MapObjectId.hpp" #include "MapObject/MapObjectManager.hpp" #include "System/SysNew.hpp" #include "Unknown/UnkStruct_ov000_020b34c4.hpp" -extern "C" fx32 func_01ffb9cc(VecFx32 *, VecFx32 *); - DECL_PROFILE(ActorProfileUnkSKDO); Actor *ActorProfileUnkSKDO::Create() { diff --git a/src/031_Land/Actor/ActorUnkSWBM.cpp b/src/031_Land/Actor/ActorUnkSWBM.cpp index 2e6684ab..1f2507b0 100644 --- a/src/031_Land/Actor/ActorUnkSWBM.cpp +++ b/src/031_Land/Actor/ActorUnkSWBM.cpp @@ -1,4 +1,5 @@ #include "Actor/ActorUnkSWBM.hpp" +#include "CommonFuncs.hpp" #include "System/SysNew.hpp" #include "Unknown/UnkStruct_027e0958.hpp" #include "Unknown/UnkStruct_027e095c.hpp" @@ -13,12 +14,6 @@ struct UnkStruct_ov031_020e5d18_00 { u8 mUnk_04[0x14]; }; -extern "C" void func_01ffe6c4(Actor **, ActorRef, VecFx32 *, VecFx32 *, s32, VecFx32 *, UnkStruct_ov031_Items_00_Base *); -extern "C" bool func_ov000_02080998(VecFx32 *); - -extern "C" void /*GX_*/ func_02024a84(MtxFx33 *param1); -extern "C" void FlushGfxQueue(); - static const Cylinder data_ov031_02113114(FX_F32_TO_FX32(0.0f), FX_F32_TO_FX32(0.0f), FX_F32_TO_FX32(0.0f), FX_F32_TO_FX32(0.35f)); diff --git a/src/031_Land/Actor/ActorUnkTGTZ.cpp b/src/031_Land/Actor/ActorUnkTGTZ.cpp index 7551f38d..15deddac 100644 --- a/src/031_Land/Actor/ActorUnkTGTZ.cpp +++ b/src/031_Land/Actor/ActorUnkTGTZ.cpp @@ -1,4 +1,5 @@ #include "Actor/ActorUnkTGTZ.hpp" +#include "CommonFuncs.hpp" #include "Actor/ActorManager.hpp" #include "Actor/ActorUnkNTTZ.hpp" @@ -8,11 +9,6 @@ #include "Unknown/UnkStruct_027e09a8.hpp" #include "Unknown/UnkStruct_027e09b8.hpp" -extern "C" bool func_01ff916c(void *, int, int); -extern "C" void func_01ff9638(VecFx32 *, s16); -extern "C" void func_01ffa7a0(VecFx32 *, MtxFx33 *, VecFx32 *); -extern "C" void func_ov000_02072fd0(UnkStackStruct1 *); - #if IS_JP static const VecFx32Cpp data_ov031_02116344(FX_F32_TO_FX32(1.5f), FX_F32_TO_FX32(2.0f), FX_F32_TO_FX32(0.0f)); #else diff --git a/src/031_Land/Actor/ActorUnkTLKT.cpp b/src/031_Land/Actor/ActorUnkTLKT.cpp index a3432b8d..3d853d7e 100644 --- a/src/031_Land/Actor/ActorUnkTLKT.cpp +++ b/src/031_Land/Actor/ActorUnkTLKT.cpp @@ -1,4 +1,5 @@ #include "Actor/ActorUnkTLKT.hpp" +#include "CommonFuncs.hpp" #include "Actor/Actor_Derived1.hpp" #include "System/SysNew.hpp" @@ -6,9 +7,6 @@ #include "Unknown/UnkStruct_027e0ce0.hpp" #include "Unknown/UnkStruct_027e0d34.hpp" -extern "C" void func_ov000_02072fd0(UnkStackStruct1 *param0); -extern "C" unk16 func_ov031_020e3dd0(Actor *param0); - DECL_PROFILE(ActorProfileUnkTLKT); Actor *ActorProfileUnkTLKT::Create() { diff --git a/src/031_Land/Actor/ActorUnkZLSL_ZSRS.cpp b/src/031_Land/Actor/ActorUnkZLSL_ZSRS.cpp index 7850b885..f2bcff58 100644 --- a/src/031_Land/Actor/ActorUnkZLSL_ZSRS.cpp +++ b/src/031_Land/Actor/ActorUnkZLSL_ZSRS.cpp @@ -1,4 +1,5 @@ #include "Actor/ActorUnkZLSL_ZSRS.hpp" +#include "CommonFuncs.hpp" #include "Actor/ActorManager.hpp" #include "Actor/ActorUnkFTRN.hpp" @@ -18,27 +19,8 @@ #include "Unknown/UnkStruct_ov000_020b51b8.hpp" #include "Unknown/UnkStruct_ov024_020d8660.hpp" -extern "C" UnkActorSystem1_Derived1 data_ov060_02163ff4; -extern "C" const char *data_ov031_02110acc; // 3\x13\x00\x00 - -extern "C" void func_01ff916c(void *, int, int); -extern "C" unk32 func_01ff9258(fx32, fx32); -extern "C" unk32 func_01ff930c(s16 *, s16, unk32); -extern "C" void func_01ff9318(void *, unk32, unk32); -extern "C" void func_01ff9364(s16 *, UnkAngleStruct); -extern "C" void func_01ff93c0(VecFx32 *, unk32); -extern "C" void func_01ffb714(VecFx32 *, VecFx32 *, VecFx32 *); -extern "C" fx16 func_01ffbbe0(fx32, fx32); -extern "C" void func_01ffe6c4(Actor **, ActorRef, VecFx32 *, VecFx32 *, s32, VecFx32 *, UnkStruct_ov031_Items_00 *); -extern "C" void func_01fff17c(unk16 *, UnkStruct_027e0ce0 *, unk32); -extern "C" void func_02015300(unk32 *); -extern "C" unk16 func_02016958(VecFx32 *, VecFx32 *); -extern "C" void func_020169d4(VecFx32 *, VecFx32 *, unk16 *, const char *); -extern "C" bool func_02016c68(VecFx32 *, VecFx32 *, ActorRef); -extern "C" Actor *func_02016fbc(ActorId, VecFx32 *, unk32); - -extern "C" void func_ov000_020578a4(UnkSystem5 *); -extern "C" void func_ov000_02057c98(ModelRender *, UnkSystem5 *); +extern UnkActorSystem1_Derived1 data_ov060_02163ff4; +extern const char *data_ov031_02110acc; // 3\x13\x00\x00 static char data_ov031_021135f0[0x4] = "\x00 "; static char data_ov031_021135f4[0x4] = "3\x03"; @@ -155,7 +137,7 @@ ActorUnkZLSL::ActorUnkZLSL() : mUnk_276C(NULL), mUnk_27CC(0, 0, 0) {} -void func_ov031_020ea100() {} +void ActorUnkZLSL::func_ov031_020ea100() {} bool UnkStruct_ov031_0211361c::vfunc_00(Actor *pActor) { if (pActor != NULL && pActor->GetActorId() == ActorId_RAT0 && pActor->mState == ActorUnkRAT0State_0 && @@ -500,7 +482,7 @@ void ActorUnkZLSL::func_ov031_020eb218() { // non-matching bool ActorUnkZLSL::func_ov031_020eb2b0(VecFx32 *param1, unk32 param2) { - func_01ff916c(&this->mUnk_27CC.mUnk_1C, param1->y, 0xCD); + func_01ff916c(&this->mUnk_2878.y, param1->y, 0xCD); unk16 res = func_02016958(&this->mPos, param1); func_01ff930c(&this->mAngle.angle_s, res, 0x71C); @@ -508,7 +490,7 @@ bool ActorUnkZLSL::func_ov031_020eb2b0(VecFx32 *param1, unk32 param2) { vec.y += 0x800; if (!this->mUnk_2874) { if (this->mUnk_094.mUnk_0C->vfunc_10()->mUnk_0C < 0xA000) { - func_01ff916c(&this->mUnk_27CC.mUnk_1C, 0xCD - 0x400, 0xCD + 0xCD); + func_01ff916c(&this->mUnk_2878.y, 0xCD - 0x400, 0xCD + 0xCD); } } } @@ -1087,7 +1069,7 @@ bool ActorUnkZLSL::func_ov031_020ec8c4() { } if (this->mUnk_0B0 & 0x2) { - func_01ff9364(&this->mAngle.angle_s, angleStruct); + func_01ff9364(&this->mAngle.angle_u, angleStruct); s16 angle = angleStruct.angle_s - this->mAngle.angle_s; if (ABS(angle) < 0x2000) { @@ -1167,9 +1149,6 @@ void ActorUnkZLSL::func_ov031_020ecbe0() { this->mPrevPos.z = this->mPos.z; } -extern "C" void func_ov000_02072fd0(UnkStackStruct1 *); -extern "C" unk32 func_01ffb9cc(VecFx32 *, VecFx32 *); - class ActorUnkZLSL_020ecc68 : public Actor { public: /* 000 (base) */ diff --git a/src/031_Land/MapObject/MapObjectBombFlower.cpp b/src/031_Land/MapObject/MapObjectBombFlower.cpp index 236a2fe9..aca71b3d 100644 --- a/src/031_Land/MapObject/MapObjectBombFlower.cpp +++ b/src/031_Land/MapObject/MapObjectBombFlower.cpp @@ -1,4 +1,5 @@ #include "MapObject/MapObjectBombFlower.hpp" +#include "CommonFuncs.hpp" #include "Actor/ActorBomb.hpp" #include "Actor/ActorManager.hpp" @@ -7,10 +8,6 @@ #include "Unknown/UnkStruct_027e0d38.hpp" #include "profile.hpp" -extern "C" fx32 func_01ffb464(fx32); -extern "C" void func_01ff9218(fx32 *, fx32, fx32); -extern "C" void func_ov031_020e0f30(ActorRef); - struct UnkStruct_ov031_02102728 { ActorRef ref; unk32 mUnk_04; diff --git a/src/031_Land/MapObject/MapObjectChestBase.cpp b/src/031_Land/MapObject/MapObjectChestBase.cpp index 48e0973b..df496634 100644 --- a/src/031_Land/MapObject/MapObjectChestBase.cpp +++ b/src/031_Land/MapObject/MapObjectChestBase.cpp @@ -1,4 +1,5 @@ #include "MapObject/MapObjectChestBase.hpp" +#include "CommonFuncs.hpp" #include "MapObject/MapObjectManager.hpp" #include "Unknown/UnkStruct_027e09a8.hpp" @@ -8,11 +9,6 @@ #pragma readonly_strings on -extern "C" unk32 func_0200f218(unk32, const char *); -extern "C" void func_0200b58c(G3d_RenderObject *); -extern "C" void func_01ffb714(VecFx32 *, VecFx32 *, void *); -extern "C" void func_01ffcfcc(VecFx32 *, VecFx32 *, VecFx32 *); - struct UnkStruct_ov031_02117c84 { u16 mUnk_00; diff --git a/src/031_Land/MapObject/MapObjectDoorBase.cpp b/src/031_Land/MapObject/MapObjectDoorBase.cpp index 353d3f1d..f5f40e39 100644 --- a/src/031_Land/MapObject/MapObjectDoorBase.cpp +++ b/src/031_Land/MapObject/MapObjectDoorBase.cpp @@ -1,3 +1,4 @@ +#include "CommonFuncs.hpp" #define DOORBASE_DTOR_NOINLINE #include "MapObject/MapObjectDoorBase.hpp" @@ -10,10 +11,6 @@ #include -extern "C" unk32 func_01ffb464(unk32 param1); -extern "C" void func_01ff9218(void *, unk32, unk32); -extern "C" unk32 func_01ffb428(unk32, unk32); - class UnkStruct_ov031_02117210 { public: /* 00 */ MapObject_10_SCCN mUnk_00[3]; @@ -532,7 +529,6 @@ struct stack_struct { /* 08 */ }; -extern "C" void func_01ff9fbc(MtxFx22 *, unk32, MtxFx22 *); extern fx16 data_0203f964[]; void MapObjectDoorBase::func_ov031_020fcb78(s8 *param1) { diff --git a/src/031_Land/MapObject/MapObjectDoorClick.cpp b/src/031_Land/MapObject/MapObjectDoorClick.cpp index bc2bdfc0..e534e2c1 100644 --- a/src/031_Land/MapObject/MapObjectDoorClick.cpp +++ b/src/031_Land/MapObject/MapObjectDoorClick.cpp @@ -1,16 +1,10 @@ #include "MapObject/MapObjectDoorClick.hpp" +#include "CommonFuncs.hpp" #include "System/SysNew.hpp" #include "Unknown/UnkStruct_027e09a8.hpp" #include "Unknown/UnkStruct_027e09b8.hpp" #include "Unknown/UnkStruct_027e0cec.hpp" -extern "C" f32 func_02039f04(unk32); -extern "C" void func_01ffaf74(VecFx32 *, MtxFx43 *, VecFx32 *); -extern "C" void func_01ffcfcc(VecFx32 *, VecFx32 *, VecFx32 *); -extern "C" unk32 func_01ffb428(unk32, unk32); -extern "C" unk32 func_01ffb464(unk32 param1); -extern "C" void func_01ff9218(void *, unk32, unk32); - static const u32 data_ov031_02110c1c[] = { 'DRCG', 'DRCG', diff --git a/src/031_Land/MapObject/MapObjectDoorDangerSpawn.cpp b/src/031_Land/MapObject/MapObjectDoorDangerSpawn.cpp index 02d23c52..ebc625c3 100644 --- a/src/031_Land/MapObject/MapObjectDoorDangerSpawn.cpp +++ b/src/031_Land/MapObject/MapObjectDoorDangerSpawn.cpp @@ -1,5 +1,6 @@ #include "MapObject/MapObjectDoorDangerSpawn.hpp" #include "Actor/ActorManager.hpp" +#include "CommonFuncs.hpp" #include "MapObject/MapObjectManager.hpp" #include "System/SysNew.hpp" #include "Unknown/UnkStruct_027e09a8.hpp" @@ -14,9 +15,6 @@ #include "Unknown/UnkStruct_ov000_020b51b8.hpp" #include "versions.h" -extern "C" unk32 func_01ffb428(unk32, unk32); -extern "C" void func_01ffaf74(VecFx32 *, MtxFx43 *, VecFx32 *); -extern "C" void func_01ff93c0(VecFx32 *, fx32); extern unk32 data_ov031_02110c00[]; const UnkStruct_ov031_021150b0 data_ov031_021150b0(0x1E66); diff --git a/src/031_Land/MapObject/MapObjectDoorKey.cpp b/src/031_Land/MapObject/MapObjectDoorKey.cpp index 75f5d404..e09d924a 100644 --- a/src/031_Land/MapObject/MapObjectDoorKey.cpp +++ b/src/031_Land/MapObject/MapObjectDoorKey.cpp @@ -1,12 +1,10 @@ #include "MapObject/MapObjectDoorKey.hpp" +#include "CommonFuncs.hpp" #include "System/SysNew.hpp" #include "Unknown/UnkStruct_027e09a8.hpp" #include "Unknown/UnkStruct_027e0ce0.hpp" #include "Unknown/UnkStruct_027e0cec.hpp" -extern "C" f32 func_02039f04(unk32); -extern "C" void func_01ffaf74(VecFx32 *, MtxFx43 *, VecFx32 *); - const UnkStruct_ov031_021150b0 data_ov031_02115184(0x1E66); DECL_PROFILE(MapObjectProfileDoorKey); diff --git a/src/031_Land/MapObject/MapObjectDoorSwitch.cpp b/src/031_Land/MapObject/MapObjectDoorSwitch.cpp index 75b8f9ab..4d0d9452 100644 --- a/src/031_Land/MapObject/MapObjectDoorSwitch.cpp +++ b/src/031_Land/MapObject/MapObjectDoorSwitch.cpp @@ -1,14 +1,11 @@ #include "MapObject/MapObjectDoorSwitch.hpp" +#include "CommonFuncs.hpp" #include "System/SysNew.hpp" #include "Unknown/UnkStruct_027e09a8.hpp" #include "Unknown/UnkStruct_027e09b8.hpp" #include "Unknown/UnkStruct_027e0cec.hpp" #include "versions.h" -extern "C" void func_01ffaf74(VecFx32 *, MtxFx43 *, VecFx32 *); -extern "C" fx32 func_01ffb464(fx32); -extern "C" void func_01ff9218(fx32 *, fx32, fx32); - const UnkStruct_ov031_021150b0 data_ov031_02115254(0x1E66); DECL_PROFILE(MapObjectProfileDoorSwitch); diff --git a/src/031_Land/MapObject/MapObjectPot.cpp b/src/031_Land/MapObject/MapObjectPot.cpp index 049e0a66..88a05c1c 100644 --- a/src/031_Land/MapObject/MapObjectPot.cpp +++ b/src/031_Land/MapObject/MapObjectPot.cpp @@ -1,4 +1,5 @@ #include "MapObject/MapObjectPot.hpp" +#include "CommonFuncs.hpp" #include "Actor/ActorId.hpp" #include "Actor/ActorManager.hpp" @@ -10,10 +11,7 @@ #include "limits.h" #include "profile.hpp" -extern "C" MapObject_10_Pot data_ov031_02118010; - -extern "C" fx32 func_01ffe868(VecFx32 *, unk32, unk32); -extern "C" void func_ov031_020e0f30(ActorRef); +extern MapObject_10_Pot data_ov031_02118010; DECL_PROFILE(MapObjectProfilePot); diff --git a/src/031_Land/MapObject/MapObjectUnkSWHT.cpp b/src/031_Land/MapObject/MapObjectUnkSWHT.cpp index 698ca18c..51ce49e1 100644 --- a/src/031_Land/MapObject/MapObjectUnkSWHT.cpp +++ b/src/031_Land/MapObject/MapObjectUnkSWHT.cpp @@ -1,4 +1,5 @@ #include "MapObject/MapObjectUnkSWHT.hpp" +#include "CommonFuncs.hpp" #include "Actor/Actor.hpp" #include "Actor/ActorManager.hpp" @@ -11,8 +12,6 @@ extern const char data_ov031_02110ce0; -extern "C" void func_ov031_020e0f30(ActorRef); - DECL_PROFILE(MapObjectProfileUnkSWHT); // awful sinit: should not have constructors diff --git a/src/032_MapA1/Actor/ActorFleeingSpinut.cpp b/src/032_MapA1/Actor/ActorFleeingSpinut.cpp index 4b1958da..f20bf3c6 100644 --- a/src/032_MapA1/Actor/ActorFleeingSpinut.cpp +++ b/src/032_MapA1/Actor/ActorFleeingSpinut.cpp @@ -1,4 +1,5 @@ #include "Actor/ActorFleeingSpinut.hpp" +#include "CommonFuncs.hpp" #include "Actor/ActorUnkKEYN.hpp" #include "System/SysNew.hpp" @@ -9,15 +10,7 @@ #include "Unknown/UnkStruct_027e0cd8.hpp" #include "Unknown/UnkStruct_027e0cec.hpp" -extern "C" unk32 data_ov000_020aecf8; - -extern "C" bool func_01ff916c(void *, int, int); -extern "C" void func_01ff9318(void *, unk32, unk32); -extern "C" fx32 func_01ffb428(unk32, unk32); -extern "C" fx32 func_01ffb464(fx32); - -extern "C" bool func_ov000_0205adfc(VecFx32 *, VecFx32 *); -extern "C" void func_ov000_020986b4(s16 *param1, Actor_Derived2 *param2, unk32 param3); +extern unk32 data_ov000_020aecf8; struct UnkStruct_ov032_02122908 { /* 00 */ unk32 mUnk_00; @@ -600,12 +593,6 @@ UnkStruct_027e0960_TableEntry_04 *ActorFleeingSpinut_1EC::func_ov032_0211cd20(Ve return tEntry->mTable.GetPtr(0x1); } -extern "C" void func_01ffb714(VecFx32 *, VecFx32 *, void *); -extern "C" fx16 func_01ffbbe0(fx32, fx32); -extern "C" unk32 func_01ff930c(s16 *, s16, unk32, s16); -extern "C" unk32 func_01ff9258(fx32, fx32); -extern "C" fx32 func_02017f54(s16 *, UnkAngleStruct); - // non-matching u16 *ActorFleeingSpinut_1EC::func_ov032_0211cd60(VecFx32 *param1, s16 *param2, VecFx32 *param3, unk32 param4, unk32 param5, unk32 param6) { @@ -639,7 +626,7 @@ u16 *ActorFleeingSpinut_1EC::func_ov032_0211cd60(VecFx32 *param1, s16 *param2, V fx16 sp00 = (fx32) func_01ffbbe0(sp10.x, sp10.z); - func_01ff930c(param2, sp00, param5, sp00); + func_01ff930c(param2, sp00, param5); func_01ff9258(sp1C.x - param1->x, sp1C.z - param1->z); @@ -658,8 +645,6 @@ void ActorFleeingSpinut_1EC::func_ov032_0211cf74() { this->func_ov032_0211cfac(0x1); } -extern "C" bool func_02017930(UnkStruct_027e0960_TableEntry_04_Base *, UnkStruct_027e0960_TableEntry_04_Base *); - // non-matching void ActorFleeingSpinut_1EC::func_ov032_0211cfac(unk32 param1) { VecFx32 sp00; diff --git a/src/032_MapA1/Actor/ActorKeese.cpp b/src/032_MapA1/Actor/ActorKeese.cpp index bc3bf859..ea7c49dc 100644 --- a/src/032_MapA1/Actor/ActorKeese.cpp +++ b/src/032_MapA1/Actor/ActorKeese.cpp @@ -1,4 +1,5 @@ #include "Actor/ActorKeese.hpp" +#include "CommonFuncs.hpp" #include "Actor/ActorManager.hpp" #include "Map/MapObjectId.hpp" @@ -10,20 +11,12 @@ #include "Unknown/UnkStruct_027e0cd8.hpp" #include "Unknown/UnkStruct_027e0cec.hpp" -extern "C" u16 data_ov000_020aecf0[]; -extern "C" u16 data_ov000_020aecf4[]; -extern "C" unk32 data_ov000_020aecf8; -extern "C" unk32 data_ov000_020aecfc[]; +extern u16 data_ov000_020aecf0[]; +extern u16 data_ov000_020aecf4[]; +extern unk32 data_ov000_020aecf8; +extern unk32 data_ov000_020aecfc[]; -extern "C" void *data_ov032_02121ed4; - -extern "C" bool func_01ff916c(fx32 *, unk32, unk32); -extern "C" unk32 func_01ff9258(fx32, fx32); -extern "C" fx16 func_01ffbbe0(fx32, fx32); -extern "C" void func_01fff05c(u32 *, UnkStruct_027e0cd8_0C_Base *, VecFx32 *); -extern "C" bool func_02016b8c(VecFx32 *, VecFx32 *, unk32, UnkAngleStruct, unk32, unk32); - -extern "C" s8 func_ov000_02059da4(UnkStruct_027e0960_TableEntry *, VecFx32 *param1); +extern void *data_ov032_02121ed4; static const VecFx32Cpp data_ov032_021224d8(FX_F32_TO_FX32(1.7f), FX_F32_TO_FX32(0.5f), FX_F32_TO_FX32(1.7f)); static ActorUnkZLSL_AnimationTag data_ov032_021224e4 = {.index = 0, .name = "fly"}; diff --git a/src/032_MapA1/Actor/ActorSpinut.cpp b/src/032_MapA1/Actor/ActorSpinut.cpp index 1139ffcf..d81773b4 100644 --- a/src/032_MapA1/Actor/ActorSpinut.cpp +++ b/src/032_MapA1/Actor/ActorSpinut.cpp @@ -1,4 +1,5 @@ #include "Actor/ActorSpinut.hpp" +#include "CommonFuncs.hpp" #include "Actor/ActorManager.hpp" #include "Actor/Actor_Derived1.hpp" @@ -10,23 +11,8 @@ #include "Unknown/UnkStruct_027e0d38.hpp" #include "nitro/os.h" -extern "C" u16 data_ov000_020aecf4[]; -extern "C" unk32 data_ov000_020aecf8; - -extern "C" bool func_01ff916c(void *, int, int); -extern "C" unk32 func_01ff9258(fx32, fx32); -extern "C" unk32 func_01ff930c(s16 *, s16, unk32); -extern "C" void func_01ff9318(void *, unk32, unk32); -extern "C" void func_01ff941c(VecFx32 *, VecFx32 *); -extern "C" fx32 func_01ffb428(unk32, unk32); -extern "C" unk32 func_01ffb464(unk32 param1); -extern "C" fx32 func_01ffb66c(unk32, unk32); -extern "C" fx16 func_01ffbbe0(fx32, fx32); -extern "C" bool func_02016ae0(VecFx32 *, VecFx32 *, UnkAngleStruct, unk32, unk32); -extern "C" Actor *func_02016fbc(ActorId, VecFx32 *, unk32); - -extern "C" bool func_ov000_0205adfc(VecFx32 *, VecFx32 *); -extern "C" void func_ov000_020986b4(s16 *param1, Actor_Derived2 *param2, unk32 param3); +extern u16 data_ov000_020aecf4[]; +extern unk32 data_ov000_020aecf8; static const VecFx32Cpp data_ov032_02122160(FX_F32_TO_FX32(1.7f), FX_F32_TO_FX32(0.5f), FX_F32_TO_FX32(1.7f)); static ActorUnkZLSL_AnimationTag data_ov032_02122184 = {.index = 0, .name = "walk", .unknown = 0x0}; @@ -398,11 +384,11 @@ void ActorSpinut::func_ov032_02119df4() { this->func_ov032_0211b1e0(); } -// non-matching void ActorSpinut::func_ov032_02119e90() { this->mUnk_110.vfunc_1C(data_ov032_02122184, 0x1000, 0x19A, 0x0); this->mUnk_288.x = func_01ffb66c(0x1800, func_01ffb428(0x148, 0x14) >> 0xC); this->mTimer.Set(0, 180); + this->mUnk_220 = 0x0; if (this->mUnk_5C.mParams[0] == 0x2) { this->mUnk_264 = 0x14000; @@ -410,9 +396,8 @@ void ActorSpinut::func_ov032_02119e90() { this->mUnk_264 = 0x4800; } - this->mUnk_220 = 0x0; - this->mVel.x = FX_F32_TO_FX32(0.0f); - this->mVel.z = FX_F32_TO_FX32(0.0f); + this->mVel.x = FX_F32_TO_FX32(0.0f); + this->mVel.z = FX_F32_TO_FX32(0.0f); } // non-matching (case 1) @@ -626,7 +611,7 @@ void ActorSpinut::func_ov032_0211a9c8() { this->func_ov032_0211b1e0(); } -extern "C" u16 data_ov000_020aecf0; +extern u16 data_ov000_020aecf0; void ActorSpinut::func_ov032_0211aa40() { this->Actor_Derived2::func_ov000_02099450(&this->mUnk_248, &this->mUnk_228.mUnk_10, 0x0, data_ov000_020aecf0); diff --git a/src/032_MapA1/MapObject/MapObjectUnkSWSW.cpp b/src/032_MapA1/MapObject/MapObjectUnkSWSW.cpp index c11fcf12..f2052bc5 100644 --- a/src/032_MapA1/MapObject/MapObjectUnkSWSW.cpp +++ b/src/032_MapA1/MapObject/MapObjectUnkSWSW.cpp @@ -1,4 +1,5 @@ #include "MapObject/MapObjectUnkSWSW.hpp" +#include "CommonFuncs.hpp" #include "profile.hpp" #include "Actor/Actor.hpp" @@ -9,19 +10,12 @@ #include "Unknown/UnkStruct_027e09a8.hpp" #include "Unknown/UnkStruct_027e0cd8.hpp" -extern "C" char data_ov032_02121ef4; -extern "C" char data_ov032_02121f04; -extern "C" unk32 data_ov032_02121f14; // ig these variables should be 0x10-byte long -extern "C" unk32 data_ov032_02121f24; // same as above -extern "C" MapObjectProfile_Derived2_20_Base data_ov032_02122ad8; -extern "C" MapObject_10 data_ov032_02122b8c; - -extern "C" void func_01ff9218(fx32 *, fx32, fx32); -extern "C" void func_01ff91b8(unk16 *, fx32, fx32); -extern "C" fx32 func_01ffbbe0(fx32 x, fx32 z); -extern "C" void func_01ffedac(Vec2bCpp *, VecFx32 *); -extern "C" fx32 func_02015a18(u16, unk32, unk32, unk32, u16, unk32, unk32); -extern "C" unk32 func_02016ae0(VecFx32 *, VecFx32 *, UnkAngleStruct, unk32, unk32); +extern char data_ov032_02121ef4; +extern char data_ov032_02121f04; +extern unk32 data_ov032_02121f14; // ig these variables should be 0x10-byte long +extern unk32 data_ov032_02121f24; // same as above +extern MapObjectProfile_Derived2_20_Base data_ov032_02122ad8; +extern MapObject_10 data_ov032_02122b8c; DECL_PROFILE(MapObjectProfileUnkSWSW); diff --git a/src/063_Shrine/Actor/ActorUnkCANS.cpp b/src/063_Shrine/Actor/ActorUnkCANS.cpp index 1eead5d3..913e7a17 100644 --- a/src/063_Shrine/Actor/ActorUnkCANS.cpp +++ b/src/063_Shrine/Actor/ActorUnkCANS.cpp @@ -6,6 +6,7 @@ #include "Actor/ActorRef.hpp" #include "Actor/ActorShotArrow.hpp" #include "Actor/ActorUnkCASE.hpp" +#include "CommonFuncs.hpp" #include "Map/MapObjectId.hpp" #include "MapObject/MapObject.hpp" #include "MapObject/MapObjectManager.hpp" @@ -41,17 +42,6 @@ extern VecFx32 data_027e07d4; extern MtxFx43 data_027e0964; extern UnkStruct_027e09c0 *data_027e09c0; -extern "C" void func_01ff916c(unk32 *param1, unk32 param2, unk32 param3); -extern "C" unk32 func_01ff9258(unk32, unk32); -extern "C" unk32 func_01ff930c(s16 *, unk16, unk32); -extern "C" void func_01ff9638(VecFx32 *param1, fx16 param2); -extern "C" fx32 func_01ff9a5c(VecFx32 *, VecFx32 *, VecFx32 *); -extern "C" void func_01ffad5c(MtxFx43 *, MtxFx43 *, MtxFx43 *); -extern "C" fx32 func_01ffb428(unk32, unk32); -extern "C" void func_01ffb714(VecFx32 *, VecFx32 *, VecFx32 *); -extern "C" unk32 func_01ffbbe0(fx32 param1, fx32 param2); -extern "C" void func_0200eab0(G3d_Model *, unk32, u8); - // Overlay 0 extern u16 data_ov000_020aed00; extern u16 data_ov000_020aecf0[0x4]; @@ -59,20 +49,14 @@ extern u16 data_ov000_020aecf4[0x4]; //! INFO: Unsure about the size extern unk32 data_ov000_020aecf8[0x2]; //! INFO: Unsure about the size extern unk32 data_ov000_020aecfc[0x2]; //! INFO: Unsure about the size -extern "C" void func_ov000_02057c98(ModelRender *param1, UnkSystem5 *param2); #if IS_JP -extern "C" unk32 func_ov000_0205c384(VecFx32 *param1, VecFx32 *param2); + #endif -extern "C" void func_ov000_0208bd20(UnkStruct_027e0ce0 *param1, unk32 param2, unk32 param3, unk32 param4); -extern "C" void func_ov000_020986b4(s16 *param1, Actor_Derived2 *param2, unk32 param3); -extern "C" unk32 func_ov000_02098d7c(ActorUnkCANS *param1, UnkStruct_ov063_02162e88 *param2); // Overlay 26 #if IS_JP -extern "C" void func_ov026_020f46a8(Actor *param1, VecFx32 *param2, bool param3); -#endif -extern "C" void G3d_GetCurrentMtx(MtxFx43 *mtx1, MtxFx33 *mtx2); +#endif const Cylinder data_ov063_02162e90(0, 0x99A, 0, 0x99A); diff --git a/src/063_Shrine/Actor/ActorUnkCASE.cpp b/src/063_Shrine/Actor/ActorUnkCASE.cpp index 19a27dc3..3f557bfc 100644 --- a/src/063_Shrine/Actor/ActorUnkCASE.cpp +++ b/src/063_Shrine/Actor/ActorUnkCASE.cpp @@ -6,6 +6,7 @@ #include "Actor/ActorShotArrow.hpp" #include "Actor/ActorUnkCANS.hpp" #include "Actor/ActorUnkITWP.hpp" +#include "CommonFuncs.hpp" #include "Physics/Cylinder.hpp" #include "Render/ModelRender.hpp" #include "Unknown/UnkStruct_027e09a8.hpp" @@ -22,19 +23,12 @@ extern const Actor_Derived2_A8_PTR data_ov063_02162558; extern const void *data_ov063_02162568; extern MtxFx43 data_027e0964; -extern "C" void func_01ffa60c(const MtxFx33 *, MtxFx33 *, MtxFx33 *); -extern "C" void func_01ffa7a0(VecFx32 *, MtxFx33 *, VecFx32 *); -extern "C" void func_01ffad5c(MtxFx43 *, MtxFx43 *, MtxFx43 *); -extern "C" void func_01ffb714(VecFx32 *, VecFx32 *, VecFx32 *); -extern "C" u16 func_01ffbbe0(fx32 x, fx32 z); // Overlay 0 extern unk32 data_ov000_020aecf8[0x2]; //! INFO: Unsure about the size and type extern u16 data_ov000_020aed00; -extern "C" void func_ov000_0207b70c(ActorUnkCASE_174 *param1, Actor *param2); // Other -extern "C" void G3d_GetCurrentMtx(MtxFx43 *mtx1, MtxFx33 *mtx2); struct UnkStruct_data_ov063_021630c8 { /* 00 */ unk32 mUnk_00; diff --git a/src/063_Shrine/Actor/ActorUnkRBLS.cpp b/src/063_Shrine/Actor/ActorUnkRBLS.cpp index 08a47d42..6f102958 100644 --- a/src/063_Shrine/Actor/ActorUnkRBLS.cpp +++ b/src/063_Shrine/Actor/ActorUnkRBLS.cpp @@ -1,4 +1,5 @@ #include "Actor/ActorUnkRBLS.hpp" +#include "CommonFuncs.hpp" #include "Render/ModelRender.hpp" #include "Unknown/UnkStruct_027e0cd8.hpp" #include "nitro/fx.h" @@ -6,8 +7,6 @@ ActorUnkZLSL_AnimationTag data_ov063_02163740 = {0, "RBLS"}; -extern "C" void func_ov000_02099f64(UnkStruct_ov063_02163784 *param1, ActorUnkZLSL_AnimationTag param2, unk32 param3); - DECL_PROFILE(ActorProfileUnkRBLS); Actor *ActorProfileUnkRBLS::Create() { diff --git a/src/063_Shrine/Actor/ActorUnkRMSV.cpp b/src/063_Shrine/Actor/ActorUnkRMSV.cpp index ff6c7de5..3c0396c4 100644 --- a/src/063_Shrine/Actor/ActorUnkRMSV.cpp +++ b/src/063_Shrine/Actor/ActorUnkRMSV.cpp @@ -2,6 +2,7 @@ #include "Actor/Actor.hpp" #include "Actor/ActorId.hpp" #include "Actor/ActorUnkRMSBase.hpp" +#include "CommonFuncs.hpp" #include "nns/g3d/g3d.h" #include "profile.hpp" @@ -9,11 +10,8 @@ extern char data_ov063_02162578[0x10]; // = "RMSV"; extern char data_ov063_02162588[0x10]; // = "RMSV_wall"; // Overlay 0 -extern "C" void func_ov000_02099e58(UnkStruct_ov063_021632e4 *param1, ActorUnkZLSL_AnimationTag param2, unk32 param8); // Overlay 31 -extern "C" bool func_ov031_020f7538(Actor *param1, unk32 param2); -extern "C" void func_ov031_020f7574(Actor *param1, unk32 param2); ActorUnkZLSL_AnimationTag data_ov063_021632ac = {0, "RMSV"}; ActorUnkZLSL_AnimationTag data_ov063_021632c4 = {1, "RMSV"}; diff --git a/src/063_Shrine/MapObject/MapObjectUnkLTRW.cpp b/src/063_Shrine/MapObject/MapObjectUnkLTRW.cpp index 789aa560..8c3cbb85 100644 --- a/src/063_Shrine/MapObject/MapObjectUnkLTRW.cpp +++ b/src/063_Shrine/MapObject/MapObjectUnkLTRW.cpp @@ -1,5 +1,6 @@ #include "MapObject/MapObjectUnkLTRW.hpp" #include "Actor/Actor_Derived1.hpp" +#include "CommonFuncs.hpp" #include "MapObject/MapObject.hpp" #include "MapObject/MapObjectProfile.hpp" #include "Unknown/Common.hpp" @@ -12,7 +13,6 @@ #include "profile.hpp" // Overlay 31 -extern "C" void func_ov031_020e0f30(ActorRef); struct UnkStruct_data_ov063_021639c4 { /* 00 */ unk32 mUnk_00; diff --git a/src/063_Shrine/MapObject/MapObjectUnkMTJR.cpp b/src/063_Shrine/MapObject/MapObjectUnkMTJR.cpp index ce836d98..4346e3b8 100644 --- a/src/063_Shrine/MapObject/MapObjectUnkMTJR.cpp +++ b/src/063_Shrine/MapObject/MapObjectUnkMTJR.cpp @@ -1,4 +1,5 @@ #include "MapObject/MapObjectUnkMTJR.hpp" +#include "CommonFuncs.hpp" #include "System/Random.hpp" #include "Unknown/UnkStruct_027e09a8.hpp" #include "Unknown/UnkStruct_027e0cec.hpp" @@ -8,7 +9,6 @@ #include "profile.hpp" // Overlay 31 -extern "C" void func_ov031_020e0f30(ActorRef); DECL_PROFILE(MapObjectProfileUnkMTJR); diff --git a/src/063_Shrine/MapObject/MapObjectUnkSTAT.cpp b/src/063_Shrine/MapObject/MapObjectUnkSTAT.cpp index 30b6f484..186017e0 100644 --- a/src/063_Shrine/MapObject/MapObjectUnkSTAT.cpp +++ b/src/063_Shrine/MapObject/MapObjectUnkSTAT.cpp @@ -1,4 +1,5 @@ #include "MapObject/MapObjectUnkSTAT.hpp" +#include "CommonFuncs.hpp" #include "MapObject/MapObjectProfile.hpp" #include "System/Random.hpp" #include "Unknown/Common.hpp" @@ -12,13 +13,6 @@ #include "nitro/math.h" #include "profile.hpp" -extern "C" unk32 func_02039d60(f32, unk32); -extern "C" f32 func_0203ab58(unk32, f32); -extern "C" f32 func_0203ad88(f32, unk32); -extern "C" f32 func_02039f04(unk32); -extern "C" fx32 func_01ffb428(unk32, unk32); -extern "C" unk32 func_02016b8c(VecFx32 *, VecFx32 *, unk32, UnkAngleStruct, u16, unk32); - DECL_PROFILE(MapObjectProfileUnkSTAT); unk32 data_ov063_02164508[3]; // Is probably part of the profile? diff --git a/src/071_Tower/Actor/ActorTearLight.cpp b/src/071_Tower/Actor/ActorTearLight.cpp index e195aa1c..9857f681 100644 --- a/src/071_Tower/Actor/ActorTearLight.cpp +++ b/src/071_Tower/Actor/ActorTearLight.cpp @@ -1,4 +1,5 @@ #include "Actor/ActorTearLight.hpp" +#include "CommonFuncs.hpp" #include "Actor/ActorManager.hpp" #include "System/SysNew.hpp" @@ -29,13 +30,8 @@ public: /* E8 */ VecFx32 mUnk_E8; }; -extern "C" unk32 data_ov000_020aecf8; -extern "C" VecFx32 data_ov071_02164bd4; - -extern "C" void func_01ffb714(VecFx32 *, VecFx32 *, VecFx32 *); -extern "C" void func_01ffedac(Vec2bCpp *, VecFx32 *); -extern "C" fx32 func_ov000_02080068(fx32 x); -extern "C" fx32 func_ov000_02080080(fx32 x); +extern unk32 data_ov000_020aecf8; +extern VecFx32 data_ov071_02164bd4; extern UnkStruct_ov019_020d24c8_28_258_00 data_ov071_02165150; diff --git a/src/101_SceneInitLand/UnkStruct_027e0cd8_0C_101.cpp b/src/101_SceneInitLand/UnkStruct_027e0cd8_0C_101.cpp index a787aff0..773bfe40 100644 --- a/src/101_SceneInitLand/UnkStruct_027e0cd8_0C_101.cpp +++ b/src/101_SceneInitLand/UnkStruct_027e0cd8_0C_101.cpp @@ -1,4 +1,5 @@ #include "Actor/Actor.hpp" +#include "CommonFuncs.hpp" #include "System/SysNew.hpp" #include "Unknown/UnkStruct_0204a088.hpp" #include "Unknown/UnkStruct_027e09b8.hpp" @@ -12,7 +13,6 @@ struct UnkStruct_ov070_0214dc74 { /* 08 */ }; extern UnkStruct_ov070_0214dc74 data_ov070_0214dc74[18]; -extern "C" UnkStruct_ov070_0214dc74 *func_ov070_02143fe4(int index); UnkStruct_027e0cd8_0C::UnkStruct_027e0cd8_0C(UnkStruct_027e0cd8 *param1) : UnkStruct_027e0cd8_0C_Base(param1) { diff --git a/src/102_CourseExecLand/MapObjectUnkPTFL_102.cpp b/src/102_CourseExecLand/MapObjectUnkPTFL_102.cpp index f5a357d9..4e725b01 100644 --- a/src/102_CourseExecLand/MapObjectUnkPTFL_102.cpp +++ b/src/102_CourseExecLand/MapObjectUnkPTFL_102.cpp @@ -1,11 +1,9 @@ +#include "CommonFuncs.hpp" #include "MapObject/MapObjectUnkPTFL.hpp" #include "Unknown/UnkStruct_027e0208.hpp" #include "Unknown/UnkStruct_027e0cd8.hpp" #include "nns/g3d/sbc.h" -extern "C" void func_01ff9318(void *, unk32, unk32); -extern "C" fx32 func_01ffb464(fx32); - static unk32 data_ov102_02184980[] = { 0x1FF00000, 0x0007FC00, 0x000001FF, 0x20000000, 0x00080000, 0x00000200, 0x16A5A800, 0x00000000, 0x00000000, 0x00000000, }; diff --git a/src/102_CourseExecLand/MapObjectUnkSAND_102.cpp b/src/102_CourseExecLand/MapObjectUnkSAND_102.cpp index 1ec5add2..2a7f7808 100644 --- a/src/102_CourseExecLand/MapObjectUnkSAND_102.cpp +++ b/src/102_CourseExecLand/MapObjectUnkSAND_102.cpp @@ -1,3 +1,4 @@ +#include "CommonFuncs.hpp" #include "MapObject/MapObjectUnkSAND.hpp" #include "Render/ModelRender.hpp" #include "Unknown/UnkStruct_027e09a8.hpp" @@ -6,7 +7,6 @@ #include "Unknown/UnkStruct_027e0cd8.hpp" #include "Unknown/UnkStruct_027e0cec.hpp" -extern "C" void func_01ff91b8(unk16 *, fx32, fx32); extern unk32 data_ov031_02115fe0; extern MapObject_10 data_ov031_02118ac8[]; extern MapObject_10 data_ov031_02118aec; diff --git a/src/102_CourseExecLand/UnkStruct_027e0ce0_40_102.cpp b/src/102_CourseExecLand/UnkStruct_027e0ce0_40_102.cpp index 75da2559..2771b347 100644 --- a/src/102_CourseExecLand/UnkStruct_027e0ce0_40_102.cpp +++ b/src/102_CourseExecLand/UnkStruct_027e0ce0_40_102.cpp @@ -1,5 +1,6 @@ #include "Actor/ActorManager.hpp" #include "Actor/ActorUnkIWTS.hpp" +#include "CommonFuncs.hpp" #include "Player/PlayerActorBase.hpp" #include "Unknown/UnkStruct_027e0954.hpp" #include "Unknown/UnkStruct_027e09b8.hpp" @@ -10,12 +11,6 @@ #include "Unknown/UnkStruct_ov000_020b51b8.hpp" #include "Unknown/UnkStruct_ov000_020b5214.hpp" -extern "C" void func_01ffaf74(VecFx32 *, MtxFx43 *, VecFx32 *); -extern "C" unk32 func_01ffb6a8(unk32, unk32); -extern "C" void func_ov095_0217aa88(void *, unk16 *, unk32, UnkAngleStruct); -extern "C" void func_ov095_0217aaa8(void *, unk16 *, unk32); -extern "C" void func_ov031_020dcea4(void *, UnkStruct_027e0ce0_40_Base_78 *, UnkAngleStruct); -extern "C" void func_ov000_0205d65c(void *, VecFx32 *, VecFx32 *, UnkAngleStruct); extern Vec2s data_ov031_02112b54; void PlayerActorBase_74::func_ov102_02182c20(unk32 param1, MtxFx43 *param2) { diff --git a/src/110_PlayerGet/PlayerGet.cpp b/src/110_PlayerGet/PlayerGet.cpp index f6d7021f..fda61dcb 100644 --- a/src/110_PlayerGet/PlayerGet.cpp +++ b/src/110_PlayerGet/PlayerGet.cpp @@ -1,3 +1,4 @@ +#include "CommonFuncs.hpp" #include #include "Actor/ActorId.hpp" @@ -35,20 +36,6 @@ UnkStruct_02186240 data_ov110_02186240; extern const char *data_ov000_020aa240; // .nsbtx extern const char *data_ov000_020aa248; // .nsbmd -extern "C" void func_ov000_0205ca74(unk32); -extern "C" void func_01ffb6e4(unk32, const void *, void *); -extern "C" void func_01ffc5a0(ModelRender *, unk32, UnkAngleStruct, void *); -extern "C" void func_ov000_0208f820(); -extern "C" void func_ov000_0208ba10(void *, void *, unk32); -extern "C" void func_02015ea8(unk32, void *); -extern "C" void func_02015628(char *, char *, unk32, void *, size_t); -extern "C" void func_02015664(char *, unk32); -extern "C" void func_020156c8(char *, char *, unk32); -extern "C" void func_020156f4(char *); -extern "C" void func_02015644(char *); - -extern "C" BMDSectionModel *func_ov000_0205abcc(void *, void *, unk32, unk32, void *); - static const unk32 data_ov110_02185dc4[1] = {8}; static const UnkStruct_ov110_02185dc8 data_ov110_02185dc8[] = { @@ -538,7 +525,7 @@ void PlayerGet::vfunc_0C(UnkStruct_PlayerGet_vfunc_0C_param1 *param1) { this->mUnk_2C->mUnk_58 = 0; char auStack_108[12]; func_ov000_0208ba10(auStack_108, &this->mUnk_24->mUnk_094, 0); - *(s16 *) &this->mUnk_40->mUnk_00 = 0x8000; + this->mUnk_40->angle_s = 0x8000; pUnk_38 = this->mUnk_38; pUnk_38->x = 0; @@ -915,7 +902,7 @@ void PlayerGet::vfunc_10(unk32 param1, unk32 param2) { this->mUnk_54.mUnk_08 = -1; } - this->mUnk_40->mUnk_00 = 0; + this->mUnk_40->angle_u = 0; if (temp_r6) { this->mUnk_30->func_ov000_020921e4(0x49); diff --git a/src/112_PlayerSceneChange/PlayerSceneChange.cpp b/src/112_PlayerSceneChange/PlayerSceneChange.cpp index 7f2c7b52..54c01422 100644 --- a/src/112_PlayerSceneChange/PlayerSceneChange.cpp +++ b/src/112_PlayerSceneChange/PlayerSceneChange.cpp @@ -1,6 +1,7 @@ #include "Player/PlayerSceneChange.hpp" #include "Actor/ActorManager.hpp" #include "Actor/Actor_Derived1.hpp" +#include "CommonFuncs.hpp" #include "MapObject/MapObjectManager.hpp" #include "MapObject/MapObjectUnkDRTY.hpp" #include "Unknown/UnkStruct_027e09b8.hpp" @@ -10,9 +11,6 @@ #include "math.hpp" -extern "C" void func_ov000_0205ca74(unk32); -extern "C" void func_ov000_0205d65c(void *, VecFx32 *, VecFx32 *, u32); - #define SIN2(table, n) ((table)[2 * ((n) >> 4)]) #define COS2(table, n) ((table)[2 * ((n) >> 4) + 1]) @@ -77,18 +75,11 @@ s16 PlayerSceneChange::func_ov112_02184bbc(s16 param1) { return param1; } -extern "C" bool func_ov096_02179c14(); -extern "C" void func_ov034_02121de4(void *); extern fx16 data_02040964[]; extern fx16 data_0203e964[]; extern fx16 data_02041964[]; extern fx16 data_0203f964[]; extern fx16 data_0203feb0[]; -extern "C" void func_01ffb714(VecFx32 *, VecFx32 *, VecFx32 *); -extern "C" void func_01ff9638(VecFx32 *, s16); -extern "C" void func_01ff9770(VecFx32 *); -extern "C" bool func_ov000_02080998(VecFx32 *); -extern "C" void func_01ff930c(UnkStruct_ov000_0208f820_40 *, unk16, unk32); // https://decomp.me/scratch/c7PhN void PlayerSceneChange::vfunc_0C(UnkStruct_PlayerGet_vfunc_0C_param1 *param1) { @@ -210,15 +201,15 @@ void PlayerSceneChange::vfunc_0C(UnkStruct_PlayerGet_vfunc_0C_param1 *param1) { break; } - func_ov000_0205d65c(&stack3, this->mUnk_34, (VecFx32 *) &this->mUnk_70, this->mUnk_40->mUnk_00); - this->mUnk_40->mUnk_00 = stack3; + func_ov000_0205d65c(&stack3, this->mUnk_34, (VecFx32 *) &this->mUnk_70, this->mUnk_40->angle_u); + this->mUnk_40->angle_u = stack3; switch (this->mUnk_68) { case 0x11: case 0x12: case 0x13: case 0x14: { - s32 var_r1_2 = this->mUnk_A8 - this->mUnk_40->mUnk_00; + s32 var_r1_2 = this->mUnk_A8 - this->mUnk_40->angle_u; if (var_r1_2 < 0) { var_r1_2 = -var_r1_2; @@ -244,7 +235,7 @@ void PlayerSceneChange::vfunc_0C(UnkStruct_PlayerGet_vfunc_0C_param1 *param1) { this->mUnk_9C.y = 0; this->mUnk_9C.z = 0; } else { - func_01ff9770(&this->mUnk_9C); + func_01ff9770(&this->mUnk_9C, temp_r0_11); VecFx32_Add(this->mUnk_3C, &this->mUnk_9C, this->mUnk_3C); } } else { @@ -366,8 +357,8 @@ void PlayerSceneChange::vfunc_0C(UnkStruct_PlayerGet_vfunc_0C_param1 *param1) { case 0x16: case 0x1C: pVec = this->mUnk_34; - pVec->x += FX_MUL(FX_F32_TO_FX32(-1.1003f), SIN2(pSinCosTable, this->mUnk_40->mUnk_00)); - pVec->z += FX_MUL(FX_F32_TO_FX32(-1.1003f), COS2(pSinCosTable, this->mUnk_40->mUnk_00)); + pVec->x += FX_MUL(FX_F32_TO_FX32(-1.1003f), SIN2(pSinCosTable, this->mUnk_40->angle_u)); + pVec->z += FX_MUL(FX_F32_TO_FX32(-1.1003f), COS2(pSinCosTable, this->mUnk_40->angle_u)); break; case 0x08: case 0x09: @@ -388,8 +379,8 @@ void PlayerSceneChange::vfunc_0C(UnkStruct_PlayerGet_vfunc_0C_param1 *param1) { case 0x22: case 0x23: pVec = this->mUnk_34; - pVec->x += FX_MUL(FX_F32_TO_FX32(-1.9001f), SIN2(pSinCosTable, this->mUnk_40->mUnk_00)); - pVec->z += FX_MUL(FX_F32_TO_FX32(-1.9001f), COS2(pSinCosTable, this->mUnk_40->mUnk_00)); + pVec->x += FX_MUL(FX_F32_TO_FX32(-1.9001f), SIN2(pSinCosTable, this->mUnk_40->angle_u)); + pVec->z += FX_MUL(FX_F32_TO_FX32(-1.9001f), COS2(pSinCosTable, this->mUnk_40->angle_u)); break; case 0x0F: case 0x10: @@ -401,13 +392,13 @@ void PlayerSceneChange::vfunc_0C(UnkStruct_PlayerGet_vfunc_0C_param1 *param1) { case 0x24: case 0x25: pVec = this->mUnk_34; - pVec->x += FX_MUL(FX_F32_TO_FX32(-1.0002f), SIN2(pSinCosTable, this->mUnk_40->mUnk_00)); - pVec->z += FX_MUL(FX_F32_TO_FX32(-1.0002f), COS2(pSinCosTable, this->mUnk_40->mUnk_00)); + pVec->x += FX_MUL(FX_F32_TO_FX32(-1.0002f), SIN2(pSinCosTable, this->mUnk_40->angle_u)); + pVec->z += FX_MUL(FX_F32_TO_FX32(-1.0002f), COS2(pSinCosTable, this->mUnk_40->angle_u)); break; default: // pVec = this->mUnk_34; - // pVec->x += FX_MUL(FX_F32_TO_FX32(-1.7001f), SIN2(pSinCosTable, this->mUnk_40->mUnk_00)); - // pVec->z += FX_MUL(FX_F32_TO_FX32(-1.7001f), COS2(pSinCosTable, this->mUnk_40->mUnk_00)); + // pVec->x += FX_MUL(FX_F32_TO_FX32(-1.7001f), SIN2(pSinCosTable, this->mUnk_40->angle_u)); + // pVec->z += FX_MUL(FX_F32_TO_FX32(-1.7001f), COS2(pSinCosTable, this->mUnk_40->angle_u)); break; } @@ -501,7 +492,7 @@ void PlayerSceneChange::vfunc_10(unk32 param1, unk32 param2) { } if (this->func_ov000_020914b0(0x3C, (VecFx32 *) &this->mUnk_70, this->mUnk_7C)) { - s16 var_r1_2 = this->mUnk_40->mUnk_00; + s16 var_r1_2 = this->mUnk_40->angle_u; bool var_r3 = true; switch (this->mUnk_68) { @@ -524,7 +515,7 @@ void PlayerSceneChange::vfunc_10(unk32 param1, unk32 param2) { if (this->mUnk_AC) { // var_r1_2 = this->mUnk_A8; this->mUnk_AC = false; - this->mUnk_40->mUnk_00 = this->mUnk_A8; + this->mUnk_40->angle_u = this->mUnk_A8; } break; @@ -592,15 +583,15 @@ void PlayerSceneChange::vfunc_10(unk32 param1, unk32 param2) { } if (!this->mUnk_AC) { - func_01ff930c(this->mUnk_40, this->mUnk_AA, 0x200); + func_01ff930c(&this->mUnk_40->angle_s, this->mUnk_AA, 0x200); VecFx32 *temp_r2_4 = this->mUnk_34; this->mUnk_70.x = temp_r2_4->x; this->mUnk_70.y = temp_r2_4->y; this->mUnk_70.z = temp_r2_4->z; - fx16 sin = SIN2(data_0203feb0, this->mUnk_40->mUnk_00); - fx16 cos = COS2(data_0203feb0, this->mUnk_40->mUnk_00); + fx16 sin = SIN2(data_0203feb0, this->mUnk_40->angle_u); + fx16 cos = COS2(data_0203feb0, this->mUnk_40->angle_u); this->mUnk_70.x += FX_MUL(sin, 0x19A); this->mUnk_70.z += FX_MUL(cos, 0x19A); } @@ -639,7 +630,7 @@ void PlayerSceneChange::vfunc_10(unk32 param1, unk32 param2) { } break; case 0x3D: { - func_01ff930c(this->mUnk_40, 0, 0xE39); + func_01ff930c(&this->mUnk_40->angle_s, 0, 0xE39); VecFx32 *temp_r2_8 = this->mUnk_34; this->mUnk_80.x = temp_r2_8->x; @@ -662,7 +653,7 @@ void PlayerSceneChange::vfunc_10(unk32 param1, unk32 param2) { break; } - func_01ff930c(this->mUnk_40, 0, 0xE39); + func_01ff930c(&this->mUnk_40->angle_s, 0, 0xE39); this->mUnk_38->y = 0x66; } else if (this->mUnk_6C == 0 && data_027e09a4->func_ov000_02072154(&this->mUnk_54, this->mUnk_68)) { this->mUnk_6C = -1; @@ -716,8 +707,8 @@ void PlayerSceneChange::vfunc_10(unk32 param1, unk32 param2) { if (!this->func_ov000_02091e68(param2) && data_02049b18.mUnk_06.mTouchControl.mState.touch) { func_ov000_0205ca74(this->mUnk_98); this->mUnk_98 = -1; - fx16 sin = SIN2(data_0203feb0, this->mUnk_40->mUnk_00); - fx16 cos = COS2(data_0203feb0, this->mUnk_40->mUnk_00); + fx16 sin = SIN2(data_0203feb0, this->mUnk_40->angle_u); + fx16 cos = COS2(data_0203feb0, this->mUnk_40->angle_u); this->mUnk_70.x += FX_MUL(sin, FX_F32_TO_FX32(2.0f)); this->mUnk_70.z += FX_MUL(cos, FX_F32_TO_FX32(2.0f)); this->mUnk_AD = true; diff --git a/src/112_PlayerSceneChange/PlayerSceneChange2.cpp b/src/112_PlayerSceneChange/PlayerSceneChange2.cpp index a6f6c20e..9990b626 100644 --- a/src/112_PlayerSceneChange/PlayerSceneChange2.cpp +++ b/src/112_PlayerSceneChange/PlayerSceneChange2.cpp @@ -1,14 +1,7 @@ +#include "CommonFuncs.hpp" #include "Player/PlayerSceneChange.hpp" #include "Unknown/UnkStruct_027e0ce0.hpp" -extern "C" void func_ov000_0208ba10(void *, void *, unk32); -extern "C" void func_ov000_02087ee8(); -extern "C" void func_ov000_0205d65c(void *, VecFx32 *, VecFx32 *, u32); -extern "C" void func_ov000_0208cac8(UnkStruct_ov000_0208f820_28 *, VecFx32 *, unk32); -extern "C" unk32 func_ov000_0208dc98(unk32); -extern "C" void func_ov000_020830a4(unk32, unk32, unk32, unk32, unk32, unk32); -extern "C" void func_ov000_020830d4(unk32, u16, unk32, unk32, unk32); - PlayerSceneChange2::PlayerSceneChange2() { this->mUnk_54 = *this->mUnk_34; this->mUnk_60 = *this->mUnk_34; @@ -45,10 +38,10 @@ void PlayerSceneChange2::vfunc_0C(UnkStruct_PlayerGet_vfunc_0C_param1 *param1) { this->mUnk_60 = param1->mUnk_10; { - u16 test = this->mUnk_40->mUnk_00; + u16 test = this->mUnk_40->angle_u; func_ov000_0205d65c(&auStack_2c, this->mUnk_34, &this->mUnk_60, test); } - this->mUnk_40->mUnk_00 = auStack_2c; + this->mUnk_40->angle_u = auStack_2c; break; case 0x42: case 0x43: @@ -57,19 +50,19 @@ void PlayerSceneChange2::vfunc_0C(UnkStruct_PlayerGet_vfunc_0C_param1 *param1) { this->mUnk_54.z = this->mUnk_34->z; this->mUnk_60 = param1->mUnk_10; - func_ov000_0205d65c(&auStack_2c, &this->mUnk_60, (VecFx32 *) &this->mUnk_54, this->mUnk_40->mUnk_00); - this->mUnk_40->mUnk_00 = auStack_2c; + func_ov000_0205d65c(&auStack_2c, &this->mUnk_60, (VecFx32 *) &this->mUnk_54, this->mUnk_40->angle_u); + this->mUnk_40->angle_u = auStack_2c; func_ov000_0208cac8(this->mUnk_28, &this->mUnk_60, 0); func_ov000_020830a4(this->mUnk_48, 0, this->mUnk_28->mUnk_48, 1, 1, func_ov000_0208dc98(this->mUnk_28->mUnk_48)); - func_ov000_020830d4(this->mUnk_48, this->mUnk_40->mUnk_00, this->mUnk_30->func_ov000_02093718(), + func_ov000_020830d4(this->mUnk_48, this->mUnk_40->angle_u, this->mUnk_30->func_ov000_02093718(), this->mUnk_30->func_ov000_0209378c(), 0); break; case 0x44: func_ov000_0208cac8(this->mUnk_28, &this->mUnk_60, 0); - func_ov000_0205d65c(&auStack_2c, this->mUnk_34, (VecFx32 *) &this->mUnk_54, this->mUnk_40->mUnk_00); - this->mUnk_40->mUnk_00 = auStack_2c; + func_ov000_0205d65c(&auStack_2c, this->mUnk_34, (VecFx32 *) &this->mUnk_54, this->mUnk_40->angle_u); + this->mUnk_40->angle_u = auStack_2c; this->mUnk_2C->mUnk_26 = 0; break; diff --git a/src/ITCM/ITCM_MapObjectManager.cpp b/src/ITCM/ITCM_MapObjectManager.cpp index 0b9eb8e0..3e2c4a08 100644 --- a/src/ITCM/ITCM_MapObjectManager.cpp +++ b/src/ITCM/ITCM_MapObjectManager.cpp @@ -1,14 +1,6 @@ +#include "CommonFuncs.hpp" #include "MapObject/MapObjectManager.hpp" -struct UnkStruct { - unk32 one; - unk32 two; - unk32 three; - unk32 four; -}; - -extern "C" unk32 func_01ffecdc(int, void *); - MapObject *MapObjectManager::func_01fff498(Vec2bCpp param1) { if (this->mUnk_0C[param1.y][param1.x] < 0) { return NULL; @@ -51,20 +43,20 @@ MapObjectId MapObject::GetMapObjectId() { } unk32 MapObject::func_01fff590(unk32 param2) { - UnkStruct stack; - unk32 one; - unk32 two; - unk32 three; - unk32 four; + Cylinder stack; + unk32 x; + unk32 y; + unk32 z; + unk32 size; - four = this->mpProfile->mUnk_08; - one = (three = this->mPos.x); - two = this->mPos.y; - three = this->mPos.z; + size = this->mpProfile->mUnk_08; + x = (z = this->mPos.x); + y = this->mPos.y; + z = this->mPos.z; - stack.one = one; - stack.two = two; - stack.three = three; - stack.four = four; + stack.pos.x = x; + stack.pos.y = y; + stack.pos.z = z; + stack.size = size; return func_01ffecdc(param2, &stack); } diff --git a/src/Main/Game/Game.cpp b/src/Main/Game/Game.cpp index db660df4..1b2cb03c 100644 --- a/src/Main/Game/Game.cpp +++ b/src/Main/Game/Game.cpp @@ -1,4 +1,5 @@ #include "Game/Game.hpp" +#include "CommonFuncs.hpp" #include "System/OverlayManager.hpp" #include "System/Random.hpp" #include "Unknown/UnkStruct_02049b74.hpp" @@ -13,12 +14,6 @@ #include #include -extern "C" void func_020196fc(); -extern "C" void FlushGfxQueue(); -extern "C" void func_020132c8(); -extern "C" void func_020132dc(); -extern "C" void func_02013354(); -extern "C" void func_0201328c(); extern MtxFx33 gGeomMatrix; void Game::func_02013370(unk32 param1) { diff --git a/src/Main/Main.cpp b/src/Main/Main.cpp index d86051ac..82f47f80 100644 --- a/src/Main/Main.cpp +++ b/src/Main/Main.cpp @@ -1,3 +1,4 @@ +#include "CommonFuncs.hpp" #include "Game/Game.hpp" #include "global.h" #include "types.h" diff --git a/src/Main/System/OverlayManager.cpp b/src/Main/System/OverlayManager.cpp index 89c5890e..f0bfcf00 100644 --- a/src/Main/System/OverlayManager.cpp +++ b/src/Main/System/OverlayManager.cpp @@ -1,4 +1,5 @@ #include "System/OverlayManager.hpp" +#include "CommonFuncs.hpp" #include "global.h" #include @@ -26,8 +27,6 @@ struct OverlaySetup { extern OverlaySetup gOverlaySetups[]; extern u32 *data_027e0ce0[]; -extern "C" void func_ov007_02102850(uint **); -extern "C" void func_ov007_021028a0(uint **); THUMB_BEGIN diff --git a/src/Main/System/Random.cpp b/src/Main/System/Random.cpp index 0073d5fb..81fc2d98 100644 --- a/src/Main/System/Random.cpp +++ b/src/Main/System/Random.cpp @@ -1,7 +1,5 @@ #include "System/Random.hpp" - -extern "C" void func_02028450(void *param1); -extern "C" u16 func_02032920(void *param1, size_t param2); +#include "CommonFuncs.hpp" void Random::Init() { u64 auStack_38[4]; diff --git a/src/Main/System/SysFault.cpp b/src/Main/System/SysFault.cpp index 4eae4dc0..d71dc5ad 100644 --- a/src/Main/System/SysFault.cpp +++ b/src/Main/System/SysFault.cpp @@ -1,4 +1,5 @@ #include "System/SysFault.hpp" +#include "CommonFuncs.hpp" #include "System/OverlayManager.hpp" #include "Unknown/Common.hpp" #include "Unknown/UnkStruct_02049b18.hpp" @@ -12,16 +13,6 @@ #include #include -extern "C" void func_020131ec(); -extern "C" void func_02013214(); -extern "C" void func_ov020_020c86d8(void *); -extern "C" void func_02014d38(void *, int); -extern "C" void func_020196fc(); -extern "C" unk32 func_ov000_02068504(int); -extern "C" unk32 func_020147a8(); -extern "C" void func_0201b278(bool, bool); -extern "C" void func_0201b180(bool, bool); -extern "C" void SetBrightColor(void *, int); extern int data_02049bd4; extern u16 data_0203e0c4[]; diff --git a/src/Main/System/SysNew.cpp b/src/Main/System/SysNew.cpp index e988b704..544624c7 100644 --- a/src/Main/System/SysNew.cpp +++ b/src/Main/System/SysNew.cpp @@ -1,17 +1,6 @@ #include "System/SysNew.hpp" +#include "CommonFuncs.hpp" -extern "C" { -void *func_02001654(void *); -void *func_020145b0(UnkId *, s32); -void *func_020010c0(void *, size_t, uint); -void *func_02001308(void *, size_t, uint); -UnkId *func_02001488(void); -UnkId *func_02014704(); -UnkId *func_020011c8(UnkId *, void *); -UnkId *func_02014630(UnkId *, void *); -UnkId *func_02001684(UnkId *, void *); -unk32 func_020011f4(void *); -} extern char *data_0204372c[]; void *SysNew(UnkStruct_02011e10_Sub1 *param1, uint length, uint idLength) { diff --git a/src/Main/UnkFileSystem.cpp b/src/Main/UnkFileSystem.cpp index 531377b2..8c3b66fe 100644 --- a/src/Main/UnkFileSystem.cpp +++ b/src/Main/UnkFileSystem.cpp @@ -1,12 +1,7 @@ +#include "CommonFuncs.hpp" #include "System/SysNew.hpp" #include "Unknown/UnkStruct_ov000_020b4f84.hpp" -extern "C" size_t func_020010e0(UnkStruct_02011e10_Sub1 *heapID, void *pFile, unk32 param3); -extern "C" void *func_02012ec8(unk32, unk16, const char *, size_t *, unk32, u8); -extern "C" void *func_02012ee4(const char *, unk32, unk32, size_t *, u8); -extern "C" void *func_02012f6c(const char *, size_t *); -extern "C" HeapIndex16 func_02015338(); - THUMB_BEGIN UnkFileSystem1::~UnkFileSystem1() {} diff --git a/src/Main/func_02017ea4.cpp b/src/Main/func_02017ea4.cpp index 77673528..485966c1 100644 --- a/src/Main/func_02017ea4.cpp +++ b/src/Main/func_02017ea4.cpp @@ -1,3 +1,4 @@ +#include "CommonFuncs.hpp" #include "System/Random.hpp" #include "types.h" diff --git a/src/Main/func_020196fc.cpp b/src/Main/func_020196fc.cpp index 5df750d7..7a07d4a2 100644 --- a/src/Main/func_020196fc.cpp +++ b/src/Main/func_020196fc.cpp @@ -1,3 +1,4 @@ +#include "CommonFuncs.hpp" #include "Unknown/UnkStruct_0204a110.hpp" #include "types.h" #include @@ -6,15 +7,6 @@ #include #include -extern "C" void func_020242a0(); -extern "C" void func_020241f4(); -extern "C" void func_0202428c(); -extern "C" void func_02024208(); -extern "C" void func_020242b4(); -extern "C" void func_020242c8(); -extern "C" void func_02024264(); -extern "C" void func_02024278(); - extern "C" void func_020196fc() { GX_SetGraphicsMode(1, 0, 0); GXS_SetGraphicsMode(0);