mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-04 06:54:33 +00:00
Decompile ovl_Door_Warp1 (#949)
* Initial progress on Door_Warp1 * Fix merge * More work on Door_Warp1 * Decompile most of Door_Warp1 * 2 more functions OK * All decompiled, 3 nonmatching * Tiny improvements, fix several warnings * Remove commented GLOBAL_ASM lines * Fix * Fix merge * Two more matches * Some docs * More docs * Use generated reloc under NON_MATCHING * Fix accesses in ru1 * Add break and add limbs and dlists for the skeleton to the object xml * Comment values for enums Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com> * boolean returns for flag checking functions Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com> * Named more loop variables i and named DoorWarp1_FloatPlayer * Last function matched thanks to Roman * Some further suggestions * Fix Co-authored-by: Thar0 <maximilianc64@gmail.com> Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com> Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com>
This commit is contained in:
parent
e31e35658d
commit
eccfd2efbf
62 changed files with 1139 additions and 4711 deletions
|
@ -1,5 +1,6 @@
|
|||
#include "z_boss_dodongo.h"
|
||||
#include "objects/object_kingdodongo/object_kingdodongo.h"
|
||||
#include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h"
|
||||
#include "scenes/dungeons/ddan_boss/ddan_boss_room_1.h"
|
||||
|
||||
#define FLAGS 0x00000035
|
||||
|
@ -208,7 +209,7 @@ void BossDodongo_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
Actor_Kill(&this->actor);
|
||||
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_WARP1, -890.0f, -1523.76f,
|
||||
-3304.0f, 0, 0, 0, 0);
|
||||
-3304.0f, 0, 0, 0, WARP_DUNGEON_CHILD);
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_BG_BREAKWALL, -890.0f, -1523.76f, -3304.0f, 0, 0, 0, 0x6000);
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_ITEM_B_HEART, -690.0f, -1523.76f, -3304.0f, 0, 0, 0, 0);
|
||||
|
||||
|
@ -1616,7 +1617,7 @@ void BossDodongo_DeathCutscene(BossDodongo* this, GlobalContext* globalCtx) {
|
|||
func_80064534(globalCtx, &globalCtx->csCtx);
|
||||
func_8002DF54(globalCtx, &this->actor, 7);
|
||||
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_WARP1, -890.0f, -1523.76f,
|
||||
-3304.0f, 0, 0, 0, 0);
|
||||
-3304.0f, 0, 0, 0, WARP_DUNGEON_CHILD);
|
||||
this->skelAnime.playSpeed = 0.0f;
|
||||
Flags_SetClear(globalCtx, globalCtx->roomCtx.curRoom.num);
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include "overlays/actors/ovl_En_Vb_Ball/z_en_vb_ball.h"
|
||||
#include "overlays/actors/ovl_Bg_Vb_Sima/z_bg_vb_sima.h"
|
||||
#include "overlays/actors/ovl_Boss_Fd2/z_boss_fd2.h"
|
||||
#include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
|
||||
#define FLAGS 0x00000035
|
||||
|
@ -219,7 +220,7 @@ void BossFd_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
if (Flags_GetClear(globalCtx, globalCtx->roomCtx.curRoom.num)) {
|
||||
Actor_Kill(&this->actor);
|
||||
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_WARP1, 0.0f, 100.0f, 0.0f, 0, 0, 0,
|
||||
-1);
|
||||
WARP_DUNGEON_ADULT);
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_ITEM_B_HEART, 0.0f, 100.0f, 200.0f, 0, 0, 0, 0);
|
||||
} else {
|
||||
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_BOSS_FD2, this->actor.world.pos.x,
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "z_boss_fd2.h"
|
||||
#include "objects/object_fd2/object_fd2.h"
|
||||
#include "overlays/actors/ovl_Boss_Fd/z_boss_fd.h"
|
||||
#include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h"
|
||||
#include "vt.h"
|
||||
|
||||
#define FLAGS 0x00000035
|
||||
|
@ -783,7 +784,7 @@ void BossFd2_Death(BossFd2* this, GlobalContext* globalCtx) {
|
|||
func_80064534(globalCtx, &globalCtx->csCtx);
|
||||
func_8002DF54(globalCtx, &this->actor, 7);
|
||||
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_WARP1, 0.0f, 100.0f, 0.0f,
|
||||
0, 0, 0, -1);
|
||||
0, 0, 0, WARP_DUNGEON_ADULT);
|
||||
Flags_SetClear(globalCtx, globalCtx->roomCtx.curRoom.num);
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.h"
|
||||
#include "overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.h"
|
||||
#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
|
||||
#include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h"
|
||||
|
||||
#define FLAGS 0x00000035
|
||||
|
||||
|
@ -301,7 +302,7 @@ void BossGanondrof_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
if (Flags_GetClear(globalCtx, globalCtx->roomCtx.curRoom.num)) {
|
||||
Actor_Kill(&this->actor);
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_DOOR_WARP1, GND_BOSSROOM_CENTER_X, GND_BOSSROOM_CENTER_Y,
|
||||
GND_BOSSROOM_CENTER_Z, 0, 0, 0, -1);
|
||||
GND_BOSSROOM_CENTER_Z, 0, 0, 0, WARP_DUNGEON_ADULT);
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_ITEM_B_HEART, 200.0f + GND_BOSSROOM_CENTER_X,
|
||||
GND_BOSSROOM_CENTER_Y, GND_BOSSROOM_CENTER_Z, 0, 0, 0, 0);
|
||||
} else {
|
||||
|
@ -1102,7 +1103,7 @@ void BossGanondrof_Death(BossGanondrof* this, GlobalContext* globalCtx) {
|
|||
if (this->timers[0] == 150) {
|
||||
Audio_QueueSeqCmd(0x21);
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_DOOR_WARP1, GND_BOSSROOM_CENTER_X,
|
||||
GND_BOSSROOM_CENTER_Y, GND_BOSSROOM_CENTER_Z, 0, 0, 0, -1);
|
||||
GND_BOSSROOM_CENTER_Y, GND_BOSSROOM_CENTER_Z, 0, 0, 0, WARP_DUNGEON_ADULT);
|
||||
}
|
||||
|
||||
Math_ApproachZeroF(&this->cameraEye.y, 0.05f, 1.0f); // GND_BOSSROOM_CENTER_Y + 33.0f
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#include "objects/object_goma/object_goma.h"
|
||||
#include "overlays/actors/ovl_En_Goma/z_en_goma.h"
|
||||
#include "overlays/actors/ovl_Door_Shutter/z_door_shutter.h"
|
||||
#include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h"
|
||||
|
||||
#define FLAGS 0x00000035
|
||||
|
||||
|
@ -361,7 +362,7 @@ void BossGoma_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
if (Flags_GetClear(globalCtx, globalCtx->roomCtx.curRoom.num)) {
|
||||
Actor_Kill(&this->actor);
|
||||
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_WARP1, 0.0f, -640.0f, 0.0f, 0, 0,
|
||||
0, 0);
|
||||
0, WARP_DUNGEON_CHILD);
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_ITEM_B_HEART, 141.0f, -640.0f, -84.0f, 0, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
@ -1151,7 +1152,7 @@ void BossGoma_Defeated(BossGoma* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_WARP1, childPos.x,
|
||||
this->actor.world.pos.y, childPos.z, 0, 0, 0, 0);
|
||||
this->actor.world.pos.y, childPos.z, 0, 0, 0, WARP_DUNGEON_CHILD);
|
||||
Flags_SetClear(globalCtx, globalCtx->roomCtx.curRoom.num);
|
||||
}
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include "z_boss_mo.h"
|
||||
#include "objects/object_mo/object_mo.h"
|
||||
#include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
#include "vt.h"
|
||||
|
||||
|
@ -352,7 +353,7 @@ void BossMo_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
if (Flags_GetClear(globalCtx, globalCtx->roomCtx.curRoom.num)) {
|
||||
Actor_Kill(&this->actor);
|
||||
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_WARP1, 0.0f, -280.0f, 0.0f, 0,
|
||||
0, 0, -1);
|
||||
0, 0, WARP_DUNGEON_ADULT);
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_ITEM_B_HEART, -200.0f, -280.0f, 0.0f, 0, 0, 0, 0);
|
||||
globalCtx->roomCtx.unk_74[0] = 0xFF;
|
||||
MO_WATER_LEVEL(globalCtx) = -500;
|
||||
|
@ -1099,7 +1100,7 @@ void BossMo_Tentacle(BossMo* this, GlobalContext* globalCtx) {
|
|||
((300 - indS1) * .0015f) + 0.13f);
|
||||
}
|
||||
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_WARP1,
|
||||
this->actor.world.pos.x, -280.0f, this->actor.world.pos.z, 0, 0, 0, -1);
|
||||
this->actor.world.pos.x, -280.0f, this->actor.world.pos.z, 0, 0, 0, WARP_DUNGEON_ADULT);
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_ITEM_B_HEART, this->actor.world.pos.x + 200.0f,
|
||||
-280.0f, this->actor.world.pos.z, 0, 0, 0, 0);
|
||||
Audio_QueueSeqCmd(0x21);
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include "objects/object_sst/object_sst.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
#include "overlays/actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.h"
|
||||
#include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h"
|
||||
|
||||
#define FLAGS 0x00000435
|
||||
|
||||
|
@ -289,7 +290,7 @@ void BossSst_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
this->actor.shape.rot.y = 0;
|
||||
if (Flags_GetClear(globalCtx, globalCtx->roomCtx.curRoom.num)) {
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_DOOR_WARP1, ROOM_CENTER_X, ROOM_CENTER_Y,
|
||||
ROOM_CENTER_Z + 400.0f, 0, 0, 0, -1);
|
||||
ROOM_CENTER_Z + 400.0f, 0, 0, 0, WARP_DUNGEON_ADULT);
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_ITEM_B_HEART, ROOM_CENTER_X, ROOM_CENTER_Y,
|
||||
ROOM_CENTER_Z - 200.0f, 0, 0, 0, 0);
|
||||
Actor_Kill(&this->actor);
|
||||
|
@ -1188,7 +1189,7 @@ void BossSst_HeadFinish(BossSst* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
} else if (this->effects[0].alpha == 0) {
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_DOOR_WARP1, ROOM_CENTER_X, ROOM_CENTER_Y, ROOM_CENTER_Z, 0,
|
||||
0, 0, -1);
|
||||
0, 0, WARP_DUNGEON_ADULT);
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_ITEM_B_HEART,
|
||||
(Math_SinS(this->actor.shape.rot.y) * 200.0f) + ROOM_CENTER_X, ROOM_CENTER_Y,
|
||||
Math_CosS(this->actor.shape.rot.y) * 200.0f + ROOM_CENTER_Z, 0, 0, 0, 0);
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "z_boss_tw.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
#include "objects/object_tw/object_tw.h"
|
||||
#include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h"
|
||||
|
||||
#define FLAGS 0x00000035
|
||||
|
||||
|
@ -570,7 +571,7 @@ void BossTw_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
// twinrova has been defeated.
|
||||
Actor_Kill(&this->actor);
|
||||
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_WARP1, 600.0f, 230.0f, 0.0f, 0,
|
||||
0, 0, 0xFFFF);
|
||||
0, 0, WARP_DUNGEON_ADULT);
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_ITEM_B_HEART, -600.0f, 230.0f, 0.0f, 0, 0, 0, 0);
|
||||
} else {
|
||||
sKotakePtr = (BossTw*)Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_BOSS_TW,
|
||||
|
@ -2816,7 +2817,7 @@ void BossTw_TwinrovaDeathCS(BossTw* this, GlobalContext* globalCtx) {
|
|||
func_8002DF54(globalCtx, &this->actor, 7);
|
||||
Audio_QueueSeqCmd(0x21);
|
||||
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_WARP1, 600.0f, 230.0f,
|
||||
0.0f, 0, 0, 0, -1);
|
||||
0.0f, 0, 0, 0, WARP_DUNGEON_ADULT);
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_ITEM_B_HEART, -600.0f, 230.f, 0.0f, 0, 0, 0, 0);
|
||||
this->actor.world.pos.y = -2000.0f;
|
||||
this->workf[UNK_F18] = 0.0f;
|
||||
|
|
|
@ -630,7 +630,7 @@ void BossVa_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
warpId = ACTOR_DOOR_WARP1;
|
||||
}
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, warpId, this->actor.world.pos.x, this->actor.world.pos.y,
|
||||
this->actor.world.pos.z, 0, 0, 0, 0);
|
||||
this->actor.world.pos.z, 0, 0, 0, 0); //! params could be WARP_DUNGEON_CHILD however this can also spawn Ru1
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_ITEM_B_HEART, this->actor.world.pos.x + 160.0f,
|
||||
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 0);
|
||||
sDoorState = 100;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "z_demo_du.h"
|
||||
#include "objects/object_du/object_du.h"
|
||||
#include "overlays/actors/ovl_Demo_Effect/z_demo_effect.h"
|
||||
#include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h"
|
||||
#include "vt.h"
|
||||
|
||||
#define FLAGS 0x00000010
|
||||
|
@ -171,7 +172,7 @@ void DemoDu_CsFireMedallion_SpawnDoorWarp(DemoDu* this, GlobalContext* globalCtx
|
|||
f32 posY = this->actor.world.pos.y;
|
||||
f32 posZ = this->actor.world.pos.z;
|
||||
|
||||
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_WARP1, posX, posY, posZ, 0, 0, 0, 2);
|
||||
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_WARP1, posX, posY, posZ, 0, 0, 0, WARP_SAGES);
|
||||
}
|
||||
|
||||
// Gives the Fire Medallion to Link.
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include "z_demo_im.h"
|
||||
#include "overlays/actors/ovl_En_Arrow/z_en_arrow.h"
|
||||
#include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h"
|
||||
#include "scenes/indoors/nakaniwa/nakaniwa_scene.h"
|
||||
#include "objects/object_im/object_im.h"
|
||||
#include "vt.h"
|
||||
|
@ -304,7 +305,7 @@ void func_80985358(DemoIm* this, GlobalContext* globalCtx) {
|
|||
f32 posY = this->actor.world.pos.y;
|
||||
f32 posZ = this->actor.world.pos.z;
|
||||
|
||||
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_WARP1, posX, posY, posZ, 0, 0, 0, 2);
|
||||
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_WARP1, posX, posY, posZ, 0, 0, 0, WARP_SAGES);
|
||||
}
|
||||
|
||||
void func_809853B4(DemoIm* this, GlobalContext* globalCtx) {
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include "z_demo_sa.h"
|
||||
#include "overlays/actors/ovl_En_Elf/z_en_elf.h"
|
||||
#include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h"
|
||||
#include "objects/object_sa/object_sa.h"
|
||||
|
||||
#include "vt.h"
|
||||
|
@ -228,7 +229,7 @@ void func_8098E86C(DemoSa* this, GlobalContext* globalCtx) {
|
|||
f32 posY = world->y;
|
||||
f32 posZ = world->z;
|
||||
|
||||
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_WARP1, posX, posY, posZ, 0, 0, 0, 2);
|
||||
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_WARP1, posX, posY, posZ, 0, 0, 0, WARP_SAGES);
|
||||
}
|
||||
|
||||
void func_8098E8C8(DemoSa* this, GlobalContext* globalCtx) {
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -6,12 +6,58 @@
|
|||
|
||||
struct DoorWarp1;
|
||||
|
||||
typedef enum {
|
||||
/* -2 */ WARP_BLUE_CRYSTAL = -2,
|
||||
/* -1 */ WARP_DUNGEON_ADULT,
|
||||
/* 0 */ WARP_DUNGEON_CHILD,
|
||||
/* 1 */ WARP_CLEAR_FLAG, // Activate on temp clear flag
|
||||
/* 2 */ WARP_SAGES, // Used by sages warping into chamber of sages during their cutscene
|
||||
/* 3 */ WARP_PURPLE_CRYSTAL,
|
||||
/* 4 */ WARP_YELLOW, // The colored variants don't warp, they are cutscene setpieces
|
||||
/* 5 */ WARP_BLUE_RUTO,
|
||||
/* 6 */ WARP_DESTINATION, // Spawning in after having taken a warp
|
||||
/* 7 */ WARP_UNK_7,
|
||||
/* 8 */ WARP_ORANGE,
|
||||
/* 9 */ WARP_GREEN,
|
||||
/* 10 */ WARP_RED
|
||||
} DoorWarp1Type;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ WARP_BLUE_RUTO_STATE_INITIAL, // initial, warp doesn't work yet
|
||||
/* 1 */ WARP_BLUE_RUTO_STATE_READY, // set by ruto, warp can work now
|
||||
/* 2 */ WARP_BLUE_RUTO_STATE_ENTERED, // set by warp, player has stepped into the warp
|
||||
/* 3 */ WARP_BLUE_RUTO_STATE_3, // set by ruto, folding arms
|
||||
/* 4 */ WARP_BLUE_RUTO_STATE_TALKING, // set by warp, dialog started
|
||||
/* 5 */ WARP_BLUE_RUTO_STATE_WARPING // set by warp, after closing dialog
|
||||
} DoorWarp1RutoState;
|
||||
|
||||
typedef void (*DoorWarp1ActionFunc)(struct DoorWarp1*, GlobalContext*);
|
||||
|
||||
typedef struct DoorWarp1 {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ char unk_14C[0x5C];
|
||||
/* 0x01A8 */ f32 alpha;
|
||||
/* 0x01AC */ char unk_1AC[0x40];
|
||||
/* 0x01EC */ s32 unk_1EC;
|
||||
/* 0x014C */ SkelAnime skelAnime;
|
||||
/* 0x0190 */ char unk_190[0x2];
|
||||
/* 0x0192 */ u16 warpTimer;
|
||||
/* 0x0194 */ f32 unk_194;
|
||||
/* 0x0198 */ f32 unk_198;
|
||||
/* 0x019C */ f32 unk_19C;
|
||||
/* 0x01A0 */ f32 lightRayAlpha;
|
||||
/* 0x01A4 */ f32 warpAlpha;
|
||||
/* 0x01A8 */ f32 crystalAlpha;
|
||||
/* 0x01AC */ s16 scale;
|
||||
/* 0x01AE */ s16 unk_1AE;
|
||||
/* 0x01B0 */ s16 unk_1B0;
|
||||
/* 0x01B2 */ s16 unk_1B2;
|
||||
/* 0x01B4 */ f32 unk_1B4;
|
||||
/* 0x01B8 */ s16 unk_1B8;
|
||||
/* 0x01BA */ u16 unk_1BA;
|
||||
/* 0x01BC */ f32 unk_1BC;
|
||||
/* 0x01C0 */ DoorWarp1ActionFunc actionFunc;
|
||||
/* 0x01C4 */ LightNode* upperLight;
|
||||
/* 0x01C8 */ LightInfo upperLightInfo;
|
||||
/* 0x01D8 */ LightNode* lowerLight;
|
||||
/* 0x01DC */ LightInfo lowerLightInfo;
|
||||
/* 0x01EC */ s32 rutoWarpState; // for state communication with En_Ru1 using DoorWarp1RutoState values
|
||||
} DoorWarp1; // size = 0x01F0
|
||||
|
||||
#endif
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "z_en_nb.h"
|
||||
#include "vt.h"
|
||||
#include "objects/object_nb/object_nb.h"
|
||||
#include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h"
|
||||
|
||||
#define FLAGS 0x00000010
|
||||
|
||||
|
@ -312,7 +313,7 @@ void EnNb_SpawnBlueWarp(EnNb* this, GlobalContext* globalCtx) {
|
|||
f32 posY = this->actor.world.pos.y;
|
||||
f32 posZ = this->actor.world.pos.z;
|
||||
|
||||
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_WARP1, posX, posY, posZ, 0, 0, 0, 2);
|
||||
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_WARP1, posX, posY, posZ, 0, 0, 0, WARP_SAGES);
|
||||
}
|
||||
|
||||
void EnNb_GiveMedallion(EnNb* this, GlobalContext* globalCtx) {
|
||||
|
|
|
@ -999,7 +999,7 @@ void func_80AECCB0(EnRu1* this, GlobalContext* globalCtx) {
|
|||
spawnY = pos->y;
|
||||
spawnZ = ((kREG(1) + 12.0f) * Math_CosS(yawTowardsPlayer)) + pos->z;
|
||||
this->blueWarp = (DoorWarp1*)Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_WARP1,
|
||||
spawnX, spawnY, spawnZ, 0, yawTowardsPlayer, 0, 5);
|
||||
spawnX, spawnY, spawnZ, 0, yawTowardsPlayer, 0, WARP_BLUE_RUTO);
|
||||
}
|
||||
|
||||
void func_80AECDA0(EnRu1* this, GlobalContext* globalCtx) {
|
||||
|
@ -1068,16 +1068,16 @@ s32 func_80AECF6C(EnRu1* this, GlobalContext* globalCtx) {
|
|||
return false;
|
||||
}
|
||||
|
||||
s32 func_80AED084(EnRu1* this, UNK_TYPE arg1) {
|
||||
if (this->blueWarp != NULL && this->blueWarp->unk_1EC == arg1) {
|
||||
s32 func_80AED084(EnRu1* this, s32 state) {
|
||||
if (this->blueWarp != NULL && this->blueWarp->rutoWarpState == state) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void func_80AED0B0(EnRu1* this, UNK_TYPE arg1) {
|
||||
void func_80AED0B0(EnRu1* this, s32 state) {
|
||||
if (this->blueWarp != NULL) {
|
||||
this->blueWarp->unk_1EC = arg1;
|
||||
this->blueWarp->rutoWarpState = state;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1097,12 +1097,12 @@ void func_80AED110(EnRu1* this) {
|
|||
if (this->actor.shape.yOffset >= 0.0f) {
|
||||
this->action = 18;
|
||||
this->actor.shape.yOffset = 0.0f;
|
||||
func_80AED0B0(this, 1);
|
||||
func_80AED0B0(this, WARP_BLUE_RUTO_STATE_READY);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80AED154(EnRu1* this, GlobalContext* globalCtx) {
|
||||
if (func_80AED084(this, 2)) {
|
||||
if (func_80AED084(this, WARP_BLUE_RUTO_STATE_ENTERED)) {
|
||||
this->action = 0x13;
|
||||
this->unk_26C = 0.0f;
|
||||
func_80AECEB4(this, globalCtx);
|
||||
|
@ -1115,17 +1115,17 @@ void func_80AED19C(EnRu1* this, s32 cond) {
|
|||
Animation_GetLastFrame(&gRutoChildTransitionHandsOnHipToCrossArmsAndLegsAnim), ANIMMODE_ONCE,
|
||||
-8.0f);
|
||||
this->action = 20;
|
||||
func_80AED0B0(this, 3);
|
||||
func_80AED0B0(this, WARP_BLUE_RUTO_STATE_3);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80AED218(EnRu1* this, UNK_TYPE arg1) {
|
||||
if (func_80AED084(this, 4)) {
|
||||
if (func_80AED084(this, WARP_BLUE_RUTO_STATE_TALKING)) {
|
||||
if (arg1 != 0) {
|
||||
Animation_Change(&this->skelAnime, &gRutoChildWaitSittingAnim, 1.0f, 0,
|
||||
Animation_GetLastFrame(&gRutoChildWaitSittingAnim), ANIMMODE_LOOP, -8.0f);
|
||||
}
|
||||
} else if (func_80AED084(this, 5)) {
|
||||
} else if (func_80AED084(this, WARP_BLUE_RUTO_STATE_WARPING)) {
|
||||
Animation_Change(&this->skelAnime, &gRutoChildWaitInBlueWarpAnim, 1.0f, 0,
|
||||
Animation_GetLastFrame(&gRutoChildWaitInBlueWarpAnim), ANIMMODE_ONCE, -8.0f);
|
||||
this->action = 21;
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include "z_en_ru2.h"
|
||||
#include "objects/object_ru2/object_ru2.h"
|
||||
#include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h"
|
||||
#include "vt.h"
|
||||
|
||||
#define FLAGS 0x00000010
|
||||
|
@ -247,7 +248,7 @@ void func_80AF29DC(EnRu2* this, GlobalContext* globalCtx) {
|
|||
f32 posY = thisx->world.pos.y;
|
||||
f32 posZ = thisx->world.pos.z;
|
||||
|
||||
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_WARP1, posX, posY, posZ, 0, 0, 0, 2);
|
||||
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_WARP1, posX, posY, posZ, 0, 0, 0, WARP_SAGES);
|
||||
}
|
||||
|
||||
void func_80AF2A38(EnRu2* this, GlobalContext* globalCtx) {
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include "z_en_xc.h"
|
||||
#include "overlays/actors/ovl_En_Arrow/z_en_arrow.h"
|
||||
#include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h"
|
||||
#include "objects/object_xc/object_xc.h"
|
||||
#include "scenes/overworld/spot05/spot05_scene.h"
|
||||
#include "scenes/overworld/spot17/spot17_scene.h"
|
||||
|
@ -1391,7 +1392,7 @@ void func_80B3F534(GlobalContext* globalCtx) {
|
|||
u16 frameCount = csCtx->frames;
|
||||
|
||||
if (frameCount == 310) {
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_DOOR_WARP1, -1044.0f, -1243.0f, 7458.0f, 0, 0, 0, 6);
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_DOOR_WARP1, -1044.0f, -1243.0f, 7458.0f, 0, 0, 0, WARP_DESTINATION);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -649,7 +649,7 @@ void func_80B4FF84(EnZl2* this, GlobalContext* globalCtx) {
|
|||
posY = this->actor.world.pos.y;
|
||||
posZ = this->actor.world.pos.z;
|
||||
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_DOOR_WARP1, posX, posY, posZ, 0, 0, 0, 4);
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_DOOR_WARP1, posX, posY, posZ, 0, 0, 0, WARP_YELLOW);
|
||||
this->unk_250 = 1;
|
||||
}
|
||||
}
|
||||
|
@ -665,7 +665,7 @@ void func_80B4FFF0(EnZl2* this, GlobalContext* globalCtx) {
|
|||
posZ = this->actor.world.pos.z;
|
||||
|
||||
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_WARP1, posX, posY, posZ, 0, 0x4000,
|
||||
0, 3);
|
||||
0, WARP_PURPLE_CRYSTAL);
|
||||
this->unk_248 = 1;
|
||||
}
|
||||
}
|
||||
|
@ -707,7 +707,7 @@ void func_80B500E0(EnZl2* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_80B501C4(EnZl2* this, s32 alpha) {
|
||||
if (this->actor.child != NULL) {
|
||||
((DoorWarp1*)this->actor.child)->alpha = alpha;
|
||||
((DoorWarp1*)this->actor.child)->crystalAlpha = alpha;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1183,7 +1183,7 @@ void func_80B513A8(EnZl2* this, GlobalContext* globalCtx) {
|
|||
posX = player->actor.world.pos.x;
|
||||
posY = player->actor.world.pos.y;
|
||||
posZ = player->actor.world.pos.z;
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_DOOR_WARP1, posX, posY, posZ, 0, 0, 0, 7);
|
||||
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_DOOR_WARP1, posX, posY, posZ, 0, 0, 0, WARP_UNK_7);
|
||||
this->unk_250 = 1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -786,7 +786,7 @@ void func_80B54F18(EnZl3* this, GlobalContext* globalCtx) {
|
|||
f32 posZ = this->actor.world.pos.z;
|
||||
|
||||
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_WARP1, posX, posY, posZ, 0, 0x4000,
|
||||
0, 3);
|
||||
0, WARP_PURPLE_CRYSTAL);
|
||||
this->unk_2F8 = 1;
|
||||
}
|
||||
}
|
||||
|
@ -813,7 +813,7 @@ void func_80B55054(EnZl3* this) {
|
|||
f32* temp_v0 = &this->unk_2EC;
|
||||
|
||||
if (*temp_v0 < 19.0f) {
|
||||
((DoorWarp1*)child)->alpha = (20.0f - *temp_v0) * 12.75f;
|
||||
((DoorWarp1*)child)->crystalAlpha = (20.0f - *temp_v0) * 12.75f;
|
||||
*temp_v0 += 1.0f;
|
||||
} else {
|
||||
Actor_Kill(child);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue