Further docs on script, various other things (#204)

* stuff

* too much

* Torch commit

* torch again

* names and such

* names

* even more stuff

* format

* enums

* whoops on the gbi
This commit is contained in:
petrie911 2024-04-08 17:25:56 -05:00 committed by GitHub
parent be0d328b4e
commit 52e1b6cb17
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
92 changed files with 5714 additions and 5203 deletions

View File

@ -136,7 +136,8 @@
"ast_vs_menu.h": "c",
"sf64mesg.h": "c",
"sf64audio_external.h": "c",
"audioseq_cmd.h": "c"
"audioseq_cmd.h": "c",
"ultralog.h": "c"
},
"C_Cpp_Runner.msvcBatchPath": ""
}

View File

@ -9,6 +9,8 @@
- '#include "sf64object.h"'
- '#include "structs.h"'
- '#include "sf64level.h"'
- '#include "sf64event.h"'
- '#include "sf64player.h"'
- '#include "sf64audio_external.h"'
- '#include "sf64mesg.h"'

View File

@ -9,6 +9,8 @@
- '#include "sf64object.h"'
- '#include "structs.h"'
- '#include "sf64level.h"'
- '#include "sf64event.h"'
- '#include "sf64player.h"'
- '#include "sf64audio_external.h"'
- '#include "sf64mesg.h"'

View File

@ -9,6 +9,8 @@
- '#include "sf64object.h"'
- '#include "structs.h"'
- '#include "sf64level.h"'
- '#include "sf64event.h"'
- '#include "sf64player.h"'
- '#include "sf64audio_external.h"'
- '#include "sf64mesg.h"'
D_A6_6000000:

View File

@ -9,6 +9,8 @@
- '#include "sf64object.h"'
- '#include "structs.h"'
- '#include "sf64level.h"'
- '#include "sf64event.h"'
- '#include "sf64player.h"'
- '#include "sf64audio_external.h"'
- '#include "sf64mesg.h"'
# Bolse Defense Outpost

View File

@ -9,6 +9,8 @@
- '#include "sf64object.h"'
- '#include "structs.h"'
- '#include "sf64level.h"'
- '#include "sf64event.h"'
- '#include "sf64player.h"'
- '#include "sf64audio_external.h"'
- '#include "sf64mesg.h"'

View File

@ -8,6 +8,8 @@
- '#include "gfx.h"'
- '#include "sf64object.h"'
- '#include "sf64level.h"'
- '#include "sf64event.h"'
- '#include "sf64player.h"'
- '#include "sf64audio_external.h"'
- '#include "structs.h"'

View File

@ -8,6 +8,8 @@
- '#include "gfx.h"'
- '#include "sf64object.h"'
- '#include "sf64level.h"'
- '#include "sf64event.h"'
- '#include "sf64player.h"'
- '#include "sf64audio_external.h"'
- '#include "structs.h"'

View File

@ -9,6 +9,8 @@
- '#include "sf64object.h"'
- '#include "structs.h"'
- '#include "sf64level.h"'
- '#include "sf64event.h"'
- '#include "sf64player.h"'
- '#include "sf64audio_external.h"'
- '#include "sf64mesg.h"'

View File

@ -9,6 +9,8 @@
- '#include "sf64object.h"'
- '#include "structs.h"'
- '#include "sf64level.h"'
- '#include "sf64event.h"'
- '#include "sf64player.h"'
- '#include "sf64audio_external.h"'
- '#include "sf64mesg.h"'
# Meteo

View File

@ -9,6 +9,8 @@
- '#include "sf64object.h"'
- '#include "structs.h"'
- '#include "sf64level.h"'
- '#include "sf64event.h"'
- '#include "sf64player.h"'
- '#include "sf64audio_external.h"'
- '#include "sf64mesg.h"'

View File

@ -9,6 +9,8 @@
- '#include "sf64object.h"'
- '#include "structs.h"'
- '#include "sf64level.h"'
- '#include "sf64event.h"'
- '#include "sf64player.h"'
- '#include "sf64audio_external.h"'
- '#include "sf64mesg.h"'
- '#include "sf64mesg.h"'

View File

@ -9,6 +9,8 @@
- '#include "sf64object.h"'
- '#include "structs.h"'
- '#include "sf64level.h"'
- '#include "sf64event.h"'
- '#include "sf64player.h"'
- '#include "sf64audio_external.h"'
- '#include "sf64mesg.h"'

View File

@ -9,6 +9,8 @@
- '#include "sf64object.h"'
- '#include "structs.h"'
- '#include "sf64level.h"'
- '#include "sf64event.h"'
- '#include "sf64player.h"'
- '#include "sf64audio_external.h"'
- '#include "sf64mesg.h"'

View File

@ -9,6 +9,8 @@
- '#include "sf64object.h"'
- '#include "structs.h"'
- '#include "sf64level.h"'
- '#include "sf64event.h"'
- '#include "sf64player.h"'
- '#include "sf64audio_external.h"'
- '#include "sf64mesg.h"'

View File

@ -9,6 +9,8 @@
- '#include "sf64object.h"'
- '#include "structs.h"'
- '#include "sf64level.h"'
- '#include "sf64event.h"'
- '#include "sf64player.h"'
- '#include "sf64audio_external.h"'
- '#include "sf64mesg.h"'

View File

@ -8,6 +8,8 @@
- '#include "gfx.h"'
- '#include "sf64object.h"'
- '#include "sf64level.h"'
- '#include "sf64event.h"'
- '#include "sf64player.h"'
- '#include "sf64audio_external.h"'
- '#include "structs.h"'
- '#include "sf64mesg.h"'

View File

@ -8,6 +8,8 @@
- '#include "gfx.h"'
- '#include "sf64object.h"'
- '#include "sf64level.h"'
- '#include "sf64event.h"'
- '#include "sf64player.h"'
- '#include "sf64audio_external.h"'
- '#include "structs.h"'

View File

@ -9,6 +9,8 @@
- '#include "sf64object.h"'
- '#include "structs.h"'
- '#include "sf64level.h"'
- '#include "sf64event.h"'
- '#include "sf64player.h"'
- '#include "sf64audio_external.h"'
- '#include "sf64mesg.h"'

View File

@ -9,6 +9,8 @@
- '#include "sf64object.h"'
- '#include "structs.h"'
- '#include "sf64level.h"'
- '#include "sf64event.h"'
- '#include "sf64player.h"'
- '#include "sf64audio_external.h"'
- '#include "sf64mesg.h"'
D_ZO_6000000:

View File

@ -16,4 +16,6 @@ f7475fb11e7e6830f82883412638e8390791ab87:
- include/sf64object.h
- include/sf64level.h
- include/sf64mesg.h
- include/sf64audio_external.h
- include/sf64audio_external.h
- include/sf64event.h
- include/sf64player.h

View File

@ -11,10 +11,10 @@ extern s32 gOverlayStage;
extern s32 D_ctx_80177824; // some sort of flag
extern s32 D_ctx_8017782C; // some sort of flag. all range related?
extern GameState gGameState;
extern s32 D_Timer_8017783C; // next game state timer?
extern s32 gNextGameStateTimer; // next game state timer?
extern s32 D_ctx_80177844; // timer for vs item spawn
extern OptionState gOptionMenuStatus;
extern s32 D_ctx_80177854; // pause-related state
extern s32 gPlayState; // pause-related state
extern s32 D_ctx_80177868; // some sort of state. pause-related?
extern LevelMode gLevelMode;
extern DrawMode gDrawMode;
@ -22,9 +22,9 @@ extern s32 gPlayerNum;
extern s32 gCamCount;
extern s32 gTeamShields[6];
extern s32 gSavedTeamShields[6];
extern UNK_TYPE D_ctx_801778F0[6];
extern UNK_TYPE gPrevPlanetSavedTeamShields[6];
extern s32 gTeamDamage[6];
extern u8 D_ctx_80177930; // next planet path
extern u8 gNextPlanetPath; // next planet path
extern f32 gGroundLevel;
extern f32 D_ctx_80177950;
extern f32 D_ctx_80177968;
@ -53,7 +53,7 @@ extern s32 D_ctx_80177B70[7];
extern PlanetId D_ctx_80177B90[7];
extern s32 D_ctx_80177BB0[7];
extern s32 D_ctx_80177BD8[22]; // overruns D_ctx_80177C30?
extern s32 D_ctx_80177C38[6];
extern s32 gPrevPlanetTeamShields[6];
extern s32 D_ctx_80177C58[6];
extern u8 gSoundMode;
extern s32 gVolumeSettings[3];
@ -77,13 +77,13 @@ extern s32 gGameFrameCount;
extern s32 D_ctx_80177DC8;
extern s32 D_ctx_80177E70;
extern s32 D_ctx_80177E78;
extern s32 D_ctx_80177E80;
extern s32 gRingPassCount;
extern Vec3f D_ctx_80177E88;
extern Vec3f D_ctx_80177F10;
extern UNK_TYPE F_80178020;
extern s32 D_ctx_8017812C;
extern LevelId gCurrentLevel;
extern s32 D_ctx_8017827C;
extern s32 gLevelStage;
extern s32 gBossActive;
extern s32 D_ctx_8017828C;
extern s32 D_ctx_80178294;
@ -101,17 +101,17 @@ extern UNK_TYPE F_801782F0;
extern s32 D_ctx_801782F8;
extern s32 D_ctx_80178300;
extern u16* D_ctx_80178308;
extern ObjectInit* D_ctx_80178310;
extern ObjectInit* gLevelObjects;
extern s32 gFogRed;
extern s32 gFogGreen;
extern s32 gFogBlue;
extern s32 gFogAlpha;
extern s32 D_ctx_80178340; // alpha something
extern s32 D_ctx_80178348; // red something
extern s32 D_ctx_80178350; // green something
extern s32 D_ctx_80178354; // blue something
extern s32 D_ctx_80178358; // alpha target
extern s32 D_ctx_8017835C; // alpha step
extern s32 gFillScreenAlpha; // alpha something
extern s32 gFillScreenRed; // red something
extern s32 gFillScreenGreen; // green something
extern s32 gFillScreenBlue; // blue something
extern s32 gFillScreenAlphaTarget; // alpha target
extern s32 gFillScreenAlphaStep; // alpha step
extern s32 D_ctx_80178360; // 2 lights second color
extern s32 D_ctx_80178364;
extern s32 D_ctx_80178368;
@ -120,10 +120,10 @@ extern f32 D_ctx_80178370; // Vec3f?
extern f32 D_ctx_80178374;
extern f32 D_ctx_80178378;
extern s32 D_ctx_8017837C;
extern u32 D_ctx_80178380[4]; // player alphas
extern s32 D_ctx_80178390[4]; // player reds
extern s32 D_ctx_801783A0[4]; // player greens
extern s32 D_ctx_801783B0[4]; // player blues
extern u32 gPlayerFillScreenAlphas[4]; // player alphas
extern s32 gPlayerFillScreenReds[4]; // player reds
extern s32 gPlayerFillScreenGreens[4]; // player greens
extern s32 gPlayerFillScreenBlues[4]; // player blues
extern s32 D_ctx_801783C0[4];
extern f32 D_ctx_801783D0; // something x translate
extern f32 D_ctx_801783D4; // something y translate
@ -218,8 +218,8 @@ extern s32 D_ctx_80161A78;
extern s32 D_ctx_80161A7C;
extern s32 D_ctx_80161A80;
extern s32 D_ctx_80161A84;
extern s32 D_ctx_80161A88;
extern s32 D_ctx_80161A8C;
extern s32 gGroundType;
extern s32 gSavedGroundType;
extern u8 gGoldRingCount[4];
extern u8 D_ctx_80161A94[4];
extern s32 gHitCount;
@ -229,7 +229,7 @@ extern LaserStrength gLaserStrength[4];
extern s32 D_ctx_80161AB8;
extern UNK_TYPE F_80161AC0[16];
extern Object_80 gObjects80[50];
extern Object_4C gObjects4C[40];
extern Sprite gSprites[40];
extern Actor gActors[60];
extern Boss gBosses[4];
extern Effect gEffects[100];
@ -245,10 +245,10 @@ extern f32 D_ctx_80176B98[2][100];
extern f32 D_ctx_80176EB8[2][100];
extern f32 D_ctx_801771D8[2][100];
extern f32 D_ctx_80177500[2][100];
extern u16 D_ctx_80177828; // enemy shot speed?
extern u16 gEnemyShotSpeed; // enemy shot speed?
extern u8 D_ctx_80177830; // show level complete status overlay
extern s32 D_ctx_80177838; // level clear related
extern s32 D_ctx_80177840; // timer for mission accomplished scrren
extern s32 gLevelStatusScreenTimer; // level clear related
extern s32 gLevelClearScreenTimer; // timer for mission accomplished scrren
extern s32 gBossHealthBar;
extern s32 D_ctx_80177850; // bonus text related. set to 15 but never read
extern s32 D_ctx_80177858[4];
@ -270,7 +270,7 @@ extern OSContPad* gInputPress;
extern u8* D_ctx_80177984;
extern s32 D_ctx_80177990[4];
extern f32 D_ctx_801779A8[4];
extern u8 D_ctx_801779BC;
extern u8 gPauseEnabled;
extern s32 gChargeTimers[4];
extern f32 D_ctx_801779E4;
extern f32 D_ctx_801779F4;
@ -301,8 +301,8 @@ extern s32 D_ctx_80177CAC;
extern s32 D_ctx_80177CB4;
extern s32 D_ctx_80177CBC;
extern s32 D_ctx_80177CC4;
extern s32 D_ctx_80177CD0[6];
extern s32 D_ctx_80177CF0[6];
extern s32 gStarWolfTeamAlive[6];
extern s32 gSavedStarWolfTeamAlive[6];
extern s32 gRightWingHealth[4];
extern s32 gLeftWingHealth[4];
extern s32 D_ctx_80177D40[4];
@ -314,8 +314,8 @@ extern s32 D_ctx_80177DB8[4];
extern s32 D_ctx_80177DD0[4][10];
extern s32 D_ctx_80177E74;
extern s32 D_ctx_80177E7C;
extern s32 D_ctx_80177E84;
extern Vec3f D_ctx_80177E98[10];
extern s32 gChangeTo360;
extern Vec3f gTeamArrowsViewPos[10];
extern f32 D_ctx_80177F20[65];
extern f32 D_ctx_80178028[65];
extern f32 D_ctx_80178130[65];

View File

@ -77,7 +77,7 @@ typedef enum OptionId {
#define OPTION_COUNT ARRAY_COUNT(sOptionCardList)
extern void* D_menu_801B68B0[];
extern u8* D_menu_801B68B0[];
extern u8* D_menu_801B68D4[];
extern s32 D_menu_801B8220[]; // total hits ranking? see Option_80197DE4

View File

@ -10,7 +10,7 @@
// fox_360
void func_360_8002ED60(Player*);
void func_360_8002E3E0(Actor*);
void func_360_8002E548(void);
void AllRange_UpdateCountdown(void);
void func_360_8002E5E0(Boss*);
void func_360_8002E604(Boss*);
void func_360_8002E628(Boss*);
@ -30,7 +30,7 @@ void func_360_8002FC00(Actor*);
void func_360_8003088C(Actor*);
bool func_360_80031900(Actor*);
void ActorAllRange_Update(Actor* this);
void ActorAllRange_Draw(Actor* actor);
void ActorAllRange_Draw(Actor* this);
//fox_beam
void func_beam_80038140(PlayerShot* shot);
@ -38,8 +38,8 @@ void func_beam_80036318(PlayerShot* shot);
void func_beam_80035DEC(f32 xPos, f32 yPos, f32 zPos);
void PlayerShot_Initialize(PlayerShot*);
void func_beam_800365E4(f32, f32, f32, f32, f32, f32, f32, f32, f32, s32, s32);
void func_beam_8003D9B8(void);
void func_beam_8003DA0C(void);
void PlayerShot_Update(void);
void PlayerShot_Draw(void);
// fox_bg
void func_bg_8003DAF0(void);
@ -91,7 +91,7 @@ void func_demo_800515C4(void);
void func_display_80053658(WingInfo*);
void func_display_8005465C(s32);
void func_display_80057814(Player*);
void func_display_80057D00(void);
void Play_Draw(void);
// fox_edata
void func_edata_800594F0(Object_80*);
@ -101,15 +101,15 @@ void func_edata_800596B0(Actor*);
// fox_edisplay
void Graphics_SetScaleMtx(f32);
void func_edisplay_80059850(Object_4C*);
void Sprite168_Draw(Sprite*);
void Actor201_Draw(Actor*);
void Actor202_Draw(Actor*);
void Obj39_Draw(Object_80*);
void func_edisplay_80059B20(Object_80*);
void Obj42_Draw(Object_80*);
void Actor196_Draw(Actor*);
void func_edisplay_80059C34(Object_4C*);
void func_edisplay_80059C40(Object_4C*);
void Sprite167_Draw(Sprite*);
void FogShadow_Draw(Sprite*);
void func_edisplay_80059F68(Object_80*);
void func_edisplay_80059FDC(Object_80*);
void Actor189_Draw(Actor*);
@ -146,7 +146,7 @@ void Object_Kill(Object*, f32*);
bool func_enmy_80060FE4(Vec3f*, f32);
void Object_SetInfo(ObjectInfo* info, u32 objId);
void Object_80_Initialize(Object_80*);
void Object_4C_Initialize(Object_4C*);
void Sprite_Initialize(Sprite*);
void Actor_Initialize(Actor*);
void Boss_Initialize(Boss*);
void Item_Initialize(Item*);
@ -167,14 +167,14 @@ void func_enmy_800652CC(Object_80*);
void func_enmy_800654E4(Object*);
void func_enmy_800656D4(Actor*);
void func_enmy_800660F0(Actor*);
void func_enmy_80066254(Actor*);
void Actor_Despawn(Actor*);
void func_enmy_8006654C(Actor*);
void func_enmy_8006684C(Actor*);
void func_enmy_800669A0(Actor*);
void func_enmy_80066A80(Actor*);
void func_enmy_80066C00(Object_80*);
void func_enmy_80066D5C(Object_80*);
void func_enmy_80066E8C(Object_4C*);
void Sprite167_Update(Sprite*);
void func_enmy_80066EA8(Object_80*);
void func_enmy_80066EF0(Item*);
void func_enmy_800671D0(Item*);
@ -191,25 +191,25 @@ void ItemGoldRing_Update(Item*);
void ItemWingRepair_Update(Item*);
void ItemMeteoWarp_Update(Item*);
void ItemCheckpoint_Update(Item*);
void func_enmy_80068C48(Item*);
void func_enmy_80068C88(Item*);
void func_enmy_80068FE0(Object_4C*);
void ItemRingCheck_Update(Item*);
void ItemPathChange_Update(Item*);
void Sprite_UpdateDoodad(Sprite*);
void Object_Dying(s32, ObjectId);
void func_enmy_80069924(Effect*);
void func_enmy_800693E8(Actor*);
void func_enmy_80069658(Boss*);
void func_enmy_800696F8(Object_80*);
void func_enmy_80069858(Object_4C*);
void func_enmy_80069A10(Item*);
void Effect_Move(Effect*);
void Actor_Move(Actor*);
void Boss_Move(Boss*);
void Object80_Move(Object_80*);
void Sprite_Move(Sprite*);
void Item_Move(Item*);
void Actor_Update(Actor*);
void Boss_Update(Boss*);
void Object_80_Update(Object_80*);
void Object_4C_Update(Object_4C*);
void Sprite_Update(Sprite*);
void Item_Update(Item*);
void Effect_Update(Effect*);
void TexturedLine_Update(TexturedLine*);
void TexturedLine_UpdateAll(void);
void Object_UpdateAll(void);
void Object_Update(void);
//fox_enmy2
void Actor237_Update(Actor*);
@ -342,11 +342,11 @@ void func_effect_8007E3E4(Effect*);
void func_effect_8007E45C(Effect*);
void func_effect_8007E5CC(Effect*);
void func_effect_8007E648(Effect*);
void func_effect_8007E93C(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPos, f32 arg5);
void func_effect_8007E93C(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPos, f32 speed);
void func_effect_8007EE68(ObjectId objId, Vec3f* pos, Vec3f* rot, Vec3f* arg3, Vec3f* arg4, f32 scale2);
void func_effect_8007F04C(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 zRot, f32 unkX, f32 unkY, f32 unkZ, f32 xVel, f32 yVel, f32 zVel, f32 scale2);
void func_effect_8007F11C(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 arg4);
void func_effect_8007F20C(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 arg4);
void func_effect_8007F11C(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 speed);
void func_effect_8007F20C(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 speed);
void func_effect_8007F438(Effect*);
void func_effect_8007F6B0(Effect*);
void func_effect_8007F958(Effect*);
@ -418,7 +418,7 @@ bool func_hud_800915FC(Actor*);
bool func_hud_800924E0(Actor*);
void ActorTeamBoss_Init(Actor*);
void ActorTeamBoss_Update(Actor* actor);
void ActorTeamBoss_Update(Actor* this);
void func_hud_80093164(Actor*);
void func_hud_800935E8(Player*);
void func_hud_800953A0(Actor*, s32);
@ -447,7 +447,7 @@ void func_play_800A3FB0(void);
s32 Play_GetMaxShields(void);
void func_play_800A6028(f32*, u32);
void func_play_800AC290(Player* player, PlayerShot* shot, f32 arg2, f32 arg3, PlayerShotId shotId, f32 arg5);
void func_play_800A5844(void);
void Play_Setup(void);
void func_play_800A594C(void);
void func_play_800A5D6C(void);
void func_play_800A5EBC(void);
@ -478,7 +478,7 @@ void func_play_800B6F50(f32, f32, f32, f32, f32, f32);
void func_play_800B7184(Player*, s32);
void func_play_800B73E0(Player*);
void func_play_800B852C(ObjectId , Item*);
void func_play_800B86CC(void);
void Play_Main(void);
void func_play_800A668C(f32 xPos, f32 yPos, f32 zPos);
void func_play_800AD7F0(Player* player);
void func_play_800ADF58(Player* player);

View File

@ -12,6 +12,7 @@
#include "assets/ast_radio.h"
#include "sf64object.h"
#include "sf64level.h"
#include "sf64event.h"
#include "sf64player.h"
#include "i1.h"
#include "i2.h"

View File

@ -15,7 +15,7 @@ extern void Corneria_8018F880(Player*);
extern void Corneria_80191160(Player*);
extern void Venom1_801988B8(Player*);
void Corneria_801875A4(Object_4C*);
void Corneria_801875A4(Sprite*);
void Corneria_80189058(Boss*);
void Corneria_8018AA74(Boss*);
void Corneria_8018AED0(Actor*);
@ -36,10 +36,10 @@ void Corneria_8018EE84(Boss*);
void Corneria_8018EF90(Boss*);
void Corneria_8018F044(Object_80*);
void Corneria_8018F31C(Object_80*);
void Venom1_801922DC(Object_4C*);
void Venom1_80192358(Object_4C*);
void Venom1_801923C0(Object_4C*);
void Venom1_8019243C(Object_4C*);
void Venom1_BossTrigger1_Update(Sprite*);
void Venom1_BossTrigger2_Update(Sprite*);
void Venom1_BossTrigger3_Update(Sprite*);
void Venom1_BossTrigger4_Update(Sprite*);
void Venom1_80192518(Actor*);
void Venom1_80192CD4(Actor*);
void Venom1_80192E2C(Actor*);

View File

@ -45,7 +45,7 @@ void Zoness_80192834(Actor* actor);
void Zoness_80192C18(Actor* actor);
void Zoness_80192E64(Actor* actor);
void Zoness_80193240(Actor* actor);
void Zoness_BossZo_Init(Boss* bossZO);
void Zoness_BossZo_Init(Boss* this);
void Zoness_801949DC(Boss* bossZO);
void Zoness_80194A84(Boss* bossZO);
void Zoness_8019969C(Actor* actor);
@ -69,7 +69,7 @@ void Zoness_8019C454(Actor* actor);
void Zoness_8019C83C(Actor* actor);
void Zoness_8019CBEC(Actor* actor);
void Zoness_8019CE58(Actor* actor);
void Zoness_Actor247_Init(Actor* actor);
void Zoness_Actor247_Init(Actor* this);
void Zoness_8019D15C(Actor* actor);
void Zoness_8019D3C4(Actor* actor);
void Zoness_8019D428(Player* player);

View File

@ -35,7 +35,7 @@ void Titania_8018BFB0(Actor *);
void Titania_8018E3B0(Actor *);
void Titania_8018E3CC(Actor *);
void Titania_8018E5E8(Actor *);
void Titania_8018EFF0(Object_4C *);
void Titania_8018EFF0(Sprite *);
void Titania_8018F0D8(Object_80 *);
void Titania_Boss306_Init(Boss *);
void Titania_801990DC(Boss *);
@ -80,7 +80,7 @@ void Titania_8018E54C(Actor*);
void Titania_8018E5B4(Actor*);
void Titania_8018E5F8(Actor*);
void Titania_8018EF14(Actor*);
void Titania_8018F038(Object_4C*);
void Titania_Cactus_Update(Sprite*);
void Titania_8018F4D8(Object_80*);
void Titania_8018F8B8(Object_80*);
void Titania_80197A94(Boss*);

View File

@ -32,7 +32,7 @@
#include <PR/libaudio.h>
#include <PR/gu.h>
#include <PR/ramrom.h>
#include <PR/sp.h>
// #include <PR/sp.h>
#include <PR/ucode.h>
#include <PR/ultraerror.h>
#include <PR/ultralog.h>

View File

@ -0,0 +1,28 @@
#ifndef PREVENT_BSS_REORDERING3_H
#define PREVENT_BSS_REORDERING3_H
/**
* See the explanation at prevent_bss_reordering.h
*
* Instead of producing 64 dummy declarations, this header only produces 32
* dummy declarations
*/
struct Dummy200 { int x; };
struct Dummy201 { int x; };
struct Dummy202 { int x; };
struct Dummy203 { int x; };
struct Dummy204 { int x; };
struct Dummy205 { int x; };
struct Dummy206 { int x; };
struct Dummy207 { int x; };
struct Dummy208 { int x; };
struct Dummy209 { int x; };
struct Dummy210 { int x; };
struct Dummy211 { int x; };
struct Dummy212 { int x; };
struct Dummy213 { int x; };
struct Dummy214 { int x; };
struct Dummy215 { int x; };
#endif

View File

@ -1,7 +1,7 @@
#ifndef PREVENT_CONTEXT_REORDERING_H
#define PREVENT_CONTEXT_REORDERING_H
extern int Dummyhalf;
// extern int Dummyhalf;
// struct Dummy0 {int x;};
// struct Dummy1 {int x;};
// struct Dummy2 {int x;};
@ -9,20 +9,20 @@ extern int Dummyhalf;
// struct Dummy4 {int x;};
// struct Dummy5 {int x;};
// struct Dummy6 {int x;};
// struct Dummy7 {int x;};
// struct Dummy8 {int x;};
// struct Dummy9 {int x;};
// struct Dummy10 {int x;};
// struct Dummy11 {int x;};
// struct Dummy12 {int x;};
// struct Dummy13 {int x;};
// struct Dummy14 {int x;};
// struct Dummy15 {int x;};
// struct Dummy16 {int x;};
// struct Dummy17 {int x;};
// struct Dummy18 {int x;};
// struct Dummy19 {int x;};
// struct Dummy20 {int x;};
struct Dummy7 {int x;};
struct Dummy8 {int x;};
struct Dummy9 {int x;};
struct Dummy10 {int x;};
struct Dummy11 {int x;};
struct Dummy12 {int x;};
struct Dummy13 {int x;};
struct Dummy14 {int x;};
struct Dummy15 {int x;};
struct Dummy16 {int x;};
struct Dummy17 {int x;};
struct Dummy18 {int x;};
struct Dummy19 {int x;};
struct Dummy20 {int x;};
struct Dummy21 {int x;};
struct Dummy22 {int x;};
struct Dummy23 {int x;};
@ -74,60 +74,60 @@ struct Dummy68 {int x;};
struct Dummy69 {int x;};
struct Dummy70 {int x;};
struct Dummy71 {int x;};
// struct Dummy72 {int x;};
// struct Dummy73 {int x;};
// struct Dummy75 { int x; };
// struct Dummy76 { int x; };
// struct Dummy77 { int x; };
// struct Dummy78 { int x; };
// struct Dummy79 { int x; };
// struct Dummy80 { int x; };
// struct Dummy81 { int x; };
// struct Dummy82 { int x; };
// struct Dummy83 { int x; };
// struct Dummy84 { int x; };
// struct Dummy85 { int x; };
// struct Dummy86 { int x; };
// struct Dummy87 { int x; };
// struct Dummy88 { int x; };
// struct Dummy89 { int x; };
// struct Dummy90 { int x; };
// struct Dummy91 { int x; };
// struct Dummy92 { int x; };
// struct Dummy93 { int x; };
// struct Dummy94 { int x; };
// struct Dummy95 { int x; };
// struct Dummy96 { int x; };
// struct Dummy97 { int x; };
// struct Dummy98 { int x; };
// struct Dummy99 { int x; };
// struct Dummy100 { int x; };
// struct Dummy101 { int x; };
// struct Dummy102 { int x; };
// struct Dummy103 { int x; };
// struct Dummy104 { int x; };
// struct Dummy105 { int x; };
// struct Dummy106 { int x; };
// struct Dummy107 { int x; };
// struct Dummy108 { int x; };
// struct Dummy109 { int x; };
// struct Dummy110 { int x; };
// struct Dummy111 { int x; };
// struct Dummy112 { int x; };
// struct Dummy113 { int x; };
// struct Dummy114 { int x; };
// struct Dummy115 { int x; };
// struct Dummy116 { int x; };
// struct Dummy117 { int x; };
// struct Dummy118 { int x; };
// struct Dummy119 { int x; };
// struct Dummy120 { int x; };
// struct Dummy121 { int x; };
// struct Dummy122 { int x; };
// struct Dummy123 { int x; };
// struct Dummy124 { int x; };
// struct Dummy125 { int x; };
// struct Dummy126 { int x; };
// struct Dummy127 { int x; };
struct Dummy72 {int x;};
struct Dummy73 {int x;};
struct Dummy75 { int x; };
struct Dummy76 { int x; };
struct Dummy77 { int x; };
struct Dummy78 { int x; };
struct Dummy79 { int x; };
struct Dummy80 { int x; };
struct Dummy81 { int x; };
struct Dummy82 { int x; };
struct Dummy83 { int x; };
struct Dummy84 { int x; };
struct Dummy85 { int x; };
struct Dummy86 { int x; };
struct Dummy87 { int x; };
struct Dummy88 { int x; };
struct Dummy89 { int x; };
struct Dummy90 { int x; };
struct Dummy91 { int x; };
struct Dummy92 { int x; };
struct Dummy93 { int x; };
struct Dummy94 { int x; };
struct Dummy95 { int x; };
struct Dummy96 { int x; };
struct Dummy97 { int x; };
struct Dummy98 { int x; };
struct Dummy99 { int x; };
struct Dummy100 { int x; };
struct Dummy101 { int x; };
struct Dummy102 { int x; };
struct Dummy103 { int x; };
struct Dummy104 { int x; };
struct Dummy105 { int x; };
struct Dummy106 { int x; };
struct Dummy107 { int x; };
struct Dummy108 { int x; };
struct Dummy109 { int x; };
struct Dummy110 { int x; };
struct Dummy111 { int x; };
struct Dummy112 { int x; };
struct Dummy113 { int x; };
struct Dummy114 { int x; };
struct Dummy115 { int x; };
struct Dummy116 { int x; };
struct Dummy117 { int x; };
struct Dummy118 { int x; };
struct Dummy119 { int x; };
struct Dummy120 { int x; };
struct Dummy121 { int x; };
struct Dummy122 { int x; };
struct Dummy123 { int x; };
struct Dummy124 { int x; };
struct Dummy125 { int x; };
struct Dummy126 { int x; };
struct Dummy127 { int x; };
#endif

374
include/sf64event.h Normal file
View File

@ -0,0 +1,374 @@
#ifndef SF64_EVENT
#define SF64_EVENT
#define EV_OPC(opcode) (((opcode) & 0x7F) << 9)
#define EV_OPC_MASK(cmd) ((cmd) & (0x7F << 9))
#define EVENT_CMD(opcode, arg1, arg2) (EV_OPC(opcode) | ((s16) (arg1) & 0x1FF)), (arg2)
#define EV_ZMODE(zmode) (((zmode) & 3) << 7)
#define EV_ZMODE_MASK(cmd) ((cmd) & (3 << 7))
#define EV_CHANGE_AI 200
#define EVENT_PLAY_MSG(rcid, msg) EVENT_CMD(EVOP_PLAY_MSG, rcid, msg)
#define EVENT_STOP_SCRIPT() EVENT_CMD(EVOP_STOP_SCRIPT, 0, 0)
#define EVENT_MAKE_TEXLINE(color) EVENT_CMD(EVOP_MAKE_TEXLINE, 0, color)
#define EVENT_STOP_TEXLINE() EVENT_CMD(EVOP_STOP_TEXLINE, 0, 0)
#define EVENT_INIT_ACTOR(info, health) EVENT_CMD(EVOP_INIT_ACTOR, health, info)
#define EVENT_SET_SPEED(speed, zmode, time) EVENT_CMD(EVOP_SET_SPEED, EV_ZMODE(zmode) | ((speed) & 0x7F), time)
#define EVENT_SET_ACCEL(speedTarget, zmode, time) EVENT_CMD(EVOP_SET_ACCEL, EV_ZMODE(zmode) | ((speedTarget) & 0x7F), time)
#define EVENT_SET_ROTATE() EVENT_CMD(EVOP_SET_ROTATE, 0, 0)
#define EVENT_STOP_ROTATE() EVENT_CMD(EVOP_STOP_ROTATE, 0, 0)
#define EVENT_SET_TRIGGER(cond, cmd) EVENT_CMD(EVOP_SET_TRIGGER, cmd, cond)
#define EVENT_CLEAR_TRIGGER(cmd) EVENT_SET_TRIGGER(EVC_NONE, cmd)
#define EVENT_LOOP(count, cmd) EVENT_CMD(EVOP_LOOP, cmd, count)
#define EVENT_GOTO(cmd) EVENT_LOOP(0, cmd)
#define EVENT_SET_GROUND(type) EVENT_CMD(EVOP_SET_GROUND, 0, type)
#define EVENT_DROP_ITEM(item) EVENT_CMD(EVOP_DROP_ITEM, 0, item)
#define EVENT_ADD_TO_GROUP(num, flags) EVENT_CMD(EVOP_ADD_TO_GROUP, flags, num)
#define EVENT_SET_REVERB(reverb) EVENT_CMD(EVOP_SET_REVERB, 0, reverb)
#define EVENT_STOP_BGM() EVENT_CMD(EVOP_STOP_BGM, 0, 0)
#define EVENT_SET_ACTION(action) EVENT_CMD(EVOP_SET_ACTION, 0, action)
#define EVENT_RESTORE_TEAM(teammate) EVENT_CMD(EVOP_RESTORE_TEAM, 0, teammate)
#define EVENT_PLAY_SFX(sfx) EVENT_CMD(EVOP_PLAY_SFX, 0, sfx)
#define EVENT_STOP_SFX(sfx) EVENT_CMD(EVOP_STOP_SFX, 0, sfx)
#define EVENT_SET_CALL(duration, voiceParam) EVENT_CMD(EVOP_SET_CALL, voiceParam, duration)
#define EVENT_ROT_PLUS_X(rot, rotVel) EVENT_CMD(EVOP_ROT_PLUS_X, rotVel * 10, rot)
#define EVENT_ROT_MINUS_X(rot, rotVel) EVENT_CMD(EVOP_ROT_MINUS_X, rotVel * 10, rot)
#define EVENT_ROT_PLUS_Y(rot, rotVel) EVENT_CMD(EVOP_ROT_PLUS_Y, rotVel * 10, rot)
#define EVENT_ROT_MINUS_Y(rot, rotVel) EVENT_CMD(EVOP_ROT_MINUS_Y, rotVel * 10, rot)
#define EVENT_ROT_PLUS_Z(rot, rotVel) EVENT_CMD(EVOP_ROT_PLUS_Z, rotVel * 10, rot)
#define EVENT_ROT_MINUS_Z(rot, rotVel) EVENT_CMD(EVOP_ROT_MINUS_Z, rotVel * 10, rot)
#define EVENT_F4_PLUS_X(rot, rotVel) EVENT_CMD(EVOP_F4_PLUS_X, rotVel * 10, rot)
#define EVENT_F4_MINUS_X(rot, rotVel) EVENT_CMD(EVOP_F4_MINUS_X, rotVel * 10, rot)
#define EVENT_F4_PLUS_Y(rot, rotVel) EVENT_CMD(EVOP_F4_PLUS_Y, rotVel * 10, rot)
#define EVENT_F4_MINUS_Y(rot, rotVel) EVENT_CMD(EVOP_F4_MINUS_Y, rotVel * 10, rot)
#define EVENT_SET_BASE_ZVEL(zvel) EVENT_CMD(EVOP_SET_BASE_ZVEL, 0, zvel)
#define EVENT_SET_TEAM_ID(teamId) EVENT_CMD(EVOP_SET_TEAM_ID, 0, teamId)
#define EVENT_DAMAGE_TEAM(teamId, damage) EVENT_CMD(EVOP_DAMAGE_TEAM, damage, teamId)
#define EVENT_SET_TARGET(teamId, spread) EVENT_CMD(EVOP_SET_TARGET, teamId, spread)
#define EVENT_CHASE_TARGET(duration, turnRate) EVENT_CMD(EVOP_CHASE_TARGET, duration, turnRate)
typedef enum EventModeZ {
EMZ_REST,
EMZ_RELATIVE,
EMZ_PLAYER,
EMZ_3,
} EventModeZ;
typedef enum EventOpcode {
/* 0 */ EVOP_SET_SPEED,
/* 1 */ EVOP_SET_ACCEL,
/* 2 */ EVOP_SET_BASE_ZVEL,
/* 3 */ EVOP_SET_TO_IWORK_9,
/* 4 */ EVOP_SET_IWORK_13,
/* 8 */ EVOP_CLEAR_IWORK_13 = 8,
/* 9 */ EVOP_F4_PLUS_X,
/* 10 */ EVOP_F4_MINUS_X,
/* 11 */ EVOP_F4_PLUS_Y,
/* 12 */ EVOP_F4_MINUS_Y,
/* 16 */ EVOP_ROT_PLUS_X = 16,
/* 17 */ EVOP_ROT_MINUS_X,
/* 18 */ EVOP_ROT_PLUS_Y,
/* 19 */ EVOP_ROT_MINUS_Y,
/* 20 */ EVOP_ROT_PLUS_Z,
/* 21 */ EVOP_ROT_MINUS_Z,
/* 24 */ EVOP_SET_ROTATE = 24,
/* 25 */ EVOP_STOP_ROTATE,
/* 40 */ EVOP_SET_STATE_6 = 40,
/* 41 */ EVOP_SET_STATE_7,
/* 42 */ EVOP_SET_STATE_8,
/* 43 */ EVOP_SET_STATE_9,
/* 44 */ EVOP_CHASE_TARGET,
/* 45 */ EVOP_SET_TARGET,
/* 46 */ EVOP_SET_STATE_14,
/* 47 */ EVOP_SET_STATE_15,
/* 48 */ EVOP_SET_WAIT,
/* 56 */ EVOP_SET_CALL = 56,
/* 57 */ EVOP_RESTORE_TEAM,
/* 58 */ EVOP_PLAY_SFX,
/* 59 */ EVOP_STOP_SFX,
/* 96 */ EVOP_SET_TRIGGER = 96,
/* 104 */ EVOP_INIT_ACTOR = 104,
/* 105 */ EVOP_SET_TEAM_ID,
/* 112 */ EVOP_SET_ACTION = 112,
/* 113 */ EVOP_ADD_TO_GROUP,
/* 116 */ EVOP_DROP_ITEM = 116,
/* 118 */ EVOP_SET_REVERB = 118,
/* 119 */ EVOP_SET_GROUND,
/* 120 */ EVOP_PLAY_MSG,
/* 121 */ EVOP_DAMAGE_TEAM,
/* 122 */ EVOP_STOP_BGM,
/* 124 */ EVOP_MAKE_TEXLINE = 124,
/* 125 */ EVOP_STOP_TEXLINE,
/* 126 */ EVOP_LOOP,
/* 127 */ EVOP_STOP_SCRIPT,
} EventOpcode;
typedef enum EventCondition {
/* 0 */ EVC_NONE,
/* 1 */ EVC_1,
/* 2 */ EVC_TEAM_COUNT_3,
/* 3 */ EVC_TEAM_COUNT_2,
/* 4 */ EVC_TEAM_COUNT_1,
/* 5 */ EVC_TEAM_COUNT_0,
/* 6 */ EVC_FALCO_ACTIVE,
/* 7 */ EVC_PEPPY_ACTIVE,
/* 8 */ EVC_SLIPPY_ACTIVE,
/* 9 */ EVC_CLOSE_LEFT_100,
/* 10 */ EVC_CLOSE_LEFT_400,
/* 11 */ EVC_CLOSE_LEFT_700,
/* 12 */ EVC_CLOSE_LEFT_200,
/* 13 */ EVC_CLOSE_RIGHT_100,
/* 14 */ EVC_CLOSE_RIGHT_400,
/* 15 */ EVC_CLOSE_RIGHT_700,
/* 16 */ EVC_CLOSE_RIGHT_200,
/* 17 */ EVC_CLOSE_ABOVE_100,
/* 18 */ EVC_CLOSE_ABOVE_400,
/* 19 */ EVC_CLOSE_ABOVE_700,
/* 20 */ EVC_CLOSE_ABOVE_200,
/* 21 */ EVC_CLOSE_BELOW_100,
/* 22 */ EVC_CLOSE_BELOW_400,
/* 23 */ EVC_CLOSE_BELOW_700,
/* 24 */ EVC_CLOSE_BELOW_200,
/* 25 */ EVC_HEALTH_100p,
/* 26 */ EVC_HEALTH_75p,
/* 27 */ EVC_HEALTH_50p,
/* 28 */ EVC_HEALTH_25p,
/* 29 */ EVC_HEALTH_0p,
/* 30 */ EVC_UNK270_5PLUS,
/* 31 */ EVC_UNK270_NONZERO,
/* 32 */ EVC_UNK270_ZERO,
/* 33 */ EVC_UNK250_GREATER_168,
/* 34 */ EVC_UNK250_LESS_84,
/* 35 */ EVC_SINGLE_LASER,
/* 36 */ EVC_TWIN_LASER,
/* 37 */ EVC_HYPER_LASER,
/* 38 */ EVC_UNK3_LASER,
/* 39 */ EVC_SHOT_CLOSE_150,
/* 40 */ EVC_SHOT_CLOSE_300,
/* 41 */ EVC_41,
/* 42 */ EVC_42,
/* 43 */ EVC_43,
/* 44 */ EVC_TOOK_DAMAGE,
/* 45 */ EVC_PASSED_ALL_RINGS,
/* 46 */ EVC_46,
/* 47 */ EVC_PRESS_CRIGHT,
/* 48 */ EVC_WING_BROKEN,
/* 49 */ EVC_ME_CLEAR,
/* 50 */ EVC_FO_CLEAR,
/* 51 */ EVC_SX_CLEAR,
/* 52 */ EVC_TI_CLEAR,
/* 53 */ EVC_BO_CLEAR,
/* 54 */ EVC_SY_CLEAR,
/* 55 */ EVC_KA_CLEAR,
/* 56 */ EVC_SO_CLEAR,
/* 57 */ EVC_MA_CLEAR,
/* 58 */ EVC_AQ_CLEAR,
/* 59 */ EVC_ZO_CLEAR,
/* 60 */ EVC_SZ_CLEAR,
/* 61 */ EVC_A6_CLEAR,
/* 62 */ EVC_62,
/* 63 */ EVC_63,
/* 64 */ EVC_MISSED_SEARCHLIGHT,
/* 65 */ EVC_30_HITS,
/* 66 */ EVC_80_HITS,
/* 67 */ EVC_EXPERT_MODE,
/* 68 */ EVC_68,
/* 69 */ EVC_69,
/* 100 */ EVC_100=100,
} EventCondition;
typedef enum EventState {
/* 0 */ EVSTATE_READY,
/* 1 */ EVSTATE_WAIT,
/* 2 */ EVSTATE_F4_PLUS_X,
/* 3 */ EVSTATE_F4_MINUS_X,
/* 4 */ EVSTATE_F4_PLUS_Y,
/* 5 */ EVSTATE_F4_MINUS_Y,
/* 6 */ EVSTATE_6,
/* 7 */ EVSTATE_7,
/* 8 */ EVSTATE_8,
/* 9 */ EVSTATE_9,
/* 10 */ EVSTATE_ME_AS_OPEN,
/* 11 */ EVSTATE_ME_AS_CLOSE,
/* 12 */ EVSTATE_TEAM_RETREAT,
/* 13 */ EVSTATE_CHASE_TARGET,
/* 14 */ EVSTATE_14,
/* 15 */ EVSTATE_15,
/* 200 */ EVSTATE_SCRIPT_END = 200,
/* 1000 */ EVSTATE_1000 = 1000,
} EventState;
typedef enum EventAction {
/* 0 */ EVACT_NONE,
/* 1 */ EVACT_1,
/* 2 */ EVACT_2,
/* 3 */ EVACT_3,
/* 4 */ EVACT_4,
/* 5 */ EVACT_5,
/* 6 */ EVACT_6,
/* 7 */ EVACT_7,
/* 8 */ EVACT_8,
/* 9 */ EVACT_9,
/* 10 */ EVACT_10,
/* 11 */ EVACT_11,
/* 12 */ EVACT_DESPAWN,
/* 13 */ EVACT_13,
/* 14 */ EVACT_ME_AS_OPEN,
/* 15 */ EVACT_ME_AS_CLOSE,
/* 16 */ EVACT_16,
/* 17 */ EVACT_17,
/* 18 */ EVACT_GFOX_COVER_FIRE,
/* 19 */ EVACT_19,
} EventAction;
typedef enum EventActorInfo {
/* 0 */ EINFO_0,
/* 1 */ EINFO_1,
/* 2 */ EINFO_2,
/* 3 */ EINFO_3,
/* 4 */ EINFO_4,
/* 5 */ EINFO_5,
/* 6 */ EINFO_6,
/* 7 */ EINFO_7,
/* 8 */ EINFO_8,
/* 9 */ EINFO_9,
/* 10 */ EINFO_10,
/* 11 */ EINFO_11,
/* 12 */ EINFO_12,
/* 13 */ EINFO_13,
/* 14 */ EINFO_14,
/* 15 */ EINFO_15,
/* 16 */ EINFO_16,
/* 17 */ EINFO_17,
/* 18 */ EINFO_18,
/* 19 */ EINFO_19,
/* 20 */ EINFO_20,
/* 21 */ EINFO_21,
/* 22 */ EINFO_22,
/* 23 */ EINFO_23,
/* 24 */ EINFO_24,
/* 25 */ EINFO_25,
/* 26 */ EINFO_26,
/* 27 */ EINFO_27,
/* 28 */ EINFO_28,
/* 29 */ EINFO_29,
/* 30 */ EINFO_30,
/* 31 */ EINFO_31,
/* 32 */ EINFO_32,
/* 33 */ EINFO_33,
/* 34 */ EINFO_34,
/* 35 */ EINFO_35,
/* 36 */ EINFO_36,
/* 37 */ EINFO_37,
/* 38 */ EINFO_38,
/* 39 */ EINFO_39,
/* 40 */ EINFO_40,
/* 41 */ EINFO_41,
/* 42 */ EINFO_42,
/* 43 */ EINFO_43,
/* 44 */ EINFO_44,
/* 45 */ EINFO_45,
/* 46 */ EINFO_46,
/* 47 */ EINFO_47,
/* 48 */ EINFO_48,
/* 49 */ EINFO_49,
/* 50 */ EINFO_50,
/* 51 */ EINFO_51,
/* 52 */ EINFO_52,
/* 53 */ EINFO_53,
/* 54 */ EINFO_54,
/* 55 */ EINFO_55,
/* 56 */ EINFO_56,
/* 57 */ EINFO_57,
/* 58 */ EINFO_58,
/* 59 */ EINFO_59,
/* 60 */ EINFO_60,
/* 61 */ EINFO_61,
/* 62 */ EINFO_62,
/* 63 */ EINFO_63,
/* 64 */ EINFO_64,
/* 65 */ EINFO_65,
/* 66 */ EINFO_66,
/* 67 */ EINFO_67,
/* 68 */ EINFO_68,
/* 69 */ EINFO_69,
/* 70 */ EINFO_70,
/* 71 */ EINFO_71,
/* 72 */ EINFO_72,
/* 73 */ EINFO_73,
/* 74 */ EINFO_74,
/* 75 */ EINFO_75,
/* 76 */ EINFO_76,
/* 77 */ EINFO_77,
/* 78 */ EINFO_78,
/* 79 */ EINFO_79,
/* 80 */ EINFO_80,
/* 81 */ EINFO_81,
/* 82 */ EINFO_82,
/* 83 */ EINFO_83,
/* 84 */ EINFO_84,
/* 85 */ EINFO_85,
/* 86 */ EINFO_86,
/* 87 */ EINFO_87,
/* 88 */ EINFO_88,
/* 89 */ EINFO_89,
/* 90 */ EINFO_90,
/* 91 */ EINFO_91,
/* 92 */ EINFO_92,
/* 93 */ EINFO_93,
/* 94 */ EINFO_94,
/* 95 */ EINFO_95,
/* 96 */ EINFO_96,
/* 97 */ EINFO_97,
/* 98 */ EINFO_98,
/* 99 */ EINFO_99,
/* 100 */ EINFO_100,
/* 101 */ EINFO_101,
/* 102 */ EINFO_102,
/* 103 */ EINFO_103,
/* 104 */ EINFO_104,
/* 105 */ EINFO_105,
/* 106 */ EINFO_106,
/* 107 */ EINFO_107,
/* 200 */ EINFO_200 = 200,
/* 300 */ EINFO_300 = 300,
} EventActorInfo;
typedef enum EventSfx {
/* 0 */ EVSFX_0,
/* 1 */ EVSFX_1,
/* 2 */ EVSFX_2,
/* 3 */ EVSFX_3,
/* 4 */ EVSFX_4,
/* 5 */ EVSFX_5,
/* 6 */ EVSFX_6,
/* 7 */ EVSFX_7,
/* 8 */ EVSFX_8,
/* 9 */ EVSFX_9,
/* 10 */ EVSFX_10,
/* 11 */ EVSFX_11,
/* 12 */ EVSFX_12,
/* 13 */ EVSFX_13,
/* 14 */ EVSFX_14,
/* 15 */ EVSFX_15,
/* 16 */ EVSFX_16,
/* 17 */ EVSFX_17,
/* 18 */ EVSFX_18,
/* 19 */ EVSFX_19,
/* 20 */ EVSFX_20,
/* 21 */ EVSFX_21,
/* 22 */ EVSFX_22,
} EventSfx;
typedef enum TexLineColor {
/* 0 */ TXLC_WHITE,
/* 1 */ TXLC_LIGHT_BLUE,
/* 2 */ TXLC_BLUE,
/* 3 */ TXLC_GREEN,
/* 4 */ TXLC_RED,
/* 5 */ TXLC_YELLOW,
} TexLineColor;
#endif

View File

@ -115,403 +115,10 @@ typedef enum VsStage {
/* 2 */ VS_STAGE_SECTOR_Z,
} VsStage;
#define EV_OPC(opcode) (((opcode) & 0x7F) << 9)
#define EV_OPC_MASK(cmd) ((cmd) & (0x7F << 9))
#define EVENT_CMD(opcode, arg1, arg2) (EV_OPC(opcode) | ((s16) (arg1) & 0x1FF)), (arg2)
#define EV_ZMODE(zmode) (((zmode) & 3) << 7)
#define EV_ZMODE_MASK(cmd) ((cmd) & (3 << 7))
#define EVENT_PLAY_MSG(rcid, msg) EVENT_CMD(EVOP_PLAY_MSG, rcid, msg)
#define EVENT_STOP_SCRIPT() EVENT_CMD(EVOP_STOP_SCRIPT, 0, 0)
#define EVENT_MAKE_TEXLINE(color) EVENT_CMD(EVOP_MAKE_TEXLINE, 0, color)
#define EVENT_STOP_TEXLINE() EVENT_CMD(EVOP_STOP_TEXLINE, 0, 0)
#define EVENT_INIT_ACTOR(info, health) EVENT_CMD(EVOP_INIT_ACTOR, health, info)
#define EVENT_SET_SPEED(speed, zmode, time) EVENT_CMD(EVOP_SET_SPEED, EV_ZMODE(zmode) | ((speed) & 0x7F), time)
#define EVENT_SET_ACCEL(speedTarget, zmode, time) EVENT_CMD(EVOP_SET_ACCEL, EV_ZMODE(zmode) | ((speedTarget) & 0x7F), time)
#define EVENT_SET_ROTATE() EVENT_CMD(EVOP_SET_ROTATE, 0, 0)
#define EVENT_STOP_ROTATE() EVENT_CMD(EVOP_STOP_ROTATE, 0, 0)
#define EVENT_SET_TRIGGER(cond, cmd) EVENT_CMD(EVOP_SET_TRIGGER, cmd, cond)
#define EVENT_CLEAR_TRIGGER(cmd) EVENT_SET_TRIGGER(EVC_NONE, cmd)
#define EVENT_LOOP(cmd, count) EVENT_CMD(EVOP_LOOP, cmd, count)
#define EVENT_SET_GROUND(type) EVENT_CMD(EVOP_SET_GROUND, 0, type)
#define EVENT_DROP_ITEM(item) EVENT_CMD(EVOP_DROP_ITEM, 0, item)
#define EVENT_ADD_TO_GROUP(num, flags) EVENT_CMD(EVOP_ADD_TO_GROUP, flags, num)
#define EVENT_SET_REVERB(reverb) EVENT_CMD(EVOP_SET_REVERB, 0, reverb)
#define EVENT_STOP_BGM() EVENT_CMD(EVOP_STOP_BGM, 0, 0)
#define EVENT_SET_ACTION(action) EVENT_CMD(EVOP_SET_ACTION, 0, action)
#define EVENT_RESTORE_TEAM(teammate) EVENT_CMD(EVOP_RESTORE_TEAM, 0, teammate)
#define EVENT_PLAY_SFX(sfx) EVENT_CMD(EVOP_PLAY_SFX, 0, sfx)
#define EVENT_STOP_SFX(sfx) EVENT_CMD(EVOP_STOP_SFX, 0, sfx)
#define EVENT_SET_CALL(duration, voiceParam) EVENT_CMD(EVOP_SET_CALL, voiceParam, duration)
#define EVENT_ROT_PLUS_X(rot, rotVel) EVENT_CMD(EVOP_ROT_PLUS_X, rotVel * 10, rot)
#define EVENT_ROT_MINUS_X(rot, rotVel) EVENT_CMD(EVOP_ROT_MINUS_X, rotVel * 10, rot)
#define EVENT_ROT_PLUS_Y(rot, rotVel) EVENT_CMD(EVOP_ROT_PLUS_Y, rotVel * 10, rot)
#define EVENT_ROT_MINUS_Y(rot, rotVel) EVENT_CMD(EVOP_ROT_MINUS_Y, rotVel * 10, rot)
#define EVENT_ROT_PLUS_Z(rot, rotVel) EVENT_CMD(EVOP_ROT_PLUS_Z, rotVel * 10, rot)
#define EVENT_ROT_MINUS_Z(rot, rotVel) EVENT_CMD(EVOP_ROT_MINUS_Z, rotVel * 10, rot)
#define EVENT_F4_PLUS_X(rot, rotVel) EVENT_CMD(EVOP_F4_PLUS_X, rotVel * 10, rot)
#define EVENT_F4_MINUS_X(rot, rotVel) EVENT_CMD(EVOP_F4_MINUS_X, rotVel * 10, rot)
#define EVENT_F4_PLUS_Y(rot, rotVel) EVENT_CMD(EVOP_F4_PLUS_Y, rotVel * 10, rot)
#define EVENT_F4_MINUS_Y(rot, rotVel) EVENT_CMD(EVOP_F4_MINUS_Y, rotVel * 10, rot)
#define EVENT_SET_BASE_ZVEL(zvel) EVENT_CMD(EVOP_SET_BASE_ZVEL, 0, zvel)
typedef enum EventModeZ {
EMZ_REST,
EMZ_RELATIVE,
EMZ_PLAYER,
EMZ_3,
} EventModeZ;
typedef enum EventOpcode {
/* 0 */ EVOP_SET_SPEED,
/* 1 */ EVOP_SET_ACCEL,
/* 2 */ EVOP_SET_BASE_ZVEL,
/* 3 */ EVOP_SET_TO_IWORK_9,
/* 4 */ EVOP_SET_IWORK_13,
/* 8 */ EVOP_CLEAR_IWORK_13 = 8,
/* 9 */ EVOP_F4_PLUS_X,
/* 10 */ EVOP_F4_MINUS_X,
/* 11 */ EVOP_F4_PLUS_Y,
/* 12 */ EVOP_F4_MINUS_Y,
/* 16 */ EVOP_ROT_PLUS_X = 16,
/* 17 */ EVOP_ROT_MINUS_X,
/* 18 */ EVOP_ROT_PLUS_Y,
/* 19 */ EVOP_ROT_MINUS_Y,
/* 20 */ EVOP_ROT_PLUS_Z,
/* 21 */ EVOP_ROT_MINUS_Z,
/* 24 */ EVOP_SET_ROTATE = 24,
/* 25 */ EVOP_STOP_ROTATE,
/* 40 */ EVOP_SET_STATE_6 = 40,
/* 41 */ EVOP_SET_STATE_7,
/* 42 */ EVOP_SET_STATE_8,
/* 43 */ EVOP_SET_STATE_9,
/* 44 */ EVOP_SET_STATE_13,
/* 45 */ EVOP_SET_IWORK_1_TO_IWORK_12,
/* 46 */ EVOP_SET_STATE_14,
/* 47 */ EVOP_SET_STATE_15,
/* 48 */ EVOP_SET_STATE_1,
/* 56 */ EVOP_SET_CALL = 56,
/* 57 */ EVOP_RESTORE_TEAM,
/* 58 */ EVOP_PLAY_SFX,
/* 59 */ EVOP_STOP_SFX,
/* 96 */ EVOP_SET_TRIGGER = 96,
/* 104 */ EVOP_INIT_ACTOR = 104,
/* 105 */ EVOP_SET_IWORK_12,
/* 112 */ EVOP_SET_ACTION = 112,
/* 113 */ EVOP_ADD_TO_GROUP,
/* 116 */ EVOP_DROP_ITEM = 116,
/* 118 */ EVOP_SET_REVERB = 118,
/* 119 */ EVOP_SET_GROUND,
/* 120 */ EVOP_PLAY_MSG,
/* 121 */ EVOP_DAMAGE_TEAM,
/* 122 */ EVOP_STOP_BGM,
/* 124 */ EVOP_MAKE_TEXLINE = 124,
/* 125 */ EVOP_STOP_TEXLINE,
/* 126 */ EVOP_LOOP,
/* 127 */ EVOP_STOP_SCRIPT,
} EventOpcode;
typedef enum EventCondition {
/* 0 */ EVC_NONE,
/* 1 */ EVC_1,
/* 2 */ EVC_TEAM_COUNT_3,
/* 3 */ EVC_TEAM_COUNT_2,
/* 4 */ EVC_TEAM_COUNT_1,
/* 5 */ EVC_TEAM_COUNT_0,
/* 6 */ EVC_FALCO_ACTIVE,
/* 7 */ EVC_PEPPY_ACTIVE,
/* 8 */ EVC_SLIPPY_ACTIVE,
/* 9 */ EVC_9,
/* 10 */ EVC_10,
/* 11 */ EVC_11,
/* 12 */ EVC_12,
/* 13 */ EVC_13,
/* 14 */ EVC_14,
/* 15 */ EVC_15,
/* 16 */ EVC_16,
/* 17 */ EVC_17,
/* 18 */ EVC_18,
/* 19 */ EVC_19,
/* 20 */ EVC_20,
/* 21 */ EVC_21,
/* 22 */ EVC_22,
/* 23 */ EVC_23,
/* 24 */ EVC_24,
/* 25 */ EVC_HEALTH_100p,
/* 26 */ EVC_HEALTH_75p,
/* 27 */ EVC_HEALTH_50p,
/* 28 */ EVC_HEALTH_25p,
/* 29 */ EVC_HEALTH_0p,
/* 30 */ EVC_30,
/* 31 */ EVC_31,
/* 32 */ EVC_32,
/* 33 */ EVC_33,
/* 34 */ EVC_34,
/* 35 */ EVC_SINGLE_LASER,
/* 36 */ EVC_TWIN_LASER,
/* 37 */ EVC_HYPER_LASER,
/* 38 */ EVC_UNK3_LASER,
/* 39 */ EVC_39,
/* 40 */ EVC_40,
/* 41 */ EVC_41,
/* 42 */ EVC_42,
/* 43 */ EVC_43,
/* 44 */ EVC_44,
/* 45 */ EVC_45,
/* 46 */ EVC_46,
/* 47 */ EVC_PRESS_CRIGHT,
/* 48 */ EVC_WING_BROKEN,
/* 49 */ EVC_ME_CLEAR,
/* 50 */ EVC_FO_CLEAR,
/* 51 */ EVC_SX_CLEAR,
/* 52 */ EVC_TI_CLEAR,
/* 53 */ EVC_BO_CLEAR,
/* 54 */ EVC_SY_CLEAR,
/* 55 */ EVC_KA_CLEAR,
/* 56 */ EVC_SO_CLEAR,
/* 57 */ EVC_MA_CLEAR,
/* 58 */ EVC_AQ_CLEAR,
/* 59 */ EVC_ZO_CLEAR,
/* 60 */ EVC_SZ_CLEAR,
/* 61 */ EVC_A6_CLEAR,
/* 62 */ EVC_62,
/* 63 */ EVC_63,
/* 64 */ EVC_64,
/* 65 */ EVC_30_HITS,
/* 66 */ EVC_80_HITS,
/* 67 */ EVC_EXPERT_MODE,
/* 68 */ EVC_68,
/* 69 */ EVC_69,
/* 100 */ EVC_100=100,
} EventCondition;
typedef enum EventState {
/* 0 */ EVSTATE_0,
/* 1 */ EVSTATE_1,
/* 2 */ EVSTATE_F4_PLUS_X,
/* 3 */ EVSTATE_F4_MINUS_X,
/* 4 */ EVSTATE_F4_PLUS_Y,
/* 5 */ EVSTATE_F4_MINUS_Y,
/* 6 */ EVSTATE_6,
/* 7 */ EVSTATE_7,
/* 8 */ EVSTATE_8,
/* 9 */ EVSTATE_9,
/* 10 */ EVSTATE_10,
/* 11 */ EVSTATE_11,
/* 12 */ EVSTATE_TEAM_RETREAT,
/* 13 */ EVSTATE_13,
/* 14 */ EVSTATE_14,
/* 15 */ EVSTATE_15,
/* 200 */ EVSTATE_SCRIPT_END = 200,
/* 1000 */ EVSTATE_1000 = 1000,
} EventState;
typedef enum EventAction {
/* 0 */ EVACT_0,
/* 1 */ EVACT_1,
/* 2 */ EVACT_2,
/* 3 */ EVACT_3,
/* 4 */ EVACT_4,
/* 5 */ EVACT_5,
/* 6 */ EVACT_6,
/* 7 */ EVACT_7,
/* 8 */ EVACT_8,
/* 9 */ EVACT_9,
/* 10 */ EVACT_10,
/* 11 */ EVACT_11,
/* 12 */ EVACT_12,
/* 13 */ EVACT_13,
/* 14 */ EVACT_14,
/* 15 */ EVACT_15,
/* 16 */ EVACT_16,
/* 17 */ EVACT_17,
/* 18 */ EVACT_18,
/* 19 */ EVACT_19,
} EventAction;
typedef enum EventActorInfo {
/* 0 */ EINFO_0,
/* 1 */ EINFO_1,
/* 2 */ EINFO_2,
/* 3 */ EINFO_3,
/* 4 */ EINFO_4,
/* 5 */ EINFO_5,
/* 6 */ EINFO_6,
/* 7 */ EINFO_7,
/* 8 */ EINFO_8,
/* 9 */ EINFO_9,
/* 10 */ EINFO_10,
/* 11 */ EINFO_11,
/* 12 */ EINFO_12,
/* 13 */ EINFO_13,
/* 14 */ EINFO_14,
/* 15 */ EINFO_15,
/* 16 */ EINFO_16,
/* 17 */ EINFO_17,
/* 18 */ EINFO_18,
/* 19 */ EINFO_19,
/* 20 */ EINFO_20,
/* 21 */ EINFO_21,
/* 22 */ EINFO_22,
/* 23 */ EINFO_23,
/* 24 */ EINFO_24,
/* 25 */ EINFO_25,
/* 26 */ EINFO_26,
/* 27 */ EINFO_27,
/* 28 */ EINFO_28,
/* 29 */ EINFO_29,
/* 30 */ EINFO_30,
/* 31 */ EINFO_31,
/* 32 */ EINFO_32,
/* 33 */ EINFO_33,
/* 34 */ EINFO_34,
/* 35 */ EINFO_35,
/* 36 */ EINFO_36,
/* 37 */ EINFO_37,
/* 38 */ EINFO_38,
/* 39 */ EINFO_39,
/* 40 */ EINFO_40,
/* 41 */ EINFO_41,
/* 42 */ EINFO_42,
/* 43 */ EINFO_43,
/* 44 */ EINFO_44,
/* 45 */ EINFO_45,
/* 46 */ EINFO_46,
/* 47 */ EINFO_47,
/* 48 */ EINFO_48,
/* 49 */ EINFO_49,
/* 50 */ EINFO_50,
/* 51 */ EINFO_51,
/* 52 */ EINFO_52,
/* 53 */ EINFO_53,
/* 54 */ EINFO_54,
/* 55 */ EINFO_55,
/* 56 */ EINFO_56,
/* 57 */ EINFO_57,
/* 58 */ EINFO_58,
/* 59 */ EINFO_59,
/* 60 */ EINFO_60,
/* 61 */ EINFO_61,
/* 62 */ EINFO_62,
/* 63 */ EINFO_63,
/* 64 */ EINFO_64,
/* 65 */ EINFO_65,
/* 66 */ EINFO_66,
/* 67 */ EINFO_67,
/* 68 */ EINFO_68,
/* 69 */ EINFO_69,
/* 70 */ EINFO_70,
/* 71 */ EINFO_71,
/* 72 */ EINFO_72,
/* 73 */ EINFO_73,
/* 74 */ EINFO_74,
/* 75 */ EINFO_75,
/* 76 */ EINFO_76,
/* 77 */ EINFO_77,
/* 78 */ EINFO_78,
/* 79 */ EINFO_79,
/* 80 */ EINFO_80,
/* 81 */ EINFO_81,
/* 82 */ EINFO_82,
/* 83 */ EINFO_83,
/* 84 */ EINFO_84,
/* 85 */ EINFO_85,
/* 86 */ EINFO_86,
/* 87 */ EINFO_87,
/* 88 */ EINFO_88,
/* 89 */ EINFO_89,
/* 90 */ EINFO_90,
/* 91 */ EINFO_91,
/* 92 */ EINFO_92,
/* 93 */ EINFO_93,
/* 94 */ EINFO_94,
/* 95 */ EINFO_95,
/* 96 */ EINFO_96,
/* 97 */ EINFO_97,
/* 98 */ EINFO_98,
/* 99 */ EINFO_99,
/* 100 */ EINFO_100,
/* 101 */ EINFO_101,
/* 102 */ EINFO_102,
/* 103 */ EINFO_103,
/* 104 */ EINFO_104,
/* 105 */ EINFO_105,
/* 106 */ EINFO_106,
/* 107 */ EINFO_107,
/* 200 */ EINFO_200 = 200,
/* 300 */ EINFO_300 = 300,
} EventActorInfo;
typedef enum EventSfx {
/* 0 */ EVSFX_0,
/* 1 */ EVSFX_1,
/* 2 */ EVSFX_2,
/* 3 */ EVSFX_3,
/* 4 */ EVSFX_4,
/* 5 */ EVSFX_5,
/* 6 */ EVSFX_6,
/* 7 */ EVSFX_7,
/* 8 */ EVSFX_8,
/* 9 */ EVSFX_9,
/* 10 */ EVSFX_10,
/* 11 */ EVSFX_11,
/* 12 */ EVSFX_12,
/* 13 */ EVSFX_13,
/* 14 */ EVSFX_14,
/* 15 */ EVSFX_15,
/* 16 */ EVSFX_16,
/* 17 */ EVSFX_17,
/* 18 */ EVSFX_18,
/* 19 */ EVSFX_19,
/* 20 */ EVSFX_20,
/* 21 */ EVSFX_21,
/* 22 */ EVSFX_22,
} EventSfx;
typedef enum TexLineColor {
/* 0 */ TXLC_WHITE,
/* 1 */ TXLC_LIGHT_BLUE,
/* 2 */ TXLC_BLUE,
/* 3 */ TXLC_GREEN,
/* 4 */ TXLC_RED,
/* 5 */ TXLC_YELLOW,
} TexLineColor;
typedef enum GroundType {
/* 0 */ GROUNDTYPE_GRASS,
/* 1 */ GROUNDTYPE_ROCK,
/* 2 */ GROUNDTYPE_WATER,
} GroundType;
typedef enum ItemDrop {
/* 0 */ DROP_NONE,
/* 1 */ DROP_SILVER_RING,
/* 2 */ DROP_SILVER_RING_50p,
/* 3 */ DROP_SILVER_RING_33p,
/* 4 */ DROP_SILVER_RING_25p,
/* 5 */ DROP_BOMB,
/* 6 */ DROP_BOMB_50p,
/* 7 */ DROP_BOMB_33p,
/* 8 */ DROP_BOMB_25p,
/* 9 */ DROP_LASERS,
/* 10 */ DROP_LASERS_50p,
/* 11 */ DROP_LASERS_33p,
/* 12 */ DROP_LASERS_25p,
/* 13 */ DROP_1UP,
/* 14 */ DROP_GOLD_RING_1,
/* 15 */ DROP_GOLD_RING_2,
/* 16 */ DROP_GOLD_RING_3,
/* 17 */ DROP_GOLD_RING_4,
/* 18 */ DROP_GOLD_RING_GROUP,
/* 19 */ DROP_LASERS_GROUP,
/* 20 */ DROP_BOMB_GROUP,
/* 21 */ DROP_SILVER_RING_GROUP,
/* 22 */ DROP_SILVER_RING_10p,
/* 23 */ DROP_WING_REPAIR,
/* 24 */ DROP_TEAM_MESG,
/* 25 */ DROP_SILVER_STAR,
/* 26 */ DROP_MAX,
} ItemDrop;
#endif

View File

@ -148,7 +148,6 @@ typedef struct {
/* 0x48 */ s32 state;
/* 0x4C */ s32 timer_4C;
/* 0x50 */ s8 dmgType;
/* 0x51 */ char pad51[3];
/* 0x54 */ s32 dmgPart;
/* 0x58 */ f32 unk_58;
/* 0x5C */ f32 unk_5C;
@ -166,7 +165,7 @@ typedef struct {
/* 0x45 */ u8 unk_45;
/* 0x46 */ s8 unk_46;
/* 0x48 */ s32 unk_48;
} Object_4C; // size = 0x4C
} Sprite; // size = 0x4C
typedef struct {
/* 0x00 */ Object obj;
@ -450,21 +449,21 @@ typedef enum ObjectId {
/* 158 */ OBJ_80_158,
/* 159 */ OBJ_80_159,
/* 160 */ OBJ_80_160,
/* 161 */ OBJ_4C_161,
/* 162 */ OBJ_4C_162,
/* 163 */ OBJ_4C_163,
/* 164 */ OBJ_4C_164,
/* 165 */ OBJ_4C_165,
/* 166 */ OBJ_4C_166,
/* 167 */ OBJ_4C_167,
/* 168 */ OBJ_4C_168,
/* 169 */ OBJ_4C_169,
/* 170 */ OBJ_4C_170,
/* 171 */ OBJ_4C_171,
/* 172 */ OBJ_4C_172,
/* 173 */ OBJ_4C_173,
/* 174 */ OBJ_4C_174,
/* 175 */ OBJ_4C_175,
/* 161 */ OBJ_SPRITE_CO_POLE,
/* 162 */ OBJ_SPRITE_CO_TREE,
/* 163 */ OBJ_SPRITE_FO_POLE,
/* 164 */ OBJ_SPRITE_FOG_SHADOW,
/* 165 */ OBJ_SPRITE_CO_RUIN1,
/* 166 */ OBJ_SPRITE_CO_RUIN2,
/* 167 */ OBJ_SPRITE_167,
/* 168 */ OBJ_SPRITE_168,
/* 169 */ OBJ_SPRITE_TI_CACTUS,
/* 170 */ OBJ_SPRITE_CO_SMOKE,
/* 171 */ OBJ_SPRITE_VE1_BOSS_TRIGGER1,
/* 172 */ OBJ_SPRITE_VE1_BOSS_TRIGGER2,
/* 173 */ OBJ_SPRITE_VE1_BOSS_TRIGGER3,
/* 174 */ OBJ_SPRITE_VE1_BOSS_TRIGGER4,
/* 175 */ OBJ_SPRITE_GFOX_TARGET,
/* 176 */ OBJ_ACTOR_176,
/* 177 */ OBJ_ACTOR_177,
/* 178 */ OBJ_ACTOR_178,
@ -617,13 +616,13 @@ typedef enum ObjectId {
/* 325 */ OBJ_ITEM_SILVER_STAR,
/* 326 */ OBJ_ITEM_METEO_WARP,
/* 327 */ OBJ_ITEM_BOMB,
/* 328 */ OBJ_ITEM_328,
/* 329 */ OBJ_ITEM_329,
/* 330 */ OBJ_ITEM_330,
/* 331 */ OBJ_ITEM_331,
/* 332 */ OBJ_ITEM_332,
/* 333 */ OBJ_ITEM_333,
/* 334 */ OBJ_ITEM_334,
/* 328 */ OBJ_ITEM_PATH_SPLIT_X,
/* 329 */ OBJ_ITEM_PATH_TURN_LEFT,
/* 330 */ OBJ_ITEM_PATH_TURN_RIGHT,
/* 331 */ OBJ_ITEM_PATH_SPLIT_Y,
/* 332 */ OBJ_ITEM_PATH_TURN_UP,
/* 333 */ OBJ_ITEM_PATH_TURN_DOWN,
/* 334 */ OBJ_ITEM_RING_CHECK,
/* 335 */ OBJ_ITEM_1UP,
/* 336 */ OBJ_ITEM_GOLD_RING,
/* 337 */ OBJ_ITEM_WING_REPAIR,
@ -701,6 +700,36 @@ typedef enum ObjectId {
#define ACTOR_EVENT_ID 1000
typedef enum ItemDrop {
/* 0 */ DROP_NONE,
/* 1 */ DROP_SILVER_RING,
/* 2 */ DROP_SILVER_RING_50p,
/* 3 */ DROP_SILVER_RING_33p,
/* 4 */ DROP_SILVER_RING_25p,
/* 5 */ DROP_BOMB,
/* 6 */ DROP_BOMB_50p,
/* 7 */ DROP_BOMB_33p,
/* 8 */ DROP_BOMB_25p,
/* 9 */ DROP_LASERS,
/* 10 */ DROP_LASERS_50p,
/* 11 */ DROP_LASERS_33p,
/* 12 */ DROP_LASERS_25p,
/* 13 */ DROP_1UP,
/* 14 */ DROP_GOLD_RING_1,
/* 15 */ DROP_GOLD_RING_2,
/* 16 */ DROP_GOLD_RING_3,
/* 17 */ DROP_GOLD_RING_4,
/* 18 */ DROP_GOLD_RING_GROUP,
/* 19 */ DROP_LASERS_GROUP,
/* 20 */ DROP_BOMB_GROUP,
/* 21 */ DROP_SILVER_RING_GROUP,
/* 22 */ DROP_SILVER_RING_10p,
/* 23 */ DROP_WING_REPAIR,
/* 24 */ DROP_TEAM_MESG,
/* 25 */ DROP_SILVER_STAR,
/* 26 */ DROP_MAX,
} ItemDrop;
typedef enum AllRangeAi {
/* 0 */ AI360_FOX,
/* 1 */ AI360_FALCO,
@ -874,4 +903,406 @@ typedef enum {
/* 50 */ LN_VWK_MAX,
} BossLNvwork;
typedef Object_80 Object80_0;
typedef Object_80 Object80_1;
typedef Object_80 Object80_2;
typedef Object_80 Object80_3;
typedef Object_80 Object80_4;
typedef Object_80 Object80_5;
typedef Object_80 Object80_6;
typedef Object_80 Object80_7;
typedef Object_80 Object80_8;
typedef Object_80 Object80_9;
typedef Object_80 Object80_10;
typedef Object_80 Object80_11;
typedef Object_80 Object80_12;
typedef Object_80 Object80_13;
typedef Object_80 Object80_14;
typedef Object_80 Object80_15;
typedef Object_80 Object80_16;
typedef Object_80 Object80_17;
typedef Object_80 Object80_18;
typedef Object_80 Object80_19;
typedef Object_80 Object80_20;
typedef Object_80 Object80_21;
typedef Object_80 Object80_22;
typedef Object_80 Object80_23;
typedef Object_80 Object80_24;
typedef Object_80 Object80_25;
typedef Object_80 Object80_26;
typedef Object_80 Object80_27;
typedef Object_80 Object80_28;
typedef Object_80 Object80_29;
typedef Object_80 Object80_30;
typedef Object_80 Object80_31;
typedef Object_80 Object80_32;
typedef Object_80 Object80_33;
typedef Object_80 Object80_34;
typedef Object_80 Object80_35;
typedef Object_80 Object80_36;
typedef Object_80 Object80_37;
typedef Object_80 Object80_38;
typedef Object_80 Object80_39;
typedef Object_80 Object80_40;
typedef Object_80 Object80_41;
typedef Object_80 Object80_42;
typedef Object_80 Object80_43;
typedef Object_80 Object80_44;
typedef Object_80 Object80_45;
typedef Object_80 Object80_46;
typedef Object_80 Object80_47;
typedef Object_80 Object80_48;
typedef Object_80 Object80_49;
typedef Object_80 Object80_50;
typedef Object_80 Object80_51;
typedef Object_80 Object80_52;
typedef Object_80 Object80_53;
typedef Object_80 Object80_54;
typedef Object_80 Object80_55;
typedef Object_80 Object80_56;
typedef Object_80 Object80_57;
typedef Object_80 Object80_58;
typedef Object_80 Object80_59;
typedef Object_80 Object80_60;
typedef Object_80 Object80_61;
typedef Object_80 Object80_62;
typedef Object_80 Object80_63;
typedef Object_80 Object80_64;
typedef Object_80 Object80_65;
typedef Object_80 Object80_66;
typedef Object_80 Object80_67;
typedef Object_80 Object80_68;
typedef Object_80 Object80_69;
typedef Object_80 Object80_70;
typedef Object_80 Object80_71;
typedef Object_80 Object80_72;
typedef Object_80 Object80_73;
typedef Object_80 Object80_74;
typedef Object_80 Object80_75;
typedef Object_80 Object80_76;
typedef Object_80 Object80_77;
typedef Object_80 Object80_78;
typedef Object_80 Object80_79;
typedef Object_80 Object80_80;
typedef Object_80 Object80_81;
typedef Object_80 Object80_82;
typedef Object_80 Object80_83;
typedef Object_80 Object80_84;
typedef Object_80 Object80_85;
typedef Object_80 Object80_86;
typedef Object_80 Object80_87;
typedef Object_80 Object80_88;
typedef Object_80 Object80_89;
typedef Object_80 Object80_90;
typedef Object_80 Object80_91;
typedef Object_80 Object80_92;
typedef Object_80 Object80_93;
typedef Object_80 Object80_94;
typedef Object_80 Object80_95;
typedef Object_80 Object80_96;
typedef Object_80 Object80_97;
typedef Object_80 Object80_98;
typedef Object_80 Object80_99;
typedef Object_80 Object80_100;
typedef Object_80 Object80_101;
typedef Object_80 Object80_102;
typedef Object_80 Object80_103;
typedef Object_80 Object80_104;
typedef Object_80 Object80_105;
typedef Object_80 Object80_106;
typedef Object_80 Object80_107;
typedef Object_80 Object80_108;
typedef Object_80 Object80_109;
typedef Object_80 Object80_110;
typedef Object_80 Object80_111;
typedef Object_80 Object80_112;
typedef Object_80 Object80_113;
typedef Object_80 Object80_114;
typedef Object_80 Object80_115;
typedef Object_80 Object80_116;
typedef Object_80 Object80_117;
typedef Object_80 Object80_118;
typedef Object_80 Object80_119;
typedef Object_80 Object80_120;
typedef Object_80 Object80_121;
typedef Object_80 Object80_122;
typedef Object_80 Object80_123;
typedef Object_80 Object80_124;
typedef Object_80 Object80_125;
typedef Object_80 Object80_126;
typedef Object_80 Object80_127;
typedef Object_80 Object80_128;
typedef Object_80 Object80_129;
typedef Object_80 Object80_130;
typedef Object_80 Object80_131;
typedef Object_80 Object80_132;
typedef Object_80 Object80_133;
typedef Object_80 Object80_134;
typedef Object_80 Object80_135;
typedef Object_80 Object80_136;
typedef Object_80 Object80_137;
typedef Object_80 Object80_138;
typedef Object_80 Object80_139;
typedef Object_80 Object80_140;
typedef Object_80 Object80_141;
typedef Object_80 Object80_142;
typedef Object_80 Object80_143;
typedef Object_80 Object80_144;
typedef Object_80 Object80_145;
typedef Object_80 Object80_146;
typedef Object_80 Object80_147;
typedef Object_80 Object80_148;
typedef Object_80 Object80_149;
typedef Object_80 Object80_150;
typedef Object_80 Object80_151;
typedef Object_80 Object80_152;
typedef Object_80 Object80_153;
typedef Object_80 Object80_154;
typedef Object_80 Object80_155;
typedef Object_80 Object80_156;
typedef Object_80 Object80_157;
typedef Object_80 Object80_158;
typedef Object_80 Object80_159;
typedef Object_80 Object80_160;
typedef Sprite CoPole;
typedef Sprite CoTree;
typedef Sprite FoPole;
typedef Sprite FogShadow;
typedef Sprite CoRuin1;
typedef Sprite CoRuin2;
typedef Sprite Sprite167;
typedef Sprite Sprite168;
typedef Sprite TiCactus;
typedef Sprite CoSmoke;
typedef Sprite Ve1BossTrigger1;
typedef Sprite Ve1BossTrigger2;
typedef Sprite Ve1BossTrigger3;
typedef Sprite Ve1BossTrigger4;
typedef Sprite GfoxTarget;
typedef Actor Actor176;
typedef Actor Actor177;
typedef Actor Actor178;
typedef Actor Actor179;
typedef Actor Actor180;
typedef Actor Actor181;
typedef Actor Actor182;
typedef Actor Actor183;
typedef Actor Actor184;
typedef Actor Actor185;
typedef Actor Actor186;
typedef Actor Actor187;
typedef Actor Actor188;
typedef Actor Actor189;
typedef Actor Actor190;
typedef Actor Actor191;
typedef Actor Actor192;
typedef Actor Actor193;
typedef Actor Actor194;
typedef Actor Actor195;
typedef Actor Actor196;
typedef Actor ActorAllRange;
typedef Actor ActorTeamBoss;
typedef Actor Actor199;
typedef Actor ActorEvent;
typedef Actor Actor201;
typedef Actor Actor202;
typedef Actor ActorSlippySX;
typedef Actor Actor204;
typedef Actor Actor205;
typedef Actor Actor206;
typedef Actor Actor207;
typedef Actor Actor208;
typedef Actor Actor209;
typedef Actor Actor210;
typedef Actor Actor211;
typedef Actor Actor212;
typedef Actor Actor213;
typedef Actor Actor214;
typedef Actor Actor215;
typedef Actor Actor216;
typedef Actor Actor217;
typedef Actor Actor218;
typedef Actor Actor219;
typedef Actor Actor220;
typedef Actor Actor221;
typedef Actor Actor222;
typedef Actor Actor223;
typedef Actor Actor224;
typedef Actor Actor225;
typedef Actor Actor226;
typedef Actor Actor227;
typedef Actor Actor228;
typedef Actor Actor229;
typedef Actor Actor230;
typedef Actor Actor231;
typedef Actor Actor232;
typedef Actor Actor233;
typedef Actor Actor234;
typedef Actor Actor235;
typedef Actor Actor236;
typedef Actor Actor237;
typedef Actor Actor238;
typedef Actor Actor239;
typedef Actor Actor240;
typedef Actor Actor241;
typedef Actor Actor242;
typedef Actor Actor243;
typedef Actor Actor244;
typedef Actor Actor245;
typedef Actor Actor246;
typedef Actor Actor247;
typedef Actor Actor248;
typedef Actor Actor249;
typedef Actor Actor250;
typedef Actor Actor251;
typedef Actor Actor252;
typedef Actor Actor253;
typedef Actor Actor254;
typedef Actor Actor255;
typedef Actor Actor256;
typedef Actor Actor257;
typedef Actor Actor258;
typedef Actor Actor259;
typedef Actor Actor260;
typedef Actor Actor261;
typedef Actor Actor262;
typedef Actor Actor263;
typedef Actor Actor264;
typedef Actor Actor265;
typedef Actor Actor266;
typedef Actor Actor267;
typedef Actor Actor268;
typedef Actor Actor269;
typedef Actor Actor270;
typedef Actor Actor271;
typedef Actor Actor272;
typedef Actor Actor273;
typedef Actor Actor274;
typedef Actor Actor275;
typedef Actor Actor276;
typedef Actor Actor277;
typedef Actor Actor278;
typedef Actor Actor279;
typedef Actor Actor280;
typedef Actor Actor281;
typedef Actor Actor282;
typedef Actor Actor283;
typedef Actor Actor284;
typedef Actor Actor285;
typedef Actor Actor286;
typedef Actor Actor287;
typedef Actor Actor288;
typedef Actor Actor289;
typedef Actor Actor290;
typedef Actor ActorSupplies;
typedef Boss Boss292;
typedef Boss Boss293;
typedef Boss Boss294;
typedef Boss Boss295;
typedef Boss Boss296;
typedef Boss Boss297;
typedef Boss Boss298;
typedef Boss Boss299;
typedef Boss Boss300;
typedef Boss Boss301;
typedef Boss BossA6;
typedef Boss Boss303;
typedef Boss Boss304;
typedef Boss Boss305;
typedef Boss Boss306;
typedef Boss BossZO;
typedef Boss Boss308;
typedef Boss Boss309;
typedef Boss Boss310;
typedef Boss Boss311;
typedef Boss Boss312;
typedef Boss Boss313;
typedef Boss Boss314;
typedef Boss BossSO;
typedef Boss Boss316;
typedef Boss Boss317;
typedef Boss BossAQ;
typedef Boss Boss319;
typedef Boss Boss320;
typedef Boss Boss321;
typedef Item ItemLasers;
typedef Item ItemCheckpoint;
typedef Item ItemSilverStar;
typedef Item ItemSilverRing;
typedef Item ItemMeteoWarp;
typedef Item ItemBomb;
typedef Item ItemPathSplitX;
typedef Item ItemPathTurnLeft;
typedef Item ItemPathTurnRight;
typedef Item ItemPathSplitY;
typedef Item ItemPathTurnUp;
typedef Item ItemPathTurnDown;
typedef Item ItemRingCheck;
typedef Item Item1UP;
typedef Item ItemGoldRing;
typedef Item ItemWingRepair;
typedef Item ItemTrainingRing;
typedef Effect Effect339;
typedef Effect Effect340;
typedef Effect Effect341;
typedef Effect Effect342;
typedef Effect Effect343;
typedef Effect Effect344;
typedef Effect Effect345;
typedef Effect Effect346;
typedef Effect Effect347;
typedef Effect Effect348;
typedef Effect Effect349;
typedef Effect Effect350;
typedef Effect Effect351;
typedef Effect Effect352;
typedef Effect Effect353;
typedef Effect Effect354;
typedef Effect Effect355;
typedef Effect Effect356;
typedef Effect Effect357;
typedef Effect Effect358;
typedef Effect Effect359;
typedef Effect Effect360;
typedef Effect Effect361;
typedef Effect Effect362;
typedef Effect Effect363;
typedef Effect Effect364;
typedef Effect Effect365;
typedef Effect Effect366;
typedef Effect Effect367;
typedef Effect Effect368;
typedef Effect Effect369;
typedef Effect Effect370;
typedef Effect Effect371;
typedef Effect Effect372;
typedef Effect Effect373;
typedef Effect Effect374;
typedef Effect Effect375;
typedef Effect Effect376;
typedef Effect Effect377;
typedef Effect Effect378;
typedef Effect Effect379;
typedef Effect Effect380;
typedef Effect Effect381;
typedef Effect Effect382;
typedef Effect Effect383;
typedef Effect Effect384;
typedef Effect Effect385;
typedef Effect Effect386;
typedef Effect Effect387;
typedef Effect Effect388;
typedef Effect Effect389;
typedef Effect Effect390;
typedef Effect Effect391;
typedef Effect Effect392;
typedef Effect Effect393;
typedef Effect Effect394;
typedef Effect Effect395;
typedef Effect Effect396;
typedef Effect Effect397;
typedef Effect Effect398;
typedef Effect Effect399;
#endif

View File

@ -4,6 +4,25 @@
#include "sf64math.h"
#include "sf64object.h"
#define PFLAG_228_0 (1 << 0)
#define PFLAG_228_1 (1 << 1)
#define PFLAG_228_2 (1 << 2)
#define PFLAG_228_3 (1 << 3)
#define PFLAG_228_4 (1 << 4)
#define PFLAG_228_5 (1 << 5)
#define PFLAG_228_6 (1 << 6)
#define PFLAG_228_7 (1 << 7)
typedef enum TeamId {
/* 0 */ TEAM_ID_FOX,
/* 1 */ TEAM_ID_FALCO,
/* 2 */ TEAM_ID_SLIPPY,
/* 3 */ TEAM_ID_PEPPY,
/* 4 */ TEAM_ID_KATT,
/* 5 */ TEAM_ID_BILL,
/* 6 */ TEAM_ID_MAX,
} TeamId;
typedef enum WingState {
/* 0 */ WINGSTATE_NONE,
/* 1 */ WINGSTATE_BROKEN,
@ -20,15 +39,15 @@ typedef enum PlayerForm {
} PlayerForm;
typedef enum DrawMode {
/* 0 */ DRAWMODE_0,
/* 1 */ DRAWMODE_1,
/* 2 */ DRAWMODE_2,
/* 0 */ DRAW_NONE,
/* 1 */ DRAW_TITLE,
/* 2 */ DRAW_OPTION,
/* 3 */ DRAW_MAP,
/* 4 */ DRAWMODE_4,
/* 5 */ DRAWMODE_5,
/* 6 */ DRAWMODE_6,
/* 7 */ DRAWMODE_7,
/* 8 */ DRAWMODE_8,
/* 4 */ DRAW_PLAY,
/* 5 */ DRAW_UNK_MAP,
/* 6 */ DRAW_UNK_VS,
/* 7 */ DRAW_UNK_7,
/* 8 */ DRAW_ENDING,
} DrawMode;
typedef enum LevelMode {
@ -216,7 +235,7 @@ typedef struct Player {
/* 0x18C */ f32 unk_18C;
/* 0x190 */ f32 unk_190;
/* 0x194 */ f32 unk_194;
/* 0x198 */ s32 unk_198;
/* 0x198 */ s32 savedCockpitView;
/* 0x19C */ s32 unk_19C;
/* 0x1A0 */ s32 unk_1A0;
/* 0x1A4 */ s32 unk_1A4;
@ -255,7 +274,7 @@ typedef struct Player {
/* 0x22C */ s32 unk_22C;
/* 0x230 */ s32 unk_230;
/* 0x234 */ s32 unk_234;
/* 0x238 */ s32 unk_238;
/* 0x238 */ s32 cockpitView;
/* 0x23C */ s32 unk_23C;
/* 0x240 */ s32 unk_240;
/* 0x244 */ s32 timer_244;

View File

@ -13,7 +13,7 @@ typedef enum {
/* 5 */ GSTATE_GAME_OVER,
/* 6 */ GSTATE_VS_INIT,
/* 7 */ GSTATE_PLAY,
/* 8 */ GSTATE_CREDITS,
/* 8 */ GSTATE_ENDING,
/* 100 */ GSTATE_BOOT = 100,
/* 101 */ GSTATE_BOOT_WAIT,
/* 102 */ GSTATE_SHOW_LOGO,
@ -22,6 +22,13 @@ typedef enum {
/* 105 */ GSTATE_START,
} GameState;
typedef enum PlayState {
/* 0 */ PLAY_STANDBY,
/* 1 */ PLAY_INIT,
/* 2 */ PLAY_UPDATE,
/* 100 */ PLAY_PAUSE=100,
} PlayState;
typedef void (*TimerAction)(s32*, s32);
typedef struct {

View File

@ -24,8 +24,8 @@ typedef s32 (*CompareFunc)(void*, void*);
s32 Lib_vsPrintf(char* dst, const char* fmt, va_list args);
void Lib_vTable(s32 index, void (**table)(s32, s32), s32 arg0, s32 arg1);
void Lib_QuickSort(u8* first, u32 length, u32 size, CompareFunc cFunc);
void Lib_Perspective(Gfx** dList);
void Lib_Ortho(Gfx** dList);
void Lib_InitPerspective(Gfx** dList);
void Lib_InitOrtho(Gfx** dList);
void Lib_DmaRead(void* src, void* dst, s32 size);
void Lib_FillScreen(u8 setFill);
@ -40,7 +40,7 @@ s32 vsprintf(char* dst, const char* fmt, va_list args);
void Game_Initialize(void);
void Game_Update(void);
extern s32 D_game_800D2860[];
extern s32 gShowCrosshairs[];
extern s32 D_game_800D2870;
extern f32 D_game_80161A10;
@ -48,7 +48,7 @@ extern f32 D_game_80161A14;
extern s32 gPlayerInactive[4];
extern s32 D_game_80161A28;
extern u8 D_game_80161A2C;
extern u16 D_game_80161A2E;
extern u16 gNextLevelStage;
extern u16 gNextLevel;
extern u16 gNextGameState;
extern u16 D_game_80161A34;

View File

@ -26,28 +26,28 @@ extern Actor* D_display_800CA234;
extern s32 D_display_Timer_800CA238;
// fox_edata
extern f32 D_edata_800CBE70[];
extern f32 D_edata_800CBE8C[];
extern f32 D_edata_800CBEA8[];
extern f32 D_edata_800CBEC4[];
extern f32 D_edata_800CBEE0[];
extern f32 D_edata_800CBEFC[];
extern f32 D_edata_800CBF18[];
extern f32 D_edata_800CBF34[];
extern f32 D_edata_800CBF38[];
extern f32 D_edata_800CBF54[];
extern f32 D_edata_800CBF70[];
extern f32 gActor241Hitbox[];
extern f32 gDefaultCubeHitbox100[];
extern f32 gDefaultCubeHitbox150[];
extern f32 gDefaultCubeHitbox200[];
extern f32 gDefaultCubeHitbox300[];
extern f32 gDefaultCubeHitbox400[];
extern f32 gItemRingCheckHitbox[];
extern f32 gHitboxNone[];
extern f32 gItemCheckpointHitbox[];
extern f32 gItemSupplyRingHitbox[];
extern f32 gMeteoWarpHitbox[];
extern f32 D_edata_800CBF8C[];
extern f32 D_edata_800CBFA8[];
extern f32 D_edata_800CBFC8[];
extern f32 D_edata_800CBFE4[];
extern f32 D_edata_800CC000[];
extern f32 D_edata_800CC01C[];
extern f32 D_edata_800CC038[];
extern f32 D_edata_800CC054[];
extern f32 D_edata_800CC070[];
extern f32 D_edata_800CC0D4[];
extern f32 D_edata_800CC0F0[];
extern f32 gItemLasersHitbox[];
extern f32 gItemBombHitbox[];
extern f32 gActor190_191Hitbox[];
extern f32 gActor194HItbox[];
extern f32 gTeamHitbox[];
extern f32 gActorAllRangeHItbox[];
extern f32 gWarpZoneEvent94Hitbox[];
extern f32 gWarpZoneEvent96Hitbox[];
extern f32 gWarpZoneEvent92Hitbox[];
extern f32 gWarpZoneEvent93Hitbox[];
extern ObjectInfo D_edata_800CC124[];
extern f32* D_edata_800CF964[];
@ -74,12 +74,12 @@ extern f32 D_edisplay_800CFCCC[];
extern Gfx D_edisplay_800CFD80[];
// fox_enmy
extern ObjectInit* D_enmy_800CFDA0[];
extern ObjectInit* gLevelObjectInits[];
extern u32 D_enmy_800CFF54[9];
// fox_enmy2
extern s32 D_enmy2_800CFF80[4];
extern s32 D_enmy2_800CFF90;
extern s32 gCallVoiceParam;
// fox_hud
extern s16 D_hud_800D1970;
@ -96,22 +96,22 @@ extern u8 D_play_800D3180[30];
extern s32 gCurrentMsgPri;
// fox_360
extern s32 D_360_8015F900;
extern s32 D_360_8015F904;
extern s16 D_360_8015F908;
extern s32 D_360_8015F90C;
extern s32 D_360_8015F910;
extern f32 D_360_8015F914;
extern f32 D_360_8015F918;
extern f32 D_360_8015F91C;
extern u8 D_360_8015F920;
extern u8 D_360_8015F921;
extern s32 D_360_8015F924;
extern s32 D_360_8015F928;
extern s32 D_360_8015F930[3];
extern s32 D_360_8015F93C;
extern s32 D_360_8015F940;
extern f32 D_360_8015F944;
extern s32 gAllRangeSupplyTimer;
extern s32 sStarWolfKillTimer;
extern s16 gStarWolfMsgTimer;
extern s32 gAllRangeWingRepairTimer;
extern s32 gAllRangeWingRepairSent;
extern f32 gSzMissileR;
extern f32 gSzMissileG;
extern f32 gSzMissileB;
extern u8 gKaKilledAlly;
extern u8 gKaAllyKillCount;
extern s32 gAllRangeCheckpoint;
extern s32 gAllRangeEventTimer;
extern s32 gAllRangeCountdown[3];
extern s32 gShowAllRangeCountdown;
extern s32 gAllRangeFrameCount;
extern f32 gAllRangeCountdownScale;
// fox_bg
extern f32 D_bg_800C9C30;
@ -133,7 +133,7 @@ extern s32 gBossFrameCount;
// fox_display
extern Vec3f D_display_801613B0[]; // static, here for reordering
extern Vec3f D_display_801613E0[]; // static, here for reordering
extern s16 D_display_80161410;
extern s16 gReflectY;
extern Matrix D_display_80161418[]; // static, here for reordering
extern Vec3f D_display_80161518[]; // static, here for reordering
extern Vec3f D_display_80161548[]; // static, here for reordering
@ -146,11 +146,11 @@ extern Vec3f D_edisplay_801615D0;
// fox_enmy
extern s32 D_enmy_Timer_80161670[4];
extern s32 D_enmy_80161680;
extern u8 D_enmy_80161684;
extern s32 gLastPathChange;
extern u8 gMissedZoSearchlight;
// fox_enmy2
extern s32 D_enmy2_80161690;
extern s32 gCallTimer;
// fox_hud
extern s32 D_hud_80161704;
@ -164,7 +164,7 @@ extern s32 D_hud_80161730;
extern s32 gShowBossHealth; // 0x80161734
// fox_play
extern u8 D_play_80161A50;
extern u8 gSavedZoSearchlightStatus;
extern f32 D_play_80161A54;
extern s32 D_play_80161A58;
extern s32 D_play_80161A5C;

View File

@ -120,7 +120,7 @@ D_radio_80178734 = 0x80178734;
D_radio_80178738 = 0x80178738;
D_radio_8017873C = 0x8017873C;
D_radio_80178740 = 0x80178740;
D_radio_80178744 = 0x80178744;
sRadioUseRedBox = 0x80178744;
D_radio_80178748 = 0x80178748;
// fox_versus
@ -168,7 +168,7 @@ gSaveFile = 0x80178870; //size:0x200
func_edisplay_800596C0 = 0x800596C0;
func_edisplay_800597C0 = 0x800597C0;
Graphics_SetScaleMtx = 0x8005980C;
func_edisplay_80059850 = 0x80059850;
Sprite168_Draw = 0x80059850;
func_edisplay_800598DC = 0x800598DC;
Actor201_Draw = 0x800598E8;
func_edisplay_800599A4 = 0x800599A4;
@ -179,8 +179,8 @@ func_edisplay_80059BB0 = 0x80059BB0;
Obj42_Draw = 0x80059BBC;
Actor196_Draw = 0x80059BF0;
func_edisplay_80059C28 = 0x80059C28;
func_edisplay_80059C34 = 0x80059C34;
func_edisplay_80059C40 = 0x80059C40;
Sprite167_Draw = 0x80059C34;
FogShadow_Draw = 0x80059C40;
func_edisplay_80059F68 = 0x80059F68;
func_edisplay_80059FDC = 0x80059FDC;
func_edisplay_8005A010 = 0x8005A010;
@ -209,7 +209,7 @@ func_edisplay_8005D008 = 0x8005D008;
func_edisplay_8005D1F0 = 0x8005D1F0;
func_edisplay_8005D3CC = 0x8005D3CC;
Object_80_Draw = 0x8005D654;
Object_4C_Draw = 0x8005D8B8;
Sprite_Draw = 0x8005D8B8;
Actor_DrawOnRails = 0x8005D954;
Actor_DrawAllRange = 0x8005DBC0;
Boss_Draw = 0x8005E1B8;
@ -258,13 +258,13 @@ func_enmy_80060FE4 = 0x80060FE4;
func_enmy_80061148 = 0x80061148;
Object_SetInfo = 0x800612B8;
Object_80_Initialize = 0x80061364;
Object_4C_Initialize = 0x80061394;
Sprite_Initialize = 0x80061394;
Actor_Initialize = 0x800613C4;
Boss_Initialize = 0x80061404;
Item_Initialize = 0x80061444;
Effect_Initialize = 0x80061474;
Object_80_Load = 0x800614B4;
Object_4C_Load = 0x800615A0;
Sprite_Load = 0x800615A0;
Actor_Load = 0x8006168C;
Boss_Load = 0x80061778;
Item_Load = 0x80061864;
@ -299,7 +299,7 @@ func_enmy_800655C8 = 0x800655C8;
func_enmy_8006566C = 0x8006566C;
func_enmy_800656D4 = 0x800656D4;
func_enmy_800660F0 = 0x800660F0;
func_enmy_80066254 = 0x80066254;
Actor_Despawn = 0x80066254;
func_enmy_8006654C = 0x8006654C;
func_enmy_8006684C = 0x8006684C;
func_enmy_800669A0 = 0x800669A0;
@ -308,7 +308,7 @@ func_enmy_80066A8C = 0x80066A8C;
func_enmy_80066C00 = 0x80066C00;
func_enmy_80066D5C = 0x80066D5C;
func_enmy_80066E80 = 0x80066E80;
func_enmy_80066E8C = 0x80066E8C;
Sprite167_Update = 0x80066E8C;
func_enmy_80066EA8 = 0x80066EA8;
func_enmy_80066EE4 = 0x80066EE4;
func_enmy_80066EF0 = 0x80066EF0;
@ -327,25 +327,25 @@ ItemGoldRing_Update = 0x800685F8;
ItemWingRepair_Update = 0x80068618;
ItemMeteoWarp_Update = 0x80068688;
ItemCheckpoint_Update = 0x80068914;
func_enmy_80068C48 = 0x80068C48;
func_enmy_80068C88 = 0x80068C88;
func_enmy_80068FE0 = 0x80068FE0;
ItemRingCheck_Update = 0x80068C48;
ItemPathChange_Update = 0x80068C88;
Sprite_UpdateDoodad = 0x80068FE0;
Object_Dying = 0x800690D0;
func_enmy_800693E8 = 0x800693E8;
func_enmy_80069658 = 0x80069658;
func_enmy_800696F8 = 0x800696F8;
func_enmy_80069858 = 0x80069858;
func_enmy_80069924 = 0x80069924;
func_enmy_80069A10 = 0x80069A10;
Actor_Move = 0x800693E8;
Boss_Move = 0x80069658;
Object80_Move = 0x800696F8;
Sprite_Move = 0x80069858;
Effect_Move = 0x80069924;
Item_Move = 0x80069A10;
Actor_Update = 0x80069AAC;
Boss_Update = 0x80069CBC;
Object_80_Update = 0x80069DF4;
Object_4C_Update = 0x80069E88;
Sprite_Update = 0x80069E88;
Item_Update = 0x80069F30;
Effect_Update = 0x80069FD4;
TexturedLine_Update = 0x8006A06C;
TexturedLine_UpdateAll = 0x8006A38C;
Object_UpdateAll = 0x8006A3E8;
Object_Update = 0x8006A3E8;
// fox_enmy2
D_800D0DBC = 0x800D0DBC;//size:24
@ -356,7 +356,7 @@ D_game_80161A14 = 0x80161A14;
gPlayerInactive = 0x80161A18; //size:0x10
D_game_80161A28 = 0x80161A28;
D_game_80161A2C = 0x80161A2C;
D_game_80161A2E = 0x80161A2E;
gNextLevelStage = 0x80161A2E;
gNextLevel = 0x80161A30;
gNextGameState = 0x80161A32;
D_game_80161A34 = 0x80161A34;
@ -366,7 +366,7 @@ D_game_80161A39 = 0x80161A39;
D_game_80161A3C = 0x80161A3C;
D_game_80161A40 = 0x80161A40;
D_game_80161A44 = 0x80161A44;
D_game_800D2860 = 0x800D2860;
gShowCrosshairs = 0x800D2860;
D_game_800D2870 = 0x800D2870;
sVsCameraULx = 0x800D2874;
sVsCameraLRx = 0x800D2884;
@ -381,7 +381,7 @@ func_game_800A1C14 = 0x800A1C14;
func_game_800A1E68 = 0x800A1E68;
func_game_800A1F44 = 0x800A1F44;
func_game_800A1FB0 = 0x800A1FB0;
func_game_800A24DC = 0x800A24DC;
Game_Draw = 0x800A24DC;
func_game_800A25DC = 0x800A25DC;
Game_Update = 0x800A26C0;
func_game_800A3608 = 0x800A3608;
@ -397,7 +397,7 @@ gMedalFlashTimer = 0x801617B8;
D_800D1AEC = 0x800D1AEC; //type:s32 size:0x1B0
// fox_play
D_play_80161A50 = 0x80161A50;
gSavedZoSearchlightStatus = 0x80161A50;
D_play_80161A54 = 0x80161A54;
D_play_80161A5C = 0x80161A5C;
gScreenFlashTimer = 0x80161A60;
@ -413,8 +413,8 @@ D_ctx_80161A78 = 0x80161A78;
D_ctx_80161A7C = 0x80161A7C;
D_ctx_80161A80 = 0x80161A80;
D_ctx_80161A84 = 0x80161A84;
D_ctx_80161A88 = 0x80161A88;
D_ctx_80161A8C = 0x80161A8C;
gGroundType = 0x80161A88;
gSavedGroundType = 0x80161A8C;
gGoldRingCount = 0x80161A90;
gHitCount = 0x80161A98;
gSavedHitCount = 0x80161A9C;
@ -422,7 +422,7 @@ gLifeCount = 0x80161AA0;
gLaserStrength = 0x80161AA8;//size:0x10
D_ctx_80161AB8 = 0x80161AB8;
gObjects80 = 0x80161B00; //size:0x1900
gObjects4C = 0x80163400; //size:0xBE0
gSprites = 0x80163400; //size:0xBE0
gActors = 0x80163FE0; //size:0xB130
gBosses = 0x8016F110; //size:0x1020
gEffects = 0x80170130; //size:0x36B0
@ -441,17 +441,17 @@ gOverlaySetup = 0x801774F8;
D_ctx_80177500 = 0x80177500;
gOverlayStage = 0x80177820;
D_ctx_80177824 = 0x80177824;
D_ctx_80177828 = 0x80177828;
gEnemyShotSpeed = 0x80177828;
D_ctx_8017782C = 0x8017782C;
D_ctx_80177830 = 0x80177830;
gGameState = 0x80177834;
D_ctx_80177838 = 0x80177838;
D_Timer_8017783C = 0x8017783C;
D_ctx_80177840 = 0x80177840;
gLevelStatusScreenTimer = 0x80177838;
gNextGameStateTimer = 0x8017783C;
gLevelClearScreenTimer = 0x80177840;
gOptionMenuStatus = 0x8017784C; //type:OptionState
gBossHealthBar = 0x80177848;
D_ctx_80177850 = 0x80177850;
D_ctx_80177854 = 0x80177854;
gPlayState = 0x80177854;
D_ctx_80177858 = 0x80177858;
D_ctx_80177868 = 0x80177868;
D_ctx_80177870 = 0x80177870;
@ -468,11 +468,11 @@ gTeamShields = 0x801778B0; //size:0x18
D_ctx_801778C8 = 0x801778C8;
gSavedTeamShields = 0x801778D0; //size:0x18
gVersusMode = 0x801778E8;
D_ctx_801778F0 = 0x801778F0;//size=0x18
gPrevPlanetSavedTeamShields = 0x801778F0;//size=0x18
gBoostButton = 0x80177908;
gTeamDamage = 0x80177910;
gBrakeButton = 0x80177928;
D_ctx_80177930 = 0x80177930;
gNextPlanetPath = 0x80177930;
gShootButton = 0x80177938;
gGroundLevel = 0x80177940;
gBombButton = 0x80177948;
@ -535,7 +535,7 @@ D_ctx_80177CB4 = 0x80177CB4;
D_ctx_80177CBC = 0x80177CBC;
D_ctx_80177CC4 = 0x80177CC4;
D_ctx_80177CC8 = 0x80177CC8;
D_ctx_80177CD0 = 0x80177CD0; // size:0x18
gStarWolfTeamAlive = 0x80177CD0; // size:0x18
D_ctx_80177D08 = 0x80177D08;
gRightWingHealth = 0x80177D10;
D_ctx_80177D20 = 0x80177D20;
@ -552,9 +552,9 @@ gGameFrameCount = 0x80177DB0;
D_ctx_80177DC8 = 0x80177DC8;
D_ctx_80177E70 = 0x80177E70;
D_ctx_80177E78 = 0x80177E78;
D_ctx_80177E80 = 0x80177E80;
gRingPassCount = 0x80177E80;
D_ctx_80177E88 = 0x80177E88; // size:0xC
D_ctx_80177E98 = 0x80177E98;
gTeamArrowsViewPos = 0x80177E98;
D_ctx_80177F10 = 0x80177F10;
D_ctx_80177F20 = 0x80177F20; //size:0xF4
D_ctx_80178028 = 0x80178028; //size:0xF4
@ -562,7 +562,7 @@ D_ctx_8017812C = 0x8017812C;
D_ctx_80178130 = 0x80178130; //size:0xF4
gCurrentLevel = 0x80178234;
D_ctx_80178238 = 0x80178238;//size:0x3D type:u8
D_ctx_8017827C = 0x8017827C;
gLevelStage = 0x8017827C;
gPlayer = 0x80178280;
gBossActive = 0x80178284;
D_ctx_80178288 = 0x80178288;
@ -586,26 +586,26 @@ D_ctx_801782F8 = 0x801782F8;
D_ctx_801782FC = 0x801782FC;
D_ctx_80178300 = 0x80178300;
D_ctx_80178308 = 0x80178308;
D_ctx_80178310 = 0x80178310;
gLevelObjects = 0x80178310;
gFogRed = 0x80178320;
gFogGreen = 0x80178328;
gFogBlue = 0x80178330;
gFogAlpha = 0x80178338;
D_ctx_80178340 = 0x80178340;
D_ctx_80178348 = 0x80178348;
D_ctx_80178350 = 0x80178350;
D_ctx_80178354 = 0x80178354;
D_ctx_80178358 = 0x80178358;
D_ctx_8017835C = 0x8017835C;
gFillScreenAlpha = 0x80178340;
gFillScreenRed = 0x80178348;
gFillScreenGreen = 0x80178350;
gFillScreenBlue = 0x80178354;
gFillScreenAlphaTarget = 0x80178358;
gFillScreenAlphaStep = 0x8017835C;
D_ctx_80178360 = 0x80178360;
D_ctx_80178364 = 0x80178364;
D_ctx_80178368 = 0x80178368;
D_ctx_8017836C = 0x8017836C;
D_ctx_80178370 = 0x80178370;
D_ctx_80178380 = 0x80178380;
D_ctx_80178390 = 0x80178390;
D_ctx_801783A0 = 0x801783A0;
D_ctx_801783B0 = 0x801783B0;
gPlayerFillScreenAlphas = 0x80178380;
gPlayerFillScreenReds = 0x80178390;
gPlayerFillScreenGreens = 0x801783A0;
gPlayerFillScreenBlues = 0x801783B0;
D_ctx_801783D0 = 0x801783D0;
D_ctx_801783D4 = 0x801783D4;
gFogNear = 0x801783D8;
@ -679,7 +679,7 @@ func_play_800A5330 = 0x800A5330;
func_play_800A5338 = 0x800A5338;
func_play_800A55B0 = 0x800A55B0;
func_play_800A57E0 = 0x800A57E0;
func_play_800A5844 = 0x800A5844;
Play_Setup = 0x800A5844;
func_play_800A594C = 0x800A594C;
func_play_800A5D6C = 0x800A5D6C;
func_play_800A5EBC = 0x800A5EBC;
@ -690,7 +690,7 @@ BonusText_Initialize = 0x800A60B8;
TexturedLine_Initialize = 0x800A60E8;
RadarMark_Initialize = 0x800A6118;
func_play_800A6148 = 0x800A6148;
func_play_800A6590 = 0x800A6590;
Play_UpdateFillScreen = 0x800A6590;
func_play_800A668C = 0x800A668C;
func_play_800A670C = 0x800A670C;
func_play_800A69F8 = 0x800A69F8;
@ -713,7 +713,7 @@ func_play_800AB304 = 0x800AB304;
func_play_800AB334 = 0x800AB334;
func_play_800AB964 = 0x800AB964;
func_play_800ABA08 = 0x800ABA08;
func_play_800ABAB4 = 0x800ABAB4;
Play_Init = 0x800ABAB4;
func_play_800AC290 = 0x800AC290;
func_play_800AC650 = 0x800AC650;
func_play_800ACA40 = 0x800ACA40;
@ -750,7 +750,7 @@ func_play_800B41EC = 0x800B41EC;
func_play_800B42B0 = 0x800B42B0;
func_play_800B44C4 = 0x800B44C4;
func_play_800B46F8 = 0x800B46F8;
func_play_800B48BC = 0x800B48BC;
Player_Update1 = 0x800B48BC;
func_play_800B56BC = 0x800B56BC;
func_play_800B5D30 = 0x800B5D30;
func_play_800B5FBC = 0x800B5FBC;
@ -759,16 +759,16 @@ func_play_800B6848 = 0x800B6848;
func_play_800B6BFC = 0x800B6BFC;
func_play_800B6F50 = 0x800B6F50;
func_play_800B7184 = 0x800B7184;
func_play_800B71E4 = 0x800B71E4;
Player_Update2 = 0x800B71E4;
func_play_800B73E0 = 0x800B73E0;
func_play_800B79B0 = 0x800B79B0;
func_play_800B832C = 0x800B832C;
Play_UpdateLevel = 0x800B79B0;
Play_Update = 0x800B832C;
func_play_800B852C = 0x800B852C;
func_play_800B86A4 = 0x800B86A4;
func_play_800B86CC = 0x800B86CC;
Play_Main = 0x800B86CC;
D_tank_800C9F2C = 0x800C9F2C;
D_edata_800CBF34 = 0x800CBF34;
gHitboxNone = 0x800CBF34;
D_bg_8015F970 = 0x8015F970;
D_bg_8015F984 = 0x8015F984;
D_ctx_8017796C = 0x8017796C;

View File

@ -12,8 +12,8 @@ Lib_vsPrintf = 0x80002E80;
Lib_vTable = 0x80002EA0;
Lib_SwapBuffers = 0x80002EE4;
Lib_QuickSort = 0x80002F88;
Lib_Perspective = 0x8000316C;
Lib_Ortho = 0x800032B4;
Lib_InitPerspective = 0x8000316C;
Lib_InitOrtho = 0x800032B4;
Lib_DmaRead = 0x800033E0;
Lib_FillScreen = 0x800034E8;

View File

@ -35,22 +35,22 @@ s32 D_360_800C9B4C = 96 * 30;
/* static */ Vec3f D_360_800C9B98 = { 60.0f, 0.0f, -170.0f };
/* static */ Vec3f D_360_800C9BA4 = { -60.0f, 0.0f, -170.0f };
s32 D_360_8015F900;
s32 D_360_8015F904;
s16 D_360_8015F908;
s32 D_360_8015F90C;
s32 D_360_8015F910;
f32 D_360_8015F914;
f32 D_360_8015F918;
f32 D_360_8015F91C;
u8 D_360_8015F920;
u8 D_360_8015F921;
s32 D_360_8015F924;
s32 D_360_8015F928;
s32 D_360_8015F930[3];
s32 D_360_8015F93C;
s32 D_360_8015F940;
f32 D_360_8015F944;
s32 gAllRangeSupplyTimer;
s32 sStarWolfKillTimer;
s16 gStarWolfMsgTimer;
s32 gAllRangeWingRepairTimer;
s32 gAllRangeWingRepairSent;
f32 gSzMissileR;
f32 gSzMissileG;
f32 gSzMissileB;
u8 gKaKilledAlly;
u8 gKaAllyKillCount;
s32 gAllRangeCheckpoint;
s32 gAllRangeEventTimer;
s32 gAllRangeCountdown[3];
s32 gShowAllRangeCountdown;
s32 gAllRangeFrameCount;
f32 gAllRangeCountdownScale;
void func_360_8002E3E0(Actor* actor) {
s32 hits = 0;
@ -61,23 +61,23 @@ void func_360_8002E3E0(Actor* actor) {
(void) "time=%d\n";
(void) "time=%d\n";
if (gCurrentLevel == LEVEL_VENOM_2) {
if (D_360_8015F940 < 128 * 30) {
if (gAllRangeFrameCount < 128 * 30) {
hits = 50;
} else if (D_360_8015F940 < 192 * 30) {
} else if (gAllRangeFrameCount < 192 * 30) {
hits = 30;
} else if (D_360_8015F940 < 256 * 30) {
} else if (gAllRangeFrameCount < 256 * 30) {
hits = 20;
} else if (D_360_8015F940 < 320 * 30) {
} else if (gAllRangeFrameCount < 320 * 30) {
hits = 10;
}
} else {
if (D_360_8015F940 < 128 * 30) {
if (gAllRangeFrameCount < 128 * 30) {
hits = 10;
} else if (D_360_8015F940 < 192 * 30) {
} else if (gAllRangeFrameCount < 192 * 30) {
hits = 5;
} else if (D_360_8015F940 < 256 * 30) {
} else if (gAllRangeFrameCount < 256 * 30) {
hits = 2;
} else if (D_360_8015F940 < 320 * 30) {
} else if (gAllRangeFrameCount < 320 * 30) {
hits = 1;
}
}
@ -97,12 +97,12 @@ bool func_360_8002E4F8(u16* msg, RadioCharacterId rcid) {
}
}
void func_360_8002E548(void) {
if (D_360_8015F93C != 0) {
s32 sp24 = D_360_8015F930[1];
void AllRange_UpdateCountdown(void) {
if (gShowAllRangeCountdown != 0) {
s32 seconds = gAllRangeCountdown[1];
func_hud_8008E51C(D_360_8015F930, D_360_8015F944);
if ((D_360_8015F930[0] == 0) && (sp24 != D_360_8015F930[1]) && (D_360_8015F930[1] < 15)) {
func_hud_8008E51C(gAllRangeCountdown, gAllRangeCountdownScale);
if ((gAllRangeCountdown[0] == 0) && (seconds != gAllRangeCountdown[1]) && (gAllRangeCountdown[1] < 15)) {
AUDIO_PLAY_SFX(0x4900C02A, gDefaultSfxSource, 4);
}
}
@ -174,9 +174,9 @@ void func_360_8002E700(Player* player) {
break;
case 1:
if (gCsFrameCount >= 47) {
D_ctx_80178358 = 255;
D_ctx_8017835C = 32;
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0;
gFillScreenAlphaTarget = 255;
gFillScreenAlphaStep = 32;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0;
}
if (gCsFrameCount >= 64) {
player->unk_1D0++;
@ -184,8 +184,8 @@ void func_360_8002E700(Player* player) {
}
break;
case 2:
if (D_ctx_80178340 == 255) {
D_ctx_80178358 = 0;
if (gFillScreenAlpha == 255) {
gFillScreenAlphaTarget = 0;
player->pos.x = 400.0f;
player->pos.y = -420.0f;
player->pos.z = 0.0f;
@ -206,9 +206,9 @@ void func_360_8002E700(Player* player) {
}
break;
case 3:
D_ctx_8017835C = 32;
gFillScreenAlphaStep = 32;
gCsCamEyeZ -= 1.0f;
if (D_ctx_80178340 == 0) {
if (gFillScreenAlpha == 0) {
player->unk_190 = player->unk_194 = 5.0f;
player->unk_114 = 90.0f;
player->unk_0D0 = D_play_80161A54;
@ -278,7 +278,7 @@ void func_360_8002ED60(Player* player) {
}
void func_360_8002EE34(void) {
D_360_8015F904 = gRadioState = gActors[1].iwork[1] = gActors[2].iwork[1] = gActors[3].iwork[1] = 0;
sStarWolfKillTimer = gRadioState = gActors[1].iwork[1] = gActors[2].iwork[1] = gActors[3].iwork[1] = 0;
}
void func_360_8002EE64(Actor* actor) {
@ -390,7 +390,7 @@ void func_360_8002F180(void) {
actor->iwork[11] = 1;
if (actor->aiType <= AI360_PEPPY) {
AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4);
actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_edata_800CC01C);
actor->info.hitbox = SEGMENTED_TO_VIRTUAL(gTeamHitbox);
actor->info.unk_1C = 0.0f;
actor->info.bonus = 0;
} else {
@ -405,7 +405,7 @@ void func_360_8002F3E0(void) {
s32 i;
for (i = 0, actor = &gActors[4]; i < 4; i++, actor++) {
if (D_ctx_80177CD0[i] != 0) {
if (gStarWolfTeamAlive[i] != 0) {
Actor_Initialize(actor);
actor->obj.status = OBJ_ACTIVE;
actor->obj.pos.x = D_360_800C9AFC[i].x;
@ -443,7 +443,7 @@ void func_360_8002F5F4(u16* msg, RadioCharacterId character) {
}
void func_360_8002F64C(u16* msg, RadioCharacterId character) {
if ((D_ctx_80177CD0[0] + D_ctx_80177CD0[1] + D_ctx_80177CD0[2] + D_ctx_80177CD0[3]) == 0) {
if ((gStarWolfTeamAlive[0] + gStarWolfTeamAlive[1] + gStarWolfTeamAlive[2] + gStarWolfTeamAlive[3]) == 0) {
gRadioState = 0;
}
func_360_8002F5F4(msg, character);
@ -453,19 +453,19 @@ void func_360_8002F69C(Actor* actor) {
Actor* otherActor;
s32 i;
if (D_360_8015F904 != 0) {
D_360_8015F904--;
if ((D_360_8015F904 == 0) && (gCurrentLevel != LEVEL_BOLSE) &&
((D_ctx_80177CD0[0] + D_ctx_80177CD0[1] + D_ctx_80177CD0[2] + D_ctx_80177CD0[3]) == 1)) {
if (sStarWolfKillTimer != 0) {
sStarWolfKillTimer--;
if ((sStarWolfKillTimer == 0) && (gCurrentLevel != LEVEL_BOLSE) &&
((gStarWolfTeamAlive[0] + gStarWolfTeamAlive[1] + gStarWolfTeamAlive[2] + gStarWolfTeamAlive[3]) == 1)) {
Radio_PlayMessage(gMsg_ID_19465, RCID_FOX);
}
}
if (((D_360_8015F928 + 100) == (0, D_360_800C9B4C)) && (gCurrentLevel != LEVEL_VENOM_2)) {
if (((gAllRangeEventTimer + 100) == (0, D_360_800C9B4C)) && (gCurrentLevel != LEVEL_VENOM_2)) {
// fake?
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 30);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 30);
}
if (D_360_8015F928 == D_360_800C9B4C) {
if (gAllRangeEventTimer == D_360_800C9B4C) {
func_360_8002F3E0();
actor->state = 3;
gPlayer[0].state_1C8 = PLAYERSTATE_1C8_0;
@ -485,9 +485,9 @@ void func_360_8002F69C(Actor* actor) {
gPlayer[0].camAt.y = gActors[4].obj.pos.y;
gPlayer[0].camAt.z = gActors[4].obj.pos.z;
}
if (D_360_8015F928 > D_360_800C9B4C) {
if (D_360_8015F908 == 0) {
D_360_8015F940++;
if (gAllRangeEventTimer > D_360_800C9B4C) {
if (gStarWolfMsgTimer == 0) {
gAllRangeFrameCount++;
for (i = 1, otherActor = &gActors[1]; i < 8; i++, otherActor++) {
if ((otherActor->obj.status == OBJ_ACTIVE) && (otherActor->state == 2) && (otherActor->health < 70) &&
(otherActor->timer_0C6 != 0) && (otherActor->unk_0D4 == 1)) {
@ -526,13 +526,13 @@ void func_360_8002F69C(Actor* actor) {
}
}
}
if (gTeamShields[1] <= 0) {
if (gTeamShields[TEAM_ID_FALCO] <= 0) {
gActors[AI360_LEON].aiIndex = AI360_FOX;
}
if (gTeamShields[2] <= 0) {
if (gTeamShields[TEAM_ID_SLIPPY] <= 0) {
gActors[AI360_ANDREW].aiIndex = AI360_FOX;
}
if (gTeamShields[3] <= 0) {
if (gTeamShields[TEAM_ID_PEPPY] <= 0) {
gActors[AI360_PIGMA].aiIndex = AI360_FOX;
}
}
@ -611,7 +611,7 @@ void func_360_8002FC00(Actor* actor) {
bool func_360_8002FE74(void) {
switch (gCurrentLevel) {
case LEVEL_FORTUNA:
return D_360_8015F928 == D_360_800C9B4C + 2400;
return gAllRangeEventTimer == D_360_800C9B4C + 2400;
case LEVEL_BOLSE:
return gBosses[2].swork[36] == 4;
case LEVEL_KATINA:
@ -624,16 +624,16 @@ void func_360_8002FEF0(Actor* actor) {
Actor* newActor;
s32 i;
if ((D_enmy2_80161690 != 0) && (gControllerPress[gMainController].button & R_CBUTTONS)) {
if ((gCallTimer != 0) && (gControllerPress[gMainController].button & R_CBUTTONS)) {
func_8001AF40(0);
D_enmy2_800CFF90 = 0;
D_enmy2_80161690 = 0;
gCallVoiceParam = 0;
gCallTimer = 0;
Radio_PlayMessage(gMsg_ID_20230, RCID_ROB64);
D_360_8015F900 = 160;
gAllRangeSupplyTimer = 160;
}
if (D_360_8015F900 != 0) {
D_360_8015F900--;
if (D_360_8015F900 == 0) {
if (gAllRangeSupplyTimer != 0) {
gAllRangeSupplyTimer--;
if (gAllRangeSupplyTimer == 0) {
for (i = 20, newActor = &gActors[20]; i < 60; i++, newActor++) {
if (newActor->obj.status == OBJ_FREE) {
Actor_Initialize(newActor);
@ -657,13 +657,13 @@ void func_360_8002FEF0(Actor* actor) {
}
}
}
if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) && (D_360_8015F910 == 0)) {
if (D_360_8015F90C != 0) {
D_360_8015F90C--;
if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) && !gAllRangeWingRepairSent) {
if (gAllRangeWingRepairTimer != 0) {
gAllRangeWingRepairTimer--;
}
if ((gPlayer[0].shields < 64) || func_360_8002FE74() || (D_360_8015F90C == 1)) {
D_enmy2_80161690 = 60;
D_360_8015F910 = 1;
if ((gPlayer[0].shields < 64) || func_360_8002FE74() || (gAllRangeWingRepairTimer == 1)) {
gCallTimer = 60;
gAllRangeWingRepairSent = true;
}
}
}
@ -673,7 +673,7 @@ void func_360_8003010C(Actor* actor) {
Object_Kill(&actor->obj, actor->sfxSource);
return;
}
D_360_8015F928++;
gAllRangeEventTimer++;
switch (gCurrentLevel) {
case LEVEL_FORTUNA:
Fortuna_80187960(actor);
@ -907,14 +907,14 @@ void func_360_8003088C(Actor* actor) {
actor->timer_0BC = 0;
}
if ((gCurrentLevel == LEVEL_KATINA) && (actor->unk_0B6 == 1) && (actor->unk_0D4 == 1)) {
if (D_360_8015F921 < 2) {
if (gKaAllyKillCount < 2) {
func_360_8002F5F4(gMsg_ID_18018, RCID_BILL);
}
D_360_8015F921++;
gKaAllyKillCount++;
}
switch (actor->aiType) {
case AI360_WOLF:
D_ctx_80177CD0[0] = 0;
gStarWolfTeamAlive[0] = 0;
if (gCurrentLevel == LEVEL_VENOM_2) {
func_360_8002F64C(gMsg_ID_19458, RCID_WOLF);
} else {
@ -922,7 +922,7 @@ void func_360_8003088C(Actor* actor) {
}
break;
case AI360_LEON:
D_ctx_80177CD0[1] = 0;
gStarWolfTeamAlive[1] = 0;
if (gCurrentLevel == LEVEL_VENOM_2) {
func_360_8002F64C(gMsg_ID_19459, RCID_LEON);
} else {
@ -930,7 +930,7 @@ void func_360_8003088C(Actor* actor) {
}
break;
case AI360_PIGMA:
D_ctx_80177CD0[2] = 0;
gStarWolfTeamAlive[2] = 0;
if (gCurrentLevel == LEVEL_VENOM_2) {
func_360_8002F64C(gMsg_ID_19460, RCID_PIGMA);
} else {
@ -938,7 +938,7 @@ void func_360_8003088C(Actor* actor) {
}
break;
case AI360_ANDREW:
D_ctx_80177CD0[3] = 0;
gStarWolfTeamAlive[3] = 0;
if (gCurrentLevel == LEVEL_VENOM_2) {
func_360_8002F64C(gMsg_ID_19461, RCID_ANDREW);
} else {
@ -946,8 +946,8 @@ void func_360_8003088C(Actor* actor) {
}
break;
}
if ((actor->aiType >= AI360_WOLF) && (actor->aiType < AI360_KATT)) {
D_360_8015F904 = 150;
if ((actor->aiType >= AI360_WOLF) && (actor->aiType <= AI360_ANDREW)) {
sStarWolfKillTimer = 150;
}
switch (actor->unk_0D4) {
case 1:
@ -969,7 +969,8 @@ void func_360_8003088C(Actor* actor) {
case 103:
case 104:
if ((actor->aiType >= AI360_WOLF) && (actor->aiType < AI360_KATT)) {
if ((D_ctx_80177CD0[0] + D_ctx_80177CD0[1] + D_ctx_80177CD0[2] + D_ctx_80177CD0[3]) == 0) {
if ((gStarWolfTeamAlive[0] + gStarWolfTeamAlive[1] + gStarWolfTeamAlive[2] +
gStarWolfTeamAlive[3]) == 0) {
switch (actor->unk_0D4) {
case 102:
Radio_PlayMessage(gMsg_ID_9438, RCID_FALCO);
@ -1052,8 +1053,8 @@ void func_360_8003088C(Actor* actor) {
} else if (actor->unk_0D4 < 105) {
if (actor->aiType >= AI360_WOLF) {
if (actor->unk_0D4 == 1) {
if ((gCurrentLevel == LEVEL_KATINA) && (actor->unk_0B6 == 1) && (D_360_8015F920 == 0)) {
D_360_8015F920 = 1;
if ((gCurrentLevel == LEVEL_KATINA) && (actor->unk_0B6 == 1) && (gKaKilledAlly == 0)) {
gKaKilledAlly = 1;
Radio_PlayMessage(gMsg_ID_18015, RCID_BILL);
} else if (actor->aiType == AI360_KATT) {
func_360_8002F5F4(gMsg_ID_20084, RCID_KATT);
@ -1093,7 +1094,7 @@ void func_360_8003088C(Actor* actor) {
(actor->iwork[2] != AI360_FOX)) {
switch (actor->aiType) {
case AI360_FALCO:
if (gTeamShields[1] >= 90) {
if (gTeamShields[TEAM_ID_FALCO] >= 90) {
func_360_8002F5F4(gMsg_ID_9130, RCID_FALCO);
} else {
Radio_PlayMessage(gMsg_ID_9151, RCID_FALCO);
@ -1104,7 +1105,7 @@ void func_360_8003088C(Actor* actor) {
}
break;
case AI360_SLIPPY:
if (gTeamShields[2] >= 90) {
if (gTeamShields[TEAM_ID_SLIPPY] >= 90) {
func_360_8002F5F4(gMsg_ID_9140, RCID_SLIPPY);
} else {
Radio_PlayMessage(gMsg_ID_9152, RCID_SLIPPY);
@ -1115,7 +1116,7 @@ void func_360_8003088C(Actor* actor) {
}
break;
case AI360_PEPPY:
if (gTeamShields[3] >= 90) {
if (gTeamShields[TEAM_ID_PEPPY] >= 90) {
func_360_8002F5F4(gMsg_ID_9150, RCID_PEPPY);
} else {
Radio_PlayMessage(gMsg_ID_9153, RCID_PEPPY);
@ -1221,7 +1222,7 @@ void ActorAllRange_Update(Actor* this) {
}
}
if ((this->timer_0CA[0] != 0) && (gCurrentLevel != LEVEL_VENOM_2) && (this->aiType < AI360_10) &&
(this->timer_0CA[0] < 5) && !(gGameFrameCount & 0x1F)) {
(this->timer_0CA[0] < 5) && ((gGameFrameCount % 32) == 0)) {
this->iwork[16] = 10;
}
if ((this->iwork[16] != 0) && (this->state < 7)) {
@ -1567,8 +1568,8 @@ void ActorAllRange_Update(Actor* this) {
this->iwork[0] = 1;
}
}
if ((gRadioState == 0) && (this->timer_0C4 == 0) && (D_360_8015F928 > 700) &&
(D_360_8015F908 == 0) && (gActors[0].obj.status == OBJ_ACTIVE)) {
if ((gRadioState == 0) && (this->timer_0C4 == 0) && (gAllRangeEventTimer > 700) &&
(gStarWolfMsgTimer == 0) && (gActors[0].obj.status == OBJ_ACTIVE)) {
this->timer_0C4 = 600;
if (Rand_ZeroOne() < 0.5f) {
gActors[this->aiIndex].iwork[6]++;
@ -1616,22 +1617,22 @@ void ActorAllRange_Update(Actor* this) {
}
break;
case AI360_WOLF:
if (D_ctx_80177CD0[0] != 0) {
if (gStarWolfTeamAlive[0] != 0) {
func_360_8002F5F4(gMsg_ID_9330, RCID_WOLF);
}
break;
case AI360_LEON:
if (D_ctx_80177CD0[1] != 0) {
if (gStarWolfTeamAlive[1] != 0) {
func_360_8002F5F4(gMsg_ID_9340, RCID_LEON);
}
break;
case AI360_PIGMA:
if (D_ctx_80177CD0[2] != 0) {
if (gStarWolfTeamAlive[2] != 0) {
func_360_8002F5F4(gMsg_ID_9350, RCID_PIGMA);
}
break;
case AI360_ANDREW:
if (D_ctx_80177CD0[3] != 0) {
if (gStarWolfTeamAlive[3] != 0) {
func_360_8002F5F4(gMsg_ID_9360, RCID_ANDREW);
}
break;
@ -1818,7 +1819,7 @@ void ActorAllRange_Update(Actor* this) {
break;
case 8:
this->fwork[1] = 40.0f;
if (this->index & 1) {
if ((this->index % 2) != 0) {
Math_SmoothStepToAngle(&this->obj.rot.z, 355.0f, 0.1f, 3.0f, 0.01f);
} else {
Math_SmoothStepToAngle(&this->obj.rot.z, 5.0f, 0.1f, 3.0f, 0.01f);
@ -1942,7 +1943,7 @@ void ActorAllRange_Update(Actor* this) {
}
if ((this->fwork[7] > 0.01f) && (this->fwork[7] < 359.9f)) {
Math_SmoothStepToAngle(&this->obj.rot.z, this->fwork[7], 0.2f, 100.0f, 0.01f);
if ((this->aiType == AI360_KATT) && !(gGameFrameCount & 1)) {
if ((this->aiType == AI360_KATT) && ((gGameFrameCount % 2) == 0)) {
if ((this->fwork[7] > 10.0f) && (this->fwork[7] < 350.0f)) {
Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, 0);
Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, 1);
@ -2154,7 +2155,7 @@ void func_360_80035098(Actor* actor) {
bool func_360_800352E0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) {
Actor* this = thisx;
if (this->timer_0C6 & 1) {
if ((this->timer_0C6 % 2) != 0) {
RCP_SetupDL(&gMasterDisp, 0x22);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 128, 128, 255);
} else {
@ -2165,41 +2166,40 @@ bool func_360_800352E0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void*
}
if ((limbIndex == 1) || (limbIndex == 2)) {
RCP_SetupDL(&gMasterDisp, 0x22);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, (s32) D_360_8015F914, (s32) D_360_8015F918, (s32) D_360_8015F91C,
255);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, (s32) gSzMissileR, (s32) gSzMissileG, (s32) gSzMissileB, 255);
}
return false;
}
void ActorAllRange_Draw(Actor* actor) {
void ActorAllRange_Draw(ActorAllRange* this) {
f32 sp38;
s32 pad[3];
Vec3f sp1E4 = { 0.0f, 0.0f, 0.0f };
Vec3f sp7C[30];
f32 pad2;
if (actor->aiType != AI360_EVENT_HANDLER) {
if ((actor->iwork[8] != 0) && (actor->aiType < AI360_GREAT_FOX)) {
pad2 = SIN_DEG(actor->iwork[8] * 400.0f);
sp38 = actor->iwork[8] * pad2;
if (this->aiType != AI360_EVENT_HANDLER) {
if ((this->iwork[8] != 0) && (this->aiType < AI360_GREAT_FOX)) {
pad2 = SIN_DEG(this->iwork[8] * 400.0f);
sp38 = this->iwork[8] * pad2;
Matrix_RotateY(gGfxMatrix, M_DTOR * sp38, 1);
Matrix_RotateX(gGfxMatrix, M_DTOR * sp38, 1);
Matrix_RotateZ(gGfxMatrix, M_DTOR * sp38, 1);
Matrix_SetGfxMtx(&gMasterDisp);
}
if ((actor->timer_0C6 % 2) == 0) {
if ((this->timer_0C6 % 2) == 0) {
RCP_SetupDL(&gMasterDisp, 0x1D);
gSPFogPosition(gMasterDisp++, gFogNear, 1005);
}
switch (actor->aiType) {
switch (this->aiType) {
case AI360_FOX:
case AI360_FALCO:
case AI360_SLIPPY:
case AI360_PEPPY:
Matrix_Push(&gGfxMatrix);
func_edisplay_8005B388(actor);
func_edisplay_8005B388(this);
Matrix_Pop(&gGfxMatrix);
func_360_80035098(actor);
func_360_80035098(this);
break;
case AI360_WOLF:
case AI360_LEON:
@ -2209,43 +2209,43 @@ void ActorAllRange_Draw(Actor* actor) {
gSPDisplayList(gMasterDisp++, D_STAR_WOLF_F0103D0);
Matrix_Push(&gGfxMatrix);
Matrix_Translate(gGfxMatrix, 30.0f, 0.0f, -60.0f, 1);
func_edisplay_8005B1E8(actor, 2);
func_edisplay_8005B1E8(this, 2);
Matrix_Pop(&gGfxMatrix);
Matrix_Push(&gGfxMatrix);
Matrix_Translate(gGfxMatrix, -30.0f, 0.0f, -60.0f, 1);
func_edisplay_8005B1E8(actor, 2);
func_edisplay_8005B1E8(this, 2);
Matrix_Pop(&gGfxMatrix);
func_360_80035098(actor);
func_360_80034E64(actor);
func_360_80035098(this);
func_360_80034E64(this);
} else {
gSPDisplayList(gMasterDisp++, D_STAR_WOLF_F00F200);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, 1);
if (gCurrentLevel == LEVEL_BOLSE) {
func_edisplay_8005B1E8(actor, 3);
func_edisplay_8005B1E8(this, 3);
} else {
func_edisplay_8005B1E8(actor, 2);
func_edisplay_8005B1E8(this, 2);
}
}
break;
case AI360_KATT:
gSPDisplayList(gMasterDisp++, D_D009A40);
func_edisplay_8005ADAC(actor);
func_edisplay_8005ADAC(this);
break;
case AI360_BILL:
gSPDisplayList(gMasterDisp++, D_D00B880);
func_edisplay_8005ADAC(actor);
func_edisplay_8005ADAC(this);
break;
case AI360_GREAT_FOX:
func_edisplay_8005F670(&actor->obj.pos);
actor->unk_0B6 = 1;
func_demo_8004FEC0(actor);
func_edisplay_8005F670(&this->obj.pos);
this->unk_0B6 = 1;
func_demo_8004FEC0(this);
break;
case AI360_MISSILE:
Animation_GetFrameData(&D_SZ_6006D64, 0, sp7C);
Animation_DrawSkeleton(3, D_SZ_6006E50, sp7C, func_360_800352E0, NULL, actor, gCalcMatrix);
Animation_DrawSkeleton(3, D_SZ_6006E50, sp7C, func_360_800352E0, NULL, this, gCalcMatrix);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -400.0f, 1);
Matrix_Scale(gGfxMatrix, actor->fwork[29], actor->fwork[29], actor->fwork[29], 1);
func_edisplay_8005B1E8(actor, 3);
Matrix_Scale(gGfxMatrix, this->fwork[29], this->fwork[29], this->fwork[29], 1);
func_edisplay_8005B1E8(this, 3);
break;
default:
if (gCurrentLevel == LEVEL_FORTUNA) {
@ -2254,47 +2254,47 @@ void ActorAllRange_Draw(Actor* actor) {
gSPDisplayList(gMasterDisp++, D_FO_6006BE0);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -100.0f, 1);
Matrix_Scale(gGfxMatrix, 1.5f, 1.5f, 1.5f, 1);
func_edisplay_8005B1E8(actor, 2);
func_edisplay_8005B1E8(this, 2);
} else if (gCurrentLevel == LEVEL_KATINA) {
switch (actor->unk_0B6) {
switch (this->unk_0B6) {
case 0:
gSPDisplayList(gMasterDisp++, D_KA_600EFF0);
break;
case 1:
gSPDisplayList(gMasterDisp++, D_KA_600E050);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, 1);
func_edisplay_8005B1E8(actor, 0);
func_edisplay_8005B1E8(this, 0);
break;
case 3:
gSPDisplayList(gMasterDisp++, D_KA_6001530);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 30.0f, 1);
func_360_80034E64(actor);
func_360_80034E64(this);
break;
}
} else if (gCurrentLevel == LEVEL_SECTOR_Z) {
gSPDisplayList(gMasterDisp++, D_SZ_6004FE0) Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, 1);
func_edisplay_8005B1E8(actor, 2);
func_edisplay_8005B1E8(this, 2);
} else if (gCurrentLevel == LEVEL_BOLSE) {
gSPDisplayList(gMasterDisp++, D_BO_6008770) Matrix_Push(&gGfxMatrix);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, 1);
func_edisplay_8005B1E8(actor, 2);
func_edisplay_8005B1E8(this, 2);
Matrix_Pop(&gGfxMatrix);
func_360_80034E64(actor);
func_360_80034E64(this);
} else if (gCurrentLevel == LEVEL_VENOM_ANDROSS) {
Animation_GetFrameData(&D_VE2_600C200, actor->unk_04A, actor->vwork);
Animation_GetFrameData(&D_VE2_600C200, this->unk_04A, this->vwork);
Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 10.0f, 1);
Animation_DrawSkeleton(0, D_VE2_600C2AC, actor->vwork, NULL, NULL, actor, &gIdentityMatrix);
Animation_DrawSkeleton(0, D_VE2_600C2AC, this->vwork, NULL, NULL, this, &gIdentityMatrix);
} else if (gCurrentLevel == LEVEL_VERSUS) {
gSPDisplayList(gMasterDisp++, D_versus_3015740);
} else if (gCurrentLevel == LEVEL_TRAINING) {
if (actor->aiIndex == AI360_FOX) {
if (this->aiIndex == AI360_FOX) {
gSPDisplayList(gMasterDisp++, D_STAR_WOLF_F00F200);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, 1);
func_edisplay_8005B1E8(actor, 3);
func_edisplay_8005B1E8(this, 3);
} else {
gSPDisplayList(gMasterDisp++, D_ENMY_PLANET_40068F0);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, 1);
func_edisplay_8005B1E8(actor, 2);
func_edisplay_8005B1E8(this, 2);
}
}
break;

View File

@ -14,13 +14,13 @@ void func_800A3CA0(void) {
void func_800A3E00(void) {
switch (D_ctx_80177868) {
case 0:
if (D_Timer_8017783C == 0) {
if (gNextGameStateTimer == 0) {
D_ctx_80177868 = 1;
}
break;
case 1:
D_ctx_80177868 = 2;
gDrawMode = DRAWMODE_7;
gDrawMode = DRAW_UNK_7;
gCsCamAtY = 0.0f;
gCsCamAtX = gCsCamAtY;
gCsCamEyeZ = gCsCamAtX;
@ -32,14 +32,14 @@ void func_800A3E00(void) {
if ((gControllerPress[0].button & START_BUTTON) || (gControllerPress[1].button & START_BUTTON)) {
func_8001D638(0);
D_ctx_80177868 = 3;
gDrawMode = DRAWMODE_0;
func_play_800A5844();
D_Timer_8017783C = 0;
gDrawMode = DRAW_NONE;
Play_Setup();
gNextGameStateTimer = 0;
}
break;
case 3:
if (D_Timer_8017783C == 0) {
D_ctx_80177854 = 2;
if (gNextGameStateTimer == 0) {
gPlayState = PLAY_UPDATE;
}
break;
}

View File

@ -60,7 +60,7 @@ void func_beam_80035E78(PlayerShot* shot) {
gScreenFlashTimer = 4;
if (shot->obj.pos.y < (gGroundLevel + 450.0f)) {
gCameraShake = 15;
if (D_ctx_80161A88 == 2) {
if (gGroundType == GROUNDTYPE_WATER) {
func_effect_8007D9DC(shot->obj.pos.x, gGroundLevel + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f,
shot->unk_48 * 3.0f, 0);
func_effect_8007D9DC(shot->obj.pos.x, gGroundLevel + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f,
@ -184,7 +184,7 @@ void func_beam_800365E4(f32 xPos, f32 yPos, f32 zPos, f32 arg3, f32 arg4, f32 ar
s32 unk44, s32 time) {
s32 i;
if ((D_ctx_801784AC != 4) && (gLevelType == LEVELTYPE_PLANET) && (D_ctx_80161A88 != 2) &&
if ((D_ctx_801784AC != 4) && (gLevelType == LEVELTYPE_PLANET) && (gGroundType != GROUNDTYPE_WATER) &&
(gCurrentLevel != LEVEL_SOLAR) && (gCurrentLevel != LEVEL_BOLSE) && (gCurrentLevel != LEVEL_TRAINING) &&
(gCurrentLevel != LEVEL_ZONESS)) {
for (i = 0; i < 50; i++) {
@ -213,7 +213,7 @@ void func_beam_800366CC(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 yRot,
void func_beam_80036770(f32 xPos, f32 yPos, f32 zPos, f32 yRot, f32 scale) {
s32 i;
if ((D_ctx_801784AC != 4) && (gLevelType == LEVELTYPE_PLANET) && (D_ctx_80161A88 <= 0) &&
if ((D_ctx_801784AC != 4) && (gLevelType == LEVELTYPE_PLANET) && (gGroundType <= GROUNDTYPE_GRASS) &&
(gCurrentLevel != LEVEL_TRAINING) && (gCurrentLevel != LEVEL_SOLAR) && (gCurrentLevel != LEVEL_ZONESS)) {
for (i = 0; i < 50; i++) {
if (gEffects[i].obj.status == OBJ_FREE) {
@ -459,12 +459,12 @@ bool func_beam_80037438(PlayerShot* shot, Actor* actor) {
return false;
}
bool func_beam_80037698(PlayerShot* shot, Object_4C* obj4C) {
f32* temp_v0 = obj4C->info.hitbox;
bool func_beam_80037698(PlayerShot* shot, Sprite* sprite) {
f32* temp_v0 = sprite->info.hitbox;
if (((s32) temp_v0[0] != 0) && (fabsf(temp_v0[1] + obj4C->obj.pos.z - shot->obj.pos.z) < temp_v0[2]) &&
(fabsf(temp_v0[3] + obj4C->obj.pos.y - shot->obj.pos.y) < temp_v0[4]) &&
(fabsf(temp_v0[5] + obj4C->obj.pos.x - shot->obj.pos.x) < temp_v0[6])) {
if (((s32) temp_v0[0] != 0) && (fabsf(temp_v0[1] + sprite->obj.pos.z - shot->obj.pos.z) < temp_v0[2]) &&
(fabsf(temp_v0[3] + sprite->obj.pos.y - shot->obj.pos.y) < temp_v0[4]) &&
(fabsf(temp_v0[5] + sprite->obj.pos.x - shot->obj.pos.x) < temp_v0[6])) {
return true;
}
return false;
@ -730,7 +730,7 @@ void func_beam_80038140(PlayerShot* shot) {
Actor* actor;
Boss* boss;
Object_58* obj58;
Object_4C* obj4C;
Sprite* sprite;
Object_80* obj80;
Effect* effect;
bool sp60;
@ -929,15 +929,15 @@ void func_beam_80038140(PlayerShot* shot) {
}
}
if (sp60) {
for (i = 0, obj4C = gObjects4C; i < 40; i++, obj4C++) {
if (obj4C->obj.status == OBJ_ACTIVE) {
if (obj4C->obj.id != OBJ_4C_169) {
if (func_beam_80037698(shot, obj4C)) {
obj4C->unk_46 = 1;
for (i = 0, sprite = gSprites; i < 40; i++, sprite++) {
if (sprite->obj.status == OBJ_ACTIVE) {
if (sprite->obj.id != OBJ_SPRITE_TI_CACTUS) {
if (func_beam_80037698(shot, sprite)) {
sprite->unk_46 = 1;
}
} else {
if (func_beam_80036874(shot, obj4C->info.hitbox, &obj4C->obj) != 0) {
obj4C->unk_46 = 1;
if (func_beam_80036874(shot, sprite->info.hitbox, &sprite->obj) != 0) {
sprite->unk_46 = 1;
}
}
}
@ -1257,7 +1257,7 @@ void func_beam_80039A50(PlayerShot* shot) {
Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].unk_058, 1);
Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].unk_05C, 1);
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 40.0f * M_DTOR, 1);
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
Matrix_Scale(gGfxMatrix, 1.7f, 1.7f, 1.7f, 1);
} else {
Matrix_Scale(gGfxMatrix, 1.2f, 1.2f, 1.2f, 1);
@ -1334,7 +1334,7 @@ void func_beam_80039A50(PlayerShot* shot) {
Matrix_SetGfxMtx(&gMasterDisp);
gSPDisplayList(gMasterDisp++, D_versus_301AD60);
} else {
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
var_fv1 = M_PI;
} else {
var_fv1 = 0.0f;
@ -1346,7 +1346,7 @@ void func_beam_80039A50(PlayerShot* shot) {
gSPDisplayList(gMasterDisp++, D_versus_301AD60);
}
} else {
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
var_fv1 = M_PI;
} else {
var_fv1 = 0.0f;
@ -1436,7 +1436,7 @@ void func_beam_80039A50(PlayerShot* shot) {
Matrix_SetGfxMtx(&gMasterDisp);
gSPDisplayList(gMasterDisp++, D_101C2E0);
Matrix_Pop(&gGfxMatrix);
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
Matrix_Scale(gGfxMatrix, 1.7f, 1.7f, 1.7f, 1);
} else {
Matrix_Scale(gGfxMatrix, 1.3f, 1.3f, 1.3f, 1);
@ -1452,7 +1452,7 @@ void func_beam_80039A50(PlayerShot* shot) {
Matrix_Translate(gGfxMatrix, shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z + D_ctx_80177D20, 1);
Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].unk_058, 1);
Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].unk_05C, 1);
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
Matrix_Scale(gGfxMatrix, 1.2f, 1.2f, 1.2f, 1);
} else {
Matrix_Scale(gGfxMatrix, 1.5f, 1.5f, 1.5f, 1);
@ -1560,7 +1560,7 @@ void func_beam_8003B00C(PlayerShot* shot, Player* player) {
shot->unk_48 += shot->vel.x;
shot->unk_4C += shot->vel.y;
shot->unk_50 += shot->vel.z;
if (!(gGameFrameCount & 3)) {
if (((gGameFrameCount % 4) == 0)) {
func_play_800A668C(D_ctx_8017849C, D_ctx_801784A0, D_ctx_80178498);
}
if ((fabsf(shot->obj.pos.x - shot->unk_48) < 200.0f) && (fabsf(shot->obj.pos.y - shot->unk_4C) < 200.0f) &&
@ -1591,7 +1591,7 @@ void func_beam_8003B55C(PlayerShot* shot, s32 index) {
Vec3f sp44;
Vec3f sp38;
if ((D_ctx_80161A88 == 2) && (shot->obj.pos.y < (gGroundLevel + 50.0f)) && (index == 0)) {
if ((gGroundType == GROUNDTYPE_WATER) && (shot->obj.pos.y < (gGroundLevel + 50.0f)) && (index == 0)) {
func_effect_8007ACE0(shot->obj.pos.x, gGroundLevel, shot->obj.pos.z, 0.1f, 1.5f, shot->obj.rot.y + 20.0f);
func_effect_8007ACE0(shot->obj.pos.x, gGroundLevel, shot->obj.pos.z, 0.1f, 1.5f, shot->obj.rot.y - 20.0f);
}
@ -1620,7 +1620,7 @@ void func_beam_8003B55C(PlayerShot* shot, s32 index) {
func_beam_80036770(shot->obj.pos.x, gGroundLevel + 2.0f, shot->obj.pos.z, shot->obj.rot.y, 2.0f);
}
}
if (D_ctx_80161A88 == 2) {
if (gGroundType == GROUNDTYPE_WATER) {
Object_Kill(&shot->obj, shot->sfxSource);
return;
}
@ -1644,7 +1644,7 @@ void func_beam_8003B55C(PlayerShot* shot, s32 index) {
if (shot->unk_64 == 0) {
Object_Kill(&shot->obj, shot->sfxSource);
return;
} else if ((shot->playerNum < 110) || (shot->unk_64 & 1)) {
} else if ((shot->playerNum < 110) || ((shot->unk_64 % 2) != 0)) {
func_beam_80038140(shot);
}
}
@ -1761,10 +1761,10 @@ void func_beam_8003C008(PlayerShot* shot) {
for (i = 0; i < ARRAY_COUNT(gBosses); i++, boss++) {
if ((boss->obj.status == OBJ_ACTIVE) && (boss->timer_05A == 0)) {
if (boss->obj.id == OBJ_BOSS_316) {
var_s6 = gGameFrameCount & 7;
var_s6 = gGameFrameCount % 8U;
var_fs2 = shot->unk_44 * 40.0f;
} else {
var_s6 = gGameFrameCount & 0xF;
var_s6 = gGameFrameCount % 16U;
var_fs2 = shot->unk_44 * 30.0f;
}
hitboxData = boss->info.hitbox;
@ -1839,7 +1839,7 @@ void func_beam_8003C4D0(PlayerShot* shot, s32 damage) {
f32 sp60;
s32 pad[2];
Actor* actor;
Object_4C* obj4C;
Sprite* sprite;
Object_80* obj80;
Effect* effect;
Player* player;
@ -1856,14 +1856,15 @@ void func_beam_8003C4D0(PlayerShot* shot, s32 damage) {
obj80->dmgPart = 0;
}
}
for (i = 0, obj4C = gObjects4C; i < 40; i++, obj4C++) {
if ((obj4C->obj.status == OBJ_ACTIVE) && ((obj4C->obj.id == OBJ_4C_163) || (obj4C->obj.id == OBJ_4C_169) ||
(obj4C->obj.id == OBJ_4C_161) || (obj4C->obj.id == OBJ_4C_162))) {
sp68 = obj4C->obj.pos.x - shot->obj.pos.x;
sp64 = obj4C->obj.pos.y - shot->obj.pos.y;
sp60 = obj4C->obj.pos.z - shot->obj.pos.z;
for (i = 0, sprite = gSprites; i < 40; i++, sprite++) {
if ((sprite->obj.status == OBJ_ACTIVE) &&
((sprite->obj.id == OBJ_SPRITE_FO_POLE) || (sprite->obj.id == OBJ_SPRITE_TI_CACTUS) ||
(sprite->obj.id == OBJ_SPRITE_CO_POLE) || (sprite->obj.id == OBJ_SPRITE_CO_TREE))) {
sp68 = sprite->obj.pos.x - shot->obj.pos.x;
sp64 = sprite->obj.pos.y - shot->obj.pos.y;
sp60 = sprite->obj.pos.z - shot->obj.pos.z;
if (sqrtf(SQ(sp68) + SQ(sp64) + SQ(sp60)) < temp_fs2) {
obj4C->unk_46 = 1;
sprite->unk_46 = 1;
}
}
}
@ -1898,7 +1899,7 @@ void func_beam_8003C4D0(PlayerShot* shot, s32 damage) {
if (actor->info.bonus != 0) {
shot->bonus++;
}
} else if ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->scale >= 0.5f) && (damage >= 31)) {
} else if ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->scale >= 0.5f) && (damage > 30)) {
actor->unk_0D4 = shot->playerNum + 1;
actor->vel.x = sp68 * 0.03f;
actor->vel.y = sp64 * 0.03f;
@ -2065,7 +2066,7 @@ void func_beam_8003CF90(PlayerShot* shot) {
Player* player;
if ((shot->obj.pos.y < gGroundLevel) || (shot->unk_64 == 1)) {
if ((D_ctx_80161A88 == 2) && (shot->obj.pos.y < gGroundLevel)) {
if ((gGroundType == GROUNDTYPE_WATER) && (shot->obj.pos.y < gGroundLevel)) {
shot->unk_48 = 10.0f;
func_effect_8007D9DC(shot->obj.pos.x, gGroundLevel + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f,
shot->unk_48 * 3.0f, 0);
@ -2207,18 +2208,19 @@ void func_beam_8003D54C(PlayerShot* shot, s32 index) {
gHitCount += shot->bonus;
}
if ((shot->bonus >= 7) && (gBossActive == 0) && (gLevelMode == LEVELMODE_ON_RAILS) &&
((gTeamShields[1] > 0) || (gTeamShields[2] > 0) || (gTeamShields[3] > 0))) {
((gTeamShields[TEAM_ID_FALCO] > 0) || (gTeamShields[TEAM_ID_SLIPPY] > 0) ||
(gTeamShields[TEAM_ID_PEPPY] > 0))) {
do {
teamId = RAND_INT(2.9f) + 1;
} while (gTeamShields[teamId] <= 0);
switch (teamId) {
case 1:
case TEAM_ID_FALCO:
Radio_PlayMessage(gMsg_ID_7100, RCID_FALCO);
break;
case 2:
case TEAM_ID_SLIPPY:
Radio_PlayMessage(gMsg_ID_15252, RCID_SLIPPY);
break;
case 3:
case TEAM_ID_PEPPY:
Radio_PlayMessage(gMsg_ID_17160, RCID_PEPPY);
break;
}
@ -2276,7 +2278,7 @@ void func_beam_8003D854(PlayerShot* shot) {
}
}
void func_beam_8003D9B8(void) {
void PlayerShot_Update(void) {
s32 i;
for (i = 0; i < 16; i++) {
@ -2285,18 +2287,18 @@ void func_beam_8003D9B8(void) {
}
}
void func_beam_8003DA0C(void) {
void PlayerShot_Draw(void) {
s32 i;
for (i = 0; i < 16; i++) {
gPlayerShots[i].index = i;
if (gPlayerShots[i].obj.status != 0) {
if (!((D_display_80161410 < 0) && (gPlayerShots[i].obj.rot.x < -10.0f))) {
if (!((gReflectY < 0) && (gPlayerShots[i].obj.rot.x < -10.0f))) {
Matrix_Push(&gGfxMatrix);
func_beam_8003AF88(&gPlayerShots[i]);
Matrix_Pop(&gGfxMatrix);
}
if (D_display_80161410 > 0) {
if (gReflectY > 0) {
func_edisplay_8005F290(gPlayerShots[i].sfxSource, &D_beam_8015F950);
}
}

View File

@ -21,6 +21,9 @@
#include "assets/ast_area_6.h"
#include "assets/ast_zoness.h"
#include "prevent_bss_reordering2.h"
#include "prevent_bss_reordering3.h"
f32 D_bg_8015F960;
u8 D_bg_8015F964;
f32 D_bg_8015F968;
@ -505,8 +508,7 @@ void func_bg_8003E1E8(void) {
RCP_SetupDL_36();
sp138 = D_ctx_80178420;
sp134 = D_ctx_80178424;
if (((gCurrentLevel == LEVEL_SECTOR_X) || (gCurrentLevel == LEVEL_METEO)) &&
(D_ctx_8017827C == 1)) {
if (((gCurrentLevel == LEVEL_SECTOR_X) || (gCurrentLevel == LEVEL_METEO)) && (gLevelStage == 1)) {
sp11C = LEVEL_WARP_ZONE;
}
if (sp11C == LEVEL_SECTOR_X) {
@ -604,7 +606,7 @@ void func_bg_8003E1E8(void) {
break;
case LEVEL_FORTUNA:
sp128 = 1.5f;
if ((gCsFrameCount > 400) && (D_ctx_80177930 == 0)) {
if ((gCsFrameCount > 400) && (gNextPlanetPath == 0)) {
sp128 = 0.75f;
}
Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, 1);
@ -676,23 +678,23 @@ void func_bg_80040450(void) {
Gfx** var_s3;
f32* var_s4;
s32 i;
s32 temp = gLevelType;
s32 levelType = gLevelType;
if ((gCurrentLevel == LEVEL_KATINA) || (gCurrentLevel == LEVEL_VENOM_2) || (gCurrentLevel == LEVEL_VENOM_ANDROSS) ||
(gCurrentLevel == LEVEL_SOLAR) || (gCurrentLevel == LEVEL_TRAINING) || gVersusMode) {
return;
}
D_ctx_80178380[gPlayerNum] -= D_bg_800C9E4C[temp];
if (D_ctx_80178380[gPlayerNum] > 300) {
D_ctx_80178380[gPlayerNum] = 0;
gPlayerFillScreenAlphas[gPlayerNum] -= D_bg_800C9E4C[levelType];
if (gPlayerFillScreenAlphas[gPlayerNum] > 300) {
gPlayerFillScreenAlphas[gPlayerNum] = 0;
}
if (((gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2)) ||
(((gPlayer[gPlayerNum].state_1C8 == PLAYERSTATE_1C8_5) || (gLevelMode == LEVELMODE_ALL_RANGE) ||
(gPlayer[gPlayerNum].state_1C8 == PLAYERSTATE_1C8_7)) &&
(gLevelType == LEVELTYPE_PLANET) && (gCurrentLevel != LEVEL_TITANIA) && (gCurrentLevel != LEVEL_AQUAS))) {
D_ctx_80178390[gPlayerNum] = 128;
D_ctx_801783A0[gPlayerNum] = 128;
D_ctx_801783B0[gPlayerNum] = 128;
gPlayerFillScreenReds[gPlayerNum] = 128;
gPlayerFillScreenGreens[gPlayerNum] = 128;
gPlayerFillScreenBlues[gPlayerNum] = 128;
sp44 = Math_RadToDeg(gPlayer[gPlayerNum].unk_058);
var_fa0 = Math_RadToDeg(gPlayer[gPlayerNum].unk_05C);
if (var_fa0 > 180.0f) {
@ -704,18 +706,18 @@ void func_bg_80040450(void) {
if (gCurrentLevel == LEVEL_KATINA) {
D_ctx_801783D4 -= 80.0f;
}
if ((gCurrentLevel == LEVEL_ZONESS) && (gPlayer[0].unk_1D0 >= 2) && (D_enmy_80161684 == 0)) {
if ((gCurrentLevel == LEVEL_ZONESS) && (gPlayer[0].unk_1D0 >= 2) && !gMissedZoSearchlight) {
D_ctx_801783D4 -= 60.0f;
D_ctx_801783D0 -= 480.0f;
}
if ((D_ctx_801783D0 < 120.0f) && (D_ctx_801783D0 > -120.0f) && (D_ctx_801783D4 < 120.0f)) {
D_ctx_80178380[gPlayerNum] += D_bg_800C9E4C[temp] * 2;
if (D_bg_800C9E54[temp] < D_ctx_80178380[gPlayerNum]) {
D_ctx_80178380[gPlayerNum] = D_bg_800C9E54[temp];
gPlayerFillScreenAlphas[gPlayerNum] += D_bg_800C9E4C[levelType] * 2;
if (D_bg_800C9E54[levelType] < gPlayerFillScreenAlphas[gPlayerNum]) {
gPlayerFillScreenAlphas[gPlayerNum] = D_bg_800C9E54[levelType];
}
}
}
if (D_ctx_80178380[gPlayerNum] != 0) {
if (gPlayerFillScreenAlphas[gPlayerNum] != 0) {
Matrix_Push(&gGfxMatrix);
Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].unk_034 * M_DTOR, 1);
Matrix_Translate(gGfxMatrix, D_ctx_801783D0, D_ctx_801783D4, -200.0f, 1);
@ -755,12 +757,12 @@ void func_bg_80040954(void) {
f32 var_fv0;
if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) || (gLevelType == LEVELTYPE_SPACE) ||
(D_ctx_80178380[gPlayerNum] == 0)) {
(gPlayerFillScreenAlphas[gPlayerNum] == 0)) {
return;
}
var_fs2 = 1.0f;
if (D_ctx_80178380[gPlayerNum] < 80) {
var_fs2 = D_ctx_80178380[gPlayerNum] / 80.0f;
if (gPlayerFillScreenAlphas[gPlayerNum] < 80) {
var_fs2 = gPlayerFillScreenAlphas[gPlayerNum] / 80.0f;
}
var_fs2 *= D_bg_800C9E5C[gLevelType];
Matrix_Push(&gGfxMatrix);
@ -887,16 +889,16 @@ void func_bg_80040CE4(void) {
temp_fv0 = Math_ModF((10000.0f - gPlayer[gPlayerNum].unk_0AC) * 0.32f, 128.0f);
gDPSetupTile(gMasterDisp++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32, temp_fv0, temp_s0,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD);
switch (D_ctx_80161A88) {
case 0:
switch (gGroundType) {
case GROUNDTYPE_GRASS:
gDPLoadTileTexture(gMasterDisp++, D_CO_601B6C0, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32);
gBgColor = 0x845; // 8, 8, 32
break;
case 1:
case GROUNDTYPE_ROCK:
gDPLoadTileTexture(gMasterDisp++, D_CO_6028260, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32);
gBgColor = 0x845; // 8, 8, 32
break;
case 2:
case GROUNDTYPE_WATER:
RCP_SetupDL_45(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 128);
gDPLoadTileTexture(gMasterDisp++, D_CO_6028A60, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32);
@ -914,7 +916,7 @@ void func_bg_80040CE4(void) {
Matrix_SetGfxMtx(&gMasterDisp);
gSPDisplayList(gMasterDisp++, D_CO_601B640);
} else {
D_ctx_80161A88 = 0;
gGroundType = GROUNDTYPE_GRASS;
gBgColor = 0x845; // 8, 8, 32
for (i = 0; i < 4; i++) {
Matrix_Push(&gGfxMatrix);
@ -1100,7 +1102,7 @@ void func_bg_80040CE4(void) {
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -2000.0f, 1);
Matrix_Scale(gGfxMatrix, 3.0f, 2.0f, 3.0f, 1);
Matrix_SetGfxMtx(&gMasterDisp);
if (gGameFrameCount & 1) {
if ((gGameFrameCount % 2) != 0) {
gSPDisplayList(gMasterDisp++, D_SO_60005B0);
} else {
gSPDisplayList(gMasterDisp++, D_SO_6002E60);
@ -1111,7 +1113,7 @@ void func_bg_80040CE4(void) {
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -1500.0f, 1);
Matrix_Scale(gGfxMatrix, 3.0f, 2.0f, 3.0f, 1);
Matrix_SetGfxMtx(&gMasterDisp);
if (gGameFrameCount & 1) {
if ((gGameFrameCount % 2) != 0) {
gSPDisplayList(gMasterDisp++, D_ZO_6008830);
} else {
gSPDisplayList(gMasterDisp++, D_ZO_600B0E0);
@ -1137,7 +1139,7 @@ void func_bg_80042D38(void) {
RCP_SetupDL_37(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 125);
Matrix_SetGfxMtx(&gMasterDisp);
if (gGameFrameCount & 1) {
if ((gGameFrameCount % 2) != 0) {
gSPDisplayList(gMasterDisp++, D_AQ_602C030);
} else {
gSPDisplayList(gMasterDisp++, D_AQ_602C088);

View File

@ -41,22 +41,22 @@ void func_boss_80042EC0(Boss* boss) {
D_ctx_80177850 = 15;
}
void Boss299_Init(Boss* boss) {
void Boss299_Init(Boss299* this) {
}
void Boss299_Update(Boss* boss) {
void Boss299_Update(Boss299* this) {
}
void Boss299_Draw(Boss* boss) {
void Boss299_Draw(Boss299* this) {
}
void Boss300_Init(Boss* boss) {
void Boss300_Init(Boss300* this) {
}
void Boss300_Update(Boss* boss) {
void Boss300_Update(Boss300* this) {
}
void Boss300_Draw(Boss* boss) {
void Boss300_Draw(Boss300* this) {
}
void func_boss_80042FF4(Actor* actor, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7, f32 arg8,

View File

@ -9,10 +9,10 @@ s32 gOverlayStage;
s32 D_ctx_80177824; // some sort of flag
s32 D_ctx_8017782C; // some sort of flag. all range related?
GameState gGameState;
s32 D_Timer_8017783C; // next game state timer?
s32 D_ctx_80177844; // timer for vs item spawn
s32 gNextGameStateTimer; // next game state timer?
s32 D_ctx_80177844; // timer for vs item spawn
OptionState gOptionMenuStatus;
s32 D_ctx_80177854; // pause-related state
s32 gPlayState; // pause-related state
s32 D_ctx_80177868; // some sort of state. pause-related?
LevelMode gLevelMode;
DrawMode gDrawMode;
@ -20,9 +20,9 @@ s32 gPlayerNum;
s32 gCamCount;
s32 gTeamShields[6];
s32 gSavedTeamShields[6];
s32 D_ctx_801778F0[6];
s32 gPrevPlanetSavedTeamShields[6];
s32 gTeamDamage[6];
u8 D_ctx_80177930; // next planet path
u8 gNextPlanetPath; // next planet path
f32 gGroundLevel;
f32 D_ctx_80177950;
f32 D_ctx_80177968;
@ -50,8 +50,8 @@ s32 D_ctx_80177B50[7];
s32 D_ctx_80177B70[7];
PlanetId D_ctx_80177B90[7];
s32 D_ctx_80177BB0[7];
s32 D_ctx_80177BD8[22]; // overruns D_ctx_80177C38?
s32 D_ctx_80177C38[6];
s32 D_ctx_80177BD8[22]; // overruns gPrevPlanetTeamShields?
s32 gPrevPlanetTeamShields[6];
s32 D_ctx_80177C58[6];
u8 gSoundMode;
s32 gVolumeSettings[3];
@ -75,13 +75,13 @@ s32 gGameFrameCount;
s32 D_ctx_80177DC8;
s32 D_ctx_80177E70;
s32 D_ctx_80177E78;
s32 D_ctx_80177E80;
s32 gRingPassCount;
Vec3f D_ctx_80177E88;
Vec3f D_ctx_80177F10;
UNK_TYPE F_80178020;
s32 D_ctx_8017812C;
LevelId gCurrentLevel;
s32 D_ctx_8017827C;
s32 gLevelStage;
s32 gBossActive;
s32 D_ctx_8017828C;
s32 D_ctx_80178294;
@ -102,19 +102,19 @@ UNK_TYPE F_801782F0;
s32 D_ctx_801782F8;
s32 D_ctx_80178300;
u16* D_ctx_80178308;
ObjectInit* D_ctx_80178310;
ObjectInit* gLevelObjects;
UNK_TYPE F_80178318;
s32 gFogRed;
s32 gFogGreen;
s32 gFogBlue;
s32 gFogAlpha;
s32 D_ctx_80178340; // alpha something
s32 D_ctx_80178348; // red something
s32 D_ctx_80178350; // green something
s32 D_ctx_80178354; // blue something
s32 D_ctx_80178358; // alpha target
s32 D_ctx_8017835C; // alpha step
s32 D_ctx_80178360; // 2 lights second color
s32 gFillScreenAlpha; // alpha something
s32 gFillScreenRed; // red something
s32 gFillScreenGreen; // green something
s32 gFillScreenBlue; // blue something
s32 gFillScreenAlphaTarget; // alpha target
s32 gFillScreenAlphaStep; // alpha step
s32 D_ctx_80178360; // 2 lights second color
s32 D_ctx_80178364;
s32 D_ctx_80178368;
f32 D_ctx_8017836C; // 2 lights second color brightness
@ -122,10 +122,10 @@ f32 D_ctx_80178370; // Vec3f?
f32 D_ctx_80178374;
f32 D_ctx_80178378;
s32 D_ctx_8017837C;
u32 D_ctx_80178380[4]; // player alphas
s32 D_ctx_80178390[4]; // player reds
s32 D_ctx_801783A0[4]; // player greens
s32 D_ctx_801783B0[4]; // player alphas
u32 gPlayerFillScreenAlphas[4]; // player alphas
s32 gPlayerFillScreenReds[4]; // player reds
s32 gPlayerFillScreenGreens[4]; // player greens
s32 gPlayerFillScreenBlues[4]; // player alphas
UNK_TYPE D_ctx_801783C0[4];
f32 D_ctx_801783D0; // something x translate
f32 D_ctx_801783D4; // something y translate
@ -232,8 +232,8 @@ s32 D_ctx_80161A78;
s32 D_ctx_80161A7C;
s32 D_ctx_80161A80;
s32 D_ctx_80161A84;
s32 D_ctx_80161A88;
s32 D_ctx_80161A8C;
s32 gGroundType;
s32 gSavedGroundType;
u8 gGoldRingCount[4];
u8 D_ctx_80161A94[4];
s32 gHitCount;
@ -247,7 +247,7 @@ UNK_TYPE F_80161AE0[4];
UNK_TYPE F_80161AF0[4];
UNK_TYPE P_800D31A4 = 0;
Object_80 gObjects80[50];
Object_4C gObjects4C[40];
Sprite gSprites[40];
Actor gActors[60];
Boss gBosses[4];
Effect gEffects[100];
@ -264,10 +264,10 @@ f32 D_ctx_80176EB8[2][100];
f32 D_ctx_801771D8[2][100];
f32 D_ctx_80177500[2][100];
UNK_TYPE P_800D31A8 = 0;
u16 D_ctx_80177828; // enemy shot speed?
u8 D_ctx_80177830; // show level complete status overlay
s32 D_ctx_80177838; // level clear related
s32 D_ctx_80177840; // timer for mission accomplished scrren
u16 gEnemyShotSpeed; // enemy shot speed?
u8 D_ctx_80177830; // show level complete status overlay
s32 gLevelStatusScreenTimer; // level clear related
s32 gLevelClearScreenTimer; // timer for mission accomplished scrren
s32 gBossHealthBar;
s32 D_ctx_80177850; // bonus text related. set to 15 but never read
s32 D_ctx_80177858[4];
@ -289,7 +289,7 @@ OSContPad* gInputPress;
u8* D_ctx_80177984;
s32 D_ctx_80177990[4];
f32 D_ctx_801779A8[4];
u8 D_ctx_801779BC;
u8 gPauseEnabled;
s32 gChargeTimers[4];
f32 D_ctx_801779E4;
f32 D_ctx_801779F4;
@ -320,8 +320,8 @@ s32 D_ctx_80177CAC;
s32 D_ctx_80177CB4;
s32 D_ctx_80177CBC;
s32 D_ctx_80177CC4;
s32 D_ctx_80177CD0[6];
s32 D_ctx_80177CF0[6];
s32 gStarWolfTeamAlive[6];
s32 gSavedStarWolfTeamAlive[6];
s32 gRightWingHealth[4];
s32 gLeftWingHealth[4];
s32 D_ctx_80177D40[4];
@ -333,8 +333,8 @@ s32 D_ctx_80177DB8[4];
s32 D_ctx_80177DD0[4][10];
s32 D_ctx_80177E74;
s32 D_ctx_80177E7C;
s32 D_ctx_80177E84;
Vec3f D_ctx_80177E98[10];
s32 gChangeTo360;
Vec3f gTeamArrowsViewPos[10];
f32 D_ctx_80177F20[65];
f32 D_ctx_80178028[65];
f32 D_ctx_80178130[65];

View File

@ -113,8 +113,8 @@ static Animation* D_demo_800CA1F4[] = {
void func_demo_80048AC0(s32 teamId) {
s32 teamShield;
if (teamId == 1) {
if (gTeamShields[1] < 64) {
if (teamId == TEAM_ID_FALCO) {
if (gTeamShields[TEAM_ID_FALCO] < 64) {
Radio_PlayMessage(gMsg_ID_20303, RCID_FALCO);
return;
}
@ -134,28 +134,28 @@ void func_demo_80048AC0(s32 teamId) {
if (teamShield > 160) {
switch (teamId) {
case 2:
case TEAM_ID_SLIPPY:
Radio_PlayMessage(gMsg_ID_20011, RCID_SLIPPY);
break;
case 3:
case TEAM_ID_PEPPY:
Radio_PlayMessage(gMsg_ID_20012, RCID_PEPPY);
break;
}
} else if (teamShield > 64) {
switch (teamId) {
case 2:
case TEAM_ID_SLIPPY:
Radio_PlayMessage(gMsg_ID_20013, RCID_SLIPPY);
break;
case 3:
case TEAM_ID_PEPPY:
Radio_PlayMessage(gMsg_ID_20014, RCID_PEPPY);
break;
}
} else {
switch (teamId) {
case 2:
case TEAM_ID_SLIPPY:
Radio_PlayMessage(gMsg_ID_20015, RCID_SLIPPY);
break;
case 3:
case TEAM_ID_PEPPY:
Radio_PlayMessage(gMsg_ID_20016, RCID_PEPPY);
break;
}
@ -179,7 +179,7 @@ void func_demo_80048CC4(Actor* actor, s32 arg1) {
actor->unk_0B6 = 1;
} else {
actor->iwork[11] = 1;
AUDIO_PLAY_SFX(0x3100000CU, actor->sfxSource, 4U);
AUDIO_PLAY_SFX(0x3100000CU, actor->sfxSource, 4);
}
}
@ -230,19 +230,19 @@ void func_demo_80048E40(Player* player) {
switch (gCsFrameCount) {
case 101:
if (gTeamShields[1] > 0) {
if (gTeamShields[TEAM_ID_FALCO] > 0) {
func_demo_80048CC4(&gActors[0], 0);
}
if (gTeamShields[2] > 0) {
if (gTeamShields[TEAM_ID_SLIPPY] > 0) {
func_demo_80048CC4(&gActors[1], 1);
}
if (gTeamShields[3] > 0) {
if (gTeamShields[TEAM_ID_PEPPY] > 0) {
func_demo_80048CC4(&gActors[2], 2);
}
break;
case 100:
D_ctx_80177840 = 100;
gLevelClearScreenTimer = 100;
break;
case 200:
@ -284,10 +284,10 @@ void func_demo_80048E40(Player* player) {
}
if (gCsFrameCount > 540) {
D_ctx_80178358 = 255;
D_ctx_80178348 = (D_ctx_80178350 = (D_ctx_80178354 = 0));
D_ctx_8017835C = 8;
if (D_ctx_80178340 == 255) {
gFillScreenAlphaTarget = 255;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0;
gFillScreenAlphaStep = 8;
if (gFillScreenAlpha == 255) {
player->state_1C8 = PLAYERSTATE_1C8_6;
player->timer_1F8 = 0;
D_ctx_8017837C = 4;
@ -296,7 +296,7 @@ void func_demo_80048E40(Player* player) {
} else {
D_play_800D3180[LEVEL_SECTOR_X] = Play_CheckMedalStatus(150) + 1;
}
D_ctx_80177930 = 2;
gNextPlanetPath = 2;
}
}
} else {
@ -451,7 +451,7 @@ void func_demo_80049C0C(Player* player) {
player->pos.x += player->vel.x;
player->flags_228 = 0;
player->unk_238 = 0;
player->cockpitView = 0;
player->pos.y += player->vel.y;
player->pos.z += player->vel.z;
@ -486,13 +486,13 @@ void func_demo_80049C0C(Player* player) {
player->vel.z = -500.0f;
player->unk_0CC = -500.0f;
if (gTeamShields[1] > 0) {
if (gTeamShields[TEAM_ID_FALCO] > 0) {
func_demo_80049968(&gActors[0], 0);
}
if (gTeamShields[2] > 0) {
if (gTeamShields[TEAM_ID_SLIPPY] > 0) {
func_demo_80049968(&gActors[1], 1);
}
if (gTeamShields[3] > 0) {
if (gTeamShields[TEAM_ID_PEPPY] > 0) {
func_demo_80049968(&gActors[2], 2);
}
@ -538,17 +538,17 @@ void func_demo_80049C0C(Player* player) {
var_v0 = 1;
player->unk_190 = 2.0f;
if ((player->timer_1F8 == 95) && (gTeamShields[1] > 0)) {
if ((player->timer_1F8 == 95) && (gTeamShields[TEAM_ID_FALCO] > 0)) {
gActors[0].state = var_v0;
AUDIO_PLAY_SFX(0x0940802AU, gActors[0].sfxSource, 0);
}
if ((player->timer_1F8 == 90) && (gTeamShields[3] > 0)) {
if ((player->timer_1F8 == 90) && (gTeamShields[TEAM_ID_PEPPY] > 0)) {
gActors[2].state = var_v0;
AUDIO_PLAY_SFX(0x0940802AU, gActors[2].sfxSource, 0);
}
if ((player->timer_1F8 == 85) && (gTeamShields[2] > 0)) {
if ((player->timer_1F8 == 85) && (gTeamShields[TEAM_ID_SLIPPY] > 0)) {
gActors[1].state = var_v0;
AUDIO_PLAY_SFX(0x0940802AU, gActors[1].sfxSource, 0);
}
@ -570,10 +570,10 @@ void func_demo_80049C0C(Player* player) {
Math_SmoothStepToF(&D_ctx_801779A8[player->num], 100.0f, 1.0f, 3.0f, 0.0f);
player->unk_034 -= 0.5f;
if (player->timer_1F8 == 0) {
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255;
D_ctx_80178358 = 255;
D_ctx_8017835C = 8;
if (D_ctx_80178340 == 255) {
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255;
gFillScreenAlphaTarget = 255;
gFillScreenAlphaStep = 8;
if (gFillScreenAlpha == 255) {
func_play_800A6148();
player->unk_1D0 = 5;
player->timer_1F8 = 10;
@ -586,7 +586,7 @@ void func_demo_80049C0C(Player* player) {
player->timer_27C = gSavedHitCount = D_ctx_80177DC8 = D_ctx_80177CA0 = 0;
player->unk_234 = 1;
D_ctx_8017827C = 1;
gLevelStage = 1;
D_display_800CA230 = 0.15f;
AUDIO_PLAY_SFX(0x11407079U, gDefaultSfxSource, 0);
func_play_800AB334();
@ -597,9 +597,9 @@ void func_demo_80049C0C(Player* player) {
case 5:
Math_SmoothStepToF(&D_ctx_801779A8[player->num], 100.0f, 1.0f, 3.0f, 0.0f);
if (player->timer_1F8 == 0) {
D_ctx_80178358 = 0;
D_ctx_8017835C = 8;
if (D_ctx_80178340 == 0) {
gFillScreenAlphaTarget = 0;
gFillScreenAlphaStep = 8;
if (gFillScreenAlpha == 0) {
player->unk_1D0 = 6;
player->timer_1F8 = 50;
}
@ -785,7 +785,7 @@ void func_demo_8004A888(Effect* effect) {
void func_demo_8004AA84(void) {
s32 i;
if (!(gGameFrameCount & 7) && (gLevelType == LEVELTYPE_PLANET)) {
if (((gGameFrameCount % 8) == 0) && (gLevelType == LEVELTYPE_PLANET)) {
for (i = 0; i < ARRAY_COUNT(gEffects); i++) {
if (gEffects[i].obj.status == OBJ_FREE) {
func_demo_8004A888(&gEffects[i]);
@ -810,7 +810,7 @@ void func_demo_8004AAF4(Player* player) {
gCsFrameCount += 1;
Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 20.0f, 0.0f);
if (gCsFrameCount == 37) {
D_ctx_80177E84 = 1;
gChangeTo360 = true;
if (gCurrentLevel == LEVEL_VENOM_ANDROSS) {
Radio_PlayMessage(gMsg_ID_19466, RCID_FOX);
AUDIO_PLAY_BGM(SEQ_ID_AND_BRAIN | SEQ_FLAG);
@ -1099,7 +1099,7 @@ void func_demo_8004B368(Player* player) {
}
if ((180.0f - fabsf(player->unk_0EC)) <= 3.0f) {
D_ctx_80161A88 = 1;
gGroundType = GROUNDTYPE_ROCK;
}
if (player->timer_1F8 == 0) {
@ -1156,20 +1156,20 @@ void func_demo_8004B368(Player* player) {
player->vel.y = 5.0f;
if ((player->timer_1F8 == 50) && (gTeamShields[1] > 0)) {
if ((player->timer_1F8 == 50) && (gTeamShields[TEAM_ID_FALCO] > 0)) {
func_demo_8004A840(0);
}
if ((player->timer_1F8 == 70) && (gTeamShields[2] > 0)) {
if ((player->timer_1F8 == 70) && (gTeamShields[TEAM_ID_SLIPPY] > 0)) {
func_demo_8004A840(1);
}
if (player->timer_1F8 == 90) {
func_play_800A6148();
if (gTeamShields[3] > 0) {
if (gTeamShields[TEAM_ID_PEPPY] > 0) {
func_demo_8004A840(2);
}
D_ctx_80161A88 = 0;
gGroundType = GROUNDTYPE_GRASS;
}
Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, 0);
@ -1211,7 +1211,7 @@ void func_demo_8004B368(Player* player) {
switch (gCsFrameCount) {
case 330:
D_ctx_80177840 = 100;
gLevelClearScreenTimer = 100;
break;
case 410:
@ -1219,7 +1219,7 @@ void func_demo_8004B368(Player* player) {
break;
case 550:
if ((gTeamShields[2] == (-1)) || (gTeamShields[2] == 0)) {
if ((gTeamShields[TEAM_ID_SLIPPY] == (-1)) || (gTeamShields[TEAM_ID_SLIPPY] == 0)) {
Radio_PlayMessage(gMsg_ID_20333, RCID_ROB64);
} else {
Radio_PlayMessage(gMsg_ID_2300, RCID_SLIPPY);
@ -1227,7 +1227,7 @@ void func_demo_8004B368(Player* player) {
break;
case 682:
if ((gTeamShields[3] == -1) || (gTeamShields[3] == 0)) {
if ((gTeamShields[TEAM_ID_PEPPY] == -1) || (gTeamShields[TEAM_ID_PEPPY] == 0)) {
Radio_PlayMessage(gMsg_ID_20332, RCID_ROB64);
} else {
Radio_PlayMessage(gMsg_ID_2310, RCID_PEPPY);
@ -1235,7 +1235,7 @@ void func_demo_8004B368(Player* player) {
break;
case 816:
if ((gTeamShields[1] == -1) || (gTeamShields[1] == 0)) {
if ((gTeamShields[TEAM_ID_FALCO] == -1) || (gTeamShields[TEAM_ID_FALCO] == 0)) {
Radio_PlayMessage(gMsg_ID_20331, RCID_ROB64);
} else {
Radio_PlayMessage(gMsg_ID_2320, RCID_FALCO);
@ -1359,10 +1359,10 @@ void func_demo_8004C930(Player* player) {
switch (player->form) {
case FORM_ARWING:
if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) || ((gCurrentLevel == LEVEL_VENOM_2) && (D_ctx_8017827C == 1))) {
if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) || ((gCurrentLevel == LEVEL_VENOM_2) && (gLevelStage == 1))) {
Andross_80193C4C(player);
} else if (gCurrentLevel == LEVEL_SECTOR_X) {
if (D_ctx_8017827C == 0) {
if (gLevelStage == 0) {
SectorX_80194728(player);
} else {
func_demo_80048E40(player);
@ -1393,7 +1393,7 @@ void func_demo_8004C930(Player* player) {
Venom2_80196D88(player);
func_play_800AA800(player);
} else if (gCurrentLevel == LEVEL_METEO) {
if (D_ctx_8017827C == 0) {
if (gLevelStage == 0) {
Meteo_8018E084(player);
} else {
func_demo_80048E40(player);
@ -1422,7 +1422,7 @@ void func_demo_8004C930(Player* player) {
if (gCurrentLevel == LEVEL_TITANIA) {
Titania_801882CC(player);
} else if (D_ctx_80177930 != 0) {
} else if (gNextPlanetPath != 0) {
Macbeth_801AF8F4(player);
} else {
Macbeth_801B3D04(player);
@ -1627,7 +1627,8 @@ void func_demo_8004D440(Player* player) {
Radio_PlayMessage(gMsg_ID_20318, RCID_FOX);
} else {
if ((gCurrentLevel != LEVEL_TRAINING) &&
((gTeamShields[1] > 0) || (gTeamShields[2] > 0) || (gTeamShields[3] > 0))) {
((gTeamShields[TEAM_ID_FALCO] > 0) || (gTeamShields[TEAM_ID_SLIPPY] > 0) ||
(gTeamShields[TEAM_ID_PEPPY] > 0))) {
do {
teamId = RAND_INT(2.9f) + 1;
} while (gTeamShields[teamId] <= 0);
@ -1711,11 +1712,11 @@ void func_demo_8004D828(Player* player) {
}
if (gCamCount == 1) {
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
func_effect_8007D24C(RAND_FLOAT_CENTERED(20.0) + player->pos.x, RAND_FLOAT_CENTERED(20.0) + player->pos.y,
player->unk_138, 2.2f);
}
} else if (!(gGameFrameCount & 3)) {
} else if (((gGameFrameCount % 4) == 0)) {
func_effect_8007D10C(RAND_FLOAT_CENTERED(10.0f) + player->pos.x, RAND_FLOAT_CENTERED(10.0f) + player->pos.y,
RAND_FLOAT_CENTERED(10.0f) + player->unk_138, 2.2f);
}
@ -1827,7 +1828,7 @@ void func_demo_8004DEF8(Player* player) {
player->unk_0E4 += 26.0f;
}
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
func_effect_8007D24C(RAND_FLOAT_CENTERED(20.0) + player->pos.x, RAND_FLOAT_CENTERED(20.0) + player->pos.y,
player->unk_138, 2.2f);
}
@ -1882,7 +1883,7 @@ void func_demo_8004DEF8(Player* player) {
player->unk_034 += 10.0f;
}
if ((D_ctx_80161A88 == 2) && (player->pos.y <= player->unk_0A4)) {
if ((gGroundType == GROUNDTYPE_WATER) && (player->pos.y <= player->unk_0A4)) {
func_effect_8007D9DC(player->pos.x, gGroundLevel + 2.0f, player->unk_138, 3.0f, 20.0f, 0);
func_effect_8007ADF4(player->pos.x, gGroundLevel, player->unk_138, 0.1f, 2.0f);
}
@ -1892,7 +1893,7 @@ void func_demo_8004E3D8(Player* player) {
player->flags_228 = 0;
player->unk_280 = 0;
if (gGameFrameCount & 1) {
if ((gGameFrameCount % 2) != 0) {
D_80137E84[gPlayerNum] = 1;
}
@ -2385,7 +2386,7 @@ void func_demo_8004F8AC(Actor* actor) {
break;
case LEVEL_METEO:
if (D_ctx_8017827C == 0) {
if (gLevelStage == 0) {
Meteo_8018ED9C(actor);
break;
}
@ -2407,11 +2408,11 @@ void func_demo_8004F8AC(Actor* actor) {
case 1:
Math_SmoothStepToF(&actor->scale, 0.5f, 0.03f, 0.01f, 0.0f);
D_ctx_80178348 = D_ctx_80178340 = D_ctx_80178350 = D_ctx_80178354 = 0;
gFillScreenRed = gFillScreenAlpha = gFillScreenGreen = gFillScreenBlue = 0;
if ((actor->timer_0BC == 43) || (actor->timer_0BC == 46) || (actor->timer_0BC == 49)) {
D_ctx_80178340 = 192;
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255;
gFillScreenAlpha = 192;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255;
}
actor->iwork[0] -= 2;
@ -2442,7 +2443,7 @@ void func_demo_8004F8AC(Actor* actor) {
break;
case LEVEL_SECTOR_X:
if (D_ctx_8017827C != 0) {
if (gLevelStage != 0) {
func_demo_80049630(actor);
break;
}
@ -2589,7 +2590,7 @@ void func_demo_8004FEC0(Actor* actor) {
break;
case 25:
if (actor->index & 1) {
if ((actor->index % 2) != 0) {
gSPDisplayList(gMasterDisp++, D_SZ_6001DA0);
} else {
gSPDisplayList(gMasterDisp++, D_SZ_6001360);
@ -2625,7 +2626,7 @@ void func_demo_8004FEC0(Actor* actor) {
Matrix_RotateZ(gGfxMatrix, (2.0f * gGameFrameCount) * M_DTOR, 1);
Matrix_RotateX(gGfxMatrix, 2.0f * RAND_FLOAT_SEEDED(M_PI), 1);
switch (sp2D0 & 3) {
switch ((s32) (sp2D0 % 4U)) {
case 0:
Matrix_Scale(gGfxMatrix, 1.0f, 0.3f, 1.0f, 1);
break;
@ -2674,7 +2675,7 @@ void func_demo_8004FEC0(Actor* actor) {
RCP_SetupDL(&gMasterDisp, 0x40);
switch ((gGameFrameCount >> 3) & 3) {
switch ((gGameFrameCount >> 3) % 4U) {
case 0:
sp2DC = 255.0f;
sp2D8 = 0.0f;
@ -2909,7 +2910,7 @@ void func_demo_800515C4(void) {
if (gGameState == GSTATE_TITLE) {
var_fp = D_TITLE_60320E0;
} else if (gGameState == GSTATE_CREDITS) {
} else if (gGameState == GSTATE_ENDING) {
var_fp = D_END_7010970;
} else {
var_fp = D_1024AC0;
@ -2933,13 +2934,13 @@ void func_demo_800515C4(void) {
if ((i != 1) || gGreatFoxIntact) {
sp9C[i] = 0.0f;
if (i < 2) {
if (!(gGameFrameCount & 0x38)) {
sp9C[i] = D_demo_800CA170[gGameFrameCount & 7];
if ((gGameFrameCount & ((64 - 1) & ~(8 - 1))) == 0) {
sp9C[i] = D_demo_800CA170[gGameFrameCount % 8U];
}
gDPSetEnvColor(gMasterDisp++, 255, 32, 32, 128);
} else {
if (!((gGameFrameCount + 32) & 0x38)) {
sp9C[i] = D_demo_800CA170[gGameFrameCount & 7];
if (((gGameFrameCount + 32) & 0x38) == 0) {
sp9C[i] = D_demo_800CA170[gGameFrameCount % 8U];
}
gDPSetEnvColor(gMasterDisp++, 32, 32, 255, 128);
}
@ -2955,7 +2956,7 @@ void func_demo_800515C4(void) {
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 48);
gDPSetEnvColor(gMasterDisp++, 255, 255, 0, 48);
for (i = 0, var_s6_2 = D_demo_800CA0EC; i < 3; i++, var_s6_2++) {
sp9C[i] = D_demo_800CA190[gGameFrameCount & 1];
sp9C[i] = D_demo_800CA190[gGameFrameCount % 2U];
Matrix_Push(&gGfxMatrix);
Matrix_Translate(gGfxMatrix, var_s6_2->x, var_s6_2->y, var_s6_2->z, 1);
Matrix_Scale(gGfxMatrix, sp9C[i], sp9C[i], 1.0f, 1);

View File

@ -7,7 +7,7 @@
Vec3f D_display_801613B0[4];
Vec3f D_display_801613E0[4];
s16 D_display_80161410;
s16 gReflectY;
Matrix D_display_80161418[4];
Vec3f D_display_80161518[4];
Vec3f D_display_80161548[4];
@ -32,7 +32,7 @@ void func_display_80051B30(void) {
Vec3f sp68;
Vec3f sp5C;
if ((D_ctx_80177854 == 100) || (D_display_800CA234 == NULL)) {
if ((gPlayState == PLAY_PAUSE) || (D_display_800CA234 == NULL)) {
return;
}
if ((D_display_800CA234->obj.status != OBJ_ACTIVE) || (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_3)) {
@ -290,7 +290,7 @@ void func_display_80052884(Player* player) {
if (gPlayerNum == player->num) {
sp64 = 0.0f;
if (gChargeTimers[player->num] >= 20) {
sp64 = (f32) (gGameFrameCount & 7) * 80.0f;
sp64 = (s32) (gGameFrameCount % 8U) * 80.0f;
}
sp58.x = 0.0f;
sp58.y = 0.0f;
@ -363,7 +363,7 @@ void func_display_80052D48(Player* player) {
if (!gVersusMode) {
sp2C *= 1.1f;
}
if (gGameFrameCount & 1) {
if ((gGameFrameCount % 2) != 0) {
sp2C *= 1.1f;
}
Matrix_Push(&gGfxMatrix);
@ -386,7 +386,7 @@ void func_display_80052D48(Player* player) {
if (!gVersusMode) {
sp2C *= 1.1f;
}
if (gGameFrameCount & 1) {
if ((gGameFrameCount % 2) != 0) {
sp2C *= 1.1f;
}
Matrix_Push(&gGfxMatrix);
@ -408,7 +408,7 @@ void func_display_80052D48(Player* player) {
}
void func_display_8005314C(void) {
if (D_display_80161410 != 0) {
if (gReflectY != 0) {
gSPSetGeometryMode(gMasterDisp++, G_CULL_FRONT);
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
}
@ -429,7 +429,7 @@ bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot,
if (wings->rightState == WINGSTATE_BROKEN) {
*gfxPtr = D_arwing_3015120;
}
if ((D_display_800CA22C != 0) && (D_ctx_80177D40[0] & 1)) {
if ((D_display_800CA22C != 0) && ((D_ctx_80177D40[0] % 2) != 0)) {
RCP_SetupDL(&gMasterDisp, 0x22);
func_display_8005314C();
if (D_ctx_80177D40[0] > 1000) {
@ -444,7 +444,7 @@ bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot,
if (wings->rightState != 2) {
*gfxPtr = NULL;
}
if ((D_display_800CA22C != 0) && (D_ctx_80177D40[0] & 1)) {
if ((D_display_800CA22C != 0) && ((D_ctx_80177D40[0] % 2) != 0)) {
RCP_SetupDL(&gMasterDisp, 0x22);
func_display_8005314C();
if (D_ctx_80177D40[0] > 1000) {
@ -461,7 +461,7 @@ bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot,
if (wings->leftState == WINGSTATE_BROKEN) {
*gfxPtr = D_arwing_3014BF0;
}
if ((D_display_800CA22C != 0) && (D_ctx_80177D58[0] & 1)) {
if ((D_display_800CA22C != 0) && ((D_ctx_80177D58[0] % 2) != 0)) {
RCP_SetupDL(&gMasterDisp, 0x22);
func_display_8005314C();
if (D_ctx_80177D58[0] > 1000) {
@ -476,7 +476,7 @@ bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot,
if (wings->leftState != 2) {
*gfxPtr = NULL;
}
if ((D_display_800CA22C != 0) && (D_ctx_80177D58[0] & 1)) {
if ((D_display_800CA22C != 0) && ((D_ctx_80177D58[0] % 2) != 0)) {
RCP_SetupDL(&gMasterDisp, 0x22);
func_display_8005314C();
if (D_ctx_80177D58[0] > 1000) {
@ -549,7 +549,7 @@ void func_display_80053658(WingInfo* wings) {
Matrix_RotateY(gGfxMatrix, wings->unk_34 * M_DTOR, 1);
Matrix_RotateX(gGfxMatrix, wings->unk_30 * M_DTOR, 1);
Matrix_Scale(gGfxMatrix, 1.0f / 70.925f, 1.0f / 70.925f, 1.0f / 70.925f, 1);
if (gGameState == GSTATE_CREDITS) {
if (gGameState == GSTATE_ENDING) {
Matrix_Scale(gGfxMatrix, 0.95f, 0.95f, 0.95f, 1);
}
Matrix_SetGfxMtx(&gMasterDisp);
@ -606,7 +606,7 @@ void func_display_80053C38(Player* player, s32 arg1) {
if ((gPlayerNum == player->num) && (arg1 == 0)) {
sp48 = 0.0f;
if (gChargeTimers[player->num] >= 20) {
sp48 = (f32) (gGameFrameCount & 7) * 80.0f;
sp48 = (s32) (gGameFrameCount % 8U) * 80.0f;
}
sp4C.x = 0.0f;
sp4C.y = 0.0f;
@ -615,7 +615,7 @@ void func_display_80053C38(Player* player, s32 arg1) {
sp4C.z = 2400.0f + sp48;
Matrix_MultVec3f(gGfxMatrix, &sp4C, &D_display_801613E0[1]);
}
if ((player->unk_238 != 0) && (gLevelMode == LEVELMODE_ON_RAILS) &&
if ((player->cockpitView != 0) && (gLevelMode == LEVELMODE_ON_RAILS) &&
(fabsf(player->unk_138 + D_ctx_80177D20 - player->camEye.z) < 10.0f)) {
if (arg1 == 0) {
D_display_800CA228 = 1;
@ -645,7 +645,7 @@ void func_display_80053C38(Player* player, s32 arg1) {
player->wings.unk_10 = 0.0f;
}
D_display_800CA22C = 1;
D_display_80161410 = arg1;
gReflectY = arg1;
func_display_80053658(&player->wings);
}
}
@ -711,7 +711,7 @@ void func_display_80054300(Player* player) {
if (player->unk_068 > 30.0f) {
gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK);
}
if ((D_ctx_80161A88 == 2) && (player->unk_068 < 10.0f)) {
if ((gGroundType == GROUNDTYPE_WATER) && (player->unk_068 < 10.0f)) {
player->unk_23C = 90;
} else {
player->unk_23C = 180;
@ -789,7 +789,7 @@ void func_display_8005478C(Player* player) {
} else {
Matrix_Scale(gGfxMatrix, player->unk_194, player->unk_194, 1.0f, 1);
}
if (gGameFrameCount & 1) {
if ((gGameFrameCount % 2) != 0) {
Matrix_Scale(gGfxMatrix, 0.9f, 0.63f, 1.0f, 1);
} else {
Matrix_Scale(gGfxMatrix, 0.80999994f, 0.567f, 1.0f, 1);
@ -871,7 +871,7 @@ void func_display_80054E80(Player* player) {
if (gChargeTimers[player->num] > 10) {
RCP_SetupDL(&gMasterDisp, 0x43);
Matrix_Copy(gCalcMatrix, &D_display_80161418[player->num]);
if ((player->unk_238 != 0) && (gLevelMode == LEVELMODE_ON_RAILS)) {
if ((player->cockpitView != 0) && (gLevelMode == LEVELMODE_ON_RAILS)) {
Matrix_MultVec3f(gCalcMatrix, &spB8, &sp94);
} else {
Matrix_MultVec3f(gCalcMatrix, &spC4, &sp94);
@ -881,7 +881,7 @@ void func_display_80054E80(Player* player) {
Matrix_Translate(gGfxMatrix, sp94.x, sp94.y, sp94.z, 0);
Matrix_Scale(gGfxMatrix, sp80, sp80, 1.0f, 1);
Matrix_Push(&gGfxMatrix);
if ((player->unk_238 != 0) && (gLevelMode == LEVELMODE_ON_RAILS)) {
if ((player->cockpitView != 0) && (gLevelMode == LEVELMODE_ON_RAILS)) {
Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 3.0f, 1);
} else {
Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 10.0f, 1);
@ -913,11 +913,11 @@ void func_display_80054E80(Player* player) {
Matrix_SetGfxMtx(&gMasterDisp);
gSPDisplayList(gMasterDisp++, D_101C2E0);
Matrix_Pop(&gGfxMatrix);
if ((player->unk_238 != 0) && (gLevelMode == LEVELMODE_ON_RAILS)) {
if ((player->cockpitView != 0) && (gLevelMode == LEVELMODE_ON_RAILS)) {
Matrix_Scale(gGfxMatrix, 0.3f, 0.3f, 0.3f, 1);
}
Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 1.0f, 1);
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
Matrix_Scale(gGfxMatrix, 1.7f, 1.7f, 1.0f, 1);
} else {
Matrix_Scale(gGfxMatrix, 1.3f, 1.3f, 1.0f, 1);
@ -938,7 +938,7 @@ void func_display_80054E80(Player* player) {
case LASERS_SINGLE:
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 192, 255, 192, 128);
gDPSetEnvColor(gMasterDisp++, 64, 255, 64, 128);
if ((player->unk_238 != 0) && (gLevelMode == LEVELMODE_ON_RAILS)) {
if ((player->cockpitView != 0) && (gLevelMode == LEVELMODE_ON_RAILS)) {
Matrix_MultVec3f(gCalcMatrix, &spB8, &sp94);
} else {
Matrix_MultVec3f(gCalcMatrix, &spC4, &sp94);
@ -982,7 +982,7 @@ void func_display_80054E80(Player* player) {
void func_display_80055788(Player* player) {
f32 sp54;
if (gChargeTimers[player->num] >= 11) {
if (gChargeTimers[player->num] > 10) {
RCP_SetupDL(&gMasterDisp, 0x43);
Matrix_Push(&gGfxMatrix);
sp54 = gChargeTimers[player->num] / 20.0f;
@ -1019,7 +1019,7 @@ void func_display_80055788(Player* player) {
gSPDisplayList(gMasterDisp++, D_101C2E0);
Matrix_Pop(&gGfxMatrix);
Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 1.0f, 1);
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
Matrix_Scale(gGfxMatrix, 1.7f, 1.7f, 1.0f, 1);
} else {
Matrix_Scale(gGfxMatrix, 1.3f, 1.3f, 1.0f, 1);
@ -1098,7 +1098,7 @@ void func_display_80055E98(Player* player) {
}
if (player->unk_25C != 0.0f) {
sp54 = 0.0f;
if (gGameFrameCount & 1) {
if ((gGameFrameCount % 2) != 0) {
sp54 = 180.0f;
}
var_fs0 = player->unk_0E8;
@ -1316,8 +1316,8 @@ void func_display_80056E2C(Player* player) {
f32 sp2C;
if ((player->unk_234 != 0) && (player->unk_240 == 0)) {
sp34 = D_display_800CA334[gGameFrameCount & 7];
sp30 = D_display_800CA334[(gGameFrameCount + 4) & 7];
sp34 = D_display_800CA334[gGameFrameCount % 8U];
sp30 = D_display_800CA334[(gGameFrameCount + 4) % 8U];
if (player->unk_1D4 != 0) {
sp34 = sp30 = 0.0f;
}
@ -1363,16 +1363,17 @@ void func_display_80057248(void) {
if (!(gGameFrameCount & 4)) {
RCP_SetupDL_40();
for (i = 0; i < ARRAY_COUNT(D_ctx_80177E98); i++) {
if (D_ctx_80177E98[i].z < 0.0f) {
var_fs0 = (VEC3F_MAG(&D_ctx_80177E98[i])) * 0.0015f;
for (i = 0; i < ARRAY_COUNT(gTeamArrowsViewPos); i++) {
if (gTeamArrowsViewPos[i].z < 0.0f) {
var_fs0 = (VEC3F_MAG(&gTeamArrowsViewPos[i])) * 0.0015f;
if (var_fs0 > 100.0f) {
var_fs0 = 100.0f;
} else if (var_fs0 < 1.0f) {
var_fs0 = 1.0f;
}
Matrix_Push(&gGfxMatrix);
Matrix_Translate(gGfxMatrix, D_ctx_80177E98[i].x, D_ctx_80177E98[i].y, D_ctx_80177E98[i].z, 1);
Matrix_Translate(gGfxMatrix, gTeamArrowsViewPos[i].x, gTeamArrowsViewPos[i].y, gTeamArrowsViewPos[i].z,
1);
Matrix_Scale(gGfxMatrix, var_fs0 * 0.25f, var_fs0 * 0.25f, 1.0f, 1);
if ((i == 0) && (gCurrentLevel == LEVEL_SECTOR_Z)) {
Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 1.0f, 1);
@ -1387,8 +1388,8 @@ void func_display_80057248(void) {
}
Matrix_Pop(&gGfxMatrix);
}
D_ctx_80177E98[i].x = D_ctx_80177E98[i].y = 0;
D_ctx_80177E98[i].z = 100.0f;
gTeamArrowsViewPos[i].x = gTeamArrowsViewPos[i].y = 0;
gTeamArrowsViewPos[i].z = 100.0f;
}
gDPSetTextureFilter(gMasterDisp++, G_TF_BILERP);
}
@ -1413,7 +1414,7 @@ void func_display_80057504(void) {
Matrix_Push(&gGfxMatrix);
Matrix_Translate(gGfxMatrix, D_display_80161578[i].x, D_display_80161578[i].y, D_display_80161578[i].z,
1);
if ((D_ctx_80177854 != 100) && (i == gPlayerNum)) {
if ((gPlayState != PLAY_PAUSE) && (i == gPlayerNum)) {
Math_SmoothStepToF(&D_display_801615A8[i], 0.0f, 0.5f, 20.0f, 0);
Math_SmoothStepToF(&D_display_801615B8[i], 1.0, 0.5f, 0.2f, 0);
}
@ -1510,11 +1511,11 @@ void func_display_800578C4(Player* player) {
}
}
void func_display_80057D00(void) {
void Play_Draw(void) {
s32 i;
Vec3f sp78;
Vec3f sp6C;
Vec3f sp60;
Vec3f tempVec;
Vec3f playerCamUp;
Vec3f opponentPos;
s32 pad;
Player* opponent;
Player* player = &gPlayer[gPlayerNum];
@ -1542,23 +1543,23 @@ void func_display_80057D00(void) {
Matrix_RotateY(gCalcMatrix, player->unk_114 * M_DTOR, 0);
Matrix_RotateX(gCalcMatrix, player->unk_120 * M_DTOR, 1);
sp78.x = player->camEye.x - player->pos.x;
sp78.y = player->camEye.y - player->pos.y;
sp78.z = player->camEye.z - (player->unk_138 + player->unk_144);
Matrix_MultVec3f(gCalcMatrix, &sp78, &gPlayerCamEye);
tempVec.x = player->camEye.x - player->pos.x;
tempVec.y = player->camEye.y - player->pos.y;
tempVec.z = player->camEye.z - (player->unk_138 + player->unk_144);
Matrix_MultVec3f(gCalcMatrix, &tempVec, &gPlayerCamEye);
gPlayerCamEye.x += player->pos.x;
gPlayerCamEye.y += player->pos.y;
gPlayerCamEye.z += player->unk_138 + player->unk_144;
sp78.x = player->camAt.x - player->pos.x;
sp78.y = player->camAt.y - player->pos.y;
sp78.z = player->camAt.z - (player->unk_138 + player->unk_144);
Matrix_MultVec3f(gCalcMatrix, &sp78, &gPlayerCamAt);
tempVec.x = player->camAt.x - player->pos.x;
tempVec.y = player->camAt.y - player->pos.y;
tempVec.z = player->camAt.z - (player->unk_138 + player->unk_144);
Matrix_MultVec3f(gCalcMatrix, &tempVec, &gPlayerCamAt);
gPlayerCamAt.x += player->pos.x;
gPlayerCamAt.y += player->pos.y;
gPlayerCamAt.z += player->unk_138 + player->unk_144;
if ((player->unk_238 != 0) && (player->unk_110 > 5.0f)) {
if ((player->cockpitView != 0) && (player->unk_110 > 5.0f)) {
gPlayerCamAt.x += SIN_DEG(gGameFrameCount * 150.0f) * player->unk_110 * 0.2f;
}
} else if (player->state_1C8 == PLAYERSTATE_1C8_7) {
@ -1577,10 +1578,10 @@ void func_display_80057D00(void) {
Matrix_RotateY(gCalcMatrix, -player->unk_058, 0);
Matrix_RotateX(gCalcMatrix, player->unk_05C, 1);
Matrix_RotateZ(gCalcMatrix, -player->unk_034 * M_DTOR, 1);
sp78.x = 0.0f;
sp78.y = 100.0f;
sp78.z = 0.0f;
Matrix_MultVec3f(gCalcMatrix, &sp78, &sp6C);
tempVec.x = 0.0f;
tempVec.y = 100.0f;
tempVec.z = 0.0f;
Matrix_MultVec3f(gCalcMatrix, &tempVec, &playerCamUp);
if (D_ctx_80178410 != 0) {
D_ctx_80178428 = DEG_TO_RAD(gPlayer[0].unk_034);
func_play_800B6F50(gPlayerCamEye.x, gPlayerCamEye.y, gPlayerCamEye.z, gPlayerCamAt.x, gPlayerCamAt.y,
@ -1591,7 +1592,7 @@ void func_display_80057D00(void) {
func_bg_80040450();
Matrix_Push(&gGfxMatrix);
Matrix_LookAt(gGfxMatrix, gPlayerCamEye.x, gPlayerCamEye.y, gPlayerCamEye.z, gPlayerCamAt.x, gPlayerCamAt.y,
gPlayerCamAt.z, sp6C.x, sp6C.y, sp6C.z, 1);
gPlayerCamAt.z, playerCamUp.x, playerCamUp.y, playerCamUp.z, 1);
if ((gLevelType == LEVELTYPE_PLANET) || (gCurrentLevel == LEVEL_BOLSE)) {
if ((gCurrentLevel == LEVEL_TITANIA) &&
((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_2) || (gPlayer[0].unk_19C != 0))) {
@ -1601,7 +1602,7 @@ void func_display_80057D00(void) {
Ground_801B58AC(&gMasterDisp, D_ctx_80177CC8);
D_ctx_80177CC8 = 0.0f;
Matrix_Pop(&gGfxMatrix);
} else if (D_ctx_80161A88 != 2) {
} else if (gGroundType != GROUNDTYPE_WATER) {
D_bg_8015F964 = 0;
func_bg_80040CE4();
}
@ -1609,22 +1610,22 @@ void func_display_80057D00(void) {
Lights_SetOneLight(&gMasterDisp, gLight2x, gLight2y, gLight2z, gLight2R, gLight2G, gLight2B, gAmbientR, gAmbientG,
gAmbientB);
for (i = 0, opponent = gPlayer; i < gCamCount; i++, opponent++) {
sp60.x = opponent->pos.x;
sp60.y = opponent->pos.y;
sp60.z = opponent->unk_138;
func_edisplay_8005F670(&sp60);
opponentPos.x = opponent->pos.x;
opponentPos.y = opponent->pos.y;
opponentPos.z = opponent->unk_138;
func_edisplay_8005F670(&opponentPos);
func_display_800564C0(opponent, 0);
func_display_80057814(opponent);
}
if ((D_ctx_80161A88 == 2) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_2)) {
if ((gGroundType == GROUNDTYPE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_2)) {
Lights_SetOneLight(&gMasterDisp, gLight2x, -1 * gLight2y, gLight2z, gLight2R, gLight2G, gLight2B, gAmbientR,
gAmbientG, gAmbientB);
Matrix_Push(&gGfxMatrix);
Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, 1);
for (i = 0, opponent = gPlayer; i < gCamCount; i++, opponent++) {
sp60.x = opponent->pos.x;
sp60.y = opponent->pos.y;
sp60.z = opponent->unk_138;
opponentPos.x = opponent->pos.x;
opponentPos.y = opponent->pos.y;
opponentPos.z = opponent->unk_138;
func_display_800564C0(opponent, 1);
}
Matrix_Pop(&gGfxMatrix);
@ -1633,17 +1634,17 @@ void func_display_80057D00(void) {
gAmbientB);
Object_Draw(1);
TexturedLine_Draw();
D_display_80161410 = 1;
func_beam_8003DA0C();
if ((D_ctx_80161A88 == 2) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_2)) {
gReflectY = 1;
PlayerShot_Draw();
if ((gGroundType == GROUNDTYPE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_2)) {
Matrix_Push(&gGfxMatrix);
Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, 1);
D_display_80161410 = -1;
func_beam_8003DA0C();
gReflectY = -1;
PlayerShot_Draw();
Matrix_Pop(&gGfxMatrix);
}
D_display_80161410 = -1;
if ((D_ctx_80161A88 == 2) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_2)) {
gReflectY = -1;
if ((gGroundType == GROUNDTYPE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_2)) {
Matrix_Push(&gGfxMatrix);
Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, 1);
for (i = 0, opponent = gPlayer; i < gCamCount; i++, opponent++) {
@ -1657,7 +1658,7 @@ void func_display_80057D00(void) {
if (gCurrentLevel == LEVEL_AQUAS) {
Effect_Draw(0);
}
if ((D_ctx_80161A88 == 2) || (D_ctx_80177AC8 != 0)) {
if ((gGroundType == GROUNDTYPE_WATER) || (D_ctx_80177AC8 != 0)) {
D_bg_8015F964 = 1;
Effect_Draw(1);
func_bg_80040CE4();
@ -1667,7 +1668,7 @@ void func_display_80057D00(void) {
((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_7) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_2)))) {
Effect_Draw(0);
}
D_display_80161410 = 1;
gReflectY = 1;
for (i = 0, opponent = gPlayer; i < gCamCount; i++, opponent++) {
if (D_display_800CA224[i] != 0) {
func_display_80056E2C(opponent);
@ -1691,7 +1692,7 @@ void func_display_80057D00(void) {
}
for (i = 0, opponent = gPlayer; i < gCamCount; i++, opponent++) {
if (D_display_800CA224[i] != 0) {
if (D_game_800D2860[i]) {
if (gShowCrosshairs[i]) {
func_display_80053F7C(opponent);
}
if (opponent->form == FORM_LANDMASTER) {

View File

@ -22,86 +22,87 @@
#include "assets/ast_area_6.h"
#include "assets/ast_zoness.h"
f32 D_edata_800CBE70[] = {
f32 gActor241Hitbox[] = {
1.0f, 0.0f, 50.0f, 0.0f, 25.0f, 0.0f, 25.0f,
};
f32 D_edata_800CBE8C[] = {
f32 gDefaultCubeHitbox100[] = {
1.0f, 0.0f, 50.0f, 0.0f, 50.0f, 0.0f, 50.0f,
};
f32 D_edata_800CBEA8[] = {
f32 gDefaultCubeHitbox150[] = {
1.0f, 0.0f, 75.0f, 0.0f, 75.0f, 0.0f, 75.0f,
};
f32 D_edata_800CBEC4[] = {
f32 gDefaultCubeHitbox200[] = {
1.0f, 0.0f, 100.0f, 0.0f, 100.0f, 0.0f, 100.0f,
};
f32 D_edata_800CBEE0[] = {
f32 gDefaultCubeHitbox300[] = {
// unused
1.0f, 0.0f, 150.0f, 0.0f, 150.0f, 0.0f, 150.0f,
};
f32 D_edata_800CBEFC[] = {
f32 gDefaultCubeHitbox400[] = {
1.0f, 0.0f, 200.0f, 0.0f, 200.0f, 0.0f, 200.0f,
};
f32 D_edata_800CBF18[] = {
f32 gItemRingCheckHitbox[] = {
1.0f, -113.0f, 61.0f, 98.0f, 100.0f, 0.0f, 219.0f,
};
f32 D_edata_800CBF34[] = {
f32 gHitboxNone[] = {
0.0f,
};
f32 D_edata_800CBF38[] = {
f32 gItemCheckpointHitbox[] = {
1.0f, -40.0f, 40.0f, 0.0f, 180.0f, 0.0f, 180.0f,
};
f32 D_edata_800CBF54[] = {
f32 gItemSupplyRingHitbox[] = {
1.0f, 0.0f, 120.0f, 0.0f, 120.0f, 0.0f, 120.0f,
};
f32 D_edata_800CBF70[] = {
f32 gMeteoWarpHitbox[] = {
1.0f, -40.0f, 100.0f, 0.0f, 100.0f, 0.0f, 100.0f,
};
f32 D_edata_800CBF8C[] = {
1.0f, 0.0f, 100.0f, 0.0f, 1200.0f, 0.0f, 1200.0f,
};
f32 D_edata_800CBFA8[] = {
f32 gItemLasersHitbox[] = {
1.0f, 0.0f, 120.0f, 0.0f, 120.0f, 0.0f, 120.0f, 0.0f,
};
f32 D_edata_800CBFC8[] = {
f32 gItemBombHitbox[] = {
1.0f, 0.0f, 120.0f, 0.0f, 120.0f, 0.0f, 120.0f,
};
f32 D_edata_800CBFE4[] = {
f32 gActor190_191Hitbox[] = {
1.0f, 0.0f, 40.0f, 0.0f, 40.0f, 0.0f, 40.0f,
};
f32 D_edata_800CC000[] = {
f32 gActor194HItbox[] = {
1.0f, 0.0f, 50.0f, 0.0f, 50.0f, 0.0f, 50.0f,
};
f32 D_edata_800CC01C[] = {
f32 gTeamHitbox[] = {
1.0f, 0.0f, 40.0f, 0.0f, 40.0f, 0.0f, 40.0f,
};
f32 D_edata_800CC038[] = {
f32 gActorAllRangeHItbox[] = {
1.0f, 0.0f, 40.0f, 0.0f, 40.0f, 0.0f, 40.0f,
};
f32 D_edata_800CC054[] = {
f32 gWarpZoneEvent94Hitbox[] = {
1.0f, 0.0f, 140.0f, 0.0f, 170.0f, 0.0f, 140.0f,
};
f32 D_edata_800CC070[] = {
f32 gWarpZoneEvent96Hitbox[] = {
4.0f, 0.0f, 140.0f, -675.0f, 140.0f, 0.0f, 810.0f, 0.0f, 140.0f, 675.0f, 140.0f, 0.0f, 810.0f,
0.0f, 140.0f, 0.0f, 810.0f, 675.0f, 140.0f, 0.0f, 140.0f, 0.0f, 810.0f, -675.0f, 140.0f,
};
f32 D_edata_800CC0D4[] = {
f32 gWarpZoneEvent92Hitbox[] = {
1.0f, 0.0f, 140.0f, 0.0f, 140.0f, 0.0f, 1800.0f,
};
f32 D_edata_800CC0F0[] = {
f32 gWarpZoneEvent93Hitbox[] = {
2.0f, 0.0f, 140.0f, 0.0f, 140.0f, 0.0f, 1800.0f, 1.0f, 141.0f, 1.0f, 1800.0f, 1.0f, 140.0f,
};
// clang-format off
ObjectInfo D_edata_800CC124[0x190] = {
/* OBJ_80_0, */ {(void*) D_CO_6015F00, 0, (ObjectFunc) NULL, D_CO_603E3E0, 800.0f, 0, 0, 39, 0, 0.0f, 0 },
/* OBJ_80_1, */ {(void*) D_CO_602E9E0, 0, (ObjectFunc) NULL, D_edata_800CBF34, 2000.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_2, */ {(void*) D_CO_601BEC0, 0, (ObjectFunc) NULL, D_edata_800CBF34, 3000.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_3, */ {(void*) D_CO_602E7A0, 0, (ObjectFunc) NULL, D_edata_800CBF34, 3000.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_4, */ {(void*) D_CO_60244A0, 0, (ObjectFunc) NULL, D_edata_800CBF34, 3000.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_5, */ {(void*) D_CO_602E570, 0, (ObjectFunc) NULL, D_edata_800CBF34, 3000.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_1, */ {(void*) D_CO_602E9E0, 0, (ObjectFunc) NULL, gHitboxNone, 2000.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_2, */ {(void*) D_CO_601BEC0, 0, (ObjectFunc) NULL, gHitboxNone, 3000.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_3, */ {(void*) D_CO_602E7A0, 0, (ObjectFunc) NULL, gHitboxNone, 3000.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_4, */ {(void*) D_CO_60244A0, 0, (ObjectFunc) NULL, gHitboxNone, 3000.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_5, */ {(void*) D_CO_602E570, 0, (ObjectFunc) NULL, gHitboxNone, 3000.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_6, */ {(void*) D_CO_60132B0, 0, (ObjectFunc) NULL, D_CO_603DCA4, 2500.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_7, */ {(void*) D_CO_602E080, 0, (ObjectFunc) NULL, D_CO_603DD40, 2500.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_8, */ {(void*) D_CO_60164F0, 0, (ObjectFunc) NULL, D_edata_800CBF34, 2500.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_9, */ {(void*) D_CO_6014500, 0, (ObjectFunc) NULL, D_edata_800CBF34, 2500.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_8, */ {(void*) D_CO_60164F0, 0, (ObjectFunc) NULL, gHitboxNone, 2500.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_9, */ {(void*) D_CO_6014500, 0, (ObjectFunc) NULL, gHitboxNone, 2500.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_10, */ {(void*) D_CO_602D5F0, 0, (ObjectFunc) NULL, D_CO_603DDF0, 200.0f, 0, 0, 39, 0, 0.0f, 0 },
/* OBJ_80_11, */ {(void*) D_CO_601A7D0, 0, (ObjectFunc) NULL, D_CO_603DE8C, 200.0f, 0, 0, 39, 0, 0.0f, 0 },
/* OBJ_80_12, */ {(void*) D_CO_6014B50, 0, (ObjectFunc) NULL, D_CO_603DEF4, 500.0f, 0, 0, 39, 0, 0.0f, 0 },
@ -131,7 +132,7 @@ ObjectInfo D_edata_800CC124[0x190] = {
/* OBJ_80_36, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_60066E0, 100.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_37, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_600672C, 100.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_38, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_6006778, 100.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_39, */ {(void*) Obj39_Draw, 1, (ObjectFunc) Obj39_Update, D_edata_800CBF34, 6000.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_39, */ {(void*) Obj39_Draw, 1, (ObjectFunc) Obj39_Update, gHitboxNone, 6000.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_40, */ {(void*) func_edisplay_80059F68, 1, (ObjectFunc) func_enmy_80066D5C, D_CO_603E4A4, 1000.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_41, */ {(void*) func_edisplay_80059FDC, 1, (ObjectFunc) func_enmy_80066EA8, D_CO_603E4DC, 300.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_42, */ {(void*) Obj42_Draw, 1, (ObjectFunc) Obj42_Update, D_CO_603E514, 1000.0f, 0, 0, 40, 0, 0.0f, 0 },
@ -154,7 +155,7 @@ ObjectInfo D_edata_800CC124[0x190] = {
/* OBJ_80_59, */ {(void*) D_MA_6024010, 0, (ObjectFunc) NULL, D_MA_603626C, 300.0f, 0, 0, 5, 0, 0.0f, 0 },
/* OBJ_80_60, */ {(void*) D_MA_6027180, 0, (ObjectFunc) NULL, D_MA_6036288, 400.0f, 0, 0, 5, 0, 0.0f, 0 },
/* OBJ_80_61, */ {(void*) Macbeth_801A2A78, 1, (ObjectFunc) NULL, D_MA_60362A4, 200.0f, 0, 0, 5, 0, 0.0f, 0 },
/* OBJ_80_62, */ {(void*) D_MA_60270E0, 0, (ObjectFunc) NULL, D_edata_800CBF34, 1500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_62, */ {(void*) D_MA_60270E0, 0, (ObjectFunc) NULL, gHitboxNone, 1500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_63, */ {(void*) D_MA_6013960, 0, (ObjectFunc) NULL, D_MA_6036894, 500.0f, 0, 0, 5, 0, 0.0f, 0 },
/* OBJ_80_64, */ {(void*) D_MA_600AF40, 0, (ObjectFunc) NULL, D_MA_60368E0, 100.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_65, */ {(void*) Macbeth_801A6608, 1, (ObjectFunc) NULL, D_MA_6036724, 400.0f, 0, 0, 0, 0, 0.0f, 0 },
@ -168,34 +169,34 @@ ObjectInfo D_edata_800CC124[0x190] = {
/* OBJ_80_73, */ {(void*) D_MA_6030630, 0, (ObjectFunc) NULL, D_MA_6036410, 1100.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_74, */ {(void*) D_MA_602DC20, 0, (ObjectFunc) NULL, D_MA_603643C, 1000.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_75, */ {(void*) D_MA_601B0D0, 0, (ObjectFunc) NULL, D_MA_6036760, 3000.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_76, */ {(void*) D_MA_60075D0, 0, (ObjectFunc) NULL, D_edata_800CBF34, 1000.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_76, */ {(void*) D_MA_60075D0, 0, (ObjectFunc) NULL, gHitboxNone, 1000.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_77, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, D_MA_6036344, 200.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_78, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, D_edata_800CBF34, 200.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_79, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, D_edata_800CBF34, 200.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_80, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, D_edata_800CBF34, 200.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_81, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, D_edata_800CBF34, 200.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_82, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, D_edata_800CBF34, 200.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_83, */ {(void*) Macbeth_801A3240, 1, (ObjectFunc) Macbeth_801A2DD8, D_edata_800CBF34, 15000.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_84, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, D_edata_800CBF34, 500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_85, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, D_edata_800CBF34, 500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_86, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, D_edata_800CBF34, 500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_87, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, D_edata_800CBF34, 500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_88, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, D_edata_800CBF34, 500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_89, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, D_edata_800CBF34, 500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_90, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, D_edata_800CBF34, 500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_91, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, D_edata_800CBF34, 500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_92, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, D_edata_800CBF34, 500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_93, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, D_edata_800CBF34, 500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_94, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, D_edata_800CBF34, 15000.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_95, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, D_edata_800CBF34, 15000.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_96, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, D_edata_800CBF34, 2500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_97, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, D_edata_800CBF34, 15000.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_98, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, D_edata_800CBF34, 15000.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_99, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, D_edata_800CBF34, 2500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_100 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, D_edata_800CBF34, 2500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_101 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, D_edata_800CBF34, 2500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_102 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, D_edata_800CBF34, 2500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_103 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, D_edata_800CBF34, 2500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_78, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 200.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_79, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 200.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_80, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 200.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_81, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 200.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_82, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 200.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_83, */ {(void*) Macbeth_801A3240, 1, (ObjectFunc) Macbeth_801A2DD8, gHitboxNone, 15000.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_84, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_85, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_86, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_87, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_88, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_89, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_90, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_91, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_92, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_93, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_94, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 15000.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_95, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 15000.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_96, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 2500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_97, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 15000.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_98, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 15000.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_99, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 2500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_100 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 2500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_101 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 2500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_102 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 2500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_103 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 2500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_104 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) Macbeth_801A0BD8, D_MA_6036594, 2500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_105 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, D_MA_6036204, 1300.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_106 */ {(void*) D_SY_60097E0, 0, (ObjectFunc) NULL, D_SY_6034478, 4000.0f, 0, 0, 41, 0, 0.0f, 0 },
@ -203,10 +204,10 @@ ObjectInfo D_edata_800CC124[0x190] = {
/* OBJ_80_108 */ {(void*) D_SY_60102C0, 0, (ObjectFunc) NULL, D_SY_6034588, 4000.0f, 0, 0, 41, 0, 0.0f, 0 },
/* OBJ_80_109 */ {(void*) D_SY_60036A0, 0, (ObjectFunc) SectorY_801A4E44, D_SY_6034664, 4000.0f, 0, 0, 41, 0, 0.0f, 0 },
/* OBJ_80_110 */ {(void*) D_SY_6005360, 0, (ObjectFunc) NULL, D_SY_6034770, 4000.0f, 0, 0, 41, 0, 0.0f, 0 },
/* OBJ_80_111 */ {(void*) Obj111_Draw, 1, (ObjectFunc) NULL, D_edata_800CBF34, 2000.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_111 */ {(void*) Obj111_Draw, 1, (ObjectFunc) NULL, gHitboxNone, 2000.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_112 */ {(void*) D_SY_600F6C0, 0, (ObjectFunc) SectorY_801A52B8, D_SY_60347F0, 4000.0f, 0, 0, 41, 0, 0.0f, 0 },
/* OBJ_80_113 */ {(void*) D_SY_601B610, 0, (ObjectFunc) NULL, D_edata_800CBF34, 2000.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_114 */ {(void*) D_SY_601C6A0, 0, (ObjectFunc) NULL, D_edata_800CBF34, 2000.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_113 */ {(void*) D_SY_601B610, 0, (ObjectFunc) NULL, gHitboxNone, 2000.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_114 */ {(void*) D_SY_601C6A0, 0, (ObjectFunc) NULL, gHitboxNone, 2000.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_115 */ {(void*) D_SY_60188D0, 0, (ObjectFunc) NULL, D_SY_603486C, 2000.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_116 */ {(void*) D_SY_60034D0, 0, (ObjectFunc) NULL, D_SY_60347D4, 2000.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_117 */ {(void*) D_AQ_60231C0, 0, (ObjectFunc) NULL, D_AQ_6030C60, 2000.0f, 0, 0, 40, 0, 0.0f, 0 },
@ -216,9 +217,9 @@ ObjectInfo D_edata_800CC124[0x190] = {
/* OBJ_80_121 */ {(void*) D_AQ_602B4C0, 0, (ObjectFunc) NULL, D_AQ_6030E14, 2000.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_122 */ {(void*) D_AQ_600EE10, 0, (ObjectFunc) NULL, D_AQ_6030E30_Hitbox, 2000.0f, 0, 0, 41, 0, 0.0f, 0 },
/* OBJ_80_123 */ {(void*) D_AQ_60120F0, 0, (ObjectFunc) NULL, D_AQ_6030E4C, 2000.0f, 0, 0, 41, 0, 0.0f, 0 },
/* OBJ_80_124 */ {(void*) D_AQ_600EEF0, 0, (ObjectFunc) NULL, D_edata_800CBF34, 2000.0f, 0, 0, 41, 0, 0.0f, 0 },
/* OBJ_80_124 */ {(void*) D_AQ_600EEF0, 0, (ObjectFunc) NULL, gHitboxNone, 2000.0f, 0, 0, 41, 0, 0.0f, 0 },
/* OBJ_80_125 */ {(void*) D_AQ_600BF80, 0, (ObjectFunc) NULL, D_AQ_6030E68, 2000.0f, 0, 0, 41, 0, 0.0f, 0 },
/* OBJ_80_126 */ {(void*) Aquas_801BE1FC, 1, (ObjectFunc) NULL, D_edata_800CBF34, 2000.0f, 0, 0, 41, 0, 0.0f, 0 },
/* OBJ_80_126 */ {(void*) Aquas_801BE1FC, 1, (ObjectFunc) NULL, gHitboxNone, 2000.0f, 0, 0, 41, 0, 0.0f, 0 },
/* OBJ_80_127 */ {(void*) D_VE1_9005C80, 0, (ObjectFunc) Venom1_801924A8, D_VE1_601B678, 1000.0f, 0, 0, 42, 0, 0.0f, 0 },
/* OBJ_80_128 */ {(void*) D_VE1_9003F50, 0, (ObjectFunc) NULL, D_VE1_601B6C4, 3200.0f, 0, 0, 42, 0, 0.0f, 0 },
/* OBJ_80_129 */ {(void*) D_VE1_900F060, 0, (ObjectFunc) NULL, D_VE1_601B710, 3200.0f, 0, 0, 42, 0, 0.0f, 0 },
@ -229,17 +230,17 @@ ObjectInfo D_edata_800CC124[0x190] = {
/* OBJ_80_134 */ {(void*) D_VE2_6003000, 0, (ObjectFunc) NULL, D_ANDROSS_C038BA4, 0.0f, 0, 0, 41, 1, 0.0f, 0 },
/* OBJ_80_135 */ {(void*) D_TI_6006890, 0, (ObjectFunc) NULL, D_ANDROSS_C038B40, 0.0f, 0, 0, 41, 1, 0.0f, 0 },
/* OBJ_80_136 */ {(void*) D_VE2_6002990, 0, (ObjectFunc) NULL, D_ANDROSS_C038B40, 0.0f, 0, 0, 41, 1, 0.0f, 0 },
/* OBJ_80_137 */ {(void*) D_VE2_6004170, 0, (ObjectFunc) NULL, D_edata_800CBF34, 0.0f, 0, 0, 0, 1, 0.0f, 0 },
/* OBJ_80_137 */ {(void*) D_VE2_6004170, 0, (ObjectFunc) NULL, gHitboxNone, 0.0f, 0, 0, 0, 1, 0.0f, 0 },
/* OBJ_80_138 */ {(void*) D_versus_3017600, 0, (ObjectFunc) NULL, D_versus_302EE64, 0.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_139 */ {(void*) D_versus_3017600, 0, (ObjectFunc) NULL, D_versus_302EE80, 0.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_140 */ {(void*) D_versus_30173C0, 0, (ObjectFunc) NULL, D_edata_800CBF34, 0.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_141 */ {(void*) D_versus_30174E0, 0, (ObjectFunc) NULL, D_edata_800CBF34, 0.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_140 */ {(void*) D_versus_30173C0, 0, (ObjectFunc) NULL, gHitboxNone, 0.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_141 */ {(void*) D_versus_30174E0, 0, (ObjectFunc) NULL, gHitboxNone, 0.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_142 */ {(void*) D_versus_301B080, 0, (ObjectFunc) NULL, D_versus_302EE9C, 0.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_143 */ {(void*) D_versus_3016B00, 0, (ObjectFunc) NULL, D_versus_302EE00, 0.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_144 */ {(void*) D_versus_3013780, 0, (ObjectFunc) NULL, D_versus_302ED4C, 0.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_145 */ {(void*) D_versus_3013580, 0, (ObjectFunc) NULL, D_versus_302ED98, 0.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_146 */ {(void*) D_versus_3012ED0, 0, (ObjectFunc) NULL, D_versus_302EDB4, 0.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_147 */ {(void*) NULL, 0, (ObjectFunc) NULL, D_edata_800CBF34, 0.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_147 */ {(void*) NULL, 0, (ObjectFunc) NULL, gHitboxNone, 0.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_80_148 */ {(void*) D_FO_60079B0, 0, (ObjectFunc) NULL, D_FO_600FF80, 0.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_149 */ {(void*) D_FO_6007D80, 0, (ObjectFunc) NULL, D_FO_600FFA0, 0.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_150 */ {(void*) D_FO_6006310, 0, (ObjectFunc) NULL, D_FO_600FFC0, 0.0f, 0, 0, 40, 0, 0.0f, 0 },
@ -247,55 +248,55 @@ ObjectInfo D_edata_800CC124[0x190] = {
/* OBJ_80_152 */ {(void*) D_BO_600F4C0, 0, (ObjectFunc) NULL, D_BO_6011C10, 0.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_153 */ {(void*) D_BO_600B8B0, 0, (ObjectFunc) NULL, D_BO_6011C48, 0.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_154 */ {(void*) D_KA_600BAF0, 0, (ObjectFunc) NULL, D_KA_601115C, 0.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_155 */ {(void*) NULL, 0, (ObjectFunc) NULL, D_edata_800CBF34, 0.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_155 */ {(void*) NULL, 0, (ObjectFunc) NULL, gHitboxNone, 0.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_156 */ {(void*) SectorY_80197CB8, 1, (ObjectFunc) NULL, D_SY_6034368, 0.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_157 */ {(void*) D_SZ_6001DA0, 0, (ObjectFunc) NULL, D_SZ_600924C, 0.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_158 */ {(void*) D_SZ_6001360, 0, (ObjectFunc) NULL, D_SZ_60092E8, 0.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_159 */ {(void*) D_VE2_6008370, 0, (ObjectFunc) NULL, D_VE2_601668C, 0.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_80_160 */ {(void*) D_VE2_6010960, 0, (ObjectFunc) NULL, D_VE2_6016714, 0.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_4C_161 */ {(void*) D_CO_602F7C0, 0, (ObjectFunc) func_enmy_80068FE0, D_CO_603E468, 100.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_4C_162 */ {(void*) D_CO_601C9B0, 0, (ObjectFunc) func_enmy_80068FE0, D_CO_603E484, 100.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_4C_163 */ {(void*) D_FO_600A420, 0, (ObjectFunc) func_enmy_80068FE0, D_FO_600FE9C, 100.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_4C_164 */ {(void*) func_edisplay_80059C40, 1, (ObjectFunc) NULL, D_edata_800CBF34, 1800.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_4C_165 */ {(void*) D_CO_602DCA0, 0, (ObjectFunc) NULL, D_edata_800CBF34, -100.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_4C_166 */ {(void*) D_CO_601F500, 0, (ObjectFunc) NULL, D_edata_800CBF34, -100.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_4C_167 */ {(void*) func_edisplay_80059C34, 1, (ObjectFunc) func_enmy_80066E8C, D_edata_800CBF34, 500.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_4C_168 */ {(void*) func_edisplay_80059850, 1, (ObjectFunc) NULL, D_edata_800CBF34, 100.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_4C_169 */ {(void*) D_TI_60023B0, 0, (ObjectFunc) Titania_8018F038, D_TI_60068BC, 100.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_4C_170 */ {(void*) NULL, 1, (ObjectFunc) Corneria_801875A4, D_edata_800CBF34, 0.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_4C_171 */ {(void*) NULL, 1, (ObjectFunc) Venom1_801922DC, D_edata_800CBF34, 0.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_4C_172 */ {(void*) NULL, 1, (ObjectFunc) Venom1_80192358, D_edata_800CBF34, 0.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_4C_173 */ {(void*) NULL, 1, (ObjectFunc) Venom1_801923C0, D_edata_800CBF34, 0.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_4C_174 */ {(void*) NULL, 1, (ObjectFunc) Venom1_8019243C, D_edata_800CBF34, 0.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_4C_175 */ {(void*) NULL, 1, (ObjectFunc) NULL, D_edata_800CBF34, 1000.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_SPRITE_CO_POLE */ {(void*) D_CO_602F7C0, 0, (ObjectFunc) Sprite_UpdateDoodad, D_CO_603E468, 100.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_SPRITE_CO_TREE */ {(void*) D_CO_601C9B0, 0, (ObjectFunc) Sprite_UpdateDoodad, D_CO_603E484, 100.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_SPRITE_FO_POLE */ {(void*) D_FO_600A420, 0, (ObjectFunc) Sprite_UpdateDoodad, D_FO_600FE9C, 100.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_SPRITE_FOG_SHADOW */ {(void*) FogShadow_Draw, 1, (ObjectFunc) NULL, gHitboxNone, 1800.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_SPRITE_CO_RUIN1 */ {(void*) D_CO_602DCA0, 0, (ObjectFunc) NULL, gHitboxNone, -100.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_SPRITE_CO_RUIN2 */ {(void*) D_CO_601F500, 0, (ObjectFunc) NULL, gHitboxNone, -100.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_SPRITE_167 */ {(void*) Sprite167_Draw, 1, (ObjectFunc) Sprite167_Update, gHitboxNone, 500.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_SPRITE_168 */ {(void*) Sprite168_Draw, 1, (ObjectFunc) NULL, gHitboxNone, 100.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_SPRITE_TI_CACTUS */ {(void*) D_TI_60023B0, 0, (ObjectFunc) Titania_Cactus_Update, D_TI_60068BC, 100.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_SPRITE_CO_SMOKE */ {(void*) NULL, 1, (ObjectFunc) Corneria_801875A4, gHitboxNone, 0.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_SPRITE_VE1_BOSS_TRIGGER1 */ {(void*) NULL, 1, (ObjectFunc) Venom1_BossTrigger1_Update, gHitboxNone, 0.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_SPRITE_VE1_BOSS_TRIGGER2 */ {(void*) NULL, 1, (ObjectFunc) Venom1_BossTrigger2_Update, gHitboxNone, 0.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_SPRITE_VE1_BOSS_TRIGGER3 */ {(void*) NULL, 1, (ObjectFunc) Venom1_BossTrigger3_Update, gHitboxNone, 0.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_SPRITE_VE1_BOSS_TRIGGER4 */ {(void*) NULL, 1, (ObjectFunc) Venom1_BossTrigger4_Update, gHitboxNone, 0.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_SPRITE_GFOX_TARGET */ {(void*) NULL, 1, (ObjectFunc) NULL, gHitboxNone, 1000.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_ACTOR_176 */ {(void*) Corneria_8018BAAC, 2, (ObjectFunc) Corneria_8018AED0, D_CO_603E5D0, 500.0f, 0, 0, 39, 1, 200.0f, 1 },
/* OBJ_ACTOR_177 */ {(void*) Corneria_8018BBA4, 2, (ObjectFunc) Corneria_8018B15C, D_CO_603E5D0, 500.0f, 0, 0, 39, 1, 200.0f, 1 },
/* OBJ_ACTOR_178 */ {(void*) Corneria_8018BBF8, 2, (ObjectFunc) Corneria_8018B418, D_CO_603E5D0, 500.0f, 0, 0, 39, 1, 200.0f, 1 },
/* OBJ_ACTOR_179 */ {(void*) Corneria_8018BD7C, 2, (ObjectFunc) Corneria_8018B58C, D_CO_603E604, 500.0f, 0, 0, 39, 1, 0.0f, 1 },
/* OBJ_ACTOR_180 */ {(void*) func_edisplay_8005B6A4, 1, (ObjectFunc) func_enmy_80066A80, D_edata_800CBF34, 1000.0f, 0, 0, 39, 0, 0.0f, 1 },
/* OBJ_ACTOR_180 */ {(void*) func_edisplay_8005B6A4, 1, (ObjectFunc) func_enmy_80066A80, gHitboxNone, 1000.0f, 0, 0, 39, 0, 0.0f, 1 },
/* OBJ_ACTOR_181 */ {(void*) D_ME_6018C00, 0, (ObjectFunc) Meteo_8018756C, D_ME_602F6EC, 200.0f, 0, 0, 39, 0, 1.0f, 1 },
/* OBJ_ACTOR_182 */ {(void*) func_edisplay_8005B71C, 1, (ObjectFunc) Meteo_80187650, D_ME_602F708, 100.0f, 0, 1, 39, 0, 1.0f, 1 },
/* OBJ_ACTOR_183 */ {(void*) Meteo_8018DA6C, 1, (ObjectFunc) Meteo_8018D9EC, D_edata_800CBF34, 100.0f, 0, 1, 39, 0, 0.0f, 1 },
/* OBJ_ACTOR_184 */ {(void*) Meteo_8018DAEC, 1, (ObjectFunc) Meteo_8018D9EC, D_edata_800CBF34, 100.0f, 0, 1, 39, 0, 0.0f, 1 },
/* OBJ_ACTOR_185 */ {(void*) Meteo_8018DB6C, 1, (ObjectFunc) Meteo_8018D9EC, D_edata_800CBF34, 100.0f, 0, 1, 39, 0, 0.0f, 1 },
/* OBJ_ACTOR_183 */ {(void*) Meteo_8018DA6C, 1, (ObjectFunc) Meteo_8018D9EC, gHitboxNone, 100.0f, 0, 1, 39, 0, 0.0f, 1 },
/* OBJ_ACTOR_184 */ {(void*) Meteo_8018DAEC, 1, (ObjectFunc) Meteo_8018D9EC, gHitboxNone, 100.0f, 0, 1, 39, 0, 0.0f, 1 },
/* OBJ_ACTOR_185 */ {(void*) Meteo_8018DB6C, 1, (ObjectFunc) Meteo_8018D9EC, gHitboxNone, 100.0f, 0, 1, 39, 0, 0.0f, 1 },
/* OBJ_ACTOR_186 */ {(void*) func_edisplay_8005B7CC, 1, (ObjectFunc) Meteo_8018795C, D_ME_602F724, 200.0f, 0, 1, 39, 0, 1.0f, 1 },
/* OBJ_ACTOR_187 */ {(void*) D_ME_6018450, 0, (ObjectFunc) Meteo_801877C4, D_ME_602F740, 200.0f, 0, 1, 39, 0, 1.0f, 1 },
/* OBJ_ACTOR_188 */ {(void*) Aquas_801BEC74, 1, (ObjectFunc) Aquas_801BEC68, D_AQ_6030BE0, 200.0f, 0, 1, 39, 0, 1.0f, 1 },
/* OBJ_ACTOR_189 */ {(void*) Actor189_Draw, 1, (ObjectFunc) Actor189_Update, D_edata_800CBF34, 0.0f, 0, 0, 39, 0, 0.0f, 0 },
/* OBJ_ACTOR_190 */ {(void*) func_edisplay_8005B848, 1, (ObjectFunc) func_enmy_800656D4, D_edata_800CBFE4, 100.0f, 0, 1, 39, 0, 1.0f, 0 },
/* OBJ_ACTOR_191 */ {(void*) func_edisplay_8005B848, 1, (ObjectFunc) func_enmy_800656D4, D_edata_800CBFE4, 100.0f, 0, 1, 39, 0, 1.0f, 0 },
/* OBJ_ACTOR_189 */ {(void*) Actor189_Draw, 1, (ObjectFunc) Actor189_Update, gHitboxNone, 0.0f, 0, 0, 39, 0, 0.0f, 0 },
/* OBJ_ACTOR_190 */ {(void*) func_edisplay_8005B848, 1, (ObjectFunc) func_enmy_800656D4, gActor190_191Hitbox, 100.0f, 0, 1, 39, 0, 1.0f, 0 },
/* OBJ_ACTOR_191 */ {(void*) func_edisplay_8005B848, 1, (ObjectFunc) func_enmy_800656D4, gActor190_191Hitbox, 100.0f, 0, 1, 39, 0, 1.0f, 0 },
/* OBJ_ACTOR_192 */ {(void*) func_edisplay_8005B9A4, 1, (ObjectFunc) func_enmy_8006654C, D_CO_603E54C, 200.0f, 0, 1, 39, 0, 50.0f, 1 },
/* OBJ_ACTOR_193 */ {(void*) func_edisplay_8005BA30, 1, (ObjectFunc) func_enmy_800669A0, D_CO_603E598, 100.0f, 0, 1, 39, 0, 0.0f, 0 },
/* OBJ_ACTOR_194 */ {(void*) Actor194_Draw, 1, (ObjectFunc) Actor194_Update, D_edata_800CC000, 200.0f, 0, 1, 39, 0, 0.0f, 1 },
/* OBJ_ACTOR_195 */ {(void*) func_demo_8004FEC0, 1, (ObjectFunc) func_demo_8004F8AC, D_edata_800CBF34, 20000.0f, 0, 1, 39, 0, 0.0f, 0 },
/* OBJ_ACTOR_194 */ {(void*) Actor194_Draw, 1, (ObjectFunc) Actor194_Update, gActor194HItbox, 200.0f, 0, 1, 39, 0, 0.0f, 1 },
/* OBJ_ACTOR_195 */ {(void*) func_demo_8004FEC0, 1, (ObjectFunc) func_demo_8004F8AC, gHitboxNone, 20000.0f, 0, 1, 39, 0, 0.0f, 0 },
/* OBJ_ACTOR_196 */ {(void*) Actor196_Draw, 1, (ObjectFunc) Actor196_Update, D_CO_603E5B4, 200.0f, 0, 1, 39, 0, 1.0f, 1 },
/* OBJ_ACTOR_ALLRANGE */ {(void*) ActorAllRange_Draw, 1, (ObjectFunc) ActorAllRange_Update, D_edata_800CC038, 20000.0f, 0, 1, 39, 1, 1.0f, 1 },
/* OBJ_ACTOR_TEAM_BOSS */ {(void*) ActorAllRange_Draw, 1, (ObjectFunc) ActorTeamBoss_Update, D_edata_800CC01C, 20000.0f, 0, 0, 39, 1, 0.0f, 0 },
/* OBJ_ACTOR_199 */ {(void*) Andross_80188448, 1, (ObjectFunc) Andross_801880E4, D_edata_800CBF34, 20000.0f, 0, 0, 39, 1, 0.0f, 0 },
/* OBJ_ACTOR_EVENT */ {(void*) ActorEvent_Draw, 1, (ObjectFunc) ActorEvent_Update, D_edata_800CBF34, 2000.0f, 0, 1, 39, 0, 0.0f, 1 },
/* OBJ_ACTOR_ALLRANGE */ {(void*) ActorAllRange_Draw, 1, (ObjectFunc) ActorAllRange_Update, gActorAllRangeHItbox, 20000.0f, 0, 1, 39, 1, 1.0f, 1 },
/* OBJ_ACTOR_TEAM_BOSS */ {(void*) ActorAllRange_Draw, 1, (ObjectFunc) ActorTeamBoss_Update, gTeamHitbox, 20000.0f, 0, 0, 39, 1, 0.0f, 0 },
/* OBJ_ACTOR_199 */ {(void*) Andross_80188448, 1, (ObjectFunc) Andross_801880E4, gHitboxNone, 20000.0f, 0, 0, 39, 1, 0.0f, 0 },
/* OBJ_ACTOR_EVENT */ {(void*) ActorEvent_Draw, 1, (ObjectFunc) ActorEvent_Update, gHitboxNone, 2000.0f, 0, 1, 39, 0, 0.0f, 1 },
/* OBJ_ACTOR_201 */ {(void*) Actor201_Draw, 1, (ObjectFunc) Actor201_Update, D_ME_602F684, 100.0f, 0, 1, 39, 0, 1.0f, 1 },
/* OBJ_ACTOR_202 */ {(void*) Actor202_Draw, 1, (ObjectFunc) Actor202_Update, D_ME_602F6A0, 100.0f, 0, 1, 39, 0, 180.0f, 1 },
/* OBJ_ACTOR_SLIPPY_SX */ {(void*) SectorX_8018F884, 1, (ObjectFunc) SectorX_8018F330, D_edata_800CBF34, 1000.0f, 0, 0, 39, 0, 0.0f, 0 },
/* OBJ_ACTOR_SLIPPY_SX */ {(void*) SectorX_8018F884, 1, (ObjectFunc) SectorX_8018F330, gHitboxNone, 1000.0f, 0, 0, 39, 0, 0.0f, 0 },
/* OBJ_ACTOR_204 */ {(void*) SectorY_Actor204_Draw, 1, (ObjectFunc) SectorY_Actor204_Update, D_SY_603405C, 1000.0f, 0, 0, 39, 0, 1.0f, 1 },
/* OBJ_ACTOR_205 */ {(void*) Macbeth_801A12C4, 1, (ObjectFunc) Macbeth_8019C778, D_MA_60359C8, 20000.0f, 0, 0, 40, 1, 0.0f, 0 },
/* OBJ_ACTOR_206 */ {(void*) Macbeth_801A12C4, 1, (ObjectFunc) Macbeth_801AC438, D_MA_6035A48, 20000.0f, 0, 0, 40, 1, 0.0f, 0 },
@ -316,7 +317,7 @@ ObjectInfo D_edata_800CC124[0x190] = {
/* OBJ_ACTOR_221 */ {(void*) Macbeth_801AE2C0, 1, (ObjectFunc) Macbeth_801ADD68, D_MA_603694C, 300.0f, 0, 0, 40, 1, 1.0f, 0 },
/* OBJ_ACTOR_222 */ {(void*) Macbeth_801AEEFC, 1, (ObjectFunc) Macbeth_801AEC04, D_MA_6036968, 300.0f, 0, 0, 40, 1, 1.0f, 0 },
/* OBJ_ACTOR_223 */ {(void*) Macbeth_801A54E8, 1, (ObjectFunc) Macbeth_801A4B24, D_MA_60364DC, 300.0f, 0, 0, 40, 1, 0.0f, 0 },
/* OBJ_ACTOR_224 */ {(void*) NULL, 1, (ObjectFunc) Titania_80189194, D_edata_800CBF34, 200.0f, 0, 0, 39, 0, 0.0f, 0 },
/* OBJ_ACTOR_224 */ {(void*) NULL, 1, (ObjectFunc) Titania_80189194, gHitboxNone, 200.0f, 0, 0, 39, 0, 0.0f, 0 },
/* OBJ_ACTOR_225 */ {(void*) D_TI1_700AB70, 0, (ObjectFunc) Titania_8018AB44, D_TI_60064AC, 50.0f, 0, 0, 39, 1, 1.0f, 0 },
/* OBJ_ACTOR_226 */ {(void*) Titania_80189AFC, 1, (ObjectFunc) Titania_801895B8, D_TI_60064C8, 300.0f, 0, 0, 39, 1, 70.0f, 1 },
/* OBJ_ACTOR_227 */ {(void*) Titania_8018E5B4, 1, (ObjectFunc) Titania_8018E54C, D_TI_60067C4, 0.0f, 0, 0, 39, 1, 0.0f, 0 },
@ -326,22 +327,22 @@ ObjectInfo D_edata_800CC124[0x190] = {
/* OBJ_ACTOR_231 */ {(void*) Titania_8018BE84, 1, (ObjectFunc) Titania_8018B9D0, D_TI_6006858, 0.0f, 0, 0, 39, 1, 0.0f, 1 },
/* OBJ_ACTOR_232 */ {(void*) Titania_8018B6AC, 1, (ObjectFunc) Titania_8018B268, D_TI_6006890, 0.0f, 0, 0, 39, 1, 20.0f, 1 },
/* OBJ_ACTOR_233 */ {(void*) Titania_8018A1C0, 1, (ObjectFunc) Titania_80189CC8, D_TI_60068F0, 200.0f, 0, 0, 39, 1, 1.0f, 1 },
/* OBJ_ACTOR_234 */ {(void*) Actor234_Draw, 1, (ObjectFunc) Actor234_Update, D_edata_800CBF34, 2000.0f, 0, 0, 39, 0, 0.0f, 5 },
/* OBJ_ACTOR_234 */ {(void*) Actor234_Draw, 1, (ObjectFunc) Actor234_Update, gHitboxNone, 2000.0f, 0, 0, 39, 0, 0.0f, 5 },
/* OBJ_ACTOR_235 */ {(void*) Zoness_80190430, 2, (ObjectFunc) Zoness_801904CC, D_ZO_602C294, 1000.0f, 0, 1, 40, 0, 1.0f, 1 },
/* OBJ_ACTOR_236 */ {(void*) Zoness_80190F08, 1, (ObjectFunc) Zoness_80190A00, D_ZO_602BC58, 5000.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_ACTOR_237 */ {(void*) Actor237_Draw, 1, (ObjectFunc) Actor237_Update, D_edata_800CBF34, 200.0f, 0, 0, 40, 0, 0.0f, 2 },
/* OBJ_ACTOR_238 */ {(void*) Zoness_801914C4, 2, (ObjectFunc) Zoness_80191010, D_edata_800CBE8C, 200.0f, 0, 1, 40, 0, 1.0f, 1 },
/* OBJ_ACTOR_239 */ {(void*) NULL, 1, (ObjectFunc) NULL, D_edata_800CBF34, 1000.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_ACTOR_240 */ {(void*) Zoness_80191B4C, 1, (ObjectFunc) Zoness_80191680, D_edata_800CBE8C, 1500.0f, 0, 1, 40, 0, 20.0f, 0 },
/* OBJ_ACTOR_241 */ {(void*) Zoness_80191DB0, 1, (ObjectFunc) Zoness_80191BC4, D_edata_800CBE70, 1500.0f, 0, 1, 40, 0, 0.0f, 0 },
/* OBJ_ACTOR_237 */ {(void*) Actor237_Draw, 1, (ObjectFunc) Actor237_Update, gHitboxNone, 200.0f, 0, 0, 40, 0, 0.0f, 2 },
/* OBJ_ACTOR_238 */ {(void*) Zoness_801914C4, 2, (ObjectFunc) Zoness_80191010, gDefaultCubeHitbox100, 200.0f, 0, 1, 40, 0, 1.0f, 1 },
/* OBJ_ACTOR_239 */ {(void*) NULL, 1, (ObjectFunc) NULL, gHitboxNone, 1000.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_ACTOR_240 */ {(void*) Zoness_80191B4C, 1, (ObjectFunc) Zoness_80191680, gDefaultCubeHitbox100, 1500.0f, 0, 1, 40, 0, 20.0f, 0 },
/* OBJ_ACTOR_241 */ {(void*) Zoness_80191DB0, 1, (ObjectFunc) Zoness_80191BC4, gActor241Hitbox, 1500.0f, 0, 1, 40, 0, 0.0f, 0 },
/* OBJ_ACTOR_242 */ {(void*) Zoness_80191FFC, 2, (ObjectFunc) Zoness_80192094, D_ZO_602BE3C, 500.0f, 0, 0, 40, 0, 1.0f, 0 },
/* OBJ_ACTOR_243 */ {(void*) Zoness_80192C18, 2, (ObjectFunc) Zoness_80192834, D_edata_800CBE8C, 0.0f, 0, 1, 40, 0, 1.0f, 1 },
/* OBJ_ACTOR_243 */ {(void*) Zoness_80192C18, 2, (ObjectFunc) Zoness_80192834, gDefaultCubeHitbox100, 0.0f, 0, 1, 40, 0, 1.0f, 1 },
/* OBJ_ACTOR_244 */ {(void*) Zoness_80193240, 2, (ObjectFunc) Zoness_80192E64, D_ZO_602BE58, 2000.0f, 0, 0, 40, 0, 50.0f, 0 },
/* OBJ_ACTOR_245 */ {(void*) Zoness_8019983C, 1, (ObjectFunc) Zoness_8019969C, D_edata_800CBE8C, 200.0f, 0, 0, 40, 0, 1.0f, 0 },
/* OBJ_ACTOR_246 */ {(void*) Zoness_80199E24, 1, (ObjectFunc) Zoness_80199A28, D_edata_800CBE8C, 2000.0f, 0, 0, 40, 0, 1.0f, 0 },
/* OBJ_ACTOR_245 */ {(void*) Zoness_8019983C, 1, (ObjectFunc) Zoness_8019969C, gDefaultCubeHitbox100, 200.0f, 0, 0, 40, 0, 1.0f, 0 },
/* OBJ_ACTOR_246 */ {(void*) Zoness_80199E24, 1, (ObjectFunc) Zoness_80199A28, gDefaultCubeHitbox100, 2000.0f, 0, 0, 40, 0, 1.0f, 0 },
/* OBJ_ACTOR_247 */ {(void*) Zoness_8019D3C4, 1, (ObjectFunc) Zoness_8019D15C, D_ZO_602BFC4, 500.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_ACTOR_248 */ {(void*) Zoness_8019A1FC, 1, (ObjectFunc) Zoness_80199F10, D_edata_800CBEA8, 2000.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_ACTOR_249 */ {(void*) Zoness_8019ACCC, 1, (ObjectFunc) Zoness_8019A5D4, D_edata_800CBEC4, 5000.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_ACTOR_248 */ {(void*) Zoness_8019A1FC, 1, (ObjectFunc) Zoness_80199F10, gDefaultCubeHitbox150, 2000.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_ACTOR_249 */ {(void*) Zoness_8019ACCC, 1, (ObjectFunc) Zoness_8019A5D4, gDefaultCubeHitbox200, 5000.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_ACTOR_250 */ {(void*) Zoness_8019B7DC, 1, (ObjectFunc) Zoness_8019B548, D_ZO_602C1D4, 10000.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_ACTOR_251 */ {(void*) Zoness_8019BDE0, 2, (ObjectFunc) Zoness_8019B854, D_ZO_602C218, 1000.0f, 0, 0, 40, 0, 1.0f, 1 },
/* OBJ_ACTOR_252 */ {(void*) Zoness_8019C1CC, 1, (ObjectFunc) Zoness_8019BE48, D_ZO_602C234, 200.0f, 0, 0, 40, 0, 80.0f, 1 },
@ -350,13 +351,13 @@ ObjectInfo D_edata_800CC124[0x190] = {
/* OBJ_ACTOR_255 */ {(void*) Aquas_801AE168, 1, (ObjectFunc) Aquas_801AD6C0, D_AQ_6030BFC, 500.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_ACTOR_256 */ {(void*) Aquas_801AEB44, 1, (ObjectFunc) Aquas_801AE3D8, D_AQ_6030C18, 10000.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_ACTOR_257 */ {(void*) Aquas_801B099C, 1, (ObjectFunc) Aquas_801AFA5C, D_AQ_6030C44, 10000.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_ACTOR_258 */ {(void*) Aquas_801B0EC0, 1, (ObjectFunc) Aquas_801B0B60, D_edata_800CBE8C, 200.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_ACTOR_258 */ {(void*) Aquas_801B0EC0, 1, (ObjectFunc) Aquas_801B0B60, gDefaultCubeHitbox100, 200.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_ACTOR_259 */ {(void*) Aquas_801B619C, 2, (ObjectFunc) Aquas_801B638C, D_AQ_6031398, 10000.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_ACTOR_260 */ {(void*) Aquas_801B90DC, 2, (ObjectFunc) Aquas_801B7C78, D_AQ_60313CC, 300.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_ACTOR_261 */ {(void*) Aquas_801B504C, 2, (ObjectFunc) Aquas_801B50E8, D_AQ_6031400, 300.0f, 0, 0, 40, 0, 0.0f, 1 },
/* OBJ_ACTOR_262 */ {(void*) Aquas_801B7A24, 2, (ObjectFunc) Aquas_801B6FF8, D_AQ_603144C, 2000.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_ACTOR_263 */ {(void*) Aquas_801BA108, 2, (ObjectFunc) Aquas_801B91A4, D_AQ_6031480, 200.0f, 0, 0, 40, 0, 0.0f, 1 },
/* OBJ_ACTOR_264 */ {(void*) Aquas_801BA4E4, 1, (ObjectFunc) Aquas_801BA26C, D_edata_800CBE8C, 200.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_ACTOR_264 */ {(void*) Aquas_801BA4E4, 1, (ObjectFunc) Aquas_801BA26C, gDefaultCubeHitbox100, 200.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_ACTOR_265 */ {(void*) Aquas_801BAD7C, 1, (ObjectFunc) Aquas_801BA6A4, D_AQ_6031500, 200.0f, 0, 0, 40, 0, 0.0f, 1 },
/* OBJ_ACTOR_266 */ {(void*) Aquas_801BB204, 2, (ObjectFunc) Aquas_801BADF8, D_AQ_6031538, 200.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_ACTOR_267 */ {(void*) Aquas_801BC930, 2, (ObjectFunc) Aquas_801BB79C, D_AQ_6031554, 800.0f, 0, 0, 40, 0, 0.0f, 0 },
@ -366,24 +367,24 @@ ObjectInfo D_edata_800CC124[0x190] = {
/* OBJ_ACTOR_271 */ {(void*) func_360_8002E694, 2, (ObjectFunc) func_360_8002E670, D_BO_6011B24, 0.0f, 0, 0, 39, 0, 730.0f, 1 },
/* OBJ_ACTOR_272 */ {(void*) func_360_8002E6DC, 1, (ObjectFunc) func_360_8002E6B8, D_BO_6011BF4, 0.0f, 0, 0, 39, 0, 150.0f, 1 },
/* OBJ_ACTOR_273 */ {(void*) Fortuna_80188FE4, 2, (ObjectFunc) Fortuna_80188AD0, D_FO_600FF30, 0.0f, 0, 0, 39, 0, 220.0f, 1 },
/* OBJ_ACTOR_274 */ {(void*) SectorZ_8019E3A8, 1, (ObjectFunc) SectorZ_8019E234, D_edata_800CBEC4, 0.0f, 0, 0, 39, 0, 1.0f, 0 },
/* OBJ_ACTOR_275 */ {(void*) Solar_8019F7AC, 1, (ObjectFunc) Solar_8019F20C, D_edata_800CBE8C, 200.0f, 0, 0, 39, 0, 1.0f, 1 },
/* OBJ_ACTOR_276 */ {(void*) Solar_8019F7AC, 1, (ObjectFunc) Solar_8019F20C, D_edata_800CBE8C, 200.0f, 0, 0, 39, 0, 1.0f, 1 },
/* OBJ_ACTOR_277 */ {(void*) Solar_8019F7AC, 1, (ObjectFunc) Solar_8019F20C, D_edata_800CBEC4, 200.0f, 0, 0, 39, 0, 1.0f, 1 },
/* OBJ_ACTOR_278 */ {(void*) NULL, 1, (ObjectFunc) Solar_8019EA7C, D_edata_800CBF34, 200.0f, 0, 0, 0, 0, 0.0f, 1 },
/* OBJ_ACTOR_279 */ {(void*) NULL, 1, (ObjectFunc) Solar_801A003C, D_edata_800CBF34, 1000.0f, 0, 0, 0, 0, 0.0f, 1 },
/* OBJ_ACTOR_274 */ {(void*) SectorZ_8019E3A8, 1, (ObjectFunc) SectorZ_8019E234, gDefaultCubeHitbox200, 0.0f, 0, 0, 39, 0, 1.0f, 0 },
/* OBJ_ACTOR_275 */ {(void*) Solar_8019F7AC, 1, (ObjectFunc) Solar_8019F20C, gDefaultCubeHitbox100, 200.0f, 0, 0, 39, 0, 1.0f, 1 },
/* OBJ_ACTOR_276 */ {(void*) Solar_8019F7AC, 1, (ObjectFunc) Solar_8019F20C, gDefaultCubeHitbox100, 200.0f, 0, 0, 39, 0, 1.0f, 1 },
/* OBJ_ACTOR_277 */ {(void*) Solar_8019F7AC, 1, (ObjectFunc) Solar_8019F20C, gDefaultCubeHitbox200, 200.0f, 0, 0, 39, 0, 1.0f, 1 },
/* OBJ_ACTOR_278 */ {(void*) NULL, 1, (ObjectFunc) Solar_8019EA7C, gHitboxNone, 200.0f, 0, 0, 0, 0, 0.0f, 1 },
/* OBJ_ACTOR_279 */ {(void*) NULL, 1, (ObjectFunc) Solar_801A003C, gHitboxNone, 1000.0f, 0, 0, 0, 0, 0.0f, 1 },
/* OBJ_ACTOR_280 */ {(void*) D_VE1_900DD20, 0, (ObjectFunc) Venom1_80192518, D_VE1_601B7F8, 1000.0f, 0, 0, 40, 1, 0.0f, 0 },
/* OBJ_ACTOR_281 */ {(void*) Venom1_80192E2C, 1, (ObjectFunc) Venom1_80192CD4, D_VE1_601B830, 1000.0f, 0, 0, 40, 1, 0.0f, 0 },
/* OBJ_ACTOR_282 */ {(void*) D_VE1_901DA50, 0, (ObjectFunc) Venom1_80192CD4, D_VE1_601B868, 1000.0f, 0, 0, 40, 1, 0.0f, 0 },
/* OBJ_ACTOR_283 */ {(void*) D_VE1_9023AD0, 0, (ObjectFunc) Venom1_80192EB0, D_VE1_601B8A0, 1000.0f, 0, 0, 40, 1, 0.0f, 0 },
/* OBJ_ACTOR_284 */ {(void*) Venom1_801934D0, 1, (ObjectFunc) Venom1_801933DC, D_VE1_601B8D8, 1000.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_ACTOR_285 */ {(void*) Andross_80193244, 1, (ObjectFunc) Andross_80192E94, D_edata_800CBE8C, 1000.0f, 0, 0, 20, 0, 1.0f, 1 },
/* OBJ_ACTOR_286 */ {(void*) Andross_80188660, 1, (ObjectFunc) Andross_80188528, D_edata_800CBE8C, 1000.0f, 0, 0, 20, 0, 0.0f, 0 },
/* OBJ_ACTOR_287 */ {(void*) NULL, 1, (ObjectFunc) Andross_80189724, D_edata_800CBF34, 1000.0f, 0, 0, 40, 1, 0.0f, 0 },
/* OBJ_ACTOR_288 */ {(void*) NULL, 1, (ObjectFunc) Andross_801893B8, D_edata_800CBF34, 1000.0f, 0, 0, 20, 1, 0.0f, 0 },
/* OBJ_ACTOR_289 */ {(void*) func_edata_800596B0, 1, (ObjectFunc) Andross_80189470, D_edata_800CBF34, 1000.0f, 0, 0, 20, 1, 0.0f, 0 },
/* OBJ_ACTOR_290 */ {(void*) NULL, 1, (ObjectFunc) Andross_8018933C, D_edata_800CBF34, 1000.0f, 0, 0, 20, 0, 0.0f, 0 },
/* OBJ_ACTOR_SUPPLIES */ {(void*) ActorSupplies_Draw, 1, (ObjectFunc) ActorSupplies_Update, D_edata_800CBEA8, 1000.0f, 0, 0, 0, 0, 1.0f, 0 },
/* OBJ_ACTOR_285 */ {(void*) Andross_80193244, 1, (ObjectFunc) Andross_80192E94, gDefaultCubeHitbox100, 1000.0f, 0, 0, 20, 0, 1.0f, 1 },
/* OBJ_ACTOR_286 */ {(void*) Andross_80188660, 1, (ObjectFunc) Andross_80188528, gDefaultCubeHitbox100, 1000.0f, 0, 0, 20, 0, 0.0f, 0 },
/* OBJ_ACTOR_287 */ {(void*) NULL, 1, (ObjectFunc) Andross_80189724, gHitboxNone, 1000.0f, 0, 0, 40, 1, 0.0f, 0 },
/* OBJ_ACTOR_288 */ {(void*) NULL, 1, (ObjectFunc) Andross_801893B8, gHitboxNone, 1000.0f, 0, 0, 20, 1, 0.0f, 0 },
/* OBJ_ACTOR_289 */ {(void*) func_edata_800596B0, 1, (ObjectFunc) Andross_80189470, gHitboxNone, 1000.0f, 0, 0, 20, 1, 0.0f, 0 },
/* OBJ_ACTOR_290 */ {(void*) NULL, 1, (ObjectFunc) Andross_8018933C, gHitboxNone, 1000.0f, 0, 0, 20, 0, 0.0f, 0 },
/* OBJ_ACTOR_SUPPLIES */ {(void*) ActorSupplies_Draw, 1, (ObjectFunc) ActorSupplies_Update, gDefaultCubeHitbox150, 1000.0f, 0, 0, 0, 0, 1.0f, 0 },
/* OBJ_BOSS_292 */ {(void*) Corneria_8018AA74, 2, (ObjectFunc) Corneria_80189058, D_CO_603E620, 20000.0f, 0, 0, 40, 1, 0.0f, 10 },
/* OBJ_BOSS_293 */ {(void*) Corneria_8018ECAC, 1, (ObjectFunc) Corneria_8018C19C, D_CO_603E840, 20000.0f, 0, 0, 40, 0, 0.0f, 10 },
/* OBJ_BOSS_294 */ {(void*) Corneria_8018ED78, 1, (ObjectFunc) Corneria_8018DDAC, D_CO_603E714, 20000.0f, 0, 0, 40, 0, 0.0f, 10 },
@ -391,8 +392,8 @@ ObjectInfo D_edata_800CC124[0x190] = {
/* OBJ_BOSS_296 */ {(void*) Corneria_8018EF90, 1, (ObjectFunc) Corneria_8018E76C, D_CO_603E7C4, 20000.0f, 0, 0, 40, 0, 0.0f, 10 },
/* OBJ_BOSS_297 */ {(void*) Meteo_8018BACC, 1, (ObjectFunc) Meteo_8018978C, D_ME_602F75C, 20000.0f, 0, 0, 40, 0, 0.0f, 10 },
/* OBJ_BOSS_298 */ {(void*) Meteo_801887D0, 1, (ObjectFunc) Meteo_80188344, D_ME_602FA50, 20000.0f, 0, 0, 40, 0, 0.0f, 10 },
/* OBJ_BOSS_299 */ {(void*) Boss299_Draw, 2, (ObjectFunc) Boss299_Update, D_edata_800CBF34, 20000.0f, 0, 0, 40, 0, 0.0f, 10 },
/* OBJ_BOSS_300 */ {(void*) Boss300_Draw, 1, (ObjectFunc) Boss300_Update, D_edata_800CBF34, 20000.0f, 0, 0, 40, 0, 0.0f, 10 },
/* OBJ_BOSS_299 */ {(void*) Boss299_Draw, 2, (ObjectFunc) Boss299_Update, gHitboxNone, 20000.0f, 0, 0, 40, 0, 0.0f, 10 },
/* OBJ_BOSS_300 */ {(void*) Boss300_Draw, 1, (ObjectFunc) Boss300_Update, gHitboxNone, 20000.0f, 0, 0, 40, 0, 0.0f, 10 },
/* OBJ_BOSS_301 */ {(void*) Aquas_801BEC5C, 1, (ObjectFunc) Aquas_801BEC50, D_AQ_6030B10, 0.0f, 0, 0, 40, 0, 0.0f, 10 },
/* OBJ_BOSS_A6 */ {(void*) Area6_8018C54C, 1, (ObjectFunc) Area6_80187944, D_A6_6028454, 2000.0f, 0, 0, 40, 0, 0.0f, 10 },
/* OBJ_BOSS_303 */ {(void*) SectorX_80193434, 2, (ObjectFunc) SectorX_80190078, D_SX_6032550, 20000.0f, 0, 0, 20, 0, 0.0f, 10 },
@ -401,35 +402,35 @@ ObjectInfo D_edata_800CC124[0x190] = {
/* OBJ_BOSS_306 */ {(void*) Titania_801982A8, 1, (ObjectFunc) Titania_80197A94,D_TI_801B83A8, 1000.0f, 0, 0, 40, 1, 0.0f, 10 },
/* OBJ_BOSS_ZO */ {(void*) Zoness_801949DC, 2, (ObjectFunc) Zoness_80194A84, D_ZO_602C044, 1000.0f, 0, 0, 40, 0, 1.0f, 10 },
/* OBJ_BOSS_308 */ {(void*) func_hud_8008FE78, 1, (ObjectFunc) func_hud_800907C4, D_FO_600FFE0, 0.0f, 0, 0, 40, 1, 0.0f, 10 },
/* OBJ_BOSS_309 */ {(void*) func_360_8002E604, 1, (ObjectFunc) func_360_8002E5E0, D_edata_800CBF34, 0.0f, 0, 0, 40, 1, 0.0f, 10 },
/* OBJ_BOSS_310 */ {(void*) func_360_8002E64C, 1, (ObjectFunc) func_360_8002E628, D_edata_800CBF34, 0.0f, 0, 0, 40, 1, 0.0f, 10 },
/* OBJ_BOSS_309 */ {(void*) func_360_8002E604, 1, (ObjectFunc) func_360_8002E5E0, gHitboxNone, 0.0f, 0, 0, 40, 1, 0.0f, 10 },
/* OBJ_BOSS_310 */ {(void*) func_360_8002E64C, 1, (ObjectFunc) func_360_8002E628, gHitboxNone, 0.0f, 0, 0, 40, 1, 0.0f, 10 },
/* OBJ_BOSS_311 */ {(void*) Bolse_80191AFC, 2, (ObjectFunc) Bolse_801912FC, D_BO_6011C80, 0.0f, 0, 0, 40, 1, 0.0f, 10 },
/* OBJ_BOSS_312 */ {(void*) Venom2_80196288, 2, (ObjectFunc) Venom2_80196210, D_VE2_60166F4, 0.0f, 0, 0, 40, 1, 0.0f, 10 },
/* OBJ_BOSS_313 */ {(void*) SectorZ_8019E98C, 1, (ObjectFunc) SectorZ_8019E454, D_SZ_6009388, 0.0f, 0, 0, 40, 0, 0.0f, 10 },
/* OBJ_BOSS_314 */ {(void*) SectorY_8019E2C4, 2, (ObjectFunc) SectorY_8019C888, D_edata_800CBF34, 0.0f, 0, 0, 40, 0, 0.0f, 10 },
/* OBJ_BOSS_SO */ {(void*) Solar_801A71B8, 2, (ObjectFunc) Solar_801A5B3C, D_edata_800CBF34, 0.0f, 0, 0, 40, 0, 0.0f, 10 },
/* OBJ_BOSS_314 */ {(void*) SectorY_8019E2C4, 2, (ObjectFunc) SectorY_8019C888, gHitboxNone, 0.0f, 0, 0, 40, 0, 0.0f, 10 },
/* OBJ_BOSS_SO */ {(void*) Solar_801A71B8, 2, (ObjectFunc) Solar_801A5B3C, gHitboxNone, 0.0f, 0, 0, 40, 0, 0.0f, 10 },
/* OBJ_BOSS_316 */ {(void*) Katina_801968F4, 1, (ObjectFunc) Katina_801946C4, D_KA_6011058, 0.0f, 0, 0, 40, 0, 0.0f, 10 },
/* OBJ_BOSS_317 */ {(void*) Katina_80193B1C, 1, (ObjectFunc) Katina_80193718, D_KA_601115C, 0.0f, 0, 0, 40, 1, 0.0f, 10 },
/* OBJ_BOSS_AQ */ {(void*) Aquas_801B4D84, 2, (ObjectFunc) Aquas_801B134C, D_AQ_6030F74, 10000.0f, 0, 0, 40, 0, 0.0f, 10 },
/* OBJ_BOSS_319 */ {(void*) Venom1_801985E4, 1, (ObjectFunc) Venom1_80194398,D_VE1_8019A9B8, 3000.0f, 0, 0, 40, 1, 0.0f, 10 },
/* OBJ_BOSS_320 */ {(void*) Andross_801928C8, 2, (ObjectFunc) Andross_8018DBF0, D_ANDROSS_C038DC0, 10000.0f, 0, 0, 40, 0, 0.0f, 10 },
/* OBJ_BOSS_321 */ {(void*) Andross_8018B8C0, 1, (ObjectFunc) Andross_80189B70, D_ANDROSS_C038F24, 10000.0f, 0, 0, 40, 0, 0.0f, 10 },
/* OBJ_ITEM_LASERS */ {(void*) ItemLasers_Draw, 1, (ObjectFunc) ItemLasers_Update, D_edata_800CBFA8, 700.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_ITEM_CHECKPOINT */ {(void*) ItemCheckpoint_Draw, 1, (ObjectFunc) ItemCheckpoint_Update, D_edata_800CBF38, 700.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_ITEM_SILVER_RING */ {(void*) ItemSilverRing_Draw, 1, (ObjectFunc) ItemSupplyRing_Update, D_edata_800CBF54, 700.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_ITEM_SILVER_STAR */ {(void*) ItemSilverStar_Draw, 1, (ObjectFunc) ItemSilverStar_Update, D_edata_800CBF54, 700.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_ITEM_METEO_WARP */ {(void*) ItemMeteoWarp_Draw, 1, (ObjectFunc) ItemMeteoWarp_Update, D_edata_800CBF70, 700.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_ITEM_BOMB */ {(void*) ItemBomb_Draw, 1, (ObjectFunc) ItemPickup_Update, D_edata_800CBFC8, 700.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_ITEM_328 */ {(void*) NULL, 1, (ObjectFunc) func_enmy_80068C88, D_edata_800CBF8C, 1500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_ITEM_329 */ {(void*) NULL, 1, (ObjectFunc) func_enmy_80068C88, D_edata_800CBF8C, 1500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_ITEM_330 */ {(void*) NULL, 1, (ObjectFunc) func_enmy_80068C88, D_edata_800CBF8C, 1500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_ITEM_331 */ {(void*) NULL, 1, (ObjectFunc) func_enmy_80068C88, D_edata_800CBF8C, 1500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_ITEM_332 */ {(void*) NULL, 1, (ObjectFunc) func_enmy_80068C88, D_edata_800CBF8C, 1500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_ITEM_333 */ {(void*) NULL, 1, (ObjectFunc) func_enmy_80068C88, D_edata_800CBF8C, 1500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_ITEM_334 */ {(void*) NULL, 1, (ObjectFunc) func_enmy_80068C48, D_edata_800CBF18, 700.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_ITEM_1UP */ {(void*) D_1022120, 0, (ObjectFunc) Item1up_Update, D_edata_800CBE8C, 700.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_ITEM_GOLD_RING */ {(void*) ItemGoldRing_Draw, 1, (ObjectFunc) ItemGoldRing_Update, D_edata_800CBF54, 700.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_ITEM_WING_REPAIR */ {(void*) D_arwing_3007650, 0, (ObjectFunc) ItemWingRepair_Update, D_edata_800CBFA8, 700.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_ITEM_LASERS */ {(void*) ItemLasers_Draw, 1, (ObjectFunc) ItemLasers_Update, gItemLasersHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_ITEM_CHECKPOINT */ {(void*) ItemCheckpoint_Draw, 1, (ObjectFunc) ItemCheckpoint_Update, gItemCheckpointHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_ITEM_SILVER_RING */ {(void*) ItemSilverRing_Draw, 1, (ObjectFunc) ItemSupplyRing_Update, gItemSupplyRingHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_ITEM_SILVER_STAR */ {(void*) ItemSilverStar_Draw, 1, (ObjectFunc) ItemSilverStar_Update, gItemSupplyRingHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_ITEM_METEO_WARP */ {(void*) ItemMeteoWarp_Draw, 1, (ObjectFunc) ItemMeteoWarp_Update, gMeteoWarpHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_ITEM_BOMB */ {(void*) ItemBomb_Draw, 1, (ObjectFunc) ItemPickup_Update, gItemBombHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_ITEM_PATH_SPLIT_X */ {(void*) NULL, 1, (ObjectFunc) ItemPathChange_Update, D_edata_800CBF8C, 1500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_ITEM_PATH_TURN_LEFT */ {(void*) NULL, 1, (ObjectFunc) ItemPathChange_Update, D_edata_800CBF8C, 1500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_ITEM_PATH_TURN_RIGHT */ {(void*) NULL, 1, (ObjectFunc) ItemPathChange_Update, D_edata_800CBF8C, 1500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_ITEM_PATH_SPLIT_Y */ {(void*) NULL, 1, (ObjectFunc) ItemPathChange_Update, D_edata_800CBF8C, 1500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_ITEM_PATH_TURN_UP */ {(void*) NULL, 1, (ObjectFunc) ItemPathChange_Update, D_edata_800CBF8C, 1500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_ITEM_PATH_TURN_DOWN */ {(void*) NULL, 1, (ObjectFunc) ItemPathChange_Update, D_edata_800CBF8C, 1500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_ITEM_RING_CHECK */ {(void*) NULL, 1, (ObjectFunc) ItemRingCheck_Update, gItemRingCheckHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_ITEM_1UP */ {(void*) D_1022120, 0, (ObjectFunc) Item1up_Update, gDefaultCubeHitbox100, 700.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_ITEM_GOLD_RING */ {(void*) ItemGoldRing_Draw, 1, (ObjectFunc) ItemGoldRing_Update, gItemSupplyRingHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_ITEM_WING_REPAIR */ {(void*) D_arwing_3007650, 0, (ObjectFunc) ItemWingRepair_Update, gItemLasersHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_ITEM_TRAINING_RING */ {(void*) gItemTrainingRingDL, 0, (ObjectFunc) Training_ItemRing_Update, D_TR_6009CFC, 700.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_EFFECT_339 */ {(void*) func_effect_8007D55C, 1, (ObjectFunc) func_effect_8007D2F4, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 },
/* OBJ_EFFECT_340 */ {(void*) func_effect_8007D55C, 1, (ObjectFunc) func_effect_8007D748, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 },

File diff suppressed because it is too large Load Diff

View File

@ -252,7 +252,7 @@ void func_effect_80077B84(Effect* effect) {
if (gCurrentLevel == LEVEL_BOLSE) {
RCP_SetupDL(&gMasterDisp, 0x26);
}
switch ((effect->index + gGameFrameCount) & 3) {
switch ((effect->index + gGameFrameCount) % 4U) {
case 0:
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 0, 0, effect->unk_44);
break;
@ -332,13 +332,13 @@ static f32 D_800D1534[][10] = {
void func_effect_800780F8(Effect* effect) {
s32 i;
if (effect->unk_4A >= 11) {
if (!((effect->index + gGameFrameCount) & 1)) {
if (effect->unk_4A > 10) {
if (((effect->index + gGameFrameCount) % 2) == 0) {
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 128, 128, 32);
} else {
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 128, 128, 128);
}
} else if (!((effect->index + gGameFrameCount) & 1)) {
} else if (((effect->index + gGameFrameCount) % 2) == 0) {
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255);
} else {
gDPSetPrimColor(gMasterDisp++, 0, 0, 96, 96, 255, 255);
@ -456,7 +456,7 @@ void func_effect_80078AE0(void* effect) {
void func_effect_80078AEC(Effect* effect) {
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 180);
Graphics_SetScaleMtx(effect->scale2 * (13.0f + ((gGameFrameCount & 1) * 2.5f)));
Graphics_SetScaleMtx(effect->scale2 * (13.0f + ((s32) (gGameFrameCount % 2U) * 2.5f)));
gSPDisplayList(gMasterDisp++, D_102ED50);
}
@ -472,7 +472,7 @@ void func_effect_80078BE0(Effect* effect) {
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 160);
var_fv0 = 3.0f;
if (gGameFrameCount & 1) {
if ((gGameFrameCount % 2) != 0) {
var_fv0 *= 1.2f;
}
Graphics_SetScaleMtx(effect->scale2 * var_fv0);
@ -667,7 +667,7 @@ void func_effect_8007968C(Effect* effect) {
Object_Kill(&effect->obj, effect->sfxSource);
}
} else {
if (!(gGameFrameCount & 3)) {
if (((gGameFrameCount % 4) == 0)) {
func_effect_8007D2C8(effect->obj.pos.x, effect->obj.pos.y + 550.0f, effect->obj.pos.z, 10.0f);
}
if ((effect->timer_50 == 0) || (effect->obj.pos.y < (gGroundLevel - 100.0f))) {
@ -683,7 +683,7 @@ void func_effect_8007968C(Effect* effect) {
effect->vel.y -= 0.5f;
}
if ((gCurrentLevel == LEVEL_BOLSE) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) && (gCsFrameCount >= 176)) {
if ((gCurrentLevel == LEVEL_BOLSE) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) && (gCsFrameCount > 175)) {
effect->vel.x *= 0.95f;
effect->vel.y *= 0.95f;
effect->vel.z *= 0.95f;
@ -726,7 +726,7 @@ void func_effect_800798F0(Effect* effect) {
case LEVEL_MACBETH:
switch (effect->unk_44) {
case 1:
if (effect->index & 1) {
if ((effect->index % 2) != 0) {
gSPDisplayList(gMasterDisp++, D_MA_6022530);
} else {
gSPDisplayList(gMasterDisp++, D_MA_6022450);
@ -735,7 +735,7 @@ void func_effect_800798F0(Effect* effect) {
case 2:
RCP_SetupDL(&gMasterDisp, 0x39);
if (effect->index & 1) {
if ((effect->index % 2) != 0) {
gSPDisplayList(gMasterDisp++, D_MA_601A7A0);
} else {
gSPDisplayList(gMasterDisp++, D_MA_60223C0);
@ -812,7 +812,7 @@ void func_effect_800798F0(Effect* effect) {
break;
default:
if (effect->index & 1) {
if ((effect->index % 2) != 0) {
gSPDisplayList(gMasterDisp++, D_10194C0);
} else {
gSPDisplayList(gMasterDisp++, D_1024290);
@ -830,7 +830,7 @@ void func_effect_800798F0(Effect* effect) {
default:
switch (effect->unk_4C) {
case 0:
if (effect->index & 1) {
if ((effect->index % 2) != 0) {
gSPDisplayList(gMasterDisp++, D_10194C0);
} else {
gSPDisplayList(gMasterDisp++, D_1024290);
@ -838,7 +838,7 @@ void func_effect_800798F0(Effect* effect) {
break;
case 1:
switch (effect->index & 3) {
switch ((s32) (effect->index % 4U)) {
case 0:
Matrix_Scale(gGfxMatrix, 1.0f, 0.3f, 1.0f, 1);
break;
@ -875,18 +875,18 @@ void func_effect_8007A28C(Effect* effect) {
effect->obj.rot.y += 1.0f;
Math_SmoothStepToF(&effect->scale2, effect->scale1, 0.05f, 1.5f, 0.001f);
if (effect->timer_50 >= 11) {
if (effect->timer_50 > 10) {
D_ctx_801779A8[0] = 60.0f;
}
if (effect->timer_50 == 48) {
D_ctx_80178340 = 150;
gFillScreenAlpha = 150;
}
if (effect->timer_50 > 45) {
D_ctx_80178358 = 0;
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255;
gFillScreenAlphaTarget = 0;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255;
}
D_ctx_8017835C = 3;
gFillScreenAlphaStep = 3;
if (effect->timer_50 == 0) {
effect->unk_44 -= 2;
@ -899,7 +899,7 @@ void func_effect_8007A28C(Effect* effect) {
}
void func_effect_8007A3C0(Effect* effect) {
if (D_display_80161410 > 0) {
if (gReflectY > 0) {
Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, 1);
Matrix_SetGfxMtx(&gMasterDisp);
RCP_SetupDL_64_2();
@ -1026,9 +1026,9 @@ void func_effect_8007A994(Effect* effect) {
effect->obj.rot.z += effect->unk_60.z;
effect->vel.y += effect->unk_60.y;
if (effect->unk_4A & 1) {
if ((effect->unk_4A % 2) != 0) {
effect->unk_48++;
if (effect->unk_48 >= 6) {
if (effect->unk_48 > 5) {
effect->unk_48 = 5;
}
}
@ -1408,8 +1408,8 @@ void func_effect_8007B9DC(Effect* effect) {
if (gCurrentLevel != LEVEL_MACBETH) {
gDPSetPrimColor(gMasterDisp++, 0, 0, 140, 99, 58, effect->unk_4A);
} else {
gDPSetPrimColor(gMasterDisp++, 0, 0, (gGameFrameCount & 3) + 5, (gGameFrameCount & 3) + 3,
(gGameFrameCount & 3) + 3, 220);
gDPSetPrimColor(gMasterDisp++, 0, 0, (gGameFrameCount % 4U) + 5, (gGameFrameCount % 4U) + 3,
(gGameFrameCount % 4U) + 3, 220);
}
//! DEBUG: Hold Z on controller 4 to set up a display list.
if (!(gControllerHold[3].button & A_BUTTON)) {
@ -1648,7 +1648,7 @@ void func_effect_8007C50C(Effect* effect) {
f32 randY;
f32 randOther;
if (!(effect->timer_50 & 7)) {
if ((effect->timer_50 % 8) == 0) {
randX = RAND_FLOAT_CENTERED(40.0f) * effect->scale2;
randY = RAND_FLOAT_CENTERED(40.0f) * effect->scale2;
randOther = RAND_FLOAT(1.0f) + 1.0f;
@ -2117,7 +2117,7 @@ void func_effect_8007D8A8(Effect* effect) {
Object_Kill(&effect->obj, effect->sfxSource);
}
}
if (effect->unk_4C >= 16) {
if (effect->unk_4C > 15) {
effect->unk_44 -= 20;
}
}
@ -2188,7 +2188,7 @@ void func_effect_8007DB70(Effect* effect) {
func_effect_8007D0E0(effect->obj.pos.x, effect->obj.pos.y + 30.0f, effect->obj.pos.z, 7.0f);
func_effect_8007BFFC(effect->obj.pos.x, effect->obj.pos.y + 30.0f, effect->obj.pos.z, 0.0f, 0.0f, 0.0f,
4.0f, 5);
if ((effect->obj.pos.y < (gGroundLevel + 10.0f)) || (D_ctx_80161A88 != 2)) {
if ((effect->obj.pos.y < (gGroundLevel + 10.0f)) || (gGroundType != GROUNDTYPE_WATER)) {
func_beam_800365E4(effect->obj.pos.x, 3.0f, effect->obj.pos.z, effect->obj.pos.x, effect->obj.pos.z,
0.0f, 0.0f, 90.0f, 5.0f, 0, 0);
break;
@ -2251,7 +2251,8 @@ void func_effect_8007E014(Effect* effect) {
effect->obj.rot.z = RAD_TO_DEG(z);
}
if (((effect->unk_44 == 1) || (effect->unk_44 == 3)) && ((effect->timer_50 & 3) == 1) && (Rand_ZeroOne() < 0.5f)) {
if (((effect->unk_44 == 1) || (effect->unk_44 == 3)) && ((s32) (effect->timer_50 % 4U) == 1) &&
(Rand_ZeroOne() < 0.5f)) {
func_effect_8007D10C(effect->obj.pos.x, effect->obj.pos.y + (effect->scale2 * 5.0f), effect->obj.pos.z + 3.0f,
(RAND_FLOAT(0.7f) + 1.0f) * (effect->scale2 * 1.2f));
}
@ -2358,7 +2359,7 @@ void func_effect_8007E648(Effect* effect) {
}
}
void func_effect_8007E6B8(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPos, f32 arg5) {
void func_effect_8007E6B8(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPos, f32 speed) {
f32 sp54;
f32 sp50;
f32 temp_ft4;
@ -2384,7 +2385,7 @@ void func_effect_8007E6B8(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPo
sp40.x = 0.0f;
sp40.y = 0.0f;
sp40.z = arg5;
sp40.z = speed;
Matrix_MultVec3f(gCalcMatrix, &sp40, &sp34);
@ -2415,7 +2416,7 @@ void func_effect_8007E6B8(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPo
AUDIO_PLAY_SFX(0x29002002, effect->sfxSource, 4);
}
void func_effect_8007E93C(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPos, f32 arg5) {
void func_effect_8007E93C(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPos, f32 speed) {
f32 sp54;
f32 sp50;
f32 temp_ft4;
@ -2441,7 +2442,7 @@ void func_effect_8007E93C(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPo
sp40.x = 0.0f;
sp40.y = 0.0f;
sp40.z = arg5;
sp40.z = speed;
Matrix_MultVec3f(gCalcMatrix, &sp40, &sp34);
@ -2577,14 +2578,14 @@ void func_effect_8007F04C(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 xRot
}
}
void func_effect_8007F11C(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 arg4) {
void func_effect_8007F11C(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 speed) {
s32 i;
if ((fabsf(zPos - gPlayer[0].unk_138) > 300.0f) || (fabsf(xPos - gPlayer[0].pos.x) > 300.0f)) {
for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) {
if (gEffects[i].obj.status == OBJ_FREE) {
Matrix_Push(&gCalcMatrix);
func_effect_8007E6B8(&gEffects[i], objId, xPos, yPos, zPos, arg4);
func_effect_8007E6B8(&gEffects[i], objId, xPos, yPos, zPos, speed);
Matrix_Pop(&gCalcMatrix);
break;
}
@ -2592,14 +2593,14 @@ void func_effect_8007F11C(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 arg4
}
}
void func_effect_8007F20C(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 arg4) {
void func_effect_8007F20C(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 speed) {
s32 i;
if ((fabsf(zPos - gPlayer[0].camEye.z) > 300.0f) || (fabsf(xPos - gPlayer[0].camEye.x) > 300.0f)) {
for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) {
if (gEffects[i].obj.status == OBJ_FREE) {
Matrix_Push(&gCalcMatrix);
func_effect_8007E93C(&gEffects[i], objId, xPos, yPos, zPos, arg4);
func_effect_8007E93C(&gEffects[i], objId, xPos, yPos, zPos, speed);
Matrix_Pop(&gCalcMatrix);
break;
}
@ -2627,7 +2628,7 @@ void func_effect_8007F2FC(Effect* effect) {
effect->obj.pos.z -= effect->vel.z * 0.5f;
}
if ((effect->unk_44 == 1) && !(gGameFrameCount & 1)) {
if ((effect->unk_44 == 1) && ((gGameFrameCount % 2) == 0)) {
func_effect_8007D0E0(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 1.5f);
}
}
@ -2678,7 +2679,7 @@ void func_effect_8007F5AC(Effect* effect) {
effect->vel.x -= 0.5f;
}
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
effect->unk_44--;
if (effect->unk_44 < 20) {
Object_Kill(&effect->obj, effect->sfxSource);
@ -2712,7 +2713,7 @@ void func_effect_8007F6B0(Effect* effect) {
Object_Kill(&effect->obj, effect->sfxSource);
}
if (!(gGameFrameCount & 3) && (effect->state == 0)) {
if (((gGameFrameCount % 4) == 0) && (effect->state == 0)) {
randfloat = RAND_FLOAT(30.0f);
for (i = 0; i < 36; i += 2) {
temp = (i * 10.0f * M_DTOR) + randfloat;
@ -2759,7 +2760,7 @@ void func_effect_8007F958(Effect* effect) {
return;
}
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
randFloat = RAND_FLOAT(144.0f);
for (i = 0; i < 5; i++) {
temp = (i * 72.0f * M_DTOR) + randFloat;
@ -2800,7 +2801,7 @@ void func_effect_8007FBE0(Effect* effect) {
Object_Kill(&effect->obj, effect->sfxSource);
}
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
randFloat = RAND_FLOAT(144.0f);
for (i = 0; i < 10; i++) {
temp = (i * 36.0f * M_DTOR) + randFloat;
@ -2899,7 +2900,7 @@ void func_effect_8007FE88(Effect* effect) {
}
} else if (effect->obj.pos.y < gGroundLevel) {
Object_Kill(&effect->obj, effect->sfxSource);
if (D_ctx_80161A88 != 2) {
if (gGroundType != GROUNDTYPE_WATER) {
effect->obj.pos.y = gGroundLevel;
func_effect_8007D074(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 2.0f);
}
@ -2932,7 +2933,7 @@ void func_effect_800802F8(Effect* effect) {
func_effect_8007FE88(effect);
effect->obj.rot.z += 10.0f;
effect->scale2 = 3.0f;
if (gGameFrameCount & 1) {
if ((gGameFrameCount % 2) != 0) {
effect->scale2 = 3.5f;
}
}
@ -3030,7 +3031,7 @@ void func_effect_8008040C(Effect* effect) {
}
} else if (effect->obj.pos.y < gGroundLevel) {
Object_Kill(&effect->obj, effect->sfxSource);
if (D_ctx_80161A88 != 2) {
if (gGroundType != GROUNDTYPE_WATER) {
effect->obj.pos.y = gGroundLevel;
func_effect_8007D074(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 2.0f);
}
@ -3092,7 +3093,7 @@ void func_effect_80080ACC(Effect* effect) {
}
temp_ft2 = (((f32) effect->unk_44 / (f32) effect->unk_46) * 255.0f);
effect->unk_48 = temp_ft2;
if (temp_ft2 >= 256) {
if (temp_ft2 > 255) {
effect->unk_48 = 255;
}
if (effect->unk_48 < 32) {
@ -3266,7 +3267,7 @@ void func_effect_80080D04(Effect* effect) {
D_800D18E4++;
}
if (!((effect->index + gGameFrameCount) & 1)) {
if (((effect->index + gGameFrameCount) % 2) == 0) {
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255);
} else {
gDPSetPrimColor(gMasterDisp++, 0, 0, 96, 96, 255, 255);
@ -3490,7 +3491,7 @@ void func_effect_80081C5C(Effect* effect) {
break;
}
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
func_effect_8007C484(RAND_FLOAT_CENTERED(50.0f) + effect->obj.pos.x,
RAND_FLOAT_CENTERED(50.0f) + effect->obj.pos.y,
RAND_FLOAT_CENTERED(50.0f) + effect->obj.pos.z, effect->vel.x, effect->vel.y,
@ -3513,7 +3514,7 @@ void func_effect_80081C5C(Effect* effect) {
effect->unk_60.z += 10.0f;
effect->vel.z = 5.0f;
if (!(gGameFrameCount & 7)) {
if (((gGameFrameCount % 8) == 0)) {
effect->unk_44++;
effect->unk_44 &= 1;
}
@ -3556,7 +3557,7 @@ void func_effect_80081C5C(Effect* effect) {
break;
}
if (!(gGameFrameCount & 3)) {
if (((gGameFrameCount % 4) == 0)) {
func_effect_8007C120((RAND_FLOAT_CENTERED(effect->scale2) * 50.0f) + effect->obj.pos.x,
(RAND_FLOAT_CENTERED(effect->scale2) * 50.0f) + effect->obj.pos.y,
(RAND_FLOAT_CENTERED(effect->scale2) * 50.0f) + effect->obj.pos.z, effect->vel.x,
@ -3614,7 +3615,7 @@ void func_effect_80081C5C(Effect* effect) {
case 7:
switch (gCurrentLevel) {
case LEVEL_AQUAS:
if (!(gGameFrameCount & 3)) {
if (((gGameFrameCount % 4) == 0)) {
func_effect_80081A8C(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, effect->scale2,
6);
}
@ -3628,7 +3629,7 @@ void func_effect_80081C5C(Effect* effect) {
break;
case LEVEL_ZONESS:
if (!(gGameFrameCount & 3)) {
if (((gGameFrameCount % 4) == 0)) {
// clang-format off
func_effect_80081A8C(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, effect->scale2 * 3.0f, 6);
// clang-format on
@ -3677,10 +3678,10 @@ void func_effect_80081C5C(Effect* effect) {
gEffects[ARRAY_COUNT(gEffects) - 1].obj.status =
gEffects[ARRAY_COUNT(gEffects) - 2].obj.status = OBJ_FREE;
func_effect_80081BEC(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 1.0f, 10);
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255;
D_ctx_80178340 = D_ctx_80178358 = 255;
D_ctx_80178358 = 0;
D_ctx_8017835C = 25;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255;
gFillScreenAlpha = gFillScreenAlphaTarget = 255;
gFillScreenAlphaTarget = 0;
gFillScreenAlphaStep = 25;
effect->timer_50 = 10;
D_800D18EC = 0.0f;
D_800D18E8 = 0.0f;
@ -3693,8 +3694,8 @@ void func_effect_80081C5C(Effect* effect) {
case 1:
Math_SmoothStepToF(&effect->scale2, 8.0f, 0.1f, 1.0f, 0.00001f);
if (effect->timer_50 == 0) {
if (D_ctx_80178340 != 0) {
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = D_ctx_80178340 = 0;
if (gFillScreenAlpha != 0) {
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 0;
}
effect->timer_50 = gBosses[0].timer_050;
effect->unk_44++;
@ -3748,20 +3749,20 @@ void func_effect_80081C5C(Effect* effect) {
case 0:
D_ctx_801779A8[0] = 50.0f;
if (effect->unk_46 == 10) {
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255;
D_ctx_80178340 = D_ctx_80178358 = 255;
D_ctx_80178358 = 0;
D_ctx_8017835C = 25;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255;
gFillScreenAlpha = gFillScreenAlphaTarget = 255;
gFillScreenAlphaTarget = 0;
gFillScreenAlphaStep = 25;
gCameraShake = 50;
}
if (effect->unk_46 == 0) {
D_ctx_80178348 = (D_ctx_80178350 = (D_ctx_80178354 = (D_ctx_80178340 = 0)));
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 0;
effect->unk_46 = 50;
}
if (effect->unk_46 != 0) {
effect->unk_46 -= 1;
}
if ((!(gGameFrameCount & 0xF)) && (effect->timer_50 == 0)) {
if ((((gGameFrameCount % 16) == 0)) && (effect->timer_50 == 0)) {
D_800D18EC =
RAD_TO_DEG(Math_Atan2F(gPlayer[0].camEye.x - gBosses[0].obj.pos.x,
gPlayer[0].camEye.z - (gBosses[0].obj.pos.z + D_ctx_80177D20)));
@ -3940,7 +3941,7 @@ void func_effect_80082F78(Effect* effect) {
break;
case 10:
if (D_ctx_80177854 != 100) {
if (gPlayState != PLAY_PAUSE) {
Texture_Scroll(D_A6_6012840, 16, 16, 0);
}
RCP_SetupDL(&gMasterDisp, 0x35);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -8,7 +8,7 @@ f32 D_game_80161A14;
s32 gPlayerInactive[4];
s32 D_game_80161A28;
u8 D_game_80161A2C;
u16 D_game_80161A2E;
u16 gNextLevelStage;
u16 gNextLevel;
u16 gNextGameState;
u16 D_game_80161A34;
@ -19,7 +19,7 @@ f32 D_game_80161A3C;
f32 D_game_80161A40;
f32 D_game_80161A44;
s32 D_game_800D2860[4] = { true, true, true, true };
s32 gShowCrosshairs[4] = { true, true, true, true };
s32 D_game_800D2870 = 0;
static s32 sVsCameraULx[] = { 0, SCREEN_WIDTH / 2, 0, SCREEN_WIDTH / 2 };
static s32 sVsCameraLRx[] = { SCREEN_WIDTH / 2 - 1, SCREEN_WIDTH - 1, SCREEN_WIDTH / 2 - 1, SCREEN_WIDTH - 1 };
@ -54,7 +54,7 @@ void Game_Initialize(void) {
Rand_Init();
Rand_SetSeed(1, 29000, 9876);
gGameState = GSTATE_BOOT;
D_Timer_8017783C = 0;
gNextGameStateTimer = 0;
gBgColor = 0;
gBlurAlpha = 255;
D_game_80161A3C = 45.0f;
@ -77,11 +77,11 @@ void Game_SetGameState(void) {
switch (gNextGameState) {
case GSTATE_PLAY:
gCurrentLevel = gNextLevel;
func_play_800A5844();
D_ctx_80177854 = 0;
D_ctx_8017827C = D_game_80161A2E;
D_game_80161A2E = 0;
if ((D_ctx_8017827C != 0) && (gCurrentLevel != LEVEL_VENOM_ANDROSS)) {
Play_Setup();
gPlayState = PLAY_STANDBY;
gLevelStage = gNextLevelStage;
gNextLevelStage = 0;
if ((gLevelStage != 0) && (gCurrentLevel != LEVEL_VENOM_ANDROSS)) {
D_ctx_8017782C = 0;
}
break;
@ -95,25 +95,25 @@ void Game_SetGameState(void) {
Memory_FreeAll();
func_play_800A6148();
gGameState = gNextGameState;
D_Timer_8017783C = 3;
D_360_8015F924 = 0;
gNextGameStateTimer = 3;
gAllRangeCheckpoint = 0;
gNextGameState = GSTATE_NONE;
gOverlayStage = 0;
gFillScreenColor = gBgColor = 0;
D_ctx_80177D20 = 0.0f;
if ((gCurrentLevel == LEVEL_VENOM_2) && (D_ctx_8017827C == 2)) {
if ((gCurrentLevel == LEVEL_VENOM_2) && (gLevelStage == 2)) {
gFillScreenColor = gBgColor = 0xFFFF; // 248, 248, 248
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255;
} else {
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0;
Audio_FadeOutAll(1);
}
D_ctx_80178340 = 255;
D_ctx_80178380[0] = 0;
gFillScreenAlpha = 255;
gPlayerFillScreenAlphas[0] = 0;
gRadioState = 0;
D_ctx_80178428 = 0.0f;
gBlurAlpha = 255;
gDrawMode = DRAWMODE_0;
gDrawMode = DRAW_NONE;
Audio_ClearVoice();
Audio_SetBaseSfxReverb(0);
}
@ -241,15 +241,15 @@ void func_game_800A1FB0(Gfx** arg0, u8 arg1, u8 arg2) {
gSPViewport((*arg0)++, gViewport++);
}
void func_game_800A24DC(s32 arg0) {
void Game_Draw(s32 playerNum) {
switch (gDrawMode) {
case DRAWMODE_0:
case DRAW_NONE:
break;
case DRAWMODE_1:
case DRAW_TITLE:
func_bg_8003DAF0();
OvlMenu_CallFunction(104, NULL);
break;
case DRAWMODE_2:
case DRAW_OPTION:
func_bg_8003DAF0();
OvlMenu_CallFunction(108, NULL);
break;
@ -257,24 +257,24 @@ void func_game_800A24DC(s32 arg0) {
func_bg_8003DAF0();
OvlMenu_CallFunction(106, NULL);
break;
case DRAWMODE_4:
gPlayerNum = arg0;
func_display_80057D00();
case DRAW_PLAY:
gPlayerNum = playerNum;
Play_Draw();
break;
case DRAWMODE_5:
case DRAW_UNK_MAP:
func_bg_8003DAF0();
OvlMenu_CallFunction(110, NULL);
break;
case DRAWMODE_6:
case DRAW_UNK_VS:
func_versus_800C2190();
break;
case DRAWMODE_7:
gPlayerNum = arg0;
case DRAW_UNK_7:
gPlayerNum = playerNum;
func_800A3CA0();
break;
case DRAWMODE_8:
case DRAW_ENDING:
func_bg_8003DAF0();
gPlayerNum = arg0;
gPlayerNum = playerNum;
Ending_8018AAC4();
break;
}
@ -308,7 +308,7 @@ void func_game_800A25DC(void) {
gOverlaySetup = OVL_SETUP_GAME_OVER;
gOverlayStage = 0;
break;
case GSTATE_CREDITS:
case GSTATE_ENDING:
gOverlaySetup = OVL_SETUP_CREDITS;
break;
}
@ -328,18 +328,18 @@ void Game_Update(void) {
func_game_800A1C14(&gUnkDisp1);
func_game_800A25DC();
if (func_game_800A1B6C() != true) {
Lib_Perspective(&gUnkDisp1);
Lib_InitPerspective(&gUnkDisp1);
func_game_800A1FB0(&gUnkDisp1, gCamCount, 0);
if (D_Timer_8017783C != 0) {
D_Timer_8017783C--;
if (gNextGameStateTimer != 0) {
gNextGameStateTimer--;
}
switch (gGameState) {
case GSTATE_BOOT:
D_Timer_8017783C = 2;
gNextGameStateTimer = 2;
gGameState++;
break;
case GSTATE_BOOT_WAIT:
if (D_Timer_8017783C == 0) {
if (gNextGameStateTimer == 0) {
gGameState++;
}
break;
@ -384,10 +384,10 @@ void Game_Update(void) {
gCamCount = 1;
gLifeCount[0] = 2;
D_ctx_80177D20 = 0.0f;
D_hud_8016170C = gCsFrameCount = D_ctx_80177830 = D_ctx_80177838 = D_ctx_80177840 = D_versus_80178754 =
gVersusMode = D_ctx_80177AE0 = D_ctx_80178410 = D_ctx_80177B40 = D_ctx_80177854 =
gOptionMenuStatus = gDrawMode = gShowBossHealth = D_game_80161A2C = gBgColor = D_ctx_80178340 =
0;
D_hud_8016170C = gCsFrameCount = D_ctx_80177830 = gLevelStatusScreenTimer = gLevelClearScreenTimer =
D_versus_80178754 = gVersusMode = D_ctx_80177AE0 = D_ctx_80178410 = D_ctx_80177B40 = gPlayState =
gOptionMenuStatus = gDrawMode = gShowBossHealth = D_game_80161A2C = gBgColor =
gFillScreenAlpha = 0;
gNextGameState = D_ctx_80177C94 = D_ctx_80177CAC = D_ctx_80177CB4 = D_ctx_80177CBC = D_ctx_80177CC4 =
D_ctx_80177C9C = D_ctx_80177CA4 = D_play_80161A5C = D_game_80161A34 = 0;
for (i = 0; i < 4; i++) {
@ -400,8 +400,8 @@ void Game_Update(void) {
D_ctx_80177858[i] = 3;
D_ctx_80177870[i] = 0;
D_game_800D2860[i] = true;
D_ctx_80178380[i] = 0;
gShowCrosshairs[i] = true;
gPlayerFillScreenAlphas[i] = 0;
}
gVersusStage = 0;
D_ctx_801778A4 = 3;
@ -456,31 +456,31 @@ void Game_Update(void) {
func_versus_800C20B0();
break;
case GSTATE_PLAY:
func_play_800B86CC();
Play_Main();
break;
case GSTATE_GAME_OVER:
OvlMenu_CallFunction(109, NULL);
break;
case GSTATE_CREDITS:
gDrawMode = DRAWMODE_8;
case GSTATE_ENDING:
gDrawMode = DRAW_ENDING;
Ending_8018A96C();
break;
default:
break;
}
func_game_800A24DC(0);
Game_Draw(0);
if (gCamCount == 2) {
func_game_800A1FB0(&gMasterDisp, gCamCount, 1);
func_game_800A24DC(1);
Game_Draw(1);
gDPPipeSync(gMasterDisp++);
gDPSetScissor(gMasterDisp++, G_SC_NON_INTERLACE, 8, 8, SCREEN_WIDTH - 8, SCREEN_HEIGHT - 8);
} else if ((gCamCount == 4) && (gDrawMode != DRAWMODE_0)) {
} else if ((gCamCount == 4) && (gDrawMode != DRAW_NONE)) {
func_game_800A1FB0(&gMasterDisp, gCamCount, 3);
func_game_800A24DC(3);
Game_Draw(3);
func_game_800A1FB0(&gMasterDisp, gCamCount, 2);
func_game_800A24DC(2);
Game_Draw(2);
func_game_800A1FB0(&gMasterDisp, gCamCount, 1);
func_game_800A24DC(1);
Game_Draw(1);
gDPPipeSync(gMasterDisp++);
gDPSetScissor(gMasterDisp++, G_SC_NON_INTERLACE, 8, 8, SCREEN_WIDTH - 8, SCREEN_HEIGHT - 8);
gDPSetColorDither(gMasterDisp++, G_CD_NOISE);
@ -504,9 +504,9 @@ void Game_Update(void) {
}
spBB = 0;
if (gCamCount == 1) {
Graphics_FillRectangle(&gMasterDisp, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1, D_ctx_80178390[0],
D_ctx_801783A0[0], D_ctx_801783B0[0], D_ctx_80178380[0]);
if ((gDrawMode == DRAWMODE_4) || (gDrawMode == DRAWMODE_8)) {
Graphics_FillRectangle(&gMasterDisp, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1, gPlayerFillScreenReds[0],
gPlayerFillScreenGreens[0], gPlayerFillScreenBlues[0], gPlayerFillScreenAlphas[0]);
if ((gDrawMode == DRAW_PLAY) || (gDrawMode == DRAW_ENDING)) {
func_radio_800BB5D0();
if (D_game_80161A2C != 0) {
func_hud_8008FA84();
@ -519,26 +519,26 @@ void Game_Update(void) {
if (gPlayer[i].timer_224 != 0) {
Graphics_FillRectangle(&gMasterDisp, sVsCameraULx[i], sVsCameraULy[i], sVsCameraLRx[i],
sVsCameraLRy[i], D_ctx_80178348, D_ctx_80178350, D_ctx_80178354,
D_ctx_80178340);
sVsCameraLRy[i], gFillScreenRed, gFillScreenGreen, gFillScreenBlue,
gFillScreenAlpha);
spBB = 1;
} else {
Graphics_FillRectangle(&gMasterDisp, sVsCameraULx[i], sVsCameraULy[i], sVsCameraLRx[i],
sVsCameraLRy[i], D_ctx_80178390[i], D_ctx_801783A0[i], D_ctx_801783B0[i],
D_ctx_80178380[i]);
sVsCameraLRy[i], gPlayerFillScreenReds[i], gPlayerFillScreenGreens[i],
gPlayerFillScreenBlues[i], gPlayerFillScreenAlphas[i]);
}
}
}
func_bg_80040CDC();
func_hud_8008865C();
func_360_8002E548();
AllRange_UpdateCountdown();
if ((gGameState == GSTATE_PLAY) && gVersusMode) {
func_versus_800C1ED4();
}
func_fade_80084688(0, D_ctx_80177C50);
if (spBB == 0) {
Graphics_FillRectangle(&gMasterDisp, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1, D_ctx_80178348,
D_ctx_80178350, D_ctx_80178354, D_ctx_80178340);
Graphics_FillRectangle(&gMasterDisp, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1, gFillScreenRed,
gFillScreenGreen, gFillScreenBlue, gFillScreenAlpha);
}
func_80016A50();
}

View File

@ -1,5 +1,5 @@
#include "sf64math.h"
#include "prevent_bss_reordering.h"
typedef struct {
/* 0x00 */ u8* unk_00;
/* 0x04 */ s32 width;
@ -464,7 +464,8 @@ void func_hud_80086110(f32 arg0, f32 arg1, s32 arg2) {
func_hud_800856C0((8.0f * temp) + arg0, arg1 + 2.0f, temp, 1.0f, arg2 / 255.0f);
}
if ((arg2 <= 0) && (arg2 != -2) && ((D_ctx_80177854 == 100) || (D_ctx_80177830 == 1) || (D_ctx_80177838 != 0))) {
if ((arg2 <= 0) && (arg2 != -2) &&
((gPlayState == PLAY_PAUSE) || (D_ctx_80177830 == 1) || (gLevelStatusScreenTimer != 0))) {
RCP_SetupDL(&gMasterDisp, 0x4C);
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255);
if ((arg2 == 0) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7)) {
@ -669,7 +670,7 @@ void func_hud_80086664(f32 x, f32 y) {
y2 + i, 1.0f, 1.0f);
}
if ((D_ctx_80177CA0 == 0) && (D_360_8015F924 == 0) && (gCurrentLevel != LEVEL_VENOM_ANDROSS) &&
if ((D_ctx_80177CA0 == 0) && (gAllRangeCheckpoint == 0) && (gCurrentLevel != LEVEL_VENOM_ANDROSS) &&
(gCurrentLevel != LEVEL_TRAINING)) {
func_hud_80087788();
func_hud_80084B94(0);
@ -723,11 +724,11 @@ void func_hud_80086CC8(void) {
f32 sp18;
f32 temp;
if ((D_ctx_80177854 != 100) && (D_ctx_80177838 != 0)) {
D_ctx_80177838 -= 1;
if ((gPlayState != PLAY_PAUSE) && (gLevelStatusScreenTimer != 0)) {
gLevelStatusScreenTimer -= 1;
}
if (D_ctx_80177838 == 1) {
if (gLevelStatusScreenTimer == 1) {
D_80161718 = 30;
D_8016171C = 0;
}
@ -735,7 +736,7 @@ void func_hud_80086CC8(void) {
temp = 108.0f;
sp18 = 81.0f;
if (D_ctx_80177838 != 0) {
if (gLevelStatusScreenTimer != 0) {
func_hud_80086C08(temp - 4.5f - 32.0f, sp18 - 24.0f - 4.0f, 7.4f, 3.9f);
if (gCurrentLevel != LEVEL_TRAINING) {
@ -756,11 +757,11 @@ void func_hud_80086DCC(void) {
f32 x;
f32 y;
if ((D_ctx_80177854 != 100) && (D_ctx_80177840)) {
D_ctx_80177840--;
if ((gPlayState != PLAY_PAUSE) && (gLevelClearScreenTimer)) {
gLevelClearScreenTimer--;
}
boolTemp = D_ctx_80177930;
boolTemp = gNextPlanetPath;
if ((gCurrentLevel == LEVEL_TITANIA) || (gCurrentLevel == LEVEL_BOLSE) || (gCurrentLevel == LEVEL_VENOM_1) ||
(gCurrentLevel == LEVEL_VENOM_2) || (gCurrentLevel == LEVEL_AREA_6) || (gCurrentLevel == LEVEL_AQUAS) ||
@ -771,55 +772,57 @@ void func_hud_80086DCC(void) {
temp = 0;
if (gCurrentLevel == LEVEL_AQUAS) {
if (D_ctx_80177840 <= 100) {
if (gLevelClearScreenTimer <= 100) {
temp = 5;
}
if (D_ctx_80177840 <= 96) {
if (gLevelClearScreenTimer <= 96) {
temp = 5;
}
if (D_ctx_80177840 <= 92) {
if (gLevelClearScreenTimer <= 92) {
temp = 4;
}
if (D_ctx_80177840 <= 87) {
if (gLevelClearScreenTimer <= 87) {
temp = 3;
}
if (D_ctx_80177840 <= 82) {
if (gLevelClearScreenTimer <= 82) {
temp = 2;
}
if (D_ctx_80177840 <= 77) {
if (gLevelClearScreenTimer <= 77) {
temp = 1;
}
if (D_ctx_80177840 == 0) {
if (gLevelClearScreenTimer == 0) {
temp = 0;
}
if ((D_ctx_80177840 == 92) || (D_ctx_80177840 == 87) || (D_ctx_80177840 == 82) || (D_ctx_80177840 == 77)) {
if ((gLevelClearScreenTimer == 92) || (gLevelClearScreenTimer == 87) || (gLevelClearScreenTimer == 82) ||
(gLevelClearScreenTimer == 77)) {
AUDIO_PLAY_SFX(0x49008031U, gDefaultSfxSource, 4U);
}
} else {
if (D_ctx_80177840 <= 100) {
if (gLevelClearScreenTimer <= 100) {
temp = 5;
}
if (D_ctx_80177840 <= 90) {
if (gLevelClearScreenTimer <= 90) {
temp = 5;
}
if (D_ctx_80177840 <= 80) {
if (gLevelClearScreenTimer <= 80) {
temp = 4;
}
if (D_ctx_80177840 <= 72) {
if (gLevelClearScreenTimer <= 72) {
temp = 3;
}
if (D_ctx_80177840 <= 64) {
if (gLevelClearScreenTimer <= 64) {
temp = 2;
}
if (D_ctx_80177840 <= 56) {
if (gLevelClearScreenTimer <= 56) {
temp = 1;
}
if (D_ctx_80177840 == 0) {
if (gLevelClearScreenTimer == 0) {
temp = 0;
}
if ((D_ctx_80177840 == 80) || (D_ctx_80177840 == 72) || (D_ctx_80177840 == 64) || (D_ctx_80177840 == 56)) {
if ((gLevelClearScreenTimer == 80) || (gLevelClearScreenTimer == 72) || (gLevelClearScreenTimer == 64) ||
(gLevelClearScreenTimer == 56)) {
if (!boolTemp) {
AUDIO_PLAY_SFX(0x49008034U, gDefaultSfxSource, 4U);
} else {
@ -1054,7 +1057,7 @@ void func_hud_80087B5C(void) {
D_801617C0[0] = 0;
}
if ((D_ctx_80177854 != 100) && (D_ctx_80177830 == 1) && (!D_801617E8[0])) {
if ((gPlayState != PLAY_PAUSE) && (D_ctx_80177830 == 1) && (!D_801617E8[0])) {
switch (D_801617C0[0]) {
case 0:
D_801617C0[5] = gHitCount;
@ -1077,9 +1080,9 @@ void func_hud_80087B5C(void) {
break;
case 1:
if (((gTeamShields[1] > 0) && (gTeamShields[1] < 255)) &&
((gTeamShields[2] > 0) && (gTeamShields[2] < 255)) &&
((gTeamShields[3] > 0) && (gTeamShields[3] < 255))) {
if (((gTeamShields[TEAM_ID_FALCO] > 0) && (gTeamShields[TEAM_ID_FALCO] < 255)) &&
((gTeamShields[TEAM_ID_SLIPPY] > 0) && (gTeamShields[TEAM_ID_SLIPPY] < 255)) &&
((gTeamShields[TEAM_ID_PEPPY] > 0) && (gTeamShields[TEAM_ID_PEPPY] < 255))) {
AUDIO_PLAY_SFX(0x41007012U, gDefaultSfxSource, 4U);
}
D_801617C0[0] = 2;
@ -1105,7 +1108,7 @@ void func_hud_80087B5C(void) {
}
if (D_801617C0[4] > 0) {
for (i = 1, temp = 0; i < 4; i++) {
for (i = TEAM_ID_FALCO, temp = 0; i <= TEAM_ID_PEPPY; i++) {
if (gTeamShields[i] > 0) {
if (D_801617C0[4] >= 4) {
gTeamShields[i] += 4;
@ -1150,7 +1153,7 @@ void func_hud_80087B5C(void) {
D_801617E8[0] = 10;
D_801617C0[0]++;
} else {
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
AUDIO_PLAY_SFX(0x4900C024U, gDefaultSfxSource, 4U);
D_801617C0[3]++;
}
@ -1237,7 +1240,7 @@ void func_hud_80087B5C(void) {
func_hud_800869A0(x4 + 4.0f, y4 + 3.0f, D_801617C0[2], 1.00f, 1, 9999);
if (!(D_801617C0[6] & 1)) {
if ((D_801617C0[6] % 2) == 0) {
func_hud_80087530(232.0f, 90.0f, D_801617C0[3]);
}
@ -1397,7 +1400,7 @@ void func_hud_80088970(void) {
D_80161838[0]++;
if (D_ctx_80177854 != 100) {
if (gPlayState != PLAY_PAUSE) {
D_80161838[0] = 0;
D_80161838[1] = 0;
// clang-format off
@ -1407,12 +1410,12 @@ void func_hud_80088970(void) {
}
if (D_80161810[0] >= 2) {
D_ctx_801779BC = 0;
gPauseEnabled = 0;
}
player = &gPlayer[gPlayerNum];
if ((D_ctx_80177854 == 100) && !D_ctx_80177838 && !gVersusMode) {
if ((gPlayState == PLAY_PAUSE) && !gLevelStatusScreenTimer && !gVersusMode) {
switch (D_80161810[0]) {
case 0:
D_80161838[0] = 0;
@ -1445,12 +1448,12 @@ void func_hud_80088970(void) {
case 2:
gPlayer[0].state_1C8 = PLAYERSTATE_1C8_0;
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0;
D_ctx_80178358 = 255;
D_ctx_8017835C = 32;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0;
gFillScreenAlphaTarget = 255;
gFillScreenAlphaStep = 32;
D_ctx_80178340 += 32;
if (D_ctx_80178340 < 255) {
gFillScreenAlpha += 32;
if (gFillScreenAlpha < 255) {
break;
}
@ -1462,7 +1465,7 @@ void func_hud_80088970(void) {
func_play_800A6148();
gShowBossHealth = false;
D_ctx_80178340 = 255;
gFillScreenAlpha = 255;
if (gLifeCount[gPlayerNum] == 0) {
D_80161810[0] = 3;
@ -1476,22 +1479,22 @@ void func_hud_80088970(void) {
case 3:
Graphics_FillRectangle(&gMasterDisp, 0, 0, 319, 239, 0, 0, 0, 255);
D_ctx_80178358 = 0;
gFillScreenAlphaTarget = 0;
if ((D_ctx_80178340 -= 32) <= 0) {
D_ctx_80178340 = 0;
if ((gFillScreenAlpha -= 32) <= 0) {
gFillScreenAlpha = 0;
}
if (gCurrentLevel == LEVEL_TRAINING) {
gGameState = GSTATE_MENU;
D_Timer_8017783C = 2;
gNextGameStateTimer = 2;
gOptionMenuStatus = OPTION_WAIT;
gDrawMode = DRAWMODE_0;
gDrawMode = DRAW_NONE;
D_game_80161A34 = 7;
D_ctx_80178410 = 0;
break;
} else {
if (D_ctx_80178340 == 0) {
if (gFillScreenAlpha == 0) {
if (gLevelType == LEVELTYPE_PLANET) {
if (D_80161838[1] == 0) {
func_8001D520();
@ -1528,13 +1531,13 @@ void func_hud_80088970(void) {
break;
}
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0;
D_ctx_80178358 = 255;
D_ctx_8017835C = 32;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0;
gFillScreenAlphaTarget = 255;
gFillScreenAlphaStep = 32;
D_ctx_80178340 += 32;
if (D_ctx_80178340 > 255) {
D_ctx_80178340 = 255;
gFillScreenAlpha += 32;
if (gFillScreenAlpha > 255) {
gFillScreenAlpha = 255;
};
if (D_80161838[0] < 160) {
break;
@ -1544,21 +1547,21 @@ void func_hud_80088970(void) {
Graphics_FillRectangle(&gMasterDisp, 0, 0, 319, 239, 0, 0, 0, 255);
for (i = 0; i < 6; i++) {
if (D_ctx_80177C38[i] == -1) {
if (gPrevPlanetTeamShields[i] == -1) {
gSavedTeamShields[i] = 0;
} else {
gSavedTeamShields[i] = D_ctx_80177C38[i];
gSavedTeamShields[i] = gPrevPlanetTeamShields[i];
}
D_ctx_80177CD0[i] = D_ctx_80177CF0[i];
gStarWolfTeamAlive[i] = gSavedStarWolfTeamAlive[i];
}
if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (D_360_8015F924 != 0)) {
if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (gAllRangeCheckpoint != 0)) {
D_ctx_80177CA4 = D_play_80161A5C;
}
D_ctx_80177CB0 = 0.0f;
D_360_8015F924 = 0;
D_play_80161A50 = 0;
gAllRangeCheckpoint = 0;
gSavedZoSearchlightStatus = false;
gSavedHitCount = D_ctx_80177CA0 = 0;
@ -1566,22 +1569,22 @@ void func_hud_80088970(void) {
gPlayer[0].state_1C8 = PLAYERSTATE_1C8_6;
gScreenFlashTimer = 0;
gPlayer[0].timer_1F8 = 0;
D_ctx_80178340 = D_ctx_80178358 = 255;
gFillScreenAlpha = gFillScreenAlphaTarget = 255;
D_ctx_8017837C = 7;
gDrawMode = DRAWMODE_4;
D_ctx_80177854 = 2;
gDrawMode = DRAW_PLAY;
gPlayState = PLAY_UPDATE;
break;
case 10:
func_8001D638(0);
gDrawMode = DRAWMODE_4;
D_ctx_80177854 = 2;
gDrawMode = DRAW_PLAY;
gPlayState = PLAY_UPDATE;
break;
}
}
if ((D_80161810[3] == 0) && (D_ctx_80177854 == 100) && !gVersusMode && (D_ctx_80177838 == 0)) {
if ((D_80161810[3] == 0) && (gPlayState == PLAY_PAUSE) && !gVersusMode && (gLevelStatusScreenTimer == 0)) {
switch (D_80161810[0]) {
case 0:
case 1:
@ -1970,7 +1973,7 @@ void func_hud_8008A240(void) {
continue;
}
if (gGameFrameCount & 0x3F) {
if ((gGameFrameCount % 64) != 0) {
gRadarMarks[i].unk_02 = 999;
}
}
@ -2011,7 +2014,7 @@ s32 func_hud_8008A4DC(void) {
return 0;
}
if (D_ctx_80177838) {
if (gLevelStatusScreenTimer) {
D_800D1E10 = 60.0f;
} else {
Math_SmoothStepToF(&D_800D1E10, 0.0f, 0.3f, 10.0f, 0.1f);
@ -2243,31 +2246,31 @@ void func_hud_8008AD94(void) {
void func_hud_8008B044(void) {
switch (D_80161798) {
case 0:
if (D_enmy2_80161690 == 0) {
if (gCallTimer == 0) {
return;
}
AUDIO_PLAY_SFX(0x49002018, gDefaultSfxSource, 4);
if (D_enmy2_800CFF90 != 0) {
if (gCallVoiceParam != 0) {
func_8001AF40(1);
}
D_80161794 = 0;
D_80161798 = 1;
case 1:
if (D_enmy2_80161690 != 0) {
if (gCallTimer != 0) {
D_80161790++;
if (D_80161790 >= 7) {
if (D_80161794 & 1) {
if ((D_80161794 % 2) != 0) {
AUDIO_PLAY_SFX(0x49002018, gDefaultSfxSource, 4);
}
D_80161790 = 0;
D_80161794++;
}
D_enmy2_80161690--;
gCallTimer--;
} else {
D_enmy2_800CFF90 = 0;
gCallVoiceParam = 0;
D_80161790 = 0;
D_80161798 = 0;
Audio_KillSfxById(0x49002018);
@ -2299,10 +2302,10 @@ void func_hud_8008B1B0(void) {
}
void func_hud_8008B2A4(void) {
if (D_ctx_80177854 != 100) {
if (gPlayState != PLAY_PAUSE) {
func_hud_8008B044();
}
if (D_enmy2_80161690 != 0) {
if (gCallTimer != 0) {
func_hud_8008B1B0();
}
}
@ -2567,7 +2570,7 @@ void func_hud_8008BAE4(void) {
}
void func_hud_8008BC80(void) {
if (D_ctx_80177854 != 100) {
if (gPlayState != PLAY_PAUSE) {
func_hud_8008B9E8();
func_hud_8008BAE4();
}
@ -2690,22 +2693,22 @@ void func_hud_8008C104(u16* texture, u16* arg1) {
Texture_Mottle(dst, src, 2);
}
void func_hud_8008C390(f32 arg0, f32 arg1, f32 arg2, s32 arg3) {
void func_hud_8008C390(f32 xPos, f32 yPos, f32 scale, s32 number) {
void* D_800D1EC0[] = {
D_5000000, D_5000080, D_5000100, D_5000180, D_5000200, D_5000280, D_5000300, D_5000380, D_5000400, D_5000480,
};
s32 i;
for (i = 10; i != 1; i /= 10) {
if ((arg0 > 0.0f) && (arg1 > 0.0f)) {
TextureRect_8bIA(&gMasterDisp, D_800D1EC0[arg3 / i], 16, 8, arg0, arg1, arg2, arg2);
if ((xPos > 0.0f) && (yPos > 0.0f)) {
TextureRect_8bIA(&gMasterDisp, D_800D1EC0[number / i], 16, 8, xPos, yPos, scale, scale);
}
arg0 += 9.0f * arg2;
arg3 %= i;
xPos += 9.0f * scale;
number %= i;
}
if ((arg0 > 0.0f) && (arg1 > 0.0f)) {
TextureRect_8bIA(&gMasterDisp, D_800D1EC0[arg3 / i], 16, 8, arg0, arg1, arg2, arg2);
if ((xPos > 0.0f) && (yPos > 0.0f)) {
TextureRect_8bIA(&gMasterDisp, D_800D1EC0[number / i], 16, 8, xPos, yPos, scale, scale);
}
}
@ -2738,7 +2741,7 @@ void func_hud_8008C6F4(s32 idx, s32 arg1) {
Matrix_Push(&gGfxMatrix);
if (gPlayer[0].unk_238) {
if (gPlayer[0].cockpitView) {
Matrix_RotateZ(gGfxMatrix, M_DTOR * gPlayer[0].unk_034, 1);
}
@ -2766,12 +2769,12 @@ void func_hud_8008C6F4(s32 idx, s32 arg1) {
void func_hud_8008CA44(void) {
s32 D_800D2048[] = {
0x80, 0x40, 0x20, 0x10, 0x0A, 0x09, 0x06, 0x05, 0x08, 0x04, 0x02, 0x01,
0x80, 0x40, 0x20, 0x10, 8 | 2, 8 | 1, 4 | 2, 4 | 1, 8, 4, 2, 1,
};
s32 i;
s32 j;
if ((gPlayer[gPlayerNum].flags_228 != 0) && (gPlayer[gPlayerNum].timer_210 == 0) && (D_ctx_80177854 != 100)) {
if ((gPlayer[gPlayerNum].flags_228 != 0) && (gPlayer[gPlayerNum].timer_210 == 0) && (gPlayState != PLAY_PAUSE)) {
j = gPlayer[gPlayerNum].flags_228;
for (i = 0; i < 12; i++) {
@ -3066,7 +3069,7 @@ void func_hud_8008DE68(void) {
f32 temp7;
f32 var_fv0;
if ((gShowBossHealth == 1) && (gTeamShields[2] > 0)) {
if ((gShowBossHealth == 1) && (gTeamShields[TEAM_ID_SLIPPY] > 0)) {
if ((gBossHealthBar >= 0) && (D_801616BC == -1.0f)) {
AUDIO_PLAY_SFX(0x4900C028, gDefaultSfxSource, 4);
D_801616BC = 255.0f;
@ -3129,63 +3132,63 @@ void func_hud_8008DE68(void) {
}
}
void func_hud_8008E2C8(f32 arg0, f32 arg1, s32* arg2, f32 arg3) {
void func_hud_8008E2C8(f32 xPos, f32 yPos, s32* countdown, f32 scale) {
f32 var_fs0 = 0.0f;
s32 var_s2 = 0;
s32 i;
arg0 -= (arg3 - 1.0f) * 34.0f;
arg1 -= (arg3 - 1.0f) * 4.0f;
xPos -= (scale - 1.0f) * 34.0f;
yPos -= (scale - 1.0f) * 4.0f;
for (i = 0; i != 5; i++) {
if ((i == 0) || (i == 2)) {
var_s2 = arg2[i / 2] % 60;
var_s2 = countdown[i / 2] % 60;
}
if (i == 4) {
var_s2 = arg2[i / 2] % 100;
var_s2 = countdown[i / 2] % 100;
}
if (i & 1) {
if ((i % 2) != 0) {
RCP_SetupDL_78();
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255);
TextureRect_4bCI(&gMasterDisp, D_1011E80, D_1011EC0, 16, 8, (var_fs0 * arg3) + arg0, arg1, arg3, arg3);
TextureRect_4bCI(&gMasterDisp, D_1011E80, D_1011EC0, 16, 8, (var_fs0 * scale) + xPos, yPos, scale, scale);
} else {
RCP_SetupDL_76();
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255);
func_hud_8008C390((var_fs0 * arg3) + arg0, arg1, arg3, var_s2);
func_hud_8008C390((var_fs0 * scale) + xPos, yPos, scale, var_s2);
var_fs0 += 9.0f;
}
var_fs0 += 9.0f;
}
}
void func_hud_8008E51C(s32* arg0, f32 arg1) {
void func_hud_8008E51C(s32* countdown, f32 scale) {
//! FAKE:
if (1) {}
if (D_ctx_80177854 != 100) {
arg0[2] -= 3;
if (arg0[2] >= 3) {
if (gPlayState != PLAY_PAUSE) {
countdown[2] -= 3;
if (countdown[2] >= 3) {
} else {
arg0[2] = 99;
arg0[1]--;
if (arg0[1] >= 0) {
countdown[2] = 99;
countdown[1]--;
if (countdown[1] >= 0) {
} else {
arg0[1] = 59;
arg0[0]--;
if (arg0[0] >= 0) {
countdown[1] = 59;
countdown[0]--;
if (countdown[0] >= 0) {
} else {
arg0[0] = 0;
arg0[1] = 0;
arg0[2] = 0;
countdown[0] = 0;
countdown[1] = 0;
countdown[2] = 0;
}
}
}
}
if (D_ctx_80177854 != 100) {
func_hud_8008E2C8(176.0f, 22.0f, arg0, arg1);
if (gPlayState != PLAY_PAUSE) {
func_hud_8008E2C8(176.0f, 22.0f, countdown, scale);
}
}
@ -3278,7 +3281,7 @@ void func_hud_8008E620(f32 arg0, f32 arg1) {
gMedalStatus = ret;
}
if (gMedalFlashTimer & 1) {
if ((gMedalFlashTimer % 2) != 0) {
r = 255;
g = 255;
b = 255;
@ -3504,7 +3507,7 @@ void func_hud_8008F94C(void) {
}
void func_hud_8008F96C(void) {
if (D_ctx_80177854 != 100) {
if (gPlayState != PLAY_PAUSE) {
func_hud_8008E5E8();
}
@ -3627,7 +3630,7 @@ void func_hud_8008FA84(void) {
}
}
if ((D_hud_80161704 != 0) && (D_ctx_80177854 != 100)) {
if ((D_hud_80161704 != 0) && (gPlayState != PLAY_PAUSE)) {
D_hud_80161708 += 16;
if (D_hud_80161708 >= D_hud_80161704) {
D_hud_80161708 = D_hud_80161704;
@ -3693,7 +3696,7 @@ void func_hud_8008FFF0(Boss* boss, s32 arg1) {
boss->obj.pos.z + D_800D21C8[i].z, 0.0f, 0.0f, 0.0f, 0.3f * temp, 20);
}
if (!(gGameFrameCount & 7)) {
if (((gGameFrameCount % 8) == 0)) {
func_effect_8007BFFC(boss->obj.pos.x + D_800D21C8[i].x, boss->obj.pos.y + D_800D21C8[i].y,
boss->obj.pos.z + D_800D21C8[i].z, 0.0f, 0.0f, 0.0f, 7.0f * temp, 10);
}
@ -3828,7 +3831,7 @@ void func_hud_800907C4(Boss* boss) {
}
break;
}
func_hud_8008FFF0(boss, D_360_8015F928);
func_hud_8008FFF0(boss, gAllRangeEventTimer);
}
bool func_hud_8009092C(Actor* actor) {
@ -4160,11 +4163,7 @@ bool func_hud_800915FC(Actor* actor) {
Math_Vec3fFromAngles(&vec, 0.0f, actor->unk_0F4.y, 650.0f + actor->fwork[9] * 10.0f);
while (true) {
if (gLevelMode != LEVELMODE_ALL_RANGE) {
break;
}
if (gLevelMode == LEVELMODE_ALL_RANGE) {
for (i = 0, obj58 = &gObjects58[0]; i < 200; i++, obj58++) {
if (obj58->obj.status != OBJ_ACTIVE) {
continue;
@ -4182,7 +4181,6 @@ bool func_hud_800915FC(Actor* actor) {
ret = true;
}
}
break;
}
if (ret) {
@ -4433,15 +4431,15 @@ void func_hud_800922F4(Actor* actor) {
s32 temp;
if ((gTeamShields[actor->aiType] < 64) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_7)) {
temp = 7;
temp = 8 - 1;
if (gTeamShields[actor->aiType] > 16) {
temp = 15;
temp = 16 - 1;
}
if (gTeamShields[actor->aiType] > 32) {
temp = 31;
temp = 32 - 1;
}
if (gTeamShields[actor->aiType] > 48) {
temp = 63;
temp = 64 - 1;
}
if (!(gGameFrameCount & temp)) {
@ -4658,18 +4656,18 @@ bool func_hud_800927A0(Actor* actor) {
}
void ActorTeamBoss_Init(Actor* actor) {
s32 D_800D22A8[] = { 1, 2, 3 };
s32 D_800D22A8[] = { TEAM_ID_FALCO, TEAM_ID_SLIPPY, TEAM_ID_PEPPY };
if (gCurrentLevel != LEVEL_TITANIA) {
actor->fwork[1] = 40.0f;
actor->fwork[3] = 1.2f;
actor->aiType = (D_hud_800D1970 & 3) + 1;
actor->aiType = (D_hud_800D1970 % 4U) + 1;
D_hud_800D1970++;
} else {
actor->state = 7;
actor->aiType = AI360_SLIPPY;
actor->iwork[5] = 0;
gTeamShields[2] = 255;
gTeamShields[TEAM_ID_SLIPPY] = 255;
}
actor->iwork[12] = D_800D22A8[actor->aiType - 1];
@ -4681,7 +4679,7 @@ void ActorTeamBoss_Init(Actor* actor) {
AUDIO_PLAY_SFX(0x3100000CU, actor->sfxSource, 4U);
if (((D_hud_800D1970 & 3) == AI360_SLIPPY) && (gCurrentLevel == LEVEL_SECTOR_X)) {
if (((s32) (D_hud_800D1970 % 4U) == AI360_SLIPPY) && (gCurrentLevel == LEVEL_SECTOR_X)) {
Object_Kill(&actor->obj, actor->sfxSource);
}
@ -4690,23 +4688,23 @@ void ActorTeamBoss_Init(Actor* actor) {
}
}
void ActorTeamBoss_Update(Actor* actor) {
void ActorTeamBoss_Update(ActorTeamBoss* this) {
f32 var_fv1;
actor->health = gTeamShields[actor->aiType];
this->health = gTeamShields[this->aiType];
switch (actor->unk_048) {
switch (this->unk_048) {
case 0:
func_hud_800914FC(actor);
func_hud_80091864(actor);
func_hud_80091B90(actor);
func_hud_80091DF4(actor);
func_hud_800914FC(this);
func_hud_80091864(this);
func_hud_80091B90(this);
func_hud_80091DF4(this);
if (actor->unk_0D0 != 0) {
func_hud_80091F00(actor);
if (this->unk_0D0 != 0) {
func_hud_80091F00(this);
}
if (actor->state == 3) {
if (this->state == 3) {
break;
}
@ -4728,44 +4726,44 @@ void ActorTeamBoss_Update(Actor* actor) {
break;
}
if ((actor->iwork[10] != 0) && (gLevelMode == LEVELMODE_ALL_RANGE) && (actor->iwork[9] == 0) &&
if ((this->iwork[10] != 0) && (gLevelMode == LEVELMODE_ALL_RANGE) && (this->iwork[9] == 0) &&
(gPlayer[0].state_1C8 != PLAYERSTATE_1C8_7)) {
actor->unk_048 = 2;
actor->unk_04A = 0;
this->unk_048 = 2;
this->unk_04A = 0;
}
if ((gLevelMode == LEVELMODE_ALL_RANGE) &&
(fabsf(actor->obj.pos.x > var_fv1) || fabsf(actor->obj.pos.z > var_fv1)) &&
(fabsf(this->obj.pos.x > var_fv1) || fabsf(this->obj.pos.z > var_fv1)) &&
(gPlayer[0].state_1C8 != PLAYERSTATE_1C8_7)) {
actor->unk_048 = 2;
actor->unk_04A = 1;
this->unk_048 = 2;
this->unk_04A = 1;
}
break;
case 1:
if (func_hud_800924E0(actor) != 0) {
actor->unk_048 = 0;
actor->iwork[9] = RAND_INT(30.0f) + 90;
if (func_hud_800924E0(this) != 0) {
this->unk_048 = 0;
this->iwork[9] = RAND_INT(30.0f) + 90;
}
break;
case 2:
if (func_hud_800927A0(actor) != 0) {
actor->unk_04A = 0;
actor->unk_048 = actor->unk_04A;
actor->iwork[9] = RAND_INT(30.0f) + 90;
if (func_hud_800927A0(this) != 0) {
this->unk_04A = 0;
this->unk_048 = this->unk_04A;
this->iwork[9] = RAND_INT(30.0f) + 90;
}
break;
}
func_hud_80091CF8(actor);
func_hud_800922F4(actor);
func_hud_80092244(actor);
func_hud_80091CF8(this);
func_hud_800922F4(this);
func_hud_80092244(this);
if (actor->iwork[9] != 0) {
actor->iwork[9]--;
if (this->iwork[9] != 0) {
this->iwork[9]--;
}
actor->iwork[10] = 0;
this->iwork[10] = 0;
}
void func_hud_80093164(Actor* actor) {
@ -4928,9 +4926,9 @@ void func_hud_800935E8(Player* player) {
player->unk_208 = 0;
player->unk_0D0 = 0.0f;
D_ctx_80178340 = 255;
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0;
D_ctx_80178358 = 0;
gFillScreenAlpha = 255;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0;
gFillScreenAlphaTarget = 0;
player->camEye.x = gCsCamEyeX = -3061.2f;
player->camEye.y = gCsCamEyeY = 1745.9f;
@ -5047,17 +5045,17 @@ void func_hud_800935E8(Player* player) {
if (gCsFrameCount >= 50) {
// clang-format off
if (D_ctx_80178340 == 255) { player->unk_1D0 = 2; }
if (gFillScreenAlpha == 255) { player->unk_1D0 = 2; }
// clang-format on
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255;
D_ctx_80178358 = 255;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255;
gFillScreenAlphaTarget = 255;
Math_SmoothStepToF(&D_ctx_80177A48[7], 16.0f, 0.04f, 0.05f, 0.0f);
D_ctx_8017835C = D_ctx_80177A48[7];
gFillScreenAlphaStep = D_ctx_80177A48[7];
}
break;
case 2:
D_ctx_80178380[0] = 0;
gPlayerFillScreenAlphas[0] = 0;
D_ctx_80177A10[0] = gLight1R;
D_ctx_80177A10[1] = gLight1G;
@ -5091,16 +5089,16 @@ void func_hud_800935E8(Player* player) {
player->pos.x = -50.0f;
player->pos.y = 1200.0f;
D_ctx_80178358 = 0;
gFillScreenAlphaTarget = 0;
Aquas_801BDF14();
AUDIO_PLAY_BGM(SEQ_ID_INTRO_45);
case 3:
D_ctx_8017835C = 16;
gFillScreenAlphaStep = 16;
if (player->timer_1F8 > 774) {
if (player->timer_1F8 >= 775) {
if (D_ctx_80177A48[4] >= 200.0f) {
Math_SmoothStepToF(&D_ctx_80177A48[4], -200.0f, 1.00f, 4.0f, 4.0f);
} else {
@ -5133,7 +5131,7 @@ void func_hud_800935E8(Player* player) {
D_ctx_80177A10[9] = 40;
}
if (player->timer_1F8 <= 774) {
if (player->timer_1F8 < 775) {
D_ctx_80177A48[0] = 0.0f;
temp2 = 0.0f;
@ -5189,13 +5187,13 @@ void func_hud_800935E8(Player* player) {
if (player->timer_1F8 < 736) {
player->unk_1D0 = 4;
D_ctx_80177AC8 = 1;
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255;
D_ctx_80178358 = 255;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255;
gFillScreenAlphaTarget = 255;
}
break;
case 4:
if (D_ctx_80178340 == 255) {
if (gFillScreenAlpha == 255) {
player->unk_1D0 = 5;
}
break;
@ -5226,7 +5224,7 @@ void func_hud_800935E8(Player* player) {
player->timer_1F8 = 1000;
D_ctx_80177AC8 = 0;
D_ctx_80178358 = 0;
gFillScreenAlphaTarget = 0;
Object_Kill(&actor->obj, actor->sfxSource);
@ -5259,7 +5257,7 @@ void func_hud_800935E8(Player* player) {
}
if (player->timer_1F8 <= 900) {
D_ctx_80177838 = 50;
gLevelStatusScreenTimer = 50;
player->state_1C8 = PLAYERSTATE_1C8_3;
player->unk_1D0 = 0;
@ -5615,9 +5613,9 @@ void func_hud_80095604(Player* player) {
case 1:
if (gCsFrameCount > 240) {
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255;
D_ctx_80178358 = 255;
D_ctx_8017835C = 16;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255;
gFillScreenAlphaTarget = 255;
gFillScreenAlphaStep = 16;
if (gCsFrameCount == 280) {
player->unk_1D0 = 10;
}
@ -5794,11 +5792,11 @@ void func_hud_80095604(Player* player) {
D_ctx_80177A48[0] = 1.0f;
case 11:
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255;
D_ctx_80178358 = 0;
D_ctx_8017835C = 8;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255;
gFillScreenAlphaTarget = 0;
gFillScreenAlphaStep = 8;
if (D_ctx_80178340 == 0) {
if (gFillScreenAlpha == 0) {
player->unk_1D0 = 12;
}
@ -5854,11 +5852,11 @@ void func_hud_80095604(Player* player) {
gCsCamEyeZ = dest.z;
if (gCsFrameCount >= 1360) {
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0;
D_ctx_80178358 = 255;
D_ctx_8017835C = 16;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0;
gFillScreenAlphaTarget = 255;
gFillScreenAlphaStep = 16;
if (D_ctx_80178340 == 255) {
if (gFillScreenAlpha == 255) {
D_play_800D3180[LEVEL_AQUAS] = Play_CheckMedalStatus(150) + 1;
player->state_1C8 = PLAYERSTATE_1C8_6;
player->timer_1F8 = 0;
@ -5887,7 +5885,7 @@ void func_hud_80095604(Player* player) {
break;
case 440:
D_ctx_80177840 = 100;
gLevelClearScreenTimer = 100;
break;
case 520:
@ -5895,31 +5893,31 @@ void func_hud_80095604(Player* player) {
break;
case 600:
shield = gTeamShields[3];
gTeamShields[3] = 1;
shield = gTeamShields[TEAM_ID_PEPPY];
gTeamShields[TEAM_ID_PEPPY] = 1;
Radio_PlayMessage(gMsg_ID_15210, RCID_PEPPY);
gTeamShields[3] = shield;
gTeamShields[TEAM_ID_PEPPY] = shield;
break;
case 680:
shield = gTeamShields[2];
gTeamShields[2] = 1;
shield = gTeamShields[TEAM_ID_SLIPPY];
gTeamShields[TEAM_ID_SLIPPY] = 1;
Radio_PlayMessage(gMsg_ID_15220, RCID_SLIPPY);
gTeamShields[2] = shield;
gTeamShields[TEAM_ID_SLIPPY] = shield;
break;
case 760:
shield = gTeamShields[1];
gTeamShields[1] = 1;
shield = gTeamShields[TEAM_ID_FALCO];
gTeamShields[TEAM_ID_FALCO] = 1;
Radio_PlayMessage(gMsg_ID_15230, RCID_FALCO);
gTeamShields[1] = shield;
gTeamShields[TEAM_ID_FALCO] = shield;
break;
case 840:
shield = gTeamShields[2];
gTeamShields[2] = 1;
shield = gTeamShields[TEAM_ID_SLIPPY];
gTeamShields[TEAM_ID_SLIPPY] = 1;
Radio_PlayMessage(gMsg_ID_15240, RCID_SLIPPY);
gTeamShields[2] = shield;
gTeamShields[TEAM_ID_SLIPPY] = shield;
break;
case 1000:
@ -5993,7 +5991,7 @@ void func_hud_80096A74(Player* player) {
D_ctx_80177A48[0] = 0.2f;
gCsFrameCount = 0;
player->unk_1D0 = 1;
D_ctx_80178340 = D_ctx_80178358 = 255;
gFillScreenAlpha = gFillScreenAlphaTarget = 255;
player->camEye.x = gCsCamEyeX = 0.0f;
player->camEye.y = gCsCamEyeY = player->pos.y + D_ctx_80177A48[1];
@ -6012,9 +6010,9 @@ void func_hud_80096A74(Player* player) {
break;
}
if ((gCsFrameCount >= 40) && (D_ctx_80178340 != 0)) {
D_ctx_80178358 = 0;
D_ctx_8017835C = 8;
if ((gCsFrameCount >= 40) && (gFillScreenAlpha != 0)) {
gFillScreenAlphaTarget = 0;
gFillScreenAlphaStep = 8;
}
if (gCsFrameCount < 140) {
@ -6082,7 +6080,7 @@ void func_hud_80096A74(Player* player) {
if (gCsFrameCount == 300) {
D_ctx_80177CE8 = 0;
D_ctx_80177838 = 50;
gLevelStatusScreenTimer = 50;
player->state_1C8 = PLAYERSTATE_1C8_3;
player->unk_0D0 = D_play_80161A54;
player->unk_1D0 = 0;

View File

@ -51,7 +51,7 @@ s32 Message_GetCharCount(u16* msgPtr) {
}
void Message_DisplayChar(Gfx** gfxPtr, u16 msgChar, s32 xpos, s32 ypos) {
gDPLoadTextureBlock_4b((*gfxPtr)++, gTextCharTextures[msgChar >> 2], G_IM_FMT_CI, 16, 13, msgChar & 3,
gDPLoadTextureBlock_4b((*gfxPtr)++, gTextCharTextures[msgChar >> 2], G_IM_FMT_CI, 16, 13, msgChar % 4U,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
G_TX_NOLOD);
gSPTextureRectangle((*gfxPtr)++, xpos << 2, ypos << 2, (xpos + 13) << 2, (ypos + 13) << 2, G_TX_RENDERTILE, 64, 0,

File diff suppressed because it is too large Load Diff

View File

@ -4,6 +4,7 @@
* Description: Starfox Radio Handler
*/
#include "prevent_bss_reordering.h"
#include "global.h"
#include "assets/ast_allies.h"
#include "assets/ast_corneria.h"
@ -76,13 +77,13 @@ void Radio_PlayMessage(u16* msg, RadioCharacterId character) {
if (gGameState == GSTATE_PLAY) {
if ((character == RCID_FALCO) || (character == RCID_SLIPPY) || (character == RCID_PEPPY)) {
if (character == RCID_FALCO) {
var_v1 = 1;
var_v1 = TEAM_ID_FALCO;
}
if (character == RCID_SLIPPY) {
var_v1 = 2;
var_v1 = TEAM_ID_SLIPPY;
}
if (character == RCID_PEPPY) {
var_v1 = 3;
var_v1 = TEAM_ID_PEPPY;
}
if ((gTeamShields[var_v1] <= 0) && (gTeamShields[var_v1] != -2)) {
return;
@ -123,7 +124,7 @@ void Radio_PlayMessage(u16* msg, RadioCharacterId character) {
switch (gGameState) {
case GSTATE_TITLE:
case GSTATE_CREDITS:
case GSTATE_ENDING:
D_radio_8017872C = 176;
D_radio_80178728 = 85;
D_radio_80178730 = 80.0f;
@ -147,7 +148,7 @@ void Radio_PlayMessage(u16* msg, RadioCharacterId character) {
Audio_PlayVoice(D_ctx_801782E8);
}
s32 D_radio_80178744;
s32 sRadioUseRedBox;
void func_radio_800BAAE8(void) {
static f32 D_800D4A74 = -1.0f;
@ -158,19 +159,19 @@ void func_radio_800BAAE8(void) {
f32 temp_fa0;
s32 j;
D_radio_80178744 = 0;
sRadioUseRedBox = 0;
mirror = false;
switch (D_ctx_801782A4) {
case RCID_FOX_RED:
D_radio_80178744 = 1;
sRadioUseRedBox = 1;
/* fallthrough */
case RCID_FOX:
sp44 = D_10050E0;
break;
case RCID_FOX_RED_OPEN:
D_radio_80178744 = 1;
sRadioUseRedBox = 1;
/* fallthrough */
case RCID_FOX_OPEN:
sp44 = D_1006000;
@ -182,37 +183,37 @@ void func_radio_800BAAE8(void) {
sp44 = D_1007E40;
break;
case RCID_FALCO_RED:
D_radio_80178744 = 1;
sRadioUseRedBox = 1;
/* fallthrough */
case RCID_FALCO:
sp44 = D_10032A0;
break;
case RCID_FALCO_RED_OPEN:
D_radio_80178744 = 1;
sRadioUseRedBox = 1;
/* fallthrough */
case RCID_FALCO_OPEN:
sp44 = D_10041C0;
break;
case RCID_SLIPPY_RED:
D_radio_80178744 = 1;
sRadioUseRedBox = 1;
/* fallthrough */
case RCID_SLIPPY:
sp44 = D_100D900;
break;
case RCID_SLIPPY_RED_OPEN:
D_radio_80178744 = 1;
sRadioUseRedBox = 1;
/* fallthrough */
case RCID_SLIPPY_OPEN:
sp44 = D_100E820;
break;
case RCID_PEPPY_RED:
D_radio_80178744 = 1;
sRadioUseRedBox = 1;
/* fallthrough */
case RCID_PEPPY:
sp44 = D_100BAC0;
break;
case RCID_PEPPY_RED_OPEN:
D_radio_80178744 = 1;
sRadioUseRedBox = 1;
/* fallthrough */
case RCID_PEPPY_OPEN:
sp44 = D_100C9E0;
@ -320,14 +321,14 @@ void func_radio_800BAAE8(void) {
sp44 = D_MA_6011B40;
break;
case RCID_ROB64_RED:
D_radio_80178744 = 1;
sRadioUseRedBox = 1;
/* fallthrough */
case RCID_ROB64:
case RCID_ROB64_2:
sp44 = D_1009C80;
break;
case RCID_ROB64_RED_OPEN:
D_radio_80178744 = 1;
sRadioUseRedBox = 1;
/* fallthrough */
case RCID_ROB64_OPEN:
case RCID_ROB64_2_OPEN:
@ -345,7 +346,7 @@ void func_radio_800BAAE8(void) {
if ((gGameState == GSTATE_PLAY) && (gCurrentLevel == LEVEL_AREA_6)) {
sp44 = D_A6_6000B60;
}
D_radio_80178744 = 1;
sRadioUseRedBox = 1;
break;
case RCID_ANDROSS_RED_OPEN:
case RCID_ANDROSS_OPEN:
@ -353,7 +354,7 @@ void func_radio_800BAAE8(void) {
if ((gGameState == GSTATE_PLAY) && (gCurrentLevel == LEVEL_AREA_6)) {
sp44 = D_A6_6001A80;
}
D_radio_80178744 = 1;
sRadioUseRedBox = 1;
break;
case RCID_JAMES:
sp44 = D_D005C30;
@ -403,12 +404,12 @@ void func_radio_800BAAE8(void) {
sp44 = D_1008D60;
break;
case GSTATE_TITLE:
case GSTATE_CREDITS:
case GSTATE_ENDING:
sp44 = gTitleRadioStatic;
break;
}
if (((s32) D_ctx_80177D68 == RCID_ANDROSS) || ((s32) D_ctx_80177D68 == RCID_ANDROSS_RED)) {
D_radio_80178744 = 1;
sRadioUseRedBox = 1;
}
break;
}
@ -463,7 +464,7 @@ void func_radio_800BB388(void) {
RCP_SetupDL(&gMasterDisp, 0x55);
switch (gGameState) {
case GSTATE_TITLE:
case GSTATE_CREDITS:
case GSTATE_ENDING:
sp38 = D_TITLE_601D750;
sp34 = D_TITLE_601DB50;
break;
@ -472,7 +473,7 @@ void func_radio_800BB388(void) {
sp34 = D_1013570;
break;
}
if (D_radio_80178744 == 1) {
if (sRadioUseRedBox == 1) {
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 25, 25, 170);
} else {
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 60, 60, 255, 170);
@ -496,7 +497,7 @@ void func_radio_800BB5D0(void) {
u32 temp_v0;
s32 fakeTemp;
if ((D_ctx_80177854 == 100) && (gGameState != GSTATE_CREDITS)) {
if ((gPlayState == PLAY_PAUSE) && (gGameState != GSTATE_ENDING)) {
return;
}
@ -529,7 +530,7 @@ void func_radio_800BB5D0(void) {
D_Timer_801782AC = 10;
}
D_ctx_801782A4 = 2;
if (gGameFrameCount & 1) {
if ((gGameFrameCount & 1) != 0) {
D_ctx_801782A4 = 3;
}
break;
@ -540,7 +541,7 @@ void func_radio_800BB5D0(void) {
D_Timer_801782AC = 10;
}
D_ctx_801782A4 = 2;
if (gGameFrameCount & 1) {
if ((gGameFrameCount & 1) != 0) {
D_ctx_801782A4 = 3;
}
break;
@ -554,7 +555,7 @@ void func_radio_800BB5D0(void) {
} else {
D_Timer_801782AC = (2 * temp_v0) + 16;
}
if ((gGameState == GSTATE_TITLE) || (gGameState == GSTATE_CREDITS)) {
if ((gGameState == GSTATE_TITLE) || (gGameState == GSTATE_ENDING)) {
D_Timer_801782AC = temp_v0 * 2;
}
}
@ -639,7 +640,7 @@ void func_radio_800BB5D0(void) {
case 6:
if (D_Timer_801782AC == 0) {
if (gGameState == GSTATE_CREDITS) {
if (gGameState == GSTATE_ENDING) {
Audio_ClearVoice();
} else {
Audio_PlayVoice(0);
@ -647,7 +648,7 @@ void func_radio_800BB5D0(void) {
gRadioState++;
}
D_ctx_801782A4 = 2;
if (gGameFrameCount & 1) {
if ((gGameFrameCount & 1) != 0) {
D_ctx_801782A4 = 3;
}
D_ctx_80177D50 -= 0.26f;
@ -664,7 +665,7 @@ void func_radio_800BB5D0(void) {
gRadioState = 0;
}
D_ctx_801782A4 = 2;
if (gGameFrameCount & 1) {
if ((gGameFrameCount & 1) != 0) {
D_ctx_801782A4 = 3;
}
break;
@ -687,13 +688,13 @@ void func_radio_800BB5D0(void) {
if (((temp_ft0 == RCID_FALCO) || (temp_ft0 == RCID_SLIPPY)) || (temp_ft0 == RCID_PEPPY)) {
if (temp_ft0 == RCID_FALCO) {
var_v1 = 1;
var_v1 = TEAM_ID_FALCO;
}
if (temp_ft0 == RCID_SLIPPY) {
var_v1 = 2;
var_v1 = TEAM_ID_SLIPPY;
}
if (temp_ft0 == RCID_PEPPY) {
var_v1 = 3;
var_v1 = TEAM_ID_PEPPY;
}
if ((gTeamShields[var_v1] <= 0) && (gGameFrameCount & 4) && (gTeamShields[var_v1] != -2) &&
(D_ctx_801782A4 != 2) && (D_ctx_801782A4 != 3) && (D_ctx_801782A4 != 1000)) {
@ -764,7 +765,7 @@ void func_radio_800BB5D0(void) {
}
void func_radio_800BC040(void) {
if (D_ctx_80177854 != 100) {
if (gPlayState != PLAY_PAUSE) {
if (D_Timer_801782AC > 0) {
D_Timer_801782AC--;
}
@ -800,7 +801,7 @@ void func_radio_800BC040(void) {
D_ctx_801782A4 = 2;
if (gGameFrameCount & 1) {
if ((gGameFrameCount & 1) != 0) {
D_ctx_801782A4 = 3;
}
break;
@ -846,7 +847,7 @@ void func_radio_800BC040(void) {
D_ctx_801782A4 = 2;
if (gGameFrameCount & 1) {
if ((gGameFrameCount & 1) != 0) {
D_ctx_801782A4 = 3;
}
@ -864,7 +865,7 @@ void func_radio_800BC040(void) {
D_Timer_801782AC = 5;
}
D_ctx_801782A4 = 2;
if (gGameFrameCount & 1) {
if ((gGameFrameCount & 1) != 0) {
D_ctx_801782A4 = 3;
}
break;

View File

@ -1,5 +1,4 @@
#include "global.h"
#include "fox_rcp_setup.c"
u8 D_80178580[0x190];

View File

@ -1132,7 +1132,7 @@ void Graphics_DisplaySmallText(s32 xPos, s32 yPos, f32 xScale, f32 yScale, char*
xPosCurrent += 6.0f * xScale;
break;
default:
if (var_t0 > 29) {
if (var_t0 >= 30) {
xPosCurrent += 9.0f * xScale;
} else {
xPosCurrent += 8.0f * xScale;
@ -1163,7 +1163,7 @@ s32 Graphics_GetSmallTextWidth(char* text) {
xPos += 6.0f;
break;
default:
if (charIndex > 29) {
if (charIndex >= 30) {
xPos += 9.0f;
} else {
xPos += 8.0f;

View File

@ -178,11 +178,11 @@ void func_tank_80043B18(Player* player) {
if (gCurrentLevel == LEVEL_MACBETH) {
func_tank_80043AA0(player->pos.x + sp3C.x, player->pos.y + sp3C.y, player->unk_138 + sp3C.z, 0.2f);
} else {
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
Titania_80189120(player->pos.x + sp3C.x, player->pos.y + sp3C.y, player->unk_138 + sp3C.z,
player->unk_0E8 + sp38, 1.3f);
}
if (!(gGameFrameCount & 3)) {
if (((gGameFrameCount % 4) == 0)) {
func_effect_8007A900(player->pos.x + sp3C.x, player->pos.y + sp3C.y + 20.0f, player->unk_138 + sp3C.z,
2.0f, 255, 15, 0);
}
@ -193,15 +193,15 @@ void func_tank_80043B18(Player* player) {
sp48.x = 36.0f;
Matrix_MultVec3f(gCalcMatrix, &sp48, &sp3C);
if (gCurrentLevel == LEVEL_MACBETH) {
if (gGameFrameCount & 1) {
if ((gGameFrameCount % 2) != 0) {
func_tank_80043AA0(player->pos.x + sp3C.x, player->pos.y + sp3C.y, player->unk_138 + sp3C.z, 0.2f);
}
} else {
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
Titania_80189120(player->pos.x + sp3C.x, player->pos.y + sp3C.y, player->unk_138 + sp3C.z,
player->unk_0E8 + sp38, 1.0f);
}
if (!(gGameFrameCount & 3) && (player->unk_0D0 >= 5.0f)) {
if (((gGameFrameCount % 4) == 0) && (player->unk_0D0 >= 5.0f)) {
func_effect_8007A900(player->pos.x + sp3C.x, player->pos.y + sp3C.y + 20.0f,
player->unk_138 + sp3C.z, 2.0f, 255, 15, 0);
}
@ -211,15 +211,15 @@ void func_tank_80043B18(Player* player) {
sp48.x = -36.0f;
Matrix_MultVec3f(gCalcMatrix, &sp48, &sp3C);
if (gCurrentLevel == LEVEL_MACBETH) {
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
func_tank_80043AA0(player->pos.x + sp3C.x, player->pos.y + sp3C.y, player->unk_138 + sp3C.z, 0.2f);
}
} else {
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
Titania_80189120(player->pos.x + sp3C.x, player->pos.y + sp3C.y, player->unk_138 + sp3C.z,
player->unk_0E8 + sp38, 1.0f);
}
if (!(gGameFrameCount & 3) && (player->unk_0D0 >= 5.0f)) {
if (((gGameFrameCount % 4) == 0) && (player->unk_0D0 >= 5.0f)) {
func_effect_8007A900(player->pos.x + sp3C.x, player->pos.y + sp3C.y + 20.0f,
player->unk_138 + sp3C.z, 2.0f, 255, 15, 0);
}
@ -449,10 +449,10 @@ void func_tank_80044868(Player* player) {
}
player->pos.x += player->vel.x;
if ((player->unk_0AC + (player->unk_09C - 100.0f)) < player->pos.x) {
player->flags_228 = 1;
player->flags_228 = PFLAG_228_0;
}
if (player->pos.x < (player->unk_0AC - (player->unk_09C - 100.0f))) {
player->flags_228 = 2;
player->flags_228 = PFLAG_228_1;
}
if (player->unk_09C + player->unk_0AC < player->pos.x) {
player->pos.x = player->unk_09C + player->unk_0AC;
@ -672,13 +672,13 @@ void func_tank_80045678(Player* player) {
player->unk_0D4 = 0.0f;
Math_SmoothStepToF(&player->vel.y, 0.0f, 0.1f, 2.0f, 0);
}
if ((gCamCount == 1) && !(gGameFrameCount & 1)) {
if ((gCamCount == 1) && ((gGameFrameCount % 2) == 0)) {
func_effect_8007A900(RAND_FLOAT_CENTERED(20.0f) + player->pos.x, player->unk_068 + 10.0f,
player->unk_138 - 10.0f, RAND_FLOAT(2.0f) + 3.5f, 255, 16, 1);
}
} else {
D_800C9F3C = 0;
if ((gCamCount == 1) && !(gGameFrameCount & 3) && (player->unk_1DC == 0)) {
if ((gCamCount == 1) && ((gGameFrameCount % 4) == 0) && (player->unk_1DC == 0)) {
if ((player->unk_16C > 0.2f) && (player->timer_220 == 0)) {
func_effect_8007A900(RAND_FLOAT_CENTERED(10.0f) + (player->pos.x - 57.0f), player->unk_068 + 10.0f,
player->unk_138 - 10.0f, RAND_FLOAT(1.0f) + 1.5f, 255, 15, 0);
@ -1328,7 +1328,7 @@ void func_tank_800481F4(Player* player) {
s32 temp_v0;
Actor* actor;
Boss* boss;
Object_4C* obj4C;
Sprite* sprite;
Object_80* obj80;
s32 sp98;
s32 pad2;
@ -1472,21 +1472,22 @@ void func_tank_800481F4(Player* player) {
}
}
}
for (i = 0, obj4C = gObjects4C; i < ARRAY_COUNT(gObjects4C); i++, obj4C++) {
if (obj4C->obj.status == OBJ_ACTIVE) {
if ((player->unk_138 - 200.0f) < obj4C->obj.pos.z) {
temp_v0 = func_play_800A7974(player, obj4C->info.hitbox, &sp98, obj4C->obj.pos.x, obj4C->obj.pos.y,
obj4C->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
for (i = 0, sprite = gSprites; i < ARRAY_COUNT(gSprites); i++, sprite++) {
if (sprite->obj.status == OBJ_ACTIVE) {
if ((player->unk_138 - 200.0f) < sprite->obj.pos.z) {
temp_v0 =
func_play_800A7974(player, sprite->info.hitbox, &sp98, sprite->obj.pos.x, sprite->obj.pos.y,
sprite->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
if (temp_v0 != 0) {
if ((obj4C->obj.id == OBJ_4C_163) || (obj4C->obj.id == OBJ_4C_161) ||
(obj4C->obj.id == OBJ_4C_162)) {
obj4C->unk_46 = 1;
if ((sprite->obj.id == OBJ_SPRITE_FO_POLE) || (sprite->obj.id == OBJ_SPRITE_CO_POLE) ||
(sprite->obj.id == OBJ_SPRITE_CO_TREE)) {
sprite->unk_46 = 1;
player->unk_1F4 = 6;
player->unk_21C = 0;
} else if (obj4C->obj.id == OBJ_4C_169) {
obj4C->unk_46 = 1;
} else if (sprite->obj.id == OBJ_SPRITE_TI_CACTUS) {
sprite->unk_46 = 1;
} else {
Player_ApplyDamage(player, temp_v0, obj4C->info.damage);
Player_ApplyDamage(player, temp_v0, sprite->info.damage);
}
}
}

View File

@ -1,3 +1,4 @@
#include "prevent_bss_reordering.h"
#include "global.h"
#include "fox_option.h"
#include "assets/ast_vs_menu.h"
@ -59,24 +60,24 @@ void func_versus_800BC760(void) {
}
gGameState = GSTATE_INIT;
D_Timer_8017783C = 2;
gNextGameStateTimer = 2;
gCamCount = GSTATE_INIT;
D_ctx_80177854 = 0;
gDrawMode = DRAWMODE_0;
gPlayState = PLAY_STANDBY;
gDrawMode = DRAW_NONE;
D_ctx_80177AE0 = 0;
gOptionMenuStatus = OPTION_WAIT;
D_ctx_80177B40 = 0;
gBgColor = 0;
D_ctx_80178380[0] = 0;
D_ctx_80178380[1] = 0;
D_ctx_80178380[2] = 0;
D_ctx_80178380[3] = 0;
gPlayerFillScreenAlphas[0] = 0;
gPlayerFillScreenAlphas[1] = 0;
gPlayerFillScreenAlphas[2] = 0;
gPlayerFillScreenAlphas[3] = 0;
gOverlayStage = 0;
gRadioState = 0;
gVersusMode = 0;
D_ctx_80178358 = 0;
D_ctx_80178340 = 255;
D_ctx_80177824 = GSTATE_INIT;
gFillScreenAlphaTarget = 0;
gFillScreenAlpha = 255;
D_ctx_80177824 = 1;
}
void func_versus_800BC88C(f32 xPos, f32 yPos, f32 scale) {
@ -1065,7 +1066,7 @@ s32 func_versus_800C04DC(f32 xPos, f32 scale, s32 arg2) {
f32 x;
f32 y;
if ((D_ctx_801778AC == 2) && (D_800D4A98 & 32) && (D_801787A8 != 99)) {
if ((D_ctx_801778AC == 2) && (D_800D4A98 & 0x20) && (D_801787A8 != 99)) {
x = 118.0f;
y = 110.0f;
@ -1372,9 +1373,9 @@ void func_versus_800C1368(void) {
D_800D4A90 = 0;
D_800D4A98 = 0;
D_800D4A9C = D_800D4AA0 = 0;
D_ctx_80178340 = 255;
D_ctx_8017835C = 0;
D_ctx_80178358 = 0;
gFillScreenAlpha = 255;
gFillScreenAlphaStep = 0;
gFillScreenAlphaTarget = 0;
for (i = 0; i < 4; i++) {
D_ctx_80177C30[i] = 0;
@ -1465,7 +1466,7 @@ void func_versus_800C16D0(void) {
void func_versus_800C1700(void) {
func_versus_800BC760();
gGameState = GSTATE_MENU;
D_Timer_8017783C = 2;
gNextGameStateTimer = 2;
gOptionMenuStatus = OPTION_WAIT;
D_game_800D2870 = 1;
gBgColor = 0;
@ -1667,8 +1668,8 @@ bool func_versus_800C176C(void) {
case 11:
D_80178830 += 16;
if (D_80178830 > 480) {
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0;
D_ctx_80178340 = D_ctx_80178358 = 255;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0;
gFillScreenAlpha = gFillScreenAlphaTarget = 255;
gBgColor = 0;
func_versus_800C16D0();
}
@ -1680,7 +1681,7 @@ bool func_versus_800C176C(void) {
if (D_80178830 > 176) {
gCamCount = 1;
}
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0;
gBgColor = 0;
if (D_80178830 > 224) {
func_versus_800C1700();
@ -1695,7 +1696,7 @@ bool func_versus_800C176C(void) {
gCamCount = 1;
}
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0;
gBgColor = 0;
if (D_80178830 > 224) {
@ -1723,14 +1724,14 @@ bool func_versus_800C176C(void) {
}
if (D_versus_80178754 >= 5) {
D_ctx_801779BC = 0;
gPauseEnabled = 0;
}
return false;
}
s32 func_versus_800C1E9C(void) {
if (D_ctx_80177854 != 100) {
if (gPlayState != PLAY_PAUSE) {
func_versus_800C176C();
}
return 0;
@ -1766,7 +1767,7 @@ void func_versus_800C1ED4(void) {
break;
}
case 4:
if ((D_ctx_801778AC != 2) || (!(D_800D4A98 & 32))) {
if ((D_ctx_801778AC != 2) || (!(D_800D4A98 & 0x20))) {
if (D_801787A8 < 4) {
func_versus_800C075C();
}
@ -1807,7 +1808,7 @@ void func_versus_800C1ED4(void) {
void func_versus_800C20B0(void) {
switch (gOptionMenuStatus) {
case 0:
if (D_Timer_8017783C == 0) {
if (gNextGameStateTimer == 0) {
gOptionMenuStatus = OPTION_SETUP;
D_ctx_80178410 = 0;
}
@ -1818,8 +1819,8 @@ void func_versus_800C20B0(void) {
break;
case 2:
gDrawMode = DRAWMODE_0;
func_play_800A5844();
gDrawMode = DRAW_NONE;
Play_Setup();
if (gVersusStage == VS_STAGE_SECTOR_Z) {
gOverlayStage = 1;
@ -1827,8 +1828,8 @@ void func_versus_800C20B0(void) {
gCurrentLevel = LEVEL_VERSUS;
gGameState = GSTATE_PLAY;
D_Timer_8017783C = 2;
D_ctx_80177854 = 0;
gNextGameStateTimer = 2;
gPlayState = PLAY_STANDBY;
D_versus_80178758 = 0;
break;
}
@ -1897,7 +1898,7 @@ void func_versus_800C2244(Actor* actor) {
y = actor->fwork[5] - actor->obj.pos.y;
z = actor->fwork[6] - actor->obj.pos.z;
if (!((gGameFrameCount + actor->index) & 7)) {
if (((gGameFrameCount + actor->index) % 8) == 0) {
actor->fwork[19] = Math_RadToDeg((Math_Atan2F(x, z)));
z = sqrtf(SQ(x) + SQ(z));
actor->fwork[20] = Math_RadToDeg((Math_Atan2F(y, z)));

View File

@ -95,7 +95,7 @@ void Option_ExpertSoundUpdate(void) {
if (gControllerPress[gMainController].button & B_BUTTON) {
if (!D_menu_801B9320) {
AUDIO_PLAY_BGM(SEQ_ID_MENU);
gDrawMode = DRAWMODE_0;
gDrawMode = DRAW_NONE;
D_menu_801B9124 = 1000;
D_menu_801B912C = 0;
D_menu_801B9244 = 1;

View File

@ -318,7 +318,7 @@ void Ending_80188030(s32 arg0) {
}
}
if (((gCsFrameCount >= 150) && (gCsFrameCount < 171)) || ((gCsFrameCount >= 280) && (gCsFrameCount < 301)) ||
if (((gCsFrameCount >= 150) && (gCsFrameCount < 171)) || ((gCsFrameCount >= 280) && (gCsFrameCount <= 300)) ||
((gCsFrameCount >= 340) && (gCsFrameCount < 361))) {
Math_SmoothStepToF(&D_ending_80196FA0[2][0].x, 40.0f, 0.2f, 1000.0f, 0.1f);
Math_SmoothStepToF(&D_ending_80196FA0[2][0].y, 10.0f, 0.2f, 1000.0f, 0.1f);
@ -404,13 +404,13 @@ void Ending_8018845C(void);
#endif
s32 Ending_80188634(void) {
if (D_enmy2_80161690 != 0) {
if (gCallTimer != 0) {
if ((D_ending_80196F90 % 14) == 0) {
AUDIO_PLAY_SFX(0x49002018, gDefaultSfxSource, 4);
}
D_ending_80196F90++;
D_enmy2_80161690--;
if (D_enmy2_80161690 == 0) {
gCallTimer--;
if (gCallTimer == 0) {
Audio_KillSfxById(0x49002018);
}
} else {
@ -422,7 +422,7 @@ s32 Ending_80188634(void) {
void Ending_801886F4(void) {
f32 temp = 142.0f;
if (D_enmy2_80161690 == 0) {
if (gCallTimer == 0) {
return;
}
@ -559,7 +559,7 @@ void Ending_80188DB4(void) {
}
}
D_enmy2_80161690 = 0;
gCallTimer = 0;
D_ending_80196F94 = 0;
D_ending_80196F98 = 0;
D_ending_80198580 = 0.0f;
@ -594,7 +594,7 @@ void Ending_80189108(void) {
}
if ((D_ending_80196D08[4].unk_38 == 0) && (gCsFrameCount == 180)) {
D_enmy2_80161690 = 120;
gCallTimer = 120;
gRadioState = 0;
}
@ -604,7 +604,7 @@ void Ending_80189108(void) {
gCsFrameCount = 0;
Audio_KillSfxById(0x49002018);
D_ending_80196F90 = 0;
D_enmy2_80161690 = 0;
gCallTimer = 0;
}
temp_a0 = (u32) (D_ending_80196D08[4].unk_34 * D_ending_80196D08[4].unk_30) %
@ -637,7 +637,7 @@ void Ending_80189108(void) {
Radio_PlayMessage(gMsg_ID_21060, RCID_FOX);
break;
case 80:
D_ctx_80178358 = 255;
gFillScreenAlphaTarget = 255;
break;
}
@ -659,7 +659,7 @@ void Ending_80189108(void) {
D_ending_80196F98--;
}
if ((D_enmy2_80161690 == 0) && (D_ending_80196F94 != 0)) {
if ((gCallTimer == 0) && (D_ending_80196F94 != 0)) {
if (D_ending_80198260[1][1] == 0) {
D_ending_80196FA0[1][1].x -= 2.4f;
D_ending_80196FA0[1][1].z -= 12.0f;
@ -675,7 +675,7 @@ void Ending_80189108(void) {
}
}
if ((D_enmy2_80161690 == 0) && (D_ending_80196F98 != 0)) {
if ((gCallTimer == 0) && (D_ending_80196F98 != 0)) {
if (D_ending_80198260[2][0] == 0) {
Math_SmoothStepToF(&D_ending_80196FA0[2][0].y, -10.0f, 0.4f, 100.0f, 0.1f);
if (D_ending_80196FA0[2][0].y <= -10.0f) {
@ -699,22 +699,22 @@ void Ending_80189108(void) {
}
if (D_ending_80196D08[4].unk_38 != 2) {
if ((D_enmy2_80161690 != 0) && (D_enmy2_80161690 < 121)) {
if ((gCallTimer != 0) && (gCallTimer < 121)) {
Math_SmoothStepToF(&D_ending_80196FA0[1][0].x, -50.0f, 0.2f, 1000.0f, 0.01f);
Math_SmoothStepToF(&D_ending_80196FA0[1][0].z, 18.0f, 0.2f, 1000.0f, 0.01f);
}
if ((D_enmy2_80161690 != 0) && (D_enmy2_80161690 < 116)) {
if ((gCallTimer != 0) && (gCallTimer < 116)) {
Math_SmoothStepToF(&D_ending_80196FA0[3][0].x, 20.0f, 0.2f, 1000.0f, 0.01f);
}
if ((D_enmy2_80161690 != 0) && (D_enmy2_80161690 < 111)) {
if ((gCallTimer != 0) && (gCallTimer < 111)) {
Math_SmoothStepToF(&D_ending_80196FA0[2][0].x, 20.0f, 0.2f, 1000.0f, 0.01f);
Math_SmoothStepToF(&D_ending_80196FA0[2][0].y, 20.0f, 0.2f, 1000.0f, 0.01f);
}
if ((D_ending_80196F94 == 0) && (D_enmy2_80161690 == 0)) {
if ((D_ending_80196F94 == 0) && (gCallTimer == 0)) {
Math_SmoothStepToF(&D_ending_80196FA0[1][0].x, 0.0f, 0.2f, 1000.0f, 0.01f);
Math_SmoothStepToF(&D_ending_80196FA0[1][0].z, 0.0f, 0.2f, 1000.0f, 0.01f);
}
if ((D_ending_80196F98 == 0) && (D_enmy2_80161690 == 0)) {
if ((D_ending_80196F98 == 0) && (gCallTimer == 0)) {
Math_SmoothStepToF(&D_ending_80196FA0[3][0].x, 0.0f, 0.2f, 1000.0f, 0.01f);
Math_SmoothStepToF(&D_ending_80196FA0[2][0].x, 0.0f, 0.2f, 1000.0f, 0.01f);
Math_SmoothStepToF(&D_ending_80196FA0[2][0].y, 0.0f, 0.2f, 1000.0f, 0.01f);
@ -928,7 +928,7 @@ void Ending_8018A570(void) {
/* fallthrough */
case 1:
Ending_80187D3C(0);
D_ctx_80178358 = 0;
gFillScreenAlphaTarget = 0;
D_ending_8019858C = 0;
D_ending_80196F8C = 2;
gCsFrameCount = 0;
@ -939,7 +939,7 @@ void Ending_8018A570(void) {
case 3:
Ending_80187D3C(1);
D_ctx_80178358 = 0;
gFillScreenAlphaTarget = 0;
D_ending_8019858C = 0;
D_ending_80196F8C = 4;
gCsFrameCount = 0;
@ -952,7 +952,7 @@ void Ending_8018A570(void) {
case 5:
Ending_80188394();
D_ctx_80178358 = 0;
gFillScreenAlphaTarget = 0;
D_ending_8019858C = 0;
D_ending_80196F8C = 6;
gCsFrameCount = 0;
@ -965,7 +965,7 @@ void Ending_8018A570(void) {
case 7:
Ending_80188DB4();
D_ctx_80178358 = 0;
gFillScreenAlphaTarget = 0;
D_ending_8019858C = 0;
D_ending_80196F8C = 8;
gCsFrameCount = 0;
@ -975,7 +975,7 @@ void Ending_8018A570(void) {
break;
case 9:
D_ctx_80178358 = 0;
gFillScreenAlphaTarget = 0;
gCsFrameCount = 0;
D_ending_80196D00 = 7;
break;
@ -1013,20 +1013,20 @@ void Ending_8018A828(void) {
}
void Ending_8018A8FC(void) {
if (D_ctx_80178340 != D_ctx_80178358) {
if (D_ctx_80178340 < D_ctx_80178358) {
D_ctx_80178340 += D_ctx_8017835C;
if (D_ctx_80178340 >= D_ctx_80178358) {
D_ctx_80178340 = D_ctx_80178358;
if (gFillScreenAlpha != gFillScreenAlphaTarget) {
if (gFillScreenAlpha < gFillScreenAlphaTarget) {
gFillScreenAlpha += gFillScreenAlphaStep;
if (gFillScreenAlpha >= gFillScreenAlphaTarget) {
gFillScreenAlpha = gFillScreenAlphaTarget;
}
} else {
D_ctx_80178340 -= D_ctx_8017835C;
if (D_ctx_80178340 <= D_ctx_80178358) {
D_ctx_80178340 = D_ctx_80178358;
gFillScreenAlpha -= gFillScreenAlphaStep;
if (gFillScreenAlpha <= gFillScreenAlphaTarget) {
gFillScreenAlpha = gFillScreenAlphaTarget;
}
}
}
D_ctx_8017835C = 16;
gFillScreenAlphaStep = 16;
}
void Ending_8018A96C(void) {
@ -1574,7 +1574,7 @@ bool Ending_8018BCB0(void) {
switch (gCsFrameCount) {
case 0:
D_ctx_80178358 = 0;
gFillScreenAlphaTarget = 0;
Ending_8018B860();
break;
@ -1703,11 +1703,11 @@ bool Ending_8018BCB0(void) {
}
if ((gCsFrameCount == 760) || (gCsFrameCount == 994)) {
D_ctx_80178358 = 255;
gFillScreenAlphaTarget = 255;
}
if (gCsFrameCount == 780) {
D_ctx_80178358 = 0;
gFillScreenAlphaTarget = 0;
}
return sp5C;

View File

@ -91,12 +91,12 @@ void Ending_8018D2C8(u32 arg0, AssetInfo* asset) {
alpha = (asset->unk_0C + asset->unk_10 - arg0 - 1) * 255 / asset->fogFar;
}
D_ctx_80178348 = asset->primRed;
D_ctx_80178350 = asset->primGreen;
D_ctx_80178354 = asset->primBlue;
gFillScreenRed = asset->primRed;
gFillScreenGreen = asset->primGreen;
gFillScreenBlue = asset->primBlue;
D_ctx_80178340 = D_ctx_80178358 = alpha;
D_ctx_8017835C = 0;
gFillScreenAlpha = gFillScreenAlphaTarget = alpha;
gFillScreenAlphaStep = 0;
}
void Ending_8018D398(u32 arg0, AssetInfo* asset) {
@ -110,7 +110,8 @@ void Ending_8018D398(u32 arg0, AssetInfo* asset) {
alpha = (asset->unk_0C + asset->unk_10 - arg0) * 255 / asset->fogFar;
}
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = D_ctx_80178340 = D_ctx_80178358 = D_ctx_8017835C = 0;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = gFillScreenAlphaTarget =
gFillScreenAlphaStep = 0;
Graphics_FillRectangle(&gMasterDisp, 8, 8, SCREEN_WIDTH - 8, SCREEN_HEIGHT - 8, asset->primRed, asset->primGreen,
asset->primBlue, alpha);
@ -142,12 +143,12 @@ void Ending_8018D638(u32 arg0, AssetInfo* asset) {
alpha = (asset->unk_0C + asset->fogFar - arg0) * 255 / asset->fogFar;
}
D_ctx_80178348 = asset->primRed;
D_ctx_80178350 = asset->primGreen;
D_ctx_80178354 = asset->primBlue;
gFillScreenRed = asset->primRed;
gFillScreenGreen = asset->primGreen;
gFillScreenBlue = asset->primBlue;
D_ctx_80178340 = D_ctx_80178358 = alpha;
D_ctx_8017835C = 0;
gFillScreenAlpha = gFillScreenAlphaTarget = alpha;
gFillScreenAlphaStep = 0;
RCP_SetupDL(&gMasterDisp, 0x53);
@ -775,9 +776,9 @@ void Ending_80190CF0(u32 arg0, AssetInfo* asset) {
void Ending_80191234(s32 arg0, s32 arg1) {
D_game_80161A34 = 8;
gGameState = GSTATE_MENU;
D_Timer_8017783C = 2;
gNextGameStateTimer = 2;
gOptionMenuStatus = OPTION_WAIT;
gDrawMode = DRAWMODE_0;
gDrawMode = DRAW_NONE;
gBgColor = 0;
D_ctx_80178410 = 0;
gControllerLock = 10;

View File

@ -22,16 +22,16 @@ void Corneria_8018753C(Object_80* obj80) {
gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK);
}
void Corneria_801875A4(Object_4C* obj4C) {
void Corneria_801875A4(Sprite* sprite) {
f32 sp1C;
f32 sp18;
f32 var_f;
if (!(gGameFrameCount & 3)) {
if (((gGameFrameCount % 4) == 0)) {
sp1C = RAND_FLOAT_CENTERED(10.0f);
sp18 = RAND_FLOAT_CENTERED(10.0f);
var_f = RAND_FLOAT(0.5f) + 1.0f;
func_effect_8007C85C(obj4C->obj.pos.x + sp1C, obj4C->obj.pos.y + sp18, obj4C->obj.pos.z, 4.0f * var_f);
func_effect_8007C85C(sprite->obj.pos.x + sp1C, sprite->obj.pos.y + sp18, sprite->obj.pos.z, 4.0f * var_f);
}
}
@ -95,7 +95,7 @@ void Corneria_80187838(s32 arg0, f32 arg1, f32 arg2, f32 arg3, s32 arg4) {
}
}
void Corneria_Boss292_Init(Boss* boss) {
void Corneria_Boss292_Init(Boss292* this) {
s32 i;
gBossFrameCount = 0;
@ -106,7 +106,7 @@ void Corneria_Boss292_Init(Boss* boss) {
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50);
}
Object_Kill(&boss->obj, boss->sfxSource);
Object_Kill(&this->obj, this->sfxSource);
return;
}
@ -139,7 +139,7 @@ f32 Corneria_80187A88(s32 arg0) {
}
void Corneria_80187AC8(Boss* boss) {
Object_4C* obj4C;
Sprite* sprite;
s32 var_v0;
s32 var_s1;
s32 var_s1_2;
@ -305,37 +305,37 @@ void Corneria_80187AC8(Boss* boss) {
if (!(D_edisplay_801615D0.y < 0.0f)) {
obj4C = gObjects4C;
for (var_s1 = 0; var_s1 < 40; var_s1++, obj4C++) {
if ((obj4C->obj.status == OBJ_ACTIVE) && (obj4C->obj.id == OBJ_4C_162)) {
if ((fabsf(obj4C->obj.pos.x - D_i1_8019B6D8[20]) < 90.0f) &&
(fabsf(obj4C->obj.pos.z - D_i1_8019B6D8[32]) < 90.0f)) {
obj4C->unk_46 = 1;
sprite = gSprites;
for (var_s1 = 0; var_s1 < 40; var_s1++, sprite++) {
if ((sprite->obj.status == OBJ_ACTIVE) && (sprite->obj.id == OBJ_SPRITE_CO_TREE)) {
if ((fabsf(sprite->obj.pos.x - D_i1_8019B6D8[20]) < 90.0f) &&
(fabsf(sprite->obj.pos.z - D_i1_8019B6D8[32]) < 90.0f)) {
sprite->unk_46 = 1;
break;
} else if ((fabsf(obj4C->obj.pos.x - D_i1_8019B6D8[23]) < 90.0f) &&
(fabsf(obj4C->obj.pos.z - D_i1_8019B6D8[35]) < 90.0f)) {
obj4C->unk_46 = 1;
} else if ((fabsf(sprite->obj.pos.x - D_i1_8019B6D8[23]) < 90.0f) &&
(fabsf(sprite->obj.pos.z - D_i1_8019B6D8[35]) < 90.0f)) {
sprite->unk_46 = 1;
break;
}
}
}
if ((boss->swork[1] == 1000) && !(gGameFrameCount & 3)) {
if ((boss->swork[1] == 1000) && ((gGameFrameCount % 4) == 0)) {
func_effect_8007BFFC(D_i1_8019B6D8[3], D_i1_8019B6D8[4], D_i1_8019B6D8[5],
(D_i1_8019B6D8[3] - boss->obj.pos.x) * 0.1f, 0.0f,
(D_i1_8019B6D8[5] - boss->obj.pos.z) * 0.1f, 1.5f, 5);
}
if ((boss->swork[2] == 1000) && !(gGameFrameCount & 3)) {
if ((boss->swork[2] == 1000) && ((gGameFrameCount % 4) == 0)) {
func_effect_8007BFFC(D_i1_8019B6D8[9], D_i1_8019B6D8[10], D_i1_8019B6D8[11],
(D_i1_8019B6D8[9] - boss->obj.pos.x) * 0.1f, 0.0f,
(D_i1_8019B6D8[11] - boss->obj.pos.z) * 0.1f, 1.5f, 5);
}
if ((boss->swork[3] == 1000) && !(gGameFrameCount & 3)) {
if ((boss->swork[3] == 1000) && ((gGameFrameCount % 4) == 0)) {
func_effect_8007BFFC(D_i1_8019B6D8[12], D_i1_8019B6D8[13], D_i1_8019B6D8[14], 0.0f, 20.0f, 0.0f, 2.0f, 5);
}
if ((boss->swork[4] == 1000) && !(gGameFrameCount & 3)) {
if ((boss->swork[4] == 1000) && ((gGameFrameCount % 4) == 0)) {
func_effect_8007BFFC(D_i1_8019B6D8[56], D_i1_8019B6D8[57], D_i1_8019B6D8[58], 0.0f, 10.0f, 0.0f, 2.0f, 5);
}
if ((boss->swork[7] == 1000) && !(gGameFrameCount & 3)) {
if ((boss->swork[7] == 1000) && ((gGameFrameCount % 4) == 0)) {
func_effect_8007BFFC(D_i1_8019B6D8[59], D_i1_8019B6D8[60], D_i1_8019B6D8[61], 0.0f, 10.0f, 0.0f, 2.0f, 5);
}
}
@ -431,7 +431,7 @@ void Corneria_80188A18(Boss* boss) {
break;
}
if ((gBossFrameCount >= 1001) && (Rand_ZeroOne() < 0.3f)) {
if ((gBossFrameCount > 1000) && (Rand_ZeroOne() < 0.3f)) {
if (Rand_ZeroOne() < 0.5f) {
func_360_8002E4F8(gMsg_ID_2263, RCID_BOSS_CORNERIA);
} else {
@ -439,7 +439,7 @@ void Corneria_80188A18(Boss* boss) {
}
}
}
if ((gBossFrameCount >= 801) && !(gBossFrameCount & 0x1FF)) {
if ((gBossFrameCount > 800) && ((gBossFrameCount % 512) == 0)) {
if (D_ctx_80177B6C < 2) {
Radio_PlayMessage(gMsg_ID_20237, RCID_PEPPY);
} else if (D_edisplay_801615D0.z > 0.0f) {
@ -488,7 +488,8 @@ void Corneria_80188D50(Boss* boss) {
boss->swork[36]++;
D_i1_801997E0 = 20;
AUDIO_PLAY_SFX(0x49008025, gDefaultSfxSource, 4);
if ((gTeamShields[1] > 0) || (gTeamShields[2] > 0) || (gTeamShields[3] > 0)) {
if ((gTeamShields[TEAM_ID_FALCO] > 0) || (gTeamShields[TEAM_ID_SLIPPY] > 0) ||
(gTeamShields[TEAM_ID_PEPPY] > 0)) {
do {
do {
temp_ft3 = RAND_INT(2.9f) + 1;
@ -585,9 +586,9 @@ void Corneria_80189058(Boss* boss) {
Corneria_80188D50(boss);
if (D_edisplay_801615D0.z > 0.0f) {
if (D_edisplay_801615D0.x > 0.0f) {
gPlayer[0].flags_228 = 0x10;
gPlayer[0].flags_228 = PFLAG_228_4;
} else {
gPlayer[0].flags_228 = 0x20;
gPlayer[0].flags_228 = PFLAG_228_5;
}
}
@ -763,7 +764,7 @@ void Corneria_80189058(Boss* boss) {
D_i1_8019B6D8[19] = D_i1_8019B6D8[67] = gPlayer[0].unk_138;
boss->unk_04C += 4;
if (boss->unk_04C >= 101) {
if (boss->unk_04C > 100) {
boss->unk_04C = 0;
}
Animation_GetFrameData(&D_CO_602BC18, boss->unk_04C, sp84);
@ -784,7 +785,7 @@ void Corneria_80189058(Boss* boss) {
D_i1_8019B6D8[19] = gPlayer[0].unk_138;
boss->unk_04C += 4;
if (boss->unk_04C >= 101) {
if (boss->unk_04C > 100) {
boss->unk_04C = 0;
}
Animation_GetFrameData(&D_CO_602BC18, boss->unk_04C, sp84);
@ -795,7 +796,7 @@ void Corneria_80189058(Boss* boss) {
case 6:
boss->unk_05E = 0;
D_ctx_8017812C = 1;
if (!(gGameFrameCount & 7)) {
if (((gGameFrameCount % 8) == 0)) {
D_i1_8019B6D8[17] = gPlayer[0].pos.x + RAND_FLOAT_CENTERED(2000.0f);
D_i1_8019B6D8[18] = gPlayer[0].pos.y;
D_i1_8019B6D8[19] = gPlayer[0].unk_138 + RAND_FLOAT_CENTERED(2000.0f);
@ -807,11 +808,11 @@ void Corneria_80189058(Boss* boss) {
boss->obj.rot.z = 60.0f;
Corneria_80188C7C(boss);
if ((gGameFrameCount & 0x1FF) == 0) {
if ((gGameFrameCount % 512U) == 0) {
Radio_PlayMessage(gMsg_ID_2275, RCID_BOSS_CORNERIA);
}
if ((gGameFrameCount & 0x1FF) == 0x100) {
if ((gGameFrameCount % 512U) == 256) {
Radio_PlayMessage(gMsg_ID_2220, RCID_BOSS_CORNERIA);
}
}
@ -822,10 +823,10 @@ void Corneria_80189058(Boss* boss) {
boss->obj.rot.z = -60.0f;
Corneria_80188C7C(boss);
if ((gGameFrameCount & 0x1FF) == 0) {
if ((gGameFrameCount % 512U) == 0) {
Radio_PlayMessage(gMsg_ID_2275, RCID_BOSS_CORNERIA);
}
if ((gGameFrameCount & 0x1FF) == 0x100) {
if ((gGameFrameCount % 512U) == 256) {
Radio_PlayMessage(gMsg_ID_2220, RCID_BOSS_CORNERIA);
}
}
@ -844,7 +845,7 @@ void Corneria_80189058(Boss* boss) {
}
boss->unk_068 = SIN_DEG(boss->obj.rot.z) * 30.0f;
if (!(gGameFrameCount & 0xF)) {
if (((gGameFrameCount % 16) == 0)) {
boss->unk_04C = RAND_INT(100.0f);
}
Animation_GetFrameData(&D_CO_602BC18, boss->unk_04C, sp84);
@ -885,7 +886,7 @@ void Corneria_80189058(Boss* boss) {
}
}
if (boss->timer_050 < 50) {
boss->dmgPart = boss->timer_050 & 7;
boss->dmgPart = boss->timer_050 % 8U;
switch (boss->dmgPart) {
case 1:
@ -1005,7 +1006,7 @@ bool Corneria_8018A434(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void*
rot->x += D_i1_8019B6D8[16];
break;
}
if ((boss->swork[limbIndex] & 1) || (boss->timer_05C & 1)) {
if (((boss->swork[limbIndex] % 2) != 0) || ((boss->timer_05C % 2) != 0)) {
RCP_SetupDL_64();
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 64, 64, 255, 255);
}
@ -1144,7 +1145,7 @@ void Corneria_8018ACE0(Actor* actor) {
}
}
}
if ((actor->health < 11) && !(gGameFrameCount & 3)) {
if ((actor->health < 11) && ((gGameFrameCount % 4) == 0)) {
func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(100.0f),
actor->obj.pos.y + 200.0f + RAND_FLOAT_CENTERED(100.0f),
actor->obj.pos.z + 50.0f + RAND_FLOAT(50.0f), 3.0f);
@ -1345,7 +1346,7 @@ void Corneria_8018B58C(Actor* actor) {
switch (actor->state) {
case 100:
if (!(actor->timer_0BC & 3)) {
if ((actor->timer_0BC & 3) == 0) {
func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(100.0f),
actor->obj.pos.y + 200.0f + RAND_FLOAT_CENTERED(100.0f),
@ -1382,7 +1383,7 @@ void Corneria_8018B58C(Actor* actor) {
}
break;
case 101:
if ((actor->timer_0BE != 0) && !(gGameFrameCount & 1)) {
if ((actor->timer_0BE != 0) && ((gGameFrameCount % 2) == 0)) {
func_effect_8007797C(actor->obj.pos.x, actor->obj.pos.y + 150.0f, actor->obj.pos.z, 0.0f, 10.0f, 0.0f,
3.0f);
}
@ -1472,43 +1473,43 @@ void Corneria_8018BDD4(Boss* boss, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 a
boss->obj.rot.y, arg5, arg6, objId);
}
void Corneria_Boss293_Init(Boss* boss) {
void Corneria_Boss293_Init(Boss293* this) {
s32 i;
s16 temp_s1;
gBossActive = 1;
gBossFrameCount = 0;
boss->unk_05E = 1;
boss->timer_050 = 354;
boss->health = 601;
boss->fwork[18] = -D_play_80161A54 - 10.0f;
this->unk_05E = 1;
this->timer_050 = 354;
this->health = 601;
this->fwork[18] = -D_play_80161A54 - 10.0f;
if (fabsf(gPlayer[0].unk_0AC) < 1.0f) {
boss->timer_05A = 30000;
boss->obj.pos.z = (gPlayer[0].camEye.z - D_ctx_80177D20) - 2000.0f;
AUDIO_PLAY_SFX(0x31038018, boss->sfxSource, 4);
this->timer_05A = 30000;
this->obj.pos.z = (gPlayer[0].camEye.z - D_ctx_80177D20) - 2000.0f;
AUDIO_PLAY_SFX(0x31038018, this->sfxSource, 4);
D_i1_8019B6D0 = 0;
} else {
D_i1_8019B6D0 = 1;
boss->obj.rot.y = 180.0f;
boss->fwork[6] = 800.0f;
boss->obj.pos.z = gPlayer[0].unk_138 + 2000.0f;
boss->fwork[7] = boss->obj.pos.x;
boss->fwork[5] = 30.0f;
AUDIO_PLAY_SFX(0x31038018, boss->sfxSource, 4);
boss->swork[10] = 3;
boss->swork[8] = 3;
this->obj.rot.y = 180.0f;
this->fwork[6] = 800.0f;
this->obj.pos.z = gPlayer[0].unk_138 + 2000.0f;
this->fwork[7] = this->obj.pos.x;
this->fwork[5] = 30.0f;
AUDIO_PLAY_SFX(0x31038018, this->sfxSource, 4);
this->swork[10] = 3;
this->swork[8] = 3;
}
temp_s1 = boss->timer_05A;
temp_s1 = this->timer_05A;
// Bosses OBJ_BOSS_294 to OBJ_BOSS_296
for (i = 1; i < 4; i++) {
Boss_Initialize(&gBosses[i]);
gBosses[i].obj.status = OBJ_INIT;
gBosses[i].obj.id = i + 293;
gBosses[i].obj.pos.x = boss->obj.pos.x;
gBosses[i].obj.pos.y = boss->obj.pos.y;
gBosses[i].obj.pos.z = boss->obj.pos.z;
gBosses[i].obj.pos.x = this->obj.pos.x;
gBosses[i].obj.pos.y = this->obj.pos.y;
gBosses[i].obj.pos.z = this->obj.pos.z;
gBosses[i].health = 200;
gBosses[i].unk_05E = 1;
gBosses[i].timer_05A = temp_s1;
@ -1588,7 +1589,7 @@ void Corneria_8018C19C(Boss* boss) {
boss->vel.y = sp6C.y;
boss->vel.z = sp6C.z - D_ctx_80177D08;
boss->fwork[16] = 4.0f;
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
Matrix_MultVec3f(gCalcMatrix, &D_i1_80199914[0], &sp84[6]);
Matrix_MultVec3f(gCalcMatrix, &D_i1_80199914[1], &sp84[7]);
Matrix_MultVec3f(gCalcMatrix, &D_i1_8019992C, &sp84[8]);
@ -1600,7 +1601,7 @@ void Corneria_8018C19C(Boss* boss) {
10.0f);
}
} else {
if ((gBossFrameCount >= 381) && (gBossFrameCount < 430)) {
if ((gBossFrameCount > 380) && (gBossFrameCount < 430)) {
D_ctx_80178540 = 5;
D_ctx_80178570 = 20;
D_ctx_80178574 = 20;
@ -1621,7 +1622,7 @@ void Corneria_8018C19C(Boss* boss) {
for (i = 0; var_v1 >= 60; i++, var_v1 -= 60) {}
for (var_v0 = 0, var_v1 = 13; var_v0 < i; var_v0++, var_v1++) {
if ((gGameFrameCount & 0xF) == (var_v0 & 0xF)) {
if ((gGameFrameCount % 16U) == (var_v0 % 16U)) {
Matrix_MultVec3f(gCalcMatrix, &D_i1_8019995C[var_v0], &sp84[var_v1]);
func_effect_8007D0E0(sp84[var_v1].x + boss->obj.pos.x, sp84[var_v1].y + boss->obj.pos.y,
sp84[var_v1].z + boss->obj.pos.z, boss->fwork[17]);
@ -1669,7 +1670,7 @@ void Corneria_8018C19C(Boss* boss) {
boss->fwork[15] = 0.5f;
}
}
if ((gBosses[1].state != 0) && !(gGameFrameCount & 0xF)) {
if ((gBosses[1].state != 0) && ((gGameFrameCount % 16) == 0)) {
Matrix_MultVec3f(gCalcMatrix, &D_i1_80199908, &sp84[5]);
func_effect_8007D0E0(gBosses[0].obj.pos.x + sp84[5].x, gBosses[0].obj.pos.y + sp84[5].y,
gBosses[0].obj.pos.z + sp84[5].z, 5.0f);
@ -1677,24 +1678,24 @@ void Corneria_8018C19C(Boss* boss) {
if (gBosses[2].state != 0) {
gBosses[3].unk_05E = 1;
if (gBosses[3].state != 0) {
if (!(gGameFrameCount & 7)) {
if (((gGameFrameCount % 8) == 0)) {
Matrix_MultVec3f(gCalcMatrix, &D_i1_80199950, &sp84[11]);
func_effect_8007D0E0(gBosses[0].obj.pos.x + sp84[11].x, gBosses[0].obj.pos.y + sp84[11].y,
gBosses[0].obj.pos.z + sp84[11].z, 7.0f);
}
} else if (!(gGameFrameCount & 0xF)) {
} else if (((gGameFrameCount % 16) == 0)) {
Matrix_MultVec3f(gCalcMatrix, &D_i1_80199938, &sp84[9]);
func_effect_8007D0E0(gBosses[0].obj.pos.x + sp84[9].x, gBosses[0].obj.pos.y + sp84[9].y,
gBosses[0].obj.pos.z + sp84[9].z, 5.0f);
}
}
if ((gBosses[3].state != 0) && (gBosses[2].state == 0) && !(gGameFrameCount & 0xF)) {
if ((gBosses[3].state != 0) && (gBosses[2].state == 0) && ((gGameFrameCount % 16) == 0)) {
Matrix_MultVec3f(gCalcMatrix, &D_i1_80199944, &sp84[10]);
func_effect_8007D0E0(gBosses[0].obj.pos.x + sp84[10].x, gBosses[0].obj.pos.y + sp84[10].y,
gBosses[0].obj.pos.z + sp84[10].z, 5.0f);
}
if (((boss->state == 1) || (boss->state == 2)) && !(gGameFrameCount & 7)) {
if (((boss->state == 1) || (boss->state == 2)) && ((gGameFrameCount % 8) == 0)) {
Matrix_MultVec3f(gCalcMatrix, &D_i1_80199914[0], &sp84[6]);
Matrix_MultVec3f(gCalcMatrix, &D_i1_80199914[1], &sp84[7]);
Matrix_MultVec3f(gCalcMatrix, &D_i1_8019992C, &sp84[8]);
@ -1863,7 +1864,7 @@ void Corneria_8018C19C(Boss* boss) {
boss->swork[6]++;
boss->swork[6] &= 1;
}
if (!(gGameFrameCount & 7)) {
if (((gGameFrameCount % 8) == 0)) {
if (fabsf(boss->obj.pos.z - gPlayer[0].unk_138) > 700.0f) {
Matrix_MultVec3f(gCalcMatrix, &D_i1_801998F0[0], &sp84[3]);
@ -1927,7 +1928,7 @@ void Corneria_8018C19C(Boss* boss) {
break;
case 8:
D_ctx_801779A8[0] = 20.0f;
if (!(gGameFrameCount & 0x1F)) {
if (((gGameFrameCount % 32) == 0)) {
for (i = 0; i < 10; i++) {
func_effect_80079618(RAND_FLOAT_CENTERED(300.0f) + boss->obj.pos.x, boss->obj.pos.y,
boss->obj.pos.z, 1.0f);
@ -1950,7 +1951,7 @@ void Corneria_8018C19C(Boss* boss) {
func_boss_80042EC0(boss);
boss->fwork[17] = 10.0f;
boss->vel.y *= 1.5f;
D_ctx_80177930 = 1;
gNextPlanetPath = 1;
if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) ||
(gPlayer[0].state_1C8 == PLAYERSTATE_1C8_5)) {
func_boss_8004319C(gPlayer, boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z);
@ -1976,7 +1977,7 @@ void Corneria_8018C19C(Boss* boss) {
}
break;
case 9:
if (!(gGameFrameCount & 0xF)) {
if (((gGameFrameCount % 16) == 0)) {
for (i = 0; i < 10; i++) {
func_effect_80079618(RAND_FLOAT_CENTERED(300.0f) + boss->obj.pos.x, boss->obj.pos.y,
boss->obj.pos.z, 1.0f);
@ -1999,7 +2000,7 @@ void Corneria_8018C19C(Boss* boss) {
}
break;
case 10:
if (!(gGameFrameCount & 7)) {
if (((gGameFrameCount % 8) == 0)) {
for (i = 0; i < 10; i++) {
func_effect_80079618(RAND_FLOAT_CENTERED(300.0f) + boss->obj.pos.x, boss->obj.pos.y,
boss->obj.pos.z, 1.0f);
@ -2116,11 +2117,11 @@ void Corneria_8018DDAC(Boss* boss) {
Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, 0);
gBosses[0].fwork[15] += 0.5f;
if (!(gGameFrameCount & 7) && (Rand_ZeroOne() < 0.5f)) {
if (((gGameFrameCount % 8) == 0) && (Rand_ZeroOne() < 0.5f)) {
boss->timer_05C = 4;
}
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
Matrix_MultVec3f(gCalcMatrix, &D_i1_80199A6C, &sp4C);
func_effect_8007C120(boss->obj.pos.x + sp4C.x, boss->obj.pos.y + sp4C.y, boss->obj.pos.z + sp4C.z,
boss->vel.x, boss->vel.y, boss->vel.z, 0.2f, 10);
@ -2208,11 +2209,11 @@ void Corneria_8018E290(Boss* boss) {
Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, 0);
gBosses[0].fwork[15] += 0.5f;
if (!(gGameFrameCount & 7) && (Rand_ZeroOne() < 0.5f)) {
if (((gGameFrameCount % 8) == 0) && (Rand_ZeroOne() < 0.5f)) {
boss->timer_05C = 4;
}
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
Matrix_MultVec3f(gCalcMatrix, &D_i1_80199A84, &sp4C);
func_effect_8007C120(boss->obj.pos.x + sp4C.x, boss->obj.pos.y + sp4C.y, boss->obj.pos.z + sp4C.z,
boss->vel.x, boss->vel.y, boss->vel.z, 0.2f, 10);
@ -2302,10 +2303,10 @@ void Corneria_8018E76C(Boss* boss) {
case 1:
Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, 0);
gBosses[0].fwork[15] += 0.5f;
if (!(gGameFrameCount & 7) && (Rand_ZeroOne() < 0.5f)) {
if (((gGameFrameCount % 8) == 0) && (Rand_ZeroOne() < 0.5f)) {
boss->timer_05C = 4;
}
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
Matrix_MultVec3f(gCalcMatrix, &D_i1_80199A9C, &sp4C);
func_effect_8007C120(boss->obj.pos.x + sp4C.x, boss->obj.pos.y + sp4C.y, boss->obj.pos.z + sp4C.z,
boss->vel.x, boss->vel.y, boss->vel.z, 0.2f, 10);
@ -2431,13 +2432,13 @@ bool Corneria_8018F1C8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void*
switch (limbIndex) {
case 1:
rot->y -= obj80->vel.x;
if (obj80->timer_4C & 1) {
if ((obj80->timer_4C % 2) != 0) {
RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
}
break;
case 2:
rot->y += obj80->vel.y;
if (obj80->timer_4C & 1) {
if ((obj80->timer_4C % 2) != 0) {
RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
}
break;
@ -2462,7 +2463,7 @@ void Corneria_8018F3BC(Object_80* obj80, f32 arg1) {
obj80->obj.rot.y *= -1.0f;
}
obj80->obj.pos.y = 0.0f;
obj80->obj.id = 1;
obj80->obj.id = OBJ_80_1;
obj80->unk_60 = 60.0f;
Object_SetInfo(&obj80->info, obj80->obj.id);
obj80->obj.pos.z = -2000.0f;
@ -2472,7 +2473,7 @@ void Corneria_8018F3BC(Object_80* obj80, f32 arg1) {
void Corneria_8018F4A4(void) {
s32 i;
if (!(gGameFrameCount & 0xF) && !(gPlayer[0].unk_1D0 < 4)) {
if (((gGameFrameCount % 16) == 0) && !(gPlayer[0].unk_1D0 < 4)) {
for (i = 0; i < 50; i++) {
if (gObjects80[i].obj.status == OBJ_FREE) {
Corneria_8018F3BC(&gObjects80[i], 4000.0f);
@ -2510,7 +2511,7 @@ void Corneria_8018F55C(Effect* effect) {
void Corneria_8018F678(void) {
s32 i;
if (!(gGameFrameCount & 0x1F) && gPlayer[0].pos.x == 0.0f) {
if (((gGameFrameCount % 32) == 0) && gPlayer[0].pos.x == 0.0f) {
for (i = 0; i < ARRAY_COUNT(gEffects); i++) {
if (gEffects[i].obj.status == OBJ_FREE) {
@ -2665,14 +2666,14 @@ void Corneria_8018F880(Player* player) {
player->camAt.z = gCsCamAtZ = player->unk_138 + 300.0f;
D_ctx_80177A48[0] = 0;
D_ctx_80177A48[1] = D_ctx_80177A48[2] = 0;
D_ctx_80178358 = 255;
D_ctx_80178340 = 255;
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255;
gFillScreenAlphaTarget = 255;
gFillScreenAlpha = 255;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255;
break;
case 1:
if (player->timer_1F8 < 550) {
D_ctx_80178358 = 0;
D_ctx_8017835C = 3;
gFillScreenAlphaTarget = 0;
gFillScreenAlphaStep = 3;
Math_SmoothStepToF(&D_ctx_80177A48[0], 0.01f, 1.0f, 0.0005f, 0.0f);
}
gCsCamEyeX = player->pos.x - 150.0f;
@ -2699,13 +2700,13 @@ void Corneria_8018F880(Player* player) {
if (player->timer_1F8 == 120) {
AUDIO_PLAY_SFX(0x09000013, player->sfxSource, 0);
}
if ((player->timer_1F8 < 190) && (player->timer_1F8 >= 151)) {
if ((player->timer_1F8 < 190) && (player->timer_1F8 > 150)) {
Math_SmoothStepToF(&player->wings.unk_24, 2.0f, 0.2f, 0.5f, 0.0f);
}
if (player->timer_1F8 < 150) {
player->unk_204 = 0;
}
if ((player->timer_1F8 < 120) && !(player->timer_1F8 & 0xF)) {
if ((player->timer_1F8 < 120) && ((player->timer_1F8 % 16) == 0)) {
D_ctx_80177A48[1] = RAND_FLOAT_CENTERED(60.0f);
D_ctx_80177A48[2] = RAND_FLOAT_CENTERED(60.0f);
}
@ -2875,13 +2876,13 @@ void Corneria_8018F880(Player* player) {
if (player->timer_1F8 == 40) {
actor2->fwork[29] = 5.0f;
}
if ((player->timer_1F8 >= 71) && (player->timer_1F8 < 80)) {
if ((player->timer_1F8 > 70) && (player->timer_1F8 < 80)) {
actor0->iwork[11] = 2;
}
if ((player->timer_1F8 >= 51) && (player->timer_1F8 < 60)) {
if ((player->timer_1F8 > 50) && (player->timer_1F8 < 60)) {
actor1->iwork[11] = 2;
}
if ((player->timer_1F8 >= 31) && (player->timer_1F8 < 40)) {
if ((player->timer_1F8 > 30) && (player->timer_1F8 < 40)) {
actor2->iwork[11] = 2;
}
if (player->timer_1F8 == 70) {
@ -2914,17 +2915,17 @@ void Corneria_8018F880(Player* player) {
D_ctx_80177A48[0] = 0.03f;
player->unk_190 = 2.0f;
if (player->timer_1F8 == 0) {
D_ctx_80178358 = 255;
D_ctx_8017835C = 48;
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255;
gFillScreenAlphaTarget = 255;
gFillScreenAlphaStep = 48;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255;
}
if (D_ctx_80178340 == 255) {
if (gFillScreenAlpha == 255) {
AUDIO_PLAY_BGM(gBgmSeqId);
Object_Kill(&actor0->obj, actor0->sfxSource);
Object_Kill(&actor1->obj, actor1->sfxSource);
Object_Kill(&actor2->obj, actor2->sfxSource);
D_ctx_80177838 = 80;
gLevelStatusScreenTimer = 80;
player->pos.y = 350.0f;
player->camEye.x = player->pos.x;
player->camEye.y = (player->pos.y * player->unk_148) + 50.0f;
@ -2935,9 +2936,10 @@ void Corneria_8018F880(Player* player) {
player->camAt.y = (player->pos.y * player->unk_148) + 20.0f;
player->camAt.z = player->unk_138;
D_ctx_80177950 = 1.0f;
D_ctx_80178380[0] = D_ctx_80178380[1] = D_ctx_80178380[2] = D_ctx_80178380[3] = 0;
gPlayerFillScreenAlphas[0] = gPlayerFillScreenAlphas[1] = gPlayerFillScreenAlphas[2] =
gPlayerFillScreenAlphas[3] = 0;
D_ctx_80178488 = 1;
D_ctx_80178358 = 0;
gFillScreenAlphaTarget = 0;
player->timer_1F8 = 15;
}
break;
@ -3103,7 +3105,7 @@ void Corneria_80191160(Player* player) {
}
break;
case 3:
if ((gCsFrameCount >= 701) && (gCsFrameCount < 1000)) {
if ((gCsFrameCount > 700) && (gCsFrameCount < 1000)) {
func_demo_8004AA84();
}
Math_SmoothStepToAngle(&player->unk_0E4, 20.0f, 0.1f, 0.5f, 0);
@ -3131,10 +3133,10 @@ void Corneria_80191160(Player* player) {
Math_SmoothStepToF(&player->camAt.z, player->pos.z + sp58.z, D_ctx_80177A48[3], 500.0f, 0.0f);
D_ctx_80177A48[5] += D_ctx_80177A48[4];
if ((gCsFrameCount >= 401) && (gCsFrameCount < 1000)) {
if ((gCsFrameCount > 400) && (gCsFrameCount < 1000)) {
Math_SmoothStepToF(&D_ctx_80177A48[4], 0.5f, 1.0f, 0.003f, 0);
}
if (gCsFrameCount >= 1101) {
if (gCsFrameCount > 1100) {
Math_SmoothStepToF(&D_ctx_80177A48[4], 0.0f, 1.0f, 0.003f, 0);
}
if (gCsFrameCount == 1270) {
@ -3160,10 +3162,10 @@ void Corneria_80191160(Player* player) {
Audio_FadeOutAll(50);
}
if (gCsFrameCount > 1300) {
D_ctx_80178358 = 255;
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0;
D_ctx_8017835C = 8;
if (D_ctx_80178340 == 255) {
gFillScreenAlphaTarget = 255;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0;
gFillScreenAlphaStep = 8;
if (gFillScreenAlpha == 255) {
player->state_1C8 = PLAYERSTATE_1C8_6;
player->timer_1F8 = 0;
D_ctx_8017837C = 4;
@ -3184,17 +3186,17 @@ void Corneria_80191160(Player* player) {
AUDIO_PLAY_BGM(SEQ_ID_GOOD_END);
break;
case 330:
D_ctx_80177840 = 100;
gLevelClearScreenTimer = 100;
break;
case 470:
func_play_800A6148();
if (gTeamShields[1] > 0) {
if (gTeamShields[TEAM_ID_FALCO] > 0) {
Corneria_80190F74(&gActors[0], 0);
}
if (gTeamShields[2] > 0) {
if (gTeamShields[TEAM_ID_SLIPPY] > 0) {
Corneria_80190F74(&gActors[1], 1);
}
if (gTeamShields[3] > 0) {
if (gTeamShields[TEAM_ID_PEPPY] > 0) {
Corneria_80190F74(&gActors[2], 2);
}
break;
@ -3202,28 +3204,28 @@ void Corneria_80191160(Player* player) {
Radio_PlayMessage(gMsg_ID_2335, RCID_FOX);
break;
case 550:
if ((gTeamShields[2] == -1) || (gTeamShields[2] == 0)) {
if ((gTeamShields[TEAM_ID_SLIPPY] == -1) || (gTeamShields[TEAM_ID_SLIPPY] == 0)) {
Radio_PlayMessage(gMsg_ID_20333, RCID_ROB64);
} else {
Radio_PlayMessage(gMsg_ID_2300, RCID_SLIPPY);
}
break;
case 682:
if ((gTeamShields[3] == -1) || (gTeamShields[3] == 0)) {
if ((gTeamShields[TEAM_ID_PEPPY] == -1) || (gTeamShields[TEAM_ID_PEPPY] == 0)) {
Radio_PlayMessage(gMsg_ID_20332, RCID_ROB64);
} else {
Radio_PlayMessage(gMsg_ID_2310, RCID_PEPPY);
}
break;
case 816:
if ((gTeamShields[1] == -1) || (gTeamShields[1] == 0)) {
if ((gTeamShields[TEAM_ID_FALCO] == -1) || (gTeamShields[TEAM_ID_FALCO] == 0)) {
Radio_PlayMessage(gMsg_ID_20331, RCID_ROB64);
} else {
Radio_PlayMessage(gMsg_ID_2320, RCID_FALCO);
}
break;
case 1150:
if (gTeamShields[1] > 0) {
if (gTeamShields[TEAM_ID_FALCO] > 0) {
gActors[0].state = 1;
gActors[0].fwork[9] = 2.0f;
gActors[0].timer_0BC = 50;
@ -3232,7 +3234,7 @@ void Corneria_80191160(Player* player) {
}
break;
case 1190:
if (gTeamShields[2] > 0) {
if (gTeamShields[TEAM_ID_SLIPPY] > 0) {
gActors[1].state = 1;
gActors[1].fwork[9] = 2.0f;
gActors[1].timer_0BC = 50;
@ -3241,7 +3243,7 @@ void Corneria_80191160(Player* player) {
}
break;
case 1230:
if (gTeamShields[3] > 0) {
if (gTeamShields[TEAM_ID_PEPPY] > 0) {
gActors[2].state = 1;
gActors[2].fwork[9] = 2.0f;
gActors[2].timer_0BC = 50;

View File

@ -8,58 +8,58 @@
#include "assets/ast_training.h"
void Training_801988E0(void) {
if (D_ctx_80177E80 != 0) {
if (gRingPassCount != 0) {
RCP_SetupDL(&gMasterDisp, 0x53);
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255);
func_hud_800869A0(250.0f, 50.0f, D_ctx_80177E80, 1.0f, 0, 999);
func_hud_800869A0(250.0f, 50.0f, gRingPassCount, 1.0f, 0, 999);
}
}
void Training_ItemRing_Update(Item* item) {
void Training_ItemRing_Update(ItemTrainingRing* this) {
f32 var_fv0;
switch (item->state) {
switch (this->state) {
case 0:
item->obj.rot.z += 1.0f;
Math_SmoothStepToF(&item->scale, 1.0f, 1.0f, 0.05f, 0.0f);
if ((item->unk_44 == 0) && (gPlayer[0].unk_4DC == 0)) {
if (item->obj.rot.y == 0.0f) {
this->obj.rot.z += 1.0f;
Math_SmoothStepToF(&this->scale, 1.0f, 1.0f, 0.05f, 0.0f);
if ((this->unk_44 == 0) && (gPlayer[0].unk_4DC == 0)) {
if (this->obj.rot.y == 0.0f) {
var_fv0 = 550.0f;
} else {
var_fv0 = 1000.0f;
}
if (item->obj.pos.z > (gPlayer[0].unk_138 + var_fv0)) {
item->unk_44 = 1;
if (this->obj.pos.z > (gPlayer[0].unk_138 + var_fv0)) {
this->unk_44 = 1;
PRINTF("♪:リング未通過音\n"); // Ring not passed sound
AUDIO_PLAY_SFX(0x4900402F, gDefaultSfxSource, 4);
D_ctx_80177E80 = 0;
gRingPassCount = 0;
}
}
if (item->collected) {
item->state = 1;
item->timer_48 = 50;
item->info.unk_10 = 10000.0f;
if (this->collected) {
this->state = 1;
this->timer_48 = 50;
this->info.unk_10 = 10000.0f;
PRINTF("♪:リング通過音\n"); // Ring passing sound
AUDIO_PLAY_SFX(0x49008025, gDefaultSfxSource, 4);
D_ctx_80177E80++;
if ((item->obj.rot.x != 0.0f) && (D_ctx_80177E80 >= 100)) {
gRingPassCount++;
if ((this->obj.rot.x != 0.0f) && (gRingPassCount >= 100)) {
Radio_PlayMessage(gMsg_ID_20330, RCID_ROB64);
}
}
break;
case 1:
item->obj.pos.x += ((gPlayer[item->playerNum].pos.x - item->obj.pos.x) * 0.05f);
item->obj.pos.y += ((gPlayer[item->playerNum].pos.y - item->obj.pos.y) * 0.05f);
if (gPlayer[0].unk_238 != 0) {
item->obj.pos.z += ((gPlayer[item->playerNum].unk_138 - 300.0f) - item->obj.pos.z) * 0.05f;
this->obj.pos.x += ((gPlayer[this->playerNum].pos.x - this->obj.pos.x) * 0.05f);
this->obj.pos.y += ((gPlayer[this->playerNum].pos.y - this->obj.pos.y) * 0.05f);
if (gPlayer[0].cockpitView != 0) {
this->obj.pos.z += ((gPlayer[this->playerNum].unk_138 - 300.0f) - this->obj.pos.z) * 0.05f;
} else {
item->obj.pos.z += ((gPlayer[item->playerNum].unk_138 - item->obj.pos.z) * 0.05f);
this->obj.pos.z += ((gPlayer[this->playerNum].unk_138 - this->obj.pos.z) * 0.05f);
}
item->obj.rot.z += 22.0f;
Math_SmoothStepToAngle(&item->obj.rot.y, Math_RadToDeg(-gPlayer[item->playerNum].unk_058), 0.2f, 10.0f,
this->obj.rot.z += 22.0f;
Math_SmoothStepToAngle(&this->obj.rot.y, Math_RadToDeg(-gPlayer[this->playerNum].unk_058), 0.2f, 10.0f,
0.0f);
if (item->timer_48 == 0) {
Object_Kill(&item->obj, item->sfxSource);
if (this->timer_48 == 0) {
Object_Kill(&this->obj, this->sfxSource);
}
break;
}

View File

@ -11,20 +11,20 @@ void Training_80198C50(void) {
Object_58* obj58;
s32 i;
D_ctx_80178310 = SEGMENTED_TO_VIRTUAL(D_TR_6008EF8);
gLevelObjects = SEGMENTED_TO_VIRTUAL(D_TR_6008EF8);
Rand_SetSeed(1, 29000, 9876);
obj58 = gObjects58;
for (i = 0; i < 1000; i++) {
if (D_ctx_80178310[i].id >= 0) {
if (D_ctx_80178310[i].id <= 160) {
if (gLevelObjects[i].id >= 0) {
if (gLevelObjects[i].id <= 160) {
Object_58_Initialize(obj58);
obj58->obj.status = OBJ_ACTIVE;
obj58->obj.id = D_ctx_80178310[i].id;
obj58->obj.pos.x = D_ctx_80178310[i].xPos;
obj58->obj.pos.z = -D_ctx_80178310[i].zPos1;
obj58->obj.pos.y = D_ctx_80178310[i].yPos - RAND_FLOAT_SEEDED(300.0f);
obj58->obj.rot.y = D_ctx_80178310[i].rot.y;
obj58->obj.id = gLevelObjects[i].id;
obj58->obj.pos.x = gLevelObjects[i].xPos;
obj58->obj.pos.z = -gLevelObjects[i].zPos1;
obj58->obj.pos.y = gLevelObjects[i].yPos - RAND_FLOAT_SEEDED(300.0f);
obj58->obj.rot.y = gLevelObjects[i].rot.y;
Object_SetInfo(&obj58->info, obj58->obj.id);
obj58++;
}
@ -105,7 +105,7 @@ void Training_80199024(Actor* actor) {
sp54.y = actor->fwork[5] - actor->obj.pos.y;
sp54.x = actor->fwork[6] - actor->obj.pos.z;
if (!((actor->index + gGameFrameCount) & 7)) {
if (((actor->index + gGameFrameCount) % 8) == 0) {
actor->fwork[19] = Math_RadToDeg(Math_Atan2F(sp54.z, sp54.x));
actor->fwork[20] = Math_RadToDeg(Math_Atan2F(sp54.y, sqrtf(SQ(sp54.z) + SQ(sp54.x))));
}
@ -184,7 +184,7 @@ void Training_8019949C(void) {
var_v1 = 0;
}
if (!(gGameFrameCount & 3) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3)) {
if (((gGameFrameCount % 4) == 0) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3)) {
sp44.x = 0.0f;
sp44.y = 0.0f;
sp44.z = -15000.0f;
@ -229,16 +229,16 @@ void Training_8019949C(void) {
Radio_PlayMessage(D_i1_8019AE50[D_ctx_80177C8C].msg, RCID_TR);
D_ctx_80177C78 = D_i1_8019AE50[D_ctx_80177C8C].unk;
} else {
D_enmy2_80161690 = 80;
gCallTimer = 80;
D_ctx_80177C78 = 320;
}
D_ctx_80177C8C++;
}
if ((D_enmy2_80161690 != 0) && (gControllerPress[gMainController].button & R_CBUTTONS)) {
if ((gCallTimer != 0) && (gControllerPress[gMainController].button & R_CBUTTONS)) {
func_8001AF40(0);
D_enmy2_800CFF90 = 0;
D_enmy2_80161690 = 0;
gCallVoiceParam = 0;
gCallTimer = 0;
// This is ROB 64. Keep up the good work.
Radio_PlayMessage(gMsg_ID_20329, RCID_ROB64);
}

View File

@ -251,7 +251,7 @@ f32 Venom1_801920F0(f32* arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32* arg5
return temp;
}
void Venom1_801922DC(Object_4C* this) {
void Venom1_BossTrigger1_Update(Ve1BossTrigger1* this) {
Boss* boss = &gBosses[0];
s32 i;
@ -266,7 +266,7 @@ void Venom1_801922DC(Object_4C* this) {
}
}
void Venom1_80192358(Object_4C* this) {
void Venom1_BossTrigger2_Update(Ve1BossTrigger2* this) {
Boss* boss = &gBosses[0];
s32 i;
@ -281,30 +281,30 @@ void Venom1_80192358(Object_4C* this) {
}
}
void Venom1_801923C0(Object_4C* obj4C) {
void Venom1_BossTrigger3_Update(Ve1BossTrigger3* this) {
Boss* boss = &gBosses[0];
s32 i;
for (i = 0; i < 4; i++, boss++) {
if ((boss->obj.status != OBJ_FREE) && (boss->obj.id == OBJ_BOSS_319)) {
if (boss->obj.pos.z <= obj4C->obj.pos.z) {
D_i1_8019C0BC = (s32) obj4C->obj.rot.x + 1;
obj4C->obj.status = OBJ_FREE;
if (boss->obj.pos.z <= this->obj.pos.z) {
D_i1_8019C0BC = (s32) this->obj.rot.x + 1;
this->obj.status = OBJ_FREE;
}
break;
}
}
}
void Venom1_8019243C(Object_4C* obj4C) {
void Venom1_BossTrigger4_Update(Ve1BossTrigger4* this) {
Boss* boss = &gBosses[0];
s32 i;
for (i = 0; i < 4; i++, boss++) {
if ((boss->obj.status != OBJ_FREE) && (boss->obj.id == OBJ_BOSS_319)) {
if (boss->obj.pos.z <= obj4C->obj.pos.z) {
if (boss->obj.pos.z <= this->obj.pos.z) {
D_i1_8019C0C0 = 1;
obj4C->obj.status = OBJ_FREE;
this->obj.status = OBJ_FREE;
}
break;
}
@ -366,11 +366,11 @@ void Venom1_80192518(Actor* actor) {
if (((actor->obj.pos.z + 1100.0f - obj80->obj.pos.z) < 2200.0f) &&
((actor->obj.pos.z + 1100.0f - obj80->obj.pos.z) > 0.0f)) {
switch (obj80->obj.id) {
case 128:
case 130:
case OBJ_80_128:
case OBJ_80_130:
break;
case 129:
case OBJ_80_129:
var_ft5 = 600.0f;
break;
}
@ -433,7 +433,7 @@ void Venom1_80192518(Actor* actor) {
effect->unk_60.z = -effect->unk_60.z;
}
if (actor->iwork[0] & 1) {
if ((actor->iwork[0] % 2) != 0) {
effect->vel.y = -effect->vel.y;
}
}
@ -734,7 +734,7 @@ void Venom1_80192EB0(Actor* actor) {
if (Rand_ZeroOne() < 0.5f) {
effect->unk_60.z = -effect->unk_60.z;
}
if (actor->iwork[0] & 1) {
if ((actor->iwork[0] % 2) != 0) {
effect->vel.y = -effect->vel.y;
}
}
@ -802,12 +802,12 @@ void Venom1_801934D0(Actor* actor) {
}
void Venom1_80193540(Object_80* obj80) {
if (((gPlayer[0].unk_138 - obj80->obj.pos.z) <= 3500.0f) && !(gGameFrameCount & 3)) {
if (((gPlayer[0].unk_138 - obj80->obj.pos.z) <= 3500.0f) && ((gGameFrameCount % 4) == 0)) {
func_effect_8007C120(obj80->obj.pos.x, obj80->obj.pos.y, obj80->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.2f, 10);
}
}
void Venom1_Boss319_Init(Boss* boss) {
void Venom1_Boss319_Init(Boss319* this) {
s32 i;
s32 var_v0;
s32 j;
@ -817,17 +817,17 @@ void Venom1_Boss319_Init(Boss* boss) {
D_i1_8019C0BC = 0;
D_i1_8019C0C0 = 0;
gBossActive = 1;
boss->unk_05E = 1;
boss->fwork[2] = D_i1_8019A04C[boss->swork[13]][0];
boss->fwork[14] = D_i1_8019A04C[boss->swork[13]][1];
boss->health = 100;
boss->fwork[9] = 1.0f;
this->unk_05E = 1;
this->fwork[2] = D_i1_8019A04C[this->swork[13]][0];
this->fwork[14] = D_i1_8019A04C[this->swork[13]][1];
this->health = 100;
this->fwork[9] = 1.0f;
boss->swork[22] = boss->swork[21] = 0;
this->swork[22] = this->swork[21] = 0;
boss->fwork[13] = boss->fwork[12] = boss->fwork[6] = D_i1_8019AE00[boss->swork[21]].unk_0;
boss->fwork[17] = boss->obj.rot.y;
boss->obj.rot.y = 0.0f;
this->fwork[13] = this->fwork[12] = this->fwork[6] = D_i1_8019AE00[this->swork[21]].unk_0;
this->fwork[17] = this->obj.rot.y;
this->obj.rot.y = 0.0f;
for (i = 0; i < ARRAY_COUNTU(D_i1_8019B838); i++) {
D_i1_8019B838[i].unk_00 = D_i1_8019A820[i].unk_02;
@ -845,7 +845,7 @@ void Venom1_Boss319_Init(Boss* boss) {
D_i1_8019B838[i].unk_74 = D_i1_8019B838[i].unk_78 = 0.0f;
D_i1_8019B838[i].unk_7C = 0;
}
boss->fwork[11] = 1.0f;
this->fwork[11] = 1.0f;
for (i = 0; i < 33U; i++) {
D_i1_8019B7F0[i] = 0;
}
@ -853,8 +853,8 @@ void Venom1_Boss319_Init(Boss* boss) {
for (i = 0; i < ARRAY_COUNTU(D_i1_8019B838); i++) {
var_v0 += D_i1_8019A820[i].unk_02;
}
boss->swork[29] = boss->swork[30] = var_v0 + 100;
Animation_GetFrameData(D_i1_8019ACD4[boss->swork[5]], 0, boss->vwork);
this->swork[29] = this->swork[30] = var_v0 + 100;
Animation_GetFrameData(D_i1_8019ACD4[this->swork[5]], 0, this->vwork);
AUDIO_PLAY_BGM(SEQ_ID_VE_BOSS | SEQ_FLAG);
}
@ -1021,7 +1021,7 @@ void Venom1_80193D64(s32 limbIndex, Vec3f* rot, void* thisx) {
switch (limbIndex) {
case 7:
if (this->swork[11] & 1) {
if ((this->swork[11] % 2) != 0) {
Matrix_MultVec3f(gCalcMatrix, &D_i1_8019AD5C, (Vec3f*) &this->fwork[3]);
this->swork[11] &= ~1;
}
@ -1055,7 +1055,7 @@ void Venom1_80193D64(s32 limbIndex, Vec3f* rot, void* thisx) {
Matrix_RotateY(gGfxMatrix, var_s7->unk_30[var_s4].y * M_DTOR, 1);
Matrix_RotateX(gGfxMatrix, var_s7->unk_30[var_s4].x * M_DTOR, 1);
Matrix_RotateZ(gGfxMatrix, var_s7->unk_30[var_s4].z * M_DTOR, 1);
if ((s32) var_s7->unk_30[var_s4].z & 1) {
if (((s32) var_s7->unk_30[var_s4].z % 2) != 0) {
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255);
} else {
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 96, 96, 255, 255);
@ -1111,12 +1111,12 @@ void Venom1_80194398(Boss* boss) {
if (boss->swork[31] == 0) {
switch (boss->swork[32]) {
case 901:
if ((gTeamShields[2] > 0) && (gRadioState == 0)) {
if ((gTeamShields[TEAM_ID_SLIPPY] > 0) && (gRadioState == 0)) {
Radio_PlayMessage(gMsg_ID_4092, RCID_SLIPPY);
}
break;
case 1001:
if (gTeamShields[2] > 0) {
if (gTeamShields[TEAM_ID_SLIPPY] > 0) {
gShowBossHealth = 1;
gBossHealthBar = 255;
boss->swork[32] = 0;
@ -1594,7 +1594,7 @@ void Venom1_80194398(Boss* boss) {
case 0:
case 1:
for (spF4 = 0; spF4 < 33U; spF4++) {
if (!(gGameFrameCount & 3) && (D_i1_8019B7F0[spF4] != 0)) {
if (((gGameFrameCount % 4) == 0) && (D_i1_8019B7F0[spF4] != 0)) {
is4 = D_i1_8019A500[spF4];
if ((D_i1_8019B838[is4].unk_00 > 0) && ((is4 != 14) || (boss->state != 0))) {
D_i1_8019B838[is4].unk_00 -= 2;
@ -1614,7 +1614,7 @@ void Venom1_80194398(Boss* boss) {
}
break;
case 2:
if (!(gGameFrameCount & 3) && (boss->timer_05A == 0)) {
if (((gGameFrameCount % 4) == 0) && (boss->timer_05A == 0)) {
for (spF4 = 0; spF4 < 33U; spF4++) {
if ((D_i1_8019A500[spF4] == 15) && (D_i1_8019B7F0[spF4] != 0)) {
AUDIO_PLAY_SFX(0x31034064, boss->sfxSource, 4);
@ -1889,15 +1889,15 @@ void Venom1_80194398(Boss* boss) {
spF8.y = boss->obj.pos.y + boss->fwork[4];
spF8.z = boss->obj.pos.z + boss->fwork[5];
func_effect_8007BFFC(spF8.x, spF8.y, spF8.z, 0, 0, 0, 25.0f, 5);
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255;
D_ctx_80178340 = D_ctx_80178358 = 255;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255;
gFillScreenAlpha = gFillScreenAlphaTarget = 255;
break;
case 59:
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255;
D_ctx_80178340 = D_ctx_80178358 = 128;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255;
gFillScreenAlpha = gFillScreenAlphaTarget = 128;
break;
case 58:
D_ctx_80178340 = D_ctx_80178358 = 0;
gFillScreenAlpha = gFillScreenAlphaTarget = 0;
break;
case 50:
boss->swork[25] = 1;
@ -1913,16 +1913,16 @@ void Venom1_80194398(Boss* boss) {
boss->swork[28] = 9;
AUDIO_PLAY_SFX(0x29405084, boss->sfxSource, 4);
boss->swork[26] = 1;
boss->info.hitbox = D_edata_800CBF34;
boss->info.hitbox = gHitboxNone;
boss->unk_05E = 0;
func_effect_8007A568(boss->obj.pos.x, boss->obj.pos.y + 10.0f, boss->obj.pos.z, 40.0f);
gCameraShake = 40;
break;
case 12:
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255;
D_ctx_80178340 = 0;
D_ctx_80178358 = 255;
D_ctx_8017835C = 5;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255;
gFillScreenAlpha = 0;
gFillScreenAlphaTarget = 255;
gFillScreenAlphaStep = 5;
boss->obj.status = OBJ_DYING;
boss->timer_052 = 80;
break;
@ -2332,15 +2332,15 @@ void Venom1_80198310(Boss* boss) {
void Venom1_80198414(void) {
s32 i;
for (i = 1; i < ARRAY_COUNT(gTeamShields); i++) {
D_ctx_80177C38[i] = gSavedTeamShields[i];
D_ctx_801778F0[i] = gSavedTeamShields[i];
for (i = TEAM_ID_FALCO; i < ARRAY_COUNT(gTeamShields); i++) {
gPrevPlanetTeamShields[i] = gSavedTeamShields[i];
gPrevPlanetSavedTeamShields[i] = gSavedTeamShields[i];
gSavedTeamShields[i] = gTeamShields[i];
}
gBgColor = 0xFFFF; // 248, 248, 248
gNextGameState = GSTATE_PLAY;
gNextLevel = LEVEL_VENOM_2;
D_game_80161A2E = 2;
gNextLevelStage = 2;
D_ctx_80177C94 = gGoldRingCount[0];
D_ctx_80177C9C = gPlayer[0].shields + 1;
D_ctx_80177CA4 = gHitCount;

View File

@ -91,7 +91,7 @@ void Meteo_80187650(Actor* actor) {
actor->unk_048 = 995;
}
if ((actor->timer_0BC & 3) == 1) {
if ((actor->timer_0BC % 4U) == 1) {
func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 6.0f);
}
@ -133,7 +133,7 @@ void Meteo_801877C4(Actor* actor) {
actor->obj.pos.y = actor->fwork[1] + sp44.y;
if (actor->unk_0D0 != 0) {
func_enmy_80066254(actor);
Actor_Despawn(actor);
func_effect_8007A6F0(&actor->obj.pos, 0x2903A008);
Object_Kill(&actor->obj, actor->sfxSource);
func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y + 30.0f, actor->obj.pos.z, 5.0f);
@ -143,7 +143,7 @@ void Meteo_801877C4(Actor* actor) {
if (actor->timer_0BC == 0) {
actor->timer_0BC = 40;
if (actor->obj.pos.z < (gPlayer[0].unk_138 - 1000.0f)) {
func_effect_8007F11C(0x161, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 120.0f);
func_effect_8007F11C(OBJ_EFFECT_353, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 120.0f);
}
}
}
@ -156,7 +156,7 @@ void Meteo_8018795C(Actor* actor) {
actor->obj.rot.x += 3.3f;
if (actor->unk_0D0 != 0) {
func_enmy_80066254(actor);
Actor_Despawn(actor);
func_effect_8007A6F0(&actor->obj.pos, 0x2903A008);
Object_Kill(&actor->obj, actor->sfxSource);
func_effect_8007D0E0(actor->obj.pos.x - actor->vel.x, actor->obj.pos.y, actor->obj.pos.z - actor->vel.z, 8.0f);
@ -164,9 +164,9 @@ void Meteo_8018795C(Actor* actor) {
0.0f, 0.0f, 0.0f, 4.0f, 10);
}
if (!(gGameFrameCount & 7)) {
if (((gGameFrameCount % 8) == 0)) {
Math_Vec3fFromAngles(&vec, actor->obj.rot.x, actor->obj.rot.y, 100.0f);
func_effect_8007F04C(0x161, actor->obj.pos.x + (vec.x * 3.0f), actor->obj.pos.y + (vec.y * 3.0f),
func_effect_8007F04C(OBJ_EFFECT_353, actor->obj.pos.x + (vec.x * 3.0f), actor->obj.pos.y + (vec.y * 3.0f),
actor->obj.pos.z + (vec.z * 3.0f), actor->obj.rot.x, actor->obj.rot.y, actor->obj.rot.z,
0.0f, 0.0f, 0.0f, vec.x, vec.y, vec.z, 1.0f);
}
@ -187,7 +187,7 @@ void Meteo_80187B08(Actor* actor) {
actor->unk_048 = 995;
}
if (!(actor->timer_0BC & 3)) {
if ((actor->timer_0BC & 3) == 0) {
func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 6.0f);
}
@ -470,7 +470,7 @@ void Meteo_80188344(Boss* boss) {
void Meteo_801887D0(Boss* boss) {
s32 i;
if (boss->timer_054 & 1) {
if ((boss->timer_054 % 2) != 0) {
RCP_SetupDL_27();
gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 255, 0, 255);
}
@ -487,7 +487,7 @@ void Meteo_801887D0(Boss* boss) {
Matrix_RotateZ(gGfxMatrix, M_DTOR * 90.0f * i, 1);
Matrix_Translate(gGfxMatrix, 0.0f, 156.0f, 930.0f, 1);
if (gGameFrameCount & 1) {
if ((gGameFrameCount % 2) != 0) {
Matrix_Scale(gGfxMatrix, 6.0f, 9.0f, 5.0f, 1);
} else {
Matrix_Scale(gGfxMatrix, 4.0f, 7.0f, 5.0f, 1);
@ -501,37 +501,37 @@ void Meteo_801887D0(Boss* boss) {
}
}
void Meteo_Boss297_Init(Boss* boss) {
void Meteo_Boss297_Init(Boss297* this) {
s32 i;
AUDIO_PLAY_BGM(D_boss_800C9E90[gCurrentLevel]);
gBossActive = 1;
boss->swork[2] = 40;
boss->swork[3] = 40;
boss->swork[4] = 40;
boss->swork[5] = 40;
boss->swork[7] = 180;
boss->swork[8] = 180;
boss->swork[6] = 150;
boss->fwork[0] = -10.0f;
boss->fwork[9] = -3000.0f;
boss->fwork[15] = 8.0f;
this->swork[2] = 40;
this->swork[3] = 40;
this->swork[4] = 40;
this->swork[5] = 40;
this->swork[7] = 180;
this->swork[8] = 180;
this->swork[6] = 150;
this->fwork[0] = -10.0f;
this->fwork[9] = -3000.0f;
this->fwork[15] = 8.0f;
i = boss->unk_044 = 1;
i = this->unk_044 = 1;
Boss_Initialize(&gBosses[i]);
gBosses[i].obj.status = OBJ_INIT;
gBosses[i].obj.id = OBJ_BOSS_298;
gBosses[i].obj.pos.x = boss->obj.pos.x;
gBosses[i].obj.pos.y = boss->obj.pos.y;
gBosses[i].obj.pos.z = boss->obj.pos.z;
gBosses[i].obj.pos.x = this->obj.pos.x;
gBosses[i].obj.pos.y = this->obj.pos.y;
gBosses[i].obj.pos.z = this->obj.pos.z;
Object_SetInfo(&gBosses[i].info, gBosses[i].obj.id);
Radio_PlayMessage(gMsg_ID_3300, RCID_BOSS_METEO);
AUDIO_PLAY_SFX(0x3102505AU, boss->sfxSource, 4U);
AUDIO_PLAY_SFX(0x3102505AU, this->sfxSource, 4U);
}
void Meteo_80188B84(Effect* effect, f32 x, f32 y, f32 z, f32 xRot, f32 yRot, f32 arg6, f32 arg7) {
@ -663,7 +663,7 @@ void Meteo_80188FAC(Effect* effect) {
effect->vel.y = dest.y;
effect->vel.z = dest.z;
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
Meteo_80188F2C(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, effect->obj.rot.x,
effect->obj.rot.y, effect->obj.rot.z, 5.0f);
}
@ -760,7 +760,7 @@ void Meteo_801892F0(Boss* boss, s32 arg1) {
}
void Meteo_80189624(void) {
if (gGameFrameCount & 1) {
if ((gGameFrameCount % 2) != 0) {
D_ctx_801784B8 = D_ctx_801784C4 = 0.0f;
D_ctx_801784BC = D_ctx_801784C8 = 5.0f;
D_ctx_801784C0 = D_ctx_801784CC = 0.0f;
@ -792,7 +792,7 @@ void Meteo_8018978C(Boss* boss) {
Matrix_RotateX(gCalcMatrix, boss->obj.rot.x * M_DTOR, 1);
Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, 1);
if (gGameFrameCount & 16) {
if (gGameFrameCount & 0x10) {
boss->swork[19] += 32;
if (boss->swork[19] > 128) {
boss->swork[19] = 128;
@ -804,16 +804,16 @@ void Meteo_8018978C(Boss* boss) {
}
}
if (!(gGameFrameCount & 0x38)) {
boss->fwork[3] = D_i2_80195534[gGameFrameCount & 7];
boss->fwork[4] = D_i2_80195534[gGameFrameCount & 7];
boss->fwork[5] = D_i2_80195534[gGameFrameCount & 7];
boss->fwork[6] = D_i2_80195534[gGameFrameCount & 7];
if ((gGameFrameCount & 0x38) == 0) {
boss->fwork[3] = D_i2_80195534[gGameFrameCount % 8U];
boss->fwork[4] = D_i2_80195534[gGameFrameCount % 8U];
boss->fwork[5] = D_i2_80195534[gGameFrameCount % 8U];
boss->fwork[6] = D_i2_80195534[gGameFrameCount % 8U];
}
if (!((gGameFrameCount + 20) & 0x38)) {
boss->fwork[7] = D_i2_80195534[(gGameFrameCount + 20) & 7];
boss->fwork[8] = D_i2_80195534[(gGameFrameCount + 20) & 7];
if (((gGameFrameCount + 20) & 0x38) == 0) {
boss->fwork[7] = D_i2_80195534[(gGameFrameCount + 20) % 8U];
boss->fwork[8] = D_i2_80195534[(gGameFrameCount + 20) % 8U];
}
if (boss->swork[9] != 0) {
@ -1261,20 +1261,20 @@ void Meteo_8018978C(Boss* boss) {
Math_SmoothStepToF(&boss->fwork[0x15], 4.0f, 1.0f, 0.1f, 0.0f);
if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_6) {
D_ctx_80178348 = D_ctx_80178340 = D_ctx_80178350 = D_ctx_80178354 = 0;
gFillScreenRed = gFillScreenAlpha = gFillScreenGreen = gFillScreenBlue = 0;
if ((boss->timer_050 == 10) || (boss->timer_050 == 30) || (boss->timer_050 == 50) ||
(boss->timer_050 == 70)) {
D_ctx_80178340 = 150;
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255;
gFillScreenAlpha = 150;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255;
Meteo_80187E38(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z + 1300.0f,
boss->fwork[12] + boss->obj.rot.z);
boss->fwork[12] = RAND_FLOAT(360.0f);
}
if ((boss->timer_050 == 13) || (boss->timer_050 == 33) || (boss->timer_050 == 53) ||
(boss->timer_050 == 73)) {
D_ctx_80178340 = 150;
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255;
gFillScreenAlpha = 150;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255;
}
if (boss->timer_050 == 0) {
boss->state = 7;
@ -1327,7 +1327,7 @@ void Meteo_8018978C(Boss* boss) {
if (gCsFrameCount == 400) {
AUDIO_PLAY_BGM(SEQ_ID_BOSS_RESUME | SEQ_FLAG);
if (gTeamShields[1] > 0) {
if (gTeamShields[TEAM_ID_FALCO] > 0) {
Radio_PlayMessage(gMsg_ID_3345, RCID_BOSS_METEO);
} else {
Radio_PlayMessage(gMsg_ID_3350, RCID_BOSS_METEO);
@ -1347,7 +1347,7 @@ void Meteo_8018978C(Boss* boss) {
}
if (boss->swork[0] < 10) {
boss->swork[0] += 2;
if (boss->swork[0] >= 11) {
if (boss->swork[0] > 10) {
boss->swork[0] = 10;
}
}
@ -1405,7 +1405,7 @@ void Meteo_8018978C(Boss* boss) {
boss->timer_050 = 70;
boss->fwork[15] = 8.0f;
AUDIO_PLAY_SFX(0x11015034U, boss->sfxSource, 4U);
} else if ((boss->timer_050 & 1) == 1) {
} else if ((boss->timer_050 % 2U) == 1) {
Meteo_80188088(boss);
}
break;
@ -1418,17 +1418,17 @@ void Meteo_8018978C(Boss* boss) {
Radio_PlayMessage(gMsg_ID_3360, RCID_FOX);
}
if (!(gGameFrameCount & 7) && (Rand_ZeroOne() < 0.5f)) {
if (((gGameFrameCount % 8) == 0) && (Rand_ZeroOne() < 0.5f)) {
boss->timer_05C = 4;
}
Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_i2_80195430[RAND_INT(19.9f)], &dest);
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
func_effect_8007C120(boss->obj.pos.x + dest.x, boss->obj.pos.y + dest.y, boss->obj.pos.z + dest.z,
boss->vel.x, boss->vel.y, boss->vel.z, 0.3f, 20);
}
if (!(gGameFrameCount & 3)) {
if (((gGameFrameCount % 4) == 0)) {
func_effect_8007BFFC(boss->obj.pos.x + dest.x, boss->obj.pos.y + dest.y, boss->obj.pos.z + dest.z,
boss->vel.x, boss->vel.y, boss->vel.z, 10.0f, 10);
}
@ -1501,7 +1501,7 @@ void Meteo_8018978C(Boss* boss) {
void Meteo_8018B7C4(s32 arg0) {
f32 effect = arg0 * 0.83333f;
if (gGameFrameCount & 1) {
if ((gGameFrameCount % 2) != 0) {
effect *= 1.1f;
}
@ -1603,7 +1603,7 @@ void Meteo_8018BACC(Boss* boss) {
if (boss->swork[2 + i] != 0) {
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, boss->swork[19], 255);
if (boss->swork[9 + i] & 1) {
if ((boss->swork[9 + i] % 2) != 0) {
gDPSetPrimColor(gMasterDisp++, 0, 0, 80, 0, 0, 255);
}
@ -1676,7 +1676,7 @@ void Meteo_8018BACC(Boss* boss) {
Matrix_SetGfxMtx(&gMasterDisp);
Matrix_Push(&gGfxMatrix);
if (gGameFrameCount & 1) {
if ((gGameFrameCount % 2) != 0) {
Matrix_Scale(gGfxMatrix, var_fs1 * 2.5f, var_fs1 * 2.5f, var_fs1 * 2.5f, 1);
} else {
Matrix_Scale(gGfxMatrix, var_fs1 * 3.0f, var_fs1 * 3.0f, var_fs1 * 3.0f, 1);
@ -1687,7 +1687,7 @@ void Meteo_8018BACC(Boss* boss) {
Matrix_Pop(&gGfxMatrix);
Matrix_RotateX(gGfxMatrix, -M_PI / 6, 1);
if (gGameFrameCount & 1) {
if ((gGameFrameCount % 2) != 0) {
Matrix_RotateY(gGfxMatrix, M_PI, 1);
}
Matrix_Scale(gGfxMatrix, 2.0f, 2.0f * var_fs1, 2.0f, 1);
@ -1703,7 +1703,7 @@ void Meteo_8018BACC(Boss* boss) {
gDPSetPrimColor(gMasterDisp++, 0, 0, 160, 255, 160, 255);
Matrix_Push(&gGfxMatrix);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 1300.0f, 1);
if (gGameFrameCount & 1) {
if ((gGameFrameCount % 2) != 0) {
Matrix_Scale(gGfxMatrix, var_fs1 * 0.8f, var_fs1 * 0.8f, var_fs1 * 0.8f, 1);
} else {
Matrix_Scale(gGfxMatrix, var_fs1, var_fs1, var_fs1, 1);
@ -1728,7 +1728,7 @@ void Meteo_8018BACC(Boss* boss) {
Matrix_Translate(gGfxMatrix, 700.0f, 0.0f, -(1235.0f - ((var_fs0 - 1.0f) * 89.2f)), 1);
if (gGameFrameCount & 1) {
if ((gGameFrameCount % 2) != 0) {
Matrix_Scale(gGfxMatrix, var_fs0, var_fs0, var_fs0, 1);
} else {
Matrix_Scale(gGfxMatrix, var_fs0 * 1.1f, var_fs0 * 1.1f, var_fs0 * 1.1f, 1);
@ -1740,7 +1740,7 @@ void Meteo_8018BACC(Boss* boss) {
Matrix_Push(&gGfxMatrix);
Matrix_Translate(gGfxMatrix, -700.0f, 0.0f, -(1235.0f - ((var_fs0 - 1.0f) * 89.2f)), 1);
if (gGameFrameCount & 1) {
if ((gGameFrameCount % 2) != 0) {
Matrix_Scale(gGfxMatrix, var_fs0, var_fs0, var_fs0, 1);
} else {
Matrix_Scale(gGfxMatrix, var_fs0 * 1.1f, var_fs0 * 1.1f, var_fs0 * 1.1f, 1);
@ -1893,7 +1893,7 @@ void Meteo_8018CD8C(Player* player) {
Vec3f sp58;
Vec3f sp4C;
D_ctx_8017835C = 4;
gFillScreenAlphaStep = 4;
PRINTF("Demo_Time %d\n");
@ -1901,13 +1901,13 @@ void Meteo_8018CD8C(Player* player) {
case 0:
gCsFrameCount = 0;
if (gTeamShields[1] > 0) {
if (gTeamShields[TEAM_ID_FALCO] > 0) {
Meteo_8018C77C(actor0, 0);
}
if (gTeamShields[2] > 0) {
if (gTeamShields[TEAM_ID_SLIPPY] > 0) {
Meteo_8018C77C(actor1, 1);
}
if (gTeamShields[3] > 0) {
if (gTeamShields[TEAM_ID_PEPPY] > 0) {
Meteo_8018C77C(actor2, 2);
}
@ -2065,7 +2065,7 @@ void Meteo_8018CD8C(Player* player) {
if (player->timer_1F8 == 0) {
AUDIO_PLAY_BGM(gBgmSeqId);
D_ctx_80177838 = 80;
gLevelStatusScreenTimer = 80;
player->state_1C8 = PLAYERSTATE_1C8_3;
player->unk_1D0 = 0;
player->timer_1F8 = 0;
@ -2088,13 +2088,13 @@ void Meteo_8018CD8C(Player* player) {
switch (gCsFrameCount) {
case 500:
if ((gTeamShields[2] > 0) && (gTeamShields[3] > 0)) {
if ((gTeamShields[TEAM_ID_SLIPPY] > 0) && (gTeamShields[TEAM_ID_PEPPY] > 0)) {
Radio_PlayMessage(gMsg_ID_3005, RCID_SLIPPY);
}
break;
case 600:
if ((gTeamShields[2] > 0) && (gTeamShields[3] > 0)) {
if ((gTeamShields[TEAM_ID_SLIPPY] > 0) && (gTeamShields[TEAM_ID_PEPPY] > 0)) {
Radio_PlayMessage(gMsg_ID_3010, RCID_PEPPY);
}
break;
@ -2156,7 +2156,7 @@ void Meteo_8018DCE4(Effect* effect) {
Matrix_RotateX(gGfxMatrix, effect->obj.rot.x * M_DTOR, 1);
Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2 * 3.0f, 1);
if (gGameFrameCount & 1) {
if ((gGameFrameCount % 2) != 0) {
Matrix_RotateZ(gGfxMatrix, M_PI, 1);
}
@ -2323,10 +2323,10 @@ void Meteo_8018E084(Player* player) {
}
if (gCsFrameCount > 1465) {
D_ctx_80178358 = 255;
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0;
D_ctx_8017835C = 8;
if (D_ctx_80178340 == 255) {
gFillScreenAlphaTarget = 255;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0;
gFillScreenAlphaStep = 8;
if (gFillScreenAlpha == 255) {
player->state_1C8 = PLAYERSTATE_1C8_6;
player->timer_1F8 = 0;
D_ctx_8017837C = 4;
@ -2347,20 +2347,20 @@ void Meteo_8018E084(Player* player) {
Object_Kill(&gActors[1].obj, gActors[1].sfxSource);
Object_Kill(&gActors[2].obj, gActors[2].sfxSource);
if (gTeamShields[1] > 0) {
if (gTeamShields[TEAM_ID_FALCO] > 0) {
Meteo_8018DF08(&gActors[0], 0);
}
if (gTeamShields[2] > 0) {
if (gTeamShields[TEAM_ID_SLIPPY] > 0) {
Meteo_8018DF08(&gActors[1], 1);
}
if (gTeamShields[3] > 0) {
if (gTeamShields[TEAM_ID_PEPPY] > 0) {
Meteo_8018DF08(&gActors[2], 2);
}
Meteo_8018DF08(&gActors[3], 3);
break;
case 370:
D_ctx_80177840 = 100;
gLevelClearScreenTimer = 100;
break;
case 450:
@ -2368,7 +2368,7 @@ void Meteo_8018E084(Player* player) {
break;
case 538:
switch (gTeamShields[2]) {
switch (gTeamShields[TEAM_ID_SLIPPY]) {
case -1:
Radio_PlayMessage(gMsg_ID_20333, RCID_ROB64);
break;
@ -2382,7 +2382,7 @@ void Meteo_8018E084(Player* player) {
break;
case 685:
switch (gTeamShields[3]) {
switch (gTeamShields[TEAM_ID_PEPPY]) {
case -1:
Radio_PlayMessage(gMsg_ID_20332, RCID_ROB64);
break;
@ -2396,7 +2396,7 @@ void Meteo_8018E084(Player* player) {
break;
case 831:
switch (gTeamShields[1]) {
switch (gTeamShields[TEAM_ID_FALCO]) {
case -1:
Radio_PlayMessage(gMsg_ID_20331, RCID_ROB64);
break;

View File

@ -89,7 +89,7 @@ void SectorX_8018F330(Actor* actor) {
break;
}
if (!(gGameFrameCount & 3) && (Rand_ZeroOne() < 0.2f)) {
if (((gGameFrameCount % 4) == 0) && (Rand_ZeroOne() < 0.2f)) {
SectorX_8018F1DC(actor);
}
@ -101,7 +101,7 @@ void SectorX_8018F330(Actor* actor) {
Radio_PlayMessage(gMsg_ID_4111, RCID_SLIPPY);
func_effect_8007A6F0(&actor->obj.pos, 0x2903A008);
gBosses[0].swork[6] = 0;
gTeamShields[2] = -2;
gTeamShields[TEAM_ID_SLIPPY] = -2;
gPlayer[0].state_1C8 = PLAYERSTATE_1C8_0;
actor->timer_0BC = 200;
actor->iwork[14] = 3;
@ -120,7 +120,7 @@ void SectorX_8018F330(Actor* actor) {
actor->obj.rot.x += 5.5f;
actor->obj.rot.y += 5.0f;
if (!(gGameFrameCount & 7)) {
if (((gGameFrameCount % 8) == 0)) {
func_effect_8007D10C(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 1.5f);
}
@ -133,7 +133,7 @@ void SectorX_8018F330(Actor* actor) {
Math_SmoothStepToF(&gPlayer[0].camEye.y, actor->obj.pos.y, actor->fwork[1], 20.0f, 0.0f);
if (actor->timer_0BC == 0) {
gPlayer[0].state_1C8 = PLAYERSTATE_1C8_3;
if (gPlayer[0].unk_238 != 0) {
if (gPlayer[0].cockpitView != 0) {
func_play_800B5D30(&gPlayer[0], 1);
}
D_game_80161A44 = 12800.0f;
@ -473,7 +473,7 @@ void SectorX_80190078(Boss* boss) {
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1);
func_boss_80042EC0(boss);
boss->info.hitbox = D_edata_800CBF34;
boss->info.hitbox = gHitboxNone;
}
boss->timer_054 = 20;
@ -526,7 +526,7 @@ void SectorX_80190078(Boss* boss) {
if (fabsf(Math_SmoothStepToF(&boss->fwork[16], 0.0f, 0.1f, 10.0f, 0)) < 8.0f) {
Math_SmoothStepToF(&boss->fwork[14], 0.0f, 0.2f, 10.0f, 0);
if (!(boss->timer_050 & 7)) {
if ((boss->timer_050 % 8) == 0) {
func_effect_8007C120(boss->obj.pos.x + 312.0f, boss->obj.pos.y, boss->obj.pos.z - 173.0f,
boss->vel.x, boss->vel.y, boss->vel.z, 0.2f, 8);
}
@ -534,7 +534,7 @@ void SectorX_80190078(Boss* boss) {
if (fabsf(Math_SmoothStepToF(&boss->fwork[19], 0.0f, 0.1f, 10.0f, 0)) < 8.0f) {
Math_SmoothStepToF(&boss->fwork[17], 0.0f, 0.2f, 10.0f, 0);
if (!(boss->timer_050 & 7)) {
if ((boss->timer_050 % 8) == 0) {
func_effect_8007C120(boss->obj.pos.x - 312.0f, boss->obj.pos.y, boss->obj.pos.z - 173.0f,
boss->vel.x, boss->vel.y, boss->vel.z, 0.2f, 8);
}
@ -632,7 +632,7 @@ void SectorX_80190078(Boss* boss) {
boss->fwork[3] = gPlayer[0].pos.x;
boss->fwork[2] = gPlayer[0].pos.y;
if (boss->unk_04C >= 61) {
if (boss->unk_04C > 60) {
boss->fwork[1] = -1000.0f;
Math_SmoothStepToF(&boss->fwork[42], 100.0f, 1.0f, 20.0f, 0);
boss->fwork[44] = 10.0f;
@ -943,7 +943,7 @@ void SectorX_80190078(Boss* boss) {
Math_SmoothStepToF(&boss->fwork[0], 1.0f, 1.0f, 0.05f, 0);
boss->unk_04C++;
if (!(boss->unk_04C & 15)) {
if ((boss->unk_04C % 16) == 0) {
AUDIO_PLAY_SFX(0x2902401C, boss->sfxSource, 4);
}
@ -951,7 +951,7 @@ void SectorX_80190078(Boss* boss) {
boss->unk_04C = 0;
boss->fwork[0] = 0.0f;
if ((gBossFrameCount < 2200) || (gTeamShields[2] <= 0)) {
if ((gBossFrameCount < 2200) || (gTeamShields[TEAM_ID_SLIPPY] <= 0)) {
if (boss->health > 150) {
boss->state = 8;
} else {
@ -982,13 +982,13 @@ void SectorX_80190078(Boss* boss) {
} else if (boss->timer_050 > 200) {
boss->fwork[3] = -1000.0f;
boss->fwork[1] = -2500.0f;
if (!(gGameFrameCount & 15)) {
if ((gGameFrameCount % 16) == 0) {
AUDIO_PLAY_SFX(0x2902401C, boss->sfxSource, 4);
}
} else if (boss->timer_050 > 100) {
boss->fwork[3] = 0;
boss->fwork[1] = -500.0f;
if (!(gGameFrameCount & 0xF)) {
if (((gGameFrameCount % 16) == 0)) {
AUDIO_PLAY_SFX(0x2902401C, boss->sfxSource, 4);
}
} else {
@ -1011,7 +1011,7 @@ void SectorX_80190078(Boss* boss) {
boss->obj.rot.y = 0.0f;
boss->unk_04C = 0;
boss->fwork[0] = 0.0f;
if ((gBossFrameCount < 2200) || (gTeamShields[2] <= 0)) {
if ((gBossFrameCount < 2200) || (gTeamShields[TEAM_ID_SLIPPY] <= 0)) {
boss->state = 9;
} else {
boss->state = 85;
@ -1038,17 +1038,17 @@ void SectorX_80190078(Boss* boss) {
boss->unk_04C = Animation_GetFrameCount(&D_SX_601C690);
}
if (!(boss->timer_050 & 3)) {
if ((boss->timer_050 & 3) == 0) {
func_effect_8007D2C8(RAND_FLOAT_CENTERED(500.0f) + boss->obj.pos.x,
RAND_FLOAT_CENTERED(500.0f) + boss->obj.pos.y, boss->obj.pos.z + 100.0f,
RAND_FLOAT(5.0f) + 5.0f);
}
if ((!(gGameFrameCount & 7)) && (Rand_ZeroOne() < 0.5f)) {
if ((((gGameFrameCount % 8) == 0)) && (Rand_ZeroOne() < 0.5f)) {
boss->timer_05C = 4;
}
if (!(boss->timer_050 & 3)) {
if ((boss->timer_050 & 3) == 0) {
func_effect_8007C120(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, boss->vel.x, boss->vel.y,
boss->vel.z, 0.3f, 10);
}
@ -1076,7 +1076,7 @@ void SectorX_80190078(Boss* boss) {
gPlayer[0].unk_234 = 1;
}
Object_Kill(&boss->obj, boss->sfxSource);
D_ctx_80177930 = boss->swork[6];
gNextPlanetPath = boss->swork[6];
}
break;
@ -1094,9 +1094,9 @@ void SectorX_80190078(Boss* boss) {
if (boss->swork[1] > 50) {
boss->swork[1] = 0;
}
func_effect_8007F11C(377, boss->fwork[20] + boss->obj.pos.x, boss->fwork[21] + boss->obj.pos.y,
func_effect_8007F11C(OBJ_EFFECT_377, boss->fwork[20] + boss->obj.pos.x, boss->fwork[21] + boss->obj.pos.y,
boss->fwork[22] + boss->obj.pos.z, 100.0f);
func_effect_8007F11C(377, boss->fwork[23] + boss->obj.pos.x, boss->fwork[24] + boss->obj.pos.y,
func_effect_8007F11C(OBJ_EFFECT_377, boss->fwork[23] + boss->obj.pos.x, boss->fwork[24] + boss->obj.pos.y,
boss->fwork[25] + boss->obj.pos.z, 100.0f);
}
} else {
@ -1153,7 +1153,7 @@ bool SectorX_80192AF0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void*
*dList = NULL;
}
if (!(boss->timer_05C & 1)) {
if ((boss->timer_05C % 2) == 0) {
RCP_SetupDL(&gMasterDisp, 0x1D);
} else {
RCP_SetupDL(&gMasterDisp, 0x1B);
@ -1164,7 +1164,7 @@ bool SectorX_80192AF0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void*
case 1:
rot->x += boss->fwork[4] + boss->fwork[5];
rot->z += boss->fwork[6] + boss->fwork[7];
if (boss->timer_054 & 1) {
if ((boss->timer_054 % 2) != 0) {
RCP_SetupDL_27();
gDPSetPrimColor(gMasterDisp++, 0, 0, 64, 64, 255, 255);
}
@ -1189,7 +1189,7 @@ bool SectorX_80192AF0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void*
gSPDisplayList(gMasterDisp++, *dList);
if (boss->swork[4] == 0) {
RCP_SetupDL(&gMasterDisp, 0x29);
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255);
} else {
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255);
@ -1353,7 +1353,7 @@ void SectorX_80193434(Boss* boss) {
if (fwork > 50.0f) {
fwork = 50.0f;
}
if (gGameFrameCount & 1) {
if ((gGameFrameCount % 2) != 0) {
fwork *= 1.2f;
}
Matrix_Push(&gGfxMatrix);
@ -1369,7 +1369,7 @@ void SectorX_80193434(Boss* boss) {
if (fwork > 50.0f) {
fwork = 50.0f;
}
if (gGameFrameCount & 1) {
if ((gGameFrameCount % 2) != 0) {
fwork *= 1.2f;
}
Matrix_Push(&gGfxMatrix);
@ -1389,7 +1389,7 @@ void SectorX_80193434(Boss* boss) {
if (fwork > 4.0f) {
fwork = 4.0f;
}
if (gGameFrameCount & 1) {
if ((gGameFrameCount % 2) != 0) {
fwork *= 1.2f;
}
Matrix_Push(&gGfxMatrix);
@ -1471,11 +1471,11 @@ void SectorX_80193A30(Player* player) {
player->camAt.z = gCsCamAtZ = -1000.0f;
player->unk_034 = -5.0f;
player->unk_0D0 = 0.0f;
D_ctx_80178340 = 255;
gFillScreenAlpha = 255;
/* fallthrough */
case 1:
if (gCsFrameCount < 3) {
D_ctx_80178340 = 255;
gFillScreenAlpha = 255;
}
D_ctx_80177A48[0] = 0.5f;
gCsCamAtX = gActors[5].obj.pos.x;
@ -1531,7 +1531,7 @@ void SectorX_80193A30(Player* player) {
break;
case 3:
if (gCsFrameCount >= 201) {
if (gCsFrameCount > 200) {
gCsCamAtX = player->pos.x;
gCsCamAtY = player->pos.y;
gCsCamAtZ = player->pos.z;
@ -1544,23 +1544,23 @@ void SectorX_80193A30(Player* player) {
switch (gCsFrameCount) {
case 195:
if (gTeamShields[1] > 0) {
if (gTeamShields[TEAM_ID_FALCO] > 0) {
SectorX_801938D8(&gActors[0], 0);
}
break;
case 213:
if (gTeamShields[2] > 0) {
if (gTeamShields[TEAM_ID_SLIPPY] > 0) {
SectorX_801938D8(&gActors[1], 1);
}
break;
case 229:
if (gTeamShields[3] > 0) {
if (gTeamShields[TEAM_ID_PEPPY] > 0) {
SectorX_801938D8(&gActors[2], 2);
}
break;
}
if (gCsFrameCount >= 301) {
if (gCsFrameCount > 300) {
player->unk_1D0 += 1;
player->timer_1F8 = 40;
D_ctx_80177A48[0] = 0.0f;
@ -1591,7 +1591,7 @@ void SectorX_80193A30(Player* player) {
if (player->timer_1F8 == 0) {
player->unk_0D0 = D_play_80161A54;
AUDIO_PLAY_BGM(gBgmSeqId);
D_ctx_80177838 = 80;
gLevelStatusScreenTimer = 80;
player->state_1C8 = PLAYERSTATE_1C8_3;
player->unk_1D0 = player->timer_1F8 = player->timer_1FC = 0;
player->camEye.y = player->pos.y * player->unk_148 + 50.0f;
@ -1707,9 +1707,9 @@ void SectorX_80194728(Player* player) {
func_play_800A6148();
case 1:
if (gCsFrameCount >= 991) {
if (gCsFrameCount > 990) {
Math_SmoothStepToF(D_ctx_80177A48 + 3, 0.0f, 0.1f, 0.01f, 0.0f);
} else if (gCsFrameCount >= 121) {
} else if (gCsFrameCount > 120) {
Math_SmoothStepToF(D_ctx_80177A48 + 3, -0.5f, 0.1f, 0.02f, 0.0f);
Math_SmoothStepToF(D_ctx_80177A48 + 4, 300.0f, 0.1f, 2.0f, 0.0f);
Math_SmoothStepToF(D_ctx_80177A48 + 5, -50.0f, 0.1f, 1.0f, 0.0f);
@ -1750,10 +1750,10 @@ void SectorX_80194728(Player* player) {
Audio_FadeOutAll(10);
}
if (gCsFrameCount >= 1196) {
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0;
D_ctx_80178358 = 255;
if (D_ctx_80178340 == 255) {
if (gCsFrameCount > 1195) {
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0;
gFillScreenAlphaTarget = 255;
if (gFillScreenAlpha == 255) {
player->state_1C8 = PLAYERSTATE_1C8_6;
D_ctx_8017837C = 4;
player->timer_1F8 = 0;
@ -1774,13 +1774,13 @@ void SectorX_80194728(Player* player) {
break;
case 100:
if (gTeamShields[1] > 0) {
if (gTeamShields[TEAM_ID_FALCO] > 0) {
SectorX_801944D4(&gActors[1], 0);
}
if (gTeamShields[2] > 0) {
if (gTeamShields[TEAM_ID_SLIPPY] > 0) {
SectorX_801944D4(&gActors[2], 1);
}
if (gTeamShields[3] > 0) {
if (gTeamShields[TEAM_ID_PEPPY] > 0) {
SectorX_801944D4(&gActors[3], 2);
}
break;
@ -1790,7 +1790,7 @@ void SectorX_80194728(Player* player) {
break;
case 60:
D_ctx_80177840 = 100;
gLevelClearScreenTimer = 100;
break;
case 910:
@ -1825,14 +1825,14 @@ void SectorX_80194728(Player* player) {
player->unk_190 = 5.0f;
break;
}
if (gTeamShields[2] != -2) {
if (gTeamShields[TEAM_ID_SLIPPY] != -2) {
switch (gCsFrameCount) {
case 140:
Radio_PlayMessage(gMsg_ID_20010, RCID_FOX);
break;
case 228:
switch (gTeamShields[2]) {
switch (gTeamShields[TEAM_ID_SLIPPY]) {
case -1:
Radio_PlayMessage(gMsg_ID_20339, RCID_ROB64);
break;
@ -1848,7 +1848,7 @@ void SectorX_80194728(Player* player) {
break;
case 375:
switch (gTeamShields[3]) {
switch (gTeamShields[TEAM_ID_PEPPY]) {
case -1:
Radio_PlayMessage(gMsg_ID_20338, RCID_ROB64);
break;
@ -1865,7 +1865,7 @@ void SectorX_80194728(Player* player) {
case 521:
func_demo_80048AC0(1);
switch (gTeamShields[1]) {
switch (gTeamShields[TEAM_ID_FALCO]) {
case -1:
Radio_PlayMessage(gMsg_ID_20337, RCID_ROB64);
break;
@ -1891,7 +1891,7 @@ void SectorX_80194728(Player* player) {
break;
case 423:
switch (gTeamShields[3]) {
switch (gTeamShields[TEAM_ID_PEPPY]) {
case -1:
Radio_PlayMessage(gMsg_ID_20338, RCID_ROB64);
break;
@ -1908,7 +1908,7 @@ void SectorX_80194728(Player* player) {
case 569:
func_demo_80048AC0(1);
switch (gTeamShields[1]) {
switch (gTeamShields[TEAM_ID_FALCO]) {
case -1:
Radio_PlayMessage(gMsg_ID_20337, RCID_ROB64);
break;

View File

@ -496,40 +496,40 @@ void Area6_80187704(void) {
}
}
void Area6_BossA6_Init(Boss* bossA6) {
void Area6_BossA6_Init(BossA6* this) {
Hitbox* hitbox;
s32 i;
gBossActive = 1;
D_game_80161A44 = 25000.0f;
gBossFrameCount = 0;
bossA6->health = 780;
bossA6->fwork[A6_FWK_2] = bossA6->fwork[A6_FWK_34] = 2.0f;
bossA6->fwork[A6_FWK_35] = 1.2f;
bossA6->swork[A6_SWK_25] = 3;
bossA6->swork[A6_SWK_15 + 0] = bossA6->swork[A6_SWK_15 + 1] = bossA6->swork[A6_SWK_15 + 2] = 40;
bossA6->swork[A6_SWK_18 + 0] = bossA6->swork[A6_SWK_18 + 1] = bossA6->swork[A6_SWK_18 + 2] = 3;
this->health = 780;
this->fwork[A6_FWK_2] = this->fwork[A6_FWK_34] = 2.0f;
this->fwork[A6_FWK_35] = 1.2f;
this->swork[A6_SWK_25] = 3;
this->swork[A6_SWK_15 + 0] = this->swork[A6_SWK_15 + 1] = this->swork[A6_SWK_15 + 2] = 40;
this->swork[A6_SWK_18 + 0] = this->swork[A6_SWK_18 + 1] = this->swork[A6_SWK_18 + 2] = 3;
for (i = 0; i < A6_BSS_MAX; i++) {
D_i3_801C2250[i] = 0;
}
D_i3_801C22F0.unk_24 = D_i3_801C22F0.unk_28[0] = D_i3_801C22F0.unk_28[2] = D_i3_801C22F0.unk_28[1] = 255.0f;
D_i3_801C22F0.unk_34 = 0.0f;
bossA6->swork[A6_SWK_27 + 0] = bossA6->swork[A6_SWK_27 + 1] = bossA6->swork[A6_SWK_27 + 2] = 0;
bossA6->swork[A6_SWK_22] = 32;
bossA6->swork[A6_SWK_23] = 32;
bossA6->swork[A6_SWK_24] = 255;
bossA6->fwork[A6_FWK_29] = 255.0f;
this->swork[A6_SWK_27 + 0] = this->swork[A6_SWK_27 + 1] = this->swork[A6_SWK_27 + 2] = 0;
this->swork[A6_SWK_22] = 32;
this->swork[A6_SWK_23] = 32;
this->swork[A6_SWK_24] = 255;
this->fwork[A6_FWK_29] = 255.0f;
bossA6->fwork[A6_FWK_3] = -1700.0f;
bossA6->fwork[A6_FWK_5] = 30.0f;
bossA6->fwork[A6_FWK_32] = 1.0f;
bossA6->timer_050 = 500;
A6_HIT_1(bossA6, 0)->z.size = A6_HIT_1(bossA6, 1)->z.size = A6_HIT_1(bossA6, 2)->z.size = 195.0f;
A6_HIT_1(bossA6, 0)->y.size = A6_HIT_1(bossA6, 1)->y.size = A6_HIT_1(bossA6, 2)->y.size = 147.0f;
A6_HIT_1(bossA6, 0)->x.size = A6_HIT_1(bossA6, 1)->x.size = A6_HIT_1(bossA6, 2)->x.size = 153.0f;
this->fwork[A6_FWK_3] = -1700.0f;
this->fwork[A6_FWK_5] = 30.0f;
this->fwork[A6_FWK_32] = 1.0f;
this->timer_050 = 500;
A6_HIT_1(this, 0)->z.size = A6_HIT_1(this, 1)->z.size = A6_HIT_1(this, 2)->z.size = 195.0f;
A6_HIT_1(this, 0)->y.size = A6_HIT_1(this, 1)->y.size = A6_HIT_1(this, 2)->y.size = 147.0f;
A6_HIT_1(this, 0)->x.size = A6_HIT_1(this, 1)->x.size = A6_HIT_1(this, 2)->x.size = 153.0f;
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 40);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 40);
AUDIO_PLAY_SFX(0x11002050, bossA6->sfxSource, 4);
AUDIO_PLAY_SFX(0x11002050, this->sfxSource, 4);
}
#ifdef NON_MATCHING
@ -553,7 +553,7 @@ void Area6_80187944(Boss* bossA6) {
Vec3f spA4[3];
Vec3f sp98;
Vec3f sp8C;
Effect* temp_s0_3;
Effect* effect;
gBossFrameCount++;
if ((bossA6->state < 6) || ((bossA6->state >= 8) && (bossA6->state < 12))) {
@ -632,7 +632,7 @@ void Area6_80187944(Boss* bossA6) {
Math_SmoothStepToF(&D_i3_801C22F0.b[i], D_i3_801BECB0[var_s0][2], 1.0f, 10.0f, 0);
}
if ((bossA6->swork[A6_SWK_15 + 0] == 0) && (bossA6->swork[A6_SWK_15 + 1] == 0) &&
(bossA6->swork[A6_SWK_15 + 2] == 0) && (bossA6->fwork[A6_FWK_0] != 0) && !(gGameFrameCount & 1)) {
(bossA6->swork[A6_SWK_15 + 2] == 0) && (bossA6->fwork[A6_FWK_0] != 0) && ((gGameFrameCount % 2) == 0)) {
func_effect_8007C120(bossA6->obj.pos.x, bossA6->obj.pos.y, bossA6->obj.pos.z + 200.0f, bossA6->vel.x,
bossA6->vel.y, bossA6->vel.z, 0.3f, 1);
}
@ -655,18 +655,18 @@ void Area6_80187944(Boss* bossA6) {
Math_SmoothStepToAngle(&bossA6->fwork[A6_FWK_9], bossA6->fwork[A6_FWK_32], 0.05f, 0.02f, 0.00001f);
Math_SmoothStepToAngle(&bossA6->obj.rot.z, bossA6->fwork[A6_FWK_8], 0.05f, bossA6->fwork[A6_FWK_9], 0.00001f);
if (bossA6->swork[A6_SWK_25] >= 2) {
if (!(gGameFrameCount & 0x3F) && (Rand_ZeroOne() < 0.5f)) {
if (((gGameFrameCount % 64) == 0) && (Rand_ZeroOne() < 0.5f)) {
bossA6->fwork[A6_FWK_6] = RAND_FLOAT_CENTERED(500.0f) + gPlayer[0].camEye.x;
}
if (!(gGameFrameCount & 0x3F) && (Rand_ZeroOne() < 0.5f)) {
if (((gGameFrameCount % 64) == 0) && (Rand_ZeroOne() < 0.5f)) {
bossA6->fwork[A6_FWK_7] = RAND_FLOAT_CENTERED(500.0f) + gPlayer[0].camEye.y;
}
} else {
if (!(gGameFrameCount & 0x1F) && (Rand_ZeroOne() < 0.7f)) {
if (((gGameFrameCount % 32) == 0) && (Rand_ZeroOne() < 0.7f)) {
bossA6->fwork[A6_FWK_6] = RAND_FLOAT_CENTERED(1000.0f) + gPlayer[0].camEye.x;
bossA6->fwork[A6_FWK_30] = 0.0f;
}
if (!(gGameFrameCount & 0x1F) && (Rand_ZeroOne() < 0.7f)) {
if (((gGameFrameCount % 32) == 0) && (Rand_ZeroOne() < 0.7f)) {
bossA6->fwork[A6_FWK_7] = RAND_FLOAT_CENTERED(1000.0f) + gPlayer[0].camEye.y;
bossA6->fwork[A6_FWK_31] = 0.0f;
}
@ -710,7 +710,7 @@ void Area6_80187944(Boss* bossA6) {
if (bossA6->timer_05C == 0) {
bossA6->timer_05C = 15;
}
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
Matrix_MultVec3f(gCalcMatrix, &D_i3_801BED04, &spC8[0]);
Matrix_MultVec3f(gCalcMatrix, &D_i3_801BED10, &spC8[1]);
Matrix_MultVec3f(gCalcMatrix, &D_i3_801BED1C, &spC8[2]);
@ -725,12 +725,12 @@ void Area6_80187944(Boss* bossA6) {
bossA6->obj.pos.z + spC8[i].z, 10.0f);
}
}
if (!(gGameFrameCount & 0x1F)) {
if (((gGameFrameCount % 32) == 0)) {
func_effect_8007C120(bossA6->obj.pos.x, bossA6->obj.pos.y, bossA6->obj.pos.z + 300.0f, bossA6->vel.x,
bossA6->vel.y, bossA6->vel.z, 0.5f, 70);
}
}
if (!(gGameFrameCount & 0xF)) {
if (((gGameFrameCount % 16) == 0)) {
dz_114 = fabsf(bossA6->fwork[A6_FWK_3] / -1700.0f);
if (dz_114 < 1.0f) {
dz_114 = 1.0f;
@ -843,16 +843,16 @@ void Area6_80187944(Boss* bossA6) {
case 2:
Math_SmoothStepToF(D_ctx_801779A8, 10.0f, 1.0f, 5.0f, 0.0f);
if (bossA6->timer_050 == 10) {
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255;
D_ctx_80178340 = D_ctx_80178358 = 255;
D_ctx_80178358 = 0;
D_ctx_8017835C = 25;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255;
gFillScreenAlpha = gFillScreenAlphaTarget = 255;
gFillScreenAlphaTarget = 0;
gFillScreenAlphaStep = 25;
gCameraShake = 50;
}
if (bossA6->timer_050 == 0) {
if (D_i3_801C2250[A6_BSS_8] == 0) {
D_i3_801C2250[A6_BSS_8] = 1;
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = D_ctx_80178340 = 0;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 0;
}
Math_SmoothStepToF(&D_i3_801C22F0.unk_24, 255.0f, 0.1f, 10.0f, 0.0f);
Math_SmoothStepToF(&bossA6->fwork[A6_FWK_34], 1.0f, 0.1f, 0.1f, 0.0f);
@ -964,7 +964,7 @@ void Area6_80187944(Boss* bossA6) {
D_i3_801C2250[A6_BSS_30]++;
D_i3_801C2250[A6_BSS_30] &= 1;
}
if (!(gGameFrameCount & 0x3F)) {
if (((gGameFrameCount % 64) == 0)) {
bossA6->fwork[A6_FWK_8] = RAND_FLOAT(360.0f);
bossA6->fwork[A6_FWK_9] = 0.0f;
}
@ -1011,11 +1011,11 @@ void Area6_80187944(Boss* bossA6) {
}
if (D_i3_801C2250[A6_BSS_33] == 15) {
if (D_i3_801C2250[A6_BSS_32] == 0) {
if (gTeamShields[1] > 0) {
if (gTeamShields[TEAM_ID_FALCO] > 0) {
Radio_PlayMessage(gMsg_ID_20315, RCID_FALCO);
} else if (gTeamShields[2] > 0) {
} else if (gTeamShields[TEAM_ID_SLIPPY] > 0) {
Radio_PlayMessage(gMsg_ID_20316, RCID_SLIPPY);
} else if (gTeamShields[3] > 0) {
} else if (gTeamShields[TEAM_ID_PEPPY] > 0) {
Radio_PlayMessage(gMsg_ID_20317, RCID_PEPPY);
}
}
@ -1032,7 +1032,7 @@ void Area6_80187944(Boss* bossA6) {
Math_SmoothStepToF(&D_i3_801C22F0.unk_28[0], D_i3_801BF454[var_s0][0], 0.5f, 100.0f, 0.00001f);
Math_SmoothStepToF(&D_i3_801C22F0.unk_28[2], D_i3_801BF454[var_s0][1], 0.5f, 100.0f, 0.00001f);
Math_SmoothStepToF(&D_i3_801C22F0.unk_28[1], D_i3_801BF454[var_s0][2], 0.5f, 100.0f, 0.00001f);
if (!(gGameFrameCount & 0xF)) {
if (((gGameFrameCount % 16) == 0)) {
D_i3_801C2250[A6_BSS_9]++;
D_i3_801C2250[A6_BSS_9] &= 3;
}
@ -1042,26 +1042,26 @@ void Area6_80187944(Boss* bossA6) {
}
break;
case 7:
temp_s0_3 = &gEffects[bossA6->swork[A6_SWK_39]];
effect = &gEffects[bossA6->swork[A6_SWK_39]];
Math_SmoothStepToF(&D_i3_801C22F0.unk_28[0], 255.0f, 1.0f, 100.0f, 0.00001f);
Math_SmoothStepToF(&D_i3_801C22F0.unk_28[2], 255.0f, 1.0f, 100.0f, 0.00001f);
Math_SmoothStepToF(&D_i3_801C22F0.unk_28[1], 255.0f, 1.0f, 100.0f, 0.00001f);
if (bossA6->fwork[A6_FWK_0] < 10.0f) {
temp_s0_3->unk_60.y = 5.0f - ((10.0f - bossA6->fwork[A6_FWK_0]) * 0.3f);
temp_s0_3->unk_60.x = 5.0f - ((10.0f - bossA6->fwork[A6_FWK_0]) * 0.3f);
effect->unk_60.y = 5.0f - ((10.0f - bossA6->fwork[A6_FWK_0]) * 0.3f);
effect->unk_60.x = 5.0f - ((10.0f - bossA6->fwork[A6_FWK_0]) * 0.3f);
}
if (bossA6->fwork[A6_FWK_0] < 1.0f) {
Math_SmoothStepToF(&temp_s0_3->unk_60.x, 0.0f, 0.1f, 1.0f, 0.00001f);
Math_SmoothStepToF(&temp_s0_3->unk_60.y, 0.0f, 0.1f, 1.0f, 0.00001f);
Math_SmoothStepToF(&temp_s0_3->unk_60.z, 0.0f, 1.0f, 2.0f, 0.00001f);
if (temp_s0_3->unk_60.z < 0.2f) {
Math_SmoothStepToF(&effect->unk_60.x, 0.0f, 0.1f, 1.0f, 0.00001f);
Math_SmoothStepToF(&effect->unk_60.y, 0.0f, 0.1f, 1.0f, 0.00001f);
Math_SmoothStepToF(&effect->unk_60.z, 0.0f, 1.0f, 2.0f, 0.00001f);
if (effect->unk_60.z < 0.2f) {
D_i3_801C2250[A6_BSS_0] = 2;
bossA6->swork[A6_SWK_37] = 1;
bossA6->timer_050 = 20;
D_i3_801C22F0.unk_28[0] = D_i3_801C22F0.unk_28[2] = D_i3_801C22F0.unk_28[1] = 255.0f;
bossA6->state = 1;
D_i3_801C2250[A6_BSS_27] = 0;
Object_Kill(&temp_s0_3->obj, temp_s0_3->sfxSource);
Object_Kill(&effect->obj, effect->sfxSource);
}
}
break;
@ -1162,7 +1162,7 @@ void Area6_80187944(Boss* bossA6) {
Area6_8018A464(bossA6, 1);
Area6_8018A464(bossA6, 2);
for (i = 0; i < 5; i++) {
if (!(gGameFrameCount & 3)) {
if (((gGameFrameCount % 4) == 0)) {
D_i3_801BF280[i] = RAND_FLOAT_CENTERED(10.0f);
D_i3_801BF2B0[i] = RAND_FLOAT_CENTERED(10.0f);
D_i3_801BF2E0[i] = RAND_FLOAT_CENTERED(10.0f);
@ -1321,7 +1321,7 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) {
D_i3_801BEE00[0].y = 20.0f;
}
D_i3_801BF3C4[0] = D_i3_801BEE00[0].y;
} else if (!(bossA6->swork[A6_SWK_6] & 3)) {
} else if ((bossA6->swork[A6_SWK_6] & 3) == 0) {
D_i3_801BF3C4[i] = D_i3_801BEE00[i].y;
D_i3_801BEE00[i].y = D_i3_801BF3C4[i - 1];
// temp_ft2;
@ -1336,7 +1336,7 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) {
D_i3_801BEE00[0].x = RAND_FLOAT_CENTERED(30.0f);
}
D_i3_801BF334[0] = D_i3_801BEE00[0].x;
} else if (!(bossA6->swork[A6_SWK_9] & 7)) {
} else if ((bossA6->swork[A6_SWK_9] % 8) == 0) {
D_i3_801BF334[i] = D_i3_801BEE00[i].x;
D_i3_801BEE00[i].x = D_i3_801BF334[i - 1];
// temp_ft2;
@ -1367,7 +1367,7 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) {
D_i3_801BEF80[0].y = 20.0f;
}
D_i3_801BF3F4[0] = D_i3_801BEF80[0].y;
} else if (!(bossA6->swork[A6_SWK_7] & 3)) {
} else if ((bossA6->swork[A6_SWK_7] & 3) == 0) {
D_i3_801BF3F4[i] = D_i3_801BEF80[i].y;
D_i3_801BEF80[i].y = D_i3_801BF3F4[i - 1];
}
@ -1381,7 +1381,7 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) {
D_i3_801BEF80[0].x = RAND_FLOAT_CENTERED(30.0f);
}
D_i3_801BF364[0] = D_i3_801BEF80[0].x;
} else if (!(bossA6->swork[A6_SWK_10] & 7)) {
} else if ((bossA6->swork[A6_SWK_10] % 8) == 0) {
D_i3_801BF364[i] = D_i3_801BEF80[i].x;
D_i3_801BEF80[i].x = D_i3_801BF364[i - 1];
}
@ -1411,7 +1411,7 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) {
D_i3_801BF100[0].y = 20.0f;
}
D_i3_801BF424[0] = D_i3_801BF100[0].y;
} else if (!(bossA6->swork[A6_SWK_8] & 3)) {
} else if ((bossA6->swork[A6_SWK_8] & 3) == 0) {
D_i3_801BF424[i] = D_i3_801BF100[i].y;
D_i3_801BF100[i].y = D_i3_801BF424[i - 1];
// temp_ft2;
@ -1426,7 +1426,7 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) {
D_i3_801BF100[0].x = RAND_RANGE(-12.0f, 18.0f);
}
D_i3_801BF394[0] = D_i3_801BF100[0].x;
} else if (!(bossA6->swork[A6_SWK_11] & 7)) {
} else if ((bossA6->swork[A6_SWK_11] % 8) == 0) {
D_i3_801BF394[i] = D_i3_801BF100[i].x;
D_i3_801BF100[i].x = D_i3_801BF394[i - 1];
// temp_ft2;
@ -1451,7 +1451,7 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) {
if (bossA6->swork[A6_SWK_25] < 2) {
var_fs0 = 0.7f;
}
if (!(gGameFrameCount & 31) && (Rand_ZeroOne() < var_fs0) && (D_i3_801C2250[A6_BSS_5] == 0) &&
if (((gGameFrameCount % 32) == 0) && (Rand_ZeroOne() < var_fs0) && (D_i3_801C2250[A6_BSS_5] == 0) &&
(bossA6->swork[A6_SWK_33 + arg1] != 0)) {
if ((Rand_ZeroOne() < 0.2f) || (bossA6->swork[A6_SWK_25] < 2)) {
if (bossA6->swork[A6_SWK_18] == 0) {
@ -1476,7 +1476,7 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) {
}
} else {
for (i = 0; i < 3; i++) {
if ((i == (gGameFrameCount & 15)) && (bossA6->swork[A6_SWK_18 + i] == 0)) {
if ((i == (gGameFrameCount % 16U)) && (bossA6->swork[A6_SWK_18 + i] == 0)) {
bossA6->swork[A6_SWK_12 + i] = 15;
bossA6->swork[A6_SWK_18 + i] = 1;
i = 3;
@ -1731,7 +1731,7 @@ void Area6_8018C0D0(f32* arg0, f32 arg1, Vec3f* arg2, f32 arg3, s32 arg4) {
f32 spAC;
f32 var_fs3 = 5.0f;
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
spAC = 0.0f;
} else {
spAC = 180.0f;
@ -1834,8 +1834,8 @@ void Area6_8018C54C(Boss* bossA6) {
if (bossA6->unk_3F8 >= 1.0f) {
for (i = 0; i < 3; i++) {
if ((bossA6->swork[A6_SWK_33 + i] == 0) && (bossA6->state != 3) &&
(D_i3_801C2250[A6_BSS_2_0 + i] == 0) && !(gGameFrameCount & 3) &&
(bossA6->swork[A6_SWK_27 + i] != 0) && (D_ctx_80177854 != 100)) {
(D_i3_801C2250[A6_BSS_2_0 + i] == 0) && ((gGameFrameCount % 4) == 0) &&
(bossA6->swork[A6_SWK_27 + i] != 0) && (gPlayState != 100)) {
Matrix_RotateY(gCalcMatrix, bossA6->obj.rot.y * M_DTOR, 0);
Matrix_RotateX(gCalcMatrix, bossA6->obj.rot.x * M_DTOR, 1);
Matrix_RotateZ(gCalcMatrix, bossA6->obj.rot.z * M_DTOR, 1);
@ -2208,13 +2208,13 @@ void Area6_8018DF74(Player* player) {
player->pos.y = 350.0f;
player->pos.z = 16000.0f;
player->unk_0D0 = 30.0f;
if (gTeamShields[1] > 0) {
if (gTeamShields[TEAM_ID_FALCO] > 0) {
Area6_8018D804(&gActors[3], 0);
}
if (gTeamShields[2] > 0) {
if (gTeamShields[TEAM_ID_SLIPPY] > 0) {
Area6_8018D804(&gActors[4], 1);
}
if (gTeamShields[3] > 0) {
if (gTeamShields[TEAM_ID_PEPPY] > 0) {
Area6_8018D804(&gActors[5], 2);
}
gActors[0].fwork[0] = 20.0f;
@ -2284,7 +2284,7 @@ void Area6_8018DF74(Player* player) {
}
if (gCsFrameCount == 540) {
D_ctx_80178488 = 1;
D_ctx_80177838 = 50;
gLevelStatusScreenTimer = 50;
player->pos.x = 0.0f;
player->pos.z = 0.0f;
player->pos.y = 350.0f;
@ -2311,17 +2311,17 @@ void Area6_8018DF74(Player* player) {
Area6_8018D920(&sp5C);
break;
case 176:
if (gTeamShields[1] > 0) {
if (gTeamShields[TEAM_ID_FALCO] > 0) {
Area6_8018D920(&gActors[3].obj.pos);
}
break;
case 187:
if (gTeamShields[2] > 0) {
if (gTeamShields[TEAM_ID_SLIPPY] > 0) {
Area6_8018D920(&gActors[4].obj.pos);
}
break;
case 198:
if (gTeamShields[3] > 0) {
if (gTeamShields[TEAM_ID_PEPPY] > 0) {
Area6_8018D920(&gActors[5].obj.pos);
}
break;
@ -2514,19 +2514,19 @@ void Area6_8018ED78(Player* player) {
actor4->fwork[4] = 0.5f;
}
if (gCsFrameCount >= 200) {
if (D_ctx_80178340 == 255) {
if (gFillScreenAlpha == 255) {
player->unk_1D0 = 2;
func_play_800A6148();
} else {
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255;
D_ctx_80178358 = 255;
D_ctx_8017835C = 16;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255;
gFillScreenAlphaTarget = 255;
gFillScreenAlphaStep = 16;
}
} else if ((gCsFrameCount == 131) || (gCsFrameCount == 134) || (gCsFrameCount == 137)) {
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255;
D_ctx_80178340 = 192;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255;
gFillScreenAlpha = 192;
} else {
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = D_ctx_80178340 = 0;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 0;
}
if ((gCsFrameCount == 146) || (gCsFrameCount == 150)) {
AUDIO_PLAY_SFX(0x2940F026, gActors[5].sfxSource, 4);
@ -2579,9 +2579,9 @@ void Area6_8018ED78(Player* player) {
player->camAt.y = gCsCamAtY = 0.0f;
player->camAt.z = gCsCamAtZ = player->pos.z + 50.0f + D_ctx_80177D20;
}
if (D_ctx_80178340 != 0) {
D_ctx_80178358 = 0;
D_ctx_8017835C = 4;
if (gFillScreenAlpha != 0) {
gFillScreenAlphaTarget = 0;
gFillScreenAlphaStep = 4;
} else {
player->unk_1D0 = 3;
}
@ -2636,19 +2636,19 @@ void Area6_8018ED78(Player* player) {
AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0);
}
if (gCsFrameCount >= 1090) {
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0;
D_ctx_80178358 = 255;
D_ctx_8017835C = 8;
if (D_ctx_80178340 == 255) {
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0;
gFillScreenAlphaTarget = 255;
gFillScreenAlphaStep = 8;
if (gFillScreenAlpha == 255) {
D_play_800D3180[LEVEL_AREA_6] = Play_CheckMedalStatus(300) + 1;
for (i = 1; i < 6; i++) {
D_ctx_80177C38[i] = gTeamShields[i];
D_ctx_801778F0[i] = gSavedTeamShields[i];
for (i = TEAM_ID_FALCO; i < TEAM_ID_MAX; i++) {
gPrevPlanetTeamShields[i] = gTeamShields[i];
gPrevPlanetSavedTeamShields[i] = gSavedTeamShields[i];
gSavedTeamShields[i] = gTeamShields[i];
}
for (i = 1; i < 4; i++) {
if (D_ctx_80177C38[i] == 0) {
D_ctx_80177C38[i] = 255;
for (i = TEAM_ID_FALCO; i <= TEAM_ID_PEPPY; i++) {
if (gPrevPlanetTeamShields[i] == 0) {
gPrevPlanetTeamShields[i] = 255;
}
}
D_ctx_80161A94[0] = gGoldRingCount[0];
@ -2671,7 +2671,7 @@ void Area6_8018ED78(Player* player) {
AUDIO_PLAY_BGM(SEQ_ID_GOOD_END);
break;
case 550:
D_ctx_80177840 = 100;
gLevelClearScreenTimer = 100;
break;
case 700:
D_ctx_80177830 = 1;

File diff suppressed because it is too large Load Diff

View File

@ -454,7 +454,7 @@ void Solar_8019F20C(Actor* actor) {
actor->itemDrop = DROP_SILVER_STAR;
}
}
func_enmy_80066254(actor);
Actor_Despawn(actor);
for (i = 0; i < 3; i++) {
func_effect_800794CC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 0.3f);
}
@ -468,7 +468,7 @@ void Solar_8019F20C(Actor* actor) {
}
actor->obj.rot.y = RAD_TO_DEG(-gPlayer[0].unk_058);
actor->obj.rot.x = RAD_TO_DEG(gPlayer[0].unk_05C);
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
actor->unk_0B6++;
if (actor->unk_0B6 >= 3) {
actor->unk_0B6 = 0;
@ -487,7 +487,7 @@ void Solar_8019F7AC(Actor* actor) {
gSPDisplayList(gMasterDisp++, D_SO_6017370);
break;
case OBJ_ACTOR_276:
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
RCP_SetupDL(&gMasterDisp, 0x29);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255);
}
@ -684,7 +684,7 @@ void Solar_801A0120(Effect* effect) {
sp3C.z = -effect->scale1;
Matrix_MultVec3f(gCalcMatrix, &sp3C, &effect->obj.pos);
effect->unk_60.x += 5.0f;
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
effect->unk_4C++;
if (effect->unk_4C > 2) {
effect->unk_4C = 0;
@ -711,7 +711,7 @@ void Solar_801A0120(Effect* effect) {
} else {
sp54 = -50.0f;
}
if (effect->index & 1) {
if ((effect->index % 2) != 0) {
sp58 = 100.0f;
} else {
sp58 = -100.0f;
@ -777,7 +777,7 @@ void Solar_801A0120(Effect* effect) {
effect->unk_48 = 0;
}
if ((sp48 != effect->unk_48) && (effect->unk_48 != 0)) {
if (effect->index & 1) {
if ((effect->index % 2) != 0) {
sp58 = 100.0f;
} else {
sp58 = -100.0f;
@ -985,8 +985,8 @@ void Solar_801A10F4(Player* player) {
player->unk_034 = 0.0f;
player->unk_0D0 = 0.0f;
D_ctx_80178340 = 255;
D_ctx_80178358 = 0;
gFillScreenAlpha = 255;
gFillScreenAlphaTarget = 0;
Solar_801A0DF8(-750.0f, -2600.0f, 300.0f, 2, 1.0f);
AUDIO_PLAY_SFX(0x3140807E, player->sfxSource, 0);
break;
@ -1008,16 +1008,16 @@ void Solar_801A10F4(Player* player) {
Object_Kill(&gActors[6].obj, gActors[6].sfxSource);
}
if (gCsFrameCount < 3) {
D_ctx_80178340 = 255;
gFillScreenAlpha = 255;
}
if (gCsFrameCount == 370) {
D_ctx_80178358 = 255;
D_ctx_80178348 = 255;
D_ctx_80178350 = 255;
D_ctx_80178354 = 255;
D_ctx_8017835C = 8;
gFillScreenAlphaTarget = 255;
gFillScreenRed = 255;
gFillScreenGreen = 255;
gFillScreenBlue = 255;
gFillScreenAlphaStep = 8;
}
if (!(gGameFrameCount & 7)) {
if (((gGameFrameCount % 8) == 0)) {
Solar_8019E8B8(RAND_FLOAT_CENTERED(6000.0f), RAND_FLOAT_CENTERED(5.0f) - 90.0f,
RAND_FLOAT(2000.0f) - 6000.0f + D_ctx_80177D20, RAND_FLOAT(20.0f) + 20.0f);
}
@ -1057,8 +1057,8 @@ void Solar_801A10F4(Player* player) {
break;
case 2:
D_ctx_80177CE8 += 60.0f;
D_ctx_80178358 = 0;
D_ctx_8017835C = 8;
gFillScreenAlphaTarget = 0;
gFillScreenAlphaStep = 8;
Math_SmoothStepToF(D_ctx_80177A48, 0.02f, 1.0f, 0.0000003f, 0.0f);
if (gCsFrameCount == 525) {
Radio_PlayMessage(gMsg_ID_10010, RCID_FOX);
@ -1078,7 +1078,7 @@ void Solar_801A10F4(Player* player) {
break;
case 3:
D_ctx_80177CE8 += 60.0f;
if (!(gGameFrameCount & 3)) {
if (((gGameFrameCount % 4) == 0)) {
Solar_8019E8B8(RAND_FLOAT_CENTERED(6000.0f), -400.0f - ((player->camEye.y - 1380.0f) * 0.3f),
RAND_FLOAT_CENTERED(2000.0f) + 500.0f + D_ctx_80177D20, RAND_FLOAT(20.0f) + 20.0f);
}
@ -1105,16 +1105,16 @@ void Solar_801A10F4(Player* player) {
D_ctx_801779A8[gMainController] = 60.0f;
player->unk_190 = 2.0f;
if (player->timer_1F8 == 0) {
D_ctx_80178358 = 255;
D_ctx_8017835C = 24;
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255;
gFillScreenAlphaTarget = 255;
gFillScreenAlphaStep = 24;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255;
}
if (D_ctx_80178340 == 255) {
if (gFillScreenAlpha == 255) {
AUDIO_PLAY_BGM(SEQ_ID_SOLAR | SEQ_FLAG);
player->pos.z = 0.0f;
player->unk_0D0 = D_play_80161A54;
func_play_800A6148();
D_ctx_80177838 = 50;
gLevelStatusScreenTimer = 50;
player->state_1C8 = PLAYERSTATE_1C8_3;
player->unk_1D0 = 0;
player->pos.y = 350.0f;
@ -1131,7 +1131,7 @@ void Solar_801A10F4(Player* player) {
func_8001D1C8(0xFF, 3);
AUDIO_PLAY_SFX(0x4100C023, gDefaultSfxSource, 4);
D_ctx_80178488 = 1;
D_ctx_80178358 = 0;
gFillScreenAlphaTarget = 0;
player->timer_1F8 = 15;
gPlayer[0].shields = 255;
}
@ -1273,7 +1273,7 @@ void Solar_801A1F80(Boss* bossSO) {
Solar_801A239C(bossSO);
bossSO->fwork[SO_FWK_0] = 0.01f;
}
if ((gBossFrameCount == 100) && (gTeamShields[3] != 0)) {
if ((gBossFrameCount == 100) && (gTeamShields[TEAM_ID_PEPPY] != 0)) {
Radio_PlayMessage(gMsg_ID_10300, RCID_PEPPY);
}
}
@ -1573,13 +1573,13 @@ void Solar_801A3128(Boss* bossSO) {
D_80137E84[gMainController] = 1;
D_Timer_80177BD0[gMainController] = 70;
D_i3_801C2740[2]++;
if (D_i3_801C2740[2] & 1) {
if ((D_i3_801C2740[2] % 2) != 0) {
if (D_i3_801C2740[2] & 2) {
if (gTeamShields[3] > 0) {
if (gTeamShields[TEAM_ID_PEPPY] > 0) {
Radio_PlayMessage(gMsg_ID_20317, RCID_PEPPY);
}
} else {
if (gTeamShields[1] > 0) {
if (gTeamShields[TEAM_ID_FALCO] > 0) {
Radio_PlayMessage(gMsg_ID_20271, RCID_FALCO);
}
}
@ -1598,7 +1598,7 @@ void Solar_801A3128(Boss* bossSO) {
if (bossSO->swork[SO_SWK_11] == 150) {
Solar_801A239C(bossSO);
bossSO->fwork[SO_FWK_0] = 0.01f;
if ((Rand_ZeroOne() >= 0.4f) && (gTeamShields[3] > 0) && (bossSO->swork[SO_SWK_2] != 0) &&
if ((Rand_ZeroOne() >= 0.4f) && (gTeamShields[TEAM_ID_PEPPY] > 0) && (bossSO->swork[SO_SWK_2] != 0) &&
(bossSO->swork[SO_SWK_3] != 0)) {
Radio_PlayMessage(gMsg_ID_10320, RCID_PEPPY);
}
@ -1702,7 +1702,7 @@ void Solar_801A3510(Boss* bossSO) {
if (bossSO->timer_050 != 0) {
bossSO->unk_04C = 65;
}
if ((bossSO->unk_04C == 65) && !(gGameFrameCount & 1)) {
if ((bossSO->unk_04C == 65) && ((gGameFrameCount % 2) == 0)) {
Solar_8019FFC0(bossSO, bossSO->fwork[SO_FWK_4], bossSO->fwork[SO_FWK_5] - 100.0f,
bossSO->fwork[SO_FWK_6] + 600.0f, (bossSO->timer_050 * 0.2f) + 4.0f, 0);
Solar_801A1EB0(bossSO, bossSO->fwork[SO_FWK_4], 25.0f, bossSO->fwork[SO_FWK_5] - 100.0f,
@ -1725,7 +1725,7 @@ void Solar_801A3510(Boss* bossSO) {
if (bossSO->timer_050 != 0) {
bossSO->unk_04C = 66;
}
if ((bossSO->unk_04C == 66) && !(gGameFrameCount & 1)) {
if ((bossSO->unk_04C == 66) && ((gGameFrameCount % 2) == 0)) {
Solar_8019FFC0(bossSO, bossSO->fwork[SO_FWK_4] + 125.0f, bossSO->fwork[SO_FWK_5] - 100.0f,
bossSO->fwork[SO_FWK_6] + 600.0f, (bossSO->timer_050 * 0.2f) + 4.0f, 1);
Solar_8019FFC0(bossSO, bossSO->fwork[SO_FWK_4] - 125.0f, bossSO->fwork[SO_FWK_5] - 100.0f,
@ -1802,12 +1802,12 @@ void Solar_801A3C4C(Boss* bossSO) {
bossSO->state = 0;
bossSO->swork[SO_SWK_1] = 1;
bossSO->fwork[SO_FWK_0] = 0.01f;
bossSO->info.hitbox = SEGMENTED_TO_VIRTUAL(D_edata_800CBF34);
bossSO->info.hitbox = SEGMENTED_TO_VIRTUAL(gHitboxNone);
bossSO->timer_058 = 20000;
D_ctx_8017796C = -1;
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = D_ctx_80178340 = 255;
D_ctx_80178358 = 0;
D_ctx_8017835C = 255;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 255;
gFillScreenAlphaTarget = 0;
gFillScreenAlphaStep = 255;
gCsFrameCount = 0;
D_80137E84[gMainController] = 1;
D_Timer_80177BD0[gMainController] = 10;
@ -1881,12 +1881,12 @@ void Solar_801A4214(Boss* bossSO) {
80.0f, 40.0f, 8);
D_i3_801C2768[3] = 6.0f;
D_i3_801C2768[2] = 100.0f;
D_ctx_80178340 = 255;
D_ctx_80178348 = 255;
D_ctx_80178350 = 255;
D_ctx_80178354 = 255;
D_ctx_80178358 = 0;
D_ctx_8017835C = 4;
gFillScreenAlpha = 255;
gFillScreenRed = 255;
gFillScreenGreen = 255;
gFillScreenBlue = 255;
gFillScreenAlphaTarget = 0;
gFillScreenAlphaStep = 4;
func_boss_80042EC0(bossSO);
bossSO->swork[SO_SWK_4]++;
Math_SmoothStepToF(&bossSO->obj.pos.y, 180.0f, 0.1f, 10.0f, 0.1f);
@ -1981,14 +1981,14 @@ void Solar_801A48B8(Boss* bossSO) {
}
}
}
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = D_ctx_80178340 = 255;
D_ctx_80178358 = 0;
D_ctx_8017835C = 64;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 255;
gFillScreenAlphaTarget = 0;
gFillScreenAlphaStep = 64;
bossSO->swork[SO_SWK_0] = 6;
bossSO->swork[SO_SWK_1] = 6;
bossSO->unk_04C = 0;
bossSO->fwork[SO_FWK_0] = 0.01f;
if (((bossSO->swork[SO_SWK_2] > 0) || (bossSO->swork[SO_SWK_3] > 0)) && (gTeamShields[2] > 0)) {
if (((bossSO->swork[SO_SWK_2] > 0) || (bossSO->swork[SO_SWK_3] > 0)) && (gTeamShields[TEAM_ID_SLIPPY] > 0)) {
Radio_PlayMessage(gMsg_ID_7086, RCID_SLIPPY);
}
}
@ -2235,7 +2235,7 @@ void Solar_801A56B8(Boss* bossSO) {
if (bossSO->timer_050 != 0) {
bossSO->unk_04C = 65;
}
if ((bossSO->unk_04C == 65) && !(gGameFrameCount & 3)) {
if ((bossSO->unk_04C == 65) && ((gGameFrameCount % 4) == 0)) {
Solar_8019FFC0(bossSO, bossSO->fwork[SO_FWK_4] + 125.0f, bossSO->fwork[SO_FWK_5] - 100.0f,
bossSO->fwork[SO_FWK_6] + 600.0f, ((f32) bossSO->timer_050 * 0.2f) + 4.0f, 1);
Solar_8019FFC0(bossSO, bossSO->fwork[SO_FWK_4] - 125.0f, bossSO->fwork[SO_FWK_5] - 100.0f,
@ -2297,13 +2297,13 @@ void Solar_801A5B3C(Boss* bossSO) {
if (bossSO->swork[SO_SWK_10] != 0) {
bossSO->swork[SO_SWK_10]--;
}
if ((gBossFrameCount == 200) && (gTeamShields[1] != 0)) {
if ((gBossFrameCount == 200) && (gTeamShields[TEAM_ID_FALCO] != 0)) {
Radio_PlayMessage(gMsg_ID_10310, RCID_FALCO);
}
if ((gBossFrameCount == 300) && (gTeamShields[2] != 0)) {
if ((gBossFrameCount == 300) && (gTeamShields[TEAM_ID_SLIPPY] != 0)) {
Radio_PlayMessage(gMsg_ID_4092, RCID_SLIPPY);
}
if ((gBossFrameCount == 450) && (gTeamShields[3] != 0)) {
if ((gBossFrameCount == 450) && (gTeamShields[TEAM_ID_PEPPY] != 0)) {
Radio_PlayMessage(gMsg_ID_10320, RCID_PEPPY);
}
if (bossSO->health != 0) {
@ -2338,7 +2338,7 @@ void Solar_801A5B3C(Boss* bossSO) {
bossSO->info.hitbox[39] = bossSO->fwork[SO_FWK_26] - bossSO->obj.pos.y;
bossSO->info.hitbox[41] = bossSO->fwork[SO_FWK_25] - bossSO->obj.pos.x;
}
if (!(gGameFrameCount & 7) && (bossSO->fwork[SO_FWK_3] < 4800.0f)) {
if (((gGameFrameCount % 8) == 0) && (bossSO->fwork[SO_FWK_3] < 4800.0f)) {
if (func_play_800A73E4(&sp1C0, &sp1B8, bossSO->obj.pos.x, bossSO->obj.pos.y - 160.0f, bossSO->obj.pos.z)) {
Solar_801A1EB0(bossSO, bossSO->obj.pos.x, 50.0f, sp1C0 - 170.0f, bossSO->obj.pos.z + 100.0f);
}
@ -2351,8 +2351,8 @@ void Solar_801A5B3C(Boss* bossSO) {
Solar_801A1EB0(bossSO, bossSO->fwork[SO_FWK_13], 50.0f, sp1C0 - 150.0f, bossSO->fwork[SO_FWK_15] + 150.0f);
}
}
if ((!(gGameFrameCount & 3) || (bossSO->fwork[SO_FWK_31] != 0.0f)) &&
((bossSO->swork[SO_SWK_0] != 7) || !(gGameFrameCount & 1))) {
if ((((gGameFrameCount % 4) == 0) || (bossSO->fwork[SO_FWK_31] != 0.0f)) &&
((bossSO->swork[SO_SWK_0] != 7) || ((gGameFrameCount % 2) == 0))) {
if ((bossSO->swork[SO_SWK_2] == 0) && ((bossSO->health > 0) || (bossSO->state < 2))) {
Solar_8019FF44(bossSO, bossSO->fwork[SO_FWK_10], bossSO->fwork[SO_FWK_11], bossSO->fwork[SO_FWK_12],
bossSO->fwork[SO_FWK_31] - 20.0f, -1.0f);
@ -2511,7 +2511,7 @@ bool Solar_801A68A8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th
if (this->swork[SO_SWK_4] != 0) {
*dList = NULL;
} else if (this->swork[SO_SWK_10] != 0) {
if (this->swork[SO_SWK_10] & 1) {
if ((this->swork[SO_SWK_10] % 2) != 0) {
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 32, 32, 128, 255);
rot->z += 3.0f;
} else {
@ -2525,8 +2525,8 @@ bool Solar_801A68A8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th
if (this->swork[SO_SWK_2] == 0) {
*dList = NULL;
}
if ((this->swork[SO_SWK_8] & 1) != 0) {
if ((this->swork[SO_SWK_8] & 1) != 0) {
if ((this->swork[SO_SWK_8] % 2U) != 0) {
if ((this->swork[SO_SWK_8] % 2U) != 0) {
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 32, 32, 128, 255);
rot->y += 3.0f;
} else {
@ -2540,8 +2540,8 @@ bool Solar_801A68A8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th
if (this->swork[SO_SWK_3] == 0) {
*dList = NULL;
}
if ((this->swork[SO_SWK_9] & 1) != 0) {
if ((this->swork[SO_SWK_9] & 1) != 0) {
if ((this->swork[SO_SWK_9] % 2U) != 0) {
if ((this->swork[SO_SWK_9] % 2U) != 0) {
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 32, 32, 128, 255);
rot->y += 3.0f;
} else {
@ -2776,13 +2776,13 @@ void Solar_801A7750(void) {
Rand_SetSeed(1, 29100, 9786);
for (i = 0; i < 3; i++, actor++) {
if ((i == 0) && (gTeamShields[3] <= 0.0f)) {
if ((i == 0) && (gTeamShields[TEAM_ID_PEPPY] <= 0.0f)) {
continue;
}
if ((i == 1) && (gTeamShields[2] <= 0.0f)) {
if ((i == 1) && (gTeamShields[TEAM_ID_SLIPPY] <= 0.0f)) {
continue;
}
if ((i == 2) && (gTeamShields[1] <= 0.0f)) {
if ((i == 2) && (gTeamShields[TEAM_ID_FALCO] <= 0.0f)) {
continue;
}
@ -2866,8 +2866,8 @@ void Solar_801A7930(Player* player) {
player->unk_0EC += 1.0f;
}
if (gCsFrameCount >= 230) {
D_ctx_80178358 = 255;
D_ctx_80178348 = D_ctx_80178354 = D_ctx_80178350 = 255;
gFillScreenAlphaTarget = 255;
gFillScreenRed = gFillScreenBlue = gFillScreenGreen = 255;
}
if (gCsFrameCount == 230) {
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50);
@ -2878,7 +2878,7 @@ void Solar_801A7930(Player* player) {
func_play_800A6148();
func_8001CA24(0);
Audio_KillSfxBySource(player->sfxSource);
D_ctx_80178340 = 250;
gFillScreenAlpha = 250;
player->timer_1F8 = 20;
player->unk_0D0 = 0.0f;
player->unk_0E4 = 0.0f;
@ -2914,10 +2914,10 @@ void Solar_801A7930(Player* player) {
break;
case 3:
D_ctx_80177CE8 += 60.0f;
D_ctx_80178358 = 0;
D_ctx_8017835C = 4;
gFillScreenAlphaTarget = 0;
gFillScreenAlphaStep = 4;
if (D_ctx_801782F8) {
player->wings.unk_30 = (gGameFrameCount & 1) * 5.0f;
player->wings.unk_30 = (s32) (gGameFrameCount % 2U) * 5.0f;
}
switch (gCsFrameCount) {
case 450:
@ -2974,8 +2974,8 @@ void Solar_801A7930(Player* player) {
break;
case 4:
D_ctx_80177CE8 += 60.0f;
D_ctx_80178358 = 0;
D_ctx_8017835C = 4;
gFillScreenAlphaTarget = 0;
gFillScreenAlphaStep = 4;
D_ctx_80177A48[1] += D_ctx_80177A48[2] * 0.8f;
Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[1] * M_DTOR, 0);
sp60.x = 0.0f;
@ -3012,10 +3012,10 @@ void Solar_801A7930(Player* player) {
func_play_800A6148();
}
if (gCsFrameCount > 1530) {
D_ctx_80178358 = 255;
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0;
D_ctx_8017835C = 8;
if (D_ctx_80178340 == 255) {
gFillScreenAlphaTarget = 255;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0;
gFillScreenAlphaStep = 8;
if (gFillScreenAlpha == 255) {
func_8001CA24(0);
Audio_FadeOutAll(10);
player->state_1C8 = PLAYERSTATE_1C8_6;
@ -3028,13 +3028,13 @@ void Solar_801A7930(Player* player) {
}
switch (gCsFrameCount) {
case 440:
D_ctx_80177840 = 100;
gLevelClearScreenTimer = 100;
break;
case 640:
Radio_PlayMessage(gMsg_ID_20010, RCID_FOX);
break;
case 728:
switch (gTeamShields[2]) {
switch (gTeamShields[TEAM_ID_SLIPPY]) {
case 0:
Radio_PlayMessage(gMsg_ID_20345, RCID_ROB64);
break;
@ -3047,7 +3047,7 @@ void Solar_801A7930(Player* player) {
}
break;
case 875:
switch (gTeamShields[3]) {
switch (gTeamShields[TEAM_ID_PEPPY]) {
case 0:
Radio_PlayMessage(gMsg_ID_20344, RCID_ROB64);
break;
@ -3060,7 +3060,7 @@ void Solar_801A7930(Player* player) {
}
break;
case 1021:
switch (gTeamShields[1]) {
switch (gTeamShields[TEAM_ID_FALCO]) {
case 0:
Radio_PlayMessage(gMsg_ID_20343, RCID_ROB64);
break;
@ -3083,7 +3083,7 @@ void Solar_801A7930(Player* player) {
player->unk_190 = player->unk_194 = 5.0f;
break;
case 1400:
if (gTeamShields[3] > 0) {
if (gTeamShields[TEAM_ID_PEPPY] > 0) {
gActors[0].state = 2;
}
break;
@ -3092,12 +3092,12 @@ void Solar_801A7930(Player* player) {
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50);
break;
case 1420:
if (gTeamShields[2] > 0) {
if (gTeamShields[TEAM_ID_SLIPPY] > 0) {
gActors[1].state = 2;
}
break;
case 1440:
if (gTeamShields[1] > 0) {
if (gTeamShields[TEAM_ID_FALCO] > 0) {
gActors[2].state = 2;
}
break;
@ -3138,7 +3138,7 @@ void Solar_801A8BE8(Actor* actor) {
case 4:
break;
case 1:
if ((actor->unk_0B6 != 0) && ((((actor->index & 7) * 10) + 1030) < gCsFrameCount)) {
if ((actor->unk_0B6 != 0) && ((((s32) (actor->index % 8U) * 10) + 1030) < gCsFrameCount)) {
actor->state = 4;
}
break;

View File

@ -670,7 +670,7 @@ void Zoness_801904CC(Actor* actor) {
RAND_FLOAT(10.0f), 41, actor->scale, 200, i);
}
actor->itemDrop = DROP_NONE;
func_enmy_80066254(actor);
Actor_Despawn(actor);
Object_Kill(&actor->obj, actor->sfxSource);
func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 4.0f);
func_effect_8007A6F0(&actor->obj.pos, 0x29018036);
@ -701,7 +701,7 @@ void Zoness_80190790(Actor* actor) {
Vec3f sp44;
Vec3f sp38;
s32 i;
Actor* sp30;
Actor* otherActor;
actor->unk_04E++;
if (actor->unk_04E >= 200) {
@ -712,14 +712,15 @@ void Zoness_80190790(Actor* actor) {
actor->unk_0F4.x = -actor->vel.y * 2.5f;
actor->fwork[1] += 5.0f;
actor->unk_0F4.z = SIN_DEG(actor->fwork[1]) * 30.0f;
for (i = 0, sp30 = gActors; i < 60; i++, sp30++) {
if ((sp30->obj.status == OBJ_ACTIVE) && (sp30->obj.id == OBJ_ACTOR_239) &&
(sp30->iwork[0] == actor->iwork[0])) {
temp1 = Math_RadToDeg(Math_Atan2F(sp30->obj.pos.x - actor->obj.pos.x, sp30->obj.pos.z - actor->obj.pos.z));
for (i = 0, otherActor = gActors; i < 60; i++, otherActor++) {
if ((otherActor->obj.status == OBJ_ACTIVE) && (otherActor->obj.id == OBJ_ACTOR_239) &&
(otherActor->iwork[0] == actor->iwork[0])) {
temp1 = Math_RadToDeg(
Math_Atan2F(otherActor->obj.pos.x - actor->obj.pos.x, otherActor->obj.pos.z - actor->obj.pos.z));
Math_SmoothStepToAngle(&actor->unk_0F4.y, temp1, 0.2f, 3.0f, 0.0f);
if ((fabsf(actor->obj.pos.x - sp30->obj.pos.x) < 500.0f) &&
(fabsf(actor->obj.pos.z - sp30->obj.pos.z) < 500.0f)) {
sp30->obj.status = OBJ_FREE;
if ((fabsf(actor->obj.pos.x - otherActor->obj.pos.x) < 500.0f) &&
(fabsf(actor->obj.pos.z - otherActor->obj.pos.z) < 500.0f)) {
otherActor->obj.status = OBJ_FREE;
actor->iwork[0]++;
}
break;
@ -807,8 +808,8 @@ void Zoness_80190D0C(Actor* actor) {
var_s2->y.offset = temp_s0->pos.y - actor->obj.pos.y;
var_s2->x.offset = temp_s0->pos.x - actor->obj.pos.x;
Zoness_80190B4C(temp_s0->pos.x, temp_s0->pos.y, temp_s0->pos.z, temp_s0->rot.x, temp_s0->rot.y, temp_s0->rot.z,
D_i3_801BF594[i], actor->timer_0C6 & 1);
if (D_ctx_80177854 != 100) {
D_i3_801BF594[i], actor->timer_0C6 % 2U);
if (gPlayState != PLAY_PAUSE) {
Math_SmoothStepToF(&temp_s0->pos.y, actor->fwork[2], 1.0f, 10.0f, 0.0f);
}
}
@ -911,7 +912,7 @@ void Zoness_80191010(Actor* actor) {
RAND_FLOAT(10.0f), 42, actor->scale, 200, i);
}
actor->itemDrop = DROP_SILVER_RING_25p;
func_enmy_80066254(actor);
Actor_Despawn(actor);
func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 3.0f);
AUDIO_PLAY_SFX(0x2903A008, actor->sfxSource, 4);
Object_Kill(&actor->obj, actor->sfxSource);
@ -941,26 +942,26 @@ void Zoness_801914C4(Actor* actor) {
void Zoness_801915A4(Actor* actor) {
s32 i;
Actor* var_a2;
Actor* actor241;
actor->health = 50;
actor->fwork[0] = actor->obj.pos.z - 10000.0f;
for (i = 0, var_a2 = gActors; i < 60; i++, var_a2++) {
if (var_a2->obj.status == OBJ_FREE) {
Actor_Initialize(var_a2);
var_a2->obj.status = OBJ_INIT;
var_a2->obj.id = OBJ_ACTOR_241;
var_a2->obj.pos.x = actor->obj.pos.x;
var_a2->obj.pos.y = actor->obj.pos.y;
var_a2->obj.pos.z = actor->obj.pos.z;
var_a2->iwork[0] = actor->index + 1;
Object_SetInfo(&var_a2->info, var_a2->obj.id);
for (i = 0, actor241 = gActors; i < 60; i++, actor241++) {
if (actor241->obj.status == OBJ_FREE) {
Actor_Initialize(actor241);
actor241->obj.status = OBJ_INIT;
actor241->obj.id = OBJ_ACTOR_241;
actor241->obj.pos.x = actor->obj.pos.x;
actor241->obj.pos.y = actor->obj.pos.y;
actor241->obj.pos.z = actor->obj.pos.z;
actor241->iwork[0] = actor->index + 1;
Object_SetInfo(&actor241->info, actor241->obj.id);
actor->iwork[0] = i;
break;
}
}
if (i >= 60) {
var_a2->obj.status = OBJ_FREE;
actor241->obj.status = OBJ_FREE;
}
}
@ -972,7 +973,7 @@ void Zoness_80191680(Actor* actor) {
f32 sp54;
Vec3f sp48;
Vec3f sp3C;
Actor* sp38;
Actor* otherActor;
if (actor->obj.pos.z < actor->fwork[0]) {
actor->state = 1;
@ -984,7 +985,7 @@ void Zoness_80191680(Actor* actor) {
AUDIO_PLAY_SFX(0x29033037, actor->sfxSource, 4);
if (actor->health <= 0) {
actor->health = actor->itemDrop = 0;
func_enmy_80066254(actor);
Actor_Despawn(actor);
actor->state = 1;
AUDIO_PLAY_SFX(0x29018036, actor->sfxSource, 4);
}
@ -1004,8 +1005,8 @@ void Zoness_80191680(Actor* actor) {
sp60 = actor->fwork[2] - actor->obj.pos.y;
sp5C = actor->fwork[3] - actor->obj.pos.z;
sp54 = Math_RadToDeg(Math_Atan2F(sp64, sp5C));
sp38 = &gActors[actor->iwork[0]];
if ((actor->state != 0) || (sp38->obj.status == OBJ_FREE)) {
otherActor = &gActors[actor->iwork[0]];
if ((actor->state != 0) || (otherActor->obj.status == OBJ_FREE)) {
actor->timer_0CA[0] = 0;
actor->info.unk_1C = 0.0f;
sp54 += 180.0f;
@ -1033,19 +1034,19 @@ void Zoness_80191680(Actor* actor) {
actor->vel.x = sp3C.x;
actor->vel.y = sp3C.y;
actor->vel.z = sp3C.z - 20.0f;
if (sp38->iwork[0] == (actor->index + 1)) {
if (otherActor->iwork[0] == (actor->index + 1)) {
if (actor->state == 0) {
sp38->obj.pos.x = actor->obj.pos.x;
sp38->obj.pos.y = actor->obj.pos.y - 50.0f;
sp38->obj.pos.z = actor->obj.pos.z;
actor->fwork[4] = sp38->obj.pos.x;
actor->fwork[5] = sp38->obj.pos.y;
actor->fwork[6] = sp38->obj.pos.z;
if (!(gGameFrameCount & 0xF) && (fabsf(gPlayer[0].pos.x - actor->obj.pos.x) < 100.0f)) {
otherActor->obj.pos.x = actor->obj.pos.x;
otherActor->obj.pos.y = actor->obj.pos.y - 50.0f;
otherActor->obj.pos.z = actor->obj.pos.z;
actor->fwork[4] = otherActor->obj.pos.x;
actor->fwork[5] = otherActor->obj.pos.y;
actor->fwork[6] = otherActor->obj.pos.z;
if (((gGameFrameCount % 16) == 0) && (fabsf(gPlayer[0].pos.x - actor->obj.pos.x) < 100.0f)) {
func_effect_80081BEC(actor->fwork[4], actor->fwork[5], actor->fwork[6], 1.0f, 0);
}
} else {
sp38->vel.y -= 1.0f;
otherActor->vel.y -= 1.0f;
}
}
}
@ -1075,7 +1076,7 @@ void Zoness_80191BC4(Actor* actor) {
}
actor->fwork[0] += 10.0f;
Zoness_8018FF50(actor);
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
func_effect_8007C484(RAND_FLOAT_CENTERED(50.0f) + actor->obj.pos.x,
RAND_FLOAT_CENTERED(50.0f) + actor->obj.pos.y,
RAND_FLOAT_CENTERED(50.0f) + actor->obj.pos.z, actor->vel.x, actor->vel.y, actor->vel.z,
@ -1190,7 +1191,7 @@ void Zoness_80192094(Actor* actor) {
}
break;
case 2:
if (actor->iwork[1] >= 21) {
if (actor->iwork[1] > 20) {
actor->iwork[0] = 0;
actor->state = 3;
actor->vel.y = 50.0f;
@ -1239,7 +1240,7 @@ void Zoness_80192094(Actor* actor) {
RAND_FLOAT(20.0f), 44, actor->scale, 200, i);
}
actor->itemDrop = DROP_BOMB;
func_enmy_80066254(actor);
Actor_Despawn(actor);
Object_Kill(&actor->obj, actor->sfxSource);
func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f);
break;
@ -1340,7 +1341,7 @@ void Zoness_80192834(Actor* actor) {
RAND_FLOAT(10.0f), 43, actor->scale, 200, i);
}
actor->itemDrop = DROP_NONE;
func_enmy_80066254(actor);
Actor_Despawn(actor);
Object_Kill(&actor->obj, actor->sfxSource);
func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 3.0f);
func_effect_8007A6F0(&actor->obj.pos, 0x29018036);
@ -1457,7 +1458,7 @@ void Zoness_80192E64(Actor* actor) {
RAND_FLOAT(20.0f), 59, actor->scale, 200, i);
}
actor->itemDrop = DROP_BOMB_33p;
func_enmy_80066254(actor);
Actor_Despawn(actor);
Object_Kill(&actor->obj, actor->sfxSource);
func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f);
break;
@ -1494,12 +1495,12 @@ f32 D_i3_801BF608[6] = {
-45.0f, 0.0f, -45.0f, 0.0f, -45.0f, 0.0f,
};
void Zoness_BossZo_Init(Boss* bossZO) {
void Zoness_BossZo_Init(BossZO* this) {
s32 i;
gBossActive = 1;
gBossFrameCount = 0;
bossZO->vel.z = -40.0f;
this->vel.z = -40.0f;
for (i = 0; i < ZO_LIMB_MAX; i++) {
sZoLimbTimers[i] = 0;
}
@ -1513,17 +1514,17 @@ void Zoness_BossZo_Init(Boss* bossZO) {
sZoFwork[ZO_BSF_106_X] = sZoFwork[ZO_BSF_93_X] = sZoFwork[ZO_BSF_96_X] = sZoFwork[ZO_BSF_29_X] =
sZoFwork[ZO_BSF_109_X] = sZoFwork[ZO_BSF_43_X] = sZoFwork[ZO_BSF_102_X] = sZoFwork[ZO_BSF_37_X] =
sZoFwork[ZO_BSF_46_X] = sZoFwork[ZO_BSF_68_X] = sZoFwork[ZO_BSF_40_X] = sZoFwork[ZO_BSF_65_X] =
sZoFwork[ZO_BSF_55_X] = bossZO->obj.pos.x;
sZoFwork[ZO_BSF_55_X] = this->obj.pos.x;
sZoFwork[ZO_BSF_32_Y] = sZoFwork[ZO_BSF_99_Y] = sZoFwork[ZO_BSF_60_Y] = sZoFwork[ZO_BSF_52_Y] =
sZoFwork[ZO_BSF_106_Y] = sZoFwork[ZO_BSF_93_Y] = sZoFwork[ZO_BSF_96_Y] = sZoFwork[ZO_BSF_29_Y] =
sZoFwork[ZO_BSF_109_Y] = sZoFwork[ZO_BSF_43_Y] = sZoFwork[ZO_BSF_102_Y] = sZoFwork[ZO_BSF_37_Y] =
sZoFwork[ZO_BSF_46_Y] = sZoFwork[ZO_BSF_68_Y] = sZoFwork[ZO_BSF_40_Y] = sZoFwork[ZO_BSF_65_Y] =
sZoFwork[ZO_BSF_55_Y] = bossZO->obj.pos.y;
sZoFwork[ZO_BSF_55_Y] = this->obj.pos.y;
sZoFwork[ZO_BSF_32_Z] = sZoFwork[ZO_BSF_99_Z] = sZoFwork[ZO_BSF_60_Z] = sZoFwork[ZO_BSF_52_Z] =
sZoFwork[ZO_BSF_106_Z] = sZoFwork[ZO_BSF_93_Z] = sZoFwork[ZO_BSF_96_Z] = sZoFwork[ZO_BSF_29_Z] =
sZoFwork[ZO_BSF_109_Z] = sZoFwork[ZO_BSF_43_Z] = sZoFwork[ZO_BSF_102_Z] = sZoFwork[ZO_BSF_37_Z] =
sZoFwork[ZO_BSF_46_Z] = sZoFwork[ZO_BSF_68_Z] = sZoFwork[ZO_BSF_40_Z] = sZoFwork[ZO_BSF_65_Z] =
sZoFwork[ZO_BSF_55_Z] = bossZO->obj.pos.z;
sZoFwork[ZO_BSF_55_Z] = this->obj.pos.z;
sZoSwork[ZO_BSS_8] = 40;
sZoSwork[ZO_BSS_9] = 40;
@ -1531,9 +1532,9 @@ void Zoness_BossZo_Init(Boss* bossZO) {
sZoSwork[ZO_BSS_11] = 20;
sZoSwork[ZO_BSS_12] = 20;
sZoSwork[ZO_BSS_13] = 61;
bossZO->health = 300;
bossZO->obj.pos.y = -1800.0f;
bossZO->obj.rot.y = 180.0f;
this->health = 300;
this->obj.pos.y = -1800.0f;
this->obj.rot.y = 180.0f;
sZoFwork[ZO_BSF_28] = -2600.0f;
sZoFwork[ZO_BSF_1] = -130.0f;
@ -1545,30 +1546,30 @@ void Zoness_BossZo_Init(Boss* bossZO) {
sZoSwork[ZO_BSS_43] = 255;
sZoSwork[ZO_BSS_44] = 255;
sZoFwork[ZO_BSF_25] = 0.0f;
bossZO->timer_050 = 200;
bossZO->timer_052 = 280;
this->timer_050 = 200;
this->timer_052 = 280;
sZoSwork[ZO_BSS_37] = 255;
for (i = 0; i < 2; i++) {
Actor_Initialize(&gActors[i]);
gActors[i].obj.status = OBJ_INIT;
gActors[i].obj.id = OBJ_ACTOR_248 + i;
gActors[i].obj.pos.x = bossZO->obj.pos.x;
gActors[i].obj.pos.y = bossZO->obj.pos.y;
gActors[i].obj.pos.z = bossZO->obj.pos.z;
gActors[i].obj.pos.x = this->obj.pos.x;
gActors[i].obj.pos.y = this->obj.pos.y;
gActors[i].obj.pos.z = this->obj.pos.z;
Object_SetInfo(&gActors[i].info, gActors[i].obj.id);
}
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 40);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 40);
ZO_HIT_3(bossZO)->b.z.offset = ZO_HIT_4(bossZO)->b.z.offset = -561.6f;
ZO_HIT_8(bossZO, 0)->z.offset = ZO_HIT_8(bossZO, 1)->z.offset = -213.2f;
ZO_HIT_10(bossZO, 0)->z.offset = ZO_HIT_10(bossZO, 1)->z.offset = -351.0f;
ZO_HIT_12(bossZO)->z.offset = -883.99994f;
ZO_HIT_12(bossZO)->z.size = 244.4f;
ZO_HIT_12(bossZO)->y.offset = 863.19995f;
ZO_HIT_12(bossZO)->y.size = 171.59999f;
ZO_HIT_12(bossZO)->x.offset = 0.f;
ZO_HIT_12(bossZO)->x.size = 93.6f;
ZO_HIT_3(this)->b.z.offset = ZO_HIT_4(this)->b.z.offset = -561.6f;
ZO_HIT_8(this, 0)->z.offset = ZO_HIT_8(this, 1)->z.offset = -213.2f;
ZO_HIT_10(this, 0)->z.offset = ZO_HIT_10(this, 1)->z.offset = -351.0f;
ZO_HIT_12(this)->z.offset = -883.99994f;
ZO_HIT_12(this)->z.size = 244.4f;
ZO_HIT_12(this)->y.offset = 863.19995f;
ZO_HIT_12(this)->y.size = 171.59999f;
ZO_HIT_12(this)->x.offset = 0.f;
ZO_HIT_12(this)->x.size = 93.6f;
}
void Zoness_80193628(Object* obj, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6) {
@ -1718,7 +1719,7 @@ bool Zoness_80193D08(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* t
if (sZoSwork[ZO_BSS_37] != 255) {
RCP_SetupDL_46();
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, sZoSwork[ZO_BSS_37], sZoSwork[ZO_BSS_37]);
} else if (!(sZoLimbTimers[limbIndex] & 1)) {
} else if ((sZoLimbTimers[limbIndex] % 2) == 0) {
RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
} else {
RCP_SetupDL_27();
@ -2042,7 +2043,7 @@ void Zoness_80194A84(Boss* bossZO) {
Math_SmoothStepToF(&bossZO->obj.pos.z, gPlayer[0].camEye.z - D_ctx_80177D20 + sZoFwork[ZO_BSF_28], 0.1f,
sZoFwork[ZO_BSF_27], 0.00001f);
}
if (!(gGameFrameCount & 3)) {
if (((gGameFrameCount % 4) == 0)) {
if ((bossZO->obj.rot.y <= 90.0f) || (bossZO->obj.rot.y >= 270.0f)) {
sZoSwork[ZO_BSS_43] = bossZO->obj.rot.y;
if (sZoSwork[ZO_BSS_43] > 270) {
@ -2110,7 +2111,7 @@ void Zoness_80194A84(Boss* bossZO) {
}
switch (bossZO->state) {
case 0:
if ((!(gGameFrameCount & 7) || (bossZO->timer_050 == 43)) && (bossZO->swork[ZO_SWK_13] == 0) &&
if ((((gGameFrameCount % 8) == 0) || (bossZO->timer_050 == 43)) && (bossZO->swork[ZO_SWK_13] == 0) &&
((bossZO->swork[ZO_SWK_12] < 7) || (bossZO->timer_050 == 43))) {
D_ctx_801779A8[0] = 20.0f;
if (func_play_800A73E4(&sp134, &sp130, sZoFwork[ZO_BSF_43_X], sZoFwork[ZO_BSF_43_Y] - 300.0f,
@ -2160,7 +2161,7 @@ void Zoness_80194A84(Boss* bossZO) {
Zoness_8019962C(bossZO, 0.0f);
Math_SmoothStepToF(&sZoFwork[ZO_BSF_1], sZoFwork[ZO_BSF_74], 0.1f, 2.0f, 0.00001f);
Math_SmoothStepToF(&sZoFwork[ZO_BSF_11], sZoFwork[ZO_BSF_75], 0.1f, 2.0f, 0.00001f);
if ((bossZO->timer_050 == 0) && !(gGameFrameCount & 3)) {
if ((bossZO->timer_050 == 0) && ((gGameFrameCount % 4) == 0)) {
if (sZoSwork[ZO_BSS_9] != 0) {
Zoness_80193908(sZoFwork[ZO_BSF_29_X], sZoFwork[ZO_BSF_29_Y], sZoFwork[ZO_BSF_29_Z],
bossZO->obj.rot.y);
@ -2347,7 +2348,7 @@ void Zoness_80194A84(Boss* bossZO) {
break;
case 4:
if (bossZO->swork[ZO_SWK_15] == 0) {
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = D_ctx_80178340 = 0;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 0;
}
Math_SmoothStepToAngle(&bossZO->obj.rot.z, bossZO->fwork[ZO_FWK_9], 0.1f, 100.0f, 0.00001f);
Math_SmoothStepToAngle(&bossZO->fwork[ZO_FWK_9], 0.0f, 0.1f, 100.0f, 0.00001f);
@ -2452,16 +2453,16 @@ void Zoness_80194A84(Boss* bossZO) {
case 6:
D_ctx_801779A8[0] = 20.0f;
if (gCameraShake == 0) {
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255;
D_ctx_80178340 = D_ctx_80178358 = 255;
D_ctx_80178358 = 0;
D_ctx_8017835C = 25;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255;
gFillScreenAlpha = gFillScreenAlphaTarget = 255;
gFillScreenAlphaTarget = 0;
gFillScreenAlphaStep = 25;
gCameraShake = (s32) (RAND_FLOAT(20.0f) + 20.0f);
}
if (gCameraShake == 29) {
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = D_ctx_80178340 = 0;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 0;
}
if (!(gGameFrameCount & 3)) {
if (((gGameFrameCount % 4) == 0)) {
spE4.x = RAND_FLOAT_CENTERED(300.0f) + bossZO->obj.pos.x;
spE4.y = RAND_FLOAT_CENTERED(200.0f) + (bossZO->obj.pos.y + 600.0f);
spE4.z = bossZO->obj.pos.z - 50.0f;
@ -2476,7 +2477,7 @@ void Zoness_80194A84(Boss* bossZO) {
}
bossZO->vel.x = 0.0f;
Math_SmoothStepToF(&bossZO->obj.pos.x, 0.0f, 0.1f, 5.0f, 0.00001f);
if (!(gGameFrameCount & 7) && (Rand_ZeroOne() < 0.5f)) {
if (((gGameFrameCount % 8) == 0) && (Rand_ZeroOne() < 0.5f)) {
sZoLimbTimers[ZO_LIMB_36] = 15;
sZoLimbTimers[ZO_LIMB_25] = 15;
}
@ -2509,14 +2510,14 @@ void Zoness_80194A84(Boss* bossZO) {
}
bossZO->timer_050 = 70;
sZoSwork[ZO_BSS_5] = 0;
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = D_ctx_80178340 = 0;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 0;
func_boss_80042EC0(bossZO);
bossZO->state = 7;
}
break;
case 7:
D_ctx_801779A8[0] = 20.0f;
if (!(gGameFrameCount & 7) &&
if (((gGameFrameCount % 8) == 0) &&
(func_play_800A73E4(&sp134, &sp130, bossZO->obj.pos.x, -300.0f, bossZO->obj.pos.z) != 0)) {
func_effect_8008377C(RAND_FLOAT_CENTERED(500.0f) + bossZO->obj.pos.x, sp134 - 300.0f,
RAND_FLOAT_CENTERED(3000.0f) + bossZO->obj.pos.z, 5.0f, 2.0f);
@ -2600,7 +2601,7 @@ void Zoness_80194A84(Boss* bossZO) {
spE4.z = gPlayer[0].unk_138 - bossZO->obj.pos.z;
Math_SmoothStepToAngle(&sZoFwork[ZO_BSF_14], Math_RadToDeg(Math_Atan2F(spE4.x, spE4.z)), 0.5f, 100.0f, 0.001f);
Math_SmoothStepToAngle(&sZoFwork[ZO_BSF_0], sZoFwork[ZO_BSF_76], 0.2f, 4.0f, 0.0001f);
if ((!(gGameFrameCount & 0x3F) || (sZoSwork[ZO_BSS_22] != 0)) &&
if ((((gGameFrameCount % 64) == 0) || (sZoSwork[ZO_BSS_22] != 0)) &&
((Rand_ZeroOne() < 0.5f) || (sZoSwork[ZO_BSS_22] != 0)) && (sZoSwork[ZO_BSS_23] == 0)) {
sZoSwork[ZO_BSS_23] = D_i3_801BF5F0[sZoSwork[ZO_BSS_22]];
sZoFwork[ZO_BSF_76] = D_i3_801BF608[sZoSwork[ZO_BSS_22]];
@ -2707,7 +2708,7 @@ void Zoness_80194A84(Boss* bossZO) {
}
if ((sZoSwork[ZO_BSS_13] < 2) && (sZoLimbTimers[ZO_LIMB_5] != LIMB_DESTROYED)) {
D_ctx_801779A8[0] = 20.0f;
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
func_effect_8007D0E0(sZoFwork[ZO_BSF_52_X] + RAND_FLOAT_CENTERED(200.0f),
sZoFwork[ZO_BSF_52_Y] + RAND_FLOAT_CENTERED(200.0f),
sZoFwork[ZO_BSF_52_Z] + RAND_FLOAT_CENTERED(100.0f), 5.0f);
@ -2875,10 +2876,10 @@ void Zoness_80194A84(Boss* bossZO) {
if (sZoSwork[ZO_BSS_11] <= 0) {
sZoSwork[ZO_BSS_11] = 0;
gCameraShake = 30;
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255;
D_ctx_80178340 = D_ctx_80178358 = 255;
D_ctx_80178358 = 0;
D_ctx_8017835C = 25;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255;
gFillScreenAlpha = gFillScreenAlphaTarget = 255;
gFillScreenAlphaTarget = 0;
gFillScreenAlphaStep = 25;
bossZO->swork[ZO_SWK_15] = 3;
spD8.x = sZoFwork[ZO_BSF_106_X];
spD8.y = sZoFwork[ZO_BSF_106_Y];
@ -2901,10 +2902,10 @@ void Zoness_80194A84(Boss* bossZO) {
if (sZoSwork[ZO_BSS_12] <= 0) {
sZoSwork[ZO_BSS_12] = 0;
gCameraShake = 30;
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255;
D_ctx_80178340 = D_ctx_80178358 = 255;
D_ctx_80178358 = 0;
D_ctx_8017835C = 25;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255;
gFillScreenAlpha = gFillScreenAlphaTarget = 255;
gFillScreenAlphaTarget = 0;
gFillScreenAlphaStep = 25;
bossZO->swork[ZO_SWK_15] = 3;
spCC.x = sZoFwork[ZO_BSF_109_X];
spCC.y = sZoFwork[ZO_BSF_109_Y];
@ -3168,7 +3169,7 @@ void Zoness_80198BE8(Boss* bossZO, s32 arg1) {
}
sZoSwork[ZO_BSS_2 + arg1] = 2;
sZoSwork[ZO_BSS_41 + arg1]++;
if (sZoSwork[ZO_BSS_41 + arg1] >= 11) {
if (sZoSwork[ZO_BSS_41 + arg1] > 10) {
sZoSwork[ZO_BSS_41 + arg1] = 0;
sZoSwork[ZO_BSS_39 + arg1] = 30;
if (arg1 == 1) {
@ -3220,13 +3221,13 @@ void Zoness_80198ECC(Boss* bossZO) {
}
void Zoness_80198F3C(Boss* bossZO, s32 arg1, s32 arg2) {
if ((!(gGameFrameCount & 7) && (Rand_ZeroOne() < 0.5f))) {
if ((((gGameFrameCount % 8) == 0) && (Rand_ZeroOne() < 0.5f))) {
sZoLimbTimers[ZO_LIMB_7 + 4 * arg1] = sZoLimbTimers[ZO_LIMB_21 + 2 * arg1] =
sZoLimbTimers[ZO_LIMB_22 + 2 * arg1] = 15;
}
func_effect_8007D0E0(sZoFwork[ZO_BSF_0 + arg2] + RAND_FLOAT_CENTERED(400.0f),
sZoFwork[ZO_BSF_1 + arg2] + RAND_RANGE(-160.0f, 640.0f), sZoFwork[ZO_BSF_2 + arg2], 7.0f);
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
func_effect_8007C120(sZoFwork[ZO_BSF_0 + arg2], sZoFwork[ZO_BSF_1 + arg2], sZoFwork[ZO_BSF_2 + arg2],
bossZO->vel.x, bossZO->vel.y, bossZO->vel.z, 0.2f, 10);
}
@ -3360,7 +3361,7 @@ void Zoness_8019969C(Actor* actor) {
actor->itemDrop = DROP_BOMB;
actor->unk_0D4 = 2;
actor->obj.pos.z -= 100.0f;
func_enmy_80066254(actor);
Actor_Despawn(actor);
Object_Kill(&actor->obj, actor->sfxSource);
func_effect_8007A6F0(&actor->obj.pos, 0x2903A008);
}
@ -3461,7 +3462,7 @@ void Zoness_80199A28(Actor* actor) {
func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y + 100.0f, actor->obj.pos.z, 7.0f);
actor->unk_0D4 = 2;
actor->obj.pos.y += 200.0f;
func_enmy_80066254(actor);
Actor_Despawn(actor);
Object_Kill(&actor->obj, actor->sfxSource);
func_effect_8007A6F0(&actor->obj.pos, 0x1903400F);
} else {
@ -3478,7 +3479,7 @@ void Zoness_80199A28(Actor* actor) {
actor->itemDrop = DROP_SILVER_RING_50p;
actor->unk_0D4 = 2;
actor->obj.pos.y += 200.0f;
func_enmy_80066254(actor);
Actor_Despawn(actor);
Object_Kill(&actor->obj, actor->sfxSource);
}
}
@ -3718,7 +3719,7 @@ void Zoness_8019A5D4(Actor* actor) {
}
actor->unk_0D0 = 0;
}
if (!(gGameFrameCount & 7) && (actor->state != 0) && (actor->iwork[0] < 8) &&
if (((gGameFrameCount % 8) == 0) && (actor->state != 0) && (actor->iwork[0] < 8) &&
(func_play_800A73E4(&sp44, &sp40, actor->obj.pos.x, actor->obj.pos.y - 100.0f, actor->obj.pos.z) != 0)) {
func_effect_8008377C(actor->obj.pos.x, sp44, actor->obj.pos.z, 0.0f, 0.7f);
actor->iwork[0]++;
@ -3987,7 +3988,7 @@ void Zoness_8019B854(Actor* actor) {
actor->obj.pos.y += 100.0f;
if (D_i3_801BF824[actor->iwork[0]] < 1000) {
actor->itemDrop = D_i3_801BF824[actor->iwork[0]];
func_enmy_80066254(actor);
Actor_Despawn(actor);
} else {
if (D_i3_801BF824[actor->iwork[0]] == 1000) {
for (i = 0, j = 0; i < 10; i++, j++) {
@ -4000,11 +4001,11 @@ void Zoness_8019B854(Actor* actor) {
sp9C.x = RAND_FLOAT_CENTERED(10.0f);
sp9C.y = RAND_FLOAT_CENTERED(10.0f);
sp9C.z = 50.0f;
func_effect_8007EE68(353, &spB4, &spA8, &spA8, &sp9C, 1.0f);
func_effect_8007EE68(OBJ_EFFECT_353, &spB4, &spA8, &spA8, &sp9C, 1.0f);
}
}
actor->itemDrop = DROP_NONE;
func_enmy_80066254(actor);
Actor_Despawn(actor);
}
Object_Kill(&actor->obj, actor->sfxSource);
func_effect_8007A6F0(&actor->obj.pos, 0x1903901C);
@ -4093,12 +4094,12 @@ void Zoness_8019BE48(Actor* actor) {
actor->timer_0C6 = 15;
actor->health -= actor->damage;
if (actor->health <= 0) {
if (D_enmy_80161684 == 0) {
if (!gMissedZoSearchlight) {
BonusText_Display(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 200.0f, 2);
gHitCount += 2;
}
actor->health = actor->itemDrop = 0;
func_enmy_80066254(actor);
Actor_Despawn(actor);
actor->state++;
}
}
@ -4312,9 +4313,9 @@ void Zoness_8019CBEC(Actor* actor) {
actor->timer_0C2 = 30000;
switch (actor->state) {
case 0:
actor->fwork[5] = D_i3_801BF8CC[gGameFrameCount & 1];
if (D_enmy_80161684 != 0) {
actor->fwork[5] = D_i3_801BF8C4[gGameFrameCount & 1];
actor->fwork[5] = D_i3_801BF8CC[gGameFrameCount % 2U];
if (gMissedZoSearchlight) {
actor->fwork[5] = D_i3_801BF8C4[gGameFrameCount % 2U];
actor->iwork[1] = 1;
}
actor->state++;
@ -4326,7 +4327,7 @@ void Zoness_8019CBEC(Actor* actor) {
} else {
Math_SmoothStepToAngle(&actor->fwork[4], actor->fwork[5], 0.1f, actor->fwork[6], 0.0001f);
}
if ((D_enmy_80161684 != 0) && (actor->iwork[1] == 0)) {
if (gMissedZoSearchlight && (actor->iwork[1] == 0)) {
if (actor->fwork[5] < 300.0f) {
actor->fwork[5] = D_i3_801BF8C4[0];
} else {
@ -4374,14 +4375,14 @@ void Zoness_8019CE58(Actor* actor) {
Matrix_RotateZ(gGfxMatrix, (actor->fwork[4] + actor->obj.rot.z) * M_DTOR, 1);
Matrix_Scale(gGfxMatrix, actor->fwork[1], actor->fwork[2], actor->fwork[3], 1);
Matrix_SetGfxMtx(&gMasterDisp);
if (D_enmy_80161684 != 0) {
if (gMissedZoSearchlight) {
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 191, 43, 255);
gDPSetEnvColor(gMasterDisp++, 255, 0, 0, 255);
} else {
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255);
gDPSetEnvColor(gMasterDisp++, 255, 255, 127, 255);
}
} else if (D_enmy_80161684 != 0) {
} else if (gMissedZoSearchlight) {
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 191, 43, 50);
gDPSetEnvColor(gMasterDisp++, 255, 0, 0, 255);
} else {
@ -4391,7 +4392,7 @@ void Zoness_8019CE58(Actor* actor) {
gSPDisplayList(gMasterDisp++, D_ZO_60181E0);
}
void Zoness_Actor247_Init(Actor* actor) {
void Zoness_Actor247_Init(Actor247* this) {
s32 i;
for (i = 0; i < 60; i++) {
@ -4399,14 +4400,14 @@ void Zoness_Actor247_Init(Actor* actor) {
Actor_Initialize(&gActors[i]);
gActors[i].obj.status = OBJ_ACTIVE;
gActors[i].obj.id = OBJ_ACTOR_247;
gActors[i].obj.pos.x = actor->obj.pos.x;
gActors[i].obj.pos.y = actor->obj.pos.y - 60.0f;
gActors[i].obj.pos.x = this->obj.pos.x;
gActors[i].obj.pos.y = this->obj.pos.y - 60.0f;
gActors[i].fwork[2] = gActors[i].obj.pos.y;
gActors[i].obj.pos.z = actor->obj.pos.z;
gActors[i].obj.pos.z = this->obj.pos.z;
gActors[i].state = 1;
actor->unk_046 = i + 1;
this->unk_046 = i + 1;
Object_SetInfo(&gActors[i].info, gActors[i].obj.id);
gActors[i].info.hitbox = SEGMENTED_TO_VIRTUAL(D_ZO_602C028);
break;
@ -4415,7 +4416,7 @@ void Zoness_Actor247_Init(Actor* actor) {
}
void Zoness_8019D15C(Actor* actor) {
Actor* temp_v0;
Actor* otherActor;
if (actor->state == 0) {
if (actor->unk_0D0 != 0) {
@ -4433,10 +4434,10 @@ void Zoness_8019D15C(Actor* actor) {
}
}
if (actor->unk_046 != 0) {
temp_v0 = &gActors[actor->unk_046 - 1];
temp_v0->obj.pos.y += actor->fwork[1] * 0.3f;
if (temp_v0->obj.pos.y > actor->fwork[2] + 370.0f) {
temp_v0->obj.pos.y = actor->fwork[2] + 370.0f;
otherActor = &gActors[actor->unk_046 - 1];
otherActor->obj.pos.y += actor->fwork[1] * 0.3f;
if (otherActor->obj.pos.y > actor->fwork[2] + 370.0f) {
otherActor->obj.pos.y = actor->fwork[2] + 370.0f;
}
}
actor->fwork[0] += actor->fwork[1];
@ -4514,7 +4515,7 @@ void Zoness_8019D428(Player* player) {
gControllerHold[gMainController].button = sp2C;
if (gCsFrameCount >= 270) {
AUDIO_PLAY_BGM(SEQ_ID_ZONESS | SEQ_FLAG);
D_ctx_80177838 = 80;
gLevelStatusScreenTimer = 80;
player->state_1C8 = PLAYERSTATE_1C8_3;
player->unk_1D0 = 0;
player->timer_1F8 = 0;
@ -4586,15 +4587,15 @@ void Zoness_8019D76C(Player* player) {
player->unk_0EC += 30.0f;
}
if (gCsFrameCount >= 140) {
D_ctx_80178358 = 255;
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255;
gFillScreenAlphaTarget = 255;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255;
}
if (gCsFrameCount == 160) {
player->unk_1D0++;
func_play_800A6148();
func_8001CA24(0);
Audio_KillSfxBySource(player->sfxSource);
D_ctx_80178340 = 250;
gFillScreenAlpha = 250;
player->timer_1F8 = 20;
player->wings.unk_2C = 1;
player->unk_0D0 = 0.0f;
@ -4617,7 +4618,7 @@ void Zoness_8019D76C(Player* player) {
Solar_801A7750();
D_ctx_80177A48[1] = 0.0f;
D_ctx_80177A48[2] = 0.0f;
if (D_enmy_80161684 == 0) {
if (!gMissedZoSearchlight) {
D_ctx_80177A48[1] = 330.0f;
player->camEye.x = 1350.0f;
player->camAt.x = gCsCamAtX = 1450.0f;
@ -4641,8 +4642,8 @@ void Zoness_8019D76C(Player* player) {
break;
case 3:
D_ctx_80177CE8 += 60.0f;
D_ctx_80178358 = 0;
D_ctx_8017835C = 4;
gFillScreenAlphaTarget = 0;
gFillScreenAlphaStep = 4;
D_ctx_80177A48[1] += D_ctx_80177A48[2];
Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[1] * M_DTOR, 0);
sp58.x = 0.0f;
@ -4662,12 +4663,12 @@ void Zoness_8019D76C(Player* player) {
gCsCamAtY = player->pos.y;
gCsCamAtZ = player->pos.z + D_ctx_80177D20;
}
if (gCsFrameCount >= 1181) {
if (gCsFrameCount > 1180) {
player->unk_0D0 += 2.0f;
player->unk_0E4 += 0.1f;
Math_SmoothStepToF(&D_ctx_80177A48[2], 0.0f, 1.0f, 0.001f, 0);
player->unk_190 = 2.0f;
if (D_enmy_80161684 == 0) {
if (!gMissedZoSearchlight) {
Math_SmoothStepToF(&D_ctx_80177A48[0], 1.0f, 1.0f, 0.025f, 0.0f);
}
} else {
@ -4677,11 +4678,11 @@ void Zoness_8019D76C(Player* player) {
if (gCsFrameCount == 1300) {
func_play_800A6148();
}
if (gCsFrameCount >= 1271) {
D_ctx_80178358 = 255;
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0;
D_ctx_8017835C = 8;
if (D_ctx_80178340 == 255) {
if (gCsFrameCount > 1270) {
gFillScreenAlphaTarget = 255;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0;
gFillScreenAlphaStep = 8;
if (gFillScreenAlpha == 255) {
func_8001CA24(0);
Audio_FadeOutAll(10);
player->state_1C8 = PLAYERSTATE_1C8_6;
@ -4695,16 +4696,16 @@ void Zoness_8019D76C(Player* player) {
(void) "Demo_Time %d\n";
switch (gCsFrameCount) {
case 320:
if (D_enmy_80161684 == 0) {
D_ctx_80177930 = 1;
if (!gMissedZoSearchlight) {
gNextPlanetPath = 1;
}
D_ctx_80177840 = 100;
gLevelClearScreenTimer = 100;
break;
case 380:
Radio_PlayMessage(gMsg_ID_20010, RCID_FOX);
break;
case 468:
switch (gTeamShields[2]) {
switch (gTeamShields[TEAM_ID_SLIPPY]) {
case 0:
Radio_PlayMessage(gMsg_ID_20345, RCID_ROB64);
break;
@ -4717,7 +4718,7 @@ void Zoness_8019D76C(Player* player) {
}
break;
case 603:
switch (gTeamShields[3]) {
switch (gTeamShields[TEAM_ID_PEPPY]) {
case 0:
Radio_PlayMessage(gMsg_ID_20344, RCID_ROB64);
break;
@ -4725,7 +4726,7 @@ void Zoness_8019D76C(Player* player) {
Radio_PlayMessage(gMsg_ID_20338, RCID_ROB64);
break;
default:
if (D_enmy_80161684 == 0) {
if (!gMissedZoSearchlight) {
func_demo_80048AC0(3);
} else {
Radio_PlayMessage(gMsg_ID_6100, RCID_PEPPY);
@ -4734,7 +4735,7 @@ void Zoness_8019D76C(Player* player) {
}
break;
case 738:
switch (gTeamShields[1]) {
switch (gTeamShields[TEAM_ID_FALCO]) {
case 0:
Radio_PlayMessage(gMsg_ID_20343, RCID_ROB64);
break;
@ -4761,17 +4762,17 @@ void Zoness_8019D76C(Player* player) {
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50);
break;
case 1120:
if (gTeamShields[3] > 0) {
if (gTeamShields[TEAM_ID_PEPPY] > 0) {
gActors[0].state = 2;
}
break;
case 1140:
if (gTeamShields[2] > 0) {
if (gTeamShields[TEAM_ID_SLIPPY] > 0) {
gActors[1].state = 2;
}
break;
case 1160:
if (gTeamShields[1] > 0) {
if (gTeamShields[TEAM_ID_FALCO] > 0) {
gActors[2].state = 2;
}
break;
@ -4821,7 +4822,7 @@ void Zoness_8019E5F0(Actor* actor) {
case 10:
break;
case 1:
if ((actor->unk_0B6 != 0) && ((((actor->index & 7) * 10) + 1030) < gCsFrameCount)) {
if ((actor->unk_0B6 != 0) && ((((s32) (actor->index % 8U) * 10) + 1030) < gCsFrameCount)) {
actor->state = 4;
}
break;

View File

@ -94,7 +94,7 @@ void Bolse_8018BD60(Actor* actor) {
f32 D_i4_8019EEC4[4] = { 8000.0f, -8000.0f, 8000.0f, -8000.0f };
f32 D_i4_8019EED4[4] = { 8000.0f, 8000.0f, -8000.0f, -8000.0f };
if (D_360_8015F924 == 0) {
if (gAllRangeCheckpoint == 0) {
actor->unk_04E++;
if (actor->unk_04E >= 4) {
actor->unk_04E = 0;
@ -207,29 +207,29 @@ void Bolse_8018C158(Actor* actor) {
switch (actor->state) {
case 0:
D_360_800C9B4C = 500000;
D_360_8015F928 = 0;
D_360_8015F908 = 0;
gAllRangeEventTimer = 0;
gStarWolfMsgTimer = 0;
actor->state = 2;
if (D_360_8015F924 == 0) {
if (gAllRangeCheckpoint == 0) {
gBosses[0].fwork[1] = 0.3f;
D_BO_801A03DC = 6;
} else {
D_360_8015F924 = 1;
gAllRangeCheckpoint = 1;
gHitCount = gSavedHitCount;
gBosses[1].state = 2;
D_360_8015F928 = 3000;
gAllRangeEventTimer = 3000;
actor->iwork[1] = gHitCount;
}
for (i = 0; i < 6; i++) {
D_ctx_80177CD0[i] = D_ctx_80177CF0[i];
gStarWolfTeamAlive[i] = gSavedStarWolfTeamAlive[i];
}
case 2:
Bolse_8018BD60(actor);
switch (D_360_8015F928) {
switch (gAllRangeEventTimer) {
case 300:
Radio_PlayMessage(gMsg_ID_11020, RCID_PEPPY);
break;
@ -253,7 +253,7 @@ void Bolse_8018C158(Actor* actor) {
break;
}
if ((D_i4_801A0530 < 9600) && (D_i4_801A0530 & 1024)) {
if ((D_i4_801A0530 < 9600) && (D_i4_801A0530 & 0x400)) {
Bolse_8018BEF8(actor, 8);
}
@ -296,13 +296,14 @@ void Bolse_8018C158(Actor* actor) {
for (i = 10; i < 30; i++) {
Object_Kill(&gActors[i].obj, gActors[i].sfxSource);
}
} else if ((D_360_8015F924 == 1) && (((gHitCount - actor->iwork[1]) >= 5) || (D_i4_801A0530 == 4000))) {
D_360_8015F924 = 2;
} else if ((gAllRangeCheckpoint == 1) &&
(((gHitCount - actor->iwork[1]) >= 5) || (D_i4_801A0530 == 4000))) {
gAllRangeCheckpoint = 2;
actor->iwork[1] = gHitCount;
if ((D_ctx_80177CD0[0] != 0) || (D_ctx_80177CD0[1] != 0) || (D_ctx_80177CD0[2] != 0) ||
(D_ctx_80177CD0[3] != 0)) {
D_360_800C9B4C = D_360_8015F928 + 120;
D_360_8015F908 = 1000;
if ((gStarWolfTeamAlive[0] != 0) || (gStarWolfTeamAlive[1] != 0) || (gStarWolfTeamAlive[2] != 0) ||
(gStarWolfTeamAlive[3] != 0)) {
D_360_800C9B4C = gAllRangeEventTimer + 120;
gStarWolfMsgTimer = 1000;
}
}
break;
@ -311,7 +312,7 @@ void Bolse_8018C158(Actor* actor) {
D_bg_800C9C34 = 0;
for (i = 0; i < 4; i++) {
if (D_ctx_80177CD0[i] != 0) {
if (gStarWolfTeamAlive[i] != 0) {
actorPtr = &gActors[i + 4];
break;
}
@ -331,14 +332,14 @@ void Bolse_8018C158(Actor* actor) {
Math_SmoothStepToF(&player->camAt.z, actorPtr->obj.pos.z, 1.0f, 20000.0f, 0.0f);
Math_SmoothStepToF(&player->unk_034, 0.0f, 0.1f, 0.2f, 0);
if ((gControllerPress->button & START_BUTTON) || ((D_360_800C9B4C + 300) == D_360_8015F928)) {
if ((gControllerPress->button & START_BUTTON) || ((D_360_800C9B4C + 300) == gAllRangeEventTimer)) {
actor->state = 2;
player->state_1C8 = PLAYERSTATE_1C8_3;
func_play_800B7184(player, 1);
player->unk_014 = 0.0f;
D_hud_80161708 = 0;
}
D_ctx_801779BC = 0;
gPauseEnabled = 0;
break;
case 10:
@ -368,19 +369,19 @@ void Bolse_8018C158(Actor* actor) {
if (actor->timer_0BC == 130) {
Radio_PlayMessage(gMsg_ID_11060, RCID_FALCO);
D_360_8015F924 = 1;
gAllRangeCheckpoint = 1;
gSavedHitCount = gHitCount;
for (i = 1; i < 4; i++) {
for (i = TEAM_ID_FALCO; i <= TEAM_ID_PEPPY; i++) {
gSavedTeamShields[i] = gTeamShields[i];
}
}
if (!(actor->timer_0BC & 7)) {
if ((actor->timer_0BC % 8) == 0) {
Bolse_8018BEF8(actor, 15);
}
if (!actor->timer_0BC) {
D_360_8015F928 = 3000;
gAllRangeEventTimer = 3000;
actor->state = 2;
player->state_1C8 = PLAYERSTATE_1C8_3;
func_play_800B7184(player, 1);
@ -402,29 +403,29 @@ void Bolse_8018C158(Actor* actor) {
break;
}
if (D_360_8015F908 != 0) {
D_360_8015F908--;
switch (D_360_8015F908) {
if (gStarWolfMsgTimer != 0) {
gStarWolfMsgTimer--;
switch (gStarWolfMsgTimer) {
case 860:
if (D_ctx_80177CD0[0] != 0) {
if (gStarWolfTeamAlive[0] != 0) {
Radio_PlayMessage(gMsg_ID_11100, RCID_WOLF);
}
break;
case 760:
if (D_ctx_80177CD0[1] != 0) {
if (gStarWolfTeamAlive[1] != 0) {
Radio_PlayMessage(gMsg_ID_11110, RCID_LEON);
}
break;
case 660:
if (D_ctx_80177CD0[2] != 0) {
if (gStarWolfTeamAlive[2] != 0) {
Radio_PlayMessage(gMsg_ID_11120, RCID_PIGMA);
}
break;
case 550:
if (D_ctx_80177CD0[3] != 0) {
if (gStarWolfTeamAlive[3] != 0) {
Radio_PlayMessage(gMsg_ID_11130, RCID_ANDREW);
}
break;
@ -443,7 +444,7 @@ void Bolse_8018C158(Actor* actor) {
s32 Bolse_8018CC60(Actor* actor) {
Vec3f sp1C;
if (D_360_8015F924 == 0) {
if (gAllRangeCheckpoint == 0) {
actor->obj.pos.x = sp1C.x = actor->fwork[10];
actor->obj.pos.y = sp1C.y = actor->fwork[11];
actor->obj.pos.z = sp1C.z = actor->fwork[12];
@ -529,7 +530,7 @@ s32 Bolse_8018CE5C(Actor* actor) {
return 0;
}
if (!((actor->index + gGameFrameCount) & 3)) {
if (((actor->index + gGameFrameCount) & 3) == 0) {
x = actor->fwork[0] - actor->obj.pos.x + RAND_FLOAT_CENTERED(100.0f);
y = actor->fwork[1] - (actor->obj.pos.y + 180.0f) + RAND_FLOAT_CENTERED(100.0f);
z = actor->fwork[2] - actor->obj.pos.z;
@ -593,7 +594,7 @@ void Bolse_8018D124(Actor* actor) {
src.y = 0.0f;
src.x = 0.0f;
src.z = D_ctx_80177828;
src.z = gEnemyShotSpeed;
Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest);
func_effect_8007F04C(OBJ_EFFECT_353, actor->obj.pos.x + dest.x, actor->obj.pos.y + 180.0f + dest.y,
@ -623,7 +624,7 @@ bool Bolse_8018D278(Actor* actor) {
actor->itemDrop = DROP_SILVER_RING;
func_enmy_80066254(actor);
Actor_Despawn(actor);
Object_Kill(&actor->obj, actor->sfxSource);
actor->info.bonus = 0;
@ -732,7 +733,7 @@ bool Bolse_8018D584(Actor* actor) {
}
void Bolse_8018D7F0(Actor* actor) {
if (D_360_8015F924 != 0) {
if (gAllRangeCheckpoint != 0) {
actor->state = 1;
}
@ -753,11 +754,11 @@ bool Bolse_8018D874(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th
Actor* actor = (Actor*) this;
RCP_SetupDL(&gMasterDisp, 0x1D);
if (((limbIndex == 1) || (limbIndex == 2)) && (actor->timer_0C6 & 1)) {
if (((limbIndex == 1) || (limbIndex == 2)) && ((actor->timer_0C6 % 2) != 0)) {
RCP_SetupDL(&gMasterDisp, 0x29);
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 64, 64, 255);
}
if (((limbIndex == 1) || (limbIndex == 2)) && ((actor->health >= 100) || (D_360_8015F924 != 0))) {
if (((limbIndex == 1) || (limbIndex == 2)) && ((actor->health >= 100) || (gAllRangeCheckpoint != 0))) {
*dList = NULL;
}
@ -990,7 +991,7 @@ void Bolse_8018E870(Boss* boss) {
gSPDisplayList(gMasterDisp++, D_BO_6002020);
}
if (gGameFrameCount & 1) {
if ((gGameFrameCount % 2) != 0) {
alpha = 128;
} else {
alpha = 30;
@ -1157,13 +1158,13 @@ void Bolse_8018EF6C(Player* player) {
player->unk_0D0 = 30.0f;
if (gTeamShields[1] > 0) {
if (gTeamShields[TEAM_ID_FALCO] > 0) {
Bolse_8018EAEC(&gActors[0], 0);
}
if (gTeamShields[2] > 0) {
if (gTeamShields[TEAM_ID_SLIPPY] > 0) {
Bolse_8018EAEC(&gActors[1], 1);
}
if (gTeamShields[3] > 0) {
if (gTeamShields[TEAM_ID_PEPPY] > 0) {
Bolse_8018EAEC(&gActors[2], 2);
}
@ -1186,11 +1187,11 @@ void Bolse_8018EF6C(Player* player) {
player->unk_204 = 1;
D_ctx_80177A48[0] = 1.0f;
D_ctx_80178340 = D_ctx_80178358 = 255;
gFillScreenAlpha = gFillScreenAlphaTarget = 255;
break;
case 1:
D_ctx_80178358 = 0;
gFillScreenAlphaTarget = 0;
gCsCamAtX = 0.0f;
gCsCamAtY = player->pos.y;
gCsCamAtZ = player->pos.z;
@ -1198,7 +1199,7 @@ void Bolse_8018EF6C(Player* player) {
sp60 = SIN_DEG(D_ctx_80177A48[2]) * 10.0f;
player->unk_0EC = SIN_DEG(D_ctx_80177A48[2]) * -60.0f;
if (!(gCsFrameCount & 7) && (Rand_ZeroOne() < 0.5f)) {
if (((gCsFrameCount % 8) == 0) && (Rand_ZeroOne() < 0.5f)) {
Bolse_8018ED44();
}
@ -1306,7 +1307,7 @@ void Bolse_8018EF6C(Player* player) {
actor->timer_0BC = 80;
}
AUDIO_PLAY_BGM(gBgmSeqId);
D_ctx_80177838 = 80;
gLevelStatusScreenTimer = 80;
}
break;
}
@ -1425,13 +1426,13 @@ void Bolse_8018F94C(Player* player) {
player->unk_114 = 0.0f;
player->unk_0D0 = 40.0f;
if (gTeamShields[1] > 0) {
if (gTeamShields[TEAM_ID_FALCO] > 0) {
Bolse_8018F83C(&gActors[0], 0);
}
if (gTeamShields[2] > 0) {
if (gTeamShields[TEAM_ID_SLIPPY] > 0) {
Bolse_8018F83C(&gActors[1], 1);
}
if (gTeamShields[3] > 0) {
if (gTeamShields[TEAM_ID_PEPPY] > 0) {
Bolse_8018F83C(&gActors[2], 2);
}
@ -1444,7 +1445,7 @@ void Bolse_8018F94C(Player* player) {
gCsCamAtX = gPlayer[0].pos.x;
gCsCamAtY = gPlayer[0].pos.y;
gCsCamAtZ = gPlayer[0].pos.z;
D_ctx_80178340 = D_ctx_80178358 = 255;
gFillScreenAlpha = gFillScreenAlphaTarget = 255;
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50);
gCsFrameCount = 0;
@ -1457,7 +1458,7 @@ void Bolse_8018F94C(Player* player) {
break;
case 5:
D_ctx_80178340 = D_ctx_80178358 = 0;
gFillScreenAlpha = gFillScreenAlphaTarget = 0;
player->unk_1D0 = 10;
case 10:
@ -1468,12 +1469,12 @@ void Bolse_8018F94C(Player* player) {
actor50->obj.pos.y -= 5;
if (gCsFrameCount < 92) {
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2U) == 0)) {
func_effect_8007C484(actor50->obj.pos.x + RAND_FLOAT_CENTERED(1000.0f), actor50->obj.pos.y + 100.0f,
actor50->obj.pos.z + RAND_FLOAT_CENTERED(1000.0f), 0.0f, 0.0f, 0.0f,
RAND_FLOAT(0.4f) + 0.4f, 0.0f);
}
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2U) == 0)) {
//! FAKE:
do {
} while (0);
@ -1531,7 +1532,7 @@ void Bolse_8018F94C(Player* player) {
case 235:
player->unk_204 = 1;
D_ctx_80177840 = 100;
gLevelClearScreenTimer = 100;
break;
case 240:
@ -1621,9 +1622,9 @@ void Bolse_8018F94C(Player* player) {
}
if (player->timer_1F8 == 0) {
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0;
D_ctx_80178358 = 255;
if (D_ctx_80178340 == 255) {
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0;
gFillScreenAlphaTarget = 255;
if (gFillScreenAlpha == 255) {
D_ctx_80161A94[0] = gGoldRingCount[0];
gNextGameState = GSTATE_PLAY;
gNextLevel = LEVEL_VENOM_1;
@ -1631,15 +1632,15 @@ void Bolse_8018F94C(Player* player) {
Audio_KillSfxBySource(player->sfxSource);
D_play_800D3180[LEVEL_BOLSE] = Play_CheckMedalStatus(150) + 1;
for (i = 1; i < 6; i++) {
D_ctx_80177C38[i] = gTeamShields[i];
D_ctx_801778F0[i] = gSavedTeamShields[i];
for (i = TEAM_ID_FALCO; i < TEAM_ID_MAX; i++) {
gPrevPlanetTeamShields[i] = gTeamShields[i];
gPrevPlanetSavedTeamShields[i] = gSavedTeamShields[i];
gSavedTeamShields[i] = gTeamShields[i];
}
for (i = 1; i < 4; i++) {
if (D_ctx_80177C38[i] == 0) {
D_ctx_80177C38[i] = 255;
for (i = TEAM_ID_FALCO; i <= TEAM_ID_PEPPY; i++) {
if (gPrevPlanetTeamShields[i] == 0) {
gPrevPlanetTeamShields[i] = 255;
}
}
func_hud_80088564();
@ -1664,12 +1665,12 @@ void Bolse_8018F94C(Player* player) {
if (actor50->unk_046 != 0) {
Math_SmoothStepToF(&actor50->fwork[20], 3.0f, 0.03f, 0.01f, 0);
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2U) == 0)) {
func_effect_8007C484(
RAND_FLOAT_CENTERED(5000.0f) + actor50->obj.pos.x, RAND_FLOAT_CENTERED(5000.0f) + actor50->obj.pos.y,
RAND_FLOAT_CENTERED(5000.0f) + actor50->obj.pos.z, 0.0f, 0.0f, 0.0f, RAND_FLOAT(0.8f) + 0.8f, 0);
}
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2U) == 0)) {
func_effect_8007BFFC(
RAND_FLOAT_CENTERED(5000.0f) + actor50->obj.pos.x, RAND_FLOAT_CENTERED(5000.0f) + actor50->obj.pos.y,
RAND_FLOAT_CENTERED(5000.0f) + actor50->obj.pos.z, 0.0f, 0.0f, 0.0f, RAND_FLOAT(10.0f) + 20.0f, 5);
@ -1854,7 +1855,7 @@ void Bolse_801912FC(Boss* boss) {
Vec3f src;
Vec3f dest;
if (gGameFrameCount & 24) {
if (gGameFrameCount & 0x18) {
Math_SmoothStepToF(&D_i4_8019EEC0, 0.0f, 1.0f, 30.0f, 0);
} else {
Math_SmoothStepToF(&D_i4_8019EEC0, 255.0f, 1.0f, 30.0f, 0);
@ -1862,7 +1863,7 @@ void Bolse_801912FC(Boss* boss) {
switch (boss->state) {
case 0:
if (D_360_8015F924 == 2) {
if (gAllRangeCheckpoint == 2) {
boss->state = 1;
}
boss->dmgType = DMG_NONE;
@ -1937,7 +1938,7 @@ void Bolse_801912FC(Boss* boss) {
for (i = 0; i < 8; i++) {
if (boss->swork[i + 24] != 0) {
boss->swork[i + 24]--;
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
func_effect_8007797C(boss->vwork[i].x, boss->vwork[i].y, boss->vwork[i].z, boss->vwork[i].x * 0.2f,
0.0f, boss->vwork[i].z * 0.2f, 5.0f);
}
@ -1945,7 +1946,7 @@ void Bolse_801912FC(Boss* boss) {
if (boss->swork[i] <= 0) {
boss->info.hitbox[i * 6 + 4] = -200.0f;
if (!((gGameFrameCount + i) & 7)) {
if (((gGameFrameCount + i) % 8) == 0) {
Bolse_80190EE4(boss->vwork[i].x, boss->vwork[i].y, boss->vwork[i].z, RAND_FLOAT_CENTERED(30.0f),
boss->obj.rot.y + D_i4_8019F09C[i] + RAND_FLOAT_CENTERED(30.0f));
boss->swork[i + 12] = 1003;
@ -1993,7 +1994,7 @@ bool Bolse_801918E4(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th
case 14:
case 15:
case 16:
if (boss->swork[3 + limbIndex] & 1) {
if ((boss->swork[3 + limbIndex] % 2) != 0) {
RCP_SetupDL(&gMasterDisp, 0x29);
if (boss->swork[3 + limbIndex] > 1000) {
gDPSetPrimColor(gMasterDisp++, 0, 0, 64, 64, 255, 255);
@ -2068,7 +2069,7 @@ void Bolse_80191BAC(Boss* boss) {
}
if (D_ctx_8017812C == 0) {
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
D_ctx_8017836C = 0.0f;
} else {
D_ctx_8017836C = 0.5f;
@ -2088,7 +2089,7 @@ void Bolse_80191DB0(Boss* boss) {
Matrix_Scale(gGfxMatrix, boss->unk_3F8, boss->unk_3F8, boss->unk_3F8, 1);
alpha = boss->fwork[0];
if (alpha != 0) {
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
alpha *= 1.7f;
}
RCP_SetupDL(&gMasterDisp, 0x29);
@ -2105,40 +2106,40 @@ void Bolse_80191ED8(void) {
Boss* boss;
Object_58* obj58;
D_ctx_80178310 = SEGMENTED_TO_VIRTUAL(D_enmy_800CFDA0[gCurrentLevel]);
gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]);
for (obj58 = gObjects58, i = 0; i < 1000; i++) {
if (D_ctx_80178310[i].id < 0) {
if (gLevelObjects[i].id < 0) {
break;
}
if (D_ctx_80178310[i].id < 161) {
if (gLevelObjects[i].id < 161) {
Object_58_Initialize(obj58);
obj58->obj.status = OBJ_ACTIVE;
obj58->obj.id = D_ctx_80178310[i].id;
obj58->sfxSource[0] = obj58->obj.pos.x = D_ctx_80178310[i].xPos;
obj58->sfxSource[1] = obj58->obj.pos.y = D_ctx_80178310[i].yPos;
obj58->sfxSource[2] = obj58->obj.pos.z = -D_ctx_80178310[i].zPos1;
obj58->unk_54 = obj58->obj.rot.y = D_ctx_80178310[i].rot.y;
obj58->obj.id = gLevelObjects[i].id;
obj58->sfxSource[0] = obj58->obj.pos.x = gLevelObjects[i].xPos;
obj58->sfxSource[1] = obj58->obj.pos.y = gLevelObjects[i].yPos;
obj58->sfxSource[2] = obj58->obj.pos.z = -gLevelObjects[i].zPos1;
obj58->unk_54 = obj58->obj.rot.y = gLevelObjects[i].rot.y;
Object_SetInfo(&obj58->info, obj58->obj.id);
obj58++;
}
}
for (actor = &gActors[30], i = 0; i < 1000; i++) {
if (D_ctx_80178310[i].id < 0) {
if (gLevelObjects[i].id < 0) {
break;
}
if ((D_ctx_80178310[i].id >= OBJ_ACTOR_176) && (D_ctx_80178310[i].id <= OBJ_ACTOR_SUPPLIES)) {
if ((gLevelObjects[i].id >= OBJ_ACTOR_176) && (gLevelObjects[i].id <= OBJ_ACTOR_SUPPLIES)) {
Actor_Initialize(actor);
actor->obj.status = OBJ_INIT;
actor->obj.id = D_ctx_80178310[i].id;
if ((actor->obj.id == OBJ_ACTOR_271) && (D_360_8015F924 == 0)) {
actor->obj.id = gLevelObjects[i].id;
if ((actor->obj.id == OBJ_ACTOR_271) && (gAllRangeCheckpoint == 0)) {
AUDIO_PLAY_SFX(0x11000028U, actor->sfxSource, 0U);
}
actor->fwork[10] = actor->obj.pos.x = D_ctx_80178310[i].xPos;
actor->fwork[11] = actor->obj.pos.y = D_ctx_80178310[i].yPos;
actor->fwork[12] = actor->obj.pos.z = -D_ctx_80178310[i].zPos1;
actor->fwork[13] = actor->obj.rot.y = D_ctx_80178310[i].rot.y;
actor->fwork[10] = actor->obj.pos.x = gLevelObjects[i].xPos;
actor->fwork[11] = actor->obj.pos.y = gLevelObjects[i].yPos;
actor->fwork[12] = actor->obj.pos.z = -gLevelObjects[i].zPos1;
actor->fwork[13] = actor->obj.rot.y = gLevelObjects[i].rot.y;
Object_SetInfo(&actor->info, actor->obj.id);
actor++;
}
@ -2184,7 +2185,7 @@ void Bolse_80192264(void) {
if (gBosses[1].obj.status == OBJ_ACTIVE) {
RCP_SetupDL(&gMasterDisp, 0x22);
if (gGameFrameCount & 1) {
if ((gGameFrameCount % 2) != 0) {
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 128, 160, 255);
} else {
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 192, 224, 255);

View File

@ -20,7 +20,7 @@ void Fortuna_801875F0(Actor* actor) {
}
if ((counter < 10) && (actor->timer_0C0 == 0)) {
if (D_360_8015F928 < (D_360_800C9B4C - 500)) {
if (gAllRangeEventTimer < (D_360_800C9B4C - 500)) {
actor->timer_0C0 = 40;
actor->unk_04E++;
@ -107,70 +107,70 @@ void Fortuna_80187960(Actor* actor) {
s32 pad[2];
if ((player->state_1C8 == PLAYERSTATE_1C8_4) || (player->state_1C8 == PLAYERSTATE_1C8_6)) {
D_360_8015F928 = 20000;
gAllRangeEventTimer = 20000;
return;
}
if (D_360_8015F928 == 50) {
if (gAllRangeEventTimer == 50) {
Radio_PlayMessage(gMsg_ID_9000, RCID_FOX);
}
if ((D_360_8015F928 + 400) == (0, D_360_800C9B4C)) {
if ((gAllRangeEventTimer + 400) == (0, D_360_800C9B4C)) {
Radio_PlayMessage(gMsg_ID_9010, RCID_SLIPPY);
}
if ((D_360_8015F928 + 240) == (0, D_360_800C9B4C)) {
if ((gAllRangeEventTimer + 240) == (0, D_360_800C9B4C)) {
Radio_PlayMessage(gMsg_ID_9375, RCID_ROB64);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1);
}
if ((D_360_8015F928 + 100) == (0, D_360_800C9B4C)) {
if ((gAllRangeEventTimer + 100) == (0, D_360_800C9B4C)) {
Radio_PlayMessage(gMsg_ID_9380, RCID_FOX);
}
if (D_360_8015F928 == 7160) {
if (gAllRangeEventTimer == 7160) {
Radio_PlayMessage(gMsg_ID_9385, RCID_FOX);
}
if (D_360_8015F928 == 7000) {
if (gAllRangeEventTimer == 7000) {
AUDIO_PLAY_SFX(0x11030016U, gBosses[0].sfxSource, 4U);
func_360_8002EE34();
Radio_PlayMessage(gMsg_ID_9390, RCID_ROB64);
D_360_8015F944 = 1.0f;
D_360_8015F93C = 1;
D_360_8015F930[0] = 1;
D_360_8015F930[1] = PLAYERSTATE_1C8_4;
D_360_8015F930[2] = 99;
gAllRangeCountdownScale = 1.0f;
gShowAllRangeCountdown = 1;
gAllRangeCountdown[0] = 1;
gAllRangeCountdown[1] = 4;
gAllRangeCountdown[2] = 99;
}
if (D_360_8015F928 == 8036) {
if (gAllRangeEventTimer == 8036) {
Radio_PlayMessage(gMsg_ID_9395, RCID_ROB64);
}
if (D_360_8015F928 == 8540) {
if (gAllRangeEventTimer == 8540) {
Radio_PlayMessage(gMsg_ID_9400, RCID_ROB64);
Audio_PlaySequence(SEQ_PLAYER_BGM, SEQ_ID_FORTUNA | SEQ_FLAG, 0, 0);
gActors[1].aiIndex = gActors[2].aiIndex = gActors[3].aiIndex = gActors[4].aiIndex = gActors[5].aiIndex =
gActors[6].aiIndex = gActors[7].aiIndex = -1;
}
if ((D_360_800C9B4C < D_360_8015F928) && (D_360_8015F928 < 9970) && (D_ctx_80177CD0[0] == 0) &&
(D_ctx_80177CD0[1] == 0) && (D_ctx_80177CD0[2] == 0) && (D_ctx_80177CD0[3] == 0)) {
D_360_8015F928 = 9970;
if ((D_360_800C9B4C < gAllRangeEventTimer) && (gAllRangeEventTimer < 9970) && (gStarWolfTeamAlive[0] == 0) &&
(gStarWolfTeamAlive[1] == 0) && (gStarWolfTeamAlive[2] == 0) && (gStarWolfTeamAlive[3] == 0)) {
gAllRangeEventTimer = 9970;
}
if (D_360_8015F928 == 9056) {
if ((D_ctx_80177CD0[0] != 0) || (D_ctx_80177CD0[1] != 0) || (D_ctx_80177CD0[2] != 0) ||
((D_ctx_80177CD0[3] != 0))) {
if (gAllRangeEventTimer == 9056) {
if ((gStarWolfTeamAlive[0] != 0) || (gStarWolfTeamAlive[1] != 0) || (gStarWolfTeamAlive[2] != 0) ||
((gStarWolfTeamAlive[3] != 0))) {
Radio_PlayMessage(gMsg_ID_9405, RCID_ROB64);
} else {
D_360_8015F928 = 9995;
gAllRangeEventTimer = 9995;
}
}
if (D_360_8015F928 == 9206) {
D_360_8015F93C = 0;
if (gAllRangeEventTimer == 9206) {
gShowAllRangeCountdown = 0;
actor->state = 5;
gPlayer[0].state_1C8 = PLAYERSTATE_1C8_0;
actor->iwork[0] = 0;
@ -181,13 +181,13 @@ void Fortuna_80187960(Actor* actor) {
}
}
if ((D_360_8015F928 == 10000) && ((D_ctx_80177CD0[0] != 0) || (D_ctx_80177CD0[1] != 0) ||
(D_ctx_80177CD0[2] != 0) || (D_ctx_80177CD0[3] != 0))) {
if ((gAllRangeEventTimer == 10000) && ((gStarWolfTeamAlive[0] != 0) || (gStarWolfTeamAlive[1] != 0) ||
(gStarWolfTeamAlive[2] != 0) || (gStarWolfTeamAlive[3] != 0))) {
Radio_PlayMessage(gMsg_ID_9420, RCID_FOX);
}
if (D_360_8015F928 == 10100) {
D_360_8015F93C = 0;
if (gAllRangeEventTimer == 10100) {
gShowAllRangeCountdown = 0;
actor->iwork[0] = 0;
actor->state = 6;
gPlayer[0].state_1C8 = PLAYERSTATE_1C8_7;
@ -200,10 +200,10 @@ void Fortuna_80187960(Actor* actor) {
Object_Kill(&gActors[i].obj, gActors[i].sfxSource);
}
if ((D_ctx_80177CD0[0] == 0) && (D_ctx_80177CD0[1] == 0) && (D_ctx_80177CD0[2] == 0) &&
(D_ctx_80177CD0[3] == 0)) {
if ((gStarWolfTeamAlive[0] == 0) && (gStarWolfTeamAlive[1] == 0) && (gStarWolfTeamAlive[2] == 0) &&
(gStarWolfTeamAlive[3] == 0)) {
Radio_PlayMessage(gMsg_ID_9411, RCID_FOX);
D_ctx_80177930 = 1;
gNextPlanetPath = 1;
gPlayer[0].timer_1F8 = 50;
player->unk_190 = 5.0f;
player->unk_194 = 5.0f;
@ -211,7 +211,7 @@ void Fortuna_80187960(Actor* actor) {
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 30);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 30);
} else {
D_ctx_80177930 = 0;
gNextPlanetPath = 0;
gPlayer[0].timer_1F8 = 30;
}
}
@ -220,19 +220,19 @@ void Fortuna_80187960(Actor* actor) {
case 0:
D_360_800C9B4C = 2880;
for (i = 0; i < 6; i++) {
D_ctx_80177CF0[i] = 1;
D_ctx_80177CD0[i] = 1;
gSavedStarWolfTeamAlive[i] = 1;
gStarWolfTeamAlive[i] = 1;
}
D_360_8015F928 = 0;
D_360_8015F908 = 0;
gAllRangeEventTimer = 0;
gStarWolfMsgTimer = 0;
if (player->state_1C8 == PLAYERSTATE_1C8_3) {
actor->state = 2;
player->pos.x = 0.0f;
player->pos.z = 8000.0f;
player->pos.y = 670.0f;
D_360_8015F928 = 200;
if (D_360_8015F924 != 0) {
D_360_8015F928 = D_360_800C9B4C - 1;
gAllRangeEventTimer = 200;
if (gAllRangeCheckpoint != 0) {
gAllRangeEventTimer = D_360_800C9B4C - 1;
gHitCount = gSavedHitCount;
}
} else {
@ -264,7 +264,7 @@ void Fortuna_80187960(Actor* actor) {
player->state_1C8 = PLAYERSTATE_1C8_3;
player->unk_014 = 0.0001f;
AUDIO_PLAY_BGM(gBgmSeqId);
D_ctx_80177838 = 80;
gLevelStatusScreenTimer = 80;
}
};
break;
@ -281,29 +281,29 @@ void Fortuna_80187960(Actor* actor) {
Math_SmoothStepToF(&player->camAt.y, actor4->obj.pos.y, 1.0f, 20000.0f, 0.0f);
Math_SmoothStepToF(&player->camAt.z, actor4->obj.pos.z, 1.0f, 20000.0f, 0.0f);
Math_SmoothStepToF(&player->unk_034, 0.0f, 1.0f, 1000.0f, 0.0f);
if (D_360_8015F928 == (D_360_800C9B4C + 2)) {
D_360_8015F908 = 883;
D_360_8015F924 = 1;
if (gAllRangeEventTimer == (D_360_800C9B4C + 2)) {
gStarWolfMsgTimer = 883;
gAllRangeCheckpoint = 1;
gSavedHitCount = gHitCount;
for (i = 1; i < 4; i++) {
for (i = TEAM_ID_FALCO; i <= TEAM_ID_PEPPY; i++) {
gSavedTeamShields[i] = gTeamShields[i];
};
}
if ((gControllerPress->button & START_BUTTON) || (D_360_8015F928 == (D_360_800C9B4C + 440))) {
if ((gControllerPress->button & START_BUTTON) || (gAllRangeEventTimer == (D_360_800C9B4C + 440))) {
actor->state = 2;
player->state_1C8 = PLAYERSTATE_1C8_3;
func_play_800B7184(player, 1);
player->unk_014 = 0.0f;
D_hud_80161708 = 0;
}
D_ctx_801779BC = 0;
gPauseEnabled = 0;
break;
case 5:
D_360_8015F928 = 9207;
gAllRangeEventTimer = 9207;
actor->iwork[0] += 1;
actor->fwork[0] += 10.0f;
player->camEye.x = 300.0f;
@ -314,21 +314,21 @@ void Fortuna_80187960(Actor* actor) {
player->camAt.z = -15000.0f;
player->unk_034 = 0.0f;
if ((actor->iwork[0] == 50) && (D_ctx_80177CD0[0] != 0)) {
if ((actor->iwork[0] == 50) && (gStarWolfTeamAlive[0] != 0)) {
if (gRadioState == 0) {
Radio_PlayMessage(gMsg_ID_9431, RCID_WOLF);
}
Fortuna_80187884(&gActors[4], player->camEye.x - 200.0f, player->camEye.y, player->camEye.z, 160.0f);
}
if ((actor->iwork[0] == 70) && (D_ctx_80177CD0[1] != 0)) {
if ((actor->iwork[0] == 70) && (gStarWolfTeamAlive[1] != 0)) {
if (gRadioState == 0) {
Radio_PlayMessage(gMsg_ID_9432, RCID_LEON);
}
Fortuna_80187884(&gActors[5], player->camEye.x, player->camEye.y + 50.0f, player->camEye.z, 160.0f);
}
if ((actor->iwork[0] == 90) && (D_ctx_80177CD0[2] != 0)) {
if ((actor->iwork[0] == 90) && (gStarWolfTeamAlive[2] != 0)) {
if (gRadioState == 0) {
Radio_PlayMessage(gMsg_ID_9433, RCID_PIGMA);
}
@ -336,7 +336,7 @@ void Fortuna_80187960(Actor* actor) {
160.0f);
}
if ((actor->iwork[0] == 110) && (D_ctx_80177CD0[3] != 0)) {
if ((actor->iwork[0] == 110) && (gStarWolfTeamAlive[3] != 0)) {
if (gRadioState == 0) {
Radio_PlayMessage(gMsg_ID_9434, RCID_ANDREW);
}
@ -356,14 +356,14 @@ void Fortuna_80187960(Actor* actor) {
Object_Kill(&gActors[i].obj, gActors[i].sfxSource);
}
D_360_8015F93C = 1;
D_360_8015F928 = 9970;
gShowAllRangeCountdown = 1;
gAllRangeEventTimer = 9970;
}
break;
case 6:
actor->iwork[0] += 1;
if (D_ctx_80177930 == 0) {
if (gNextPlanetPath == 0) {
actor1->aiIndex = AI360_FOX;
actor1->state = 2;
actor2->aiIndex = AI360_FOX;
@ -398,24 +398,24 @@ void Fortuna_80187960(Actor* actor) {
break;
}
if (D_360_8015F908 != 0) {
D_360_8015F908--;
switch (D_360_8015F908) {
if (gStarWolfMsgTimer != 0) {
gStarWolfMsgTimer--;
switch (gStarWolfMsgTimer) {
case 860:
if (D_ctx_80177CD0[0] != 0) {
if (gStarWolfTeamAlive[0] != 0) {
Radio_PlayMessage(gMsg_ID_9250, RCID_WOLF);
}
break;
case 760:
if (D_ctx_80177CD0[1] != 0) {
if (gStarWolfTeamAlive[1] != 0) {
Radio_PlayMessage(gMsg_ID_9260, RCID_LEON);
}
break;
case 660:
if (D_ctx_80177CD0[2] != 0) {
if (gTeamShields[3] > 0) {
if (gStarWolfTeamAlive[2] != 0) {
if (gTeamShields[TEAM_ID_PEPPY] > 0) {
Radio_PlayMessage(gMsg_ID_9275, RCID_PIGMA);
} else {
Radio_PlayMessage(gMsg_ID_9270, RCID_PIGMA);
@ -424,7 +424,7 @@ void Fortuna_80187960(Actor* actor) {
break;
case 540:
if (D_ctx_80177CD0[3] != 0) {
if (gStarWolfTeamAlive[3] != 0) {
Radio_PlayMessage(gMsg_ID_9280, RCID_ANDREW);
}
break;
@ -485,7 +485,7 @@ void Fortuna_80188AD0(Actor* actor) {
func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y + 180.0f, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, 5.0f, 10);
actor->itemDrop = DROP_SILVER_RING;
actor->obj.pos.y += 230.0f;
func_enmy_80066254(actor);
Actor_Despawn(actor);
actor->obj.pos.y -= 230.0f;
}
@ -645,7 +645,7 @@ void Fortuna_8018927C(Player* player) {
Math_SmoothStepToF(&player->unk_12C, 0.0f, 0.1f, 15.0f, 0.0f);
Math_SmoothStepToF(&player->unk_034, 0.0f, 0.1f, 3.0f, 0.0f);
Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 20.0f, 0.0f);
if (D_ctx_80177930 == 0) {
if (gNextPlanetPath == 0) {
if (player->pos.y < 700.0f) {
Math_SmoothStepToF(&player->pos.y, 700.0f, 0.1f, 10.0f, 0.0f);
}
@ -684,9 +684,9 @@ void Fortuna_8018927C(Player* player) {
player->camAt.z = player->unk_138;
if (player->timer_1F8 < 80) {
D_ctx_80178358 = 255;
D_ctx_8017835C = 10;
D_ctx_80178350 = D_ctx_80178348 = D_ctx_80178354 = 0;
gFillScreenAlphaTarget = 255;
gFillScreenAlphaStep = 10;
gFillScreenGreen = gFillScreenRed = gFillScreenBlue = 0;
if (player->timer_1F8 == 0) {
player->timer_1F8 = 0;
player->unk_1D0 = 1;
@ -695,7 +695,7 @@ void Fortuna_8018927C(Player* player) {
break;
case 0:
if (D_ctx_80177930 == 0) {
if (gNextPlanetPath == 0) {
Math_SmoothStepToF(&player->unk_0E8, 40.0f, 0.1f, 2.5f, 0.0f);
Math_SmoothStepToF(&player->unk_0EC, 60.0f, 0.2f, 5.0f, 0.0f);
Math_SmoothStepToF(&player->unk_0E4, 0.0f, 0.1f, 2.5f, 0.0f);
@ -712,7 +712,7 @@ void Fortuna_8018927C(Player* player) {
}
if (player->timer_1F8 == 0) {
if (D_ctx_80177930 != 0) {
if (gNextPlanetPath != 0) {
player->timer_1F8 = 150;
player->unk_1D0 = -1;
player->pos.x = 0.0f;
@ -755,32 +755,32 @@ void Fortuna_8018927C(Player* player) {
func_8001CA24(0);
Audio_KillSfxBySource(player->sfxSource);
player->unk_234 = 0;
D_ctx_80178340 = 255;
D_ctx_80178358 = 255;
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0;
D_ctx_8017835C = 0;
gFillScreenAlpha = 255;
gFillScreenAlphaTarget = 255;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0;
gFillScreenAlphaStep = 0;
}
break;
case 2:
if (!(D_ctx_80177930) && (player->timer_1F8) > 830) {
D_ctx_80178358 = 0;
D_ctx_8017835C = 8;
if (!(gNextPlanetPath) && (player->timer_1F8) > 830) {
gFillScreenAlphaTarget = 0;
gFillScreenAlphaStep = 8;
}
if (player->timer_1F8 == 810) {
Audio_KillSfxBySource(gBosses[0].sfxSource);
}
if (player->timer_1F8 == 830) {
D_ctx_80178358 = 255;
D_ctx_8017835C = 2;
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255;
gFillScreenAlphaTarget = 255;
gFillScreenAlphaStep = 2;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255;
}
gBosses[0].swork[0] = 1;
if ((func_hud_80090200(&gBosses[0]) == 2) || (D_ctx_80177930 != 0)) {
if ((func_hud_80090200(&gBosses[0]) == 2) || (gNextPlanetPath != 0)) {
func_play_800A6148();
if (D_ctx_80177930 == 0) {
if (gNextPlanetPath == 0) {
player->unk_1D0 = 10;
} else {
player->unk_1D0 = 20;
@ -803,7 +803,7 @@ void Fortuna_8018927C(Player* player) {
D_ctx_801784D4 = D_ctx_801784C8 = D_ctx_801784C8 = D_ctx_801784FC = D_ctx_801784C8 = 58.0f;
D_ctx_801784D8 = D_ctx_801784CC = D_ctx_801784CC = D_ctx_80178500 = D_ctx_801784CC = 13.0f;
if (D_ctx_80177930 == 0) {
if (gNextPlanetPath == 0) {
player->pos.x = 0.0f;
player->pos.y = 0.0f;
player->unk_0E4 = 0.0f;
@ -829,7 +829,7 @@ void Fortuna_8018927C(Player* player) {
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 100);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 100);
func_8001C8B8(0);
if (D_ctx_80177930 == 0) {
if (gNextPlanetPath == 0) {
Fortuna_801890EC(actor0, 3);
}
}
@ -837,8 +837,8 @@ void Fortuna_8018927C(Player* player) {
case 10:
player->unk_234 = 1;
D_ctx_80178358 = 0;
D_ctx_8017835C = 4;
gFillScreenAlphaTarget = 0;
gFillScreenAlphaStep = 4;
player->camEye.x = 400.0f;
player->camEye.y = 0;
player->camEye.z = 0.0f;
@ -848,13 +848,13 @@ void Fortuna_8018927C(Player* player) {
if (gCsFrameCount == 100) {
player->unk_0D0 = 30.0f;
if (gTeamShields[1] > 0) {
if (gTeamShields[TEAM_ID_FALCO] > 0) {
Fortuna_801890EC(actor3, 0);
}
if (gTeamShields[2] > 0) {
if (gTeamShields[TEAM_ID_SLIPPY] > 0) {
Fortuna_801890EC(actor1, 1);
}
if (gTeamShields[3] > 0) {
if (gTeamShields[TEAM_ID_PEPPY] > 0) {
Fortuna_801890EC(actor2, 2);
}
}
@ -871,7 +871,7 @@ void Fortuna_8018927C(Player* player) {
}
if (gCsFrameCount == 200) {
if (D_ctx_80177930 == 0) {
if (gNextPlanetPath == 0) {
AUDIO_PLAY_BGM(SEQ_ID_BAD_END);
} else {
AUDIO_PLAY_BGM(SEQ_ID_GOOD_END);
@ -879,7 +879,7 @@ void Fortuna_8018927C(Player* player) {
}
if (gCsFrameCount == 420) {
D_ctx_80177840 = 100;
gLevelClearScreenTimer = 100;
}
break;
@ -919,10 +919,10 @@ void Fortuna_8018927C(Player* player) {
Radio_PlayMessage(gMsg_ID_20010, RCID_FOX);
}
if (D_ctx_80177930 == 0) {
if (gNextPlanetPath == 0) {
switch (gCsFrameCount) {
case 588:
switch (gTeamShields[2]) {
switch (gTeamShields[TEAM_ID_SLIPPY]) {
case -1:
Radio_PlayMessage(gMsg_ID_20339, RCID_ROB64);
break;
@ -936,7 +936,7 @@ void Fortuna_8018927C(Player* player) {
break;
case 735:
switch (gTeamShields[3]) {
switch (gTeamShields[TEAM_ID_PEPPY]) {
case -1:
Radio_PlayMessage(gMsg_ID_20338, RCID_ROB64);
break;
@ -950,7 +950,7 @@ void Fortuna_8018927C(Player* player) {
break;
case 881:
switch (gTeamShields[1]) {
switch (gTeamShields[TEAM_ID_FALCO]) {
case -1:
Radio_PlayMessage(gMsg_ID_20337, RCID_ROB64);
break;
@ -966,7 +966,7 @@ void Fortuna_8018927C(Player* player) {
} else {
switch (gCsFrameCount) {
case 588:
switch (gTeamShields[2]) {
switch (gTeamShields[TEAM_ID_SLIPPY]) {
case -1:
Radio_PlayMessage(gMsg_ID_20339, RCID_ROB64);
break;
@ -980,7 +980,7 @@ void Fortuna_8018927C(Player* player) {
break;
case 735:
switch (gTeamShields[3]) {
switch (gTeamShields[TEAM_ID_PEPPY]) {
case -1:
Radio_PlayMessage(gMsg_ID_20338, RCID_ROB64);
break;
@ -994,7 +994,7 @@ void Fortuna_8018927C(Player* player) {
break;
case 881:
switch (gTeamShields[1]) {
switch (gTeamShields[TEAM_ID_FALCO]) {
case -1:
Radio_PlayMessage(gMsg_ID_20337, RCID_ROB64);
break;
@ -1039,7 +1039,7 @@ void Fortuna_8018927C(Player* player) {
D_ctx_80177A48[4] *= 1.19f;
player->unk_190 = 2.0f;
if (gTeamShields[1] > 0) {
if (gTeamShields[TEAM_ID_FALCO] > 0) {
if (player->timer_1F8 == 980) {
AUDIO_PLAY_SFX(0x09000002U, actor3->sfxSource, 0U);
actor3->vel.y = 1.0f;
@ -1053,7 +1053,7 @@ void Fortuna_8018927C(Player* player) {
}
}
if ((gTeamShields[3] > 0) && (player->timer_1F8 == 960)) {
if ((gTeamShields[TEAM_ID_PEPPY] > 0) && (player->timer_1F8 == 960)) {
AUDIO_PLAY_SFX(0x09000002U, actor2->sfxSource, 0U);
actor2->vel.y = 1.0f;
actor2->fwork[29] = 5.0f;
@ -1066,7 +1066,7 @@ void Fortuna_8018927C(Player* player) {
actor2->iwork[11] = 2;
}
if (gTeamShields[2] > 0) {
if (gTeamShields[TEAM_ID_SLIPPY] > 0) {
if (player->timer_1F8 == 940) {
AUDIO_PLAY_SFX(0x09000002U, actor1->sfxSource, 0U);
actor1->vel.y = 1.0f;
@ -1099,28 +1099,28 @@ void Fortuna_8018927C(Player* player) {
D_ctx_8017837C = 4;
Audio_FadeOutAll(10);
for (i = 0; i < 6; i++) {
D_ctx_80177CF0[i] = D_ctx_80177CD0[i];
gSavedStarWolfTeamAlive[i] = gStarWolfTeamAlive[i];
}
D_play_800D3180[LEVEL_FORTUNA] = Play_CheckMedalStatus(50) + 1;
}
break;
case 20:
if (gTeamShields[1] > 0) {
if (gTeamShields[TEAM_ID_FALCO] > 0) {
Fortuna_801890EC(actor3, 0);
actor3->obj.pos.x = (player->pos.x - 100.0f) - 400.0f;
actor3->obj.pos.y = player->pos.y + 400.0f;
actor3->obj.pos.z = player->unk_138 - 150.0f;
actor3->obj.rot.z = 90.0f;
}
if (gTeamShields[2] > 0) {
if (gTeamShields[TEAM_ID_SLIPPY] > 0) {
Fortuna_801890EC(actor1, 1);
actor1->obj.pos.x = player->pos.x + 100.0f + 400.0f;
actor1->obj.pos.y = player->pos.y + 400.0f;
actor1->obj.pos.z = player->unk_138 - 150.0f;
actor1->obj.rot.z = -90.0f;
}
if (gTeamShields[3] > 0) {
if (gTeamShields[TEAM_ID_PEPPY] > 0) {
Fortuna_801890EC(actor2, 2);
actor2->obj.pos.x = player->pos.x;
actor2->obj.pos.y = player->pos.y + 100.0f + 400.0f;
@ -1149,9 +1149,9 @@ void Fortuna_8018927C(Player* player) {
break;
}
if (D_ctx_80178340 != 0) {
D_ctx_80178358 = 0;
D_ctx_8017835C = 1;
if (gFillScreenAlpha != 0) {
gFillScreenAlphaTarget = 0;
gFillScreenAlphaStep = 1;
}
if (gCsFrameCount == 140) {
@ -1195,7 +1195,7 @@ void Fortuna_8018927C(Player* player) {
AUDIO_PLAY_BGM(SEQ_ID_GOOD_END);
break;
case 450:
D_ctx_80177840 = 100;
gLevelClearScreenTimer = 100;
break;
}
src.x = 0.0f;
@ -1231,7 +1231,7 @@ void Fortuna_8018927C(Player* player) {
switch (gCsFrameCount) {
case 618:
switch (gTeamShields[2]) {
switch (gTeamShields[TEAM_ID_SLIPPY]) {
case -1:
Radio_PlayMessage(gMsg_ID_20339, RCID_ROB64);
break;
@ -1245,7 +1245,7 @@ void Fortuna_8018927C(Player* player) {
break;
case 765:
switch (gTeamShields[3]) {
switch (gTeamShields[TEAM_ID_PEPPY]) {
case -1:
Radio_PlayMessage(gMsg_ID_20338, RCID_ROB64);
break;
@ -1259,7 +1259,7 @@ void Fortuna_8018927C(Player* player) {
break;
case 911:
switch (gTeamShields[1]) {
switch (gTeamShields[TEAM_ID_FALCO]) {
case -1:
Radio_PlayMessage(gMsg_ID_20337, RCID_ROB64);
break;
@ -1277,7 +1277,7 @@ void Fortuna_8018927C(Player* player) {
break;
case 1240:
if (gTeamShields[1] > 0) {
if (gTeamShields[TEAM_ID_FALCO] > 0) {
AUDIO_PLAY_SFX(0x09000002U, actor3->sfxSource, 0U);
actor3->fwork[29] = 5.0f;
actor3->iwork[11] = 2;
@ -1285,7 +1285,7 @@ void Fortuna_8018927C(Player* player) {
break;
case 1260:
if (gTeamShields[2] > 0) {
if (gTeamShields[TEAM_ID_SLIPPY] > 0) {
AUDIO_PLAY_SFX(0x09000002U, actor1->sfxSource, 0U);
actor1->fwork[29] = 5.0f;
actor1->iwork[11] = 2;
@ -1293,7 +1293,7 @@ void Fortuna_8018927C(Player* player) {
break;
case 1280:
if (gTeamShields[3] > 0) {
if (gTeamShields[TEAM_ID_PEPPY] > 0) {
AUDIO_PLAY_SFX(0x09000002U, actor2->sfxSource, 0U);
actor2->fwork[29] = 5.0f;
actor2->iwork[11] = 2;
@ -1314,9 +1314,9 @@ void Fortuna_8018927C(Player* player) {
}
if ((gCsFrameCount >= 1400)) {
D_ctx_80178358 = 255;
D_ctx_8017835C = 16;
if (D_ctx_80178340 == 255) {
gFillScreenAlphaTarget = 255;
gFillScreenAlphaStep = 16;
if (gFillScreenAlpha == 255) {
player->state_1C8 = PLAYERSTATE_1C8_6;
player->timer_1F8 = 0;
D_ctx_8017837C = 4;
@ -1324,7 +1324,7 @@ void Fortuna_8018927C(Player* player) {
// clang-format off
for (i = 0; i < 6; i++) { \
D_ctx_80177CF0[i] = D_ctx_80177CD0[i];
gSavedStarWolfTeamAlive[i] = gStarWolfTeamAlive[i];
}
// clang-format on
@ -1436,58 +1436,58 @@ void Fortuna_8018927C(Player* player) {
void Fortuna_8018BA2C(void) {
s32 i;
Actor* actor;
Object_4C* obj4C;
Sprite* sprite;
Object_58* obj58;
Boss* boss = &gBosses[0];
D_ctx_80178310 = SEGMENTED_TO_VIRTUAL(D_enmy_800CFDA0[gCurrentLevel]);
gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]);
for (obj58 = &gObjects58[0], i = 0; i < 1000; i++) {
if (D_ctx_80178310[i].id < 0) {
if (gLevelObjects[i].id < 0) {
break;
}
if (D_ctx_80178310[i].id < 161) {
if (gLevelObjects[i].id < 161) {
Object_58_Initialize(obj58);
obj58->obj.status = OBJ_ACTIVE;
obj58->obj.id = D_ctx_80178310[i].id;
obj58->obj.pos.x = D_ctx_80178310[i].xPos;
obj58->obj.pos.z = D_ctx_80178310[i].zPos1;
obj58->obj.pos.y = D_ctx_80178310[i].yPos;
obj58->obj.rot.y = D_ctx_80178310[i].rot.y;
obj58->obj.id = gLevelObjects[i].id;
obj58->obj.pos.x = gLevelObjects[i].xPos;
obj58->obj.pos.z = gLevelObjects[i].zPos1;
obj58->obj.pos.y = gLevelObjects[i].yPos;
obj58->obj.rot.y = gLevelObjects[i].rot.y;
Object_SetInfo(&obj58->info, obj58->obj.id);
obj58++;
}
}
for (actor = &gActors[20], i = 0; i < 1000; i++) {
if (D_ctx_80178310[i].id < 0) {
if (gLevelObjects[i].id < 0) {
break;
}
if ((D_ctx_80178310[i].id >= 176) && (D_ctx_80178310[i].id < 292)) {
if ((gLevelObjects[i].id >= OBJ_ACTOR_176) && (gLevelObjects[i].id < OBJ_BOSS_292)) {
Actor_Initialize(actor);
actor->obj.status = OBJ_INIT;
actor->obj.id = D_ctx_80178310[i].id;
actor->obj.pos.x = D_ctx_80178310[i].xPos;
actor->obj.pos.z = D_ctx_80178310[i].zPos1;
actor->obj.pos.y = D_ctx_80178310[i].yPos;
actor->obj.id = gLevelObjects[i].id;
actor->obj.pos.x = gLevelObjects[i].xPos;
actor->obj.pos.z = gLevelObjects[i].zPos1;
actor->obj.pos.y = gLevelObjects[i].yPos;
Object_SetInfo(&actor->info, actor->obj.id);
actor++;
}
}
for (obj4C = &gObjects4C[0], i = 0; i < 1000; i++) {
if (D_ctx_80178310[i].id < 0) {
for (sprite = &gSprites[0], i = 0; i < 1000; i++) {
if (gLevelObjects[i].id < 0) {
break;
}
if (D_ctx_80178310[i].id == 163) {
Object_4C_Initialize(obj4C);
obj4C->obj.status = OBJ_INIT;
obj4C->obj.id = D_ctx_80178310[i].id;
obj4C->obj.pos.x = D_ctx_80178310[i].xPos;
obj4C->obj.pos.z = D_ctx_80178310[i].zPos1;
obj4C->obj.pos.y = D_ctx_80178310[i].yPos;
Object_SetInfo(&obj4C->info, obj4C->obj.id);
obj4C++;
if (gLevelObjects[i].id == 163) {
Sprite_Initialize(sprite);
sprite->obj.status = OBJ_INIT;
sprite->obj.id = gLevelObjects[i].id;
sprite->obj.pos.x = gLevelObjects[i].xPos;
sprite->obj.pos.z = gLevelObjects[i].zPos1;
sprite->obj.pos.y = gLevelObjects[i].yPos;
Object_SetInfo(&sprite->info, sprite->obj.id);
sprite++;
}
}
Boss_Initialize(boss);

View File

@ -194,7 +194,7 @@ void Katina_80192E20(Player* player) {
Vec3f dest;
Actor* actor;
D_360_8015F928 = 0;
gAllRangeEventTimer = 0;
if (player->unk_1D0 != 0) {
Katina_801981F8(&gActors[4]);
@ -274,11 +274,11 @@ void Katina_80192E20(Player* player) {
player->state_1C8 = PLAYERSTATE_1C8_3;
player->unk_014 = 0.0001f;
AUDIO_PLAY_BGM(gBgmSeqId);
D_ctx_80177838 = 80;
gLevelStatusScreenTimer = 80;
for (actor = &gActors[1], i = 1; i < 4; i += 1, actor++) {
actor->timer_0BC = 0;
}
D_360_8015F928 = -610;
gAllRangeEventTimer = -610;
}
break;
}
@ -419,15 +419,15 @@ void Katina_80193B1C(Boss* boss) {
}
}
void Katina_Boss316_Init(Boss* boss) {
boss->swork[10] = 100;
boss->swork[11] = 100;
boss->swork[12] = 100;
boss->swork[13] = 100;
boss->swork[14] = 400;
boss->fwork[9] = 850.0f;
boss->fwork[4] = 850.0f;
boss->vwork[0].y = 1000.0f;
void Katina_Boss316_Init(Boss316* this) {
this->swork[10] = 100;
this->swork[11] = 100;
this->swork[12] = 100;
this->swork[13] = 100;
this->swork[14] = 400;
this->fwork[9] = 850.0f;
this->fwork[4] = 850.0f;
this->vwork[0].y = 1000.0f;
}
void Katina_80193CE4(Boss* boss, s32 idx) {
@ -534,7 +534,7 @@ void Katina_80193EF0(Boss* boss) {
}
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) {
if (!(gGameFrameCount & 15)) {
if ((gGameFrameCount % 16) == 0) {
for (i = 0; i < 4; i++) {
if ((boss->swork[10 + i] <= 0) && (Rand_ZeroOne() < 0.2f)) {
func_effect_8007BFFC((boss->vwork[1 + i].x * 1.3f) + boss->obj.pos.x,
@ -654,7 +654,7 @@ void Katina_801946C4(Boss* boss) {
switch (boss->state) {
case 0:
if (((gHitCount >= 10) || (D_360_8015F928 > 3840))) {
if (((gHitCount >= 10) || (gAllRangeEventTimer > 3840))) {
if ((D_edisplay_801615D0.y < 0.0f)) {
boss->state = 1;
boss->vwork[0].y = 2000.0f;
@ -690,9 +690,9 @@ void Katina_801946C4(Boss* boss) {
boss->obj.pos.z = 4500.0f;
boss->timer_050 = 500;
boss->fwork[10] = 60.0f;
D_360_8015F924 = 1;
gAllRangeCheckpoint = 1;
gSavedHitCount = gHitCount;
for (i = 1; i < 4; i++) {
for (i = TEAM_ID_FALCO; i <= TEAM_ID_PEPPY; i++) {
gSavedTeamShields[i] = gTeamShields[i];
}
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 10);
@ -768,7 +768,7 @@ void Katina_801946C4(Boss* boss) {
AUDIO_PLAY_BGM(SEQ_ID_KA_BOSS | SEQ_FLAG);
}
if ((boss->timer_050 == 0) && !(boss->timer_052 & 15)) {
if ((boss->timer_050 == 0) && ((boss->timer_052 % 16) == 0)) {
Katina_801945FC(boss);
}
@ -822,7 +822,7 @@ void Katina_801946C4(Boss* boss) {
case 7:
Math_SmoothStepToF(&boss->fwork[10], 0.0f, 0.1f, 0.5f, 0.0f);
if ((boss->timer_050 < 200) && !(boss->timer_050 & 15)) {
if ((boss->timer_050 < 200) && ((boss->timer_050 % 16) == 0)) {
Katina_801945FC(boss);
}
@ -850,11 +850,11 @@ void Katina_801946C4(Boss* boss) {
boss->state = 11;
boss->timer_050 = 100;
Radio_PlayMessage(gMsg_ID_18050, RCID_BILL);
D_360_8015F944 = 1.0f;
D_360_8015F93C = 1;
D_360_8015F930[0] = 1;
D_360_8015F930[1] = 1;
D_360_8015F930[2] = 30;
gAllRangeCountdownScale = 1.0f;
gShowAllRangeCountdown = 1;
gAllRangeCountdown[0] = 1;
gAllRangeCountdown[1] = 1;
gAllRangeCountdown[2] = 30;
}
break;
@ -877,7 +877,7 @@ void Katina_801946C4(Boss* boss) {
Math_SmoothStepToF(&boss->fwork[10], 5.0f, 0.1f, 0.5f, 0.0f);
if (boss->timer_050 == 0 &&
(gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3 || gPlayer[0].state_1C8 == PLAYERSTATE_1C8_5)) {
D_360_8015F93C = 0;
gShowAllRangeCountdown = 0;
boss->timer_050 = 1000;
boss->state = 15;
boss->obj.rot.y = 0.0f;
@ -989,7 +989,7 @@ void Katina_801946C4(Boss* boss) {
}
if ((boss->timer_052 == 700) || (boss->timer_052 == 697)) {
i = gGameFrameCount & 63;
i = gGameFrameCount % 64U;
Object_Kill(&gEffects[i].obj, gEffects[i].sfxSource);
func_effect_8007B344(boss->obj.pos.x, boss->obj.pos.y - 600.0f, boss->obj.pos.z, 90.0f, 0);
AUDIO_PLAY_SFX(0x1140B045U, boss->sfxSource, 0);
@ -1033,11 +1033,11 @@ void Katina_801946C4(Boss* boss) {
Math_SmoothStepToF(&D_ctx_801779A8[gMainController], 100.0f, 1.0f, 100.0f, 0.0f);
Math_SmoothStepToF(&gPlayer[0].camAt.y, 525.0f, 0.3f, 50.0f, 0.0f);
if (boss->timer_050 == 0) {
D_ctx_80178358 = 255;
D_ctx_80178348 = 255;
D_ctx_80178350 = 255;
D_ctx_80178354 = 255;
if (D_ctx_80178340 == 255) {
gFillScreenAlphaTarget = 255;
gFillScreenRed = 255;
gFillScreenGreen = 255;
gFillScreenBlue = 255;
if (gFillScreenAlpha == 255) {
gPlayer[0].state_1C8 = PLAYERSTATE_1C8_7;
gPlayer[0].unk_1D0 = 2;
gPlayer[0].unk_234 = 1;
@ -1060,13 +1060,13 @@ void Katina_801946C4(Boss* boss) {
break;
case 20:
D_360_8015F93C = 0;
gShowAllRangeCountdown = 0;
Math_SmoothStepToF(&boss->fwork[10], 0.0f, 0.1f, 3.0f, 0.0f);
if ((boss->timer_050 == 0) &&
(((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3)) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_5))) {
gPlayer[0].state_1C8 = PLAYERSTATE_1C8_7;
gPlayer[0].unk_1D0 = 0;
D_ctx_80177930 = 1;
gNextPlanetPath = 1;
boss->obj.pos.z = 0.0f;
boss->health = -1;
boss->fwork[10] = 0.0f;
@ -1090,7 +1090,7 @@ void Katina_801946C4(Boss* boss) {
AUDIO_PLAY_SFX(0x19408047U, boss->sfxSource, 0);
}
if (boss->timer_050 >= 821) {
if (boss->timer_050 > 820) {
boss->obj.rot.x += 0.075f;
boss->gravity = 0.1f;
if (boss->vel.y < -10.0f) {
@ -1112,7 +1112,7 @@ void Katina_801946C4(Boss* boss) {
boss->obj.pos.z + 600.0f + RAND_FLOAT(1000.0f), 0.0f, 20.0f, 0.0f, RAND_FLOAT(20.0f) + 15.0f);
}
if ((gGameFrameCount & 1) || (boss->timer_050 >= 851)) {
if (((gGameFrameCount % 2) != 0) || (boss->timer_050 > 850)) {
src.x = RAND_FLOAT_CENTERED(4000.0f);
src.y = RAND_FLOAT_CENTERED(600.0f) + -300.0f;
src.z = RAND_FLOAT_CENTERED(4000.0f);
@ -1201,7 +1201,7 @@ bool Katina_801965A8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* d
switch (limbIndex) {
case 1:
rot->y += boss->fwork[0];
if (boss->swork[0] & 1) {
if ((boss->swork[0] % 2) != 0) {
RCP_SetupDL(&gMasterDisp, 30);
}
@ -1214,7 +1214,7 @@ bool Katina_801965A8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* d
case 2:
rot->y += boss->fwork[1];
if (boss->swork[1] & 1) {
if ((boss->swork[1] % 2) != 0) {
RCP_SetupDL(&gMasterDisp, 30);
}
@ -1227,7 +1227,7 @@ bool Katina_801965A8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* d
case 3:
rot->y += boss->fwork[2];
if (boss->swork[2] & 1) {
if ((boss->swork[2] % 2) != 0) {
RCP_SetupDL(&gMasterDisp, 30);
}
@ -1240,7 +1240,7 @@ bool Katina_801965A8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* d
case 4:
rot->y -= boss->fwork[3];
if (boss->swork[3] & 1) {
if ((boss->swork[3] % 2) != 0) {
RCP_SetupDL(&gMasterDisp, 30);
}
@ -1253,7 +1253,7 @@ bool Katina_801965A8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* d
case 9:
pos->x -= boss->fwork[4];
if (boss->swork[4] & 1) {
if ((boss->swork[4] % 2) != 0) {
RCP_SetupDL(&gMasterDisp, 30);
}
@ -1366,14 +1366,14 @@ void Katina_80197024(void) {
Rand_SetSeed(1, 29100, 9786);
if (D_ctx_80177930 != 0) {
if (gNextPlanetPath != 0) {
target = 19;
} else {
target = 2;
}
for (i = 0; i <= target; i++, actor++) {
if ((D_i4_8019F2F0[i] >= D_360_8015F921) && ((i >= 3) || (gTeamShields[i + 1] > 0))) {
if ((D_i4_8019F2F0[i] >= gKaAllyKillCount) && ((i >= 3) || (gTeamShields[i + 1] > 0))) {
Actor_Initialize(actor);
actor->obj.status = OBJ_INIT;
actor->obj.id = OBJ_ACTOR_195;
@ -1431,15 +1431,15 @@ void Katina_80197290(Player* player) {
}
}
player->unk_1D0 += 1;
if (gTeamShields[1] > 0) {
if (gTeamShields[TEAM_ID_FALCO] > 0) {
Katina_80196E30(&gActors[1], 0);
}
if (gTeamShields[2] > 0) {
if (gTeamShields[TEAM_ID_SLIPPY] > 0) {
Katina_80196E30(&gActors[2], 1);
}
if (gTeamShields[3] > 0) {
if (gTeamShields[TEAM_ID_PEPPY] > 0) {
Katina_80196E30(&gActors[3], 2);
}
break;
@ -1473,8 +1473,8 @@ void Katina_80197290(Player* player) {
}
if (gCsFrameCount >= 225) {
D_ctx_80178358 = 255;
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255;
gFillScreenAlphaTarget = 255;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255;
}
if (gCsFrameCount == 250) {
@ -1498,7 +1498,7 @@ void Katina_80197290(Player* player) {
player->pos.z = 150.0f;
player->unk_1D0 = 3;
func_8001C8B8(0);
if (D_ctx_80177930 != 0) {
if (gNextPlanetPath != 0) {
AUDIO_PLAY_BGM(SEQ_ID_GOOD_END);
} else {
AUDIO_PLAY_BGM(SEQ_ID_BAD_END);
@ -1513,8 +1513,8 @@ void Katina_80197290(Player* player) {
break;
case 3:
D_ctx_80178358 = 0;
D_ctx_8017835C = 2;
gFillScreenAlphaTarget = 0;
gFillScreenAlphaStep = 2;
D_ctx_80177A48[1] -= D_ctx_80177A48[2];
Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[1] * M_DTOR, 0);
src.x = -1000.0f;
@ -1527,7 +1527,7 @@ void Katina_80197290(Player* player) {
gCsCamAtX = 0.0f;
gCsCamAtY = 3500.0f;
gCsCamAtZ = player->pos.z + 500;
if (gCsFrameCount >= 1011) {
if (gCsFrameCount > 1010) {
player->unk_0D0 += 2.0f;
player->unk_0E4 += 0.1f;
Math_SmoothStepToF(&D_ctx_80177A48[2], 0.0f, 1.0f, 0.001f, 0);
@ -1544,11 +1544,11 @@ void Katina_80197290(Player* player) {
Audio_FadeOutAll(50);
}
if (gCsFrameCount >= 1101) {
D_ctx_80178358 = 255;
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0;
D_ctx_8017835C = 8;
if (D_ctx_80178340 == 255) {
if (gCsFrameCount > 1100) {
gFillScreenAlphaTarget = 255;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0;
gFillScreenAlphaStep = 8;
if (gFillScreenAlpha == 255) {
player->state_1C8 = PLAYERSTATE_1C8_6;
player->timer_1F8 = 0;
D_ctx_8017837C = 4;
@ -1557,7 +1557,7 @@ void Katina_80197290(Player* player) {
}
switch (gCsFrameCount) {
case 190:
D_ctx_80177840 = 100;
gLevelClearScreenTimer = 100;
break;
case 350:
@ -1586,8 +1586,8 @@ void Katina_80197290(Player* player) {
break;
case 570:
if (D_ctx_80177930 != 0) {
if (D_360_8015F921 == 0) {
if (gNextPlanetPath != 0) {
if (gKaAllyKillCount == 0) {
Radio_PlayMessage(gMsg_ID_18100, RCID_BILL);
} else {
Radio_PlayMessage(gMsg_ID_18090, RCID_BILL);
@ -1598,8 +1598,8 @@ void Katina_80197290(Player* player) {
break;
case 700:
if (D_ctx_80177930 != 0) {
if (D_360_8015F921 == 0) {
if (gNextPlanetPath != 0) {
if (gKaAllyKillCount == 0) {
Radio_PlayMessage(gMsg_ID_18105, RCID_FOX);
} else {
Radio_PlayMessage(gMsg_ID_18095, RCID_FOX);
@ -1613,15 +1613,15 @@ void Katina_80197290(Player* player) {
case 100:
Katina_80196F40(&gActors[1], 0);
if (gTeamShields[1] > 0) {
if (gTeamShields[TEAM_ID_FALCO] > 0) {
Katina_80196F40(&gActors[2], 1);
}
if (gTeamShields[2] > 0) {
if (gTeamShields[TEAM_ID_SLIPPY] > 0) {
Katina_80196F40(&gActors[3], 2);
}
if (gTeamShields[3] > 0) {
if (gTeamShields[TEAM_ID_PEPPY] > 0) {
Katina_80196F40(&gActors[4], 3);
}
player->unk_1D0 += 1;
@ -1676,7 +1676,7 @@ void Katina_80197F10(Actor* actor) {
Math_SmoothStepToF(&actor->obj.pos.y, actor->vwork[0].y, 0.02f, 2.0f, 0.0001f);
Math_SmoothStepToF(&actor->obj.pos.z, actor->vwork[0].z, 0.02f, 2.0f, 0.0001f);
Math_SmoothStepToF(&actor->unk_0F4.z, 0.0f, 0.02f, 0.2f, 0.0001f);
if ((actor->unk_0B6 != 0) && ((((actor->index & 7) * 10) + 800) < gCsFrameCount)) {
if ((actor->unk_0B6 != 0) && ((((s32) (actor->index % 8U) * 10) + 800) < gCsFrameCount)) {
actor->state = 4;
}
break;
@ -1807,18 +1807,18 @@ void Katina_80198594(Actor* actor) {
case 0:
D_game_80161A44 = 30000.0f;
D_i4_801A0540 = 0;
D_360_8015F920 = D_360_8015F921 = 0;
gKaKilledAlly = gKaAllyKillCount = 0;
actor->state = 2;
if (D_360_8015F924 != 0) {
if (gAllRangeCheckpoint != 0) {
gHitCount = gSavedHitCount;
gBosses[1].state = 6;
gBosses[1].obj.pos.x = 0.0f;
gBosses[1].obj.pos.z = 0.0f;
gBosses[1].obj.pos.y = 2000.0f;
AUDIO_PLAY_SFX(0x11037025U, gBosses[1].sfxSource, 0);
D_360_8015F928 = 20000;
gAllRangeEventTimer = 20000;
gBosses[1].swork[16] = 5760;
D_360_8015F920 = 1;
gKaKilledAlly = 1;
AUDIO_PLAY_BGM(SEQ_ID_KA_BOSS | SEQ_FLAG);
}
@ -1841,7 +1841,7 @@ void Katina_80198594(Actor* actor) {
}
if (gBosses[1].state < 15) {
switch (D_360_8015F928) {
switch (gAllRangeEventTimer) {
case -500:
Radio_PlayMessage(gMsg_ID_18005, RCID_BILL);
break;
@ -1860,10 +1860,11 @@ void Katina_80198594(Actor* actor) {
}
if (gBosses[1].state == 12) {
if (!(D_360_8015F928 & 255) && (Rand_ZeroOne() < 0.5f)) {
if (((gAllRangeEventTimer % 256) == 0) && (Rand_ZeroOne() < 0.5f)) {
func_360_8002E4F8(gMsg_ID_18060, RCID_BILL);
}
} else if ((D_360_8015F928 > 500) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) && !(D_360_8015F928 & 511)) {
} else if ((gAllRangeEventTimer > 500) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) &&
((gAllRangeEventTimer % 512) == 0)) {
switch (RAND_INT(3.99f)) {
case 0:
func_360_8002E4F8(gMsg_ID_18020, RCID_BILL);
@ -1990,7 +1991,7 @@ void Katina_80198AA0(Actor* actor) {
actor->iwork[4] += 1;
actor->iwork[5] = 1;
if (!((actor->index + gGameFrameCount) & 11) && (Rand_ZeroOne() < 0.1f) &&
if ((((actor->index + gGameFrameCount) & 0xB) == 0) && (Rand_ZeroOne() < 0.1f) &&
(func_360_80031900(actor) != 0) && (gActors[0].state == 2)) {
actor->iwork[0] = 1;
}
@ -2047,7 +2048,7 @@ void Katina_80198AA0(Actor* actor) {
xRand = actor->fwork[4] - actor->obj.pos.x;
yRand = actor->fwork[5] - actor->obj.pos.y;
zRand = actor->fwork[6] - actor->obj.pos.z;
if ((!((actor->index + gGameFrameCount) & 7))) {
if (((actor->index + gGameFrameCount) % 8) == 0) {
actor->fwork[19] = Math_RadToDeg(Math_Atan2F(xRand, zRand));
xAngle = sqrtf(SQ(xRand) + SQ(zRand));
actor->fwork[20] = Math_RadToDeg(Math_Atan2F(yRand, xAngle));
@ -2128,7 +2129,7 @@ void Katina_801995B4(Actor* actor) {
Vec3f D_i4_8019F4A8 = { 0.0f, 0.0f, 0.0f };
Vec3f pad[30];
if (!((actor->index + gSysFrameCount) & 7)) {
if (((actor->index + gSysFrameCount) % 8) == 0) {
actor->iwork[23] = 1;
if ((fabsf(actor->obj.pos.x - gPlayer[0].camEye.x) < 4500.0f) &&
(fabsf(actor->obj.pos.z - gPlayer[0].camEye.z) < 4500.0f)) {
@ -2149,7 +2150,7 @@ void Katina_801995B4(Actor* actor) {
} else {
RCP_SetupDL(&gMasterDisp, 29);
}
if (!(actor->timer_0C6 & 1)) {
if ((actor->timer_0C6 % 2) == 0) {
gSPFogPosition(gMasterDisp++, gFogNear, 1005);
}
switch (actor->unk_0B6) {

View File

@ -59,7 +59,7 @@ void SectorZ_80199900(Actor* actor, s32 arg1) {
}
if ((D_i4_801A0560 == 3) && (D_play_800D3180[LEVEL_ZONESS] != 0)) {
D_360_800C9B4C = D_360_8015F928 + 110;
D_360_800C9B4C = gAllRangeEventTimer + 110;
}
}
}
@ -251,7 +251,7 @@ void SectorZ_8019A1D0(void) {
}
void SectorZ_8019A2F4(Actor* actor) {
if (D_360_8015F928 == D_360_800C9B4C) {
if (gAllRangeEventTimer == D_360_800C9B4C) {
SectorZ_8019A1D0();
gCsFrameCount = 0;
actor->timer_0BC = 400;
@ -278,7 +278,7 @@ void SectorZ_8019A3E8(Actor* actor) {
Vec3f sp34;
Actor* actorPtr;
if (D_360_8015F928 >= 0) {
if (gAllRangeEventTimer >= 0) {
if (gTeamShields[AI360_FALCO] > 0) {
if (gActors[AI360_FALCO].iwork[2] == AI360_FOX) {
if (gActors[AI360_10].obj.status == 2) {
@ -334,12 +334,12 @@ void SectorZ_8019A3E8(Actor* actor) {
}
}
if (D_360_8015F928 == 100) {
if (gAllRangeEventTimer == 100) {
Radio_PlayMessage(gMsg_ID_16030, RCID_FALCO);
}
if (((actor->timer_0C0 == 0) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_0)) &&
((D_360_8015F928 < 200) || ((D_360_8015F928 > 4000) && (D_360_8015F928 < 4200)))) {
((gAllRangeEventTimer < 200) || ((gAllRangeEventTimer > 4000) && (gAllRangeEventTimer < 4200)))) {
actor->timer_0C0 = 5;
actorPtr = &gActors[13];
sp40.x = 0.0f;
@ -363,7 +363,7 @@ void SectorZ_8019A3E8(Actor* actor) {
actorPtr->aiType = i + AI360_10 + 3;
actorPtr->aiIndex = -1;
if (D_360_8015F928 >= 0) {
if (gAllRangeEventTimer >= 0) {
if (((i + 13) == 23) || ((i + 13) == 24)) {
actorPtr->aiIndex = AI360_SLIPPY;
actorPtr->state = 2;
@ -393,7 +393,7 @@ void SectorZ_8019A3E8(Actor* actor) {
}
}
switch (D_360_8015F928) {
switch (gAllRangeEventTimer) {
case 5850:
Radio_PlayMessage(gMsg_ID_16110, RCID_ROB64);
break;
@ -441,8 +441,8 @@ void SectorZ_8019A3E8(Actor* actor) {
gPlayer[0].camAt.z = gActors[10].obj.pos.z;
actor->timer_0BC = 10000;
D_ctx_80178340 = D_ctx_80178358 = 255;
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0;
gFillScreenAlpha = gFillScreenAlphaTarget = 255;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0;
AUDIO_PLAY_BGM(SEQ_ID_SZ_BOSS | SEQ_FLAG);
break;
}
@ -458,7 +458,7 @@ bool SectorZ_8019AA9C(Player* player) {
player->state_1C8 = PLAYERSTATE_1C8_10;
player->unk_1D0 = 0;
gActors[0].state = 20;
D_360_8015F928--;
gAllRangeEventTimer--;
return true;
}
}
@ -477,13 +477,13 @@ void SectorZ_8019AB8C(Actor* actor) {
switch ((s32) actor->state) {
case 0:
D_i4_801A0564 = D_i4_801A0560 = 0;
D_360_8015F914 = 63.0f;
D_360_8015F918 = 255.0f;
D_360_8015F91C = 158.0f;
gSzMissileR = 63.0f;
gSzMissileG = 255.0f;
gSzMissileB = 158.0f;
D_game_80161A44 = 30000.0f;
D_360_8015F928 = 0;
gAllRangeEventTimer = 0;
actor->state = 2;
if (D_360_8015F924 != 0) {
if (gAllRangeCheckpoint != 0) {
gHitCount = gSavedHitCount;
}
D_360_800C9B4C = 1000000;
@ -511,7 +511,7 @@ void SectorZ_8019AB8C(Actor* actor) {
break;
case 20:
D_360_8015F928--;
gAllRangeEventTimer--;
break;
case 3:
@ -577,7 +577,7 @@ void SectorZ_8019AB8C(Actor* actor) {
break;
case 10:
D_ctx_80178340 = D_ctx_80178358 = 0;
gFillScreenAlpha = gFillScreenAlphaTarget = 0;
switch (actor->timer_0BC) {
case 9800:
AUDIO_PLAY_SFX(0x09000002U, gActors[10].sfxSource, 0U);
@ -638,14 +638,14 @@ void SectorZ_8019AB8C(Actor* actor) {
break;
}
if (!(gGameFrameCount & 24)) {
Math_SmoothStepToF(&D_360_8015F914, 63.0f, 1.0f, 9.450001f, 0);
Math_SmoothStepToF(&D_360_8015F918, 255.0f, 1.0f, 35.25f, 0);
Math_SmoothStepToF(&D_360_8015F91C, 158.0f, 1.0f, 21.6f, 0);
if (!(gGameFrameCount & 0x18)) {
Math_SmoothStepToF(&gSzMissileR, 63.0f, 1.0f, 9.450001f, 0);
Math_SmoothStepToF(&gSzMissileG, 255.0f, 1.0f, 35.25f, 0);
Math_SmoothStepToF(&gSzMissileB, 158.0f, 1.0f, 21.6f, 0);
} else {
Math_SmoothStepToF(&D_360_8015F914, 0.0f, 1.0f, 3.15f, 0);
Math_SmoothStepToF(&D_360_8015F918, 20.0f, 1.0f, 11.75f, 0);
Math_SmoothStepToF(&D_360_8015F91C, 14.0f, 1.0f, 7.2000003f, 0);
Math_SmoothStepToF(&gSzMissileR, 0.0f, 1.0f, 3.15f, 0);
Math_SmoothStepToF(&gSzMissileG, 20.0f, 1.0f, 11.75f, 0);
Math_SmoothStepToF(&gSzMissileB, 14.0f, 1.0f, 7.2000003f, 0);
}
}
@ -751,7 +751,7 @@ void SectorZ_8019B888(void) {
s32 i;
Actor* actor;
for (i = 0, actor = &gActors[0]; i < 4; i++, actor++) {
for (i = 0, actor = &gActors[0]; i <= TEAM_ID_PEPPY; i++, actor++) {
if ((i <= 0) || (gTeamShields[i] > 0)) {
Actor_Initialize(actor);
actor->obj.status = OBJ_ACTIVE;
@ -769,7 +769,7 @@ void SectorZ_8019B888(void) {
actor->health = 255;
actor->iwork[11] = 1;
AUDIO_PLAY_SFX(0x3100000CU, actor->sfxSource, 4U);
actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_edata_800CC01C);
actor->info.hitbox = SEGMENTED_TO_VIRTUAL(gTeamHitbox);
actor->info.unk_16 = 0;
actor->info.unk_1C = 0.0f;
}
@ -784,7 +784,7 @@ void SectorZ_8019BA64(Player* player) {
Vec3f sp68;
Actor* actor = gActors;
D_360_8015F928 = 0;
gAllRangeEventTimer = 0;
switch (player->unk_1D0) {
case 0:
@ -811,7 +811,7 @@ void SectorZ_8019BA64(Player* player) {
case 1:
if (gCsFrameCount < 7) {
D_ctx_80178340 = 255;
gFillScreenAlpha = 255;
}
gCsCamAtX -= 10.0f;
@ -828,12 +828,12 @@ void SectorZ_8019BA64(Player* player) {
gCsCamAtX = 0.0f;
gCsCamAtY = 0.0f;
gCsCamAtZ = 0.0f;
D_ctx_80178340 = 255;
gFillScreenAlpha = 255;
}
break;
case 2:
D_ctx_80178340 = 0;
gFillScreenAlpha = 0;
player->unk_034 += 0.05f;
for (i = 30; i < 34; i++) {
@ -865,7 +865,7 @@ void SectorZ_8019BA64(Player* player) {
player->camAt.z = gCsCamAtZ = actor->obj.pos.z;
D_ctx_80177A48[0] = 0.0f;
D_ctx_80178340 = 255;
gFillScreenAlpha = 255;
for (i = 0; i < 4; i++) {
Object_Kill(&gActors[i + 30].obj, gActors[i + 30].sfxSource);
@ -880,7 +880,7 @@ void SectorZ_8019BA64(Player* player) {
break;
case 3:
D_ctx_80178340 = 0;
gFillScreenAlpha = 0;
gCsCamEyeX = -1250.0f;
gCsCamEyeY = -395.0f;
@ -933,7 +933,7 @@ void SectorZ_8019BA64(Player* player) {
player->state_1C8 = PLAYERSTATE_1C8_3;
player->unk_01C = player->unk_018 = player->unk_014 = 0.f;
AUDIO_PLAY_BGM(gBgmSeqId);
D_ctx_80177838 = 50;
gLevelStatusScreenTimer = 50;
}
break;
}
@ -971,19 +971,19 @@ void SectorZ_8019BA64(Player* player) {
break;
case 700:
if (gTeamShields[2] > 0) {
if (gTeamShields[TEAM_ID_SLIPPY] > 0) {
SectorZ_8019B75C(&gActors[30], 0);
}
break;
case 720:
if (gTeamShields[1] > 0) {
if (gTeamShields[TEAM_ID_FALCO] > 0) {
SectorZ_8019B75C(&gActors[31], 1);
}
break;
case 740:
if (gTeamShields[3] > 0) {
if (gTeamShields[TEAM_ID_PEPPY] > 0) {
SectorZ_8019B75C(&gActors[32], 2);
}
break;
@ -1182,8 +1182,8 @@ void SectorZ_8019C85C(Player* player) {
player->unk_0D0 = 0.0f;
player->unk_034 = 0.0f;
D_ctx_80178358 = 255;
D_ctx_80178340 = D_ctx_80178358;
gFillScreenAlphaTarget = 255;
gFillScreenAlpha = gFillScreenAlphaTarget;
for (i = 0; i < ARRAY_COUNT(gActors); i++) {
Object_Kill(&gActors[i].obj, gActors[i].sfxSource);
@ -1192,8 +1192,8 @@ void SectorZ_8019C85C(Player* player) {
break;
case 1:
D_ctx_80178358 = 0;
D_ctx_80178340 = 0;
gFillScreenAlphaTarget = 0;
gFillScreenAlpha = 0;
Math_SmoothStepToAngle(&boss0->unk_078.x, 20.0f, 0.03f, boss0->fwork[1], 0.0f);
Math_SmoothStepToAngle(&boss0->unk_078.y, 180.0f, 0.03f, boss0->fwork[2], 0.0f);
@ -1208,8 +1208,8 @@ void SectorZ_8019C85C(Player* player) {
}
if ((gCsFrameCount == 210) && gGreatFoxIntact) {
D_ctx_80177840 = 100;
D_ctx_80177930 = 1;
gLevelClearScreenTimer = 100;
gNextPlanetPath = 1;
}
if ((gCsFrameCount == 230) && (D_i4_801A0564 != 0)) {
@ -1226,8 +1226,8 @@ void SectorZ_8019C85C(Player* player) {
break;
case 2:
D_ctx_80178358 = 0;
D_ctx_80178340 = 0;
gFillScreenAlphaTarget = 0;
gFillScreenAlpha = 0;
if (player->timer_1F8 == 0) {
if (!gGreatFoxIntact) {
@ -1263,22 +1263,22 @@ void SectorZ_8019C85C(Player* player) {
gCsCamAtY = player->pos.y;
gCsCamAtZ = player->pos.z;
if (gTeamShields[1] > 0) {
if (gTeamShields[TEAM_ID_FALCO] > 0) {
SectorZ_8019C574(actor1, 0);
}
if (gTeamShields[2] > 0) {
if (gTeamShields[TEAM_ID_SLIPPY] > 0) {
SectorZ_8019C574(actor3, 1);
}
if (gTeamShields[3] > 0) {
if (gTeamShields[TEAM_ID_PEPPY] > 0) {
SectorZ_8019C574(actor2, 2);
}
SectorZ_8019C574(actor0, 3);
D_ctx_80178340 = D_ctx_80178358 = 255;
gFillScreenAlpha = gFillScreenAlphaTarget = 255;
}
break;
case 10:
D_ctx_80178340 = D_ctx_80178358 = 0;
gFillScreenAlpha = gFillScreenAlphaTarget = 0;
gCsCamAtX = player->pos.x;
gCsCamAtY = player->pos.y;
gCsCamAtZ = player->pos.z;
@ -1346,10 +1346,10 @@ void SectorZ_8019C85C(Player* player) {
}
if (gCsFrameCount > 2710) {
D_ctx_80178358 = 255;
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0;
D_ctx_8017835C = 8;
if (D_ctx_80178340 == 255) {
gFillScreenAlphaTarget = 255;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0;
gFillScreenAlphaStep = 8;
if (gFillScreenAlpha == 255) {
player->state_1C8 = PLAYERSTATE_1C8_6;
player->timer_1F8 = 0;
D_ctx_8017837C = 4;
@ -1366,7 +1366,7 @@ void SectorZ_8019C85C(Player* player) {
break;
case 1847:
switch (gTeamShields[1]) {
switch (gTeamShields[TEAM_ID_FALCO]) {
case -1:
Radio_PlayMessage(gMsg_ID_20337, RCID_ROB64);
break;
@ -1382,7 +1382,7 @@ void SectorZ_8019C85C(Player* player) {
break;
case 1984:
switch (gTeamShields[3]) {
switch (gTeamShields[TEAM_ID_PEPPY]) {
case -1:
Radio_PlayMessage(gMsg_ID_20338, RCID_ROB64);
break;
@ -1398,7 +1398,7 @@ void SectorZ_8019C85C(Player* player) {
break;
case 2130:
switch (gTeamShields[2]) {
switch (gTeamShields[TEAM_ID_SLIPPY]) {
case -1:
Radio_PlayMessage(gMsg_ID_20339, RCID_ROB64);
break;
@ -1422,7 +1422,7 @@ void SectorZ_8019C85C(Player* player) {
break;
case 1847:
switch (gTeamShields[1]) {
switch (gTeamShields[TEAM_ID_FALCO]) {
case -1:
Radio_PlayMessage(gMsg_ID_20337, RCID_ROB64);
break;
@ -1438,7 +1438,7 @@ void SectorZ_8019C85C(Player* player) {
break;
case 1984:
switch (gTeamShields[3]) {
switch (gTeamShields[TEAM_ID_PEPPY]) {
case -1:
Radio_PlayMessage(gMsg_ID_20338, RCID_ROB64);
break;
@ -1454,7 +1454,7 @@ void SectorZ_8019C85C(Player* player) {
break;
case 2130:
switch (gTeamShields[2]) {
switch (gTeamShields[TEAM_ID_SLIPPY]) {
case -1:
Radio_PlayMessage(gMsg_ID_20339, RCID_ROB64);
break;
@ -1485,16 +1485,16 @@ void SectorZ_8019C85C(Player* player) {
case 1370:
if (gGreatFoxIntact) {
D_ctx_80177930 = 1;
gNextPlanetPath = 1;
} else {
AUDIO_PLAY_BGM(SEQ_ID_BAD_END);
D_ctx_80177930 = 0;
gNextPlanetPath = 0;
}
break;
case 1560:
if (!gGreatFoxIntact) {
D_ctx_80177840 = 100;
gLevelClearScreenTimer = 100;
}
break;
@ -1615,7 +1615,7 @@ void SectorZ_8019DD20(Actor* actor) {
if (actor->unk_0B6 == 24) {
switch (gCsFrameCount) {
case 290:
if (gTeamShields[1] > 0) {
if (gTeamShields[TEAM_ID_FALCO] > 0) {
Radio_PlayMessage(gMsg_ID_16150, RCID_KATT);
}
break;
@ -1639,7 +1639,7 @@ void SectorZ_8019DD20(Actor* actor) {
Math_SmoothStepToF(&actor->unk_0F4.z, 500.0f, 0.1f, 20.0f, 0.0f);
Math_SmoothStepToF(&actor->fwork[0], 40.0f, 0.1f, 3.0f, 0.0f);
if ((gCsFrameCount < 460) && !(gCsFrameCount & 3)) {
if ((gCsFrameCount < 460) && ((gCsFrameCount & 3) == 0)) {
Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0);
Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1);
Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, 1);
@ -1684,7 +1684,7 @@ void SectorZ_8019E234(Actor* actor) {
AUDIO_PLAY_SFX(0x2903300EU, actor->sfxSource, 4U);
if (actor->health <= 0) {
func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, 5.0f, 10);
func_enmy_80066254(actor);
Actor_Despawn(actor);
BonusText_Display(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 2);
gHitCount += 3;
D_ctx_80177850 = 15;
@ -1795,40 +1795,40 @@ void SectorZ_8019EA68(void) {
Object_58* obj58;
Boss* boss = &gBosses[0];
D_ctx_80178310 = SEGMENTED_TO_VIRTUAL(D_enmy_800CFDA0[gCurrentLevel]);
gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]);
Rand_SetSeed(1, 29000, 9876);
for (obj58 = gObjects58, i = 0; i < 1000; i++) {
if (D_ctx_80178310[i].id < 0) {
if (gLevelObjects[i].id < 0) {
break;
}
if (D_ctx_80178310[i].id < 161) {
if (gLevelObjects[i].id < 161) {
Object_58_Initialize(obj58);
obj58->obj.status = OBJ_ACTIVE;
obj58->obj.id = D_ctx_80178310[i].id;
obj58->obj.pos.x = D_ctx_80178310[i].xPos;
obj58->obj.pos.y = D_ctx_80178310[i].yPos;
obj58->obj.pos.z = -D_ctx_80178310[i].zPos1;
obj58->obj.rot.y = D_ctx_80178310[i].rot.y;
obj58->obj.id = gLevelObjects[i].id;
obj58->obj.pos.x = gLevelObjects[i].xPos;
obj58->obj.pos.y = gLevelObjects[i].yPos;
obj58->obj.pos.z = -gLevelObjects[i].zPos1;
obj58->obj.rot.y = gLevelObjects[i].rot.y;
Object_SetInfo(&obj58->info, obj58->obj.id);
obj58++;
}
}
for (j = 50, actor = &gActors[j], i = 0; i < 1000; i++) {
if (D_ctx_80178310[i].id < 0) {
if (gLevelObjects[i].id < 0) {
break;
}
if ((D_ctx_80178310[i].id >= 176) && (D_ctx_80178310[i].id < 292)) {
if ((gLevelObjects[i].id >= OBJ_ACTOR_176) && (gLevelObjects[i].id < OBJ_BOSS_292)) {
Actor_Initialize(actor);
actor->obj.status = OBJ_INIT;
actor->obj.id = D_ctx_80178310[i].id;
actor->obj.pos.x = D_ctx_80178310[i].xPos;
actor->obj.pos.y = D_ctx_80178310[i].yPos;
actor->obj.pos.z = -D_ctx_80178310[i].zPos1;
actor->obj.id = gLevelObjects[i].id;
actor->obj.pos.x = gLevelObjects[i].xPos;
actor->obj.pos.y = gLevelObjects[i].yPos;
actor->obj.pos.z = -gLevelObjects[i].zPos1;
actor->health = 24;
actor->unk_0F4.x = RAND_FLOAT_CENTERED(4.0f);
actor->unk_0F4.y = RAND_FLOAT_CENTERED(4.0f);

View File

@ -4,13 +4,12 @@
* Description: Level: Macbeth
*/
#include "prevent_bss_reordering.h"
// #include "prevent_bss_reordering.h"
#include "global.h"
#include "assets/ast_macbeth.h"
#include "assets/ast_landmaster.h"
#include "assets/ast_enmy_planet.h"
// #include "prevent_bss_reordering2.h"
// #include "prevent_bss_reordering.h"
void Macbeth_801AD624(f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, s16, s16, f32);
bool Macbeth_801A0308(Actor*, f32, f32, u8);
@ -29,7 +28,7 @@ void Macbeth_801ACF6C(void);
f32 D_MA_801BE250[40];
s16 D_MA_801BE2F0[9];
// #include "prevent_bss_reordering.h"
char D_i5_801BE308[8];
s16 D_i5_801BE310;
u8 D_i5_801BE312;
@ -613,69 +612,70 @@ void Macbeth_8019AF34(Actor* actor) {
}
void Macbeth_8019B580(Actor* actor, s32* arg1) {
if (*arg1 < 11) {
if ((gGameFrameCount & 0x1F) == 0) {
func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[21],
actor->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f),
actor->obj.pos.z - 420.0f + RAND_FLOAT(50.0f), 10.0f);
} else if ((gGameFrameCount & 0x1F) == 8) {
func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[25],
actor->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f),
actor->obj.pos.z + RAND_FLOAT(50.0f), 10.0f);
} else if ((gGameFrameCount & 0x1F) == 16) {
func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[23],
actor->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f),
(actor->obj.pos.z + 320.0f) + RAND_FLOAT(50.0f), 10.0f);
} else if ((gGameFrameCount & 0x1F) == 24) {
func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[25],
actor->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f),
actor->obj.pos.z + RAND_FLOAT(50.0f), 10.0f);
}
if (((gGameFrameCount & 3) & 0xFFFF) == 0) {
func_effect_8007C120(actor->obj.pos.x + actor->fwork[25], actor->obj.pos.y + 350.0f, actor->obj.pos.z,
actor->vel.x, actor->vel.y, actor->vel.z, 0.2f, 10);
}
if (*arg1 > 10) {
return;
}
if ((gGameFrameCount % 32U) == 0) {
func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[21],
actor->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f),
actor->obj.pos.z - 420.0f + RAND_FLOAT(50.0f), 10.0f);
} else if ((gGameFrameCount % 32U) == 8) {
func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[25],
actor->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f),
actor->obj.pos.z + RAND_FLOAT(50.0f), 10.0f);
} else if ((gGameFrameCount % 32U) == 16) {
func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[23],
actor->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f),
(actor->obj.pos.z + 320.0f) + RAND_FLOAT(50.0f), 10.0f);
} else if ((gGameFrameCount % 32U) == 24) {
func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[25],
actor->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f),
actor->obj.pos.z + RAND_FLOAT(50.0f), 10.0f);
}
if ((u16) (gGameFrameCount % 4U) == 0) { // fake?
func_effect_8007C120(actor->obj.pos.x + actor->fwork[25], actor->obj.pos.y + 350.0f, actor->obj.pos.z,
actor->vel.x, actor->vel.y, actor->vel.z, 0.2f, 10);
}
}
void Macbeth_8019B8B0(Actor* actor) {
if ((gGameFrameCount & 3) == 0) {
if ((gGameFrameCount % 4U) == 0) {
func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[21],
actor->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f),
actor->obj.pos.z - 420.0f + RAND_FLOAT(50.0f), 20.0f);
} else if ((gGameFrameCount & 3) == 1) {
} else if ((gGameFrameCount % 4U) == 1) {
func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[25],
actor->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f),
RAND_FLOAT(50.0f) + actor->obj.pos.z, 20.0f);
} else if ((gGameFrameCount & 3) == 2) {
} else if ((gGameFrameCount % 4U) == 2) {
func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[23],
actor->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f),
RAND_FLOAT(50.0f) + (actor->obj.pos.z + 420.0f), 20.0f);
} else if ((gGameFrameCount & 3) == 3) {
} else if ((gGameFrameCount % 4U) == 3) {
func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[25],
actor->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f),
RAND_FLOAT(50.0f) + actor->obj.pos.z, 20.0f);
}
if ((gGameFrameCount & 3) == 0) {
if ((gGameFrameCount % 4U) == 0) {
func_effect_8007C120(actor->obj.pos.x + actor->fwork[25], actor->obj.pos.y + 350.0f, actor->obj.pos.z,
actor->vel.x, actor->vel.y, actor->vel.z, 0.2f, 20);
}
}
void Macbeth_8019BBEC(Actor* actor) {
if ((actor->timer_0BC & 0xF) == 0) {
if ((actor->timer_0BC % 16U) == 0) {
func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[21],
RAND_FLOAT_CENTERED(100.0f) + (actor->obj.pos.y + 100.0f),
RAND_FLOAT(50.0f) + (actor->obj.pos.z - 400.0f), 3.0f);
} else if ((actor->timer_0BC & 0xF) == 4) {
} else if ((actor->timer_0BC % 16U) == 4) {
func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[25],
RAND_FLOAT_CENTERED(100.0f) + (actor->obj.pos.y + 100.0f),
RAND_FLOAT(50.0f) + actor->obj.pos.z, 3.0f);
} else if ((actor->timer_0BC & 0xF) == 8) {
} else if ((actor->timer_0BC % 16U) == 8) {
func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[23],
RAND_FLOAT_CENTERED(100.0f) + (actor->obj.pos.y + 100.0f),
RAND_FLOAT(50.0f) + (actor->obj.pos.z + 450.0f), 3.0f);
} else if ((actor->timer_0BC & 0xF) == 12) {
} else if ((actor->timer_0BC % 16U) == 12) {
func_effect_8007C120(actor->obj.pos.x + actor->fwork[25], actor->obj.pos.y + 100.0f, actor->obj.pos.z,
actor->vel.x, actor->vel.y, actor->vel.z, 0.15f, 10);
}
@ -854,9 +854,9 @@ void Macbeth_8019C778(Actor* actor) {
break;
case 5:
if (actor->timer_0BC == 198) {
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = D_ctx_80178340 = 255;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 255;
} else if (actor->timer_0BC == 197) {
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = D_ctx_80178340 = 0;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 0;
}
if (((actor->timer_0BC < 150) || (actor->timer_0BC > 170)) && (actor->timer_0BC > 80)) {
Macbeth_8019B8B0(actor);
@ -874,7 +874,7 @@ void Macbeth_8019C778(Actor* actor) {
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) {
gPlayer[0].state_1C8 = PLAYERSTATE_1C8_7;
gPlayer[0].unk_1D0 = 0;
D_ctx_80177930 = 0;
gNextPlanetPath = 0;
}
actor->state++;
Audio_KillSfxBySourceAndId(gPlayer[0].sfxSource, 0x1100000A);
@ -900,7 +900,7 @@ void Macbeth_8019C778(Actor* actor) {
}
D_i5_801BE320[22] = 0;
}
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
actor->fwork[3] = 15.0f;
} else {
actor->fwork[3] = -15.0f;
@ -1422,13 +1422,13 @@ void Macbeth_8019EE68(Actor* actor) {
if (actor->iwork[5] < D_MA_801BE2F0[3]) {
D_MA_801BE2F0[3] = actor->iwork[5];
}
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = D_ctx_80178340 = 255;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 255;
gCameraShake = 35;
if ((gPlayer[0].unk_138 - actor->obj.pos.z > -200.0f) && (gPlayer[0].unk_138 - actor->obj.pos.z < 200.0f) &&
(gPlayer[0].pos.y - actor->obj.pos.y > -300.0f) && (gPlayer[0].pos.y - actor->obj.pos.y < 300.0f) &&
(gPlayer[0].pos.x - actor->obj.pos.x > -800.0f) && (gPlayer[0].pos.x - actor->obj.pos.x < 800.0f)) {
D_ctx_80178348 = D_ctx_80178340 = 255;
D_ctx_80178350 = D_ctx_80178354 = 0;
gFillScreenRed = gFillScreenAlpha = 255;
gFillScreenGreen = gFillScreenBlue = 0;
Player_ApplyDamage(&gPlayer[0], 0, 60);
}
Macbeth_801A015C(actor);
@ -1995,7 +1995,7 @@ bool Macbeth_801A0EB8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void*
gSPSetGeometryMode(gMasterDisp++, G_TEXTURE_GEN);
}
if ((limbIndex == 5) || (limbIndex == 9)) {
if (actor->iwork[7] & 1) {
if ((actor->iwork[7] % 2) != 0) {
RCP_SetupDL_27();
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
}
@ -2065,7 +2065,7 @@ void Macbeth_801A12C4(Actor* actor) {
switch (actor->obj.id) {
case OBJ_ACTOR_212:
if (actor->iwork[13] == 0) {
if (actor->iwork[7] & 1) {
if ((actor->iwork[7] % 2) != 0) {
RCP_SetupDL_27();
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
}
@ -2083,7 +2083,7 @@ void Macbeth_801A12C4(Actor* actor) {
Matrix_Translate(gGfxMatrix, 0.0f, 205.0f, 0.0f, 1);
Matrix_RotateZ(gGfxMatrix, actor->fwork[4] * M_DTOR, 1);
Matrix_SetGfxMtx(&gMasterDisp);
if (actor->iwork[7] & 1) {
if ((actor->iwork[7] % 2) != 0) {
RCP_SetupDL_27();
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
}
@ -2101,7 +2101,7 @@ void Macbeth_801A12C4(Actor* actor) {
if (actor->iwork[17] != 2) {
Matrix_Translate(gGfxMatrix, 0.0f, 5.0f, 0.0f, 1);
Matrix_SetGfxMtx(&gMasterDisp);
if (actor->iwork[8] & 1) {
if ((actor->iwork[8] % 2) != 0) {
RCP_SetupDL_27();
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
}
@ -2116,7 +2116,7 @@ void Macbeth_801A12C4(Actor* actor) {
if (actor->iwork[17] != 2) {
Matrix_Translate(gGfxMatrix, 0.0f, -15.0f, 0.0f, 1);
Matrix_SetGfxMtx(&gMasterDisp);
if (actor->iwork[8] & 1) {
if ((actor->iwork[8] % 2) != 0) {
RCP_SetupDL_27();
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
}
@ -2140,7 +2140,7 @@ void Macbeth_801A12C4(Actor* actor) {
Matrix_Translate(gGfxMatrix, 0.0f, -5.0f, 0.0f, 1);
Matrix_SetGfxMtx(&gMasterDisp);
RCP_SetupDL(&gMasterDisp, 0x39);
if (actor->iwork[7] & 1) {
if ((actor->iwork[7] % 2) != 0) {
RCP_SetupDL_27();
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
}
@ -2153,7 +2153,7 @@ void Macbeth_801A12C4(Actor* actor) {
break;
case OBJ_ACTOR_208:
if (actor->iwork[13] < 2) {
if (actor->iwork[7] & 1) {
if ((actor->iwork[7] % 2) != 0) {
RCP_SetupDL_27();
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
}
@ -2231,7 +2231,7 @@ void Macbeth_801A12C4(Actor* actor) {
Matrix_RotateY(gGfxMatrix, actor->fwork[26] * M_DTOR, 1);
Matrix_RotateX(gGfxMatrix, actor->fwork[29] * M_DTOR, 1);
Matrix_SetGfxMtx(&gMasterDisp);
if (actor->iwork[7] & 1) {
if ((actor->iwork[7] % 2) != 0) {
RCP_SetupDL_27();
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
}
@ -2256,7 +2256,7 @@ void Macbeth_801A12C4(Actor* actor) {
Matrix_RotateY(gGfxMatrix, actor->fwork[26] * M_DTOR, 1);
Matrix_RotateX(gGfxMatrix, actor->fwork[29] * M_DTOR, 1);
Matrix_SetGfxMtx(&gMasterDisp);
if (actor->iwork[9] & 1) {
if ((actor->iwork[9] % 2) != 0) {
RCP_SetupDL_27();
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
}
@ -3013,16 +3013,16 @@ void Macbeth_801A4B24(Actor* actor) {
actor->unk_0D0 = 0;
D_MA_801BE2F0[5] = 1;
D_ctx_80178310 = SEGMENTED_TO_VIRTUAL(D_enmy_800CFDA0[gCurrentLevel]);
gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]);
for (i = D_ctx_80177DC8 - 5, objInit = &D_ctx_80178310[i]; i < D_ctx_80177DC8 + 50; i++, objInit++) {
for (i = D_ctx_80177DC8 - 5, objInit = &gLevelObjects[i]; i < D_ctx_80177DC8 + 50; i++, objInit++) {
Object_Load(objInit, 40000.0f, -2000.0f, 40000.0f, -2000.0f);
}
D_ctx_80177DC8 = i;
D_ctx_8017796C = -1;
gPlayer[0].state_1C8 = PLAYERSTATE_1C8_7;
gPlayer[0].unk_1D0 = 0;
D_ctx_80177930 = 1;
gNextPlanetPath = 1;
actor->timer_0BC = 5;
actor->state = 6;
Audio_KillSfxBySourceAndId(gPlayer[0].sfxSource, 0x1100000A);
@ -3185,7 +3185,7 @@ void Macbeth_801A57D0(Effect* effect) {
if (effect->obj.pos.y < gGroundLevel) {
Macbeth_801ADCEC(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 999.9f, -10.0f, 5.0f);
Object_Kill(&effect->obj, effect->sfxSource);
if (D_ctx_80161A88 != 2) {
if (gGroundType != GROUNDTYPE_WATER) {
effect->obj.pos.y = gGroundLevel;
}
}
@ -3350,7 +3350,7 @@ void Macbeth_801A6144(Actor* actor) {
void Macbeth_801A6540(Actor* actor) {
RCP_SetupDL(&gMasterDisp, 0x39);
if (actor->timer_0C6 & 1) {
if ((actor->timer_0C6 % 2) != 0) {
RCP_SetupDL(&gMasterDisp, 0x3A);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
}
@ -3367,7 +3367,7 @@ void Macbeth_801A65E0(Object_80* obj80) {
void Macbeth_801A6608(Object_80* obj80) {
if ((gPlayer[0].unk_138 - obj80->obj.pos.z) < obj80->vel.z) {
if (D_ctx_80177854 != 100) {
if (gPlayState != PLAY_PAUSE) {
Math_SmoothStepToF(&obj80->vel.x, 30, 0.5f, 30.0f, 0.0f);
if (obj80->vel.x < 31.0f) {
obj80->vel.x = 255.0f;
@ -3754,7 +3754,7 @@ void Macbeth_801A7D98(Actor* actor) {
D_i5_801BE320[29] = 250;
D_i5_801BE320[9] = 200;
D_i5_801BE320[10] = 250;
actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_edata_800CBF34);
actor->info.hitbox = SEGMENTED_TO_VIRTUAL(gHitboxNone);
D_i5_801BE320[14] = 0;
D_i5_801BE320[15] = 0;
gBossFrameCount = 0;
@ -3968,7 +3968,7 @@ void Macbeth_801A7E7C(Actor* actor) {
AUDIO_PLAY_SFX(0x2902405E, actor->sfxSource, 4);
}
} else {
actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_edata_800CBF34);
actor->info.hitbox = SEGMENTED_TO_VIRTUAL(gHitboxNone);
if ((gPlayer[0].pos.y + 1200.0f) < actor->obj.pos.y) {
actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_603677C);
D_i5_801BE320[3] = 0;
@ -4012,7 +4012,7 @@ void Macbeth_801A7E7C(Actor* actor) {
break;
case 8:
Macbeth_8019A198(actor);
if (!(gGameFrameCount & 0xF)) {
if (((gGameFrameCount % 16) == 0)) {
AUDIO_PLAY_SFX(0x29036099, actor->sfxSource, 4);
}
Macbeth_801A74C4(actor);
@ -4043,7 +4043,7 @@ void Macbeth_801A7E7C(Actor* actor) {
if (D_i5_801BE320[29] <= 0) {
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1);
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = D_ctx_80178340 = 255;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 255;
AUDIO_PLAY_SFX(0x2940D09A, actor->sfxSource, 4);
Radio_PlayMessage(gMsg_ID_17450, RCID_BOSS_MACBETH);
func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f);
@ -4068,7 +4068,7 @@ void Macbeth_801A7E7C(Actor* actor) {
}
}
}
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
actor->obj.pos.x += D_i5_801BE368[12];
actor->obj.pos.y += D_i5_801BE368[13];
} else {
@ -4083,7 +4083,7 @@ void Macbeth_801A7E7C(Actor* actor) {
}
Math_SmoothStepToAngle(&actor->obj.rot.x, 0.0f, 0.1f, 20.0f, 0.01f);
Math_SmoothStepToAngle(&actor->obj.rot.y, 0.0f, 0.1f, 20.0f, 0.01f);
if (!(gGameFrameCount & 0x1F)) {
if (((gGameFrameCount % 32) == 0)) {
D_i5_801BE320[6] = 0;
D_i5_801BE320[8] = 0;
D_i5_801BE320[5] = 0;
@ -4117,7 +4117,7 @@ void Macbeth_801A7E7C(Actor* actor) {
1.0f);
actor->obj.rot.x += 10.0f;
actor->obj.rot.z += 10.0f;
if (!(gGameFrameCount & 7)) {
if (((gGameFrameCount % 8) == 0)) {
func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f);
func_effect_8007C688(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 5.0f, 8);
}
@ -4181,7 +4181,7 @@ void Macbeth_801A7E7C(Actor* actor) {
}
}
}
if (!(gGameFrameCount & 0x1F)) {
if (((gGameFrameCount % 32) == 0)) {
D_i5_801BE320[6] = 0;
D_i5_801BE320[8] = 0;
D_i5_801BE320[5] = 0;
@ -4367,7 +4367,7 @@ void Macbeth_801A7E7C(Actor* actor) {
AUDIO_PLAY_SFX(0x19006035, actor->sfxSource, 4);
actor->sfxSource[0] = actor->obj.pos.x;
}
if (!(gGameFrameCount & 1) && (D_i5_801BE320[15] == 0)) {
if (((gGameFrameCount % 2) == 0) && (D_i5_801BE320[15] == 0)) {
actor->vwork[6].x = actor->vwork[2].x + 80.0f;
actor->vwork[6].y = 0.0f;
actor->vwork[6].z = gPlayer[0].unk_138 + 50.0f;
@ -4470,7 +4470,7 @@ void Macbeth_801A7E7C(Actor* actor) {
if (actor->unk_0D0 != 0) {
gPlayer[0].shields = 0;
}
if (!(gGameFrameCount & 0xF)) {
if (((gGameFrameCount % 16) == 0)) {
func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f);
}
D_i5_801BE368[9] = gPlayer[0].pos.x;
@ -4761,7 +4761,7 @@ bool Macbeth_801ABC14(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void*
switch (limbIndex) {
case 14:
if (actor->iwork[7] & 1) {
if ((actor->iwork[7] % 2) != 0) {
RCP_SetupDL(&gMasterDisp, 0x1C);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
}
@ -4776,7 +4776,7 @@ bool Macbeth_801ABC14(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void*
case 18:
case 19:
case 20:
if (actor->iwork[8] & 1) {
if ((actor->iwork[8] % 2) != 0) {
RCP_SetupDL(&gMasterDisp, 0x1C);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
}
@ -4788,7 +4788,7 @@ bool Macbeth_801ABC14(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void*
break;
}
if (actor->iwork[9] & 1) {
if ((actor->iwork[9] % 2) != 0) {
RCP_SetupDL(&gMasterDisp, 0x1C);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
}
@ -4901,7 +4901,7 @@ void Macbeth_801AC754(Player* player) {
f32 sp4C;
f32 sp48;
f32 sp44;
ObjectInit* var_s0;
ObjectInit* objInit;
s32 i;
f32 zeroVar = 0.0f;
@ -4913,19 +4913,19 @@ void Macbeth_801AC754(Player* player) {
switch (player->unk_1D0) {
case 0:
var_s0 = D_ctx_80178310 = SEGMENTED_TO_VIRTUAL(D_MA_6035678);
objInit = gLevelObjects = SEGMENTED_TO_VIRTUAL(D_MA_6035678);
for (i = 0; var_s0->id != OBJ_INVALID; i++, var_s0++) {
Object_Load(var_s0, 4000.0f, -4000.0f, 4000.0f, -4000.0f);
for (i = 0; objInit->id != OBJ_INVALID; i++, objInit++) {
Object_Load(objInit, 4000.0f, -4000.0f, 4000.0f, -4000.0f);
}
var_s0 = D_ctx_80178310 = SEGMENTED_TO_VIRTUAL(D_enmy_800CFDA0[gCurrentLevel]);
objInit = gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]);
for (i = 0; i < 40; i++, var_s0++) {
Object_Load(var_s0, 4000.0f, -4000.0f, 4000.0f, -4000.0f);
for (i = 0; i < 40; i++, objInit++) {
Object_Load(objInit, 4000.0f, -4000.0f, 4000.0f, -4000.0f);
}
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = D_ctx_80178340 = 255;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 255;
player->unk_144 -= 800.0f;
player->unk_1D0 = 1;
D_i5_801BE24C = 8.0f;
@ -4945,18 +4945,18 @@ void Macbeth_801AC754(Player* player) {
player->camAt.z = gCsCamAtZ = -800.0f;
player->unk_240 = 1;
player->unk_1D0 = 2;
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255;
D_ctx_80178340 = 255;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255;
gFillScreenAlpha = 255;
Macbeth_801ACF6C();
/* fallthrough */
case 2:
if (gCsFrameCount < 30) {
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255;
D_ctx_80178340 = 255;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255;
gFillScreenAlpha = 255;
}
if ((gCsFrameCount < 60) && !(gCsFrameCount & 0xF)) {
if ((gCsFrameCount < 60) && ((gCsFrameCount % 16U) == 0)) {
Macbeth_801ACF6C();
} else if ((gCsFrameCount < 100) && !(gCsFrameCount & 0x1F)) {
} else if ((gCsFrameCount < 100) && ((gCsFrameCount % 32) == 0)) {
Macbeth_801ACF6C();
}
if (gCsFrameCount > 50) {
@ -4989,7 +4989,7 @@ void Macbeth_801AC754(Player* player) {
break;
case 3:
AUDIO_PLAY_BGM(SEQ_ID_MACBETH | SEQ_FLAG);
D_ctx_80177838 = 50;
gLevelStatusScreenTimer = 50;
player->state_1C8 = PLAYERSTATE_1C8_3;
player->unk_1D0 = player->timer_1F8 = player->timer_1FC = player->unk_240 = 0;
player->unk_0D4 = 3.0f;
@ -5054,18 +5054,18 @@ void Macbeth_801ACF6C(void) {
}
void Macbeth_801ACFBC(void) {
ObjectInit* var_s0;
ObjectInit* objInit;
for (var_s0 = D_ctx_80178310 = SEGMENTED_TO_VIRTUAL(D_MA_60357CC); var_s0->id != OBJ_INVALID; var_s0++) {
Object_Load(var_s0, 4000.0f, -4000.0f, 4000.0f, -4000.0f);
for (objInit = gLevelObjects = SEGMENTED_TO_VIRTUAL(D_MA_60357CC); objInit->id != OBJ_INVALID; objInit++) {
Object_Load(objInit, 4000.0f, -4000.0f, 4000.0f, -4000.0f);
}
}
void Macbeth_801AD080(void) {
ObjectInit* var_s0;
ObjectInit* objInit;
for (var_s0 = D_ctx_80178310 = SEGMENTED_TO_VIRTUAL(D_MA_6035920); var_s0->id != OBJ_INVALID; var_s0++) {
Object_Load(var_s0, 4000.0f, -4000.0f, 4000.0f, -4000.0f);
for (objInit = gLevelObjects = SEGMENTED_TO_VIRTUAL(D_MA_6035920); objInit->id != OBJ_INVALID; objInit++) {
Object_Load(objInit, 4000.0f, -4000.0f, 4000.0f, -4000.0f);
}
}
@ -5087,7 +5087,7 @@ void Macbeth_801AD144(PlayerShot* playerShot) {
for (i = 0; i < 60; i++, actor++) {
if ((actor->obj.status == OBJ_ACTIVE) && (actor->timer_0C2 == 0) && (actor->obj.id >= OBJ_ACTOR_205) &&
(actor->obj.id <= OBJ_ACTOR_213)) {
temp_s6 = gGameFrameCount & 7;
temp_s6 = gGameFrameCount % 8U;
var_s1 = &actor->info.hitbox[0];
temp_ft3 = var_s1[0];
var_s1++;
@ -5337,7 +5337,7 @@ void Macbeth_801ADD68(Actor* actor) {
actor->state = 1;
}
if (actor->obj.pos.y < (gGroundLevel + 800.0f)) {
if (actor->iwork[0] >= 11) {
if (actor->iwork[0] > 10) {
actor->iwork[0] -= 10;
} else if (actor->iwork[0] > 0) {
actor->iwork[0] -= 1;
@ -5345,7 +5345,7 @@ void Macbeth_801ADD68(Actor* actor) {
}
break;
case 1:
if (actor->iwork[0] >= 11) {
if (actor->iwork[0] > 10) {
actor->iwork[0] -= 10;
} else if (actor->iwork[0] > 0) {
actor->iwork[0] -= 1;
@ -5396,7 +5396,7 @@ void Macbeth_801AE2C0(Actor* actor) {
gDPSetEnvColor(gMasterDisp++, 0, 0, 0, actor->iwork[0]);
} else {
RCP_SetupDL(&gMasterDisp, 0x17);
if (actor->iwork[7] & 1) {
if ((actor->iwork[7] % 2) != 0) {
RCP_SetupDL_27();
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
}
@ -5576,7 +5576,7 @@ void Macbeth_801AEC04(Actor* actor) {
actor->fwork[2] += 0.1f;
}
if (!(gGameFrameCount & 0xF)) {
if (((gGameFrameCount % 16) == 0)) {
func_effect_8007C120(actor->obj.pos.x - 35.0f, actor->obj.pos.y + 15.0f, actor->obj.pos.z, -3.0f, 0.0f,
0.0f, 0.1f, 20);
func_effect_8007C120(actor->obj.pos.x + 35.0f, actor->obj.pos.y + 15.0f, actor->obj.pos.z, 3.0f, 0.0f,
@ -5586,7 +5586,7 @@ void Macbeth_801AEC04(Actor* actor) {
default:
break;
}
if (gGameFrameCount & 1) {
if ((gGameFrameCount % 2) != 0) {
actor->fwork[1] = 255.0f;
} else {
actor->fwork[1] = 32.0f;
@ -5768,7 +5768,7 @@ void Macbeth_801AF70C(f32 xPos, f32 yPos, f32 zPos, f32 arg3) {
effect->unk_60.x = RAND_FLOAT_CENTERED(30.0f);
effect->unk_60.y = RAND_FLOAT_CENTERED(30.0f);
effect->unk_60.z = RAND_FLOAT_CENTERED(30.0f);
effect->unk_44 = i & 3;
effect->unk_44 = i % 4U;
Object_SetInfo(&effect->info, effect->obj.id);
}
}
@ -5860,8 +5860,8 @@ void Macbeth_801AF8F4(Player* player) {
player->pos.y = -3.0f;
player->pos.z = player->unk_138 = -111130.0f;
player->unk_144 = D_ctx_80177D20 = 115930.0f;
player->flags_228 = 0x10;
D_enmy_80161680 = 330;
player->flags_228 = PFLAG_228_4;
gLastPathChange = OBJ_ITEM_PATH_TURN_RIGHT;
D_i5_801BA1DC = 0.0f;
gActors[D_i5_801BE314].obj.pos.x = -431.0f;
gActors[D_i5_801BE314].obj.pos.y = 0.0f;
@ -5940,9 +5940,9 @@ void Macbeth_801AF8F4(Player* player) {
break;
case 4:
if (gCsFrameCount == 403) {
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255;
D_ctx_80178358 = 255;
D_ctx_8017835C = 20;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255;
gFillScreenAlphaTarget = 255;
gFillScreenAlphaStep = 20;
}
if (gCsFrameCount == 416) {
player->unk_1D0++;
@ -5965,8 +5965,8 @@ void Macbeth_801AF8F4(Player* player) {
player->unk_0B8 = 10014.0f;
player->timer_210 = 1000;
player->unk_0B4 = 0.0f;
D_ctx_80178358 = 0;
D_ctx_8017835C = 127;
gFillScreenAlphaTarget = 0;
gFillScreenAlphaStep = 127;
}
break;
case 5:
@ -5994,7 +5994,7 @@ void Macbeth_801AF8F4(Player* player) {
gActors[D_i5_801BE314].vel.y, 0.0f, 0.2f, 10);
} else {
player->vel.z = 0.0f;
if (!(gGameFrameCount & 0xF)) {
if (((gGameFrameCount % 16) == 0)) {
gFogRed -= 1;
gFogGreen -= 1;
gFogBlue -= 2;
@ -6050,14 +6050,14 @@ void Macbeth_801AF8F4(Player* player) {
case 6:
Math_SmoothStepToF(&D_ctx_80177A48[4], -60.0f, 1.0f, 0.5f, 0.0f);
Math_SmoothStepToF(&D_ctx_80177A48[5], 240.0f, 1.0f, 2.0f, 0.0f);
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
func_effect_8007797C(11000.0f, 200.0f, -139000.0f, D_ctx_80177A48[4], 4.0f, D_ctx_80177A48[5], 20.0f);
}
if (gCsFrameCount == 710) {
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = D_ctx_80178340 = 255;
D_ctx_80178358 = 0;
D_ctx_8017835C = 128;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 255;
gFillScreenAlphaTarget = 0;
gFillScreenAlphaStep = 128;
func_effect_8007D9DC(gActors[D_i5_801BE314].obj.pos.x + 1000.0f,
gActors[D_i5_801BE314].obj.pos.y + 20.0f, -138500.0f, 100.0f, 1000.0f, 0);
func_effect_8007A568(gActors[D_i5_801BE314].obj.pos.x + 200.0f,
@ -6075,22 +6075,22 @@ void Macbeth_801AF8F4(Player* player) {
gActors[D_i5_801BE314].obj.pos.y + 500.0f + RAND_FLOAT_CENTERED(700.0f),
gActors[D_i5_801BE314].obj.pos.z + 3000.0f + RAND_FLOAT_CENTERED(700.0f), 30.0f);
}
if ((gCsFrameCount > 710) && !(gGameFrameCount & 7)) {
if ((gCsFrameCount > 710) && ((gGameFrameCount % 8) == 0)) {
func_effect_8007D0E0(gActors[D_i5_801BE314].obj.pos.x + 500.0f + RAND_FLOAT_CENTERED(700.0f),
gActors[D_i5_801BE314].obj.pos.y + 500.0f + RAND_FLOAT_CENTERED(700.0f),
gActors[D_i5_801BE314].obj.pos.z + 3000.0f + RAND_FLOAT_CENTERED(700.0f), 30.0f);
}
if ((gCsFrameCount > 725) && !(gGameFrameCount & 7)) {
if ((gCsFrameCount > 725) && ((gGameFrameCount % 8) == 0)) {
func_effect_8007D0E0(gActors[D_i5_801BE314].obj.pos.x - 1500.0f + RAND_FLOAT_CENTERED(700.0f),
gActors[D_i5_801BE314].obj.pos.y + 1000.0f + RAND_FLOAT_CENTERED(700.0f),
gActors[D_i5_801BE314].obj.pos.z + 1700.0f + RAND_FLOAT_CENTERED(700.0f), 30.0f);
}
if ((gCsFrameCount > 740) && !(gGameFrameCount & 7)) {
if ((gCsFrameCount > 740) && ((gGameFrameCount % 8) == 0)) {
func_effect_8007D0E0(gActors[D_i5_801BE314].obj.pos.x - 3500.0f + RAND_FLOAT_CENTERED(700.0f),
gActors[D_i5_801BE314].obj.pos.y + 600.0f + RAND_FLOAT_CENTERED(700.0f),
gActors[D_i5_801BE314].obj.pos.z + 1200.0f + RAND_FLOAT_CENTERED(700.0f), 30.0f);
}
if ((gCsFrameCount > 755) && !(gGameFrameCount & 7)) {
if ((gCsFrameCount > 755) && ((gGameFrameCount % 8) == 0)) {
func_effect_8007D0E0(gActors[D_i5_801BE314].obj.pos.x - 3000.0f + RAND_FLOAT_CENTERED(700.0f),
gActors[D_i5_801BE314].obj.pos.y + 400.0f + RAND_FLOAT_CENTERED(700.0f),
gActors[D_i5_801BE314].obj.pos.z + 1300.0f + RAND_FLOAT_CENTERED(700.0f), 30.0f);
@ -6178,9 +6178,9 @@ void Macbeth_801AF8F4(Player* player) {
if (gCsFrameCount == 880) {
D_80137E84[0] = 1;
D_Timer_80177BD0[0] = 10;
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255;
D_ctx_80178358 = 255;
D_ctx_8017835C = 20;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255;
gFillScreenAlphaTarget = 255;
gFillScreenAlphaStep = 20;
AUDIO_PLAY_SFX(0x2940F026, gActors[D_i5_801BE314].sfxSource, 4);
gBossActive = D_ctx_80178488 = 0;
}
@ -6190,9 +6190,9 @@ void Macbeth_801AF8F4(Player* player) {
player->pos.z = player->unk_138 = -(D_ctx_80177D20 + 210.0f);
player->pos.x = player->unk_0AC;
func_effect_8007A568(player->pos.x - 1800.0f, -50.0f, player->pos.z + 5000.0f, 40.0f);
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = D_ctx_80178340 = 255;
D_ctx_80178358 = 0;
D_ctx_8017835C = 8;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 255;
gFillScreenAlphaTarget = 0;
gFillScreenAlphaStep = 8;
D_ctx_80177A48[0] = 0.0f;
player->unk_234 = 1;
player->camAt.x = gCsCamAtX = player->camEye.x = gCsCamEyeX = player->pos.x;
@ -6200,7 +6200,7 @@ void Macbeth_801AF8F4(Player* player) {
player->camEye.y = gCsCamEyeY = player->pos.y + 30.0f;
player->camEye.z = gCsCamEyeZ = (player->unk_138 + D_ctx_80177D20) - 300.0f;
player->camAt.z = gCsCamAtZ = player->unk_138 + D_ctx_80177D20;
player->unk_198 = player->timer_210 = 0;
player->savedCockpitView = player->timer_210 = 0;
player->unk_190 = player->unk_194 = player->unk_188 = player->unk_18C = player->unk_118 =
player->unk_114 = player->unk_4D8 = player->unk_034 = player->unk_174 = player->unk_178 =
player->unk_17C = player->unk_180 = player->unk_184 = player->wings.unk_04 = player->unk_170 =
@ -6219,7 +6219,7 @@ void Macbeth_801AF8F4(Player* player) {
}
break;
case 7:
if (!(gGameFrameCount & 3)) {
if (((gGameFrameCount % 4) == 0)) {
func_effect_8007D0E0(player->pos.x - 1750.0f + RAND_FLOAT_CENTERED(700.0f), 10.0f,
player->pos.z + 5000.0f + RAND_FLOAT_CENTERED(700.0f), 5.0f);
func_effect_8007C85C(player->pos.x - 1800.0f + RAND_FLOAT_CENTERED(40.0f), -100.0f,
@ -6278,7 +6278,7 @@ void Macbeth_801AF8F4(Player* player) {
switch (gCsFrameCount) {
case 973:
D_ctx_80177840 = 100;
gLevelClearScreenTimer = 100;
break;
case 340:
Radio_PlayMessage(gMsg_ID_17471, RCID_BOSS_MACBETH);
@ -6303,12 +6303,12 @@ void Macbeth_801AF8F4(Player* player) {
Radio_PlayMessage(gMsg_ID_20010, RCID_FOX);
break;
case 1060:
if (gTeamShields[2] > 0) {
if (gTeamShields[TEAM_ID_SLIPPY] > 0) {
Macbeth_801AF27C(&gActors[5], 0);
}
break;
case 1130:
switch (gTeamShields[2]) {
switch (gTeamShields[TEAM_ID_SLIPPY]) {
case 0:
Radio_PlayMessage(gMsg_ID_20345, RCID_ROB64);
break;
@ -6321,7 +6321,7 @@ void Macbeth_801AF8F4(Player* player) {
}
break;
case 1240:
if (gTeamShields[3] > 0) {
if (gTeamShields[TEAM_ID_PEPPY] > 0) {
Macbeth_801AF27C(&gActors[6], 1);
}
break;
@ -6329,7 +6329,7 @@ void Macbeth_801AF8F4(Player* player) {
D_i5_801BA888 = 220.0f;
break;
case 1350:
switch (gTeamShields[3]) {
switch (gTeamShields[TEAM_ID_PEPPY]) {
case 0:
Radio_PlayMessage(gMsg_ID_20344, RCID_ROB64);
break;
@ -6355,12 +6355,12 @@ void Macbeth_801AF8F4(Player* player) {
}
break;
case 1640:
if (gTeamShields[1] > 0) {
if (gTeamShields[TEAM_ID_FALCO] > 0) {
Macbeth_801AF27C(&gActors[7], 2);
}
break;
case 1660:
switch (gTeamShields[1]) {
switch (gTeamShields[TEAM_ID_FALCO]) {
case 0:
Radio_PlayMessage(gMsg_ID_20340, RCID_ROB64);
break;
@ -6384,7 +6384,7 @@ void Macbeth_801AF8F4(Player* player) {
break;
case 1960:
Macbeth_801AF27C(&gActors[3], 3);
gActors[3].info.hitbox = SEGMENTED_TO_VIRTUAL(D_edata_800CBF34);
gActors[3].info.hitbox = SEGMENTED_TO_VIRTUAL(gHitboxNone);
break;
case 2017:
D_ctx_80177830 = 0;
@ -6433,9 +6433,9 @@ void Macbeth_801AF8F4(Player* player) {
player->camEye.y += gCameraShakeY * 10.0f;
}
if (gCsFrameCount > 2500) {
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0;
D_ctx_80178358 = 255;
if (D_ctx_80178340 == 255) {
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0;
gFillScreenAlphaTarget = 255;
if (gFillScreenAlpha == 255) {
player->state_1C8 = PLAYERSTATE_1C8_6;
D_ctx_8017837C = 4;
func_play_800A6148();
@ -6701,8 +6701,8 @@ void Macbeth_801B38E0(void) {
}
for (i = 0; i < 40; i++) {
gObjects4C[i].obj.status = OBJ_FREE;
Object_4C_Initialize(&gObjects4C[i]);
gSprites[i].obj.status = OBJ_FREE;
Sprite_Initialize(&gSprites[i]);
}
for (i = 0; i < 60; i++) {
@ -6731,12 +6731,12 @@ void Macbeth_801B38E0(void) {
}
D_ctx_801782B8 = D_ctx_801782BC = D_ctx_801782C0 = D_ctx_801782D0 = gBossActive = D_ctx_8017828C = D_ctx_8017812C =
D_ctx_80177E70 = D_ctx_80177E78 = D_ctx_80177E80 = 0;
D_ctx_80177E70 = D_ctx_80177E78 = gRingPassCount = 0;
D_ctx_80177F10.x = D_ctx_80177F10.y = D_ctx_80177F10.z = D_ctx_80177E88.x = D_ctx_80177E88.y = D_ctx_80177E88.z =
0.0f;
for (i = 0; i < 10; i++) {
D_ctx_80177E98[i].x = D_ctx_80177E98[i].y = D_ctx_80177E98[i].z = 100.0f;
gTeamArrowsViewPos[i].x = gTeamArrowsViewPos[i].y = gTeamArrowsViewPos[i].z = 100.0f;
}
for (i = 0; i < 2; i++) {
@ -6761,10 +6761,10 @@ void Macbeth_801B3D04(Player* player) {
D_i5_801BA894[2] = D_i5_801BA894[4];
D_i5_801BA894[1] = D_i5_801BA894[4];
D_i5_801BA894[0] = D_i5_801BA894[4];
D_ctx_80178348 = 255;
D_ctx_80178350 = 255;
D_ctx_80178354 = 255;
D_ctx_80178340 = D_ctx_80178358 = D_ctx_80177A10[9] = 0;
gFillScreenRed = 255;
gFillScreenGreen = 255;
gFillScreenBlue = 255;
gFillScreenAlpha = gFillScreenAlphaTarget = D_ctx_80177A10[9] = 0;
D_ctx_80177A48[0] = 0.0f;
player->unk_1D0++;
/* fallthrough */
@ -6784,16 +6784,16 @@ void Macbeth_801B3D04(Player* player) {
gCsCamAtX = player->pos.x;
gCsCamAtY = player->pos.y + 30.0f;
gCsCamAtZ = player->pos.z + player->unk_144;
D_ctx_80178348 = 255;
D_ctx_80178350 = 255;
D_ctx_80178354 = 255;
gFillScreenRed = 255;
gFillScreenGreen = 255;
gFillScreenBlue = 255;
if (D_ctx_80177A10[9] >= 248) {
D_ctx_80177A10[9] = 255;
} else {
D_ctx_80177A10[9] += 8;
}
D_ctx_80178340 = D_ctx_80178358 = D_ctx_80177A10[9];
if (gCsFrameCount >= 41) {
gFillScreenAlpha = gFillScreenAlphaTarget = D_ctx_80177A10[9];
if (gCsFrameCount > 40) {
D_ctx_80177A10[9] = 255;
player->camEye.x = gCsCamEyeX = 0.0f;
player->camEye.y = gCsCamEyeY = 21.182106f;
@ -6824,11 +6824,11 @@ void Macbeth_801B3D04(Player* player) {
D_i5_801BE240 = 2.0f;
D_i5_801BE244 = 2.0f;
D_i5_801BE248 = 2.0f;
if (gCsFrameCount >= 86) {
D_ctx_80178358 = D_ctx_80178340 = D_ctx_80177A10[9];
if (gCsFrameCount > 85) {
gFillScreenAlphaTarget = gFillScreenAlpha = D_ctx_80177A10[9];
D_ctx_80177A10[9] -= 10;
if (D_ctx_80177A10[9] < 11) {
D_ctx_80178358 = D_ctx_80178340 = 0;
gFillScreenAlphaTarget = gFillScreenAlpha = 0;
player->unk_1D0 = 10;
}
}
@ -6890,18 +6890,18 @@ void Macbeth_801B3D04(Player* player) {
AUDIO_PLAY_BGM(SEQ_ID_GOOD_END);
break;
case 100:
D_ctx_80177840 = 100;
gLevelClearScreenTimer = 100;
break;
case 160:
Radio_PlayMessage(gMsg_ID_20010, RCID_FOX);
break;
case 230:
if (gTeamShields[2] > 0.0f) {
if (gTeamShields[TEAM_ID_SLIPPY] > 0.0f) {
Macbeth_801B3554(&gActors[0], 0);
}
break;
case 260:
switch (gTeamShields[2]) {
switch (gTeamShields[TEAM_ID_SLIPPY]) {
case 0:
Radio_PlayMessage(gMsg_ID_20345, RCID_ROB64);
break;
@ -6914,12 +6914,12 @@ void Macbeth_801B3D04(Player* player) {
}
break;
case 380:
if (gTeamShields[3] > 0.0f) {
if (gTeamShields[TEAM_ID_PEPPY] > 0.0f) {
Macbeth_801B3554(&gActors[1], 1);
}
break;
case 410:
switch (gTeamShields[3]) {
switch (gTeamShields[TEAM_ID_PEPPY]) {
case 0:
Radio_PlayMessage(gMsg_ID_20344, RCID_ROB64);
break;
@ -6932,12 +6932,12 @@ void Macbeth_801B3D04(Player* player) {
}
break;
case 530:
if (gTeamShields[1] > 0.0f) {
if (gTeamShields[TEAM_ID_FALCO] > 0.0f) {
Macbeth_801B3554(&gActors[2], 2);
}
break;
case 560:
switch (gTeamShields[1]) {
switch (gTeamShields[TEAM_ID_FALCO]) {
case 0:
Radio_PlayMessage(gMsg_ID_20340, RCID_ROB64);
break;
@ -6994,7 +6994,7 @@ void Macbeth_801B3D04(Player* player) {
Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_ctx_80177A48[0], D_i5_801BE248, 0.0f);
player->camAt.y += zeroVar;
if ((gCsFrameCount >= 850) && !(gGameFrameCount & 0xF)) {
if ((gCsFrameCount >= 850) && ((gGameFrameCount % 16) == 0)) {
Macbeth_801ACF6C();
}
if (gCsFrameCount == 1220) {
@ -7002,9 +7002,9 @@ void Macbeth_801B3D04(Player* player) {
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 60);
}
if (gCsFrameCount > 1280) {
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0;
D_ctx_80178358 = 255;
if (D_ctx_80178340 == 255) {
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0;
gFillScreenAlphaTarget = 255;
if (gFillScreenAlpha == 255) {
player->state_1C8 = PLAYERSTATE_1C8_6;
D_ctx_8017837C = 4;
func_play_800A6148();

View File

@ -213,9 +213,9 @@ void Titania_80189380(Actor* actor) {
sp5C.y = 0.0f;
sp5C.z = 70.0f;
func_effect_8007EE68(0x161, &sp80, &sp74, &sp68, &sp5C, 1.0f);
func_effect_8007EE68(OBJ_EFFECT_353, &sp80, &sp74, &sp68, &sp5C, 1.0f);
sp80.y += 20.0f;
func_effect_8007EE68(0x161, &sp80, &sp74, &sp68, &sp5C, 1.0f);
func_effect_8007EE68(OBJ_EFFECT_353, &sp80, &sp74, &sp68, &sp5C, 1.0f);
}
static Vec3f D_i5_801B752C = { -50.0f, 0.0f, -20.0f };
@ -284,7 +284,7 @@ void Titania_801895B8(Actor* actor) {
Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0);
Matrix_Push(&gCalcMatrix);
if (!(actor->iwork[2] & 1) && ((actor->obj.pos.z + D_ctx_80177D20) > -3800.0f)) {
if (((actor->iwork[2] % 2) == 0) && ((actor->obj.pos.z + D_ctx_80177D20) > -3800.0f)) {
Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1);
Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, 1);
Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_i5_801B752C, &sp48);
@ -314,7 +314,7 @@ void Titania_801895B8(Actor* actor) {
} else {
actor->itemDrop = DROP_NONE;
}
func_enmy_80066254(actor);
Actor_Despawn(actor);
actor->info.bonus = 0;
func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y + 30.0f, actor->obj.pos.z, 8.0f);
func_effect_8007C120(actor->obj.pos.x, actor->obj.pos.y + 30.0f, actor->obj.pos.z, actor->vel.x, actor->vel.y,
@ -366,7 +366,7 @@ void Titania_80189CC8(Actor* actor) {
AUDIO_PLAY_SFX(0x2903A008, actor->sfxSource, 4);
actor->timer_0CA[0] = actor->itemDrop = 0;
actor->info.unk_1C = 0.0f;
func_enmy_80066254(actor);
Actor_Despawn(actor);
actor->info.bonus = 0;
actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_TI_6006924);
func_effect_8007D0E0(actor->fwork[0], actor->fwork[1], actor->fwork[2], 2.0f);
@ -416,12 +416,13 @@ void Titania_80189CC8(Actor* actor) {
sp40.z = 0.0f;
if ((actor->timer_0BC < 15) && ((actor->timer_0BC % 7) == 0)) {
func_effect_8007EE68(0x161, (Vec3f*) &actor->fwork[0], &sp40, &actor->obj.rot, &D_i5_801B755C, 1.0f);
func_effect_8007EE68(OBJ_EFFECT_353, (Vec3f*) &actor->fwork[0], &sp40, &actor->obj.rot, &D_i5_801B755C,
1.0f);
if (actor->timer_0BC == 0) {
actor->timer_0BC = 90;
}
}
} else if (!(gGameFrameCount & 7) && (Rand_ZeroOne() < 0.5f)) {
} else if (((gGameFrameCount % 8) == 0) && (Rand_ZeroOne() < 0.5f)) {
AUDIO_PLAY_SFX(0x11000027, actor->sfxSource, 4);
func_effect_8007C120(actor->fwork[0], actor->fwork[1], actor->fwork[2], 0.0f, 0.0f, 0.0f, 0.1f, 7);
actor->timer_0C6 = 4;
@ -517,7 +518,7 @@ void Titania_8018A544(Actor* actor) {
Titania_8018A474(actor);
actor->itemDrop = DROP_NONE;
}
func_enmy_80066254(actor);
Actor_Despawn(actor);
actor->info.bonus = 0;
}
Object_Kill(&actor->obj, actor->sfxSource);
@ -634,7 +635,7 @@ void Titania_8018AB44(Actor* actor) {
case 2:
actor->itemDrop = DROP_NONE;
func_enmy_80066254(actor);
Actor_Despawn(actor);
actor->info.bonus = 0;
func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y + 10.0f, actor->obj.pos.z, 6.0f);
func_effect_8007A6F0(&actor->obj.pos, 0x2903B009);
@ -783,7 +784,7 @@ void Titania_8018B268(Actor* actor) {
actor->health -= actor->damage;
if (actor->health <= 0) {
actor->health = actor->itemDrop = 0;
func_enmy_80066254(actor);
Actor_Despawn(actor);
actor->info.bonus = 0;
}
}
@ -997,7 +998,7 @@ void Titania_8018B9D0(Actor* actor) {
actor->fwork[2] = sp48;
if (actor->vel.y <= 0.0f) {
actor->itemDrop = DROP_NONE;
func_enmy_80066254(actor);
Actor_Despawn(actor);
func_effect_8007A6F0(&actor->obj.pos, 0x2903B009);
func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f);
Object_Kill(&actor->obj, actor->sfxSource);
@ -1316,7 +1317,7 @@ void Titania_8018C8A8(Actor* actor) {
BonusText_Display(actor->obj.pos.x, actor->obj.pos.y, actor->fwork[27] + actor->obj.pos.z, 3);
gHitCount += 3;
actor->health = actor->itemDrop = 0;
func_enmy_80066254(actor);
Actor_Despawn(actor);
actor->info.bonus = 0;
actor->timer_0BC = 20;
actor->unk_0B6 = 0;
@ -1557,7 +1558,7 @@ void Titania_8018C8A8(Actor* actor) {
AUDIO_PLAY_SFX(0x19030003, actor->sfxSource, 4);
}
if (!(actor->timer_0BC & 7)) {
if ((actor->timer_0BC % 8) == 0) {
Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0);
Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1);
Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, 1);
@ -1666,9 +1667,9 @@ void Titania_8018C8A8(Actor* actor) {
break;
case 4:
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = D_ctx_80178340 = 255;
D_ctx_80178358 = 0;
D_ctx_8017835C = 64;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 255;
gFillScreenAlphaTarget = 0;
gFillScreenAlphaStep = 64;
break;
case 5:
@ -1691,7 +1692,7 @@ void Titania_8018C8A8(Actor* actor) {
void Titania_8018E2D8(Actor* actor) {
f32 sp34;
if (actor->iwork[6] & 1) {
if ((actor->iwork[6] % 2) != 0) {
RCP_SetupDL(&gMasterDisp, 0x1F);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 127, 0, 0, 255);
gDPSetEnvColor(gMasterDisp++, 255, 255, 255, 255);
@ -1748,7 +1749,7 @@ void Titania_8018E3CC(Actor* actor) {
void Titania_8018E54C(Actor* actor) {
actor->iwork[1]++;
if ((actor->iwork[0] == (uintptr_t) NULL) && !(actor->iwork[1] & 3)) {
if ((actor->iwork[0] == (uintptr_t) NULL) && ((actor->iwork[1] & 3) == 0)) {
func_effect_8007C120(actor->fwork[0], actor->fwork[1], actor->fwork[2], 0.0f, 0.0f, 0.0f, 0.0625f, 10);
}
}
@ -1887,7 +1888,7 @@ void Titania_8018E5F8(Actor* actor) {
gHitCount += 2;
actor->timer_0CA[0] = actor->health = actor->itemDrop = 0;
actor->info.unk_1C = 0.0f;
func_enmy_80066254(actor);
Actor_Despawn(actor);
actor->info.bonus = 0;
((Actor*) actor->iwork[4])->iwork[0] = 0;
actor->iwork[5] = 0;
@ -1979,7 +1980,7 @@ void Titania_8018E5F8(Actor* actor) {
void Titania_8018EF14(Actor* actor) {
gSPDisplayList(gMasterDisp++, D_TI1_7008930);
if (!(actor->timer_0C6 & 1)) {
if ((actor->timer_0C6 % 2) == 0) {
RCP_SetupDL(&gMasterDisp, 0x22);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 220, 220, 220, 255);
} else {
@ -1989,22 +1990,22 @@ void Titania_8018EF14(Actor* actor) {
gSPDisplayList(gMasterDisp++, D_TI1_7009510);
}
void Titania_8018EFF0(Object_4C* obj4C) {
void Titania_8018EFF0(Sprite* sprite) {
f32 sp24;
f32 sp20;
Ground_801B6E20(obj4C->obj.pos.x, obj4C->obj.pos.z + D_ctx_80177D20, &sp20, &sp24, &sp20);
obj4C->obj.pos.y = sp24;
Ground_801B6E20(sprite->obj.pos.x, sprite->obj.pos.z + D_ctx_80177D20, &sp20, &sp24, &sp20);
sprite->obj.pos.y = sp24;
}
void Titania_8018F038(Object_4C* obj4C) {
obj4C->obj.rot.y =
Math_Atan2F(gPlayer[0].camEye.x - obj4C->obj.pos.x, gPlayer[0].camEye.z - (obj4C->obj.pos.z + D_ctx_80177D20)) *
M_RTOD;
if (obj4C->unk_46 != 0) {
func_effect_8007D074(obj4C->obj.pos.x, obj4C->obj.pos.y + 96.0f, obj4C->obj.pos.z, 4.0f);
obj4C->obj.status = OBJ_FREE;
func_effect_8007A6F0(&obj4C->obj.pos, 0x1903400F);
void Titania_Cactus_Update(Sprite* sprite) {
sprite->obj.rot.y = Math_Atan2F(gPlayer[0].camEye.x - sprite->obj.pos.x,
gPlayer[0].camEye.z - (sprite->obj.pos.z + D_ctx_80177D20)) *
M_RTOD;
if (sprite->unk_46 != 0) {
func_effect_8007D074(sprite->obj.pos.x, sprite->obj.pos.y + 96.0f, sprite->obj.pos.z, 4.0f);
sprite->obj.status = OBJ_FREE;
func_effect_8007A6F0(&sprite->obj.pos, 0x1903400F);
}
}
@ -2179,33 +2180,33 @@ void Titania_8018F8B8(Object_80* obj80) {
}
}
void Titania_Boss306_Init(Boss* boss) {
void Titania_Boss306_Init(Boss306* this) {
s32 pad[2];
f32* sp1C;
s32 i;
s32* var_a1_2;
UnkStruct_i5_801BBF00* var_v1;
if (boss->swork[0] < 4) {
boss->swork[0]++;
gOverlayStage = boss->swork[0];
boss->timer_050 = 1;
if (this->swork[0] < 4) {
this->swork[0]++;
gOverlayStage = this->swork[0];
this->timer_050 = 1;
}
if (boss->timer_050 != 0) {
boss->obj.status = OBJ_INIT;
if (this->timer_050 != 0) {
this->obj.status = OBJ_INIT;
return;
}
gBossActive = 1;
boss->fwork[2] = 1.0f;
boss->fwork[4] = 730.0f;
this->fwork[2] = 1.0f;
this->fwork[4] = 730.0f;
for (i = 0; i < ARRAY_COUNT(D_i5_801BD668); i++) {
D_i5_801BD668[i] = 0;
D_i5_801BD6B0[i] = 0.0f;
}
boss->fwork[49] = boss->obj.rot.y;
boss->obj.rot.y = 0.0f;
this->fwork[49] = this->obj.rot.y;
this->obj.rot.y = 0.0f;
var_v1 = D_i5_801BBF00;
for (i = 0; i < ARRAY_COUNTU(D_i5_801BBF00); i++, var_v1++) {
var_v1->unk_26 = 0;
@ -2218,11 +2219,11 @@ void Titania_Boss306_Init(Boss* boss) {
D_i5_801BCDC8[i].x = D_i5_801BCDC8[i].y = D_i5_801BCDC8[i].z = 0.0f;
D_i5_801BC978[i].x = D_i5_801BC978[i].y = D_i5_801BC978[i].z = 0.0f;
}
boss->swork[9] = 50;
boss->swork[10] = 50;
boss->swork[11] = 50;
boss->swork[12] = 50;
boss->swork[21] = 100;
this->swork[9] = 50;
this->swork[10] = 50;
this->swork[11] = 50;
this->swork[12] = 50;
this->swork[21] = 100;
sp1C = D_i5_801BBEF4 = Memory_Allocate(76 * sizeof(f32));
var_a1_2 = D_i5_801BBEF0 = Memory_Allocate(50 * sizeof(s32));
for (i = 0; i < 50; i++, var_a1_2++) {
@ -2266,7 +2267,7 @@ bool Titania_8018FC70(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void*
case 3:
case 7:
RCP_SetupDL(&gMasterDisp, 0x1E);
if (D_i5_801BBEF0[30] & 1) {
if ((D_i5_801BBEF0[30] % 2) != 0) {
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
} else {
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255);
@ -2280,7 +2281,7 @@ bool Titania_8018FC70(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void*
case 10:
case 11:
RCP_SetupDL(&gMasterDisp, 0x3D);
if (D_i5_801BBEF0[30] & 1) {
if ((D_i5_801BBEF0[30] % 2) != 0) {
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
} else {
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255);
@ -2536,13 +2537,13 @@ bool Titania_801903A0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void*
}
}
if (D_i5_801BBEF0[25] == 1) {
sp20 = D_i5_801BBEF0[33] & 1;
sp20 = D_i5_801BBEF0[33] % 2U;
if (D_i5_801BBEF0[33] != 0) {
sp24 = (D_i5_801BBEF0[33] / 15.0f) * D_i5_801BBEF0[37];
rot->z += SIN_DEG((D_i5_801BBEF0[33] / (f32) D_i5_801BBEF0[35]) * 360.0f) * sp24;
}
} else {
sp20 = D_i5_801BBEF0[34] & 1;
sp20 = D_i5_801BBEF0[34] % 2U;
if (D_i5_801BBEF0[34] != 0) {
sp24 = (D_i5_801BBEF0[34] / 15.0f) * D_i5_801BBEF0[38];
rot->z += SIN_DEG((D_i5_801BBEF0[34] / (f32) D_i5_801BBEF0[36]) * 360.0f) * sp24;
@ -2558,7 +2559,7 @@ bool Titania_801903A0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void*
case 1:
case 2:
RCP_SetupDL(&gMasterDisp, 0x1E);
if (sp20 & 1) {
if ((sp20 % 2) != 0) {
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
} else {
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255);
@ -2572,7 +2573,7 @@ bool Titania_801903A0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void*
case 5:
case 6:
RCP_SetupDL(&gMasterDisp, 0x3D);
if (sp20 & 1) {
if ((sp20 % 2) != 0) {
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
} else {
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255);
@ -3314,7 +3315,7 @@ void Titania_80192118(Boss* boss) {
}
break;
}
D_i5_801BBEF4[51] = SIN_DEG((((boss->swork[38] & 0x7F) * 360.0f) / 128)) * 40.0f;
D_i5_801BBEF4[51] = SIN_DEG((((s32) (boss->swork[38] % 128U) * 360.0f) / 128)) * 40.0f;
switch (D_i5_801BBEF0[28]) {
case 0:
@ -3442,7 +3443,7 @@ void Titania_80192118(Boss* boss) {
D_i5_801BBEF4[57] = temp_ft2;
D_i5_801BBEF4[58] = temp_ft4;
}
if (!(boss->swork[38] & 3)) {
if ((boss->swork[38] & 3) == 0) {
func_effect_8007A900(temp_ft2, boss->obj.pos.y, temp_ft4, 10.0f, 192, 16, 0);
}
}
@ -3473,7 +3474,7 @@ void Titania_80192118(Boss* boss) {
D_i5_801BBEF4[59] = temp_ft2;
D_i5_801BBEF4[60] = temp_ft4;
}
if (!(boss->swork[38] & 3)) {
if ((boss->swork[38] & 3) == 0) {
func_effect_8007A900(temp_ft2, boss->obj.pos.y, temp_ft4, 10.0f, 192, 16, 0);
}
}
@ -3504,7 +3505,7 @@ void Titania_80192118(Boss* boss) {
D_i5_801BBEF4[61] = temp_ft2;
D_i5_801BBEF4[62] = temp_ft4;
}
if (!(boss->swork[38] & 3)) {
if ((boss->swork[38] & 3) == 0) {
func_effect_8007A900(temp_ft2, boss->obj.pos.y, temp_ft4, 10.0f, 192, 16, 0);
}
}
@ -4429,10 +4430,10 @@ void Titania_80193DF0(Boss* boss) {
boss->swork[32] = 0;
}
if (D_i5_801BBEF0[26] != 0) {
D_ctx_80178348 = 255;
D_ctx_80178350 = 255;
D_ctx_80178354 = 255;
D_ctx_80178340 = (D_i5_801BBEF0[26] * 255.0f) / 3.0f;
gFillScreenRed = 255;
gFillScreenGreen = 255;
gFillScreenBlue = 255;
gFillScreenAlpha = (D_i5_801BBEF0[26] * 255.0f) / 3.0f;
}
if ((boss->unk_04C >= 54) && (boss->unk_04C < 120)) {
boss->fwork[46] += 0.04f;
@ -4601,7 +4602,7 @@ void Titania_80193DF0(Boss* boss) {
}
}
if ((pad != 4) && gTeamShields[3] > 0) {
if ((pad != 4) && gTeamShields[TEAM_ID_PEPPY] > 0) {
Radio_PlayMessage(gMsg_ID_4095, RCID_PEPPY);
}
boss->swork[37] &= ~2;
@ -4609,7 +4610,7 @@ void Titania_80193DF0(Boss* boss) {
break;
case 9:
if (boss->swork[37] & 1) {
if ((boss->swork[29] != 0) && gTeamShields[1] > 0) {
if ((boss->swork[29] != 0) && gTeamShields[TEAM_ID_FALCO] > 0) {
Radio_PlayMessage(gMsg_ID_4099, RCID_FALCO);
}
boss->swork[37] &= ~1;
@ -4742,7 +4743,7 @@ void Titania_80197A94(Boss* boss) {
boss->swork[39]--;
}
if (boss->swork[28] == 2) {
if (gTeamShields[3] > 0) {
if (gTeamShields[TEAM_ID_PEPPY] > 0) {
Radio_PlayMessage(gMsg_ID_4091, RCID_PEPPY);
}
D_i5_801BBEF0[42] = 1;
@ -4799,14 +4800,14 @@ void Titania_80197A94(Boss* boss) {
Radio_PlayMessage(gMsg_ID_20266, RCID_FOX);
break;
case 80:
gTeamShields[2] = 1;
gTeamShields[TEAM_ID_SLIPPY] = 1;
Radio_PlayMessage(gMsg_ID_4112, RCID_SLIPPY);
gTeamShields[2] = -2;
gTeamShields[TEAM_ID_SLIPPY] = -2;
break;
case 240:
gTeamShields[2] = 1;
gTeamShields[TEAM_ID_SLIPPY] = 1;
Radio_PlayMessage(gMsg_ID_4093, RCID_SLIPPY);
gTeamShields[2] = -2;
gTeamShields[TEAM_ID_SLIPPY] = -2;
break;
}
@ -4819,9 +4820,9 @@ void Titania_80197A94(Boss* boss) {
break;
case 2:
if (boss->swork[31] == 11) {
gTeamShields[2] = 1;
gTeamShields[TEAM_ID_SLIPPY] = 1;
Radio_PlayMessage(gMsg_ID_4111, RCID_SLIPPY);
gTeamShields[2] = -2;
gTeamShields[TEAM_ID_SLIPPY] = -2;
}
break;
case 3:
@ -4829,7 +4830,7 @@ void Titania_80197A94(Boss* boss) {
case 1:
break;
case 50:
if (gTeamShields[1] > 0) {
if (gTeamShields[TEAM_ID_FALCO] > 0) {
Radio_PlayMessage(gMsg_ID_4094, RCID_FALCO);
}
default:
@ -4841,13 +4842,13 @@ void Titania_80197A94(Boss* boss) {
if (D_i5_801BBEF0[42] == 0) {
switch (boss->swork[4]) {
case 1:
if (gTeamShields[3] > 0) {
if (gTeamShields[TEAM_ID_PEPPY] > 0) {
Radio_PlayMessage(gMsg_ID_4095, RCID_PEPPY);
}
D_i5_801BBEF0[42] = 1;
break;
case 3:
if ((D_i5_801BBEF0[8] == 0) && (gTeamShields[1] > 0)) {
if ((D_i5_801BBEF0[8] == 0) && (gTeamShields[TEAM_ID_FALCO] > 0)) {
Radio_PlayMessage(gMsg_ID_4097, RCID_FALCO);
}
D_i5_801BBEF0[42] = 1;
@ -4857,12 +4858,12 @@ void Titania_80197A94(Boss* boss) {
}
if (boss->swork[4] >= 4 && !(D_i5_801BBEF0[46] & 1)) {
if ((gTeamShields[1] > 0) && (D_i5_801BBEF0[8] == 0) && (gRadioState == 0) &&
if ((gTeamShields[TEAM_ID_FALCO] > 0) && (D_i5_801BBEF0[8] == 0) && (gRadioState == 0) &&
(boss->swork[10] >= 2)) {
gTeamShields[2] = 1;
gTeamShields[TEAM_ID_SLIPPY] = 1;
Radio_PlayMessage(gMsg_ID_4098, RCID_SLIPPY);
gTeamShields[2] = -2;
D_i5_801BBEF0[46] = (s32) (D_i5_801BBEF0[46] | 1);
gTeamShields[TEAM_ID_SLIPPY] = -2;
D_i5_801BBEF0[46] |= 1;
}
D_i5_801BBEF0[42] = 1;
}
@ -4872,12 +4873,12 @@ void Titania_80197A94(Boss* boss) {
D_i5_801BBEF0[43]++;
switch (D_i5_801BBEF0[43]) {
case 1:
gTeamShields[2] = 1;
gTeamShields[TEAM_ID_SLIPPY] = 1;
Radio_PlayMessage(gMsg_ID_20190, RCID_SLIPPY);
gTeamShields[2] = -2;
gTeamShields[TEAM_ID_SLIPPY] = -2;
break;
case 80:
if (gTeamShields[1] > 0) {
if (gTeamShields[TEAM_ID_FALCO] > 0) {
Radio_PlayMessage(gMsg_ID_4096, RCID_FALCO);
}
boss->swork[37] &= ~4;
@ -4892,7 +4893,7 @@ void Titania_80197A94(Boss* boss) {
if ((boss->state != 5) && ((boss->state != 4) || (boss->swork[31] <= 100)) && (D_i5_801BBEF0[8] == 0)) {
Math_SmoothStepToF(&D_i5_801BBEF4[74], D_i5_801BBEF4[75], 0.5f, 0.04f, 0.01f);
if (D_i5_801BBEF4[74] == D_i5_801BBEF4[74]) {
if (boss->swork[38] & 1) {
if ((boss->swork[38] % 2) != 0) {
D_i5_801BBEF4[75] = 0.7f;
D_i5_801BBEF4[74] = D_i5_801BBEF4[75];
} else {
@ -4901,7 +4902,7 @@ void Titania_80197A94(Boss* boss) {
}
}
if ((D_i5_801BBEF0[49] >= 25) && !((D_i5_801BBEF0[49] - 25) & 1)) {
if ((D_i5_801BBEF0[49] >= 25) && (((D_i5_801BBEF0[49] - 25) % 2) == 0)) {
D_i5_801BBEF4[74] = RAND_FLOAT(0.4f) + 0.9f;
D_i5_801BBEF4[75] = 0.6f;
}
@ -5106,7 +5107,7 @@ void Titania_801982A8(Boss* boss) {
temp_fs2 = boss->fwork[42] / 700.0f;
Matrix_RotateY(gGfxMatrix, (boss->fwork[21] - 90.0f) * M_DTOR, 1);
Matrix_RotateX(gGfxMatrix, (boss->fwork[22] - 180.0f) * M_DTOR, 1);
Matrix_RotateZ(gGfxMatrix, (boss->fwork[20] - ((boss->swork[38] & 7) * 43.0f)) * M_DTOR, 1);
Matrix_RotateZ(gGfxMatrix, (boss->fwork[20] - ((s32) (boss->swork[38] % 8U) * 43.0f)) * M_DTOR, 1);
Matrix_Push(&gGfxMatrix);
Matrix_Scale(gGfxMatrix, half * sp120, half * sp120, temp_fs2, 1);
Matrix_SetGfxMtx(&gMasterDisp);

View File

@ -54,11 +54,11 @@ void Titania_8018769C(Player* player) {
Titania_80187530(&gActors[3]);
if (gTeamShields[1] > 0) {
if (gTeamShields[TEAM_ID_FALCO] > 0) {
Titania_801875D0(&gActors[10], 0);
}
if (gTeamShields[3] > 0) {
if (gTeamShields[TEAM_ID_PEPPY] > 0) {
Titania_801875D0(&gActors[11], 1);
}
@ -219,7 +219,7 @@ void Titania_8018769C(Player* player) {
Math_SmoothStepToF(&player->unk_0F0, SIN_DEG(gGameFrameCount * 5.0f) * 10.0f, 0.1f, 100.0f, 0.0f);
if (gCsFrameCount == 580) {
D_ctx_80177838 = 50;
gLevelStatusScreenTimer = 50;
player->state_1C8 = PLAYERSTATE_1C8_3;
player->unk_1D0 = player->timer_1F8 = player->timer_1FC = player->unk_240 = 0;
player->unk_0D4 = 3.0f;
@ -306,10 +306,10 @@ void Titania_801882CC(Player* player) {
Titania_80188108(&gActors[0], 0);
if (gTeamShields[1] > 0) {
if (gTeamShields[TEAM_ID_FALCO] > 0) {
Titania_80188108(&gActors[1], 1);
}
if (gTeamShields[3] > 0) {
if (gTeamShields[TEAM_ID_PEPPY] > 0) {
Titania_80188108(&gActors[2], 2);
}
@ -356,7 +356,7 @@ void Titania_801882CC(Player* player) {
func_play_800A8BA4(player);
func_play_800ADF58(player);
if (!(gGameFrameCount & 3)) {
if (((gGameFrameCount % 4) == 0)) {
f32 x;
f32 y;
f32 z;
@ -426,7 +426,7 @@ void Titania_801882CC(Player* player) {
break;
case 80:
D_ctx_80177840 = 100;
gLevelClearScreenTimer = 100;
break;
case 160:
@ -438,7 +438,7 @@ void Titania_801882CC(Player* player) {
break;
case 380:
switch (gTeamShields[1]) {
switch (gTeamShields[TEAM_ID_FALCO]) {
case -1:
Radio_PlayMessage(gMsg_ID_20331, RCID_ROB64);
break;
@ -455,7 +455,7 @@ void Titania_801882CC(Player* player) {
break;
case 525:
switch (gTeamShields[3]) {
switch (gTeamShields[TEAM_ID_PEPPY]) {
case -1:
Radio_PlayMessage(gMsg_ID_20332, RCID_ROB64);
break;
@ -518,10 +518,10 @@ void Titania_801882CC(Player* player) {
}
if (gCsFrameCount > 1440) {
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0;
D_ctx_80178358 = 255;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0;
gFillScreenAlphaTarget = 255;
if (D_ctx_80178340 == 255) {
if (gFillScreenAlpha == 255) {
player->state_1C8 = PLAYERSTATE_1C8_6;
D_ctx_8017837C = 4;
func_play_800A6148();

View File

@ -94,22 +94,22 @@ void Andross_801878A8() {
Object_58* obj58;
s32 i;
D_ctx_80178310 = SEGMENTED_TO_VIRTUAL(&D_ANDROSS_C0356CC);
gLevelObjects = SEGMENTED_TO_VIRTUAL(&D_ANDROSS_C0356CC);
for (obj58 = gObjects58, i = 0; i < 1000; i++) {
if (D_ctx_80178310[i].id < 0) {
if (gLevelObjects[i].id < 0) {
break;
}
if (D_ctx_80178310[i].id <= OBJ_80_160) {
if (gLevelObjects[i].id <= OBJ_80_160) {
Object_58_Initialize(obj58);
obj58->obj.status = OBJ_ACTIVE;
obj58->obj.id = D_ctx_80178310[i].id;
obj58->obj.pos.x = D_ctx_80178310[i].xPos;
obj58->obj.pos.z = -D_ctx_80178310[i].zPos1;
obj58->obj.pos.z += D_ctx_80178310[i].zPos2;
obj58->obj.pos.y = D_ctx_80178310[i].yPos;
obj58->obj.rot.y = D_ctx_80178310[i].rot.y;
obj58->obj.id = gLevelObjects[i].id;
obj58->obj.pos.x = gLevelObjects[i].xPos;
obj58->obj.pos.z = -gLevelObjects[i].zPos1;
obj58->obj.pos.z += gLevelObjects[i].zPos2;
obj58->obj.pos.y = gLevelObjects[i].yPos;
obj58->obj.rot.y = gLevelObjects[i].rot.y;
Object_SetInfo(&obj58->info, obj58->obj.id);
if (obj58->obj.id == OBJ_80_131) {
obj58->info.hitbox = SEGMENTED_TO_VIRTUAL(&D_ANDROSS_C038CCC);
@ -119,36 +119,36 @@ void Andross_801878A8() {
}
for (actor = &gActors[1], i = 0; i < 1000; i++) {
if (D_ctx_80178310[i].id < 0) {
if (gLevelObjects[i].id < 0) {
break;
}
if ((D_ctx_80178310[i].id <= OBJ_ACTOR_SUPPLIES) && (D_ctx_80178310[i].id >= OBJ_ACTOR_176)) {
if ((gLevelObjects[i].id <= OBJ_ACTOR_SUPPLIES) && (gLevelObjects[i].id >= OBJ_ACTOR_176)) {
Actor_Initialize(actor);
actor->obj.status = OBJ_ACTIVE;
actor->obj.id = D_ctx_80178310[i].id;
actor->obj.pos.x = D_ctx_80178310[i].xPos;
actor->obj.pos.z = -D_ctx_80178310[i].zPos1;
actor->obj.pos.z += D_ctx_80178310[i].zPos2;
actor->obj.pos.y = D_ctx_80178310[i].yPos;
actor->obj.rot.y = D_ctx_80178310[i].rot.y;
actor->obj.id = gLevelObjects[i].id;
actor->obj.pos.x = gLevelObjects[i].xPos;
actor->obj.pos.z = -gLevelObjects[i].zPos1;
actor->obj.pos.z += gLevelObjects[i].zPos2;
actor->obj.pos.y = gLevelObjects[i].yPos;
actor->obj.rot.y = gLevelObjects[i].rot.y;
Object_SetInfo(&actor->info, actor->obj.id);
actor++;
}
}
for (item = gItems, i = 0; i < 1000; i++) {
if (D_ctx_80178310[i].id < 0) {
if (gLevelObjects[i].id < 0) {
break;
}
if ((D_ctx_80178310[i].id <= OBJ_ITEM_TRAINING_RING) && (D_ctx_80178310[i].id >= OBJ_ITEM_LASERS)) {
if ((gLevelObjects[i].id <= OBJ_ITEM_TRAINING_RING) && (gLevelObjects[i].id >= OBJ_ITEM_LASERS)) {
Item_Initialize(item);
item->obj.status = OBJ_ACTIVE;
item->obj.id = D_ctx_80178310[i].id;
item->obj.pos.x = D_ctx_80178310[i].xPos;
item->obj.pos.z = -D_ctx_80178310[i].zPos1;
item->obj.pos.z += D_ctx_80178310[i].zPos2;
item->obj.pos.y = D_ctx_80178310[i].yPos;
item->obj.id = gLevelObjects[i].id;
item->obj.pos.x = gLevelObjects[i].xPos;
item->obj.pos.z = -gLevelObjects[i].zPos1;
item->obj.pos.z += gLevelObjects[i].zPos2;
item->obj.pos.y = gLevelObjects[i].yPos;
Object_SetInfo(&item->info, item->obj.id);
item++;
}
@ -163,33 +163,33 @@ void Andross_80187C5C(void) {
switch (RAND_INT(2.9f)) {
case 0:
D_ctx_80178310 = SEGMENTED_TO_VIRTUAL(&D_ANDROSS_C036310);
gLevelObjects = SEGMENTED_TO_VIRTUAL(&D_ANDROSS_C036310);
break;
case 1:
D_ctx_80178310 = SEGMENTED_TO_VIRTUAL(&D_ANDROSS_C036B6C);
gLevelObjects = SEGMENTED_TO_VIRTUAL(&D_ANDROSS_C036B6C);
break;
default:
case 2:
D_ctx_80178310 = SEGMENTED_TO_VIRTUAL(&D_ANDROSS_C03733C);
gLevelObjects = SEGMENTED_TO_VIRTUAL(&D_ANDROSS_C03733C);
break;
}
for (obj58 = gObjects58, i = 0; i < 1000; i++) {
if (D_ctx_80178310[i].id < 0) {
if (gLevelObjects[i].id < 0) {
break;
}
if (D_ctx_80178310[i].id <= OBJ_80_160) {
if (gLevelObjects[i].id <= OBJ_80_160) {
Object_58_Initialize(obj58);
obj58->obj.status = OBJ_ACTIVE;
obj58->obj.id = D_ctx_80178310[i].id;
obj58->obj.pos.x = D_ctx_80178310[i].xPos;
obj58->obj.pos.z = -D_ctx_80178310[i].zPos1;
obj58->obj.pos.z += D_ctx_80178310[i].zPos2;
obj58->obj.pos.y = D_ctx_80178310[i].yPos;
obj58->obj.rot.y = D_ctx_80178310[i].rot.y;
obj58->obj.id = gLevelObjects[i].id;
obj58->obj.pos.x = gLevelObjects[i].xPos;
obj58->obj.pos.z = -gLevelObjects[i].zPos1;
obj58->obj.pos.z += gLevelObjects[i].zPos2;
obj58->obj.pos.y = gLevelObjects[i].yPos;
obj58->obj.rot.y = gLevelObjects[i].rot.y;
if (obj58->obj.id == OBJ_80_147) {
obj58->unk_40 = D_ctx_80178310[i].rot.z;
obj58->unk_40 = gLevelObjects[i].rot.z;
}
Object_SetInfo(&obj58->info, obj58->obj.id);
if (obj58->obj.id == OBJ_80_131) {
@ -200,36 +200,36 @@ void Andross_80187C5C(void) {
}
for (actor = &gActors[1], i = 0; i < 1000; i++) {
if (D_ctx_80178310[i].id < 0) {
if (gLevelObjects[i].id < 0) {
break;
}
if ((D_ctx_80178310[i].id <= OBJ_ACTOR_SUPPLIES) && (D_ctx_80178310[i].id >= OBJ_ACTOR_176)) {
if ((gLevelObjects[i].id <= OBJ_ACTOR_SUPPLIES) && (gLevelObjects[i].id >= OBJ_ACTOR_176)) {
Actor_Initialize(actor);
actor->obj.status = OBJ_ACTIVE;
actor->obj.id = D_ctx_80178310[i].id;
actor->obj.pos.x = D_ctx_80178310[i].xPos;
actor->obj.pos.z = -D_ctx_80178310[i].zPos1;
actor->obj.pos.z += D_ctx_80178310[i].zPos2;
actor->obj.pos.y = D_ctx_80178310[i].yPos;
actor->obj.rot.y = D_ctx_80178310[i].rot.y;
actor->obj.id = gLevelObjects[i].id;
actor->obj.pos.x = gLevelObjects[i].xPos;
actor->obj.pos.z = -gLevelObjects[i].zPos1;
actor->obj.pos.z += gLevelObjects[i].zPos2;
actor->obj.pos.y = gLevelObjects[i].yPos;
actor->obj.rot.y = gLevelObjects[i].rot.y;
Object_SetInfo(&actor->info, actor->obj.id);
actor++;
}
}
for (item = gItems, i = 0; i < 1000; i++) {
if (D_ctx_80178310[i].id < 0) {
if (gLevelObjects[i].id < 0) {
break;
}
if ((D_ctx_80178310[i].id <= OBJ_ITEM_TRAINING_RING) && (D_ctx_80178310[i].id >= OBJ_ITEM_LASERS)) {
if ((gLevelObjects[i].id <= OBJ_ITEM_TRAINING_RING) && (gLevelObjects[i].id >= OBJ_ITEM_LASERS)) {
Item_Initialize(item);
item->obj.status = OBJ_ACTIVE;
item->obj.id = D_ctx_80178310[i].id;
item->obj.pos.x = D_ctx_80178310[i].xPos;
item->obj.pos.z = -D_ctx_80178310[i].zPos1;
item->obj.pos.z += D_ctx_80178310[i].zPos2;
item->obj.pos.y = D_ctx_80178310[i].yPos;
item->obj.id = gLevelObjects[i].id;
item->obj.pos.x = gLevelObjects[i].xPos;
item->obj.pos.z = -gLevelObjects[i].zPos1;
item->obj.pos.z += gLevelObjects[i].zPos2;
item->obj.pos.y = gLevelObjects[i].yPos;
Object_SetInfo(&item->info, item->obj.id);
item++;
}
@ -263,7 +263,7 @@ void Andross_801880E4(Actor* actor) {
if ((fabsf(xDisplacement) < 300.0f) && (fabsf(yDisplacement) < 300.0f) && (fabsf(zDisplacement) < 300.0f)) {
actor->unk_04E++;
}
if (!(gGameFrameCount & 0x1F)) {
if (((gGameFrameCount % 32) == 0)) {
actor->iwork[11] = 1;
actor->fwork[1] = 47.0f;
if ((fabsf(actor->obj.pos.x - gPlayer[0].pos.x) < 1000.0f) &&
@ -381,7 +381,7 @@ void Andross_801888F4(Actor* actor) {
s32 i;
actor->obj.rot.z -= 8.0f;
if ((actor->timer_0BC & 1) == 1) {
if ((actor->timer_0BC % 2U) == 1) {
func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 5.0f);
}
if ((actor->timer_0BC == 0) || (actor->unk_0D0 != 0)) {
@ -495,7 +495,7 @@ void Andross_80188CB8(Boss* boss) {
if (boss->swork[7] != 0) {
boss->swork[7]--;
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
Andross_8018887C(RAND_FLOAT_CENTERED(100.0f) + boss->obj.pos.x,
RAND_FLOAT_CENTERED(300.0f) + (boss->obj.pos.y - 250.0f),
RAND_FLOAT_CENTERED(100.0f) + boss->obj.pos.z, RAND_FLOAT_CENTERED(50.0f),
@ -542,7 +542,7 @@ void Andross_80189098(Boss* boss) {
actor->obj.pos.y = 0.0f;
actor->obj.pos.z = boss->obj.pos.z;
Object_SetInfo(&actor->info, actor->obj.id);
actor->info.hitbox = SEGMENTED_TO_VIRTUAL(&D_edata_800CBEA8);
actor->info.hitbox = SEGMENTED_TO_VIRTUAL(&gDefaultCubeHitbox150);
actor++;
@ -556,7 +556,7 @@ void Andross_80189098(Boss* boss) {
actor->obj.pos.y = 0.0f;
actor->obj.pos.z = boss->obj.pos.z;
Object_SetInfo(&actor->info, actor->obj.id);
actor->info.hitbox = SEGMENTED_TO_VIRTUAL(&D_edata_800CBEA8);
actor->info.hitbox = SEGMENTED_TO_VIRTUAL(&gDefaultCubeHitbox150);
gActors[0].state = 2;
}
@ -603,7 +603,7 @@ void Andross_8018933C(Actor* actor) {
void Andross_801893B8(Actor* actor) {
if (D_360_8015F924 == 0) {
if (gAllRangeCheckpoint == 0) {
actor->unk_04E++;
switch (actor->unk_04E) {
case 200:
@ -640,7 +640,7 @@ void Andross_80189470(Actor* actor) {
Audio_KillSfxById(0x11403076);
Audio_SetBaseSfxReverb(0);
gCurrentLevel = LEVEL_VENOM_2;
D_ctx_8017827C = 1;
gLevelStage = 1;
D_play_800D2F68 = 1;
player->state_1C8 = PLAYERSTATE_1C8_7;
player->unk_1D0 = 3;
@ -664,8 +664,8 @@ void Andross_80189470(Actor* actor) {
Andross_80193710();
D_ctx_8017782C = 1;
func_play_800A594C();
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0;
D_ctx_80178340 = D_ctx_80178358 = 255;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0;
gFillScreenAlpha = gFillScreenAlphaTarget = 255;
player->timer_1F8 = 2;
gCsFrameCount = 0;
D_ctx_80177A48[1] = 0.0f;
@ -833,15 +833,15 @@ void Andross_80189B70(Boss* boss) {
}
break;
case 11:
boss->info.hitbox = SEGMENTED_TO_VIRTUAL(&D_edata_800CBF34);
boss->info.hitbox = SEGMENTED_TO_VIRTUAL(&gHitboxNone);
if (boss->timer_050 < 120) {
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255;
D_ctx_80178358 = 80;
D_ctx_8017835C = 1;
gPlayer[0].timer_224 = gGameFrameCount & 7;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255;
gFillScreenAlphaTarget = 80;
gFillScreenAlphaStep = 1;
gPlayer[0].timer_224 = gGameFrameCount % 8U;
gPlayer[0].timer_220 = 3;
Math_SmoothStepToF(&D_ctx_801779A8[gMainController], 40.0f, 1.0f, 3.0f, 0.0f);
if (!(gGameFrameCount & 0x1F) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3)) {
if (((gGameFrameCount % 32) == 0) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3)) {
Player_ApplyDamage(&gPlayer[0], 3, 10);
}
}
@ -854,15 +854,15 @@ void Andross_80189B70(Boss* boss) {
boss->fwork[13] = 1.0f;
boss->fwork[19] = 23.0f;
boss->fwork[1] = 0.0f;
gPlayer[0].unk_238 = 1;
gPlayer[0].cockpitView = 1;
Math_SmoothStepToF(&D_display_800CA230, 0.15f, 0.2f, 0.004f, 0.0f);
if (boss->timer_050 == 120) {
AUDIO_PLAY_SFX(0x1940306E, boss->sfxSource, 4);
}
if (boss->timer_050 == 0) {
gPlayer[0].unk_0D0 = D_play_80161A54;
gPlayer[0].unk_238 = 0;
D_ctx_80178358 = 0;
gPlayer[0].cockpitView = 0;
gFillScreenAlphaTarget = 0;
boss->timer_05A = 50;
if (boss->swork[4] != 0) {
boss->state = 1;
@ -882,7 +882,7 @@ void Andross_80189B70(Boss* boss) {
boss->fwork[5] = gPlayer[0].unk_138;
break;
case 12:
boss->info.hitbox = SEGMENTED_TO_VIRTUAL(&D_edata_800CBF34);
boss->info.hitbox = SEGMENTED_TO_VIRTUAL(&gHitboxNone);
boss->fwork[1] = 0;
boss->fwork[24] = 0.2f;
boss->fwork[22] = 0.0f;
@ -903,7 +903,7 @@ void Andross_80189B70(Boss* boss) {
}
break;
case 13:
boss->info.hitbox = SEGMENTED_TO_VIRTUAL(&D_edata_800CBF34);
boss->info.hitbox = SEGMENTED_TO_VIRTUAL(&gHitboxNone);
boss->fwork[24] = 0.0f;
boss->fwork[22] = 255.0f;
if (250.0f < boss->fwork[22]) {
@ -924,7 +924,7 @@ void Andross_80189B70(Boss* boss) {
Matrix_MultVec3f(gCalcMatrix, &vec, &sp64);
func_effect_8007797C(boss->obj.pos.x + sp64.x, boss->obj.pos.y + sp64.y, boss->obj.pos.z + sp64.z, 0.0f,
0.0f, 0.0f, RAND_FLOAT(5.0f) + 7.0f);
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
func_effect_8007C484(RAND_FLOAT_CENTERED(600.0f) + boss->obj.pos.x,
RAND_FLOAT(100.0f) + (boss->obj.pos.y + 100.0f), boss->obj.pos.z, 0.0f, 0.0f, 0.0f,
RAND_FLOAT(0.3f) + 0.5f, 0);
@ -968,11 +968,11 @@ void Andross_80189B70(Boss* boss) {
gCsFrameCount++;
gCameraShake = 10;
if (gCsFrameCount < 200) {
D_ctx_80178380[0] += 4;
if (D_ctx_80178380[0] >= 255) {
D_ctx_80178380[0] = 255;
gPlayerFillScreenAlphas[0] += 4;
if (gPlayerFillScreenAlphas[0] >= 255) {
gPlayerFillScreenAlphas[0] = 255;
}
D_ctx_80178390[0] = D_ctx_801783A0[0] = D_ctx_801783B0[0] = 255;
gPlayerFillScreenReds[0] = gPlayerFillScreenGreens[0] = gPlayerFillScreenBlues[0] = 255;
Math_SmoothStepToF(&D_display_800CA230, 0.15f, 0.2f, 0.004f, 0.0f);
Math_SmoothStepToF(&D_ctx_801779A8[gMainController], 70.0f, 1.0f, 4.0f, 0.0f);
}
@ -987,7 +987,7 @@ void Andross_80189B70(Boss* boss) {
break;
case 500:
Radio_PlayMessage(gMsg_ID_19350, RCID_FOX);
D_360_8015F924 = 1;
gAllRangeCheckpoint = 1;
break;
case 600:
D_ctx_80177AB0 = 5;
@ -1042,7 +1042,7 @@ void Andross_80189B70(Boss* boss) {
}
boss->obj.pos.y = 10000.0f;
if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) && !(gGameFrameCount & 3)) {
if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) && ((gGameFrameCount % 4) == 0)) {
Matrix_RotateY(gCalcMatrix, (gPlayer[0].unk_114 + gPlayer[0].unk_0E8) * M_DTOR, 0U);
vec.x = RAND_FLOAT_CENTERED(800.0f);
vec.y = 600.0f;
@ -1176,7 +1176,7 @@ bool Andross_8018B47C(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void*
Matrix_RotateY(gGfxMatrix, -boss->fwork[14] * 1.5f * M_DTOR, 1);
}
Matrix_SetGfxMtx(&gMasterDisp);
if ((boss->swork[3] & 1) && (boss->fwork[21] >= 254.0f)) {
if (((boss->swork[3] % 2) != 0) && (boss->fwork[21] >= 254.0f)) {
RCP_SetupDL(&gMasterDisp, 0x1B);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
}
@ -1555,26 +1555,26 @@ void Andross_8018D0D8(Boss* boss) {
}
}
void Andross_Boss320_Init(Boss* boss) {
void Andross_Boss320_Init(Boss320* this) {
Audio_SetBaseSfxReverb(0x18);
D_i6_801A7F5C = D_i6_801A7F64 = D_i6_801A7F6C = D_i6_801A7F74 = D_i6_801A7F7C = D_i6_801A8430 = 0.0f;
D_bg_800C9C30 = 0.0f;
boss->health = 100;
boss->fwork[18] = 1.0f;
boss->fwork[17] = 1.0f;
this->health = 100;
this->fwork[18] = 1.0f;
this->fwork[17] = 1.0f;
gLight1R = 255;
gLight1G = 80;
gLight1B = 20;
gAmbientR = 1;
gAmbientG = 0;
gAmbientB = 20;
boss->timer_058 = 10;
boss->swork[4] = boss->swork[5] = 200;
boss->swork[6] = 100;
this->timer_058 = 10;
this->swork[4] = this->swork[5] = 200;
this->swork[6] = 100;
gBossActive = 1;
D_ctx_80177AB0 = 1;
boss->info.hitbox[16] = 200.0f;
boss->info.hitbox[22] = 200.0f;
this->info.hitbox[16] = 200.0f;
this->info.hitbox[22] = 200.0f;
Audio_PlaySequence(SEQ_PLAYER_BGM, SEQ_ID_AND_BOSS | SEQ_FLAG, 0, 0);
}
@ -1610,7 +1610,7 @@ void Andross_8018D2B0(Boss* boss) {
AUDIO_PLAY_SFX(0x19403070, boss->sfxSource, 4);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1);
if (D_ctx_8017827C == 0) {
if (gLevelStage == 0) {
boss->state = 30;
} else {
boss->state = 32;
@ -2140,7 +2140,7 @@ void Andross_8018DBF0(Boss* boss) {
if (boss->unk_04C > 45) {
Math_SmoothStepToF(&boss->fwork[20], 1.0f, 1.0f, 0.2f, 0.01f);
Math_SmoothStepToF(&boss->fwork[21], 1.0f, 0.5f, 0.15f, 0.01f);
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
gAmbientR = 200;
gAmbientG = 90;
gAmbientB = 255;
@ -2267,7 +2267,7 @@ void Andross_8018DBF0(Boss* boss) {
if (boss->unk_04C == 15) {
AUDIO_PLAY_SFX(0x29022088, boss->sfxSource, 4);
}
if ((boss->unk_04C > 35) && (boss->unk_04C < 150) && !(boss->unk_04C & 0x1F)) {
if ((boss->unk_04C > 35) && (boss->unk_04C < 150) && ((boss->unk_04C % 32) == 0)) {
AUDIO_PLAY_SFX(0x29022089, boss->sfxSource, 4);
if (player->state_1C8 == PLAYERSTATE_1C8_11) {
D_Timer_80177BD0[0] = 10;
@ -2366,7 +2366,7 @@ void Andross_8018DBF0(Boss* boss) {
Math_SmoothStepToF(&D_ctx_801779A8[gMainController], 50.0f, 1.0f, 1.8f, 0.0f);
boss->timer_056 = 50;
if ((boss->timer_050 > 70) && (boss->timer_050 < 1000) && !(gGameFrameCount & 3)) {
if ((boss->timer_050 > 70) && (boss->timer_050 < 1000) && ((gGameFrameCount % 4) == 0)) {
Andross_8018C734(gPlayer[0].camEye.x + RAND_FLOAT_CENTERED(3000.0f),
gPlayer[0].camEye.y + RAND_FLOAT_CENTERED(3000.0f),
gPlayer[0].camEye.z - D_ctx_80177D20, RAND_INT(7.9));
@ -2533,7 +2533,7 @@ void Andross_8018DBF0(Boss* boss) {
}
limbCount = Animation_GetFrameData(&D_ANDROSS_C017050, boss->unk_04C, spD0);
Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, boss->fwork[9], 100.0f, 0.0f);
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
func_effect_8007C484(boss->obj.pos.x + RAND_FLOAT_CENTERED(1000.0f),
boss->obj.pos.y + RAND_FLOAT_CENTERED(1000.0f), boss->obj.pos.z, 0.0f, 0.0f,
boss->vel.z, RAND_FLOAT(0.2f) + 0.2f, 0);
@ -2638,7 +2638,7 @@ void Andross_8018DBF0(Boss* boss) {
Math_SmoothStepToF(&boss->fwork[4], 30.0f, 1.0f, 3.0f, 0);
boss->fwork[0] = 0.0f;
boss->fwork[3] = 0.0f;
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
func_effect_8007C484(boss->obj.pos.x + RAND_FLOAT_CENTERED(1000.0f),
boss->obj.pos.y + RAND_FLOAT_CENTERED(1000.0f), boss->obj.pos.z, 0.0f, 0.0f,
boss->vel.z, RAND_FLOAT(0.2f) + 0.2f, 0);
@ -2664,7 +2664,7 @@ void Andross_8018DBF0(Boss* boss) {
}
limbCount = Animation_GetFrameData(&D_ANDROSS_C017050, boss->unk_04C, spD0);
Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, boss->fwork[9], 100.0f, 0.0f);
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
func_effect_8007C484(boss->obj.pos.x + RAND_FLOAT_CENTERED(1000.0f),
boss->obj.pos.y + RAND_FLOAT_CENTERED(1000.0f), boss->obj.pos.z, 0.0f, 0.0f,
boss->vel.z, RAND_FLOAT(0.2f) + 0.2f, 0);
@ -2825,18 +2825,18 @@ bool Andross_801917F0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void*
if (((limbIndex >= 23) && (limbIndex <= 32)) || (limbIndex == 50)) {
if (boss->swork[5] < 0) {
*dList = NULL;
} else if (boss->swork[3] & 1) {
} else if ((boss->swork[3] % 2) != 0) {
RCP_SetupDL(&gMasterDisp, 0x1B);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
}
} else if (boss->swork[4] < 0) {
*dList = NULL;
} else if (boss->swork[2] & 1) {
} else if ((boss->swork[2] % 2) != 0) {
RCP_SetupDL(&gMasterDisp, 0x1B);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
}
}
} else if (!(boss->timer_05C & 1)) {
} else if ((boss->timer_05C % 2) == 0) {
RCP_SetupDL(&gMasterDisp, 0x1D);
} else {
RCP_SetupDL(&gMasterDisp, 0x1B);
@ -2855,7 +2855,7 @@ bool Andross_801917F0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void*
case 3:
rot->z -= boss->vwork[4].x;
rot->y -= boss->vwork[4].y;
if (boss->swork[0] & 1) {
if ((boss->swork[0] % 2) != 0) {
RCP_SetupDL(&gMasterDisp, 0x1B);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
}
@ -2868,7 +2868,7 @@ bool Andross_801917F0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void*
case 4:
rot->z -= boss->vwork[5].x;
rot->y -= boss->vwork[5].y;
if (boss->swork[1] & 1) {
if ((boss->swork[1] % 2) != 0) {
RCP_SetupDL(&gMasterDisp, 0x1B);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
}
@ -2955,7 +2955,7 @@ bool Andross_801917F0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void*
Matrix_SetGfxMtx(&gMasterDisp);
gSPDisplayList(gMasterDisp++, *dList);
RCP_SetupDL(&gMasterDisp, 0x29);
switch (gGameFrameCount & 3) {
switch (gGameFrameCount % 4U) {
case 0:
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
break;
@ -2994,7 +2994,7 @@ bool Andross_801917F0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void*
Matrix_SetGfxMtx(&gMasterDisp);
gSPDisplayList(gMasterDisp++, *dList);
RCP_SetupDL(&gMasterDisp, 0x29);
switch (gGameFrameCount & 3) {
switch (gGameFrameCount % 4U) {
case 0:
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
break;
@ -3144,7 +3144,7 @@ void Andross_801928C8(Boss* boss) {
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 192);
gDPSetEnvColor(gMasterDisp++, 255, 0, 128, 192);
Matrix_Scale(gGfxMatrix, boss->fwork[21] * 7.0f, boss->fwork[21] * 7.0f, boss->fwork[21] * 7.0f, 1);
if (gGameFrameCount & 1) {
if ((gGameFrameCount % 2) != 0) {
Matrix_Scale(gGfxMatrix, 1.1f, 1.1f, 1.1f, 1);
}
Matrix_SetGfxMtx(&gMasterDisp);
@ -3154,7 +3154,7 @@ void Andross_801928C8(Boss* boss) {
Matrix_Scale(gGfxMatrix, boss->fwork[20] * 10.0f, boss->fwork[20] * 10.0f, boss->fwork[20] * 10.0f, 1);
Matrix_RotateZ(gGfxMatrix, boss->fwork[19] * M_DTOR, 1);
RCP_SetupDL(&gMasterDisp, 0x40);
if (gGameFrameCount & 1) {
if ((gGameFrameCount % 2) != 0) {
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 128);
} else {
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 30);
@ -3261,7 +3261,7 @@ void Andross_80193244(Actor* actor) {
scale = 2.5f;
alpha = 16;
if (gGameFrameCount & 1) {
if ((gGameFrameCount % 2) != 0) {
alpha = 64;
scale *= 1.2f;
}
@ -3355,39 +3355,39 @@ void Andross_80193710(void) {
Boss* boss;
s32 i;
D_ctx_80178310 = SEGMENTED_TO_VIRTUAL(D_enmy_800CFDA0[gCurrentLevel]);
gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]);
for (obj58 = gObjects58, i = 0; i < 1000; i++) {
if (D_ctx_80178310[i].id < 0) {
if (gLevelObjects[i].id < 0) {
break;
}
if (D_ctx_80178310[i].id <= OBJ_80_160) {
if (gLevelObjects[i].id <= OBJ_80_160) {
Object_58_Initialize(obj58);
obj58->obj.status = OBJ_ACTIVE;
obj58->obj.id = D_ctx_80178310[i].id;
obj58->sfxSource[0] = obj58->obj.pos.x = D_ctx_80178310[i].xPos;
obj58->sfxSource[1] = obj58->obj.pos.y = D_ctx_80178310[i].yPos;
obj58->sfxSource[2] = obj58->obj.pos.z = -D_ctx_80178310[i].zPos1;
obj58->unk_54 = obj58->obj.rot.y = D_ctx_80178310[i].rot.y;
obj58->obj.id = gLevelObjects[i].id;
obj58->sfxSource[0] = obj58->obj.pos.x = gLevelObjects[i].xPos;
obj58->sfxSource[1] = obj58->obj.pos.y = gLevelObjects[i].yPos;
obj58->sfxSource[2] = obj58->obj.pos.z = -gLevelObjects[i].zPos1;
obj58->unk_54 = obj58->obj.rot.y = gLevelObjects[i].rot.y;
Object_SetInfo(&obj58->info, obj58->obj.id);
obj58++;
}
}
for (actor = &gActors[30], i = 0; i < 1000; i++) {
if (D_ctx_80178310[i].id < 0) {
if (gLevelObjects[i].id < 0) {
break;
}
if ((D_ctx_80178310[i].id >= OBJ_ACTOR_176) && (D_ctx_80178310[i].id <= OBJ_ACTOR_SUPPLIES)) {
if ((gLevelObjects[i].id >= OBJ_ACTOR_176) && (gLevelObjects[i].id <= OBJ_ACTOR_SUPPLIES)) {
Actor_Initialize(actor);
actor->obj.status = OBJ_INIT;
actor->obj.id = D_ctx_80178310[i].id;
actor->fwork[10] = actor->obj.pos.x = D_ctx_80178310[i].xPos;
actor->fwork[11] = actor->obj.pos.y = D_ctx_80178310[i].yPos;
actor->fwork[12] = actor->obj.pos.z = -D_ctx_80178310[i].zPos1;
actor->fwork[13] = actor->obj.rot.y = D_ctx_80178310[i].rot.y;
actor->obj.id = gLevelObjects[i].id;
actor->fwork[10] = actor->obj.pos.x = gLevelObjects[i].xPos;
actor->fwork[11] = actor->obj.pos.y = gLevelObjects[i].yPos;
actor->fwork[12] = actor->obj.pos.z = -gLevelObjects[i].zPos1;
actor->fwork[13] = actor->obj.rot.y = gLevelObjects[i].rot.y;
Object_SetInfo(&actor->info, actor->obj.id);
actor++;
}
@ -3631,7 +3631,7 @@ void Andross_80193C4C(Player* player) {
D_play_800D2F68 = 0;
gBlurAlpha = 255;
gCurrentLevel = LEVEL_VENOM_2;
D_ctx_8017827C = 1;
gLevelStage = 1;
gLevelMode = LEVELMODE_ALL_RANGE;
player->unk_1D0 = 3;
player->unk_144 = D_ctx_80177D20 = 0.0f;
@ -3653,8 +3653,8 @@ void Andross_80193C4C(Player* player) {
Andross_80193710();
D_ctx_8017782C = 1;
func_play_800A594C();
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0;
D_ctx_80178340 = D_ctx_80178358 = 255;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0;
gFillScreenAlpha = gFillScreenAlphaTarget = 255;
player->timer_1F8 = 2;
gCsFrameCount = 0;
D_ctx_80177A48[1] = 0.0f;
@ -3663,11 +3663,11 @@ void Andross_80193C4C(Player* player) {
break;
case 3:
if (player->timer_1F8 == 0) {
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0;
D_ctx_80178340 = D_ctx_80178358 = 0;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0;
gFillScreenAlpha = gFillScreenAlphaTarget = 0;
} else {
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0;
D_ctx_80178340 = D_ctx_80178358 = 255;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0;
gFillScreenAlpha = gFillScreenAlphaTarget = 255;
}
if ((gCsFrameCount == 20) && (D_play_800D2F68 != 0)) {
@ -3715,7 +3715,7 @@ void Andross_80193C4C(Player* player) {
D_i6_801A7F50 = gAmbientG;
D_i6_801A7F54 = gAmbientB;
D_ctx_801784D4 = -50.0f;
D_ctx_80177930 = 1;
gNextPlanetPath = 1;
for (i = 0; i < 200; i++) {
gObjects58[i].obj.status = OBJ_FREE;
}
@ -3747,7 +3747,7 @@ void Andross_80193C4C(Player* player) {
gCsCamAtX = gActors[10].obj.pos.x;
gCsCamAtY = gActors[10].obj.pos.y + 50.0f;
gCsCamAtZ = gActors[10].obj.pos.z;
if (!(gGameFrameCount & 3) && (gCsFrameCount < 215)) {
if (((gGameFrameCount % 4) == 0) && (gCsFrameCount < 215)) {
func_effect_8007797C(boss->obj.pos.x + RAND_FLOAT_CENTERED(350.0f), boss->obj.pos.y + 500.0f,
boss->obj.pos.z + RAND_FLOAT_CENTERED(350.0f), RAND_FLOAT_CENTERED(10.0f), 60.0f,
RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT(5.5f) + 15.5f);
@ -3761,13 +3761,13 @@ void Andross_80193C4C(Player* player) {
Math_SmoothStepToF(&D_ctx_80177A48[2], 10000.0f, 0.05f, 20.0f, 0.0f);
if (gCsFrameCount == 220) {
Andross_80193AE4(0);
if (gTeamShields[1] > 0) {
if (gTeamShields[TEAM_ID_FALCO] > 0) {
Andross_80193AE4(1);
}
if (gTeamShields[2] > 0) {
if (gTeamShields[TEAM_ID_SLIPPY] > 0) {
Andross_80193AE4(2);
}
if (gTeamShields[3] > 0) {
if (gTeamShields[TEAM_ID_PEPPY] > 0) {
Andross_80193AE4(3);
}
}
@ -3797,18 +3797,18 @@ void Andross_80193C4C(Player* player) {
gActors[10].obj.pos.y = 14500.0f;
gActors[10].unk_0F4.z = 70.0f;
gActors[10].unk_0F4.x = gActors[10].unk_0F4.y = 0.0f;
D_ctx_80178340 = D_ctx_80178358 = 255;
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0;
gFillScreenAlpha = gFillScreenAlphaTarget = 255;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0;
player->timer_1F8 = 3;
D_ctx_80178410 = 500;
}
if (gCsFrameCount == 250) {
D_ctx_80177840 = 100;
gLevelClearScreenTimer = 100;
}
break;
case 5:
if (player->timer_1F8 == 1) {
D_ctx_80178340 = D_ctx_80178358 = 0;
gFillScreenAlpha = gFillScreenAlphaTarget = 0;
}
if (D_play_800D2F68 != 0) {
if (gCsFrameCount >= 1000) {
@ -3818,7 +3818,7 @@ void Andross_80193C4C(Player* player) {
} else {
gCsCamEyeZ = gActors[10].obj.pos.z - 20.0f;
}
if ((gCsFrameCount >= 920) && (gTeamShields[3] > 0)) {
if ((gCsFrameCount >= 920) && (gTeamShields[TEAM_ID_PEPPY] > 0)) {
if (gCsFrameCount == 920) {
player->timer_1F8 = 25;
}
@ -3894,7 +3894,7 @@ void Andross_80193C4C(Player* player) {
Radio_PlayMessage(gMsg_ID_19430, RCID_PEPPY);
break;
case 900:
if (gTeamShields[3] > 0) {
if (gTeamShields[TEAM_ID_PEPPY] > 0) {
Radio_PlayMessage(gMsg_ID_19440, RCID_FOX);
}
break;
@ -3909,7 +3909,7 @@ void Andross_80193C4C(Player* player) {
D_ctx_80178288[109] += 1.0f;
D_ctx_80178290[109] += 0.5f;
temp_v0_2 = RAND_INT(100.0f);
D_ctx_80178298[109] = FILL_COLOR(D_bg_800C9C3C[temp_v0_2 & 0xF]);
D_ctx_80178298[109] = FILL_COLOR(D_bg_800C9C3C[temp_v0_2 % 16U]);
}
} else {
switch (gCsFrameCount) {
@ -3935,11 +3935,11 @@ void Andross_80193C4C(Player* player) {
Audio_FadeOutAll(40);
}
if (gCsFrameCount > 1400) {
D_ctx_8017835C = 4;
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0;
D_ctx_80178358 = 255;
if (D_ctx_80178340 == 255) {
gNextGameState = GSTATE_CREDITS;
gFillScreenAlphaStep = 4;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0;
gFillScreenAlphaTarget = 255;
if (gFillScreenAlpha == 255) {
gNextGameState = GSTATE_ENDING;
D_ending_80196D00 = 0;
D_play_800D3180[LEVEL_VENOM_ANDROSS] = Play_CheckMedalStatus(200) + 1;
Audio_SetAudioSpec(0, 0x1B);
@ -3947,9 +3947,9 @@ void Andross_80193C4C(Player* player) {
}
break;
case 100:
D_ctx_80178380[0] -= 4;
if (D_ctx_80178380[0] > 255) {
D_ctx_80178380[0] = 0;
gPlayerFillScreenAlphas[0] -= 4;
if (gPlayerFillScreenAlphas[0] > 255) {
gPlayerFillScreenAlphas[0] = 0;
}
Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, 0);
Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), 1);

View File

@ -51,46 +51,46 @@ void SectorY_80197C64(Effect* effect) {
void SectorY_80197CB8(Object_80* obj80) {
}
void SectorY_Boss314_Init(Boss* boss) {
boss->fwork[9] = 0.0f;
boss->swork[33] = 5500;
boss->timer_050 = 10;
boss->timer_058 = 0;
void SectorY_Boss314_Init(Boss314* this) {
this->fwork[9] = 0.0f;
this->swork[33] = 5500;
this->timer_050 = 10;
this->timer_058 = 0;
D_ctx_80177A10[8] = 0;
if (boss->index == 0) {
boss->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_60342A0);
boss->health = 150;
if (this->index == 0) {
this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_60342A0);
this->health = 150;
boss->swork[28] = 5;
boss->fwork[43] = 3.5f;
boss->fwork[45] = 40.0f;
this->swork[28] = 5;
this->fwork[43] = 3.5f;
this->fwork[45] = 40.0f;
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_9) {
boss->obj.pos.z = -28900.0f;
this->obj.pos.z = -28900.0f;
gObjects58[0].obj.pos.z = -30000.0f;
}
boss->unk_078.y = 0.0f;
SectorY_8019AEC0(boss);
this->unk_078.y = 0.0f;
SectorY_8019AEC0(this);
} else {
boss->fwork[34] = 2.8f;
boss->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_6034304);
boss->health = 100;
boss->swork[28] = 0;
boss->swork[25] = 1;
boss->fwork[45] = 35.0f;
this->fwork[34] = 2.8f;
this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_6034304);
this->health = 100;
this->swork[28] = 0;
this->swork[25] = 1;
this->fwork[45] = 35.0f;
if (boss->index == 1) {
boss->unk_078.y = 15.0f;
if (this->index == 1) {
this->unk_078.y = 15.0f;
} else {
boss->unk_078.y = 345.0f;
this->unk_078.y = 345.0f;
}
boss->vel.x = SIN_DEG(boss->unk_078.y) * boss->fwork[45] * 0.2f;
boss->vel.z = COS_DEG(boss->unk_078.y) * boss->fwork[45] * 0.2f;
SectorY_80198244(boss);
boss->timer_056 = 250;
this->vel.x = SIN_DEG(this->unk_078.y) * this->fwork[45] * 0.2f;
this->vel.z = COS_DEG(this->unk_078.y) * this->fwork[45] * 0.2f;
SectorY_80198244(this);
this->timer_056 = 250;
}
if (gLevelMode == LEVELMODE_ON_RAILS) {
@ -100,7 +100,7 @@ void SectorY_Boss314_Init(Boss* boss) {
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50);
}
Object_Kill(&boss->obj, boss->sfxSource);
Object_Kill(&this->obj, this->sfxSource);
}
}
@ -325,7 +325,7 @@ void SectorY_80198ABC(Boss* boss) {
switch (D_ctx_80177A10[8]) {
case 0:
if (gTeamShields[1] > 0) {
if (gTeamShields[TEAM_ID_FALCO] > 0) {
func_360_8002E4F8(gMsg_ID_14200, RCID_FALCO);
}
break;
@ -337,14 +337,15 @@ void SectorY_80198ABC(Boss* boss) {
break;
case 2:
if ((gTeamShields[2] > 0) && (gBosses[1].obj.status != OBJ_FREE) && (gBosses[2].obj.status != OBJ_FREE)) {
if ((gTeamShields[TEAM_ID_SLIPPY] > 0) && (gBosses[1].obj.status != OBJ_FREE) &&
(gBosses[2].obj.status != OBJ_FREE)) {
func_360_8002E4F8(gMsg_ID_14220, RCID_SLIPPY);
}
break;
}
D_ctx_80177A10[8] += (gGameFrameCount & 1) + 1;
D_ctx_80177A10[8] &= 3;
D_ctx_80177A10[8] += (gGameFrameCount % 2U) + 1;
D_ctx_80177A10[8] %= 4U;
}
void SectorY_80198CE4(Boss* boss) {
@ -414,7 +415,7 @@ void SectorY_80198F5C(Boss* boss) {
boss->unk_04C = 0;
boss->swork[36] = 0;
boss->swork[21] = 9;
boss->info.hitbox = SEGMENTED_TO_VIRTUAL(D_edata_800CBF34);
boss->info.hitbox = SEGMENTED_TO_VIRTUAL(gHitboxNone);
if (boss->index == 0) {
boss->timer_058 = 20000;
@ -559,7 +560,7 @@ void SectorY_80199438(Boss* boss) {
Math_SmoothStepToF(&gPlayer[0].camAt.y, gCsCamAtY, D_ctx_80177A48[0], 20000.0f, 0);
Math_SmoothStepToF(&gPlayer[0].camAt.z, gCsCamAtZ, D_ctx_80177A48[0], 20000.0f, 0);
}
if (!(gGameFrameCount & 3) && (boss->swork[36] == 0)) {
if (((gGameFrameCount % 4) == 0) && (boss->swork[36] == 0)) {
func_effect_8007C120(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, boss->vel.x, boss->vel.y,
boss->vel.z, 0.1f, 5);
}
@ -601,7 +602,7 @@ void SectorY_80199438(Boss* boss) {
gPlayer[0].state_1C8 = PLAYERSTATE_1C8_3;
func_play_800B63BC(&gPlayer[0], 1);
gPlayer[0].unk_014 = 0.0f;
if (gTeamShields[3] > 0) {
if (gTeamShields[TEAM_ID_PEPPY] > 0) {
func_360_8002E4F8(gMsg_ID_14230, RCID_PEPPY);
}
}
@ -1012,7 +1013,7 @@ void SectorY_8019AEEC(Boss* boss) {
if (boss->timer_056 > 55) {
Math_SmoothStepToF(&boss->vel.z, 80.0f, 0.1f, 2.0f, 0.5f);
Math_SmoothStepToF(&gActors[59].vel.z, 80.0f, 0.1f, 2.0f, 0.5f);
if (!(gGameFrameCount & 1)) {
if (((gGameFrameCount % 2) == 0)) {
func_effect_8007C120(boss->obj.pos.x, boss->obj.pos.y - 150.0f, boss->obj.pos.z, 0.0f, 0.0f, 0.0f,
0.1f, 5);
}
@ -1233,24 +1234,24 @@ void SectorY_8019C194(Boss* boss, f32 zSpeed, f32 xSpeed) {
switch (D_ctx_80177A10[8]) {
case 0:
if (gTeamShields[1] > 0) {
if (gTeamShields[TEAM_ID_FALCO] > 0) {
func_360_8002E4F8(gMsg_ID_14200, RCID_FALCO);
}
break;
case 1:
if (gTeamShields[3] > 0) {
if (gTeamShields[TEAM_ID_PEPPY] > 0) {
func_360_8002E4F8(gMsg_ID_14210, RCID_PEPPY);
}
break;
case 2:
if ((gTeamShields[2] > 0) && (gBosses[1].obj.status != OBJ_FREE) &&
if ((gTeamShields[TEAM_ID_SLIPPY] > 0) && (gBosses[1].obj.status != OBJ_FREE) &&
(gBosses[2].obj.status != OBJ_FREE)) {
func_360_8002E4F8(gMsg_ID_14220, RCID_SLIPPY);
}
break;
}
D_ctx_80177A10[8] += (gGameFrameCount & 1) + 1;
D_ctx_80177A10[8] &= 3;
D_ctx_80177A10[8] += (gGameFrameCount % 2U) + 1;
D_ctx_80177A10[8] %= 4U;
}
if ((xSpeed > 800.0f) || (zSpeed > 300.0f)) {
@ -1590,7 +1591,7 @@ void SectorY_8019C888(Boss* boss) {
}
}
}
if ((gBossFrameCount == 250) && (gTeamShields[2] != 0) && (boss->swork[34] == 0)) {
if ((gBossFrameCount == 250) && (gTeamShields[TEAM_ID_SLIPPY] != 0) && (boss->swork[34] == 0)) {
Radio_PlayMessage(gMsg_ID_2225, RCID_SLIPPY);
}
if ((gBossFrameCount == 620) && (boss->swork[34] == 0)) {
@ -1607,7 +1608,7 @@ void SectorY_8019C888(Boss* boss) {
boss->swork[30]++;
if (boss->swork[30] > 300 && ((ABS(D_edisplay_801615D0.z) + ABS(D_edisplay_801615D0.x)) < 3500.0f) &&
(gRadioState == 0)) {
if (gTeamShields[3] > 0) {
if (gTeamShields[TEAM_ID_PEPPY] > 0) {
Radio_PlayMessage(gMsg_ID_2282, RCID_PEPPY);
}
boss->swork[30] = 150;
@ -1615,14 +1616,15 @@ void SectorY_8019C888(Boss* boss) {
if (boss->swork[30] > 100) {
if ((((ABS(D_edisplay_801615D0.z) + ABS(D_edisplay_801615D0.x)) < 500.0f) && gTeamShields[1] > 0)) {
if ((((ABS(D_edisplay_801615D0.z) + ABS(D_edisplay_801615D0.x)) < 500.0f) &&
gTeamShields[TEAM_ID_FALCO] > 0)) {
Radio_PlayMessage(gMsg_ID_2233, RCID_FALCO);
}
}
if (D_edisplay_801615D0.x > 0.0f) {
gPlayer[0].flags_228 = 0x10;
gPlayer[0].flags_228 = PFLAG_228_4;
} else {
gPlayer[0].flags_228 = 0x20;
gPlayer[0].flags_228 = PFLAG_228_5;
}
} else {
@ -1635,7 +1637,7 @@ bool SectorY_8019DC4C(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void*
Boss* boss = (Boss*) data;
Vec3f sp10 = { 0.0f, 0.0f, 0.0f };
if (!(boss->timer_05C & 1)) {
if ((boss->timer_05C % 2) == 0) {
if (boss->index == 1) {
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 100, 100, 255, 255);
} else {
@ -1678,7 +1680,7 @@ bool SectorY_8019DE10(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void*
if (boss->index != 0) {
return SectorY_8019DC4C(limbIndex, dList, pos, rot, boss);
}
if (boss->timer_05C & 1) {
if ((boss->timer_05C % 2) != 0) {
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 32, 32, 255, 255);
} else {
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255);
@ -1697,7 +1699,7 @@ bool SectorY_8019DE10(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void*
case 4:
if (boss->swork[25] == 0) {
*dList = D_SY_6013600;
if (boss->swork[24] & 1) {
if ((boss->swork[24] % 2) != 0) {
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 255, 0, 255);
}
} else {
@ -1791,7 +1793,7 @@ void SectorY_8019E2C4(Boss* boss) {
f32 sp8C;
f32 sp88;
if ((boss->index != 0) || (boss->swork[24] & 1) || (boss->timer_05C & 1)) {
if ((boss->index != 0) || ((boss->swork[24] % 2) != 0) || ((boss->timer_05C % 2) != 0)) {
RCP_SetupDL_30(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
} else {
RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
@ -1912,8 +1914,9 @@ void SectorY_8019EB80(void) {
Rand_SetSeed(1, 29100, 9786);
for (i = 0; i <= (var_s1); i++, actor++) {
if (((i == 0) && (gTeamShields[3] <= 0.0f)) || ((i == 1) && (gTeamShields[2] <= 0.0f)) ||
((i == 2) && (gTeamShields[1] <= 0.0f))) {
if (((i == 0) && (gTeamShields[TEAM_ID_PEPPY] <= 0.0f)) ||
((i == 1) && (gTeamShields[TEAM_ID_SLIPPY] <= 0.0f)) ||
((i == 2) && (gTeamShields[TEAM_ID_FALCO] <= 0.0f))) {
continue;
}
Actor_Initialize(actor);
@ -2018,8 +2021,8 @@ void SectorY_8019EE60(Player* player) {
}
if (gCsFrameCount >= 180) {
D_ctx_80178358 = 255;
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255;
gFillScreenAlphaTarget = 255;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255;
}
if (gCsFrameCount == 230) {
D_ctx_80177A48[0] = 1.0f;
@ -2027,7 +2030,7 @@ void SectorY_8019EE60(Player* player) {
func_play_800A6148();
func_8001CA24(0);
Audio_KillSfxBySource(player->sfxSource);
D_ctx_80178340 = 250;
gFillScreenAlpha = 250;
player->timer_1F8 = 50;
player->unk_0D0 = 0.0f;
player->unk_0E4 = 0.0f;
@ -2065,9 +2068,9 @@ void SectorY_8019EE60(Player* player) {
if ((gCsFrameCount < 720) && (D_ctx_801782F8 != 0)) {
player->wings.unk_30 = (f32) (gGameFrameCount & 2) * 5.0f;
}
D_ctx_80178358 = 0;
D_ctx_8017835C = 4;
if (D_ctx_80178340 == 0) {
gFillScreenAlphaTarget = 0;
gFillScreenAlphaStep = 4;
if (gFillScreenAlpha == 0) {
player->unk_204 = 1;
}
@ -2114,10 +2117,10 @@ void SectorY_8019EE60(Player* player) {
Math_SmoothStepToF(&D_ctx_80177A48[2], 0.01f, 1.0f, 0.0016f, 0);
}
if (gCsFrameCount > 1530) {
D_ctx_80178358 = 255;
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0;
D_ctx_8017835C = 8;
if (D_ctx_80178340 == 255) {
gFillScreenAlphaTarget = 255;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0;
gFillScreenAlphaStep = 8;
if (gFillScreenAlpha == 255) {
Audio_FadeOutAll(10);
player->state_1C8 = PLAYERSTATE_1C8_6;
player->timer_1F8 = 0;
@ -2130,9 +2133,9 @@ void SectorY_8019EE60(Player* player) {
switch (gCsFrameCount) {
case 520:
if (gHitCount >= 100) {
D_ctx_80177930 = 1;
gNextPlanetPath = 1;
}
D_ctx_80177840 = 100;
gLevelClearScreenTimer = 100;
break;
case 580:
if (gHitCount >= 100) {
@ -2142,7 +2145,7 @@ void SectorY_8019EE60(Player* player) {
}
break;
case 725:
switch (gTeamShields[2]) {
switch (gTeamShields[TEAM_ID_SLIPPY]) {
case 0:
Radio_PlayMessage(gMsg_ID_20345, RCID_ROB64);
break;
@ -2160,7 +2163,7 @@ void SectorY_8019EE60(Player* player) {
break;
case 872:
switch (gTeamShields[3]) {
switch (gTeamShields[TEAM_ID_PEPPY]) {
case 0:
Radio_PlayMessage(gMsg_ID_20344, RCID_ROB64);
break;
@ -2177,7 +2180,7 @@ void SectorY_8019EE60(Player* player) {
}
break;
case 1018:
switch (gTeamShields[1]) {
switch (gTeamShields[TEAM_ID_FALCO]) {
case 0:
Radio_PlayMessage(gMsg_ID_20340, RCID_ROB64);
break;
@ -2207,17 +2210,17 @@ void SectorY_8019EE60(Player* player) {
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50);
break;
case 1380:
if (gTeamShields[3] > 0) {
if (gTeamShields[TEAM_ID_PEPPY] > 0) {
gActors[0].state = 2;
}
break;
case 1400:
if (gTeamShields[2] > 0) {
if (gTeamShields[TEAM_ID_SLIPPY] > 0) {
gActors[1].state = 2;
}
break;
case 1420:
if (gTeamShields[1] > 0) {
if (gTeamShields[TEAM_ID_FALCO] > 0) {
gActors[2].state = 2;
}
break;
@ -2260,7 +2263,7 @@ void SectorY_8019FF00(Actor* actor) {
Math_SmoothStepToF(&actor->obj.pos.y, actor->vwork[0].y, 0.02f, 2.0f, 0.0001f);
Math_SmoothStepToF(&actor->obj.pos.z, actor->vwork[0].z, 0.02f, 2.0f, 0.0001f);
Math_SmoothStepToF(&actor->unk_0F4.z, 0.0f, 0.02f, 0.2f, 0.0001f);
if ((actor->unk_0B6 != 0) && ((((actor->index & 7) * 10) + 1030) < gCsFrameCount)) {
if ((actor->unk_0B6 != 0) && ((((s32) (actor->index % 8U) * 10) + 1030) < gCsFrameCount)) {
actor->state = 4;
}
break;
@ -2514,10 +2517,10 @@ void SectorY_801A0AC0(Player* player) {
/* fallthrough */
case 1:
if (gCsFrameCount < 3) {
D_ctx_80178340 = 255;
gFillScreenAlpha = 255;
}
if ((gGameFrameCount & 0xC) && !(gGameFrameCount & 3)) {
if ((gGameFrameCount & 0xC) && ((gGameFrameCount % 4) == 0)) {
spB0 = (((gGameFrameCount & 0xC) >> 2) + 4);
for (i = 10; i < ARRAY_COUNT(gActors); i++) {
if (gActors[i].obj.status == OBJ_FREE) {
@ -2526,8 +2529,8 @@ void SectorY_801A0AC0(Player* player) {
}
}
}
if (!(gGameFrameCount & 3)) {
spB0 = ((gGameFrameCount & 0xF) >> 2) + 4;
if (((gGameFrameCount % 4) == 0)) {
spB0 = ((s32) (gGameFrameCount % 16U) >> 2) + 4;
if (spB0 == 4) {
if (gCsFrameCount < 140) {
spB0 = 11;
@ -2576,7 +2579,7 @@ void SectorY_801A0AC0(Player* player) {
Math_SmoothStepToAngle(&gActors[6].obj.rot.z, 180.0f, 1.0f, 0.5f, 1.0f);
Math_SmoothStepToAngle(&gActors[7].obj.rot.z, 181.0f, 1.0f, 0.5f, 1.0f);
} else {
if (!(gGameFrameCount & 0xF) && (gCsFrameCount >= 105) && (gCsFrameCount <= 140)) {
if (((gGameFrameCount % 16) == 0) && (gCsFrameCount >= 105) && (gCsFrameCount <= 140)) {
for (i = 10; i < ARRAY_COUNT(gActors); i++) {
if (gActors[i].obj.status == OBJ_FREE) {
@ -2608,7 +2611,7 @@ void SectorY_801A0AC0(Player* player) {
}
}
if (!(gGameFrameCount & 1) && (gCsFrameCount >= 110)) {
if (((gGameFrameCount % 2) == 0) && (gCsFrameCount >= 110)) {
Matrix_RotateY(gCalcMatrix, gActors[8].obj.rot.y * M_DTOR, 0);
Matrix_RotateX(gCalcMatrix, gActors[8].obj.rot.x * M_DTOR, 1);
Matrix_RotateZ(gCalcMatrix, gActors[8].obj.rot.z * M_DTOR, 1);
@ -2626,12 +2629,13 @@ void SectorY_801A0AC0(Player* player) {
if (gGameFrameCount & 0x14) {
for (i = 12; i < ARRAY_COUNT(gActors); i++) {
if (gActors[i].obj.status == OBJ_FREE) {
SectorY_801A0A08(&gActors[i], gActors[8].obj.pos.x + 1000.0f,
(gActors[8].obj.pos.y + 2000.0f + (((gGameFrameCount & 3) - 2) * 2000.0f)) +
RAND_FLOAT_CENTERED(4000.0f),
(gActors[8].obj.pos.z + 4000.0f + (((gGameFrameCount & 3) - 2) * 3000.0f)) +
RAND_FLOAT_CENTERED(7000.0f),
RAND_FLOAT(10.0f));
SectorY_801A0A08(
&gActors[i], gActors[8].obj.pos.x + 1000.0f,
(gActors[8].obj.pos.y + 2000.0f + ((s32) ((gGameFrameCount % 4U) - 2) * 2000.0f)) +
RAND_FLOAT_CENTERED(4000.0f),
(gActors[8].obj.pos.z + 4000.0f + ((s32) ((gGameFrameCount % 4U) - 2) * 3000.0f)) +
RAND_FLOAT_CENTERED(7000.0f),
RAND_FLOAT(10.0f));
break;
}
}
@ -2640,10 +2644,10 @@ void SectorY_801A0AC0(Player* player) {
gActors[9].scale += 32.0f;
if (gCsFrameCount >= 245) {
gActors[9].fwork[4] += 8;
D_ctx_80178348 = 255;
D_ctx_80178350 = 255;
D_ctx_80178354 = 255;
D_ctx_80178358 = 255;
gFillScreenRed = 255;
gFillScreenGreen = 255;
gFillScreenBlue = 255;
gFillScreenAlphaTarget = 255;
} else {
gActors[9].fwork[4] = 0.5f;
}
@ -2723,11 +2727,11 @@ void SectorY_801A0AC0(Player* player) {
case 260:
gActors[9].fwork[4] = gActors[9].scale = 1000;
gActors[9].obj.pos.x = -8300.0f;
D_ctx_80178348 = 255;
D_ctx_80178350 = 255;
D_ctx_80178354 = 255;
D_ctx_80178340 = 255;
D_ctx_80178358 = 0;
gFillScreenRed = 255;
gFillScreenGreen = 255;
gFillScreenBlue = 255;
gFillScreenAlpha = 255;
gFillScreenAlphaTarget = 0;
Object_Kill(&gActors[8].obj, gActors[8].sfxSource);
player->unk_1D0++;
player->camEye.x = gCsCamEyeX = 0.0f;
@ -2759,10 +2763,10 @@ void SectorY_801A0AC0(Player* player) {
break;
case 2:
if (gCsFrameCount < 300) {
D_ctx_80178348 = 255;
D_ctx_80178350 = 255;
D_ctx_80178354 = 255;
D_ctx_80178340 = 255;
gFillScreenRed = 255;
gFillScreenGreen = 255;
gFillScreenBlue = 255;
gFillScreenAlpha = 255;
D_ctx_801784D4 = -58.0f;
}
if (gCsFrameCount >= 300) {
@ -3176,7 +3180,7 @@ void SectorY_801A0AC0(Player* player) {
player->pos.z = player->unk_138 = 0.0f;
player->unk_0D0 = D_play_80161A54;
AUDIO_PLAY_BGM(SEQ_ID_SECTOR_Y | SEQ_FLAG);
D_ctx_80177838 = 100;
gLevelStatusScreenTimer = 100;
player->state_1C8 = PLAYERSTATE_1C8_3;
player->unk_1D0 = 0;
player->timer_1F8 = 0;
@ -3249,7 +3253,7 @@ void SectorY_801A3B50(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel
}
}
void SectorY_Actor204_Update(Actor* actor) {
void SectorY_Actor204_Update(Actor204* this) {
f32 sp1E4;
f32 sp1E0;
s32 i;
@ -3263,191 +3267,191 @@ void SectorY_Actor204_Update(Actor* actor) {
s32 pad;
sp4C = 30;
actor->iwork[14] = actor->unk_0B4 - 48;
actor->info.drawType = 2;
if (actor->iwork[18] != 0) {
actor->iwork[18]--;
this->iwork[14] = this->unk_0B4 - 48;
this->info.drawType = 2;
if (this->iwork[18] != 0) {
this->iwork[18]--;
}
if ((actor->unk_048 != 0) && (actor->unk_046 != 3)) {
switch (actor->unk_048) {
if ((this->unk_048 != 0) && (this->unk_046 != 3)) {
switch (this->unk_048) {
case 1:
actor->unk_046 = 1;
actor->timer_0BE = 50;
actor->iwork[19] = 0;
this->unk_046 = 1;
this->timer_0BE = 50;
this->iwork[19] = 0;
break;
case 2:
actor->unk_046 = 1;
actor->timer_0BE = 20;
actor->iwork[19] = 0;
this->unk_046 = 1;
this->timer_0BE = 20;
this->iwork[19] = 0;
break;
case 3:
actor->unk_046 = 2;
actor->unk_0B6 = 0;
this->unk_046 = 2;
this->unk_0B6 = 0;
break;
case 4:
actor->unk_046 = 0;
actor->unk_0B6 = 0;
this->unk_046 = 0;
this->unk_0B6 = 0;
break;
case 8:
actor->unk_046 = 1;
actor->timer_0BE = 50;
actor->iwork[19] = 1;
this->unk_046 = 1;
this->timer_0BE = 50;
this->iwork[19] = 1;
break;
case 9:
actor->unk_046 = 1;
actor->timer_0BE = 20;
actor->iwork[19] = 1;
this->unk_046 = 1;
this->timer_0BE = 20;
this->iwork[19] = 1;
break;
case 10:
actor->unk_046 = 1;
actor->timer_0BE = 50;
actor->iwork[19] = -1;
this->unk_046 = 1;
this->timer_0BE = 50;
this->iwork[19] = -1;
break;
case 11:
actor->unk_046 = 1;
actor->timer_0BE = 20;
actor->iwork[19] = -1;
this->unk_046 = 1;
this->timer_0BE = 20;
this->iwork[19] = -1;
break;
case 6:
actor->unk_046 = 4;
actor->unk_0B6 = 0;
this->unk_046 = 4;
this->unk_0B6 = 0;
break;
case 5:
actor->unk_046 = 5;
actor->unk_0B6 = Animation_GetFrameCount(&D_SY_602B778) - 1;
this->unk_046 = 5;
this->unk_0B6 = Animation_GetFrameCount(&D_SY_602B778) - 1;
break;
case 7:
actor->unk_046 = 6;
actor->unk_0B6 = Animation_GetFrameCount(&D_SY_602B778) - 1;
this->unk_046 = 6;
this->unk_0B6 = Animation_GetFrameCount(&D_SY_602B778) - 1;
break;
}
actor->unk_048 = 0;
actor->fwork[15] = 0.0f;
this->unk_048 = 0;
this->fwork[15] = 0.0f;
}
switch (actor->unk_046) {
switch (this->unk_046) {
case 0:
i = actor->iwork[17];
i = this->iwork[17];
if (i != 0) {
if (i == 1) {
actor->unk_0B6 = Animation_GetFrameCount(&D_SY_60265B4) - 1;
sp4C = Animation_GetFrameData(&D_SY_60265B4, actor->unk_0B6, sp68);
this->unk_0B6 = Animation_GetFrameCount(&D_SY_60265B4) - 1;
sp4C = Animation_GetFrameData(&D_SY_60265B4, this->unk_0B6, sp68);
} else if (i == 2) {
actor->unk_0B6 = Animation_GetFrameCount(&D_SY_602B8DC) - 1;
sp4C = Animation_GetFrameData(&D_SY_602B8DC, actor->unk_0B6, sp68);
this->unk_0B6 = Animation_GetFrameCount(&D_SY_602B8DC) - 1;
sp4C = Animation_GetFrameData(&D_SY_602B8DC, this->unk_0B6, sp68);
}
} else {
actor->unk_0B6 = Animation_GetFrameCount(&D_SY_602CEB4);
sp4C = Animation_GetFrameData(&D_SY_602CEB4, actor->unk_0B6, sp68);
this->unk_0B6 = Animation_GetFrameCount(&D_SY_602CEB4);
sp4C = Animation_GetFrameData(&D_SY_602CEB4, this->unk_0B6, sp68);
}
break;
case 1:
i = actor->iwork[17];
i = this->iwork[17];
if (i != 0) {
if (i == 1) {
actor->unk_0B6 = Animation_GetFrameCount(&D_SY_60265B4) - 1;
sp4C = Animation_GetFrameData(&D_SY_60265B4, actor->unk_0B6, sp68);
this->unk_0B6 = Animation_GetFrameCount(&D_SY_60265B4) - 1;
sp4C = Animation_GetFrameData(&D_SY_60265B4, this->unk_0B6, sp68);
} else if (i == 2) {
actor->unk_0B6 = Animation_GetFrameCount(&D_SY_602B8DC) - 1;
sp4C = Animation_GetFrameData(&D_SY_602B8DC, actor->unk_0B6, sp68);
this->unk_0B6 = Animation_GetFrameCount(&D_SY_602B8DC) - 1;
sp4C = Animation_GetFrameData(&D_SY_602B8DC, this->unk_0B6, sp68);
}
} else {
actor->unk_0B6 = Animation_GetFrameCount(&D_SY_602A2CC) - 1;
sp4C = Animation_GetFrameData(&D_SY_602A2CC, actor->unk_0B6, sp68);
this->unk_0B6 = Animation_GetFrameCount(&D_SY_602A2CC) - 1;
sp4C = Animation_GetFrameData(&D_SY_602A2CC, this->unk_0B6, sp68);
}
if (actor->timer_0BE == 15) {
actor->timer_0C4 = 4;
actor->fwork[19] = 30.0f;
if (actor->iwork[19] < 0) {
ActorEvent_8006F254(actor);
if (this->timer_0BE == 15) {
this->timer_0C4 = 4;
this->fwork[19] = 30.0f;
if (this->iwork[19] < 0) {
ActorEvent_8006F254(this);
} else {
sp1E4 = gPlayer[0].pos.x;
sp1E0 = gPlayer[0].pos.y;
if (actor->iwork[19] != 0) {
if (this->iwork[19] != 0) {
gPlayer[0].pos.x += RAND_FLOAT_CENTERED(300.0f);
gPlayer[0].pos.y += RAND_FLOAT_CENTERED(300.0f);
}
func_effect_8007F11C(0x162, actor->fwork[16], actor->fwork[17], actor->fwork[18], 100.0f);
func_effect_8007F11C(OBJ_EFFECT_354, this->fwork[16], this->fwork[17], this->fwork[18], 100.0f);
gPlayer[0].pos.x = sp1E4;
gPlayer[0].pos.y = sp1E0;
AUDIO_PLAY_SFX(0x2900306B, actor->sfxSource, 4);
AUDIO_PLAY_SFX(0x2900306B, this->sfxSource, 4);
}
actor->unk_048 = 0;
this->unk_048 = 0;
}
if (actor->timer_0BE == 0) {
actor->unk_0B6 = 0;
actor->unk_046 = 0;
actor->fwork[15] = 0.0f;
if (this->timer_0BE == 0) {
this->unk_0B6 = 0;
this->unk_046 = 0;
this->fwork[15] = 0.0f;
}
break;
case 2:
if (actor->unk_0B6 < (Animation_GetFrameCount(&D_SY_6029B48) - 1)) {
actor->unk_0B6++;
if (this->unk_0B6 < (Animation_GetFrameCount(&D_SY_6029B48) - 1)) {
this->unk_0B6++;
}
sp4C = Animation_GetFrameData(&D_SY_6029B48, actor->unk_0B6, sp68);
sp4C = Animation_GetFrameData(&D_SY_6029B48, this->unk_0B6, sp68);
break;
case 4:
actor->unk_0B6++;
if (actor->unk_0B6 >= (Animation_GetFrameCount(&D_SY_602B778) - 1)) {
actor->unk_046 = 0;
actor->iwork[17] = 0;
actor->fwork[15] = 0.0f;
this->unk_0B6++;
if (this->unk_0B6 >= (Animation_GetFrameCount(&D_SY_602B778) - 1)) {
this->unk_046 = 0;
this->iwork[17] = 0;
this->fwork[15] = 0.0f;
}
sp4C = Animation_GetFrameData(&D_SY_602B778, actor->unk_0B6, sp68);
sp4C = Animation_GetFrameData(&D_SY_602B778, this->unk_0B6, sp68);
break;
case 5:
case 6:
actor->unk_0B6 -= 1;
if (actor->unk_0B6 < 8) {
actor->fwork[15] = 0.1f;
if (actor->unk_046 == 5) {
actor->iwork[17] = 1;
this->unk_0B6 -= 1;
if (this->unk_0B6 < 8) {
this->fwork[15] = 0.1f;
if (this->unk_046 == 5) {
this->iwork[17] = 1;
} else {
actor->iwork[17] = 2;
this->iwork[17] = 2;
}
actor->unk_046 = 0;
this->unk_046 = 0;
}
sp4C = Animation_GetFrameData(&D_SY_602B778, actor->unk_0B6, sp68);
sp4C = Animation_GetFrameData(&D_SY_602B778, this->unk_0B6, sp68);
break;
case 3:
actor->unk_0B6++;
if (actor->unk_0B6 >= Animation_GetFrameCount(&D_SY_6003348)) {
actor->unk_0B6 = Animation_GetFrameCount(&D_SY_6003348) - 1;
this->unk_0B6++;
if (this->unk_0B6 >= Animation_GetFrameCount(&D_SY_6003348)) {
this->unk_0B6 = Animation_GetFrameCount(&D_SY_6003348) - 1;
}
sp4C = Animation_GetFrameData(&D_SY_6003348, actor->unk_0B6, sp68);
if ((actor->timer_0BE % 4U) == 0) {
func_effect_8007D2C8(RAND_FLOAT_CENTERED(150.0f) + actor->obj.pos.x,
RAND_FLOAT_CENTERED(150.0f) + actor->obj.pos.y, actor->obj.pos.z + 30.0f, 4.0f);
sp4C = Animation_GetFrameData(&D_SY_6003348, this->unk_0B6, sp68);
if ((this->timer_0BE % 4U) == 0) {
func_effect_8007D2C8(RAND_FLOAT_CENTERED(150.0f) + this->obj.pos.x,
RAND_FLOAT_CENTERED(150.0f) + this->obj.pos.y, this->obj.pos.z + 30.0f, 4.0f);
}
if (actor->timer_0BE == 5U) {
func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, actor->vel.x, actor->vel.y,
actor->vel.z, 8.0f, 10);
func_effect_8007B344(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 8.0f, 5);
AUDIO_PLAY_SFX(0x2903A060, actor->sfxSource, 4);
if (this->timer_0BE == 5U) {
func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y,
this->vel.z, 8.0f, 10);
func_effect_8007B344(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 8.0f, 5);
AUDIO_PLAY_SFX(0x2903A060, this->sfxSource, 4);
}
if (actor->timer_0BE == 0) {
Object_Kill(&actor->obj, actor->sfxSource);
func_enmy_80066254(actor);
if (this->timer_0BE == 0) {
Object_Kill(&this->obj, this->sfxSource);
Actor_Despawn(this);
for (i = 10; i < 24; i++) {
SectorY_801A3B50(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, RAND_FLOAT_CENTERED(50.0f),
RAND_FLOAT_CENTERED(50.0f), actor->vel.z + RAND_FLOAT_CENTERED(50.0f), i);
SectorY_801A3B50(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, RAND_FLOAT_CENTERED(50.0f),
RAND_FLOAT_CENTERED(50.0f), this->vel.z + RAND_FLOAT_CENTERED(50.0f), i);
}
}
break;
}
if ((actor->unk_046 == 1) || (actor->unk_046 == 2)) {
Matrix_RotateZ(gCalcMatrix, -actor->vwork[29].z * M_DTOR, 0);
Matrix_RotateX(gCalcMatrix, -actor->vwork[29].x * M_DTOR, 1);
Matrix_RotateY(gCalcMatrix, -actor->vwork[29].y * M_DTOR, 1);
Matrix_RotateZ(gCalcMatrix, -actor->obj.rot.z * M_DTOR, 1);
Matrix_RotateX(gCalcMatrix, -actor->obj.rot.x * M_DTOR, 1);
if (actor->iwork[17] == 0) {
Matrix_RotateY(gCalcMatrix, -actor->obj.rot.y * M_DTOR, 1);
if ((this->unk_046 == 1) || (this->unk_046 == 2)) {
Matrix_RotateZ(gCalcMatrix, -this->vwork[29].z * M_DTOR, 0);
Matrix_RotateX(gCalcMatrix, -this->vwork[29].x * M_DTOR, 1);
Matrix_RotateY(gCalcMatrix, -this->vwork[29].y * M_DTOR, 1);
Matrix_RotateZ(gCalcMatrix, -this->obj.rot.z * M_DTOR, 1);
Matrix_RotateX(gCalcMatrix, -this->obj.rot.x * M_DTOR, 1);
if (this->iwork[17] == 0) {
Matrix_RotateY(gCalcMatrix, -this->obj.rot.y * M_DTOR, 1);
}
sp5C.x = gPlayer[0].pos.x - actor->obj.pos.x;
sp5C.y = gPlayer[0].pos.y - actor->obj.pos.y;
sp5C.z = gPlayer[0].pos.z - actor->obj.pos.z;
sp5C.x = gPlayer[0].pos.x - this->obj.pos.x;
sp5C.y = gPlayer[0].pos.y - this->obj.pos.y;
sp5C.z = gPlayer[0].pos.z - this->obj.pos.z;
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp5C, &sp50);
sp1D4 = Math_RadToDeg(Math_Atan2F(sp50.x, sp50.z));
sp1D8 = Math_RadToDeg(-Math_Atan2F(sp50.y, sqrtf(SQ(sp50.x) + SQ(sp50.z))));
@ -3457,9 +3461,9 @@ void SectorY_Actor204_Update(Actor* actor) {
if ((sp1D8 < 270.0f) && (sp1D8 > 180.0f)) {
sp1D8 = 270.0f;
}
if (actor->iwork[17] != 0) {
Math_SmoothStepToAngle(&actor->obj.rot.y, sp1D4, 0.1f, 2.0f, 0.0f);
sp1D0 = sp1D4 - actor->obj.rot.y;
if (this->iwork[17] != 0) {
Math_SmoothStepToAngle(&this->obj.rot.y, sp1D4, 0.1f, 2.0f, 0.0f);
sp1D0 = sp1D4 - this->obj.rot.y;
sp1D4 = 0.0f;
} else {
if ((sp1D4 > 90.0f) && (sp1D4 < 180.0f)) {
@ -3468,73 +3472,73 @@ void SectorY_Actor204_Update(Actor* actor) {
if ((sp1D4 < 270.0f) && (sp1D4 > 180.0f)) {
sp1D4 = 270.0f;
}
sp1D0 = sp1D4 - actor->fwork[0x15];
sp1D0 = sp1D4 - this->fwork[0x15];
}
} else {
sp1D0 = sp1D8 = sp1D4 = 0.0f;
}
Math_SmoothStepToAngle(&actor->fwork[0x15], sp1D4, 0.1f, 2.0f, 0.0f);
Math_SmoothStepToAngle(&actor->fwork[20], sp1D8, 0.1f, 2.0f, 0.0f);
Math_SmoothStepToAngle(&this->fwork[0x15], sp1D4, 0.1f, 2.0f, 0.0f);
Math_SmoothStepToAngle(&this->fwork[20], sp1D8, 0.1f, 2.0f, 0.0f);
if (sp1D0 < 0.0f) {
sp1D0 += 360.0f;
}
Math_SmoothStepToAngle(&actor->fwork[28], sp1D0, 0.2f, 5.0f, 0.0f);
Math_SmoothStepToAngle(&actor->fwork[29], sp1D8, 0.2f, 5.0f, 0.0f);
Math_SmoothStepToVec3fArray(sp68, actor->vwork, 1, sp4C, actor->fwork[15], 100.0f, 0.0f);
Math_SmoothStepToAngle(&this->fwork[28], sp1D0, 0.2f, 5.0f, 0.0f);
Math_SmoothStepToAngle(&this->fwork[29], sp1D8, 0.2f, 5.0f, 0.0f);
Math_SmoothStepToVec3fArray(sp68, this->vwork, 1, sp4C, this->fwork[15], 100.0f, 0.0f);
if ((actor->unk_046 == 6) || (actor->unk_046 == 5)) {
Math_SmoothStepToF(&actor->fwork[15], 0.3f, 1.0f, 0.05f, 0.0f);
if ((this->unk_046 == 6) || (this->unk_046 == 5)) {
Math_SmoothStepToF(&this->fwork[15], 0.3f, 1.0f, 0.05f, 0.0f);
} else {
Math_SmoothStepToF(&actor->fwork[15], 0.2f, 1.0f, 0.015f, 0.0f);
Math_SmoothStepToF(&this->fwork[15], 0.2f, 1.0f, 0.015f, 0.0f);
}
Math_SmoothStepToF(&actor->fwork[19], 0.0f, 0.2f, 10.0f, 0.0f);
Math_SmoothStepToF(&this->fwork[19], 0.0f, 0.2f, 10.0f, 0.0f);
if (actor->iwork[17] != 0) {
Math_SmoothStepToF(&actor->fwork[27], 1.5f, 1.0f, 0.2f, 0.0f);
if (this->iwork[17] != 0) {
Math_SmoothStepToF(&this->fwork[27], 1.5f, 1.0f, 0.2f, 0.0f);
} else {
Math_SmoothStepToF(&actor->fwork[27], 0.0f, 1.0f, 0.05f, 0.0f);
Math_SmoothStepToF(&this->fwork[27], 0.0f, 1.0f, 0.05f, 0.0f);
}
actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_603405C);
if (actor->unk_046 == 1) {
actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_603421C);
this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_603405C);
if (this->unk_046 == 1) {
this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_603421C);
}
i = actor->iwork[17];
i = this->iwork[17];
if (i != 0) {
if (i == 1) {
actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_6034124);
this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_6034124);
} else if (i == 2) {
actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_60341A8);
this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_60341A8);
}
}
if (actor->unk_046 == 2) {
actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_60340C0);
if (this->unk_046 == 2) {
this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_60340C0);
}
if ((actor->unk_0D0 != 0) && (actor->unk_046 != 3)) {
if ((this->unk_0D0 != 0) && (this->unk_046 != 3)) {
if (actor->unk_0D0 == 2) {
actor->unk_0D2 = 1;
if (this->unk_0D0 == 2) {
this->unk_0D2 = 1;
}
actor->unk_0D0 = 0;
if (actor->unk_0D2 == 0) {
actor->iwork[18] = 15;
AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4);
this->unk_0D0 = 0;
if (this->unk_0D2 == 0) {
this->iwork[18] = 15;
AUDIO_PLAY_SFX(0x29121007, this->sfxSource, 4);
} else {
AUDIO_PLAY_SFX(0x2903300E, actor->sfxSource, 4);
actor->timer_0C6 = 15;
func_effect_8007C120(actor->unk_0D8.x, actor->unk_0D8.y, actor->unk_0D8.z, actor->vel.x, actor->vel.y,
actor->vel.z, 0.1f, 10);
actor->health -= actor->damage;
AUDIO_PLAY_SFX(0x2903300E, this->sfxSource, 4);
this->timer_0C6 = 15;
func_effect_8007C120(this->unk_0D8.x, this->unk_0D8.y, this->unk_0D8.z, this->vel.x, this->vel.y,
this->vel.z, 0.1f, 10);
this->health -= this->damage;
if (actor->health <= 0) {
actor->unk_046 = 3;
actor->unk_048 = 0;
actor->unk_0B6 = 0;
actor->timer_0BE = 50;
actor->fwork[15] = 0.0f;
if (this->health <= 0) {
this->unk_046 = 3;
this->unk_048 = 0;
this->unk_0B6 = 0;
this->timer_0BE = 50;
this->fwork[15] = 0.0f;
}
}
}
@ -3548,14 +3552,14 @@ bool SectorY_801A4A18(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void*
Actor* actor = (Actor*) data;
if (limbIndex == 4) {
if (!(actor->iwork[18] & 1)) {
if ((actor->iwork[18] % 2) == 0) {
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, D_i6_801A6B28[actor->iwork[14]], D_i6_801A6B34[actor->iwork[14]],
D_i6_801A6B40[actor->iwork[14]], 255);
} else {
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 255, 0, 255);
}
} else {
if (!(actor->timer_0C6 & 1)) {
if ((actor->timer_0C6 % 2) == 0) {
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, D_i6_801A6B28[actor->iwork[14]], D_i6_801A6B34[actor->iwork[14]],
D_i6_801A6B40[actor->iwork[14]], 255);
} else {
@ -3598,20 +3602,20 @@ static f32 D_i6_801A6B64[5] = {
0.3f, 0.7f, 1.3f, 0.7f, 0.3f,
};
void SectorY_Actor204_Draw(Actor* actor) {
void SectorY_Actor204_Draw(Actor204* this) {
f32 scale;
RCP_SetupDL_30(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
Animation_DrawSkeleton(2, D_SY_602D140, actor->vwork, SectorY_801A4A18, SectorY_801A4C34, actor, gCalcMatrix);
Animation_DrawSkeleton(2, D_SY_602D140, this->vwork, SectorY_801A4A18, SectorY_801A4C34, this, gCalcMatrix);
if (actor->timer_0C4 != 0) {
scale = D_i6_801A6B64[actor->timer_0C4];
if (this->timer_0C4 != 0) {
scale = D_i6_801A6B64[this->timer_0C4];
RCP_SetupDL_49();
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255);
gDPSetEnvColor(gMasterDisp++, 255, 48, 0, 255);
Matrix_Pop(&gGfxMatrix);
Matrix_Push(&gGfxMatrix);
Matrix_Translate(gGfxMatrix, actor->fwork[16], actor->fwork[17], actor->fwork[18] + D_ctx_80177D20, 1);
Matrix_Translate(gGfxMatrix, this->fwork[16], this->fwork[17], this->fwork[18] + D_ctx_80177D20, 1);
Matrix_Scale(gGfxMatrix, scale, scale, scale, 1);
Matrix_SetGfxMtx(&gMasterDisp);
@ -3627,7 +3631,7 @@ void SectorY_801A4E44(Object_80* obj80) {
AUDIO_PLAY_SFX(0x1900404F, obj80->sfxSource, 4);
obj80->state++;
}
if (!(gGameFrameCount & 3)) {
if (((gGameFrameCount % 4) == 0)) {
Matrix_RotateY(gCalcMatrix, obj80->obj.rot.y * M_DTOR, 0);
Matrix_RotateX(gCalcMatrix, obj80->obj.rot.x * M_DTOR, 1);
Matrix_RotateZ(gCalcMatrix, obj80->obj.rot.z * M_DTOR, 1);
@ -3666,7 +3670,7 @@ void SectorY_801A52B8(Object_80* obj80) {
AUDIO_PLAY_SFX(0x1900404F, obj80->sfxSource, 4);
obj80->state++;
}
if (!(gGameFrameCount & 3)) {
if (((gGameFrameCount % 4) == 0)) {
Matrix_RotateY(gCalcMatrix, obj80->obj.rot.y * M_DTOR, 0);
Matrix_RotateX(gCalcMatrix, obj80->obj.rot.x * M_DTOR, 1);
Matrix_RotateZ(gCalcMatrix, obj80->obj.rot.z * M_DTOR, 1);

View File

@ -146,7 +146,7 @@ void Turret_801A5AD4(Player* player) {
if (player->unk_1BC == 0) {
gControllerLock = 0;
player->unk_1B0++;
D_ctx_80177838 = 50;
gLevelStatusScreenTimer = 50;
}
}
sp2C = (f32) gControllerPress[player->num].stick_x;
@ -189,16 +189,16 @@ void Turret_801A5AD4(Player* player) {
player->flags_228 = 0;
if (player->unk_008 > 20.0f) {
player->flags_228 |= 1;
player->flags_228 |= PFLAG_228_0;
}
if (player->unk_008 < -20.0f) {
player->flags_228 |= 2;
player->flags_228 |= PFLAG_228_1;
}
if (player->unk_00C > 20.0f) {
player->flags_228 |= 8;
player->flags_228 |= PFLAG_228_3;
}
if (player->unk_00C < -20.0f) {
player->flags_228 |= 4;
player->flags_228 |= PFLAG_228_2;
}
if (gControllerPress[player->num].button & B_BUTTON) {
player->unk_008 = player->unk_00C = 0.0f;

View File

@ -39,12 +39,12 @@ void Venom2_80196314(Actor* actor) {
switch (actor->state) {
case 0:
D_360_8015F928 = 0;
D_360_8015F908 = 0;
gAllRangeEventTimer = 0;
gStarWolfMsgTimer = 0;
for (i = 0; i < 6; i++) {
D_ctx_80177CF0[i] = 1;
D_ctx_80177CD0[i] = 1;
gSavedStarWolfTeamAlive[i] = 1;
gStarWolfTeamAlive[i] = 1;
}
if (player->state_1C8 == PLAYERSTATE_1C8_3) {
@ -53,10 +53,10 @@ void Venom2_80196314(Actor* actor) {
player->pos.z = 8000.0f;
player->pos.y = 670.0f;
D_360_800C9B4C = 120;
D_360_8015F908 = 1000;
gStarWolfMsgTimer = 1000;
} else {
D_360_800C9B4C = 320;
D_360_8015F908 = 1200;
gStarWolfMsgTimer = 1200;
actor->state = 1;
player->pos.x = 0.0f;
player->pos.z = 16000.0f;
@ -72,7 +72,7 @@ void Venom2_80196314(Actor* actor) {
otherActor->unk_0F4.x = 340.0f;
}
D_ctx_80178340 = D_ctx_80178358 = 255;
gFillScreenAlpha = gFillScreenAlphaTarget = 255;
}
func_play_800B63BC(player, 1);
/* fallthrough */
@ -86,16 +86,16 @@ void Venom2_80196314(Actor* actor) {
actor->state = 2;
player->state_1C8 = PLAYERSTATE_1C8_3;
player->unk_014 = 0.0001f;
D_ctx_80177838 = 80;
gLevelStatusScreenTimer = 80;
}
}
if (D_360_8015F928 == 80) {
if (gAllRangeEventTimer == 80) {
Radio_PlayMessage(gMsg_ID_19010, RCID_FOX);
}
break;
case 2:
Venom2_801962F4(actor);
if (((D_360_800C9B4C + 100) < D_360_8015F928) && (gActors[4].obj.status == OBJ_FREE) &&
if (((D_360_800C9B4C + 100) < gAllRangeEventTimer) && (gActors[4].obj.status == OBJ_FREE) &&
(gActors[5].obj.status == OBJ_FREE) && (gActors[6].obj.status == OBJ_FREE) &&
(gActors[7].obj.status == OBJ_FREE) && (actor->timer_0BE == 0)) {
actor->timer_0BE = 80;
@ -103,8 +103,8 @@ void Venom2_80196314(Actor* actor) {
if ((actor->timer_0BE == 1) && (player->state_1C8 != PLAYERSTATE_1C8_7)) {
for (i = 1; i < ARRAY_COUNT(gTeamShields); i++) {
D_ctx_80177C38[i] = gSavedTeamShields[i];
D_ctx_801778F0[i] = gSavedTeamShields[i];
gPrevPlanetTeamShields[i] = gSavedTeamShields[i];
gPrevPlanetSavedTeamShields[i] = gSavedTeamShields[i];
gSavedTeamShields[i] = gTeamShields[i];
}
@ -121,8 +121,8 @@ void Venom2_80196314(Actor* actor) {
}
break;
case 3:
D_ctx_801779BC = 0;
if (D_360_8015F908 < 600) {
gPauseEnabled = 0;
if (gStarWolfMsgTimer < 600) {
player->camEye.x += actor4->vel.x * 0.23f;
player->camEye.y += actor4->vel.y * 0.23f;
player->camEye.z += actor4->vel.z * 0.23f;
@ -131,7 +131,7 @@ void Venom2_80196314(Actor* actor) {
Math_SmoothStepToF(&player->camAt.y, actor4->obj.pos.y, 1.0f, 20000.0f, 0.0f);
Math_SmoothStepToF(&player->camAt.z, actor4->obj.pos.z, 1.0f, 20000.0f, 0.0f);
Math_SmoothStepToF(&player->unk_034, 0, 0.1f, 0.2f, 0.0f);
if ((gControllerPress->button & START_BUTTON) || (D_360_8015F928 == (D_360_800C9B4C + 300))) {
if ((gControllerPress->button & START_BUTTON) || (gAllRangeEventTimer == (D_360_800C9B4C + 300))) {
actor->state = 2;
player->state_1C8 = PLAYERSTATE_1C8_3;
func_play_800B7184(player, 1);
@ -140,10 +140,10 @@ void Venom2_80196314(Actor* actor) {
}
break;
}
if (D_360_8015F908 != 0) {
D_360_8015F908--;
if (gStarWolfMsgTimer != 0) {
gStarWolfMsgTimer--;
switch (D_360_8015F908) {
switch (gStarWolfMsgTimer) {
case 860:
Radio_PlayMessage(gMsg_ID_19200, RCID_WOLF);
break;
@ -172,21 +172,21 @@ void Venom2_80196968(void) {
Object_58* obj58;
s32 i;
D_ctx_80178310 = SEGMENTED_TO_VIRTUAL(D_enmy_800CFDA0[gCurrentLevel]);
gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]);
for (obj58 = gObjects58, i = 0; i < 1000; i++) {
if (D_ctx_80178310[i].id < 0) {
if (gLevelObjects[i].id < 0) {
break;
}
if (D_ctx_80178310[i].id <= OBJ_80_160) {
if (gLevelObjects[i].id <= OBJ_80_160) {
Object_58_Initialize(obj58);
obj58->obj.status = OBJ_ACTIVE;
obj58->obj.id = D_ctx_80178310[i].id;
obj58->sfxSource[0] = obj58->obj.pos.x = D_ctx_80178310[i].xPos;
obj58->sfxSource[1] = obj58->obj.pos.y = D_ctx_80178310[i].yPos;
obj58->sfxSource[2] = obj58->obj.pos.z = -D_ctx_80178310[i].zPos1;
obj58->unk_54 = obj58->obj.rot.y = D_ctx_80178310[i].rot.y;
obj58->obj.id = gLevelObjects[i].id;
obj58->sfxSource[0] = obj58->obj.pos.x = gLevelObjects[i].xPos;
obj58->sfxSource[1] = obj58->obj.pos.y = gLevelObjects[i].yPos;
obj58->sfxSource[2] = obj58->obj.pos.z = -gLevelObjects[i].zPos1;
obj58->unk_54 = obj58->obj.rot.y = gLevelObjects[i].rot.y;
Object_SetInfo(&obj58->info, obj58->obj.id);
@ -195,18 +195,18 @@ void Venom2_80196968(void) {
}
for (actor = &gActors[30], i = 0; i < 1000; i++) {
if (D_ctx_80178310[i].id < 0) {
if (gLevelObjects[i].id < 0) {
break;
}
if ((D_ctx_80178310[i].id >= OBJ_ACTOR_176) && (D_ctx_80178310[i].id <= OBJ_ACTOR_SUPPLIES)) {
if ((gLevelObjects[i].id >= OBJ_ACTOR_176) && (gLevelObjects[i].id <= OBJ_ACTOR_SUPPLIES)) {
Actor_Initialize(actor);
actor->obj.status = OBJ_INIT;
actor->obj.id = D_ctx_80178310[i].id;
actor->fwork[10] = actor->obj.pos.x = D_ctx_80178310[i].xPos;
actor->fwork[11] = actor->obj.pos.y = D_ctx_80178310[i].yPos;
actor->fwork[12] = actor->obj.pos.z = -D_ctx_80178310[i].zPos1;
actor->fwork[13] = actor->obj.rot.y = D_ctx_80178310[i].rot.y;
actor->obj.id = gLevelObjects[i].id;
actor->fwork[10] = actor->obj.pos.x = gLevelObjects[i].xPos;
actor->fwork[11] = actor->obj.pos.y = gLevelObjects[i].yPos;
actor->fwork[12] = actor->obj.pos.z = -gLevelObjects[i].zPos1;
actor->fwork[13] = actor->obj.rot.y = gLevelObjects[i].rot.y;
Object_SetInfo(&actor->info, actor->obj.id);
actor++;
}
@ -224,8 +224,8 @@ void Venom2_80196BF8(Player* player) {
f32 temp_fv0;
if (gCsFrameCount > 50) {
D_ctx_8017835C = 3;
D_ctx_80178358 = 0;
gFillScreenAlphaStep = 3;
gFillScreenAlphaTarget = 0;
}
Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, 0);
Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), 1);
@ -316,7 +316,7 @@ void Venom2_80196D88(Player* player) {
D_ctx_80177A48[5] = sp58.x;
D_ctx_80177A48[6] = sp58.z;
}
if (D_ctx_8017827C == 2) {
if (gLevelStage == 2) {
player->timer_1FC = 240;
} else {
player->timer_1FC = 180;
@ -325,10 +325,10 @@ void Venom2_80196D88(Player* player) {
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 60);
/* fallthrough */
case 1:
if (D_ctx_8017827C == 2) {
D_ctx_8017835C = 2;
D_ctx_80178358 = 0;
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255;
if (gLevelStage == 2) {
gFillScreenAlphaStep = 2;
gFillScreenAlphaTarget = 0;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255;
}
Math_SmoothStepToF(&D_ctx_80177A48[1], 0.8f, 1.0f, 0.05f, 0.0f);
Math_SmoothStepToF(&player->unk_12C, 0.0f, 0.1f, 15.0f, 0.0f);
@ -402,21 +402,21 @@ void Venom2_80196D88(Player* player) {
player->unk_190 = 5.0f;
}
if (gCsFrameCount > 110) {
D_ctx_80178358 = 255;
D_ctx_8017835C = 8;
D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0;
if (D_ctx_80178340 == 255) {
gFillScreenAlphaTarget = 255;
gFillScreenAlphaStep = 8;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0;
if (gFillScreenAlpha == 255) {
for (i = 1; i < ARRAY_COUNT(gTeamShields); i++) {
D_ctx_80177C38[i] = gSavedTeamShields[i];
D_ctx_801778F0[i] = gSavedTeamShields[i];
gPrevPlanetTeamShields[i] = gSavedTeamShields[i];
gPrevPlanetSavedTeamShields[i] = gSavedTeamShields[i];
gSavedTeamShields[i] = gTeamShields[i];
}
gNextGameState = GSTATE_PLAY;
gNextLevel = LEVEL_VENOM_ANDROSS;
if (D_play_800D3180[gCurrentLevel] != 0) {
D_game_80161A2E = 1;
gNextLevelStage = 1;
}
func_8001CA24(0);
Audio_KillSfxBySource(player->sfxSource);
@ -436,7 +436,8 @@ void Venom2_80196D88(Player* player) {
AUDIO_PLAY_BGM(SEQ_ID_TO_ANDROSS | SEQ_FLAG);
}
if (player->timer_1FC == 1) {
if ((gTeamShields[2] > 0) || (gTeamShields[1] > 0) || (gTeamShields[3] > 0)) {
if ((gTeamShields[TEAM_ID_SLIPPY] > 0) || (gTeamShields[TEAM_ID_FALCO] > 0) ||
(gTeamShields[TEAM_ID_PEPPY] > 0)) {
Radio_PlayMessage(gMsg_ID_8230, RCID_FALCO);
Radio_PlayMessage(gMsg_ID_8220, RCID_PEPPY);
Radio_PlayMessage(gMsg_ID_8240, RCID_SLIPPY);

View File

@ -5,7 +5,7 @@
*/
#include "mods.h"
#include "prevent_bss_reordering.h"
// #include "prevent_bss_reordering.h"
#include "global.h"
#include "fox_map.h"
#include "fox_option.h"
@ -1091,7 +1091,7 @@ Gfx D_menu_801B6548[] = {
gsSPEndDisplayList(),
};
void* D_menu_801B68B0[] = {
u8* D_menu_801B68B0[] = {
D_menu_801C6C10, D_menu_801C9010, D_menu_801CB410, D_menu_801BB810, D_menu_801C4810,
D_menu_801C0010, D_menu_801BDC10, D_menu_801C2410, D_menu_801B9410,
};
@ -1206,16 +1206,16 @@ void Map_8019E800(void) {
Memory_FreeAll();
func_play_800A5D6C();
D_ctx_80178410 = 0;
gNextGameState = 4;
gNextGameState = GSTATE_MAP;
D_game_80161A34 = 5;
D_ctx_80177868 = 2;
gDrawMode = DRAWMODE_0;
gDrawMode = DRAW_NONE;
}
void Map_8019E85C(void) {
switch (D_ctx_80177868) {
case 0:
if (D_Timer_8017783C == 0) {
if (gNextGameStateTimer == 0) {
D_ctx_80177868 = 1;
}
break;
@ -1245,13 +1245,13 @@ void Map_8019E8D0(void) {
switch (D_ctx_80177B40) {
case 0:
if (D_Timer_8017783C == 0) {
if (gNextGameStateTimer == 0) {
D_ctx_80177B40 = 1;
}
break;
case 1:
gDrawMode = DRAWMODE_0;
gDrawMode = DRAW_NONE;
Map_8019E99C();
break;
@ -1336,10 +1336,10 @@ void Map_8019E99C(void) {
D_menu_801CD960 = 0;
D_ctx_80178340 = 255;
D_ctx_80178348 = 0;
D_ctx_80178350 = 0;
D_ctx_80178354 = 0;
gFillScreenAlpha = 255;
gFillScreenRed = 0;
gFillScreenGreen = 0;
gFillScreenBlue = 0;
D_ctx_80177D20 = 0.0f;
D_menu_801CF018 = 0;
@ -1438,19 +1438,19 @@ void Map_8019F164(void) {
gLifeCount[gPlayerNum] = 99;
}
for (i = 0; i < 6; i++) {
D_ctx_80177C38[i] = gTeamShields[i];
D_ctx_801778F0[i] = gSavedTeamShields[i];
for (i = 0; i < TEAM_ID_MAX; i++) {
gPrevPlanetTeamShields[i] = gTeamShields[i];
gPrevPlanetSavedTeamShields[i] = gSavedTeamShields[i];
gSavedTeamShields[i] = gTeamShields[i];
}
for (i = 1; i < 4; i++) {
if (D_ctx_80177C38[i] == 0) {
D_ctx_80177C38[i] = 255;
for (i = TEAM_ID_FALCO; i <= TEAM_ID_PEPPY; i++) {
if (gPrevPlanetTeamShields[i] == 0) {
gPrevPlanetTeamShields[i] = 255;
}
}
D_menu_801CD93C = D_ctx_80177930;
D_menu_801CD93C = gNextPlanetPath;
sCurrentPlanetId = Map_GetPlanetId(gCurrentLevel);
@ -1565,15 +1565,15 @@ void Map_8019F600(void) {
gTotalHits = 0;
gHitCount = 0;
gTeamShields[1] = 255;
gTeamShields[2] = 255;
gTeamShields[3] = 255;
gTeamShields[TEAM_ID_FALCO] = 255;
gTeamShields[TEAM_ID_SLIPPY] = 255;
gTeamShields[TEAM_ID_PEPPY] = 255;
gSavedTeamShields[1] = 255;
gSavedTeamShields[2] = 255;
gSavedTeamShields[3] = 255;
D_ctx_80177C38[1] = 255;
D_ctx_80177C38[2] = 255;
D_ctx_80177C38[3] = 255;
gPrevPlanetTeamShields[1] = 255;
gPrevPlanetTeamShields[2] = 255;
gPrevPlanetTeamShields[3] = 255;
D_ctx_80177C58[1] = 255;
D_ctx_80177C58[2] = 255;
D_ctx_80177C58[3] = 255;
@ -1769,7 +1769,7 @@ bool Map_8019FD1C(LevelId levelId, s32 arg1) {
break;
case LEVEL_VENOM_ANDROSS:
if (D_ctx_8017827C == 0) {
if (gLevelStage == 0) {
planetSaveSlot = SAVE_SLOT_VENOM_1;
} else {
planetSaveSlot = SAVE_SLOT_VENOM_2;
@ -1955,18 +1955,17 @@ void Map_801A01A8(void) {
}
if (D_menu_801CEEC8 == 0) {
Map_801A07E8((u8*) D_menu_801B68B0[8], (u8*) SEGMENTED_TO_VIRTUAL(D_menu_801B68D4[8]), &(D_menu_801CD818[8]));
Map_801A07E8(D_menu_801B68B0[8], SEGMENTED_TO_VIRTUAL(D_menu_801B68D4[8]), &D_menu_801CD818[8]);
D_menu_801CEEC8 = 5;
} else {
D_menu_801CEEC8--;
}
Map_801A07E8((u8*) D_menu_801B68B0[D_menu_801CEEC4 * 2],
(u8*) SEGMENTED_TO_VIRTUAL(D_menu_801B68D4[D_menu_801CEEC4 * 2]),
&(D_menu_801CD818[D_menu_801CEEC4 * 2]));
Map_801A07E8((u8*) D_menu_801B68B0[(D_menu_801CEEC4 * 2) + 1],
(u8*) SEGMENTED_TO_VIRTUAL(D_menu_801B68D4[(D_menu_801CEEC4 * 2) + 1]),
&(D_menu_801CD818[(D_menu_801CEEC4 * 2) + 1]));
Map_801A07E8(D_menu_801B68B0[D_menu_801CEEC4 * 2], SEGMENTED_TO_VIRTUAL(D_menu_801B68D4[D_menu_801CEEC4 * 2]),
&D_menu_801CD818[D_menu_801CEEC4 * 2]);
Map_801A07E8(D_menu_801B68B0[(D_menu_801CEEC4 * 2) + 1],
SEGMENTED_TO_VIRTUAL(D_menu_801B68D4[(D_menu_801CEEC4 * 2) + 1]),
&D_menu_801CD818[(D_menu_801CEEC4 * 2) + 1]);
D_menu_801CEEC4++;
if (D_menu_801CEEC4 > 3) {
D_menu_801CEEC4 = 0;
@ -2082,7 +2081,7 @@ void Map_801A0954(void) {
break;
}
if (D_ctx_80178340 != 0) {
if (gFillScreenAlpha != 0) {
break;
}
@ -2447,10 +2446,10 @@ void Map_801A1C14(void) {
}
D_ctx_80178410 = 0;
D_ctx_80178348 = 255;
D_ctx_80178350 = 255;
D_ctx_80178354 = 255;
D_ctx_80178340 = 0;
gFillScreenRed = 255;
gFillScreenGreen = 255;
gFillScreenBlue = 255;
gFillScreenAlpha = 0;
D_menu_801CEB3C = 0.0f;
D_menu_801CEB38 = 255;
@ -2461,7 +2460,7 @@ void Map_801A1C14(void) {
case 1:
if (D_menu_801CD95C == 0) {
if (sCurrentPlanetId == PLANET_CORNERIA) {
D_ctx_80178340 = 0;
gFillScreenAlpha = 0;
D_menu_801CD948 = 10;
AUDIO_PLAY_SFX(0x0940A00BU, gDefaultSfxSource, 4U);
} else {
@ -2470,7 +2469,7 @@ void Map_801A1C14(void) {
}
} else {
if (sCurrentPlanetId == PLANET_CORNERIA) {
D_ctx_80178340 ^= 0xFF;
gFillScreenAlpha ^= 0xFF;
if (D_menu_801CD95C == 2) {
D_menu_801CEB34 = 0;
}
@ -2728,10 +2727,10 @@ void Map_801A2674(void) {
}
void Map_801A281C(void) {
D_ctx_80178348 = 0;
D_ctx_80178350 = 0;
D_ctx_80178354 = 0;
D_ctx_80178340 = 255;
gFillScreenRed = 0;
gFillScreenGreen = 0;
gFillScreenBlue = 0;
gFillScreenAlpha = 255;
D_menu_801CD988 = 5;
D_menu_801CEED8 = 0;
@ -2800,19 +2799,19 @@ void Map_801A2B8C(void) {
break;
case 100:
if (D_ctx_80178340 != 0) {
D_ctx_80178340 -= 64;
if (D_ctx_80178340 < 0) {
D_ctx_80178340 = 0;
if (gFillScreenAlpha != 0) {
gFillScreenAlpha -= 64;
if (gFillScreenAlpha < 0) {
gFillScreenAlpha = 0;
}
} else {
D_menu_801CD9C0 = 30;
if ((D_menu_801CD98C == 1) || (D_menu_801CD980 == 1)) {
D_ctx_80178348 = 255;
D_ctx_80178350 = 255;
D_ctx_80178354 = 255;
D_ctx_80178340 = 0;
gFillScreenRed = 255;
gFillScreenGreen = 255;
gFillScreenBlue = 255;
gFillScreenAlpha = 0;
D_menu_801CD984 = 0;
D_menu_801CD94C = 10;
break;
@ -2827,27 +2826,27 @@ void Map_801A2B8C(void) {
break;
}
if ((D_menu_801CD984 == 255) && (D_ctx_80178340 == 0)) {
if ((D_menu_801CD984 == 255) && (gFillScreenAlpha == 0)) {
D_menu_801CD980 = 0;
D_menu_801CD9C0 = 30;
D_menu_801CD94C = 20;
} else if (D_menu_801CD988 != 0) {
D_ctx_80178340 ^= 255;
gFillScreenAlpha ^= 255;
D_menu_801CD988--;
} else {
D_menu_801CD988 = 0;
if (D_ctx_80178340 != 0) {
D_ctx_80178340 -= 21;
if (D_ctx_80178340 < 0) {
D_ctx_80178340 = 0;
if (gFillScreenAlpha != 0) {
gFillScreenAlpha -= 21;
if (gFillScreenAlpha < 0) {
gFillScreenAlpha = 0;
}
}
D_menu_801CD984 += 8;
if (D_menu_801CD984 > 255) {
D_ctx_80178340 = 0;
gFillScreenAlpha = 0;
D_menu_801CD984 = 255;
}
}
@ -3061,10 +3060,10 @@ void Map_801A36A8(void) {
switch (D_menu_801CD948) {
case 0:
D_ctx_80178348 = 0;
D_ctx_80178350 = 0;
D_ctx_80178354 = 0;
D_ctx_80178340 = 255;
gFillScreenRed = 0;
gFillScreenGreen = 0;
gFillScreenBlue = 0;
gFillScreenAlpha = 255;
for (i = 0; i < 8; i++) {
D_menu_801CF020[i] = D_menu_801B69D4[i];
@ -3087,10 +3086,10 @@ void Map_801A36A8(void) {
case 10:
temp = Math_SmoothStepToF(&D_menu_801CEA9C, 0.0f, 1.0f, 100.0f, 1.0f);
D_ctx_80178340 = D_menu_801CEA9C;
gFillScreenAlpha = D_menu_801CEA9C;
if (temp == 0.0f) {
D_ctx_80178340 = 0;
gFillScreenAlpha = 0;
D_menu_801CD9C0 = 0;
D_menu_801CD948 = 20;
}
@ -3120,16 +3119,16 @@ void Map_801A36A8(void) {
break;
case 3:
D_ctx_80178340 += 32;
if (D_ctx_80178340 > 255) {
D_ctx_80178340 = 255;
gFillScreenAlpha += 32;
if (gFillScreenAlpha > 255) {
gFillScreenAlpha = 255;
D_menu_801CD948++;
}
break;
case 4:
gGameState = GSTATE_MENU;
D_Timer_8017783C = 2;
gNextGameStateTimer = 2;
gOptionMenuStatus = OPTION_WAIT;
gDrawMode = 0;
D_ctx_80178410 = 0;
@ -3516,7 +3515,7 @@ void Map_801A4AE8(void) {
Map_801A4D0C(var_a0);
if (D_menu_801CEFDC == 0) {
for (i = 0; i < 6; i++) {
for (i = 0; i < TEAM_ID_MAX; i++) {
D_ctx_80177C58[i] = gTeamShields[i];
}
D_menu_801CEFC8 = 0;
@ -3607,8 +3606,8 @@ void Map_801A4F8C(void) {
D_ctx_80178410 = 0;
gGameState = GSTATE_GAME_OVER;
D_ctx_80177868 = 0;
D_Timer_8017783C = 2;
gDrawMode = DRAWMODE_0;
gNextGameStateTimer = 2;
gDrawMode = DRAW_NONE;
}
void Map_801A4FC4(void) {
@ -3621,12 +3620,12 @@ void Map_801A4FC4(void) {
for (i = 0; i < 6; i++) {
gSavedTeamShields[i] = D_ctx_80177C58[i];
gTeamShields[i] = D_ctx_80177C58[i];
D_ctx_80177C38[i] = D_ctx_80177C58[i];
gPrevPlanetTeamShields[i] = D_ctx_80177C58[i];
}
for (i = 1; i < 4; i++) {
if (D_ctx_80177C38[i] == 0) {
D_ctx_80177C38[i] = 255;
for (i = TEAM_ID_FALCO; i <= TEAM_ID_PEPPY; i++) {
if (gPrevPlanetTeamShields[i] == 0) {
gPrevPlanetTeamShields[i] = 255;
}
}
@ -4273,12 +4272,12 @@ void Map_801A659C(void) {
void Map_801A6628(void) {
gGameState = GSTATE_PLAY;
D_Timer_8017783C = 2;
D_ctx_80177854 = 0;
gDrawMode = DRAWMODE_0;
gNextGameStateTimer = 2;
gPlayState = PLAY_STANDBY;
gDrawMode = DRAW_NONE;
gHitCount = 0;
func_play_800A5844();
Play_Setup();
D_ctx_80177CA0 = 0;
D_ctx_80177CB0 = 0.0f;
@ -4350,16 +4349,16 @@ void Map_801A68E4(void) {
void Map_801A6A24(void) {
switch (D_menu_801CD960) {
case 0:
if (D_ctx_80178340 != 0) {
D_ctx_80178340 -= 5;
if (gFillScreenAlpha != 0) {
gFillScreenAlpha -= 5;
} else {
D_menu_801CD960 = 255;
}
break;
case 1:
if (D_ctx_80178340 != 255) {
D_ctx_80178340 += 15;
if (gFillScreenAlpha != 255) {
gFillScreenAlpha += 15;
} else {
D_menu_801CD960 = 255;
}
@ -6570,7 +6569,7 @@ void Map_801AD11C(void) {
D_menu_801CD944 = 6;
D_menu_801CD94C = 0;
} else {
for (i = 0; i < 6; i++) {
for (i = 0; i < TEAM_ID_MAX; i++) {
D_ctx_80177C58[i] = gTeamShields[i];
}
Map_801A659C();

View File

@ -5,6 +5,7 @@
*/
#include "mods.h"
#include "prevent_bss_reordering.h"
#include "global.h"
#include "fox_option.h"
#include "assets/ast_font.h"
@ -396,10 +397,10 @@ void Option_Setup(void) {
}
D_menu_801B91C8 = enableExpertModes;
D_ctx_80178348 = 0;
D_ctx_80178350 = 0;
D_ctx_80178354 = 0;
D_ctx_80178340 = 0;
gFillScreenRed = 0;
gFillScreenGreen = 0;
gFillScreenBlue = 0;
gFillScreenAlpha = 0;
gBlurAlpha = 255;
@ -547,19 +548,19 @@ void Option_Init(void) {
switch (gOptionMenuStatus) {
case OPTION_WAIT:
if (D_Timer_8017783C == 0) {
if (gNextGameStateTimer == 0) {
gOptionMenuStatus = OPTION_SETUP;
Audio_SetAudioSpec(0, 23);
}
break;
case OPTION_SETUP:
gDrawMode = DRAWMODE_0;
gDrawMode = DRAW_NONE;
Option_Setup();
break;
case OPTION_UPDATE:
gDrawMode = DRAWMODE_2;
gDrawMode = DRAW_OPTION;
Option_UpdateEntry();
break;
}
@ -691,7 +692,7 @@ void Option_InitEntry(void) {
switch (D_menu_801B9124) {
case OPTION_MAP:
gDrawMode = DRAWMODE_0;
gDrawMode = DRAW_NONE;
break;
case OPTION_POINT_MATCH:
@ -769,39 +770,39 @@ void Option_80192738(void) {
}
void Option_MapUpdate(void) {
if (D_ctx_80178340 == 255) {
if (gFillScreenAlpha == 255) {
D_ctx_80178410 = 0;
D_menu_801B9124 = 100;
gGameState = GSTATE_MAP;
D_Timer_8017783C = 2;
gNextGameStateTimer = 2;
D_ctx_80177B40 = 0;
gDrawMode = DRAWMODE_0;
gDrawMode = DRAW_NONE;
gControllerLock = 3;
} else {
D_ctx_80178340 += 32;
if (D_ctx_80178340 > 255) {
D_ctx_80178340 = 255;
gFillScreenAlpha += 32;
if (gFillScreenAlpha > 255) {
gFillScreenAlpha = 255;
}
}
}
void Option_TrainingUpdate(void) {
if (D_ctx_80178340 == 255) {
if (gFillScreenAlpha == 255) {
gCurrentLevel = LEVEL_TRAINING;
gGameState = GSTATE_PLAY;
D_Timer_8017783C = 2;
D_ctx_80177854 = 0;
gDrawMode = DRAWMODE_0;
func_play_800A5844();
gNextGameStateTimer = 2;
gPlayState = PLAY_STANDBY;
gDrawMode = DRAW_NONE;
Play_Setup();
D_ctx_80177CA0 = 0;
D_ctx_80177CB0 = 0.0f;
D_ctx_8017782C = 1;
gControllerLock = 3;
Audio_SetAudioSpec(0, 28);
} else {
D_ctx_80178340 += 32;
if (D_ctx_80178340 > 255) {
D_ctx_80178340 = 255;
gFillScreenAlpha += 32;
if (gFillScreenAlpha > 255) {
gFillScreenAlpha = 255;
}
}
}
@ -1042,10 +1043,10 @@ void Option_MainMenuUpdate(void) {
} else {
D_ctx_80178410 = 0;
gGameState = GSTATE_TITLE;
D_Timer_8017783C = 2;
gNextGameStateTimer = 2;
D_ctx_80177AE0 = 0;
D_menu_801B827C = 1;
gDrawMode = DRAWMODE_0;
gDrawMode = DRAW_NONE;
D_menu_801B8280 = 0;
D_menu_801B8284 = 0;
gControllerLock = 3;
@ -1195,7 +1196,7 @@ void Option_VersusUpdate(void) {
AUDIO_PLAY_SFX(0x49000021, gDefaultSfxSource, 4);
D_menu_801B912C = 0;
D_menu_801B9124 = 1000;
gDrawMode = DRAWMODE_0;
gDrawMode = DRAW_NONE;
D_menu_801B9244 = 1;
}
break;
@ -1377,7 +1378,7 @@ void Option_SoundUpdate(void) {
if (gControllerPress[gMainController].button & A_BUTTON) {
AUDIO_PLAY_SFX(0x49000003, gDefaultSfxSource, 4);
D_menu_801B9288 = (D_menu_801B9288 + 1) & 3;
D_menu_801B9288 = (D_menu_801B9288 + 1) % 4U;
}
if (gControllerPress[gMainController].button & B_BUTTON) {
@ -1387,7 +1388,7 @@ void Option_SoundUpdate(void) {
Audio_PlaySoundTest(D_menu_801B9284);
}
Save_Write();
gDrawMode = DRAWMODE_0;
gDrawMode = DRAW_NONE;
D_menu_801B9124 = 1000;
D_menu_801B912C = 0;
D_menu_801B9244 = 1;
@ -1665,7 +1666,7 @@ void Option_ExpertSoundUpdate(void) {
if (!D_menu_801B9320) {
AUDIO_PLAY_SFX(0x49000021, gDefaultSfxSource, 4);
AUDIO_PLAY_BGM(SEQ_ID_MENU);
gDrawMode = DRAWMODE_0;
gDrawMode = DRAW_NONE;
D_menu_801B9124 = 1000;
D_menu_801B912C = 0;
D_menu_801B9244 = 1;
@ -1761,7 +1762,7 @@ void Option_ExpertSoundDraw(void) {
}
}
Lib_Ortho(&gMasterDisp);
Lib_InitOrtho(&gMasterDisp);
RCP_SetupDL(&gMasterDisp, 5);
@ -1787,7 +1788,7 @@ void Option_ExpertSoundDraw(void) {
}
Matrix_Pop(&gGfxMatrix);
Lib_Perspective(&gMasterDisp);
Lib_InitPerspective(&gMasterDisp);
}
void Option_DataInit(void) {
@ -1821,7 +1822,7 @@ void Option_DataUpdate(void) {
if (D_menu_801B9330[D_menu_801B91C0]) {
break;
}
gDrawMode = DRAWMODE_0;
gDrawMode = DRAW_NONE;
D_menu_801B9124 = 1000;
D_menu_801B912C = 0;
D_menu_801B9244 = 1;
@ -2053,7 +2054,7 @@ void Option_RankingUpdate(void) {
if (gControllerPress[gMainController].button & B_BUTTON) {
AUDIO_PLAY_SFX(0x49000021, gDefaultSfxSource, 4);
gDrawMode = DRAWMODE_0;
gDrawMode = DRAW_NONE;
D_menu_801B9124 = 1000;
D_menu_801B912C = 0;
D_menu_801B9244 = 1;
@ -2443,7 +2444,7 @@ void Option_8019896C(s32 arg0, f32 y, s32 arg2) {
Matrix_LookAt(gGfxMatrix, 0.0f, 0.0f, 100.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1);
Matrix_SetGfxMtx(&gMasterDisp);
Lib_Ortho(&gMasterDisp);
Lib_InitOrtho(&gMasterDisp);
spFC = gSaveFile.save.data.unk_4A[arg0];
for (x = D_menu_801AF134, i = 0; i < arg2; i++, x += D_menu_801AF138) {
@ -2580,7 +2581,7 @@ void Option_8019896C(s32 arg0, f32 y, s32 arg2) {
D_menu_801AF130 += 0.1f;
Lib_Perspective(&gMasterDisp);
Lib_InitPerspective(&gMasterDisp);
}
static f32 D_menu_801AF13C = 0.7f;
@ -2974,9 +2975,9 @@ void Option_8019A214(void) {
void Option_8019A298(void) {
if (D_menu_801B91EC == 0.0f) {
gGameState = GSTATE_VS_INIT;
D_Timer_8017783C = 2;
gNextGameStateTimer = 2;
gOptionMenuStatus = OPTION_WAIT;
gDrawMode = DRAWMODE_0;
gDrawMode = DRAW_NONE;
}
}
@ -3447,7 +3448,7 @@ void Option_8019B7D4(void) {
void Option_8019B8A0(s32 arg0) {
D_menu_801B9124 = arg0;
gDrawMode = DRAWMODE_0;
gDrawMode = DRAW_NONE;
D_menu_801B912C = 0;
D_menu_801B91B4 = 0;
}
@ -3469,7 +3470,7 @@ void Option_DrawMenuLabel(void) {
void Option_DrawMenuCard(MenuContext_38 arg0) {
RCP_SetupDL(&gMasterDisp, 0x11);
Lib_Ortho(&gMasterDisp);
Lib_InitOrtho(&gMasterDisp);
Matrix_Push(&gGfxMatrix);
@ -3483,7 +3484,7 @@ void Option_DrawMenuCard(MenuContext_38 arg0) {
Matrix_Pop(&gGfxMatrix);
Lib_Perspective(&gMasterDisp);
Lib_InitPerspective(&gMasterDisp);
}
void Option_DrawMenuArwing(ArwingPosition arg0) {
@ -3572,7 +3573,7 @@ void Option_8019BF34(void) {
void Option_8019C04C(void) {
RCP_SetupDL(&gMasterDisp, 0x24);
Lib_Ortho(&gMasterDisp);
Lib_InitOrtho(&gMasterDisp);
Matrix_Push(&gGfxMatrix);
@ -3585,7 +3586,7 @@ void Option_8019C04C(void) {
Matrix_Pop(&gGfxMatrix);
Lib_Perspective(&gMasterDisp);
Lib_InitPerspective(&gMasterDisp);
}
void Option_DrawCardLabel(OptionTexture arg0) {
@ -3899,7 +3900,7 @@ void Option_8019CAE0(void) {
case 3:
if (D_menu_801B917C == 0) {
gBlurAlpha = 255;
gDrawMode = DRAWMODE_0;
gDrawMode = DRAW_NONE;
D_menu_801B912C = 0;
D_menu_801B9124 = 300;
}
@ -4330,7 +4331,7 @@ void Option_8019DE74(void) {
U_CBUTTONS)) { // START, A, B, C-UP, C-LEFT, C-DOWN
AUDIO_PLAY_SFX(0x49000003, gDefaultSfxSource, 4);
gDrawMode = DRAWMODE_0;
gDrawMode = DRAW_NONE;
D_menu_801B912C = 0;
if (D_game_80161A34 == 5) {
@ -4359,10 +4360,10 @@ void Option_InvoiceUpdate(void) {
case 0:
D_ctx_80178410 = 0;
gBgColor = 0;
D_ctx_80178348 = 0;
D_ctx_80178350 = 0;
D_ctx_80178354 = 0;
D_ctx_80178340 = 0;
gFillScreenRed = 0;
gFillScreenGreen = 0;
gFillScreenBlue = 0;
gFillScreenAlpha = 0;
D_menu_801B9090 = 0;
D_menu_801B9178 = 30;
D_menu_801B912C++;
@ -4396,7 +4397,7 @@ void Option_InvoiceUpdate(void) {
if (D_menu_801B9178 == 0) {
D_ctx_80178410 = 0;
gGameState = GSTATE_INIT;
gDrawMode = DRAWMODE_0;
gDrawMode = DRAW_NONE;
*gLifeCount = 2;
gTotalHits = 0;
}

View File

@ -3,7 +3,7 @@
* System: Title
* Description: Starfox Title Handler
*/
#include "prevent_bss_reordering.h"
// #include "prevent_bss_reordering.h"
#include "global.h"
#include "fox_title.h"
#include "assets/ast_title.h"
@ -173,10 +173,10 @@ void Title_801875E0(void) {
gMainController = Title_80187ABC();
D_ctx_80178348 = 0;
D_ctx_80178350 = 0;
D_ctx_80178354 = 0;
D_ctx_80178340 = 0;
gFillScreenRed = 0;
gFillScreenGreen = 0;
gFillScreenBlue = 0;
gFillScreenAlpha = 0;
gFogRed = 0;
gFogGreen = 0;
@ -218,19 +218,19 @@ void Title_801875E0(void) {
void Title_80187754(void) {
switch (D_ctx_80177AE0) {
case 0:
if (D_Timer_8017783C == 0) {
gDrawMode = DRAWMODE_0;
if (gNextGameStateTimer == 0) {
gDrawMode = DRAW_NONE;
D_ctx_80177AE0 = 1;
}
break;
case 1:
gDrawMode = DRAWMODE_0;
gDrawMode = DRAW_NONE;
Title_801875E0();
break;
case 2:
gDrawMode = DRAWMODE_1;
gDrawMode = DRAW_TITLE;
Title_801877F0();
break;
}
@ -334,10 +334,10 @@ void Title_801878D8(void) {
}
if (D_menu_801B8284 != 0) {
D_ctx_80178340 = 0;
D_ctx_80178348 = 0;
D_ctx_80178350 = 0;
D_ctx_80178354 = 0;
gFillScreenAlpha = 0;
gFillScreenRed = 0;
gFillScreenGreen = 0;
gFillScreenBlue = 0;
func_fade_80084688(2, D_menu_801B8284);
}
}
@ -378,7 +378,7 @@ void Title_80187B00(void) {
D_ctx_80178410 = 0;
gRadioState = 0;
D_menu_801B82C0 = 0;
gDrawMode = DRAWMODE_0;
gDrawMode = DRAW_NONE;
Audio_SetAudioSpec(0, 0x16);
D_menu_801B82C4 = 1;
}
@ -389,7 +389,7 @@ void Title_80187B00(void) {
break;
}
if ((D_menu_801B82A8 == 0) && ((gGameFrameCount & 7) == 7) && (D_menu_801B8288 < 10)) {
if ((D_menu_801B82A8 == 0) && ((gGameFrameCount % 8U) == 7) && (D_menu_801B8288 < 10)) {
D_menu_801B8288++;
}
}
@ -536,10 +536,10 @@ void Title_801881FC(void) {
D_menu_801B9060 = 242.0f;
D_menu_801B9064 = 100.0f;
D_ctx_80178340 = 0;
D_ctx_80178348 = 0;
D_ctx_80178350 = 0;
D_ctx_80178354 = 0;
gFillScreenAlpha = 0;
gFillScreenRed = 0;
gFillScreenGreen = 0;
gFillScreenBlue = 0;
D_menu_801B86A8 = 0.0f;
D_menu_801B86AC = 0.0f;
@ -861,7 +861,7 @@ void Title_801888E8(void) {
D_menu_801B82C0 = 0;
gDrawMode = DRAWMODE_0;
gDrawMode = DRAW_NONE;
D_menu_801B82C4 = 7;
}
@ -923,10 +923,10 @@ void Title_801894E8(void) {
}
D_menu_801B869C = 255;
D_ctx_80178340 = 255;
D_ctx_80178348 = 0;
D_ctx_80178350 = 0;
D_ctx_80178354 = 0;
gFillScreenAlpha = 255;
gFillScreenRed = 0;
gFillScreenGreen = 0;
gFillScreenBlue = 0;
D_menu_801B9070 = 110.0f;
D_menu_801B9074 = 70.0f;
@ -1011,8 +1011,8 @@ void Title_8018994C(void) {
break;
case 100:
if (D_ctx_80178340 != 0) {
D_ctx_80178340 -= 5;
if (gFillScreenAlpha != 0) {
gFillScreenAlpha -= 5;
} else {
D_menu_801B82A8 = 19;
D_menu_801B82C0 = 1;
@ -1045,7 +1045,7 @@ void Title_8018994C(void) {
D_menu_801B82D0 = 0.02f;
D_menu_801B82C0++;
D_menu_801B7BD8 = 1;
D_ctx_80178340 = 0;
gFillScreenAlpha = 0;
}
}
}
@ -1167,20 +1167,20 @@ void Title_8018994C(void) {
}
if (D_menu_801B82B4 == 750) {
D_ctx_80178340 = 0;
D_ctx_80178348 = 0;
D_ctx_80178350 = 0;
D_ctx_80178354 = 0;
gFillScreenAlpha = 0;
gFillScreenRed = 0;
gFillScreenGreen = 0;
gFillScreenBlue = 0;
D_menu_801B869C = 1;
}
if (D_ctx_80178340 == 255) {
if (gFillScreenAlpha == 255) {
Audio_KillSfxBySourceAndId(D_menu_801B8658.unk_24, 0x11030010);
Audio_KillSfxBySourceAndId(D_menu_801B8658.unk_24, 0x31024059);
D_menu_801B82C0 = 0;
gDrawMode = DRAWMODE_0;
gDrawMode = DRAW_NONE;
D_menu_801B82C4 = 2;
}
@ -1211,10 +1211,10 @@ void Title_8018A338(void) {
D_menu_801B869C = 255;
D_ctx_80178340 = 255;
D_ctx_80178348 = 0;
D_ctx_80178350 = 0;
D_ctx_80178354 = 0;
gFillScreenAlpha = 255;
gFillScreenRed = 0;
gFillScreenGreen = 0;
gFillScreenBlue = 0;
D_menu_801B8344 = 0;
D_menu_801B8334 = 0;
@ -1379,7 +1379,7 @@ void Title_8018A644(void) {
D_menu_801B82C0 = 0;
gDrawMode = DRAWMODE_0;
gDrawMode = DRAW_NONE;
D_menu_801B82C4 = 3;
}
@ -1410,9 +1410,9 @@ void Title_8018A990(void) {
{ 255.0f, 255.0f, 155.0f },
};
if ((gGameFrameCount & 7) == 7) {
if ((gGameFrameCount % 8U) == 7) {
if (D_menu_801B8338 != 0) {
D_menu_801B8334 = (D_menu_801B8334 + 1) & 3;
D_menu_801B8334 = (D_menu_801B8334 + 1) % 4U;
D_menu_801B8328 = D_menu_801ADF54[D_menu_801B8334].unk_0;
D_menu_801B832C = D_menu_801ADF54[D_menu_801B8334].unk_4;
D_menu_801B8330 = D_menu_801ADF54[D_menu_801B8334].unk_8;
@ -1424,7 +1424,7 @@ void Title_8018A990(void) {
D_menu_801B8338 ^= 1;
}
if (gGameFrameCount & 1) {
if ((gGameFrameCount % 2) != 0) {
D_menu_801B86CC += 30.0f;
if (D_menu_801B86CC > 90.0f) {
D_menu_801B86CC = -90.0f;
@ -1455,10 +1455,10 @@ void Title_8018ABC0(void) {
D_menu_801B869C = 255;
D_ctx_80178340 = 0;
D_ctx_80178348 = 0;
D_ctx_80178350 = 0;
D_ctx_80178354 = 0;
gFillScreenAlpha = 0;
gFillScreenRed = 0;
gFillScreenGreen = 0;
gFillScreenBlue = 0;
gLight1R = 101;
gLight1G = 106;
gLight1B = 92;
@ -1512,11 +1512,11 @@ void Title_8018ACEC(void) {
D_menu_801B869C = 1;
}
if (D_ctx_80178340 == 255) {
if (gFillScreenAlpha == 255) {
Audio_KillSfxBySourceAndId(D_menu_801B8658.unk_24, 0x11030010);
Audio_KillSfxBySourceAndId(D_menu_801B8658.unk_24, 0x31024059);
gDrawMode = DRAWMODE_0;
gDrawMode = DRAW_NONE;
D_menu_801B82C0 = 0;
D_menu_801B82C4 = 4;
@ -1570,10 +1570,10 @@ void Title_8018B058(void) {
D_menu_801B869C = 255;
D_ctx_80178340 = 0;
D_ctx_80178348 = 255;
D_ctx_80178350 = 255;
D_ctx_80178354 = 255;
gFillScreenAlpha = 0;
gFillScreenRed = 255;
gFillScreenGreen = 255;
gFillScreenBlue = 255;
D_ctx_80178410 = 0;
D_menu_801B8334 = 0;
@ -1795,15 +1795,15 @@ void Title_8018B5C4(void) {
gLight1B = D_menu_801B82F4;
}
if ((D_menu_801B82B4 > 60) && (D_ctx_80178340 < 255)) {
D_ctx_80178340++;
if ((D_menu_801B82B4 > 60) && (gFillScreenAlpha < 255)) {
gFillScreenAlpha++;
}
if (D_ctx_80178340 == 128) {
if (gFillScreenAlpha == 128) {
D_menu_801B82A8 = 7;
D_menu_801B84E8[3].unk_3C = 0;
D_menu_801B84E8[3].unk_40 = 0;
D_ctx_80178340 = 255;
gFillScreenAlpha = 255;
D_menu_801B82C0++;
}
@ -1831,7 +1831,7 @@ void Title_8018B5C4(void) {
D_menu_801B82A8 = 4;
D_ctx_80178340 = 0;
gFillScreenAlpha = 0;
for (i = 0; i < 4; i++) {
D_menu_801B84E8[i].unk_3C = 1;
@ -1924,10 +1924,10 @@ void Title_8018C1C0(void) {
D_menu_801B869C = 255;
D_ctx_80178340 = 0;
D_ctx_80178348 = 0;
D_ctx_80178350 = 0;
D_ctx_80178354 = 0;
gFillScreenAlpha = 0;
gFillScreenRed = 0;
gFillScreenGreen = 0;
gFillScreenBlue = 0;
D_menu_801B8688.pos.x = 130.0f;
D_menu_801B8688.pos.y = -30.0f;
@ -2078,7 +2078,7 @@ void Title_8018C644(void) {
D_menu_801B869C = 1;
}
if (D_ctx_80178340 == 255) {
if (gFillScreenAlpha == 255) {
Audio_KillSfxBySourceAndId(D_menu_801B8658.unk_24, 0x11030010);
Audio_KillSfxBySourceAndId(D_menu_801B8658.unk_24, 0x31024059);
D_menu_801B82C0++;
@ -2088,7 +2088,7 @@ void Title_8018C644(void) {
break;
case 2:
D_ctx_80178340 = 0;
gFillScreenAlpha = 0;
D_ctx_80178410 = 0;
D_menu_801B86A0 = 0;
D_menu_801B82A8 = 20;
@ -2100,7 +2100,7 @@ void Title_8018C644(void) {
break;
}
D_menu_801B82C0 = 0;
gDrawMode = DRAWMODE_0;
gDrawMode = DRAW_NONE;
D_menu_801B82C4 = 0;
Audio_SetAudioSpec(0, 23);
break;
@ -2306,7 +2306,7 @@ void Title_8018D510(s32 arg0) {
var_fv0 = D_menu_801B84E8[arg0].unk_44;
if (gGameFrameCount & 1) {
if ((gGameFrameCount % 2) != 0) {
var_fv0 += var_fv1;
}
@ -2967,7 +2967,7 @@ static s32 D_menu_801AE528[] = {
void Title_8018FF74(void) {
if (D_menu_801B7BD8 != 0) {
if ((D_menu_801B7BB8 > -870.0f) && (D_menu_801B7BB8 < 900.0f) && (D_ctx_80178340 > 0)) {
if ((D_menu_801B7BB8 > -870.0f) && (D_menu_801B7BB8 < 900.0f) && (gFillScreenAlpha > 0)) {
if ((D_menu_801B7BB8 < 0.0f) && (D_menu_801B7BD0 < 255)) {
D_menu_801B7BD0 += 2;
}
@ -2997,8 +2997,8 @@ void Title_8018FF74(void) {
void Title_80190144(void) {
s32 i;
if (D_ctx_80178340 > 0) {
D_ctx_80178340 -= 4;
if (gFillScreenAlpha > 0) {
gFillScreenAlpha -= 4;
}
D_ctx_801783D0 = D_menu_801B7BB8;
@ -3006,17 +3006,17 @@ void Title_80190144(void) {
if (D_ctx_801783D0 < 950.0f) {
if (D_ctx_801783D0 > -900.0f) {
D_ctx_80178340 += 8;
if (D_ctx_80178340 > 60) {
D_ctx_80178340 = 60;
gFillScreenAlpha += 8;
if (gFillScreenAlpha > 60) {
gFillScreenAlpha = 60;
}
D_ctx_80178348 = 208;
D_ctx_80178350 = 208;
D_ctx_80178354 = 208;
gFillScreenRed = 208;
gFillScreenGreen = 208;
gFillScreenBlue = 208;
}
}
if (D_ctx_80178340 > 0) {
if (gFillScreenAlpha > 0) {
RCP_SetupDL(&gMasterDisp, 0x3E);
gDPSetAlphaDither(gMasterDisp++, G_AD_NOISE);
@ -3053,13 +3053,13 @@ void Title_801903B8(void) {
gDPSetAlphaDither(gMasterDisp++, G_AD_NOISE);
gDPSetColorDither(gMasterDisp++, G_CD_NOISE);
if (D_ctx_80178340 > 0) {
if (gFillScreenAlpha > 0) {
temp_fs3 = D_ctx_801783D0 * -0.03f;
temp_fs4 = D_ctx_801783D4 * 0.03f;
var_fs1 = 1.0f;
if (D_ctx_80178340 < 10) {
var_fs1 = D_ctx_80178340 / 10.0f;
if (gFillScreenAlpha < 10) {
var_fs1 = gFillScreenAlpha / 10.0f;
}
var_fs1 *= 0.5f;
@ -3218,7 +3218,7 @@ void Title_80190EA4(void) {
D_ctx_80178410 = 0;
gRadioState = 0;
D_menu_801B82C0 = 0;
gDrawMode = DRAWMODE_0;
gDrawMode = DRAW_NONE;
D_menu_801B82C4 = 0;
gControllerLock = 30;
D_menu_801B8284 = 0;
@ -3248,9 +3248,9 @@ void Title_80190FD0(void) {
D_menu_801B8284 += 18;
} else {
gGameState = GSTATE_MENU;
D_Timer_8017783C = 2;
gNextGameStateTimer = 2;
gOptionMenuStatus = OPTION_WAIT;
gDrawMode = DRAWMODE_0;
gDrawMode = DRAW_NONE;
D_ctx_80178410 = 0;
D_menu_801B8280 = 0;
D_menu_801B8284 = 0;
@ -3294,17 +3294,17 @@ void Title_8019111C(void) {
void Title_801912A0(void) {
switch (D_menu_801B869C) {
case 0:
D_ctx_80178340 -= 4;
if (D_ctx_80178340 < 0) {
D_ctx_80178340 = 0;
gFillScreenAlpha -= 4;
if (gFillScreenAlpha < 0) {
gFillScreenAlpha = 0;
D_menu_801B869C = 255;
}
break;
case 1:
D_ctx_80178340 += 15;
if (D_ctx_80178340 > 255) {
D_ctx_80178340 = 255;
gFillScreenAlpha += 15;
if (gFillScreenAlpha > 255) {
gFillScreenAlpha = 255;
D_menu_801B869C = 255;
}
break;

View File

@ -81,7 +81,7 @@ void Lib_QuickSort(u8* first, u32 length, u32 size, CompareFunc cFunc) {
}
}
void Lib_Perspective(Gfx** dList) {
void Lib_InitPerspective(Gfx** dList) {
u16 norm;
guPerspective(gGfxMtx, &norm, D_game_80161A3C, (f32) SCREEN_WIDTH / SCREEN_HEIGHT, D_game_80161A40, D_game_80161A44,
@ -93,7 +93,7 @@ void Lib_Perspective(Gfx** dList) {
Matrix_Copy(gGfxMatrix, &gIdentityMatrix);
}
void Lib_Ortho(Gfx** dList) {
void Lib_InitOrtho(Gfx** dList) {
guOrtho(gGfxMtx, -160.0f, 160.0f, -120.0f, 120.0f, D_game_80161A40, D_game_80161A44, 1.0f);
gSPMatrix((*dList)++, gGfxMtx++, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
guLookAt(gGfxMtx, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -12800.0f, 0.0f, 1.0f, 0.0f);

View File

@ -1,4 +1,5 @@
#include "sys.h"
#include "prevent_bss_reordering.h"
s32 sSeededRandSeed3;
s32 sRandSeed1;

@ -1 +1 @@
Subproject commit ad667b705dad3476a1ae803f23588c55baab2ee4
Subproject commit d84559b0fbe2f44598fb1323494f7acd1bd82e03