mirror of
https://github.com/HarbourMasters/Starship.git
synced 2025-01-24 05:55:01 +03:00
initial tests
This commit is contained in:
parent
bbb96fec8d
commit
4d7c4aa71e
@ -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];
|
||||||
|
@ -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];
|
||||||
|
@ -8,6 +8,8 @@
|
|||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "assets/ast_katina.h"
|
#include "assets/ast_katina.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 } };
|
||||||
Vec3f D_i4_8019F138[] = { { 0.0f, -135.0f, -5.0f }, { 0.0f, -135.0f, 15.0f }, { -10.0f, 135.0f, 0.0f } };
|
Vec3f D_i4_8019F138[] = { { 0.0f, -135.0f, -5.0f }, { 0.0f, -135.0f, 15.0f }, { -10.0f, 135.0f, 0.0f } };
|
||||||
@ -774,50 +776,105 @@ void Katina_BossHandleDamage(KaSaucerer* this) {
|
|||||||
|
|
||||||
void Katina_BossSpawnEnemies(KaSaucerer* this, Vec3f* pos, f32 arg2) {
|
void Katina_BossSpawnEnemies(KaSaucerer* this, Vec3f* pos, f32 arg2) {
|
||||||
s32 i;
|
s32 i;
|
||||||
ActorAllRange* actor = &gActors[20];
|
ActorAllRange* actor = &gActors[100];
|
||||||
|
|
||||||
for (i = 10; i < 49; i++, actor++) {
|
/*INDEPENDENCE {
|
||||||
if (actor->obj.status == OBJ_FREE) {
|
for (i = 10; i < 500; i++, actor++) {
|
||||||
Actor_Initialize(actor);
|
if (actor->obj.status == OBJ_FREE) {
|
||||||
actor->obj.status = OBJ_ACTIVE;
|
if ((actor->index == 100) || (actor->index == 200)) {
|
||||||
actor->obj.id = OBJ_ACTOR_ALLRANGE;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
actor->obj.pos.x = this->obj.pos.x + pos->x;
|
Actor_Initialize(actor);
|
||||||
actor->obj.pos.y = this->obj.pos.y + pos->y;
|
actor->obj.status = OBJ_ACTIVE;
|
||||||
actor->obj.pos.z = this->obj.pos.z + pos->z;
|
actor->obj.id = OBJ_ACTOR_ALLRANGE;
|
||||||
|
|
||||||
actor->state = 1;
|
actor->obj.pos.x = this->obj.pos.x + pos->x;
|
||||||
actor->timer_0BC = 20;
|
actor->obj.pos.y = this->obj.pos.y + pos->y;
|
||||||
actor->rot_0F4.y = arg2;
|
actor->obj.pos.z = this->obj.pos.z + pos->z;
|
||||||
actor->rot_0F4.x = -30.0f;
|
|
||||||
|
|
||||||
actor->aiType = i + AI360_ENEMY;
|
actor->state = 1;
|
||||||
actor->animFrame = D_i4_8019F198[i - 10];
|
actor->timer_0BC = 20;
|
||||||
actor->aiIndex = sEnemySpawnTargets[i - 10];
|
actor->rot_0F4.y = arg2;
|
||||||
|
actor->rot_0F4.x = -30.0f;
|
||||||
|
|
||||||
actor->health = 24;
|
actor->aiType = i + AI360_ENEMY;
|
||||||
if (actor->animFrame >= 2) {
|
// actor->animFrame = D_i4_8019F198[i - 10];
|
||||||
actor->health = 1000;
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
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->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->aiIndex = sEnemySpawnTargets[i - 10];
|
||||||
|
|
||||||
|
actor->health = 24;
|
||||||
|
if (actor->animFrame >= 2) {
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1021,7 +1078,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 +1097,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) {
|
||||||
@ -1090,19 +1159,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 < 400) || (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 +1199,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) {
|
||||||
@ -1419,9 +1512,14 @@ 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,11 +1944,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 = 10; i < ARRAY_COUNT(gActors); i++) {
|
||||||
|
// if (gActors[i].animFrame == 0) {
|
||||||
|
// gActors[i].state = OBJ_DYING;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
//else {
|
||||||
|
for (i = 10; i < ARRAY_COUNT(gActors); i++) {
|
||||||
|
if (gActors[i].animFrame == 0) {
|
||||||
|
Object_Kill(&gActors[i].obj, gActors[i].sfxSource);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
//}
|
||||||
|
|
||||||
player->csState++;
|
player->csState++;
|
||||||
|
|
||||||
@ -2045,6 +2153,14 @@ 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 < ARRAY_COUNT(gActors); i++) {
|
||||||
|
// if (gActors[i].animFrame == 0) {
|
||||||
|
// Object_Kill(&gActors[i].obj, gActors[i].sfxSource);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -457,6 +457,17 @@ void DrawEnhancementsMenu() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DrawModsMenu() {
|
||||||
|
if (UIWidgets::BeginMenu("Mods")) {
|
||||||
|
UIWidgets::CVarCheckbox("Independence", "gModIndependence", {
|
||||||
|
.tooltip = "Katina 850 Enemies",
|
||||||
|
.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");
|
||||||
@ -620,6 +631,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);
|
||||||
|
Loading…
Reference in New Issue
Block a user