mirror of
https://github.com/zeldaret/oot.git
synced 2025-06-09 01:51:55 +00:00
Child Ruto Part 15: Position-related functions
This commit is contained in:
parent
c6dbebfcd2
commit
fd0acee31a
1 changed files with 12 additions and 12 deletions
|
@ -1444,7 +1444,7 @@ void func_80AEDB30(EnRu1* this, PlayState* play) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_80AEDEF4(EnRu1* this, PlayState* play) {
|
void EnRu1_UpdateSpeedXZ(EnRu1* this, PlayState* play) {
|
||||||
f32* speedXZ = &this->actor.speed;
|
f32* speedXZ = &this->actor.speed;
|
||||||
DynaPolyActor* dynaPolyActor = DynaPoly_GetActor(&play->colCtx, this->actor.floorBgId);
|
DynaPolyActor* dynaPolyActor = DynaPoly_GetActor(&play->colCtx, this->actor.floorBgId);
|
||||||
|
|
||||||
|
@ -1462,13 +1462,13 @@ void func_80AEDEF4(EnRu1* this, PlayState* play) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_80AEDFF4(EnRu1* this, PlayState* play) {
|
void EnRu1_UpdatePosition(EnRu1* this, PlayState* play) {
|
||||||
func_80AEDB30(this, play);
|
func_80AEDB30(this, play);
|
||||||
func_80AEDEF4(this, play);
|
EnRu1_UpdateSpeedXZ(this, play);
|
||||||
Actor_MoveXZGravity(&this->actor);
|
Actor_MoveXZGravity(&this->actor);
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_80AEE02C(EnRu1* this) {
|
void EnRu1_StopMoving(EnRu1* this) {
|
||||||
this->actor.velocity.x = 0.0f;
|
this->actor.velocity.x = 0.0f;
|
||||||
this->actor.velocity.y = 0.0f;
|
this->actor.velocity.y = 0.0f;
|
||||||
this->actor.velocity.z = 0.0f;
|
this->actor.velocity.z = 0.0f;
|
||||||
|
@ -1487,7 +1487,7 @@ void EnRu1_UpdateWaterState(EnRu1* this) {
|
||||||
if ((this->actor.minVelocityY == 0.0f) && (this->actor.speed == 0.0f)) {
|
if ((this->actor.minVelocityY == 0.0f) && (this->actor.speed == 0.0f)) {
|
||||||
// When Ruto's velocity has been slowed enough by the water, stop her motion
|
// When Ruto's velocity has been slowed enough by the water, stop her motion
|
||||||
this->waterState = ENRU1_WATER_IMMERSED;
|
this->waterState = ENRU1_WATER_IMMERSED;
|
||||||
func_80AEE02C(this);
|
EnRu1_StopMoving(this);
|
||||||
this->bobPhase = 0;
|
this->bobPhase = 0;
|
||||||
this->bobDepth = (this->actor.depthInWater - 10.0f) * 0.5f;
|
this->bobDepth = (this->actor.depthInWater - 10.0f) * 0.5f;
|
||||||
this->sinkingStartPosY = this->actor.world.pos.y + thisx->bobDepth;
|
this->sinkingStartPosY = this->actor.world.pos.y + thisx->bobDepth;
|
||||||
|
@ -1511,7 +1511,7 @@ void EnRu1_UpdateWaterState(EnRu1* this) {
|
||||||
} else {
|
} else {
|
||||||
if (this->waterState == ENRU1_WATER_IMMERSED) {
|
if (this->waterState == ENRU1_WATER_IMMERSED) {
|
||||||
if (this->bobDepth <= 1.0f) {
|
if (this->bobDepth <= 1.0f) {
|
||||||
func_80AEE02C(this);
|
EnRu1_StopMoving(this);
|
||||||
this->waterState = ENRU1_WATER_BOBBING;
|
this->waterState = ENRU1_WATER_BOBBING;
|
||||||
this->isSinking = 0.0f;
|
this->isSinking = 0.0f;
|
||||||
} else {
|
} else {
|
||||||
|
@ -1580,7 +1580,7 @@ s32 func_80AEE394(EnRu1* this, PlayState* play) {
|
||||||
dynaPolyActor = DynaPoly_GetActor(colCtx, floorBgId);
|
dynaPolyActor = DynaPoly_GetActor(colCtx, floorBgId);
|
||||||
if (dynaPolyActor != NULL && dynaPolyActor->actor.id == ACTOR_BG_BDAN_OBJECTS &&
|
if (dynaPolyActor != NULL && dynaPolyActor->actor.id == ACTOR_BG_BDAN_OBJECTS &&
|
||||||
dynaPolyActor->actor.params == 0 && !Player_InCsMode(play) && play->msgCtx.msgLength == 0) {
|
dynaPolyActor->actor.params == 0 && !Player_InCsMode(play) && play->msgCtx.msgLength == 0) {
|
||||||
func_80AEE02C(this);
|
EnRu1_StopMoving(this);
|
||||||
play->csCtx.script = gRutoObtainingSapphireCs;
|
play->csCtx.script = gRutoObtainingSapphireCs;
|
||||||
gSaveContext.cutsceneTrigger = 1;
|
gSaveContext.cutsceneTrigger = 1;
|
||||||
this->action = 36;
|
this->action = 36;
|
||||||
|
@ -1616,7 +1616,7 @@ void func_80AEE568(EnRu1* this, PlayState* play) {
|
||||||
(this->actor.minVelocityY == 0.0f)) {
|
(this->actor.minVelocityY == 0.0f)) {
|
||||||
s32 pad;
|
s32 pad;
|
||||||
|
|
||||||
func_80AEE02C(this);
|
EnRu1_StopMoving(this);
|
||||||
Actor_OfferCarry(&this->actor, play);
|
Actor_OfferCarry(&this->actor, play);
|
||||||
this->action = 27;
|
this->action = 27;
|
||||||
EnRu1_DisableSittingOC(this);
|
EnRu1_DisableSittingOC(this);
|
||||||
|
@ -1724,7 +1724,7 @@ s32 EnRu1_CheckHitBottomUnderwater(EnRu1* this, PlayState* play) {
|
||||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||||
s32 pad;
|
s32 pad;
|
||||||
|
|
||||||
func_80AEE02C(this);
|
EnRu1_StopMoving(this);
|
||||||
Actor_OfferCarry(&this->actor, play);
|
Actor_OfferCarry(&this->actor, play);
|
||||||
this->action = 27;
|
this->action = 27;
|
||||||
EnRu1_DisableSittingOC(this);
|
EnRu1_DisableSittingOC(this);
|
||||||
|
@ -1736,7 +1736,7 @@ s32 EnRu1_CheckHitBottomUnderwater(EnRu1* this, PlayState* play) {
|
||||||
void EnRu1_CheckSinkingState(EnRu1* this, PlayState* play) {
|
void EnRu1_CheckSinkingState(EnRu1* this, PlayState* play) {
|
||||||
if ((EnRu1_CheckHitBottomUnderwater(this, play) == 0) && (this->waterState == ENRU1_WATER_SINKING)) {
|
if ((EnRu1_CheckHitBottomUnderwater(this, play) == 0) && (this->waterState == ENRU1_WATER_SINKING)) {
|
||||||
this->action = 30;
|
this->action = 30;
|
||||||
func_80AEE02C(this);
|
EnRu1_StopMoving(this);
|
||||||
this->actor.gravity = -0.1f;
|
this->actor.gravity = -0.1f;
|
||||||
this->actor.minVelocityY = -((kREG(18) * 0.1f) + 0.7f);
|
this->actor.minVelocityY = -((kREG(18) * 0.1f) + 0.7f);
|
||||||
}
|
}
|
||||||
|
@ -1763,7 +1763,7 @@ void func_80AEEC5C(EnRu1* this, PlayState* play) {
|
||||||
EnRu1_UpdateSittingAT(this, play);
|
EnRu1_UpdateSittingAT(this, play);
|
||||||
func_80AEAECC(this, play);
|
func_80AEAECC(this, play);
|
||||||
func_80AEE2F8(this, play);
|
func_80AEE2F8(this, play);
|
||||||
func_80AEDFF4(this, play);
|
EnRu1_UpdatePosition(this, play);
|
||||||
EnRu1_UpdateSkelAnime(this);
|
EnRu1_UpdateSkelAnime(this);
|
||||||
EnRu1_UpdateEyes(this);
|
EnRu1_UpdateEyes(this);
|
||||||
func_80AEE568(this, play);
|
func_80AEE568(this, play);
|
||||||
|
@ -1815,7 +1815,7 @@ void func_80AEEE34(EnRu1* this, PlayState* play) {
|
||||||
void func_80AEEE9C(EnRu1* this, PlayState* play) {
|
void func_80AEEE9C(EnRu1* this, PlayState* play) {
|
||||||
func_80AED83C(this);
|
func_80AED83C(this);
|
||||||
func_80AEAECC(this, play);
|
func_80AEAECC(this, play);
|
||||||
func_80AEDFF4(this, play);
|
EnRu1_UpdatePosition(this, play);
|
||||||
EnRu1_UpdateSkelAnime(this);
|
EnRu1_UpdateSkelAnime(this);
|
||||||
EnRu1_UpdateEyes(this);
|
EnRu1_UpdateEyes(this);
|
||||||
func_80AED738(this, play);
|
func_80AED738(this, play);
|
||||||
|
|
Loading…
Add table
Reference in a new issue