cleanup to object fields, some new names (#101)

* names and such

* enum

* dying
This commit is contained in:
petrie911
2024-01-21 14:42:06 -06:00
committed by GitHub
parent 18a99b767f
commit b7a36ae8ea
38 changed files with 2338 additions and 2344 deletions
+23 -22
View File
@@ -21,11 +21,11 @@ void func_8000FFCC(void);
void func_80016A50(void);
void func_800182F4(s32);
void Audio_PlaySfx(u32, Vec3f*, u8, f32*, f32*, s8*);
void func_80019290(s32, Vec3f**);
void func_8001A38C(u8, Vec3f*);
void Audio_KillSfx(Vec3f*);
void func_8001A55C(Vec3f*, u32);
void Audio_PlaySfx(u32, f32*, u8, f32*, f32*, s8*);
void func_80019290(s32, void*);
void func_8001A38C(u8, f32*);
void Audio_KillSfx(f32*);
void func_8001A55C(f32*, u32);
void func_8001A838(u32);
void func_8001ACDC(s32);
void func_8001AD00(u32);
@@ -37,14 +37,14 @@ u8* func_8001C3EC(void);
void func_8001C8B8(u8);
void func_8001CA24(u8);
void func_8001CB80(u8, u8);
void func_8001CCDC(u8, Vec3f *);
void func_8001CE28(u8, Vec3f *);
void func_8001D034(Vec3f*, s32, u8);
void func_8001D10C(Vec3f*, u32);
void func_8001CCDC(u8, f32 *);
void func_8001CE28(u8, f32 *);
void func_8001D034(f32*, s32, u8);
void func_8001D10C(f32*, u32);
void func_8001D15C(u8);
void func_8001D1C8(u8, s32);
void func_8001D2FC(Vec3f *, u16);
void func_8001D3A0(Vec3f *, u16);
void func_8001D2FC(f32 *, u16);
void func_8001D3A0(f32 *, u16);
void func_8001D400(s8);
void func_8001D444(u8, u16, u8, u8);
void func_8001D4AC(u16, u8, u8, u8);
@@ -106,11 +106,11 @@ void func_8002E670(Actor*);
void func_8002E694(Actor*);
void func_8002E6B8(Actor*);
void func_8002E6DC(Actor*);
bool func_8002E4F8(u16*, s32);
bool func_8002E4F8(u16*, RadioCharacterId);
void func_8002E700(Player *);
void func_8002EE64(Actor * actor);
void func_8002F180(void);
void func_8002F5F4(u16* msg, s32 character);
void func_8002F5F4(u16* msg, RadioCharacterId character);
void func_8003088C(Actor*);
void func_800319AC(Actor* this);
void func_80035448(Actor* actor);
@@ -207,10 +207,10 @@ void func_8005CA80(Item*);
void func_8005CB44(Item*);
void func_8005CC9C(Item*);
void func_8005CDA8(Item*);
void func_8005F030(Vec3f*);
void func_8005F0E8(Vec3f*, Vec3f*);
void func_8005F1EC(Vec3f*);
void func_8005F290(Vec3f*, Vec3f*);
void func_8005F030(f32*);
void func_8005F0E8(f32*, Vec3f*);
void func_8005F1EC(f32*);
void func_8005F290(f32*, Vec3f*);
void func_8005F670(Vec3f*);
s32 func_8005F9DC(Vec3f*);
@@ -219,8 +219,8 @@ void func_80060714(s32 );
void func_8006089C(u8 );
void func_80060968(void);
void func_80060D94(s32);
void func_80060F30(Vec3f* , u32 , s32 );
void Object_Kill(Object*, Vec3f*);
void func_80060F30(f32* , u32 , s32 );
void Object_Kill(Object*, f32*);
s32 func_80060FE4(Vec3f*, f32);
void Object_SetInfo(ObjectInfo* info, u32 objId);
void Object_80_Initialize(Object_80*);
@@ -530,12 +530,12 @@ void func_800A3CA0(void);
// fox_play
s32 Play_CheckMedalStatus(u16);
s32 Play_GetMaxShields(void);
void func_800A6028(Vec3f*, u32);
void func_800A6028(f32*, u32);
void func_800A5844(void);
void func_800A594C(void);
void func_800A5D6C(void);
void func_800A5FA0(Vec3f* , u32 , s32 );
void func_800A6070(Vec3f* arg0, u32 arg1);
void func_800A5FA0(f32* , u32 , s32 );
void func_800A6070(f32* , u32 );
void func_800A6148(void);
void func_800A69F8(s32 , f32 , f32 , f32 );
void Player_ApplyDamage(Player* player, s32 direction, s32 damage);
@@ -595,6 +595,7 @@ s32 Save_Write(void);
s32 Save_Read(void);
void func_menu_80187520(u32, void*);
void func_menu_8019E8D0(void);
void func_ending_8018A96C(void);
void func_ending_8018AAC4(void);
+15 -8
View File
@@ -100,6 +100,13 @@ typedef struct {
/* 0x1C */ u8 unk_1C;
} UnkStruct_D003C; // size = 0x20
typedef enum ObjectStatus {
/* 0 */ OBJ_FREE,
/* 1 */ OBJ_INIT,
/* 2 */ OBJ_ACTIVE,
/* 3 */ OBJ_DYING,
} ObjectStatus;
typedef struct {
/* 0x00 */ u8 status;
/* 0x02 */ u16 id;
@@ -130,7 +137,7 @@ typedef struct {
/* 0x00 */ Object obj;
/* 0x1C */ ObjectInfo info;
/* 0x40 */ char unk40[0x8];
/* 0x48 */ Vec3f sfxPos;
/* 0x48 */ f32 sfxPos[3];
/* 0x54 */ f32 unk_54;
} Object_58; // size = 0x58
@@ -147,7 +154,7 @@ typedef struct {
/* 0x58 */ char pad58[8];
/* 0x60 */ f32 unk_60;
/* 0x64 */ Vec3f vel;
/* 0x70 */ Vec3f sfxPos;
/* 0x70 */ f32 sfxPos[3];
/* 0x7C */ char pad7C[4];
} Object_80; // size = 0x80
@@ -174,7 +181,7 @@ typedef struct {
/* 0x50 */ f32 unk_50;
/* 0x54 */ f32 unk_54;
/* 0x58 */ f32 unk_58;
/* 0x5C */ Vec3f sfxPos;
/* 0x5C */ f32 sfxPos[3];
/* 0x68 */ f32 scale;
} Item; // size 0x6C
@@ -198,7 +205,7 @@ typedef struct {
/* 0x78 */ s16 unk_78;
/* 0x7A */ s16 unk_7A;
/* 0x7C */ char pad7C[4];
/* 0x80 */ Vec3f sfxPos;
/* 0x80 */ f32 sfxPos[3];
} Effect; // size 0x8C
typedef struct {
@@ -231,7 +238,7 @@ typedef struct {
/* 0x0D8 */ f32 fwork[50];
/* 0x1A0 */ Vec3f vwork[50];
/* 0x3F8 */ f32 unk_3F8;
/* 0x3FC */ Vec3f sfxPos;
/* 0x3FC */ f32 sfxPos[3];
} Boss; // size = 0x408
#define DMG_BEAM 1
@@ -262,17 +269,17 @@ typedef struct {
/* 0x0C8 */ u8 unk_0C8;
/* 0x0C9 */ u8 unk_0C9;
/* 0x0CA */ u8 timer_0CA[4];
/* 0x0CE */ s16 unk_0CE;
/* 0x0CE */ s16 health;
/* 0x0D0 */ s8 unk_0D0;
/* 0x0D2 */ s16 unk_0D2;
/* 0x0D4 */ s16 unk_0D4;
/* 0x0D6 */ u16 unk_0D6;
/* 0x0D6 */ u16 damage;
/* 0x0D8 */ Vec3f unk_0D8;
/* 0x0E4 */ s16 unk_0E4;
/* 0x0E6 */ s16 unk_0E6;
/* 0x0E8 */ Vec3f vel;
/* 0x0F4 */ Vec3f unk_0F4;
/* 0x100 */ Vec3f sfxPos;
/* 0x100 */ f32 sfxPos[3];
/* 0x10C */ f32 gravity;
/* 0x110 */ f32 scale;
/* 0x114 */ f32 fwork[30];
+10 -13
View File
@@ -99,7 +99,7 @@ typedef struct {
/* 0x2C */ f32 unk_2C;
/* 0x30 */ f32 unk_30;
/* 0x34 */ f32 unk_34;
/* 0x38 */ Vec3f sfxPos;
/* 0x38 */ f32 sfxPos[3];
/* 0x44 */ f32 unk_44;
/* 0x48 */ f32 unk_48;
/* 0x4C */ f32 unk_4C;
@@ -268,18 +268,15 @@ typedef struct Player {
/* 0x2E0 */ Vec3f hit4;
/* 0x2EC */ Vec3f hit3;
/* 0x2F8 */ Vec3f jointTable[30];
/* 0x460 */ union {
Vec3f unk_460;
Vec3f unk_460_arr[1]; // probably fake
};
/* 0x460 */ Vec3f unk_46C;
/* 0x478 */ u8 unk_478;
/* 0x479 */ s8 unk_479;
/* 0x47C */ Vec3f *unk_47C;
/* 0x480 */ Vec3f *unk_480;
/* 0x484 */ s8 unk_484;
/* 0x485 */ s8 unk_485;
/* 0x488 */ f32 unk_488;
/* 0x460 */ f32 sfxPos[3];
/* 0x460 */ f32 sfxVel[3];
/* 0x478 */ u8 levelType;
/* 0x479 */ u8 form2;
/* 0x47C */ f32 *srcPos;
/* 0x480 */ f32 *srcVel;
/* 0x484 */ s8 boost;
/* 0x485 */ s8 brake;
/* 0x488 */ f32 yVel;
/* 0x48C */ u8 unk_48C;
/* 0x490 */ f32 unk_490;
/* 0x494 */ u8 unk_494;
+3 -3
View File
@@ -22,7 +22,7 @@ extern u8 gAspMainData[];
extern Mtx gIdentityMtx; // 800C4620
extern Matrix gIdentityMatrix; //800C4660
extern Vec3f D_800C5D28;
extern f32 D_800C5D28[];
extern f32 D_800C5D34;
extern s8 D_800C5D3C;
extern s8 D_800C7C50;
@@ -458,7 +458,7 @@ extern s32 D_80177A10[10];
extern s32 D_Timer_80177A38[4];
extern f32 D_80177A48[10];
extern s32 D_Timer_80177A70[4];
extern s32 D_80177A80;
extern s32 gCsFrameCount;
//
extern s32 D_Timer_80177A88[4];
extern u8 D_80177A98;
@@ -571,7 +571,7 @@ extern u8 D_80178238[60];
// 0x8
extern s32 D_8017827C;
extern Player* gPlayer;
extern s32 D_80178284;
extern s32 gBossActive;
extern f32* D_80178288;
extern s32 D_8017828C;
extern f32* D_80178290;
+2 -2
View File
@@ -466,7 +466,7 @@ D_80177A10 = 0x80177A10;//size:0x28
D_Timer_80177A38 = 0x80177A38;
D_80177A48 = 0x80177A48;//size:0x28
D_Timer_80177A70 = 0x80177A70;//size:0x10
D_80177A80 = 0x80177A80;
gCsFrameCount = 0x80177A80;
D_Timer_80177A88 = 0x80177A88;//size:0x10
D_80177A98 = 0x80177A98;
D_80177AA0 = 0x80177AA0;
@@ -530,7 +530,7 @@ gCurrentLevel = 0x80178234;
D_80178238 = 0x80178238;//size:4 type:u8
D_8017827C = 0x8017827C;
gPlayer = 0x80178280;
D_80178284 = 0x80178284;
gBossActive = 0x80178284;
D_80178288 = 0x80178288;
D_8017828C = 0x8017828C;
D_80178290 = 0x80178290;
+217 -214
View File
File diff suppressed because it is too large Load Diff
+66 -66
View File
@@ -4,7 +4,7 @@ static Vec3f D_8015F950;
void func_80035D30(Effect* effect, f32 xPos, f32 yPos, f32 zPos) {
Effect_Initialize(effect);
effect->obj.status = 1;
effect->obj.status = OBJ_INIT;
effect->obj.id = OBJ_EFFECT_351;
effect->obj.pos.x = xPos;
effect->obj.pos.y = yPos;
@@ -24,7 +24,7 @@ void func_80035DEC(f32 xPos, f32 yPos, f32 zPos) {
s32 i;
for (i = 0; i < ARRAY_COUNT(gEffects); i++) {
if (gEffects[i].obj.status == 0) {
if (gEffects[i].obj.status == OBJ_FREE) {
func_80035D30(&gEffects[i], xPos, yPos, zPos);
break;
}
@@ -52,7 +52,7 @@ void func_80035E78(PlayerShot* shot) {
shot->unk_5C = 1;
shot->unk_64 = 30;
shot->unk_58 = 150;
func_8001CE28(shot->playerNum, &shot->sfxPos);
func_8001CE28(shot->playerNum, shot->sfxPos);
D_Timer_80161A60 = 4;
if (shot->obj.pos.y < (gGroundLevel + 450.0f)) {
D_80178480 = 15;
@@ -119,7 +119,7 @@ void func_80036318(PlayerShot* shot) {
s32 i;
if (shot->obj.id == PLAYERSHOT_4) {
Object_Kill(&shot->obj, &shot->sfxPos);
Object_Kill(&shot->obj, shot->sfxPos);
return;
}
shot->obj.pos.z = D_80178498; // strange order on the globals
@@ -160,7 +160,7 @@ void func_80036318(PlayerShot* shot) {
void func_80036528(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 yRot, f32 xRot, f32 scale, s32 unk44, s32 time) {
Effect_Initialize(effect);
effect->obj.status = 1;
effect->obj.status = OBJ_INIT;
effect->obj.id = OBJ_EFFECT_344;
effect->obj.pos.x = xPos;
effect->obj.pos.y = yPos;
@@ -172,7 +172,7 @@ void func_80036528(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 yRot, f32 x
effect->unk_46 = 80;
effect->timer_50 = time;
Object_SetInfo(&effect->info, effect->obj.id);
func_800A6070(&effect->sfxPos, 0x29000000);
func_800A6070(effect->sfxPos, 0x29000000);
}
void func_800365E4(f32 xPos, f32 yPos, f32 zPos, f32 arg3, f32 arg4, f32 arg5, f32 yRot, f32 xRot, f32 scale, s32 unk44,
@@ -182,7 +182,7 @@ void func_800365E4(f32 xPos, f32 yPos, f32 zPos, f32 arg3, f32 arg4, f32 arg5, f
if ((D_801784AC != 4) && (gLevelType == LEVELTYPE_PLANET) && (D_80161A88 != 2) && (gCurrentLevel != LEVEL_SOLAR) &&
(gCurrentLevel != LEVEL_BOLSE) && (gCurrentLevel != LEVEL_TRAINING) && (gCurrentLevel != LEVEL_ZONESS)) {
for (i = 0; i < 50; i++) {
if (gEffects[i].obj.status == 0) {
if (gEffects[i].obj.status == OBJ_FREE) {
func_80036528(&gEffects[i], xPos, yPos, zPos, yRot, xRot, scale, unk44, time);
break;
}
@@ -192,7 +192,7 @@ void func_800365E4(f32 xPos, f32 yPos, f32 zPos, f32 arg3, f32 arg4, f32 arg5, f
void func_800366CC(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 yRot, f32 scale) {
Effect_Initialize(effect);
effect->obj.status = 1;
effect->obj.status = OBJ_INIT;
effect->obj.id = OBJ_EFFECT_345;
effect->obj.pos.x = xPos;
effect->obj.pos.y = yPos;
@@ -201,7 +201,7 @@ void func_800366CC(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 yRot, f32 s
effect->scale2 = scale * 0.5f;
effect->timer_50 = 80;
Object_SetInfo(&effect->info, effect->obj.id);
func_800A6070(&effect->sfxPos, 0x29000000);
func_800A6070(effect->sfxPos, 0x29000000);
}
void func_80036770(f32 xPos, f32 yPos, f32 zPos, f32 yRot, f32 scale) {
@@ -210,7 +210,7 @@ void func_80036770(f32 xPos, f32 yPos, f32 zPos, f32 yRot, f32 scale) {
if ((D_801784AC != 4) && (gLevelType == LEVELTYPE_PLANET) && (D_80161A88 <= 0) &&
(gCurrentLevel != LEVEL_TRAINING) && (gCurrentLevel != LEVEL_SOLAR) && (gCurrentLevel != LEVEL_ZONESS)) {
for (i = 0; i < 50; i++) {
if (gEffects[i].obj.status == 0) {
if (gEffects[i].obj.status == OBJ_FREE) {
func_800366CC(&gEffects[i], xPos, yPos, zPos, yRot, scale);
func_8007D10C(xPos, yPos, zPos, 2.0f);
break;
@@ -294,7 +294,7 @@ s32 func_80036874(PlayerShot* shot, f32* hitboxData, Object* obj) {
(fabsf(hitbox->x.offset + obj->pos.x - shotPx) < (hitbox->x.size + xySizeMod)) &&
(fabsf(hitbox->y.offset + obj->pos.y - shotPy) < (hitbox->y.size + xySizeMod))) {
if (shot->obj.id == PLAYERSHOT_4) {
Object_Kill(&shot->obj, &shot->sfxPos);
Object_Kill(&shot->obj, shot->sfxPos);
return 0;
}
if ((obj->id < 176) || (obj->id >= 292)) {
@@ -602,7 +602,7 @@ bool func_8003774C(PlayerShot* shot, ObjectId objId, Object* obj) {
if (!useCol2) {
if (func_800998FC(&sp64, &sp58, &sp38, objId, &sp4C, sp44) > 0) {
if (shot->obj.id == PLAYERSHOT_4) {
Object_Kill(&shot->obj, &shot->sfxPos);
Object_Kill(&shot->obj, shot->sfxPos);
return false;
}
func_80036318(shot);
@@ -625,7 +625,7 @@ bool func_8003774C(PlayerShot* shot, ObjectId objId, Object* obj) {
}
} else if (func_800A3690(&sp64, &sp58, objId, &sp4C)) {
if (shot->obj.id == PLAYERSHOT_4) {
Object_Kill(&shot->obj, &shot->sfxPos);
Object_Kill(&shot->obj, shot->sfxPos);
return false;
}
func_80036318(shot);
@@ -648,29 +648,29 @@ void func_80037CF4(PlayerShot* shot, Actor* actor, s32 hitIndex) {
actor->unk_0D0 = 1;
actor->unk_0D2 = hitIndex - 1;
actor->timer_0C2 = 2;
actor->unk_0D6 = 10;
actor->damage = 10;
if ((shot->playerNum < 4) && (gPlayer[shot->playerNum].form != FORM_LANDMASTER)) {
switch (gLaserStrength[shot->playerNum]) {
case LASERS_TWIN:
actor->unk_0D6 = 12;
actor->damage = 12;
break;
case LASERS_HYPER:
actor->unk_0D6 = 15;
actor->damage = 15;
break;
}
} else if ((shot->playerNum >= 100) && (gCurrentLevel == LEVEL_SECTOR_X)) {
if ((gActors[shot->playerNum - 100].obj.id == 200) && (gActors[shot->playerNum - 100].iwork[12] == 5)) {
actor->unk_0D6 = 30;
actor->damage = 30;
}
}
if (shot->obj.id == PLAYERSHOT_9) {
actor->unk_0D6 = 100;
actor->damage = 100;
} else if (shot->obj.id == PLAYERSHOT_8) {
if (gCurrentLevel == LEVEL_AQUAS) {
actor->unk_0D6 = 31;
actor->damage = 31;
} else {
actor->unk_0D0 = 2;
actor->unk_0D6 = 30;
actor->damage = 30;
actor->timer_0CA[shot->playerNum] = 0;
}
}
@@ -705,7 +705,7 @@ void func_80037CF4(PlayerShot* shot, Actor* actor, s32 hitIndex) {
shot->obj.pos.z += shot->vel.z * 5.0f;
actor->timer_0C2 = 3;
func_80078E50(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 8.0f);
Audio_PlaySfx(0x29121007, &actor->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
Audio_PlaySfx(0x29121007, actor->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
func_800A668C(D_8017849C, D_801784A0, D_80178498);
}
} else {
@@ -738,19 +738,19 @@ void func_80038140(PlayerShot* shot) {
}
if (sp60) {
for (i = 0, effect = gEffects; i < 100; i++, effect++) {
if ((effect->obj.status >= 2) && (effect->info.unk_19 != 0) &&
if ((effect->obj.status >= OBJ_ACTIVE) && (effect->info.unk_19 != 0) &&
(fabsf(shot->obj.pos.z - effect->obj.pos.z) < 200.0f) &&
(fabsf(shot->obj.pos.x - effect->obj.pos.x) < 100.0f) &&
(fabsf(shot->obj.pos.y - effect->obj.pos.y) < 100.0f)) {
if (effect->info.unk_19 == 2) {
effect->unk_44 = 1;
} else {
Object_Kill(&effect->obj, &effect->sfxPos);
Object_Kill(&effect->obj, effect->sfxPos);
}
}
}
for (i = 0, actor = gActors; i < 60; i++, actor++) {
if ((actor->obj.status >= 2) && (actor->timer_0C2 == 0)) {
if ((actor->obj.status >= OBJ_ACTIVE) && (actor->timer_0C2 == 0)) {
switch (actor->obj.id) {
case OBJ_ACTOR_180:
if (func_8003774C(shot, actor->obj.id, &actor->obj)) {
@@ -852,7 +852,7 @@ void func_80038140(PlayerShot* shot) {
shot->obj.pos.y += 2.0f * shot->vel.y;
shot->obj.pos.z += 2.0f * shot->vel.z;
shot->unk_64 = 5;
Audio_PlaySfx(0x09007011, &player->unk_460, 0, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
Audio_PlaySfx(0x09007011, player->sfxPos, 0, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
func_80078E50(player->pos.x, player->pos.y, player->unk_138, 8.0f);
} else {
func_80036318(shot);
@@ -893,7 +893,7 @@ void func_80038140(PlayerShot* shot) {
if ((gLevelMode == LEVELMODE_ALL_RANGE) && (shot->playerNum < 110)) {
for (i = 0, obj58 = gObjects58; i < 200; i++, obj58++) {
if (obj58->obj.status == 2) {
if (obj58->obj.status == OBJ_ACTIVE) {
if ((obj58->obj.id == OBJ_80_117) || (obj58->obj.id == OBJ_80_141) || (obj58->obj.id == OBJ_80_149) ||
(obj58->obj.id == OBJ_80_150) || (obj58->obj.id == OBJ_80_148) || (obj58->obj.id == OBJ_80_143) ||
(obj58->obj.id == OBJ_80_160) || (obj58->obj.id == OBJ_80_1) || (obj58->obj.id == OBJ_80_3) ||
@@ -906,7 +906,7 @@ void func_80038140(PlayerShot* shot) {
}
} else {
for (i = 0, obj80 = gObjects80; i < 50; i++, obj80++) {
if (obj80->obj.status == 2) {
if (obj80->obj.status == OBJ_ACTIVE) {
if ((obj80->obj.id == OBJ_80_1) || (obj80->obj.id == OBJ_80_39) || (obj80->obj.id == OBJ_80_4) ||
(obj80->obj.id == OBJ_80_5) || (obj80->obj.id == OBJ_80_120) || (obj80->obj.id == OBJ_80_124) ||
(obj80->obj.id == OBJ_80_126) || (obj80->obj.id == OBJ_80_47) || (obj80->obj.id == OBJ_80_2) ||
@@ -925,7 +925,7 @@ void func_80038140(PlayerShot* shot) {
}
if (sp60) {
for (i = 0, obj4C = gObjects4C; i < 40; i++, obj4C++) {
if (obj4C->obj.status == 2) {
if (obj4C->obj.status == OBJ_ACTIVE) {
if (obj4C->obj.id != OBJ_4C_169) {
if (func_80037698(shot, obj4C)) {
obj4C->unk_46 = 1;
@@ -939,7 +939,7 @@ void func_80038140(PlayerShot* shot) {
}
}
for (i = 0, boss = gBosses; i < 4; i++, boss++) {
if ((boss->obj.status == 2) && (boss->timer_05A == 0)) {
if ((boss->obj.status == OBJ_ACTIVE) && (boss->timer_05A == 0)) {
if ((boss->obj.id == OBJ_BOSS_308) || (boss->obj.id == OBJ_BOSS_312) || (boss->obj.id == OBJ_BOSS_309) ||
(boss->obj.id == OBJ_BOSS_313)) {
func_8003774C(shot, boss->obj.id, &boss->obj);
@@ -949,11 +949,11 @@ void func_80038140(PlayerShot* shot) {
temp_fv0 = fabsf(boss->obj.pos.z - shot->obj.pos.z) * 0.8333333f;
if (sqrtf(SQ(temp_fv1) + SQ(temp_fa0) + SQ(temp_fv0)) < 1500.0f) {
if (shot->obj.id == PLAYERSHOT_4) {
Object_Kill(&shot->obj, &shot->sfxPos);
Object_Kill(&shot->obj, shot->sfxPos);
} else {
boss->dmgType = DMG_BEAM;
func_80036318(shot);
Audio_PlaySfx(0x29001062, &shot->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
Audio_PlaySfx(0x29001062, shot->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
}
}
} else {
@@ -963,11 +963,11 @@ void func_80038140(PlayerShot* shot) {
temp_fv0 = fabsf(boss->obj.pos.z - shot->obj.pos.z);
if (sqrtf(SQ(temp_fv1) + SQ(temp_fa0) + SQ(temp_fv0)) < 2700.0f) {
if (shot->obj.id == PLAYERSHOT_4) {
Object_Kill(&shot->obj, &shot->sfxPos);
Object_Kill(&shot->obj, shot->sfxPos);
} else {
boss->dmgType = DMG_BEAM;
boss->dmgPart = 100;
Audio_PlaySfx(0x29121007, &shot->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
Audio_PlaySfx(0x29121007, shot->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
func_80036318(shot);
}
}
@@ -975,7 +975,7 @@ void func_80038140(PlayerShot* shot) {
temp_v0 = func_80036874(shot, boss->info.hitbox, &boss->obj);
if (temp_v0 != 0) {
if (shot->obj.id == PLAYERSHOT_4) {
Object_Kill(&shot->obj, &shot->sfxPos);
Object_Kill(&shot->obj, shot->sfxPos);
} else if (!((boss->obj.id == OBJ_BOSS_316) && (shot->playerNum != 0))) {
boss->dmgType = DMG_BEAM;
if (shot->obj.id == PLAYERSHOT_3) {
@@ -1035,7 +1035,7 @@ void func_80038F34(PlayerShot* shot) {
}
if (!sp48) {
if (!gVersusMode) {
Object_Kill(&shot->obj, &shot->sfxPos);
Object_Kill(&shot->obj, shot->sfxPos);
return;
}
} else {
@@ -1217,7 +1217,7 @@ void func_80039A50(PlayerShot* shot) {
}
if (!sp104) {
if ((shot->obj.id != PLAYERSHOT_3) && (shot->unk_64 < 10) && !gVersusMode) {
Object_Kill(&shot->obj, &shot->sfxPos);
Object_Kill(&shot->obj, shot->sfxPos);
}
} else {
if ((shot->obj.id == PLAYERSHOT_5) || (shot->obj.id == PLAYERSHOT_6) || (shot->obj.id == PLAYERSHOT_7)) {
@@ -1482,7 +1482,7 @@ void func_8003AF88(PlayerShot* shot) {
void func_8003AFD8(PlayerShot* shot) {
shot->unk_60++;
if (shot->unk_60 > 2) {
Object_Kill(&shot->obj, &shot->sfxPos);
Object_Kill(&shot->obj, shot->sfxPos);
}
}
@@ -1558,13 +1558,13 @@ void func_8003B00C(PlayerShot* shot, Player* player) {
}
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)) {
Object_Kill(&shot->obj, &shot->sfxPos);
Object_Kill(&shot->obj, shot->sfxPos);
return;
}
break;
}
if (shot->unk_64 == 0) {
Object_Kill(&shot->obj, &shot->sfxPos);
Object_Kill(&shot->obj, shot->sfxPos);
}
if (shot->unk_5C == 1) {
if (shot->obj.pos.y < gGroundLevel) {
@@ -1614,7 +1614,7 @@ void func_8003B55C(PlayerShot* shot, s32 index) {
}
}
if (D_80161A88 == 2) {
Object_Kill(&shot->obj, &shot->sfxPos);
Object_Kill(&shot->obj, shot->sfxPos);
return;
}
if (gCurrentLevel == LEVEL_FORTUNA) {
@@ -1635,7 +1635,7 @@ void func_8003B55C(PlayerShot* shot, s32 index) {
}
}
if (shot->unk_64 == 0) {
Object_Kill(&shot->obj, &shot->sfxPos);
Object_Kill(&shot->obj, shot->sfxPos);
return;
} else if ((shot->playerNum < 110) || (shot->unk_64 & 1)) {
func_80038140(shot);
@@ -1682,15 +1682,15 @@ bool func_8003BB4C(PlayerShot* shot) {
var_fa0 = 200.0f;
}
for (i = 0, actor = gActors; i < 60; i++, actor++) {
if ((actor->obj.status == 2) && (actor->info.unk_1C != 0.0f) &&
if ((actor->obj.status == OBJ_ACTIVE) && (actor->info.unk_1C != 0.0f) &&
((actor->timer_0CA[shot->playerNum] == 0) && (fabsf(shot->obj.pos.x - actor->obj.pos.x) <= var_fa0) &&
(fabsf(shot->obj.pos.y - (actor->obj.pos.y + actor->info.unk_1C)) <= var_fa0) &&
(fabsf(shot->obj.pos.z - actor->obj.pos.z) <= var_fa0))) {
actor->timer_0CA[shot->playerNum] = 20;
func_80060F30(gPlayer[shot->playerNum].unk_460_arr, 0x49008027, shot->playerNum);
func_80060F30(gPlayer[shot->playerNum].sfxPos, 0x49008027, shot->playerNum);
for (j = 0; j < ARRAY_COUNT(gPlayerShots); j++) {
if (gPlayerShots[j].obj.id == PLAYERSHOT_4) {
Object_Kill(&gPlayerShots[j].obj, &gPlayerShots[j].sfxPos);
Object_Kill(&gPlayerShots[j].obj, gPlayerShots[j].sfxPos);
}
}
D_801615B8[shot->playerNum] = 3.0f;
@@ -1708,10 +1708,10 @@ bool func_8003BB4C(PlayerShot* shot) {
D_80177B00[0][shot->playerNum] = D_80177B00[1][shot->playerNum] = D_80177B00[2][shot->playerNum] =
D_80177B00[3][shot->playerNum] = 0;
D_80177B00[i][shot->playerNum] = 20;
func_80060F30(gPlayer[shot->playerNum].unk_460_arr, 0x49008027, shot->playerNum);
func_80060F30(gPlayer[shot->playerNum].sfxPos, 0x49008027, shot->playerNum);
for (j = 0; j < ARRAY_COUNT(gPlayerShots); j++) {
if (gPlayerShots[j].obj.id == PLAYERSHOT_4) {
Object_Kill(&gPlayerShots[j].obj, &gPlayerShots[j].sfxPos);
Object_Kill(&gPlayerShots[j].obj, gPlayerShots[j].sfxPos);
}
}
D_801615B8[shot->playerNum] = 3.0f;
@@ -1727,12 +1727,12 @@ void func_8003BEF4(PlayerShot* shot) {
if (gVersusMode) {
if ((shot->obj.pos.y < gGroundLevel) || func_8003BB4C(shot) ||
!(gControllerHold[shot->playerNum].button & A_BUTTON) || (shot->unk_64 == 0)) {
Object_Kill(&shot->obj, &shot->sfxPos);
Object_Kill(&shot->obj, shot->sfxPos);
}
} else {
if ((shot->obj.pos.y < gGroundLevel) || func_8003BB4C(shot) ||
!(gControllerHold[gMainController].button & A_BUTTON) || (shot->unk_64 == 0)) {
Object_Kill(&shot->obj, &shot->sfxPos);
Object_Kill(&shot->obj, shot->sfxPos);
}
}
func_80038140(shot);
@@ -1754,7 +1754,7 @@ void func_8003C008(PlayerShot* shot) {
boss = gBosses;
for (i = 0; i < ARRAY_COUNT(gBosses); i++, boss++) {
if ((boss->obj.status == 2) && (boss->timer_05A == 0)) {
if ((boss->obj.status == OBJ_ACTIVE) && (boss->timer_05A == 0)) {
if (boss->obj.id == OBJ_BOSS_316) {
var_s6 = gGameFrameCount & 7;
var_fs2 = shot->unk_44 * 40.0f;
@@ -1827,7 +1827,7 @@ void func_8003C3D8(PlayerShot* shot) {
Math_SmoothStepToF(&D_8017836C, var_fv0, 1.0f, 0.08f, 0.001f);
}
void func_8003C4D0(PlayerShot* shot, s32 unkD6) {
void func_8003C4D0(PlayerShot* shot, s32 damage) {
s32 i;
f32 sp68;
f32 sp64;
@@ -1841,7 +1841,7 @@ void func_8003C4D0(PlayerShot* shot, s32 unkD6) {
f32 temp_fs2 = shot->unk_44 * 60.0f;
for (i = 0, obj80 = gObjects80; i < 50; i++, obj80++) {
if ((obj80->obj.status == 2) && (obj80->obj.id == OBJ_80_56)) {
if ((obj80->obj.status == OBJ_ACTIVE) && (obj80->obj.id == OBJ_80_56)) {
sp68 = obj80->obj.pos.x - shot->obj.pos.x;
sp64 = obj80->obj.pos.y - shot->obj.pos.y;
sp60 = obj80->obj.pos.z - shot->obj.pos.z;
@@ -1852,8 +1852,8 @@ void func_8003C4D0(PlayerShot* shot, s32 unkD6) {
}
}
for (i = 0, obj4C = gObjects4C; i < 40; i++, obj4C++) {
if ((obj4C->obj.status == 2) && ((obj4C->obj.id == OBJ_4C_163) || (obj4C->obj.id == OBJ_4C_169) ||
(obj4C->obj.id == OBJ_4C_161) || (obj4C->obj.id == OBJ_4C_162))) {
if ((obj4C->obj.status == OBJ_ACTIVE) && ((obj4C->obj.id == OBJ_4C_163) || (obj4C->obj.id == OBJ_4C_169) ||
(obj4C->obj.id == OBJ_4C_161) || (obj4C->obj.id == OBJ_4C_162))) {
sp68 = obj4C->obj.pos.x - shot->obj.pos.x;
sp64 = obj4C->obj.pos.y - shot->obj.pos.y;
sp60 = obj4C->obj.pos.z - shot->obj.pos.z;
@@ -1864,7 +1864,7 @@ void func_8003C4D0(PlayerShot* shot, s32 unkD6) {
}
actor = gActors;
for (i = 0; i < 60; i++, actor++) {
if ((actor->obj.status == 2) && (actor->timer_0C2 == 0) &&
if ((actor->obj.status == OBJ_ACTIVE) && (actor->timer_0C2 == 0) &&
!((gCurrentLevel == LEVEL_MACBETH) && (OBJ_ACTOR_205 <= actor->obj.id) &&
(actor->obj.id < OBJ_ACTOR_214)) &&
!((actor->obj.id == OBJ_ACTOR_200) && (actor->iwork[12] != 0)) &&
@@ -1887,17 +1887,17 @@ void func_8003C4D0(PlayerShot* shot, s32 unkD6) {
actor->unk_0D0 = 2;
actor->unk_0D2 = 0;
actor->unk_0D4 = shot->playerNum + 1;
actor->unk_0D6 = unkD6;
actor->damage = damage;
if (actor->info.bonus != 0) {
shot->bonus++;
}
} else if ((actor->obj.id == OBJ_ACTOR_200) && (actor->scale >= 0.5f) && (unkD6 >= 31)) {
} else if ((actor->obj.id == OBJ_ACTOR_200) && (actor->scale >= 0.5f) && (damage >= 31)) {
actor->unk_0D4 = shot->playerNum + 1;
actor->vel.x = sp68 * 0.03f;
actor->vel.y = sp64 * 0.03f;
actor->vel.z = sp60 * 0.03f;
actor->obj.status = 3;
actor->obj.status = OBJ_DYING;
actor->timer_0BC = (s32) (Rand_ZeroOne() * 15.0f) + 10;
actor->timer_0BE = 0;
actor->timer_04C = 4;
@@ -1909,7 +1909,7 @@ void func_8003C4D0(PlayerShot* shot, s32 unkD6) {
actor->unk_0D0 = 2;
actor->unk_0D2 = 0;
actor->unk_0D4 = shot->playerNum + 1;
actor->unk_0D6 = unkD6;
actor->damage = damage;
if (actor->info.bonus != 0) {
shot->bonus++;
}
@@ -1926,13 +1926,13 @@ void func_8003C4D0(PlayerShot* shot, s32 unkD6) {
}
effect = gEffects;
for (i = 0; i < 100; i++, effect++) {
if (effect->obj.status == 2) {
if (effect->obj.status == OBJ_ACTIVE) {
sp68 = effect->obj.pos.x - shot->obj.pos.x;
sp64 = effect->obj.pos.y - shot->obj.pos.y;
sp60 = effect->obj.pos.z - shot->obj.pos.z;
if (sqrtf(SQ(sp68) + SQ(sp64) + SQ(sp60)) < temp_fs2) {
if (effect->info.unk_16 == 0) {
Object_Kill(&effect->obj, &effect->sfxPos);
Object_Kill(&effect->obj, effect->sfxPos);
}
if (effect->info.unk_16 == 2) {
effect->obj.pos.x += sp68 * 0.03f;
@@ -2009,7 +2009,7 @@ void func_8003CC08(PlayerShot* shot) {
}
}
}
if (!((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (gBosses[0].obj.status == 2) &&
if (!((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (gBosses[0].obj.status == OBJ_ACTIVE) &&
(gBosses[0].actionState == 17))) {
func_80038140(shot);
}
@@ -2038,7 +2038,7 @@ void func_8003CC08(PlayerShot* shot) {
shot->unk_58 -= 8;
if (shot->unk_58 < 0) {
shot->unk_58 = 0;
Object_Kill(&shot->obj, &shot->sfxPos);
Object_Kill(&shot->obj, shot->sfxPos);
D_8017812C = 0;
}
}
@@ -2075,7 +2075,7 @@ void func_8003CF90(PlayerShot* shot) {
var_a3 = 0;
if (shot->unk_60 == 0) {
for (i = 0, actor = gActors; i < 60; i++, actor++) {
if ((actor->obj.status == 2) && (actor->info.unk_1C != 0.0f) &&
if ((actor->obj.status == OBJ_ACTIVE) && (actor->info.unk_1C != 0.0f) &&
(actor->timer_0CA[shot->playerNum] != 0)) {
var_a3 = 1;
actor->timer_0CA[shot->playerNum] = 2;
@@ -2201,7 +2201,7 @@ void func_8003D54C(PlayerShot* shot, s32 index) {
func_80077240(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, bonus);
gHitCount += shot->bonus;
}
if ((shot->bonus >= 7) && (D_80178284 == 0) && (gLevelMode == LEVELMODE_ON_RAILS) &&
if ((shot->bonus >= 7) && (gBossActive == 0) && (gLevelMode == LEVELMODE_ON_RAILS) &&
((gTeamShields[1] > 0) || (gTeamShields[2] > 0) || (gTeamShields[3] > 0))) {
do {
teamId = (s32) (Rand_ZeroOne() * 2.9f) + 1;
@@ -2219,7 +2219,7 @@ void func_8003D54C(PlayerShot* shot, s32 index) {
}
}
}
Object_Kill(&shot->obj, &shot->sfxPos);
Object_Kill(&shot->obj, shot->sfxPos);
func_8007A6F0(&shot->obj.pos, 0x0903502E);
} else if (gCurrentLevel == LEVEL_AQUAS) {
func_i3_801ABA40(shot);
@@ -2292,7 +2292,7 @@ void func_8003DA0C(void) {
Matrix_Pop(&gGfxMatrix);
}
if (D_80161410 > 0) {
func_8005F290(&gPlayerShots[i].sfxPos, &D_8015F950);
func_8005F290(gPlayerShots[i].sfxPos, &D_8015F950);
}
}
}
+3 -3
View File
@@ -534,7 +534,7 @@ void func_8003E1E8(void) {
}
break;
case LEVEL_METEO:
if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) && (D_80177A80 > 260)) {
if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) && (gCsFrameCount > 260)) {
Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f) - 30.0f, -290.0f, 1);
Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 1.0f, 1);
Matrix_SetGfxMtx(&gMasterDisp);
@@ -584,7 +584,7 @@ void func_8003E1E8(void) {
break;
case LEVEL_FORTUNA:
sp128 = 1.5f;
if ((D_80177A80 > 400) && (D_80177930 == 0)) {
if ((gCsFrameCount > 400) && (D_80177930 == 0)) {
sp128 = 0.75f;
}
Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, 1);
@@ -594,7 +594,7 @@ void func_8003E1E8(void) {
break;
case LEVEL_BOLSE:
sp128 = 1.0f;
if ((D_80177A80 > 500) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7)) {
if ((gCsFrameCount > 500) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7)) {
sp128 = 1.3f;
}
Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, 1);
+3 -3
View File
@@ -58,7 +58,7 @@ void func_80042FE8(Boss* boss) {
void func_80042FF4(Actor* actor, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7, f32 arg8,
f32 arg9, f32 argA, s32 argB, s32 argC) {
Actor_Initialize(actor);
actor->obj.status = 1;
actor->obj.status = OBJ_INIT;
actor->obj.id = OBJ_ACTOR_189;
actor->unk_0B8 = argB;
actor->obj.pos.x = arg1;
@@ -84,7 +84,7 @@ void func_800430DC(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f
s32 i;
for (i = 59; i >= 0; i--) {
if (gActors[i].obj.status == 0) {
if (gActors[i].obj.status == OBJ_FREE) {
func_80042FF4(&gActors[i], arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, argA, argB);
return;
}
@@ -99,7 +99,7 @@ void func_8004319C(Player* player, f32 arg1, f32 arg2, f32 arg3) {
func_800182F4(0x105000FF);
func_800182F4(0x115000FF);
D_80177A80 = 0;
gCsFrameCount = 0;
D_80178448 = arg3 + D_80177D20;
D_80178440 = arg1;
D_80178444 = arg2;
+85 -90
View File
File diff suppressed because it is too large Load Diff
+12 -12
View File
@@ -32,7 +32,7 @@ void func_80051B30(void) {
if ((D_80177854 == 0x64) || (D_800CA234 == NULL)) {
return;
}
if ((D_800CA234->obj.status != 2) || (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_3)) {
if ((D_800CA234->obj.status != OBJ_ACTIVE) || (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_3)) {
D_800CA234 = NULL;
D_Timer_800CA238 = 0;
return;
@@ -69,7 +69,7 @@ void func_80051B30(void) {
}
switch (sp7C) {
case 0:
if (D_800CA234->sfxPos.x > 0.0f) {
if (D_800CA234->sfxPos[0] > 0.0f) {
sp78 = 20.0f;
sp74 = M_PI / 2.0f;
} else {
@@ -1440,16 +1440,16 @@ void func_80057814(Player* player) {
sp20.x = player->pos.x;
sp20.y = player->pos.y;
sp20.z = player->unk_138;
sp2C.x = player->unk_460.x;
sp2C.y = player->unk_460.y;
sp2C.z = player->unk_460.z;
func_8005F0E8(&player->unk_460, &sp20);
player->unk_46C.x = player->unk_460.x - sp2C.x;
player->unk_46C.y = player->unk_460.y - sp2C.y;
player->unk_46C.z = player->unk_460.z - sp2C.z;
player->unk_480 = &player->unk_46C;
player->unk_47C = &player->unk_460;
player->unk_488 = player->vel.y;
sp2C.x = player->sfxPos[0];
sp2C.y = player->sfxPos[1];
sp2C.z = player->sfxPos[2];
func_8005F0E8(player->sfxPos, &sp20);
player->sfxVel[0] = player->sfxPos[0] - sp2C.x;
player->sfxVel[1] = player->sfxPos[1] - sp2C.y;
player->sfxVel[2] = player->sfxPos[2] - sp2C.z;
player->srcVel = player->sfxVel;
player->srcPos = player->sfxPos;
player->yVel = player->vel.y;
player->unk_490 = player->unk_0F8;
}
+59 -63
View File
@@ -425,7 +425,7 @@ void func_8005ADAC(Actor* actor) {
f32 sp54;
s32 pad[5]; // fake? seems like a lot of padding
if ((actor->iwork[11] != 0) && (actor->obj.status == 2)) {
if ((actor->iwork[11] != 0) && (actor->obj.status == OBJ_ACTIVE)) {
temp1 = 652.5f * 0.001f; // 0.65250003f;
if (actor->iwork[11] >= 2) {
temp1 = 1.3050001f;
@@ -483,7 +483,7 @@ f32 D_800CFCA0[] = {
void func_8005B1E8(Actor* actor, s32 levelType) {
f32 scale;
if ((actor->iwork[11] != 0) && (actor->obj.status == 2)) {
if ((actor->iwork[11] != 0) && (actor->obj.status == OBJ_ACTIVE)) {
scale = 0.63f;
if (actor->iwork[11] >= 2) {
scale = D_800CFCA0[actor->iwork[11] - 2] * 0.45f;
@@ -508,7 +508,7 @@ void func_8005B388(Actor* actor) {
Vec3f sp30;
Matrix_MultVec3f(gGfxMatrix, &sp3C, &sp30);
if ((((fabsf(sp30.z) < 3000.0f) && (fabsf(sp30.x) < 3000.0f) && (D_80178284 == 0)) ||
if ((((fabsf(sp30.z) < 3000.0f) && (fabsf(sp30.x) < 3000.0f) && (gBossActive == 0)) ||
(gPlayer[0].state_1C8 == PLAYERSTATE_1C8_0) || (gCurrentLevel == LEVEL_VENOM_ANDROSS) ||
(gCurrentLevel == LEVEL_VENOM_2) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7)) &&
(gCurrentLevel != LEVEL_MACBETH) && (gCurrentLevel != LEVEL_TITANIA)) {
@@ -1012,10 +1012,10 @@ void Actor_Draw2(Actor* actor) {
}
if (actor->info.drawType == 0) {
gSPDisplayList(gMasterDisp++, actor->info.dList);
func_8005F1EC(&actor->sfxPos);
func_8005F1EC(actor->sfxPos);
} else {
actor->info.draw(&actor->obj);
func_8005F1EC(&actor->sfxPos);
func_8005F1EC(actor->sfxPos);
if (((actor->obj.id == OBJ_ACTOR_198) || ((actor->obj.id == OBJ_ACTOR_203) && (actor->unk_0B6 > 0))) &&
(D_80161410 > 0)) {
Matrix_MultVec3f(gGfxMatrix, &sp34, &D_80177E98[actor->unk_0E4]);
@@ -1108,7 +1108,7 @@ void Actor_Draw1(Actor* actor) {
if (D_801615EC == 0) {
actor->timer_0CA[gPlayerNum] = 0;
if ((actor->obj.id == OBJ_ACTOR_189) || (actor->obj.id == OBJ_ACTOR_286)) {
Object_Kill(&actor->obj, &actor->sfxPos);
Object_Kill(&actor->obj, actor->sfxPos);
}
}
for (var_v1 = 0; var_v1 < gCamCount; var_v1++) {
@@ -1120,7 +1120,7 @@ void Actor_Draw1(Actor* actor) {
}
}
}
func_8005F290(&actor->sfxPos, &D_801615E0);
func_8005F290(actor->sfxPos, &D_801615E0);
actor->iwork[24] = D_801615EC;
}
@@ -1140,7 +1140,7 @@ void Boss_Draw(Boss* boss, s32 arg1) {
func_8005D1F0(&boss->obj, boss->info.drawType);
}
Matrix_MultVec3f(&D_801615F0, &sp30, &D_801615D0);
func_8005F290(&boss->sfxPos, &D_801615D0);
func_8005F290(boss->sfxPos, &D_801615D0);
if ((boss->obj.id == OBJ_BOSS_316) || (boss->obj.id == OBJ_BOSS_317)) {
var_fa1 = 6000.0f;
var_fv0 = 6000.0f;
@@ -1236,9 +1236,9 @@ void Effect_Draw2(Effect* effect) {
}
}
}
func_8005F290(&effect->sfxPos, &sp40);
func_8005F290(effect->sfxPos, &sp40);
if ((sp3B == 0) && (effect->obj.id != OBJ_EFFECT_352) && (effect->obj.id != OBJ_EFFECT_373) && (!gVersusMode)) {
Object_Kill(&effect->obj, &effect->sfxPos);
Object_Kill(&effect->obj, effect->sfxPos);
}
}
@@ -1268,10 +1268,10 @@ void Item_Draw(Item* item, s32 arg1) {
}
}
}
func_8005F290(&item->sfxPos, &sp38);
func_8005F290(item->sfxPos, &sp38);
if ((var_v0 == 0) && (gLevelMode == LEVELMODE_ALL_RANGE) && (gCamCount == 1) && (item->obj.id < 336) &&
(gCurrentLevel != LEVEL_VENOM_ANDROSS)) {
Object_Kill(&item->obj, &item->sfxPos);
Object_Kill(&item->obj, item->sfxPos);
}
}
@@ -1344,76 +1344,72 @@ void func_8005ECD8(s32 index, Object* obj) {
}
}
void func_8005F030(Vec3f* arg0) {
if (arg0->x > 5000.0f) {
arg0->x = 5000.0f;
void func_8005F030(f32* sfxSrc) {
if (sfxSrc[0] > 5000.0f) {
sfxSrc[0] = 5000.0f;
}
if (arg0->x < -5000.0f) {
arg0->x = -5000.0f;
if (sfxSrc[0] < -5000.0f) {
sfxSrc[0] = -5000.0f;
}
if (arg0->y > 2000.0f) {
arg0->y = 2000.0f;
if (sfxSrc[1] > 2000.0f) {
sfxSrc[1] = 2000.0f;
}
if (arg0->y < -2000.0f) {
arg0->y = -2000.0f;
if (sfxSrc[1] < -2000.0f) {
sfxSrc[1] = -2000.0f;
}
if (arg0->z > 5000.0f) {
arg0->z = 5000.0f;
if (sfxSrc[2] > 5000.0f) {
sfxSrc[2] = 5000.0f;
}
if (arg0->z < -5000.0f) {
arg0->z = -5000.0f;
if (sfxSrc[2] < -5000.0f) {
sfxSrc[2] = -5000.0f;
}
}
void func_8005F0E8(Vec3f* arg0, Vec3f* arg1) {
void func_8005F0E8(f32* sfxSrc, Vec3f* pos) {
Vec3f sp2C;
Vec3f sp20;
if (gCamCount != 1) {
arg0->x = arg0->y = arg0->z = 0.0f;
sfxSrc[0] = sfxSrc[1] = sfxSrc[2] = 0.0f;
} else {
Matrix_RotateY(gCalcMatrix, gPlayer[0].unk_058, 0);
Matrix_RotateX(gCalcMatrix, gPlayer[0].unk_05C, 1);
sp2C.x = arg1->x - D_801779D8.x;
sp2C.y = arg1->y - D_801779D8.y;
sp2C.z = arg1->z + D_80177D20 - D_801779D8.z;
sp2C.x = pos->x - D_801779D8.x;
sp2C.y = pos->y - D_801779D8.y;
sp2C.z = pos->z + D_80177D20 - D_801779D8.z;
Matrix_MultVec3f(gCalcMatrix, &sp2C, &sp20);
arg0->x = sp20.x;
arg0->y = sp20.y;
arg0->z = sp20.z;
sfxSrc[0] = sp20.x;
sfxSrc[1] = sp20.y;
sfxSrc[2] = sp20.z;
}
func_8005F030(arg0);
func_8005F030(sfxSrc);
}
// check
void func_8005F1EC(Vec3f* arg0) {
void func_8005F1EC(f32* sfxSrc) {
Vec3f sp2C = { 0.0f, 0.0f, 0.0f };
Vec3f sp20;
s32 pad;
if (gCamCount != 1) {
arg0->z = 0.0f;
arg0->y = 0.0f;
arg0->x = 0.0f;
sfxSrc[0] = sfxSrc[1] = sfxSrc[2] = 0.0f;
} else {
Matrix_MultVec3f(&D_801615F0, &sp2C, &sp20);
arg0->x = sp20.x;
arg0->y = sp20.y;
arg0->z = sp20.z;
sfxSrc[0] = sp20.x;
sfxSrc[1] = sp20.y;
sfxSrc[2] = sp20.z;
}
func_8005F030(arg0);
func_8005F030(sfxSrc);
}
void func_8005F290(Vec3f* arg0, Vec3f* arg1) {
void func_8005F290(f32* sfxSrc, Vec3f* pos) {
if (gCamCount != 1) {
arg0->z = 0.0f;
arg0->y = 0.0f;
arg0->x = 0.0f;
sfxSrc[0] = sfxSrc[1] = sfxSrc[2] = 0.0f;
} else {
arg0->x = arg1->x;
arg0->y = arg1->y;
arg0->z = arg1->z;
sfxSrc[0] = pos->x;
sfxSrc[1] = pos->y;
sfxSrc[2] = pos->z;
}
func_8005F030(arg0);
func_8005F030(sfxSrc);
}
void Object_58_Draw(Object_58* obj58) {
@@ -1551,11 +1547,11 @@ void Object_DrawAll(s32 arg0) {
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
}
for (i = 0, obj58 = gObjects58; i < 200; i++, obj58++) {
if ((obj58->obj.status == 2) && (obj58->obj.id != OBJ_80_147)) {
if ((obj58->obj.status == OBJ_ACTIVE) && (obj58->obj.id != OBJ_80_147)) {
if (gCurrentLevel == LEVEL_BOLSE) {
spAC.x = obj58->sfxPos.x;
spAC.y = obj58->sfxPos.y;
spAC.z = obj58->sfxPos.z;
spAC.x = obj58->sfxPos[0];
spAC.y = obj58->sfxPos[1];
spAC.z = obj58->sfxPos[2];
Matrix_MultVec3fNoTranslate(&D_i4_8019EE80, &spAC, &obj58->obj.pos);
obj58->obj.rot.y = gBosses[0].obj.rot.y + (*obj58).unk_54;
}
@@ -1567,19 +1563,19 @@ void Object_DrawAll(s32 arg0) {
} else {
RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
for (i = 0, obj80 = gObjects80; i < ARRAY_COUNT(gObjects80); i++, obj80++) {
if (obj80->obj.status >= 2) {
if (obj80->obj.status >= OBJ_ACTIVE) {
if (arg0 > 0) {
func_8005F670(&obj80->obj.pos);
}
Matrix_Push(&gGfxMatrix);
Object_80_Draw(obj80, arg0);
Matrix_Pop(&gGfxMatrix);
func_8005F1EC(&obj80->sfxPos);
func_8005F1EC(obj80->sfxPos);
}
}
}
for (i = 0, boss = gBosses; i < ARRAY_COUNT(gBosses); i++, boss++) {
if ((boss->obj.status >= 2) && (boss->obj.id != OBJ_BOSS_310)) {
if ((boss->obj.status >= OBJ_ACTIVE) && (boss->obj.id != OBJ_BOSS_310)) {
if (!(boss->timer_05C & 1)) {
RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
} else {
@@ -1600,7 +1596,7 @@ void Object_DrawAll(s32 arg0) {
Lights_SetOneLight(&gMasterDisp, gLight1x, gLight1y, gLight1z, gLight1R, gLight1G, gLight1B, gAmbientR, gAmbientG,
gAmbientB);
for (i = 0, obj4C = gObjects4C; i < ARRAY_COUNT(gObjects4C); i++, obj4C++) {
if ((obj4C->obj.status >= 2) && func_80060FE4(&obj4C->obj.pos, -12000.0f)) {
if ((obj4C->obj.status >= OBJ_ACTIVE) && func_80060FE4(&obj4C->obj.pos, -12000.0f)) {
Matrix_Push(&gGfxMatrix);
if ((obj4C->obj.id == OBJ_4C_165) || (obj4C->obj.id == OBJ_4C_166)) {
RCP_SetupDL_57(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
@@ -1612,7 +1608,7 @@ void Object_DrawAll(s32 arg0) {
}
}
for (i = 0, actor = gActors; i < ARRAY_COUNT(gActors); i++, actor++) {
if (actor->obj.status >= 2) {
if (actor->obj.status >= OBJ_ACTIVE) {
if (!(actor->timer_0C6 & 1)) {
if (gCurrentLevel == LEVEL_UNK_15) {
RCP_SetupDL_23();
@@ -1662,7 +1658,7 @@ void Object_DrawAll(s32 arg0) {
gSPFogPosition(gMasterDisp++, gFogNear, gFogFar);
Lights_SetOneLight(&gMasterDisp, -60, -60, 60, 150, 150, 150, 20, 20, 20);
for (i = 0, item = gItems; i < ARRAY_COUNT(gItems); i++, item++) {
if (item->obj.status >= 2) {
if (item->obj.status >= OBJ_ACTIVE) {
Matrix_Push(&gGfxMatrix);
RCP_SetupDL(&gMasterDisp, 0x1D);
func_800597C0(arg0);
@@ -1681,7 +1677,7 @@ void func_8006046C(s32 arg0) {
RCP_SetupDL(&gMasterDisp, 0x40);
for (i = 0, effect = gEffects; i < ARRAY_COUNT(gEffects); i++, effect++) {
if (effect->obj.status >= 2) {
if (effect->obj.status >= OBJ_ACTIVE) {
if (effect->info.unk_14 == 1) {
effect->obj.rot.y = (-gPlayer[gPlayerNum].unk_058 * 180.0f) / M_PI;
effect->obj.rot.x = (gPlayer[gPlayerNum].unk_05C * 180.0f) / M_PI;
@@ -1694,7 +1690,7 @@ void func_8006046C(s32 arg0) {
Matrix_Push(&gGfxMatrix);
Effect_Draw1(effect, arg0);
Matrix_Pop(&gGfxMatrix);
func_8005F1EC(&effect->sfxPos);
func_8005F1EC(effect->sfxPos);
if (effect->obj.id == OBJ_EFFECT_374) {
Matrix_Push(&gGfxMatrix);
func_8005ECD8(i, &effect->obj);
@@ -1704,7 +1700,7 @@ void func_8006046C(s32 arg0) {
}
}
for (i = 0, boss = gBosses; i < ARRAY_COUNT(gBosses); i++, boss++) {
if ((boss->obj.status >= 2) && (boss->obj.id == OBJ_BOSS_310)) {
if ((boss->obj.status >= OBJ_ACTIVE) && (boss->obj.id == OBJ_BOSS_310)) {
if (!(boss->timer_05C & 1)) {
RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
} else {
+190 -190
View File
File diff suppressed because it is too large Load Diff
+160 -163
View File
File diff suppressed because it is too large Load Diff
+136 -137
View File
File diff suppressed because it is too large Load Diff
+5 -5
View File
@@ -383,9 +383,9 @@ void func_800A26C0(void) {
gCamCount = 1;
gLifeCount[0] = 2;
D_80177D20 = 0.0f;
D_8016170C = D_80177A80 = D_80177830 = D_80177838 = D_80177840 = D_80178754 = gVersusMode = D_80177AE0 =
D_80178410 = D_80177B40 = D_80177854 = gOptionMenuStatus = gDrawMode = gShowBossHealth =
D_80161A2C = gBgColor = D_80178340 = 0;
D_8016170C = gCsFrameCount = D_80177830 = D_80177838 = D_80177840 = D_80178754 = gVersusMode =
D_80177AE0 = D_80178410 = D_80177B40 = D_80177854 = gOptionMenuStatus = gDrawMode =
gShowBossHealth = D_80161A2C = gBgColor = D_80178340 = 0;
gNextGameState = D_80177C94 = D_80177CAC = D_80177CB4 = D_80177CBC = D_80177CC4 = D_80177C9C =
D_80177CA4 = D_80161A5C = D_80161A34 = 0;
for (i = 0; i < 4; i++) {
@@ -545,9 +545,9 @@ Actor* func_800A3608(s32 arg0) {
s32 i;
for (i = 0; i < ARRAY_COUNT(gActors); i++, actor++) {
if (actor->obj.status == 0) {
if (actor->obj.status == OBJ_FREE) {
Actor_Initialize(actor);
actor->obj.status = 1;
actor->obj.status = OBJ_INIT;
actor->obj.id = arg0;
Object_SetInfo(&actor->info, actor->obj.id);
break;
+95 -97
View File
File diff suppressed because it is too large Load Diff
+122 -123
View File
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -593,7 +593,7 @@ void func_800BB5D0(void) {
if ((D_801782E8 >= 23000) && (D_801782E8 < 23033)) {
if (D_801782F8 != 0) {
D_Timer_801782B4 = 2;
Audio_PlaySfx(0x49000017, &D_800C5D28, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
Audio_PlaySfx(0x49000017, D_800C5D28, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
}
} else if (temp_v0 == 1) {
D_Timer_801782B4 = 2;
@@ -718,7 +718,7 @@ void func_800BB5D0(void) {
break;
}
if ((gActors[var_v1].obj.status != 2) && (gGameFrameCount & 4) &&
if ((gActors[var_v1].obj.status != OBJ_ACTIVE) && (gGameFrameCount & 4) &&
(gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) && (D_801782A4 != 2) && (D_801782A4 != 3) &&
(D_801782A4 != 1000)) {
RCP_SetupDL(&gMasterDisp, 0x4C);
@@ -726,7 +726,7 @@ void func_800BB5D0(void) {
Graphics_DisplaySmallText(31, 167, 1.0f, 1.0f, "DOWN");
}
if (((D_801782A4 != 2) && (D_801782A4 != 3)) && (D_801782A4 != 1000)) {
func_80086110(22.0f, 165.0f, gActors[var_v1].unk_0CE * 2.55f);
func_80086110(22.0f, 165.0f, gActors[var_v1].health * 2.55f);
}
}
if (((D_801782A4 != 2) && (D_801782A4 != 3)) && (D_801782A4 != 1000)) {
+34 -34
View File
@@ -137,7 +137,7 @@ void func_800438E0(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale) {
f32 pad[12];
Effect_Initialize(effect);
effect->obj.status = 2;
effect->obj.status = OBJ_ACTIVE;
effect->obj.id = OBJ_EFFECT_357;
effect->obj.pos.x = xPos;
effect->obj.pos.y = yPos;
@@ -158,7 +158,7 @@ void func_80043AA0(f32 xPos, f32 yPos, f32 zPos, f32 scale) {
s32 i;
for (i = 50; i >= 0; i--) {
if (gEffects[i].obj.status == 0) {
if (gEffects[i].obj.status == OBJ_FREE) {
func_800438E0(&gEffects[i], xPos, yPos, zPos, scale);
break;
}
@@ -304,7 +304,7 @@ void func_800443DC(Player* player) {
s32 i;
for (i = 0, obj80 = gObjects80; i < ARRAY_COUNT(gObjects80); i++, obj80++) {
if ((obj80->obj.status == 2) && (obj80->obj.id == OBJ_80_58) &&
if ((obj80->obj.status == OBJ_ACTIVE) && (obj80->obj.id == OBJ_80_58) &&
((player->unk_138 - 2000.0f) < obj80->obj.pos.z)) {
func_800441C8(player, obj80->info.hitbox, obj80->obj.pos.x, obj80->obj.pos.y, obj80->obj.pos.z,
obj80->obj.rot.x, obj80->obj.rot.y, obj80->obj.rot.z);
@@ -341,7 +341,7 @@ void func_800444BC(Player* player) {
}
if ((player->pos.y - sp30) < sp38) {
if (player->vel.y < -10.0f) {
Audio_PlaySfx(0x09008015, &player->unk_460, 0, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
Audio_PlaySfx(0x09008015, player->sfxPos, 0, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
}
player->unk_1D4 = 1;
if (player->vel.y < -20.0f) {
@@ -507,7 +507,7 @@ void func_80044868(Player* player) {
}
if (player->unk_0D0 > 0.0f) {
Texture_Scroll(D_3002E80, 0x20, 0x20, 0);
if ((gCurrentLevel == LEVEL_TITANIA) && (D_80178284 == 0)) {
if ((gCurrentLevel == LEVEL_TITANIA) && (gBossActive == 0)) {
func_80043280(D_3005EA8, D_6009BB8, gGameFrameCount * -55.0f);
}
if ((gCurrentLevel == LEVEL_MACBETH) && (player->state_1C8 == PLAYERSTATE_1C8_7)) {
@@ -516,7 +516,7 @@ void func_80044868(Player* player) {
}
if (player->unk_0D0 > 10.0f) {
Texture_Scroll(D_3002E80, 0x20, 0x20, 0);
if ((gCurrentLevel == LEVEL_TITANIA) && (D_80178284 == 0)) {
if ((gCurrentLevel == LEVEL_TITANIA) && (gBossActive == 0)) {
func_80043280(D_3005EA8, D_6009BB8, gGameFrameCount * -55.0f);
}
}
@@ -534,7 +534,7 @@ void func_80045130(Player* player) {
player->unk_1F0 = 20;
player->unk_1EC = 20;
player->unk_494 = 1;
Audio_PlaySfx(0x1100000A, &player->unk_460, 0, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
Audio_PlaySfx(0x1100000A, player->sfxPos, 0, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
} else {
player->timer_1E0 = 10;
}
@@ -547,7 +547,7 @@ void func_80045130(Player* player) {
player->unk_1F0 = -20;
player->unk_1EC = -20;
player->unk_494 = 1;
Audio_PlaySfx(0x1100000A, &player->unk_460, 0, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
Audio_PlaySfx(0x1100000A, player->sfxPos, 0, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
} else {
player->timer_1E4 = 10;
}
@@ -571,7 +571,7 @@ void func_80045348(Player* player) {
sp2E = true;
if (D_800C9F24 == 0.0f) {
player->unk_190 = player->unk_194 = 4.0f;
Audio_PlaySfx(0x0900402F, &player->unk_460, 0, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
Audio_PlaySfx(0x0900402F, player->sfxPos, 0, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
} else {
player->unk_190 = 2.0f;
}
@@ -613,13 +613,13 @@ void func_80045678(Player* player) {
player->unk_0D4 = 3.0f;
if (!(gInputHold->button & Z_TRIG)) {
func_8001A55C(&player->unk_460, 0x01008016);
func_8001A55C(&player->unk_460, 0x1100000A);
func_8001A55C(player->sfxPos, 0x01008016);
func_8001A55C(player->sfxPos, 0x1100000A);
}
if ((gInputHold->button & Z_TRIG) && !player->unk_2B4) {
D_800C9F14++;
if (D_800C9F20 == 0.0f) {
Audio_PlaySfx(0x01004024, &player->unk_460, 0, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
Audio_PlaySfx(0x01004024, player->sfxPos, 0, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
}
player->unk_188 = 0.0f;
player->unk_12C += 4.0f;
@@ -643,13 +643,13 @@ void func_80045678(Player* player) {
D_800C9F20 = 0.0f;
}
if (!(gInputHold->button & R_TRIG)) {
func_8001A55C(&player->unk_460, 0x01008016);
func_8001A55C(&player->unk_460, 0x1100000A);
func_8001A55C(player->sfxPos, 0x01008016);
func_8001A55C(player->sfxPos, 0x1100000A);
}
if ((gInputHold->button & R_TRIG) && !player->unk_2B4) {
D_800C9F14++;
if (player->unk_2C0 == 0.0f) {
Audio_PlaySfx(0x01004024, &player->unk_460, 0, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
Audio_PlaySfx(0x01004024, player->sfxPos, 0, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
}
player->unk_188 = 0.0f;
player->unk_12C -= 4.0f;
@@ -676,9 +676,9 @@ void func_80045678(Player* player) {
if ((player->unk_16C > 0.2f) && (player->unk_170 > 0.2f) && (player->timer_220 == 0)) {
if (D_800C9F3C == 0) {
D_800C9F3C = 1;
func_8001A55C(&player->unk_460, 0x1100000A);
func_8001A55C(&player->unk_460, 0x01004024);
Audio_PlaySfx(0x01008016, &player->unk_460, 0, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
func_8001A55C(player->sfxPos, 0x1100000A);
func_8001A55C(player->sfxPos, 0x01004024);
Audio_PlaySfx(0x01008016, player->sfxPos, 0, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
}
player->unk_12C += ((__cosf(gGameFrameCount * M_DTOR * 8.0f) * 10.0f) - player->unk_12C) * 0.1f;
temp = -gInputPress->stick_y;
@@ -762,7 +762,7 @@ void func_80045E7C(Player* player) {
}
if (player->unk_1EC == 0) {
player->unk_1DC = 0;
func_8001A55C(&player->unk_460, 0x1100000A);
func_8001A55C(player->sfxPos, 0x1100000A);
}
}
if ((player->timer_1E8 >= 5) && (player->unk_1F4 == 0) && (player->unk_1DC != 9)) {
@@ -809,7 +809,7 @@ void func_80046260(Player* player) {
s32 i;
for (i = 0, obj80 = gObjects80; i < ARRAY_COUNT(gObjects80); i++, obj80++) {
if ((obj80->obj.status == 2) && (obj80->obj.id == OBJ_80_58) &&
if ((obj80->obj.status == OBJ_ACTIVE) && (obj80->obj.id == OBJ_80_58) &&
((player->unk_138 - 2000.0f) < obj80->obj.pos.z) && (obj80->obj.pos.y < player->pos.y)) {
func_800460E0(player, obj80->info.hitbox, obj80->obj.pos.x, obj80->obj.pos.y, obj80->obj.pos.z,
obj80->obj.rot.x, obj80->obj.rot.y, obj80->obj.rot.z);
@@ -904,7 +904,7 @@ void func_80046704(Player* player) {
}
if (1) {}
for (i = 0, obj80 = gObjects80; i < ARRAY_COUNT(gObjects80); i++, obj80++) {
if ((obj80->obj.status == 2) && ((player->unk_138 - 2000.0f) < obj80->obj.pos.z)) {
if ((obj80->obj.status == OBJ_ACTIVE) && ((player->unk_138 - 2000.0f) < obj80->obj.pos.z)) {
if ((obj80->obj.id == OBJ_80_69) || (obj80->obj.id == OBJ_80_70) || (obj80->obj.id == OBJ_80_71) ||
(obj80->obj.id == OBJ_80_72) || (obj80->obj.id == OBJ_80_73) || (obj80->obj.id == OBJ_80_67)) {
temp1 = obj80->obj.pos.x - player->pos.x;
@@ -957,7 +957,7 @@ void func_80046704(Player* player) {
player->unk_0D0 = -(D_800C9F00 * 1.5f);
player->vel.z = D_800C9F00 * 1.5f;
D_800C9F00 = 12;
Audio_PlaySfx(0x09008015, &player->unk_460, 0, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
Audio_PlaySfx(0x09008015, player->sfxPos, 0, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
break;
}
if (obj80->obj.id == OBJ_80_59) {
@@ -1136,14 +1136,14 @@ void func_80047504(Player* player) {
if (player->unk_2BC > 90.0f) {
player->unk_2BC = 90.0f;
player->unk_2B4 = true;
func_8001A55C(&player->unk_460, 0x01004024);
func_8001A55C(&player->unk_460, 0x01008016);
func_8001A55C(player->sfxPos, 0x01004024);
func_8001A55C(player->sfxPos, 0x01008016);
}
} else {
if (player->unk_2BC > 0.0f) {
player->unk_2B4 = true;
func_8001A55C(&player->unk_460, 0x01004024);
func_8001A55C(&player->unk_460, 0x01008016);
func_8001A55C(player->sfxPos, 0x01004024);
func_8001A55C(player->sfxPos, 0x01008016);
}
}
} else {
@@ -1263,7 +1263,7 @@ void func_80047D38(Player* player, f32 arg1) {
}
if ((player->pos.y - 5.0f) < arg1) {
if (player->vel.y < -10.0f) {
Audio_PlaySfx(0x09008015, &player->unk_460, 0, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
Audio_PlaySfx(0x09008015, player->sfxPos, 0, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
player->unk_1F4 = 10;
}
D_800C9F04 = 1;
@@ -1310,7 +1310,7 @@ void func_80047FBC(Player* player) {
Math_SmoothStepToF(&player->unk_0EC, -((player->vel.z / 5.0f) * 4.0f), 0.4f, 8.0f, 0.01f);
if (player->unk_0EC >= 3.0f) {
if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_7) {
Audio_PlaySfx(0x19000065, &player->unk_460, 0, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
Audio_PlaySfx(0x19000065, player->sfxPos, 0, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
}
D_800C9F08 |= 1;
}
@@ -1353,7 +1353,7 @@ void func_800481F4(Player* player) {
func_800444BC(player);
if (player->timer_498 == 0) {
for (i = 0, obj80 = gObjects80; i < ARRAY_COUNT(gObjects80); i++, obj80++) {
if ((obj80->obj.status == 2) && (obj80->obj.id != OBJ_80_58) && (obj80->obj.id != OBJ_80_105) &&
if ((obj80->obj.status == OBJ_ACTIVE) && (obj80->obj.id != OBJ_80_58) && (obj80->obj.id != OBJ_80_105) &&
(obj80->obj.id != OBJ_80_59) && (obj80->obj.id != OBJ_80_60) && (obj80->obj.id != OBJ_80_63) &&
(obj80->obj.id != OBJ_80_66) && (obj80->obj.id != OBJ_80_67) && (obj80->obj.id != OBJ_80_68) &&
(obj80->obj.id != OBJ_80_70) && (obj80->obj.id != OBJ_80_72) && (obj80->obj.id != OBJ_80_71) &&
@@ -1375,14 +1375,14 @@ void func_800481F4(Player* player) {
D_80178578 = 20;
player->unk_23C = 80;
if (player->unk_22C == 0) {
Audio_PlaySfx(0x19000001, &player->unk_460, 0, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
Audio_PlaySfx(0x19000001, player->sfxPos, 0, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
}
player->unk_22C += 2;
if (player->unk_22C >= 4) {
player->unk_22C = 4;
}
} else if (temp_v0 == -2) {
Audio_PlaySfx(0x19000001, &player->unk_460, 0, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
Audio_PlaySfx(0x19000001, player->sfxPos, 0, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
}
} else {
Player_ApplyDamage(player, temp_v0, obj80->info.damage);
@@ -1392,7 +1392,7 @@ void func_800481F4(Player* player) {
}
for (i = 0, boss = gBosses; i < ARRAY_COUNT(gBosses); i++, boss++) {
if (boss->obj.status == 2) {
if (boss->obj.status == OBJ_ACTIVE) {
temp_v0 =
func_800A7974(player, boss->info.hitbox, &sp98, boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z,
boss->obj.rot.x, boss->obj.rot.y, boss->obj.rot.z, 0.0f, 0.0f, 0.0f);
@@ -1403,7 +1403,7 @@ void func_800481F4(Player* player) {
}
for (i = 0, actor = gActors; i < ARRAY_COUNT(gActors); i++, actor++) {
if ((actor->obj.status == 2) && (actor->timer_0C2 == 0)) {
if ((actor->obj.status == OBJ_ACTIVE) && (actor->timer_0C2 == 0)) {
if (actor->obj.id == OBJ_ACTOR_200) {
temp_v0 =
func_800A7974(player, actor->info.hitbox, &sp98, actor->obj.pos.x, actor->obj.pos.y,
@@ -1487,7 +1487,7 @@ void func_800481F4(Player* player) {
}
}
for (i = 0, obj4C = gObjects4C; i < ARRAY_COUNT(gObjects4C); i++, obj4C++) {
if (obj4C->obj.status == 2) {
if (obj4C->obj.status == OBJ_ACTIVE) {
if ((player->unk_138 - 200.0f) < obj4C->obj.pos.z) {
temp_v0 = func_800A7974(player, obj4C->info.hitbox, &sp98, obj4C->obj.pos.x, obj4C->obj.pos.y,
obj4C->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);

Some files were not shown because too many files have changed in this diff Show More