summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorReinmmar <herwig.orlich@gmail.com>2023-09-20 16:45:23 +0200
committerReinmmar <herwig.orlich@gmail.com>2023-09-20 16:45:23 +0200
commitbdfaa7dc1a6fb95db00fe5029e505ffe98efed1d (patch)
tree9e829fa216c05c1bf8cab3d6a127076e482356c0 /src
parent4a1bbf3dd8b74756e94fe4a54b718212780467ae (diff)
found another place where animations hid
Diffstat (limited to 'src')
-rw-r--r--src/enemy/businessScrubPrologue.c2
-rw-r--r--src/enemy/enemy4D.c2
-rw-r--r--src/enemy/eyegore.c8
-rw-r--r--src/enemy/gyorgMale.c4
-rw-r--r--src/itemDefinitions.c46
-rw-r--r--src/object/fileScreenObjects.c18
-rw-r--r--src/player.c6
-rw-r--r--src/playerItem.c2
-rw-r--r--src/playerUtils.c1
9 files changed, 45 insertions, 44 deletions
diff --git a/src/enemy/businessScrubPrologue.c b/src/enemy/businessScrubPrologue.c
index aeaa5f6f..657d9d0b 100644
--- a/src/enemy/businessScrubPrologue.c
+++ b/src/enemy/businessScrubPrologue.c
@@ -66,7 +66,7 @@ void sub_08045C3C(BusinessScrubPrologueEntity* this) {
super->subtimer = 0;
this->unk_78 = super->x.HALF.HI;
this->unk_7a = super->y.HALF.HI;
- super->animationState = 0;
+ super->animationState = IdleNorth;
super->direction = 0x10;
super->action = 5;
super->timer = 120;
diff --git a/src/enemy/enemy4D.c b/src/enemy/enemy4D.c
index 7e0ee931..9fe5532b 100644
--- a/src/enemy/enemy4D.c
+++ b/src/enemy/enemy4D.c
@@ -108,7 +108,7 @@ void Enemy4D_Init(Enemy4DEntity* this) {
super->child = projectile;
COLLISION_ON(super);
super->spriteSettings.draw = TRUE;
- super->animationState = 2;
+ super->animationState = IdleEast;
this->unk_7b = 0;
this->unk_7c = 0;
this->unk_7e = 0x28;
diff --git a/src/enemy/eyegore.c b/src/enemy/eyegore.c
index f0c8efd5..1409dd50 100644
--- a/src/enemy/eyegore.c
+++ b/src/enemy/eyegore.c
@@ -146,7 +146,7 @@ void Eyegore_OnGrabbed(EyegoreEntity* this) {
void Eyegore_Init(EyegoreEntity* this) {
sub_0804A720(super);
super->action = 1;
- super->animationState = 2;
+ super->animationState = IdleEast;
super->x.HALF.HI &= 0xfff0;
super->y.HALF.HI = (super->y.HALF.HI & 0xfff0) + 0xc;
this->unk_6d |= 8;
@@ -198,7 +198,7 @@ void Eyegore_Action3(EyegoreEntity* this) {
GetNextFrame(super);
if ((super->frame & ANIM_DONE) != 0) {
super->flags |= ENT_COLLIDE;
- super->animationState = 2;
+ super->animationState = IdleEast;
sub_08030E58(this);
InitializeAnimation(super, 2);
sub_08030FB4(this);
@@ -242,7 +242,7 @@ void Eyegore_Action5(EyegoreEntity* this) {
GetNextFrame(super);
switch (super->frame & 7) {
case 1:
- if (super->animationState != 2) {
+ if (super->animationState != IdleEast) {
if (super->animationState >= 3) {
this->unk_7f = (super->animationState - 1) & 3;
} else {
@@ -266,7 +266,7 @@ void Eyegore_Action5(EyegoreEntity* this) {
if (sub_08049FDC(super, 1)) {
sub_08030E58(this);
} else {
- if (super->animationState == 2) {
+ if (super->animationState == IdleEast) {
super->action = 6;
super->flags &= ~ENT_COLLIDE;
InitializeAnimation(super, 0xe);
diff --git a/src/enemy/gyorgMale.c b/src/enemy/gyorgMale.c
index 20f09035..275d0ab1 100644
--- a/src/enemy/gyorgMale.c
+++ b/src/enemy/gyorgMale.c
@@ -164,8 +164,8 @@ void sub_08046930(GyorgMaleEntity* this) {
return;
super->subAction = 1;
super->timer = 1;
- super->animationState = 0;
- super->direction = 0;
+ super->animationState = IdleNorth;
+ super->direction = IdleNorth;
#ifdef EU
super->speed = 0x200;
#else
diff --git a/src/itemDefinitions.c b/src/itemDefinitions.c
index c6a8567b..0550f3e9 100644
--- a/src/itemDefinitions.c
+++ b/src/itemDefinitions.c
@@ -4,38 +4,38 @@
const ItemDefinition gItemDefinitions[] = {
[ITEM_NONE] = { TRUE, 1, CREATE_ITEM_0, PLAYER_ITEM_NONE, 0, 0, FALSE, FALSE },
- [ITEM_SMITH_SWORD] = { TRUE, 7, CREATE_ITEM_3, PLAYER_ITEM_SWORD, 264, 6, TRUE, TRUE },
- [ITEM_GREEN_SWORD] = { TRUE, 7, CREATE_ITEM_3, PLAYER_ITEM_SWORD, 264, 6, TRUE, TRUE },
- [ITEM_RED_SWORD] = { TRUE, 7, CREATE_ITEM_3, PLAYER_ITEM_SWORD, 264, 6, TRUE, TRUE },
- [ITEM_BLUE_SWORD] = { TRUE, 7, CREATE_ITEM_3, PLAYER_ITEM_SWORD, 264, 6, TRUE, TRUE },
- [ITEM_UNUSED_SWORD] = { TRUE, 7, CREATE_ITEM_3, PLAYER_ITEM_SWORD, 264, 6, TRUE, TRUE },
- [ITEM_FOURSWORD] = { TRUE, 7, CREATE_ITEM_3, PLAYER_ITEM_SWORD, 264, 6, TRUE, TRUE },
+ [ITEM_SMITH_SWORD] = { TRUE, 7, CREATE_ITEM_3, PLAYER_ITEM_SWORD, ANIM_SWORD, 6, TRUE, TRUE },
+ [ITEM_GREEN_SWORD] = { TRUE, 7, CREATE_ITEM_3, PLAYER_ITEM_SWORD, ANIM_SWORD, 6, TRUE, TRUE },
+ [ITEM_RED_SWORD] = { TRUE, 7, CREATE_ITEM_3, PLAYER_ITEM_SWORD, ANIM_SWORD, 6, TRUE, TRUE },
+ [ITEM_BLUE_SWORD] = { TRUE, 7, CREATE_ITEM_3, PLAYER_ITEM_SWORD, ANIM_SWORD, 6, TRUE, TRUE },
+ [ITEM_UNUSED_SWORD] = { TRUE, 7, CREATE_ITEM_3, PLAYER_ITEM_SWORD, ANIM_SWORD, 6, TRUE, TRUE },
+ [ITEM_FOURSWORD] = { TRUE, 7, CREATE_ITEM_3, PLAYER_ITEM_SWORD, ANIM_SWORD, 6, TRUE, TRUE },
[ITEM_BOMBS] = { TRUE, 3, CREATE_ITEM_4, PLAYER_ITEM_BOMB, 0, 3, FALSE, FALSE },
[ITEM_REMOTE_BOMBS] = { TRUE, 3, CREATE_ITEM_4, PLAYER_ITEM_BOMB, 0, 3, FALSE, FALSE },
- [ITEM_BOW] = { TRUE, 3, CREATE_ITEM_3, PLAYER_ITEM_BOW, 540, 3, FALSE, FALSE },
- [ITEM_LIGHT_ARROW] = { TRUE, 3, CREATE_ITEM_3, PLAYER_ITEM_BOW, 540, 3, FALSE, FALSE },
- [ITEM_BOOMERANG] = { TRUE, 5, CREATE_ITEM_3, PLAYER_ITEM_BOOMERANG, 2072, 3, FALSE, FALSE },
- [ITEM_MAGIC_BOOMERANG] = { TRUE, 5, CREATE_ITEM_3, PLAYER_ITEM_BOOMERANG, 1796, 3, FALSE, FALSE },
- [ITEM_SHIELD] = { FALSE, 1, CREATE_ITEM_3, PLAYER_ITEM_SHIELD, 344, 2, FALSE, FALSE },
- [ITEM_MIRROR_SHIELD] = { TRUE, 1, CREATE_ITEM_3, PLAYER_ITEM_SHIELD, 344, 2, FALSE, FALSE },
+ [ITEM_BOW] = { TRUE, 3, CREATE_ITEM_3, PLAYER_ITEM_BOW, ANIM_BOW_PULLOUT, 3, FALSE, FALSE },
+ [ITEM_LIGHT_ARROW] = { TRUE, 3, CREATE_ITEM_3, PLAYER_ITEM_BOW, ANIM_BOW_PULLOUT, 3, FALSE, FALSE },
+ [ITEM_BOOMERANG] = { TRUE, 5, CREATE_ITEM_3, PLAYER_ITEM_BOOMERANG, ANIM_BOOMERANG, 3, FALSE, FALSE },
+ [ITEM_MAGIC_BOOMERANG] = { TRUE, 5, CREATE_ITEM_3, PLAYER_ITEM_BOOMERANG, ANIM_BOOMERANG_MAGIC, 3, FALSE, FALSE },
+ [ITEM_SHIELD] = { FALSE, 1, CREATE_ITEM_3, PLAYER_ITEM_SHIELD, ANIM_SHIELD_PULLOUT, 2, FALSE, FALSE },
+ [ITEM_MIRROR_SHIELD] = { TRUE, 1, CREATE_ITEM_3, PLAYER_ITEM_SHIELD, ANIM_SHIELD_PULLOUT, 2, FALSE, FALSE },
#ifdef EU
- [ITEM_LANTERN_OFF] = { TRUE, 3, CREATE_ITEM_5, PLAYER_ITEM_LANTERN, 1536, 6, FALSE, FALSE },
- [ITEM_LANTERN_ON] = { TRUE, 3, CREATE_ITEM_5, PLAYER_ITEM_LANTERN, 1536, 6, FALSE, FALSE },
+ [ITEM_LANTERN_OFF] = { TRUE, 3, CREATE_ITEM_5, PLAYER_ITEM_LANTERN, ANIM_LANTERN_LIGHT, 6, FALSE, FALSE },
+ [ITEM_LANTERN_ON] = { TRUE, 3, CREATE_ITEM_5, PLAYER_ITEM_LANTERN, ANIM_LANTERN_LIGHT, 6, FALSE, FALSE },
#else
- [ITEM_LANTERN_OFF] = { TRUE, 3, CREATE_ITEM_5, PLAYER_ITEM_LANTERN, 1536, 2, FALSE, FALSE },
- [ITEM_LANTERN_ON] = { TRUE, 3, CREATE_ITEM_5, PLAYER_ITEM_LANTERN, 1536, 2, FALSE, FALSE },
+ [ITEM_LANTERN_OFF] = { TRUE, 3, CREATE_ITEM_5, PLAYER_ITEM_LANTERN, ANIM_LANTERN_LIGHT, 2, FALSE, FALSE },
+ [ITEM_LANTERN_ON] = { TRUE, 3, CREATE_ITEM_5, PLAYER_ITEM_LANTERN, ANIM_LANTERN_LIGHT, 2, FALSE, FALSE },
#endif
- [ITEM_GUST_JAR] = { TRUE, 6, CREATE_ITEM_3, PLAYER_ITEM_GUST_JAR, 1280, 2, FALSE, FALSE },
- [ITEM_PACCI_CANE] = { TRUE, 4, CREATE_ITEM_3, PLAYER_ITEM_PACCI_CANE, 1576, 6, TRUE, FALSE },
+ [ITEM_GUST_JAR] = { TRUE, 6, CREATE_ITEM_3, PLAYER_ITEM_GUST_JAR, ANIM_GUSTJAR_PULLOUT, 2, FALSE, FALSE },
+ [ITEM_PACCI_CANE] = { TRUE, 4, CREATE_ITEM_3, PLAYER_ITEM_PACCI_CANE, ANIM_CANE, 6, TRUE, FALSE },
[ITEM_MOLE_MITTS] = { TRUE, 3, CREATE_ITEM_3, PLAYER_ITEM_NONE2, 0, 2, TRUE, FALSE },
- [ITEM_ROCS_CAPE] = { TRUE, 1, CREATE_ITEM_1, PLAYER_ITEM_NONE3, 2060, 0, FALSE, FALSE },
- [ITEM_PEGASUS_BOOTS] = { TRUE, CREATE_ITEM_1, PLAYER_ITEM_SWORD, 12, 260, 6, FALSE, FALSE },
- [ITEM_FIRE_ROD] = { TRUE, 4, CREATE_ITEM_3, PLAYER_ITEM_CELL_OVERWRITE_SET, 260, 6, FALSE, FALSE },
- [ITEM_OCARINA] = { TRUE, 7, CREATE_ITEM_3, PLAYER_ITEM_NONE, 2273, 6, FALSE, FALSE },
+ [ITEM_ROCS_CAPE] = { TRUE, 1, CREATE_ITEM_1, PLAYER_ITEM_NONE3, ANIM_HOP, 0, FALSE, FALSE },
+ [ITEM_PEGASUS_BOOTS] = { TRUE, 1, CREATE_ITEM_1, PLAYER_ITEM_DASH_SWORD, ANIM_WALK, 6, FALSE, FALSE },
+ [ITEM_FIRE_ROD] = { TRUE, 4, CREATE_ITEM_3, PLAYER_ITEM_CELL_OVERWRITE_SET, ANIM_WALK, 6, FALSE, FALSE },
+ [ITEM_OCARINA] = { TRUE, 7, CREATE_ITEM_3, PLAYER_ITEM_NONE, ANIM_OCARINA, 6, FALSE, FALSE },
[ITEM_ORB_GREEN] = { TRUE, 3, CREATE_ITEM_3, PLAYER_ITEM_NULLED2, 0, 1, TRUE, TRUE },
[ITEM_ORB_BLUE] = { TRUE, 3, CREATE_ITEM_3, PLAYER_ITEM_NULLED, 0, 1, TRUE, TRUE },
[ITEM_ORB_RED] = { TRUE, 3, CREATE_ITEM_3, PLAYER_ITEM_CELL_OVERWRITE_SET2, 0, 1, TRUE, TRUE },
- [ITEM_TRY_PICKUP_OBJECT] = { TRUE, 2, CREATE_ITEM_3, PLAYER_ITEM_HELD_OBJECT, 832, 4, FALSE, TRUE },
+ [ITEM_TRY_PICKUP_OBJECT] = { TRUE, 2, CREATE_ITEM_3, PLAYER_ITEM_HELD_OBJECT, ANIM_PULL, 4, FALSE, TRUE },
[ITEM_BOTTLE1] = { TRUE, 3, CREATE_ITEM_3, PLAYER_ITEM_BOTTLE, 0, 6, TRUE, FALSE },
[ITEM_BOTTLE2] = { TRUE, 3, CREATE_ITEM_3, PLAYER_ITEM_BOTTLE, 0, 6, TRUE, FALSE },
[ITEM_BOTTLE3] = { TRUE, 3, CREATE_ITEM_3, PLAYER_ITEM_BOTTLE, 0, 6, TRUE, FALSE },
diff --git a/src/object/fileScreenObjects.c b/src/object/fileScreenObjects.c
index 0b346a52..42afe6f5 100644
--- a/src/object/fileScreenObjects.c
+++ b/src/object/fileScreenObjects.c
@@ -43,7 +43,7 @@ static void FileScreenObjects_Type15(FileScreenObjectsEntity*);
static void FileScreenObjects_Type18(FileScreenObjectsEntity*);
static void FileScreenObjects_Type19(FileScreenObjectsEntity*);
static void FileScreenObjects_Type21(FileScreenObjectsEntity*);
-static void FileScreenObjects_Type23_Action1(FileScreenObjectsEntity*);
+static void FileScreenObjects_Type23_LinkPreview(FileScreenObjectsEntity*);
static void FileScreenObjects_Type23_Init(FileScreenObjectsEntity*);
typedef struct {
@@ -86,7 +86,7 @@ void FileScreenObjects(FileScreenObjectsEntity* this) {
void FileScreenObjects_Type23(FileScreenObjectsEntity* this) {
static void (*const FileScreenObjects_Type23_Actions[])(FileScreenObjectsEntity*) = {
FileScreenObjects_Type23_Init,
- FileScreenObjects_Type23_Action1,
+ FileScreenObjects_Type23_LinkPreview,
};
FileScreenObjects_Type23_Actions[super->action](this);
}
@@ -99,7 +99,7 @@ void FileScreenObjects_Type23_Init(FileScreenObjectsEntity* this) {
super->action = 1;
}
-void FileScreenObjects_Type23_Action1(FileScreenObjectsEntity* this) {
+void FileScreenObjects_Type23_LinkPreview(FileScreenObjectsEntity* this) {
u32 var0;
u32 offset;
@@ -114,9 +114,9 @@ void FileScreenObjects_Type23_Action1(FileScreenObjectsEntity* this) {
if (super->type2 != gMapDataBottomSpecial.unk6) {
super->type2 = gMapDataBottomSpecial.unk6;
- this->unk_68 = CheckGlobalFlag(EZERO_1ST) == 0 ? 0x400 : 0x100;
+ this->unk_68 = CheckGlobalFlag(EZERO_1ST) == 0 ? ANIM_DEFAULT_NOCAP : ANIM_DEFAULT;
this->unk_70 = 4;
- super->animationState = 2;
+ super->animationState = PAS_SOUTH;
offset = gUnk_08133368[GetPlayerPalette(TRUE) - 22] & 0xFFFFFF;
LoadPalettes(&gGlobalGfxAndPalettes[offset], 31, 1);
}
@@ -125,16 +125,16 @@ void FileScreenObjects_Type23_Action1(FileScreenObjectsEntity* this) {
if (gInput.heldKeys & L_BUTTON) {
switch (gInput.newKeys) {
case DPAD_UP:
- super->animationState = 0;
+ super->animationState = PAS_NORTH;
break;
case DPAD_RIGHT:
- super->animationState = 1;
+ super->animationState = PAS_EAST;
break;
case DPAD_DOWN:
- super->animationState = 2;
+ super->animationState = PAS_SOUTH;
break;
case DPAD_LEFT:
- super->animationState = 3;
+ super->animationState = PAS_WEST;
break;
case B_BUTTON:
this->unk_70 = this->unk_70 ? 0 : 4;
diff --git a/src/player.c b/src/player.c
index 78eb6fa8..e7c5f0d1 100644
--- a/src/player.c
+++ b/src/player.c
@@ -2781,7 +2781,7 @@ static void sub_08073584(Entity* this) {
UpdatePlayerMovement();
state = 4 * this->animationState;
dir = this->direction;
- if (this->animationState == 0) {
+ if (this->animationState == IdleNorth) {
state = (state + 8) & 0x1F;
dir = (dir + 8) & (0x3 | DIR_DIAGONAL | DirectionNorth | DirectionEast | DirectionSouth | DirectionWest);
}
@@ -3811,7 +3811,7 @@ static void sub_08074C68(Entity* this) {
}
} else {
this->spriteSettings.draw = 1;
- this->animationState = 0;
+ this->animationState = IdleNorth;
this->spritePriority.b1 = 0;
this->subAction = 2;
this->field_0x68.HALF.LO = 1;
@@ -4019,7 +4019,7 @@ void sub_080750F4(Entity* this) {
void sub_08075110(Entity* this) {
this->field_0x68.HALF.LO++;
this->subtimer = this->animationState;
- this->animationState = 0;
+ this->animationState = IdleNorth;
gPlayerState.animation = ANIM_PUT_ON_EZLO;
gPlayerState.flags &= ~PL_NO_CAP;
}
diff --git a/src/playerItem.c b/src/playerItem.c
index b5248f8a..f6fbd5bf 100644
--- a/src/playerItem.c
+++ b/src/playerItem.c
@@ -105,7 +105,7 @@ void ItemInit(Entity* this) {
} else {
this->spriteVramOffset = definition->gfx & 0x3ff;
}
- if (this->animationState == 0) {
+ if (this->animationState == IdleNorth) {
this->animationState = gPlayerEntity.animationState & 6;
}
diff --git a/src/playerUtils.c b/src/playerUtils.c
index deec7e50..e707618f 100644
--- a/src/playerUtils.c
+++ b/src/playerUtils.c
@@ -1933,6 +1933,7 @@ void sub_080797EC(void) {
} else {
// Change to test animations I guess
animation = ANIM_WALK;
+ // animation = 12;
}
}
}