diff --git a/include/entity.h b/include/entity.h index fbf048d3..0304f396 100644 --- a/include/entity.h +++ b/include/entity.h @@ -44,12 +44,12 @@ typedef struct Entity { /*0x18*/ union { /* */ u8 raw; /* */ struct { - /* */ u8 draw : 2; // 1-2 - /* */ u8 ss2 : 1; // 4 - /* */ u8 ss3 : 1; // 8 - /* */ u8 shadow : 2; //0x10-0x20 - /* */ u8 flipX : 1; //0x40 - /* */ u8 flipY : 1; //0x80 + /* */ u32 draw : 2; // 1-2 + /* */ u32 ss2 : 1; // 4 + /* */ u32 ss3 : 1; // 8 + /* */ u32 shadow : 2; //0x10-0x20 + /* */ u32 flipX : 1; //0x40 + /* */ u32 flipY : 1; //0x80 /* */ } PACKED b; /* */ } PACKED spriteSettings; /*0x19*/ struct { diff --git a/src/enemy/acroBandits.c b/src/enemy/acroBandits.c index 2d767f8a..98e6f254 100644 --- a/src/enemy/acroBandits.c +++ b/src/enemy/acroBandits.c @@ -411,9 +411,9 @@ void sub_08032008(Entity* this) { } } - if (this->direction & 0xf) { - this->spriteSettings.b.flipX = !(!(this->direction & 0x10) ^ 1); - } + if (this->direction & 0xf) + this->spriteSettings.b.flipX = (this->direction >> 4 ^ 1); + sub_080AEF88(this); } else { diff --git a/src/enemy/peahat.c b/src/enemy/peahat.c index a7480914..728a7837 100644 --- a/src/enemy/peahat.c +++ b/src/enemy/peahat.c @@ -326,19 +326,7 @@ void sub_08020590(Entity* this) { DeleteEntity(this); } else { if (this->actionDelay < 60) -#if NON_MATCHING this->spriteSettings.b.draw ^= 1; -#else - asm("ldrb r2, [r4, #0x18]\n\ - lsl r1, r2, #0x1e\n\ - lsr r1, r1, #0x1e\n\ - mov r0, #1\n\ - eor r1, r0\n\ - sub r0, #5\n\ - and r0, r2\n\ - orr r0, r1\n\ - strb r0, [r4, #0x18]"); -#endif this->height.WORD -= 0xc000; sub_0806F69C(this);