diff options
| author | Behemoth <Luisscheurenbrand@gmail.com> | 2020-08-25 17:38:00 +0200 |
|---|---|---|
| committer | Behemoth <Luisscheurenbrand@gmail.com> | 2020-08-25 17:38:00 +0200 |
| commit | f94263db8ee202fccbbb8677a71bea9701d15f5a (patch) | |
| tree | ff2bdc57fecf267e40390bc1413bf8cf0f26fa55 /src | |
| parent | b4551507b81d57080dfe3bc988a4c7f4df083625 (diff) | |
match non-matching acroBandits functions
Diffstat (limited to 'src')
| -rw-r--r-- | src/enemy/acroBandits.c | 43 |
1 files changed, 13 insertions, 30 deletions
diff --git a/src/enemy/acroBandits.c b/src/enemy/acroBandits.c index 7289d3a7..e3c3d9be 100644 --- a/src/enemy/acroBandits.c +++ b/src/enemy/acroBandits.c @@ -29,7 +29,7 @@ extern void (*const gUnk_080CE58C[])(Entity*); extern void (*const gUnk_080CE5C8[])(Entity*); extern u8 gUnk_080CE5B0[8]; extern u8 gUnk_080CE5B8[8]; -extern union SplitHWord gUnk_080CE5C0[4]; +extern s8 gUnk_080CE5C0[8]; extern u16 gUnk_080CE5F0[5]; extern u8 gUnk_080CE5FA[20]; // Directions @@ -209,15 +209,14 @@ void sub_08031C1C(Entity* this) { } } -#if NON_MATCHING + void sub_08031C58(Entity* this) { - u8 tmp; Entity *a, *b; GetNextFrame(this); if (this->frames.b.f3) { if (gEntCount < 0x43) { - tmp = Random(); + u32 tmp = Random(); tmp &= 3; a = CreateEnemy(0x2e, 1); @@ -225,30 +224,30 @@ void sub_08031C58(Entity* this) { a->parent = NULL; a->field_0x74.HALF.LO = tmp; sub_08031E48(this, a); + a->attachedEntity = CreateEnemy(0x2e, 1); - b = CreateEnemy(0x2e, 1); - a->attachedEntity = b; + b = a->attachedEntity; b->entityType.parameter = 1; b->parent = a; b->field_0x74.HALF.LO = tmp; sub_08031E48(this, b); + b->attachedEntity = CreateEnemy(0x2e, 1); - a = CreateEnemy(0x2e, 1); - b->attachedEntity = a; + a = b->attachedEntity; a->entityType.parameter = 2; a->parent = b; a->field_0x74.HALF.LO = tmp; sub_08031E48(this, a); + a->attachedEntity = CreateEnemy(0x2e, 1); - b = CreateEnemy(0x2e, 1); - a->attachedEntity = b; + b = a->attachedEntity; b->entityType.parameter = 3; b->parent = a; b->field_0x74.HALF.LO = tmp; sub_08031E48(this, b); + b->attachedEntity = CreateEnemy(0x2e, 1); - a = CreateEnemy(0x2e, 1); - b->attachedEntity = a; + a = b->attachedEntity; a->entityType.parameter = 4; a->parent = b; a->attachedEntity = NULL; @@ -267,12 +266,6 @@ void sub_08031C58(Entity* this) { } } } -#else -NAKED -void sub_08031C58(Entity* this) { - asm(".include \"asm/non_matching/acroBandits/sub_08031C58.inc\""); -} -#endif void sub_08031D70(Entity* this) { GetNextFrame(this); @@ -308,27 +301,17 @@ void sub_08031DC4(Entity* this) { } } -#if NON_MATCHING u32 sub_08031E04(Entity* this) { Entity* ent; - union SplitHWord* tmp; - int x, y; + s8* tmp; ent = sub_08049DF4(1); if (ent == NULL) return 0; tmp = &gUnk_080CE5C0[this->frames.all & 6]; - x = ent->x.HALF.HI + tmp->HALF.LO; - y = ent->y.HALF.HI + tmp->HALF.HI; - return sub_0806FCB8(this, x, y, 0x50); -} -#else -NAKED -u32 sub_08031E04(Entity* this) { - asm(".include \"asm/non_matching/acroBandits/sub_08031E04.inc\""); + return sub_0806FCB8(this, ent->x.HALF.HI + tmp[0], ent->y.HALF.HI + tmp[1], 0x50); } -#endif void sub_08031E48(Entity* this, Entity* child) { CopyPosition(this, child); |
