9 Commits

Author SHA1 Message Date
Sonic Dreamcaster
9e5e10ec15 fixes 2024-12-22 00:27:16 -03:00
Sonic Dreamcaster
bf088ce76b Independence description 2024-12-09 23:31:08 -03:00
Sonic Dreamcaster
be2218db0d Merge remote-tracking branch 'origin' into independence 2024-12-09 23:27:26 -03:00
Sonic Dreamcaster
dcd0b3ea78 Merge remote-tracking branch 'origin' into independence 2024-12-07 13:41:31 -03:00
Sonic Dreamcaster
9e1da7c485 Merge remote-tracking branch 'origin' into independence 2024-12-07 02:45:57 -03:00
Sonic Dreamcaster
d2799b396e fine tunning 2024-12-05 17:03:39 -03:00
Sonic Dreamcaster
2e6f5834ad independence update 2024-12-03 16:10:47 -03:00
Sonic Dreamcaster
913fb99fc9 disable freeze in spawner 2024-12-03 16:10:39 -03:00
Sonic Dreamcaster
4d7c4aa71e initial tests 2024-12-03 02:47:27 -03:00
5 changed files with 353 additions and 89 deletions

View File

@@ -230,13 +230,13 @@ extern s32 gCullObjects;
extern UNK_TYPE F_80161AC0[16]; extern UNK_TYPE F_80161AC0[16];
extern Scenery gScenery[50]; extern Scenery gScenery[50];
extern Sprite gSprites[40]; extern Sprite gSprites[40];
extern Actor gActors[60]; extern Actor gActors[/*60*/ 1000];
extern Boss gBosses[4]; extern Boss gBosses[4];
extern Effect gEffects[100]; extern Effect gEffects[/*100*/ 10000];
extern Item gItems[20]; extern Item gItems[/*20*/ 1000];
extern PlayerShot gPlayerShots[16]; extern PlayerShot gPlayerShots[16];
extern TexturedLine gTexturedLines[100]; extern TexturedLine gTexturedLines[100];
extern RadarMark gRadarMarks[65]; extern RadarMark gRadarMarks[/*65*/ 1005];
extern BonusText gBonusText[10]; extern BonusText gBonusText[10];
extern s32 gMeMoraStatus[2]; extern s32 gMeMoraStatus[2];
extern f32 gMeMoraXpos[2][100]; extern f32 gMeMoraXpos[2][100];

View File

@@ -278,13 +278,13 @@ UNK_TYPE F_80161AF0[4];
UNK_TYPE P_800D31A4 = 0; UNK_TYPE P_800D31A4 = 0;
Scenery gScenery[50]; Scenery gScenery[50];
Sprite gSprites[40]; Sprite gSprites[40];
Actor gActors[60]; Actor gActors[/*60*/1000];
Boss gBosses[4]; Boss gBosses[4];
Effect gEffects[100]; Effect gEffects[/*100*/ 10000];
Item gItems[20]; Item gItems[/*20*/ 1000];
PlayerShot gPlayerShots[16]; PlayerShot gPlayerShots[16];
TexturedLine gTexturedLines[100]; TexturedLine gTexturedLines[100];
RadarMark gRadarMarks[65]; RadarMark gRadarMarks[/*65*/ 1005];
BonusText gBonusText[10]; BonusText gBonusText[10];
s32 gMeMoraStatus[2]; s32 gMeMoraStatus[2];
f32 gMeMoraXpos[2][100]; f32 gMeMoraXpos[2][100];

View File

