diff --git a/assets/xml/objects/object_kz.xml b/assets/xml/objects/object_kz.xml index 303988c60d..1077c824ca 100644 --- a/assets/xml/objects/object_kz.xml +++ b/assets/xml/objects/object_kz.xml @@ -2,8 +2,8 @@ - - + + diff --git a/assets/xml/objects/object_link_boy.xml b/assets/xml/objects/object_link_boy.xml index 63135000b8..a4eddb2ed7 100644 --- a/assets/xml/objects/object_link_boy.xml +++ b/assets/xml/objects/object_link_boy.xml @@ -241,7 +241,7 @@ - + diff --git a/include/z64scene.h b/include/z64scene.h index 7bb1348ea3..688d16a82b 100644 --- a/include/z64scene.h +++ b/include/z64scene.h @@ -490,7 +490,7 @@ typedef enum { /* 0x17 */ SCENE_CMD_ID_CUTSCENE_DATA, /* 0x18 */ SCENE_CMD_ID_ALTERNATE_HEADER_LIST, /* 0x19 */ SCENE_CMD_ID_MISC_SETTINGS, - /* 0x20 */ SCENE_CMD_ID_MAX + /* 0x1A */ SCENE_CMD_ID_MAX } SceneCommandTypeID; #define SCENE_CMD_SPAWN_LIST(numSpawns, spawnList) \ diff --git a/src/code/game.c b/src/code/game.c index 11a68e4b4f..34a7c59b46 100644 --- a/src/code/game.c +++ b/src/code/game.c @@ -23,8 +23,7 @@ void GameState_FaultPrint(void) { } void GameState_SetFBFilter(Gfx** gfx) { - Gfx* gfxP; - gfxP = *gfx; + Gfx* gfxP = *gfx; if ((R_FB_FILTER_TYPE > 0) && (R_FB_FILTER_TYPE < 5)) { D_801664F0.type = R_FB_FILTER_TYPE; diff --git a/src/code/jpegdecoder.c b/src/code/jpegdecoder.c index 5261264c7c..3301817d0f 100644 --- a/src/code/jpegdecoder.c +++ b/src/code/jpegdecoder.c @@ -164,11 +164,9 @@ s32 JpegDecoder_ParseNextSymbol(JpegHuffmanTable* hTable, s16* outCoeff, s8* out u16 JpegDecoder_ReadBits(u8 len) { u8 byteCount; u8 data; - s32 ret; + s32 ret = 0; u32 temp; - ret = 0; // this is required for some reason - for (byteCount = sJpegBitStreamBitIdx >> 3; byteCount > 0; byteCount--) { data = sJpegBitStreamPtr[sJpegBitStreamByteIdx++]; if (sJpegBitStreamDontSkip) { @@ -184,7 +182,7 @@ u16 JpegDecoder_ReadBits(u8 len) { sJpegBitStreamBitIdx -= 8; } - ret = (sJpegBitStreamCurWord << (sJpegBitStreamBitIdx)); + ret = sJpegBitStreamCurWord << sJpegBitStreamBitIdx; temp = ret; ret = temp >> -len; sJpegBitStreamBitIdx += len; diff --git a/src/code/speed_meter.c b/src/code/speed_meter.c index 204ac000d3..d94a92387c 100644 --- a/src/code/speed_meter.c +++ b/src/code/speed_meter.c @@ -64,7 +64,7 @@ void SpeedMeter_DrawTimeEntries(SpeedMeter* this, GraphicsContext* gfxCtx) { sSpeedMeterTimeEntryPtr = &sSpeedMeterTimeEntryArray[0]; for (i = 0; i < ARRAY_COUNT(sSpeedMeterTimeEntryArray); i++) { - temp = ((f64) * (sSpeedMeterTimeEntryPtr->time) / gIrqMgrRetraceTime) * 64.0; + temp = ((f64)*sSpeedMeterTimeEntryPtr->time / gIrqMgrRetraceTime) * 64.0; sSpeedMeterTimeEntryPtr->x = temp + baseX; sSpeedMeterTimeEntryPtr++; } diff --git a/src/code/sys_math3d.c b/src/code/sys_math3d.c index a1964ec116..62dd7b4359 100644 --- a/src/code/sys_math3d.c +++ b/src/code/sys_math3d.c @@ -427,14 +427,14 @@ f32 Math3D_Dist2D(f32 x0, f32 y0, f32 x1, f32 y1) { } /** - * Returns the magntiude (length) squared of `vec` + * Returns the magnitude (length) squared of `vec` */ f32 Math3D_Vec3fMagnitudeSq(Vec3f* vec) { return SQ(vec->x) + SQ(vec->y) + SQ(vec->z); } /** - * Returns the magnitude(length) of `vec` + * Returns the magnitude (length) of `vec` */ f32 Math3D_Vec3fMagnitude(Vec3f* vec) { return sqrt(Math3D_Vec3fMagnitudeSq(vec)); diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 9811758e43..8db84b82da 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -1507,7 +1507,6 @@ u32 Actor_ProcessTalkRequest(Actor* actor, PlayState* play) { s32 func_8002F1C4(Actor* actor, PlayState* play, f32 arg2, f32 arg3, u32 exchangeItemId) { Player* player = GET_PLAYER(play); - // This is convoluted but it seems like it must be a single if statement to match if ((player->actor.flags & ACTOR_FLAG_8) || ((exchangeItemId != EXCH_ITEM_NONE) && Player_InCsMode(play)) || (!actor->isTargeted && ((arg3 < fabsf(actor->yDistToPlayer)) || (player->targetActorDistance < actor->xzDistToPlayer) || @@ -2182,10 +2181,10 @@ void Actor_Draw(PlayState* play, Actor* actor) { Lights_Draw(lights, play->state.gfxCtx); if (actor->flags & ACTOR_FLAG_12) { - Matrix_SetTranslateRotateYXZ( - actor->world.pos.x + play->mainCamera.skyboxOffset.x, - actor->world.pos.y + (f32)((actor->shape.yOffset * actor->scale.y) + play->mainCamera.skyboxOffset.y), - actor->world.pos.z + play->mainCamera.skyboxOffset.z, &actor->shape.rot); + Matrix_SetTranslateRotateYXZ(actor->world.pos.x + play->mainCamera.skyboxOffset.x, + actor->world.pos.y + + ((actor->shape.yOffset * actor->scale.y) + play->mainCamera.skyboxOffset.y), + actor->world.pos.z + play->mainCamera.skyboxOffset.z, &actor->shape.rot); } else { Matrix_SetTranslateRotateYXZ(actor->world.pos.x, actor->world.pos.y + (actor->shape.yOffset * actor->scale.y), actor->world.pos.z, &actor->shape.rot); @@ -4214,14 +4213,14 @@ void Flags_SetEventChkInf(s32 flag) { } /** - * Tests if "inf_table flag is set. + * Tests if inf_table flag is set. */ s32 Flags_GetInfTable(s32 flag) { return GET_INFTABLE(flag); } /** - * Sets "inf_table" flag. + * Sets inf_table flag. */ void Flags_SetInfTable(s32 flag) { SET_INFTABLE(flag); diff --git a/src/code/z_bgcheck.c b/src/code/z_bgcheck.c index e875ccc3b7..640066358f 100644 --- a/src/code/z_bgcheck.c +++ b/src/code/z_bgcheck.c @@ -4171,17 +4171,17 @@ u32 SurfaceType_IsWallDamage(CollisionContext* colCtx, CollisionPoly* poly, s32 /** * Zora's Domain WaterBox in King Zora's Room */ -WaterBox zdWaterBox = { -348, 877, -1746, 553, 780, 0x2104 }; +WaterBox sZorasDomainWaterBox = { -348, 877, -1746, 553, 780, 0x2104 }; /** * WaterBox's effective bounding box */ -f32 zdWaterBoxMinX = -348.0f; -f32 zdWaterBoxMinY = 777.0f; -f32 zdWaterBoxMinZ = -1746.0f; -f32 zdWaterBoxMaxX = 205.0f; -f32 zdWaterBoxMaxY = 977.0f; -f32 zdWaterBoxMaxZ = -967.0f; +f32 sZorasDomainWaterBoxMinX = -348.0f; +f32 sZorasDomainWaterBoxMinY = 777.0f; +f32 sZorasDomainWaterBoxMinZ = -1746.0f; +f32 sZorasDomainWaterBoxMaxX = 205.0f; +f32 sZorasDomainWaterBoxMaxY = 977.0f; +f32 sZorasDomainWaterBoxMaxZ = -967.0f; /** * Public. Get the water surface at point (`x`, `ySurface`, `z`). `ySurface` doubles as position y input @@ -4191,10 +4191,10 @@ f32 zdWaterBoxMaxZ = -967.0f; s32 WaterBox_GetSurface1(PlayState* play, CollisionContext* colCtx, f32 x, f32 z, f32* ySurface, WaterBox** outWaterBox) { if (play->sceneNum == SCENE_SPOT07) { - if (zdWaterBoxMinX < x && x < zdWaterBoxMaxX && zdWaterBoxMinY < *ySurface && *ySurface < zdWaterBoxMaxY && - zdWaterBoxMinZ < z && z < zdWaterBoxMaxZ) { - *outWaterBox = &zdWaterBox; - *ySurface = zdWaterBox.ySurface; + if (sZorasDomainWaterBoxMinX < x && x < sZorasDomainWaterBoxMaxX && sZorasDomainWaterBoxMinY < *ySurface && + *ySurface < sZorasDomainWaterBoxMaxY && sZorasDomainWaterBoxMinZ < z && z < sZorasDomainWaterBoxMaxZ) { + *outWaterBox = &sZorasDomainWaterBox; + *ySurface = sZorasDomainWaterBox.ySurface; return true; } } diff --git a/src/code/z_camera.c b/src/code/z_camera.c index b625f5c390..b38a1d0cc5 100644 --- a/src/code/z_camera.c +++ b/src/code/z_camera.c @@ -6534,7 +6534,7 @@ s32 Camera_Special5(Camera* camera) { temp_f0_2 = Rand_ZeroOne(); sp74.yaw = (s16)(playerPosRot->rot.y - 0x7FFF) + (s16)(spA4 < 0 ? -(s16)(0x1553 + (s16)(temp_f0_2 * 2730.0f)) - : (s16)(0x1553 + (s16)(temp_f0_2 * 2730.0f))); + : (s16)(0x1553 + (s16)(temp_f0_2 * 2730.0f))); sp74.pitch = roData->pitch; Camera_Vec3fVecSphGeoAdd(eyeNext, &spA8.pos, &sp74); *eye = *eyeNext; diff --git a/src/code/z_horse.c b/src/code/z_horse.c index 0cddd54b7e..0a0186a561 100644 --- a/src/code/z_horse.c +++ b/src/code/z_horse.c @@ -172,17 +172,21 @@ void func_8006D684(PlayState* play, Player* player) { } } else { static struct_8011F9B8 D_8011F9B8[] = { - { 93, 0xFFF0, 0x0E10, 0x0585, 0x0168, 0x8001, 8 }, { 99, 0xFFF0, 0xFF06, 0x0001, 0xF9D4, 0x4000, 6 }, - { 99, 0xFFF1, 0x0000, 0x0000, 0x0000, 0x0000, 5 }, { 99, 0xFFF5, 0x0000, 0x0000, 0x0000, 0x0000, 7 }, - { 81, 0xFFF3, 0xF46F, 0x0139, 0x1E14, 0x0000, 7 }, { 81, 0xFFF4, 0xF894, 0x0139, 0x1B67, 0x0000, 7 }, - { 81, 0xFFF5, 0xF035, 0x0139, 0x1B15, 0x0000, 7 }, { 81, 0xFFF6, 0xF035, 0x0139, 0x1B15, 0x0000, 7 }, + { SCENE_SPOT12, 0xFFF0, { 3600, 1413, 360 }, 0x8001, 8 }, + { SCENE_SPOT20, 0xFFF0, { -250, 1, -1580 }, 0x4000, 6 }, + { SCENE_SPOT20, 0xFFF1, { 0, 0, 0 }, 0x0000, 5 }, + { SCENE_SPOT20, 0xFFF5, { 0, 0, 0 }, 0x0000, 7 }, + { SCENE_SPOT00, 0xFFF3, { -2961, 313, 7700 }, 0x0000, 7 }, + { SCENE_SPOT00, 0xFFF4, { -1900, 313, 7015 }, 0x0000, 7 }, + { SCENE_SPOT00, 0xFFF5, { -4043, 313, 6933 }, 0x0000, 7 }, + { SCENE_SPOT00, 0xFFF6, { -4043, 313, 6933 }, 0x0000, 7 }, }; for (i = 0; i < ARRAY_COUNT(D_8011F9B8); i++) { if ((play->sceneNum == D_8011F9B8[i].scene) && (((void)0, gSaveContext.cutsceneIndex) == D_8011F9B8[i].cutsceneIndex)) { if (D_8011F9B8[i].type == 7) { - if ((play->sceneNum == 99) && (((void)0, gSaveContext.cutsceneIndex) == 0xFFF1)) { + if ((play->sceneNum == SCENE_SPOT20) && (((void)0, gSaveContext.cutsceneIndex) == 0xFFF1)) { D_8011F9B8[i].pos.x = player->actor.world.pos.x; D_8011F9B8[i].pos.y = player->actor.world.pos.y; D_8011F9B8[i].pos.z = player->actor.world.pos.z; diff --git a/src/code/z_kankyo.c b/src/code/z_kankyo.c index 5daf9060bc..e5ba7904eb 100644 --- a/src/code/z_kankyo.c +++ b/src/code/z_kankyo.c @@ -919,7 +919,7 @@ void Environment_Update(PlayState* play, EnvironmentContext* envCtx, LightContex } if ((pauseCtx->state == 0) && (gameOverCtx->state == GAMEOVER_INACTIVE)) { - if (((msgCtx->msgLength == 0) && (msgCtx->msgMode == GAMEMODE_NORMAL)) || + if (((msgCtx->msgLength == 0) && (msgCtx->msgMode == MSGMODE_NONE)) || (((void)0, gSaveContext.gameMode) == GAMEMODE_END_CREDITS)) { if ((envCtx->changeSkyboxTimer == 0) && !FrameAdvance_IsEnabled(play) && (play->transitionMode == TRANS_MODE_OFF || ((void)0, gSaveContext.gameMode) != GAMEMODE_NORMAL)) { diff --git a/src/code/z_message_PAL.c b/src/code/z_message_PAL.c index 668fb61200..08e2c7aec4 100644 --- a/src/code/z_message_PAL.c +++ b/src/code/z_message_PAL.c @@ -3172,6 +3172,7 @@ void Message_Update(PlayState* play) { R_TEXTBOX_TEXHEIGHT = 512; } else { Message_GrowTextbox(msgCtx); + // TODO: this may be NA_SE_PL_WALK_GROUND - SFX_FLAG, or not, investigate sfxId=0 Audio_PlaySoundIfNotInCutscene(0); msgCtx->stateTimer = 0; msgCtx->msgMode = MSGMODE_TEXT_BOX_GROWING; diff --git a/src/libultra/os/seteventmesg.c b/src/libultra/os/seteventmesg.c index 0580c1e24d..d105850ee1 100644 --- a/src/libultra/os/seteventmesg.c +++ b/src/libultra/os/seteventmesg.c @@ -1,7 +1,7 @@ #include "global.h" #include "ultra64/internal.h" -__OSEventState __osEventStateTab[OS_NUM_EVENTS + 1]; +__OSEventState __osEventStateTab[OS_NUM_EVENTS]; u32 __osPreNMI = false; diff --git a/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c b/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c index ec73887597..7ad3107691 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c @@ -253,7 +253,7 @@ void func_8088B79C(BgHidanRock* this, PlayState* play) { Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND); Audio_PlayActorSound2( &this->dyna.actor, - SurfaceType_GetSfx(&play->colCtx, this->dyna.actor.floorPoly, this->dyna.actor.floorBgId) + 0x800); + SurfaceType_GetSfx(&play->colCtx, this->dyna.actor.floorPoly, this->dyna.actor.floorBgId) + SFX_FLAG); } this->unk_16C -= 0.5f; diff --git a/src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.c b/src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.c index b6845dc979..e096cfd046 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.c +++ b/src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.c @@ -20,7 +20,7 @@ void func_808992D8(BgJyaIronobj* this); void func_808992E8(BgJyaIronobj* this, PlayState* play); void BgJyaIronobj_SpawnPillarParticles(BgJyaIronobj* this, PlayState* play, EnIk* enIk); -void BgJyaIronobj_SpawnThoneParticles(BgJyaIronobj* this, PlayState* play, EnIk* enIk); +void BgJyaIronobj_SpawnThroneParticles(BgJyaIronobj* this, PlayState* play, EnIk* enIk); static int sUnused = 0; @@ -157,7 +157,7 @@ void BgJyaIronobj_SpawnPillarParticles(BgJyaIronobj* this, PlayState* play, EnIk /* * Spawns particles for the destroyed throne */ -void BgJyaIronobj_SpawnThoneParticles(BgJyaIronobj* this, PlayState* play, EnIk* enIk) { +void BgJyaIronobj_SpawnThroneParticles(BgJyaIronobj* this, PlayState* play, EnIk* enIk) { s32 i; s32 j; s16 unkArg5; @@ -238,7 +238,7 @@ void func_808992D8(BgJyaIronobj* this) { } void func_808992E8(BgJyaIronobj* this, PlayState* play) { - static BgJyaIronobjIkFunc particleFunc[] = { BgJyaIronobj_SpawnPillarParticles, BgJyaIronobj_SpawnThoneParticles }; + static BgJyaIronobjIkFunc particleFunc[] = { BgJyaIronobj_SpawnPillarParticles, BgJyaIronobj_SpawnThroneParticles }; Actor* actor; Vec3f dropPos; s32 i; diff --git a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c index c8e9933986..16874e0472 100644 --- a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c +++ b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c @@ -370,10 +370,10 @@ void DemoKankyo_DoNothing2(DemoKankyo* this, PlayState* play) { DemoKankyo_SetupAction(this, DemoKankyo_DoNothing); } -void DemoKankyo_SetRockPos(DemoKankyo* this, PlayState* play, s32 params) { +void DemoKankyo_SetRockPos(DemoKankyo* this, PlayState* play, s32 npcActionIndex) { Vec3f startPos; Vec3f endPos; - CsCmdActorAction* csAction = play->csCtx.npcActions[params]; + CsCmdActorAction* csAction = play->csCtx.npcActions[npcActionIndex]; f32 temp_f0; startPos.x = csAction->startPos.x; @@ -389,8 +389,8 @@ void DemoKankyo_SetRockPos(DemoKankyo* this, PlayState* play, s32 params) { } void DemoKankyo_UpdateRock(DemoKankyo* this, PlayState* play) { - if (play->csCtx.state != CS_STATE_IDLE && play->csCtx.npcActions[this->actor.params - 2] != NULL) { - DemoKankyo_SetRockPos(this, play, this->actor.params - 2); + if (play->csCtx.state != CS_STATE_IDLE && play->csCtx.npcActions[this->actor.params - DEMOKANKYO_ROCK_1] != NULL) { + DemoKankyo_SetRockPos(this, play, this->actor.params - DEMOKANKYO_ROCK_1); } this->unk_150[0].unk_C.x += this->unk_150[0].unk_0.x; this->unk_150[0].unk_C.y += this->unk_150[0].unk_0.y; diff --git a/src/overlays/actors/ovl_En_Box/z_en_box.c b/src/overlays/actors/ovl_En_Box/z_en_box.c index 40d0e4d6cf..3d584cf7d5 100644 --- a/src/overlays/actors/ovl_En_Box/z_en_box.c +++ b/src/overlays/actors/ovl_En_Box/z_en_box.c @@ -1,4 +1,5 @@ #include "z_en_box.h" +#include "overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.h" #include "assets/objects/object_box/object_box.h" #define FLAGS 0 @@ -359,7 +360,7 @@ void EnBox_AppearInit(EnBox* this, PlayState* play) { EnBox_SetupAction(this, EnBox_AppearAnimation); this->unk_1A8 = 0; Actor_Spawn(&play->actorCtx, play, ACTOR_DEMO_KANKYO, this->dyna.actor.home.pos.x, this->dyna.actor.home.pos.y, - this->dyna.actor.home.pos.z, 0, 0, 0, 0x0011); + this->dyna.actor.home.pos.z, 0, 0, 0, DEMOKANKYO_SPARKLES); Audio_PlaySoundGeneral(NA_SE_EV_TRE_BOX_APPEAR, &this->dyna.actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } diff --git a/src/overlays/actors/ovl_En_Du/z_en_du.c b/src/overlays/actors/ovl_En_Du/z_en_du.c index c50a99b140..12dd021e10 100644 --- a/src/overlays/actors/ovl_En_Du/z_en_du.c +++ b/src/overlays/actors/ovl_En_Du/z_en_du.c @@ -298,7 +298,7 @@ void EnDu_Init(Actor* thisx, PlayState* play) { play->csCtx.segment = SEGMENTED_TO_VIRTUAL(gGoronCityDarunia01Cs); gSaveContext.cutsceneTrigger = 1; EnDu_SetupAction(this, func_809FE890); - } else if (play->sceneNum == 4) { + } else if (play->sceneNum == SCENE_HIDAN) { EnDu_SetupAction(this, func_809FE638); } else if (!LINK_IS_ADULT) { EnDu_SetupAction(this, func_809FE3C0); diff --git a/src/overlays/actors/ovl_En_Js/z_en_js.c b/src/overlays/actors/ovl_En_Js/z_en_js.c index 5d75699a00..f67805f08e 100644 --- a/src/overlays/actors/ovl_En_Js/z_en_js.c +++ b/src/overlays/actors/ovl_En_Js/z_en_js.c @@ -174,7 +174,8 @@ void EnJs_Update(Actor* thisx, PlayState* play) { Actor_UpdateBgCheckInfo(play, &this->actor, 0.0f, 0.0f, 0.0f, UPDBGCHECKINFO_FLAG_2); if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) { - if (SurfaceType_GetSfx(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId) == 1) { + if (SurfaceType_GetSfx(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId) == + (NA_SE_PL_WALK_SAND - SFX_FLAG)) { Math_ApproachF(&this->actor.shape.yOffset, sREG(80) + -2000.0f, 1.0f, (sREG(81) / 10.0f) + 50.0f); } } else { diff --git a/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c b/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c index 0211cae395..cb753ac12f 100644 --- a/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c +++ b/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c @@ -5,6 +5,7 @@ */ #include "z_shot_sun.h" +#include "overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.h" #include "overlays/actors/ovl_En_Elf/z_en_elf.h" #include "assets/scenes/overworld/spot06/spot06_scene.h" #include "vt.h" @@ -112,7 +113,7 @@ void ShotSun_TriggerFairy(ShotSun* this, PlayState* play) { this->timer = 50; Actor_Spawn(&play->actorCtx, play, ACTOR_DEMO_KANKYO, this->actor.home.pos.x, this->actor.home.pos.y, - this->actor.home.pos.z, 0, 0, 0, 0x11); + this->actor.home.pos.z, 0, 0, 0, DEMOKANKYO_SPARKLES); func_80078914(&this->actor.projectedPos, NA_SE_EV_TRE_BOX_APPEAR); } diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c index eaeab831bb..4c590f083e 100644 --- a/src/overlays/actors/ovl_player_actor/z_player.c +++ b/src/overlays/actors/ovl_player_actor/z_player.c @@ -8,6 +8,7 @@ #include "global.h" #include "overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.h" +#include "overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.h" #include "overlays/actors/ovl_Door_Shutter/z_door_shutter.h" #include "overlays/actors/ovl_En_Boom/z_en_boom.h" #include "overlays/actors/ovl_En_Arrow/z_en_arrow.h" @@ -12184,7 +12185,8 @@ void func_8084E3C4(Player* this, PlayState* play) { this->stateFlags1 |= PLAYER_STATE1_28 | PLAYER_STATE1_29; this->stateFlags2 |= PLAYER_STATE2_27; - if (Actor_Spawn(&play->actorCtx, play, ACTOR_DEMO_KANKYO, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0xF) == NULL) { + if (Actor_Spawn(&play->actorCtx, play, ACTOR_DEMO_KANKYO, 0.0f, 0.0f, 0.0f, 0, 0, 0, DEMOKANKYO_WARP_OUT) == + NULL) { Environment_WarpSongLeave(play); } @@ -12653,7 +12655,7 @@ void func_8084F608(Player* this, PlayState* play) { void func_8084F698(Player* this, PlayState* play) { func_80835C58(play, this, func_8084F608, 0); this->unk_850 = 40; - Actor_Spawn(&play->actorCtx, play, ACTOR_DEMO_KANKYO, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0x10); + Actor_Spawn(&play->actorCtx, play, ACTOR_DEMO_KANKYO, 0.0f, 0.0f, 0.0f, 0, 0, 0, DEMOKANKYO_WARP_IN); } void func_8084F710(Player* this, PlayState* play) { @@ -12697,7 +12699,7 @@ void func_8084F88C(Player* this, PlayState* play) { if ((this->unk_850++ > 8) && (play->transitionTrigger == TRANS_TRIGGER_OFF)) { if (this->unk_84F != 0) { - if (play->sceneNum == 9) { + if (play->sceneNum == SCENE_ICE_DOUKUTO) { Play_TriggerRespawn(play); play->nextEntranceIndex = ENTR_ICE_DOUKUTO_0; } else if (this->unk_84F < 0) {