mirror of
https://github.com/HarbourMasters/Starship.git
synced 2025-02-02 16:23:57 +03:00
SectorZ_Missile_Update rename
This commit is contained in:
parent
1128c200e2
commit
d777ce9917
@ -30,7 +30,7 @@ void Katina_Boss316_Init(Boss *);
|
||||
void Katina_80198594(Actor*);
|
||||
void Katina_80198930(void);
|
||||
void SectorZ_80199900(Actor *, s32);
|
||||
void SectorZ_80199C60(Actor*);
|
||||
void SectorZ_Missile_Update(Actor*);
|
||||
void SectorZ_8019AB8C(Actor*);
|
||||
void SectorZ_8019EA68(void);
|
||||
|
||||
|
@ -156,7 +156,7 @@ D_i3_801C27A0 = 0x801C27A0; //segment:ovl_i3 size:0x20
|
||||
|
||||
Katina_80198594 = 0x80198594;//segment:ovl_i4
|
||||
Katina_Boss316_Init = 0x80193CA4;//segment:ovl_i4
|
||||
SectorZ_80199C60 = 0x80199C60;//segment:ovl_i4
|
||||
SectorZ_Missile_Update = 0x80199C60;//segment:ovl_i4
|
||||
SectorZ_80199900 = 0x80199900;//segment:ovl_i4
|
||||
D_i4_801A03C0 = 0x801A03C0;//segment:ovl_i4
|
||||
D_BO_8019EE80 = 0x8019EE80;//segment:ovl_i4
|
||||
|
@ -1379,7 +1379,7 @@ void ActorAllRange_Update(Actor* this) {
|
||||
sp104 = 2;
|
||||
break;
|
||||
case 5:
|
||||
SectorZ_80199C60(this);
|
||||
SectorZ_Missile_Update(this);
|
||||
sp104 = 1;
|
||||
break;
|
||||
case 0:
|
||||
|
@ -107,7 +107,7 @@ typedef enum {
|
||||
|
||||
// https://decomp.me/scratch/7td7r
|
||||
#ifdef NON_MATCHING
|
||||
void SectorZ_80199C60(Actor* missile) {
|
||||
void SectorZ_Missile_Update(Actor* this) {
|
||||
f32 xDist;
|
||||
f32 yDist;
|
||||
f32 zDist;
|
||||
@ -115,7 +115,7 @@ void SectorZ_80199C60(Actor* missile) {
|
||||
f32 y;
|
||||
s32 pad;
|
||||
|
||||
switch (++missile->iwork[9]) {
|
||||
switch (++this->iwork[9]) {
|
||||
case 600:
|
||||
Radio_PlayMessage(gMsg_ID_16080, RCID_ROB64);
|
||||
break;
|
||||
@ -130,31 +130,31 @@ void SectorZ_80199C60(Actor* missile) {
|
||||
}
|
||||
|
||||
/* Distance between the Great Fox and the missile */
|
||||
xDist = gBosses[0].obj.pos.x - missile->obj.pos.x;
|
||||
zDist = gBosses[0].obj.pos.z - missile->obj.pos.z;
|
||||
xDist = gBosses[0].obj.pos.x - this->obj.pos.x;
|
||||
zDist = gBosses[0].obj.pos.z - this->obj.pos.z;
|
||||
|
||||
SIN_DEG(gGameFrameCount); // WTF
|
||||
|
||||
if (xDist) {}
|
||||
if (zDist) {}
|
||||
|
||||
if (missile->aiType < AI360_GREAT_FOX) {
|
||||
xDist = SIN_DEG((missile->index * 45) + gGameFrameCount) * 5000.0f;
|
||||
zDist = COS_DEG((missile->index * 45) + (gGameFrameCount * 2)) * 5000.0f;
|
||||
if (this->aiType < AI360_GREAT_FOX) {
|
||||
xDist = SIN_DEG((this->index * 45) + gGameFrameCount) * 5000.0f;
|
||||
zDist = COS_DEG((this->index * 45) + (gGameFrameCount * 2)) * 5000.0f;
|
||||
} else {
|
||||
zDist = 0.0f;
|
||||
xDist = 0.0f;
|
||||
}
|
||||
|
||||
missile->fwork[MISSILE_TARGET_X] = (gBosses[0].obj.pos.x + xDist) + 400.0f;
|
||||
missile->fwork[MISSILE_TARGET_Y] = (gBosses[0].obj.pos.y + zDist) + 100.0f;
|
||||
missile->fwork[MISSILE_TARGET_Z] = gBosses[0].obj.pos.z;
|
||||
missile->fwork[3] = 1.4f;
|
||||
this->fwork[MISSILE_TARGET_X] = (gBosses[0].obj.pos.x + xDist) + 400.0f;
|
||||
this->fwork[MISSILE_TARGET_Y] = (gBosses[0].obj.pos.y + zDist) + 100.0f;
|
||||
this->fwork[MISSILE_TARGET_Z] = gBosses[0].obj.pos.z;
|
||||
this->fwork[3] = 1.4f;
|
||||
|
||||
if (((fabsf(missile->fwork[MISSILE_TARGET_X] - missile->obj.pos.x) < 800.0f) &&
|
||||
(fabsf(missile->fwork[MISSILE_TARGET_Y] - missile->obj.pos.y) < 800.0f)) &&
|
||||
(fabsf(missile->fwork[MISSILE_TARGET_Z] - missile->obj.pos.z) < 800.0f)) {
|
||||
SectorZ_80199900(missile, 0);
|
||||
if (((fabsf(this->fwork[MISSILE_TARGET_X] - this->obj.pos.x) < 800.0f) &&
|
||||
(fabsf(this->fwork[MISSILE_TARGET_Y] - this->obj.pos.y) < 800.0f)) &&
|
||||
(fabsf(this->fwork[MISSILE_TARGET_Z] - this->obj.pos.z) < 800.0f)) {
|
||||
SectorZ_80199900(this, 0);
|
||||
gCameraShake = 25;
|
||||
gBosses[0].dmgType = DMG_UNK_100;
|
||||
if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_5)) {
|
||||
@ -164,7 +164,8 @@ void SectorZ_80199C60(Actor* missile) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (((fabsf(missile->fwork[MISSILE_TARGET_Z] - missile->obj.pos.z) < 2000.0f) &&
|
||||
|
||||
if (((fabsf(this->fwork[MISSILE_TARGET_Z] - this->obj.pos.z) < 2000.0f) &&
|
||||
(((gPlayer[0].camEye.z < 0.0f) || (D_edisplay_801615D0.y < 0.0f)) ||
|
||||
(gPlayer[0].state_1C8 == PLAYERSTATE_1C8_10))) &&
|
||||
(((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_10)) ||
|
||||
@ -175,7 +176,7 @@ void SectorZ_80199C60(Actor* missile) {
|
||||
}
|
||||
}
|
||||
#else
|
||||
#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i4/fox_sz/SectorZ_80199C60.s")
|
||||
#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i4/fox_sz/SectorZ_Missile_Update.s")
|
||||
#endif
|
||||
|
||||
void SectorZ_80199FCC(Actor* actor, s32 arg1) {
|
||||
|
Loading…
Reference in New Issue
Block a user