mirror of
https://github.com/zeldaret/oot.git
synced 2025-06-08 09:31:52 +00:00
Child Ruto Part 9: Camera setting (#2577)
* Child Ruto Part 9: Camera setting * Add comment * Rename "Jabu-Jabu context" to "Big Octo platform" * Rename getter and setter
This commit is contained in:
parent
28cc9d68cf
commit
d0bc691ec8
2 changed files with 20 additions and 20 deletions
|
@ -313,7 +313,7 @@ s32 func_80AEB020(EnRu1* this, PlayState* play) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
BgBdanObjects* EnRu1_FindSwitch(PlayState* play) {
|
BgBdanObjects* EnRu1_FindBigOctoPlatform(PlayState* play) {
|
||||||
Actor* actorIt = play->actorCtx.actorLists[ACTORCAT_BG].head;
|
Actor* actorIt = play->actorCtx.actorLists[ACTORCAT_BG].head;
|
||||||
|
|
||||||
while (actorIt != NULL) {
|
while (actorIt != NULL) {
|
||||||
|
@ -327,15 +327,15 @@ BgBdanObjects* EnRu1_FindSwitch(PlayState* play) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_80AEB0EC(EnRu1* this, s32 cameraSetting) {
|
void EnRu1_SetPlatformCamSetting(EnRu1* this, s32 cameraSetting) {
|
||||||
if (this->unk_28C != NULL) {
|
if (this->bigOctoPlatform != NULL) {
|
||||||
this->unk_28C->cameraSetting = cameraSetting;
|
this->bigOctoPlatform->cameraSetting = cameraSetting;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 func_80AEB104(EnRu1* this) {
|
s32 EnRu1_GetPlatformCamSetting(EnRu1* this) {
|
||||||
if (this->unk_28C != NULL) {
|
if (this->bigOctoPlatform != NULL) {
|
||||||
return this->unk_28C->cameraSetting;
|
return this->bigOctoPlatform->cameraSetting;
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -371,7 +371,7 @@ void func_80AEB1D8(EnRu1* this) {
|
||||||
this->actor.speed = 0.0f;
|
this->actor.speed = 0.0f;
|
||||||
this->actor.gravity = 0.0f;
|
this->actor.gravity = 0.0f;
|
||||||
this->actor.minVelocityY = 0.0f;
|
this->actor.minVelocityY = 0.0f;
|
||||||
func_80AEB0EC(this, 0);
|
EnRu1_SetPlatformCamSetting(this, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_80AEB220(EnRu1* this, PlayState* play) {
|
void func_80AEB220(EnRu1* this, PlayState* play) {
|
||||||
|
@ -1576,7 +1576,7 @@ s32 func_80AEE394(EnRu1* this, PlayState* play) {
|
||||||
gSaveContext.cutsceneTrigger = 1;
|
gSaveContext.cutsceneTrigger = 1;
|
||||||
this->action = 36;
|
this->action = 36;
|
||||||
this->drawConfig = 0;
|
this->drawConfig = 0;
|
||||||
this->unk_28C = (BgBdanObjects*)dynaPolyActor;
|
this->bigOctoPlatform = (BgBdanObjects*)dynaPolyActor;
|
||||||
this->actor.shape.shadowAlpha = 0;
|
this->actor.shape.shadowAlpha = 0;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1958,7 +1958,7 @@ void func_80AEF51C(EnRu1* this) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_80AEF540(EnRu1* this) {
|
void func_80AEF540(EnRu1* this) {
|
||||||
if (func_80AEB104(this) == 2) {
|
if (EnRu1_GetPlatformCamSetting(this) == 2) {
|
||||||
EnRu1_SetEyeIndex(this, 3);
|
EnRu1_SetEyeIndex(this, 3);
|
||||||
EnRu1_SetMouthIndex(this, 2);
|
EnRu1_SetMouthIndex(this, 2);
|
||||||
if (this->skelAnime.mode != 2) {
|
if (this->skelAnime.mode != 2) {
|
||||||
|
@ -2047,14 +2047,14 @@ void func_80AEF890(EnRu1* this, PlayState* play) {
|
||||||
curRoomNum = play->roomCtx.curRoom.num;
|
curRoomNum = play->roomCtx.curRoom.num;
|
||||||
SET_INFTABLE(INFTABLE_145);
|
SET_INFTABLE(INFTABLE_145);
|
||||||
Flags_SetSwitch(play, func_80AEADE0(this));
|
Flags_SetSwitch(play, func_80AEADE0(this));
|
||||||
func_80AEB0EC(this, 1);
|
EnRu1_SetPlatformCamSetting(this, 1);
|
||||||
this->action = 42;
|
this->action = 42;
|
||||||
this->actor.room = curRoomNum;
|
this->actor.room = curRoomNum;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_80AEF930(EnRu1* this, PlayState* play) {
|
void func_80AEF930(EnRu1* this, PlayState* play) {
|
||||||
if (func_80AEB104(this) == 3) {
|
if (EnRu1_GetPlatformCamSetting(this) == 3) {
|
||||||
this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY;
|
this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY;
|
||||||
this->actor.textId = 0x4048;
|
this->actor.textId = 0x4048;
|
||||||
#if !OOT_PAL_N64
|
#if !OOT_PAL_N64
|
||||||
|
@ -2070,7 +2070,7 @@ void func_80AEF930(EnRu1* this, PlayState* play) {
|
||||||
|
|
||||||
void func_80AEF99C(EnRu1* this, PlayState* play) {
|
void func_80AEF99C(EnRu1* this, PlayState* play) {
|
||||||
if (func_80AEB1B4(play) != 0) {
|
if (func_80AEB1B4(play) != 0) {
|
||||||
func_80AEB0EC(this, 4);
|
EnRu1_SetPlatformCamSetting(this, 4);
|
||||||
Actor_Kill(&this->actor);
|
Actor_Kill(&this->actor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2155,8 +2155,8 @@ void EnRu1_InitInSapphireRoom(EnRu1* this, PlayState* play) {
|
||||||
|
|
||||||
func_80AEB264(this, &gRutoChildWait2Anim, 0, 0, 0);
|
func_80AEB264(this, &gRutoChildWait2Anim, 0, 0, 0);
|
||||||
this->action = 41;
|
this->action = 41;
|
||||||
this->unk_28C = EnRu1_FindSwitch(play);
|
this->bigOctoPlatform = EnRu1_FindBigOctoPlatform(play);
|
||||||
func_80AEB0EC(this, 1);
|
EnRu1_SetPlatformCamSetting(this, 1);
|
||||||
this->actor.flags &= ~(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY);
|
this->actor.flags &= ~(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY);
|
||||||
} else {
|
} else {
|
||||||
Actor_Kill(&this->actor);
|
Actor_Kill(&this->actor);
|
||||||
|
@ -2164,11 +2164,11 @@ void EnRu1_InitInSapphireRoom(EnRu1* this, PlayState* play) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_80AEFCE8(EnRu1* this, PlayState* play) {
|
void func_80AEFCE8(EnRu1* this, PlayState* play) {
|
||||||
this->unk_28C = EnRu1_FindSwitch(play);
|
this->bigOctoPlatform = EnRu1_FindBigOctoPlatform(play);
|
||||||
if (this->unk_28C != NULL) {
|
if (this->bigOctoPlatform != NULL) {
|
||||||
this->action = 42;
|
this->action = 42;
|
||||||
this->drawConfig = 1;
|
this->drawConfig = 1;
|
||||||
func_80AEB0EC(this, 1);
|
EnRu1_SetPlatformCamSetting(this, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2261,7 +2261,7 @@ void func_80AF0050(EnRu1* this, PlayState* play) {
|
||||||
func_80AEB264(this, &gRutoChildWait2Anim, 0, 0, 0);
|
func_80AEB264(this, &gRutoChildWait2Anim, 0, 0, 0);
|
||||||
this->action = 36;
|
this->action = 36;
|
||||||
this->roomNum1 = this->actor.room;
|
this->roomNum1 = this->actor.room;
|
||||||
this->unk_28C = EnRu1_FindSwitch(play);
|
this->bigOctoPlatform = EnRu1_FindBigOctoPlatform(play);
|
||||||
this->actor.room = -1;
|
this->actor.room = -1;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -33,7 +33,7 @@ typedef struct EnRu1 {
|
||||||
/* 0x0285 */ s8 roomNum2;
|
/* 0x0285 */ s8 roomNum2;
|
||||||
/* 0x0286 */ s8 roomNum3;
|
/* 0x0286 */ s8 roomNum3;
|
||||||
/* 0x0288 */ f32 unk_288;
|
/* 0x0288 */ f32 unk_288;
|
||||||
/* 0x028C */ BgBdanObjects* unk_28C;
|
/* 0x028C */ BgBdanObjects* bigOctoPlatform;
|
||||||
/* 0x0290 */ s32 unk_290;
|
/* 0x0290 */ s32 unk_290;
|
||||||
/* 0x0294 */ char unk_294[0x4];
|
/* 0x0294 */ char unk_294[0x4];
|
||||||
/* 0x0298 */ s32 unk_298;
|
/* 0x0298 */ s32 unk_298;
|
||||||
|
|
Loading…
Add table
Reference in a new issue