summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorpetrie911 <69443847+petrie911@users.noreply.github.com>2024-04-08 17:25:56 -0500
committerGitHub <noreply@github.com>2024-04-08 19:25:56 -0300
commit52e1b6cb17e7ca10b1e7d5a4e0e0dd023e475a9a (patch)
treeeb9dec0f320fde60abcb1cc4626be656a5742f98 /include
parentbe0d328b4e649be60bf03249bed6fd271bf0693a (diff)
Further docs on script, various other things (#204)
* stuff * too much * Torch commit * torch again * names and such * names * even more stuff * format * enums * whoops on the gbi
Diffstat (limited to 'include')
-rw-r--r--include/context.h58
-rw-r--r--include/fox_option.h2
-rw-r--r--include/functions.h56
-rw-r--r--include/global.h1
-rw-r--r--include/i1.h10
-rw-r--r--include/i3.h4
-rw-r--r--include/i5.h4
-rw-r--r--include/libultra/ultra64.h2
-rw-r--r--include/prevent_bss_reordering3.h28
-rw-r--r--include/prevent_context_reordering.h140
-rw-r--r--include/sf64event.h374
-rw-r--r--include/sf64level.h393
-rw-r--r--include/sf64object.h479
-rw-r--r--include/sf64player.h39
-rw-r--r--include/sf64thread.h9
-rw-r--r--include/sys.h8
-rw-r--r--include/variables.h88
17 files changed, 1081 insertions, 614 deletions
diff --git a/include/context.h b/include/context.h
index 3b1063b4..8b00a24b 100644
--- a/include/context.h
+++ b/include/context.h
@@ -11,10 +11,10 @@ extern s32 gOverlayStage;
extern s32 D_ctx_80177824; // some sort of flag
extern s32 D_ctx_8017782C; // some sort of flag. all range related?
extern GameState gGameState;
-extern s32 D_Timer_8017783C; // next game state timer?
+extern s32 gNextGameStateTimer; // next game state timer?
extern s32 D_ctx_80177844; // timer for vs item spawn
extern OptionState gOptionMenuStatus;
-extern s32 D_ctx_80177854; // pause-related state
+extern s32 gPlayState; // pause-related state
extern s32 D_ctx_80177868; // some sort of state. pause-related?
extern LevelMode gLevelMode;
extern DrawMode gDrawMode;
@@ -22,9 +22,9 @@ extern s32 gPlayerNum;
extern s32 gCamCount;
extern s32 gTeamShields[6];
extern s32 gSavedTeamShields[6];
-extern UNK_TYPE D_ctx_801778F0[6];
+extern UNK_TYPE gPrevPlanetSavedTeamShields[6];
extern s32 gTeamDamage[6];
-extern u8 D_ctx_80177930; // next planet path
+extern u8 gNextPlanetPath; // next planet path
extern f32 gGroundLevel;
extern f32 D_ctx_80177950;
extern f32 D_ctx_80177968;
@@ -53,7 +53,7 @@ extern s32 D_ctx_80177B70[7];
extern PlanetId D_ctx_80177B90[7];
extern s32 D_ctx_80177BB0[7];
extern s32 D_ctx_80177BD8[22]; // overruns D_ctx_80177C30?
-extern s32 D_ctx_80177C38[6];
+extern s32 gPrevPlanetTeamShields[6];
extern s32 D_ctx_80177C58[6];
extern u8 gSoundMode;
extern s32 gVolumeSettings[3];
@@ -77,13 +77,13 @@ extern s32 gGameFrameCount;
extern s32 D_ctx_80177DC8;
extern s32 D_ctx_80177E70;
extern s32 D_ctx_80177E78;
-extern s32 D_ctx_80177E80;
+extern s32 gRingPassCount;
extern Vec3f D_ctx_80177E88;
extern Vec3f D_ctx_80177F10;
extern UNK_TYPE F_80178020;
extern s32 D_ctx_8017812C;
extern LevelId gCurrentLevel;
-extern s32 D_ctx_8017827C;
+extern s32 gLevelStage;
extern s32 gBossActive;
extern s32 D_ctx_8017828C;
extern s32 D_ctx_80178294;
@@ -101,17 +101,17 @@ extern UNK_TYPE F_801782F0;
extern s32 D_ctx_801782F8;
extern s32 D_ctx_80178300;
extern u16* D_ctx_80178308;
-extern ObjectInit* D_ctx_80178310;
+extern ObjectInit* gLevelObjects;
extern s32 gFogRed;
extern s32 gFogGreen;
extern s32 gFogBlue;
extern s32 gFogAlpha;
-extern s32 D_ctx_80178340; // alpha something
-extern s32 D_ctx_80178348; // red something
-extern s32 D_ctx_80178350; // green something
-extern s32 D_ctx_80178354; // blue something
-extern s32 D_ctx_80178358; // alpha target
-extern s32 D_ctx_8017835C; // alpha step
+extern s32 gFillScreenAlpha; // alpha something
+extern s32 gFillScreenRed; // red something
+extern s32 gFillScreenGreen; // green something
+extern s32 gFillScreenBlue; // blue something
+extern s32 gFillScreenAlphaTarget; // alpha target
+extern s32 gFillScreenAlphaStep; // alpha step
extern s32 D_ctx_80178360; // 2 lights second color
extern s32 D_ctx_80178364;
extern s32 D_ctx_80178368;
@@ -120,10 +120,10 @@ extern f32 D_ctx_80178370; // Vec3f?
extern f32 D_ctx_80178374;
extern f32 D_ctx_80178378;
extern s32 D_ctx_8017837C;
-extern u32 D_ctx_80178380[4]; // player alphas
-extern s32 D_ctx_80178390[4]; // player reds
-extern s32 D_ctx_801783A0[4]; // player greens
-extern s32 D_ctx_801783B0[4]; // player blues
+extern u32 gPlayerFillScreenAlphas[4]; // player alphas
+extern s32 gPlayerFillScreenReds[4]; // player reds
+extern s32 gPlayerFillScreenGreens[4]; // player greens
+extern s32 gPlayerFillScreenBlues[4]; // player blues
extern s32 D_ctx_801783C0[4];
extern f32 D_ctx_801783D0; // something x translate
extern f32 D_ctx_801783D4; // something y translate
@@ -218,8 +218,8 @@ extern s32 D_ctx_80161A78;
extern s32 D_ctx_80161A7C;
extern s32 D_ctx_80161A80;
extern s32 D_ctx_80161A84;
-extern s32 D_ctx_80161A88;
-extern s32 D_ctx_80161A8C;
+extern s32 gGroundType;
+extern s32 gSavedGroundType;
extern u8 gGoldRingCount[4];
extern u8 D_ctx_80161A94[4];
extern s32 gHitCount;
@@ -229,7 +229,7 @@ extern LaserStrength gLaserStrength[4];
extern s32 D_ctx_80161AB8;
extern UNK_TYPE F_80161AC0[16];
extern Object_80 gObjects80[50];
-extern Object_4C gObjects4C[40];
+extern Sprite gSprites[40];
extern Actor gActors[60];
extern Boss gBosses[4];
extern Effect gEffects[100];
@@ -245,10 +245,10 @@ extern f32 D_ctx_80176B98[2][100];
extern f32 D_ctx_80176EB8[2][100];
extern f32 D_ctx_801771D8[2][100];
extern f32 D_ctx_80177500[2][100];
-extern u16 D_ctx_80177828; // enemy shot speed?
+extern u16 gEnemyShotSpeed; // enemy shot speed?
extern u8 D_ctx_80177830; // show level complete status overlay
-extern s32 D_ctx_80177838; // level clear related
-extern s32 D_ctx_80177840; // timer for mission accomplished scrren
+extern s32 gLevelStatusScreenTimer; // level clear related
+extern s32 gLevelClearScreenTimer; // timer for mission accomplished scrren
extern s32 gBossHealthBar;
extern s32 D_ctx_80177850; // bonus text related. set to 15 but never read
extern s32 D_ctx_80177858[4];
@@ -270,7 +270,7 @@ extern OSContPad* gInputPress;
extern u8* D_ctx_80177984;
extern s32 D_ctx_80177990[4];
extern f32 D_ctx_801779A8[4];
-extern u8 D_ctx_801779BC;
+extern u8 gPauseEnabled;
extern s32 gChargeTimers[4];
extern f32 D_ctx_801779E4;
extern f32 D_ctx_801779F4;
@@ -301,8 +301,8 @@ extern s32 D_ctx_80177CAC;
extern s32 D_ctx_80177CB4;
extern s32 D_ctx_80177CBC;
extern s32 D_ctx_80177CC4;
-extern s32 D_ctx_80177CD0[6];
-extern s32 D_ctx_80177CF0[6];
+extern s32 gStarWolfTeamAlive[6];
+extern s32 gSavedStarWolfTeamAlive[6];
extern s32 gRightWingHealth[4];
extern s32 gLeftWingHealth[4];
extern s32 D_ctx_80177D40[4];
@@ -314,8 +314,8 @@ extern s32 D_ctx_80177DB8[4];
extern s32 D_ctx_80177DD0[4][10];
extern s32 D_ctx_80177E74;
extern s32 D_ctx_80177E7C;
-extern s32 D_ctx_80177E84;
-extern Vec3f D_ctx_80177E98[10];
+extern s32 gChangeTo360;
+extern Vec3f gTeamArrowsViewPos[10];
extern f32 D_ctx_80177F20[65];
extern f32 D_ctx_80178028[65];
extern f32 D_ctx_80178130[65];
diff --git a/include/fox_option.h b/include/fox_option.h
index 51877be6..5078e561 100644
--- a/include/fox_option.h
+++ b/include/fox_option.h
@@ -77,7 +77,7 @@ typedef enum OptionId {
#define OPTION_COUNT ARRAY_COUNT(sOptionCardList)
-extern void* D_menu_801B68B0[];
+extern u8* D_menu_801B68B0[];
extern u8* D_menu_801B68D4[];
extern s32 D_menu_801B8220[]; // total hits ranking? see Option_80197DE4
diff --git a/include/functions.h b/include/functions.h
index 41678dcd..c2e31d14 100644
--- a/include/functions.h
+++ b/include/functions.h
@@ -10,7 +10,7 @@
// fox_360
void func_360_8002ED60(Player*);
void func_360_8002E3E0(Actor*);
-void func_360_8002E548(void);
+void AllRange_UpdateCountdown(void);
void func_360_8002E5E0(Boss*);
void func_360_8002E604(Boss*);
void func_360_8002E628(Boss*);
@@ -30,7 +30,7 @@ void func_360_8002FC00(Actor*);
void func_360_8003088C(Actor*);
bool func_360_80031900(Actor*);
void ActorAllRange_Update(Actor* this);
-void ActorAllRange_Draw(Actor* actor);
+void ActorAllRange_Draw(Actor* this);
//fox_beam
void func_beam_80038140(PlayerShot* shot);
@@ -38,8 +38,8 @@ void func_beam_80036318(PlayerShot* shot);
void func_beam_80035DEC(f32 xPos, f32 yPos, f32 zPos);
void PlayerShot_Initialize(PlayerShot*);
void func_beam_800365E4(f32, f32, f32, f32, f32, f32, f32, f32, f32, s32, s32);
-void func_beam_8003D9B8(void);
-void func_beam_8003DA0C(void);
+void PlayerShot_Update(void);
+void PlayerShot_Draw(void);
// fox_bg
void func_bg_8003DAF0(void);
@@ -91,7 +91,7 @@ void func_demo_800515C4(void);
void func_display_80053658(WingInfo*);
void func_display_8005465C(s32);
void func_display_80057814(Player*);
-void func_display_80057D00(void);
+void Play_Draw(void);
// fox_edata
void func_edata_800594F0(Object_80*);
@@ -101,15 +101,15 @@ void func_edata_800596B0(Actor*);
// fox_edisplay
void Graphics_SetScaleMtx(f32);
-void func_edisplay_80059850(Object_4C*);
+void Sprite168_Draw(Sprite*);
void Actor201_Draw(Actor*);
void Actor202_Draw(Actor*);
void Obj39_Draw(Object_80*);
void func_edisplay_80059B20(Object_80*);
void Obj42_Draw(Object_80*);
void Actor196_Draw(Actor*);
-void func_edisplay_80059C34(Object_4C*);
-void func_edisplay_80059C40(Object_4C*);
+void Sprite167_Draw(Sprite*);
+void FogShadow_Draw(Sprite*);
void func_edisplay_80059F68(Object_80*);
void func_edisplay_80059FDC(Object_80*);
void Actor189_Draw(Actor*);
@@ -146,7 +146,7 @@ void Object_Kill(Object*, f32*);
bool func_enmy_80060FE4(Vec3f*, f32);
void Object_SetInfo(ObjectInfo* info, u32 objId);
void Object_80_Initialize(Object_80*);
-void Object_4C_Initialize(Object_4C*);
+void Sprite_Initialize(Sprite*);
void Actor_Initialize(Actor*);
void Boss_Initialize(Boss*);
void Item_Initialize(Item*);
@@ -167,14 +167,14 @@ void func_enmy_800652CC(Object_80*);
void func_enmy_800654E4(Object*);
void func_enmy_800656D4(Actor*);
void func_enmy_800660F0(Actor*);
-void func_enmy_80066254(Actor*);
+void Actor_Despawn(Actor*);
void func_enmy_8006654C(Actor*);
void func_enmy_8006684C(Actor*);
void func_enmy_800669A0(Actor*);
void func_enmy_80066A80(Actor*);
void func_enmy_80066C00(Object_80*);
void func_enmy_80066D5C(Object_80*);
-void func_enmy_80066E8C(Object_4C*);
+void Sprite167_Update(Sprite*);
void func_enmy_80066EA8(Object_80*);
void func_enmy_80066EF0(Item*);
void func_enmy_800671D0(Item*);
@@ -191,25 +191,25 @@ void ItemGoldRing_Update(Item*);
void ItemWingRepair_Update(Item*);
void ItemMeteoWarp_Update(Item*);
void ItemCheckpoint_Update(Item*);
-void func_enmy_80068C48(Item*);
-void func_enmy_80068C88(Item*);
-void func_enmy_80068FE0(Object_4C*);
+void ItemRingCheck_Update(Item*);
+void ItemPathChange_Update(Item*);
+void Sprite_UpdateDoodad(Sprite*);
void Object_Dying(s32, ObjectId);
-void func_enmy_80069924(Effect*);
-void func_enmy_800693E8(Actor*);
-void func_enmy_80069658(Boss*);
-void func_enmy_800696F8(Object_80*);
-void func_enmy_80069858(Object_4C*);
-void func_enmy_80069A10(Item*);
+void Effect_Move(Effect*);
+void Actor_Move(Actor*);
+void Boss_Move(Boss*);
+void Object80_Move(Object_80*);
+void Sprite_Move(Sprite*);
+void Item_Move(Item*);
void Actor_Update(Actor*);
void Boss_Update(Boss*);
void Object_80_Update(Object_80*);
-void Object_4C_Update(Object_4C*);
+void Sprite_Update(Sprite*);
void Item_Update(Item*);
void Effect_Update(Effect*);
void TexturedLine_Update(TexturedLine*);
void TexturedLine_UpdateAll(void);
-void Object_UpdateAll(void);
+void Object_Update(void);
//fox_enmy2
void Actor237_Update(Actor*);
@@ -342,11 +342,11 @@ void func_effect_8007E3E4(Effect*);
void func_effect_8007E45C(Effect*);
void func_effect_8007E5CC(Effect*);
void func_effect_8007E648(Effect*);
-void func_effect_8007E93C(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPos, f32 arg5);
+void func_effect_8007E93C(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPos, f32 speed);
void func_effect_8007EE68(ObjectId objId, Vec3f* pos, Vec3f* rot, Vec3f* arg3, Vec3f* arg4, f32 scale2);
void func_effect_8007F04C(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 zRot, f32 unkX, f32 unkY, f32 unkZ, f32 xVel, f32 yVel, f32 zVel, f32 scale2);
-void func_effect_8007F11C(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 arg4);
-void func_effect_8007F20C(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 arg4);
+void func_effect_8007F11C(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 speed);
+void func_effect_8007F20C(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 speed);
void func_effect_8007F438(Effect*);
void func_effect_8007F6B0(Effect*);
void func_effect_8007F958(Effect*);
@@ -418,7 +418,7 @@ bool func_hud_800915FC(Actor*);
bool func_hud_800924E0(Actor*);
void ActorTeamBoss_Init(Actor*);
-void ActorTeamBoss_Update(Actor* actor);
+void ActorTeamBoss_Update(Actor* this);
void func_hud_80093164(Actor*);
void func_hud_800935E8(Player*);
void func_hud_800953A0(Actor*, s32);
@@ -447,7 +447,7 @@ void func_play_800A3FB0(void);
s32 Play_GetMaxShields(void);
void func_play_800A6028(f32*, u32);
void func_play_800AC290(Player* player, PlayerShot* shot, f32 arg2, f32 arg3, PlayerShotId shotId, f32 arg5);
-void func_play_800A5844(void);
+void Play_Setup(void);
void func_play_800A594C(void);
void func_play_800A5D6C(void);
void func_play_800A5EBC(void);
@@ -478,7 +478,7 @@ void func_play_800B6F50(f32, f32, f32, f32, f32, f32);
void func_play_800B7184(Player*, s32);
void func_play_800B73E0(Player*);
void func_play_800B852C(ObjectId , Item*);
-void func_play_800B86CC(void);
+void Play_Main(void);
void func_play_800A668C(f32 xPos, f32 yPos, f32 zPos);
void func_play_800AD7F0(Player* player);
void func_play_800ADF58(Player* player);
diff --git a/include/global.h b/include/global.h
index f001ef09..9811992c 100644
--- a/include/global.h
+++ b/include/global.h
@@ -12,6 +12,7 @@
#include "assets/ast_radio.h"
#include "sf64object.h"
#include "sf64level.h"
+#include "sf64event.h"
#include "sf64player.h"
#include "i1.h"
#include "i2.h"
diff --git a/include/i1.h b/include/i1.h
index 608abcc8..90c56785 100644
--- a/include/i1.h
+++ b/include/i1.h
@@ -15,7 +15,7 @@ extern void Corneria_8018F880(Player*);
extern void Corneria_80191160(Player*);
extern void Venom1_801988B8(Player*);
-void Corneria_801875A4(Object_4C*);
+void Corneria_801875A4(Sprite*);
void Corneria_80189058(Boss*);
void Corneria_8018AA74(Boss*);
void Corneria_8018AED0(Actor*);
@@ -36,10 +36,10 @@ void Corneria_8018EE84(Boss*);
void Corneria_8018EF90(Boss*);
void Corneria_8018F044(Object_80*);
void Corneria_8018F31C(Object_80*);
-void Venom1_801922DC(Object_4C*);
-void Venom1_80192358(Object_4C*);
-void Venom1_801923C0(Object_4C*);
-void Venom1_8019243C(Object_4C*);
+void Venom1_BossTrigger1_Update(Sprite*);
+void Venom1_BossTrigger2_Update(Sprite*);
+void Venom1_BossTrigger3_Update(Sprite*);
+void Venom1_BossTrigger4_Update(Sprite*);
void Venom1_80192518(Actor*);
void Venom1_80192CD4(Actor*);
void Venom1_80192E2C(Actor*);
diff --git a/include/i3.h b/include/i3.h
index 261519fc..75acfa8d 100644
--- a/include/i3.h
+++ b/include/i3.h
@@ -45,7 +45,7 @@ void Zoness_80192834(Actor* actor);
void Zoness_80192C18(Actor* actor);
void Zoness_80192E64(Actor* actor);
void Zoness_80193240(Actor* actor);
-void Zoness_BossZo_Init(Boss* bossZO);
+void Zoness_BossZo_Init(Boss* this);
void Zoness_801949DC(Boss* bossZO);
void Zoness_80194A84(Boss* bossZO);
void Zoness_8019969C(Actor* actor);
@@ -69,7 +69,7 @@ void Zoness_8019C454(Actor* actor);
void Zoness_8019C83C(Actor* actor);
void Zoness_8019CBEC(Actor* actor);
void Zoness_8019CE58(Actor* actor);
-void Zoness_Actor247_Init(Actor* actor);
+void Zoness_Actor247_Init(Actor* this);
void Zoness_8019D15C(Actor* actor);
void Zoness_8019D3C4(Actor* actor);
void Zoness_8019D428(Player* player);
diff --git a/include/i5.h b/include/i5.h
index 4a4fe28a..a711acd7 100644
--- a/include/i5.h
+++ b/include/i5.h
@@ -35,7 +35,7 @@ void Titania_8018BFB0(Actor *);
void Titania_8018E3B0(Actor *);
void Titania_8018E3CC(Actor *);
void Titania_8018E5E8(Actor *);
-void Titania_8018EFF0(Object_4C *);
+void Titania_8018EFF0(Sprite *);
void Titania_8018F0D8(Object_80 *);
void Titania_Boss306_Init(Boss *);
void Titania_801990DC(Boss *);
@@ -80,7 +80,7 @@ void Titania_8018E54C(Actor*);
void Titania_8018E5B4(Actor*);
void Titania_8018E5F8(Actor*);
void Titania_8018EF14(Actor*);
-void Titania_8018F038(Object_4C*);
+void Titania_Cactus_Update(Sprite*);
void Titania_8018F4D8(Object_80*);
void Titania_8018F8B8(Object_80*);
void Titania_80197A94(Boss*);
diff --git a/include/libultra/ultra64.h b/include/libultra/ultra64.h
index 94e177cc..afa11db4 100644
--- a/include/libultra/ultra64.h
+++ b/include/libultra/ultra64.h
@@ -32,7 +32,7 @@
#include <PR/libaudio.h>
#include <PR/gu.h>
#include <PR/ramrom.h>
-#include <PR/sp.h>
+// #include <PR/sp.h>
#include <PR/ucode.h>
#include <PR/ultraerror.h>
#include <PR/ultralog.h>
diff --git a/include/prevent_bss_reordering3.h b/include/prevent_bss_reordering3.h
new file mode 100644
index 00000000..3d690bfe
--- /dev/null
+++ b/include/prevent_bss_reordering3.h
@@ -0,0 +1,28 @@
+#ifndef PREVENT_BSS_REORDERING3_H
+#define PREVENT_BSS_REORDERING3_H
+
+/**
+ * See the explanation at prevent_bss_reordering.h
+ *
+ * Instead of producing 64 dummy declarations, this header only produces 32
+ * dummy declarations
+ */
+
+struct Dummy200 { int x; };
+struct Dummy201 { int x; };
+struct Dummy202 { int x; };
+struct Dummy203 { int x; };
+struct Dummy204 { int x; };
+struct Dummy205 { int x; };
+struct Dummy206 { int x; };
+struct Dummy207 { int x; };
+struct Dummy208 { int x; };
+struct Dummy209 { int x; };
+struct Dummy210 { int x; };
+struct Dummy211 { int x; };
+struct Dummy212 { int x; };
+struct Dummy213 { int x; };
+struct Dummy214 { int x; };
+struct Dummy215 { int x; };
+
+#endif
diff --git a/include/prevent_context_reordering.h b/include/prevent_context_reordering.h
index 3dbec6b7..2273a083 100644
--- a/include/prevent_context_reordering.h
+++ b/include/prevent_context_reordering.h
@@ -1,7 +1,7 @@
#ifndef PREVENT_CONTEXT_REORDERING_H
#define PREVENT_CONTEXT_REORDERING_H
-extern int Dummyhalf;
+// extern int Dummyhalf;
// struct Dummy0 {int x;};
// struct Dummy1 {int x;};
// struct Dummy2 {int x;};
@@ -9,20 +9,20 @@ extern int Dummyhalf;
// struct Dummy4 {int x;};
// struct Dummy5 {int x;};
// struct Dummy6 {int x;};
-// struct Dummy7 {int x;};
-// struct Dummy8 {int x;};
-// struct Dummy9 {int x;};
-// struct Dummy10 {int x;};
-// struct Dummy11 {int x;};
-// struct Dummy12 {int x;};
-// struct Dummy13 {int x;};
-// struct Dummy14 {int x;};
-// struct Dummy15 {int x;};
-// struct Dummy16 {int x;};
-// struct Dummy17 {int x;};
-// struct Dummy18 {int x;};
-// struct Dummy19 {int x;};
-// struct Dummy20 {int x;};
+struct Dummy7 {int x;};
+struct Dummy8 {int x;};
+struct Dummy9 {int x;};
+struct Dummy10 {int x;};
+struct Dummy11 {int x;};
+struct Dummy12 {int x;};
+struct Dummy13 {int x;};
+struct Dummy14 {int x;};
+struct Dummy15 {int x;};
+struct Dummy16 {int x;};
+struct Dummy17 {int x;};
+struct Dummy18 {int x;};
+struct Dummy19 {int x;};
+struct Dummy20 {int x;};
struct Dummy21 {int x;};
struct Dummy22 {int x;};
struct Dummy23 {int x;};
@@ -74,60 +74,60 @@ struct Dummy68 {int x;};
struct Dummy69 {int x;};
struct Dummy70 {int x;};
struct Dummy71 {int x;};
-// struct Dummy72 {int x;};
-// struct Dummy73 {int x;};
-// struct Dummy75 { int x; };
-// struct Dummy76 { int x; };
-// struct Dummy77 { int x; };
-// struct Dummy78 { int x; };
-// struct Dummy79 { int x; };
-// struct Dummy80 { int x; };
-// struct Dummy81 { int x; };
-// struct Dummy82 { int x; };
-// struct Dummy83 { int x; };
-// struct Dummy84 { int x; };
-// struct Dummy85 { int x; };
-// struct Dummy86 { int x; };
-// struct Dummy87 { int x; };
-// struct Dummy88 { int x; };
-// struct Dummy89 { int x; };
-// struct Dummy90 { int x; };
-// struct Dummy91 { int x; };
-// struct Dummy92 { int x; };
-// struct Dummy93 { int x; };
-// struct Dummy94 { int x; };
-// struct Dummy95 { int x; };
-// struct Dummy96 { int x; };
-// struct Dummy97 { int x; };
-// struct Dummy98 { int x; };
-// struct Dummy99 { int x; };
-// struct Dummy100 { int x; };
-// struct Dummy101 { int x; };
-// struct Dummy102 { int x; };
-// struct Dummy103 { int x; };
-// struct Dummy104 { int x; };
-// struct Dummy105 { int x; };
-// struct Dummy106 { int x; };
-// struct Dummy107 { int x; };
-// struct Dummy108 { int x; };
-// struct Dummy109 { int x; };
-// struct Dummy110 { int x; };
-// struct Dummy111 { int x; };
-// struct Dummy112 { int x; };
-// struct Dummy113 { int x; };
-// struct Dummy114 { int x; };
-// struct Dummy115 { int x; };
-// struct Dummy116 { int x; };
-// struct Dummy117 { int x; };
-// struct Dummy118 { int x; };
-// struct Dummy119 { int x; };
-// struct Dummy120 { int x; };
-// struct Dummy121 { int x; };
-// struct Dummy122 { int x; };
-// struct Dummy123 { int x; };
-// struct Dummy124 { int x; };
-// struct Dummy125 { int x; };
-// struct Dummy126 { int x; };
-// struct Dummy127 { int x; };
+struct Dummy72 {int x;};
+struct Dummy73 {int x;};
+struct Dummy75 { int x; };
+struct Dummy76 { int x; };
+struct Dummy77 { int x; };
+struct Dummy78 { int x; };
+struct Dummy79 { int x; };
+struct Dummy80 { int x; };
+struct Dummy81 { int x; };
+struct Dummy82 { int x; };
+struct Dummy83 { int x; };
+struct Dummy84 { int x; };
+struct Dummy85 { int x; };
+struct Dummy86 { int x; };
+struct Dummy87 { int x; };
+struct Dummy88 { int x; };
+struct Dummy89 { int x; };
+struct Dummy90 { int x; };
+struct Dummy91 { int x; };
+struct Dummy92 { int x; };
+struct Dummy93 { int x; };
+struct Dummy94 { int x; };
+struct Dummy95 { int x; };
+struct Dummy96 { int x; };
+struct Dummy97 { int x; };
+struct Dummy98 { int x; };
+struct Dummy99 { int x; };
+struct Dummy100 { int x; };
+struct Dummy101 { int x; };
+struct Dummy102 { int x; };
+struct Dummy103 { int x; };
+struct Dummy104 { int x; };
+struct Dummy105 { int x; };
+struct Dummy106 { int x; };
+struct Dummy107 { int x; };
+struct Dummy108 { int x; };
+struct Dummy109 { int x; };
+struct Dummy110 { int x; };
+struct Dummy111 { int x; };
+struct Dummy112 { int x; };
+struct Dummy113 { int x; };
+struct Dummy114 { int x; };
+struct Dummy115 { int x; };
+struct Dummy116 { int x; };
+struct Dummy117 { int x; };
+struct Dummy118 { int x; };
+struct Dummy119 { int x; };
+struct Dummy120 { int x; };
+struct Dummy121 { int x; };
+struct Dummy122 { int x; };
+struct Dummy123 { int x; };
+struct Dummy124 { int x; };
+struct Dummy125 { int x; };
+struct Dummy126 { int x; };
+struct Dummy127 { int x; };
#endif
diff --git a/include/sf64event.h b/include/sf64event.h
new file mode 100644
index 00000000..baded134
--- /dev/null
+++ b/include/sf64event.h
@@ -0,0 +1,374 @@
+#ifndef SF64_EVENT
+#define SF64_EVENT
+
+#define EV_OPC(opcode) (((opcode) & 0x7F) << 9)
+#define EV_OPC_MASK(cmd) ((cmd) & (0x7F << 9))
+#define EVENT_CMD(opcode, arg1, arg2) (EV_OPC(opcode) | ((s16) (arg1) & 0x1FF)), (arg2)
+
+#define EV_ZMODE(zmode) (((zmode) & 3) << 7)
+#define EV_ZMODE_MASK(cmd) ((cmd) & (3 << 7))
+
+#define EV_CHANGE_AI 200
+
+#define EVENT_PLAY_MSG(rcid, msg) EVENT_CMD(EVOP_PLAY_MSG, rcid, msg)
+#define EVENT_STOP_SCRIPT() EVENT_CMD(EVOP_STOP_SCRIPT, 0, 0)
+#define EVENT_MAKE_TEXLINE(color) EVENT_CMD(EVOP_MAKE_TEXLINE, 0, color)
+#define EVENT_STOP_TEXLINE() EVENT_CMD(EVOP_STOP_TEXLINE, 0, 0)
+#define EVENT_INIT_ACTOR(info, health) EVENT_CMD(EVOP_INIT_ACTOR, health, info)
+#define EVENT_SET_SPEED(speed, zmode, time) EVENT_CMD(EVOP_SET_SPEED, EV_ZMODE(zmode) | ((speed) & 0x7F), time)
+#define EVENT_SET_ACCEL(speedTarget, zmode, time) EVENT_CMD(EVOP_SET_ACCEL, EV_ZMODE(zmode) | ((speedTarget) & 0x7F), time)
+#define EVENT_SET_ROTATE() EVENT_CMD(EVOP_SET_ROTATE, 0, 0)
+#define EVENT_STOP_ROTATE() EVENT_CMD(EVOP_STOP_ROTATE, 0, 0)
+#define EVENT_SET_TRIGGER(cond, cmd) EVENT_CMD(EVOP_SET_TRIGGER, cmd, cond)
+#define EVENT_CLEAR_TRIGGER(cmd) EVENT_SET_TRIGGER(EVC_NONE, cmd)
+#define EVENT_LOOP(count, cmd) EVENT_CMD(EVOP_LOOP, cmd, count)
+#define EVENT_GOTO(cmd) EVENT_LOOP(0, cmd)
+#define EVENT_SET_GROUND(type) EVENT_CMD(EVOP_SET_GROUND, 0, type)
+#define EVENT_DROP_ITEM(item) EVENT_CMD(EVOP_DROP_ITEM, 0, item)
+#define EVENT_ADD_TO_GROUP(num, flags) EVENT_CMD(EVOP_ADD_TO_GROUP, flags, num)
+#define EVENT_SET_REVERB(reverb) EVENT_CMD(EVOP_SET_REVERB, 0, reverb)
+#define EVENT_STOP_BGM() EVENT_CMD(EVOP_STOP_BGM, 0, 0)
+#define EVENT_SET_ACTION(action) EVENT_CMD(EVOP_SET_ACTION, 0, action)
+#define EVENT_RESTORE_TEAM(teammate) EVENT_CMD(EVOP_RESTORE_TEAM, 0, teammate)
+#define EVENT_PLAY_SFX(sfx) EVENT_CMD(EVOP_PLAY_SFX, 0, sfx)
+#define EVENT_STOP_SFX(sfx) EVENT_CMD(EVOP_STOP_SFX, 0, sfx)
+#define EVENT_SET_CALL(duration, voiceParam) EVENT_CMD(EVOP_SET_CALL, voiceParam, duration)
+#define EVENT_ROT_PLUS_X(rot, rotVel) EVENT_CMD(EVOP_ROT_PLUS_X, rotVel * 10, rot)
+#define EVENT_ROT_MINUS_X(rot, rotVel) EVENT_CMD(EVOP_ROT_MINUS_X, rotVel * 10, rot)
+#define EVENT_ROT_PLUS_Y(rot, rotVel) EVENT_CMD(EVOP_ROT_PLUS_Y, rotVel * 10, rot)
+#define EVENT_ROT_MINUS_Y(rot, rotVel) EVENT_CMD(EVOP_ROT_MINUS_Y, rotVel * 10, rot)
+#define EVENT_ROT_PLUS_Z(rot, rotVel) EVENT_CMD(EVOP_ROT_PLUS_Z, rotVel * 10, rot)
+#define EVENT_ROT_MINUS_Z(rot, rotVel) EVENT_CMD(EVOP_ROT_MINUS_Z, rotVel * 10, rot)
+#define EVENT_F4_PLUS_X(rot, rotVel) EVENT_CMD(EVOP_F4_PLUS_X, rotVel * 10, rot)
+#define EVENT_F4_MINUS_X(rot, rotVel) EVENT_CMD(EVOP_F4_MINUS_X, rotVel * 10, rot)
+#define EVENT_F4_PLUS_Y(rot, rotVel) EVENT_CMD(EVOP_F4_PLUS_Y, rotVel * 10, rot)
+#define EVENT_F4_MINUS_Y(rot, rotVel) EVENT_CMD(EVOP_F4_MINUS_Y, rotVel * 10, rot)
+#define EVENT_SET_BASE_ZVEL(zvel) EVENT_CMD(EVOP_SET_BASE_ZVEL, 0, zvel)
+#define EVENT_SET_TEAM_ID(teamId) EVENT_CMD(EVOP_SET_TEAM_ID, 0, teamId)
+#define EVENT_DAMAGE_TEAM(teamId, damage) EVENT_CMD(EVOP_DAMAGE_TEAM, damage, teamId)
+#define EVENT_SET_TARGET(teamId, spread) EVENT_CMD(EVOP_SET_TARGET, teamId, spread)
+#define EVENT_CHASE_TARGET(duration, turnRate) EVENT_CMD(EVOP_CHASE_TARGET, duration, turnRate)
+
+typedef enum EventModeZ {
+ EMZ_REST,
+ EMZ_RELATIVE,
+ EMZ_PLAYER,
+ EMZ_3,
+} EventModeZ;
+
+typedef enum EventOpcode {
+ /* 0 */ EVOP_SET_SPEED,
+ /* 1 */ EVOP_SET_ACCEL,
+ /* 2 */ EVOP_SET_BASE_ZVEL,
+ /* 3 */ EVOP_SET_TO_IWORK_9,
+ /* 4 */ EVOP_SET_IWORK_13,
+ /* 8 */ EVOP_CLEAR_IWORK_13 = 8,
+ /* 9 */ EVOP_F4_PLUS_X,
+ /* 10 */ EVOP_F4_MINUS_X,
+ /* 11 */ EVOP_F4_PLUS_Y,
+ /* 12 */ EVOP_F4_MINUS_Y,
+ /* 16 */ EVOP_ROT_PLUS_X = 16,
+ /* 17 */ EVOP_ROT_MINUS_X,
+ /* 18 */ EVOP_ROT_PLUS_Y,
+ /* 19 */ EVOP_ROT_MINUS_Y,
+ /* 20 */ EVOP_ROT_PLUS_Z,
+ /* 21 */ EVOP_ROT_MINUS_Z,
+ /* 24 */ EVOP_SET_ROTATE = 24,
+ /* 25 */ EVOP_STOP_ROTATE,
+ /* 40 */ EVOP_SET_STATE_6 = 40,
+ /* 41 */ EVOP_SET_STATE_7,
+ /* 42 */ EVOP_SET_STATE_8,
+ /* 43 */ EVOP_SET_STATE_9,
+ /* 44 */ EVOP_CHASE_TARGET,
+ /* 45 */ EVOP_SET_TARGET,
+ /* 46 */ EVOP_SET_STATE_14,
+ /* 47 */ EVOP_SET_STATE_15,
+ /* 48 */ EVOP_SET_WAIT,
+ /* 56 */ EVOP_SET_CALL = 56,
+ /* 57 */ EVOP_RESTORE_TEAM,
+ /* 58 */ EVOP_PLAY_SFX,
+ /* 59 */ EVOP_STOP_SFX,
+ /* 96 */ EVOP_SET_TRIGGER = 96,
+ /* 104 */ EVOP_INIT_ACTOR = 104,
+ /* 105 */ EVOP_SET_TEAM_ID,
+ /* 112 */ EVOP_SET_ACTION = 112,
+ /* 113 */ EVOP_ADD_TO_GROUP,
+ /* 116 */ EVOP_DROP_ITEM = 116,
+ /* 118 */ EVOP_SET_REVERB = 118,
+ /* 119 */ EVOP_SET_GROUND,
+ /* 120 */ EVOP_PLAY_MSG,
+ /* 121 */ EVOP_DAMAGE_TEAM,
+ /* 122 */ EVOP_STOP_BGM,
+ /* 124 */ EVOP_MAKE_TEXLINE = 124,
+ /* 125 */ EVOP_STOP_TEXLINE,
+ /* 126 */ EVOP_LOOP,
+ /* 127 */ EVOP_STOP_SCRIPT,
+} EventOpcode;
+
+typedef enum EventCondition {
+ /* 0 */ EVC_NONE,
+ /* 1 */ EVC_1,
+ /* 2 */ EVC_TEAM_COUNT_3,
+ /* 3 */ EVC_TEAM_COUNT_2,
+ /* 4 */ EVC_TEAM_COUNT_1,
+ /* 5 */ EVC_TEAM_COUNT_0,
+ /* 6 */ EVC_FALCO_ACTIVE,
+ /* 7 */ EVC_PEPPY_ACTIVE,
+ /* 8 */ EVC_SLIPPY_ACTIVE,
+ /* 9 */ EVC_CLOSE_LEFT_100,
+ /* 10 */ EVC_CLOSE_LEFT_400,
+ /* 11 */ EVC_CLOSE_LEFT_700,
+ /* 12 */ EVC_CLOSE_LEFT_200,
+ /* 13 */ EVC_CLOSE_RIGHT_100,
+ /* 14 */ EVC_CLOSE_RIGHT_400,
+ /* 15 */ EVC_CLOSE_RIGHT_700,
+ /* 16 */ EVC_CLOSE_RIGHT_200,
+ /* 17 */ EVC_CLOSE_ABOVE_100,
+ /* 18 */ EVC_CLOSE_ABOVE_400,
+ /* 19 */ EVC_CLOSE_ABOVE_700,
+ /* 20 */ EVC_CLOSE_ABOVE_200,
+ /* 21 */ EVC_CLOSE_BELOW_100,
+ /* 22 */ EVC_CLOSE_BELOW_400,
+ /* 23 */ EVC_CLOSE_BELOW_700,
+ /* 24 */ EVC_CLOSE_BELOW_200,
+ /* 25 */ EVC_HEALTH_100p,
+ /* 26 */ EVC_HEALTH_75p,
+ /* 27 */ EVC_HEALTH_50p,
+ /* 28 */ EVC_HEALTH_25p,
+ /* 29 */ EVC_HEALTH_0p,
+ /* 30 */ EVC_UNK270_5PLUS,
+ /* 31 */ EVC_UNK270_NONZERO,
+ /* 32 */ EVC_UNK270_ZERO,
+ /* 33 */ EVC_UNK250_GREATER_168,
+ /* 34 */ EVC_UNK250_LESS_84,
+ /* 35 */ EVC_SINGLE_LASER,
+ /* 36 */ EVC_TWIN_LASER,
+ /* 37 */ EVC_HYPER_LASER,
+ /* 38 */ EVC_UNK3_LASER,
+ /* 39 */ EVC_SHOT_CLOSE_150,
+ /* 40 */ EVC_SHOT_CLOSE_300,
+ /* 41 */ EVC_41,
+ /* 42 */ EVC_42,
+ /* 43 */ EVC_43,
+ /* 44 */ EVC_TOOK_DAMAGE,
+ /* 45 */ EVC_PASSED_ALL_RINGS,
+ /* 46 */ EVC_46,
+ /* 47 */ EVC_PRESS_CRIGHT,
+ /* 48 */ EVC_WING_BROKEN,
+ /* 49 */ EVC_ME_CLEAR,
+ /* 50 */ EVC_FO_CLEAR,
+ /* 51 */ EVC_SX_CLEAR,
+ /* 52 */ EVC_TI_CLEAR,
+ /* 53 */ EVC_BO_CLEAR,
+ /* 54 */ EVC_SY_CLEAR,
+ /* 55 */ EVC_KA_CLEAR,
+ /* 56 */ EVC_SO_CLEAR,
+ /* 57 */ EVC_MA_CLEAR,
+ /* 58 */ EVC_AQ_CLEAR,
+ /* 59 */ EVC_ZO_CLEAR,
+ /* 60 */ EVC_SZ_CLEAR,
+ /* 61 */ EVC_A6_CLEAR,
+ /* 62 */ EVC_62,
+ /* 63 */ EVC_63,
+ /* 64 */ EVC_MISSED_SEARCHLIGHT,
+ /* 65 */ EVC_30_HITS,
+ /* 66 */ EVC_80_HITS,
+ /* 67 */ EVC_EXPERT_MODE,
+ /* 68 */ EVC_68,
+ /* 69 */ EVC_69,
+ /* 100 */ EVC_100=100,
+} EventCondition;
+
+typedef enum EventState {
+ /* 0 */ EVSTATE_READY,
+ /* 1 */ EVSTATE_WAIT,
+ /* 2 */ EVSTATE_F4_PLUS_X,
+ /* 3 */ EVSTATE_F4_MINUS_X,
+ /* 4 */ EVSTATE_F4_PLUS_Y,
+ /* 5 */ EVSTATE_F4_MINUS_Y,
+ /* 6 */ EVSTATE_6,
+ /* 7 */ EVSTATE_7,
+ /* 8 */ EVSTATE_8,
+ /* 9 */ EVSTATE_9,
+ /* 10 */ EVSTATE_ME_AS_OPEN,
+ /* 11 */ EVSTATE_ME_AS_CLOSE,
+ /* 12 */ EVSTATE_TEAM_RETREAT,
+ /* 13 */ EVSTATE_CHASE_TARGET,
+ /* 14 */ EVSTATE_14,
+ /* 15 */ EVSTATE_15,
+ /* 200 */ EVSTATE_SCRIPT_END = 200,
+ /* 1000 */ EVSTATE_1000 = 1000,
+} EventState;
+
+typedef enum EventAction {
+ /* 0 */ EVACT_NONE,
+ /* 1 */ EVACT_1,
+ /* 2 */ EVACT_2,
+ /* 3 */ EVACT_3,
+ /* 4 */ EVACT_4,
+ /* 5 */ EVACT_5,
+ /* 6 */ EVACT_6,
+ /* 7 */ EVACT_7,
+ /* 8 */ EVACT_8,
+ /* 9 */ EVACT_9,
+ /* 10 */ EVACT_10,
+ /* 11 */ EVACT_11,
+ /* 12 */ EVACT_DESPAWN,
+ /* 13 */ EVACT_13,
+ /* 14 */ EVACT_ME_AS_OPEN,
+ /* 15 */ EVACT_ME_AS_CLOSE,
+ /* 16 */ EVACT_16,
+ /* 17 */ EVACT_17,
+ /* 18 */ EVACT_GFOX_COVER_FIRE,
+ /* 19 */ EVACT_19,
+} EventAction;
+
+typedef enum EventActorInfo {
+ /* 0 */ EINFO_0,
+ /* 1 */ EINFO_1,
+ /* 2 */ EINFO_2,
+ /* 3 */ EINFO_3,
+ /* 4 */ EINFO_4,
+ /* 5 */ EINFO_5,
+ /* 6 */ EINFO_6,
+ /* 7 */ EINFO_7,
+ /* 8 */ EINFO_8,
+ /* 9 */ EINFO_9,
+ /* 10 */ EINFO_10,
+ /* 11 */ EINFO_11,
+ /* 12 */ EINFO_12,
+ /* 13 */ EINFO_13,
+ /* 14 */ EINFO_14,
+ /* 15 */ EINFO_15,
+ /* 16 */ EINFO_16,
+ /* 17 */ EINFO_17,
+ /* 18 */ EINFO_18,
+ /* 19 */ EINFO_19,
+ /* 20 */ EINFO_20,
+ /* 21 */ EINFO_21,
+ /* 22 */ EINFO_22,
+ /* 23 */ EINFO_23,
+ /* 24 */ EINFO_24,
+ /* 25 */ EINFO_25,
+ /* 26 */ EINFO_26,
+ /* 27 */ EINFO_27,
+ /* 28 */ EINFO_28,
+ /* 29 */ EINFO_29,
+ /* 30 */ EINFO_30,
+ /* 31 */ EINFO_31,
+ /* 32 */ EINFO_32,
+ /* 33 */ EINFO_33,
+ /* 34 */ EINFO_34,
+ /* 35 */ EINFO_35,
+ /* 36 */ EINFO_36,
+ /* 37 */ EINFO_37,
+ /* 38 */ EINFO_38,
+ /* 39 */ EINFO_39,
+ /* 40 */ EINFO_40,
+ /* 41 */ EINFO_41,
+ /* 42 */ EINFO_42,
+ /* 43 */ EINFO_43,
+ /* 44 */ EINFO_44,
+ /* 45 */ EINFO_45,
+ /* 46 */ EINFO_46,
+ /* 47 */ EINFO_47,
+ /* 48 */ EINFO_48,
+ /* 49 */ EINFO_49,
+ /* 50 */ EINFO_50,
+ /* 51 */ EINFO_51,
+ /* 52 */ EINFO_52,
+ /* 53 */ EINFO_53,
+ /* 54 */ EINFO_54,
+ /* 55 */ EINFO_55,
+ /* 56 */ EINFO_56,
+ /* 57 */ EINFO_57,
+ /* 58 */ EINFO_58,
+ /* 59 */ EINFO_59,
+ /* 60 */ EINFO_60,
+ /* 61 */ EINFO_61,
+ /* 62 */ EINFO_62,
+ /* 63 */ EINFO_63,
+ /* 64 */ EINFO_64,
+ /* 65 */ EINFO_65,
+ /* 66 */ EINFO_66,
+ /* 67 */ EINFO_67,
+ /* 68 */ EINFO_68,
+ /* 69 */ EINFO_69,
+ /* 70 */ EINFO_70,
+ /* 71 */ EINFO_71,
+ /* 72 */ EINFO_72,
+ /* 73 */ EINFO_73,
+ /* 74 */ EINFO_74,
+ /* 75 */ EINFO_75,
+ /* 76 */ EINFO_76,
+ /* 77 */ EINFO_77,
+ /* 78 */ EINFO_78,
+ /* 79 */ EINFO_79,
+ /* 80 */ EINFO_80,
+ /* 81 */ EINFO_81,
+ /* 82 */ EINFO_82,
+ /* 83 */ EINFO_83,
+ /* 84 */ EINFO_84,
+ /* 85 */ EINFO_85,
+ /* 86 */ EINFO_86,
+ /* 87 */ EINFO_87,
+ /* 88 */ EINFO_88,
+ /* 89 */ EINFO_89,
+ /* 90 */ EINFO_90,
+ /* 91 */ EINFO_91,
+ /* 92 */ EINFO_92,
+ /* 93 */ EINFO_93,
+ /* 94 */ EINFO_94,
+ /* 95 */ EINFO_95,
+ /* 96 */ EINFO_96,
+ /* 97 */ EINFO_97,
+ /* 98 */ EINFO_98,
+ /* 99 */ EINFO_99,
+ /* 100 */ EINFO_100,
+ /* 101 */ EINFO_101,
+ /* 102 */ EINFO_102,
+ /* 103 */ EINFO_103,
+ /* 104 */ EINFO_104,
+ /* 105 */ EINFO_105,
+ /* 106 */ EINFO_106,
+ /* 107 */ EINFO_107,
+ /* 200 */ EINFO_200 = 200,
+ /* 300 */ EINFO_300 = 300,
+} EventActorInfo;
+
+typedef enum EventSfx {
+ /* 0 */ EVSFX_0,
+ /* 1 */ EVSFX_1,
+ /* 2 */ EVSFX_2,
+ /* 3 */ EVSFX_3,
+ /* 4 */ EVSFX_4,
+ /* 5 */ EVSFX_5,
+ /* 6 */ EVSFX_6,
+ /* 7 */ EVSFX_7,
+ /* 8 */ EVSFX_8,
+ /* 9 */ EVSFX_9,
+ /* 10 */ EVSFX_10,
+ /* 11 */ EVSFX_11,
+ /* 12 */ EVSFX_12,
+ /* 13 */ EVSFX_13,
+ /* 14 */ EVSFX_14,
+ /* 15 */ EVSFX_15,
+ /* 16 */ EVSFX_16,
+ /* 17 */ EVSFX_17,
+ /* 18 */ EVSFX_18,
+ /* 19 */ EVSFX_19,
+ /* 20 */ EVSFX_20,
+ /* 21 */ EVSFX_21,
+ /* 22 */ EVSFX_22,
+} EventSfx;
+
+typedef enum TexLineColor {
+ /* 0 */ TXLC_WHITE,
+ /* 1 */ TXLC_LIGHT_BLUE,
+ /* 2 */ TXLC_BLUE,
+ /* 3 */ TXLC_GREEN,
+ /* 4 */ TXLC_RED,
+ /* 5 */ TXLC_YELLOW,
+} TexLineColor;
+
+#endif
diff --git a/include/sf64level.h b/include/sf64level.h
index 02a39496..4591fa92 100644
--- a/include/sf64level.h
+++ b/include/sf64level.h
@@ -115,403 +115,10 @@ typedef enum VsStage {
/* 2 */ VS_STAGE_SECTOR_Z,
} VsStage;
-#define EV_OPC(opcode) (((opcode) & 0x7F) << 9)
-#define EV_OPC_MASK(cmd) ((cmd) & (0x7F << 9))
-#define EVENT_CMD(opcode, arg1, arg2) (EV_OPC(opcode) | ((s16) (arg1) & 0x1FF)), (arg2)
-
-#define EV_ZMODE(zmode) (((zmode) & 3) << 7)
-#define EV_ZMODE_MASK(cmd) ((cmd) & (3 << 7))
-
-#define EVENT_PLAY_MSG(rcid, msg) EVENT_CMD(EVOP_PLAY_MSG, rcid, msg)
-#define EVENT_STOP_SCRIPT() EVENT_CMD(EVOP_STOP_SCRIPT, 0, 0)
-#define EVENT_MAKE_TEXLINE(color) EVENT_CMD(EVOP_MAKE_TEXLINE, 0, color)
-#define EVENT_STOP_TEXLINE() EVENT_CMD(EVOP_STOP_TEXLINE, 0, 0)
-#define EVENT_INIT_ACTOR(info, health) EVENT_CMD(EVOP_INIT_ACTOR, health, info)
-#define EVENT_SET_SPEED(speed, zmode, time) EVENT_CMD(EVOP_SET_SPEED, EV_ZMODE(zmode) | ((speed) & 0x7F), time)
-#define EVENT_SET_ACCEL(speedTarget, zmode, time) EVENT_CMD(EVOP_SET_ACCEL, EV_ZMODE(zmode) | ((speedTarget) & 0x7F), time)
-#define EVENT_SET_ROTATE() EVENT_CMD(EVOP_SET_ROTATE, 0, 0)
-#define EVENT_STOP_ROTATE() EVENT_CMD(EVOP_STOP_ROTATE, 0, 0)
-#define EVENT_SET_TRIGGER(cond, cmd) EVENT_CMD(EVOP_SET_TRIGGER, cmd, cond)
-#define EVENT_CLEAR_TRIGGER(cmd) EVENT_SET_TRIGGER(EVC_NONE, cmd)
-#define EVENT_LOOP(cmd, count) EVENT_CMD(EVOP_LOOP, cmd, count)
-#define EVENT_SET_GROUND(type) EVENT_CMD(EVOP_SET_GROUND, 0, type)
-#define EVENT_DROP_ITEM(item) EVENT_CMD(EVOP_DROP_ITEM, 0, item)
-#define EVENT_ADD_TO_GROUP(num, flags) EVENT_CMD(EVOP_ADD_TO_GROUP, flags, num)
-#define EVENT_SET_REVERB(reverb) EVENT_CMD(EVOP_SET_REVERB, 0, reverb)
-#define EVENT_STOP_BGM() EVENT_CMD(EVOP_STOP_BGM, 0, 0)
-#define EVENT_SET_ACTION(action) EVENT_CMD(EVOP_SET_ACTION, 0, action)
-#define EVENT_RESTORE_TEAM(teammate) EVENT_CMD(EVOP_RESTORE_TEAM, 0, teammate)
-#define EVENT_PLAY_SFX(sfx) EVENT_CMD(EVOP_PLAY_SFX, 0, sfx)
-#define EVENT_STOP_SFX(sfx) EVENT_CMD(EVOP_STOP_SFX, 0, sfx)
-#define EVENT_SET_CALL(duration, voiceParam) EVENT_CMD(EVOP_SET_CALL, voiceParam, duration)
-#define EVENT_ROT_PLUS_X(rot, rotVel) EVENT_CMD(EVOP_ROT_PLUS_X, rotVel * 10, rot)
-#define EVENT_ROT_MINUS_X(rot, rotVel) EVENT_CMD(EVOP_ROT_MINUS_X, rotVel * 10, rot)
-#define EVENT_ROT_PLUS_Y(rot, rotVel) EVENT_CMD(EVOP_ROT_PLUS_Y, rotVel * 10, rot)
-#define EVENT_ROT_MINUS_Y(rot, rotVel) EVENT_CMD(EVOP_ROT_MINUS_Y, rotVel * 10, rot)
-#define EVENT_ROT_PLUS_Z(rot, rotVel) EVENT_CMD(EVOP_ROT_PLUS_Z, rotVel * 10, rot)
-#define EVENT_ROT_MINUS_Z(rot, rotVel) EVENT_CMD(EVOP_ROT_MINUS_Z, rotVel * 10, rot)
-#define EVENT_F4_PLUS_X(rot, rotVel) EVENT_CMD(EVOP_F4_PLUS_X, rotVel * 10, rot)
-#define EVENT_F4_MINUS_X(rot, rotVel) EVENT_CMD(EVOP_F4_MINUS_X, rotVel * 10, rot)
-#define EVENT_F4_PLUS_Y(rot, rotVel) EVENT_CMD(EVOP_F4_PLUS_Y, rotVel * 10, rot)
-#define EVENT_F4_MINUS_Y(rot, rotVel) EVENT_CMD(EVOP_F4_MINUS_Y, rotVel * 10, rot)
-#define EVENT_SET_BASE_ZVEL(zvel) EVENT_CMD(EVOP_SET_BASE_ZVEL, 0, zvel)
-
-typedef enum EventModeZ {
- EMZ_REST,
- EMZ_RELATIVE,
- EMZ_PLAYER,
- EMZ_3,
-} EventModeZ;
-
-typedef enum EventOpcode {
- /* 0 */ EVOP_SET_SPEED,
- /* 1 */ EVOP_SET_ACCEL,
- /* 2 */ EVOP_SET_BASE_ZVEL,
- /* 3 */ EVOP_SET_TO_IWORK_9,
- /* 4 */ EVOP_SET_IWORK_13,
- /* 8 */ EVOP_CLEAR_IWORK_13 = 8,
- /* 9 */ EVOP_F4_PLUS_X,
- /* 10 */ EVOP_F4_MINUS_X,
- /* 11 */ EVOP_F4_PLUS_Y,
- /* 12 */ EVOP_F4_MINUS_Y,
- /* 16 */ EVOP_ROT_PLUS_X = 16,
- /* 17 */ EVOP_ROT_MINUS_X,
- /* 18 */ EVOP_ROT_PLUS_Y,
- /* 19 */ EVOP_ROT_MINUS_Y,
- /* 20 */ EVOP_ROT_PLUS_Z,
- /* 21 */ EVOP_ROT_MINUS_Z,
- /* 24 */ EVOP_SET_ROTATE = 24,
- /* 25 */ EVOP_STOP_ROTATE,
- /* 40 */ EVOP_SET_STATE_6 = 40,
- /* 41 */ EVOP_SET_STATE_7,
- /* 42 */ EVOP_SET_STATE_8,
- /* 43 */ EVOP_SET_STATE_9,
- /* 44 */ EVOP_SET_STATE_13,
- /* 45 */ EVOP_SET_IWORK_1_TO_IWORK_12,
- /* 46 */ EVOP_SET_STATE_14,
- /* 47 */ EVOP_SET_STATE_15,
- /* 48 */ EVOP_SET_STATE_1,
- /* 56 */ EVOP_SET_CALL = 56,
- /* 57 */ EVOP_RESTORE_TEAM,
- /* 58 */ EVOP_PLAY_SFX,
- /* 59 */ EVOP_STOP_SFX,
- /* 96 */ EVOP_SET_TRIGGER = 96,
- /* 104 */ EVOP_INIT_ACTOR = 104,
- /* 105 */ EVOP_SET_IWORK_12,
- /* 112 */ EVOP_SET_ACTION = 112,
- /* 113 */ EVOP_ADD_TO_GROUP,
- /* 116 */ EVOP_DROP_ITEM = 116,
- /* 118 */ EVOP_SET_REVERB = 118,
- /* 119 */ EVOP_SET_GROUND,
- /* 120 */ EVOP_PLAY_MSG,
- /* 121 */ EVOP_DAMAGE_TEAM,
- /* 122 */ EVOP_STOP_BGM,
- /* 124 */ EVOP_MAKE_TEXLINE = 124,
- /* 125 */ EVOP_STOP_TEXLINE,
- /* 126 */ EVOP_LOOP,
- /* 127 */ EVOP_STOP_SCRIPT,
-} EventOpcode;
-
-typedef enum EventCondition {
- /* 0 */ EVC_NONE,
- /* 1 */ EVC_1,
- /* 2 */ EVC_TEAM_COUNT_3,
- /* 3 */ EVC_TEAM_COUNT_2,
- /* 4 */ EVC_TEAM_COUNT_1,
- /* 5 */ EVC_TEAM_COUNT_0,
- /* 6 */ EVC_FALCO_ACTIVE,
- /* 7 */ EVC_PEPPY_ACTIVE,
- /* 8 */ EVC_SLIPPY_ACTIVE,
- /* 9 */ EVC_9,
- /* 10 */ EVC_10,
- /* 11 */ EVC_11,
- /* 12 */ EVC_12,
- /* 13 */ EVC_13,
- /* 14 */ EVC_14,
- /* 15 */ EVC_15,
- /* 16 */ EVC_16,
- /* 17 */ EVC_17,
- /* 18 */ EVC_18,
- /* 19 */ EVC_19,
- /* 20 */ EVC_20,
- /* 21 */ EVC_21,
- /* 22 */ EVC_22,
- /* 23 */ EVC_23,
- /* 24 */ EVC_24,
- /* 25 */ EVC_HEALTH_100p,
- /* 26 */ EVC_HEALTH_75p,
- /* 27 */ EVC_HEALTH_50p,
- /* 28 */ EVC_HEALTH_25p,
- /* 29 */ EVC_HEALTH_0p,
- /* 30 */ EVC_30,
- /* 31 */ EVC_31,
- /* 32 */ EVC_32,
- /* 33 */ EVC_33,
- /* 34 */ EVC_34,
- /* 35 */ EVC_SINGLE_LASER,
- /* 36 */ EVC_TWIN_LASER,
- /* 37 */ EVC_HYPER_LASER,
- /* 38 */ EVC_UNK3_LASER,
- /* 39 */ EVC_39,
- /* 40 */ EVC_40,
- /* 41 */ EVC_41,
- /* 42 */ EVC_42,
- /* 43 */ EVC_43,
- /* 44 */ EVC_44,
- /* 45 */ EVC_45,
- /* 46 */ EVC_46,
- /* 47 */ EVC_PRESS_CRIGHT,
- /* 48 */ EVC_WING_BROKEN,
- /* 49 */ EVC_ME_CLEAR,
- /* 50 */ EVC_FO_CLEAR,
- /* 51 */ EVC_SX_CLEAR,
- /* 52 */ EVC_TI_CLEAR,
- /* 53 */ EVC_BO_CLEAR,
- /* 54 */ EVC_SY_CLEAR,
- /* 55 */ EVC_KA_CLEAR,
- /* 56 */ EVC_SO_CLEAR,
- /* 57 */ EVC_MA_CLEAR,
- /* 58 */ EVC_AQ_CLEAR,
- /* 59 */ EVC_ZO_CLEAR,
- /* 60 */ EVC_SZ_CLEAR,
- /* 61 */ EVC_A6_CLEAR,
- /* 62 */ EVC_62,
- /* 63 */ EVC_63,
- /* 64 */ EVC_64,
- /* 65 */ EVC_30_HITS,
- /* 66 */ EVC_80_HITS,
- /* 67 */ EVC_EXPERT_MODE,
- /* 68 */ EVC_68,
- /* 69 */ EVC_69,
- /* 100 */ EVC_100=100,
-} EventCondition;
-
-typedef enum EventState {
- /* 0 */ EVSTATE_0,
- /* 1 */ EVSTATE_1,
- /* 2 */ EVSTATE_F4_PLUS_X,
- /* 3 */ EVSTATE_F4_MINUS_X,
- /* 4 */ EVSTATE_F4_PLUS_Y,
- /* 5 */ EVSTATE_F4_MINUS_Y,
- /* 6 */ EVSTATE_6,
- /* 7 */ EVSTATE_7,
- /* 8 */ EVSTATE_8,
- /* 9 */ EVSTATE_9,
- /* 10 */ EVSTATE_10,
- /* 11 */ EVSTATE_11,
- /* 12 */ EVSTATE_TEAM_RETREAT,
- /* 13 */ EVSTATE_13,
- /* 14 */ EVSTATE_14,
- /* 15 */ EVSTATE_15,
- /* 200 */ EVSTATE_SCRIPT_END = 200,
- /* 1000 */ EVSTATE_1000 = 1000,
-} EventState;
-
-typedef enum EventAction {
- /* 0 */ EVACT_0,
- /* 1 */ EVACT_1,
- /* 2 */ EVACT_2,
- /* 3 */ EVACT_3,
- /* 4 */ EVACT_4,
- /* 5 */ EVACT_5,
- /* 6 */ EVACT_6,
- /* 7 */ EVACT_7,
- /* 8 */ EVACT_8,
- /* 9 */ EVACT_9,
- /* 10 */ EVACT_10,
- /* 11 */ EVACT_11,
- /* 12 */ EVACT_12,
- /* 13 */ EVACT_13,
- /* 14 */ EVACT_14,
- /* 15 */ EVACT_15,
- /* 16 */ EVACT_16,
- /* 17 */ EVACT_17,
- /* 18 */ EVACT_18,
- /* 19 */ EVACT_19,
-} EventAction;
-
-typedef enum EventActorInfo {
- /* 0 */ EINFO_0,
- /* 1 */ EINFO_1,
- /* 2 */ EINFO_2,
- /* 3 */ EINFO_3,
- /* 4 */ EINFO_4,
- /* 5 */ EINFO_5,
- /* 6 */ EINFO_6,
- /* 7 */ EINFO_7,
- /* 8 */ EINFO_8,
- /* 9 */ EINFO_9,
- /* 10 */ EINFO_10,
- /* 11 */ EINFO_11,
- /* 12 */ EINFO_12,
- /* 13 */ EINFO_13,
- /* 14 */ EINFO_14,
- /* 15 */ EINFO_15,
- /* 16 */ EINFO_16,
- /* 17 */ EINFO_17,
- /* 18 */ EINFO_18,
- /* 19 */ EINFO_19,
- /* 20 */ EINFO_20,
- /* 21 */ EINFO_21,
- /* 22 */ EINFO_22,
- /* 23 */ EINFO_23,
- /* 24 */ EINFO_24,
- /* 25 */ EINFO_25,
- /* 26 */ EINFO_26,
- /* 27 */ EINFO_27,
- /* 28 */ EINFO_28,
- /* 29 */ EINFO_29,
- /* 30 */ EINFO_30,
- /* 31 */ EINFO_31,
- /* 32 */ EINFO_32,
- /* 33 */ EINFO_33,
- /* 34 */ EINFO_34,
- /* 35 */ EINFO_35,
- /* 36 */ EINFO_36,
- /* 37 */ EINFO_37,
- /* 38 */ EINFO_38,
- /* 39 */ EINFO_39,
- /* 40 */ EINFO_40,
- /* 41 */ EINFO_41,
- /* 42 */ EINFO_42,
- /* 43 */ EINFO_43,
- /* 44 */ EINFO_44,
- /* 45 */ EINFO_45,
- /* 46 */ EINFO_46,
- /* 47 */ EINFO_47,
- /* 48 */ EINFO_48,
- /* 49 */ EINFO_49,
- /* 50 */ EINFO_50,
- /* 51 */ EINFO_51,
- /* 52 */ EINFO_52,
- /* 53 */ EINFO_53,
- /* 54 */ EINFO_54,
- /* 55 */ EINFO_55,
- /* 56 */ EINFO_56,
- /* 57 */ EINFO_57,
- /* 58 */ EINFO_58,
- /* 59 */ EINFO_59,
- /* 60 */ EINFO_60,
- /* 61 */ EINFO_61,
- /* 62 */ EINFO_62,
- /* 63 */ EINFO_63,
- /* 64 */ EINFO_64,
- /* 65 */ EINFO_65,
- /* 66 */ EINFO_66,
- /* 67 */ EINFO_67,
- /* 68 */ EINFO_68,
- /* 69 */ EINFO_69,
- /* 70 */ EINFO_70,
- /* 71 */ EINFO_71,
- /* 72 */ EINFO_72,
- /* 73 */ EINFO_73,
- /* 74 */ EINFO_74,
- /* 75 */ EINFO_75,
- /* 76 */ EINFO_76,
- /* 77 */ EINFO_77,
- /* 78 */ EINFO_78,
- /* 79 */ EINFO_79,
- /* 80 */ EINFO_80,
- /* 81 */ EINFO_81,
- /* 82 */ EINFO_82,
- /* 83 */ EINFO_83,
- /* 84 */ EINFO_84,
- /* 85 */ EINFO_85,
- /* 86 */ EINFO_86,
- /* 87 */ EINFO_87,
- /* 88 */ EINFO_88,
- /* 89 */ EINFO_89,
- /* 90 */ EINFO_90,
- /* 91 */ EINFO_91,
- /* 92 */ EINFO_92,
- /* 93 */ EINFO_93,
- /* 94 */ EINFO_94,
- /* 95 */ EINFO_95,
- /* 96 */ EINFO_96,
- /* 97 */ EINFO_97,
- /* 98 */ EINFO_98,
- /* 99 */ EINFO_99,
- /* 100 */ EINFO_100,
- /* 101 */ EINFO_101,
- /* 102 */ EINFO_102,
- /* 103 */ EINFO_103,
- /* 104 */ EINFO_104,
- /* 105 */ EINFO_105,
- /* 106 */ EINFO_106,
- /* 107 */ EINFO_107,
- /* 200 */ EINFO_200 = 200,
- /* 300 */ EINFO_300 = 300,
-} EventActorInfo;
-
-typedef enum EventSfx {
- /* 0 */ EVSFX_0,
- /* 1 */ EVSFX_1,
- /* 2 */ EVSFX_2,
- /* 3 */ EVSFX_3,
- /* 4 */ EVSFX_4,
- /* 5 */ EVSFX_5,
- /* 6 */ EVSFX_6,
- /* 7 */ EVSFX_7,
- /* 8 */ EVSFX_8,
- /* 9 */ EVSFX_9,
- /* 10 */ EVSFX_10,
- /* 11 */ EVSFX_11,
- /* 12 */ EVSFX_12,
- /* 13 */ EVSFX_13,
- /* 14 */ EVSFX_14,
- /* 15 */ EVSFX_15,
- /* 16 */ EVSFX_16,
- /* 17 */ EVSFX_17,
- /* 18 */ EVSFX_18,
- /* 19 */ EVSFX_19,
- /* 20 */ EVSFX_20,
- /* 21 */ EVSFX_21,
- /* 22 */ EVSFX_22,
-} EventSfx;
-
-typedef enum TexLineColor {
- /* 0 */ TXLC_WHITE,
- /* 1 */ TXLC_LIGHT_BLUE,
- /* 2 */ TXLC_BLUE,
- /* 3 */ TXLC_GREEN,
- /* 4 */ TXLC_RED,
- /* 5 */ TXLC_YELLOW,
-} TexLineColor;
-
typedef enum GroundType {
/* 0 */ GROUNDTYPE_GRASS,
/* 1 */ GROUNDTYPE_ROCK,
/* 2 */ GROUNDTYPE_WATER,
} GroundType;
-typedef enum ItemDrop {
- /* 0 */ DROP_NONE,
- /* 1 */ DROP_SILVER_RING,
- /* 2 */ DROP_SILVER_RING_50p,
- /* 3 */ DROP_SILVER_RING_33p,
- /* 4 */ DROP_SILVER_RING_25p,
- /* 5 */ DROP_BOMB,
- /* 6 */ DROP_BOMB_50p,
- /* 7 */ DROP_BOMB_33p,
- /* 8 */ DROP_BOMB_25p,
- /* 9 */ DROP_LASERS,
- /* 10 */ DROP_LASERS_50p,
- /* 11 */ DROP_LASERS_33p,
- /* 12 */ DROP_LASERS_25p,
- /* 13 */ DROP_1UP,
- /* 14 */ DROP_GOLD_RING_1,
- /* 15 */ DROP_GOLD_RING_2,
- /* 16 */ DROP_GOLD_RING_3,
- /* 17 */ DROP_GOLD_RING_4,
- /* 18 */ DROP_GOLD_RING_GROUP,
- /* 19 */ DROP_LASERS_GROUP,
- /* 20 */ DROP_BOMB_GROUP,
- /* 21 */ DROP_SILVER_RING_GROUP,
- /* 22 */ DROP_SILVER_RING_10p,
- /* 23 */ DROP_WING_REPAIR,
- /* 24 */ DROP_TEAM_MESG,
- /* 25 */ DROP_SILVER_STAR,
- /* 26 */ DROP_MAX,
-} ItemDrop;
-
#endif
diff --git a/include/sf64object.h b/include/sf64object.h
index c69e7ecd..80134ba2 100644
--- a/include/sf64object.h
+++ b/include/sf64object.h
@@ -148,7 +148,6 @@ typedef struct {
/* 0x48 */ s32 state;
/* 0x4C */ s32 timer_4C;
/* 0x50 */ s8 dmgType;
- /* 0x51 */ char pad51[3];
/* 0x54 */ s32 dmgPart;
/* 0x58 */ f32 unk_58;
/* 0x5C */ f32 unk_5C;
@@ -166,7 +165,7 @@ typedef struct {
/* 0x45 */ u8 unk_45;
/* 0x46 */ s8 unk_46;
/* 0x48 */ s32 unk_48;
-} Object_4C; // size = 0x4C
+} Sprite; // size = 0x4C
typedef struct {
/* 0x00 */ Object obj;
@@ -450,21 +449,21 @@ typedef enum ObjectId {
/* 158 */ OBJ_80_158,
/* 159 */ OBJ_80_159,
/* 160 */ OBJ_80_160,
- /* 161 */ OBJ_4C_161,
- /* 162 */ OBJ_4C_162,
- /* 163 */ OBJ_4C_163,
- /* 164 */ OBJ_4C_164,
- /* 165 */ OBJ_4C_165,
- /* 166 */ OBJ_4C_166,
- /* 167 */ OBJ_4C_167,
- /* 168 */ OBJ_4C_168,
- /* 169 */ OBJ_4C_169,
- /* 170 */ OBJ_4C_170,
- /* 171 */ OBJ_4C_171,
- /* 172 */ OBJ_4C_172,
- /* 173 */ OBJ_4C_173,
- /* 174 */ OBJ_4C_174,
- /* 175 */ OBJ_4C_175,
+ /* 161 */ OBJ_SPRITE_CO_POLE,
+ /* 162 */ OBJ_SPRITE_CO_TREE,
+ /* 163 */ OBJ_SPRITE_FO_POLE,
+ /* 164 */ OBJ_SPRITE_FOG_SHADOW,
+ /* 165 */ OBJ_SPRITE_CO_RUIN1,
+ /* 166 */ OBJ_SPRITE_CO_RUIN2,
+ /* 167 */ OBJ_SPRITE_167,
+ /* 168 */ OBJ_SPRITE_168,
+ /* 169 */ OBJ_SPRITE_TI_CACTUS,
+ /* 170 */ OBJ_SPRITE_CO_SMOKE,
+ /* 171 */ OBJ_SPRITE_VE1_BOSS_TRIGGER1,
+ /* 172 */ OBJ_SPRITE_VE1_BOSS_TRIGGER2,
+ /* 173 */ OBJ_SPRITE_VE1_BOSS_TRIGGER3,
+ /* 174 */ OBJ_SPRITE_VE1_BOSS_TRIGGER4,
+ /* 175 */ OBJ_SPRITE_GFOX_TARGET,
/* 176 */ OBJ_ACTOR_176,
/* 177 */ OBJ_ACTOR_177,
/* 178 */ OBJ_ACTOR_178,
@@ -617,13 +616,13 @@ typedef enum ObjectId {
/* 325 */ OBJ_ITEM_SILVER_STAR,
/* 326 */ OBJ_ITEM_METEO_WARP,
/* 327 */ OBJ_ITEM_BOMB,
- /* 328 */ OBJ_ITEM_328,
- /* 329 */ OBJ_ITEM_329,
- /* 330 */ OBJ_ITEM_330,
- /* 331 */ OBJ_ITEM_331,
- /* 332 */ OBJ_ITEM_332,
- /* 333 */ OBJ_ITEM_333,
- /* 334 */ OBJ_ITEM_334,
+ /* 328 */ OBJ_ITEM_PATH_SPLIT_X,
+ /* 329 */ OBJ_ITEM_PATH_TURN_LEFT,
+ /* 330 */ OBJ_ITEM_PATH_TURN_RIGHT,
+ /* 331 */ OBJ_ITEM_PATH_SPLIT_Y,
+ /* 332 */ OBJ_ITEM_PATH_TURN_UP,
+ /* 333 */ OBJ_ITEM_PATH_TURN_DOWN,
+ /* 334 */ OBJ_ITEM_RING_CHECK,
/* 335 */ OBJ_ITEM_1UP,
/* 336 */ OBJ_ITEM_GOLD_RING,
/* 337 */ OBJ_ITEM_WING_REPAIR,
@@ -701,6 +700,36 @@ typedef enum ObjectId {
#define ACTOR_EVENT_ID 1000
+typedef enum ItemDrop {
+ /* 0 */ DROP_NONE,
+ /* 1 */ DROP_SILVER_RING,
+ /* 2 */ DROP_SILVER_RING_50p,
+ /* 3 */ DROP_SILVER_RING_33p,
+ /* 4 */ DROP_SILVER_RING_25p,
+ /* 5 */ DROP_BOMB,
+ /* 6 */ DROP_BOMB_50p,
+ /* 7 */ DROP_BOMB_33p,
+ /* 8 */ DROP_BOMB_25p,
+ /* 9 */ DROP_LASERS,
+ /* 10 */ DROP_LASERS_50p,
+ /* 11 */ DROP_LASERS_33p,
+ /* 12 */ DROP_LASERS_25p,
+ /* 13 */ DROP_1UP,
+ /* 14 */ DROP_GOLD_RING_1,
+ /* 15 */ DROP_GOLD_RING_2,
+ /* 16 */ DROP_GOLD_RING_3,
+ /* 17 */ DROP_GOLD_RING_4,
+ /* 18 */ DROP_GOLD_RING_GROUP,
+ /* 19 */ DROP_LASERS_GROUP,
+ /* 20 */ DROP_BOMB_GROUP,
+ /* 21 */ DROP_SILVER_RING_GROUP,
+ /* 22 */ DROP_SILVER_RING_10p,
+ /* 23 */ DROP_WING_REPAIR,
+ /* 24 */ DROP_TEAM_MESG,
+ /* 25 */ DROP_SILVER_STAR,
+ /* 26 */ DROP_MAX,
+} ItemDrop;
+
typedef enum AllRangeAi {
/* 0 */ AI360_FOX,
/* 1 */ AI360_FALCO,
@@ -874,4 +903,406 @@ typedef enum {
/* 50 */ LN_VWK_MAX,
} BossLNvwork;
+typedef Object_80 Object80_0;
+typedef Object_80 Object80_1;
+typedef Object_80 Object80_2;
+typedef Object_80 Object80_3;
+typedef Object_80 Object80_4;
+typedef Object_80 Object80_5;
+typedef Object_80 Object80_6;
+typedef Object_80 Object80_7;
+typedef Object_80 Object80_8;
+typedef Object_80 Object80_9;
+typedef Object_80 Object80_10;
+typedef Object_80 Object80_11;
+typedef Object_80 Object80_12;
+typedef Object_80 Object80_13;
+typedef Object_80 Object80_14;
+typedef Object_80 Object80_15;
+typedef Object_80 Object80_16;
+typedef Object_80 Object80_17;
+typedef Object_80 Object80_18;
+typedef Object_80 Object80_19;
+typedef Object_80 Object80_20;
+typedef Object_80 Object80_21;
+typedef Object_80 Object80_22;
+typedef Object_80 Object80_23;
+typedef Object_80 Object80_24;
+typedef Object_80 Object80_25;
+typedef Object_80 Object80_26;
+typedef Object_80 Object80_27;
+typedef Object_80 Object80_28;
+typedef Object_80 Object80_29;
+typedef Object_80 Object80_30;
+typedef Object_80 Object80_31;
+typedef Object_80 Object80_32;
+typedef Object_80 Object80_33;
+typedef Object_80 Object80_34;
+typedef Object_80 Object80_35;
+typedef Object_80 Object80_36;
+typedef Object_80 Object80_37;
+typedef Object_80 Object80_38;
+typedef Object_80 Object80_39;
+typedef Object_80 Object80_40;
+typedef Object_80 Object80_41;
+typedef Object_80 Object80_42;
+typedef Object_80 Object80_43;
+typedef Object_80 Object80_44;
+typedef Object_80 Object80_45;
+typedef Object_80 Object80_46;
+typedef Object_80 Object80_47;
+typedef Object_80 Object80_48;
+typedef Object_80 Object80_49;
+typedef Object_80 Object80_50;
+typedef Object_80 Object80_51;
+typedef Object_80 Object80_52;
+typedef Object_80 Object80_53;
+typedef Object_80 Object80_54;
+typedef Object_80 Object80_55;
+typedef Object_80 Object80_56;
+typedef Object_80 Object80_57;
+typedef Object_80 Object80_58;
+typedef Object_80 Object80_59;
+typedef Object_80 Object80_60;
+typedef Object_80 Object80_61;
+typedef Object_80 Object80_62;
+typedef Object_80 Object80_63;
+typedef Object_80 Object80_64;
+typedef Object_80 Object80_65;
+typedef Object_80 Object80_66;
+typedef Object_80 Object80_67;
+typedef Object_80 Object80_68;
+typedef Object_80 Object80_69;
+typedef Object_80 Object80_70;
+typedef Object_80 Object80_71;
+typedef Object_80 Object80_72;
+typedef Object_80 Object80_73;
+typedef Object_80 Object80_74;
+typedef Object_80 Object80_75;
+typedef Object_80 Object80_76;
+typedef Object_80 Object80_77;
+typedef Object_80 Object80_78;
+typedef Object_80 Object80_79;
+typedef Object_80 Object80_80;
+typedef Object_80 Object80_81;
+typedef Object_80 Object80_82;
+typedef Object_80 Object80_83;
+typedef Object_80 Object80_84;
+typedef Object_80 Object80_85;
+typedef Object_80 Object80_86;
+typedef Object_80 Object80_87;
+typedef Object_80 Object80_88;
+typedef Object_80 Object80_89;
+typedef Object_80 Object80_90;
+typedef Object_80 Object80_91;
+typedef Object_80 Object80_92;
+typedef Object_80 Object80_93;
+typedef Object_80 Object80_94;
+typedef Object_80 Object80_95;
+typedef Object_80 Object80_96;
+typedef Object_80 Object80_97;
+typedef Object_80 Object80_98;
+typedef Object_80 Object80_99;
+typedef Object_80 Object80_100;
+typedef Object_80 Object80_101;
+typedef Object_80 Object80_102;
+typedef Object_80 Object80_103;
+typedef Object_80 Object80_104;
+typedef Object_80 Object80_105;
+typedef Object_80 Object80_106;
+typedef Object_80 Object80_107;
+typedef Object_80 Object80_108;
+typedef Object_80 Object80_109;
+typedef Object_80 Object80_110;
+typedef Object_80 Object80_111;
+typedef Object_80 Object80_112;
+typedef Object_80 Object80_113;
+typedef Object_80 Object80_114;
+typedef Object_80 Object80_115;
+typedef Object_80 Object80_116;
+typedef Object_80 Object80_117;
+typedef Object_80 Object80_118;
+typedef Object_80 Object80_119;
+typedef Object_80 Object80_120;
+typedef Object_80 Object80_121;
+typedef Object_80 Object80_122;
+typedef Object_80 Object80_123;
+typedef Object_80 Object80_124;
+typedef Object_80 Object80_125;
+typedef Object_80 Object80_126;
+typedef Object_80 Object80_127;
+typedef Object_80 Object80_128;
+typedef Object_80 Object80_129;
+typedef Object_80 Object80_130;
+typedef Object_80 Object80_131;
+typedef Object_80 Object80_132;
+typedef Object_80 Object80_133;
+typedef Object_80 Object80_134;
+typedef Object_80 Object80_135;
+typedef Object_80 Object80_136;
+typedef Object_80 Object80_137;
+typedef Object_80 Object80_138;
+typedef Object_80 Object80_139;
+typedef Object_80 Object80_140;
+typedef Object_80 Object80_141;
+typedef Object_80 Object80_142;
+typedef Object_80 Object80_143;
+typedef Object_80 Object80_144;
+typedef Object_80 Object80_145;
+typedef Object_80 Object80_146;
+typedef Object_80 Object80_147;
+typedef Object_80 Object80_148;
+typedef Object_80 Object80_149;
+typedef Object_80 Object80_150;
+typedef Object_80 Object80_151;
+typedef Object_80 Object80_152;
+typedef Object_80 Object80_153;
+typedef Object_80 Object80_154;
+typedef Object_80 Object80_155;
+typedef Object_80 Object80_156;
+typedef Object_80 Object80_157;
+typedef Object_80 Object80_158;
+typedef Object_80 Object80_159;
+typedef Object_80 Object80_160;
+typedef Sprite CoPole;
+typedef Sprite CoTree;
+typedef Sprite FoPole;
+typedef Sprite FogShadow;
+typedef Sprite CoRuin1;
+typedef Sprite CoRuin2;
+typedef Sprite Sprite167;
+typedef Sprite Sprite168;
+typedef Sprite TiCactus;
+typedef Sprite CoSmoke;
+typedef Sprite Ve1BossTrigger1;
+typedef Sprite Ve1BossTrigger2;
+typedef Sprite Ve1BossTrigger3;
+typedef Sprite Ve1BossTrigger4;
+typedef Sprite GfoxTarget;
+typedef Actor Actor176;
+typedef Actor Actor177;
+typedef Actor Actor178;
+typedef Actor Actor179;
+typedef Actor Actor180;
+typedef Actor Actor181;
+typedef Actor Actor182;
+typedef Actor Actor183;
+typedef Actor Actor184;
+typedef Actor Actor185;
+typedef Actor Actor186;
+typedef Actor Actor187;
+typedef Actor Actor188;
+typedef Actor Actor189;
+typedef Actor Actor190;
+typedef Actor Actor191;
+typedef Actor Actor192;
+typedef Actor Actor193;
+typedef Actor Actor194;
+typedef Actor Actor195;
+typedef Actor Actor196;
+typedef Actor ActorAllRange;
+typedef Actor ActorTeamBoss;
+typedef Actor Actor199;
+typedef Actor ActorEvent;
+typedef Actor Actor201;
+typedef Actor Actor202;
+typedef Actor ActorSlippySX;
+typedef Actor Actor204;
+typedef Actor Actor205;
+typedef Actor Actor206;
+typedef Actor Actor207;
+typedef Actor Actor208;
+typedef Actor Actor209;
+typedef Actor Actor210;
+typedef Actor Actor211;
+typedef Actor Actor212;
+typedef Actor Actor213;
+typedef Actor Actor214;
+typedef Actor Actor215;
+typedef Actor Actor216;
+typedef Actor Actor217;
+typedef Actor Actor218;
+typedef Actor Actor219;
+typedef Actor Actor220;
+typedef Actor Actor221;
+typedef Actor Actor222;
+typedef Actor Actor223;
+typedef Actor Actor224;
+typedef Actor Actor225;
+typedef Actor Actor226;
+typedef Actor Actor227;
+typedef Actor Actor228;
+typedef Actor Actor229;
+typedef Actor Actor230;
+typedef Actor Actor231;
+typedef Actor Actor232;
+typedef Actor Actor233;
+typedef Actor Actor234;
+typedef Actor Actor235;
+typedef Actor Actor236;
+typedef Actor Actor237;
+typedef Actor Actor238;
+typedef Actor Actor239;
+typedef Actor Actor240;
+typedef Actor Actor241;
+typedef Actor Actor242;
+typedef Actor Actor243;
+typedef Actor Actor244;
+typedef Actor Actor245;
+typedef Actor Actor246;
+typedef Actor Actor247;
+typedef Actor Actor248;
+typedef Actor Actor249;
+typedef Actor Actor250;
+typedef Actor Actor251;
+typedef Actor Actor252;
+typedef Actor Actor253;
+typedef Actor Actor254;
+typedef Actor Actor255;
+typedef Actor Actor256;
+typedef Actor Actor257;
+typedef Actor Actor258;
+typedef Actor Actor259;
+typedef Actor Actor260;
+typedef Actor Actor261;
+typedef Actor Actor262;
+typedef Actor Actor263;
+typedef Actor Actor264;
+typedef Actor Actor265;
+typedef Actor Actor266;
+typedef Actor Actor267;
+typedef Actor Actor268;
+typedef Actor Actor269;
+typedef Actor Actor270;
+typedef Actor Actor271;
+typedef Actor Actor272;
+typedef Actor Actor273;
+typedef Actor Actor274;
+typedef Actor Actor275;
+typedef Actor Actor276;
+typedef Actor Actor277;
+typedef Actor Actor278;
+typedef Actor Actor279;
+typedef Actor Actor280;
+typedef Actor Actor281;
+typedef Actor Actor282;
+typedef Actor Actor283;
+typedef Actor Actor284;
+typedef Actor Actor285;
+typedef Actor Actor286;
+typedef Actor Actor287;
+typedef Actor Actor288;
+typedef Actor Actor289;
+typedef Actor Actor290;
+typedef Actor ActorSupplies;
+typedef Boss Boss292;
+typedef Boss Boss293;
+typedef Boss Boss294;
+typedef Boss Boss295;
+typedef Boss Boss296;
+typedef Boss Boss297;
+typedef Boss Boss298;
+typedef Boss Boss299;
+typedef Boss Boss300;
+typedef Boss Boss301;
+typedef Boss BossA6;
+typedef Boss Boss303;
+typedef Boss Boss304;
+typedef Boss Boss305;
+typedef Boss Boss306;
+typedef Boss BossZO;
+typedef Boss Boss308;
+typedef Boss Boss309;
+typedef Boss Boss310;
+typedef Boss Boss311;
+typedef Boss Boss312;
+typedef Boss Boss313;
+typedef Boss Boss314;
+typedef Boss BossSO;
+typedef Boss Boss316;
+typedef Boss Boss317;
+typedef Boss BossAQ;
+typedef Boss Boss319;
+typedef Boss Boss320;
+typedef Boss Boss321;
+typedef Item ItemLasers;
+typedef Item ItemCheckpoint;
+typedef Item ItemSilverStar;
+typedef Item ItemSilverRing;
+typedef Item ItemMeteoWarp;
+typedef Item ItemBomb;
+typedef Item ItemPathSplitX;
+typedef Item ItemPathTurnLeft;
+typedef Item ItemPathTurnRight;
+typedef Item ItemPathSplitY;
+typedef Item ItemPathTurnUp;
+typedef Item ItemPathTurnDown;
+typedef Item ItemRingCheck;
+typedef Item Item1UP;
+typedef Item ItemGoldRing;
+typedef Item ItemWingRepair;
+typedef Item ItemTrainingRing;
+typedef Effect Effect339;
+typedef Effect Effect340;
+typedef Effect Effect341;
+typedef Effect Effect342;
+typedef Effect Effect343;
+typedef Effect Effect344;
+typedef Effect Effect345;
+typedef Effect Effect346;
+typedef Effect Effect347;
+typedef Effect Effect348;
+typedef Effect Effect349;
+typedef Effect Effect350;
+typedef Effect Effect351;
+typedef Effect Effect352;
+typedef Effect Effect353;
+typedef Effect Effect354;
+typedef Effect Effect355;
+typedef Effect Effect356;
+typedef Effect Effect357;
+typedef Effect Effect358;
+typedef Effect Effect359;
+typedef Effect Effect360;
+typedef Effect Effect361;
+typedef Effect Effect362;
+typedef Effect Effect363;
+typedef Effect Effect364;
+typedef Effect Effect365;
+typedef Effect Effect366;
+typedef Effect Effect367;
+typedef Effect Effect368;
+typedef Effect Effect369;
+typedef Effect Effect370;
+typedef Effect Effect371;
+typedef Effect Effect372;
+typedef Effect Effect373;
+typedef Effect Effect374;
+typedef Effect Effect375;
+typedef Effect Effect376;
+typedef Effect Effect377;
+typedef Effect Effect378;
+typedef Effect Effect379;
+typedef Effect Effect380;
+typedef Effect Effect381;
+typedef Effect Effect382;
+typedef Effect Effect383;
+typedef Effect Effect384;
+typedef Effect Effect385;
+typedef Effect Effect386;
+typedef Effect Effect387;
+typedef Effect Effect388;
+typedef Effect Effect389;
+typedef Effect Effect390;
+typedef Effect Effect391;
+typedef Effect Effect392;
+typedef Effect Effect393;
+typedef Effect Effect394;
+typedef Effect Effect395;
+typedef Effect Effect396;
+typedef Effect Effect397;
+typedef Effect Effect398;
+typedef Effect Effect399;
+
+
#endif
diff --git a/include/sf64player.h b/include/sf64player.h
index 2817e56e..31523e2a 100644
--- a/include/sf64player.h
+++ b/include/sf64player.h
@@ -4,6 +4,25 @@
#include "sf64math.h"
#include "sf64object.h"
+#define PFLAG_228_0 (1 << 0)
+#define PFLAG_228_1 (1 << 1)
+#define PFLAG_228_2 (1 << 2)
+#define PFLAG_228_3 (1 << 3)
+#define PFLAG_228_4 (1 << 4)
+#define PFLAG_228_5 (1 << 5)
+#define PFLAG_228_6 (1 << 6)
+#define PFLAG_228_7 (1 << 7)
+
+typedef enum TeamId {
+ /* 0 */ TEAM_ID_FOX,
+ /* 1 */ TEAM_ID_FALCO,
+ /* 2 */ TEAM_ID_SLIPPY,
+ /* 3 */ TEAM_ID_PEPPY,
+ /* 4 */ TEAM_ID_KATT,
+ /* 5 */ TEAM_ID_BILL,
+ /* 6 */ TEAM_ID_MAX,
+} TeamId;
+
typedef enum WingState {
/* 0 */ WINGSTATE_NONE,
/* 1 */ WINGSTATE_BROKEN,
@@ -20,15 +39,15 @@ typedef enum PlayerForm {
} PlayerForm;
typedef enum DrawMode {
- /* 0 */ DRAWMODE_0,
- /* 1 */ DRAWMODE_1,
- /* 2 */ DRAWMODE_2,
+ /* 0 */ DRAW_NONE,
+ /* 1 */ DRAW_TITLE,
+ /* 2 */ DRAW_OPTION,
/* 3 */ DRAW_MAP,
- /* 4 */ DRAWMODE_4,
- /* 5 */ DRAWMODE_5,
- /* 6 */ DRAWMODE_6,
- /* 7 */ DRAWMODE_7,
- /* 8 */ DRAWMODE_8,
+ /* 4 */ DRAW_PLAY,
+ /* 5 */ DRAW_UNK_MAP,
+ /* 6 */ DRAW_UNK_VS,
+ /* 7 */ DRAW_UNK_7,
+ /* 8 */ DRAW_ENDING,
} DrawMode;
typedef enum LevelMode {
@@ -216,7 +235,7 @@ typedef struct Player {
/* 0x18C */ f32 unk_18C;
/* 0x190 */ f32 unk_190;
/* 0x194 */ f32 unk_194;
- /* 0x198 */ s32 unk_198;
+ /* 0x198 */ s32 savedCockpitView;
/* 0x19C */ s32 unk_19C;
/* 0x1A0 */ s32 unk_1A0;
/* 0x1A4 */ s32 unk_1A4;
@@ -255,7 +274,7 @@ typedef struct Player {
/* 0x22C */ s32 unk_22C;
/* 0x230 */ s32 unk_230;
/* 0x234 */ s32 unk_234;
- /* 0x238 */ s32 unk_238;
+ /* 0x238 */ s32 cockpitView;
/* 0x23C */ s32 unk_23C;
/* 0x240 */ s32 unk_240;
/* 0x244 */ s32 timer_244;
diff --git a/include/sf64thread.h b/include/sf64thread.h
index 407d0f72..9c37be1b 100644
--- a/include/sf64thread.h
+++ b/include/sf64thread.h
@@ -13,7 +13,7 @@ typedef enum {
/* 5 */ GSTATE_GAME_OVER,
/* 6 */ GSTATE_VS_INIT,
/* 7 */ GSTATE_PLAY,
- /* 8 */ GSTATE_CREDITS,
+ /* 8 */ GSTATE_ENDING,
/* 100 */ GSTATE_BOOT = 100,
/* 101 */ GSTATE_BOOT_WAIT,
/* 102 */ GSTATE_SHOW_LOGO,
@@ -22,6 +22,13 @@ typedef enum {
/* 105 */ GSTATE_START,
} GameState;
+typedef enum PlayState {
+ /* 0 */ PLAY_STANDBY,
+ /* 1 */ PLAY_INIT,
+ /* 2 */ PLAY_UPDATE,
+ /* 100 */ PLAY_PAUSE=100,
+} PlayState;
+
typedef void (*TimerAction)(s32*, s32);
typedef struct {
diff --git a/include/sys.h b/include/sys.h
index 7686ec02..e9a403ff 100644
--- a/include/sys.h
+++ b/include/sys.h
@@ -24,8 +24,8 @@ typedef s32 (*CompareFunc)(void*, void*);
s32 Lib_vsPrintf(char* dst, const char* fmt, va_list args);
void Lib_vTable(s32 index, void (**table)(s32, s32), s32 arg0, s32 arg1);
void Lib_QuickSort(u8* first, u32 length, u32 size, CompareFunc cFunc);
-void Lib_Perspective(Gfx** dList);
-void Lib_Ortho(Gfx** dList);
+void Lib_InitPerspective(Gfx** dList);
+void Lib_InitOrtho(Gfx** dList);
void Lib_DmaRead(void* src, void* dst, s32 size);
void Lib_FillScreen(u8 setFill);
@@ -40,7 +40,7 @@ s32 vsprintf(char* dst, const char* fmt, va_list args);
void Game_Initialize(void);
void Game_Update(void);
-extern s32 D_game_800D2860[];
+extern s32 gShowCrosshairs[];
extern s32 D_game_800D2870;
extern f32 D_game_80161A10;
@@ -48,7 +48,7 @@ extern f32 D_game_80161A14;
extern s32 gPlayerInactive[4];
extern s32 D_game_80161A28;
extern u8 D_game_80161A2C;
-extern u16 D_game_80161A2E;
+extern u16 gNextLevelStage;
extern u16 gNextLevel;
extern u16 gNextGameState;
extern u16 D_game_80161A34;
diff --git a/include/variables.h b/include/variables.h
index 372884fd..c56749bb 100644
--- a/include/variables.h
+++ b/include/variables.h
@@ -26,28 +26,28 @@ extern Actor* D_display_800CA234;
extern s32 D_display_Timer_800CA238;
// fox_edata
-extern f32 D_edata_800CBE70[];
-extern f32 D_edata_800CBE8C[];
-extern f32 D_edata_800CBEA8[];
-extern f32 D_edata_800CBEC4[];
-extern f32 D_edata_800CBEE0[];
-extern f32 D_edata_800CBEFC[];
-extern f32 D_edata_800CBF18[];
-extern f32 D_edata_800CBF34[];
-extern f32 D_edata_800CBF38[];
-extern f32 D_edata_800CBF54[];
-extern f32 D_edata_800CBF70[];
+extern f32 gActor241Hitbox[];
+extern f32 gDefaultCubeHitbox100[];
+extern f32 gDefaultCubeHitbox150[];
+extern f32 gDefaultCubeHitbox200[];
+extern f32 gDefaultCubeHitbox300[];
+extern f32 gDefaultCubeHitbox400[];
+extern f32 gItemRingCheckHitbox[];
+extern f32 gHitboxNone[];
+extern f32 gItemCheckpointHitbox[];
+extern f32 gItemSupplyRingHitbox[];
+extern f32 gMeteoWarpHitbox[];
extern f32 D_edata_800CBF8C[];
-extern f32 D_edata_800CBFA8[];
-extern f32 D_edata_800CBFC8[];
-extern f32 D_edata_800CBFE4[];
-extern f32 D_edata_800CC000[];
-extern f32 D_edata_800CC01C[];
-extern f32 D_edata_800CC038[];
-extern f32 D_edata_800CC054[];
-extern f32 D_edata_800CC070[];
-extern f32 D_edata_800CC0D4[];
-extern f32 D_edata_800CC0F0[];
+extern f32 gItemLasersHitbox[];
+extern f32 gItemBombHitbox[];
+extern f32 gActor190_191Hitbox[];
+extern f32 gActor194HItbox[];
+extern f32 gTeamHitbox[];
+extern f32 gActorAllRangeHItbox[];
+extern f32 gWarpZoneEvent94Hitbox[];
+extern f32 gWarpZoneEvent96Hitbox[];
+extern f32 gWarpZoneEvent92Hitbox[];
+extern f32 gWarpZoneEvent93Hitbox[];
extern ObjectInfo D_edata_800CC124[];
extern f32* D_edata_800CF964[];
@@ -74,12 +74,12 @@ extern f32 D_edisplay_800CFCCC[];
extern Gfx D_edisplay_800CFD80[];
// fox_enmy
-extern ObjectInit* D_enmy_800CFDA0[];
+extern ObjectInit* gLevelObjectInits[];
extern u32 D_enmy_800CFF54[9];
// fox_enmy2
extern s32 D_enmy2_800CFF80[4];
-extern s32 D_enmy2_800CFF90;
+extern s32 gCallVoiceParam;
// fox_hud
extern s16 D_hud_800D1970;
@@ -96,22 +96,22 @@ extern u8 D_play_800D3180[30];
extern s32 gCurrentMsgPri;
// fox_360
-extern s32 D_360_8015F900;
-extern s32 D_360_8015F904;
-extern s16 D_360_8015F908;
-extern s32 D_360_8015F90C;
-extern s32 D_360_8015F910;
-extern f32 D_360_8015F914;
-extern f32 D_360_8015F918;
-extern f32 D_360_8015F91C;
-extern u8 D_360_8015F920;
-extern u8 D_360_8015F921;
-extern s32 D_360_8015F924;
-extern s32 D_360_8015F928;
-extern s32 D_360_8015F930[3];
-extern s32 D_360_8015F93C;
-extern s32 D_360_8015F940;
-extern f32 D_360_8015F944;
+extern s32 gAllRangeSupplyTimer;
+extern s32 sStarWolfKillTimer;
+extern s16 gStarWolfMsgTimer;
+extern s32 gAllRangeWingRepairTimer;
+extern s32 gAllRangeWingRepairSent;
+extern f32 gSzMissileR;
+extern f32 gSzMissileG;
+extern f32 gSzMissileB;
+extern u8 gKaKilledAlly;
+extern u8 gKaAllyKillCount;
+extern s32 gAllRangeCheckpoint;
+extern s32 gAllRangeEventTimer;
+extern s32 gAllRangeCountdown[3];
+extern s32 gShowAllRangeCountdown;
+extern s32 gAllRangeFrameCount;
+extern f32 gAllRangeCountdownScale;
// fox_bg
extern f32 D_bg_800C9C30;
@@ -133,7 +133,7 @@ extern s32 gBossFrameCount;
// fox_display
extern Vec3f D_display_801613B0[]; // static, here for reordering
extern Vec3f D_display_801613E0[]; // static, here for reordering
-extern s16 D_display_80161410;
+extern s16 gReflectY;
extern Matrix D_display_80161418[]; // static, here for reordering
extern Vec3f D_display_80161518[]; // static, here for reordering
extern Vec3f D_display_80161548[]; // static, here for reordering
@@ -146,11 +146,11 @@ extern Vec3f D_edisplay_801615D0;
// fox_enmy
extern s32 D_enmy_Timer_80161670[4];
-extern s32 D_enmy_80161680;
-extern u8 D_enmy_80161684;
+extern s32 gLastPathChange;
+extern u8 gMissedZoSearchlight;
// fox_enmy2
-extern s32 D_enmy2_80161690;
+extern s32 gCallTimer;
// fox_hud
extern s32 D_hud_80161704;
@@ -164,7 +164,7 @@ extern s32 D_hud_80161730;
extern s32 gShowBossHealth; // 0x80161734
// fox_play
-extern u8 D_play_80161A50;
+extern u8 gSavedZoSearchlightStatus;
extern f32 D_play_80161A54;
extern s32 D_play_80161A58;
extern s32 D_play_80161A5C;