Actor Docs (#270)

* Docs

* actor timer_04C -> work_04C

* Actor & Boss unk_04A -> work_04A

* actor & boss unk_048 -> work_048

* actor & boss unk_046 -> work_046

* boss unk_044 -> work_044

* actor event docs

* ActorEvent docs

* name all Event Actor IDs

* EVID names in EventActorInfo comments

* refactor EVC_PASSED_ALL_RINGS by @inspectredc

* clarification comment

* some option docs

* audio enums and macros

* some audio renamings
This commit is contained in:
Alejandro Asenjo Nitti
2024-08-24 19:36:53 -03:00
committed by GitHub
parent 669fff8759
commit e82019fa2b
95 changed files with 2126 additions and 1960 deletions
+97 -77
View File
@@ -295,8 +295,8 @@ void ActorAllRange_SetShadowData(Actor* this) {
Vec3f temp1;
f32 temp4;
f32 temp5;
Vec3f spE4;
Vec3f spD8;
Vec3f src;
Vec3f dest;
Vec3f spCC;
Vec3f spC0;
Vec3f spB4;
@@ -306,6 +306,7 @@ void ActorAllRange_SetShadowData(Actor* this) {
s32 pad[2];
this->fwork[25] = this->fwork[26] = this->fwork[28] = this->fwork[27] = 0.0f;
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) &&
@@ -321,17 +322,17 @@ void ActorAllRange_SetShadowData(Actor* this) {
temp4 = scenery360->obj.rot.y;
Matrix_RotateY(gCalcMatrix, -temp4 * M_DTOR, MTXF_NEW);
spE4.x = this->obj.pos.x - temp1.x;
spE4.y = 0.0f;
spE4.z = this->obj.pos.z - temp1.z;
Matrix_MultVec3fNoTranslate(gCalcMatrix, &spE4, &spD8);
src.x = this->obj.pos.x - temp1.x;
src.y = 0.0f;
src.z = this->obj.pos.z - temp1.z;
Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest);
spC0.x = temp1.x;
spC0.y = temp1.y;
spCC.x = spD8.x + temp1.x;
spCC.x = dest.x + temp1.x;
spC0.z = temp1.z; // fake? weird ordering
spCC.y = spD8.y + temp1.y;
spCC.z = spD8.z + temp1.z;
spCC.y = dest.y + temp1.y;
spCC.z = dest.z + temp1.z;
if ((scenery360->obj.id == OBJ_SCENERY_FO_MOUNTAIN_2) ||
(scenery360->obj.id == OBJ_SCENERY_FO_MOUNTAIN_3)) {
@@ -618,7 +619,11 @@ void ActorAllRange_UpdateEnemyEvents(Actor* this) {
ActorAllRange* enemy2;
s32 j;
#ifdef AVOID_UB
for (j = 0, enemy2 = &gActors[AI360_ENEMY]; j < 50; j++, enemy2++) {
#else
for (j = 0, enemy2 = &gActors[AI360_ENEMY]; j <= 50; j++, enemy2++) { // bug? should be <
#endif
if ((enemy2->obj.status == OBJ_ACTIVE) && (enemy2->state == STATE360_2) &&
(enemy2->aiIndex == enemy->aiIndex)) {
return;
@@ -742,7 +747,14 @@ void ActorAllRange_UpdateEvents(Actor* this) {
ActorAllRange_SpawnSupplies(this);
}
s32 func_360_800301F4(Actor* this) {
/**
* Checks whether an actor is close to Scenery objects or Bosses in Space Levels.
* Return values:
* 1: Object nearby is found below the actor
* -1: Object nearby is found above the actor
* 0: No objects found
*/
s32 ActorAllRange_CheckObjectNearbySpace(Actor* this) {
Boss* boss;
f32 temp_ft4;
f32 temp_ft5;
@@ -775,6 +787,7 @@ s32 func_360_800301F4(Actor* this) {
}
boss = &gBosses[0];
// Check if the actor is close to the Great Fox in Sector Z.
if ((gCurrentLevel == LEVEL_SECTOR_Z) && (fabsf(boss->obj.pos.x - (this->obj.pos.x + temp_ft4)) < 2000.0f) &&
(fabsf(boss->obj.pos.z - (this->obj.pos.z + temp_ft5)) < 2000.0f)) {
if (fabsf(boss->obj.pos.y - this->obj.pos.y) < 1500.0f) {
@@ -788,15 +801,22 @@ s32 func_360_800301F4(Actor* this) {
return 0;
}
s32 func_360_8003049C(ActorAllRange* this) {
/**
* Checks whether an actor is close to Scenery objects or specific Bosses.
* Return values:
* 1: Object nearby is found below the actor
* -1: Object nearby is found above the actor
* 0: No objects found
*/
s32 ActorAllRange_CheckObjectNearby(ActorAllRange* this) {
Scenery360* scenery360;
s32 i;
f32 sp44;
f32 sp40;
f32 sp3C;
f32 temp_fa0;
f32 temp_ft4;
f32 var_ft5;
f32 distThreshold;
f32 sinRotY;
f32 cosRotY;
f32 xOffset;
f32 zOffset;
f32 yDistThreshold;
Boss* boss = &gBosses[0];
s32 pad[4];
@@ -805,45 +825,45 @@ s32 func_360_8003049C(ActorAllRange* this) {
}
if ((gLevelType == LEVELTYPE_SPACE) && (gCurrentLevel != LEVEL_BOLSE)) {
return func_360_800301F4(this);
return ActorAllRange_CheckObjectNearbySpace(this);
}
sp40 = SIN_DEG(this->obj.rot.y);
sp3C = COS_DEG(this->obj.rot.y);
sinRotY = SIN_DEG(this->obj.rot.y);
cosRotY = COS_DEG(this->obj.rot.y);
temp_fa0 = this->fwork[9] * 10.0f + (sp40 * 650.0f);
temp_ft4 = this->fwork[9] * 10.0f + (sp3C * 650.0f);
xOffset = this->fwork[9] * 10.0f + (sinRotY * 650.0f);
zOffset = this->fwork[9] * 10.0f + (cosRotY * 650.0f);
if (gLevelMode == LEVELMODE_ALL_RANGE) {
for (i = 0, scenery360 = gScenery360; i < 200; i++, scenery360++) {
if ((scenery360->obj.status == OBJ_ACTIVE) &&
(fabsf(scenery360->obj.pos.x - (this->obj.pos.x + temp_fa0)) < 1200.0f) &&
(fabsf(scenery360->obj.pos.z - (this->obj.pos.z + temp_ft4)) < 1200.0f) && (this->obj.pos.y < 650.0f)) {
(fabsf(scenery360->obj.pos.x - (this->obj.pos.x + xOffset)) < 1200.0f) &&
(fabsf(scenery360->obj.pos.z - (this->obj.pos.z + zOffset)) < 1200.0f) && (this->obj.pos.y < 650.0f)) {
return 1;
}
}
}
sp44 = 1200.0f;
var_ft5 = 650.0f;
distThreshold = 1200.0f;
yDistThreshold = 650.0f;
if (this->aiType < AI360_KATT) {
var_ft5 = 720.0f;
if (this->aiType <= AI360_ANDREW) {
yDistThreshold = 720.0f;
}
if (boss->obj.id == OBJ_BOSS_CO_CARRIER) {
var_ft5 = 350.0f;
yDistThreshold = 350.0f;
} else if (boss->obj.id == OBJ_BOSS_BO_BASE) {
sp44 = 2000.0f;
var_ft5 = 750.0f;
distThreshold = 2000.0f;
yDistThreshold = 750.0f;
} else if (boss->obj.id == OBJ_BOSS_KA_FLBASE) {
sp44 = 1500.0f;
var_ft5 = 700.0f;
distThreshold = 1500.0f;
yDistThreshold = 700.0f;
}
if ((fabsf(boss->obj.pos.x - (this->obj.pos.x + temp_fa0)) < sp44) &&
(fabsf(boss->obj.pos.z - (this->obj.pos.z + temp_ft4)) < sp44) &&
(fabsf(boss->obj.pos.y - this->obj.pos.y) < var_ft5)) {
if ((fabsf(boss->obj.pos.x - (this->obj.pos.x + xOffset)) < distThreshold) &&
(fabsf(boss->obj.pos.z - (this->obj.pos.z + zOffset)) < distThreshold) &&
(fabsf(boss->obj.pos.y - this->obj.pos.y) < yDistThreshold)) {
return 1;
} else {
return 0;
@@ -945,7 +965,7 @@ void ActorAllRange_ApplyDamage(ActorAllRange* this) {
this->timer_0C2 = 10;
this->timer_0BE = 0;
this->timer_04C = RAND_INT(2.9f);
this->work_04C = RAND_INT(2.9f);
switch (RAND_INT(4.0f)) {
case 0:
@@ -1262,7 +1282,7 @@ static Vec3f sSectorZRetreatPath[6] = {
void ActorAllRange_Update(ActorAllRange* this) {
u8 sp10F;
s32 sp108;
s32 objectNearby;
s32 sp104;
s32 temp_v0_27;
RadarMark* radarMark;
@@ -1336,7 +1356,7 @@ void ActorAllRange_Update(ActorAllRange* this) {
if (this->rot_0F4.x > 180.0f) {
this->rot_0F4.x -= 360.0f;
}
this->unk_046 = 0;
this->work_046 = 0;
break;
case STATE360_9:
@@ -1462,7 +1482,7 @@ void ActorAllRange_Update(ActorAllRange* this) {
this->fwork[7] = 360.0f;
this->fwork[8] = 0.0f;
AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, this->sfxSource, 0);
this->unk_046 = 0;
this->work_046 = 0;
}
gTeamShields[this->aiType] = -1;
gTeamDamage[this->aiType] = 0;
@@ -1479,13 +1499,13 @@ void ActorAllRange_Update(ActorAllRange* this) {
gTeamShields[this->aiType] = -1;
gTeamDamage[this->aiType] = 0;
if (gCurrentLevel == LEVEL_SECTOR_Z) {
this->fwork[4] = sSectorZRetreatPath[this->unk_046].x;
this->fwork[5] = sSectorZRetreatPath[this->unk_046].y;
this->fwork[6] = sSectorZRetreatPath[this->unk_046].z;
if ((fabsf(this->obj.pos.x - sSectorZRetreatPath[this->unk_046].x) < 800.0f) &&
(fabsf(this->obj.pos.z - sSectorZRetreatPath[this->unk_046].z) < 800.0f)) {
this->unk_046++;
if (this->unk_046 >= 4) {
this->fwork[4] = sSectorZRetreatPath[this->work_046].x;
this->fwork[5] = sSectorZRetreatPath[this->work_046].y;
this->fwork[6] = sSectorZRetreatPath[this->work_046].z;
if ((fabsf(this->obj.pos.x - sSectorZRetreatPath[this->work_046].x) < 800.0f) &&
(fabsf(this->obj.pos.z - sSectorZRetreatPath[this->work_046].z) < 800.0f)) {
this->work_046++;
if (this->work_046 >= 4) {
Object_Kill(&this->obj, this->sfxSource);
}
}
@@ -1989,7 +2009,7 @@ void ActorAllRange_Update(ActorAllRange* this) {
Math_SmoothStepToAngle(&this->obj.rot.z, 5.0f, 0.1f, 3.0f, 0.01f);
}
switch (this->unk_046) {
switch (this->work_046) {
case 0:
Math_SmoothStepToF(&this->rot_0F4.x, 200.0f, 0.1f, 6.0f, 0.0001f);
if (this->rot_0F4.x > 190.0f) {
@@ -2003,7 +2023,7 @@ void ActorAllRange_Update(ActorAllRange* this) {
this->obj.rot.z -= 360.0f;
}
this->timer_0BC = 40;
this->unk_046++;
this->work_046++;
}
this->obj.pos.y -= 3.0f;
break;
@@ -2057,12 +2077,12 @@ void ActorAllRange_Update(ActorAllRange* this) {
spD8 = this->fwork[20];
spD4 = this->fwork[19];
sp108 = 0;
objectNearby = 0;
if (sp104 == 1) {
if (this->aiType < AI360_GREAT_FOX) {
sp108 = func_360_8003049C(this);
if ((sp108 != 0) && (this->aiType < AI360_ENEMY) && (this->timer_0BE == 0) &&
objectNearby = ActorAllRange_CheckObjectNearby(this);
if ((objectNearby != 0) && (this->aiType < AI360_ENEMY) && (this->timer_0BE == 0) &&
((this->fwork[7] < 0.01f) || (this->fwork[7] > 359.9f))) {
this->timer_0BE = RAND_INT(200.0f) + 200;
if (Rand_ZeroOne() < 0.5f) {
@@ -2075,11 +2095,11 @@ void ActorAllRange_Update(ActorAllRange* this) {
}
}
if (sp108 != 0) {
if (objectNearby != 0) {
if ((this->aiType < AI360_ENEMY) || (gCurrentLevel != LEVEL_FORTUNA)) {
spD8 += 40.0f * sp108;
spD8 += 40.0f * objectNearby;
} else {
spD8 += 20.0f * sp108;
spD8 += 20.0f * objectNearby;
}
if (spD8 >= 360.0f) {
spD8 -= 360.0f;
@@ -2277,9 +2297,9 @@ void ActorAllRange_Update(ActorAllRange* this) {
if (gCurrentLevel == LEVEL_FORTUNA) {
ActorAllRange_SetShadowData(this);
} else if (gCurrentLevel == LEVEL_VENOM_ANDROSS) {
this->unk_04A++;
if (this->unk_04A >= Animation_GetFrameCount(&D_VE2_600C200)) {
this->unk_04A = 0;
this->work_04A++;
if (this->work_04A >= Animation_GetFrameCount(&D_VE2_600C200)) {
this->work_04A = 0;
}
}
@@ -2404,35 +2424,35 @@ void ActorAllRange_Draw(ActorAllRange* this) {
case AI360_PIGMA:
case AI360_ANDREW:
if (gCurrentLevel == LEVEL_VENOM_2) {
gSPDisplayList(gMasterDisp++, D_STAR_WOLF_F0103D0);
gSPDisplayList(gMasterDisp++, aStarWolfUpgradedShipDL);
Matrix_Push(&gGfxMatrix);
Matrix_Translate(gGfxMatrix, 30.0f, 0.0f, -60.0f, MTXF_APPLY);
Actor_DrawEngineGlow(this, 2);
Actor_DrawEngineGlow(this, EG_GREEN);
Matrix_Pop(&gGfxMatrix);
Matrix_Push(&gGfxMatrix);
Matrix_Translate(gGfxMatrix, -30.0f, 0.0f, -60.0f, MTXF_APPLY);
Actor_DrawEngineGlow(this, 2);
Actor_DrawEngineGlow(this, EG_GREEN);
Matrix_Pop(&gGfxMatrix);
ActorAllRange_DrawBarrelRoll(this);
ActorAllRange_DrawShield(this);
} else {
gSPDisplayList(gMasterDisp++, D_STAR_WOLF_F00F200);
gSPDisplayList(gMasterDisp++, aStarWolfStandardShipDL);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY);
if (gCurrentLevel == LEVEL_BOLSE) {
Actor_DrawEngineGlow(this, 3);
Actor_DrawEngineGlow(this, EG_ORANGE);
} else {
Actor_DrawEngineGlow(this, 2);
Actor_DrawEngineGlow(this, EG_GREEN);
}
}
break;
case AI360_KATT:
gSPDisplayList(gMasterDisp++, D_D009A40);
gSPDisplayList(gMasterDisp++, aKattShipDL);
Actor_DrawEngineAndContrails(this);
break;
case AI360_BILL:
gSPDisplayList(gMasterDisp++, D_D00B880);
gSPDisplayList(gMasterDisp++, aBillShipDL);
Actor_DrawEngineAndContrails(this);
break;
@@ -2443,12 +2463,12 @@ void ActorAllRange_Draw(ActorAllRange* this) {
break;
case AI360_MISSILE:
Animation_GetFrameData(&D_SZ_6006D64, 0, jointTable);
Animation_GetFrameData(&aSzMissileAnim, 0, jointTable);
Animation_DrawSkeleton(3, aSzMissileSkel, jointTable, ActorAllRange_MissileOverrideLimbDraw, NULL, this,
gCalcMatrix);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -400.0f, MTXF_APPLY);
Matrix_Scale(gGfxMatrix, this->fwork[29], this->fwork[29], this->fwork[29], MTXF_APPLY);
Actor_DrawEngineGlow(this, 3);
Actor_DrawEngineGlow(this, EG_ORANGE);
break;
default:
@@ -2458,7 +2478,7 @@ void ActorAllRange_Draw(ActorAllRange* this) {
gSPDisplayList(gMasterDisp++, D_FO_6006BE0);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -100.0f, MTXF_APPLY);
Matrix_Scale(gGfxMatrix, 1.5f, 1.5f, 1.5f, MTXF_APPLY);
Actor_DrawEngineGlow(this, 2);
Actor_DrawEngineGlow(this, EG_GREEN);
} else if (gCurrentLevel == LEVEL_KATINA) {
switch (this->animFrame) {
case 0:
@@ -2467,7 +2487,7 @@ void ActorAllRange_Draw(ActorAllRange* this) {
case 1:
gSPDisplayList(gMasterDisp++, aKaCornerianFighterDL);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY);
Actor_DrawEngineGlow(this, 0);
Actor_DrawEngineGlow(this, EG_RED);
break;
case 3:
gSPDisplayList(gMasterDisp++, aKaEnemy1DL);
@@ -2478,29 +2498,29 @@ void ActorAllRange_Draw(ActorAllRange* this) {
} else if (gCurrentLevel == LEVEL_SECTOR_Z) {
gSPDisplayList(gMasterDisp++, D_SZ_6004FE0);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY);
Actor_DrawEngineGlow(this, 2);
Actor_DrawEngineGlow(this, EG_GREEN);
} else if (gCurrentLevel == LEVEL_BOLSE) {
gSPDisplayList(gMasterDisp++, D_BO_6008770);
Matrix_Push(&gGfxMatrix);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY);
Actor_DrawEngineGlow(this, 2);
Actor_DrawEngineGlow(this, EG_GREEN);
Matrix_Pop(&gGfxMatrix);
ActorAllRange_DrawShield(this);
} else if (gCurrentLevel == LEVEL_VENOM_ANDROSS) {
Animation_GetFrameData(&D_VE2_600C200, this->unk_04A, this->vwork);
Animation_GetFrameData(&D_VE2_600C200, this->work_04A, this->vwork);
Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 10.0f, MTXF_APPLY);
Animation_DrawSkeleton(0, D_VE2_600C2AC, this->vwork, NULL, NULL, this, &gIdentityMatrix);
} else if (gCurrentLevel == LEVEL_VERSUS) {
gSPDisplayList(gMasterDisp++, D_versus_3015740);
} else if (gCurrentLevel == LEVEL_TRAINING) {
if (this->aiIndex == AI360_FOX) {
gSPDisplayList(gMasterDisp++, D_STAR_WOLF_F00F200);
gSPDisplayList(gMasterDisp++, aStarWolfStandardShipDL);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY);
Actor_DrawEngineGlow(this, 3);
Actor_DrawEngineGlow(this, EG_ORANGE);
} else {
gSPDisplayList(gMasterDisp++, D_ENMY_PLANET_40068F0);
gSPDisplayList(gMasterDisp++, aVenomFighter1DL);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY);
Actor_DrawEngineGlow(this, 2);
Actor_DrawEngineGlow(this, EG_GREEN);
}
}
break;
+22 -9
View File
@@ -126,9 +126,11 @@ void PlayerShot_Impact(PlayerShot* shot) {
Object_Kill(&shot->obj, shot->sfxSource);
return;
}
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) {
@@ -138,10 +140,13 @@ void PlayerShot_Impact(PlayerShot* shot) {
PlayerShot_ExplodeBomb(shot);
} else if (shot->obj.id == PLAYERSHOT_LOCK_ON) {
shot->scale = 7.5f;
for (i = 0; i < ARRAY_COUNT(gActors); i++) {
gActors[i].lockOnTimers[shot->sourceId] = 0;
}
shot->vel.x = shot->vel.y = shot->vel.z = 0.0f;
if (gCurrentLevel == LEVEL_AQUAS) {
gLight3R = gLight3G = gLight3B = 0;
Effect_Effect384_Spawn(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 10.0f, 4);
@@ -195,7 +200,7 @@ void PlayerShot_SpawnEffect344(f32 xPos, f32 yPos, f32 zPos, f32 arg3, f32 arg4,
}
}
void PlayerShot_SetupEffect345(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 yRot, f32 scale) {
void PlayerShot_LaserMark1_Setup(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 yRot, f32 scale) {
Effect_Initialize(effect);
effect->obj.status = OBJ_INIT;
effect->obj.id = OBJ_EFFECT_LASER_MARK_1;
@@ -216,7 +221,7 @@ void PlayerShot_HitGround(f32 xPos, f32 yPos, f32 zPos, f32 yRot, f32 scale) {
(gCurrentLevel != LEVEL_TRAINING) && (gCurrentLevel != LEVEL_SOLAR) && (gCurrentLevel != LEVEL_ZONESS)) {
for (i = 0; i < 50; i++) {
if (gEffects[i].obj.status == OBJ_FREE) {
PlayerShot_SetupEffect345(&gEffects[i], xPos, yPos, zPos, yRot, scale);
PlayerShot_LaserMark1_Setup(&gEffects[i], xPos, yPos, zPos, yRot, scale);
func_effect_8007D10C(xPos, yPos, zPos, 2.0f);
break;
}
@@ -363,6 +368,7 @@ s32 PlayerShot_CheckEventHitbox(PlayerShot* shot, Actor* actor) {
(fabsf(shot->obj.pos.y - actor->obj.pos.y) < 2000.0f) &&
(fabsf(shot->obj.pos.x - actor->obj.pos.x) < 2000.0f)) {
hitboxData = actor->info.hitbox;
count = *hitboxData++;
if (count != 0) {
xySizeMod = 0.0f;
@@ -373,6 +379,7 @@ s32 PlayerShot_CheckEventHitbox(PlayerShot* shot, Actor* actor) {
xySizeMod += 30.0f;
}
}
for (i = 0; i < count; i++, hitboxData += 6) {
if (actor->info.unk_16 == 1) {
shotPx = shot->obj.pos.x;
@@ -394,7 +401,7 @@ s32 PlayerShot_CheckEventHitbox(PlayerShot* shot, Actor* actor) {
}
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->eventType != EVID_31)) {
(actor->eventType != EVID_A6_UMBRA_STATION)) {
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);
@@ -407,6 +414,7 @@ s32 PlayerShot_CheckEventHitbox(PlayerShot* shot, Actor* actor) {
shotPy = actor->obj.pos.y + sp70.y;
shotPz = actor->obj.pos.z + sp70.z;
}
hitbox = (Hitbox*) hitboxData;
if ((fabsf(hitbox->z.offset + actor->obj.pos.z - shotPz) < (hitbox->z.size + 50.0f)) &&
(fabsf(hitbox->x.offset + actor->obj.pos.x - shotPx) < (hitbox->x.size + xySizeMod)) &&
@@ -687,10 +695,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->eventType == EVID_48) || (actor->eventType == EVID_49) || (actor->eventType == EVID_50))) ||
((actor->eventType == EVID_SY_ROBOT_1) || (actor->eventType == EVID_SY_ROBOT_2) ||
(actor->eventType == EVID_SY_ROBOT_3))) ||
((actor->obj.id == OBJ_ACTOR_ALLRANGE) && (actor->fwork[23] > 1.0f)) ||
((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->dmgPart == 0) &&
(actor->eventType == EVID_METEO_PYRAMID_SHIP)) ||
((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->dmgPart == 0) && (actor->eventType == EVID_ME_FLIP_BOT)) ||
((actor->obj.id == OBJ_ACTOR_AQ_SCULPIN) && (shot->obj.id != PLAYERSHOT_LOCK_ON) &&
((actor->state < 3) || (actor->state >= 5))) ||
((actor->obj.id == OBJ_ACTOR_AQ_GAROA) && (shot->obj.id != PLAYERSHOT_LOCK_ON) && (actor->timer_0BC != 0))) {
@@ -767,13 +775,13 @@ void PlayerShot_CollisionCheck(PlayerShot* shot) {
}
break;
case OBJ_ACTOR_EVENT:
if (actor->eventType == EVID_42) {
if (actor->eventType == EVID_SY_SHIP_2) {
if (PlayerShot_CheckPolyCollision(shot, ACTOR_EVENT_ID, &actor->obj)) {
actor->dmgType = DMG_BEAM;
actor->dmgPart = shot->sourceId;
return;
}
} else if (actor->eventType == EVID_63) {
} else if (actor->eventType == EVID_ME_BIG_METEOR) {
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);
@@ -1929,7 +1937,7 @@ void PlayerShot_ApplyExplosionDamage(PlayerShot* shot, s32 damage) {
actor->obj.status = OBJ_DYING;
actor->timer_0BC = RAND_INT(15.0f) + 10;
actor->timer_0BE = 0;
actor->timer_04C = 4;
actor->work_04C = 4;
actor->obj.rot.x = Math_ModF(actor->obj.rot.x, 360.0f);
if (actor->info.bonus != 0) {
shot->bonus++;
@@ -2267,12 +2275,14 @@ void PlayerShot_Update(PlayerShot* shot) {
switch (shot->obj.status) {
case SHOT_FREE:
break;
case SHOT_ACTIVE:
ticks = 1;
switch (shot->obj.id) {
case PLAYERSHOT_GFOX_LASER:
ticks = 4;
break;
case PLAYERSHOT_SINGLE_LASER:
case PLAYERSHOT_TWIN_LASER:
if ((shot->unk_58 == 0) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO)) {
@@ -2281,10 +2291,12 @@ void PlayerShot_Update(PlayerShot* shot) {
ticks = 3;
}
break;
case PLAYERSHOT_TANK:
ticks = 2;
break;
}
for (i = 0; i < ticks && (shot->obj.status == SHOT_ACTIVE); i++) {
if (shot->timer > 0) {
shot->timer--;
@@ -2295,6 +2307,7 @@ void PlayerShot_Update(PlayerShot* shot) {
PlayerShot_UpdateShot(shot, i);
}
break;
case SHOT_HITMARK:
PlayerShot_UpdateHitmark(shot);
break;
+36 -35
View File
@@ -90,6 +90,7 @@ void func_demo_80048CC4(ActorCutscene* this, s32 index) {
this->rot_0F4.y = 0.0f;
this->rot_0F4.z = D_demo_800C9F90[index];
Object_SetInfo(&this->info, this->obj.id);
if (index == 3) {
@@ -103,8 +104,8 @@ void func_demo_80048CC4(ActorCutscene* this, s32 index) {
}
void Cutscene_WarpZoneComplete(Player* player) {
Vec3f sp5C;
Vec3f sp50;
Vec3f src;
Vec3f dest;
s32 pad[2];
f32 temp_ft3;
f32 temp_ret;
@@ -140,10 +141,10 @@ void Cutscene_WarpZoneComplete(Player* player) {
Math_SmoothStepToF(&player->baseSpeed, 0.0f, 1.0f, 0.5f, 0.0f);
Matrix_RotateX(gCalcMatrix, -5.0f * M_DTOR, MTXF_NEW);
Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[1] * M_DTOR, MTXF_APPLY);
sp5C.x = 0.0f;
sp5C.y = 0.0f;
sp5C.z = 300.0f;
Matrix_MultVec3f(gCalcMatrix, &sp5C, &sp50);
src.x = 0.0f;
src.y = 0.0f;
src.z = 300.0f;
Matrix_MultVec3f(gCalcMatrix, &src, &dest);
gCsCamAtX = player->pos.x;
gCsCamAtY = player->pos.y;
gCsCamAtZ = player->trueZpos + gPathProgress;
@@ -221,9 +222,9 @@ void Cutscene_WarpZoneComplete(Player* player) {
}
}
} else {
gCsCamEyeX = player->pos.x + sp50.x;
gCsCamEyeY = player->pos.y + sp50.y;
gCsCamEyeZ = player->trueZpos + gPathProgress + sp50.z;
gCsCamEyeX = player->pos.x + dest.x;
gCsCamEyeY = player->pos.y + dest.y;
gCsCamEyeZ = player->trueZpos + gPathProgress + dest.z;
}
break;
@@ -238,14 +239,14 @@ void Cutscene_WarpZoneComplete(Player* player) {
Matrix_RotateY(gCalcMatrix, (player->rot.y + 180.0f) * M_DTOR, MTXF_NEW);
Matrix_RotateX(gCalcMatrix, -((player->rot.x + player->aerobaticPitch) * M_DTOR), MTXF_APPLY);
sp5C.x = 0.0f;
sp5C.y = 0.0f;
sp5C.z = player->baseSpeed + player->boostSpeed;
src.x = 0.0f;
src.y = 0.0f;
src.z = player->baseSpeed + player->boostSpeed;
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp5C, &sp50);
player->vel.x = sp50.x;
player->vel.z = sp50.z;
player->vel.y = sp50.y;
Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest);
player->vel.x = dest.x;
player->vel.z = dest.z;
player->vel.y = dest.y;
player->pos.x += player->vel.x;
player->pos.y += player->vel.y;
@@ -267,8 +268,8 @@ static Vec3f D_demo_800C9FA0[] = {
};
void func_demo_80049630(ActorCutscene* this) {
Vec3f sp3C;
Vec3f sp30;
Vec3f src;
Vec3f dest;
switch (this->state) {
case 0:
@@ -300,15 +301,15 @@ void func_demo_80049630(ActorCutscene* this) {
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;
sp3C.z = this->fwork[0];
src.x = 0.0f;
src.y = 0.0f;
src.z = this->fwork[0];
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp3C, &sp30);
Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest);
this->vel.x = sp30.x;
this->vel.y = sp30.y;
this->vel.z = sp30.z;
this->vel.x = dest.x;
this->vel.y = dest.y;
this->vel.z = dest.z;
this->obj.rot.x = -this->rot_0F4.x;
this->obj.rot.y = this->rot_0F4.y + 180.0f;
@@ -2526,10 +2527,10 @@ void ActorCutscene_Draw(ActorCutscene* this) {
switch (this->animFrame) {
case 1000:
RCP_SetupDL(&gMasterDisp, SETUPDL_45);
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_046);
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->work_046);
gSPDisplayList(gMasterDisp++, D_ENMY_PLANET_40018A0);
if (this->unk_046 > 50) {
if (this->work_046 > 50) {
Actor_DrawEngineAndContrails(this);
}
break;
@@ -2568,11 +2569,11 @@ void ActorCutscene_Draw(ActorCutscene* this) {
break;
case 20:
gSPDisplayList(gMasterDisp++, D_ENMY_SPACE_400AAE0);
gSPDisplayList(gMasterDisp++, aCommanderDL);
break;
case 24:
gSPDisplayList(gMasterDisp++, D_D009A40);
gSPDisplayList(gMasterDisp++, aKattShipDL);
Actor_DrawEngineAndContrails(this);
break;
@@ -2587,19 +2588,19 @@ void ActorCutscene_Draw(ActorCutscene* this) {
case 26:
gSPDisplayList(gMasterDisp++, D_SZ_6004FE0);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY);
Actor_DrawEngineGlow(this, 2);
Actor_DrawEngineGlow(this, EG_GREEN);
break;
case 28:
gSPDisplayList(gMasterDisp++, D_ENMY_SPACE_400AAE0);
gSPDisplayList(gMasterDisp++, aCommanderDL);
Matrix_Translate(gGfxMatrix, 0.f, 0.f, -60.0f, MTXF_APPLY);
Actor_DrawEngineGlow(this, 2);
Actor_DrawEngineGlow(this, EG_GREEN);
break;
case 30:
Display_SetSecondLight(&this->obj.pos);
if (this->unk_046 != 0) {
if (this->work_046 != 0) {
RCP_SetupDL(&gMasterDisp, SETUPDL_55);
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
Rand_SetSeed(1, 29000, 9876);
@@ -2729,12 +2730,12 @@ void ActorCutscene_Draw(ActorCutscene* this) {
case 33:
if ((this->index == 3) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) {
gSPDisplayList(gMasterDisp++, D_D00B880);
gSPDisplayList(gMasterDisp++, aBillShipDL);
} else {
gSPDisplayList(gMasterDisp++, aKaCornerianFighterDL);
}
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY);
Actor_DrawEngineGlow(this, 0);
Actor_DrawEngineGlow(this, EG_RED);
break;
case 34:
+7 -7
View File
@@ -780,7 +780,7 @@ void Display_PlayerShadow_Draw(Player* player) {
Matrix_Scale(gGfxMatrix, 1.5f * 1.67f, 1.5f, 1.5f * 1.67f, MTXF_APPLY);
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 30.0f, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
gSPDisplayList(gMasterDisp++, D_1032780);
gSPDisplayList(gMasterDisp++, aArwingShadowDL);
break;
case FORM_LANDMASTER:
@@ -815,21 +815,21 @@ void Display_PlayerShadow_Draw(Player* player) {
}
}
void Display_DrawEngineGlow(s32 levelType) {
void Display_DrawEngineGlow(EngineGlowColor color) {
RCP_SetupDL(&gMasterDisp, SETUPDL_67);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255);
switch (levelType) {
case LEVELTYPE_PLANET:
switch (color) {
case EG_RED:
gDPSetEnvColor(gMasterDisp++, 255, 0, 0, 255);
break;
case LEVELTYPE_SPACE:
case EG_BLUE:
gDPSetEnvColor(gMasterDisp++, 0, 0, 255, 255);
break;
case LEVELTYPE_UNK2:
case EG_GREEN:
gDPSetEnvColor(gMasterDisp++, 0, 255, 0, 255);
break;
case LEVELTYPE_UNK3:
case EG_ORANGE:
gDPSetEnvColor(gMasterDisp++, 255, 64, 0, 255);
break;
}
+30 -7
View File
@@ -1,3 +1,26 @@
/**
* Glossary:
*
* Level Prefixes:
* CO: Corneria
* ME: Meteo
* SX: Sector X
* SY: Sector Y
* SZ: Sector Z
* KA: Katina
* AQ: Aquas
* A6: Area 6
* FO: Fortuna
* SO: Solar
* MA: Macbeth
* TI: Titania
* BO: Bolse
* ZO: Zoness
* VE1: Venom 1
* VE2: Venom 2
* AND: Venom Andross
*/
#include "global.h"
#include "assets/ast_versus.h"
@@ -77,17 +100,17 @@ f32 gTeamHitbox[] = {
f32 gActorAllRangeHItbox[] = {
1.0f, 0.0f, 40.0f, 0.0f, 40.0f, 0.0f, 40.0f,
};
f32 gWarpZoneEvent94Hitbox[] = {
f32 aWzMeteor1Hitbox[] = {
1.0f, 0.0f, 140.0f, 0.0f, 170.0f, 0.0f, 140.0f,
};
f32 gWarpZoneEvent96Hitbox[] = {
f32 aWzGateHitbox[] = {
4.0f, 0.0f, 140.0f, -675.0f, 140.0f, 0.0f, 810.0f, 0.0f, 140.0f, 675.0f, 140.0f, 0.0f, 810.0f,
0.0f, 140.0f, 0.0f, 810.0f, 675.0f, 140.0f, 0.0f, 140.0f, 0.0f, 810.0f, -675.0f, 140.0f,
};
f32 gWarpZoneEvent92Hitbox[] = {
f32 aWzPillar1Hitbox[] = {
1.0f, 0.0f, 140.0f, 0.0f, 140.0f, 0.0f, 1800.0f,
};
f32 gWarpZoneEvent93Hitbox[] = {
f32 aWzPillar2Hitbox[] = {
2.0f, 0.0f, 140.0f, 0.0f, 140.0f, 0.0f, 1800.0f, 1.0f, 141.0f, 1.0f, 1800.0f, 1.0f, 140.0f,
};
@@ -157,7 +180,7 @@ ObjectInfo gObjectInfo[] = {
/* OBJ_SCENERY_MA_TOWER, */ {(void*) Macbeth_MaTower_Draw, 1, (ObjectFunc) NULL, aMaTowerHitbox, 200.0f, 0, 0, 5, 0, 0.0f, 0 },
/* OBJ_SCENERY_MA_WALL_1, */ {(void*) aMaWall1DL, 0, (ObjectFunc) NULL, gNoHitbox, 1500.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_SCENERY_GUILLOTINE_HOUSING, */ {(void*) aMaGuillotineHousingDL, 0, (ObjectFunc) NULL, aMaGuillotineHousingHitbox, 500.0f, 0, 0, 5, 0, 0.0f, 0 },
/* OBJ_SCENERY_MA_GUILLOTINE, */ {(void*) aMaGuillotineDL, 0, (ObjectFunc) NULL, aMaGuillotineHitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_SCENERY_MA_GUILLOTINE, */ {(void*) aMaGuillotine1DL, 0, (ObjectFunc) NULL, aMaGuillotineHitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_SCENERY_MA_PROXIMITY_LIGHT, */ {(void*) Macbeth_MaProximityLight_Draw, 1, (ObjectFunc) NULL, aMaProximityLightHitbox, 400.0f, 0, 0, 0, 0, 0.0f, 0 },
/* OBJ_SCENERY_MA_WALL_2, */ {(void*) aMaWall2DL, 0, (ObjectFunc) NULL, aMaWall2Hitbox, 2500.0f, 0, 0, 5, 0, 0.0f, 0 },
/* OBJ_SCENERY_MA_WALL_3, */ {(void*) aMaWall3DL, 0, (ObjectFunc) NULL, aMaWall3Hitbox, 2000.0f, 0, 0, 5, 0, 0.0f, 0 },
@@ -208,7 +231,7 @@ ObjectInfo gObjectInfo[] = {
/* OBJ_SCENERY_SY_SHIP_2_DESTROYED */ {(void*) aSyShip4DestroyedDL, 0, (ObjectFunc) SectorY_SyShip4Destroyed_Update, aSyShip4DestroyedHitbox, 4000.0f, 0, 0, 41, 0, 0.0f, 0 },
/* OBJ_SPRITE_SY_SHIP_2 */ {(void*) aSyShip2SpriteDL, 0, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_SPRITE_SY_SHIP_3 */ {(void*) aSyShip3SpriteDL, 0, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_SCENERY_SY_SHIP_PROJECTILE */ {(void*) aSyShipProjectileDL, 0, (ObjectFunc) NULL, aSyShipProjectileHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_SCENERY_SY_SHIP_MISSILE */ {(void*) aSyShipMissileDL, 0, (ObjectFunc) NULL, aSyShipMissileHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_SCENERY_SY_SHIP_WINDOWS */ {(void*) aSyShipWindowsDL, 0, (ObjectFunc) NULL, aSyShipWindowsHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_SCENERY_AQ_CORAL_REEF_1 */ {(void*) aAqCoralReef1DL, 0, (ObjectFunc) NULL, aAqCoralReef1Hitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 },
/* OBJ_SCENERY_AQ_TUNNEL_1 */ {(void*) aAqTunnel1DL, 0, (ObjectFunc) NULL, aAqTunnel1Hitbox, 2000.0f, 0, 0, 41, 0, 0.0f, 0 },
@@ -274,7 +297,7 @@ ObjectInfo gObjectInfo[] = {
/* OBJ_ACTOR_CO_GARUDA_3 */ {(void*) Corneria_CoGaruda3_Draw, 2, (ObjectFunc) Corneria_CoGaruda3_Update, CoGarudaHitbox, 500.0f, 0, 0, 39, 1, 200.0f, 1 },
/* OBJ_ACTOR_CO_GARUDA_DESTROY */ {(void*) Corneria_CoGarudaDestroy_Draw, 2, (ObjectFunc) Corneria_CoGarudaDestroy_Update, aCoGarudaDestroyHitbox, 500.0f, 0, 0, 39, 1, 0.0f, 1 },
/* OBJ_ACTOR_ME_MOLAR_ROCK */ {(void*) MeMolarRock_Draw, 1, (ObjectFunc) MeMolarRock_Update, gNoHitbox, 1000.0f, 0, 0, 39, 0, 0.0f, 1 },
/* OBJ_ACTOR_ME_METEOR_1 */ {(void*) aMeMeteorDL, 0, (ObjectFunc) Meteo_MeMeteor1_Update, aMeMeteor1Hitbox, 200.0f, 0, 0, 39, 0, 1.0f, 1 },
/* OBJ_ACTOR_ME_METEOR_1 */ {(void*) aMeMeteor1DL, 0, (ObjectFunc) Meteo_MeMeteor1_Update, aMeMeteor1Hitbox, 200.0f, 0, 0, 39, 0, 1.0f, 1 },
/* OBJ_ACTOR_ME_METEOR_2 */ {(void*) MeMeteor2_Draw, 1, (ObjectFunc) Meteo_MeMeteor2_Update, aMeMeteor2Hitbox, 100.0f, 0, 1, 39, 0, 1.0f, 1 },
/* OBJ_ACTOR_ME_METEOR_SHOWER_1 */ {(void*) Meteo_MeMeteorShower1_Draw, 1, (ObjectFunc) Meteo_MeteorShower_Update, gNoHitbox, 100.0f, 0, 1, 39, 0, 0.0f, 1 },
/* OBJ_ACTOR_ME_METEOR_SHOWER_2 */ {(void*) Meteo_MeMeteorShower2_Draw, 1, (ObjectFunc) Meteo_MeteorShower_Update, gNoHitbox, 100.0f, 0, 1, 39, 0, 0.0f, 1 },
+59 -59
View File
@@ -92,9 +92,9 @@ f32 D_edisplay_800CFA2C[] = {
void MeHopBot_Draw(MeHopBot* this) {
Vec3f sp30[30];
f32 temp = D_edisplay_800CF9B0[this->animFrame] - 114.0f;
f32 yTrans = D_edisplay_800CF9B0[this->animFrame] - 114.0f;
Matrix_Translate(gGfxMatrix, 0.f, -temp, 0.0f, MTXF_APPLY);
Matrix_Translate(gGfxMatrix, 0.f, -yTrans, 0.0f, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
Animation_GetFrameData(&aMeHopBotAnim, this->animFrame, sp30);
Animation_DrawSkeleton(1, aMeHopBotSkel, sp30, NULL, MeHopBot_PostLimbDraw, &this->index, &gIdentityMatrix);
@@ -104,11 +104,11 @@ void MeteoTunnel_Draw(MeTunnel* this) {
gSPDisplayList(gMasterDisp++, aMeMeteoTunnelDL);
}
void Scenery_DrawTitaniaBones(Scenery* scenery) {
if (scenery->obj.id == OBJ_SCENERY_TI_SKULL) {
void Scenery_DrawTitaniaBones(Scenery* this) {
if (this->obj.id == OBJ_SCENERY_TI_SKULL) {
gSPDisplayList(gMasterDisp++, D_TI1_7007350);
} else {
Graphics_SetScaleMtx(D_edisplay_800CFA2C[scenery->obj.id - 29]);
Graphics_SetScaleMtx(D_edisplay_800CFA2C[this->obj.id - 29]);
gSPDisplayList(gMasterDisp++, D_TI1_700BB10);
}
}
@@ -282,12 +282,12 @@ void ActorDebris_Draw(ActorDebris* this) {
case 39:
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFAC4[this->unk_048]);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFAC4[this->work_048]);
break;
case 40:
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255);
switch (this->unk_048) {
switch (this->work_048) {
case 0:
break;
case 1:
@@ -304,7 +304,7 @@ void ActorDebris_Draw(ActorDebris* this) {
}
if (gCurrentLevel != LEVEL_SOLAR) {
gSPDisplayList(gMasterDisp++, D_TI_801B769C[this->unk_046]);
gSPDisplayList(gMasterDisp++, D_TI_801B769C[this->work_046]);
} else {
if (gBosses[0].fwork[3] < 4800.0f) {
RCP_SetupDL(&gMasterDisp, SETUPDL_30);
@@ -316,28 +316,28 @@ void ActorDebris_Draw(ActorDebris* this) {
gSPFogPosition(gMasterDisp++, gFogNear, gFogFar);
}
Graphics_SetScaleMtx(this->scale);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFB40[this->unk_046]);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFB40[this->work_046]);
}
break;
case 41:
Graphics_SetScaleMtx(this->scale);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFADC[this->unk_048]);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFADC[this->work_048]);
break;
case 42:
Graphics_SetScaleMtx(this->scale);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFB08[this->unk_048]);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFB08[this->work_048]);
break;
case 43:
Graphics_SetScaleMtx(this->scale);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFB14[this->unk_048]);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFB14[this->work_048]);
break;
case 44:
Graphics_SetScaleMtx(this->scale);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFB28[this->unk_048]);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFB28[this->work_048]);
break;
case 45:
@@ -345,25 +345,25 @@ void ActorDebris_Draw(ActorDebris* this) {
break;
case 46:
if ((this->unk_048 == 2) || (this->unk_048 == 3) || (this->unk_048 == 4)) {
if ((this->work_048 == 2) || (this->work_048 == 3) || (this->work_048 == 4)) {
RCP_SetupDL(&gMasterDisp, SETUPDL_33);
}
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
gSPDisplayList(gMasterDisp++, D_TI_801B7584[this->unk_048]);
gSPDisplayList(gMasterDisp++, D_TI_801B7584[this->work_048]);
break;
case 47:
gSPDisplayList(gMasterDisp++, D_TI_801B7608[this->unk_048]);
gSPDisplayList(gMasterDisp++, D_TI_801B7608[this->work_048]);
break;
case 48:
Graphics_SetScaleMtx(this->scale);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFB64[this->unk_048]);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFB64[this->work_048]);
break;
case 49:
Graphics_SetScaleMtx(this->scale);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFB88[this->unk_048]);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFB88[this->work_048]);
break;
case 50:
@@ -401,27 +401,27 @@ void ActorDebris_Draw(ActorDebris* this) {
case 51:
Graphics_SetScaleMtx(this->scale);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFBA8[this->unk_048]);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFBA8[this->work_048]);
break;
case 52:
Graphics_SetScaleMtx(this->scale);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFBE4[this->unk_048]);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFBE4[this->work_048]);
break;
case 53:
Graphics_SetScaleMtx(this->scale);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFC0C[this->unk_048]);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFC0C[this->work_048]);
break;
case 54:
Graphics_SetScaleMtx(this->scale);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFC40[this->unk_048]);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFC40[this->work_048]);
break;
case 55:
Graphics_SetScaleMtx(this->scale);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFC50[this->unk_048]);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFC50[this->work_048]);
break;
case 56:
@@ -429,7 +429,7 @@ void ActorDebris_Draw(ActorDebris* this) {
RCP_SetupDL(&gMasterDisp, SETUPDL_41);
Matrix_SetGfxMtx(&gMasterDisp);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 191, 255, 223, 255);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFC64[this->unk_048]);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFC64[this->work_048]);
break;
case 58:
@@ -441,7 +441,7 @@ void ActorDebris_Draw(ActorDebris* this) {
case 59:
Graphics_SetScaleMtx(this->scale);
Matrix_SetGfxMtx(&gMasterDisp);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFC7C[this->unk_048]);
gSPDisplayList(gMasterDisp++, D_edisplay_800CFC7C[this->work_048]);
break;
case 70:
@@ -449,7 +449,7 @@ void ActorDebris_Draw(ActorDebris* this) {
break;
case 57:
gSPDisplayList(gMasterDisp++, D_VE1_8019A008[this->unk_048]);
gSPDisplayList(gMasterDisp++, D_VE1_8019A008[this->work_048]);
break;
default:
@@ -467,7 +467,7 @@ void Actor_DrawEngineAndContrails(Actor* this) {
f32 sp5C;
f32 temp1;
f32 sp54;
s32 pad[5]; // fake? seems like a lot of padding
s32 pad[5];
if ((this->iwork[11] != 0) && (this->obj.status == OBJ_ACTIVE)) {
temp1 = 652.5f * 0.001f; // 0.65250003f;
@@ -527,7 +527,7 @@ f32 D_edisplay_800CFCA0[] = {
1.7f, 1.8f, 2.0f, 3.0f, 3.0f, 3.0f, 3.0f, 3.0f,
};
void Actor_DrawEngineGlow(Actor* actor, s32 levelType) {
void Actor_DrawEngineGlow(Actor* actor, EngineGlowColor color) {
f32 scale;
if ((actor->iwork[11] != 0) && (actor->obj.status == OBJ_ACTIVE)) {
@@ -545,7 +545,7 @@ void Actor_DrawEngineGlow(Actor* actor, s32 levelType) {
Matrix_RotateY(gGfxMatrix, -actor->obj.rot.y * M_DTOR, MTXF_APPLY);
Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
Display_DrawEngineGlow(levelType);
Display_DrawEngineGlow(color);
Matrix_Pop(&gGfxMatrix);
}
}
@@ -609,14 +609,14 @@ void MeMolarRock_Draw(MeMolarRock* this) {
}
void MeMeteor2_Draw(MeMeteor2* this) {
RCP_SetupDL_29(this->unk_046, gFogGreen, gFogBlue, gFogAlpha, this->unk_048, gFogFar);
RCP_SetupDL_29(this->work_046, gFogGreen, gFogBlue, gFogAlpha, this->work_048, gFogFar);
Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
gSPDisplayList(gMasterDisp++, aMeMeteorDL);
gSPDisplayList(gMasterDisp++, aMeMeteor1DL);
}
void MeLaserCannon1_Draw(MeLaserCannon1* this) {
RCP_SetupDL_29(this->unk_046, gFogGreen, gFogBlue, gFogAlpha, this->unk_048, gFogFar);
RCP_SetupDL_29(this->work_046, gFogGreen, gFogBlue, gFogAlpha, this->work_048, gFogFar);
gSPDisplayList(gMasterDisp++, aMeLaserCannon1DL);
}
@@ -630,9 +630,9 @@ void ActorMissileSeek_Draw(Actor* missile) {
case 1:
if (gCurrentLevel == LEVEL_AREA_6) {
gSPDisplayList(gMasterDisp++, D_ENMY_SPACE_400B390);
gSPDisplayList(gMasterDisp++, aAttacker3DL);
} else {
gSPDisplayList(gMasterDisp++, D_ENMY_PLANET_4007AF0);
gSPDisplayList(gMasterDisp++, aGrangaFighter2DL);
}
break;
}
@@ -645,7 +645,7 @@ void ActorMissileSeek_Draw(Actor* missile) {
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY);
missile->iwork[11] = 1;
Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY);
Actor_DrawEngineGlow(missile, 2);
Actor_DrawEngineGlow(missile, EG_GREEN);
}
void CoSkibot_Draw(CoSkibot* this) {
@@ -689,14 +689,14 @@ void Object_SetShadowDL(ObjectId objId, s32 index) {
case OBJ_ACTOR_TEAM_BOSS:
case OBJ_ACTOR_EVENT:
switch (gActors[index].eventType) {
case EVID_3:
case EVID_SPY_EYE:
Matrix_Scale(gGfxMatrix, 2.3f, 0.0f, 2.3f, MTXF_APPLY);
Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
gSPDisplayList(gMasterDisp++, D_102A010);
break;
case EVID_81:
case EVID_VE1_BLOCKER:
RCP_SetupDL(&gMasterDisp, SETUPDL_48);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255);
gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 255);
@@ -715,7 +715,7 @@ void Object_SetShadowDL(ObjectId objId, s32 index) {
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 30.0f, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK);
gSPDisplayList(gMasterDisp++, D_1032780);
gSPDisplayList(gMasterDisp++, aArwingShadowDL);
break;
}
break;
@@ -1084,7 +1084,7 @@ void Actor_DrawOnRails(Actor* this) {
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->eventType != EVID_31)) {
} else if ((this->obj.id == OBJ_ACTOR_EVENT) && (this->eventType != EVID_A6_UMBRA_STATION)) {
func_edisplay_8005D3CC(&this->obj, this->vwork[29].x, this->vwork[29].y,
this->vwork[29].z + this->rot_0F4.z, this->info.drawType);
} else {
@@ -1383,37 +1383,37 @@ void Item_Draw(Item* this, s32 arg1) {
}
}
void ActorAllRange_DrawShadow(Actor* actor) {
Matrix_Translate(gGfxMatrix, actor->obj.pos.x, actor->fwork[25] + 3.0f, actor->obj.pos.z, MTXF_APPLY);
void ActorAllRange_DrawShadow(ActorAllRange* this) {
Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->fwork[25] + 3.0f, this->obj.pos.z, MTXF_APPLY);
if (gCurrentLevel == LEVEL_FORTUNA) {
Matrix_RotateY(gGfxMatrix, actor->fwork[27], MTXF_APPLY);
Matrix_RotateX(gGfxMatrix, actor->fwork[26], MTXF_APPLY);
Matrix_RotateZ(gGfxMatrix, actor->fwork[28], MTXF_APPLY);
Matrix_RotateY(gGfxMatrix, -actor->fwork[27], MTXF_APPLY);
Matrix_RotateY(gGfxMatrix, this->fwork[27], MTXF_APPLY);
Matrix_RotateX(gGfxMatrix, this->fwork[26], MTXF_APPLY);
Matrix_RotateZ(gGfxMatrix, this->fwork[28], MTXF_APPLY);
Matrix_RotateY(gGfxMatrix, -this->fwork[27], MTXF_APPLY);
}
Matrix_Scale(gGfxMatrix, 1.4f, 0.0f, 1.4f, MTXF_APPLY);
Matrix_RotateY(gGfxMatrix, (actor->obj.rot.y + 180.0f) * M_DTOR, MTXF_APPLY);
Matrix_RotateZ(gGfxMatrix, actor->obj.rot.z * M_DTOR, MTXF_APPLY);
Matrix_RotateY(gGfxMatrix, (this->obj.rot.y + 180.0f) * M_DTOR, MTXF_APPLY);
Matrix_RotateZ(gGfxMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
if (actor->aiType <= AI360_PEPPY) {
if (this->aiType <= AI360_PEPPY) {
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 30.0f, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
gSPDisplayList(gMasterDisp++, D_1032780);
gSPDisplayList(gMasterDisp++, aArwingShadowDL);
} else if (gCurrentLevel == LEVEL_KATINA) {
if ((actor->animFrame == 1) || (actor->animFrame == 2)) {
gSPDisplayList(gMasterDisp++, D_KA_600D730);
if ((this->animFrame == 1) || (this->animFrame == 2)) {
gSPDisplayList(gMasterDisp++, aKaCornerianFighterShadowDL);
} else {
gSPDisplayList(gMasterDisp++, D_KA_600DBC0);
gSPDisplayList(gMasterDisp++, aKaEnemyShadowDL);
}
} else if ((actor->aiType <= AI360_ANDREW) || (gCurrentLevel != LEVEL_FORTUNA)) {
gSPDisplayList(gMasterDisp++, D_STAR_WOLF_F014310);
} else if ((this->aiType <= AI360_ANDREW) || (gCurrentLevel != LEVEL_FORTUNA)) {
gSPDisplayList(gMasterDisp++, aStarWolfShadowDL);
} else if (gCurrentLevel == LEVEL_FORTUNA) {
gSPDisplayList(gMasterDisp++, D_FO_6009F90);
gSPDisplayList(gMasterDisp++, aFoEnemyShadowDL);
} else {
gSPDisplayList(gMasterDisp++, D_STAR_WOLF_F014310);
gSPDisplayList(gMasterDisp++, aStarWolfShadowDL);
}
}
@@ -1810,7 +1810,7 @@ void Object_DrawAll(s32 arg0) {
Lights_SetOneLight(&gMasterDisp, -60, -60, 60, 150, 150, 150, 20, 20, 20);
for (i = 0, item = gItems; i < ARRAY_COUNT(gItems); i++, item++) {
for (i = 0, item = &gItems[0]; i < ARRAY_COUNT(gItems); i++, item++) {
if (item->obj.status >= OBJ_ACTIVE) {
Matrix_Push(&gGfxMatrix);
RCP_SetupDL(&gMasterDisp, SETUPDL_29);
@@ -1831,7 +1831,7 @@ void Effect_DrawAll(s32 arg0) {
RCP_SetupDL(&gMasterDisp, SETUPDL_64);
for (i = 0, effect = gEffects; i < ARRAY_COUNT(gEffects); i++, effect++) {
for (i = 0, effect = &gEffects[0]; i < ARRAY_COUNT(gEffects); i++, effect++) {
if (effect->obj.status >= OBJ_ACTIVE) {
if (effect->info.unk_14 == 1) {
effect->obj.rot.y = RAD_TO_DEG(-gPlayer[gPlayerNum].camYaw);
@@ -1856,7 +1856,7 @@ void Effect_DrawAll(s32 arg0) {
}
}
for (i = 0, boss = gBosses; i < ARRAY_COUNT(gBosses); i++, boss++) {
for (i = 0, boss = &gBosses[0]; i < ARRAY_COUNT(gBosses); i++, boss++) {
if ((boss->obj.status >= OBJ_ACTIVE) && (boss->obj.id == OBJ_BOSS_BO_BASE_SHIELD)) {
if ((boss->timer_05C % 2) == 0) {
RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
+1 -1
View File
@@ -3915,7 +3915,7 @@ void Effect_Effect395_Draw(Effect395* this) {
case 3:
RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
gSPDisplayList(gMasterDisp++, D_A6_601A120);
gSPDisplayList(gMasterDisp++, aA6SpaceMineDL);
break;
case 4:
+11 -11
View File
@@ -1179,8 +1179,8 @@ void Object_Init(s32 index, ObjectId objId) {
break;
case OBJ_ACTOR_ME_METEOR_2:
case OBJ_ACTOR_ME_LASER_CANNON_1:
gActors[index].unk_046 = gFogRed;
gActors[index].unk_048 = gFogNear;
gActors[index].work_046 = gFogRed;
gActors[index].work_048 = gFogNear;
gActors[index].obj.rot.x = RAND_FLOAT(360.0f);
gActors[index].obj.rot.y = RAND_FLOAT(360.0f);
break;
@@ -1218,11 +1218,11 @@ void Object_Init(s32 index, ObjectId objId) {
}
break;
case OBJ_ACTOR_ME_MORA:
gActors[index].unk_046 = 100;
gActors[index].work_046 = 100;
for (i = 0; i < 2; i++) {
if (gMeMoraStatus[i] == 0) {
gMeMoraStatus[i] = 1;
gActors[index].unk_046 = i;
gActors[index].work_046 = i;
for (j = 0; j < 100; j++) {
gMeMoraYpos[i][j] = gActors[index].obj.pos.y;
gMeMoraZpos[i][j] = gActors[index].obj.pos.z;
@@ -1230,7 +1230,7 @@ void Object_Init(s32 index, ObjectId objId) {
break;
}
}
if (gActors[index].unk_046 == 100) {
if (gActors[index].work_046 == 100) {
gActors[index].obj.status = OBJ_FREE;
}
break;
@@ -1425,8 +1425,8 @@ void func_enmy_80065380(MeMeteor2* this, f32 xPos, f32 yPos, f32 zPos, f32 arg4,
this->obj.pos.x = xPos;
this->obj.pos.y = yPos;
this->obj.pos.z = zPos;
this->unk_046 = 255;
this->unk_048 = 900;
this->work_046 = 255;
this->work_048 = 900;
this->obj.rot.z = RAND_FLOAT(360.0f);
this->obj.rot.y = RAND_FLOAT(360.0f);
Object_SetInfo(&this->info, this->obj.id);
@@ -2658,7 +2658,7 @@ void Actor_Move(Actor* this) {
var_fv0 = 4000.0f;
if ((this->obj.id == OBJ_ACTOR_ZO_DODORA) || (gCurrentLevel == LEVEL_MACBETH) ||
((this->obj.id == OBJ_ACTOR_EVENT) && (this->eventType == EVID_56))) {
((this->obj.id == OBJ_ACTOR_EVENT) && (this->eventType == EVID_TI_GREAT_FOX))) {
var_fv0 = 8000.0f;
} else if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ENTER_WARP_ZONE) {
var_fv0 = 100000.0f;
@@ -2680,13 +2680,13 @@ void Actor_Move(Actor* this) {
break;
case OBJ_ACTOR_ME_MORA:
gMeMoraStatus[this->unk_046] = 0;
gMeMoraStatus[this->work_046] = 0;
break;
case OBJ_ACTOR_EVENT:
if ((this->eventType >= EVID_200) && (this->eventType < EVID_300)) {
gMeMoraStatus[this->unk_046] = 0;
} else if ((this->eventType == EVID_SX_WARP_GATE) && (this->unk_046 != 2)) {
gMeMoraStatus[this->work_046] = 0;
} else if ((this->eventType == EVID_SX_WARP_GATE) && (this->work_046 != 2)) {
gRingPassCount = -1;
}
break;
+532 -513
View File
File diff suppressed because it is too large Load Diff
+19 -19
View File
@@ -1778,7 +1778,7 @@ void func_hud_80089AF4(void) {
gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 0, 0, 255);
Matrix_Scale(gGfxMatrix, 54.0f, 54.0f, 1.0f, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
gSPDisplayList(gMasterDisp++, D_STAR_WOLF_F014180);
gSPDisplayList(gMasterDisp++, aStarWolfRadarMarkDL);
}
void func_hud_80089B94(void) {
@@ -2461,7 +2461,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].eventType == EVID_SLIPPY_METEO) || (gActors[i].eventType == EVID_TEAMMATE) ||
if ((gActors[i].eventType == EVID_ME_SLIPPY) || (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)))) {
@@ -4525,7 +4525,7 @@ bool func_hud_800927A0(ActorTeamBoss* this) {
bool ret = false;
if (this->iwork[11] == 0) {
this->unk_046 = 0;
this->work_046 = 0;
this->iwork[11] = 1;
this->iwork[1] = 1;
this->vwork[29].x = this->obj.rot.x;
@@ -4537,22 +4537,22 @@ bool func_hud_800927A0(ActorTeamBoss* this) {
Math_SmoothStepToAngle(&this->vwork[29].x, 0.0f, 0.1f, 5.0f, 0.0f);
sp50 = Math_RadToDeg(Math_Atan2F(0.0f - this->obj.pos.x, 0.0f - this->obj.pos.z));
switch (this->unk_046) {
switch (this->work_046) {
case 0:
if (this->unk_04A != 0) {
if (this->work_04A != 0) {
this->timer_0BC = 30;
} else {
this->timer_0BC = 10;
}
this->unk_046 = 1;
this->work_046 = 1;
if (this->fwork[19] > 180.0f) {
this->fwork[19] = this->fwork[19] - 360.0f;
}
case 1:
if (this->timer_0BC == 0) {
this->unk_046 = 2;
if (this->unk_04A != 0) {
this->work_046 = 2;
if (this->work_04A != 0) {
this->timer_0BC = 80;
} else {
this->timer_0BC = 60;
@@ -4589,7 +4589,7 @@ bool func_hud_800927A0(ActorTeamBoss* this) {
this->fwork[20] = -180.0f;
}
this->iwork[1] = 1;
this->unk_046 = 3;
this->work_046 = 3;
}
this->fwork[28] -= 0.2f;
break;
@@ -4607,7 +4607,7 @@ bool func_hud_800927A0(ActorTeamBoss* this) {
Math_SmoothStepToF(&this->fwork[16], -sp54, 0.3f, 100.0f, 0.0f);
Math_SmoothStepToF(&this->fwork[27], -sp54, 0.3f, 100.0f, 0.0f);
if (this->unk_04A != 0) {
if (this->work_04A != 0) {
Math_SmoothStepToAngle(&this->rot_0F4.y, sp50, 0.1f, 2.0f, 0.0f);
}
@@ -4622,7 +4622,7 @@ bool func_hud_800927A0(ActorTeamBoss* this) {
if (this->timer_0BC == 0) {
ret = true;
this->iwork[11] = 0;
this->unk_046 = 0;
this->work_046 = 0;
this->fwork[28] = 0.0f;
this->fwork[20] = 0.0f;
this->fwork[29] = 1.0f;
@@ -4689,7 +4689,7 @@ void ActorTeamBoss_Update(ActorTeamBoss* this) {
this->health = gTeamShields[this->aiType];
switch (this->unk_048) {
switch (this->work_048) {
case 0:
func_hud_800914FC(this);
func_hud_80091864(this);
@@ -4724,29 +4724,29 @@ void ActorTeamBoss_Update(ActorTeamBoss* this) {
if ((this->iwork[10] != 0) && (gLevelMode == LEVELMODE_ALL_RANGE) && (this->iwork[9] == 0) &&
(gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) {
this->unk_048 = 2;
this->unk_04A = 0;
this->work_048 = 2;
this->work_04A = 0;
}
if ((gLevelMode == LEVELMODE_ALL_RANGE) &&
(fabsf(this->obj.pos.x > var_fv1) || fabsf(this->obj.pos.z > var_fv1)) &&
(gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) {
this->unk_048 = 2;
this->unk_04A = 1;
this->work_048 = 2;
this->work_04A = 1;
}
break;
case 1:
if (func_hud_800924E0(this) != 0) {
this->unk_048 = 0;
this->work_048 = 0;
this->iwork[9] = RAND_INT(30.0f) + 90;
}
break;
case 2:
if (func_hud_800927A0(this) != 0) {
this->unk_04A = 0;
this->unk_048 = this->unk_04A;
this->work_04A = 0;
this->work_048 = this->work_04A;
this->iwork[9] = RAND_INT(30.0f) + 90;
}
break;
+3 -3
View File
@@ -2035,14 +2035,14 @@ void Player_CollisionCheck(Player* player) {
Player_ApplyDamage(player, temp_v0, actor->info.damage);
}
} else if (actor->obj.id == OBJ_ACTOR_EVENT) {
if (actor->eventType == EVID_42) {
if (actor->eventType == EVID_SY_SHIP_2) {
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->eventType == EVID_63) {
} else if (actor->eventType == EVID_ME_BIG_METEOR) {
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);
@@ -2059,7 +2059,7 @@ void Player_CollisionCheck(Player* player) {
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;
actor->work_046 = 2;
gRingPassCount++;
if (gRingPassCount == 3) {
Radio_PlayMessage(gMsg_ID_5504, RCID_FALCO);