mirror of
https://github.com/zeldaret/tmc
synced 2026-07-31 08:06:30 -04:00
framestate, ezlo hint
This commit is contained in:
+2
-2
@@ -25,7 +25,7 @@ void sub_08021768(Entity* this) {
|
||||
void sub_08021780(Entity* this) {
|
||||
switch (this->bitfield) {
|
||||
case 0x80:
|
||||
if (gPlayerState.field_0xa8 == 24) {
|
||||
if (gPlayerState.framestate == PL_STATE_CLIMB) {
|
||||
sub_08021768(this);
|
||||
} else {
|
||||
this->action = 5;
|
||||
@@ -219,7 +219,7 @@ void sub_08021B64(Entity* this) {
|
||||
InitializeAnimation(this, 2);
|
||||
} else {
|
||||
int iVar4 = 1;
|
||||
if (gPlayerState.field_0xa8 != 11 && gPlayerState.field_0xa8 != 20) {
|
||||
if (gPlayerState.framestate != PL_STATE_JUMP && gPlayerState.framestate != PL_STATE_CAPE) {
|
||||
if (sub_0807953C())
|
||||
iVar4 = this->type * 3 + 8;
|
||||
|
||||
|
||||
@@ -998,13 +998,13 @@ void VaatiWrathType0PreAction(Entity* this) {
|
||||
if (gSave.unk48C[3] != 0) {
|
||||
gSave.unk48C[3]--;
|
||||
} else {
|
||||
temp = gPlayerState.field_0xa9;
|
||||
temp = gPlayerState.framestate_last;
|
||||
if (temp < 2) {
|
||||
if (temp >= 0) {
|
||||
if (gPlayerState.field_0x2c == NULL) {
|
||||
if (gPlayerEntity.field_0x7a.HWORD == 0) {
|
||||
if ((gPlayerEntity.z.HALF.HI & 0x8000U) == 0 || (gPlayerState.field_0xa != 0)) {
|
||||
sub_08078AA8(0xb70, 0);
|
||||
CreateEzloHint(0xb70, 0);
|
||||
gScreenTransition.field_0x38 |= 2;
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -195,7 +195,7 @@ void PlayerUpdate(Entity* this) {
|
||||
COLLISION_ON(this);
|
||||
} else {
|
||||
COLLISION_OFF(this);
|
||||
gPlayerState.field_0xa8 = 0xf;
|
||||
gPlayerState.framestate = PL_STATE_F;
|
||||
}
|
||||
}
|
||||
HandlePlayerLife(this);
|
||||
@@ -235,8 +235,8 @@ void HandlePlayerLife(Entity* this) {
|
||||
if (gPlayerState.field_0x27[0] != 0)
|
||||
gPlayerState.field_0x27[0]--;
|
||||
|
||||
gPlayerState.field_0xa9 = gPlayerState.field_0xa8;
|
||||
gPlayerState.field_0xa8 = 0;
|
||||
gPlayerState.framestate_last = gPlayerState.framestate;
|
||||
gPlayerState.framestate = PL_STATE_IDLE;
|
||||
if (gPlayerState.hurtType[0x4a] != 0) {
|
||||
gPlayerState.hurtType[0x4a]--;
|
||||
return;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
extern void (*const gUnk_0811BDF4[])(ItemBehavior* beh, u32);
|
||||
|
||||
void ItemGustJar(ItemBehavior* this, u32 arg1) {
|
||||
gPlayerState.field_0xa8 = 3;
|
||||
gPlayerState.framestate = PL_STATE_GUSTJAR;
|
||||
gUnk_0811BDF4[this->stateID](this, arg1);
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ extern u32 sub_08077EC8(ItemBehavior*);
|
||||
void sub_08075694(ItemBehavior* this, u32 arg1);
|
||||
|
||||
void ItemSword(ItemBehavior* this, u32 arg1) {
|
||||
gPlayerState.field_0xa8 = 0x02;
|
||||
gPlayerState.framestate = PL_STATE_SWORD;
|
||||
gUnk_0811BD44[this->stateID](this, arg1);
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ void sub_08076488(ItemBehavior* this, u32 arg1) {
|
||||
} else {
|
||||
this->field_0x5[2] -= 1;
|
||||
}
|
||||
gPlayerState.field_0xa8 = 4;
|
||||
gPlayerState.framestate = PL_STATE_HOLD;
|
||||
}
|
||||
|
||||
ASM_FUNC("asm/non_matching/itemTryPickupObject/sub_08076518.inc", void sub_08076518(ItemBehavior* this, u32 arg1))
|
||||
|
||||
@@ -297,9 +297,9 @@ void sub_0805A758(Manager15* this) {
|
||||
|
||||
void sub_0805A76C(Manager15* this) {
|
||||
if ((gPlayerEntity.health != 0) && (gPlayerEntity.z.HALF.HI == 0) && (!gPlayerState.field_0x2c)) {
|
||||
switch (gPlayerState.field_0xa9) {
|
||||
case 1:
|
||||
case 0:
|
||||
switch (gPlayerState.framestate_last) {
|
||||
case PL_STATE_IDLE:
|
||||
case PL_STATE_WALK:
|
||||
if (sub_0805A73C(this)) {
|
||||
this->manager.action++;
|
||||
sub_08004168(&gPlayerEntity);
|
||||
|
||||
@@ -96,9 +96,9 @@ void CreateMagicSparkles(u32 baseX, u32 baseY, u32 layer) {
|
||||
u32 sub_08057810(void) {
|
||||
if ((gPlayerState.flags & PL_MINISH) && !gPlayerState.field_0xaa && (gArea.curPortalType != 0x6) &&
|
||||
(gPlayerState.heldObject == 0)) {
|
||||
switch (gPlayerState.field_0xa8) {
|
||||
case 0:
|
||||
case 1:
|
||||
switch (gPlayerState.framestate) {
|
||||
case PL_STATE_IDLE:
|
||||
case PL_STATE_WALK:
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ void Manager33_Main(Manager* this) {
|
||||
u32 b = roomControls->roomOriginY + 0x140;
|
||||
u32 y = (b - gPlayerEntity.y.HALF.HI) + 0x10;
|
||||
if (this->action == 0) {
|
||||
if (x < 0x20 && y < 0x20 && gPlayerEntity.z.HALF.HI < -0x18 && gPlayerState.field_0xa8 == 0x14) {
|
||||
if (x < 0x20 && y < 0x20 && gPlayerEntity.z.HALF.HI < -0x18 && gPlayerState.framestate == PL_STATE_CAPE) {
|
||||
this->action += 1;
|
||||
this->unk_0e = 0x5a;
|
||||
SoundReq(SFX_10A);
|
||||
|
||||
+76
-78
@@ -6,53 +6,54 @@
|
||||
#include "area.h"
|
||||
#include "functions.h"
|
||||
|
||||
void sub_08058398(ManagerA*);
|
||||
void sub_080583EC(ManagerA*);
|
||||
void sub_08058408(ManagerA*);
|
||||
void sub_08058514(ManagerA*);
|
||||
void sub_080585B0(ManagerA*);
|
||||
static void sub_08058398(ManagerA*);
|
||||
static void sub_080583EC(ManagerA*);
|
||||
static void sub_08058408(ManagerA*);
|
||||
static void sub_08058514(ManagerA*);
|
||||
static void sub_080585B0(ManagerA*);
|
||||
|
||||
void (*const gUnk_081081F4[])(ManagerA*) = { sub_08058398, sub_080583EC, sub_08058408, sub_08058514, sub_080585B0 };
|
||||
static u32 PlayerStateValid(ManagerA*);
|
||||
static void sub_080585DC(ManagerA*);
|
||||
|
||||
extern void sub_0801855C(void);
|
||||
|
||||
/**
|
||||
* Ezlo hint manager
|
||||
*/
|
||||
void ManagerA_Main(ManagerA* this) {
|
||||
gUnk_081081F4[this->manager.action](this);
|
||||
static void (*const sActions[])(ManagerA*) = { sub_08058398, sub_080583EC, sub_08058408, sub_08058514,
|
||||
sub_080585B0 };
|
||||
|
||||
sActions[this->manager.action](this);
|
||||
}
|
||||
|
||||
void sub_08058398(ManagerA* this) {
|
||||
|
||||
if (CheckFlags(this->unk_3c) != 0) {
|
||||
static void sub_08058398(ManagerA* this) {
|
||||
if (CheckFlags(this->flag1) != 0) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
this->unk_24 = this->unk_3a << 3;
|
||||
this->unk_26 = this->unk_3b << 3;
|
||||
this->unk_20 = this->unk_24 + (this->unk_38 << 4);
|
||||
this->unk_22 = this->unk_26 + (this->unk_39 << 4);
|
||||
SetDefaultPriority((Entity*)&this->manager, 0x06);
|
||||
if (this->unk_3e == 0) {
|
||||
this->rx = this->rx_raw << 3;
|
||||
this->ry = this->ry_raw << 3;
|
||||
this->x = this->rx + (this->x_raw << 4);
|
||||
this->y = this->ry + (this->y_raw << 4);
|
||||
SetDefaultPriority((Entity*)&this->manager, PRIO_PLAYER_EVENT);
|
||||
if (this->flag2 == 0) {
|
||||
this->manager.action = 2;
|
||||
} else {
|
||||
this->manager.action = 1;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080583EC(ManagerA* this) {
|
||||
if (CheckFlags(this->unk_3e) != 0) {
|
||||
static void sub_080583EC(ManagerA* this) {
|
||||
if (CheckFlags(this->flag2)) {
|
||||
this->manager.action = 2;
|
||||
sub_08058408(this);
|
||||
}
|
||||
}
|
||||
|
||||
extern void SetPlayerEventPriority(void);
|
||||
|
||||
u32 sub_0805848C(ManagerA*);
|
||||
void sub_080585DC(ManagerA*);
|
||||
|
||||
void sub_08058408(ManagerA* this) {
|
||||
u32 tmp2;
|
||||
tmp2 = (gPlayerState.flags & 0x08);
|
||||
if (tmp2 != 0)
|
||||
static void sub_08058408(ManagerA* this) {
|
||||
if (gPlayerState.flags & PL_NO_CAP)
|
||||
return;
|
||||
if (!CheckPlayerInRegion(this->unk_20, this->unk_22, this->unk_24, this->unk_26))
|
||||
if (!CheckPlayerInRegion(this->x, this->y, this->rx, this->ry))
|
||||
return;
|
||||
switch (this->manager.unk_0a) {
|
||||
case 1:
|
||||
@@ -64,101 +65,98 @@ void sub_08058408(ManagerA* this) {
|
||||
case 0:
|
||||
default:
|
||||
sub_080585DC(this);
|
||||
if (sub_0805848C(this) == 0)
|
||||
if (!PlayerStateValid(this))
|
||||
return;
|
||||
SetPlayerControl(3);
|
||||
sub_08078B48();
|
||||
SetPlayerEventPriority();
|
||||
this->manager.action = 3;
|
||||
this->manager.unk_0d = 0;
|
||||
this->manager.unk_0e = 0x1e;
|
||||
this->manager.unk_0e = 30;
|
||||
return;
|
||||
case 3:
|
||||
this->manager.action = 4;
|
||||
this->manager.unk_0d = tmp2;
|
||||
sub_080186C0(this->unk_36);
|
||||
this->manager.unk_0d = 0;
|
||||
sub_080186C0(this->msg_idx);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
u32 sub_0805848C(ManagerA* this) {
|
||||
switch (gPlayerState.field_0xa8 - 5) {
|
||||
case 0:
|
||||
case 2:
|
||||
case 3:
|
||||
case 5:
|
||||
case 6:
|
||||
case 7:
|
||||
case 8:
|
||||
case 9:
|
||||
case 10:
|
||||
case 11:
|
||||
case 12:
|
||||
case 13:
|
||||
case 14:
|
||||
case 15:
|
||||
case 16:
|
||||
case 17:
|
||||
case 18:
|
||||
case 19:
|
||||
case 22:
|
||||
case 23:
|
||||
static u32 PlayerStateValid(ManagerA* this) {
|
||||
switch (gPlayerState.framestate) {
|
||||
case PL_STATE_THROW:
|
||||
case PL_STATE_SWIM:
|
||||
case PL_STATE_PARACHUTE:
|
||||
case PL_STATE_FALL:
|
||||
case PL_STATE_JUMP:
|
||||
case PL_STATE_C:
|
||||
case PL_STATE_D:
|
||||
case PL_STATE_USEPORTAL:
|
||||
case PL_STATE_F:
|
||||
case PL_STATE_TRAPPED:
|
||||
case PL_STATE_11:
|
||||
case PL_STATE_DIE:
|
||||
case PL_STATE_TALKEZLO:
|
||||
case PL_STATE_CAPE:
|
||||
case PL_STATE_ITEMGET:
|
||||
case PL_STATE_DROWN:
|
||||
case PL_STATE_HOLE:
|
||||
case PL_STATE_CLIMB:
|
||||
case PL_STATE_1B:
|
||||
case PL_STATE_STAIRS:
|
||||
return 0;
|
||||
case 1:
|
||||
case 4:
|
||||
case 20:
|
||||
case 21:
|
||||
case PL_STATE_6:
|
||||
case PL_STATE_ROLL:
|
||||
case PL_STATE_PUSH:
|
||||
case PL_STATE_PULL:
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
extern void ResetPlayerEventPriority(void);
|
||||
|
||||
void sub_08058514(ManagerA* this) {
|
||||
static void sub_08058514(ManagerA* this) {
|
||||
switch (this->manager.unk_0d) {
|
||||
case 1:
|
||||
if ((gPlayerState.flags & 0x1235) != 0)
|
||||
if (gPlayerState.flags & (PL_BUSY | PL_DROWNING | PL_USE_PORTAL | 0x1210))
|
||||
return;
|
||||
if (gPlayerEntity.z.HALF.HI != 0)
|
||||
return;
|
||||
gPlayerState.jumpStatus = 0;
|
||||
sub_08078AA8(this->unk_36, this->unk_35);
|
||||
CreateEzloHint(this->msg_idx, this->msg_height);
|
||||
this->manager.unk_0d++;
|
||||
this->manager.unk_0e = 0x1E;
|
||||
this->manager.unk_0e = 30;
|
||||
return;
|
||||
case 0:
|
||||
case 2:
|
||||
if (((--this->manager.unk_0e) << 0x18) == 0) {
|
||||
if (--this->manager.unk_0e == 0) {
|
||||
this->manager.unk_0d++;
|
||||
}
|
||||
return;
|
||||
case 3:
|
||||
if (gPlayerEntity.action != 1 && gPlayerEntity.action != 9)
|
||||
return;
|
||||
gPlayerState.controlMode = 1;
|
||||
ResetPlayerEventPriority();
|
||||
SetFlag(this->unk_3c);
|
||||
DeleteThisEntity();
|
||||
/* wait for player to finish talking */
|
||||
if (gPlayerEntity.action == PLAYER_NORMAL || gPlayerEntity.action == PLAYER_MINISH) {
|
||||
gPlayerState.controlMode = 1;
|
||||
ResetPlayerEventPriority();
|
||||
SetFlag(this->flag1);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
return;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
extern void sub_0801855C(void);
|
||||
|
||||
void sub_080585B0(ManagerA* this) {
|
||||
if (gArea.field_0x28 != 0xFF) {
|
||||
static void sub_080585B0(ManagerA* this) {
|
||||
if (gArea.inventoryGfxIdx != 0xFF) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
if (CheckFlags(this->unk_3c)) {
|
||||
if (CheckFlags(this->flag1)) {
|
||||
sub_0801855C();
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
void sub_080585DC(ManagerA* this) {
|
||||
if (CheckFlags(this->unk_3c)) {
|
||||
static void sub_080585DC(ManagerA* this) {
|
||||
if (CheckFlags(this->flag1)) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -414,7 +414,7 @@ void sub_080594DC(ManagerF* this) {
|
||||
break;
|
||||
case 2:
|
||||
default:
|
||||
if (gArea.field_0x28 != 0xFF) {
|
||||
if (gArea.inventoryGfxIdx != 0xFF) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
if (CheckLocalFlagByBank(0x8c0, 0x85)) {
|
||||
|
||||
@@ -29,7 +29,7 @@ void sub_08064470(Entity* this, ScriptExecutionContext* context) {
|
||||
}
|
||||
|
||||
void sub_08064488(void) {
|
||||
if (gPlayerState.field_0xa8 != 2) {
|
||||
if (gPlayerState.framestate != PL_STATE_SWORD) {
|
||||
gPlayerState.field_0xab = 0;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -170,7 +170,7 @@ NONMATCH("asm/non_matching/kid/sub_0806252C.inc", void sub_0806252C(Entity* this
|
||||
s32 iVar10;
|
||||
s32 iVar11;
|
||||
|
||||
uVar4 = gPlayerState.field_0xa8;
|
||||
uVar4 = gPlayerState.framestate;
|
||||
uVar3 = gPlayerEntity.z.HALF.HI;
|
||||
sVar2 = gPlayerEntity.y.HALF.HI;
|
||||
sVar1 = gPlayerEntity.x.HALF.HI;
|
||||
|
||||
@@ -209,9 +209,9 @@ void sub_0808B73C(Entity* this) {
|
||||
}
|
||||
|
||||
u32 sub_0808B7C8(Entity* this) {
|
||||
if (!(gPlayerState.flags & PL_MINISH) && gPlayerState.field_0xa8 != 0x12 && gPlayerEntity.health != 0 &&
|
||||
if (!(gPlayerState.flags & PL_MINISH) && gPlayerState.framestate != PL_STATE_DIE && gPlayerEntity.health != 0 &&
|
||||
sub_08079F8C() && EntityInRectRadius(this, &gPlayerEntity, 5, 5) && gPlayerEntity.z.HALF.HI == 0) {
|
||||
if (this->actionDelay == 0 && gPlayerEntity.action == 0x1b) {
|
||||
if (this->actionDelay == 0 && gPlayerEntity.action == PLAYER_08072C9C) {
|
||||
sub_080791D0();
|
||||
}
|
||||
return 1;
|
||||
|
||||
+4
-4
@@ -554,7 +554,7 @@ void RoomExitCallback(void) {
|
||||
}
|
||||
|
||||
u32 HandleRoomExit(void) {
|
||||
if (gScreenTransition.transitioningOut && gSave.stats.health != 0 && gPlayerState.field_0xa8 != 18) {
|
||||
if (gScreenTransition.transitioningOut && gSave.stats.health != 0 && gPlayerState.framestate != PL_STATE_DIE) {
|
||||
if (StairsAreValid()) {
|
||||
gScreenTransition.transitioningOut = 0;
|
||||
return 0;
|
||||
@@ -660,13 +660,13 @@ static void HandleRoomEnter(void) {
|
||||
}
|
||||
|
||||
u32 sub_08052B24(void) {
|
||||
s32 tmp = 1;
|
||||
s32 tmp = PL_STATE_WALK;
|
||||
|
||||
if (!(gInput.heldKeys & SELECT_BUTTON) || gPlayerState.controlMode != CONTROL_ENABLED || gUnk_02034490[0] ||
|
||||
gUnk_0200AF00.filler0[1])
|
||||
return 0;
|
||||
|
||||
if ((gPlayerState.flags & 0x118) || (gPlayerState.field_0xa9 > tmp) || gPlayerState.field_0x2c ||
|
||||
if ((gPlayerState.flags & 0x118) || (gPlayerState.framestate_last > tmp) || gPlayerState.field_0x2c ||
|
||||
gPlayerEntity.field_0x7a.HWORD)
|
||||
return 0;
|
||||
|
||||
@@ -693,7 +693,7 @@ void DisplayEzloMessage(void) {
|
||||
} else {
|
||||
height = gScreenTransition.player_status.field_0x24[idx];
|
||||
}
|
||||
MessageAtHeight(gScreenTransition.field_0x36, height);
|
||||
MessageAtHeight(gScreenTransition.hint_idx, height);
|
||||
}
|
||||
|
||||
#if defined(USA) || defined(DEMO_USA) || defined(DEMO_JP)
|
||||
|
||||
+21
-20
@@ -6,6 +6,7 @@
|
||||
#include "textbox.h"
|
||||
#include "utils.h"
|
||||
#include "area.h"
|
||||
#include "item.h"
|
||||
#include "save.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
@@ -271,7 +272,7 @@ static void PlayerInit(Entity* this) {
|
||||
sub_08016A30(this);
|
||||
}
|
||||
|
||||
if (IsItemEquipped(0x10) != 2) {
|
||||
if (IsItemEquipped(ITEM_LANTERN_ON) != 2) {
|
||||
sub_08077728();
|
||||
}
|
||||
sub_0807A108();
|
||||
@@ -284,7 +285,7 @@ static void PlayerInit(Entity* this) {
|
||||
Entity* ent;
|
||||
gPlayerState.swimState = 1;
|
||||
sub_08079938();
|
||||
gPlayerState.field_0xa8 = 7;
|
||||
gPlayerState.framestate = PL_STATE_SWIM;
|
||||
sub_0807ACCC(this);
|
||||
ent = FindEntity(0x6, 0xf, 0x6, 0xb, 0x0);
|
||||
if (ent != NULL) {
|
||||
@@ -315,7 +316,7 @@ static void PlayerFall(Entity* this) {
|
||||
|
||||
gPlayerState.field_0xd = 0xFF;
|
||||
gPlayerState.pushedObject = 0x80;
|
||||
gPlayerState.field_0xa8 = 10;
|
||||
gPlayerState.framestate = PL_STATE_FALL;
|
||||
|
||||
sPlayerFallStates[this->subAction](this);
|
||||
}
|
||||
@@ -454,7 +455,7 @@ static void sub_08070E9C(Entity* this) {
|
||||
MessageClose();
|
||||
} else {
|
||||
gPlayerState.field_0x27[0] = 4;
|
||||
gPlayerState.field_0xa8 = 0x13;
|
||||
gPlayerState.framestate = PL_STATE_TALKEZLO;
|
||||
sub_0807A1B8();
|
||||
gUnk_0811BA74[this->subAction](this);
|
||||
}
|
||||
@@ -490,7 +491,7 @@ static void PlayerItemGet(Entity* this) {
|
||||
Entity* child;
|
||||
u8* temp;
|
||||
|
||||
gPlayerState.field_0xa8 = 0x15;
|
||||
gPlayerState.framestate = PL_STATE_ITEMGET;
|
||||
COLLISION_OFF(this);
|
||||
sPlayerItemGetStates[this->subAction](this);
|
||||
|
||||
@@ -561,7 +562,7 @@ static void PlayerJump(Entity* this) {
|
||||
sub_08071208,
|
||||
};
|
||||
|
||||
gPlayerState.field_0xa8 = 0xb;
|
||||
gPlayerState.framestate = PL_STATE_JUMP;
|
||||
sPlayerJumpStates[this->subAction](this);
|
||||
}
|
||||
|
||||
@@ -675,7 +676,7 @@ static void PlayerDrown(Entity* this) {
|
||||
sub_080712F0,
|
||||
};
|
||||
|
||||
gPlayerState.field_0xa8 = 0x16;
|
||||
gPlayerState.framestate = PL_STATE_DROWN;
|
||||
gPlayerState.flags |= PL_DROWNING;
|
||||
COLLISION_OFF(this);
|
||||
sPlayerDrownStates[this->subAction](this);
|
||||
@@ -737,7 +738,7 @@ static void PlayerUsePortal(Entity* this) {
|
||||
PortalShrinkInit, PortalShrinkUpdate, PortalEnterUpdate, PortalUnknownUpdate,
|
||||
};
|
||||
|
||||
gPlayerState.field_0xa8 = 0xe;
|
||||
gPlayerState.framestate = PL_STATE_USEPORTAL;
|
||||
sPlayerUsePortalStates[this->subAction](this);
|
||||
|
||||
// probably a switch
|
||||
@@ -813,7 +814,7 @@ static void PortalStandUpdate(Entity* this) {
|
||||
this->animationState = Direction8ToAnimationState(this->direction);
|
||||
this->zVelocity = 0x20000;
|
||||
this->speed = 256;
|
||||
this->action = 9;
|
||||
this->action = PLAYER_MINISH;
|
||||
this->subAction = 7;
|
||||
this->field_0xf = 0;
|
||||
gPlayerState.animation = (gPlayerState.flags & PL_NO_CAP) ? 0x41C : 0x80C;
|
||||
@@ -866,7 +867,7 @@ static void PortalShrinkInit(Entity* this) {
|
||||
*(u32*)&this->cutsceneBeh = 0x100;
|
||||
sub_0805EC9C(this, 0x100, 0x100, 0);
|
||||
gPlayerState.animation = 0x2c3;
|
||||
gPlayerState.flags |= 0x80;
|
||||
gPlayerState.flags |= PL_MINISH;
|
||||
SoundReq(SFX_PLY_SHRINKING);
|
||||
}
|
||||
|
||||
@@ -943,7 +944,7 @@ static void PlayerTalkEzlo(Entity* this) {
|
||||
MessageClose();
|
||||
ResetPlayerPriority();
|
||||
} else {
|
||||
gPlayerState.field_0xa8 = 0x13;
|
||||
gPlayerState.framestate = PL_STATE_TALKEZLO;
|
||||
COLLISION_OFF(this);
|
||||
sPlayerTalkEzloStates[this->subAction](this);
|
||||
}
|
||||
@@ -1057,7 +1058,7 @@ static void PlayerPush(Entity* this) {
|
||||
sub_08071B60,
|
||||
};
|
||||
|
||||
gPlayerState.field_0xa8 = 0x19;
|
||||
gPlayerState.framestate = PL_STATE_PUSH;
|
||||
sPlayerPushStates[this->subAction](this);
|
||||
}
|
||||
|
||||
@@ -1132,7 +1133,7 @@ static void PlayerMinishDie(Entity* this) {
|
||||
|
||||
COLLISION_OFF(this);
|
||||
sPlayerMinishDieStates[this->subAction](this);
|
||||
gPlayerState.field_0xa8 = 0x12;
|
||||
gPlayerState.framestate = PL_STATE_DIE;
|
||||
}
|
||||
|
||||
static void sub_08071BDC(Entity* this) {
|
||||
@@ -1477,7 +1478,7 @@ static void PlayerPull(Entity* this) {
|
||||
sub_08072260,
|
||||
};
|
||||
|
||||
gPlayerState.field_0xa8 = 0x1a;
|
||||
gPlayerState.framestate = PL_STATE_PULL;
|
||||
sPlayerPullStates[this->subAction](this);
|
||||
gUnk_0200AF00.filler25[9] = 8;
|
||||
}
|
||||
@@ -1520,7 +1521,7 @@ static void PlayerLava(Entity* this) {
|
||||
sub_0807240C,
|
||||
};
|
||||
|
||||
gPlayerState.field_0xa8 = 10;
|
||||
gPlayerState.framestate = PL_STATE_FALL;
|
||||
sPlayerLavaStates[this->subAction](this);
|
||||
}
|
||||
|
||||
@@ -1677,7 +1678,7 @@ static void PlayerRoll(Entity* this) {
|
||||
sub_080726F4,
|
||||
};
|
||||
|
||||
gPlayerState.field_0xa8 = 9;
|
||||
gPlayerState.framestate = PL_STATE_ROLL;
|
||||
sPlayerRollStates[this->subAction](this);
|
||||
}
|
||||
|
||||
@@ -1815,7 +1816,7 @@ static void PlayerInHole(Entity* this) {
|
||||
sub_08072970, sub_08072A60, sub_08072ACC, sub_08072B5C, sub_08072C48,
|
||||
};
|
||||
|
||||
gPlayerState.field_0xa8 = 0x17;
|
||||
gPlayerState.framestate = PL_STATE_HOLE;
|
||||
sPlayerInHoleStates[this->subAction](this);
|
||||
}
|
||||
|
||||
@@ -1948,7 +1949,7 @@ static void sub_08072C9C(Entity* this) {
|
||||
sub_08072D54,
|
||||
sub_08072F14,
|
||||
};
|
||||
gPlayerState.field_0xa8 = 0x11;
|
||||
gPlayerState.framestate = 0x11;
|
||||
gUnk_0811BBAC[this->subAction](this);
|
||||
}
|
||||
|
||||
@@ -2095,7 +2096,7 @@ static void sub_08072F34(Entity* this) {
|
||||
};
|
||||
|
||||
if (!sub_08078EFC()) {
|
||||
gPlayerState.field_0xa8 = 0x18;
|
||||
gPlayerState.framestate = PL_STATE_CLIMB;
|
||||
gPlayerState.field_0x10[2] = GetSurfaceCalcType(this, 0, 0);
|
||||
gUnk_0811BBE4[this->subAction](this);
|
||||
if (this->knockbackDuration != 0) {
|
||||
@@ -2221,7 +2222,7 @@ static void PlayerUseEntrance(Entity* this) {
|
||||
sub_080733BC,
|
||||
};
|
||||
|
||||
gPlayerState.field_0xa8 = 0x1c;
|
||||
gPlayerState.framestate = PL_STATE_STAIRS;
|
||||
RequestPriorityDuration(NULL, 8);
|
||||
sPlayerUseEntranceStates[this->subAction](this);
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ u32 sub_080A7CFC(u32 a1) {
|
||||
|
||||
void sub_080A7D44(u32 msg, u32 isTileEntity6) {
|
||||
if (isTileEntity6)
|
||||
sub_08078AA8(msg, 0);
|
||||
CreateEzloHint(msg, 0);
|
||||
else
|
||||
// Read sign text
|
||||
MessageFromTarget(msg);
|
||||
|
||||
@@ -143,7 +143,7 @@ void SpiderWeb_SubAction0(Entity* this) {
|
||||
this->field_0xf = 2;
|
||||
InitAnimationForceUpdate(this, this->type + 4);
|
||||
}
|
||||
if ((entity->animationState >> 1 == this->type) && (gPlayerState.field_0xa8 == 0x1a) &&
|
||||
if ((entity->animationState >> 1 == this->type) && (gPlayerState.framestate == PL_STATE_PULL) &&
|
||||
((gPlayerState.heldObject & 2) != 0) && ((gPlayerEntity.frame & 2) != 0) && ((this->frame & 0x80) == 0)) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if ((this->frame & 1) != 0) {
|
||||
|
||||
+4
-4
@@ -1228,7 +1228,7 @@ void ScriptCommand_MessageNoOverlapVar(Entity* entity, ScriptExecutionContext* c
|
||||
}
|
||||
|
||||
void ScriptCommand_0807EB28(Entity* entity, ScriptExecutionContext* context) {
|
||||
sub_08078AA8(context->scriptInstructionPointer[1], 0);
|
||||
CreateEzloHint(context->scriptInstructionPointer[1], 0);
|
||||
}
|
||||
|
||||
void ScriptCommand_0807EB38(Entity* entity, ScriptExecutionContext* context) {
|
||||
@@ -1789,7 +1789,7 @@ void sub_0807F584(Entity* entity, ScriptExecutionContext* context) {
|
||||
}
|
||||
|
||||
void sub_0807F594(Entity* entity, ScriptExecutionContext* context) {
|
||||
if (gPlayerState.field_0xa8)
|
||||
if (gPlayerState.framestate)
|
||||
gActiveScriptInfo.commandSize = 0;
|
||||
}
|
||||
|
||||
@@ -2011,7 +2011,7 @@ void sub_0807F994(Entity* entity, ScriptExecutionContext* context) {
|
||||
}
|
||||
|
||||
void sub_0807F9A4(Entity* entity, ScriptExecutionContext* context) {
|
||||
switch (gPlayerState.field_0xa8) {
|
||||
switch (gPlayerState.framestate) {
|
||||
case 5:
|
||||
case 7:
|
||||
case 8:
|
||||
@@ -2041,7 +2041,7 @@ void sub_0807F9A4(Entity* entity, ScriptExecutionContext* context) {
|
||||
}
|
||||
|
||||
void sub_0807FA40(Entity* entity, ScriptExecutionContext* context) {
|
||||
switch (gPlayerState.field_0xa8) {
|
||||
switch (gPlayerState.framestate) {
|
||||
case 5:
|
||||
case 7:
|
||||
case 8:
|
||||
|
||||
Reference in New Issue
Block a user