diff --git a/include/common_structs.h b/include/common_structs.h index 8412b9e50d..4594c1bd46 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -3,52 +3,53 @@ #include "ultra64.h" #include "types.h" +#include "si.h" -typedef struct vec3f { +typedef struct Vec3f { /* 0x00 */ f32 x; /* 0x04 */ f32 y; /* 0x08 */ f32 z; -} vec3f; // size = 0x0C +} Vec3f; // size = 0x0C -typedef struct matrix4f { +typedef struct Matrix4f { /* 0x00 */ f32 mtx[4][4]; -} matrix4f; // size = 0x40 +} Matrix4f; // size = 0x40 -typedef struct matrix4s { +typedef struct Matrix4s { /* 0x00 */ s16 whole[4][4]; /* 0x20 */ s16 frac[4][4]; -} matrix4s; // size = 0x40 +} Matrix4s; // size = 0x40 -typedef struct cam_pos_settings { +typedef struct CamPosSettings { /* 0x00 */ f32 boomYaw; /* 0x04 */ f32 boomLength; /* 0x08 */ f32 boomPitch; /* 0x0C */ f32 viewPitch; - /* 0x10 */ struct vec3f position; -} cam_pos_settings; // size = 0x1C + /* 0x10 */ struct Vec3f position; +} CamPosSettings; // size = 0x1C -typedef struct partner_data { +typedef struct PartnerData { /* 0x00 */ u8 enabled; /* 0x01 */ u8 level; /* 0x02 */ s16 unk_02[3]; -} partner_data; // size = 0x08 +} PartnerData; // size = 0x08 -typedef struct heap_node { +typedef struct HeapNode { /* 0x00 */ UNK_PTR next; /* 0x04 */ s32 length; /* 0x08 */ s16 allocated; /* 0x0A */ s16 entryID; /* 0x0C */ s32 capacity; -} heap_node; // size = 0x10 +} HeapNode; // size = 0x10 -typedef struct npc_blur_data { +typedef struct NpcBlurData { /* 0x00 */ char unk_00[4]; /* 0x04 */ f32 xpos[20]; /* 0x54 */ f32 ypos[20]; /* 0xA4 */ f32 zpos[20]; -} npc_blur_data; // size = 0xF4 +} NpcBlurData; // size = 0xF4 -typedef struct npc { +typedef struct Npc { /* 0x000 */ s32 flags; /* 0x004 */ UNK_PTR onUpdate; /* run before anything else for this npc in the npc update step */ /* 0x008 */ UNK_PTR onRender; /* run after the display list for this npc is built */ @@ -57,16 +58,16 @@ typedef struct npc { /* 0x014 */ f32 jumpScale; /* also used for speech, temp1? */ /* 0x018 */ f32 moveSpeed; /* 0x01C */ f32 jumpVelocity; - /* 0x020 */ struct npc_blur_data* blurData; /* related to movement somehow... */ + /* 0x020 */ struct NpcBlurData* blurData; /* related to movement somehow... */ /* 0x024 */ char unk_24[4]; /* 0x028 */ u32 currentAnim; /* 0x02C */ char unk_2C[12]; - /* 0x038 */ struct vec3f pos; - /* 0x044 */ struct vec3f rotation; + /* 0x038 */ struct Vec3f pos; + /* 0x044 */ struct Vec3f rotation; /* 0x050 */ char unk_50[4]; - /* 0x054 */ struct vec3f scale; - /* 0x060 */ struct vec3f moveToPos; - /* 0x06C */ struct vec3f colliderPos; /* used during collision with player */ + /* 0x054 */ struct Vec3f scale; + /* 0x060 */ struct Vec3f moveToPos; + /* 0x06C */ struct Vec3f colliderPos; /* used during collision with player */ /* 0x078 */ s32 shadowIndex; /* 0x07C */ f32 shadowScale; /* 0x080 */ char unk_80[8]; @@ -82,9 +83,9 @@ typedef struct npc { /* 0x0A8 */ s16 collisionHeight; /* 0x0AA */ u8 renderMode; /* 0x0AB */ char unk_AB[661]; -} npc; // size = 0x340 +} Npc; // size = 0x340 -typedef struct player_data { +typedef struct PlayerData { /* 0x000 */ u8 bootsLevel; /* 0x001 */ s8 hammerLevel; /* 0x002 */ s8 curHP; @@ -104,7 +105,7 @@ typedef struct player_data { /* 0x011 */ char unk_11; /* 0x012 */ u8 currentPartner; /* 0x013 */ char unk_13; - /* 0x014 */ struct partner_data partners[12]; + /* 0x014 */ struct PartnerData partners[12]; /* 0x074 */ s16 keyItems[32]; /* 0x0B4 */ s16 badges[128]; /* 0x1B4 */ s16 invItems[10]; @@ -148,24 +149,24 @@ typedef struct player_data { /* 0x338 */ s32 smashGameTotal; /* all-time winnings, max = 99999 */ /* 0x33C */ s16 smashGameRecord; /* 0x33E */ char unk_33E[2]; -} player_data; // size = 0x340 +} PlayerData; // size = 0x340 -typedef struct trigger { +typedef struct Trigger { /* 0x00 */ s16 genericFlagIndex; /* 0x02 */ char unk_02[2]; /* 0x04 */ s16 crateFlagIndex; /* 0x06 */ s16 panelFlagIndex; /* 0x08 */ s32 colliderID; /* 0x0C */ UNK_FUN_PTR(functionHandler); - /* 0x10 */ bytecode* scriptStart; - /* 0x14 */ struct script_context* runningScript; + /* 0x10 */ Bytecode* scriptStart; + /* 0x14 */ struct ScriptInstance* runningScript; /* 0x18 */ s32 priority; /* 0x1C */ s32 scriptVars[3]; /* 0x28 */ char unk_28[12]; /* 0x34 */ s32 runningScriptID; -} trigger; // size = 0x38 +} Trigger; // size = 0x38 -typedef struct enemy { +typedef struct Enemy { /* 0x00 */ s32 flags; /* 0x04 */ u8 encounterIndex; /* 0x05 */ s8 encountered; @@ -174,19 +175,19 @@ typedef struct enemy { /* 0x08 */ s16 npcID; /* 0x0A */ s16 spawnPos[3]; /* 0x10 */ char unk_10[8]; - /* 0x18 */ struct static_npc_settings* npcSettings; - /* 0x1C */ bytecode* initBytecode; - /* 0x20 */ bytecode* interactBytecode; - /* 0x24 */ bytecode* aiBytecode; - /* 0x28 */ bytecode* hitBytecode; - /* 0x2C */ bytecode* auxBytecode; - /* 0x30 */ bytecode* defeatBytecode; - /* 0x34 */ struct script_context* initScript; - /* 0x38 */ struct script_context* interactScript; - /* 0x3C */ struct script_context* aiScript; - /* 0x40 */ struct script_context* hitScript; - /* 0x44 */ struct script_context* auxScript; - /* 0x48 */ struct script_context* defeatScript; + /* 0x18 */ struct StaticNpcSettings* npcSettings; + /* 0x1C */ Bytecode* initBytecode; + /* 0x20 */ Bytecode* interactBytecode; + /* 0x24 */ Bytecode* aiBytecode; + /* 0x28 */ Bytecode* hitBytecode; + /* 0x2C */ Bytecode* auxBytecode; + /* 0x30 */ Bytecode* defeatBytecode; + /* 0x34 */ struct ScriptInstance* initScript; + /* 0x38 */ struct ScriptInstance* interactScript; + /* 0x3C */ struct ScriptInstance* aiScript; + /* 0x40 */ struct ScriptInstance* hitScript; + /* 0x44 */ struct ScriptInstance* auxScript; + /* 0x48 */ struct ScriptInstance* defeatScript; /* 0x4C */ s32 initScriptID; /* 0x50 */ s32 interactScriptID; /* 0x54 */ s32 aiScriptID; @@ -203,25 +204,25 @@ typedef struct enemy { /* 0xD4 */ UNK_PTR dropTables; /* 0xD8 */ u32 tattleString; /* 0xDC */ char unk_DC[20]; -} enemy; // size = 0xF0 +} Enemy; // size = 0xF0 -typedef struct static_npc_settings { +typedef struct StaticNpcSettings { /* 0x00 */ char unk_00[4]; /* 0x04 */ s16 height; /* 0x06 */ s16 radius; /* 0x08 */ UNK_PTR otherAI; - /* 0x0C */ bytecode* interactScript; - /* 0x10 */ bytecode* aiScript; - /* 0x14 */ bytecode* hitScript; - /* 0x18 */ bytecode* auxScript; - /* 0x1C */ bytecode* defeatScript; + /* 0x0C */ Bytecode* interactScript; + /* 0x10 */ Bytecode* aiScript; + /* 0x14 */ Bytecode* hitScript; + /* 0x18 */ Bytecode* auxScript; + /* 0x1C */ Bytecode* defeatScript; /* 0x20 */ s32 flags; /* 0x24 */ char unk_24[4]; /* 0x28 */ s16 level; /* 0x2A */ s16 unkFlags; -} static_npc_settings; // size = 0x2C +} StaticNpcSettings; // size = 0x2C -typedef struct script_context { +typedef struct ScriptInstance { /* 0x000 */ u8 state; /* 0x001 */ u8 currentArgc; /* 0x002 */ u8 currentOpcode; @@ -230,16 +231,16 @@ typedef struct script_context { /* 0x005 */ u8 blocked; /* 1 = blocking */ /* 0x006 */ s8 loopDepth; /* how many nested loops we are in, >= 8 hangs forever */ /* 0x007 */ s8 switchDepth; /* how many nested switches we are in, max = 8 */ - /* 0x008 */ bytecode* ptrNextLine; - /* 0x00C */ bytecode* ptrReadPos; + /* 0x008 */ Bytecode* ptrNextLine; + /* 0x00C */ Bytecode* ptrReadPos; /* 0x010 */ u8 labelIndices[16]; /* 0x020 */ UNK_PTR labelPositions[16]; /* 0x060 */ s32 deleted; /* set to zero in KillScript when malloc'd */ - /* 0x064 */ struct script_context* blockingParent; /* parent? */ - /* 0x068 */ struct script_context* childScript; - /* 0x06C */ struct script_context* parentScript; /* brother? */ + /* 0x064 */ struct ScriptInstance* blockingParent; /* parent? */ + /* 0x068 */ struct ScriptInstance* childScript; + /* 0x06C */ struct ScriptInstance* parentScript; /* brother? */ /* 0x070 */ s32 functionTemp[4]; - /* 0x080 */ UNK_PTR callFunction; + /* 0x080 */ API_FUN(callFunction); /* 0x084 */ s32 varTable[16]; /* 0x0C4 */ s32 varFlags[3]; /* 0x0D0 */ s32 loopStartTable[8]; @@ -250,17 +251,17 @@ typedef struct script_context { /* 0x13C */ UNK_PTR array; /* 0x140 */ UNK_PTR flagArray; /* 0x144 */ s32 uniqueID; - /* 0x148 */ struct enemy* ownerActorID; /* controller*, battle ID, trigger* */ + /* 0x148 */ struct Enemy* ownerActorID; /* controller*, battle ID, trigger* */ /* 0x14C */ u32 ownerID; /* can be an npcID, a triggerID, a trigger ptr */ /* 0x150 */ f32 timeScale; /* 0x154 */ f32 frameCounter; /* 0x158 */ char unk_158[4]; - /* 0x15C */ bytecode* ptrFirstLine; - /* 0x160 */ bytecode* ptrSavedPosition; - /* 0x164 */ bytecode* ptrCurrentLine; -} script_context; // size = 0x168 + /* 0x15C */ Bytecode* ptrFirstLine; + /* 0x160 */ Bytecode* ptrSavedPosition; + /* 0x164 */ Bytecode* ptrCurrentLine; +} ScriptInstance; // size = 0x168 -typedef struct entity { +typedef struct Entity { /* 0x00 */ s32 flags; /* 0x04 */ char unk_04[7]; /* 0x0B */ u8 alpha; /* reported by rain */ @@ -268,23 +269,23 @@ typedef struct entity { /* 0x12 */ char unk_12[4]; /* 0x16 */ s16 shadowIndex; /* 0x18 */ char unk_18[16]; - /* 0x28 */ bytecode* boundScript; + /* 0x28 */ Bytecode* boundScript; /* 0x2C */ char unk_2C[12]; - /* 0x38 */ struct static_entity_data* static_data; + /* 0x38 */ struct StaticEntityData* static_data; /* 0x3C */ char unk_3C[4]; - /* 0x40 */ struct trigger* trigger; + /* 0x40 */ struct Trigger* trigger; /* 0x44 */ s32* vertexData; /* 0x48 */ f32 position[3]; /* 0x54 */ f32 scale[3]; /* 0x60 */ f32 rotation[3]; /* 0x6C */ char unk_6C[4]; - /* 0x70 */ struct matrix4f* inverseTransformMatrix; /* world-to-local */ + /* 0x70 */ struct Matrix4f* inverseTransformMatrix; /* world-to-local */ /* 0x74 */ char unk_74[60]; /* 0xB0 */ u8 radius; /* Created by retype action */ /* 0xB1 */ char unk_B1[71]; -} entity; // size = 0xF8 +} Entity; // size = 0xF8 -typedef struct static_entity_data { +typedef struct StaticEntityData { /* 0x00 */ s16 flags; /* 0x02 */ s16 argSize; /* 0x04 */ char unk_04[8]; @@ -294,9 +295,9 @@ typedef struct static_entity_data { /* 0x18 */ s32 dmaStart; /* 0x1C */ s32 dmaEnd; /* 0x20 */ char unk_20[4]; -} static_entity_data; // size = 0x24 +} StaticEntityData; // size = 0x24 -typedef struct music_player { +typedef struct MusicPlayer { /* 0x00 */ s16 unkFlags; /* 0x02 */ char unk_02[2]; /* 0x04 */ s32 fadeOutTime; @@ -305,14 +306,14 @@ typedef struct music_player { /* 0x10 */ s32 songID; /* 0x14 */ s32 variation; /* 0x18 */ char unk_18[24]; -} music_player; // size = 0x30 +} MusicPlayer; // size = 0x30 -typedef struct StaticNPC { +typedef struct StaticNpc { /* 0x000 */ s32 ID; /* 0x004 */ struct StaticNpcSettings* npcSettings; /* 0x008 */ s32 spawnPos[3]; /* 0x014 */ s32 flags; - /* 0x018 */ bytecode* initScript; + /* 0x018 */ Bytecode* initScript; /* 0x01C */ char unk_1C[8]; /* 0x024 */ s32 spawnYaw; /* 0x028 */ s16 itemDrops[25]; @@ -326,7 +327,7 @@ typedef struct StaticNPC { /* 0x1E0 */ char unk_1E0[8]; /* 0x1E8 */ UNK_PTR extraAnimations; /* 0x1EC */ s32 tattle; -} StaticNPC; // size = 0x1F0 +} StaticNpc; // size = 0x1F0 typedef struct MenuIcon { /* 0x00 */ u32 flags; @@ -350,7 +351,7 @@ typedef struct MenuIcon { /* 0x4A */ char unk_4A[10]; } MenuIcon; // size = 0x54 -typedef struct ui_status { +typedef struct UiStatus { /* 0x00 */ s32 hpIconIndexes[2]; /* 0x08 */ s32 fpIconIndexes[2]; /* 0x10 */ s32 coinIconIndex; @@ -397,21 +398,21 @@ typedef struct ui_status { /* 0x64 */ s32 iconIndex12; /* 0x68 */ s32 iconIndex13; /* 0x6C */ s8 unk_6C[4]; -} ui_status; // size = 0x70 +} UiStatus; // size = 0x70 -typedef struct collider { +typedef struct Collider { /* 0x00 */ s32 flags; /* 0x04 */ s16 nextSibling; /* 0x06 */ s16 firstChild; /* 0x08 */ s16 parentModelIndex; /* 0x0A */ s16 numTriangles; - /* 0x0C */ struct collider_triangle* triangleTable; - /* 0x10 */ struct collider_aabb* aabb; + /* 0x0C */ struct ColliderTriangle* triangleTable; + /* 0x10 */ struct ColliderBoundingBox* aabb; /* 0x14 */ char unk_14[4]; /* 0x18 */ f32* vertexTable[3]; -} collider; // size = 0x1C +} Collider; // size = 0x1C -typedef struct camera { +typedef struct Camera { /* 0x000 */ s16 flags; /* 0x002 */ s16 moveFlags; /* 0x004 */ s16 mode; @@ -433,7 +434,7 @@ typedef struct camera { /* 0x03C */ f32 lookAt_eye[3]; /* 0x048 */ f32 lookAt_obj[3]; /* 0x054 */ char unk_54[12]; - /* 0x060 */ struct vec3f targetPos; + /* 0x060 */ struct Vec3f targetPos; /* 0x06C */ f32 currentYaw; /* 0x070 */ char unk_70[4]; /* 0x074 */ f32 currentBoomYaw; @@ -444,29 +445,29 @@ typedef struct camera { /* 0x090 */ f32 currentBlendedYawNegated; /* 0x094 */ f32 currentPitch; /* 0x098 */ char unk_98[60]; - /* 0x0D4 */ struct matrix4f perspectiveMatrix; - /* 0x114 */ struct matrix4f viewMtxPlayer; /* centers on player */ - /* 0x154 */ struct matrix4f viewMtxLeading; /* leads player slightly */ - /* 0x194 */ struct matrix4f viewMtxShaking; /* used while ShakeCam is active */ + /* 0x0D4 */ struct Matrix4f perspectiveMatrix; + /* 0x114 */ struct Matrix4f viewMtxPlayer; /* centers on player */ + /* 0x154 */ struct Matrix4f viewMtxLeading; /* leads player slightly */ + /* 0x194 */ struct Matrix4f viewMtxShaking; /* used while ShakeCam is active */ /* 0x1D4 */ char unk_1D4[48]; - /* 0x204 */ struct matrix4s* unkMatrix; + /* 0x204 */ struct Matrix4s* unkMatrix; /* 0x208 */ char unk_208[572]; - /* 0x444 */ struct zone* prevZone; - /* 0x448 */ struct zone* currentZone; - /* 0x44C */ struct cam_pos_settings initialSettings; /* for start of blend between zones */ - /* 0x468 */ struct cam_pos_settings targetSettings; /* goal for blend between zones */ + /* 0x444 */ struct Zone* prevZone; + /* 0x448 */ struct Zone* currentZone; + /* 0x44C */ struct CamPosSettings initialSettings; /* for start of blend between zones */ + /* 0x468 */ struct CamPosSettings targetSettings; /* goal for blend between zones */ /* 0x484 */ f32 sinInterpAlpha; /* 0x488 */ f32 linearInterp; /* 0x48C */ f32 linearInterpScale; /* 3.0? */ /* 0x490 */ f32 moveSpeed; /* 0x494 */ char unk_494[28]; - /* 0x4B0 */ struct vec3f movePos; + /* 0x4B0 */ struct Vec3f movePos; /* 0x4BC */ char unk_4BC[28]; /* 0x4D8 */ s32 controllerType; /* 0x4DC */ f32 controllerBoomLen; /* 0x4E0 */ f32 controllerBoomPitch; - /* 0x4E4 */ struct vec3f posA; - /* 0x4F0 */ struct vec3f posB; + /* 0x4E4 */ struct Vec3f posA; + /* 0x4F0 */ struct Vec3f posB; /* 0x4FC */ f32 controllerViewPitch; /* 0x500 */ char unk_500[4]; /* 0x504 */ s16 boolTargetPlayer; @@ -474,11 +475,11 @@ typedef struct camera { /* 0x508 */ s32 panPhase; /* 0x50C */ f32 leadAmount; /* 0x510 */ char unk_510[36]; - /* 0x534 */ struct collider_aabb* aabbForZoneBelow; + /* 0x534 */ struct ColliderBoundingBox* aabbForZoneBelow; /* 0x538 */ char unk_538[32]; -} camera; // size = 0x558 +} Camera; // size = 0x558 -typedef struct battle_status { +typedef struct BattleStatus { /* 0x000 */ s32 flags1; /* 0x004 */ s32 flags2; /* 0x008 */ s32 varTable[16]; @@ -521,9 +522,9 @@ typedef struct battle_status { /* 0x0B1 */ char unk_B1[3]; /* 0x0B4 */ UNK_FUN_PTR(preUpdateCallback); /* 0x0B8 */ char unk_B8[4]; - /* 0x0BC */ struct script_context* controlScript; /* control handed over to this when changing partners, maybe general? */ + /* 0x0BC */ struct ScriptInstance* controlScript; /* control handed over to this when changing partners, maybe general? */ /* 0x0C0 */ s32 controlScriptID; - /* 0x0C4 */ struct script_context* camMovementScript; + /* 0x0C4 */ struct ScriptInstance* camMovementScript; /* 0x0C8 */ s32 camMovementScriptID; /* 0x0CC */ char unk_CC[12]; /* 0x0D8 */ struct Actor* playerActor; @@ -586,9 +587,9 @@ typedef struct battle_status { /* 0x470 */ char unk_470[10]; /* 0x47A */ u8 currentBattleSection; /* 0x47B */ char unk_47B[21]; -} battle_status; // size = 0x490 +} BattleStatus; // size = 0x490 -typedef struct texture_header { +typedef struct TextureHeader { /* 0x00 */ s8 name[32]; /* 0x20 */ s16 auxW; /* 0x22 */ s16 mainW; @@ -602,7 +603,7 @@ typedef struct texture_header { /* 0x2D */ u8 wrapH; /* 0x2E */ u8 wrapV; /* 0x2F */ u8 filtering; -} texture_header; // size = 0x30 +} TextureHeader; // size = 0x30 typedef struct StaticActorData { /* 0x00 */ s32 flags; @@ -629,7 +630,7 @@ typedef struct StaticActorData { /* 0x26 */ u8 statusMessageOffset[2]; } StaticActorData; // size = 0x28 -typedef struct move_table_entry { +typedef struct StaticMove { /* 0x00 */ s32 moveNameID; /* 0x04 */ s32 flags; /* 0x08 */ s32 worldDescID; @@ -638,42 +639,26 @@ typedef struct move_table_entry { /* 0x11 */ u8 costFP; /* 0x12 */ u8 costBP; /* 0x13 */ u8 actionCommandID; -} move_table_entry; // size = 0x14 +} StaticMove; // size = 0x14 -typedef struct collision_data { +typedef struct CollisionData { /* 0x00 */ f32* vertices[3]; - /* 0x04 */ struct collider* collider_list; - /* 0x08 */ struct collider_aabb** aabbs; + /* 0x04 */ struct Collider* collider_list; + /* 0x08 */ struct ColliderBoundingBox** aabbs; /* 0x0C */ s16 numColliders; /* 0x0E */ char unk_0E[2]; -} collision_data; // size = 0x10 +} CollisionData; // size = 0x10 -typedef struct StaticNpcSettings { - /* 0x00 */ char unk_00[4]; - /* 0x04 */ s16 height; - /* 0x06 */ s16 radius; - /* 0x08 */ UNK_PTR otherAI; - /* 0x0C */ bytecode* interactScript; - /* 0x10 */ bytecode* aiScript; - /* 0x14 */ bytecode* hitScript; - /* 0x18 */ bytecode* auxScript; - /* 0x1C */ bytecode* defeatScript; - /* 0x20 */ s32 flags; - /* 0x24 */ char unk_24[4]; - /* 0x28 */ s16 level; - /* 0x2A */ s16 unkFlags; -} StaticNpcSettings; // size = 0x2C - -typedef struct model { +typedef struct Model { /* 0x00 */ s16 flags; /* 0x02 */ s16 modelID; /* 0x04 */ char unk_04[4]; /* 0x08 */ s32* modelNode; - /* 0x0C */ struct model_group_data* groupData; + /* 0x0C */ struct ModelGroupData* groupData; /* 0x10 */ s32* currentSpecialMatrix; /* 0x14 */ char unk_14[4]; - /* 0x18 */ struct matrix4s specialMatrix; - /* 0x58 */ struct matrix4f transformMatrix; + /* 0x18 */ struct Matrix4s specialMatrix; + /* 0x58 */ struct Matrix4f transformMatrix; /* 0x98 */ f32 center[3]; /* Created by retype action */ /* 0xA4 */ u8 texPannerID; /* 0xA5 */ u8 specialDisplayListID; @@ -681,28 +666,28 @@ typedef struct model { /* 0xA7 */ char unk_A7; /* 0xA8 */ u8 textureID; /* 0xA9 */ char unk_A9[7]; -} model; // size = 0xB0 +} Model; // size = 0xB0 -typedef struct animated_mesh { +typedef struct AnimatedMesh { /* 0x000 */ s32 flags; /* 0x004 */ u8 renderMode; /* 0x005 */ char unk_05[3]; /* 0x008 */ u32* animation1; /* 0x00C */ u32* animation2; /* 0x010 */ char unk_10[136]; - /* 0x098 */ struct matrix4s mtx; + /* 0x098 */ struct Matrix4s mtx; /* 0x0D8 */ char unk_D8[500]; /* 0x2CC */ s32 time; /* 0x2D0 */ char unk_2D0[16]; -} animated_mesh; // size = 0x2E0 +} AnimatedMesh; // size = 0x2E0 -typedef struct print_handle { +typedef struct PrintHandle { /* 0x000 */ char unk_00[16]; /* 0x010 */ s8* printbuf; /* Created by retype action */ /* 0x014 */ char unk_14[1344]; -} print_handle; // size = 0x554 +} PrintHandle; // size = 0x554 -typedef struct other_print { +typedef struct OtherPrint { /* 0x00 */ char unk_00[16]; /* 0x10 */ f32 stringScaleH; /* 0x14 */ f32 stringScaleW; @@ -711,15 +696,15 @@ typedef struct other_print { /* 0x20 */ char unk_20[32]; /* 0x40 */ s32 currentPosX; /* 0x44 */ char unk_44[16]; -} other_print; // size = 0x54 +} OtherPrint; // size = 0x54 -typedef struct collider_aabb { +typedef struct ColliderBoundingBox { /* 0x00 */ f32 min[3]; /* 0x0C */ f32 max[3]; /* 0x18 */ s32 flagsForCollider; -} collider_aabb; // size = 0x1C +} ColliderBoundingBox; // size = 0x1C -typedef struct item_table_entry { +typedef struct StaticItem { /* 0x00 */ s32 nameString; /* 0x04 */ s16 iconID; /* 0x06 */ s16 badgeSortPriority; @@ -733,18 +718,18 @@ typedef struct item_table_entry { /* 0x1B */ u8 potencyA; /* 0x1C */ u8 potencyB; /* 0x1D */ char unk_1D[3]; -} item_table_entry; // size = 0x20 +} StaticItem; // size = 0x20 -typedef struct effect { +typedef struct Effect { /* 0x00 */ char unk_00[32]; -} effect; // size = 0x20 +} Effect; // size = 0x20 -typedef struct item_entity { +typedef struct ItemEntity { /* 0x00 */ s32 flags; /* 0x04 */ s16 boundVar; /* see make_item_entity */ /* 0x06 */ char unk_06[2]; - /* 0x08 */ struct vec3f position; - /* 0x14 */ struct item_entity_physics_data* physicsData; + /* 0x08 */ struct Vec3f position; + /* 0x14 */ struct ItemEntityPhysicsData* physicsData; /* 0x18 */ s16 itemID; /* into item table, also worldIconID */ /* 0x1A */ u8 state; /* 0x1B */ u8 type; @@ -760,36 +745,36 @@ typedef struct item_entity { /* 0x2F */ char unk_2F; /* 0x30 */ f32 scale; /* 0x34 */ char unk_34[40]; -} item_entity; // size = 0x5C +} ItemEntity; // size = 0x5C -typedef struct model_node { +typedef struct ModelNode { /* 0x00 */ s32 type; /* 2 = model */ /* 0x04 */ UNK_PTR displayList; /* 0x08 */ s32 numProperties; /* 0x0C */ UNK_PTR propertyList; - /* 0x10 */ struct model_group_data* groupData; -} model_node; // size = 0x14 + /* 0x10 */ struct ModelGroupData* groupData; +} ModelNode; // size = 0x14 -typedef struct static_shadow_data { +typedef struct StaticShadowData { /* 0x00 */ s16 flags; /* 0x02 */ char unk_02[34]; -} static_shadow_data; // size = 0x24 +} StaticShadowData; // size = 0x24 -typedef struct sprite_component { +typedef struct SpriteComponent { /* 0x00 */ char unk_00[8]; /* 0x08 */ s16** readPos; /* 0x0C */ f32 waitTime; /* 0x10 */ s32 loopCounter; /* 0x14 */ s32 currentRaster; /* 0x18 */ s32 currentPalette; - /* 0x1C */ struct vec3f posOffset; - /* 0x28 */ struct vec3f compPos; - /* 0x34 */ struct vec3f rotation; - /* 0x40 */ struct vec3f scale; + /* 0x1C */ struct Vec3f posOffset; + /* 0x28 */ struct Vec3f compPos; + /* 0x34 */ struct Vec3f rotation; + /* 0x40 */ struct Vec3f scale; /* 0x4C */ char unk_4C[4]; -} sprite_component; // size = 0x50 +} SpriteComponent; // size = 0x50 -typedef struct print_context { +typedef struct PrintContext { /* 0x000 */ s8* string; /* 0x004 */ s16 bufPos; /* 0x006 */ char unk_06[2]; @@ -819,9 +804,9 @@ typedef struct print_context { /* 0x536 */ s16 height; /* 0x538 */ s16 width; /* 0x53A */ char unk_53A[30]; -} print_context; // size = 0x558 +} PrintContext; // size = 0x558 -typedef struct game_status { +typedef struct GameStatus { /* 0x000 */ u32 currentButtons; /* 0x004 */ u32 altCurrentButtons; /* input used for batte when flag 80000 set */ /* 0x008 */ char unk_08[8]; @@ -862,7 +847,7 @@ typedef struct game_status { /* 0x08E */ s16 entryID; /* 0x090 */ char unk_90[4]; /* 0x094 */ f32 exitAngle; - /* 0x098 */ struct vec3f playerPos; + /* 0x098 */ struct Vec3f playerPos; /* 0x0A4 */ f32 playerYaw; /* 0x0A8 */ char unk_A8[4]; /* 0x0AC */ s8 loadMenuState; @@ -879,7 +864,7 @@ typedef struct game_status { /* 0x138 */ s32 nextRNG; /* 0x13C */ char unk_13C[4]; /* 0x140 */ UNK_PTR shopItemData; - /* 0x144 */ struct shop* mapShop; + /* 0x144 */ struct Shop* mapShop; /* 0x148 */ s16 enableBackground; /* (bit 2 is also used for something) */ /* 0x14A */ s16 backgroundMinW; /* 0x14C */ s16 backgroundMinH; @@ -895,21 +880,21 @@ typedef struct game_status { /* 0x167 */ u8 loadType; /* (0 = from map, 1 = from main menu) */ /* 0x168 */ s32 saveCount; /* 0x16C */ char unk_16C[12]; -} game_status; // size = 0x178 +} GameStatus; // size = 0x178 -typedef struct partner_anim_set { +typedef struct PartnerAnimations { /* 0x00 */ char unk_00[36]; -} partner_anim_set; // size = 0x24 +} PartnerAnimations; // size = 0x24 -typedef struct shadow { +typedef struct Shadow { /* 0x00 */ s32 flags; /* 0x04 */ char unk_04[12]; - /* 0x10 */ struct vec3f position; - /* 0x1C */ struct vec3f scale; + /* 0x10 */ struct Vec3f position; + /* 0x1C */ struct Vec3f scale; /* 0x28 */ char unk_28[80]; -} shadow; // size = 0x78 +} Shadow; // size = 0x78 -typedef struct push_block_grid { +typedef struct PushBlockGrid { /* 0x00 */ s8* cells; /* 0x04 */ u8 numCellsX; /* 0x05 */ u8 numCellsZ; @@ -917,9 +902,9 @@ typedef struct push_block_grid { /* 0x08 */ s32 centerPos[3]; /* 0x14 */ UNK_FUN_PTR(dropCallback); /* 0x18 */ char unk_18[4]; -} push_block_grid; // size = 0x1C +} PushBlockGrid; // size = 0x1C -typedef struct item_entity_physics_data { +typedef struct ItemEntityPhysicsData { /* 0x00 */ f32 verticalVelocity; /* 0x04 */ f32 gravity; /* 2 = normal, 1 = low gravity, higher values never 'settle' */ /* 0x08 */ char unk_08[4]; @@ -928,16 +913,16 @@ typedef struct item_entity_physics_data { /* 0x14 */ f32 velz; /* 0x18 */ f32 moveAngle; /* 0x1C */ char unk_1C[8]; -} item_entity_physics_data; // size = 0x24 +} ItemEntityPhysicsData; // size = 0x24 -typedef struct render_task { +typedef struct RenderTask { /* 0x00 */ s32 renderMode; /* 0x04 */ s32 dist; /* value between 0 and -10k */ - /* 0x08 */ struct model* model; + /* 0x08 */ struct Model* model; /* 0x0C */ UNK_FUN_PTR(fpBuildDL); /* function for making display list for model */ -} render_task; // size = 0x10 +} RenderTask; // size = 0x10 -typedef struct selectable_target { +typedef struct SelectableTarget { /* 0x00 */ s16 actorID; /* 0x02 */ s16 partID; /* sometimes loaded as byte from 0x3 */ /* 0x04 */ s16 pos[3]; @@ -945,9 +930,9 @@ typedef struct selectable_target { /* 0x11 */ u8 homeCol; /* from xpos --> 0-3 */ /* 0x12 */ u8 homeRow; /* from ypos --> 0-3 */ /* 0x13 */ u8 layer; /* from zpos? --> 0-1 */ -} selectable_target; // size = 0x14 +} SelectableTarget; // size = 0x14 -typedef struct actor_part_movement { +typedef struct ActorPartMovement { /* 0x00 */ char unk_00[12]; /* 0x0C */ f32 goalPos[3]; /* 0x18 */ char unk_18[12]; @@ -955,23 +940,23 @@ typedef struct actor_part_movement { /* 0x28 */ f32 moveSpeed; /* 0x2C */ char unk_2C[32]; /* 0x4C */ s32 varTable[16]; -} actor_part_movement; // size = 0x8C +} ActorPartMovement; // size = 0x8C typedef struct ActorPart { /* 0x00 */ s32 flags; /* 0x04 */ s32 targetFlags; /* initialized to 0 */ /* 0x08 */ struct StaticActorPart* staticData; /* 0x0C */ struct ActorPart* nextPart; - /* 0x10 */ struct actor_part_movement* movement; + /* 0x10 */ struct ActorPartMovement* movement; /* 0x14 */ s16 partOffset[3]; /* 0x1A */ s16 visualOffset[3]; - /* 0x20 */ struct vec3f partOffsetFloat; - /* 0x2C */ struct vec3f absolutePosition; - /* 0x38 */ struct vec3f rotation; + /* 0x20 */ struct Vec3f partOffsetFloat; + /* 0x2C */ struct Vec3f absolutePosition; + /* 0x38 */ struct Vec3f rotation; /* 0x44 */ s16 rotationPivotOffset[3]; /* 0x4A */ char unk_4A[2]; /* 0x4C */ f32 scale[3]; - /* 0x58 */ struct vec3f currentPos; + /* 0x58 */ struct Vec3f currentPos; /* 0x64 */ f32 yaw; /* 0x68 */ s16 unkOffset[2]; /* 0x6C */ s16 targetOffset[2]; @@ -989,14 +974,14 @@ typedef struct ActorPart { /* 0x94 */ u32* idleAnimations; /* 0x98 */ s16 opacity; /* 0x9A */ char unk_9A[2]; - /* 0x9C */ struct shadow* shadow; + /* 0x9C */ struct Shadow* shadow; /* 0xA0 */ f32 shadowScale; /* 0xA4 */ s32 partTypeData[6]; /* 0xBC */ s16 actorTypeData2b[2]; - /* 0xC0 */ struct decoration_table* decorationTable; /* initialized to 0 */ + /* 0xC0 */ struct DecorationTable* decorationTable; /* initialized to 0 */ } ActorPart; // size = 0xC4 -typedef struct collider_triangle { +typedef struct ColliderTriangle { /* 0x00 */ f32* v1[3]; /* note: the order of v1,2,3 is reversed from the ijk in the hit file */ /* 0x04 */ f32* v2[3]; /* 0x08 */ f32* v3[3]; @@ -1006,34 +991,34 @@ typedef struct collider_triangle { /* 0x30 */ f32 normal[3]; /* 0x3C */ s16 oneSided; /* 1 = yes, 0 = no */ /* 0x3E */ char unk_3E[2]; -} collider_triangle; // size = 0x40 +} ColliderTriangle; // size = 0x40 -typedef struct partner_table_entry { +typedef struct StaticPartner { /* 0x00 */ s32 dmaStart; /* 0x04 */ s32 dmaEnd; /* 0x08 */ s32 dmaDest; /* 0x0C */ s32 isFlying; /* 0x10 */ UNK_FUN_PTR(fpInit); - /* 0x14 */ bytecode* spScriptA; - /* 0x18 */ bytecode* spScriptB; - /* 0x1C */ bytecode* spScriptC; - /* 0x20 */ bytecode* spScriptD; + /* 0x14 */ Bytecode* spScriptA; + /* 0x18 */ Bytecode* spScriptB; + /* 0x1C */ Bytecode* spScriptC; + /* 0x20 */ Bytecode* spScriptD; /* 0x24 */ s32 idleAnim; /* 0x28 */ UNK_FUN_PTR(fpFuncA); /* 0x2C */ UNK_FUN_PTR(fpFuncB); /* 0x30 */ UNK_FUN_PTR(fpFuncC); /* 0x34 */ UNK_FUN_PTR(fpFuncD); /* 0x38 */ UNK_FUN_PTR(fpFuncE); - /* 0x3C */ bytecode* spScriptX; -} partner_table_entry; // size = 0x40 + /* 0x3C */ Bytecode* spScriptX; +} StaticPartner; // size = 0x40 -typedef struct font_raster_set { +typedef struct FontRasterSet { /* 0x00 */ u8 sizeX; /* 0x01 */ u8 sizeY; /* 0x02 */ char unk_02[10]; -} font_raster_set; // size = 0x0C +} FontRasterSet; // size = 0x0C -typedef struct trigger_bp { +typedef struct TriggerBp { /* 0x00 */ s32 flags; /* 0x04 */ s16 colliderIndex; /* 0x06 */ char unk_06[2]; @@ -1042,9 +1027,9 @@ typedef struct trigger_bp { /* 0x10 */ char unk_10[8]; /* 0x18 */ s32 inputArg3; /* 0x1C */ char unk_1C[4]; -} trigger_bp; // size = 0x20 +} TriggerBp; // size = 0x20 -typedef struct collision_status { +typedef struct CollisionStatus { /* 0x00 */ s16 pushingAgainstWall; /* FFFF = none for all below VVV */ /* 0x02 */ s16 currentFloor; /* valid on touch */ /* 0x04 */ s16 lastTouchedFloor; /* valid after jump */ @@ -1057,9 +1042,9 @@ typedef struct collision_status { /* 0x18 */ s16 bombetteExploded; /* 0 = yes, FFFF = no */ /* 0x1A */ char unk_1A[2]; /* 0x1C */ f32 bombetteExplositionPos[3]; -} collision_status; // size = 0x28 +} CollisionStatus; // size = 0x28 -typedef struct decoration_table { +typedef struct DecorationTable { /* 0x000 */ char unk_00[2012]; /* 0x7DC */ s16 scale[16]; /* 0x7FC */ s16 posX[16]; @@ -1074,47 +1059,43 @@ typedef struct decoration_table { /* 0x8AD */ char unk_8AD[11]; /* 0x8B8 */ u8 decorationType[2]; /* 0x8BA */ char unk_8BA[46]; -} decoration_table; // size = 0x8E8 +} DecorationTable; // size = 0x8E8 -typedef struct render_task_entry { - /* 0x00 */ char unk_00[16]; -} render_task_entry; // size = 0x10 - -typedef struct shop { +typedef struct Shop { /* 0x000 */ char unk_00[20]; /* 0x014 */ UNK_PTR staticItemPositions; /* 0x018 */ UNK_PTR staticInventory; /* 0x01C */ UNK_PTR staticPriceList; /* 0x020 */ char unk_20[828]; -} shop; // size = 0x35C +} Shop; // size = 0x35C -typedef struct encounter { +typedef struct Encounter { /* 0x00 */ s32 count; - /* 0x04 */ struct enemy* enemy[16]; + /* 0x04 */ struct Enemy* enemy[16]; /* 0x08 */ char unk_08[60]; /* 0x44 */ s16 battle; /* 0x46 */ s16 stage; /* 0x48 */ s16 encounterID; /* 0x4A */ char unk_4A[2]; -} encounter; // size = 0x4C +} Encounter; // size = 0x4C -typedef struct player_path_element { +typedef struct PlayerPathElement { /* 0x00 */ char unk_00[4]; - /* 0x04 */ struct vec3f pos; -} player_path_element; // size = 0x10 + /* 0x04 */ struct Vec3f pos; +} PlayerPathElement; // size = 0x10 -typedef struct animated_model { +typedef struct AnimatedModel { /* 0x00 */ s32 animModelID; - /* 0x04 */ struct vec3f pos; /* Created by retype action */ - /* 0x10 */ struct vec3f rot; - /* 0x1C */ struct vec3f scale; - /* 0x28 */ struct matrix4s* mtx; + /* 0x04 */ struct Vec3f pos; /* Created by retype action */ + /* 0x10 */ struct Vec3f rot; + /* 0x1C */ struct Vec3f scale; + /* 0x28 */ struct Matrix4s* mtx; /* 0x2C */ char unk_2C[60]; /* 0x68 */ u32 currentAnimData; /* 0x6C */ char unk_6C[4]; -} animated_model; // size = 0x70 +} AnimatedModel; // size = 0x70 -typedef struct collision_header { +typedef struct CollisionHeader { /* 0x00 */ s16 numColliders; /* 0x02 */ char unk_02[2]; /* 0x04 */ s32 treeOffset; @@ -1125,24 +1106,24 @@ typedef struct collision_header { /* 0x12 */ char unk_12[2]; /* 0x14 */ s32 bbTableOffset; /* 0x18 */ char unk_18[8]; -} collision_header; // size = 0x20 +} CollisionHeader; // size = 0x20 -typedef struct zone { +typedef struct Zone { /* 0x00 */ s32 type; /* 0x04 */ f32 boomLength; /* 0x08 */ f32 boomPitch; /* 0x0C */ f32 pos[6]; /* 0x24 */ f32 viewPitch; /* 0x28 */ s32 flag; -} zone; // size = 0x2C +} Zone; // size = 0x2C typedef struct Actor { /* 0x000 */ s32 flags; /* 0x004 */ char unk_04[4]; /* 0x008 */ struct StaticActorData* staticActorData; - /* 0x00C */ struct vec3f moveCurrentPos; - /* 0x018 */ struct vec3f moveGoalPos; - /* 0x024 */ struct vec3f moveEndPos; /* where other actors should target this one at. saved before partner switching */ + /* 0x00C */ struct Vec3f moveCurrentPos; + /* 0x018 */ struct Vec3f moveGoalPos; + /* 0x024 */ struct Vec3f moveEndPos; /* where other actors should target this one at. saved before partner switching */ /* 0x030 */ char unk_30[24]; /* 0x048 */ f32 jumpAccel; /* 0x04C */ f32 moveSpeed; @@ -1160,9 +1141,9 @@ typedef struct Actor { /* 0x077 */ u8 jumpPartIndex; /* 0x078 */ char unk_78[16]; /* 0x088 */ s32 varTable[16]; - /* 0x0C8 */ struct vec3f flyCurrentPos; - /* 0x0D4 */ struct vec3f flyGoalPos; - /* 0x0E0 */ struct vec3f flyTempPos; /* used for start in fly functions, end in flyrun functions */ + /* 0x0C8 */ struct Vec3f flyCurrentPos; + /* 0x0D4 */ struct Vec3f flyGoalPos; + /* 0x0E0 */ struct Vec3f flyTempPos; /* used for start in fly functions, end in flyrun functions */ /* 0x0EC */ char unk_EC[24]; /* 0x104 */ f32 flyJumpAccel; /* 0x108 */ f32 flySpeed; @@ -1177,8 +1158,8 @@ typedef struct Actor { /* 0x135 */ u8 footStepCounter; /* 0x136 */ u8 actorType; /* 0x137 */ char unk_137; - /* 0x138 */ struct vec3f homePos; - /* 0x144 */ struct vec3f currentPos; + /* 0x138 */ struct Vec3f homePos; + /* 0x144 */ struct Vec3f currentPos; /* 0x150 */ s16 otherPosheadOffset[3]; /* 0x156 */ s16 healthBarPosition[3]; /* 0x15C */ f32 rotation[3]; @@ -1198,14 +1179,14 @@ typedef struct Actor { /* 0x1BA */ char unk_1BA[2]; /* 0x1BC */ u8 hpFraction; /* used to render HP bar */ /* 0x1BD */ char unk_1BD[3]; - /* 0x1C0 */ bytecode* idleCode; - /* 0x1C4 */ bytecode* takeTurnCode; - /* 0x1C8 */ bytecode* onHitCode; - /* 0x1CC */ bytecode* onTurnChangeCode; - /* 0x1D0 */ struct script_context* idleScript; - /* 0x1D4 */ struct script_context* takeTurnScript; - /* 0x1D8 */ struct script_context* onHitScript; - /* 0x1DC */ struct script_context* onTurnChangeScript; + /* 0x1C0 */ Bytecode* idleCode; + /* 0x1C4 */ Bytecode* takeTurnCode; + /* 0x1C8 */ Bytecode* onHitCode; + /* 0x1CC */ Bytecode* onTurnChangeCode; + /* 0x1D0 */ struct ScriptInstance* idleScript; + /* 0x1D4 */ struct ScriptInstance* takeTurnScript; + /* 0x1D8 */ struct ScriptInstance* onHitScript; + /* 0x1DC */ struct ScriptInstance* onTurnChangeScript; /* 0x1E0 */ s32 idleScriptID; /* 0x1E4 */ s32 takeTurnID; /* 0x1E8 */ s32 onHitID; @@ -1241,7 +1222,7 @@ typedef struct Actor { /* 0x223 */ u8 chillOutAmount; /* attack reduction */ /* 0x224 */ u8 chillOutTurns; /* 0x225 */ char unk_225[7]; - /* 0x22C */ struct selectable_target targetData[24]; + /* 0x22C */ struct SelectableTarget targetData[24]; /* 0x40C */ u8 targetListLength; /* 0x40D */ u8 targetIndexList[24]; /* into targetData */ /* 0x425 */ u8 selectedTargetIndex; /* into target index list */ @@ -1249,7 +1230,7 @@ typedef struct Actor { /* 0x427 */ char unk_427; /* 0x428 */ s16 targetActorID; /* 0x42A */ char unk_42A[2]; - /* 0x42C */ struct shadow* shadow; /* might be shadow ID */ + /* 0x42C */ struct Shadow* shadow; /* might be shadow ID */ /* 0x430 */ f32 shadowScale; /* = actor size / 24.0 */ /* 0x434 */ s16 renderMode; /* initially 0xD, set to 0x22 if any part is transparent */ /* 0x436 */ char unk_436[2]; @@ -1270,7 +1251,7 @@ typedef struct StaticActorPart { /* 0x1C */ char unk_1C[8]; } StaticActorPart; // size = 0x24 -typedef struct tile_descriptor { +typedef struct TileDescriptor { /* 0x00 */ s8 name[32]; /* 0x20 */ s16 auxW; /* 0x22 */ s16 mainW; @@ -1284,30 +1265,30 @@ typedef struct tile_descriptor { /* 0x2D */ u8 wrapH; /* 0x2E */ u8 wrapV; /* 0x2F */ u8 filtering; -} tile_descriptor; // size = 0x30 +} TileDescriptor; // size = 0x30 -typedef struct { +typedef struct BackgroundHeader { /* 0x00 */ u32 raster; /* 0x04 */ u32 palette; /* 0x08 */ u16 startX; /* 0x0A */ u16 startY; /* 0x0C */ u16 width; /* 0x0E */ u16 height; -} bg_header; // size = 0x10 +} BackgroundHeader; // size = 0x10 -typedef struct model_group_data { +typedef struct ModelGroupData { /* 0x00 */ UNK_PTR transformMatrix; /* 0x04 */ UNK_PTR lightingGroup; /* 0x08 */ s32 numLights; /* 0x0C */ s32 numChildren; - /* 0x10 */ struct model_node** childList; -} model_group_data; // size = 0x14 + /* 0x10 */ struct ModelNode** childList; +} ModelGroupData; // size = 0x14 -typedef struct font_data { +typedef struct FontData { /* 0x00 */ char unk_00[24]; -} font_data; // size = 0x18 +} FontData; // size = 0x18 -typedef struct crash { +typedef struct Crash { /* 0x000 */ char unk_00[20]; /* 0x014 */ s32 threadID; /* 0x018 */ char unk_18[12]; @@ -1326,9 +1307,9 @@ typedef struct crash { /* 0x120 */ s32 interrupt; /* 0x124 */ s32 VA; /* Created by retype action */ /* 0x128 */ char unk_128[208]; -} crash; // size = 0x1F8 +} Crash; // size = 0x1F8 -typedef struct player_status { +typedef struct PlayerStatus { /* 0x000 */ s32 flags; /* 0x004 */ u32 animFlags; /* 0x008 */ s16 framesOnGround; /* Number of frames since last jump landed */ @@ -1339,8 +1320,8 @@ typedef struct player_status { /* 0x014 */ u8 enableCollisionOverlapsCheck; /* 0x015 */ u8 statusMenuCounterinputEnabledCounter; /* whether the C-up menu can appear */ /* 0x016 */ s16 lastGoodPosition[3]; - /* 0x01C */ struct vec3f extraVelocity; - /* 0x028 */ struct vec3f position; + /* 0x01C */ struct Vec3f extraVelocity; + /* 0x028 */ struct Vec3f position; /* 0x034 */ char unk_34[16]; /* 0x044 */ f32 decorationPos[2]; /* 0x04C */ char unk_4C[4]; @@ -1384,18 +1365,15 @@ typedef struct player_status { /* 0x190 */ f32 stickYBuffer[10]; /* 0x1B8 */ s32 inputBufPos; /* 0x1BC */ char unk_1BC[204]; -} player_status; // size = 0x288 +} PlayerStatus; // size = 0x288 -typedef struct character_set { -} character_set; // size = 0x00 - -typedef struct anim_model_node { +typedef struct AnimatedModelNode { /* 0x00 */ u32* displayList; /* 0x04 */ s16 rot[3]; /* range = -180,180 */ /* 0x0A */ char unk_0A[34]; -} anim_model_node; // size = 0x2C +} AnimatedModelNode; // size = 0x2C -typedef struct encounter_status { +typedef struct EncounterStatus { /* 0x00 */ s32 flags; /* 0x04 */ u8 eFirstStrike; /* 0 = none, 1 = player, 2 = enemy */ /* 0x05 */ u8 hitType; /* 1 = none/enemy, 2 = jump */ @@ -1418,11 +1396,11 @@ typedef struct encounter_status { /* 0x20 */ u8 mapID; /* 0x21 */ char unk_21[3]; /* 0x24 */ s32* npcGroupList; - /* 0x28 */ struct encounter* enounterList[24]; + /* 0x28 */ struct Encounter* enounterList[24]; /* 0x2C */ char unk_2C[92]; - /* 0x88 */ struct encounter* currentEncounter; - /* 0x8C */ struct enemy* currentEnemy; + /* 0x88 */ struct Encounter* currentEncounter; + /* 0x8C */ struct Enemy* currentEnemy; /* 0x90 */ char unk_90[4]; -} encounter_status; // size = 0x94 +} EncounterStatus; // size = 0x94 #endif diff --git a/include/enums.h b/include/enums.h index 519092dd23..a2247d75d4 100644 --- a/include/enums.h +++ b/include/enums.h @@ -2,1430 +2,1340 @@ #define _ENUMS_H_ #include "ultra64.h" -#include "types.h" +#include "types.h" -typedef UNK_TYPE ENCOUNTER_TRIGGER; -#define ENCOUNTER_TRIGGER_NONE 0x00000001 -#define ENCOUNTER_TRIGGER_JUMP 0x00000002 -#define ENCOUNTER_TRIGGER_SPIN 0x00000003 -#define ENCOUNTER_TRIGGER_HAMMER 0x00000004 -#define ENCOUNTER_TRIGGER_PARTNER 0x00000006 +typedef UNK_TYPE EncounterTriggerFlags; +#define EncounterTriggerFlags_NONE 0x00000001 +#define EncounterTriggerFlags_JUMP 0x00000002 +#define EncounterTriggerFlags_SPIN 0x00000003 +#define EncounterTriggerFlags_HAMMER 0x00000004 +#define EncounterTriggerFlags_PARTNER 0x00000006 -typedef UNK_TYPE PARTNER; -#define PARTNER_NONE 0x00000000 -#define PARTNER_GOOMBARIO 0x00000001 -#define PARTNER_KOOPER 0x00000002 -#define PARTNER_BOMBETTE 0x00000003 -#define PARTNER_PARAKARRY 0x00000004 -#define PARTNER_GOOMPA 0x00000005 -#define PARTNER_WATT 0x00000006 -#define PARTNER_SUSHIE 0x00000007 -#define PARTNER_LAKILESTER 0x00000008 -#define PARTNER_BOW 0x00000009 -#define PARTNER_GOOMBARIA 0x0000000A -#define PARTNER_TWINK 0x0000000B +typedef UNK_TYPE PartnerId; +#define PartnerId_NONE 0x00000000 +#define PartnerId_GOOMBARIO 0x00000001 +#define PartnerId_KOOPER 0x00000002 +#define PartnerId_BOMBETTE 0x00000003 +#define PartnerId_PARAKARRY 0x00000004 +#define PartnerId_GOOMPA 0x00000005 +#define PartnerId_WATT 0x00000006 +#define PartnerId_SUSHIE 0x00000007 +#define PartnerId_LAKILESTER 0x00000008 +#define PartnerId_BOW 0x00000009 +#define PartnerId_GOOMBARIA 0x0000000A +#define PartnerId_TWINK 0x0000000B -typedef UNK_TYPE SPRITE; -#define SPRITE_WORLD_GOOMBARIO 0x00000001 -#define SPRITE_WORLD_KOOPER 0x00000002 -#define SPRITE_WORLD_BOMBETTE 0x00000003 -#define SPRITE_WORLD_PARAKARRY 0x00000004 -#define SPRITE_WORLD_BOW 0x00000005 -#define SPRITE_WORLD_WATT 0x00000006 -#define SPRITE_WORLD_SUSHI 0x00000007 -#define SPRITE_WORLD_LAKILESTER 0x00000008 -#define SPRITE_BATTLE_GOOMBARIO 0x00000009 -#define SPRITE_BATTLE_KOOPER 0x0000000A -#define SPRITE_BATTLE_BOMBETTE 0x0000000B -#define SPRITE_BATTLE_PARAKARRY 0x0000000C -#define SPRITE_BATTLE_BOW 0x0000000D -#define SPRITE_BATTLE_WATT 0x0000000E -#define SPRITE_BATTLE_SUSHI 0x0000000F -#define SPRITE_BATTLE_LAKILESTER 0x00000010 -#define SPRITE_KOOPER_WITHOUT_SHELL 0x00000011 -#define SPRITE_WORLD_ELDSTAR 0x00000012 -#define SPRITE_WORLD_MAMAR 0x00000013 -#define SPRITE_WORLD_SKOLAR 0x00000014 -#define SPRITE_WORLD_MUSKULAR 0x00000015 -#define SPRITE_WORLD_MISSTAR 0x00000016 -#define SPRITE_WORLD_KLEVAR 0x00000017 -#define SPRITE_WORLD_KALMAR 0x00000018 -#define SPRITE_BATTLE_ELDSTAR 0x00000019 -#define SPRITE_BATTLE_MAMAR 0x0000001A -#define SPRITE_BATTLE_SKOLAR 0x0000001B -#define SPRITE_BATTLE_MUSKULAR 0x0000001C -#define SPRITE_BATTLE_MISSTAR 0x0000001D -#define SPRITE_BATTLE_KLEVAR 0x0000001E -#define SPRITE_BATTLE_KALMAR 0x0000001F -#define SPRITE_TWINK 0x00000020 -#define SPRITE_JR_TROOPA 0x00000021 -#define SPRITE_SPIKED_JR_TROOPA 0x00000022 -#define SPRITE_SPIKED_PARA_JR_TROOPA 0x00000023 -#define SPRITE_MAGE_JR_TROOPA 0x00000024 -#define SPRITE_PARA_JR_TROOPA 0x00000025 -#define SPRITE_GOOMBA 0x00000026 -#define SPRITE_SPIKED_GOOMBA 0x00000027 -#define SPRITE_PARAGOOMBA 0x00000028 -#define SPRITE_KOOPA_TROOPA 0x00000029 -#define SPRITE_PARA_TROOPA 0x0000002A -#define SPRITE_FUZZY 0x0000002B -#define SPRITE_BOMBOMB 0x0000002C -#define SPRITE_BULLET_BILL 0x0000002D -#define SPRITE_BILL_BLASTER 0x0000002E -#define SPRITE_MONTY_MOLE 0x0000002F -#define SPRITE_CLEFT 0x00000030 -#define SPRITE_POKEY 0x00000031 -#define SPRITE_BANDIT 0x00000032 -#define SPRITE_BUZZY_BEETLE 0x00000033 -#define SPRITE_SWOOPER 0x00000034 -#define SPRITE_STONE_CHOMP 0x00000035 -#define SPRITE_PUTRID_PIRANHA 0x00000036 -#define SPRITE_PIRANHA_PLANT 0x00000037 -#define SPRITE_SENTINEL 0x00000038 -#define SPRITE_WORLD_CLUBBA 0x00000039 -#define SPRITE_BATTLE_CLUBBA 0x0000003A -#define SPRITE_SHY_GUY 0x0000003B -#define SPRITE_GROOVE_GUY 0x0000003C -#define SPRITE_SKY_GUY 0x0000003D -#define SPRITE_PYRO_GUY 0x0000003E -#define SPRITE_SPY_GUY 0x0000003F -#define SPRITE_MEDI_GUY 0x00000040 -#define SPRITE_FUZZIPEDE 0x00000041 -#define SPRITE_JUNGLE_GUY 0x00000042 -#define SPRITE_HEART_PLANT 0x00000043 -#define SPRITE_HURT_PLANT 0x00000044 -#define SPRITE_M_BUSH 0x00000045 -#define SPRITE_BUBBLE 0x00000046 -#define SPRITE_KENT_C_KOOPA 0x00000047 -#define SPRITE_DAYZEE 0x00000048 -#define SPRITE_LAKITU 0x00000049 -#define SPRITE_SPINY 0x0000004A -#define SPRITE_BZZAP 0x0000004B -#define SPRITE_RUFF_PUFF 0x0000004C -#define SPRITE_SPIKE_TOP 0x0000004D -#define SPRITE_DUPLIGHOST 0x0000004E -#define SPRITE_ALBINO_DINO 0x0000004F -#define SPRITE_BLOOPER 0x00000050 -#define SPRITE_BABY_BLOOPER 0x00000051 -#define SPRITE_GULPIT 0x00000052 -#define SPRITE_DRY_BONES 0x00000053 -#define SPRITE_THROWN_BONE 0x00000054 -#define SPRITE_BONY_BEETLE 0x00000055 -#define SPRITE_MAGIKOOPA 0x00000056 -#define SPRITE_FLYING_MAGIKOOPA 0x00000057 -#define SPRITE_WORLD_KOOPATROL 0x00000058 -#define SPRITE_KOOPATROL 0x00000059 -#define SPRITE_HAMMER_BROS 0x0000005A -#define SPRITE_BUSH_BASIC 0x0000005B -#define SPRITE_BUSH_BLOCKY 0x0000005C -#define SPRITE_BUSH_DRY 0x0000005D -#define SPRITE_BUSH_LEAFY 0x0000005E -#define SPRITE_BUSH_MATTED 0x0000005F -#define SPRITE_WORLD_KAMMY 0x00000060 -#define SPRITE_BATTLE_KAMMY 0x00000061 -#define SPRITE_GOOMBA_BROS 0x00000062 -#define SPRITE_GOOMBA_KING 0x00000063 -#define SPRITE_SPIKY_GOOMNUT 0x00000064 -#define SPRITE_DARK_TOAD 0x00000065 -#define SPRITE_KOOPA_BROS 0x00000066 -#define SPRITE_BUZZAR 0x00000067 -#define SPRITE_TUTANKOOPA 0x00000068 -#define SPRITE_CHAIN_CHOMP 0x00000069 -#define SPRITE_WORLD_TUBBA 0x0000006A -#define SPRITE_BATTLE_TUBBA 0x0000006B -#define SPRITE_TUBBAS_HEART 0x0000006C -#define SPRITE_BIG_LANTERN_GHOST 0x0000006D -#define SPRITE_SHY_SQUAD_GUY 0x0000006E -#define SPRITE_MARSHAL_GUY 0x0000006F -#define SPRITE_STILT_GUY 0x00000070 -#define SPRITE_STILT_GUY_UNFOLD 0x00000071 -#define SPRITE_SHY_STACK_GUY 0x00000072 -#define SPRITE_SHY_STACK_UNFOLD 0x00000073 -#define SPRITE_SHY_STACK_DAMAGE 0x00000074 -#define SPRITE_SHY_STACK_ROCK 0x00000075 -#define SPRITE_GENERAL_GUY 0x00000076 -#define SPRITE_GENERAL_GUY_BOMB 0x00000077 -#define SPRITE_TANK_GUY 0x00000078 -#define SPRITE_LAVA_PIRANHA_HEAD 0x00000079 -#define SPRITE_PETIT_PIRANHA 0x0000007A -#define SPRITE_LAVA_BUD 0x0000007B -#define SPRITE_HUFF_N_PUFF 0x0000007C -#define SPRITE_TUFF_PUFF 0x0000007D -#define SPRITE_MONSTAR 0x0000007E -#define SPRITE_CRYSTAL_KING 0x0000007F -#define SPRITE_WORLD_BOWSER 0x00000080 -#define SPRITE_BATTLE_BOWSER 0x00000081 -#define SPRITE_LUIGI 0x00000082 -#define SPRITE_TOAD 0x00000083 -#define SPRITE_THREE_SISTERS 0x00000084 -#define SPRITE_VANNA_T 0x00000085 -#define SPRITE_TOAD_KID 0x00000086 -#define SPRITE_TOAD_GUARD 0x00000087 -#define SPRITE_HARRY_T 0x00000088 -#define SPRITE_TOAD_MINISTER 0x00000089 -#define SPRITE_POSTMASTER 0x0000008A -#define SPRITE_CONDUCTOR_TOAD 0x0000008B -#define SPRITE_TRAIN_STATION_TOAD 0x0000008C -#define SPRITE_FISHMAEL 0x0000008D -#define SPRITE_ARTIST_TOAD 0x0000008E -#define SPRITE_KOOPA 0x0000008F -#define SPRITE_KOOPA_WITHOUT_SHELL 0x00000090 -#define SPRITE_WORLD_BOMBOMB 0x00000091 -#define SPRITE_WHACKA 0x00000092 -#define SPRITE_DRYITE 0x00000093 -#define SPRITE_MOUSER 0x00000094 -#define SPRITE_BOO 0x00000095 -#define SPRITE_YOSHI 0x00000096 -#define SPRITE_YOSHI_KID 0x00000097 -#define SPRITE_RAVEN 0x00000098 -#define SPRITE_BUBULB 0x00000099 -#define SPRITE_PENGUIN 0x0000009A -#define SPRITE_SHIVER_TOAD 0x0000009B -#define SPRITE_ALT_BANDIT 0x0000009C -#define SPRITE_GOOMPAPA 0x0000009D -#define SPRITE_GOOMBARIA 0x0000009E -#define SPRITE_GOOMAMA 0x0000009F -#define SPRITE_GOOMPA 0x000000A0 -#define SPRITE_GOOMMA 0x000000A1 -#define SPRITE_THE_MASTER 0x000000A2 -#define SPRITE_CHAN 0x000000A3 -#define SPRITE_LEE 0x000000A4 -#define SPRITE_MERLON 0x000000A5 -#define SPRITE_CHET_RIPPO 0x000000A6 -#define SPRITE_ROWF 0x000000A7 -#define SPRITE_MINH_T 0x000000A8 -#define SPRITE_RUSS_T 0x000000A9 -#define SPRITE_TAYCE_T 0x000000AA -#define SPRITE_FICE_T 0x000000AB -#define SPRITE_BARTENDER 0x000000AC -#define SPRITE_CHANTERELLE 0x000000AD -#define SPRITE_RIP_CHEATO 0x000000AE -#define SPRITE_CHUCK_QUIZMO 0x000000AF -#define SPRITE_MERLUVLEE 0x000000B0 -#define SPRITE_MERLAR 0x000000B1 -#define SPRITE_MERLOW 0x000000B2 -#define SPRITE_STAR_KID 0x000000B3 -#define SPRITE_KOLORADO_WIFE 0x000000B4 -#define SPRITE_KOOPA_KOOT 0x000000B5 -#define SPRITE_KOLORADO 0x000000B6 -#define SPRITE_BATTLE_KOLORADO 0x000000B7 -#define SPRITE_ARCHEOLOGIST 0x000000B8 -#define SPRITE_NOMADIMOUSE 0x000000B9 -#define SPRITE_WORLD_MERLEE 0x000000BA -#define SPRITE_BATTLE_MERLEE 0x000000BB -#define SPRITE_DISGUISED_MOUSTAFA 0x000000BC -#define SPRITE_MOUSTAFA 0x000000BD -#define SPRITE_OAKLIE 0x000000BE -#define SPRITE_BOOTLER 0x000000BF -#define SPRITE_YAKKEY 0x000000C0 -#define SPRITE_GOURMET_GUY 0x000000C1 -#define SPRITE_VILLAGE_LEADER 0x000000C2 -#define SPRITE_LEADERS_FRIEND 0x000000C3 -#define SPRITE_RAFAEL_RAVEN 0x000000C4 -#define SPRITE_TOLIELUP 0x000000C5 -#define SPRITE_GATE_FLOWER 0x000000C6 -#define SPRITE_PETUNIA 0x000000C7 -#define SPRITE_POSIE 0x000000C8 -#define SPRITE_LILY 0x000000C9 -#define SPRITE_ROSIE 0x000000CA -#define SPRITE_SUN 0x000000CB -#define SPRITE_LAKILULU 0x000000CC -#define SPRITE_NINJI 0x000000CD -#define SPRITE_MAYOR_PENGUIN 0x000000CE -#define SPRITE_MAYOR_PENGUIN_WIFE 0x000000CF -#define SPRITE_PENGUIN_PATROL 0x000000D0 -#define SPRITE_HERRINGWAY 0x000000D1 -#define SPRITE_MERLE 0x000000D2 -#define SPRITE_STAR_ROD 0x000000D3 -#define SPRITE_FIRE 0x000000D4 -#define SPRITE_COIN 0x000000D5 -#define SPRITE_PARADE_PEACH 0x000000D6 -#define SPRITE_PARADE_KOOPAS 0x000000D7 -#define SPRITE_PARADE_BURNT_BOWSER 0x000000D8 -#define SPRITE_PARADE_LUIGI 0x000000D9 -#define SPRITE_PARADE_PARTNERS 0x000000DA -#define SPRITE_PARADE_YOSHIS 0x000000DB -#define SPRITE_PARADA_KOLORADOS 0x000000DC -#define SPRITE_PARADE_CHICKS 0x000000DD -#define SPRITE_PARADE_ICE_SHOW 0x000000DE -#define SPRITE_PARADE_TOADS 0x000000DF -#define SPRITE_PARADE_BATONS 0x000000E0 -#define SPRITE_PARADE_DRUMS 0x000000E1 -#define SPRITE_PARADE_FLAGS 0x000000E2 -#define SPRITE_PARADE_HORNS 0x000000E3 -#define SPRITE_PARADE_TUBBA_BALLOON 0x000000E4 -#define SPRITE_PARADE_WIZARDS 0x000000E5 -#define SPRITE_PARADE_MARIO 0x000000E6 -#define SPRITE_PARADE_SHY_GUYS 0x000000E7 -#define SPRITE_PARADE_TWINK 0x000000E8 -#define SPRITE_LEAF 0x000000E9 +typedef UNK_TYPE SpriteId; +#define SpriteId_WORLD_GOOMBARIO 0x00000001 +#define SpriteId_WORLD_KOOPER 0x00000002 +#define SpriteId_WORLD_BOMBETTE 0x00000003 +#define SpriteId_WORLD_PARAKARRY 0x00000004 +#define SpriteId_WORLD_BOW 0x00000005 +#define SpriteId_WORLD_WATT 0x00000006 +#define SpriteId_WORLD_SUSHI 0x00000007 +#define SpriteId_WORLD_LAKILESTER 0x00000008 +#define SpriteId_BATTLE_GOOMBARIO 0x00000009 +#define SpriteId_BATTLE_KOOPER 0x0000000A +#define SpriteId_BATTLE_BOMBETTE 0x0000000B +#define SpriteId_BATTLE_PARAKARRY 0x0000000C +#define SpriteId_BATTLE_BOW 0x0000000D +#define SpriteId_BATTLE_WATT 0x0000000E +#define SpriteId_BATTLE_SUSHI 0x0000000F +#define SpriteId_BATTLE_LAKILESTER 0x00000010 +#define SpriteId_KOOPER_WITHOUT_SHELL 0x00000011 +#define SpriteId_WORLD_ELDSTAR 0x00000012 +#define SpriteId_WORLD_MAMAR 0x00000013 +#define SpriteId_WORLD_SKOLAR 0x00000014 +#define SpriteId_WORLD_MUSKULAR 0x00000015 +#define SpriteId_WORLD_MISSTAR 0x00000016 +#define SpriteId_WORLD_KLEVAR 0x00000017 +#define SpriteId_WORLD_KALMAR 0x00000018 +#define SpriteId_BATTLE_ELDSTAR 0x00000019 +#define SpriteId_BATTLE_MAMAR 0x0000001A +#define SpriteId_BATTLE_SKOLAR 0x0000001B +#define SpriteId_BATTLE_MUSKULAR 0x0000001C +#define SpriteId_BATTLE_MISSTAR 0x0000001D +#define SpriteId_BATTLE_KLEVAR 0x0000001E +#define SpriteId_BATTLE_KALMAR 0x0000001F +#define SpriteId_TWINK 0x00000020 +#define SpriteId_JR_TROOPA 0x00000021 +#define SpriteId_SPIKED_JR_TROOPA 0x00000022 +#define SpriteId_SPIKED_PARA_JR_TROOPA 0x00000023 +#define SpriteId_MAGE_JR_TROOPA 0x00000024 +#define SpriteId_PARA_JR_TROOPA 0x00000025 +#define SpriteId_GOOMBA 0x00000026 +#define SpriteId_SPIKED_GOOMBA 0x00000027 +#define SpriteId_PARAGOOMBA 0x00000028 +#define SpriteId_KOOPA_TROOPA 0x00000029 +#define SpriteId_PARA_TROOPA 0x0000002A +#define SpriteId_FUZZY 0x0000002B +#define SpriteId_BOMBOMB 0x0000002C +#define SpriteId_BULLET_BILL 0x0000002D +#define SpriteId_BILL_BLASTER 0x0000002E +#define SpriteId_MONTY_MOLE 0x0000002F +#define SpriteId_CLEFT 0x00000030 +#define SpriteId_POKEY 0x00000031 +#define SpriteId_BANDIT 0x00000032 +#define SpriteId_BUZZY_BEETLE 0x00000033 +#define SpriteId_SWOOPER 0x00000034 +#define SpriteId_STONE_CHOMP 0x00000035 +#define SpriteId_PUTRID_PIRANHA 0x00000036 +#define SpriteId_PIRANHA_PLANT 0x00000037 +#define SpriteId_SENTINEL 0x00000038 +#define SpriteId_WORLD_CLUBBA 0x00000039 +#define SpriteId_BATTLE_CLUBBA 0x0000003A +#define SpriteId_SHY_GUY 0x0000003B +#define SpriteId_GROOVE_GUY 0x0000003C +#define SpriteId_SKY_GUY 0x0000003D +#define SpriteId_PYRO_GUY 0x0000003E +#define SpriteId_SPY_GUY 0x0000003F +#define SpriteId_MEDI_GUY 0x00000040 +#define SpriteId_FUZZIPEDE 0x00000041 +#define SpriteId_JUNGLE_GUY 0x00000042 +#define SpriteId_HEART_PLANT 0x00000043 +#define SpriteId_HURT_PLANT 0x00000044 +#define SpriteId_M_BUSH 0x00000045 +#define SpriteId_BUBBLE 0x00000046 +#define SpriteId_KENT_C_KOOPA 0x00000047 +#define SpriteId_DAYZEE 0x00000048 +#define SpriteId_LAKITU 0x00000049 +#define SpriteId_SPINY 0x0000004A +#define SpriteId_BZZAP 0x0000004B +#define SpriteId_RUFF_PUFF 0x0000004C +#define SpriteId_SPIKE_TOP 0x0000004D +#define SpriteId_DUPLIGHOST 0x0000004E +#define SpriteId_ALBINO_DINO 0x0000004F +#define SpriteId_BLOOPER 0x00000050 +#define SpriteId_BABY_BLOOPER 0x00000051 +#define SpriteId_GULPIT 0x00000052 +#define SpriteId_DRY_BONES 0x00000053 +#define SpriteId_THROWN_BONE 0x00000054 +#define SpriteId_BONY_BEETLE 0x00000055 +#define SpriteId_MAGIKOOPA 0x00000056 +#define SpriteId_FLYING_MAGIKOOPA 0x00000057 +#define SpriteId_WORLD_KOOPATROL 0x00000058 +#define SpriteId_KOOPATROL 0x00000059 +#define SpriteId_HAMMER_BROS 0x0000005A +#define SpriteId_BUSH_BASIC 0x0000005B +#define SpriteId_BUSH_BLOCKY 0x0000005C +#define SpriteId_BUSH_DRY 0x0000005D +#define SpriteId_BUSH_LEAFY 0x0000005E +#define SpriteId_BUSH_MATTED 0x0000005F +#define SpriteId_WORLD_KAMMY 0x00000060 +#define SpriteId_BATTLE_KAMMY 0x00000061 +#define SpriteId_GOOMBA_BROS 0x00000062 +#define SpriteId_GOOMBA_KING 0x00000063 +#define SpriteId_SPIKY_GOOMNUT 0x00000064 +#define SpriteId_DARK_TOAD 0x00000065 +#define SpriteId_KOOPA_BROS 0x00000066 +#define SpriteId_BUZZAR 0x00000067 +#define SpriteId_TUTANKOOPA 0x00000068 +#define SpriteId_CHAIN_CHOMP 0x00000069 +#define SpriteId_WORLD_TUBBA 0x0000006A +#define SpriteId_BATTLE_TUBBA 0x0000006B +#define SpriteId_TUBBAS_HEART 0x0000006C +#define SpriteId_BIG_LANTERN_GHOST 0x0000006D +#define SpriteId_SHY_SQUAD_GUY 0x0000006E +#define SpriteId_MARSHAL_GUY 0x0000006F +#define SpriteId_STILT_GUY 0x00000070 +#define SpriteId_STILT_GUY_UNFOLD 0x00000071 +#define SpriteId_SHY_STACK_GUY 0x00000072 +#define SpriteId_SHY_STACK_UNFOLD 0x00000073 +#define SpriteId_SHY_STACK_DAMAGE 0x00000074 +#define SpriteId_SHY_STACK_ROCK 0x00000075 +#define SpriteId_GENERAL_GUY 0x00000076 +#define SpriteId_GENERAL_GUY_BOMB 0x00000077 +#define SpriteId_TANK_GUY 0x00000078 +#define SpriteId_LAVA_PIRANHA_HEAD 0x00000079 +#define SpriteId_PETIT_PIRANHA 0x0000007A +#define SpriteId_LAVA_BUD 0x0000007B +#define SpriteId_HUFF_N_PUFF 0x0000007C +#define SpriteId_TUFF_PUFF 0x0000007D +#define SpriteId_MONSTAR 0x0000007E +#define SpriteId_CRYSTAL_KING 0x0000007F +#define SpriteId_WORLD_BOWSER 0x00000080 +#define SpriteId_BATTLE_BOWSER 0x00000081 +#define SpriteId_LUIGI 0x00000082 +#define SpriteId_TOAD 0x00000083 +#define SpriteId_THREE_SISTERS 0x00000084 +#define SpriteId_VANNA_T 0x00000085 +#define SpriteId_TOAD_KID 0x00000086 +#define SpriteId_TOAD_GUARD 0x00000087 +#define SpriteId_HARRY_T 0x00000088 +#define SpriteId_TOAD_MINISTER 0x00000089 +#define SpriteId_POSTMASTER 0x0000008A +#define SpriteId_CONDUCTOR_TOAD 0x0000008B +#define SpriteId_TRAIN_STATION_TOAD 0x0000008C +#define SpriteId_FISHMAEL 0x0000008D +#define SpriteId_ARTIST_TOAD 0x0000008E +#define SpriteId_KOOPA 0x0000008F +#define SpriteId_KOOPA_WITHOUT_SHELL 0x00000090 +#define SpriteId_WORLD_BOMBOMB 0x00000091 +#define SpriteId_WHACKA 0x00000092 +#define SpriteId_DRYITE 0x00000093 +#define SpriteId_MOUSER 0x00000094 +#define SpriteId_BOO 0x00000095 +#define SpriteId_YOSHI 0x00000096 +#define SpriteId_YOSHI_KID 0x00000097 +#define SpriteId_RAVEN 0x00000098 +#define SpriteId_BUBULB 0x00000099 +#define SpriteId_PENGUIN 0x0000009A +#define SpriteId_SHIVER_TOAD 0x0000009B +#define SpriteId_ALT_BANDIT 0x0000009C +#define SpriteId_GOOMPAPA 0x0000009D +#define SpriteId_GOOMBARIA 0x0000009E +#define SpriteId_GOOMAMA 0x0000009F +#define SpriteId_GOOMPA 0x000000A0 +#define SpriteId_GOOMMA 0x000000A1 +#define SpriteId_THE_MASTER 0x000000A2 +#define SpriteId_CHAN 0x000000A3 +#define SpriteId_LEE 0x000000A4 +#define SpriteId_MERLON 0x000000A5 +#define SpriteId_CHET_RIPPO 0x000000A6 +#define SpriteId_ROWF 0x000000A7 +#define SpriteId_MINH_T 0x000000A8 +#define SpriteId_RUSS_T 0x000000A9 +#define SpriteId_TAYCE_T 0x000000AA +#define SpriteId_FICE_T 0x000000AB +#define SpriteId_BARTENDER 0x000000AC +#define SpriteId_CHANTERELLE 0x000000AD +#define SpriteId_RIP_CHEATO 0x000000AE +#define SpriteId_CHUCK_QUIZMO 0x000000AF +#define SpriteId_MERLUVLEE 0x000000B0 +#define SpriteId_MERLAR 0x000000B1 +#define SpriteId_MERLOW 0x000000B2 +#define SpriteId_STAR_KID 0x000000B3 +#define SpriteId_KOLORADO_WIFE 0x000000B4 +#define SpriteId_KOOPA_KOOT 0x000000B5 +#define SpriteId_KOLORADO 0x000000B6 +#define SpriteId_BATTLE_KOLORADO 0x000000B7 +#define SpriteId_ARCHEOLOGIST 0x000000B8 +#define SpriteId_NOMADIMOUSE 0x000000B9 +#define SpriteId_WORLD_MERLEE 0x000000BA +#define SpriteId_BATTLE_MERLEE 0x000000BB +#define SpriteId_DISGUISED_MOUSTAFA 0x000000BC +#define SpriteId_MOUSTAFA 0x000000BD +#define SpriteId_OAKLIE 0x000000BE +#define SpriteId_BOOTLER 0x000000BF +#define SpriteId_YAKKEY 0x000000C0 +#define SpriteId_GOURMET_GUY 0x000000C1 +#define SpriteId_VILLAGE_LEADER 0x000000C2 +#define SpriteId_LEADERS_FRIEND 0x000000C3 +#define SpriteId_RAFAEL_RAVEN 0x000000C4 +#define SpriteId_TOLIELUP 0x000000C5 +#define SpriteId_GATE_FLOWER 0x000000C6 +#define SpriteId_PETUNIA 0x000000C7 +#define SpriteId_POSIE 0x000000C8 +#define SpriteId_LILY 0x000000C9 +#define SpriteId_ROSIE 0x000000CA +#define SpriteId_SUN 0x000000CB +#define SpriteId_LAKILULU 0x000000CC +#define SpriteId_NINJI 0x000000CD +#define SpriteId_MAYOR_PENGUIN 0x000000CE +#define SpriteId_MAYOR_PENGUIN_WIFE 0x000000CF +#define SpriteId_PENGUIN_PATROL 0x000000D0 +#define SpriteId_HERRINGWAY 0x000000D1 +#define SpriteId_MERLE 0x000000D2 +#define SpriteId_STAR_ROD 0x000000D3 +#define SpriteId_FIRE 0x000000D4 +#define SpriteId_COIN 0x000000D5 +#define SpriteId_PARADE_PEACH 0x000000D6 +#define SpriteId_PARADE_KOOPAS 0x000000D7 +#define SpriteId_PARADE_BURNT_BOWSER 0x000000D8 +#define SpriteId_PARADE_LUIGI 0x000000D9 +#define SpriteId_PARADE_PARTNERS 0x000000DA +#define SpriteId_PARADE_YOSHIS 0x000000DB +#define SpriteId_PARADA_KOLORADOS 0x000000DC +#define SpriteId_PARADE_CHICKS 0x000000DD +#define SpriteId_PARADE_ICE_SHOW 0x000000DE +#define SpriteId_PARADE_TOADS 0x000000DF +#define SpriteId_PARADE_BATONS 0x000000E0 +#define SpriteId_PARADE_DRUMS 0x000000E1 +#define SpriteId_PARADE_FLAGS 0x000000E2 +#define SpriteId_PARADE_HORNS 0x000000E3 +#define SpriteId_PARADE_TUBBA_BALLOON 0x000000E4 +#define SpriteId_PARADE_WIZARDS 0x000000E5 +#define SpriteId_PARADE_MARIO 0x000000E6 +#define SpriteId_PARADE_SHY_GUYS 0x000000E7 +#define SpriteId_PARADE_TWINK 0x000000E8 +#define SpriteId_LEAF 0x000000E9 -typedef UNK_TYPE SONG; -#define SONG_TOAD_TOWN 0x00000000 -#define SONG_NORMAL_BATTLE 0x00000002 -#define SONG_SPECIAL_BATTLE 0x00000003 -#define SONG_JR_TROOPA_BATTLE 0x00000004 -#define SONG_FINAL_BOWSER_BATTLE 0x00000005 -#define SONG_GOOMBA_KING_BATTLE 0x00000007 -#define SONG_KOOPA_BROS_BATTLE 0x00000008 -#define SONG_FAKE_BOWSER_BATTLE 0x00000009 -#define SONG_TUTANKOOPA_BATTLE 0x0000000A -#define SONG_TUBBA_BLUBBA_BATTLE 0x0000000B -#define SONG_GENERAL_GUY_BATTLE 0x0000000C -#define SONG_LAVA_PIRANHA_BATTLE 0x0000000D -#define SONG_HUFF_N_PUFF_BATTLE 0x0000000E -#define SONG_CRYSTAL_KING_BATTLE 0x0000000F -#define SONG_GOOMBA_VILLAGE 0x00000010 -#define SONG_PLEASANT_PATH 0x00000011 -#define SONG_FUZZY_ATTACK 0x00000012 -#define SONG_KOOPA_VILLAGE 0x00000013 -#define SONG_KOOPA_FORTRESS 0x00000014 -#define SONG_DRY_DRY_OUTPOST 0x00000015 -#define SONG_MT_RUGGED 0x00000016 -#define SONG_DRY_DRY_DESERT 0x00000017 -#define SONG_DRY_DRY_RUINS 0x00000018 -#define SONG_RUINS_BASEMENT 0x00000019 -#define SONG_FOREVER_FOREST 0x0000001A -#define SONG_BOOS_MANSION 0x0000001B -#define SONG_CHEERFUL_BOOS_MANSION 0x0000001C -#define SONG_GUSTY_GULCH 0x0000001D -#define SONG_TUBBAS_MANOR 0x0000001E -#define SONG_TUBBA_ESCAPE 0x0000001F -#define SONG_SHY_GUY_TOYBOX 0x00000020 -#define SONG_TOYBOX_TRAIN 0x00000021 -#define SONG_CREEPY_TOYBOX 0x00000022 -#define SONG_JADE_JUNGLE 0x00000024 -#define SONG_DEEP_JUNGLE 0x00000025 -#define SONG_YOSHIS_VILLAGE 0x00000026 -#define SONG_YOSHIS_PANIC 0x00000027 -#define SONG_RAPHAEL_RAVEN 0x00000028 -#define SONG_MT_LAVALAVA 0x00000029 -#define SONG_VOLCANO_ESCAPE 0x0000002A -#define SONG_STAR_WAY_OPENS 0x0000002B -#define SONG_MASTER_BATTLE 0x0000002C -#define SONG_RADIO_ISLAND_SOUNDS 0x0000002D -#define SONG_RADIO_HOT_HITS 0x0000002E -#define SONG_RADIO_GOLDEN_OLDIES 0x0000002F -#define SONG_FLOWER_FIELDS_CLOUDY 0x00000030 -#define SONG_FLOWER_FIELDS_SUNNY 0x00000031 -#define SONG_CLOUDY_CLIMB 0x00000032 -#define SONG_PUFF_PUFF_MACHINE 0x00000033 -#define SONG_SUN_TOWER_CLOUDY 0x00000034 -#define SONG_SUN_TOWER_SUNNY 0x00000035 -#define SONG_CRYSTAL_PALACE 0x00000037 -#define SONG_SHIVER_CITY 0x00000038 -#define SONG_PENGUIN_MYSTERY 0x00000039 -#define SONG_SHIVER_SNOWFIELD 0x0000003A -#define SONG_SHIVER_MOUNTAIN 0x0000003B -#define SONG_STARBORN_VALLEY 0x0000003C -#define SONG_MERLAR_THEME 0x0000003D -#define SONG_MAIL_CALL 0x0000003E -#define SONG_PEACHS_CASTLE_PARTY 0x0000003F -#define SONG_CHAPTER_END 0x00000040 -#define SONG_CHAPTER_START 0x00000041 -#define SONG_ITEM_UPGRADE 0x00000042 -#define SONG_PHONOGRAPH_MUSIC 0x00000044 -#define SONG_TUTANKOOPA_THEME 0x00000045 -#define SONG_KAMMY_KOOPA_THEME 0x00000046 -#define SONG_JR_TROOPA_THEME 0x00000047 -#define SONG_BULLET_BILL_ASSAULT 0x00000048 -#define SONG_MONTY_MOLE_ASSAULT 0x00000049 -#define SONG_SHY_GUY_INVASION 0x0000004A -#define SONG_TOAD_TOWN_TUNNELS 0x0000004B -#define SONG_WHALE_THEME 0x0000004C -#define SONG_FOREVER_FOREST_WARNING 0x0000004D -#define SONG_YOSHI_KIDS_FOUND 0x0000004E -#define SONG_UNUSED_FANFARE 0x0000004F -#define SONG_GOOMBA_KING_THEME 0x00000050 -#define SONG_KOOPA_BROS_INTERLUDE 0x00000051 -#define SONG_KOOPA_BROS_THEME 0x00000052 -#define SONG_TUTANKOOPA_WARNING 0x00000053 -#define SONG_TUTANKOOPA_REVEALED 0x00000054 -#define SONG_TUBBA_BLUBBA_THEME 0x00000055 -#define SONG_GENERAL_GUY_THEME 0x00000056 -#define SONG_LAVA_PIRANHA_THEME 0x00000057 -#define SONG_HUFF_N_PUFF_THEME 0x00000058 -#define SONG_CRYSTAL_KING_THEME 0x00000059 -#define SONG_BLOOPER_THEME 0x0000005A -#define SONG_MINIBOSS_BATTLE 0x0000005B -#define SONG_MONSTAR_THEME 0x0000005C -#define SONG_CLUB64 0x0000005D -#define SONG_UNUSED_OPENING 0x0000005E -#define SONG_BOWSERS_CASTLE_FALLS 0x0000005F -#define SONG_STAR_HAVEN 0x00000060 -#define SONG_SHOOTING_STAR_SUMMIT 0x00000061 -#define SONG_STARSHIP_THEME 0x00000062 -#define SONG_STAR_SANCTUARY 0x00000063 -#define SONG_BOWSERS_CASTLE 0x00000064 -#define SONG_BOWSERS_CASTLE_CAVES 0x00000065 -#define SONG_BOWSER_THEME 0x00000066 -#define SONG_BOWSER_BATTLE 0x00000067 -#define SONG_PEACH_WISHES 0x00000068 -#define SONG_FILE_SELECT 0x00000069 -#define SONG_MAIN_THEME 0x0000006A -#define SONG_BOWSER_ATTACKS 0x0000006B -#define SONG_MARIO_FALLS 0x0000006C -#define SONG_PEACH_APPEARS 0x0000006D -#define SONG_THE_END 0x0000006E -#define SONG_RECOVERED_STAR_ROD 0x0000006F -#define SONG_TWINK_THEME 0x00000070 -#define SONG_STIRRING_CAKE 0x00000071 -#define SONG_GOURMET_GUY_FREAKOUT 0x00000072 -#define SONG_PRISONER_PEACH_THEME 0x00000073 -#define SONG_PEACH_MISSION 0x00000074 -#define SONG_PEACH_SNEAKING 0x00000075 -#define SONG_PEACH_CAUGHT 0x00000076 -#define SONG_PEACH_QUIZ_INTRO 0x00000077 -#define SONG_STAR_SPIRIT_THEME 0x00000078 -#define SONG_PENGUIN_WHODUNIT 0x00000079 -#define SONG_PENGUIN_WAKES_UP 0x0000007A -#define SONG_MAGIC_BEANSTALK 0x0000007B -#define SONG_MERLEE_SPELL 0x0000007C -#define SONG_LAKILESTER_THEME 0x0000007D -#define SONG_GOOMBA_BROS_RETREAT 0x0000007E -#define SONG_SUNSHINE_RETURNS 0x0000007F -#define SONG_RIDING_THE_RAILS 0x00000080 -#define SONG_RIDING_THE_WHALE 0x00000081 -#define SONG_NEW_PARTNER 0x00000082 -#define SONG_DRY_DRY_RUINS_APPEAR 0x00000083 -#define SONG_CANDY_CANES 0x00000084 -#define SONG_PLAYROOM 0x00000085 -#define SONG_MOUSTAFA_THEME 0x00000086 -#define SONG_GAME_OVER 0x00000087 -#define SONG_TAKING_REST 0x00000088 -#define SONG_FLOWER_N_P_C_THEME 0x00000089 -#define SONG_FLOWER_GATE_APPEARS 0x0000008A -#define SONG_BATTLE_END 0x0000008B -#define SONG_POP_DIVA_SONG 0x0000008C -#define SONG_BOO_MINIGAME 0x0000008D -#define SONG_LEVEL_UP 0x0000008E -#define SONG_PARADE_DAY 0x00000090 -#define SONG_PARADE_NIGHT 0x00000091 -#define SONG_MARIO_BROS_HOUSE 0x00000094 -#define SONG_INTRO_STORY 0x00000095 -#define SONG_NEW_PARTNER_J_P 0x00000096 +typedef UNK_TYPE Song; +#define Song_TOAD_TOWN 0x00000000 +#define Song_NORMAL_BATTLE 0x00000002 +#define Song_SPECIAL_BATTLE 0x00000003 +#define Song_JR_TROOPA_BATTLE 0x00000004 +#define Song_FINAL_BOWSER_BATTLE 0x00000005 +#define Song_GOOMBA_KING_BATTLE 0x00000007 +#define Song_KOOPA_BROS_BATTLE 0x00000008 +#define Song_FAKE_BOWSER_BATTLE 0x00000009 +#define Song_TUTANKOOPA_BATTLE 0x0000000A +#define Song_TUBBA_BLUBBA_BATTLE 0x0000000B +#define Song_GENERAL_GUY_BATTLE 0x0000000C +#define Song_LAVA_PIRANHA_BATTLE 0x0000000D +#define Song_HUFF_N_PUFF_BATTLE 0x0000000E +#define Song_CRYSTAL_KING_BATTLE 0x0000000F +#define Song_GOOMBA_VILLAGE 0x00000010 +#define Song_PLEASANT_PATH 0x00000011 +#define Song_FUZZY_ATTACK 0x00000012 +#define Song_KOOPA_VILLAGE 0x00000013 +#define Song_KOOPA_FORTRESS 0x00000014 +#define Song_DRY_DRY_OUTPOST 0x00000015 +#define Song_MT_RUGGED 0x00000016 +#define Song_DRY_DRY_DESERT 0x00000017 +#define Song_DRY_DRY_RUINS 0x00000018 +#define Song_RUINS_BASEMENT 0x00000019 +#define Song_FOREVER_FOREST 0x0000001A +#define Song_BOOS_MANSION 0x0000001B +#define Song_CHEERFUL_BOOS_MANSION 0x0000001C +#define Song_GUSTY_GULCH 0x0000001D +#define Song_TUBBAS_MANOR 0x0000001E +#define Song_TUBBA_ESCAPE 0x0000001F +#define Song_SHY_GUY_TOYBOX 0x00000020 +#define Song_TOYBOX_TRAIN 0x00000021 +#define Song_CREEPY_TOYBOX 0x00000022 +#define Song_JADE_JUNGLE 0x00000024 +#define Song_DEEP_JUNGLE 0x00000025 +#define Song_YOSHIS_VILLAGE 0x00000026 +#define Song_YOSHIS_PANIC 0x00000027 +#define Song_RAPHAEL_RAVEN 0x00000028 +#define Song_MT_LAVALAVA 0x00000029 +#define Song_VOLCANO_ESCAPE 0x0000002A +#define Song_STAR_WAY_OPENS 0x0000002B +#define Song_MASTER_BATTLE 0x0000002C +#define Song_RADIO_ISLAND_SOUNDS 0x0000002D +#define Song_RADIO_HOT_HITS 0x0000002E +#define Song_RADIO_GOLDEN_OLDIES 0x0000002F +#define Song_FLOWER_FIELDS_CLOUDY 0x00000030 +#define Song_FLOWER_FIELDS_SUNNY 0x00000031 +#define Song_CLOUDY_CLIMB 0x00000032 +#define Song_PUFF_PUFF_MACHINE 0x00000033 +#define Song_SUN_TOWER_CLOUDY 0x00000034 +#define Song_SUN_TOWER_SUNNY 0x00000035 +#define Song_CRYSTAL_PALACE 0x00000037 +#define Song_SHIVER_CITY 0x00000038 +#define Song_PENGUIN_MYSTERY 0x00000039 +#define Song_SHIVER_SNOWFIELD 0x0000003A +#define Song_SHIVER_MOUNTAIN 0x0000003B +#define Song_STARBORN_VALLEY 0x0000003C +#define Song_MERLAR_THEME 0x0000003D +#define Song_MAIL_CALL 0x0000003E +#define Song_PEACHS_CASTLE_PARTY 0x0000003F +#define Song_CHAPTER_END 0x00000040 +#define Song_CHAPTER_START 0x00000041 +#define Song_ITEM_UPGRADE 0x00000042 +#define Song_PHONOGRAPH_MUSIC 0x00000044 +#define Song_TUTANKOOPA_THEME 0x00000045 +#define Song_KAMMY_KOOPA_THEME 0x00000046 +#define Song_JR_TROOPA_THEME 0x00000047 +#define Song_BULLET_BILL_ASSAULT 0x00000048 +#define Song_MONTY_MOLE_ASSAULT 0x00000049 +#define Song_SHY_GUY_INVASION 0x0000004A +#define Song_TOAD_TOWN_TUNNELS 0x0000004B +#define Song_WHALE_THEME 0x0000004C +#define Song_FOREVER_FOREST_WARNING 0x0000004D +#define Song_YOSHI_KIDS_FOUND 0x0000004E +#define Song_UNUSED_FANFARE 0x0000004F +#define Song_GOOMBA_KING_THEME 0x00000050 +#define Song_KOOPA_BROS_INTERLUDE 0x00000051 +#define Song_KOOPA_BROS_THEME 0x00000052 +#define Song_TUTANKOOPA_WARNING 0x00000053 +#define Song_TUTANKOOPA_REVEALED 0x00000054 +#define Song_TUBBA_BLUBBA_THEME 0x00000055 +#define Song_GENERAL_GUY_THEME 0x00000056 +#define Song_LAVA_PIRANHA_THEME 0x00000057 +#define Song_HUFF_N_PUFF_THEME 0x00000058 +#define Song_CRYSTAL_KING_THEME 0x00000059 +#define Song_BLOOPER_THEME 0x0000005A +#define Song_MINIBOSS_BATTLE 0x0000005B +#define Song_MONSTAR_THEME 0x0000005C +#define Song_CLUB64 0x0000005D +#define Song_UNUSED_OPENING 0x0000005E +#define Song_BOWSERS_CASTLE_FALLS 0x0000005F +#define Song_STAR_HAVEN 0x00000060 +#define Song_SHOOTING_STAR_SUMMIT 0x00000061 +#define Song_STARSHIP_THEME 0x00000062 +#define Song_STAR_SANCTUARY 0x00000063 +#define Song_BOWSERS_CASTLE 0x00000064 +#define Song_BOWSERS_CASTLE_CAVES 0x00000065 +#define Song_BOWSER_THEME 0x00000066 +#define Song_BOWSER_BATTLE 0x00000067 +#define Song_PEACH_WISHES 0x00000068 +#define Song_FILE_SELECT 0x00000069 +#define Song_MAIN_THEME 0x0000006A +#define Song_BOWSER_ATTACKS 0x0000006B +#define Song_MARIO_FALLS 0x0000006C +#define Song_PEACH_APPEARS 0x0000006D +#define Song_THE_END 0x0000006E +#define Song_RECOVERED_STAR_ROD 0x0000006F +#define Song_TWINK_THEME 0x00000070 +#define Song_STIRRING_CAKE 0x00000071 +#define Song_GOURMET_GUY_FREAKOUT 0x00000072 +#define Song_PRISONER_PEACH_THEME 0x00000073 +#define Song_PEACH_MISSION 0x00000074 +#define Song_PEACH_SNEAKING 0x00000075 +#define Song_PEACH_CAUGHT 0x00000076 +#define Song_PEACH_QUIZ_INTRO 0x00000077 +#define Song_STAR_SPIRIT_THEME 0x00000078 +#define Song_PENGUIN_WHODUNIT 0x00000079 +#define Song_PENGUIN_WAKES_UP 0x0000007A +#define Song_MAGIC_BEANSTALK 0x0000007B +#define Song_MERLEE_SPELL 0x0000007C +#define Song_LAKILESTER_THEME 0x0000007D +#define Song_GOOMBA_BROS_RETREAT 0x0000007E +#define Song_SUNSHINE_RETURNS 0x0000007F +#define Song_RIDING_THE_RAILS 0x00000080 +#define Song_RIDING_THE_WHALE 0x00000081 +#define Song_NEW_PARTNER 0x00000082 +#define Song_DRY_DRY_RUINS_APPEAR 0x00000083 +#define Song_CANDY_CANES 0x00000084 +#define Song_PLAYROOM 0x00000085 +#define Song_MOUSTAFA_THEME 0x00000086 +#define Song_GAME_OVER 0x00000087 +#define Song_TAKING_REST 0x00000088 +#define Song_FLOWER_N_P_C_THEME 0x00000089 +#define Song_FLOWER_GATE_APPEARS 0x0000008A +#define Song_BATTLE_END 0x0000008B +#define Song_POP_DIVA_SONG 0x0000008C +#define Song_BOO_MINIGAME 0x0000008D +#define Song_LEVEL_UP 0x0000008E +#define Song_PARADE_DAY 0x00000090 +#define Song_PARADE_NIGHT 0x00000091 +#define Song_MARIO_BROS_HOUSE 0x00000094 +#define Song_INTRO_STORY 0x00000095 +#define Song_NEW_PARTNER_J_P 0x00000096 -typedef UNK_TYPE ABILITY; -#define ABILITY_DODGE_MASTER 0x00000000 -#define ABILITY_UNUSED 0x00000001 -#define ABILITY_SPIKE_SHIELD 0x00000002 -#define ABILITY_FIRST_ATTACK 0x00000003 -#define ABILITY_H_P_PLUS 0x00000004 -#define ABILITY_DOUBLE_DIP 0x00000005 -#define ABILITY_MYSTERY_SCROLL 0x00000006 -#define ABILITY_FIRE_SHIELD 0x00000007 -#define ABILITY_PRETTY_LUCKY 0x00000008 -#define ABILITY_H_P_DRAIN 0x00000009 -#define ABILITY_ALL_OR_NOTHING 0x0000000A -#define ABILITY_SLOW_GO 0x0000000B -#define ABILITY_F_P_PLUS 0x0000000C -#define ABILITY_ICE_POWER 0x0000000D -#define ABILITY_FEELING_FINE 0x0000000E -#define ABILITY_ATTACK_F_X 0x0000000F -#define ABILITY_MONEY_MONEY 0x00000010 -#define ABILITY_CHILL_OUT 0x00000011 -#define ABILITY_HAPPY_HEART 0x00000012 -#define ABILITY_ZAP_TAP 0x00000013 -#define ABILITY_MEGA_RUSH 0x00000014 -#define ABILITY_BERSERKER 0x00000015 -#define ABILITY_RIGHT_ON 0x00000016 -#define ABILITY_RUNAWAY_PAY 0x00000017 -#define ABILITY_FLOWER_SAVER 0x00000018 -#define ABILITY_PAY_OFF 0x00000019 -#define ABILITY_QUICK_CHANGE 0x0000001A -#define ABILITY_DEFEND_PLUS 0x0000001B -#define ABILITY_POWER_PLUS 0x0000001C -#define ABILITY_REFUND 0x0000001D -#define ABILITY_POWER_RUSH 0x0000001E -#define ABILITY_CRAZY_HEART 0x0000001F -#define ABILITY_LAST_STAND 0x00000020 -#define ABILITY_CLOSE_CALL 0x00000021 -#define ABILITY_P_UP_D_DOWN 0x00000022 -#define ABILITY_LUCKY_DAY 0x00000023 -#define ABILITY_MEGA_H_P_DRAIN 0x00000024 -#define ABILITY_P_DOWN_D_UP 0x00000025 -#define ABILITY_FLOWER_FANATIC 0x00000026 -#define ABILITY_SPEEDY_SPIN 0x00000027 -#define ABILITY_SPIN_ATTACK 0x00000028 -#define ABILITY_I_SPY 0x00000029 -#define ABILITY_BUMP_ATTACK 0x0000002A -#define ABILITY_HEART_FINDER 0x0000002B -#define ABILITY_FLOWER_FINDER 0x0000002C -#define ABILITY_DIZZY_ATTACK 0x0000002D -#define ABILITY_FINAL_GOOMPA 0x0000002E -#define ABILITY_FINAL_BOMBOMB 0x0000002F -#define ABILITY_DEEP_FOCUS 0x00000030 -#define ABILITY_SUPER_FOCUS 0x00000031 -#define ABILITY_KAIDEN 0x00000032 -#define ABILITY_DAMAGE_DODGE 0x00000033 -#define ABILITY_HAPPY_FLOWER 0x00000034 -#define ABILITY_GROUP_FOCUS 0x00000035 -#define ABILITY_PEEKABOO 0x00000036 -#define ABILITY_HEALTHY_HEALTHY 0x00000037 +typedef UNK_TYPE Ability; +#define Ability_DODGE_MASTER 0x00000000 +#define Ability_UNUSED 0x00000001 +#define Ability_SPIKE_SHIELD 0x00000002 +#define Ability_FIRST_ATTACK 0x00000003 +#define Ability_H_P_PLUS 0x00000004 +#define Ability_DOUBLE_DIP 0x00000005 +#define Ability_MYSTERY_SCROLL 0x00000006 +#define Ability_FIRE_SHIELD 0x00000007 +#define Ability_PRETTY_LUCKY 0x00000008 +#define Ability_H_P_DRAIN 0x00000009 +#define Ability_ALL_OR_NOTHING 0x0000000A +#define Ability_SLOW_GO 0x0000000B +#define Ability_F_P_PLUS 0x0000000C +#define Ability_ICE_POWER 0x0000000D +#define Ability_FEELING_FINE 0x0000000E +#define Ability_ATTACK_F_X 0x0000000F +#define Ability_MONEY_MONEY 0x00000010 +#define Ability_CHILL_OUT 0x00000011 +#define Ability_HAPPY_HEART 0x00000012 +#define Ability_ZAP_TAP 0x00000013 +#define Ability_MEGA_RUSH 0x00000014 +#define Ability_BERSERKER 0x00000015 +#define Ability_RIGHT_ON 0x00000016 +#define Ability_RUNAWAY_PAY 0x00000017 +#define Ability_FLOWER_SAVER 0x00000018 +#define Ability_PAY_OFF 0x00000019 +#define Ability_QUICK_CHANGE 0x0000001A +#define Ability_DEFEND_PLUS 0x0000001B +#define Ability_POWER_PLUS 0x0000001C +#define Ability_REFUND 0x0000001D +#define Ability_POWER_RUSH 0x0000001E +#define Ability_CRAZY_HEART 0x0000001F +#define Ability_LAST_STAND 0x00000020 +#define Ability_CLOSE_CALL 0x00000021 +#define Ability_P_UP_D_DOWN 0x00000022 +#define Ability_LUCKY_DAY 0x00000023 +#define Ability_MEGA_H_P_DRAIN 0x00000024 +#define Ability_P_DOWN_D_UP 0x00000025 +#define Ability_FLOWER_FANATIC 0x00000026 +#define Ability_SPEEDY_SPIN 0x00000027 +#define Ability_SPIN_ATTACK 0x00000028 +#define Ability_I_SPY 0x00000029 +#define Ability_BUMP_ATTACK 0x0000002A +#define Ability_HEART_FINDER 0x0000002B +#define Ability_FLOWER_FINDER 0x0000002C +#define Ability_DIZZY_ATTACK 0x0000002D +#define Ability_FINAL_GOOMPA 0x0000002E +#define Ability_FINAL_BOMBOMB 0x0000002F +#define Ability_DEEP_FOCUS 0x00000030 +#define Ability_SUPER_FOCUS 0x00000031 +#define Ability_KAIDEN 0x00000032 +#define Ability_DAMAGE_DODGE 0x00000033 +#define Ability_HAPPY_FLOWER 0x00000034 +#define Ability_GROUP_FOCUS 0x00000035 +#define Ability_PEEKABOO 0x00000036 +#define Ability_HEALTHY_HEALTHY 0x00000037 -typedef UNK_TYPE EMOTE; -#define EMOTE_EXCLAMATION 0x00000000 -#define EMOTE_SHOCK 0x00000001 -#define EMOTE_QUESTION 0x00000002 -#define EMOTE_FRUSTRATION 0x00000003 -#define EMOTE_ELLIPSIS 0x00000004 -#define EMOTE_INVALID 0x00000005 +typedef UNK_TYPE Emote; +#define Emote_EXCLAMATION 0x00000000 +#define Emote_SHOCK 0x00000001 +#define Emote_QUESTION 0x00000002 +#define Emote_FRUSTRATION 0x00000003 +#define Emote_ELLIPSIS 0x00000004 +#define Emote_INVALID 0x00000005 -typedef UNK_TYPE ANIM; -#define ANIM_WHITE_BOO__STOP 0x00950000 -#define ANIM_WHITE_BOO__IDLE 0x00950001 -#define ANIM_WHITE_BOO__WALK 0x00950002 -#define ANIM_WHITE_BOO__RUN 0x00950003 -#define ANIM_WHITE_BOO__TALK 0x00950004 -#define ANIM_WHITE_BOO__WAVE 0x00950005 -#define ANIM_WHITE_BOO__PAIN 0x00950006 -#define ANIM_WHITE_BOO__HIDE 0x00950007 -#define ANIM_WHITE_BOO__SPOOK 0x00950008 -#define ANIM_WHITE_BOO__DENYING 0x00950009 -#define ANIM_WHITE_BOO__SKEPTICAL 0x0095000A -#define ANIM_WHITE_BOO__THROW 0x0095000B -#define ANIM_WHITE_BOO__CARRYING_STOP 0x0095000C -#define ANIM_WHITE_BOO__CARRYING_IDLE 0x0095000D -#define ANIM_WHITE_BOO__CARRYING_WALK 0x0095000E -#define ANIM_WHITE_BOO__CARRYING_RUN 0x0095000F -#define ANIM_WHITE_BOO__CARRYING_SHAKE 0x00950010 -#define ANIM_DUSTY_BOO__STOP 0x00950100 -#define ANIM_DUSTY_BOO__IDLE 0x00950101 -#define ANIM_DUSTY_BOO__WALK 0x00950102 -#define ANIM_DUSTY_BOO__RUN 0x00950103 -#define ANIM_DUSTY_BOO__TALK 0x00950104 -#define ANIM_DUSTY_BOO__WAVE 0x00950105 -#define ANIM_DUSTY_BOO__PAIN 0x00950106 -#define ANIM_DUSTY_BOO__HIDE 0x00950107 -#define ANIM_DUSTY_BOO__SPOOK 0x00950108 -#define ANIM_DUSTY_BOO__DENYING 0x00950109 -#define ANIM_DUSTY_BOO__SKEPTICAL 0x0095010A -#define ANIM_DUSTY_BOO__THROW 0x0095010B -#define ANIM_DUSTY_BOO__CARRYING_STOP 0x0095010C -#define ANIM_DUSTY_BOO__CARRYING_IDLE 0x0095010D -#define ANIM_DUSTY_BOO__CARRYING_WALK 0x0095010E -#define ANIM_DUSTY_BOO__CARRYING_RUN 0x0095010F -#define ANIM_DUSTY_BOO__CARRYING_SHAKE 0x00950110 +typedef UNK_TYPE Easing; +#define Easing_LINEAR 0x00000000 +#define Easing_QUADRATIC_IN 0x00000001 +#define Easing_CUBIC_IN 0x00000002 +#define Easing_QUARTIC_IN 0x00000003 +#define Easing_QUADRATIC_OUT 0x00000004 +#define Easing_CUBIC_OUT 0x00000005 +#define Easing_QUARTIC_OUT 0x00000006 +#define Easing_COS_SLOW_OVERSHOOT 0x00000007 +#define Easing_COS_FAST_OVERSHOOT 0x00000008 +#define Easing_COS_BOUNCE 0x00000009 +#define Easing_COS_IN_OUT 0x0000000A +#define Easing_SIN_OUT 0x0000000B +#define Easing_COS_IN 0x0000000C -typedef UNK_TYPE EASING; -#define EASING_LINEAR 0x00000000 -#define EASING_QUADRATIC_IN 0x00000001 -#define EASING_CUBIC_IN 0x00000002 -#define EASING_QUARTIC_IN 0x00000003 -#define EASING_QUADRATIC_OUT 0x00000004 -#define EASING_CUBIC_OUT 0x00000005 -#define EASING_QUARTIC_OUT 0x00000006 -#define EASING_COS_SLOW_OVERSHOOT 0x00000007 -#define EASING_COS_FAST_OVERSHOOT 0x00000008 -#define EASING_COS_BOUNCE 0x00000009 -#define EASING_COS_IN_OUT 0x0000000A -#define EASING_SIN_OUT 0x0000000B -#define EASING_COS_IN 0x0000000C +typedef UNK_TYPE SoundId; +#define SoundId_JR_TROOPA_SPLASH 0x00000045 +#define SoundId_JR_TROOPA_SWIM 0x00000046 +#define SoundId_BOO_SPOOK 0x00000047 +#define SoundId_BOO_VANISH 0x000000C1 +#define SoundId_BOO_APPEAR 0x000000C3 +#define SoundId_MENU_OPEN 0x000000C5 +#define SoundId_MENU_CLOSE 0x000000C6 +#define SoundId_MENU_CHANGE_SELECTION 0x000000C7 +#define SoundId_MENU_CHANGE_TAB 0x000000C8 +#define SoundId_MENU_NEXT 0x000000C9 +#define SoundId_MENU_BACK 0x000000CA +#define SoundId_STEP1 0x00000141 +#define SoundId_STEP2 0x00000142 +#define SoundId_TORNADO_JUMP 0x00000147 +#define SoundId_SOFT_LAND 0x00000148 +#define SoundId_LAND 0x0000014B +#define SoundId_HIT_BLOCK 0x0000014E +#define SoundId_SEARCH_BUSH 0x00000153 +#define SoundId_BASIC_DOOR_OPEN 0x000001C1 +#define SoundId_BASIC_DOOR_CLOSE 0x000001C2 +#define SoundId_METAL_DOOR_OPEN 0x000001C3 +#define SoundId_METAL_DOOR_CLOSE 0x000001C4 +#define SoundId_LARGE_DOOR_OPEN 0x000001C5 +#define SoundId_LARGE_DOOR_CLOSE 0x000001C6 +#define SoundId_CREAKY_DOOR_OPEN 0x000001C7 +#define SoundId_CREAKY_DOOR_CLOSE 0x000001C8 +#define SoundId_METAL_GATE_OPEN 0x000001C9 +#define SoundId_METAL_GATE_CLOSE 0x000001CA +#define SoundId_BOW_SPOOK 0x00000291 +#define SoundId_SMOKE_BURST 0x000002CD +#define SoundId_DAYZEE_SONG 0x000002D7 +#define SoundId_POWER_UP 0x000002D8 +#define SoundId_SHY_GUY_SCREAMS1 0x0000030C +#define SoundId_SHY_GUY_SCREAMS2 0x0000030D +#define SoundId_SHY_GUY_SCREAMS3 0x0000030E +#define SoundId_TOY_TANK_MOVE1 0x0000030F +#define SoundId_TOY_TANK_MOVE2 0x00000310 +#define SoundId_GENERAL_WHISTLE 0x00000395 +#define SoundId_MOLE_SURFACE 0x00000321 +#define SoundId_MOLE_DIG 0x00000322 +#define SoundId_MOLE_POP 0x00000323 +#define SoundId_JUMP 0x000003E2 +#define SoundId_MISS_JUMP 0x000003E3 +#define SoundId_DEATH 0x000003E5 +#define SoundId_BIG_POWER_UP 0x000003E6 +#define SoundId_MOLE_THROW 0x000003E8 +#define SoundId_CLOSE_SHELL 0x000002FF +#define SoundId_OPEN_SHELL 0x000003D4 +#define SoundId_BOW_VANISH 0x0000200E +#define SoundId_BOW_APPEAR 0x0000200F +#define SoundId_CANNON1 0x00002016 +#define SoundId_CANNON2 0x00002017 +#define SoundId_CANNON3 0x00002018 +#define SoundId_JUMP2 0x00002081 +#define SoundId_BOMB_BLAST 0x00002076 +#define SoundId_SPELL_CAST1 0x000020D4 +#define SoundId_SPELL_CAST2 0x000020D5 +#define SoundId_SPELL_CAST3 0x000020D6 +#define SoundId_SPELL_CAST4 0x000020D7 +#define SoundId_SPELL_CAST5 0x000020D8 -typedef UNK_TYPE SOUND; -#define SOUND_JR_TROOPA_SPLASH 0x00000045 -#define SOUND_JR_TROOPA_SWIM 0x00000046 -#define SOUND_BOO_SPOOK 0x00000047 -#define SOUND_BOO_VANISH 0x000000C1 -#define SOUND_BOO_APPEAR 0x000000C3 -#define SOUND_MENU_OPEN 0x000000C5 -#define SOUND_MENU_CLOSE 0x000000C6 -#define SOUND_MENU_CHANGE_SELECTION 0x000000C7 -#define SOUND_MENU_CHANGE_TAB 0x000000C8 -#define SOUND_MENU_NEXT 0x000000C9 -#define SOUND_MENU_BACK 0x000000CA -#define SOUND_STEP1 0x00000141 -#define SOUND_STEP2 0x00000142 -#define SOUND_TORNADO_JUMP 0x00000147 -#define SOUND_SOFT_LAND 0x00000148 -#define SOUND_LAND 0x0000014B -#define SOUND_HIT_BLOCK 0x0000014E -#define SOUND_SEARCH_BUSH 0x00000153 -#define SOUND_BASIC_DOOR_OPEN 0x000001C1 -#define SOUND_BASIC_DOOR_CLOSE 0x000001C2 -#define SOUND_METAL_DOOR_OPEN 0x000001C3 -#define SOUND_METAL_DOOR_CLOSE 0x000001C4 -#define SOUND_LARGE_DOOR_OPEN 0x000001C5 -#define SOUND_LARGE_DOOR_CLOSE 0x000001C6 -#define SOUND_CREAKY_DOOR_OPEN 0x000001C7 -#define SOUND_CREAKY_DOOR_CLOSE 0x000001C8 -#define SOUND_METAL_GATE_OPEN 0x000001C9 -#define SOUND_METAL_GATE_CLOSE 0x000001CA -#define SOUND_BOW_SPOOK 0x00000291 -#define SOUND_SMOKE_BURST 0x000002CD -#define SOUND_DAYZEE_SONG 0x000002D7 -#define SOUND_POWER_UP 0x000002D8 -#define SOUND_SHY_GUY_SCREAMS1 0x0000030C -#define SOUND_SHY_GUY_SCREAMS2 0x0000030D -#define SOUND_SHY_GUY_SCREAMS3 0x0000030E -#define SOUND_TOY_TANK_MOVE1 0x0000030F -#define SOUND_TOY_TANK_MOVE2 0x00000310 -#define SOUND_GENERAL_WHISTLE 0x00000395 -#define SOUND_MOLE_SURFACE 0x00000321 -#define SOUND_MOLE_DIG 0x00000322 -#define SOUND_MOLE_POP 0x00000323 -#define SOUND_JUMP 0x000003E2 -#define SOUND_MISS_JUMP 0x000003E3 -#define SOUND_DEATH 0x000003E5 -#define SOUND_BIG_POWER_UP 0x000003E6 -#define SOUND_MOLE_THROW 0x000003E8 -#define SOUND_CLOSE_SHELL 0x000002FF -#define SOUND_OPEN_SHELL 0x000003D4 -#define SOUND_BOW_VANISH 0x0000200E -#define SOUND_BOW_APPEAR 0x0000200F -#define SOUND_CANNON1 0x00002016 -#define SOUND_CANNON2 0x00002017 -#define SOUND_CANNON3 0x00002018 -#define SOUND_JUMP_COPY 0x00002081 -#define SOUND_BOMB_BLAST 0x00002076 -#define SOUND_SPELL_CAST1 0x000020D4 -#define SOUND_SPELL_CAST2 0x000020D5 -#define SOUND_SPELL_CAST3 0x000020D6 -#define SOUND_SPELL_CAST4 0x000020D7 -#define SOUND_SPELL_CAST5 0x000020D8 +typedef UNK_TYPE Cam; +#define Cam_DEFAULT 0x00000000 +#define Cam_BATTLE 0x00000001 +#define Cam_TATTLE 0x00000002 +#define Cam_CAM3 0x00000003 -typedef UNK_TYPE CAM; -#define CAM_DEFAULT 0x00000000 -#define CAM_BATTLE 0x00000001 -#define CAM_TATTLE 0x00000002 -#define CAM_CAM3 0x00000003 +typedef UNK_TYPE ItemId; +#define ItemId_JUMP 0x00000001 +#define ItemId_SPIN_JUMP 0x00000002 +#define ItemId_TORNADO_JUMP 0x00000003 +#define ItemId_HAMMER 0x00000004 +#define ItemId_SUPER_HAMMER 0x00000005 +#define ItemId_ULTRA_HAMMER 0x00000006 +#define ItemId_LUCKY_STAR 0x00000007 +#define ItemId_MAP 0x00000008 +#define ItemId_BIG_MAP 0x00000009 +#define ItemId_FIRST_DEGREE_CARD 0x0000000A +#define ItemId_SECOND_DEGREE_CARD 0x0000000B +#define ItemId_THIRD_DEGREE_CARD 0x0000000C +#define ItemId_FOURTH_DEGREE_CARD 0x0000000D +#define ItemId_DIPLOMA 0x0000000E +#define ItemId_ULTRA_STONE 0x0000000F +#define ItemId_FORTRESS_KEY 0x00000010 +#define ItemId_RUINS_KEY 0x00000011 +#define ItemId_PULSE_STONE 0x00000012 +#define ItemId_CASTLE_KEY1 0x00000013 +#define ItemId_PALACE_KEY 0x00000014 +#define ItemId_LUNAR_STONE 0x00000015 +#define ItemId_PYRAMID_STONE 0x00000016 +#define ItemId_DIAMOND_STONE 0x00000017 +#define ItemId_GOLDEN_VASE 0x00000018 +#define ItemId_KOOPERS_SHELL 0x00000019 +#define ItemId_CASTLE_KEY2 0x0000001A +#define ItemId_FOREST_PASS 0x0000001B +#define ItemId_WEIGHT 0x0000001C +#define ItemId_BOOS_PORTRAIT 0x0000001D +#define ItemId_CRYSTAL_BERRY 0x0000001E +#define ItemId_MYSTICAL_KEY 0x0000001F +#define ItemId_STOREROOM_KEY 0x00000020 +#define ItemId_TOY_TRAIN 0x00000021 +#define ItemId_RECORD 0x00000022 +#define ItemId_FRYING_PAN 0x00000023 +#define ItemId_DICTIONARY 0x00000024 +#define ItemId_MYSTERY_NOTE 0x00000025 +#define ItemId_SUSPICIOUS_NOTE 0x00000026 +#define ItemId_CRYSTAL_BALL 0x00000027 +#define ItemId_SCREWDRIVER 0x00000028 +#define ItemId_COOKBOOK 0x00000029 +#define ItemId_JADE_RAVEN 0x0000002A +#define ItemId_MAGICAL_SEED1 0x0000002B +#define ItemId_MAGICAL_SEED2 0x0000002C +#define ItemId_MAGICAL_SEED3 0x0000002D +#define ItemId_MAGICAL_SEED4 0x0000002E +#define ItemId_TOAD_DOLL 0x0000002F +#define ItemId_CALCULATOR 0x00000030 +#define ItemId_BUCKET 0x00000031 +#define ItemId_SCARF 0x00000032 +#define ItemId_RED_KEY 0x00000033 +#define ItemId_BLUE_KEY 0x00000034 +#define ItemId_LETTER01 0x00000036 +#define ItemId_LETTER02 0x00000037 +#define ItemId_LETTER03 0x00000038 +#define ItemId_LETTER04 0x00000039 +#define ItemId_LETTER05 0x0000003A +#define ItemId_LETTER06 0x0000003B +#define ItemId_LETTER07 0x0000003C +#define ItemId_LETTER08 0x0000003D +#define ItemId_LETTER09 0x0000003E +#define ItemId_LETTER10 0x00000040 +#define ItemId_LETTER11 0x00000041 +#define ItemId_LETTER12 0x00000045 +#define ItemId_LETTER13 0x00000046 +#define ItemId_LETTER14 0x00000047 +#define ItemId_LETTER15 0x00000048 +#define ItemId_LETTER16 0x00000049 +#define ItemId_LETTER17 0x0000004A +#define ItemId_LETTER18 0x0000004B +#define ItemId_LETTER19 0x0000004C +#define ItemId_LETTER20 0x0000004E +#define ItemId_LETTER21 0x0000004F +#define ItemId_LETTER22 0x00000050 +#define ItemId_LETTER23 0x00000051 +#define ItemId_LETTER24 0x00000052 +#define ItemId_ARTIFACT 0x00000053 +#define ItemId_LETTER25 0x00000054 +#define ItemId_DOLLY 0x00000056 +#define ItemId_WATER_STONE 0x00000057 +#define ItemId_MAGICAL_BEAN 0x00000058 +#define ItemId_FERTILE_SOIL 0x00000059 +#define ItemId_MIRACLE_WATER 0x0000005A +#define ItemId_VOLCANO_VASE 0x0000005B +#define ItemId_TAPE 0x0000005C +#define ItemId_SUGAR 0x0000005D +#define ItemId_SALT 0x0000005E +#define ItemId_EGG1 0x0000005F +#define ItemId_CREAM 0x00000060 +#define ItemId_STRAWBERRY 0x00000061 +#define ItemId_BUTTER 0x00000062 +#define ItemId_CLEANSER 0x00000063 +#define ItemId_WATER 0x00000064 +#define ItemId_FLOUR 0x00000065 +#define ItemId_MILK 0x00000066 +#define ItemId_LYRICS 0x00000067 +#define ItemId_MELODY 0x00000068 +#define ItemId_MAILBAG 0x00000069 +#define ItemId_CASTLE_KEY3 0x0000006A +#define ItemId_ODD_KEY 0x0000006B +#define ItemId_STAR_STONE 0x0000006C +#define ItemId_SNEAKY_PARASOL 0x0000006D +#define ItemId_KOOPA_LEGENDS 0x0000006E +#define ItemId_AUTOGRAPH1 0x0000006F +#define ItemId_EMPTY_WALLET 0x00000070 +#define ItemId_AUTOGRAPH2 0x00000071 +#define ItemId_KOOPA_SHELL 0x00000072 +#define ItemId_OLD_PHOTO 0x00000073 +#define ItemId_GLASSES 0x00000074 +#define ItemId_PHOTOGRAPH 0x00000075 +#define ItemId_PACKAGE 0x00000076 +#define ItemId_RED_JAR 0x00000077 +#define ItemId_CASTLE_KEY4 0x00000078 +#define ItemId_WAREHOUSE_KEY 0x00000079 +#define ItemId_PRISON_KEY1 0x0000007A +#define ItemId_SILVER_CREDIT 0x0000007B +#define ItemId_GOLD_CREDIT 0x0000007C +#define ItemId_PRISON_KEY2 0x0000007D +#define ItemId_PRISON_KEY3 0x0000007E +#define ItemId_PRISON_KEY4 0x0000007F +#define ItemId_FIRE_FLOWER 0x00000080 +#define ItemId_SNOWMAN_DOLL 0x00000081 +#define ItemId_THUNDER_RAGE 0x00000082 +#define ItemId_SHOOTING_STAR 0x00000083 +#define ItemId_THUNDER_BOLT 0x00000084 +#define ItemId_PEBBLE 0x00000085 +#define ItemId_DUSTY_HAMMER 0x00000086 +#define ItemId_INSECTICIDE_HERB 0x00000087 +#define ItemId_STONE_CAP 0x00000088 +#define ItemId_TASTY_TONIC 0x00000089 +#define ItemId_MUSHROOM 0x0000008A +#define ItemId_VOLT_SHROOM 0x0000008B +#define ItemId_SUPER_SHROOM 0x0000008C +#define ItemId_DRIED_SHROOM 0x0000008D +#define ItemId_ULTRA_SHROOM 0x0000008E +#define ItemId_SLEEPY_SHEEP 0x0000008F +#define ItemId_P_O_W_BLOCK 0x00000090 +#define ItemId_HUSTLE_DRINK 0x00000091 +#define ItemId_STOP_WATCH 0x00000092 +#define ItemId_WHACKAS_BUMP 0x00000093 +#define ItemId_APPLE 0x00000094 +#define ItemId_LIFE_SHROOM 0x00000095 +#define ItemId_MYSTERY 0x00000096 +#define ItemId_REPEL_GEL 0x00000097 +#define ItemId_FRIGHT_JAR 0x00000098 +#define ItemId_PLEASE_COME_BACK 0x00000099 +#define ItemId_DIZZY_DIAL 0x0000009A +#define ItemId_SUPER_SODA 0x0000009B +#define ItemId_LEMON 0x0000009C +#define ItemId_LIME 0x0000009D +#define ItemId_BLUE_BERRY 0x0000009E +#define ItemId_RED_BERRY 0x0000009F +#define ItemId_YELLOW_BERRY 0x000000A0 +#define ItemId_BUBBLE_BERRY 0x000000A1 +#define ItemId_JAMMIN_JELLY 0x000000A2 +#define ItemId_MAPLE_SYRUP 0x000000A3 +#define ItemId_HONEY_SYRUP 0x000000A4 +#define ItemId_GOOMNUT 0x000000A5 +#define ItemId_KOOPA_LEAF 0x000000A6 +#define ItemId_DRIED_PASTA 0x000000A7 +#define ItemId_DRIED_FRUIT 0x000000A8 +#define ItemId_STRANGE_LEAF 0x000000A9 +#define ItemId_CAKE_MIX 0x000000AA +#define ItemId_EGG2 0x000000AB +#define ItemId_COCONUT 0x000000AC +#define ItemId_MELON 0x000000AD +#define ItemId_STINKY_HERB 0x000000AE +#define ItemId_ICED_POTATO 0x000000AF +#define ItemId_SPICY_SOUP 0x000000B0 +#define ItemId_APPLE_PIE 0x000000B1 +#define ItemId_HONEY_ULTRA 0x000000B2 +#define ItemId_MAPLE_ULTRA 0x000000B3 +#define ItemId_JELLY_ULTRA 0x000000B4 +#define ItemId_KOOPASTA 0x000000B5 +#define ItemId_FRIED_SHROOM 0x000000B6 +#define ItemId_SHROOM_CAKE 0x000000B7 +#define ItemId_SHROOM_STEAK 0x000000B8 +#define ItemId_HOT_SHROOM 0x000000B9 +#define ItemId_SWEET_SHROOM 0x000000BA +#define ItemId_YUMMY_MEAL 0x000000BB +#define ItemId_HEALTHY_JUICE 0x000000BC +#define ItemId_BLAND_MEAL 0x000000BD +#define ItemId_DELUXE_FEAST 0x000000BE +#define ItemId_SPECIAL_SHAKE 0x000000BF +#define ItemId_BIG_COOKIE 0x000000C0 +#define ItemId_CAKE 0x000000C1 +#define ItemId_MISTAKE 0x000000C2 +#define ItemId_KOOPA_TEA 0x000000C3 +#define ItemId_HONEY_SUPER 0x000000C4 +#define ItemId_MAPLE_SUPER 0x000000C5 +#define ItemId_JELLY_SUPER 0x000000C6 +#define ItemId_SPAGHETTI 0x000000C7 +#define ItemId_EGG_MISSILE 0x000000C8 +#define ItemId_FRIED_EGG 0x000000C9 +#define ItemId_HONEY_SHROOM 0x000000CA +#define ItemId_HONEY_CANDY 0x000000CB +#define ItemId_ELECTRO_POP 0x000000CC +#define ItemId_FIRE_POP 0x000000CD +#define ItemId_LIME_CANDY 0x000000CE +#define ItemId_COCO_POP 0x000000CF +#define ItemId_LEMON_CANDY 0x000000D0 +#define ItemId_JELLY_POP 0x000000D1 +#define ItemId_STRANGE_CAKE 0x000000D2 +#define ItemId_KOOKY_COOKIE 0x000000D3 +#define ItemId_FROZEN_FRIES 0x000000D4 +#define ItemId_POTATO_SALAD 0x000000D5 +#define ItemId_NUTTY_CAKE 0x000000D6 +#define ItemId_MAPLE_SHROOM 0x000000D7 +#define ItemId_BOILED_EGG 0x000000D8 +#define ItemId_YOSHI_COOKIE 0x000000D9 +#define ItemId_JELLY_SHROOM1 0x000000DA +#define ItemId_JELLY_SHROOM2 0x000000DB +#define ItemId_JELLY_SHROOM3 0x000000DC +#define ItemId_JELLY_SHROOM4 0x000000DD +#define ItemId_JELLY_SHROOM5 0x000000DE +#define ItemId_JELLY_SHROOM6 0x000000DF +#define ItemId_SPIN_SMASH 0x000000E0 +#define ItemId_MULTIBOUNCE 0x000000E1 +#define ItemId_POWER_PLUS_A 0x000000E2 +#define ItemId_DODGE_MASTER 0x000000E3 +#define ItemId_POWER_BOUNCE 0x000000E4 +#define ItemId_SPIKE_SHIELD 0x000000E5 +#define ItemId_FIRST_ATTACK 0x000000E6 +#define ItemId_H_P_PLUS_A 0x000000E7 +#define ItemId_QUAKE_HAMMER 0x000000E8 +#define ItemId_DOUBLE_DIP 0x000000E9 +#define ItemId_MYSTERY_SCROLL 0x000000EA +#define ItemId_SLEEP_STOMP 0x000000EB +#define ItemId_FIRE_SHIELD 0x000000EC +#define ItemId_QUICK_CHANGE 0x000000ED +#define ItemId_D_DOWN_POUND 0x000000EE +#define ItemId_DIZZY_STOMP 0x000000EF +#define ItemId_SMASH_CHARGE0 0x000000F0 +#define ItemId_PRETTY_LUCKY 0x000000F1 +#define ItemId_FEELING_FINE 0x000000F2 +#define ItemId_ATTACK_F_X_A 0x000000F3 +#define ItemId_ALLOR_NOTHING 0x000000F4 +#define ItemId_H_P_DRAIN 0x000000F5 +#define ItemId_JUMP_CHARGE0 0x000000F6 +#define ItemId_SLOW_GO 0x000000F7 +#define ItemId_F_P_PLUS_A 0x000000F8 +#define ItemId_MEGA_RUSH 0x000000F9 +#define ItemId_ICE_POWER 0x000000FA +#define ItemId_DEFEND_PLUS_A 0x000000FB +#define ItemId_PAY_OFF 0x000000FC +#define ItemId_MONEY_MONEY 0x000000FD +#define ItemId_CHILL_OUT 0x000000FE +#define ItemId_HAPPY_HEART_A 0x000000FF +#define ItemId_ZAP_TAP 0x00000100 +#define ItemId_BERSERKER 0x00000101 +#define ItemId_RIGHT_ON 0x00000102 +#define ItemId_RUNAWAY_PAY 0x00000103 +#define ItemId_REFUND 0x00000104 +#define ItemId_FLOWER_SAVER_A 0x00000105 +#define ItemId_TRIPLE_DIP 0x00000106 +#define ItemId_HAMMER_THROW 0x00000107 +#define ItemId_MEGA_QUAKE 0x00000108 +#define ItemId_SMASH_CHARGE 0x00000109 +#define ItemId_JUMP_CHARGE 0x0000010A +#define ItemId_S_SMASH_CHG 0x0000010B +#define ItemId_S_JUMP_CHG 0x0000010C +#define ItemId_POWER_RUSH 0x0000010D +#define ItemId_AUTO_JUMP 0x0000010E +#define ItemId_AUTO_SMASH 0x0000010F +#define ItemId_CRAZY_HEART 0x00000110 +#define ItemId_LAST_STAND 0x00000111 +#define ItemId_CLOSE_CALL 0x00000112 +#define ItemId_P_UP_D_DOWN 0x00000113 +#define ItemId_LUCKY_DAY 0x00000114 +#define ItemId_MEGA_H_P_DRAIN 0x00000115 +#define ItemId_P_DOWN_D_UP 0x00000116 +#define ItemId_POWER_QUAKE 0x00000117 +#define ItemId_AUTO_MULTIBOUNCE 0x00000118 +#define ItemId_FLOWER_FANATIC 0x00000119 +#define ItemId_HEART_FINDER 0x0000011A +#define ItemId_FLOWER_FINDER 0x0000011B +#define ItemId_SPIN_ATTACK 0x0000011C +#define ItemId_DIZZY_ATTACK 0x0000011D +#define ItemId_I_SPY 0x0000011E +#define ItemId_SPEEDY_SPIN 0x0000011F +#define ItemId_BUMP_ATTACK 0x00000120 +#define ItemId_POWER_JUMP 0x00000121 +#define ItemId_SUPER_JUMP 0x00000122 +#define ItemId_MEGA_JUMP 0x00000123 +#define ItemId_POWER_SMASH1 0x00000124 +#define ItemId_SUPER_SMASH 0x00000125 +#define ItemId_MEGA_SMASH 0x00000126 +#define ItemId_POWER_SMASH2 0x00000127 +#define ItemId_POWER_SMASH3 0x00000128 +#define ItemId_DEEP_FOCUS1 0x00000129 +#define ItemId_SUPER_FOCUS 0x0000012A +#define ItemId_SHRINK_SMASH 0x0000012B +#define ItemId_SHELL_CRACK 0x0000012C +#define ItemId_KAIDEN 0x0000012D +#define ItemId_D_DOWN_JUMP 0x0000012E +#define ItemId_SHRINK_STOMP 0x0000012F +#define ItemId_DAMAGE_DODGE_A 0x00000130 +#define ItemId_EARTHQUAKE_JUMP 0x00000131 +#define ItemId_DEEP_FOCUS2 0x00000132 +#define ItemId_DEEP_FOCUS3 0x00000133 +#define ItemId_H_P_PLUS_B 0x00000134 +#define ItemId_F_P_PLUS_B 0x00000135 +#define ItemId_HAPPY_HEART_B 0x00000136 +#define ItemId_HAPPY_HEART_X 0x00000137 +#define ItemId_FLOWER_SAVER_B 0x00000138 +#define ItemId_FLOWER_SAVER_X 0x00000139 +#define ItemId_DAMAGE_DODGE_B 0x0000013A +#define ItemId_DAMAGE_DODGE_X 0x0000013B +#define ItemId_POWER_PLUS_B 0x0000013C +#define ItemId_POWER_PLUS_X 0x0000013D +#define ItemId_DEFEND_PLUS_X 0x0000013E +#define ItemId_DEFEND_PLUS_Y 0x0000013F +#define ItemId_HAPPY_FLOWER_A 0x00000140 +#define ItemId_HAPPY_FLOWER_B 0x00000141 +#define ItemId_HAPPY_FLOWER_X 0x00000142 +#define ItemId_GROUP_FOCUS 0x00000143 +#define ItemId_PEEKABOO 0x00000144 +#define ItemId_ATTACK_F_X_D 0x00000145 +#define ItemId_ATTACK_F_X_B 0x00000146 +#define ItemId_ATTACK_F_X_E 0x00000147 +#define ItemId_ATTACK_F_X_C 0x00000148 +#define ItemId_ATTACK_F_X_F 0x00000149 +#define ItemId_H_P_PLUS_C 0x0000014A +#define ItemId_H_P_PLUS_X 0x0000014B +#define ItemId_H_P_PLUS_Y 0x0000014C +#define ItemId_F_P_PLUS_C 0x0000014D +#define ItemId_F_P_PLUS_X 0x0000014E +#define ItemId_F_P_PLUS_Y 0x0000014F +#define ItemId_HEALTHY_HEALTHY 0x00000150 +#define ItemId_ATTACK_F_X_F2 0x00000151 +#define ItemId_ATTACK_F_X_F3 0x00000152 +#define ItemId_ATTACK_F_X_F4 0x00000153 +#define ItemId_ATTACK_F_X_F5 0x00000154 +#define ItemId_PARTNER_ATTACK 0x00000155 +#define ItemId_HEART 0x00000156 +#define ItemId_COIN 0x00000157 +#define ItemId_HEART_PIECE 0x00000158 +#define ItemId_STAR_POINT 0x00000159 +#define ItemId_FULL_HEAL 0x0000015A +#define ItemId_FLOWER 0x0000015B +#define ItemId_STAR_PIECE 0x0000015C +#define ItemId_PRESENT 0x0000015D +#define ItemId_COMPLETE_CAKE 0x0000015E +#define ItemId_BARE_CAKE 0x0000015F +#define ItemId_EMPTY_CAKE_PAN 0x00000160 +#define ItemId_FULL_CAKE_PAN 0x00000161 +#define ItemId_EMPTY_MIXING_BOWL 0x00000162 +#define ItemId_FULL_MIXING_BOWL 0x00000163 +#define ItemId_CAKE_WITH_ICING 0x00000164 +#define ItemId_CAKE_WITH_BERRIES 0x00000165 +#define ItemId_HAMMER1_ICON 0x00000166 +#define ItemId_HAMMER2_ICON 0x00000167 +#define ItemId_HAMMER3_ICON 0x00000168 +#define ItemId_BOOTS1_ICON 0x00000169 +#define ItemId_BOOTS2_ICON 0x0000016A +#define ItemId_BOOTS3_ICON 0x0000016B +#define ItemId_ITEMS_ICON 0x0000016C -typedef UNK_TYPE ITEM; -#define ITEM_JUMP 0x00000001 -#define ITEM_SPIN_JUMP 0x00000002 -#define ITEM_TORNADO_JUMP 0x00000003 -#define ITEM_HAMMER 0x00000004 -#define ITEM_SUPER_HAMMER 0x00000005 -#define ITEM_ULTRA_HAMMER 0x00000006 -#define ITEM_LUCKY_STAR 0x00000007 -#define ITEM_MAP 0x00000008 -#define ITEM_BIG_MAP 0x00000009 -#define ITEM_FIRST_DEGREE_CARD 0x0000000A -#define ITEM_SECOND_DEGREE_CARD 0x0000000B -#define ITEM_THIRD_DEGREE_CARD 0x0000000C -#define ITEM_FOURTH_DEGREE_CARD 0x0000000D -#define ITEM_DIPLOMA 0x0000000E -#define ITEM_ULTRA_STONE 0x0000000F -#define ITEM_FORTRESS_KEY 0x00000010 -#define ITEM_RUINS_KEY 0x00000011 -#define ITEM_PULSE_STONE 0x00000012 -#define ITEM_CASTLE_KEY1 0x00000013 -#define ITEM_PALACE_KEY 0x00000014 -#define ITEM_LUNAR_STONE 0x00000015 -#define ITEM_PYRAMID_STONE 0x00000016 -#define ITEM_DIAMOND_STONE 0x00000017 -#define ITEM_GOLDEN_VASE 0x00000018 -#define ITEM_KOOPERS_SHELL 0x00000019 -#define ITEM_CASTLE_KEY2 0x0000001A -#define ITEM_FOREST_PASS 0x0000001B -#define ITEM_WEIGHT 0x0000001C -#define ITEM_BOOS_PORTRAIT 0x0000001D -#define ITEM_CRYSTAL_BERRY 0x0000001E -#define ITEM_MYSTICAL_KEY 0x0000001F -#define ITEM_STOREROOM_KEY 0x00000020 -#define ITEM_TOY_TRAIN 0x00000021 -#define ITEM_RECORD 0x00000022 -#define ITEM_FRYING_PAN 0x00000023 -#define ITEM_DICTIONARY 0x00000024 -#define ITEM_MYSTERY_NOTE 0x00000025 -#define ITEM_SUSPICIOUS_NOTE 0x00000026 -#define ITEM_CRYSTAL_BALL 0x00000027 -#define ITEM_SCREWDRIVER 0x00000028 -#define ITEM_COOKBOOK 0x00000029 -#define ITEM_JADE_RAVEN 0x0000002A -#define ITEM_MAGICAL_SEED1 0x0000002B -#define ITEM_MAGICAL_SEED2 0x0000002C -#define ITEM_MAGICAL_SEED3 0x0000002D -#define ITEM_MAGICAL_SEED4 0x0000002E -#define ITEM_TOAD_DOLL 0x0000002F -#define ITEM_CALCULATOR 0x00000030 -#define ITEM_BUCKET 0x00000031 -#define ITEM_SCARF 0x00000032 -#define ITEM_RED_KEY 0x00000033 -#define ITEM_BLUE_KEY 0x00000034 -#define ITEM_LETTER01 0x00000036 -#define ITEM_LETTER02 0x00000037 -#define ITEM_LETTER03 0x00000038 -#define ITEM_LETTER04 0x00000039 -#define ITEM_LETTER05 0x0000003A -#define ITEM_LETTER06 0x0000003B -#define ITEM_LETTER07 0x0000003C -#define ITEM_LETTER08 0x0000003D -#define ITEM_LETTER09 0x0000003E -#define ITEM_LETTER10 0x00000040 -#define ITEM_LETTER11 0x00000041 -#define ITEM_LETTER12 0x00000045 -#define ITEM_LETTER13 0x00000046 -#define ITEM_LETTER14 0x00000047 -#define ITEM_LETTER15 0x00000048 -#define ITEM_LETTER16 0x00000049 -#define ITEM_LETTER17 0x0000004A -#define ITEM_LETTER18 0x0000004B -#define ITEM_LETTER19 0x0000004C -#define ITEM_LETTER20 0x0000004E -#define ITEM_LETTER21 0x0000004F -#define ITEM_LETTER22 0x00000050 -#define ITEM_LETTER23 0x00000051 -#define ITEM_LETTER24 0x00000052 -#define ITEM_ARTIFACT 0x00000053 -#define ITEM_LETTER25 0x00000054 -#define ITEM_DOLLY 0x00000056 -#define ITEM_WATER_STONE 0x00000057 -#define ITEM_MAGICAL_BEAN 0x00000058 -#define ITEM_FERTILE_SOIL 0x00000059 -#define ITEM_MIRACLE_WATER 0x0000005A -#define ITEM_VOLCANO_VASE 0x0000005B -#define ITEM_TAPE 0x0000005C -#define ITEM_SUGAR 0x0000005D -#define ITEM_SALT 0x0000005E -#define ITEM_EGG1 0x0000005F -#define ITEM_CREAM 0x00000060 -#define ITEM_STRAWBERRY 0x00000061 -#define ITEM_BUTTER 0x00000062 -#define ITEM_CLEANSER 0x00000063 -#define ITEM_WATER 0x00000064 -#define ITEM_FLOUR 0x00000065 -#define ITEM_MILK 0x00000066 -#define ITEM_LYRICS 0x00000067 -#define ITEM_MELODY 0x00000068 -#define ITEM_MAILBAG 0x00000069 -#define ITEM_CASTLE_KEY3 0x0000006A -#define ITEM_ODD_KEY 0x0000006B -#define ITEM_STAR_STONE 0x0000006C -#define ITEM_SNEAKY_PARASOL 0x0000006D -#define ITEM_KOOPA_LEGENDS 0x0000006E -#define ITEM_AUTOGRAPH1 0x0000006F -#define ITEM_EMPTY_WALLET 0x00000070 -#define ITEM_AUTOGRAPH2 0x00000071 -#define ITEM_KOOPA_SHELL 0x00000072 -#define ITEM_OLD_PHOTO 0x00000073 -#define ITEM_GLASSES 0x00000074 -#define ITEM_PHOTOGRAPH 0x00000075 -#define ITEM_PACKAGE 0x00000076 -#define ITEM_RED_JAR 0x00000077 -#define ITEM_CASTLE_KEY4 0x00000078 -#define ITEM_WAREHOUSE_KEY 0x00000079 -#define ITEM_PRISON_KEY1 0x0000007A -#define ITEM_SILVER_CREDIT 0x0000007B -#define ITEM_GOLD_CREDIT 0x0000007C -#define ITEM_PRISON_KEY2 0x0000007D -#define ITEM_PRISON_KEY3 0x0000007E -#define ITEM_PRISON_KEY4 0x0000007F -#define ITEM_FIRE_FLOWER 0x00000080 -#define ITEM_SNOWMAN_DOLL 0x00000081 -#define ITEM_THUNDER_RAGE 0x00000082 -#define ITEM_SHOOTING_STAR 0x00000083 -#define ITEM_THUNDER_BOLT 0x00000084 -#define ITEM_PEBBLE 0x00000085 -#define ITEM_DUSTY_HAMMER 0x00000086 -#define ITEM_INSECTICIDE_HERB 0x00000087 -#define ITEM_STONE_CAP 0x00000088 -#define ITEM_TASTY_TONIC 0x00000089 -#define ITEM_MUSHROOM 0x0000008A -#define ITEM_VOLT_SHROOM 0x0000008B -#define ITEM_SUPER_SHROOM 0x0000008C -#define ITEM_DRIED_SHROOM 0x0000008D -#define ITEM_ULTRA_SHROOM 0x0000008E -#define ITEM_SLEEPY_SHEEP 0x0000008F -#define ITEM_P_O_W_BLOCK 0x00000090 -#define ITEM_HUSTLE_DRINK 0x00000091 -#define ITEM_STOP_WATCH 0x00000092 -#define ITEM_WHACKAS_BUMP 0x00000093 -#define ITEM_APPLE 0x00000094 -#define ITEM_LIFE_SHROOM 0x00000095 -#define ITEM_MYSTERY 0x00000096 -#define ITEM_REPEL_GEL 0x00000097 -#define ITEM_FRIGHT_JAR 0x00000098 -#define ITEM_PLEASE_COME_BACK 0x00000099 -#define ITEM_DIZZY_DIAL 0x0000009A -#define ITEM_SUPER_SODA 0x0000009B -#define ITEM_LEMON 0x0000009C -#define ITEM_LIME 0x0000009D -#define ITEM_BLUE_BERRY 0x0000009E -#define ITEM_RED_BERRY 0x0000009F -#define ITEM_YELLOW_BERRY 0x000000A0 -#define ITEM_BUBBLE_BERRY 0x000000A1 -#define ITEM_JAMMIN_JELLY 0x000000A2 -#define ITEM_MAPLE_SYRUP 0x000000A3 -#define ITEM_HONEY_SYRUP 0x000000A4 -#define ITEM_GOOMNUT 0x000000A5 -#define ITEM_KOOPA_LEAF 0x000000A6 -#define ITEM_DRIED_PASTA 0x000000A7 -#define ITEM_DRIED_FRUIT 0x000000A8 -#define ITEM_STRANGE_LEAF 0x000000A9 -#define ITEM_CAKE_MIX 0x000000AA -#define ITEM_EGG2 0x000000AB -#define ITEM_COCONUT 0x000000AC -#define ITEM_MELON 0x000000AD -#define ITEM_STINKY_HERB 0x000000AE -#define ITEM_ICED_POTATO 0x000000AF -#define ITEM_SPICY_SOUP 0x000000B0 -#define ITEM_APPLE_PIE 0x000000B1 -#define ITEM_HONEY_ULTRA 0x000000B2 -#define ITEM_MAPLE_ULTRA 0x000000B3 -#define ITEM_JELLY_ULTRA 0x000000B4 -#define ITEM_KOOPASTA 0x000000B5 -#define ITEM_FRIED_SHROOM 0x000000B6 -#define ITEM_SHROOM_CAKE 0x000000B7 -#define ITEM_SHROOM_STEAK 0x000000B8 -#define ITEM_HOT_SHROOM 0x000000B9 -#define ITEM_SWEET_SHROOM 0x000000BA -#define ITEM_YUMMY_MEAL 0x000000BB -#define ITEM_HEALTHY_JUICE 0x000000BC -#define ITEM_BLAND_MEAL 0x000000BD -#define ITEM_DELUXE_FEAST 0x000000BE -#define ITEM_SPECIAL_SHAKE 0x000000BF -#define ITEM_BIG_COOKIE 0x000000C0 -#define ITEM_CAKE 0x000000C1 -#define ITEM_MISTAKE 0x000000C2 -#define ITEM_KOOPA_TEA 0x000000C3 -#define ITEM_HONEY_SUPER 0x000000C4 -#define ITEM_MAPLE_SUPER 0x000000C5 -#define ITEM_JELLY_SUPER 0x000000C6 -#define ITEM_SPAGHETTI 0x000000C7 -#define ITEM_EGG_MISSILE 0x000000C8 -#define ITEM_FRIED_EGG 0x000000C9 -#define ITEM_HONEY_SHROOM 0x000000CA -#define ITEM_HONEY_CANDY 0x000000CB -#define ITEM_ELECTRO_POP 0x000000CC -#define ITEM_FIRE_POP 0x000000CD -#define ITEM_LIME_CANDY 0x000000CE -#define ITEM_COCO_POP 0x000000CF -#define ITEM_LEMON_CANDY 0x000000D0 -#define ITEM_JELLY_POP 0x000000D1 -#define ITEM_STRANGE_CAKE 0x000000D2 -#define ITEM_KOOKY_COOKIE 0x000000D3 -#define ITEM_FROZEN_FRIES 0x000000D4 -#define ITEM_POTATO_SALAD 0x000000D5 -#define ITEM_NUTTY_CAKE 0x000000D6 -#define ITEM_MAPLE_SHROOM 0x000000D7 -#define ITEM_BOILED_EGG 0x000000D8 -#define ITEM_YOSHI_COOKIE 0x000000D9 -#define ITEM_JELLY_SHROOM1 0x000000DA -#define ITEM_JELLY_SHROOM2 0x000000DB -#define ITEM_JELLY_SHROOM3 0x000000DC -#define ITEM_JELLY_SHROOM4 0x000000DD -#define ITEM_JELLY_SHROOM5 0x000000DE -#define ITEM_JELLY_SHROOM6 0x000000DF -#define ITEM_SPIN_SMASH 0x000000E0 -#define ITEM_MULTIBOUNCE 0x000000E1 -#define ITEM_POWER_PLUS_A 0x000000E2 -#define ITEM_DODGE_MASTER 0x000000E3 -#define ITEM_POWER_BOUNCE 0x000000E4 -#define ITEM_SPIKE_SHIELD 0x000000E5 -#define ITEM_FIRST_ATTACK 0x000000E6 -#define ITEM_H_P_PLUS_A 0x000000E7 -#define ITEM_QUAKE_HAMMER 0x000000E8 -#define ITEM_DOUBLE_DIP 0x000000E9 -#define ITEM_MYSTERY_SCROLL 0x000000EA -#define ITEM_SLEEP_STOMP 0x000000EB -#define ITEM_FIRE_SHIELD 0x000000EC -#define ITEM_QUICK_CHANGE 0x000000ED -#define ITEM_D_DOWN_POUND 0x000000EE -#define ITEM_DIZZY_STOMP 0x000000EF -#define ITEM_SMASH_CHARGE0 0x000000F0 -#define ITEM_PRETTY_LUCKY 0x000000F1 -#define ITEM_FEELING_FINE 0x000000F2 -#define ITEM_ATTACK_F_X_A 0x000000F3 -#define ITEM_ALLOR_NOTHING 0x000000F4 -#define ITEM_H_P_DRAIN 0x000000F5 -#define ITEM_JUMP_CHARGE0 0x000000F6 -#define ITEM_SLOW_GO 0x000000F7 -#define ITEM_F_P_PLUS_A 0x000000F8 -#define ITEM_MEGA_RUSH 0x000000F9 -#define ITEM_ICE_POWER 0x000000FA -#define ITEM_DEFEND_PLUS_A 0x000000FB -#define ITEM_PAY_OFF 0x000000FC -#define ITEM_MONEY_MONEY 0x000000FD -#define ITEM_CHILL_OUT 0x000000FE -#define ITEM_HAPPY_HEART_A 0x000000FF -#define ITEM_ZAP_TAP 0x00000100 -#define ITEM_BERSERKER 0x00000101 -#define ITEM_RIGHT_ON 0x00000102 -#define ITEM_RUNAWAY_PAY 0x00000103 -#define ITEM_REFUND 0x00000104 -#define ITEM_FLOWER_SAVER_A 0x00000105 -#define ITEM_TRIPLE_DIP 0x00000106 -#define ITEM_HAMMER_THROW 0x00000107 -#define ITEM_MEGA_QUAKE 0x00000108 -#define ITEM_SMASH_CHARGE 0x00000109 -#define ITEM_JUMP_CHARGE 0x0000010A -#define ITEM_S_SMASH_CHG 0x0000010B -#define ITEM_S_JUMP_CHG 0x0000010C -#define ITEM_POWER_RUSH 0x0000010D -#define ITEM_AUTO_JUMP 0x0000010E -#define ITEM_AUTO_SMASH 0x0000010F -#define ITEM_CRAZY_HEART 0x00000110 -#define ITEM_LAST_STAND 0x00000111 -#define ITEM_CLOSE_CALL 0x00000112 -#define ITEM_P_UP_D_DOWN 0x00000113 -#define ITEM_LUCKY_DAY 0x00000114 -#define ITEM_MEGA_H_P_DRAIN 0x00000115 -#define ITEM_P_DOWN_D_UP 0x00000116 -#define ITEM_POWER_QUAKE 0x00000117 -#define ITEM_AUTO_MULTIBOUNCE 0x00000118 -#define ITEM_FLOWER_FANATIC 0x00000119 -#define ITEM_HEART_FINDER 0x0000011A -#define ITEM_FLOWER_FINDER 0x0000011B -#define ITEM_SPIN_ATTACK 0x0000011C -#define ITEM_DIZZY_ATTACK 0x0000011D -#define ITEM_I_SPY 0x0000011E -#define ITEM_SPEEDY_SPIN 0x0000011F -#define ITEM_BUMP_ATTACK 0x00000120 -#define ITEM_POWER_JUMP 0x00000121 -#define ITEM_SUPER_JUMP 0x00000122 -#define ITEM_MEGA_JUMP 0x00000123 -#define ITEM_POWER_SMASH1 0x00000124 -#define ITEM_SUPER_SMASH 0x00000125 -#define ITEM_MEGA_SMASH 0x00000126 -#define ITEM_POWER_SMASH2 0x00000127 -#define ITEM_POWER_SMASH3 0x00000128 -#define ITEM_DEEP_FOCUS1 0x00000129 -#define ITEM_SUPER_FOCUS 0x0000012A -#define ITEM_SHRINK_SMASH 0x0000012B -#define ITEM_SHELL_CRACK 0x0000012C -#define ITEM_KAIDEN 0x0000012D -#define ITEM_D_DOWN_JUMP 0x0000012E -#define ITEM_SHRINK_STOMP 0x0000012F -#define ITEM_DAMAGE_DODGE_A 0x00000130 -#define ITEM_EARTHQUAKE_JUMP 0x00000131 -#define ITEM_DEEP_FOCUS2 0x00000132 -#define ITEM_DEEP_FOCUS3 0x00000133 -#define ITEM_H_P_PLUS_B 0x00000134 -#define ITEM_F_P_PLUS_B 0x00000135 -#define ITEM_HAPPY_HEART_B 0x00000136 -#define ITEM_HAPPY_HEART_X 0x00000137 -#define ITEM_FLOWER_SAVER_B 0x00000138 -#define ITEM_FLOWER_SAVER_X 0x00000139 -#define ITEM_DAMAGE_DODGE_B 0x0000013A -#define ITEM_DAMAGE_DODGE_X 0x0000013B -#define ITEM_POWER_PLUS_B 0x0000013C -#define ITEM_POWER_PLUS_X 0x0000013D -#define ITEM_DEFEND_PLUS_X 0x0000013E -#define ITEM_DEFEND_PLUS_Y 0x0000013F -#define ITEM_HAPPY_FLOWER_A 0x00000140 -#define ITEM_HAPPY_FLOWER_B 0x00000141 -#define ITEM_HAPPY_FLOWER_X 0x00000142 -#define ITEM_GROUP_FOCUS 0x00000143 -#define ITEM_PEEKABOO 0x00000144 -#define ITEM_ATTACK_F_X_D 0x00000145 -#define ITEM_ATTACK_F_X_B 0x00000146 -#define ITEM_ATTACK_F_X_E 0x00000147 -#define ITEM_ATTACK_F_X_C 0x00000148 -#define ITEM_ATTACK_F_X_F 0x00000149 -#define ITEM_H_P_PLUS_C 0x0000014A -#define ITEM_H_P_PLUS_X 0x0000014B -#define ITEM_H_P_PLUS_Y 0x0000014C -#define ITEM_F_P_PLUS_C 0x0000014D -#define ITEM_F_P_PLUS_X 0x0000014E -#define ITEM_F_P_PLUS_Y 0x0000014F -#define ITEM_HEALTHY_HEALTHY 0x00000150 -#define ITEM_ATTACK_F_X_F2 0x00000151 -#define ITEM_ATTACK_F_X_F3 0x00000152 -#define ITEM_ATTACK_F_X_F4 0x00000153 -#define ITEM_ATTACK_F_X_F5 0x00000154 -#define ITEM_PARTNER_ATTACK 0x00000155 -#define ITEM_HEART 0x00000156 -#define ITEM_COIN 0x00000157 -#define ITEM_HEART_PIECE 0x00000158 -#define ITEM_STAR_POINT 0x00000159 -#define ITEM_FULL_HEAL 0x0000015A -#define ITEM_FLOWER 0x0000015B -#define ITEM_STAR_PIECE 0x0000015C -#define ITEM_PRESENT 0x0000015D -#define ITEM_COMPLETE_CAKE 0x0000015E -#define ITEM_BARE_CAKE 0x0000015F -#define ITEM_EMPTY_CAKE_PAN 0x00000160 -#define ITEM_FULL_CAKE_PAN 0x00000161 -#define ITEM_EMPTY_MIXING_BOWL 0x00000162 -#define ITEM_FULL_MIXING_BOWL 0x00000163 -#define ITEM_CAKE_WITH_ICING 0x00000164 -#define ITEM_CAKE_WITH_BERRIES 0x00000165 -#define ITEM_HAMMER1_ICON 0x00000166 -#define ITEM_HAMMER2_ICON 0x00000167 -#define ITEM_HAMMER3_ICON 0x00000168 -#define ITEM_BOOTS1_ICON 0x00000169 -#define ITEM_BOOTS2_ICON 0x0000016A -#define ITEM_BOOTS3_ICON 0x0000016B -#define ITEM_ITEMS_ICON 0x0000016C +typedef UNK_TYPE PlayerAnim; +#define PlayerAnim_STAND_STILL 0x00010000 +#define PlayerAnim_CROUCH_STILL 0x00010001 +#define PlayerAnim_PANTING 0x00010003 +#define PlayerAnim_WALKING 0x00010004 +#define PlayerAnim_RUNNING 0x00010005 +#define PlayerAnim_BEFORE_JUMP 0x00010006 +#define PlayerAnim_MIDAIR_STILL 0x00010007 +#define PlayerAnim_MIDAIR 0x00010008 +#define PlayerAnim_STUNNED_STILL 0x0001000E +#define PlayerAnim_DEAD_STILL 0x0001000F +#define PlayerAnim_SPINNING 0x00010011 +#define PlayerAnim_FLAILING 0x00010012 +#define PlayerAnim_SIT_STILL 0x00010013 +#define PlayerAnim_CROUCH 0x00010014 +#define PlayerAnim_STONE_STILL 0x00010015 +#define PlayerAnim_THROW 0x00010016 +#define PlayerAnim_FALL_BACK 0x00010017 +#define PlayerAnim_FALL_DOWN 0x00010018 +#define PlayerAnim_SCARED 0x00010019 +#define PlayerAnim_HURT_FOOT 0x0001001A +#define PlayerAnim_RUN_PANIC 0x0001001B +#define PlayerAnim_EAT 0x0001001C +#define PlayerAnim_STICK_OUT_TONGUE 0x0001001D +#define PlayerAnim_PLANT 0x0001001E +#define PlayerAnim_GOT_ITEM 0x0001001F +#define PlayerAnim_READY_JUMP 0x00010020 +#define PlayerAnim_THINKING 0x00010021 +#define PlayerAnim_LOST_BALANCE 0x00010022 +#define PlayerAnim_SHOCK_STILL 0x00010023 +#define PlayerAnim_DRINK 0x00010025 +#define PlayerAnim_SQUISH 0x00010026 +#define PlayerAnim_RUN_THINKING 0x00010027 +#define PlayerAnim_QUESTION 0x00010028 +#define PlayerAnim_NOD_YES 0x00010029 +#define PlayerAnim_PRAY 0x0001002C +#define PlayerAnim_CHARRED 0x0001002F +#define PlayerAnim_GET_UP 0x00010030 +#define PlayerAnim_DUST_OFF 0x00010031 +#define PlayerAnim_THUMBS_UP 0x00010032 -typedef UNK_TYPE PLAYER_ANIM; -#define PLAYER_ANIM_STAND_STILL 0x00010000 -#define PLAYER_ANIM_CROUCH_STILL 0x00010001 -#define PLAYER_ANIM_PANTING 0x00010003 -#define PLAYER_ANIM_WALKING 0x00010004 -#define PLAYER_ANIM_RUNNING 0x00010005 -#define PLAYER_ANIM_BEFORE_JUMP 0x00010006 -#define PLAYER_ANIM_MIDAIR_STILL 0x00010007 -#define PLAYER_ANIM_MIDAIR 0x00010008 -#define PLAYER_ANIM_STUNNED_STILL 0x0001000E -#define PLAYER_ANIM_DEAD_STILL 0x0001000F -#define PLAYER_ANIM_SPINNING 0x00010011 -#define PLAYER_ANIM_FLAILING 0x00010012 -#define PLAYER_ANIM_SIT_STILL 0x00010013 -#define PLAYER_ANIM_CROUCH 0x00010014 -#define PLAYER_ANIM_STONE_STILL 0x00010015 -#define PLAYER_ANIM_THROW 0x00010016 -#define PLAYER_ANIM_FALL_BACK 0x00010017 -#define PLAYER_ANIM_FALL_DOWN 0x00010018 -#define PLAYER_ANIM_SCARED 0x00010019 -#define PLAYER_ANIM_HURT_FOOT 0x0001001A -#define PLAYER_ANIM_RUN_PANIC 0x0001001B -#define PLAYER_ANIM_EAT 0x0001001C -#define PLAYER_ANIM_STICK_OUT_TONGUE 0x0001001D -#define PLAYER_ANIM_PLANT 0x0001001E -#define PLAYER_ANIM_GOT_ITEM 0x0001001F -#define PLAYER_ANIM_READY_JUMP 0x00010020 -#define PLAYER_ANIM_THINKING 0x00010021 -#define PLAYER_ANIM_LOST_BALANCE 0x00010022 -#define PLAYER_ANIM_SHOCK_STILL 0x00010023 -#define PLAYER_ANIM_DRINK 0x00010025 -#define PLAYER_ANIM_SQUISH 0x00010026 -#define PLAYER_ANIM_RUN_THINKING 0x00010027 -#define PLAYER_ANIM_QUESTION 0x00010028 -#define PLAYER_ANIM_NOD_YES 0x00010029 -#define PLAYER_ANIM_PRAY 0x0001002C -#define PLAYER_ANIM_CHARRED 0x0001002F -#define PLAYER_ANIM_GET_UP 0x00010030 -#define PLAYER_ANIM_DUST_OFF 0x00010031 -#define PLAYER_ANIM_THUMBS_UP 0x00010032 +typedef UNK_TYPE AmbientSounds; +#define AmbientSounds_SPOOKY 0x00000000 +#define AmbientSounds_WIND 0x00000001 +#define AmbientSounds_BEACH 0x00000002 +#define AmbientSounds_JUNGLE 0x00000003 +#define AmbientSounds_UNDER_SEA1 0x00000004 +#define AmbientSounds_UNDER_SEA2 0x00000005 +#define AmbientSounds_SILENCE 0x00000006 +#define AmbientSounds_UNDER_SEA3 0x00000007 +#define AmbientSounds_UNDER_SEA4 0x00000008 +#define AmbientSounds_EXIT_SEA 0x00000009 +#define AmbientSounds_UNDER_SEA5 0x0000000A +#define AmbientSounds_UNDER_SEA6 0x0000000B +#define AmbientSounds_BIRDS 0x0000000C +#define AmbientSounds_SEA 0x0000000D +#define AmbientSounds_MUSIC 0x00000010 -typedef UNK_TYPE AMBIENT_SOUNDS; -#define AMBIENT_SOUNDS_SPOOKY 0x00000000 -#define AMBIENT_SOUNDS_WIND 0x00000001 -#define AMBIENT_SOUNDS_BEACH 0x00000002 -#define AMBIENT_SOUNDS_JUNGLE 0x00000003 -#define AMBIENT_SOUNDS_UNDER_SEA1 0x00000004 -#define AMBIENT_SOUNDS_UNDER_SEA2 0x00000005 -#define AMBIENT_SOUNDS_SILENCE 0x00000006 -#define AMBIENT_SOUNDS_UNDER_SEA3 0x00000007 -#define AMBIENT_SOUNDS_UNDER_SEA4 0x00000008 -#define AMBIENT_SOUNDS_EXIT_SEA 0x00000009 -#define AMBIENT_SOUNDS_UNDER_SEA5 0x0000000A -#define AMBIENT_SOUNDS_UNDER_SEA6 0x0000000B -#define AMBIENT_SOUNDS_BIRDS 0x0000000C -#define AMBIENT_SOUNDS_SEA 0x0000000D -#define AMBIENT_SOUNDS_MUSIC 0x00000010 +typedef UNK_TYPE EncounterOutcome; +#define EncounterOutcome_PLAYER_WON 0x00000000 +#define EncounterOutcome_PLAYER_LOST 0x00000001 +#define EncounterOutcome_PLAYER_FLED 0x00000002 +#define EncounterOutcome_ENEMY_FLED 0x00000003 -typedef UNK_TYPE OUTCOME; -#define OUTCOME_PLAYER_WON 0x00000000 -#define OUTCOME_PLAYER_LOST 0x00000001 -#define OUTCOME_PLAYER_FLED 0x00000002 -#define OUTCOME_ENEMY_FLED 0x00000003 +typedef UNK_TYPE DecorationId; +#define DecorationId_GOLDEN_FLAMES 0x00000001 +#define DecorationId_SWEAT 0x00000002 +#define DecorationId_SEEING_STARS 0x00000003 +#define DecorationId_RED_FLAMES 0x00000004 +#define DecorationId_GREY_SMOKE_TRAIL 0x00000005 +#define DecorationId_FIRE_SMOKE_TRAIL 0x00000006 +#define DecorationId_WHIRLWIND 0x00000007 +#define DecorationId_STEAM_EMITTER 0x00000008 +#define DecorationId_RADIAL_STAR_EMITTER 0x0000000B -typedef UNK_TYPE DECORATION; -#define DECORATION_GOLDEN_FLAMES 0x00000001 -#define DECORATION_SWEAT 0x00000002 -#define DECORATION_SEEING_STARS 0x00000003 -#define DECORATION_RED_FLAMES 0x00000004 -#define DECORATION_GREY_SMOKE_TRAIL 0x00000005 -#define DECORATION_FIRE_SMOKE_TRAIL 0x00000006 -#define DECORATION_WHIRLWIND 0x00000007 -#define DECORATION_STEAM_EMITTER 0x00000008 -#define DECORATION_RADIAL_STAR_EMITTER 0x0000000B +typedef UNK_TYPE HitResult; +#define HitResult_HIT 0x00000000 +#define HitResult_LANDED_ON_SPIKE 0x00000004 +#define HitResult_LUCKY 0x00000005 +#define HitResult_MISS 0x00000006 +#define HitResult_HIT_STATIC 0x00000007 +#define HitResult_IMMUNE 0x00000008 +#define HitResult_TriggerFlagsED_EXPLODE -1 -typedef UNK_TYPE HIT_RESULT; -#define HIT_RESULT_HIT 0x00000000 -#define HIT_RESULT_LANDED_ON_SPIKE 0x00000004 -#define HIT_RESULT_LUCKY 0x00000005 -#define HIT_RESULT_MISS 0x00000006 -#define HIT_RESULT_HIT_STATIC 0x00000007 -#define HIT_RESULT_IMMUNE 0x00000008 -#define HIT_RESULT_TRIGGERED_EXPLODE -1 +typedef UNK_TYPE Iter; +#define Iter_FIRST 0xFFFFFFFF +#define Iter_LAST 0x0000000A +#define Iter_NEXT 0x00000000 +#define Iter_PREV 0x00000001 -typedef UNK_TYPE ITER; -#define ITER_FIRST 0xFFFFFFFF -#define ITER_LAST 0x0000000A -#define ITER_NEXT 0x00000000 -#define ITER_PREV 0x00000001 +typedef UNK_TYPE ActorSound; +#define ActorSound_WALK 0x00000000 +#define ActorSound_FLY 0x00000001 +#define ActorSound_JUMP 0x00000002 +#define ActorSound_HURT 0x00000003 +#define ActorSound_WALK_INCREMENT 0x00000004 +#define ActorSound_FLY_INCREMENT 0x00000005 -typedef UNK_TYPE ACTOR_SOUND; -#define ACTOR_SOUND_WALK 0x00000000 -#define ACTOR_SOUND_FLY 0x00000001 -#define ACTOR_SOUND_JUMP 0x00000002 -#define ACTOR_SOUND_HURT 0x00000003 -#define ACTOR_SOUND_WALK_INCREMENT 0x00000004 -#define ACTOR_SOUND_FLY_INCREMENT 0x00000005 +typedef UNK_TYPE Phase; +#define Phase_EXECUTE_ACTION 0x00000000 +#define Phase_FIRST_STRIKE 0x00000001 +#define Phase_RUN_AWAY_START 0x00000003 +#define Phase_RUN_AWAY_RESET 0x00000004 +#define Phase_RUN_AWAY_FAIL 0x00000007 +#define Phase_USE_DEFEND 0x00000006 +#define Phase_USE_LIFE_SHROOM 0x00000008 +#define Phase_PLAYER_BEGIN 0x0000000A +#define Phase_PLAYER_END 0x0000000D +#define Phase_ENEMY_BEGIN 0x0000000C +#define Phase_ENEMY_END 0x0000000B +#define Phase_MERLEE_ATTACK_BONUS 0x00000014 +#define Phase_MERLEE_DEFENSE_BONUS 0x00000015 +#define Phase_MERLEE_EXP_BONUS 0x00000016 +#define Phase_PLAYER_HAPPY 0x0000001E -typedef UNK_TYPE PHASE; -#define PHASE_EXECUTE_ACTION 0x00000000 -#define PHASE_FIRST_STRIKE 0x00000001 -#define PHASE_RUN_AWAY_START 0x00000003 -#define PHASE_RUN_AWAY_RESET 0x00000004 -#define PHASE_RUN_AWAY_FAIL 0x00000007 -#define PHASE_USE_DEFEND 0x00000006 -#define PHASE_USE_LIFE_SHROOM 0x00000008 -#define PHASE_PLAYER_BEGIN 0x0000000A -#define PHASE_PLAYER_END 0x0000000D -#define PHASE_ENEMY_BEGIN 0x0000000C -#define PHASE_ENEMY_END 0x0000000B -#define PHASE_MERLEE_ATTACK_BONUS 0x00000014 -#define PHASE_MERLEE_DEFENSE_BONUS 0x00000015 -#define PHASE_MERLEE_EXP_BONUS 0x00000016 -#define PHASE_PLAYER_HAPPY 0x0000001E +typedef UNK_TYPE ActorId; +#define ActorId_SELF 0xFFFFFF81 +#define ActorId_PLAYER 0x00000000 +#define ActorId_PARTNER 0x00000100 +#define ActorId_ENEMY0 0x00000200 +#define ActorId_ENEMY1 0x00000201 +#define ActorId_ENEMY2 0x00000202 +#define ActorId_ENEMY3 0x00000203 +#define ActorId_ENEMY4 0x00000204 +#define ActorId_ENEMY5 0x00000205 +#define ActorId_ENEMY6 0x00000206 +#define ActorId_ENEMY7 0x00000207 +#define ActorId_ENEMY8 0x00000208 +#define ActorId_ENEMY9 0x00000209 +#define ActorId_ENEMY10 0x0000020A +#define ActorId_ENEMY11 0x0000020B +#define ActorId_ENEMY12 0x0000020C +#define ActorId_ENEMY13 0x0000020D +#define ActorId_ENEMY14 0x0000020E +#define ActorId_ENEMY15 0x0000020F +#define ActorId_ENEMY16 0x00000210 +#define ActorId_ENEMY17 0x00000211 +#define ActorId_ENEMY18 0x00000212 +#define ActorId_ENEMY19 0x00000213 +#define ActorId_ENEMY20 0x00000214 +#define ActorId_ENEMY21 0x00000215 +#define ActorId_ENEMY22 0x00000216 +#define ActorId_ENEMY23 0x00000217 -typedef UNK_TYPE ACTOR; -#define ACTOR_SELF 0xFFFFFF81 -#define ACTOR_PLAYER 0x00000000 -#define ACTOR_PARTNER 0x00000100 -#define ACTOR_ENEMY0 0x00000200 -#define ACTOR_ENEMY1 0x00000201 -#define ACTOR_ENEMY2 0x00000202 -#define ACTOR_ENEMY3 0x00000203 -#define ACTOR_ENEMY4 0x00000204 -#define ACTOR_ENEMY5 0x00000205 -#define ACTOR_ENEMY6 0x00000206 -#define ACTOR_ENEMY7 0x00000207 -#define ACTOR_ENEMY8 0x00000208 -#define ACTOR_ENEMY9 0x00000209 -#define ACTOR_ENEMY10 0x0000020A -#define ACTOR_ENEMY11 0x0000020B -#define ACTOR_ENEMY12 0x0000020C -#define ACTOR_ENEMY13 0x0000020D -#define ACTOR_ENEMY14 0x0000020E -#define ACTOR_ENEMY15 0x0000020F -#define ACTOR_ENEMY16 0x00000210 -#define ACTOR_ENEMY17 0x00000211 -#define ACTOR_ENEMY18 0x00000212 -#define ACTOR_ENEMY19 0x00000213 -#define ACTOR_ENEMY20 0x00000214 -#define ACTOR_ENEMY21 0x00000215 -#define ACTOR_ENEMY22 0x00000216 -#define ACTOR_ENEMY23 0x00000217 +typedef UNK_TYPE Element; +#define Element_NORMAL 0x00000001 +#define Element_FIRE 0x00000002 +#define Element_WATER 0x00000003 +#define Element_ICE 0x00000004 +#define Element_MYSTERY 0x00000005 +#define Element_MAGIC 0x00000007 +#define Element_HAMMER 0x00000008 +#define Element_JUMP 0x00000009 +#define Element_COSMIC 0x0000000A +#define Element_BLAST 0x0000000B +#define Element_SHOCK 0x0000000C +#define Element_QUAKE 0x0000000D +#define Element_THROW 0x0000000F +#define Element_END 0x00000000 -typedef UNK_TYPE ELEMENT; -#define ELEMENT_NORMAL 0x00000001 -#define ELEMENT_FIRE 0x00000002 -#define ELEMENT_WATER 0x00000003 -#define ELEMENT_ICE 0x00000004 -#define ELEMENT_MYSTERY 0x00000005 -#define ELEMENT_MAGIC 0x00000007 -#define ELEMENT_HAMMER 0x00000008 -#define ELEMENT_JUMP 0x00000009 -#define ELEMENT_COSMIC 0x0000000A -#define ELEMENT_BLAST 0x0000000B -#define ELEMENT_SHOCK 0x0000000C -#define ELEMENT_QUAKE 0x0000000D -#define ELEMENT_THROW 0x0000000F -#define ELEMENT_END 0x00000000 +typedef UNK_TYPE Event; +#define Event_IMMUNE 0x00000019 +#define Event_HIT_COMBO 0x00000009 +#define Event_HIT 0x0000000A +#define Event_DEATH 0x00000020 +#define Event_FALL_TriggerFlags 0x0000000C +#define Event_FLIP_TriggerFlags 0x0000000D +#define Event_EXPLODE_TriggerFlags 0x00000022 +#define Event_SPIN_SMASH_HIT 0x0000000B +#define Event_SPIN_SMASH_DEATH 0x00000021 +#define Event_SPIN_SMASH_LAUNCH_HIT 0x00000011 +#define Event_SPIN_SMASH_LAUNCH_DEATH 0x00000015 +#define Event_POWER_BOUNCE_HIT 0x00000015 +#define Event_POWER_BOUNCE_DEATH 0x00000028 +#define Event_BURN_HIT 0x0000000E +#define Event_BURN_DEATH 0x00000024 +#define Event_SHOCK_HIT 0x0000002F +#define Event_SHOCK_DEATH 0x00000026 +#define Event_BEGIN_AIR_LIFT 0x0000003A +#define Event_AIR_LIFT_FAILED 0x0000001F +#define Event_BLOW_AWAY 0x00000016 +#define Event_SCARE_AWAY 0x00000039 +#define Event_UP_AND_AWAY 0x0000003D +#define Event_STAR_BEAM 0x00000013 +#define Event_RECOVER_STATUS 0x00000031 +#define Event_SWAP_PARTNER 0x0000003F +#define Event_BLOCK 0x0000001A +#define Event_SPIKE_CONTACT 0x0000002A +#define Event_SPIKE_DEATH 0x00000027 +#define Event_SPIKE_TAUNT 0x0000001B +#define Event_BURN_CONTACT 0x0000002C +#define Event_BURN_TAUNT 0x0000001C +#define Event_BEGIN_FIRST_STRIKE 0x00000038 +#define Event_END_FIRST_STRIKE 0x00000035 +#define Event_LIFE_SHROOM_PROC 0x00000040 +#define Event_REVIVE 0x00000041 +#define Event_LUCKY 0x00000037 -typedef UNK_TYPE EVENT; -#define EVENT_IMMUNE 0x00000019 -#define EVENT_HIT_COMBO 0x00000009 -#define EVENT_HIT 0x0000000A -#define EVENT_DEATH 0x00000020 -#define EVENT_FALL_TRIGGER 0x0000000C -#define EVENT_FLIP_TRIGGER 0x0000000D -#define EVENT_EXPLODE_TRIGGER 0x00000022 -#define EVENT_SPIN_SMASH_HIT 0x0000000B -#define EVENT_SPIN_SMASH_DEATH 0x00000021 -#define EVENT_SPIN_SMASH_LAUNCH_HIT 0x00000011 -#define EVENT_SPIN_SMASH_LAUNCH_DEATH 0x00000015 -#define EVENT_POWER_BOUNCE_HIT 0x00000015 -#define EVENT_POWER_BOUNCE_DEATH 0x00000028 -#define EVENT_BURN_HIT 0x0000000E -#define EVENT_BURN_DEATH 0x00000024 -#define EVENT_SHOCK_HIT 0x0000002F -#define EVENT_SHOCK_DEATH 0x00000026 -#define EVENT_BEGIN_AIR_LIFT 0x0000003A -#define EVENT_AIR_LIFT_FAILED 0x0000001F -#define EVENT_BLOW_AWAY 0x00000016 -#define EVENT_SCARE_AWAY 0x00000039 -#define EVENT_UP_AND_AWAY 0x0000003D -#define EVENT_STAR_BEAM 0x00000013 -#define EVENT_RECOVER_STATUS 0x00000031 -#define EVENT_SWAP_PARTNER 0x0000003F -#define EVENT_BLOCK 0x0000001A -#define EVENT_SPIKE_CONTACT 0x0000002A -#define EVENT_SPIKE_DEATH 0x00000027 -#define EVENT_SPIKE_TAUNT 0x0000001B -#define EVENT_BURN_CONTACT 0x0000002C -#define EVENT_BURN_TAUNT 0x0000001C -#define EVENT_BEGIN_FIRST_STRIKE 0x00000038 -#define EVENT_END_FIRST_STRIKE 0x00000035 -#define EVENT_LIFE_SHROOM_PROC 0x00000040 -#define EVENT_REVIVE 0x00000041 -#define EVENT_LUCKY 0x00000037 +typedef UNK_TYPE HitSound; +#define HitSound_MISS 0x00000000 +#define HitSound_BONES 0x00000001 +#define HitSound_NORMAL 0x00000002 +#define HitSound_FIRE 0x00000003 +#define HitSound_ICE 0x00000004 +#define HitSound_SHOCK 0x00000005 -typedef UNK_TYPE HIT_SOUND; -#define HIT_SOUND_MISS 0x00000000 -#define HIT_SOUND_BONES 0x00000001 -#define HIT_SOUND_NORMAL 0x00000002 -#define HIT_SOUND_FIRE 0x00000003 -#define HIT_SOUND_ICE 0x00000004 -#define HIT_SOUND_SHOCK 0x00000005 +typedef UNK_TYPE Status; +#define Status_NORMAL 0x00000001 +#define Status_DEFAULT 0x00000002 +#define Status_DEFAULT_TURN_MOD 0x0000001F +#define Status_SLEEP 0x00000006 +#define Status_SLEEP_TURN_MOD 0x00000020 +#define Status_POISON 0x00000009 +#define Status_POISON_TURN_MOD 0x00000025 +#define Status_FROZEN 0x00000007 +#define Status_FROZEN_TURN_MOD 0x00000022 +#define Status_DIZZY 0x00000004 +#define Status_DIZZY_TURN_MOD 0x00000024 +#define Status_FEAR 0x00000003 +#define Status_FEAR_TURN_MOD 0x00000023 +#define Status_STATIC 0x0000000B +#define Status_STATIC_TURN_MOD 0x00000021 +#define Status_PARALYZE 0x00000005 +#define Status_PARALYZE_TURN_MOD 0x00000026 +#define Status_SHRINK 0x0000000A +#define Status_SHRINK_TURN_MOD 0x00000027 +#define Status_STOP 0x00000008 +#define Status_STOP_TURN_MOD 0x00000029 +#define Status_STONE 0x0000000C +#define Status_DAZE 0x0000000D +#define Status_END 0x00000000 +#define Status_BERSERK 0x00000010 +#define Status_TURN_DONE 0x00000012 +#define Status_HUSTLE 0x00000019 +#define Status_DANGER 0x0000001A +#define Status_THINKING 0x0000001C +#define Status_WEARY 0x0000001D -typedef UNK_TYPE STATUS; -#define STATUS_NORMAL 0x00000001 -#define STATUS_DEFAULT 0x00000002 -#define STATUS_DEFAULT_TURN_MOD 0x0000001F -#define STATUS_SLEEP 0x00000006 -#define STATUS_SLEEP_TURN_MOD 0x00000020 -#define STATUS_POISON 0x00000009 -#define STATUS_POISON_TURN_MOD 0x00000025 -#define STATUS_FROZEN 0x00000007 -#define STATUS_FROZEN_TURN_MOD 0x00000022 -#define STATUS_DIZZY 0x00000004 -#define STATUS_DIZZY_TURN_MOD 0x00000024 -#define STATUS_FEAR 0x00000003 -#define STATUS_FEAR_TURN_MOD 0x00000023 -#define STATUS_STATIC 0x0000000B -#define STATUS_STATIC_TURN_MOD 0x00000021 -#define STATUS_PARALYZE 0x00000005 -#define STATUS_PARALYZE_TURN_MOD 0x00000026 -#define STATUS_SHRINK 0x0000000A -#define STATUS_SHRINK_TURN_MOD 0x00000027 -#define STATUS_STOP 0x00000008 -#define STATUS_STOP_TURN_MOD 0x00000029 -#define STATUS_STONE 0x0000000C -#define STATUS_DAZE 0x0000000D -#define STATUS_END 0x00000000 -#define STATUS_BERSERK 0x00000010 -#define STATUS_TURN_DONE 0x00000012 -#define STATUS_HUSTLE 0x00000019 -#define STATUS_DANGER 0x0000001A -#define STATUS_THINKING 0x0000001C -#define STATUS_WEARY 0x0000001D +typedef UNK_TYPE DoorSwing; +#define DoorSwing_IN 0x00000001 +#define DoorSwing_OUT -1 -typedef UNK_TYPE DOOR_SWING; -#define DOOR_SWING_IN 0x00000001 -#define DOOR_SWING_OUT -1 +typedef UNK_TYPE ItemSpawnMode; +#define ItemSpawnMode_DECORATION 0x00000001 +#define ItemSpawnMode_TOSS__SPAWN_ALWAYS 0x00000003 +#define ItemSpawnMode_BATTLE_REWARD 0x00000004 +#define ItemSpawnMode_TOSS__NEVER_VANISH 0x00000005 +#define ItemSpawnMode_TOSS 0x00000006 +#define ItemSpawnMode_TOSS__SPAWN_ONCE 0x00000007 +#define ItemSpawnMode_TOSS__SPAWN_ONCE__NEVER_VANISH 0x00000008 +#define ItemSpawnMode_TOSS__SPAWN_ALWAYS__NEVER_VANISH 0x00000009 +#define ItemSpawnMode_ITEM_BLOCK__ITEM 0x0000000A +#define ItemSpawnMode_ITEM_BLOCK__BADGE 0x0000000B +#define ItemSpawnMode_FALL__SPAWN_ALWAYS 0x0000000C +#define ItemSpawnMode_FALL__NEVER_VANISH 0x0000000D +#define ItemSpawnMode_FALL 0x0000000E +#define ItemSpawnMode_FALL__SPAWN_ONCE 0x0000000F +#define ItemSpawnMode_FIXED__SPAWN_ALWAYS 0x00000010 +#define ItemSpawnMode_FIXED__NEVER_VANISH 0x00000011 +#define ItemSpawnMode_FIXED 0x00000012 +#define ItemSpawnMode_FIXED__SPAWN_ALWAYS__NEVER_VANISH 0x00000013 +#define ItemSpawnMode_ITEM_BLOCK__SPAWN_ALWAYS 0x00000014 +#define ItemSpawnMode_ITEM_BLOCK__COIN 0x00000015 +#define ItemSpawnMode_TOSS__HIGHER__NEVER_VANISH 0x00000016 +#define ItemSpawnMode_TOSS__SPAWN_ALWAYS__SMALL 0x0000001A -typedef UNK_TYPE ITEM_SPAWN_MODE; -#define ITEM_SPAWN_MODE_DECORATION 0x00000001 -#define ITEM_SPAWN_MODE_TOSS__SPAWN_ALWAYS 0x00000003 -#define ITEM_SPAWN_MODE_BATTLE_REWARD 0x00000004 -#define ITEM_SPAWN_MODE_TOSS__NEVER_VANISH 0x00000005 -#define ITEM_SPAWN_MODE_TOSS 0x00000006 -#define ITEM_SPAWN_MODE_TOSS__SPAWN_ONCE 0x00000007 -#define ITEM_SPAWN_MODE_TOSS__SPAWN_ONCE__NEVER_VANISH 0x00000008 -#define ITEM_SPAWN_MODE_TOSS__SPAWN_ALWAYS__NEVER_VANISH 0x00000009 -#define ITEM_SPAWN_MODE_ITEM_BLOCK__ITEM 0x0000000A -#define ITEM_SPAWN_MODE_ITEM_BLOCK__BADGE 0x0000000B -#define ITEM_SPAWN_MODE_FALL__SPAWN_ALWAYS 0x0000000C -#define ITEM_SPAWN_MODE_FALL__NEVER_VANISH 0x0000000D -#define ITEM_SPAWN_MODE_FALL 0x0000000E -#define ITEM_SPAWN_MODE_FALL__SPAWN_ONCE 0x0000000F -#define ITEM_SPAWN_MODE_FIXED__SPAWN_ALWAYS 0x00000010 -#define ITEM_SPAWN_MODE_FIXED__NEVER_VANISH 0x00000011 -#define ITEM_SPAWN_MODE_FIXED 0x00000012 -#define ITEM_SPAWN_MODE_FIXED__SPAWN_ALWAYS__NEVER_VANISH 0x00000013 -#define ITEM_SPAWN_MODE_ITEM_BLOCK__SPAWN_ALWAYS 0x00000014 -#define ITEM_SPAWN_MODE_ITEM_BLOCK__COIN 0x00000015 -#define ITEM_SPAWN_MODE_TOSS__HIGHER__NEVER_VANISH 0x00000016 -#define ITEM_SPAWN_MODE_TOSS__SPAWN_ALWAYS__SMALL 0x0000001A +typedef UNK_TYPE Location; +#define Location_NONE 0x00000018 +#define Location_TESTING 0x00000017 +#define Location_TOAD_TOWN 0x00000001 +#define Location_PEACH_CASTLE_GROUNDS 0x00000019 +#define Location_SHOOTING_STAR_SUMMIT 0x0000001B +#define Location_TOAD_TOWN_TUNNELS 0x00000002 +#define Location_GOOMBA_VILLAGE 0x0000001E +#define Location_GOOMBA_ROAD 0x0000001F +#define Location_PLEASANT_PATH 0x00000020 +#define Location_KOOPA_VILLAGE 0x00000021 +#define Location_KOOPA_BROS_FORTRESS 0x00000007 +#define Location_MT_RUGGED 0x00000008 +#define Location_DRY_DRY_DESERT 0x0000000A +#define Location_DRY_DRY_OUTPOST 0x00000009 +#define Location_DRY_DRY_RUINS 0x0000000B +#define Location_FOREVER_FOREST 0x0000000C +#define Location_BOOS_MANSION 0x0000000D +#define Location_GUSTY_GULCH 0x00000022 +#define Location_TUBBAS_MANOR 0x0000000F +#define Location_WINDY_MILL 0x00000023 +#define Location_SHY_GUYS_TOYBOX 0x00000010 +#define Location_JADE_JUNGLE 0x00000024 +#define Location_YOSHIS_VILLAGE 0x00000025 +#define Location_MT_LAVALAVA 0x00000012 +#define Location_FLOWER_FIELDS 0x00000026 +#define Location_CLOUDY_CLIMB 0x00000027 +#define Location_SHIVER_CITY 0x00000028 +#define Location_SHIVER_SNOWFIELD 0x00000029 +#define Location_STARBORN_VALLEY 0x0000002A +#define Location_SHIVER_MOUNTAIN 0x0000002B +#define Location_CRYSTAL_PALACE 0x00000015 +#define Location_STAR_WAY 0x0000001C +#define Location_STAR_HAVEN 0x0000001D +#define Location_BOWSERS_CASTLE 0x00000016 +#define Location_PEACHS_CASTLE 0x0000001A +#define Location_MARIOS_HOUSE 0x0000002C -typedef UNK_TYPE LOCATION; -#define LOCATION_NONE 0x00000018 -#define LOCATION_TESTING 0x00000017 -#define LOCATION_TOAD_TOWN 0x00000001 -#define LOCATION_PEACH_CASTLE_GROUNDS 0x00000019 -#define LOCATION_SHOOTING_STAR_SUMMIT 0x0000001B -#define LOCATION_TOAD_TOWN_TUNNELS 0x00000002 -#define LOCATION_GOOMBA_VILLAGE 0x0000001E -#define LOCATION_GOOMBA_ROAD 0x0000001F -#define LOCATION_PLEASANT_PATH 0x00000020 -#define LOCATION_KOOPA_VILLAGE 0x00000021 -#define LOCATION_KOOPA_BROS_FORTRESS 0x00000007 -#define LOCATION_MT_RUGGED 0x00000008 -#define LOCATION_DRY_DRY_DESERT 0x0000000A -#define LOCATION_DRY_DRY_OUTPOST 0x00000009 -#define LOCATION_DRY_DRY_RUINS 0x0000000B -#define LOCATION_FOREVER_FOREST 0x0000000C -#define LOCATION_BOOS_MANSION 0x0000000D -#define LOCATION_GUSTY_GULCH 0x00000022 -#define LOCATION_TUBBAS_MANOR 0x0000000F -#define LOCATION_WINDY_MILL 0x00000023 -#define LOCATION_SHY_GUYS_TOYBOX 0x00000010 -#define LOCATION_JADE_JUNGLE 0x00000024 -#define LOCATION_YOSHIS_VILLAGE 0x00000025 -#define LOCATION_MT_LAVALAVA 0x00000012 -#define LOCATION_FLOWER_FIELDS 0x00000026 -#define LOCATION_CLOUDY_CLIMB 0x00000027 -#define LOCATION_SHIVER_CITY 0x00000028 -#define LOCATION_SHIVER_SNOWFIELD 0x00000029 -#define LOCATION_STARBORN_VALLEY 0x0000002A -#define LOCATION_SHIVER_MOUNTAIN 0x0000002B -#define LOCATION_CRYSTAL_PALACE 0x00000015 -#define LOCATION_STAR_WAY 0x0000001C -#define LOCATION_STAR_HAVEN 0x0000001D -#define LOCATION_BOWSERS_CASTLE 0x00000016 -#define LOCATION_PEACHS_CASTLE 0x0000001A -#define LOCATION_MARIOS_HOUSE 0x0000002C +typedef UNK_TYPE DoorSounds; +#define DoorSounds_BASIC 0x00000000 +#define DoorSounds_METAL 0x00000001 +#define DoorSounds_LARGE 0x00000002 +#define DoorSounds_CREAKY 0x00000003 +#define DoorSounds_GATE 0x00000004 -typedef UNK_TYPE ENTITY; -#define ENTITY_SAVE_POINT 0x802E9A18 -#define ENTITY_RED_SWITCH 0x802E9BB0 -#define ENTITY_BLUE_SWITCH 0x802E9BD4 -#define ENTITY_HUGE_BLUE_SWITCH 0x802E9BF8 -#define ENTITY_GREEN_STOMP_SWITCH 0x802E9C1C -#define ENTITY_MULTI_TRIGGER_BLOCK 0x802EA07C -#define ENTITY_BRICK_BLOCK 0x802EA0C4 -#define ENTITY_MULTI_COIN_BRICK 0x802EA0E8 -#define ENTITY_HAMMER1_BLOCK 0x802EA10C -#define ENTITY_HAMMER1_BLOCK_WIDE 0x802EA130 -#define ENTITY_HAMMER1_BLOCK_THICK 0x802EA154 -#define ENTITY_HAMMER1_BLOCK_TINY 0x802EA178 -#define ENTITY_HAMMER2_BLOCK 0x802EA19C -#define ENTITY_HAMMER2_BLOCK_WIDE 0x802EA1C0 -#define ENTITY_HAMMER2_BLOCK_THICK 0x802EA1E4 -#define ENTITY_HAMMER2_BLOCK_TINY 0x802EA208 -#define ENTITY_HAMMER3_BLOCK 0x802EA22C -#define ENTITY_HAMMER3_BLOCK_WIDE 0x802EA250 -#define ENTITY_HAMMER3_BLOCK_THICK 0x802EA274 -#define ENTITY_HAMMER3_BLOCK_TINY 0x802EA298 -#define ENTITY_POW_BLOCK 0x802EA2E0 -#define ENTITY_YELLOW_BLOCK 0x802EA564 -#define ENTITY_HIDDEN_YELLOW_BLOCK 0x802EA588 -#define ENTITY_RED_BLOCK 0x802EA5AC -#define ENTITY_HIDDEN_RED_BLOCK 0x802EA5D0 -#define ENTITY_SINGLE_TRIGGER_BLOCK 0x802EA5F4 -#define ENTITY_HEALING_BLOCK 0x802EA7E0 -#define ENTITY_SUPER_BLOCK 0x802EA910 -#define ENTITY_SCRIPT_SPRING 0x802EAA30 -#define ENTITY_SIMPLE_SPRING 0x802EAA54 -#define ENTITY_HIDDEN_PANEL 0x802EAB04 -#define ENTITY_GIANT_CHEST 0x802EAE0C -#define ENTITY_CHEST 0x802EAE30 -#define ENTITY_BLUE_WARP_PIPE 0x802EAF80 -#define ENTITY_WOODEN_CRATE 0x802EAED4 -#define ENTITY_SIGNPOST 0x802EAFDC -#define ENTITY_PADLOCK 0x802BCD68 -#define ENTITY_PADLOCK_RED_FRAME 0x802BCD8C -#define ENTITY_PADLOCK_RED_FACE 0x802BCDB0 -#define ENTITY_PADLOCK_BLUE_FACE 0x802BCDD4 -#define ENTITY_BOARDED_FLOOR 0x802BCE84 -#define ENTITY_BOMBABLE_ROCK1 0x802BCF00 -#define ENTITY_BOMBABLE_ROCK2 0x802BCF24 -#define ENTITY_CYMBAL_PLANT 0x802BC788 -#define ENTITY_PINK_FLOWER 0x802BC7AC -#define ENTITY_SPINNING_FLOWER 0x802BC7F4 -#define ENTITY_BELLBELL_PLANT 0x802BCBD8 -#define ENTITY_TRUMPET_PLANT 0x802BCBFC -#define ENTITY_SPONGY_FLOWER 0x802BCC20 -#define ENTITY_RED_ARROW_SIGNS 0x802BCD9C -#define ENTITY_TWEESTER 0x802BCA74 -#define ENTITY_STAR_BOX_LAUCHER 0x802BCB44 +typedef UNK_TYPE ActionState; +#define ActionState_IDLE 0x00000000 +#define ActionState_WALK 0x00000001 +#define ActionState_RUN 0x00000002 +#define ActionState_JUMP 0x00000003 +#define ActionState_BOUNCE 0x00000004 +#define ActionState_ABORTED_JUMP 0x00000005 +#define ActionState_LAUNCH 0x00000006 +#define ActionState_FALLING 0x00000008 +#define ActionState_STEP_DOWN 0x00000009 +#define ActionState_LAND 0x0000000A +#define ActionState_STEP_DOWN_LAND 0x0000000B +#define ActionState_CONVERSATION 0x0000000C +#define ActionState_SPIN_JUMP 0x0000000D +#define ActionState_GROUND_POUND 0x0000000E +#define ActionState_ULTRA_JUMP 0x0000000F +#define ActionState_ULTRA_POUND 0x00000010 +#define ActionState_SLIDING 0x00000011 +#define ActionState_HAMMER 0x00000012 +#define ActionState_HIT_HAZARD 0x00000015 +#define ActionState_HIT_LAVA 0x00000017 +#define ActionState_SPIN 0x0000001A +#define ActionState_ENEMY_FIRST_STRIKE 0x0000001B +#define ActionState_SPINNING_FLOWER 0x0000001D +#define ActionState_USE_TWEESTER 0x0000001F +#define ActionState_RIDE 0x00000021 +#define ActionState_STEP_UP 0x00000022 +#define ActionState_USE_SPRING 0x00000026 -typedef UNK_TYPE DOOR_SOUNDS; -#define DOOR_SOUNDS_BASIC 0x00000000 -#define DOOR_SOUNDS_METAL 0x00000001 -#define DOOR_SOUNDS_LARGE 0x00000002 -#define DOOR_SOUNDS_CREAKY 0x00000003 -#define DOOR_SOUNDS_GATE 0x00000004 +typedef s32 NpcId; +#define NpcId_SELF 0xFFFFFFFF +#define NpcId_PLAYER 0xFFFFFFFE +#define NpcId_PARTNER 0xFFFFFFFC -typedef UNK_TYPE ACTION_STATE; -#define ACTION_STATE_IDLE 0x00000000 -#define ACTION_STATE_WALK 0x00000001 -#define ACTION_STATE_RUN 0x00000002 -#define ACTION_STATE_JUMP 0x00000003 -#define ACTION_STATE_BOUNCE 0x00000004 -#define ACTION_STATE_ABORTED_JUMP 0x00000005 -#define ACTION_STATE_LAUNCH 0x00000006 -#define ACTION_STATE_FALLING 0x00000008 -#define ACTION_STATE_STEP_DOWN 0x00000009 -#define ACTION_STATE_LAND 0x0000000A -#define ACTION_STATE_STEP_DOWN_LAND 0x0000000B -#define ACTION_STATE_CONVERSATION 0x0000000C -#define ACTION_STATE_SPIN_JUMP 0x0000000D -#define ACTION_STATE_GROUND_POUND 0x0000000E -#define ACTION_STATE_ULTRA_JUMP 0x0000000F -#define ACTION_STATE_ULTRA_POUND 0x00000010 -#define ACTION_STATE_SLIDING 0x00000011 -#define ACTION_STATE_HAMMER 0x00000012 -#define ACTION_STATE_HIT_HAZARD 0x00000015 -#define ACTION_STATE_HIT_LAVA 0x00000017 -#define ACTION_STATE_SPIN 0x0000001A -#define ACTION_STATE_ENEMY_FIRST_STRIKE 0x0000001B -#define ACTION_STATE_SPINNING_FLOWER 0x0000001D -#define ACTION_STATE_USE_TWEESTER 0x0000001F -#define ACTION_STATE_RIDE 0x00000021 -#define ACTION_STATE_STEP_UP 0x00000022 -#define ACTION_STATE_USE_SPRING 0x00000026 +typedef UNK_TYPE TriggerFlags; +#define TriggerFlags_FLOOR_TOUCH 0x00000080 +#define TriggerFlags_FLOOR_ABOVE 0x00080000 +#define TriggerFlags_FLOOR_PRESS_A 0x00000800 +#define TriggerFlags_FLOOR_JUMP 0x00000200 +#define TriggerFlags_WALL_TOUCH 0x00000400 +#define TriggerFlags_WALL_PUSH 0x00000040 +#define TriggerFlags_WALL_PRESS_A 0x00000100 +#define TriggerFlags_WALL_HAMMER 0x00001000 +#define TriggerFlags_CEILING_TOUCH 0x00040000 +#define TriggerFlags_POINT_BOMB 0x00100000 +#define TriggerFlags_GAME_FLAG_SET 0x00010000 +#define TriggerFlags_AREA_FLAG_SET 0x00020000 -typedef s32 NPC; -#define NPC_SELF 0xFFFFFFFF -#define NPC_PLAYER 0xFFFFFFFE -#define NPC_PARTNER 0xFFFFFFFC +typedef UNK_TYPE Buttons; +#define Buttons_A 0x00008000 +#define Buttons_B 0x00004000 +#define Buttons_Z 0x00002000 +#define Buttons_START 0x00001000 +#define Buttons_D_UP 0x00000800 +#define Buttons_D_DOWN 0x00000400 +#define Buttons_D_LEFT 0x00000200 +#define Buttons_D_RIGHT 0x00000100 +#define Buttons_L 0x00000020 +#define Buttons_R 0x00000010 +#define Buttons_C_UP 0x00000008 +#define Buttons_C_DOWN 0x00000004 +#define Buttons_C_LEFT 0x00000002 +#define Buttons_C_RIGHT 0x00000001 -typedef UNK_TYPE TRIGGER; -#define TRIGGER_FLOOR_TOUCH 0x00000080 -#define TRIGGER_FLOOR_ABOVE 0x00080000 -#define TRIGGER_FLOOR_PRESS_A 0x00000800 -#define TRIGGER_FLOOR_JUMP 0x00000200 -#define TRIGGER_WALL_TOUCH 0x00000400 -#define TRIGGER_WALL_PUSH 0x00000040 -#define TRIGGER_WALL_PRESS_A 0x00000100 -#define TRIGGER_WALL_HAMMER 0x00001000 -#define TRIGGER_CEILING_TOUCH 0x00040000 -#define TRIGGER_POINT_BOMB 0x00100000 -#define TRIGGER_GAME_FLAG_SET 0x00010000 -#define TRIGGER_AREA_FLAG_SET 0x00020000 +typedef UNK_TYPE PlayerBuff; +#define PlayerBuff_ALL 0x0FFFFFFF +#define PlayerBuff_JUMP_CHARGE 0x00000001 +#define PlayerBuff_HAMMER_CHARGE 0x00000002 +#define PlayerBuff_STONE 0x00000008 +#define PlayerBuff_HUSTLE 0x00000010 +#define PlayerBuff_STATIC 0x00000020 +#define PlayerBuff_TRANSPARENT 0x00000040 +#define PlayerBuff_CLOUD_NINE 0x00000080 +#define PlayerBuff_TURBO_CHARGE 0x00000100 +#define PlayerBuff_WATER_BLOCK 0x00000200 +#define PlayerBuff_PARTNER_GLOWING 0x00010000 -typedef UNK_TYPE BUTTONS; -#define BUTTONS_A 0x00008000 -#define BUTTONS_B 0x00004000 -#define BUTTONS_Z 0x00002000 -#define BUTTONS_START 0x00001000 -#define BUTTONS_D_UP 0x00000800 -#define BUTTONS_D_DOWN 0x00000400 -#define BUTTONS_D_LEFT 0x00000200 -#define BUTTONS_D_RIGHT 0x00000100 -#define BUTTONS_L 0x00000020 -#define BUTTONS_R 0x00000010 -#define BUTTONS_C_UP 0x00000008 -#define BUTTONS_C_DOWN 0x00000004 -#define BUTTONS_C_LEFT 0x00000002 -#define BUTTONS_C_RIGHT 0x00000001 +typedef UNK_TYPE StatusFlags; +#define StatusFlags_SLEEP 0x00001000 +#define StatusFlags_STATIC 0x00002000 +#define StatusFlags_FROZEN 0x00004000 +#define StatusFlags_UNKNOWN_STATUS3 0x00008000 +#define StatusFlags_PARALYZE 0x00010000 +#define StatusFlags_POISON 0x00020000 +#define StatusFlags_DIZZY 0x00040000 +#define StatusFlags_SHRINK 0x00080000 +#define StatusFlags_STONE 0x00100000 +#define StatusFlags_STOP 0x00200000 +#define StatusFlags_KO 0x01000000 +#define StatusFlags_GLOWING 0x02000000 +#define StatusFlags_TRANSPARENT 0x04000000 +#define StatusFlags_ATTACK_BOOST 0x08000000 +#define StatusFlags_DEFENSE_BOOST 0x10000000 +#define StatusFlags_CHILL_OUT 0x20000000 +#define StatusFlags_RIGHT_ON 0x40000000 -typedef UNK_TYPE PLAYER_BUFF; -#define PLAYER_BUFF_ALL 0x0FFFFFFF -#define PLAYER_BUFF_JUMP_CHARGE 0x00000001 -#define PLAYER_BUFF_HAMMER_CHARGE 0x00000002 -#define PLAYER_BUFF_STONE 0x00000008 -#define PLAYER_BUFF_HUSTLE 0x00000010 -#define PLAYER_BUFF_STATIC 0x00000020 -#define PLAYER_BUFF_TRANSPARENT 0x00000040 -#define PLAYER_BUFF_CLOUD_NINE 0x00000080 -#define PLAYER_BUFF_TURBO_CHARGE 0x00000100 -#define PLAYER_BUFF_WATER_BLOCK 0x00000200 -#define PLAYER_BUFF_PARTNER_GLOWING 0x00010000 - -typedef UNK_TYPE STATUS_FLAGS; -#define STATUS_FLAGS_SLEEP 0x00001000 -#define STATUS_FLAGS_STATIC 0x00002000 -#define STATUS_FLAGS_FROZEN 0x00004000 -#define STATUS_FLAGS_UNKNOWN_STATUS3 0x00008000 -#define STATUS_FLAGS_PARALYZE 0x00010000 -#define STATUS_FLAGS_POISON 0x00020000 -#define STATUS_FLAGS_DIZZY 0x00040000 -#define STATUS_FLAGS_SHRINK 0x00080000 -#define STATUS_FLAGS_STONE 0x00100000 -#define STATUS_FLAGS_STOP 0x00200000 -#define STATUS_FLAGS_K_O 0x01000000 -#define STATUS_FLAGS_GLOWING 0x02000000 -#define STATUS_FLAGS_TRANSPARENT 0x04000000 -#define STATUS_FLAGS_ATTACK_BOOST 0x08000000 -#define STATUS_FLAGS_DEFENSE_BOOST 0x10000000 -#define STATUS_FLAGS_CHILL_OUT 0x20000000 -#define STATUS_FLAGS_RIGHT_ON 0x40000000 - -typedef UNK_TYPE DAMAGE_TYPE; -#define DAMAGE_TYPE_IGNORE_DEFENSE 0x08000000 -#define DAMAGE_TYPE_NO_CONTACT 0x10000000 -#define DAMAGE_TYPE_UNBLOCKABLE 0x20000000 -#define DAMAGE_TYPE_TRIGGER_LUCKY 0x80000000 -#define DAMAGE_TYPE_FIRE 0x00000002 -#define DAMAGE_TYPE_WATER 0x00000004 -#define DAMAGE_TYPE_ICE 0x00000008 -#define DAMAGE_TYPE_MAGIC 0x00000010 -#define DAMAGE_TYPE_ELECTRIC 0x00000020 -#define DAMAGE_TYPE_SMASH 0x00000040 -#define DAMAGE_TYPE_JUMP 0x00000080 -#define DAMAGE_TYPE_COSMIC 0x00000100 -#define DAMAGE_TYPE_BLAST 0x00000200 -#define DAMAGE_TYPE_P_O_W 0x00000400 -#define DAMAGE_TYPE_QUAKE 0x00000800 -#define DAMAGE_TYPE_THROW 0x00040000 +typedef UNK_TYPE DamageType; +#define DamageType_IGNORE_DEFENSE 0x08000000 +#define DamageType_NO_CONTACT 0x10000000 +#define DamageType_UNBLOCKABLE 0x20000000 +#define DamageType_TriggerFlags_LUCKY 0x80000000 +#define DamageType_FIRE 0x00000002 +#define DamageType_WATER 0x00000004 +#define DamageType_ICE 0x00000008 +#define DamageType_MAGIC 0x00000010 +#define DamageType_ELECTRIC 0x00000020 +#define DamageType_SMASH 0x00000040 +#define DamageType_JUMP 0x00000080 +#define DamageType_COSMIC 0x00000100 +#define DamageType_BLAST 0x00000200 +#define DamageType_POW 0x00000400 +#define DamageType_QUAKE 0x00000800 +#define DamageType_THROW 0x00040000 #endif diff --git a/include/functions.h b/include/functions.h index 90b5f223be..e61f021837 100644 --- a/include/functions.h +++ b/include/functions.h @@ -9,11 +9,11 @@ void osCleanupThread(void); void clone_model(u16 srcModelID, u16 newModelID); void update_collider_transform(s16 colliderID); -s32 get_variable(script_context* script, bytecode var); -s32 set_variable(script_context* script, bytecode var, s32 value); -f32 get_float_variable(script_context* script, bytecode var); -f32 set_float_variable(script_context* script, bytecode var, f32 value); -void set_script_timescale(script_context* script, f32 timescale); +s32 get_variable(ScriptInstance* script, Bytecode var); +s32 set_variable(ScriptInstance* script, Bytecode var, s32 value); +f32 get_float_variable(ScriptInstance* script, Bytecode var); +f32 set_float_variable(ScriptInstance* script, Bytecode var, f32 value); +void set_script_timescale(ScriptInstance* script, f32 timescale); f32 sin_deg(f32 x); f32 cos_deg(f32 x); f32 atan2(f32 startX, f32 startZ, f32 endX, f32 endZ); @@ -30,11 +30,11 @@ void func_80137E4C(s32, s32, s32, s32); s32 rand_int(s32); void sort_items(void); s32 is_ability_active(s32 arg0); -f32 update_lerp(EASING easing, f32 start, f32 end, s32 elapsed, s32 duration); +f32 update_lerp(Easing easing, f32 start, f32 end, s32 elapsed, s32 duration); -npc* get_npc_safe(s32 npcID); -npc* get_npc_unsafe(s32 npcID); -npc* resolve_npc(script_context* script, NPC npcID); +Npc* get_npc_safe(NpcId npcId); +Npc* get_npc_unsafe(NpcId npcId); +Npc* resolve_npc(ScriptInstance* script, NpcId npcIdOrPtr); f32 dist2D(f32 ax, f32 ay, f32 bx, f32 by); f32 dist3D(f32 ax, f32 ay, f32 az, f32 bx, f32 by, f32 bz); diff --git a/include/si.h b/include/si.h index c54e7f364c..a05e7ff245 100644 --- a/include/si.h +++ b/include/si.h @@ -1,8 +1,22 @@ #ifndef _SI_H_ -#define _SI_H +#define _SI_H_ #define SI_VAR_0 0xFE363C80 -// TODO +/* Return type of si_execute_next_command */ +#define SI_CONTINUE 0 /* Continue to next command */ +#define SI_ABORT 1 /* Quit execution */ +#define SI_FINISH 255 /* Return from script */ + +/* Return type of script API functions */ +typedef s32 ApiStatus; +#define ApiStatus_BLOCK 0 /* Call again next frame */ +#define ApiStatus_DONE1 1 /* Unconditional. Probably only exists to return a bool from functions */ +#define ApiStatus_DONE2 2 /* Conditional on ScriptInstance->disableScripts */ +#define ApiStatus_REPEAT 3 /* Call again immediately */ +#define ApiStatus_FINISH 255 /* Corresponds to SI_FINISH */ + +#define API_FUN(NAME) ApiStatus (*NAME)(struct ScriptInstance* script, s32 isInitialCall) +#define INCLUDE_API_ASM(FOLDER, NAME) ApiStatus INCLUDE_ASM(FOLDER, NAME, struct ScriptInstance* script, s32 isInitialCall) #endif diff --git a/include/types.h b/include/types.h index 675f656e24..0d07cc05ed 100644 --- a/include/types.h +++ b/include/types.h @@ -8,6 +8,6 @@ #define UNK_FUN_PTR(name) void(*name)(void) #define UNK_ARGS -typedef s32 bytecode; +typedef s32 Bytecode; #endif diff --git a/include/variables.h b/include/variables.h index 02b45e7539..2051fff0a7 100644 --- a/include/variables.h +++ b/include/variables.h @@ -5,15 +5,40 @@ #include "common_structs.h" #include "types.h" -extern ui_status gUIStatus; -extern player_data gPlayerData; -extern player_status gPlayerStatus; -extern game_status* gGameStatusPtr[1]; -extern item_table_entry gItemTable[364]; +extern UiStatus gUIStatus; +extern PlayerData gPlayerData; +extern PlayerStatus gPlayerStatus; +extern GameStatus* gGameStatusPtr[1]; +extern StaticItem gItemTable[364]; +extern s16 gMainGameState; /* 0 = battle, 1 = pause, 2 = world */ +extern UNK_FUN_PTR(gCurrentUpdateFunction); -extern script_context* gWorldScriptList[128]; -extern script_context* gBattleScriptList[128]; -extern script_context** gCurrentScriptListPtr[128]; +extern ScriptInstance* gWorldScriptList[128]; +extern ScriptInstance* gBattleScriptList[128]; +extern ScriptInstance** gCurrentScriptListPtr[128]; + +extern s32 gScriptIdList[128]; +extern s32 gScriptIndexList[128]; + +extern Model* gWorldModelList[256]; +extern Model* gBattleModelList[256]; +extern Model** gCurrentModelListPtr[256]; + +extern u32* gWorldModelSpecialDls[32]; +extern u32* gBattleModelSpecialDls[32]; +extern u32** gCurrentModelSpecialDlsPtr[32]; + +extern Entity* gWorldEntityList[30]; +extern Entity* gBattleEntityList[30]; +extern Entity** gCurrentEntityListPtr[30]; + +extern UNK_TYPE* gWorldDynamicEntityList[16]; +extern UNK_TYPE* gBattleDynamicEntityList[16]; +extern UNK_TYPE** gCurrentDynamicEntityListPtr[16]; + +extern Shadow* gWorldShadowList[60]; +extern Shadow* gBattleShadowList[60]; +extern Shadow** gCurrentShadowListPtr[60]; extern f32 gGlobalTimeSpace; @@ -24,17 +49,17 @@ extern s16 D_8010CD12; extern s32 D_801595A0; extern char gCloudyFlowerFieldsBg[]; // "fla_bg" extern char gSunnyFlowerFieldsBg[]; // "flb_bg" -extern bg_header gBackgroundImage; +extern BackgroundHeader gBackgroundImage; extern s8 D_8014F12F; -extern print_context* gCurrentPrintContext; -extern print_context* D_802DB268; +extern PrintContext* gCurrentPrintContext; +extern PrintContext* D_802DB268; // Triggers /* 0x80151334 */ extern s16 gTriggerCount; -/* 0x80159190 */ extern trigger gTriggerList1[64]; -/* 0x80159290 */ extern trigger gTriggerList2[64]; -/* 0x80159390 */ extern trigger** gCurrentTriggerListPtr[64]; +/* 0x80159190 */ extern Trigger gTriggerList1[64]; +/* 0x80159290 */ extern Trigger gTriggerList2[64]; +/* 0x80159390 */ extern Trigger** gCurrentTriggerListPtr[64]; extern u16 gMapTransitionAlpha; extern u16 D_800A0942; diff --git a/src/code_111f0_len_860.c b/src/code_111f0_len_860.c index ac9fe471b2..83a6597846 100644 --- a/src/code_111f0_len_860.c +++ b/src/code_111f0_len_860.c @@ -14,7 +14,7 @@ INCLUDE_ASM(code_111f0_len_860, func_80035E54); INCLUDE_ASM(code_111f0_len_860, func_80035EEC); void func_800360FC(void) { - game_status* gameStatus = *gGameStatusPtr; + GameStatus* gameStatus = *gGameStatusPtr; if (gameStatus->loadMenuState == 2) { func_800E973C(); @@ -22,7 +22,7 @@ void func_800360FC(void) { } void func_80036130(void) { - game_status* gameStatus = *gGameStatusPtr; + GameStatus* gameStatus = *gGameStatusPtr; gMapTransitionAlpha = 0x00; D_800A0942 = 0x14; @@ -48,7 +48,7 @@ s32 func_800363FC(void) { } s32 func_80036430(void) { - player_status* pPlayerStatus = &gPlayerStatus; + PlayerStatus* pPlayerStatus = &gPlayerStatus; gMapTransitionAlpha = 0xFF; D_800A0942 = 0x14; diff --git a/src/code_13870_len_6980.c b/src/code_13870_len_6980.c index ce55a7beae..12cc0c59b8 100644 --- a/src/code_13870_len_6980.c +++ b/src/code_13870_len_6980.c @@ -42,9 +42,9 @@ INCLUDE_ASM(code_13870_len_6980, render_npcs); INCLUDE_ASM(code_13870_len_6980, npc_move_heading); -npc* INCLUDE_ASM(code_13870_len_6980, get_npc_unsafe, s32 npcID); +Npc* INCLUDE_ASM(code_13870_len_6980, get_npc_unsafe, NpcId npcId); -npc* INCLUDE_ASM(code_13870_len_6980, get_npc_safe, s32 npcID); +Npc* INCLUDE_ASM(code_13870_len_6980, get_npc_safe, NpcId npcId); INCLUDE_ASM(code_13870_len_6980, enable_npc_shadow); diff --git a/src/code_16c8e0.c b/src/code_16c8e0.c index 93147f3517..8f95594ddc 100644 --- a/src/code_16c8e0.c +++ b/src/code_16c8e0.c @@ -98,9 +98,9 @@ INCLUDE_ASM(code_16c8e0, func_80245440); INCLUDE_ASM(code_16c8e0, func_802456B0); -INCLUDE_ASM(code_16c8e0, EnablePartnerBlur); +INCLUDE_API_ASM(code_16c8e0, EnablePartnerBlur); -INCLUDE_ASM(code_16c8e0, DisablePartnerBlur); +INCLUDE_API_ASM(code_16c8e0, DisablePartnerBlur); INCLUDE_ASM(code_16c8e0, update_swap_partner); @@ -174,25 +174,25 @@ INCLUDE_ASM(code_16c8e0, unfreeze_cam); INCLUDE_ASM(code_16c8e0, func_8024E60C); -INCLUDE_ASM(code_16c8e0, UseCamPreset); +INCLUDE_API_ASM(code_16c8e0, UseCamPreset); -INCLUDE_ASM(code_16c8e0, SetBattleCamTarget); +INCLUDE_API_ASM(code_16c8e0, SetBattleCamTarget); -INCLUDE_ASM(code_16c8e0, SetBattleCamOffsetZ); +INCLUDE_API_ASM(code_16c8e0, SetBattleCamOffsetZ); -INCLUDE_ASM(code_16c8e0, AddBattleCamOffsetZ); +INCLUDE_API_ASM(code_16c8e0, AddBattleCamOffsetZ); -INCLUDE_ASM(code_16c8e0, SetBattleCamYaw); +INCLUDE_API_ASM(code_16c8e0, SetBattleCamYaw); -INCLUDE_ASM(code_16c8e0, BattleCamTargetActor); +INCLUDE_API_ASM(code_16c8e0, BattleCamTargetActor); -INCLUDE_ASM(code_16c8e0, MoveBattleCamOver); +INCLUDE_API_ASM(code_16c8e0, MoveBattleCamOver); -INCLUDE_ASM(code_16c8e0, SetBattleCamZoom); +INCLUDE_API_ASM(code_16c8e0, SetBattleCamZoom); -INCLUDE_ASM(code_16c8e0, AddBattleCamZoom); +INCLUDE_API_ASM(code_16c8e0, AddBattleCamZoom); -INCLUDE_ASM(code_16c8e0, FreezeBattleCam); +INCLUDE_API_ASM(code_16c8e0, FreezeBattleCam); INCLUDE_ASM(code_16c8e0, func_8024EDC0); @@ -226,17 +226,17 @@ INCLUDE_ASM(code_16c8e0, close_action_command_instruction_popup); INCLUDE_ASM(code_16c8e0, show_message_popup); -INCLUDE_ASM(code_16c8e0, ShowMessageBox); +INCLUDE_API_ASM(code_16c8e0, ShowMessageBox); -INCLUDE_ASM(code_16c8e0, ShowVariableMessageBox); +INCLUDE_API_ASM(code_16c8e0, ShowVariableMessageBox); -INCLUDE_ASM(code_16c8e0, IsMessageBoxDisplayed); +INCLUDE_API_ASM(code_16c8e0, IsMessageBoxDisplayed); -INCLUDE_ASM(code_16c8e0, WaitForMessageBoxDone); +INCLUDE_API_ASM(code_16c8e0, WaitForMessageBoxDone); -INCLUDE_ASM(code_16c8e0, ForceCloseMessageBox); +INCLUDE_API_ASM(code_16c8e0, ForceCloseMessageBox); -INCLUDE_ASM(code_16c8e0, SetMessageBoxDuration); +INCLUDE_API_ASM(code_16c8e0, SetMessageBoxDuration); INCLUDE_ASM(code_16c8e0, func_80251474); @@ -244,31 +244,31 @@ INCLUDE_ASM(code_16c8e0, calc_item_check_hit); INCLUDE_ASM(code_16c8e0, calc_item_damage_enemy); -INCLUDE_ASM(code_16c8e0, ItemDamageEnemy); +INCLUDE_API_ASM(code_16c8e0, ItemDamageEnemy); -INCLUDE_ASM(code_16c8e0, ItemAfflictEnemy); +INCLUDE_API_ASM(code_16c8e0, ItemAfflictEnemy); -INCLUDE_ASM(code_16c8e0, ItemCheckHit); +INCLUDE_API_ASM(code_16c8e0, ItemCheckHit); -INCLUDE_ASM(code_16c8e0, ActorSpeak); +INCLUDE_API_ASM(code_16c8e0, ActorSpeak); -INCLUDE_ASM(code_16c8e0, EndActorSpeech); +INCLUDE_API_ASM(code_16c8e0, EndActorSpeech); -INCLUDE_ASM(code_16c8e0, ShowBattleChoice); +INCLUDE_API_ASM(code_16c8e0, ShowBattleChoice); -INCLUDE_ASM(code_16c8e0, OverrideBattleDmaDest); +INCLUDE_API_ASM(code_16c8e0, OverrideBattleDmaDest); -INCLUDE_ASM(code_16c8e0, LoadBattleDmaData); +INCLUDE_API_ASM(code_16c8e0, LoadBattleDmaData); -INCLUDE_ASM(code_16c8e0, PlaySoundAtActor); +INCLUDE_API_ASM(code_16c8e0, PlaySoundAtActor); -INCLUDE_ASM(code_16c8e0, PlaySoundAtPart); +INCLUDE_API_ASM(code_16c8e0, PlaySoundAtPart); -INCLUDE_ASM(code_16c8e0, SetForegroundModelsVisibleUnchecked); +INCLUDE_API_ASM(code_16c8e0, SetForegroundModelsVisibleUnchecked); -INCLUDE_ASM(code_16c8e0, SetForegroundModelsVisible); +INCLUDE_API_ASM(code_16c8e0, SetForegroundModelsVisible); -INCLUDE_ASM(code_16c8e0, MakeStatusField); +INCLUDE_API_ASM(code_16c8e0, MakeStatusField); INCLUDE_ASM(code_16c8e0, is_actor_hp_bar_visible); @@ -278,15 +278,15 @@ INCLUDE_ASM(code_16c8e0, save_tattle_flags); INCLUDE_ASM(code_16c8e0, load_tattle_flags); -INCLUDE_ASM(code_16c8e0, MultiplyByActorScale); +INCLUDE_API_ASM(code_16c8e0, MultiplyByActorScale); -INCLUDE_ASM(code_16c8e0, MultiplyVec2ByActorScale); +INCLUDE_API_ASM(code_16c8e0, MultiplyVec2ByActorScale); -INCLUDE_ASM(code_16c8e0, MultiplyVec3ByActorScale); +INCLUDE_API_ASM(code_16c8e0, MultiplyVec3ByActorScale); -INCLUDE_ASM(code_16c8e0, ApplyShrinkFromOwner); +INCLUDE_API_ASM(code_16c8e0, ApplyShrinkFromOwner); -INCLUDE_ASM(code_16c8e0, StartRumble); +INCLUDE_API_ASM(code_16c8e0, StartRumble); INCLUDE_ASM(code_16c8e0, func_80254250); @@ -448,15 +448,15 @@ INCLUDE_ASM(code_16c8e0, func_80260A60); INCLUDE_ASM(code_16c8e0, activate_defend_command); -INCLUDE_ASM(code_16c8e0, HasMerleeCastsLeft); +INCLUDE_API_ASM(code_16c8e0, HasMerleeCastsLeft); -INCLUDE_ASM(code_16c8e0, FXRecoverHP); +INCLUDE_API_ASM(code_16c8e0, FXRecoverHP); -INCLUDE_ASM(code_16c8e0, FXRecoverFP); +INCLUDE_API_ASM(code_16c8e0, FXRecoverFP); -INCLUDE_ASM(code_16c8e0, IncrementPlayerHP); +INCLUDE_API_ASM(code_16c8e0, IncrementPlayerHP); -INCLUDE_ASM(code_16c8e0, IncrementPlayerFP); +INCLUDE_API_ASM(code_16c8e0, IncrementPlayerFP); INCLUDE_ASM(code_16c8e0, create_target_list); @@ -606,17 +606,17 @@ INCLUDE_ASM(code_16c8e0, hide_foreground_models); INCLUDE_ASM(code_16c8e0, show_foreground_models); -INCLUDE_ASM(code_16c8e0, StartRumbleWithParams); +INCLUDE_API_ASM(code_16c8e0, StartRumbleWithParams); INCLUDE_ASM(code_16c8e0, start_rumble_type); -INCLUDE_ASM(code_16c8e0, LoadItemScript); +INCLUDE_API_ASM(code_16c8e0, LoadItemScript); -INCLUDE_ASM(code_16c8e0, LoadFreeItemScript); +INCLUDE_API_ASM(code_16c8e0, LoadFreeItemScript); -INCLUDE_ASM(code_16c8e0, LoadMoveScript); +INCLUDE_API_ASM(code_16c8e0, LoadMoveScript); -INCLUDE_ASM(code_16c8e0, LoadActionCommand); +INCLUDE_API_ASM(code_16c8e0, LoadActionCommand); INCLUDE_ASM(code_16c8e0, func_80268284); @@ -626,15 +626,15 @@ INCLUDE_ASM(code_16c8e0, func_80268E88); INCLUDE_ASM(code_16c8e0, check_block_input); -INCLUDE_ASM(code_16c8e0, GetActionSuccess); +INCLUDE_API_ASM(code_16c8e0, GetActionSuccess); -INCLUDE_ASM(code_16c8e0, SetActionSuccess); +INCLUDE_API_ASM(code_16c8e0, SetActionSuccess); -INCLUDE_ASM(code_16c8e0, CloseActionCommandInfo); +INCLUDE_API_ASM(code_16c8e0, CloseActionCommandInfo); -INCLUDE_ASM(code_16c8e0, GetActionSuccessCopy); +INCLUDE_API_ASM(code_16c8e0, GetActionSuccessCopy); -INCLUDE_ASM(code_16c8e0, GetBlockResult); +INCLUDE_API_ASM(code_16c8e0, GetBlockResult); INCLUDE_ASM(code_16c8e0, count_targets); @@ -652,257 +652,257 @@ INCLUDE_ASM(code_16c8e0, set_actor_home_position); INCLUDE_ASM(code_16c8e0, get_actor); -INCLUDE_ASM(code_16c8e0, LoadBattleSection); +INCLUDE_API_ASM(code_16c8e0, LoadBattleSection); -INCLUDE_ASM(code_16c8e0, GetBattlePhase); +INCLUDE_API_ASM(code_16c8e0, GetBattlePhase); -INCLUDE_ASM(code_16c8e0, GetLastElement); +INCLUDE_API_ASM(code_16c8e0, GetLastElement); -INCLUDE_ASM(code_16c8e0, SetGoalToHome); +INCLUDE_API_ASM(code_16c8e0, SetGoalToHome); -INCLUDE_ASM(code_16c8e0, SetIdleGoalToHome); +INCLUDE_API_ASM(code_16c8e0, SetIdleGoalToHome); -INCLUDE_ASM(code_16c8e0, SetGoalToIndex); +INCLUDE_API_ASM(code_16c8e0, SetGoalToIndex); -INCLUDE_ASM(code_16c8e0, GetIndexFromPos); +INCLUDE_API_ASM(code_16c8e0, GetIndexFromPos); -INCLUDE_ASM(code_16c8e0, GetIndexFromHome); +INCLUDE_API_ASM(code_16c8e0, GetIndexFromHome); -INCLUDE_ASM(code_16c8e0, CountPlayerTargets); +INCLUDE_API_ASM(code_16c8e0, CountPlayerTargets); -INCLUDE_ASM(code_16c8e0, ForceHomePos); +INCLUDE_API_ASM(code_16c8e0, ForceHomePos); -INCLUDE_ASM(code_16c8e0, SetHomePos); +INCLUDE_API_ASM(code_16c8e0, SetHomePos); -INCLUDE_ASM(code_16c8e0, SetGoalToTarget); +INCLUDE_API_ASM(code_16c8e0, SetGoalToTarget); -INCLUDE_ASM(code_16c8e0, SetPartGoalToTarget); +INCLUDE_API_ASM(code_16c8e0, SetPartGoalToTarget); -INCLUDE_ASM(code_16c8e0, SetGoalToFirstTarget); +INCLUDE_API_ASM(code_16c8e0, SetGoalToFirstTarget); -INCLUDE_ASM(code_16c8e0, SetGoalPos); +INCLUDE_API_ASM(code_16c8e0, SetGoalPos); -INCLUDE_ASM(code_16c8e0, SetIdleGoal); +INCLUDE_API_ASM(code_16c8e0, SetIdleGoal); -INCLUDE_ASM(code_16c8e0, AddGoalPos); +INCLUDE_API_ASM(code_16c8e0, AddGoalPos); -INCLUDE_ASM(code_16c8e0, GetGoalPos); +INCLUDE_API_ASM(code_16c8e0, GetGoalPos); -INCLUDE_ASM(code_16c8e0, GetIdleGoal); +INCLUDE_API_ASM(code_16c8e0, GetIdleGoal); -INCLUDE_ASM(code_16c8e0, GetPartTarget); +INCLUDE_API_ASM(code_16c8e0, GetPartTarget); -INCLUDE_ASM(code_16c8e0, GetActorPos); +INCLUDE_API_ASM(code_16c8e0, GetActorPos); -INCLUDE_ASM(code_16c8e0, GetPartOffset); +INCLUDE_API_ASM(code_16c8e0, GetPartOffset); -INCLUDE_ASM(code_16c8e0, GetPartPos); +INCLUDE_API_ASM(code_16c8e0, GetPartPos); -INCLUDE_ASM(code_16c8e0, GetHomePos); +INCLUDE_API_ASM(code_16c8e0, GetHomePos); -INCLUDE_ASM(code_16c8e0, SetActorPos); +INCLUDE_API_ASM(code_16c8e0, SetActorPos); -INCLUDE_ASM(code_16c8e0, SetPartPos); +INCLUDE_API_ASM(code_16c8e0, SetPartPos); -INCLUDE_ASM(code_16c8e0, SetEnemyTargetOffset); +INCLUDE_API_ASM(code_16c8e0, SetEnemyTargetOffset); -INCLUDE_ASM(code_16c8e0, SetAnimation); +INCLUDE_API_ASM(code_16c8e0, SetAnimation); -INCLUDE_ASM(code_16c8e0, GetAnimation); +INCLUDE_API_ASM(code_16c8e0, GetAnimation); -INCLUDE_ASM(code_16c8e0, SetAnimationRate); +INCLUDE_API_ASM(code_16c8e0, SetAnimationRate); -INCLUDE_ASM(code_16c8e0, SetActorYaw); +INCLUDE_API_ASM(code_16c8e0, SetActorYaw); -INCLUDE_ASM(code_16c8e0, GetActorYaw); +INCLUDE_API_ASM(code_16c8e0, GetActorYaw); -INCLUDE_ASM(code_16c8e0, SetPartYaw); +INCLUDE_API_ASM(code_16c8e0, SetPartYaw); -INCLUDE_ASM(code_16c8e0, GetPartYaw); +INCLUDE_API_ASM(code_16c8e0, GetPartYaw); -INCLUDE_ASM(code_16c8e0, SetActorJumpGravity); +INCLUDE_API_ASM(code_16c8e0, SetActorJumpGravity); -INCLUDE_ASM(code_16c8e0, SetActorIdleJumpGravity); +INCLUDE_API_ASM(code_16c8e0, SetActorIdleJumpGravity); -INCLUDE_ASM(code_16c8e0, SetActorSpeed); +INCLUDE_API_ASM(code_16c8e0, SetActorSpeed); -INCLUDE_ASM(code_16c8e0, SetActorIdleSpeed); +INCLUDE_API_ASM(code_16c8e0, SetActorIdleSpeed); -INCLUDE_ASM(code_16c8e0, SetPartJumpGravity); +INCLUDE_API_ASM(code_16c8e0, SetPartJumpGravity); -INCLUDE_ASM(code_16c8e0, SetPartMoveSpeed); +INCLUDE_API_ASM(code_16c8e0, SetPartMoveSpeed); -INCLUDE_ASM(code_16c8e0, SetJumpAnimations); +INCLUDE_API_ASM(code_16c8e0, SetJumpAnimations); -INCLUDE_ASM(code_16c8e0, AddActorPos); +INCLUDE_API_ASM(code_16c8e0, AddActorPos); -INCLUDE_ASM(code_16c8e0, SetActorDispOffset); +INCLUDE_API_ASM(code_16c8e0, SetActorDispOffset); -INCLUDE_ASM(code_16c8e0, GetPartDispOffset); +INCLUDE_API_ASM(code_16c8e0, GetPartDispOffset); -INCLUDE_ASM(code_16c8e0, SetPartDispOffset); +INCLUDE_API_ASM(code_16c8e0, SetPartDispOffset); -INCLUDE_ASM(code_16c8e0, AddPartDispOffset); +INCLUDE_API_ASM(code_16c8e0, AddPartDispOffset); -INCLUDE_ASM(code_16c8e0, GetActorVar); +INCLUDE_API_ASM(code_16c8e0, GetActorVar); -INCLUDE_ASM(code_16c8e0, SetActorVar); +INCLUDE_API_ASM(code_16c8e0, SetActorVar); -INCLUDE_ASM(code_16c8e0, AddActorVar); +INCLUDE_API_ASM(code_16c8e0, AddActorVar); -INCLUDE_ASM(code_16c8e0, GetPartMovementVar); +INCLUDE_API_ASM(code_16c8e0, GetPartMovementVar); -INCLUDE_ASM(code_16c8e0, SetPartMovementVar); +INCLUDE_API_ASM(code_16c8e0, SetPartMovementVar); -INCLUDE_ASM(code_16c8e0, AddPartMovementVar); +INCLUDE_API_ASM(code_16c8e0, AddPartMovementVar); -INCLUDE_ASM(code_16c8e0, SetActorRotation); +INCLUDE_API_ASM(code_16c8e0, SetActorRotation); -INCLUDE_ASM(code_16c8e0, SetActorRotationOffset); +INCLUDE_API_ASM(code_16c8e0, SetActorRotationOffset); -INCLUDE_ASM(code_16c8e0, GetActorRotation); +INCLUDE_API_ASM(code_16c8e0, GetActorRotation); -INCLUDE_ASM(code_16c8e0, SetPartRotation); +INCLUDE_API_ASM(code_16c8e0, SetPartRotation); -INCLUDE_ASM(code_16c8e0, SetPartRotationOffset); +INCLUDE_API_ASM(code_16c8e0, SetPartRotationOffset); -INCLUDE_ASM(code_16c8e0, GetPartRotation); +INCLUDE_API_ASM(code_16c8e0, GetPartRotation); -INCLUDE_ASM(code_16c8e0, SetActorScale); +INCLUDE_API_ASM(code_16c8e0, SetActorScale); -INCLUDE_ASM(code_16c8e0, SetActorScaleModifier); +INCLUDE_API_ASM(code_16c8e0, SetActorScaleModifier); -INCLUDE_ASM(code_16c8e0, GetActorScale); +INCLUDE_API_ASM(code_16c8e0, GetActorScale); -INCLUDE_ASM(code_16c8e0, SetPartScale); +INCLUDE_API_ASM(code_16c8e0, SetPartScale); -INCLUDE_ASM(code_16c8e0, GetPartScale); +INCLUDE_API_ASM(code_16c8e0, GetPartScale); -INCLUDE_ASM(code_16c8e0, GetBattleFlags); +INCLUDE_API_ASM(code_16c8e0, GetBattleFlags); -INCLUDE_ASM(code_16c8e0, SetBattleFlagBits); +INCLUDE_API_ASM(code_16c8e0, SetBattleFlagBits); -INCLUDE_ASM(code_16c8e0, GetBattleFlags2); +INCLUDE_API_ASM(code_16c8e0, GetBattleFlags2); -INCLUDE_ASM(code_16c8e0, SetBattleFlagBits2); +INCLUDE_API_ASM(code_16c8e0, SetBattleFlagBits2); -INCLUDE_ASM(code_16c8e0, SetActorFlags); +INCLUDE_API_ASM(code_16c8e0, SetActorFlags); -INCLUDE_ASM(code_16c8e0, SetActorFlagBits); +INCLUDE_API_ASM(code_16c8e0, SetActorFlagBits); -INCLUDE_ASM(code_16c8e0, GetActorFlags); +INCLUDE_API_ASM(code_16c8e0, GetActorFlags); -INCLUDE_ASM(code_16c8e0, SetPartFlags); +INCLUDE_API_ASM(code_16c8e0, SetPartFlags); -INCLUDE_ASM(code_16c8e0, SetPartFlagBits); +INCLUDE_API_ASM(code_16c8e0, SetPartFlagBits); -INCLUDE_ASM(code_16c8e0, SetPartTargetFlags); +INCLUDE_API_ASM(code_16c8e0, SetPartTargetFlags); -INCLUDE_ASM(code_16c8e0, SetPartTargetFlagBits); +INCLUDE_API_ASM(code_16c8e0, SetPartTargetFlagBits); -INCLUDE_ASM(code_16c8e0, GetPartFlags); +INCLUDE_API_ASM(code_16c8e0, GetPartFlags); -INCLUDE_ASM(code_16c8e0, GetPartTargetFlags); +INCLUDE_API_ASM(code_16c8e0, GetPartTargetFlags); -INCLUDE_ASM(code_16c8e0, SetPartEventFlags); +INCLUDE_API_ASM(code_16c8e0, SetPartEventFlags); -INCLUDE_ASM(code_16c8e0, SetPartEventBits); +INCLUDE_API_ASM(code_16c8e0, SetPartEventBits); -INCLUDE_ASM(code_16c8e0, GetPartEventFlags); +INCLUDE_API_ASM(code_16c8e0, GetPartEventFlags); -INCLUDE_ASM(code_16c8e0, HPBarToHome); +INCLUDE_API_ASM(code_16c8e0, HPBarToHome); -INCLUDE_ASM(code_16c8e0, HPBarToCurrent); +INCLUDE_API_ASM(code_16c8e0, HPBarToCurrent); -INCLUDE_ASM(code_16c8e0, SummonEnemy); +INCLUDE_API_ASM(code_16c8e0, SummonEnemy); -INCLUDE_ASM(code_16c8e0, GetOwnerID); +INCLUDE_API_ASM(code_16c8e0, GetOwnerID); -INCLUDE_ASM(code_16c8e0, SetOwnerID); +INCLUDE_API_ASM(code_16c8e0, SetOwnerID); -INCLUDE_ASM(code_16c8e0, ActorExists); +INCLUDE_API_ASM(code_16c8e0, ActorExists); -INCLUDE_ASM(code_16c8e0, SetBattleInputMask); +INCLUDE_API_ASM(code_16c8e0, SetBattleInputMask); -INCLUDE_ASM(code_16c8e0, SetBattleInputButtons); +INCLUDE_API_ASM(code_16c8e0, SetBattleInputButtons); -INCLUDE_ASM(code_16c8e0, CheckButtonPress); +INCLUDE_API_ASM(code_16c8e0, CheckButtonPress); -INCLUDE_ASM(code_16c8e0, CheckButtonHeld); +INCLUDE_API_ASM(code_16c8e0, CheckButtonHeld); -INCLUDE_ASM(code_16c8e0, CheckButtonDown); +INCLUDE_API_ASM(code_16c8e0, CheckButtonDown); -INCLUDE_ASM(code_16c8e0, GetBattleState); +INCLUDE_API_ASM(code_16c8e0, GetBattleState); -INCLUDE_ASM(code_16c8e0, PlayerCreateTargetList); +INCLUDE_API_ASM(code_16c8e0, PlayerCreateTargetList); -INCLUDE_ASM(code_16c8e0, EnemyCreateTargetList); +INCLUDE_API_ASM(code_16c8e0, EnemyCreateTargetList); -INCLUDE_ASM(code_16c8e0, InitTargetIterator); +INCLUDE_API_ASM(code_16c8e0, InitTargetIterator); -INCLUDE_ASM(code_16c8e0, SetOwnerTarget); +INCLUDE_API_ASM(code_16c8e0, SetOwnerTarget); -INCLUDE_ASM(code_16c8e0, ChooseNextTarget); +INCLUDE_API_ASM(code_16c8e0, ChooseNextTarget); -INCLUDE_ASM(code_16c8e0, GetTargetListLength); +INCLUDE_API_ASM(code_16c8e0, GetTargetListLength); -INCLUDE_ASM(code_16c8e0, GetOwnerTarget); +INCLUDE_API_ASM(code_16c8e0, GetOwnerTarget); -INCLUDE_ASM(code_16c8e0, GetPlayerActorID); +INCLUDE_API_ASM(code_16c8e0, GetPlayerActorID); -INCLUDE_ASM(code_16c8e0, GetDistanceToGoal); +INCLUDE_API_ASM(code_16c8e0, GetDistanceToGoal); -INCLUDE_ASM(code_16c8e0, AddActorDecoration); +INCLUDE_API_ASM(code_16c8e0, AddActorDecoration); -INCLUDE_ASM(code_16c8e0, RemoveActorDecoration); +INCLUDE_API_ASM(code_16c8e0, RemoveActorDecoration); -INCLUDE_ASM(code_16c8e0, ModifyActorDecoration); +INCLUDE_API_ASM(code_16c8e0, ModifyActorDecoration); -INCLUDE_ASM(code_16c8e0, UseIdleAnimation); +INCLUDE_API_ASM(code_16c8e0, UseIdleAnimation); -INCLUDE_ASM(code_16c8e0, GetStatusFlags); +INCLUDE_API_ASM(code_16c8e0, GetStatusFlags); -INCLUDE_ASM(code_16c8e0, RemovePlayerBuffs); +INCLUDE_API_ASM(code_16c8e0, RemovePlayerBuffs); -INCLUDE_ASM(code_16c8e0, SetPartAlpha); +INCLUDE_API_ASM(code_16c8e0, SetPartAlpha); -INCLUDE_ASM(code_16c8e0, CreatePartShadow); +INCLUDE_API_ASM(code_16c8e0, CreatePartShadow); -INCLUDE_ASM(code_16c8e0, RemovePartShadow); +INCLUDE_API_ASM(code_16c8e0, RemovePartShadow); -INCLUDE_ASM(code_16c8e0, SetBattleVar); +INCLUDE_API_ASM(code_16c8e0, SetBattleVar); -INCLUDE_ASM(code_16c8e0, GetBattleVar); +INCLUDE_API_ASM(code_16c8e0, GetBattleVar); -INCLUDE_ASM(code_16c8e0, ResetAllActorSounds); +INCLUDE_API_ASM(code_16c8e0, ResetAllActorSounds); -INCLUDE_ASM(code_16c8e0, SetActorSounds); +INCLUDE_API_ASM(code_16c8e0, SetActorSounds); -INCLUDE_ASM(code_16c8e0, ResetActorSounds); +INCLUDE_API_ASM(code_16c8e0, ResetActorSounds); -INCLUDE_ASM(code_16c8e0, SetPartSounds); +INCLUDE_API_ASM(code_16c8e0, SetPartSounds); -INCLUDE_ASM(code_16c8e0, SetActorType); +INCLUDE_API_ASM(code_16c8e0, SetActorType); -INCLUDE_ASM(code_16c8e0, ShowShockEffect); +INCLUDE_API_ASM(code_16c8e0, ShowShockEffect); -INCLUDE_ASM(code_16c8e0, GetActorAttackBoost); +INCLUDE_API_ASM(code_16c8e0, GetActorAttackBoost); -INCLUDE_ASM(code_16c8e0, GetActorDefenseBoost); +INCLUDE_API_ASM(code_16c8e0, GetActorDefenseBoost); -INCLUDE_ASM(code_16c8e0, BoostAttack); +INCLUDE_API_ASM(code_16c8e0, BoostAttack); -INCLUDE_ASM(code_16c8e0, BoostDefense); +INCLUDE_API_ASM(code_16c8e0, BoostDefense); -INCLUDE_ASM(code_16c8e0, VanishActor); +INCLUDE_API_ASM(code_16c8e0, VanishActor); -INCLUDE_ASM(code_16c8e0, ElectrifyActor); +INCLUDE_API_ASM(code_16c8e0, ElectrifyActor); -INCLUDE_ASM(code_16c8e0, HealActor); +INCLUDE_API_ASM(code_16c8e0, HealActor); -INCLUDE_ASM(code_16c8e0, WaitForBuffDone); +INCLUDE_API_ASM(code_16c8e0, WaitForBuffDone); -INCLUDE_ASM(code_16c8e0, CopyBuffs); +INCLUDE_API_ASM(code_16c8e0, CopyBuffs); INCLUDE_ASM(code_16c8e0, dispatch_event_player); @@ -918,29 +918,29 @@ INCLUDE_ASM(code_16c8e0, dispatch_damage_event_player_0); INCLUDE_ASM(code_16c8e0, dispatch_damage_event_player_1); -INCLUDE_ASM(code_16c8e0, GetMenuSelection); +INCLUDE_API_ASM(code_16c8e0, GetMenuSelection); -INCLUDE_ASM(code_16c8e0, PlayerFallToGoal); +INCLUDE_API_ASM(code_16c8e0, PlayerFallToGoal); -INCLUDE_ASM(code_16c8e0, PlayerLandJump); +INCLUDE_API_ASM(code_16c8e0, PlayerLandJump); -INCLUDE_ASM(code_16c8e0, PlayerRunToGoal); +INCLUDE_API_ASM(code_16c8e0, PlayerRunToGoal); -INCLUDE_ASM(code_16c8e0, CancelablePlayerRunToGoal); +INCLUDE_API_ASM(code_16c8e0, CancelablePlayerRunToGoal); -INCLUDE_ASM(code_16c8e0, GetPlayerHP); +INCLUDE_API_ASM(code_16c8e0, GetPlayerHP); -INCLUDE_ASM(code_16c8e0, PlayerDamageEnemy); +INCLUDE_API_ASM(code_16c8e0, PlayerDamageEnemy); -INCLUDE_ASM(code_16c8e0, PlayerPowerBounceEnemy); +INCLUDE_API_ASM(code_16c8e0, PlayerPowerBounceEnemy); -INCLUDE_ASM(code_16c8e0, PlayerTestEnemy); +INCLUDE_API_ASM(code_16c8e0, PlayerTestEnemy); -INCLUDE_ASM(code_16c8e0, DispatchDamagePlayerEvent); +INCLUDE_API_ASM(code_16c8e0, DispatchDamagePlayerEvent); -INCLUDE_ASM(code_16c8e0, EnablePlayerBlur); +INCLUDE_API_ASM(code_16c8e0, EnablePlayerBlur); -INCLUDE_ASM(code_16c8e0, DidActionSucceed); +INCLUDE_API_ASM(code_16c8e0, DidActionSucceed); INCLUDE_ASM(code_16c8e0, func_80276F50); @@ -960,111 +960,111 @@ INCLUDE_ASM(code_16c8e0, dispatch_damage_event_actor_0); INCLUDE_ASM(code_16c8e0, dispatch_damage_event_actor_1); -INCLUDE_ASM(code_16c8e0, BindTakeTurn); +INCLUDE_API_ASM(code_16c8e0, BindTakeTurn); -INCLUDE_ASM(code_16c8e0, PauseTakeTurn); +INCLUDE_API_ASM(code_16c8e0, PauseTakeTurn); -INCLUDE_ASM(code_16c8e0, ResumeTakeTurn); +INCLUDE_API_ASM(code_16c8e0, ResumeTakeTurn); -INCLUDE_ASM(code_16c8e0, BindIdle); +INCLUDE_API_ASM(code_16c8e0, BindIdle); -INCLUDE_ASM(code_16c8e0, EnableIdleScript); +INCLUDE_API_ASM(code_16c8e0, EnableIdleScript); -INCLUDE_ASM(code_16c8e0, BindHandleEvent); +INCLUDE_API_ASM(code_16c8e0, BindHandleEvent); -INCLUDE_ASM(code_16c8e0, BindNextTurn); +INCLUDE_API_ASM(code_16c8e0, BindNextTurn); -INCLUDE_ASM(code_16c8e0, JumpToGoal); +INCLUDE_API_ASM(code_16c8e0, JumpToGoal); -INCLUDE_ASM(code_16c8e0, IdleJumpToGoal); +INCLUDE_API_ASM(code_16c8e0, IdleJumpToGoal); -INCLUDE_ASM(code_16c8e0, JumpToGoalSimple2); +INCLUDE_API_ASM(code_16c8e0, JumpToGoalSimple2); -INCLUDE_ASM(code_16c8e0, JumpWithBounce); +INCLUDE_API_ASM(code_16c8e0, JumpWithBounce); -INCLUDE_ASM(code_16c8e0, LandJump); +INCLUDE_API_ASM(code_16c8e0, LandJump); -INCLUDE_ASM(code_16c8e0, FallToGoal); +INCLUDE_API_ASM(code_16c8e0, FallToGoal); -INCLUDE_ASM(code_16c8e0, RunToGoal); +INCLUDE_API_ASM(code_16c8e0, RunToGoal); -INCLUDE_ASM(code_16c8e0, IdleRunToGoal); +INCLUDE_API_ASM(code_16c8e0, IdleRunToGoal); -INCLUDE_ASM(code_16c8e0, JumpPartTo); +INCLUDE_API_ASM(code_16c8e0, JumpPartTo); -INCLUDE_ASM(code_16c8e0, FallPartTo); +INCLUDE_API_ASM(code_16c8e0, FallPartTo); -INCLUDE_ASM(code_16c8e0, LandJumpPart); +INCLUDE_API_ASM(code_16c8e0, LandJumpPart); -INCLUDE_ASM(code_16c8e0, RunPartTo); +INCLUDE_API_ASM(code_16c8e0, RunPartTo); INCLUDE_ASM(code_16c8e0, update_lerp_battle); -INCLUDE_ASM(code_16c8e0, FlyToGoal); +INCLUDE_API_ASM(code_16c8e0, FlyToGoal); -INCLUDE_ASM(code_16c8e0, IdleFlyToGoal); +INCLUDE_API_ASM(code_16c8e0, IdleFlyToGoal); -INCLUDE_ASM(code_16c8e0, FlyPartTo); +INCLUDE_API_ASM(code_16c8e0, FlyPartTo); -INCLUDE_ASM(code_16c8e0, GetLastEvent); +INCLUDE_API_ASM(code_16c8e0, GetLastEvent); -INCLUDE_ASM(code_16c8e0, SetTargetActor); +INCLUDE_API_ASM(code_16c8e0, SetTargetActor); -INCLUDE_ASM(code_16c8e0, SetEnemyHP); +INCLUDE_API_ASM(code_16c8e0, SetEnemyHP); -INCLUDE_ASM(code_16c8e0, GetActorHP); +INCLUDE_API_ASM(code_16c8e0, GetActorHP); -INCLUDE_ASM(code_16c8e0, GetEnemyMaxHP); +INCLUDE_API_ASM(code_16c8e0, GetEnemyMaxHP); -INCLUDE_ASM(code_16c8e0, RemoveActor); +INCLUDE_API_ASM(code_16c8e0, RemoveActor); -INCLUDE_ASM(code_16c8e0, DropStarPoints); +INCLUDE_API_ASM(code_16c8e0, DropStarPoints); -INCLUDE_ASM(code_16c8e0, SetDefenseTable); +INCLUDE_API_ASM(code_16c8e0, SetDefenseTable); -INCLUDE_ASM(code_16c8e0, SetStatusTable); +INCLUDE_API_ASM(code_16c8e0, SetStatusTable); -INCLUDE_ASM(code_16c8e0, SetIdleAnimations); +INCLUDE_API_ASM(code_16c8e0, SetIdleAnimations); -INCLUDE_ASM(code_16c8e0, EnemyDamageTarget); +INCLUDE_API_ASM(code_16c8e0, EnemyDamageTarget); -INCLUDE_ASM(code_16c8e0, EnemyFollowupAfflictTarget); +INCLUDE_API_ASM(code_16c8e0, EnemyFollowupAfflictTarget); -INCLUDE_ASM(code_16c8e0, EnemyTestTarget); +INCLUDE_API_ASM(code_16c8e0, EnemyTestTarget); -INCLUDE_ASM(code_16c8e0, DispatchDamageEvent); +INCLUDE_API_ASM(code_16c8e0, DispatchDamageEvent); -INCLUDE_ASM(code_16c8e0, DispatchEvent); +INCLUDE_API_ASM(code_16c8e0, DispatchEvent); -INCLUDE_ASM(code_16c8e0, SetTargetOffset); +INCLUDE_API_ASM(code_16c8e0, SetTargetOffset); -INCLUDE_ASM(code_16c8e0, EnableActorBlur); +INCLUDE_API_ASM(code_16c8e0, EnableActorBlur); -INCLUDE_ASM(code_16c8e0, AfflictActor); +INCLUDE_API_ASM(code_16c8e0, AfflictActor); -INCLUDE_ASM(code_16c8e0, GetEncounterState); +INCLUDE_API_ASM(code_16c8e0, GetEncounterState); -INCLUDE_ASM(code_16c8e0, YieldTurn); +INCLUDE_API_ASM(code_16c8e0, YieldTurn); -INCLUDE_ASM(code_16c8e0, SetActorSize); +INCLUDE_API_ASM(code_16c8e0, SetActorSize); -INCLUDE_ASM(code_16c8e0, GetActorSize); +INCLUDE_API_ASM(code_16c8e0, GetActorSize); -INCLUDE_ASM(code_16c8e0, SetPartSize); +INCLUDE_API_ASM(code_16c8e0, SetPartSize); -INCLUDE_ASM(code_16c8e0, GetOriginalActorType); +INCLUDE_API_ASM(code_16c8e0, GetOriginalActorType); -INCLUDE_ASM(code_16c8e0, GetCurrentActorType); +INCLUDE_API_ASM(code_16c8e0, GetCurrentActorType); -INCLUDE_ASM(code_16c8e0, GetLastDamage); +INCLUDE_API_ASM(code_16c8e0, GetLastDamage); -INCLUDE_ASM(code_16c8e0, EnableActorGlow); +INCLUDE_API_ASM(code_16c8e0, EnableActorGlow); -INCLUDE_ASM(code_16c8e0, WasStatusInflicted); +INCLUDE_API_ASM(code_16c8e0, WasStatusInflicted); -INCLUDE_ASM(code_16c8e0, CopyStatusEffects); +INCLUDE_API_ASM(code_16c8e0, CopyStatusEffects); -INCLUDE_ASM(code_16c8e0, ClearStatusEffects); +INCLUDE_API_ASM(code_16c8e0, ClearStatusEffects); INCLUDE_ASM(code_16c8e0, dispatch_event_partner); @@ -1080,22 +1080,22 @@ INCLUDE_ASM(code_16c8e0, dispatch_damage_event_partner_0); INCLUDE_ASM(code_16c8e0, dispatch_damage_event_partner_1); -INCLUDE_ASM(code_16c8e0, MakeOwnerTargetIndex); +INCLUDE_API_ASM(code_16c8e0, MakeOwnerTargetIndex); -INCLUDE_ASM(code_16c8e0, GetActorLevel); +INCLUDE_API_ASM(code_16c8e0, GetActorLevel); -INCLUDE_ASM(code_16c8e0, PartnerDamageEnemy); +INCLUDE_API_ASM(code_16c8e0, PartnerDamageEnemy); -INCLUDE_ASM(code_16c8e0, PartnerAfflictEnemy); +INCLUDE_API_ASM(code_16c8e0, PartnerAfflictEnemy); -INCLUDE_ASM(code_16c8e0, PartnerPowerBounceEnemy); +INCLUDE_API_ASM(code_16c8e0, PartnerPowerBounceEnemy); -INCLUDE_ASM(code_16c8e0, PartnerTestEnemy); +INCLUDE_API_ASM(code_16c8e0, PartnerTestEnemy); -INCLUDE_ASM(code_16c8e0, DeletePartner); +INCLUDE_API_ASM(code_16c8e0, DeletePartner); -INCLUDE_ASM(code_16c8e0, GetDamageIntensity); +INCLUDE_API_ASM(code_16c8e0, GetDamageIntensity); -INCLUDE_ASM(code_16c8e0, ActorAddMovePos); +INCLUDE_API_ASM(code_16c8e0, ActorAddMovePos); -INCLUDE_ASM(code_16c8e0, LoadStarPowerScript); +INCLUDE_API_ASM(code_16c8e0, LoadStarPowerScript); diff --git a/src/code_1a1f0_len_5390.c b/src/code_1a1f0_len_5390.c index 4e85b02dfd..9de2d35aba 100644 --- a/src/code_1a1f0_len_5390.c +++ b/src/code_1a1f0_len_5390.c @@ -4,13 +4,13 @@ INCLUDE_ASM(code_1a1f0_len_5390, get_defeated); INCLUDE_ASM(code_1a1f0_len_5390, set_defeated); -INCLUDE_ASM(code_1a1f0_len_5390, GetCamLookAtObjVector); +INCLUDE_API_ASM(code_1a1f0_len_5390, GetCamLookAtObjVector); -INCLUDE_ASM(code_1a1f0_len_5390, HasMerleeCasts); +INCLUDE_API_ASM(code_1a1f0_len_5390, HasMerleeCasts); -INCLUDE_ASM(code_1a1f0_len_5390, OnDefeatEnemy); +INCLUDE_API_ASM(code_1a1f0_len_5390, OnDefeatEnemy); -INCLUDE_ASM(code_1a1f0_len_5390, OnFleeBattleDrops); +INCLUDE_API_ASM(code_1a1f0_len_5390, OnFleeBattleDrops); INCLUDE_ASM(code_1a1f0_len_5390, func_8003F7CC); diff --git a/src/code_1f580_len_1940.c b/src/code_1f580_len_1940.c index 1cfc8aeb3d..1bb34f5475 100644 --- a/src/code_1f580_len_1940.c +++ b/src/code_1f580_len_1940.c @@ -1,94 +1,94 @@ #include "common.h" -INCLUDE_ASM(code_1f580_len_1940, SetEncounterStatusFlags); +INCLUDE_API_ASM(code_1f580_len_1940, SetEncounterStatusFlags); -s32 LoadDemoBattle(script_context* script) { +ApiStatus LoadDemoBattle(ScriptInstance* script, s32 isInitialCall) { load_demo_battle(get_variable(script, *script->ptrReadPos)); - return 2; + return ApiStatus_DONE2; } // ??? -s32 func_80044290(script_context* script) { - return 2; +ApiStatus func_80044290(ScriptInstance* script, s32 isInitialCall) { + return ApiStatus_DONE2; } -INCLUDE_ASM(code_1f580_len_1940, MakeNpcs); +INCLUDE_API_ASM(code_1f580_len_1940, MakeNpcs); -INCLUDE_ASM(code_1f580_len_1940, RemoveNpc); +INCLUDE_API_ASM(code_1f580_len_1940, RemoveNpc); -INCLUDE_ASM(code_1f580_len_1940, RemoveEncounter); +INCLUDE_API_ASM(code_1f580_len_1940, RemoveEncounter); -INCLUDE_ASM(code_1f580_len_1940, GetBattleOutcome); +INCLUDE_API_ASM(code_1f580_len_1940, GetBattleOutcome); -s32 GetOwnerEncountered(script_context* script) { +ApiStatus GetOwnerEncountered(ScriptInstance* script, s32 isInitialCall) { set_variable(script, *script->ptrReadPos, script->ownerActorID->encountered); - return 2; + return ApiStatus_DONE2; } -INCLUDE_ASM(code_1f580_len_1940, DoNpcDefeat); +INCLUDE_API_ASM(code_1f580_len_1940, DoNpcDefeat); INCLUDE_ASM(code_1f580_len_1940, start_battle); -s32 StartBattle(script_context* script) { +ApiStatus StartBattle(ScriptInstance* script, s32 isInitialCall) { start_battle(script, -1); - return 1; + return ApiStatus_DONE1; } -s32 StartBattleWith(script_context* script) { +ApiStatus StartBattleWith(ScriptInstance* script, s32 isInitialCall) { start_battle(script, get_variable(script, *script->ptrReadPos)); - return 1; + return ApiStatus_DONE1; } -INCLUDE_ASM(code_1f580_len_1940, StartBossBattle); +INCLUDE_API_ASM(code_1f580_len_1940, StartBossBattle); -INCLUDE_ASM(code_1f580_len_1940, SetBattleMusic); +INCLUDE_API_ASM(code_1f580_len_1940, SetBattleMusic); -INCLUDE_ASM(code_1f580_len_1940, BindNpcAI); +INCLUDE_API_ASM(code_1f580_len_1940, BindNpcAI); -INCLUDE_ASM(code_1f580_len_1940, BindNpcIdle); +INCLUDE_API_ASM(code_1f580_len_1940, BindNpcIdle); -INCLUDE_ASM(code_1f580_len_1940, RestartNpcAI); +INCLUDE_API_ASM(code_1f580_len_1940, RestartNpcAI); -INCLUDE_ASM(code_1f580_len_1940, EnableNpcAI); +INCLUDE_API_ASM(code_1f580_len_1940, EnableNpcAI); -INCLUDE_ASM(code_1f580_len_1940, SetNpcAux); +INCLUDE_API_ASM(code_1f580_len_1940, SetNpcAux); -INCLUDE_ASM(code_1f580_len_1940, BindNpcAux); +INCLUDE_API_ASM(code_1f580_len_1940, BindNpcAux); -INCLUDE_ASM(code_1f580_len_1940, RestartNpcAux); +INCLUDE_API_ASM(code_1f580_len_1940, RestartNpcAux); -INCLUDE_ASM(code_1f580_len_1940, EnableNpcAux); +INCLUDE_API_ASM(code_1f580_len_1940, EnableNpcAux); -INCLUDE_ASM(code_1f580_len_1940, BindNpcInteract); +INCLUDE_API_ASM(code_1f580_len_1940, BindNpcInteract); -INCLUDE_ASM(code_1f580_len_1940, BindNpcHit); +INCLUDE_API_ASM(code_1f580_len_1940, BindNpcHit); -INCLUDE_ASM(code_1f580_len_1940, BindNpcDefeat); +INCLUDE_API_ASM(code_1f580_len_1940, BindNpcDefeat); -INCLUDE_ASM(code_1f580_len_1940, SetSelfVar); +INCLUDE_API_ASM(code_1f580_len_1940, SetSelfVar); -INCLUDE_ASM(code_1f580_len_1940, GetSelfVar); +INCLUDE_API_ASM(code_1f580_len_1940, GetSelfVar); -INCLUDE_ASM(code_1f580_len_1940, SetNpcVar); +INCLUDE_API_ASM(code_1f580_len_1940, SetNpcVar); -INCLUDE_ASM(code_1f580_len_1940, GetNpcVar); +INCLUDE_API_ASM(code_1f580_len_1940, GetNpcVar); -INCLUDE_ASM(code_1f580_len_1940, SetSelfRotation); +INCLUDE_API_ASM(code_1f580_len_1940, SetSelfRotation); -s32 SetSelfEnemyFlags(script_context* script) { +ApiStatus SetSelfEnemyFlags(ScriptInstance* script, s32 isInitialCall) { script->ownerActorID->flags = *script->ptrReadPos; - return 2; + return ApiStatus_DONE2; } -INCLUDE_ASM(code_1f580_len_1940, SetSelfEnemyFlagBits); +INCLUDE_API_ASM(code_1f580_len_1940, SetSelfEnemyFlagBits); -s32 GetSelfNpcID(script_context* script) { +ApiStatus GetSelfNpcID(ScriptInstance* script, s32 isInitialCall) { set_variable(script, *script->ptrReadPos, script->ownerActorID->npcID); - return 2; + return ApiStatus_DONE2; } -INCLUDE_ASM(code_1f580_len_1940, ClearDefeatedEnemies); +INCLUDE_API_ASM(code_1f580_len_1940, ClearDefeatedEnemies); -INCLUDE_ASM(code_1f580_len_1940, SetEnemyFlagBits); +INCLUDE_API_ASM(code_1f580_len_1940, SetEnemyFlagBits); -INCLUDE_ASM(code_1f580_len_1940, GetSelfAnimationFromTable); +INCLUDE_API_ASM(code_1f580_len_1940, GetSelfAnimationFromTable); diff --git a/src/code_20ec0_len_5040.c b/src/code_20ec0_len_5040.c index be139a5e13..f51d193efe 100644 --- a/src/code_20ec0_len_5040.c +++ b/src/code_20ec0_len_5040.c @@ -112,7 +112,7 @@ INCLUDE_ASM(code_20ec0_len_5040, func_8004A124); INCLUDE_ASM(code_20ec0_len_5040, func_8004A3E8); -INCLUDE_ASM(code_20ec0_len_5040, DoBasicAI); +INCLUDE_API_ASM(code_20ec0_len_5040, DoBasicAI); INCLUDE_ASM(code_20ec0_len_5040, func_8004A73C); diff --git a/src/code_25f00_len_940.c b/src/code_25f00_len_940.c index 76b378b821..f4b62916e1 100644 --- a/src/code_25f00_len_940.c +++ b/src/code_25f00_len_940.c @@ -2,12 +2,12 @@ INCLUDE_ASM(code_25f00_len_940, func_8004AB00); -INCLUDE_ASM(code_25f00_len_940, nuAuDmaCallBack); +INCLUDE_API_ASM(code_25f00_len_940, nuAuDmaCallBack); -INCLUDE_ASM(code_25f00_len_940, nuAuDmaNew); +INCLUDE_API_ASM(code_25f00_len_940, nuAuDmaNew); -INCLUDE_ASM(code_25f00_len_940, nuAuCleanDMABuffers); +INCLUDE_API_ASM(code_25f00_len_940, nuAuCleanDMABuffers); -INCLUDE_ASM(code_25f00_len_940, alRename1); +INCLUDE_API_ASM(code_25f00_len_940, alRename1); -INCLUDE_ASM(code_25f00_len_940, alRename2); +INCLUDE_API_ASM(code_25f00_len_940, alRename2); diff --git a/src/code_303c0_len_3e10.c b/src/code_303c0_len_3e10.c index e86ebe3a43..fef6b92f19 100644 --- a/src/code_303c0_len_3e10.c +++ b/src/code_303c0_len_3e10.c @@ -92,7 +92,7 @@ INCLUDE_ASM(code_303c0_len_3e10, func_80056228); INCLUDE_ASM(code_303c0_len_3e10, func_80056250); -INCLUDE_ASM(code_303c0_len_3e10, alRename4); +INCLUDE_API_ASM(code_303c0_len_3e10, alRename4); INCLUDE_ASM(code_303c0_len_3e10, func_80056D34); @@ -136,7 +136,7 @@ INCLUDE_ASM(code_303c0_len_3e10, func_80057ED0); INCLUDE_ASM(code_303c0_len_3e10, func_80057F20); -INCLUDE_ASM(code_303c0_len_3e10, alRename3); +INCLUDE_API_ASM(code_303c0_len_3e10, alRename3); INCLUDE_ASM(code_303c0_len_3e10, func_80057FD8); diff --git a/src/code_42e0_len_1f60.c b/src/code_42e0_len_1f60.c index ce79ea013a..1d3d63806d 100644 --- a/src/code_42e0_len_1f60.c +++ b/src/code_42e0_len_1f60.c @@ -8,7 +8,7 @@ INCLUDE_ASM(code_42e0_len_1f60, func_80028F8C); INCLUDE_ASM(code_42e0_len_1f60, func_80028FE0); -INCLUDE_ASM(code_42e0_len_1f60, length2D); +INCLUDE_API_ASM(code_42e0_len_1f60, length2D); INCLUDE_ASM(code_42e0_len_1f60, _heap_create); @@ -20,9 +20,9 @@ INCLUDE_ASM(code_42e0_len_1f60, _heap_free); INCLUDE_ASM(code_42e0_len_1f60, _heap_realloc); -INCLUDE_ASM(code_42e0_len_1f60, cosine); +INCLUDE_API_ASM(code_42e0_len_1f60, cosine); -INCLUDE_ASM(code_42e0_len_1f60, sign); +INCLUDE_API_ASM(code_42e0_len_1f60, sign); INCLUDE_ASM(code_42e0_len_1f60, int_to_string); @@ -44,9 +44,9 @@ INCLUDE_ASM(code_42e0_len_1f60, func_80029994); s32 INCLUDE_ASM(code_42e0_len_1f60, rand_int, s32 arg0); -INCLUDE_ASM(code_42e0_len_1f60, signF); +INCLUDE_API_ASM(code_42e0_len_1f60, signF); -INCLUDE_ASM(code_42e0_len_1f60, round); +INCLUDE_API_ASM(code_42e0_len_1f60, round); f32 INCLUDE_ASM(code_42e0_len_1f60, clamp_angle, f32 theta); @@ -78,7 +78,7 @@ f32 INCLUDE_ASM(code_42e0_len_1f60, sin_deg, f32 x); f32 INCLUDE_ASM(code_42e0_len_1f60, cos_deg, f32 x); -f32 INCLUDE_ASM(code_42e0_len_1f60, update_lerp, EASING easing, f32 start, f32 end, s32 elapsed, s32 duration); +f32 INCLUDE_ASM(code_42e0_len_1f60, update_lerp, Easing easing, f32 start, f32 end, s32 elapsed, s32 duration); INCLUDE_ASM(code_42e0_len_1f60, func_8002A904); diff --git a/src/code_7E2AA0.c b/src/code_7E2AA0.c index f92a463b45..e30495be0a 100644 --- a/src/code_7E2AA0.c +++ b/src/code_7E2AA0.c @@ -2,4 +2,4 @@ INCLUDE_ASM(code_7E2AA0, func_80281C20); -INCLUDE_ASM(code_7E2AA0, MakeDoorAdvanced); +INCLUDE_API_ASM(code_7E2AA0, MakeDoorAdvanced); diff --git a/src/code_7E3700.c b/src/code_7E3700.c index f0ae86ccae..ab17eaabed 100644 --- a/src/code_7E3700.c +++ b/src/code_7E3700.c @@ -2,14 +2,14 @@ INCLUDE_ASM(code_7E3700, func_80282880); -INCLUDE_ASM(code_7E3700, CheckActionState); +INCLUDE_API_ASM(code_7E3700, CheckActionState); -INCLUDE_ASM(code_7E3700, CreatePushBlockGrid); +INCLUDE_API_ASM(code_7E3700, CreatePushBlockGrid); -INCLUDE_ASM(code_7E3700, SetPushBlock); +INCLUDE_API_ASM(code_7E3700, SetPushBlock); -INCLUDE_ASM(code_7E3700, GetPushBlock); +INCLUDE_API_ASM(code_7E3700, GetPushBlock); -INCLUDE_ASM(code_7E3700, GetGridIndexFromPos); +INCLUDE_API_ASM(code_7E3700, GetGridIndexFromPos); -INCLUDE_ASM(code_7E3700, SetPushBlockFallEffect); +INCLUDE_API_ASM(code_7E3700, SetPushBlockFallEffect); diff --git a/src/code_7e0e80.c b/src/code_7e0e80.c index 162baf139c..d3b83070e9 100644 --- a/src/code_7e0e80.c +++ b/src/code_7e0e80.c @@ -18,40 +18,40 @@ INCLUDE_ASM(code_7e0e80, func_80280AC4); INCLUDE_ASM(code_7e0e80, func_80280B44); -INCLUDE_ASM(code_7e0e80, BtlBringPartnerOut); +INCLUDE_API_ASM(code_7e0e80, BtlBringPartnerOut); INCLUDE_ASM(code_7e0e80, func_80280B78); -INCLUDE_ASM(code_7e0e80, CamPreset_B); +INCLUDE_API_ASM(code_7e0e80, CamPreset_B); -INCLUDE_ASM(code_7e0e80, CamPreset_F); +INCLUDE_API_ASM(code_7e0e80, CamPreset_F); -INCLUDE_ASM(code_7e0e80, CamPreset_M); +INCLUDE_API_ASM(code_7e0e80, CamPreset_M); -INCLUDE_ASM(code_7e0e80, CamPreset_G); +INCLUDE_API_ASM(code_7e0e80, CamPreset_G); -INCLUDE_ASM(code_7e0e80, CamPreset_I); +INCLUDE_API_ASM(code_7e0e80, CamPreset_I); -INCLUDE_ASM(code_7e0e80, CamPreset_H); +INCLUDE_API_ASM(code_7e0e80, CamPreset_H); -INCLUDE_ASM(code_7e0e80, CamPreset_N); +INCLUDE_API_ASM(code_7e0e80, CamPreset_N); -INCLUDE_ASM(code_7e0e80, CamPreset_C); +INCLUDE_API_ASM(code_7e0e80, CamPreset_C); -INCLUDE_ASM(code_7e0e80, CamPreset_D); +INCLUDE_API_ASM(code_7e0e80, CamPreset_D); -INCLUDE_ASM(code_7e0e80, CamPreset_E); +INCLUDE_API_ASM(code_7e0e80, CamPreset_E); -INCLUDE_ASM(code_7e0e80, CamPreset_J); +INCLUDE_API_ASM(code_7e0e80, CamPreset_J); -INCLUDE_ASM(code_7e0e80, CamPreset_K); +INCLUDE_API_ASM(code_7e0e80, CamPreset_K); -INCLUDE_ASM(code_7e0e80, CamPreset_L); +INCLUDE_API_ASM(code_7e0e80, CamPreset_L); -INCLUDE_ASM(code_7e0e80, CamPreset_A); +INCLUDE_API_ASM(code_7e0e80, CamPreset_A); INCLUDE_ASM(code_7e0e80, draw_shop_items); -INCLUDE_ASM(code_7e0e80, MakeShop); +INCLUDE_API_ASM(code_7e0e80, MakeShop); -INCLUDE_ASM(code_7e0e80, MakeShopOwner); +INCLUDE_API_ASM(code_7e0e80, MakeShopOwner); diff --git a/src/code_80850_len_3060.c b/src/code_80850_len_3060.c index 3de3730467..3c2461b09d 100644 --- a/src/code_80850_len_3060.c +++ b/src/code_80850_len_3060.c @@ -1,7 +1,7 @@ #include "common.h" void clear_player_data(void) { - player_data* playerData = &gPlayerData; + PlayerData* playerData = &gPlayerData; s32 i; D_8010CD10 = 0; @@ -95,12 +95,12 @@ void clear_player_data(void) { playerData->smashGameRecord = 0; } -player_data* get_player_data(void) { +PlayerData* get_player_data(void) { return &gPlayerData; } s32 add_item(s32 itemID) { - player_data* playerData = &gPlayerData; + PlayerData* playerData = &gPlayerData; s32 i; sort_items(); @@ -120,7 +120,7 @@ s32 add_item(s32 itemID) { } s32 get_item_count(void) { - player_data* playerData = &gPlayerData; + PlayerData* playerData = &gPlayerData; s32 i = 0; s32 sum = 0; @@ -138,8 +138,8 @@ s32 get_item_empty_count(void) { } s32 find_item(s32 itemID) { - player_data* playerData = &gPlayerData; - item_table_entry* item = &gItemTable[itemID]; + PlayerData* playerData = &gPlayerData; + StaticItem* item = &gItemTable[itemID]; s32 i; if ((item->typeFlags & 8) != 0) { @@ -170,7 +170,7 @@ s32 find_item(s32 itemID) { } void sort_items(void) { - player_data* playerData = &gPlayerData; + PlayerData* playerData = &gPlayerData; int j; int i; @@ -189,8 +189,8 @@ void sort_items(void) { } s32 add_badge(s32 itemID) { - player_data* playerData = &gPlayerData; - item_table_entry* item = &gItemTable[itemID]; + PlayerData* playerData = &gPlayerData; + StaticItem* item = &gItemTable[itemID]; s32 i; if ((item->typeFlags & 0x40) == 0) { @@ -212,7 +212,7 @@ s32 add_badge(s32 itemID) { } s32 store_item(s32 itemID) { - player_data* playerData = &gPlayerData; + PlayerData* playerData = &gPlayerData; s32 i; for (i = 0; i < ARRAY_COUNT(gPlayerData.storedItems); i++) { @@ -231,7 +231,7 @@ s32 store_item(s32 itemID) { } s32 get_stored_count(void) { - player_data* playerData = &gPlayerData; + PlayerData* playerData = &gPlayerData; s32 i = 0; s32 sum = 0; @@ -249,8 +249,8 @@ s32 get_stored_empty_count(void) { } void enforce_hpfp_limits(void) { - player_data* playerData = &gPlayerData; - player_data* playerData2 = &gPlayerData; + PlayerData* playerData = &gPlayerData; + PlayerData* playerData2 = &gPlayerData; playerData->curMaxHP = playerData->hardMaxHP + (is_ability_active(4) * 5); if (playerData->curMaxHP > 75) { @@ -278,7 +278,7 @@ INCLUDE_ASM(code_80850_len_3060, status_menu_draw_stat); INCLUDE_ASM(code_80850_len_3060, update_status_menu); void coin_counter_draw_content(UNK_TYPE arg0, s32 posX, s32 posY) { - ui_status* uiStatus = &gUIStatus; + UiStatus* uiStatus = &gUIStatus; s32 iconIndex; if ((gPlayerData.coins != uiStatus->displayCoins) && (((*gGameStatusPtr)->frameCounter % 3) == 0)) { @@ -297,8 +297,8 @@ void coin_counter_draw_content(UNK_TYPE arg0, s32 posX, s32 posY) { } void update_coin_counter(void) { - ui_status* uiStatus = &gUIStatus; - player_data* playerData = &gPlayerData; + UiStatus* uiStatus = &gUIStatus; + PlayerData* playerData = &gPlayerData; do {} while(0); // Needed to match @@ -337,7 +337,7 @@ void update_coin_counter(void) { } void show_coin_counter(void) { - ui_status* uiStatus = &gUIStatus; + UiStatus* uiStatus = &gUIStatus; s16* coinCounterUnk = &D_8010CD10; s32 index; @@ -378,7 +378,7 @@ void show_coin_counter(void) { } void hide_coin_counter(void) { - ui_status* uiStatus = &gUIStatus; + UiStatus* uiStatus = &gUIStatus; if ((D_8010CD10 != 0) && (uiStatus->unk_6C[0]== 0)) { uiStatus->unk_6C[0] = 60; @@ -386,20 +386,21 @@ void hide_coin_counter(void) { } void func_800E96C8(void) { - ui_status* uiStatus = &gUIStatus; + UiStatus* uiStatus = &gUIStatus; if ((D_8010CD10 != 0) && (uiStatus->unk_6C[0]== 0)) { uiStatus->unk_6C[0]= 1; } } -s32 ShowCoinCounter(script_context* script) { +ApiStatus ShowCoinCounter(ScriptInstance* script, s32 isInitialCall) { if (get_variable(script, *script->ptrReadPos)) { show_coin_counter(); } else { hide_coin_counter(); } - return 2; + + return ApiStatus_DONE2; } void func_800E973C(void) { @@ -408,7 +409,7 @@ void func_800E973C(void) { } void open_status_menu_long(void) { - ui_status* uiStatus = &gUIStatus; + UiStatus* uiStatus = &gUIStatus; if (uiStatus->hidden) { uiStatus->showTimer = 210; @@ -418,7 +419,7 @@ void open_status_menu_long(void) { } void open_status_menu_short(void) { - ui_status* uiStatus = &gUIStatus; + UiStatus* uiStatus = &gUIStatus; if (uiStatus->hidden) { uiStatus->showTimer = 105; @@ -428,7 +429,7 @@ void open_status_menu_short(void) { } void func_800E97B8(void) { - ui_status* uiStatus = &gUIStatus; + UiStatus* uiStatus = &gUIStatus; if (uiStatus->hidden != 1) { uiStatus->hidden = 1; @@ -438,7 +439,7 @@ void func_800E97B8(void) { } void func_800E97E4(void) { - ui_status* uiStatus = &gUIStatus; + UiStatus* uiStatus = &gUIStatus; uiStatus->drawPosY = -100; uiStatus->ignoreChanges = 0; @@ -449,7 +450,7 @@ void func_800E97E4(void) { } void func_800E9810(void) { - ui_status* uiStatus = &gUIStatus; + UiStatus* uiStatus = &gUIStatus; uiStatus->showTimer = 210; uiStatus->drawPosY = 0; @@ -468,8 +469,8 @@ void func_800E984C(void) { } s32 func_800E9860(void) { - ui_status* uiStatus = &gUIStatus; - ui_status* uiStatus2 = &gUIStatus; + UiStatus* uiStatus = &gUIStatus; + UiStatus* uiStatus2 = &gUIStatus; s32 ret = 1 - uiStatus->unk_45[0]; if (uiStatus->unk_45[1] != 0) { @@ -486,7 +487,7 @@ void status_menu_enable_ignore_changes(void) { } void func_800E98A8(void) { - ui_status* uiStatus = &gUIStatus; + UiStatus* uiStatus = &gUIStatus; uiStatus->ignoreChanges = 1; uiStatus->drawPosY = 18; @@ -497,7 +498,7 @@ void status_menu_disable_ignore_changes(void) { } s32 func_800E98D4(void) { - ui_status* uiStatus = &gUIStatus; + UiStatus* uiStatus = &gUIStatus; return uiStatus->unk_45[1] + uiStatus->ignoreChanges; } @@ -515,9 +516,9 @@ s32 is_status_menu_visible(void) { } void status_menu_start_blinking_hp(void) { - game_status* gameStatus = (*gGameStatusPtr); - ui_status* uiStatus = &gUIStatus; - ui_status* uiStatus2 = &gUIStatus; + GameStatus* gameStatus = (*gGameStatusPtr); + UiStatus* uiStatus = &gUIStatus; + UiStatus* uiStatus2 = &gUIStatus; if (gameStatus->isBattle == 0) { uiStatus->hpBlinkTimer = 120; @@ -530,7 +531,7 @@ void status_menu_start_blinking_hp(void) { } void status_menu_stop_blinking_hp(void) { - ui_status* uiStatus = &gUIStatus; + UiStatus* uiStatus = &gUIStatus; if (uiStatus->hpBlinking != 0) { uiStatus->hpBlinking = 0; @@ -540,9 +541,9 @@ void status_menu_stop_blinking_hp(void) { } void status_menu_start_blinking_fp(void) { - game_status* gameStatus = (*gGameStatusPtr); - ui_status* uiStatus = &gUIStatus; - ui_status* uiStatus2 = &gUIStatus; + GameStatus* gameStatus = (*gGameStatusPtr); + UiStatus* uiStatus = &gUIStatus; + UiStatus* uiStatus2 = &gUIStatus; if (gameStatus->isBattle == 0) { uiStatus->fpBlinkTimer = 120; @@ -555,7 +556,7 @@ void status_menu_start_blinking_fp(void) { } void status_menu_stop_blinking_fp(void) { - ui_status* uiStatus = &gUIStatus; + UiStatus* uiStatus = &gUIStatus; if (uiStatus->fpBlinking != 0) { uiStatus->fpBlinking = 0; @@ -564,9 +565,9 @@ void status_menu_stop_blinking_fp(void) { } void status_menu_start_blinking_coins(void) { - game_status* gameStatus = (*gGameStatusPtr); - ui_status* uiStatus = &gUIStatus; - ui_status* uiStatus2 = &gUIStatus; + GameStatus* gameStatus = (*gGameStatusPtr); + UiStatus* uiStatus = &gUIStatus; + UiStatus* uiStatus2 = &gUIStatus; if (gameStatus->isBattle == 0) { uiStatus->coinsBlinkTimer = 120; @@ -579,7 +580,7 @@ void status_menu_start_blinking_coins(void) { } void status_menu_stop_blinking_coins(void) { - ui_status* uiStatus = &gUIStatus; + UiStatus* uiStatus = &gUIStatus; if (uiStatus->coinsBlinking != 0) { uiStatus->coinsBlinking = 0; @@ -589,8 +590,8 @@ void status_menu_stop_blinking_coins(void) { } void status_menu_start_blinking_sp(void) { - player_data* playerData = &gPlayerData; - ui_status* uiStatus = &gUIStatus; + PlayerData* playerData = &gPlayerData; + UiStatus* uiStatus = &gUIStatus; uiStatus->spBarsToBlink = playerData->maxStarPower; if (uiStatus->spBlinking != 1) { @@ -600,7 +601,7 @@ void status_menu_start_blinking_sp(void) { } void status_menu_stop_blinking_sp(void) { - ui_status* uiStatus = &gUIStatus; + UiStatus* uiStatus = &gUIStatus; if (uiStatus->spBlinking != 0) { uiStatus->spBlinking = 0; @@ -609,7 +610,7 @@ void status_menu_stop_blinking_sp(void) { } void status_menu_start_blinking_sp_bars(s8 numBarsToBlink) { - ui_status* uiStatus = &gUIStatus; + UiStatus* uiStatus = &gUIStatus; uiStatus->spBarsToBlink = numBarsToBlink; if (uiStatus->spBlinking != 1) { @@ -619,7 +620,7 @@ void status_menu_start_blinking_sp_bars(s8 numBarsToBlink) { } void status_menu_start_blinking_starpoints(void) { - ui_status* uiStatus = &gUIStatus; + UiStatus* uiStatus = &gUIStatus; if (uiStatus->starpointsBlinking != 1) { uiStatus->starpointsBlinking = 1; @@ -628,7 +629,7 @@ void status_menu_start_blinking_starpoints(void) { } void status_menu_stop_blinking_starpoints(void) { - ui_status* uiStatus = &gUIStatus; + UiStatus* uiStatus = &gUIStatus; if (uiStatus->starpointsBlinking != 0) { uiStatus->starpointsBlinking = 0; @@ -637,7 +638,7 @@ void status_menu_stop_blinking_starpoints(void) { } void decrement_status_menu_disabled(void) { - ui_status* uiStatus = &gUIStatus; + UiStatus* uiStatus = &gUIStatus; if (uiStatus->disabled > 0) { uiStatus->disabled--; @@ -645,14 +646,14 @@ void decrement_status_menu_disabled(void) { } void increment_status_menu_disabled(void) { - ui_status* uiStatus = &gUIStatus; + UiStatus* uiStatus = &gUIStatus; uiStatus->disabled++; } void sync_status_menu(void) { - player_data* playerData = &gPlayerData; - ui_status* uiStatus = &gUIStatus; + PlayerData* playerData = &gPlayerData; + UiStatus* uiStatus = &gUIStatus; uiStatus->displayHP = playerData->curHP; uiStatus->displayFP = playerData->curFP; @@ -662,8 +663,8 @@ void sync_status_menu(void) { } void reset_status_menu(void) { - player_data* playerData = &gPlayerData; - ui_status* uiStatus = &gUIStatus; + PlayerData* playerData = &gPlayerData; + UiStatus* uiStatus = &gUIStatus; s32 i; uiStatus->drawPosX = 12; @@ -703,7 +704,7 @@ void reset_status_menu(void) { for (i = 0; i < 2; i++) { func_801452B4(uiStatus->fpIconIndexes[i], uiStatus->fpIconIndexes[i]); } - + func_801452B4(uiStatus->coinIconIndex, uiStatus->coinIconIndex); func_801452B4(uiStatus->coinIconIndex2, uiStatus->coinIconIndex2); func_801452B4(uiStatus->starpointsIconIndex, uiStatus->starpointsIconIndex); @@ -971,7 +972,7 @@ s32 is_partner_ability_active(void) { } s16 add_coins(s32 amt) { - player_data* playerData = &gPlayerData; + PlayerData* playerData = &gPlayerData; s16 newCoins = playerData->coins + amt; playerData->coins = newCoins; @@ -992,8 +993,8 @@ s16 add_coins(s32 amt) { } s8 add_star_points(s32 amt) { - player_data* playerData = &gPlayerData; - player_data* playerData2 = &gPlayerData; + PlayerData* playerData = &gPlayerData; + PlayerData* playerData2 = &gPlayerData; s8 newSP = playerData->starPoints + amt; // TODO: probably a macro! @@ -1011,8 +1012,8 @@ s8 add_star_points(s32 amt) { } u8 add_star_pieces(s32 amt) { - player_data* playerData = &gPlayerData; - player_data* playerData2 = &gPlayerData; + PlayerData* playerData = &gPlayerData; + PlayerData* playerData2 = &gPlayerData; s32 newSP = playerData->starPieces; newSP += amt; @@ -1032,24 +1033,24 @@ u8 add_star_pieces(s32 amt) { } void increment_max_SP() { - player_data* playerData = &gPlayerData; + PlayerData* playerData = &gPlayerData; playerData->maxStarPower++; playerData->specialBarsFilled = playerData->maxStarPower * 256; } void set_max_SP(s8 newMaxSP) { - player_data* playerData = &gPlayerData; + PlayerData* playerData = &gPlayerData; playerData->maxStarPower = newMaxSP; playerData->specialBarsFilled = newMaxSP * 256; } void add_SP(s32 amt) { - player_data* playerData = &gPlayerData; - player_data* playerData2 = &gPlayerData; - ui_status* uiStatus = &gUIStatus; - ui_status* uiStatus2 = &gUIStatus; + PlayerData* playerData = &gPlayerData; + PlayerData* playerData2 = &gPlayerData; + UiStatus* uiStatus = &gUIStatus; + UiStatus* uiStatus2 = &gUIStatus; s32 phi_v1; s32 blah; @@ -1073,7 +1074,7 @@ void add_SP(s32 amt) { } s32 recover_fp(s32 amt) { - player_data* playerData = &gPlayerData; + PlayerData* playerData = &gPlayerData; s32 newFP = playerData->curFP; s32 ret; @@ -1095,7 +1096,7 @@ s32 recover_fp(s32 amt) { } s32 recover_hp(s32 amt) { - player_data* playerData = &gPlayerData; + PlayerData* playerData = &gPlayerData; s32 newHP = playerData->curHP; s32 ret; @@ -1117,7 +1118,7 @@ s32 recover_hp(s32 amt) { } void subtract_hp(s32 amt) { - player_data* playerData = &gPlayerData; + PlayerData* playerData = &gPlayerData; s32 newHP = playerData->curHP; if (amt > 0) { @@ -1130,27 +1131,27 @@ void subtract_hp(s32 amt) { } s8 has_full_hp(void) { - player_data* playerData = &gPlayerData; + PlayerData* playerData = &gPlayerData; return playerData->curMaxHP == playerData->curHP; } s8 has_full_fp(void) { - player_data* playerData = &gPlayerData; + PlayerData* playerData = &gPlayerData; return playerData->curMaxFP == playerData->curFP; } s8 add_fortress_keys(s32 amt) { - player_data* playerData = &gPlayerData; + PlayerData* playerData = &gPlayerData; playerData->fortressKeyCount += amt; return playerData->fortressKeyCount; } s8 subtract_fortress_keys(s8 amt) { - player_data* playerData = &gPlayerData; - player_data* playerData2 = &gPlayerData; // required to match + PlayerData* playerData = &gPlayerData; + PlayerData* playerData2 = &gPlayerData; // required to match playerData->fortressKeyCount -= amt; if (playerData->fortressKeyCount < 0) { diff --git a/src/code_8230_len_1ae0.c b/src/code_8230_len_1ae0.c index 73a2823d77..9c87e65a98 100644 --- a/src/code_8230_len_1ae0.c +++ b/src/code_8230_len_1ae0.c @@ -1,14 +1,14 @@ #include "common.h" -INCLUDE_ASM(code_8230_len_1ae0, nuSiMgrInit); +INCLUDE_API_ASM(code_8230_len_1ae0, nuSiMgrInit); -INCLUDE_ASM(code_8230_len_1ae0, nuSiSendMesg); +INCLUDE_API_ASM(code_8230_len_1ae0, nuSiSendMesg); -INCLUDE_ASM(code_8230_len_1ae0, nuSiMgrStop); +INCLUDE_API_ASM(code_8230_len_1ae0, nuSiMgrStop); -INCLUDE_ASM(code_8230_len_1ae0, nuSiMgrRestart); +INCLUDE_API_ASM(code_8230_len_1ae0, nuSiMgrRestart); -INCLUDE_ASM(code_8230_len_1ae0, nuSiMgrThread); +INCLUDE_API_ASM(code_8230_len_1ae0, nuSiMgrThread); INCLUDE_ASM(code_8230_len_1ae0, func_8002D160); diff --git a/src/code_a5dd0_len_114e0.c b/src/code_a5dd0_len_114e0.c index 040f574b44..519450b452 100644 --- a/src/code_a5dd0_len_114e0.c +++ b/src/code_a5dd0_len_114e0.c @@ -72,19 +72,19 @@ INCLUDE_ASM(code_a5dd0_len_114e0, create_entity); INCLUDE_ASM(code_a5dd0_len_114e0, create_shadow_from_data); -INCLUDE_ASM(code_a5dd0_len_114e0, MakeEntity); +INCLUDE_API_ASM(code_a5dd0_len_114e0, MakeEntity); -INCLUDE_ASM(code_a5dd0_len_114e0, AssignScript); +INCLUDE_API_ASM(code_a5dd0_len_114e0, AssignScript); -INCLUDE_ASM(code_a5dd0_len_114e0, AssignAreaFlag); +INCLUDE_API_ASM(code_a5dd0_len_114e0, AssignAreaFlag); -INCLUDE_ASM(code_a5dd0_len_114e0, AssignBlockFlag); +INCLUDE_API_ASM(code_a5dd0_len_114e0, AssignBlockFlag); -INCLUDE_ASM(code_a5dd0_len_114e0, AssignFlag); +INCLUDE_API_ASM(code_a5dd0_len_114e0, AssignFlag); -INCLUDE_ASM(code_a5dd0_len_114e0, AssignPanelFlag); +INCLUDE_API_ASM(code_a5dd0_len_114e0, AssignPanelFlag); -INCLUDE_ASM(code_a5dd0_len_114e0, AssignCrateFlag); +INCLUDE_API_ASM(code_a5dd0_len_114e0, AssignCrateFlag); INCLUDE_ASM(code_a5dd0_len_114e0, create_entity_shadow); diff --git a/src/code_dbd70_len_700.c b/src/code_dbd70_len_700.c index cd72a4a5a5..611869fbc6 100644 --- a/src/code_dbd70_len_700.c +++ b/src/code_dbd70_len_700.c @@ -23,7 +23,7 @@ INCLUDE_ASM(code_dbd70_len_700, create_trigger); INCLUDE_ASM(code_dbd70_len_700, update_triggers); -void delete_trigger(trigger* toDelete) { +void delete_trigger(Trigger* toDelete) { s32 i; for (i = 0; i < ARRAY_COUNT(gCurrentTriggerListPtr); i++) { @@ -41,7 +41,7 @@ void delete_trigger(trigger* toDelete) { INCLUDE_ASM(code_dbd70_len_700, is_trigger_bound); //INCLUDE_ASM(code_dbd70_len_700, get_trigger_by_id); -trigger* get_trigger_by_id(s32 triggerID) { +Trigger* get_trigger_by_id(s32 triggerID) { return (*gCurrentTriggerListPtr)[triggerID]; } @@ -55,7 +55,7 @@ INCLUDE_ASM(code_dbd70_len_700, func_80145CE8); } for (i = 0; i < ARRAY_COUNT(gCurrentTriggerListPtr); i++) { - if (((*gCurrentTriggerListPtr)[i] == NULL) || + if (((*gCurrentTriggerListPtr)[i] == NULL) || ((*gCurrentTriggerListPtr)[i]->unk_30 == 0) || ((*gCurrentTriggerListPtr)[i]->colliderID != arg0) || ((*gCurrentTriggerListPtr)[i]->genericFlagIndex & 0x100) == 0) { diff --git a/src/code_dc470_len_14c0.c b/src/code_dc470_len_14c0.c index d1c4fe95de..e5aa5608d6 100644 --- a/src/code_dc470_len_14c0.c +++ b/src/code_dc470_len_14c0.c @@ -23,16 +23,16 @@ void load_map_bg(char* optAssetName) { } void func_80145DF8(void) { - game_status* gameStatus = *gGameStatusPtr; + GameStatus* gameStatus = *gGameStatusPtr; D_801595A0 = 0; D_8014F12F = 0; - + gameStatus->unk_15C = 0xB4; gameStatus->enableBackground &= 0xF0; } -void read_background_size(bg_header *bg) { - game_status* gameStatus = *gGameStatusPtr; +void read_background_size(BackgroundHeader *bg) { + GameStatus* gameStatus = *gGameStatusPtr; gameStatus->backgroundMaxW = bg->width; gameStatus->backgroundMaxH = bg->height; @@ -44,7 +44,7 @@ void read_background_size(bg_header *bg) { } void set_background_size(s16 startX, s16 startY, s16 sizeX, s16 sizeY) { - game_status* gameStatus = *gGameStatusPtr; + GameStatus* gameStatus = *gGameStatusPtr; gameStatus->enableBackground &= ~1; gameStatus->backgroundMaxW = startX; diff --git a/src/code_e79b0_len_1920.c b/src/code_e79b0_len_1920.c index 3381f98ad5..a0574c6b70 100644 --- a/src/code_e79b0_len_1920.c +++ b/src/code_e79b0_len_1920.c @@ -21,7 +21,7 @@ INCLUDE_ASM(code_e79b0_len_1920, func_802C39F8); INCLUDE_ASM(code_e79b0_len_1920, restart_script); // TODO: Find out why things break when script->timeScale = 1 goes after the previous lines /* -script_context* restart_script(script_context* script) { +ScriptInstance* restart_script(ScriptInstance* script) { script->loopDepth = -1; script->switchDepth = -1; script->currentOpcode = 0; @@ -50,7 +50,7 @@ INCLUDE_ASM(code_e79b0_len_1920, kill_script); void* kill_script_by_ID(s32 id) { s32 i; - script_context* scriptContextPtr; + ScriptInstance* scriptContextPtr; for (i = 0; i < ARRAY_COUNT(gCurrentScriptListPtr); i++) { scriptContextPtr = (*gCurrentScriptListPtr)[i]; @@ -62,7 +62,7 @@ void* kill_script_by_ID(s32 id) { s32 kill_all_scripts(void) { s32 i; - script_context* scriptContextPtr; + ScriptInstance* scriptContextPtr; for(i = 0; i < ARRAY_COUNT(gCurrentScriptListPtr); i++) { scriptContextPtr = (*gCurrentScriptListPtr)[i]; @@ -75,7 +75,7 @@ s32 kill_all_scripts(void) { s32 does_script_exist(s32 id) { s32 i; - script_context* scriptContextPtr; + ScriptInstance* scriptContextPtr; for(i = 0; i < ARRAY_COUNT(gCurrentScriptListPtr); i++) { scriptContextPtr = (*gCurrentScriptListPtr)[i]; @@ -86,7 +86,7 @@ s32 does_script_exist(s32 id) { return 0; } -s32 does_script_exist_by_ref(script_context* script) { +s32 does_script_exist_by_ref(ScriptInstance* script) { s32 i; for(i = 0; i < ARRAY_COUNT(gCurrentScriptListPtr); i++) { @@ -97,11 +97,11 @@ s32 does_script_exist_by_ref(script_context* script) { return 0; } -void set_script_priority(script_context* script, s8 priority) { +void set_script_priority(ScriptInstance* script, s8 priority) { script->priority = priority; } -void set_script_timescale(script_context* script, f32 timeScale) { +void set_script_timescale(ScriptInstance* script, f32 timeScale) { script->timeScale = timeScale * gGlobalTimeSpace; } @@ -122,7 +122,7 @@ f32 get_global_timespace(void) { } */ -void set_script_group(script_context* script, s8 groupFlags) { +void set_script_group(ScriptInstance* script, s8 groupFlags) { script->groupFlags = groupFlags; } @@ -130,10 +130,10 @@ INCLUDE_ASM(code_e79b0_len_1920, bind_trigger); INCLUDE_ASM(code_e79b0_len_1920, bind_trigger_1); -void suspend_group_script(script_context* script, s32 groupFlags) { +void suspend_group_script(ScriptInstance* script, s32 groupFlags) { int i; - script_context* scriptContextPtr; - script_context* childScript = script->childScript; + ScriptInstance* scriptContextPtr; + ScriptInstance* childScript = script->childScript; if (childScript != NULL) { suspend_group_script(childScript, groupFlags); @@ -151,10 +151,10 @@ void suspend_group_script(script_context* script, s32 groupFlags) { } } -void resume_group_script(script_context* script, s32 groupFlags) { +void resume_group_script(ScriptInstance* script, s32 groupFlags) { int i; - script_context* scriptContextPtr; - script_context* childScript = script->childScript; + ScriptInstance* scriptContextPtr; + ScriptInstance* childScript = script->childScript; if (childScript != NULL) { resume_group_script(childScript, groupFlags); @@ -174,7 +174,7 @@ void resume_group_script(script_context* script, s32 groupFlags) { s32 suspend_all_script(s32 id) { s32 i; - script_context* scriptContextPtr; + ScriptInstance* scriptContextPtr; for (i = 0; i < ARRAY_COUNT(gCurrentScriptListPtr); i++) { scriptContextPtr = (*gCurrentScriptListPtr)[i]; @@ -186,7 +186,7 @@ s32 suspend_all_script(s32 id) { s32 resume_all_script(s32 id) { s32 i; - script_context* scriptContextPtr; + ScriptInstance* scriptContextPtr; for (i = 0; i < ARRAY_COUNT(gCurrentScriptListPtr); i++) { scriptContextPtr = (*gCurrentScriptListPtr)[i]; @@ -198,7 +198,7 @@ s32 resume_all_script(s32 id) { void suspend_group_script_index(s32 id, s32 groupFlags) { s32 i; - script_context* scriptContextPtr; + ScriptInstance* scriptContextPtr; for (i = 0; i < ARRAY_COUNT(gCurrentScriptListPtr); i++) { scriptContextPtr = (*gCurrentScriptListPtr)[i]; @@ -210,7 +210,7 @@ void suspend_group_script_index(s32 id, s32 groupFlags) { void resume_group_script_index(s32 id, s32 groupFlags) { s32 i; - script_context* scriptContextPtr; + ScriptInstance* scriptContextPtr; for (i = 0; i < ARRAY_COUNT(gCurrentScriptListPtr); i++) { scriptContextPtr = (*gCurrentScriptListPtr)[i]; @@ -222,7 +222,7 @@ void resume_group_script_index(s32 id, s32 groupFlags) { s32 suspend_all_group(s32 groupFlags) { s32 i; - script_context* scriptContextPtr; + ScriptInstance* scriptContextPtr; for (i = 0; i < ARRAY_COUNT(gCurrentScriptListPtr); i++) { scriptContextPtr = (*gCurrentScriptListPtr)[i]; @@ -234,7 +234,7 @@ s32 suspend_all_group(s32 groupFlags) { s32 resume_all_group(s32 groupFlags) { s32 i; - script_context* scriptContextPtr; + ScriptInstance* scriptContextPtr; for (i = 0; i < ARRAY_COUNT(gCurrentScriptListPtr); i++) { scriptContextPtr = (*gCurrentScriptListPtr)[i]; @@ -247,7 +247,7 @@ s32 resume_all_group(s32 groupFlags) { void suspend_group_others(s32 script, s32 groupFlags) { s32 i; - script_context* scriptContextPtr; + ScriptInstance* scriptContextPtr; for (i = 0; i < ARRAY_COUNT(gCurrentScriptListPtr); i++) { scriptContextPtr = (*gCurrentScriptListPtr)[i]; @@ -259,7 +259,7 @@ void suspend_group_others(s32 script, s32 groupFlags) { void resume_group_others(s32 script, s32 groupFlags) { s32 i; - script_context* scriptContextPtr; + ScriptInstance* scriptContextPtr; for (i = 0; i < ARRAY_COUNT(gCurrentScriptListPtr); i++) { scriptContextPtr = (*gCurrentScriptListPtr)[i]; @@ -269,13 +269,13 @@ void resume_group_others(s32 script, s32 groupFlags) { } } -script_context* get_script_by_index(s32 index) { +ScriptInstance* get_script_by_index(s32 index) { return (*gCurrentScriptListPtr)[index]; } -script_context* get_script_by_id(s32 id) { +ScriptInstance* get_script_by_id(s32 id) { s32 i; - script_context* scriptContextPtr; + ScriptInstance* scriptContextPtr; for (i = 0; i < ARRAY_COUNT(gCurrentScriptListPtr); i++) { if ((*gCurrentScriptListPtr)[i] != NULL) { @@ -288,10 +288,10 @@ script_context* get_script_by_id(s32 id) { return 0; } -void set_script_flags(script_context* script, s32 flags) { +void set_script_flags(ScriptInstance* script, s32 flags) { int i; - script_context* scriptContextPtr; - script_context* childScript = script->childScript; + ScriptInstance* scriptContextPtr; + ScriptInstance* childScript = script->childScript; script->state |= flags; if (childScript != NULL) { @@ -309,10 +309,10 @@ void set_script_flags(script_context* script, s32 flags) { INCLUDE_ASM(code_e79b0_len_1920, clear_script_flags); /* // TODO: Really close but some weirdness is going on -void clear_script_flags(script_context* script, s32 flags) { +void clear_script_flags(ScriptInstance* script, s32 flags) { int i; - script_context* scriptContextPtr; - script_context* childScript = script->childScript; + ScriptInstance* scriptContextPtr; + ScriptInstance* childScript = script->childScript; script->state &= ~flags; if (childScript != NULL) { diff --git a/src/code_e92d0_len_5da0.c b/src/code_e92d0_len_5da0.c index be7d124206..042b58aff3 100644 --- a/src/code_e92d0_len_5da0.c +++ b/src/code_e92d0_len_5da0.c @@ -13,31 +13,31 @@ INCLUDE_ASM(code_e92d0_len_5da0, float_to_fixed_var); return (s32)(arg0 * (f32)1024.0f) + -230000000; }*/ -s32 si_handle_return(script_context* script) { +ApiStatus si_handle_return(ScriptInstance* script) { kill_script(script); - return 255; + return ApiStatus_FINISH; } -s32 si_handle_label(script_context* script) { - return 2; +ApiStatus si_handle_label(ScriptInstance* script) { + return ApiStatus_DONE2; } -s32 si_handle_goto(script_context* script) { +ApiStatus si_handle_goto(ScriptInstance* script) { script->ptrNextLine = si_goto_label(script, get_variable(script, *script->ptrReadPos)); - return 2; + return ApiStatus_DONE2; } INCLUDE_ASM(code_e92d0_len_5da0, si_handle_Loop); INCLUDE_ASM(code_e92d0_len_5da0, si_handle_end_loop); -s32 si_handle_break_loop(script_context* script) { +ApiStatus si_handle_break_loop(ScriptInstance* script) { if (script->loopDepth < 0) { while (1) {}; // todo INF_LOOP } script->ptrNextLine = si_goto_end_loop(script); script->loopDepth -= 1; - return 2; + return ApiStatus_DONE2; } INCLUDE_ASM(code_e92d0_len_5da0, si_handle_wait); @@ -56,7 +56,7 @@ INCLUDE_ASM(code_e92d0_len_5da0, si_handle_if_less_equal); INCLUDE_ASM(code_e92d0_len_5da0, si_handle_if_greater_equal); -s32 si_handle_if_AND(script_context* script) { +ApiStatus si_handle_if_AND(ScriptInstance* script) { s32 var1; s32 *ptrReadPos = script->ptrReadPos; @@ -65,13 +65,13 @@ s32 si_handle_if_AND(script_context* script) { if ((get_variable(script, var1) & *ptrReadPos) == 0) { script->ptrNextLine = si_skip_if(script); - return 2; + return ApiStatus_DONE2; } - return 2; + return ApiStatus_DONE2; } //INCLUDE_ASM(code_e92d0_len_5da0, si_handle_if_not_AND); -s32 si_handle_if_not_AND(script_context* script) { +ApiStatus si_handle_if_not_AND(ScriptInstance* script) { s32 var1; s32 *ptrReadPos = script->ptrReadPos; @@ -80,33 +80,33 @@ s32 si_handle_if_not_AND(script_context* script) { if ((get_variable(script, var1) & *ptrReadPos) != 0) { script->ptrNextLine = si_skip_if(script); - return 2; + return ApiStatus_DONE2; } - return 2; + return ApiStatus_DONE2; } -s32 si_handle_else(script_context* script) { +ApiStatus si_handle_else(ScriptInstance* script) { script->ptrNextLine = si_skip_else(script); - return 2; + return ApiStatus_DONE2; } -s32 si_handle_end_if(script_context* script) { - return 2; +ApiStatus si_handle_end_if(ScriptInstance* script) { + return ApiStatus_DONE2; } INCLUDE_ASM(code_e92d0_len_5da0, si_handle_switch); INCLUDE_ASM(code_e92d0_len_5da0, si_handle_switch_const); -/*s32 si_handle_switch_const(script_context* script) { +/*ApiStatus si_handle_switch_const(ScriptInstance* script) { s32 ptrReadPos = *script->ptrReadPos; s8 switchDepth = script->switchDepth + 1; - + if (switchDepth >= 8) { inf_loop: goto inf_loop; //todo } script->switchBlockValue[script->switchDepth + 1] = ptrReadPos; script->switchBlockState[script->switchDepth + 1] = 1; - return 2; + return ApiStatus_DONE2; }*/ INCLUDE_ASM(code_e92d0_len_5da0, si_handle_case_equal); @@ -133,46 +133,46 @@ INCLUDE_ASM(code_e92d0_len_5da0, si_handle_case_equal_AND); INCLUDE_ASM(code_e92d0_len_5da0, si_handle_end_case_group); -s32 si_handle_break_case(script_context* script) { +ApiStatus si_handle_break_case(ScriptInstance* script) { if (script->switchDepth < 0) { while (1) {}; //todo INF_LOOP } script->ptrNextLine = si_goto_end_case(script); - return 2; + return ApiStatus_DONE2; } -s32 si_handle_end_switch(script_context* script) { +ApiStatus si_handle_end_switch(ScriptInstance* script) { s32 switchDepth = script->switchDepth; - + if (switchDepth < 0) { inf_loop: goto inf_loop; // todo macro? how to do without label } script->switchBlockState[script->switchDepth] = 0; script->switchDepth -= 1; - return 2; + return ApiStatus_DONE2; } -s32 si_handle_set_var(script_context* script) { - s32* ptrReadPos = script->ptrReadPos; +ApiStatus si_handle_set_var(ScriptInstance* script) { + Bytecode* ptrReadPos = script->ptrReadPos; s32 curPtrReadPos = ptrReadPos[0]; set_variable(script, curPtrReadPos, get_variable(script, ptrReadPos[1])); - return 2; + return ApiStatus_DONE2; } -s32 si_handle_set_const(script_context* script) { +ApiStatus si_handle_set_const(ScriptInstance* script) { set_variable(script, *script->ptrReadPos, script->ptrReadPos[1]); - return 2; + return ApiStatus_DONE2; } -s32 si_handle_set_float(script_context* script) { - s32* ptrReadPos = script->ptrReadPos; +ApiStatus si_handle_set_float(ScriptInstance* script) { + Bytecode* ptrReadPos = script->ptrReadPos; s32 curPtrReadPos = ptrReadPos[0]; set_float_variable(script, curPtrReadPos, get_float_variable(script, ptrReadPos[1])); - return 2; + return ApiStatus_DONE2; } INCLUDE_ASM(code_e92d0_len_5da0, si_handle_add); @@ -193,22 +193,22 @@ INCLUDE_ASM(code_e92d0_len_5da0, si_handle_multiplyF); INCLUDE_ASM(code_e92d0_len_5da0, si_handle_divideF); -s32 si_handle_set_int_buffer_ptr(script_context* script) { +ApiStatus si_handle_set_int_buffer_ptr(ScriptInstance* script) { script->buffer = get_variable(script, *script->ptrReadPos); - return 2; + return ApiStatus_DONE2; } -s32 si_handle_set_float_buffer_ptr(script_context* script) { +ApiStatus si_handle_set_float_buffer_ptr(ScriptInstance* script) { script->buffer = get_variable(script, *script->ptrReadPos); - return 2; + return ApiStatus_DONE2; } -s32 si_handle_get_1_word(script_context* script) { +ApiStatus si_handle_get_1_word(ScriptInstance* script) { s32 ptrReadPos = *script->ptrReadPos; s32 buffer = *script->buffer++; set_variable(script, ptrReadPos, buffer); - return 2; + return ApiStatus_DONE2; } INCLUDE_ASM(code_e92d0_len_5da0, si_handle_get_2_word); @@ -217,12 +217,12 @@ INCLUDE_ASM(code_e92d0_len_5da0, si_handle_get_3_word); INCLUDE_ASM(code_e92d0_len_5da0, si_handle_get_4_word); -s32 si_handle_get_Nth_word(script_context* script) { - s32* ptrReadPos = script->ptrReadPos; +ApiStatus si_handle_get_Nth_word(ScriptInstance* script) { + Bytecode* ptrReadPos = script->ptrReadPos; s32 curPtrReadPos = ptrReadPos[0]; set_variable(script, curPtrReadPos, script->buffer[get_variable(script, ptrReadPos[1])]); - return 2; + return ApiStatus_DONE2; } INCLUDE_ASM(code_e92d0_len_5da0, si_handle_get_1_float); @@ -235,14 +235,14 @@ INCLUDE_ASM(code_e92d0_len_5da0, si_handle_get_4_float); INCLUDE_ASM(code_e92d0_len_5da0, si_handle_get_Nth_float); -s32 si_handle_set_array(script_context* script) { +ApiStatus si_handle_set_array(ScriptInstance* script) { script->array = get_variable(script, *script->ptrReadPos); - return 2; + return ApiStatus_DONE2; } -s32 si_handle_set_flag_array(script_context* script) { +ApiStatus si_handle_set_flag_array(ScriptInstance* script) { script->flagArray = get_variable(script, *script->ptrReadPos); - return 2; + return ApiStatus_DONE2; } INCLUDE_ASM(code_e92d0_len_5da0, si_handle_allocate_array); @@ -250,8 +250,8 @@ INCLUDE_ASM(code_e92d0_len_5da0, si_handle_allocate_array); INCLUDE_ASM(code_e92d0_len_5da0, si_handle_AND); //INCLUDE_ASM(code_e92d0_len_5da0, si_handle_AND_const); -s32 si_handle_AND_const(script_context* script) { - s32* ptrReadPos = script->ptrReadPos; +ApiStatus si_handle_AND_const(ScriptInstance* script) { + Bytecode* ptrReadPos = script->ptrReadPos; // todo ??? s32 temp_s0 = ptrReadPos[0]; s32 temp_s2 = ptrReadPos[0]; @@ -259,14 +259,14 @@ s32 si_handle_AND_const(script_context* script) { temp_s0 = ptrReadPos[1]; // end todo set_variable(script, temp_s2, temp_s0 & get_variable(script, temp_s2)); - return 2; + return ApiStatus_DONE2; } INCLUDE_ASM(code_e92d0_len_5da0, si_handle_OR); //INCLUDE_ASM(code_e92d0_len_5da0, si_handle_OR_const); -s32 si_handle_OR_const(script_context* script) { - s32* ptrReadPos = script->ptrReadPos; +ApiStatus si_handle_OR_const(ScriptInstance* script) { + Bytecode* ptrReadPos = script->ptrReadPos; // todo ??? s32 temp_s0 = ptrReadPos[0]; s32 temp_s2 = ptrReadPos[0]; @@ -274,7 +274,7 @@ s32 si_handle_OR_const(script_context* script) { temp_s0 = ptrReadPos[1]; // end todo set_variable(script, temp_s2, temp_s0 | get_variable(script, temp_s2)); - return 2; + return ApiStatus_DONE2; } INCLUDE_ASM(code_e92d0_len_5da0, si_handle_call); @@ -283,116 +283,116 @@ INCLUDE_ASM(code_e92d0_len_5da0, si_handle_exec1); INCLUDE_ASM(code_e92d0_len_5da0, si_handle_exec2); -s32 si_handle_exec_wait(script_context* script) { +ApiStatus si_handle_exec_wait(ScriptInstance* script) { start_child_script(script, get_variable(script, *script->ptrReadPos), 0); script->currentOpcode = 0; return 0xFF; } -s32 si_handle_jump(script_context* script) { +ApiStatus si_handle_jump(ScriptInstance* script) { script->ptrFirstLine = get_variable(script, *script->ptrReadPos); restart_script(script); - return 2; + return ApiStatus_DONE2; } INCLUDE_ASM(code_e92d0_len_5da0, _bound_script_trigger_handler); INCLUDE_ASM(code_e92d0_len_5da0, si_handle_bind); -s32 DeleteTrigger(script_context* script) { +ApiStatus DeleteTrigger(ScriptInstance* script, s32 isInitialCall) { delete_trigger(get_variable(script, *script->ptrReadPos)); - return 2; + return ApiStatus_DONE2; } -s32 si_handle_unbind(script_context* script) { +ApiStatus si_handle_unbind(ScriptInstance* script) { delete_trigger(script->ownerID); - return 2; + return ApiStatus_DONE2; } -s32 si_handle_kill(script_context* script) { +ApiStatus si_handle_kill(ScriptInstance* script) { kill_script_by_ID(get_variable(script, *script->ptrReadPos)); - return 2; + return ApiStatus_DONE2; } -s32 si_handle_set_priority(script_context* script) { +ApiStatus si_handle_set_priority(ScriptInstance* script) { set_script_priority(script, get_variable(script, *script->ptrReadPos)); - return 2; + return ApiStatus_DONE2; } -s32 si_handle_set_timescale(script_context* script) { +ApiStatus si_handle_set_timescale(ScriptInstance* script) { set_script_timescale(script, get_float_variable(script, *script->ptrReadPos)); - return 2; + return ApiStatus_DONE2; } -s32 si_handle_set_group(script_context* script) { +ApiStatus si_handle_set_group(ScriptInstance* script) { set_script_group(script, get_variable(script, *script->ptrReadPos)); - return 2; + return ApiStatus_DONE2; } -s32 si_handle_suspend_all(script_context* script) { +ApiStatus si_handle_suspend_all(ScriptInstance* script) { suspend_all_group(get_variable(script, *script->ptrReadPos)); - return 2; + return ApiStatus_DONE2; } -s32 si_handle_resume_all(script_context* script) { +ApiStatus si_handle_resume_all(ScriptInstance* script) { resume_all_group(get_variable(script, *script->ptrReadPos)); - return 2; + return ApiStatus_DONE2; } -s32 si_handle_suspend_others(script_context* script) { +ApiStatus si_handle_suspend_others(ScriptInstance* script) { suspend_group_others(script, get_variable(script, *script->ptrReadPos)); - return 2; + return ApiStatus_DONE2; } -s32 si_handle_resume_others(script_context* script) { +ApiStatus si_handle_resume_others(ScriptInstance* script) { resume_group_others(script, get_variable(script, *script->ptrReadPos)); - return 2; + return ApiStatus_DONE2; } -s32 si_handle_suspend(script_context* script) { +ApiStatus si_handle_suspend(ScriptInstance* script) { suspend_all_script(get_variable(script, *script->ptrReadPos)); - return 2; + return ApiStatus_DONE2; } -s32 si_handle_resume(script_context* script) { +ApiStatus si_handle_resume(ScriptInstance* script) { resume_all_script(get_variable(script, *script->ptrReadPos)); - return 2; + return ApiStatus_DONE2; } -INCLUDE_ASM(code_e92d0_len_5da0, si_handle_does_script_exist); +ApiStatus INCLUDE_ASM(code_e92d0_len_5da0, si_handle_does_script_exist); -INCLUDE_ASM(code_e92d0_len_5da0, si_handle_bind_lock); +ApiStatus INCLUDE_ASM(code_e92d0_len_5da0, si_handle_bind_lock); -INCLUDE_ASM(code_e92d0_len_5da0, si_handle_thread); +ApiStatus INCLUDE_ASM(code_e92d0_len_5da0, si_handle_thread); -s32 si_handle_end_thread(script_context* script) { +ApiStatus si_handle_end_thread(ScriptInstance* script) { kill_script(script); - return 255; + return ApiStatus_FINISH; } -INCLUDE_ASM(code_e92d0_len_5da0, si_handle_child_thread); +ApiStatus INCLUDE_ASM(code_e92d0_len_5da0, si_handle_child_thread); -s32 si_handle_end_child_thread(script_context* script) { +ApiStatus si_handle_end_child_thread(ScriptInstance* script) { kill_script(script); - return 0; + return ApiStatus_BLOCK; } -s32 func_802C6E14(script_context* script) { - return 2; +ApiStatus func_802C6E14(ScriptInstance* script) { + return ApiStatus_DONE2; } -INCLUDE_ASM(code_e92d0_len_5da0, si_handle_print_debug_var); +ApiStatus INCLUDE_ASM(code_e92d0_len_5da0, si_handle_print_debug_var); -s32 func_802C739C(script_context* script) { +ApiStatus func_802C739C(ScriptInstance* script) { script->ptrSavedPosition = *script->ptrReadPos; - return 2; + return ApiStatus_DONE2; } -s32 func_802C73B0(script_context* script) { - return 2; +ApiStatus func_802C73B0(ScriptInstance* script) { + return ApiStatus_DONE2; } -s32 func_802C73B8(script_context* script) { +s32 func_802C73B8(ScriptInstance* script) { s32 i; for (i = 0; i < ARRAY_COUNT(gCurrentScriptListPtr); i++) { @@ -407,17 +407,17 @@ INCLUDE_ASM(code_e92d0_len_5da0, si_execute_next_command); INCLUDE_ASM(code_e92d0_len_5da0, si_handle_end); -s32 INCLUDE_ASM(code_e92d0_len_5da0, get_variable, script_context* script, bytecode var); +s32 INCLUDE_ASM(code_e92d0_len_5da0, get_variable, ScriptInstance* script, Bytecode var); INCLUDE_ASM(code_e92d0_len_5da0, get_variable_index); INCLUDE_ASM(code_e92d0_len_5da0, get_variable_index_alt); -s32 INCLUDE_ASM(code_e92d0_len_5da0, set_variable, script_context* script, bytecode var, s32 value); +s32 INCLUDE_ASM(code_e92d0_len_5da0, set_variable, ScriptInstance* script, Bytecode var, s32 value); -f32 INCLUDE_ASM(code_e92d0_len_5da0, get_float_variable, script_context* script, bytecode var); +f32 INCLUDE_ASM(code_e92d0_len_5da0, get_float_variable, ScriptInstance* script, Bytecode var); -f32 INCLUDE_ASM(code_e92d0_len_5da0, set_float_variable, script_context* script, bytecode var, f32 value); +f32 INCLUDE_ASM(code_e92d0_len_5da0, set_float_variable, ScriptInstance* script, Bytecode var, f32 value); INCLUDE_ASM(code_e92d0_len_5da0, si_goto_label); @@ -431,100 +431,100 @@ INCLUDE_ASM(code_e92d0_len_5da0, si_goto_next_case); INCLUDE_ASM(code_e92d0_len_5da0, si_goto_end_loop); -INCLUDE_ASM(code_e92d0_len_5da0, TranslateModel); +INCLUDE_API_ASM(code_e92d0_len_5da0, TranslateModel); -INCLUDE_ASM(code_e92d0_len_5da0, RotateModel); +INCLUDE_API_ASM(code_e92d0_len_5da0, RotateModel); -INCLUDE_ASM(code_e92d0_len_5da0, ScaleModel); +INCLUDE_API_ASM(code_e92d0_len_5da0, ScaleModel); -INCLUDE_ASM(code_e92d0_len_5da0, GetModelIndex); +INCLUDE_API_ASM(code_e92d0_len_5da0, GetModelIndex); -s32 CloneModel(script_context* script) { - s32* thisPos = script->ptrReadPos; +ApiStatus CloneModel(ScriptInstance* script, s32 isInitialCall) { + Bytecode* thisPos = script->ptrReadPos; s32 srcModelID = get_variable(script, *thisPos++); s32 newModelID = get_variable(script, *thisPos++); clone_model(srcModelID, newModelID); - return 2; + return ApiStatus_DONE2; } -INCLUDE_ASM(code_e92d0_len_5da0, GetModelCenter); +INCLUDE_API_ASM(code_e92d0_len_5da0, GetModelCenter); -INCLUDE_ASM(code_e92d0_len_5da0, SetTexPanner); +INCLUDE_API_ASM(code_e92d0_len_5da0, SetTexPanner); -INCLUDE_ASM(code_e92d0_len_5da0, SetModelFlag10); +INCLUDE_API_ASM(code_e92d0_len_5da0, SetModelFlag10); -INCLUDE_ASM(code_e92d0_len_5da0, EnableTexPanning); +INCLUDE_API_ASM(code_e92d0_len_5da0, EnableTexPanning); -INCLUDE_ASM(code_e92d0_len_5da0, EnableModel); +INCLUDE_API_ASM(code_e92d0_len_5da0, EnableModel); -INCLUDE_ASM(code_e92d0_len_5da0, SetGroupEnabled); +INCLUDE_API_ASM(code_e92d0_len_5da0, SetGroupEnabled); -INCLUDE_ASM(code_e92d0_len_5da0, SetTexPanOffset); +INCLUDE_API_ASM(code_e92d0_len_5da0, SetTexPanOffset); -INCLUDE_ASM(code_e92d0_len_5da0, SetModelFlags); +INCLUDE_API_ASM(code_e92d0_len_5da0, SetModelFlags); INCLUDE_ASM(code_e92d0_len_5da0, func_802C95A0); -INCLUDE_ASM(code_e92d0_len_5da0, TranslateGroup); +INCLUDE_API_ASM(code_e92d0_len_5da0, TranslateGroup); -INCLUDE_ASM(code_e92d0_len_5da0, RotateGroup); +INCLUDE_API_ASM(code_e92d0_len_5da0, RotateGroup); -INCLUDE_ASM(code_e92d0_len_5da0, ScaleGroup); +INCLUDE_API_ASM(code_e92d0_len_5da0, ScaleGroup); -INCLUDE_ASM(code_e92d0_len_5da0, EnableGroup); +INCLUDE_API_ASM(code_e92d0_len_5da0, EnableGroup); INCLUDE_ASM(code_e92d0_len_5da0, modify_collider_family_flags); -INCLUDE_ASM(code_e92d0_len_5da0, ModifyColliderFlags); +INCLUDE_API_ASM(code_e92d0_len_5da0, ModifyColliderFlags); -INCLUDE_ASM(code_e92d0_len_5da0, ResetFromLava); +INCLUDE_API_ASM(code_e92d0_len_5da0, ResetFromLava); -INCLUDE_ASM(code_e92d0_len_5da0, GetColliderCenter); +INCLUDE_API_ASM(code_e92d0_len_5da0, GetColliderCenter); -INCLUDE_ASM(code_e92d0_len_5da0, ParentColliderToModel); +INCLUDE_API_ASM(code_e92d0_len_5da0, ParentColliderToModel); -s32 UpdateColliderTransform(script_context* script) { +ApiStatus UpdateColliderTransform(ScriptInstance* script, s32 isInitialCall) { update_collider_transform(get_variable(script, *script->ptrReadPos)); - return 2; + return ApiStatus_DONE2; } INCLUDE_ASM(code_e92d0_len_5da0, func_802CA1B8); INCLUDE_ASM(code_e92d0_len_5da0, goto_map); -s32 GotoMap(script_context* script) { +ApiStatus GotoMap(ScriptInstance* script, s32 isInitialCall) { goto_map(script, 0); - return 1; + return ApiStatus_DONE1; } -s32 GotoMapSpecial(script_context* script) { +ApiStatus GotoMapSpecial(ScriptInstance* script, s32 isInitialCall) { goto_map(script, 1); - return 1; + return ApiStatus_DONE1; } -s32 GotoMapByID(script_context* script) { +ApiStatus GotoMapByID(ScriptInstance* script, s32 isInitialCall) { goto_map(script, 2); - return 1; + return ApiStatus_DONE1; } -s32 GetEntryID(script_context* script) { +ApiStatus GetEntryID(ScriptInstance* script, s32 isInitialCall) { set_variable(script, *script->ptrReadPos, (*gGameStatusPtr)->entryID); - return 2; + return ApiStatus_DONE2; } -s32 GetMapID(script_context* script, s32 initialCall) { +ApiStatus GetMapID(ScriptInstance* script, s32 isInitialCall) { set_variable(script, *script->ptrReadPos, (*gGameStatusPtr)->mapID); - return 2; + return ApiStatus_DONE2; } -s32 GetLoadType(script_context* script, s32 initialCall) { +ApiStatus GetLoadType(ScriptInstance* script, s32 isInitialCall) { set_variable(script, *script->ptrReadPos, (*gGameStatusPtr)->loadType != 0); - return 2; + return ApiStatus_DONE2; } -INCLUDE_ASM(code_e92d0_len_5da0, SetRenderMode); +INCLUDE_API_ASM(code_e92d0_len_5da0, SetRenderMode); -INCLUDE_ASM(code_e92d0_len_5da0, PlaySoundAtModel); +INCLUDE_API_ASM(code_e92d0_len_5da0, PlaySoundAtModel); -INCLUDE_ASM(code_e92d0_len_5da0, PlaySoundAtCollider); +INCLUDE_API_ASM(code_e92d0_len_5da0, PlaySoundAtCollider); diff --git a/src/code_ebd0_len_6a0.c b/src/code_ebd0_len_6a0.c index 2de74dc149..36b348f471 100644 --- a/src/code_ebd0_len_6a0.c +++ b/src/code_ebd0_len_6a0.c @@ -1,13 +1,13 @@ #include "common.h" void func_800337D0(s16 new_alpha) { - game_status* gameStatus = *gGameStatusPtr; + GameStatus* gameStatus = *gGameStatusPtr; gameStatus->bootAlpha = new_alpha; } void func_800337E0(s16 arg0) { - game_status* gameStatus = *gGameStatusPtr; + GameStatus* gameStatus = *gGameStatusPtr; gameStatus->bootRed = arg0; gameStatus->bootGreen = arg0; @@ -15,7 +15,7 @@ void func_800337E0(s16 arg0) { } s16 func_800337F8(subtract_val) { - game_status* gameStatus = *gGameStatusPtr; + GameStatus* gameStatus = *gGameStatusPtr; if (gameStatus->bootAlpha != 0) { gameStatus->bootAlpha -= subtract_val; @@ -29,7 +29,7 @@ s16 func_800337F8(subtract_val) { } s16 func_80033830(add_val) { - game_status* gameStatus = *gGameStatusPtr; + GameStatus* gameStatus = *gGameStatusPtr; if (gameStatus->bootAlpha != 0xFF) { gameStatus->bootAlpha += add_val; diff --git a/src/code_ef070_len_3400.c b/src/code_ef070_len_3400.c index 593fa986b9..40b6184d64 100644 --- a/src/code_ef070_len_3400.c +++ b/src/code_ef070_len_3400.c @@ -1,86 +1,86 @@ #include "common.h" -INCLUDE_ASM(code_ef070_len_3400, SetCamEnabled); +INCLUDE_API_ASM(code_ef070_len_3400, SetCamEnabled); -INCLUDE_ASM(code_ef070_len_3400, SetCamFlag80); +INCLUDE_API_ASM(code_ef070_len_3400, SetCamFlag80); -INCLUDE_ASM(code_ef070_len_3400, SetCamPerspective); +INCLUDE_API_ASM(code_ef070_len_3400, SetCamPerspective); -INCLUDE_ASM(code_ef070_len_3400, SetCamViewport); +INCLUDE_API_ASM(code_ef070_len_3400, SetCamViewport); -INCLUDE_ASM(code_ef070_len_3400, SetCamBGColor); +INCLUDE_API_ASM(code_ef070_len_3400, SetCamBGColor); -INCLUDE_ASM(code_ef070_len_3400, SetCamTarget); +INCLUDE_API_ASM(code_ef070_len_3400, SetCamTarget); -INCLUDE_ASM(code_ef070_len_3400, ShakeCam); +INCLUDE_API_ASM(code_ef070_len_3400, ShakeCam); INCLUDE_ASM(code_ef070_len_3400, exec_ShakeCam1); INCLUDE_ASM(code_ef070_len_3400, exec_ShakeCamX); -INCLUDE_ASM(code_ef070_len_3400, SetCamLeadPlayer); +INCLUDE_API_ASM(code_ef070_len_3400, SetCamLeadPlayer); -INCLUDE_ASM(code_ef070_len_3400, PanToTarget); +INCLUDE_API_ASM(code_ef070_len_3400, PanToTarget); -INCLUDE_ASM(code_ef070_len_3400, UseSettingsFrom); +INCLUDE_API_ASM(code_ef070_len_3400, UseSettingsFrom); -INCLUDE_ASM(code_ef070_len_3400, LoadSettings); +INCLUDE_API_ASM(code_ef070_len_3400, LoadSettings); -INCLUDE_ASM(code_ef070_len_3400, SetCamType); +INCLUDE_API_ASM(code_ef070_len_3400, SetCamType); -INCLUDE_ASM(code_ef070_len_3400, SetCamPitch); +INCLUDE_API_ASM(code_ef070_len_3400, SetCamPitch); -INCLUDE_ASM(code_ef070_len_3400, SetCamDistance); +INCLUDE_API_ASM(code_ef070_len_3400, SetCamDistance); -INCLUDE_ASM(code_ef070_len_3400, SetCamPosA); +INCLUDE_API_ASM(code_ef070_len_3400, SetCamPosA); -INCLUDE_ASM(code_ef070_len_3400, SetCamPosB); +INCLUDE_API_ASM(code_ef070_len_3400, SetCamPosB); -INCLUDE_ASM(code_ef070_len_3400, SetCamPosC); +INCLUDE_API_ASM(code_ef070_len_3400, SetCamPosC); -INCLUDE_ASM(code_ef070_len_3400, SetPanTarget); +INCLUDE_API_ASM(code_ef070_len_3400, SetPanTarget); -INCLUDE_ASM(code_ef070_len_3400, SetCamSpeed); +INCLUDE_API_ASM(code_ef070_len_3400, SetCamSpeed); -INCLUDE_ASM(code_ef070_len_3400, GetCamType); +INCLUDE_API_ASM(code_ef070_len_3400, GetCamType); -INCLUDE_ASM(code_ef070_len_3400, GetCamPitch); +INCLUDE_API_ASM(code_ef070_len_3400, GetCamPitch); -INCLUDE_ASM(code_ef070_len_3400, GetCamDistance); +INCLUDE_API_ASM(code_ef070_len_3400, GetCamDistance); -INCLUDE_ASM(code_ef070_len_3400, GetCamPosA); +INCLUDE_API_ASM(code_ef070_len_3400, GetCamPosA); -INCLUDE_ASM(code_ef070_len_3400, GetCamPosB); +INCLUDE_API_ASM(code_ef070_len_3400, GetCamPosB); -INCLUDE_ASM(code_ef070_len_3400, GetCamPosC); +INCLUDE_API_ASM(code_ef070_len_3400, GetCamPosC); -INCLUDE_ASM(code_ef070_len_3400, GetCamPosition); +INCLUDE_API_ASM(code_ef070_len_3400, GetCamPosition); -INCLUDE_ASM(code_ef070_len_3400, WaitForCam); +INCLUDE_API_ASM(code_ef070_len_3400, WaitForCam); -INCLUDE_ASM(code_ef070_len_3400, SetCamProperties); +INCLUDE_API_ASM(code_ef070_len_3400, SetCamProperties); -INCLUDE_ASM(code_ef070_len_3400, AdjustCam); +INCLUDE_API_ASM(code_ef070_len_3400, AdjustCam); -INCLUDE_ASM(code_ef070_len_3400, ResetCam); +INCLUDE_API_ASM(code_ef070_len_3400, ResetCam); INCLUDE_ASM(code_ef070_len_3400, draw_anim_models); -INCLUDE_ASM(code_ef070_len_3400, LoadModelAnimation); +INCLUDE_API_ASM(code_ef070_len_3400, LoadModelAnimation); -INCLUDE_ASM(code_ef070_len_3400, PlayModelAnimation); +INCLUDE_API_ASM(code_ef070_len_3400, PlayModelAnimation); -INCLUDE_ASM(code_ef070_len_3400, ChangeModelAnimation); +INCLUDE_API_ASM(code_ef070_len_3400, ChangeModelAnimation); -INCLUDE_ASM(code_ef070_len_3400, SetAnimModelPosition); +INCLUDE_API_ASM(code_ef070_len_3400, SetAnimModelPosition); -INCLUDE_ASM(code_ef070_len_3400, GetAnimModelPosition); +INCLUDE_API_ASM(code_ef070_len_3400, GetAnimModelPosition); -INCLUDE_ASM(code_ef070_len_3400, AddAnimModelPosition); +INCLUDE_API_ASM(code_ef070_len_3400, AddAnimModelPosition); -INCLUDE_ASM(code_ef070_len_3400, SetAnimModelRotation); +INCLUDE_API_ASM(code_ef070_len_3400, SetAnimModelRotation); -INCLUDE_ASM(code_ef070_len_3400, SetAnimModelScale); +INCLUDE_API_ASM(code_ef070_len_3400, SetAnimModelScale); INCLUDE_ASM(code_ef070_len_3400, func_802CD4B4); diff --git a/src/code_f2470_len_27f0.c b/src/code_f2470_len_27f0.c index 263567dedf..df130c56d2 100644 --- a/src/code_f2470_len_27f0.c +++ b/src/code_f2470_len_27f0.c @@ -1,111 +1,111 @@ #include "common.h" -npc* resolve_npc(script_context* script, NPC npcID) { - if (npcID == NPC_SELF) { +Npc* resolve_npc(ScriptInstance* script, NpcId npcIdOrPtr) { + if (npcIdOrPtr == NpcId_SELF) { return get_npc_safe(script->ownerID); - } else if (npcID >= -270000000) { - return get_npc_safe(npcID); + } else if (npcIdOrPtr >= -270000000) { + return get_npc_safe(npcIdOrPtr); } else { - return (npc*) npcID; + return (Npc*) npcIdOrPtr; } } INCLUDE_ASM(code_f2470_len_27f0, set_npc_animation); -s32 DeleteNpc(script_context* script, s32 initialCall) { - bytecode* ptrReadPos = script->ptrReadPos; - npc* npcPtr = get_npc_unsafe(get_variable(script, *ptrReadPos++)); +ApiStatus DeleteNpc(ScriptInstance* script, s32 isInitialCall) { + Bytecode* ptrReadPos = script->ptrReadPos; + Npc* npcPtr = get_npc_unsafe(get_variable(script, *ptrReadPos++)); if (npcPtr) { free_npc(npcPtr); - return 2; + return ApiStatus_DONE2; } - return 2; + return ApiStatus_DONE2; } -s32 GetNpcPointer(script_context* script, s32 initialCall) { - bytecode* ptrReadPos = script->ptrReadPos; - bytecode npcID = get_variable(script, *ptrReadPos++); - bytecode varNPC = *ptrReadPos++; +ApiStatus GetNpcPointer(ScriptInstance* script, s32 isInitialCall) { + Bytecode* ptrReadPos = script->ptrReadPos; + NpcId npcID = get_variable(script, *ptrReadPos++); + Bytecode varNPC = *ptrReadPos++; set_variable(script, varNPC, get_npc_safe(npcID)); - return 2; + return ApiStatus_DONE2; } -INCLUDE_ASM(code_f2470_len_27f0, SetNpcPos); +INCLUDE_API_ASM(code_f2470_len_27f0, SetNpcPos); -INCLUDE_ASM(code_f2470_len_27f0, SetNpcRotation); +INCLUDE_API_ASM(code_f2470_len_27f0, SetNpcRotation); -INCLUDE_ASM(code_f2470_len_27f0, SetNpcScale); +INCLUDE_API_ASM(code_f2470_len_27f0, SetNpcScale); -INCLUDE_ASM(code_f2470_len_27f0, SetNpcCollisionSize); +INCLUDE_API_ASM(code_f2470_len_27f0, SetNpcCollisionSize); -INCLUDE_ASM(code_f2470_len_27f0, SetNpcSpeed); +INCLUDE_API_ASM(code_f2470_len_27f0, SetNpcSpeed); // TODO: Fix issue with BNEZL vs BNEZ /* -s32 SetNpcSpeed(script_context* script, s32 initialCall) { - bytecode* ptrReadPos = script->ptrReadPos; - bytecode npcID = get_variable(script, *ptrReadPos++); +ApiStatus SetNpcSpeed(ScriptInstance* script, s32 isInitialCall) { + Vytecode* ptrReadPos = script->ptrReadPos; + NpcId npcID = get_variable(script, *ptrReadPos++); f32 speed = get_float_variable(script, *ptrReadPos); - npc* npcPtr = resolve_npc(script, npcID); + Npc* npcPtr = resolve_npc(script, npcID); npcPtr->moveSpeed = speed; if(npcPtr != NULL) { - return 2; + return ApiStatus_DONE2; } } */ -INCLUDE_ASM(code_f2470_len_27f0, SetNpcJumpscale); +INCLUDE_API_ASM(code_f2470_len_27f0, SetNpcJumpscale); -INCLUDE_ASM(code_f2470_len_27f0, SetNpcAnimation); +INCLUDE_API_ASM(code_f2470_len_27f0, SetNpcAnimation); -INCLUDE_ASM(code_f2470_len_27f0, GetNpcAnimation); +INCLUDE_API_ASM(code_f2470_len_27f0, GetNpcAnimation); -INCLUDE_ASM(code_f2470_len_27f0, NpcMoveTo); +INCLUDE_API_ASM(code_f2470_len_27f0, NpcMoveTo); INCLUDE_ASM(code_f2470_len_27f0, _npc_jump_to); -INCLUDE_ASM(code_f2470_len_27f0, NpcJump0); +INCLUDE_API_ASM(code_f2470_len_27f0, NpcJump0); -INCLUDE_ASM(code_f2470_len_27f0, NpcJump1); +INCLUDE_API_ASM(code_f2470_len_27f0, NpcJump1); -INCLUDE_ASM(code_f2470_len_27f0, NpcFlyTo); +INCLUDE_API_ASM(code_f2470_len_27f0, NpcFlyTo); -INCLUDE_ASM(code_f2470_len_27f0, GetNpcYaw); +INCLUDE_API_ASM(code_f2470_len_27f0, GetNpcYaw); -INCLUDE_ASM(code_f2470_len_27f0, SetNpcYaw); +INCLUDE_API_ASM(code_f2470_len_27f0, SetNpcYaw); -INCLUDE_ASM(code_f2470_len_27f0, InterpNpcYaw); +INCLUDE_API_ASM(code_f2470_len_27f0, InterpNpcYaw); -INCLUDE_ASM(code_f2470_len_27f0, NpcFacePlayer); +INCLUDE_API_ASM(code_f2470_len_27f0, NpcFacePlayer); -INCLUDE_ASM(code_f2470_len_27f0, NpcFaceNpc); +INCLUDE_API_ASM(code_f2470_len_27f0, NpcFaceNpc); -INCLUDE_ASM(code_f2470_len_27f0, SetNpcFlagBits); +INCLUDE_API_ASM(code_f2470_len_27f0, SetNpcFlagBits); -INCLUDE_ASM(code_f2470_len_27f0, GetNpcPos); +INCLUDE_API_ASM(code_f2470_len_27f0, GetNpcPos); -INCLUDE_ASM(code_f2470_len_27f0, EnableNpcShadow); +INCLUDE_API_ASM(code_f2470_len_27f0, EnableNpcShadow); -INCLUDE_ASM(code_f2470_len_27f0, EnableNpcBlur); +INCLUDE_API_ASM(code_f2470_len_27f0, EnableNpcBlur); -INCLUDE_ASM(code_f2470_len_27f0, ClearPartnerMoveHistory); +INCLUDE_API_ASM(code_f2470_len_27f0, ClearPartnerMoveHistory); -INCLUDE_ASM(code_f2470_len_27f0, NpcSetHomePosToCurrent); +INCLUDE_API_ASM(code_f2470_len_27f0, NpcSetHomePosToCurrent); -INCLUDE_ASM(code_f2470_len_27f0, GetPartnerPos); +INCLUDE_API_ASM(code_f2470_len_27f0, GetPartnerPos); -INCLUDE_ASM(code_f2470_len_27f0, DisablePartnerAI); +INCLUDE_API_ASM(code_f2470_len_27f0, DisablePartnerAI); -INCLUDE_ASM(code_f2470_len_27f0, EnablePartnerAI); +INCLUDE_API_ASM(code_f2470_len_27f0, EnablePartnerAI); -INCLUDE_ASM(code_f2470_len_27f0, BringPartnerOut); +INCLUDE_API_ASM(code_f2470_len_27f0, BringPartnerOut); -INCLUDE_ASM(code_f2470_len_27f0, PutPartnerAway); +INCLUDE_API_ASM(code_f2470_len_27f0, PutPartnerAway); -INCLUDE_ASM(code_f2470_len_27f0, GetCurrentPartnerID); +INCLUDE_API_ASM(code_f2470_len_27f0, GetCurrentPartnerID); -INCLUDE_ASM(code_f2470_len_27f0, SetNpcEffect); +INCLUDE_API_ASM(code_f2470_len_27f0, SetNpcEffect); -INCLUDE_ASM(code_f2470_len_27f0, PlaySoundAtNpc); +INCLUDE_API_ASM(code_f2470_len_27f0, PlaySoundAtNpc); diff --git a/src/code_f4c60_len_4300.c b/src/code_f4c60_len_4300.c index 238927c01b..2c6e22fdde 100644 --- a/src/code_f4c60_len_4300.c +++ b/src/code_f4c60_len_4300.c @@ -1,166 +1,166 @@ #include "common.h" -s32 SpeakToPlayer(script_context* script, s32 initialCall) { - return _show_message(script, initialCall, 0); +ApiStatus SpeakToPlayer(ScriptInstance* script, s32 isInitialCall) { + return _show_message(script, isInitialCall, 0); } -s32 EndSpeech(script_context* script, s32 initialCall) { - return _show_message(script, initialCall, 1); +ApiStatus EndSpeech(ScriptInstance* script, s32 isInitialCall) { + return _show_message(script, isInitialCall, 1); } -s32 ContinueSpeech(script_context* script, s32 initialCall) { - return _show_message(script, initialCall, 2); +ApiStatus ContinueSpeech(ScriptInstance* script, s32 isInitialCall) { + return _show_message(script, isInitialCall, 2); } -s32 SpeakToNpc(script_context* script, s32 initialCall) { - return _show_message(script, initialCall, 3); +ApiStatus SpeakToNpc(ScriptInstance* script, s32 isInitialCall) { + return _show_message(script, isInitialCall, 3); } INCLUDE_ASM(code_f4c60_len_4300, _show_message); -INCLUDE_ASM(code_f4c60_len_4300, ShowMessageAtScreenPos); +INCLUDE_API_ASM(code_f4c60_len_4300, ShowMessageAtScreenPos); -INCLUDE_ASM(code_f4c60_len_4300, ShowMessageAtWorldPos); +INCLUDE_API_ASM(code_f4c60_len_4300, ShowMessageAtWorldPos); -INCLUDE_ASM(code_f4c60_len_4300, CloseMessage); +INCLUDE_API_ASM(code_f4c60_len_4300, CloseMessage); -INCLUDE_ASM(code_f4c60_len_4300, SwitchMessage); +INCLUDE_API_ASM(code_f4c60_len_4300, SwitchMessage); -INCLUDE_ASM(code_f4c60_len_4300, ShowChoice); +INCLUDE_API_ASM(code_f4c60_len_4300, ShowChoice); -s32 CloseChoice(script_context* script, s32 initialCall) { +ApiStatus CloseChoice(ScriptInstance* script, s32 isInitialCall) { close_message(D_802DB268); - return 1; + return ApiStatus_DONE1; } -s32 CancelMessage(script_context* script, s32 initialCall) { +ApiStatus CancelMessage(ScriptInstance* script, s32 isInitialCall) { cancel_message(gCurrentPrintContext); - return 2; + return ApiStatus_DONE2; } -s32 CancelMessageAndBlock(script_context* script, s32 initialCall) { +ApiStatus CancelMessageAndBlock(ScriptInstance* script, s32 isInitialCall) { cancel_message(gCurrentPrintContext); - return 0; + return ApiStatus_BLOCK; } -s32 SetMessageImages(script_context* script, s32 initialCall) { +ApiStatus SetMessageImages(ScriptInstance* script, s32 isInitialCall) { set_message_images(*script->ptrReadPos); - return 2; + return ApiStatus_DONE2; } -s32 func_802D0C94(script_context* script, s32 initialCall) { +ApiStatus func_802D0C94(ScriptInstance* script, s32 initialCall) { if (get_variable(script, *script->ptrReadPos) == 0) { D_8009A650[0] |= 0x10; } else { D_8009A650[0] &= ~0x10; } - return 2; + return ApiStatus_DONE2; } -s32 SetMessageString(script_context* script, s32 initialCall) { - bytecode* ptrReadPos = script->ptrReadPos; - bytecode string = get_variable(script, *ptrReadPos++); - bytecode index = get_variable(script, *ptrReadPos++); +ApiStatus SetMessageString(ScriptInstance* script, s32 isInitialCall) { + Bytecode* ptrReadPos = script->ptrReadPos; + Bytecode string = get_variable(script, *ptrReadPos++); + Bytecode index = get_variable(script, *ptrReadPos++); set_message_string(string, index); - return 2; + return ApiStatus_DONE2; } -INCLUDE_ASM(code_f4c60_len_4300, SetMessageValue); +INCLUDE_API_ASM(code_f4c60_len_4300, SetMessageValue); // TODO: Figure out why there's an extra NOP after this function // It's probably because of a file split issue /* -s32 SetMessageValue(script_context* script, s32 initialCall) { - bytecode* ptrReadPos = script->ptrReadPos; - bytecode value = get_variable(script, *ptrReadPos++); - bytecode index = get_variable(script, *ptrReadPos); +ApiStatus SetMessageValue(ScriptInstance* script, s32 initialCall) { + Bytecode* ptrReadPos = script->ptrReadPos; + Bytecode value = get_variable(script, *ptrReadPos++); + Bytecode index = get_variable(script, *ptrReadPos); set_message_value(value, index); - return 2; + return ApiStatus_DONE2; } */ -INCLUDE_ASM(code_f4c60_len_4300, HidePlayerShadow); +INCLUDE_API_ASM(code_f4c60_len_4300, HidePlayerShadow); -INCLUDE_ASM(code_f4c60_len_4300, DisablePlayerPhysics); +INCLUDE_API_ASM(code_f4c60_len_4300, DisablePlayerPhysics); -INCLUDE_ASM(code_f4c60_len_4300, DisablePlayerInput); +INCLUDE_API_ASM(code_f4c60_len_4300, DisablePlayerInput); -INCLUDE_ASM(code_f4c60_len_4300, SetPlayerPos); +INCLUDE_API_ASM(code_f4c60_len_4300, SetPlayerPos); -INCLUDE_ASM(code_f4c60_len_4300, SetPlayerCollisionSize); +INCLUDE_API_ASM(code_f4c60_len_4300, SetPlayerCollisionSize); -INCLUDE_ASM(code_f4c60_len_4300, SetPlayerSpeed); +INCLUDE_API_ASM(code_f4c60_len_4300, SetPlayerSpeed); -INCLUDE_ASM(code_f4c60_len_4300, SetPlayerJumpscale); +INCLUDE_API_ASM(code_f4c60_len_4300, SetPlayerJumpscale); -INCLUDE_ASM(code_f4c60_len_4300, SetPlayerAnimation); +INCLUDE_API_ASM(code_f4c60_len_4300, SetPlayerAnimation); -INCLUDE_ASM(code_f4c60_len_4300, SetPlayerActionState); +INCLUDE_API_ASM(code_f4c60_len_4300, SetPlayerActionState); -INCLUDE_ASM(code_f4c60_len_4300, MovePlayerTo); +INCLUDE_API_ASM(code_f4c60_len_4300, MovePlayerTo); INCLUDE_ASM(code_f4c60_len_4300, player_jump); -INCLUDE_ASM(code_f4c60_len_4300, PlayerJump); +INCLUDE_API_ASM(code_f4c60_len_4300, PlayerJump); -INCLUDE_ASM(code_f4c60_len_4300, PlayerJump1); +INCLUDE_API_ASM(code_f4c60_len_4300, PlayerJump1); -INCLUDE_ASM(code_f4c60_len_4300, PlayerJump2); +INCLUDE_API_ASM(code_f4c60_len_4300, PlayerJump2); -INCLUDE_ASM(code_f4c60_len_4300, InterpPlayerYaw); +INCLUDE_API_ASM(code_f4c60_len_4300, InterpPlayerYaw); -INCLUDE_ASM(code_f4c60_len_4300, PlayerFaceNpc); +INCLUDE_API_ASM(code_f4c60_len_4300, PlayerFaceNpc); -INCLUDE_ASM(code_f4c60_len_4300, GetPlayerTargetYaw); +INCLUDE_API_ASM(code_f4c60_len_4300, GetPlayerTargetYaw); -INCLUDE_ASM(code_f4c60_len_4300, SetPlayerFlagBits); +INCLUDE_API_ASM(code_f4c60_len_4300, SetPlayerFlagBits); -INCLUDE_ASM(code_f4c60_len_4300, GetPlayerActionState); +INCLUDE_API_ASM(code_f4c60_len_4300, GetPlayerActionState); -INCLUDE_ASM(code_f4c60_len_4300, GetPlayerPos); +INCLUDE_API_ASM(code_f4c60_len_4300, GetPlayerPos); -INCLUDE_ASM(code_f4c60_len_4300, GetPlayerAnimation); +INCLUDE_API_ASM(code_f4c60_len_4300, GetPlayerAnimation); -INCLUDE_ASM(code_f4c60_len_4300, FullyRestoreHPandFP); +INCLUDE_API_ASM(code_f4c60_len_4300, FullyRestoreHPandFP); -INCLUDE_ASM(code_f4c60_len_4300, FullyRestoreSP); +INCLUDE_API_ASM(code_f4c60_len_4300, FullyRestoreSP); -INCLUDE_ASM(code_f4c60_len_4300, EnablePartner); +INCLUDE_API_ASM(code_f4c60_len_4300, EnablePartner); -INCLUDE_ASM(code_f4c60_len_4300, DisablePartner); +INCLUDE_API_ASM(code_f4c60_len_4300, DisablePartner); -INCLUDE_ASM(code_f4c60_len_4300, ForceExitHeading); +INCLUDE_API_ASM(code_f4c60_len_4300, ForceExitHeading); -INCLUDE_ASM(code_f4c60_len_4300, UseExitHeading); +INCLUDE_API_ASM(code_f4c60_len_4300, UseExitHeading); INCLUDE_ASM(code_f4c60_len_4300, func_802D23F8); -INCLUDE_ASM(code_f4c60_len_4300, DisablePulseStone); +INCLUDE_API_ASM(code_f4c60_len_4300, DisablePulseStone); -INCLUDE_ASM(code_f4c60_len_4300, GetCurrentPartner); +INCLUDE_API_ASM(code_f4c60_len_4300, GetCurrentPartner); -INCLUDE_ASM(code_f4c60_len_4300, Disable8bitMario); +INCLUDE_API_ASM(code_f4c60_len_4300, Disable8bitMario); -INCLUDE_ASM(code_f4c60_len_4300, PlaySoundAtPlayer); +INCLUDE_API_ASM(code_f4c60_len_4300, PlaySoundAtPlayer); INCLUDE_ASM(code_f4c60_len_4300, func_802D2D30); INCLUDE_ASM(code_f4c60_len_4300, func_802D2F34); -INCLUDE_ASM(code_f4c60_len_4300, CreateImageObj); +INCLUDE_API_ASM(code_f4c60_len_4300, CreateImageObj); -INCLUDE_ASM(code_f4c60_len_4300, RemoveImageObj); +INCLUDE_API_ASM(code_f4c60_len_4300, RemoveImageObj); -INCLUDE_ASM(code_f4c60_len_4300, SetObjPosition); +INCLUDE_API_ASM(code_f4c60_len_4300, SetObjPosition); -INCLUDE_ASM(code_f4c60_len_4300, SetObjRotation); +INCLUDE_API_ASM(code_f4c60_len_4300, SetObjRotation); -INCLUDE_ASM(code_f4c60_len_4300, SetObjScale); +INCLUDE_API_ASM(code_f4c60_len_4300, SetObjScale); -INCLUDE_ASM(code_f4c60_len_4300, SetObjJumpScale); +INCLUDE_API_ASM(code_f4c60_len_4300, SetObjJumpScale); -INCLUDE_ASM(code_f4c60_len_4300, JumpObj); +INCLUDE_API_ASM(code_f4c60_len_4300, JumpObj); INCLUDE_ASM(code_f4c60_len_4300, func_802D4164); diff --git a/src/code_f8f60_len_1560.c b/src/code_f8f60_len_1560.c index 3c471d9d1f..441ba1d873 100644 --- a/src/code_f8f60_len_1560.c +++ b/src/code_f8f60_len_1560.c @@ -1,7 +1,7 @@ #include "common.h" -s32 MakeLerp(script_context* script, s32 initialCall) { - s32* ptrReadPos = script->ptrReadPos; +ApiStatus MakeLerp(ScriptInstance* script, s32 isInitialCall) { + Bytecode* ptrReadPos = script->ptrReadPos; script->varTable[0xC] = get_variable(script, *ptrReadPos++); // start script->varTable[0xD] = get_variable(script, *ptrReadPos++); // end @@ -9,10 +9,10 @@ s32 MakeLerp(script_context* script, s32 initialCall) { script->varTable[0xB] = get_variable(script, *ptrReadPos++); // easing type script->varTable[0xE] = 0; // elapsed - return 2; + return ApiStatus_DONE2; } -s32 UpdateLerp(script_context* script, s32 initialCall) { +ApiStatus UpdateLerp(ScriptInstance* script, s32 isInitialCall) { script->varTable[0x0] = (s32) update_lerp( script->varTable[0xB], script->varTable[0xC], @@ -28,63 +28,63 @@ s32 UpdateLerp(script_context* script, s32 initialCall) { } script->varTable[0xE]++; - return 2; + return ApiStatus_DONE2; } -s32 RandInt(script_context* script, s32 initialCall) { - bytecode* ptrReadPos = script->ptrReadPos; +ApiStatus RandInt(ScriptInstance* script, s32 isInitialCall) { + Bytecode* ptrReadPos = script->ptrReadPos; s32 max = get_variable(script, *ptrReadPos++); - bytecode outVar = *ptrReadPos++; + Bytecode outVar = *ptrReadPos++; set_variable(script, outVar, rand_int(max)); - return 2; + return ApiStatus_DONE2; } -s32 GetAngleBetweenNPCs(script_context* script, s32 initialCall) { - bytecode* ptrReadPos = script->ptrReadPos; +ApiStatus GetAngleBetweenNPCs(ScriptInstance* script, s32 isInitialCall) { + Bytecode* ptrReadPos = script->ptrReadPos; - NPC aID = get_variable(script, *ptrReadPos++); - NPC bID = get_variable(script, *ptrReadPos++); - bytecode outVar = *ptrReadPos++; + NpcId aID = get_variable(script, *ptrReadPos++); + NpcId bID = get_variable(script, *ptrReadPos++); + Bytecode outVar = *ptrReadPos++; - npc* a = resolve_npc(script, aID); - npc* b = resolve_npc(script, bID); + Npc* a = resolve_npc(script, aID); + Npc* b = resolve_npc(script, bID); set_variable(script, outVar, atan2(a->pos.x, a->pos.z, b->pos.x, b->pos.z)); - return 2; + return ApiStatus_DONE2; } -s32 GetAngleToNPC(script_context* script, s32 initialCall) { - player_status* playerStatus = &gPlayerStatus; - bytecode* ptrReadPos = script->ptrReadPos; +ApiStatus GetAngleToNPC(ScriptInstance* script, s32 isInitialCall) { + PlayerStatus* playerStatus = &gPlayerStatus; + Bytecode* ptrReadPos = script->ptrReadPos; - NPC npcID = get_variable(script, *ptrReadPos++); - bytecode outVar = *ptrReadPos++; + NpcId npcID = get_variable(script, *ptrReadPos++); + Bytecode outVar = *ptrReadPos++; - npc* npc = resolve_npc(script, npcID); + Npc* npc = resolve_npc(script, npcID); set_variable(script, outVar, atan2(playerStatus->position.x, playerStatus->position.z, npc->pos.x, npc->pos.z)); - return 2; + return ApiStatus_DONE2; } -s32 GetAngleToPlayer(script_context* script, s32 initialCall) { - player_status* playerStatus = &gPlayerStatus; - bytecode* ptrReadPos = script->ptrReadPos; +ApiStatus GetAngleToPlayer(ScriptInstance* script, s32 isInitialCall) { + PlayerStatus* playerStatus = &gPlayerStatus; + Bytecode* ptrReadPos = script->ptrReadPos; - NPC npcID = get_variable(script, *ptrReadPos++); - bytecode outVar = *ptrReadPos++; + NpcId npcID = get_variable(script, *ptrReadPos++); + Bytecode outVar = *ptrReadPos++; - npc* npc = resolve_npc(script, npcID); + Npc* npc = resolve_npc(script, npcID); set_variable(script, outVar, atan2(npc->pos.x, npc->pos.z, playerStatus->position.x, playerStatus->position.z)); - return 2; + return ApiStatus_DONE2; } -s32 AwaitPlayerApproach(script_context* script, s32 initialCall) { - bytecode* ptrReadPos = script->ptrReadPos; - player_status* playerStatus = &gPlayerStatus; +ApiStatus AwaitPlayerApproach(ScriptInstance* script, s32 isInitialCall) { + Bytecode* ptrReadPos = script->ptrReadPos; + PlayerStatus* playerStatus = &gPlayerStatus; s32* targetX = &script->functionTemp[0]; s32* targetZ = &script->functionTemp[1]; @@ -92,7 +92,7 @@ s32 AwaitPlayerApproach(script_context* script, s32 initialCall) { f32 distance; - if (initialCall) { + if (isInitialCall) { *targetX = get_variable(script, *ptrReadPos++); *targetZ = get_variable(script, *ptrReadPos++); *distanceRequired = get_variable(script, *ptrReadPos++); @@ -104,24 +104,24 @@ s32 AwaitPlayerApproach(script_context* script, s32 initialCall) { ); if (distance < *distanceRequired) { - return 2; + return ApiStatus_DONE2; } else { - return 0; + return ApiStatus_BLOCK; } } -s32 IsPlayerWithin(script_context* script, s32 initialCall) { - bytecode* ptrReadPos = script->ptrReadPos; - player_status* playerStatus = &gPlayerStatus; +ApiStatus IsPlayerWithin(ScriptInstance* script, s32 isInitialCall) { + Bytecode* ptrReadPos = script->ptrReadPos; + PlayerStatus* playerStatus = &gPlayerStatus; s32* targetX = &script->functionTemp[0]; s32* targetZ = &script->functionTemp[1]; s32* distanceRequired = &script->functionTemp[2]; f32 distance; - bytecode outVar = SI_VAR_0; + Bytecode outVar = SI_VAR_0; - if (initialCall) { + if (isInitialCall) { *targetX = get_variable(script, *ptrReadPos++); *targetZ = get_variable(script, *ptrReadPos++); *distanceRequired = get_variable(script, *ptrReadPos++); @@ -138,12 +138,12 @@ s32 IsPlayerWithin(script_context* script, s32 initialCall) { set_variable(script, outVar, 1); } - return 2; + return ApiStatus_DONE2; } -s32 AwaitPlayerLeave(script_context* script, s32 initialCall) { - bytecode* ptrReadPos = script->ptrReadPos; - player_status* playerStatus = &gPlayerStatus; +ApiStatus AwaitPlayerLeave(ScriptInstance* script, s32 isInitialCall) { + Bytecode* ptrReadPos = script->ptrReadPos; + PlayerStatus* playerStatus = &gPlayerStatus; s32* targetX = &script->functionTemp[0]; s32* targetZ = &script->functionTemp[1]; @@ -151,7 +151,7 @@ s32 AwaitPlayerLeave(script_context* script, s32 initialCall) { f32 distance; - if (initialCall) { + if (isInitialCall) { *targetX = get_variable(script, *ptrReadPos++); *targetZ = get_variable(script, *ptrReadPos++); *distanceRequired = get_variable(script, *ptrReadPos++); @@ -163,19 +163,19 @@ s32 AwaitPlayerLeave(script_context* script, s32 initialCall) { ); if (distance > *distanceRequired) { - return 2; + return ApiStatus_DONE2; } else { - return 0; + return ApiStatus_BLOCK; } } -s32 AddVectorPolar(script_context* script, s32 initialCall) { - bytecode* ptrReadPos = script->ptrReadPos; +ApiStatus AddVectorPolar(ScriptInstance* script, s32 isInitialCall) { + Bytecode* ptrReadPos = script->ptrReadPos; - bytecode xVar = *ptrReadPos++; + Bytecode xVar = *ptrReadPos++; f32 x = get_float_variable(script, xVar); - bytecode yVar = *ptrReadPos++; + Bytecode yVar = *ptrReadPos++; f32 y = get_float_variable(script, yVar); f32 r = get_float_variable(script, *ptrReadPos++); @@ -185,12 +185,12 @@ s32 AddVectorPolar(script_context* script, s32 initialCall) { set_float_variable(script, xVar, x); set_float_variable(script, yVar, y); - return 2; + return ApiStatus_DONE2; } -INCLUDE_ASM(code_f8f60_len_1560, func_802D4BDC); +INCLUDE_API_ASM(code_f8f60_len_1560, func_802D4BDC); /* -s32 func_802D4BDC(script_context* script, s32 initialCall) { +ApiStatus func_802D4BDC(ScriptInstance* script, s32 initialCall) { s32* t0 = &script->functionTemp[0]; s32* t1 = &script->functionTemp[1]; s32 t1v; @@ -211,7 +211,7 @@ s32 func_802D4BDC(script_context* script, s32 initialCall) { t1v = 0xFF; func_80137DA4(0xA, (f32) *t1); } else { - return 2; + return ApiStatus_DONE2; } } @@ -220,11 +220,11 @@ s32 func_802D4BDC(script_context* script, s32 initialCall) { */ // Very similar to func_802D4BDC -INCLUDE_ASM(code_f8f60_len_1560, func_802D4C4C); +INCLUDE_API_ASM(code_f8f60_len_1560, func_802D4C4C); -INCLUDE_ASM(code_f8f60_len_1560, func_802D4CC4); +INCLUDE_API_ASM(code_f8f60_len_1560, func_802D4CC4); /* -s32 func_802D4CC4(script_context* script, s32 initialCall) { +ApiStatus func_802D4CC4(ScriptInstance* script, s32 initialCall) { s32 value = get_variable(script, *script->ptrReadPos); if (value < 0) { func_80137DA4(0xFF, -1.0f); @@ -232,37 +232,37 @@ s32 func_802D4CC4(script_context* script, s32 initialCall) { func_80137DA4(0xA, value); } - return 2; + return ApiStatus_DONE2; } */ -s32 func_802D4D18(script_context* script, s32 initialCall) { +ApiStatus func_802D4D18(ScriptInstance* script, s32 initialCall) { s32 value = get_float_variable(script, *script->ptrReadPos); func_80137E4C(0, 0, 0xC, 0x14); func_80137E4C(0, 1, 0x134, 0xDC); func_80137D88(0xC, value); - return 2; + return ApiStatus_DONE2; } -s32 func_802D4D88(script_context* script, s32 initialCall) { +ApiStatus func_802D4D88(ScriptInstance* script, s32 initialCall) { func_80137D88(0xC, 0); - return 2; + return ApiStatus_DONE2; } INCLUDE_ASM(code_f8f60_len_1560, setup_path_data); INCLUDE_ASM(code_f8f60_len_1560, func_802D5270); -INCLUDE_ASM(code_f8f60_len_1560, LoadPath); +INCLUDE_API_ASM(code_f8f60_len_1560, LoadPath); -INCLUDE_ASM(code_f8f60_len_1560, GetNextPathPos); +INCLUDE_API_ASM(code_f8f60_len_1560, GetNextPathPos); -s32 GetDist2D(script_context* script, s32 initialCall) { - bytecode* ptrReadPos = script->ptrReadPos; +ApiStatus GetDist2D(ScriptInstance* script, s32 isInitialCall) { + Bytecode* ptrReadPos = script->ptrReadPos; - bytecode outVar = *ptrReadPos++; + Bytecode outVar = *ptrReadPos++; set_float_variable(script, outVar, dist2D( get_float_variable(script, *ptrReadPos++), get_float_variable(script, *ptrReadPos++), @@ -270,16 +270,16 @@ s32 GetDist2D(script_context* script, s32 initialCall) { get_float_variable(script, *ptrReadPos++) )); - return 2; + return ApiStatus_DONE2; } -s32 func_802D5830(script_context* script, s32 initialCall) { +ApiStatus func_802D5830(ScriptInstance* script, s32 initialCall) { func_80027088(get_variable(script, *script->ptrReadPos)); - return 2; + return ApiStatus_DONE2; } -s32 func_802D585C(script_context* script, s32 initialCall) { - bytecode* ptrReadPos = script->ptrReadPos; +ApiStatus func_802D585C(ScriptInstance* script, s32 initialCall) { + Bytecode* ptrReadPos = script->ptrReadPos; s32 setMode = get_variable(script, *ptrReadPos++); s32 flags = get_variable(script, *ptrReadPos++); @@ -291,41 +291,41 @@ s32 func_802D585C(script_context* script, s32 initialCall) { D_8009A650[0] &= ~flags; } - return 2; + return ApiStatus_DONE2; } -s32 SetValueByRef(script_context* script, s32 initialCall) { - bytecode* ptrReadPos = script->ptrReadPos; +ApiStatus SetValueByRef(ScriptInstance* script, s32 isInitialCall) { + Bytecode* ptrReadPos = script->ptrReadPos; s32 dest = get_variable(script, *ptrReadPos++); /* Reference */ s32 src = get_variable(script, *ptrReadPos++); set_variable(script, dest, src); - return 2; + return ApiStatus_DONE2; } -s32 GetValueByRef(script_context* script, s32 initialCall) { - bytecode* ptrReadPos = script->ptrReadPos; +ApiStatus GetValueByRef(ScriptInstance* script, s32 isInitialCall) { + Bytecode* ptrReadPos = script->ptrReadPos; s32 src = get_variable(script, *ptrReadPos++); /* Reference */ - bytecode dest = *ptrReadPos++; + Bytecode dest = *ptrReadPos++; set_variable(script, dest, get_variable(script, src)); - return 2; + return ApiStatus_DONE2; } -s32 EnableStatusMenu(script_context* script, s32 initialCall) { +ApiStatus EnableStatusMenu(ScriptInstance* script, s32 isInitialCall) { if (get_variable(script, *script->ptrReadPos) != 0) { decrement_status_menu_disabled(); } else { increment_status_menu_disabled(); } - return 2; + return ApiStatus_DONE2; } -s32 ShowStatusMenu(script_context* script, s32 initialCall) { +ApiStatus ShowStatusMenu(ScriptInstance* script, s32 isInitialCall) { if (get_variable(script, *script->ptrReadPos) != 0) { status_menu_enable_ignore_changes(); func_800E97B8(); @@ -333,29 +333,29 @@ s32 ShowStatusMenu(script_context* script, s32 initialCall) { status_menu_disable_ignore_changes(); } - return 2; + return ApiStatus_DONE2; } -s32 SetGameMode(script_context* script, s32 initialCall) { +ApiStatus SetGameMode(ScriptInstance* script, s32 isInitialCall) { set_game_mode( // Clear upper half (get_variable(script, *script->ptrReadPos) << 0x10) >> 0x10 ); - return 2; + return ApiStatus_DONE2; } -s32 ClampAngleInt(script_context* script, s32 initialCall) { - bytecode* ptrReadPos = script->ptrReadPos; +ApiStatus ClampAngleInt(ScriptInstance* script, s32 isInitialCall) { + Bytecode* ptrReadPos = script->ptrReadPos; set_variable(script, *ptrReadPos, clamp_angle(get_variable(script, *ptrReadPos))); - return 2; + return ApiStatus_DONE2; } -s32 ClampAngleFloat(script_context* script, s32 initialCall) { - bytecode* ptrReadPos = script->ptrReadPos; +ApiStatus ClampAngleFloat(ScriptInstance* script, s32 isInitialCall) { + Bytecode* ptrReadPos = script->ptrReadPos; set_float_variable(script, *ptrReadPos, clamp_angle(get_float_variable(script, *ptrReadPos))); - return 2; + return ApiStatus_DONE2; } diff --git a/src/code_fa4c0_len_3bf0.c b/src/code_fa4c0_len_3bf0.c index d401358064..fe1eb96348 100644 --- a/src/code_fa4c0_len_3bf0.c +++ b/src/code_fa4c0_len_3bf0.c @@ -2,16 +2,16 @@ INCLUDE_ASM(code_fa4c0_len_3bf0, func_802D5B10); -s32 FadeOutMusic(script_context* script, s32 initialCall) { - s32* ptrReadPos = script->ptrReadPos; +ApiStatus FadeOutMusic(ScriptInstance* script, s32 isInitialCall) { + Bytecode* ptrReadPos = script->ptrReadPos; s32 itemID = get_variable(script, *ptrReadPos++); s32* ptrNextPos = ptrReadPos++; return (set_music_track(itemID, -1, 0, get_variable(script, *ptrNextPos++), 8) != 0) * 2; } -s32 SetMusicTrack(script_context* script, s32 initialCall) { - s32* ptrReadPos = script->ptrReadPos; +ApiStatus SetMusicTrack(ScriptInstance* script, s32 isInitialCall) { + Bytecode* ptrReadPos = script->ptrReadPos; s32 musicPlayer = get_variable(script, *ptrReadPos++); s32 songID = get_variable(script, *ptrReadPos++); s32 variation = get_variable(script, *ptrReadPos++); @@ -20,34 +20,34 @@ s32 SetMusicTrack(script_context* script, s32 initialCall) { return (set_music_track(musicPlayer, songID, variation, 0x1F4, volume) != 0) * 2; } -INCLUDE_ASM(code_fa4c0_len_3bf0, FadeInMusic); +INCLUDE_API_ASM(code_fa4c0_len_3bf0, FadeInMusic); -s32 PlayAmbientSounds(script_context* script, s32 initialCall) { - s32* ptrReadPos = script->ptrReadPos; +ApiStatus PlayAmbientSounds(ScriptInstance* script, s32 isInitialCall) { + Bytecode* ptrReadPos = script->ptrReadPos; s32 soundID = get_variable(script, *ptrReadPos++); return (play_ambient_sounds(soundID, 0xFA) != 0) * 2; } -s32 PlaySound(script_context* script, s32 initialCall) { - s32* ptrReadPos = script->ptrReadPos; +ApiStatus PlaySound(ScriptInstance* script, s32 isInitialCall) { + Bytecode* ptrReadPos = script->ptrReadPos; s32 soundID = get_variable(script, *ptrReadPos++); play_sound(soundID); - return 2; + return ApiStatus_DONE2; } -s32 func_802D617C(script_context* script, s32 initialCall) { - s32* ptrReadPos = script->ptrReadPos; +ApiStatus func_802D617C(ScriptInstance* script, s32 initialCall) { + Bytecode* ptrReadPos = script->ptrReadPos; s32 soundID = get_variable(script, *ptrReadPos++); s32 value2 = get_variable(script, *ptrReadPos++); _play_sound(soundID, value2 & 0xFF, 0, 0); - return 2; + return ApiStatus_DONE2; } -s32 PlaySoundAt(script_context* script, s32 initialCall) { - s32* ptrReadPos = script->ptrReadPos; +ApiStatus PlaySoundAt(ScriptInstance* script, s32 isInitialCall) { + Bytecode* ptrReadPos = script->ptrReadPos; s32 soundID = get_variable(script, *ptrReadPos++); s32 value2 = get_variable(script, *ptrReadPos++); s32 x = get_variable(script, *ptrReadPos++); @@ -55,68 +55,68 @@ s32 PlaySoundAt(script_context* script, s32 initialCall) { s32 z = get_variable(script, *ptrReadPos++); play_sound_at_position(soundID, value2, x, y, z); - return 2; + return ApiStatus_DONE2; } -s32 StopSound(script_context* script, s32 initialCall) { - s32* ptrReadPos = script->ptrReadPos; +ApiStatus StopSound(ScriptInstance* script, s32 isInitialCall) { + Bytecode* ptrReadPos = script->ptrReadPos; stop_sound(get_variable(script, *ptrReadPos++)); - return 2; + return ApiStatus_DONE2; } -s32 func_802D62E4(script_context* script, s32 initialCall) { - s32* ptrReadPos = script->ptrReadPos; +ApiStatus func_802D62E4(ScriptInstance* script, s32 initialCall) { + Bytecode* ptrReadPos = script->ptrReadPos; func_80149A6C(get_variable(script, *ptrReadPos++), 1); - return 2; + return ApiStatus_DONE2; } -s32 UseDoorSounds(script_context* script, s32 initialCall) { - s32* ptrReadPos = script->ptrReadPos; +ApiStatus UseDoorSounds(ScriptInstance* script, s32 isInitialCall) { + Bytecode* ptrReadPos = script->ptrReadPos; gCurrentDoorSoundsSet = get_variable(script, *ptrReadPos++); - return 2; + return ApiStatus_DONE2; } -s32 func_802D6340(script_context* script, s32 initialCall) { - s32* ptrReadPos = script->ptrReadPos; +ApiStatus func_802D6340(ScriptInstance* script, s32 initialCall) { + Bytecode* ptrReadPos = script->ptrReadPos; D_80151308 = get_variable(script, *ptrReadPos++); - return 2; + return ApiStatus_DONE2; } -INCLUDE_ASM(code_fa4c0_len_3bf0, PlaySoundAtF); +INCLUDE_API_ASM(code_fa4c0_len_3bf0, PlaySoundAtF); -s32 RemoveKeyItemAt(script_context* script, s32 initialCall) { - s32* ptrReadPos = script->ptrReadPos; +ApiStatus RemoveKeyItemAt(ScriptInstance* script, s32 isInitialCall) { + Bytecode* ptrReadPos = script->ptrReadPos; s32 index = get_variable(script, *ptrReadPos++); s16* ptrKeyItems = (s16 *) &gPlayerData.keyItems; ptrKeyItems[index] = 0; - return 2; + return ApiStatus_DONE2; } -s32 RemoveItemAt(script_context* script, s32 initialCall) { - s32* ptrReadPos = script->ptrReadPos; +ApiStatus RemoveItemAt(ScriptInstance* script, s32 isInitialCall) { + Bytecode* ptrReadPos = script->ptrReadPos; s32 index = get_variable(script, *ptrReadPos++); s16* ptrInvItems = (s16 *) &gPlayerData.invItems; - + ptrInvItems[index] = 0; sort_items(); - return 2; + return ApiStatus_DONE2; } -s32 AddKeyItem(script_context* script, s32 initialCall) { - s32* ptrReadPos = script->ptrReadPos; +ApiStatus AddKeyItem(ScriptInstance* script, s32 isInitialCall) { + Bytecode* ptrReadPos = script->ptrReadPos; s32 value = *ptrReadPos++; - player_data* playerData = &gPlayerData; + PlayerData* playerData = &gPlayerData; s32 itemID = get_variable(script, value); s32 i; - if (itemID == ITEM_FORTRESS_KEY) { + if (itemID == ItemId_FORTRESS_KEY) { playerData->fortressKeyCount++; - return 2; + return ApiStatus_DONE2; } for (i = 0; i < ARRAY_COUNT(playerData->keyItems); i++) { @@ -128,38 +128,38 @@ s32 AddKeyItem(script_context* script, s32 initialCall) { if (i < ARRAY_COUNT(playerData->keyItems)) { playerData->keyItems[i] = itemID; } - return 2; + return ApiStatus_DONE2; } -s32 func_802D6954(void) { +ApiStatus func_802D6954(ScriptInstance* script, s32 isInitialCall) { func_800E01A4(); disable_player_physics(); func_800EF600(); D_8009A650[0] &= ~0x40; - return 2; + return ApiStatus_DONE2; } -s32 HasKeyItem(script_context* script, s32 initialCall) { - s32* ptrReadPos = script->ptrReadPos; +ApiStatus HasKeyItem(ScriptInstance* script, s32 isInitialCall) { + Bytecode* ptrReadPos = script->ptrReadPos; s32 itemID = get_variable(script, *ptrReadPos++); s32 value = *ptrReadPos++; - player_data* playerData = &gPlayerData; + PlayerData* playerData = &gPlayerData; s32 i; - + for(i = 0; i < ARRAY_COUNT(playerData->keyItems); i++) { if (playerData->keyItems[i] == itemID) { break; } } set_variable(script, value, i < ARRAY_COUNT(playerData->keyItems)); - return 2; + return ApiStatus_DONE2; } -s32 FindKeyItem(script_context* script, s32 initialCall) { - s32* ptrReadPos = script->ptrReadPos; +ApiStatus FindKeyItem(ScriptInstance* script, s32 isInitialCall) { + Bytecode* ptrReadPos = script->ptrReadPos; s32 itemID = get_variable(script, *ptrReadPos++); s32 value = *ptrReadPos++; - player_data* playerData = &gPlayerData; + PlayerData* playerData = &gPlayerData; s32 i; s32 itemIndex; @@ -175,28 +175,28 @@ s32 FindKeyItem(script_context* script, s32 initialCall) { } set_variable(script, value, itemIndex); - return 2; + return ApiStatus_DONE2; } -s32 AddItem(script_context* script, s32 initialCall) { - s32* ptrReadPos = script->ptrReadPos; +ApiStatus AddItem(ScriptInstance* script, s32 isInitialCall) { + Bytecode* ptrReadPos = script->ptrReadPos; s32 itemID = get_variable(script, *ptrReadPos++); s32* ptrNextPos = (s32 *) *ptrReadPos++; set_variable(script, ptrNextPos, add_item(itemID)); - return 2; + return ApiStatus_DONE2; } -s32 func_802D6AF0(script_context* script, s32 initialCall) { +ApiStatus func_802D6AF0(ScriptInstance* script, s32 initialCall) { set_variable(script, *script->ptrReadPos, 0); - return 2; + return ApiStatus_DONE2; } -s32 FindItem(script_context* script, s32 initialCall) { - s32* ptrReadPos = script->ptrReadPos; +ApiStatus FindItem(ScriptInstance* script, s32 isInitialCall) { + Bytecode* ptrReadPos = script->ptrReadPos; s32 itemID = get_variable(script, *ptrReadPos++); s32 value = *ptrReadPos++; - player_data* playerData = &gPlayerData; + PlayerData* playerData = &gPlayerData; s32 i; s32 itemIndex; @@ -212,14 +212,14 @@ s32 FindItem(script_context* script, s32 initialCall) { } set_variable(script, value, itemIndex); - return 2; + return ApiStatus_DONE2; } -s32 RemoveItem(script_context* script, s32 initialCall) { - s32* ptrReadPos = script->ptrReadPos; +ApiStatus RemoveItem(ScriptInstance* script, s32 isInitialCall) { + Bytecode* ptrReadPos = script->ptrReadPos; s32 itemID = get_variable(script, *ptrReadPos++); s32 value = *ptrReadPos++; - player_data* playerData = &gPlayerData; + PlayerData* playerData = &gPlayerData; s32 i; s32 itemIndex; @@ -242,32 +242,32 @@ s32 RemoveItem(script_context* script, s32 initialCall) { sort_items(); set_variable(script, value, itemIndex); - return 2; + return ApiStatus_DONE2; } -s32 CountFortressKeys(script_context* script, s32 initialCall) { +ApiStatus CountFortressKeys(ScriptInstance* script, s32 isInitialCall) { s32 outVar = *script->ptrReadPos; set_variable(script, outVar, get_fortress_key_count()); - return 2; + return ApiStatus_DONE2; } -s32 RemoveFortressKeys(script_context* script, s32 initialCall) { +ApiStatus RemoveFortressKeys(ScriptInstance* script, s32 isInitialCall) { s32 num = get_variable(script, *script->ptrReadPos); subtract_fortress_keys(num); - return 2; + return ApiStatus_DONE2; } -INCLUDE_ASM(code_fa4c0_len_3bf0, MakeItemEntity); +INCLUDE_API_ASM(code_fa4c0_len_3bf0, MakeItemEntity); -INCLUDE_ASM(code_fa4c0_len_3bf0, DropItemEntity); +INCLUDE_API_ASM(code_fa4c0_len_3bf0, DropItemEntity); -INCLUDE_ASM(code_fa4c0_len_3bf0, DropItemEntityB); +INCLUDE_API_ASM(code_fa4c0_len_3bf0, DropItemEntityB); /* // Close to working -s32 DropItemEntityB(script_context* script, s32 initialCall) { - s32* ptrReadPos = script->ptrReadPos; +ApiStatus DropItemEntityB(ScriptInstance* script, s32 isInitialCall) { + Bytecode* ptrReadPos = script->ptrReadPos; s32 itemID = get_variable(script, *ptrReadPos++); s32 x = get_variable(script, *ptrReadPos++); s32 y = get_variable(script, *ptrReadPos++); @@ -277,32 +277,32 @@ s32 DropItemEntityB(script_context* script, s32 initialCall) { script->varTable[0] = make_item_entity_nodelay(itemID, x, y, z); set_item_entity_flags(script, 0x4000); - return 2; + return ApiStatus_DONE2; } */ -s32 RemoveItemEntity(script_context* script, s32 initialCall) { - s32* ptrReadPos = script->ptrReadPos; +ApiStatus RemoveItemEntity(ScriptInstance* script, s32 isInitialCall) { + Bytecode* ptrReadPos = script->ptrReadPos; s32 itemEntityIndex = get_variable(script, *ptrReadPos++); remove_item_entity_by_index(itemEntityIndex); - return 2; + return ApiStatus_DONE2; } -s32 AddBadge(script_context* script, s32 initialCall) { - s32* ptrReadPos = script->ptrReadPos; +ApiStatus AddBadge(ScriptInstance* script, s32 isInitialCall) { + Bytecode* ptrReadPos = script->ptrReadPos; s32 itemID = get_variable(script, *ptrReadPos++); s32* ptrNextPos = (s32 *) *ptrReadPos++; set_variable(script, ptrNextPos, add_badge(itemID)); - return 2; + return ApiStatus_DONE2; } -INCLUDE_ASM(code_fa4c0_len_3bf0, RemoveBadge); +INCLUDE_API_ASM(code_fa4c0_len_3bf0, RemoveBadge); -s32 SetItemPos(script_context* script, s32 initialCall) { - s32* ptrReadPos = script->ptrReadPos; - item_entity* ptrItemEntity; +ApiStatus SetItemPos(ScriptInstance* script, s32 isInitialCall) { + Bytecode* ptrReadPos = script->ptrReadPos; + ItemEntity* ptrItemEntity; s32 itemEntityIndex; s32 x, y, z; @@ -311,96 +311,96 @@ s32 SetItemPos(script_context* script, s32 initialCall) { y = get_variable(script, *ptrReadPos++); z = get_variable(script, *ptrReadPos++); - ptrItemEntity = (item_entity *) get_item_entity(itemEntityIndex); + ptrItemEntity = (ItemEntity *) get_item_entity(itemEntityIndex); ptrItemEntity->position.x = x; ptrItemEntity->position.y = y; ptrItemEntity->position.z = z; - return 2; + return ApiStatus_DONE2; } -INCLUDE_ASM(code_fa4c0_len_3bf0, SetItemFlags); +INCLUDE_API_ASM(code_fa4c0_len_3bf0, SetItemFlags); -s32 AddCoin(script_context* script, s32 initialCall) { +ApiStatus AddCoin(ScriptInstance* script, s32 isInitialCall) { script->varTable[0] = add_coins(get_variable(script, *script->ptrReadPos)); - return 2; + return ApiStatus_DONE2; } -s32 AddStarPoints(script_context* script, s32 initialCall) { +ApiStatus AddStarPoints(ScriptInstance* script, s32 isInitialCall) { script->varTable[0] = add_star_points(get_variable(script, *script->ptrReadPos)); - return 2; + return ApiStatus_DONE2; } -s32 AddStarPieces(script_context* script, s32 initialCall) { +ApiStatus AddStarPieces(ScriptInstance* script, s32 isInitialCall) { script->varTable[0] = add_star_pieces(get_variable(script, *script->ptrReadPos)); - return 2; + return ApiStatus_DONE2; } -INCLUDE_ASM(code_fa4c0_len_3bf0, GetItemPower); +INCLUDE_API_ASM(code_fa4c0_len_3bf0, GetItemPower); /* // Close to working -s32 GetItemPower(script_context* script, s32 initialCall) { - s32* ptrReadPos = script->ptrReadPos; +ApiStatus GetItemPower(ScriptInstance* script, s32 isInitialCall) { + Bytecode* ptrReadPos = script->ptrReadPos; s32 itemID = get_variable(script, *ptrReadPos++); s32* ptrNextPos = ptrReadPos++; item_table_entry* item = &gItemTable[itemID]; - - + + set_variable(script, ptrNextPos++, item->potencyA); set_variable(script, ptrNextPos++, item->potencyB); - return 2; + return ApiStatus_DONE2; } */ -INCLUDE_ASM(code_fa4c0_len_3bf0, ShowGotItem); +INCLUDE_API_ASM(code_fa4c0_len_3bf0, ShowGotItem); INCLUDE_ASM(code_fa4c0_len_3bf0, func_802D7460); INCLUDE_ASM(code_fa4c0_len_3bf0, func_802D74C0); -INCLUDE_ASM(code_fa4c0_len_3bf0, ShowEmote); +INCLUDE_API_ASM(code_fa4c0_len_3bf0, ShowEmote); -INCLUDE_ASM(code_fa4c0_len_3bf0, RemoveEffect); +INCLUDE_API_ASM(code_fa4c0_len_3bf0, RemoveEffect); /* // Works -s32 RemoveEffect(script_context* script, s32 initialCall) { - s32* ptrReadPos = script->ptrReadPos; +ApiStatus RemoveEffect(ScriptInstance* script, s32 isInitialCall) { + Bytecode* ptrReadPos = script->ptrReadPos; remove_effect(get_variable(script, *ptrReadPos++)); - return 2; + return ApiStatus_DONE2; } // Works -s32 func_802D7B10(script_context* script, s32 initialCall) { - s32* ptrReadPos = script->ptrReadPos; +ApiStatus func_802D7B10(ScriptInstance* script, s32 isInitialCall) { + Bytecode* ptrReadPos = script->ptrReadPos; s32* ptrValue = get_variable(script, *ptrReadPos++); *ptrValue |= 0x10; - return 2; + return ApiStatus_DONE2; } // Works -s32 func_802D7B44(script_context* script, s32 initialCall) { - s32* ptrReadPos = script->ptrReadPos; +ApiStatus func_802D7B44(ScriptInstance* script, s32 isInitialCall) { + Bytecode* ptrReadPos = script->ptrReadPos; s32* ptrValue = get_variable(script, *ptrReadPos++); s32* ptrTemp = ptrValue[3]; ptrTemp[5] = 10; - return 2; + return ApiStatus_DONE2; } // Works -s32 func_802D7B74(script_context* script, s32 initialCall) { - s32* ptrReadPos = script->ptrReadPos; +ApiStatus func_802D7B74(ScriptInstance* script, s32 isInitialCall) { + Bytecode* ptrReadPos = script->ptrReadPos; s32* ptrValue = get_variable(script, *ptrReadPos++); s32* ptrTemp = ptrValue[3]; ptrTemp[11] = 5; - return 2; + return ApiStatus_DONE2; } // More functions still in RemoveEffect.s but the ones above are matching properly */ -INCLUDE_ASM(code_fa4c0_len_3bf0, ShowSleepBubble); +INCLUDE_API_ASM(code_fa4c0_len_3bf0, ShowSleepBubble); -INCLUDE_ASM(code_fa4c0_len_3bf0, PlayEffect); +INCLUDE_API_ASM(code_fa4c0_len_3bf0, PlayEffect); diff --git a/src/code_fe0b0_len_5a0.c b/src/code_fe0b0_len_5a0.c index 64ced8f3ca..68d6b3b02d 100644 --- a/src/code_fe0b0_len_5a0.c +++ b/src/code_fe0b0_len_5a0.c @@ -1,37 +1,37 @@ #include "common.h" -INCLUDE_ASM(code_fe0b0_len_5a0, SetSpriteShading); +INCLUDE_API_ASM(code_fe0b0_len_5a0, SetSpriteShading); -s32 EnableSpriteShading(script_context* script) { +ApiStatus EnableSpriteShading(ScriptInstance* script, s32 isInitialCall) { if (get_variable(script, *script->ptrReadPos) != 0) { *D_80151328 |= 1; } else { *D_80151328 &= ~1; } - return 2; + return ApiStatus_DONE2; } -s32 getDemoState(script_context* script) { +s32 getDemoState(ScriptInstance* script) { set_variable(script, *script->ptrReadPos, (*gGameStatusPtr)->demoState); - return 2; + return ApiStatus_DONE2; } -s32 DemoPressButton(script_context* script) { +ApiStatus DemoPressButton(ScriptInstance* script, s32 isInitialCall) { (*gGameStatusPtr)->demoButtonInput |= get_variable(script, *script->ptrReadPos); - return 2; + return ApiStatus_DONE2; } -s32 DemoReleaseButton(script_context* script) { +ApiStatus DemoReleaseButton(ScriptInstance* script, s32 isInitialCall) { (*gGameStatusPtr)->demoButtonInput &= ~get_variable(script, *script->ptrReadPos); - return 2; + return ApiStatus_DONE2; } -s32 DemoSetButtons(script_context* script) { +ApiStatus DemoSetButtons(ScriptInstance* script, s32 isInitialCall) { (*gGameStatusPtr)->demoButtonInput = get_variable(script, *script->ptrReadPos); - return 2; + return ApiStatus_DONE2; } -s32 DemoJoystickRadial(script_context* script) { +ApiStatus DemoJoystickRadial(ScriptInstance* script, s32 isInitialCall) { f32 a; f32 b; s32* thisPos = script->ptrReadPos; @@ -42,10 +42,10 @@ s32 DemoJoystickRadial(script_context* script) { (*gGameStatusPtr)->demoStickX = a * sin_deg(b); (*gGameStatusPtr)->demoStickY = a * cos_deg(b); - return 2; + return ApiStatus_DONE2; } -s32 DemoJoystickXY(script_context* script) { +ApiStatus DemoJoystickXY(ScriptInstance* script, s32 isInitialCall) { f32 x; f32 y; s32* thisPos = script->ptrReadPos; @@ -56,5 +56,5 @@ s32 DemoJoystickXY(script_context* script) { (*gGameStatusPtr)->demoStickX = x; (*gGameStatusPtr)->demoStickY = y; - return 2; + return ApiStatus_DONE2; } diff --git a/src/os/code_39cb0_len_100.c b/src/os/code_39cb0_len_100.c index 5d035bc1d2..b4c67f5809 100644 --- a/src/os/code_39cb0_len_100.c +++ b/src/os/code_39cb0_len_100.c @@ -1,5 +1,5 @@ #include "common.h" -INCLUDE_ASM(os/code_39cb0_len_100, nuBoot); +INCLUDE_API_ASM(os/code_39cb0_len_100, nuBoot); INCLUDE_ASM(os/code_39cb0_len_100, boot_idle); diff --git a/src/os/code_39db0_len_8a0.c b/src/os/code_39db0_len_8a0.c index 9767a2a6f1..d0d1b418fc 100644 --- a/src/os/code_39db0_len_8a0.c +++ b/src/os/code_39db0_len_8a0.c @@ -1,27 +1,27 @@ #include "common.h" -INCLUDE_ASM(os/code_39db0_len_8a0, nuScCreateScheduler); +INCLUDE_API_ASM(os/code_39db0_len_8a0, nuScCreateScheduler); -INCLUDE_ASM(os/code_39db0_len_8a0, nuScExecuteAudio); +INCLUDE_API_ASM(os/code_39db0_len_8a0, nuScExecuteAudio); -INCLUDE_ASM(os/code_39db0_len_8a0, nuScExecuteGraphics); +INCLUDE_API_ASM(os/code_39db0_len_8a0, nuScExecuteGraphics); -INCLUDE_ASM(os/code_39db0_len_8a0, nuScAddClient); +INCLUDE_API_ASM(os/code_39db0_len_8a0, nuScAddClient); -INCLUDE_ASM(os/code_39db0_len_8a0, nuScRemoveClient); +INCLUDE_API_ASM(os/code_39db0_len_8a0, nuScRemoveClient); -INCLUDE_ASM(os/code_39db0_len_8a0, nuScResetClientMesgType); +INCLUDE_API_ASM(os/code_39db0_len_8a0, nuScResetClientMesgType); -INCLUDE_ASM(os/code_39db0_len_8a0, nuScGetGfxMQ); +INCLUDE_API_ASM(os/code_39db0_len_8a0, nuScGetGfxMQ); -INCLUDE_ASM(os/code_39db0_len_8a0, nuScGetAudioMQ); +INCLUDE_API_ASM(os/code_39db0_len_8a0, nuScGetAudioMQ); -INCLUDE_ASM(os/code_39db0_len_8a0, nuScSetFrameBufferNum); +INCLUDE_API_ASM(os/code_39db0_len_8a0, nuScSetFrameBufferNum); -INCLUDE_ASM(os/code_39db0_len_8a0, nuScGetFrameRate); +INCLUDE_API_ASM(os/code_39db0_len_8a0, nuScGetFrameRate); -INCLUDE_ASM(os/code_39db0_len_8a0, nuScEventHandler); +INCLUDE_API_ASM(os/code_39db0_len_8a0, nuScEventHandler); -INCLUDE_ASM(os/code_39db0_len_8a0, nuScEventBroadcast); +INCLUDE_API_ASM(os/code_39db0_len_8a0, nuScEventBroadcast); -INCLUDE_ASM(os/code_39db0_len_8a0, nuScWaitTaskReady); +INCLUDE_API_ASM(os/code_39db0_len_8a0, nuScWaitTaskReady); diff --git a/src/os/code_3a650_len_40.c b/src/os/code_3a650_len_40.c index 2b217115e6..df1cec978e 100644 --- a/src/os/code_3a650_len_40.c +++ b/src/os/code_3a650_len_40.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_ASM(os/code_3a650_len_40, nuGfxFuncSet); +INCLUDE_API_ASM(os/code_3a650_len_40, nuGfxFuncSet); diff --git a/src/os/code_3a690_len_40.c b/src/os/code_3a690_len_40.c index 5f35021e0a..d9fe4c46c1 100644 --- a/src/os/code_3a690_len_40.c +++ b/src/os/code_3a690_len_40.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_ASM(os/code_3a690_len_40, nuGfxPreNMIFuncSet); +INCLUDE_API_ASM(os/code_3a690_len_40, nuGfxPreNMIFuncSet); diff --git a/src/os/code_3a6d0_len_20.c b/src/os/code_3a6d0_len_20.c index ddeb7f1d14..e24acad2a2 100644 --- a/src/os/code_3a6d0_len_20.c +++ b/src/os/code_3a6d0_len_20.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_ASM(os/code_3a6d0_len_20, nuGfxTaskAllEndWait); +INCLUDE_API_ASM(os/code_3a6d0_len_20, nuGfxTaskAllEndWait); diff --git a/src/os/code_3a6f0_len_110.c b/src/os/code_3a6f0_len_110.c index f0c341ae03..2613284fee 100644 --- a/src/os/code_3a6f0_len_110.c +++ b/src/os/code_3a6f0_len_110.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_ASM(os/code_3a6f0_len_110, nuGfxSetCfb); +INCLUDE_API_ASM(os/code_3a6f0_len_110, nuGfxSetCfb); diff --git a/src/os/code_3a800_len_30.c b/src/os/code_3a800_len_30.c index 208039650e..1d16bac94f 100644 --- a/src/os/code_3a800_len_30.c +++ b/src/os/code_3a800_len_30.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_ASM(os/code_3a800_len_30, nuGfxDisplayOff); +INCLUDE_API_ASM(os/code_3a800_len_30, nuGfxDisplayOff); diff --git a/src/os/code_3a830_len_20.c b/src/os/code_3a830_len_20.c index a866fc2323..f04aee5175 100644 --- a/src/os/code_3a830_len_20.c +++ b/src/os/code_3a830_len_20.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_ASM(os/code_3a830_len_20, nuGfxDisplayOn); +INCLUDE_API_ASM(os/code_3a830_len_20, nuGfxDisplayOn); diff --git a/src/os/code_3a850_le_a40.c b/src/os/code_3a850_le_a40.c index 64790791cf..32c50bd429 100644 --- a/src/os/code_3a850_le_a40.c +++ b/src/os/code_3a850_le_a40.c @@ -1,44 +1,44 @@ #include "common.h" -INCLUDE_ASM(os/code_3a850_le_a40, nuPiInit); +INCLUDE_API_ASM(os/code_3a850_le_a40, nuPiInit); -INCLUDE_ASM(os/code_3a850_le_a40, nuPiReadRom); +INCLUDE_API_ASM(os/code_3a850_le_a40, nuPiReadRom); -INCLUDE_ASM(os/code_3a850_le_a40, nuGfxInit); +INCLUDE_API_ASM(os/code_3a850_le_a40, nuGfxInit); -INCLUDE_ASM(os/code_3a850_le_a40, nuContInit); +INCLUDE_API_ASM(os/code_3a850_le_a40, nuContInit); -INCLUDE_ASM(os/code_3a850_le_a40, nuContDataGet); +INCLUDE_API_ASM(os/code_3a850_le_a40, nuContDataGet); -INCLUDE_ASM(os/code_3a850_le_a40, nuContPakMgrInit); +INCLUDE_API_ASM(os/code_3a850_le_a40, nuContPakMgrInit); -INCLUDE_ASM(os/code_3a850_le_a40, nuContPakMgrRemove); +INCLUDE_API_ASM(os/code_3a850_le_a40, nuContPakMgrRemove); -INCLUDE_ASM(os/code_3a850_le_a40, contPakOpen); +INCLUDE_API_ASM(os/code_3a850_le_a40, contPakOpen); -INCLUDE_ASM(os/code_3a850_le_a40, contPakFree); +INCLUDE_API_ASM(os/code_3a850_le_a40, contPakFree); -INCLUDE_ASM(os/code_3a850_le_a40, contPakFileReadWrite); +INCLUDE_API_ASM(os/code_3a850_le_a40, contPakFileReadWrite); -INCLUDE_ASM(os/code_3a850_le_a40, contPakFileOpen); +INCLUDE_API_ASM(os/code_3a850_le_a40, contPakFileOpen); -INCLUDE_ASM(os/code_3a850_le_a40, contPakFileDelete); +INCLUDE_API_ASM(os/code_3a850_le_a40, contPakFileDelete); -INCLUDE_ASM(os/code_3a850_le_a40, contPakFileState); +INCLUDE_API_ASM(os/code_3a850_le_a40, contPakFileState); -INCLUDE_ASM(os/code_3a850_le_a40, contPakFileNum); +INCLUDE_API_ASM(os/code_3a850_le_a40, contPakFileNum); -INCLUDE_ASM(os/code_3a850_le_a40, contPakRepairId); +INCLUDE_API_ASM(os/code_3a850_le_a40, contPakRepairId); #undef osMotorStop s32 INCLUDE_ASM(os/code_3a850_le_a40, osMotorStop, OSPfs* unk); -INCLUDE_ASM(os/code_3a850_le_a40, contRmbControl); +INCLUDE_API_ASM(os/code_3a850_le_a40, contRmbControl); -INCLUDE_ASM(os/code_3a850_le_a40, nuContRmbMgrInit); +INCLUDE_API_ASM(os/code_3a850_le_a40, nuContRmbMgrInit); -INCLUDE_ASM(os/code_3a850_le_a40, nuContRmbMgrRemove); +INCLUDE_API_ASM(os/code_3a850_le_a40, nuContRmbMgrRemove); -INCLUDE_ASM(os/code_3a850_le_a40, contRmbCheckMesg); +INCLUDE_API_ASM(os/code_3a850_le_a40, contRmbCheckMesg); -INCLUDE_ASM(os/code_3a850_le_a40, contRmbStartMesg); +INCLUDE_API_ASM(os/code_3a850_le_a40, contRmbStartMesg); diff --git a/src/os/code_3b290_len_100.c b/src/os/code_3b290_len_100.c index f73a6a0014..02fc1c387a 100644 --- a/src/os/code_3b290_len_100.c +++ b/src/os/code_3b290_len_100.c @@ -1,5 +1,5 @@ #include "common.h" -INCLUDE_ASM(os/code_3b290_len_100, nuContRmbStart); +INCLUDE_API_ASM(os/code_3b290_len_100, nuContRmbStart); -INCLUDE_ASM(os/code_3b290_len_100, nuContRmbCheck); +INCLUDE_API_ASM(os/code_3b290_len_100, nuContRmbCheck); diff --git a/src/os/code_3b390_len_110.c b/src/os/code_3b390_len_110.c index d9ea3a277d..ca6b62b7b5 100644 --- a/src/os/code_3b390_len_110.c +++ b/src/os/code_3b390_len_110.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_ASM(os/code_3b390_len_110, nuContRmbModeSet); +INCLUDE_API_ASM(os/code_3b390_len_110, nuContRmbModeSet); diff --git a/src/os/code_3b4a0_len_270.c b/src/os/code_3b4a0_len_270.c index 73b9f5e5ad..e62eb1c45a 100644 --- a/src/os/code_3b4a0_len_270.c +++ b/src/os/code_3b4a0_len_270.c @@ -1,11 +1,11 @@ #include "common.h" -INCLUDE_ASM(os/code_3b4a0_len_270, nuContRmbForceStop); +INCLUDE_API_ASM(os/code_3b4a0_len_270, nuContRmbForceStop); -INCLUDE_ASM(os/code_3b4a0_len_270, nuContRmbForceStopEnd); +INCLUDE_API_ASM(os/code_3b4a0_len_270, nuContRmbForceStopEnd); -INCLUDE_ASM(os/code_3b4a0_len_270, nuPiReadRomOverlay); +INCLUDE_API_ASM(os/code_3b4a0_len_270, nuPiReadRomOverlay); -INCLUDE_ASM(os/code_3b4a0_len_270, nuGfxThreadStart); +INCLUDE_API_ASM(os/code_3b4a0_len_270, nuGfxThreadStart); -INCLUDE_ASM(os/code_3b4a0_len_270, nuGfxThread); +INCLUDE_API_ASM(os/code_3b4a0_len_270, nuGfxThread); diff --git a/src/os/code_3b710_len_40.c b/src/os/code_3b710_len_40.c index db6435f469..a7cee58c6b 100644 --- a/src/os/code_3b710_len_40.c +++ b/src/os/code_3b710_len_40.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_ASM(os/code_3b710_len_40, nuGfxSwapCfbFuncSet); +INCLUDE_API_ASM(os/code_3b710_len_40, nuGfxSwapCfbFuncSet); diff --git a/src/os/code_3b770_len_80.c b/src/os/code_3b770_len_80.c index 0f8b1c9d0b..72d297d3ba 100644 --- a/src/os/code_3b770_len_80.c +++ b/src/os/code_3b770_len_80.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_ASM(os/code_3b770_len_80, nuGfxRetraceWait); +INCLUDE_API_ASM(os/code_3b770_len_80, nuGfxRetraceWait); diff --git a/src/os/code_3b7f0_len_120.c b/src/os/code_3b7f0_len_120.c index 62ccb668e0..e7555b64c6 100644 --- a/src/os/code_3b7f0_len_120.c +++ b/src/os/code_3b7f0_len_120.c @@ -1,5 +1,5 @@ #include "common.h" -INCLUDE_ASM(os/code_3b7f0_len_120, nuSiCallBackAdd); +INCLUDE_API_ASM(os/code_3b7f0_len_120, nuSiCallBackAdd); -INCLUDE_ASM(os/code_3b7f0_len_120, nuSiCallBackRemove); +INCLUDE_API_ASM(os/code_3b7f0_len_120, nuSiCallBackRemove); diff --git a/src/os/code_3b910_len_410.c b/src/os/code_3b910_len_410.c index ffe8fba1ba..7cd3095407 100644 --- a/src/os/code_3b910_len_410.c +++ b/src/os/code_3b910_len_410.c @@ -1,21 +1,21 @@ #include "common.h" -INCLUDE_ASM(os/code_3b910_len_410, nuContMgrInit); +INCLUDE_API_ASM(os/code_3b910_len_410, nuContMgrInit); -INCLUDE_ASM(os/code_3b910_len_410, nuContMgrRemove); +INCLUDE_API_ASM(os/code_3b910_len_410, nuContMgrRemove); -INCLUDE_ASM(os/code_3b910_len_410, nuContDataClose); +INCLUDE_API_ASM(os/code_3b910_len_410, nuContDataClose); -INCLUDE_ASM(os/code_3b910_len_410, nuContDataOpen); +INCLUDE_API_ASM(os/code_3b910_len_410, nuContDataOpen); -INCLUDE_ASM(os/code_3b910_len_410, contRetrace); +INCLUDE_API_ASM(os/code_3b910_len_410, contRetrace); -INCLUDE_ASM(os/code_3b910_len_410, contReadData); +INCLUDE_API_ASM(os/code_3b910_len_410, contReadData); -INCLUDE_ASM(os/code_3b910_len_410, contReadNW); +INCLUDE_API_ASM(os/code_3b910_len_410, contReadNW); -INCLUDE_ASM(os/code_3b910_len_410, contQuery); +INCLUDE_API_ASM(os/code_3b910_len_410, contQuery); -INCLUDE_ASM(os/code_3b910_len_410, nuContDataLock); +INCLUDE_API_ASM(os/code_3b910_len_410, nuContDataLock); -INCLUDE_ASM(os/code_3b910_len_410, nuContDataUnLock); +INCLUDE_API_ASM(os/code_3b910_len_410, nuContDataUnLock); diff --git a/src/os/code_3bd20_len_c0.c b/src/os/code_3bd20_len_c0.c index 9b43c9fbd0..a744a47af2 100644 --- a/src/os/code_3bd20_len_c0.c +++ b/src/os/code_3bd20_len_c0.c @@ -1,5 +1,5 @@ #include "common.h" -INCLUDE_ASM(os/code_3bd20_len_c0, nuContQueryRead); +INCLUDE_API_ASM(os/code_3bd20_len_c0, nuContQueryRead); OSIntMask INCLUDE_ASM(os/code_3bd20_len_c0, osSetIntMask, OSIntMask mask); diff --git a/src/os/code_3bde0_len_3e0.c b/src/os/code_3bde0_len_3e0.c index fa1b465c14..b2782b535c 100644 --- a/src/os/code_3bde0_len_3e0.c +++ b/src/os/code_3bde0_len_3e0.c @@ -2,6 +2,6 @@ void INCLUDE_ASM(os/code_3bde0_len_3e0, osCreatePiManager, OSPri prio, OSMesgQueue* queue, OSMesg* mesg, s32 unk); -INCLUDE_ASM(os/code_3bde0_len_3e0, osEPiRawStartDma); +INCLUDE_API_ASM(os/code_3bde0_len_3e0, osEPiRawStartDma); s32 INCLUDE_ASM(os/code_3bde0_len_3e0, osEPiWriteIo, OSPiHandle* handle, u32 unk1, u32 unk2); diff --git a/src/os/code_3c490_len_3c0.c b/src/os/code_3c490_len_3c0.c index f19ebb5b9e..5c7a6b4074 100644 --- a/src/os/code_3c490_len_3c0.c +++ b/src/os/code_3c490_len_3c0.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_ASM(os/code_3c490_len_3c0, osDevMgrMain); +INCLUDE_API_ASM(os/code_3c490_len_3c0, osDevMgrMain); diff --git a/src/os/code_3c850_len_f0.c b/src/os/code_3c850_len_f0.c index a8ec3a5013..4254253ce3 100644 --- a/src/os/code_3c850_len_f0.c +++ b/src/os/code_3c850_len_f0.c @@ -1,7 +1,7 @@ #include "common.h" -INCLUDE_ASM(os/code_3c850_len_f0, osPiCreateAccessQueue); +INCLUDE_API_ASM(os/code_3c850_len_f0, osPiCreateAccessQueue); -INCLUDE_ASM(os/code_3c850_len_f0, osPiGetAccess); +INCLUDE_API_ASM(os/code_3c850_len_f0, osPiGetAccess); -INCLUDE_ASM(os/code_3c850_len_f0, osPiRelAccess); +INCLUDE_API_ASM(os/code_3c850_len_f0, osPiRelAccess); diff --git a/src/os/code_3cd00_len_5f0.c b/src/os/code_3cd00_len_5f0.c index f71fa6449a..e06ec63a20 100644 --- a/src/os/code_3cd00_len_5f0.c +++ b/src/os/code_3cd00_len_5f0.c @@ -8,12 +8,12 @@ s32 INCLUDE_ASM(os/code_3cd00_len_5f0, osContStartReadData, OSMesgQueue* queue); void INCLUDE_ASM(os/code_3cd00_len_5f0, osContGetReadData, OSContPad* pad); -INCLUDE_ASM(os/code_3cd00_len_5f0, osPackReadData); +INCLUDE_API_ASM(os/code_3cd00_len_5f0, osPackReadData); s32 INCLUDE_ASM(os/code_3cd00_len_5f0, osContInit, OSMesgQueue* queue, u8* unk, OSContStatus* status); -INCLUDE_ASM(os/code_3cd00_len_5f0, osContGetInitData); +INCLUDE_API_ASM(os/code_3cd00_len_5f0, osContGetInitData); -INCLUDE_ASM(os/code_3cd00_len_5f0, osPackRequestData); +INCLUDE_API_ASM(os/code_3cd00_len_5f0, osPackRequestData); u32 INCLUDE_ASM(os/code_3cd00_len_5f0, osVirtualToPhysical, void* virt); diff --git a/src/os/code_3d2f0_len_10.c b/src/os/code_3d2f0_len_10.c index 479db48ab4..885087402c 100644 --- a/src/os/code_3d2f0_len_10.c +++ b/src/os/code_3d2f0_len_10.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_ASM(os/code_3d2f0_len_10, sqrtf); +INCLUDE_API_ASM(os/code_3d2f0_len_10, sqrtf); diff --git a/src/os/code_3f6d0_len_320.c b/src/os/code_3f6d0_len_320.c index 2a71770796..3b8e9f872f 100644 --- a/src/os/code_3f6d0_len_320.c +++ b/src/os/code_3f6d0_len_320.c @@ -1,5 +1,5 @@ #include "common.h" -INCLUDE_ASM(os/code_3f6d0_len_320, guRotateAnglesF); +INCLUDE_API_ASM(os/code_3f6d0_len_320, guRotateAnglesF); -INCLUDE_ASM(os/code_3f6d0_len_320, guRotateAngles); +INCLUDE_API_ASM(os/code_3f6d0_len_320, guRotateAngles); diff --git a/src/os/code_3fa50_len_f60.c b/src/os/code_3fa50_len_f60.c index 8371b87db6..972028197e 100644 --- a/src/os/code_3fa50_len_f60.c +++ b/src/os/code_3fa50_len_f60.c @@ -4,11 +4,11 @@ void INCLUDE_ASM(os/code_3fa50_len_f60, bcopy, const void* src, void* dst, int s void INCLUDE_ASM(os/code_3fa50_len_f60, bzero, void* buf, int size); -INCLUDE_ASM(os/code_3fa50_len_f60, strchr); +INCLUDE_API_ASM(os/code_3fa50_len_f60, strchr); -INCLUDE_ASM(os/code_3fa50_len_f60, strlen); +INCLUDE_API_ASM(os/code_3fa50_len_f60, strlen); -INCLUDE_ASM(os/code_3fa50_len_f60, memcpy); +INCLUDE_API_ASM(os/code_3fa50_len_f60, memcpy); INCLUDE_ASM(os/code_3fa50_len_f60, _Printf); @@ -16,6 +16,6 @@ INCLUDE_ASM(os/code_3fa50_len_f60, _Putfld); int INCLUDE_ASM(os/code_3fa50_len_f60, sprintf, char* s, const char* fmt, ...); -INCLUDE_ASM(os/code_3fa50_len_f60, proutSprintf); +INCLUDE_API_ASM(os/code_3fa50_len_f60, proutSprintf); void INCLUDE_ASM(os/code_3fa50_len_f60, osCreateMesgQueue, OSMesgQueue* queue, OSMesg* mesg, s32 unk); diff --git a/src/os/code_41050_len_120.c b/src/os/code_41050_len_120.c index c2664d2140..2944a41143 100644 --- a/src/os/code_41050_len_120.c +++ b/src/os/code_41050_len_120.c @@ -4,4 +4,4 @@ void INCLUDE_ASM(os/code_41050_len_120, osSpTaskYield, void); OSYieldResult INCLUDE_ASM(os/code_41050_len_120, osSpTaskYielded, OSTask* tp); -INCLUDE_ASM(os/code_41050_len_120, osSiRawStartDma); +INCLUDE_API_ASM(os/code_41050_len_120, osSiRawStartDma); diff --git a/src/os/code_41170_len_f0.c b/src/os/code_41170_len_f0.c index b14ade9d9c..d8df96c026 100644 --- a/src/os/code_41170_len_f0.c +++ b/src/os/code_41170_len_f0.c @@ -1,7 +1,7 @@ #include "common.h" -INCLUDE_ASM(os/code_41170_len_f0, osSiCreateAccessQueue); +INCLUDE_API_ASM(os/code_41170_len_f0, osSiCreateAccessQueue); -INCLUDE_ASM(os/code_41170_len_f0, osSiGetAccess); +INCLUDE_API_ASM(os/code_41170_len_f0, osSiGetAccess); -INCLUDE_ASM(os/code_41170_len_f0, osSiRelAccess); +INCLUDE_API_ASM(os/code_41170_len_f0, osSiRelAccess); diff --git a/src/os/code_41600_len_40.c b/src/os/code_41600_len_40.c index 04064c8068..89ade6bbae 100644 --- a/src/os/code_41600_len_40.c +++ b/src/os/code_41600_len_40.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_ASM(os/code_41600_len_40, osDequeueThread); +INCLUDE_API_ASM(os/code_41600_len_40, osDequeueThread); diff --git a/src/os/code_41690_len_10.c b/src/os/code_41690_len_10.c index d667b4174a..89de7cabe6 100644 --- a/src/os/code_41690_len_10.c +++ b/src/os/code_41690_len_10.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_ASM(os/code_41690_len_10, osGetActiveQueue); +INCLUDE_API_ASM(os/code_41690_len_10, osGetActiveQueue); diff --git a/src/os/code_41750_len_450.c b/src/os/code_41750_len_450.c index c4220ed9e0..ae7f165ad0 100644 --- a/src/os/code_41750_len_450.c +++ b/src/os/code_41750_len_450.c @@ -3,10 +3,10 @@ int INCLUDE_ASM(os/code_41750_len_450, osSetTimer, OSTimer* timer, OSTime start, OSTime end, OSMesgQueue* queue, OSMesg mesg); -INCLUDE_ASM(os/code_41750_len_450, osTimerServicesInit); +INCLUDE_API_ASM(os/code_41750_len_450, osTimerServicesInit); -INCLUDE_ASM(os/code_41750_len_450, osTimerInterrupt); +INCLUDE_API_ASM(os/code_41750_len_450, osTimerInterrupt); -INCLUDE_ASM(os/code_41750_len_450, osSetTimerIntr); +INCLUDE_API_ASM(os/code_41750_len_450, osSetTimerIntr); -INCLUDE_ASM(os/code_41750_len_450, osInsertTimer); +INCLUDE_API_ASM(os/code_41750_len_450, osInsertTimer); diff --git a/src/os/code_41c60_len_c0.c b/src/os/code_41c60_len_c0.c index 8ad3ae6604..5c45e1546c 100644 --- a/src/os/code_41c60_len_c0.c +++ b/src/os/code_41c60_len_c0.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_ASM(os/code_41c60_len_c0, osProbeTLB); +INCLUDE_API_ASM(os/code_41c60_len_c0, osProbeTLB); diff --git a/src/os/code_41e70_len_340.c b/src/os/code_41e70_len_340.c index 1ea52de6df..c944c42df3 100644 --- a/src/os/code_41e70_len_340.c +++ b/src/os/code_41e70_len_340.c @@ -2,4 +2,4 @@ void INCLUDE_ASM(os/code_41e70_len_340, osCreateViManager, OSPri pri); -INCLUDE_ASM(os/code_41e70_len_340, viMgrMain); +INCLUDE_API_ASM(os/code_41e70_len_340, viMgrMain); diff --git a/src/os/code_42470_len_310.c b/src/os/code_42470_len_310.c index b9f8989820..d427db89c3 100644 --- a/src/os/code_42470_len_310.c +++ b/src/os/code_42470_len_310.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_ASM(os/code_42470_len_310, osViSwapContext); +INCLUDE_API_ASM(os/code_42470_len_310, osViSwapContext); diff --git a/src/os/code_42d60_len_80.c b/src/os/code_42d60_len_80.c index 18edf426a6..6f1e90d8b5 100644 --- a/src/os/code_42d60_len_80.c +++ b/src/os/code_42d60_len_80.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_ASM(os/code_42d60_len_80, guMtxCat); +INCLUDE_API_ASM(os/code_42d60_len_80, guMtxCat); diff --git a/src/os/code_43200_len_7c0.c b/src/os/code_43200_len_7c0.c index 32c01bc815..79a9d96bac 100644 --- a/src/os/code_43200_len_7c0.c +++ b/src/os/code_43200_len_7c0.c @@ -1,10 +1,10 @@ #include "common.h" -INCLUDE_ASM(os/code_43200_len_7c0, osMotorAccess); +INCLUDE_API_ASM(os/code_43200_len_7c0, osMotorAccess); s32 INCLUDE_ASM(os/code_43200_len_7c0, osMotorInit, OSMesgQueue* queue, OSPfs* pfs, int unk); s32 INCLUDE_ASM(os/code_43200_len_7c0, osPfsAllocateFile, OSPfs* pfs, u16 unk1, u32 unk2, u8* unk3, u8* unk4, int unk5, s32* unk6); -INCLUDE_ASM(os/code_43200_len_7c0, osPfsDeclearPage); +INCLUDE_API_ASM(os/code_43200_len_7c0, osPfsDeclearPage); diff --git a/src/os/code_439c0_len_220.c b/src/os/code_439c0_len_220.c index 7f413f2915..adce66a78b 100644 --- a/src/os/code_439c0_len_220.c +++ b/src/os/code_439c0_len_220.c @@ -2,4 +2,4 @@ s32 INCLUDE_ASM(os/code_439c0_len_220, osPfsDeleteFile, OSPfs* pfs, u16 unk1, u32 unk2, u8* unk3, u8* unk4); -INCLUDE_ASM(os/code_439c0_len_220, osPfsReleasePages); +INCLUDE_API_ASM(os/code_439c0_len_220, osPfsReleasePages); diff --git a/src/os/code_44380_len_4e0.c b/src/os/code_44380_len_4e0.c index 1939372d28..d92a427a0f 100644 --- a/src/os/code_44380_len_4e0.c +++ b/src/os/code_44380_len_4e0.c @@ -6,4 +6,4 @@ s32 INCLUDE_ASM(os/code_44380_len_4e0, osPfsNumFiles, OSPfs* pfs, s32* unk1, s32 s32 INCLUDE_ASM(os/code_44380_len_4e0, osPfsInitPak, OSMesgQueue* queue, OSPfs* pfs, int unk1); -INCLUDE_ASM(os/code_44380_len_4e0, osPfsCheckRamArea); +INCLUDE_API_ASM(os/code_44380_len_4e0, osPfsCheckRamArea); diff --git a/src/os/code_448c0_len_210.c b/src/os/code_448c0_len_210.c index 56172ce162..cc34fbcd75 100644 --- a/src/os/code_448c0_len_210.c +++ b/src/os/code_448c0_len_210.c @@ -1,7 +1,7 @@ #include "common.h" -INCLUDE_ASM(os/code_448c0_len_210, osPfsGetStatus); +INCLUDE_API_ASM(os/code_448c0_len_210, osPfsGetStatus); -INCLUDE_ASM(os/code_448c0_len_210, osPfsRequestOneChannel); +INCLUDE_API_ASM(os/code_448c0_len_210, osPfsRequestOneChannel); -INCLUDE_ASM(os/code_448c0_len_210, osPfsGetOneChannelData); +INCLUDE_API_ASM(os/code_448c0_len_210, osPfsGetOneChannelData); diff --git a/src/os/code_44ad0_len_70.c b/src/os/code_44ad0_len_70.c index 567cbf4454..afb42d92b7 100644 --- a/src/os/code_44ad0_len_70.c +++ b/src/os/code_44ad0_len_70.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_ASM(os/code_44ad0_len_70, osPfsSelectBank); +INCLUDE_API_ASM(os/code_44ad0_len_70, osPfsSelectBank); diff --git a/src/os/code_44b40_len_a90.c b/src/os/code_44b40_len_a90.c index 2d837bb6ae..5d39b83ba9 100644 --- a/src/os/code_44b40_len_a90.c +++ b/src/os/code_44b40_len_a90.c @@ -1,15 +1,15 @@ #include "common.h" -INCLUDE_ASM(os/code_44b40_len_a90, osSumcalc); +INCLUDE_API_ASM(os/code_44b40_len_a90, osSumcalc); -INCLUDE_ASM(os/code_44b40_len_a90, osIdCheckSum); +INCLUDE_API_ASM(os/code_44b40_len_a90, osIdCheckSum); -INCLUDE_ASM(os/code_44b40_len_a90, osRepairPackId); +INCLUDE_API_ASM(os/code_44b40_len_a90, osRepairPackId); -INCLUDE_ASM(os/code_44b40_len_a90, osCheckPackId); +INCLUDE_API_ASM(os/code_44b40_len_a90, osCheckPackId); -INCLUDE_ASM(os/code_44b40_len_a90, osGetId); +INCLUDE_API_ASM(os/code_44b40_len_a90, osGetId); -INCLUDE_ASM(os/code_44b40_len_a90, osCheckId); +INCLUDE_API_ASM(os/code_44b40_len_a90, osCheckId); -INCLUDE_ASM(os/code_44b40_len_a90, osPfsRWInode); +INCLUDE_API_ASM(os/code_44b40_len_a90, osPfsRWInode); diff --git a/src/os/code_455d0_len_1f0.c b/src/os/code_455d0_len_1f0.c index da7f6114af..3124e76f05 100644 --- a/src/os/code_455d0_len_1f0.c +++ b/src/os/code_455d0_len_1f0.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_ASM(os/code_455d0_len_1f0, osContRamRead); +INCLUDE_API_ASM(os/code_455d0_len_1f0, osContRamRead); diff --git a/src/os/code_457c0_len_270.c b/src/os/code_457c0_len_270.c index d9b6ec7c84..a94fd29dfd 100644 --- a/src/os/code_457c0_len_270.c +++ b/src/os/code_457c0_len_270.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_ASM(os/code_457c0_len_270, osContRamWrite); +INCLUDE_API_ASM(os/code_457c0_len_270, osContRamWrite); diff --git a/src/os/code_45df0_len_970.c b/src/os/code_45df0_len_970.c index f6ec7beb76..0a677e7eb5 100644 --- a/src/os/code_45df0_len_970.c +++ b/src/os/code_45df0_len_970.c @@ -2,13 +2,13 @@ INCLUDE_ASM(os/code_45df0_len_970, func_8006A9F0); -INCLUDE_ASM(os/code_45df0_len_970, osExceptionPreamble); +INCLUDE_API_ASM(os/code_45df0_len_970, osExceptionPreamble); -INCLUDE_ASM(os/code_45df0_len_970, savecontext); +INCLUDE_API_ASM(os/code_45df0_len_970, savecontext); -INCLUDE_ASM(os/code_45df0_len_970, savercp); +INCLUDE_API_ASM(os/code_45df0_len_970, savercp); -INCLUDE_ASM(os/code_45df0_len_970, endrcp); +INCLUDE_API_ASM(os/code_45df0_len_970, endrcp); INCLUDE_ASM(os/code_45df0_len_970, handle_interrupt); @@ -18,41 +18,41 @@ INCLUDE_ASM(os/code_45df0_len_970, IP6_Hdlr); INCLUDE_ASM(os/code_45df0_len_970, IP7_Hdlr); -INCLUDE_ASM(os/code_45df0_len_970, counter); +INCLUDE_API_ASM(os/code_45df0_len_970, counter); -INCLUDE_ASM(os/code_45df0_len_970, cart); +INCLUDE_API_ASM(os/code_45df0_len_970, cart); -INCLUDE_ASM(os/code_45df0_len_970, rcp); +INCLUDE_API_ASM(os/code_45df0_len_970, rcp); INCLUDE_ASM(os/code_45df0_len_970, sp_other_break); -INCLUDE_ASM(os/code_45df0_len_970, vi); +INCLUDE_API_ASM(os/code_45df0_len_970, vi); -INCLUDE_ASM(os/code_45df0_len_970, ai); +INCLUDE_API_ASM(os/code_45df0_len_970, ai); -INCLUDE_ASM(os/code_45df0_len_970, si); +INCLUDE_API_ASM(os/code_45df0_len_970, si); -INCLUDE_ASM(os/code_45df0_len_970, pi); +INCLUDE_API_ASM(os/code_45df0_len_970, pi); -INCLUDE_ASM(os/code_45df0_len_970, dp); +INCLUDE_API_ASM(os/code_45df0_len_970, dp); -INCLUDE_ASM(os/code_45df0_len_970, NoMoreRcpInts); +INCLUDE_API_ASM(os/code_45df0_len_970, NoMoreRcpInts); -INCLUDE_ASM(os/code_45df0_len_970, prenmi); +INCLUDE_API_ASM(os/code_45df0_len_970, prenmi); -INCLUDE_ASM(os/code_45df0_len_970, firstnmi); +INCLUDE_API_ASM(os/code_45df0_len_970, firstnmi); -INCLUDE_ASM(os/code_45df0_len_970, sw2); +INCLUDE_API_ASM(os/code_45df0_len_970, sw2); -INCLUDE_ASM(os/code_45df0_len_970, sw1); +INCLUDE_API_ASM(os/code_45df0_len_970, sw1); INCLUDE_ASM(os/code_45df0_len_970, handle_break); -INCLUDE_ASM(os/code_45df0_len_970, redispatch); +INCLUDE_API_ASM(os/code_45df0_len_970, redispatch); -INCLUDE_ASM(os/code_45df0_len_970, enqueueRunning); +INCLUDE_API_ASM(os/code_45df0_len_970, enqueueRunning); -INCLUDE_ASM(os/code_45df0_len_970, panic); +INCLUDE_API_ASM(os/code_45df0_len_970, panic); INCLUDE_ASM(os/code_45df0_len_970, send_mesg); @@ -60,18 +60,18 @@ INCLUDE_ASM(os/code_45df0_len_970, send_done); INCLUDE_ASM(os/code_45df0_len_970, handle_CPU); -INCLUDE_ASM(os/code_45df0_len_970, osEnqueueAndYield); +INCLUDE_API_ASM(os/code_45df0_len_970, osEnqueueAndYield); -INCLUDE_ASM(os/code_45df0_len_970, noEnqueue); +INCLUDE_API_ASM(os/code_45df0_len_970, noEnqueue); -INCLUDE_ASM(os/code_45df0_len_970, osEnqueueThread); +INCLUDE_API_ASM(os/code_45df0_len_970, osEnqueueThread); -INCLUDE_ASM(os/code_45df0_len_970, osPopThread); +INCLUDE_API_ASM(os/code_45df0_len_970, osPopThread); -INCLUDE_ASM(os/code_45df0_len_970, osNop); +INCLUDE_API_ASM(os/code_45df0_len_970, osNop); -INCLUDE_ASM(os/code_45df0_len_970, osDispatchThread); +INCLUDE_API_ASM(os/code_45df0_len_970, osDispatchThread); -INCLUDE_ASM(os/code_45df0_len_970, osDispatchThreadSave); +INCLUDE_API_ASM(os/code_45df0_len_970, osDispatchThreadSave); void INCLUDE_ASM(os/code_45df0_len_970, osCleanupThread, void); diff --git a/src/os/code_467f0_len_90.c b/src/os/code_467f0_len_90.c index b3ecb6bc9f..b8c2370fa7 100644 --- a/src/os/code_467f0_len_90.c +++ b/src/os/code_467f0_len_90.c @@ -1,5 +1,5 @@ #include "common.h" -INCLUDE_ASM(os/code_467f0_len_90, osSetGlobalIntMask); +INCLUDE_API_ASM(os/code_467f0_len_90, osSetGlobalIntMask); -INCLUDE_ASM(os/code_467f0_len_90, osResetGlobalIntMask); +INCLUDE_API_ASM(os/code_467f0_len_90, osResetGlobalIntMask); diff --git a/src/os/code_46880_len_260.c b/src/os/code_46880_len_260.c index 5d07fa8185..19fcdf50c5 100644 --- a/src/os/code_46880_len_260.c +++ b/src/os/code_46880_len_260.c @@ -1,7 +1,7 @@ #include "common.h" -INCLUDE_ASM(os/code_46880_len_260, osPiRawStartDma); +INCLUDE_API_ASM(os/code_46880_len_260, osPiRawStartDma); -INCLUDE_ASM(os/code_46880_len_260, osPiGetCmdQueue); +INCLUDE_API_ASM(os/code_46880_len_260, osPiGetCmdQueue); -INCLUDE_ASM(os/code_46880_len_260, osEPiRawReadIo); +INCLUDE_API_ASM(os/code_46880_len_260, osEPiRawReadIo); diff --git a/src/os/code_46ae0_len_170.c b/src/os/code_46ae0_len_170.c index 2c1d711dcb..7f6db51168 100644 --- a/src/os/code_46ae0_len_170.c +++ b/src/os/code_46ae0_len_170.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_ASM(os/code_46ae0_len_170, osEPiRawWriteIo); +INCLUDE_API_ASM(os/code_46ae0_len_170, osEPiRawWriteIo); diff --git a/src/os/code_46c50_len_20.c b/src/os/code_46c50_len_20.c index 78cabbc0c2..d5325c233a 100644 --- a/src/os/code_46c50_len_20.c +++ b/src/os/code_46c50_len_20.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_ASM(os/code_46c50_len_20, osAiDeviceBusy); +INCLUDE_API_ASM(os/code_46c50_len_20, osAiDeviceBusy); diff --git a/src/os/code_46c70_len_e00.c b/src/os/code_46c70_len_e00.c index 1570ead23c..5f713fd4e1 100644 --- a/src/os/code_46c70_len_e00.c +++ b/src/os/code_46c70_len_e00.c @@ -10,4 +10,4 @@ INCLUDE_ASM(os/code_46c70_len_e00, _Ldunscale); INCLUDE_ASM(os/code_46c70_len_e00, _Genld); -INCLUDE_ASM(os/code_46c70_len_e00, osGetCause); +INCLUDE_API_ASM(os/code_46c70_len_e00, osGetCause); diff --git a/src/os/code_47a70_len_10.c b/src/os/code_47a70_len_10.c index 7e4c2dc5e6..f25bc9e811 100644 --- a/src/os/code_47a70_len_10.c +++ b/src/os/code_47a70_len_10.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_ASM(os/code_47a70_len_10, osGetSR); +INCLUDE_API_ASM(os/code_47a70_len_10, osGetSR); diff --git a/src/os/code_47a80_len_10.c b/src/os/code_47a80_len_10.c index c0624ab33c..c40077b8f6 100644 --- a/src/os/code_47a80_len_10.c +++ b/src/os/code_47a80_len_10.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_ASM(os/code_47a80_len_10, osSetCompare); +INCLUDE_API_ASM(os/code_47a80_len_10, osSetCompare); diff --git a/src/os/code_47a90_len_50.c b/src/os/code_47a90_len_50.c index fe2d5d481b..f5637110e5 100644 --- a/src/os/code_47a90_len_50.c +++ b/src/os/code_47a90_len_50.c @@ -1,9 +1,9 @@ #include "common.h" -INCLUDE_ASM(os/code_47a90_len_50, osSetFpcCsr); +INCLUDE_API_ASM(os/code_47a90_len_50, osSetFpcCsr); -INCLUDE_ASM(os/code_47a90_len_50, osSetSR); +INCLUDE_API_ASM(os/code_47a90_len_50, osSetSR); -INCLUDE_ASM(os/code_47a90_len_50, osSetWatchLo); +INCLUDE_API_ASM(os/code_47a90_len_50, osSetWatchLo); -INCLUDE_ASM(os/code_47a90_len_50, osSpDeviceBusy); +INCLUDE_API_ASM(os/code_47a90_len_50, osSpDeviceBusy); diff --git a/src/os/code_47ae0_len_e0.c b/src/os/code_47ae0_len_e0.c index cf17a479e6..98ea7f17a0 100644 --- a/src/os/code_47ae0_len_e0.c +++ b/src/os/code_47ae0_len_e0.c @@ -1,9 +1,9 @@ #include "common.h" -INCLUDE_ASM(os/code_47ae0_len_e0, osSpGetStatus); +INCLUDE_API_ASM(os/code_47ae0_len_e0, osSpGetStatus); -INCLUDE_ASM(os/code_47ae0_len_e0, osSpSetStatus); +INCLUDE_API_ASM(os/code_47ae0_len_e0, osSpSetStatus); -INCLUDE_ASM(os/code_47ae0_len_e0, osSpSetPc); +INCLUDE_API_ASM(os/code_47ae0_len_e0, osSpSetPc); -INCLUDE_ASM(os/code_47ae0_len_e0, osSpRawStartDma); +INCLUDE_API_ASM(os/code_47ae0_len_e0, osSpRawStartDma); diff --git a/src/os/code_47bc0_len_50.c b/src/os/code_47bc0_len_50.c index 3db81e944e..b5b4606dd2 100644 --- a/src/os/code_47bc0_len_50.c +++ b/src/os/code_47bc0_len_50.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_ASM(os/code_47bc0_len_50, osSiRawReadIo); +INCLUDE_API_ASM(os/code_47bc0_len_50, osSiRawReadIo); diff --git a/src/os/code_47c10_len_50.c b/src/os/code_47c10_len_50.c index 69956144db..86ecc1bcf1 100644 --- a/src/os/code_47c10_len_50.c +++ b/src/os/code_47c10_len_50.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_ASM(os/code_47c10_len_50, osSiRawWriteIo); +INCLUDE_API_ASM(os/code_47c10_len_50, osSiRawWriteIo); diff --git a/src/os/code_47c60_len_f0.c b/src/os/code_47c60_len_f0.c index 29707449da..57b9a1091d 100644 --- a/src/os/code_47c60_len_f0.c +++ b/src/os/code_47c60_len_f0.c @@ -1,5 +1,5 @@ #include "common.h" -INCLUDE_ASM(os/code_47c60_len_f0, osContAddressCrc); +INCLUDE_API_ASM(os/code_47c60_len_f0, osContAddressCrc); -INCLUDE_ASM(os/code_47c60_len_f0, osContDataCrc); +INCLUDE_API_ASM(os/code_47c60_len_f0, osContDataCrc); diff --git a/src/os/code_47e90_len_110.c b/src/os/code_47e90_len_110.c index 5986652e6a..ae79fba834 100644 --- a/src/os/code_47e90_len_110.c +++ b/src/os/code_47e90_len_110.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_ASM(os/code_47e90_len_110, osViInit); +INCLUDE_API_ASM(os/code_47e90_len_110, osViInit); diff --git a/src/os/code_47fa0_len_20.c b/src/os/code_47fa0_len_20.c index 8e7fd0949e..f692dc9887 100644 --- a/src/os/code_47fa0_len_20.c +++ b/src/os/code_47fa0_len_20.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_ASM(os/code_47fa0_len_20, osViGetCurrentContext); +INCLUDE_API_ASM(os/code_47fa0_len_20, osViGetCurrentContext); diff --git a/src/os/code_48020_len_a00.c b/src/os/code_48020_len_a00.c index 280026b31e..d48a324b24 100644 --- a/src/os/code_48020_len_a00.c +++ b/src/os/code_48020_len_a00.c @@ -4,10 +4,10 @@ s32 INCLUDE_ASM(os/code_48020_len_a00, osPfsChecker, OSPfs* pfs); INCLUDE_ASM(os/code_48020_len_a00, corrupted_init); -INCLUDE_ASM(os/code_48020_len_a00, corrupted); +INCLUDE_API_ASM(os/code_48020_len_a00, corrupted); s32 INCLUDE_ASM(os/code_48020_len_a00, osPfsIsPlug, OSMesgQueue* queue, u8* unk); -INCLUDE_ASM(os/code_48020_len_a00, osPfsRequestData); +INCLUDE_API_ASM(os/code_48020_len_a00, osPfsRequestData); -INCLUDE_ASM(os/code_48020_len_a00, osPfsGetInitData); +INCLUDE_API_ASM(os/code_48020_len_a00, osPfsGetInitData); diff --git a/src/os/code_48a20_len_1c0.c b/src/os/code_48a20_len_1c0.c index 1384f38534..eccd0f1dfd 100644 --- a/src/os/code_48a20_len_1c0.c +++ b/src/os/code_48a20_len_1c0.c @@ -1,5 +1,5 @@ #include "common.h" -INCLUDE_ASM(os/code_48a20_len_1c0, ldiv); +INCLUDE_API_ASM(os/code_48a20_len_1c0, ldiv); -INCLUDE_ASM(os/code_48a20_len_1c0, lldiv); +INCLUDE_API_ASM(os/code_48a20_len_1c0, lldiv); diff --git a/src/os/code_48be0_len_20.c b/src/os/code_48be0_len_20.c index cb9d9fe41c..2d6474861c 100644 --- a/src/os/code_48be0_len_20.c +++ b/src/os/code_48be0_len_20.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_ASM(os/code_48be0_len_20, osSiDeviceBusy); +INCLUDE_API_ASM(os/code_48be0_len_20, osSiDeviceBusy); diff --git a/src/os/code_4a140_len_70.c b/src/os/code_4a140_len_70.c index 45f9321fb2..8a8535ee17 100644 --- a/src/os/code_4a140_len_70.c +++ b/src/os/code_4a140_len_70.c @@ -1,5 +1,5 @@ #include "common.h" -INCLUDE_ASM(os/code_4a140_len_70, strcpy); +INCLUDE_API_ASM(os/code_4a140_len_70, strcpy); -INCLUDE_ASM(os/code_4a140_len_70, strcmp); +INCLUDE_API_ASM(os/code_4a140_len_70, strcmp); diff --git a/src/os/code_4a1b0_len_40.c b/src/os/code_4a1b0_len_40.c index 062ca53cf3..e27e071134 100644 --- a/src/os/code_4a1b0_len_40.c +++ b/src/os/code_4a1b0_len_40.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_ASM(os/code_4a1b0_len_40, memset); +INCLUDE_API_ASM(os/code_4a1b0_len_40, memset); diff --git a/src/os/code_4a360_len_930.c b/src/os/code_4a360_len_930.c index af1747493c..3610e0fe64 100644 --- a/src/os/code_4a360_len_930.c +++ b/src/os/code_4a360_len_930.c @@ -2,20 +2,20 @@ INCLUDE_ASM(os/code_4a360_len_930, func_8008EF60); -INCLUDE_ASM(os/code_4a360_len_930, osFlashInit); +INCLUDE_API_ASM(os/code_4a360_len_930, osFlashInit); -INCLUDE_ASM(os/code_4a360_len_930, osFlashReadStatus); +INCLUDE_API_ASM(os/code_4a360_len_930, osFlashReadStatus); -INCLUDE_ASM(os/code_4a360_len_930, osFlashReadId); +INCLUDE_API_ASM(os/code_4a360_len_930, osFlashReadId); -INCLUDE_ASM(os/code_4a360_len_930, osFlashClearStatus); +INCLUDE_API_ASM(os/code_4a360_len_930, osFlashClearStatus); -INCLUDE_ASM(os/code_4a360_len_930, osFlashAllErase); +INCLUDE_API_ASM(os/code_4a360_len_930, osFlashAllErase); -INCLUDE_ASM(os/code_4a360_len_930, osFlashSectorErase); +INCLUDE_API_ASM(os/code_4a360_len_930, osFlashSectorErase); -INCLUDE_ASM(os/code_4a360_len_930, osFlashWriteBuffer); +INCLUDE_API_ASM(os/code_4a360_len_930, osFlashWriteBuffer); -INCLUDE_ASM(os/code_4a360_len_930, osFlashWriteArray); +INCLUDE_API_ASM(os/code_4a360_len_930, osFlashWriteArray); -INCLUDE_ASM(os/code_4a360_len_930, osFlashReadArray); +INCLUDE_API_ASM(os/code_4a360_len_930, osFlashReadArray); diff --git a/src/os/code_7e40_len_3f0.c b/src/os/code_7e40_len_3f0.c index 33980ae6c9..bd652db064 100644 --- a/src/os/code_7e40_len_3f0.c +++ b/src/os/code_7e40_len_3f0.c @@ -1,7 +1,7 @@ #include "common.h" -INCLUDE_ASM(os/code_7e40_len_3f0, nuGfxTaskMgr); +INCLUDE_API_ASM(os/code_7e40_len_3f0, nuGfxTaskMgr); -INCLUDE_ASM(os/code_7e40_len_3f0, nuGfxTaskMgrInit); +INCLUDE_API_ASM(os/code_7e40_len_3f0, nuGfxTaskMgrInit); -INCLUDE_ASM(os/code_7e40_len_3f0, nuGfxTaskStart); +INCLUDE_API_ASM(os/code_7e40_len_3f0, nuGfxTaskStart); diff --git a/tools/starrod_enums_to_h.py b/tools/starrod_enums_to_h.py index 85bd38195d..da55e1e912 100755 --- a/tools/starrod_enums_to_h.py +++ b/tools/starrod_enums_to_h.py @@ -3,7 +3,7 @@ import os import re from glob import glob -from stringcase import constcase # pip install stringcase +from stringcase import constcase, pascalcase # pip install stringcase DIR = os.path.dirname(__file__) SR_DATABASE = os.path.join(DIR, "star-rod/database") @@ -19,7 +19,7 @@ with open(os.path.join(DIR, "../include/enums.h"), "w") as h: #define _ENUMS_H_ #include "ultra64.h" -#include "types.h" +#include "types.h" """) @@ -28,10 +28,27 @@ with open(os.path.join(DIR, "../include/enums.h"), "w") as h: lines = file.readlines() # Get enum attributes - namespace = constcase(re.match(r"[^ \t]*", lines[0]).group(0)) + namespace = pascalcase(re.match(r"[^ \t]*", lines[0]).group(0)) library_name = re.match(r"[^ \t]*", lines[1]).group(0) reverse = True if re.match(r"[^ \t]*", lines[2]).group(0) == "true" else False + # Renamed namespaces + if namespace == "Item": namespace = "ItemId" + if namespace == "Sound": namespace = "SoundId" + if namespace == "Partner": namespace = "PartnerId" + if namespace == "Sprite": namespace = "SpriteId" + if namespace == "Outcome": namespace = "EncounterOutcome" + #if namespace == "Phase": namespace = "BattlePhase" + if namespace == "Actor": namespace = "ActorId" + #if namespace == "Status": namespace = "ActorStatus" + #if namespace == "StatusFlags": namespace = "ActorStatusFlags" + #if namespace == "Event": namespace = "BattleEvent" + if namespace == "Decoration": namespace = "DecorationId" + if namespace == "Npc": namespace = "NpcId" + if namespace == "Trigger": namespace = "TriggerFlags" + if namespace == "Anim": continue + if namespace == "Entity": continue # just ram addresses + # Get a list of tuples containing (name, value) items = [] name_max_len = 0 @@ -51,8 +68,9 @@ with open(os.path.join(DIR, "../include/enums.h"), "w") as h: str_value = f"{value}" else: str_value = "0x" + f"{value:08x}".upper() - - name = constcase(name) + + if name.upper() != name: + name = constcase(name) items.append((name, str_value)) name_max_len = max(len(name), name_max_len) elif "/%" in line: @@ -66,4 +84,4 @@ with open(os.path.join(DIR, "../include/enums.h"), "w") as h: h.write(f"#define {namespace}_{name.ljust(name_max_len)} {value}\n") h.write("\n") - h.write("#endif\n") \ No newline at end of file + h.write("#endif\n") diff --git a/undefined_syms.txt b/undefined_syms.txt index e3238755fd..149ddab11e 100644 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -10,10 +10,10 @@ gGlobalTimeSpace = 0x802D9CA8; D_80147574 = 0x80147574; gMapTransitionAlpha = 0x800A0940; -D_800E92D8 = 0x800E92D8; -D_80147474 = 0x80147474; -D_80109270 = 0x80109270; -D_80108558 = 0x80108558; +D_800E92D8 = 0x800E92D8; +D_80147474 = 0x80147474; +D_80109270 = 0x80109270; +D_80108558 = 0x80108558; D_800A0940 = 0x800A0940; D_800A0942 = 0x800A0942; D_800A0944 = 0x800A0944; @@ -76,6 +76,32 @@ gCurrentTriggerListPtr = 0x80159390; D_801595A0 = 0x801595A0; D_8015C7C0 = 0x8015C7C0; +gWorldModelList = 0x80151770; +gBattleModelList = 0x80151B70; +gCurrentModelListPtr = 0x801512CC; + +gWorldModelSpecialDls = 0x8015F90; +gBattleModelSpecialDls = 0x80152010; +gCurrentModelSpecialDlsPtr = 0x801512E8; + +gWorldEntityList = 0x80151380; +gWorldBattleEntityList = 0x801513F8; +gCurrentEntityListPtr = 0x80151470; + +gWorldShadowList = 0x80151478; +gBattleShadowList = 0x80151568; +gCurrentShadowListPtr = 0x80151658; + +gMainGameState = 0x80151700; +gCurrentUpdateFunction = 0x8015170C; + +gWorldDynamicEntityList = 0x801543A0; +gBattleDynamicEntityList = 0x801543E0; +gCurrentDynamicEntityListPtr = 0x80154420; + +gScriptIdList = 0x802D1898; +gScriptIndexList = 0x802DAA98; + func_802A91F8 = 0x802A91F8; func_802A9208 = 0x802A9208; func_802A9228 = 0x802A9228;