mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-06-23 01:29:51 -04:00
Big cleanup, change checks for non-triforce hunt, add more Dana kak models
This commit is contained in:
@@ -769,7 +769,7 @@ void Play_Init(GameState* thisx) {
|
||||
GET_PLAYER(play)->actor.world.pos.z, 0, 0, 0, 1, true);
|
||||
}
|
||||
|
||||
if (play->sceneNum == SCENE_KAKARIKO_VILLAGE && Randomizer_GetSettingValue(RSK_TRIFORCE_HUNT)) {
|
||||
if (play->sceneNum == SCENE_KAKARIKO_VILLAGE) {
|
||||
Actor_Spawn(&play->actorCtx, play, gEnChristmasTreeId, -734, 0, 420, 0, 0, 0, 0, true);
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ void EnChristmasDeco_Update(Actor* thisx, PlayState* play);
|
||||
void EnChristmasDeco_Draw(Actor* thisx, PlayState* play);
|
||||
|
||||
void EnChristmasDeco_Init(Actor* thisx, PlayState* play) {
|
||||
|
||||
}
|
||||
|
||||
void EnChristmasDeco_Destroy(Actor* thisx, PlayState* play) {
|
||||
@@ -28,15 +29,20 @@ void EnChristmasDeco_Draw(Actor* thisx, PlayState* play) {
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
Matrix_Translate(0, 0, 0, MTXMODE_APPLY);
|
||||
Matrix_RotateZYX(0, 0, 0, MTXMODE_APPLY);
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
|
||||
Matrix_Scale(decoSize, decoSize, decoSize, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, (char*)__FILE__, __LINE__), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
|
||||
// Assertion Halt in Debug mode, switch to Release when testing.
|
||||
if (play->sceneNum == SCENE_KAKARIKO_VILLAGE) {
|
||||
gSPDisplayList(POLY_OPA_DISP++, gFrontGateDecorDL);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gKakarikoDecorDL); //Assertion Halt in Debug mode, switch to Release when testing.
|
||||
gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gKakarikoDecorDL);
|
||||
if (LINK_IS_CHILD) {
|
||||
gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gKakarikoChildDecorDL);
|
||||
} else {
|
||||
gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gKakarikoAdultDecorDL);
|
||||
}
|
||||
}
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
|
||||
@@ -65,7 +65,7 @@ void EnChristmasTree_Destroy(Actor* thisx, PlayState* play) {
|
||||
void EnChristmasTree_Wait(EnChristmasTree* this, PlayState* play) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, play)) { // if talk is initiated
|
||||
this->actionFunc = EnChristmasTree_Talk;
|
||||
} else if ((this->actor.xzDistToPlayer < 170.0f)) { // talk range
|
||||
} else if ((this->actor.xzDistToPlayer < 170.0f) && Randomizer_GetSettingValue(RSK_TRIFORCE_HUNT)) { // talk range
|
||||
func_8002F2CC(&this->actor, play, 170.0f);
|
||||
}
|
||||
}
|
||||
@@ -93,12 +93,16 @@ void EnChristmasTree_SetupEndTitle(EnChristmasTree* this, PlayState* play) {
|
||||
|
||||
GameInteractor_SetNoUIActive(1);
|
||||
|
||||
Actor_Spawn(&gPlayState->actorCtx, gPlayState, ACTOR_END_TITLE, 0, 0, 0, 0, 0, 0, 2, false);
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_END_TITLE, 0, 0, 0, 0, 0, 0, 2, false);
|
||||
|
||||
player->stateFlags1 = PLAYER_STATE1_INPUT_DISABLED;
|
||||
|
||||
Flags_SetRandomizerInf(RAND_INF_GRANT_GANONS_BOSSKEY);
|
||||
|
||||
Play_PerformSave(play);
|
||||
|
||||
Camera_ChangeMode(Play_GetCamera(play, play->mainCamera.thisIdx), CAM_MODE_STILL);
|
||||
|
||||
this->actionFunc = EnChristmasTree_Wait;
|
||||
}
|
||||
|
||||
@@ -111,15 +115,26 @@ void EnChristmasTree_Update(Actor* thisx, PlayState* play) {
|
||||
|
||||
Actor_SetFocus(&this->actor, 80.0f);
|
||||
|
||||
uint8_t triforceHuntActive = Randomizer_GetSettingValue(RSK_TRIFORCE_HUNT);
|
||||
float percentageCompleted = (float)gSaveContext.triforcePiecesCollected /
|
||||
(float)Randomizer_GetSettingValue(RSK_TRIFORCE_HUNT_PIECES_REQUIRED);
|
||||
|
||||
if ((percentageCompleted >= 1.0f || !triforceHuntActive) && !this->spawnedRupee) {
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_WONDER_ITEM, this->actor.world.pos.x, this->actor.world.pos.y + 280,
|
||||
this->actor.world.pos.z, 0, 0, LINK_IS_ADULT ? 1 : 4, 0x1ABF, false);
|
||||
this->spawnedRupee = 1;
|
||||
}
|
||||
|
||||
this->actionFunc(this, play);
|
||||
}
|
||||
|
||||
void EnChristmasTree_Draw(Actor* thisx, PlayState* play) {
|
||||
EnChristmasTree* this = (EnChristmasTree*)thisx;
|
||||
|
||||
|
||||
float treeSize = 55.0f;
|
||||
uint8_t triforceHuntActive = Randomizer_GetSettingValue(RSK_TRIFORCE_HUNT);
|
||||
float percentageCompleted = (float)gSaveContext.triforcePiecesCollected /
|
||||
(float)Randomizer_GetSettingValue(RSK_TRIFORCE_HUNT_PIECES_REQUIRED);
|
||||
float treeSize = 55.0f;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
@@ -130,42 +145,37 @@ void EnChristmasTree_Draw(Actor* thisx, PlayState* play) {
|
||||
|
||||
gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gXmasTreeDL);
|
||||
|
||||
if (percentageCompleted >= 0.1f) {
|
||||
if (percentageCompleted >= 0.1f || !triforceHuntActive) {
|
||||
gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gXmasDecor10DL);
|
||||
}
|
||||
if (percentageCompleted >= 0.2f) {
|
||||
if (percentageCompleted >= 0.2f || !triforceHuntActive) {
|
||||
gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gXmasDecor20DL);
|
||||
}
|
||||
if (percentageCompleted >= 0.3f) {
|
||||
if (percentageCompleted >= 0.3f || !triforceHuntActive) {
|
||||
gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gXmasDecor30DL);
|
||||
}
|
||||
if (percentageCompleted >= 0.4f) {
|
||||
if (percentageCompleted >= 0.4f || !triforceHuntActive) {
|
||||
gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gXmasDecor40DL);
|
||||
}
|
||||
if (percentageCompleted >= 0.5f) {
|
||||
if (percentageCompleted >= 0.5f || !triforceHuntActive) {
|
||||
gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gXmasDecor50DL);
|
||||
}
|
||||
if (percentageCompleted >= 0.6f) {
|
||||
if (percentageCompleted >= 0.6f || !triforceHuntActive) {
|
||||
gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gXmasDecor60DL);
|
||||
}
|
||||
if (percentageCompleted >= 0.7f) {
|
||||
if (percentageCompleted >= 0.7f || !triforceHuntActive) {
|
||||
gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gXmasDecor70DL);
|
||||
}
|
||||
if (percentageCompleted >= 0.8f) {
|
||||
if (percentageCompleted >= 0.8f || !triforceHuntActive) {
|
||||
gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gXmasDecor80DL);
|
||||
}
|
||||
if (percentageCompleted >= 0.9f) {
|
||||
if (percentageCompleted >= 0.9f || !triforceHuntActive) {
|
||||
gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gXmasDecor90DL);
|
||||
}
|
||||
if (percentageCompleted >= 1.0f) {
|
||||
if (percentageCompleted >= 1.0f || !triforceHuntActive) {
|
||||
gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gXmasDecor100DL);
|
||||
gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gXmasStarDL);
|
||||
}
|
||||
if (percentageCompleted >= 1.0f && this->spawnedRupee == 0) {
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_WONDER_ITEM, this->actor.world.pos.x, this->actor.world.pos.y + 280,
|
||||
this->actor.world.pos.z, 0, 0, LINK_IS_ADULT ? 1 : 4, 0x1ABF, false);
|
||||
this->spawnedRupee = 1;
|
||||
}
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
@@ -66,10 +66,13 @@ void EnHs2_Init(Actor* thisx, PlayState* play) {
|
||||
this->unk_2A8 = 0;
|
||||
this->actor.targetMode = 6;
|
||||
|
||||
this->actor.world.pos.x = 756.0;
|
||||
this->actor.world.pos.y = 80.0;
|
||||
this->actor.world.pos.z = 1378.0;
|
||||
this->actor.shape.rot.y = 32534;
|
||||
if (play->sceneNum == SCENE_KAKARIKO_VILLAGE) {
|
||||
this->actor.world.pos.x = 756.0;
|
||||
this->actor.world.pos.y = 80.0;
|
||||
this->actor.world.pos.z = 1378.0;
|
||||
this->actor.shape.rot.y = 32534;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void EnHs2_Destroy(Actor* thisx, PlayState* play) {
|
||||
|
||||
@@ -898,17 +898,19 @@ void EnHy_Init(Actor* thisx, PlayState* play) {
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
|
||||
if (this->actor.params == 1929) {
|
||||
this->actor.world.pos.x = 261.826;
|
||||
this->actor.world.pos.y = 240.0;
|
||||
this->actor.world.pos.z = 1669.660;
|
||||
this->actor.shape.rot.y = 23784;
|
||||
}
|
||||
if (this->actor.params == 1930) {
|
||||
this->actor.world.pos.x = 262.224;
|
||||
this->actor.world.pos.y = 240.0;
|
||||
this->actor.world.pos.z = 1594.390;
|
||||
this->actor.shape.rot.y = 7728;
|
||||
if (play->sceneNum == SCENE_KAKARIKO_VILLAGE) {
|
||||
if (this->actor.params == 1929) {
|
||||
this->actor.world.pos.x = 261.826;
|
||||
this->actor.world.pos.y = 240.0;
|
||||
this->actor.world.pos.z = 1669.660;
|
||||
this->actor.shape.rot.y = 23784;
|
||||
}
|
||||
if (this->actor.params == 1930) {
|
||||
this->actor.world.pos.x = 262.224;
|
||||
this->actor.world.pos.y = 240.0;
|
||||
this->actor.world.pos.z = 1594.390;
|
||||
this->actor.shape.rot.y = 7728;
|
||||
}
|
||||
}
|
||||
|
||||
this->getItemEntry = (GetItemEntry)GET_ITEM_NONE;
|
||||
|
||||
Reference in New Issue
Block a user