Player and Vs docs, some improvement to ve1 boss (#259)

* playerstuff

* stuff

* small fixes

* Torch

* torch update again
This commit is contained in:
petrie911 2024-05-25 12:17:03 -05:00 committed by GitHub
parent 03ce166cca
commit 0f6d7cca33
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
61 changed files with 1382 additions and 1461 deletions

1
.gitignore vendored
View File

@ -5,6 +5,7 @@ __pycache__
starfox64.ld starfox64.ld
starfox64.uncompressed.ld starfox64.uncompressed.ld
starfox64.*.*.yaml starfox64.*.*.yaml
starfox64.us.modded.map
ctx.c ctx.c
ctx.c.m2c ctx.c.m2c
*.d *.d

View File

@ -147,7 +147,9 @@
"*.tcc": "c", "*.tcc": "c",
"object_ram.h": "c", "object_ram.h": "c",
"sf64dma.h": "c", "sf64dma.h": "c",
"string": "c" "string": "c",
"prevent_bss_reordering3.h": "c",
"ast_a_ti.h": "c"
}, },
"C_Cpp_Runner.msvcBatchPath": "" "C_Cpp_Runner.msvcBatchPath": ""
} }

View File

@ -4,9 +4,14 @@
header: header:
code: code:
- '#include "assets/ast_7_ti_2.h"' - '#include "assets/ast_7_ti_2.h"'
- '#include "assets/ast_8_ti.h"'
- '#include "assets/ast_9_ti.h"'
header: header:
- '#include "gfx.h"' - '#include "gfx.h"'
- '#include "sf64object.h"' - '#include "sf64object.h"'
external_files:
- "assets/yaml/us/rev1/ast_8_ti.yaml"
- "assets/yaml/us/rev1/ast_9_ti.yaml"
D_TI2_7003EE8: D_TI2_7003EE8:
{ type: SF64:ANIM, offset: 0x7003EE8, symbol: D_TI2_7003EE8 } { type: SF64:ANIM, offset: 0x7003EE8, symbol: D_TI2_7003EE8 }

View File

@ -3,10 +3,15 @@
- [0x08, 0x9EB5E0] - [0x08, 0x9EB5E0]
header: header:
code: code:
- '#include "assets/ast_7_ti_2.h"'
- '#include "assets/ast_8_ti.h"' - '#include "assets/ast_8_ti.h"'
- '#include "assets/ast_9_ti.h"'
header: header:
- '#include "gfx.h"' - '#include "gfx.h"'
- '#include "sf64object.h"' - '#include "sf64object.h"'
external_files:
- "assets/yaml/us/rev1/ast_7_ti_2.yaml"
- "assets/yaml/us/rev1/ast_9_ti.yaml"
D_TI_8000708: { type: SF64:ANIM, offset: 0x8000708, symbol: D_TI_8000708 } D_TI_8000708: { type: SF64:ANIM, offset: 0x8000708, symbol: D_TI_8000708 }

View File

@ -3,10 +3,13 @@
- [0x09, 0x9F4880] - [0x09, 0x9F4880]
header: header:
code: code:
- '#include "assets/ast_8_ti.h"'
- '#include "assets/ast_9_ti.h"' - '#include "assets/ast_9_ti.h"'
header: header:
- '#include "gfx.h"' - '#include "gfx.h"'
- '#include "sf64object.h"' - '#include "sf64object.h"'
external_files:
- "assets/yaml/us/rev1/ast_8_ti.yaml"
D_TI_9004288: D_TI_9004288:
{ type: SF64:ANIM, offset: 0x9004288, symbol: D_TI_9004288 } { type: SF64:ANIM, offset: 0x9004288, symbol: D_TI_9004288 }

View File

@ -3,10 +3,17 @@
- [0x0A, 0xA049A0] - [0x0A, 0xA049A0]
header: header:
code: code:
- '#include "assets/ast_7_ti_2.h"'
- '#include "assets/ast_8_ti.h"'
- '#include "assets/ast_9_ti.h"'
- '#include "assets/ast_A_ti.h"' - '#include "assets/ast_A_ti.h"'
header: header:
- '#include "gfx.h"' - '#include "gfx.h"'
- '#include "sf64object.h"' - '#include "sf64object.h"'
external_files:
- "assets/yaml/us/rev1/ast_7_ti_2.yaml"
- "assets/yaml/us/rev1/ast_8_ti.yaml"
- "assets/yaml/us/rev1/ast_9_ti.yaml"
D_TI_A000000: D_TI_A000000:
{type: GFX, offset: 0xA000000, symbol: D_TI_A000000} {type: GFX, offset: 0xA000000, symbol: D_TI_A000000}

View File

@ -30,7 +30,7 @@ D_blue_marine_3000470:
{ type: GFX, offset: 0x3000470, symbol: D_blue_marine_3000470 } { type: GFX, offset: 0x3000470, symbol: D_blue_marine_3000470 }
D_blue_marine_30005E8: D_blue_marine_30005E8:
{ type: BLOB, size: 24, offset: 0x30005E8, symbol: D_blue_marine_30005E8 } { type: BLOB, size: 0x18, offset: 0x30005E8, symbol: D_blue_marine_30005E8 }
D_blue_marine_3000600: D_blue_marine_3000600:
{ type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 8, offset: 0x3000600, symbol: D_blue_marine_3000600, tlut: 0x3000640 } { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 8, offset: 0x3000600, symbol: D_blue_marine_3000600, tlut: 0x3000640 }

View File

@ -175,8 +175,8 @@ D_BO_600FF74:
D_BO_6010294: D_BO_6010294:
{ type: SF64:COLPOLY, count: 262, offset: 0x6010294, symbol: D_BO_6010294, mesh_symbol: D_BO_OFFSET } { type: SF64:COLPOLY, count: 262, offset: 0x6010294, symbol: D_BO_6010294, mesh_symbol: D_BO_OFFSET }
PAD_BO_6011B20: D_BO_6011B20:
{ type: BLOB, size: 0x4, offset: 0x6011B20, symbol: PAD_BO_6011B20, mesh_symbol: D_BO_OFFSET } { type: SF64:HITBOX, offset: 0x6011B20, symbol: D_BO_6011B20 }
D_BO_6011B24: D_BO_6011B24:
{ type: SF64:HITBOX, offset: 0x6011B24, symbol: D_BO_6011B24 } { type: SF64:HITBOX, offset: 0x6011B24, symbol: D_BO_6011B24 }

View File

@ -8,7 +8,7 @@
extern s32 gSceneId; extern s32 gSceneId;
extern s32 gSceneSetup; extern s32 gSceneSetup;
extern s32 D_ctx_80177824; extern s32 gClearPlayerInfo;
extern s32 D_ctx_8017782C; extern s32 D_ctx_8017782C;
extern GameState gGameState; extern GameState gGameState;
extern s32 gNextGameStateTimer; extern s32 gNextGameStateTimer;

View File

@ -14,7 +14,7 @@ void Aquas_801BE034(Actor*);
void Area6_8018DA58(Actor*); void Area6_8018DA58(Actor*);
void Zoness_8019E5F0(Actor*); void Zoness_8019E5F0(Actor*);
void Solar_801A8BE8(Actor*); void Solar_801A8BE8(Actor*);
void Aquas_801AB9B0(Player*); void Aquas_BlueMarineDown(Player*);
void Aquas_801BE0F0(Actor*); void Aquas_801BE0F0(Actor*);
void OvlI3_CallFunction(s32, void*); void OvlI3_CallFunction(s32, void*);

View File

@ -18,10 +18,10 @@
#define RAND_FLOAT_CENTERED_SEEDED(width) ((Rand_ZeroOneSeeded()-0.5f)*(width)) #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(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_COUNT(arr) (s32)(sizeof(arr) / sizeof(arr[0]))
#define ARRAY_COUNTU(arr) (u32)(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 SIGN_OF(x) (((x) > 0) ? 1 : ((x) == 0) ? 0 : -1)
#define SQ(x) ((x) * (x)) #define SQ(x) ((x) * (x))
#define CUBE(x) ((x) * (x) * (x)) #define CUBE(x) ((x) * (x) * (x))

View File

@ -35,13 +35,13 @@
/** /**
* FPS Counter: * FPS Counter:
* Press L to toggle FPS Display * Hold Z + R and press L to toggle FPS Display
*/ */
#define MODS_FPS_COUNTER 0 #define MODS_FPS_COUNTER 0
/** /**
* RAM modifier: * RAM modifier:
* Press C> while paused to cycle modes * Hold Z + R and press C> to cycle modes
* *
* Cheats: * Cheats:
* Use D-Pad up and down to select a cheat * Use D-Pad up and down to select a cheat

View File

@ -11,9 +11,9 @@
// struct Dummy6 {int x;}; // struct Dummy6 {int x;};
// struct Dummy7 {int x;}; // struct Dummy7 {int x;};
// struct Dummy8 {int x;}; // struct Dummy8 {int x;};
struct Dummy9 {int x;}; // struct Dummy9 {int x;};
struct Dummy10 {int x;}; // struct Dummy10 {int x;};
struct Dummy11 {int x;}; // struct Dummy11 {int x;};
struct Dummy12 {int x;}; struct Dummy12 {int x;};
struct Dummy13 {int x;}; struct Dummy13 {int x;};
struct Dummy14 {int x;}; struct Dummy14 {int x;};

View File

@ -306,7 +306,7 @@ typedef enum EventAction {
typedef enum EventActorId { typedef enum EventActorId {
/* 0 */ EVID_0, /* 0 */ EVID_0,
/* 1 */ EVID_1, /* 1 */ EVID_1,
/* 2 */ EVID_2, /* 2 */ EVID_SLIPPY_METEO,
/* 3 */ EVID_3, /* 3 */ EVID_3,
/* 4 */ EVID_4, /* 4 */ EVID_4,
/* 5 */ EVID_5, /* 5 */ EVID_5,

View File

