mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-06-23 09:39:54 -04:00
Merge branch 'ChristmasWork' into christmas-tree
This commit is contained in:
@@ -13,7 +13,6 @@ 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) {
|
||||
@@ -25,17 +24,19 @@ void EnChristmasDeco_Update(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
|
||||
void EnChristmasDeco_Draw(Actor* thisx, PlayState* play) {
|
||||
float decoSize = 1000.0f;
|
||||
float decoSize = 10.0f;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
|
||||
Matrix_Translate(0, 0, 0, MTXMODE_APPLY);
|
||||
Matrix_RotateZYX(0, 0, 0, MTXMODE_APPLY);
|
||||
Matrix_Scale(decoSize, decoSize, decoSize, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, (char*)__FILE__, __LINE__), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
if (play->sceneNum == SCENE_KAKARIKO_VILLAGE) {
|
||||
gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gFrontGateDecorDL);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gFrontGateDecorDL);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gKakarikoDecorDL); //Assertion Halt in Debug mode, switch to Release when testing.
|
||||
}
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
|
||||
@@ -34,7 +34,7 @@ static ColliderCylinderInit sCylinderInit = {
|
||||
BUMP_NONE,
|
||||
OCELEM_ON,
|
||||
},
|
||||
{ 50, 150, 0, { 0, 0, 0 } },
|
||||
{ 100, 330, 0, { 0, 0, 0 } },
|
||||
};
|
||||
|
||||
static CollisionCheckInfoInit2 sColChkInfoInit = { 0, 0, 0, 0, MASS_IMMOVABLE };
|
||||
@@ -42,7 +42,7 @@ static CollisionCheckInfoInit2 sColChkInfoInit = { 0, 0, 0, 0, MASS_IMMOVABLE };
|
||||
void EnChristmasTree_Init(Actor* thisx, PlayState* play) {
|
||||
EnChristmasTree* this = (EnChristmasTree*)thisx;
|
||||
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 90.0f);
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 160.0f);
|
||||
Collider_InitCylinder(play, &this->collider);
|
||||
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
|
||||
CollisionCheck_SetInfo2(&this->actor.colChkInfo, NULL, &sColChkInfoInit);
|
||||
@@ -91,13 +91,6 @@ void EnChristmasTree_Talk(EnChristmasTree* this, PlayState* play) {
|
||||
void EnChristmasTree_SetupEndTitle(EnChristmasTree* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
player->actor.world.pos.x = -929.336;
|
||||
player->actor.world.pos.y = 0;
|
||||
player->actor.world.pos.z = 446.178;
|
||||
player->actor.shape.rot.x = 0;
|
||||
player->actor.shape.rot.y = 17537;
|
||||
player->actor.shape.rot.z = 0;
|
||||
|
||||
GameInteractor_SetNoUIActive(1);
|
||||
|
||||
Actor_Spawn(&gPlayState->actorCtx, gPlayState, ACTOR_END_TITLE, 0, 0, 0, 0, 0, 0, 2, false);
|
||||
@@ -122,9 +115,11 @@ void EnChristmasTree_Update(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
|
||||
void EnChristmasTree_Draw(Actor* thisx, PlayState* play) {
|
||||
EnChristmasTree* this = (EnChristmasTree*)thisx;
|
||||
|
||||
float percentageCompleted = (float)gSaveContext.triforcePiecesCollected /
|
||||
(float)Randomizer_GetSettingValue(RSK_TRIFORCE_HUNT_PIECES_REQUIRED);
|
||||
float treeSize = 30.0f;
|
||||
float treeSize = 55.0f;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
@@ -166,6 +161,11 @@ void EnChristmasTree_Draw(Actor* thisx, PlayState* play) {
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ typedef struct EnChristmasTree {
|
||||
Actor actor;
|
||||
ColliderCylinder collider;
|
||||
EnChristmasTreeActionFunc actionFunc;
|
||||
u8 spawnedRupee;
|
||||
} EnChristmasTree;
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -66,7 +66,10 @@ void EnHs2_Init(Actor* thisx, PlayState* play) {
|
||||
this->unk_2A8 = 0;
|
||||
this->actor.targetMode = 6;
|
||||
|
||||
Actor_Kill(this);
|
||||
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) {
|
||||
|
||||
@@ -829,7 +829,7 @@ s32 EnHy_ShouldSpawn(EnHy* this, PlayState* play) {
|
||||
} else if ((this->actor.params & 0x7F) != ENHY_TYPE_BOJ_12 && IS_NIGHT) {
|
||||
return false;
|
||||
} else {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
case SCENE_IMPAS_HOUSE:
|
||||
if ((this->actor.params & 0x7F) != ENHY_TYPE_BOJ_10) {
|
||||
@@ -898,6 +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;
|
||||
}
|
||||
|
||||
this->getItemEntry = (GetItemEntry)GET_ITEM_NONE;
|
||||
this->actionFunc = EnHy_InitImpl;
|
||||
}
|
||||
|
||||
@@ -267,11 +267,12 @@ void EnKusa_Init(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
|
||||
if (gPlayState->sceneNum == SCENE_KAKARIKO_VILLAGE && this->actor.world.pos.z < 600.0) {
|
||||
Actor_Kill(this);
|
||||
} else {
|
||||
EnKusa_SetupWaitObject(this);
|
||||
this->actor.world.pos.x += 1620.672;
|
||||
this->actor.world.pos.y += 80;
|
||||
this->actor.world.pos.z += 900.884;
|
||||
}
|
||||
|
||||
|
||||
EnKusa_SetupWaitObject(this);
|
||||
}
|
||||
|
||||
void EnKusa_Destroy(Actor* thisx, PlayState* play2) {
|
||||
|
||||
@@ -105,7 +105,12 @@ void EnToryo_Init(Actor* thisx, PlayState* play) {
|
||||
break;
|
||||
case SCENE_KAKARIKO_VILLAGE:
|
||||
if ((LINK_AGE_IN_YEARS == YEARS_CHILD) && IS_DAY) {
|
||||
Actor_Kill(this);
|
||||
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;
|
||||
|
||||
this->stateFlags |= 2;
|
||||
}
|
||||
break;
|
||||
case SCENE_KAKARIKO_CENTER_GUEST_HOUSE:
|
||||
|
||||
@@ -173,16 +173,14 @@ void EnWood02_Init(Actor* thisx, PlayState* play2) {
|
||||
f32 floorY;
|
||||
s16 extraRot;
|
||||
|
||||
if (Randomizer_GetSettingValue(RSK_TRIFORCE_HUNT) == 1) {
|
||||
if (gPlayState->sceneNum == SCENE_KAKARIKO_VILLAGE && this->actor.params <= WOOD_TREE_KAKARIKO_ADULT) {
|
||||
Actor_Kill(this);
|
||||
}
|
||||
if (gPlayState->sceneNum == SCENE_KAKARIKO_VILLAGE && this->actor.params <= WOOD_TREE_KAKARIKO_ADULT) {
|
||||
Actor_Kill(this);
|
||||
}
|
||||
|
||||
if (gPlayState->sceneNum == SCENE_KAKARIKO_VILLAGE && this->actor.params >= 0) {
|
||||
this->actor.world.pos.x = 754.051;
|
||||
this->actor.world.pos.y = 80.0;
|
||||
this->actor.world.pos.z = 1429.908;
|
||||
}
|
||||
if (gPlayState->sceneNum == SCENE_KAKARIKO_VILLAGE && this->actor.params >= 0) {
|
||||
this->actor.world.pos.x = 754.051;
|
||||
this->actor.world.pos.y = 80.0;
|
||||
this->actor.world.pos.z = 1429.908;
|
||||
}
|
||||
|
||||
// The tree in Kakariko's day scene does not have the same params to spawn the GS
|
||||
|
||||
Reference in New Issue
Block a user