summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorpetrie911 <69443847+petrie911@users.noreply.github.com>2024-05-25 12:17:03 -0500
committerGitHub <noreply@github.com>2024-05-25 12:17:03 -0500
commit0f6d7cca339705baa473b709be30e08ed85a67a6 (patch)
treeab0d5b4d19d3a46b2a0316f40f4cab194438813c /include
parent03ce166cca2b9d71b13b9af40cf6875698d36136 (diff)
Player and Vs docs, some improvement to ve1 boss (#259)
* playerstuff * stuff * small fixes * Torch * torch update again
Diffstat (limited to 'include')
-rw-r--r--include/context.h2
-rw-r--r--include/i3.h2
-rw-r--r--include/macros.h4
-rw-r--r--include/mods.h4
-rw-r--r--include/prevent_context_reordering.h6
-rw-r--r--include/sf64event.h2
-rw-r--r--include/sf64level.h27
-rw-r--r--include/sf64player.h54
-rw-r--r--include/variables.h2
9 files changed, 65 insertions, 38 deletions
diff --git a/include/context.h b/include/context.h
index 58e61911..916b18e6 100644
--- a/include/context.h
+++ b/include/context.h
@@ -8,7 +8,7 @@
extern s32 gSceneId;
extern s32 gSceneSetup;
-extern s32 D_ctx_80177824;
+extern s32 gClearPlayerInfo;
extern s32 D_ctx_8017782C;
extern GameState gGameState;
extern s32 gNextGameStateTimer;
diff --git a/include/i3.h b/include/i3.h
index a7620e87..f9ece938 100644
--- a/include/i3.h
+++ b/include/i3.h
@@ -14,7 +14,7 @@ void Aquas_801BE034(Actor*);
void Area6_8018DA58(Actor*);
void Zoness_8019E5F0(Actor*);
void Solar_801A8BE8(Actor*);
-void Aquas_801AB9B0(Player*);
+void Aquas_BlueMarineDown(Player*);
void Aquas_801BE0F0(Actor*);
void OvlI3_CallFunction(s32, void*);
diff --git a/include/macros.h b/include/macros.h
index 6c04ee09..6d7a15e6 100644
--- a/include/macros.h
+++ b/include/macros.h
@@ -18,10 +18,10 @@
#define RAND_FLOAT_CENTERED_SEEDED(width) ((Rand_ZeroOneSeeded()-0.5f)*(width))
#define SEGMENTED_TO_VIRTUAL(segment) ((void*)OS_PHYSICAL_TO_K0(gSegments[((uintptr_t)(segment)<<4)>>0x1C]+(((uintptr_t)(segment))&0xFFFFFF)))
+#define SEGMENTED_TO_VIRTUAL_JP(segment) ((void*)OS_PHYSICAL_TO_K0(gSegments[((uintptr_t)(segment)&(0xF<<0x18))>>0x18]+(((uintptr_t)(segment))&0xFFFFFF)))
#define ARRAY_COUNT(arr) (s32)(sizeof(arr) / sizeof(arr[0]))
#define ARRAY_COUNTU(arr) (u32)(sizeof(arr) / sizeof(arr[0]))
-
#define SIGN_OF(x) (((x) > 0) ? 1 : ((x) == 0) ? 0 : -1)
#define SQ(x) ((x) * (x))
#define CUBE(x) ((x) * (x) * (x))
@@ -41,7 +41,7 @@
#define USEC_TO_CYCLES(n) (((u64)(n)*(osClockRate/15625LL))/(1000000LL/15625LL))
#define MSEC_TO_CYCLES(n) (USEC_TO_CYCLES((n) * 1000LL))
-#define CYCLES_TO_USEC(c) (((u64)(c)*(1000000LL/15625LL))/(osClockRate/15625LL))
+#define CYCLES_TO_USEC(c) (((u64)(c)*(1000000LL/15625LL))/(osClockRate/15625LL))
#define CYCLES_TO_MSEC(c) ((s32)CYCLES_TO_USEC(c)/1000)
#define UNPACK_BYTE(data, bytenum) (((data) & (0xFF << ((bytenum) * 8))) >> ((bytenum) * 8))
diff --git a/include/mods.h b/include/mods.h
index 823b36d9..5b0a63aa 100644
--- a/include/mods.h
+++ b/include/mods.h
@@ -35,13 +35,13 @@
/**
* FPS Counter:
- * Press L to toggle FPS Display
+ * Hold Z + R and press L to toggle FPS Display
*/
#define MODS_FPS_COUNTER 0
/**
* RAM modifier:
- * Press C> while paused to cycle modes
+ * Hold Z + R and press C> to cycle modes
*
* Cheats:
* Use D-Pad up and down to select a cheat
diff --git a/include/prevent_context_reordering.h b/include/prevent_context_reordering.h
index 2fdd6c20..a8176f1f 100644
--- a/include/prevent_context_reordering.h
+++ b/include/prevent_context_reordering.h
@@ -11,9 +11,9 @@
// 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 Dummy9 {int x;};
+// struct Dummy10 {int x;};
+// struct Dummy11 {int x;};
struct Dummy12 {int x;};
struct Dummy13 {int x;};
struct Dummy14 {int x;};
diff --git a/include/sf64event.h b/include/sf64event.h
index 9e75d7f6..264ad4a7 100644
--- a/include/sf64event.h
+++ b/include/sf64event.h
@@ -306,7 +306,7 @@ typedef enum EventAction {
typedef enum EventActorId {
/* 0 */ EVID_0,
/* 1 */ EVID_1,
- /* 2 */ EVID_2,
+ /* 2 */ EVID_SLIPPY_METEO,
/* 3 */ EVID_3,
/* 4 */ EVID_4,
/* 5 */ EVID_5,
diff --git a/include/sf64level.h b/include/sf64level.h
index c644f77a..186f0676 100644
--- a/include/sf64level.h
+++ b/include/sf64level.h
@@ -135,6 +135,33 @@ typedef enum VsStage {
/* 2 */ VS_STAGE_SECTOR_Z,
} VsStage;
+typedef enum VsMatchType {
+ /* 0 */ VS_MATCH_POINTS,
+ /* 1 */ VS_MATCH_BATTLE,
+ /* 2 */ VS_MATCH_TIME,
+} VsMatchType;
+
+#define VS_TIME_UP(countdown) (((countdown)[0] == 0) && ((countdown)[1] == 0) && ((countdown)[2] == 0))
+
+typedef enum VsState {
+ /* 0 */ VS_STATE_0,
+ /* 1 */ VS_STATE_1,
+ /* 2 */ VS_STATE_2,
+ /* 3 */ VS_STATE_3,
+ /* 4 */ VS_STATE_4,
+ /* 5 */ VS_STATE_5,
+ /* 6 */ VS_STATE_6,
+ /* 7 */ VS_STATE_7,
+ /* 8 */ VS_STATE_8,
+ /* 9 */ VS_STATE_9,
+ /* 10 */ VS_STATE_10,
+ /* 11 */ VS_STATE_11,
+ /* 12 */ VS_STATE_12,
+ /* 13 */ VS_STATE_13,
+ /* 14 */ VS_STATE_14,
+ /* 20 */ VS_STATE_20 = 20,
+} VsState;
+
typedef enum GroundSurface {
/* 0 */ SURFACE_GRASS,
/* 1 */ SURFACE_ROCK,
diff --git a/include/sf64player.h b/include/sf64player.h
index cbdc735a..2d191a66 100644
--- a/include/sf64player.h
+++ b/include/sf64player.h
@@ -204,9 +204,9 @@ typedef struct Player {
/* 0x0F0 */ f32 rockAngle;
/* 0x0F4 */ f32 rockPhase;
/* 0x0F8 */ f32 bankAngle;
- /* 0x0FC */ f32 xRot_0FC;
- /* 0x100 */ f32 zRot_0FC;
- /* 0x104 */ Vec3f rot_104;
+ /* 0x0FC */ f32 xRot_0FC; // on-foot cam x tilt from floor
+ /* 0x100 */ f32 zRot_0FC; // on-foot cam z tilt from floor
+ /* 0x104 */ Vec3f rot_104; // rotation modifiers from ground movement
/* 0x110 */ f32 boostSpeed;
/* 0x114 */ f32 yRot_114;
/* 0x118 */ f32 pathChangeYaw;
@@ -221,8 +221,8 @@ typedef struct Player {
/* 0x13C */ char pad13C[4];
/* 0x140 */ f32 zPathVel;
/* 0x144 */ f32 zPath;
- /* 0x148 */ f32 unk_148;
- /* 0x14C */ f32 unk_14C;
+ /* 0x148 */ f32 unk_148; // affects how cam eye follows the player
+ /* 0x14C */ f32 unk_14C; // affects how cam at follows the player
/* 0x150 */ f32 unk_150;
/* 0x154 */ f32 unk_154;
/* 0x158 */ f32 unk_158;
@@ -242,9 +242,9 @@ typedef struct Player {
/* 0x190 */ f32 unk_190;
/* 0x194 */ f32 unk_194;
/* 0x198 */ s32 savedAlternateView;
- /* 0x19C */ s32 unk_19C;
- /* 0x1A0 */ s32 unk_1A0;
- /* 0x1A4 */ s32 unk_1A4;
+ /* 0x19C */ s32 unk_19C; // used to indicate whether a U-turn is forced, whether to draw ground in TI intro, and to stop the landmaster
+ /* 0x1A0 */ s32 unk_1A0; // tank muzzle flash timer
+ /* 0x1A4 */ s32 dmgType;
/* 0x1A8 */ char pad1A8[8];
/* 0x1B0 */ s32 turretState;
/* 0x1B4 */ s32 turretActor;
@@ -257,35 +257,35 @@ typedef struct Player {
/* 0x1D0 */ s32 csState;
/* 0x1D4 */ bool grounded;
/* 0x1D8 */ s32 meTargetIndex;
- /* 0x1DC */ s32 barrelRoll;
- /* 0x1E0 */ s32 barrelInputTimerL;
- /* 0x1E4 */ s32 barrelInputTimerR;
- /* 0x1E8 */ s32 timer_1E8;
+ /* 0x1DC */ s32 rollState;
+ /* 0x1E0 */ s32 rollInputTimerL;
+ /* 0x1E4 */ s32 rollInputTimerR;
+ /* 0x1E8 */ s32 rollTimer;
/* 0x1EC */ s32 rollRate;
/* 0x1F0 */ s32 baseRollRate;
/* 0x1F4 */ s32 hitTimer;
/* 0x1F8 */ s32 csTimer;
/* 0x1FC */ s32 csEventTimer;
- /* 0x200 */ s32 unk_200;
- /* 0x204 */ s32 unk_204;
- /* 0x208 */ s32 unk_208;
+ /* 0x200 */ s32 dmgEffect; // 1 colors the arwing red. 2 gives it a static-y texture
+ /* 0x204 */ s32 wingPosition;
+ /* 0x208 */ s32 unk_208; // timer for great fox splash effects in aquas intro
/* 0x20C */ s32 unk_20C;
/* 0x210 */ s32 pathChangeTimer;
- /* 0x214 */ s32 timer_214;
- /* 0x218 */ s32 timer_218;
- /* 0x21C */ s32 unk_21C;
+ /* 0x214 */ s32 timer_214; // unused. may have been another double input timer like barrel roll
+ /* 0x218 */ s32 timer_218; // unused. may have been another double input timer like barrel roll
+ /* 0x21C */ s32 hitDirection;
/* 0x220 */ s32 radioDamageTimer;
- /* 0x224 */ s32 timer_224;
+ /* 0x224 */ s32 dmgEffectTimer;
/* 0x228 */ s32 flags_228;
/* 0x22C */ s32 whooshTimer;
- /* 0x230 */ s32 unk_230;
- /* 0x234 */ s32 unk_234;
+ /* 0x230 */ s32 unk_230; // turns off some Blue Marine controls. perhaps was a lockout timer?
+ /* 0x234 */ s32 draw;
/* 0x238 */ s32 alternateView;
/* 0x23C */ s32 shadowing;
- /* 0x240 */ s32 unk_240;
+ /* 0x240 */ s32 hideShadow;
/* 0x244 */ s32 shotTimer;
- /* 0x248 */ f32 unk_248;
- /* 0x24C */ f32 unk_24C;
+ /* 0x248 */ f32 shadowRotX; // forms YPR triple with groundRotY
+ /* 0x24C */ f32 shadowRotZ;
/* 0x250 */ f32 unk_250; // checked for by event actors, but unused?
/* 0x250 */ char pad254[4];
/* 0x258 */ f32 meteoWarpSpinSpeed;
@@ -305,8 +305,8 @@ typedef struct Player {
/* 0x2B4 */ bool boostCooldown;
/* 0x2B8 */ bool boostActive;
/* 0x2BC */ f32 boostMeter;
- /* 0x2C0 */ f32 unk_2C0; // has to do with starting right tank jet
- /* 0x2C4 */ s32 unk_2C4; // counts up during some effects. never used
+ /* 0x2C0 */ f32 unk_2C0; // has to do with starting right tank jet. counterpart of D_800C9F20
+ /* 0x2C4 */ s32 deflectCount; // counts shots deflected by barrel rolls. never used
/* 0x2C8 */ Vec3f hit2;
/* 0x2D4 */ Vec3f hit1;
/* 0x2E0 */ Vec3f hit3;
@@ -315,7 +315,7 @@ typedef struct Player {
/* 0x460 */ f32 sfxSource[3];
/* 0x46C */ f32 sfxVel[3];
/* 0x478 */ PlayerSfx sfx;
- /* 0x498 */ s32 timer_498;
+ /* 0x498 */ s32 mercyTimer;
/* 0x49C */ WingInfo wings;
/* 0x4D8 */ f32 aerobaticPitch;
/* 0x4DC */ s32 somersault;
diff --git a/include/variables.h b/include/variables.h
index c9a13bfc..d31c8e28 100644
--- a/include/variables.h
+++ b/include/variables.h
@@ -190,7 +190,7 @@ extern s32 gVsMatchState;
extern s32 D_versus_80178758;
extern s32 sUnlockLandmaster; // sUnlockLandmaster
extern s32 sUnlockOnFoot; // sUnlockOnFoot
-extern s32 D_versus_80178768[];
+extern s32 gVsCountdown[];
// gfx_data
extern u16 D_Tex_800DACB8[][32];