@@ -320,7 +320,7 @@ void Spawner_Playground(void) {
} }
void Spawner(void) { void Spawner(void) {
static bool sFreeze = true; // static bool sFreeze = false;
static s32 sHoldTimer = 0; static s32 sHoldTimer = 0;
ObjCount counter; ObjCount counter;
@@ -346,7 +346,7 @@ void Spawner(void) {
} else if (((sContHold->button & R_JPAD) && (sHoldTimer > 15)) || (sContPress->button & R_JPAD)) { } else if (((sContHold->button & R_JPAD) && (sHoldTimer > 15)) || (sContPress->button & R_JPAD)) {
sObjId++; sObjId++;
} else if (gControllerPress[0].button & D_JPAD) { } else if (gControllerPress[0].button & D_JPAD) {
sFreeze ^= 1; // Freeze arwing. // sFreeze ^= 1; // Freeze arwing.
} else if (gControllerPress[0].button & U_JPAD) { } else if (gControllerPress[0].button & U_JPAD) {
Spawner_ObjKill(); Spawner_ObjKill();
} else if (gControllerPress[0].button & R_CBUTTONS) { } else if (gControllerPress[0].button & R_CBUTTONS) {
@@ -391,11 +391,11 @@ void Spawner(void) {
} }
/* Freeze arwing */ /* Freeze arwing */
if (sFreeze) { // if (sFreeze) {
gPlayer[0].baseSpeed = 0; // gPlayer[0].baseSpeed = 0;
} else { // } else {
gPlayer[0].baseSpeed = gArwingSpeed; // gPlayer[0].baseSpeed = gArwingSpeed;
} // }
RCP_SetupDL(&gMasterDisp, SETUPDL_83_POINT); RCP_SetupDL(&gMasterDisp, SETUPDL_83_POINT);
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255);

View File

@@ -7,6 +7,9 @@
#include "prevent_bss_reordering.h" #include "prevent_bss_reordering.h"
#include "global.h" #include "global.h"
#include "assets/ast_katina.h" #include "assets/ast_katina.h"
#include "assets/ast_sector_z.h"
#define INDEPENDENCE if (CVarGetInteger("gModIndependence", 0) == 1)
Vec3f D_i4_8019F0F0[] = { { 7000.0f, 500.0f, -50 }, { 7700.0f, 550.0f, -50.0f }, { 6000.0f, 300.0f, 1950.0f } }; Vec3f D_i4_8019F0F0[] = { { 7000.0f, 500.0f, -50 }, { 7700.0f, 550.0f, -50.0f }, { 6000.0f, 300.0f, 1950.0f } };
Vec3f D_i4_8019F114[] = { { -30.0f, 0.0f, 0.0f }, { -30.0f, 0.0f, 0.0f }, { 0.0f, 5.0f, -40.0f } }; Vec3f D_i4_8019F114[] = { { -30.0f, 0.0f, 0.0f }, { -30.0f, 0.0f, 0.0f }, { 0.0f, 5.0f, -40.0f } };
@@ -608,11 +611,20 @@ void Katina_KaFrontlineBase_Draw(KaFrontlineBase* this) {
} }
void Katina_KaSaucerer_Init(KaSaucerer* this) { void Katina_KaSaucerer_Init(KaSaucerer* this) {
this->swork[BOSS_HATCH_1_HP] = 100; INDEPENDENCE {
this->swork[BOSS_HATCH_2_HP] = 100; this->swork[BOSS_HATCH_1_HP] = 100 * 5;
this->swork[BOSS_HATCH_3_HP] = 100; this->swork[BOSS_HATCH_2_HP] = 100 * 5;
this->swork[BOSS_HATCH_4_HP] = 100; this->swork[BOSS_HATCH_3_HP] = 100 * 5;
this->swork[BOSS_CORE_HP] = 400; this->swork[BOSS_HATCH_4_HP] = 100 * 5;
this->swork[BOSS_CORE_HP] = 400 * 8;
}
else {
this->swork[BOSS_HATCH_1_HP] = 100;
this->swork[BOSS_HATCH_2_HP] = 100;
this->swork[BOSS_HATCH_3_HP] = 100;
this->swork[BOSS_HATCH_4_HP] = 100;
this->swork[BOSS_CORE_HP] = 400;
}
this->fwork[BOSS_CORE_TARGET_LEVEL] = 850.0f; this->fwork[BOSS_CORE_TARGET_LEVEL] = 850.0f;
this->fwork[BOSS_CORE_LEVEL] = 850.0f; this->fwork[BOSS_CORE_LEVEL] = 850.0f;
this->vwork[0].y = 1000.0f; this->vwork[0].y = 1000.0f;
@@ -627,11 +639,21 @@ void Katina_Hatch_Destroy(KaSaucerer* this, s32 hatchIdx) {
this->obj.pos.z + (this->vwork[hatchIdx + 1].z * 1.3f), 15.0f); this->obj.pos.z + (this->vwork[hatchIdx + 1].z * 1.3f), 15.0f);
this->swork[hatchIdx + 5] = 60; this->swork[hatchIdx + 5] = 60;
for (i = 0; i < 20; i++) { INDEPENDENCE {
Effect_Effect357_Spawn50(this->obj.pos.x + RAND_FLOAT_CENTERED(300.0f) + (this->vwork[hatchIdx + 1].x * 1.3f), for (i = 0; i < 20 * 5; i++) {
this->obj.pos.y + RAND_FLOAT_CENTERED(300.0f) + (this->vwork[hatchIdx + 1].y * 1.3f), Effect_Effect357_Spawn50(
this->obj.pos.z + RAND_FLOAT_CENTERED(300.0f) + (this->vwork[hatchIdx + 1].z * 1.3f), this->obj.pos.x + RAND_FLOAT_CENTERED(300.0f) + (this->vwork[hatchIdx + 1].x * 1.3f),
1.55f); this->obj.pos.y + RAND_FLOAT_CENTERED(300.0f) + (this->vwork[hatchIdx + 1].y * 1.3f),
this->obj.pos.z + RAND_FLOAT_CENTERED(300.0f) + (this->vwork[hatchIdx + 1].z * 1.3f), 1.55f);
}
}
else {
for (i = 0; i < 20; i++) {
Effect_Effect357_Spawn50(
this->obj.pos.x + RAND_FLOAT_CENTERED(300.0f) + (this->vwork[hatchIdx + 1].x * 1.3f),
this->obj.pos.y + RAND_FLOAT_CENTERED(300.0f) + (this->vwork[hatchIdx + 1].y * 1.3f),
this->obj.pos.z + RAND_FLOAT_CENTERED(300.0f) + (this->vwork[hatchIdx + 1].z * 1.3f), 1.55f);
}
} }
pos.x = this->obj.pos.x + (this->vwork[hatchIdx + 1].x * 1.3f); pos.x = this->obj.pos.x + (this->vwork[hatchIdx + 1].x * 1.3f);
@@ -776,46 +798,121 @@ void Katina_BossSpawnEnemies(KaSaucerer* this, Vec3f* pos, f32 arg2) {
s32 i; s32 i;
ActorAllRange* actor = &gActors[20]; ActorAllRange* actor = &gActors[20];
for (i = 10; i < 49; i++, actor++) { INDEPENDENCE {
if (actor->obj.status == OBJ_FREE) { actor = &gActors[100];
Actor_Initialize(actor); for (i = 10; i <= 500; i++, actor++) {
actor->obj.status = OBJ_ACTIVE; // Protection against spawning actors with wrong radarmarks
actor->obj.id = OBJ_ACTOR_ALLRANGE; RadarMarkTypes radarMarkType = i + AI360_ENEMY;
switch (radarMarkType) {
actor->obj.pos.x = this->obj.pos.x + pos->x; case RADARMARK_MISSILE:
actor->obj.pos.y = this->obj.pos.y + pos->y; case RADARMARK_KA_SAUCERER:
actor->obj.pos.z = this->obj.pos.z + pos->z; case RADARMARK_BOSS:
case RADARMARK_SUPPIES:
actor->state = 1; case RADARMARK_ITEM_1:
actor->timer_0BC = 20; case RADARMARK_ITEM_2:
actor->rot_0F4.y = arg2; continue;
actor->rot_0F4.x = -30.0f;
actor->aiType = i + AI360_ENEMY;
actor->animFrame = D_i4_8019F198[i - 10];
actor->aiIndex = sEnemySpawnTargets[i - 10];
actor->health = 24;
if (actor->animFrame >= 2) {
actor->health = 1000;
} }
actor->drawShadow = true; if (actor->obj.status == OBJ_FREE) {
// if ((actor->index == 100) || (actor->index == 200)) {
// continue;
// }
if (D_i4_801A0540 < 9600) { Actor_Initialize(actor);
actor->itemDrop = DROP_SILVER_RING_10p; actor->obj.status = OBJ_ACTIVE;
actor->obj.id = OBJ_ACTOR_ALLRANGE;
actor->obj.pos.x = this->obj.pos.x + pos->x;
actor->obj.pos.y = this->obj.pos.y + pos->y;
actor->obj.pos.z = this->obj.pos.z + pos->z;
actor->state = 1;
actor->timer_0BC = 20;
actor->rot_0F4.y = arg2;
actor->rot_0F4.x = -30.0f;
actor->aiType = i + AI360_ENEMY;
// actor->animFrame = D_i4_8019F198[i - 10];
actor->animFrame = 0; // Katina Enemy model for all
// Enemy targets:
if (i < 40) {
actor->aiIndex = sEnemySpawnTargets[i - 10];
}
actor->health = 24;
if (actor->animFrame >= 2) {
actor->health = 1000;
}
actor->drawShadow = true;
if (D_i4_801A0540 < 9600) {
// actor->itemDrop = (Rand_ZeroOne() < 0.1f) ? DROP_SILVER_RING_10p : DROP_NONE;
if (Rand_ZeroOne() < 0.025f) {
actor->itemDrop = DROP_BOMB;
} else if (Rand_ZeroOne() < 0.025f) {
actor->itemDrop = DROP_SILVER_RING;
} else if (Rand_ZeroOne() < 0.025f) {
actor->itemDrop = DROP_LASERS;
}
}
actor->timer_0C2 = 30;
actor->timer_0C4 = 400;
Object_SetInfo(&actor->info, actor->obj.id);
AUDIO_PLAY_SFX(NA_SE_EN_PASS, actor->sfxSource, 4);
actor->info.action = (ObjectFunc) Katina_EnemyUpdate;
actor->info.draw = (ObjectFunc) Katina_EnemyDraw;
break;
} }
}
}
else {
for (i = 10; i < 49; i++, actor++) {
if (actor->obj.status == OBJ_FREE) {
Actor_Initialize(actor);
actor->obj.status = OBJ_ACTIVE;
actor->obj.id = OBJ_ACTOR_ALLRANGE;
actor->timer_0C2 = 30; actor->obj.pos.x = this->obj.pos.x + pos->x;
actor->timer_0C4 = 400; actor->obj.pos.y = this->obj.pos.y + pos->y;
actor->obj.pos.z = this->obj.pos.z + pos->z;
Object_SetInfo(&actor->info, actor->obj.id); actor->state = 1;
actor->timer_0BC = 20;
actor->rot_0F4.y = arg2;
actor->rot_0F4.x = -30.0f;
AUDIO_PLAY_SFX(NA_SE_EN_PASS, actor->sfxSource, 4); actor->aiType = i + AI360_ENEMY;
actor->animFrame = D_i4_8019F198[i - 10];
actor->aiIndex = sEnemySpawnTargets[i - 10];
actor->info.action = (ObjectFunc) Katina_EnemyUpdate; actor->health = 24;
actor->info.draw = (ObjectFunc) Katina_EnemyDraw; if (actor->animFrame >= 2) {
break; actor->health = 1000;
}
actor->drawShadow = true;
if (D_i4_801A0540 < 9600) {
actor->itemDrop = DROP_SILVER_RING_10p;
}
actor->timer_0C2 = 30;
actor->timer_0C4 = 400;
Object_SetInfo(&actor->info, actor->obj.id);
AUDIO_PLAY_SFX(NA_SE_EN_PASS, actor->sfxSource, 4);
actor->info.action = (ObjectFunc) Katina_EnemyUpdate;
actor->info.draw = (ObjectFunc) Katina_EnemyDraw;
break;
}
} }
} }
} }
@@ -872,8 +969,8 @@ void Katina_KaSaucerer_Update(KaSaucerer* this) {
if ((((this->swork[BOSS_HATCH_1_HP] <= 0) && (this->swork[BOSS_HATCH_2_HP] <= 0) && if ((((this->swork[BOSS_HATCH_1_HP] <= 0) && (this->swork[BOSS_HATCH_2_HP] <= 0) &&
(this->swork[BOSS_HATCH_3_HP] <= 0) && (this->swork[BOSS_HATCH_4_HP] <= 0)) || (this->swork[BOSS_HATCH_3_HP] <= 0) && (this->swork[BOSS_HATCH_4_HP] <= 0)) ||
(this->swork[BOSS_CORE_TIMER] == 1)) && (this->swork[BOSS_CORE_TIMER] == 1)) &&
(this->state < 10)) { (this->state < SAUCERER_LOWER_CORE)) {
this->state = 10; this->state = SAUCERER_LOWER_CORE;
this->timer_050 = 50; this->timer_050 = 50;
} }
@@ -1021,7 +1118,12 @@ void Katina_KaSaucerer_Update(KaSaucerer* this) {
if (this->timer_050 == 0) { if (this->timer_050 == 0) {
this->state++; this->state++;
this->timer_050 = 100; this->timer_050 = 100;
this->timer_052 = 310; INDEPENDENCE {
this->timer_052 = /*310*/ 410;
}
else {
this->timer_052 = 310;
}
AUDIO_PLAY_SFX(NA_SE_KA_UFO_HATCH_STOP, this->sfxSource, 0); AUDIO_PLAY_SFX(NA_SE_KA_UFO_HATCH_STOP, this->sfxSource, 0);
} }
break; break;
@@ -1035,8 +1137,15 @@ void Katina_KaSaucerer_Update(KaSaucerer* this) {
AUDIO_PLAY_BGM(NA_BGM_BOSS_KA); AUDIO_PLAY_BGM(NA_BGM_BOSS_KA);
} }
if ((this->timer_050 == 0) && ((this->timer_052 % 16) == 0)) { INDEPENDENCE {
Katina_SetOutcomingEnemyAngle(this); if ((this->timer_050 == 0) && ((this->timer_052 % /*16*/ 2) == 0)) {
Katina_SetOutcomingEnemyAngle(this);
}
}
else {
if ((this->timer_050 == 0) && ((this->timer_052 % 16) == 0)) {
Katina_SetOutcomingEnemyAngle(this);
}
} }
if (this->timer_052 == 0) { if (this->timer_052 == 0) {
@@ -1065,7 +1174,12 @@ void Katina_KaSaucerer_Update(KaSaucerer* this) {
this->timer_054 = 200; this->timer_054 = 200;
this->timer_056 = 1280; this->timer_056 = 1280;
this->swork[BOSS_CORE_TIMER] = 5760; INDEPENDENCE {
this->swork[BOSS_CORE_TIMER] = 5760 * 2;
}
else {
this->swork[BOSS_CORE_TIMER] = 5760;
}
gBossFrameCount = 0; gBossFrameCount = 0;
@@ -1090,19 +1204,37 @@ void Katina_KaSaucerer_Update(KaSaucerer* this) {
Math_SmoothStepToF(&this->fwork[BOSS_MOVEMENT_SPEED], 30.0f, 0.1f, 0.5f, 0.0f); Math_SmoothStepToF(&this->fwork[BOSS_MOVEMENT_SPEED], 30.0f, 0.1f, 0.5f, 0.0f);
if ((enemyCount < 30) || (this->timer_056 == 0)) { INDEPENDENCE {
this->state = 7; if ((enemyCount < 350) || (this->timer_056 == 0)) {
this->timer_050 = 300; this->state = SAUCERER_SEND_ENEMIES;
this->timer_050 = 300;
AUDIO_PLAY_SFX(NA_SE_KA_UFO_HATCH_OPEN, this->sfxSource, 0); AUDIO_PLAY_SFX(NA_SE_KA_UFO_HATCH_OPEN, this->sfxSource, 0);
this->fwork[BOSS_Y_ROT_SPEED_TARGET] = 0.0f; this->fwork[BOSS_Y_ROT_SPEED_TARGET] = 0.0f;
this->fwork[BOSS_HATCH_4_ANGLE_TARGET] = 30.0f; this->fwork[BOSS_HATCH_4_ANGLE_TARGET] = 30.0f;
this->fwork[BOSS_HATCH_3_ANGLE_TARGET] = 30.0f; this->fwork[BOSS_HATCH_3_ANGLE_TARGET] = 30.0f;
this->fwork[BOSS_HATCH_2_ANGLE_TARGET] = 30.0f; this->fwork[BOSS_HATCH_2_ANGLE_TARGET] = 30.0f;
this->fwork[BOSS_HATCH_1_ANGLE_TARGET] = 30.0f; this->fwork[BOSS_HATCH_1_ANGLE_TARGET] = 30.0f;
Radio_PlayMessage(gMsg_ID_18045, RCID_BILL); Radio_PlayMessage(gMsg_ID_18045, RCID_BILL);
}
}
else {
if ((enemyCount < 30) || (this->timer_056 == 0)) {
this->state = 7;
this->timer_050 = 300;
AUDIO_PLAY_SFX(NA_SE_KA_UFO_HATCH_OPEN, this->sfxSource, 0);
this->fwork[BOSS_Y_ROT_SPEED_TARGET] = 0.0f;
this->fwork[BOSS_HATCH_4_ANGLE_TARGET] = 30.0f;
this->fwork[BOSS_HATCH_3_ANGLE_TARGET] = 30.0f;
this->fwork[BOSS_HATCH_2_ANGLE_TARGET] = 30.0f;
this->fwork[BOSS_HATCH_1_ANGLE_TARGET] = 30.0f;
Radio_PlayMessage(gMsg_ID_18045, RCID_BILL);
}
} }
break; break;
@@ -1112,9 +1244,15 @@ void Katina_KaSaucerer_Update(KaSaucerer* this) {
*/ */
case SAUCERER_SEND_ENEMIES: case SAUCERER_SEND_ENEMIES:
Math_SmoothStepToF(&this->fwork[10], 0.0f, 0.1f, 0.5f, 0.0f); Math_SmoothStepToF(&this->fwork[10], 0.0f, 0.1f, 0.5f, 0.0f);
INDEPENDENCE {
if ((this->timer_050 < 200) && ((this->timer_050 % 16) == 0)) { if ((this->timer_050 < 200) && ((this->timer_050 % /*16*/ 1) == 0)) {
Katina_SetOutcomingEnemyAngle(this); Katina_SetOutcomingEnemyAngle(this);
}
}
else {
if ((this->timer_050 < 200) && ((this->timer_050 % 16) == 0)) {
Katina_SetOutcomingEnemyAngle(this);
}
} }
if (this->timer_050 == 240) { if (this->timer_050 == 240) {
@@ -1122,7 +1260,7 @@ void Katina_KaSaucerer_Update(KaSaucerer* this) {
} }
if (this->timer_050 == 0) { if (this->timer_050 == 0) {
this->state = 6; this->state = SAUCERER_OPEN_HATCHES;
this->fwork[BOSS_HATCH_4_ANGLE_TARGET] = 0.0f; this->fwork[BOSS_HATCH_4_ANGLE_TARGET] = 0.0f;
this->fwork[BOSS_HATCH_3_ANGLE_TARGET] = 0.0f; this->fwork[BOSS_HATCH_3_ANGLE_TARGET] = 0.0f;
this->fwork[BOSS_HATCH_2_ANGLE_TARGET] = 0.0f; this->fwork[BOSS_HATCH_2_ANGLE_TARGET] = 0.0f;
@@ -1139,14 +1277,21 @@ void Katina_KaSaucerer_Update(KaSaucerer* this) {
this->fwork[BOSS_CORE_TARGET_LEVEL] = 200.0f; this->fwork[BOSS_CORE_TARGET_LEVEL] = 200.0f;
AUDIO_PLAY_SFX(NA_SE_KA_UFO_CORE_OPEN, this->sfxSource, 0); AUDIO_PLAY_SFX(NA_SE_KA_UFO_CORE_OPEN, this->sfxSource, 0);
Audio_KillSfxBySourceAndId(this->sfxSource, NA_SE_KA_UFO_ENGINE); Audio_KillSfxBySourceAndId(this->sfxSource, NA_SE_KA_UFO_ENGINE);
this->state = 11; this->state = SAUCERER_LASER_CHARGE_START;
this->timer_050 = 100; this->timer_050 = 100;
Radio_PlayMessage(gMsg_ID_18050, RCID_BILL); Radio_PlayMessage(gMsg_ID_18050, RCID_BILL);
gAllRangeCountdownScale = 1.0f; gAllRangeCountdownScale = 1.0f;
gShowAllRangeCountdown = true; gShowAllRangeCountdown = true;
gAllRangeCountdown[0] = 1; INDEPENDENCE {
gAllRangeCountdown[1] = 1; gAllRangeCountdown[0] = 2;
gAllRangeCountdown[2] = 30; gAllRangeCountdown[1] = 2;
gAllRangeCountdown[2] = 10;
}
else {
gAllRangeCountdown[0] = 1;
gAllRangeCountdown[1] = 1;
gAllRangeCountdown[2] = 30;
}
} }
break; break;
@@ -1154,8 +1299,13 @@ void Katina_KaSaucerer_Update(KaSaucerer* this) {
case SAUCERER_LASER_CHARGE_START: case SAUCERER_LASER_CHARGE_START:
if (this->timer_050 == 0) { if (this->timer_050 == 0) {
AUDIO_PLAY_SFX(NA_SE_KA_UFO_HATCH_STOP, this->sfxSource, 0); AUDIO_PLAY_SFX(NA_SE_KA_UFO_HATCH_STOP, this->sfxSource, 0);
this->state = 12; this->state = SAUCERER_CS_LASER_CHARGE_END;
this->timer_050 = 1928; INDEPENDENCE {
this->timer_050 = 1928 * 2;
}
else {
this->timer_050 = 1928;
}
Radio_PlayMessage(gMsg_ID_18055, RCID_BILL); Radio_PlayMessage(gMsg_ID_18055, RCID_BILL);
AUDIO_PLAY_SFX(NA_SE_KA_UFO_LONG_CHARGE, this->sfxSource, 0); AUDIO_PLAY_SFX(NA_SE_KA_UFO_LONG_CHARGE, this->sfxSource, 0);
} }
@@ -1353,7 +1503,7 @@ void Katina_KaSaucerer_Update(KaSaucerer* this) {
if (this->timer_050 == 1) { if (this->timer_050 == 1) {
gBosses[KA_BOSS_BASE].state = 1; gBosses[KA_BOSS_BASE].state = 1;
this->state = 18; this->state = SAUCERER_CS_LASER_HIT;
this->timer_050 = 50; this->timer_050 = 50;
AUDIO_PLAY_SFX(NA_SE_EXPLOSION_DEMO3, this->sfxSource, 0); AUDIO_PLAY_SFX(NA_SE_EXPLOSION_DEMO3, this->sfxSource, 0);
} }
@@ -1419,8 +1569,13 @@ void Katina_KaSaucerer_Update(KaSaucerer* this) {
AUDIO_PLAY_SFX(NA_SE_KA_UFO_FALLING, this->sfxSource, 0); AUDIO_PLAY_SFX(NA_SE_KA_UFO_FALLING, this->sfxSource, 0);
for (i = 0; i < ARRAY_COUNT(gEffects); i++) { INDEPENDENCE {
Object_Kill(&gEffects[i].obj, gEffects[i].sfxSource); // Nothing for now
}
else {
for (i = 0; i < ARRAY_COUNT(gEffects); i++) {
Object_Kill(&gEffects[i].obj, gEffects[i].sfxSource);
}
} }
} }
break; break;
@@ -1846,9 +2001,21 @@ void Katina_LevelComplete(Player* player) {
gCsCamAtX = boss->obj.pos.x; gCsCamAtX = boss->obj.pos.x;
gCsCamAtY = 1000.0f; gCsCamAtY = 1000.0f;
gCsCamAtZ = boss->obj.pos.z; gCsCamAtZ = boss->obj.pos.z;
for (i = 10; i < ARRAY_COUNT(gActors); i++) {
if (gActors[i].animFrame == 0) { INDEPENDENCE {
Object_Kill(&gActors[i].obj, gActors[i].sfxSource); for (i = 100; i <= 500; i++) {
if (gActors[i].obj.status == OBJ_ACTIVE) {
if (gActors[i].animFrame == 0) {
gActors[i].obj.status = OBJ_DYING;
}
}
}
}
else {
for (i = 10; i < ARRAY_COUNT(gActors); i++) {
if (gActors[i].animFrame == 0) {
Object_Kill(&gActors[i].obj, gActors[i].sfxSource);
}
} }
} }
@@ -2045,6 +2212,16 @@ void Katina_LevelComplete(Player* player) {
} else { } else {
Radio_PlayMessage(gMsg_ID_18085, RCID_PEPPY); Radio_PlayMessage(gMsg_ID_18085, RCID_PEPPY);
} }
INDEPENDENCE {
for (i = 100; i <= 500; i++) {
if (gActors[i].obj.status == OBJ_ACTIVE) {
if (gActors[i].animFrame == 0) {
Object_Kill(&gActors[i].obj, gActors[i].sfxSource);
}
}
}
}
break; break;
} }
break; break;
@@ -2267,6 +2444,35 @@ void Katina_BillFighterInit(void) {
AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4);
} }
void Mod_Independence_SpawnMissile(ActorAllRange* this, s32 missileWaveIdx) {
Vec3f sModIndependenceMissileInitPos[] = {
{ 0.0f, 100.0f, 35000.0f },
{ -2000.0f, 0.0f, 35000.0f },
{ 2000.0f, 0.0f, 35000.0f },
};
Actor_Initialize(this);
this->obj.status = OBJ_INIT;
this->obj.id = OBJ_ACTOR_ALLRANGE;
this->aiType = AI360_MISSILE;
this->obj.pos.x = sModIndependenceMissileInitPos[missileWaveIdx].x;
this->obj.pos.y = sModIndependenceMissileInitPos[missileWaveIdx].y;
this->obj.pos.z = sModIndependenceMissileInitPos[missileWaveIdx].z;
this->state = 5;
this->rot_0F4.y = 180.0f;
Object_SetInfo(&this->info, this->obj.id);
this->health = 250;
this->info.drawType = 2;
this->info.hitbox = SEGMENTED_TO_VIRTUAL(aSZMissileHitbox);
this->fwork[1] = 25.0f;
this->fwork[29] = 2.0f;
AUDIO_PLAY_SFX(NA_SE_EN_PUNCH_ENGINE, this->sfxSource, 4);
}
void Katina_UpdateEvents(ActorAllRange* this) { void Katina_UpdateEvents(ActorAllRange* this) {
s32 pad[4]; s32 pad[4];
f32 D_i4_8019F494[5] = { -200.0f, -100.0f, -0.0f, 100.0f, 200.0f }; f32 D_i4_8019F494[5] = { -200.0f, -100.0f, -0.0f, 100.0f, 200.0f };
@@ -2332,6 +2538,49 @@ void Katina_UpdateEvents(ActorAllRange* this) {
Radio_PlayMessage(gMsg_ID_18010, RCID_SLIPPY); Radio_PlayMessage(gMsg_ID_18010, RCID_SLIPPY);
break; break;
} }
/*
INDEPENDENCE {
switch (gAllRangeEventTimer) {
case -600:
D_hud_80161710 = 490;
Mod_Independence_SpawnMissile(&gActors[600], 0);
gActors[600].fwork[1] = 10.0f;
gActors[600].obj.pos.z = 25000.0f;
// SectorZ_SpawnMissileEscort(&gActors[SZ_ESCORT_1], 0);
// SectorZ_SpawnMissileEscort(&gActors[SZ_ESCORT_2], 1);
// SectorZ_SpawnMissileEscort(&gActors[SZ_ESCORT_3], 2);
// SectorZ_SpawnMissileEscort(&gActors[SZ_ESCORT_4], 3);
gPlayer[0].state_1C8 = PLAYERSTATE_1C8_STANDBY;
// this->state = 10;
// this->fwork[10] = 0.0f;
gPlayer[0].camRoll = 15.0f;
gPlayer[0].cam.eye.x = gActors[600].obj.pos.x - 25000.0f;
gPlayer[0].cam.eye.y = gActors[600].obj.pos.y;
gPlayer[0].cam.eye.z = gActors[600].obj.pos.z;
gPlayer[0].cam.at.x = gActors[600].obj.pos.x;
gPlayer[0].cam.at.y = gActors[600].obj.pos.y;
gPlayer[0].cam.at.z = gActors[600].obj.pos.z;
//this->timer_0BC = 10000;
//gFillScreenAlpha = gFillScreenAlphaTarget = 255;
//gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0;
AUDIO_PLAY_BGM(NA_BGM_BOSS_SZ);
break;
case -210:
gPlayer[0].state_1C8 = PLAYERSTATE_1C8_ACTIVE;
Camera_Update360(&gPlayer[0], true);
break;
}
}
*/
if (gBosses[KA_BOSS_SAUCERER].state == 12) { if (gBosses[KA_BOSS_SAUCERER].state == 12) {
if (((gAllRangeEventTimer % 256) == 0) && (Rand_ZeroOne() < 0.5f)) { if (((gAllRangeEventTimer % 256) == 0) && (Rand_ZeroOne() < 0.5f)) {

View File

@@ -452,6 +452,17 @@ void DrawEnhancementsMenu() {
} }
} }
void DrawModsMenu() {
if (UIWidgets::BeginMenu("Mods")) {
UIWidgets::CVarCheckbox("Independence", "gModIndependence", {
.tooltip = "A reimagined Katina battlefield with over 500 enemies to conquer. Are you ready?",
.defaultValue = false
});
ImGui::EndMenu();
}
}
void DrawCheatsMenu() { void DrawCheatsMenu() {
if (UIWidgets::BeginMenu("Cheats")) { if (UIWidgets::BeginMenu("Cheats")) {
UIWidgets::CVarCheckbox("Infinite Lives", "gInfiniteLives"); UIWidgets::CVarCheckbox("Infinite Lives", "gInfiniteLives");
@@ -612,6 +623,10 @@ void GameMenuBar::DrawElement() {
ImGui::SetCursorPosY(0.0f); ImGui::SetCursorPosY(0.0f);
DrawModsMenu();
ImGui::SetCursorPosY(0.0f);
DrawCheatsMenu(); DrawCheatsMenu();
ImGui::SetCursorPosY(0.0f); ImGui::SetCursorPosY(0.0f);