Merge pull request #553 from hatal175/document

This commit is contained in:
notyourav
2022-08-07 16:01:46 -07:00
committed by GitHub
105 changed files with 461 additions and 430 deletions
-26
View File
@@ -4,32 +4,6 @@
.section .rodata
.align 2
gNPCHitboxes:: @ 08114EE4
.4byte 00000000
.4byte gHitbox_2
.4byte gHitbox_30
.4byte gHitbox_2
.4byte gHitbox_3
.4byte gHitbox_31
gUnk_08114EFC:: @ 08114EFC
.4byte sub_0806EF88
.4byte sub_0806EE70
.4byte sub_0806EED0
.4byte sub_0806EEF4
gUnk_08114F0C:: @ 08114F0C
.4byte sub_0806EFAC
.4byte sub_0806EFBC
.4byte sub_0806EFCC
.4byte sub_0806EFDC
.4byte sub_0806F014
.4byte sub_0806F02C
.4byte sub_0806F048
.4byte sub_0806F050
.4byte sub_0806F064
gUnk_08114F30:: @ 08114F30
.incbin "data_081146D0/gUnk_08114F30.bin"
+1
View File
@@ -9,6 +9,7 @@
.include "player.inc"
.include "sound.inc"
.include "kinstone.inc"
.include "script.inc"
.syntax unified
.text
+1 -1
View File
@@ -46,7 +46,7 @@ script_080101AC:
WaitForFadeFinish
CallWithArg SetPlayerPos, 0x03400378
Call SetPlayerActionNormal
Call sub_0807FB74
Call DisablePlayerSwimState
_0807E8E4_1
Call SetPlayerCollisionLayer1
Call CuccoMinigame_Cleanup
+3 -3
View File
@@ -38,11 +38,11 @@ script_08010564:
Jump script_08010570
script_08010570:
Call sub_080634EC
CallWithArg sub_0807F78C, 0x00000000
CallWithArg ScriptCommand_SaleItemConfirmMessage, 0x00000000
WaitUntilTextboxCloses
CheckTextboxResult
JumpIfNot script_080105E0
CallWithArg sub_0807F7C4, 0x00000000
CallWithArg ScriptCommand_CheckShopItemPrice, 0x00000000
JumpIfNot script_080105C4
CheckBottleContaining ITEM_BOTTLE_EMPTY
JumpIfNot script_080105CC
@@ -50,7 +50,7 @@ script_08010570:
JumpIf script_080105D4
MessageNoOverlap TEXT_PICOLYTE, 0x07
WaitUntilTextboxCloses
CallWithArg sub_0807F800, 0x00000000
CallWithArg ScriptCommand_BuyShopItem, 0x00000000
WaitPlayerGetItem
WaitUntilTextboxCloses
MessageNoOverlap TEXT_PICOLYTE, 0x0c
+4 -4
View File
@@ -12,9 +12,9 @@ script_0800E832:
SetAnimationState 0x0004
BeginBlock
MessageFromTarget TEXT_HAPPY_HEARTH, 0x01
CallWithArg sub_0807F854, 0x00010032
CallWithArg sub_0807F854, 0x000200c8
CallWithArg sub_0807F854, 0x00030190
CallWithArg ScriptCommand_SetMessageValue, (SMV_RUPEES << 16) | 50
CallWithArg ScriptCommand_SetMessageValue, (SMV_FIELD_0X14 << 16) | 200
CallWithArg ScriptCommand_SetMessageValue, (SMV_FIELD_0X18 << 16) | 400
EndBlock
WaitUntilTextboxCloses
_0807EB38
@@ -22,7 +22,7 @@ script_0800E832:
script_0800E872: @ Rent large room
BeginBlock
MessageFromTarget TEXT_HAPPY_HEARTH, 0x05
CallWithArg sub_0807F854, 0x00010190
CallWithArg ScriptCommand_SetMessageValue, (SMV_RUPEES << 16) | 400
EndBlock
WaitUntilTextboxCloses
HasRupees 400
@@ -77,7 +77,7 @@ script_080108AA:
MessageNoOverlap TEXT_STOCKWELL, 0x20
script_080108B2:
WaitUntilTextboxCloses
Call sub_0807F83C
Call ScriptCommand_PlayerDropHeldObject
script_080108BA:
WaitUntilTextboxCloses
Call EnablePauseMenu
@@ -16,7 +16,7 @@ script_08014F4A:
DoPostScriptAction 0x0000
BeginBlock
MessageNoOverlap TEXT_MILK, 0x0b
CallWithArg sub_0807F854, 0x00010064
CallWithArg ScriptCommand_SetMessageValue, (SMV_RUPEES << 16) | 100
EndBlock
WaitUntilTextboxCloses
CheckTextboxResult
+1 -1
View File
@@ -19,7 +19,7 @@ script_080106BE:
Jump script_08010726
script_080106E0:
Call RemoveAllBakedGoods
CallWithArg sub_0807F78C, 0x00000000
CallWithArg ScriptCommand_SaleItemConfirmMessage, 0x00000000
WaitUntilTextboxCloses
CheckTextboxResult
JumpIfNot script_08010726
@@ -43,7 +43,7 @@ script_08013006:
WaitPlayerGetItem
Wait 0x001e
_0807E8E4_0
Call sub_0806AB9C
Call DeleteNpcRem
SetAnimation 0x000b
Wait 0x003c
DoPostScriptAction 0x0004
@@ -2,7 +2,7 @@
SCRIPT_START script_RentRegularRoom
BeginBlock
MessageFromTarget TEXT_HAPPY_HEARTH, 0x04
CallWithArg sub_0807F854, 0x000100c8
CallWithArg ScriptCommand_SetMessageValue, (SMV_RUPEES << 16) | 200
EndBlock
WaitUntilTextboxCloses
HasRupees 200
@@ -2,7 +2,7 @@
SCRIPT_START script_RentSmallRoom
BeginBlock
MessageFromTarget TEXT_HAPPY_HEARTH, 0x03
CallWithArg sub_0807F854, 0x00010032
CallWithArg ScriptCommand_SetMessageValue, (SMV_RUPEES << 16) | 50
EndBlock
WaitUntilTextboxCloses
HasRupees 50
@@ -12,15 +12,15 @@ script_08014E64:
SetPlayerIdle
Call DisablePauseMenuAndPutAwayItems
FacePlayer
CallWithArg sub_0807F78C, 0x00000022
CallWithArg ScriptCommand_SaleItemConfirmMessage, 0x00000022
WaitUntilTextboxCloses
CheckTextboxResult
JumpIfNot script_08014EBC
CallWithArg sub_0807F7C4, 0x00000022
CallWithArg ScriptCommand_CheckShopItemPrice, 0x00000022
JumpIfNot script_08014EB0
CheckBottleContaining ITEM_BOTTLE_EMPTY
JumpIfNot script_08014EB8
CallWithArg sub_0807F800, 0x00000022
CallWithArg ScriptCommand_BuyShopItem, 0x00000022
WaitPlayerGetItem
MessageNoOverlap TEXT_EMPTY, 0x04
Jump script_08014EBC
+1 -1
View File
@@ -7,6 +7,6 @@ SCRIPT_START script_08012B24
DoPostScriptAction 0x0001
WalkSouth 0x0008
SetSyncFlag 0x00000002
CallWithArg sub_0807FB64, 0xffffffe2
CallWithArg SetPlayerIFrames, 0xffffffe2
Call SetPlayerActionNormal
SCRIPT_END
+1 -1
View File
@@ -7,6 +7,6 @@ SCRIPT_START script_08012B50
DoPostScriptAction 0x0001
WalkNorth 0x0008
SetSyncFlag 0x00000002
CallWithArg sub_0807FB64, 0xffffffe2
CallWithArg SetPlayerIFrames, 0xffffffe2
Call SetPlayerActionNormal
SCRIPT_END
+1 -1
View File
@@ -7,6 +7,6 @@ SCRIPT_START script_08012B7C
DoPostScriptAction 0x0001
WalkEast 0x0008
SetSyncFlag 0x00000002
CallWithArg sub_0807FB64, 0xffffffe2
CallWithArg SetPlayerIFrames, 0xffffffe2
Call SetPlayerActionNormal
SCRIPT_END
+1
View File
@@ -34,6 +34,7 @@ extern const Hitbox gHitbox_27;
extern const Hitbox gHitbox_28;
extern const Hitbox gHitbox_29;
extern const Hitbox gHitbox_30;
extern const Hitbox gHitbox_31;
extern const Hitbox gHitbox_32;
extern const Hitbox gUnk_080FD190;
extern const Hitbox gUnk_080FD1A8;
+16 -5
View File
@@ -67,8 +67,9 @@ enum PlayerFrameState {
PL_STATE_CLIMB,
PL_STATE_PUSH,
PL_STATE_PULL,
PL_STATE_1B,
PL_STATE_SINKING,
PL_STATE_STAIRS,
PL_STATE_1D,
};
enum PlayerSpawnType {
@@ -275,7 +276,7 @@ typedef struct {
/*0x0e*/ u8 field_0xe;
/*0x0f*/ u8 hurtBlinkSpeed;
/*0x10*/ u8 field_0x10;
/*0x11*/ u8 field_0x11;
/*0x11*/ u8 surfacePositionSameTimer;
/*0x12*/ u8 floor_type;
/*0x13*/ u8 floor_type_last;
/*0x14*/ u8 field_0x14;
@@ -297,7 +298,7 @@ typedef struct {
/*0x34*/ u8 field_0x34;
/*0x35*/ u8 field_0x35;
/*0x36*/ u8 field_0x36;
/*0x37*/ u8 field_0x37;
/*0x37*/ u8 surfaceTimer;
/*0x38*/ u8 field_0x38;
/*0x39*/ u8 field_0x39;
/*0x3a*/ u8 field_0x3a;
@@ -361,10 +362,20 @@ typedef struct {
/*0x1*/ u8 behaviorID;
/*0x2*/ u8 field_0x2[2];
/*0x4*/ u8 stateID;
/*0x5*/ u8 field_0x5[10];
/*0x5*/ u8 field_0x5;
/*0x6*/ u8 field_0x6;
/*0x7*/ u8 timer;
/*0x8*/ u8 subtimer;
/*0x9*/ u8 field_0x9;
/*0xa*/ u8 playerAnimationState;
/*0xb*/ u8 direction;
/*0xc*/ u8 playerAnimIndex;
/*0xd*/ u8 playerFrameDuration;
/*0xe*/ u8 playerFrame;
/*0xf*/ u8 field_0xf;
/*0x10*/ u16 field_0x10;
/*0x12*/ u8 field_0x12[6];
/*0xf*/ u8 playerFrameIndex;
/*0x12*/ u8 field_0x12[5];
/*0x18*/ Entity* field_0x18;
} ItemBehavior;
+1 -1
View File
@@ -183,7 +183,7 @@ typedef struct {
u8 area;
u8 room;
u8 playerLayer;
u8 field_0xe;
u8 spawn_type;
u8 playerState;
u16 transitionSFX;
} ScreenTransitionData;
+8
View File
@@ -3,6 +3,14 @@
#include "entity.h"
enum SetMessageValueIndex {
SMV_DEFAULT,
SMV_RUPEES,
SMV_FIELD_0X14,
SMV_FIELD_0X18,
SMV_FIELD_0X1C,
};
typedef struct ScriptExecutionContext {
/*0x00*/ u16* scriptInstructionPointer;
/*0x04*/ u32 intVariable;
+1
View File
@@ -1268,6 +1268,7 @@ SECTIONS {
src/npc/phonograph.o(.rodata);
src/npc/npc58.o(.rodata);
src/npcDefinitions.o(.rodata);
src/npcUtils.o(.rodata);
data/data_081146D0.o(.rodata);
src/physics.o(.rodata);
src/playerHitbox.o(.rodata);
+1 -1
View File
@@ -383,7 +383,7 @@ bool32 sub_0801AA58(Entity* this, u32 param_2, u32 param_3) {
object->y.HALF.HI = (((param_2 & 0xfc0) >> 2) + 8) + gRoomControls.origin_y;
object->collisionLayer = this->collisionLayer;
gPlayerState.pushedObject = 0xa0;
gPlayerState.queued_action = 5;
gPlayerState.queued_action = PLAYER_PUSH;
gPlayerState.flags |= 1;
this->x.HALF.LO = 0;
this->y.HALF.LO = 0;
+1 -1
View File
@@ -403,7 +403,7 @@ s32 sub_08017BBC(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
s32 sub_08017C40(Entity* org, Entity* tgt, u32 direction, ColSettings* settings) {
if ((gPlayerState.flags & (PL_BUSY | PL_MINISH | PL_FROZEN | PL_IN_MINECART)) == 0 &&
gPlayerState.queued_action == 0) {
gPlayerState.queued_action == PLAYER_INIT) {
if (org->action == 1 || org->action == 24) {
tgt->damage = 4;
org->health = sub_08017874(org, tgt);
+3 -3
View File
@@ -539,7 +539,7 @@ void sub_08026110(ChuchuBossEntity* this) {
void sub_0802626C(ChuchuBossEntity* this) {
gPauseMenuOptions.disabled = 1;
gUnk_080CC20C[this->unk_84->unk_03](this);
if (gPlayerEntity.action != 23 && gPlayerEntity.action != 15) {
if (gPlayerEntity.action != PLAYER_ROOMTRANSITION && gPlayerEntity.action != PLAYER_ROOM_EXIT) {
sub_08078B48();
}
}
@@ -565,7 +565,7 @@ void sub_080262A8(ChuchuBossEntity* this) {
}
void sub_08026328(ChuchuBossEntity* this) {
if (gPlayerEntity.action != 23) {
if (gPlayerEntity.action != PLAYER_ROOMTRANSITION) {
this->unk_7d = 0x78;
this->unk_84->unk_03++;
sub_08078AC0(10, 0, 0);
@@ -575,7 +575,7 @@ void sub_08026328(ChuchuBossEntity* this) {
void sub_08026358(ChuchuBossEntity* this) {
u32 bVar1;
if (gPlayerEntity.action != 15) {
if (gPlayerEntity.action != PLAYER_ROOM_EXIT) {
bVar1 = --this->unk_7d;
if (bVar1 == 0) {
this->unk_7c = 0;
+1 -1
View File
@@ -274,7 +274,7 @@ void sub_08039140(CuccoAggrEntity* this) {
super->action = 6;
super->timer = Random();
super->direction = GetFacingDirection(super, &gPlayerEntity);
super->z.HALF.HI = 0xfffc;
super->z.HALF.HI = -4;
this->unk_78 = 0xb4;
sub_080390F8(this);
InitializeAnimation(super, 4);
+1 -1
View File
@@ -146,7 +146,7 @@ void sub_080441E0(DustEntity* this) {
super->frameIndex = 1;
super->spritePriority.b0 = 7;
this->unk_75 = 0;
this->unk_76 = 0xffff;
this->unk_76 = -1;
} else {
super->frameIndex = 0;
super->speed = 0;
+2 -2
View File
@@ -98,7 +98,7 @@ void sub_08040B9C(Enemy50Entity* this) {
if (super->confusedTime != 0) {
super->animationState = super->knockbackDirection >> 4;
InitializeAnimation(super, super->animationState + 7);
Create0x68FX(super, 0x1c);
Create0x68FX(super, FX_STARS);
}
if (super->health != this->unk_7a) {
if (super->type == 0) {
@@ -143,7 +143,7 @@ void sub_08040D30(Enemy50Entity* this) {
}
GenericConfused(super);
if (super->z.HALF.HI == 0) {
super->z.HALF.HI = 0xffff;
super->z.HALF.HI = -1;
}
if (super->confusedTime == 0) {
InitializeAnimation(super, (super->animationState ^ 1) + 1);
+1 -1
View File
@@ -82,7 +82,7 @@ void sub_08039CE0(FlyingSkullEntity* this) {
if (super->timer == 0) {
sub_0803A100(this);
super->timer = 1;
super->z.HALF.HI = 0xffff;
super->z.HALF.HI = -1;
super->spriteOffsetX = 0;
SetTile(this->unk_0x74, COORD_TO_TILE(super), super->collisionLayer);
}
+15 -15
View File
@@ -28,9 +28,9 @@ extern void (*const Ghini_Actions[])(GhiniEntity*);
extern void (*const Ghini_SubActions[])(GhiniEntity*);
extern const u8 gUnk_080D0970[];
extern const u8 gUnk_080D0974[];
extern const u8 gUnk_080D0978[];
extern const s8 gUnk_080D0978[];
extern const u8 gUnk_080D0980[];
extern const u8 gUnk_080D0984[];
extern const s8 gUnk_080D0984[];
void sub_0803F694(GhiniEntity*);
void sub_0803F630(GhiniEntity*);
@@ -102,7 +102,7 @@ void Ghini_OnConfused(GhiniEntity* this) {
}
GenericConfused(super);
if (super->z.HALF.HI == 0) {
super->z.HALF.HI = 0xffff;
super->z.HALF.HI = -1;
}
if (super->confusedTime == 0) {
InitializeAnimation(super, (super->animationState ^ 1) + 1);
@@ -361,11 +361,11 @@ void sub_0803F66C(GhiniEntity* this) {
}
void sub_0803F694(GhiniEntity* this) {
super->z.HALF.HI = gUnk_080D0984[(((u32)this->unk_7b++ << 0x18) >> 0x1b) & 3] << 0x18 >> 0x18;
super->z.HALF.HI = gUnk_080D0984[(this->unk_7b++ >> 3) & 3];
}
void sub_0803F6C0(GhiniEntity* this) {
super->frame &= 0xfe;
super->frame &= ~1;
gPlayerEntity.iframes = 0xc;
ModHealth(-4);
SoundReqClipped(&gPlayerEntity, SFX_PLY_VO6);
@@ -373,9 +373,9 @@ void sub_0803F6C0(GhiniEntity* this) {
void sub_0803F6EC(GhiniEntity* this) {
if (gPlayerEntity.health != 0) {
gPlayerEntity.flags |= 0x80;
gPlayerEntity.zVelocity = 0x18000;
gPlayerEntity.z.HALF.HI = 0xfffe;
gPlayerEntity.flags |= ENT_COLLIDE;
gPlayerEntity.zVelocity = Q_16_16(1.5);
gPlayerEntity.z.HALF.HI = -2;
gPlayerEntity.direction = gPlayerEntity.animationState << 2;
gPlayerEntity.iframes = -0x3c;
gPlayerState.jump_status = 0x41;
@@ -416,8 +416,8 @@ const u8 gUnk_080D0974[] = {
160,
128,
};
const u8 gUnk_080D0978[] = {
0, 254, 0, 2, 0, 252, 0, 4,
const s8 gUnk_080D0978[] = {
0, -2, 0, 2, 0, -4, 0, 4,
};
const u8 gUnk_080D0980[] = {
15,
@@ -425,9 +425,9 @@ const u8 gUnk_080D0980[] = {
34,
45,
};
const u8 gUnk_080D0984[] = {
255,
254,
253,
254,
const s8 gUnk_080D0984[] = {
-1,
-2,
-3,
-2,
};
+2 -2
View File
@@ -949,9 +949,9 @@ void sub_08047BF0(GyorgMaleEntity* this) {
tmp = CreateFx(super, FX_GIANT_EXPLOSION4, 0);
if (tmp) {
u32 rand = Random();
tmp->x.HALF.HI += (rand & 0x1E) + 0xFFF1;
tmp->x.HALF.HI += (rand & 0x1E) - 15;
rand >>= 8;
tmp->y.HALF.HI += (rand & 0x1E) + 0xFFF1;
tmp->y.HALF.HI += (rand & 0x1E) - 15;
tmp->spritePriority.b0 = 3;
tmp->collisionLayer = 1;
UpdateSpriteForCollisionLayer(tmp);
+1 -1
View File
@@ -84,7 +84,7 @@ static void sub_08037D54(Entity* this) {
ptr = gUnk_080CF490 + (this->direction >> 2);
proj->x.HALF.HI += *ptr;
proj->y.HALF.HI += *(ptr + 1);
proj->z.HALF.HI = 0xfffd;
proj->z.HALF.HI = -3;
EnqueueSFX(SFX_124);
}
}
+1 -1
View File
@@ -355,7 +355,7 @@ void sub_080244E8(Entity* this) {
case 1:
if (++this->z.HALF.HI >= -0x10) {
this->field_0x82.HALF.LO = 0;
this->field_0x78.HWORD = 0xfff0;
this->field_0x78.HWORD = -16;
if (sub_08024AD8(this)) {
this->field_0x80.HALF.LO++;
} else {
+1 -1
View File
@@ -109,7 +109,7 @@ NONMATCH("asm/non_matching/stalfos/sub_0803933C.inc", void sub_0803933C(StalfosE
super->flags2 &= 0xfb;
}
if (super->confusedTime != 0) {
Create0x68FX(super, 0x1c);
Create0x68FX(super, FX_STARS);
}
EnemyFunctionHandlerAfterCollision(super, Stalfos_Functions);
}
+4 -3
View File
@@ -1002,8 +1002,9 @@ void VaatiWrathType0PreAction(Entity* this) {
gSave.timers[3]--;
} else {
temp = gPlayerState.framestate_last;
if (temp < 2) {
if (temp >= 0) {
switch (temp) {
case PL_STATE_IDLE:
case PL_STATE_WALK:
if (gPlayerState.item == NULL) {
if (gPlayerEntity.field_0x7a.HWORD == 0) {
if ((gPlayerEntity.z.HALF.HI & 0x8000U) == 0 || (gPlayerState.field_0xa != 0)) {
@@ -1012,7 +1013,7 @@ void VaatiWrathType0PreAction(Entity* this) {
}
}
}
}
break;
}
}
}
+1 -1
View File
@@ -185,7 +185,7 @@ void sub_0804AD6C(RoomControls* controls) {
gRoomTransition.player_status.start_pos_y =
(area->portal_y + gUnk_080D4140[area->portal_exit_dir * 2 + 1]) - controls->origin_y;
gRoomTransition.player_status.start_anim = area->portal_exit_dir << 1;
gRoomTransition.player_status.spawn_type = 1;
gRoomTransition.player_status.spawn_type = PL_SPAWN_MINISH;
gRoomTransition.player_status.area_next = controls->area;
gRoomTransition.player_status.room_next = controls->room;
gRoomTransition.player_status.layer = 0;
+4 -4
View File
@@ -1294,19 +1294,19 @@ bool32 CanDispEzloMessage(void) {
if (!(gInput.heldKeys & SELECT_BUTTON) || gPlayerState.controlMode != CONTROL_ENABLED ||
gPauseMenuOptions.disabled || gUnk_0200AF00.unk_1)
return 0;
return FALSE;
if ((gPlayerState.flags & (PL_NO_CAP | PL_CAPTURED | PL_DISABLE_ITEMS)) || (gPlayerState.framestate_last > tmp) ||
gPlayerState.item || gPlayerEntity.field_0x7a.HWORD)
return 0;
return FALSE;
if ((gPlayerEntity.z.HALF.HI & 0x8000) && !gPlayerState.field_0xa)
return 0;
return FALSE;
GenerateAreaHint();
ForceSetPlayerState(PL_STATE_TALKEZLO);
SetPlayerEventPriority();
return 1;
return TRUE;
}
void DisplayEzloMessage(void) {
+5 -5
View File
@@ -64,7 +64,7 @@ void sub_08076088(ItemBehavior* this, Entity* param_2, u32 param_3) {
sub_08077DF4(this, 0x338);
}
gPlayerState.heldObject = 3;
gPlayerState.framestate = 4;
gPlayerState.framestate = PL_STATE_HOLD;
this->stateID = 2;
this->field_0xf = 0xf;
if ((gPlayerEntity.field_0x78.HALF.HI & 0x80)) {
@@ -92,12 +92,12 @@ void sub_08076088(ItemBehavior* this, Entity* param_2, u32 param_3) {
param_2->parent = (Entity*)this;
this->field_0x18 = param_2;
param_2->type2 = this->field_0x2[1];
param_2->timer = this->field_0x5[2];
param_2->subtimer = this->field_0x5[3];
param_2->timer = this->timer;
param_2->subtimer = this->subtimer;
if ((this->field_0x18->carryFlags & 0xf0) == 0x10) {
this->field_0x5[2] = 8;
this->timer = 8;
} else {
this->field_0x5[2] = 0;
this->timer = 0;
}
SoundReq(SFX_PLY_LIFT);
}
+3 -3
View File
@@ -14,7 +14,7 @@ void ItemBoomerang(ItemBehavior* this, u32 idx) {
void sub_08075D2C(ItemBehavior* this, u32 idx) {
if (((gPlayerState.field_0x3[1] & 8) == 0) && (sub_08077C94(this, this->behaviorID) == NULL)) {
this->field_0x5[4] |= 0xf;
this->field_0x9 |= 0xf;
sub_0806F948(&gPlayerEntity);
sub_08077C0C(this, 0xb);
sub_08077D38(this, idx);
@@ -26,12 +26,12 @@ void sub_08075D2C(ItemBehavior* this, u32 idx) {
void sub_08075D88(ItemBehavior* this, u32 idx) {
if ((gPlayerState.field_0x3[1] & 0x80) == 0) {
if (((this->behaviorID == 0xc) && ((gPlayerState.field_0xa & 0x80) != 0)) && ((this->field_0x5[9] & 2) != 0)) {
if (((this->behaviorID == 0xc) && ((gPlayerState.field_0xa & 0x80) != 0)) && ((this->playerFrame & 2) != 0)) {
ResetPlayerVelocity();
return;
}
UpdateItemAnim(this);
if ((this->field_0x5[9] & 0x80) == 0) {
if ((this->playerFrame & 0x80) == 0) {
return;
}
}
+6 -6
View File
@@ -18,7 +18,7 @@ void ItemBow(ItemBehavior* this, u32 idx) {
void sub_08075DF4(ItemBehavior* this, u32 idx) {
if ((gPlayerState.field_0x3[1] & 8) == 0) {
this->field_0x5[4] |= 0x80;
this->field_0x9 |= 0x80;
sub_0806F948(&gPlayerEntity);
sub_08077BB8(this);
sub_08077D38(this, idx);
@@ -35,9 +35,9 @@ void sub_08075E40(ItemBehavior* this, u32 idx) {
bVar1 = gPlayerState.field_0x3[1] & 0x80;
if (bVar1 == 0) {
UpdateItemAnim(this);
if ((this->field_0x5[9] & 0x80) != 0) {
if ((this->playerFrame & 0x80) != 0) {
this->stateID = 2;
this->field_0x5[4] &= 0x7f;
this->field_0x9 &= ~0x80;
if (gSave.stats.arrowCount != 0) {
this->field_0xf = bVar1;
gPlayerState.field_0xa &= ~(8 >> idx);
@@ -65,7 +65,7 @@ void sub_08075EC0(ItemBehavior* this, u32 idx) {
gPlayerState.field_0xa = (8 >> idx) | gPlayerState.field_0xa;
sub_08077DF4(this, 0x27c);
this->field_0xf = 0xf;
this->field_0x5[4] |= 0xf;
this->field_0x9 |= 0xf;
this->stateID = 3;
}
}
@@ -73,7 +73,7 @@ void sub_08075EC0(ItemBehavior* this, u32 idx) {
void sub_08075F38(ItemBehavior* this, u32 idx) {
if (((gPlayerState.field_0x3[1] & 0x80) == 0) && (gPlayerState.field_0x1f[2] != 0)) {
UpdateItemAnim(this);
if ((this->field_0x5[9] & 1) != 0) {
if ((this->playerFrame & 1) != 0) {
this->stateID = 4;
}
} else {
@@ -89,7 +89,7 @@ void sub_08075F84(ItemBehavior* this, u32 idx) {
} else {
UpdateItemAnim(this);
}
if ((this->field_0x5[9] & 0x80) == 0) {
if ((this->playerFrame & 0x80) == 0) {
return;
}
}
+19 -18
View File
@@ -2,6 +2,7 @@
#include "entity.h"
#include "item.h"
#include "functions.h"
#include "playeritem.h"
void (*const ItemGustJar_StateFunctions[])(ItemBehavior* beh, u32);
@@ -14,10 +15,10 @@ void sub_08076DF4(ItemBehavior* this, u32 idx) {
if (sub_0807A894(&gPlayerEntity) != 0x29 && gPlayerState.floor_type != SURFACE_DOOR &&
gPlayerState.floor_type != SURFACE_DOOR_13 && gPlayerState.jump_status == 0) {
sub_08077D38(this, idx);
this->field_0x5[2] = 0;
this->field_0x5[5] = gPlayerEntity.animationState;
this->field_0x5[4] |= 0x80;
this->field_0x5[4]++;
this->timer = 0;
this->playerAnimationState = gPlayerEntity.animationState;
this->field_0x9 |= 0x80;
this->field_0x9++;
gPlayerState.gustJarSpeed = 1;
*(u32*)&gPlayerEntity.field_0x74 = 0;
gPlayerState.field_0x1c = 1;
@@ -33,11 +34,11 @@ void sub_08076E60(ItemBehavior* this, u32 idx) {
if ((gPlayerState.field_0x1c & 0xf) == 0) {
DeletePlayerItem(this, idx);
}
if ((this->field_0x5[9] & 0x80) != 0) {
if ((this->playerFrame & 0x80) != 0) {
this->stateID = 2;
sub_08077DF4(this, 0x504);
gPlayerState.field_0xa = gPlayerState.field_0xa & ~(8 >> idx);
playerItem = CreatePlayerItem(0x10, 0, 0, 0);
playerItem = CreatePlayerItem(PLAYER_ITEM_10, 0, 0, 0);
if (playerItem != NULL) {
playerItem->parent = &gPlayerEntity;
}
@@ -54,9 +55,9 @@ void sub_08076EC8(ItemBehavior* this, u32 idx) {
if (sub_08077EFC(this)) {
u32 val;
if (this->field_0x5[2] > 0xef) {
if (this->timer > 0xef) {
gPlayerState.gustJarSpeed = 3;
} else if (++this->field_0x5[2] > 0x77) {
} else if (++this->timer > 0x77) {
gPlayerState.gustJarSpeed = 2;
} else {
gPlayerState.gustJarSpeed = 1;
@@ -89,10 +90,10 @@ void sub_08076F64(ItemBehavior* this, u32 idx) {
Entity* player;
switch (gPlayerState.field_0x1c & 0xf) {
case 5:
if (this->field_0x5[9] & 0x80) {
if (this->field_0x5[3]) {
this->field_0x5[3] = 0;
this->field_0x5[2] = 0;
if (this->playerFrame & 0x80) {
if (this->subtimer) {
this->subtimer = 0;
this->timer = 0;
gPlayerState.gustJarSpeed = 1;
player = &gPlayerEntity;
*(u32*)&player->field_0x74 = 0;
@@ -100,7 +101,7 @@ void sub_08076F64(ItemBehavior* this, u32 idx) {
gPlayerState.field_0xa &= ~(8 >> idx);
this->stateID = 2;
sub_08077DF4(this, 0x504);
item = CreatePlayerItem(0x10, 0, 0, 0);
item = CreatePlayerItem(PLAYER_ITEM_10, 0, 0, 0);
if (item) {
item->parent = player;
}
@@ -112,7 +113,7 @@ void sub_08076F64(ItemBehavior* this, u32 idx) {
}
} else {
if (sub_08077EFC(this)) {
this->field_0x5[3] = 1;
this->subtimer = 1;
}
UpdateItemAnim(this);
@@ -130,15 +131,15 @@ void sub_08076F64(ItemBehavior* this, u32 idx) {
gPlayerState.field_0x1c = 4;
case 4:
if (sub_08077EFC(this)) {
this->field_0x5[3] = 1;
this->subtimer = 1;
}
UpdateItemAnim(this);
if (this->field_0x5[9] & 1) {
if (this->playerFrame & 1) {
gPlayerState.field_0x1c = 5;
gPlayerEntity.field_0x70.WORD = 0;
if (gPlayerState.gustJarSpeed) {
CreatePlayerItem(0x11, 0, 0, 0);
CreatePlayerItem(PLAYER_ITEM_11, 0, 0, 0);
}
}
@@ -150,7 +151,7 @@ void sub_08076F64(ItemBehavior* this, u32 idx) {
return;
case 6:
UpdateItemAnim(this);
if ((this->field_0x5[9] & 0x80) == 0)
if ((this->playerFrame & 0x80) == 0)
return;
break;
case 7:
+6 -6
View File
@@ -22,10 +22,10 @@ void sub_08077534(ItemBehavior* this, u32 idx) {
sub_08077D38(this, idx);
sub_0806F948(&gPlayerEntity);
sub_08077BB8(this);
this->field_0x5[4] |= 0xf;
this->field_0x9 |= 0xf;
tmp = this->behaviorID;
this->field_0x5[2] = gSave.filler86[tmp + 0x14];
switch (this->field_0x5[2]) {
this->timer = gSave.filler86[tmp + 0x14];
switch (this->timer) {
case 0x20:
sub_08077DF4(this, 0x614);
return;
@@ -57,7 +57,7 @@ void sub_08077534(ItemBehavior* this, u32 idx) {
}
void sub_08077618(ItemBehavior* this, u32 idx) {
if ((this->field_0x5[9] & 0x80) != 0) {
if ((this->playerFrame & 0x80) != 0) {
sub_08077DF4(this, 0x618);
this->stateID += 1;
} else {
@@ -67,7 +67,7 @@ void sub_08077618(ItemBehavior* this, u32 idx) {
void sub_08077640(ItemBehavior* this, u32 idx) {
UpdateItemAnim(this);
if ((this->field_0x5[9] & 0x80) != 0) {
if ((this->playerFrame & 0x80) != 0) {
gPlayerEntity.flags |= ENT_COLLIDE;
DeletePlayerItem(this, idx);
}
@@ -75,7 +75,7 @@ void sub_08077640(ItemBehavior* this, u32 idx) {
void sub_0807766C(ItemBehavior* this, u32 idx) {
UpdateItemAnim(this);
if ((this->field_0x5[9] & 0x80) != 0) {
if ((this->playerFrame & 0x80) != 0) {
gPlayerEntity.flags |= ENT_COLLIDE;
DeletePlayerItem(this, idx);
}
+4 -4
View File
@@ -34,7 +34,7 @@ void sub_08075A0C(ItemBehavior* this, u32 idx) {
ForceEquipItem(ITEM_LANTERN_OFF, itemSlot);
DeletePlayerItem(this, idx);
} else {
this->field_0x5[4] |= 0x80;
this->field_0x9 |= 0x80;
sub_08077D38(this, idx);
sub_08077BD4(this);
sub_0806F948(&gPlayerEntity);
@@ -57,7 +57,7 @@ void sub_08075ADC(ItemBehavior* this, u32 idx) {
#ifndef EU
gPlayerState.item != NULL ||
#endif
(this->field_0x5[9] & 1) == 0 || (gPlayerState.flags & (PL_DISABLE_ITEMS | PL_CAPTURED)) != 0 ||
(this->playerFrame & 1) == 0 || (gPlayerState.flags & (PL_DISABLE_ITEMS | PL_CAPTURED)) != 0 ||
sub_08079D48() == 0) {
this->field_0xf = 0;
this->stateID++;
@@ -117,11 +117,11 @@ void sub_08075C9C(ItemBehavior* this, u32 idx) {
s8* tmp;
UpdateItemAnim(this);
if ((this->field_0x5[9] & 0x10) != 0) {
if ((this->playerFrame & 0x10) != 0) {
tmp = &gUnk_08126EEC[gPlayerEntity.animationState & 6];
sub_0807AB44(&gPlayerEntity, tmp[0], tmp[1]);
}
if ((this->field_0x5[9] & 0x80) != 0) {
if ((this->playerFrame & 0x80) != 0) {
this->field_0xf = 0;
this->stateID--;
gPlayerState.field_0xa = (~(8 >> idx)) & gPlayerState.field_0xa;
+29 -29
View File
@@ -30,10 +30,10 @@ void sub_08077130(ItemBehavior* this, u32 idx) {
if (gPlayerState.jump_status == 0) {
sub_08077D38(this, idx);
gPlayerState.moleMittsState = 1;
this->field_0x5[4] |= 0x80;
this->field_0x9 |= 0x80;
iVar1 = sub_080774A0();
if (iVar1 != 0) {
if (this->field_0x5[2] == 0) {
if (this->timer == 0) {
sub_08077DF4(this, 0x50c);
this->stateID = 2;
if (iVar1 == 0x56) {
@@ -62,31 +62,31 @@ void sub_080771C8(ItemBehavior* this, u32 idx) {
Entity* object;
UpdateItemAnim(this);
if ((this->field_0x5[9] & 0x80) != 0) {
if ((this->playerFrame & 0x80) != 0) {
DeletePlayerItem(this, idx);
gPlayerState.moleMittsState = 0;
} else {
if (((this->field_0x5[9] & 0x20) != 0) && (this->field_0x5[3] == 0xff)) {
CreateObjectWithParent(&gPlayerEntity, 0x1e, this->field_0x5[9], 1);
if (((this->playerFrame & 0x20) != 0) && (this->subtimer == 0xff)) {
CreateObjectWithParent(&gPlayerEntity, MOLE_MITTS_PARTICLE, this->playerFrame, 1);
}
if ((this->field_0x5[9] & 0x10) != 0) {
if ((this->playerFrame & 0x10) != 0) {
if (sub_0800875A(&gPlayerEntity, 0xd, this) == 0) {
sub_08077DF4(this, 0x520);
this->stateID = 3;
SoundReq(SFX_107);
} else {
if (this->field_0x5[3] != 0xff) {
object = CreateObjectWithParent(&gPlayerEntity, 0x1f, 0, this->field_0x2[1]);
if (this->subtimer != 0xff) {
object = CreateObjectWithParent(&gPlayerEntity, OBJECT_1F, 0, this->field_0x2[1]);
if (object != NULL) {
object->timer = this->field_0x5[2];
object->subtimer = this->field_0x5[3];
object->timer = this->timer;
object->subtimer = this->subtimer;
object->animationState = gPlayerEntity.animationState & 6;
gPlayerEntity.frame = 0;
gPlayerEntity.frameDuration = gUnk_0811BE14[this->field_0x5[3]];
gPlayerEntity.frameDuration = gUnk_0811BE14[this->subtimer];
}
} else {
if ((this->field_0x2[1] == 0x0f) && (this->field_0x5[2] == 0x17)) {
this->field_0x5[3] = 0;
if ((this->field_0x2[1] == 0x0f) && (this->timer == 0x17)) {
this->subtimer = 0;
}
}
SoundReq(SFX_108);
@@ -104,56 +104,56 @@ void sub_080772A8(ItemBehavior* this, u32 idx) {
};
Entity* effect;
if (((this->field_0x5[9] & 8) != 0) && sub_08077F10(this)) {
this->field_0x5[2] = 1;
if (((this->playerFrame & 8) != 0) && sub_08077F10(this)) {
this->timer = 1;
}
if (GetInventoryValue(ITEM_DIG_BUTTERFLY) == 1) {
if ((this->field_0x5[9] & 7) != 3) {
if ((this->playerFrame & 7) != 3) {
sub_08077E3C(this, 2);
gPlayerEntity.speed = gUnk_0811BE16[this->field_0x5[9] & 7] << 1;
gPlayerEntity.speed = gUnk_0811BE16[this->playerFrame & 7] << 1;
} else {
UpdateItemAnim(this);
gPlayerEntity.speed = gUnk_0811BE16[this->field_0x5[9] & 7];
gPlayerEntity.speed = gUnk_0811BE16[this->playerFrame & 7];
}
} else {
UpdateItemAnim(this);
gPlayerEntity.speed = gUnk_0811BE16[this->field_0x5[9] & 7];
gPlayerEntity.speed = gUnk_0811BE16[this->playerFrame & 7];
}
gPlayerEntity.direction = gPlayerEntity.animationState << 2;
if (gPlayerEntity.speed != 0) {
UpdatePlayerMovement();
}
if ((this->field_0x5[9] & 0x10) != 0) {
if (this->field_0x5[2] != 0) {
if ((this->playerFrame & 0x10) != 0) {
if (this->timer != 0) {
gPlayerEntity.frameDuration = 1;
if (sub_080774A0()) {
this->field_0x5[2] = 0;
this->timer = 0;
return;
}
}
DeletePlayerItem(this, idx);
gPlayerState.moleMittsState = 0;
} else {
if ((this->field_0x5[9] & 0x60) != 0) {
if ((this->playerFrame & 0x60) != 0) {
gPlayerEntity.frameDuration = 1;
if (sub_0807B5B0(&gPlayerEntity)) {
SoundReq(SFX_108);
CreateObjectWithParent(&gPlayerEntity, MOLE_MITTS_PARTICLE, this->field_0x5[9], 0);
CreateObjectWithParent(&gPlayerEntity, MOLE_MITTS_PARTICLE, this->playerFrame, 0);
} else {
sub_08077DF4(this, 0x51c);
effect = CreateFx(&gPlayerEntity, FX_STARS_STRIKE, 0);
if (effect != NULL) {
effect->animationState = this->field_0x5[5];
effect->animationState = this->playerAnimationState;
effect->spritePriority.b0 = gPlayerEntity.spritePriority.b0 - 1;
}
effect = CreateFx(&gPlayerEntity, FX_STARS_STRIKE, 0);
if (effect != NULL) {
effect->animationState = this->field_0x5[5];
effect->animationState = this->playerAnimationState;
effect->spritePriority.b0 = gPlayerEntity.spritePriority.b0 - 1;
effect->subtimer = 1;
}
this->stateID = 3;
this->field_0x5[0] = 1;
this->field_0x5 = 1;
SoundReq(SFX_ITEM_GLOVES_KNOCKBACK);
}
}
@@ -163,11 +163,11 @@ void sub_080772A8(ItemBehavior* this, u32 idx) {
void sub_08077448(ItemBehavior* this, u32 idx) {
gPlayerEntity.direction = gPlayerEntity.animationState << 2 ^ 0x10;
gPlayerEntity.speed = 0x100;
if (((this->field_0x5[9] & 1) != 0) && (this->field_0x5[0] != 0)) {
if (((this->playerFrame & 1) != 0) && (this->field_0x5 != 0)) {
UpdatePlayerMovement();
}
UpdateItemAnim(this);
if ((this->field_0x5[9] & 0x80) != 0) {
if ((this->playerFrame & 0x80) != 0) {
gPlayerState.moleMittsState = 0;
DeletePlayerItem(this, idx);
}
+2 -2
View File
@@ -20,7 +20,7 @@ void OcarinaUse(ItemBehavior* this, u32 idx) {
if (gPlayerState.queued_action == PLAYER_ROLL) {
DeletePlayerItem(this, idx);
} else {
this->field_0x5[4] |= 0xf;
this->field_0x9 |= 0xf;
gPlayerEntity.animationState = 0x04;
gPlayerEntity.spriteSettings.flipX = 0;
gPlayerEntity.flags &= ~ENT_COLLIDE;
@@ -40,7 +40,7 @@ void OcarinaUse(ItemBehavior* this, u32 idx) {
void OcarinaUpdate(ItemBehavior* this, u32 idx) {
// TODO regalloc
UpdateItemAnim(this);
if ((this->field_0x5[9] & 0x80) != 0) {
if ((this->playerFrame & 0x80) != 0) {
gPlayerEntity.flags |= ENT_COLLIDE;
gPlayerState.flags &= ~PL_USE_OCARINA;
gPlayerState.field_0x27[0] = 0;
+3 -3
View File
@@ -16,17 +16,17 @@ void ItemPacciCane(ItemBehavior* beh, u32 idx) {
}
void sub_08076C98(ItemBehavior* beh, u32 idx) {
beh->field_0x5[4] |= 0xf;
beh->field_0x9 |= 0xf;
sub_08077D38(beh, idx);
sub_0806F948(&gPlayerEntity);
sub_08077BB8(beh);
}
void sub_08076CBC(ItemBehavior* beh, u32 idx) {
if ((beh->field_0x5[9] & 0x80) != 0) {
if ((beh->playerFrame & 0x80) != 0) {
DeletePlayerItem(beh, idx);
} else {
if ((beh->field_0x5[9] & 0x40) != 0) {
if ((beh->playerFrame & 0x40) != 0) {
CreatePlayerItemWithParent(beh, PLAYER_ITEM_12);
}
UpdateItemAnim(beh);
+13 -14
View File
@@ -29,12 +29,11 @@ void ItemPegasusBoots(ItemBehavior* this, u32 idx) {
gPlayerState.field_0xe = 0;
DeletePlayerItem(this, idx);
} else {
bVar1 = this->field_0x5[2] - 1;
this->field_0x5[2] = bVar1;
if ((bVar1 & 7) == 0) {
--this->timer;
if ((this->timer & 7) == 0) {
SoundReq(SFX_PLY_LAND);
}
if (((gPlayerState.flags & PL_MINISH) == 0) && ((this->field_0x5[2] & 7) == 0)) {
if (((gPlayerState.flags & PL_MINISH) == 0) && ((this->timer & 7) == 0)) {
if (gPlayerState.floor_type == SURFACE_SWAMP) {
if (gPlayerEntity.spriteOffsetY == 0) {
CreateFx(&gPlayerEntity, FX_GREEN_SPLASH, 0);
@@ -70,7 +69,7 @@ void sub_080768F8(ItemBehavior* this, u32 idx) {
gPlayerState.dash_state = 1;
gPlayerState.field_0x1f[2] = bVar1;
if ((gPlayerState.flags & PL_MINISH) == 0) {
this->field_0x5[2] = 0x10;
this->timer = 0x10;
} else {
gPlayerState.animation = 0xc14;
}
@@ -144,7 +143,7 @@ void sub_08076A88(ItemBehavior* this, u32 idx) {
}
uVar2 = gUnk_0800275C[(gPlayerEntity.animationState & 0xe) * 4];
if (uVar2 == (gPlayerEntity.collisions & uVar2)) {
if (this->field_0x5[3] != 0) {
if (this->subtimer != 0) {
gPlayerEntity.action = PLAYER_BOUNCE;
gPlayerEntity.subAction = 0;
COLLISION_OFF(&gPlayerEntity);
@@ -152,20 +151,20 @@ void sub_08076A88(ItemBehavior* this, u32 idx) {
gPlayerState.field_0xd = 0xff;
return;
}
this->field_0x5[3] = 1;
this->subtimer = 1;
return;
}
ptr = gUnk_0811BE38;
if ((*(u16*)&ptr[(gPlayerEntity.animationState & 0xfe)] & gPlayerState.playerInput.field_0x90) == 0) {
this->field_0x5[6] = (this->field_0x5[5] & 0xe) * 4;
if ((gPlayerState.field_0xd != 0xff) && (gPlayerState.field_0xd != this->field_0x5[6])) {
if (((gPlayerState.field_0xd - this->field_0x5[6]) & 0x1f) < 0x10) {
this->field_0x5[6] = this->field_0x5[6] + 2;
this->direction = (this->playerAnimationState & 0xe) * 4;
if ((gPlayerState.field_0xd != 0xff) && (gPlayerState.field_0xd != this->direction)) {
if (((gPlayerState.field_0xd - this->direction) & 0x1f) < 0x10) {
this->direction = this->direction + 2;
}
this->field_0x5[6]--;
this->field_0x5[6] &= 0x1f;
this->direction--;
this->direction &= 0x1f;
}
gPlayerState.field_0xd = this->field_0x5[6];
gPlayerState.field_0xd = this->direction;
UpdateItemAnim(this);
return;
}
+2 -2
View File
@@ -19,7 +19,7 @@ void ItemShield(ItemBehavior* beh, u32 idx) {
void sub_08076D04(ItemBehavior* beh, u32 idx) {
gPlayerState.field_0x3[0] = 0x81;
beh->field_0x5[4] = 2;
beh->field_0x9 = 2;
sub_0806F948(&gPlayerEntity);
sub_08077D38(beh, idx);
sub_08077BB8(beh);
@@ -29,7 +29,7 @@ void sub_08076D34(ItemBehavior* beh, u32 idx) {
if (sub_08077EFC(beh) != 0) {
gPlayerState.field_0x3[0] |= 1;
UpdateItemAnim(beh);
if (beh->field_0x5[9] != 0) {
if (beh->playerFrame != 0) {
beh->stateID++;
beh->field_0xf = 0;
gPlayerState.field_0xa &= ~(u8)(8 >> idx);
+25 -25
View File
@@ -28,7 +28,7 @@ void ItemSword(ItemBehavior* this, u32 idx) {
void sub_08075338(ItemBehavior* this, u32 idx) {
u32 temp, temp2;
if (gPlayerState.flags & PL_MINISH) {
this->field_0x5[4] |= 0x80;
this->field_0x9 |= 0x80;
sub_08077D38(this, idx);
gPlayerState.animation = 0xc00;
SoundReq(SFX_PLY_VO1);
@@ -74,9 +74,9 @@ void sub_08075338(ItemBehavior* this, u32 idx) {
gPlayerState.field_0xa |= temp;
gPlayerState.keepFacing |= temp;
this->stateID = 8;
this->field_0x5[2] = 0x14;
this->timer = 0x14;
this->field_0xf = 6;
this->field_0x5[4] |= 0x80;
this->field_0x9 |= 0x80;
gPlayerState.field_0xab = 2;
gPlayerState.flags |= PL_SWORD_THRUST;
sub_08077DF4(this, 0x130);
@@ -107,8 +107,8 @@ void sub_080754B8(ItemBehavior* this, u32 idx) {
sub_08075694(this, idx);
} else if (gPlayerState.field_0x3[1] != 0) {
UpdateItemAnim(this);
if (this->field_0x5[9] != 0) {
this->field_0x5[4] = this->field_0x5[4] & 0x7f;
if (this->playerFrame != 0) {
this->field_0x9 &= ~0x80;
}
if (gPlayerEntity.frameSpriteSettings & 1) {
@@ -123,7 +123,7 @@ void sub_080754B8(ItemBehavior* this, u32 idx) {
}
}
if ((this->field_0x5[9] & 0x80) != 0) {
if ((this->playerFrame & 0x80) != 0) {
if (((gPlayerState.flags & 0x80) != 0) || ((gPlayerState.skills & SKILL_SPIN_ATTACK) == 0)) {
sub_080759B8(this, idx);
} else {
@@ -143,9 +143,9 @@ void sub_08075580(ItemBehavior* this, u32 idx) {
this->field_0xf = 0;
this->stateID = 2;
if ((gPlayerState.skills & SKILL_FAST_SPIN) != 0) {
this->field_0x5[2] = 0x28; // TODO spin speed?
this->timer = 0x28; // TODO spin speed?
} else {
this->field_0x5[2] = 0x50;
this->timer = 0x50;
}
sub_08077DF4(this, 0x168);
CreateObject(SWORD_PARTICLE, 0, 0);
@@ -158,9 +158,9 @@ void sub_080755F0(ItemBehavior* this, u32 idx) {
if (sub_08077EFC(this) != 0) {
if (sub_08077EC8(this) == 0) {
if ((gPlayerState.sword_state | gPlayerState.field_0x3[1]) != 0) {
if (--this->field_0x5[2] == 0) {
if (--this->timer == 0) {
this->stateID = 3;
this->field_0x5[4] |= 0x80;
this->field_0x9 |= 0x80;
gPlayerState.sword_state = gPlayerState.sword_state | 0x20;
}
} else {
@@ -183,7 +183,7 @@ void sub_0807564C(ItemBehavior* this, u32 idx) {
}
void sub_08075694(ItemBehavior* this, u32 idx) {
this->field_0x5[2] = 1;
this->timer = 1;
if (gPlayerState.flags & PL_SWORD_THRUST) {
gPlayerState.flags &= ~PL_SWORD_THRUST;
gPlayerState.flags &= ~PL_ROLLING;
@@ -213,22 +213,22 @@ void sub_08075738(ItemBehavior* this, u32 idx) {
} else {
UpdateItemAnim(this);
if (sub_08077F10(this)) {
this->field_0x5[2] = 2;
this->timer = 2;
}
if ((gPlayerState.sword_state & 0x10) != 0) {
if ((gPlayerState.field_0xd & 0x80) == 0) {
this->field_0x5[6] = gPlayerState.field_0xd;
this->direction = gPlayerState.field_0xd;
}
gPlayerEntity.direction = this->field_0x5[6];
gPlayerEntity.direction = this->direction;
gPlayerEntity.speed = 0x180;
if ((this->field_0x5[9] & 0x80) != 0) {
if ((this->playerFrame & 0x80) != 0) {
bVar6 = 10;
if ((gPlayerState.skills & SKILL_LONG_SPIN) != 0) {
bVar6 = 0xf;
}
if ((bVar6 <= ++this->field_0x5[3]) || (--this->field_0x5[2] == 0)) {
if ((bVar6 <= ++this->subtimer) || (--this->timer == 0)) {
sub_080759B8(this, idx);
}
}
@@ -242,17 +242,17 @@ void sub_08075738(ItemBehavior* this, u32 idx) {
}
if ((((gPlayerEntity.frameSpriteSettings & 2) != 0) && ((gPlayerState.sword_state & 0x80) == 0)) &&
(((gPlayerState.skills & SKILL_GREAT_SPIN) != 0 && (--this->field_0x5[2] != 0)))) {
(((gPlayerState.skills & SKILL_GREAT_SPIN) != 0 && (--this->timer != 0)))) {
gPlayerState.sword_state |= 0x10;
gPlayerState.field_0xab = 6;
this->field_0x5[6] = gPlayerEntity.animationState << 2;
this->field_0x5[2] = 1;
this->field_0x5[3] = 1;
this->direction = gPlayerEntity.animationState << 2;
this->timer = 1;
this->subtimer = 1;
gPlayerState.field_0xa = gPlayerState.field_0xa & ~(8 >> idx);
sub_08077DF4(this, 0x128);
}
if ((this->field_0x5[9] & 0x80) != 0) {
if ((this->playerFrame & 0x80) != 0) {
sub_080759B8(this, idx);
}
}
@@ -270,7 +270,7 @@ void sub_080758B0(ItemBehavior* this, u32 idx) {
sub_080759B8(this, idx);
} else {
UpdateItemAnim(this);
if ((this->field_0x5[9] & 0x80) != 0) {
if ((this->playerFrame & 0x80) != 0) {
this->field_0xf = 0;
if ((gPlayerState.sword_state & 0x20) != 0) {
this->stateID = 3;
@@ -293,8 +293,8 @@ void sub_08075900(ItemBehavior* this, u32 idx) {
sub_0807564C(this, idx);
} else {
if (this->field_0x5[2] != 0) {
if (--this->field_0x5[2] == 0) {
if (this->timer != 0) {
if (--this->timer == 0) {
sub_08077DF4(this, 0x134);
}
gPlayerEntity.direction = (gPlayerEntity.animationState >> 1) << 3;
@@ -304,7 +304,7 @@ void sub_08075900(ItemBehavior* this, u32 idx) {
CreateFx(&gPlayerEntity, FX_DASH, 0x40);
}
} else {
if ((this->field_0x5[9] & 0x80) != 0) {
if ((this->playerFrame & 0x80) != 0) {
gPlayerState.flags &= ~PL_ROLLING;
sub_080759B8(this, idx);
}
+8 -8
View File
@@ -37,7 +37,7 @@ void ItemPickupCheck(ItemBehavior* this, u32 idx) {
this->field_0x18 = carried;
carried->action = 2;
carried->subAction = 5;
gPlayerState.framestate = 5;
gPlayerState.framestate = PL_STATE_THROW;
sub_080762C4(this, carried, 2, idx);
gUnk_0200AF00.unk_2e = 8;
SoundReq(SFX_102);
@@ -48,7 +48,7 @@ void ItemPickupCheck(ItemBehavior* this, u32 idx) {
break;
case 0:
this->stateID = 5;
this->field_0x5[2] = 0x0f;
this->timer = 0x0f;
this->field_0xf = 6;
gPlayerState.field_0xa = (8 >> idx) | gPlayerState.field_0xa;
gPlayerState.keepFacing = (8 >> idx) | gPlayerState.keepFacing;
@@ -79,13 +79,13 @@ void sub_08076488(ItemBehavior* this, u32 idx) {
u32 bVar1;
s32 iVar2;
if (this->field_0x5[2] == 0) {
if (this->timer == 0) {
if (PlayerTryDropObject(this, idx) != 0) {
if ((((this->field_0x18->carryFlags) & 0xf0) == 0x10) && ((gRoomTransition.frameCount & 1U) != 0)) {
return;
}
UpdateItemAnim(this);
if ((this->field_0x5[9] & 0x80) != 0) {
if ((this->playerFrame & 0x80) != 0) {
gPlayerEntity.flags |= ENT_COLLIDE;
gPlayerState.heldObject = 4;
bVar1 = ~(8 >> idx);
@@ -96,14 +96,14 @@ void sub_08076488(ItemBehavior* this, u32 idx) {
}
}
} else {
this->field_0x5[2]--;
this->timer--;
}
gPlayerState.framestate = PL_STATE_HOLD;
}
void sub_08076518(ItemBehavior* this, u32 index) {
if (PlayerTryDropObject(this, index)) {
gPlayerState.framestate = 4;
gPlayerState.framestate = PL_STATE_HOLD;
if ((gPlayerState.jump_status & 0x80) == 0 && gPlayerState.field_0x1f[0] == 0) {
if (gPlayerEntity.knockbackDuration != 0) {
PlayerCancelHoldItem(this, index);
@@ -132,7 +132,7 @@ void sub_08076518(ItemBehavior* this, u32 index) {
void sub_080765E0(ItemBehavior* this, u32 idx) {
if (PlayerTryDropObject(this, idx) != 0) {
if ((this->field_0x5[9] & 0x80) != 0) {
if ((this->playerFrame & 0x80) != 0) {
PlayerCancelHoldItem(this, idx);
} else {
UpdateItemAnim(this);
@@ -142,7 +142,7 @@ void sub_080765E0(ItemBehavior* this, u32 idx) {
void sub_0807660C(ItemBehavior* this, u32 idx) {
UpdateItemAnim(this);
if ((this->field_0x5[2]-- == 0) || (gPlayerState.field_0x0[1] == 0)) {
if ((this->timer-- == 0) || (gPlayerState.field_0x0[1] == 0)) {
gPlayerState.field_0x0[1] = 0;
DeletePlayerItem(this, idx);
}
+1 -1
View File
@@ -119,7 +119,7 @@ void GenerateAreaHint(void) {
u16 uVar1;
struct_area_28* ptr;
gPlayerState.queued_action = 0x16;
gPlayerState.queued_action = PLAYER_TALKEZLO;
#if defined(EU) || defined(JP)
// TODO what fields of the room transition are switched in these variants?
gRoomTransition.field_0x2c[7] = 0;
+1 -1
View File
@@ -103,7 +103,7 @@ static u32 PlayerStateValid(EzloHintManager* this) {
case PL_STATE_DROWN:
case PL_STATE_HOLE:
case PL_STATE_CLIMB:
case PL_STATE_1B:
case PL_STATE_SINKING:
case PL_STATE_STAIRS:
return 0;
case PL_STATE_6:
+3 -2
View File
@@ -46,9 +46,10 @@ u32 sub_08058244(int i) {
s32 tmp2;
u32 tmp3;
s32 tmp4;
tmp = ((gRoomControls.scroll_y - gRoomControls.origin_y) * 0x20) / (gRoomControls.height - 0xa0);
tmp = ((gRoomControls.scroll_y - gRoomControls.origin_y) * 0x20) / (gRoomControls.height - DISPLAY_HEIGHT);
gScreen.bg1.yOffset = gRoomControls.origin_y + tmp;
tmp = (((gRoomControls.scroll_x - gRoomControls.origin_x) * gUnk_081081EC[i]) / (gRoomControls.width - 0xf0));
tmp = (((gRoomControls.scroll_x - gRoomControls.origin_x) * gUnk_081081EC[i]) /
(gRoomControls.width - DISPLAY_WIDTH));
gScreen.bg1.xOffset = tmp & 0xf;
return tmp;
}
+1 -1
View File
@@ -57,7 +57,7 @@ void sub_0805B448(StaticBackgroundManager* this) {
}
void sub_0805B474(StaticBackgroundManager* this) {
s32 tmp = ((gRoomControls.scroll_y - gRoomControls.origin_y) * 0x60) / (gRoomControls.height - 0xa0);
s32 tmp = ((gRoomControls.scroll_y - gRoomControls.origin_y) * 0x60) / (gRoomControls.height - DISPLAY_HEIGHT);
gScreen.bg3.yOffset = gRoomControls.origin_y + tmp;
gScreen.bg3.xOffset = gRoomControls.scroll_x - ((gRoomControls.width - 0x100) / 2);
}
+2 -2
View File
@@ -103,7 +103,7 @@ void FigurineMenu_080A4608(void) {
SetColor(0x15c, gPaletteBuffer[0xd3]);
MemClear(&gBG0Buffer, 0x800);
MemClear(&gBG3Buffer, 0x1000);
gScreen.controls.window0HorizontalDimensions = 0xf0;
gScreen.controls.window0HorizontalDimensions = DISPLAY_WIDTH;
gScreen.controls.window0VerticalDimensions = 0x7898;
gScreen.controls.windowInsideControl = 0x1f;
gScreen.controls.windowOutsideControl = 0x1d;
@@ -594,7 +594,7 @@ void sub_080A4DB8(u32 param_1) {
MemClear(&gBG2Buffer, 0x800);
MemClear(gUnk_0200AF00.elements, sizeof(gUnk_0200AF00.elements));
MemClear(&gFigurineMenu, sizeof(gFigurineMenu));
gFigurineMenu.unk2e = 0xffff;
gFigurineMenu.unk2e = -1;
gMenu.field_0x3 = gPauseMenuOptions.unk2[param_1];
ptr = &gUnk_08128AD8[gUnk_08128A38[param_1].unk0];
gScreen.lcd.displayControl = ptr->unk2 | 0x1940;
+4 -4
View File
@@ -123,14 +123,14 @@ static void sub_0806D02C(Entity* this) {
tmp1 = -(s16)gScreen.bg1.xOffset;
tmp2 = tmp1 + 0x100;
tmp1 = min(max(0, tmp1), 0xf0);
tmp2 = min(max(0, tmp2), 0xf0);
tmp1 = min(max(0, tmp1), DISPLAY_WIDTH);
tmp2 = min(max(0, tmp2), DISPLAY_WIDTH);
gScreen.controls.window1HorizontalDimensions = (tmp1 << 8) | tmp2;
tmp1 = -(s16)gScreen.bg1.yOffset;
tmp2 = tmp1 + 0x100;
tmp1 = min(max(0, tmp1), 0xa0);
tmp2 = min(max(0, tmp2), 0xa0);
tmp1 = min(max(0, tmp1), DISPLAY_HEIGHT);
tmp2 = min(max(0, tmp2), DISPLAY_HEIGHT);
gScreen.controls.window1VerticalDimensions = (tmp1 << 8) | tmp2;
}
+1 -1
View File
@@ -170,7 +170,7 @@ void Guard_Head(Entity* this) {
if (this->id == 0x15) {
if ((this->frameIndex & 0x40) != 0) {
pbVar5 = pbVar5 + 0x21;
pbVar3 = 0xffffffff;
pbVar3 = -1;
uVar4 = 0;
} else {
pbVar3 = (uVar2 + 0x19);
+2 -2
View File
@@ -278,11 +278,11 @@ void sub_080644B4(Entity* this, ScriptExecutionContext* context) {
u32 sub_080644C8(GuardWithSpearEntity* this) {
if (super->x.HALF.HI - gRoomControls.scroll_x + 8 < 0)
return 0;
if (super->x.HALF.HI - gRoomControls.scroll_x - 8 > 0xf0)
if (super->x.HALF.HI - gRoomControls.scroll_x - 8 > DISPLAY_WIDTH)
return 0;
if (super->y.HALF.HI - gRoomControls.scroll_y < 0)
return 0;
if (super->y.HALF.HI - gRoomControls.scroll_y - 0x18 > 0xa0)
if (super->y.HALF.HI - gRoomControls.scroll_y - 0x18 > DISPLAY_HEIGHT)
return 0;
return 1;
}
+12 -10
View File
@@ -18,7 +18,10 @@ typedef struct {
u16 unk_4; /* u16 */
u8 unk_6;
u8 unk_7;
} KidHeap;
} KidHeapItem;
#define KID_HEAP_COUNT 0x14
typedef KidHeapItem KidHeap[KID_HEAP_COUNT];
extern u16 gUnk_0810BDE8[][2];
@@ -142,7 +145,7 @@ void sub_080621AC(Entity* this) {
ASM_FUNC("asm/non_matching/kid/sub_080622F4.inc", void sub_080622F4(Entity* this))
void sub_08062500(Entity* this) {
this->myHeap = zMalloc(0xa0);
this->myHeap = zMalloc(sizeof(KidHeap));
if (this->myHeap != NULL) {
this->field_0x68.HALF.LO = 1;
sub_080788E0(this);
@@ -160,7 +163,7 @@ NONMATCH("asm/non_matching/kid/sub_0806252C.inc", void sub_0806252C(Entity* this
s16 sVar5;
s16 sVar6;
u8 bVar7;
KidHeap* heapObj;
KidHeapItem* heapObj;
s32 loopVar;
s32 iVar10;
s32 iVar11;
@@ -170,13 +173,13 @@ NONMATCH("asm/non_matching/kid/sub_0806252C.inc", void sub_0806252C(Entity* this
sVar2 = gPlayerEntity.y.HALF.HI;
sVar1 = gPlayerEntity.x.HALF.HI;
r0 = gPlayerEntity.y.HALF.HI - this->y.HALF.HI;
sVar5 = FixedDiv(gPlayerEntity.x.HALF.HI - this->x.HALF.HI, 0x14);
sVar6 = FixedDiv(r0, 0x14);
heapObj = (KidHeap*)this->myHeap;
sVar5 = FixedDiv(gPlayerEntity.x.HALF.HI - this->x.HALF.HI, KID_HEAP_COUNT);
sVar6 = FixedDiv(r0, KID_HEAP_COUNT);
heapObj = (KidHeapItem*)this->myHeap;
iVar10 = 0;
iVar11 = 0;
loopVar = 0x13;
while (loopVar > -1) {
for (loopVar = KID_HEAP_COUNT - 1; loopVar > -1; loopVar--) {
heapObj->unk_0 = sVar1 - (s16)((u32)iVar11 >> 8);
heapObj->unk_2 = sVar2 - (s16)((u32)iVar10 >> 8);
heapObj->unk_4 = uVar3;
@@ -187,8 +190,7 @@ NONMATCH("asm/non_matching/kid/sub_0806252C.inc", void sub_0806252C(Entity* this
heapObj = heapObj + 1;
iVar10 = iVar10 + sVar6;
iVar11 = iVar11 + sVar5;
loopVar = loopVar - 1;
};
}
}
END_NONMATCH
+1 -1
View File
@@ -72,7 +72,7 @@ void sub_0806BA34(Entity* this, ScriptExecutionContext* context) {
}
void sub_0806BB1C(Entity* this, ScriptExecutionContext* context) {
s32 item = 0xffffffff;
s32 item = -1;
if (GetInventoryValue(ITEM_QST_BOOK1) == 1) {
item = ITEM_QST_BOOK1;
} else if (GetInventoryValue(ITEM_QST_BOOK2) == 1) {
+3 -3
View File
@@ -160,17 +160,17 @@ void sub_08067EF0(Entity* this) {
}
}
if ((this->frameSpriteSettings & 2) != 0) {
this->frameSpriteSettings &= 0xfd;
this->frameSpriteSettings &= ~2;
fxEnt = CreateFx(this, FX_ROCK, 0);
if (fxEnt != NULL) {
PositionRelative(this, fxEnt, 0, 0xffe80000);
PositionRelative(this, fxEnt, 0, Q_16_16(-24));
}
}
if ((this->frameSpriteSettings & 4) != 0) {
this->frameSpriteSettings &= 0xfb;
fxEnt = CreateFx(this, FX_STARS2, 0x20);
if (fxEnt != NULL) {
PositionRelative(this, fxEnt, 0xffec0000, 0xfff60000);
PositionRelative(this, fxEnt, Q_16_16(-20), Q_16_16(-10));
}
}
if ((this->frameSpriteSettings & 8) != 0) {
+2 -2
View File
@@ -49,8 +49,8 @@ void NPC58_Head(Entity* this) {
SetExtraSpriteFrame(this, 1, (s16)this->field_0x6a.HWORD);
SetExtraSpriteFrame(this, 2, (s16)this->field_0x6c.HWORD);
SetExtraSpriteFrame(this, 3, 10);
sub_0806FFBC(this, 0, 0xfffffff4, 0);
sub_0806FFBC(this, 1, 0xfffffffc, 0);
sub_0806FFBC(this, 0, -12, 0);
sub_0806FFBC(this, 1, -4, 0);
sub_0806FFBC(this, 2, 0xc, 0);
sub_0807000C(this);
}
+1 -1
View File
@@ -18,7 +18,7 @@ void Phonograph(Entity* this) {
this->action++;
this->spriteSettings.draw = 1;
this->field_0x68.HWORD = 1;
this->field_0x6a.HWORD = 0xffff;
this->field_0x6a.HWORD = -1;
sub_0807DD64(this);
this->frameIndex = 0;
}
+3 -3
View File
@@ -6,7 +6,7 @@ extern void sub_0806A8C8(Entity*);
extern void script_Rem;
extern void sub_0807F950(Entity* this, ScriptExecutionContext* context);
extern void DeleteThoughtBubble(Entity* this, ScriptExecutionContext* context);
void sub_0806A9B0(Entity*, ScriptExecutionContext*);
void sub_0806A914(Entity* this);
@@ -463,10 +463,10 @@ void sub_0806AB74(Entity* this) {
}
}
void sub_0806AB9C(Entity* this, ScriptExecutionContext* context) {
void DeleteNpcRem(Entity* this, ScriptExecutionContext* context) {
Entity* entity = FindEntity(NPC, REM, NPC, 1, 0);
if (entity != NULL) {
DeleteEntity(entity);
}
sub_0807F950(this, context);
DeleteThoughtBubble(this, context);
}
+1 -1
View File
@@ -148,7 +148,7 @@ void sub_08064F28(Entity* this, ScriptExecutionContext* context) {
}
}
}
iVar4 = 0xffffffff;
iVar4 = -1;
} else {
if (CheckGlobalFlag(KAKERA_COMPLETE) == 0) {
iVar4 = 100 - gSave.unk117;
+28 -6
View File
@@ -6,13 +6,10 @@
#include "save.h"
#include "npc.h"
#include "kinstone.h"
#include "hitbox.h"
extern const NPCDefinition gNPCDefinitions[];
extern Hitbox* gNPCHitboxes[];
extern u32 (*gUnk_08114EFC[])(Entity*);
extern u32 (*gUnk_08114F0C[])(Entity*, u8*);
typedef struct {
u16 textIndex;
u16 _2;
@@ -21,6 +18,18 @@ typedef struct {
extern NPCData* gUnk_08001A7C[];
u32 sub_0806EF88(Entity*);
u32 sub_0806EE70(Entity*);
u32 sub_0806EED0(Entity*);
u32 sub_0806EEF4(Entity*);
u32 sub_0806EFAC(Entity*, u16*);
u32 sub_0806EFBC(Entity*, u16*);
u32 sub_0806EFCC(Entity*, u16*);
u32 sub_0806EFDC(Entity*, u16*);
u32 sub_0806F014(Entity*, u16*);
u32 sub_0806F02C(Entity*, u16*);
u32 sub_0806F048(Entity*, u16*);
u32 sub_0806F050(Entity*, u16*);
u32 sub_0806F064(Entity*, u16*);
static void sub_0806EF14(Entity*);
static void sub_0806EF4C(Entity*, u16*);
@@ -48,6 +57,9 @@ static const NPCDefinition* GetNPCDefinition(Entity* this) {
}
void NPCInit(Entity* this) {
static const Hitbox* const gNPCHitboxes[] = {
NULL, &gHitbox_2, &gHitbox_30, &gHitbox_2, &gHitbox_3, &gHitbox_31,
};
u32 tmp;
u32 tmp2;
@@ -75,7 +87,7 @@ void NPCInit(Entity* this) {
this->spriteSettings.shadow = definition->data.sprite.shadow;
this->spritePriority.b1 = definition->data.sprite.spritePriority;
this->spriteSettings.draw = definition->data.sprite.draw;
this->hitbox = gNPCHitboxes[definition->bitfield.hitbox];
this->hitbox = (Hitbox*)gNPCHitboxes[definition->bitfield.hitbox];
this->flags |= ENT_DID_INIT;
tmp2 = 0xff;
this->animIndex = tmp2;
@@ -135,6 +147,12 @@ void sub_0806EE04(Entity* ent, void* a2, u32 a3) {
}
u32 sub_0806EE20(Entity* ent) {
static u32 (*const gUnk_08114EFC[])(Entity*) = {
sub_0806EF88,
sub_0806EE70,
sub_0806EED0,
sub_0806EEF4,
};
u32 v3;
if (!ent->interactType) {
@@ -203,8 +221,12 @@ static u32 sub_0806EF74(Entity* ent, u32 a2) {
}
u32 sub_0806EF88(Entity* ent) {
static u32 (*const gUnk_08114F0C[])(Entity*, u16*) = {
sub_0806EFAC, sub_0806EFBC, sub_0806EFCC, sub_0806EFDC, sub_0806F014,
sub_0806F02C, sub_0806F048, sub_0806F050, sub_0806F064,
};
u8* v1 = (u8*)&((u16*)ent->child)[ent->hitType];
return gUnk_08114F0C[*v1](ent, v1);
return gUnk_08114F0C[*v1](ent, (u16*)v1);
}
u32 sub_0806EFAC(Entity* ent, u16* a2) {
+4 -4
View File
@@ -109,7 +109,7 @@ void sub_08088BE0(BigBarrelEntity* this) {
Entity* ent;
if (CheckLocalFlag(0x15) == 0) {
sub_08088C78(this, 2, 0, 0xffffff88);
sub_08088C78(this, 2, 0, -120);
ent = sub_08088C78(this, 4, 0x15, 0);
if (ent != NULL) {
ent->x.HALF.HI = gRoomControls.origin_x + 0x48;
@@ -118,15 +118,15 @@ void sub_08088BE0(BigBarrelEntity* this) {
}
if (CheckLocalFlag(0x16) == 0) {
sub_08088C78(this, 2, 1, 0x78);
sub_08088C78(this, 2, 1, 120);
ent = sub_08088C78(this, 4, 0x16, 0);
if (ent != NULL) {
ent->x.HALF.HI = gRoomControls.origin_x + 0x188;
ent->y.HALF.HI = gRoomControls.origin_y + 200;
}
}
sub_08088C78(this, 1, 0, 0xffffff88);
sub_08088C78(this, 1, 1, 0x78);
sub_08088C78(this, 1, 0, -120);
sub_08088C78(this, 1, 1, 120);
}
Entity* sub_08088C78(BigBarrelEntity* this, u32 type, u32 type2, u32 xOffset) {
+1 -1
View File
@@ -59,7 +59,7 @@ void BigPushableLever_Idle(BigPushableLeverEntity* this) {
RequestPriorityDuration(super, 30);
if (PlayerCanBeMoved()) {
gPlayerState.pushedObject = 0x98;
gPlayerState.queued_action = 5;
gPlayerState.queued_action = PLAYER_PUSH;
gPlayerState.flags |= PL_BUSY;
gPlayerEntity.x.HALF.LO = 0;
gPlayerEntity.y.HALF.LO = 0;
+1 -1
View File
@@ -225,7 +225,7 @@ void Bird_Type8(Entity* this) {
PlayerCanBeMoved() && (EntityInRectRadius(this, &gPlayerEntity, 0xe, 0xe))) {
s32 z = gPlayerEntity.z.HALF.HI - this->z.HALF.HI - 8;
if ((u16)z < 0x20 && gPlayerEntity.health != 0) {
pEVar5 = CreateObject(0x95, 10, 0);
pEVar5 = CreateObject(BIRD, 10, 0);
if (pEVar5 != NULL) {
this->child = pEVar5;
this->action = 2;
+2 -2
View File
@@ -123,7 +123,7 @@ void ChestSpawner_Type2Action2(ChestSpawnerEntity* this) {
super->subAction = 1;
break;
case 1:
if ((super->type == 5) || (gPlayerEntity.action == 1)) {
if ((super->type == 5) || (gPlayerEntity.action == PLAYER_NORMAL)) {
super->subAction = 2;
super->timer = 8;
super->subtimer = 0;
@@ -201,7 +201,7 @@ void sub_080840A8(s32 param_1, s32 param_2) {
obj->zVelocity = gUnk_0811F840[Random() & 3];
obj->x.HALF.HI = gUnk_0811F850[Random() & 3] + param_1;
obj->y.HALF.HI = param_2 + 1;
obj->z.HALF.HI = 0xfff8;
obj->z.HALF.HI = -8;
ResolveCollisionLayer(obj);
obj = CreateFx(obj, FX_DASH, 0);
if (obj != NULL) {
+4 -4
View File
@@ -221,7 +221,7 @@ void sub_0808F3DC(Entity* this) {
}
if (this->type == 5 && (this->frame & 1)) {
Entity* entity = CreateObjectWithParent(this->child, 0x49, 8, 0);
Entity* entity = CreateObjectWithParent(this->child, CHUCHU_BOSS_START_PARTICLE, 8, 0);
if (entity != NULL) {
entity->parent = this->parent;
entity->child = this->parent->parent;
@@ -288,19 +288,19 @@ void sub_0808F554(Entity* this) {
}
void sub_0808F5EC(Entity* this) {
Entity* entity = CreateObjectWithParent(this->child, 0x49, 5, 0);
Entity* entity = CreateObjectWithParent(this->child, CHUCHU_BOSS_START_PARTICLE, 5, 0);
if (entity != NULL) {
entity->parent = this;
entity->child = this->child;
}
entity = CreateObjectWithParent(this->child, 0x49, 6, 0);
entity = CreateObjectWithParent(this->child, CHUCHU_BOSS_START_PARTICLE, 6, 0);
if (entity != NULL) {
entity->parent = this;
entity->child = this->child;
}
entity = CreateObjectWithParent(this->child, 0x49, 7, 0);
entity = CreateObjectWithParent(this->child, CHUCHU_BOSS_START_PARTICLE, 7, 0);
if (entity != NULL) {
entity->parent = this;
entity->child = this->child;
+2 -2
View File
@@ -323,11 +323,11 @@ void sub_08094660(GleerokParticleEntity* this) {
sub_08094708(this, iVar3, iVar4);
iVar3 = super->x.HALF.HI + spriteOffsetX + 0x30;
iVar4 = super->y.HALF.HI + spriteOffsetX + 0x30;
this->unk78 = 0xfffffff0;
this->unk78 = -16;
this->unk7c = 0;
sub_08094708(this, iVar3, iVar4);
this->unk78 = 0;
this->unk7c = 0xfffffff0;
this->unk7c = -16;
sub_08094708(this, iVar3, iVar4);
}
}
+1 -1
View File
@@ -173,7 +173,7 @@ void sub_0809D91C(Entity* this) {
bool32 sub_0809D93C(Entity* this, const struct_gUnk_08123FB0* param_2) {
u32 uVar1;
if (gPlayerEntity.action == 6 && ((param_2->unk0c >> gPlayerEntity.animationState & 1) != 0)) {
if (gPlayerEntity.action == PLAYER_BOUNCE && ((param_2->unk0c >> gPlayerEntity.animationState & 1) != 0)) {
uVar1 = (gPlayerEntity.x.HALF.HI - this->x.HALF.HI) + param_2->unk08 + param_2->unk0a;
if (param_2->unk0a * 2 <= (u16)uVar1) {
return 0;
+2 -2
View File
@@ -421,12 +421,12 @@ void GyorgBossObject_SpawnChildren(u32 unk0, bool32 fromBlue, u32 animationState
tmp->attackOffsetY = -p->offsetY;
break;
case 1:
tmp->attackOffsetX = p->offsetY + 0xF0;
tmp->attackOffsetX = p->offsetY + DISPLAY_WIDTH;
tmp->attackOffsetY = p->offsetX;
break;
case 2:
tmp->attackOffsetX = p->offsetX;
tmp->attackOffsetY = p->offsetY + 0xA0;
tmp->attackOffsetY = p->offsetY + DISPLAY_HEIGHT;
break;
case 3:
tmp->attackOffsetX = -p->offsetY;
+1 -1
View File
@@ -92,7 +92,7 @@ void ItemForSale_Action1(ItemForSaleEntity* this) {
super->interactType = 0;
super->action = 3;
gRoomVars.animFlags = 1;
gPlayerState.queued_action = 7;
gPlayerState.queued_action = PLAYER_08070E9C;
}
} else {
if (super->interactType != 0) {
+3 -3
View File
@@ -378,7 +378,7 @@ void KeyStealingTakkuri_Type4_Init(KeyStealingTakkuriEntity* this) {
super->action++;
super->collisionLayer = 1;
super->spriteRendering.b3 = 1;
super->z.HALF.HI = 0xfff0;
super->z.HALF.HI = -16;
sub_0807DD64(super);
InitAnimationForceUpdate(super, 1);
}
@@ -396,7 +396,7 @@ void sub_0809E0A0(KeyStealingTakkuriEntity* this) {
super->child = obj;
super->subtimer = 0;
CopyPosition(&gPlayerEntity, obj);
obj->z.HALF.HI = 0xfff8;
obj->z.HALF.HI = -8;
}
}
@@ -518,7 +518,7 @@ u32 sub_0809E2C4(KeyStealingTakkuriEntity* this, u32 param_2) {
uVar1 = roomY - tmp->unk_2 + tmp->unk_5;
uVar2 = tmp->unk_5 * 2;
if (uVar2 > (u16)uVar1) {
if (tmp->unk_6 == gPlayerEntity.animationState && gPlayerEntity.action == 6) {
if (tmp->unk_6 == gPlayerEntity.animationState && gPlayerEntity.action == PLAYER_BOUNCE) {
return 1;
}
return 2;
+6 -6
View File
@@ -94,14 +94,14 @@ void sub_0809B97C(LightRayEntity* this, u32 param_2) {
if (tmp1 < 0) {
tmp1 = 0;
}
if (0xf0 < tmp1) {
tmp1 = 0xf0;
if (DISPLAY_WIDTH < tmp1) {
tmp1 = DISPLAY_WIDTH;
}
if (tmp2 < 0) {
tmp2 = 0;
}
if (0xf0 < tmp2) {
tmp2 = 0xf0;
if (DISPLAY_WIDTH < tmp2) {
tmp2 = DISPLAY_WIDTH;
}
gScreen.controls.window0HorizontalDimensions = (tmp1 << 8) | tmp2;
}
@@ -124,8 +124,8 @@ void LightRay_Type1(LightRayEntity* this) {
}
gPlayerEntity.animationState = tmp;
gScreen.lcd.displayControl = (gScreen.lcd.displayControl & 0xbfff) | 0x2000;
gScreen.controls.window0HorizontalDimensions = 0xf0;
gScreen.controls.window0VerticalDimensions = 0xa0;
gScreen.controls.window0HorizontalDimensions = DISPLAY_WIDTH;
gScreen.controls.window0VerticalDimensions = DISPLAY_HEIGHT;
break;
case 1:
if (super->timer != 0) {
+1 -1
View File
@@ -347,7 +347,7 @@ void sub_08085A44(LilypadLargeEntity* this) {
if (GetRelativeCollisionTile(super, 0x10, 0x18) != 0x11) {
super->direction = 0x18;
} else {
if (GetRelativeCollisionTile(super, 0xfffffff0, 0x18) != 0x11) {
if (GetRelativeCollisionTile(super, -0x10, 0x18) != 0x11) {
super->direction = 8;
} else {
super->direction = 0x10;
+2 -2
View File
@@ -23,7 +23,7 @@ void LitArea(Entity* this) {
this->flags |= ENT_PERSIST;
this->subtimer = gRoomControls.room;
this->timer = 2;
this->field_0x68.HWORD = 0xfffe;
this->field_0x68.HWORD = -2;
this->field_0x6a.HWORD = 0x80;
SetAffineInfo(this, 0x80, 0x80, 0);
} else {
@@ -34,7 +34,7 @@ void LitArea(Entity* this) {
this->field_0x68.HWORD = 1;
}
if (0x88 < this->field_0x6a.HWORD) {
this->field_0x68.HWORD = 0xffff;
this->field_0x68.HWORD = -1;
}
SetAffineInfo(this, this->field_0x6a.HWORD, this->field_0x6a.HWORD, 0);
}
+1 -1
View File
@@ -72,7 +72,7 @@ void MinishEmoticon_Action1(Entity* this) {
animIndex = origAnimIndex + 0x19;
}
} else {
if ((gPlayerState.framestate == 1) || (gPlayerState.framestate == 25)) {
if (gPlayerState.framestate == PL_STATE_WALK || gPlayerState.framestate == PL_STATE_PUSH) {
animIndex = origAnimIndex + 4;
if (this->animIndex != animIndex) {
this->z.WORD = 0;
+3 -2
View File
@@ -42,7 +42,8 @@ void Object70_Action1(Entity* this) {
if (this->type == 0) {
if (gPlayerEntity.z.WORD == 0) {
if ((((gPlayerState.dash_state & 0x40) == 0) && (gPlayerState.floor_type == SURFACE_SWAMP)) &&
((gPlayerEntity.action == 1 || ((gPlayerEntity.action == 0x18 || (gPlayerEntity.action == 4)))))) {
((gPlayerEntity.action == PLAYER_NORMAL ||
((gPlayerEntity.action == PLAYER_ROLL || (gPlayerEntity.action == PLAYER_JUMP)))))) {
goto _080974FA;
} else {
if (gPlayerEntity.z.WORD == 0) {
@@ -65,7 +66,7 @@ void Object70_Action1(Entity* this) {
}
} else {
if (gPlayerEntity.action != 0x1e) {
if (gPlayerEntity.action != PLAYER_USEENTRANCE) {
if (this->collisionLayer == 1) {
gPlayerEntity.spriteOrientation.flipY = 2;
} else {
+1 -1
View File
@@ -162,7 +162,7 @@ void ObjectBlockingStairs_Action2(ObjectBlockingStairsEntity* this) {
} else {
if (gPlayerState.heldObject == 0x12) {
if ((gPlayerEntity.frame & 2) != 0 && ++super->subtimer > 8) {
gPlayerState.queued_action = 16;
gPlayerState.queued_action = PLAYER_PULL;
gPlayerState.field_0x38 = 0x40;
gPlayerState.flags |= PL_BUSY;
gPlayerEntity.x.HALF.LO = 0;
+1 -1
View File
@@ -129,7 +129,7 @@ void ObjectOnPillar_SubAction0(ObjectOnPillarEntity* this) {
}
sub_08097008(this);
if (sub_080896B0()) {
gPlayerState.queued_action = 0x10;
gPlayerState.queued_action = PLAYER_PULL;
gPlayerState.field_0x38 = 0x20;
gPlayerState.flags |= PL_BUSY;
gPlayerEntity.x.HALF.LO = 0;
+1 -1
View File
@@ -79,7 +79,7 @@ void OctorokBossObject_Init(Entity* this) {
}
}
this->speed = 0xf0 - (Random() & 0x3f);
this->speed = DISPLAY_WIDTH - (Random() & 0x3f);
LinearMoveAngle(this, ((s16)this->speed >> 1) << 8, (u32)this->direction);
LinearMoveAngle(this, ((s16)this->speed >> 1) << 8, (u32)this->direction);
InitializeAnimation(this, 5);
+2 -2
View File
@@ -105,8 +105,8 @@ void PlayerClone_Action2(PlayerCloneEntity* this) {
super->subtimer--;
}
if (gPlayerState.chargeState.action == 5 && gPlayerClones[super->type] != NULL && gPlayerState.framestate != 19 &&
super->health != 0) {
if (gPlayerState.chargeState.action == 5 && gPlayerClones[super->type] != NULL &&
gPlayerState.framestate != PL_STATE_TALKEZLO && super->health != 0) {
if (gPlayerEntity.iframes >= 1) {
gPlayerState.chargeState.action = 1;
} else {
+4 -4
View File
@@ -234,8 +234,8 @@ void sub_0808AEB0(PullableMushroomEntity* this) {
super->subtimer = 1;
} else {
if (((super->subtimer != 0) && (gPlayerEntity.action == 1)) && (gPlayerState.swim_state == 0)) {
gPlayerState.queued_action = 0x1b;
if (((super->subtimer != 0) && (gPlayerEntity.action == PLAYER_NORMAL)) && (gPlayerState.swim_state == 0)) {
gPlayerState.queued_action = PLAYER_08072C9C;
gPlayerState.field_0x38 = uVar1;
gPlayerState.field_0x39 = super->direction ^ 0x10;
gPlayerState.field_0x3a = sub_0808B1F0(this, &gPlayerEntity);
@@ -315,9 +315,9 @@ void sub_0808B0BC(PullableMushroomEntity* this) {
ent.base.x.HALF.HI = ptr[0] + gPlayerEntity.x.HALF.HI;
ent.base.y.HALF.HI = ptr[1] + gPlayerEntity.y.HALF.HI;
if (sub_0800419C(&ent.base, super, 7, 7)) {
if ((gPlayerEntity.action != 1) || (gPlayerState.swim_state != 0))
if ((gPlayerEntity.action != PLAYER_NORMAL) || (gPlayerState.swim_state != 0))
return;
gPlayerState.queued_action = 0x1b;
gPlayerState.queued_action = PLAYER_08072C9C;
gPlayerState.field_0x38 = uVar2;
gPlayerState.field_0x39 = super->direction ^ 0x10;
gPlayerState.field_0x3a = sub_0808B1F0((PullableMushroomEntity*)super->parent, &gPlayerEntity);
+3 -3
View File
@@ -342,9 +342,9 @@ void sub_0808FDE8(PushableFurnitureEntity* this) {
bool32 sub_0808FECC(PushableFurnitureEntity* this) {
bool32 result = TRUE;
if (!((gPlayerState.flags & PL_MINISH) == 0 && (gPlayerEntity.action == 6) && (gPlayerEntity.animationState == 0) &&
(gPlayerEntity.y.HALF.HI - super->y.HALF.HI < 0x14) && (super->x.HALF.HI + 0xc > gPlayerEntity.x.HALF.HI) &&
(super->x.HALF.HI - 12 < gPlayerEntity.x.HALF.HI))) {
if (!((gPlayerState.flags & PL_MINISH) == 0 && (gPlayerEntity.action == PLAYER_BOUNCE) &&
(gPlayerEntity.animationState == 0) && (gPlayerEntity.y.HALF.HI - super->y.HALF.HI < 0x14) &&
(super->x.HALF.HI + 0xc > gPlayerEntity.x.HALF.HI) && (super->x.HALF.HI - 12 < gPlayerEntity.x.HALF.HI))) {
result = FALSE;
}
return result;
+1 -1
View File
@@ -58,7 +58,7 @@ void PushableLever_Idle(PushableLeverEntity* this) {
RequestPriorityDuration(super, 30);
if (PlayerCanBeMoved()) {
gPlayerState.pushedObject = 0x90;
gPlayerState.queued_action = 5;
gPlayerState.queued_action = PLAYER_PUSH;
gPlayerState.flags |= PL_BUSY;
gPlayerEntity.x.HALF.LO = 0;
gPlayerEntity.y.HALF.LO = 0;
+1 -1
View File
@@ -130,7 +130,7 @@ void PushableStatue_SubAction0(PushableStatueEntity* this) {
}
}
if (sub_080896B0()) {
gPlayerState.queued_action = 0x10;
gPlayerState.queued_action = PLAYER_PULL;
gPlayerState.field_0x38 = 0x20;
gPlayerState.flags |= 1;
gPlayerEntity.x.HALF.LO = 0;
+4 -3
View File
@@ -22,9 +22,10 @@ void StoneTablet(Entity* this) {
void StoneTablet_Init(Entity* this) {
// TODO recreate as TileData[]
static const u16 gUnk_081232EC[] = { 0x4022, 0xfffe, 0x4022, 0xffff, 0x4022, 0x0, 0x4022, 0x1, 0xffff };
static const u16 gUnk_081232FE[] = { 0x4065, 0xffbf, 0x4022, 0xffc0, 0x4066, 0xffc1, 0x4029,
0xffff, 0x4026, 0x0, 0x402a, 0x1, 0xffff };
static const u16 gUnk_081232EC[] = { 0x4022, -2, 0x4022, -1, 0x4022, 0, 0x4022, 1, 0xffff };
static const u16 gUnk_081232FE[] = {
0x4065, -65, 0x4022, -64, 0x4066, -63, 0x4029, -1, 0x4026, 0, 0x402a, 1, 0xffff
};
this->action = 1;
this->spriteSettings.draw = 1;
if (this->type == 3) {
+1 -1
View File
@@ -59,7 +59,7 @@ void Vaati1Portal_Action2(Entity* this) {
void sub_080A0190(Entity* this) {
this->subAction = 1;
CopyPosition(this, &gPlayerEntity);
gPlayerState.queued_action = 3;
gPlayerState.queued_action = PLAYER_FALL;
gPlayerState.field_0x38 = 0;
gPlayerState.flags |= PL_PIT_IS_EXIT;
}
+4 -4
View File
@@ -62,9 +62,9 @@ void Whirlwind_Action1(Entity* this) {
if (this->spriteSettings.draw != 0) {
GetNextFrame(this);
if ((((((gPlayerState.flags & PL_MINISH) == 0)) && (gPlayerState.field_0x3c == 0)) &&
((gPlayerEntity.action == 4 || ((gPlayerEntity.flags & ENT_COLLIDE) != 0)))) &&
((gPlayerEntity.action != 6 && (sub_0800419C(this, &gPlayerEntity, 0xc, 0xc) != 0)))) {
if (((gPlayerState.flags & PL_PARACHUTE) == 0) && (gPlayerEntity.action != 4)) {
((gPlayerEntity.action == PLAYER_JUMP || ((gPlayerEntity.flags & ENT_COLLIDE) != 0)))) &&
((gPlayerEntity.action != PLAYER_BOUNCE && (sub_0800419C(this, &gPlayerEntity, 0xc, 0xc) != 0)))) {
if (((gPlayerState.flags & PL_PARACHUTE) == 0) && (gPlayerEntity.action != PLAYER_JUMP)) {
if ((this->type2 != 1) && (-0x10 < gPlayerEntity.z.HALF.HI)) {
return;
}
@@ -76,7 +76,7 @@ void Whirlwind_Action1(Entity* this) {
sub_08004542(&gPlayerEntity);
gPlayerEntity.collisionLayer = 1;
gPlayerEntity.flags |= ENT_COLLIDE;
gPlayerState.queued_action = 0x1f;
gPlayerState.queued_action = PLAYER_PARACHUTE;
gPlayerState.field_0x38 = this->type2;
gPlayerState.field_0x39 = 0xff;
this->spritePriority.b0 = gPlayerEntity.spritePriority.b0 - 1;
+2 -1
View File
@@ -9,6 +9,7 @@
#include "room.h"
#include "functions.h"
#include "color.h"
#include "playeritem.h"
const u8 gSpriteSortAboveTable[];
const u8 gSpriteSortBelowTable[];
@@ -82,7 +83,7 @@ bool32 sub_0806F3E4(Entity* ent) {
ent->subAction = 3;
gNewPlayerEntity.unk_70 = ent;
gPlayerState.field_0x1c = 7;
item = CreatePlayerItem(0x11, 0, 0, 0);
item = CreatePlayerItem(PLAYER_ITEM_11, 0, 0, 0);
if (item != NULL) {
item->child = ent;
ent->parent = item;
+27 -25
View File
@@ -288,7 +288,7 @@ bool32 CheckInitPauseMenu(void) {
return FALSE;
}
framestate = gPlayerState.framestate == 0 ? gPlayerState.framestate_last : gPlayerState.framestate;
framestate = gPlayerState.framestate == PL_STATE_IDLE ? gPlayerState.framestate_last : gPlayerState.framestate;
switch (framestate) {
case PL_STATE_DIE:
case PL_STATE_TALKEZLO:
@@ -692,7 +692,7 @@ static void PlayerBounceUpdate(Entity* this) {
COLLISION_ON(this);
if ((gPlayerState.field_0x14 == 0) && PlayerCheckNEastTile()) {
gPlayerState.field_0x11 = 7;
gPlayerState.surfacePositionSameTimer = 7;
ResolvePlayerAnimation();
SetPlayerActionNormal();
return;
@@ -845,7 +845,7 @@ static void PlayerJumpInit(Entity* this) {
gPlayerState.flags |= PL_BUSY;
gPlayerState.flags &= ~(PL_BURNING | PL_FROZEN);
gPlayerState.queued_action = 0;
gPlayerState.queued_action = PLAYER_INIT;
if ((gPlayerState.heldObject | gPlayerState.sword_state) == 0) {
if ((gPlayerState.flags & PL_MINISH) == 0) {
@@ -1499,7 +1499,7 @@ static void PlayerMinishDieInit(Entity* this) {
return;
}
gPlayerState.queued_action = 0;
gPlayerState.queued_action = PLAYER_INIT;
if (gPlayerState.flags & PL_MINISH) {
if (gPlayerState.floor_type == SURFACE_MINISH_DOOR_FRONT ||
gPlayerState.floor_type == SURFACE_MINISH_DOOR_BACK || gPlayerState.floor_type == SURFACE_A) {
@@ -1611,7 +1611,7 @@ static void sub_08071E04(Entity* this) {
if ((this->z.WORD != 0) && (gPlayerState.field_0x14 == 0)) {
UpdateFloorType();
if (gPlayerState.floor_type == SURFACE_PIT) {
gPlayerState.field_0x11 = 7;
gPlayerState.surfacePositionSameTimer = 7;
gPlayerState.flags |= PL_FALLING;
SetPlayerActionNormal();
return;
@@ -2288,7 +2288,7 @@ static void sub_08072C48(Entity* this) {
sub_08008790(this, 7);
if (gPlayerState.field_0x14) {
if (PlayerCheckNEastTile()) {
gPlayerState.field_0x11 = 7;
gPlayerState.surfacePositionSameTimer = 7;
if (!(gPlayerState.flags & PL_MINISH)) {
SetPlayerActionNormal();
}
@@ -2305,7 +2305,7 @@ static void sub_08072C9C(Entity* this) {
sub_08072D54,
sub_08072F14,
};
gPlayerState.framestate = 0x11;
gPlayerState.framestate = PL_STATE_11;
gUnk_0811BBAC[this->subAction](this);
}
@@ -2410,7 +2410,7 @@ static void sub_08072D54(Entity* this) {
sub_08008790(this, 7);
if (gPlayerState.field_0x14 != 0) {
if (PlayerCheckNEastTile()) {
gPlayerState.field_0x11 = 7;
gPlayerState.surfacePositionSameTimer = 7;
if (!(gPlayerState.flags & PL_MINISH)) {
SetPlayerActionNormal();
}
@@ -3034,7 +3034,7 @@ static void sub_08073AD4(Entity* this) {
sub_0807A2B8();
gPlayerState.jump_status = 0;
UpdateFloorType();
if (gPlayerState.queued_action != 0 || gPlayerState.swim_state != 0) {
if (gPlayerState.queued_action != PLAYER_INIT || gPlayerState.swim_state != 0) {
return;
}
if (gPlayerState.field_0x3[1])
@@ -3319,8 +3319,8 @@ void sub_080740D8(Entity* this) {
u32 sub_080741C4(void) {
if ((gPlayerState.jump_status && (gPlayerState.jump_status & 7) != 3) || gPlayerEntity.z.WORD != 0) {
gPlayerState.field_0x11 = 0;
gPlayerState.field_0x37 = 0;
gPlayerState.surfacePositionSameTimer = 0;
gPlayerState.surfaceTimer = 0;
return 1;
}
return 0;
@@ -3374,7 +3374,7 @@ void SurfaceAction_6(Entity* this) {
}
void SurfaceAction_7(Entity* this) {
if (!sub_080741C4() && (gPlayerState.flags & PL_MINISH) == 0 && gPlayerState.field_0x11 == 15) {
if (!sub_080741C4() && (gPlayerState.flags & PL_MINISH) == 0 && gPlayerState.surfacePositionSameTimer == 15) {
CreateObjectWithParent(this, CRACKING_GROUND, 0, 0);
}
}
@@ -3519,7 +3519,8 @@ void SurfaceAction_ShallowWater(Entity* this) {
this->spritePriority.b0 = 4;
gPlayerState.swim_state = 0;
}
if ((gPlayerState.playerInput.field_0x92 & PLAYER_INPUT_ANY_DIRECTION) || gPlayerState.field_0x11 == 1)
if ((gPlayerState.playerInput.field_0x92 & PLAYER_INPUT_ANY_DIRECTION) ||
gPlayerState.surfacePositionSameTimer == 1)
SoundReq(SFX_WATER_WALK);
}
}
@@ -3536,29 +3537,29 @@ void SurfaceAction_SlopeGndWater(Entity* this) {
void SurfaceAction_Swamp(Entity* this) {
if (sub_080741C4()) {
gPlayerState.field_0x11 = 0;
gPlayerState.field_0x37 = 0;
gPlayerState.surfacePositionSameTimer = 0;
gPlayerState.surfaceTimer = 0;
return;
}
if (this->health) {
if (sub_08079C30(this) == 0) {
gPlayerState.field_0x11 = 0;
gPlayerState.field_0x37 = 0;
gPlayerState.surfacePositionSameTimer = 0;
gPlayerState.surfaceTimer = 0;
return;
}
if ((gPlayerState.flags & 0x80) == 0) {
if ((gPlayerState.flags & PL_MINISH) == 0) {
if (gPlayerState.dash_state) {
if ((gPlayerState.dash_state & 0x40) != 0) {
gPlayerState.field_0x11 = 0;
gPlayerState.field_0x37 = 0;
gPlayerState.surfacePositionSameTimer = 0;
gPlayerState.surfaceTimer = 0;
return;
}
} else {
PutAwayItems();
}
if (gPlayerState.field_0x37 == 1) {
if (gPlayerState.surfaceTimer == 1) {
CreateObjectWithParent(this, OBJECT_70, 0, 0);
CreateFx(this, FX_GREEN_SPLASH, 0);
SoundReq(SFX_161);
@@ -3568,9 +3569,9 @@ void SurfaceAction_Swamp(Entity* this) {
SoundReq(SFX_161);
}
gPlayerState.speed_modifier -= 0xf0;
gPlayerState.framestate = 0x1b;
if (gPlayerState.field_0x37 < 0xf0) {
gPlayerState.spriteOffsetY = gPlayerState.spriteOffsetY + 4 + (gPlayerState.field_0x37 >> 5);
gPlayerState.framestate = PL_STATE_SINKING;
if (gPlayerState.surfaceTimer < 0xf0) {
gPlayerState.spriteOffsetY = gPlayerState.spriteOffsetY + 4 + (gPlayerState.surfaceTimer >> 5);
return;
}
}
@@ -3717,7 +3718,8 @@ void SurfaceAction_22(Entity* this) {
void SurfaceAction_Dust(Entity* this) {
if (!sub_080741C4()) {
gPlayerState.speed_modifier -= 128;
if (gPlayerState.field_0x11 == 1 || (gPlayerState.playerInput.field_0x92 & PLAYER_INPUT_ANY_DIRECTION) != 0) {
if (gPlayerState.surfacePositionSameTimer == 1 ||
(gPlayerState.playerInput.field_0x92 & PLAYER_INPUT_ANY_DIRECTION) != 0) {
if (gPlayerState.floor_type == SURFACE_DUST)
CreateObjectWithParent(this, DIRT_PARTICLE, 1, 0);
else
+2 -1
View File
@@ -4,6 +4,7 @@
#include "functions.h"
#include "asm.h"
#include "item.h"
#include "object.h"
typedef struct {
Entity base;
@@ -65,7 +66,7 @@ void PlayerItemBomb(PlayerItemBombEntity* this) {
super->spriteSettings.draw = 0;
sub_0805EC60(super);
FreeCarryEntity(super);
CreateObjectWithParent(super, 0x20, 0, 0);
CreateObjectWithParent(super, SMOKE_PARTICLE, 0, 0);
sub_0801B418(super);
} else {
sub_0801B3A4(this);
+1 -1
View File
@@ -90,7 +90,7 @@ void sub_0801B584(Entity* this) {
sub_0801B804(this);
if ((gPlayerState.field_0x3[1] == 0) || (gPlayerState.mobility != 0) || gPlayerState.item != this ||
(gPlayerState.item == this && gPlayerEntity.action != 1)) {
(gPlayerState.item == this && gPlayerEntity.action != PLAYER_NORMAL)) {
if (gPlayerState.item == this) {
gPlayerState.item = NULL;
}
+2 -1
View File
@@ -5,6 +5,7 @@
#include "physics.h"
#include "functions.h"
#include "effects.h"
#include "playeritem.h"
typedef struct {
Entity base;
@@ -76,7 +77,7 @@ void sub_080A310C(FireRodProjectileEntity* this) {
if (sub_08008790(super, 0xc)) {
DeleteThisEntity();
}
super->child = CreatePlayerItem(0x15, 1, 0, this->unk68);
super->child = CreatePlayerItem(PLAYER_ITEM_15, 1, 0, this->unk68);
if (super->child != NULL) {
super->child->parent = super;
}
+2 -1
View File
@@ -4,6 +4,7 @@
#include "functions.h"
#include "asm.h"
#include "object.h"
#include "playeritem.h"
enum {
GUST_INIT,
@@ -220,7 +221,7 @@ static void sub_080ACECC(GustEntity* this) {
Entity* entity;
if (super->type < 3 && super->child == NULL && (s32)this->unk78 >= 0 && gUnk_0812AAE8[super->type] <= this->unk78) {
entity = CreatePlayerItem(0x10, super->type + 1, 0, 0);
entity = CreatePlayerItem(PLAYER_ITEM_10, super->type + 1, 0, 0);
if (entity != NULL) {
entity->parent = super;
super->child = entity;
+2 -1
View File
@@ -4,6 +4,7 @@
#include "functions.h"
#include "sound.h"
#include "collision.h"
#include "playeritem.h"
extern void (*const gUnk_081271D4[])(Entity*);
extern u8 gUnk_081271DC[];
@@ -66,7 +67,7 @@ NONMATCH("asm/non_matching/playerItemShield/sub_080A2E00.inc", void sub_080A2E00
if ((this->contactFlags & 0x80) != 0) {
if ((((this->contactFlags & 0x7f) == 0x42) && (*(char*)&this->field_0x68 == 0xe)) &&
((uVar4 & 0x40) == 0)) {
pEVar1 = CreatePlayerItem(0x15, 0, 0, *(char*)&this->field_0x68);
pEVar1 = CreatePlayerItem(PLAYER_ITEM_15, 0, 0, *(char*)&this->field_0x68);
this->child = pEVar1;
if (pEVar1 != NULL) {
pEVar1->subtimer = 1;
+55 -55
View File
@@ -191,7 +191,7 @@ void sub_08077698(PlayerEntity* this) {
idx = 0;
puVar2 = gUnk_03000B80;
do {
if (puVar2->field_0x5[4] != 0) {
if (puVar2->field_0x9 != 0) {
sub_080752E8(puVar2, idx);
}
puVar2++;
@@ -248,7 +248,7 @@ bool32 sub_080777A0(void) {
((((gPlayerState.playerInput.field_0x90 & PLAYER_INPUT_ANY_DIRECTION) != 0 &&
((gPlayerState.flags & (PL_BURNING | PL_ROLLING)) == 0)) &&
((gPlayerState.jump_status == 0 && (gPlayerState.field_0x3[1] == 0)))))) {
gPlayerState.queued_action = 0x18;
gPlayerState.queued_action = PLAYER_ROLL;
}
return FALSE;
}
@@ -276,7 +276,7 @@ void sub_08077880(Item itemId, u32 param_2, u32 param_3) {
if (((*puVar2 & param_2) != 0) || (param_3 != 0)) {
item = sub_0807794C(itemId);
if (item != NULL) {
item->field_0x5[4] = gUnk_0811BE48[itemId].unk0[1];
item->field_0x9 = gUnk_0811BE48[itemId].unk0[1];
item->behaviorID = itemId;
item->field_0x2[1] = param_2;
}
@@ -297,7 +297,7 @@ bool32 sub_080778CC(void) {
item = sub_0807794C(ITEM_TRAP);
if (item != NULL) {
item->behaviorID = ITEM_TRAP;
item->field_0x5[4] = gUnk_0811BE48[0].unk0[0x145];
item->field_0x9 = gUnk_0811BE48[0].unk0[0x145];
return TRUE;
} else {
return FALSE;
@@ -309,7 +309,7 @@ ItemBehavior* sub_0807794C(Item itemId) {
(((gPlayerState.flags & (PL_ROLLING | PL_CLONING)) != 0 && (ITEM_FOURSWORD < itemId)))) ||
((((gPlayerState.jump_status != 0 || (gPlayerEntity.z.WORD != 0)) && (ITEM_FOURSWORD < itemId)) ||
(((gPlayerState.flags & PL_MINISH) != 0 && (gUnk_0811BE48[itemId].unk6[2] == 0)))))) ||
((gPlayerState.floor_type == SURFACE_SWAMP && ((gPlayerState.field_0x37 != 0 && (1 < itemId - 0x14)))))) {
((gPlayerState.floor_type == SURFACE_SWAMP && ((gPlayerState.surfaceTimer != 0 && (1 < itemId - 0x14)))))) {
return NULL;
} else {
u32 tmp = gUnk_0811BE48[itemId].unk0[2];
@@ -322,9 +322,9 @@ u32 sub_080779E8(void) {
}
ItemBehavior* sub_080779EC(u32 param_1) {
if (gUnk_03000B80[1].field_0x5[4] == 0) {
if (gUnk_03000B80[1].field_0x9 == 0) {
return gUnk_03000B80 + 1;
} else if (gUnk_03000B80[2].field_0x5[4] == 0) {
} else if (gUnk_03000B80[2].field_0x9 == 0) {
return gUnk_03000B80 + 2;
} else {
return NULL;
@@ -346,7 +346,7 @@ ItemBehavior* sub_08077A48(s32 param_1) {
if (gPlayerState.heldObject == 0) {
u32 tmp = gPlayerState.jump_status & 0x20;
if ((((gPlayerState.jump_status & 0x20) == 0)) &&
(gUnk_0811BE48[param_1].unk0[1] >= gUnk_03000B80[0].field_0x5[4])) {
(gUnk_0811BE48[param_1].unk0[1] >= gUnk_03000B80[0].field_0x9)) {
DeletePlayerItem(gUnk_03000B80, 0);
gPlayerState.field_0x0[1] = tmp;
gPlayerState.field_0x1c = tmp;
@@ -358,7 +358,7 @@ ItemBehavior* sub_08077A48(s32 param_1) {
}
ItemBehavior* sub_08077A98(void) {
if (!(((gSave.stats.bombCount == 0) || (gPlayerState.heldObject != 0)) || (gUnk_03000B80[0].field_0x5[4] != 0))) {
if (!(((gSave.stats.bombCount == 0) || (gPlayerState.heldObject != 0)) || (gUnk_03000B80[0].field_0x9 != 0))) {
return gUnk_03000B80;
} else {
return NULL;
@@ -372,7 +372,7 @@ ItemBehavior* sub_08077AC8(void) {
index = 0;
pIVar1 = gUnk_03000B80;
while (index < 4) {
if (pIVar1->field_0x5[4] != 0) {
if (pIVar1->field_0x9 != 0) {
return NULL;
}
pIVar1++;
@@ -424,9 +424,9 @@ void ResetPlayerItem() {
}
switch (gPlayerState.framestate) {
case 2:
case 3:
case 4:
case PL_STATE_SWORD:
case PL_STATE_GUSTJAR:
case PL_STATE_HOLD:
gPlayerState.framestate = PL_STATE_IDLE;
break;
}
@@ -540,7 +540,7 @@ void sub_08077D38(ItemBehavior* beh, u32 idx) {
gPlayerState.field_0xa |= 8 >> idx;
gPlayerState.keepFacing |= 8 >> idx;
beh->field_0x5[5] = gPlayerEntity.animationState;
beh->playerAnimationState = gPlayerEntity.animationState;
if (beh->stateID == 0) {
beh->stateID++;
}
@@ -583,7 +583,7 @@ typedef struct {
void sub_08077DF4(ItemBehavior* beh, u32 animation) {
beh->field_0x10 = animation;
if ((animation & 0xff) > 0xb8) {
animation += beh->field_0x5[5] >> 1;
animation += beh->playerAnimationState >> 1;
}
gPlayerEntity.spriteIndex = (short)(animation >> 8);
InitAnimationForceUpdate(&gPlayerEntity, (u8)animation);
@@ -601,10 +601,10 @@ void sub_08077E3C(ItemBehavior* ent, u32 idx) {
}
static void sub_08077E54(ItemBehavior* beh) {
beh->field_0x5[7] = gPlayerEntity.animIndex;
beh->field_0x12[0] = gPlayerEntity.frameIndex;
beh->field_0x5[8] = gPlayerEntity.frameDuration;
beh->field_0x5[9] = gPlayerEntity.frame;
beh->playerAnimIndex = gPlayerEntity.animIndex;
beh->playerFrameIndex = gPlayerEntity.frameIndex;
beh->playerFrameDuration = gPlayerEntity.frameDuration;
beh->playerFrame = gPlayerEntity.frame;
}
void DeletePlayerItem(ItemBehavior* arg0, u32 idx) {
@@ -630,7 +630,7 @@ void DeletePlayerItem(ItemBehavior* arg0, u32 idx) {
bool32 sub_08077EC8(ItemBehavior* beh) {
if ((gPlayerState.sword_state & 8) != 0) {
sub_08077DF4(beh, 0x170);
beh->field_0x5[2] = 0x28;
beh->timer = 0x28;
beh->stateID = 7;
beh->field_0xf = 6;
return TRUE;
@@ -845,7 +845,7 @@ void sub_08078180(void) {
}
} else {
if (sub_080789A8()) {
if (((gPlayerState.framestate != 0x0e))) {
if (((gPlayerState.framestate != PL_STATE_USEPORTAL))) {
if ((gCarriedEntity.unk_1 == 2) && ((gCarriedEntity.unk_8)->carryFlags == 1)) {
uVar1 = 8;
@@ -856,7 +856,7 @@ void sub_08078180(void) {
return;
}
} else {
if ((gPlayerState.framestate == 1) && (gPlayerState.mobility == 0)) {
if ((gPlayerState.framestate == PL_STATE_WALK) && (gPlayerState.mobility == 0)) {
uVar1 = 0xc;
} else {
uVar1 = 0;
@@ -873,18 +873,18 @@ bool32 sub_080782C0(void) {
u8 tmp;
Entity* entity;
if (gPlayerState.framestate == 0) {
if (gPlayerState.framestate == PL_STATE_IDLE) {
tmp = gPlayerState.framestate_last;
} else {
tmp = gPlayerState.framestate;
}
switch (tmp) {
case 2:
case 3:
case 0xc:
case 0x12:
case 0x15:
case 0x16:
case PL_STATE_SWORD:
case PL_STATE_GUSTJAR:
case PL_STATE_C:
case PL_STATE_DIE:
case PL_STATE_ITEMGET:
case PL_STATE_DROWN:
return FALSE;
}
if ((gPlayerState.field_0x27[0] | gPlayerState.swim_state) != 0) {
@@ -922,11 +922,11 @@ bool32 sub_080782C0(void) {
if (gSave.unk12B[0] != 0) {
gUnk_03003DF0.unk_2 = gUnk_03003DF0.unk_4[3];
*(u8*)(*(int*)(gUnk_03003DF0.unk_4 + 8) + 0x39) = 2;
gPlayerState.queued_action = 7;
gPlayerState.queued_action = PLAYER_08070E9C;
} else {
CreateEzloHint(TEXT_INDEX(TEXT_EZLO, 0x65), 0);
}
ForceSetPlayerState(0x13);
ForceSetPlayerState(PL_STATE_TALKEZLO);
return TRUE;
}
if ((gPlayerState.playerInput.field_0x92 & (PLAYER_INPUT_80 | PLAYER_INPUT_8)) == 0) {
@@ -940,8 +940,8 @@ bool32 sub_080782C0(void) {
case 6:
case 9:
case 0xa:
gPlayerState.queued_action = 7;
ForceSetPlayerState(0x13);
gPlayerState.queued_action = PLAYER_08070E9C;
ForceSetPlayerState(PL_STATE_TALKEZLO);
case 3:
case 5:
case 7:
@@ -1132,7 +1132,7 @@ void SetPlayerItemGetState(Entity* item, u8 param_2, u8 param_3) {
gPlayerState.field_0x39 = param_3;
gPlayerState.field_0x3a = 0;
gPlayerState.queued_action = PLAYER_ITEMGET;
gPlayerState.framestate = 0x15;
gPlayerState.framestate = PL_STATE_ITEMGET;
gPlayerState.swim_state = 0;
gPlayerState.field_0x14 = 1;
gPlayerEntity.child = item;
@@ -1147,13 +1147,13 @@ void sub_08078B48(void) {
gPlayerState.field_0xa |= 0x80;
gPlayerState.field_0x27[0] = 2;
switch (gPlayerState.framestate) {
case 4:
case 5:
case 0x19:
case 0x1a:
case 0x1d:
case PL_STATE_HOLD:
case PL_STATE_THROW:
case PL_STATE_PUSH:
case PL_STATE_PULL:
case PL_STATE_1D:
break;
case 9:
case PL_STATE_ROLL:
gPlayerState.flags &= ~PL_ROLLING;
// fallthrough
default:
@@ -1183,7 +1183,7 @@ void ClearPlayerState(void) {
gPlayerState.queued_action = PLAYER_INIT;
gPlayerState.field_0xd = 0;
gPlayerState.field_0xe = 0;
gPlayerState.field_0x11 = 0;
gPlayerState.surfacePositionSameTimer = 0;
gPlayerState.floor_type = SURFACE_NORMAL;
gPlayerState.floor_type_last = SURFACE_NORMAL;
gPlayerState.field_0x14 = 0;
@@ -1260,12 +1260,12 @@ void ResetPlayerPosition(void) {
}
bool32 CheckQueuedAction(void) {
if (gPlayerState.queued_action == 0) {
if (gPlayerState.queued_action == PLAYER_INIT) {
return FALSE;
} else {
gPlayerEntity.action = gPlayerState.queued_action;
gPlayerEntity.subAction = 0;
gPlayerState.queued_action = 0;
gPlayerState.queued_action = PLAYER_INIT;
DoPlayerAction(&gPlayerEntity);
return TRUE;
}
@@ -1398,7 +1398,7 @@ void sub_080790E4(Entity* this) {
gPlayerState.pushedObject--;
}
gPlayerState.field_0x35 = this->animationState;
gPlayerState.framestate = 0x19;
gPlayerState.framestate = PL_STATE_PUSH;
if ((gPlayerState.flags & PL_NO_CAP) != 0) {
gPlayerState.animation = 0x93c;
} else {
@@ -1460,7 +1460,7 @@ void PlayerMinishSetNormalAndCollide(void) {
gPlayerState.flags &=
~(PL_BUSY | PL_DROWNING | PL_DISABLE_ITEMS | PL_IN_HOLE | PL_MOLDWORM_RELEASED | PL_PARACHUTE);
gPlayerState.swim_state = 0;
gPlayerState.queued_action = 0;
gPlayerState.queued_action = PLAYER_INIT;
SetDefaultPriorityForKind(&gPlayerEntity);
}
@@ -1551,7 +1551,7 @@ u32 sub_0807953C(void) {
ASM_FUNC("asm/non_matching/playerUtils/sub_08079550.inc", u32 sub_08079550(void))
void sub_08079708(Entity* this) {
gPlayerState.framestate = 0x12;
gPlayerState.framestate = PL_STATE_DIE;
gPlayerState.field_0x3c = 0xff;
this->flags &= ~ENT_COLLIDE;
this->action = 0xa;
@@ -1812,7 +1812,7 @@ void sub_08079D84(void) {
}
void sub_08079DCC(void) {
if (gPlayerEntity.action == 1) {
if (gPlayerEntity.action == PLAYER_NORMAL) {
gPlayerState.field_0x38 = 0xa0;
gPlayerState.field_0x39 = 3;
gPlayerState.field_0x3a = 0;
@@ -1984,7 +1984,7 @@ void DeleteClones(void) {
gPlayerClones[1] = NULL;
gPlayerClones[2] = NULL;
gPlayerState.flags &= ~PL_CLONING;
if (((gPlayerEntity.action != 0x17) || (gPlayerState.chargeState.action != 4)) &&
if (((gPlayerEntity.action != PLAYER_ROOMTRANSITION) || (gPlayerState.chargeState.action != 4)) &&
(gPlayerState.chargeState.action == 4 || gPlayerState.chargeState.action == 5)) {
gPlayerState.chargeState.action = 1;
}
@@ -2014,19 +2014,19 @@ SurfaceType GetSurfaceCalcType(Entity* param_1, s32 x, s32 y) {
u32 position = TILE(param_1->x.HALF.HI + (u32)x, param_1->y.HALF.HI + y);
u32 tileType = GetTileTypeByPos(param_1->x.HALF.HI + x, param_1->y.HALF.HI + y, gPlayerEntity.collisionLayer);
if (tileType != gPlayerState.tileType) {
gPlayerState.field_0x37 = 0;
gPlayerState.surfaceTimer = 0;
}
if ((tileType != gPlayerState.tileType) || (position != gPlayerState.tilePosition)) {
gPlayerState.tilePosition = position;
gPlayerState.tileType = tileType;
gPlayerState.field_0x11 = 0;
gPlayerState.surfacePositionSameTimer = 0;
}
if (gPlayerState.field_0x11 != 0xff) {
gPlayerState.field_0x11++;
if (gPlayerState.surfacePositionSameTimer != 0xff) {
gPlayerState.surfacePositionSameTimer++;
}
if (gPlayerState.field_0x37 != 0xff) {
gPlayerState.field_0x37++;
if (gPlayerState.surfaceTimer != 0xff) {
gPlayerState.surfaceTimer++;
}
gPlayerState.floor_type_last = gPlayerState.floor_type;
tileType = GetRelativeCollisionTile(param_1, x, y);
@@ -2190,7 +2190,7 @@ void sub_0807AB44(Entity* this, s32 xOffset, s32 yOffset) {
}
bool32 sub_0807AC54(Entity* this) {
if (gPlayerState.field_0x11 == 0) {
if (gPlayerState.surfacePositionSameTimer == 0) {
return FALSE;
}
+1 -1
View File
@@ -34,7 +34,7 @@ void sub_080AB074(Entity* this) {
this->frameIndex = 0;
this->spritePriority.b0 = 3;
}
sub_0806FA90(this->parent, this, 0, 0xfffffff6 + -(s8)parent->field_0x7c.BYTES.byte3);
sub_0806FA90(this->parent, this, 0, -10 + -(s8)parent->field_0x7c.BYTES.byte3);
this->x.WORD += gSineTable[parent->field_0x7c.BYTES.byte0] * (parent->field_0x7c.BYTES.byte2 << 8);
this->y.WORD -= gSineTable[parent->field_0x7c.BYTES.byte0 + 0x40] * (parent->field_0x7c.BYTES.byte2 << 8);
+1 -1
View File
@@ -34,7 +34,7 @@ void sub_080AB544(Entity* this) {
void CannonballProjectile_Init(Entity* this) {
this->action = 1;
this->direction = this->type << 3;
this->z.HALF.HI = 0xfffc;
this->z.HALF.HI = -4;
InitializeAnimation(this, this->type);
}

Some files were not shown because too many files have changed in this diff Show More