diff options
| author | Tal Hayon <talhayon1@gmail.com> | 2022-07-25 19:38:22 +0300 |
|---|---|---|
| committer | Tal Hayon <talhayon1@gmail.com> | 2022-07-27 07:34:59 +0300 |
| commit | c0014dbcf62a7d0ffd282e8747bc2ab495378443 (patch) | |
| tree | 424eaeed4dfc45296864596281cc5509693834f1 /src | |
| parent | 28aa81248455d1d4238b99b217abbfd9e510214c (diff) | |
Match sub_0802D33C
Diffstat (limited to 'src')
| -rw-r--r-- | src/enemy/gleerok.c | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/src/enemy/gleerok.c b/src/enemy/gleerok.c index 1cc2aaa0..7f34d511 100644 --- a/src/enemy/gleerok.c +++ b/src/enemy/gleerok.c @@ -223,28 +223,21 @@ void sub_0802D258(GleerokEntity* this) { sub_0802E768(this->unk_84); } -NONMATCH("asm/non_matching/gleerok/sub_0802D33C.inc", void sub_0802D33C(GleerokEntity* this)) { - u8* unk_84 = (u8*)this->unk_84; - u8* ptr = unk_84; - u8* ptr2; - u32 i = 0; - ptr += 0x3c; - ptr2 = ptr; - - do { - DeleteEntity(*(Entity**)ptr); - ptr += 4; - } while (i < 4); - - ptr2 += (i << 2); - *(u32*)((*(u8**)ptr2) + 0x45) = 0; - *((*(u8**)ptr2) + 0x6d) |= 1; - ((Entity*)(*(u8**)(unk_84 + 0x50)))->health = 0; - ((Entity*)(*(u8**)(unk_84 + 0x50)))->type2 = 0; - ((Entity*)(*(u8**)(unk_84 + 0x50)))->spriteSettings.draw &= ~1; +void sub_0802D33C(GleerokEntity* this) { + Gleerok_HeapStruct* unk_84 = this->unk_84; + u32 i; + + for (i = 0; i < 4; i++) { + DeleteEntity(unk_84->entities[i]); + } + + unk_84->entities[i]->health = 0; + ((GenericEntity*)unk_84->entities[i])->field_0x6c.HALF.HI |= 1; + unk_84->ent2->health = 0; + unk_84->ent2->type2 = 0; + unk_84->ent2->spriteSettings.draw &= ~1; DeleteThisEntity(); } -END_NONMATCH void Gleerok_OnTick(GleerokEntity* this) { gUnk_080CD7B8[super->action](this); |
