More actor docs. starting on event IDs (#238)

* id start

* stuff

* comp and cam

* add errors
This commit is contained in:
petrie911 2024-05-11 15:53:37 -05:00 committed by GitHub
parent 5bda92de97
commit 0dbbf453f9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
64 changed files with 2533 additions and 2467 deletions

View File

@ -414,7 +414,11 @@ endif
decompress: $(BASEROM)
@echo "Decompressing ROM..."
@$(PYTHON) $(COMPTOOL) -de $(COMPTOOL_DIR) -m $(MIO0) $(BASEROM) $(BASEROM_UNCOMPRESSED)
@$(PYTHON) $(COMPTOOL) -die $(COMPTOOL_DIR) -m $(MIO0) $(BASEROM) $(BASEROM_UNCOMPRESSED)
compress: $(BASEROM)
@echo "Compressing ROM..."
@$(PYTHON) $(COMPTOOL) -c -m $(MIO0) $(ROM) $(ROMC)
extract:
@$(RM) -r asm/$(VERSION) bin/$(VERSION)
@ -466,7 +470,7 @@ disasm:
# Final ROM
$(ROMC): $(BASEROM_UNCOMPRESSED)
$(call print,Compressing ROM...,$<,$@)
@$(PYTHON) $(COMPTOOL) -c $(ROM) $(ROMC)
@$(PYTHON) $(COMPTOOL) -c -m $(MIO0) $(ROM) $(ROMC)
# Uncompressed ROM
$(ROM): $(ELF)
@ -518,4 +522,4 @@ build/src/libultra/libc/ll.o: src/libultra/libc/ll.c
# Print target for debugging
print-% : ; $(info $* is a $(flavor $*) variable set to [$($*)]) @true
.PHONY: all uncompressed compressed clean init extract expected format checkformat decompress assets context disasm toolchain
.PHONY: all uncompressed compressed clean init extract expected format checkformat decompress compress assets context disasm toolchain

View File

@ -26,7 +26,7 @@ extern s32 gPrevPlanetSavedTeamShields[6];
extern s32 gTeamDamage[6];
extern u8 gMissionStatus;
extern f32 gGroundHeight;
extern f32 D_ctx_80177950; // sign of something to do with camera z rotations
extern f32 D_ctx_80177950;
extern f32 gPlayerTurnRate;
extern f32 gPlayerTurnStickMod;
extern f32 gCsCamEyeX;
@ -35,14 +35,14 @@ extern f32 gCsCamEyeZ;
extern f32 gCsCamAtX;
extern f32 gCsCamAtY;
extern f32 gCsCamAtZ;
extern Vec3f gPlayerCamEye;
extern Vec3f gPlayerCamAt;
extern Vec3f gPlayCamEye;
extern Vec3f gPlayCamAt;
extern bool gExpertMode;
extern s32 D_ctx_80177A10[10];
extern f32 D_ctx_80177A48[10];
extern s32 gCsFrameCount;
extern u8 D_ctx_80177A98;
extern u8 D_ctx_80177AB0;
extern u8 gDrawGround;
extern u8 gDrawBackdrop; // Venom Andross is the only level with multiple backdrops
extern u8 gAqDrawMode;
extern s32 gTitleState;
extern s32 gMainController;
@ -81,11 +81,11 @@ extern s32 gRingPassCount;
extern Vec3f gFormationInitRot;
extern Vec3f gFormationInitPos;
extern UNK_TYPE F_80178020;
extern s32 D_ctx_8017812C;
extern s32 gGroundClipMode;
extern LevelId gCurrentLevel;
extern s32 gLevelPhase;
extern s32 gBossActive;
extern s32 D_ctx_8017828C;
extern bool gKillEventActors;
extern s32 gUseDynaFloor;
extern s32 gRadioState;
extern s32 gCurrentRadioPortrait;
@ -132,22 +132,22 @@ extern s32 gFogFar;
extern UNK_TYPE F_801783E0[12];
extern s32 gStarCount;
extern f32 gStarWarpDistortion;
extern f32 D_ctx_80178418;
extern f32 gCOComplete2CamRotY;
extern UNK_TYPE F_8017841C;
extern f32 gStarfieldX;
extern f32 gStarfieldY;
extern f32 gStarfieldRoll;
extern f32 D_ctx_8017842C;
extern f32 D_ctx_80178430;
extern f32 gStarfieldScrollX;
extern f32 gStarfieldScrollY;
extern UNK_TYPE F_80178434;
extern UNK_TYPE F_80178438;
extern UNK_TYPE F_8017843C;
extern f32 D_ctx_80178440;
extern f32 D_ctx_80178444;
extern f32 D_ctx_80178448;
extern f32 D_ctx_80178450[3];
extern f32 D_ctx_80178460[3];
extern f32 D_ctx_80178470[3];
extern f32 gBossDeathCamAtX;
extern f32 gBossDeathCamAtY;
extern f32 gBossDeathCamAtZ;
extern f32 gCsTeamTargetsX[3];
extern f32 gCsTeamTargetsY[3];
extern f32 gCsTeamTargetsZ[3];
extern f32 gCameraShakeY;
extern s32 gCameraShake;
extern s32 D_ctx_80178484;
@ -155,10 +155,10 @@ extern bool gLoadLevelObjects;
extern UNK_TYPE F_8017848C;
extern UNK_TYPE F_80178490;
extern s32 D_ctx_80178494;
extern f32 D_ctx_80178498;
extern f32 D_ctx_8017849C;
extern f32 D_ctx_801784A0;
extern s32 D_ctx_801784A4;
extern f32 gShotHitPosZ;
extern f32 gShotHitPosX;
extern f32 gShotHitPosY;
extern s32 gZOSnakeWaypointCount;
extern UNK_TYPE F_801784A8;
extern GroundType gGroundType;
extern UNK_TYPE F_801784B0;
@ -221,7 +221,7 @@ extern s32 D_ctx_80161A84;
extern s32 gGroundSurface;
extern s32 gSavedGroundSurface;
extern u8 gGoldRingCount[4];
extern u8 D_ctx_80161A94[4];
extern u8 gSavedGoldRingCount[4];
extern s32 gHitCount;
extern s32 gSavedHitCount;
extern s16 gLifeCount[4];
@ -290,7 +290,7 @@ extern u8 gGreatFoxIntact;
extern u8 gTiStartLandmaster;
extern u16 gControllerRumbleTimers[4];
extern u16 gPlayerScores[4];
extern s32 D_ctx_80177C50;
extern s32 gCircleWipeFrame;
extern s32 D_ctx_80177C70;
extern s32 gTraining360MsgTimer;
extern s32 gTraining360MsgIndex;
@ -310,10 +310,10 @@ extern s32 gLeftWingFlashTimer[4];
extern s32 gRightWingDebrisTimer[4];
extern s32 gLeftWingDebrisTimer[4];
extern s32 gBombCount[4];
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 gVsPoints[4];
extern s32 gVsKills[4][10];
extern s32 gVsMatchOver;
extern s32 gVsMatchStart;
extern bool gChangeTo360;
extern Vec3f gTeamArrowsViewPos[10];
extern f32 D_ctx_80177F20[65];
@ -327,16 +327,16 @@ extern u32* gStarFillColors;
extern UNK_TYPE F_801782A0;
extern Scenery360* gScenery360;
extern UNK_TYPE F_801782B0;
extern s32 D_ctx_801782B8;
extern s32 gDrawSmallRocks;
extern s32 D_ctx_801782BC;
extern PosRot* D_ctx_801782C4;
extern PosRot* gZOSnakePosRots;
extern f32* D_ctx_801782CC;
extern f32* D_ctx_801782D4;
extern f32* D_ctx_801782DC;
extern f32* D_ctx_801782E4;
extern f32* D_ctx_801782EC;
extern UNK_TYPE F_801782F4;
extern s32 D_ctx_801782FC;
extern s32 gDynaFloorTimer;
extern UNK_TYPE F_80178304;
extern UNK_TYPE F_8017830C;
extern UNK_TYPE F_80178314;

View File

@ -21,7 +21,7 @@ void Actor272_Draw(Actor*);
bool AllRange_PlayMessage(u16*, RadioCharacterId);
void AllRange_GreatFoxRepair(Player*);
void AllRange_ClearRadio(void);
void func_360_8002EE64(Actor* this);
void ActorAllRange_SetShadowData(Actor* this);
void ActorAllRange_SpawnTeam(void);
void ActorAllRange_PlayMessage(u16* msg, RadioCharacterId character);
void ActorAllRange_UpdateStarWolfEvents(Actor*);
@ -48,7 +48,6 @@ void Background_DrawSun(void);
void Background_DrawLensFlare(void);
void Background_dummy_80040CDC(void);
void Background_DrawGround(void);
void func_bg_80042D38(void);
// fox_boss
void Boss_AwardBonus(Boss* boss);
@ -227,7 +226,7 @@ void Actor_SetupPlayerShot(PlayerShotId, PlayerShot*, s32, f32, f32, f32, f32, f
void Actor_SpawnPlayerLaser(s32, f32, f32, f32, f32, f32, f32, f32, f32, f32);
void Actor_SpawnGreatFoxLaser(s32 actorId, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 xRot, f32 yRot,
f32 zRot);
void ActorEvent_8006F0D8(f32 xPos, f32 yPos, f32 zPos, f32 scale1);
void ActorEvent_SpawnEffect347(f32 xPos, f32 yPos, f32 zPos, f32 scale1);
void ActorEvent_8006F254(Actor*);
void ActorEvent_Update(Actor*);
s32 Scenery111_Draw(Scenery*);
@ -373,10 +372,7 @@ void func_effect_80083FA8(Effect*);
void func_effect_80084194(Effect*);
// fox_fade
void func_fade_80084370(s32);
void func_fade_800843FC(s32);
void func_fade_80084488(s32);
void func_fade_80084688(s32, s32);
void Wipe_Draw(WipeMode mode, s32 frame);
// fox_hud
void func_hud_80084B94(s32);

View File

@ -64,10 +64,20 @@
#define VTX_T(x,y,z,s,t,cr,cg,cb,a) { { x, y, z }, 0, { s, t }, { cr, cg, cb, a } }
typedef enum WipeMode {
WIPE_CIRCULAR,
WIPE_HORIZONTAL,
WIPE_VERTICAL,
} WipeMode;
typedef struct {
u8 r, g, b;
} Color_RGB8; // size = 0x3
typedef struct Color_RGBA32 {
u8 r, g, b, a;
} Color_RGBA32; // size = 0x4
typedef union {
u16 data[SCREEN_HEIGHT * SCREEN_WIDTH];
u16 array[SCREEN_HEIGHT][SCREEN_WIDTH];

View File

@ -8,9 +8,9 @@
// struct Dummy3 {int x;};
// struct Dummy4 {int x;};
// struct Dummy5 {int x;};
struct Dummy6 {int x;};
struct Dummy7 {int x;};
struct Dummy8 {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;};

View File

@ -325,8 +325,8 @@ typedef enum EventActorId {
/* 18 */ EVID_18,
/* 19 */ EVID_19,
/* 20 */ EVID_20,
/* 21 */ EVID_21,
/* 22 */ EVID_22,
/* 21 */ EVID_A6_MISSILE,
/* 22 */ EVID_A6_ROCKET,
/* 23 */ EVID_23,
/* 24 */ EVID_24,
/* 25 */ EVID_25,
@ -342,12 +342,12 @@ typedef enum EventActorId {
/* 35 */ EVID_35,
/* 36 */ EVID_36,
/* 37 */ EVID_37,
/* 38 */ EVID_38,
/* 38 */ EVID_SX_WARP_GATE,
/* 39 */ EVID_39,
/* 40 */ EVID_40,
/* 40 */ EVID_EVENT_HANDLER,
/* 41 */ EVID_41,
/* 42 */ EVID_42,
/* 43 */ EVID_43,
/* 43 */ EVID_TEAMMATE,
/* 44 */ EVID_44,
/* 45 */ EVID_45,
/* 46 */ EVID_46,
@ -371,28 +371,28 @@ typedef enum EventActorId {
/* 64 */ EVID_64,
/* 65 */ EVID_65,
/* 66 */ EVID_66,
/* 67 */ EVID_67,
/* 67 */ EVID_METEO_PYRAMID_SHIP,
/* 68 */ EVID_68,
/* 69 */ EVID_69,
/* 70 */ EVID_70,
/* 71 */ EVID_71,
/* 71 */ EVID_WING_REPAIR,
/* 72 */ EVID_72,
/* 73 */ EVID_73,
/* 74 */ EVID_74,
/* 75 */ EVID_75,
/* 76 */ EVID_76,
/* 77 */ EVID_77,
/* 78 */ EVID_78,
/* 78 */ EVID_SUPPLY_CRATE,
/* 79 */ EVID_79,
/* 80 */ EVID_80,
/* 81 */ EVID_81,
/* 82 */ EVID_82,
/* 83 */ EVID_83,
/* 83 */ EVID_AQ_CLAM,
/* 84 */ EVID_84,
/* 85 */ EVID_85,
/* 86 */ EVID_86,
/* 85 */ EVID_BILL,
/* 86 */ EVID_KATT,
/* 87 */ EVID_87,
/* 88 */ EVID_88,
/* 88 */ EVID_AQ_STARFISH,
/* 89 */ EVID_89,
/* 90 */ EVID_90,
/* 91 */ EVID_91,
@ -406,12 +406,12 @@ typedef enum EventActorId {
/* 99 */ EVID_99,
/* 100 */ EVID_100,
/* 101 */ EVID_101,
/* 102 */ EVID_102,
/* 103 */ EVID_103,
/* 104 */ EVID_104,
/* 105 */ EVID_105,
/* 106 */ EVID_106,
/* 107 */ EVID_107,
/* 102 */ EVID_TR_BARRIER,
/* 103 */ EVID_ANDROSS_GATE,
/* 104 */ EVID_ANDROSS_GATE_2,
/* 105 */ EVID_SX_WARP_ENMY,
/* 106 */ EVID_KILLER_BEE,
/* 107 */ EVID_MA_SHOT_GATE,
/* 200 */ EVID_200 = 200,
/* 300 */ EVID_300 = 300,
/* 4095*/ EVID_FFF = 4095,

View File

@ -101,10 +101,7 @@ typedef struct {
/* 0x20 */ f32 yRot;
/* 0x24 */ f32 zScale;
/* 0x28 */ f32 xyScale;
/* 0x2C */ u8 red; // possibly a color struct
/* 0x2D */ u8 green;
/* 0x2E */ u8 blue;
/* 0x2F */ u8 alpha;
/* 0x2C */ Color_RGBA32 prim;
} TexturedLine; // size = 0x30
typedef struct {
@ -155,7 +152,7 @@ typedef struct {
typedef struct {
/* 0x00 */ Object obj;
/* 0x1C */ ObjectInfo info;
/* 0x40 */ u8 unk_40;
/* 0x40 */ u8 pathIndex;
/* 0x41 */ char unk_41[7];
/* 0x48 */ f32 sfxSource[3];
/* 0x54 */ f32 unk_54;
@ -170,9 +167,7 @@ typedef struct {
/* 0x4C */ s32 timer_4C;
/* 0x50 */ s8 dmgType;
/* 0x54 */ s32 dmgPart;
/* 0x58 */ f32 unk_58;
/* 0x5C */ f32 unk_5C;
/* 0x60 */ f32 unk_60;
/* 0x58 */ Vec3f effectVel;
/* 0x64 */ Vec3f vel;
/* 0x70 */ f32 sfxSource[3];
/* 0x7C */ char pad7C[4];
@ -183,9 +178,9 @@ typedef struct {
/* 0x1C */ ObjectInfo info;
/* 0x40 */ s32 index;
/* 0x44 */ char pad44[1];
/* 0x45 */ u8 unk_45;
/* 0x46 */ s8 unk_46;
/* 0x48 */ s32 unk_48;
/* 0x45 */ u8 sceneryId;
/* 0x46 */ s8 destroy;
/* 0x48 */ s32 toLeft;
} Sprite; // size = 0x4C
typedef struct {
@ -245,19 +240,19 @@ typedef struct {
/* 0x058 */ s16 timer_058;
/* 0x05A */ s16 timer_05A;
/* 0x05C */ s16 timer_05C;
/* 0x05E */ u8 unk_05E;
/* 0x05E */ u8 drawShadow;
/* 0x060 */ s16 health;
/* 0x062 */ s8 dmgType;
/* 0x064 */ s16 damage;
/* 0x066 */ s16 dmgPart;
/* 0x068 */ f32 unk_068;
/* 0x068 */ f32 yOffset;
/* 0x06C */ Vec3f vel;
/* 0x078 */ Vec3f unk_078;
/* 0x078 */ Vec3f rot_078;
/* 0x084 */ f32 gravity;
/* 0x088 */ s16 swork[40];
/* 0x0D8 */ f32 fwork[50];
/* 0x1A0 */ Vec3f vwork[50];
/* 0x3F8 */ f32 unk_3F8;
/* 0x3F8 */ f32 scale;
/* 0x3FC */ f32 sfxSource[3];
} Boss; // size = 0x408
@ -279,10 +274,10 @@ typedef struct {
/* 0x048 */ s16 unk_048;
/* 0x04A */ s16 unk_04A;
/* 0x04C */ s16 timer_04C;
/* 0x04E */ s16 unk_04E;
/* 0x04E */ s16 counter_04E;
/* 0x050 */ s32 iwork[25];
/* 0x0B4 */ s16 unk_0B4;
/* 0x0B6 */ s16 unk_0B6;
/* 0x0B4 */ s16 eventType;
/* 0x0B6 */ s16 animFrame; // used for model type in ActorAllRange and ActorCutscene
/* 0x0B8 */ s16 state;
/* 0x0BA */ char pad0BA[0x2];
/* 0x0BC */ u16 timer_0BC;
@ -291,8 +286,8 @@ typedef struct {
/* 0x0C2 */ u16 timer_0C2;
/* 0x0C4 */ u16 timer_0C4;
/* 0x0C6 */ u16 timer_0C6;
/* 0x0C8 */ u8 unk_0C8;
/* 0x0C9 */ u8 unk_0C9;
/* 0x0C8 */ u8 unk_0C8; // may have been used for scenery shadowing
/* 0x0C9 */ u8 drawShadow;
/* 0x0CA */ u8 lockOnTimers[4];
/* 0x0CE */ s16 health;
/* 0x0D0 */ s8 dmgType;
@ -300,10 +295,10 @@ typedef struct {
/* 0x0D4 */ s16 dmgSource;
/* 0x0D6 */ u16 damage;
/* 0x0D8 */ Vec3f hitPos;
/* 0x0E4 */ s16 aiType;
/* 0x0E6 */ s16 aiIndex;
/* 0x0E4 */ s16 aiType; // Actor index for AllRange, script index for Event
/* 0x0E6 */ s16 aiIndex; // Target index for AllRange, program counter for Event
/* 0x0E8 */ Vec3f vel;
/* 0x0F4 */ Vec3f unk_0F4;
/* 0x0F4 */ Vec3f rot_0F4;
/* 0x100 */ f32 sfxSource[3];
/* 0x10C */ f32 gravity;
/* 0x110 */ f32 scale;

View File

@ -205,10 +205,10 @@ typedef struct Player {
/* 0x104 */ Vec3f rot_104;
/* 0x110 */ f32 boostSpeed;
/* 0x114 */ f32 yRot_114;
/* 0x118 */ f32 yRot_118;
/* 0x118 */ f32 pathChangeYaw;
/* 0x11C */ f32 yRotVel_11C;
/* 0x120 */ f32 xRot_120;
/* 0x124 */ f32 xRot_124;
/* 0x124 */ f32 pathChangePitch;
/* 0x128 */ char pad128[4];
/* 0x12C */ f32 zRotBank;
/* 0x130 */ f32 zRotBarrelRoll;
@ -237,7 +237,7 @@ typedef struct Player {
/* 0x18C */ f32 unk_18C;
/* 0x190 */ f32 unk_190;
/* 0x194 */ f32 unk_194;
/* 0x198 */ s32 savedCockpitView;
/* 0x198 */ s32 savedAlternateView;
/* 0x19C */ s32 unk_19C;
/* 0x1A0 */ s32 unk_1A0;
/* 0x1A4 */ s32 unk_1A4;
@ -266,7 +266,7 @@ typedef struct Player {
/* 0x204 */ s32 unk_204;
/* 0x208 */ s32 unk_208;
/* 0x20C */ s32 unk_20C;
/* 0x210 */ s32 timer_210;
/* 0x210 */ s32 pathChangeTimer;
/* 0x214 */ s32 timer_214;
/* 0x218 */ s32 timer_218;
/* 0x21C */ s32 unk_21C;
@ -276,7 +276,7 @@ typedef struct Player {
/* 0x22C */ s32 whooshTimer;
/* 0x230 */ s32 unk_230;
/* 0x234 */ s32 unk_234;
/* 0x238 */ s32 cockpitView;
/* 0x238 */ s32 alternateView;
/* 0x23C */ s32 shadowing;
/* 0x240 */ s32 unk_240;
/* 0x244 */ s32 shotTimer;

View File

@ -86,7 +86,7 @@ void Timer_CompleteTask(TimerTask*);
void Timer_Wait(u64);
void Fault_ThreadEntry(OSMesg);
void func_80007FE4(FrameBuffer*, u16, u16);
void Fault_SetFrameBuffer(FrameBuffer*, u16, u16);
void Fault_Init(void);
typedef enum {

View File

@ -40,18 +40,18 @@ s32 vsprintf(char* dst, const char* fmt, va_list args);
void Game_Initialize(void);
void Game_Update(void);
extern s32 gShowCrosshairs[];
extern s32 D_game_800D2870;
extern bool gShowCrosshairs[];
extern bool D_game_800D2870;
extern f32 D_game_80161A10;
extern f32 D_game_80161A14;
extern f32 gNextVsViewScale;
extern f32 gVsViewScale;
extern s32 gPlayerInactive[4];
extern s32 D_game_80161A28;
extern s32 gVsMenuSelection;
extern u8 gShowHud;
extern u16 gNextLevelPhase;
extern u16 gNextLevel;
extern u16 gNextGameState;
extern u16 D_game_80161A34;
extern u16 gLastGameState;
extern u16 gBgColor;
extern u8 gBlurAlpha;
extern u8 gGameStandby;

View File

@ -20,7 +20,7 @@ extern Vec3f D_tank_800C9F2C;
// fox_display
extern s32 D_display_800CA220;
extern f32 D_display_800CA230;
extern f32 gCamDistortion;
extern Actor* gTeamHelpActor;
extern s32 gTeamHelpTimer;

View File

@ -197,7 +197,7 @@ func_edisplay_8005B848 = 0x8005B848;
func_edisplay_8005B9A4 = 0x8005B9A4;
func_edisplay_8005BA30 = 0x8005BA30;
func_edisplay_8005BAAC = 0x8005BAAC;
func_edisplay_8005BAB4 = 0x8005BAB4;
Object_SetShadowDL = 0x8005BAB4;
ItemCheckpoint_Draw = 0x8005C5F0;
ItemSilverRing_Draw = 0x8005C900;
ItemSilverStar_Draw = 0x8005C9C0;
@ -348,18 +348,18 @@ TexturedLine_UpdateAll = 0x8006A38C;
Object_Update = 0x8006A3E8;
// fox_enmy2
D_800D0DBC = 0x800D0DBC;//size:24
sEventTexLineColors = 0x800D0DBC;//size:24
// fox_game
D_game_80161A10 = 0x80161A10;
D_game_80161A14 = 0x80161A14;
gNextVsViewScale = 0x80161A10;
gVsViewScale = 0x80161A14;
gPlayerInactive = 0x80161A18; //size:0x10
D_game_80161A28 = 0x80161A28;
gVsMenuSelection = 0x80161A28;
gShowHud = 0x80161A2C;
gNextLevelPhase = 0x80161A2E;
gNextLevel = 0x80161A30;
gNextGameState = 0x80161A32;
D_game_80161A34 = 0x80161A34;
gLastGameState = 0x80161A34;
gBgColor = 0x80161A36;
gBlurAlpha = 0x80161A38;
gGameStandby = 0x80161A39;
@ -402,7 +402,7 @@ gArwingSpeed = 0x80161A54;
D_play_80161A5C = 0x80161A5C;
gScreenFlashTimer = 0x80161A60;
gDropHitCountItem = 0x80161A62;
D_play_80161A64 = 0x80161A64;
sPlayWingSplash = 0x80161A64;
sEnvironment = 0x80161A68;
gVenomHardClear = 0x800D2F68; //type:u8
@ -489,8 +489,8 @@ D_ctx_801779A8 = 0x801779A8;
gCsCamAtY = 0x801779B8;
gCsCamAtZ = 0x801779C0;
gChargeTimers = 0x801779C8;
gPlayerCamEye = 0x801779D8;
gPlayerCamAt = 0x801779E8;
gPlayCamEye = 0x801779D8;
gPlayCamAt = 0x801779E8;
gExpertMode = 0x801779F8;
gUturnDownTimers = 0x80177A00;
D_ctx_80177A10 = 0x80177A10;//size:0x28
@ -499,9 +499,9 @@ D_ctx_80177A48 = 0x80177A48;//size:0x28
gLoopDownTimers = 0x80177A70;//size:0x10
gCsFrameCount = 0x80177A80;
gLoopBoostTimers = 0x80177A88;//size:0x10
D_ctx_80177A98 = 0x80177A98;
gDrawGround = 0x80177A98;
gMuzzleFlashScale = 0x80177AA0;
D_ctx_80177AB0 = 0x80177AB0;
gDrawBackdrop = 0x80177AB0;
gShieldAlpha = 0x80177AB8;
gAqDrawMode = 0x80177AC8;
gHasShield = 0x80177AD0;
@ -519,7 +519,7 @@ gMissionMedal = 0x80177BB0;
gControllerRumbleTimers = 0x80177BD0;
gPlanetPathStatus = 0x80177BD8;
gPlayerScores = 0x80177C30;
D_ctx_80177C50 = 0x80177C50;
gCircleWipeFrame = 0x80177C50;
D_ctx_80177C58 = 0x80177C58;
gOptionSoundMode = 0x80177C74;
gVolumeSettings = 0x80177C80;
@ -558,7 +558,7 @@ gTeamArrowsViewPos = 0x80177E98;
gFormationInitPos = 0x80177F10;
D_ctx_80177F20 = 0x80177F20; //size:0xF4
D_ctx_80178028 = 0x80178028; //size:0xF4
D_ctx_8017812C = 0x8017812C;
gGroundClipMode = 0x8017812C;
D_ctx_80178130 = 0x80178130; //size:0xF4
gCurrentLevel = 0x80178234;
D_ctx_80178238 = 0x80178238;//size:0x3D type:u8
@ -566,7 +566,7 @@ gLevelPhase = 0x8017827C;
gPlayer = 0x80178280;
gBossActive = 0x80178284;
gStarOffsetsX = 0x80178288;
D_ctx_8017828C = 0x8017828C;
gKillEventActors = 0x8017828C;
gStarOffsetsY = 0x80178290;
gUseDynaFloor = 0x80178294;
gStarFillColors = 0x80178298;
@ -575,7 +575,7 @@ gCurrentRadioPortrait = 0x801782A4;
gScenery360 = 0x801782A8;
gRadioStateTimer = 0x801782AC;
gRadioMouthTimer = 0x801782B4;
D_ctx_801782B8 = 0x801782B8;
gDrawSmallRocks = 0x801782B8;
D_ctx_801782BC = 0x801782BC;
D_ctx_801782C0 = 0x801782C0;
D_ctx_801782D0 = 0x801782D0;
@ -583,7 +583,7 @@ D_ctx_801782D4 = 0x801782D4;
gRadioMsgCharIndex = 0x801782D8;
gRadioMsgId = 0x801782E8;
gMsgCharIsPrinting = 0x801782F8;
D_ctx_801782FC = 0x801782FC;
gDynaFloorTimer = 0x801782FC;
gHideRadio = 0x80178300;
gRadioMsg = 0x80178308;
gLevelObjects = 0x80178310;
@ -614,15 +614,15 @@ gStarCount = 0x80178410;
gStarfieldX = 0x80178420;
gStarfieldY = 0x80178424;
gStarfieldRoll = 0x80178428;
D_ctx_8017842C = 0x8017842C;
D_ctx_80178430 = 0x80178430;
D_ctx_80178440 = 0x80178440;
D_ctx_80178444 = 0x80178444;
D_ctx_80178448 = 0x80178448;
gStarfieldScrollX = 0x8017842C;
gStarfieldScrollY = 0x80178430;
gBossDeathCamAtX = 0x80178440;
gBossDeathCamAtY = 0x80178444;
gBossDeathCamAtZ = 0x80178448;
gCameraShakeY = 0x8017847C;
gCameraShake = 0x80178480;
gLoadLevelObjects = 0x80178488;
D_ctx_801784A4 = 0x801784A4;
gZOSnakeWaypointCount = 0x801784A4;
gGroundType = 0x801784AC;
gLight1xRot = 0x801784B8;
gLight1yRot = 0x801784BC;
@ -728,12 +728,12 @@ Player_ArwingBank = 0x800ADA28;
Player_UseTankJets = 0x800ADD98;
Player_UpdatePath = 0x800ADF58;
Player_CheckBounds360 = 0x800AE278;
Player_ArwingMove360 = 0x800AE4A4;
Player_MoveArwing360 = 0x800AE4A4;
Player_PerformLoop = 0x800AECAC;
Player_ArwingMoveOnRails = 0x800AF07C;
Player_TankMove360 = 0x800AF928;
Player_MoveArwingOnRails = 0x800AF07C;
Player_MoveTank360 = 0x800AF928;
Player_OnFootUpdateSpeed = 0x800B00C0;
Player_OnFootMove = 0x800B0194;
Player_MoveOnFoot = 0x800B0194;
Player_Setup = 0x800B0F50;
Player_UpdateArwingRoll = 0x800B2130;
Player_UpdateTankRoll = 0x800B22C0;

View File

@ -278,7 +278,7 @@ void AllRange_ClearRadio(void) {
sStarWolfKillTimer = gRadioState = gActors[1].iwork[1] = gActors[2].iwork[1] = gActors[3].iwork[1] = 0;
}
void func_360_8002EE64(Actor* this) {
void ActorAllRange_SetShadowData(Actor* this) {
s32 i;
s32 colId;
Scenery360* scenery360;
@ -297,7 +297,7 @@ void func_360_8002EE64(Actor* this) {
s32 pad2;
this->fwork[25] = this->fwork[26] = this->fwork[28] = this->fwork[27] = 0.0f;
if ((this->unk_0C9 != 0) && (gLevelMode == LEVELMODE_ALL_RANGE) && (gLevelType == LEVELTYPE_PLANET)) {
if (this->drawShadow && (gLevelMode == LEVELMODE_ALL_RANGE) && (gLevelType == LEVELTYPE_PLANET)) {
for (i = 0, scenery360 = gScenery360; i < 200; i++, scenery360++) {
if ((scenery360->obj.status == OBJ_ACTIVE) &&
((scenery360->obj.id == OBJ_SCENERY_150) || (scenery360->obj.id == OBJ_SCENERY_149) ||
@ -387,13 +387,13 @@ void ActorAllRange_SpawnTeam(void) {
actor->aiIndex = sTeamSpawnTargets[i];
}
actor->state = STATE360_2;
actor->unk_0F4.y = 180.0f;
actor->rot_0F4.y = 180.0f;
if (actor->aiIndex <= -1) {
actor->state = STATE360_3;
}
actor->health = 50;
if ((gLevelType == LEVELTYPE_PLANET) || (gCurrentLevel == LEVEL_BOLSE)) {
actor->unk_0C9 = 1;
actor->drawShadow = true;
}
actor->iwork[11] = 1;
if (actor->aiType <= AI360_PEPPY) {
@ -434,11 +434,11 @@ void ActorAllRange_SpawnStarWolf(void) {
actor->aiIndex = sStarWolfSpawnTargets[i];
gActors[actor->aiIndex].aiIndex = -1;
actor->health = 100;
actor->unk_0C9 = 1;
actor->unk_0F4.y = 225.0f;
actor->drawShadow = true;
actor->rot_0F4.y = 225.0f;
actor->state = STATE360_0;
actor->timer_0BC = 250;
actor->unk_0F4.x = -20.0f;
actor->rot_0F4.x = -20.0f;
actor->iwork[11] = 1;
if (gCurrentLevel == LEVEL_VENOM_2) {
actor->obj.rot.z = sStarWolfVE2SpawnRot[i];
@ -534,7 +534,7 @@ void ActorAllRange_UpdateStarWolfEvents(Actor* this) {
if (actor->aiType == AI360_WOLF) {
if (gCurrentLevel != LEVEL_VENOM_2) {
actor->state = STATE360_3;
actor->unk_04E = 300;
actor->counter_04E = 300;
}
} else {
actor->state = STATE360_3;
@ -562,7 +562,7 @@ void ActorAllRange_ChooseNewTarget(Actor* actor) {
s32 enemyId;
for (enemyId = AI360_10, enemy = &gActors[AI360_10]; enemyId < ARRAY_COUNT(gActors); enemyId++, enemy++) {
if ((enemy->obj.status == OBJ_ACTIVE) && (enemy->obj.id == OBJ_ACTOR_ALLRANGE) && (enemy->unk_0B6 == 0) &&
if ((enemy->obj.status == OBJ_ACTIVE) && (enemy->obj.id == OBJ_ACTOR_ALLRANGE) && (enemy->animFrame == 0) &&
(enemy->aiIndex <= -1)) {
alreadyTaken = false;
for (teamId = AI360_FALCO, team = &gActors[AI360_FALCO]; teamId <= AI360_PEPPY; teamId++, team++) {
@ -829,7 +829,7 @@ void ActorAllRange_ApplyDamage(Actor* this) {
}
if (this->dmgType != DMG_NONE) {
var_a1 = false;
if ((this->unk_0B6 == 3) ||
if ((this->animFrame == 3) ||
((gCurrentLevel == LEVEL_BOLSE) && (gBosses[1].obj.status != OBJ_FREE) &&
(this->aiType >= AI360_WOLF)) ||
((gCurrentLevel == LEVEL_VENOM_2) && (this->aiType >= AI360_WOLF) && (this->aiType < AI360_10) &&
@ -920,7 +920,7 @@ void ActorAllRange_ApplyDamage(Actor* this) {
if (this->damage >= 20) {
this->timer_0BC = 0;
}
if ((gCurrentLevel == LEVEL_KATINA) && (this->unk_0B6 == 1) && (this->dmgSource == AI360_FOX + 1)) {
if ((gCurrentLevel == LEVEL_KATINA) && (this->animFrame == 1) && (this->dmgSource == AI360_FOX + 1)) {
if (gKaAllyKillCount < 2) {
ActorAllRange_PlayMessage(gMsg_ID_18018, RCID_BILL);
}
@ -1028,7 +1028,7 @@ void ActorAllRange_ApplyDamage(Actor* this) {
}
func_effect_8007D10C(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 1.5f);
if (this->aiType < AI360_GREAT_FOX) {
Matrix_RotateY(gCalcMatrix, this->unk_0F4.y * M_DTOR, MTXF_NEW);
Matrix_RotateY(gCalcMatrix, this->rot_0F4.y * M_DTOR, MTXF_NEW);
sp48.x = 30.0f;
if (Rand_ZeroOne() < 0.5f) {
sp48.x = -30.0f;
@ -1067,7 +1067,7 @@ void ActorAllRange_ApplyDamage(Actor* this) {
} else if (this->dmgSource <= AI360_PEPPY + 101) {
if (this->aiType >= AI360_WOLF) {
if (this->dmgSource == AI360_FOX + 1) {
if ((gCurrentLevel == LEVEL_KATINA) && (this->unk_0B6 == 1) && !gKaKilledAlly) {
if ((gCurrentLevel == LEVEL_KATINA) && (this->animFrame == 1) && !gKaKilledAlly) {
gKaKilledAlly = true;
Radio_PlayMessage(gMsg_ID_18015, RCID_BILL);
} else if (this->aiType == AI360_KATT) {
@ -1250,8 +1250,8 @@ void ActorAllRange_Update(Actor* this) {
switch (this->state) {
case STATE360_7:
case STATE360_8:
if (this->unk_0F4.x > 180.0f) {
this->unk_0F4.x -= 360.0f;
if (this->rot_0F4.x > 180.0f) {
this->rot_0F4.x -= 360.0f;
}
this->unk_046 = 0;
break;
@ -1407,16 +1407,16 @@ void ActorAllRange_Update(Actor* this) {
if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_START_360) {
this->fwork[0] = this->fwork[1] = 40.0f;
if (gActors[0].state == STATE360_5) {
Math_SmoothStepToF(&this->unk_0F4.x, 30.0f, 0.1f, 0.5f, 0.0f);
Math_SmoothStepToF(&this->rot_0F4.x, 30.0f, 0.1f, 0.5f, 0.0f);
this->fwork[1] = 200.0f;
}
if (this->timer_0BC == 0) {
if (this->aiType == AI360_WOLF) {
this->state = STATE360_3;
if (gCurrentLevel == LEVEL_VENOM_2) {
this->unk_04E = 200;
this->counter_04E = 200;
} else {
this->unk_04E = 200;
this->counter_04E = 200;
}
} else {
this->state = STATE360_2;
@ -1432,7 +1432,7 @@ void ActorAllRange_Update(Actor* this) {
case STATE360_1:
this->fwork[1] = 40.0f;
if ((this->timer_0BC < 35) && (gCurrentLevel == LEVEL_FORTUNA)) {
Math_SmoothStepToF(&this->unk_0F4.x, 15.0f, 0.1f, 1.0f, 0.0f);
Math_SmoothStepToF(&this->rot_0F4.x, 15.0f, 0.1f, 1.0f, 0.0f);
}
if (this->timer_0BC == 0) {
this->state = STATE360_3;
@ -1451,7 +1451,7 @@ void ActorAllRange_Update(Actor* this) {
sp10F = 0xB;
if (this->aiType == AI360_FALCO) {
spF0 = 0.5f;
} else if ((this->unk_0B6 != 2) && (this->unk_0B6 == 3)) {
} else if ((this->animFrame != 2) && (this->animFrame == 3)) {
spF0 = 0.5f;
}
if (this->aiIndex == AI360_FOX) {
@ -1470,7 +1470,7 @@ void ActorAllRange_Update(Actor* this) {
if ((gPlayer[0].somersault && (this->iwork[4] > 10)) ||
((gCurrentLevel == LEVEL_BOLSE) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY))) {
this->state = STATE360_3;
this->unk_04E = 300;
this->counter_04E = 300;
this->timer_0BC = 160;
if (this->aiType == AI360_WOLF) {
ActorAllRange_PlayMessage(gMsg_ID_9369, RCID_WOLF);
@ -1822,10 +1822,10 @@ void ActorAllRange_Update(Actor* this) {
this->iwork[2] = AI360_FOX;
}
if (this->aiIndex == AI360_FOX) {
if (this->unk_04E != 0) {
this->unk_04E--;
if (this->counter_04E != 0) {
this->counter_04E--;
}
if (this->unk_04E == 0) {
if (this->counter_04E == 0) {
this->state = STATE360_2;
this->iwork[2] = AI360_FOX;
}
@ -1833,9 +1833,9 @@ void ActorAllRange_Update(Actor* this) {
break;
case STATE360_7:
this->fwork[1] = 40.0f;
Math_SmoothStepToF(&this->unk_0F4.x, 360.0f, 0.1f, 5.0f, 0.0001f);
Math_SmoothStepToF(&this->rot_0F4.x, 360.0f, 0.1f, 5.0f, 0.0001f);
Math_SmoothStepToAngle(&this->obj.rot.z, 0.0f, 0.1f, 3.0f, 0.01f);
if (this->unk_0F4.x > 350.0f) {
if (this->rot_0F4.x > 350.0f) {
this->state = STATE360_3;
}
break;
@ -1848,19 +1848,19 @@ void ActorAllRange_Update(Actor* this) {
}
switch (this->unk_046) {
case 0:
Math_SmoothStepToF(&this->unk_0F4.x, 200.0f, 0.1f, 6.0f, 0.0001f);
if (this->unk_0F4.x > 190.0f) {
this->unk_0F4.y += 190.0f;
if (this->unk_0F4.y >= 360.0f) {
this->unk_0F4.y -= 360.0f;
Math_SmoothStepToF(&this->rot_0F4.x, 200.0f, 0.1f, 6.0f, 0.0001f);
if (this->rot_0F4.x > 190.0f) {
this->rot_0F4.y += 190.0f;
if (this->rot_0F4.y >= 360.0f) {
this->rot_0F4.y -= 360.0f;
}
this->unk_0F4.x = 360.0f - (this->unk_0F4.x - 180.0f);
this->rot_0F4.x = 360.0f - (this->rot_0F4.x - 180.0f);
this->obj.rot.z += 180.0f;
if (this->obj.rot.z >= 360.0f) {
this->obj.rot.z -= 360.0f;
}
this->timer_0BC = 40;
this->unk_046 += 1;
this->unk_046++;
}
this->obj.pos.y -= 3.0f;
break;
@ -1873,7 +1873,7 @@ void ActorAllRange_Update(Actor* this) {
break;
case STATE360_9:
this->fwork[1] = 40.0f;
if (Math_SmoothStepToAngle(&this->unk_0F4.y, this->fwork[19], 0.5f, 5.0f, 0.0f) < 0.0f) {
if (Math_SmoothStepToAngle(&this->rot_0F4.y, this->fwork[19], 0.5f, 5.0f, 0.0f) < 0.0f) {
spD0 = 70.0f;
} else {
spD0 = 290.0f;
@ -1903,7 +1903,7 @@ void ActorAllRange_Update(Actor* this) {
if (gCurrentLevel == LEVEL_VENOM_2) {
var_v0 = 2 - 1;
}
if (!((this->index + gGameFrameCount) & var_v0)) {
if (((this->index + gGameFrameCount) & var_v0) == 0) {
this->fwork[19] = Math_RadToDeg(Math_Atan2F(spE4, spDC));
this->fwork[20] = Math_RadToDeg(Math_Atan2F(spE0, sqrtf(SQ(spE4) + SQ(spDC))));
}
@ -1939,11 +1939,11 @@ void ActorAllRange_Update(Actor* this) {
}
} else if ((this->obj.pos.y < (gGroundHeight + 50.0f)) && (spD8 > 180.0f)) {
spD8 = 0.0f;
this->unk_0F4.x = 0.0f;
this->rot_0F4.x = 0.0f;
}
}
Math_SmoothStepToAngle(&this->unk_0F4.x, spD8, 0.5f, this->fwork[2], 0.0001f);
spD0 = Math_SmoothStepToAngle(&this->unk_0F4.y, spD4, 0.5f, this->fwork[2], 0.0001f) * 30.0f;
Math_SmoothStepToAngle(&this->rot_0F4.x, spD8, 0.5f, this->fwork[2], 0.0001f);
spD0 = Math_SmoothStepToAngle(&this->rot_0F4.y, spD4, 0.5f, this->fwork[2], 0.0001f) * 30.0f;
if (spD0 < 0.0f) {
spD0 = spD0 * -1.0f;
} else {
@ -1979,8 +1979,8 @@ void ActorAllRange_Update(Actor* this) {
}
}
}
this->obj.rot.x = -this->unk_0F4.x;
this->obj.rot.y = this->unk_0F4.y;
this->obj.rot.x = -this->rot_0F4.x;
this->obj.rot.y = this->rot_0F4.y;
Math_SmoothStepToF(&this->fwork[0], this->fwork[1], 0.2f, 1.0f, 0.1f);
Math_SmoothStepToF(&this->fwork[2], this->fwork[3], 1.0f, 0.1f, 0.1f);
spC0 = SIN_DEG(this->obj.rot.x);
@ -2053,7 +2053,7 @@ void ActorAllRange_Update(Actor* this) {
radarMark->pos.x = this->obj.pos.x;
radarMark->pos.y = this->obj.pos.y;
radarMark->pos.z = this->obj.pos.z;
radarMark->yRot = this->unk_0F4.y + 180.0f;
radarMark->yRot = this->rot_0F4.y + 180.0f;
if (this->iwork[1] != 0) {
this->iwork[1]--;
if ((this->iwork[1] == 0) && (gActors[0].state == STATE360_2) && (gRadioState == 0)) {
@ -2106,7 +2106,7 @@ void ActorAllRange_Update(Actor* this) {
}
}
if (gCurrentLevel == LEVEL_FORTUNA) {
func_360_8002EE64(this);
ActorAllRange_SetShadowData(this);
} else if (gCurrentLevel == LEVEL_VENOM_ANDROSS) {
this->unk_04A++;
if (this->unk_04A >= Animation_GetFrameCount(&D_VE2_600C200)) {
@ -2258,7 +2258,7 @@ void ActorAllRange_Draw(ActorAllRange* this) {
break;
case AI360_GREAT_FOX:
Display_SetSecondLight(&this->obj.pos);
this->unk_0B6 = 1;
this->animFrame = 1;
ActorCutscene_Draw(this);
break;
case AI360_MISSILE:
@ -2278,7 +2278,7 @@ void ActorAllRange_Draw(ActorAllRange* this) {
Matrix_Scale(gGfxMatrix, 1.5f, 1.5f, 1.5f, MTXF_APPLY);
Actor_DrawEngineGlow(this, 2);
} else if (gCurrentLevel == LEVEL_KATINA) {
switch (this->unk_0B6) {
switch (this->animFrame) {
case 0:
gSPDisplayList(gMasterDisp++, aKaEnemy1LowPolyDL);
break;

View File

@ -22,11 +22,7 @@ void func_800A3E00(void) {
case 1:
D_ctx_80177868 = 2;
gDrawMode = DRAW_UNK_7;
gCsCamAtY = 0.0f;
gCsCamAtX = gCsCamAtY;
gCsCamEyeZ = gCsCamAtX;
gCsCamEyeY = gCsCamEyeZ;
gCsCamEyeX = gCsCamEyeY;
gCsCamEyeX = gCsCamEyeY = gCsCamEyeZ = gCsCamAtX = gCsCamAtY = 0.0f;
gCsCamAtZ = -10.0f;
break;
case 2:

View File

@ -126,9 +126,9 @@ void PlayerShot_Impact(PlayerShot* shot) {
Object_Kill(&shot->obj, shot->sfxSource);
return;
}
shot->obj.pos.z = D_ctx_80178498; // strange order on the globals
shot->obj.pos.y = D_ctx_801784A0;
shot->obj.pos.x = D_ctx_8017849C;
shot->obj.pos.z = gShotHitPosZ; // strange order on the globals
shot->obj.pos.y = gShotHitPosY;
shot->obj.pos.x = gShotHitPosX;
if ((shot->obj.id == PLAYERSHOT_BOMB) ||
((gCurrentLevel != LEVEL_AQUAS) && (shot->obj.id == PLAYERSHOT_LOCK_ON) && (shot->unk_5C != 0))) {
if (shot->obj.id == PLAYERSHOT_LOCK_ON) {
@ -391,10 +391,10 @@ s32 PlayerShot_CheckEventHitbox(PlayerShot* shot, Actor* actor) {
Matrix_RotateX(gCalcMatrix, -actor->obj.rot.x * M_DTOR, MTXF_APPLY);
Matrix_RotateY(gCalcMatrix, -actor->obj.rot.y * M_DTOR, MTXF_APPLY);
}
if (((actor->vwork[29].z != 0.0f) || (actor->vwork[29].x != 0.0f) || (actor->unk_0F4.z != 0.0f) ||
if (((actor->vwork[29].z != 0.0f) || (actor->vwork[29].x != 0.0f) || (actor->rot_0F4.z != 0.0f) ||
(actor->vwork[29].y != 0.0f)) &&
(actor->unk_0B4 != EVID_31)) {
Matrix_RotateZ(gCalcMatrix, -(actor->vwork[29].z + actor->unk_0F4.z) * M_DTOR, MTXF_APPLY);
(actor->eventType != EVID_31)) {
Matrix_RotateZ(gCalcMatrix, -(actor->vwork[29].z + actor->rot_0F4.z) * M_DTOR, MTXF_APPLY);
Matrix_RotateX(gCalcMatrix, -actor->vwork[29].x * M_DTOR, MTXF_APPLY);
Matrix_RotateY(gCalcMatrix, -actor->vwork[29].y * M_DTOR, MTXF_APPLY);
}
@ -686,9 +686,10 @@ void PlayerShot_ApplyDamageToActor(PlayerShot* shot, Actor* actor, s32 hitIndex)
actor->hitPos.y = shot->obj.pos.y;
actor->hitPos.z = shot->obj.pos.z;
if (((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->dmgPart == 0) &&
((actor->unk_0B4 == EVID_48) || (actor->unk_0B4 == EVID_49) || (actor->unk_0B4 == EVID_50))) ||
((actor->eventType == EVID_48) || (actor->eventType == EVID_49) || (actor->eventType == EVID_50))) ||
((actor->obj.id == OBJ_ACTOR_ALLRANGE) && (actor->fwork[23] > 1.0f)) ||
((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->dmgPart == 0) && (actor->unk_0B4 == EVID_67)) ||
((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->dmgPart == 0) &&
(actor->eventType == EVID_METEO_PYRAMID_SHIP)) ||
((actor->obj.id == OBJ_ACTOR_261) && (shot->obj.id != PLAYERSHOT_LOCK_ON) &&
((actor->state < 3) || (actor->state >= 5))) ||
((actor->obj.id == OBJ_ACTOR_260) && (shot->obj.id != PLAYERSHOT_LOCK_ON) && (actor->timer_0BC != 0))) {
@ -713,7 +714,7 @@ void PlayerShot_ApplyDamageToActor(PlayerShot* shot, Actor* actor, s32 hitIndex)
actor->timer_0C2 = 3;
func_effect_80078E50(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 8.0f);
AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 4);
Play_SpawnHitmark(D_ctx_8017849C, D_ctx_801784A0, D_ctx_80178498);
Play_SpawnHitmark(gShotHitPosX, gShotHitPosY, gShotHitPosZ);
}
} else {
PlayerShot_Impact(shot);
@ -765,13 +766,13 @@ void PlayerShot_CollisionCheck(PlayerShot* shot) {
}
break;
case OBJ_ACTOR_EVENT:
if (actor->unk_0B4 == EVID_42) {
if (actor->eventType == EVID_42) {
if (PlayerShot_CheckPolyCollision(shot, ACTOR_EVENT_ID, &actor->obj)) {
actor->dmgType = DMG_BEAM;
actor->dmgPart = shot->sourceId;
return;
}
} else if (actor->unk_0B4 == EVID_63) {
} else if (actor->eventType == EVID_63) {
test.x = fabsf(actor->obj.pos.x - shot->obj.pos.x);
test.y = fabsf(actor->obj.pos.y - shot->obj.pos.y);
test.z = fabsf(actor->obj.pos.z - shot->obj.pos.z);
@ -939,11 +940,11 @@ void PlayerShot_CollisionCheck(PlayerShot* shot) {
if (sprite->obj.status == OBJ_ACTIVE) {
if (sprite->obj.id != OBJ_SPRITE_TI_CACTUS) {
if (PlayerShot_CheckSpriteHitbox(shot, sprite)) {
sprite->unk_46 = 1;
sprite->destroy = 1;
}
} else {
if (PlayerShot_CheckObjectHitbox(shot, sprite->info.hitbox, &sprite->obj) != 0) {
sprite->unk_46 = 1;
sprite->destroy = 1;
}
}
}
@ -1125,14 +1126,14 @@ void PlayerShot_DrawLaser(PlayerShot* shot) {
} else if (gCurrentLevel == LEVEL_KATINA) {
if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO) {
if (shot->sourceId > NPC_SHOT_ID + AI360_PEPPY) {
if (gActors[shot->sourceId - NPC_SHOT_ID].unk_0B6 == 0) {
if (gActors[shot->sourceId - NPC_SHOT_ID].animFrame == 0) {
var_a1 = 1;
}
if (gActors[shot->sourceId - NPC_SHOT_ID].unk_0B6 == 2) {
if (gActors[shot->sourceId - NPC_SHOT_ID].animFrame == 2) {
var_a1 = 2;
}
}
} else if (gActors[shot->sourceId - NPC_SHOT_ID].unk_0B6 == 34) {
} else if (gActors[shot->sourceId - NPC_SHOT_ID].animFrame == 34) {
var_a1 = 1;
}
}
@ -1538,9 +1539,9 @@ void PlayerShot_UpdateShot2(PlayerShot* shot, Player* player) {
}
for (sp5C.z = 0.0f; sp5C.z <= shot->scale; sp5C.z += 200.0f) {
Matrix_MultVec3f(gCalcMatrix, &sp5C, &sp38);
D_ctx_80178498 = shot->obj.pos.z;
D_ctx_801784A0 = shot->obj.pos.y;
D_ctx_8017849C = shot->obj.pos.x;
gShotHitPosZ = shot->obj.pos.z;
gShotHitPosY = shot->obj.pos.y;
gShotHitPosX = shot->obj.pos.x;
shot->obj.pos.x = player->pos.x + sp38.x;
shot->obj.pos.y = player->pos.y + sp38.y;
shot->obj.pos.z = player->trueZpos + sp38.z;
@ -1575,7 +1576,7 @@ void PlayerShot_UpdateShot2(PlayerShot* shot, Player* player) {
shot->unk_4C += shot->vel.y;
shot->unk_50 += shot->vel.z;
if (((gGameFrameCount % 4) == 0)) {
Play_SpawnHitmark(D_ctx_8017849C, D_ctx_801784A0, D_ctx_80178498);
Play_SpawnHitmark(gShotHitPosX, gShotHitPosY, gShotHitPosZ);
}
if ((fabsf(shot->obj.pos.x - shot->unk_48) < 200.0f) && (fabsf(shot->obj.pos.y - shot->unk_4C) < 200.0f) &&
(fabsf(shot->obj.pos.z - shot->unk_50) < 200.0f)) {
@ -1823,18 +1824,18 @@ void PlayerShot_CheckBossHitbox(PlayerShot* shot) {
}
void PlayerShot_SetBombLight(PlayerShot* shot) {
static u8 D_800C9C18[4] = { 255, 255, 32, 32 };
static u8 D_800C9C1C[4] = { 255, 32, 255, 32 };
static u8 D_800C9C20[4] = { 32, 32, 32, 255 };
static u8 sPlayerReds[4] = { 255, 255, 32, 32 };
static u8 sPlayerGreens[4] = { 255, 32, 255, 32 };
static u8 sPlayerBlues[4] = { 32, 32, 32, 255 };
f32 brightness;
gLight3x = shot->obj.pos.x;
gLight3y = shot->obj.pos.y;
gLight3z = shot->obj.pos.z;
if (gVersusMode) {
gLight3R = D_800C9C18[shot->sourceId];
gLight3G = D_800C9C1C[shot->sourceId];
gLight3B = D_800C9C20[shot->sourceId];
gLight3R = sPlayerReds[shot->sourceId];
gLight3G = sPlayerGreens[shot->sourceId];
gLight3B = sPlayerBlues[shot->sourceId];
} else {
gLight3R = 90;
gLight3G = 90;
@ -1881,7 +1882,7 @@ void PlayerShot_ApplyExplosionDamage(PlayerShot* shot, s32 damage) {
dy = sprite->obj.pos.y - shot->obj.pos.y;
dz = sprite->obj.pos.z - shot->obj.pos.z;
if (sqrtf(SQ(dx) + SQ(dy) + SQ(dz)) < radius) {
sprite->unk_46 = 1;
sprite->destroy = 1;
}
}
}
@ -1905,8 +1906,8 @@ void PlayerShot_ApplyExplosionDamage(PlayerShot* shot, s32 damage) {
if ((actor->obj.id == OBJ_ACTOR_193) || (actor->obj.id == OBJ_ACTOR_186) ||
(actor->obj.id == OBJ_ACTOR_190) || (actor->obj.id == OBJ_ACTOR_202) ||
(actor->obj.id == OBJ_ACTOR_201) || (actor->obj.id == OBJ_ACTOR_187) ||
((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->unk_0B4 == EVID_78)) ||
((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->unk_0B4 == EVID_38)) ||
((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->eventType == EVID_SUPPLY_CRATE)) ||
((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->eventType == EVID_SX_WARP_GATE)) ||
(actor->obj.id == OBJ_ACTOR_196)) {
actor->dmgType = DMG_EXPLOSION;
actor->dmgPart = 0;
@ -2039,7 +2040,7 @@ void PlayerShot_UpdateBomb(PlayerShot* shot) {
PlayerShot_SetBombLight(shot);
break;
case 1:
D_ctx_8017812C = 2;
gGroundClipMode = 2;
shot->obj.rot.y += 1.0f;
Math_SmoothStepToF(&shot->scale, shot->unk_48, 0.05f, 1.5f, 0.001f);
if ((shot->timer > 0) && (shot->timer < 30)) {
@ -2062,7 +2063,7 @@ void PlayerShot_UpdateBomb(PlayerShot* shot) {
if (shot->unk_58 < 0) {
shot->unk_58 = 0;
Object_Kill(&shot->obj, shot->sfxSource);
D_ctx_8017812C = 0;
gGroundClipMode = 0;
}
}
PlayerShot_ApplyExplosionDamage(shot, 50);
@ -2225,7 +2226,7 @@ void PlayerShot_UpdateShot(PlayerShot* shot, s32 index) {
BonusText_Display(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, bonus);
gHitCount += shot->bonus;
}
if ((shot->bonus >= 7) && (gBossActive == 0) && (gLevelMode == LEVELMODE_ON_RAILS) &&
if ((shot->bonus >= 7) && !gBossActive && (gLevelMode == LEVELMODE_ON_RAILS) &&
((gTeamShields[TEAM_ID_FALCO] > 0) || (gTeamShields[TEAM_ID_SLIPPY] > 0) ||
(gTeamShields[TEAM_ID_PEPPY] > 0))) {
do {
@ -2284,9 +2285,9 @@ void PlayerShot_Update(PlayerShot* shot) {
if (shot->timer > 0) {
shot->timer--;
}
D_ctx_80178498 = shot->obj.pos.z;
D_ctx_801784A0 = shot->obj.pos.y;
D_ctx_8017849C = shot->obj.pos.x;
gShotHitPosZ = shot->obj.pos.z;
gShotHitPosY = shot->obj.pos.y;
gShotHitPosX = shot->obj.pos.x;
PlayerShot_UpdateShot(shot, i);
}
break;

View File

@ -249,7 +249,7 @@ void Background_DrawBackdrop(void) {
u8 levelType;
s32 levelId;
if (D_ctx_80177AB0 == 0) {
if (gDrawBackdrop == 0) {
return;
}
@ -353,16 +353,16 @@ void Background_DrawBackdrop(void) {
}
break;
case LEVEL_VENOM_ANDROSS:
if (D_ctx_80177AB0 != 6) {
if ((D_ctx_80177AB0 == 2) || (D_ctx_80177AB0 == 7)) {
if (gDrawBackdrop != 6) {
if ((gDrawBackdrop == 2) || (gDrawBackdrop == 7)) {
Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY);
Matrix_Translate(gGfxMatrix, 0.0f, -4000.0f, -7000.0f, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
gSPDisplayList(gMasterDisp++, D_VE2_600F670);
} else if ((D_ctx_80177AB0 == 3) || (D_ctx_80177AB0 == 4)) {
} else if ((gDrawBackdrop == 3) || (gDrawBackdrop == 4)) {
RCP_SetupDL(&gMasterDisp, 0x3E);
if (D_ctx_80177AB0 == 4) {
if (!(gGameFrameCount & 8)) {
if (gDrawBackdrop == 4) {
if ((gGameFrameCount & 8) == 0) {
Math_SmoothStepToF(&gAndrossUnkBrightness, 0.0f, 1.0f, 30.0f, 0);
} else {
Math_SmoothStepToF(&gAndrossUnkBrightness, 120.0f, 1.0f, 30.0f, 0);
@ -387,7 +387,7 @@ void Background_DrawBackdrop(void) {
} else {
fake_label: // fake
RCP_SetupDL(&gMasterDisp, 0x3E);
if (D_ctx_80177AB0 == 5) {
if (gDrawBackdrop == 5) {
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 64);
} else {
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 255, 128, (s32) gAndrossUnkAlpha);
@ -400,7 +400,7 @@ void Background_DrawBackdrop(void) {
Matrix_SetGfxMtx(&gMasterDisp);
gSPDisplayList(gMasterDisp++, D_ANDROSS_C039208);
Matrix_Pop(&gGfxMatrix);
if (D_ctx_80177AB0 != 5) {
if (gDrawBackdrop != 5) {
Matrix_Push(&gGfxMatrix);
Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 1.0f, MTXF_APPLY);
Matrix_RotateZ(gGfxMatrix, (gPlayer[0].camRoll + (gGameFrameCount * -1.3f)) * M_DTOR,
@ -821,7 +821,7 @@ void Background_DrawGround(void) {
u16* sp1C4;
Gfx* sp1C0;
if ((gCurrentLevel != LEVEL_VENOM_2) && ((gPlayer[0].cam.eye.y > 4000.0f) || (D_ctx_80177A98 == 0))) {
if ((gCurrentLevel != LEVEL_VENOM_2) && ((gPlayer[0].cam.eye.y > 4000.0f) || !gDrawGround)) {
return;
}
if ((gCurrentLevel == LEVEL_BOLSE) && gBolseDynamicGround) {
@ -886,7 +886,7 @@ void Background_DrawGround(void) {
Matrix_SetGfxMtx(&gMasterDisp);
switch (gCurrentLevel) {
case LEVEL_CORNERIA:
if (D_ctx_8017812C != 0) {
if (gGroundClipMode != 0) {
RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
} else {
RCP_SetupDL_20(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
@ -1066,7 +1066,7 @@ void Background_DrawGround(void) {
case LEVEL_KATINA:
case LEVEL_BOLSE:
case LEVEL_VENOM_2:
if ((D_ctx_8017812C != 0) || (gCurrentLevel == LEVEL_BOLSE)) {
if ((gGroundClipMode != 0) || (gCurrentLevel == LEVEL_BOLSE)) {
RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
} else {
RCP_SetupDL_20(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
@ -1088,7 +1088,7 @@ void Background_DrawGround(void) {
}
break;
case LEVEL_VERSUS:
if (D_ctx_8017812C != 0) {
if (gGroundClipMode != 0) {
RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
} else {
RCP_SetupDL_20(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);

View File

@ -88,12 +88,12 @@ void Boss_SpawnDebris(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5
for (i = (ARRAY_COUNT(gActors)) - 1; i >= 0; i--) {
if (gActors[i].obj.status == OBJ_FREE) {
Boss_SetupDebris(&gActors[i], arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, argA, argB);
return;
break;
}
}
}
void func_boss_80043188(Boss* boss) {
void Boss_SetCullDistance(Boss* boss) {
boss->info.cullDistance = 30000.0f;
}
@ -102,9 +102,9 @@ void Boss_CompleteLevel(Player* player, f32 xPos, f32 yPos, f32 zPos) {
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 80);
gCsFrameCount = 0;
D_ctx_80178448 = zPos + gPathProgress;
D_ctx_80178440 = xPos;
D_ctx_80178444 = yPos;
gBossDeathCamAtZ = zPos + gPathProgress;
gBossDeathCamAtX = xPos;
gBossDeathCamAtY = yPos;
player->state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE;
player->csState = 10;

View File

@ -9,11 +9,11 @@ s32 gSceneSetup;
s32 D_ctx_80177824; // some sort of flag
s32 D_ctx_8017782C; // some sort of flag. all range related?
GameState gGameState;
s32 gNextGameStateTimer; // next game state timer?
s32 gVsItemSpawnTimer; // timer for vs item spawn
s32 gNextGameStateTimer;
s32 gVsItemSpawnTimer;
OptionState gOptionMenuStatus;
s32 gPlayState; // pause-related state
s32 D_ctx_80177868; // some sort of state. pause-related?
s32 gPlayState;
s32 D_ctx_80177868; // some sort of state. pause-related? Also used by game over
LevelMode gLevelMode;
DrawMode gDrawMode;
s32 gPlayerNum;
@ -22,9 +22,9 @@ s32 gTeamShields[6];
s32 gSavedTeamShields[6];
s32 gPrevPlanetSavedTeamShields[6];
s32 gTeamDamage[6];
u8 gMissionStatus; // next planet path
u8 gMissionStatus;
f32 gGroundHeight;
f32 D_ctx_80177950;
f32 D_ctx_80177950; // Related to camera z-rotations? Only set to -1 in corneria intro, where it does nothing?
f32 gPlayerTurnRate;
f32 gPlayerTurnStickMod;
f32 gCsCamEyeX;
@ -33,14 +33,14 @@ f32 gCsCamEyeZ;
f32 gCsCamAtX;
f32 gCsCamAtY;
f32 gCsCamAtZ;
Vec3f gPlayerCamEye;
Vec3f gPlayerCamAt;
Vec3f gPlayCamEye;
Vec3f gPlayCamAt;
bool gExpertMode;
s32 D_ctx_80177A10[10];
f32 D_ctx_80177A48[10];
s32 D_ctx_80177A10[10]; // work buffer
f32 D_ctx_80177A48[10]; // work buffer
s32 gCsFrameCount;
u8 D_ctx_80177A98; // some sort of flag. Used in background
u8 D_ctx_80177AB0;
u8 gDrawGround; // some sort of flag. Used in background
u8 gDrawBackdrop;
u8 gAqDrawMode;
s32 gTitleState;
s32 gMainController;
@ -56,7 +56,7 @@ s32 gPlanetPathStatus[24];
s32 gPlanetPathStatus[22]; // overruns gPrevPlanetTeamShields?
#endif
s32 gPrevPlanetTeamShields[6];
s32 D_ctx_80177C58[6];
s32 D_ctx_80177C58[6]; // another saved team shields. maybe this is prev planet?
u8 gOptionSoundMode;
s32 gVolumeSettings[3];
u16 gBgmSeqId;
@ -83,11 +83,11 @@ s32 gRingPassCount;
Vec3f gFormationInitRot;
Vec3f gFormationInitPos;
UNK_TYPE F_80178020;
s32 D_ctx_8017812C;
s32 gGroundClipMode;
LevelId gCurrentLevel;
s32 gLevelPhase;
s32 gBossActive;
s32 D_ctx_8017828C;
bool gKillEventActors;
s32 gUseDynaFloor;
s32 gRadioState;
s32 gCurrentRadioPortrait;
@ -96,9 +96,9 @@ s32 gRadioMouthTimer;
u8 gLeveLClearStatus[30] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
s32 D_ctx_801782C0;
s32 D_ctx_801782C8;
s32 D_ctx_801782D0;
s32 D_ctx_801782C0; // set to 0, never used
s32 D_ctx_801782C8; // set to 0, never used
s32 D_ctx_801782D0; // set to 0, never used
s32 gRadioMsgCharIndex;
UNK_TYPE F_801782E0;
s32 gRadioMsgId;
@ -150,39 +150,43 @@ UNK_TYPE F_8017840C;
UNK_TYPE P_800D31A0 = 0;
s32 gStarCount;
f32 gStarWarpDistortion;
f32 D_ctx_80178418;
f32 gCOComplete2CamRotY;
UNK_TYPE F_8017841C;
f32 gStarfieldX;
f32 gStarfieldY;
f32 gStarfieldRoll;
f32 D_ctx_8017842C;
f32 D_ctx_80178430;
f32 gStarfieldScrollX; // starfield yaw?
f32 gStarfieldScrollY; // starfield roll?
UNK_TYPE F_80178434;
UNK_TYPE F_80178438;
UNK_TYPE F_8017843C;
f32 D_ctx_80178440;
f32 D_ctx_80178444;
f32 D_ctx_80178448;
f32 D_ctx_80178450[3]; // x positions of certain actors (teammates?)
f32 D_ctx_80178460[3]; // y positions of certain actors (teammates?)
f32 D_ctx_80178470[3]; // z positions of certain actors (teammates?)
f32 gBossDeathCamAtX; //
f32 gBossDeathCamAtY;
f32 gBossDeathCamAtZ;
f32 gCsTeamTargetsX[3]; // x positions of certain actors (teammates?)
f32 gCsTeamTargetsY[3]; // y positions of certain actors (teammates?)
f32 gCsTeamTargetsZ[3]; // z positions of certain actors (teammates?)
f32 gCameraShakeY;
s32 gCameraShake;
s32 D_ctx_80178484; // set to 10000 but not used
s32 D_ctx_80178484; // set to 100000 when pausing but not used
bool gLoadLevelObjects;
UNK_TYPE F_8017848C;
UNK_TYPE F_80178490;
s32 D_ctx_80178494;
f32 D_ctx_80178498;
f32 D_ctx_8017849C;
f32 D_ctx_801784A0;
s32 D_ctx_801784A4;
#ifdef AVOID_UB
s32 D_ctx_80178494 = 0;
#else
s32 D_ctx_80178494; // Torpedoes have this set to their unk_5C. Were they shot2s at some point?
#endif
f32 gShotHitPosZ;
f32 gShotHitPosX;
f32 gShotHitPosY;
s32 gZOSnakeWaypointCount;
UNK_TYPE F_801784A8;
GroundType gGroundType;
UNK_TYPE F_801784B0;
UNK_TYPE F_801784B4;
// light source 1
// light source 1. Used for most things
f32 gLight1xRot; // effective Vec3f
f32 gLight1yRot;
f32 gLight1zRot;
@ -197,7 +201,7 @@ s32 gLight1y;
s32 gLight1z;
f32 gLight1rotStep;
// light source 2
// light source 2. used for Players
f32 gLight2xRot; // effective Vec3f
f32 gLight2yRot;
f32 gLight2zRot;
@ -209,7 +213,7 @@ s32 gLight2y;
s32 gLight2z;
f32 gLight2rotStep;
// this section looks like a third light source
// this section looks like a third light source. May have been for scenery shadows
UNK_TYPE F_801784514;
UNK_TYPE F_801784518;
UNK_TYPE F_80178451C;
@ -221,16 +225,19 @@ UNK_TYPE F_801784530;
UNK_TYPE F_801784534;
f32 D_ctx_80178538;
f32 D_ctx_8017853C; // hitbox size modifier. always 0.0f. seems out of place
f32 D_ctx_8017853C; // hitbox size modifier for player collisions. always 0.0f. seems out of place
s32 gLight2colorStep; // light 2 color step
s32 D_ctx_80178544; // light 3 color step?
s32 gLight1R; // Color32 light color 1
s32 gLight1R; // Color32 light color 1
s32 gLight1G;
s32 gLight1B;
s32 gAmbientR; // Color32 ambient color
s32 gAmbientG;
s32 gAmbientB;
UNK_TYPE F_80178560;
s32 gLight2R; // Color32 light color 2
s32 gLight2G;
s32 gLight2B;
@ -238,16 +245,17 @@ s32 gLight2RTarget; // Color32 light color 2 modifier?
s32 gLight2GTarget;
s32 gLight2BTarget;
s32 D_ctx_80161A70; // Color32 set but not used, start of bss
s32 D_ctx_80161A70; // unused Color32, perhaps for third light? start of bss
s32 D_ctx_80161A74;
s32 D_ctx_80161A78;
s32 D_ctx_80161A7C; // Color32? set but not used
s32 D_ctx_80161A7C; // unused Color32, perhaps targets for third light?
s32 D_ctx_80161A80;
s32 D_ctx_80161A84;
GroundSurface gGroundSurface;
GroundSurface gSavedGroundSurface;
u8 gGoldRingCount[4];
u8 D_ctx_80161A94[4];
u8 gSavedGoldRingCount[4];
s32 gHitCount;
s32 gSavedHitCount;
s16 gLifeCount[4];
@ -282,7 +290,7 @@ s32 gLevelStartStatusScreenTimer;
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]; // set to 3 but never used
s32 D_ctx_80177858[4]; // set to 3 but never used. related to VS mode customization?
PlayerForm gPlayerForms[4];
s32 gHandicap[4];
VsStage gVersusStage;
@ -321,7 +329,7 @@ u8 gGreatFoxIntact;
u8 gTiStartLandmaster;
u16 gControllerRumbleTimers[4];
u16 gPlayerScores[4];
s32 D_ctx_80177C50;
s32 gCircleWipeFrame;
s32 D_ctx_80177C70; // sets camera field of view Y. initialized to 0 and never changed
s32 gTraining360MsgTimer;
s32 gTraining360MsgIndex;
@ -341,10 +349,10 @@ s32 gLeftWingFlashTimer[4];
s32 gRightWingDebrisTimer[4];
s32 gLeftWingDebrisTimer[4];
s32 gBombCount[4];
s32 D_ctx_80177DB8[4];
s32 D_ctx_80177DD0[4][10];
s32 D_ctx_80177E74;
s32 D_ctx_80177E7C;
s32 gVsPoints[4];
s32 gVsKills[4][10];
s32 gVsMatchOver;
s32 gVsMatchStart;
bool gChangeTo360;
Vec3f gTeamArrowsViewPos[10];
f32 D_ctx_80177F20[65]; // Seem to be an early implementation of RadarMark
@ -358,16 +366,16 @@ u32* gStarFillColors;
UNK_TYPE F_801782A0;
Scenery360* gScenery360;
UNK_TYPE F_801782B0;
s32 D_ctx_801782B8;
s32 D_ctx_801782BC;
PosRot* D_ctx_801782C4;
f32* D_ctx_801782CC;
s32 gDrawSmallRocks;
s32 D_ctx_801782BC; // set to 0, never used
PosRot* gZOSnakePosRots;
f32* D_ctx_801782CC; // arrays used for dynamic floor
f32* D_ctx_801782D4;
f32* D_ctx_801782DC;
f32* D_ctx_801782E4;
f32* D_ctx_801782EC;
UNK_TYPE F_801782F4;
s32 D_ctx_801782FC;
s32 gDynaFloorTimer; // timer related to dynamic floor
UNK_TYPE F_80178304;
UNK_TYPE F_8017830C;
UNK_TYPE F_80178314;

View File

@ -169,14 +169,14 @@ void func_demo_80048CC4(Actor* actor, s32 arg1) {
actor->obj.pos.x = D_demo_800C9F60[arg1].x + gPlayer[0].pos.x;
actor->obj.pos.y = D_demo_800C9F60[arg1].y + gPlayer[0].pos.y;
actor->obj.pos.z = D_demo_800C9F60[arg1].z + gPlayer[0].trueZpos;
actor->unk_0F4.y = 0.0f;
actor->unk_0F4.z = D_demo_800C9F90[arg1];
actor->rot_0F4.y = 0.0f;
actor->rot_0F4.z = D_demo_800C9F90[arg1];
Object_SetInfo(&actor->info, actor->obj.id);
if (arg1 == 3) {
AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0);
AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, actor->sfxSource, 0);
actor->unk_0B6 = 1;
actor->animFrame = 1;
} else {
actor->iwork[11] = 1;
AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4);
@ -350,9 +350,9 @@ void func_demo_80049630(ActorCutscene* this) {
Math_SmoothStepToF(&this->obj.pos.x, this->vwork[0].x, 0.05f, 50.0f, 0.0001f);
Math_SmoothStepToF(&this->obj.pos.y, this->vwork[0].y, 0.05f, 50.0f, 0.0001f);
Math_SmoothStepToF(&this->obj.pos.z, this->vwork[0].z, 0.05f, 50.0f, 0.0001f);
Math_SmoothStepToF(&this->unk_0F4.x, gPlayer[0].rot.x, 0.1f, 2.0f, 0.0001f);
Math_SmoothStepToF(&this->unk_0F4.y, gPlayer[0].rot.y, 0.1f, 2.0f, 0.0001f);
Math_SmoothStepToF(&this->unk_0F4.z, 0.0f, 0.05f, 0.2f, 0.0001f);
Math_SmoothStepToF(&this->rot_0F4.x, gPlayer[0].rot.x, 0.1f, 2.0f, 0.0001f);
Math_SmoothStepToF(&this->rot_0F4.y, gPlayer[0].rot.y, 0.1f, 2.0f, 0.0001f);
Math_SmoothStepToF(&this->rot_0F4.z, 0.0f, 0.05f, 0.2f, 0.0001f);
break;
case 1:
@ -369,8 +369,8 @@ void func_demo_80049630(ActorCutscene* this) {
}
break;
}
Matrix_RotateY(gCalcMatrix, (this->unk_0F4.y + 180.0f) * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, -(this->unk_0F4.x * M_DTOR), MTXF_APPLY);
Matrix_RotateY(gCalcMatrix, (this->rot_0F4.y + 180.0f) * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, -(this->rot_0F4.x * M_DTOR), MTXF_APPLY);
sp3C.x = 0.0f;
sp3C.y = 0.0f;
@ -382,9 +382,9 @@ void func_demo_80049630(ActorCutscene* this) {
this->vel.y = sp30.y;
this->vel.z = sp30.z;
this->obj.rot.x = -this->unk_0F4.x;
this->obj.rot.y = this->unk_0F4.y + 180.0f;
this->obj.rot.z = -this->unk_0F4.z;
this->obj.rot.x = -this->rot_0F4.x;
this->obj.rot.y = this->rot_0F4.y + 180.0f;
this->obj.rot.z = -this->rot_0F4.z;
}
void func_demo_8004990C(Player* player) {
@ -404,7 +404,7 @@ void func_demo_80049968(Actor* actor, s32 arg1) {
actor->obj.pos.z = D_demo_800C9FF0[arg1] + gPlayer[0].trueZpos;
actor->fwork[0] = D_demo_800CA000[arg1];
actor->fwork[1] = D_demo_800CA010[arg1];
actor->unk_0B6 = D_demo_800CA030[arg1];
actor->animFrame = D_demo_800CA030[arg1];
actor->state = D_demo_800CA040[arg1];
actor->obj.rot.z = D_demo_800CA020[arg1];
actor->obj.rot.y = 180.0f;
@ -451,7 +451,7 @@ void Cutscene_EnterWarpZone(Player* player) {
player->pos.x += player->vel.x;
player->flags_228 = 0;
player->cockpitView = false;
player->alternateView = false;
player->pos.y += player->vel.y;
player->pos.z += player->vel.z;
@ -587,7 +587,7 @@ void Cutscene_EnterWarpZone(Player* player) {
player->unk_234 = 1;
gLevelPhase = 1;
D_display_800CA230 = 0.15f;
gCamDistortion = 0.15f;
AUDIO_PLAY_SFX(NA_SE_WARP_OUT, gDefaultSfxSource, 0);
Play_InitLevel();
}
@ -626,7 +626,7 @@ void Cutscene_EnterWarpZone(Player* player) {
player->state_1C8 = PLAYERSTATE_1C8_ACTIVE;
player->unk_014 = 0.0f;
player->unk_018 = 0.0f;
D_ctx_801782B8 = 0;
gDrawSmallRocks = 0;
gLoadLevelObjects = 1;
}
Math_SmoothStepToF(&player->cam.eye.y, (player->pos.y * player->unk_148) + 50.0f, 0.2f, 15.0f, 0.01f);
@ -639,7 +639,7 @@ void Cutscene_EnterWarpZone(Player* player) {
}
void Cutscene_LevelStart(Player* player) {
gCsFrameCount += 1;
gCsFrameCount++;
if (gLevelMode == LEVELMODE_ON_RAILS) {
switch (gCurrentLevel) {
case LEVEL_CORNERIA:
@ -807,7 +807,7 @@ void Cutscene_AllRangeMode(Player* player) {
s32 pad1;
s32 pad2;
gCsFrameCount += 1;
gCsFrameCount++;
Math_SmoothStepToAngle(&player->aerobaticPitch, 0.0f, 0.1f, 20.0f, 0.0f);
if (gCsFrameCount == 37) {
gChangeTo360 = true;
@ -892,7 +892,7 @@ void Cutscene_AllRangeMode(Player* player) {
actor->obj.pos.x = D_demo_800CA080[i] + player->pos.x;
actor->obj.pos.y = D_demo_800CA08C[i] + player->pos.y;
actor->obj.pos.z = player->trueZpos - 1000.0f;
actor->unk_0F4.y = 180.0f;
actor->rot_0F4.y = 180.0f;
Object_SetInfo(&actor->info, actor->obj.id);
}
}
@ -979,12 +979,12 @@ void Cutscene_CoComplete2(Player* player) {
case 11:
D_ctx_80177A48[0] = 0.0f;
Math_SmoothStepToAngle(&player->aerobaticPitch, 0.0f, 1.0f, 5.0f, 0.0f);
player->cam.at.x += (D_ctx_80178440 - player->cam.at.x) * 0.01f;
player->cam.at.y += (D_ctx_80178444 - player->cam.at.y) * 0.01f;
player->cam.at.z += (D_ctx_80178448 - player->cam.at.z) * 0.01f;
player->cam.at.x += (gBossDeathCamAtX - player->cam.at.x) * 0.01f;
player->cam.at.y += (gBossDeathCamAtY - player->cam.at.y) * 0.01f;
player->cam.at.z += (gBossDeathCamAtZ - player->cam.at.z) * 0.01f;
player->cam.eye.x += (player->cam.at.x + (500.0f * player->unk_004) - player->cam.eye.x) * 0.01f;
player->cam.eye.y += (player->cam.at.y + 500.0f - player->cam.eye.y) * 0.01f;
player->cam.eye.z += (D_ctx_80178448 + (2000.0f * D_ctx_80177950) - player->cam.eye.z) * 0.01f;
player->cam.eye.z += (gBossDeathCamAtZ + (2000.0f * D_ctx_80177950) - player->cam.eye.z) * 0.01f;
if (player->csEventTimer > 25) {
D_ctx_80177A48[2] += 1.5f * player->unk_004;
@ -1106,7 +1106,7 @@ void Cutscene_CoComplete2(Player* player) {
player->csTimer = 200;
player->csEventTimer = 500;
player->csState = 2;
player->unk_000 = (player->unk_004 = (player->unk_008 = (D_ctx_80178418 = 0.0f)));
player->unk_000 = player->unk_004 = player->unk_008 = gCOComplete2CamRotY = 0.0f;
player->baseSpeed = 0.0f;
D_ctx_80177A48[6] = 0.0f;
}
@ -1114,7 +1114,7 @@ void Cutscene_CoComplete2(Player* player) {
case 2:
player->pos.y += 5.0f;
Matrix_RotateY(gCalcMatrix, ((player->rot.y + 180.0f) + D_ctx_80178418) * M_DTOR, MTXF_NEW);
Matrix_RotateY(gCalcMatrix, (player->rot.y + 180.0f + gCOComplete2CamRotY) * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, -(player->rot.x * M_DTOR), MTXF_APPLY);
Matrix_RotateZ(gCalcMatrix, -((player->bankAngle + player->rockAngle) * M_DTOR), MTXF_APPLY);
@ -1134,12 +1134,12 @@ void Cutscene_CoComplete2(Player* player) {
player->unk_000 = 0.3f;
}
gCsCamEyeX += ((player->pos.x + sp6C.x) - gCsCamEyeX) * player->unk_000;
gCsCamEyeY += ((player->pos.y + sp6C.y) - gCsCamEyeY) * player->unk_000;
gCsCamEyeZ += ((player->trueZpos + gPathProgress + sp6C.z) - gCsCamEyeZ) * player->unk_000;
D_ctx_80178430 += 0.2f;
D_ctx_8017842C += 0.2f;
D_ctx_80178418 += player->unk_008;
gCsCamEyeX += (player->pos.x + sp6C.x - gCsCamEyeX) * player->unk_000;
gCsCamEyeY += (player->pos.y + sp6C.y - gCsCamEyeY) * player->unk_000;
gCsCamEyeZ += (player->trueZpos + gPathProgress + sp6C.z - gCsCamEyeZ) * player->unk_000;
gStarfieldScrollY += 0.2f;
gStarfieldScrollX += 0.2f;
gCOComplete2CamRotY += player->unk_008;
Math_SmoothStepToAngle(&player->rot.z, 0.0f, 0.1f, 2.0f, 0.0f);
if (player->csTimer == 0) {
@ -1176,7 +1176,7 @@ void Cutscene_CoComplete2(Player* player) {
Matrix_RotateX(gCalcMatrix, -(player->rot.x * M_DTOR), MTXF_APPLY);
Matrix_RotateZ(gCalcMatrix, -((player->bankAngle + player->rockAngle) * M_DTOR), MTXF_APPLY);
if ((D_ctx_80178418 > 70.0f) && (D_ctx_80178418 < 280.0f)) {
if ((gCOComplete2CamRotY > 70.0f) && (gCOComplete2CamRotY < 280.0f)) {
func_demo_8004AA84();
}
sp78.x = gActors[0].fwork[0] * gActors[0].fwork[3];
@ -1185,9 +1185,9 @@ void Cutscene_CoComplete2(Player* player) {
Matrix_MultVec3f(gCalcMatrix, &sp78, &sp6C);
D_ctx_80178450[0] = player->pos.x + sp6C.x;
D_ctx_80178460[0] = player->pos.y + sp6C.y;
D_ctx_80178470[0] = player->trueZpos + sp6C.z;
gCsTeamTargetsX[0] = player->pos.x + sp6C.x;
gCsTeamTargetsY[0] = player->pos.y + sp6C.y;
gCsTeamTargetsZ[0] = player->trueZpos + sp6C.z;
sp78.x = gActors[1].fwork[0] * gActors[1].fwork[3];
sp78.y = gActors[1].fwork[1] * gActors[1].fwork[3];
@ -1195,9 +1195,9 @@ void Cutscene_CoComplete2(Player* player) {
Matrix_MultVec3f(gCalcMatrix, &sp78, &sp6C);
D_ctx_80178450[1] = player->pos.x + sp6C.x;
D_ctx_80178460[1] = player->pos.y + sp6C.y;
D_ctx_80178470[1] = player->trueZpos + sp6C.z;
gCsTeamTargetsX[1] = player->pos.x + sp6C.x;
gCsTeamTargetsY[1] = player->pos.y + sp6C.y;
gCsTeamTargetsZ[1] = player->trueZpos + sp6C.z;
sp78.x = gActors[2].fwork[0] * gActors[2].fwork[3];
sp78.y = gActors[2].fwork[1] * gActors[2].fwork[3];
@ -1205,9 +1205,9 @@ void Cutscene_CoComplete2(Player* player) {
Matrix_MultVec3f(gCalcMatrix, &sp78, &sp6C);
D_ctx_80178450[2] = player->pos.x + sp6C.x;
D_ctx_80178460[2] = player->pos.y + sp6C.y;
D_ctx_80178470[2] = player->trueZpos + sp6C.z;
gCsTeamTargetsX[2] = player->pos.x + sp6C.x;
gCsTeamTargetsY[2] = player->pos.y + sp6C.y;
gCsTeamTargetsZ[2] = player->trueZpos + sp6C.z;
switch (gCsFrameCount) {
case 330:
@ -1245,8 +1245,8 @@ void Cutscene_CoComplete2(Player* player) {
break;
case 3:
D_ctx_80178430 += 0.2f;
D_ctx_8017842C += 0.2f;
gStarfieldScrollY += 0.2f;
gStarfieldScrollX += 0.2f;
if (player->csTimer == 0) {
player->csState = 4;
player->csTimer = 30;
@ -1257,8 +1257,8 @@ void Cutscene_CoComplete2(Player* player) {
break;
case 4:
D_ctx_80178430 += 0.2f;
D_ctx_8017842C += 0.2f;
gStarfieldScrollY += 0.2f;
gStarfieldScrollX += 0.2f;
player->unk_190 = 2.0f;
player->contrailScale += 0.1f;
if (player->contrailScale > 0.6f) {
@ -1355,7 +1355,7 @@ void Cutscene_LevelComplete(Player* player) {
s32 sp20;
s32 btn;
gCsFrameCount += 1;
gCsFrameCount++;
switch (player->form) {
case FORM_ARWING:
@ -1650,13 +1650,13 @@ void Cutscene_KillPlayer(Player* player) {
}
if (gCurrentLevel != LEVEL_TRAINING) {
gLifeCount[gPlayerNum] -= 1;
gLifeCount[gPlayerNum]--;
}
} else {
if (player->attacker > 0) {
D_ctx_80177DD0[player->attacker - 1][D_ctx_80177DB8[player->attacker - 1]] = player->num;
D_ctx_80177DB8[player->attacker - 1] += 1;
if (gVsPointsToWin == D_ctx_80177DB8[player->attacker - 1]) {
gVsKills[player->attacker - 1][gVsPoints[player->attacker - 1]] = player->num;
gVsPoints[player->attacker - 1]++;
if (gVsPointsToWin == gVsPoints[player->attacker - 1]) {
player->attacker = -1;
if (player->unk_284 == 0) {
func_effect_8007C688(player->pos.x, player->pos.y, player->trueZpos, 3.0f, 1000);
@ -1695,8 +1695,8 @@ void func_demo_8004D828(Player* player) {
player->pos.x += player->vel.x;
player->pos.y += player->vel.y;
if ((gCurrentLevel != LEVEL_VENOM_1 || gBossActive == 0) &&
(gLevelType == LEVELTYPE_PLANET || gCurrentLevel == LEVEL_BOLSE)) {
if (!((gCurrentLevel == LEVEL_VENOM_1) && gBossActive) &&
((gLevelType == LEVELTYPE_PLANET) || (gCurrentLevel == LEVEL_BOLSE))) {
player->vel.y -= 0.5f;
player->rot.x -= 2.0f;
}
@ -1814,7 +1814,7 @@ void func_demo_8004DEF8(Player* player) {
player->pos.x += player->vel.x;
player->pos.y += player->vel.y;
if (((gCurrentLevel != LEVEL_VENOM_ANDROSS) || (gBossActive == 0)) && (gLevelType == LEVELTYPE_PLANET)) {
if (!((gCurrentLevel == LEVEL_VENOM_ANDROSS) && gBossActive) && (gLevelType == LEVELTYPE_PLANET)) {
player->vel.y = player->vel.y - 0.5f;
}
@ -1931,7 +1931,7 @@ void func_demo_8004E4D4(ActorCutscene* this) {
f32 sp34;
this->fwork[7] += 3.0f;
this->unk_0F4.z = SIN_DEG(this->fwork[7]) * 1.5f;
this->rot_0F4.z = SIN_DEG(this->fwork[7]) * 1.5f;
this->fwork[8] += 2.0f;
sp34 = SIN_DEG(this->fwork[8]) * 10.0f;
@ -2027,7 +2027,7 @@ void func_demo_8004E4D4(ActorCutscene* this) {
case 31:
AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, this->sfxSource, 0);
this->state += 1;
this->state++;
this->fwork[29] = 5.0f;
/* fallthrough */
@ -2059,9 +2059,9 @@ void func_demo_8004EBD0(ActorCutscene* this) {
if (this->state < 4) {
this->fwork[9] = 0.4f;
this->obj.pos.x += (D_ctx_80178450[this->index] - this->obj.pos.x) * 0.4f;
this->obj.pos.y += (D_ctx_80178460[this->index] - this->obj.pos.y) * 0.4f;
this->obj.pos.z += (D_ctx_80178470[this->index] - this->obj.pos.z) * 0.4f;
this->obj.pos.x += (gCsTeamTargetsX[this->index] - this->obj.pos.x) * 0.4f;
this->obj.pos.y += (gCsTeamTargetsY[this->index] - this->obj.pos.y) * 0.4f;
this->obj.pos.z += (gCsTeamTargetsZ[this->index] - this->obj.pos.z) * 0.4f;
this->obj.rot.z *= 0.98f;
this->obj.rot.x = -gPlayer[0].rot.x;
@ -2070,14 +2070,14 @@ void func_demo_8004EBD0(ActorCutscene* this) {
if (1) {}
this->fwork[7] += 1.0f;
if ((s32) this->fwork[7] & 0x40) {
if (((s32) this->fwork[7] & 0x40) != 0) {
this->fwork[0] += 0.1f;
} else {
this->fwork[0] -= 0.1f;
}
this->fwork[8] += 1.2f;
if ((s32) this->fwork[8] & 0x40) {
if (((s32) this->fwork[8] & 0x40) != 0) {
this->fwork[1] += 0.1f;
} else {
this->fwork[1] -= 0.1f;
@ -2088,7 +2088,7 @@ void func_demo_8004EBD0(ActorCutscene* this) {
case 0:
this->fwork[3] *= 0.992f;
if (this->fwork[3] < 1.2f) {
this->state += 1;
this->state++;
}
break;
@ -2096,7 +2096,7 @@ void func_demo_8004EBD0(ActorCutscene* this) {
this->fwork[3] *= 0.997f;
if (this->fwork[3] < 1.0f) {
this->fwork[3] = 1.0f;
this->state += 1;
this->state++;
}
this->timer_0BC = 560;
break;
@ -2158,19 +2158,19 @@ void func_demo_8004EBD0(ActorCutscene* this) {
}
void func_demo_8004F05C(Actor* actor) {
if (((gLevelType == LEVELTYPE_PLANET) && (actor->unk_0B6 == 0)) || (gCurrentLevel == LEVEL_BOLSE)) {
if (((gLevelType == LEVELTYPE_PLANET) && (actor->animFrame == 0)) || (gCurrentLevel == LEVEL_BOLSE)) {
actor->fwork[0] += 3.0f;
actor->fwork[1] = SIN_DEG(actor->fwork[0]) * 1.5f;
}
switch (gCurrentLevel) {
case LEVEL_BOLSE:
switch (actor->unk_0B6) {
switch (actor->animFrame) {
case 0:
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) {
actor->unk_0F4.z += actor->unk_0F4.y;
actor->vel.x = SIN_DEG(actor->unk_0F4.z) * 10.0f;
actor->obj.rot.z = SIN_DEG(actor->unk_0F4.z) * 40.0f;
actor->rot_0F4.z += actor->rot_0F4.y;
actor->vel.x = SIN_DEG(actor->rot_0F4.z) * 10.0f;
actor->obj.rot.z = SIN_DEG(actor->rot_0F4.z) * 40.0f;
break;
}
@ -2203,7 +2203,7 @@ void func_demo_8004F05C(Actor* actor) {
break;
case 32:
actor->obj.rot.z += actor->unk_0F4.z;
actor->obj.rot.z += actor->rot_0F4.z;
if (actor->timer_0BC == 0) {
Object_Kill(&actor->obj, actor->sfxSource);
}
@ -2219,7 +2219,7 @@ void func_demo_8004F05C(Actor* actor) {
break;
case LEVEL_SECTOR_Y:
switch (actor->unk_0B6) {
switch (actor->animFrame) {
case 0:
SectorY_8019FF00(actor);
break;
@ -2266,8 +2266,8 @@ void func_demo_8004F05C(Actor* actor) {
break;
case 0:
actor->obj.rot.z = actor->unk_0F4.z;
if (actor->unk_0B6 == 10) {
actor->obj.rot.z = actor->rot_0F4.z;
if (actor->animFrame == 10) {
actor->obj.pos.z = gPlayer[0].cam.eye.z + 12000.0f;
}
break;
@ -2388,14 +2388,13 @@ void ActorCutscene_Update(ActorCutscene* this) {
case LEVEL_METEO:
if (gLevelPhase == 0) {
Meteo_8018ED9C(this);
break;
} else {
func_demo_80049630(this);
}
func_demo_80049630(this);
break;
case LEVEL_FORTUNA:
if (this->unk_0B6 == 11) {
if (this->animFrame == 11) {
switch (this->state) {
case 0:
if (gCsFrameCount == 100) {
@ -2436,19 +2435,17 @@ void ActorCutscene_Update(ActorCutscene* this) {
case LEVEL_CORNERIA:
if (gLevelMode == LEVELMODE_ALL_RANGE) {
func_demo_8004E4D4(this);
break;
} else {
func_demo_8004EBD0(this);
}
func_demo_8004EBD0(this);
break;
case LEVEL_SECTOR_X:
if (gLevelPhase != 0) {
func_demo_80049630(this);
break;
} else {
func_demo_8004E4D4(this);
}
func_demo_8004E4D4(this);
break;
case LEVEL_TITANIA:
@ -2537,7 +2534,7 @@ void ActorCutscene_Draw(Actor* actor) {
f32 y;
f32 x;
switch (actor->unk_0B6) {
switch (actor->animFrame) {
case 1000:
RCP_SetupDL(&gMasterDisp, 0x2D);
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, actor->unk_046);

View File

@ -19,13 +19,13 @@ s32 D_display_800CA220 = 0;
u8 sPlayersVisible[] = { 0, 0, 0, 0 }; //
s32 sDrawCockpit = 0; //
s32 D_display_800CA22C = 0; //
f32 D_display_800CA230 = 0.0f;
f32 gCamDistortion = 0.0f;
Actor* gTeamHelpActor = NULL;
s32 gTeamHelpTimer = 0;
f32 D_display_800CA23C[3] = { 0.5f, 0.25f, 0.25f }; //
f32 D_display_800CA248[3] = { 2.0f, 1.0f, 0.5f }; //
void func_display_80051B30(void) {
void Display_DrawHelpAlert(void) {
s32 sp7C;
f32 sp78;
f32 sp74;
@ -47,7 +47,7 @@ void func_display_80051B30(void) {
return;
}
}
if (!(gTeamHelpTimer & 4)) {
if ((gTeamHelpTimer & 4) == 0) {
Matrix_RotateY(gCalcMatrix, gPlayer[0].camYaw, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, gPlayer[0].camPitch, MTXF_APPLY);
sp68.x = gTeamHelpActor->obj.pos.x - gPlayer[0].cam.eye.x;
@ -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->cockpitView && (gLevelMode == LEVELMODE_ON_RAILS) &&
if (player->alternateView && (gLevelMode == LEVELMODE_ON_RAILS) &&
(fabsf(player->trueZpos + gPathProgress - player->cam.eye.z) < 10.0f)) {
if (arg1 == 0) {
sDrawCockpit = 1;
@ -876,7 +876,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->cockpitView && (gLevelMode == LEVELMODE_ON_RAILS)) {
if (player->alternateView && (gLevelMode == LEVELMODE_ON_RAILS)) {
Matrix_MultVec3f(gCalcMatrix, &spB8, &sp94);
} else {
Matrix_MultVec3f(gCalcMatrix, &spC4, &sp94);
@ -886,7 +886,7 @@ void func_display_80054E80(Player* player) {
Matrix_Translate(gGfxMatrix, sp94.x, sp94.y, sp94.z, MTXF_NEW);
Matrix_Scale(gGfxMatrix, sp80, sp80, 1.0f, MTXF_APPLY);
Matrix_Push(&gGfxMatrix);
if (player->cockpitView && (gLevelMode == LEVELMODE_ON_RAILS)) {
if (player->alternateView && (gLevelMode == LEVELMODE_ON_RAILS)) {
Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 3.0f, MTXF_APPLY);
} else {
Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 10.0f, MTXF_APPLY);
@ -918,7 +918,7 @@ void func_display_80054E80(Player* player) {
Matrix_SetGfxMtx(&gMasterDisp);
gSPDisplayList(gMasterDisp++, D_101C2E0);
Matrix_Pop(&gGfxMatrix);
if (player->cockpitView && (gLevelMode == LEVELMODE_ON_RAILS)) {
if (player->alternateView && (gLevelMode == LEVELMODE_ON_RAILS)) {
Matrix_Scale(gGfxMatrix, 0.3f, 0.3f, 0.3f, MTXF_APPLY);
}
Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 1.0f, MTXF_APPLY);
@ -943,7 +943,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->cockpitView && (gLevelMode == LEVELMODE_ON_RAILS)) {
if (player->alternateView && (gLevelMode == LEVELMODE_ON_RAILS)) {
Matrix_MultVec3f(gCalcMatrix, &spB8, &sp94);
} else {
Matrix_MultVec3f(gCalcMatrix, &spC4, &sp94);
@ -1382,7 +1382,7 @@ void func_display_80057248(void) {
s32 i;
f32 var_fs0;
if (!(gGameFrameCount & 4)) {
if ((gGameFrameCount & 4) == 0) {
RCP_SetupDL_40();
for (i = 0; i < ARRAY_COUNT(gTeamArrowsViewPos); i++) {
if (gTeamArrowsViewPos[i].z < 0.0f) {
@ -1487,12 +1487,12 @@ void func_display_800578C4(Player* player) {
case 0:
Math_SmoothStepToAngle(&player->wings.unk_30, 0.0f, 0.2f, 3.0f, 0.0f);
Math_SmoothStepToAngle(&player->wings.unk_34, 0.0f, 0.2f, 3.0f, 0.0f);
gPlayerCamEye.x = player->cam.eye.x;
gPlayerCamEye.y = player->cam.eye.y;
gPlayerCamEye.z = player->cam.eye.z;
gPlayerCamAt.x = player->cam.at.x;
gPlayerCamAt.y = player->cam.at.y;
gPlayerCamAt.z = player->cam.at.z;
gPlayCamEye.x = player->cam.eye.x;
gPlayCamEye.y = player->cam.eye.y;
gPlayCamEye.z = player->cam.eye.z;
gPlayCamAt.x = player->cam.at.x;
gPlayCamAt.y = player->cam.at.y;
gPlayCamAt.z = player->cam.at.z;
break;
case 1:
case 2:
@ -1521,12 +1521,12 @@ void func_display_800578C4(Player* player) {
Matrix_RotateX(gCalcMatrix, (player->rot.y + D_display_800CA380) * M_DTOR, MTXF_NEW);
Matrix_RotateY(gCalcMatrix, (player->rot.x + D_display_800CA384) * M_DTOR, MTXF_APPLY);
Matrix_MultVec3f(gCalcMatrix, &sp4C, &sp40);
gPlayerCamEye.x = player->pos.x + sp40.x;
gPlayerCamEye.y = player->pos.y + sp40.y + 20.0f;
gPlayerCamEye.z = player->trueZpos + sp40.z;
gPlayerCamAt.x = (SIN_DEG(gGameFrameCount * 3.0f) * 3.0f) + player->pos.x;
gPlayerCamAt.y = (COS_DEG(gGameFrameCount * 4.0f) * 3.0f) + player->pos.y;
gPlayerCamAt.z = (SIN_DEG(gGameFrameCount * 3.5f) * 3.0f) + player->trueZpos;
gPlayCamEye.x = player->pos.x + sp40.x;
gPlayCamEye.y = player->pos.y + sp40.y + 20.0f;
gPlayCamEye.z = player->trueZpos + sp40.z;
gPlayCamAt.x = (SIN_DEG(gGameFrameCount * 3.0f) * 3.0f) + player->pos.x;
gPlayCamAt.y = (COS_DEG(gGameFrameCount * 4.0f) * 3.0f) + player->pos.y;
gPlayCamAt.z = (SIN_DEG(gGameFrameCount * 3.5f) * 3.0f) + player->trueZpos;
break;
}
}
@ -1535,10 +1535,10 @@ void Play_Draw(void) {
s32 i;
Vec3f tempVec;
Vec3f playerCamUp;
Vec3f opponentPos;
Vec3f playerPos;
s32 pad;
Player* opponent;
Player* player = &gPlayer[gPlayerNum];
Player* player;
Player* camPlayer = &gPlayer[gPlayerNum];
sDrawCockpit = 0;
@ -1547,72 +1547,77 @@ void Play_Draw(void) {
}
Matrix_Push(&gGfxMatrix);
if ((gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) {
Math_SmoothStepToF(&D_display_800CA230, 0.01f, 0.2f, 0.002f, 0.0f);
Math_SmoothStepToF(&gCamDistortion, 0.01f, 0.2f, 0.002f, 0.0f);
} else {
Math_SmoothStepToF(&D_display_800CA230, 0.0f, 0.2f, 0.002f, 0.0f);
Math_SmoothStepToF(&gCamDistortion, 0.0f, 0.2f, 0.002f, 0.0f);
}
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 10.0f * M_DTOR, MTXF_APPLY);
Matrix_Scale(gGfxMatrix, 1.0f + D_display_800CA230, 1.0f - D_display_800CA230, 1.0f, MTXF_APPLY);
Matrix_Scale(gGfxMatrix, 1.0f + gCamDistortion, 1.0f - gCamDistortion, 1.0f, MTXF_APPLY);
Matrix_RotateZ(gGfxMatrix, -(f32) gGameFrameCount * 10.0f * M_DTOR, MTXF_APPLY);
Matrix_Scale(gGfxMatrix, 1.0f + D_display_800CA230, 1.0f - D_display_800CA230, 1.0f, MTXF_APPLY);
Matrix_Scale(gGfxMatrix, 1.0f + gCamDistortion, 1.0f - gCamDistortion, 1.0f, MTXF_APPLY);
Matrix_Push(&gGfxMatrix);
Camera_SetupLights(player);
Camera_SetupLights(camPlayer);
Lights_SetOneLight(&gMasterDisp, gLight1x, gLight1y, gLight1z, gLight1R, gLight1G, gLight1B, gAmbientR, gAmbientG,
gAmbientB);
if (gLevelMode == LEVELMODE_ON_RAILS) {
Matrix_RotateY(gCalcMatrix, player->yRot_114 * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, player->xRot_120 * M_DTOR, MTXF_APPLY);
Matrix_RotateY(gCalcMatrix, camPlayer->yRot_114 * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, camPlayer->xRot_120 * M_DTOR, MTXF_APPLY);
tempVec.x = player->cam.eye.x - player->pos.x;
tempVec.y = player->cam.eye.y - player->pos.y;
tempVec.z = player->cam.eye.z - (player->trueZpos + player->zPath);
Matrix_MultVec3f(gCalcMatrix, &tempVec, &gPlayerCamEye);
gPlayerCamEye.x += player->pos.x;
gPlayerCamEye.y += player->pos.y;
gPlayerCamEye.z += player->trueZpos + player->zPath;
tempVec.x = camPlayer->cam.eye.x - camPlayer->pos.x;
tempVec.y = camPlayer->cam.eye.y - camPlayer->pos.y;
tempVec.z = camPlayer->cam.eye.z - (camPlayer->trueZpos + camPlayer->zPath);
Matrix_MultVec3f(gCalcMatrix, &tempVec, &gPlayCamEye);
gPlayCamEye.x += camPlayer->pos.x;
gPlayCamEye.y += camPlayer->pos.y;
gPlayCamEye.z += camPlayer->trueZpos + camPlayer->zPath;
tempVec.x = player->cam.at.x - player->pos.x;
tempVec.y = player->cam.at.y - player->pos.y;
tempVec.z = player->cam.at.z - (player->trueZpos + player->zPath);
Matrix_MultVec3f(gCalcMatrix, &tempVec, &gPlayerCamAt);
gPlayerCamAt.x += player->pos.x;
gPlayerCamAt.y += player->pos.y;
gPlayerCamAt.z += player->trueZpos + player->zPath;
tempVec.x = camPlayer->cam.at.x - camPlayer->pos.x;
tempVec.y = camPlayer->cam.at.y - camPlayer->pos.y;
tempVec.z = camPlayer->cam.at.z - (camPlayer->trueZpos + camPlayer->zPath);
Matrix_MultVec3f(gCalcMatrix, &tempVec, &gPlayCamAt);
gPlayCamAt.x += camPlayer->pos.x;
gPlayCamAt.y += camPlayer->pos.y;
gPlayCamAt.z += camPlayer->trueZpos + camPlayer->zPath;
if (player->cockpitView && (player->boostSpeed > 5.0f)) {
gPlayerCamAt.x += SIN_DEG(gGameFrameCount * 150.0f) * player->boostSpeed * 0.2f;
if (camPlayer->alternateView && (camPlayer->boostSpeed > 5.0f)) {
gPlayCamAt.x += SIN_DEG(gGameFrameCount * 150.0f) * camPlayer->boostSpeed * 0.2f;
}
} else if (player->state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) {
func_display_800578C4(player);
} else if (camPlayer->state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) {
func_display_800578C4(camPlayer);
} else {
gPlayerCamEye.x = player->cam.eye.x;
gPlayerCamEye.y = player->cam.eye.y;
gPlayerCamEye.z = player->cam.eye.z;
gPlayerCamAt.x = player->cam.at.x;
gPlayerCamAt.y = player->cam.at.y;
gPlayerCamAt.z = player->cam.at.z;
gPlayCamEye.x = camPlayer->cam.eye.x;
gPlayCamEye.y = camPlayer->cam.eye.y;
gPlayCamEye.z = camPlayer->cam.eye.z;
gPlayCamAt.x = camPlayer->cam.at.x;
gPlayCamAt.y = camPlayer->cam.at.y;
gPlayCamAt.z = camPlayer->cam.at.z;
}
player->camYaw = -Math_Atan2F(gPlayerCamEye.x - gPlayerCamAt.x, gPlayerCamEye.z - gPlayerCamAt.z);
player->camPitch = -Math_Atan2F(gPlayerCamEye.y - gPlayerCamAt.y,
sqrtf(SQ(gPlayerCamEye.z - gPlayerCamAt.z) + SQ(gPlayerCamEye.x - gPlayerCamAt.x)));
Matrix_RotateY(gCalcMatrix, -player->camYaw, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, player->camPitch, MTXF_APPLY);
Matrix_RotateZ(gCalcMatrix, -player->camRoll * M_DTOR, MTXF_APPLY);
camPlayer->camYaw = -Math_Atan2F(gPlayCamEye.x - gPlayCamAt.x, gPlayCamEye.z - gPlayCamAt.z);
camPlayer->camPitch = -Math_Atan2F(gPlayCamEye.y - gPlayCamAt.y,
sqrtf(SQ(gPlayCamEye.z - gPlayCamAt.z) + SQ(gPlayCamEye.x - gPlayCamAt.x)));
Matrix_RotateY(gCalcMatrix, -camPlayer->camYaw, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, camPlayer->camPitch, MTXF_APPLY);
Matrix_RotateZ(gCalcMatrix, -camPlayer->camRoll * M_DTOR, MTXF_APPLY);
tempVec.x = 0.0f;
tempVec.y = 100.0f;
tempVec.z = 0.0f;
Matrix_MultVec3f(gCalcMatrix, &tempVec, &playerCamUp);
if (gStarCount != 0) {
gStarfieldRoll = DEG_TO_RAD(gPlayer[0].camRoll);
Camera_SetStarfieldPos(gPlayerCamEye.x, gPlayerCamEye.y, gPlayerCamEye.z, gPlayerCamAt.x, gPlayerCamAt.y,
gPlayerCamAt.z);
Camera_SetStarfieldPos(gPlayCamEye.x, gPlayCamEye.y, gPlayCamEye.z, gPlayCamAt.x, gPlayCamAt.y, gPlayCamAt.z);
Background_DrawStarfield();
}
Background_DrawBackdrop();
Background_DrawSun();
Matrix_Push(&gGfxMatrix);
Matrix_LookAt(gGfxMatrix, gPlayerCamEye.x, gPlayerCamEye.y, gPlayerCamEye.z, gPlayerCamAt.x, gPlayerCamAt.y,
gPlayerCamAt.z, playerCamUp.x, playerCamUp.y, playerCamUp.z, MTXF_APPLY);
// if(gControllerHold[gMainController]. button & L_TRIG) {
// Matrix_LookAt(gGfxMatrix, gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ,
// playerCamUp.x, playerCamUp.y, playerCamUp.z, MTXF_APPLY);
// } else {
Matrix_LookAt(gGfxMatrix, gPlayCamEye.x, gPlayCamEye.y, gPlayCamEye.z, gPlayCamAt.x, gPlayCamAt.y, gPlayCamAt.z,
playerCamUp.x, playerCamUp.y, playerCamUp.z, MTXF_APPLY);
// }
if ((gLevelType == LEVELTYPE_PLANET) || (gCurrentLevel == LEVEL_BOLSE)) {
if ((gCurrentLevel == LEVEL_TITANIA) &&
((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO) || (gPlayer[0].unk_19C != 0))) {
@ -1629,24 +1634,24 @@ void Play_Draw(void) {
}
Lights_SetOneLight(&gMasterDisp, gLight2x, gLight2y, gLight2z, gLight2R, gLight2G, gLight2B, gAmbientR, gAmbientG,
gAmbientB);
for (i = 0, opponent = gPlayer; i < gCamCount; i++, opponent++) {
opponentPos.x = opponent->pos.x;
opponentPos.y = opponent->pos.y;
opponentPos.z = opponent->trueZpos;
Display_SetSecondLight(&opponentPos);
func_display_800564C0(opponent, 0);
func_display_80057814(opponent);
for (i = 0, player = gPlayer; i < gCamCount; i++, player++) {
playerPos.x = player->pos.x;
playerPos.y = player->pos.y;
playerPos.z = player->trueZpos;
Display_SetSecondLight(&playerPos);
func_display_800564C0(player, 0);
func_display_80057814(player);
}
if ((gGroundSurface == SURFACE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) {
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, MTXF_APPLY);
for (i = 0, opponent = gPlayer; i < gCamCount; i++, opponent++) {
opponentPos.x = opponent->pos.x;
opponentPos.y = opponent->pos.y;
opponentPos.z = opponent->trueZpos;
func_display_800564C0(opponent, 1);
for (i = 0, player = gPlayer; i < gCamCount; i++, player++) {
playerPos.x = player->pos.x;
playerPos.y = player->pos.y;
playerPos.z = player->trueZpos;
func_display_800564C0(player, 1);
}
Matrix_Pop(&gGfxMatrix);
}
@ -1667,10 +1672,10 @@ void Play_Draw(void) {
if ((gGroundSurface == SURFACE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) {
Matrix_Push(&gGfxMatrix);
Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, MTXF_APPLY);
for (i = 0, opponent = gPlayer; i < gCamCount; i++, opponent++) {
for (i = 0, player = gPlayer; i < gCamCount; i++, player++) {
if (sPlayersVisible[i] != 0) {
func_display_80055B58(opponent);
func_display_80056230(opponent);
func_display_80055B58(player);
func_display_80056230(player);
}
Matrix_Pop(&gGfxMatrix);
}
@ -1690,11 +1695,11 @@ void Play_Draw(void) {
Effect_Draw(0);
}
gReflectY = 1;
for (i = 0, opponent = gPlayer; i < gCamCount; i++, opponent++) {
for (i = 0, player = gPlayer; i < gCamCount; i++, player++) {
if (sPlayersVisible[i] != 0) {
func_display_80056E2C(opponent);
func_display_80055B58(opponent);
func_display_80056230(opponent);
func_display_80056E2C(player);
func_display_80055B58(player);
func_display_80056230(player);
}
}
if ((gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) {
@ -1712,15 +1717,15 @@ void Play_Draw(void) {
if (sDrawCockpit != 0) {
func_display_80053B18();
}
for (i = 0, opponent = gPlayer; i < gCamCount; i++, opponent++) {
for (i = 0, player = gPlayer; i < gCamCount; i++, player++) {
if (sPlayersVisible[i] != 0) {
if (gShowCrosshairs[i]) {
func_display_80053F7C(opponent);
func_display_80053F7C(player);
}
if (opponent->form == FORM_LANDMASTER) {
func_display_80052B80(opponent);
} else if (opponent->form == FORM_ON_FOOT) {
func_display_80052584(opponent);
if (player->form == FORM_LANDMASTER) {
func_display_80052B80(player);
} else if (player->form == FORM_ON_FOOT) {
func_display_80052584(player);
}
}
}
@ -1729,12 +1734,12 @@ void Play_Draw(void) {
}
Background_DrawLensFlare();
if ((gCamCount != 1) &&
((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (player->state_1C8 == PLAYERSTATE_1C8_U_TURN))) {
((camPlayer->state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (camPlayer->state_1C8 == PLAYERSTATE_1C8_U_TURN))) {
HUD_Draw();
HUD_DrawEdgeArrows();
}
Matrix_Pop(&gGfxMatrix);
func_display_80051B30();
Display_DrawHelpAlert();
sPlayersVisible[gPlayerNum] = 0;
Matrix_Pop(&gGfxMatrix);
}

View File

@ -2,7 +2,7 @@
#include "fox_edata_info.c"
f32* D_edata_800CF964[] = { NULL };
f32* D_edata_800CF964[] = { NULL }; // Likely a scrapped array of scenery shadow boxes
void func_edata_800594F0(Scenery* scenery) {
RCP_SetupDL_57(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);

View File

@ -24,7 +24,7 @@
Vec3f D_edisplay_801615D0;
Vec3f sViewPos;
s32 sDrewActor;
bool sDrewActor;
Matrix D_edisplay_801615F0;
WingInfo D_edisplay_80161630;
@ -90,11 +90,11 @@ f32 D_edisplay_800CFA2C[] = {
void Actor202_Draw(Actor202* this) {
Vec3f sp30[30];
f32 temp = D_edisplay_800CF9B0[this->unk_0B6] - 114.0f;
f32 temp = D_edisplay_800CF9B0[this->animFrame] - 114.0f;
Matrix_Translate(gGfxMatrix, 0.f, -temp, 0.0f, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
Animation_GetFrameData(&D_ME_601E8C4, this->unk_0B6, sp30);
Animation_GetFrameData(&D_ME_601E8C4, this->animFrame, sp30);
Animation_DrawSkeleton(1, D_ME_601E9D0, sp30, NULL, Actor202_PostLimbDraw, &this->index, &gIdentityMatrix);
}
@ -119,7 +119,7 @@ void Scenery42_Draw(Scenery_42* this) {
}
void Actor196_Draw(Actor196* this) {
if (this->unk_0B6 != 0) {
if (this->animFrame != 0) {
gSPDisplayList(gMasterDisp++, D_CO_6032BC0);
}
}
@ -133,7 +133,7 @@ void Sprite167_Draw(Sprite167* this) {
void FogShadow_Draw(FogShadow* this) {
RCP_SetupDL_47(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 180);
switch (this->unk_45) {
switch (this->sceneryId) {
case OBJ_SCENERY_0:
Matrix_Scale(gGfxMatrix, 2.0f, 1.0f, 0.7f, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
@ -179,8 +179,9 @@ void func_edisplay_80059FDC(Scenery* scenery) {
gSPDisplayList(gMasterDisp++, D_CO_6035DA0);
}
// repurposed into OBJ_SCENERY_15
void func_edisplay_8005A010(Sprite* sprite) {
if (sprite->unk_48 == 0) {
if (!sprite->toLeft) {
Matrix_RotateY(gGfxMatrix, M_PI / 2, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
gSPDisplayList(gMasterDisp++, D_CO_60361F0);
@ -576,7 +577,7 @@ void func_edisplay_8005B7CC(Actor* actor) {
void func_edisplay_8005B848(Actor* actor) {
f32 scale;
switch (actor->unk_0B4) {
switch (actor->eventType) {
case 0:
gSPDisplayList(gMasterDisp++, D_1028230);
break;
@ -600,7 +601,7 @@ void func_edisplay_8005B848(Actor* actor) {
void func_edisplay_8005B9A4(Actor* actor) {
Matrix_Translate(gGfxMatrix, 0.0f, -124.0f, 0.0f, MTXF_APPLY);
Animation_GetFrameData(&D_CO_6029528, actor->unk_0B6, actor->vwork);
Animation_GetFrameData(&D_CO_6029528, actor->animFrame, actor->vwork);
Animation_DrawSkeleton(1, D_CO_6029674, actor->vwork, NULL, NULL, actor, &gIdentityMatrix);
}
@ -619,7 +620,7 @@ f32 D_edisplay_800CFCCC[] = {
0.0f, 0.05f, 0.03f, 0.02f, 0.01f, 0.05f, 0.0f, 0.02f,
};
void func_edisplay_8005BAB4(ObjectId objId, s32 index) {
void Object_SetShadowDL(ObjectId objId, s32 index) {
f32 temp_fv0;
f32 temp1;
f32 temp2;
@ -637,7 +638,7 @@ void func_edisplay_8005BAB4(ObjectId objId, s32 index) {
case OBJ_ACTOR_CUTSCENE:
case OBJ_ACTOR_TEAM_BOSS:
case OBJ_ACTOR_EVENT:
switch (gActors[index].unk_0B4) {
switch (gActors[index].eventType) {
case EVID_3:
Matrix_Scale(gGfxMatrix, 2.3f, 0.0f, 2.3f, MTXF_APPLY);
Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY);
@ -763,7 +764,7 @@ void func_edisplay_8005BAB4(ObjectId objId, s32 index) {
void ItemCheckpoint_Draw(ItemCheckpoint* this) {
s32 i;
if ((gGameFrameCount & 0x18) && (this->state == 0)) {
if (((gGameFrameCount & 0x18) != 0) && (this->state == 0)) {
Matrix_Push(&gGfxMatrix);
RCP_SetupDL(&gMasterDisp, 0x40);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255);
@ -1001,16 +1002,16 @@ void Actor_DrawOnRails(Actor* this) {
Zoness_80190F08(this);
return;
}
if ((this->obj.id == OBJ_ACTOR_EVENT) && (this->unk_0B4 == EVID_200)) {
if ((this->obj.id == OBJ_ACTOR_EVENT) && (this->eventType == EVID_200)) {
Actor194_Draw(this);
} else {
if (this->info.unk_19 != 0) {
this->obj.pos.y += gCameraShakeY;
func_edisplay_8005D008(&this->obj, this->info.drawType);
this->obj.pos.y -= gCameraShakeY;
} else if ((this->obj.id == OBJ_ACTOR_EVENT) && (this->unk_0B4 != EVID_31)) {
} else if ((this->obj.id == OBJ_ACTOR_EVENT) && (this->eventType != EVID_31)) {
func_edisplay_8005D3CC(&this->obj, this->vwork[29].x, this->vwork[29].y,
this->vwork[29].z + this->unk_0F4.z, this->info.drawType);
this->vwork[29].z + this->rot_0F4.z, this->info.drawType);
} else {
func_edisplay_8005D008(&this->obj, this->info.drawType);
}
@ -1021,7 +1022,7 @@ void Actor_DrawOnRails(Actor* this) {
this->info.draw(&this->obj);
Object_UpdateSfxSource(this->sfxSource);
if (((this->obj.id == OBJ_ACTOR_TEAM_BOSS) ||
((this->obj.id == OBJ_ACTOR_SLIPPY_SX) && (this->unk_0B6 > 0))) &&
((this->obj.id == OBJ_ACTOR_SLIPPY_SX) && (this->animFrame > 0))) &&
(gReflectY > 0)) {
Matrix_MultVec3f(gGfxMatrix, &sp34, &gTeamArrowsViewPos[this->aiType]);
}
@ -1140,9 +1141,9 @@ void Boss_Draw(Boss* this, s32 arg1) {
Vec3f origin = { 0.0f, 0.0f, 0.0f };
if (this->info.unk_19 != 0) {
this->obj.pos.y += this->unk_068 + gCameraShakeY;
this->obj.pos.y += this->yOffset + gCameraShakeY;
func_edisplay_8005D1F0(&this->obj, this->info.drawType);
this->obj.pos.y -= this->unk_068 + gCameraShakeY;
this->obj.pos.y -= this->yOffset + gCameraShakeY;
} else {
func_edisplay_8005D1F0(&this->obj, this->info.drawType);
}
@ -1299,7 +1300,7 @@ void ActorAllRange_DrawShadow(Actor* actor) {
Matrix_SetGfxMtx(&gMasterDisp);
gSPDisplayList(gMasterDisp++, D_1032780);
} else if (gCurrentLevel == LEVEL_KATINA) {
if ((actor->unk_0B6 == 1) || (actor->unk_0B6 == 2)) {
if ((actor->animFrame == 1) || (actor->animFrame == 2)) {
gSPDisplayList(gMasterDisp++, D_KA_600D730);
} else {
gSPDisplayList(gMasterDisp++, D_KA_600DBC0);
@ -1347,7 +1348,7 @@ void Object_DrawShadow(s32 index, Object* obj) {
Matrix_RotateZ(gGfxMatrix, obj->rot.z * M_DTOR, MTXF_APPLY);
}
Matrix_SetGfxMtx(&gMasterDisp);
func_edisplay_8005BAB4(obj->id, index);
Object_SetShadowDL(obj->id, index);
}
}
@ -1381,9 +1382,9 @@ void Object_SetSfxSourceToPos(f32* sfxSrc, Vec3f* pos) {
} else {
Matrix_RotateY(gCalcMatrix, gPlayer[0].camYaw, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, gPlayer[0].camPitch, MTXF_APPLY);
sp2C.x = pos->x - gPlayerCamEye.x;
sp2C.y = pos->y - gPlayerCamEye.y;
sp2C.z = pos->z + gPathProgress - gPlayerCamEye.z;
sp2C.x = pos->x - gPlayCamEye.x;
sp2C.y = pos->y - gPlayCamEye.y;
sp2C.z = pos->z + gPathProgress - gPlayCamEye.z;
Matrix_MultVec3f(gCalcMatrix, &sp2C, &sp20);
sfxSrc[0] = sp20.x;
sfxSrc[1] = sp20.y;
@ -1494,7 +1495,7 @@ void Display_SetSecondLight(Vec3f* pos) {
if (lightFade > 1.0f) {
lightFade = 1.0f;
}
if (D_ctx_8017812C == 2) {
if (gGroundClipMode == 2) {
lightFade = 1.0f;
}
sp94 = Math_Atan2F(sp9C.x, sp9C.z);
@ -1550,7 +1551,7 @@ void Object_DrawAll(s32 arg0) {
if ((gLevelMode == LEVELMODE_ALL_RANGE) && (gCurrentLevel != LEVEL_KATINA)) {
RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
if (D_ctx_80177AB0 == 5) {
if (gDrawBackdrop == 5) {
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
}
for (i = 0, scenery360 = gScenery360; i < 200; i++, scenery360++) {
@ -1593,7 +1594,7 @@ void Object_DrawAll(s32 arg0) {
Matrix_Push(&gGfxMatrix);
Boss_Draw(boss, arg0);
Matrix_Pop(&gGfxMatrix);
if ((boss->unk_05E != 0) && (D_edisplay_801615D0.y > 0.0f)) {
if (boss->drawShadow && (D_edisplay_801615D0.y > 0.0f)) {
Matrix_Push(&gGfxMatrix);
Object_DrawShadow(i, &boss->obj);
Matrix_Pop(&gGfxMatrix);
@ -1641,7 +1642,7 @@ void Object_DrawAll(s32 arg0) {
Object_SetCullDirection(arg0);
Actor_DrawOnRails(actor);
Matrix_Pop(&gGfxMatrix);
if (actor->unk_0C9 != 0) {
if (actor->drawShadow) {
Matrix_Push(&gGfxMatrix);
Object_DrawShadow(i, &actor->obj);
Matrix_Pop(&gGfxMatrix);
@ -1651,7 +1652,7 @@ void Object_DrawAll(s32 arg0) {
Matrix_Push(&gGfxMatrix);
Actor_DrawAllRange(actor);
Matrix_Pop(&gGfxMatrix);
if ((actor->unk_0C9 != 0) && (sDrewActor != 0) &&
if (actor->drawShadow && sDrewActor &&
((sViewPos.z > -4000.0f) || (gCurrentLevel != LEVEL_KATINA))) {
Matrix_Push(&gGfxMatrix);
Object_DrawShadow(i, &actor->obj);
@ -1808,8 +1809,8 @@ void TexturedLine_Draw(void) {
if (gCurrentLevel == LEVEL_MACBETH) {
gSPDisplayList(gMasterDisp++, D_MA_6012C00);
} else {
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, texLine->red, texLine->green, texLine->blue,
texLine->alpha);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, texLine->prim.r, texLine->prim.g, texLine->prim.b,
texLine->prim.a);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFD80);
}
}
@ -1821,12 +1822,12 @@ void TexturedLine_Draw(void) {
void TexturedLine_DrawPath(s32 index) {
TexturedLine* texLine = &gTexturedLines[index];
if (texLine->alpha == 255) {
if (texLine->prim.a == 255) {
RCP_SetupDL(&gMasterDisp, 5);
} else {
RCP_SetupDL(&gMasterDisp, 0xE);
}
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, texLine->red, texLine->green, texLine->blue, texLine->alpha);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, texLine->prim.r, texLine->prim.g, texLine->prim.b, texLine->prim.a);
Matrix_Push(&gGfxMatrix);
Matrix_Translate(gGfxMatrix, texLine->posAA.x, texLine->posAA.y, texLine->posAA.z, MTXF_APPLY);
Matrix_RotateY(gGfxMatrix, texLine->yRot, MTXF_APPLY);

View File

@ -423,7 +423,7 @@ static s32 D_800D173C[] = { 255, 255, 255, 0, 0, 0, 255, 0, 255, 0, 0, 0, 255, 2
void func_effect_800788B0(Effect* effect) {
s32 temp_ft3;
s32* tmp;
s32 tmp;
switch (gCurrentLevel) {
case LEVEL_METEO:
@ -436,8 +436,8 @@ void func_effect_800788B0(Effect* effect) {
RCP_SetupDL(&gMasterDisp, 0x43);
temp_ft3 = Math_ModF(effect->index, 4.0f);
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, (s32) effect->scale1);
tmp = &D_800D173C[(s32) (temp_ft3 * 4.0f)];
gDPSetEnvColor(gMasterDisp++, tmp[0], tmp[1], tmp[2], 255);
tmp = temp_ft3 * 4.0f;
gDPSetEnvColor(gMasterDisp++, D_800D173C[tmp + 0], D_800D173C[tmp + 1], D_800D173C[tmp + 2], 255);
Graphics_SetScaleMtx(effect->scale2);
gSPDisplayList(gMasterDisp++, D_1024AC0);
RCP_SetupDL(&gMasterDisp, 0x40);
@ -873,7 +873,7 @@ void func_effect_800798F0(Effect* effect) {
void func_effect_8007A28C(Effect* effect) {
Texture_Scroll(D_10190C0, 16, 32, 0);
D_ctx_8017812C = 2;
gGroundClipMode = 2;
effect->obj.rot.y += 1.0f;
Math_SmoothStepToF(&effect->scale2, effect->scale1, 0.05f, 1.5f, 0.001f);
@ -895,7 +895,7 @@ void func_effect_8007A28C(Effect* effect) {
if (effect->unk_44 < 0) {
effect->unk_44 = 0;
Object_Kill(&effect->obj, effect->sfxSource);
D_ctx_8017812C = 0;
gGroundClipMode = 0;
}
}
}
@ -1596,12 +1596,12 @@ void func_effect_8007C250(Effect* effect) {
Math_SmoothStepToF(&effect->vel.y, 0.0f, 0.2f, 10.0f, 0.1f);
Math_SmoothStepToF(&effect->vel.z, 0.0f, 0.2f, 10.0f, 0.1f);
var_v0 = 3;
var_v0 = 4 - 1;
if (gLevelMode == LEVELMODE_ALL_RANGE) {
var_v0 = 1;
var_v0 = 2 - 1;
}
if (!(effect->timer_50 & var_v0)) {
if ((effect->timer_50 & var_v0) == 0) {
randX = RAND_FLOAT_CENTERED(40.0f);
randY = RAND_FLOAT_CENTERED(40.0f);
randOther = RAND_FLOAT(0.5f) + 1.0f;
@ -1738,12 +1738,12 @@ void func_effect_8007C8C4(Effect* effect) {
f32 randOther;
s32 var_v0;
var_v0 = 0;
var_v0 = 1 - 1;
if ((gCurrentLevel == LEVEL_FORTUNA) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_NEXT)) {
var_v0 = 3;
var_v0 = 4 - 1;
}
if (!(effect->timer_50 & var_v0) && (gLevelType == LEVELTYPE_PLANET)) {
if (((effect->timer_50 & var_v0) == 0) && (gLevelType == LEVELTYPE_PLANET)) {
randX = RAND_FLOAT_CENTERED(10.0f);
randY = RAND_FLOAT_CENTERED(10.0f);
randOther = RAND_FLOAT(0.5f) + 1.0f;
@ -2032,8 +2032,7 @@ static f32 D_800D17F8[] = {
1.6f, 1.6f, 1.7f, 1.7f, 1.8f, 1.8f, 1.9f, 1.9f, 2.0f, 2.0f,
};
// RGBA values
static u8 D_800D184C[][4] = {
static Color_RGBA32 D_800D184C[] = {
{ 255, 255, 255, 255 }, { 255, 0, 0, 255 }, { 255, 40, 40, 255 }, { 255, 80, 80, 255 },
{ 255, 120, 120, 255 }, { 255, 160, 160, 255 }, { 255, 200, 200, 255 }, { 255, 240, 240, 255 },
{ 255, 255, 255, 255 }, { 255, 255, 255, 255 }, { 255, 255, 255, 255 }, { 255, 255, 255, 255 },
@ -2053,8 +2052,8 @@ void func_effect_8007D55C(Effect* effect) {
Graphics_SetScaleMtx(effect->scale2);
if (gLevelType == LEVELTYPE_PLANET) {
gDPSetPrimColor(gMasterDisp++, 0, 0, D_800D184C[effect->unk_4C][0], D_800D184C[effect->unk_4C][1],
D_800D184C[effect->unk_4C][2], D_800D184C[effect->unk_4C][3]);
gDPSetPrimColor(gMasterDisp++, 0, 0, D_800D184C[effect->unk_4C].r, D_800D184C[effect->unk_4C].g,
D_800D184C[effect->unk_4C].b, D_800D184C[effect->unk_4C].a);
scale = D_800D17F8[effect->unk_4C] - 0.5f;
Matrix_Scale(gGfxMatrix, scale, scale, 1.0f, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
@ -2324,7 +2323,7 @@ void func_effect_8007E45C(Effect* effect) {
}
effect->scale2 += 0.02f;
effect->unk_44 -= 1;
effect->unk_44--;
if (effect->unk_44 < 0) {
Object_Kill(&effect->obj, effect->sfxSource);
@ -2643,7 +2642,7 @@ void func_effect_8007F438(Effect* effect) {
if (effect->unk_46 == 0) {
effect->unk_46 = 30;
effect->unk_44 += 1;
effect->unk_44++;
effect->unk_44 &= 1;
} else {
effect->unk_46--;
@ -2670,7 +2669,7 @@ void func_effect_8007F438(Effect* effect) {
void func_effect_8007F5AC(Effect* effect) {
if (effect->unk_4C == 0) {
effect->unk_46++;
if (!(effect->unk_46 & 0x20)) {
if ((effect->unk_46 & 0x20) == 0) {
effect->vel.x += 0.5f;
} else {
effect->vel.x -= 0.5f;
@ -2684,7 +2683,7 @@ void func_effect_8007F5AC(Effect* effect) {
}
effect->scale2 += 0.02f;
if (!(gGameFrameCount & 0x10)) {
if ((gGameFrameCount & 0x10) == 0) {
effect->scale2 += 0.01f;
} else {
effect->scale2 -= 0.01f;
@ -2846,7 +2845,7 @@ void func_effect_8007FE88(Effect* effect) {
return;
}
if (func_effect_8007FD84(effect) != 0) {
if (func_effect_8007FD84(effect)) {
Object_Kill(&effect->obj, effect->sfxSource);
return;
}
@ -2870,7 +2869,7 @@ void func_effect_8007FE88(Effect* effect) {
effect->vel.x = destVelocity.x;
effect->vel.y = destVelocity.y;
effect->vel.z = destVelocity.z;
gPlayer[0].unk_2C4 += 1;
gPlayer[0].unk_2C4++;
AUDIO_PLAY_SFX(NA_SE_ROLLING_REFLECT, effect->sfxSource, 0);
}
@ -2979,7 +2978,7 @@ void func_effect_8008040C(Effect* effect) {
return;
}
if (func_effect_8007FD84(effect) != 0) {
if (func_effect_8007FD84(effect)) {
Object_Kill(&effect->obj, effect->sfxSource);
return;
}
@ -3079,11 +3078,11 @@ void func_effect_80080ACC(Effect* effect) {
break;
case 1:
effect->unk_46 -= 1;
effect->unk_46--;
break;
case 10:
effect->unk_44 -= 1;
effect->unk_44--;
if (effect->unk_44 <= 0) {
effect->unk_44 = effect->unk_46;
}
@ -3572,7 +3571,7 @@ void func_effect_80081C5C(Effect* effect) {
Object_Kill(&effect->obj, effect->sfxSource);
func_effect_8007D0E0(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 5.0f);
} else if (fabsf(gPlayer[0].trueZpos - effect->obj.pos.z) < 1000.0f) {
ActorEvent_8006F0D8(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 15.0f);
ActorEvent_SpawnEffect347(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 15.0f);
Object_Kill(&effect->obj, effect->sfxSource);
}
sp84 = 50.0f;
@ -3756,7 +3755,7 @@ void func_effect_80081C5C(Effect* effect) {
effect->unk_46 = 50;
}
if (effect->unk_46 != 0) {
effect->unk_46 -= 1;
effect->unk_46--;
}
if ((((gGameFrameCount % 16) == 0)) && (effect->timer_50 == 0)) {
D_800D18EC =

View File

@ -175,7 +175,7 @@ void Boss_Initialize(Boss* boss) {
for (i = 0; i < sizeof(Boss); i++, ptr++) {
*ptr = 0;
}
boss->unk_3F8 = 1.0f;
boss->scale = 1.0f;
}
void Item_Initialize(Item* item) {
@ -380,12 +380,12 @@ void ActorEvent_Load(Actor* actor, ObjectInit* objInit, s32 index) {
actor->obj.pos.z += -3000.0f + objInit->zPos2;
actor->obj.pos.x = objInit->xPos;
actor->obj.pos.y = objInit->yPos;
actor->obj.rot.y = actor->unk_0F4.y = objInit->rot.y;
actor->obj.rot.x = actor->unk_0F4.x = objInit->rot.x;
actor->unk_0F4.z = objInit->rot.z;
actor->obj.rot.y = actor->rot_0F4.y = objInit->rot.y;
actor->obj.rot.x = actor->rot_0F4.x = objInit->rot.x;
actor->rot_0F4.z = objInit->rot.z;
actor->obj.id = OBJ_ACTOR_EVENT;
actor->timer_0C2 = 10;
actor->unk_0B4 = EVID_FFF;
actor->eventType = EVID_FFF;
actor->aiType = objInit->id - ACTOR_EVENT_ID;
Object_SetInfo(&actor->info, actor->obj.id);
@ -483,12 +483,11 @@ void Object_Load(ObjectInit* objInit, f32 xMax, f32 xMin, f32 yMax, f32 yMin) {
D_Andross_801A7F60 = -(f32) objInit->rot.x;
break;
case OBJ_UNK_400:
D_ctx_801782B8++;
gDrawSmallRocks++;
break;
case OBJ_UNK_401:
if (D_ctx_801782B8 > 0) {
D_ctx_801782B8--;
break;
if (gDrawSmallRocks > 0) {
gDrawSmallRocks--;
}
break;
}
@ -538,8 +537,8 @@ void Object_LoadLevelObjects(void) {
} else {
gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]);
}
if (D_ctx_8017812C == 0) {
for (j = 0; j < D_ctx_801782B8; j++) {
if (gGroundClipMode == 0) {
for (j = 0; j < gDrawSmallRocks; j++) {
if (gCurrentLevel == LEVEL_AQUAS) {
func_enmy_80061B68();
} else {
@ -561,10 +560,10 @@ void Object_LoadLevelObjects(void) {
yMin = xMin = -4000.0f;
}
if ((gPlayer[0].timer_210 != 0) && (gPlayer[0].yRot_118 < 0.0f)) {
if ((gPlayer[0].pathChangeTimer != 0) && (gPlayer[0].pathChangeYaw < 0.0f)) {
xMax = 10000.0f;
}
if ((gPlayer[0].timer_210 != 0) && (gPlayer[0].yRot_118 > 0.0f)) {
if ((gPlayer[0].pathChangeTimer != 0) && (gPlayer[0].pathChangeYaw > 0.0f)) {
xMin = -10000.0f;
}
gLastPathChange = 0;
@ -851,7 +850,7 @@ s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) {
Object_CheckSingleHitbox(pos, sprite->info.hitbox, &sprite->obj.pos)) {
if ((sprite->obj.id == OBJ_SPRITE_FO_POLE) || (sprite->obj.id == OBJ_SPRITE_CO_TREE) ||
(sprite->obj.id == OBJ_SPRITE_CO_TREE)) {
sprite->unk_46 = 1;
sprite->destroy = 1;
}
return 0;
}
@ -904,7 +903,7 @@ s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) {
}
} else if (actor->scale < 0.0f) {
if (Object_CheckHitboxCollision(pos, actor->info.hitbox, &actor->obj, actor->vwork[29].x,
actor->vwork[29].y, actor->vwork[29].z + actor->unk_0F4.z)) {
actor->vwork[29].y, actor->vwork[29].z + actor->rot_0F4.z)) {
actor->dmgType = DMG_BEAM;
actor->damage = 10;
actor->dmgPart = -1;
@ -962,7 +961,7 @@ void func_enmy_80063D58(Scenery* scenery) {
Sprite_Initialize(&gSprites[i]);
gSprites[i].obj.status = OBJ_INIT;
gSprites[i].obj.id = OBJ_SPRITE_FOG_SHADOW;
gSprites[i].unk_45 = scenery->obj.id;
gSprites[i].sceneryId = scenery->obj.id;
gSprites[i].obj.pos.x = scenery->obj.pos.x;
gSprites[i].obj.pos.y = 5.0f;
gSprites[i].obj.pos.z = scenery->obj.pos.z;
@ -1144,16 +1143,16 @@ void Object_Init(s32 index, ObjectId objId) {
}
break;
case OBJ_ACTOR_239:
gActors[index].iwork[0] = D_ctx_801784A4;
D_ctx_801784A4++;
gActors[index].iwork[0] = gZOSnakeWaypointCount;
gZOSnakeWaypointCount++;
break;
case OBJ_ACTOR_236:
D_ctx_801784A4 = 0;
gActors[index].unk_0F4.x = gActors[index].obj.rot.x;
gActors[index].unk_0F4.y = gActors[index].obj.rot.y;
gZOSnakeWaypointCount = 0;
gActors[index].rot_0F4.x = gActors[index].obj.rot.x;
gActors[index].rot_0F4.y = gActors[index].obj.rot.y;
gActors[index].obj.rot.x = gActors[index].obj.rot.y = 0.0f;
gActors[index].fwork[2] = gActors[index].obj.pos.y;
var_v0 = D_ctx_801782C4;
var_v0 = gZOSnakePosRots;
for (var_a0 = 0; var_a0 < 200; var_a0++, var_v0++) {
var_v0->pos.x = gActors[index].obj.pos.x;
var_v0->pos.y = gActors[index].obj.pos.y;
@ -1185,7 +1184,7 @@ void Object_Init(s32 index, ObjectId objId) {
AUDIO_PLAY_SFX(NA_SE_EN_MISSILE_ENGINE, gActors[index].sfxSource, 4);
break;
case OBJ_ACTOR_192:
gActors[index].unk_0C9 = 1;
gActors[index].drawShadow = true;
break;
case OBJ_BOSS_320:
Andross_Boss320_Init(&gBosses[index]);
@ -1408,9 +1407,9 @@ void func_enmy_800655C8(Actor* actor, f32 xPos, f32 yPos, f32 zPos, s32 arg4) {
actor->obj.pos.x = xPos;
actor->obj.pos.y = yPos;
actor->obj.pos.z = zPos;
actor->unk_0B4 = arg4;
actor->eventType = arg4;
actor->timer_0BE = 50;
if (actor->unk_0B4 == 1) {
if (actor->eventType == 1) {
actor->timer_0BE = 30;
}
actor->fwork[5] = 15.0f;
@ -1530,7 +1529,7 @@ void func_enmy_800656D4(Actor* actor) {
sp88 = actor->fwork[27] - actor->obj.pos.x;
sp80 = actor->fwork[29] - actor->obj.pos.z;
sp80 = sqrtf(SQ(sp88) + SQ(sp80)) * 0.2f;
if (actor->unk_0B4 == 1) {
if (actor->eventType == 1) {
sp80 = 0.1f;
}
spD0 = SIN_DEG(actor->fwork[0]) * sp80;
@ -1562,10 +1561,10 @@ void func_enmy_800656D4(Actor* actor) {
actor->vel.x = sp98.x;
actor->vel.y = sp98.y;
actor->vel.z = sp98.z - gPathVelZ;
if (actor->unk_0B4 == 0) {
if (actor->eventType == 0) {
actor->obj.rot.z += 5.0f;
}
if (actor->unk_0B4 == 1) {
if (actor->eventType == 1) {
if (actor->timer_0BE == 0) {
actor->timer_0BE = 30;
Math_Vec3fFromAngles(&sp98, actor->obj.rot.x, actor->obj.rot.y, 120.0f);
@ -1656,7 +1655,7 @@ void Actor_Despawn(Actor* actor) {
!((D_versus_80178768[0] == 0) && (D_versus_80178768[1] == 0) && (D_versus_80178768[2] == 0))) {
gPlayerScores[actor->dmgSource - 1] += actor->info.bonus;
}
} else if (!((actor->obj.id == OBJ_ACTOR_ALLRANGE) && (actor->unk_0B6 == 1))) {
} else if (!((actor->obj.id == OBJ_ACTOR_ALLRANGE) && (actor->animFrame == 1))) {
if ((actor->dmgSource == AI360_FOX + 1) && (actor->info.bonus != 0)) {
gHitCount += actor->info.bonus;
D_ctx_80177850 = 15;
@ -1723,17 +1722,17 @@ void func_enmy_8006654C(Actor* actor) {
if (actor->fwork[0] < 20.0f) {
actor->fwork[0] += 0.5f;
}
actor->unk_0B6++;
if (Animation_GetFrameCount(&D_CO_6029528) < actor->unk_0B6) {
actor->unk_0B6 = 0;
actor->animFrame++;
if (Animation_GetFrameCount(&D_CO_6029528) < actor->animFrame) {
actor->animFrame = 0;
}
if ((actor->obj.rot.z < 15.0f) && (actor->unk_0B6 < 20)) {
if ((actor->obj.rot.z < 15.0f) && (actor->animFrame < 20)) {
actor->obj.rot.z += 1.0f;
}
if ((actor->obj.rot.z > -15.0f) && (actor->unk_0B6 > 20)) {
if ((actor->obj.rot.z > -15.0f) && (actor->animFrame > 20)) {
actor->obj.rot.z -= 1.0f;
}
if ((actor->unk_0B6 == 20) || (actor->unk_0B6 == 40)) {
if ((actor->animFrame == 20) || (actor->animFrame == 40)) {
actor->state++;
actor->timer_0BC = 20;
}
@ -1920,7 +1919,7 @@ void Item_CheckBounds(Item* this) {
if (this->obj.pos.y < gGroundHeight + 70.0f) {
Math_SmoothStepToF(&this->obj.pos.y, gGroundHeight + 70.0f, 0.1f, 5.0f, 0.01f);
}
if ((gCurrentLevel == LEVEL_AQUAS) && (gBossActive != 0)) {
if ((gCurrentLevel == LEVEL_AQUAS) && gBossActive) {
this->obj.pos.z += 20.0f;
}
} else if (this->obj.pos.y < -500.0f) {
@ -2208,7 +2207,7 @@ void ItemSupplyRing_Update(Item* this) {
} else {
this->obj.pos.y += (gPlayer[this->playerNum].pos.y - this->obj.pos.y) * 0.5f;
}
if (gPlayer[0].cockpitView && (gLevelMode == LEVELMODE_ON_RAILS)) {
if (gPlayer[0].alternateView && (gLevelMode == LEVELMODE_ON_RAILS)) {
this->obj.pos.z += (gPlayer[this->playerNum].trueZpos - 300.0f - this->obj.pos.z) * 0.3f;
} else {
this->obj.pos.z += (gPlayer[this->playerNum].trueZpos - this->obj.pos.z) * 0.5f;
@ -2308,7 +2307,7 @@ void ItemCheckpoint_Update(ItemCheckpoint* this) {
} else {
this->obj.pos.y += (gPlayer[this->playerNum].pos.y - this->obj.pos.y) * 0.3f;
}
if (gPlayer[0].cockpitView) {
if (gPlayer[0].alternateView) {
this->obj.pos.z += (gPlayer[this->playerNum].trueZpos - 200.0f - this->obj.pos.z) * 0.3f;
} else {
this->obj.pos.z += (gPlayer[this->playerNum].trueZpos - 100.0f - this->obj.pos.z) * 0.3f;
@ -2384,40 +2383,40 @@ void ItemPathChange_Update(Item* this) {
if (this->collected) {
Object_Kill(&this->obj, this->sfxSource);
gPlayer[0].pathStep = 0.0f;
gPlayer[0].timer_210 = this->width * 0.05f;
gPlayer[0].pathChangeTimer = this->width * 0.05f;
switch (this->obj.id) {
case OBJ_ITEM_PATH_SPLIT_X:
if (this->obj.pos.x < gPlayer[0].pos.x) {
gPlayer[0].yRot_118 = -30.0f;
gPlayer[0].pathChangeYaw = -30.0f;
gPlayer[0].xPathTarget = gPlayer[0].xPath + this->width;
} else {
gPlayer[0].yRot_118 = 30.0f;
gPlayer[0].pathChangeYaw = 30.0f;
gPlayer[0].xPathTarget = gPlayer[0].xPath - this->width;
}
break;
case OBJ_ITEM_PATH_TURN_LEFT:
gPlayer[0].yRot_118 = 30.0f;
gPlayer[0].pathChangeYaw = 30.0f;
gPlayer[0].xPathTarget = gPlayer[0].xPath - this->width;
break;
case OBJ_ITEM_PATH_TURN_RIGHT:
gPlayer[0].yRot_118 = -30.0f;
gPlayer[0].pathChangeYaw = -30.0f;
gPlayer[0].xPathTarget = gPlayer[0].xPath + this->width;
break;
case OBJ_ITEM_PATH_SPLIT_Y:
if (this->obj.pos.y < gPlayer[0].pos.y) {
gPlayer[0].xRot_124 = 30.0f;
gPlayer[0].pathChangePitch = 30.0f;
gPlayer[0].yPathTarget = gPlayer[0].yPath + this->width;
} else {
gPlayer[0].xRot_124 = -30.0f;
gPlayer[0].pathChangePitch = -30.0f;
gPlayer[0].yPathTarget = gPlayer[0].yPath - this->width;
}
break;
case OBJ_ITEM_PATH_TURN_UP:
gPlayer[0].xRot_124 = 30.0f;
gPlayer[0].pathChangePitch = 30.0f;
gPlayer[0].yPathTarget = gPlayer[0].yPath + this->width;
break;
case OBJ_ITEM_PATH_TURN_DOWN:
gPlayer[0].xRot_124 = -30.0f;
gPlayer[0].pathChangePitch = -30.0f;
gPlayer[0].yPathTarget = gPlayer[0].yPath - this->width;
break;
}
@ -2430,7 +2429,7 @@ void Sprite_UpdateDoodad(Sprite* this) {
(Math_Atan2F(gPlayer[0].cam.eye.x - this->obj.pos.x, gPlayer[0].cam.eye.z - (this->obj.pos.z + gPathProgress)) *
180.0f) /
M_PI;
if (this->unk_46 != 0) {
if (this->destroy) {
this->obj.status = OBJ_FREE;
func_effect_8007A6F0(&this->obj.pos, NA_SE_OB_EXPLOSION_S);
switch (this->obj.id) {
@ -2505,7 +2504,7 @@ void Actor_Move(Actor* actor) {
var_fv0 = 4000.0f;
if ((actor->obj.id == OBJ_ACTOR_236) || (gCurrentLevel == LEVEL_MACBETH) ||
((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->unk_0B4 == EVID_56))) {
((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->eventType == EVID_56))) {
var_fv0 = 8000.0f;
} else if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ENTER_WARP_ZONE) {
var_fv0 = 100000.0f;
@ -2517,7 +2516,7 @@ void Actor_Move(Actor* actor) {
Object_Kill(&actor->obj, actor->sfxSource);
switch (actor->obj.id) {
case OBJ_ACTOR_236:
D_ctx_801784A4 = 0;
gZOSnakeWaypointCount = 0;
break;
case OBJ_ACTOR_229:
Titania_8018E3B0(actor);
@ -2526,9 +2525,9 @@ void Actor_Move(Actor* actor) {
gActor194Status[actor->unk_046] = 0;
break;
case OBJ_ACTOR_EVENT:
if ((actor->unk_0B4 >= EVID_200) && (actor->unk_0B4 < EVID_300)) {
if ((actor->eventType >= EVID_200) && (actor->eventType < EVID_300)) {
gActor194Status[actor->unk_046] = 0;
} else if ((actor->unk_0B4 == EVID_38) && (actor->unk_046 != 2)) {
} else if ((actor->eventType == EVID_SX_WARP_GATE) && (actor->unk_046 != 2)) {
gRingPassCount = -1;
}
break;
@ -2552,7 +2551,7 @@ void Boss_Move(Boss* boss) {
void Scenery_Move(Scenery* scenery) {
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) {
scenery->obj.pos.z += scenery->unk_60;
scenery->obj.pos.z += scenery->effectVel.z;
if (scenery->info.cullDistance < scenery->obj.pos.z) {
Object_Kill(&scenery->obj, scenery->sfxSource);
}
@ -2580,7 +2579,7 @@ void Sprite_Move(Sprite* sprite) {
f32 var_fa0 = 500.0f;
if (((sprite->obj.id == OBJ_SPRITE_FOG_SHADOW) &&
((sprite->unk_45 == OBJ_SCENERY_6) || (sprite->unk_45 == OBJ_SCENERY_7))) ||
((sprite->sceneryId == OBJ_SCENERY_6) || (sprite->sceneryId == OBJ_SCENERY_7))) ||
(sprite->obj.id == OBJ_SCENERY_8)) {
var_fa0 = 1000.0f;
}

File diff suppressed because it is too large Load Diff

View File

@ -1,23 +1,23 @@
#include "global.h"
void func_fade_80084370(s32 arg0) {
Graphics_FillRectangle(&gMasterDisp, 0, 0, arg0, SCREEN_HEIGHT, 0, 0, 0, 255);
Graphics_FillRectangle(&gMasterDisp, SCREEN_WIDTH - arg0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0, 0, 255);
void Wipe_Horizontal(s32 frame) {
Graphics_FillRectangle(&gMasterDisp, 0, 0, frame, SCREEN_HEIGHT, 0, 0, 0, 255);
Graphics_FillRectangle(&gMasterDisp, SCREEN_WIDTH - frame, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0, 0, 255);
}
void func_fade_800843FC(s32 arg0) {
Graphics_FillRectangle(&gMasterDisp, 0, 0, SCREEN_WIDTH, arg0, 0, 0, 0, 255);
Graphics_FillRectangle(&gMasterDisp, 0, SCREEN_HEIGHT - arg0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0, 0, 255);
void Wipe_Vertical(s32 frame) {
Graphics_FillRectangle(&gMasterDisp, 0, 0, SCREEN_WIDTH, frame, 0, 0, 0, 255);
Graphics_FillRectangle(&gMasterDisp, 0, SCREEN_HEIGHT - frame, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0, 0, 255);
}
void func_fade_80084488(s32 arg0) {
void Wipe_Circular(s32 frame) {
s32 var_s1;
RCP_SetupDL_12();
Matrix_Push(&gGfxMatrix);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -150.0f, MTXF_NEW);
for (var_s1 = 0; var_s1 < MIN(360, arg0 * 15); var_s1 += 15) {
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, MIN((arg0 - (var_s1 / 15)) * 15, 255));
for (var_s1 = 0; var_s1 < MIN(360, frame * 15); var_s1 += 15) {
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, MIN((frame - (var_s1 / 15)) * 15, 255));
Matrix_Push(&gGfxMatrix);
Matrix_RotateZ(gGfxMatrix, var_s1 * M_DTOR, MTXF_APPLY);
Matrix_Scale(gGfxMatrix, 0.53f, 1.0f, 1.0f, MTXF_APPLY);
@ -28,17 +28,17 @@ void func_fade_80084488(s32 arg0) {
Matrix_Pop(&gGfxMatrix);
}
void func_fade_80084688(s32 fade, s32 progress) {
if (progress != 0) {
switch (fade) {
case 0:
func_fade_80084488(progress);
void Wipe_Draw(WipeMode mode, s32 frame) {
if (frame != 0) {
switch (mode) {
case WIPE_CIRCULAR:
Wipe_Circular(frame);
break;
case 1:
func_fade_80084370(progress);
case WIPE_HORIZONTAL:
Wipe_Horizontal(frame);
break;
case 2:
func_fade_800843FC(progress);
case WIPE_VERTICAL:
Wipe_Vertical(frame);
break;
default:
(void) "そのような フェード は ない (%d)\n"; // There is no such fade

View File

@ -4,15 +4,15 @@
#include "assets/ast_logo.h"
#include "mods.h"
f32 D_game_80161A10;
f32 D_game_80161A14;
f32 gNextVsViewScale;
f32 gVsViewScale;
s32 gPlayerInactive[4];
s32 D_game_80161A28;
s32 gVsMenuSelection;
u8 gShowHud;
u16 gNextLevelPhase;
u16 gNextLevel;
u16 gNextGameState;
u16 D_game_80161A34;
u16 gLastGameState;
u16 gBgColor;
u8 gBlurAlpha;
u8 gGameStandby;
@ -20,8 +20,8 @@ f32 gFovY;
f32 gProjectNear;
f32 gProjectFar;
s32 gShowCrosshairs[4] = { true, true, true, true };
s32 D_game_800D2870 = 0;
bool gShowCrosshairs[4] = { true, true, true, true };
bool D_game_800D2870 = false;
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 };
static s32 sVsCameraULy[] = { 0, 0, SCREEN_HEIGHT / 2, SCREEN_HEIGHT / 2 };
@ -73,7 +73,7 @@ void Game_Initialize(void) {
gFovY = 45.0f;
gProjectNear = 10.0f;
gProjectFar = 12800.0f;
D_game_80161A10 = D_game_80161A14 = 0.0f;
gNextVsViewScale = gVsViewScale = 0.0f;
gSceneId = SCENE_LOGO;
gSceneSetup = 0;
Load_InitDmaAndMsg();
@ -81,7 +81,7 @@ void Game_Initialize(void) {
}
void Game_SetGameState(void) {
D_game_80161A14 = D_game_80161A10;
gVsViewScale = gNextVsViewScale;
if (gNextGameState == GSTATE_NONE) {
return;
@ -202,48 +202,48 @@ void Game_InitViewport(Gfx** dList, u8 camCount, u8 camIndex) {
if ((camCount != 1) && (camCount == 4)) {
switch (camIndex) {
case 0:
gViewport->vp.vscale[0] = SCREEN_WIDTH * (D_game_80161A14 - 1.0f) * 2;
gViewport->vp.vscale[1] = SCREEN_HEIGHT * (D_game_80161A14 - 1.0f) * 2;
gViewport->vp.vscale[0] = SCREEN_WIDTH * (gVsViewScale - 1.0f) * 2;
gViewport->vp.vscale[1] = SCREEN_HEIGHT * (gVsViewScale - 1.0f) * 2;
gViewport->vp.vscale[2] = G_MAXZ / 2;
gViewport->vp.vscale[3] = 0;
gViewport->vp.vtrans[0] = SCREEN_WIDTH * (2.0f - D_game_80161A14) * 2;
gViewport->vp.vtrans[1] = SCREEN_HEIGHT * (2.0f - D_game_80161A14) * 2;
gViewport->vp.vtrans[0] = SCREEN_WIDTH * (2.0f - gVsViewScale) * 2;
gViewport->vp.vtrans[1] = SCREEN_HEIGHT * (2.0f - gVsViewScale) * 2;
gViewport->vp.vtrans[2] = G_MAXZ / 2;
gViewport->vp.vtrans[3] = 0;
gDPSetScissor((*dList)++, G_SC_NON_INTERLACE, SCREEN_MARGIN, SCREEN_MARGIN, SCREEN_WIDTH / 2,
SCREEN_HEIGHT / 2);
break;
case 1:
gViewport->vp.vscale[0] = SCREEN_WIDTH * (D_game_80161A14 - 1.0f) * 2;
gViewport->vp.vscale[1] = SCREEN_HEIGHT * (D_game_80161A14 - 1.0f) * 2;
gViewport->vp.vscale[0] = SCREEN_WIDTH * (gVsViewScale - 1.0f) * 2;
gViewport->vp.vscale[1] = SCREEN_HEIGHT * (gVsViewScale - 1.0f) * 2;
gViewport->vp.vscale[2] = G_MAXZ / 2;
gViewport->vp.vscale[3] = 0;
gViewport->vp.vtrans[0] = SCREEN_WIDTH * D_game_80161A14 * 2;
gViewport->vp.vtrans[1] = SCREEN_HEIGHT * (2.0f - D_game_80161A14) * 2;
gViewport->vp.vtrans[0] = SCREEN_WIDTH * gVsViewScale * 2;
gViewport->vp.vtrans[1] = SCREEN_HEIGHT * (2.0f - gVsViewScale) * 2;
gViewport->vp.vtrans[2] = G_MAXZ / 2;
gViewport->vp.vtrans[3] = 0;
gDPSetScissor((*dList)++, G_SC_NON_INTERLACE, SCREEN_WIDTH / 2, SCREEN_MARGIN,
SCREEN_WIDTH - SCREEN_MARGIN, SCREEN_HEIGHT / 2);
break;
case 2:
gViewport->vp.vscale[0] = SCREEN_WIDTH * (D_game_80161A14 - 1.0f) * 2;
gViewport->vp.vscale[1] = SCREEN_HEIGHT * (D_game_80161A14 - 1.0f) * 2;
gViewport->vp.vscale[0] = SCREEN_WIDTH * (gVsViewScale - 1.0f) * 2;
gViewport->vp.vscale[1] = SCREEN_HEIGHT * (gVsViewScale - 1.0f) * 2;
gViewport->vp.vscale[2] = G_MAXZ / 2;
gViewport->vp.vscale[3] = 0;
gViewport->vp.vtrans[0] = SCREEN_WIDTH * (2.0f - D_game_80161A14) * 2;
gViewport->vp.vtrans[1] = SCREEN_HEIGHT * D_game_80161A14 * 2;
gViewport->vp.vtrans[0] = SCREEN_WIDTH * (2.0f - gVsViewScale) * 2;
gViewport->vp.vtrans[1] = SCREEN_HEIGHT * gVsViewScale * 2;
gViewport->vp.vtrans[2] = G_MAXZ / 2;
gViewport->vp.vtrans[3] = 0;
gDPSetScissor((*dList)++, G_SC_NON_INTERLACE, SCREEN_MARGIN, SCREEN_HEIGHT / 2, SCREEN_WIDTH / 2,
SCREEN_HEIGHT - SCREEN_MARGIN);
break;
case 3:
gViewport->vp.vscale[0] = SCREEN_WIDTH * (D_game_80161A14 - 1.0f) * 2;
gViewport->vp.vscale[1] = SCREEN_HEIGHT * (D_game_80161A14 - 1.0f) * 2;
gViewport->vp.vscale[0] = SCREEN_WIDTH * (gVsViewScale - 1.0f) * 2;
gViewport->vp.vscale[1] = SCREEN_HEIGHT * (gVsViewScale - 1.0f) * 2;
gViewport->vp.vscale[2] = G_MAXZ / 2;
gViewport->vp.vscale[3] = 0;
gViewport->vp.vtrans[0] = SCREEN_WIDTH * D_game_80161A14 * 2;
gViewport->vp.vtrans[1] = SCREEN_HEIGHT * D_game_80161A14 * 2;
gViewport->vp.vtrans[0] = SCREEN_WIDTH * gVsViewScale * 2;
gViewport->vp.vtrans[1] = SCREEN_HEIGHT * gVsViewScale * 2;
gViewport->vp.vtrans[2] = G_MAXZ / 2;
gViewport->vp.vtrans[3] = 0;
gDPSetScissor((*dList)++, G_SC_NON_INTERLACE, SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2,
@ -413,7 +413,7 @@ void Game_Update(void) {
gPlayState = gOptionMenuStatus = gDrawMode = gShowBossHealth = gShowHud = 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;
D_ctx_80177C9C = D_ctx_80177CA4 = D_play_80161A5C = gLastGameState = GSTATE_NONE;
#ifdef MODS_BOOT_STATE
gNextGameState = MODS_BOOT_STATE;
#endif
@ -568,7 +568,30 @@ void Game_Update(void) {
if ((gGameState == GSTATE_PLAY) && gVersusMode) {
Versus_Draw();
}
func_fade_80084688(0, D_ctx_80177C50);
Wipe_Draw(WIPE_CIRCULAR, gCircleWipeFrame);
// {
// static mode = 0;
// if(gControllerPress[gMainController].button & L_TRIG) {
// mode = 1 - mode;
// }
// if(gControllerHold[gMainController].button & L_TRIG) {
// if(mode) {
// gCircleWipeFrame++;
// } else {
// gCircleWipeFrame--;
// }
// if(gCircleWipeFrame > 41) {
// gCircleWipeFrame = 41;
// } else if (gCircleWipeFrame < 0) {
// gCircleWipeFrame = 0;
// }
// }
// RCP_SetupDL(&gMasterDisp, 0x53);
// gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255);
// Graphics_Printf("FADE PROGRESS: %d", gCircleWipeFrame);
// Graphics_DisplaySmallText(14, 9, 1.0f, 1.0f, D_801619A0);
// }
if (!partialFill) {
Graphics_FillRectangle(&gMasterDisp, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1, gFillScreenRed,
gFillScreenGreen, gFillScreenBlue, gFillScreenAlpha);

View File

@ -328,7 +328,7 @@ void func_hud_80085944(void) {
}
if ((D_80161900[4] == 0) && (gGoldRingCount[0] > gGoldRingCount[1])) {
gGoldRingCount[1] += 1; // needs to be += 1
gGoldRingCount[1] += 1; // can't be ++
if ((i = gGoldRingCount[1] % 3) == 0) {
i = 3;
@ -724,7 +724,7 @@ void HUD_DrawLevelStartStatusScreen(void) {
f32 temp;
if ((gPlayState != PLAY_PAUSE) && (gLevelStartStatusScreenTimer != 0)) {
gLevelStartStatusScreenTimer -= 1;
gLevelStartStatusScreenTimer--;
}
if (gLevelStartStatusScreenTimer == 1) {
@ -1490,7 +1490,7 @@ void func_hud_80088970(void) {
gNextGameStateTimer = 2;
gOptionMenuStatus = OPTION_WAIT;
gDrawMode = DRAW_NONE;
D_game_80161A34 = 7;
gLastGameState = GSTATE_PLAY;
gStarCount = 0;
break;
} else {
@ -2010,7 +2010,7 @@ s32 func_hud_8008A4DC(void) {
return 0;
}
if (D_ctx_80177AB0 >= 5) {
if (gDrawBackdrop >= 5) {
return 0;
}
@ -2066,7 +2066,7 @@ s32 func_hud_8008A4DC(void) {
y = 162.000f;
x1 += D_800D1E10 * temp3;
} else {
if ((D_ctx_80177E7C == 0) || (D_versus_80178750 != 0)) {
if ((gVsMatchStart == 0) || (D_versus_80178750 != 0)) {
return 0;
}
temp2 = 13000.00f;
@ -2460,7 +2460,7 @@ s32 func_hud_8008B774(void) {
(gCurrentLevel == LEVEL_SECTOR_Y))) {
for (i = 0; i < ARRAY_COUNT(gActors); i++) {
if ((gActors[i].obj.status == OBJ_ACTIVE) && (gActors[i].iwork[12] == temp)) {
if ((gActors[i].unk_0B4 == EVID_2) || (gActors[i].unk_0B4 == EVID_43) ||
if ((gActors[i].eventType == EVID_2) || (gActors[i].eventType == EVID_TEAMMATE) ||
((gActors[i].obj.id == OBJ_ACTOR_TEAM_BOSS) &&
((gActors[i].aiType == AI360_FALCO) || (gActors[i].aiType == AI360_SLIPPY) ||
(gActors[i].aiType == AI360_PEPPY)))) {
@ -2742,7 +2742,7 @@ void func_hud_8008C6F4(s32 idx, s32 arg1) {
Matrix_Push(&gGfxMatrix);
if (gPlayer[0].cockpitView) {
if (gPlayer[0].alternateView) {
Matrix_RotateZ(gGfxMatrix, M_DTOR * gPlayer[0].camRoll, MTXF_APPLY);
}
@ -2775,7 +2775,8 @@ void HUD_DrawEdgeArrows(void) {
s32 i;
s32 j;
if ((gPlayer[gPlayerNum].flags_228 != 0) && (gPlayer[gPlayerNum].timer_210 == 0) && (gPlayState != PLAY_PAUSE)) {
if ((gPlayer[gPlayerNum].flags_228 != 0) && (gPlayer[gPlayerNum].pathChangeTimer == 0) &&
(gPlayState != PLAY_PAUSE)) {
j = gPlayer[gPlayerNum].flags_228;
for (i = 0; i < 12; i++) {
@ -2828,19 +2829,19 @@ void func_hud_8008CBE4(void) {
break;
case 1:
if (D_ctx_80177E7C == 0) {
if (gVsMatchStart == 0) {
D_80161758 = 0;
break;
}
if (D_80161760[gPlayerNum]) {
if (D_80161760[gPlayerNum] != 0) {
D_80161760[gPlayerNum]--;
if (D_80161760[gPlayerNum] & 4) {
if ((D_80161760[gPlayerNum] & 4) != 0) {
break;
}
}
for (i = 0; i < D_ctx_80177DB8[gPlayerNum]; i++) {
for (i = 0; i < gVsPoints[gPlayerNum]; i++) {
if (D_80161748[gPlayerNum] < (i + 1)) {
if (((i + 1) != 1) && ((i + 1) == (gVsPointsToWin - 1))) {
D_80161760[gPlayerNum] = 50;
@ -2853,12 +2854,12 @@ void func_hud_8008CBE4(void) {
if ((D_80161748[gPlayerNum] == (i + 1)) && (D_80161738[gPlayerNum] != 0)) {
D_80161738[gPlayerNum]--;
if (D_80161738[gPlayerNum] & 4) {
if ((D_80161738[gPlayerNum] & 4) != 0) {
continue;
}
}
j = D_ctx_80177DD0[gPlayerNum][i];
j = gVsKills[gPlayerNum][i];
RCP_SetupDL(&gMasterDisp, 0x4D);
@ -3010,7 +3011,7 @@ void func_hud_8008D984(void) {
D_800D2190[gPlayerNum]--;
}
if ((D_800D2190[gPlayerNum] & 2) || ((D_800D2190[gPlayerNum] == 0) && (gBombCount[gPlayerNum] != 0))) {
if (((D_800D2190[gPlayerNum] & 2) != 0) || ((D_800D2190[gPlayerNum] == 0) && (gBombCount[gPlayerNum] != 0))) {
RCP_SetupDL_78();
if (gBombCount[gPlayerNum] >= 2) {
if (Math_SmoothStepToF(&D_800D21A4, D_800D21A0, 0.4f, 100.0f, 0.1f) == 0.0f) {
@ -3029,7 +3030,7 @@ void func_hud_8008D984(void) {
}
void func_hud_8008DC34(void) {
if ((D_ctx_80177E7C != 0) && (D_versus_80178750 == 0)) {
if ((gVsMatchStart != 0) && (D_versus_80178750 == 0)) {
func_hud_8008D250();
func_hud_8008D7F4();
func_hud_8008D4F0(0, 0);
@ -3273,7 +3274,7 @@ void func_hud_8008E620(f32 arg0, f32 arg1) {
break;
}
if (gMedalFlashTimer) {
if (gMedalFlashTimer != 0) {
gMedalFlashTimer--;
}
@ -3687,7 +3688,7 @@ void func_hud_8008FFF0(Boss* boss, s32 arg1) {
i = RAND_INT(36.0f);
if (!(gGameFrameCount & 2)) {
if ((gGameFrameCount & 2) == 0) {
func_effect_8007C120(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, 0.3f * temp, 20);
}
@ -3861,8 +3862,8 @@ bool func_hud_80090A00(Actor* actor) {
actor->fwork[8] = 0.0f;
actor->fwork[7] = 360.0f;
actor->timer_0BC = 8;
actor->unk_0F4.y = 100.0f;
actor->unk_0F4.x = 300.0f;
actor->rot_0F4.y = 100.0f;
actor->rot_0F4.x = 300.0f;
actor->iwork[4] = 1;
actor->iwork[5] = 1;
@ -4156,7 +4157,7 @@ bool func_hud_800915FC(Actor* actor) {
Scenery360* scenery360;
bool ret = false;
Math_Vec3fFromAngles(&vec, 0.0f, actor->unk_0F4.y, 650.0f + actor->fwork[9] * 10.0f);
Math_Vec3fFromAngles(&vec, 0.0f, actor->rot_0F4.y, 650.0f + actor->fwork[9] * 10.0f);
if (gLevelMode == LEVELMODE_ALL_RANGE) {
for (i = 0, scenery360 = &gScenery360[0]; i < 200; i++, scenery360++) {
@ -4230,8 +4231,8 @@ bool func_hud_80091864(Actor* actor) {
actor->iwork[0] = 0;
}
sp3C = Math_SmoothStepToAngle(&actor->unk_0F4.y, sp40, 0.5f, actor->fwork[2], 0.001f) * 30.0f;
Math_SmoothStepToAngle(&actor->unk_0F4.x, sp44, 0.5f, actor->fwork[2], 0.0001f);
sp3C = Math_SmoothStepToAngle(&actor->rot_0F4.y, sp40, 0.5f, actor->fwork[2], 0.001f) * 30.0f;
Math_SmoothStepToAngle(&actor->rot_0F4.x, sp44, 0.5f, actor->fwork[2], 0.0001f);
sp2C = sp28 = 0.0f;
if (sp3C < 0.0f) {
@ -4265,8 +4266,8 @@ bool func_hud_80091864(Actor* actor) {
bool func_hud_80091B90(Actor* actor) {
Vec3f vec;
actor->obj.rot.x = -actor->unk_0F4.x;
actor->obj.rot.y = actor->unk_0F4.y;
actor->obj.rot.x = -actor->rot_0F4.x;
actor->obj.rot.y = actor->rot_0F4.y;
Math_SmoothStepToF(&actor->fwork[0], actor->fwork[1], 0.2f, 1.0f, 0.0f);
Math_SmoothStepToF(&actor->fwork[2], actor->fwork[3], 1.0f, 1.0f, 0.0f);
@ -4345,7 +4346,7 @@ bool func_hud_80091F00(Actor* actor) {
AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, actor->sfxSource, 4);
func_effect_8007D10C(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 1.5f);
Matrix_RotateY(gCalcMatrix, actor->unk_0F4.y * M_DTOR, MTXF_NEW);
Matrix_RotateY(gCalcMatrix, actor->rot_0F4.y * M_DTOR, MTXF_NEW);
if (Rand_ZeroOne() < 0.5f) {
sp40.x = -20.0f;
@ -4420,7 +4421,7 @@ void func_hud_80092244(Actor* actor) {
gRadarMarks[actor->index].pos.x = actor->obj.pos.x;
gRadarMarks[actor->index].pos.y = actor->obj.pos.y;
gRadarMarks[actor->index].pos.z = actor->obj.pos.z;
gRadarMarks[actor->index].yRot = actor->unk_0F4.y + 180.0f;
gRadarMarks[actor->index].yRot = actor->rot_0F4.y + 180.0f;
}
void func_hud_800922F4(Actor* actor) {
@ -4438,7 +4439,7 @@ void func_hud_800922F4(Actor* actor) {
temp = 64 - 1;
}
if (!(gGameFrameCount & temp)) {
if ((gGameFrameCount & temp) == 0) {
func_effect_8007D10C(actor->obj.pos.x + RAND_FLOAT_CENTERED(10.0f), actor->obj.pos.y + RAND_FLOAT(10.0f),
actor->obj.pos.z + RAND_FLOAT_CENTERED(10.0f), 2.2f);
}
@ -4495,8 +4496,8 @@ bool func_hud_800924E0(Actor* actor) {
Math_SmoothStepToAngle(&actor->obj.rot.z, 0.0f, 0.1f, 5.0f, 0.0f);
actor->obj.rot.x = actor->vwork[29].x + (360.0f - actor->fwork[19]);
Matrix_RotateY(gCalcMatrix, actor->unk_0F4.y * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, -(M_DTOR * ((actor->unk_0F4.x + actor->vwork[29].x) + actor->fwork[19])),
Matrix_RotateY(gCalcMatrix, actor->rot_0F4.y * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, -(M_DTOR * ((actor->rot_0F4.x + actor->vwork[29].x) + actor->fwork[19])),
MTXF_APPLY);
src.z = actor->fwork[1];
@ -4577,14 +4578,14 @@ bool func_hud_800927A0(Actor* actor) {
Math_SmoothStepToF(&actor->fwork[20], 0.0f, 0.1f, 15.0f, 0.0f);
if (actor->fwork[19] > 180.0f) {
actor->unk_0F4.y += 180.0f;
if (actor->unk_0F4.y >= 360.0f) {
actor->unk_0F4.y = actor->unk_0F4.y - 360.0f;
actor->rot_0F4.y += 180.0f;
if (actor->rot_0F4.y >= 360.0f) {
actor->rot_0F4.y = actor->rot_0F4.y - 360.0f;
}
actor->fwork[19] -= 180.0f;
if ((sp50 - actor->unk_0F4.y) < 180.0f) {
if ((sp50 - actor->rot_0F4.y) < 180.0f) {
actor->fwork[20] = 180.0f;
} else {
actor->fwork[20] = -180.0f;
@ -4609,7 +4610,7 @@ bool func_hud_800927A0(Actor* actor) {
Math_SmoothStepToF(&actor->fwork[27], -sp54, 0.3f, 100.0f, 0.0f);
if (actor->unk_04A != 0) {
Math_SmoothStepToAngle(&actor->unk_0F4.y, sp50, 0.1f, 2.0f, 0.0f);
Math_SmoothStepToAngle(&actor->rot_0F4.y, sp50, 0.1f, 2.0f, 0.0f);
}
if (actor->obj.pos.y < gPlayer[0].pathHeight) {
@ -4632,12 +4633,12 @@ bool func_hud_800927A0(Actor* actor) {
}
actor->obj.rot.x = actor->vwork[29].x - actor->fwork[19];
actor->obj.rot.y = actor->unk_0F4.y;
actor->obj.rot.y = actor->rot_0F4.y;
actor->obj.rot.z = actor->vwork[29].z + actor->fwork[20];
actor->obj.pos.y += actor->fwork[28];
Matrix_RotateY(gCalcMatrix, actor->unk_0F4.y * M_DTOR, 0U);
Matrix_RotateX(gCalcMatrix, -(M_DTOR * (actor->unk_0F4.x + actor->vwork[29].x + actor->fwork[19])), MTXF_APPLY);
Matrix_RotateY(gCalcMatrix, actor->rot_0F4.y * M_DTOR, 0U);
Matrix_RotateX(gCalcMatrix, -(M_DTOR * (actor->rot_0F4.x + actor->vwork[29].x + actor->fwork[19])), MTXF_APPLY);
src.z = actor->fwork[1];
src.y = 0.0f;
@ -4671,7 +4672,7 @@ void ActorTeamBoss_Init(Actor* actor) {
actor->iwork[11] = 1;
if (gLevelType == LEVELTYPE_PLANET) {
actor->unk_0C9 = 1;
actor->drawShadow = true;
}
AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4);
@ -4769,9 +4770,9 @@ void func_hud_80093164(Actor* actor) {
Player* player = &gPlayer[0];
if (actor->state == 0) {
switch (actor->unk_0B6) {
switch (actor->animFrame) {
case 1:
if ((player->state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO) || (actor->unk_0B6 != 1)) {
if ((player->state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO) || (actor->animFrame != 1)) {
if (gCsFrameCount > 1588) {
actor->fwork[0] = 5.0f;
} else {
@ -4794,8 +4795,8 @@ void func_hud_80093164(Actor* actor) {
}
}
Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + 180.0f) * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, -(actor->unk_0F4.x * M_DTOR), MTXF_APPLY);
Matrix_RotateY(gCalcMatrix, (actor->rot_0F4.y + 180.0f) * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, -(actor->rot_0F4.x * M_DTOR), MTXF_APPLY);
src.x = 0.0f;
src.y = 0.0f;
src.z = actor->fwork[0];
@ -4803,9 +4804,9 @@ void func_hud_80093164(Actor* actor) {
actor->vel.x = dest.x;
actor->vel.y = dest.y;
actor->vel.z = dest.z;
actor->obj.rot.x = -actor->unk_0F4.x;
actor->obj.rot.y = actor->unk_0F4.y + 180.0f;
actor->obj.rot.z = -actor->unk_0F4.z;
actor->obj.rot.x = -actor->rot_0F4.x;
actor->obj.rot.y = actor->rot_0F4.y + 180.0f;
actor->obj.rot.z = -actor->rot_0F4.z;
}
void func_hud_80093310(void) {
@ -4816,7 +4817,7 @@ void func_hud_80093310(void) {
this->obj.pos.x = 0.0f;
this->obj.pos.y += 1700.0f;
this->obj.pos.z -= 5000.0f;
gActors[0].unk_0B6 = 1;
gActors[0].animFrame = 1;
if (1) {}
this->obj.id = OBJ_ACTOR_CUTSCENE;
Object_SetInfo(&this->info, this->obj.id);
@ -4917,7 +4918,7 @@ void HUD_AquasStart(Player* player) {
case 0:
func_hud_80093310();
gCsFrameCount = 0;
D_ctx_80177AB0 = 1;
gDrawBackdrop = 1;
gAqDrawMode = 1;
player->unk_234 = 0;
player->csState = 1;
@ -4940,7 +4941,7 @@ void HUD_AquasStart(Player* player) {
D_801616A0.y = 124.17f;
D_801616A0.z = 0.00f;
actor->unk_0F4.y = 30.0f;
actor->rot_0F4.y = 30.0f;
D_ctx_80177A48[5] = 14.0f;
D_ctx_80177A48[0] = 0.2f;
@ -5076,7 +5077,7 @@ void HUD_AquasStart(Player* player) {
player->csState = 3;
D_ctx_80177AB0 = 0;
gDrawBackdrop = 0;
player->camRoll = 60.0f;
player->csTimer = 1000;
@ -5133,8 +5134,8 @@ void HUD_AquasStart(Player* player) {
D_ctx_80177A48[0] = 0.0f;
temp2 = 0.0f;
if (D_ctx_80177A10[9]) {
D_ctx_80177A10[9] -= 1;
if (D_ctx_80177A10[9] != 0) {
D_ctx_80177A10[9]--;
temp = D_ctx_80177A10[9];
if (temp > 20.0f) {
temp = 20.0f;
@ -5461,7 +5462,7 @@ void func_hud_80094D20(f32 x, f32 y) {
boolTemp = true;
}
if ((!boolTemp) && (xScale != 0.0f)) {
if (!boolTemp && (xScale != 0.0f)) {
TextureRect_8bIA(&gMasterDisp, D_800D24DC[0], 16, 15, x1, y1, xScale, 1.0f);
}
@ -5525,7 +5526,7 @@ void func_hud_80095350(Actor* actor) {
Actor_Initialize(actor);
actor->obj.status = OBJ_ACTIVE;
actor->obj.id = OBJ_ACTOR_CUTSCENE;
actor->unk_0B6 = 9999;
actor->animFrame = 9999;
Object_SetInfo(&actor->info, actor->obj.id);
}
@ -5542,7 +5543,7 @@ void func_hud_800953A0(Actor* actor, s32 arg1) {
actor->obj.id = OBJ_ACTOR_CUTSCENE;
actor->obj.pos = D_800D2510[arg1];
actor->obj.pos.z -= gPathProgress;
actor->unk_0B6 = 45;
actor->animFrame = 45;
Object_SetInfo(&actor->info, actor->obj.id);
}
@ -5557,7 +5558,7 @@ void func_hud_8009546C(Actor* actor, s32 arg1) {
actor->obj.id = OBJ_ACTOR_CUTSCENE;
actor->obj.pos = D_800D2540[arg1];
actor->obj.pos.z -= gPathProgress;
actor->unk_0B6 = 46;
actor->animFrame = 46;
Object_SetInfo(&actor->info, actor->obj.id);
}
@ -5572,7 +5573,7 @@ void func_hud_80095538(Actor* actor, s32 arg1) {
actor->obj.id = OBJ_ACTOR_CUTSCENE;
actor->obj.pos = D_800D257C[arg1];
actor->obj.pos.z -= gPathProgress;
actor->unk_0B6 = 47;
actor->animFrame = 47;
Object_SetInfo(&actor->info, actor->obj.id);
}
void HUD_AquasComplete(Player* player) {
@ -5622,10 +5623,10 @@ void HUD_AquasComplete(Player* player) {
if ((gCsFrameCount >= 30) && (gCsFrameCount < 90)) {
D_ctx_80177A48[5] -= 0.6f;
if ((D_ctx_80177A48[5]) < 0.0f) {
if (D_ctx_80177A48[5] < 0.0f) {
D_ctx_80177A48[5] += 360.0f;
}
if ((D_ctx_80177A48[5]) > 360.0f) {
if (D_ctx_80177A48[5] > 360.0f) {
D_ctx_80177A48[5] -= 360.0f;
}
src.x = 1000.0f;
@ -5770,14 +5771,14 @@ void HUD_AquasComplete(Player* player) {
actor->fwork[3] = 2600.0f;
actor->fwork[7] = 0.5f;
actor->unk_0F4.y = 130.0f;
actor->rot_0F4.y = 130.0f;
src.x = actor->fwork[1];
src.y = actor->fwork[2];
src.z = actor->fwork[3];
Matrix_Translate(gCalcMatrix, player->pos.x, player->pos.y, player->trueZpos + gPathProgress, MTXF_NEW);
Matrix_RotateY(gCalcMatrix, -(M_DTOR * actor->unk_0F4.y), MTXF_APPLY);
Matrix_RotateY(gCalcMatrix, -(M_DTOR * actor->rot_0F4.y), MTXF_APPLY);
Matrix_MultVec3f(gCalcMatrix, &src, &dest);
player->cam.at.x = gCsCamAtX = player->pos.x;
@ -5830,12 +5831,12 @@ void HUD_AquasComplete(Player* player) {
}
D_ctx_80177A48[0] = 0.05f;
actor->unk_0F4.y += actor->fwork[7];
if ((actor->unk_0F4.y) < 0.0f) {
actor->unk_0F4.y += 360.0f;
actor->rot_0F4.y += actor->fwork[7];
if ((actor->rot_0F4.y) < 0.0f) {
actor->rot_0F4.y += 360.0f;
}
if ((actor->unk_0F4.y) > 360.0f) {
actor->unk_0F4.y -= 360.0f;
if ((actor->rot_0F4.y) > 360.0f) {
actor->rot_0F4.y -= 360.0f;
}
src.x = actor->fwork[1];
@ -5843,7 +5844,7 @@ void HUD_AquasComplete(Player* player) {
src.z = actor->fwork[3];
Matrix_Translate(gCalcMatrix, actor->fwork[4], actor->fwork[5], actor->fwork[6], MTXF_NEW);
Matrix_RotateY(gCalcMatrix, -(M_DTOR * actor->unk_0F4.y), MTXF_APPLY);
Matrix_RotateY(gCalcMatrix, -(M_DTOR * actor->rot_0F4.y), MTXF_APPLY);
Matrix_MultVec3f(gCalcMatrix, &src, &dest);
gCsCamEyeX = dest.x;

View File

@ -72,7 +72,7 @@ u8 Load_SceneFiles(Scene* scene) {
gSPSegment(gUnkDisp1++, segment + 1, K0_TO_PHYS(ramPtr));
ramPtr = ramPtr + SEGMENT_SIZE(scene->assets[segment]);
}
segment += 1;
segment += 1; // can't be ++
}
for (segment; segment < 15; segment += 1) {
sCurrentScene.assets[segment].start = scene->assets[segment].start;

View File

@ -23,13 +23,13 @@
#include "assets/ast_zoness.h"
UNK_TYPE D_800D2F50 = 0; // unused
s32 D_800D2F54 = 0;
f32 D_800D2F58 = 0.0f;
s32 sOverheadCam = 0;
f32 sOverheadCamDist = 0.0f;
f32 sMusicVolume = 0.0f;
f32 sVoiceVolume = 0.0f;
f32 sSfxVolume = 0.0f;
u8 gVenomHardClear = 0;
u8 D_800D2F6C[20] = {
u8 sSaveSlotFromLevel[20] = {
PLANET_CORNERIA, PLANET_METEO, PLANET_SECTOR_X, PLANET_AREA_6, PLANET_AREA_6,
PLANET_SECTOR_Y, SAVE_SLOT_VENOM_1, SAVE_SLOT_SOLAR, PLANET_ZONESS, SAVE_SLOT_VENOM_1,
PLANET_CORNERIA, PLANET_MACBETH, PLANET_TITANIA, PLANET_AQUAS, PLANET_FORTUNA,
@ -38,11 +38,11 @@ u8 D_800D2F6C[20] = {
u8 gSavedZoSearchlightStatus;
f32 gArwingSpeed;
s32 D_play_80161A58;
s32 D_play_80161A5C;
s32 D_play_80161A58; // unused
s32 D_play_80161A5C; // saved hit count for venom -> andross
u16 gScreenFlashTimer;
u16 gDropHitCountItem;
s32 D_play_80161A64;
s32 sPlayWingSplash;
Environment* sEnvironment;
#define MEM_ARRAY_ALLOCATE(arr, count) ((arr) = Memory_Allocate((count) * sizeof(*(arr))))
@ -85,7 +85,7 @@ void Play_UpdateDynaFloor(void) {
f32 sp88;
f32 sp84;
D_ctx_801782FC++;
gDynaFloorTimer++;
switch (gCurrentLevel) {
case LEVEL_SOLAR:
if ((gGameFrameCount % 2) != 0) {
@ -94,7 +94,7 @@ void Play_UpdateDynaFloor(void) {
spB4 = SEGMENTED_TO_VIRTUAL(D_SO_6004500);
}
spB0 = SEGMENTED_TO_VIRTUAL(D_SO_6022760);
spA8 = 15;
spA8 = 16 - 1;
sp90 = 70.0f;
sp8C = 0.1f;
sp88 = 2.2f;
@ -107,7 +107,7 @@ void Play_UpdateDynaFloor(void) {
spB4 = SEGMENTED_TO_VIRTUAL(D_ZO_600C780);
}
spB0 = SEGMENTED_TO_VIRTUAL(D_ZO_602AC50);
spA8 = 7;
spA8 = 8 - 1;
sp90 = 40.0f;
sp8C = 0.2f;
sp88 = 1.0f;
@ -122,7 +122,7 @@ void Play_UpdateDynaFloor(void) {
for (i = 0; i < 17 * 17; i++, var_s3++, var_s5++, var_s4++, var_s0++, var_s1++, spB0++) {
Math_SmoothStepToF(var_s3, *var_s5, sp8C, *var_s4, 0.0f);
Math_SmoothStepToF(var_s4, 100.0f, 1.0f, sp84, 0.0f);
if ((D_ctx_801782FC & spA8) == (i & spA8)) {
if ((gDynaFloorTimer & spA8) == (i & spA8)) {
*var_s5 = RAND_FLOAT(sp90);
*var_s4 = 0.0f;
}
@ -154,7 +154,8 @@ void Player_WingEffects(Player* player) {
player->xRock = SIN_DEG(player->rockPhase * 0.7f) * 0.5f;
player->bobPhase += 10.0f;
player->rockPhase += 8.0f;
if ((gLevelType == LEVELTYPE_PLANET) || ((player->cockpitView == true) && (gLevelMode == LEVELMODE_ON_RAILS))) {
if ((gLevelType == LEVELTYPE_PLANET) ||
((player->alternateView == true) && (gLevelMode == LEVELMODE_ON_RAILS))) {
player->yBob = -SIN_DEG(player->bobPhase) * 0.5f;
if ((player->wings.rightState <= WINGSTATE_BROKEN) || (player->wings.leftState <= WINGSTATE_BROKEN)) {
player->rockAngle = SIN_DEG(player->rockPhase) * 5.0f;
@ -169,7 +170,7 @@ void Player_DamageEffects(Player* player) {
s32 var_v1;
f32 sp40;
if (!player->cockpitView || (gLevelMode == LEVELMODE_ALL_RANGE)) {
if (!player->alternateView || (gLevelMode == LEVELMODE_ALL_RANGE)) {
if (player->wings.rightState <= WINGSTATE_BROKEN) {
if (((gGameFrameCount % 2U) == 0) && (gRightWingDebrisTimer[player->num] != 0)) {
func_effect_8007D10C(RAND_FLOAT_CENTERED(10.0f) + player->hit1.x, RAND_FLOAT(5.0f) + player->hit1.y,
@ -204,7 +205,7 @@ void Player_DamageEffects(Player* player) {
if (player->shields > 48) {
var_v1 = 64 - 1;
}
if (!player->cockpitView || (gLevelMode == LEVELMODE_ALL_RANGE)) {
if (!player->alternateView || (gLevelMode == LEVELMODE_ALL_RANGE)) {
sp40 = 0.0f;
if (player->form == FORM_LANDMASTER) {
sp40 = 30.0f;
@ -244,7 +245,7 @@ void Player_WaterEffects(Player* player) {
Matrix_MultVec3f(gCalcMatrix, &sp48, &sp30);
if (player->pos.y < (gGroundHeight + 100.0f)) {
if ((sp3C.y < gGroundHeight + 80.0f) && ((gGameFrameCount % 2) == 0)) {
if (D_play_80161A64) {}
if (sPlayWingSplash) {}
func_effect_8007ACE0(sp3C.x, gGroundHeight, sp3C.z, 0.1f, 2.0f,
player->rot.y + player->yRot_114 + 20.0f);
}
@ -254,12 +255,12 @@ void Player_WaterEffects(Player* player) {
}
}
if ((sp30.y < gGroundHeight + 80.0f) || (sp3C.y < gGroundHeight + 80.0f)) {
if (D_play_80161A64 == 0) {
D_play_80161A64 = 1;
if (!sPlayWingSplash) {
sPlayWingSplash = true;
AUDIO_PLAY_SFX(NA_SE_SPLASH_LEVEL_S, player->sfxSource, 0);
}
} else {
D_play_80161A64 = 0;
sPlayWingSplash = false;
Audio_KillSfxBySourceAndId(player->sfxSource, NA_SE_SPLASH_LEVEL_S);
}
}
@ -655,8 +656,8 @@ void Play_ClearObjectData(void) {
Object_Kill(&gPlayerShots[i].obj, gPlayerShots[i].sfxSource);
PlayerShot_Initialize(&gPlayerShots[i]);
}
D_ctx_801782B8 = D_ctx_801782BC = D_ctx_801782C0 = D_ctx_801782D0 = gBossActive = D_ctx_8017828C = D_ctx_8017812C =
gPrevEventActorIndex = gFormationLeaderIndex = gRingPassCount = 0;
gDrawSmallRocks = D_ctx_801782BC = D_ctx_801782C0 = D_ctx_801782D0 = gBossActive = gKillEventActors =
gGroundClipMode = gPrevEventActorIndex = gFormationLeaderIndex = gRingPassCount = 0;
gFormationInitPos.x = gFormationInitPos.y = gFormationInitPos.z = gFormationInitRot.x = gFormationInitRot.y =
gFormationInitRot.z = 0.0f;
for (i = 0; i < ARRAY_COUNT(gTeamArrowsViewPos); i++) {
@ -688,7 +689,7 @@ void Play_UpdateFillScreen(void) {
Math_SmoothStepToF(&gLight3Brightness, 0.0f, 1.0f, 0.04f, 0.001f);
if (gScreenFlashTimer != 0) {
gScreenFlashTimer--;
if (gScreenFlashTimer & 2) {
if ((gScreenFlashTimer & 2) != 0) {
gFillScreenRed = 255;
gFillScreenGreen = 255;
gFillScreenBlue = 255;
@ -836,7 +837,7 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) {
if (player->unk_1A4 > 40) {
sp34 = (player->boostSpeed * 0.3f) + 20.0f;
player->timer_498 = 5;
} else if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (gBossActive == 0)) {
} else if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && !gBossActive) {
player->timer_498 = 3;
} else if ((gCurrentLevel == LEVEL_VENOM_1) || (gCurrentLevel == LEVEL_AQUAS)) {
player->timer_498 = 5;
@ -1919,14 +1920,14 @@ void Player_CollisionCheck(Player* player) {
Player_ApplyDamage(player, temp_v0, actor->info.damage);
}
} else if (actor->obj.id == OBJ_ACTOR_EVENT) {
if (actor->unk_0B4 == EVID_42) {
if (actor->eventType == EVID_42) {
temp_v0 = Player_CheckPolyCollision(player, ACTOR_EVENT_ID, actor->obj.pos.x, actor->obj.pos.y,
actor->obj.pos.z, actor->obj.rot.x, actor->obj.rot.y,
actor->obj.rot.z);
if (temp_v0 != 0) {
Player_ApplyDamage(player, temp_v0, actor->info.damage);
}
} else if (actor->unk_0B4 == EVID_63) {
} else if (actor->eventType == EVID_63) {
spfD4.x = fabsf(actor->obj.pos.x - player->pos.x);
spfD4.y = fabsf(actor->obj.pos.y - player->pos.y);
spfD4.z = fabsf(actor->obj.pos.z - player->trueZpos);
@ -1938,9 +1939,9 @@ void Player_CollisionCheck(Player* player) {
temp_v0 = Player_CheckHitboxCollision(
player, actor->info.hitbox, &sp98, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z,
actor->obj.rot.x, actor->obj.rot.y, actor->obj.rot.z, actor->vwork[29].x,
actor->vwork[29].y, actor->vwork[29].z + actor->unk_0F4.z);
actor->vwork[29].y, actor->vwork[29].z + actor->rot_0F4.z);
if (temp_v0 != 0) {
if ((temp_v0 < 0) && (actor->unk_0B4 == EVID_38)) {
if ((temp_v0 < 0) && (actor->eventType == EVID_SX_WARP_GATE)) {
actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SX_6032328);
if (gRingPassCount >= 0) {
actor->unk_046 = 2;
@ -2019,7 +2020,7 @@ void Player_CollisionCheck(Player* player) {
if (temp_v0 != 0) {
if ((sprite->obj.id == OBJ_SPRITE_FO_POLE) || (sprite->obj.id == OBJ_SPRITE_CO_POLE) ||
(sprite->obj.id == OBJ_SPRITE_TI_CACTUS) || (sprite->obj.id == OBJ_SPRITE_CO_TREE)) {
sprite->unk_46 = 1;
sprite->destroy = 1;
player->hitTimer = 6;
player->unk_21C = 0;
} else {
@ -2422,8 +2423,8 @@ void Play_InitLevel(void) {
}
break;
case LEVEL_VENOM_ANDROSS:
D_ctx_80177A98 = 0;
D_ctx_80177AB0 = 6;
gDrawGround = false;
gDrawBackdrop = 6;
D_Andross_801A7F58 = D_Andross_801A7F60 = D_Andross_801A7F68 = D_Andross_801A7F70 = D_Andross_801A7F78 =
0.0f;
break;
@ -2441,12 +2442,12 @@ void Play_InitLevel(void) {
Macbeth_80199920();
break;
case LEVEL_ZONESS:
MEM_ARRAY_ALLOCATE(D_ctx_801782C4, 200);
ptr = (u8*) D_ctx_801782C4;
for (i = 0; i < 200 * sizeof(*D_ctx_801782C4); i++, ptr++) {
MEM_ARRAY_ALLOCATE(gZOSnakePosRots, 200);
ptr = (u8*) gZOSnakePosRots;
for (i = 0; i < 200 * sizeof(*gZOSnakePosRots); i++, ptr++) {
*ptr = 0;
}
D_ctx_801784A4 = 0;
gZOSnakeWaypointCount = 0;
/* fallthrough */
case LEVEL_SOLAR:
gUseDynaFloor = true;
@ -2521,14 +2522,14 @@ void Player_ResetVsData(void) {
gVsMatchState = 0;
for (i = 0; i < 4; i++) {
D_ctx_80177DB8[i] = 0;
gVsPoints[i] = 0;
for (j = 0; j < 10; j++) {
D_ctx_80177DD0[i][j] = 0;
gVsKills[i][j] = 0;
}
gLaserStrength[i] = LASERS_SINGLE;
gBombCount[i] = 0;
}
D_ctx_80177E7C = D_ctx_80177E74 = 0;
gVsMatchStart = gVsMatchOver = 0;
}
void Player_InitVersus(void) {
@ -2574,9 +2575,9 @@ void Play_Init(void) {
gSceneSetup = 0;
}
gShowHud = 1;
D_ctx_80177A98 = D_ctx_80177AB0 = 1;
gAqDrawMode = D_800D2F54 = 0;
D_display_800CA230 = D_800D2F58 = 0.0f;
gDrawGround = gDrawBackdrop = 1;
gAqDrawMode = sOverheadCam = 0;
gCamDistortion = sOverheadCamDist = 0.0f;
gLevelMode = LEVELMODE_ON_RAILS;
gPathTexScroll = D_bg_8015F968 = 0.0f;
D_hud_800D1970 = gVersusMode = gHideRadio = gChangeTo360 = false;
@ -2590,10 +2591,10 @@ void Play_Init(void) {
if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (gLevelPhase == 1)) {
gLevelMode = LEVELMODE_ALL_RANGE;
}
D_ctx_80177E7C = 0;
gVsMatchStart = 0;
Play_InitEnvironment();
gDropHitCountItem = gTeamLowHealthMsgTimer = gStartAndrossFightTimer = gSoShieldsEmpty = gAllRangeEventTimer =
gAllRangeFrameCount = gBossActive = gGameFrameCount = gCameraShake = D_ctx_801782FC = gBossFrameCount =
gAllRangeFrameCount = gBossActive = gGameFrameCount = gCameraShake = gDynaFloorTimer = gBossFrameCount =
gCallTimer = gAllRangeSupplyTimer = gMissionStatus = 0;
if (gCurrentLevel == LEVEL_SECTOR_X) {
@ -2607,7 +2608,7 @@ void Play_Init(void) {
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0;
}
gScreenFlashTimer = gLight3R = gLight3G = gLight3B = D_hud_80161704 = D_hud_80161708 = gFillScreenAlpha =
D_ctx_80177C50 = gShowAllRangeCountdown = gCoUturnCount = 0;
gCircleWipeFrame = gShowAllRangeCountdown = gCoUturnCount = 0;
gCsFrameCount = 0;
gFillScreenAlpha = gFillScreenAlphaTarget = 255;
@ -2616,12 +2617,12 @@ void Play_Init(void) {
gLight3Brightness = 0.0f;
gWarpZoneBgAlpha = 0.0f;
gGroundHeight = 0.0f;
gStarWarpDistortion = gStarfieldX = gStarfieldY = gStarfieldRoll = D_ctx_8017842C = D_ctx_80178430 = 0.0f;
gStarWarpDistortion = gStarfieldX = gStarfieldY = gStarfieldRoll = gStarfieldScrollX = gStarfieldScrollY = 0.0f;
if ((gLevelType == LEVELTYPE_SPACE) || (gCurrentLevel == LEVEL_TRAINING)) {
Play_SetupStarfield();
if (gCurrentLevel != LEVEL_TRAINING) {
D_ctx_80177A98 = 0;
gDrawGround = false;
}
} else {
gStarCount = 0;
@ -3244,7 +3245,7 @@ void Player_UpdatePath(Player* player) {
if (gGroundType == 4) {
gPathGroundScroll = player->zPathVel;
}
if ((gBossActive == 0) && (player->zPath > 500000.0f)) {
if (!gBossActive && (player->zPath > 500000.0f)) {
player->zPath = 0.0f;
player->pos.z = 0.0f;
gObjectLoadIndex = 0;
@ -3276,10 +3277,10 @@ void Player_UpdatePath(Player* player) {
gPathVelX = Math_SmoothStepToF(&player->xPath, player->xPathTarget, 0.1f, player->pathStep, 0.0001f);
gPathVelY = Math_SmoothStepToF(&player->yPath, player->yPathTarget, 0.1f, player->pathStep, 0.0001f);
}
if (player->timer_210 != 0) {
player->timer_210--;
Math_SmoothStepToF(&player->yRot_114, player->yRot_118, 0.03f, 0.5f, 0.0001f);
Math_SmoothStepToF(&player->xRot_120, player->xRot_124, 0.03f, 0.5f, 0.0001f);
if (player->pathChangeTimer != 0) {
player->pathChangeTimer--;
Math_SmoothStepToF(&player->yRot_114, player->pathChangeYaw, 0.03f, 0.5f, 0.0001f);
Math_SmoothStepToF(&player->xRot_120, player->pathChangePitch, 0.03f, 0.5f, 0.0001f);
} else {
Math_SmoothStepToF(&player->yRot_114, 0.0f, 0.03f, 0.5f, 0.0001f);
Math_SmoothStepToF(&player->xRot_120, 0.0f, 0.03f, 0.5f, 0.0001f);
@ -3328,7 +3329,7 @@ void Player_CheckBounds360(Player* player) {
var_fv1 = 10000.0f;
} else if (gCurrentLevel == LEVEL_SECTOR_Z) {
var_fv1 = 20000.0f;
} else if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (D_ctx_80177AB0 >= 4)) {
} else if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (gDrawBackdrop >= 4)) {
var_fv1 = 100000.0f;
}
if ((var_fv1 < fabsf(player->pos.x)) || (var_fv1 < fabsf(player->pos.z))) {
@ -3341,7 +3342,7 @@ void Player_CheckBounds360(Player* player) {
}
}
void Player_ArwingMove360(Player* player) {
void Player_MoveArwing360(Player* player) {
f32 sp7C;
f32 sp78;
f32 scale;
@ -3507,8 +3508,8 @@ void Player_PerformLoop(Player* player) {
player->unk_018 = 0.05f;
player->unk_014 = 0.05f;
} else {
player->cockpitView = player->savedCockpitView;
if (player->cockpitView) {
player->alternateView = player->savedAlternateView;
if (player->alternateView) {
player->unk_014 = 0.0f;
}
}
@ -3538,7 +3539,7 @@ void Player_PerformLoop(Player* player) {
Player_DamageEffects(player);
}
void Player_ArwingMoveOnRails(Player* player) {
void Player_MoveArwingOnRails(Player* player) {
f32 stickX;
f32 stickY;
f32 var_fa0;
@ -3567,7 +3568,7 @@ void Player_ArwingMoveOnRails(Player* player) {
Math_SmoothStepToAngle(&player->aerobaticPitch, 0.0f, 0.1f, 5.0f, 0.01f);
if (player->cockpitView) {
if (player->alternateView) {
Matrix_RotateZ(gCalcMatrix, player->zRotBank * M_DTOR, MTXF_NEW);
sp68.z = 0.0f;
@ -3736,7 +3737,7 @@ void Player_ArwingMoveOnRails(Player* player) {
Player_WingEffects(player);
}
void Player_TankMove360(Player* player) {
void Player_MoveTank360(Player* player) {
f32 sp5C;
f32 var_fa0;
f32 var_fa1;
@ -3880,7 +3881,7 @@ void Player_OnFootUpdateSpeed(Player* player) {
Math_SmoothStepToF(&player->unk_008, sp28, 0.1f, sp24, 0.00001f);
}
void Player_OnFootMove(Player* player) {
void Player_MoveOnFoot(Player* player) {
Vec3f sp78[30];
f32 sp74;
f32 sp70;
@ -4181,7 +4182,7 @@ void Player_Setup(Player* playerx) {
if (gCurrentLevel != LEVEL_CORNERIA) {
gSavedGroundSurface = SURFACE_GRASS;
}
gGoldRingCount[0] = D_ctx_80161A94[0];
gGoldRingCount[0] = gSavedGoldRingCount[0];
do {
if (gGoldRingCount[0] > 3) {
gGoldRingCount[0] -= 3;
@ -4231,7 +4232,7 @@ void Player_Setup(Player* playerx) {
player->cam.eye.y = (player->pos.y * player->unk_148) + 10.0f;
player->cam.eye.x = player->pos.x * player->unk_148;
gPlayerCamAt.x = gPlayerCamAt.y = gPlayerCamAt.z = gPlayerCamEye.x = gPlayerCamEye.y = gPlayerCamEye.z = 0.0f;
gPlayCamAt.x = gPlayCamAt.y = gPlayCamAt.z = gPlayCamEye.x = gPlayCamEye.y = gPlayCamEye.z = 0.0f;
if (gVersusMode) {
gLaserStrength[gPlayerNum] = LASERS_SINGLE;
@ -4337,7 +4338,7 @@ void Player_Setup(Player* playerx) {
}
if (gCurrentLevel == LEVEL_BOLSE) {
D_ctx_80177A98 = 1;
gDrawGround = true;
}
if ((gCurrentLevel == LEVEL_MACBETH) && (gSavedObjectLoadIndex == 0)) {
@ -4407,7 +4408,7 @@ void Player_Setup(Player* playerx) {
gStarWolfTeamAlive[j] = gSavedStarWolfTeamAlive[j] = 1;
}
gLaserStrength[gPlayerNum] = LASERS_SINGLE;
gGoldRingCount[0] = D_ctx_80161A94[0] = gTotalHits = 0;
gGoldRingCount[0] = gSavedGoldRingCount[0] = gTotalHits = 0;
gLifeCount[gPlayerNum] = 2;
gBombCount[gPlayerNum] = 3;
gGreatFoxIntact = true;
@ -4623,7 +4624,7 @@ void Player_ArwingBoost(Player* player) {
if (gLoopBoostTimers[gPlayerNum] != 0) {
gLoopBoostTimers[gPlayerNum]--;
}
if (!player->somersault && (D_ctx_80177AB0 < 5)) {
if (!player->somersault && (gDrawBackdrop < 5)) {
if (var >= -50) {
gLoopDownTimers[gPlayerNum] = 5;
}
@ -4631,8 +4632,8 @@ void Player_ArwingBoost(Player* player) {
(gLoopBoostTimers[gPlayerNum] != 0)) {
player->somersault = true;
if (gLevelMode == LEVELMODE_ON_RAILS) {
player->savedCockpitView = player->cockpitView;
player->cockpitView = false;
player->savedAlternateView = player->alternateView;
player->alternateView = false;
}
player->unk_014 = player->unk_018 = 0.0f;
if (player->aerobaticPitch > 340.0f) {
@ -4752,7 +4753,7 @@ void Player_ArwingBrake(Player* player) {
if (var >= -50) {
gUturnDownTimers[gPlayerNum] = 5;
}
if ((gUturnDownTimers[gPlayerNum] > 0) && (gUturnDownTimers[gPlayerNum] < 5) && (D_ctx_80177AB0 < 5) &&
if ((gUturnDownTimers[gPlayerNum] > 0) && (gUturnDownTimers[gPlayerNum] < 5) && (gDrawBackdrop < 5) &&
(gUturnBrakeTimers[gPlayerNum] != 0)) {
gUturnDownTimers[gPlayerNum] = 0;
gUturnBrakeTimers[gPlayerNum] = 0;
@ -5011,9 +5012,9 @@ void Player_UpdateEffects(Player* player) {
if (player->timer_278 != 0) {
if ((player->timer_278 % 8) == 0) {
if (player->timer_278 & 8) {
D_ctx_80177DB8[gPlayerNum]++;
gVsPoints[gPlayerNum]++;
} else {
D_ctx_80177DB8[gPlayerNum]--;
gVsPoints[gPlayerNum]--;
}
}
player->timer_278--;
@ -5147,7 +5148,7 @@ void Player_UpdateOnRails(Player* player) {
if (player->somersault) {
Player_PerformLoop(player);
} else {
Player_ArwingMoveOnRails(player);
Player_MoveArwingOnRails(player);
}
Player_UpdatePath(player);
Player_Shoot(player);
@ -5161,7 +5162,7 @@ void Player_UpdateOnRails(Player* player) {
player->vel.x *= 0.2f;
player->vel.y = 5.0f;
player->rot.x = player->rot.y = 0.0f;
player->cockpitView = 0;
player->alternateView = false;
player->csTimer = 20;
if (gLevelType == LEVELTYPE_SPACE) {
player->csTimer = 40;
@ -5200,7 +5201,7 @@ void Player_Update360(Player* player) {
if (player->somersault) {
Player_PerformLoop(player);
} else {
Player_ArwingMove360(player);
Player_MoveArwing360(player);
}
Player_Shoot(player);
Player_CollisionCheck(player);
@ -5230,7 +5231,7 @@ void Player_Update360(Player* player) {
Player_TankBoostBrake(player);
Play_dummy_800B41E0(player);
Player_UpdateTankRoll(player);
Player_TankMove360(player);
Player_MoveTank360(player);
Player_Shoot(player);
Player_CollisionCheck(player);
Player_FloorCheck(player);
@ -5244,7 +5245,7 @@ void Player_Update360(Player* player) {
break;
case FORM_ON_FOOT:
Player_OnFootUpdateSpeed(player);
Player_OnFootMove(player);
Player_MoveOnFoot(player);
Player_Shoot(player);
Player_CollisionCheck(player);
Player_FloorCheck(player);
@ -5326,7 +5327,7 @@ void Player_Update(Player* player) {
}
if (gControllerRumbleTimers[player->num] != 0) {
gControllerRumbleTimers[player->num]--;
if (((gGameFrameCount % 2) == 0)) {
if ((gGameFrameCount % 2) == 0) {
*gControllerRumble = 1;
}
}
@ -5375,9 +5376,9 @@ void Player_Update(Player* player) {
Player_LowHealthMsg(player);
player->wings.modelId = 0;
D_hud_80161704 = 255;
if ((!gVersusMode || (D_ctx_80177E7C != 0)) && !player->somersault && (gInputPress->button & U_CBUTTONS) &&
if ((!gVersusMode || (gVsMatchStart != 0)) && !player->somersault && (gInputPress->button & U_CBUTTONS) &&
((player->form == FORM_ARWING) || (gVersusMode && (player->form == FORM_LANDMASTER)))) {
if (player->cockpitView = 1 - player->cockpitView) {
if (player->alternateView = 1 - player->alternateView) {
AUDIO_PLAY_SFX(NA_SE_VIEW_MOVE_IN, gDefaultSfxSource, 4);
} else {
AUDIO_PLAY_SFX(NA_SE_VIEW_MOVE_OUT, gDefaultSfxSource, 4);
@ -5397,7 +5398,7 @@ void Player_Update(Player* player) {
if (!gVersusMode) {
Player_Update360(player);
player->unk_234 = 1;
} else if (D_ctx_80177E7C != 0) {
} else if (gVsMatchStart != 0) {
if (gPlayerInactive[player->num] == true) {
do {
sp1C4 = RAND_INT(3.9f);
@ -5407,8 +5408,8 @@ void Player_Update(Player* player) {
player->csState = 0;
Camera_FollowPlayer(player, player->attacker - 1, 1);
} else {
if (D_ctx_80177E7C == 1) {
D_ctx_80177E7C += 1;
if (gVsMatchStart == 1) {
gVsMatchStart++;
for (i = 0; i < 4; i++) {
Player_PlaySfx(gPlayer[i].sfxSource, NA_SE_ARWING_BOOST, gPlayer[i].num);
gPlayer[i].unk_190 = gPlayer[i].unk_194 = 5.0f;
@ -5453,7 +5454,7 @@ void Player_Update(Player* player) {
}
break;
case PLAYERSTATE_1C8_LEVEL_COMPLETE:
player->cockpitView = false;
player->alternateView = false;
gPauseEnabled = false;
Player_UpdateShields(player);
Cutscene_LevelComplete(player);
@ -5471,7 +5472,7 @@ void Player_Update(Player* player) {
Player_UpdateShields(player);
Cutscene_AllRangeMode(player);
Player_UpdateArwingRoll(player);
gChargeTimers[player->num] = player->cockpitView = gShowHud = 0;
gChargeTimers[player->num] = player->alternateView = gShowHud = 0;
break;
case PLAYERSTATE_1C8_GFOX_REPAIR:
gPauseEnabled = 0;
@ -5488,7 +5489,7 @@ void Player_Update(Player* player) {
player->unk_234 = 0;
if (gPlayerInactive[player->num] == true) {
Camera_FollowPlayer(player, player->attacker - 1, 0);
} else if ((D_ctx_80177E74 == 0) && (player->csState != 0)) {
} else if ((gVsMatchOver == 0) && (player->csState != 0)) {
player->csState = 0;
Player_Initialize(player);
Player_Setup(player);
@ -5534,7 +5535,7 @@ void Player_Update(Player* player) {
gShowAllRangeCountdown = gRadioState = 0;
Audio_ClearVoice();
Audio_SetEnvSfxReverb(0);
D_ctx_80161A94[0] = gGoldRingCount[0];
gSavedGoldRingCount[0] = gGoldRingCount[0];
if (gCurrentLevel == LEVEL_VENOM_ANDROSS) {
D_ctx_80177C94 = gGoldRingCount[0];
}
@ -5545,7 +5546,7 @@ void Player_Update(Player* player) {
gNextGameStateTimer = 2;
gOptionMenuStatus = OPTION_WAIT;
gDrawMode = DRAW_NONE;
D_game_80161A34 = 7;
gLastGameState = GSTATE_PLAY;
gStarCount = 0;
} else {
if ((gCurrentLevel == LEVEL_SECTOR_X) || (gCurrentLevel == LEVEL_METEO)) {
@ -5553,7 +5554,7 @@ void Player_Update(Player* player) {
}
if (gLifeCount[gPlayerNum] < 0) {
gNextGameState = GSTATE_GAME_OVER;
D_ctx_80161A94[0] = 0;
gSavedGoldRingCount[0] = 0;
} else {
gPlayState = PLAY_INIT;
}
@ -5565,7 +5566,7 @@ void Player_Update(Player* player) {
break;
case 4:
gNextGameState = GSTATE_MAP;
D_game_80161A34 = 7;
gLastGameState = GSTATE_PLAY;
gDrawMode = DRAW_NONE;
break;
default:
@ -5639,19 +5640,19 @@ void Camera_UpdateArwingOnRails(Player* player) {
gCsCamAtY = ((player->pos.y - player->yPath) * player->unk_14C) + 20.0f;
gCsCamAtY += player->xRock * 5.0f;
gCsCamAtY -= player->unk_02C * 0.25f;
switch (D_800D2F54) {
switch (sOverheadCam) {
case 0:
Math_SmoothStepToF(&D_800D2F58, 0.0f, 0.4f, 10.0f, 0);
Math_SmoothStepToF(&sOverheadCamDist, 0.0f, 0.4f, 10.0f, 0);
break;
case 1:
Math_SmoothStepToF(&D_800D2F58, 200.0f, 0.4f, 10.0f, 0);
Math_SmoothStepToF(&sOverheadCamDist, 200.0f, 0.4f, 10.0f, 0);
break;
}
gCsCamEyeX += player->xPath;
gCsCamAtX += player->xPath;
gCsCamEyeY += player->yPath + D_800D2F58;
gCsCamAtZ = (player->trueZpos + gPathProgress) - 1.0f;
gCsCamEyeZ = 400.0f + D_800D2F58;
gCsCamEyeY += player->yPath + sOverheadCamDist;
gCsCamAtZ = player->trueZpos + gPathProgress - 1.0f;
gCsCamEyeZ = 400.0f + sOverheadCamDist;
if (D_ctx_80177C70 == 2) {
gCsCamEyeZ -= 50.0f;
}
@ -5664,7 +5665,7 @@ void Camera_UpdateArwingOnRails(Player* player) {
Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, 0.2f, 20.0f, 0.0f);
Math_SmoothStepToF(&player->unk_018, 1.0f, 1.0f, 0.05f, 0.0f);
}
gCsCamAtY += player->yPath + (D_800D2F58 * 0.5f);
gCsCamAtY += player->yPath + (sOverheadCamDist * 0.5f);
Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, player->unk_014, 1000.0f, 0.0f);
Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, player->unk_018, 1000.0f, 0.0f);
Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, player->unk_014, 1000.0f, 0.0f);
@ -5801,7 +5802,7 @@ void Camera_UpdateArwing360(Player* player, s32 arg1) {
Matrix_RotateX(gCalcMatrix, player->damageShake * 0.2f * M_DTOR, MTXF_APPLY);
sp74.x = 0.0f;
sp74.y = 0.0f;
if (player->cockpitView) {
if (player->alternateView) {
sp74.z = 1000.0f - player->camDist;
} else {
sp74.z = 300.0f - player->camDist;
@ -5873,7 +5874,7 @@ void Camera_UpdateTank360(Player* player, s32 arg1) {
Matrix_RotateY(gCalcMatrix, (player->yRot_114 + (player->damageShake * 0.2f)) * M_DTOR, MTXF_APPLY);
Matrix_RotateX(gCalcMatrix, player->damageShake * 0.2f * M_DTOR, MTXF_APPLY);
sp54.x = 0.0f;
if (player->cockpitView) {
if (player->alternateView) {
sp54.y = 150.0f;
sp54.z = 500.0f - player->camDist;
} else {
@ -5881,7 +5882,7 @@ void Camera_UpdateTank360(Player* player, s32 arg1) {
sp54.z = 250.0f - player->camDist;
}
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp54, &sp48);
if (player->cockpitView) {
if (player->alternateView) {
Math_SmoothStepToF(&player->unk_02C, -player->unk_17C * 3.0f + 30.0f, 0.2f, 8.0f, 0.001f);
} else {
Math_SmoothStepToF(&player->unk_02C, -player->unk_17C * 3.0f, 0.2f, 8.0f, 0.001f);
@ -5979,8 +5980,8 @@ void Camera_SetStarfieldPos(f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32
if (gCurrentLevel == LEVEL_UNK_15) {
tempf = gPlayer[0].cam.eye.y * 0.03f;
}
sp30 = (-pitch * (-8.0f / 3.0f * M_RTOD) * 2.0f) + 3000.0f + D_ctx_80178430 + tempf;
sp34 = (yaw * (-8.0f / 3.0f * M_RTOD) * 2.0f) + 3000.0f + D_ctx_8017842C;
sp30 = (-pitch * (-8.0f / 3.0f * M_RTOD) * 2.0f) + 3000.0f + gStarfieldScrollY + tempf;
sp34 = (yaw * (-8.0f / 3.0f * M_RTOD) * 2.0f) + 3000.0f + gStarfieldScrollX;
sp20 = gStarfieldX;
gStarfieldX = Math_ModF(sp34, SCREEN_WIDTH * 1.5f);
gStarfieldY = Math_ModF(sp30, SCREEN_HEIGHT * 1.5f);
@ -6015,7 +6016,7 @@ void Camera_Update(Player* player) {
switch (gLevelMode) {
case LEVELMODE_ON_RAILS:
if (player->form == FORM_ARWING) {
if (!player->cockpitView) {
if (!player->alternateView) {
Camera_UpdateArwingOnRails(player);
} else {
Camera_UpdateCockpitOnRails(player, 0);
@ -6064,7 +6065,7 @@ void Camera_SetupLights(Player* player) {
if ((gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) {
gEnvLightyRot = gLight1yRotTarget = gLight1yRotTarget = gLight2yRotTarget = gLight1yRotTarget = 110.0f;
if (gGameFrameCount & 0x20) {
if ((gGameFrameCount & 0x20) != 0) {
gEnvLightyRot = gLight1yRotTarget = gLight1yRotTarget = gLight2yRotTarget = gLight1yRotTarget = 90.0f;
}
gLight1rotStep = gLight2rotStep = D_ctx_80178538 = 1.0f;
@ -6368,7 +6369,7 @@ void Play_SpawnVsItem(ObjectId objId, Item* item) {
u8 spawnIndex = (u8) RAND_FLOAT(5.0f);
if (sVsItemSpawnIndex == spawnIndex) {
gVsItemSpawnTimer -= 1;
gVsItemSpawnTimer--;
} else {
sVsItemSpawnIndex = spawnIndex;
if (item->obj.status == OBJ_FREE) {
@ -6458,7 +6459,7 @@ void Play_Main(void) {
Play_Update();
if ((gControllerPress[gMainController].button & START_BUTTON) &&
(gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) &&
gSaveFile.save.data.planet[D_800D2F6C[gCurrentLevel]].normalClear) {
gSaveFile.save.data.planet[sSaveSlotFromLevel[gCurrentLevel]].normalClear) {
Audio_ClearVoice();
Audio_SetEnvSfxReverb(0);
Play_ClearObjectData();

View File

@ -487,7 +487,7 @@ void func_tank_80044868(Player* player) {
}
if (player->baseSpeed > 0.0f) {
Texture_Scroll(D_landmaster_3002E80, 32, 32, 0);
if ((gCurrentLevel == LEVEL_TITANIA) && (gBossActive == 0)) {
if ((gCurrentLevel == LEVEL_TITANIA) && !gBossActive) {
func_tank_80043280(D_landmaster_3005EA8, D_TI_6009BB8, gGameFrameCount * -55.0f);
}
if ((gCurrentLevel == LEVEL_MACBETH) && (player->state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) {
@ -496,7 +496,7 @@ void func_tank_80044868(Player* player) {
}
if (player->baseSpeed > 10.0f) {
Texture_Scroll(D_landmaster_3002E80, 32, 32, 0);
if ((gCurrentLevel == LEVEL_TITANIA) && (gBossActive == 0)) {
if ((gCurrentLevel == LEVEL_TITANIA) && !gBossActive) {
func_tank_80043280(D_landmaster_3005EA8, D_TI_6009BB8, gGameFrameCount * -55.0f);
}
}
@ -1399,7 +1399,7 @@ void func_tank_800481F4(Player* player) {
temp_v0 = Player_CheckHitboxCollision(player, actor->info.hitbox, &sp98, actor->obj.pos.x,
actor->obj.pos.y, actor->obj.pos.z, actor->obj.rot.x,
actor->obj.rot.y, actor->obj.rot.z, actor->vwork[29].x,
actor->vwork[29].y, actor->vwork[29].z + actor->unk_0F4.z);
actor->vwork[29].y, actor->vwork[29].z + actor->rot_0F4.z);
if (temp_v0 != 0) {
Player_ApplyDamage(player, temp_v0, actor->info.damage);
actor->dmgType = DMG_COLLISION;
@ -1487,11 +1487,11 @@ void func_tank_800481F4(Player* player) {
if (temp_v0 != 0) {
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;
sprite->destroy = 1;
player->hitTimer = 6;
player->unk_21C = 0;
} else if (sprite->obj.id == OBJ_SPRITE_TI_CACTUS) {
sprite->unk_46 = 1;
sprite->destroy = 1;
} else {
Player_ApplyDamage(player, temp_v0, sprite->info.damage);
}

View File

@ -326,9 +326,9 @@ void func_versus_800BDE44(void) {
D_80178810[i] += 4;
if (D_80178810[i] > 15) {
if (gPlayerScores[i] > D_80178808[i]) {
D_80178808[i] += 1;
D_80178808[i] += 1; // can't be ++
} else {
D_80178808[i] -= 1;
D_80178808[i] -= 1; // can't be --
}
if (gPlayerScores[i] != D_80178808[i]) {
@ -568,13 +568,13 @@ s32 func_versus_800BEDDC(void) {
continue;
}
if (!D_80178780[i]) {
if (D_80178780[i] == 0) {
func_versus_800BE924(i);
} else {
func_versus_800BECA8(i);
}
if (D_80178780[i]) {
if (D_80178780[i] != 0) {
var_s4++;
if (var_s4 == D_801787B4) {
func_versus_800BED78();
@ -646,7 +646,7 @@ s32 func_versus_800BF17C(void) {
continue;
}
if ((gPlayerInactive[i]) || (gVsMatchType == 1) || ((D_801787B4 == 1) && (gVsMatchType != 2)) ||
if (gPlayerInactive[i] || (gVsMatchType == 1) || ((D_801787B4 == 1) && (gVsMatchType != 2)) ||
((gVsMatchType == 2) && (D_versus_80178768[0] == 0) && (D_versus_80178768[1] == 0) &&
(D_versus_80178768[2] == 0))) {
ret = Math_SmoothStepToF(&D_801787D8[i], D_801787E8[i], 0.3f, 100.0f, 1.0f);
@ -670,8 +670,8 @@ s32 func_versus_800BF17C(void) {
}
}
if (D_801787F8[i]) {
D_801787F8[i] -= 1;
if (D_801787F8[i] != 0) {
D_801787F8[i]--;
}
if (sUnlockLandmaster && (D_80178780[i] == 0) && (gControllerPress[i].button & B_BUTTON)) {
@ -791,21 +791,21 @@ s32 Versus_CheckForWinner(void) {
gVsWinner = i;
}
if (gPlayer[i].state_1C8 == PLAYERSTATE_1C8_VS_STANDBY) {
var_a3 += 1;
var_a3++;
}
}
if ((D_801787B4 == 1) && (var_a3 == 4)) {
D_ctx_80177E74 = 1;
gVsMatchOver = 1;
gVsWinner = 99;
break;
}
for (i = 0; i < 4; i++) {
if (D_ctx_80177DB8[i] == gVsPointsToWin) {
if (gVsPoints[i] == gVsPointsToWin) {
break;
}
if (D_ctx_80177DB8[i] == (gVsPointsToWin - 1)) {
if (gVsPoints[i] == (gVsPointsToWin - 1)) {
sStartVsHurryBgm = 1;
}
}
@ -814,7 +814,7 @@ s32 Versus_CheckForWinner(void) {
return 0;
}
if (gPlayer[i].timer_278) {
if (gPlayer[i].timer_278 != 0) {
return 0;
}
@ -827,7 +827,7 @@ s32 Versus_CheckForWinner(void) {
}
gPlayer[j].state_1C8 = PLAYERSTATE_1C8_VS_STANDBY;
}
D_ctx_80177E74 = 1;
gVsMatchOver = 1;
gVsWinner = i;
break;
@ -838,11 +838,11 @@ s32 Versus_CheckForWinner(void) {
gVsWinner = i;
}
if (gPlayer[i].state_1C8 == PLAYERSTATE_1C8_VS_STANDBY) {
var_a3 += 1;
var_a3++;
}
}
if ((D_801787B4 == 1) && (var_a3 == 4)) {
D_ctx_80177E74 = 1;
gVsMatchOver = 1;
gVsWinner = 99;
break;
}
@ -868,7 +868,7 @@ s32 Versus_CheckForWinner(void) {
}
gPlayer[j].state_1C8 = PLAYERSTATE_1C8_VS_STANDBY;
}
D_ctx_80177E74 = 1;
gVsMatchOver = 1;
break;
case 2:
@ -881,7 +881,7 @@ s32 Versus_CheckForWinner(void) {
if ((gPlayer[i].state_1C8 == PLAYERSTATE_1C8_DOWN) ||
(gPlayer[i].state_1C8 == PLAYERSTATE_1C8_VS_STANDBY)) {
gPlayerScores[i] = D_80178838[i] = D_80178808[i] = D_80178810[i] = 0;
D_80178820[i] += 1;
D_80178820[i]++;
}
}
}
@ -994,7 +994,7 @@ s32 Versus_CheckForWinner(void) {
gPlayer[j].state_1C8 = PLAYERSTATE_1C8_VS_STANDBY;
}
D_ctx_80177E74 = 1;
gVsMatchOver = 1;
break;
default:
@ -1064,7 +1064,7 @@ s32 func_versus_800C04DC(f32 xPos, f32 scale, s32 arg2) {
f32 x;
f32 y;
if ((gVsMatchType == 2) && (D_800D4A98 & 0x20) && (gVsWinner != 99)) {
if ((gVsMatchType == 2) && ((D_800D4A98 & 0x20) != 0) && (gVsWinner != 99)) {
x = 118.0f;
y = 110.0f;
@ -1113,7 +1113,7 @@ s32 func_versus_800C07C4(void) {
}
}
if (stick_y) {
if (stick_y != 0) {
if (stick_y > 0) {
stick_y = -1;
} else {
@ -1313,7 +1313,7 @@ bool func_versus_800C107C(s32 playerNum) {
D_80178798 = 0;
}
if (D_801787B8 < D_ctx_80177DB8[playerNum]) {
if (D_801787B8 < gVsPoints[playerNum]) {
return false;
} else {
return true;
@ -1331,7 +1331,7 @@ s32 func_versus_800C1138(s32 max, s32 arg1) {
for (i = 0; i < max; i++) {
RCP_SetupDL(&gMasterDisp, 0x4D);
j = D_ctx_80177DD0[arg1][i];
j = gVsKills[arg1][i];
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255);
gDPSetEnvColor(gMasterDisp++, D_800D4CD8[j], D_800D4CE8[j], D_800D4CF8[j], 0);
func_versus_800BD720(D_800D4CB8[arg1] + (i * 9.0f), D_800D4CC8[arg1]);
@ -1356,7 +1356,7 @@ void func_versus_800C1368(void) {
D_801787D0 = 0.0f;
D_801787AC = 255.0f;
D_801787B0 = 0.0f;
D_game_80161A10 = 0.5f;
gNextVsViewScale = 0.5f;
D_80178778 = 0;
D_80178790 = 4;
D_80178794 = 1;
@ -1413,8 +1413,8 @@ void func_versus_800C1368(void) {
bool func_versus_800C15D8(void) {
bool ret = false;
if (D_game_80161A10 >= 1.5f) {
D_game_80161A10 = 1.5f;
if (gNextVsViewScale >= 1.5f) {
gNextVsViewScale = 1.5f;
switch (gVersusStage) {
case VS_STAGE_CORNERIA:
gBgColor = 0x8FBD; // 136, 240, 240
@ -1434,7 +1434,7 @@ bool func_versus_800C15D8(void) {
}
ret = true;
} else {
D_game_80161A10 += 0.05f;
gNextVsViewScale += 0.05f;
gBgColor = 0;
}
@ -1466,7 +1466,7 @@ void func_versus_800C1700(void) {
gGameState = GSTATE_MENU;
gNextGameStateTimer = 2;
gOptionMenuStatus = OPTION_WAIT;
D_game_800D2870 = 1;
D_game_800D2870 = true;
gBgColor = 0;
}
@ -1520,7 +1520,7 @@ bool Versus_Update(void) {
break;
}
if (ret == 1) {
D_ctx_80177E7C = 1;
gVsMatchStart = 1;
}
if (func_versus_800C16A0(30)) {
gVsMatchState = 4;
@ -1765,7 +1765,7 @@ void Versus_Draw(void) {
break;
}
case 4:
if ((gVsMatchType != 2) || (!(D_800D4A98 & 0x20))) {
if ((gVsMatchType != 2) || ((D_800D4A98 & 0x20) == 0)) {
if (gVsWinner < 4) {
func_versus_800C075C();
}
@ -1800,7 +1800,7 @@ void Versus_Draw(void) {
if (var_a1 >= 121) {
var_a1 = 121;
}
func_fade_80084688(2, var_a1);
Wipe_Draw(WIPE_VERTICAL, var_a1);
}
void Versus_StartMatch(void) {
@ -1919,12 +1919,12 @@ void func_versus_800C2244(Actor* actor) {
} else if (actor->obj.pos.y < gGroundHeight + 50.0f) {
if (x3 > 180.0f) {
x3 = 0.0f;
actor->unk_0F4.x = 0.0f;
actor->rot_0F4.x = 0.0f;
}
}
Math_SmoothStepToAngle(&actor->unk_0F4.x, x3, 0.5f, 1.0f, 0.0001f);
y3 = Math_SmoothStepToAngle(&actor->unk_0F4.y, actor->fwork[19], 0.5f, 1.0f, 0.0001f) * 30.0f;
Math_SmoothStepToAngle(&actor->rot_0F4.x, x3, 0.5f, 1.0f, 0.0001f);
y3 = Math_SmoothStepToAngle(&actor->rot_0F4.y, actor->fwork[19], 0.5f, 1.0f, 0.0001f) * 30.0f;
if (y3 < 0.0f) {
y3 *= -1.0f;
@ -1935,8 +1935,8 @@ void func_versus_800C2244(Actor* actor) {
Math_SmoothStepToAngle(&actor->obj.rot.z, y3, 0.1f, 3.0f, 0.01f);
}
actor->obj.rot.x = -actor->unk_0F4.x;
actor->obj.rot.y = actor->unk_0F4.y;
actor->obj.rot.x = -actor->rot_0F4.x;
actor->obj.rot.y = actor->rot_0F4.y;
vec.z = +cosX * 38.0f;
vec.y = -sinX * 38.0f;
@ -1970,7 +1970,7 @@ void func_versus_800C26C8(void) {
Vec3f dest;
Actor* actor;
if ((gVsMatchType != 2) || (D_ctx_80177E7C == 0)) {
if ((gVsMatchType != 2) || (gVsMatchStart == 0)) {
return;
}

View File

@ -382,10 +382,10 @@ void ObjectRam_Update(void) {
if (oRamEntries[selectNum].objPtr->status != OBJ_FREE) {
gTexturedLines[99].timer = 15;
}
gTexturedLines[99].red = 255;
gTexturedLines[99].green = (editing) ? 128 : 255;
gTexturedLines[99].blue = 0;
gTexturedLines[99].alpha = 255;
gTexturedLines[99].prim.r = 255;
gTexturedLines[99].prim.g = (editing) ? 128 : 255;
gTexturedLines[99].prim.b = 0;
gTexturedLines[99].prim.a = 255;
gTexturedLines[99].posBB.x = oRamEntries[selectNum].objPtr->pos.x;
gTexturedLines[99].posBB.y = oRamEntries[selectNum].objPtr->pos.y;
gTexturedLines[99].posBB.z = oRamEntries[selectNum].objPtr->pos.z;

View File

@ -17,19 +17,17 @@ bool Ending_8018BCB0(void);
void Ending_8018C21C(void);
typedef struct {
Animation* anim;
Limb** skeleton;
s16 setupDL;
Vec3f pos;
Vec3f rot;
Vec3f scale;
f32 unk_30;
s32 unk_34;
s32 unk_38;
struct {
u8 r, g, b, a;
} prim;
} UnkStruct_196D08;
/* 0x00 */ Animation* anim;
/* 0x04 */ Limb** skeleton;
/* 0x08 */ s16 setupDL;
/* 0x0C */ Vec3f pos;
/* 0x18 */ Vec3f rot;
/* 0x24 */ Vec3f scale;
/* 0x30 */ f32 unk_30;
/* 0x34 */ s32 unk_34;
/* 0x38 */ s32 unk_38;
/* 0x3C */ Color_RGBA32 prim;
} UnkStruct_196D08; // size = 0x40
s32 D_ending_80196D00;
s32 D_ending_80196D04;
@ -313,7 +311,7 @@ void Ending_80188030(s32 arg0) {
D_ending_80196D08[i].pos.z -= sp2C;
D_ending_80196D08[i].pos.y += sp30;
if ((arg0 != 1) || (gCsFrameCount < 394)) {
D_ending_80196D08[i].unk_34 += 1;
D_ending_80196D08[i].unk_34++;
}
}
@ -611,9 +609,9 @@ void Ending_80189108(void) {
Animation_GetFrameCount(D_ending_80196D08[4].anim);
if (((gCsFrameCount >= 30) && (gCsFrameCount < 41)) || ((gCsFrameCount >= 60) && (gCsFrameCount < 111))) {
D_ending_80196D08[4].unk_34 += 1;
D_ending_80196D08[4].unk_34++;
} else if (temp_a0 != 0) {
D_ending_80196D08[4].unk_34 += 1;
D_ending_80196D08[4].unk_34++;
}
break;
@ -645,9 +643,9 @@ void Ending_80189108(void) {
Animation_GetFrameCount(D_ending_80196D08[4].anim);
if ((gCsFrameCount >= 20) && (gCsFrameCount < 51)) {
D_ending_80196D08[4].unk_34 += 1;
D_ending_80196D08[4].unk_34++;
} else if (temp_a0 != 0) {
D_ending_80196D08[4].unk_34 += 1;
D_ending_80196D08[4].unk_34++;
}
break;
}
@ -1397,9 +1395,9 @@ void Ending_8018B3E8(Actor* actor, s32 arg1) {
actor->obj.status = OBJ_ACTIVE;
actor->obj.id = 0;
actor->state = arg1;
actor->unk_0F4.x = sp20[arg1].x;
actor->unk_0F4.y = sp20[arg1].y;
actor->unk_0F4.z = sp20[arg1].z;
actor->rot_0F4.x = sp20[arg1].x;
actor->rot_0F4.y = sp20[arg1].y;
actor->rot_0F4.z = sp20[arg1].z;
actor->obj.pos = sp38[arg1];
if (arg1 == 0) {
@ -1426,9 +1424,9 @@ void Ending_8018B52C(Actor* actor, s32 arg1) {
actor->obj.status = OBJ_ACTIVE;
actor->obj.id = 1;
actor->obj.pos = sp44[arg1];
actor->unk_0F4.x = sp20[arg1].x;
actor->unk_0F4.y = sp20[arg1].y;
actor->unk_0F4.z = sp20[arg1].z;
actor->rot_0F4.x = sp20[arg1].x;
actor->rot_0F4.y = sp20[arg1].y;
actor->rot_0F4.z = sp20[arg1].z;
actor->scale = 1.0f;
}
@ -1440,9 +1438,9 @@ void Ending_8018B624(Actor* actor) {
actor->obj.status = 2;
actor->obj.id = 2;
actor->obj.pos = sp24;
actor->unk_0F4.x = sp18.x;
actor->unk_0F4.y = sp18.y;
actor->unk_0F4.z = sp18.z;
actor->rot_0F4.x = sp18.x;
actor->rot_0F4.y = sp18.y;
actor->rot_0F4.z = sp18.z;
actor->scale = 1.0f;
}
@ -1461,9 +1459,9 @@ void Ending_8018B6D8(Actor* actor, s32 arg1) {
actor->obj.status = OBJ_ACTIVE;
actor->obj.id = 3;
actor->obj.pos = sp80[arg1];
actor->unk_0F4.x = sp38[arg1].x;
actor->unk_0F4.y = sp38[arg1].y;
actor->unk_0F4.z = sp38[arg1].z;
actor->rot_0F4.x = sp38[arg1].x;
actor->rot_0F4.y = sp38[arg1].y;
actor->rot_0F4.z = sp38[arg1].z;
actor->obj.pos.x += 3200.0f;
actor->obj.pos.z -= 200.0f;
actor->scale = 1.0f;
@ -1647,8 +1645,8 @@ bool Ending_8018BCB0(void) {
break;
}
Matrix_RotateY(gCalcMatrix, (gActors[i].unk_0F4.y + 180.0f) * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, -(gActors[i].unk_0F4.x * M_DTOR), MTXF_APPLY);
Matrix_RotateY(gCalcMatrix, (gActors[i].rot_0F4.y + 180.0f) * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, -(gActors[i].rot_0F4.x * M_DTOR), MTXF_APPLY);
sp78.x = 0.0f;
sp78.y = 0.0f;
@ -1662,9 +1660,9 @@ bool Ending_8018BCB0(void) {
if (0) {} // some sort of vec_set macro?
gActors[i].obj.rot.x = -gActors[i].unk_0F4.x;
gActors[i].obj.rot.y = gActors[i].unk_0F4.y + 180.0f;
gActors[i].obj.rot.z = -gActors[i].unk_0F4.z;
gActors[i].obj.rot.x = -gActors[i].rot_0F4.x;
gActors[i].obj.rot.y = gActors[i].rot_0F4.y + 180.0f;
gActors[i].obj.rot.z = -gActors[i].rot_0F4.z;
gActors[i].obj.pos.x += gActors[i].vel.x;
gActors[i].obj.pos.y += gActors[i].vel.y;

View File

@ -77,8 +77,8 @@ void Ending_8018D250(u32 arg0, AssetInfo* asset) {
}
void Ending_8018D28C(s32 arg0, AssetInfo* asset) {
D_ctx_8017842C += asset->unk_18.x;
D_ctx_80178430 += asset->unk_18.y;
gStarfieldScrollX += asset->unk_18.x;
gStarfieldScrollY += asset->unk_18.y;
}
void Ending_8018D2C8(u32 arg0, AssetInfo* asset) {
@ -92,9 +92,9 @@ void Ending_8018D2C8(u32 arg0, AssetInfo* asset) {
alpha = (asset->unk_0C + asset->unk_10 - arg0 - 1) * 255 / asset->fogFar;
}
gFillScreenRed = asset->primRed;
gFillScreenGreen = asset->primGreen;
gFillScreenBlue = asset->primBlue;
gFillScreenRed = asset->prim.r;
gFillScreenGreen = asset->prim.g;
gFillScreenBlue = asset->prim.b;
gFillScreenAlpha = gFillScreenAlphaTarget = alpha;
gFillScreenAlphaStep = 0;
@ -115,7 +115,7 @@ void Ending_8018D398(u32 arg0, AssetInfo* asset) {
gFillScreenAlphaStep = 0;
Graphics_FillRectangle(&gMasterDisp, SCREEN_MARGIN, SCREEN_MARGIN, SCREEN_WIDTH - SCREEN_MARGIN,
SCREEN_HEIGHT - SCREEN_MARGIN, asset->primRed, asset->primGreen, asset->primBlue, alpha);
SCREEN_HEIGHT - SCREEN_MARGIN, asset->prim.r, asset->prim.g, asset->prim.b, alpha);
}
void Ending_8018D4BC(s32 arg0, AssetInfo* asset) {
@ -144,9 +144,9 @@ void Ending_8018D638(u32 arg0, AssetInfo* asset) {
alpha = (asset->unk_0C + asset->fogFar - arg0) * 255 / asset->fogFar;
}
gFillScreenRed = asset->primRed;
gFillScreenGreen = asset->primGreen;
gFillScreenBlue = asset->primBlue;
gFillScreenRed = asset->prim.r;
gFillScreenGreen = asset->prim.g;
gFillScreenBlue = asset->prim.b;
gFillScreenAlpha = gFillScreenAlphaTarget = alpha;
gFillScreenAlphaStep = 0;
@ -181,7 +181,7 @@ void Ending_8018D814(u32 arg0, AssetInfo* asset) {
RCP_SetupDL(&gMasterDisp, asset->unk_08);
gDPSetPrimColor(gMasterDisp++, 0, 0, asset->primRed, asset->primGreen, asset->primBlue, alpha);
gDPSetPrimColor(gMasterDisp++, 0, 0, asset->prim.r, asset->prim.g, asset->prim.b, alpha);
TextureRect_8bIA(&gMasterDisp, sLargeText_1997_1, 16, 15, asset->unk_18.x, asset->unk_18.y, 1.0f, 1.0f);
TextureRect_8bIA(&gMasterDisp, sLargeText_1997_9, 16, 15, asset->unk_18.x + 16.0f * 1, asset->unk_18.y, 1.0f, 1.0f);
@ -197,7 +197,7 @@ void Ending_8018DA0C(u32 arg0, AssetInfo* asset) {
}
RCP_SetupDL(&gMasterDisp, asset->unk_08);
gDPSetPrimColor(gMasterDisp++, 0, 0, asset->primRed, asset->primGreen, asset->primBlue, alpha);
gDPSetPrimColor(gMasterDisp++, 0, 0, asset->prim.r, asset->prim.g, asset->prim.b, alpha);
Graphics_DisplaySmallText((s16) asset->unk_18.x, (s16) asset->unk_18.y, asset->unk_30.x, asset->unk_30.y,
"TOTAL HITS");
@ -222,7 +222,7 @@ void Ending_8018DA0C(u32 arg0, AssetInfo* asset) {
alpha = 42 * (10 - alpha);
break;
}
gDPSetPrimColor(gMasterDisp++, 0, 0, asset->primRed, asset->primGreen, asset->primBlue, alpha);
gDPSetPrimColor(gMasterDisp++, 0, 0, asset->prim.r, asset->prim.g, asset->prim.b, alpha);
Graphics_DisplaySmallText((s16) (asset->unk_18.x + 7), (s16) (asset->unk_18.y + 31), asset->unk_30.x,
asset->unk_30.y, "RANK IN!!");
}
@ -318,9 +318,9 @@ void Ending_8018E1B8(u32 arg0, AssetInfo* asset) {
}
gSPFogPosition(gMasterDisp++, asset->fogNear, asset->fogFar);
gDPSetFogColor(gMasterDisp++, asset->fogRed, asset->fogGreen, asset->fogBlue, 0);
gDPSetEnvColor(gMasterDisp++, asset->envRed, asset->envGreen, asset->envBlue, asset->envAlpha);
gDPSetPrimColor(gMasterDisp++, 0, 0, asset->primRed, asset->primGreen, asset->primBlue, asset->primAlpha);
gDPSetFogColor(gMasterDisp++, asset->fog.r, asset->fog.g, asset->fog.b, 0);
gDPSetEnvColor(gMasterDisp++, asset->env.r, asset->env.g, asset->env.b, asset->env.a);
gDPSetPrimColor(gMasterDisp++, 0, 0, asset->prim.r, asset->prim.g, asset->prim.b, asset->prim.a);
Matrix_Translate(gGfxMatrix, asset->unk_18.x + (arg0 - asset->unk_0C) * asset->unk_3C.x,
asset->unk_18.y + (arg0 - asset->unk_0C) * asset->unk_3C.y,
@ -377,9 +377,9 @@ void Ending_8018E7B8(u32 arg0, AssetInfo* asset) {
}
gSPFogPosition(gMasterDisp++, asset->fogNear, asset->fogFar);
gDPSetFogColor(gMasterDisp++, asset->fogRed, asset->fogGreen, asset->fogBlue, 0);
gDPSetEnvColor(gMasterDisp++, asset->envRed, asset->envGreen, asset->envBlue, asset->envAlpha);
gDPSetPrimColor(gMasterDisp++, 0, 0, asset->primRed, asset->primGreen, asset->primBlue, asset->primAlpha);
gDPSetFogColor(gMasterDisp++, asset->fog.r, asset->fog.g, asset->fog.b, 0);
gDPSetEnvColor(gMasterDisp++, asset->env.r, asset->env.g, asset->env.b, asset->env.a);
gDPSetPrimColor(gMasterDisp++, 0, 0, asset->prim.r, asset->prim.g, asset->prim.b, asset->prim.a);
Matrix_Translate(gGfxMatrix, asset->unk_18.x + (arg0 - asset->unk_0C) * asset->unk_3C.x,
asset->unk_18.y + (arg0 - asset->unk_0C) * asset->unk_3C.y,
@ -435,8 +435,8 @@ void Ending_8018EDB8(u32 arg0, AssetInfo* asset) {
RCP_SetupDL(&gMasterDisp, asset->unk_08);
gSPFogPosition(gMasterDisp++, asset->fogNear, asset->fogFar);
gDPSetFogColor(gMasterDisp++, asset->fogRed, asset->fogGreen, asset->fogBlue, 0);
gDPSetPrimColor(gMasterDisp++, 0, 0, asset->primRed, asset->primGreen, asset->primBlue, asset->primAlpha);
gDPSetFogColor(gMasterDisp++, asset->fog.r, asset->fog.g, asset->fog.b, 0);
gDPSetPrimColor(gMasterDisp++, 0, 0, asset->prim.r, asset->prim.g, asset->prim.b, asset->prim.a);
Matrix_Translate(gGfxMatrix, asset->unk_18.x + (arg0 - asset->unk_0C) * asset->unk_3C.x,
asset->unk_18.y + (arg0 - asset->unk_0C) * asset->unk_3C.y,
@ -471,8 +471,8 @@ void Ending_8018F2A8(u32 arg0, AssetInfo* asset) {
RCP_SetupDL(&gMasterDisp, asset->unk_08);
gSPFogPosition(gMasterDisp++, asset->fogNear, asset->fogFar);
gDPSetFogColor(gMasterDisp++, asset->fogRed, asset->fogGreen, asset->fogBlue, 0);
gDPSetPrimColor(gMasterDisp++, 0, 0, asset->primRed, asset->primGreen, asset->primBlue, asset->primAlpha);
gDPSetFogColor(gMasterDisp++, asset->fog.r, asset->fog.g, asset->fog.b, 0);
gDPSetPrimColor(gMasterDisp++, 0, 0, asset->prim.r, asset->prim.g, asset->prim.b, asset->prim.a);
Matrix_Translate(gGfxMatrix, asset->unk_18.x + (arg0 - asset->unk_0C) * asset->unk_3C.x,
asset->unk_18.y + (arg0 - asset->unk_0C) * asset->unk_3C.y,
@ -509,9 +509,9 @@ void Ending_8018F64C(u32 arg0, AssetInfo* asset) {
RCP_SetupDL(&gMasterDisp, asset->unk_08);
gSPFogPosition(gMasterDisp++, asset->fogNear, asset->fogFar);
gDPSetFogColor(gMasterDisp++, asset->fogRed, asset->fogGreen, asset->fogBlue, 0);
gDPSetEnvColor(gMasterDisp++, asset->envRed, asset->envGreen, asset->envBlue, asset->envAlpha);
gDPSetPrimColor(gMasterDisp++, 0, 0, asset->primRed, asset->primGreen, asset->primBlue, asset->primAlpha);
gDPSetFogColor(gMasterDisp++, asset->fog.r, asset->fog.g, asset->fog.b, 0);
gDPSetEnvColor(gMasterDisp++, asset->env.r, asset->env.g, asset->env.b, asset->env.a);
gDPSetPrimColor(gMasterDisp++, 0, 0, asset->prim.r, asset->prim.g, asset->prim.b, asset->prim.a);
Matrix_Translate(gGfxMatrix, asset->unk_18.x + (arg0 - asset->unk_0C) * asset->unk_3C.x,
asset->unk_18.y + (arg0 - asset->unk_0C) * asset->unk_3C.y,
@ -576,9 +576,9 @@ void Ending_8018FC60(u32 arg0, AssetInfo* asset) {
RCP_SetupDL(&gMasterDisp, asset->unk_08);
gSPFogPosition(gMasterDisp++, asset->fogNear, asset->fogFar);
gDPSetFogColor(gMasterDisp++, asset->fogRed, asset->fogGreen, asset->fogBlue, 0);
gDPSetEnvColor(gMasterDisp++, asset->envRed, asset->envGreen, asset->envBlue, asset->envAlpha);
gDPSetPrimColor(gMasterDisp++, 0, 0, asset->primRed, asset->primGreen, asset->primBlue, asset->primAlpha);
gDPSetFogColor(gMasterDisp++, asset->fog.r, asset->fog.g, asset->fog.b, 0);
gDPSetEnvColor(gMasterDisp++, asset->env.r, asset->env.g, asset->env.b, asset->env.a);
gDPSetPrimColor(gMasterDisp++, 0, 0, asset->prim.r, asset->prim.g, asset->prim.b, asset->prim.a);
Matrix_Translate(gGfxMatrix, asset->unk_18.x + (arg0 - asset->unk_0C) * asset->unk_3C.x,
asset->unk_18.y + (arg0 - asset->unk_0C) * asset->unk_3C.y,
@ -639,8 +639,8 @@ void Ending_80190274(u32 arg0, AssetInfo* asset) {
RCP_SetupDL(&gMasterDisp, asset->unk_08);
gSPFogPosition(gMasterDisp++, asset->fogNear, asset->fogFar);
gDPSetFogColor(gMasterDisp++, asset->fogRed, asset->fogGreen, asset->fogBlue, 0);
gDPSetPrimColor(gMasterDisp++, 0, 0, asset->primRed, asset->primGreen, asset->primBlue, asset->primAlpha);
gDPSetFogColor(gMasterDisp++, asset->fog.r, asset->fog.g, asset->fog.b, 0);
gDPSetPrimColor(gMasterDisp++, 0, 0, asset->prim.r, asset->prim.g, asset->prim.b, asset->prim.a);
Matrix_Translate(gGfxMatrix, D_ending_801985D0.x + asset->unk_18.x + (arg0 - asset->unk_0C) * asset->unk_3C.x,
D_ending_801985D0.y + asset->unk_18.y + (arg0 - asset->unk_0C) * asset->unk_3C.y,
@ -685,9 +685,9 @@ void Ending_80190778(u32 arg0, AssetInfo* asset) {
RCP_SetupDL(&gMasterDisp, asset->unk_08);
gSPFogPosition(gMasterDisp++, asset->fogNear, asset->fogFar);
gDPSetFogColor(gMasterDisp++, asset->fogRed, asset->fogGreen, asset->fogBlue, 0);
gDPSetEnvColor(gMasterDisp++, asset->envRed, asset->envGreen, asset->envBlue, asset->envAlpha);
gDPSetPrimColor(gMasterDisp++, 0, 0, asset->primRed, asset->primGreen, asset->primBlue, asset->primAlpha);
gDPSetFogColor(gMasterDisp++, asset->fog.r, asset->fog.g, asset->fog.b, 0);
gDPSetEnvColor(gMasterDisp++, asset->env.r, asset->env.g, asset->env.b, asset->env.a);
gDPSetPrimColor(gMasterDisp++, 0, 0, asset->prim.r, asset->prim.g, asset->prim.b, asset->prim.a);
Matrix_Translate(gGfxMatrix, asset->unk_18.x + (arg0 - asset->unk_0C) * asset->unk_3C.x,
asset->unk_18.y - 6.0f + (arg0 - asset->unk_0C) * asset->unk_3C.y,
@ -750,14 +750,14 @@ void Ending_80190CF0(u32 arg0, AssetInfo* asset) {
RCP_SetupDL(&gMasterDisp, asset->unk_08);
gDPSetFogColor(gMasterDisp++, asset->fogRed, asset->fogGreen, asset->fogBlue, 0);
gDPSetEnvColor(gMasterDisp++, asset->envRed, asset->envGreen, asset->envBlue, asset->envAlpha);
gDPSetFogColor(gMasterDisp++, asset->fog.r, asset->fog.g, asset->fog.b, 0);
gDPSetEnvColor(gMasterDisp++, asset->env.r, asset->env.g, asset->env.b, asset->env.a);
if ((asset->unk_0C + asset->fogNear) > arg0) {
alpha = (arg0 - asset->unk_0C) * 255 / asset->fogNear;
}
gDPSetPrimColor(gMasterDisp++, 0, 0, asset->primRed, asset->primGreen, asset->primBlue, alpha);
gDPSetPrimColor(gMasterDisp++, 0, 0, asset->prim.r, asset->prim.g, asset->prim.b, alpha);
Matrix_Translate(gGfxMatrix, asset->unk_18.x + (arg0 - asset->unk_0C) * asset->unk_3C.x,
asset->unk_18.y + (arg0 - asset->unk_0C) * asset->unk_3C.y,
@ -804,7 +804,7 @@ void Ending_80190CF0(u32 arg0, AssetInfo* asset) {
}
void Ending_80191234(s32 arg0, s32 arg1) {
D_game_80161A34 = 8;
gLastGameState = GSTATE_ENDING;
gGameState = GSTATE_MENU;
gNextGameStateTimer = 2;
gOptionMenuStatus = OPTION_WAIT;
@ -820,9 +820,9 @@ void Ending_80191294(u32 arg0, AssetInfo* asset) {
RCP_SetupDL(&gMasterDisp, asset->unk_08);
gSPFogPosition(gMasterDisp++, asset->fogNear, asset->fogFar);
gDPSetFogColor(gMasterDisp++, asset->fogRed, asset->fogGreen, asset->fogBlue, 0);
gDPSetEnvColor(gMasterDisp++, asset->envRed, asset->envGreen, asset->envBlue, asset->envAlpha);
gDPSetPrimColor(gMasterDisp++, 0, 0, asset->primRed, asset->primGreen, asset->primBlue, asset->primAlpha);
gDPSetFogColor(gMasterDisp++, asset->fog.r, asset->fog.g, asset->fog.b, 0);
gDPSetEnvColor(gMasterDisp++, asset->env.r, asset->env.g, asset->env.b, asset->env.a);
gDPSetPrimColor(gMasterDisp++, 0, 0, asset->prim.r, asset->prim.g, asset->prim.b, asset->prim.a);
Matrix_Translate(gGfxMatrix, asset->unk_18.x + (arg0 - asset->unk_0C) * asset->unk_3C.x,
asset->unk_18.y + (arg0 - asset->unk_0C) * asset->unk_3C.y,
@ -877,9 +877,9 @@ void Ending_80191710(u32 arg0, AssetInfo* asset) {
RCP_SetupDL(&gMasterDisp, asset->unk_08);
gSPFogPosition(gMasterDisp++, asset->fogNear, asset->fogFar);
gDPSetFogColor(gMasterDisp++, asset->fogRed, asset->fogGreen, asset->fogBlue, 0);
gDPSetEnvColor(gMasterDisp++, asset->envRed, asset->envGreen, asset->envBlue, asset->envAlpha);
gDPSetPrimColor(gMasterDisp++, 0, 0, asset->primRed, asset->primGreen, asset->primBlue, asset->primAlpha);
gDPSetFogColor(gMasterDisp++, asset->fog.r, asset->fog.g, asset->fog.b, 0);
gDPSetEnvColor(gMasterDisp++, asset->env.r, asset->env.g, asset->env.b, asset->env.a);
gDPSetPrimColor(gMasterDisp++, 0, 0, asset->prim.r, asset->prim.g, asset->prim.b, asset->prim.a);
Matrix_Translate(gGfxMatrix, asset->unk_18.x + (arg0 - asset->unk_0C) * asset->unk_3C.x,
asset->unk_18.y + (arg0 - asset->unk_0C) * asset->unk_3C.y,
@ -936,9 +936,9 @@ void Ending_80191C7C(u32 arg0, AssetInfo* asset) {
RCP_SetupDL(&gMasterDisp, asset->unk_08);
gSPFogPosition(gMasterDisp++, asset->fogNear, asset->fogFar);
gDPSetFogColor(gMasterDisp++, asset->fogRed, asset->fogGreen, asset->fogBlue, 0);
gDPSetEnvColor(gMasterDisp++, asset->envRed, asset->envGreen, asset->envBlue, asset->envAlpha);
gDPSetPrimColor(gMasterDisp++, 0, 0, asset->primRed, asset->primGreen, asset->primBlue, asset->primAlpha);
gDPSetFogColor(gMasterDisp++, asset->fog.r, asset->fog.g, asset->fog.b, 0);
gDPSetEnvColor(gMasterDisp++, asset->env.r, asset->env.g, asset->env.b, asset->env.a);
gDPSetPrimColor(gMasterDisp++, 0, 0, asset->prim.r, asset->prim.g, asset->prim.b, asset->prim.a);
Matrix_Translate(gGfxMatrix, asset->unk_18.x + (arg0 - asset->unk_0C) * asset->unk_3C.x,
asset->unk_18.y + (arg0 - asset->unk_0C) * asset->unk_3C.y,
@ -1088,7 +1088,7 @@ void Ending_801926D4(void) {
D_ending_80192E70 = 3099;
}
if ((4891 <= D_ending_80192E70) && (D_ending_80192E70 < 4999)) {
if ((4890 < D_ending_80192E70) && (D_ending_80192E70 < 4999)) {
D_ending_80192E70 = 4999;
}

View File

@ -44,19 +44,11 @@ typedef struct AssetInfo {
/* 0x3C */ Vec3f unk_3C;
/* 0x48 */ Vec3f unk_48;
/* 0x54 */ Vec3f unk_54;
/* 0x60 */ u8 fogRed;
/* 0x61 */ u8 fogGreen;
/* 0x62 */ u8 fogBlue;
/* 0x60 */ Color_RGBA32 fog;
/* 0x64 */ s16 fogNear;
/* 0x66 */ s16 fogFar;
/* 0x68 */ u8 envRed;
/* 0x69 */ u8 envGreen;
/* 0x6A */ u8 envBlue;
/* 0x6B */ u8 envAlpha;
/* 0x6C */ u8 primRed;
/* 0x6D */ u8 primGreen;
/* 0x6E */ u8 primBlue;
/* 0x6F */ u8 primAlpha;
/* 0x68 */ Color_RGBA32 env;
/* 0x6C */ Color_RGBA32 prim;
/* 0x70 */ u8 unk_70;
/* 0x71 */ u8 unk_71;
} AssetInfo; // size = 0x72
@ -192,100 +184,100 @@ Credit D_ending_80192E74[] = {
};
AssetInfo D_ending_801934B4[] = {
{ NULL, Ending_8018D250, 0, 0, 3000, 1000.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0 },
{ NULL, Ending_8018D4BC, 0, 100, 2800, 0.0f, 59.0f, 58.0f, 13.0f, 100.0f, 60.0f, 50.0f, 40.0f, 40.0f, 40.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ NULL, Ending_8018D28C, 36, 690, 30, 1.0f, 0.7f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ NULL, Ending_8018D28C, 36, 800, 119, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ NULL, Ending_8018D28C, 36, 920, 200, 1.0f, -1.2f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ NULL, Ending_80190648, 36, 100, 1710, 1.0f, 0.0f, 0.0f, -10000.0f, 0.0f, 0.0f, 0.0f, 40.0f, 40.0f, 40.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ NULL, Ending_8018F2A8, 29, 520, 800, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ NULL, Ending_8018F64C, 29, 100, 820, 1.0f, -900.0f, 600.0f, -1200.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 255, 0, 255, 255, 255, 255, 4, 0 },
{ NULL, Ending_8018F64C, 29, 920, 960, 1.0f, -900.0f, 600.0f, -1200.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 255, 0, 255, 255, 255, 255, 4, 0 },
{ &D_arwing_3015C28, D_arwing_3016610, 29, 100, 1780, 1.0f, -1000.0f, 500.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0 },
{ D_arwing_3016CC0, NULL, 29, 920, 150, 1.0f, -1000.0f, 506.8f, -16.0f, 5.0f, -40.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0 },
{ D_arwing_3016CC0, NULL, 29, 1070, 19, 1.0f, -1000.0f, 506.8f, -16.0f, 5.0f, -40.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 2.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0 },
{ D_arwing_3016CC0, NULL, 29, 1089, 1, 1.0f, -1000.0f, 506.8f, -16.0f, 5.0f, -1.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0 },
{ D_arwing_3016CC0, NULL, 29, 1090, 30, 1.0f, -1000.0f, 506.8f, -16.0f, 5.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0 },
{ D_arwing_30194E0, NULL, 45, 100, 1020, 1.0f, -1000.0f, 516.9f, -25.9f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 255, 255, 255, 140, 7, 0 },
{ NULL, Ending_8018E1B8, 67, 100, 1780, 1.0f, -1000.0f, 500.0f, -64.0f, 0.0f, 0.0f, 0.0f, 0.5f, 0.3f, 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 240, 176, 64, 996, 1000, 0, 0, 255, 0, 255, 255, 255, 255, 0, 0 },
{ &D_arwing_3015C28, D_arwing_3016610, 29, 100, 1780, 1.0f, -1000.0f, -500.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0 },
{ NULL, Ending_80190778, 29, 1120, 200, 1.0f, -1000.0f, -493.2f, -16.0f, 0.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 5.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0 },
{ D_arwing_30194E0, NULL, 45, 1120, 200, 1.0f, -1000.0f, -483.1f, -25.9f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 255, 255, 255, 140, 7, 0 },
{ NULL, Ending_8018E1B8, 67, 100, 1780, 1.0f, -1000.0f, -500.0f, -57.0f, 0.0f, 0.0f, 0.0f, 0.5f, 0.3f, 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 240, 176, 64, 996, 1000, 0, 0, 255, 0, 255, 255, 255, 255, 0, 0 },
{ NULL, Ending_8018FC60, 29, 100, 420, 1.0f, 1000.0f, 560.0f, -440.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 255, 0, 255, 255, 255, 255, 4, 0 },
{ NULL, Ending_8018FC60, 29, 520, 130, 1.0f, 1000.0f, 560.0f, -440.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 4.0f, 0.0f, 0.0f, 1.8f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 255, 0, 255, 255, 255, 255, 4, 0 },
{ NULL, Ending_8018FC60, 29, 650, 1230, 1.0f, 800.0f, -300.0f, 350.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 255, 0, 255, 255, 255, 255, 4, 0 },
{ NULL, Ending_80191294, 29, 100, 1780, 1.0f, 1000.0f, 500.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0 },
{ NULL, Ending_8018E1B8, 67, 100, 1780, 1.0f, 1000.0f, 500.0f, -57.0f, 0.0f, 0.0f, 0.0f, 0.5f, 0.3f, 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 240, 176, 64, 996, 1000, 0, 0, 255, 0, 255, 255, 255, 255, 0, 0 },
{ &D_arwing_3015C28, D_arwing_3016610, 29, 100, 1780, 1.0f, 1000.0f, -500.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0 },
{ D_arwing_3003CE0, NULL, 29, 850, 20, 1.0f, 1000.0f, -493.2f, -16.0f, 5.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0 },
{ D_arwing_3003CE0, NULL, 29, 870, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 7.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0 },
{ D_arwing_3003CE0, NULL, 29, 871, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 10.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0 },
{ D_arwing_3003CE0, NULL, 29, 872, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 14.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0 },
{ D_arwing_3003CE0, NULL, 29, 873, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 16.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0 },
{ D_arwing_3003CE0, NULL, 29, 874, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 14.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0 },
{ D_arwing_3003CE0, NULL, 29, 875, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 11.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0 },
{ D_arwing_3003CE0, NULL, 29, 876, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 7.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0 },
{ D_arwing_3003CE0, NULL, 29, 877, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 7.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0 },
{ D_arwing_3003CE0, NULL, 29, 878, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 10.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0 },
{ D_arwing_3003CE0, NULL, 29, 879, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 14.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0 },
{ D_arwing_3003CE0, NULL, 29, 880, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 16.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0 },
{ D_arwing_3003CE0, NULL, 29, 881, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 14.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0 },
{ D_arwing_3003CE0, NULL, 29, 882, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 10.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0 },
{ D_arwing_3003CE0, NULL, 29, 883, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 7.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0 },
{ D_arwing_3003CE0, NULL, 29, 884, 36, 1.0f, 1000.0f, -493.2f, -16.0f, 5.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0 },
{ D_arwing_30194E0, NULL, 45, 850, 70, 1.0f, 999.0f, -483.1f, -25.9f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 255, 255, 255, 140, 11, 0 },
{ NULL, Ending_8018E1B8, 67, 100, 1780, 1.0f, 1000.0f, -500.0f, -34.0f, 0.0f, 0.0f, 0.0f, 0.5f, 0.3f, 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 240, 176, 64, 996, 1000, 0, 0, 255, 0, 255, 255, 255, 255, 0, 0 },
{ NULL, Ending_8018F2A8, 29, 100, 420, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ NULL, Ending_8018F2A8, 29, 1320, 470, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ NULL, Ending_80190274, 36, 1810, 1090, 1.0f, -200.0f, 0.0f, -10000.0f, 0.0f, 0.0f, 0.0f, 150.0f, 150.0f, 150.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ NULL, Ending_8018F2A8, 29, 1920, 980, 1.0f, 0.0f, 1000.0f, -700.0f, 0.0f, 180.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, -10.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ NULL, Ending_8018D2C8, 36, 100, 11, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ NULL, Ending_8018D2C8, 36, 1770, 30, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ NULL, Ending_8018D2C8, 36, 2780, 30, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ NULL, Ending_8018D2C8, 36, 510, 20, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ NULL, Ending_8018D2C8, 36, 710, 20, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ NULL, Ending_8018D2C8, 36, 910, 20, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ NULL, Ending_8018D2C8, 36, 1110, 20, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ NULL, Ending_8018D2C8, 36, 1310, 20, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ NULL, Ending_8018D250, 4, 3000, 2000, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0 },
{ NULL, Ending_8018D4BC, 0, 3100, 1800, 0.0f, 0.0f, 13.0f, -32.0f, 200.0f, 70.0f, 10.0f, 10.0f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ D_END_7016540, NULL, 17, 3100, 1800, 1.0f, 0.0f, -2700.0f, -6900.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ NULL, Ending_8018F2A8, 23, 3800, 950, 1.0f, 8000.0f, -5500.0f, -10000.0f, -10.0f, -90.0f, 0.0f, 3.0f, 3.0f, 3.0f, -22.0f, 12.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ NULL, Ending_8018E7B8, 67, 3800, 950, 1.0f, 12330.0f, -6500.0f, -9200.0f, 0.0f, 0.0f, -10.0f, 35.0f, 10.0f, 20.0f, -22.0f, 12.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 240, 176, 64, 996, 1000, 255, 255, 0, 0, 255, 255, 255, 164, 0, 0 },
{ NULL, Ending_8018E7B8, 67, 3800, 950, 1.0f, 15600.0f, -6710.0f, -9960.0f, 0.0f, 0.0f, -10.0f, 35.0f, 10.0f, 20.0f, -22.0f, 12.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 240, 176, 64, 996, 1000, 255, 255, 0, 0, 255, 255, 255, 164, 0, 0 },
{ NULL, Ending_8018D4BC, 0, 3100, 1800, 0.0f, 0.0f, 32.0f, -32.0f, 200.0f, 70.0f, 10.0f, 10.0f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ NULL, Ending_8018EDB8, 20, 3100, 1800, 1.0f, 0.0f, -470.0f, -3500.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 996, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ &D_TITLE_602F8E0, D_TITLE_602FBAC, 12, 3100, 1800, 5.0f, -300.0f, -300.0f, -1300.0f, 5.0f, -90.0f, -90.0f, 0.6f, 0.1f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 200, 10, 0 },
{ &D_TITLE_602F8E0, D_TITLE_602FBAC, 23, 3100, 1800, 5.0f, -300.0f, -300.0f, -1300.0f, 5.0f, -90.0f, 0.0f, 0.6f, 0.6f, 0.6f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0 },
{ &D_TITLE_60305C0, D_TITLE_603088C, 12, 3100, 1800, 5.0f, -100.0f, -300.0f, -1300.0f, 10.0f, -90.0f, -90.0f, 0.6f, 0.1f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 200, 0, 0 },
{ &D_TITLE_60305C0, D_TITLE_603088C, 23, 3100, 1800, 5.0f, -100.0f, -300.0f, -1300.0f, 10.0f, -90.0f, 0.0f, 0.6f, 0.6f, 0.6f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ &D_TITLE_6031DB8, D_TITLE_6032084, 12, 3100, 1800, 6.0f, 100.0f, -300.0f, -1300.0f, -10.0f, -90.0f, -90.0f, 0.6f, 0.1f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 200, 0, 0 },
{ &D_TITLE_6031DB8, D_TITLE_6032084, 23, 3100, 1800, 6.0f, 100.0f, -300.0f, -1300.0f, -10.0f, -90.0f, 0.0f, 0.6f, 0.6f, 0.6f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ &D_TITLE_6031120, D_TITLE_60313AC, 12, 3100, 1800, 7.0f, 300.0f, -300.0f, -1300.0f, -15.0f, -90.0f, -90.0f, 0.6f, 0.1f, 6.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 200, 0, 0 },
{ &D_TITLE_6031120, D_TITLE_60313AC, 23, 3100, 1800, 7.0f, 300.0f, -300.0f, -1300.0f, -15.0f, -90.0f, 0.0f, 0.6f, 0.6f, 0.6f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ NULL, Ending_8018D250, 5, 5000, 2000, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0 },
{ NULL, Ending_8018D4BC, 0, 5100, 1800, 0.0f, 0.0f, 32.0f, -32.0f, 200.0f, 70.0f, 10.0f, 10.0f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ D_END_7016540, NULL, 17, 5100, 310, 1.0f, 0.0f, -2800.0f, -6900.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, -4.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ D_END_7016540, NULL, 17, 5410, 1490, 1.0f, 0.0f, -4040.0f, -6900.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ NULL, Ending_80190CF0, 62, 6520, 380, 1.0f, 0.0f, 0.0f, -7000.0f, 0.0f, 0.0f, 0.0f, 12.0f, 12.0f, 12.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 200, 0, 0, 0, 0, 0, 255, 255, 255, 0, 0, 0 },
{ &D_arwing_3015AF4, D_arwing_3016610, 29, 5100, 1800, 1.0f, 100.0f, 100.0f, -230.0f, 0.0f, 180.0f, 0.0f, 0.5f, 0.5f, 0.5f, 0.0f, 0.0f, -7.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 3.0f, 240, 176, 64, 996, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0 },
{ D_END_7010970, NULL, 38, 5100, 1800, 1.0f, 100.0f, 95.0f, -200.0f, 0.0f, 0.0f, 0.0f, 0.4f, 0.3f, 0.4f, 0.0f, 0.0f, -7.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 3.0f, 240, 176, 64, 996, 1000, 255, 0, 0, 0, 255, 255, 255, 255, 0, 0 },
{ &D_arwing_3015AF4, D_arwing_3016610, 29, 5100, 1800, 1.0f, 100.0f, -100.0f, -230.0f, 0.0f, 180.0f, 0.0f, 0.5f, 0.5f, 0.5f, 0.0f, 0.0f, -7.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 3.0f, 240, 176, 64, 996, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0 },
{ D_END_7010970, NULL, 38, 5100, 1800, 1.0f, 100.0f, -105.0f, -200.0f, 0.0f, 0.0f, 0.0f, 0.4f, 0.3f, 0.4f, 0.0f, 0.0f, -7.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 3.0f, 240, 176, 64, 996, 1000, 255, 0, 0, 0, 255, 255, 255, 255, 5, 0 },
{ &D_arwing_3015AF4, D_arwing_3016610, 29, 5100, 1800, 1.0f, -100.0f, 100.0f, -230.0f, 0.0f, 180.0f, 0.0f, 0.5f, 0.5f, 0.5f, 0.0f, 0.0f, -7.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 3.0f, 240, 176, 64, 996, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0 },
{ D_END_7010970, NULL, 38, 5100, 1800, 1.0f, -100.0f, 95.0f, -200.0f, 0.0f, 0.0f, 0.0f, 0.4f, 0.3f, 0.4f, 0.0f, 0.0f, -7.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 3.0f, 240, 176, 64, 996, 1000, 255, 0, 0, 0, 255, 255, 255, 255, 7, 0 },
{ &D_arwing_3015AF4, D_arwing_3016610, 29, 5100, 1800, 1.0f, -100.0f, -100.0f, -230.0f, 0.0f, 180.0f, 0.0f, 0.5f, 0.5f, 0.5f, 0.0f, 0.0f, -7.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 3.0f, 240, 176, 64, 996, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0 },
{ D_END_7010970, NULL, 38, 5100, 1800, 1.0f, -100.0f, -105.0f, -200.0f, 0.0f, 0.0f, 0.0f, 0.4f, 0.3f, 0.4f, 0.0f, 0.0f, -7.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 3.0f, 240, 176, 64, 996, 1000, 255, 0, 0, 0, 255, 255, 255, 255, 11, 0 },
{ NULL, Ending_8018F2A8, 29, 5100, 1800, 1.0f, 0.0f, 0.0f, -220.0f, 0.0f, 180.0f, 0.0f, 0.1f, 0.1f, 0.1f, 0.0f, 0.0f, -7.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 240, 176, 64, 996, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ NULL, Ending_8018DA0C, 76, 6520, 380, 1.0f, 224.0f, 164.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 20, 0, 0, 0, 0, 0, 255, 255, 255, 255, 0, 0 },
{ NULL, Ending_8018D638, 36, 6900, 300, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ NULL, Ending_8018D398, 36, 3000, 370, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 250, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ NULL, Ending_8018D814, 76, 6122, 200, 1.0f, 128.0f, 100.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 20, 20, 0, 0, 0, 0, 255, 255, 255, 0, 0, 0 },
{ NULL, Ending_8018D2C8, 36, 4880, 240, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ NULL, Ending_8018D2C8, 36, 6800, 100, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ NULL, Ending_8018D2C8, 36, 7100, 100, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ NULL, Ending_80191234, 0, 7200, 100, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
{ NULL, Ending_8018D250, 0, 0, 3000, 1000.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 2, 0 },
{ NULL, Ending_8018D4BC, 0, 100, 2800, 0.0f, 59.0f, 58.0f, 13.0f, 100.0f, 60.0f, 50.0f, 40.0f, 40.0f, 40.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 },
{ NULL, Ending_8018D28C, 36, 690, 30, 1.0f, 0.7f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 },
{ NULL, Ending_8018D28C, 36, 800, 119, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 },
{ NULL, Ending_8018D28C, 36, 920, 200, 1.0f, -1.2f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 },
{ NULL, Ending_80190648, 36, 100, 1710, 1.0f, 0.0f, 0.0f, -10000.0f, 0.0f, 0.0f, 0.0f, 40.0f, 40.0f, 40.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 },
{ NULL, Ending_8018F2A8, 29, 520, 800, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 },
{ NULL, Ending_8018F64C, 29, 100, 820, 1.0f, -900.0f, 600.0f, -1200.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 255, 0,}, {255, 255, 255, 255,}, 4, 0 },
{ NULL, Ending_8018F64C, 29, 920, 960, 1.0f, -900.0f, 600.0f, -1200.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 255, 0,}, {255, 255, 255, 255,}, 4, 0 },
{ &D_arwing_3015C28, D_arwing_3016610, 29, 100, 1780, 1.0f, -1000.0f, 500.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 3, 0 },
{ D_arwing_3016CC0, NULL, 29, 920, 150, 1.0f, -1000.0f, 506.8f, -16.0f, 5.0f, -40.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 7, 0 },
{ D_arwing_3016CC0, NULL, 29, 1070, 19, 1.0f, -1000.0f, 506.8f, -16.0f, 5.0f, -40.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 2.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 7, 0 },
{ D_arwing_3016CC0, NULL, 29, 1089, 1, 1.0f, -1000.0f, 506.8f, -16.0f, 5.0f, -1.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 7, 0 },
{ D_arwing_3016CC0, NULL, 29, 1090, 30, 1.0f, -1000.0f, 506.8f, -16.0f, 5.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 7, 0 },
{ D_arwing_30194E0, NULL, 45, 100, 1020, 1.0f, -1000.0f, 516.9f, -25.9f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {255, 255, 255, 140,}, 7, 0 },
{ NULL, Ending_8018E1B8, 67, 100, 1780, 1.0f, -1000.0f, 500.0f, -64.0f, 0.0f, 0.0f, 0.0f, 0.5f, 0.3f, 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {240, 176, 64, 0}, 996, 1000, {0, 0, 255, 0,}, {255, 255, 255, 255,}, 0, 0 },
{ &D_arwing_3015C28, D_arwing_3016610, 29, 100, 1780, 1.0f, -1000.0f, -500.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 5, 0 },
{ NULL, Ending_80190778, 29, 1120, 200, 1.0f, -1000.0f, -493.2f, -16.0f, 0.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 5.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 7, 0 },
{ D_arwing_30194E0, NULL, 45, 1120, 200, 1.0f, -1000.0f, -483.1f, -25.9f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {255, 255, 255, 140,}, 7, 0 },
{ NULL, Ending_8018E1B8, 67, 100, 1780, 1.0f, -1000.0f, -500.0f, -57.0f, 0.0f, 0.0f, 0.0f, 0.5f, 0.3f, 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {240, 176, 64, 0}, 996, 1000, {0, 0, 255, 0,}, {255, 255, 255, 255,}, 0, 0 },
{ NULL, Ending_8018FC60, 29, 100, 420, 1.0f, 1000.0f, 560.0f, -440.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 255, 0,}, {255, 255, 255, 255,}, 4, 0 },
{ NULL, Ending_8018FC60, 29, 520, 130, 1.0f, 1000.0f, 560.0f, -440.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 4.0f, 0.0f, 0.0f, 1.8f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 255, 0,}, {255, 255, 255, 255,}, 4, 0 },
{ NULL, Ending_8018FC60, 29, 650, 1230, 1.0f, 800.0f, -300.0f, 350.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 255, 0,}, {255, 255, 255, 255,}, 4, 0 },
{ NULL, Ending_80191294, 29, 100, 1780, 1.0f, 1000.0f, 500.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 7, 0 },
{ NULL, Ending_8018E1B8, 67, 100, 1780, 1.0f, 1000.0f, 500.0f, -57.0f, 0.0f, 0.0f, 0.0f, 0.5f, 0.3f, 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {240, 176, 64, 0}, 996, 1000, {0, 0, 255, 0,}, {255, 255, 255, 255,}, 0, 0 },
{ &D_arwing_3015C28, D_arwing_3016610, 29, 100, 1780, 1.0f, 1000.0f, -500.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 11, 0 },
{ D_arwing_3003CE0, NULL, 29, 850, 20, 1.0f, 1000.0f, -493.2f, -16.0f, 5.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 },
{ D_arwing_3003CE0, NULL, 29, 870, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 7.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 },
{ D_arwing_3003CE0, NULL, 29, 871, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 10.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 },
{ D_arwing_3003CE0, NULL, 29, 872, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 14.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 },
{ D_arwing_3003CE0, NULL, 29, 873, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 16.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 },
{ D_arwing_3003CE0, NULL, 29, 874, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 14.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 },
{ D_arwing_3003CE0, NULL, 29, 875, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 11.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 },
{ D_arwing_3003CE0, NULL, 29, 876, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 7.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 },
{ D_arwing_3003CE0, NULL, 29, 877, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 7.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 },
{ D_arwing_3003CE0, NULL, 29, 878, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 10.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 },
{ D_arwing_3003CE0, NULL, 29, 879, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 14.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 },
{ D_arwing_3003CE0, NULL, 29, 880, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 16.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 },
{ D_arwing_3003CE0, NULL, 29, 881, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 14.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 },
{ D_arwing_3003CE0, NULL, 29, 882, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 10.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 },
{ D_arwing_3003CE0, NULL, 29, 883, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 7.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 },
{ D_arwing_3003CE0, NULL, 29, 884, 36, 1.0f, 1000.0f, -493.2f, -16.0f, 5.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 },
{ D_arwing_30194E0, NULL, 45, 850, 70, 1.0f, 999.0f, -483.1f, -25.9f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {255, 255, 255, 140,}, 11, 0 },
{ NULL, Ending_8018E1B8, 67, 100, 1780, 1.0f, 1000.0f, -500.0f, -34.0f, 0.0f, 0.0f, 0.0f, 0.5f, 0.3f, 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {240, 176, 64, 0}, 996, 1000, {0, 0, 255, 0,}, {255, 255, 255, 255,}, 0, 0 },
{ NULL, Ending_8018F2A8, 29, 100, 420, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 },
{ NULL, Ending_8018F2A8, 29, 1320, 470, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 },
{ NULL, Ending_80190274, 36, 1810, 1090, 1.0f, -200.0f, 0.0f, -10000.0f, 0.0f, 0.0f, 0.0f, 150.0f, 150.0f, 150.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 },
{ NULL, Ending_8018F2A8, 29, 1920, 980, 1.0f, 0.0f, 1000.0f, -700.0f, 0.0f, 180.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, -10.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 },
{ NULL, Ending_8018D2C8, 36, 100, 11, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 0, 10, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 },
{ NULL, Ending_8018D2C8, 36, 1770, 30, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 10, 10, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 },
{ NULL, Ending_8018D2C8, 36, 2780, 30, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 10, 10, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 },
{ NULL, Ending_8018D2C8, 36, 510, 20, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 10, 10, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 },
{ NULL, Ending_8018D2C8, 36, 710, 20, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 10, 10, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 },
{ NULL, Ending_8018D2C8, 36, 910, 20, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 10, 10, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 },
{ NULL, Ending_8018D2C8, 36, 1110, 20, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 10, 10, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 },
{ NULL, Ending_8018D2C8, 36, 1310, 20, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 10, 10, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 },
{ NULL, Ending_8018D250, 4, 3000, 2000, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 3, 0 },
{ NULL, Ending_8018D4BC, 0, 3100, 1800, 0.0f, 0.0f, 13.0f, -32.0f, 200.0f, 70.0f, 10.0f, 10.0f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 },
{ D_END_7016540, NULL, 17, 3100, 1800, 1.0f, 0.0f, -2700.0f, -6900.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 },
{ NULL, Ending_8018F2A8, 23, 3800, 950, 1.0f, 8000.0f, -5500.0f, -10000.0f, -10.0f, -90.0f, 0.0f, 3.0f, 3.0f, 3.0f, -22.0f, 12.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 },
{ NULL, Ending_8018E7B8, 67, 3800, 950, 1.0f, 12330.0f, -6500.0f, -9200.0f, 0.0f, 0.0f, -10.0f, 35.0f, 10.0f, 20.0f, -22.0f, 12.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {240, 176, 64, 0}, 996, 1000, {255, 255, 0, 0,}, {255, 255, 255, 164,}, 0, 0 },
{ NULL, Ending_8018E7B8, 67, 3800, 950, 1.0f, 15600.0f, -6710.0f, -9960.0f, 0.0f, 0.0f, -10.0f, 35.0f, 10.0f, 20.0f, -22.0f, 12.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {240, 176, 64, 0}, 996, 1000, {255, 255, 0, 0,}, {255, 255, 255, 164,}, 0, 0 },
{ NULL, Ending_8018D4BC, 0, 3100, 1800, 0.0f, 0.0f, 32.0f, -32.0f, 200.0f, 70.0f, 10.0f, 10.0f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 },
{ NULL, Ending_8018EDB8, 20, 3100, 1800, 1.0f, 0.0f, -470.0f, -3500.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 996, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 },
{ &D_TITLE_602F8E0, D_TITLE_602FBAC, 12, 3100, 1800, 5.0f, -300.0f, -300.0f, -1300.0f, 5.0f, -90.0f, -90.0f, 0.6f, 0.1f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 200,}, 10, 0 },
{ &D_TITLE_602F8E0, D_TITLE_602FBAC, 23, 3100, 1800, 5.0f, -300.0f, -300.0f, -1300.0f, 5.0f, -90.0f, 0.0f, 0.6f, 0.6f, 0.6f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 },
{ &D_TITLE_60305C0, D_TITLE_603088C, 12, 3100, 1800, 5.0f, -100.0f, -300.0f, -1300.0f, 10.0f, -90.0f, -90.0f, 0.6f, 0.1f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 200,}, 0, 0 },
{ &D_TITLE_60305C0, D_TITLE_603088C, 23, 3100, 1800, 5.0f, -100.0f, -300.0f, -1300.0f, 10.0f, -90.0f, 0.0f, 0.6f, 0.6f, 0.6f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 },
{ &D_TITLE_6031DB8, D_TITLE_6032084, 12, 3100, 1800, 6.0f, 100.0f, -300.0f, -1300.0f, -10.0f, -90.0f, -90.0f, 0.6f, 0.1f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 200,}, 0, 0 },
{ &D_TITLE_6031DB8, D_TITLE_6032084, 23, 3100, 1800, 6.0f, 100.0f, -300.0f, -1300.0f, -10.0f, -90.0f, 0.0f, 0.6f, 0.6f, 0.6f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 },
{ &D_TITLE_6031120, D_TITLE_60313AC, 12, 3100, 1800, 7.0f, 300.0f, -300.0f, -1300.0f, -15.0f, -90.0f, -90.0f, 0.6f, 0.1f, 6.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 200,}, 0, 0 },
{ &D_TITLE_6031120, D_TITLE_60313AC, 23, 3100, 1800, 7.0f, 300.0f, -300.0f, -1300.0f, -15.0f, -90.0f, 0.0f, 0.6f, 0.6f, 0.6f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 },
{ NULL, Ending_8018D250, 5, 5000, 2000, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 2, 0 },
{ NULL, Ending_8018D4BC, 0, 5100, 1800, 0.0f, 0.0f, 32.0f, -32.0f, 200.0f, 70.0f, 10.0f, 10.0f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 },
{ D_END_7016540, NULL, 17, 5100, 310, 1.0f, 0.0f, -2800.0f, -6900.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, -4.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 },
{ D_END_7016540, NULL, 17, 5410, 1490, 1.0f, 0.0f, -4040.0f, -6900.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 },
{ NULL, Ending_80190CF0, 62, 6520, 380, 1.0f, 0.0f, 0.0f, -7000.0f, 0.0f, 0.0f, 0.0f, 12.0f, 12.0f, 12.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 200, 0, {0, 0, 0, 0,}, {255, 255, 255, 0,}, 0, 0 },
{ &D_arwing_3015AF4, D_arwing_3016610, 29, 5100, 1800, 1.0f, 100.0f, 100.0f, -230.0f, 0.0f, 180.0f, 0.0f, 0.5f, 0.5f, 0.5f, 0.0f, 0.0f, -7.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 3.0f, {240, 176, 64, 0}, 996, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 3, 0 },
{ D_END_7010970, NULL, 38, 5100, 1800, 1.0f, 100.0f, 95.0f, -200.0f, 0.0f, 0.0f, 0.0f, 0.4f, 0.3f, 0.4f, 0.0f, 0.0f, -7.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 3.0f, {240, 176, 64, 0}, 996, 1000, {255, 0, 0, 0,}, {255, 255, 255, 255,}, 0, 0 },
{ &D_arwing_3015AF4, D_arwing_3016610, 29, 5100, 1800, 1.0f, 100.0f, -100.0f, -230.0f, 0.0f, 180.0f, 0.0f, 0.5f, 0.5f, 0.5f, 0.0f, 0.0f, -7.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 3.0f, {240, 176, 64, 0}, 996, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 5, 0 },
{ D_END_7010970, NULL, 38, 5100, 1800, 1.0f, 100.0f, -105.0f, -200.0f, 0.0f, 0.0f, 0.0f, 0.4f, 0.3f, 0.4f, 0.0f, 0.0f, -7.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 3.0f, {240, 176, 64, 0}, 996, 1000, {255, 0, 0, 0,}, {255, 255, 255, 255,}, 5, 0 },
{ &D_arwing_3015AF4, D_arwing_3016610, 29, 5100, 1800, 1.0f, -100.0f, 100.0f, -230.0f, 0.0f, 180.0f, 0.0f, 0.5f, 0.5f, 0.5f, 0.0f, 0.0f, -7.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 3.0f, {240, 176, 64, 0}, 996, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 7, 0 },
{ D_END_7010970, NULL, 38, 5100, 1800, 1.0f, -100.0f, 95.0f, -200.0f, 0.0f, 0.0f, 0.0f, 0.4f, 0.3f, 0.4f, 0.0f, 0.0f, -7.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 3.0f, {240, 176, 64, 0}, 996, 1000, {255, 0, 0, 0,}, {255, 255, 255, 255,}, 7, 0 },
{ &D_arwing_3015AF4, D_arwing_3016610, 29, 5100, 1800, 1.0f, -100.0f, -100.0f, -230.0f, 0.0f, 180.0f, 0.0f, 0.5f, 0.5f, 0.5f, 0.0f, 0.0f, -7.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 3.0f, {240, 176, 64, 0}, 996, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 11, 0 },
{ D_END_7010970, NULL, 38, 5100, 1800, 1.0f, -100.0f, -105.0f, -200.0f, 0.0f, 0.0f, 0.0f, 0.4f, 0.3f, 0.4f, 0.0f, 0.0f, -7.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 3.0f, {240, 176, 64, 0}, 996, 1000, {255, 0, 0, 0,}, {255, 255, 255, 255,}, 11, 0 },
{ NULL, Ending_8018F2A8, 29, 5100, 1800, 1.0f, 0.0f, 0.0f, -220.0f, 0.0f, 180.0f, 0.0f, 0.1f, 0.1f, 0.1f, 0.0f, 0.0f, -7.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, {240, 176, 64, 0}, 996, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 },
{ NULL, Ending_8018DA0C, 76, 6520, 380, 1.0f, 224.0f, 164.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 20, 0, {0, 0, 0, 0,}, {255, 255, 255, 255,}, 0, 0 },
{ NULL, Ending_8018D638, 36, 6900, 300, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 0, 20, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 },
{ NULL, Ending_8018D398, 36, 3000, 370, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 0, 250, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 },
{ NULL, Ending_8018D814, 76, 6122, 200, 1.0f, 128.0f, 100.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 20, 20, {0, 0, 0, 0,}, {255, 255, 255, 0,}, 0, 0 },
{ NULL, Ending_8018D2C8, 36, 4880, 240, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 10, 10, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 },
{ NULL, Ending_8018D2C8, 36, 6800, 100, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 100, 0, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 },
{ NULL, Ending_8018D2C8, 36, 7100, 100, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 100, 0, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 },
{ NULL, Ending_80191234, 0, 7200, 100, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 0, 0, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }
};
UnkEnd54 D_ending_80195F4C[] = {

View File

@ -48,7 +48,7 @@ void Corneria_80187670(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 arg4, f32
actor->obj.rot.y = yRot;
actor->timer_0BC = arg7;
actor->timer_0BE = 20;
actor->unk_0B4 = arg8;
actor->eventType = arg8;
actor->fwork[5] = arg4;
Object_SetInfo(&actor->info, actor->obj.id);
}
@ -311,11 +311,11 @@ void Corneria_80187AC8(Boss* boss) {
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;
sprite->destroy = 1;
break;
} 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;
sprite->destroy = 1;
break;
}
}
@ -450,7 +450,6 @@ void Corneria_80188A18(Boss* boss) {
}
void Corneria_80188C7C(Boss* boss) {
if (boss->unk_044 == 0) {
boss->unk_044++;
boss->fwork[12] *= -0.2f;
@ -552,7 +551,7 @@ void Corneria_80189058(Boss* boss) {
boss->swork[33]++;
gBossActive = 2;
boss->unk_05E = 1;
boss->drawShadow = true;
boss->swork[24] = 150;
boss->swork[25] = 150;
boss->swork[26] = 40;
@ -793,8 +792,8 @@ void Corneria_80189058(Boss* boss) {
break;
case 5:
case 6:
boss->unk_05E = 0;
D_ctx_8017812C = 1;
boss->drawShadow = false;
gGroundClipMode = 1;
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;
@ -843,7 +842,7 @@ void Corneria_80189058(Boss* boss) {
}
}
boss->unk_068 = SIN_DEG(boss->obj.rot.z) * 30.0f;
boss->yOffset = SIN_DEG(boss->obj.rot.z) * 30.0f;
if (((gGameFrameCount % 16) == 0)) {
boss->unk_04C = RAND_INT(100.0f);
}
@ -1160,7 +1159,7 @@ void Corneria_8018AED0(Actor* actor) {
f32 temp_cos;
Corneria_8018ACE0(actor);
Math_SmoothStepToVec3fArray(sp40, actor->vwork, 0, Animation_GetFrameData(&D_CO_602991C, actor->unk_0B6, sp40),
Math_SmoothStepToVec3fArray(sp40, actor->vwork, 0, Animation_GetFrameData(&D_CO_602991C, actor->animFrame, sp40),
1.0f, 1.0f, 1.0f);
temp_sin = SIN_DEG(actor->obj.rot.y);
actor->vel.x = actor->fwork[0] * temp_sin;
@ -1170,7 +1169,7 @@ void Corneria_8018AED0(Actor* actor) {
case 0:
actor->fwork[1] += 20.0f;
Texture_Scroll(D_CO_60329C0, 16, 16, 1);
actor->unk_0B6 = 0;
actor->animFrame = 0;
actor->fwork[0] += 1.0f;
if (actor->fwork[0] > 10.0f) {
actor->fwork[0] = 10.0f;
@ -1183,18 +1182,18 @@ void Corneria_8018AED0(Actor* actor) {
}
return;
case 1:
actor->unk_0B6++;
actor->animFrame++;
actor->fwork[1] += 20.0f;
actor->fwork[0] = 0.0f;
if (actor->unk_0B6 == 50) {
if (actor->animFrame == 50) {
gScenery[actor->iwork[0] - 1].state = 1;
}
if (actor->unk_0B6 >= Animation_GetFrameCount(&D_CO_602991C)) {
if (actor->animFrame >= Animation_GetFrameCount(&D_CO_602991C)) {
actor->state++;
}
break;
case 2:
actor->unk_0B6 = 0;
actor->animFrame = 0;
actor->fwork[1] += 20.0f;
break;
}
@ -1244,7 +1243,7 @@ void Corneria_8018B15C(Actor* actor) {
case 0:
actor->timer_0BC = 40;
actor->state = 1;
actor->unk_0B6 = 0;
actor->animFrame = 0;
break;
case 1:
@ -1259,12 +1258,12 @@ void Corneria_8018B15C(Actor* actor) {
case 2:
actor->fwork[0] = -10.0f;
Texture_Scroll(D_CO_60329C0, 16, 16, 1);
actor->unk_0B6++;
actor->animFrame++;
if (actor->unk_0B6 >= Animation_GetFrameCount(&D_CO_602AA04)) {
if (actor->animFrame >= Animation_GetFrameCount(&D_CO_602AA04)) {
actor->state = 3;
}
if (actor->unk_0B6 == (Animation_GetFrameCount(&D_CO_602AA04) - actor->iwork[2])) {
if (actor->animFrame == (Animation_GetFrameCount(&D_CO_602AA04) - actor->iwork[2])) {
actor->iwork[1] = 1;
scenery->state = 1;
sp54.x = 0.0f;
@ -1287,7 +1286,7 @@ void Corneria_8018B15C(Actor* actor) {
scenery->vel.y = 0.0f;
}
Math_SmoothStepToVec3fArray(sp60, actor->vwork, 0, Animation_GetFrameData(&D_CO_602AA04, actor->unk_0B6, sp60),
Math_SmoothStepToVec3fArray(sp60, actor->vwork, 0, Animation_GetFrameData(&D_CO_602AA04, actor->animFrame, sp60),
1.0f, 1.0f, 1.0f);
}
@ -1315,9 +1314,9 @@ void Corneria_8018B418(Actor* actor) {
actor->fwork[0] = 5.0f;
actor->fwork[1] += 5.0f;
Texture_Scroll(D_CO_60329C0, 16, 16, 1);
actor->unk_0B6++;
if (actor->unk_0B6 >= Animation_GetFrameCount(&D_CO_602A520)) {
actor->unk_0B6 = 0;
actor->animFrame++;
if (actor->animFrame >= Animation_GetFrameCount(&D_CO_602A520)) {
actor->animFrame = 0;
}
break;
}
@ -1331,7 +1330,7 @@ void Corneria_8018B418(Actor* actor) {
temp_v0_2->vel.y = 0.0f;
}
Math_SmoothStepToVec3fArray(sp54, actor->vwork, 0, Animation_GetFrameData(&D_CO_602A520, actor->unk_0B6, sp54),
Math_SmoothStepToVec3fArray(sp54, actor->vwork, 0, Animation_GetFrameData(&D_CO_602A520, actor->animFrame, sp54),
1.0f, 1.0f, 1.0f);
}
@ -1479,7 +1478,7 @@ void Corneria_Boss293_Init(Boss293* this) {
gBossActive = 1;
gBossFrameCount = 0;
this->unk_05E = 1;
this->drawShadow = true;
this->timer_050 = 354;
this->health = 601;
this->fwork[18] = -gArwingSpeed - 10.0f;
@ -1511,10 +1510,10 @@ void Corneria_Boss293_Init(Boss293* this) {
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].drawShadow = true;
gBosses[i].timer_05A = temp_s1;
Object_SetInfo(&gBosses[i].info, gBosses[i].obj.id);
gBosses[3].unk_05E = 0;
gBosses[3].drawShadow = false;
}
}
@ -1676,7 +1675,7 @@ void Corneria_8018C19C(Boss* boss) {
gBosses[0].obj.pos.z + sp84[5].z, 5.0f);
}
if (gBosses[2].state != 0) {
gBosses[3].unk_05E = 1;
gBosses[3].drawShadow = true;
if (gBosses[3].state != 0) {
if (((gGameFrameCount % 8) == 0)) {
Matrix_MultVec3f(gCalcMatrix, &D_i1_80199950, &sp84[11]);
@ -2464,7 +2463,7 @@ void Corneria_8018F3BC(Scenery* scenery, f32 arg1) {
}
scenery->obj.pos.y = 0.0f;
scenery->obj.id = OBJ_SCENERY_1;
scenery->unk_60 = 60.0f;
scenery->effectVel.z = 60.0f;
Object_SetInfo(&scenery->info, scenery->obj.id);
scenery->obj.pos.z = -2000.0f;
scenery->info.cullDistance = 15000.0f;
@ -2545,7 +2544,7 @@ void Corneria_8018F6F8(Actor* actor, s32 arg1) {
actor->obj.rot.y = 180.0f;
actor->fwork[0] = RAND_FLOAT(360.0f);
Object_SetInfo(&actor->info, actor->obj.id);
actor->unk_0C9 = 1;
actor->drawShadow = true;
actor->iwork[11] = 1;
actor->info.cullDistance = 200.0f;
AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4);
@ -2736,7 +2735,7 @@ void Corneria_LevelStart(Player* player) {
actor0->obj.pos.y = player->pos.y + 80.0f;
actor0->obj.pos.z += 100.0f;
}
if (gMsgCharIsPrinting && (gGameFrameCount & 2)) {
if (gMsgCharIsPrinting && ((gGameFrameCount & 2) != 0)) {
player->wings.unk_30 = 5.0f;
}
break;
@ -2746,14 +2745,14 @@ void Corneria_LevelStart(Player* player) {
D_ctx_80177A48[0] = 0.0f;
player->csTimer = 190;
}
if (gMsgCharIsPrinting && (gGameFrameCount & 2)) {
if (gMsgCharIsPrinting && ((gGameFrameCount & 2) != 0)) {
player->wings.unk_30 = 5.0f;
}
gCsCamEyeY = player->pos.y + 10.0f;
gCsCamAtY = player->pos.y + 10.0f;
break;
case 4:
if (gMsgCharIsPrinting && (gGameFrameCount & 2)) {
if (gMsgCharIsPrinting && ((gGameFrameCount & 2) != 0)) {
player->wings.unk_30 = 5.0f;
}
Math_SmoothStepToF(&D_ctx_80177A48[0], 0.1f, 1.0f, 0.001f, 0.0f);
@ -2774,7 +2773,7 @@ void Corneria_LevelStart(Player* player) {
Math_SmoothStepToF(&actor0->fwork[19], 50.0f, 0.1f, 3.0f, 0.01f);
}
actor0->fwork[20] = 0.0f;
if (gMsgCharIsPrinting && (gGameFrameCount & 2)) {
if (gMsgCharIsPrinting && ((gGameFrameCount & 2) != 0)) {
actor0->fwork[20] = 5.0f;
}
break;
@ -2814,7 +2813,7 @@ void Corneria_LevelStart(Player* player) {
Radio_PlayMessage(gMsg_ID_2030, RCID_PEPPY);
}
actor2->fwork[20] = 0.0f;
if (gMsgCharIsPrinting && (gGameFrameCount & 2)) {
if (gMsgCharIsPrinting && ((gGameFrameCount & 2) != 0)) {
actor2->fwork[20] = 5.0f;
}
break;
@ -2841,7 +2840,7 @@ void Corneria_LevelStart(Player* player) {
Math_SmoothStepToF(&actor1->fwork[19], -20.0f, 0.1f, 3.0f, 0.01f);
}
actor1->fwork[20] = 0.0f;
if (gMsgCharIsPrinting && (gGameFrameCount & 2)) {
if (gMsgCharIsPrinting && ((gGameFrameCount & 2) != 0)) {
actor1->fwork[20] = 5.0f;
}
break;
@ -2864,7 +2863,7 @@ void Corneria_LevelStart(Player* player) {
Radio_PlayMessage(gMsg_ID_2050, RCID_FOX);
}
player->wings.unk_30 = 0.0f;
if (gMsgCharIsPrinting && (gGameFrameCount & 2)) {
if (gMsgCharIsPrinting && ((gGameFrameCount & 2) != 0)) {
player->wings.unk_30 = 5.0f;
}
if (player->csTimer == 80) {

View File

@ -50,7 +50,7 @@ void Training_ItemRing_Update(ItemTrainingRing* this) {
case 1:
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) {
if (gPlayer[0].alternateView) {
this->obj.pos.z += (gPlayer[this->playerNum].trueZpos - 300.0f - this->obj.pos.z) * 0.05f;
} else {
this->obj.pos.z += ((gPlayer[this->playerNum].trueZpos - this->obj.pos.z) * 0.05f);

View File

@ -121,11 +121,11 @@ void Training_80199024(Actor* actor) {
}
} else if ((actor->obj.pos.y < (gGroundHeight + 50.0f)) && (var_fv0 > 180.0f)) {
var_fv0 = 0.0f;
actor->unk_0F4.x = 0.0f;
actor->rot_0F4.x = 0.0f;
}
Math_SmoothStepToAngle(&actor->unk_0F4.x, var_fv0, 0.5f, 1.0f, 0.0001f);
temp_fv1 = Math_SmoothStepToAngle(&actor->unk_0F4.y, actor->fwork[19], 0.5f, 1.0f, 0.0001f) * 30.0f;
Math_SmoothStepToAngle(&actor->rot_0F4.x, var_fv0, 0.5f, 1.0f, 0.0001f);
temp_fv1 = Math_SmoothStepToAngle(&actor->rot_0F4.y, actor->fwork[19], 0.5f, 1.0f, 0.0001f) * 30.0f;
if (temp_fv1 < 0.0f) {
var_fv0_2 = temp_fv1 * -1.0f;
@ -134,8 +134,8 @@ void Training_80199024(Actor* actor) {
}
Math_SmoothStepToAngle(&actor->obj.rot.z, var_fv0_2, 0.1f, 3.0f, 0.01f);
actor->obj.rot.x = -actor->unk_0F4.x;
actor->obj.rot.y = actor->unk_0F4.y;
actor->obj.rot.x = -actor->rot_0F4.x;
actor->obj.rot.y = actor->rot_0F4.y;
actor->vel.x = actor->fwork[13] + (sinRotY * (cosRotX * 35.0f));
actor->vel.y = actor->fwork[14] + (-sinRotX * 35.0f);
actor->vel.z = actor->fwork[12] + (cosRotY * (cosRotX * 35.0f));
@ -153,7 +153,7 @@ void Training_80199024(Actor* actor) {
radarMark->pos.x = actor->obj.pos.x;
radarMark->pos.y = actor->obj.pos.y;
radarMark->pos.z = actor->obj.pos.z;
radarMark->yRot = actor->unk_0F4.y + 180.0f;
radarMark->yRot = actor->rot_0F4.y + 180.0f;
if (actor->iwork[8] != 0) {
actor->iwork[8]--;
}
@ -197,10 +197,10 @@ void Training_8019949C(void) {
actor->obj.pos.x = sp38.x;
actor->obj.pos.y = 2000.0f;
actor->obj.pos.z = sp38.z;
actor->unk_0F4.y = gGameFrameCount * 6.0f;
actor->rot_0F4.y = gGameFrameCount * 6.0f;
actor->aiType = i + AI360_10;
actor->health = 24;
actor->unk_0C9 = actor->iwork[11] = 1;
actor->drawShadow = actor->iwork[11] = 1;
actor->timer_0C2 = 30;
Object_SetInfo(&actor->info, actor->obj.id);
AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4);

View File

@ -315,8 +315,8 @@ void Venom1_801924A8(Scenery* scenery) {
switch (scenery->state) {
case 0:
if (gPlayer[0].pos.z < scenery->obj.pos.z) {
D_ctx_80177AB0 = 0;
D_ctx_80177A98 = 0;
gDrawBackdrop = 0;
gDrawGround = false;
scenery->state++;
}
@ -628,7 +628,7 @@ void Venom1_80192CD4(Actor* actor) {
if (actor->iwork[1] > 0) {
gControllerRumbleFlags[0] = 1;
actor->iwork[1] -= 1;
actor->iwork[1]--;
}
switch (actor->state) {
@ -783,15 +783,15 @@ void Venom1_801933DC(Actor* actor) {
AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 0);
}
if ((actor->unk_0B6 == 38) || (actor->unk_0B6 == 58)) {
if ((actor->animFrame == 38) || (actor->animFrame == 58)) {
AUDIO_PLAY_SFX(NA_SE_OB_ARM_SWING, actor->sfxSource, 0);
}
Animation_GetFrameData(&D_VE1_900D098, actor->unk_0B6, actor->vwork);
Animation_GetFrameData(&D_VE1_900D098, actor->animFrame, actor->vwork);
if (actor->unk_0B6 < (Animation_GetFrameCount(&D_VE1_900D098) - 1)) {
actor->unk_0B6++;
if (actor->animFrame < (Animation_GetFrameCount(&D_VE1_900D098) - 1)) {
actor->animFrame++;
} else {
actor->unk_0B6 = 0;
actor->animFrame = 0;
}
hitboxData = actor->info.hitbox;
hitboxData[1 + (10 * 0) + 7] = actor->vwork[3].y;
@ -814,12 +814,12 @@ void Venom1_Boss319_Init(Boss319* this) {
s32 var_v0;
s32 j;
D_ctx_8017812C = 1;
gGroundClipMode = 1;
D_i1_8019C0B8 = 0;
D_i1_8019C0BC = 0;
D_i1_8019C0C0 = 0;
gBossActive = 1;
this->unk_05E = 1;
gBossActive = true;
this->drawShadow = true;
this->fwork[2] = D_i1_8019A04C[this->swork[13]][0];
this->fwork[14] = D_i1_8019A04C[this->swork[13]][1];
this->health = 100;
@ -1581,7 +1581,7 @@ void Venom1_Boss_Update(Boss* boss) {
if (boss->health <= 0) {
gScreenFlashTimer = 8;
gTeamLowHealthMsgTimer = -1;
D_ctx_8017828C = 1;
gKillEventActors = true;
AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, boss->sfxSource, 4);
boss->health = 0;
}
@ -1629,7 +1629,7 @@ void Venom1_Boss_Update(Boss* boss) {
if (boss->health <= 0) {
gScreenFlashTimer = 8;
gTeamLowHealthMsgTimer = -1;
D_ctx_8017828C = 1;
gKillEventActors = true;
AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, boss->sfxSource, 4);
boss->health = 0;
}
@ -1916,7 +1916,7 @@ void Venom1_Boss_Update(Boss* boss) {
AUDIO_PLAY_SFX(NA_SE_OB_VEBOSS_BOUND, boss->sfxSource, 4);
boss->swork[26] = 1;
boss->info.hitbox = gNoHitbox;
boss->unk_05E = 0;
boss->drawShadow = false;
func_effect_8007A568(boss->obj.pos.x, boss->obj.pos.y + 10.0f, boss->obj.pos.z, 40.0f);
gCameraShake = 40;
break;

View File

@ -214,7 +214,7 @@ void Meteo_80187C68(Actor* actor, f32 x, f32 y, f32 z, f32 arg4, f32 xRot, f32 y
actor->timer_0BC = timerBC;
actor->timer_0BE = 20;
actor->unk_0B4 = arg8;
actor->eventType = arg8;
actor->fwork[5] = arg4;
Object_SetInfo(&actor->info, actor->obj.id);
}
@ -366,22 +366,22 @@ void Meteo_80188344(Boss* boss) {
boss->obj.pos.z = gBosses[0].obj.pos.z;
boss->obj.rot.x = gBosses[0].obj.rot.x;
boss->obj.rot.y = gBosses[0].obj.rot.y;
boss->obj.rot.z = (gBosses[0].obj.rot.z + boss->unk_078.z) + 45.0f + 180.0f;
boss->obj.rot.z = gBosses[0].obj.rot.z + boss->rot_078.z + 45.0f + 180.0f;
}
switch (boss->state) {
case 0:
boss->timer_050 = 150;
boss->unk_078.z += 2.5f;
boss->rot_078.z += 2.5f;
break;
case 1:
temp = fabsf(90.0f - boss->unk_078.z) * 0.1f;
temp = fabsf(90.0f - boss->rot_078.z) * 0.1f;
if (temp > 2.5f) {
temp = 2.5f;
}
boss->unk_078.z += temp;
boss->rot_078.z += temp;
if (boss->timer_050 == 0) {
boss->state = 2;
@ -398,7 +398,7 @@ void Meteo_80188344(Boss* boss) {
Audio_SetTransposeAndPlaySfx(boss->sfxSource, NA_SE_EN_GRN_BEAM_CHARGE, boss->unk_04A);
boss->unk_04A++;
if (boss->unk_04A >= 8) {
if (boss->unk_04A > 7) {
boss->unk_04A = 7;
}
@ -459,11 +459,11 @@ void Meteo_80188344(Boss* boss) {
break;
}
if (boss->unk_078.z >= 360.0f) {
boss->unk_078.z -= 360.0f;
if (boss->rot_078.z >= 360.0f) {
boss->rot_078.z -= 360.0f;
}
if (boss->unk_078.z < 0.0f) {
boss->unk_078.z += 360.0f;
if (boss->rot_078.z < 0.0f) {
boss->rot_078.z += 360.0f;
}
}
@ -506,7 +506,7 @@ void Meteo_Boss297_Init(Boss297* this) {
AUDIO_PLAY_BGM(D_boss_800C9E90[gCurrentLevel]);
gBossActive = 1;
gBossActive = true;
this->swork[2] = 40;
this->swork[3] = 40;
@ -792,7 +792,7 @@ void Meteo_8018978C(Boss* boss) {
Matrix_RotateX(gCalcMatrix, boss->obj.rot.x * M_DTOR, MTXF_APPLY);
Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, MTXF_APPLY);
if (gGameFrameCount & 0x10) {
if ((gGameFrameCount & 0x10) != 0) {
boss->swork[19] += 32;
if (boss->swork[19] > 128) {
boss->swork[19] = 128;
@ -875,7 +875,7 @@ void Meteo_8018978C(Boss* boss) {
if (boss[0].swork[2 + boss->dmgPart] <= 0) {
boss[0].swork[2 + boss->dmgPart] = 0;
Meteo_801892F0(boss, boss->dmgPart);
boss->swork[20] += 1;
boss->swork[20]++;
if (boss->swork[20] == 2) {
Radio_PlayMessage(gMsg_ID_17160, RCID_PEPPY);
}
@ -1171,15 +1171,15 @@ void Meteo_8018978C(Boss* boss) {
boss->obj.rot.z += 0.1f;
}
if (boss->swork[3] == 0) {
var_v0 += 1;
var_v0++;
boss->obj.rot.z += 0.1f;
}
if (boss->swork[4] == 0) {
var_v0 += 1;
var_v0++;
boss->obj.rot.z += 0.1f;
}
if (boss->swork[5] == 0) {
var_v0 += 1;
var_v0++;
boss->obj.rot.z += 0.1f;
}
if (var_v0 == 4) {
@ -1198,7 +1198,7 @@ void Meteo_8018978C(Boss* boss) {
if (boss->fwork[2] > 0.0f) {
boss->fwork[2] -= 2.0f;
gBosses[boss->unk_044].unk_078.z -= 2.0f;
gBosses[boss->unk_044].rot_078.z -= 2.0f;
}
}
@ -1781,12 +1781,12 @@ void Meteo_8018C77C(Actor* actor, s32 arg1) {
actor->obj.pos.y = D_i2_80195594[arg1] + gPlayer[0].pos.y;
actor->obj.pos.z = D_i2_801955A4[arg1] + gPlayer[0].trueZpos;
actor->unk_0B6 = D_i2_801955B4[arg1];
actor->animFrame = D_i2_801955B4[arg1];
actor->obj.rot.y = 180.0f;
Object_SetInfo(&actor->info, actor->obj.id);
actor->info.cullDistance = 200.0f;
if (actor->unk_0B6 == 0) {
if (actor->animFrame == 0) {
actor->iwork[11] = 1;
AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4);
return;
@ -1838,7 +1838,7 @@ void Meteo_8018CAD8(void) {
actor->obj.pos.x = 0.0f;
actor->obj.pos.y = 0.0f;
actor->obj.pos.z = 9000.0f;
actor->unk_0B6 = 10;
actor->animFrame = 10;
actor->obj.id = OBJ_ACTOR_CUTSCENE;
Object_SetInfo(&actor->info, actor->obj.id);
}
@ -2191,15 +2191,15 @@ void Meteo_8018DF08(Actor* actor, s32 idx) {
actor->obj.pos.y = D_i2_801955D0[idx].y + gPlayer[0].pos.y;
actor->obj.pos.z = D_i2_801955D0[idx].z + gPlayer[0].trueZpos;
actor->unk_0F4.y = 0.0f;
actor->unk_0F4.z = D_i2_80195600[idx];
actor->rot_0F4.y = 0.0f;
actor->rot_0F4.z = D_i2_80195600[idx];
Object_SetInfo(&actor->info, actor->obj.id);
if (idx == 3) {
AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0);
AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, actor->sfxSource, 0);
actor->unk_0B6 = 1;
actor->animFrame = 1;
} else {
actor->iwork[11] = 1;
AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4);
@ -2489,7 +2489,7 @@ void Meteo_8018ED9C(Actor* actor) {
Math_SmoothStepToF(&actor->obj.pos.x, actor->vwork[0].x, 0.02f, 50.0f, 0.0001f);
Math_SmoothStepToF(&actor->obj.pos.y, actor->vwork[0].y, 0.02f, 50.0f, 0.0001f);
Math_SmoothStepToF(&actor->obj.pos.z, actor->vwork[0].z, 0.02f, 50.0f, 0.0001f);
Math_SmoothStepToF(&actor->unk_0F4.z, 0.0f, 0.03f, 0.5f, 0.0001f);
Math_SmoothStepToF(&actor->rot_0F4.z, 0.0f, 0.03f, 0.5f, 0.0001f);
break;
case 1:
@ -2501,15 +2501,15 @@ void Meteo_8018ED9C(Actor* actor) {
case 2:
actor->iwork[11] = 2;
actor->fwork[0] += 2.0f;
actor->unk_0F4.x += 0.1f;
actor->rot_0F4.x += 0.1f;
if (actor->timer_0BC == 0) {
Object_Kill(&actor->obj, actor->sfxSource);
}
break;
}
Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + 180.0f) * M_DTOR, 0U);
Matrix_RotateX(gCalcMatrix, -(actor->unk_0F4.x * M_DTOR), 1U);
Matrix_RotateY(gCalcMatrix, (actor->rot_0F4.y + 180.0f) * M_DTOR, 0U);
Matrix_RotateX(gCalcMatrix, -(actor->rot_0F4.x * M_DTOR), 1U);
sp3C.x = 0.0f;
sp3C.y = 0.0f;
@ -2521,7 +2521,7 @@ void Meteo_8018ED9C(Actor* actor) {
actor->vel.y = sp30.y;
actor->vel.z = sp30.z;
actor->obj.rot.x = -actor->unk_0F4.x;
actor->obj.rot.y = actor->unk_0F4.y + 180.0f;
actor->obj.rot.z = -actor->unk_0F4.z;
actor->obj.rot.x = -actor->rot_0F4.x;
actor->obj.rot.y = actor->rot_0F4.y + 180.0f;
actor->obj.rot.z = -actor->rot_0F4.z;
}

View File

@ -24,7 +24,7 @@ void SectorX_8018F030(void) {
Actor_Initialize(actor);
actor->obj.status = OBJ_INIT;
actor->obj.id = OBJ_ACTOR_SLIPPY_SX;
actor->unk_0B6 = 1;
actor->animFrame = 1;
actor->obj.rot.y = 180.0f;
actor->obj.pos.x = gPlayer[0].cam.eye.x - 300.0f;
actor->obj.pos.y = gPlayer[0].cam.eye.y + 200.0f;
@ -44,7 +44,7 @@ void SectorX_8018F124(void) {
Actor_Initialize(actor);
actor->obj.status = OBJ_INIT;
actor->obj.id = OBJ_ACTOR_SLIPPY_SX;
actor->unk_0B6 = -1;
actor->animFrame = -1;
actor->obj.pos.x = gPlayer[0].cam.eye.x + 3000.0f;
actor->obj.pos.y = gPlayer[0].cam.eye.y - 3000.0f;
actor->obj.pos.z = gPlayer[0].pos.z + 30000.0f;
@ -59,33 +59,33 @@ void SectorX_8018F1DC(Actor* actor) {
src.x = 0.0f;
src.y = 0.0f;
src.z = 100.0f;
Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + 180.0f) * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, actor->unk_0F4.x * M_DTOR, MTXF_APPLY);
Matrix_RotateY(gCalcMatrix, (actor->rot_0F4.y + 180.0f) * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, actor->rot_0F4.x * M_DTOR, MTXF_APPLY);
Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest);
Actor_SpawnPlayerLaser(actor->index, actor->obj.pos.x + (dest.x * 1.5), actor->obj.pos.y + (dest.y * 1.5),
actor->obj.pos.z + (dest.z * 1.5), dest.x, dest.y, dest.z, actor->unk_0F4.x,
actor->unk_0F4.y + 180.0f, 0.0f);
actor->obj.pos.z + (dest.z * 1.5), dest.x, dest.y, dest.z, actor->rot_0F4.x,
actor->rot_0F4.y + 180.0f, 0.0f);
}
void SectorX_8018F330(Actor* actor) {
f32 sp34;
switch (actor->unk_0B6) {
switch (actor->animFrame) {
case 0:
actor->obj.rot.x += 7.0f;
actor->obj.rot.y += 5.0f;
break;
case 1:
actor->unk_0F4.z += 3.0f;
actor->obj.rot.z = SIN_DEG(actor->unk_0F4.z + 90.0f) * 60.0f;
actor->rot_0F4.z += 3.0f;
actor->obj.rot.z = SIN_DEG(actor->rot_0F4.z + 90.0f) * 60.0f;
sp34 = fabsf(actor->obj.pos.z - gBosses[0].obj.pos.z) * 0.1f;
Math_SmoothStepToF(&actor->obj.pos.x, gBosses[0].obj.pos.x + SIN_DEG(actor->unk_0F4.z) * sp34, 0.1f, 20.0f,
Math_SmoothStepToF(&actor->obj.pos.x, gBosses[0].obj.pos.x + SIN_DEG(actor->rot_0F4.z) * sp34, 0.1f, 20.0f,
0.0f);
Math_SmoothStepToF(&actor->obj.pos.y, gBosses[0].obj.pos.y, 0.1f, 20.0f, 0.0f);
Math_SmoothStepToF(&actor->obj.pos.z, gBosses[0].obj.pos.z, 1.0f, 55.0f, 0);
if (gBosses[0].state == 20) {
actor->unk_0B6 = 10;
actor->animFrame = 10;
break;
}
@ -94,7 +94,7 @@ void SectorX_8018F330(Actor* actor) {
}
if ((gBosses[0].unk_04C == 75) && (gBosses[0].state == 85)) {
actor->unk_0B6 = 2;
actor->animFrame = 2;
actor->vel.x = 10.0f;
actor->vel.y = -10.0f;
actor->vel.z = 30.0f;
@ -133,7 +133,7 @@ void SectorX_8018F330(Actor* actor) {
Math_SmoothStepToF(&gPlayer[0].cam.eye.y, actor->obj.pos.y, actor->fwork[1], 20.0f, 0.0f);
if (actor->timer_0BC == 0) {
gPlayer[0].state_1C8 = PLAYERSTATE_1C8_ACTIVE;
if (gPlayer[0].cockpitView) {
if (gPlayer[0].alternateView) {
Camera_UpdateCockpitOnRails(&gPlayer[0], 1);
}
gProjectFar = 12800.0f;
@ -152,7 +152,7 @@ void SectorX_8018F330(Actor* actor) {
}
void SectorX_8018F884(Actor* actor) {
switch (actor->unk_0B6) {
switch (actor->animFrame) {
case 0:
gSPDisplayList(gMasterDisp++, D_SX_6020D20);
break;
@ -228,7 +228,7 @@ void SectorX_8018FBBC(Vec3f* pos) {
(fabsf(pos->z - actor->obj.pos.z) < 2500.0f) && (actor->state != 1000) && (actor->timer_0C2 == 0) &&
(actor->scale < 0.0f) &&
Object_CheckHitboxCollision(pos, actor->info.hitbox, &actor->obj, actor->vwork[29].x, actor->vwork[29].y,
actor->vwork[29].z + actor->unk_0F4.z)) {
actor->vwork[29].z + actor->rot_0F4.z)) {
Play_PlaySfxFirstPlayer(actor->sfxSource, NA_SE_SLIPPY_HIT);
actor->state = 1000;
xRot = Math_Atan2F(actor->obj.pos.x - pos->x, actor->obj.pos.z - pos->z);
@ -511,7 +511,7 @@ void SectorX_80190078(Boss* boss) {
boss->swork[3] = 400;
boss->health = 300;
boss->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SX_6032550);
gBossActive = 1;
gBossActive = true;
AUDIO_PLAY_BGM(D_boss_800C9E90[gCurrentLevel]);
boss->swork[6] = 1;
boss->fwork[44] = 5.0f;
@ -957,7 +957,7 @@ void SectorX_80190078(Boss* boss) {
} else {
boss->state = 35;
boss->timer_050 = 400;
boss->fwork[42] = boss->fwork[43] = boss->fwork[44] = boss->unk_078.y = 0.0f;
boss->fwork[42] = boss->fwork[43] = boss->fwork[44] = boss->rot_078.y = 0.0f;
boss->swork[9] = RAND_INT(1.9f);
Radio_PlayMessage(gMsg_ID_5498, RCID_BOSS_SECTORX);
}
@ -1004,8 +1004,8 @@ void SectorX_80190078(Boss* boss) {
Math_SmoothStepToVec3fArray(sp80, boss->vwork, 1, frameData, boss->fwork[0], 5.0f, 0.0f);
Math_SmoothStepToF(&boss->fwork[0], 0.1f, 1.0f, 0.001f, 0);
Math_SmoothStepToF(&boss->unk_078.y, 10.0f, 1.0f, 0.1f, 0);
Math_SmoothStepToF(&boss->obj.rot.y, 2880.0f, 0.1f, boss->unk_078.y, 0.1f);
Math_SmoothStepToF(&boss->rot_078.y, 10.0f, 1.0f, 0.1f, 0);
Math_SmoothStepToF(&boss->obj.rot.y, 2880.0f, 0.1f, boss->rot_078.y, 0.1f);
if ((boss->timer_050 == 0) && (boss->obj.rot.y == 2880.0f)) {
boss->obj.rot.y = 0.0f;
@ -1418,7 +1418,7 @@ void SectorX_80193800(Actor* actor, s32 arg1) {
actor->obj.pos.z = D_i2_801956B0[arg1].z;
actor->vel.z = 30.0f;
actor->vel.y = -16.0f;
actor->unk_0B6 = 20;
actor->animFrame = 20;
actor->obj.rot.x = 15.0f;
Object_SetInfo(&actor->info, actor->obj.id);
@ -1506,7 +1506,7 @@ void SectorX_LevelStart(Player* player) {
func_effect_80079618(gActors[5].obj.pos.x, gActors[5].obj.pos.y, gActors[5].obj.pos.z, 0.5f);
}
func_effect_8007A6F0(&gActors[5].obj.pos, NA_SE_EN_EXPLOSION_M);
player->csState += 1;
player->csState++;
D_ctx_80177A48[0] = 0.1f;
}
break;
@ -1515,7 +1515,7 @@ void SectorX_LevelStart(Player* player) {
if (gCsFrameCount == 170) {
player->pos.x = 0.0f;
player->pos.y = player->cam.eye.y + 50.0f;
player->csState += 1;
player->csState++;
player->pos.z = player->cam.eye.z + 20.0f;
player->unk_194 = 10.0f;
player->unk_190 = 10.0f;
@ -1561,7 +1561,7 @@ void SectorX_LevelStart(Player* player) {
}
if (gCsFrameCount > 300) {
player->csState += 1;
player->csState++;
player->csTimer = 40;
D_ctx_80177A48[0] = 0.0f;
gActors[0].obj.pos.z -= player->pos.z;
@ -1660,7 +1660,7 @@ void SectorX_801944D4(Actor* actor, s32 arg1) {
actor->obj.id = OBJ_ACTOR_CUTSCENE;
Object_SetInfo(&actor->info, actor->obj.id);
if (arg1 == 3) {
actor->unk_0B6 = 1;
actor->animFrame = 1;
actor->state = 20;
actor->obj.rot.x = -player->rot.x - 10.0f;
actor->obj.rot.y = (player->rot.y + 180.0f) - 10.0f;
@ -1688,13 +1688,13 @@ void SectorX_LevelComplete(Player* player) {
Math_SmoothStepToAngle(&player->aerobaticPitch, 0.0f, 0.1f, 20.0f, 0.0f);
Math_SmoothStepToF(&player->boostSpeed, 0.0f, 0.1f, 3.0f, 0.0f);
D_ctx_80178430 += 0.2f;
D_ctx_8017842C -= 0.2f;
gStarfieldScrollY += 0.2f;
gStarfieldScrollX -= 0.2f;
switch (player->csState) {
case 0:
Audio_StopSfxByBankAndSource(1, player->sfxSource);
player->csState += 1;
player->csState++;
D_ctx_80177A48[1] = 0.05f;
D_ctx_80177A48[0] = 0.02f;
D_ctx_80177A48[2] = 0.0f;

View File

@ -451,7 +451,7 @@ void Area6_80187530(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 fwork6, f32
actor->obj.rot.y = yRot;
actor->timer_0BC = timer0BC;
actor->timer_0BE = 20;
actor->unk_0B4 = unk0B4;
actor->eventType = unk0B4;
actor->fwork[5] = fwork6;
Object_SetInfo(&actor->info, actor->obj.id);
func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_BARREL_SHOT);
@ -497,7 +497,7 @@ void Area6_BossA6_Init(BossA6* this) {
Hitbox* hitbox;
s32 i;
gBossActive = 1;
gBossActive = true;
gProjectFar = 25000.0f;
gBossFrameCount = 0;
this->health = 780;
@ -795,10 +795,10 @@ void Area6_Boss_Update(Boss* bossA6) {
pitch_110 = Math_Atan2F(dy_118, sqrtf(SQ(dx_11C) + SQ(dz_114)));
pitch_110 = Math_RadToDeg(-pitch_110);
Math_SmoothStepToAngle(&bossA6->unk_078.y, yaw_10C, 1.0f, sp104, 0.00001f);
Math_SmoothStepToAngle(&bossA6->unk_078.x, pitch_110, 1.0f, sp104, 0.00001f);
Matrix_RotateY(gCalcMatrix, bossA6->unk_078.y * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, bossA6->unk_078.x * M_DTOR, MTXF_APPLY);
Math_SmoothStepToAngle(&bossA6->rot_078.y, yaw_10C, 1.0f, sp104, 0.00001f);
Math_SmoothStepToAngle(&bossA6->rot_078.x, pitch_110, 1.0f, sp104, 0.00001f);
Matrix_RotateY(gCalcMatrix, bossA6->rot_078.y * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, bossA6->rot_078.x * M_DTOR, MTXF_APPLY);
sp98.x = sp98.y = 0.0f;
sp98.z = 30.0f;
@ -1717,7 +1717,7 @@ void Area6_8018B9BC(Boss* bossA6) {
if (D_i3_801C2250[A6_BSS_0] == 0) {
for (i = 3, j = 15; j < 18; j++, i++) {
if (bossA6->swork[A6_SWK_0 + j] != 0) {
if ((D_ctx_8017812C != 0) && (gPlayerShots[15].timer > 0)) {
if ((gGroundClipMode != 0) && (gPlayerShots[15].timer > 0)) {
bossA6->swork[A6_SWK_0 + j] -= bossA6->damage;
} else if (i + 1 == bossA6->dmgPart) {
bossA6->swork[A6_SWK_0 + j] -= bossA6->damage;
@ -1902,7 +1902,7 @@ void Area6_Boss_Draw(Boss* bossA6) {
Matrix_RotateZ(gCalcMatrix, gGameFrameCount * 6.0f * M_DTOR, MTXF_NEW);
Matrix_MultVec3f(gCalcMatrix, &spAC, &spB8);
Matrix_Translate(gGfxMatrix, spB8.x, spB8.y, 0.0f, MTXF_APPLY);
Matrix_Scale(gGfxMatrix, bossA6->unk_3F8, bossA6->unk_3F8, bossA6->unk_3F8, MTXF_APPLY);
Matrix_Scale(gGfxMatrix, bossA6->scale, bossA6->scale, bossA6->scale, MTXF_APPLY);
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 10.0f * M_DTOR, MTXF_APPLY);
Matrix_Scale(gGfxMatrix, bossA6->fwork[A6_FWK_34], bossA6->fwork[A6_FWK_35], 1.0f, MTXF_APPLY);
Matrix_RotateZ(gGfxMatrix, -(f32) gGameFrameCount * 10.0f * M_DTOR, MTXF_APPLY);
@ -1920,7 +1920,7 @@ void Area6_Boss_Draw(Boss* bossA6) {
spD0[4].z -= bossA6->fwork[A6_FWK_0];
spD0[5].z -= bossA6->fwork[A6_FWK_0];
Animation_DrawSkeleton(1, D_A6_6018BA0, spD0, NULL, NULL, &bossA6->index, &gIdentityMatrix);
if (bossA6->unk_3F8 >= 1.0f) {
if (bossA6->scale >= 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 % 4) == 0) &&
@ -2112,7 +2112,7 @@ void Area6_8018D5C8(void) {
gActors[i].obj.pos.x = 1600.0f;
gActors[i].obj.pos.y = 3750.0f;
gActors[i].obj.pos.z = 13000.0f;
gActors[i].unk_0B6 = 1;
gActors[i].animFrame = 1;
gActors[i].state = 90;
gActors[i].fwork[0] = 0.0f;
gActors[i].obj.id = OBJ_ACTOR_CUTSCENE;
@ -2133,9 +2133,9 @@ void Area6_8018D694(Actor* actor, s32 arg1) {
actor->obj.pos.y = sp2C[arg1].y + 350.0f;
actor->obj.pos.z = sp2C[arg1].z + 1000.0f;
actor->state = 1;
actor->unk_0B6 = 28;
actor->animFrame = 28;
actor->iwork[11] = 1;
actor->unk_0F4.y = 90.0f;
actor->rot_0F4.y = 90.0f;
actor->fwork[0] = 1.5f;
actor->fwork[7] = RAND_FLOAT_SEEDED(360.0f);
actor->fwork[8] = RAND_FLOAT_SEEDED(360.0f);
@ -2196,19 +2196,19 @@ void Area6_8018DA58(Actor* actor) {
switch (actor->state) { /* irregular */
case 1:
actor->fwork[7] += 2.5f;
actor->unk_0F4.z = SIN_DEG(actor->fwork[7]) * 10.0f;
actor->rot_0F4.z = SIN_DEG(actor->fwork[7]) * 10.0f;
actor->fwork[8] += 1.0f;
actor->obj.pos.y += SIN_DEG(actor->fwork[8]) * 1.5f;
actor->fwork[9] += 1.0f;
actor->obj.pos.z += COS_DEG(actor->fwork[9]) * 1.5f;
break;
case 2:
Math_SmoothStepToF(&actor->unk_0F4.z, -180.0f, 0.1f, 3.0f, 0.0f);
Math_SmoothStepToF(&actor->rot_0F4.z, -180.0f, 0.1f, 3.0f, 0.0f);
break;
case 3:
Math_SmoothStepToF(&actor->unk_0F4.z, -45.0f, 0.05f, 2.0f, 0.0f);
Math_SmoothStepToAngle(&actor->unk_0F4.y, 340.0f, 0.05f, 2.4f, 0.0f);
Math_SmoothStepToF(&actor->unk_0F4.x, 3.0f, 0.05f, 1.0f, 0.0f);
Math_SmoothStepToF(&actor->rot_0F4.z, -45.0f, 0.05f, 2.0f, 0.0f);
Math_SmoothStepToAngle(&actor->rot_0F4.y, 340.0f, 0.05f, 2.4f, 0.0f);
Math_SmoothStepToF(&actor->rot_0F4.x, 3.0f, 0.05f, 1.0f, 0.0f);
Math_SmoothStepToF(&actor->fwork[0], 30.0f, 0.1f, 3.0f, 0.0f);
break;
case 6:
@ -2248,9 +2248,9 @@ void Area6_8018DA58(Actor* actor) {
if (sp40 > 180.0f) {
sp40 = 0.0f;
}
sp38 = Math_SmoothStepToAngle(&actor->unk_0F4.y, sp3C, 0.5f, 2.0f, 0.0001f) * 30.0f;
Math_SmoothStepToAngle(&actor->unk_0F4.x, sp40, 0.5f, 2.0f, 0.0001f);
Math_SmoothStepToAngle(&actor->unk_0F4.z, sp38, 0.1f, 5.0f, 0.0001f);
sp38 = Math_SmoothStepToAngle(&actor->rot_0F4.y, sp3C, 0.5f, 2.0f, 0.0001f) * 30.0f;
Math_SmoothStepToAngle(&actor->rot_0F4.x, sp40, 0.5f, 2.0f, 0.0001f);
Math_SmoothStepToAngle(&actor->rot_0F4.z, sp38, 0.1f, 5.0f, 0.0001f);
break;
case 91:
Math_SmoothStepToF(&actor->obj.pos.y, 0.0f, 0.1f, 5.0f, 0.1f);
@ -2259,8 +2259,8 @@ void Area6_8018DA58(Actor* actor) {
case 90:
break;
}
Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + 180.0f) * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, -(actor->unk_0F4.x * M_DTOR), MTXF_APPLY);
Matrix_RotateY(gCalcMatrix, (actor->rot_0F4.y + 180.0f) * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, -(actor->rot_0F4.x * M_DTOR), MTXF_APPLY);
sp5C.x = 0.0f;
sp5C.y = 0.0f;
sp5C.z = actor->fwork[0];
@ -2268,9 +2268,9 @@ void Area6_8018DA58(Actor* actor) {
actor->vel.x = sp50.x;
actor->vel.y = sp50.y;
actor->vel.z = sp50.z;
actor->obj.rot.x = -actor->unk_0F4.x;
actor->obj.rot.y = actor->unk_0F4.y + 180.0f;
actor->obj.rot.z = -actor->unk_0F4.z;
actor->obj.rot.x = -actor->rot_0F4.x;
actor->obj.rot.y = actor->rot_0F4.y + 180.0f;
actor->obj.rot.z = -actor->rot_0F4.z;
}
void Area6_LevelStart(Player* player) {
@ -2479,7 +2479,7 @@ void Area6_8018EA88(Actor* actor) {
actor->obj.pos.x = 0.0f;
actor->obj.pos.y = 0.0f;
actor->obj.pos.z = gBosses[0].obj.pos.z + 500.0f;
actor->unk_0B6 = 37;
actor->animFrame = 37;
actor->state = 100;
actor->iwork[0] = 255;
actor->iwork[1] = 255;
@ -2503,7 +2503,7 @@ void Area6_8018EB3C(Actor* actor) {
actor->obj.pos.x = player->pos.x;
actor->obj.pos.y = player->pos.y + 600.0f;
actor->obj.pos.z = player->pos.z + 2800.0f;
actor->unk_0B6 = 1;
actor->animFrame = 1;
actor->state = 100;
actor->fwork[0] = 0.0f;
Object_SetInfo(&actor->info, actor->obj.id);
@ -2741,7 +2741,7 @@ void Area6_LevelComplete(Player* player) {
gPrevPlanetTeamShields[i] = 255;
}
}
D_ctx_80161A94[0] = gGoldRingCount[0];
gSavedGoldRingCount[0] = gGoldRingCount[0];
Audio_StopPlayerNoise(0);
Audio_KillSfxBySource(player->sfxSource);
Play_ClearObjectData();

View File

@ -330,8 +330,8 @@ void Aquas_801A92EC(Actor* actor, f32 xUnk, f32 yUnk, f32 zUnk, s32 index, s32 m
gTexturedLines[index].posBB.x = xUnk;
gTexturedLines[index].posBB.y = yUnk;
gTexturedLines[index].posBB.z = zUnk;
gTexturedLines[index].red = gTexturedLines[index].green = gTexturedLines[index].blue = gTexturedLines[index].alpha =
255;
gTexturedLines[index].prim.r = gTexturedLines[index].prim.g = gTexturedLines[index].prim.b =
gTexturedLines[index].prim.a = 255;
gTexturedLines[index].timer = 3;
}
@ -1457,7 +1457,7 @@ void Aquas_BlueMarineBoost(Player* player) {
player->meteoWarpSpinSpeed = 50.0f;
}
if (((gGameFrameCount % 2) == 0) && (gBlurAlpha > 64)) {
gBlurAlpha -= 1;
gBlurAlpha -= 1; // can't be --
}
} else {
player->meteoWarpSpinSpeed = 0.0f;
@ -1567,9 +1567,9 @@ void Aquas_801AD598(Actor* actor) {
D_i3_801C27C0->rot.x = actor->obj.rot.x;
D_i3_801C27C0->rot.y = actor->obj.rot.y;
D_i3_801C27C0->rot.z = actor->obj.rot.z;
D_i3_801C27C0->rot.x = actor->unk_0F4.x;
D_i3_801C27C0->rot.y = actor->unk_0F4.y;
D_i3_801C27C0->rot.z = actor->unk_0F4.z;
D_i3_801C27C0->rot.x = actor->rot_0F4.x;
D_i3_801C27C0->rot.y = actor->rot_0F4.y;
D_i3_801C27C0->rot.z = actor->rot_0F4.z;
}
}
@ -1605,18 +1605,18 @@ void Aquas_801AD6C0(Actor* actor) {
Object_Kill(&actor->obj, actor->sfxSource);
}
actor->unk_04E++;
actor->counter_04E++;
if (actor->unk_04E >= 50) {
actor->unk_04E = 0;
if (actor->counter_04E >= 50) {
actor->counter_04E = 0;
}
switch (actor->state) {
case 0:
if (actor->timer_0BC != 0) {
actor->unk_0F4.x += D_i3_801C4308[10];
actor->unk_0F4.z += 10.0f;
actor->unk_0F4.z = Math_ModF(actor->unk_0F4.z, 360.0f);
actor->rot_0F4.x += D_i3_801C4308[10];
actor->rot_0F4.z += 10.0f;
actor->rot_0F4.z = Math_ModF(actor->rot_0F4.z, 360.0f);
} else {
actor->health = 30;
AUDIO_PLAY_SFX(NA_SE_EN_SANADA_SWIM, actor->sfxSource, 4);
@ -1661,8 +1661,8 @@ void Aquas_801AD6C0(Actor* actor) {
actor->fwork[6] = (actor->iwork[0] + 1) * 0.2f;
sp7C = SIN_DEG(actor->fwork[0]) * sp70 * actor->fwork[5];
sp74 = COS_DEG(actor->fwork[1]) * sp70 * actor->fwork[6];
sp80 = COS_DEG(actor->unk_0F4.y) * sp74;
sp78 = -SIN_DEG(actor->unk_0F4.y) * sp74;
sp80 = COS_DEG(actor->rot_0F4.y) * sp74;
sp78 = -SIN_DEG(actor->rot_0F4.y) * sp74;
if (sp7C < 20.0f) {
sp7C = 20.0f;
@ -1672,10 +1672,10 @@ void Aquas_801AD6C0(Actor* actor) {
actor->fwork[2] = 360.0f;
}
Math_SmoothStepToF(&actor->unk_0F4.z, actor->fwork[2], 0.1f, 10.0f, 0.001f);
Math_SmoothStepToF(&actor->rot_0F4.z, actor->fwork[2], 0.1f, 10.0f, 0.001f);
if (actor->unk_0F4.z >= 360.0f) {
actor->unk_0F4.z = 0.0f;
if (actor->rot_0F4.z >= 360.0f) {
actor->rot_0F4.z = 0.0f;
actor->fwork[2] = 0.0f;
}
@ -1684,14 +1684,14 @@ void Aquas_801AD6C0(Actor* actor) {
sp6C = Math_RadToDeg(-Math_Atan2F(gPlayer[0].pos.y - 30.0f + sp7C - actor->obj.pos.y, sp70));
if (gPlayer[0].trueZpos <= actor->obj.pos.z) {
sp68 = actor->unk_0F4.y;
sp6C = actor->unk_0F4.x;
sp68 = actor->rot_0F4.y;
sp6C = actor->rot_0F4.x;
}
Math_SmoothStepToAngle(&actor->unk_0F4.y, sp68, 1.0f, 5.0f, 0.001f);
Math_SmoothStepToAngle(&actor->unk_0F4.x, sp6C, 1.0f, 5.0f, 0.001f);
Matrix_RotateY(gCalcMatrix, actor->unk_0F4.y * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, actor->unk_0F4.x * M_DTOR, MTXF_APPLY);
Math_SmoothStepToAngle(&actor->rot_0F4.y, sp68, 1.0f, 5.0f, 0.001f);
Math_SmoothStepToAngle(&actor->rot_0F4.x, sp6C, 1.0f, 5.0f, 0.001f);
Matrix_RotateY(gCalcMatrix, actor->rot_0F4.y * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, actor->rot_0F4.x * M_DTOR, MTXF_APPLY);
sp5C.x = 0.0f;
sp5C.y = 0.0f;
@ -1710,7 +1710,7 @@ void Aquas_801AD6C0(Actor* actor) {
actor->timer_0C6 = 15;
}
if (actor->timer_0BC == 0) {
var_v0 = actor->iwork[0] * 50 + actor->unk_04E - D_i3_801BFB64[actor->iwork[1]];
var_v0 = actor->iwork[0] * 50 + actor->counter_04E - D_i3_801BFB64[actor->iwork[1]];
if (var_v0 < actor->iwork[0] * 50) {
if (var_v0 > 0) {
var_v0 -= actor->iwork[0] * 50;
@ -1732,13 +1732,13 @@ void Aquas_801AD6C0(Actor* actor) {
}
break;
}
D_i3_801C27C0 = &D_i3_801C27C8[50 * actor->iwork[0] + actor->unk_04E];
D_i3_801C27C0 = &D_i3_801C27C8[50 * actor->iwork[0] + actor->counter_04E];
D_i3_801C27C0->pos.x = actor->obj.pos.x;
D_i3_801C27C0->pos.y = actor->obj.pos.y;
D_i3_801C27C0->pos.z = actor->obj.pos.z;
D_i3_801C27C0->rot.x = actor->unk_0F4.x;
D_i3_801C27C0->rot.y = actor->unk_0F4.y;
D_i3_801C27C0->rot.z = actor->unk_0F4.z;
D_i3_801C27C0->rot.x = actor->rot_0F4.x;
D_i3_801C27C0->rot.y = actor->rot_0F4.y;
D_i3_801C27C0->rot.z = actor->rot_0F4.z;
}
void Aquas_801ADF7C(f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 zRot, u8 type, s32 flag, f32 scale,
@ -1787,7 +1787,7 @@ void Aquas_801AE168(Actor* actor) {
i = 1;
}
index = ((actor->iwork[0] * 50) + actor->unk_04E) - D_i3_801BFB64[i];
index = ((actor->iwork[0] * 50) + actor->counter_04E) - D_i3_801BFB64[i];
if (index < (actor->iwork[0] * 50)) {
if (index > 0) {
@ -2201,11 +2201,11 @@ void Aquas_801AFA5C(Actor* actor) {
sp48->obj.pos.x = actor->obj.pos.x;
sp48->obj.pos.y = actor->obj.pos.y;
sp48->obj.pos.z = actor->obj.pos.z;
sp48->obj.rot.x = sp48->unk_0F4.x =
sp48->obj.rot.x = sp48->rot_0F4.x =
Math_ModF(actor->obj.rot.x + 270.0f + D_i3_801BFC7C[actor->iwork[0]], 360.0f);
sp48->obj.rot.y = sp48->unk_0F4.y =
sp48->obj.rot.y = sp48->rot_0F4.y =
Math_ModF(actor->obj.rot.y + D_i3_801BFC88[actor->iwork[0]], 360.0f);
sp48->unk_0F4.z = actor->obj.rot.z;
sp48->rot_0F4.z = actor->obj.rot.z;
sp48->obj.rot.z = actor->obj.rot.z;
sp48->timer_0BC = 10;
Object_SetInfo(&sp48->info, sp48->obj.id);
@ -2460,7 +2460,7 @@ void Aquas_BossAq_Init(BossAQ* this) {
s32 i;
Actor* actor;
gBossActive = 1;
gBossActive = true;
gBossFrameCount = 0;
this->health = 150;
for (i = 0, actor = gActors; i < 2; actor++) {
@ -3022,7 +3022,7 @@ void Aquas_Boss_Update(Boss* bossAQ) {
}
if (bossAQ->swork[AQ_SWK_17] == 0) {
bossAQ->swork[AQ_SWK_17] = 10;
bossAQ->swork[AQ_SWK_18] += 1;
bossAQ->swork[AQ_SWK_18]++;
bossAQ->swork[AQ_SWK_18] &= 3;
}
if ((bossAQ->state >= 4) && (bossAQ->state < 16)) {
@ -3186,10 +3186,10 @@ void Aquas_Boss_Update(Boss* bossAQ) {
}
if (bossAQ->state >= 10) {
sp110 = D_i3_801C42A0[9];
i2 = (gGameFrameCount & 0x1F);
i2 = (gGameFrameCount & 0x1F); // % 0x20 if possible
if (sBossAQlimbTimers[AQ_LIMB_9] != 0) {
Math_SmoothStepToF(&sp110, 255.0f, 1.0f, 10, 0.0001f);
} else if (!(i2 & 0x10)) {
} else if ((i2 & 0x10) == 0) {
Math_SmoothStepToF(&sp110, D_i3_801C005C, 1.0f, 10, 0.0001f);
} else {
Math_SmoothStepToF(&sp110, D_i3_801C0058, 1.0f, 10, 0.0001f);
@ -3649,7 +3649,7 @@ void Aquas_801B504C(Actor* actor) {
Vec3f sp30[30];
Matrix_Scale(gCalcMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY);
Animation_GetFrameData(&D_AQ_6005954, actor->unk_0B6, sp30);
Animation_GetFrameData(&D_AQ_6005954, actor->animFrame, sp30);
Animation_DrawSkeleton(3, D_AQ_6005A80, sp30, Aquas_801B4DDC, Aquas_801B4E94, actor, gCalcMatrix);
}
@ -3781,12 +3781,12 @@ void Aquas_801B50E8(Actor* actor) {
if (actor->state >= 2) {
if (actor->state < 3) {
actor->unk_0B6++;
actor->animFrame++;
} else {
actor->unk_0B6 += 3;
actor->animFrame += 3;
}
if (actor->unk_0B6 >= Animation_GetFrameCount(&D_AQ_6005954)) {
actor->unk_0B6 = 0;
if (actor->animFrame >= Animation_GetFrameCount(&D_AQ_6005954)) {
actor->animFrame = 0;
}
}
@ -3937,7 +3937,7 @@ void Aquas_801B619C(Actor* actor) {
Matrix_Push(&gCalcMatrix);
Matrix_Push(&gGfxMatrix);
Matrix_Scale(gCalcMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY);
Animation_GetFrameData(&D_AQ_6002628, actor->unk_0B6, sp40);
Animation_GetFrameData(&D_AQ_6002628, actor->animFrame, sp40);
Animation_DrawSkeleton(3, D_AQ_6002874, sp40, Aquas_801B5C18, Aquas_801B5F68, actor, gCalcMatrix);
Matrix_Pop(&gGfxMatrix);
Matrix_Pop(&gCalcMatrix);
@ -4017,9 +4017,9 @@ void Aquas_801B638C(Actor* actor) {
actor->fwork[11] = 1200.0f;
}
actor->unk_0B6++;
if (actor->unk_0B6 >= Animation_GetFrameCount(&D_AQ_6002628)) {
actor->unk_0B6 = 0;
actor->animFrame++;
if (actor->animFrame >= Animation_GetFrameCount(&D_AQ_6002628)) {
actor->animFrame = 0;
}
switch (actor->state) {
@ -4240,9 +4240,9 @@ void Aquas_801B6FF8(Actor* actor) {
}
}
actor->unk_0B6++;
if (Animation_GetFrameCount(&D_AQ_60260EC) < actor->unk_0B6) {
actor->unk_0B6 = 0;
actor->animFrame++;
if (Animation_GetFrameCount(&D_AQ_60260EC) < actor->animFrame) {
actor->animFrame = 0;
}
if (actor->dmgType != DMG_NONE) {
@ -4353,7 +4353,7 @@ void Aquas_801B7A24(Actor* actor) {
RCP_SetupDL(&gMasterDisp, 0x3D);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255);
}
Animation_GetFrameData(&D_AQ_60260EC, actor->unk_0B6, sp30);
Animation_GetFrameData(&D_AQ_60260EC, actor->animFrame, sp30);
Animation_DrawSkeleton(3, D_AQ_60263F8, sp30, Aquas_801B76EC, Aquas_801B7754, actor, gCalcMatrix);
}
@ -4482,9 +4482,9 @@ void Aquas_801B7C78(Actor* actor) {
break;
case 2:
actor->unk_0B6 += actor->iwork[1];
if (actor->unk_0B6 >= Animation_GetFrameCount(&D_AQ_6024F80)) {
actor->unk_0B6 = 0;
actor->animFrame += actor->iwork[1];
if (actor->animFrame >= Animation_GetFrameCount(&D_AQ_6024F80)) {
actor->animFrame = 0;
actor->timer_0BE = 0;
if (actor->iwork[1] >= 2) {
@ -4517,19 +4517,19 @@ void Aquas_801B7C78(Actor* actor) {
actor->iwork[5]++;
if (actor->timer_0C0 == 0) {
Audio_KillSfxBySource(actor->sfxSource);
actor->unk_0B6++;
if (Animation_GetFrameCount(&D_AQ_602AC28) < actor->unk_0B6) {
actor->unk_0B6 = Animation_GetFrameCount(&D_AQ_6024F80) - 1;
actor->animFrame++;
if (Animation_GetFrameCount(&D_AQ_602AC28) < actor->animFrame) {
actor->animFrame = Animation_GetFrameCount(&D_AQ_6024F80) - 1;
actor->state = 7;
}
}
Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW);
if ((actor->unk_0B6 < 21) && (actor->state == 4) && (actor->iwork[3] != 0)) {
if ((actor->animFrame < 21) && (actor->state == 4) && (actor->iwork[3] != 0)) {
j = actor->iwork[3] - 1;
effect = &gEffects[j];
if (actor->unk_0B6 == 20) {
if (actor->animFrame == 20) {
spAC = gPlayer[0].pos.x - effect->obj.pos.x;
temp_dy = gPlayer[0].pos.y - effect->obj.pos.y;
temp_dz = gPlayer[0].trueZpos - 50.0f - effect->obj.pos.z;
@ -4560,10 +4560,10 @@ void Aquas_801B7C78(Actor* actor) {
}
}
if ((actor->unk_0B6 < 58) && (actor->state == 4) && (actor->iwork[2] != 0)) {
if ((actor->animFrame < 58) && (actor->state == 4) && (actor->iwork[2] != 0)) {
j = actor->iwork[2] - 1;
effect = &gEffects[j];
if (actor->unk_0B6 == 57) {
if (actor->animFrame == 57) {
spAC = gPlayer[0].pos.x - effect->obj.pos.x;
temp_dy = gPlayer[0].pos.y - effect->obj.pos.y;
temp_dz = gPlayer[0].trueZpos - 50.0f - effect->obj.pos.z;
@ -4597,9 +4597,9 @@ void Aquas_801B7C78(Actor* actor) {
case 5:
Math_SmoothStepToAngle(&actor->obj.rot.x, 40.0f, 0.1f, 10.0f, 0);
actor->unk_0B6++;
if (actor->unk_0B6 >= Animation_GetFrameCount(&D_AQ_6024F80)) {
actor->unk_0B6 = Animation_GetFrameCount(&D_AQ_6024F80) - 1;
actor->animFrame++;
if (actor->animFrame >= Animation_GetFrameCount(&D_AQ_6024F80)) {
actor->animFrame = Animation_GetFrameCount(&D_AQ_6024F80) - 1;
}
if (actor->timer_0C0 == 0) {
@ -4622,9 +4622,9 @@ void Aquas_801B7C78(Actor* actor) {
break;
case 6:
actor->unk_0B6++;
if (actor->unk_0B6 >= Animation_GetFrameCount(&D_AQ_6024F80)) {
actor->unk_0B6 = Animation_GetFrameCount(&D_AQ_6024F80) - 1;
actor->animFrame++;
if (actor->animFrame >= Animation_GetFrameCount(&D_AQ_6024F80)) {
actor->animFrame = Animation_GetFrameCount(&D_AQ_6024F80) - 1;
}
Math_SmoothStepToAngle(&actor->obj.rot.x, 30.0f, 0.1f, 10.0f, 0);
@ -4636,9 +4636,9 @@ void Aquas_801B7C78(Actor* actor) {
break;
case 7:
actor->unk_0B6--;
if (actor->unk_0B6 <= 0) {
actor->unk_0B6 = 0;
actor->animFrame--;
if (actor->animFrame <= 0) {
actor->animFrame = 0;
actor->timer_0BE = (s32) (100.0f + RAND_FLOAT(150.0f));
actor->state = 1;
}
@ -4790,9 +4790,9 @@ void Aquas_801B90DC(Actor* actor) {
Vec3f sp30[30];
if ((actor->state >= 3) && (actor->state < 5)) {
Animation_GetFrameData(&D_AQ_602AC28, actor->unk_0B6, sp30);
Animation_GetFrameData(&D_AQ_602AC28, actor->animFrame, sp30);
} else {
Animation_GetFrameData(&D_AQ_6024F80, actor->unk_0B6, sp30);
Animation_GetFrameData(&D_AQ_6024F80, actor->animFrame, sp30);
}
Matrix_Translate(gCalcMatrix, 0.0f, -150.0f, 100.0f, MTXF_APPLY);
Animation_DrawSkeleton(3, D_AQ_602512C, sp30, Aquas_801B8C50, Aquas_801B8D7C, actor, gCalcMatrix);
@ -4849,7 +4849,7 @@ void Aquas_801B91A4(Actor* actor) {
}
actor->health = 30;
actor->unk_0B6 = 19;
actor->animFrame = 19;
actor->fwork[1] = actor->obj.pos.z;
if (actor->obj.rot.z >= 4.0f) {
@ -4878,11 +4878,11 @@ void Aquas_801B91A4(Actor* actor) {
break;
case 1:
actor->unk_0B6++;
if (actor->unk_0B6 >= Animation_GetFrameCount(&D_AQ_6000AE4)) {
actor->unk_0B6 = 0;
actor->animFrame++;
if (actor->animFrame >= Animation_GetFrameCount(&D_AQ_6000AE4)) {
actor->animFrame = 0;
}
if (actor->unk_0B6 == 36) {
if (actor->animFrame == 36) {
actor->vel.x = actor->fwork[4];
actor->vel.y = actor->fwork[5];
actor->vel.z = actor->fwork[6];
@ -4894,16 +4894,16 @@ void Aquas_801B91A4(Actor* actor) {
i = 0;
if (actor->iwork[1] != 0) {
if ((actor->unk_0B6 % 8) == 0) {
if ((actor->animFrame % 8) == 0) {
i = 1;
}
} else {
if ((actor->unk_0B6 % 2) == 0) {
if ((actor->animFrame % 2) == 0) {
i = 1;
}
}
if ((actor->unk_0B6 > 36) && (i != 0) && (fabsf(gPlayer[0].trueZpos - actor->obj.pos.z) > 1000.0f)) {
if ((actor->animFrame > 36) && (i != 0) && (fabsf(gPlayer[0].trueZpos - actor->obj.pos.z) > 1000.0f)) {
spfA4 = gPlayer[0].pos.x + RAND_FLOAT_CENTERED(200.0f) - actor->vwork[26].x;
spA0 = gPlayer[0].pos.y + RAND_FLOAT_CENTERED(200.0f) - actor->vwork[26].y;
spf9C = gPlayer[0].trueZpos + RAND_FLOAT_CENTERED(200.0f) - actor->vwork[26].z;
@ -4921,11 +4921,11 @@ void Aquas_801B91A4(Actor* actor) {
break;
case 2:
actor->unk_0B6++;
if ((actor->unk_0B6 >= Animation_GetFrameCount(&D_AQ_6000AE4)) && (actor->fwork[8] < 1.0f)) {
actor->unk_0B6 = 0;
actor->animFrame++;
if ((actor->animFrame >= Animation_GetFrameCount(&D_AQ_6000AE4)) && (actor->fwork[8] < 1.0f)) {
actor->animFrame = 0;
}
if (actor->unk_0B6 == 40) {
if (actor->animFrame == 40) {
actor->fwork[8] = 700.0f;
Aquas_801A9728(actor, 50.0f, 10.0f, 8);
}
@ -4933,13 +4933,13 @@ void Aquas_801B91A4(Actor* actor) {
Math_SmoothStepToF(&actor->obj.pos.y, actor->fwork[7] + actor->fwork[8], 0.1f, 10.0f, 0.00001f);
Math_SmoothStepToF(&actor->fwork[8], 0.0f, 0.1f, 10.0f, 0.0001f);
if (actor->unk_0B6 >= 40) {
if (actor->animFrame >= 40) {
Aquas_801AC8A8(actor->obj.pos.x + RAND_FLOAT_CENTERED(70.0f),
actor->obj.pos.y - 50.0f + RAND_FLOAT_CENTERED(50.0f),
actor->obj.pos.z + RAND_FLOAT_CENTERED(100.0f), 1.0f, 0);
}
if (actor->unk_0B6 >= 37) {
if (actor->animFrame >= 37) {
actor->obj.rot.y += 20.0f;
actor->fwork[2] += 20.0f;
if (((gGameFrameCount % 4) == 0)) {
@ -5076,7 +5076,7 @@ void Aquas_801BA108(Actor* actor) {
Matrix_RotateX(gCalcMatrix, (actor->obj.rot.x + 90.0f) * M_DTOR, MTXF_APPLY);
}
Animation_GetFrameData(&D_AQ_6000AE4, actor->unk_0B6, sp40);
Animation_GetFrameData(&D_AQ_6000AE4, actor->animFrame, sp40);
Animation_DrawSkeleton(3, D_AQ_6000DB0, sp40, NULL, Aquas_801B9DB0, actor, gCalcMatrix);
}
@ -5087,16 +5087,16 @@ void Aquas_801BA26C(Actor* actor) {
switch (actor->state) {
case 0:
actor->unk_0B6 = RAND_INT(50.0f);
actor->animFrame = RAND_INT(50.0f);
actor->state++;
/* fallthrough */
case 1:
actor->unk_0B6 += 2;
if (actor->unk_0B6 >= Animation_GetFrameCount(&D_AQ_6020A40)) {
actor->unk_0B6 = 0;
actor->animFrame += 2;
if (actor->animFrame >= Animation_GetFrameCount(&D_AQ_6020A40)) {
actor->animFrame = 0;
}
sp3E = Animation_GetFrameData(&D_AQ_6020A40, actor->unk_0B6, sp40);
sp3E = Animation_GetFrameData(&D_AQ_6020A40, actor->animFrame, sp40);
if ((fabsf(actor->obj.pos.x - gPlayer[0].pos.x) < 150.0f) &&
(fabsf(actor->obj.pos.y - gPlayer[0].pos.y) < 500.0f) &&
@ -5107,11 +5107,11 @@ void Aquas_801BA26C(Actor* actor) {
break;
case 2:
actor->unk_0B6 += 2;
if (actor->unk_0B6 >= Animation_GetFrameCount(&D_AQ_601DE50)) {
actor->unk_0B6 = 0;
actor->animFrame += 2;
if (actor->animFrame >= Animation_GetFrameCount(&D_AQ_601DE50)) {
actor->animFrame = 0;
}
sp3E = Animation_GetFrameData(&D_AQ_601DE50, actor->unk_0B6, sp40);
sp3E = Animation_GetFrameData(&D_AQ_601DE50, actor->animFrame, sp40);
if ((fabsf(actor->obj.pos.x - gPlayer[0].pos.x) > 150.0f) ||
(fabsf(actor->obj.pos.y - gPlayer[0].pos.y) > 500.0f) ||
(fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) > 700.0f)) {
@ -5385,7 +5385,7 @@ void Aquas_801BB26C(Actor* actor) {
actor->iwork[7] = RAND_INT(120.0f);
actor->iwork[8] = RAND_INT(120.0f);
actor->iwork[9] = RAND_INT(120.0f);
actor->unk_0B6 = RAND_INT(Animation_GetFrameCount(&D_AQ_6023780));
actor->animFrame = RAND_INT(Animation_GetFrameCount(&D_AQ_6023780));
if (actor->iwork[2] == 0) {
actor->iwork[18] = fabsf(actor->obj.rot.y / 10.0f);
@ -5653,9 +5653,9 @@ void Aquas_801BB79C(Actor* actor) {
actor->iwork[3] &= 1;
}
actor->unk_0B6 += 2;
if (actor->unk_0B6 >= Animation_GetFrameCount(&D_AQ_6023780)) {
actor->unk_0B6 = 0;
actor->animFrame += 2;
if (actor->animFrame >= Animation_GetFrameCount(&D_AQ_6023780)) {
actor->animFrame = 0;
}
if (actor->iwork[4] < 30) {
@ -5832,7 +5832,7 @@ void Aquas_801BC91C(s32 limbIndex, Vec3f* rot, void* thisx) {
void Aquas_801BC930(Actor* actor) {
Vec3f sp28[30];
Animation_GetFrameData(&D_AQ_6023780, actor->unk_0B6, sp28);
Animation_GetFrameData(&D_AQ_6023780, actor->animFrame, sp28);
Animation_DrawSkeleton(3, D_AQ_602390C, sp28, Aquas_801BC530, Aquas_801BC91C, actor, gCalcMatrix);
}
@ -6123,7 +6123,7 @@ void Aquas_801BD54C(Actor* actor) {
actor268->obj.pos.y =
actor->obj.pos.y + ((s32) (sp68 % 8U) * (var_fs0 / 2.0f)) + RAND_FLOAT(30.0f);
actor268->obj.pos.z = actor->obj.pos.z + (sp68 * 20.0f) + RAND_FLOAT(-18.0f);
actor268->unk_0B6 = RAND_FLOAT(20.0f);
actor268->animFrame = RAND_FLOAT(20.0f);
actor268->fwork[5] = actor->fwork[5];
actor268->state = 2;
Object_SetInfo(&actor268->info, actor268->obj.id);
@ -6231,9 +6231,9 @@ void Aquas_801BD54C(Actor* actor) {
break;
}
actor->unk_0B6++;
if (Animation_GetFrameCount(&D_AQ_60135E0) < actor->unk_0B6) {
actor->unk_0B6 = 0;
actor->animFrame++;
if (Animation_GetFrameCount(&D_AQ_60135E0) < actor->animFrame) {
actor->animFrame = 0;
}
}
@ -6247,7 +6247,7 @@ bool Aquas_801BDDFC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th
// OBJ_ACTOR_268 draw
void Aquas_801BDE6C(Actor* actor) {
Animation_GetFrameData(&D_AQ_60135E0, actor->unk_0B6, actor->vwork);
Animation_GetFrameData(&D_AQ_60135E0, actor->animFrame, actor->vwork);
if (actor->iwork[3] == 0) {
Animation_DrawSkeleton(1, D_AQ_60136CC, actor->vwork, Aquas_801BDDFC, NULL, actor, &gIdentityMatrix);
} else {
@ -6298,8 +6298,8 @@ void Aquas_801BDF14(void) {
actor->obj.pos.x = D_i3_801C0504[i].x;
actor->obj.pos.y = D_i3_801C0504[i].y;
actor->obj.pos.z = D_i3_801C0504[i].z;
actor->unk_0F4.y = D_i3_801C075C[i];
actor->unk_0B6 = 41;
actor->rot_0F4.y = D_i3_801C075C[i];
actor->animFrame = 41;
actor->iwork[0] = RAND_INT(20.0f);
actor->iwork[2] = i;
actor->timer_0BC = 231;
@ -6314,7 +6314,7 @@ void Aquas_801BE034(Actor* actor) {
if (actor->timer_0BC == 0) {
actor->fwork[0] = 10.0f;
temp = D_i3_801C0828[actor->iwork[2]];
Math_SmoothStepToAngle(&actor->unk_0F4.y, temp, 1.0f, 100.0f, 0.00001f);
Math_SmoothStepToAngle(&actor->rot_0F4.y, temp, 1.0f, 100.0f, 0.00001f);
}
actor->iwork[0]++;
@ -6400,8 +6400,8 @@ void Aquas_801BE3F8(Actor* actor) {
break;
case 2:
actor->unk_0B6++;
if (actor->unk_0B6 == 10) {
actor->animFrame++;
if (actor->animFrame == 10) {
for (i = 0; i < 10; i++) {
Aquas_801AC8A8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f),
actor->obj.pos.y + 50.0f + RAND_FLOAT_CENTERED(70.0f), actor->obj.pos.z + 100.0f,
@ -6409,8 +6409,8 @@ void Aquas_801BE3F8(Actor* actor) {
}
}
if ((actor->unk_0B6 == 18) && (actor->health != 0)) {
actor->unk_0B6 = 17;
if ((actor->animFrame == 18) && (actor->health != 0)) {
actor->animFrame = 17;
if ((fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) > 1000.0f) && (actor->timer_0BC < 20) &&
((actor->timer_0BC & 3) == 0)) {
sp68 = gPlayer[0].pos.x + RAND_FLOAT_CENTERED(200.0f) - actor->obj.pos.x;
@ -6425,9 +6425,9 @@ void Aquas_801BE3F8(Actor* actor) {
}
}
if (actor->unk_0B6 >= Animation_GetFrameCount(&D_AQ_602201C)) {
if (actor->animFrame >= Animation_GetFrameCount(&D_AQ_602201C)) {
actor->info.bonus = 0;
actor->unk_0B6 = Animation_GetFrameCount(&D_AQ_602201C) - 1;
actor->animFrame = Animation_GetFrameCount(&D_AQ_602201C) - 1;
actor->state++;
}
break;
@ -6475,7 +6475,7 @@ void Aquas_801BEB1C(Actor* actor) {
Graphics_SetScaleMtx(3.0f);
RCP_SetupDL(&gMasterDisp, 0x38);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 143, 143, 255);
Animation_GetFrameData(&D_AQ_602201C, actor->unk_0B6, actor->vwork);
Animation_GetFrameData(&D_AQ_602201C, actor->animFrame, actor->vwork);
Animation_DrawSkeleton(1, D_AQ_60220E8, actor->vwork, NULL, NULL, &actor->index, &gIdentityMatrix);
if (actor->health != 0) {

View File

@ -316,7 +316,7 @@ void Solar_8019EF30(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yV
actor->obj.pos.y = yPos;
actor->obj.pos.z = zPos;
actor->unk_0F4.x = RAND_FLOAT(360.0f);
actor->rot_0F4.x = RAND_FLOAT(360.0f);
actor->vel.x = xVel;
actor->vel.y = yVel;
@ -327,7 +327,7 @@ void Solar_8019EF30(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yV
Object_SetInfo(&actor->info, actor->obj.id);
if (gBossActive != 0) {
if (gBossActive) {
actor->info.bonus = 0;
}
AUDIO_PLAY_SFX(NA_SE_OB_SOROCK_APPEAR, actor->sfxSource, 0);
@ -351,14 +351,14 @@ void Solar_8019F0B0(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yV
actor->obj.pos.x = xPos;
actor->obj.pos.y = yPos;
actor->obj.pos.z = zPos;
actor->unk_0F4.x = RAND_FLOAT(360.0f);
actor->rot_0F4.x = RAND_FLOAT(360.0f);
actor->vel.x = xVel;
actor->vel.y = yVel;
actor->vel.z = zVel;
actor->state = 2;
actor->timer_0C2 = 8;
Object_SetInfo(&actor->info, actor->obj.id);
if (gBossActive != 0) {
if (gBossActive) {
actor->info.bonus = 0;
}
AUDIO_PLAY_SFX(NA_SE_OB_SOROCK_APPEAR, actor->sfxSource, 0);
@ -404,12 +404,12 @@ void Solar_8019F20C(Actor* actor) {
actor->scale = 2.0f;
}
if (actor->obj.id == OBJ_ACTOR_276) {
actor->unk_0F4.x -= 6.6f;
actor->unk_0F4.y -= 4.0f;
actor->rot_0F4.x -= 6.6f;
actor->rot_0F4.y -= 4.0f;
} else {
actor->unk_0F4.x += 3.3f;
actor->unk_0F4.y += 2.0f;
actor->rot_0F4.x += 3.3f;
actor->rot_0F4.y += 2.0f;
}
switch (actor->state) {
case 0:
@ -476,9 +476,9 @@ void Solar_8019F20C(Actor* actor) {
actor->obj.rot.y = RAD_TO_DEG(-gPlayer[0].camYaw);
actor->obj.rot.x = RAD_TO_DEG(gPlayer[0].camPitch);
if (((gGameFrameCount % 2) == 0)) {
actor->unk_0B6++;
if (actor->unk_0B6 >= 3) {
actor->unk_0B6 = 0;
actor->animFrame++;
if (actor->animFrame >= 3) {
actor->animFrame = 0;
}
}
}
@ -486,8 +486,8 @@ void Solar_8019F20C(Actor* actor) {
void Solar_8019F7AC(Actor* actor) {
if (actor->state != 0) {
Matrix_Push(&gGfxMatrix);
Matrix_RotateY(gGfxMatrix, actor->unk_0F4.y * M_DTOR, MTXF_APPLY);
Matrix_RotateX(gGfxMatrix, actor->unk_0F4.x * M_DTOR, MTXF_APPLY);
Matrix_RotateY(gGfxMatrix, actor->rot_0F4.y * M_DTOR, MTXF_APPLY);
Matrix_RotateX(gGfxMatrix, actor->rot_0F4.x * M_DTOR, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
switch (actor->obj.id) {
case OBJ_ACTOR_275:
@ -509,7 +509,7 @@ void Solar_8019F7AC(Actor* actor) {
Graphics_SetScaleMtx(actor->scale * 3.5f);
RCP_SetupDL(&gMasterDisp, 0x40);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 128, 128, 160);
gSPDisplayList(gMasterDisp++, D_i3_801BF92C[actor->unk_0B6]);
gSPDisplayList(gMasterDisp++, D_i3_801BF92C[actor->animFrame]);
}
}
@ -524,11 +524,11 @@ void Solar_8019F99C(Actor* actor, Effect* effect, f32 scale1) {
effect->scale1 = scale1;
effect->unk_60.y = actor->obj.rot.y;
effect->obj.rot.z = RAND_FLOAT(360.0f);
effect->unk_44 = 255 - (actor->unk_04E * 8);
effect->unk_44 = 255 - (actor->counter_04E * 8);
if (effect->unk_44 < 0) {
effect->unk_44 = 0;
}
effect->scale2 = 20.0f - (actor->unk_04E * 0.5f);
effect->scale2 = 20.0f - (actor->counter_04E * 0.5f);
effect->unk_48 = 1;
Object_SetInfo(&effect->info, effect->obj.id);
}
@ -561,7 +561,7 @@ void Solar_8019FAA4(Boss* bossSO, Effect* effect, f32 xPos, f32 yPos, f32 zPos,
} else {
Matrix_RotateZ(gCalcMatrix, bossSO->obj.rot.z * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, gBosses[0].obj.rot.x * M_DTOR, MTXF_APPLY);
Matrix_RotateY(gCalcMatrix, gBosses[0].unk_078.y * M_DTOR, MTXF_APPLY);
Matrix_RotateY(gCalcMatrix, gBosses[0].rot_078.y * M_DTOR, MTXF_APPLY);
sp44.x = effect->obj.pos.x - bossSO->obj.pos.x;
sp44.y = effect->obj.pos.y - bossSO->obj.pos.y;
sp44.z = effect->obj.pos.z - bossSO->obj.pos.z;
@ -657,14 +657,14 @@ void Solar_801A003C(Actor* actor) {
} else if (actor->timer_0BC == 0) {
actor->timer_0BC = 2;
Solar_8019FEE8(actor, 1000.0f);
actor->unk_04E++;
actor->counter_04E++;
}
break;
case 1:
if (actor->timer_0BE == 0) {
actor->state = 0;
actor->timer_0BE = 50;
actor->unk_04E = 0;
actor->counter_04E = 0;
Object_SetSfxSourceToPos(actor->sfxSource, &actor->obj.pos);
AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, actor->sfxSource, 4);
}
@ -934,7 +934,7 @@ void Solar_801A0DF8(f32 xPos, f32 zPos, f32 yRot, s32 index, f32 yPos) {
} else {
gActors[sp2C].timer_0BC = 0;
gActors[sp2C].timer_0BE = 50;
gActors[sp2C].unk_04E = 0;
gActors[sp2C].counter_04E = 0;
gActors[sp2C].obj.pos.y = -1.0f * yPos;
Object_SetSfxSourceToPos(gActors[sp2C].sfxSource, &gActors[sp2C].obj.pos);
AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, gActors[sp2C].sfxSource, 4);
@ -1214,17 +1214,17 @@ void Solar_801A1EB0(Boss* bossSO, f32 xPos, f32 xOffset, f32 yPos, f32 zPos) {
}
void Solar_801A1F80(Boss* bossSO) {
if (gBossActive != 0) {
bossSO->unk_3F8 = 5.5f;
if (gBossActive) {
bossSO->scale = 5.5f;
}
if (bossSO->health == 0) {
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 20);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 20);
gBossActive = 1;
gBossActive = true;
gBossFrameCount = 0;
bossSO->health = 600;
bossSO->unk_3F8 = 0.1f;
bossSO->scale = 0.1f;
bossSO->fwork[SO_FWK_0] = 1.0f;
bossSO->swork[SO_SWK_2] = bossSO->swork[SO_SWK_3] = 400;
@ -1316,7 +1316,7 @@ void Solar_801A23F4(Boss* bossSO) {
} else {
bossSO->swork[SO_SWK_1] = 2;
bossSO->state = 0;
bossSO->unk_078.y = 0.0f;
bossSO->rot_078.y = 0.0f;
}
} else if (bossSO->swork[SO_SWK_3] == 0) {
bossSO->swork[SO_SWK_1] = 7;
@ -1436,13 +1436,13 @@ void Solar_801A23F4(Boss* bossSO) {
}
}
if (bossSO->unk_04C == 80) {
bossSO->unk_078.y += 15.0f;
bossSO->rot_078.y += 15.0f;
bossSO->state++;
if (bossSO->unk_078.y >= 30.0f) {
bossSO->unk_078.y = 0.0f;
if (bossSO->rot_078.y >= 30.0f) {
bossSO->rot_078.y = 0.0f;
}
}
Math_SmoothStepToAngle(&bossSO->obj.rot.y, bossSO->unk_078.y, 1.0f, 1.5f, 1.0f);
Math_SmoothStepToAngle(&bossSO->obj.rot.y, bossSO->rot_078.y, 1.0f, 1.5f, 1.0f);
if (bossSO->unk_04C >= 19) {
bossSO->info.hitbox[20] = 715.0f;
bossSO->info.hitbox[22] = 440.0f;
@ -1581,7 +1581,7 @@ void Solar_801A3128(Boss* bossSO) {
gControllerRumbleTimers[gMainController] = 70;
D_i3_801C2740[2]++;
if ((D_i3_801C2740[2] % 2) != 0) {
if (D_i3_801C2740[2] & 2) {
if ((D_i3_801C2740[2] & 2) != 0) {
if (gTeamShields[TEAM_ID_PEPPY] > 0) {
Radio_PlayMessage(gMsg_ID_20317, RCID_PEPPY);
}
@ -2079,7 +2079,7 @@ void Solar_801A4EF8(Boss* bossSO) {
bossSO->obj.rot.y -= 360.0f;
AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_ROLL, bossSO->sfxSource, 4);
}
bossSO->unk_078.y = bossSO->obj.rot.y;
bossSO->rot_078.y = bossSO->obj.rot.y;
break;
case 1:
bossSO->obj.rot.y += bossSO->fwork[SO_FWK_31];
@ -2114,11 +2114,11 @@ void Solar_801A4EF8(Boss* bossSO) {
bossSO->fwork[SO_FWK_3] = 4800.0f;
bossSO->obj.pos.z = gPlayer[0].trueZpos - bossSO->fwork[SO_FWK_3];
bossSO->swork[SO_SWK_1] = 0;
bossSO->unk_078.y = bossSO->obj.rot.y = 0.0f;
bossSO->rot_078.y = bossSO->obj.rot.y = 0.0f;
bossSO->vel.y = 0.0f;
bossSO->obj.rot.x = 0.0f;
}
bossSO->unk_078.y = bossSO->obj.rot.y;
bossSO->rot_078.y = bossSO->obj.rot.y;
break;
case 2:
bossSO->unk_04C = 0;
@ -2132,7 +2132,7 @@ void Solar_801A4EF8(Boss* bossSO) {
}
if (bossSO->swork[SO_SWK_11] < 200) {
bossSO->unk_04C = 98;
bossSO->unk_078.y += bossSO->fwork[SO_FWK_31];
bossSO->rot_078.y += bossSO->fwork[SO_FWK_31];
if (bossSO->swork[SO_SWK_11] == 170) {
AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_CRY, bossSO->sfxSource, 4);
bossSO->obj.pos.y = -500.0f;
@ -2196,13 +2196,13 @@ void Solar_801A56B8(Boss* bossSO) {
if (((bossSO->unk_04C == 89) && (bossSO->state == 2)) || (bossSO->swork[SO_SWK_2] == 0)) {
bossSO->unk_04C = 0;
bossSO->state = 0;
bossSO->unk_078.y = 0.0f;
bossSO->rot_078.y = 0.0f;
}
if (bossSO->unk_04C == 89) {
bossSO->state++;
bossSO->unk_078.y += 15.0f;
bossSO->rot_078.y += 15.0f;
}
Math_SmoothStepToAngle(&bossSO->obj.rot.y, bossSO->unk_078.y, 1.0f, 3.0f, 1.0f);
Math_SmoothStepToAngle(&bossSO->obj.rot.y, bossSO->rot_078.y, 1.0f, 3.0f, 1.0f);
if (bossSO->unk_04C > 18) {
bossSO->info.hitbox[20] = 715.0f;
bossSO->info.hitbox[22] = 440.0f;
@ -2714,8 +2714,8 @@ void Solar_Boss_Draw(Boss* bossSO) {
-89.0f, -90.0f, -88.0f, -36.0f, -73.0f, -95.0f, -91.0f, -83.0f, -91.0f,
};
Matrix_Scale(gCalcMatrix, bossSO->unk_3F8, bossSO->unk_3F8, bossSO->unk_3F8, MTXF_APPLY);
if (gBossActive != 0) {
Matrix_Scale(gCalcMatrix, bossSO->scale, bossSO->scale, bossSO->scale, MTXF_APPLY);
if (gBossActive) {
Animation_DrawSkeleton(2, D_SO_600E470, bossSO->vwork, Solar_801A68A8, Solar_801A6BDC, bossSO, gCalcMatrix);
}
if (bossSO->health <= 0) {
@ -2836,7 +2836,7 @@ void Solar_LevelComplete(Player* player) {
gCsCamAtY = player->cam.at.y;
gCsCamAtZ = player->cam.at.z;
for (i = 10; i < ARRAY_COUNT(gActors); i++) {
if (gActors[i].unk_0B6 == 0) {
if (gActors[i].animFrame == 0) {
Object_Kill(&gActors[i].obj, gActors[i].sfxSource);
}
}
@ -2906,7 +2906,7 @@ void Solar_LevelComplete(Player* player) {
player->wings.modelId = 1;
Audio_StartPlayerNoise(0);
AUDIO_PLAY_BGM(NA_BGM_COURSE_CLEAR);
D_ctx_80177A98 = 1;
gDrawGround = true;
Play_ClearObjectData();
D_ctx_80177A48[1] = 0.0f;
D_ctx_80177A48[2] = 0.0f;
@ -3148,7 +3148,7 @@ void Solar_801A8BE8(Actor* actor) {
case 4:
break;
case 1:
if ((actor->unk_0B6 != 0) && ((((s32) (actor->index % 8U) * 10) + 1030) < gCsFrameCount)) {
if ((actor->animFrame != 0) && ((((s32) (actor->index % 8U) * 10) + 1030) < gCsFrameCount)) {
actor->state = 4;
}
break;
@ -3160,11 +3160,11 @@ void Solar_801A8BE8(Actor* actor) {
case 3:
actor->iwork[11] = 2;
actor->fwork[0] += 2.0f;
actor->unk_0F4.x += 0.2f;
actor->rot_0F4.x += 0.2f;
break;
}
Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + 180.0f) * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, -(actor->unk_0F4.x * M_DTOR), MTXF_APPLY);
Matrix_RotateY(gCalcMatrix, (actor->rot_0F4.y + 180.0f) * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, -(actor->rot_0F4.x * M_DTOR), MTXF_APPLY);
sp3C.x = 0.0f;
sp3C.y = 0.0f;
sp3C.z = actor->fwork[0];
@ -3172,10 +3172,10 @@ void Solar_801A8BE8(Actor* actor) {
actor->vel.x = sp30.x;
actor->vel.y = sp30.y;
actor->vel.z = sp30.z;
actor->obj.rot.x = -actor->unk_0F4.x;
actor->obj.rot.y = actor->unk_0F4.y + 180.0f;
actor->obj.rot.x = -actor->rot_0F4.x;
actor->obj.rot.y = actor->rot_0F4.y + 180.0f;
actor->obj.rot.z = -actor->unk_0F4.z;
actor->obj.rot.z = -actor->rot_0F4.z;
}
void Solar_801A8DB8(Vec3f* pos, u32 sfxId, f32 zVel) {

View File

@ -617,7 +617,7 @@ void Zoness_80190430(Actor* actor) {
Vec3f sp30[30];
Matrix_Scale(gCalcMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY);
Animation_GetFrameData(&D_ZO_600E5EC, actor->unk_0B6, sp30);
Animation_GetFrameData(&D_ZO_600E5EC, actor->animFrame, sp30);
Animation_DrawSkeleton(3, D_ZO_600E7D8, sp30, Zoness_8019019C, Zoness_80190204, actor, gCalcMatrix);
}
@ -652,9 +652,9 @@ void Zoness_801904CC(Actor* actor) {
func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_BIRD_DOWN);
break;
}
actor->unk_0B6++;
if (Animation_GetFrameCount(&D_ZO_600E5EC) < actor->unk_0B6) {
actor->unk_0B6 = 0;
actor->animFrame++;
if (Animation_GetFrameCount(&D_ZO_600E5EC) < actor->animFrame) {
actor->animFrame = 0;
}
if ((actor->dmgType != DMG_NONE) && (actor->health != 0)) {
actor->dmgType = DMG_NONE;
@ -679,21 +679,21 @@ void Zoness_80190790(Actor* actor) {
s32 i;
Actor* otherActor;
actor->unk_04E++;
if (actor->unk_04E >= 200) {
actor->unk_04E = 0;
actor->counter_04E++;
if (actor->counter_04E >= 200) {
actor->counter_04E = 0;
}
actor->fwork[0] += 4.0f;
actor->vel.y = SIN_DEG(actor->fwork[0]) * 20.0f;
actor->unk_0F4.x = -actor->vel.y * 2.5f;
actor->rot_0F4.x = -actor->vel.y * 2.5f;
actor->fwork[1] += 5.0f;
actor->unk_0F4.z = SIN_DEG(actor->fwork[1]) * 30.0f;
actor->rot_0F4.z = SIN_DEG(actor->fwork[1]) * 30.0f;
for (i = 0, otherActor = gActors; i < ARRAY_COUNT(gActors); 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);
Math_SmoothStepToAngle(&actor->rot_0F4.y, temp1, 0.2f, 3.0f, 0.0f);
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;
@ -702,20 +702,20 @@ void Zoness_80190790(Actor* actor) {
break;
}
}
Matrix_RotateY(gCalcMatrix, actor->unk_0F4.y * M_DTOR, MTXF_NEW);
Matrix_RotateY(gCalcMatrix, actor->rot_0F4.y * M_DTOR, MTXF_NEW);
sp44.x = 0.f;
sp44.y = 0.f;
sp44.z = 20.0f;
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38);
actor->vel.x = sp38.x;
actor->vel.z = sp38.z;
temp2 = &D_ctx_801782C4[actor->unk_04E];
temp2 = &gZOSnakePosRots[actor->counter_04E];
temp2->pos.x = actor->obj.pos.x;
temp2->pos.y = actor->obj.pos.y;
temp2->pos.z = actor->obj.pos.z;
temp2->rot.x = actor->unk_0F4.x;
temp2->rot.y = actor->unk_0F4.y;
temp2->rot.z = actor->unk_0F4.z;
temp2->rot.x = actor->rot_0F4.x;
temp2->rot.y = actor->rot_0F4.y;
temp2->rot.z = actor->rot_0F4.z;
}
void Zoness_80190A00(Actor* actor) {
@ -777,8 +777,8 @@ void Zoness_80190D0C(Actor* actor) {
actor->unk_04A = 0;
for (i = actor->unk_04A; i < 20; i++, var_s2++) {
k = (D_i3_801BF56C[i] + actor->unk_04E) % 200;
temp_s0 = &D_ctx_801782C4[k];
k = (D_i3_801BF56C[i] + actor->counter_04E) % 200;
temp_s0 = &gZOSnakePosRots[k];
var_s2->z.offset = temp_s0->pos.z - actor->obj.pos.z;
var_s2->y.offset = temp_s0->pos.y - actor->obj.pos.y;
@ -851,12 +851,12 @@ void Zoness_80191010(Actor* actor) {
case 2:
if (actor->timer_0BC == 0) {
actor->obj.rot.z += 30.0f;
if (actor->unk_0B6 > 0) {
actor->unk_0B6--;
if (actor->animFrame > 0) {
actor->animFrame--;
}
} else {
if (actor->unk_0B6 < Animation_GetFrameCount(&D_ZO_601AA48)) {
actor->unk_0B6++;
if (actor->animFrame < Animation_GetFrameCount(&D_ZO_601AA48)) {
actor->animFrame++;
}
}
var_fs0 = 5.0f;
@ -878,7 +878,7 @@ void Zoness_80191010(Actor* actor) {
AUDIO_PLAY_SFX(NA_SE_IN_SPLASH_L, actor->sfxSource, 4);
}
actor->timer_0C0 = 10;
actor->iwork[0] += 1;
actor->iwork[0]++;
func_effect_8008377C(actor->obj.pos.x, sp7C, actor->obj.pos.z, 0.0f, 0.7f);
}
break;
@ -911,7 +911,7 @@ void Zoness_801914C4(Actor* actor) {
Matrix_Scale(gCalcMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY);
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
Animation_GetFrameData(&D_ZO_601AA48, actor->unk_0B6, sp38);
Animation_GetFrameData(&D_ZO_601AA48, actor->animFrame, sp38);
Animation_DrawSkeleton(3, D_ZO_601AB14, sp38, NULL, Zoness_80190F28, actor, gCalcMatrix);
gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK);
}
@ -966,9 +966,9 @@ void Zoness_80191680(Actor* actor) {
AUDIO_PLAY_SFX(NA_SE_EN_BIRD_DOWN, actor->sfxSource, 4);
}
}
actor->unk_0B6++;
if (actor->unk_0B6 >= Animation_GetFrameCount(&D_ENMY_PLANET_40057AC)) {
actor->unk_0B6 = 0;
actor->animFrame++;
if (actor->animFrame >= Animation_GetFrameCount(&D_ENMY_PLANET_40057AC)) {
actor->animFrame = 0;
}
if (actor->timer_0BC == 0) {
actor->timer_0BC = 30;
@ -1028,7 +1028,7 @@ void Zoness_80191680(Actor* actor) {
}
void Zoness_80191B4C(Actor* actor) {
Animation_GetFrameData(&D_ENMY_PLANET_40057AC, actor->unk_0B6, actor->vwork);
Animation_GetFrameData(&D_ENMY_PLANET_40057AC, actor->animFrame, actor->vwork);
Animation_DrawSkeleton(1, D_ENMY_PLANET_40058B8, actor->vwork, NULL, NULL, &actor->index, &gIdentityMatrix);
}
@ -1108,7 +1108,7 @@ void Zoness_80191FFC(Actor* actor) {
Vec3f sp30[20];
Matrix_Scale(gCalcMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY);
Animation_GetFrameData(&D_ZO_60195EC, actor->unk_0B6, sp30);
Animation_GetFrameData(&D_ZO_60195EC, actor->animFrame, sp30);
Animation_DrawSkeleton(3, D_ZO_6019738, sp30, NULL, Zoness_80191E94, actor, gCalcMatrix);
}
@ -1137,7 +1137,7 @@ void Zoness_80192094(Actor* actor) {
if ((actor->iwork[0] == 0) &&
(Play_CheckDynaFloorCollision(&spB8, &spA0, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z) != 0)) {
func_effect_8008377C(actor->obj.pos.x, spB8, actor->obj.pos.z + 100.0f, 0.0f, 1.5f);
actor->iwork[0] += 1;
actor->iwork[0]++;
if (actor->vel.y >= 0.0f) {
AUDIO_PLAY_SFX(NA_SE_OUT_SPLASH_L, actor->sfxSource, 4);
} else {
@ -1151,15 +1151,15 @@ void Zoness_80192094(Actor* actor) {
actor->scale = 2.0f;
break;
case 1:
actor->unk_0B6++;
if (actor->unk_0B6 >= Animation_GetFrameCount(&D_ZO_60195EC)) {
actor->unk_0B6 = 64;
actor->animFrame++;
if (actor->animFrame >= Animation_GetFrameCount(&D_ZO_60195EC)) {
actor->animFrame = 64;
Math_SmoothStepToF(&actor->vel.z, 0.0f, 1.0f, 100.0f, 0.00001f);
if (actor->obj.pos.y < -500.0f) {
Object_Kill(&actor->obj, actor->sfxSource);
}
}
if (actor->unk_0B6 == 25) {
if (actor->animFrame == 25) {
actor->fwork[2] = 0.0f;
actor->vel.y = 0.0f;
actor->iwork[1] = 0;
@ -1172,7 +1172,7 @@ void Zoness_80192094(Actor* actor) {
actor->iwork[0] = 0;
actor->state = 3;
actor->vel.y = 50.0f;
if (actor->unk_0B6 == 51) {
if (actor->animFrame == 51) {
actor->state = 1;
actor->vel.y = -20.0f;
}
@ -1202,8 +1202,8 @@ void Zoness_80192094(Actor* actor) {
case 3:
Math_SmoothStepToF(&actor->vel.z, -60.0f, 0.1f, 100.0f, 0.00001f);
Math_SmoothStepToF(&actor->vel.y, -30.0f, 0.1f, 100.0f, 0.00001f);
actor->unk_0B6++;
if (actor->unk_0B6 == 51) {
actor->animFrame++;
if (actor->animFrame == 51) {
actor->fwork[2] = 0.0f;
actor->vel.y = 0.0f;
actor->iwork[1] = 0;
@ -1293,12 +1293,12 @@ void Zoness_80192834(Actor* actor) {
Object_Kill(&actor->obj, actor->sfxSource);
}
if (actor->vel.y > 0.0f) {
if (actor->unk_0B6 < 17) {
actor->unk_0B6++;
if (actor->animFrame < 17) {
actor->animFrame++;
}
} else {
if (actor->unk_0B6 < Animation_GetFrameCount(&D_ZO_6021ABC)) {
actor->unk_0B6++;
if (actor->animFrame < Animation_GetFrameCount(&D_ZO_6021ABC)) {
actor->animFrame++;
}
}
actor->obj.rot.x += 20.0f;
@ -1340,7 +1340,7 @@ void Zoness_80192834(Actor* actor) {
void Zoness_80192C18(Actor* actor) {
Vec3f sp28[20];
Animation_GetFrameData(&D_ZO_6021ABC, actor->unk_0B6, sp28);
Animation_GetFrameData(&D_ZO_6021ABC, actor->animFrame, sp28);
Animation_DrawSkeleton(3, D_ZO_6021B88, sp28, NULL, Zoness_801926F4, actor, gCalcMatrix);
}
@ -1406,8 +1406,8 @@ void Zoness_80192E64(Actor* actor) {
Math_SmoothStepToF(&actor->vel.x, 0.0f, 0.1f, 1.0f, 0.0001);
Math_SmoothStepToF(&actor->vel.z, 0.0f, 0.1f, 1.0f, 0.0001f);
if (actor->timer_0BC == 0) {
actor->unk_0B6++;
if (actor->unk_0B6 == 5) {
actor->animFrame++;
if (actor->animFrame == 5) {
Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW);
sp80.x = 0.0f;
sp80.y = 0.0f;
@ -1422,10 +1422,10 @@ void Zoness_80192E64(Actor* actor) {
case 2:
Math_SmoothStepToF(&actor->vel.x, 0.0f, 0.1f, 1.0f, 0.0001f);
Math_SmoothStepToF(&actor->vel.z, 0.0f, 0.1f, 1.0f, 0.0001f);
if (actor->unk_0B6 < Animation_GetFrameCount(&D_ZO_601AFB8)) {
actor->unk_0B6++;
if (actor->animFrame < Animation_GetFrameCount(&D_ZO_601AFB8)) {
actor->animFrame++;
} else {
actor->unk_0B6 = 0;
actor->animFrame = 0;
actor->timer_0BC = 30;
actor->state = 1;
}
@ -1462,7 +1462,7 @@ void Zoness_80192E64(Actor* actor) {
void Zoness_80193240(Actor* actor) {
Vec3f sp28[30];
Animation_GetFrameData(&D_ZO_601AFB8, actor->unk_0B6, sp28);
Animation_GetFrameData(&D_ZO_601AFB8, actor->animFrame, sp28);
Animation_DrawSkeleton(2, D_ZO_601B184, sp28, NULL, Zoness_80192C84, actor, gCalcMatrix);
}
@ -1476,7 +1476,7 @@ f32 D_i3_801BF608[6] = {
void Zoness_BossZo_Init(BossZO* this) {
s32 i;
gBossActive = 1;
gBossActive = true;
gBossFrameCount = 0;
this->vel.z = -40.0f;
for (i = 0; i < ZO_LIMB_MAX; i++) {
@ -2069,12 +2069,12 @@ void Zoness_Boss_Update(Boss* bossZO) {
func_effect_8007AFD0(bossZO->obj.pos.x, bossZO->obj.pos.z, 0.0f, 50.0f, 5.0f);
}
bossZO->swork[ZO_SWK_11] += 1;
bossZO->swork[ZO_SWK_11]++;
bossZO->swork[ZO_SWK_11] &= 1;
bossZO->swork[ZO_SWK_9] = 20;
if (bossZO->swork[ZO_SWK_11] == 0) {
bossZO->swork[ZO_SWK_10] += 1;
bossZO->swork[ZO_SWK_10]++;
bossZO->swork[ZO_SWK_10] &= 1;
bossZO->swork[ZO_SWK_9] = 100;
}
@ -2243,7 +2243,7 @@ void Zoness_Boss_Update(Boss* bossZO) {
Radio_PlayMessage(gMsg_ID_6078, RCID_BOSS_ZONESS);
}
if (bossZO->timer_056 == 0) {
bossZO->swork[ZO_SWK_1] += 1;
bossZO->swork[ZO_SWK_1]++;
bossZO->swork[ZO_SWK_1] &= 1;
bossZO->timer_056 = 100;
}
@ -2447,8 +2447,8 @@ void Zoness_Boss_Update(Boss* bossZO) {
spD8.z = bossZO->obj.rot.z;
for (i = 0; i < 5; i++) {
Zoness_SpawnDebris(&spE4, &spD8, RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(20.0f),
RAND_FLOAT_CENTERED(30.0f), 4, 1.0f,
RAND_FLOAT(15.0f) + (bossZO->unk_3F8 * 10.0f), 0);
RAND_FLOAT_CENTERED(30.0f), 4, 1.0f, RAND_FLOAT(15.0f) + (bossZO->scale * 10.0f),
0);
}
}
bossZO->vel.x = 0.0f;
@ -2958,26 +2958,26 @@ void Zoness_Boss_Update(Boss* bossZO) {
spCC.x = sZoFwork[ZO_BSF_109_X];
spCC.y = sZoFwork[ZO_BSF_109_Y];
spCC.z = sZoFwork[ZO_BSF_109_Z];
if ((sZoSwork[ZO_BSS_53] & 1) && (sZoSwork[ZO_BSS_11] != 0)) {
if (((sZoSwork[ZO_BSS_53] % 2) != 0) && (sZoSwork[ZO_BSS_11] != 0)) {
func_effect_8007A6F0(&spD8, NA_SE_OB_DAMAGE_M);
}
if ((sZoSwork[ZO_BSS_54] & 1) && (sZoSwork[ZO_BSS_12] != 0)) {
if (((sZoSwork[ZO_BSS_54] % 2) != 0) && (sZoSwork[ZO_BSS_12] != 0)) {
func_effect_8007A6F0(&spCC, NA_SE_OB_DAMAGE_M);
}
}
if (sZoSwork[ZO_BSS_50] & 1) {
if ((sZoSwork[ZO_BSS_50] % 2) != 0) {
spD8.x = sZoFwork[ZO_BSF_29_X];
spD8.y = sZoFwork[ZO_BSF_29_Y];
spD8.z = sZoFwork[ZO_BSF_29_Z];
func_effect_8007A6F0(&spD8, NA_SE_EN_DAMAGE_S);
}
if (sZoSwork[ZO_BSS_51] & 1) {
if ((sZoSwork[ZO_BSS_51] % 2) != 0) {
spD8.x = sZoFwork[ZO_BSF_32_X];
spD8.y = sZoFwork[ZO_BSF_32_Y];
spD8.z = sZoFwork[ZO_BSF_32_Z];
func_effect_8007A6F0(&spD8, NA_SE_EN_DAMAGE_S);
}
if (sZoSwork[ZO_BSS_52] & 1) {
if ((sZoSwork[ZO_BSS_52] % 2) != 0) {
spD8.x = sZoFwork[ZO_BSF_52_X];
spD8.y = sZoFwork[ZO_BSF_52_Y];
spD8.z = sZoFwork[ZO_BSF_52_Z];
@ -4524,7 +4524,7 @@ void Zoness_LevelComplete(Player* player) {
gCsCamAtY = player->cam.at.y;
gCsCamAtZ = player->cam.at.z;
for (i = 10; i < ARRAY_COUNT(gActors); i++) {
if (gActors[i].unk_0B6 == 0) {
if (gActors[i].animFrame == 0) {
Object_Kill(&gActors[i].obj, gActors[i].sfxSource);
}
}
@ -4583,7 +4583,7 @@ void Zoness_LevelComplete(Player* player) {
player->csState++;
Audio_StartPlayerNoise(0);
AUDIO_PLAY_BGM(NA_BGM_COURSE_CLEAR);
D_ctx_80177A98 = 1;
gDrawGround = true;
Play_ClearObjectData();
Solar_801A7750();
D_ctx_80177A48[1] = 0.0f;
@ -4792,7 +4792,7 @@ void Zoness_8019E5F0(Actor* actor) {
case 10:
break;
case 1:
if ((actor->unk_0B6 != 0) && ((((s32) (actor->index % 8U) * 10) + 1030) < gCsFrameCount)) {
if ((actor->animFrame != 0) && ((((s32) (actor->index % 8U) * 10) + 1030) < gCsFrameCount)) {
actor->state = 4;
}
break;
@ -4804,15 +4804,15 @@ void Zoness_8019E5F0(Actor* actor) {
case 3:
actor->iwork[11] = 2;
actor->fwork[0] += 2.0f;
actor->unk_0F4.x += 0.1f;
actor->rot_0F4.x += 0.1f;
actor->fwork[21] += 0.2f;
if (actor->fwork[21] > 0.6f) {
actor->fwork[21] = 0.6f;
}
break;
}
Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + 180.0f) * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, -(actor->unk_0F4.x * M_DTOR), MTXF_APPLY);
Matrix_RotateY(gCalcMatrix, (actor->rot_0F4.y + 180.0f) * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, -(actor->rot_0F4.x * M_DTOR), MTXF_APPLY);
sp34.x = 0.0f;
sp34.y = 0.0f;
sp34.z = actor->fwork[0];
@ -4821,7 +4821,7 @@ void Zoness_8019E5F0(Actor* actor) {
actor->vel.y = sp28.y;
actor->vel.z = sp28.z;
actor->obj.rot.x = -actor->unk_0F4.x;
actor->obj.rot.y = actor->unk_0F4.y + 180.0f;
actor->obj.rot.z = -actor->unk_0F4.z;
actor->obj.rot.x = -actor->rot_0F4.x;
actor->obj.rot.y = actor->rot_0F4.y + 180.0f;
actor->obj.rot.z = -actor->rot_0F4.z;
}

View File

@ -95,18 +95,18 @@ void Bolse_8018BD60(Actor* this) {
f32 D_i4_8019EED4[4] = { 8000.0f, 8000.0f, -8000.0f, -8000.0f };
if (gAllRangeCheckpoint == 0) {
this->unk_04E++;
if (this->unk_04E >= 4) {
this->unk_04E = 0;
this->counter_04E++;
if (this->counter_04E >= 4) {
this->counter_04E = 0;
}
for (actor = &gActors[10], i = 10; i < 16; i++, actor++) {
if (actor->obj.status == OBJ_FREE) {
Actor_Initialize(actor);
actor->obj.status = OBJ_ACTIVE;
actor->obj.id = OBJ_ACTOR_ALLRANGE;
actor->obj.pos.x = D_i4_8019EEC4[this->unk_04E];
actor->obj.pos.x = D_i4_8019EEC4[this->counter_04E];
actor->obj.pos.y = 1000.0f;
actor->obj.pos.z = D_i4_8019EED4[this->unk_04E];
actor->obj.pos.z = D_i4_8019EED4[this->counter_04E];
actor->state = 1;
actor->aiIndex = -1;
actor->health = 24;
@ -140,12 +140,12 @@ void Bolse_SpawnEnemies(Actor* this, s32 count) {
enemy->obj.pos.x = 10000.0f;
enemy->obj.pos.y = 3000.0f;
} else {
enemy->obj.pos.x = D_i4_8019EEE4[this->unk_04E];
enemy->obj.pos.x = D_i4_8019EEE4[this->counter_04E];
enemy->obj.pos.y = 50.0f;
AUDIO_PLAY_SFX(NA_SE_EN_PASS, enemy->sfxSource, 4);
enemy->timer_0BC = 5;
enemy->timer_0C2 = 100;
enemy->unk_0F4.x = 90.0f;
enemy->rot_0F4.x = 90.0f;
}
enemy->state = 1;
@ -186,9 +186,9 @@ void Bolse_SpawnEnemies(Actor* this, s32 count) {
Object_SetInfo(&enemy->info, enemy->obj.id);
AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, enemy->sfxSource, 4);
this->unk_04E++;
if (this->unk_04E >= 5) {
this->unk_04E = 0;
this->counter_04E++;
if (this->counter_04E >= 5) {
this->counter_04E = 0;
}
break;
}
@ -253,7 +253,7 @@ void Bolse_UpdateEventHandler(Actor* this) {
break;
}
if ((D_i4_801A0530 < 9600) && (D_i4_801A0530 & 0x400)) {
if ((D_i4_801A0530 < 9600) && ((D_i4_801A0530 & 0x400) != 0)) {
Bolse_SpawnEnemies(this, 8);
}
@ -344,7 +344,7 @@ void Bolse_UpdateEventHandler(Actor* this) {
case 10:
if (gBosses[1].obj.status != 0) {
if (fabsf(Math_SmoothStepToF(&gBosses[1].unk_3F8, 0.0f, 1.0f, 0.05f, 0.001f)) < 0.05f) {
if (fabsf(Math_SmoothStepToF(&gBosses[1].scale, 0.0f, 1.0f, 0.05f, 0.001f)) < 0.05f) {
Object_Kill(&gBosses[1].obj, gBosses[i].sfxSource);
gLight1R = 100;
gLight1G = 100;
@ -546,8 +546,8 @@ s32 Bolse_8018CE5C(Actor* actor) {
actor->fwork[5] = Math_RadToDeg(Math_Atan2F(y, sqrtf(SQ(x) + SQ(z))));
}
Math_SmoothStepToF(&actor->unk_0F4.x, actor->fwork[5], 0.1f, 4.8f, 0.1f);
Math_SmoothStepToF(&actor->unk_0F4.y, actor->fwork[6], 0.1f, 4.8f, 0.1f);
Math_SmoothStepToF(&actor->rot_0F4.x, actor->fwork[5], 0.1f, 4.8f, 0.1f);
Math_SmoothStepToF(&actor->rot_0F4.y, actor->fwork[6], 0.1f, 4.8f, 0.1f);
return 0;
}
@ -589,8 +589,8 @@ void Bolse_8018D124(Actor* actor) {
Vec3f src;
Vec3f dest;
Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + actor->obj.rot.y) * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, -actor->unk_0F4.x * M_DTOR, MTXF_APPLY);
Matrix_RotateY(gCalcMatrix, (actor->rot_0F4.y + actor->obj.rot.y) * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, -actor->rot_0F4.x * M_DTOR, MTXF_APPLY);
src.y = 0.0f;
src.x = 0.0f;
@ -598,7 +598,7 @@ void Bolse_8018D124(Actor* actor) {
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,
actor->obj.pos.z + dest.z, -actor->unk_0F4.x, actor->unk_0F4.y + actor->obj.rot.y, 0.0f, 0.0f,
actor->obj.pos.z + dest.z, -actor->rot_0F4.x, actor->rot_0F4.y + actor->obj.rot.y, 0.0f, 0.0f,
0.0f, 0.0f, dest.x, dest.y, dest.z, 1.0f);
}
@ -651,8 +651,8 @@ bool Bolse_8018D414(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th
Actor* actor = (Actor*) this;
if (limbIndex == 2) {
rot->x -= actor->unk_0F4.x;
rot->y += actor->unk_0F4.y;
rot->x -= actor->rot_0F4.x;
rot->y += actor->rot_0F4.y;
}
return false;
}
@ -807,12 +807,12 @@ s32 Bolse_8018DE8C(Boss* boss) {
};
s32 index = RAND_FLOAT(26);
if (!(gGameFrameCount % 2)) {
if (!(gGameFrameCount % 2)) { // has to be ! instead of == 0
func_effect_8007C120(D_i4_8019EEF8[index].x + boss->obj.pos.x, D_i4_8019EEF8[index].y + boss->obj.pos.y - 10.0f,
D_i4_8019EEF8[index].z + boss->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.2f, 20);
}
if (!(gGameFrameCount % 5)) {
if ((gGameFrameCount % 5) == 0) {
func_effect_8007BFFC(D_i4_8019EEF8[index].x + boss->obj.pos.x, D_i4_8019EEF8[index].y + boss->obj.pos.y - 10.0f,
D_i4_8019EEF8[index].z + boss->obj.pos.z, 0.0f, 0.0f, 0.0f, 8.0f, 10);
}
@ -985,7 +985,7 @@ void Bolse_8018E870(Boss* boss) {
s32 i;
s32 alpha;
Matrix_Scale(gGfxMatrix, boss->unk_3F8, boss->unk_3F8, boss->unk_3F8, MTXF_APPLY);
Matrix_Scale(gGfxMatrix, boss->scale, boss->scale, boss->scale, MTXF_APPLY);
if (boss->vwork[30].y >= 0.0f) {
gSPDisplayList(gMasterDisp++, D_BO_6002020);
@ -1032,11 +1032,11 @@ void Bolse_8018EAEC(Actor* actor, s32 index) {
actor->obj.pos.x = D_i4_8019EFDC[index] + gPlayer[0].pos.x;
actor->obj.pos.y = D_i4_8019EFE8[index] + gPlayer[0].pos.y;
actor->obj.pos.z = D_i4_8019EFF4[index] + gPlayer[0].pos.z;
actor->unk_0B6 = D_i4_8019F000[index];
actor->animFrame = D_i4_8019F000[index];
actor->obj.rot.y = 180.0f;
actor->vel.z = -gPlayer[0].baseSpeed;
actor->unk_0F4.z = D_i4_8019F00C[index];
actor->unk_0F4.y = D_i4_8019F018[index];
actor->rot_0F4.z = D_i4_8019F00C[index];
actor->rot_0F4.y = D_i4_8019F018[index];
Object_SetInfo(&actor->info, actor->obj.id);
actor->iwork[11] = 1;
AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4);
@ -1050,7 +1050,7 @@ void Bolse_8018EC1C(void) {
actor->obj.pos.x = 0;
actor->obj.pos.y = 0.0f;
actor->obj.pos.z = -9000.0f;
actor->unk_0B6 = 30;
actor->animFrame = 30;
actor->fwork[20] = 1.0f;
actor->obj.id = OBJ_ACTOR_CUTSCENE;
Object_SetInfo(&actor->info, actor->obj.id);
@ -1066,7 +1066,7 @@ void Bolse_8018ECB4(void) {
boss->obj.pos.y = 0.0f;
boss->obj.pos.z = -9000.0f;
boss->obj.rot.x = 20.0f;
boss->unk_3F8 = 0.15f;
boss->scale = 0.15f;
boss->obj.id = OBJ_BOSS_310;
Object_SetInfo(&boss->info, boss->obj.id);
}
@ -1084,7 +1084,7 @@ void Bolse_8018ED44(void) {
actor->obj.pos.y = gActors[50].obj.pos.y + RAND_FLOAT(100.0f);
actor->obj.pos.z = -9000.0f;
actor->timer_0BC = 50;
actor->unk_0B6 = 31;
actor->animFrame = 31;
actor->vel.z = 200.0f;
Object_SetInfo(&actor->info, actor->obj.id);
AUDIO_PLAY_SFX(NA_SE_EN_SHOT_0, actor->sfxSource, 4);
@ -1106,10 +1106,10 @@ void Bolse_8018EE4C(f32 x, f32 y) {
actor->obj.pos.y = gActors[50].obj.pos.y + y;
actor->obj.pos.z = -9000.0f;
actor->timer_0BC = 200;
actor->unk_0B6 = 32;
actor->animFrame = 32;
actor->vel.z = 80.0f;
actor->obj.rot.z = RAND_FLOAT_CENTERED(120.0f);
actor->unk_0F4.z = RAND_FLOAT_CENTERED(1.0f);
actor->rot_0F4.z = RAND_FLOAT_CENTERED(1.0f);
Object_SetInfo(&actor->info, actor->obj.id);
AUDIO_PLAY_SFX(NA_SE_EN_SHOT_0, actor->sfxSource, 4);
break;
@ -1257,7 +1257,7 @@ void Bolse_LevelStart(Player* player) {
actor->obj.pos.x = D_i4_8019F030[i - 1].x + player->pos.x;
actor->obj.pos.y = D_i4_8019F030[i - 1].y + player->pos.y;
actor->obj.pos.z = D_i4_8019F030[i - 1].z + player->pos.z;
actor->unk_0F4.x = 352.0f;
actor->rot_0F4.x = 352.0f;
actor->state = 1;
actor->timer_0BC = 1000;
}
@ -1269,7 +1269,7 @@ void Bolse_LevelStart(Player* player) {
gCsCamAtY = player->pos.y;
gCsCamAtZ = player->pos.z;
gStarCount = 300;
D_ctx_80177A98 = 1;
gDrawGround = true;
gLight1R = 200;
gLight1G = 80;
@ -1439,7 +1439,7 @@ void Bolse_LevelComplete(Player* player) {
D_ctx_80177A48[0] = 1.0f;
gStarCount = 1000;
D_ctx_80177A98 = 0;
gDrawGround = false;
gCsCamEyeY = 0;
gCsCamEyeX = 200.0f;
gCsCamEyeZ = -15000.0f;
@ -1601,7 +1601,7 @@ void Bolse_LevelComplete(Player* player) {
break;
case 800:
player->csState += 1;
player->csState++;
player->csTimer = 50;
player->unk_194 = 5.0f;
player->unk_190 = 5.0f;
@ -1626,7 +1626,7 @@ void Bolse_LevelComplete(Player* player) {
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0;
gFillScreenAlphaTarget = 255;
if (gFillScreenAlpha == 255) {
D_ctx_80161A94[0] = gGoldRingCount[0];
gSavedGoldRingCount[0] = gGoldRingCount[0];
gNextGameState = GSTATE_PLAY;
gNextLevel = LEVEL_VENOM_1;
Audio_StopPlayerNoise(0);
@ -1856,7 +1856,7 @@ void Bolse_801912FC(Boss* boss) {
Vec3f src;
Vec3f dest;
if (gGameFrameCount & 0x18) {
if ((gGameFrameCount & 0x18) != 0) {
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);
@ -2069,7 +2069,7 @@ void Bolse_80191BAC(Boss* boss) {
break;
}
if (D_ctx_8017812C == 0) {
if (gGroundClipMode == 0) {
if (((gGameFrameCount % 2) == 0)) {
gLight3Brightness = 0.0f;
} else {
@ -2087,7 +2087,7 @@ void Bolse_80191BAC(Boss* boss) {
void Bolse_80191DB0(Boss* boss) {
s32 alpha;
Matrix_Scale(gGfxMatrix, boss->unk_3F8, boss->unk_3F8, boss->unk_3F8, MTXF_APPLY);
Matrix_Scale(gGfxMatrix, boss->scale, boss->scale, boss->scale, MTXF_APPLY);
alpha = boss->fwork[0];
if (alpha != 0) {
if (((gGameFrameCount % 2) == 0)) {

View File

@ -23,9 +23,9 @@ void Fortuna_801875F0(Actor* actor) {
if (gAllRangeEventTimer < (gAllRangeSpawnEvent - 500)) {
actor->timer_0C0 = 40;
actor->unk_04E++;
if (actor->unk_04E >= 3) {
actor->unk_04E = 0;
actor->counter_04E++;
if (actor->counter_04E >= 3) {
actor->counter_04E = 0;
}
for (i = 0, actorPtr = &gActors[10]; i < 10; i++, actorPtr++) {
@ -51,10 +51,10 @@ void Fortuna_801875F0(Actor* actor) {
actorPtr->aiIndex = AI360_FALCO;
}
actorPtr->unk_0F4.x = 3.0f;
actorPtr->unk_0F4.y = D_i4_8019EDE0[actor->unk_04E];
actorPtr->rot_0F4.x = 3.0f;
actorPtr->rot_0F4.y = D_i4_8019EDE0[actor->counter_04E];
actorPtr->health = 24;
actorPtr->unk_0C9 = actorPtr->iwork[11] = 1;
actorPtr->drawShadow = actorPtr->iwork[11] = 1;
actorPtr->itemDrop = DROP_SILVER_RING_50p;
Object_SetInfo(&actorPtr->info, actorPtr->obj.id);
AUDIO_PLAY_SFX(NA_SE_EN_ENGINE_01, actorPtr->sfxSource, 4);
@ -81,12 +81,12 @@ void Fortuna_80187884(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 arg4) {
actor->obj.pos.z = zPos;
actor->obj.id = OBJ_ACTOR_ALLRANGE;
actor->aiType = AI360_WOLF;
actor->unk_0C9 = 1;
actor->drawShadow = true;
actor->state = 0;
actor->timer_0BC = 10000;
actor->unk_0F4.y = arg4;
actor->rot_0F4.y = arg4;
actor->iwork[11] = 1;
actor->unk_0F4.x = 0.0f;
actor->rot_0F4.x = 0.0f;
Object_SetInfo(&actor->info, actor->obj.id);
AUDIO_PLAY_SFX(NA_SE_EN_WOLF_ENGINE, actor->sfxSource, 4);
}
@ -304,7 +304,7 @@ void Fortuna_UpdateEvents(Actor* actor) {
case 5:
gAllRangeEventTimer = 9207;
actor->iwork[0] += 1;
actor->iwork[0]++;
actor->fwork[0] += 10.0f;
player->cam.eye.x = 300.0f;
player->cam.eye.y = 300.0f;
@ -362,7 +362,7 @@ void Fortuna_UpdateEvents(Actor* actor) {
break;
case 6:
actor->iwork[0] += 1;
actor->iwork[0]++;
if (gMissionStatus == MISSION_COMPLETE) {
actor1->aiIndex = AI360_FOX;
actor1->state = 2;
@ -382,8 +382,8 @@ void Fortuna_UpdateEvents(Actor* actor) {
actor19->obj.status = OBJ_ACTIVE;
actor19->obj.id = OBJ_ACTOR_ALLRANGE;
actor19->state = 4;
actor19->unk_0F4.y = player->rot.y + player->yRot_114 + 180.0f;
actor19->unk_0F4.x = 15.0f;
actor19->rot_0F4.y = player->rot.y + player->yRot_114 + 180.0f;
actor19->rot_0F4.x = 15.0f;
actor19->aiType = AI360_GREAT_FOX;
actor19->fwork[1] = 90.0f;
actor19->fwork[0] = 90.0f;
@ -590,7 +590,7 @@ void Fortuna_8018906C(void) {
actor->obj.pos.x = 0.0f;
actor->obj.pos.y = 0.0f;
actor->obj.pos.z = -9000.0f;
actor->unk_0B6 = 11;
actor->animFrame = 11;
actor->scale = 0.0f;
Object_SetInfo(&actor->info, actor->obj.id);
}
@ -622,7 +622,7 @@ void Fortuna_801890EC(Actor* actor, s32 arg1) {
AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4);
} else {
actor->obj.pos.z = -9500.0f;
actor->unk_0B6 = 1;
actor->animFrame = 1;
actor->vel.z = 22.0f;
AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0);
@ -763,7 +763,7 @@ void Fortuna_LevelComplete(Player* player) {
break;
case 2:
if (!(gMissionStatus) && (player->csTimer) > 830) {
if ((gMissionStatus == MISSION_COMPLETE) && (player->csTimer) > 830) {
gFillScreenAlphaTarget = 0;
gFillScreenAlphaStep = 8;
}
@ -1012,8 +1012,8 @@ void Fortuna_LevelComplete(Player* player) {
if (gCsFrameCount < 1136) {
Math_SmoothStepToF(&D_ctx_80177A48[3], 0.55f, 1.0f, 0.02f, 0);
} else {
D_ctx_80178430 += 0.3f;
D_ctx_8017842C += 0.3f;
gStarfieldScrollY += 0.3f;
gStarfieldScrollX += 0.3f;
Math_SmoothStepToF(&D_ctx_80177A48[3], 0.0f, 1.0f, 0.02f, 0);
if (gCsFrameCount == 1216) {
player->csState = 12;
@ -1031,8 +1031,8 @@ void Fortuna_LevelComplete(Player* player) {
break;
case 12:
D_ctx_80178430 += 0.3f;
D_ctx_8017842C += 0.3f;
gStarfieldScrollY += 0.3f;
gStarfieldScrollX += 0.3f;
player->baseSpeed += 1.0f;
player->baseSpeed *= 1.15f;
player->pos.y += D_ctx_80177A48[4];

View File

@ -337,8 +337,8 @@ void Katina_StartCutsceneUpdate(void) {
actor->vel.x = dest.x;
actor->vel.y = dest.y;
actor->vel.z = dest.z;
actor->unk_0B6 = D_i4_8019F15C[i];
actor->unk_0C9 = 1;
actor->animFrame = D_i4_8019F15C[i];
actor->drawShadow = true;
actor->iwork[KA_ACTOR_IWORK_11] = 1;
Object_SetInfo(&actor->info, actor->obj.id);
AUDIO_PLAY_SFX(NA_SE_EN_ENGINE_01, actor->sfxSource, 4);
@ -420,8 +420,8 @@ void Katina_LevelStart(Player* player) {
actor->obj.pos.x = D_i4_8019F168[i - 1].x + player->pos.x;
actor->obj.pos.y = D_i4_8019F168[i - 1].y + player->pos.y;
actor->obj.pos.z = D_i4_8019F168[i - 1].z + player->pos.z;
actor->unk_0F4.y = D_i4_8019F18C[i - 1];
actor->unk_0F4.x = -10.0f;
actor->rot_0F4.y = D_i4_8019F18C[i - 1];
actor->rot_0F4.x = -10.0f;
actor->state = 1;
actor->timer_0BC = 1000;
}
@ -787,19 +787,19 @@ void Katina_BossSpawnEnemies(Saucerer* this, Vec3f* pos, f32 arg2) {
actor->state = 1;
actor->timer_0BC = 20;
actor->unk_0F4.y = arg2;
actor->unk_0F4.x = -30.0f;
actor->rot_0F4.y = arg2;
actor->rot_0F4.x = -30.0f;
actor->aiType = i + AI360_10;
actor->unk_0B6 = D_i4_8019F198[i - 10];
actor->animFrame = D_i4_8019F198[i - 10];
actor->aiIndex = sEnemySpawnTargets[i - 10];
actor->health = 24;
if (actor->unk_0B6 >= 2) {
if (actor->animFrame >= 2) {
actor->health = 1000;
}
actor->unk_0C9 = 1;
actor->drawShadow = true;
if (D_i4_801A0540 < 9600) {
actor->itemDrop = DROP_SILVER_RING_10p;
@ -856,7 +856,7 @@ void Katina_BossUpdate(Saucerer* this) {
enemyCount = 0;
for (i = 10, actor = &gActors[i]; i < ARRAY_COUNT(gActors); i++, actor++) {
if ((actor->obj.status == OBJ_ACTIVE) && (actor->unk_0B6 == 0)) {
if ((actor->obj.status == OBJ_ACTIVE) && (actor->animFrame == 0)) {
enemyCount++;
}
}
@ -889,7 +889,7 @@ void Katina_BossUpdate(Saucerer* this) {
this->vwork[0].y = 2000.0f;
this->unk_05E = 1;
this->drawShadow = true;
AUDIO_PLAY_SFX(NA_SE_EARTHQUAKE, this->sfxSource, 0);
@ -979,7 +979,7 @@ void Katina_BossUpdate(Saucerer* this) {
gPlayer[0].cam.at.y = 1000.0f;
gPlayer[0].cam.at.z = 0.0f;
this->unk_05E = 0;
this->drawShadow = false;
this->obj.pos.x = -500.0f;
this->obj.pos.z = 500.0f;
@ -996,7 +996,7 @@ void Katina_BossUpdate(Saucerer* this) {
this->obj.rot.y = 217.0f;
for (i = 10; i < ARRAY_COUNT(gActors); i++) {
if (gActors[i].unk_0B6 == 0) {
if (gActors[i].animFrame == 0) {
Object_Kill(&gActors[i].obj, gActors[i].sfxSource);
}
}
@ -1229,7 +1229,7 @@ void Katina_BossUpdate(Saucerer* this) {
gPlayer[0].cam.at.y = this->obj.pos.y - 500.0f;
this->unk_05E = 0;
this->drawShadow = false;
if (this->timer_050 == 260) {
this->obj.pos.y = 3000.0f;
@ -1413,7 +1413,7 @@ void Katina_BossUpdate(Saucerer* this) {
this->timer_050 = 1000;
this->obj.rot.y = 30.0f;
this->obj.pos.x = -4000.0f;
this->unk_078.z = 7.0f;
this->rot_078.z = 7.0f;
AUDIO_PLAY_SFX(NA_SE_KA_UFO_FALLING, this->sfxSource, 0);
@ -1428,7 +1428,7 @@ void Katina_BossUpdate(Saucerer* this) {
Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY);
this->obj.pos.z += this->unk_078.z;
this->obj.pos.z += this->rot_078.z;
if (this->timer_050 == 820) {
AUDIO_PLAY_SFX(NA_SE_KA_UFO_BOUND, this->sfxSource, 0);
@ -1450,7 +1450,7 @@ void Katina_BossUpdate(Saucerer* this) {
this->obj.rot.x -= 0.06f;
this->vel.y = 0.0f;
this->gravity = 0.0f;
Math_SmoothStepToF(&this->unk_078.z, 0.0f, 1.0f, 1.0f, 0.0f);
Math_SmoothStepToF(&this->rot_078.z, 0.0f, 1.0f, 1.0f, 0.0f);
Katina_FireSmokeEffectSpawn(
this->obj.pos.x + 2000.0f + RAND_FLOAT(500.0f), (this->obj.pos.y - 500.0f) + RAND_FLOAT(500.0f),
this->obj.pos.z + 600.0f + RAND_FLOAT(1000.0f), 0.0f, 20.0f, 0.0f, RAND_FLOAT(20.0f) + 15.0f);
@ -1494,7 +1494,7 @@ void Katina_BossUpdate(Saucerer* this) {
gRadarMarks[64].pos.x = this->obj.pos.x;
gRadarMarks[64].pos.y = this->obj.pos.y;
gRadarMarks[64].pos.z = this->obj.pos.z;
gRadarMarks[64].yRot = this->unk_078.y + 180.0f;
gRadarMarks[64].yRot = this->rot_078.y + 180.0f;
if (this->state < 6) {
Math_SmoothStepToF(&this->obj.pos.x, this->vwork[0].x, 0.01f, this->fwork[BOSS_MOVEMENT_SPEED], 0);
@ -1502,11 +1502,11 @@ void Katina_BossUpdate(Saucerer* this) {
Math_SmoothStepToF(&this->obj.pos.z, this->vwork[0].z, 0.01f, this->fwork[BOSS_MOVEMENT_SPEED], 0);
} else {
Math_SmoothStepToAngle(
&this->unk_078.y,
&this->rot_078.y,
Math_RadToDeg(Math_Atan2F(this->vwork[0].x - this->obj.pos.x, this->vwork[0].z - this->obj.pos.z)),
0.5f, 1.5f, 0.0001f);
this->vel.x = SIN_DEG(this->unk_078.y) * this->fwork[BOSS_MOVEMENT_SPEED];
this->vel.z = COS_DEG(this->unk_078.y) * this->fwork[BOSS_MOVEMENT_SPEED];
this->vel.x = SIN_DEG(this->rot_078.y) * this->fwork[BOSS_MOVEMENT_SPEED];
this->vel.z = COS_DEG(this->rot_078.y) * this->fwork[BOSS_MOVEMENT_SPEED];
}
for (i = 0; i < 10; i++) {
@ -1704,7 +1704,7 @@ void Katina_SFTeamMissionAccomUpdate(ActorCutscene* this, s32 idx) {
this->obj.pos.y = D_i4_8019F26C[idx + 1] + gPlayer[0].pos.y;
this->obj.pos.z = D_i4_8019F278[idx + 1] + gPlayer[0].pos.z;
this->unk_0F4.y = D_i4_8019F284[idx + 1];
this->rot_0F4.y = D_i4_8019F284[idx + 1];
this->fwork[KA_ACTOR_FWORK_1] = D_i4_8019F290[idx + 1];
this->fwork[KA_ACTOR_FWORK_0] = 40.0f;
@ -1730,7 +1730,7 @@ void Katina_SFTeamFleeUpdate(ActorCutscene* this, s32 idx) {
this->obj.pos.y = D_i4_8019F2AC[idx + 1];
this->obj.pos.z = D_i4_8019F2BC[idx + 1];
this->unk_0F4.y = D_i4_8019F2CC[idx + 1];
this->rot_0F4.y = D_i4_8019F2CC[idx + 1];
this->fwork[KA_ACTOR_FWORK_1] = D_i4_8019F2DC[idx + 1];
this->fwork[KA_ACTOR_FWORK_0] = 40.0f;
@ -1770,7 +1770,7 @@ void Katina_SFTeam_LevelComplete_Update(void) {
actor->obj.pos.y = (sCsLevelCompleteActorPos[i].y + gPlayer[0].pos.y) - RAND_FLOAT_SEEDED(1000.0f);
actor->obj.pos.z = (sCsLevelCompleteActorPos[i].z + gPlayer[0].pos.z) + RAND_FLOAT_SEEDED(1000.0f);
actor->unk_0F4.z = RAND_FLOAT_CENTERED_SEEDED(200.0f);
actor->rot_0F4.z = RAND_FLOAT_CENTERED_SEEDED(200.0f);
actor->vwork[0].x = (sCsLevelCompleteActorPos[i].x * 0.5f) + gPlayer[0].pos.x;
actor->vwork[0].y = sCsLevelCompleteActorPos[i].y + gPlayer[0].pos.y;
@ -1779,7 +1779,7 @@ void Katina_SFTeam_LevelComplete_Update(void) {
actor->state = 1;
if (i >= 3) {
actor->unk_0B6 = 33;
actor->animFrame = 33;
}
Object_SetInfo(&actor->info, actor->obj.id);
@ -1828,12 +1828,12 @@ void Katina_LevelComplete(Player* player) {
gCsCamAtY = 1000.0f;
gCsCamAtZ = boss->obj.pos.z;
for (i = 10; i < ARRAY_COUNT(gActors); i++) {
if (gActors[i].unk_0B6 == 0) {
if (gActors[i].animFrame == 0) {
Object_Kill(&gActors[i].obj, gActors[i].sfxSource);
}
}
player->csState += 1;
player->csState++;
if (gTeamShields[TEAM_ID_FALCO] > 0) {
Katina_SFTeamMissionAccomUpdate(&gActors[1], 0);
@ -1858,8 +1858,8 @@ void Katina_LevelComplete(Player* player) {
0.1f, 1.0f, 0.0f);
for (i = 1; i < 4; i++) {
angle = Math_SmoothStepToAngle(&gActors[i].unk_0F4.y, gActors[i].fwork[1], 0.1f, 3.0f, 0.0f);
Math_SmoothStepToF(&gActors[i].unk_0F4.z, angle * 20.0f, 0.1f, 1.0f, 0.0f);
angle = Math_SmoothStepToAngle(&gActors[i].rot_0F4.y, gActors[i].fwork[1], 0.1f, 3.0f, 0.0f);
Math_SmoothStepToF(&gActors[i].rot_0F4.z, angle * 20.0f, 0.1f, 1.0f, 0.0f);
}
if (gCsFrameCount >= 200) {
@ -1869,12 +1869,12 @@ void Katina_LevelComplete(Player* player) {
}
if (gCsFrameCount >= 225) {
gActors[1].unk_0F4.x += 1.0f;
gActors[1].unk_0F4.z += 1.0f;
gActors[2].unk_0F4.x += 1.0f;
gActors[2].unk_0F4.z -= 1.0f;
gActors[3].unk_0F4.x += 1.0f;
gActors[3].unk_0F4.z += 1.0f;
gActors[1].rot_0F4.x += 1.0f;
gActors[1].rot_0F4.z += 1.0f;
gActors[2].rot_0F4.x += 1.0f;
gActors[2].rot_0F4.z -= 1.0f;
gActors[3].rot_0F4.x += 1.0f;
gActors[3].rot_0F4.z += 1.0f;
}
if (gCsFrameCount >= 225) {
@ -1913,7 +1913,7 @@ void Katina_LevelComplete(Player* player) {
AUDIO_PLAY_BGM(NA_BGM_COURSE_FAILURE);
}
D_ctx_80177A98 = 0;
gDrawGround = false;
D_ctx_80177A48[1] = 0.0f;
D_ctx_80177A48[2] = 0.0f;
@ -2047,14 +2047,14 @@ void Katina_LevelComplete(Player* player) {
break;
case 101:
gActors[1].unk_0F4.y += 0.1f;
gActors[1].unk_0F4.x += 0.1f;
gActors[2].unk_0F4.y -= 0.007f;
gActors[2].unk_0F4.x += 0.12f;
gActors[3].unk_0F4.y -= 0.09f;
gActors[3].unk_0F4.x += 0.09f;
gActors[4].unk_0F4.y += 0.001f;
gActors[4].unk_0F4.x += 0.08f;
gActors[1].rot_0F4.y += 0.1f;
gActors[1].rot_0F4.x += 0.1f;
gActors[2].rot_0F4.y -= 0.007f;
gActors[2].rot_0F4.x += 0.12f;
gActors[3].rot_0F4.y -= 0.09f;
gActors[3].rot_0F4.x += 0.09f;
gActors[4].rot_0F4.y += 0.001f;
gActors[4].rot_0F4.x += 0.08f;
break;
}
@ -2103,9 +2103,9 @@ void Katina_SFTeamFlyTowardsCamera(ActorCutscene* this) {
Math_SmoothStepToF(&this->obj.pos.x, this->vwork[0].x, 0.02f, 2.0f, 0.0001f);
Math_SmoothStepToF(&this->obj.pos.y, this->vwork[0].y, 0.02f, 2.0f, 0.0001f);
Math_SmoothStepToF(&this->obj.pos.z, this->vwork[0].z, 0.02f, 2.0f, 0.0001f);
Math_SmoothStepToF(&this->unk_0F4.z, 0.0f, 0.02f, 0.2f, 0.0001f);
Math_SmoothStepToF(&this->rot_0F4.z, 0.0f, 0.02f, 0.2f, 0.0001f);
if ((this->unk_0B6 != 0) && ((((s32) (this->index % 8U) * 10) + 800) < gCsFrameCount)) {
if ((this->animFrame != 0) && ((((s32) (this->index % 8U) * 10) + 800) < gCsFrameCount)) {
this->state = 4;
}
break;
@ -2118,7 +2118,7 @@ void Katina_SFTeamFlyTowardsCamera(ActorCutscene* this) {
case 3:
this->iwork[KA_ACTOR_IWORK_11] = 2;
this->fwork[KA_ACTOR_FWORK_0] += 2.0f;
this->unk_0F4.x += 0.1f;
this->rot_0F4.x += 0.1f;
this->fwork[KA_ACTOR_FWORK_21] += 0.4f;
if (this->fwork[KA_ACTOR_FWORK_21] > 0.6f) {
this->fwork[KA_ACTOR_FWORK_21] = 0.6f;
@ -2126,15 +2126,15 @@ void Katina_SFTeamFlyTowardsCamera(ActorCutscene* this) {
break;
case 4:
Math_SmoothStepToF(&this->unk_0F4.z, 120.0f, 0.1f, 3.0f, 0.0001f);
Math_SmoothStepToF(&this->rot_0F4.z, 120.0f, 0.1f, 3.0f, 0.0001f);
this->obj.pos.x += this->fwork[KA_ACTOR_FWORK_1];
this->obj.pos.y += this->fwork[KA_ACTOR_FWORK_1];
this->fwork[KA_ACTOR_FWORK_1] -= 0.5f;
break;
}
Matrix_RotateY(gCalcMatrix, (this->unk_0F4.y + 180.0f) * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, -(this->unk_0F4.x * M_DTOR), MTXF_APPLY);
Matrix_RotateY(gCalcMatrix, (this->rot_0F4.y + 180.0f) * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, -(this->rot_0F4.x * M_DTOR), MTXF_APPLY);
src.x = 0.0f;
src.y = 0.0f;
@ -2146,9 +2146,9 @@ void Katina_SFTeamFlyTowardsCamera(ActorCutscene* this) {
this->vel.y = dest.y;
this->vel.z = dest.z;
this->obj.rot.x = -this->unk_0F4.x;
this->obj.rot.y = this->unk_0F4.y + 180.0f;
this->obj.rot.z = -this->unk_0F4.z;
this->obj.rot.x = -this->rot_0F4.x;
this->obj.rot.y = this->rot_0F4.y + 180.0f;
this->obj.rot.z = -this->rot_0F4.z;
}
void Katina_801981F8(Actor* this) {
@ -2173,32 +2173,32 @@ void Katina_801981F8(Actor* this) {
if (actor->obj.status == OBJ_FREE) {
Actor_Initialize(actor);
actor->unk_0B6 = D_i4_8019F430[i];
actor->animFrame = D_i4_8019F430[i];
if ((actor->unk_0B6 != 0) || (gBosses[KA_BOSS_SAUCERER].state == 0)) {
if ((actor->animFrame != 0) || (gBosses[KA_BOSS_SAUCERER].state == 0)) {
actor->obj.status = OBJ_ACTIVE;
actor->obj.id = OBJ_ACTOR_ALLRANGE;
Matrix_RotateY(gCalcMatrix, this->unk_04E * 18.0f * M_DTOR, MTXF_NEW);
Matrix_RotateY(gCalcMatrix, this->counter_04E * 18.0f * M_DTOR, MTXF_NEW);
Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest);
actor->obj.pos.x = dest.x;
actor->obj.pos.y = RAND_FLOAT(1000.0f) + 300.0f;
actor->obj.pos.z = dest.z;
actor->unk_0F4.y = this->unk_04E * 18.0f;
actor->rot_0F4.y = this->counter_04E * 18.0f;
actor->state = 1;
actor->aiType = i + AI360_10;
actor->aiIndex = D_i4_8019F444[i];
actor->unk_0F4.x = 3.0f;
actor->rot_0F4.x = 3.0f;
actor->health = 24;
if (actor->unk_0B6 >= 2) {
if (actor->animFrame >= 2) {
actor->health = 1000;
}
actor->iwork[KA_ACTOR_IWORK_11] = 1;
actor->unk_0C9 = 1;
actor->drawShadow = true;
if (D_i4_801A0540 < 9600) {
actor->itemDrop = DROP_SILVER_RING_10p;
@ -2207,14 +2207,14 @@ void Katina_801981F8(Actor* this) {
actor->timer_0C2 = 30;
Object_SetInfo(&actor->info, actor->obj.id);
if (actor->unk_0B6 == 1) {
if (actor->animFrame == 1) {
actor->info.targetOffset = 0.0f;
actor->info.bonus = 0;
AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4);
}
actor->info.action = (ObjectFunc) Katina_EnemyUpdate;
actor->info.draw = (ObjectFunc) Katina_EnemyDraw;
this->unk_04E++;
this->counter_04E++;
}
break;
}
@ -2233,10 +2233,10 @@ void Katina_BillFighterInit(void) {
actor->state = 1;
actor->aiType = AI360_BILL;
actor->aiIndex = AI360_10 + 17;
actor->unk_0B6 = 2;
actor->animFrame = 2;
actor->health = 1000;
actor->iwork[KA_ACTOR_IWORK_11] = 1;
actor->unk_0C9 = 1;
actor->drawShadow = true;
actor->timer_0C2 = 30;
actor->obj.id = OBJ_ACTOR_ALLRANGE;
@ -2452,7 +2452,7 @@ void Katina_EnemyUpdate(ActorAllRange* this) {
}
if ((yDist < 1500.0f) && (xDist < 1500.0f)) {
this->iwork[KA_ACTOR_IWORK_4] += 1;
this->iwork[KA_ACTOR_IWORK_4]++;
this->iwork[KA_ACTOR_IWORK_5] = 1;
if ((((this->index + gGameFrameCount) & 11) == 0) && (Rand_ZeroOne() < 0.1f) &&
@ -2537,12 +2537,12 @@ void Katina_EnemyUpdate(ActorAllRange* this) {
}
} else if ((this->obj.pos.y < (gGroundHeight + 50.0f)) && (xAngle > 180.0f)) {
xAngle = 0.0f;
this->unk_0F4.x = 0.0f;
this->rot_0F4.x = 0.0f;
}
Math_SmoothStepToAngle(&this->unk_0F4.x, xAngle, 0.5f, this->fwork[KA_ACTOR_FWORK_2], 0.0001f);
Math_SmoothStepToAngle(&this->rot_0F4.x, xAngle, 0.5f, this->fwork[KA_ACTOR_FWORK_2], 0.0001f);
yAngle = Math_SmoothStepToAngle(&this->unk_0F4.y, this->fwork[KA_ACTOR_FWORK_19], 0.5f,
yAngle = Math_SmoothStepToAngle(&this->rot_0F4.y, this->fwork[KA_ACTOR_FWORK_19], 0.5f,
this->fwork[KA_ACTOR_FWORK_2], 0.0001f) *
30.0f;
@ -2553,8 +2553,8 @@ void Katina_EnemyUpdate(ActorAllRange* this) {
}
Math_SmoothStepToAngle(&this->obj.rot.z, zAngle, 0.1f, 3.0f, 0.01f);
}
this->obj.rot.x = -this->unk_0F4.x;
this->obj.rot.y = this->unk_0F4.y;
this->obj.rot.x = -this->rot_0F4.x;
this->obj.rot.y = this->rot_0F4.y;
Math_SmoothStepToF(&this->fwork[KA_ACTOR_FWORK_0], this->fwork[KA_ACTOR_FWORK_1], 0.2f, 1.0f, 0.1f);
Math_SmoothStepToF(&this->fwork[KA_ACTOR_FWORK_2], this->fwork[KA_ACTOR_FWORK_3], 1.0f, 0.1f, 0.1f);
@ -2598,7 +2598,7 @@ void Katina_EnemyUpdate(ActorAllRange* this) {
radarMark->pos.x = this->obj.pos.x;
radarMark->pos.y = this->obj.pos.y;
radarMark->pos.z = this->obj.pos.z;
radarMark->yRot = this->unk_0F4.y + 180.0f;
radarMark->yRot = this->rot_0F4.y + 180.0f;
if (this->iwork[KA_ACTOR_IWORK_8] != 0) {
this->iwork[KA_ACTOR_IWORK_8]--;
@ -2638,7 +2638,7 @@ void Katina_EnemyDraw(ActorAllRange* this) {
gSPFogPosition(gMasterDisp++, gFogNear, 1005);
}
switch (this->unk_0B6) {
switch (this->animFrame) {
case 0:
if (this->iwork[KA_ACTOR_LOW_POLY]) {
gSPDisplayList(gMasterDisp++, aKaEnemy1LowPolyDL);

View File

@ -190,7 +190,7 @@ void SectorZ_80199FCC(Actor* actor, s32 arg1) {
actor->obj.pos.z = D_i4_8019F4C0[arg1].z;
actor->state = 5;
actor->unk_0F4.y = 180.0f;
actor->rot_0F4.y = 180.0f;
Object_SetInfo(&actor->info, actor->obj.id);
@ -214,7 +214,7 @@ void SectorZ_8019A0F8(Actor* actor, s32 arg1) {
actor->obj.pos.z = gActors[10].obj.pos.z + D_i4_8019F4E4[arg1].z;
actor->state = 5;
actor->unk_0F4.y = 180.0f;
actor->rot_0F4.y = 180.0f;
Object_SetInfo(&actor->info, actor->obj.id);
@ -236,10 +236,10 @@ void SectorZ_8019A1D0(void) {
actor->aiType = AI360_KATT;
actor->aiIndex = AI360_10 + 2;
actor->health = 10000;
actor->unk_0F4.y = 180.0f;
actor->rot_0F4.y = 180.0f;
actor->state = 0;
actor->timer_0BC = 250;
actor->unk_0F4.x = -20.0f;
actor->rot_0F4.x = -20.0f;
actor->iwork[11] = 1;
actor->obj.rot.z = 90.0f;
@ -351,14 +351,14 @@ void SectorZ_8019A3E8(Actor* actor) {
Actor_Initialize(actorPtr);
actorPtr->obj.status = OBJ_ACTIVE;
actorPtr->obj.id = OBJ_ACTOR_ALLRANGE;
Matrix_RotateY(gCalcMatrix, (actor->unk_04E * 18.0f) * M_DTOR, MTXF_NEW);
Matrix_RotateY(gCalcMatrix, (actor->counter_04E * 18.0f) * M_DTOR, MTXF_NEW);
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp40, &sp34);
actorPtr->obj.pos.x = sp34.x;
actorPtr->obj.pos.y = RAND_FLOAT(1000.0f) + 300.0f;
actorPtr->obj.pos.z = sp34.z;
actorPtr->unk_0F4.y = actor->unk_04E * 18.0f;
actorPtr->rot_0F4.y = actor->counter_04E * 18.0f;
actorPtr->state = 3;
actorPtr->aiType = i + AI360_10 + 3;
actorPtr->aiIndex = -1;
@ -387,7 +387,7 @@ void SectorZ_8019A3E8(Actor* actor) {
actorPtr->timer_0C2 = 30;
Object_SetInfo(&actorPtr->info, actorPtr->obj.id);
AUDIO_PLAY_SFX(NA_SE_EN_ENGINE_01, actorPtr->sfxSource, 4);
actor->unk_04E++;
actor->counter_04E++;
break;
}
}
@ -638,7 +638,7 @@ void SectorZ_UpdateEvents(Actor* actor) {
break;
}
if (!(gGameFrameCount & 0x18)) {
if ((gGameFrameCount & 0x18) == 0) {
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);
@ -663,7 +663,7 @@ void SectorZ_8019B48C(void) {
Actor_Initialize(actor);
actor->obj.status = OBJ_INIT;
actor->obj.id = OBJ_ACTOR_CUTSCENE;
actor->unk_0B6 = 25;
actor->animFrame = 25;
actor->obj.pos.x = D_i4_8019F528[i].x;
actor->obj.pos.y = D_i4_8019F528[i].y;
actor->obj.pos.z = D_i4_8019F528[i].z;
@ -685,7 +685,7 @@ void SectorZ_8019B568(void) {
actor->obj.pos.z = 0.0f;
actor->obj.rot.y = 270.0f;
actor->unk_0B6 = 1;
actor->animFrame = 1;
actor->vel.x = -20.0f;
Object_SetInfo(&actor->info, actor->obj.id);
AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0);
@ -712,7 +712,7 @@ void SectorZ_8019B630(Actor* actor, s32 index) {
actor->obj.rot.x = 10.0f;
actor->obj.rot.z = D_i4_8019F5AC[index];
actor->unk_0B6 = 26;
actor->animFrame = 26;
actor->iwork[11] = 1;
Object_SetInfo(&actor->info, actor->obj.id);
AUDIO_PLAY_SFX(NA_SE_EN_ENGINE_01, actor->sfxSource, 4);
@ -765,7 +765,7 @@ void SectorZ_8019B888(void) {
actor->obj.pos.z = gPlayer[0].pos.z + D_i4_8019F5EC[i].z;
actor->aiType = i;
actor->state = 2;
actor->unk_0F4.y = 270.0f;
actor->rot_0F4.y = 270.0f;
actor->health = 255;
actor->iwork[11] = 1;
AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4);
@ -1048,7 +1048,7 @@ void SectorZ_8019C574(Actor* actor, s32 index) {
actor->obj.pos.z = D_i4_8019F63C[index];
actor->fwork[0] = gPlayer[0].baseSpeed;
actor->unk_0F4.y = gPlayer[0].rot.y;
actor->rot_0F4.y = gPlayer[0].rot.y;
Object_SetInfo(&actor->info, actor->obj.id);
@ -1056,7 +1056,7 @@ void SectorZ_8019C574(Actor* actor, s32 index) {
actor->iwork[11] = 1;
AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4);
} else {
actor->unk_0B6 = 1;
actor->animFrame = 1;
actor->fwork[0] = 20.0f;
AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0);
@ -1075,16 +1075,16 @@ void SectorZ_8019C70C(void) {
actor->obj.pos.y = gBosses[0].obj.pos.y - 1000.0f;
actor->obj.pos.z = gBosses[0].obj.pos.z - 1000.0f;
actor->unk_0F4.y = 180.0f;
actor->unk_0F4.x = 20.0f;
actor->rot_0F4.y = 180.0f;
actor->rot_0F4.x = 20.0f;
actor->obj.rot.x = -20.0f;
actor->obj.rot.y = 180.0f;
actor->obj.rot.y = 2.0f * actor->obj.rot.y;
actor->obj.rot.z = -actor->unk_0F4.z;
actor->obj.rot.z = -actor->rot_0F4.z;
actor->fwork[0] = 30.0f;
actor->unk_0B6 = 24;
actor->animFrame = 24;
actor->iwork[11] = 1;
actor->state = 10;
actor->timer_0BC = 130;
@ -1195,9 +1195,9 @@ void SectorZ_LevelComplete(Player* player) {
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);
Math_SmoothStepToAngle(&boss0->unk_078.z, 30.0f, 0.03f, boss0->fwork[3], 0.0f);
Math_SmoothStepToAngle(&boss0->rot_078.x, 20.0f, 0.03f, boss0->fwork[1], 0.0f);
Math_SmoothStepToAngle(&boss0->rot_078.y, 180.0f, 0.03f, boss0->fwork[2], 0.0f);
Math_SmoothStepToAngle(&boss0->rot_078.z, 30.0f, 0.03f, boss0->fwork[3], 0.0f);
Math_SmoothStepToF(&boss0->fwork[0], 20.0f, 0.05f, 0.3f, 0.0f);
Math_SmoothStepToF(&boss0->fwork[1], 0.07f, 1.0f, 0.07f, 0.0f);
Math_SmoothStepToF(&boss0->fwork[2], 0.5f, 1.0f, 0.05f, 0.0f);
@ -1284,7 +1284,7 @@ void SectorZ_LevelComplete(Player* player) {
gCsCamAtZ = player->pos.z;
if (gCsFrameCount == 1620) {
player->csState += 1;
player->csState++;
D_ctx_80177A48[0] = 0.0f;
D_ctx_80177A48[1] = 0.0f;
D_ctx_80177A48[2] = 0.0f;
@ -1585,7 +1585,7 @@ void SectorZ_8019DD20(Actor* actor) {
case 2:
actor->iwork[11] = 2;
actor->fwork[0] += 2.0f;
actor->unk_0F4.x += actor->fwork[1];
actor->rot_0F4.x += actor->fwork[1];
Math_SmoothStepToF(&actor->fwork[1], 0.1f, 1.0f, 0.01f, 0.0f);
break;
@ -1596,23 +1596,23 @@ void SectorZ_8019DD20(Actor* actor) {
break;
case 11:
Math_SmoothStepToF(&actor->unk_0F4.x, 215.0f, 0.1f, 7.0f, 0.0f);
Math_SmoothStepToF(&actor->rot_0F4.x, 215.0f, 0.1f, 7.0f, 0.0f);
Math_SmoothStepToF(&actor->fwork[0], 10.0f, 0.1f, 1.5f, 0.0f);
Math_SmoothStepToAngle(&actor->unk_0F4.y, 140.0f, 0.1f, 1.0f, 0.0f);
if (actor->unk_0F4.x > 180.0f) {
Math_SmoothStepToAngle(&actor->rot_0F4.y, 140.0f, 0.1f, 1.0f, 0.0f);
if (actor->rot_0F4.x > 180.0f) {
actor->state = 12;
}
break;
case 12:
Math_SmoothStepToAngle(&actor->unk_0F4.x, 218.0f, 0.1f, 7.0f, 0.0f);
Math_SmoothStepToAngle(&actor->unk_0F4.y, 147.0f, 0.1f, 1.0f, 0.0f);
Math_SmoothStepToF(&actor->unk_0F4.z, 170.0f, 0.03f, 3.0f, 0.0f);
Math_SmoothStepToAngle(&actor->rot_0F4.x, 218.0f, 0.1f, 7.0f, 0.0f);
Math_SmoothStepToAngle(&actor->rot_0F4.y, 147.0f, 0.1f, 1.0f, 0.0f);
Math_SmoothStepToF(&actor->rot_0F4.z, 170.0f, 0.03f, 3.0f, 0.0f);
Math_SmoothStepToF(&actor->fwork[0], 20.0f, 0.1f, 1.0f, 0.0f);
break;
}
if (actor->unk_0B6 == 24) {
if (actor->animFrame == 24) {
switch (gCsFrameCount) {
case 290:
if (gTeamShields[TEAM_ID_FALCO] > 0) {
@ -1636,7 +1636,7 @@ void SectorZ_8019DD20(Actor* actor) {
if (gCsFrameCount > 430) {
actor->fwork[29] = 3.0f;
Math_SmoothStepToF(&actor->unk_0F4.z, 500.0f, 0.1f, 20.0f, 0.0f);
Math_SmoothStepToF(&actor->rot_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) == 0)) {
@ -1653,8 +1653,8 @@ void SectorZ_8019DD20(Actor* actor) {
}
}
Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + 180.0f) * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, -(actor->unk_0F4.x * M_DTOR), MTXF_APPLY);
Matrix_RotateY(gCalcMatrix, (actor->rot_0F4.y + 180.0f) * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, -(actor->rot_0F4.x * M_DTOR), MTXF_APPLY);
src.x = 0.0f;
src.y = 0.0f;
@ -1666,16 +1666,16 @@ void SectorZ_8019DD20(Actor* actor) {
actor->vel.y = dest.y;
actor->vel.z = dest.z;
actor->obj.rot.x = -actor->unk_0F4.x;
actor->obj.rot.y = actor->unk_0F4.y + 180.0f;
actor->obj.rot.z = -actor->unk_0F4.z;
actor->obj.rot.x = -actor->rot_0F4.x;
actor->obj.rot.y = actor->rot_0F4.y + 180.0f;
actor->obj.rot.z = -actor->rot_0F4.z;
}
void SectorZ_8019E234(Actor* actor) {
s32 i;
actor->obj.rot.x += actor->unk_0F4.x;
actor->obj.rot.y += actor->unk_0F4.y;
actor->obj.rot.x += actor->rot_0F4.x;
actor->obj.rot.y += actor->rot_0F4.y;
if (actor->dmgType != DMG_NONE) {
actor->timer_0C6 = 20;
@ -1752,8 +1752,8 @@ void SectorZ_Boss_Update(Boss* boss) {
}
}
Matrix_RotateY(gCalcMatrix, (boss->unk_078.y + 180.0f) * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, -(boss->unk_078.x * M_DTOR), MTXF_APPLY);
Matrix_RotateY(gCalcMatrix, (boss->rot_078.y + 180.0f) * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, -(boss->rot_078.x * M_DTOR), MTXF_APPLY);
src.x = 0.0f;
src.y = 0.0f;
@ -1765,9 +1765,9 @@ void SectorZ_Boss_Update(Boss* boss) {
boss->vel.y = dest.y;
boss->vel.z = dest.z;
boss->obj.rot.x = -boss->unk_078.x;
boss->obj.rot.y = boss->unk_078.y + 180.0f;
boss->obj.rot.z = -boss->unk_078.z;
boss->obj.rot.x = -boss->rot_078.x;
boss->obj.rot.y = boss->rot_078.y + 180.0f;
boss->obj.rot.z = -boss->rot_078.z;
if (!gGreatFoxIntact) {
Matrix_RotateY(gCalcMatrix, (boss->obj.rot.y - 270.0f) * M_DTOR, MTXF_NEW);
@ -1830,8 +1830,8 @@ void SectorZ_8019EA68(void) {
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);
actor->rot_0F4.x = RAND_FLOAT_CENTERED(4.0f);
actor->rot_0F4.y = RAND_FLOAT_CENTERED(4.0f);
Object_SetInfo(&actor->info, actor->obj.id);
actor->itemDrop = DROP_SILVER_RING;
@ -1849,11 +1849,11 @@ void SectorZ_8019EA68(void) {
boss->obj.pos.y = 0.0f;
boss->obj.pos.z = 0.0f;
boss->unk_078.y = 90.0f;
boss->rot_078.y = 90.0f;
boss->obj.rot.x = -boss->unk_078.x;
boss->obj.rot.y = boss->unk_078.y + 180.0f;
boss->obj.rot.z = -boss->unk_078.z;
boss->obj.rot.x = -boss->rot_078.x;
boss->obj.rot.y = boss->rot_078.y + 180.0f;
boss->obj.rot.z = -boss->rot_078.z;
boss->obj.id = OBJ_BOSS_SZ;
Object_SetInfo(&boss->info, boss->obj.id);

View File

@ -1326,7 +1326,7 @@ void Macbeth_8019E624(Actor* actor, s32* arg1, s32* arg2, s32 arg3, f32 arg4, f3
if ((*arg2 <= 0) ||
((D_MA_801BE2F0[1] - 1 == actor->iwork[5]) && (actor->iwork[5] < D_MA_801BE2F0[3])) ||
(((D_MA_801BE2F0[1] + 1) == actor->iwork[5]) && (D_MA_801BE2F0[3] < actor->iwork[5]))) {
gHitCount += 1;
gHitCount++;
(*arg1)++;
}
} else {
@ -3307,7 +3307,7 @@ void Macbeth_801A5FD0(Actor* actor) {
if (gPlayer[0].trueZpos - actor->obj.pos.z < actor->fwork[2]) {
if (actor->iwork[0] == 0) {
AUDIO_PLAY_SFX(NA_SE_OB_POST_UP, actor->sfxSource, 0);
actor->iwork[0] += 1;
actor->iwork[0]++;
}
Math_SmoothStepToF(&actor->obj.pos.y, actor->fwork[1] + 356.0f, 0.4f, 20.0f, 0.01f);
}
@ -3432,8 +3432,8 @@ void Macbeth_801A68F8(Actor* actor, s16 arg1, f32 arg2, f32 arg3, f32 arg4, f32
gTexturedLines[arg1].posAA.x = arg2;
gTexturedLines[arg1].posAA.y = arg3;
gTexturedLines[arg1].xyScale = 5.0f;
gTexturedLines[arg1].red = gTexturedLines[arg1].green = gTexturedLines[arg1].blue = gTexturedLines[arg1].alpha =
255;
gTexturedLines[arg1].prim.r = gTexturedLines[arg1].prim.g = gTexturedLines[arg1].prim.b =
gTexturedLines[arg1].prim.a = 255;
gTexturedLines[arg1].timer = 3;
gTexturedLines[arg1].posAA.z = arg4;
gTexturedLines[arg1].posBB.x = arg5;
@ -4169,24 +4169,24 @@ void Macbeth_801A7E7C(Actor* actor) {
switch (D_i5_801BE320[18]) {
case 0:
case 1:
var_v0 = 0xF;
var_v0 = 16 - 1;
var_s0 = 10;
break;
case 2:
var_v0 = 0xF;
var_v0 = 16 - 1;
var_s0 = 20;
break;
case 3:
var_v0 = 7;
var_v0 = 8 - 1;
var_s0 = 20;
break;
default:
var_v0 = 3;
var_v0 = 4 - 1;
var_s0 = 10;
break;
}
if (!(var_v0 & gGameFrameCount)) {
if ((var_v0 & gGameFrameCount) == 0) {
Macbeth_801ADCEC(actor->obj.pos.x, actor->obj.pos.y - 90.0f, actor->obj.pos.z - 50.0f,
D_i5_801BE368[0] * 0.8f, -10.0f, 8.0f);
D_i5_801BE320[11]++;
@ -4872,7 +4872,7 @@ void Macbeth_801AC438(Actor* actor) {
Radio_PlayMessage(gMsg_ID_17420, RCID_BOSS_MACBETH);
AUDIO_PLAY_SFX(NA_SE_EN_MABOSS_HATCH, actor->sfxSource, 4);
actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_6035A94);
actor->state += 1;
actor->state++;
}
Macbeth_8019A830(actor);
break;
@ -4914,7 +4914,7 @@ void Macbeth_801AC6B4(Actor* actor) {
actor->obj.rot.y = 180.0f;
Object_SetInfo(&actor->info, actor->obj.id);
AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0);
actor->unk_0B6 = 1;
actor->animFrame = 1;
}
static f32 D_i5_801BA768 = 0.0f;
@ -5698,12 +5698,12 @@ void Macbeth_801AF27C(Actor* actor, s32 arg1) {
Object_SetInfo(&actor->info, actor->obj.id);
if (arg1 < 3) {
actor->iwork[11] = 1;
actor->unk_0C9 = 1;
actor->drawShadow = true;
actor->fwork[3] = D_i5_801BA820[arg1];
actor->state = 30;
AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4);
} else {
actor->unk_0B6 = 1;
actor->animFrame = 1;
actor->state = 21;
actor->obj.rot.z = 32.5f;
AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0);
@ -5726,14 +5726,14 @@ void Macbeth_801AF44C(void) {
actor->fwork[7] = RAND_FLOAT(360.0f);
actor->fwork[8] = RAND_FLOAT(360.0f);
actor->fwork[9] = 30.0f;
actor->unk_0F4.y = D_i5_801BA820[4];
actor->unk_0F4.x = 0.0f;
actor->unk_0F4.z = 330.0f;
actor->rot_0F4.y = D_i5_801BA820[4];
actor->rot_0F4.x = 0.0f;
actor->rot_0F4.z = 330.0f;
actor->obj.rot.x = -0.0f;
actor->obj.rot.y = actor->unk_0F4.y;
actor->obj.rot.y = actor->rot_0F4.y;
actor->obj.rot.z = -330.0f;
actor->fwork[0] = 0.0f;
actor->unk_0B6 = 24;
actor->animFrame = 24;
actor->iwork[11] = 1;
actor->state = 15;
actor->fwork[3] = D_i5_801BA820[4];
@ -5755,7 +5755,7 @@ void Macbeth_801AF628(Actor* actor, s32 arg1) {
actor->obj.pos.x = gPlayer[0].xPath + D_i5_801BA834[arg1].x;
actor->obj.pos.y = D_i5_801BA834[arg1].y;
actor->obj.pos.z = D_i5_801BA834[arg1].z - gPathProgress;
actor->unk_0B6 = 37;
actor->animFrame = 37;
actor->obj.rot.y = D_i5_801BA84C[arg1];
actor->iwork[4] = actor->iwork[5] = 192;
actor->iwork[0] = actor->iwork[1] = actor->iwork[2] = actor->iwork[7] = actor->iwork[3] = 255;
@ -5925,9 +5925,9 @@ void Macbeth_LevelComplete2(Player* player) {
player->vel.z = gActors[D_i5_801BE314].vel.z;
if (gCsFrameCount == 252) {
gCsCamEyeY = 570.0f;
player->timer_210 = 1000;
player->pathChangeTimer = 1000;
player->xPathTarget = 20000.0f;
player->yRot_118 = -23.0f;
player->pathChangeYaw = -23.0f;
player->pathStep = 0.0f;
}
if (gCsFrameCount >= 252) {
@ -5950,7 +5950,7 @@ void Macbeth_LevelComplete2(Player* player) {
player->zPathVel = 0.0f;
gPathVelX = 0.0f;
gPathVelY = 0.0f;
player->timer_210 = 0;
player->pathChangeTimer = 0;
player->cam.eye.x = gCsCamEyeX = 2750.0f;
player->cam.eye.y = gCsCamEyeY = 50.0f;
player->cam.eye.z = gCsCamEyeZ = -620.0f;
@ -5987,9 +5987,9 @@ void Macbeth_LevelComplete2(Player* player) {
player->cam.at.y = gCsCamAtY = 10.0f;
player->cam.eye.x = gCsCamEyeX = D_ctx_80177A48[7] + gCsCamAtX;
player->cam.eye.z = gCsCamEyeZ = D_ctx_80177A48[8] + gCsCamAtZ;
player->yRot_118 = -30.0f;
player->pathChangeYaw = -30.0f;
player->xPathTarget = 10014.0f;
player->timer_210 = 1000;
player->pathChangeTimer = 1000;
player->pathStep = 0.0f;
gFillScreenAlphaTarget = 0;
gFillScreenAlphaStep = 127;
@ -6063,7 +6063,7 @@ void Macbeth_LevelComplete2(Player* player) {
gPathVelZ = 0.0f;
gPathVelX = 0.0f;
gPathVelY = 0.0f;
player->timer_210 = 10000;
player->pathChangeTimer = 10000;
D_ctx_80177A48[0] = 1.0f;
D_i5_801BA1DC = 0.0f;
gControllerRumbleFlags[0] = 1;
@ -6208,7 +6208,7 @@ void Macbeth_LevelComplete2(Player* player) {
gFillScreenAlphaTarget = 255;
gFillScreenAlphaStep = 20;
AUDIO_PLAY_SFX(NA_SE_EN_STAR_EXPLOSION, gActors[D_i5_801BE314].sfxSource, 4);
gBossActive = gLoadLevelObjects = 0;
gBossActive = gLoadLevelObjects = false;
}
if (gCsFrameCount == 940) {
player->csState++;
@ -6226,8 +6226,8 @@ void Macbeth_LevelComplete2(Player* player) {
player->cam.eye.y = gCsCamEyeY = player->pos.y + 30.0f;
player->cam.eye.z = gCsCamEyeZ = (player->trueZpos + gPathProgress) - 300.0f;
player->cam.at.z = gCsCamAtZ = player->trueZpos + gPathProgress;
player->savedCockpitView = player->timer_210 = 0;
player->unk_190 = player->unk_194 = player->unk_188 = player->unk_18C = player->yRot_118 =
player->savedAlternateView = player->pathChangeTimer = 0;
player->unk_190 = player->unk_194 = player->unk_188 = player->unk_18C = player->pathChangeYaw =
player->yRot_114 = player->aerobaticPitch = player->camRoll = player->unk_174 = player->unk_178 =
player->unk_17C = player->unk_180 = player->unk_184 = player->wings.unk_04 = player->unk_170 =
player->unk_16C = player->rockAngle = player->yBob = player->wings.unk_0C =
@ -6440,9 +6440,9 @@ void Macbeth_LevelComplete2(Player* player) {
break;
}
if (player->timer_210 != 0) {
player->timer_210--;
Math_SmoothStepToF(&player->yRot_114, -player->yRot_118, 0.03f, 0.5f, 0.0001f);
if (player->pathChangeTimer != 0) {
player->pathChangeTimer--;
Math_SmoothStepToF(&player->yRot_114, -player->pathChangeYaw, 0.03f, 0.5f, 0.0001f);
Math_SmoothStepToF(&player->pathStep, gPathVelZ * .3f, 0.1f, 2.0f, 0.0001f);
gPathVelX = Math_SmoothStepToF(&player->xPath, player->xPathTarget, 0.1f, player->pathStep, 0.0001f);
gPathVelY = Math_SmoothStepToF(&player->yPath, player->yPathTarget, 0.1f, player->pathStep, 0.0001f);
@ -6481,7 +6481,7 @@ void Macbeth_801B28BC(Actor* actor) {
player = &gPlayer[0];
actor->fwork[7] += 3.0f;
actor->unk_0F4.z = SIN_DEG(actor->fwork[7]) * 1.5f;
actor->rot_0F4.z = SIN_DEG(actor->fwork[7]) * 1.5f;
actor->fwork[8] += 2.0f;
sp3C = SIN_DEG(actor->fwork[8]) * 10.0f;
@ -6613,14 +6613,14 @@ void Macbeth_801B28BC(Actor* actor) {
break;
case 31:
AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0);
actor->unk_0C9 = 0;
actor->drawShadow = false;
actor->timer_0BC = 20;
actor->state++;
actor->fwork[29] = 5.0f;
/* fallthrough */
case 32:
if (actor->timer_0BC <= 0) {
actor->unk_0C9 = 1;
actor->drawShadow = true;
}
actor->iwork[11] = 2;
Math_SmoothStepToF(&actor->obj.rot.x, -20.0f, 0.1f, 0.5f, 0.0f);
@ -6666,13 +6666,13 @@ void Macbeth_801B3554(Actor* actor, s32 arg1) {
Object_SetInfo(&actor->info, actor->obj.id);
if (arg1 < 3) {
actor->iwork[11] = 1;
actor->unk_0C9 = 1;
actor->drawShadow = true;
actor->fwork[3] = D_i5_801BA8F0[arg1];
actor->state = 30;
AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4);
return;
}
actor->unk_0B6 = 1;
actor->animFrame = 1;
actor->state = 20;
AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0);
actor->fwork[9] = 20.0f;
@ -6694,13 +6694,13 @@ void Macbeth_801B3718(void) {
actor->vel.z = gPlayer[0].vel.z;
actor->fwork[7] = RAND_FLOAT(360.0f);
actor->fwork[8] = RAND_FLOAT(360.0f);
actor->unk_0F4.y = 180.0f;
actor->unk_0F4.x = 0.0f;
actor->rot_0F4.y = 180.0f;
actor->rot_0F4.x = 0.0f;
actor->obj.rot.x = -0.0f;
actor->obj.rot.y = actor->unk_0F4.y;
actor->obj.rot.z = -actor->unk_0F4.z;
actor->obj.rot.y = actor->rot_0F4.y;
actor->obj.rot.z = -actor->rot_0F4.z;
actor->fwork[0] = 30.0f;
actor->unk_0B6 = 24;
actor->animFrame = 24;
actor->iwork[11] = 1;
actor->state = 10;
actor->fwork[3] = D_i5_801BA900;
@ -6757,8 +6757,8 @@ void Macbeth_801B38E0(void) {
PlayerShot_Initialize(&gPlayerShots[i]);
}
D_ctx_801782B8 = D_ctx_801782BC = D_ctx_801782C0 = D_ctx_801782D0 = gBossActive = D_ctx_8017828C = D_ctx_8017812C =
gPrevEventActorIndex = gFormationLeaderIndex = gRingPassCount = 0;
gDrawSmallRocks = D_ctx_801782BC = D_ctx_801782C0 = D_ctx_801782D0 = gBossActive = gKillEventActors =
gGroundClipMode = gPrevEventActorIndex = gFormationLeaderIndex = gRingPassCount = 0;
gFormationInitPos.x = gFormationInitPos.y = gFormationInitPos.z = gFormationInitRot.x = gFormationInitRot.y =
gFormationInitRot.z = 0.0f;

View File

@ -491,7 +491,7 @@ void Titania_8018A544(Actor* actor) {
f32 sp48;
f32 sp44;
actor->unk_0C9 = 1;
actor->drawShadow = true;
if ((actor->scale != 1.0f) && (actor->dmgType == DMG_COLLISION)) {
Object_Kill(&actor->obj, actor->sfxSource);
@ -796,13 +796,13 @@ void Titania_8018B268(Actor* actor) {
case 1:
Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW);
if ((actor->unk_0B6 >= 26) && (actor->unk_0B6 <= 53) && (sp3C != NULL)) {
if (actor->unk_0B6 == 26) {
if ((actor->animFrame >= 26) && (actor->animFrame <= 53) && (sp3C != NULL)) {
if (actor->animFrame == 26) {
sp3C->unk_046 = 2;
sp3C->vel.x = 0.0f;
sp3C->vel.y = 0.0f;
sp3C->vel.z = 0.0f;
} else if (actor->unk_0B6 == 53) {
} else if (actor->animFrame == 53) {
src.x = 0.0f;
src.y = actor->fwork[1];
src.z = 20.0f;
@ -823,13 +823,13 @@ void Titania_8018B268(Actor* actor) {
sp3C->obj.pos.z = actor->obj.pos.z + dest.z;
}
if ((actor->unk_0B6 >= 26) && (actor->unk_0B6 <= 57) && (sp38 != NULL)) {
if (actor->unk_0B6 == 26) {
if ((actor->animFrame >= 26) && (actor->animFrame <= 57) && (sp38 != NULL)) {
if (actor->animFrame == 26) {
sp38->unk_046 = 2;
sp38->vel.x = 0.0f;
sp38->vel.y = 0.0f;
sp38->vel.z = 0.0f;
} else if (actor->unk_0B6 == 57) {
} else if (actor->animFrame == 57) {
AUDIO_PLAY_SFX(NA_SE_EN_THROW_S, actor->sfxSource, 4);
src.x = 0.0f;
src.y = actor->fwork[1];
@ -851,7 +851,7 @@ void Titania_8018B268(Actor* actor) {
sp38->obj.pos.z = actor->obj.pos.z + dest.z;
}
if (++actor->unk_0B6 >= Animation_GetFrameCount(&D_TI1_700D534)) {
if (++actor->animFrame >= Animation_GetFrameCount(&D_TI1_700D534)) {
actor->state++;
}
break;
@ -862,7 +862,7 @@ void Titania_8018B268(Actor* actor) {
if (actor->health == 0) {
actor->obj.status = OBJ_DYING;
Animation_GetFrameData(&D_TI1_700D534, actor->unk_0B6, actor->vwork);
Animation_GetFrameData(&D_TI1_700D534, actor->animFrame, actor->vwork);
Animation_DrawSkeleton(0, D_TI1_700D700, actor->vwork, Titania_8018AFD4, Titania_8018B1B4, actor,
&gIdentityMatrix);
func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f);
@ -872,7 +872,7 @@ void Titania_8018B268(Actor* actor) {
}
void Titania_8018B6AC(Actor* actor) {
Animation_GetFrameData(&D_TI1_700D534, actor->unk_0B6, actor->vwork);
Animation_GetFrameData(&D_TI1_700D534, actor->animFrame, actor->vwork);
Animation_DrawSkeleton(0, D_TI1_700D700, actor->vwork, Titania_8018AFF0, Titania_8018B144, actor, &gIdentityMatrix);
}
@ -943,7 +943,7 @@ void Titania_8018B9D0(Actor* actor) {
f32 sp3C;
f32 temp_fa1;
actor->unk_0C9 = 1;
actor->drawShadow = true;
switch (actor->state) {
case 0:
@ -1307,7 +1307,7 @@ void Titania_8018C8A8(Actor* actor) {
Audio_KillSfxBySourceAndId(actor->sfxSource, NA_SE_EN_KANI_MOTOR);
actor->timer_0BC = 20;
actor->fwork[24] = 1.0f;
actor->fwork[23] = actor->unk_0B6;
actor->fwork[23] = actor->animFrame;
}
actor->health -= actor->damage;
if (actor->health <= 0) {
@ -1317,7 +1317,7 @@ void Titania_8018C8A8(Actor* actor) {
Actor_Despawn(actor);
actor->info.bonus = 0;
actor->timer_0BC = 20;
actor->unk_0B6 = 0;
actor->animFrame = 0;
actor->fwork[15] = 0.0f;
} else {
AUDIO_PLAY_SFX(NA_SE_EN_SNAKE_DAMAGE, actor->sfxSource, 4);
@ -1331,11 +1331,11 @@ void Titania_8018C8A8(Actor* actor) {
switch (actor->state) {
case 0:
AUDIO_PLAY_SFX(NA_SE_EN_HEAVY_JUMP, actor->sfxSource, 4);
actor->unk_0F4.y = actor->obj.rot.y;
actor->rot_0F4.y = actor->obj.rot.y;
actor->obj.rot.y = 180.0f;
actor->obj.pos.y += 125.0f;
actor->gravity = 1.0f;
actor->unk_0C9 = 1;
actor->drawShadow = true;
actor->vel.y = 20.0f;
actor->vel.z = -70.0f;
Animation_GetFrameData(&D_TI1_700733C, 0, actor->vwork);
@ -1354,13 +1354,13 @@ void Titania_8018C8A8(Actor* actor) {
Animation_DrawSkeleton(1, D_TI1_7006990, actor->vwork, Titania_8018C118, Titania_8018C3D8, actor,
&gIdentityMatrix);
if (actor->obj.pos.z <= gPlayer[0].pos.z) {
Math_SmoothStepToAngle(&actor->obj.rot.y, actor->unk_0F4.y, 0.2f, 10.0f, 0.01f);
Math_SmoothStepToAngle(&actor->obj.rot.y, actor->rot_0F4.y, 0.2f, 10.0f, 0.01f);
}
if ((actor->obj.pos.y + actor->fwork[7] + actor->fwork[26]) <= sp9C) {
AUDIO_PLAY_SFX(NA_SE_EN_HEAVY_BOUND, actor->sfxSource, 4);
actor->fwork[16] = actor->obj.pos.y = sp9C;
actor->unk_0F4.x = spA0 * M_RTOD;
actor->unk_0F4.z = sp98 * M_RTOD;
actor->rot_0F4.x = spA0 * M_RTOD;
actor->rot_0F4.z = sp98 * M_RTOD;
actor->gravity = 0.0f;
actor->vel.x = actor->vel.y = actor->vel.z = 0.0f;
actor->timer_0BC = 10;
@ -1402,11 +1402,11 @@ void Titania_8018C8A8(Actor* actor) {
break;
case 2:
Math_SmoothStepToAngle(&actor->obj.rot.x, actor->unk_0F4.x, 0.5f, 5.0f, 0.01f);
Math_SmoothStepToAngle(&actor->obj.rot.z, actor->unk_0F4.z, 0.5f, 5.0f, 0.01f);
Math_SmoothStepToAngle(&actor->obj.rot.x, actor->rot_0F4.x, 0.5f, 5.0f, 0.01f);
Math_SmoothStepToAngle(&actor->obj.rot.z, actor->rot_0F4.z, 0.5f, 5.0f, 0.01f);
actor->obj.pos.y = actor->fwork[0] = actor->fwork[16];
actor->fwork[1] = actor->unk_0F4.x;
actor->fwork[2] = actor->unk_0F4.z;
actor->fwork[1] = actor->rot_0F4.x;
actor->fwork[2] = actor->rot_0F4.z;
Animation_GetFrameData(&D_TI1_7007234, 0, spA4);
Math_SmoothStepToVec3fArray(spA4, actor->vwork, 1, 15, 0.5f, 7.0f, 0.1f);
temp_fs0 = actor->vwork[0].y;
@ -1427,7 +1427,7 @@ void Titania_8018C8A8(Actor* actor) {
if (actor->timer_0BC == 0) {
actor->state = 4;
}
Animation_GetFrameData(&D_TI1_70067C4, actor->unk_0B6, spA4);
Animation_GetFrameData(&D_TI1_70067C4, actor->animFrame, spA4);
Math_SmoothStepToVec3fArray(spA4, actor->vwork, 1, 15, 0.1f, 3.0f, 0.01f);
temp_fs0 = actor->vwork[0].y;
actor->vwork[0].y += actor->fwork[26];
@ -1438,7 +1438,7 @@ void Titania_8018C8A8(Actor* actor) {
Math_SmoothStepToF(&actor->fwork[26], -60.0f, 0.0f, 500.0f, 0.01f);
if (actor->health <= 0) {
actor->state = 5;
actor->unk_0B6 = 0;
actor->animFrame = 0;
actor->timer_0BC = 30;
actor->iwork[6] = 30;
actor->fwork[15] = 0.0f;
@ -1455,13 +1455,13 @@ void Titania_8018C8A8(Actor* actor) {
Math_SmoothStepToAngle(&actor->obj.rot.z, sp98 * M_RTOD, 0.1f, 1.0f, 0.01f);
if (actor->timer_0BC == 0) {
if (((actor->unk_0B6 == 40) || (actor->unk_0B6 == 80)) && (actor->timer_0BC == 0)) {
if (((actor->animFrame == 40) || (actor->animFrame == 80)) && (actor->timer_0BC == 0)) {
AUDIO_PLAY_SFX(NA_SE_EN_HEAVY_WALK1, actor->sfxSource, 4);
}
Math_SmoothStepToF(&actor->fwork[15], 1.0f, 0.7f, 0.1f, 0.01f);
actor->unk_0B6++;
if (actor->unk_0B6 >= Animation_GetFrameCount(&D_TI1_70067C4)) {
actor->unk_0B6 = 0;
actor->animFrame++;
if (actor->animFrame >= Animation_GetFrameCount(&D_TI1_70067C4)) {
actor->animFrame = 0;
}
if ((actor->fwork[4] > 0.0f) || (actor->fwork[7] > 0.0f)) {
Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW);
@ -1476,13 +1476,13 @@ void Titania_8018C8A8(Actor* actor) {
if (Animation_GetFrameCount(&D_TI1_70067C4) <= actor->fwork[23]) {
actor->fwork[23] = 0.0f;
}
actor->unk_0B6 = actor->fwork[23];
actor->animFrame = actor->fwork[23];
if (actor->timer_0BC == 1) {
AUDIO_PLAY_SFX(NA_SE_EN_KANI_MOTOR, actor->sfxSource, 4);
}
}
Animation_GetFrameData(&D_TI1_70067C4, actor->unk_0B6, spA4);
Animation_GetFrameData(&D_TI1_70067C4, actor->animFrame, spA4);
Math_SmoothStepToVec3fArray(spA4, actor->vwork, 1, 15, actor->fwork[15], 360.0f, 0.01f);
temp_fs0 = actor->vwork[0].y;
actor->vwork[0].y += actor->fwork[26];
@ -1494,7 +1494,7 @@ void Titania_8018C8A8(Actor* actor) {
if (actor->health <= 0) {
actor->iwork[6] = 300;
actor->state = 5;
actor->unk_0B6 = 0;
actor->animFrame = 0;
actor->timer_0BC = 30;
actor->fwork[15] = 0.0f;
AUDIO_PLAY_SFX(NA_SE_EN_KANI_STOP, actor->sfxSource, 4);
@ -1503,7 +1503,7 @@ void Titania_8018C8A8(Actor* actor) {
case 5:
Math_SmoothStepToF(&actor->fwork[15], 1.0f, 1.0f, 0.015f, 0.01f);
Animation_GetFrameData(&D_TI1_7007130, actor->unk_0B6, spA4);
Animation_GetFrameData(&D_TI1_7007130, actor->animFrame, spA4);
Math_SmoothStepToVec3fArray(spA4, actor->vwork, 1, 15, actor->fwork[15], 360.0f, 0.01f);
Math_SmoothStepToF(&actor->fwork[26], -40.0f, actor->fwork[15], 500.0f, 0.01f);
temp_fs0 = actor->vwork[0].y;
@ -1511,31 +1511,31 @@ void Titania_8018C8A8(Actor* actor) {
Animation_DrawSkeleton(0, D_TI1_7006990, actor->vwork, Titania_8018C118, Titania_8018C3D8, actor,
&gIdentityMatrix);
actor->vwork[0].y = temp_fs0;
actor->unk_0B6++;
if (actor->unk_0B6 >= Animation_GetFrameCount(&D_TI1_7007130)) {
actor->unk_0B6 = 0;
actor->animFrame++;
if (actor->animFrame >= Animation_GetFrameCount(&D_TI1_7007130)) {
actor->animFrame = 0;
}
if (actor->timer_0BC == 0) {
actor->state = 6;
actor->unk_0B6 = 0;
actor->animFrame = 0;
actor->fwork[15] = 0.0f;
}
break;
case 6:
if (actor->unk_0B6 == 18) {
if (actor->animFrame == 18) {
actor->iwork[8] = 0;
}
actor->iwork[2] = 1;
Math_SmoothStepToF(&actor->fwork[15], 1.0f, 1.0f, 0.005f, 0.01f);
Animation_GetFrameData(&D_TI1_7006F74, actor->unk_0B6, spA4);
Animation_GetFrameData(&D_TI1_7006F74, actor->animFrame, spA4);
Math_SmoothStepToVec3fArray(spA4, actor->vwork, 1, 15, actor->fwork[15], 360.0f, 0.01f);
temp_fs0 = actor->vwork[0].y;
actor->vwork[0].y += actor->fwork[26];
Animation_DrawSkeleton(0, D_TI1_7006990, actor->vwork, Titania_8018C118, Titania_8018C3D8, actor,
&gIdentityMatrix);
actor->vwork[0].y = temp_fs0;
if (actor->unk_0B6 == 21) {
if (actor->animFrame == 21) {
Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY);
Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, MTXF_APPLY);
@ -1573,15 +1573,15 @@ void Titania_8018C8A8(Actor* actor) {
1.5f);
}
if (actor->unk_0B6 < (Animation_GetFrameCount(&D_TI1_7006F74) - 1)) {
actor->unk_0B6++;
if (actor->animFrame < (Animation_GetFrameCount(&D_TI1_7006F74) - 1)) {
actor->animFrame++;
} else {
Titania_8018C72C(actor);
}
break;
case 7:
Animation_GetFrameData(&D_TI1_7006F74, actor->unk_0B6, spA4);
Animation_GetFrameData(&D_TI1_7006F74, actor->animFrame, spA4);
Math_SmoothStepToVec3fArray(spA4, actor->vwork, 1, 15, actor->fwork[15], 360.0f, 0.01f);
break;
@ -1926,22 +1926,22 @@ void Titania_8018E5F8(Actor* actor) {
gTexturedLines[index].posAA.x = actor->obj.pos.x + actor->fwork[0];
gTexturedLines[index].posAA.y = actor->obj.pos.y + actor->fwork[1];
gTexturedLines[index].posAA.z = actor->obj.pos.z + actor->fwork[2];
gTexturedLines[index].red = 255;
gTexturedLines[index].green = 255;
gTexturedLines[index].blue = 0;
gTexturedLines[index].alpha = 255;
gTexturedLines[index].prim.r = 255;
gTexturedLines[index].prim.g = 255;
gTexturedLines[index].prim.b = 0;
gTexturedLines[index].prim.a = 255;
gTexturedLines[index].posBB.x = sp5C;
gTexturedLines[index].posBB.y = sp70;
gTexturedLines[index].posBB.z = sp54;
gTexturedLines[index].xyScale = 3.0f;
if (actor->timer_0C0 == 0) {
gTexturedLines[index].red = 255;
gTexturedLines[index].green = 255;
gTexturedLines[index].blue = 64;
gTexturedLines[index].prim.r = 255;
gTexturedLines[index].prim.g = 255;
gTexturedLines[index].prim.b = 64;
} else {
gTexturedLines[index].red = 255;
gTexturedLines[index].green = 100;
gTexturedLines[index].blue = 0;
gTexturedLines[index].prim.r = 255;
gTexturedLines[index].prim.g = 100;
gTexturedLines[index].prim.b = 0;
}
if (i <= 3000) {
if (actor->timer_0C0 == 0) {
@ -1999,7 +1999,7 @@ void Titania_Cactus_Update(Sprite* sprite) {
sprite->obj.rot.y = Math_Atan2F(gPlayer[0].cam.eye.x - sprite->obj.pos.x,
gPlayer[0].cam.eye.z - (sprite->obj.pos.z + gPathProgress)) *
M_RTOD;
if (sprite->unk_46 != 0) {
if (sprite->destroy != 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, NA_SE_OB_EXPLOSION_S);
@ -2195,7 +2195,7 @@ void Titania_Boss306_Init(Boss306* this) {
return;
}
gBossActive = 1;
gBossActive = true;
this->fwork[2] = 1.0f;
this->fwork[4] = 730.0f;
for (i = 0; i < ARRAY_COUNT(D_i5_801BD668); i++) {
@ -4207,7 +4207,7 @@ void Titania_80193DF0(Boss* boss) {
}
if (D_i5_801BBF00[i].unk_24 > 0) {
D_i5_801BBF00[i].unk_24--;
if (!(D_i5_801BBF00[i].unk_24 & 1)) {
if (!(D_i5_801BBF00[i].unk_24 & 1)) { // prefer == 0
func_effect_8007A900(boss->obj.pos.x + D_i5_801BBF00[i].unk_00.pos.x,
boss->obj.pos.y + D_i5_801BBF00[i].unk_00.pos.y,
boss->obj.pos.z + D_i5_801BBF00[i].unk_00.pos.z, 7.0f, 160, 16, 0);
@ -5146,10 +5146,10 @@ void Titania_Boss_Draw(Boss* boss) {
} else {
gTexturedLines[temp_v1_28].mode = 1;
}
gTexturedLines[temp_v1_28].red = 0;
gTexturedLines[temp_v1_28].blue = 0;
gTexturedLines[temp_v1_28].green = 0;
gTexturedLines[temp_v1_28].alpha = 0;
gTexturedLines[temp_v1_28].prim.r = 0;
gTexturedLines[temp_v1_28].prim.b = 0;
gTexturedLines[temp_v1_28].prim.g = 0;
gTexturedLines[temp_v1_28].prim.a = 0;
gTexturedLines[temp_v1_28].xyScale = 1;
}
}
@ -5230,7 +5230,7 @@ void Titania_801990DC(Boss* boss) {
actor->state = 40;
actor->unk_046 = 25;
actor->unk_048 = 0;
actor->unk_04A = 6;
actor->unk_04A = 4 | 2;
actor->fwork[3] = 0.0f;
actor->fwork[4] = -200.0f;
actor->obj.pos.x = gPlayer[0].pos.x;
@ -5250,7 +5250,7 @@ void Titania_801990DC(Boss* boss) {
actor->state = 40;
actor->unk_046 = 2;
actor->unk_048 = 1;
actor->unk_04A = 6;
actor->unk_04A = 4 | 2;
actor->iwork[1] = (s32) 1;
actor->fwork[3] = -150.0f;
actor->fwork[4] = -200.0f;
@ -5271,7 +5271,7 @@ void Titania_801990DC(Boss* boss) {
actor->state = 40;
actor->unk_046 = 2;
actor->unk_048 = 1;
actor->unk_04A = 6;
actor->unk_04A = 4 | 2;
actor->iwork[1] = 2;
actor->fwork[3] = 100.0f;
actor->fwork[4] = -100.0f;

View File

@ -20,7 +20,7 @@ void Titania_80187530(Actor* actor) {
actor->obj.rot.y = 180.0f;
Object_SetInfo(&actor->info, actor->obj.id);
AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0);
actor->unk_0B6 = 1;
actor->animFrame = 1;
}
void Titania_801875D0(Actor* actor, s32 arg1) {
@ -156,7 +156,7 @@ void Titania_LevelStart(Player* player) {
D_ctx_80177A48[3] = 200.0f;
D_ctx_80177A48[1] = 0.0f;
*D_ctx_80177A10 = 0;
D_ctx_80177A10[0] = 0;
Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[2] * M_DTOR, MTXF_NEW);
@ -271,12 +271,12 @@ void Titania_80188108(Actor* actor, s32 arg1) {
if (arg1 < 3) {
actor->iwork[11] = 1;
actor->unk_0C9 = 1;
actor->drawShadow = true;
actor->fwork[3] = D_i5_801B7348[arg1];
actor->state = 30;
AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4);
} else {
actor->unk_0B6 = 1;
actor->animFrame = 1;
actor->state = 20;
AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0);
actor->fwork[9] = 20.0f;

View File

@ -36,22 +36,22 @@ void Andross_80187530(Actor* actor) {
case 0:
break;
case 1:
actor->unk_0B6 += (s32) actor->fwork[22];
if (actor->unk_0B6 >= Animation_GetFrameCount(&D_VE2_6014658)) {
actor->unk_0B6 = Animation_GetFrameCount(&D_VE2_6014658) - 1;
actor->animFrame += (s32) actor->fwork[22];
if (actor->animFrame >= Animation_GetFrameCount(&D_VE2_6014658)) {
actor->animFrame = Animation_GetFrameCount(&D_VE2_6014658) - 1;
}
break;
case 2:
actor->unk_0B6 -= (s32) actor->fwork[22];
if (actor->unk_0B6 <= 0) {
actor->unk_0B6 = 0;
actor->animFrame -= (s32) actor->fwork[22];
if (actor->animFrame <= 0) {
actor->animFrame = 0;
}
break;
default:
break;
}
index = actor->unk_0B6 / 18.0f;
index = actor->animFrame / 18.0f;
actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_i6_801A6760[index]);
actor->obj.rot.z = D_Andross_801A7F68;
}
@ -66,7 +66,7 @@ bool Andross_8018767C(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void*
void Andross_8018769C(Actor* actor) {
Vec3f sp28[20];
Animation_GetFrameData(&D_VE2_6014658, actor->unk_0B6, sp28);
Animation_GetFrameData(&D_VE2_6014658, actor->animFrame, sp28);
Animation_DrawSkeleton(1, D_VE2_6014844, sp28, Andross_8018767C, NULL, NULL, &gIdentityMatrix);
}
@ -190,7 +190,7 @@ void Andross_80187C5C(void) {
scenery360->obj.pos.y = gLevelObjects[i].yPos;
scenery360->obj.rot.y = gLevelObjects[i].rot.y;
if (scenery360->obj.id == OBJ_SCENERY_147) {
scenery360->unk_40 = gLevelObjects[i].rot.z;
scenery360->pathIndex = gLevelObjects[i].rot.z;
}
Object_SetInfo(&scenery360->info, scenery360->obj.id);
if (scenery360->obj.id == OBJ_SCENERY_131) {
@ -250,7 +250,7 @@ void Andross_801880E4(Actor* actor) {
f32 temp_fv1;
for (scenery360 = gScenery360, i = 0; i < 200; i++, scenery360++) {
if ((scenery360->obj.id == OBJ_SCENERY_147) && (scenery360->unk_40 == (u8) actor->unk_04E)) {
if ((scenery360->obj.id == OBJ_SCENERY_147) && (scenery360->pathIndex == (u8) actor->counter_04E)) {
actor->fwork[3] = scenery360->obj.pos.x;
actor->fwork[4] = scenery360->obj.pos.y;
actor->fwork[5] = scenery360->obj.pos.z;
@ -262,7 +262,7 @@ void Andross_801880E4(Actor* actor) {
yDisplacement = actor->fwork[4] - actor->obj.pos.y;
zDisplacement = actor->fwork[5] - actor->obj.pos.z;
if ((fabsf(xDisplacement) < 300.0f) && (fabsf(yDisplacement) < 300.0f) && (fabsf(zDisplacement) < 300.0f)) {
actor->unk_04E++;
actor->counter_04E++;
}
if (((gGameFrameCount % 32) == 0)) {
actor->iwork[11] = 1;
@ -277,10 +277,10 @@ void Andross_801880E4(Actor* actor) {
Math_SmoothStepToF(&actor->fwork[0], actor->fwork[1], 0.2f, 3.0f, 0.00001f);
yaw = Math_RadToDeg(Math_Atan2F(xDisplacement, zDisplacement));
Math_SmoothStepToAngle(&actor->unk_0F4.x,
Math_SmoothStepToAngle(&actor->rot_0F4.x,
Math_RadToDeg(Math_Atan2F(yDisplacement, sqrtf(SQ(xDisplacement) + SQ(zDisplacement)))),
0.1f, actor->fwork[2], 0.0f);
temp_fv1 = Math_SmoothStepToAngle(&actor->unk_0F4.y, yaw, 0.1f, actor->fwork[2], 0.0001f) * 40.0f;
temp_fv1 = Math_SmoothStepToAngle(&actor->rot_0F4.y, yaw, 0.1f, actor->fwork[2], 0.0001f) * 40.0f;
if (temp_fv1 < 0.0f) {
var_fv0 = temp_fv1 * -1.0f;
} else {
@ -288,10 +288,10 @@ void Andross_801880E4(Actor* actor) {
}
Math_SmoothStepToAngle(&actor->obj.rot.z, var_fv0, 0.1f, 3.0f, 0.01f);
actor->obj.rot.y = actor->unk_0F4.y;
actor->obj.rot.x = -actor->unk_0F4.x;
Matrix_RotateY(gCalcMatrix, actor->unk_0F4.y * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, -actor->unk_0F4.x * M_DTOR, MTXF_APPLY);
actor->obj.rot.y = actor->rot_0F4.y;
actor->obj.rot.x = -actor->rot_0F4.x;
Matrix_RotateY(gCalcMatrix, actor->rot_0F4.y * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, -actor->rot_0F4.x * M_DTOR, MTXF_APPLY);
sp48.x = 0;
sp48.y = 0;
sp48.z = actor->fwork[0];
@ -333,15 +333,15 @@ void Andross_80188528(Actor* actor) {
}
actor->obj.rot.y = RAD_TO_DEG(-gPlayer[0].camYaw);
actor->obj.rot.x = RAD_TO_DEG(gPlayer[0].camPitch);
actor->unk_0F4.z += actor->fwork[0];
actor->rot_0F4.z += actor->fwork[0];
}
void Andross_80188660(Actor* actor) {
RCP_SetupDL(&gMasterDisp, 0x3D);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255);
Matrix_RotateZ(gGfxMatrix, actor->unk_0F4.z * M_DTOR, MTXF_APPLY);
Matrix_RotateZ(gGfxMatrix, actor->rot_0F4.z * M_DTOR, MTXF_APPLY);
Matrix_Scale(gGfxMatrix, 1.1f, 0.9f, 1.0f, MTXF_APPLY);
Matrix_RotateZ(gGfxMatrix, -actor->unk_0F4.z * M_DTOR, MTXF_APPLY);
Matrix_RotateZ(gGfxMatrix, -actor->rot_0F4.z * M_DTOR, MTXF_APPLY);
Matrix_Scale(gGfxMatrix, 1.1f, 0.9f, 1.0f, MTXF_APPLY);
Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 1.0f, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
@ -605,8 +605,8 @@ void Andross_8018933C(Actor* actor) {
void Andross_801893B8(Actor* actor) {
if (gAllRangeCheckpoint == 0) {
actor->unk_04E++;
switch (actor->unk_04E) {
actor->counter_04E++;
switch (actor->counter_04E) {
case 200:
Radio_PlayMessage(gMsg_ID_8250, RCID_ANDROSS_RED);
return;
@ -627,10 +627,10 @@ void Andross_80189470(Actor* actor) {
s32 i;
Player* player = &gPlayer[0];
if ((D_ctx_80177AB0 != 7) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) &&
if ((gDrawBackdrop != 7) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) &&
(fabsf(actor->obj.pos.x - gPlayer[0].pos.x) < 9000.0f) &&
(fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 9000.0f)) {
D_ctx_80177AB0 = 7;
gDrawBackdrop = 7;
Radio_PlayMessage(gMsg_ID_19370, RCID_JAMES);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 20);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 20);
@ -646,7 +646,7 @@ void Andross_80189470(Actor* actor) {
player->state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE;
player->csState = 3;
player->zPath = gPathProgress = 0.0f;
D_ctx_80177AB0 = D_ctx_80177A98 = 1;
gDrawBackdrop = gDrawGround = true;
player->cam.eye.x = 1200.0f;
player->cam.eye.z = 1200.0f;
player->cam.eye.y = 1800.0f;
@ -764,8 +764,8 @@ void Andross_80189B70(Boss* boss) {
Andross_80188CB8(boss);
boss->info.hitbox = SEGMENTED_TO_VIRTUAL(&D_ANDROSS_C038F24);
Math_SmoothStepToF(&gAndrossUnkAlpha, 255.0f, 1.0f, 4.0f, 0);
Math_SmoothStepToF(&boss->unk_3F8, 10.0f, 0.2f, 0.2f, 0);
if (!(gGameFrameCount & 0x10)) {
Math_SmoothStepToF(&boss->scale, 10.0f, 0.2f, 0.2f, 0);
if ((gGameFrameCount & 0x10) == 0) {
Math_SmoothStepToF(&boss->fwork[25], 255.0f, 1.0f, 10.0f, 0);
} else {
Math_SmoothStepToF(&boss->fwork[25], 100.0f, 1.0f, 10.0f, 0);
@ -781,7 +781,7 @@ void Andross_80189B70(Boss* boss) {
switch (boss->state) {
case 0:
boss->health = 200;
D_ctx_80177AB0 = 3;
gDrawBackdrop = 3;
boss->fwork[19] = -26.0f;
boss->fwork[10] = 8.0f;
Andross_80189098(boss);
@ -855,14 +855,14 @@ void Andross_80189B70(Boss* boss) {
boss->fwork[13] = 1.0f;
boss->fwork[19] = 23.0f;
boss->fwork[1] = 0.0f;
gPlayer[0].cockpitView = true;
Math_SmoothStepToF(&D_display_800CA230, 0.15f, 0.2f, 0.004f, 0.0f);
gPlayer[0].alternateView = true;
Math_SmoothStepToF(&gCamDistortion, 0.15f, 0.2f, 0.004f, 0.0f);
if (boss->timer_050 == 120) {
AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_LAUGH, boss->sfxSource, 4);
}
if (boss->timer_050 == 0) {
gPlayer[0].baseSpeed = gArwingSpeed;
gPlayer[0].cockpitView = false;
gPlayer[0].alternateView = false;
gFillScreenAlphaTarget = 0;
boss->timer_05A = 50;
if (boss->swork[4] != 0) {
@ -897,7 +897,7 @@ void Andross_80189B70(Boss* boss) {
Matrix_MultVec3fNoTranslate(gCalcMatrix, &vec, &sp64);
boss->obj.pos.x = boss->fwork[3] + sp64.x;
boss->obj.pos.z = boss->fwork[5] + sp64.z;
boss->unk_078.y = Math_RadToDeg(Math_Atan2F(xDisplacement, zDisplacement));
boss->rot_078.y = Math_RadToDeg(Math_Atan2F(xDisplacement, zDisplacement));
boss->state = 13;
AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_LAUGH, boss->sfxSource, 4);
boss->timer_054 = 90;
@ -948,7 +948,7 @@ void Andross_80189B70(Boss* boss) {
Radio_PlayMessage(gMsg_ID_19335, RCID_ANDROSS_RED);
}
if (gCsFrameCount == 200) {
gBossActive = 0;
gBossActive = false;
gPlayer[0].baseSpeed = gArwingSpeed;
Audio_StopPlayerNoise(0);
boss->state = 21;
@ -960,7 +960,7 @@ void Andross_80189B70(Boss* boss) {
Object_Kill(&gActors[i].obj, gActors[i].sfxSource);
}
}
D_ctx_80177AB0 = 4;
gDrawBackdrop = 4;
gCsFrameCount = 0;
}
break;
@ -974,7 +974,7 @@ void Andross_80189B70(Boss* boss) {
gPlayerGlareAlphas[0] = 255;
}
gPlayerGlareReds[0] = gPlayerGlareGreens[0] = gPlayerGlareBlues[0] = 255;
Math_SmoothStepToF(&D_display_800CA230, 0.15f, 0.2f, 0.004f, 0.0f);
Math_SmoothStepToF(&gCamDistortion, 0.15f, 0.2f, 0.004f, 0.0f);
Math_SmoothStepToF(&D_ctx_801779A8[gMainController], 70.0f, 1.0f, 4.0f, 0.0f);
}
switch (gCsFrameCount) {
@ -991,7 +991,7 @@ void Andross_80189B70(Boss* boss) {
gAllRangeCheckpoint = 1;
break;
case 600:
D_ctx_80177AB0 = 5;
gDrawBackdrop = 5;
gFogRed = 129;
gFogGreen = 27;
gFogBlue = 0;
@ -1063,16 +1063,16 @@ void Andross_80189B70(Boss* boss) {
vec.z = 0.0f;
Matrix_MultVec3fNoTranslate(gCalcMatrix, &vec, &sp64);
if (gCsFrameCount < 1000) {
frameCountMask = 1;
frameCountMask = 2 - 1;
} else if (gCsFrameCount < 1500) {
frameCountMask = 3;
frameCountMask = 4 - 1;
} else if (gCsFrameCount < 2000) {
frameCountMask = 1;
frameCountMask = 2 - 1;
} else {
frameCountMask = 1;
frameCountMask = 2 - 1;
}
sp98 = 1;
if (!(gGameFrameCount & frameCountMask)) {
if ((gGameFrameCount & frameCountMask) == 0) {
for (i = 0; i < sp98; i++) {
func_effect_8007797C(gPlayer[0].cam.eye.x + sp64.x, gPlayer[0].cam.eye.y + sp64.y,
gPlayer[0].cam.eye.z + sp64.z, sp58.x, sp58.y, sp58.z,
@ -1086,18 +1086,18 @@ void Andross_80189B70(Boss* boss) {
yDisplacement = boss->fwork[4] - boss->obj.pos.y;
zDisplacement = boss->fwork[5] - boss->obj.pos.z;
yaw = Math_RadToDeg(Math_Atan2F(xDisplacement, zDisplacement));
Math_SmoothStepToAngle(&boss->unk_078.x,
Math_SmoothStepToAngle(&boss->rot_078.x,
Math_RadToDeg(Math_Atan2F(yDisplacement, sqrtf(SQ(xDisplacement) + SQ(zDisplacement)))),
0.1f, boss->fwork[2], 0.0f);
Math_SmoothStepToAngle(&boss->unk_078.y, yaw, 0.1f, boss->fwork[2], 0.0f);
Math_SmoothStepToAngle(&boss->rot_078.y, yaw, 0.1f, boss->fwork[2], 0.0f);
if (boss->swork[4] != 0) {
Math_SmoothStepToAngle(&boss->obj.rot.y, Math_RadToDeg(-gPlayer[0].camYaw), 0.3f, 5.0f, 0.0f);
} else if (boss->timer_054 == 0) {
Math_SmoothStepToAngle(&boss->obj.rot.y, Math_RadToDeg(-gPlayer[0].camYaw), 0.3f, 1.5f, 0.0f);
}
Math_SmoothStepToF(&boss->fwork[0], boss->fwork[1], 0.2f, 1.0f, 0.00001f);
Matrix_RotateY(gCalcMatrix, boss->unk_078.y * M_DTOR, 0U);
Matrix_RotateX(gCalcMatrix, -boss->unk_078.x * M_DTOR, 1U);
Matrix_RotateY(gCalcMatrix, boss->rot_078.y * M_DTOR, 0U);
Matrix_RotateX(gCalcMatrix, -boss->rot_078.x * M_DTOR, 1U);
vec.x = 0.0f;
vec.y = 0.0f;
vec.z = boss->fwork[0];
@ -1111,7 +1111,7 @@ void Andross_80189B70(Boss* boss) {
gRadarMarks[59].pos.x = boss->obj.pos.x;
gRadarMarks[59].pos.y = boss->obj.pos.y;
gRadarMarks[59].pos.z = boss->obj.pos.z;
gRadarMarks[59].yRot = boss->unk_078.y + 180.0f;
gRadarMarks[59].yRot = boss->rot_078.y + 180.0f;
}
gActors[10].info.targetOffset = 1.0f;
gActors[11].info.targetOffset = 1.0f;
@ -1205,7 +1205,7 @@ void Andross_8018B8C0(Boss* boss) {
Matrix_Scale(gGfxMatrix, boss->fwork[23] + 1.0f, 1.0f - boss->fwork[23], 1.0f, MTXF_APPLY);
Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 20.0f * M_DTOR, MTXF_APPLY);
Matrix_Scale(gGfxMatrix, boss->fwork[23] + 1.0f, 1.0f - boss->fwork[23], 1.0f, MTXF_APPLY);
Matrix_Scale(gGfxMatrix, boss->unk_3F8, boss->unk_3F8, boss->unk_3F8, MTXF_APPLY);
Matrix_Scale(gGfxMatrix, boss->scale, boss->scale, boss->scale, MTXF_APPLY);
Animation_DrawSkeleton(0, D_VE2_600C0A4, boss->vwork, Andross_8018B47C, NULL, boss, &gIdentityMatrix);
if (boss->fwork[21] >= 254) {
RCP_SetupDL(&gMasterDisp, 0x36);
@ -1278,7 +1278,7 @@ void Andross_8018BDD8(void) {
sp70[i].v.ob[1] = sp74[i].v.ob[1] + sp7C[temp_lo];
}
if (gBossActive != 0) {
if (gBossActive) {
Math_SmoothStepToF(&D_Andross_801A7F58, 0.0f, 1.0f, 10.0f, 0.0f);
} else {
Math_SmoothStepToF(&D_Andross_801A7F58, D_Andross_801A7F60, 1.0f, 1.0f, 0.0f);
@ -1573,8 +1573,8 @@ void Andross_Boss320_Init(Boss320* this) {
this->timer_058 = 10;
this->swork[4] = this->swork[5] = 200;
this->swork[6] = 100;
gBossActive = 1;
D_ctx_80177AB0 = 1;
gBossActive = true;
gDrawBackdrop = 1;
this->info.hitbox[16] = 200.0f;
this->info.hitbox[22] = 200.0f;
Audio_PlaySequence(SEQ_PLAYER_BGM, NA_BGM_BOSS_ANDROSS, 0, 0);
@ -1789,7 +1789,7 @@ void Andross_8018DBF0(Boss* boss) {
gAmbientR = 10;
gAmbientG = 0;
gAmbientB = 20;
D_ctx_8017812C = 0;
gGroundClipMode = 0;
boss->fwork[19] += 5.0f;
if (boss->swork[9] != 0) {
boss->swork[9]--;
@ -1802,15 +1802,15 @@ void Andross_8018DBF0(Boss* boss) {
if (boss->swork[10] != 0) {
boss->swork[10]--;
if (boss->swork[10] < 20) {
frameCountMask = 0x1F;
frameCountMask = 32 - 1;
} else if (boss->swork[10] < 30) {
frameCountMask = 7;
frameCountMask = 8 - 1;
} else if (boss->swork[10] < 40) {
frameCountMask = 1;
frameCountMask = 2 - 1;
} else {
frameCountMask = 0;
frameCountMask = 1 - 1;
}
if (!(gGameFrameCount & frameCountMask)) {
if ((gGameFrameCount & frameCountMask) == 0) {
Andross_8018CA50(boss->vwork[6].x, boss->vwork[6].y, boss->vwork[6].z, 0.0f, -30.0f, 0.0f, 30.0f);
Andross_8018CA50(boss->vwork[7].x, boss->vwork[7].y, boss->vwork[7].z, 0.0f, -30.0f, 0.0f, 30.0f);
Andross_8018CA50(boss->vwork[8].x, boss->vwork[8].y, boss->vwork[8].z, -30.0f, 0.0f, 0.0f, 30.0f);
@ -2743,10 +2743,10 @@ void Andross_8018DBF0(Boss* boss) {
boss1->swork[1] = 100;
boss1->state = 10;
boss1->timer_050 = 180;
boss1->unk_3F8 = 5.0f;
boss1->scale = 5.0f;
Object_SetInfo(&boss1->info, boss1->obj.id);
Object_Kill(&boss->obj, boss->sfxSource);
D_ctx_80177AB0 = 3;
gDrawBackdrop = 3;
Andross_80189098(boss);
Radio_PlayMessage(gMsg_ID_19330, RCID_ANDROSS_RED);
break;
@ -3210,7 +3210,7 @@ void Andross_80192E94(Actor* actor) {
actor->vwork[0].y = actor->obj.pos.y - 300.0f;
actor->vwork[0].z = actor->obj.pos.z;
actor->health = 30;
actor->unk_0F4.z = actor->obj.rot.z;
actor->rot_0F4.z = actor->obj.rot.z;
AUDIO_PLAY_SFX(NA_SE_OB_SPARK_BEAM, actor->sfxSource, 0);
break;
case 1:
@ -3235,7 +3235,7 @@ void Andross_80192E94(Actor* actor) {
}
/* fallthrough */
case 2:
actor->obj.rot.z = actor->unk_0F4.z + D_Andross_801A7F68;
actor->obj.rot.z = actor->rot_0F4.z + D_Andross_801A7F68;
Matrix_RotateZ(gCalcMatrix, M_DTOR * D_Andross_801A7F68, MTXF_NEW);
Matrix_MultVec3fNoTranslate(gCalcMatrix, actor->vwork, &actor->obj.pos);
actor->obj.pos.y += 300.0f;
@ -3319,7 +3319,7 @@ void Andross_8019350C(Scenery* scenery) {
void Andross_8019356C(Scenery* scenery) {
scenery->obj.rot.z = D_Andross_801A7F68;
scenery->obj.pos.z += scenery->unk_60;
scenery->obj.pos.z += scenery->effectVel.z;
if (scenery->timer_4C == 1) {
Object_Kill(&scenery->obj, scenery->sfxSource);
}
@ -3349,7 +3349,7 @@ void Andross_80193668(Scenery* scenery, f32 xPos, f32 yPos, f32 zPos, s32 arg4)
scenery->obj.pos.x = xPos;
scenery->obj.pos.y = yPos;
scenery->obj.pos.z = zPos;
scenery->unk_60 = -40.0f;
scenery->effectVel.z = -40.0f;
Object_SetInfo(&scenery->info, scenery->obj.id);
scenery->timer_4C = (arg4 * 50) + 100;
scenery->info.cullDistance = 100000.0f;
@ -3416,7 +3416,7 @@ void Andross_801939A0(s32 actorIndex) {
actor->obj.pos.y = gPlayer[0].cam.at.y;
actor->obj.pos.z = 0.0f;
actor->iwork[11] = 1;
actor->unk_0F4.x = 90.0f;
actor->rot_0F4.x = 90.0f;
actor->fwork[0] = 50.0f;
actor->fwork[1] = 6.5f;
if (actorIndex == 10) {
@ -3425,7 +3425,7 @@ void Andross_801939A0(s32 actorIndex) {
if (actorIndex == 1) {
actor->state = 1;
actor->unk_046 = 255;
actor->unk_0B6 = 1000;
actor->animFrame = 1000;
}
Object_SetInfo(&actor->info, actor->obj.id);
AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4);
@ -3451,7 +3451,7 @@ void Andross_80193AE4(s32 actorIndex) {
Object_SetInfo(&actor->info, actor->obj.id);
if (actorIndex == 0) {
actor->state = 200;
actor->unk_0B6 = 1;
actor->animFrame = 1;
AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0);
} else {
actor->iwork[11] = 1;
@ -3527,7 +3527,7 @@ void Andross_80193C4C(Player* player) {
break;
case 86:
Object_Kill(&boss->obj, boss->sfxSource);
D_ctx_80177AB0 = 0;
gDrawBackdrop = 0;
break;
case 111:
player->csState = 2;
@ -3574,7 +3574,7 @@ void Andross_80193C4C(Player* player) {
Math_SmoothStepToF(&D_ctx_80177A48[2], 0.85f, 1.0f, 0.01f, 0.0f);
Math_SmoothStepToF(&D_ctx_80177A48[3], 200.0f, 0.1f, 5.0f, 0.0f);
D_ctx_80177A48[4] += 4.5f;
D_ctx_80177AB0 = 2;
gDrawBackdrop = 2;
Matrix_RotateZ(gCalcMatrix, 2.0f * RAND_FLOAT(M_PI), MTXF_NEW);
sp74.x = RAND_FLOAT(50.0f) + 120.0f;
sp74.y = 0.0f;
@ -3625,7 +3625,7 @@ void Andross_80193C4C(Player* player) {
case 25:
for (i = 0; i < 12; i++) {
Andross_80193668(&gScenery[i], player->pos.x, player->pos.y,
(player->cam.eye.z - gPathProgress) + (2195.0f * i), i);
player->cam.eye.z - gPathProgress + (2195.0f * i), i);
}
break;
case 150:
@ -3641,7 +3641,7 @@ void Andross_80193C4C(Player* player) {
gLevelMode = LEVELMODE_ALL_RANGE;
player->csState = 3;
player->zPath = gPathProgress = 0.0f;
D_ctx_80177AB0 = D_ctx_80177A98 = 1;
gDrawBackdrop = gDrawGround = true;
player->cam.eye.x = 1200.0f;
player->cam.eye.z = 1200.0f;
player->cam.eye.y = 1800.0f;
@ -3711,8 +3711,8 @@ void Andross_80193C4C(Player* player) {
D_ctx_80177A48[2] = 0;
D_ctx_80177A48[3] = 1.0f;
gActors[10].obj.pos.y = 1500.0f;
gActors[10].unk_0F4.z = 180.0f;
D_ctx_80177AB0 = 0;
gActors[10].rot_0F4.z = 180.0f;
gDrawBackdrop = 0;
gFogFar = 1030;
D_i6_801A7F40 = gLight1R;
D_i6_801A7F44 = gLight1G;
@ -3801,8 +3801,8 @@ void Andross_80193C4C(Player* player) {
gActors[10].state = 101;
gActors[10].fwork[0] = 0.0f;
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;
gActors[10].rot_0F4.z = 70.0f;
gActors[10].rot_0F4.x = gActors[10].rot_0F4.y = 0.0f;
gFillScreenAlpha = gFillScreenAlphaTarget = 255;
gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0;
player->csTimer = 3;
@ -3972,7 +3972,7 @@ void Andross_80193C4C(Player* player) {
player->unk_014 = 0.2f;
player->unk_018 = 0.0f;
player->unk_01C = 0.05f;
D_ctx_80177AB0 = 6;
gDrawBackdrop = 6;
gProjectFar = 12800.0f;
}
D_ctx_80177A48[0] = 1.0f;
@ -4015,7 +4015,7 @@ void Andross_80195E44(Actor* actor) {
switch (actor->state) {
case 0:
actor->unk_0F4.z += actor->fwork[1];
actor->rot_0F4.z += actor->fwork[1];
if (gCsFrameCount > 250) {
Math_SmoothStepToF(&actor->fwork[1], 0.5f, 0.1f, 0.04f, 0.0f);
} else {
@ -4023,15 +4023,15 @@ void Andross_80195E44(Actor* actor) {
}
break;
case 1:
actor->unk_0F4.z += actor->fwork[1];
actor->rot_0F4.z += actor->fwork[1];
Math_SmoothStepToF(&actor->fwork[1], -2.0f, 0.1f, 0.04f, 0.0f);
if (gCsFrameCount == 55) {
actor->state++;
}
break;
case 2:
Math_SmoothStepToF(&actor->unk_0F4.x, 180.0f, 0.1f, 1.0f, 0.0f);
Math_SmoothStepToF(&actor->unk_0F4.y, 200.0f, 0.1f, 1.0f, 0.0f);
Math_SmoothStepToF(&actor->rot_0F4.x, 180.0f, 0.1f, 1.0f, 0.0f);
Math_SmoothStepToF(&actor->rot_0F4.y, 200.0f, 0.1f, 1.0f, 0.0f);
actor->unk_046 -= 5;
if (actor->unk_046 < 0) {
actor->unk_046 = 0;
@ -4039,22 +4039,22 @@ void Andross_80195E44(Actor* actor) {
}
break;
case 101:
Math_SmoothStepToF(&actor->unk_0F4.z, 0.0f, 0.03f, 0.5f, 0.0f);
Math_SmoothStepToF(&actor->rot_0F4.z, 0.0f, 0.03f, 0.5f, 0.0f);
Math_SmoothStepToF(&actor->obj.pos.x, 0.0f, 0.03f, 5.0f, 0.0f);
Math_SmoothStepToF(&actor->obj.pos.y, 15000.0f, 0.03f, 5.0f, 0.0f);
Math_SmoothStepToF(&actor->obj.pos.z, 0.0f, 0.03f, 5.0f, 0.0f);
break;
case 100:
actor->fwork[7] += 3.0f;
actor->unk_0F4.z = SIN_DEG(actor->fwork[7]) * 1.5f;
actor->rot_0F4.z = SIN_DEG(actor->fwork[7]) * 1.5f;
actor->fwork[8] += 2.0f;
sp34 = SIN_DEG(actor->fwork[8]) * 0.5f;
break;
case 200:
break;
}
Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + 180.0f) * M_DTOR, 0U);
Matrix_RotateX(gCalcMatrix, -(actor->unk_0F4.x * M_DTOR), 1U);
Matrix_RotateY(gCalcMatrix, (actor->rot_0F4.y + 180.0f) * M_DTOR, 0U);
Matrix_RotateX(gCalcMatrix, -(actor->rot_0F4.x * M_DTOR), 1U);
sp44.x = 0.0f;
sp44.y = 0.0f;
sp44.z = actor->fwork[0];
@ -4062,9 +4062,9 @@ void Andross_80195E44(Actor* actor) {
actor->vel.x = sp38.x;
actor->vel.y = sp38.y + sp34;
actor->vel.z = sp38.z;
actor->obj.rot.x = -actor->unk_0F4.x;
actor->obj.rot.y = actor->unk_0F4.y + 180.0f;
actor->obj.rot.z = -actor->unk_0F4.z;
actor->obj.rot.x = -actor->rot_0F4.x;
actor->obj.rot.y = actor->rot_0F4.y + 180.0f;
actor->obj.rot.z = -actor->rot_0F4.z;
}
void Andross_801961AC(void) {

View File

@ -73,7 +73,7 @@ void SectorY_Boss314_Init(Boss314* this) {
gScenery360[0].obj.pos.z = -30000.0f;
}
this->unk_078.y = 0.0f;
this->rot_078.y = 0.0f;
SectorY_8019AEC0(this);
} else {
this->fwork[34] = 2.8f;
@ -84,13 +84,13 @@ void SectorY_Boss314_Init(Boss314* this) {
this->fwork[45] = 35.0f;
if (this->index == 1) {
this->unk_078.y = 15.0f;
this->rot_078.y = 15.0f;
} else {
this->unk_078.y = 345.0f;
this->rot_078.y = 345.0f;
}
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;
this->vel.x = SIN_DEG(this->rot_078.y) * this->fwork[45] * 0.2f;
this->vel.z = COS_DEG(this->rot_078.y) * this->fwork[45] * 0.2f;
SectorY_80198244(this);
this->timer_056 = 250;
}
@ -123,7 +123,7 @@ void SectorY_80197F84(Boss* boss) {
Math_SmoothStepToF(&boss->vel.y, 0.0f, 0.1f, 0.2f, 0.1f);
Math_SmoothStepToF(&boss->vel.z, 0.0f, 0.1f, 0.2f, 0.1f);
Math_SmoothStepToF(&boss->vel.x, 0.0f, 0.1f, 0.2f, 0.1f);
Math_SmoothStepToAngle(&boss->unk_078.x, 0.0f, 0.1f, 4.0f, 0.1f);
Math_SmoothStepToAngle(&boss->rot_078.x, 0.0f, 0.1f, 4.0f, 0.1f);
if (SectorY_8019B5CC(boss)) {
Math_SmoothStepToF(&boss->obj.pos.y, 1000.0f, 0.1f, 30.0f, 0.1f);
@ -138,7 +138,7 @@ void SectorY_80197F84(Boss* boss) {
yaw = Math_RadToDeg(Math_Atan2F(boss->fwork[18] - boss->obj.pos.x, boss->fwork[20] - boss->obj.pos.z));
Math_SmoothStepToAngle(&boss->unk_078.y, yaw, 0.1f, 8.0f, 0.1f);
Math_SmoothStepToAngle(&boss->rot_078.y, yaw, 0.1f, 8.0f, 0.1f);
if (boss->timer_050 == 0) {
SectorY_80198244(boss);
@ -148,7 +148,7 @@ void SectorY_80197F84(Boss* boss) {
if (ABS(boss->vel.x) <= 1.0f && (ABS(boss->vel.z) <= 1.0f) &&
(fabsf(boss->fwork[18] - boss->obj.pos.x) <= 400.0f) &&
(fabsf(boss->fwork[20] - boss->obj.pos.z) <= 1400.0f)) {
if ((Rand_ZeroOne() < 0.2f) && (boss->unk_078.x == 0.0f)) {
if ((Rand_ZeroOne() < 0.2f) && (boss->rot_078.x == 0.0f)) {
SectorY_8019AA08(boss);
}
if (Rand_ZeroOne() < 0.2f) {
@ -171,8 +171,8 @@ void SectorY_80198244(Boss* boss) {
boss->swork[20] = 3;
boss->swork[21] = 1;
boss->timer_056 = (s32) (RAND_FLOAT(500.0f) + 100.0f);
boss->fwork[11] = SIN_DEG(boss->unk_078.y) * boss->fwork[45];
boss->fwork[13] = COS_DEG(boss->unk_078.y) * boss->fwork[45];
boss->fwork[11] = SIN_DEG(boss->rot_078.y) * boss->fwork[45];
boss->fwork[13] = COS_DEG(boss->rot_078.y) * boss->fwork[45];
speed = ABS(boss->vel.x);
if (speed < 5.0f) {
@ -199,8 +199,8 @@ void SectorY_801983E4(Boss* boss) {
SectorY_8019BC14(boss);
}
Math_SmoothStepToAngle(&boss->unk_078.z, 0.0f, 0.1f, 2.0f, 0.1f);
Math_SmoothStepToAngle(&boss->unk_078.x, 0.0f, 0.1f, 2.0f, 0.1f);
Math_SmoothStepToAngle(&boss->rot_078.z, 0.0f, 0.1f, 2.0f, 0.1f);
Math_SmoothStepToAngle(&boss->rot_078.x, 0.0f, 0.1f, 2.0f, 0.1f);
Math_SmoothStepToF(&boss->vel.x, boss->fwork[11], 0.1f, 0.5f, 0.1f);
Math_SmoothStepToF(&boss->vel.z, boss->fwork[13], 0.1f, 0.5f, 0.1f);
Math_SmoothStepToF(&boss->vel.y, 0.0f, 0.1f, 0.2f, 0.1f);
@ -208,23 +208,23 @@ void SectorY_801983E4(Boss* boss) {
xSpeed = ABS(boss->fwork[18] - boss->obj.pos.x);
zSpeed = ABS(boss->fwork[20] - boss->obj.pos.z);
if (boss->unk_078.x != 0.0f) {
Math_SmoothStepToAngle(&boss->unk_078.x, boss->fwork[10], 0.1f, 6.0f, 0.1f);
if (boss->unk_078.x < 200.0f) {
if (boss->rot_078.x != 0.0f) {
Math_SmoothStepToAngle(&boss->rot_078.x, boss->fwork[10], 0.1f, 6.0f, 0.1f);
if (boss->rot_078.x < 200.0f) {
boss->swork[21] = 1;
boss->fwork[10] = 0.0f;
boss->unk_078.x = 0.0f;
boss->unk_078.y -= 180.0f;
boss->unk_078.z -= 180.0f;
if (boss->unk_078.y < 0.0f) {
boss->unk_078.y += 360.0f;
boss->rot_078.x = 0.0f;
boss->rot_078.y -= 180.0f;
boss->rot_078.z -= 180.0f;
if (boss->rot_078.y < 0.0f) {
boss->rot_078.y += 360.0f;
}
if (boss->unk_078.z < 0.0f) {
boss->unk_078.z += 360.0f;
if (boss->rot_078.z < 0.0f) {
boss->rot_078.z += 360.0f;
}
boss->fwork[11] = SIN_DEG(boss->unk_078.y) * boss->fwork[45];
boss->fwork[13] = COS_DEG(boss->unk_078.y) * boss->fwork[45];
boss->fwork[11] = SIN_DEG(boss->rot_078.y) * boss->fwork[45];
boss->fwork[13] = COS_DEG(boss->rot_078.y) * boss->fwork[45];
boss->fwork[34] = 2.8f;
}
}
@ -237,13 +237,13 @@ void SectorY_801983E4(Boss* boss) {
yAngle += 360.0f;
}
yAngle = boss->unk_078.y - yAngle;
yAngle = boss->rot_078.y - yAngle;
if (yAngle < 0.0f) {
yAngle += 360.0f;
}
if ((zSpeed <= 1300.0f) && (xSpeed <= 800.0f) && (yAngle < 260.0f) && (yAngle > 100.0f) &&
(boss->unk_078.x == 0.0f) && (boss->fwork[34] <= 2.0f)) {
(boss->rot_078.x == 0.0f) && (boss->fwork[34] <= 2.0f)) {
if (Rand_ZeroOne() < 0.2f) {
SectorY_8019AA08(boss);
}
@ -260,7 +260,7 @@ void SectorY_801983E4(Boss* boss) {
}
}
if (((yAngle > 300.0f) || (yAngle < 60.0f)) && (boss->unk_078.x == 0.0f)) {
if (((yAngle > 300.0f) || (yAngle < 60.0f)) && (boss->rot_078.x == 0.0f)) {
if (Rand_ZeroOne() < 0.3f) {
if (Rand_ZeroOne() < 0.4f) {
SectorY_80197F18(boss);
@ -268,10 +268,10 @@ void SectorY_801983E4(Boss* boss) {
SectorY_80199D64(boss);
}
} else if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_U_TURN) {
Math_SmoothStepToAngle(&boss->unk_078.x, 181.0f, 0.1f, 6.0f, 0.1f);
Math_SmoothStepToAngle(&boss->rot_078.x, 181.0f, 0.1f, 6.0f, 0.1f);
boss->swork[21] = 3;
boss->fwork[11] = SIN_DEG(boss->unk_078.y) * (boss->fwork[45] + 10.0f);
boss->fwork[13] = COS_DEG(boss->unk_078.y) * (boss->fwork[45] + 10.0f);
boss->fwork[11] = SIN_DEG(boss->rot_078.y) * (boss->fwork[45] + 10.0f);
boss->fwork[13] = COS_DEG(boss->rot_078.y) * (boss->fwork[45] + 10.0f);
boss->fwork[34] = 2.8f;
}
}
@ -300,7 +300,7 @@ void SectorY_801983E4(Boss* boss) {
void SectorY_80198ABC(Boss* boss) {
f32 yAngle;
yAngle = Math_RadToDeg(Math_Atan2F(-boss->obj.pos.x, -300.0f - boss->obj.pos.z)) - boss->unk_078.y;
yAngle = Math_RadToDeg(Math_Atan2F(-boss->obj.pos.x, -300.0f - boss->obj.pos.z)) - boss->rot_078.y;
if (yAngle < 0.0f) {
yAngle += 360.0f;
}
@ -359,22 +359,22 @@ void SectorY_80198CE4(Boss* boss) {
SectorY_8019BC14(boss);
}
Math_SmoothStepToAngle(&boss->unk_078.z, boss->fwork[27], 0.1f, 0.5f, 0.1f);
Math_SmoothStepToAngle(&boss->unk_078.x, 0.0f, 0.1f, 4.0f, 0.1f);
Math_SmoothStepToAngle(&boss->rot_078.z, boss->fwork[27], 0.1f, 0.5f, 0.1f);
Math_SmoothStepToAngle(&boss->rot_078.x, 0.0f, 0.1f, 4.0f, 0.1f);
yAngle = Math_RadToDeg(Math_Atan2F(-boss->obj.pos.x, -300.0f - boss->obj.pos.z));
if (boss->index != 0) {
Math_SmoothStepToAngle(&boss->unk_078.y, yAngle, 0.1f, 1.0f, 0.1f);
Math_SmoothStepToAngle(&boss->rot_078.y, yAngle, 0.1f, 1.0f, 0.1f);
} else {
Math_SmoothStepToAngle(&boss->unk_078.y, yAngle, 0.1f, 2.0f, 0.1f);
Math_SmoothStepToAngle(&boss->rot_078.y, yAngle, 0.1f, 2.0f, 0.1f);
}
if (boss->index == 0) {
boss->vel.x = SIN_DEG(boss->unk_078.y) * (boss->fwork[45] + 20.0f);
boss->vel.z = COS_DEG(boss->unk_078.y) * (boss->fwork[45] + 20.0f);
boss->vel.x = SIN_DEG(boss->rot_078.y) * (boss->fwork[45] + 20.0f);
boss->vel.z = COS_DEG(boss->rot_078.y) * (boss->fwork[45] + 20.0f);
} else {
boss->vel.x = SIN_DEG(boss->unk_078.y) * boss->fwork[45];
boss->vel.z = COS_DEG(boss->unk_078.y) * boss->fwork[45];
boss->vel.x = SIN_DEG(boss->rot_078.y) * boss->fwork[45];
boss->vel.z = COS_DEG(boss->rot_078.y) * boss->fwork[45];
}
if (SectorY_8019B5CC(boss)) {
@ -385,7 +385,7 @@ void SectorY_80198CE4(Boss* boss) {
Math_SmoothStepToF(&boss->vel.y, 0.0f, 0.1f, 0.2f, 0.1f);
yAngle -= boss->unk_078.y;
yAngle -= boss->rot_078.y;
if (yAngle < 0.0f) {
yAngle += 360.0f;
}
@ -685,8 +685,8 @@ void SectorY_80199DAC(Boss* boss) {
boss->fwork[13] = COS_DEG(sp34) * (boss->fwork[45] + 10.0f);
boss->fwork[10] = sp34;
Math_SmoothStepToAngle(&boss->unk_078.z, 0.0f, 0.1f, 4.0f, 0.1f);
Math_SmoothStepToAngle(&boss->unk_078.y, boss->fwork[10], 0.1f, 6.0f, 0.1f);
Math_SmoothStepToAngle(&boss->rot_078.z, 0.0f, 0.1f, 4.0f, 0.1f);
Math_SmoothStepToAngle(&boss->rot_078.y, boss->fwork[10], 0.1f, 6.0f, 0.1f);
Math_SmoothStepToF(&boss->obj.pos.y, boss->fwork[12], 1.0f, 15.0f, 1.0f);
if (((ABS(boss->obj.pos.y) - boss->fwork[12]) <= 1800.0f) && (ABS(boss->obj.pos.x) <= 1800.0f) &&
@ -697,7 +697,7 @@ void SectorY_80199DAC(Boss* boss) {
Math_SmoothStepToF(&boss->obj.pos.x, 0.0f, 0.1f, ABS(boss->fwork[11]), 0.1f);
Math_SmoothStepToF(&boss->obj.pos.z, -300.0f, 0.1f, ABS(boss->fwork[13]), 0.1f);
Math_SmoothStepToAngle(&boss->unk_078.x, 0.0f, 0.1f, 4.0f, 0.1f);
Math_SmoothStepToAngle(&boss->rot_078.x, 0.0f, 0.1f, 4.0f, 0.1f);
boss->fwork[10] = 0.0f;
@ -719,7 +719,7 @@ void SectorY_80199DAC(Boss* boss) {
if (yAngle < 0.0f) {
yAngle += 360.0f;
}
yAngle = boss->unk_078.y - yAngle;
yAngle = boss->rot_078.y - yAngle;
if (yAngle < 0.0f) {
yAngle += 360.0f;
}
@ -727,14 +727,14 @@ void SectorY_80199DAC(Boss* boss) {
zSpeed = ABS(boss->fwork[20] - boss->obj.pos.z);
xSpeed = ABS(boss->fwork[18] - boss->obj.pos.x);
if (boss->unk_078.x != 0.0f) {
if (boss->rot_078.x != 0.0f) {
if ((yAngle > 300.0f) || (yAngle < 60.0f)) {
Math_SmoothStepToAngle(&boss->unk_078.x, 181.0f, 0.1f, 6.0f, 0.1f);
Math_SmoothStepToAngle(&boss->rot_078.x, 181.0f, 0.1f, 6.0f, 0.1f);
} else {
Math_SmoothStepToAngle(&boss->unk_078.x, 0.0f, 0.1f, 6.0f, 0.1f);
Math_SmoothStepToAngle(&boss->rot_078.x, 0.0f, 0.1f, 6.0f, 0.1f);
}
} else if ((boss->swork[22] == 1) && ((yAngle > 300.0f) || (yAngle < 60.0f)) && (Rand_ZeroOne() > 0.2f)) {
Math_SmoothStepToAngle(&boss->unk_078.x, 181.0f, 0.1f, 6.0f, 0.1f);
Math_SmoothStepToAngle(&boss->rot_078.x, 181.0f, 0.1f, 6.0f, 0.1f);
boss->swork[21] = 3;
boss->fwork[34] = 2.8f;
}
@ -761,8 +761,8 @@ void SectorY_8019A434(Boss* boss) {
boss->swork[20] = 7;
boss->swork[21] = 5;
boss->timer_056 = (s32) (RAND_FLOAT(130.0f) + 60.0f);
boss->fwork[11] = SIN_DEG(boss->unk_078.y) * boss->fwork[45];
boss->fwork[13] = COS_DEG(boss->unk_078.y) * boss->fwork[45];
boss->fwork[11] = SIN_DEG(boss->rot_078.y) * boss->fwork[45];
boss->fwork[13] = COS_DEG(boss->rot_078.y) * boss->fwork[45];
boss->fwork[12] = 30.0f;
boss->fwork[10] = 181.0f;
AUDIO_PLAY_SFX(NA_SE_EN_MS_LAND, boss->sfxSource, 4);
@ -774,7 +774,7 @@ void SectorY_8019A520(Boss* boss) {
SectorY_8019BC14(boss);
}
Math_SmoothStepToAngle(&boss->unk_078.y, 0.0f, 0.1f, 2.0f, 0.1f);
Math_SmoothStepToAngle(&boss->rot_078.y, 0.0f, 0.1f, 2.0f, 0.1f);
Math_SmoothStepToF(&boss->vel.x, 0.0f, 0.1f, 0.2f, 0.1f);
Math_SmoothStepToF(&boss->vel.z, 6.0f, 0.1f, 0.2f, 0.1f);
Math_SmoothStepToF(&boss->vel.y, 0.0f, 0.1f, 0.2f, 0.1f);
@ -817,8 +817,8 @@ void SectorY_8019A66C(Boss* boss) {
}
if (boss->timer_056 <= 60) {
boss->fwork[11] = SIN_DEG(boss->unk_078.y) * boss->fwork[45];
boss->fwork[13] = COS_DEG(boss->unk_078.y) * boss->fwork[45];
boss->fwork[11] = SIN_DEG(boss->rot_078.y) * boss->fwork[45];
boss->fwork[13] = COS_DEG(boss->rot_078.y) * boss->fwork[45];
boss->swork[21] = 1;
Math_SmoothStepToF(&boss->fwork[43], 0.0f, 0.1f, 0.1f, 0.1f);
Math_SmoothStepToF(&boss->vel.z, boss->fwork[13], 0.1f, 0.5f, 0.5f);
@ -849,7 +849,7 @@ void SectorY_8019A898(Boss* boss) {
}
yAngle1 = Math_RadToDeg(Math_Atan2F(boss->fwork[18] - boss->obj.pos.x, boss->fwork[20] - boss->obj.pos.z));
yAngle2 = yAngle1 - boss->unk_078.y;
yAngle2 = yAngle1 - boss->rot_078.y;
if (yAngle2 < 0.0f) {
yAngle2 += 360.0f;
}
@ -858,7 +858,7 @@ void SectorY_8019A898(Boss* boss) {
if (((yAngle2 >= 30.0f) && (yAngle2 <= 330.0f)) || ((boss->unk_04C != 0)) && (boss->unk_04C != 27)) {
boss->swork[21] = 5;
Math_SmoothStepToAngle(&boss->unk_078.y, yAngle1, 0.1f, 2.0f, 0.1f);
Math_SmoothStepToAngle(&boss->rot_078.y, yAngle1, 0.1f, 2.0f, 0.1f);
boss->fwork[0] = 1.0f;
if ((boss->unk_04C == 0) || (boss->unk_04C == 27)) {
AUDIO_PLAY_SFX(NA_SE_EN_HEAVY_WALK, boss->sfxSource, 4);
@ -946,12 +946,12 @@ void SectorY_8019AAF0(Boss* boss) {
Matrix_MultVec3f(gCalcMatrix, &vec, &vel);
boss->vel.z = vel.z;
boss->vel.x = vel.x;
Math_SmoothStepToAngle(&boss->unk_078.y, Math_RadToDeg(yAngle), 0.1f, 6.0f, 0.1f);
Math_SmoothStepToAngle(&boss->rot_078.y, Math_RadToDeg(yAngle), 0.1f, 6.0f, 0.1f);
}
if (boss->swork[31] != 11) {
if ((boss->unk_078.z <= 90.0f) || (boss->unk_078.z >= 270.0f)) {
if ((boss->rot_078.z <= 90.0f) || (boss->rot_078.z >= 270.0f)) {
boss->fwork[19] += 70.0f;
} else {
boss->fwork[19] -= 50.0f;
@ -1112,7 +1112,7 @@ bool SectorY_8019B5CC(Boss* boss) {
return false;
}
Math_Vec3fFromAngles(&pos, boss->unk_078.x, boss->unk_078.y, 700.0f);
Math_Vec3fFromAngles(&pos, boss->rot_078.x, boss->rot_078.y, 700.0f);
if ((fabsf(gScenery360[0].obj.pos.x - (boss->obj.pos.x + pos.x)) < 2500.0f) &&
(fabsf(gScenery360[0].obj.pos.z - (boss->obj.pos.z + pos.z)) < 5000.0f) &&
@ -1222,7 +1222,7 @@ void SectorY_8019BC14(Boss* boss) {
if ((fabsf(boss->fwork[3] - boss->fwork[0x14]) > 300.0f) || (fabsf(boss->fwork[1] - boss->fwork[0x12]) > 300.0f)) {
sp3C = Math_RadToDeg(
Math_Atan2F(boss->fwork[0x12] - boss->fwork[1] - boss->unk_078.x, boss->fwork[0x14] - boss->fwork[3]));
Math_Atan2F(boss->fwork[0x12] - boss->fwork[1] - boss->rot_078.x, boss->fwork[0x14] - boss->fwork[3]));
sp40 = ABS(boss->fwork[0x12] - boss->fwork[1]) + ABS(boss->fwork[0x14] - boss->fwork[3]);
sp40 = Math_RadToDeg(-Math_Atan2F(boss->fwork[0x13] - boss->fwork[2], sp40));
sp38 = Math_RadToDeg(Math_Atan2F(boss->fwork[1] - boss->fwork[0x15], boss->fwork[3] - boss->fwork[0x17]));
@ -1493,9 +1493,9 @@ void SectorY_Boss_Update(Boss* boss) {
break;
}
boss->obj.rot.x = boss->unk_078.x;
boss->obj.rot.y = boss->unk_078.y;
boss->obj.rot.z = boss->unk_078.z;
boss->obj.rot.x = boss->rot_078.x;
boss->obj.rot.y = boss->rot_078.y;
boss->obj.rot.z = boss->rot_078.z;
Matrix_RotateZ(gCalcMatrix, -boss->vwork[29].z * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, -boss->vwork[29].x * M_DTOR, MTXF_APPLY);
@ -1633,7 +1633,7 @@ void SectorY_Boss_Update(Boss* boss) {
radarMark->pos.x = boss->obj.pos.x;
radarMark->pos.y = boss->obj.pos.y;
radarMark->pos.z = boss->obj.pos.z;
radarMark->yRot = boss->unk_078.y + 180.0f;
radarMark->yRot = boss->rot_078.y + 180.0f;
} else {
radarMark = &gRadarMarks[boss->index + 4];
radarMark->status = 1;
@ -1641,7 +1641,7 @@ void SectorY_Boss_Update(Boss* boss) {
radarMark->pos.x = boss->obj.pos.x;
radarMark->pos.y = boss->obj.pos.y;
radarMark->pos.z = boss->obj.pos.z;
radarMark->yRot = boss->unk_078.y + 180.0f;
radarMark->yRot = boss->rot_078.y + 180.0f;
}
if (gBossFrameCount == 250) {
@ -2008,7 +2008,7 @@ void SectorY_8019EB80(void) {
actor->obj.pos.x = (D_i6_801A69FC[i].x * 0.5f) + gPlayer[0].pos.x + RAND_FLOAT_CENTERED_SEEDED(2000.0f);
actor->obj.pos.y = D_i6_801A69FC[i].y + gPlayer[0].pos.y + RAND_FLOAT_SEEDED(1000.0f);
actor->obj.pos.z = D_i6_801A69FC[i].z + gPlayer[0].pos.z + RAND_FLOAT_SEEDED(1000.0f);
actor->unk_0F4.z = RAND_FLOAT_CENTERED_SEEDED(200.0f);
actor->rot_0F4.z = RAND_FLOAT_CENTERED_SEEDED(200.0f);
actor->vwork[0].x = (D_i6_801A69FC[i].x * 0.5f) + gPlayer[0].pos.x;
actor->vwork[0].y = D_i6_801A69FC[i].y + gPlayer[0].pos.y;
actor->vwork[0].z = D_i6_801A69FC[i].z + gPlayer[0].pos.z;
@ -2016,11 +2016,11 @@ void SectorY_8019EB80(void) {
Object_SetInfo(&actor->info, actor->obj.id);
if (i >= 3) {
actor->unk_0B6 = 35;
actor->unk_0F4.z = 0.0f;
actor->animFrame = 35;
actor->rot_0F4.z = 0.0f;
}
if (i >= 7) {
actor->unk_0B6 = 36;
actor->animFrame = 36;
actor->scale = 0.125f;
}
actor->iwork[11] = 1;
@ -2063,7 +2063,7 @@ void SectorY_LevelComplete(Player* player) {
gCsCamAtZ = boss->obj.pos.z;
for (i = 10; i < ARRAY_COUNT(gActors); i++) {
if (gActors[i].unk_0B6 == 0) {
if (gActors[i].animFrame == 0) {
Object_Kill(&gActors[i].obj, gActors[i].sfxSource);
}
}
@ -2105,8 +2105,8 @@ void SectorY_LevelComplete(Player* player) {
Math_SmoothStepToF(&player->rot.z, temp_ft1 * 20.0f, 0.1f, 1.0f, 0);
for (i = 1; i < 4; i++) {
temp_ft1 = Math_SmoothStepToAngle(&gActors[i].unk_0F4.y, gActors[i].fwork[1], 0.1f, 3.0f, 0.0f);
Math_SmoothStepToF(&gActors[i].unk_0F4.z, temp_ft1 * 20.0f, 0.1f, 1.0f, 0);
temp_ft1 = Math_SmoothStepToAngle(&gActors[i].rot_0F4.y, gActors[i].fwork[1], 0.1f, 3.0f, 0.0f);
Math_SmoothStepToF(&gActors[i].rot_0F4.z, temp_ft1 * 20.0f, 0.1f, 1.0f, 0);
}
if (gCsFrameCount >= 180) {
@ -2137,7 +2137,7 @@ void SectorY_LevelComplete(Player* player) {
player->csState++;
Audio_StartPlayerNoise(0);
AUDIO_PLAY_BGM(NA_BGM_COURSE_CLEAR);
D_ctx_80177A98 = 0;
gDrawGround = false;
for (i = 0; i < 200; i++) {
gScenery360[i].obj.status = OBJ_FREE;
@ -2376,8 +2376,8 @@ void SectorY_8019FF00(Actor* actor) {
Math_SmoothStepToF(&actor->obj.pos.x, actor->vwork[0].x, 0.02f, 2.0f, 0.0001f);
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) && ((((s32) (actor->index % 8U) * 10) + 1030) < gCsFrameCount)) {
Math_SmoothStepToF(&actor->rot_0F4.z, 0.0f, 0.02f, 0.2f, 0.0001f);
if ((actor->animFrame != 0) && ((((s32) (actor->index % 8U) * 10) + 1030) < gCsFrameCount)) {
actor->state = 4;
}
break;
@ -2390,23 +2390,23 @@ void SectorY_8019FF00(Actor* actor) {
case 3:
actor->iwork[11] = 2;
actor->fwork[0] += 2.0f;
actor->unk_0F4.x += 0.1f;
actor->rot_0F4.x += 0.1f;
break;
case 5:
Math_SmoothStepToF(&actor->unk_0F4.x, 0.0f, 0.1f, 5.0f, 0.0f);
Math_SmoothStepToF(&actor->rot_0F4.x, 0.0f, 0.1f, 5.0f, 0.0f);
temp1 = actor->obj.pos.x - gBosses[actor->timer_04C].obj.pos.x;
temp2 = actor->obj.pos.z - gBosses[actor->timer_04C].obj.pos.z;
Math_SmoothStepToAngle(&actor->unk_0F4.z,
Math_SmoothStepToAngle(&actor->unk_0F4.y, Math_RadToDeg(Math_Atan2F(temp1, temp2)),
Math_SmoothStepToAngle(&actor->rot_0F4.z,
Math_SmoothStepToAngle(&actor->rot_0F4.y, Math_RadToDeg(Math_Atan2F(temp1, temp2)),
0.5f, 2.0f, 0.0001f) *
30.0f,
0.1f, 5.0f, 0.0001f);
break;
case 7:
actor->unk_0F4.y = gPlayer[0].rot.y;
actor->unk_0F4.z = gPlayer[0].rot.z;
actor->rot_0F4.y = gPlayer[0].rot.y;
actor->rot_0F4.z = gPlayer[0].rot.z;
Math_SmoothStepToF(&actor->obj.pos.y, 50.0f, 0.1f, 1.0f, 0.0f);
if (gPlayer[0].rot.y == 0.0f) {
Math_SmoothStepToF(&actor->obj.pos.x, 1300.0f, 1.0f, 2.0f, 0.0f);
@ -2427,10 +2427,10 @@ void SectorY_8019FF00(Actor* actor) {
AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0);
}
Math_SmoothStepToF(&actor->obj.pos.x, -1000.0f, 1.0f, 20.0f, 0.0f);
Math_SmoothStepToAngle(&actor->unk_0F4.z, 45.0f, 1.0f, 4.0f, 0.0f);
Math_SmoothStepToAngle(&actor->rot_0F4.z, 45.0f, 1.0f, 4.0f, 0.0f);
} else {
actor->unk_0F4.y = gPlayer[0].rot.y;
actor->unk_0F4.z = gPlayer[0].rot.z;
actor->rot_0F4.y = gPlayer[0].rot.y;
actor->rot_0F4.z = gPlayer[0].rot.z;
Math_SmoothStepToF(&actor->obj.pos.x, -230.0f, 1.0f, 13.0f, 0.0f);
}
break;
@ -2443,18 +2443,18 @@ void SectorY_8019FF00(Actor* actor) {
AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0);
}
Math_SmoothStepToF(&actor->obj.pos.x, 1500.0f, 1.0f, 20.0f, 0.0f);
Math_SmoothStepToAngle(&actor->unk_0F4.z, 315.0f, 1.0f, 2.0f, 0.0f);
Math_SmoothStepToAngle(&actor->rot_0F4.z, 315.0f, 1.0f, 2.0f, 0.0f);
} else {
actor->unk_0F4.y = gPlayer[0].rot.y;
actor->unk_0F4.z = gPlayer[0].rot.z;
actor->rot_0F4.y = gPlayer[0].rot.y;
actor->rot_0F4.z = gPlayer[0].rot.z;
Math_SmoothStepToF(&actor->obj.pos.x, 150.0f, 1.0f, 13.0f, 0.0f);
}
break;
}
if (actor->state != 6) {
Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + 180.0f) * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, -(actor->unk_0F4.x * M_DTOR), MTXF_APPLY);
Matrix_RotateY(gCalcMatrix, (actor->rot_0F4.y + 180.0f) * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, -(actor->rot_0F4.x * M_DTOR), MTXF_APPLY);
sp4C.x = 0.0f;
sp4C.y = 0.0f;
sp4C.z = actor->fwork[0];
@ -2462,9 +2462,9 @@ void SectorY_8019FF00(Actor* actor) {
actor->vel.x = sp40.x;
actor->vel.y = sp40.y;
actor->vel.z = sp40.z;
actor->obj.rot.x = -actor->unk_0F4.x;
actor->obj.rot.y = actor->unk_0F4.y + 180.0f;
actor->obj.rot.z = -actor->unk_0F4.z;
actor->obj.rot.x = -actor->rot_0F4.x;
actor->obj.rot.y = actor->rot_0F4.y + 180.0f;
actor->obj.rot.z = -actor->rot_0F4.z;
}
}
@ -2488,13 +2488,13 @@ void SectorY_801A0510(Actor* actor, s32 arg1) {
case 1:
case 2:
case 8:
actor->unk_0B6 = 38;
actor->animFrame = 38;
actor->obj.rot.y = 90.0f;
Object_SetInfo(&actor->info, actor->obj.id);
break;
case 3:
actor->unk_0B6 = 36;
actor->animFrame = 36;
actor->vel.z = -5.0f;
actor->scale = 1.0f;
actor->obj.rot.y = 180.0f;
@ -2502,27 +2502,27 @@ void SectorY_801A0510(Actor* actor, s32 arg1) {
break;
case 4:
actor->unk_0B6 = 37;
actor->animFrame = 37;
actor->obj.rot.y = 90.0f;
Object_SetInfo(&actor->info, actor->obj.id);
break;
case 5:
case 9:
actor->unk_0B6 = 39;
actor->animFrame = 39;
actor->obj.rot.y = 180.0f;
Object_SetInfo(&actor->info, actor->obj.id);
break;
case 6:
actor->unk_0B6 = 36;
actor->animFrame = 36;
actor->obj.rot.y = 180.0f;
actor->scale = 1.0f;
Object_SetInfo(&actor->info, actor->obj.id);
break;
case 7:
actor->unk_0B6 = 40;
actor->animFrame = 40;
Object_SetInfo(&actor->info, actor->obj.id);
break;
@ -2546,8 +2546,8 @@ void SectorY_801A06A4(Actor* actor, s32 arg1) {
actor->obj.pos.y = gPlayer[0].pos.y + D_i6_801A6AEC[arg1].y;
actor->obj.pos.z = gPlayer[0].pos.z + D_i6_801A6AEC[arg1].z;
actor->fwork[0] = gPlayer[0].baseSpeed;
actor->unk_0F4.y = gPlayer[0].rot.y;
actor->unk_0F4.z = gPlayer[0].rot.z;
actor->rot_0F4.y = gPlayer[0].rot.y;
actor->rot_0F4.z = gPlayer[0].rot.z;
actor->state = arg1 + 7;
actor->iwork[11] = 1;
Object_SetInfo(&actor->info, actor->obj.id);
@ -2587,7 +2587,7 @@ void SectorY_801A07FC(Actor* actor0, Actor* actor1) {
actor1->vel.z = sp30.z;
actor1->obj.rot.x = actor0->obj.rot.x;
actor1->obj.rot.y = actor0->obj.rot.y;
actor1->unk_0B6 = 42;
actor1->animFrame = 42;
AUDIO_PLAY_SFX(NA_SE_EN_MS_SHOT_S, actor1->sfxSource, 4);
}
@ -2602,7 +2602,7 @@ void SectorY_801A0A08(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 arg4) {
Object_SetInfo(&actor->info, actor->obj.id);
actor->timer_0BC = 35;
actor->iwork[0] = 255;
actor->unk_0B6 = 43;
actor->animFrame = 43;
AUDIO_PLAY_SFX(NA_SE_EN_MS_SHOT_S, actor->sfxSource, 4);
}
@ -2753,7 +2753,7 @@ void SectorY_801A0AC0(Player* player) {
gActors[8].obj.pos.y - 500.0f + RAND_FLOAT_CENTERED(1000.0f),
gActors[8].obj.pos.z + RAND_FLOAT_CENTERED(3000.0f), 8);
}
if (gGameFrameCount & 20) {
if ((gGameFrameCount & 20) != 0) {
for (i = 12; i < ARRAY_COUNT(gActors); i++) {
if (gActors[i].obj.status == OBJ_FREE) {
SectorY_801A0A08(
@ -3437,7 +3437,7 @@ void SectorY_Actor204_Update(Actor204* this) {
s32 sp4C = 30;
s32 pad;
this->iwork[14] = this->unk_0B4 - 48;
this->iwork[14] = this->eventType - 48;
this->info.drawType = 2;
if (this->iwork[18] != 0) {
@ -3460,12 +3460,12 @@ void SectorY_Actor204_Update(Actor204* this) {
case 3:
this->unk_046 = 2;
this->unk_0B6 = 0;
this->animFrame = 0;
break;
case 4:
this->unk_046 = 0;
this->unk_0B6 = 0;
this->animFrame = 0;
break;
case 8:
@ -3494,17 +3494,17 @@ void SectorY_Actor204_Update(Actor204* this) {
case 6:
this->unk_046 = 4;
this->unk_0B6 = 0;
this->animFrame = 0;
break;
case 5:
this->unk_046 = 5;
this->unk_0B6 = Animation_GetFrameCount(&D_SY_602B778) - 1;
this->animFrame = Animation_GetFrameCount(&D_SY_602B778) - 1;
break;
case 7:
this->unk_046 = 6;
this->unk_0B6 = Animation_GetFrameCount(&D_SY_602B778) - 1;
this->animFrame = Animation_GetFrameCount(&D_SY_602B778) - 1;
break;
}
this->unk_048 = 0;
@ -3516,15 +3516,15 @@ void SectorY_Actor204_Update(Actor204* this) {
i = this->iwork[17];
if (i != 0) {
if (i == 1) {
this->unk_0B6 = Animation_GetFrameCount(&D_SY_60265B4) - 1;
sp4C = Animation_GetFrameData(&D_SY_60265B4, this->unk_0B6, sp68);
this->animFrame = Animation_GetFrameCount(&D_SY_60265B4) - 1;
sp4C = Animation_GetFrameData(&D_SY_60265B4, this->animFrame, sp68);
} else if (i == 2) {
this->unk_0B6 = Animation_GetFrameCount(&D_SY_602B8DC) - 1;
sp4C = Animation_GetFrameData(&D_SY_602B8DC, this->unk_0B6, sp68);
this->animFrame = Animation_GetFrameCount(&D_SY_602B8DC) - 1;
sp4C = Animation_GetFrameData(&D_SY_602B8DC, this->animFrame, sp68);
}
} else {
this->unk_0B6 = Animation_GetFrameCount(&D_SY_602CEB4);
sp4C = Animation_GetFrameData(&D_SY_602CEB4, this->unk_0B6, sp68);
this->animFrame = Animation_GetFrameCount(&D_SY_602CEB4);
sp4C = Animation_GetFrameData(&D_SY_602CEB4, this->animFrame, sp68);
}
break;
@ -3532,15 +3532,15 @@ void SectorY_Actor204_Update(Actor204* this) {
i = this->iwork[17];
if (i != 0) {
if (i == 1) {
this->unk_0B6 = Animation_GetFrameCount(&D_SY_60265B4) - 1;
sp4C = Animation_GetFrameData(&D_SY_60265B4, this->unk_0B6, sp68);
this->animFrame = Animation_GetFrameCount(&D_SY_60265B4) - 1;
sp4C = Animation_GetFrameData(&D_SY_60265B4, this->animFrame, sp68);
} else if (i == 2) {
this->unk_0B6 = Animation_GetFrameCount(&D_SY_602B8DC) - 1;
sp4C = Animation_GetFrameData(&D_SY_602B8DC, this->unk_0B6, sp68);
this->animFrame = Animation_GetFrameCount(&D_SY_602B8DC) - 1;
sp4C = Animation_GetFrameData(&D_SY_602B8DC, this->animFrame, sp68);
}
} else {
this->unk_0B6 = Animation_GetFrameCount(&D_SY_602A2CC) - 1;
sp4C = Animation_GetFrameData(&D_SY_602A2CC, this->unk_0B6, sp68);
this->animFrame = Animation_GetFrameCount(&D_SY_602A2CC) - 1;
sp4C = Animation_GetFrameData(&D_SY_602A2CC, this->animFrame, sp68);
}
if (this->timer_0BE == 15) {
@ -3564,33 +3564,33 @@ void SectorY_Actor204_Update(Actor204* this) {
}
if (this->timer_0BE == 0) {
this->unk_0B6 = 0;
this->animFrame = 0;
this->unk_046 = 0;
this->fwork[15] = 0.0f;
}
break;
case 2:
if (this->unk_0B6 < (Animation_GetFrameCount(&D_SY_6029B48) - 1)) {
this->unk_0B6++;
if (this->animFrame < (Animation_GetFrameCount(&D_SY_6029B48) - 1)) {
this->animFrame++;
}
sp4C = Animation_GetFrameData(&D_SY_6029B48, this->unk_0B6, sp68);
sp4C = Animation_GetFrameData(&D_SY_6029B48, this->animFrame, sp68);
break;
case 4:
this->unk_0B6++;
if (this->unk_0B6 >= (Animation_GetFrameCount(&D_SY_602B778) - 1)) {
this->animFrame++;
if (this->animFrame >= (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, this->unk_0B6, sp68);
sp4C = Animation_GetFrameData(&D_SY_602B778, this->animFrame, sp68);
break;
case 5:
case 6:
this->unk_0B6 -= 1;
if (this->unk_0B6 < 8) {
this->animFrame--;
if (this->animFrame < 8) {
this->fwork[15] = 0.1f;
if (this->unk_046 == 5) {
this->iwork[17] = 1;
@ -3599,16 +3599,16 @@ void SectorY_Actor204_Update(Actor204* this) {
}
this->unk_046 = 0;
}
sp4C = Animation_GetFrameData(&D_SY_602B778, this->unk_0B6, sp68);
sp4C = Animation_GetFrameData(&D_SY_602B778, this->animFrame, sp68);
break;
case 3:
this->unk_0B6++;
if (this->unk_0B6 >= Animation_GetFrameCount(&D_SY_6003348)) {
this->unk_0B6 = Animation_GetFrameCount(&D_SY_6003348) - 1;
this->animFrame++;
if (this->animFrame >= Animation_GetFrameCount(&D_SY_6003348)) {
this->animFrame = Animation_GetFrameCount(&D_SY_6003348) - 1;
}
sp4C = Animation_GetFrameData(&D_SY_6003348, this->unk_0B6, sp68);
sp4C = Animation_GetFrameData(&D_SY_6003348, this->animFrame, sp68);
if ((this->timer_0BE % 4U) == 0) {
func_effect_8007D2C8(RAND_FLOAT_CENTERED(150.0f) + this->obj.pos.x,
@ -3737,7 +3737,7 @@ void SectorY_Actor204_Update(Actor204* this) {
if (this->health <= 0) {
this->unk_046 = 3;
this->unk_048 = 0;
this->unk_0B6 = 0;
this->animFrame = 0;
this->timer_0BE = 50;
this->fwork[15] = 0.0f;
}
@ -3775,7 +3775,7 @@ bool SectorY_801A4A18(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void*
if (limbIndex == 17) {
rot->x += actor->fwork[28];
rot->y -= actor->fwork[29];
if (actor->unk_0B4 == 48) {
if (actor->eventType == 48) {
*dList = D_SY_6014BD0;
}
}
@ -3841,25 +3841,25 @@ void SectorY_801A4E44(Scenery* scenery) {
sp3C.z = 90.0f - RAND_FLOAT(50.0f);
Matrix_MultVec3f(gCalcMatrix, &sp3C, &sp30);
func_effect_8007C120(scenery->obj.pos.x + sp30.x, scenery->obj.pos.y + sp30.y, scenery->obj.pos.z + sp30.z,
scenery->unk_58, scenery->unk_5C, scenery->unk_60, 0.2f, 5);
scenery->effectVel.x, scenery->effectVel.y, scenery->effectVel.z, 0.2f, 5);
sp3C.x = RAND_FLOAT_CENTERED(100.0f) + -500.0f;
sp3C.y = RAND_FLOAT_CENTERED(900.0f);
sp3C.z = 80.0f - RAND_FLOAT(50.0f);
Matrix_MultVec3f(gCalcMatrix, &sp3C, &sp30);
func_effect_8007C120(scenery->obj.pos.x + sp30.x, scenery->obj.pos.y + sp30.y, scenery->obj.pos.z + sp30.z,
scenery->unk_58, scenery->unk_5C, scenery->unk_60, 0.2f, 5);
scenery->effectVel.x, scenery->effectVel.y, scenery->effectVel.z, 0.2f, 5);
sp3C.x = RAND_FLOAT_CENTERED(100.0f) + 500.0f;
sp3C.y = RAND_FLOAT_CENTERED(900.0f) + -50.0f;
sp3C.z = 1900.0f - RAND_FLOAT(50.0f);
Matrix_MultVec3f(gCalcMatrix, &sp3C, &sp30);
func_effect_8007C120(scenery->obj.pos.x + sp30.x, scenery->obj.pos.y + sp30.y, scenery->obj.pos.z + sp30.z,
scenery->unk_58, scenery->unk_5C, scenery->unk_60, 0.2f, 5);
scenery->effectVel.x, scenery->effectVel.y, scenery->effectVel.z, 0.2f, 5);
sp3C.x = RAND_FLOAT_CENTERED(100.0f) + -1000.0f;
sp3C.y = RAND_FLOAT_CENTERED(900.0f) + -250.0f;
sp3C.z = 1100.0f - RAND_FLOAT(50.0f);
Matrix_MultVec3f(gCalcMatrix, &sp3C, &sp30);
func_effect_8007C120(scenery->obj.pos.x + sp30.x, scenery->obj.pos.y + sp30.y, scenery->obj.pos.z + sp30.z,
scenery->unk_58, scenery->unk_5C, scenery->unk_60, 0.2f, 5);
scenery->effectVel.x, scenery->effectVel.y, scenery->effectVel.z, 0.2f, 5);
}
}
@ -3881,12 +3881,12 @@ void SectorY_801A52B8(Scenery* scenery) {
sp44.z = RAND_FLOAT_CENTERED(5000.0f) + 500.0f;
Matrix_MultVec3f(gCalcMatrix, &sp44, &sp38);
func_effect_8007C120(scenery->obj.pos.x + sp38.x, scenery->obj.pos.y + sp38.y, scenery->obj.pos.z + sp38.z,
scenery->unk_58, scenery->unk_5C, scenery->unk_60, 0.3f, 5);
scenery->effectVel.x, scenery->effectVel.y, scenery->effectVel.z, 0.3f, 5);
sp44.x = RAND_FLOAT_CENTERED(100.0f) + -600.0f;
sp44.y = RAND_FLOAT_CENTERED(250.0f) + 300.0f;
sp44.z = RAND_FLOAT_CENTERED(1500.0f) + -1650.0f;
Matrix_MultVec3f(gCalcMatrix, &sp44, &sp38);
func_effect_8007C120(scenery->obj.pos.x + sp38.x, scenery->obj.pos.y + sp38.y, scenery->obj.pos.z + sp38.z,
scenery->unk_58, scenery->unk_5C, scenery->unk_60, 0.2f, 5);
scenery->effectVel.x, scenery->effectVel.y, scenery->effectVel.z, 0.2f, 5);
}
}

View File

@ -108,10 +108,10 @@ void Turret_Shoot(Player* player) {
gTexturedLines[i].timer = 2;
gTexturedLines[i].red = 255;
gTexturedLines[i].green = 255;
gTexturedLines[i].blue = 255;
gTexturedLines[i].alpha = 255;
gTexturedLines[i].prim.r = 255;
gTexturedLines[i].prim.g = 255;
gTexturedLines[i].prim.b = 255;
gTexturedLines[i].prim.a = 255;
gTexturedLines[i].posBB.x = gActors[i].obj.pos.x;
gTexturedLines[i].posBB.y = gActors[i].obj.pos.y;

View File

@ -69,7 +69,7 @@ void Venom2_UpdateEvents(Actor* this) {
team->obj.pos.y = D_i6_801A68B0[i - 1].y + 750.f;
team->obj.pos.z = D_i6_801A68B0[i - 1].z;
team->obj.rot.z = D_i6_801A68F8[i - 1];
team->unk_0F4.x = 340.0f;
team->rot_0F4.x = 340.0f;
}
gFillScreenAlpha = gFillScreenAlphaTarget = 255;

View File

@ -1207,7 +1207,7 @@ void Map_8019E800(void) {
Play_GenerateStarfield();
gStarCount = 0;
gNextGameState = GSTATE_MAP;
D_game_80161A34 = 5;
gLastGameState = GSTATE_GAME_OVER;
D_ctx_80177868 = 2;
gDrawMode = DRAW_NONE;
}
@ -1377,7 +1377,7 @@ void Map_8019E99C(void) {
Map_801A6694();
switch (D_game_80161A34) {
switch (gLastGameState) {
default:
case 0:
Map_8019F600();
@ -1828,7 +1828,7 @@ void Map_8019FF48(void) {
switch (D_menu_801CD944) {
case 0:
Map_801A0954();
D_ctx_8017842C += 0.09f;
gStarfieldScrollX += 0.09f;
break;
case 1:
@ -1899,7 +1899,7 @@ void Map_Draw(void) {
Map_801AC9A0(i);
if (sPaths[i].unk_14) {
if (sPaths[i].unk_14 != 0) {
Map_801AC200(i);
}
@ -2017,8 +2017,8 @@ void Map_801A0788(void) {
gStarfieldX = SCREEN_WIDTH;
gStarfieldY = SCREEN_HEIGHT;
D_ctx_8017842C = 0.0f;
D_ctx_80178430 = 0.0f;
gStarfieldScrollX = 0.0f;
gStarfieldScrollY = 0.0f;
}
void Map_801A07E8(u8* arg0, u8* arg1, f32* arg2) {
@ -2078,38 +2078,39 @@ void Map_801A0954(void) {
break;
case 1:
if (D_menu_801CD9C0 != 0) {
break;
}
if ((D_menu_801CD9C0 == 0) && (gFillScreenAlpha == 0)) {
// break;
// }
if (gFillScreenAlpha != 0) {
break;
}
// if (gFillScreenAlpha != 0) {
// break;
// }
if ((s32) D_menu_801CD9E0 == 205) {
Audio_PlayVoiceWithoutBGM(1000);
}
if (D_menu_801CD9E0 > -355.0f) {
D_menu_801CD9E0 -= D_menu_801CD9EC;
}
if ((D_menu_801CD9E0 < 200.0f) && (D_menu_801CD9E8 != 255)) {
D_menu_801CD9E8 += 8;
if (D_menu_801CD9E8 > 255) {
D_menu_801CD9E8 = 255;
if ((s32) D_menu_801CD9E0 == 205) {
Audio_PlayVoiceWithoutBGM(1000);
}
}
if (D_menu_801CD9E0 < D_menu_801B6934[D_menu_801CD9F0]) {
D_menu_801CD9E4 += 8;
if (D_menu_801CD9E4 > 255) {
D_menu_801CD9E4 = 255;
if (D_menu_801CD9E0 > -355.0f) {
D_menu_801CD9E0 -= D_menu_801CD9EC;
}
}
if (D_menu_801CD9E0 <= -355.0f) {
D_menu_801CD948++;
if ((D_menu_801CD9E0 < 200.0f) && (D_menu_801CD9E8 != 255)) {
D_menu_801CD9E8 += 8;
if (D_menu_801CD9E8 > 255) {
D_menu_801CD9E8 = 255;
}
}
if (D_menu_801CD9E0 < D_menu_801B6934[D_menu_801CD9F0]) {
D_menu_801CD9E4 += 8;
if (D_menu_801CD9E4 > 255) {
D_menu_801CD9E4 = 255;
}
}
if (D_menu_801CD9E0 <= -355.0f) {
D_menu_801CD948++;
}
}
break;
@ -2123,11 +2124,10 @@ void Map_801A0954(void) {
break;
case 3:
if (D_menu_801CD9C0 != 0) {
break;
if (D_menu_801CD9C0 == 0) {
D_menu_801CD948 = 0;
D_menu_801CD944 = 1;
}
D_menu_801CD948 = 0;
D_menu_801CD944 = 1;
break;
}
@ -2572,7 +2572,7 @@ bool Map_801A2304(void) {
if (D_menu_801CEA78 > 5.5f) {
D_menu_801CEA78 = 5.5f;
D_menu_801CEA80 = 4.6f;
D_menu_801CD94C += 1;
D_menu_801CD94C++;
D_menu_801CD9B8 = 13;
}
break;
@ -3098,7 +3098,7 @@ void Map_801A36A8(void) {
case 20:
if (D_menu_801CD9C0 != 0) {
break;
break; // investigate
}
D_menu_801CD94C = 0;
D_menu_801CD9C0 = 0;
@ -3109,10 +3109,10 @@ void Map_801A36A8(void) {
if (D_menu_801CF120) {
D_menu_801CDA1C += 0.03f;
}
if (D_menu_801CD9C0) {
break;
if (D_menu_801CD9C0 == 0) {
Map_801A3A00();
}
Map_801A3A00();
break;
case 2:
@ -3207,17 +3207,16 @@ void Map_801A3A00(void) {
break;
case 11:
if (D_menu_801CD9C0) {
break;
}
if (D_menu_801CD9C0 == 0) {
if (D_menu_801CD9BC) {
for (i = 0; i < 8; i++) {
Math_SmoothStepToF(&D_menu_801CF088[i], 360.0f, 0.3f, 100.0f, 1.0f);
Math_SmoothStepToF(&D_menu_801CF0A8[i], 360.0f, 0.3f, 100.0f, 1.0f);
if (D_menu_801CD9BC) {
for (i = 0; i < 8; i++) {
Math_SmoothStepToF(&D_menu_801CF088[i], 360.0f, 0.3f, 100.0f, 1.0f);
Math_SmoothStepToF(&D_menu_801CF0A8[i], 360.0f, 0.3f, 100.0f, 1.0f);
}
} else {
D_menu_801CD94C = 10;
}
} else {
D_menu_801CD94C = 10;
}
break;
@ -3241,7 +3240,7 @@ void Map_801A3A00(void) {
break;
case 2:
if (D_menu_801CF0D8[0]) {
if (D_menu_801CF0D8[0] != 0) {
D_menu_801CF0D8[0]--;
} else {
D_menu_801CEFCC++;
@ -3587,10 +3586,7 @@ void Map_801A4D7C(void) {
Audio_PlayMapMenuSfx(0);
D_menu_801CEFC4 = 0;
D_menu_801CD944 = 3;
return;
}
if (gControllerPress[gMainController].button & A_BUTTON) {
} else if (gControllerPress[gMainController].button & A_BUTTON) {
Audio_PlayMapMenuSfx(0);
AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4);
D_menu_801CF000[D_menu_801CEFDC] = 10;
@ -3619,7 +3615,7 @@ void Map_801A4FC4(void) {
gPlayerNum = 0;
for (i = 0; i < 6; i++) {
for (i = 0; i < TEAM_ID_MAX; i++) {
gSavedTeamShields[i] = D_ctx_80177C58[i];
gTeamShields[i] = D_ctx_80177C58[i];
gPrevPlanetTeamShields[i] = D_ctx_80177C58[i];
@ -3826,7 +3822,7 @@ void Map_801A5834(void) {
var_t0 = 0;
}
if (gLifeCount[gPlayerNum]) {
if (gLifeCount[gPlayerNum] != 0) {
texture = D_MAP_6001080;
} else {
texture = D_MAP_6000000;
@ -3844,7 +3840,7 @@ void Map_801A5834(void) {
D_menu_801CF000[colorIndex]--;
}
if (gGameFrameCount & mask) {
if (gGameFrameCount & mask) { // can't be != 0?
RCP_SetupDL(&gMasterDisp, 0x53);
gDPSetPrimColor(gMasterDisp++, 0, 0, r[colorIndex], g[colorIndex], b[colorIndex], 255);
TextureRect_8bIA(&gMasterDisp, D_MAP_6000840, 96, 22, x + 11.0f, y + 3.0f, 1.0f, 1.0f);
@ -3859,7 +3855,7 @@ void Map_801A5834(void) {
D_menu_801CF000[colorIndex]--;
}
if (gGameFrameCount & mask) {
if (gGameFrameCount & mask) { // can't be != 0?
gDPSetPrimColor(gMasterDisp++, 0, 0, r[colorIndex], g[colorIndex], b[colorIndex], 255);
TextureRect_8bIA(&gMasterDisp, D_MAP_60018C0, 96, 10, x + 10.0f, y + z + 8.0f, 1.0f, 1.0f);
}
@ -3873,7 +3869,7 @@ void Map_801A5834(void) {
D_menu_801CF000[colorIndex]--;
}
if (gGameFrameCount & mask) {
if ((gGameFrameCount & mask) != 0) {
gDPSetPrimColor(gMasterDisp++, 0, 0, r[colorIndex], g[colorIndex], b[colorIndex], 255);
TextureRect_8bIA(&gMasterDisp, texture, 96, 22, x + 9.0f, y + z + 5.0f, 1.0f, 1.0f);
}
@ -4388,7 +4384,7 @@ void Map_801A6A98(PlanetId planetId) {
Map_801A7D3C(planetId);
Matrix_Push(&gGfxMatrix);
if (gGameFrameCount & mask) {
if ((gGameFrameCount & mask) != 0) {
if (planetId == PLANET_TITANIA) {
Map_801A791C(planetId);
}
@ -5190,7 +5186,7 @@ void Map_801A9224(void) {
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, sPlanets[PLANET_METEO].alpha);
}
if (gGameFrameCount & mask) {
if ((gGameFrameCount & mask) != 0) {
for (i = 0; i < 42; i++) {
Matrix_Push(&gGfxMatrix);
@ -5246,7 +5242,7 @@ void Map_801A9448(void) {
dest.y = 0.0f;
dest.z = 0.0f;
if (gGameFrameCount & mask) {
if ((gGameFrameCount & mask) != 0) {
for (i = 0; i < 4; i++) {
Matrix_Push(&gGfxMatrix);
@ -5295,7 +5291,7 @@ void Map_801A9814(void) {
D_menu_801CDA08, D_menu_801CDA20, D_menu_801CDA24, D_menu_801CDA28, MTXF_APPLY);
Matrix_Translate(gGfxMatrix, D_menu_801CEA58, D_menu_801CEA5C, D_menu_801CEA60, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
func_fade_80084688(2, D_menu_801B8284);
Wipe_Draw(WIPE_VERTICAL, D_menu_801B8284);
Matrix_Pop(&gGfxMatrix);
}
}
@ -5436,11 +5432,11 @@ void Map_801A9DE8(void) {
D_menu_801CF00C--;
}
if (gGameFrameCount & mask) {
if ((gGameFrameCount & mask) != 0) {
Map_801AD7EC(254, 16, gLifeCount[gPlayerNum]);
}
if ((D_game_80161A34 == 7) || (D_game_80161A34 == 5)) {
if ((gLastGameState == GSTATE_PLAY) || (gLastGameState == GSTATE_GAME_OVER)) {
if (D_menu_801CD83C < gTotalHits) {
D_menu_801CD83C = gTotalHits;
}
@ -5470,21 +5466,21 @@ void Map_801A9FD4(s32 arg0) {
if (arg0) {
var_s3 = gMissionNumber;
} else {
if ((D_game_80161A34 == 7) || (D_game_80161A34 == 8)) {
if ((gLastGameState == GSTATE_PLAY) || (gLastGameState == GSTATE_ENDING)) {
var_s3 = gMissionNumber;
}
if (D_game_80161A34 == 5) {
if (gLastGameState == GSTATE_GAME_OVER) {
var_s3 = D_menu_801CD9AC;
}
}
Map_801AA1CC(var_s3);
if ((D_game_80161A34 == 7) || (D_game_80161A34 == 8)) {
if ((gLastGameState == GSTATE_PLAY) || (gLastGameState == GSTATE_ENDING)) {
var_s3 = 7;
}
if (D_game_80161A34 == 5) {
if (gLastGameState == GSTATE_GAME_OVER) {
var_s3++;
}
@ -5572,10 +5568,10 @@ void Map_801AA434(s32 arg0, f32 x, f32 y, s32 idx) {
Graphics_DisplaySmallNumber(x + 15.0f - ((func_hud_8008BCBC(gMissionHitCount[arg0]) - 1) * 8), y + 24.0f + 1.0f,
gMissionHitCount[arg0]);
if (D_game_80161A34 == 7) {
if (gLastGameState == GSTATE_PLAY) {
temp = gMissionNumber;
}
if ((D_game_80161A34 == 5) || (D_game_80161A34 == 8)) {
if ((gLastGameState == GSTATE_GAME_OVER) || (gLastGameState == GSTATE_ENDING)) {
temp = gMissionNumber + 1;
}
@ -5603,7 +5599,7 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) {
switch (planetId) {
case PLANET_SOLAR:
if (gGameFrameCount & mask) {
if ((gGameFrameCount & mask) != 0) {
RCP_SetupDL(&gMasterDisp, 0x43);
gDPSetPrimColor(gMasterDisp++, 0, 0, 240, 0, 0, 255);
@ -5630,7 +5626,7 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) {
break;
case PLANET_METEO:
if (gGameFrameCount & mask) {
if ((gGameFrameCount & mask) != 0) {
RCP_SetupDL(&gMasterDisp, 0x3E);
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255);
@ -5657,7 +5653,7 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) {
case PLANET_SECTOR_X:
case PLANET_SECTOR_Y:
case PLANET_SECTOR_Z:
if (gGameFrameCount & mask) {
if ((gGameFrameCount & mask) != 0) {
RCP_SetupDL(&gMasterDisp, 0x3E);
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 144);
@ -5677,7 +5673,7 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) {
break;
case PLANET_BOLSE:
if (gGameFrameCount & mask) {
if ((gGameFrameCount & mask) != 0) {
RCP_SetupDL(&gMasterDisp, 0x17);
Lights_SetOneLight(&gMasterDisp, 0, 0, 100, 50, 50, 40, 100, 100, 100);
@ -5699,7 +5695,7 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) {
break;
case PLANET_AREA_6:
if (gGameFrameCount & mask) {
if ((gGameFrameCount & mask) != 0) {
RCP_SetupDL(&gMasterDisp, 0x17);
Lights_SetOneLight(&gMasterDisp, 0, 0, 100, 50, 50, 40, 100, 100, 100);
@ -5721,7 +5717,7 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) {
break;
default:
if (gGameFrameCount & mask) {
if ((gGameFrameCount & mask) != 0) {
RCP_SetupDL(&gMasterDisp, 0x3E);
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255);
@ -5991,7 +5987,7 @@ void Map_801AB978(s32 arg0) {
case 0:
RCP_SetupDL(&gMasterDisp, 0x53);
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255);
if (gGameFrameCount & 0x10) {
if ((gGameFrameCount & 0x10) != 0) {
Graphics_DisplaySmallText(D_menu_801B6B0C[i], 131 + 28, 1.0f, 1.0f, "OK !");
}
sp90[i] = D_menu_801CEA74;
@ -6142,16 +6138,16 @@ void Map_801AC200(s32 index) {
break;
case 10:
if (D_menu_801CD9BC) {
break;
if (D_menu_801CD9BC != 0) {
break; // investigate
}
D_menu_801CD9BC = 5;
D_menu_801CEEA4 = 20;
break;
case 20:
if (D_menu_801CD9BC) {
break;
if (D_menu_801CD9BC != 0) {
break; // investigate
}
D_menu_801CEEA0++;
@ -6365,7 +6361,7 @@ void Map_801AC9A0(s32 index) {
case 11:
Math_SmoothStepToF(&gTexturedLines[index].zScale, target, 0.1f, 100.0f, 4.0f);
gTexturedLines[index].alpha = 255;
gTexturedLines[index].prim.a = 255;
if (gTexturedLines[index].zScale == target) {
Audio_KillSfxById(NA_SE_MAP_LINE_DRAW);
gPlanetPathStatus[index] = 4;
@ -6388,7 +6384,7 @@ void Map_801AC9A0(s32 index) {
temp = 0.25f;
}
Math_SmoothStepToF(&gTexturedLines[index].zScale, target, temp, 100.0f, 4.0f);
gTexturedLines[index].alpha = 255;
gTexturedLines[index].prim.a = 255;
if (gTexturedLines[index].zScale == target) {
gPlanetPathStatus[index] = 3;
}
@ -6397,44 +6393,44 @@ void Map_801AC9A0(s32 index) {
case 3:
case 4:
gTexturedLines[index].zScale = target;
gTexturedLines[index].alpha = sPaths[index].alpha;
gTexturedLines[index].prim.a = sPaths[index].alpha;
break;
}
if ((gPlanetPathStatus[index] == 1) || (gPlanetPathStatus[index] == 11) || (gPlanetPathStatus[index] == 4)) {
gTexturedLines[index].red = 32;
gTexturedLines[index].green = 32;
gTexturedLines[index].blue = 32;
gTexturedLines[index].prim.r = 32;
gTexturedLines[index].prim.g = 32;
gTexturedLines[index].prim.b = 32;
gTexturedLines[index].xyScale = 4.0f;
} else {
switch (sPaths[index].type) {
case PL_PATH_BLU:
gTexturedLines[index].red = 16;
gTexturedLines[index].green = 64;
gTexturedLines[index].blue = 255;
gTexturedLines[index].prim.r = 16;
gTexturedLines[index].prim.g = 64;
gTexturedLines[index].prim.b = 255;
gTexturedLines[index].xyScale = 8.0f;
break;
case PL_PATH_YLW:
gTexturedLines[index].red = 255;
gTexturedLines[index].green = 175;
gTexturedLines[index].blue = 0;
gTexturedLines[index].prim.r = 255;
gTexturedLines[index].prim.g = 175;
gTexturedLines[index].prim.b = 0;
gTexturedLines[index].xyScale = 8.0f;
break;
case PL_PATH_RED:
gTexturedLines[index].red = 255;
gTexturedLines[index].green = 0;
gTexturedLines[index].blue = 0;
gTexturedLines[index].prim.r = 255;
gTexturedLines[index].prim.g = 0;
gTexturedLines[index].prim.b = 0;
gTexturedLines[index].xyScale = 8.0f;
break;
case PL_WARP_YLW:
case PL_WARP_RED:
gTexturedLines[index].red = 0;
gTexturedLines[index].green = 0;
gTexturedLines[index].blue = 0;
gTexturedLines[index].alpha = 0;
gTexturedLines[index].prim.r = 0;
gTexturedLines[index].prim.g = 0;
gTexturedLines[index].prim.b = 0;
gTexturedLines[index].prim.a = 0;
gTexturedLines[index].xyScale = 0.1f;
break;
}
@ -6562,7 +6558,7 @@ void Map_801AD11C(void) {
var_t0 = 0;
if (gControllerPress[gMainController].button & A_BUTTON) {
if ((D_game_80161A34 == 7) && (sPrevMissionStatus != MISSION_COMPLETE) && (!D_menu_801CEFD0)) {
if ((gLastGameState == GSTATE_PLAY) && (sPrevMissionStatus != MISSION_COMPLETE) && !D_menu_801CEFD0) {
Audio_PlayMapMenuSfx(1);
D_menu_801CEFC4 = 1;
D_menu_801CEFD4 = 0;
@ -6579,7 +6575,7 @@ void Map_801AD11C(void) {
}
if (gControllerPress[gMainController].button & START_BUTTON) {
if (D_menu_801CD944 == 3 && D_game_80161A34 == 7) {
if ((D_menu_801CD944 == 3) && (gLastGameState == GSTATE_PLAY)) {
if (D_menu_801CEFD0) {
AUDIO_PLAY_SFX(NA_SE_ERROR, gDefaultSfxSource, 4);
} else {

View File

@ -416,8 +416,8 @@ void Option_Setup(void) {
gBgColor = 0;
D_menu_801B91A4 = 0;
if ((D_game_80161A34 == 7) && (gCurrentLevel == LEVEL_TRAINING)) {
D_game_80161A34 = 0;
if ((gLastGameState == GSTATE_PLAY) && (gCurrentLevel == LEVEL_TRAINING)) {
gLastGameState = GSTATE_NONE;
D_menu_801B91A4 = 1;
}
@ -434,8 +434,8 @@ void Option_Setup(void) {
D_menu_801B9124 = OPTION_MAIN_MENU;
if ((D_game_80161A34 == 5) || (D_game_80161A34 == 8)) {
if (D_game_80161A34 == 8) {
if ((gLastGameState == GSTATE_GAME_OVER) || (gLastGameState == GSTATE_ENDING)) {
if (gLastGameState == GSTATE_ENDING) {
gMissionPlanet[gMissionNumber] = PLANET_VENOM;
if (gLeveLClearStatus[LEVEL_VENOM_ANDROSS] == 1) {
gSaveFile.save.data.planet[SAVE_SLOT_VENOM_1].played = 1;
@ -468,7 +468,7 @@ void Option_Setup(void) {
D_menu_801B9124 = 300;
}
} else {
if (D_game_800D2870 != 0) {
if (D_game_800D2870) {
D_menu_801B91A4 = 2;
D_menu_801B91A8 = gVsMatchType;
for (i = 0; i < OPTION_COUNT; i++) {
@ -690,7 +690,7 @@ void Option_DrawEntry(void) {
if (D_menu_801B8280 != 0) {
Option_8019BDF0();
func_fade_80084688(2, D_menu_801B8284);
Wipe_Draw(WIPE_VERTICAL, D_menu_801B8284);
Matrix_Pop(&gGfxMatrix);
}
}
@ -819,7 +819,7 @@ void Option_TrainingUpdate(void) {
void Option_801929F0(void) {
s32 i;
D_game_800D2870 = 0;
D_game_800D2870 = false;
gBlurAlpha = 255;
gControllerLock = 0;
gStarCount = 800;
@ -1539,8 +1539,8 @@ void Option_801952B4(void) {
break;
case 1:
if (D_menu_801B9178) {
break;
if (D_menu_801B9178 != 0) {
break; // investigate
}
for (i = 2; i < 4; i++) {
@ -1554,8 +1554,8 @@ void Option_801952B4(void) {
break;
case 2:
if (D_menu_801B9178) {
break;
if (D_menu_801B9178 != 0) {
break; // investigate
}
for (i = 2; i < 4; i++) {
@ -1575,8 +1575,8 @@ void Option_801952B4(void) {
switch (D_menu_801B9158) {
case 0:
if (D_menu_801B917C) {
break;
if (D_menu_801B917C != 0) {
break; // investigate
}
for (i = 0; i < 4; i++) {
@ -1591,8 +1591,8 @@ void Option_801952B4(void) {
break;
case 1:
if (D_menu_801B917C) {
break;
if (D_menu_801B917C != 0) {
break; // investigate
}
for (i = 0; i < 4; i++) {
@ -1607,13 +1607,13 @@ void Option_801952B4(void) {
break;
case 2:
if (D_menu_801B917C) {
if (D_menu_801B917C != 0) {
break;
}
D_menu_801B917C = RAND_INT(30.0f);
D_menu_801B9158 = 0;
break;
break; // investigate
}
} else {
@ -1990,20 +1990,20 @@ void Option_DataDraw(void) {
sp74[0] = sp74[1] = 0xFFFFFFFF;
for (i = 0; i < 2; i++) {
if (D_menu_801B9330[i]) {
if (D_menu_801B9330[i] != 0) {
sp74[i] = 1;
sp7C[i] = 255;
D_menu_801B9330[i]--;
}
}
if (gGameFrameCount & sp74[1]) {
if ((gGameFrameCount & sp74[1]) != 0) {
sp7C[1] = D_menu_801AED20[1];
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, sp7C[1], sp7C[1], 255);
TextureRect_8bIA(&gMasterDisp, D_OPT_8009980, 32, 12, D_menu_801AF094[1], D_menu_801AF0AC[1], 1.0f, 1.0f);
}
if (gGameFrameCount & sp74[0]) {
if ((gGameFrameCount & sp74[0]) != 0) {
sp7C[0] = D_menu_801AED20[0];
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, sp7C[0], sp7C[0], 255);
TextureRect_8bIA(&gMasterDisp, D_OPT_8009B00, 40, 12, D_menu_801AF094[2], D_menu_801AF0AC[2], 1.0f, 1.0f);
@ -2655,7 +2655,7 @@ void Option_VersusMenuInit(void) {
D_menu_801B9340 = 2;
D_game_80161A28 = 0;
gVsMenuSelection = 0;
gStarCount = 0;
D_menu_801B93C4 = 0;
@ -2834,7 +2834,7 @@ void Option_80199820(s32 arg0) {
D_menu_801B9348[arg0]--;
}
if (gGameFrameCount & var_v0) {
if ((gGameFrameCount & var_v0) != 0) {
colorGB = D_menu_801B9358[arg0];
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255);
@ -2902,7 +2902,7 @@ void Option_VersusStageInit(void) {
D_menu_801B933C = 0;
D_menu_801B91E8 = 255.0f;
D_menu_801B93D4 = gVsPointsToWin - 1;
D_menu_801B93D8 = D_game_80161A28;
D_menu_801B93D8 = gVsMenuSelection;
D_menu_801B93DC = D_menu_801B9340;
gVsTimeTrialLimit = D_menu_801B93DC;
// clang-format off
@ -3052,8 +3052,8 @@ void Option_8019A2E0(void) {
void Option_8019A4DC(void) {
s32 i;
if (D_menu_801B937C) {
return;
if (D_menu_801B937C != 0) {
return; // investigate
}
if (D_menu_801B91F0) {
@ -3063,7 +3063,7 @@ void Option_8019A4DC(void) {
}
for (i = 0; i < 4; i++) {
if (gControllerPlugged[i] == 0) {
if (!gControllerPlugged[i]) {
continue;
}
@ -3093,8 +3093,8 @@ void Option_8019A4DC(void) {
void Option_8019A6DC(void) {
s32 i;
if (D_menu_801B9374) {
return;
if (D_menu_801B9374 != 0) {
return; // investigate
}
if (D_menu_801B91F0) {
@ -3110,12 +3110,12 @@ void Option_8019A6DC(void) {
}
if (Option_8019C418(&D_menu_801B93D8, 1, 0, 1, 20, 2, 4, i, &D_menu_801B9380[i])) {
AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4);
D_game_80161A28 = D_menu_801B93D8;
gVsMenuSelection = D_menu_801B93D8;
}
if (gControllerPress[i].button & A_BUTTON) {
AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4);
if (D_game_80161A28 == 0) {
if (gVsMenuSelection == 0) {
gVersusStage = VS_STAGE_CORNERIA;
if (D_menu_801B93D0 == 30) {
gVersusStage = VS_STAGE_KATINA;
@ -3148,8 +3148,8 @@ void Option_8019A6DC(void) {
void Option_8019A954(void) {
s32 i;
if (D_menu_801B91EC) {
return;
if (D_menu_801B91EC != 0) {
return; // investigate
}
if (D_menu_801B91F0) {
@ -3234,7 +3234,7 @@ void Option_8019AB30(void) {
}
}
if (gGameFrameCount & var_v0) {
if ((gGameFrameCount & var_v0) != 0) {
RCP_SetupDL(&gMasterDisp, 0x53);
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255);
@ -3284,12 +3284,12 @@ void Option_8019AD84(void) {
colorGB = 255;
var_v0 = 1;
D_menu_801B937C--;
if (!D_menu_801B937C) {
if (D_menu_801B937C == 0) {
D_menu_801B91F0 = 1;
}
}
if (gGameFrameCount & var_v0) {
if ((gGameFrameCount & var_v0) != 0) {
RCP_SetupDL(&gMasterDisp, 0x53);
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255);
@ -3332,12 +3332,12 @@ void Option_8019AFFC(void) {
var_v0 = 1;
colorGB = 255;
D_menu_801B9374--;
if (!D_menu_801B9374) {
if (D_menu_801B9374 == 0) {
D_menu_801B91F0 = 1;
}
}
if (gGameFrameCount & var_v0) {
if ((gGameFrameCount & var_v0) != 0) {
RCP_SetupDL(&gMasterDisp, 0x53);
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255);
@ -3366,7 +3366,7 @@ void Option_8019B1F8(void) {
static u16* D_menu_801AF2CC[] = { D_VS_MENU_7006EA0, D_VS_MENU_7006630 };
for (xPos = D_menu_801AF2A8, i = 0; i < 2; i++, xPos += D_menu_801AF2B0) {
if (i == D_game_80161A28) {
if (i == gVsMenuSelection) {
sp8C[i] = 255;
} else {
sp8C[i] = 32;
@ -3412,7 +3412,7 @@ void Option_8019B3DC(void) {
};
for (xPos = D_menu_801AF2D4, i = 0; i < 2; i++, xPos += D_menu_801AF2DC) {
if (i == D_game_80161A28) {
if (i == gVsMenuSelection) {
sp8C[i] = 255;
} else {
sp8C[i] = 32;
@ -3444,7 +3444,7 @@ void Option_8019B5AC(void) {
colorGB = D_menu_801B91E8;
var_v0 = 0xFFFFFFFF;
if (D_menu_801B91EC) {
if (D_menu_801B91EC != 0) {
colorGB = 255;
var_v0 = 1;
D_menu_801B91EC--;
@ -3453,7 +3453,7 @@ void Option_8019B5AC(void) {
}
}
if (gGameFrameCount & var_v0) {
if ((gGameFrameCount & var_v0) != 0) {
RCP_SetupDL(&gMasterDisp, 0x53);
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255);
TextureRect_8bIA(&gMasterDisp, D_VS_MENU_7003650, 40, 12, 143.0f, 210.0f, 1.0f, 1.0f);
@ -4082,7 +4082,7 @@ void Option_8019D118(void) {
RCP_SetupDL(&gMasterDisp, 0x4C);
if (D_game_80161A34 == 8) {
if (gLastGameState == GSTATE_ENDING) {
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255);
Graphics_DisplayLargeText(D_menu_801AF30C[0], D_menu_801AF324[0], 1.0f, 1.0f, "CONGRATULATIONS");
}
@ -4096,7 +4096,7 @@ void Option_8019D118(void) {
Graphics_DisplaySmallText(D_menu_801AF30C[2], D_menu_801AF324[2], 1.0f, 1.0f, "TOTAL HITS");
(void) "p:%d x:%f y:%f\n";
if (D_menu_801B9138 == 1) {
if (gGameFrameCount & 0x10) {
if ((gGameFrameCount & 0x10) != 0) {
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255);
TextureRect_8bIA(&gMasterDisp, aTextEnd, 32, 8, D_menu_801AF30C[5], D_menu_801AF324[5], 1.0f, 1.0f);
}
@ -4124,7 +4124,7 @@ void Option_8019D118(void) {
mask[i] = 0xFFFFFFFF;
if (D_menu_801B9140[i]) {
if (D_menu_801B9140[i] != 0) {
mask[i] = 0x1;
D_menu_801B9100[i] = 0.0f;
}
@ -4363,12 +4363,12 @@ void Option_8019DE74(void) {
gDrawMode = DRAW_NONE;
D_menu_801B912C = 0;
if (D_game_80161A34 == 5) {
if (gLastGameState == GSTATE_GAME_OVER) {
gStarCount = 0;
gGameState = GSTATE_INIT;
gLifeCount[0] = 2;
gTotalHits = 0;
} else if (D_game_80161A34 == 8) {
} else if (gLastGameState == GSTATE_ENDING) {
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1);
D_menu_801B9124 = 400;

View File

@ -168,8 +168,8 @@ void Title_Init(void) {
gTitleState = 2;
D_game_80161A34 = 0;
D_game_800D2870 = 0;
gLastGameState = GSTATE_NONE;
D_game_800D2870 = false;
gMainController = Title_80187ABC();
@ -239,11 +239,11 @@ void Title_Main(void) {
void Title_UpdateEntry(void) {
if (D_menu_801B82A8 > 0) {
D_menu_801B82A8 -= 1;
D_menu_801B82A8--;
}
if (D_menu_801B82AC > 0) {
D_menu_801B82AC -= 1;
D_menu_801B82AC--;
}
switch (D_menu_801B82C4) {
@ -338,7 +338,7 @@ void Title_Draw(void) {
gFillScreenRed = 0;
gFillScreenGreen = 0;
gFillScreenBlue = 0;
func_fade_80084688(2, D_menu_801B8284);
Wipe_Draw(WIPE_VERTICAL, D_menu_801B8284);
}
}
@ -369,7 +369,7 @@ void Title_80187B00(void) {
case 1:
if (D_menu_801B82BC != 0) {
Camera_SetStarfieldPos(gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ);
D_ctx_8017842C -= 1.0f;
gStarfieldScrollX -= 1.0f;
if (D_menu_801B82BC == 60) {
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 60);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 60);
@ -793,7 +793,7 @@ void Title_801888E8(void) {
}
if (D_menu_801B82B0 == 0) {
if (gGameFrameCount & 0x80) {
if ((gGameFrameCount & 0x80) != 0) {
if (D_menu_801B8350[1].unk_20 + D_menu_801B8350[1].unk_24 < -20.0f) {
D_menu_801B8350[1].unk_24 = 4.0f;
}
@ -842,10 +842,10 @@ void Title_801888E8(void) {
D_menu_801B86AC, D_menu_801B86B0);
Camera_SetStarfieldPos(gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ);
D_ctx_8017842C -= 0.5f;
gStarfieldScrollX -= 0.5f;
if (D_menu_801B82B0 > 0) {
D_menu_801B82B0 -= 1;
D_menu_801B82B0--;
}
if (D_menu_801B9040 == 1) {
@ -853,7 +853,7 @@ void Title_801888E8(void) {
}
if (D_menu_801B82BC != 0) {
D_menu_801B82BC -= 1;
D_menu_801B82BC--;
return;
}
@ -1195,7 +1195,7 @@ void Title_8018994C(void) {
Camera_SetStarfieldPos(gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ);
}
D_ctx_8017842C -= D_menu_801B7BE8;
gStarfieldScrollX -= D_menu_801B7BE8;
D_menu_801B82B8++;
}
@ -1531,8 +1531,8 @@ void Title_8018ACEC(void) {
Title_80191674(D_menu_801B86C8, D_menu_801B86CC, 100.0f, &D_menu_801B82E0, &D_menu_801B82E4, &D_menu_801B82E8);
Camera_SetStarfieldPos(gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ);
D_ctx_8017842C += 2.0f;
D_ctx_80178430 += 2.0f;
gStarfieldScrollX += 2.0f;
gStarfieldScrollY += 2.0f;
}
void Title_8018B038(void) {

View File

@ -50,79 +50,79 @@ const char* sFloatExceptions[6] = {
"Unimplemented operation", "Invalid operation", "Division by zero", "Overflow", "Underflow", "Inexact operation",
};
void func_800073C0(s32 arg0, s32 arg1, s32 arg2, s32 arg3) {
u16* var_v0;
void Fault_FillRectange(s32 xPos, s32 yPos, s32 width, s32 height) {
u16* pixel;
s32 i;
s32 j;
var_v0 = gFaultMgr.width * arg1 + gFaultMgr.fb->data + arg0;
for (i = 0; i < arg3; i++) {
for (j = 0; j < arg2; j++, var_v0++) {
*var_v0 = ((*var_v0 & 0xE738) >> 2) | 1;
pixel = gFaultMgr.width * yPos + gFaultMgr.fb->data + xPos;
for (i = 0; i < height; i++) {
for (j = 0; j < width; j++, pixel++) {
*pixel = ((*pixel & 0xE738) >> 2) | 1;
}
var_v0 += gFaultMgr.width - arg2;
pixel += gFaultMgr.width - width;
}
}
void func_800074AC(s32 arg0, s32 arg1, s32 arg2) {
s32* var_v0;
u16* var_v1;
void Fault_DisplayChar(s32 xPos, s32 yPos, s32 index) {
s32* charPixelFlags;
u16* pixel;
s32 i;
s32 j;
var_v0 = &sFaultCharPixelFlags[(arg2 / 5) * 7];
var_v1 = gFaultMgr.width * arg1 + gFaultMgr.fb->data + arg0;
charPixelFlags = &sFaultCharPixelFlags[(index / 5) * 7];
pixel = gFaultMgr.width * yPos + gFaultMgr.fb->data + xPos;
for (i = 0; i < 7; i++) {
u32 temp_t1 = 0x80000000 >> ((arg2 % 5) * 6);
u32 temp_a3 = *var_v0++;
u32 bufferPixelFlag = 0x80000000 >> ((index % 5) * 6);
u32 charPixelFlag = *charPixelFlags++;
for (j = 0; j < 6; j++) {
if (temp_t1 & temp_a3) {
*var_v1 = -1;
if (bufferPixelFlag & charPixelFlag) {
*pixel = 0xFFFF;
} else {
*var_v1 = 1;
*pixel = 0x0001;
}
var_v1++;
temp_t1 >>= 1;
pixel++;
bufferPixelFlag >>= 1;
}
var_v1 += gFaultMgr.width - 6;
pixel += gFaultMgr.width - 6;
}
}
char* func_80007604(char* arg0, const char* arg1, size_t arg2) {
return (char*) memcpy(arg0, arg1, arg2) + arg2;
char* Fault_PrOut(char* buffer, const char* fmt, size_t size) {
return (char*) memcpy(buffer, fmt, size) + size;
}
void func_8000762C(s32 arg0, s32 arg1, const char* fmt, ...) {
u8* var_s0;
void Fault_Printf(s32 xPos, s32 yPos, const char* fmt, ...) {
u8* charPtr;
s32 i;
u8 sp40[0x100];
s32 temp_a2;
u8 buffer[0x100];
s32 charIndex;
va_list args;
va_start(args, fmt);
for (i = 0; i < 0x100; i++) {
sp40[i] = 0;
buffer[i] = 0;
}
if (_Printf(func_80007604, sp40, fmt, args) <= 0) {
if (_Printf(Fault_PrOut, buffer, fmt, args) <= 0) {
return;
}
for (var_s0 = sp40; *var_s0 != 0; var_s0++) {
temp_a2 = sFaultCharIndex[*var_s0 & 0x7F];
for (charPtr = buffer; *charPtr != 0; charPtr++) {
charIndex = sFaultCharIndex[*charPtr & 0x7F];
if (temp_a2 != 0xFF) {
func_800074AC(arg0, arg1, temp_a2);
if (charIndex != 0xFF) {
Fault_DisplayChar(xPos, yPos, charIndex);
}
arg0 += 6;
xPos += 6;
label:; // fake, probably
}
va_end(args);
}
void func_8000770C(s32 time) {
u64 time64 = MSEC_TO_CYCLES(time);
void Fault_Wait(s32 msec) {
u64 time64 = MSEC_TO_CYCLES(msec);
osSetTime(0);
while (osGetTime() < time64) {
@ -130,25 +130,25 @@ void func_8000770C(s32 time) {
}
}
void func_800077F8(s32 arg0, s32 arg1, s32 arg2, f32* arg3) {
u32 temp_v0 = *(u32*) arg3;
s32 temp_v1 = ((temp_v0 & 0x7F800000) >> 0x17) - 0x7F;
void Fault_DisplayFloatReg(s32 xPos, s32 yPos, s32 regNum, f32* regValue) {
u32 regAsInt = *(u32*) regValue;
s32 regExp = ((regAsInt & 0x7F800000) >> 0x17) - 0x7F;
if (((-0x7F < temp_v1) && (temp_v1 < 0x80)) || (temp_v0 == 0)) {
func_8000762C(arg0, arg1, "F%02d:%.3e", arg2, *arg3);
if (((-0x7F < regExp) && (regExp < 0x80)) || (regAsInt == 0)) {
Fault_Printf(xPos, yPos, "F%02d:%.3e", regNum, *regValue);
} else {
func_8000762C(arg0, arg1, "F%02d:---------", arg2);
Fault_Printf(xPos, yPos, "F%02d:---------", regNum);
}
}
void func_80007880(u32 arg0) {
s32 var_v0;
u32 var_v1 = 0x20000;
void Fault_DisplayFloatException(u32 exceptFlags) {
s32 i;
u32 flag = 0x20000;
func_8000762C(0x1E, 0xA0, "FPCSR:%08XH", arg0);
for (var_v0 = 0; var_v0 < 6; var_v0++, var_v1 >>= 1) {
if (arg0 & var_v1) {
func_8000762C(0x84, 0xA0, "(%s)", sFloatExceptions[var_v0]);
Fault_Printf(30, 160, "FPCSR:%08XH", exceptFlags);
for (i = 0; i < 6; i++, flag >>= 1) {
if (exceptFlags & flag) {
Fault_Printf(132, 160, "(%s)", sFloatExceptions[i]);
return;
}
}
@ -156,49 +156,49 @@ void func_80007880(u32 arg0) {
#define CAUSE_INDEX(cause) ((cause >> CAUSE_EXCSHIFT) & (CAUSE_EXCMASK >> CAUSE_EXCSHIFT))
void func_80007910(OSThread* thread) {
void Fault_DisplayDebugInfo(OSThread* thread) {
__OSThreadContext* context = &thread->context;
s16 var_s0 = CAUSE_INDEX(context->cause);
s16 causeIndex = CAUSE_INDEX(context->cause);
if (var_s0 == CAUSE_INDEX(EXC_WATCH)) {
var_s0 = 16;
if (causeIndex == CAUSE_INDEX(EXC_WATCH)) {
causeIndex = 16;
}
if (var_s0 == CAUSE_INDEX(EXC_VCED)) {
var_s0 = 17;
if (causeIndex == CAUSE_INDEX(EXC_VCED)) {
causeIndex = 17;
}
func_8000770C(3000);
func_800073C0(15, 15, 290, 210);
func_8000762C(30, 40, "THREAD:%d (%s)", thread->id, sFaultCauses[var_s0]);
func_8000762C(30, 50, "PC:%08XH SR:%08XH\tVA:%08XH", context->pc, context->sr, context->badvaddr);
Fault_Wait(3000);
Fault_FillRectange(15, 15, SCREEN_WIDTH - 30, SCREEN_HEIGHT - 30);
Fault_Printf(30, 40, "THREAD:%d (%s)", thread->id, sFaultCauses[causeIndex]);
Fault_Printf(30, 50, "PC:%08XH SR:%08XH\tVA:%08XH", context->pc, context->sr, context->badvaddr);
osWritebackDCacheAll();
func_8000762C(30, 60, "AT:%08XH V0:%08XH\tV1:%08XH", (s32) context->at, (s32) context->v0, (s32) context->v1);
func_8000762C(30, 70, "A0:%08XH A1:%08XH\tA2:%08XH", (s32) context->a0, (s32) context->a1, (s32) context->a2);
func_8000762C(30, 80, "A3:%08XH T0:%08XH\tT1:%08XH", (s32) context->a3, (s32) context->t0, (s32) context->t1);
func_8000762C(30, 90, "T2:%08XH T3:%08XH\tT4:%08XH", (s32) context->t2, (s32) context->t3, (s32) context->t4);
func_8000762C(30, 100, "T5:%08XH T6:%08XH\tT7:%08XH", (s32) context->t5, (s32) context->t6, (s32) context->t7);
func_8000762C(30, 110, "S0:%08XH S1:%08XH\tS2:%08XH", (s32) context->s0, (s32) context->s1, (s32) context->s2);
func_8000762C(30, 120, "S3:%08XH S4:%08XH\tS5:%08XH", (s32) context->s3, (s32) context->s4, (s32) context->s5);
func_8000762C(30, 130, "S6:%08XH S7:%08XH\tT8:%08XH", (s32) context->s6, (s32) context->s7, (s32) context->t8);
func_8000762C(30, 140, "T9:%08XH GP:%08XH\tSP:%08XH", (s32) context->t9, (s32) context->gp, (s32) context->sp);
func_8000762C(30, 150, "S8:%08XH RA:%08XH", (s32) context->s8, (s32) context->ra);
func_80007880(context->fpcsr);
Fault_Printf(30, 60, "AT:%08XH V0:%08XH\tV1:%08XH", (s32) context->at, (s32) context->v0, (s32) context->v1);
Fault_Printf(30, 70, "A0:%08XH A1:%08XH\tA2:%08XH", (s32) context->a0, (s32) context->a1, (s32) context->a2);
Fault_Printf(30, 80, "A3:%08XH T0:%08XH\tT1:%08XH", (s32) context->a3, (s32) context->t0, (s32) context->t1);
Fault_Printf(30, 90, "T2:%08XH T3:%08XH\tT4:%08XH", (s32) context->t2, (s32) context->t3, (s32) context->t4);
Fault_Printf(30, 100, "T5:%08XH T6:%08XH\tT7:%08XH", (s32) context->t5, (s32) context->t6, (s32) context->t7);
Fault_Printf(30, 110, "S0:%08XH S1:%08XH\tS2:%08XH", (s32) context->s0, (s32) context->s1, (s32) context->s2);
Fault_Printf(30, 120, "S3:%08XH S4:%08XH\tS5:%08XH", (s32) context->s3, (s32) context->s4, (s32) context->s5);
Fault_Printf(30, 130, "S6:%08XH S7:%08XH\tT8:%08XH", (s32) context->s6, (s32) context->s7, (s32) context->t8);
Fault_Printf(30, 140, "T9:%08XH GP:%08XH\tSP:%08XH", (s32) context->t9, (s32) context->gp, (s32) context->sp);
Fault_Printf(30, 150, "S8:%08XH RA:%08XH", (s32) context->s8, (s32) context->ra);
Fault_DisplayFloatException(context->fpcsr);
osWritebackDCacheAll();
func_800077F8(30, 170, 0, &context->fp0.f.f_even);
func_800077F8(120, 170, 2, &context->fp2.f.f_even);
func_800077F8(210, 170, 4, &context->fp4.f.f_even);
func_800077F8(30, 180, 6, &context->fp6.f.f_even);
func_800077F8(120, 180, 8, &context->fp8.f.f_even);
func_800077F8(210, 180, 10, &context->fp10.f.f_even);
func_800077F8(30, 190, 12, &context->fp12.f.f_even);
func_800077F8(120, 190, 14, &context->fp14.f.f_even);
func_800077F8(210, 190, 16, &context->fp16.f.f_even);
func_800077F8(30, 200, 18, &context->fp18.f.f_even);
func_800077F8(120, 200, 20, &context->fp20.f.f_even);
func_800077F8(210, 200, 22, &context->fp22.f.f_even);
func_800077F8(30, 210, 24, &context->fp24.f.f_even);
func_800077F8(120, 210, 26, &context->fp26.f.f_even);
func_800077F8(210, 210, 28, &context->fp28.f.f_even);
func_800077F8(30, 220, 30, &context->fp30.f.f_even);
Fault_DisplayFloatReg(30, 170, 0, &context->fp0.f.f_even);
Fault_DisplayFloatReg(120, 170, 2, &context->fp2.f.f_even);
Fault_DisplayFloatReg(210, 170, 4, &context->fp4.f.f_even);
Fault_DisplayFloatReg(30, 180, 6, &context->fp6.f.f_even);
Fault_DisplayFloatReg(120, 180, 8, &context->fp8.f.f_even);
Fault_DisplayFloatReg(210, 180, 10, &context->fp10.f.f_even);
Fault_DisplayFloatReg(30, 190, 12, &context->fp12.f.f_even);
Fault_DisplayFloatReg(120, 190, 14, &context->fp14.f.f_even);
Fault_DisplayFloatReg(210, 190, 16, &context->fp16.f.f_even);
Fault_DisplayFloatReg(30, 200, 18, &context->fp18.f.f_even);
Fault_DisplayFloatReg(120, 200, 20, &context->fp20.f.f_even);
Fault_DisplayFloatReg(210, 200, 22, &context->fp22.f.f_even);
Fault_DisplayFloatReg(30, 210, 24, &context->fp24.f.f_even);
Fault_DisplayFloatReg(120, 210, 26, &context->fp26.f.f_even);
Fault_DisplayFloatReg(210, 210, 28, &context->fp28.f.f_even);
Fault_DisplayFloatReg(30, 220, 30, &context->fp30.f.f_even);
osWritebackDCacheAll();
osViBlack(false);
osViRepeatLine(false);
@ -206,9 +206,7 @@ void func_80007910(OSThread* thread) {
}
OSThread* func_80007CEC(void) {
OSThread* queue;
queue = __osGetActiveQueue();
OSThread* queue = __osGetActiveQueue();
while (queue->priority != -1) {
if ((queue->priority > 0) && (queue->priority < 0x7F) && (queue->flags & 3)) {
@ -219,40 +217,40 @@ OSThread* func_80007CEC(void) {
return NULL;
}
void Fault_ThreadEntry(void* arg0) {
OSMesg sp44;
OSThread* sp40;
s32 var_s2;
s32 var_s5;
u32 var_s0;
void Fault_ThreadEntry(void* arg) {
OSMesg dummy;
OSThread* faultedThread;
s32 codeTimer;
s32 codeComplete;
u32 codeInput;
sp44 = NULL;
var_s5 = 0;
var_s0 = 0;
var_s2 = 0;
dummy = NULL;
codeComplete = 0;
codeInput = 0;
codeTimer = 0;
osSetEventMesg(OS_EVENT_CPU_BREAK, &gFaultMgr.mesgQueue, (OSMesg) FAULT_MESG_BREAK);
osSetEventMesg(OS_EVENT_FAULT, &gFaultMgr.mesgQueue, (OSMesg) FAULT_MESG_FAULT);
sp40 = NULL;
while (sp40 == NULL) {
MQ_WAIT_FOR_MESG(&gFaultMgr.mesgQueue, &sp44);
sp40 = func_80007CEC();
faultedThread = NULL;
while (faultedThread == NULL) {
MQ_WAIT_FOR_MESG(&gFaultMgr.mesgQueue, &dummy);
faultedThread = func_80007CEC();
}
func_8000762C(300, 10, "-");
gControllerPlugged[0] = 1;
Fault_Printf(300, 10, "-");
gControllerPlugged[0] = true;
#if MODS_AUTO_DEBUGGER == 0 // Instant crash debugger (no button combination needed)
while (var_s5 == 0) {
while (!codeComplete) {
osSendMesg(&gSerialThreadMesgQueue, (OSMesg) SI_READ_CONTROLLER, OS_MESG_NOBLOCK);
MQ_WAIT_FOR_MESG(&gControllerMesgQueue, NULL);
Controller_UpdateInput();
switch (var_s0) {
switch (codeInput) {
case 0:
if (gControllerHold[0].button == (R_TRIG | D_CBUTTONS | L_CBUTTONS)) {
var_s0++;
var_s2 = 4000;
codeInput++;
codeTimer = 4000;
}
break;
case 1:
@ -260,10 +258,10 @@ void Fault_ThreadEntry(void* arg0) {
case 7:
if (gControllerHold[0].button & R_TRIG) {
if (gControllerPress[0].button == A_BUTTON) {
var_s0++;
var_s2 = 3000;
codeInput++;
codeTimer = 3000;
} else if (gControllerPress[0].button != 0) {
var_s0 = 0;
codeInput = 0;
}
}
break;
@ -272,10 +270,10 @@ void Fault_ThreadEntry(void* arg0) {
case 8:
if (gControllerHold[0].button & R_TRIG) {
if (gControllerPress[0].button == B_BUTTON) {
var_s0++;
var_s2 = 3000;
codeInput++;
codeTimer = 3000;
} else if (gControllerPress[0].button != 0) {
var_s0 = 0;
codeInput = 0;
}
}
break;
@ -288,45 +286,45 @@ void Fault_ThreadEntry(void* arg0) {
case 13:
if (gControllerHold[0].button & R_TRIG) {
if (gControllerPress[0].button == L_CBUTTONS) {
var_s0++;
var_s2 = 3000;
codeInput++;
codeTimer = 3000;
} else if (gControllerPress[0].button != 0) {
var_s0 = 0;
codeInput = 0;
}
}
break;
case 14:
if (gControllerHold[0].button & R_TRIG) {
if (gControllerPress[0].button == START_BUTTON) {
var_s0++;
var_s2 = 3000;
codeInput++;
codeTimer = 3000;
} else if (gControllerPress[0].button != 0) {
var_s0 = 0;
codeInput = 0;
}
}
break;
case 15:
var_s5 = 1;
codeComplete = true;
break;
}
if (var_s2 != 0) {
var_s2 -= 1;
if (codeTimer != 0) {
codeTimer--;
} else {
var_s0 = 0;
codeInput = 0;
}
}
#endif
func_80007910(sp40);
Fault_DisplayDebugInfo(faultedThread);
while (true) {
;
}
}
void func_80007FE4(FrameBuffer* arg0, u16 arg1, u16 arg2) {
gFaultMgr.fb = arg0;
gFaultMgr.width = arg1;
gFaultMgr.height = arg2;
void Fault_SetFrameBuffer(FrameBuffer* buffer, u16 width, u16 height) {
gFaultMgr.fb = buffer;
gFaultMgr.width = width;
gFaultMgr.height = height;
}
void Fault_Init(void) {

View File

@ -275,7 +275,7 @@ void Graphics_ThreadEntry(void* arg0) {
if (gFillScreen == 0) {
osViSwapBuffer(&gFrameBuffers[(gSysFrameCount - 1) % 3]);
}
func_80007FE4(&gFrameBuffers[(gSysFrameCount - 1) % 3], SCREEN_WIDTH, 16);
Fault_SetFrameBuffer(&gFrameBuffers[(gSysFrameCount - 1) % 3], SCREEN_WIDTH, 16);
visPerFrame = MIN(gVIsPerFrame, 4);
validVIsPerFrame = MAX(visPerFrame, gGfxVImesgQueue.validCount + 1);

View File

@ -42,12 +42,12 @@ void Matrix_Copy(Matrix* dst, Matrix* src) {
// Makes a copy of the stack's current matrix and puts it on the top of the stack
void Matrix_Push(Matrix** mtxStack) {
Matrix_Copy(*mtxStack + 1, *mtxStack);
*mtxStack += 1;
(*mtxStack)++;
}
// Removes the top matrix of the stack
void Matrix_Pop(Matrix** mtxStack) {
*mtxStack -= 1;
(*mtxStack)--;
}
// Copies tf into mtx (MTXF_NEW) or applies it to mtx (MTXF_APPLY)

View File

@ -6,6 +6,8 @@ import struct
import argparse
import sys
file_table_dict = {0xDE480:"US1.1", 0xD9A90:"US1.0"}
file_names = [
"makerom", "main", "dma_table", "audio_seq", "audio_bank", "audio_table", "ast_common", "ast_bg_space", "ast_bg_planet",
"ast_arwing", "ast_landmaster", "ast_blue_marine", "ast_versus", "ast_enmy_planet", "ast_enmy_space", "ast_great_fox",
@ -86,17 +88,37 @@ def mio0_dec_bytes(comp_bytes, mio0):
return decomp_bytes
def find_file_table(ROM):
with open(ROM, 'rb') as ROMfile:
ROMfile.seek(0,0)
main_area = ROMfile.read(0x100000)
file_table_start = main_area.find(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x50\x00\x00\x00\x00')
if(file_table_start == -1):
print('File table not found.')
sys.exit(2)
elif(file_table_start > 0x100000):
print("Warning: Detected file table offset 0x%X is larger than expected." % file_table_start)
# print(file_table_start)
return file_table_start
def compress(baserom, comprom, mio0, extract_dest=None):
decomp_inds = [0, 1, 2, 3, 4, 5, 15, 16, 21, 22, 23, 24, 48]
file_table = find_file_table(baserom)
# comp_const = 0xFFFEFFFFFE1E7FC0
with open(comprom, 'w+b') as compfile, open(baserom, 'rb') as basefile:
file_count = 0
p_file_begin = 0
while True:
file_entry = 0xDE480 + 0x10 * file_count
file_entry = file_table + 0x10 * file_count
basefile.seek(file_entry + 4)
v_file_begin = int.from_bytes(basefile.read(4),'big')
@ -161,18 +183,33 @@ def compress(baserom, comprom, mio0, extract_dest=None):
return
def decompress(baserom, decomprom, mio0, extract_dest=None):
with open(decomprom, 'w+b') as decompfile, open(baserom, 'rb') as baserom:
def decompress(baserom, decomprom, mio0, extract_dest=None, print_inds=False):
file_table = find_file_table(baserom)
if file_table_dict.get(file_table) == "US1.0":
ext = "rev0.z64"
elif file_table_dict.get(file_table) == "US1.1":
ext = "z64"
else:
ext = ('%X' % file_table) + ".z64"
print("File table found at 0x%X" % file_table)
print("Detected ROM version is " + file_table_dict.get(file_table, "Unknown"))
outrom = decomprom.replace("z64", ext)
with open(outrom, 'w+b') as decompfile, open(baserom, 'rb') as basefile:
file_count = 0
decomp_inds = []
while True:
file_entry = 0xDE480 + 0x10 * file_count
baserom.seek(file_entry)
file_entry = file_table + 0x10 * file_count
basefile.seek(file_entry)
v_file_begin = int.from_bytes(baserom.read(4),'big')
p_file_begin = int.from_bytes(baserom.read(4),'big')
p_file_end = int.from_bytes(baserom.read(4),'big')
comp_flag = int.from_bytes(baserom.read(4),'big')
v_file_begin = int.from_bytes(basefile.read(4),'big')
p_file_begin = int.from_bytes(basefile.read(4),'big')
p_file_end = int.from_bytes(basefile.read(4),'big')
comp_flag = int.from_bytes(basefile.read(4),'big')
p_file_size = p_file_end - p_file_begin
@ -183,12 +220,13 @@ def decompress(baserom, decomprom, mio0, extract_dest=None):
decompfile.truncate(v_file_begin)
baserom.seek(p_file_begin)
basefile.seek(p_file_begin)
file_bytes = baserom.read(p_file_size)
file_bytes = basefile.read(p_file_size)
if comp_flag == 0:
v_file_size = p_file_size
decomp_inds += [file_count]
dec_msg = 'uncompressed'
elif comp_flag == 1:
file_bytes = mio0_dec_bytes(file_bytes, mio0)
@ -226,7 +264,11 @@ def decompress(baserom, decomprom, mio0, extract_dest=None):
decompfile.seek(0x10)
decompfile.write(crc1.to_bytes(4, 'big'))
decompfile.write(crc2.to_bytes(4, 'big'))
print("Decompressed %d files." % file_count)
if(print_inds) :
print("These file numbers were not compressed:")
print(decomp_inds)
return
parser = argparse.ArgumentParser(description='Compress or decompress a Star Fox 64 ROM')
@ -237,6 +279,7 @@ parser.add_argument('-c', action='store_true',help='compress provided ROM')
parser.add_argument('-d', action='store_true',help='decompress provided ROM')
parser.add_argument('-m', metavar='mio0',dest='mio0',help='Path to mio0 tool if not in same directory')
parser.add_argument('-r', action="store_true",help='Fix crc without compressing or decompressing')
parser.add_argument('-i', action='store_true',help='Print indices of uncompressed files during decompression.')
# parser.add_argument('-v', action='store_true',help='show what changes are made')
if __name__ == '__main__':
@ -252,7 +295,7 @@ if __name__ == '__main__':
elif args.c:
compress(args.inROM, args.outROM, mio0)
elif args.d or args.extract:
decompress(args.inROM, args.outROM, mio0, args.extract)
decompress(args.inROM, args.outROM, mio0, args.extract, args.i)
else:
print("Something went wrong.")