agbcc memes

This commit is contained in:
Behemoth 2020-08-28 14:59:49 +02:00
parent c8ca34878b
commit 224b89f6a2
3 changed files with 9 additions and 21 deletions

View File

@ -44,12 +44,12 @@ typedef struct Entity {
/*0x18*/ union { /*0x18*/ union {
/* */ u8 raw; /* */ u8 raw;
/* */ struct { /* */ struct {
/* */ u8 draw : 2; // 1-2 /* */ u32 draw : 2; // 1-2
/* */ u8 ss2 : 1; // 4 /* */ u32 ss2 : 1; // 4
/* */ u8 ss3 : 1; // 8 /* */ u32 ss3 : 1; // 8
/* */ u8 shadow : 2; //0x10-0x20 /* */ u32 shadow : 2; //0x10-0x20
/* */ u8 flipX : 1; //0x40 /* */ u32 flipX : 1; //0x40
/* */ u8 flipY : 1; //0x80 /* */ u32 flipY : 1; //0x80
/* */ } PACKED b; /* */ } PACKED b;
/* */ } PACKED spriteSettings; /* */ } PACKED spriteSettings;
/*0x19*/ struct { /*0x19*/ struct {

View File

@ -411,9 +411,9 @@ void sub_08032008(Entity* this) {
} }
} }
if (this->direction & 0xf) { if (this->direction & 0xf)
this->spriteSettings.b.flipX = !(!(this->direction & 0x10) ^ 1); this->spriteSettings.b.flipX = (this->direction >> 4 ^ 1);
}
sub_080AEF88(this); sub_080AEF88(this);
} else { } else {

View File

@ -326,19 +326,7 @@ void sub_08020590(Entity* this) {
DeleteEntity(this); DeleteEntity(this);
} else { } else {
if (this->actionDelay < 60) if (this->actionDelay < 60)
#if NON_MATCHING
this->spriteSettings.b.draw ^= 1; 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; this->height.WORD -= 0xc000;
sub_0806F69C(this); sub_0806F69C(this);