Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

found more anims, also removing != 0 sometimes #631

Merged
merged 1 commit into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions include/player.h
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,12 @@ typedef enum {
ANIM_PARACHUTE = 0x708,
ANIM_MINECART_PAUSE = 0x70c,
ANIM_MINECART = 0x710,
ANIM_PARACHUTE_TURN_RIGHT = 0x714,
ANIM_PARACHUTE_TURN_OPPOSITE = 0x718,
ANIM_PARACHUTE_TURN_LEFT = 0x71c,
ANIM_PARACHUTE_TURN2_RIGHT = 0x720,
ANIM_PARACHUTE_TURN2_OPPOSITE = 0x724,
ANIM_PARACHUTE_TURN2_LEFT = 0x728,
ANIM_DROWN = 0x72c,
ANIM_PARACHUTE_FALL = 0x730,
ANIM_PUT_ON_EZLO = 0x734,
Expand Down
4 changes: 2 additions & 2 deletions src/beanstalkSubtask.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,10 +306,10 @@ u32 UpdatePlayerCollision(void) {
case 0x3a:
case 0x5b:
case 0x4051:
if ((gPlayerState.flags & PL_MINISH) != 0) {
if (gPlayerState.flags & PL_MINISH) {
return 0;
}
if (gPlayerEntity.animationState != 0) {
if (gPlayerEntity.animationState != IdleNorth) {
return 0;
}
gUnk_0200AF00.rActionInteractTile = R_ACTION_READ;
Expand Down
34 changes: 17 additions & 17 deletions src/player.c
Original file line number Diff line number Diff line change
Expand Up @@ -2804,13 +2804,13 @@ static void sub_08073584(Entity* this) {
if (!this->field_0x86.HALF.HI ||
((gPlayerState.direction & DIR_NOT_MOVING_CHECK) == 0 && this->animationState != state)) {
static const u16 sAnims1[] = {
0x0708,
0x071C,
0x0718,
0x0714,
ANIM_PARACHUTE,
ANIM_PARACHUTE_TURN_LEFT,
ANIM_PARACHUTE_TURN_OPPOSITE,
ANIM_PARACHUTE_TURN_RIGHT,
};

if ((gPlayerState.direction & DIR_NOT_MOVING_CHECK) == 0) {
if (!(gPlayerState.direction & DIR_NOT_MOVING_CHECK)) {
if (this->animationState != state) {
if (this->animationState == (state ^ 4)) {
idx = 2;
Expand All @@ -2836,10 +2836,10 @@ static void sub_08073584(Entity* this) {
this->field_0x86.HALF.LO = idx;
} else {
static const u16 sAnims2[] = {
0x0708,
0x0728,
0x0724,
0x0720,
ANIM_PARACHUTE,
ANIM_PARACHUTE_TURN2_LEFT,
ANIM_PARACHUTE_TURN2_OPPOSITE,
ANIM_PARACHUTE_TURN2_RIGHT,
};

this->field_0x86.HALF.HI--;
Expand Down Expand Up @@ -2887,10 +2887,10 @@ static void sub_080737BC(Entity* this) {

static void sub_0807380C(Entity* this) {
static const u16 sAnims[] = {
0x0708,
0x071C,
0x0718,
0x0714,
ANIM_PARACHUTE,
ANIM_PARACHUTE_TURN_LEFT,
ANIM_PARACHUTE_TURN_OPPOSITE,
ANIM_PARACHUTE_TURN_RIGHT,
};

if ((gRoomTransition.frameCount & 3) == 0) {
Expand All @@ -2913,10 +2913,10 @@ static void sub_0807380C(Entity* this) {

void sub_08073884(Entity* this) {
static const u16 sAnims[] = {
0x0708,
0x071C,
0x0718,
0x0714,
ANIM_PARACHUTE,
ANIM_PARACHUTE_TURN_LEFT,
ANIM_PARACHUTE_TURN_OPPOSITE,
ANIM_PARACHUTE_TURN_RIGHT,
};

if ((gRoomTransition.frameCount & 1) == 0) {
Expand Down
Loading
Loading