@ -135,6 +135,33 @@ typedef enum VsStage {
/* 2 */ VS_STAGE_SECTOR_Z, /* 2 */ VS_STAGE_SECTOR_Z,
} VsStage; } 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 { typedef enum GroundSurface {
/* 0 */ SURFACE_GRASS, /* 0 */ SURFACE_GRASS,
/* 1 */ SURFACE_ROCK, /* 1 */ SURFACE_ROCK,

View File

@ -204,9 +204,9 @@ typedef struct Player {
/* 0x0F0 */ f32 rockAngle; /* 0x0F0 */ f32 rockAngle;
/* 0x0F4 */ f32 rockPhase; /* 0x0F4 */ f32 rockPhase;
/* 0x0F8 */ f32 bankAngle; /* 0x0F8 */ f32 bankAngle;
/* 0x0FC */ f32 xRot_0FC; /* 0x0FC */ f32 xRot_0FC; // on-foot cam x tilt from floor
/* 0x100 */ f32 zRot_0FC; /* 0x100 */ f32 zRot_0FC; // on-foot cam z tilt from floor
/* 0x104 */ Vec3f rot_104; /* 0x104 */ Vec3f rot_104; // rotation modifiers from ground movement
/* 0x110 */ f32 boostSpeed; /* 0x110 */ f32 boostSpeed;
/* 0x114 */ f32 yRot_114; /* 0x114 */ f32 yRot_114;
/* 0x118 */ f32 pathChangeYaw; /* 0x118 */ f32 pathChangeYaw;
@ -221,8 +221,8 @@ typedef struct Player {
/* 0x13C */ char pad13C[4]; /* 0x13C */ char pad13C[4];
/* 0x140 */ f32 zPathVel; /* 0x140 */ f32 zPathVel;
/* 0x144 */ f32 zPath; /* 0x144 */ f32 zPath;
/* 0x148 */ f32 unk_148; /* 0x148 */ f32 unk_148; // affects how cam eye follows the player
/* 0x14C */ f32 unk_14C; /* 0x14C */ f32 unk_14C; // affects how cam at follows the player
/* 0x150 */ f32 unk_150; /* 0x150 */ f32 unk_150;
/* 0x154 */ f32 unk_154; /* 0x154 */ f32 unk_154;
/* 0x158 */ f32 unk_158; /* 0x158 */ f32 unk_158;
@ -242,9 +242,9 @@ typedef struct Player {
/* 0x190 */ f32 unk_190; /* 0x190 */ f32 unk_190;
/* 0x194 */ f32 unk_194; /* 0x194 */ f32 unk_194;
/* 0x198 */ s32 savedAlternateView; /* 0x198 */ s32 savedAlternateView;
/* 0x19C */ s32 unk_19C; /* 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; /* 0x1A0 */ s32 unk_1A0; // tank muzzle flash timer
/* 0x1A4 */ s32 unk_1A4; /* 0x1A4 */ s32 dmgType;
/* 0x1A8 */ char pad1A8[8]; /* 0x1A8 */ char pad1A8[8];
/* 0x1B0 */ s32 turretState; /* 0x1B0 */ s32 turretState;
/* 0x1B4 */ s32 turretActor; /* 0x1B4 */ s32 turretActor;
@ -257,35 +257,35 @@ typedef struct Player {
/* 0x1D0 */ s32 csState; /* 0x1D0 */ s32 csState;
/* 0x1D4 */ bool grounded; /* 0x1D4 */ bool grounded;
/* 0x1D8 */ s32 meTargetIndex; /* 0x1D8 */ s32 meTargetIndex;
/* 0x1DC */ s32 barrelRoll; /* 0x1DC */ s32 rollState;
/* 0x1E0 */ s32 barrelInputTimerL; /* 0x1E0 */ s32 rollInputTimerL;
/* 0x1E4 */ s32 barrelInputTimerR; /* 0x1E4 */ s32 rollInputTimerR;
/* 0x1E8 */ s32 timer_1E8; /* 0x1E8 */ s32 rollTimer;
/* 0x1EC */ s32 rollRate; /* 0x1EC */ s32 rollRate;
/* 0x1F0 */ s32 baseRollRate; /* 0x1F0 */ s32 baseRollRate;
/* 0x1F4 */ s32 hitTimer; /* 0x1F4 */ s32 hitTimer;
/* 0x1F8 */ s32 csTimer; /* 0x1F8 */ s32 csTimer;
/* 0x1FC */ s32 csEventTimer; /* 0x1FC */ s32 csEventTimer;
/* 0x200 */ s32 unk_200; /* 0x200 */ s32 dmgEffect; // 1 colors the arwing red. 2 gives it a static-y texture
/* 0x204 */ s32 unk_204; /* 0x204 */ s32 wingPosition;
/* 0x208 */ s32 unk_208; /* 0x208 */ s32 unk_208; // timer for great fox splash effects in aquas intro
/* 0x20C */ s32 unk_20C; /* 0x20C */ s32 unk_20C;
/* 0x210 */ s32 pathChangeTimer; /* 0x210 */ s32 pathChangeTimer;
/* 0x214 */ s32 timer_214; /* 0x214 */ s32 timer_214; // unused. may have been another double input timer like barrel roll
/* 0x218 */ s32 timer_218; /* 0x218 */ s32 timer_218; // unused. may have been another double input timer like barrel roll
/* 0x21C */ s32 unk_21C; /* 0x21C */ s32 hitDirection;
/* 0x220 */ s32 radioDamageTimer; /* 0x220 */ s32 radioDamageTimer;
/* 0x224 */ s32 timer_224; /* 0x224 */ s32 dmgEffectTimer;
/* 0x228 */ s32 flags_228; /* 0x228 */ s32 flags_228;
/* 0x22C */ s32 whooshTimer; /* 0x22C */ s32 whooshTimer;
/* 0x230 */ s32 unk_230; /* 0x230 */ s32 unk_230; // turns off some Blue Marine controls. perhaps was a lockout timer?
/* 0x234 */ s32 unk_234; /* 0x234 */ s32 draw;
/* 0x238 */ s32 alternateView; /* 0x238 */ s32 alternateView;
/* 0x23C */ s32 shadowing; /* 0x23C */ s32 shadowing;
/* 0x240 */ s32 unk_240; /* 0x240 */ s32 hideShadow;
/* 0x244 */ s32 shotTimer; /* 0x244 */ s32 shotTimer;
/* 0x248 */ f32 unk_248; /* 0x248 */ f32 shadowRotX; // forms YPR triple with groundRotY
/* 0x24C */ f32 unk_24C; /* 0x24C */ f32 shadowRotZ;
/* 0x250 */ f32 unk_250; // checked for by event actors, but unused? /* 0x250 */ f32 unk_250; // checked for by event actors, but unused?
/* 0x250 */ char pad254[4]; /* 0x250 */ char pad254[4];
/* 0x258 */ f32 meteoWarpSpinSpeed; /* 0x258 */ f32 meteoWarpSpinSpeed;
@ -305,8 +305,8 @@ typedef struct Player {
/* 0x2B4 */ bool boostCooldown; /* 0x2B4 */ bool boostCooldown;
/* 0x2B8 */ bool boostActive; /* 0x2B8 */ bool boostActive;
/* 0x2BC */ f32 boostMeter; /* 0x2BC */ f32 boostMeter;
/* 0x2C0 */ f32 unk_2C0; // has to do with starting right tank jet /* 0x2C0 */ f32 unk_2C0; // has to do with starting right tank jet. counterpart of D_800C9F20
/* 0x2C4 */ s32 unk_2C4; // counts up during some effects. never used /* 0x2C4 */ s32 deflectCount; // counts shots deflected by barrel rolls. never used
/* 0x2C8 */ Vec3f hit2; /* 0x2C8 */ Vec3f hit2;
/* 0x2D4 */ Vec3f hit1; /* 0x2D4 */ Vec3f hit1;
/* 0x2E0 */ Vec3f hit3; /* 0x2E0 */ Vec3f hit3;
@ -315,7 +315,7 @@ typedef struct Player {
/* 0x460 */ f32 sfxSource[3]; /* 0x460 */ f32 sfxSource[3];
/* 0x46C */ f32 sfxVel[3]; /* 0x46C */ f32 sfxVel[3];
/* 0x478 */ PlayerSfx sfx; /* 0x478 */ PlayerSfx sfx;
/* 0x498 */ s32 timer_498; /* 0x498 */ s32 mercyTimer;
/* 0x49C */ WingInfo wings; /* 0x49C */ WingInfo wings;
/* 0x4D8 */ f32 aerobaticPitch; /* 0x4D8 */ f32 aerobaticPitch;
/* 0x4DC */ s32 somersault; /* 0x4DC */ s32 somersault;

View File

@ -190,7 +190,7 @@ extern s32 gVsMatchState;
extern s32 D_versus_80178758; extern s32 D_versus_80178758;
extern s32 sUnlockLandmaster; // sUnlockLandmaster extern s32 sUnlockLandmaster; // sUnlockLandmaster
extern s32 sUnlockOnFoot; // sUnlockOnFoot extern s32 sUnlockOnFoot; // sUnlockOnFoot
extern s32 D_versus_80178768[]; extern s32 gVsCountdown[];
// gfx_data // gfx_data
extern u16 D_Tex_800DACB8[][32]; extern u16 D_Tex_800DACB8[][32];

View File

@ -440,7 +440,7 @@ gActor194yRot = 0x801771D8;
gSceneId = 0x801774F8; gSceneId = 0x801774F8;
gActor194zRot = 0x80177500; gActor194zRot = 0x80177500;
gSceneSetup = 0x80177820; gSceneSetup = 0x80177820;
D_ctx_80177824 = 0x80177824; gClearPlayerInfo = 0x80177824;
gEnemyShotSpeed = 0x80177828; gEnemyShotSpeed = 0x80177828;
D_ctx_8017782C = 0x8017782C; D_ctx_8017782C = 0x8017782C;
gShowLevelClearStatusScreen = 0x80177830; gShowLevelClearStatusScreen = 0x80177830;

View File

@ -95,7 +95,7 @@ bool AllRange_PlayMessage(u16* msg, RadioCharacterId rcid) {
} }
void AllRange_DrawCountdown(void) { void AllRange_DrawCountdown(void) {
if (gShowAllRangeCountdown != 0) { if (gShowAllRangeCountdown) {
s32 seconds = gAllRangeCountdown[1]; s32 seconds = gAllRangeCountdown[1];
HUD_DrawCountdown(gAllRangeCountdown, gAllRangeCountdownScale); HUD_DrawCountdown(gAllRangeCountdown, gAllRangeCountdownScale);
@ -144,7 +144,7 @@ void AllRange_GreatFoxRepair(Player* player) {
gCsFrameCount++; gCsFrameCount++;
switch (player->csState) { switch (player->csState) {
case 0: case 0:
player->hitTimer = player->timer_498 = player->damage = player->barrelRollAlpha = player->boostMeter = player->hitTimer = player->mercyTimer = player->damage = player->barrelRollAlpha = player->boostMeter =
player->boostCooldown = player->somersault = gCsFrameCount = 0; player->boostCooldown = player->somersault = gCsFrameCount = 0;
player->zRotBarrelRoll = player->camRoll = player->boostSpeed = player->camDist = player->knockback.x = player->zRotBarrelRoll = player->camRoll = player->boostSpeed = player->camDist = player->knockback.x =
player->knockback.y = player->knockback.z = player->damageShake = player->aerobaticPitch = 0.0f; player->knockback.y = player->knockback.z = player->damageShake = player->aerobaticPitch = 0.0f;
@ -1476,7 +1476,7 @@ void ActorAllRange_Update(Actor* this) {
ActorAllRange_PlayMessage(gMsg_ID_9369, RCID_WOLF); ActorAllRange_PlayMessage(gMsg_ID_9369, RCID_WOLF);
} }
break; break;
} else if ((this->iwork[4] > 200) && (gPlayer[0].timer_224 != 0)) { } else if ((this->iwork[4] > 200) && (gPlayer[0].dmgEffectTimer != 0)) {
this->iwork[4] = 100; this->iwork[4] = 100;
break; break;
} }

View File

@ -22,7 +22,7 @@
#include "assets/ast_zoness.h" #include "assets/ast_zoness.h"
#include "prevent_bss_reordering2.h" #include "prevent_bss_reordering2.h"
#include "prevent_bss_reordering3.h" // #include "prevent_bss_reordering3.h"
f32 gWarpZoneBgAlpha; f32 gWarpZoneBgAlpha;
u8 D_bg_8015F964; // related to water surfaces u8 D_bg_8015F964; // related to water surfaces

View File

@ -6,7 +6,7 @@
s32 gSceneId; s32 gSceneId;
s32 gSceneSetup; s32 gSceneSetup;
s32 D_ctx_80177824; // some sort of flag s32 gClearPlayerInfo; // some sort of flag
s32 D_ctx_8017782C; // some sort of flag. all range related? s32 D_ctx_8017782C; // some sort of flag. all range related?
GameState gGameState; GameState gGameState;
s32 gNextGameStateTimer; s32 gNextGameStateTimer;

View File

@ -465,7 +465,7 @@ void Cutscene_EnterWarpZone(Player* player) {
if (player->camDist < -15000.0f) { if (player->camDist < -15000.0f) {
player->camDist = 0.0f; player->camDist = 0.0f;
player->warpCamSpeed = 0.0f; player->warpCamSpeed = 0.0f;
player->unk_234 = 0; player->draw = false;
} }
} }
var_v0 = 1; var_v0 = 1;
@ -518,7 +518,7 @@ void Cutscene_EnterWarpZone(Player* player) {
player->meteoWarpTimer = gSavedHitCount = gObjectLoadIndex = gSavedObjectLoadIndex = 0; player->meteoWarpTimer = gSavedHitCount = gObjectLoadIndex = gSavedObjectLoadIndex = 0;
player->unk_234 = 1; player->draw = true;
gLevelPhase = 1; gLevelPhase = 1;
gCamDistortion = 0.15f; gCamDistortion = 0.15f;
AUDIO_PLAY_SFX(NA_SE_WARP_OUT, gDefaultSfxSource, 0); AUDIO_PLAY_SFX(NA_SE_WARP_OUT, gDefaultSfxSource, 0);
@ -798,7 +798,7 @@ void Cutscene_AllRangeMode(Player* player) {
Math_SmoothStepToF(&D_ctx_80177A48[2], -70.0f, 0.1f, 0.7f, 0.0f); Math_SmoothStepToF(&D_ctx_80177A48[2], -70.0f, 0.1f, 0.7f, 0.0f);
if (D_ctx_80177A48[1] > 220.0f) { if (D_ctx_80177A48[1] > 220.0f) {
player->unk_204 = 2; player->wingPosition = 2;
} }
if ((gCsFrameCount > 135) && (gCsFrameCount < 180)) { if ((gCsFrameCount > 135) && (gCsFrameCount < 180)) {
@ -1225,7 +1225,7 @@ void Cutscene_CoComplete2(Player* player) {
gCsCamAtX += D_ctx_80177A48[7]; gCsCamAtX += D_ctx_80177A48[7];
gCsCamAtY += D_ctx_80177A48[8]; gCsCamAtY += D_ctx_80177A48[8];
gCsCamAtZ += D_ctx_80177A48[9]; gCsCamAtZ += D_ctx_80177A48[9];
player->unk_234 = 0; player->draw = false;
if (player->csTimer == 0) { if (player->csTimer == 0) {
player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->state_1C8 = PLAYERSTATE_1C8_NEXT;
player->csTimer = 0; player->csTimer = 0;
@ -1556,7 +1556,7 @@ void Cutscene_KillPlayer(Player* player) {
Player_PlaySfx(player->sfxSource, NA_SE_ARWING_EXPLOSION, player->num); Player_PlaySfx(player->sfxSource, NA_SE_ARWING_EXPLOSION, player->num);
player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->state_1C8 = PLAYERSTATE_1C8_NEXT;
player->csTimer = 70; player->csTimer = 70;
player->timer_224 = 20; player->dmgEffectTimer = 20;
gFadeoutType = 7; gFadeoutType = 7;
if (player->grounded) { if (player->grounded) {
@ -1615,7 +1615,7 @@ void Cutscene_KillPlayer(Player* player) {
} }
} }
void func_demo_8004D738(Player* player) { void Cutscene_LandmasterDown(Player* player) {
player->pos.y += 30.0f; player->pos.y += 30.0f;
func_effect_8007D0E0(player->pos.x, player->pos.y, player->trueZpos, 6.0f); func_effect_8007D0E0(player->pos.x, player->pos.y, player->trueZpos, 6.0f);
if (gCamCount == 1) { if (gCamCount == 1) {
@ -1627,7 +1627,7 @@ void func_demo_8004D738(Player* player) {
Cutscene_KillPlayer(player); Cutscene_KillPlayer(player);
} }
void func_demo_8004D828(Player* player) { void Cutscene_ArwingDown360(Player* player) {
s32 i; s32 i;
Vec3f src; Vec3f src;
Vec3f dest; Vec3f dest;
@ -1737,12 +1737,12 @@ void func_demo_8004D828(Player* player) {
player->cam.at.y = player->pos.y; player->cam.at.y = player->pos.y;
} }
if (gVersusMode != 0) { if (gVersusMode) {
Player_CheckBounds360(player); Player_CheckBounds360(player);
} }
} }
void func_demo_8004DEF8(Player* player) { void Cutscene_ArwingDownOnRails(Player* player) {
s32 i; s32 i;
if (player->rot.x < 0.0f) { if (player->rot.x < 0.0f) {
@ -1841,9 +1841,9 @@ void Cutscene_PlayerDown(Player* player) {
switch (player->form) { switch (player->form) {
case FORM_ARWING: case FORM_ARWING:
if (gLevelMode == LEVELMODE_ALL_RANGE) { if (gLevelMode == LEVELMODE_ALL_RANGE) {
func_demo_8004D828(player); Cutscene_ArwingDown360(player);
} else { } else {
func_demo_8004DEF8(player); Cutscene_ArwingDownOnRails(player);
Player_UpdatePath(player); Player_UpdatePath(player);
} }
Player_CollisionCheck(player); Player_CollisionCheck(player);
@ -1851,15 +1851,15 @@ void Cutscene_PlayerDown(Player* player) {
break; break;
case FORM_LANDMASTER: case FORM_LANDMASTER:
func_demo_8004D738(player); Cutscene_LandmasterDown(player);
break; break;
case FORM_BLUE_MARINE: case FORM_BLUE_MARINE:
Aquas_801AB9B0(player); Aquas_BlueMarineDown(player);
break; break;
case FORM_ON_FOOT: case FORM_ON_FOOT:
func_demo_8004D738(player); Cutscene_LandmasterDown(player);
break; break;
} }
} }

View File

@ -18,7 +18,7 @@ f32 D_display_801615B8[4];
s32 D_display_800CA220 = 0; s32 D_display_800CA220 = 0;
u8 sPlayersVisible[] = { 0, 0, 0, 0 }; // u8 sPlayersVisible[] = { 0, 0, 0, 0 }; //
s32 sDrawCockpit = 0; // s32 sDrawCockpit = 0; //
s32 D_display_800CA22C = 0; // s32 D_display_800CA22C = false; //
f32 gCamDistortion = 0.0f; f32 gCamDistortion = 0.0f;
Actor* gTeamHelpActor = NULL; Actor* gTeamHelpActor = NULL;
s32 gTeamHelpTimer = 0; s32 gTeamHelpTimer = 0;
@ -417,7 +417,7 @@ void func_display_8005314C(void) {
bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot, void* wingData) { bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot, void* wingData) {
WingInfo* wings = (WingInfo*) wingData; WingInfo* wings = (WingInfo*) wingData;
if ((D_display_800CA22C != 0) && (gPlayer[0].unk_200 == 0)) { if (D_display_800CA22C && (gPlayer[0].dmgEffect == 0)) {
RCP_SetupDL(&gMasterDisp, SETUPDL_29); RCP_SetupDL(&gMasterDisp, SETUPDL_29);
func_display_8005314C(); func_display_8005314C();
} }
@ -429,7 +429,7 @@ bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot,
if (wings->rightState == WINGSTATE_BROKEN) { if (wings->rightState == WINGSTATE_BROKEN) {
*gfxPtr = D_arwing_3015120; *gfxPtr = D_arwing_3015120;
} }
if ((D_display_800CA22C != 0) && ((gRightWingFlashTimer[0] % 2) != 0)) { if (D_display_800CA22C && ((gRightWingFlashTimer[0] % 2) != 0)) {
RCP_SetupDL(&gMasterDisp, SETUPDL_34); RCP_SetupDL(&gMasterDisp, SETUPDL_34);
func_display_8005314C(); func_display_8005314C();
if (gRightWingFlashTimer[0] > 1000) { if (gRightWingFlashTimer[0] > 1000) {
@ -444,7 +444,7 @@ bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot,
if (wings->rightState != 2) { if (wings->rightState != 2) {
*gfxPtr = NULL; *gfxPtr = NULL;
} }
if ((D_display_800CA22C != 0) && ((gRightWingFlashTimer[0] % 2) != 0)) { if (D_display_800CA22C && ((gRightWingFlashTimer[0] % 2) != 0)) {
RCP_SetupDL(&gMasterDisp, SETUPDL_34); RCP_SetupDL(&gMasterDisp, SETUPDL_34);
func_display_8005314C(); func_display_8005314C();
if (gRightWingFlashTimer[0] > 1000) { if (gRightWingFlashTimer[0] > 1000) {
@ -461,7 +461,7 @@ bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot,
if (wings->leftState == WINGSTATE_BROKEN) { if (wings->leftState == WINGSTATE_BROKEN) {
*gfxPtr = D_arwing_3014BF0; *gfxPtr = D_arwing_3014BF0;
} }
if ((D_display_800CA22C != 0) && ((gLeftWingFlashTimer[0] % 2) != 0)) { if (D_display_800CA22C && ((gLeftWingFlashTimer[0] % 2) != 0)) {
RCP_SetupDL(&gMasterDisp, SETUPDL_34); RCP_SetupDL(&gMasterDisp, SETUPDL_34);
func_display_8005314C(); func_display_8005314C();
if (gLeftWingFlashTimer[0] > 1000) { if (gLeftWingFlashTimer[0] > 1000) {
@ -476,7 +476,7 @@ bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot,
if (wings->leftState != 2) { if (wings->leftState != 2) {
*gfxPtr = NULL; *gfxPtr = NULL;
} }
if ((D_display_800CA22C != 0) && ((gLeftWingFlashTimer[0] % 2) != 0)) { if (D_display_800CA22C && ((gLeftWingFlashTimer[0] % 2) != 0)) {
RCP_SetupDL(&gMasterDisp, SETUPDL_34); RCP_SetupDL(&gMasterDisp, SETUPDL_34);
func_display_8005314C(); func_display_8005314C();
if (gLeftWingFlashTimer[0] > 1000) { if (gLeftWingFlashTimer[0] > 1000) {
@ -538,7 +538,7 @@ void func_display_80053658(WingInfo* wings) {
} }
Animation_DrawSkeleton(1, D_arwing_3016610, sp68, func_display_800531A4, NULL, wings, &gIdentityMatrix); Animation_DrawSkeleton(1, D_arwing_3016610, sp68, func_display_800531A4, NULL, wings, &gIdentityMatrix);
} }
D_display_800CA22C = 0; D_display_800CA22C = false;
modelId = wings->modelId; modelId = wings->modelId;
if (D_display_800CA220 != 0) { if (D_display_800CA220 != 0) {
modelId = 1; modelId = 1;
@ -644,7 +644,7 @@ void func_display_80053C38(Player* player, s32 arg1) {
player->wings.unk_28 = player->wings.unk_04 = player->wings.unk_08 = player->wings.unk_0C = player->wings.unk_28 = player->wings.unk_04 = player->wings.unk_08 = player->wings.unk_0C =
player->wings.unk_10 = 0.0f; player->wings.unk_10 = 0.0f;
} }
D_display_800CA22C = 1; D_display_800CA22C = true;
gReflectY = arg1; gReflectY = arg1;
func_display_80053658(&player->wings); func_display_80053658(&player->wings);
} }
@ -656,7 +656,7 @@ void func_display_80053F7C(Player* player) {
s32 i; s32 i;
if ((gPlayerNum == player->num) && ((player->form == FORM_ARWING) || (player->form == FORM_LANDMASTER)) && if ((gPlayerNum == player->num) && ((player->form == FORM_ARWING) || (player->form == FORM_LANDMASTER)) &&
(player->unk_234 != 0) && player->draw &&
(((gGameState == GSTATE_PLAY) && (player->state_1C8 == PLAYERSTATE_1C8_ACTIVE)) || (((gGameState == GSTATE_PLAY) && (player->state_1C8 == PLAYERSTATE_1C8_ACTIVE)) ||
(gGameState == GSTATE_MENU))) { (gGameState == GSTATE_MENU))) {
for (i = 0; i < 2; i++) { for (i = 0; i < 2; i++) {
@ -1044,7 +1044,7 @@ void func_display_80055B58(Player* player) {
f32 var_fv0; f32 var_fv0;
s32 pad[3]; s32 pad[3];
if ((player->unk_234 != 0) && (player->state_1C8 != PLAYERSTATE_1C8_DOWN)) { if (player->draw && (player->state_1C8 != PLAYERSTATE_1C8_DOWN)) {
switch (player->form) { switch (player->form) {
case FORM_ARWING: case FORM_ARWING:
Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + player->damageShake + 180.0f) * M_DTOR, Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + player->damageShake + 180.0f) * M_DTOR,
@ -1104,7 +1104,7 @@ void func_display_80055E98(Player* player) {
sp5C = 70.0f; sp5C = 70.0f;
sp58 = -18.0f; sp58 = -18.0f;
if (player->unk_204 == 2) { if (player->wingPosition == 2) {
sp5C = 108.0f; sp5C = 108.0f;
sp58 = -22.0f; sp58 = -22.0f;
} }
@ -1155,7 +1155,7 @@ void func_display_80055E98(Player* player) {
} }
void func_display_80056230(Player* player) { void func_display_80056230(Player* player) {
if ((player->unk_234 != 0) && (player->form == FORM_ARWING) && (gCurrentLevel != LEVEL_VENOM_ANDROSS) && if (player->draw && (player->form == FORM_ARWING) && (gCurrentLevel != LEVEL_VENOM_ANDROSS) &&
(gCurrentLevel != LEVEL_TRAINING) && (gLevelType == LEVELTYPE_PLANET)) { (gCurrentLevel != LEVEL_TRAINING) && (gLevelType == LEVELTYPE_PLANET)) {
Matrix_Push(&gGfxMatrix); Matrix_Push(&gGfxMatrix);
Matrix_Translate(gGfxMatrix, player->pos.x, player->pos.y, player->trueZpos + player->zPath, MTXF_APPLY); Matrix_Translate(gGfxMatrix, player->pos.x, player->pos.y, player->trueZpos + player->zPath, MTXF_APPLY);
@ -1197,7 +1197,7 @@ void func_display_800564C0(Player* player, s32 arg1) {
s32 i; s32 i;
Vec3f sp50 = { 0.0f, 0.0f, 0.0f }; Vec3f sp50 = { 0.0f, 0.0f, 0.0f };
if (player->unk_234 != 0) { if (player->draw) {
Matrix_Push(&gGfxMatrix); Matrix_Push(&gGfxMatrix);
if (player->form == FORM_LANDMASTER) { if (player->form == FORM_LANDMASTER) {
if (player->grounded) { if (player->grounded) {
@ -1281,7 +1281,7 @@ void func_display_800564C0(Player* player, s32 arg1) {
Matrix_Translate(gGfxMatrix, player->xShake, player->yBob, 0.0f, MTXF_APPLY); Matrix_Translate(gGfxMatrix, player->xShake, player->yBob, 0.0f, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp); Matrix_SetGfxMtx(&gMasterDisp);
} }
switch (player->unk_200) { switch (player->dmgEffect) {
case 0: case 0:
if (!gVersusMode) { if (!gVersusMode) {
if ((gCurrentLevel == LEVEL_FORTUNA) || (gCurrentLevel == LEVEL_TITANIA)) { if ((gCurrentLevel == LEVEL_FORTUNA) || (gCurrentLevel == LEVEL_TITANIA)) {
@ -1330,7 +1330,7 @@ void func_display_80056E2C(Player* player) {
f32 sp30; f32 sp30;
f32 sp2C; f32 sp2C;
if ((player->unk_234 != 0) && (player->unk_240 == 0)) { if (player->draw && !player->hideShadow) {
sp34 = D_display_800CA334[gGameFrameCount % 8U]; sp34 = D_display_800CA334[gGameFrameCount % 8U];
sp30 = D_display_800CA334[(gGameFrameCount + 4) % 8U]; sp30 = D_display_800CA334[(gGameFrameCount + 4) % 8U];
if (player->grounded) { if (player->grounded) {
@ -1350,8 +1350,8 @@ void func_display_80056E2C(Player* player) {
player->groundPos.z + player->zPath, MTXF_APPLY); player->groundPos.z + player->zPath, MTXF_APPLY);
} }
Matrix_RotateY(gGfxMatrix, player->groundRotY, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, player->groundRotY, MTXF_APPLY);
Matrix_RotateX(gGfxMatrix, player->unk_248, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, player->shadowRotX, MTXF_APPLY);
Matrix_RotateZ(gGfxMatrix, player->unk_24C, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, player->shadowRotZ, MTXF_APPLY);
Matrix_Scale(gGfxMatrix, 0.8f + sp34, 0.0f, 0.8f + sp30, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.8f + sp34, 0.0f, 0.8f + sp30, MTXF_APPLY);
if ((player->form == FORM_ARWING) || (player->form == FORM_BLUE_MARINE) || (player->form == FORM_ON_FOOT)) { if ((player->form == FORM_ARWING) || (player->form == FORM_BLUE_MARINE) || (player->form == FORM_ON_FOOT)) {
sp2C = player->bankAngle + player->rockAngle + player->damageShake; sp2C = player->bankAngle + player->rockAngle + player->damageShake;

View File

@ -512,7 +512,7 @@ void func_edisplay_8005B388(Actor* actor) {
Vec3f sp30; Vec3f sp30;
Matrix_MultVec3f(gGfxMatrix, &sp3C, &sp30); Matrix_MultVec3f(gGfxMatrix, &sp3C, &sp30);
if ((((fabsf(sp30.z) < 3000.0f) && (fabsf(sp30.x) < 3000.0f) && (gBossActive == 0)) || if ((((fabsf(sp30.z) < 3000.0f) && (fabsf(sp30.x) < 3000.0f) && !gBossActive) ||
(gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY) || (gCurrentLevel == LEVEL_VENOM_ANDROSS) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY) || (gCurrentLevel == LEVEL_VENOM_ANDROSS) ||
(gCurrentLevel == LEVEL_VENOM_2) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) && (gCurrentLevel == LEVEL_VENOM_2) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) &&
(gCurrentLevel != LEVEL_MACBETH) && (gCurrentLevel != LEVEL_TITANIA)) { (gCurrentLevel != LEVEL_MACBETH) && (gCurrentLevel != LEVEL_TITANIA)) {
@ -548,7 +548,7 @@ void func_edisplay_8005B388(Actor* actor) {
func_display_80053658(&D_edisplay_80161630); func_display_80053658(&D_edisplay_80161630);
} else if (gLevelType == LEVELTYPE_PLANET) { } else if (gLevelType == LEVELTYPE_PLANET) {
gSPDisplayList(gMasterDisp++, D_ENMY_PLANET_40018A0); gSPDisplayList(gMasterDisp++, D_ENMY_PLANET_40018A0);
} else if (gPlayer[0].unk_204 == 2) { } else if (gPlayer[0].wingPosition == 2) {
gSPDisplayList(gMasterDisp++, D_ENMY_SPACE_4003BD0); gSPDisplayList(gMasterDisp++, D_ENMY_SPACE_4003BD0);
} else { } else {
gSPDisplayList(gMasterDisp++, D_ENMY_SPACE_4007870); gSPDisplayList(gMasterDisp++, D_ENMY_SPACE_4007870);

View File

@ -982,7 +982,7 @@ void func_effect_8007A748(Effect* effect) {
bool func_effect_8007A774(Player* player, Effect* effect, f32 arg2) { bool func_effect_8007A774(Player* player, Effect* effect, f32 arg2) {
if ((fabsf(player->trueZpos - effect->obj.pos.z) < arg2) && (fabsf(player->pos.x - effect->obj.pos.x) < arg2) && if ((fabsf(player->trueZpos - effect->obj.pos.z) < arg2) && (fabsf(player->pos.x - effect->obj.pos.x) < arg2) &&
(fabsf(player->pos.y - effect->obj.pos.y) < arg2) && (player->timer_498 == 0)) { (fabsf(player->pos.y - effect->obj.pos.y) < arg2) && (player->mercyTimer == 0)) {
Player_ApplyDamage(player, 0, effect->info.damage); Player_ApplyDamage(player, 0, effect->info.damage);
return true; return true;
} else { } else {
@ -2212,7 +2212,7 @@ void func_effect_8007DB70(Effect* effect) {
(fabsf(gPlayer[0].pos.x - effect->obj.pos.x) < 80.0f)) { (fabsf(gPlayer[0].pos.x - effect->obj.pos.x) < 80.0f)) {
if ((effect->obj.pos.y < gPlayer[0].pos.y) && if ((effect->obj.pos.y < gPlayer[0].pos.y) &&
((gPlayer[0].pos.y - effect->obj.pos.y) < (effect->scale2 * 35.0f)) && ((gPlayer[0].pos.y - effect->obj.pos.y) < (effect->scale2 * 35.0f)) &&
(gPlayer[0].timer_498 == 0)) { (gPlayer[0].mercyTimer == 0)) {
Player_ApplyDamage(gPlayer, 0, effect->info.damage); Player_ApplyDamage(gPlayer, 0, effect->info.damage);
} }
} }
@ -2869,11 +2869,11 @@ void func_effect_8007FE88(Effect* effect) {
effect->vel.x = destVelocity.x; effect->vel.x = destVelocity.x;
effect->vel.y = destVelocity.y; effect->vel.y = destVelocity.y;
effect->vel.z = destVelocity.z; effect->vel.z = destVelocity.z;
gPlayer[0].unk_2C4++; gPlayer[0].deflectCount++;
AUDIO_PLAY_SFX(NA_SE_ROLLING_REFLECT, effect->sfxSource, 0); AUDIO_PLAY_SFX(NA_SE_ROLLING_REFLECT, effect->sfxSource, 0);
} }
if ((gPlayer[0].barrelRollAlpha == 0) && (gPlayer[0].timer_498 == 0)) { if ((gPlayer[0].barrelRollAlpha == 0) && (gPlayer[0].mercyTimer == 0)) {
Player_ApplyDamage(gPlayer, 0, effect->info.damage); Player_ApplyDamage(gPlayer, 0, effect->info.damage);
gPlayer[0].knockback.x = 20.0f; gPlayer[0].knockback.x = 20.0f;
if (effect->vel.x < 0.0f) { if (effect->vel.x < 0.0f) {
@ -3002,11 +3002,11 @@ void func_effect_8008040C(Effect* effect) {
effect->vel.x = destVelocity.x; effect->vel.x = destVelocity.x;
effect->vel.y = destVelocity.y; effect->vel.y = destVelocity.y;
effect->vel.z = destVelocity.z; effect->vel.z = destVelocity.z;
gPlayer[0].unk_2C4++; gPlayer[0].deflectCount++;
AUDIO_PLAY_SFX(NA_SE_ROLLING_REFLECT, effect->sfxSource, 0); AUDIO_PLAY_SFX(NA_SE_ROLLING_REFLECT, effect->sfxSource, 0);
} }
if ((gPlayer[0].barrelRollAlpha == 0) && (gPlayer[0].timer_498 == 0)) { if ((gPlayer[0].barrelRollAlpha == 0) && (gPlayer[0].mercyTimer == 0)) {
Player_ApplyDamage(gPlayer, 0, effect->info.damage); Player_ApplyDamage(gPlayer, 0, effect->info.damage);
gPlayer[0].knockback.x = 20.0f; gPlayer[0].knockback.x = 20.0f;
if (effect->vel.x < 0.0f) { if (effect->vel.x < 0.0f) {
@ -3813,7 +3813,7 @@ void func_effect_80081C5C(Effect* effect) {
if ((((effect->timer_50 == 0) && if ((((effect->timer_50 == 0) &&
(fabsf(gPlayer[0].pos.x - (effect->obj.pos.x + velocityDest.x)) <= (effect->unk_60.x * 50.0f))) && (fabsf(gPlayer[0].pos.x - (effect->obj.pos.x + velocityDest.x)) <= (effect->unk_60.x * 50.0f))) &&
(fabsf(gPlayer[0].pos.y - (effect->obj.pos.y + velocityDest.y)) <= (effect->unk_60.y * 50.0f))) && (fabsf(gPlayer[0].pos.y - (effect->obj.pos.y + velocityDest.y)) <= (effect->unk_60.y * 50.0f))) &&
(gPlayer[0].timer_498 == 0)) { (gPlayer[0].mercyTimer == 0)) {
Player_ApplyDamage(gPlayer, 0, 40); Player_ApplyDamage(gPlayer, 0, 40);
} }
break; break;

View File

@ -1651,8 +1651,7 @@ void Actor_Despawn(Actor* actor) {
s32 i; s32 i;
if (gVersusMode) { if (gVersusMode) {
if ((actor->dmgSource >= 1) && (actor->dmgSource < 4 + 1) && if ((actor->dmgSource >= 1) && (actor->dmgSource < 4 + 1) && !VS_TIME_UP(gVsCountdown)) {
!((D_versus_80178768[0] == 0) && (D_versus_80178768[1] == 0) && (D_versus_80178768[2] == 0))) {
gPlayerScores[actor->dmgSource - 1] += actor->info.bonus; gPlayerScores[actor->dmgSource - 1] += actor->info.bonus;
} }
} else if (!((actor->obj.id == OBJ_ACTOR_ALLRANGE) && (actor->animFrame == 1))) { } else if (!((actor->obj.id == OBJ_ACTOR_ALLRANGE) && (actor->animFrame == 1))) {

View File

@ -1165,7 +1165,7 @@ void ActorEvent_ProcessScript(ActorEvent* this) {
} }
} }
if ((this->eventType == EVID_2) || (this->eventType == EVID_TEAMMATE)) { if ((this->eventType == EVID_SLIPPY_METEO) || (this->eventType == EVID_TEAMMATE)) {
this->drawShadow = true; this->drawShadow = true;
this->iwork[11] = 1; this->iwork[11] = 1;
} }
@ -2152,7 +2152,7 @@ void ActorEvent_800701E0(ActorEvent* this) {
if (gLevelType == LEVELTYPE_PLANET) { if (gLevelType == LEVELTYPE_PLANET) {
this->timer_04C = RAND_INT(2.9f); this->timer_04C = RAND_INT(2.9f);
if (this->eventType == EVID_2) { if (this->eventType == EVID_SLIPPY_METEO) {
this->timer_04C = 1; this->timer_04C = 1;
if (this->obj.pos.x < this->hitPos.x) { if (this->obj.pos.x < this->hitPos.x) {
Play_SpawnDebris(1, this->obj.pos.x + 20.0f, this->obj.pos.y, this->obj.pos.z); Play_SpawnDebris(1, this->obj.pos.x + 20.0f, this->obj.pos.y, this->obj.pos.z);
@ -3043,7 +3043,7 @@ void ActorEvent_Update(ActorEvent* this) {
return; return;
} }
if (this->eventType == EVID_300) { if (this->eventType == EVID_300) {
gPlayer[0].unk_1A4 = this->index; gPlayer[0].dmgType = this->index;
this->timer_0C2 = 100; this->timer_0C2 = 100;
} else if (this->eventType >= EVID_200) { } else if (this->eventType >= EVID_200) {
this->counter_04E++; this->counter_04E++;
@ -3920,7 +3920,7 @@ void ActorEvent_Draw(ActorEvent* this) {
Actor_DrawEngineAndContrails(this); Actor_DrawEngineAndContrails(this);
break; break;
case EVID_2: case EVID_SLIPPY_METEO:
this->fwork[15] -= this->fwork[15] * 0.1f; this->fwork[15] -= this->fwork[15] * 0.1f;
this->fwork[26] -= this->fwork[26] * 0.1f; this->fwork[26] -= this->fwork[26] * 0.1f;
this->fwork[16] -= this->fwork[16] * 0.1f; this->fwork[16] -= this->fwork[16] * 0.1f;
@ -4309,7 +4309,7 @@ void func_enmy2_800763A4(Actor* actor) {
func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S);
} }
if ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->eventType == EVID_2)) { if ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->eventType == EVID_SLIPPY_METEO)) {
if (actor->fwork[17] < 360.0f) { if (actor->fwork[17] < 360.0f) {
Play_SpawnDebris(1, actor->obj.pos.x + 20.0f, actor->obj.pos.y, actor->obj.pos.z); Play_SpawnDebris(1, actor->obj.pos.x + 20.0f, actor->obj.pos.y, actor->obj.pos.z);
actor->fwork[17] = 777.0f; actor->fwork[17] = 777.0f;

View File

@ -405,7 +405,7 @@ void Game_Update(void) {
case GSTATE_INIT: case GSTATE_INIT:
gGameState = GSTATE_TITLE; gGameState = GSTATE_TITLE;
gTitleState = 1; gTitleState = 1;
D_ctx_80177824 = 1; gClearPlayerInfo = true;
Memory_FreeAll(); Memory_FreeAll();
Play_ClearObjectData(); Play_ClearObjectData();
gCamCount = 1; gCamCount = 1;
@ -552,7 +552,7 @@ void Game_Update(void) {
} }
} else { } else {
for (i = 0; i < gCamCount; i++) { for (i = 0; i < gCamCount; i++) {
if (gPlayer[i].timer_224 != 0) { if (gPlayer[i].dmgEffectTimer != 0) {
Graphics_FillRectangle(&gMasterDisp, sVsCameraULx[i], sVsCameraULy[i], sVsCameraLRx[i], Graphics_FillRectangle(&gMasterDisp, sVsCameraULx[i], sVsCameraULy[i], sVsCameraLRx[i],
sVsCameraLRy[i], gFillScreenRed, gFillScreenGreen, gFillScreenBlue, sVsCameraLRy[i], gFillScreenRed, gFillScreenGreen, gFillScreenBlue,

View File

@ -1410,7 +1410,7 @@ void func_hud_80088970(void) {
} }
if (D_80161810[0] >= 2) { if (D_80161810[0] >= 2) {
gPauseEnabled = 0; gPauseEnabled = false;
} }
player = &gPlayer[gPlayerNum]; player = &gPlayer[gPlayerNum];
@ -2066,7 +2066,7 @@ s32 func_hud_8008A4DC(void) {
y = 162.000f; y = 162.000f;
x1 += D_800D1E10 * temp3; x1 += D_800D1E10 * temp3;
} else { } else {
if ((gVsMatchStart == 0) || (D_versus_80178750 != 0)) { if (!gVsMatchStart || (D_versus_80178750 != 0)) {
return 0; return 0;
} }
temp2 = 13000.00f; temp2 = 13000.00f;
@ -2460,7 +2460,7 @@ s32 func_hud_8008B774(void) {
(gCurrentLevel == LEVEL_SECTOR_Y))) { (gCurrentLevel == LEVEL_SECTOR_Y))) {
for (i = 0; i < ARRAY_COUNT(gActors); i++) { for (i = 0; i < ARRAY_COUNT(gActors); i++) {
if ((gActors[i].obj.status == OBJ_ACTIVE) && (gActors[i].iwork[12] == temp)) { if ((gActors[i].obj.status == OBJ_ACTIVE) && (gActors[i].iwork[12] == temp)) {
if ((gActors[i].eventType == EVID_2) || (gActors[i].eventType == EVID_TEAMMATE) || if ((gActors[i].eventType == EVID_SLIPPY_METEO) || (gActors[i].eventType == EVID_TEAMMATE) ||
((gActors[i].obj.id == OBJ_ACTOR_TEAM_BOSS) && ((gActors[i].obj.id == OBJ_ACTOR_TEAM_BOSS) &&
((gActors[i].aiType == AI360_FALCO) || (gActors[i].aiType == AI360_SLIPPY) || ((gActors[i].aiType == AI360_FALCO) || (gActors[i].aiType == AI360_SLIPPY) ||
(gActors[i].aiType == AI360_PEPPY)))) { (gActors[i].aiType == AI360_PEPPY)))) {
@ -2814,7 +2814,7 @@ void func_hud_8008CBE4(void) {
s32 i; s32 i;
s32 j; s32 j;
if (gVsMatchType != 0) { if (gVsMatchType != VS_MATCH_POINTS) {
return; return;
} }
@ -2829,7 +2829,7 @@ void func_hud_8008CBE4(void) {
break; break;
case 1: case 1:
if (gVsMatchStart == 0) { if (!gVsMatchStart) {
D_80161758 = 0; D_80161758 = 0;
break; break;
} }
@ -3030,7 +3030,7 @@ void func_hud_8008D984(void) {
} }
void func_hud_8008DC34(void) { void func_hud_8008DC34(void) {
if ((gVsMatchStart != 0) && (D_versus_80178750 == 0)) { if (gVsMatchStart && (D_versus_80178750 == 0)) {
func_hud_8008D250(); func_hud_8008D250();
func_hud_8008D7F4(); func_hud_8008D7F4();
func_hud_8008D4F0(0, 0); func_hud_8008D4F0(0, 0);
@ -4916,7 +4916,7 @@ void HUD_AquasStart(Player* player) {
gCsFrameCount = 0; gCsFrameCount = 0;
gDrawBackdrop = 1; gDrawBackdrop = 1;
gAqDrawMode = 1; gAqDrawMode = 1;
player->unk_234 = 0; player->draw = false;
player->csState = 1; player->csState = 1;
player->unk_208 = 0; player->unk_208 = 0;
player->baseSpeed = 0.0f; player->baseSpeed = 0.0f;
@ -5213,7 +5213,7 @@ void HUD_AquasStart(Player* player) {
player->rot.y = 0.0f; player->rot.y = 0.0f;
player->baseSpeed = 20.0f; player->baseSpeed = 20.0f;
player->unk_234 = 1; player->draw = true;
player->csState = 6; player->csState = 6;
player->csTimer = 1000; player->csTimer = 1000;
@ -5713,7 +5713,7 @@ void HUD_AquasComplete(Player* player) {
break; break;
case 10: case 10:
player->unk_234 = 1; player->draw = true;
gAqDrawMode = 2; gAqDrawMode = 2;
player->csState = 11; player->csState = 11;
@ -5952,7 +5952,7 @@ void HUD_AquasComplete(Player* player) {
player->yBob = -SIN_DEG(player->bobPhase) * 0.5f; player->yBob = -SIN_DEG(player->bobPhase) * 0.5f;
player->rockAngle = SIN_DEG(player->rockPhase) * 1.5f; player->rockAngle = SIN_DEG(player->rockPhase) * 1.5f;
if (player->unk_234) { if (player->draw) {
src.x = 0.0f; src.x = 0.0f;
src.y = 0.0f; src.y = 0.0f;
src.z = -70.0f; src.z = -70.0f;

View File

@ -220,12 +220,13 @@ void Player_DamageEffects(Player* player) {
player->pos.y + sp40 + RAND_FLOAT(10.0f), player->pos.y + sp40 + RAND_FLOAT(10.0f),
player->trueZpos + RAND_FLOAT_CENTERED(30.0f), player->vel.x, player->vel.y, player->trueZpos + RAND_FLOAT_CENTERED(30.0f), player->vel.x, player->vel.y,
player->vel.z, 0.04f + RAND_FLOAT(0.03f), player->num + 1); player->vel.z, 0.04f + RAND_FLOAT(0.03f), player->num + 1);
if (player->timer_224 == 0) { if (player->dmgEffectTimer == 0) {
player->timer_224 = 2; player->dmgEffectTimer = 2;
} }
} }
} else if (((gGameFrameCount & (var_v1 >> 2)) == 0) && (Rand_ZeroOne() < 0.5f) && (player->timer_224 == 0)) { } else if (((gGameFrameCount & (var_v1 >> 2)) == 0) && (Rand_ZeroOne() < 0.5f) &&
player->timer_224 = 2; (player->dmgEffectTimer == 0)) {
player->dmgEffectTimer = 2;
} }
} }
} }
@ -292,7 +293,7 @@ void Play_InitVsStage(void) {
gLevelObjects = SEGMENTED_TO_VIRTUAL(D_versus_302E0E4); gLevelObjects = SEGMENTED_TO_VIRTUAL(D_versus_302E0E4);
break; break;
case VS_STAGE_SECTOR_Z: case VS_STAGE_SECTOR_Z:
if (gVsMatchType == 2) { if (gVsMatchType == VS_MATCH_TIME) {
gLevelObjects = SEGMENTED_TO_VIRTUAL(D_versus_302E378); gLevelObjects = SEGMENTED_TO_VIRTUAL(D_versus_302E378);
} else { } else {
gLevelObjects = SEGMENTED_TO_VIRTUAL(D_versus_302E170); gLevelObjects = SEGMENTED_TO_VIRTUAL(D_versus_302E170);
@ -819,8 +820,8 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) {
Vec3f sp38; Vec3f sp38;
f32 sp34 = 20.0f; f32 sp34 = 20.0f;
player->unk_1A4 = damage; player->dmgType = damage;
player->unk_21C = direction; player->hitDirection = direction;
if ((damage == 39) || (damage == 41) || (damage == 42) || (damage == 43)) { if ((damage == 39) || (damage == 41) || (damage == 42) || (damage == 43)) {
damage = 40; damage = 40;
} }
@ -834,15 +835,15 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) {
} }
player->unk_284 = 0; player->unk_284 = 0;
player->hitTimer = 20; player->hitTimer = 20;
if (player->unk_1A4 > 40) { if (player->dmgType > 40) {
sp34 = (player->boostSpeed * 0.3f) + 20.0f; sp34 = (player->boostSpeed * 0.3f) + 20.0f;
player->timer_498 = 5; player->mercyTimer = 5;
} else if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && !gBossActive) { } else if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && !gBossActive) {
player->timer_498 = 3; player->mercyTimer = 3;
} else if ((gCurrentLevel == LEVEL_VENOM_1) || (gCurrentLevel == LEVEL_AQUAS)) { } else if ((gCurrentLevel == LEVEL_VENOM_1) || (gCurrentLevel == LEVEL_AQUAS)) {
player->timer_498 = 5; player->mercyTimer = 5;
} else { } else {
player->timer_498 = 20; player->mercyTimer = 20;
} }
if (gHasShield[player->num]) { if (gHasShield[player->num]) {
Player_PlaySfx(player->sfxSource, NA_SE_DAMAGE_S, player->num); Player_PlaySfx(player->sfxSource, NA_SE_DAMAGE_S, player->num);
@ -866,9 +867,9 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) {
Matrix_RotateY(gCalcMatrix, player->yRot_114 * M_DTOR, MTXF_NEW); Matrix_RotateY(gCalcMatrix, player->yRot_114 * M_DTOR, MTXF_NEW);
Matrix_RotateZ(gCalcMatrix, player->bankAngle * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gCalcMatrix, player->bankAngle * M_DTOR, MTXF_APPLY);
sp44.z = 0.0f; sp44.z = 0.0f;
switch (player->unk_21C) { switch (player->hitDirection) {
case 0: case 0:
player->timer_224 = 20; player->dmgEffectTimer = 20;
player->knockback.x = 0.f; player->knockback.x = 0.f;
player->knockback.y = 0.f; player->knockback.y = 0.f;
player->knockback.z = 0.f; player->knockback.z = 0.f;
@ -896,7 +897,7 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) {
Player_DamageWings(player, 2, 20); Player_DamageWings(player, 2, 20);
break; break;
case 3: case 3:
player->timer_224 = 20; player->dmgEffectTimer = 20;
Play_SpawnHitmark(player->hit4.x - player->vel.x, player->hit4.y, player->hit4.z - player->vel.z); Play_SpawnHitmark(player->hit4.x - player->vel.x, player->hit4.y, player->hit4.z - player->vel.z);
if (player->form != FORM_LANDMASTER) { if (player->form != FORM_LANDMASTER) {
sp44.x = 0.0f; sp44.x = 0.0f;
@ -913,7 +914,7 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) {
} }
break; break;
case 4: case 4:
player->timer_224 = 20; player->dmgEffectTimer = 20;
Play_SpawnHitmark(player->hit3.x - player->vel.x, player->hit3.y, player->hit3.z - player->vel.z); Play_SpawnHitmark(player->hit3.x - player->vel.x, player->hit3.y, player->hit3.z - player->vel.z);
sp44.x = 0.0f; sp44.x = 0.0f;
sp44.y = sp34; sp44.y = sp34;
@ -928,13 +929,13 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) {
} }
break; break;
} }
if ((gCurrentLevel == LEVEL_VENOM_1) && (player->unk_1A4 == 42)) { if ((gCurrentLevel == LEVEL_VENOM_1) && (player->dmgType == 42)) {
if (player->pos.x > 0.0f) { if (player->pos.x > 0.0f) {
player->knockback.x = -30.0f; player->knockback.x = -30.0f;
} else { } else {
player->knockback.x = 30.0f; player->knockback.x = 30.0f;
} }
player->timer_498 = 10; player->mercyTimer = 10;
} }
} }
@ -943,15 +944,15 @@ f32 D_800D2FEC[5] = {
}; };
void Player_GroundedCollision(Player* player, u32 arg1, f32 arg2, f32 arg3) { void Player_GroundedCollision(Player* player, u32 arg1, f32 arg2, f32 arg3) {
player->unk_21C = arg1; player->hitDirection = arg1;
switch (arg1) { switch (arg1) {
case 1: case 1:
case 2: case 2:
player->pos.x = player->basePos.x; player->pos.x = player->basePos.x;
player->knockback.x = 0.0f; player->knockback.x = 0.0f;
player->pos.x += D_800D2FEC[player->unk_21C]; player->pos.x += D_800D2FEC[player->hitDirection];
if (player->form == FORM_LANDMASTER) { if (player->form == FORM_LANDMASTER) {
player->pos.x -= D_800D2FEC[player->unk_21C]; player->pos.x -= D_800D2FEC[player->hitDirection];
} }
Math_SmoothStepToF(&player->baseSpeed, 2.0f, 1.0f, 2.0f, 0.00001f); Math_SmoothStepToF(&player->baseSpeed, 2.0f, 1.0f, 2.0f, 0.00001f);
break; break;
@ -959,9 +960,9 @@ void Player_GroundedCollision(Player* player, u32 arg1, f32 arg2, f32 arg3) {
case 4: case 4:
player->pos.z = player->basePos.z; player->pos.z = player->basePos.z;
player->knockback.z = 0.0f; player->knockback.z = 0.0f;
player->pos.z += D_800D2FEC[player->unk_21C]; player->pos.z += D_800D2FEC[player->hitDirection];
if (player->form == FORM_LANDMASTER) { if (player->form == FORM_LANDMASTER) {
player->pos.z += D_800D2FEC[player->unk_21C]; player->pos.z += D_800D2FEC[player->hitDirection];
} }
player->trueZpos = player->pos.z; player->trueZpos = player->pos.z;
Math_SmoothStepToF(&player->baseSpeed, 2.0f, 1.0f, 2.0f, 0.00001f); Math_SmoothStepToF(&player->baseSpeed, 2.0f, 1.0f, 2.0f, 0.00001f);
@ -1487,7 +1488,7 @@ Vec3f D_800D30B8[4] = {
}; };
void Player_Collide(Player* playerA, Player* playerB) { void Player_Collide(Player* playerA, Player* playerB) {
if (playerA->timer_498 == 0) { if (playerA->mercyTimer == 0) {
Player_ApplyDamage(playerA, 0, D_800D3000[playerA->form][playerB->form]); Player_ApplyDamage(playerA, 0, D_800D3000[playerA->form][playerB->form]);
playerA->attacker = playerB->num + 1; playerA->attacker = playerB->num + 1;
playerB->attacker = playerA->num + 1; playerB->attacker = playerA->num + 1;
@ -1628,7 +1629,7 @@ void Player_CollisionCheck(Player* player) {
func_tank_800444BC(player); func_tank_800444BC(player);
} }
if ((player->timer_498 == 0) || ((gCamCount != 1) && (player->form != FORM_ARWING))) { if ((player->mercyTimer == 0) || ((gCamCount != 1) && (player->form != FORM_ARWING))) {
if (gLevelMode == LEVELMODE_ALL_RANGE) { if (gLevelMode == LEVELMODE_ALL_RANGE) {
Scenery360* scenery360; Scenery360* scenery360;
@ -1705,7 +1706,7 @@ void Player_CollisionCheck(Player* player) {
player->pos.y = player->basePos.y; player->pos.y = player->basePos.y;
player->pos.z = player->basePos.z; player->pos.z = player->basePos.z;
player->yRot_114 = scenery360->obj.rot.y + 180.0f; player->yRot_114 = scenery360->obj.rot.y + 180.0f;
player->timer_498 = 5; player->mercyTimer = 5;
} }
if ((scenery360->obj.id == OBJ_SCENERY_135) || if ((scenery360->obj.id == OBJ_SCENERY_135) ||
(scenery360->obj.id == OBJ_SCENERY_136)) { (scenery360->obj.id == OBJ_SCENERY_136)) {
@ -1730,7 +1731,7 @@ void Player_CollisionCheck(Player* player) {
} else { } else {
player->yRot_114 = scenery360->obj.rot.y; player->yRot_114 = scenery360->obj.rot.y;
} }
player->timer_498 = 5; player->mercyTimer = 5;
} }
} }
} }
@ -1808,7 +1809,7 @@ void Player_CollisionCheck(Player* player) {
player->knockback.x = spBC.x; player->knockback.x = spBC.x;
player->knockback.y = spBC.y; player->knockback.y = spBC.y;
player->pos.x = player->basePos.x; player->pos.x = player->basePos.x;
player->timer_498 = 5; player->mercyTimer = 5;
} else if (scenery->obj.id == OBJ_SCENERY_50) { } else if (scenery->obj.id == OBJ_SCENERY_50) {
if (player->pos.x < scenery->obj.pos.x) { if (player->pos.x < scenery->obj.pos.x) {
player->knockback.x = -30.0f; player->knockback.x = -30.0f;
@ -1819,7 +1820,7 @@ void Player_CollisionCheck(Player* player) {
} }
player->knockback.y = 0.0f; player->knockback.y = 0.0f;
player->pos.x = player->basePos.x; player->pos.x = player->basePos.x;
player->timer_498 = 5; player->mercyTimer = 5;
} else if (scenery->obj.id == OBJ_SCENERY_131) { } else if (scenery->obj.id == OBJ_SCENERY_131) {
Matrix_RotateY(gCalcMatrix, (scenery->obj.rot.y + 180.0f) * M_DTOR, MTXF_NEW); Matrix_RotateY(gCalcMatrix, (scenery->obj.rot.y + 180.0f) * M_DTOR, MTXF_NEW);
Matrix_RotateZ(gCalcMatrix, -scenery->obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gCalcMatrix, -scenery->obj.rot.z * M_DTOR, MTXF_APPLY);
@ -1828,7 +1829,7 @@ void Player_CollisionCheck(Player* player) {
player->knockback.y = spBC.y; player->knockback.y = spBC.y;
player->rot.y = 0.0f; player->rot.y = 0.0f;
player->rot.x = 0.0f; player->rot.x = 0.0f;
player->timer_498 = 5; player->mercyTimer = 5;
player->pos.x = player->basePos.x; player->pos.x = player->basePos.x;
player->pos.y = player->basePos.y; player->pos.y = player->basePos.y;
} }
@ -1857,7 +1858,7 @@ void Player_CollisionCheck(Player* player) {
if ((VEC3F_MAG(&spfD4)) < 1500.0f) { if ((VEC3F_MAG(&spfD4)) < 1500.0f) {
Player_ApplyDamage(player, 0, boss->info.damage); Player_ApplyDamage(player, 0, boss->info.damage);
player->boostSpeed = 0.0f; player->boostSpeed = 0.0f;
player->timer_498 = 5; player->mercyTimer = 5;
player->knockback.y = 30.0f; player->knockback.y = 30.0f;
boss->dmgType = DMG_BEAM; boss->dmgType = DMG_BEAM;
func_effect_8007BFFC(player->pos.x + RAND_FLOAT_CENTERED(10.0f), func_effect_8007BFFC(player->pos.x + RAND_FLOAT_CENTERED(10.0f),
@ -2022,7 +2023,7 @@ void Player_CollisionCheck(Player* player) {
(sprite->obj.id == OBJ_SPRITE_TI_CACTUS) || (sprite->obj.id == OBJ_SPRITE_CO_TREE)) { (sprite->obj.id == OBJ_SPRITE_TI_CACTUS) || (sprite->obj.id == OBJ_SPRITE_CO_TREE)) {
sprite->destroy = 1; sprite->destroy = 1;
player->hitTimer = 6; player->hitTimer = 6;
player->unk_21C = 0; player->hitDirection = 0;
} else { } else {
Player_ApplyDamage(player, temp_v0, sprite->info.damage); Player_ApplyDamage(player, temp_v0, sprite->info.damage);
} }
@ -2155,7 +2156,9 @@ void Player_FloorCheck(Player* player) {
s32 pad3; s32 pad3;
s32 pad4; s32 pad4;
if (player->unk_240 == 0) { if (player->hideShadow) {
return;
}
player->groundPos.x = player->pos.x; player->groundPos.x = player->pos.x;
player->groundPos.z = player->trueZpos - player->pos.y; player->groundPos.z = player->trueZpos - player->pos.y;
if (gGroundType != 4) { if (gGroundType != 4) {
@ -2167,7 +2170,7 @@ void Player_FloorCheck(Player* player) {
player->groundPos.z = player->trueZpos; player->groundPos.z = player->trueZpos;
} }
} }
player->unk_248 = player->unk_24C = player->groundRotY = 0.0f; player->shadowRotX = player->shadowRotZ = player->groundRotY = 0.0f;
} }
sp100 = 0.0f; sp100 = 0.0f;
spFC = 0.0f; spFC = 0.0f;
@ -2195,8 +2198,8 @@ void Player_FloorCheck(Player* player) {
} }
if (func_col2_800A3690(&spD4, &spC8, colId, &spBC)) { if (func_col2_800A3690(&spD4, &spC8, colId, &spBC)) {
player->groundPos.y = spBC.y + 1.0f; player->groundPos.y = spBC.y + 1.0f;
player->unk_248 = spBC.x; player->shadowRotX = spBC.x;
player->unk_24C = spBC.z; player->shadowRotZ = spBC.z;
break; break;
} }
} }
@ -2237,8 +2240,8 @@ void Player_FloorCheck(Player* player) {
} }
if (func_col1_800998FC(&spD4, &spC8, &sp9C, colId, &spB0, spA8) > 0) { if (func_col1_800998FC(&spD4, &spC8, &sp9C, colId, &spB0, spA8) > 0) {
player->groundPos.y = spB0.y; player->groundPos.y = spB0.y;
player->unk_248 = spA8[0]; player->shadowRotX = spA8[0];
player->unk_24C = spA8[1]; player->shadowRotZ = spA8[1];
player->groundRotY = DEG_TO_RAD(sp120); player->groundRotY = DEG_TO_RAD(sp120);
} }
} else { } else {
@ -2248,8 +2251,8 @@ void Player_FloorCheck(Player* player) {
} }
if (func_col2_800A3690(&spD4, &spC8, colId, &spBC)) { if (func_col2_800A3690(&spD4, &spC8, colId, &spBC)) {
player->groundPos.y = spBC.y; player->groundPos.y = spBC.y;
player->unk_248 = spBC.x; player->shadowRotX = spBC.x;
player->unk_24C = spBC.z; player->shadowRotZ = spBC.z;
player->groundRotY = DEG_TO_RAD(sp120); player->groundRotY = DEG_TO_RAD(sp120);
} }
} }
@ -2299,8 +2302,8 @@ void Player_FloorCheck(Player* player) {
if (func_col2_800A3690(&spD4, &spC8, colId, &spBC)) { if (func_col2_800A3690(&spD4, &spC8, colId, &spBC)) {
player->groundPos.y = spBC.y; player->groundPos.y = spBC.y;
player->groundPos.z = player->trueZpos + var_fs1; player->groundPos.z = player->trueZpos + var_fs1;
player->unk_248 = spBC.x; player->shadowRotX = spBC.x;
player->unk_24C = spBC.z; player->shadowRotZ = spBC.z;
player->groundRotY = DEG_TO_RAD(sp120); player->groundRotY = DEG_TO_RAD(sp120);
break; break;
} }
@ -2347,7 +2350,7 @@ void Player_FloorCheck(Player* player) {
if (gGroundHeight < player->groundPos.y) { if (gGroundHeight < player->groundPos.y) {
player->groundPos.y = spEC.y + 15.0f + tempy; player->groundPos.y = spEC.y + 15.0f + tempy;
player->groundPos.z = spEC.z + 10.0f + tempz; player->groundPos.z = spEC.z + 10.0f + tempz;
player->unk_248 = DEG_TO_RAD(sp100); player->shadowRotX = DEG_TO_RAD(sp100);
player->groundRotY = DEG_TO_RAD(sp120); player->groundRotY = DEG_TO_RAD(sp120);
} }
break; break;
@ -2360,7 +2363,6 @@ void Player_FloorCheck(Player* player) {
} }
} }
} }
}
void Player_InitializeAll(void) { void Player_InitializeAll(void) {
u8* ptr = (u8*) gPlayer; u8* ptr = (u8*) gPlayer;
@ -2520,7 +2522,7 @@ void Player_ResetVsData(void) {
s32 i; s32 i;
s32 j; s32 j;
gVsMatchState = 0; gVsMatchState = VS_STATE_0;
for (i = 0; i < 4; i++) { for (i = 0; i < 4; i++) {
gVsPoints[i] = 0; gVsPoints[i] = 0;
for (j = 0; j < 10; j++) { for (j = 0; j < 10; j++) {
@ -2529,7 +2531,7 @@ void Player_ResetVsData(void) {
gLaserStrength[i] = LASERS_SINGLE; gLaserStrength[i] = LASERS_SINGLE;
gBombCount[i] = 0; gBombCount[i] = 0;
} }
gVsMatchStart = gVsMatchOver = 0; gVsMatchStart = gVsMatchOver = false;
} }
void Player_InitVersus(void) { void Player_InitVersus(void) {
@ -2559,7 +2561,7 @@ void Play_Init(void) {
} else { } else {
gEnemyShotSpeed = 100; gEnemyShotSpeed = 100;
} }
gPauseEnabled = 0; gPauseEnabled = false;
gVIsPerFrame = 2; gVIsPerFrame = 2;
D_ctx_80177C70 = 0; D_ctx_80177C70 = 0;
gTeamHelpActor = NULL; gTeamHelpActor = NULL;
@ -2591,7 +2593,7 @@ void Play_Init(void) {
if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (gLevelPhase == 1)) { if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (gLevelPhase == 1)) {
gLevelMode = LEVELMODE_ALL_RANGE; gLevelMode = LEVELMODE_ALL_RANGE;
} }
gVsMatchStart = 0; gVsMatchStart = false;
Play_InitEnvironment(); Play_InitEnvironment();
gDropHitCountItem = gTeamLowHealthMsgTimer = gStartAndrossFightTimer = gSoShieldsEmpty = gAllRangeEventTimer = gDropHitCountItem = gTeamLowHealthMsgTimer = gStartAndrossFightTimer = gSoShieldsEmpty = gAllRangeEventTimer =
gAllRangeFrameCount = gBossActive = gGameFrameCount = gCameraShake = gDynaFloorTimer = gBossFrameCount = gAllRangeFrameCount = gBossActive = gGameFrameCount = gCameraShake = gDynaFloorTimer = gBossFrameCount =
@ -3185,24 +3187,24 @@ void Player_ArwingBank(Player* player) {
Math_SmoothStepToF(&player->zRotBank, sp3C, sp38, 10.0f, 0.f); Math_SmoothStepToF(&player->zRotBank, sp3C, sp38, 10.0f, 0.f);
if (gInputPress->button & Z_TRIG) { if (gInputPress->button & Z_TRIG) {
player->sfx.bank = 1; player->sfx.bank = 1;
if (player->barrelInputTimerL != 0) { if (player->rollInputTimerL != 0) {
player->barrelRoll = 1; player->rollState = 1;
player->timer_1E8 = 10; player->rollTimer = 10;
player->rollRate = player->baseRollRate = 30; player->rollRate = player->baseRollRate = 30;
player->sfx.roll = 1; player->sfx.roll = 1;
} else { } else {
player->barrelInputTimerL = 10; player->rollInputTimerL = 10;
} }
} }
if (gInputPress->button & R_TRIG) { if (gInputPress->button & R_TRIG) {
player->sfx.bank = 1; player->sfx.bank = 1;
if (player->barrelInputTimerR != 0) { if (player->rollInputTimerR != 0) {
player->barrelRoll = 1; player->rollState = 1;
player->timer_1E8 = 10; player->rollTimer = 10;
player->rollRate = player->baseRollRate = -30; player->rollRate = player->baseRollRate = -30;
player->sfx.roll = 1; player->sfx.roll = 1;
} else { } else {
player->barrelInputTimerR = 10; player->rollInputTimerR = 10;
} }
} }
} }
@ -3211,21 +3213,21 @@ void Player_UseTankJets(Player* player) {
Math_SmoothStepToF(&player->unk_170, 0.0f, 1.0f, 0.2f, 0.0f); Math_SmoothStepToF(&player->unk_170, 0.0f, 1.0f, 0.2f, 0.0f);
Math_SmoothStepToF(&player->unk_16C, 0.0f, 1.0f, 0.2f, 0.0f); Math_SmoothStepToF(&player->unk_16C, 0.0f, 1.0f, 0.2f, 0.0f);
if (gInputPress->button & Z_TRIG) { if (gInputPress->button & Z_TRIG) {
if ((player->barrelInputTimerL != 0) && (player->zRotBank > 0.0f) && (player->boostMeter < 10.0f)) { if ((player->rollInputTimerL != 0) && (player->zRotBank > 0.0f) && (player->boostMeter < 10.0f)) {
player->barrelRoll = 1; player->rollState = 1;
player->timer_1E8 = 15; player->rollTimer = 15;
player->rollRate = player->baseRollRate = 20; player->rollRate = player->baseRollRate = 20;
} else { } else {
player->barrelInputTimerL = 10; player->rollInputTimerL = 10;
} }
} }
if (gInputPress->button & R_TRIG) { if (gInputPress->button & R_TRIG) {
if ((player->barrelInputTimerR != 0) && (player->zRotBank < 0.0f) && (player->boostMeter < 10.0f)) { if ((player->rollInputTimerR != 0) && (player->zRotBank < 0.0f) && (player->boostMeter < 10.0f)) {
player->barrelRoll = 1; player->rollState = 1;
player->timer_1E8 = 15; player->rollTimer = 15;
player->rollRate = player->baseRollRate = -20; player->rollRate = player->baseRollRate = -20;
} else { } else {
player->barrelInputTimerR = 10; player->rollInputTimerR = 10;
} }
} }
player->unk_18C = fabsf(SIN_DEG(player->zRotBank) * 25.0f); player->unk_18C = fabsf(SIN_DEG(player->zRotBank) * 25.0f);
@ -3614,7 +3616,7 @@ void Player_MoveArwingOnRails(Player* player) {
sp84 = 0.2f; sp84 = 0.2f;
gPlayerTurnRate *= 2.0f; gPlayerTurnRate *= 2.0f;
} }
if (player->barrelRoll != 0) { if (player->rollState != 0) {
sp84 = 0.2f; sp84 = 0.2f;
gPlayerTurnRate = 6.8999996f; // 690.0f * 0.01f gPlayerTurnRate = 6.8999996f; // 690.0f * 0.01f
} }
@ -3783,7 +3785,7 @@ void Player_MoveTank360(Player* player) {
var_fa0 = 0.1f; var_fa0 = 0.1f;
var_fa1 = 4.0f; var_fa1 = 4.0f;
} }
if (player->barrelRoll != 0) { if (player->rollState != 0) {
if ((player->rollRate > 0) && (sp5C < 0.0f)) { if ((player->rollRate > 0) && (sp5C < 0.0f)) {
var_fa0 = 0.2f; var_fa0 = 0.2f;
var_fa1 = 20.0f; var_fa1 = 20.0f;
@ -3816,7 +3818,7 @@ void Player_MoveTank360(Player* player) {
if (!(player->unk_170 > 0.2f) && !(player->unk_16C > 0.2f) && player->grounded) { if (!(player->unk_170 > 0.2f) && !(player->unk_16C > 0.2f) && player->grounded) {
Math_SmoothStepToF(&player->unk_184, 0.0f, 1.0f, 0.75f, 0.0f); Math_SmoothStepToF(&player->unk_184, 0.0f, 1.0f, 0.75f, 0.0f);
} }
if (player->barrelRoll != 0) { if (player->rollState != 0) {
if (player->rollRate < 0) { if (player->rollRate < 0) {
player->unk_184 = 15.0f; player->unk_184 = 15.0f;
} }
@ -4131,7 +4133,7 @@ void Player_Setup(Player* playerx) {
player->cam.at.z = player->cam.eye.z - 1000.0f; player->cam.at.z = player->cam.eye.z - 1000.0f;
D_ctx_80177950 = 1.0f; D_ctx_80177950 = 1.0f;
if ((gLevelType == LEVELTYPE_SPACE) && (gCurrentLevel != LEVEL_BOLSE)) { if ((gLevelType == LEVELTYPE_SPACE) && (gCurrentLevel != LEVEL_BOLSE)) {
player->unk_240 = 1; player->hideShadow = true;
player->unk_0A8 = 3000.0f; player->unk_0A8 = 3000.0f;
player->pathWidth = 700.0f; player->pathWidth = 700.0f;
player->pathHeight = 612.0f; player->pathHeight = 612.0f;
@ -4275,19 +4277,19 @@ void Player_Setup(Player* playerx) {
Camera_Update360(player, 1); Camera_Update360(player, 1);
} }
player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE;
player->unk_204 = gLevelType; player->wingPosition = gLevelType;
if ((gLevelMode == LEVELMODE_ALL_RANGE) && !gVersusMode) { if ((gLevelMode == LEVELMODE_ALL_RANGE) && !gVersusMode) {
player->pos.z = 8000.0f; player->pos.z = 8000.0f;
player->pos.y = 670.0f; player->pos.y = 670.0f;
player->pathHeight = 730.0f; player->pathHeight = 730.0f;
player->unk_204 = 2; player->wingPosition = 2;
if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (gLevelPhase == 1)) { if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (gLevelPhase == 1)) {
player->pos.x = -7910.0f; player->pos.x = -7910.0f;
player->pos.y = 300.0f; player->pos.y = 300.0f;
player->pos.z = -11808.0f; player->pos.z = -11808.0f;
player->yRot_114 = 188.0f; player->yRot_114 = 188.0f;
player->unk_240 = 1; player->hideShadow = true;
} }
Camera_UpdateArwing360(player, 1); Camera_UpdateArwing360(player, 1);
} else { } else {
@ -4305,12 +4307,12 @@ void Player_Setup(Player* playerx) {
switch (gCurrentLevel) { switch (gCurrentLevel) {
case LEVEL_CORNERIA: case LEVEL_CORNERIA:
player->state_1C8 = PLAYERSTATE_1C8_LEVEL_INTRO; player->state_1C8 = PLAYERSTATE_1C8_LEVEL_INTRO;
player->unk_204 = 1; player->wingPosition = 1;
gGroundSurface = gSavedGroundSurface = SURFACE_WATER; gGroundSurface = gSavedGroundSurface = SURFACE_WATER;
Play_dummy_MuteSfx(); Play_dummy_MuteSfx();
break; break;
case LEVEL_BOLSE: case LEVEL_BOLSE:
player->unk_204 = 1; player->wingPosition = 1;
D_BO_801A03DC = 6; D_BO_801A03DC = 6;
/* fallthrough */ /* fallthrough */
case LEVEL_SECTOR_X: case LEVEL_SECTOR_X:
@ -4354,7 +4356,7 @@ void Player_Setup(Player* playerx) {
} }
} }
if (player->state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) { if (player->state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) {
player->unk_234 = 1; player->draw = true;
switch (gCurrentLevel) { switch (gCurrentLevel) {
case LEVEL_CORNERIA: case LEVEL_CORNERIA:
AUDIO_PLAY_BGM(NA_BGM_START_DEMO); AUDIO_PLAY_BGM(NA_BGM_START_DEMO);
@ -4398,14 +4400,14 @@ void Player_Setup(Player* playerx) {
gLevelClearScreenTimer = gBossHealthBar = D_ctx_80177850 = 0; gLevelClearScreenTimer = gBossHealthBar = D_ctx_80177850 = 0;
if ((gCurrentLevel == LEVEL_TRAINING)) { if ((gCurrentLevel == LEVEL_TRAINING)) {
D_ctx_80177824 = 1; gClearPlayerInfo = true;
} }
if (D_ctx_80177824 && !gVersusMode) { if (gClearPlayerInfo && !gVersusMode) {
for (j = TEAM_ID_FALCO; j < TEAM_ID_MAX; j++) { for (j = TEAM_ID_FALCO; j < TEAM_ID_MAX; j++) {
gTeamShields[j] = gSavedTeamShields[j] = gPrevPlanetTeamShields[j] = gPrevPlanetSavedTeamShields[j] = 255; gTeamShields[j] = gSavedTeamShields[j] = gPrevPlanetTeamShields[j] = gPrevPlanetSavedTeamShields[j] = 255;
} }
for (j = 0; j < 6; j++) { for (j = 0; j < 6; j++) {
gStarWolfTeamAlive[j] = gSavedStarWolfTeamAlive[j] = 1; gStarWolfTeamAlive[j] = gSavedStarWolfTeamAlive[j] = true;
} }
gLaserStrength[gPlayerNum] = LASERS_SINGLE; gLaserStrength[gPlayerNum] = LASERS_SINGLE;
gGoldRingCount[0] = gSavedGoldRingCount[0] = gTotalHits = 0; gGoldRingCount[0] = gSavedGoldRingCount[0] = gTotalHits = 0;
@ -4418,11 +4420,11 @@ void Player_Setup(Player* playerx) {
D_hud_80161720[2] = 0.0f; D_hud_80161720[2] = 0.0f;
gDisplayedHitCount = 0; gDisplayedHitCount = 0;
gHitCount = 0; gHitCount = 0;
D_ctx_80177824 = 0; gClearPlayerInfo = false;
} }
} }
if ((gCurrentLevel == LEVEL_TRAINING)) { if ((gCurrentLevel == LEVEL_TRAINING)) {
D_ctx_80177824 = 1; gClearPlayerInfo = true;
} }
player->sfx.levelType = gLevelType; player->sfx.levelType = gLevelType;
player->sfx.form = player->form; player->sfx.form = player->form;
@ -4432,7 +4434,7 @@ void Player_Setup(Player* playerx) {
Audio_StartPlayerNoise(gPlayerNum); Audio_StartPlayerNoise(gPlayerNum);
} }
if ((player->form == FORM_ARWING) && !gVersusMode) { if ((player->form == FORM_ARWING) && !gVersusMode) {
switch (player->unk_204) { switch (player->wingPosition) {
case 0: case 0:
Animation_GetFrameData(&D_arwing_3015AF4, 0, player->jointTable); Animation_GetFrameData(&D_arwing_3015AF4, 0, player->jointTable);
break; break;
@ -4447,7 +4449,7 @@ void Player_Setup(Player* playerx) {
if (gLaserStrength[gPlayerNum] > LASERS_SINGLE) { if (gLaserStrength[gPlayerNum] > LASERS_SINGLE) {
player->wings.unk_14 = -10.0f; player->wings.unk_14 = -10.0f;
} }
gPauseEnabled = 0; gPauseEnabled = false;
} }
void Player_UpdateArwingRoll(Player* player) { void Player_UpdateArwingRoll(Player* player) {
@ -4473,14 +4475,14 @@ void Player_UpdateArwingRoll(Player* player) {
} }
} }
if (player->meteoWarpTimer == 0) { if (player->meteoWarpTimer == 0) {
if (player->barrelRoll == 0) { if (player->rollState == 0) {
Math_SmoothStepToF(&player->zRotBarrelRoll, 0.0f, 0.1f, 10.0f, 0.00001f); Math_SmoothStepToF(&player->zRotBarrelRoll, 0.0f, 0.1f, 10.0f, 0.00001f);
} }
if (player->barrelInputTimerL != 0) { if (player->rollInputTimerL != 0) {
player->barrelInputTimerL--; player->rollInputTimerL--;
} }
if (player->barrelInputTimerR != 0) { if (player->rollInputTimerR != 0) {
player->barrelInputTimerR--; player->rollInputTimerR--;
} }
if (player->timer_214 != 0) { if (player->timer_214 != 0) {
player->timer_214--; player->timer_214--;
@ -4488,15 +4490,15 @@ void Player_UpdateArwingRoll(Player* player) {
if (player->timer_218 != 0) { if (player->timer_218 != 0) {
player->timer_218--; player->timer_218--;
} }
if (player->timer_1E8 != 0) { if (player->rollTimer != 0) {
player->timer_1E8--; player->rollTimer--;
} }
if (player->barrelRoll != 0) { if (player->rollState != 0) {
player->barrelInputTimerR = 0; player->rollInputTimerR = 0;
player->barrelInputTimerL = 0; player->rollInputTimerL = 0;
player->unk_150 = 1.5f; player->unk_150 = 1.5f;
player->zRotBarrelRoll += player->rollRate; player->zRotBarrelRoll += player->rollRate;
if (player->timer_1E8 == 0) { if (player->rollTimer == 0) {
if (player->rollRate > 0) { if (player->rollRate > 0) {
player->rollRate -= 5; player->rollRate -= 5;
} }
@ -4504,7 +4506,7 @@ void Player_UpdateArwingRoll(Player* player) {
player->rollRate += 5; player->rollRate += 5;
} }
if (player->rollRate == 0) { if (player->rollRate == 0) {
player->barrelRoll = 0; player->rollState = 0;
} }
} else if (player->barrelRollAlpha < 180) { } else if (player->barrelRollAlpha < 180) {
player->barrelRollAlpha += 100; player->barrelRollAlpha += 100;
@ -4529,7 +4531,7 @@ void Player_UpdateTankRoll(Player* player) {
s32 var_v0; s32 var_v0;
player->zRotBarrelRoll = Math_ModF(player->zRotBarrelRoll, 360.0f); player->zRotBarrelRoll = Math_ModF(player->zRotBarrelRoll, 360.0f);
if (player->barrelRoll == 0) { if (player->rollState == 0) {
temp_fv0 = player->zRotBarrelRoll; temp_fv0 = player->zRotBarrelRoll;
if (player->zRotBarrelRoll > 0.0f) { if (player->zRotBarrelRoll > 0.0f) {
player->zRotBarrelRoll -= (player->zRotBarrelRoll * 0.1f); player->zRotBarrelRoll -= (player->zRotBarrelRoll * 0.1f);
@ -4544,19 +4546,19 @@ void Player_UpdateTankRoll(Player* player) {
} }
} }
} }
temp_v0 = player->barrelInputTimerL; temp_v0 = player->rollInputTimerL;
if (player->barrelInputTimerL != 0) { if (player->rollInputTimerL != 0) {
player->barrelInputTimerL--; player->rollInputTimerL--;
} }
if (player->barrelInputTimerR != 0) { if (player->rollInputTimerR != 0) {
player->barrelInputTimerR--; player->rollInputTimerR--;
} }
if (player->timer_1E8 != 0) { if (player->rollTimer != 0) {
player->timer_1E8--; player->rollTimer--;
} }
if (player->barrelRoll != 0) { if (player->rollState != 0) {
player->barrelInputTimerR = 0; player->rollInputTimerR = 0;
player->barrelInputTimerL = 0; player->rollInputTimerL = 0;
player->zRotBarrelRoll += player->rollRate; player->zRotBarrelRoll += player->rollRate;
if (player->zRotBank > 0.0f) { if (player->zRotBank > 0.0f) {
player->zRotBank -= 8.0f; player->zRotBank -= 8.0f;
@ -4570,7 +4572,7 @@ void Player_UpdateTankRoll(Player* player) {
player->zRotBank = 0.0f; player->zRotBank = 0.0f;
} }
} }
if (player->timer_1E8 == 0) { if (player->rollTimer == 0) {
if (player->rollRate > 0) { if (player->rollRate > 0) {
player->rollRate -= 2; player->rollRate -= 2;
} }
@ -4578,12 +4580,12 @@ void Player_UpdateTankRoll(Player* player) {
player->rollRate += 2; player->rollRate += 2;
} }
if (player->rollRate == 0) { if (player->rollRate == 0) {
player->barrelRoll = 0; player->rollState = 0;
} }
} else { } else {
Math_SmoothStepToF(&D_ctx_801779A8[player->num], 30.0f, 1.0f, 30.0f, 0.0f); Math_SmoothStepToF(&D_ctx_801779A8[player->num], 30.0f, 1.0f, 30.0f, 0.0f);
} }
if ((player->timer_1E8 >= 5) && (player->timer_498 == 0)) { if ((player->rollTimer >= 5) && (player->mercyTimer == 0)) {
if (player->rollRate > 0) { if (player->rollRate > 0) {
player->unk_170 = 1.3f; player->unk_170 = 1.3f;
} }
@ -4927,7 +4929,7 @@ void Player_UpdateTankJets(Player* player) {
func_effect_8007BC7C(RAND_FLOAT_CENTERED(20.0f) + player->pos.x, player->groundPos.y + 10.0f, func_effect_8007BC7C(RAND_FLOAT_CENTERED(20.0f) + player->pos.x, player->groundPos.y + 10.0f,
player->trueZpos - 10.0f, RAND_FLOAT(2.0f) + 4.0f); player->trueZpos - 10.0f, RAND_FLOAT(2.0f) + 4.0f);
} }
} else if ((gCamCount == 1) && ((gGameFrameCount % 4) == 0) && (player->barrelRoll == 0)) { } else if ((gCamCount == 1) && ((gGameFrameCount % 4) == 0) && (player->rollState == 0)) {
if ((player->unk_16C > 0.2f) && (player->radioDamageTimer == 0)) { if ((player->unk_16C > 0.2f) && (player->radioDamageTimer == 0)) {
func_effect_8007BC7C(RAND_FLOAT_CENTERED(10.0f) + (player->pos.x - 57.0f), player->groundPos.y + 10.0f, func_effect_8007BC7C(RAND_FLOAT_CENTERED(10.0f) + (player->pos.x - 57.0f), player->groundPos.y + 10.0f,
player->trueZpos - 10.0f, RAND_FLOAT(2.0f) + 3.0f); player->trueZpos - 10.0f, RAND_FLOAT(2.0f) + 3.0f);
@ -4959,11 +4961,11 @@ void Player_UpdateEffects(Player* player) {
if (player->radioDamageTimer != 0) { if (player->radioDamageTimer != 0) {
player->radioDamageTimer--; player->radioDamageTimer--;
} }
if (player->timer_498 != 0) { if (player->mercyTimer != 0) {
player->timer_498--; player->mercyTimer--;
} }
if (player->timer_224 != 0) { if (player->dmgEffectTimer != 0) {
player->timer_224--; player->dmgEffectTimer--;
} }
if (gVersusMode) { if (gVersusMode) {
for (i = 0; i < gCamCount; i++) { for (i = 0; i < gCamCount; i++) {
@ -5000,11 +5002,11 @@ void Player_UpdateEffects(Player* player) {
if ((player->form == FORM_LANDMASTER) && (player->unk_1A0 != 0)) { if ((player->form == FORM_LANDMASTER) && (player->unk_1A0 != 0)) {
player->unk_1A0--; player->unk_1A0--;
} }
player->unk_200 = player->timer_224 & 1; player->dmgEffect = player->dmgEffectTimer & 1;
if (player->timer_224 != 0) { if (player->dmgEffectTimer != 0) {
gFillScreenAlphaStep = 8; gFillScreenAlphaStep = 8;
} }
if (player->timer_224 == 19) { if (player->dmgEffectTimer == 19) {
gFillScreenAlpha = 128; gFillScreenAlpha = 128;
gFillScreenRed = 255; gFillScreenRed = 255;
gFillScreenGreen = gFillScreenBlue = 0; gFillScreenGreen = gFillScreenBlue = 0;
@ -5025,19 +5027,20 @@ void Player_UpdateEffects(Player* player) {
} }
player->hitTimer--; player->hitTimer--;
if (player->form == FORM_ARWING) { if (player->form == FORM_ARWING) {
player->damageShake = (SIN_DEG(player->hitTimer * 400.0f) * player->hitTimer) * D_800D3164[player->unk_21C]; player->damageShake =
SIN_DEG(player->hitTimer * 400.0f) * player->hitTimer * D_800D3164[player->hitDirection];
if (player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) { if (player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) {
player->xShake = player->xShake =
(SIN_DEG(player->hitTimer * 400.0f) * player->hitTimer) * D_800D3164[player->unk_21C] * 0.8f; SIN_DEG(player->hitTimer * 400.0f) * player->hitTimer * D_800D3164[player->hitDirection] * 0.8f;
} }
} else { } else {
player->damageShake = player->damageShake =
(SIN_DEG(player->hitTimer * 400.0f) * player->hitTimer) * D_800D3164[player->unk_21C] * 1.5f; SIN_DEG(player->hitTimer * 400.0f) * player->hitTimer * D_800D3164[player->hitDirection] * 1.5f;
player->xShake = 0.0f; player->xShake = 0.0f;
} }
if ((gLevelMode != LEVELMODE_UNK_2) && if ((gLevelMode != LEVELMODE_UNK_2) &&
((player->knockback.x != 0.f) || (player->knockback.y != 0.f) || (player->knockback.z != 0.f)) && ((player->knockback.x != 0.f) || (player->knockback.y != 0.f) || (player->knockback.z != 0.f)) &&
((player->unk_1A4 >= 40) || (player->unk_1A4 == 21))) { ((player->dmgType >= 40) || (player->dmgType == 21))) {
player->boostCooldown = true; player->boostCooldown = true;
player->rot.x = 0; player->rot.x = 0;
player->rot.y = 0; player->rot.y = 0;
@ -5336,7 +5339,7 @@ void Player_Update(Player* player) {
} }
player->flags_228 = 0; player->flags_228 = 0;
if ((player->state_1C8 > PLAYERSTATE_1C8_INIT) && (player->form == FORM_ARWING) && !gVersusMode) { if ((player->state_1C8 > PLAYERSTATE_1C8_INIT) && (player->form == FORM_ARWING) && !gVersusMode) {
switch (player->unk_204) { switch (player->wingPosition) {
case 0: case 0:
sp1C4 = Animation_GetFrameData(&D_arwing_3015AF4, 0, sp58); sp1C4 = Animation_GetFrameData(&D_arwing_3015AF4, 0, sp58);
break; break;
@ -5356,18 +5359,18 @@ void Player_Update(Player* player) {
} }
switch (player->state_1C8) { switch (player->state_1C8) {
case PLAYERSTATE_1C8_STANDBY: case PLAYERSTATE_1C8_STANDBY:
player->unk_234 = 0; player->draw = false;
gShowHud = 0; gShowHud = 0;
gPauseEnabled = 0; gPauseEnabled = false;
break; break;
case PLAYERSTATE_1C8_INIT: case PLAYERSTATE_1C8_INIT:
Player_Setup(player); Player_Setup(player);
gFillScreenAlphaTarget = 0; gFillScreenAlphaTarget = 0;
gPauseEnabled = 0; gPauseEnabled = false;
break; break;
case PLAYERSTATE_1C8_LEVEL_INTRO: case PLAYERSTATE_1C8_LEVEL_INTRO:
gShowHud = 0; gShowHud = 0;
gPauseEnabled = 0; gPauseEnabled = false;
player->wings.modelId = 1; player->wings.modelId = 1;
Cutscene_LevelStart(player); Cutscene_LevelStart(player);
break; break;
@ -5376,7 +5379,7 @@ void Player_Update(Player* player) {
Player_LowHealthMsg(player); Player_LowHealthMsg(player);
player->wings.modelId = 0; player->wings.modelId = 0;
D_hud_80161704 = 255; D_hud_80161704 = 255;
if ((!gVersusMode || (gVsMatchStart != 0)) && !player->somersault && (gInputPress->button & U_CBUTTONS) && if ((!gVersusMode || gVsMatchStart) && !player->somersault && (gInputPress->button & U_CBUTTONS) &&
((player->form == FORM_ARWING) || (gVersusMode && (player->form == FORM_LANDMASTER)))) { ((player->form == FORM_ARWING) || (gVersusMode && (player->form == FORM_LANDMASTER)))) {
if (player->alternateView = 1 - player->alternateView) { if (player->alternateView = 1 - player->alternateView) {
AUDIO_PLAY_SFX(NA_SE_VIEW_MOVE_IN, gDefaultSfxSource, 4); AUDIO_PLAY_SFX(NA_SE_VIEW_MOVE_IN, gDefaultSfxSource, 4);
@ -5392,13 +5395,13 @@ void Player_Update(Player* player) {
case LEVELMODE_ON_RAILS: case LEVELMODE_ON_RAILS:
gLoadLevelObjects = true; gLoadLevelObjects = true;
Player_UpdateOnRails(player); Player_UpdateOnRails(player);
player->unk_234 = 1; player->draw = true;
break; break;
case LEVELMODE_ALL_RANGE: case LEVELMODE_ALL_RANGE:
if (!gVersusMode) { if (!gVersusMode) {
Player_Update360(player); Player_Update360(player);
player->unk_234 = 1; player->draw = true;
} else if (gVsMatchStart != 0) { } else if (gVsMatchStart) {
if (gPlayerInactive[player->num] == true) { if (gPlayerInactive[player->num] == true) {
do { do {
sp1C4 = RAND_INT(3.9f); sp1C4 = RAND_INT(3.9f);
@ -5416,12 +5419,12 @@ void Player_Update(Player* player) {
} }
} }
Player_Update360(player); Player_Update360(player);
player->unk_234 = 1; player->draw = true;
} }
} else { } else {
gInputPress->stick_x = gInputPress->stick_y = 0; gInputPress->stick_x = gInputPress->stick_y = 0;
gVsItemSpawnTimer = 0; gVsItemSpawnTimer = 0;
gPauseEnabled = 0; gPauseEnabled = false;
} }
break; break;
case LEVELMODE_UNK_2: case LEVELMODE_UNK_2:
@ -5462,20 +5465,20 @@ void Player_Update(Player* player) {
gShowHud = gChargeTimers[player->num] = 0; gShowHud = gChargeTimers[player->num] = 0;
break; break;
case PLAYERSTATE_1C8_ENTER_WARP_ZONE: case PLAYERSTATE_1C8_ENTER_WARP_ZONE:
gPauseEnabled = 0; gPauseEnabled = false;
Player_UpdateShields(player); Player_UpdateShields(player);
Cutscene_EnterWarpZone(player); Cutscene_EnterWarpZone(player);
gShowHud = 0; gShowHud = 0;
break; break;
case PLAYERSTATE_1C8_START_360: case PLAYERSTATE_1C8_START_360:
gPauseEnabled = 0; gPauseEnabled = false;
Player_UpdateShields(player); Player_UpdateShields(player);
Cutscene_AllRangeMode(player); Cutscene_AllRangeMode(player);
Player_UpdateArwingRoll(player); Player_UpdateArwingRoll(player);
gChargeTimers[player->num] = player->alternateView = gShowHud = 0; gChargeTimers[player->num] = player->alternateView = gShowHud = 0;
break; break;
case PLAYERSTATE_1C8_GFOX_REPAIR: case PLAYERSTATE_1C8_GFOX_REPAIR:
gPauseEnabled = 0; gPauseEnabled = false;
AllRange_GreatFoxRepair(player); AllRange_GreatFoxRepair(player);
gShowHud = 0; gShowHud = 0;
break; break;
@ -5486,10 +5489,10 @@ void Player_Update(Player* player) {
case PLAYERSTATE_1C8_12: case PLAYERSTATE_1C8_12:
break; break;
case PLAYERSTATE_1C8_VS_STANDBY: case PLAYERSTATE_1C8_VS_STANDBY:
player->unk_234 = 0; player->draw = false;
if (gPlayerInactive[player->num] == true) { if (gPlayerInactive[player->num] == true) {
Camera_FollowPlayer(player, player->attacker - 1, 0); Camera_FollowPlayer(player, player->attacker - 1, 0);
} else if ((gVsMatchOver == 0) && (player->csState != 0)) { } else if (!gVsMatchOver && (player->csState != 0)) {
player->csState = 0; player->csState = 0;
Player_Initialize(player); Player_Initialize(player);
Player_Setup(player); Player_Setup(player);
@ -5507,9 +5510,9 @@ void Player_Update(Player* player) {
case PLAYERSTATE_1C8_NEXT: case PLAYERSTATE_1C8_NEXT:
gShowHud = 0; gShowHud = 0;
if (!gVersusMode) { if (!gVersusMode) {
gPauseEnabled = 0; gPauseEnabled = false;
} }
player->unk_234 = 0; player->draw = false;
player->vel.z = player->vel.x = player->vel.y = player->knockback.x = player->knockback.y = 0.0f; player->vel.z = player->vel.x = player->vel.y = player->knockback.x = player->knockback.y = 0.0f;
if ((gLevelMode == LEVELMODE_ALL_RANGE) && (gFadeoutType == 7)) { if ((gLevelMode == LEVELMODE_ALL_RANGE) && (gFadeoutType == 7)) {
@ -6178,7 +6181,7 @@ void Play_UpdateLevel(void) {
if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) && (gLevelPhase == 2)) { if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) && (gLevelPhase == 2)) {
gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE;
gPlayer[0].csState = 0; gPlayer[0].csState = 0;
gPlayer[0].unk_234 = 1; gPlayer[0].draw = true;
gPlayer[0].pos.z = 15000.0f; gPlayer[0].pos.z = 15000.0f;
Camera_Update360(gPlayer, 1); Camera_Update360(gPlayer, 1);
gFillScreenAlpha = 255; gFillScreenAlpha = 255;
@ -6505,13 +6508,12 @@ void Play_Main(void) {
} }
} }
} }
if ((D_ctx_80177868 == 4) && (gControllerPress[gMainController].button & START_BUTTON) && if ((D_ctx_80177868 == 4) && (gControllerPress[gMainController].button & START_BUTTON) && gPauseEnabled) {
(gPauseEnabled != 0)) {
Audio_PlayPauseSfx(0); Audio_PlayPauseSfx(0);
gPlayState = PLAY_UPDATE; gPlayState = PLAY_UPDATE;
gDrawMode = DRAW_PLAY; gDrawMode = DRAW_PLAY;
} }
gPauseEnabled = 1; gPauseEnabled = true;
break; break;
} }
} }

View File

@ -165,7 +165,7 @@ void func_tank_80043B18(Player* player) {
sp48.y = 0.0f; sp48.y = 0.0f;
sp48.z = -20.0f; sp48.z = -20.0f;
sp38 = player->yRot_114; sp38 = player->yRot_114;
if (player->barrelRoll != 0) { if (player->rollState != 0) {
sp48.x = 0.0f; sp48.x = 0.0f;
sp48.z = RAND_FLOAT_CENTERED(50.0f) + -20.0f; sp48.z = RAND_FLOAT_CENTERED(50.0f) + -20.0f;
@ -422,7 +422,7 @@ void func_tank_80044868(Player* player) {
if (!(player->unk_170 > 0.2f) && !(player->unk_16C > 0.2f) && player->grounded) { if (!(player->unk_170 > 0.2f) && !(player->unk_16C > 0.2f) && player->grounded) {
Math_SmoothStepToF(&player->unk_184, 0.0f, 1.0f, 0.75f, 0.0f); Math_SmoothStepToF(&player->unk_184, 0.0f, 1.0f, 0.75f, 0.0f);
} }
if (player->barrelRoll != 0) { if (player->rollState != 0) {
if (player->rollRate < 0) { if (player->rollRate < 0) {
player->unk_184 = 15.0f; player->unk_184 = 15.0f;
} }
@ -480,7 +480,7 @@ void func_tank_80044868(Player* player) {
if (player->baseSpeed != 0.0f) { if (player->baseSpeed != 0.0f) {
func_tank_80043B18(player); func_tank_80043B18(player);
} }
if (player->barrelRoll != 0.0f) { if (player->rollState != 0.0f) {
func_tank_80043B18(player); func_tank_80043B18(player);
} }
} }
@ -508,28 +508,28 @@ void func_tank_80045130(Player* player) {
Math_SmoothStepToF(&player->unk_16C, 0.0f, 1.0f, 0.2f, 0.0f); Math_SmoothStepToF(&player->unk_16C, 0.0f, 1.0f, 0.2f, 0.0f);
if (gInputPress->button & Z_TRIG) { if (gInputPress->button & Z_TRIG) {
player->sfx.bank = 1; player->sfx.bank = 1;
if ((player->barrelInputTimerL != 0) && (player->zRotBank > 0.0f) && (player->boostMeter < 10.0f)) { if ((player->rollInputTimerL != 0) && (player->zRotBank > 0.0f) && (player->boostMeter < 10.0f)) {
player->barrelRoll = 1; player->rollState = 1;
player->timer_1E8 = 15; player->rollTimer = 15;
player->baseRollRate = 20; player->baseRollRate = 20;
player->rollRate = 20; player->rollRate = 20;
player->sfx.roll = 1; player->sfx.roll = 1;
AUDIO_PLAY_SFX(NA_SE_TANK_SLIDE, player->sfxSource, 0); AUDIO_PLAY_SFX(NA_SE_TANK_SLIDE, player->sfxSource, 0);
} else { } else {
player->barrelInputTimerL = 10; player->rollInputTimerL = 10;
} }
} }
if (gInputPress->button & R_TRIG) { if (gInputPress->button & R_TRIG) {
player->sfx.bank = 1; player->sfx.bank = 1;
if ((player->barrelInputTimerR != 0) && (player->zRotBank < 0.0f) && (player->boostMeter < 10.0f)) { if ((player->rollInputTimerR != 0) && (player->zRotBank < 0.0f) && (player->boostMeter < 10.0f)) {
player->barrelRoll = 1; player->rollState = 1;
player->timer_1E8 = 15; player->rollTimer = 15;
player->baseRollRate = -20; player->baseRollRate = -20;
player->rollRate = -20; player->rollRate = -20;
player->sfx.roll = 1; player->sfx.roll = 1;
AUDIO_PLAY_SFX(NA_SE_TANK_SLIDE, player->sfxSource, 0); AUDIO_PLAY_SFX(NA_SE_TANK_SLIDE, player->sfxSource, 0);
} else { } else {
player->barrelInputTimerR = 10; player->rollInputTimerR = 10;
} }
} }
player->unk_18C = fabsf(SIN_DEG(player->zRotBank) * 25.0f); player->unk_18C = fabsf(SIN_DEG(player->zRotBank) * 25.0f);
@ -678,7 +678,7 @@ void func_tank_80045678(Player* player) {
} }
} else { } else {
D_800C9F3C = 0; D_800C9F3C = 0;
if ((gCamCount == 1) && ((gGameFrameCount % 4) == 0) && (player->barrelRoll == 0)) { if ((gCamCount == 1) && ((gGameFrameCount % 4) == 0) && (player->rollState == 0)) {
if ((player->unk_16C > 0.2f) && (player->radioDamageTimer == 0)) { if ((player->unk_16C > 0.2f) && (player->radioDamageTimer == 0)) {
func_effect_8007A900(RAND_FLOAT_CENTERED(10.0f) + (player->pos.x - 57.0f), player->groundPos.y + 10.0f, func_effect_8007A900(RAND_FLOAT_CENTERED(10.0f) + (player->pos.x - 57.0f), player->groundPos.y + 10.0f,
player->trueZpos - 10.0f, RAND_FLOAT(1.0f) + 1.5f, 255, 15, 0); player->trueZpos - 10.0f, RAND_FLOAT(1.0f) + 1.5f, 255, 15, 0);
@ -693,7 +693,7 @@ void func_tank_80045678(Player* player) {
void func_tank_80045E7C(Player* player) { void func_tank_80045E7C(Player* player) {
player->zRotBarrelRoll = Math_ModF(player->zRotBarrelRoll, 360.0f); player->zRotBarrelRoll = Math_ModF(player->zRotBarrelRoll, 360.0f);
if (player->barrelRoll == 0) { if (player->rollState == 0) {
if (player->zRotBarrelRoll > 0.0f) { if (player->zRotBarrelRoll > 0.0f) {
player->zRotBarrelRoll -= player->zRotBarrelRoll * 0.1f; player->zRotBarrelRoll -= player->zRotBarrelRoll * 0.1f;
if (player->zRotBarrelRoll < 0.1f) { if (player->zRotBarrelRoll < 0.1f) {
@ -707,18 +707,18 @@ void func_tank_80045E7C(Player* player) {
} }
} }
} }
if (player->barrelInputTimerL != 0) { if (player->rollInputTimerL != 0) {
player->barrelInputTimerL--; player->rollInputTimerL--;
} }
if (player->barrelInputTimerR != 0) { if (player->rollInputTimerR != 0) {
player->barrelInputTimerR--; player->rollInputTimerR--;
} }
if (player->timer_1E8 != 0) { if (player->rollTimer != 0) {
player->timer_1E8--; player->rollTimer--;
} }
if (player->barrelRoll != 0) { if (player->rollState != 0) {
player->barrelInputTimerR = 0; player->rollInputTimerR = 0;
player->barrelInputTimerL = 0; player->rollInputTimerL = 0;
player->zRotBarrelRoll += player->rollRate; player->zRotBarrelRoll += player->rollRate;
if (player->zRotBank > 0.0f) { if (player->zRotBank > 0.0f) {
player->zRotBank -= 8.0f; player->zRotBank -= 8.0f;
@ -732,7 +732,7 @@ void func_tank_80045E7C(Player* player) {
player->zRotBank = 0.0f; player->zRotBank = 0.0f;
} }
} }
if (player->timer_1E8 == 0) { if (player->rollTimer == 0) {
D_ctx_801779A8[player->num] = 25.0f; D_ctx_801779A8[player->num] = 25.0f;
if (player->rollRate > 0) { if (player->rollRate > 0) {
player->rollRate -= 2; player->rollRate -= 2;
@ -741,11 +741,11 @@ void func_tank_80045E7C(Player* player) {
player->rollRate += 2; player->rollRate += 2;
} }
if (player->rollRate == 0) { if (player->rollRate == 0) {
player->barrelRoll = 0; player->rollState = 0;
Audio_KillSfxBySourceAndId(player->sfxSource, NA_SE_TANK_SLIDE); Audio_KillSfxBySourceAndId(player->sfxSource, NA_SE_TANK_SLIDE);
} }
} }
if ((player->timer_1E8 >= 5) && (player->hitTimer == 0) && (player->barrelRoll != 9)) { if ((player->rollTimer >= 5) && (player->hitTimer == 0) && (player->rollState != 9)) {
if (player->rollRate > 0) { if (player->rollRate > 0) {
player->unk_170 = 1.3f; player->unk_170 = 1.3f;
} }
@ -809,13 +809,13 @@ void func_tank_80046358(Player* player) {
player->groundPos.x = player->pos.x; player->groundPos.x = player->pos.x;
player->groundPos.z = player->trueZpos + -20.0f; player->groundPos.z = player->trueZpos + -20.0f;
player->groundPos.y = gGroundHeight + 3.0f; player->groundPos.y = gGroundHeight + 3.0f;
player->unk_248 = 0.0f; player->shadowRotX = 0.0f;
player->unk_24C = 0.0f; player->shadowRotZ = 0.0f;
player->groundRotY = 0.0f; player->groundRotY = 0.0f;
Ground_801B6E20(player->groundPos.x, player->groundPos.z + player->zPath, &spD4, &spD0, &spCC); Ground_801B6E20(player->groundPos.x, player->groundPos.z + player->zPath, &spD4, &spD0, &spCC);
player->groundPos.y = spD0 + 2.0f; player->groundPos.y = spD0 + 2.0f;
player->unk_248 = spD4; player->shadowRotX = spD4;
player->unk_24C = spCC; player->shadowRotZ = spCC;
} }
void func_tank_8004641C(Player* player, s32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7) { void func_tank_8004641C(Player* player, s32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7) {
@ -845,7 +845,7 @@ void func_tank_8004641C(Player* player, s32 arg1, f32 arg2, f32 arg3, f32 arg4,
if (D_MA_801BE250[27] < arg3 + sp58.y) { if (D_MA_801BE250[27] < arg3 + sp58.y) {
D_MA_801BE250[27] = arg3 + sp58.y; D_MA_801BE250[27] = arg3 + sp58.y;
if (arg1 == OBJ_SCENERY_67) { if (arg1 == OBJ_SCENERY_67) {
player->barrelRoll = 0; player->rollState = 0;
D_800C9F04 = 1; D_800C9F04 = 1;
} }
} }
@ -853,8 +853,8 @@ void func_tank_8004641C(Player* player, s32 arg1, f32 arg2, f32 arg3, f32 arg4,
D_MA_801BE250[29] = sp58.z; D_MA_801BE250[29] = sp58.z;
} else if ((arg1 == OBJ_SCENERY_67) && (D_MA_801BE250[27] == 0.0f) && } else if ((arg1 == OBJ_SCENERY_67) && (D_MA_801BE250[27] == 0.0f) &&
Play_CheckPolyCollision(arg1, arg2 + 20.0f, arg3, arg4, sp84, sp80, sp7C, &sp58, &sp4C)) { Play_CheckPolyCollision(arg1, arg2 + 20.0f, arg3, arg4, sp84, sp80, sp7C, &sp58, &sp4C)) {
player->barrelRoll = 9; player->rollState = 9;
player->timer_1E8 = 15; player->rollTimer = 15;
if ((arg6 > 90.0f) && (arg6 < 270.0f)) { if ((arg6 > 90.0f) && (arg6 < 270.0f)) {
player->rollRate = player->baseRollRate = 20; player->rollRate = player->baseRollRate = 20;
} else { } else {
@ -866,8 +866,8 @@ void func_tank_8004641C(Player* player, s32 arg1, f32 arg2, f32 arg3, f32 arg4,
D_800C9F10 = arg3 + sp58.y; D_800C9F10 = arg3 + sp58.y;
player->groundPos.x = player->pos.x; player->groundPos.x = player->pos.x;
player->groundPos.y = D_800C9F10 - 2.0f; player->groundPos.y = D_800C9F10 - 2.0f;
player->unk_248 = sp58.x; player->shadowRotX = sp58.x;
player->unk_24C = sp58.z; player->shadowRotZ = sp58.z;
} }
} }
@ -956,8 +956,8 @@ void func_tank_80046704(Player* player) {
if (!(((player->pos.x - 210.0f) <= scenery->obj.pos.x) && if (!(((player->pos.x - 210.0f) <= scenery->obj.pos.x) &&
(scenery->obj.pos.x <= (player->pos.x + 210.0f))) && (scenery->obj.pos.x <= (player->pos.x + 210.0f))) &&
(D_MA_801BE250[27] == 0.f) && (player->vel.y < 0.f)) { (D_MA_801BE250[27] == 0.f) && (player->vel.y < 0.f)) {
player->barrelRoll = 9; player->rollState = 9;
player->timer_1E8 = 15; player->rollTimer = 15;
if ((player->pos.x - 200.0f) <= scenery->obj.pos.x) { if ((player->pos.x - 200.0f) <= scenery->obj.pos.x) {
player->rollRate = player->baseRollRate = 20; player->rollRate = player->baseRollRate = 20;
} else { } else {
@ -966,7 +966,7 @@ void func_tank_80046704(Player* player) {
} else { } else {
D_800C9F04 = 1; D_800C9F04 = 1;
D_MA_801BE250[27] = scenery->obj.pos.y + 206.0f; D_MA_801BE250[27] = scenery->obj.pos.y + 206.0f;
player->barrelRoll = 0; player->rollState = 0;
} }
} }
if (((player->pos.x - 220.0f) <= scenery->obj.pos.x) && if (((player->pos.x - 220.0f) <= scenery->obj.pos.x) &&
@ -1106,7 +1106,7 @@ s32 func_tank_80046E40(Player* player, f32* hitboxData, s32* index, f32 xPos, f3
void Tank_UpdateOnRails(Player* player) { void Tank_UpdateOnRails(Player* player) {
s32 pad; s32 pad;
player->unk_204 = 1; player->wingPosition = 1;
func_tank_80045130(player); func_tank_80045130(player);
D_800C9F14 = 0; D_800C9F14 = 0;
func_tank_80045678(player); func_tank_80045678(player);
@ -1150,8 +1150,8 @@ void Tank_UpdateOnRails(Player* player) {
player->groundPos.x = player->pos.x; player->groundPos.x = player->pos.x;
player->groundPos.z = player->trueZpos + -10.0f; player->groundPos.z = player->trueZpos + -10.0f;
player->groundPos.y = gGroundHeight - 4.0f; player->groundPos.y = gGroundHeight - 4.0f;
player->unk_248 = 0.0f; player->shadowRotX = 0.0f;
player->unk_24C = 0.0f; player->shadowRotZ = 0.0f;
player->groundRotY = 0.0f; player->groundRotY = 0.0f;
func_tank_800481F4(player); func_tank_800481F4(player);
} }
@ -1271,9 +1271,9 @@ void func_tank_80047E7C(Player* player, f32 arg1, f32 arg2) {
Math_SmoothStepToF(&player->zRotBank, 30.0f, 0.5f, 20.0f, 0); Math_SmoothStepToF(&player->zRotBank, 30.0f, 0.5f, 20.0f, 0);
} else { } else {
Math_SmoothStepToF(&player->pos.y, arg2, 0.5f, 30.0f, 0); Math_SmoothStepToF(&player->pos.y, arg2, 0.5f, 30.0f, 0);
if (player->barrelRoll == 0) { if (player->rollState == 0) {
player->barrelRoll = 9; player->rollState = 9;
player->timer_1E8 = 15; player->rollTimer = 15;
player->rollRate = player->baseRollRate = -20; player->rollRate = player->baseRollRate = -20;
} }
} }
@ -1282,9 +1282,9 @@ void func_tank_80047E7C(Player* player, f32 arg1, f32 arg2) {
Math_SmoothStepToF(&player->zRotBank, -30.0f, 0.5f, 20.0f, 0); Math_SmoothStepToF(&player->zRotBank, -30.0f, 0.5f, 20.0f, 0);
} else { } else {
Math_SmoothStepToF(&player->pos.y, arg2, 0.5f, 30.0f, 0); Math_SmoothStepToF(&player->pos.y, arg2, 0.5f, 30.0f, 0);
if (player->barrelRoll == 0) { if (player->rollState == 0) {
player->barrelRoll = 9; player->rollState = 9;
player->timer_1E8 = 15; player->rollTimer = 15;
player->rollRate = player->baseRollRate = 20; player->rollRate = player->baseRollRate = 20;
} }
} }
@ -1340,7 +1340,7 @@ void func_tank_800481F4(Player* player) {
Player_UpdateHitbox(player); Player_UpdateHitbox(player);
func_tank_800444BC(player); func_tank_800444BC(player);
if (player->timer_498 == 0) { if (player->mercyTimer == 0) {
for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) { for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) {
if ((scenery->obj.status == OBJ_ACTIVE) && (scenery->obj.id != OBJ_SCENERY_58) && if ((scenery->obj.status == OBJ_ACTIVE) && (scenery->obj.id != OBJ_SCENERY_58) &&
(scenery->obj.id != OBJ_SCENERY_105) && (scenery->obj.id != OBJ_SCENERY_59) && (scenery->obj.id != OBJ_SCENERY_105) && (scenery->obj.id != OBJ_SCENERY_59) &&
@ -1411,13 +1411,13 @@ void func_tank_800481F4(Player* player) {
0.0f, 0.0f) != 0) { 0.0f, 0.0f) != 0) {
if (player->pos.x < actor->obj.pos.x) { if (player->pos.x < actor->obj.pos.x) {
player->knockback.x = (actor->vel.z > 5.0f) ? -5.0f : -1.5f; player->knockback.x = (actor->vel.z > 5.0f) ? -5.0f : -1.5f;
player->barrelRoll = 8; player->rollState = 8;
player->timer_1E8 = 15; player->rollTimer = 15;
player->rollRate = player->baseRollRate = 20; player->rollRate = player->baseRollRate = 20;
} else { } else {
player->knockback.x = (actor->vel.z > 5.0f) ? 5.0f : 1.5f; player->knockback.x = (actor->vel.z > 5.0f) ? 5.0f : 1.5f;
player->barrelRoll = 8; player->rollState = 8;
player->timer_1E8 = 15; player->rollTimer = 15;
player->rollRate = player->baseRollRate = -20; player->rollRate = player->baseRollRate = -20;
} }
Math_SmoothStepToF(&player->baseSpeed, 15.0f, 0.3f, 3.5f, 0.001f); Math_SmoothStepToF(&player->baseSpeed, 15.0f, 0.3f, 3.5f, 0.001f);
@ -1427,7 +1427,7 @@ void func_tank_800481F4(Player* player) {
player->pos.x = player->basePos.x; player->pos.x = player->basePos.x;
actor->dmgType = DMG_COLLISION; actor->dmgType = DMG_COLLISION;
Player_ApplyDamage(player, 0, 5); Player_ApplyDamage(player, 0, 5);
player->timer_498 = 1; player->mercyTimer = 1;
} }
} else if ((OBJ_ACTOR_205 <= actor->obj.id) && (actor->obj.id <= OBJ_ACTOR_213)) { } else if ((OBJ_ACTOR_205 <= actor->obj.id) && (actor->obj.id <= OBJ_ACTOR_213)) {
if (func_tank_80046E40(player, actor->info.hitbox, &sp98, actor->fwork[25] + actor->obj.pos.x, if (func_tank_80046E40(player, actor->info.hitbox, &sp98, actor->fwork[25] + actor->obj.pos.x,
@ -1438,13 +1438,13 @@ void func_tank_800481F4(Player* player) {
Math_SmoothStepToF(&player->camDist, 0, 0.3f, 3.5f, 0.001f); Math_SmoothStepToF(&player->camDist, 0, 0.3f, 3.5f, 0.001f);
if (player->pos.x < (actor->fwork[23] + actor->obj.pos.x)) { if (player->pos.x < (actor->fwork[23] + actor->obj.pos.x)) {
player->knockback.x = (actor->vel.z > 5.0f) ? -5.0f : -1.5f; player->knockback.x = (actor->vel.z > 5.0f) ? -5.0f : -1.5f;
player->barrelRoll = 8; player->rollState = 8;
player->timer_1E8 = 15; player->rollTimer = 15;
player->rollRate = player->baseRollRate = 20; player->rollRate = player->baseRollRate = 20;
} else { } else {
player->knockback.x = (actor->vel.z > 5.0f) ? 5.0f : 1.5f; player->knockback.x = (actor->vel.z > 5.0f) ? 5.0f : 1.5f;
player->barrelRoll = 8; player->rollState = 8;
player->timer_1E8 = 15; player->rollTimer = 15;
player->rollRate = player->baseRollRate = -20; player->rollRate = player->baseRollRate = -20;
} }
player->vel.x = 0.0f; player->vel.x = 0.0f;
@ -1489,7 +1489,7 @@ void func_tank_800481F4(Player* player) {
(sprite->obj.id == OBJ_SPRITE_CO_TREE)) { (sprite->obj.id == OBJ_SPRITE_CO_TREE)) {
sprite->destroy = 1; sprite->destroy = 1;
player->hitTimer = 6; player->hitTimer = 6;
player->unk_21C = 0; player->hitDirection = 0;
} else if (sprite->obj.id == OBJ_SPRITE_TI_CACTUS) { } else if (sprite->obj.id == OBJ_SPRITE_TI_CACTUS) {
sprite->destroy = 1; sprite->destroy = 1;
} else { } else {

File diff suppressed because it is too large Load Diff

View File

@ -24,7 +24,8 @@ static void CalculateFrameTimeFromOSTime(OSTime diff) {
static void Play_RenderFps(void) { static void Play_RenderFps(void) {
// Toggle rendering framerate with the L button. // Toggle rendering framerate with the L button.
if (gControllerPress[0].button & L_TRIG) { if ((gControllerPress[gMainController].button & L_TRIG) &&
!(~gControllerHold[gMainController].button & (Z_TRIG | R_TRIG))) {
gRenderFPS ^= 1; gRenderFPS ^= 1;
} }
if (gRenderFPS) { if (gRenderFPS) {

View File

@ -28,21 +28,23 @@ void Map_LevelSelect(void) {
"ZONESS", "CORNERIA", "TITANIA", "AQUAS", "FORTUNA", "VENOM 1", "SOLAR", "VENOM 2", "ZONESS", "CORNERIA", "TITANIA", "AQUAS", "FORTUNA", "VENOM 1", "SOLAR", "VENOM 2",
}; };
static s32 startOption = 0; static s32 startOption = 0;
// static f32 zStart = 0.0f; // static f32 zStart = 0.0f;
// f32 zInc; // f32 zInc;
s32 nextPlanetId; s32 nextPlanetId;
OSContPad* contPress = &gControllerPress[gMainController];
if (gControllerPress[0].button & L_JPAD) { if (contPress->button & L_JPAD) {
mission--; mission--;
if (mission < 0) { if (mission < 0) {
mission = 6; mission = 6;
} }
} else if (gControllerPress[0].button & R_JPAD) { } else if (contPress->button & R_JPAD) {
mission++; mission++;
if (mission > 6) { if (mission > 6) {
mission = 0; mission = 0;
} }
} else if ((gControllerPress[0].button & U_JPAD) && (mission != 0)) { } else if ((contPress->button & U_JPAD) && (mission != 0)) {
difficulty++; difficulty++;
if (difficulty > 2) { if (difficulty > 2) {
difficulty = 0; difficulty = 0;
@ -50,7 +52,7 @@ void Map_LevelSelect(void) {
if ((difficulty == 1) && ((mission == 1) || (mission == 5) || (mission == 6))) { if ((difficulty == 1) && ((mission == 1) || (mission == 5) || (mission == 6))) {
difficulty = 2; difficulty = 2;
} }
} else if ((gControllerPress[0].button & D_JPAD) && (mission != 0)) { } else if ((contPress->button & D_JPAD) && (mission != 0)) {
difficulty--; difficulty--;
if ((difficulty != 2) && ((mission == 1) || (mission == 5) || (mission == 6))) { if ((difficulty != 2) && ((mission == 1) || (mission == 5) || (mission == 6))) {
difficulty--; difficulty--;
@ -68,17 +70,17 @@ void Map_LevelSelect(void) {
Map_801A6368(); Map_801A6368();
Map_801A914C(); Map_801A914C();
} }
if (gControllerPress[0].button & L_TRIG) { if (contPress->button & L_TRIG) {
startOption ^= 1; startOption ^= 1;
} }
// if (gControllerPress[0].button & U_CBUTTONS) { // if (contPress->button & U_CBUTTONS) {
// zInc = 100.0f; // zInc = 100.0f;
// } else if (gControllerPress[0].button & R_CBUTTONS) { // } else if (contPress->button & R_CBUTTONS) {
// zInc = 1000.0f; // zInc = 1000.0f;
// } else if (gControllerPress[0].button & D_CBUTTONS) { // } else if (contPress->button & D_CBUTTONS) {
// zInc = -100.0f; // zInc = -100.0f;
// } else if (gControllerPress[0].button & L_CBUTTONS) { // } else if (contPress->button & L_CBUTTONS) {
// zInc = -1000.0f; // zInc = -1000.0f;
// } // }
// if (gControllerHold[0].button & R_TRIG) { // if (gControllerHold[0].button & R_TRIG) {

View File

@ -1,18 +1,15 @@
#include "object_ram.h" #include "object_ram.h"
static RamEntry oRamEntries[7] = { static RamEntry oRamEntries[7] = {
ORAM_ENTRY(PlayerShot, 15, obj.id, u8), ORAM_ENTRY(Player, 0, unk_20C, s32), ORAM_ENTRY(Player, 0, unk_19C, s32), ORAM_ENTRY(Player, 0, unk_1A0, s32),
ORAM_ENTRY(Player, 0, pos.y, f32), ORAM_ENTRY(Player, 0, dmgType, s32), ORAM_ENTRY(Player, 0, unk_2C0, f32), ORAM_ENTRY(Player, 0, xRot_0FC, f32),
ORAM_ENTRY(Player, 0, pos.z, f32), ORAM_ENTRY(Player, 0, zRot_0FC, f32),
ORAM_ENTRY(Actor, 0, obj.status, x32),
ORAM_OFF,
ORAM_OFF,
ORAM_OFF,
}; };
static s32 holdTimer = 0; static s32 holdTimer = 0;
static s32 selectNum = 0; static s32 selectNum = 0;
static RamModMode oRamActive = RAMMOD_OFF; static bool oRamActive = false;
static RamModMode oRamMode = RAMMOD_OFF;
static s32 editMode = EDM_TYPE; static s32 editMode = EDM_TYPE;
static s32 editing = false; static s32 editing = false;
static s32 editingValue = false; static s32 editingValue = false;
@ -662,6 +659,8 @@ void CheatRam_Update(void) {
} }
void RamMod_Update(void) { void RamMod_Update(void) {
static s32 toggle;
static s32 toggle2;
contPress = &gControllerPress[gMainController]; contPress = &gControllerPress[gMainController];
contHold = &gControllerHold[gMainController]; contHold = &gControllerHold[gMainController];
@ -677,12 +676,25 @@ void RamMod_Update(void) {
cheats[CHEAT_COMPLETE].hold = false; cheats[CHEAT_COMPLETE].hold = false;
} }
if ((gPlayState == PLAY_PAUSE) && (contPress->button & R_CBUTTONS)) { // if (!(~contHold->button & (R_CBUTTONS | Z_TRIG | R_TRIG))) {
oRamActive++; // if(!toggle) {
oRamActive = WRAP_MODE(oRamActive, RAMMOD_MAX); // oRamActive ^= 1;
// toggle = true;
// }
// } else {
// toggle = false;
// }
// if(!oRamActive) {
// return;
// }
if (!(~contHold->button & (Z_TRIG | R_TRIG)) && (contPress->button & R_CBUTTONS)) {
oRamMode++;
oRamMode = WRAP_MODE(oRamMode, RAMMOD_MAX);
} }
switch (oRamActive) { switch (oRamMode) {
case RAMMOD_OFF: case RAMMOD_OFF:
break; break;
case RAMMOD_CHEAT: case RAMMOD_CHEAT:

View File

@ -1,6 +1,7 @@
#include "global.h" #include "global.h"
#include "fox_map.h" #include "fox_map.h"
#include "fox_option.h" #include "fox_option.h"
#include "sf64audio_provisional.h"
extern s32 spectrumAnalyzerMode; extern s32 spectrumAnalyzerMode;
extern bool D_menu_801B9320; extern bool D_menu_801B9320;
@ -8,100 +9,175 @@ extern s32 D_menu_801B9244;
extern OptionId D_menu_801B9124; extern OptionId D_menu_801B9124;
extern s32 D_menu_801B912C; extern s32 D_menu_801B912C;
u32 prevSfx = 0; static s32 showJukebox = 0;
u32 sfx = 0x09000000; static u32 prevSfx = NA_SE_NONE;
s32 sfxId = 0; static u32 sfx = NA_SE_NONE;
s32 sfxBank = 0; static s32 sfxId = 0;
int holdTimer = 0; static u32 sfxBank = SFX_BANK_PLAYER;
static u32 sfxRange = 0;
static s32 sfxImport = 0;
static int holdTimer = 0;
static u8 sfxFlag = 0;
static u8 sfxFlags[] = { 0, 0, 0, 0, 0, 0, 0, 0 };
static char* flagNames[] = { "F18", "F19", "F20", "F21", "F22", "F23", "STT", "F25", "F26", "SFX" };
static u8 bankSizes[] = { 0x33, 0x85, 0x9C, 0x9C, 0x37 };
static u32 sfxEditMode = 9;
static u32 srcEditMode = 0;
static u32 editMode = 0;
static s32 srcVec[3] = { 0, 0, 0 };
static f32 sfxSource[3] = { 0.0f, 0.0f, 0.0f };
static OSContPad* contPress;
static OSContPad* contHold;
void decimalToHex(int num, char* hexString, size_t hexStringLength) { void Jukebox_SelectFlag(u8* flag) {
int i; if (contPress->button & (U_CBUTTONS | D_CBUTTONS | R_CBUTTONS | L_CBUTTONS)) {
// Define hexadecimal digits *flag ^= 1;
char hexDigits[] = "0123456789ABCDEF";
// Check for null pointer or insufficient buffer size
if (hexString == NULL || hexStringLength < 9) {
// You might need to adjust the buffer size based on the maximum expected length
return;
}
// Ensure the buffer is null-terminated
hexString[8] = '\0';
// Iterate through each hex digit
for (i = 7; i >= 0; --i) {
// Extract the 4 bits representing one hex digit
int hexValue = (num >> (i * 4)) & 0xF;
// Convert the 4-bit value to its corresponding hex character
hexString[7 - i] = hexDigits[hexValue];
} }
} }
void Option_ExpertSoundUpdate(void) { void Jukebox_SelectWrap(u32* option, s32 range) {
char hexString[9]; // Buffer to store the hexadecimal string if (contPress->button & (U_CBUTTONS | R_CBUTTONS)) {
(*option)++;
if ((gControllerPress[gMainController].button & R_TRIG) && (sfxBank < 4)) { } else if (contPress->button & (D_CBUTTONS | L_CBUTTONS)) {
sfxBank++; (*option)--;
} else if ((gControllerPress[gMainController].button & L_TRIG) && (sfxBank > 0)) { }
sfxBank--; *option = (*option + range) % range;
} }
sfx &= 0x0FFFFFFF;
sfx |= (sfxBank << 28);
if (gControllerHold[gMainController].button & (U_JPAD | D_JPAD)) { Jukebox_SelectClamp(s32* option, s32 range, s32 skip) {
if (contHold->button & (U_CBUTTONS | D_CBUTTONS)) {
holdTimer++; holdTimer++;
} else { } else {
holdTimer = 0; holdTimer = 0;
} }
if (((gControllerHold[gMainController].button & U_JPAD) && (holdTimer > 15)) || if (((contHold->button & U_CBUTTONS) && (holdTimer > 15)) || (contPress->button & U_CBUTTONS)) {
(gControllerPress[gMainController].button & U_JPAD)) { (*option)++;
sfxId++; } else if (((contHold->button & D_CBUTTONS) && (holdTimer > 15)) || (contPress->button & D_CBUTTONS)) {
} else if (((gControllerHold[gMainController].button & D_JPAD) && (holdTimer > 15)) || (*option)--;
(gControllerPress[gMainController].button & D_JPAD)) { } else if (contPress->button & L_CBUTTONS) {
sfxId--; *option -= skip;
} else if (gControllerPress[gMainController].button & L_JPAD) { } else if (contPress->button & R_CBUTTONS) {
sfxId -= 0x10; *option += skip;
} else if (gControllerPress[gMainController].button & R_JPAD) { }
sfxId += 0x10; if (*option < 0) {
*option = 0;
} else if (*option >= range) {
*option = range - 1;
}
} }
if (((sfxBank == 0) || (sfxBank == 4)) && (sfxId > 0x3F)) { void Jukebox_UpdateSource(void) {
sfxId = 0x3F; if (contPress->button & L_JPAD) {
} else if (((sfxBank == 2) || (sfxBank == 3)) && (sfxId > 0xA7)) { srcEditMode--;
sfxId = 0xA7; } else if (contPress->button & R_JPAD) {
} else if ((sfxBank == 1) && (sfxId > 0x8F)) { srcEditMode++;
sfxId = 0x8F; }
} else if (sfxId < 0) { srcEditMode = (srcEditMode + 3) % 3;
sfxId = 0;
if (contHold->button & (U_CBUTTONS | D_CBUTTONS | L_CBUTTONS | R_CBUTTONS)) {
holdTimer++;
} else {
holdTimer = 0;
}
if (((contHold->button & U_CBUTTONS) && (holdTimer > 15)) || (contPress->button & U_CBUTTONS)) {
sfxSource[srcEditMode] += 100.0f;
} else if (((contHold->button & D_CBUTTONS) && (holdTimer > 15)) || (contPress->button & D_CBUTTONS)) {
sfxSource[srcEditMode] -= 100.0f;
} else if (((contHold->button & R_CBUTTONS) && (holdTimer > 15)) || (contPress->button & R_CBUTTONS)) {
sfxSource[srcEditMode] += 10.0f;
} else if (((contHold->button & L_CBUTTONS) && (holdTimer > 15)) || (contPress->button & L_CBUTTONS)) {
sfxSource[srcEditMode] -= 10.0f;
}
}
void Jukebox_UpdateSfx(void) {
s32 i;
u16 flags = 0;
if (contPress->button & L_JPAD) {
sfxEditMode--;
} else if (contPress->button & R_JPAD) {
sfxEditMode++;
}
sfxEditMode = (sfxEditMode + 13) % 13;
switch (sfxEditMode) {
case 9:
Jukebox_SelectWrap(&sfxBank, 5);
break;
case 10:
Jukebox_SelectClamp(&sfxId, bankSizes[sfxBank], 0x10);
break;
case 11:
Jukebox_SelectFlag(&sfxFlag);
break;
case 12:
Jukebox_SelectWrap(&sfxRange, 4);
break;
case 8:
Jukebox_SelectClamp(&sfxImport, 0x100, 0x10);
break;
default:
if ((sfxEditMode >= 0) && (sfxEditMode < 8)) {
Jukebox_SelectFlag(&sfxFlags[sfxEditMode]);
}
break;
}
for (i = 0; i < 8; i++) {
flags |= sfxFlags[i] << (i + (i > 5));
}
sfx = SFX_PACK(sfxBank, sfxId, sfxRange, sfxImport, (sfxFlag << 27) | (flags << 18));
}
s32 sfxModeX[] = { 95, 104, 113, 122, 131, 140, 149, 158, 180, 0, 22, 43, 60 };
s32 srcModeX[] = { 45, 135, 225 };
void Jukebox_Update(void) {
s32 i;
contPress = &gControllerPress[gMainController];
contHold = &gControllerHold[gMainController];
if (contPress->button & U_JPAD) {
editMode--;
} else if (contPress->button & D_JPAD) {
editMode++;
}
editMode %= 2;
switch (editMode) {
case 0:
Jukebox_UpdateSfx();
break;
case 1:
Jukebox_UpdateSource();
break;
} }
sfx &= 0xFFFFFF00;
sfx |= sfxId & 0xFF;
if (prevSfx != sfx) { if (prevSfx != sfx) {
AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4);
prevSfx = sfx; prevSfx = sfx;
} }
decimalToHex(sfx, hexString, sizeof(hexString)); if (contPress->button & A_BUTTON) {
if (gControllerPress[gMainController].button & A_BUTTON) {
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1);
AUDIO_PLAY_SFX(sfx, gDefaultSfxSource, 4); AUDIO_PLAY_SFX(sfx, sfxSource, 4);
D_menu_801B9320 = true; D_menu_801B9320 = true;
} }
if (gControllerPress[gMainController].button & B_BUTTON) { if (contPress->button & B_BUTTON) {
if (!D_menu_801B9320) { if (!D_menu_801B9320) {
AUDIO_PLAY_SFX(NA_SE_ARWING_CANCEL, gDefaultSfxSource, 4);
AUDIO_PLAY_BGM(NA_BGM_SELECT); AUDIO_PLAY_BGM(NA_BGM_SELECT);
gDrawMode = DRAW_NONE; gDrawMode = DRAW_NONE;
D_menu_801B9124 = 1000; D_menu_801B9124 = 1000;
D_menu_801B912C = 0; D_menu_801B912C = 0;
D_menu_801B9244 = 1; D_menu_801B9244 = 1;
return;
} else { } else {
AUDIO_PLAY_SFX(NA_SE_CANCEL, gDefaultSfxSource, 4); AUDIO_PLAY_SFX(NA_SE_CANCEL, gDefaultSfxSource, 4);
Audio_KillSfxBySource(gDefaultSfxSource); Audio_KillSfxBySource(sfxSource);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1);
D_menu_801B9320 = false; D_menu_801B9320 = false;
@ -109,7 +185,7 @@ void Option_ExpertSoundUpdate(void) {
} }
// Spectrum Analyzer mode selector // Spectrum Analyzer mode selector
if (gControllerPress[gMainController].button & R_CBUTTONS) { if (contPress->button & Z_TRIG) {
spectrumAnalyzerMode++; spectrumAnalyzerMode++;
if (spectrumAnalyzerMode > 2) { if (spectrumAnalyzerMode > 2) {
spectrumAnalyzerMode = 0; spectrumAnalyzerMode = 0;
@ -121,6 +197,28 @@ void Option_ExpertSoundUpdate(void) {
RCP_SetupDL(&gMasterDisp, SETUPDL_83); RCP_SetupDL(&gMasterDisp, SETUPDL_83);
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255);
Graphics_DisplaySmallText(20, 50, 1.0f, 1.0f, "SFX ID:"); Graphics_Printf("SFX ID: %08X", sfx);
Graphics_DisplaySmallText(80, 50, 1.0f, 1.0f, hexString); Graphics_DisplaySmallText(20, 50, 1.0f, 1.0f, D_801619A0);
Graphics_DisplaySmallText(20, 80, 1.0f, 1.0f, "B ID X R S FLAG IMP");
Graphics_Printf("%d %02X %d %d %d %d%d%d%d%d%d%d%d %02X", sfxBank, sfxId, sfxFlag, sfxRange, 1, sfxFlags[0],
sfxFlags[1], sfxFlags[2], sfxFlags[3], sfxFlags[4], sfxFlags[5], sfxFlags[6], sfxFlags[7],
sfxImport);
Graphics_DisplaySmallText(20, 70, 1.0f, 1.0f, D_801619A0);
// Graphics_DisplaySmallText(80, 50, 1.0f, 1.0f, hexString);
for (i = 0; i < 3; i++) {
Graphics_Printf("%5.0f", sfxSource[i]);
Graphics_DisplaySmallText(20 + 90 * i, 100, 1.0f, 1.0f, D_801619A0);
}
Graphics_DisplaySmallText(45, 110, 1.0f, 1.0f, "X");
Graphics_DisplaySmallText(135, 110, 1.0f, 1.0f, "Y");
Graphics_DisplaySmallText(225, 110, 1.0f, 1.0f, "Z");
switch (editMode) {
case 0:
Graphics_DisplaySmallText(20 + sfxModeX[sfxEditMode], 60, 1.0f, 1.0f, "V");
break;
case 1:
Graphics_DisplaySmallText(45 + 90 * srcEditMode, 90, 1.0f, 1.0f, "V");
break;
}
} }

View File

@ -1,227 +0,0 @@
#include "global.h"
#include "fox_map.h"
#include "fox_option.h"
#include "sf64audio_provisional.h"
extern s32 spectrumAnalyzerMode;
extern bool D_menu_801B9320;
extern s32 D_menu_801B9244;
extern OptionId D_menu_801B9124;
extern s32 D_menu_801B912C;
static s32 showJukebox = 0;
static u32 prevSfx = NA_SE_NONE;
static u32 sfx = NA_SE_NONE;
static s32 sfxId = 0;
static u32 sfxBank = SFX_BANK_PLAYER;
static u32 sfxRange = 0;
static s32 sfxImport = 0;
static int holdTimer = 0;
static u8 sfxFlag = 0;
static u8 sfxFlags[] = { 0, 0, 0, 0, 0, 0, 0, 0 };
static char* flagNames[] = { "F18", "F19", "F20", "F21", "F22", "F23", "STT", "F25", "F26", "SFX" };
static u8 bankSizes[] = { 0x33, 0x85, 0x9C, 0x9C, 0x37 };
static u32 sfxEditMode = 9;
static u32 srcEditMode = 0;
static u32 editMode = 0;
static s32 srcVec[3] = { 0, 0, 0 };
static f32 sfxSource[3] = { 0.0f, 0.0f, 0.0f };
void Jukebox_SelectFlag(u8* flag) {
if (gControllerPress[gMainController].button & (U_CBUTTONS | D_CBUTTONS | R_CBUTTONS | L_CBUTTONS)) {
*flag ^= 1;
}
}
void Jukebox_SelectWrap(u32* option, s32 range) {
if (gControllerPress[gMainController].button & (U_CBUTTONS | R_CBUTTONS)) {
(*option)++;
} else if (gControllerPress[gMainController].button & (D_CBUTTONS | L_CBUTTONS)) {
(*option)--;
}
*option = (*option + range) % range;
}
Jukebox_SelectClamp(s32* option, s32 range, s32 skip) {
OSContPad* contPress = &gControllerPress[gMainController];
OSContPad* contHold = &gControllerHold[gMainController];
if (contHold->button & (U_CBUTTONS | D_CBUTTONS)) {
holdTimer++;
} else {
holdTimer = 0;
}
if (((contHold->button & U_CBUTTONS) && (holdTimer > 15)) || (contPress->button & U_CBUTTONS)) {
(*option)++;
} else if (((contHold->button & D_CBUTTONS) && (holdTimer > 15)) || (contPress->button & D_CBUTTONS)) {
(*option)--;
} else if (contPress->button & L_CBUTTONS) {
*option -= skip;
} else if (contPress->button & R_CBUTTONS) {
*option += skip;
}
if (*option < 0) {
*option = 0;
} else if (*option >= range) {
*option = range - 1;
}
}
void Jukebox_UpdateSource(void) {
OSContPad* contPress = &gControllerPress[gMainController];
OSContPad* contHold = &gControllerHold[gMainController];
if (contPress->button & L_JPAD) {
srcEditMode--;
} else if (contPress->button & R_JPAD) {
srcEditMode++;
}
srcEditMode = (srcEditMode + 3) % 3;
if (contHold->button & (U_CBUTTONS | D_CBUTTONS | L_CBUTTONS | R_CBUTTONS)) {
holdTimer++;
} else {
holdTimer = 0;
}
if (((contHold->button & U_CBUTTONS) && (holdTimer > 15)) || (contPress->button & U_CBUTTONS)) {
sfxSource[srcEditMode] += 100.0f;
} else if (((contHold->button & D_CBUTTONS) && (holdTimer > 15)) || (contPress->button & D_CBUTTONS)) {
sfxSource[srcEditMode] -= 100.0f;
} else if (((contHold->button & R_CBUTTONS) && (holdTimer > 15)) || (contPress->button & R_CBUTTONS)) {
sfxSource[srcEditMode] += 10.0f;
} else if (((contHold->button & L_CBUTTONS) && (holdTimer > 15)) || (contPress->button & L_CBUTTONS)) {
sfxSource[srcEditMode] -= 10.0f;
}
}
void Jukebox_UpdateSfx(void) {
s32 i;
u16 flags = 0;
if (gControllerPress[gMainController].button & L_JPAD) {
sfxEditMode--;
} else if (gControllerPress[gMainController].button & R_JPAD) {
sfxEditMode++;
}
sfxEditMode = (sfxEditMode + 13) % 13;
switch (sfxEditMode) {
case 9:
Jukebox_SelectWrap(&sfxBank, 5);
break;
case 10:
Jukebox_SelectClamp(&sfxId, bankSizes[sfxBank], 0x10);
break;
case 11:
Jukebox_SelectFlag(&sfxFlag);
break;
case 12:
Jukebox_SelectWrap(&sfxRange, 4);
break;
case 8:
Jukebox_SelectClamp(&sfxImport, 0x100, 0x10);
break;
default:
if ((sfxEditMode >= 0) && (sfxEditMode < 8)) {
Jukebox_SelectFlag(&sfxFlags[sfxEditMode]);
}
break;
}
for (i = 0; i < 8; i++) {
flags |= sfxFlags[i] << (i + (i > 5));
}
sfx = SFX_PACK(sfxBank, sfxId, sfxRange, sfxImport, (sfxFlag << 27) | (flags << 18));
}
s32 sfxModeX[] = { 95, 104, 113, 122, 131, 140, 149, 158, 180, 0, 22, 43, 60 };
s32 srcModeX[] = { 45, 135, 225 };
void Jukebox_Update(void) {
s32 i;
OSContPad* contPress = &gControllerPress[gMainController];
OSContPad* contHold = &gControllerHold[gMainController];
if (contPress->button & U_JPAD) {
editMode--;
} else if (contPress->button & D_JPAD) {
editMode++;
}
editMode %= 2;
switch (editMode) {
case 0:
Jukebox_UpdateSfx();
break;
case 1:
Jukebox_UpdateSource();
break;
}
if (prevSfx != sfx) {
AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4);
prevSfx = sfx;
}
if (contPress->button & A_BUTTON) {
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1);
AUDIO_PLAY_SFX(sfx, sfxSource, 4);
D_menu_801B9320 = true;
}
if (contPress->button & B_BUTTON) {
if (!D_menu_801B9320) {
AUDIO_PLAY_SFX(NA_SE_ARWING_CANCEL, gDefaultSfxSource, 4);
AUDIO_PLAY_BGM(NA_BGM_SELECT);
gDrawMode = DRAW_NONE;
D_menu_801B9124 = 1000;
D_menu_801B912C = 0;
D_menu_801B9244 = 1;
return;
} else {
AUDIO_PLAY_SFX(NA_SE_CANCEL, gDefaultSfxSource, 4);
Audio_KillSfxBySource(sfxSource);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1);
D_menu_801B9320 = false;
}
}
// Spectrum Analyzer mode selector
if (contPress->button & Z_TRIG) {
spectrumAnalyzerMode++;
if (spectrumAnalyzerMode > 2) {
spectrumAnalyzerMode = 0;
}
}
/* Draw */
RCP_SetupDL(&gMasterDisp, SETUPDL_83);
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255);
Graphics_Printf("SFX ID: %08X", sfx);
Graphics_DisplaySmallText(20, 50, 1.0f, 1.0f, D_801619A0);
Graphics_DisplaySmallText(20, 80, 1.0f, 1.0f, "B ID X R S FLAG IMP");
Graphics_Printf("%d %02X %d %d %d %d%d%d%d%d%d%d%d %02X", sfxBank, sfxId, sfxFlag, sfxRange, 1, sfxFlags[0],
sfxFlags[1], sfxFlags[2], sfxFlags[3], sfxFlags[4], sfxFlags[5], sfxFlags[6], sfxFlags[7],
sfxImport);
Graphics_DisplaySmallText(20, 70, 1.0f, 1.0f, D_801619A0);
// Graphics_DisplaySmallText(80, 50, 1.0f, 1.0f, hexString);
for (i = 0; i < 3; i++) {
Graphics_Printf("%5.0f", sfxSource[i]);
Graphics_DisplaySmallText(20 + 90 * i, 100, 1.0f, 1.0f, D_801619A0);
}
Graphics_DisplaySmallText(45, 110, 1.0f, 1.0f, "X");
Graphics_DisplaySmallText(135, 110, 1.0f, 1.0f, "Y");
Graphics_DisplaySmallText(225, 110, 1.0f, 1.0f, "Z");
switch (editMode) {
case 0:
Graphics_DisplaySmallText(20 + sfxModeX[sfxEditMode], 60, 1.0f, 1.0f, "V");
break;
case 1:
Graphics_DisplaySmallText(45 + 90 * srcEditMode, 90, 1.0f, 1.0f, "V");
break;
}
}

View File

@ -1076,7 +1076,7 @@ void Ending_801926D4(void) {
if ((0 <= D_ending_80192E70) && (D_ending_80192E70 < 100)) { if ((0 <= D_ending_80192E70) && (D_ending_80192E70 < 100)) {
D_ending_80192E70 = 100; D_ending_80192E70 = 100;
if (D_ctx_80177824 == 0) { if (!gClearPlayerInfo) {
D_ending_80198590 = gPlayer[0].wings; D_ending_80198590 = gPlayer[0].wings;
} else { } else {
D_ending_80198590.rightState = D_ending_80198590.leftState = WINGSTATE_INTACT; D_ending_80198590.rightState = D_ending_80198590.leftState = WINGSTATE_INTACT;

View File

@ -2989,7 +2989,7 @@ void Corneria_LevelStart(Player* player) {
} }
if (player->csTimer < 150) { if (player->csTimer < 150) {
player->unk_204 = 0; player->wingPosition = 0;
} }
if ((player->csTimer < 120) && ((player->csTimer % 16) == 0)) { if ((player->csTimer < 120) && ((player->csTimer % 16) == 0)) {

View File

@ -494,124 +494,6 @@ void Venom1_80192AA4(Actor* actor) {
} }
} }
Gfx* D_VE1_8019A008[17] = {
D_VE1_90150A0, D_VE1_9015BB0, D_VE1_9015900, D_VE1_9000000, D_VE1_9022A20, D_VE1_9021630,
D_VE1_9015480, D_VE1_90007F0, D_VE1_9014DF0, D_VE1_9022D80, D_VE1_901E350, D_VE1_901F990,
D_VE1_901F6D0, D_VE1_9021900, D_VE1_901FC40, D_VE1_9021B80, D_VE1_9013880,
};
s16 D_i1_8019A04C[3][2] = { { -2500, 300 }, { -1000, 0 }, { -5000, 0 } };
UnkStruct_i1_8019A058 D_i1_8019A058[33] = {
{ { 56.0f, 35.0f, 5.0f }, 70.0f }, { { 64.0f, -86.0f, 5.0f }, 60.0f }, { { 54.0f, 0.0f, 2.0f }, 50.0f },
{ { 54.0f, 4.0f, -2.0f }, 50.0f }, { { 0.0f, 0.0f, 0.0f }, 0.0f }, { { 56.0f, 35.0f, -5.0f }, 70.0f },
{ { 64.0f, -86.0f, -5.0f }, 60.0f }, { { 54.0f, 0.0f, -2.0f }, 50.0f }, { { 54.0f, 0.0f, 2.0f }, 50.0f },
{ { 0.0f, 0.0f, 0.0f }, 0.0f }, { { 24.0f, 18.0f, 4.0f }, 50.0f }, { { 126.0f, -8.0f, 7.0f }, 80.0f },
{ { 23.0f, 10.0f, 0.0f }, 40.0f }, { { 101.0f, 12.0f, 2.0f }, 50.0f }, { { 56.0f, 0.0f, -3.0f }, 50.0f },
{ { 0.0f, 0.0f, 0.0f }, 0.0f }, { { 24.0f, 18.0f, -4.0f }, 50.0f }, { { 126.0f, -8.0f, -7.0f }, 80.0f },
{ { 23.0f, 10.0f, 0.0f }, 40.0f }, { { 101.0f, 12.0f, -2.0f }, 50.0f }, { { 56.0f, 0.0f, 3.0f }, 50.0f },
{ { 0.0f, 0.0f, 0.0f }, 0.0f }, { { 0.0f, 0.0f, 0.0f }, 0.0f }, { { 74.0f, -3.0f, -6.0f }, 60.0f },
{ { 0.0f, 0.0f, 0.0f }, 0.0f }, { { 74.0f, -3.0f, 6.0f }, 60.0f }, { { 44.0f, 0.0f, 0.0f }, 70.0f },
{ { 108.0f, 0.0f, 0.0f }, 160.0f }, { { 0.0f, 0.0f, 0.0f }, 0.0f }, { { 134.0f, 70.0f, 84.0f }, 70.0f },
{ { 134.0f, -70.0f, 84.0f }, 70.0f }, { { 122.0f, 81.0f, -73.0f }, 80.0f }, { { 122.0f, -81.0f, -73.0f }, 80.0f },
};
UnkStruct_i1_8019A058 D_i1_8019A268[33] = {
{ { 54.0f, -83.0f, 9.0f }, 50.0f }, { { 46.0f, 34.0f, 9.0f }, 60.0f }, { { 48.0f, 0.0f, 9.0f }, 50.0f },
{ { 3.0f, 0.0f, 9.0f }, 30.0f }, { { 70.0f, 0.0f, 6.0f }, 30.0f }, { { 54.0f, -83.0f, -8.0f }, 50.0f },
{ { 46.0f, 34.0f, -8.0f }, 60.0f }, { { 48.0f, 0.0f, -8.0f }, 50.0f }, { { 3.0f, 0.0f, -8.0f }, 30.0f },
{ { 70.0f, 0.0f, -6.0f }, 30.0f }, { { 48.0f, 7.0f, -6.0f }, 50.0f }, { { 156.0f, -3.0f, -6.0f }, 70.0f },
{ { 27.0f, 12.0f, -6.0f }, 40.0f }, { { 100.0f, 18.0f, -6.0f }, 40.0f }, { { 0.0f, 0.0f, -6.0f }, 40.0f },
{ { 80.0f, 2.0f, -6.0f }, 40.0f }, { { 48.0f, 7.0f, 6.0f }, 50.0f }, { { 156.0f, -3.0f, 6.0f }, 70.0f },
{ { 27.0f, 12.0f, 6.0f }, 40.0f }, { { 100.0f, 18.0f, 6.0f }, 50.0f }, { { 0.0f, 0.0f, 6.0f }, 40.0f },
{ { 80.0f, 2.0f, 6.0f }, 40.0f }, { { -4.0f, 6.0f, -6.0f }, 50.0f }, { { 89.0f, -3.0f, -6.0f }, 50.0f },
{ { -4.0f, 6.0f, 6.0f }, 50.0f }, { { 89.0f, -3.0f, 6.0f }, 50.0f }, { { 0.0f, 0.0f, 0.0f }, 50.0f },
{ { 166.0f, 0.0f, 0.0f }, 110.0f }, { { 5.0f, 0.0f, 0.0f }, 60.0f }, { { 115.0f, 0.0f, 0.0f }, 90.0f },
{ { 0.0f, 0.0f, 0.0f }, 0.0f }, { { 0.0f, 0.0f, 0.0f }, 0.0f }, { { 0.0f, 0.0f, 0.0f }, 0.0f },
};
s16 D_i1_8019A478[17][4] = {
{ 1, 0, 2, 0 }, { 2, 2, 1, 0 }, { 3, 3, 2, 0 }, { 4, 5, 2, 0 }, { 5, 7, 1, 0 }, { 6, 8, 2, 0 },
{ 7, 10, 2, 0 }, { 8, 12, 2, 0 }, { 9, 14, 2, 0 }, { 10, 16, 2, 0 }, { 11, 18, 2, 0 }, { 12, 20, 2, 0 },
{ 16, 22, 2, 0 }, { 17, 24, 2, 0 }, { 20, 26, 1, 0 }, { 21, 27, 2, 0 }, { 25, 29, 4, 0 },
};
s16 D_i1_8019A500[33] = {
0, 0, 1, 2, 2, 3, 3, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 15, 15, 16, 16, 16, 16,
};
Vec3f D_i1_8019A544[43] = {
{ 66.0f, -84.0f, 11.0f }, { 64.0f, -10.0f, -11.0f }, { 69.0f, 54.0f, 11.0f }, { 20.0f, 0.0f, -2.0f },
{ 85.0f, 0.0f, 3.0f }, { 11.0f, 0.0f, 30.0f }, { 63.0f, 0.0f, -12.0f }, { 66.0f, -84.0f, -11.0f },
{ 64.0f, -10.0f, -11.0f }, { 69.0f, 54.0f, -11.0f }, { 20.0f, 0.0f, 2.0f }, { 85.0f, 0.0f, -3.0f },
{ 11.0f, 0.0f, -30.0f }, { 63.0f, 0.0f, 12.0f }, { 40.0f, -18.0f, -6.0f }, { 108.0f, 6.0f, -6.0f },
{ 179.0f, -31.0f, -6.0f }, { 24.0f, -1.0f, -6.0f }, { 92.0f, -7.0f, -6.0f }, { 20.0f, -4.0f, -6.0f },
{ 57.0f, -4.0f, -6.0f }, { 40.0f, -18.0f, 6.0f }, { 108.0f, 6.0f, 6.0f }, { 179.0f, -31.0f, 6.0f },
{ 24.0f, -1.0f, 6.0f }, { 92.0f, -7.0f, 6.0f }, { 20.0f, -4.0f, 6.0f }, { 77.0f, -4.0f, 6.0f },
{ 58.0f, 29.0f, -6.0f }, { 41.0f, -33.0f, -6.0f }, { 109.0f, -22.0f, -6.0f }, { 58.0f, 29.0f, 6.0f },
{ 41.0f, -33.0f, 6.0f }, { 109.0f, -22.0f, 6.0f }, { 24.0f, 0.0f, 0.0f }, { 81.0f, 0.0f, -38.0f },
{ 81.0f, 0.0f, 38.0f }, { 205.0f, -21.0f, 0.0f }, { 58.0f, -21.0f, 98.0f }, { 58.0f, -21.0f, -98.0f },
{ 134.0f, 0.0f, -24.0f }, { 104.0f, 106.0f, -24.0f }, { 104.0f, -106.0f, -24.0f },
};
UnkStruct_i1_8019A748 D_i1_8019A748[18] = {
{ 1, D_VE1_90150A0, 0, 0 }, { 2, D_VE1_9015BB0, 1, 0 }, { 3, D_VE1_9015900, 2, 0 },
{ 4, D_VE1_9000000, 3, 0 }, { 5, D_VE1_9022A20, 4, 0 }, { 6, D_VE1_9021630, 5, 0 },
{ 7, D_VE1_9015480, 6, 0 }, { 8, D_VE1_90007F0, 7, 0 }, { 9, D_VE1_9014DF0, 8, 0 },
{ 10, D_VE1_9022D80, 9, 0 }, { 11, D_VE1_901E350, 10, 0 }, { 12, D_VE1_901F990, 11, 0 },
{ 13, D_VE1_9024750, 15, 1 }, { 16, D_VE1_901F6D0, 12, 0 }, { 17, D_VE1_9021900, 13, 0 },
{ 20, D_VE1_901FC40, 14, 0 }, { 21, D_VE1_9021B80, 15, 0 }, { 25, D_VE1_9013880, 16, 0 },
};
UnkStruct_i1_8019A820 D_i1_8019A820[17] = {
{ 1, 50, 0, 3, 1, 2, 5, -1, -1, -1, -1, 1 }, { 2, 60, 3, 2, 0, 2, 5, 0, -1, -1, -1, 1 },
{ 3, 100, 5, 2, 0, 1, 5, 1, -1, -1, -1, 1 }, { 4, 50, 7, 3, 4, 5, 5, -1, -1, -1, -1, 1 },
{ 5, 60, 10, 2, 3, 5, 5, 3, -1, -1, -1, 1 }, { 6, 100, 12, 2, 3, 4, 5, 4, -1, -1, -1, 1 },
{ 7, 40, 14, 3, -1, -1, 5, -1, -1, -1, -1, 1 }, { 8, 50, 17, 2, 6, -1, 5, 6, -1, -1, -1, 1 },
{ 9, 60, 19, 2, 7, -1, 5, 7, -1, -1, -1, 1 }, { 10, 40, 21, 3, -1, -1, 5, -1, -1, -1, -1, 1 },
{ 11, 50, 24, 2, 9, -1, 5, 9, -1, -1, -1, 1 }, { 12, 60, 26, 2, 10, -1, 5, 10, -1, -1, -1, 1 },
{ 16, 100, 28, 3, 8, -1, 5, 8, -1, -1, -1, 1 }, { 17, 100, 31, 3, 11, -1, 5, 11, -1, -1, -1, 1 },
{ 20, 150, 34, 3, -1, -1, 5, -1, -1, -1, -1, 1 }, { 21, 250, 37, 3, -1, -1, 5, 14, 16, 12, 13, 1 },
{ 25, 200, 40, 3, -1, -1, 5, 2, 5, -1, -1, 1 },
};
f32 D_VE1_8019A9B8[199] = {
0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
};
Animation* D_i1_8019ACD4[9] = {
&D_VE1_9018BD0, &D_VE1_901A4B8, &D_VE1_901BDA8, &D_VE1_901DA38, &D_VE1_9024738,
&D_VE1_9024738, &D_VE1_9018BD0, &D_VE1_9010FC4, NULL,
};
UnkStruct_i1_8019ACF8 D_i1_8019ACF8[2] = { { 0, 1 }, { -1, 0 } };
UnkStruct_i1_8019ACF8 D_i1_8019AD00[4] = { { 1, 0 }, { 2, 1 }, { 3, 0 }, { -1, 0 } };
UnkStruct_i1_8019ACF8 D_i1_8019AD10[3] = { { 4, 0 }, { 5, 0 }, { -1, 0 } };
UnkStruct_i1_8019ACF8 D_i1_8019AD1C[2] = { { 7, 0 }, { -1, 0 } };
UnkStruct_i1_8019ACF8 D_i1_8019AD24[2] = { { 6, 1 }, { -1, 0 } };
UnkStruct_i1_8019AD2C D_i1_8019AD2C[5] = {
{ D_i1_8019ACF8, 0 }, { D_i1_8019AD00, 0 }, { D_i1_8019AD10, 0 }, { D_i1_8019AD24, 0 }, { D_i1_8019AD1C, 0 },
};
s16 D_i1_8019AD54[3] = { 0, 1, -1 };
Vec3f D_i1_8019AD5C = { 162.0f, 50.0f, 0.0f };
u8 D_i1_8019AD68[24] = {
0, 33, 64, 97, 128, 143, 161, 192, 223, 255, 234, 213, 192, 171, 153, 129, 108, 87, 66, 45, 22, 0, 0, 0,
};
s16 D_i1_8019AD80[16][4] = {
{ 0, 0, 0, 1 }, { 1, 0, 0, 1 }, { 0, 1, 0, 1 }, { 0, 0, 8, 1 }, { 0, 0, 0, 1 }, { 0, 1, 0, 1 },
{ 0, 0, 0, 1 }, { 0, 0, 0, 1 }, { 0, 1, 0, 1 }, { 0, 0, 8, 1 }, { 0, 0, 0, 1 }, { 0, 1, 0, 1 },
{ 0, 0, 0, 1 }, { 1, 0, 0, 1 }, { 0, 1, 0, 1 }, { 0, 0, 8, 1 },
};
UnkStruct_i1_8019AE00 D_i1_8019AE00[4] = {
{ 270.0f, 3, 2 },
{ 90.0f, 2, 3 },
{ 180.0f, 0, 1 },
{ 0.0f, 1, 0 },
};
f32 D_i1_8019AE20[6] = {
258.0f, 0.0f, 0.0f, 133.0f, 0.0f, 0.0f,
};
Vec3f D_i1_8019AE38 = { 130.0f, 0.0f, 0.0f };
void Venom1_80192CB0(Actor* actor) { void Venom1_80192CB0(Actor* actor) {
actor->iwork[0] = actor->obj.rot.x; actor->iwork[0] = actor->obj.rot.x;
actor->obj.rot.x = 0.0f; actor->obj.rot.x = 0.0f;
@ -808,6 +690,131 @@ void Venom1_80193540(Scenery* scenery) {
} }
} }
Gfx* D_VE1_8019A008[17] = {
D_VE1_90150A0, D_VE1_9015BB0, D_VE1_9015900, D_VE1_9000000, D_VE1_9022A20, D_VE1_9021630,
D_VE1_9015480, D_VE1_90007F0, D_VE1_9014DF0, D_VE1_9022D80, D_VE1_901E350, D_VE1_901F990,
D_VE1_901F6D0, D_VE1_9021900, D_VE1_901FC40, D_VE1_9021B80, D_VE1_9013880,
};
s16 D_i1_8019A04C[3][2] = { { -2500, 300 }, { -1000, 0 }, { -5000, 0 } };
UnkStruct_i1_8019A058 D_i1_8019A058[33] = {
{ { 56.0f, 35.0f, 5.0f }, 70.0f }, { { 64.0f, -86.0f, 5.0f }, 60.0f }, { { 54.0f, 0.0f, 2.0f }, 50.0f },
{ { 54.0f, 4.0f, -2.0f }, 50.0f }, { { 0.0f, 0.0f, 0.0f }, 0.0f }, { { 56.0f, 35.0f, -5.0f }, 70.0f },
{ { 64.0f, -86.0f, -5.0f }, 60.0f }, { { 54.0f, 0.0f, -2.0f }, 50.0f }, { { 54.0f, 0.0f, 2.0f }, 50.0f },
{ { 0.0f, 0.0f, 0.0f }, 0.0f }, { { 24.0f, 18.0f, 4.0f }, 50.0f }, { { 126.0f, -8.0f, 7.0f }, 80.0f },
{ { 23.0f, 10.0f, 0.0f }, 40.0f }, { { 101.0f, 12.0f, 2.0f }, 50.0f }, { { 56.0f, 0.0f, -3.0f }, 50.0f },
{ { 0.0f, 0.0f, 0.0f }, 0.0f }, { { 24.0f, 18.0f, -4.0f }, 50.0f }, { { 126.0f, -8.0f, -7.0f }, 80.0f },
{ { 23.0f, 10.0f, 0.0f }, 40.0f }, { { 101.0f, 12.0f, -2.0f }, 50.0f }, { { 56.0f, 0.0f, 3.0f }, 50.0f },
{ { 0.0f, 0.0f, 0.0f }, 0.0f }, { { 0.0f, 0.0f, 0.0f }, 0.0f }, { { 74.0f, -3.0f, -6.0f }, 60.0f },
{ { 0.0f, 0.0f, 0.0f }, 0.0f }, { { 74.0f, -3.0f, 6.0f }, 60.0f }, { { 44.0f, 0.0f, 0.0f }, 70.0f },
{ { 108.0f, 0.0f, 0.0f }, 160.0f }, { { 0.0f, 0.0f, 0.0f }, 0.0f }, { { 134.0f, 70.0f, 84.0f }, 70.0f },
{ { 134.0f, -70.0f, 84.0f }, 70.0f }, { { 122.0f, 81.0f, -73.0f }, 80.0f }, { { 122.0f, -81.0f, -73.0f }, 80.0f },
};
UnkStruct_i1_8019A058 D_i1_8019A268[33] = {
{ { 54.0f, -83.0f, 9.0f }, 50.0f }, { { 46.0f, 34.0f, 9.0f }, 60.0f }, { { 48.0f, 0.0f, 9.0f }, 50.0f },
{ { 3.0f, 0.0f, 9.0f }, 30.0f }, { { 70.0f, 0.0f, 6.0f }, 30.0f }, { { 54.0f, -83.0f, -8.0f }, 50.0f },
{ { 46.0f, 34.0f, -8.0f }, 60.0f }, { { 48.0f, 0.0f, -8.0f }, 50.0f }, { { 3.0f, 0.0f, -8.0f }, 30.0f },
{ { 70.0f, 0.0f, -6.0f }, 30.0f }, { { 48.0f, 7.0f, -6.0f }, 50.0f }, { { 156.0f, -3.0f, -6.0f }, 70.0f },
{ { 27.0f, 12.0f, -6.0f }, 40.0f }, { { 100.0f, 18.0f, -6.0f }, 40.0f }, { { 0.0f, 0.0f, -6.0f }, 40.0f },
{ { 80.0f, 2.0f, -6.0f }, 40.0f }, { { 48.0f, 7.0f, 6.0f }, 50.0f }, { { 156.0f, -3.0f, 6.0f }, 70.0f },
{ { 27.0f, 12.0f, 6.0f }, 40.0f }, { { 100.0f, 18.0f, 6.0f }, 50.0f }, { { 0.0f, 0.0f, 6.0f }, 40.0f },
{ { 80.0f, 2.0f, 6.0f }, 40.0f }, { { -4.0f, 6.0f, -6.0f }, 50.0f }, { { 89.0f, -3.0f, -6.0f }, 50.0f },
{ { -4.0f, 6.0f, 6.0f }, 50.0f }, { { 89.0f, -3.0f, 6.0f }, 50.0f }, { { 0.0f, 0.0f, 0.0f }, 50.0f },
{ { 166.0f, 0.0f, 0.0f }, 110.0f }, { { 5.0f, 0.0f, 0.0f }, 60.0f }, { { 115.0f, 0.0f, 0.0f }, 90.0f },
{ { 0.0f, 0.0f, 0.0f }, 0.0f }, { { 0.0f, 0.0f, 0.0f }, 0.0f }, { { 0.0f, 0.0f, 0.0f }, 0.0f },
};
s16 D_i1_8019A478[17][4] = {
{ 1, 0, 2, 0 }, { 2, 2, 1, 0 }, { 3, 3, 2, 0 }, { 4, 5, 2, 0 }, { 5, 7, 1, 0 }, { 6, 8, 2, 0 },
{ 7, 10, 2, 0 }, { 8, 12, 2, 0 }, { 9, 14, 2, 0 }, { 10, 16, 2, 0 }, { 11, 18, 2, 0 }, { 12, 20, 2, 0 },
{ 16, 22, 2, 0 }, { 17, 24, 2, 0 }, { 20, 26, 1, 0 }, { 21, 27, 2, 0 }, { 25, 29, 4, 0 },
};
s16 D_i1_8019A500[33] = {
0, 0, 1, 2, 2, 3, 3, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 15, 15, 16, 16, 16, 16,
};
Vec3f D_i1_8019A544[43] = {
{ 66.0f, -84.0f, 11.0f }, { 64.0f, -10.0f, -11.0f }, { 69.0f, 54.0f, 11.0f }, { 20.0f, 0.0f, -2.0f },
{ 85.0f, 0.0f, 3.0f }, { 11.0f, 0.0f, 30.0f }, { 63.0f, 0.0f, -12.0f }, { 66.0f, -84.0f, -11.0f },
{ 64.0f, -10.0f, -11.0f }, { 69.0f, 54.0f, -11.0f }, { 20.0f, 0.0f, 2.0f }, { 85.0f, 0.0f, -3.0f },
{ 11.0f, 0.0f, -30.0f }, { 63.0f, 0.0f, 12.0f }, { 40.0f, -18.0f, -6.0f }, { 108.0f, 6.0f, -6.0f },
{ 179.0f, -31.0f, -6.0f }, { 24.0f, -1.0f, -6.0f }, { 92.0f, -7.0f, -6.0f }, { 20.0f, -4.0f, -6.0f },
{ 57.0f, -4.0f, -6.0f }, { 40.0f, -18.0f, 6.0f }, { 108.0f, 6.0f, 6.0f }, { 179.0f, -31.0f, 6.0f },
{ 24.0f, -1.0f, 6.0f }, { 92.0f, -7.0f, 6.0f }, { 20.0f, -4.0f, 6.0f }, { 77.0f, -4.0f, 6.0f },
{ 58.0f, 29.0f, -6.0f }, { 41.0f, -33.0f, -6.0f }, { 109.0f, -22.0f, -6.0f }, { 58.0f, 29.0f, 6.0f },
{ 41.0f, -33.0f, 6.0f }, { 109.0f, -22.0f, 6.0f }, { 24.0f, 0.0f, 0.0f }, { 81.0f, 0.0f, -38.0f },
{ 81.0f, 0.0f, 38.0f }, { 205.0f, -21.0f, 0.0f }, { 58.0f, -21.0f, 98.0f }, { 58.0f, -21.0f, -98.0f },
{ 134.0f, 0.0f, -24.0f }, { 104.0f, 106.0f, -24.0f }, { 104.0f, -106.0f, -24.0f },
};
UnkStruct_i1_8019A748 D_i1_8019A748[18] = {
{ 1, D_VE1_90150A0, 0, 0 }, { 2, D_VE1_9015BB0, 1, 0 }, { 3, D_VE1_9015900, 2, 0 },
{ 4, D_VE1_9000000, 3, 0 }, { 5, D_VE1_9022A20, 4, 0 }, { 6, D_VE1_9021630, 5, 0 },
{ 7, D_VE1_9015480, 6, 0 }, { 8, D_VE1_90007F0, 7, 0 }, { 9, D_VE1_9014DF0, 8, 0 },
{ 10, D_VE1_9022D80, 9, 0 }, { 11, D_VE1_901E350, 10, 0 }, { 12, D_VE1_901F990, 11, 0 },
{ 13, D_VE1_9024750, 15, 1 }, { 16, D_VE1_901F6D0, 12, 0 }, { 17, D_VE1_9021900, 13, 0 },
{ 20, D_VE1_901FC40, 14, 0 }, { 21, D_VE1_9021B80, 15, 0 }, { 25, D_VE1_9013880, 16, 0 },
};
UnkStruct_i1_8019A820 D_i1_8019A820[17] = {
{ 1, 50, 0, 3, 1, 2, 5, -1, -1, -1, -1, 1 }, { 2, 60, 3, 2, 0, 2, 5, 0, -1, -1, -1, 1 },
{ 3, 100, 5, 2, 0, 1, 5, 1, -1, -1, -1, 1 }, { 4, 50, 7, 3, 4, 5, 5, -1, -1, -1, -1, 1 },
{ 5, 60, 10, 2, 3, 5, 5, 3, -1, -1, -1, 1 }, { 6, 100, 12, 2, 3, 4, 5, 4, -1, -1, -1, 1 },
{ 7, 40, 14, 3, -1, -1, 5, -1, -1, -1, -1, 1 }, { 8, 50, 17, 2, 6, -1, 5, 6, -1, -1, -1, 1 },
{ 9, 60, 19, 2, 7, -1, 5, 7, -1, -1, -1, 1 }, { 10, 40, 21, 3, -1, -1, 5, -1, -1, -1, -1, 1 },
{ 11, 50, 24, 2, 9, -1, 5, 9, -1, -1, -1, 1 }, { 12, 60, 26, 2, 10, -1, 5, 10, -1, -1, -1, 1 },
{ 16, 100, 28, 3, 8, -1, 5, 8, -1, -1, -1, 1 }, { 17, 100, 31, 3, 11, -1, 5, 11, -1, -1, -1, 1 },
{ 20, 150, 34, 3, -1, -1, 5, -1, -1, -1, -1, 1 }, { 21, 250, 37, 3, -1, -1, 5, 14, 16, 12, 13, 1 },
{ 25, 200, 40, 3, -1, -1, 5, 2, 5, -1, -1, 1 },
};
f32 D_VE1_8019A9B8[199] = {
0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
};
Animation* D_i1_8019ACD4[9] = {
&D_VE1_9018BD0, &D_VE1_901A4B8, &D_VE1_901BDA8, &D_VE1_901DA38, &D_VE1_9024738,
&D_VE1_9024738, &D_VE1_9018BD0, &D_VE1_9010FC4, NULL,
};
UnkStruct_i1_8019ACF8 D_i1_8019ACF8[2] = { { 0, 1 }, { -1, 0 } };
UnkStruct_i1_8019ACF8 D_i1_8019AD00[4] = { { 1, 0 }, { 2, 1 }, { 3, 0 }, { -1, 0 } };
UnkStruct_i1_8019ACF8 D_i1_8019AD10[3] = { { 4, 0 }, { 5, 0 }, { -1, 0 } };
UnkStruct_i1_8019ACF8 D_i1_8019AD1C[2] = { { 7, 0 }, { -1, 0 } };
UnkStruct_i1_8019ACF8 D_i1_8019AD24[2] = { { 6, 1 }, { -1, 0 } };
UnkStruct_i1_8019AD2C D_i1_8019AD2C[5] = {
{ D_i1_8019ACF8, 0 }, { D_i1_8019AD00, 0 }, { D_i1_8019AD10, 0 }, { D_i1_8019AD24, 0 }, { D_i1_8019AD1C, 0 },
};
s16 D_i1_8019AD54[3] = { 0, 1, -1 };
Vec3f D_i1_8019AD5C = { 162.0f, 50.0f, 0.0f };
u8 D_i1_8019AD68[24] = {
0, 33, 64, 97, 128, 143, 161, 192, 223, 255, 234, 213, 192, 171, 153, 129, 108, 87, 66, 45, 22, 0, 0, 0,
};
typedef struct {
s16 unk_0;
s16 unk_2;
s16 unk_4;
s16 unk_6;
} UnkStruct_i1_8019AD80;
s16 D_i1_8019AD80[16][4] = {
{ 0, 0, 0, 1 }, { 1, 0, 0, 1 }, { 0, 1, 0, 1 }, { 0, 0, 8, 1 }, { 0, 0, 0, 1 }, { 0, 1, 0, 1 },
{ 0, 0, 0, 1 }, { 0, 0, 0, 1 }, { 0, 1, 0, 1 }, { 0, 0, 8, 1 }, { 0, 0, 0, 1 }, { 0, 1, 0, 1 },
{ 0, 0, 0, 1 }, { 1, 0, 0, 1 }, { 0, 1, 0, 1 }, { 0, 0, 8, 1 },
};
UnkStruct_i1_8019AE00 D_i1_8019AE00[4] = {
{ 270.0f, 3, 2 },
{ 90.0f, 2, 3 },
{ 180.0f, 0, 1 },
{ 0.0f, 1, 0 },
};
f32 D_i1_8019AE20[6] = {
258.0f, 0.0f, 0.0f, 133.0f, 0.0f, 0.0f,
};
Vec3f D_i1_8019AE38 = { 130.0f, 0.0f, 0.0f };
void Venom1_Boss319_Init(Boss319* this) { void Venom1_Boss319_Init(Boss319* this) {
s32 i; s32 i;
s32 var_v0; s32 var_v0;
@ -1094,7 +1101,7 @@ void Venom1_Boss_Update(Boss* boss) {
s32 is4; s32 is4;
s32 is7; s32 is7;
s32 pad1; s32 pad1;
f32 pad2; UnkStruct_i1_8019ACF8* pad2;
s32 spB8; s32 spB8;
s32 spB4; s32 spB4;
f32 temp_fs0; f32 temp_fs0;
@ -1295,6 +1302,7 @@ void Venom1_Boss_Update(Boss* boss) {
func_effect_8007D2C8(spF8.x, spF8.y, spF8.z, D_i1_8019AD80[is4][2]); func_effect_8007D2C8(spF8.x, spF8.y, spF8.z, D_i1_8019AD80[is4][2]);
} }
for (is1 = 0; is1 < D_i1_8019AD80[is4][0]; is1++) { for (is1 = 0; is1 < D_i1_8019AD80[is4][0]; is1++) {
if (boss->sfxSource) {}
actor = Game_SpawnActor(OBJ_ACTOR_DEBRIS); actor = Game_SpawnActor(OBJ_ACTOR_DEBRIS);
if (actor != NULL) { if (actor != NULL) {
actor->obj.status = OBJ_ACTIVE; actor->obj.status = OBJ_ACTIVE;
@ -1317,6 +1325,7 @@ void Venom1_Boss_Update(Boss* boss) {
actor->vel.z = 20.0f + RAND_FLOAT_CENTERED(2.0f); actor->vel.z = 20.0f + RAND_FLOAT_CENTERED(2.0f);
actor->fwork[0] = 5.0f + RAND_FLOAT_CENTERED(1.0f); actor->fwork[0] = 5.0f + RAND_FLOAT_CENTERED(1.0f);
actor->fwork[1] = 5.0f + RAND_FLOAT_CENTERED(1.0f); actor->fwork[1] = 5.0f + RAND_FLOAT_CENTERED(1.0f);
D_i1_8019C0B8 += 0;
actor->fwork[2] = 5.0f + RAND_FLOAT_CENTERED(1.0f); actor->fwork[2] = 5.0f + RAND_FLOAT_CENTERED(1.0f);
actor->gravity = 1.0f; actor->gravity = 1.0f;
} }
@ -1508,12 +1517,10 @@ void Venom1_Boss_Update(Boss* boss) {
} }
} }
if ((boss->state == 0) && (boss->swork[20] == 0)) { if ((boss->state == 0) && (boss->swork[20] == 0)) {
if (is4 > 0) { if ((is4 > 0) && (boss->swork[21] < (is4 - 1) / 5)) {
if (boss->swork[21] < (is4 - 1) / 5) {
boss->swork[21] = (is4 - 1) / 5; boss->swork[21] = (is4 - 1) / 5;
boss->swork[20] = 1; boss->swork[20] = 1;
} }
}
if (D_i1_8019C0C0 == 1) { if (D_i1_8019C0C0 == 1) {
D_i1_8019C0C0 = 0; D_i1_8019C0C0 = 0;
if (boss->swork[21] < 5) { if (boss->swork[21] < 5) {
@ -1591,6 +1598,7 @@ void Venom1_Boss_Update(Boss* boss) {
break; break;
} }
} }
switch (boss->state) { switch (boss->state) {
case 0: case 0:
case 1: case 1:
@ -1637,11 +1645,10 @@ void Venom1_Boss_Update(Boss* boss) {
D_i1_8019B7F0[spF4] = 0; D_i1_8019B7F0[spF4] = 0;
} }
} }
break; break;
} }
is4 = 0; is4 = 0;
for (spF4 = 0; spF4 < 17; spF4++) { for (spF4 = 0; spF4 < 17U; spF4++) {
is4 += (D_i1_8019B838[spF4].unk_00 < 0) ? 0 : D_i1_8019B838[spF4].unk_00; is4 += (D_i1_8019B838[spF4].unk_00 < 0) ? 0 : D_i1_8019B838[spF4].unk_00;
} }
boss->swork[30] = boss->health + is4; boss->swork[30] = boss->health + is4;
@ -1743,7 +1750,7 @@ void Venom1_Boss_Update(Boss* boss) {
} }
temp_fs0 = gPlayer[0].trueZpos + boss->fwork[2] - boss->obj.pos.z; temp_fs0 = gPlayer[0].trueZpos + boss->fwork[2] - boss->obj.pos.z;
if ((fabsf(temp_fs0) <= 70.0f) && (boss->state == 3)) { if ((fabsf(temp_fs0) <= 70.0f) && (boss->state == 3)) {
boss->swork[5] = D_i1_8019AD2C[4].unk_0[0].unk_0; boss->swork[5] = D_i1_8019AD2C[4].unk_0->unk_0;
boss->swork[4] = boss->swork[4]; boss->swork[4] = boss->swork[4];
boss->fwork[0] = 0.0f; boss->fwork[0] = 0.0f;
boss->fwork[10] = 0.0f; boss->fwork[10] = 0.0f;
@ -2041,22 +2048,25 @@ void Venom1_Boss_Update(Boss* boss) {
temp_fv1 = gPlayer[0].pos.z - boss->obj.pos.z; temp_fv1 = gPlayer[0].pos.z - boss->obj.pos.z;
// is0 = boss->swork[1]; // is0 = boss->swork[1];
// is5 = boss->swork[2]; // is5 = boss->swork[2];
pad1 = spE8; // probably fake, but unclear how to resolve // pad1 = spE8; // probably fake, but unclear how to resolve
if ((pad1 != 0) && (D_i1_8019AD2C[boss->swork[1]].unk_0[boss->swork[2]].unk_2 & 1) && (boss->swork[3] != 0)) { if (spE8 != 0) {
pad2 = D_i1_8019AD2C[boss->swork[1]].unk_0;
if ((pad2[boss->swork[2]].unk_2 & 1) && (boss->swork[3] != 0)) {
spE4 = 1; spE4 = 1;
if (boss->swork[3] > 0) { if (boss->swork[3] > 0) {
boss->swork[3]--; boss->swork[3]--;
} }
} }
}
if ((D_i1_8019C0BC != 0) && (boss->state >= 3)) { if ((D_i1_8019C0BC != 0) && (boss->state >= 3)) {
D_i1_8019C0BC = 0; D_i1_8019C0BC = 0;
} }
if ((D_i1_8019C0BC != 0) && (boss->swork[1] != 2) && (boss->state < 3)) { if ((D_i1_8019C0BC != 0) && (boss->swork[1] != 2) && (boss->state < 3)) {
pad1 |= 2; spE8 |= 2;
spE4 = 1; spE4 = 1;
} }
if (pad1 != 0) { if (spE8 != 0) {
is0 = boss->swork[1]; is0 = boss->swork[1];
is5 = boss->swork[2] - spE4 + 1; is5 = boss->swork[2] - spE4 + 1;
is1 = boss->swork[4]; is1 = boss->swork[4];
@ -2066,13 +2076,14 @@ void Venom1_Boss_Update(Boss* boss) {
is5 = 0; is5 = 0;
is0 = 2; is0 = 2;
} else { } else {
pad1 &= ~2; spE8 &= ~2;
} }
D_i1_8019C0BC = 0; D_i1_8019C0BC = 0;
} }
if (((pad1 & 1) == 1) && (D_i1_8019AD2C[is0].unk_0[is5].unk_0 == -1)) { pad2 = D_i1_8019AD2C[is0].unk_0;
if (((spE8 & 1) == 1) && (pad2[is5].unk_0 == -1)) {
is5 = 0; is5 = 0;
spE8 = pad1; // spE8 = pad1;
do { do {
is4 = 0; is4 = 0;
is1 = boss->swork[4] + 1; is1 = boss->swork[4] + 1;
@ -2115,10 +2126,11 @@ void Venom1_Boss_Update(Boss* boss) {
D_i1_8019C0B8 = 0; D_i1_8019C0B8 = 0;
} }
} while (is4 != 0); } while (is4 != 0);
pad1 = spE8; // pad1 = spE8;
} }
is2 = D_i1_8019AD2C[is0].unk_0[is5].unk_0; pad2 = D_i1_8019AD2C[is0].unk_0;
if (pad1 != 0) { is2 = pad2[is5].unk_0;
if (spE8 != 0) {
boss->swork[27] = 0; boss->swork[27] = 0;
switch (is2) { switch (is2) {
@ -2173,7 +2185,7 @@ void Venom1_Boss_Update(Boss* boss) {
} }
} }
if ((boss->health <= 0) && (boss->state == 2) && (boss->swork[1] != 2) && (boss->obj.pos.y <= 0)) { if ((boss->health <= 0) && (boss->state == 2) && (boss->swork[1] != 2) && (boss->obj.pos.y <= 0)) {
boss->swork[5] = D_i1_8019AD2C[3].unk_0[0].unk_0; boss->swork[5] = D_i1_8019AD2C[3].unk_0->unk_0;
boss->swork[4] = boss->swork[4]; boss->swork[4] = boss->swork[4];
boss->swork[9] = 3; boss->swork[9] = 3;
boss->swork[3] = -1; boss->swork[3] = -1;
@ -2184,7 +2196,6 @@ void Venom1_Boss_Update(Boss* boss) {
boss->swork[1] = 3; boss->swork[1] = 3;
boss->swork[2] = 0; boss->swork[2] = 0;
boss->swork[6] = 4; boss->swork[6] = 4;
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 0); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 0);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 0); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 0);
} }
@ -2250,18 +2261,17 @@ void Venom1_Boss_Update(Boss* boss) {
var_fv0 = -1500.0f; var_fv0 = -1500.0f;
for (spF4 = 0; spF4 < ARRAY_COUNT(gActors); spF4++, actor++) { for (spF4 = 0; spF4 < ARRAY_COUNT(gActors); spF4++, actor++) {
if (actor->obj.status == OBJ_FREE) { if (actor->obj.status == OBJ_FREE) {
while ((is3 < boss->swork[22]) &&
while ((is3 > boss->swork[22]) && (D_i1_80199B40[is4][is3].z + temp_fs0) >= (gPlayer[0].pos.z + var_fv0)) {
(gPlayer[0].pos.z + var_fv0) <= (temp_fs0 + D_i1_80199CD0[is4][is3].z)) {
is3++; is3++;
} }
if (is3 <= boss->swork[22]) { if (is3 <= boss->swork[22]) {
Actor_Initialize(actor); Actor_Initialize(actor);
actor->obj.status = OBJ_ACTIVE; actor->obj.status = OBJ_ACTIVE;
actor->obj.id = OBJ_ACTOR_280; actor->obj.id = OBJ_ACTOR_280;
actor->obj.pos.x = D_i1_80199CD0[is4][is3].x; actor->obj.pos.x = D_i1_80199B40[is4][is3].x;
actor->obj.pos.y = D_i1_80199CD0[is4][is3].y; actor->obj.pos.y = D_i1_80199B40[is4][is3].y;
actor->obj.pos.z = D_i1_80199CD0[is4][is3].z + boss->obj.pos.z; actor->obj.pos.z = D_i1_80199B40[is4][is3].z + boss->obj.pos.z;
actor->obj.rot.y = 180.0f; actor->obj.rot.y = 180.0f;
actor->state = 1; actor->state = 1;
Object_SetInfo(&actor->info, actor->obj.id); Object_SetInfo(&actor->info, actor->obj.id);
@ -2280,10 +2290,10 @@ void Venom1_Boss_Update(Boss* boss) {
actor = gActors; actor = gActors;
is4 = boss->swork[23]; is4 = boss->swork[23];
temp_fs0 = boss->obj.pos.z; temp_fs0 = boss->obj.pos.z;
var_fv0 = (gPlayer[0].pos.z + -1500.0f); var_fv0 = gPlayer[0].pos.z + -1500.0f;
for (spF4 = 0; spF4 < ARRAY_COUNT(gActors); spF4++, actor++) { for (spF4 = 0; spF4 < ARRAY_COUNT(gActors); spF4++, actor++) {
if (actor->obj.status == OBJ_FREE) { if (actor->obj.status == OBJ_FREE) {
while ((is3 > D_i1_80199E60[is4]) && (var_fv0) <= (temp_fs0 + D_i1_80199E6C[is4][is3].z)) { while ((is3 < D_i1_80199E60[is4]) && (D_i1_80199E6C[is4][is3].z + temp_fs0 >= var_fv0)) {
is3++; is3++;
} }
if (is3 <= D_i1_80199E60[is4]) { if (is3 <= D_i1_80199E60[is4]) {

View File

@ -1,4 +1,4 @@
#include "prevent_bss_reordering.h" // #include "prevent_bss_reordering.h"
#include "global.h" #include "global.h"
#include "assets/ast_sector_x.h" #include "assets/ast_sector_x.h"
@ -1073,7 +1073,7 @@ void SectorX_80190078(Boss* boss) {
if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_NEXT) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_DOWN)) { if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_NEXT) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_DOWN)) {
gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE;
gPlayer[0].csState = 0; gPlayer[0].csState = 0;
gPlayer[0].unk_234 = 1; gPlayer[0].draw = true;
} }
Object_Kill(&boss->obj, boss->sfxSource); Object_Kill(&boss->obj, boss->sfxSource);
gMissionStatus = boss->swork[6]; gMissionStatus = boss->swork[6];

View File

@ -2686,7 +2686,7 @@ void Area6_LevelComplete(Player* player) {
} }
if (gCsFrameCount == 60) { if (gCsFrameCount == 60) {
player->unk_234 = 0; player->draw = false;
player->baseSpeed = 0.0f; player->baseSpeed = 0.0f;
} }
@ -2763,7 +2763,7 @@ void Area6_LevelComplete(Player* player) {
} }
if (gCsFrameCount == 300) { if (gCsFrameCount == 300) {
player->unk_234 = 1; player->draw = true;
player->pos.x = 0.0f; player->pos.x = 0.0f;
player->pos.y = 200.0f; player->pos.y = 200.0f;

View File

@ -648,7 +648,7 @@ void Aquas_801AA20C(void) {
f32 var_fs2; f32 var_fs2;
s32 i; s32 i;
if (gPlayer[0].unk_234 != 0) { if (gPlayer[0].draw) {
Matrix_Push(&gGfxMatrix); Matrix_Push(&gGfxMatrix);
Math_SmoothStepToF(&D_i3_801C41B8[5], 3.0f, 1.0f, 4.0f, 0.0001f); Math_SmoothStepToF(&D_i3_801C41B8[5], 3.0f, 1.0f, 4.0f, 0.0001f);
RCP_SetupDL(&gMasterDisp, SETUPDL_61); RCP_SetupDL(&gMasterDisp, SETUPDL_61);
@ -720,25 +720,25 @@ void Aquas_801AA4BC(Player* player) {
if ((gInputPress->button & Z_TRIG) && (player->unk_230 == 0)) { if ((gInputPress->button & Z_TRIG) && (player->unk_230 == 0)) {
player->sfx.bank = 1; player->sfx.bank = 1;
if (player->barrelInputTimerL != 0) { if (player->rollInputTimerL != 0) {
player->barrelRoll = 1; player->rollState = 1;
player->timer_1E8 = 10; player->rollTimer = 10;
player->rollRate = player->baseRollRate = 30; player->rollRate = player->baseRollRate = 30;
player->sfx.roll = 1; player->sfx.roll = 1;
} else { } else {
player->barrelInputTimerL = 10; player->rollInputTimerL = 10;
} }
} }
if ((gInputPress->button & R_TRIG) && (player->unk_230 == 0)) { if ((gInputPress->button & R_TRIG) && (player->unk_230 == 0)) {
player->sfx.bank = 1; player->sfx.bank = 1;
if (player->barrelInputTimerR != 0) { if (player->rollInputTimerR != 0) {
player->barrelRoll = 1; player->rollState = 1;
player->timer_1E8 = 10; player->rollTimer = 10;
player->rollRate = player->baseRollRate = -30; player->rollRate = player->baseRollRate = -30;
player->sfx.roll = 1; player->sfx.roll = 1;
} else { } else {
player->barrelInputTimerR = 10; player->rollInputTimerR = 10;
} }
} }
@ -753,15 +753,15 @@ void Aquas_801AA4BC(Player* player) {
} }
} }
if (player->barrelRoll == 0) { if (player->rollState == 0) {
Math_SmoothStepToF(&player->zRotBarrelRoll, 0.0f, 0.1f, 10.0f, 0.00001f); Math_SmoothStepToF(&player->zRotBarrelRoll, 0.0f, 0.1f, 10.0f, 0.00001f);
} }
if (player->barrelInputTimerL != 0) { if (player->rollInputTimerL != 0) {
player->barrelInputTimerL--; player->rollInputTimerL--;
} }
if (player->barrelInputTimerR != 0) { if (player->rollInputTimerR != 0) {
player->barrelInputTimerR--; player->rollInputTimerR--;
} }
if (player->timer_214 != 0) { if (player->timer_214 != 0) {
@ -770,16 +770,16 @@ void Aquas_801AA4BC(Player* player) {
if (player->timer_218 != 0) { if (player->timer_218 != 0) {
player->timer_218--; player->timer_218--;
} }
if (player->timer_1E8 != 0) { if (player->rollTimer != 0) {
player->timer_1E8--; player->rollTimer--;
} }
if (player->barrelRoll != 0) { if (player->rollState != 0) {
player->barrelInputTimerL = player->barrelInputTimerR = 0; player->rollInputTimerL = player->rollInputTimerR = 0;
player->unk_150 = 1.5f; player->unk_150 = 1.5f;
player->zRotBarrelRoll += player->rollRate; player->zRotBarrelRoll += player->rollRate;
if (player->timer_1E8 == 0) { if (player->rollTimer == 0) {
if (player->rollRate > 0) { if (player->rollRate > 0) {
player->rollRate -= 5; player->rollRate -= 5;
} }
@ -787,7 +787,7 @@ void Aquas_801AA4BC(Player* player) {
player->rollRate += 5; player->rollRate += 5;
} }
if (player->rollRate == 0) { if (player->rollRate == 0) {
player->barrelRoll = 0; player->rollState = 0;
} }
} else { } else {
if (player->barrelRollAlpha < 180) { if (player->barrelRollAlpha < 180) {
@ -1073,7 +1073,7 @@ void Aquas_BlueMarineMove(Player* player) {
} }
} }
void Aquas_801AB9B0(Player* player) { void Aquas_BlueMarineDown(Player* player) {
func_effect_8007D0E0(player->pos.x, player->pos.y, player->trueZpos, 6.0f); func_effect_8007D0E0(player->pos.x, player->pos.y, player->trueZpos, 6.0f);
func_effect_8007B344(player->pos.x, player->pos.y, player->trueZpos, 3.0f, 5); func_effect_8007B344(player->pos.x, player->pos.y, player->trueZpos, 3.0f, 5);
func_effect_8007BFFC(player->pos.x, player->pos.y, player->trueZpos, 0.0f, 0.0f, 0.0f, 3.0f, 80); func_effect_8007BFFC(player->pos.x, player->pos.y, player->trueZpos, 0.0f, 0.0f, 0.0f, 3.0f, 80);
@ -5452,7 +5452,7 @@ void Aquas_801BADF8(Actor* actor) {
actor->dmgType = DMG_NONE; actor->dmgType = DMG_NONE;
if (actor->damage == 0) { if (actor->damage == 0) {
gPlayer[0].hitTimer = 6; gPlayer[0].hitTimer = 6;
gPlayer[0].unk_21C = 0; gPlayer[0].hitDirection = 0;
} }
actor->state++; actor->state++;
} }

View File

@ -3135,7 +3135,7 @@ void Solar_LevelComplete(Player* player) {
player->wings.unk_04 = player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 = player->wings.unk_04 = player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 =
player->zRotBarrelRoll = player->zRotBank = player->boostSpeed = 0.0f; player->zRotBarrelRoll = player->zRotBank = player->boostSpeed = 0.0f;
player->unk_234 = 1; player->draw = true;
gCsCamEyeX = player->cam.eye.x; gCsCamEyeX = player->cam.eye.x;
gCsCamEyeY = player->cam.eye.y; gCsCamEyeY = player->cam.eye.y;

View File

@ -4475,7 +4475,7 @@ void Zoness_LevelComplete(Player* player) {
player->aerobaticPitch = 0.0f; player->aerobaticPitch = 0.0f;
player->camRoll = 0.0f; player->camRoll = 0.0f;
player->baseSpeed = 40.0f; player->baseSpeed = 40.0f;
player->unk_234 = 1; player->draw = true;
player->wings.unk_04 = player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 = player->wings.unk_04 = player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 =
player->zRotBarrelRoll = player->zRotBank = player->boostSpeed = 0.0f; player->zRotBarrelRoll = player->zRotBank = player->boostSpeed = 0.0f;
gCsCamEyeX = player->cam.eye.x; gCsCamEyeX = player->cam.eye.x;

View File

@ -7,6 +7,9 @@
#include "global.h" #include "global.h"
#include "assets/ast_bolse.h" #include "assets/ast_bolse.h"
#include "prevent_bss_reordering.h" #include "prevent_bss_reordering.h"
extern s32 dummy200;
struct Dummy200 { struct Dummy200 {
int x; int x;
}; };
@ -64,9 +67,6 @@ struct Dummy223 {
struct Dummy224 { struct Dummy224 {
int x; int x;
}; };
struct Dummy225 {
int x;
};
typedef struct UnkStruct_D_i4_801A03E0 { typedef struct UnkStruct_D_i4_801A03E0 {
f32 unk_00; f32 unk_00;
@ -346,7 +346,7 @@ void Bolse_UpdateEventHandler(Actor* this) {
player->unk_014 = 0.0f; player->unk_014 = 0.0f;
D_hud_80161708 = 0; D_hud_80161708 = 0;
} }
gPauseEnabled = 0; gPauseEnabled = false;
break; break;
case 10: case 10:
@ -1192,7 +1192,7 @@ void Bolse_LevelStart(Player* player) {
gCsCamAtZ = player->pos.z; gCsCamAtZ = player->pos.z;
player->csState = 1; player->csState = 1;
player->unk_204 = 1; player->wingPosition = 1;
D_ctx_80177A48[0] = 1.0f; D_ctx_80177A48[0] = 1.0f;
gFillScreenAlpha = gFillScreenAlphaTarget = 255; gFillScreenAlpha = gFillScreenAlphaTarget = 255;
@ -1299,7 +1299,7 @@ void Bolse_LevelStart(Player* player) {
Math_SmoothStepToF(&player->rot.z, 0.0f, 0.1f, 1.0f, 0.0f); Math_SmoothStepToF(&player->rot.z, 0.0f, 0.1f, 1.0f, 0.0f);
if (gCsFrameCount == 200) { if (gCsFrameCount == 200) {
player->unk_204 = 2; player->wingPosition = 2;
} }
if (gCsFrameCount == 270) { if (gCsFrameCount == 270) {
@ -1458,7 +1458,7 @@ void Bolse_LevelComplete(Player* player) {
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50);
gCsFrameCount = 0; gCsFrameCount = 0;
gGroundHeight = -10000.0f; gGroundHeight = -10000.0f;
player->unk_240 = 1; player->hideShadow = true;
player->wings.modelId = 1; player->wings.modelId = 1;
AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_EXPLOSION, actor50->sfxSource, 0); AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_EXPLOSION, actor50->sfxSource, 0);
Audio_StartPlayerNoise(0); Audio_StartPlayerNoise(0);
@ -1539,7 +1539,7 @@ void Bolse_LevelComplete(Player* player) {
break; break;
case 235: case 235:
player->unk_204 = 1; player->wingPosition = 1;
gLevelClearScreenTimer = 100; gLevelClearScreenTimer = 100;
break; break;

View File

@ -299,7 +299,7 @@ void Fortuna_UpdateEvents(Actor* actor) {
player->unk_014 = 0.0f; player->unk_014 = 0.0f;
D_hud_80161708 = 0; D_hud_80161708 = 0;
} }
gPauseEnabled = 0; gPauseEnabled = false;
break; break;
case 5: case 5:
@ -747,7 +747,7 @@ void Fortuna_LevelComplete(Player* player) {
Audio_StopPlayerNoise(0); Audio_StopPlayerNoise(0);
Audio_KillSfxBySource(player->sfxSource); Audio_KillSfxBySource(player->sfxSource);
player->unk_234 = 0; player->draw = false;
gFillScreenAlpha = 255; gFillScreenAlpha = 255;
gFillScreenAlphaTarget = 255; gFillScreenAlphaTarget = 255;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0;
@ -818,7 +818,7 @@ void Fortuna_LevelComplete(Player* player) {
player->pos.z = -10000.0f; player->pos.z = -10000.0f;
gCsFrameCount = 0; gCsFrameCount = 0;
player->wings.modelId = 1; player->wings.modelId = 1;
player->unk_204 = 1; player->wingPosition = 1;
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 100); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 100);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 100); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 100);
Audio_StartPlayerNoise(0); Audio_StartPlayerNoise(0);
@ -829,7 +829,7 @@ void Fortuna_LevelComplete(Player* player) {
break; break;
case 10: case 10:
player->unk_234 = 1; player->draw = true;
gFillScreenAlphaTarget = 0; gFillScreenAlphaTarget = 0;
gFillScreenAlphaStep = 4; gFillScreenAlphaStep = 4;
player->cam.eye.x = 400.0f; player->cam.eye.x = 400.0f;
@ -1126,7 +1126,7 @@ void Fortuna_LevelComplete(Player* player) {
actor0->info.bonus = 1; actor0->info.bonus = 1;
gCsFrameCount = 0; gCsFrameCount = 0;
player->csState = 21; player->csState = 21;
player->unk_234 = 1; player->draw = true;
for (i = 0; i < 9; i++) { for (i = 0; i < 9; i++) {
D_ctx_80177A48[i] = 0.0f; D_ctx_80177A48[i] = 0.0f;

View File

@ -4,6 +4,7 @@
* Description: Level: Katina * Description: Level: Katina
*/ */
#include "prevent_bss_reordering.h"
#include "global.h" #include "global.h"
#include "assets/ast_katina.h" #include "assets/ast_katina.h"
@ -1217,7 +1218,7 @@ void Katina_BossUpdate(Saucerer* this) {
if (this->timer_050 == 500) { if (this->timer_050 == 500) {
gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE;
gPlayer[0].csState = 100; gPlayer[0].csState = 100;
gPlayer[0].unk_234 = 0; gPlayer[0].draw = false;
gCsFrameCount = 5000; gCsFrameCount = 5000;
} }
@ -1371,7 +1372,7 @@ void Katina_BossUpdate(Saucerer* this) {
if (gFillScreenAlpha == 255) { if (gFillScreenAlpha == 255) {
gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE;
gPlayer[0].csState = 2; gPlayer[0].csState = 2;
gPlayer[0].unk_234 = 1; gPlayer[0].draw = true;
gCsFrameCount = 200; gCsFrameCount = 200;
@ -1811,7 +1812,7 @@ void Katina_LevelComplete(Player* player) {
case 0: case 0:
Audio_StopSfxByBankAndSource(1, &player->sfxSource[0]); Audio_StopSfxByBankAndSource(1, &player->sfxSource[0]);
gCsFrameCount = 0; gCsFrameCount = 0;
player->unk_234 = 1; player->draw = true;
player->pos.x = boss->obj.pos.x; player->pos.x = boss->obj.pos.x;
player->pos.y = 800.0f; player->pos.y = 800.0f;
@ -1897,7 +1898,7 @@ void Katina_LevelComplete(Player* player) {
case 2: case 2:
if (player->csTimer == 0) { if (player->csTimer == 0) {
player->unk_240 = 1; player->hideShadow = true;
player->pos.x = 0.0f; player->pos.x = 0.0f;
player->pos.y = 3500.0f; player->pos.y = 3500.0f;

View File

@ -793,7 +793,7 @@ void SectorZ_LevelStart(Player* player) {
gCsCamAtZ = 0.0f; gCsCamAtZ = 0.0f;
D_ctx_80177A48[0] = 1.0f; D_ctx_80177A48[0] = 1.0f;
player->unk_234 = 0; player->draw = false;
player->baseSpeed = 0.0f; player->baseSpeed = 0.0f;
player->camRoll = -20.0f; player->camRoll = -20.0f;
@ -983,7 +983,7 @@ void SectorZ_LevelStart(Player* player) {
player->unk_190 = 5.0f; player->unk_190 = 5.0f;
player->yRot_114 = 90.0f; player->yRot_114 = 90.0f;
player->baseSpeed = gArwingSpeed; player->baseSpeed = gArwingSpeed;
player->unk_234 = 1; player->draw = true;
AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, player->sfxSource, 0); AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, player->sfxSource, 0);
break; break;
} }
@ -1148,7 +1148,7 @@ void SectorZ_LevelComplete(Player* player) {
D_ctx_80177A48[0] = 1.0f; D_ctx_80177A48[0] = 1.0f;
gProjectFar = 30000.0f; gProjectFar = 30000.0f;
player->unk_234 = 0; player->draw = false;
player->baseSpeed = 0.0f; player->baseSpeed = 0.0f;
player->camRoll = 0.0f; player->camRoll = 0.0f;
@ -1160,7 +1160,7 @@ void SectorZ_LevelComplete(Player* player) {
case 0: case 0:
gCsFrameCount = 0; gCsFrameCount = 0;
player->unk_234 = 0; player->draw = false;
gCsCamEyeX = boss0->obj.pos.x; gCsCamEyeX = boss0->obj.pos.x;
gCsCamEyeY = boss0->obj.pos.y; gCsCamEyeY = boss0->obj.pos.y;
@ -1243,7 +1243,7 @@ void SectorZ_LevelComplete(Player* player) {
player->pos.z = 0.0f; player->pos.z = 0.0f;
player->rot.x = 0.0f; player->rot.x = 0.0f;
player->unk_234 = 1; player->draw = true;
player->rot.y = 180.0f; player->rot.y = 180.0f;
player->rot.z = 0.0f; player->rot.z = 0.0f;
player->yRot_114 = 0.0f; player->yRot_114 = 0.0f;
@ -1493,7 +1493,7 @@ void SectorZ_LevelComplete(Player* player) {
break; break;
case 1700: case 1700:
player->unk_204 = gLevelType; player->wingPosition = gLevelType;
break; break;
case 2450: case 2450:

View File

@ -3194,7 +3194,7 @@ void Macbeth_801A57D0(Effect* effect) {
effect->vel.z = sp44.z; effect->vel.z = sp44.z;
AUDIO_PLAY_SFX(NA_SE_ROLLING_REFLECT, effect->sfxSource, 4); AUDIO_PLAY_SFX(NA_SE_ROLLING_REFLECT, effect->sfxSource, 4);
} }
if ((gPlayer[0].barrelRollAlpha == 0) && (gPlayer[0].timer_498 == 0)) { if ((gPlayer[0].barrelRollAlpha == 0) && (gPlayer[0].mercyTimer == 0)) {
Player_ApplyDamage(&gPlayer[0], 0, effect->info.damage); Player_ApplyDamage(&gPlayer[0], 0, effect->info.damage);
gPlayer[0].knockback.x = 20.0f; gPlayer[0].knockback.x = 20.0f;
if (effect->vel.x < 0.0f) { if (effect->vel.x < 0.0f) {
@ -3239,7 +3239,7 @@ void Macbeth_801A5B4C(Effect* effect) {
effect->obj.rot.z = 0.0f; effect->obj.rot.z = 0.0f;
if ((fabsf(gPlayer[0].trueZpos - effect->obj.pos.z) < 100.0f) && if ((fabsf(gPlayer[0].trueZpos - effect->obj.pos.z) < 100.0f) &&
(fabsf(gPlayer[0].pos.x - effect->obj.pos.x) < 100.0f) && (fabsf(gPlayer[0].pos.x - effect->obj.pos.x) < 100.0f) &&
(fabsf(gPlayer[0].pos.y - effect->obj.pos.y) < 30.0f) && (gPlayer[0].timer_498 == 0)) { (fabsf(gPlayer[0].pos.y - effect->obj.pos.y) < 30.0f) && (gPlayer[0].mercyTimer == 0)) {
Player_ApplyDamage(gPlayer, 0, effect->info.damage); Player_ApplyDamage(gPlayer, 0, effect->info.damage);
gPlayer[0].knockback.x = 20.0f; gPlayer[0].knockback.x = 20.0f;
if (effect->vel.x < 0.0f) { if (effect->vel.x < 0.0f) {
@ -4965,7 +4965,7 @@ void Macbeth_LevelStart(Player* player) {
player->cam.at.x = gCsCamAtX = -910.0f; player->cam.at.x = gCsCamAtX = -910.0f;
player->cam.at.y = gCsCamAtY = 42.0f; player->cam.at.y = gCsCamAtY = 42.0f;
player->cam.at.z = gCsCamAtZ = -800.0f; player->cam.at.z = gCsCamAtZ = -800.0f;
player->unk_240 = 1; player->hideShadow = true;
player->csState = 2; player->csState = 2;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255;
gFillScreenAlpha = 255; gFillScreenAlpha = 255;
@ -5013,7 +5013,7 @@ void Macbeth_LevelStart(Player* player) {
AUDIO_PLAY_BGM(NA_BGM_STAGE_MA); AUDIO_PLAY_BGM(NA_BGM_STAGE_MA);
gLevelStartStatusScreenTimer = 50; gLevelStartStatusScreenTimer = 50;
player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE;
player->csState = player->csTimer = player->csEventTimer = player->unk_240 = 0; player->csState = player->csTimer = player->csEventTimer = player->hideShadow = 0;
player->gravity = 3.0f; player->gravity = 3.0f;
player->unk_014 = 0.0f; player->unk_014 = 0.0f;
D_ctx_8017782C = 1; D_ctx_8017782C = 1;
@ -5248,7 +5248,7 @@ void Macbeth_801AD6F0(Actor* actor) {
if ((fabsf(gPlayer[0].trueZpos - actor->obj.pos.z) < 40.0f) && if ((fabsf(gPlayer[0].trueZpos - actor->obj.pos.z) < 40.0f) &&
(fabsf(gPlayer[0].pos.x - actor->obj.pos.x) < 80.0f)) { (fabsf(gPlayer[0].pos.x - actor->obj.pos.x) < 80.0f)) {
if ((gPlayer[0].pos.y - actor->obj.pos.y > -5.0f) && if ((gPlayer[0].pos.y - actor->obj.pos.y > -5.0f) &&
(gPlayer[0].pos.y - actor->obj.pos.y < (actor->scale * 35.0f)) && (gPlayer[0].timer_498 == 0)) { (gPlayer[0].pos.y - actor->obj.pos.y < (actor->scale * 35.0f)) && (gPlayer[0].mercyTimer == 0)) {
Player_ApplyDamage(&gPlayer[0], 0, actor->info.damage); Player_ApplyDamage(&gPlayer[0], 0, actor->info.damage);
} }
} }
@ -5824,7 +5824,7 @@ void Macbeth_LevelComplete2(Player* player) {
case 0: case 0:
gCsFrameCount = 0; gCsFrameCount = 0;
gLoadLevelObjects = 1; gLoadLevelObjects = 1;
player->unk_234 = 0; player->draw = false;
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 30); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 30);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 30); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 30);
player->csState = 1; player->csState = 1;
@ -6220,7 +6220,7 @@ void Macbeth_LevelComplete2(Player* player) {
gFillScreenAlphaTarget = 0; gFillScreenAlphaTarget = 0;
gFillScreenAlphaStep = 8; gFillScreenAlphaStep = 8;
D_ctx_80177A48[0] = 0.0f; D_ctx_80177A48[0] = 0.0f;
player->unk_234 = 1; player->draw = true;
player->cam.at.x = gCsCamAtX = player->cam.eye.x = gCsCamEyeX = player->pos.x; player->cam.at.x = gCsCamAtX = player->cam.eye.x = gCsCamEyeX = player->pos.x;
player->cam.at.y = gCsCamAtY = player->pos.y + 70.0f; player->cam.at.y = gCsCamAtY = player->pos.y + 70.0f;
player->cam.eye.y = gCsCamEyeY = player->pos.y + 30.0f; player->cam.eye.y = gCsCamEyeY = player->pos.y + 30.0f;
@ -6239,9 +6239,9 @@ void Macbeth_LevelComplete2(Player* player) {
player->hitTimer = 0; player->hitTimer = 0;
player->pos.y = gGroundHeight - 3.0f; player->pos.y = gGroundHeight - 3.0f;
player->vel.y = -3.0f; player->vel.y = -3.0f;
player->barrelRoll = player->boostCooldown = player->boostMeter = player->unk_184 = player->rot_104.y = player->rollState = player->boostCooldown = player->boostMeter = player->unk_184 = player->rot_104.y =
player->rot_104.z = player->rot.y = player->rot.x = player->rot_104.x = 0.0f; player->rot_104.z = player->rot.y = player->rot.x = player->rot_104.x = 0.0f;
player->barrelInputTimerL = player->sfx.bank = 0; player->rollInputTimerL = player->sfx.bank = 0;
} }
break; break;
case 7: case 7:
@ -6427,7 +6427,7 @@ void Macbeth_LevelComplete2(Player* player) {
break; break;
case 2160: case 2160:
gProjectFar = 30000.0f; gProjectFar = 30000.0f;
player->unk_240 = 1; player->hideShadow = true;
Audio_StopPlayerNoise(0); Audio_StopPlayerNoise(0);
AUDIO_PLAY_SFX(NA_SE_TANK_GO_UP, player->sfxSource, 0); AUDIO_PLAY_SFX(NA_SE_TANK_GO_UP, player->sfxSource, 0);
break; break;

View File

@ -643,8 +643,8 @@ void Titania_8018AB44(Actor* actor) {
func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y + 50.0f, actor->obj.pos.z, (10.0f / 3.0f)); func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y + 50.0f, actor->obj.pos.z, (10.0f / 3.0f));
gPlayer[0].vel.y = 20.0f; gPlayer[0].vel.y = 20.0f;
gPlayer[0].pos.y += 15.0f; gPlayer[0].pos.y += 15.0f;
gPlayer[0].barrelRoll = 1; gPlayer[0].rollState = 1;
gPlayer[0].timer_1E8 = 15; gPlayer[0].rollTimer = 15;
gPlayer[0].rollRate = 20; gPlayer[0].rollRate = 20;
if (actor->obj.pos.x < gPlayer[0].pos.x) { if (actor->obj.pos.x < gPlayer[0].pos.x) {
gPlayer[0].rollRate = -20; gPlayer[0].rollRate = -20;
@ -978,8 +978,8 @@ void Titania_8018B9D0(Actor* actor) {
Player_ApplyDamage(gPlayer, 0, 60); Player_ApplyDamage(gPlayer, 0, 60);
gPlayer[0].vel.y = 20.0f; gPlayer[0].vel.y = 20.0f;
gPlayer[0].pos.y += 15.0f; gPlayer[0].pos.y += 15.0f;
gPlayer[0].barrelRoll = 1; gPlayer[0].rollState = 1;
gPlayer[0].timer_1E8 = 15; gPlayer[0].rollTimer = 15;
gPlayer[0].rollRate = 20; gPlayer[0].rollRate = 20;
if (actor->obj.pos.x < gPlayer[0].pos.x) { if (actor->obj.pos.x < gPlayer[0].pos.x) {
gPlayer[0].rollRate = -20; gPlayer[0].rollRate = -20;

View File

@ -74,7 +74,7 @@ void Titania_LevelStart(Player* player) {
player->cam.at.y = gCsCamAtY = player->pos.y; player->cam.at.y = gCsCamAtY = player->pos.y;
player->cam.at.z = gCsCamAtZ = player->pos.z; player->cam.at.z = gCsCamAtZ = player->pos.z;
player->unk_240 = 1; player->hideShadow = true;
player->csState = 1; player->csState = 1;
gFogFar = 1006; gFogFar = 1006;
gPlayer[0].unk_19C = 0; gPlayer[0].unk_19C = 0;
@ -222,7 +222,7 @@ void Titania_LevelStart(Player* player) {
if (gCsFrameCount == 580) { if (gCsFrameCount == 580) {
gLevelStartStatusScreenTimer = 50; gLevelStartStatusScreenTimer = 50;
player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE;
player->csState = player->csTimer = player->csEventTimer = player->unk_240 = 0; player->csState = player->csTimer = player->csEventTimer = player->hideShadow = 0;
player->gravity = 3.0f; player->gravity = 3.0f;
player->unk_014 = 0.0f; player->unk_014 = 0.0f;
D_ctx_8017782C = 1; D_ctx_8017782C = 1;
@ -499,7 +499,7 @@ void Titania_LevelComplete(Player* player) {
player->vel.y = 0.0f; player->vel.y = 0.0f;
Titania_80188108(&gActors[3], 3); Titania_80188108(&gActors[3], 3);
gProjectFar = 30000.0f; gProjectFar = 30000.0f;
player->unk_240 = 1; player->hideShadow = true;
Audio_StopPlayerNoise(0); Audio_StopPlayerNoise(0);
AUDIO_PLAY_SFX(NA_SE_TANK_GO_UP, player->sfxSource, 0); AUDIO_PLAY_SFX(NA_SE_TANK_GO_UP, player->sfxSource, 0);
break; break;

View File

@ -573,7 +573,7 @@ void Andross_80189214(void) {
} }
gLevelMode = LEVELMODE_ON_RAILS; gLevelMode = LEVELMODE_ON_RAILS;
player->unk_204 = 0; player->wingPosition = 0;
gPlayer[0].pos.x = 0.0f; gPlayer[0].pos.x = 0.0f;
player->cam.eye.z = 400.0f; player->cam.eye.z = 400.0f;
player->cam.at.z = player->cam.eye.z - 1000.0f; player->cam.at.z = player->cam.eye.z - 1000.0f;
@ -653,7 +653,7 @@ void Andross_80189470(Actor* actor) {
gCsCamAtX = 0.0f; gCsCamAtX = 0.0f;
gCsCamAtY = 620.0f; gCsCamAtY = 620.0f;
gCsCamAtZ = 0.0f; gCsCamAtZ = 0.0f;
player->unk_234 = 0; player->draw = false;
player->camRoll = 0.0f; player->camRoll = 0.0f;
D_ctx_80177A48[0] = 1.0f; D_ctx_80177A48[0] = 1.0f;
Play_ClearObjectData(); Play_ClearObjectData();
@ -809,7 +809,7 @@ void Andross_80189B70(Boss* boss) {
gPlayer[0].state_1C8 = PLAYERSTATE_1C8_START_360; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_START_360;
gPlayer[0].csState = 0; gPlayer[0].csState = 0;
boss->state = 1; boss->state = 1;
gPlayer[0].unk_240 = 1; gPlayer[0].hideShadow = true;
} }
break; break;
case 1: case 1:
@ -839,7 +839,7 @@ void Andross_80189B70(Boss* boss) {
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255;
gFillScreenAlphaTarget = 80; gFillScreenAlphaTarget = 80;
gFillScreenAlphaStep = 1; gFillScreenAlphaStep = 1;
gPlayer[0].timer_224 = gGameFrameCount % 8U; gPlayer[0].dmgEffectTimer = gGameFrameCount % 8U;
gPlayer[0].radioDamageTimer = 3; gPlayer[0].radioDamageTimer = 3;
Math_SmoothStepToF(&D_ctx_801779A8[gMainController], 40.0f, 1.0f, 3.0f, 0.0f); Math_SmoothStepToF(&D_ctx_801779A8[gMainController], 40.0f, 1.0f, 3.0f, 0.0f);
if (((gGameFrameCount % 32) == 0) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) { if (((gGameFrameCount % 32) == 0) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) {
@ -1012,7 +1012,7 @@ void Andross_80189B70(Boss* boss) {
gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE;
gPlayer[0].csState = 100; gPlayer[0].csState = 100;
gPlayer[0].csTimer = 240; gPlayer[0].csTimer = 240;
gPlayer[0].unk_234 = 1; gPlayer[0].draw = true;
D_ctx_80177A48[5] = -1200.0f; D_ctx_80177A48[5] = -1200.0f;
Andross_80188468(); Andross_80188468();
@ -1550,7 +1550,7 @@ void Andross_8018CF98(Effect* effect) {
} }
void Andross_8018D0D8(Boss* boss) { void Andross_8018D0D8(Boss* boss) {
if ((gPlayer[0].timer_498 == 0) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && if ((gPlayer[0].mercyTimer == 0) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) &&
(fabsf(boss->vwork[10].x - gPlayer[0].pos.x) < 700.0f) && (fabsf(boss->vwork[10].x - gPlayer[0].pos.x) < 700.0f) &&
(fabsf(boss->vwork[10].y - gPlayer[0].pos.y) < 700.0f)) { (fabsf(boss->vwork[10].y - gPlayer[0].pos.y) < 700.0f)) {
Player_ApplyDamage(&gPlayer[0], 0, 40); Player_ApplyDamage(&gPlayer[0], 0, 40);
@ -1837,7 +1837,7 @@ void Andross_8018DBF0(Boss* boss) {
Math_SmoothStepToF(&boss->fwork[11], 0.0f, 0.1f, 2.0f, 0); Math_SmoothStepToF(&boss->fwork[11], 0.0f, 0.1f, 2.0f, 0);
Math_SmoothStepToF(&boss->fwork[12], 0.0f, 0.1f, 2.0f, 0); Math_SmoothStepToF(&boss->fwork[12], 0.0f, 0.1f, 2.0f, 0);
Math_SmoothStepToF(&boss->fwork[13], 0.0f, 0.1f, 2.0f, 0); Math_SmoothStepToF(&boss->fwork[13], 0.0f, 0.1f, 2.0f, 0);
if (player->unk_234 != 0) { if (player->draw) {
xDisplacement = gPlayer[0].pos.x - boss->vwork[2].x; xDisplacement = gPlayer[0].pos.x - boss->vwork[2].x;
yDisplacement = gPlayer[0].pos.y - boss->vwork[2].y; yDisplacement = gPlayer[0].pos.y - boss->vwork[2].y;
zDisplacement = gPlayer[0].trueZpos - boss->vwork[2].z; zDisplacement = gPlayer[0].trueZpos - boss->vwork[2].z;
@ -1862,7 +1862,7 @@ void Andross_8018DBF0(Boss* boss) {
} }
Math_SmoothStepToAngle(&boss->vwork[4].x, pitch, 0.5f, 5.0f, 0); Math_SmoothStepToAngle(&boss->vwork[4].x, pitch, 0.5f, 5.0f, 0);
Math_SmoothStepToAngle(&boss->vwork[4].y, yaw, 0.5f, 5.0f, 0); Math_SmoothStepToAngle(&boss->vwork[4].y, yaw, 0.5f, 5.0f, 0);
if (player->unk_234 != 0) { if (player->draw) {
xDisplacement = gPlayer[0].pos.x - boss->vwork[3].x; xDisplacement = gPlayer[0].pos.x - boss->vwork[3].x;
yDisplacement = gPlayer[0].pos.y - boss->vwork[3].y; yDisplacement = gPlayer[0].pos.y - boss->vwork[3].y;
zDisplacement = gPlayer[0].trueZpos - boss->vwork[3].z; zDisplacement = gPlayer[0].trueZpos - boss->vwork[3].z;
@ -2277,7 +2277,7 @@ void Andross_8018DBF0(Boss* boss) {
} }
} }
if ((boss->unk_04C == 20) && (player->state_1C8 == PLAYERSTATE_1C8_ANDROSS_MOUTH)) { if ((boss->unk_04C == 20) && (player->state_1C8 == PLAYERSTATE_1C8_ANDROSS_MOUTH)) {
player->unk_234 = 0; player->draw = false;
for (i = 0; i < ARRAY_COUNT(gEffects); i++) { for (i = 0; i < ARRAY_COUNT(gEffects); i++) {
if (gEffects[i].obj.id == OBJ_EFFECT_396) { if (gEffects[i].obj.id == OBJ_EFFECT_396) {
Object_Kill(&gEffects[i].obj, gEffects[i].sfxSource); Object_Kill(&gEffects[i].obj, gEffects[i].sfxSource);
@ -2332,10 +2332,10 @@ void Andross_8018DBF0(Boss* boss) {
AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_VOMIT, boss->sfxSource, 4); AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_VOMIT, boss->sfxSource, 4);
} }
if ((boss->unk_04C == 13) && (player->state_1C8 == PLAYERSTATE_1C8_ANDROSS_MOUTH)) { if ((boss->unk_04C == 13) && (player->state_1C8 == PLAYERSTATE_1C8_ANDROSS_MOUTH)) {
player->unk_234 = 1; player->draw = true;
player->csState = 1; player->csState = 1;
player->csTimer = 60; player->csTimer = 60;
player->timer_498 = 50; player->mercyTimer = 50;
boss->swork[8] = 0; boss->swork[8] = 0;
gControllerRumbleTimers[0] = 30; gControllerRumbleTimers[0] = 30;
if (player->wings.rightState == 2) { if (player->wings.rightState == 2) {
@ -3649,7 +3649,7 @@ void Andross_80193C4C(Player* player) {
gCsCamAtY = 620.0f; gCsCamAtY = 620.0f;
gCsCamAtZ = 0.0f; gCsCamAtZ = 0.0f;
player->camRoll = 0.0f; player->camRoll = 0.0f;
player->unk_234 = 0; player->draw = false;
D_ctx_80177A48[0] = 1.0f; D_ctx_80177A48[0] = 1.0f;
Play_ClearObjectData(); Play_ClearObjectData();
gScenery360 = Memory_Allocate(200 * sizeof(Scenery360)); gScenery360 = Memory_Allocate(200 * sizeof(Scenery360));
@ -3781,7 +3781,7 @@ void Andross_80193C4C(Player* player) {
if (gCsFrameCount == 190) { if (gCsFrameCount == 190) {
Play_GenerateStarfield(); Play_GenerateStarfield();
gStarCount = 1000; gStarCount = 1000;
player->unk_204 = 0; player->wingPosition = 0;
} }
if (gCsFrameCount == 360) { if (gCsFrameCount == 360) {
gCsFrameCount = 340; gCsFrameCount = 340;

View File

@ -2047,7 +2047,7 @@ void SectorY_LevelComplete(Player* player) {
player->boostSpeed = 0.0f; player->boostSpeed = 0.0f;
player->wings.unk_04 = player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 = player->wings.unk_04 = player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 =
player->zRotBarrelRoll = player->zRotBank = 0.0f; player->zRotBarrelRoll = player->zRotBank = 0.0f;
player->unk_234 = 1; player->draw = true;
D_ctx_80177A48[8] = Math_RadToDeg( D_ctx_80177A48[8] = Math_RadToDeg(
Math_Atan2F(gPlayer[0].cam.eye.x - boss->obj.pos.x, gPlayer[0].cam.eye.z - boss->obj.pos.z)); Math_Atan2F(gPlayer[0].cam.eye.x - boss->obj.pos.x, gPlayer[0].cam.eye.z - boss->obj.pos.z));
Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[8] * M_DTOR, MTXF_NEW); Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[8] * M_DTOR, MTXF_NEW);
@ -2130,7 +2130,7 @@ void SectorY_LevelComplete(Player* player) {
case 2: case 2:
if (player->csTimer == 0) { if (player->csTimer == 0) {
player->unk_240 = 1; player->hideShadow = true;
player->pos.x = 0.0f; player->pos.x = 0.0f;
player->pos.y = 3500.0f; player->pos.y = 3500.0f;
player->pos.z = 0.0f; player->pos.z = 0.0f;
@ -2163,7 +2163,7 @@ void SectorY_LevelComplete(Player* player) {
gFillScreenAlphaTarget = 0; gFillScreenAlphaTarget = 0;
gFillScreenAlphaStep = 4; gFillScreenAlphaStep = 4;
if (gFillScreenAlpha == 0) { if (gFillScreenAlpha == 0) {
player->unk_204 = 1; player->wingPosition = 1;
} }
if (gCsFrameCount == 343) { if (gCsFrameCount == 343) {

View File

@ -120,7 +120,7 @@ void Venom2_UpdateEvents(Actor* this) {
} }
break; break;
case 3: case 3:
gPauseEnabled = 0; gPauseEnabled = false;
if (gStarWolfMsgTimer < 600) { if (gStarWolfMsgTimer < 600) {
player->cam.eye.x += wolf->vel.x * 0.23f; player->cam.eye.x += wolf->vel.x * 0.23f;
player->cam.eye.y += wolf->vel.y * 0.23f; player->cam.eye.y += wolf->vel.y * 0.23f;

View File

@ -5,10 +5,12 @@
*/ */
#include "mods.h" #include "mods.h"
// #include "prevent_bss_reordering.h"
#include "global.h" #include "global.h"
#include "fox_map.h" #include "fox_map.h"
#include "fox_option.h" #include "fox_option.h"
// #include "prevent_bss_reordering.h"
// #include "prevent_bss_reordering2.h"
// #include "prevent_bss_reordering3.h"
#include "assets/ast_map.h" #include "assets/ast_map.h"
#include "assets/ast_text.h" #include "assets/ast_text.h"
#include "assets/ast_font_3d.h" #include "assets/ast_font_3d.h"
@ -1704,6 +1706,10 @@ bool Map_8019FD1C(LevelId levelId, s32 arg1) {
s32 ret; s32 ret;
s32 planetSaveSlot; s32 planetSaveSlot;
#ifdef AVOID_UB
planetSaveSlot = PLANET_CORNERIA;
#endif
switch (levelId) { switch (levelId) {
case LEVEL_METEO: case LEVEL_METEO:
planetSaveSlot = PLANET_METEO; planetSaveSlot = PLANET_METEO;

View File

@ -1634,7 +1634,7 @@ void Option_ExpertSoundInit(void) {
} }
#if MODS_SFX_JUKEBOX == 1 #if MODS_SFX_JUKEBOX == 1
#include "../../mods/sfxjukebox2.c" #include "../../mods/sfxjukebox.c"
#endif #endif
// Expert Sound Options // Expert Sound Options

@ -1 +1 @@
Subproject commit 572ea9d09643c7584e40a5b952e7fad8590661f3 Subproject commit c1efb832f5ced7b7c6a5573d6bcdae2613aabf0e

View File

@ -23,6 +23,9 @@ compiler_type = "ido"
"RAND_RANGE" = "float" "RAND_RANGE" = "float"
"SIN_DEG" = "float" "SIN_DEG" = "float"
"COS_DEG" = "float" "COS_DEG" = "float"
"SIGN_OF" = "int"
"ABS" = "int"
"ABSF" = "float"
"true" = "int" "true" = "int"
"false" = "int" "false" = "int"
"DMG_.*" = "int" "DMG_.*" = "int"
@ -32,6 +35,8 @@ compiler_type = "ido"
"ALIGN.*" = "int" "ALIGN.*" = "int"
"OS_K0_TO_PHYSICAL" = "int" "OS_K0_TO_PHYSICAL" = "int"
"AUDIO_PLAY_SFX" = "void" "AUDIO_PLAY_SFX" = "void"
"NA_.*" = "int"
[decompme.compilers] [decompme.compilers]
"tools/ido-recomp/linux/cc" = "ido5.3" "tools/ido-recomp/linux/cc" = "ido5.3"

View File

@ -112,7 +112,7 @@
dir: overlays/ovl_i5 dir: overlays/ovl_i5
start: 0xE6A810 start: 0xE6A810
vram: 0x80187520 vram: 0x80187520
# follows_vram: ast_radio follows_vram: ast_radio
bss_size: 0xAF80 bss_size: 0xAF80
symbol_name_format: i5_$VRAM symbol_name_format: i5_$VRAM
subsegments: subsegments: