diff --git a/include/data.h b/include/data.h index 1463c90..c93537c 100644 --- a/include/data.h +++ b/include/data.h @@ -253,7 +253,7 @@ struct ObjectBase { u8 filler6[2]; u32 flags; u32 unkC; - struct Sprite unk10; + struct Sprite sprite; s8 unk38; s8 unk39; s8 unk3A; @@ -268,8 +268,8 @@ struct ObjectBase { s32 unk4C; s16 xspeed; s16 yspeed; - s8 unk54; - s8 unk55; + s8 objBase54; + s8 objBase55; u8 unk56; u8 unk57; u32 unk58; @@ -334,15 +334,15 @@ struct Object4 { s16 unk4; u16 flags; s16 unk8; - struct Sprite unkC; // ObjectBase::unk10 - s32 unk34; // ObjectBase::x - s32 unk38; // ObjectBase::y + struct Sprite sprite; + s32 x; + s32 y; s16 unk3C; s16 unk3E; - s8 unk40; // ObjectBase::unk54 - s8 unk41; // ObjectBase::unk55 + s8 objBase54; + s8 objBase55; u16 roomId; - void *unk44; // ObjectBase::parent + void *parent; }; /* size = 0x48 */ struct Object5 { diff --git a/include/object.h b/include/object.h index e2bac53..7d5152d 100644 --- a/include/object.h +++ b/include/object.h @@ -265,57 +265,56 @@ sub_0815604C(sprite); \ }) -// TODO: take struct Object4 * -#define Macro_080FC150(objBase) ({ \ +#define Macro_080FC150(objBase /* obj4 */) ({ \ s32 _r0; \ \ if ((objBase)->flags & 1) \ { \ - struct Sprite *_r0 = &(objBase)->unk10; \ + struct Sprite *_r0 = &(objBase)->sprite; \ \ - _r0->unk8 = (objBase)->unk10.unk8 | 0x400; \ + _r0->unk8 = (objBase)->sprite.unk8 | 0x400; \ } \ else \ { \ - struct Sprite *_r0 = &(objBase)->unk10; \ + struct Sprite *_r0 = &(objBase)->sprite; \ \ - _r0->unk8 = (objBase)->unk10.unk8 & ~0x400; \ + _r0->unk8 = (objBase)->sprite.unk8 & ~0x400; \ } \ if (!((objBase)->flags & 8)) \ { \ - if (((objBase)->unk10.unk1B != (objBase)->unk10.unk1A || (objBase)->unk10.unk18 != (objBase)->unk10.unkC) \ - && (objBase)->unk10.unk1C) \ + if (((objBase)->sprite.unk1B != (objBase)->sprite.unk1A || (objBase)->sprite.unk18 != (objBase)->sprite.unkC) \ + && (objBase)->sprite.unk1C) \ { \ (objBase)->unk1 = 0; \ (objBase)->unk2 = 0; \ (objBase)->flags &= ~4; \ } \ - _r0 = sub_08155128(&(objBase)->unk10); \ + _r0 = sub_08155128(&(objBase)->sprite); \ if (!_r0) \ { \ (objBase)->flags |= 2; \ - if ((objBase)->flags & 4 && (objBase)->unk10.unk1C) \ + if ((objBase)->flags & 4 && (objBase)->sprite.unk1C) \ { \ - (objBase)->unk10.unk1B = 0xFF; \ + (objBase)->sprite.unk1B = 0xFF; \ (objBase)->flags &= ~4; \ (objBase)->unk1 = 0; \ (objBase)->unk2 = _r0; \ - sub_08155128(&(objBase)->unk10); \ + sub_08155128(&(objBase)->sprite); \ } \ } \ else \ { \ - (objBase)->unk2 += (objBase)->unk10.unk1C; \ + (objBase)->unk2 += (objBase)->sprite.unk1C; \ (objBase)->unk1 = (objBase)->unk2 >> 4; \ (objBase)->flags &= ~2; \ } \ } \ - (objBase)->unk10.unk10 = ((objBase)->x >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unkC >> 8) + (objBase)->unk54; \ - (objBase)->unk10.unk12 = ((objBase)->y >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unk10 >> 8) + (objBase)->unk55; \ - if ((objBase)->unk10.unk1C) \ + (objBase)->sprite.unk10 = ((objBase)->x >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unkC >> 8) + (objBase)->objBase54; \ + (objBase)->sprite.unk12 = ((objBase)->y >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unk10 >> 8) + (objBase)->objBase55; \ + if ((objBase)->sprite.unk1C) \ { \ - (objBase)->unk54 = 0; \ - (objBase)->unk55 = 0; \ + (objBase)->objBase54 = 0; \ + (objBase)->objBase55 = 0; \ } \ }) diff --git a/src/ability_objects.c b/src/ability_objects.c index 134f625..d43a2bc 100644 --- a/src/ability_objects.c +++ b/src/ability_objects.c @@ -104,7 +104,7 @@ void *CreateAbilityStar(struct Object *arg0, u8 arg1) { gUnk_0203AD34 = 1; } ObjectInitSprite(obj); - obj->base.unk10.unk14 = 0x580; + obj->base.sprite.unk14 = 0x580; sub_080AA91C(obj); return obj; } @@ -412,13 +412,13 @@ static void sub_080A9FBC(struct Object2* arg0, s16 arg1, s16 arg2) { obj = TaskGetStructPtr(task, obj2); sub_0803E3B0(obj); obj->unk0 = 3; - obj->unk34 = arg0->base.x; - obj->unk38 = arg0->base.y; - obj->unk44 = arg0; + obj->x = arg0->base.x; + obj->y = arg0->base.y; + obj->parent = arg0; obj->roomId = arg0->base.roomId; obj->flags |= 0x4000; - obj->unk34 = arg1 * 256; - obj->unk38 = arg2 * 256; + obj->x = arg1 * 256; + obj->y = arg2 * 256; switch (arg0->subtype) { case 0: r2 = 0x600; @@ -449,17 +449,17 @@ static void sub_080A9FBC(struct Object2* arg0, s16 arg1, s16 arg2) { break; } if (gUnk_0203AD40 & 1) { - sub_080709F8(obj, &obj->unkC, 0xd, 0x2c2, 0, 0xa); + sub_080709F8(obj, &obj->sprite, 0xd, 0x2c2, 0, 0xa); } else { - sub_080709F8(obj, &obj->unkC, 0xd, 0x2c2, 1, 0xa); + sub_080709F8(obj, &obj->sprite, 0xd, 0x2c2, 1, 0xa); } } static void sub_080AA108(void) { struct Sprite sprite, *sprite2; struct Object4 *obj_2, *obj = TaskGetStructPtr(gCurTask, obj_2); - struct Object2 *obj2 = obj->unk44; + struct Object2 *obj2 = obj->parent; struct Kirby *kirby = &gKirbys[gUnk_0203AD3C]; if (obj->flags & 0x1000) { TaskDestroy(gCurTask); @@ -481,31 +481,31 @@ static void sub_080AA108(void) { KirbySomething(obj); } obj->flags |= 4; - if (obj->unk34 >= gCurLevelInfo[kirby->base.base.base.unk56].unkC - 0x1c00 - && obj->unk34 <= gCurLevelInfo[kirby->base.base.base.unk56].unkC + 0x10c00 - && obj->unk38 >= gCurLevelInfo[kirby->base.base.base.unk56].unk10 - 0x1c00 - && obj->unk38 <= gCurLevelInfo[kirby->base.base.base.unk56].unk10 + 0xbc00) { + if (obj->x >= gCurLevelInfo[kirby->base.base.base.unk56].unkC - 0x1c00 + && obj->x <= gCurLevelInfo[kirby->base.base.base.unk56].unkC + 0x10c00 + && obj->y >= gCurLevelInfo[kirby->base.base.base.unk56].unk10 - 0x1c00 + && obj->y <= gCurLevelInfo[kirby->base.base.base.unk56].unk10 + 0xbc00) { switch (obj2->object->subtype1) { case 0: - if ((obj->unk38 >> 8) < obj->unk4) { + if ((obj->y >> 8) < obj->unk4) { obj->flags |= 0x1000; return; } break; case 1: - if ((obj->unk34 >> 8) > obj->unk4) { + if ((obj->x >> 8) > obj->unk4) { obj->flags |= 0x1000; return; } break; case 2: - if ((obj->unk38 >> 8) > obj->unk4) { + if ((obj->y >> 8) > obj->unk4) { obj->flags |= 0x1000; return; } break; default: - if ((obj->unk34 >> 8) < obj->unk4) { + if ((obj->x >> 8) < obj->unk4) { goto lab; } break; @@ -516,10 +516,10 @@ static void sub_080AA108(void) { obj->flags |= 0x1000; return; } - Macro_08107BA8_4(obj, &obj->unkC, &sprite, 13, &obj->unkC); + Macro_08107BA8_4(obj, &obj->sprite, &sprite, 13, &obj->sprite); if (!(obj->flags & 0x800)) { - obj->unk34 += obj->unk3C; - obj->unk38 -= obj->unk3E; + obj->x += obj->unk3C; + obj->y -= obj->unk3E; } sub_0806FAC8(obj); } @@ -545,7 +545,7 @@ void *CreateAbilityStatue(struct Object *arg0, u8 arg1) { sub_0803E2B0(&obj->base, -4, -4, 4, 8); sub_0803E308(&obj->base, -4, -4, 4, 8); ObjectInitSprite(obj); - obj->base.unk10.unk14 = 0x780; + obj->base.sprite.unk14 = 0x780; if (obj->object->subtype2 != 0) { obj->base.flags |= 1; } diff --git a/src/big_waddle_dee.c b/src/big_waddle_dee.c index 3b9db3d..c74fcef 100644 --- a/src/big_waddle_dee.c +++ b/src/big_waddle_dee.c @@ -30,7 +30,7 @@ void* CreateBigWaddleDee(struct Object* arg0, u8 arg1) { obj->base.flags |= 1; } ObjectInitSprite(obj); - obj->base.unk10.unk14 = 0x6c0; + obj->base.sprite.unk14 = 0x6c0; switch (arg0->subtype1) { default: case 0: diff --git a/src/blockin.c b/src/blockin.c index e96dc54..30c5db6 100644 --- a/src/blockin.c +++ b/src/blockin.c @@ -19,7 +19,7 @@ void* CreateBlockin(struct Object* arg0, u8 arg1) { sub_0803E2B0(&obj->base, -5, -5, 5, 4); sub_0803E308(&obj->base, -6, -10, 6, 7); ObjectInitSprite(obj); - obj->base.unk10.unk14 = 0x700; + obj->base.sprite.unk14 = 0x700; gUnk_08351648[obj->type].unk10(obj); obj->unk9E = 0; obj->unk7C = 0; @@ -62,12 +62,12 @@ static void sub_080A47C8(struct Object2* arg0) { } else { if (arg0->base.counter <= 0x13) { - arg0->base.unk54 = gUnk_08350BCC[arg0->base.counter][0]; - arg0->base.unk55 = gUnk_08350BCC[arg0->base.counter][1]; + arg0->base.objBase54 = gUnk_08350BCC[arg0->base.counter][0]; + arg0->base.objBase55 = gUnk_08350BCC[arg0->base.counter][1]; } else if (arg0->base.counter <= 0x21) { - arg0->base.unk54 = gUnk_08350BB0[(arg0->base.counter - 0x14)][0]; - arg0->base.unk55 = gUnk_08350BB0[(arg0->base.counter - 0x14)][1]; + arg0->base.objBase54 = gUnk_08350BB0[(arg0->base.counter - 0x14)][0]; + arg0->base.objBase55 = gUnk_08350BB0[(arg0->base.counter - 0x14)][1]; } arg0->base.counter++; } diff --git a/src/bonkers.c b/src/bonkers.c index dccbf5e..754fa4b 100644 --- a/src/bonkers.c +++ b/src/bonkers.c @@ -52,7 +52,7 @@ void *CreateBonkers(struct Object *arg0, u8 arg1) { sub_0803E2B0(&obj->base, -10, -22, 16, 10); sub_0803E308(&obj->base, -12, -24, 20, 10); ObjectInitSprite(obj); - obj->base.unk10.unk14 = 0x6c0; + obj->base.sprite.unk14 = 0x6c0; obj->unk9E = 0; obj->unk7C = sub_0809EF88; sub_080D1488(obj); diff --git a/src/bonus.c b/src/bonus.c index 2bb4822..91ee79f 100644 --- a/src/bonus.c +++ b/src/bonus.c @@ -38,7 +38,7 @@ void* CreateBonus(struct Object* arg0, u8 arg1) { obj->base.unk4C = obj->base.y; } ObjectInitSprite(obj); - obj->base.unk10.unk14 = 0x700; + obj->base.sprite.unk14 = 0x700; if (obj->type == OBJ_SMALL_FOOD) { obj->unk83 = obj->object->subtype1; } diff --git a/src/code_080023A4.c b/src/code_080023A4.c index 5866407..8b76eea 100644 --- a/src/code_080023A4.c +++ b/src/code_080023A4.c @@ -21,8 +21,8 @@ u32 _var2 = 0x200; \ \ if ( \ - (kirby)->base.base.base.unk10.unkC == 0x127 && \ - (kirby)->base.base.base.unk10.unk1A == 1 \ + (kirby)->base.base.base.sprite.unkC == 0x127 && \ + (kirby)->base.base.base.sprite.unk1A == 1 \ ) \ _var2 |= 2; \ \ @@ -3194,8 +3194,8 @@ static u16 sub_080072BC(struct Kirby *arg0, struct Unk_3007DE0 *arg1, u16 arg2) u32 var5 = 0x200; if ( - arg0->base.base.base.unk10.unkC == 0x127 && - arg0->base.base.base.unk10.unk1A == 1 + arg0->base.base.base.sprite.unkC == 0x127 && + arg0->base.base.base.sprite.unk1A == 1 ) var5 |= 2; @@ -3391,8 +3391,8 @@ static u16 sub_08007720(struct Kirby *arg0, struct Unk_3007DE0 *arg1, u16 arg2) u32 var5 = 0x200; if ( - arg0->base.base.base.unk10.unkC == 0x127 && - arg0->base.base.base.unk10.unk1A == 1 + arg0->base.base.base.sprite.unkC == 0x127 && + arg0->base.base.base.sprite.unk1A == 1 ) var5 |= 2; @@ -4597,7 +4597,7 @@ static u16 sub_080099C4(struct Kirby *arg0, struct Unk_3007DE0 *arg1, u16 arg2) case 0x50: { u8 uVar2; - if (arg0->base.base.base.unk10.unkC == 0x127 && arg0->base.base.base.unk10.unk1A == 1) { + if (arg0->base.base.base.sprite.unkC == 0x127 && arg0->base.base.base.sprite.unk1A == 1) { uVar2 = sub_080023E4(arg0->base.base.base.unk56, arg1->unk1C, arg1->unk1E - 1); if ((gUnk_082D88B8[uVar2] & 0x200) == 0) { diff --git a/src/cupie.c b/src/cupie.c index 568bfac..eb70fd2 100644 --- a/src/cupie.c +++ b/src/cupie.c @@ -254,7 +254,7 @@ static void sub_080A2B6C(struct Object2* arg0) { arg0->unk9F = 0xff; } } - arg0->base.unk55 = gUnk_083533F4[arg0->base.unk1 >> 1]; + arg0->base.objBase55 = gUnk_083533F4[arg0->base.unk1 >> 1]; if (--arg0->base.counter == 0) { arg0->kirby3 = sub_0803D368(&arg0->base); if (arg0->base.x > arg0->kirby3->base.base.base.x) { @@ -312,7 +312,7 @@ static void sub_080A2E38(struct Object2* arg0) { arg0->unk9F = 0xFF; #endif } - arg0->base.unk55 = gUnk_083533F4[arg0->base.unk1 >> 1]; + arg0->base.objBase55 = gUnk_083533F4[arg0->base.unk1 >> 1]; if (--arg0->base.counter == 0) { arg0->kirby3 = sub_0803D368(&arg0->base); if (arg0->base.x > arg0->kirby3->base.base.base.x) { @@ -376,7 +376,7 @@ static void sub_080A3008(struct Object2* arg0) { #endif } } - arg0->base.unk55 = gUnk_083533F4[arg0->base.unk1 >> 1]; + arg0->base.objBase55 = gUnk_083533F4[arg0->base.unk1 >> 1]; if (--arg0->base.counter == 0) { arg0->kirby3 = sub_0803D368(&arg0->base); if (arg0->base.x > arg0->kirby3->base.base.base.x) { @@ -495,16 +495,16 @@ static void sub_080A31D8(struct Object2* arg0) { arg0->base.flags |= 0x800; } else { - arg0->base.unk55 = gUnk_083533F4[arg0->base.unk1 >> 1]; + arg0->base.objBase55 = gUnk_083533F4[arg0->base.unk1 >> 1]; } } else { - arg0->base.unk55 = gUnk_083533F4[arg0->base.unk1 >> 1]; + arg0->base.objBase55 = gUnk_083533F4[arg0->base.unk1 >> 1]; } } else { arg0->base.counter--; - arg0->base.unk55 = gUnk_083533F4[arg0->base.unk1 >> 1]; + arg0->base.objBase55 = gUnk_083533F4[arg0->base.unk1 >> 1]; } } else { @@ -600,16 +600,16 @@ static void sub_080A31D8(struct Object2* arg0) { arg0->base.flags |= 0x800; } else { - arg0->base.unk55 = gUnk_083533F4[arg0->base.unk1 >> 1]; + arg0->base.objBase55 = gUnk_083533F4[arg0->base.unk1 >> 1]; } } else { - arg0->base.unk55 = gUnk_083533F4[arg0->base.unk1 >> 1]; + arg0->base.objBase55 = gUnk_083533F4[arg0->base.unk1 >> 1]; } } else { arg0->base.counter--; - arg0->base.unk55 = gUnk_083533F4[arg0->base.unk1 >> 1]; + arg0->base.objBase55 = gUnk_083533F4[arg0->base.unk1 >> 1]; } } } @@ -702,7 +702,7 @@ static void sub_080A389C(struct Object2* arg0) { if (abs(arg0->base.xspeed) <= 0x17f) { arg0->unk83 = 4; if (arg0->base.yspeed > 0x80) { - arg0->base.unk10.unk1A = 2; + arg0->base.sprite.unk1A = 2; if (arg0->base.yspeed > 0x180) { if (arg0->base.yspeed > 0x240) { arg0->unk83 = 0; @@ -833,5 +833,5 @@ static void sub_080A3B94(struct Object2* arg0) { arg0->base.xspeed = -0x48; } arg0->base.yspeed += 8; - arg0->base.unk55 = gUnk_083533F4[arg0->base.unk1 >> 1]; + arg0->base.objBase55 = gUnk_083533F4[arg0->base.unk1 >> 1]; } diff --git a/src/dark_meta_knight.c b/src/dark_meta_knight.c index f7eaa0c..4a2aec0 100644 --- a/src/dark_meta_knight.c +++ b/src/dark_meta_knight.c @@ -204,8 +204,8 @@ void sub_080F5A6C(struct DarkMetaKnight *dmk) dmk->obj2.unk9E = 0; if (gKirbys[gUnk_0203AD3C].base.base.base.roomId == dmk->obj2.base.roomId) { - SpriteSomething(&sprite, 0x6000000, 0x394, 1, 0xFF, 0, 0, 0, 0, 0x10, dmk->obj2.base.unk10.unk1F & 0xF, 0x80000); - SpriteSomething(&sprite, 0x6000000, 0x394, 3, 0xFF, 0, 0, 0, 0, 0x10, dmk2->unkB4->unk10.unk1F & 0xF, 0x80000); + SpriteSomething(&sprite, 0x6000000, 0x394, 1, 0xFF, 0, 0, 0, 0, 0x10, dmk->obj2.base.sprite.unk1F & 0xF, 0x80000); + SpriteSomething(&sprite, 0x6000000, 0x394, 3, 0xFF, 0, 0, 0, 0, 0x10, dmk2->unkB4->sprite.unk1F & 0xF, 0x80000); } dmk->obj2.unk9F = 0x36; } @@ -343,8 +343,8 @@ void sub_080F5DA0(struct DarkMetaKnight *dmk) { if (gKirbys[gUnk_0203AD3C].base.base.base.roomId == dmk->obj2.base.roomId) { - sub_0803CD98(dmk->obj2.base.unk10.unk1F, 0x394, 1, 0x390, 0, dmk->obj2.base.counter); - sub_0803CD98(dmk2->unkB4->unk10.unk1F, 0x394, 3, 0x391, 0, dmk->obj2.base.counter); + sub_0803CD98(dmk->obj2.base.sprite.unk1F, 0x394, 1, 0x390, 0, dmk->obj2.base.counter); + sub_0803CD98(dmk2->unkB4->sprite.unk1F, 0x394, 3, 0x391, 0, dmk->obj2.base.counter); } dmk->obj2.base.counter += 2; if (dmk->obj2.base.counter > 0x100) @@ -519,8 +519,8 @@ void sub_080F6544(struct DarkMetaKnight *dmk) dmk->obj2.base.xspeed = 0; if (gKirbys[gUnk_0203AD3C].base.base.base.roomId == dmk->obj2.base.roomId) { - sub_0803CD98(dmk->obj2.base.unk10.unk1F, 0x390, 0, 0x394, 0, dmk->obj2.base.counter); - sub_0803CD98(dmk2->unkB4->unk10.unk1F, 0x391, 0, 0x394, 2, dmk->obj2.base.counter); + sub_0803CD98(dmk->obj2.base.sprite.unk1F, 0x390, 0, 0x394, 0, dmk->obj2.base.counter); + sub_0803CD98(dmk2->unkB4->sprite.unk1F, 0x391, 0, 0x394, 2, dmk->obj2.base.counter); } dmk->obj2.base.counter += 2; if (dmk->obj2.base.counter > 0x100) @@ -544,8 +544,8 @@ void sub_080F6728(struct DarkMetaKnight *dmk) dmk->obj2.unk85 = 0; if (gKirbys[gUnk_0203AD3C].base.base.base.roomId == dmk->obj2.base.roomId) { - SpriteSomething(&sprite, 0x6000000, 0x394, 0, 0xFF, 0, 0, 0, 0, 0x10, dmk->obj2.base.unk10.unk1F & 0xF, 0x80000); - SpriteSomething(&sprite, 0x6000000, 0x394, 2, 0xFF, 0, 0, 0, 0, 0x10, dmk->unkB4->unk10.unk1F & 0xF, 0x80000); + SpriteSomething(&sprite, 0x6000000, 0x394, 0, 0xFF, 0, 0, 0, 0, 0x10, dmk->obj2.base.sprite.unk1F & 0xF, 0x80000); + SpriteSomething(&sprite, 0x6000000, 0x394, 2, 0xFF, 0, 0, 0, 0, 0x10, dmk->unkB4->sprite.unk1F & 0xF, 0x80000); } } @@ -647,8 +647,8 @@ void sub_080F6AEC(struct DarkMetaKnight *dmk, u8 a2) if (dmk->unkBC) dmk->unkBC->flags |= 0x1000; if (gKirbys[gUnk_0203AD3C].base.base.base.roomId == dmk->obj2.base.roomId) { - SpriteSomething(&sprite, 0x6000000, 0x394, 0, 0xFF, 0, 0, 0, 0, 0x10, dmk->obj2.base.unk10.unk1F & 0xF, 0x80000); - SpriteSomething(&sprite, 0x6000000, 0x394, 2, 0xFF, 0, 0, 0, 0, 0x10, dmk->unkB4->unk10.unk1F & 0xF, 0x80000); + SpriteSomething(&sprite, 0x6000000, 0x394, 0, 0xFF, 0, 0, 0, 0, 0x10, dmk->obj2.base.sprite.unk1F & 0xF, 0x80000); + SpriteSomething(&sprite, 0x6000000, 0x394, 2, 0xFF, 0, 0, 0, 0, 0x10, dmk->unkB4->sprite.unk1F & 0xF, 0x80000); } dmk->obj2.base.flags |= 1; dmk->obj2.base.flags &= ~8; @@ -746,8 +746,8 @@ void sub_080F704C(struct DarkMetaKnight *dmk) dmk->obj2.unk9F = 0; if (gKirbys[gUnk_0203AD3C].base.base.base.roomId == dmk->obj2.base.roomId) { - SpriteSomething(&sprite, 0x6000000, 0x394, 1, 0xFF, 0, 0, 0, 0, 0x10, dmk->obj2.base.unk10.unk1F & 0xF, 0x80000); - SpriteSomething(&sprite, 0x6000000, 0x394, 3, 0xFF, 0, 0, 0, 0, 0x10, dmk->unkB4->unk10.unk1F & 0xF, 0x80000); + SpriteSomething(&sprite, 0x6000000, 0x394, 1, 0xFF, 0, 0, 0, 0, 0x10, dmk->obj2.base.sprite.unk1F & 0xF, 0x80000); + SpriteSomething(&sprite, 0x6000000, 0x394, 3, 0xFF, 0, 0, 0, 0, 0x10, dmk->unkB4->sprite.unk1F & 0xF, 0x80000); } } @@ -791,8 +791,8 @@ void sub_080F714C(struct DarkMetaKnight *dmk) { if (gKirbys[gUnk_0203AD3C].base.base.base.roomId == dmk->obj2.base.roomId) { - sub_0803CD98(dmk->obj2.base.unk10.unk1F, 0x394, 1, 0x390, 0, dmk->obj2.base.counter); - sub_0803CD98(dmk2->unkB4->unk10.unk1F, 0x394, 3, 0x391, 0, dmk->obj2.base.counter); + sub_0803CD98(dmk->obj2.base.sprite.unk1F, 0x394, 1, 0x390, 0, dmk->obj2.base.counter); + sub_0803CD98(dmk2->unkB4->sprite.unk1F, 0x394, 3, 0x391, 0, dmk->obj2.base.counter); } dmk->obj2.base.counter += 2; if (dmk->obj2.base.counter > 0x100) @@ -1702,8 +1702,8 @@ void sub_080F93E0(struct DarkMetaKnight *dmk) if (dmk->obj2.unk83 == 0x10) { dmk->obj2.base.yspeed = 0; - dmk->obj2.base.unk54 += 2 * (gUnk_0203AD40 & 2); - dmk->unkB4->unk54 = dmk->obj2.base.unk54; + dmk->obj2.base.objBase54 += 2 * (gUnk_0203AD40 & 2); + dmk->unkB4->objBase54 = dmk->obj2.base.objBase54; if (!--dmk->obj2.unk9E) { dmk->obj2.unk83 = 0x11; @@ -1849,8 +1849,8 @@ void sub_080F96B4(struct DarkMetaKnight *dmk) void sub_080F99BC(struct DarkMetaKnight *dmk) { dmk->obj2.base.flags |= 8; - dmk->obj2.base.unk54 += gUnk_0203AD40 & 2; - dmk->unkB4->unk54 = dmk->obj2.base.unk54; + dmk->obj2.base.objBase54 += gUnk_0203AD40 & 2; + dmk->unkB4->objBase54 = dmk->obj2.base.objBase54; if (!--dmk->obj2.base.counter) { dmk->obj2.base.flags &= ~8; @@ -2184,8 +2184,8 @@ void sub_080FA82C(struct DarkMetaKnight *dmk) dmk->obj2.unk83 = 0x1D; if (dmk->unkCA > 1) { - dmk->obj2.base.unk54 = gUnk_083571BC[(dmk->obj2.unk9F/4) & 3]; - dmk->unkB4->unk54 = dmk->obj2.base.unk54; + dmk->obj2.base.objBase54 = gUnk_083571BC[(dmk->obj2.unk9F/4) & 3]; + dmk->unkB4->objBase54 = dmk->obj2.base.objBase54; } break; case 0x1D: @@ -2212,8 +2212,8 @@ void sub_080FA82C(struct DarkMetaKnight *dmk) } if (dmk->unkCA > 1) { - dmk->obj2.base.unk54 = gUnk_083571BC[(dmk->obj2.unk9F/2) & 3]; - dmk->unkB4->unk54 = dmk->obj2.base.unk54; + dmk->obj2.base.objBase54 = gUnk_083571BC[(dmk->obj2.unk9F/2) & 3]; + dmk->unkB4->objBase54 = dmk->obj2.base.objBase54; } break; } @@ -2397,9 +2397,9 @@ void sub_080FB2CC(struct DarkMetaKnight *dmk) { if (dmk->obj2.base.counter > 3) { - dmk->obj2.base.unk54 = gUnk_083571B4[(dmk->obj2.base.counter >> 1) & 3] >> 9; + dmk->obj2.base.objBase54 = gUnk_083571B4[(dmk->obj2.base.counter >> 1) & 3] >> 9; if (dmk->obj2.base.flags & 1) - dmk->obj2.base.xspeed = -dmk->obj2.base.unk54; + dmk->obj2.base.xspeed = -dmk->obj2.base.objBase54; } if (dmk->obj2.base.unk62 & 4) { @@ -2559,8 +2559,8 @@ void sub_080FB700(struct DarkMetaKnight *dmk) { if (gKirbys[gUnk_0203AD3C].base.base.base.roomId == dmk->obj2.base.roomId) { - sub_0803CD98(dmk->obj2.base.unk10.unk1F, 0x390, 0, 0x394, 0, dmk->obj2.base.counter); - sub_0803CD98(dmk2->unkB4->unk10.unk1F, 0x391, 0, 0x394, 2, dmk->obj2.base.counter); + sub_0803CD98(dmk->obj2.base.sprite.unk1F, 0x390, 0, 0x394, 0, dmk->obj2.base.counter); + sub_0803CD98(dmk2->unkB4->sprite.unk1F, 0x391, 0, 0x394, 2, dmk->obj2.base.counter); } dmk->obj2.base.counter += 4; if (dmk->obj2.base.counter > 0x100) @@ -2656,10 +2656,10 @@ void sub_080FB9FC(struct DarkMetaKnight *dmk) } if (dmk->obj2.base.counter >= 0x90) { - dmk->obj2.base.unk54 = gUnk_083571BC[(dmk->obj2.base.counter>>2) & 3]; - dmk->obj2.base.unk55 = gUnk_083571BC[((dmk->obj2.base.counter+1)>>2) & 3]; - dmk2->unkB4->unk54 = dmk->obj2.base.unk54; - dmk2->unkB4->unk55 = dmk->obj2.base.unk55; + dmk->obj2.base.objBase54 = gUnk_083571BC[(dmk->obj2.base.counter>>2) & 3]; + dmk->obj2.base.objBase55 = gUnk_083571BC[((dmk->obj2.base.counter+1)>>2) & 3]; + dmk2->unkB4->objBase54 = dmk->obj2.base.objBase54; + dmk2->unkB4->objBase55 = dmk->obj2.base.objBase55; } if (dmk->obj2.base.counter >= 0xD0) { @@ -2725,8 +2725,8 @@ void sub_080FB9FC(struct DarkMetaKnight *dmk) { if (gKirbys[gUnk_0203AD3C].base.base.base.roomId == dmk->obj2.base.roomId) { - SpriteSomething(&sprite, 0x6000000, 0x390, 0, 0xFF, 0, 0, 0, 0, 0x10, dmk->obj2.base.unk10.unk1F & 0xF, 0x80000); - SpriteSomething(&sprite, 0x6000000, 0x391, 0, 0xFF, 0, 0, 0, 0, 0x10, dmk2->unkB4->unk10.unk1F & 0xF, 0x80000); + SpriteSomething(&sprite, 0x6000000, 0x390, 0, 0xFF, 0, 0, 0, 0, 0x10, dmk->obj2.base.sprite.unk1F & 0xF, 0x80000); + SpriteSomething(&sprite, 0x6000000, 0x391, 0, 0xFF, 0, 0, 0, 0, 0x10, dmk2->unkB4->sprite.unk1F & 0xF, 0x80000); } for (i = 0; i < gUnk_0203AD44; ++i) { @@ -2772,9 +2772,9 @@ struct ObjectBase *sub_080FBFE8(struct DarkMetaKnight *dmk) objBase->flags |= 1; sub_0803E2B0(objBase, 0, 0, 0, 0); sub_0803E308(objBase, 0, 0, 0, 0); - sub_080708DC(objBase, &objBase->unk10, 0x30, gUnk_083570EC[0].unk0, gUnk_083570EC[0].unk2, 0x1C); - objBase->unk10.unk1F = 0; - Macro_081050E8(objBase, &objBase->unk10, 0x391, 1); + sub_080708DC(objBase, &objBase->sprite, 0x30, gUnk_083570EC[0].unk0, gUnk_083570EC[0].unk2, 0x1C); + objBase->sprite.unk1F = 0; + Macro_081050E8(objBase, &objBase->sprite, 0x391, 1); return objBase; } @@ -2782,7 +2782,7 @@ void sub_080FC150(void) { struct Sprite sprite; struct ObjectBase *objBase2 = TaskGetStructPtr(gCurTask, objBase2), *objBase = objBase2; - struct Sprite *unk10 = &objBase->unk10; + struct Sprite *unk10 = &objBase->sprite; struct DarkMetaKnight *dmk = objBase->parent; if (objBase->flags & 0x1000) @@ -2805,11 +2805,11 @@ void sub_080FC150(void) objBase->y = dmk->obj2.base.y; if (Macro_0810B1F4(objBase)) { - objBase->unk54 = dmk->obj2.base.unk54; - objBase->unk55 = dmk->obj2.base.unk55; + objBase->objBase54 = dmk->obj2.base.objBase54; + objBase->objBase55 = dmk->obj2.base.objBase55; } - Macro_08107BA8_4(objBase, unk10, &sprite, 0x30, &objBase->unk10); - Macro_081050E8(objBase, &objBase->unk10, 0x391, !objBase->unk10.unk1F); + Macro_08107BA8_4(objBase, unk10, &sprite, 0x30, &objBase->sprite); + Macro_081050E8(objBase, &objBase->sprite, 0x391, !objBase->sprite.unk1F); if (unk10->unkC != gUnk_083570EC[dmk->obj2.unk83].unk0 || unk10->unk1A != gUnk_083570EC[dmk->obj2.unk83].unk2) { unk10->unkC = gUnk_083570EC[dmk->obj2.unk83].unk0; @@ -2822,13 +2822,13 @@ void sub_080FC150(void) sub_0803D9A8(objBase); return; } - if (!objBase->unk10.unk20[0].unk0) + if (!objBase->sprite.unk20[0].unk0) { objBase->flags &= ~0x200; - if (!objBase->unk10.unk16) + if (!objBase->sprite.unk16) { if (!(dmk->obj2.base.flags & 2)) - objBase->unk10.unk20[0].unk0 = -1; + objBase->sprite.unk20[0].unk0 = -1; objBase->flags |= 0x200; } } @@ -2836,14 +2836,11 @@ void sub_080FC150(void) if (!(objBase->flags & 0x400) && gKirbys[gUnk_0203AD3C].base.base.base.roomId == objBase->roomId) { - objBase->unk10.unk10 += gUnk_0203AD18[0]; - objBase->unk10.unk12 += gUnk_0203AD18[1]; - if (objBase->flags & 0x4000) - sub_081564D8(&objBase->unk10); - else - sub_0815604C(&objBase->unk10); + objBase->sprite.unk10 += gUnk_0203AD18[0]; + objBase->sprite.unk12 += gUnk_0203AD18[1]; + Macro_0803DBC8(objBase, &objBase->sprite); } - if (objBase->unk10.unk20[0].unk0 != -1) + if (objBase->sprite.unk20[0].unk0 != -1) objBase->flags &= ~0x200; SetPointerSomething(objBase); } @@ -2857,15 +2854,15 @@ struct Object4 *sub_080FC5F8(struct DarkMetaKnight *dmk) sub_0803E3B0(obj4); obj4->unk0 = 3; - obj4->unk34 = dmk->obj2.base.x; - obj4->unk38 = dmk->obj2.base.y; - obj4->unk44 = dmk; + obj4->x = dmk->obj2.base.x; + obj4->y = dmk->obj2.base.y; + obj4->parent = dmk; obj4->roomId = dmk->obj2.base.roomId; obj4->unk3C = 0x40; obj4->unk3E = -0x15; - sub_080709F8(obj4, &obj4->unkC, 0xC, 0x392, 0, 0x18); - obj4->unkC.unk1F = 0; - Macro_081050E8(obj4, &obj4->unkC, 0x390, 1); + sub_080709F8(obj4, &obj4->sprite, 0xC, 0x392, 0, 0x18); + obj4->sprite.unk1F = 0; + Macro_081050E8(obj4, &obj4->sprite, 0x390, 1); return obj4; } @@ -2877,18 +2874,18 @@ void sub_080FC6D4(void) if (obj4->flags & 0x1000) TaskDestroy(gCurTask); - else if (((struct DarkMetaKnight *)obj4->unk44)->obj2.base.flags & 0x1000) + else if (((struct DarkMetaKnight *)obj4->parent)->obj2.base.flags & 0x1000) obj4->flags |= 0x1000; else { - Macro_08107BA8_4(obj4, &obj4->unkC, &sprite, 0xC, &obj4->unkC); - Macro_081050E8(obj4, &obj4->unkC, 0x390, !obj4->unkC.unk1F); - dmk = obj4->unk44; + Macro_08107BA8_4(obj4, &obj4->sprite, &sprite, 0xC, &obj4->sprite); + Macro_081050E8(obj4, &obj4->sprite, 0x390, !obj4->sprite.unk1F); + dmk = obj4->parent; if (dmk) { if (dmk->obj2.base.unk0 && dmk->obj2.base.flags & 0x1000) { - obj4->unk44 = NULL; + obj4->parent = NULL; dmk = NULL; } if (!dmk) @@ -2912,8 +2909,8 @@ void sub_080FC6D4(void) { if (!(obj4->flags & 0x800)) { - obj4->unk34 += obj4->unk3C; - obj4->unk38 -= obj4->unk3E; + obj4->x += obj4->unk3C; + obj4->y -= obj4->unk3E; } sub_0806FAC8(obj4); } @@ -2927,20 +2924,20 @@ void sub_080FC9C8(struct DarkMetaKnight *dmk) sub_0803E3B0(obj4); obj4->unk0 = 3; - obj4->unk34 = dmk->obj2.base.x; - obj4->unk38 = dmk->obj2.base.y; - obj4->unk44 = dmk; + obj4->x = dmk->obj2.base.x; + obj4->y = dmk->obj2.base.y; + obj4->parent = dmk; obj4->roomId = dmk->obj2.base.roomId; - sub_080709F8(obj4, &obj4->unkC, 0xC, 0x392, 1, 0x19); - obj4->unkC.unk1F = 0; - Macro_081050E8(obj4, &obj4->unkC, 0x390, 1); + sub_080709F8(obj4, &obj4->sprite, 0xC, 0x392, 1, 0x19); + obj4->sprite.unk1F = 0; + Macro_081050E8(obj4, &obj4->sprite, 0x390, 1); } void sub_080FCA94(void) { struct Object4 *tmp = TaskGetStructPtr(gCurTask, tmp), *obj4 = tmp; struct Sprite sprite; - struct DarkMetaKnight *dmk, *dmk2 = obj4->unk44; + struct DarkMetaKnight *dmk, *dmk2 = obj4->parent; if (obj4->flags & 0x1000) TaskDestroy(gCurTask); @@ -2948,14 +2945,14 @@ void sub_080FCA94(void) obj4->flags |= 0x1000; else { - Macro_08107BA8_4(obj4, &obj4->unkC, &sprite, 0xC, &obj4->unkC); - Macro_081050E8(obj4, &obj4->unkC, 0x390, !obj4->unkC.unk1F); - dmk = obj4->unk44; + Macro_08107BA8_4(obj4, &obj4->sprite, &sprite, 0xC, &obj4->sprite); + Macro_081050E8(obj4, &obj4->sprite, 0x390, !obj4->sprite.unk1F); + dmk = obj4->parent; if (dmk) { if (dmk->obj2.base.unk0 && dmk->obj2.base.flags & 0x1000) { - obj4->unk44 = NULL; + obj4->parent = NULL; dmk = NULL; } if (!dmk) @@ -2983,8 +2980,8 @@ void sub_080FCA94(void) { if (!(obj4->flags & 0x800)) { - obj4->unk34 += obj4->unk3C; - obj4->unk38 -= obj4->unk3E; + obj4->x += obj4->unk3C; + obj4->y -= obj4->unk3E; } sub_0806FAC8(obj4); } @@ -2998,22 +2995,22 @@ void sub_080FCD98(struct DarkMetaKnight *dmk) sub_0803E3B0(obj4); obj4->unk0 = 3; - obj4->unk34 = dmk->obj2.base.x; - obj4->unk38 = dmk->obj2.base.y; - obj4->unk44 = dmk; + obj4->x = dmk->obj2.base.x; + obj4->y = dmk->obj2.base.y; + obj4->parent = dmk; obj4->roomId = dmk->obj2.base.roomId; obj4->unk3C = 0x100; obj4->unk3E = 0x200; - sub_080709F8(obj4, &obj4->unkC, 4, 0x392, 2, 0x19); - obj4->unkC.unk1F = 0; - Macro_081050E8(obj4, &obj4->unkC, 0x390, 1); + sub_080709F8(obj4, &obj4->sprite, 4, 0x392, 2, 0x19); + obj4->sprite.unk1F = 0; + Macro_081050E8(obj4, &obj4->sprite, 0x390, 1); } void sub_080FCE70(void) { struct Object4 *tmp = TaskGetStructPtr(gCurTask, tmp), *obj4 = tmp; struct Sprite sprite; - struct DarkMetaKnight *dmk, *dmk2 = obj4->unk44; + struct DarkMetaKnight *dmk, *dmk2 = obj4->parent; if (obj4->flags & 0x1000) TaskDestroy(gCurTask); @@ -3021,14 +3018,14 @@ void sub_080FCE70(void) obj4->flags |= 0x1000; else { - Macro_08107BA8_4(obj4, &obj4->unkC, &sprite, 4, &obj4->unkC); - Macro_081050E8(obj4, &obj4->unkC, 0x390, !obj4->unkC.unk1F); - dmk = obj4->unk44; + Macro_08107BA8_4(obj4, &obj4->sprite, &sprite, 4, &obj4->sprite); + Macro_081050E8(obj4, &obj4->sprite, 0x390, !obj4->sprite.unk1F); + dmk = obj4->parent; if (dmk) { if (dmk->obj2.base.unk0 && dmk->obj2.base.flags & 0x1000) { - obj4->unk44 = NULL; + obj4->parent = NULL; dmk = NULL; } if (!dmk) @@ -3051,16 +3048,16 @@ void sub_080FCE70(void) { struct Object4 *obj4_2 = sub_0808AE30(&dmk2->obj2.base, 0, 0x2B4, 0); - obj4_2->unk34 = obj4->unk34; - obj4_2->unk38 = obj4->unk38; + obj4_2->x = obj4->x; + obj4_2->y = obj4->y; obj4->flags |= 0x1000; } else { if (!(obj4->flags & 0x800)) { - obj4->unk34 += obj4->unk3C; - obj4->unk38 -= obj4->unk3E; + obj4->x += obj4->unk3C; + obj4->y -= obj4->unk3E; } sub_0806FAC8(obj4); } @@ -3074,15 +3071,15 @@ void sub_080FD194(struct DarkMetaKnight *dmk) sub_0803E3B0(obj4); obj4->unk0 = 3; - obj4->unk34 = dmk->obj2.base.x; - obj4->unk38 = dmk->obj2.base.y; - obj4->unk44 = dmk; + obj4->x = dmk->obj2.base.x; + obj4->y = dmk->obj2.base.y; + obj4->parent = dmk; obj4->roomId = dmk->obj2.base.roomId; obj4->unk3C = -0x100; obj4->unk3E = 0x200; - sub_080709F8(obj4, &obj4->unkC, 4, 0x392, 3, 0x19); - obj4->unkC.unk1F = 0; - Macro_081050E8(obj4, &obj4->unkC, 0x390, 1); + sub_080709F8(obj4, &obj4->sprite, 4, 0x392, 3, 0x19); + obj4->sprite.unk1F = 0; + Macro_081050E8(obj4, &obj4->sprite, 0x390, 1); } // the same as sub_080FCE70 @@ -3090,7 +3087,7 @@ void sub_080FD26C(void) { struct Object4 *tmp = TaskGetStructPtr(gCurTask, tmp), *obj4 = tmp; struct Sprite sprite; - struct DarkMetaKnight *dmk, *dmk2 = obj4->unk44; + struct DarkMetaKnight *dmk, *dmk2 = obj4->parent; if (obj4->flags & 0x1000) TaskDestroy(gCurTask); @@ -3098,14 +3095,14 @@ void sub_080FD26C(void) obj4->flags |= 0x1000; else { - Macro_08107BA8_4(obj4, &obj4->unkC, &sprite, 4, &obj4->unkC); - Macro_081050E8(obj4, &obj4->unkC, 0x390, !obj4->unkC.unk1F); - dmk = obj4->unk44; + Macro_08107BA8_4(obj4, &obj4->sprite, &sprite, 4, &obj4->sprite); + Macro_081050E8(obj4, &obj4->sprite, 0x390, !obj4->sprite.unk1F); + dmk = obj4->parent; if (dmk) { if (dmk->obj2.base.unk0 && dmk->obj2.base.flags & 0x1000) { - obj4->unk44 = NULL; + obj4->parent = NULL; dmk = NULL; } if (!dmk) @@ -3128,16 +3125,16 @@ void sub_080FD26C(void) { struct Object4 *obj4_2 = sub_0808AE30(&dmk2->obj2.base, 0, 0x2B4, 0); - obj4_2->unk34 = obj4->unk34; - obj4_2->unk38 = obj4->unk38; - obj4->flags |= 0x1000u; + obj4_2->x = obj4->x; + obj4_2->y = obj4->y; + obj4->flags |= 0x1000; } else { if (!(obj4->flags & 0x800)) { - obj4->unk34 += obj4->unk3C; - obj4->unk38 -= obj4->unk3E; + obj4->x += obj4->unk3C; + obj4->y -= obj4->unk3E; } sub_0806FAC8(obj4); } @@ -3163,9 +3160,9 @@ struct ObjectBase *sub_080FD590(struct DarkMetaKnight *dmk) objBase->xspeed = 0x100; objBase->yspeed = 0x400; sub_0803E308(objBase, -4, -4, 4, 8); - sub_080708DC(objBase, &objBase->unk10, 0x10, 0x392, 4, 0x1A); - objBase->unk10.unk1F = 0; - Macro_081050E8(objBase, &objBase->unk10, 0x390, 1); + sub_080708DC(objBase, &objBase->sprite, 0x10, 0x392, 4, 0x1A); + objBase->sprite.unk1F = 0; + Macro_081050E8(objBase, &objBase->sprite, 0x390, 1); return objBase; } @@ -3174,8 +3171,8 @@ void sub_080FD6BC(void) struct Sprite sprite; struct ObjectBase *objBase2 = TaskGetStructPtr(gCurTask, objBase2), *objBase = objBase2; - Macro_08107BA8_4(objBase, &objBase->unk10, &sprite, 0x10, &objBase->unk10); - Macro_081050E8(objBase, &objBase->unk10, 0x390, !objBase->unk10.unk1F); + Macro_08107BA8_4(objBase, &objBase->sprite, &sprite, 0x10, &objBase->sprite); + Macro_081050E8(objBase, &objBase->sprite, 0x390, !objBase->sprite.unk1F); if (!sub_0806F780(objBase)) { objBase->flags |= 4; @@ -3192,7 +3189,7 @@ void sub_080FD6BC(void) sub_0809D8C8(objBase); if (objBase->unk62 & 4) { - objBase->unk10.unk1A = 5; + objBase->sprite.unk1A = 5; objBase->flags |= 0x100; objBase->yspeed = 0; } @@ -3208,17 +3205,17 @@ struct Object4 *sub_080FD8B4(struct DarkMetaKnight *dmk) sub_0803E3B0(obj4); obj4->unk0 = 3; - obj4->unk34 = dmk->obj2.base.x; - obj4->unk38 = dmk->obj2.base.y; - obj4->unk44 = dmk; + obj4->x = dmk->obj2.base.x; + obj4->y = dmk->obj2.base.y; + obj4->parent = dmk; obj4->roomId = dmk->obj2.base.roomId; obj4->unk3C = 0; obj4->unk3E = 0; - obj4->unk38 -= 0x3800; - obj4->unk34 -= 0x3000; - sub_080709F8(obj4, &obj4->unkC, 0x50, 0x3A3, 0, 0x1A); - obj4->unkC.unk1F = 0; - Macro_081050E8(obj4, &obj4->unkC, 0x3A3, 1); + obj4->y -= 0x3800; + obj4->x -= 0x3000; + sub_080709F8(obj4, &obj4->sprite, 0x50, 0x3A3, 0, 0x1A); + obj4->sprite.unk1F = 0; + Macro_081050E8(obj4, &obj4->sprite, 0x3A3, 1); return obj4; } @@ -3232,14 +3229,14 @@ void sub_080FD9AC(void) TaskDestroy(gCurTask); else { - Macro_08107BA8_4(obj4, &obj4->unkC, &sprite, 0x50, &obj4->unkC); - Macro_081050E8(obj4, &obj4->unkC, 0x3A3, !obj4->unkC.unk1F); - dmk = obj4->unk44; + Macro_08107BA8_4(obj4, &obj4->sprite, &sprite, 0x50, &obj4->sprite); + Macro_081050E8(obj4, &obj4->sprite, 0x3A3, !obj4->sprite.unk1F); + dmk = obj4->parent; if (dmk) { if (dmk->obj2.base.unk0 && dmk->obj2.base.flags & 0x1000) { - obj4->unk44 = NULL; + obj4->parent = NULL; dmk = NULL; } if (!dmk) @@ -3258,8 +3255,8 @@ void sub_080FD9AC(void) obj4->flags |= 4; if (obj4->unk4 <= 0xF) { - obj4->unk40 = gUnk_083571BC[(obj4->unk4 >> 1) & 3]; - obj4->unk41 = gUnk_083571BC[((obj4->unk4+1) >> 1) & 3]; + obj4->objBase54 = gUnk_083571BC[(obj4->unk4 >> 1) & 3]; + obj4->objBase55 = gUnk_083571BC[((obj4->unk4+1) >> 1) & 3]; } if (++obj4->unk4 > 0x34) obj4->flags |= 0x1000; @@ -3267,8 +3264,8 @@ void sub_080FD9AC(void) { if (!(obj4->flags & 0x800)) { - obj4->unk34 += obj4->unk3C; - obj4->unk38 -= obj4->unk3E; + obj4->x += obj4->unk3C; + obj4->y -= obj4->unk3E; } sub_0806FAC8(obj4); } @@ -3347,9 +3344,9 @@ void sub_080FDC68(struct DarkMetaKnight *dmk, struct Kirby *kirby, u8 a3) } sub_0803E2B0(objBase, -0xA, -0x14, 8, 0x14); sub_0803E308(objBase, -2, -2, 2, 2); - sub_080708DC(objBase, &objBase->unk10, 0x20, 0x391, 0x23, 0xA); - objBase->unk10.unk1F = 0; - Macro_081050E8(objBase, &objBase->unk10, 0x391, 1); + sub_080708DC(objBase, &objBase->sprite, 0x20, 0x391, 0x23, 0xA); + objBase->sprite.unk1F = 0; + Macro_081050E8(objBase, &objBase->sprite, 0x391, 1); PlaySfx(objBase, 452); sub_0806FE64(1, objBase); } @@ -3359,13 +3356,13 @@ void sub_080FDF78(void) struct Sprite sprite; struct ObjectBase *objBase2 = TaskGetStructPtr(gCurTask, objBase2), *objBase = objBase2; - Macro_08107BA8_4(objBase, &objBase->unk10, &sprite, 0x20, &objBase->unk10); - Macro_081050E8(objBase, &objBase->unk10, 0x391, !objBase->unk10.unk1F); + Macro_08107BA8_4(objBase, &objBase->sprite, &sprite, 0x20, &objBase->sprite); + Macro_081050E8(objBase, &objBase->sprite, 0x391, !objBase->sprite.unk1F); if (objBase->flags & 1) - objBase->unk54 = 0x10; + objBase->objBase54 = 0x10; else - objBase->unk54 = -0x10; - objBase->unk55 = -0x20; + objBase->objBase54 = -0x10; + objBase->objBase55 = -0x20; if (objBase->parent && ((struct DarkMetaKnight *)objBase->parent)->obj2.unk80 < 1) { objBase->parent = NULL; @@ -3391,22 +3388,22 @@ void sub_080FE1D0(struct DarkMetaKnight *dmk) sub_0803E3B0(obj4); obj4->unk0 = 3; - obj4->unk34 = dmk->obj2.base.x; - obj4->unk38 = dmk->obj2.base.y; - obj4->unk44 = dmk; + obj4->x = dmk->obj2.base.x; + obj4->y = dmk->obj2.base.y; + obj4->parent = dmk; obj4->roomId = dmk->obj2.base.roomId; obj4->flags |= dmk->obj2.base.flags & 1; obj4->flags ^= 1; - sub_080709F8(obj4, &obj4->unkC, 0x2A, 0x391, 0x22, 0x19); - obj4->unkC.unk1F = 0; - Macro_081050E8(obj4, &obj4->unkC, 0x391, 1); + sub_080709F8(obj4, &obj4->sprite, 0x2A, 0x391, 0x22, 0x19); + obj4->sprite.unk1F = 0; + Macro_081050E8(obj4, &obj4->sprite, 0x391, 1); } void sub_080FE2AC(void) { struct Object4 *tmp = TaskGetStructPtr(gCurTask, tmp), *obj4 = tmp; struct Sprite sprite; - struct DarkMetaKnight *dmk, *dmk2 = obj4->unk44; + struct DarkMetaKnight *dmk, *dmk2 = obj4->parent; if (obj4->flags & 0x1000) TaskDestroy(gCurTask); @@ -3414,14 +3411,14 @@ void sub_080FE2AC(void) obj4->flags |= 0x1000; else { - Macro_08107BA8_4(obj4, &obj4->unkC, &sprite, 0x2A, &obj4->unkC); - Macro_081050E8(obj4, &obj4->unkC, 0x391, !obj4->unkC.unk1F); - dmk = obj4->unk44; + Macro_08107BA8_4(obj4, &obj4->sprite, &sprite, 0x2A, &obj4->sprite); + Macro_081050E8(obj4, &obj4->sprite, 0x391, !obj4->sprite.unk1F); + dmk = obj4->parent; if (dmk) { if (dmk->obj2.base.unk0 && dmk->obj2.base.flags & 0x1000) { - obj4->unk44 = NULL; + obj4->parent = NULL; dmk = NULL; } if (!dmk) @@ -3546,27 +3543,27 @@ void sub_080FE954(struct ObjectBase *objBase, u8 a2) sub_0803E3B0(obj4); obj4->unk0 = 3; - obj4->unk34 = objBase->x; - obj4->unk38 = objBase->y; - obj4->unk44 = objBase; + obj4->x = objBase->x; + obj4->y = objBase->y; + obj4->parent = objBase; obj4->roomId = objBase->roomId; obj4->flags |= objBase->flags & 1; var = (a2 & 3); - *&obj4->unk40 = var << 1; // fake + *&obj4->objBase54 = var << 1; // fake if (!(obj4->flags & 1)) - obj4->unk40 = -obj4->unk40; - obj4_2->unk38 = objBase->y - ((((a2 & 3) << 3) | (a2 & 3)) << 10); - sub_080709F8(obj4, &obj4->unkC, 0x1E, 0x397, a2, 0x19); - obj4->unkC.unk1F = 0; - Macro_081050E8(obj4, &obj4->unkC, 0x397, 1); + obj4->objBase54 = -obj4->objBase54; + obj4_2->y = objBase->y - ((((a2 & 3) << 3) | (a2 & 3)) << 10); + sub_080709F8(obj4, &obj4->sprite, 0x1E, 0x397, a2, 0x19); + obj4->sprite.unk1F = 0; + Macro_081050E8(obj4, &obj4->sprite, 0x397, 1); } void sub_080FEA70(void) { struct Object4 *tmp = TaskGetStructPtr(gCurTask, tmp), *obj4 = tmp; struct Sprite sprite; - s8 unk40 = obj4->unk40; - struct DarkMetaKnight *dmk, *dmk2 = obj4->unk44; + s8 objBase54 = obj4->objBase54; + struct DarkMetaKnight *dmk, *dmk2 = obj4->parent; if (obj4->flags & 0x1000) TaskDestroy(gCurTask); @@ -3574,27 +3571,27 @@ void sub_080FEA70(void) obj4->flags |= 0x1000; else { - Macro_08107BA8_4(obj4, &obj4->unkC, &sprite, 0x2A, &obj4->unkC); - Macro_081050E8(obj4, &obj4->unkC, 0x1E, !obj4->unkC.unk1F); - obj4->unk34 = dmk2->obj2.base.x; - if (obj4->unkC.unk1A > 3 && obj4->unkC.unk1A < 8) + Macro_08107BA8_4(obj4, &obj4->sprite, &sprite, 0x2A, &obj4->sprite); + Macro_081050E8(obj4, &obj4->sprite, 0x1E, !obj4->sprite.unk1F); + obj4->x = dmk2->obj2.base.x; + if (obj4->sprite.unk1A > 3 && obj4->sprite.unk1A < 8) { obj4->flags |= 4; if (dmk2->obj2.base.counter == 0x24) - obj4->unkC.unk1A += 0xE; + obj4->sprite.unk1A += 0xE; } - if (obj4->unkC.unk1A < 4) + if (obj4->sprite.unk1A < 4) { obj4->flags |= 4; if (dmk2->obj2.base.counter == 0x12) - obj4->unkC.unk1A += 0xE; + obj4->sprite.unk1A += 0xE; } - dmk = obj4->unk44; + dmk = obj4->parent; if (dmk) { if (dmk->obj2.base.unk0 && dmk->obj2.base.flags & 0x1000) { - obj4->unk44 = NULL; + obj4->parent = NULL; dmk = NULL; } if (!dmk) @@ -3610,59 +3607,8 @@ void sub_080FEA70(void) _080FEC9C: KirbySomething(obj4); } - { - s32 r0; - - if (obj4->flags & 1) - { - struct Sprite *r0 = &obj4->unkC; - - r0->unk8 = obj4->unkC.unk8 | 0x400; - } - else - { - struct Sprite *r0 = &obj4->unkC; - - r0->unk8 = obj4->unkC.unk8 & ~0x400; - } - if (!(obj4->flags & 8)) - { - if ((obj4->unkC.unk1B != obj4->unkC.unk1A || obj4->unkC.unk18 != obj4->unkC.unkC) - && obj4->unkC.unk1C) - { - obj4->unk1 = 0; - obj4->unk2 = 0; - obj4->flags &= ~4; - } - r0 = sub_08155128(&obj4->unkC); - if (!r0) - { - obj4->flags |= 2; - if (obj4->flags & 4 && obj4->unkC.unk1C) - { - obj4->unkC.unk1B = 0xFF; - obj4->flags &= ~4; - obj4->unk1 = 0; - obj4->unk2 = r0; - sub_08155128(&obj4->unkC); - } - } - else - { - obj4->unk2 += obj4->unkC.unk1C; - obj4->unk1 = obj4->unk2 >> 4; - obj4->flags &= ~2; - } - } - obj4->unkC.unk10 = (obj4->unk34 >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unkC >> 8) + obj4->unk40; - obj4->unkC.unk12 = (obj4->unk38 >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unk10 >> 8) + obj4->unk41; - if (obj4->unkC.unk1C) - { - obj4->unk40 = 0; - obj4->unk41 = 0; - } - } - if (obj4->unkC.unk1A > 0xD && obj4->flags & 2) + Macro_080FC150(obj4); + if (obj4->sprite.unk1A > 0xD && obj4->flags & 2) { obj4->flags |= 0x1000; return; @@ -3670,13 +3616,10 @@ void sub_080FEA70(void) if (!(obj4->flags & 0x400) && gKirbys[gUnk_0203AD3C].base.base.base.roomId == obj4->roomId) { - obj4->unkC.unk10 += gUnk_0203AD18[0]; - obj4->unkC.unk12 += gUnk_0203AD18[1]; - if (obj4->flags & 0x4000) - sub_081564D8(&obj4->unkC); - else - sub_0815604C(&obj4->unkC); + obj4->sprite.unk10 += gUnk_0203AD18[0]; + obj4->sprite.unk12 += gUnk_0203AD18[1]; + Macro_0803DBC8(obj4, &obj4->sprite); } - obj4->unk40 = unk40; + obj4->objBase54 = objBase54; } } diff --git a/src/dark_mind.c b/src/dark_mind.c index 3b79e48..74e784b 100644 --- a/src/dark_mind.c +++ b/src/dark_mind.c @@ -889,7 +889,7 @@ void sub_08100EA0(struct DarkMindForm1 *r4) if (r4->unk0.subtype == 3) r4->unk0.base.counter = 300; r5->unkE0 = 256; - sub_0803CFC4(r5->unk0.base.unk10.unk1F, 920, 0, -0x18, -0x18, -0x18, 0x100); + sub_0803CFC4(r5->unk0.base.sprite.unk1F, 920, 0, -0x18, -0x18, -0x18, 0x100); } void sub_08100F18(struct DarkMindForm1 *r5) @@ -910,7 +910,7 @@ void sub_08100F18(struct DarkMindForm1 *r5) sub_081059A8(r5); if (r5->unk0.base.counter <= 180 && sb->unkE0) { - sub_0803CFC4(r5->unk0.base.unk10.unk1F, 0x398, 0, -24, -24, -24, sb->unkE0); + sub_0803CFC4(r5->unk0.base.sprite.unk1F, 0x398, 0, -24, -24, -24, sb->unkE0); sb->unkE0 -= 4; } } @@ -926,7 +926,7 @@ void sub_08100F18(struct DarkMindForm1 *r5) if (r5->unk0.base.counter <= 180 && sb->unkE0) { - sub_0803CFC4(r5->unk0.base.unk10.unk1F, 0x398, 0, -24, -24, -24, sb->unkE0); + sub_0803CFC4(r5->unk0.base.sprite.unk1F, 0x398, 0, -24, -24, -24, sb->unkE0); sb->unkE0 -= 8; } if (r5->unk0.base.counter == 200) @@ -1004,8 +1004,8 @@ void sub_08101350(struct DarkMindForm1 *r4) ({ \ (r3) = sub_0808AE30(&(obj2)->base, 0, 0x292, Rand16() & 3); \ \ - (r3)->unk34 += (0x40 - (Rand16() & 0x7F)) * 0x100; \ - (r3)->unk38 += (0x20 - (Rand16() & 0x3F)) * 0x100; \ + (r3)->x += (0x40 - (Rand16() & 0x7F)) * 0x100; \ + (r3)->y += (0x20 - (Rand16() & 0x3F)) * 0x100; \ }) void sub_081013C8(struct DarkMindForm1 *r7) @@ -1038,7 +1038,7 @@ void sub_081013C8(struct DarkMindForm1 *r7) } else { - sub_0803CFC4(r7->unk0.base.unk10.unk1F, 0x398, 0, 31, 31, 31, r7->unk0.base.counter); + sub_0803CFC4(r7->unk0.base.sprite.unk1F, 0x398, 0, 31, 31, 31, r7->unk0.base.counter); r7->unk0.base.counter += 2; } if (r7->unk0.base.unk1 == 1) @@ -1650,8 +1650,8 @@ void sub_081027C0(struct DarkMindForm1 *r5) r5->unk0.base.flags |= 0x400; r5->unk0.base.flags |= 8; r5->unk0.base.unkC |= 0x200; - sub_08157190(r5->unk0.base.unk10.unk0); - r5->unk0.base.unk10.unk0 = 0; + sub_08157190(r5->unk0.base.sprite.unk0); + r5->unk0.base.sprite.unk0 = 0; sub_081050E8(&r5->unk0, 0); sub_081050E8(&r5->unk0, 1); sub_081050E8(&r5->unk0, 2); @@ -1665,7 +1665,7 @@ void sub_081027C0(struct DarkMindForm1 *r5) if (r5->unk0.unk9E > 20) { if (gKirbys[gUnk_0203AD3C].base.base.base.roomId == r5->unk0.base.roomId) - sub_0803CFC4(r5->unk0.base.unk10.unk1F, 0x398, 0, -16, -8, 21, 6 * r5->unk0.unk9F); + sub_0803CFC4(r5->unk0.base.sprite.unk1F, 0x398, 0, -16, -8, 21, 6 * r5->unk0.unk9F); ++r5->unk0.unk9F; if (r5->unk0.unk9F >= 45) r5->unk0.unk9F = 45; @@ -1678,7 +1678,7 @@ void sub_081027C0(struct DarkMindForm1 *r5) } else { - SpriteSomething(&sprite, 0x6000000, 0x398, 0, 0xFF, 0, 0, 0, 0, 0x10, r5->unk0.base.unk10.unk1F & 0xF, 0x80000); + SpriteSomething(&sprite, 0x6000000, 0x398, 0, 0xFF, 0, 0, 0, 0, 0x10, r5->unk0.base.sprite.unk1F & 0xF, 0x80000); r5->unk0.base.flags &= ~0x200; r5->unk0.base.flags &= ~0x400; r5->unk0.base.flags &= ~8; @@ -2139,8 +2139,8 @@ void sub_08103404(struct DarkMindForm1 *r5) r5->unk0.base.flags |= 4; if (r5->unk0.base.counter) { - r5->unk0.base.unk54 = gUnk_08357288[r5->unk0.unk9E >> 1]; - r5->unkCC->unk40 = gUnk_08357288[r5->unk0.unk9E >> 1]; + r5->unk0.base.objBase54 = gUnk_08357288[r5->unk0.unk9E >> 1]; + r5->unkCC->objBase54 = gUnk_08357288[r5->unk0.unk9E >> 1]; ++r5->unk0.unk9E; r5->unk0.unk9E &= 7; if (!r5->unkDB && !r5->unk0.unk9E) @@ -2189,8 +2189,8 @@ void sub_08103688(struct DarkMindForm1 *r5) r5->unk0.base.flags |= 4; if (r5->unk0.base.counter) { - r5->unk0.base.unk54 = gUnk_08357288[r5->unk0.unk9E >> 1]; - r5->unkCC->unk40 = gUnk_08357288[r5->unk0.unk9E >> 1]; + r5->unk0.base.objBase54 = gUnk_08357288[r5->unk0.unk9E >> 1]; + r5->unkCC->objBase54 = gUnk_08357288[r5->unk0.unk9E >> 1]; ++r5->unk0.unk9E; r5->unk0.unk9E &= 7; if (!r5->unkDB && !r5->unk0.unk9E) @@ -2309,8 +2309,8 @@ void sub_08103AE4(struct DarkMindForm1 *r5) switch (r5->unk0.unk9E) { case 0: - r5->unk0.base.unk55 += (gUnk_0203AD40 & 2) << 1; - r5->unkCC->unk41 = r5->unk0.base.unk55; + r5->unk0.base.objBase55 += (gUnk_0203AD40 & 2) << 1; + r5->unkCC->objBase55 = r5->unk0.base.objBase55; if ((!(r5->unk0.unk9F & 0xF) && r5->unk0.subtype <= 1) || (!(r5->unk0.unk9F & 7) && r5->unk0.subtype > 1)) { @@ -2363,8 +2363,8 @@ void sub_08103CD0(struct DarkMindForm1 *r5) switch (r5->unk0.unk9E) { case 0: - r5->unk0.base.unk55 += (gUnk_0203AD40 & 2) << 1; - r5->unkCC->unk41 = r5->unk0.base.unk55; + r5->unk0.base.objBase55 += (gUnk_0203AD40 & 2) << 1; + r5->unkCC->objBase55 = r5->unk0.base.objBase55; if (!(r5->unk0.unk9F & 0xF)) { r7 = gUnk_083572C0[r5->unk0.base.counter]; @@ -2404,8 +2404,8 @@ void sub_08103E60(struct DarkMindForm1 *r5) switch (r5->unk0.unk9E) { case 0: - r5->unk0.base.unk55 += (gUnk_0203AD40 & 2) << 1; - r5->unkCC->unk41 = r5->unk0.base.unk55; + r5->unk0.base.objBase55 += (gUnk_0203AD40 & 2) << 1; + r5->unkCC->objBase55 = r5->unk0.base.objBase55; if (!(r5->unk0.unk9F & 0xF)) { PlaySfx(&r5->unk0.base, 426); @@ -2488,8 +2488,8 @@ void sub_08104080(struct DarkMindForm1 *r5) r5->unk0.base.xspeed = 0x60; } } - r5->unk0.base.unk55 += gUnk_0203AD40 & 2; - r3->unkCC->unk41 = r5->unk0.base.unk55; + r5->unk0.base.objBase55 += gUnk_0203AD40 & 2; + r3->unkCC->objBase55 = r5->unk0.base.objBase55; if (!(r5->unk0.unk9F & 7)) { u16 rand = Rand16() & 3; @@ -2582,8 +2582,8 @@ void sub_08104424(struct DarkMindForm1 *r4) switch (r4->unk0.unk9E) { case 0: - r4->unk0.base.unk55 += 2 * (gUnk_0203AD40 & 2); - r4->unkCC->unk41 = r4->unk0.base.unk55; + r4->unk0.base.objBase55 += 2 * (gUnk_0203AD40 & 2); + r4->unkCC->objBase55 = r4->unk0.base.objBase55; if (r4->unk0.unk9F > 8) { r4->unk0.unk9E = 1; @@ -2645,8 +2645,8 @@ void sub_0810457C(struct DarkMindForm1 *r5) switch (r3 = r5->unk0.unk9E) { case 0: - r5->unk0.base.unk55 += gUnk_0203AD40 & 2; - r5->unkCC->unk41 = r5->unk0.base.unk55; + r5->unk0.base.objBase55 += gUnk_0203AD40 & 2; + r5->unkCC->objBase55 = r5->unk0.base.objBase55; if (r5->unk0.unk9F == 0x20) r5->unk0.base.yspeed = 0x100; if (r5->unk0.base.yspeed < 0) @@ -2711,8 +2711,8 @@ void sub_081047D0(struct DarkMindForm1 *r4) switch (r4->unk0.unk9E) { case 0: - r4->unk0.base.unk55 += 2 * (gUnk_0203AD40 & 2); - r4->unkCC->unk41 = r4->unk0.base.unk55; + r4->unk0.base.objBase55 += 2 * (gUnk_0203AD40 & 2); + r4->unkCC->objBase55 = r4->unk0.base.objBase55; if (r4->unk0.unk9F > 8) { r4->unk0.unk9E = 1; @@ -2836,8 +2836,8 @@ void sub_08104AA8(struct DarkMindForm1 *r4) case 8: case 10: r4->unk0.base.flags |= 4; - r4->unk0.base.unk55 += (gUnk_0203AD40 & 2); - r3->unkCC->unk41 = r4->unk0.base.unk55; + r4->unk0.base.objBase55 += (gUnk_0203AD40 & 2); + r3->unkCC->objBase55 = r4->unk0.base.objBase55; if (!r4->unk0.unk9F) PlaySfx(&r4->unk0.base, 426); if (++r4->unk0.unk9F > 8) @@ -2978,8 +2978,8 @@ void sub_08104E04(struct DarkMindForm1 *r4) if (r4->unk0.base.xspeed < 0) r4->unk0.base.xspeed = 0; } - r4->unk0.base.unk54 += 2 * (gUnk_0203AD40 & 2); - r5->unkCC->unk40 = r4->unk0.base.unk54; + r4->unk0.base.objBase54 += 2 * (gUnk_0203AD40 & 2); + r5->unkCC->objBase54 = r4->unk0.base.objBase54; if (--r5->unkDB == 0x20) { r4->unk0.base.xspeed = -0x400; @@ -3056,7 +3056,7 @@ void sub_08104E04(struct DarkMindForm1 *r4) { struct ObjectBase *r6 = r4->unk0.base.unk6C; - sub_08088398(&r4->unk0, gUnk_08357290)->unk0 = r5->unkCC->unkC.unk1F; + sub_08088398(&r4->unk0, gUnk_08357290)->unk0 = r5->unkCC->sprite.unk1F; if (r5->unkDA != 14) r5->unkD4 = 2; r5->unkDB = 40; @@ -3080,16 +3080,16 @@ void sub_081050E8(struct Object2 *r5, u8 r7) sub_0803E3B0(r4); r4->unk0 = 3; - r4->unk34 = r5->base.x; - r4->unk38 = r5->base.y; - r4->unk44 = r5; + r4->x = r5->base.x; + r4->y = r5->base.y; + r4->parent = r5; r4->roomId = r5->base.roomId; if (!(r5->base.flags & 1)) r4->flags |= 1; - sub_080709F8(r4, &r4->unkC, gUnk_08357250[r7], 0x398, r7 + 4, 27); - r4->unkC.unk8 |= 0x80; - r4->unkC.unk1F = 0; // redundant - Macro_081050E8(r4, &r4->unkC, 0x398, 1); + sub_080709F8(r4, &r4->sprite, gUnk_08357250[r7], 0x398, r7 + 4, 27); + r4->sprite.unk8 |= 0x80; + r4->sprite.unk1F = 0; // redundant + Macro_081050E8(r4, &r4->sprite, 0x398, 1); r4->unk8 = r7; switch (r4->unk8) { @@ -3131,19 +3131,19 @@ void sub_08105278(void) TaskDestroy(gCurTask); return; } - if (((struct Object2 *)r5->unk44)->base.flags & 0x1000) + if (((struct Object2 *)r5->parent)->base.flags & 0x1000) { r5->flags |= 0x1000; return; } - Macro_08107BA8_4(r5, &r5->unkC, &sprite, gUnk_08357250[r5->unk8], &r5->unkC); - Macro_081050E8(r5, &r5->unkC, 0x398, !r5->unkC.unk1F); - r3 = r5->unk44; + Macro_08107BA8_4(r5, &r5->sprite, &sprite, gUnk_08357250[r5->unk8], &r5->sprite); + Macro_081050E8(r5, &r5->sprite, 0x398, !r5->sprite.unk1F); + r3 = r5->parent; if (r3) { if (r3->base.unk0 && r3->base.flags & 0x1000) { - r5->unk44 = NULL; + r5->parent = NULL; r3 = NULL; } if (!r3) @@ -3180,8 +3180,8 @@ void sub_08105278(void) } if (!(r5->flags & 0x800)) { - r5->unk34 += r5->unk3C; - r5->unk38 -= r5->unk3E; + r5->x += r5->unk3C; + r5->y -= r5->unk3E; } if (r5->unk3C < 0) { @@ -3208,8 +3208,8 @@ void sub_08105278(void) r5->unk3E = 0; } sub_0806FAC8(r5); - if (!(r5->unk4 & 7) && r5->unkC.unk1C) - --r5->unkC.unk1C; + if (!(r5->unk4 & 7) && r5->sprite.unk1C) + --r5->sprite.unk1C; } struct Object4 *sub_081055B8(struct Object2 *r5) @@ -3219,15 +3219,15 @@ struct Object4 *sub_081055B8(struct Object2 *r5) sub_0803E3B0(r4); r4->unk0 = 3; - r4->unk34 = r5->base.x; - r4->unk38 = r5->base.y; - r4->unk44 = r5; + r4->x = r5->base.x; + r4->y = r5->base.y; + r4->parent = r5; r4->roomId = r5->base.roomId; if (!(r5->base.flags & 1)) r4->flags |= 1; - sub_080709F8(r4, &r4->unkC, 30, 0x39A, 0, 25); - r4->unkC.unk1F = 0; // redundant - Macro_081050E8(r4, &r4->unkC, 0x139A, 1); + sub_080709F8(r4, &r4->sprite, 30, 0x39A, 0, 25); + r4->sprite.unk1F = 0; // redundant + Macro_081050E8(r4, &r4->sprite, 0x139A, 1); return r4; } @@ -3235,7 +3235,7 @@ void sub_08105698(void) { struct Sprite sprite; struct Object4 *r0, *r5 = TaskGetStructPtr(gCurTask, r0); - struct Object2 *r3, *r7 = r5->unk44; + struct Object2 *r3, *r7 = r5->parent; if (r5->flags & 0x1000) { @@ -3247,14 +3247,14 @@ void sub_08105698(void) r5->flags |= 0x1000; return; } - Macro_08107BA8_4(r5, &r5->unkC, &sprite, 0x1E, &r5->unkC); - Macro_081050E8(r5, &r5->unkC, 0x139A, !r5->unkC.unk1F); - r3 = r5->unk44; + Macro_08107BA8_4(r5, &r5->sprite, &sprite, 0x1E, &r5->sprite); + Macro_081050E8(r5, &r5->sprite, 0x139A, !r5->sprite.unk1F); + r3 = r5->parent; if (r3) { if (r3->base.unk0 && r3->base.flags & 0x1000) { - r5->unk44 = NULL; + r5->parent = NULL; r3 = NULL; } if (!r3) @@ -3274,8 +3274,8 @@ void sub_08105698(void) r5->flags |= r7->base.flags & (0x400 | 4); r5->flags |= (r7->base.flags ^ 1) & 1; r5->roomId = r7->base.roomId; - r5->unk34 = r7->base.x; - r5->unk38 = r7->base.y; + r5->x = r7->base.x; + r5->y = r7->base.y; if (r7->unk83 <= 6) r5->flags |= 0x400; else @@ -3284,19 +3284,19 @@ void sub_08105698(void) switch (r7->unk83) { case 7: - r5->unkC.unk1A = 0; + r5->sprite.unk1A = 0; break; case 8: - r5->unkC.unk1A = 2; + r5->sprite.unk1A = 2; break; case 9: - r5->unkC.unk1A = 1; + r5->sprite.unk1A = 1; break; case 10: - r5->unkC.unk1A = 3; + r5->sprite.unk1A = 3; break; case 11: - r5->unkC.unk1A = 4; + r5->sprite.unk1A = 4; break; } sub_0806FAC8(r5); @@ -3364,7 +3364,7 @@ void *CreateShadowKirbyBomb(struct Object *r6, u8 r5) r4->unk7C = sub_0809F840; sub_0803E2B0(&r4->base, -4, -8, 4, 8); ObjectInitSprite(r4); - r4->base.unk10.unk14 = 0x240; + r4->base.sprite.unk14 = 0x240; sub_08109E4C(r4); return r4; } @@ -3600,7 +3600,7 @@ void *CreateDarkMindStar(struct Object *r5, u8 r4) sub_0803E2B0(&obj->base, -4, -4, 4, 4); sub_0803E308(&obj->base, -4, -4, 4, 4); ObjectInitSprite(obj); - obj->base.unk10.unk14 = 0x240; + obj->base.sprite.unk14 = 0x240; return obj; } @@ -3737,14 +3737,14 @@ void sub_081069BC(struct DarkMindForm1 *r7) r4 = TaskGetStructPtr(t, r5); sub_0803E3B0(r4); r4->unk0 = 3; - r4->unk34 = r6->unk0.base.x; - r4->unk38 = r6->unk0.base.y; - r4->unk44 = &r6->unk0; + r4->x = r6->unk0.base.x; + r4->y = r6->unk0.base.y; + r4->parent = &r6->unk0; r4->roomId = r6->unk0.base.roomId; if (!(r6->unk0.base.flags & 1)) r4->flags |= 1; - sub_080709F8(r5, &r5->unkC, 0x10, 0x399, ((r7->unk0.type - OBJ_DARK_MIND_STAR_FIRE) << 1) + 1, 27); - r4->unkC.unk1F = 0; // redundant - Macro_081050E8(r4, &r4->unkC, 0x399, 1); + sub_080709F8(r5, &r5->sprite, 0x10, 0x399, ((r7->unk0.type - OBJ_DARK_MIND_STAR_FIRE) << 1) + 1, 27); + r4->sprite.unk1F = 0; // redundant + Macro_081050E8(r4, &r4->sprite, 0x399, 1); } } @@ -3763,17 +3763,17 @@ void sub_08106AD0(struct Object2 *r5) r4 = TaskGetStructPtr(t, r0); sub_0803E3B0(r4); r4->unk0 = 3; - r4->unk34 = r5->base.x; - r4->unk38 = r5->base.y; - r4->unk44 = r5; + r4->x = r5->base.x; + r4->y = r5->base.y; + r4->parent = r5; r4->roomId = r5->base.roomId; if (!(r5->base.flags & 1)) r4->flags |= 1; var = ((r6->type == OBJ_UNKNOWN_D4 ? r6->unk83 : r6->type - OBJ_DARK_MIND_STAR_FIRE) << 1) + 1; - sub_080709F8(r4, &r4->unkC, 0x10, 0x399, var, 27); - r4->unkC.unk1F = 0; // redundant - Macro_081050E8(r4, &r4->unkC, 0x399, 1); + sub_080709F8(r4, &r4->sprite, 0x10, 0x399, var, 27); + r4->sprite.unk1F = 0; // redundant + Macro_081050E8(r4, &r4->sprite, 0x399, 1); r4->unk4 = 1; } } @@ -3790,17 +3790,17 @@ void sub_08106AD0(struct Object2 *r5) #define Macro_08108368(obj4, c1, c2) \ ({ \ - (obj4)->unkC.unk10 = (((obj4)->unk34 + (c1)) >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unkC >> 8); \ - (obj4)->unkC.unk12 = (((obj4)->unk38 + (c2)) >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unk10 >> 8); \ - Macro_08106BE0(obj4, &(obj4)->unkC); \ + (obj4)->sprite.unk10 = (((obj4)->x + (c1)) >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unkC >> 8); \ + (obj4)->sprite.unk12 = (((obj4)->y + (c2)) >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unk10 >> 8); \ + Macro_08106BE0(obj4, &(obj4)->sprite); \ }) void sub_08106BE0(void) { struct Sprite sprite; struct Object4 *r0, *r6 = TaskGetStructPtr(gCurTask, r0); - struct ObjectBase *r8 = &((struct Object2 *)r6->unk44)->base; - struct Object2 *r7 = r6->unk44; + struct ObjectBase *r8 = &((struct Object2 *)r6->parent)->base; + struct Object2 *r7 = r6->parent; if (r6->flags & 0x1000) { @@ -3812,8 +3812,8 @@ void sub_08106BE0(void) r6->flags |= 0x1000; return; } - Macro_08107BA8_4(r6, &r6->unkC, &sprite, 0x10, &r6->unkC); - Macro_081050E8(r6, &r6->unkC, 0x398, !r6->unkC.unk1F); + Macro_08107BA8_4(r6, &r6->sprite, &sprite, 0x10, &r6->sprite); + Macro_081050E8(r6, &r6->sprite, 0x398, !r6->sprite.unk1F); r6->flags |= 4; r6->flags &= ~1; r6->flags |= (r7->base.flags ^ 1) & 1; @@ -3825,129 +3825,27 @@ void sub_08106BE0(void) } if (r6->unk4) { - r6->unk34 = r8->unk48 - r8->xspeed - r8->xspeed; - r6->unk38 = r8->unk4C + r8->yspeed + r8->yspeed; + r6->x = r8->unk48 - r8->xspeed - r8->xspeed; + r6->y = r8->unk4C + r8->yspeed + r8->yspeed; if (!Macro_0810B1F4(r8)) - { - s32 r0; - - if (r6->flags & 1) - { - struct Sprite *r0 = &r6->unkC; - - r0->unk8 = r6->unkC.unk8 | 0x400; - } - else - { - struct Sprite *r0 = &r6->unkC; - - r0->unk8 = r6->unkC.unk8 & ~0x400; - } - if (!(r6->flags & 8)) - { - if ((r6->unkC.unk1B != r6->unkC.unk1A || r6->unkC.unk18 != r6->unkC.unkC) - && r6->unkC.unk1C) - { - r6->unk1 = 0; - r6->unk2 = 0; - r6->flags &= ~4; - } - r0 = sub_08155128(&r6->unkC); - if (!r0) - { - r6->flags |= 2; - if (r6->flags & 4 && r6->unkC.unk1C) - { - r6->unkC.unk1B = 0xFF; - r6->flags &= ~4; - r6->unk1 = 0; - r6->unk2 = r0; - sub_08155128(&r6->unkC); - } - } - else - { - r6->unk2 += r6->unkC.unk1C; - r6->unk1 = r6->unk2 >> 4; - r6->flags &= ~2; - } - } - r6->unkC.unk10 = (r6->unk34 >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unkC >> 8) + r6->unk40; - r6->unkC.unk12 = (r6->unk38 >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unk10 >> 8) + r6->unk41; - if (r6->unkC.unk1C) - { - r6->unk40 = 0; - r6->unk41 = 0; - } - } + Macro_080FC150(r6); Macro_08108368(r6, 0, 0); - r6->unk34 = r8->unk48; - r6->unk38 = r8->unk4C; + r6->x = r8->unk48; + r6->y = r8->unk4C; Macro_08108368(r6, 0, 0); } else { - r6->unk34 = r8->unk48; - r6->unk38 = r8->unk4C; + r6->x = r8->unk48; + r6->y = r8->unk4C; if (!Macro_0810B1F4(r8)) - { - s32 r0; - - if (r6->flags & 1) - { - struct Sprite *r0 = &r6->unkC; - - r0->unk8 = r6->unkC.unk8 | 0x400; - } - else - { - struct Sprite *r0 = &r6->unkC; - - r0->unk8 = r6->unkC.unk8 & ~0x400; - } - if (!(r6->flags & 8)) - { - if ((r6->unkC.unk1B != r6->unkC.unk1A || r6->unkC.unk18 != r6->unkC.unkC) - && r6->unkC.unk1C) - { - r6->unk1 = 0; - r6->unk2 = 0; - r6->flags &= ~4; - } - r0 = sub_08155128(&r6->unkC); - if (!r0) - { - r6->flags |= 2; - if (r6->flags & 4 && r6->unkC.unk1C) - { - r6->unkC.unk1B = 0xFF; - r6->flags &= ~4; - r6->unk1 = 0; - r6->unk2 = r0; - sub_08155128(&r6->unkC); - } - } - else - { - r6->unk2 += r6->unkC.unk1C; - r6->unk1 = r6->unk2 >> 4; - r6->flags &= ~2; - } - } - r6->unkC.unk10 = (r6->unk34 >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unkC >> 8) + r6->unk40; - r6->unkC.unk12 = (r6->unk38 >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unk10 >> 8) + r6->unk41; - if (r6->unkC.unk1C) - { - r6->unk40 = 0; - r6->unk41 = 0; - } - } + Macro_080FC150(r6); else { - r6->unkC.unk10 = (r6->unk34 >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unkC >> 8); - r6->unkC.unk12 = (r6->unk38 >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unk10 >> 8); + r6->sprite.unk10 = (r6->x >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unkC >> 8); + r6->sprite.unk12 = (r6->y >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unk10 >> 8); } - Macro_08106BE0(r6, &r6->unkC); + Macro_08106BE0(r6, &r6->sprite); } } @@ -3990,7 +3888,7 @@ void *CreateDarkMindBomb(struct Object *r5, u8 r4) sub_0803E2B0(&obj8->unk0.base, -4, -4, 4, 4); sub_0803E308(&obj8->unk0.base, -4, -4, 4, 4); ObjectInitSprite(&obj8->unk0); - obj8->unk0.base.unk10.unk14 = 0x600; + obj8->unk0.base.sprite.unk14 = 0x600; sub_081099A4(obj8); obj8->unk0.base.counter = 200; return obj8; @@ -4024,9 +3922,9 @@ void sub_08107408(struct DarkMindBomb *r4) { struct Object4 *r0 = sub_0808AE30(&r4->unk0.base, 0x30, 0x233, 0); - r0->unkC.unk1F = r5->unk10.unk1F; - r0->unkC.unk14 = 0x6C0; - r0->unkC.unk1C = 8; + r0->sprite.unk1F = r5->sprite.unk1F; + r0->sprite.unk14 = 0x6C0; + r0->sprite.unk1C = 8; PlaySfx(&r4->unk0.base, 430); } if (++r4->unk0.unk9F > 0x3A) @@ -4189,9 +4087,9 @@ struct ObjectBase *sub_08107A48(struct Object2 *r4) r5->y = 0; sub_0803E2B0(r5, -4, -4, 4, 4); sub_0803E308(r5, -4, -4, 4, 8); - sub_080708DC(r5, &r5->unk10, 0x10, 0x2C3, 3, 26); - r5->unk10.unk1F = 0; - Macro_081050E8(r5, &r5->unk10, 0x2C3, 1); + sub_080708DC(r5, &r5->sprite, 0x10, 0x2C3, 3, 26); + r5->sprite.unk1F = 0; + Macro_081050E8(r5, &r5->sprite, 0x2C3, 1); gUnk_0203AD34 = 1; return r5; } @@ -4202,8 +4100,8 @@ void sub_08107BA8(void) struct ObjectBase *r0, *r5 = TaskGetStructPtr(gCurTask, r0); struct Object2 *r8 = r5->parent; - Macro_08107BA8_4(r5, &r5->unk10, &sprite, 0x10, &r5->unk10); - Macro_081050E8(r5, &r5->unk10, 0x2C3, !r5->unk10.unk1F); + Macro_08107BA8_4(r5, &r5->sprite, &sprite, 0x10, &r5->sprite); + Macro_081050E8(r5, &r5->sprite, 0x2C3, !r5->sprite.unk1F); if (r8->base.flags & 0x1000 || r8->base.roomId == 0xFFFF) r5->roomId = 0xFFFF; if (!sub_0806F780(r5)) @@ -4224,7 +4122,7 @@ void sub_08107BA8(void) sub_0809D8C8(r5); if (r5->unk62 & 4) { - r5->unk10.unk1A = 4; + r5->sprite.unk1A = 4; r5->flags |= 0x100; r5->yspeed = 0; sub_08107ED4(r5); @@ -4261,14 +4159,14 @@ void sub_08107ED4(struct ObjectBase *r4) sub_0803E3B0(r5); r5->unk0 = 3; - r5->unk34 = r4->x; - r5->unk38 = r4->y; - r5->unk44 = r4; + r5->x = r4->x; + r5->y = r4->y; + r5->parent = r4; r5->roomId = r4->roomId; - r5->unk38 -= 0x2800; - sub_080709F8(r5, &r5->unkC, 20, gUnk_083572D0[gUnk_08D60A80][0], gUnk_083572D0[gUnk_08D60A80][1], 1); - r5->unkC.unk1F = 0; - Macro_081050E8(r5, &r5->unkC, 0x2C3, 1); + r5->y -= 0x2800; + sub_080709F8(r5, &r5->sprite, 20, gUnk_083572D0[gUnk_08D60A80][0], gUnk_083572D0[gUnk_08D60A80][1], 1); + r5->sprite.unk1F = 0; + Macro_081050E8(r5, &r5->sprite, 0x2C3, 1); } void sub_08107FC4(void) @@ -4277,21 +4175,21 @@ void sub_08107FC4(void) struct Object4 *r0, *r5 = TaskGetStructPtr(gCurTask, r0); struct Object2 *r3; - r5->unkC.unk1F = ((struct Object2 *)r5->unk44)->base.unk10.unk1F; + r5->sprite.unk1F = ((struct Object2 *)r5->parent)->base.sprite.unk1F; if (r5->flags & 0x1000) TaskDestroy(gCurTask); - else if (((struct Object2 *)r5->unk44)->base.flags & 0x1000) + else if (((struct Object2 *)r5->parent)->base.flags & 0x1000) r5->flags |= 0x1000; else { - Macro_08107BA8_4(r5, &r5->unkC, &sprite, 0x14, &r5->unkC); - Macro_081050E8(r5, &r5->unkC, 0x2C3, !r5->unkC.unk1F); - r3 = r5->unk44; + Macro_08107BA8_4(r5, &r5->sprite, &sprite, 0x14, &r5->sprite); + Macro_081050E8(r5, &r5->sprite, 0x2C3, !r5->sprite.unk1F); + r3 = r5->parent; if (r3) { if (r3->base.unk0 && r3->base.flags & 0x1000) { - r5->unk44 = NULL; + r5->parent = NULL; r3 = NULL; } if (!r3) @@ -4319,22 +4217,22 @@ void sub_08108280(struct Object2 *r5) sub_0803E3B0(r4); r4->unk0 = 3; - r4->unk34 = r5->base.x; - r4->unk38 = r5->base.y; - r4->unk44 = r5; + r4->x = r5->base.x; + r4->y = r5->base.y; + r4->parent = r5; r4->roomId = r5->base.roomId; - r4->unk38 -= 0x4000; - sub_080709F8(r4, &r4->unkC, 0x30, 0x399, 15, 25); - r4->unkC.unk1F = 0; + r4->y -= 0x4000; + sub_080709F8(r4, &r4->sprite, 0x30, 0x399, 15, 25); + r4->sprite.unk1F = 0; r4->unk4 = 14; - Macro_081050E8(r4, &r4->unkC, 0x39A, !r4->unkC.unk1F); + Macro_081050E8(r4, &r4->sprite, 0x39A, !r4->sprite.unk1F); } void sub_08108368(void) { struct Sprite sprite; struct Object4 *r0, *r6 = TaskGetStructPtr(gCurTask, r0); - struct Object2 *r7 = r6->unk44; + struct Object2 *r7 = r6->parent; if (r6->flags & 0x1000) TaskDestroy(gCurTask); @@ -4342,77 +4240,28 @@ void sub_08108368(void) r6->flags |= 0x1000; else { - Macro_08107BA8_4(r6, &r6->unkC, &sprite, 0x30, &r6->unkC); - Macro_081050E8(r6, &r6->unkC, 0x39A, !r6->unkC.unk1F); + Macro_08107BA8_4(r6, &r6->sprite, &sprite, 0x30, &r6->sprite); + Macro_081050E8(r6, &r6->sprite, 0x39A, !r6->sprite.unk1F); Macro_0809E55C(r6); - r6->unk34 = r7->base.x; - r6->unk38 = r7->base.y; + r6->x = r7->base.x; + r6->y = r7->base.y; if (!Macro_0810B1F4(&r7->base) || r7->base.flags & 0x2000) { - s32 r0; - if (!--r6->unk4) { r6->flags |= 0x1000; return; } r6->flags |= 4; - if (r6->flags & 1) - { - struct Sprite *r0 = &r6->unkC; - - r0->unk8 = r6->unkC.unk8 | 0x400; - } - else - { - struct Sprite *r0 = &r6->unkC; - - r0->unk8 = r6->unkC.unk8 & ~0x400; - } - if (!(r6->flags & 8)) - { - if ((r6->unkC.unk1B != r6->unkC.unk1A || r6->unkC.unk18 != r6->unkC.unkC) - && r6->unkC.unk1C) - { - r6->unk1 = 0; - r6->unk2 = 0; - r6->flags &= ~4; - } - r0 = sub_08155128(&r6->unkC); - if (!r0) - { - r6->flags |= 2; - if (r6->flags & 4 && r6->unkC.unk1C) - { - r6->unkC.unk1B = 0xFF; - r6->flags &= ~4; - r6->unk1 = 0; - r6->unk2 = r0; - sub_08155128(&r6->unkC); - } - } - else - { - r6->unk2 += r6->unkC.unk1C; - r6->unk1 = r6->unk2 >> 4; - r6->flags &= ~2; - } - } - r6->unkC.unk10 = (r6->unk34 >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unkC >> 8) + r6->unk40; - r6->unkC.unk12 = (r6->unk38 >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unk10 >> 8) + r6->unk41; - if (r6->unkC.unk1C) - { - r6->unk40 = 0; - r6->unk41 = 0; - } + Macro_080FC150(r6); } Macro_08108368(r6, 0x3000, 0); Macro_08108368(r6, 0x7000, 0); - r6->unkC.unk8 ^= 0x400; + r6->sprite.unk8 ^= 0x400; Macro_08108368(r6, -0x3000, 0); Macro_08108368(r6, -0x7000, 0); - r6->unkC.unk8 ^= 0x400; + r6->sprite.unk8 ^= 0x400; } } @@ -4423,22 +4272,22 @@ void sub_08108960(struct Object2 *r4) sub_0803E3B0(r5); r5->unk0 = 3; - r5->unk34 = r4->base.x; - r5->unk38 = r4->base.y; - r5->unk44 = r4; + r5->x = r4->base.x; + r5->y = r4->base.y; + r5->parent = r4; r5->roomId = r4->base.roomId; - r5->unk38 -= 0x4000; - sub_080709F8(r5, &r5->unkC, 0x30, 0x399, 14, 25); - r5->unkC.unk1F = 0; + r5->y -= 0x4000; + sub_080709F8(r5, &r5->sprite, 0x30, 0x399, 14, 25); + r5->sprite.unk1F = 0; r5->unk4 = 14; - Macro_081050E8(r5, &r5->unkC, 0x39A, !r5->unkC.unk1F); + Macro_081050E8(r5, &r5->sprite, 0x39A, !r5->sprite.unk1F); } void sub_08108A50(void) { struct Sprite sprite; struct Object4 *r0, *r6 = TaskGetStructPtr(gCurTask, r0); - struct Object2 *r7 = r6->unk44; + struct Object2 *r7 = r6->parent; if (r6->flags & 0x1000) TaskDestroy(gCurTask); @@ -4446,84 +4295,35 @@ void sub_08108A50(void) r6->flags |= 0x1000; else { - Macro_08107BA8_4(r6, &r6->unkC, &sprite, 0x30, &r6->unkC); - Macro_081050E8(r6, &r6->unkC, 0x39A, !r6->unkC.unk1F); + Macro_08107BA8_4(r6, &r6->sprite, &sprite, 0x30, &r6->sprite); + Macro_081050E8(r6, &r6->sprite, 0x39A, !r6->sprite.unk1F); Macro_0809E55C(r6); - r6->unk34 = r7->base.x; - r6->unk38 = r7->base.y; + r6->x = r7->base.x; + r6->y = r7->base.y; if (!Macro_0810B1F4(&r7->base) || r7->base.flags & 0x2000) { - s32 r0; - if (!--r6->unk4) { r6->flags |= 0x1000; return; } r6->flags |= 4; - if (r6->flags & 1) - { - struct Sprite *r0 = &r6->unkC; - - r0->unk8 = r6->unkC.unk8 | 0x400; - } - else - { - struct Sprite *r0 = &r6->unkC; - - r0->unk8 = r6->unkC.unk8 & ~0x400; - } - if (!(r6->flags & 8)) - { - if ((r6->unkC.unk1B != r6->unkC.unk1A || r6->unkC.unk18 != r6->unkC.unkC) - && r6->unkC.unk1C) - { - r6->unk1 = 0; - r6->unk2 = 0; - r6->flags &= ~4; - } - r0 = sub_08155128(&r6->unkC); - if (!r0) - { - r6->flags |= 2; - if (r6->flags & 4 && r6->unkC.unk1C) - { - r6->unkC.unk1B = 0xFF; - r6->flags &= ~4; - r6->unk1 = 0; - r6->unk2 = r0; - sub_08155128(&r6->unkC); - } - } - else - { - r6->unk2 += r6->unkC.unk1C; - r6->unk1 = r6->unk2 >> 4; - r6->flags &= ~2; - } - } - r6->unkC.unk10 = (r6->unk34 >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unkC >> 8) + r6->unk40; - r6->unkC.unk12 = (r6->unk38 >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unk10 >> 8) + r6->unk41; - if (r6->unkC.unk1C) - { - r6->unk40 = 0; - r6->unk41 = 0; - } + Macro_080FC150(r6); } - r6->unkC.unk8 ^= 0x400; + r6->sprite.unk8 ^= 0x400; Macro_08108368(r6, 0x1400, -0x2400); Macro_08108368(r6, 0x2C00, -0x6400); - r6->unkC.unk8 ^= 0x400; + r6->sprite.unk8 ^= 0x400; Macro_08108368(r6, -0x1400, -0x2400); Macro_08108368(r6, -0x2C00, -0x6400); - r6->unkC.unk8 ^= 0x800; + r6->sprite.unk8 ^= 0x800; Macro_08108368(r6, -0x1400, 0x2400); Macro_08108368(r6, -0x2C00, 0x6400); - r6->unkC.unk8 ^= 0x400; + r6->sprite.unk8 ^= 0x400; Macro_08108368(r6, 0x1400, 0x2400); Macro_08108368(r6, 0x2C00, 0x6400); - r6->unkC.unk8 ^= 0x800; + r6->sprite.unk8 ^= 0x800; } } @@ -4540,11 +4340,11 @@ struct Object4 *sub_08109304(struct Object2 *sp10, u8 sp08) r5 = r0; sub_0803E3B0(r4); r4->unk0 = 3; - r4->unk34 = sp10->base.x; - r4->unk38 = sp10->base.y; - r4->unk44 = sp10; + r4->x = sp10->base.x; + r4->y = sp10->base.y; + r4->parent = sp10; r4->roomId = sp10->base.roomId; - r4->unk44 = sp10->base.parent; + r4->parent = sp10->base.parent; r4->unk4 = 0; for (i = 0; i < 4; ++i) { @@ -4556,9 +4356,9 @@ struct Object4 *sub_08109304(struct Object2 *sp10, u8 sp08) if (Rand16() & 1) r5->unk68[i][1] = -r5->unk68[i][1]; } if (sp08) sp0C = 17; - sub_080709F8(r4, &r4->unkC, 4, 0x399, sp0C, 0x18); - r4->unkC.unk1F = 0; - Macro_081050E8(r4, &r4->unkC, 0x39A, 1); + sub_080709F8(r4, &r4->sprite, 4, 0x399, sp0C, 0x18); + r4->sprite.unk1F = 0; + Macro_081050E8(r4, &r4->sprite, 0x39A, 1); return r4; } @@ -4573,7 +4373,7 @@ void sub_081094C4(void) TaskGetStructPtr(gCurTask, r0); r6 = &r0->unk0; - sp28 = r6->unk44; + sp28 = r6->parent; sp2C = r0; if (r6->flags & 0x1000) TaskDestroy(gCurTask); @@ -4583,75 +4383,26 @@ void sub_081094C4(void) { u8 r0; - Macro_08107BA8_4(r6, &r6->unkC, &sprite, 4, &r6->unkC); - Macro_081050E8(r6, &r6->unkC, 0x39A, !r6->unkC.unk1F); + Macro_08107BA8_4(r6, &r6->sprite, &sprite, 4, &r6->sprite); + Macro_081050E8(r6, &r6->sprite, 0x39A, !r6->sprite.unk1F); r6->roomId = sp28->base.roomId; if (Macro_0810B1F4(&sp28->base) && !(sp28->base.flags & 0x2000)) { - s32 r4 = r6->unk34, r5 = r6->unk38; + s32 r4 = r6->x, r5 = r6->y; for (r8 = 0; r8 < 4; ++r8) { - r6->unk34 = sp2C->unk48[r8][0]; - r6->unk38 = sp2C->unk48[r8][1]; + r6->x = sp2C->unk48[r8][0]; + r6->y = sp2C->unk48[r8][1]; sub_0803DBC8(r6); } - r6->unk34 = r4; - r6->unk38 = r5; + r6->x = r4; + r6->y = r5; } else { - s32 r0; - - if (r6->flags & 1) - { - struct Sprite *r0 = &r6->unkC; - - r0->unk8 = r6->unkC.unk8 | 0x400; - } - else - { - struct Sprite *r0 = &r6->unkC; - - r0->unk8 = r6->unkC.unk8 & ~0x400; - } - if (!(r6->flags & 8)) - { - if ((r6->unkC.unk1B != r6->unkC.unk1A || r6->unkC.unk18 != r6->unkC.unkC) - && r6->unkC.unk1C) - { - r6->unk1 = 0; - r6->unk2 = 0; - r6->flags &= ~4; - } - r0 = sub_08155128(&r6->unkC); - if (!r0) - { - r6->flags |= 2; - if (r6->flags & 4 && r6->unkC.unk1C) - { - r6->unkC.unk1B = 0xFF; - r6->flags &= ~4; - r6->unk1 = 0; - r6->unk2 = r0; - sub_08155128(&r6->unkC); - } - } - else - { - r6->unk2 += r6->unkC.unk1C; - r6->unk1 = r6->unk2 >> 4; - r6->flags &= ~2; - } - } - r6->unkC.unk10 = (r6->unk34 >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unkC >> 8) + r6->unk40; - r6->unkC.unk12 = (r6->unk38 >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unk10 >> 8) + r6->unk41; - if (r6->unkC.unk1C) - { - r6->unk40 = 0; - r6->unk41 = 0; - } + Macro_080FC150(r6); for (r8 = 0; r8 < 4; ++r8) { sp2C->unk48[r8][1] -= sp2C->unk68[r8][0]; @@ -4664,9 +4415,9 @@ void sub_081094C4(void) sp2C->unk68[r8][0] += 8; else sp2C->unk68[r8][0] -= 8; - r6->unkC.unk10 = ((sp2C->unk48[r8][0] + (sp28->base.unk54 * 0x100)) >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unkC >> 8); - r6->unkC.unk12 = ((sp2C->unk48[r8][1] + (sp28->base.unk55 * 0x100)) >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unk10 >> 8); - Macro_08106BE0(r6, &r6->unkC); + r6->sprite.unk10 = ((sp2C->unk48[r8][0] + (sp28->base.objBase54 * 0x100)) >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unkC >> 8); + r6->sprite.unk12 = ((sp2C->unk48[r8][1] + (sp28->base.objBase55 * 0x100)) >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unk10 >> 8); + Macro_08106BE0(r6, &r6->sprite); } if (++r6->unk4 > 0x20) { @@ -5018,7 +4769,7 @@ void sub_0810A034(struct DarkMindBomb *r4) if (!Macro_0810B1F4(&r4->unk0.base)) { if (r4->unk0.base.flags & 0x1000000) - r4->unk0.base.unk54 += 2 * (gUnk_0203AD40 & 2); + r4->unk0.base.objBase54 += 2 * (gUnk_0203AD40 & 2); if (r4->unk0.unk80 <= 0) r4->unk0.base.unkC |= 2; } @@ -5058,7 +4809,7 @@ void sub_0810A130(struct Task *t) struct Object4 *r0; TaskGetStructPtr(t, r0); - sub_0803E4D4(r0->unkC.unk1F); + sub_0803E4D4(r0->sprite.unk1F); sub_0803DCCC(t); } @@ -5458,8 +5209,8 @@ void sub_0810AC70(void) u8 c3; s32 c4; - c1 = (r7->unk0.base.x >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unkC >> 8) + r7->unk0.base.unk54; - c2 = (r7->unk0.base.y >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unk10 >> 8) + r7->unk0.base.unk55; + c1 = (r7->unk0.base.x >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unkC >> 8) + r7->unk0.base.objBase54; + c2 = (r7->unk0.base.y >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unk10 >> 8) + r7->unk0.base.objBase55; r6 = c1 + gUnk_0203AD18[0]; r4 = c2 + gUnk_0203AD18[1]; r2 = r7->unk11E; @@ -5574,8 +5325,8 @@ void sub_0810AC70(void) } if (!spr->unkC) { - r7->unk0.base.unk54 = 0; - r7->unk0.base.unk55 = 0; + r7->unk0.base.objBase54 = 0; + r7->unk0.base.objBase55 = 0; return; } if (spr->unk1B != spr->unk1A || spr->unk18 != spr->unkC) @@ -5606,8 +5357,8 @@ void sub_0810AC70(void) } if (sl->unk135 == 1 && r7->unk0.base.flags & 2) { - r7->unk0.base.unk54 = 0; - r7->unk0.base.unk55 = 0; + r7->unk0.base.objBase54 = 0; + r7->unk0.base.objBase55 = 0; return; } else @@ -5616,24 +5367,24 @@ void sub_0810AC70(void) r7->unk0.base.flags &= ~0x200; if (r7->unk0.base.flags & 0x400) { - r7->unk0.base.unk54 = 0; - r7->unk0.base.unk55 = 0; + r7->unk0.base.objBase54 = 0; + r7->unk0.base.objBase55 = 0; return; } } if (gKirbys[gUnk_0203AD3C].base.base.base.roomId != r7->unk0.base.roomId) { - r7->unk0.base.unk54 = 0; - r7->unk0.base.unk55 = 0; + r7->unk0.base.objBase54 = 0; + r7->unk0.base.objBase55 = 0; } else { - spr->unk10 = (r7->unk0.base.x >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unkC >> 8) + r7->unk0.base.unk54; - spr->unk12 = (r7->unk0.base.y >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unk10 >> 8) + r7->unk0.base.unk55; + spr->unk10 = (r7->unk0.base.x >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unkC >> 8) + r7->unk0.base.objBase54; + spr->unk12 = (r7->unk0.base.y >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unk10 >> 8) + r7->unk0.base.objBase55; spr->unk10 += gUnk_0203AD18[0]; spr->unk12 += gUnk_0203AD18[1]; - r7->unk0.base.unk55 = 0; - r7->unk0.base.unk54 = 0; + r7->unk0.base.objBase55 = 0; + r7->unk0.base.objBase54 = 0; if (sb == 0x300) spr->unk8 |= 0x400; else @@ -5687,12 +5438,12 @@ void sub_0810B1F4(void) gBldRegs.bldCnt = BLDCNT_TGT2_BG0 | BLDCNT_TGT2_BG1 | BLDCNT_TGT2_BG3; gBldRegs.bldAlpha = BLDALPHA_BLEND(0, 0x10); } - Macro_08107BA8_4(&r8->unk0.base, &r8->unk0.base.unk10, &sprite, 0x18, (&sl->unkB4)); + Macro_08107BA8_4(&r8->unk0.base, &r8->unk0.base.sprite, &sprite, 0x18, (&sl->unkB4)); if (Macro_0810B1F4(&r8->unk0.base) && !(r8->unk0.base.flags & 0x2000)) { - c1 = (r8->unk0.base.x >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unkC >> 8) + r8->unk0.base.unk54; - c2 = (r8->unk0.base.y >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unk10 >> 8) + r8->unk0.base.unk55; + c1 = (r8->unk0.base.x >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unkC >> 8) + r8->unk0.base.objBase54; + c2 = (r8->unk0.base.y >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unk10 >> 8) + r8->unk0.base.objBase55; ip = c1 + gUnk_0203AD18[0]; r7 = c2 + gUnk_0203AD18[1]; r2 = sl->unk11E; @@ -5708,8 +5459,8 @@ void sub_0810B1F4(void) if ((r4 == 0x100 || r4 == 0x200 || r4 == 0x300 || r4 == 0) && sl->unk11C == 0x100) { spr = &sl->unkB4; - spr->unk10 = (r8->unk0.base.x >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unkC >> 8) + r8->unk0.base.unk54; - spr->unk12 = (r8->unk0.base.y >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unk10 >> 8) + r8->unk0.base.unk55; + spr->unk10 = (r8->unk0.base.x >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unkC >> 8) + r8->unk0.base.objBase54; + spr->unk12 = (r8->unk0.base.y >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unk10 >> 8) + r8->unk0.base.objBase55; spr->unk10 += gUnk_0203AD18[0]; spr->unk12 += gUnk_0203AD18[1]; if (r4 == 0x300) @@ -5917,27 +5668,27 @@ void *CreateDarkMindForm2(struct Object *r5, u8 r4) r7->unk0.base.unk68 = 0; sub_0803E2B0(&r7->unk0.base, -8, 0x10, 8, 0x20); sub_0803E308(&r7->unk0.base, -40, -30, 40, 20); - r7->unk0.base.unk10.unk0 = 0x6008000; - r7->unk0.base.unk10.unk14 = 0x680; - r7->unk0.base.unk10.unkC = gUnk_08351648[r7->unk0.type].unk14[r7->unk0.unk83].unk0; - r7->unk0.base.unk10.unk1A = gUnk_08351648[r7->unk0.type].unk14[r7->unk0.unk83].unk2; - r7->unk0.base.unk10.unk16 = 0; - r7->unk0.base.unk10.unk1B = 0xFF; - r7->unk0.base.unk10.unk1C = 0x10; - r7->unk0.base.unk10.unk1F = 0; - r7->unk0.base.unk10.unk10 = 0; - r7->unk0.base.unk10.unk12 = 0; - r7->unk0.base.unk10.unk8 = 0x48000; - r7->unk0.base.unk10.unk0 = 0; + r7->unk0.base.sprite.unk0 = 0x6008000; + r7->unk0.base.sprite.unk14 = 0x680; + r7->unk0.base.sprite.unkC = gUnk_08351648[r7->unk0.type].unk14[r7->unk0.unk83].unk0; + r7->unk0.base.sprite.unk1A = gUnk_08351648[r7->unk0.type].unk14[r7->unk0.unk83].unk2; + r7->unk0.base.sprite.unk16 = 0; + r7->unk0.base.sprite.unk1B = 0xFF; + r7->unk0.base.sprite.unk1C = 0x10; + r7->unk0.base.sprite.unk1F = 0; + r7->unk0.base.sprite.unk10 = 0; + r7->unk0.base.sprite.unk12 = 0; + r7->unk0.base.sprite.unk8 = 0x48000; + r7->unk0.base.sprite.unk0 = 0; gUnk_02022EA0 = 0; gUnk_03000524 = 1; sub_080708DC(&r7->unk0.base, &r7->unkB4, 0x18, 0x399, 44, 30); r7->unkB4.unk8 |= 0x80; - r7->unk0.base.unk10.unk1F = sub_0803DF24(0x399); - if (r7->unk0.base.unk10.unk1F == 0xFF) + r7->unk0.base.sprite.unk1F = sub_0803DF24(0x399); + if (r7->unk0.base.sprite.unk1F == 0xFF) { sub_0803DFAC(0x399, 0); - r7->unk0.base.unk10.unk1F = sub_0803DF24(0x399); + r7->unk0.base.sprite.unk1F = sub_0803DF24(0x399); } r7->unkB4.unk1F = sub_0803DF24(0x39A); if (r7->unkB4.unk1F == 0xFF) @@ -7095,7 +6846,7 @@ void sub_0810DB14(struct DarkMindForm2 *r4) r4->unk0.base.xspeed = -r4->unk0.base.xspeed; } if (r4->unk0.base.counter >= 0x10) - r4->unk0.base.unk54 = gUnk_0835737C[r4->unk0.base.counter & 3]; + r4->unk0.base.objBase54 = gUnk_0835737C[r4->unk0.base.counter & 3]; if (!--r4->unk0.base.counter) { r6->unk135 = 1; @@ -7260,7 +7011,7 @@ void sub_0810DF60(struct DarkMindForm2 *ip) { struct DarkMindForm2 *r5 = ip; - ip->unk0.base.unk55 = gUnk_0835737C[ip->unk0.unk9E & 3]; + ip->unk0.base.objBase55 = gUnk_0835737C[ip->unk0.unk9E & 3]; ++ip->unk0.unk9E; if (ip->unk0.base.yspeed > 0) { @@ -7536,7 +7287,7 @@ void sub_0810E590(struct DarkMindForm2 *r4) void sub_0810E65C(struct DarkMindForm2 *r5) { - r5->unk0.base.unk55 = gUnk_0835737C[r5->unk0.unk9E & 3]; + r5->unk0.base.objBase55 = gUnk_0835737C[r5->unk0.unk9E & 3]; ++r5->unk0.unk9E; if (r5->unk0.base.yspeed > 0) { @@ -7830,7 +7581,7 @@ void sub_0810ECB4(struct DarkMindForm2 *r4) r4->unk0.base.flags |= 4; if (r4->unk0.base.counter > 8) { - r4->unk0.base.unk55 = gUnk_0835737C[r4->unk0.unk9E & 3]; + r4->unk0.base.objBase55 = gUnk_0835737C[r4->unk0.unk9E & 3]; ++r4->unk0.unk9E; } if (r4->unk0.base.counter == 8) @@ -8832,9 +8583,9 @@ void sub_08110F80(struct Object12 *r7) } if (r8->unkE3) { - sb->unk0.base.unk54 = gUnk_08357384[r8->unkE3 - 1]; - r5->unkFC->unk0.base.unk54 = sb->unk0.base.unk54; - r5->unk100->unk0.base.unk54 = sb->unk0.base.unk54; + sb->unk0.base.objBase54 = gUnk_08357384[r8->unkE3 - 1]; + r5->unkFC->unk0.base.objBase54 = sb->unk0.base.objBase54; + r5->unk100->unk0.base.objBase54 = sb->unk0.base.objBase54; if (!--r8->unkE3) r5->unk12E = 0; } @@ -8932,7 +8683,7 @@ void *sub_081113EC(struct Object *r6, u8 r5) r4->unk9E = 0; r4->unk7C = sub_0809F840; sub_0803E2B0(&r4->base, -14, -2, 14, 2); - r4->base.unk10.unk14 = 0x640; + r4->base.sprite.unk14 = 0x640; ObjectInitSprite(r4); PlaySfx(&r4->base, 436); return r4; @@ -8947,7 +8698,7 @@ void sub_08111534(struct Object2 *r3, struct Object12 *r1) r3->unk83 = 3; r3->unk78 = sub_08114714; r3->base.counter = 18; - r3->base.unk10.unk14 = 0x480; + r3->base.sprite.unk14 = 0x480; PlaySfx(&r3->base, 437); } @@ -9064,7 +8815,7 @@ void *sub_08111984(struct Object *r6, u8 r5) r4->unk9E = 0; r4->unk7C = sub_0809F840; sub_0803E2B0(&r4->base, -24, 8, 24, 0x80); - r4->base.unk10.unk14 = 0x5C0; + r4->base.sprite.unk14 = 0x5C0; ObjectInitSprite(r4); sub_08113BEC(r4); sub_08111B88(r4); @@ -9113,20 +8864,20 @@ void sub_08111B88(struct Object2 *r5) sub_0803E3B0(r4); r4->unk0 = 3; - r4->unk34 = r5->base.x; - r4->unk38 = r5->base.y; - r4->unk44 = r5; + r4->x = r5->base.x; + r4->y = r5->base.y; + r4->parent = r5; r4->roomId = r5->base.roomId; - sub_080709F8(r4, &r4->unkC, 0xC, 0x399, 0x26, 0x17); - r4->unkC.unk1F = 0; - Macro_081050E8(r4, &r4->unkC, 0x39A, TRUE); + sub_080709F8(r4, &r4->sprite, 0xC, 0x399, 0x26, 0x17); + r4->sprite.unk1F = 0; + Macro_081050E8(r4, &r4->sprite, 0x39A, TRUE); } void sub_08111C5C(void) { struct Sprite spr; struct Object4 *r0, *r5 = TaskGetStructPtr(gCurTask, r0); - struct Object2 *r7 = r5->unk44, *r3; + struct Object2 *r7 = r5->parent, *r3; if (r5->flags & 0x1000) TaskDestroy(gCurTask); @@ -9135,10 +8886,10 @@ void sub_08111C5C(void) else { r5->flags |= 4; - Macro_08107BA8_4(r5, &r5->unkC, &spr, 12, &r5->unkC); - Macro_081050E8(r5, &r5->unkC, 0x39A, !r5->unkC.unk1F); + Macro_08107BA8_4(r5, &r5->sprite, &spr, 12, &r5->sprite); + Macro_081050E8(r5, &r5->sprite, 0x39A, !r5->sprite.unk1F); r5->roomId = r7->base.roomId; - r5->unk34 = r7->base.x; + r5->x = r7->base.x; if (r7->unk83 != 1) r5->flags |= 0x400; else @@ -9146,12 +8897,12 @@ void sub_08111C5C(void) /* The following two statements appear several times in the file and I can match the other * ones w/o goto. However, identical strategies will cause regalloc issue in this one so * I'm not going to change any of them since they were likely written in the same way. */ - r3 = r5->unk44; + r3 = r5->parent; if (r3) { if (r3->base.unk0 && r3->base.flags & 0x1000) { - r5->unk44 = NULL; + r5->parent = NULL; r3 = NULL; } if (!r3) @@ -9179,23 +8930,23 @@ struct Object4 *sub_08111EF4(struct DarkMindForm2 *r6) sub_0803E3B0(r4); r4->unk0 = 3; - r4->unk34 = r5->unk0.base.x; - r4->unk38 = r5->unk0.base.y; - r4->unk44 = r5; + r4->x = r5->unk0.base.x; + r4->y = r5->unk0.base.y; + r4->parent = r5; r4->roomId = r5->unk0.base.roomId; if (r6->unk120 == 0x1000) { - r4->unk34 -= 0x2000; - r4->unk38 -= 0x1C00; + r4->x -= 0x2000; + r4->y -= 0x1C00; } if (r6->unk120 == 0x3000) { - r4->unk34 += 0x2000; - r4->unk38 -= 0x1C00; + r4->x += 0x2000; + r4->y -= 0x1C00; } - sub_080709F8(r4, &r4->unkC, 0x24, 0x399, 0x2B, 8); - r4->unkC.unk1F = 0; - Macro_081050E8(r4, &r4->unkC, 0x39A, TRUE); + sub_080709F8(r4, &r4->sprite, 0x24, 0x399, 0x2B, 8); + r4->sprite.unk1F = 0; + Macro_081050E8(r4, &r4->sprite, 0x39A, TRUE); r4->unk4 = 0x20; return r4; } @@ -9204,7 +8955,7 @@ void sub_08112024(void) { struct Sprite spr; struct Object4 *r0, *r5 = TaskGetStructPtr(gCurTask, r0); - struct Object2 *r8 = r5->unk44, *r3; + struct Object2 *r8 = r5->parent, *r3; if (r5->flags & 0x1000) TaskDestroy(gCurTask); @@ -9212,15 +8963,15 @@ void sub_08112024(void) r5->flags |= 0x1000; else { - Macro_08107BA8_4(r5, &r5->unkC, &spr, 0x24, &r5->unkC); - Macro_081050E8(r5, &r5->unkC, 0x39A, !r5->unkC.unk1F); + Macro_08107BA8_4(r5, &r5->sprite, &spr, 0x24, &r5->sprite); + Macro_081050E8(r5, &r5->sprite, 0x39A, !r5->sprite.unk1F); r5->roomId = r8->base.roomId; - r3 = r5->unk44; + r3 = r5->parent; if (r3) { if (r3->base.unk0 && r3->base.flags & 0x1000) { - r5->unk44 = NULL; + r5->parent = NULL; r3 = NULL; } if (!r3) @@ -9250,21 +9001,21 @@ struct Object4 *sub_081122A0(struct Object2 *r6, u8 sb) sub_0803E3B0(r4); r4->unk0 = 3; - r4->unk34 = r6->base.x; - r4->unk38 = r6->base.y; - r4->unk44 = r6; + r4->x = r6->base.x; + r4->y = r6->base.y; + r4->parent = r6; r4->roomId = r6->base.roomId; - sub_080709F8(r4, &r4->unkC, 0x24, 0x399, 0x2a, 10); - r4->unkC.unk1F = 0; + sub_080709F8(r4, &r4->sprite, 0x24, 0x399, 0x2a, 10); + r4->sprite.unk1F = 0; if (sb) r4->flags |= 1; - Macro_081050E8(r4, &r4->unkC, 0x39A, !r4->unkC.unk1F); + Macro_081050E8(r4, &r4->sprite, 0x39A, !r4->sprite.unk1F); r4->unk4 = 0x20; if (r4->flags & 1) - r4->unk34 = r6->base.x - 0x1400; + r4->x = r6->base.x - 0x1400; else - r4->unk34 = r6->base.x + 0x1400; - r4->unk38 = r6->base.y + 0x8D00; + r4->x = r6->base.x + 0x1400; + r4->y = r6->base.y + 0x8D00; return r4; } @@ -9272,7 +9023,7 @@ void sub_081123CC(void) { struct Sprite spr; struct Object4 *r0, *r5 = TaskGetStructPtr(gCurTask, r0); - struct Object2 *r8 = r5->unk44, *r3; + struct Object2 *r8 = r5->parent, *r3; if (r5->flags & 0x1000) TaskDestroy(gCurTask); @@ -9280,19 +9031,19 @@ void sub_081123CC(void) r5->flags |= 0x1000; else { - Macro_08107BA8_4(r5, &r5->unkC, &spr, 9, &r5->unkC); - Macro_081050E8(r5, &r5->unkC, 0x39A, !r5->unkC.unk1F); + Macro_08107BA8_4(r5, &r5->sprite, &spr, 9, &r5->sprite); + Macro_081050E8(r5, &r5->sprite, 0x39A, !r5->sprite.unk1F); r5->roomId = r8->base.roomId; if (r8->unk83 != 1) r5->flags |= 0x400; else r5->flags &= ~0x400; - r3 = r5->unk44; + r3 = r5->parent; if (r3) { if (r3->base.unk0 && r3->base.flags & 0x1000) { - r5->unk44 = NULL; + r5->parent = NULL; r3 = NULL; } if (!r3) @@ -9312,11 +9063,11 @@ void sub_081123CC(void) if (r5->flags & 2) { if (r5->flags & 1) - r5->unk34 = r8->base.x - 0x1400; + r5->x = r8->base.x - 0x1400; else - r5->unk34 = r8->base.x + 0x1400; - r5->unk38 = r8->base.y + 0x8D00; - r5->unk34 += (4 - (Rand16() & 7)) * 0x100; + r5->x = r8->base.x + 0x1400; + r5->y = r8->base.y + 0x8D00; + r5->x += (4 - (Rand16() & 7)) * 0x100; } sub_0806FAC8(r5); } @@ -9332,9 +9083,9 @@ struct Object4 *sub_081126C0(struct DarkMindForm2 *sb, u8 sp08) sub_0803E3B0(r6); r6->unk0 = 3; - r6->unk34 = sb->unk0.base.x; - r6->unk38 = sb->unk0.base.y; - r6->unk44 = sb; + r6->x = sb->unk0.base.x; + r6->y = sb->unk0.base.y; + r6->parent = sb; r6->roomId = sb->unk0.base.roomId; r6->unk4 = 0; for (i = 0; i < 4; ++i) @@ -9344,16 +9095,16 @@ struct Object4 *sub_081126C0(struct DarkMindForm2 *sb, u8 sp08) r8->unk68[i] = (Rand16() & 0x7FF) + 0x400; } if (sp08) sp0C = 41; - sub_080709F8(r6, &r6->unkC, 1, 0x399, sp0C, 10); - r6->unkC.unk1F = 0; + sub_080709F8(r6, &r6->sprite, 1, 0x399, sp0C, 10); + r6->sprite.unk1F = 0; if (sp08) r6->flags |= 1; - Macro_081050E8(r6, &r6->unkC, 0x39A, !r6->unkC.unk1F); + Macro_081050E8(r6, &r6->sprite, 0x39A, !r6->sprite.unk1F); if (r6->flags & 1) - r6->unk34 = sb->unk0.base.x - 0x1400; + r6->x = sb->unk0.base.x - 0x1400; else - r6->unk34 = sb->unk0.base.x + 0x1400; - r6->unk38 = sb->unk0.base.y + 0x8D00; + r6->x = sb->unk0.base.x + 0x1400; + r6->y = sb->unk0.base.y + 0x8D00; return r6; } @@ -9363,9 +9114,9 @@ void sub_08112880(void) u8 r8; struct Object13 *r0 = TaskGetStructPtr(gCurTask, r0); struct Object4 *r5 = &r0->unk0; - struct Object2 *sp28 = r5->unk44; + struct Object2 *sp28 = r5->parent; struct Object13 *sp2C = r0; - struct DarkMindForm2 *r7 = r5->unk44; + struct DarkMindForm2 *r7 = r5->parent; if (r5->flags & 0x1000) { @@ -9377,77 +9128,28 @@ void sub_08112880(void) r5->flags |= 0x1000; return; } - Macro_08107BA8_4(r5, &r5->unkC, &sprite, 1, &r5->unkC); - Macro_081050E8(r5, &r5->unkC, 0x39A, !r5->unkC.unk1F); + Macro_08107BA8_4(r5, &r5->sprite, &sprite, 1, &r5->sprite); + Macro_081050E8(r5, &r5->sprite, 0x39A, !r5->sprite.unk1F); r5->roomId = sp28->base.roomId; if (Macro_0810B1F4(&sp28->base) && !(sp28->base.flags & 0x2000)) { - s32 r6 = r5->unk34, r7 = r5->unk38; + s32 r6 = r5->x, r7 = r5->y; for (r8 = 0; r8 < 4; ++r8) { - r5->unk34 = sp2C->unk48[r8][0]; - r5->unk38 = sp2C->unk48[r8][1]; + r5->x = sp2C->unk48[r8][0]; + r5->y = sp2C->unk48[r8][1]; sub_0803DBC8(r5); } - r5->unk34 = r6; - r5->unk38 = r7; + r5->x = r6; + r5->y = r7; } else { - s32 r0; - if (!r7->laserShower || r7->laserShower->base.flags & 0x1000) r5->unk4 = 1; - if (r5->flags & 1) - { - struct Sprite *r0 = &r5->unkC; - - r0->unk8 = r5->unkC.unk8 | 0x400; - } - else - { - struct Sprite *r0 = &r5->unkC; - - r0->unk8 = r5->unkC.unk8 & ~0x400; - } - if (!(r5->flags & 8)) - { - if ((r5->unkC.unk1B != r5->unkC.unk1A || r5->unkC.unk18 != r5->unkC.unkC) - && r5->unkC.unk1C) - { - r5->unk1 = 0; - r5->unk2 = 0; - r5->flags &= ~4; - } - r0 = sub_08155128(&r5->unkC); - if (!r0) - { - r5->flags |= 2; - if (r5->flags & 4 && r5->unkC.unk1C) - { - r5->unkC.unk1B = 0xFF; - r5->flags &= ~4; - r5->unk1 = 0; - r5->unk2 = r0; - sub_08155128(&r5->unkC); - } - } - else - { - r5->unk2 += r5->unkC.unk1C; - r5->unk1 = r5->unk2 >> 4; - r5->flags &= ~2; - } - } - r5->unkC.unk10 = (r5->unk34 >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unkC >> 8) + r5->unk40; - r5->unkC.unk12 = (r5->unk38 >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unk10 >> 8) + r5->unk41; - if (r5->unkC.unk1C) - { - r5->unk40 = 0; - r5->unk41 = 0; - } + Macro_080FC150(r5); for (r8 = 0; r8 < 4; ++r8) { sp2C->unk48[r8][1] -= sp2C->unk68[r8]; @@ -9462,9 +9164,9 @@ void sub_08112880(void) sp2C->unk48[r8][1] = sp28->base.y + 0x8D00; sp2C->unk68[r8] = (Rand16() & 0x7FF) + 0x400; } - r5->unkC.unk10 = ((sp2C->unk48[r8][0] + (sp28->base.unk54 * 0x100)) >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unkC >> 8); - r5->unkC.unk12 = ((sp2C->unk48[r8][1] + (sp28->base.unk55 * 0x100)) >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unk10 >> 8); - Macro_08106BE0(r5, &r5->unkC); + r5->sprite.unk10 = ((sp2C->unk48[r8][0] + (sp28->base.objBase54 * 0x100)) >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unkC >> 8); + r5->sprite.unk12 = ((sp2C->unk48[r8][1] + (sp28->base.objBase55 * 0x100)) >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unk10 >> 8); + Macro_08106BE0(r5, &r5->sprite); } if (!sp2C->unk68[0] && !sp2C->unk68[1] && !sp2C->unk68[2] && !sp2C->unk68[3]) r5->flags |= 0x1000; @@ -9527,7 +9229,7 @@ void *CreateDarkMindMirrorCutter(struct Object *r6, u8 r4) r5->unk9E = 0; r5->unk7C = sub_0809F840; sub_0803E2B0(&r5->base, -8, -4, 8, 4); - r5->base.unk10.unk14 = 0x5C0; + r5->base.sprite.unk14 = 0x5C0; ObjectInitSprite(r5); sub_08113C10(r5); return r5; @@ -10368,7 +10070,7 @@ void sub_0811468C(struct Object12 *r2) void sub_081146B0(struct Object12 *r4) { sub_080708DC(&r4->unk0.base, &r4->unkB4, 0x28, 0x399, 0x19, 0x1B); - r4->unk0.base.unk10.unk1F = 0; + r4->unk0.base.sprite.unk1F = 0; r4->unkB4.unk1F = sub_0803DF24(0x39A); if (r4->unkB4.unk1F == 0xFF) { @@ -10387,7 +10089,7 @@ void sub_08114714(struct Object2 *r2) r2->base.flags |= 4; if (!--r2->base.counter) { - r2->base.unk10.unk14 = 1600; + r2->base.sprite.unk14 = 1600; sub_081115F4(r2); } } @@ -10668,8 +10370,8 @@ void sub_08114CBC(struct DarkMindTrigger *r6) if (Rand16() & 7) { sub_08117964(r6, 0, -0x2A0, 0); - r6->unk0.base.unk55 -= 2; - r8->unkB4->unk41 = r6->unk0.base.unk55; + r6->unk0.base.objBase55 -= 2; + r8->unkB4->objBase55 = r6->unk0.base.objBase55; PlaySfx(&r6->unk0.base, 426); } else @@ -10677,8 +10379,8 @@ void sub_08114CBC(struct DarkMindTrigger *r6) sub_08117A9C(r6, 0, -0x2A0, 0xC, 0); sub_08117A9C(r6, 0, -0x2A0, -0xC, 0); r6->unk0.base.xspeed = 0; - r6->unk0.base.unk55 -= 4; - r8->unkB4->unk41 = r6->unk0.base.unk55; + r6->unk0.base.objBase55 -= 4; + r8->unkB4->objBase55 = r6->unk0.base.objBase55; PlaySfx(&r6->unk0.base, 426); } } @@ -10801,8 +10503,8 @@ void sub_0811530C(struct DarkMindTrigger *r4) void sub_08115370(struct DarkMindTrigger *r6) { r6->unk0.base.flags |= 4; - r6->unk0.base.unk54 += 2 * (gUnk_0203AD40 & 2); - r6->unkB4->unk40 = r6->unk0.base.unk54; + r6->unk0.base.objBase54 += 2 * (gUnk_0203AD40 & 2); + r6->unkB4->objBase54 = r6->unk0.base.objBase54; if (!--r6->unk0.base.counter) { PlaySfx(&r6->unk0.base, 426); @@ -10839,8 +10541,8 @@ void sub_08115504(struct DarkMindTrigger *r4) r4->unk0.base.flags |= 4; if (r4->unk0.base.counter) { - r4->unk0.base.unk54 += 2 * (gUnk_0203AD40 & 2); - r7->unkB4->unk40 = r4->unk0.base.unk54; + r4->unk0.base.objBase54 += 2 * (gUnk_0203AD40 & 2); + r7->unkB4->objBase54 = r4->unk0.base.objBase54; if (!--r4->unk0.base.counter) r4->unk0.base.yspeed = 0x40; } @@ -10851,8 +10553,8 @@ void sub_08115504(struct DarkMindTrigger *r4) PlaySfx(&r4->unk0.base, 426); sub_08117964(r4, 0, -0x600, 1); } - r4->unk0.base.unk55 += 2 * (gUnk_0203AD40 & 2); - r7->unkB4->unk41 = r4->unk0.base.unk55; + r4->unk0.base.objBase55 += 2 * (gUnk_0203AD40 & 2); + r7->unkB4->objBase55 = r4->unk0.base.objBase55; if (!--r4->unk0.unk9F) { sub_08114BA0(r4); @@ -10868,8 +10570,8 @@ void sub_08115638(struct DarkMindTrigger *r4) r4->unk0.base.flags |= 4; if (r4->unk0.base.counter) { - r4->unk0.base.unk54 += 2 * (gUnk_0203AD40 & 2); - r7->unkB4->unk40 = r4->unk0.base.unk54; + r4->unk0.base.objBase54 += 2 * (gUnk_0203AD40 & 2); + r7->unkB4->objBase54 = r4->unk0.base.objBase54; if (!--r4->unk0.base.counter) { r4->unk0.base.yspeed = 0x40; @@ -10898,8 +10600,8 @@ void sub_08115638(struct DarkMindTrigger *r4) PlaySfx(&r4->unk0.base, 426); sub_08117964(r4, 0, -0x400, 0); } - r4->unk0.base.unk55 += 2 * (gUnk_0203AD40 & 2); - r7->unkB4->unk41 = r4->unk0.base.unk55; + r4->unk0.base.objBase55 += 2 * (gUnk_0203AD40 & 2); + r7->unkB4->objBase55 = r4->unk0.base.objBase55; if (!--r4->unk0.unk9F) { sub_08114BA0(r4); @@ -10929,8 +10631,8 @@ void sub_0811589C(struct DarkMindTrigger *r4) switch (r4->unk0.unk9E) { case 0: - r4->unk0.base.unk54 += 2 * (gUnk_0203AD40 & 2); - r8->unkB4->unk40 = r4->unk0.base.unk54; + r4->unk0.base.objBase54 += 2 * (gUnk_0203AD40 & 2); + r8->unkB4->objBase54 = r4->unk0.base.objBase54; if (!--r4->unk0.base.counter) { r4->unk0.unk9F = 4; @@ -10938,8 +10640,8 @@ void sub_0811589C(struct DarkMindTrigger *r4) PlaySfx(&r4->unk0.base, 426); sub_08117964(r4, 0, -0x140, 0); r4->unk0.base.counter = 0; - r4->unk0.base.unk55 -= 4; - r8->unkB4->unk41 = r4->unk0.base.unk55; + r4->unk0.base.objBase55 -= 4; + r8->unkB4->objBase55 = r4->unk0.base.objBase55; } break; case 1: @@ -10959,8 +10661,8 @@ void sub_0811589C(struct DarkMindTrigger *r4) { PlaySfx(&r4->unk0.base, 426); sub_08117964(r4, 0, -0x190, 0); - r4->unk0.base.unk55 -= 4; - r8->unkB4->unk41 = r4->unk0.base.unk55; + r4->unk0.base.objBase55 -= 4; + r8->unkB4->objBase55 = r4->unk0.base.objBase55; } if (++r4->unk0.base.counter > 4) { @@ -10981,8 +10683,8 @@ void sub_0811589C(struct DarkMindTrigger *r4) { PlaySfx(&r4->unk0.base, 426); sub_08117964(r4, 0, -0x218, 0); - r4->unk0.base.unk55 -= 4; - r8->unkB4->unk41 = r4->unk0.base.unk55; + r4->unk0.base.objBase55 -= 4; + r8->unkB4->objBase55 = r4->unk0.base.objBase55; } if (++r4->unk0.base.counter > 4) { @@ -11003,8 +10705,8 @@ void sub_0811589C(struct DarkMindTrigger *r4) { PlaySfx(&r4->unk0.base, 426); sub_08117964(r4, 0, -0x340, 0); - r4->unk0.base.unk55 -= 4; - r8->unkB4->unk41 = r4->unk0.base.unk55; + r4->unk0.base.objBase55 -= 4; + r8->unkB4->objBase55 = r4->unk0.base.objBase55; } if (++r4->unk0.base.counter > 4) { @@ -11025,8 +10727,8 @@ void sub_0811589C(struct DarkMindTrigger *r4) { PlaySfx(&r4->unk0.base, 426); sub_08117964(r4, 0, -0x640, 0); - r4->unk0.base.unk55 -= 4; - r8->unkB4->unk41 = r4->unk0.base.unk55; + r4->unk0.base.objBase55 -= 4; + r8->unkB4->objBase55 = r4->unk0.base.objBase55; } if (++r4->unk0.base.counter > 4) { @@ -11054,8 +10756,8 @@ void sub_08115E2C(struct DarkMindTrigger *r4) switch (r4->unk0.unk9E) { case 0: - r4->unk0.base.unk54 += 2 * (gUnk_0203AD40 & 2); - r3->unkB4->unk40 = r4->unk0.base.unk54; + r4->unk0.base.objBase54 += 2 * (gUnk_0203AD40 & 2); + r3->unkB4->objBase54 = r4->unk0.base.objBase54; if (!--r4->unk0.base.counter) { r4->unk0.base.counter = 8; @@ -11218,10 +10920,10 @@ void sub_081164E0(struct DarkMindTrigger *r6) void sub_08116654(struct DarkMindTrigger *r4) { r4->unk0.base.flags |= 4; - r4->unk0.base.unk54 = gUnk_08357B14[(r4->unk0.base.counter >> 2) & 3]; - r4->unk0.base.unk55 = gUnk_08357B14[((r4->unk0.base.counter + 1) >> 2) & 3]; - r4->unkB4->unk40 = r4->unk0.base.unk54; - r4->unkB4->unk41 = r4->unk0.base.unk55; + r4->unk0.base.objBase54 = gUnk_08357B14[(r4->unk0.base.counter >> 2) & 3]; + r4->unk0.base.objBase55 = gUnk_08357B14[((r4->unk0.base.counter + 1) >> 2) & 3]; + r4->unkB4->objBase54 = r4->unk0.base.objBase54; + r4->unkB4->objBase55 = r4->unk0.base.objBase55; if (!(r4->unk0.base.counter & 0x1F)) PlaySfx(&r4->unk0.base, 595); ++r4->unk0.base.counter; @@ -11345,15 +11047,15 @@ void sub_08116C54(struct DarkMindTrigger *r6) { struct Object4 *r0; - r6->unk0.base.unk54 = gUnk_08357B14[(r6->unkBC >> 2) & 3]; - r6->unk0.base.unk55 = gUnk_08357B14[((r6->unkBC + 1) >> 2) & 3]; - r6->unkB4->unk40 = r6->unk0.base.unk54; - r6->unkB4->unk41 = r6->unk0.base.unk55; + r6->unk0.base.objBase54 = gUnk_08357B14[(r6->unkBC >> 2) & 3]; + r6->unk0.base.objBase55 = gUnk_08357B14[((r6->unkBC + 1) >> 2) & 3]; + r6->unkB4->objBase54 = r6->unk0.base.objBase54; + r6->unkB4->objBase55 = r6->unk0.base.objBase55; if (!(r6->unkBC & 7)) { r0 = sub_0808AE30(&r6->unk0.base, 0, 0x298, Rand16() & 1); - r0->unk34 += ((0x10 - (Rand16() & 0x1F)) * 0x100); - r0->unk38 += ((0x10 - (Rand16() & 0x1F)) * 0x100); + r0->x += ((0x10 - (Rand16() & 0x1F)) * 0x100); + r0->y += ((0x10 - (Rand16() & 0x1F)) * 0x100); sub_08117F6C(r6); } if (!(r6->unkBC & 0xF)) @@ -11362,8 +11064,8 @@ void sub_08116C54(struct DarkMindTrigger *r6) if (!(Rand16() & 3)) { r0 = sub_0808AE30(&r6->unk0.base, 0, 0x292, Rand16() % 4); - r0->unk34 += ((0x10 - (Rand16() & 0x1F)) * 0x100); - r0->unk38 += ((0x10 - (Rand16() & 0x1F)) * 0x100); + r0->x += ((0x10 - (Rand16() & 0x1F)) * 0x100); + r0->y += ((0x10 - (Rand16() & 0x1F)) * 0x100); } if (!(Rand16() & 3)) sub_08117C84(r6); @@ -11396,10 +11098,10 @@ void sub_08116E74(struct DarkMindTrigger *r4) struct DarkMindTrigger *r5 = r4; r4->unk0.base.flags |= 4; - r4->unk0.base.unk54 = gUnk_08357B14[(r4->unk0.base.counter >> 2) & 3]; - r4->unk0.base.unk55 = gUnk_08357B14[((r4->unk0.base.counter + 1) >> 2) & 3]; - r5->unkB4->unk40 = r4->unk0.base.unk54; - r5->unkB4->unk41 = r4->unk0.base.unk55; + r4->unk0.base.objBase54 = gUnk_08357B14[(r4->unk0.base.counter >> 2) & 3]; + r4->unk0.base.objBase55 = gUnk_08357B14[((r4->unk0.base.counter + 1) >> 2) & 3]; + r5->unkB4->objBase54 = r4->unk0.base.objBase54; + r5->unkB4->objBase55 = r4->unk0.base.objBase55; sub_08116C54(r4); if (r4->unk0.base.xspeed) { @@ -11444,10 +11146,10 @@ void sub_08116E74(struct DarkMindTrigger *r4) if ((r4->unk0.base.flags & 0x40000 && r4->unk0.base.counter > 300) || r4->unk0.base.counter > 480) { - r4->unk0.base.unk54 = 0; - r4->unk0.base.unk55 = 0; - r5->unkB4->unk40 = r4->unk0.base.unk54; - r5->unkB4->unk41 = r4->unk0.base.unk55; + r4->unk0.base.objBase54 = 0; + r4->unk0.base.objBase55 = 0; + r5->unkB4->objBase54 = r4->unk0.base.objBase54; + r5->unkB4->objBase55 = r4->unk0.base.objBase55; sub_08116FFC(r4); if (r4->unk0.base.flags & 0x40000) { @@ -11507,13 +11209,13 @@ struct Object4 *sub_081171BC(struct DarkMindTrigger *r5) sub_0803E3B0(r4); r4->unk0 = 3; - r4->unk34 = r5->unk0.base.x; - r4->unk38 = r5->unk0.base.y; - r4->unk44 = &r5->unk0; + r4->x = r5->unk0.base.x; + r4->y = r5->unk0.base.y; + r4->parent = &r5->unk0; r4->roomId = r5->unk0.base.roomId; - sub_080709F8(r4, &r4->unkC, 42, 0x39C, 2, 26); - r4->unkC.unk1F = 0; - Macro_081050E8(r4, &r4->unkC, 0x39C, 1); + sub_080709F8(r4, &r4->sprite, 42, 0x39C, 2, 26); + r4->sprite.unk1F = 0; + Macro_081050E8(r4, &r4->sprite, 0x39C, 1); return r4; } @@ -11521,7 +11223,7 @@ void sub_08117298(void) { struct Sprite sprite; struct Object4 *r0, *r5 = TaskGetStructPtr(gCurTask, r0); - struct Object2 *r7 = r5->unk44, *r3; + struct Object2 *r7 = r5->parent, *r3; if (r5->flags & 0x1000) TaskDestroy(gCurTask); @@ -11529,20 +11231,20 @@ void sub_08117298(void) r5->flags |= 0x1000; else { - Macro_08107BA8_4(r5, &r5->unkC, &sprite, 42, &r5->unkC); - Macro_081050E8(r5, &r5->unkC, 0x39C, !r5->unkC.unk1F); + Macro_08107BA8_4(r5, &r5->sprite, &sprite, 42, &r5->sprite); + Macro_081050E8(r5, &r5->sprite, 0x39C, !r5->sprite.unk1F); r5->flags &= ~0x405; r5->flags |= r7->base.flags & 0x404; r5->flags |= (r7->base.flags ^ 1) & 1; r5->roomId = r7->base.roomId; - r5->unk34 = r7->base.x; - r5->unk38 = r7->base.y; - r3 = r5->unk44; + r5->x = r7->base.x; + r5->y = r7->base.y; + r3 = r5->parent; if (r3) { if (r3->base.unk0 && r3->base.flags & 0x1000) { - r5->unk44 = NULL; + r5->parent = NULL; r3 = NULL; } if (!r3) @@ -11565,8 +11267,8 @@ void sub_08117298(void) void sub_08117530(void) { struct Object4 *r0, *r7 = TaskGetStructPtr(gCurTask, r0); - struct Object2 *sl = r7->unk44; - struct DarkMindTrigger *sp00 = r7->unk44; + struct Object2 *sl = r7->parent; + struct DarkMindTrigger *sp00 = r7->parent; if (r7->flags & 0x1000) TaskDestroy(gCurTask); @@ -11580,45 +11282,45 @@ void sub_08117530(void) r7->flags |= 0x1000; if (r7->unk4 & 1) { - r7->unk34 = sl->base.x; - r7->unk38 = sl->base.y; - r7->unkC.unk0 = sl->base.unk10.unk0; - r7->unkC.unk4 = sl->base.unk10.unk4; - r7->unkC.unk8 = sl->base.unk10.unk8; - r7->unkC.unkC = sl->base.unk10.unkC; - r7->unkC.unkE = sl->base.unk10.unkE; - r7->unkC.unk14 = 0x6C0; - r7->unkC.unk16 = sl->base.unk10.unk16; - r7->unkC.unk1A = sl->base.unk10.unk1A; - r7->unkC.unk1B = sl->base.unk10.unk1B; - r7->unkC.unk1C = sl->base.unk10.unk1C; - r7->unkC.unk1D = sl->base.unk10.unk1D; - r7->unkC.unk1E = sl->base.unk10.unk1E; - r7->unkC.unk1F = sl->base.unk10.unk1F; + r7->x = sl->base.x; + r7->y = sl->base.y; + r7->sprite.unk0 = sl->base.sprite.unk0; + r7->sprite.unk4 = sl->base.sprite.unk4; + r7->sprite.unk8 = sl->base.sprite.unk8; + r7->sprite.unkC = sl->base.sprite.unkC; + r7->sprite.unkE = sl->base.sprite.unkE; + r7->sprite.unk14 = 0x6C0; + r7->sprite.unk16 = sl->base.sprite.unk16; + r7->sprite.unk1A = sl->base.sprite.unk1A; + r7->sprite.unk1B = sl->base.sprite.unk1B; + r7->sprite.unk1C = sl->base.sprite.unk1C; + r7->sprite.unk1D = sl->base.sprite.unk1D; + r7->sprite.unk1E = sl->base.sprite.unk1E; + r7->sprite.unk1F = sl->base.sprite.unk1F; Macro_08108368(r7, 0, 0); - r7->unk34 = sl->base.unk48; - r7->unk38 = sl->base.unk4C; - r7->unkC.unk14 = 0x700; + r7->x = sl->base.unk48; + r7->y = sl->base.unk4C; + r7->sprite.unk14 = 0x700; Macro_08108368(r7, 0, 0); - r7->unk34 = sl->base.x; - r7->unk38 = sl->base.y; - r7->unkC.unk0 = sp00->unkB4->unkC.unk0; - r7->unkC.unk4 = sp00->unkB4->unkC.unk4; - r7->unkC.unk8 = sp00->unkB4->unkC.unk8; - r7->unkC.unkC = sp00->unkB4->unkC.unkC; - r7->unkC.unkE = sp00->unkB4->unkC.unkE; - r7->unkC.unk14 = 0x6C0; - r7->unkC.unk16 = sp00->unkB4->unkC.unk16; - r7->unkC.unk1A = sp00->unkB4->unkC.unk1A; - r7->unkC.unk1B = sp00->unkB4->unkC.unk1B; - r7->unkC.unk1C = sp00->unkB4->unkC.unk1C; - r7->unkC.unk1D = sp00->unkB4->unkC.unk1D; - r7->unkC.unk1E = sp00->unkB4->unkC.unk1E; - r7->unkC.unk1F = sp00->unkB4->unkC.unk1F; + r7->x = sl->base.x; + r7->y = sl->base.y; + r7->sprite.unk0 = sp00->unkB4->sprite.unk0; + r7->sprite.unk4 = sp00->unkB4->sprite.unk4; + r7->sprite.unk8 = sp00->unkB4->sprite.unk8; + r7->sprite.unkC = sp00->unkB4->sprite.unkC; + r7->sprite.unkE = sp00->unkB4->sprite.unkE; + r7->sprite.unk14 = 0x6C0; + r7->sprite.unk16 = sp00->unkB4->sprite.unk16; + r7->sprite.unk1A = sp00->unkB4->sprite.unk1A; + r7->sprite.unk1B = sp00->unkB4->sprite.unk1B; + r7->sprite.unk1C = sp00->unkB4->sprite.unk1C; + r7->sprite.unk1D = sp00->unkB4->sprite.unk1D; + r7->sprite.unk1E = sp00->unkB4->sprite.unk1E; + r7->sprite.unk1F = sp00->unkB4->sprite.unk1F; Macro_08108368(r7, 0, 0); - r7->unk34 = sl->base.unk48; - r7->unk38 = sl->base.unk4C; - r7->unkC.unk14 = 0x700; + r7->x = sl->base.unk48; + r7->y = sl->base.unk4C; + r7->sprite.unk14 = 0x700; Macro_08108368(r7, 0, 0); } } @@ -11685,7 +11387,7 @@ void *sub_08117BBC(struct Object *r5, u8 r4) sub_0803E2B0(&r6->base, -4, -4, 4, 4); sub_0803E308(&r6->base, -4, -4, 4, 4); ObjectInitSprite(r6); - r6->base.unk10.unk14 = 0x240; + r6->base.sprite.unk14 = 0x240; return r6; } @@ -11698,9 +11400,9 @@ void sub_08117C84(struct DarkMindTrigger *r4) sub_0803E3B0(r7); r7->unk0 = 3; - r7->unk34 = r4->unk0.base.x; - r7->unk38 = r4->unk0.base.y; - r7->unk44 = r4; + r7->x = r4->unk0.base.x; + r7->y = r4->unk0.base.y; + r7->parent = r4; r7->roomId = r4->unk0.base.roomId; #ifdef NONMATCHING r7->unk3E = -0x80 - (Rand16() & 0x3F); @@ -11711,8 +11413,8 @@ void sub_08117C84(struct DarkMindTrigger *r4) a-= 0xBF; r7->unk3E = a - b; #endif - r7->unk34 += ((0x10 - (Rand16() & 0x1F)) * 0x100); - r7->unk38 += ((0x10 - (Rand16() & 0x1F)) * 0x100); + r7->x += ((0x10 - (Rand16() & 0x1F)) * 0x100); + r7->y += ((0x10 - (Rand16() & 0x1F)) * 0x100); switch (Rand16() & 3) { default: @@ -11726,7 +11428,7 @@ void sub_08117C84(struct DarkMindTrigger *r4) break; } r7->flags |= 0x4000; - sub_080709F8(r7, &r7->unkC, 0x6012000, 0x291, r4_, 6); + sub_080709F8(r7, &r7->sprite, 0x6012000, 0x291, r4_, 6); } void sub_08117DA0(void) @@ -11738,12 +11440,12 @@ void sub_08117DA0(void) TaskDestroy(gCurTask); else { - r1 = r3->unk44; + r1 = r3->parent; if (r1) { if (r1->base.unk0 && r1->base.flags & 0x1000) { - r3->unk44 = NULL; + r3->parent = NULL; r1 = NULL; } if (!r1) @@ -11768,8 +11470,8 @@ void sub_08117DA0(void) { if (!(r3->flags & 0x800)) { - r3->unk34 += r3->unk3C; - r3->unk38 -= r3->unk3E; + r3->x += r3->unk3C; + r3->y -= r3->unk3E; } sub_0806FAC8(r3); } @@ -11784,17 +11486,17 @@ void sub_08117F6C(struct DarkMindTrigger *r4) sub_0803E3B0(r7); r7->unk0 = 3; - r7->unk34 = r4->unk0.base.x; - r7->unk38 = r4->unk0.base.y; - r7->unk44 = r4; + r7->x = r4->unk0.base.x; + r7->y = r4->unk0.base.y; + r7->parent = r4; r7->roomId = r4->unk0.base.roomId; r7->unk3E = (Rand16() & 0x3F); v = 0x200; r7->unk3E += v; - r7->unk34 += ((0x10 - (Rand16() & 0x1F)) * 0x100); - r7->unk38 += ((8 - (Rand16() & 0x1F)) * 0x100); + r7->x += ((0x10 - (Rand16() & 0x1F)) * 0x100); + r7->y += ((8 - (Rand16() & 0x1F)) * 0x100); r7->flags |= 0x4000; - sub_080709F8(r7, &r7->unkC, 0x6012000, 0x2A6, 0, 6); + sub_080709F8(r7, &r7->sprite, 0x6012000, 0x2A6, 0, 6); } void sub_08118064(void) @@ -11806,12 +11508,12 @@ void sub_08118064(void) TaskDestroy(gCurTask); else { - r1 = r3->unk44; + r1 = r3->parent; if (r1) { if (r1->base.unk0 && r1->base.flags & 0x1000) { - r3->unk44 = NULL; + r3->parent = NULL; r1 = NULL; } if (!r1) @@ -11836,8 +11538,8 @@ void sub_08118064(void) { if (!(r3->flags & 0x800)) { - r3->unk34 += r3->unk3C; - r3->unk38 -= r3->unk3E; + r3->x += r3->unk3C; + r3->y -= r3->unk3E; } sub_0806FAC8(r3); } @@ -11852,34 +11554,34 @@ void sub_08118220(struct DarkMindTrigger *r5, u8 r6) sub_0803E3B0(r4); r4->unk0 = 3; - r4->unk34 = r5->unk0.base.x; - r4->unk38 = r5->unk0.base.y; - r4->unk44 = r5; + r4->x = r5->unk0.base.x; + r4->y = r5->unk0.base.y; + r4->parent = r5; r4->roomId = r5->unk0.base.roomId; - r4->unk34 = (0xE0 - 0xA * r6) * 0x100; - r4->unk38 = 0xA000; + r4->x = (0xE0 - 0xA * r6) * 0x100; + r4->y = 0xA000; r4->unk8 = r6; - sub_080709F8(r4, &r4->unkC, 2, 0x389, 2, 0); - r4->unkC.unk1F = 0; - Macro_081050E8(r4, &r4->unkC, 0x389, 1); + sub_080709F8(r4, &r4->sprite, 2, 0x389, 2, 0); + r4->sprite.unk1F = 0; + Macro_081050E8(r4, &r4->sprite, 0x389, 1); } void sub_08118310(void) { struct Sprite sprite; struct Object4 *r0, *r5 = TaskGetStructPtr(gCurTask, r0); - struct DarkMindTrigger *r6 = r5->unk44, *r1; + struct DarkMindTrigger *r6 = r5->parent, *r1; if (r5->flags & 0x1000) TaskDestroy(gCurTask); else { - r1 = r5->unk44; + r1 = r5->parent; if (r1) { if (r1->unk0.base.unk0 && r1->unk0.base.flags & 0x1000) { - r5->unk44 = NULL; + r5->parent = NULL; r1 = NULL; } if (!r1) @@ -11896,18 +11598,18 @@ void sub_08118310(void) KirbySomething(r5); } Macro_0809E55C(r5); - Macro_08107BA8_4(r5, &r5->unkC, &sprite, 2, &r5->unkC); - Macro_081050E8(r5, &r5->unkC, 0x389, !r5->unkC.unk1F); + Macro_08107BA8_4(r5, &r5->sprite, &sprite, 2, &r5->sprite); + Macro_081050E8(r5, &r5->sprite, 0x389, !r5->sprite.unk1F); switch (r5->unk8) { default: - r5->unkC.unk1A = r6->unkBE + 2; + r5->sprite.unk1A = r6->unkBE + 2; break; case 1: - r5->unkC.unk1A = r6->unkBF + 2; + r5->sprite.unk1A = r6->unkBF + 2; break; case 2: - r5->unkC.unk1A = r6->unkC0 + 2; + r5->sprite.unk1A = r6->unkC0 + 2; break; } sub_0806FAC8(r5); @@ -11951,8 +11653,8 @@ void sub_081186B8(struct DarkMindTrigger *r4) void sub_081186F0(struct DarkMindTrigger *r3) { r3->unk0.base.flags |= 4; - r3->unk0.base.unk54 += 2 * (gUnk_0203AD40 & 2); - r3->unkB4->unk40 = r3->unk0.base.unk54; + r3->unk0.base.objBase54 += 2 * (gUnk_0203AD40 & 2); + r3->unkB4->objBase54 = r3->unk0.base.objBase54; if (!--r3->unk0.base.counter) sub_08115180(r3); } @@ -12029,8 +11731,8 @@ void sub_0811889C(struct DarkMindTrigger *r4) r4->unk0.base.flags |= 0x40; sub_080700D8(&r4->unk0.base); sub_0806FE64(4, &r4->unk0.base); - r4->unk0.base.unk10.unk14 = 0x300; - r4->unkB4->unkC.unk14 = 0x300; + r4->unk0.base.sprite.unk14 = 0x300; + r4->unkB4->sprite.unk14 = 0x300; } void sub_081188EC(struct DarkMindTrigger *r4) @@ -12111,9 +11813,9 @@ void sub_08118A60(struct DarkMindTrigger *r5) struct Object4 *r4 = TaskGetStructPtr(t, r4); sub_0803E3B0(r4); r4->unk0 = 3; - r4->unk34 = r5->unk0.base.x; - r4->unk38 = r5->unk0.base.y; - r4->unk44 = r5; + r4->x = r5->unk0.base.x; + r4->y = r5->unk0.base.y; + r4->parent = r5; r4->roomId = r5->unk0.base.roomId; } diff --git a/src/foley.c b/src/foley.c index df6021d..f1bafd9 100644 --- a/src/foley.c +++ b/src/foley.c @@ -135,7 +135,7 @@ void *CreateFoleyLeaves(struct Object *r6, u8 r5) { sub_0803E2B0(&r4->base, -8, -8, 8, 8); sub_0803E308(&r4->base, -7, -5, 7, 7); ObjectInitSprite(r4); - r4->base.unk10.unk14 = 0x640; + r4->base.sprite.unk14 = 0x640; gUnk_08351648[r4->type].unk10(r4); return r4; } @@ -196,8 +196,8 @@ static void sub_080C0D18(struct Object2 *r3) { if (r3->base.counter > 10) { sub_080C0CBC(r3); } else { - r3->base.unk54 = gUnk_08350BCC[r3->base.counter][1]; - r3->base.unk55 = gUnk_08350BCC[r3->base.counter][1]; + r3->base.objBase54 = gUnk_08350BCC[r3->base.counter][1]; + r3->base.objBase55 = gUnk_08350BCC[r3->base.counter][1]; ++r3->base.counter; } } diff --git a/src/giant_rocky.c b/src/giant_rocky.c index b5e289d..9c492a9 100644 --- a/src/giant_rocky.c +++ b/src/giant_rocky.c @@ -36,7 +36,7 @@ void *CreateGiantRocky(struct Object *r5, u8 r4) sub_0803E2B0(&r6->base, -8, -2, 8, 10); sub_0803E308(&r6->base, -8, -8, 8, 10); ObjectInitSprite(r6); - r6->base.unk10.unk14 = 1728; + r6->base.sprite.unk14 = 1728; gUnk_08351648[r6->type].unk10(r6); r6->unk9E = 0; r6->unk7C = 0; diff --git a/src/heavy_knight.c b/src/heavy_knight.c index 60ca7cf..cf71b32 100644 --- a/src/heavy_knight.c +++ b/src/heavy_knight.c @@ -96,7 +96,7 @@ void* CreateHeavyKnight(struct Object* arg0, u8 arg1) { sub_0803E2B0(&obj->base, -9, -6, 9, 10); sub_0803E308(&obj->base, -7, -7, 7, 14); ObjectInitSprite(obj); - obj->base.unk10.unk14 = 0x6c0; + obj->base.sprite.unk14 = 0x6c0; gUnk_08351648[obj->type].unk10(obj); obj->unk9E = 0; obj->unk7C = 0; diff --git a/src/kirby.c b/src/kirby.c index 5c021c9..2b4ad81 100644 --- a/src/kirby.c +++ b/src/kirby.c @@ -554,8 +554,8 @@ bool16 sub_0803D8AC(struct Object4 *r1) s16 r5, r3; struct LevelInfo *li; - r5 = r5 = r1->unk34 >> 8; - r3 = r1->unk38 >> 8; + r5 = r5 = r1->x >> 8; + r3 = r1->y >> 8; if (r1->flags & 0x2000000) // if (0) return FALSE; for (; i < gUnk_0203AD44; ++i) @@ -600,7 +600,7 @@ bool16 sub_0803D938(struct ObjectBase *r0) void sub_0803D9A8(struct ObjectBase *r8) { - struct Sprite *sprite = &r8->unk10; + struct Sprite *sprite = &r8->sprite; u8 tmp; if (sprite->unk0 @@ -608,8 +608,8 @@ void sub_0803D9A8(struct ObjectBase *r8) && !(r8->flags & 0x400) && gKirbys[gUnk_0203AD3C].base.base.base.roomId == r8->roomId) { - sprite->unk10 = (r8->x >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unkC >> 8) + r8->unk54; - sprite->unk12 = (r8->y >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unk10 >> 8) + r8->unk55; + sprite->unk10 = (r8->x >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unkC >> 8) + r8->objBase54; + sprite->unk12 = (r8->y >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unk10 >> 8) + r8->objBase55; sprite->unk10 += gUnk_0203AD18[0]; sprite->unk12 += gUnk_0203AD18[1]; tmp = sprite->unk1C; @@ -633,8 +633,8 @@ void sub_0803DAB8(struct ObjectBase *r8, struct Sprite *sprite) && !(r8->flags & 0x400) && gKirbys[gUnk_0203AD3C].base.base.base.roomId == r8->roomId) { - sprite->unk10 = (r8->x >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unkC >> 8) + r8->unk54; - sprite->unk12 = (r8->y >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unk10 >> 8) + r8->unk55; + sprite->unk10 = (r8->x >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unkC >> 8) + r8->objBase54; + sprite->unk12 = (r8->y >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unk10 >> 8) + r8->objBase55; sprite->unk10 += gUnk_0203AD18[0]; sprite->unk12 += gUnk_0203AD18[1]; tmp = sprite->unk1C; @@ -651,14 +651,14 @@ void sub_0803DAB8(struct ObjectBase *r8, struct Sprite *sprite) void sub_0803DBC8(struct Object4 *r8) { - struct Sprite *sprite = &r8->unkC; + struct Sprite *sprite = &r8->sprite; u8 tmp; - if (r8->unkC.unk0 && !(r8->flags & 0x400) + if (r8->sprite.unk0 && !(r8->flags & 0x400) && gKirbys[gUnk_0203AD3C].base.base.base.roomId == r8->roomId) { - sprite->unk10 = (r8->unk34 >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unkC >> 8) + r8->unk40; - sprite->unk12 = (r8->unk38 >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unk10 >> 8) + r8->unk41; + sprite->unk10 = (r8->x >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unkC >> 8) + r8->objBase54; + sprite->unk12 = (r8->y >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unk10 >> 8) + r8->objBase55; sprite->unk10 += gUnk_0203AD18[0]; sprite->unk12 += gUnk_0203AD18[1]; tmp = sprite->unk1C; @@ -681,13 +681,13 @@ void sub_0803DCCC(struct Task *t) // shared field for checking the struct type? if (r4->unk0 == 3) { - if (r1->unkC.unk0 >= 0x6014000 && !(r1->flags & 0x4000)) - sub_08157190(r1->unkC.unk0); + if (r1->sprite.unk0 >= 0x6014000 && !(r1->flags & 0x4000)) + sub_08157190(r1->sprite.unk0); } else { - if (r4->unk10.unk0 >= 0x6014000 && !(r4->flags & 0x4000)) - sub_08157190(r4->unk10.unk0); + if (r4->sprite.unk0 >= 0x6014000 && !(r4->flags & 0x4000)) + sub_08157190(r4->sprite.unk0); } } @@ -871,8 +871,8 @@ void sub_0803E380(struct ObjectBase *r4) r4->unk58 = 0; r4->unk6C = NULL; r4->parent = NULL; - r4->unk10.unk0 = 0; - r4->unk10.unk20[0].unk0 = -1; + r4->sprite.unk0 = 0; + r4->sprite.unk20[0].unk0 = -1; } void sub_0803E3B0(struct Object4 *r1) @@ -1095,10 +1095,10 @@ struct Kirby2 #define Macro_0803E920(kirby) \ ({ \ if ((kirby)->base.base.base.unk56 == gUnk_0203AD3C) \ - (kirby)->base.other.unk7C[0].unk14 = (kirby)->base.other.unk7C[1].unk14 = (kirby)->base.base.base.unk10.unk14 = 0x3C0; \ + (kirby)->base.other.unk7C[0].unk14 = (kirby)->base.other.unk7C[1].unk14 = (kirby)->base.base.base.sprite.unk14 = 0x3C0; \ else \ { \ - (kirby)->base.base.base.unk10.unk14 = ((kirby)->base.base.base.unk56 + 0x10) * 0x40; \ + (kirby)->base.base.base.sprite.unk14 = ((kirby)->base.base.base.unk56 + 0x10) * 0x40; \ (kirby)->base.other.unk7C[1].unk14 = ((kirby)->base.base.base.unk56 + 0x10) * 0x40; \ (kirby)->base.other.unk7C[0].unk14 = ((kirby)->base.base.base.unk56 + 0x10) * 0x40; \ } \ @@ -1117,7 +1117,7 @@ void CreateKirby(u8 kirbyIdx, struct Kirby *kirby, u16 r5, const s32 *r6, const sub_0803EA90(kirby, r5, r6, a5); sub_0806F260(kirby); Macro_0803E920(kirby); - sprite = &kirby->base.base.base.unk10; + sprite = &kirby->base.base.base.sprite; sprite->unk0 = (kirbyIdx << 11) + 0x6010000; sprite->unkC = 0; sprite->unk1A = 0; @@ -1251,8 +1251,8 @@ void sub_0803ED28(struct Kirby *kirby) kirby->unkD8 = 0; kirby->base.base.base.xspeed = 0; kirby->base.base.base.yspeed = 0; - kirby->base.base.base.unk54 = 0; - kirby->base.base.base.unk55 = 0; + kirby->base.base.base.objBase54 = 0; + kirby->base.base.base.objBase55 = 0; kirby->base.base.base.flags = 0; kirby->base.base.base.counter = 0; kirby->base.base.base.unk62 = 0; @@ -1517,7 +1517,7 @@ void sub_0803F324(struct Kirby *kirby) void sub_0803F46C(struct Kirby *kirby) { - struct Sprite *r7 = &kirby->base.base.base.unk10, + struct Sprite *r7 = &kirby->base.base.base.sprite, *sb = &kirby->base.other.unk7C[1], *r8 = &kirby->base.other.unk7C[0]; bool32 r4, sl, sp00 = FALSE; @@ -1525,20 +1525,20 @@ void sub_0803F46C(struct Kirby *kirby) if (kirby->base.base.base.unk56 == gUnk_0203AD3C) { - r7->unk10 = ((kirby->base.base.base.x - gCurLevelInfo[gUnk_0203AD3C].unkC) >> 8) + kirby->base.base.base.unk54; - r7->unk12 = ((kirby->base.base.base.y - gCurLevelInfo[gUnk_0203AD3C].unk10) >> 8) + kirby->base.base.base.unk55; + r7->unk10 = ((kirby->base.base.base.x - gCurLevelInfo[gUnk_0203AD3C].unkC) >> 8) + kirby->base.base.base.objBase54; + r7->unk12 = ((kirby->base.base.base.y - gCurLevelInfo[gUnk_0203AD3C].unk10) >> 8) + kirby->base.base.base.objBase55; } else { - r7->unk10 = (kirby->base.base.base.x >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unkC >> 8) + kirby->base.base.base.unk54; - r7->unk12 = (kirby->base.base.base.y >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unk10 >> 8) + kirby->base.base.base.unk55; + r7->unk10 = (kirby->base.base.base.x >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unkC >> 8) + kirby->base.base.base.objBase54; + r7->unk12 = (kirby->base.base.base.y >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unk10 >> 8) + kirby->base.base.base.objBase55; } r7->unk10 += gUnk_0203AD18[0]; r7->unk12 += gUnk_0203AD18[1]; sb->unk10 = r7->unk10; sb->unk12 = r7->unk12; - kirby->base.base.base.unk55 = 0; - kirby->base.base.base.unk54 = 0; + kirby->base.base.base.objBase55 = 0; + kirby->base.base.base.objBase54 = 0; r2 = FALSE; if (kirby->unkD4 < 10 && kirby->base.base.base.flags & 0x4000000) r2 = TRUE; @@ -1645,7 +1645,7 @@ void sub_0803F46C(struct Kirby *kirby) void sub_0803F790(struct Kirby *kirby) { - struct Sprite *r7 = &kirby->base.base.base.unk10, + struct Sprite *r7 = &kirby->base.base.base.sprite, *r6 = &kirby->base.other.unk7C[1], *sb = &kirby->base.other.unk7C[0]; bool32 r8 = FALSE; @@ -1817,7 +1817,7 @@ void sub_0803FBB4(struct Kirby *kirby) kirby->base.base.base.unkC &= ~0x4000; if (!(kirby->base.base.base.flags & 0x100)) { - if (kirby->base.base.base.y + (kirby->base.base.base.unk3F << 8) >= gCurLevelInfo[kirby->base.base.base.unk56].unk54) + if (kirby->base.base.base.y + (kirby->base.base.base.unk3F * 0x100) >= gCurLevelInfo[kirby->base.base.base.unk56].unk54) { kirby->hp = 0; sub_08088640(&kirby->base.base, 0x1C, 0x20); @@ -2362,8 +2362,8 @@ void sub_080411E8(struct Kirby *kirby) sub_0805C0C8(kirby); } kirby->base.base.base.counter = 0; - kirby->base.base.base.unk54 = 0; - kirby->base.base.base.unk55 = 0; + kirby->base.base.base.objBase54 = 0; + kirby->base.base.base.objBase55 = 0; kirby->unkD8 = 0; Macro_0803EA90_1(kirby); Macro_0803EA90_2(kirby); @@ -2486,8 +2486,8 @@ void sub_08041B08(struct Kirby *kirby) sub_0805C0C8(kirby); } kirby->base.base.base.counter = 0; - kirby->base.base.base.unk54 = 0; - kirby->base.base.base.unk55 = 0; + kirby->base.base.base.objBase54 = 0; + kirby->base.base.base.objBase55 = 0; kirby->unkD8 = 0; Macro_0803EA90_1(kirby); Macro_0803EA90_2(kirby); @@ -2604,8 +2604,8 @@ void sub_08041C50(struct Kirby *kirby) void sub_080424BC(struct Kirby *kirby) { kirby->unkD4 = 12; - kirby->base.base.base.unk54 = 0; - kirby->base.base.base.unk55 = 0; + kirby->base.base.base.objBase54 = 0; + kirby->base.base.base.objBase55 = 0; kirby->unkD8 = 0; kirby->base.base.base.counter = 0; Macro_0803EA90_1(kirby); @@ -3193,13 +3193,13 @@ void sub_08044FD4(struct Kirby *kirby) { if (kirby->base.base.base.counter <= 3) { - kirby->base.base.base.unk54 = gUnk_0834C180[kirby->base.base.base.counter][0]; - kirby->base.base.base.unk55 = gUnk_0834C180[kirby->base.base.base.counter][0]; + kirby->base.base.base.objBase54 = gUnk_0834C180[kirby->base.base.base.counter][0]; + kirby->base.base.base.objBase55 = gUnk_0834C180[kirby->base.base.base.counter][0]; } else { - kirby->base.base.base.unk54 = 0; - kirby->base.base.base.unk55 = 0; + kirby->base.base.base.objBase54 = 0; + kirby->base.base.base.objBase55 = 0; } if (kirby->base.base.base.yspeed < 0) { @@ -3890,7 +3890,7 @@ void sub_0804A1A0(struct Kirby *kirby) struct Sprite sprite; kirby->base.base.base.unkC |= 0x200; - SpriteSomething(&sprite, 0x6000000, 0x24, 0, 0xFF, 0, 0, 0, 0, 0x10, kirby->base.base.base.unk10.unk1F & 0xF, 0x80000); + SpriteSomething(&sprite, 0x6000000, 0x24, 0, 0xFF, 0, 0, 0, 0, 0x10, kirby->base.base.base.sprite.unk1F & 0xF, 0x80000); kirby->base.base.unk78 = sub_0804CAF0; kirby->unkD4 = 123; sub_0808D5E0(&kirby->base.base.base); @@ -3905,7 +3905,7 @@ void sub_0804A328(struct Kirby *kirby) struct Sprite sprite; kirby->base.base.base.unkC |= 0x200; - SpriteSomething(&sprite, 0x6000000, 0x26, 0, 0xFF, 0, 0, 0, 0, 0x10, kirby->base.base.base.unk10.unk1F & 0xF, 0x80000); + SpriteSomething(&sprite, 0x6000000, 0x26, 0, 0xFF, 0, 0, 0, 0, 0x10, kirby->base.base.base.sprite.unk1F & 0xF, 0x80000); kirby->base.base.unk78 = sub_0804CAF0; kirby->unkD4 = 135; sub_0808E2EC(&kirby->base.base.base); @@ -3920,7 +3920,7 @@ void sub_0804A4CC(struct Kirby *kirby) struct Sprite sprite; kirby->base.base.base.unkC |= 0x200; - SpriteSomething(&sprite, 0x6000000, 0x28, 0, 0xFF, 0, 0, 0, 0, 0x10, kirby->base.base.base.unk10.unk1F & 0xF, 0x80000); + SpriteSomething(&sprite, 0x6000000, 0x28, 0, 0xFF, 0, 0, 0, 0, 0x10, kirby->base.base.base.sprite.unk1F & 0xF, 0x80000); kirby->base.base.unk78 = sub_0804D2DC; kirby->unkD4 = 129; if (kirby->base.base.base.flags & 0x80) @@ -3952,15 +3952,15 @@ void sub_0804A650(struct Kirby *kirby) (kirby)->unkDE = 0; \ (kirby)->base.base.base.xspeed = 0; \ (kirby)->base.base.base.yspeed = 0; \ - (kirby)->base.base.base.unk54 = 0; \ - (kirby)->base.base.base.unk55 = 0; \ + (kirby)->base.base.base.objBase54 = 0; \ + (kirby)->base.base.base.objBase55 = 0; \ (kirby)->base.base.base.unk58 &= 0x4402; \ (kirby)->base.base.base.unk57 = 0; \ Macro_0803E920(kirby); \ (kirby)->unkE6 = 0; \ (kirby)->unkE8 = NULL; \ (kirby)->unk110 = 0; \ - (kirby)->base.base.base.unk10.unk1C = 0x10; \ + (kirby)->base.base.base.sprite.unk1C = 0x10; \ (kirby)->base.other.unk7C[1].unk1C = 0x10; \ (kirby)->base.base.base.flags &= ~2; \ (kirby)->base.base.base.flags &= ~8; \ @@ -4258,7 +4258,7 @@ bool8 sub_0804B6FC(struct Kirby *kirby) kirby->base.base.base.flags |= 0x200; kirby->base.base.base.flags |= 0x800; kirby->base.base.base.flags &= ~2; - sub_0808AE30(&kirby->base.base.base, 0, 0x28F, 3)->unkC.unk14 = 0x380; + sub_0808AE30(&kirby->base.base.base, 0, 0x28F, 3)->sprite.unk14 = 0x380; return TRUE; } @@ -4382,14 +4382,14 @@ bool8 sub_0804BD98(struct Kirby *kirby, u8 r7, u8 sl, u8 r8, s8 sp04, s8 sp08) kirby->base.base.base.x = (sp04 * 0x10 + (gUnk_0834C384+9)[r7]) * 0x100; kirby->base.base.base.y = sp08 * 0x1000 - 0x800; if (r7 == 0) - kirby->base.base.base.unk10.unk14 = 0x380; + kirby->base.base.base.sprite.unk14 = 0x380; break; case 4: kirby->unkD6 = gUnk_0834C3B5[r7 + 4 * r8]; kirby->base.base.base.x = (sp04 * 0x10 + (gUnk_0834C384+12)[r7]) * 0x100; kirby->base.base.base.y = sp08 * 0x1000 - 0x800; if (r7 == 0 || r7 == 1) - kirby->base.base.base.unk10.unk14 = 0x380; + kirby->base.base.base.sprite.unk14 = 0x380; break; } if (kirby->base.base.base.unk56 == gUnk_0203AD3C) @@ -4457,20 +4457,20 @@ void sub_0804C614(struct Kirby *kirby) if (kirby->unkD4 >= 154 && kirby->unkD4 <= 164) { if (kirby->base.base.base.flags & 1) - r3->unk34 -= gUnk_0834C3C5[kirby->unkD4 - 154][0] * 0x100; + r3->x -= gUnk_0834C3C5[kirby->unkD4 - 154][0] * 0x100; else - r3->unk34 += gUnk_0834C3C5[kirby->unkD4 - 154][0] * 0x100; - r3->unk38 += gUnk_0834C3C5[kirby->unkD4 - 154][1] * 0x100; + r3->x += gUnk_0834C3C5[kirby->unkD4 - 154][0] * 0x100; + r3->y += gUnk_0834C3C5[kirby->unkD4 - 154][1] * 0x100; } else if (kirby->unkD4 >= 172 && kirby->unkD4 <= 184) { if (kirby->base.base.base.flags & 1) - r3->unk34 -= gUnk_0834C3DB[kirby->unkD4 - 172][0] * 0x100; + r3->x -= gUnk_0834C3DB[kirby->unkD4 - 172][0] * 0x100; else - r3->unk34 += gUnk_0834C3DB[kirby->unkD4 - 172][0] * 0x100; - r3->unk38 += gUnk_0834C3DB[kirby->unkD4 - 172][1] * 0x100; + r3->x += gUnk_0834C3DB[kirby->unkD4 - 172][0] * 0x100; + r3->y += gUnk_0834C3DB[kirby->unkD4 - 172][1] * 0x100; } - r3->unkC.unk14 = 0x580; + r3->sprite.unk14 = 0x580; } if (kirby->unkD8 == 0x60) { @@ -4563,12 +4563,12 @@ void sub_0804CAF0(struct Kirby *kirby) if (kirby->unk11A) { ++kirby->base.base.base.counter; - kirby->base.base.base.unk54 = 2; + kirby->base.base.base.objBase54 = 2; } if (kirby->base.base.base.yspeed <= 0 && kirby->base.base.base.unk62 & 4) { kirby->base.base.base.unkC |= 0x200; - SpriteSomething(&sprite, 0x6000000, 0x24, 0, 0xFF, 0, 0, 0, 0, 0x10, kirby->base.base.base.unk10.unk1F & 0xF, 0x80000); + SpriteSomething(&sprite, 0x6000000, 0x24, 0, 0xFF, 0, 0, 0, 0, 0x10, kirby->base.base.base.sprite.unk1F & 0xF, 0x80000); sub_0808E024(&kirby->base.base.base); if (kirby->unkD4 == 123) sub_0808DC80(&kirby->base.base.base); @@ -4817,16 +4817,16 @@ void sub_0804D3B4(struct Kirby *kirby) kirby->base.base.base.yspeed = -0x250; Macro_080435F8_2(kirby); } - if (kirby->base.base.base.unk10.unk16 > 0x600) + if (kirby->base.base.base.sprite.unk16 > 0x600) { kirby->base.base.base.counter = 1; if (kirby->unk11A) { - kirby->base.base.base.unk10.unk16 -= 0x100; - kirby->base.base.base.unk54 = 2; + kirby->base.base.base.sprite.unk16 -= 0x100; + kirby->base.base.base.objBase54 = 2; } } - if (kirby->base.base.base.unk10.unk16 <= 0 && kirby->base.base.base.counter) + if (kirby->base.base.base.sprite.unk16 <= 0 && kirby->base.base.base.counter) { kirby->base.base.base.counter = 0; sub_0808AE30(&kirby->base.base.base, 0, 0x2A7, 0); @@ -4873,7 +4873,7 @@ void sub_0804D4E4(struct Kirby *kirby) } else if (!(gUnk_0203AD40 & 7)) { - sub_0808AE30(&kirby->base.base.base, 0, 0x2A7, 0)->unkC.unk14 = 0x680; + sub_0808AE30(&kirby->base.base.base, 0, 0x2A7, 0)->sprite.unk14 = 0x680; PlaySfx(&kirby->base.base.base, 128); } if (kirby->base.base.base.counter && !--kirby->base.base.base.counter) @@ -5145,7 +5145,7 @@ u8 sub_0804E3E4(struct Kirby *kirby) if (r7[kirby->unkD6].unk2 > 0) Macro_0803E920(kirby); else - kirby->base.other.unk7C[0].unk14 = kirby->base.other.unk7C[1].unk14 = kirby->base.base.base.unk10.unk14 = 0x6C0; + kirby->base.other.unk7C[0].unk14 = kirby->base.other.unk7C[1].unk14 = kirby->base.base.base.sprite.unk14 = 0x6C0; if (r7[kirby->unkD6].flags & 0x80) kirby->base.base.base.flags ^= 1; return 0; @@ -6196,9 +6196,9 @@ bool8 sub_080510EC(struct Kirby *kirby) Macro_0803EA90_1(kirby); Macro_0803EA90_2(kirby); if (kirby->base.base.base.unk56 == gUnk_0203AD3C) - kirby->base.base.base.unk10.unk14 = 0x740; + kirby->base.base.base.sprite.unk14 = 0x740; else - kirby->base.base.base.unk10.unk14 = 0x780; + kirby->base.base.base.sprite.unk14 = 0x780; kirby->base.base.base.flags |= 0x340; kirby->base.base.base.unk62 = 0; kirby->base.base.base.flags &= ~0x40000; @@ -6226,9 +6226,9 @@ void sub_0805142C(struct Kirby *kirby) if (kirby->unkD4 == 101 && !(kirby->base.base.base.flags & 2)) { kirby->unkD4 = 100; - kirby->base.base.base.unk10.unkC = gUnk_02021590[kirby->base.base.base.unk56][kirby->unkD4].unk0; - kirby->base.base.base.unk10.unk1A = gUnk_02021590[kirby->base.base.base.unk56][kirby->unkD4].unk2; - sub_0815521C(&kirby->base.base.base.unk10, 0xA - kirby->base.base.base.unk1); + kirby->base.base.base.sprite.unkC = gUnk_02021590[kirby->base.base.base.unk56][kirby->unkD4].unk0; + kirby->base.base.base.sprite.unk1A = gUnk_02021590[kirby->base.base.base.unk56][kirby->unkD4].unk2; + sub_0815521C(&kirby->base.base.base.sprite, 0xA - kirby->base.base.base.unk1); kirby->base.base.base.unk1 = 0xA - kirby->base.base.base.unk1; } kirby->unkD4 = 100; @@ -6238,9 +6238,9 @@ void sub_0805142C(struct Kirby *kirby) kirby->unkD4 = 101; if (!(kirby->base.base.base.flags & 2)) { - kirby->base.base.base.unk10.unkC = gUnk_02021590[kirby->base.base.base.unk56][kirby->unkD4].unk0; - kirby->base.base.base.unk10.unk1A = gUnk_02021590[kirby->base.base.base.unk56][kirby->unkD4].unk2; - sub_0815521C(&kirby->base.base.base.unk10, 0xA - kirby->base.base.base.unk1); + kirby->base.base.base.sprite.unkC = gUnk_02021590[kirby->base.base.base.unk56][kirby->unkD4].unk0; + kirby->base.base.base.sprite.unk1A = gUnk_02021590[kirby->base.base.base.unk56][kirby->unkD4].unk2; + sub_0815521C(&kirby->base.base.base.sprite, 0xA - kirby->base.base.base.unk1); kirby->base.base.base.unk1 = 0xA - kirby->base.base.base.unk1; } } @@ -6312,7 +6312,7 @@ void sub_0805177C(struct Kirby *kirby) { struct Object4 *obj4 = sub_0808AE30(&kirby->base.base.base, 0, 0x2A8, 5); - obj4->unkC.unk14 = 0x640; + obj4->sprite.unk14 = 0x640; obj4->unk3E = -0x80; } if (kirby->base.base.base.x > gCurLevelInfo[kirby->base.base.base.unk56].unk50 @@ -6446,7 +6446,7 @@ void sub_08051F70(struct Kirby *kirby, u8 a) kirby->base.base.base.flags |= 1; else if (kirby->base.base.base.xspeed > 0) kirby->base.base.base.flags &= ~1; - kirby->base.other.unk7C[0].unk14 = kirby->base.other.unk7C[1].unk14 = kirby->base.base.base.unk10.unk14 = 0x6C0; + kirby->base.other.unk7C[0].unk14 = kirby->base.other.unk7C[1].unk14 = kirby->base.base.base.sprite.unk14 = 0x6C0; sub_08083FC0(&kirby->base.base.base); PlaySfx(&kirby->base.base.base, 524); Macro_08051F70(kirby); @@ -6464,7 +6464,7 @@ void sub_08052140(struct Kirby *kirby) kirby->base.other.unk7C[1].unk1F = 0xE; sub_0806EC28(kirby); sub_0808CBCC(&kirby->base.base.base); - kirby->base.base.base.unk10.unk1C = 0x10; + kirby->base.base.base.sprite.unk1C = 0x10; kirby->base.other.unk7C[1].unk1C = 0x10; kirby->base.base.base.unkC &= ~0x8000; kirby->unkD8 = 1; @@ -6476,7 +6476,7 @@ void sub_08052140(struct Kirby *kirby) kirby->base.other.unk7C[1].unk1F = kirby->base.base.base.unk56 + 4; sub_0806ED58(kirby); PlaySfx(&kirby->base.base.base, 128); - kirby->base.base.base.unk10.unk1C = 0x10; + kirby->base.base.base.sprite.unk1C = 0x10; kirby->base.other.unk7C[1].unk1C = 0x10; kirby->base.base.base.unkC &= ~0x8000; kirby->unkD8 = 0; @@ -6578,7 +6578,7 @@ bool8 sub_080525C0(struct Kirby *kirby) if ((kirby->unkDD & 0x1F) == KIRBY_ABILITY_MASTER) gUnk_0203AD34 = 0; kirby->unkDD = 0; - kirby->base.base.base.unk10.unk14 = 0x500; + kirby->base.base.base.sprite.unk14 = 0x500; kirby->base.other.unk7C[1].unk14 = 0x500; sub_0806F260(kirby); kirby->unkD4 = 90; @@ -6920,12 +6920,12 @@ void sub_080534D0(struct Kirby *kirby) kirby->base.base.base.flags &= ~1; if (r7->unk9 & 2) { - kirby->base.base.base.unk10.unk8 |= 0x800; + kirby->base.base.base.sprite.unk8 |= 0x800; kirby->base.other.unk7C[1].unk8 |= 0x800; } else { - kirby->base.base.base.unk10.unk8 &= ~0x800; + kirby->base.base.base.sprite.unk8 &= ~0x800; kirby->base.other.unk7C[1].unk8 &= ~0x800; } } @@ -6973,7 +6973,7 @@ void sub_080534D0(struct Kirby *kirby) else { kirby->base.base.base.flags &= ~0x340; - kirby->base.base.base.unk10.unk8 &= ~0x800; + kirby->base.base.base.sprite.unk8 &= ~0x800; kirby->base.other.unk7C[1].unk8 &= ~0x800; kirby->base.base.base.flags &= ~0x400; Macro_0803E920(kirby); @@ -7002,7 +7002,7 @@ void sub_08053DAC(struct Kirby *kirby, u8 sb) kirby->base.base.base.flags |= 1; else kirby->base.base.base.flags &= ~1; - kirby->base.base.base.unk10.unk14 = 0x380; + kirby->base.base.base.sprite.unk14 = 0x380; kirby->base.other.unk7C[1].unk14 = 0x380; } @@ -7242,7 +7242,7 @@ void sub_08054950(struct Kirby *kirby) { if (kirby->unkD6 < 10) { - kirby->base.base.base.unk54 = gUnk_0834C188[kirby->unkD6 >> 1]; + kirby->base.base.base.objBase54 = gUnk_0834C188[kirby->unkD6 >> 1]; ++kirby->unkD6; } } @@ -7402,7 +7402,7 @@ void sub_0805509C(struct Kirby *kirby) sub_0805BE80(kirby); if (kirby->base.base.base.flags & 2) { - kirby->base.base.base.unk54 = 0; + kirby->base.base.base.objBase54 = 0; Macro_0803FF64_6(kirby); return; } @@ -7410,11 +7410,11 @@ void sub_0805509C(struct Kirby *kirby) { if (kirby->unkD6 <= 4) { - kirby->base.base.base.unk54 = gUnk_0834C18D[kirby->unkD6 >> 1]; + kirby->base.base.base.objBase54 = gUnk_0834C18D[kirby->unkD6 >> 1]; ++kirby->unkD6; } else - kirby->base.base.base.unk54 = 0; + kirby->base.base.base.objBase54 = 0; } sub_0805B1B8(kirby); Macro_080435F8(kirby); @@ -7827,7 +7827,7 @@ void sub_08056128(struct Kirby *kirby) { if (kirby->base.base.base.roomId == 0x397) { - kirby->base.base.base.unk10.unk14 = 0x500; + kirby->base.base.base.sprite.unk14 = 0x500; kirby->base.other.unk7C[1].unk14 = 0x500; kirby->unkD4 = 91; sub_0808EDB8(&kirby->base.base.base); @@ -7997,8 +7997,8 @@ void sub_08056618(struct Kirby *kirby) kirby->base.base.base.counter = 1; kirby->unkD6 = 0; kirby->unkD8 = 0; - kirby->base.base.base.unk54 = 0; - kirby->base.base.base.unk55 = 0; + kirby->base.base.base.objBase54 = 0; + kirby->base.base.base.objBase55 = 0; kirby->base.base.base.x &= ~0xFFF; kirby->base.base.base.x += 0x800; kirby->base.base.base.xspeed = 0; @@ -8016,7 +8016,7 @@ void sub_080566E0(struct Kirby *kirby) Macro_0803FF64_3(kirby); if (kirby->unk118 & 0x80) { - kirby->base.base.base.unk10.unk1C = 0x10; + kirby->base.base.base.sprite.unk1C = 0x10; kirby->base.other.unk7C[1].unk1C = 0x10; if (kirby->unkD4 == 46) { @@ -8051,7 +8051,7 @@ void sub_080566E0(struct Kirby *kirby) { s16 a, b; - kirby->base.base.base.unk10.unk1C = 0x10; + kirby->base.base.base.sprite.unk1C = 0x10; kirby->base.other.unk7C[1].unk1C = 0x10; if (kirby->unkD4 != 45) kirby->base.base.base.counter = 1; @@ -8074,7 +8074,7 @@ void sub_080566E0(struct Kirby *kirby) } else { - kirby->base.base.base.unk10.unk1C = 0; + kirby->base.base.base.sprite.unk1C = 0; if (kirby->ability != KIRBY_ABILITY_FIRE && kirby->ability != KIRBY_ABILITY_BURNING && kirby->ability != KIRBY_ABILITY_MASTER && kirby->ability != KIRBY_ABILITY_SPARK && kirby->ability != KIRBY_ABILITY_TORNADO) kirby->base.other.unk7C[1].unk1C = 0; @@ -8083,7 +8083,7 @@ void sub_080566E0(struct Kirby *kirby) kirby->base.base.base.yspeed = 0; if (kirby->unk118 & 0x30) { - kirby->base.base.base.unk10.unk1C = 0x10; + kirby->base.base.base.sprite.unk1C = 0x10; kirby->base.other.unk7C[1].unk1C = 0x10; kirby->base.base.base.flags &= ~8; kirby->base.base.base.flags &= ~0x1000; @@ -8197,7 +8197,7 @@ void sub_0805701C(struct Kirby *kirby) { v = sub_0808AE30(&kirby->base.base.base, 0, 0x28F, 3); v->flags |= 0x2000; - v->unkC.unk14 = 0x380; + v->sprite.unk14 = 0x380; } if (kirby->base.base.base.counter == 4) { @@ -8366,7 +8366,7 @@ void sub_080575D8(struct Kirby *kirby) sub_0806ED58(kirby); sub_0808AE30(&kirby->base.base.base, 0, 0x292, 0); kirby->base.base.base.flags |= 0x340; - kirby->base.base.base.unk10.unk14 = 0x500; + kirby->base.base.base.sprite.unk14 = 0x500; kirby->base.other.unk7C[1].unk14 = 0x500; kirby->base.base.base.xspeed = 0; kirby->base.base.base.yspeed = 0; @@ -8422,7 +8422,7 @@ void sub_080578E4(struct Kirby *kirby) kirby->unkD8 = 0; kirby->unkD9 = 0; kirby->unkD6 = 0; - kirby->base.base.base.unk10.unk14 = 0x500; + kirby->base.base.base.sprite.unk14 = 0x500; kirby->base.other.unk7C[1].unk14 = 0x500; kirby->base.base.base.flags |= 0x340; kirby->base.base.base.flags &= ~0x800; @@ -8748,8 +8748,8 @@ void sub_08058628(struct Kirby *kirby) kirby->base.base.base.counter = 0; kirby->unkD6 = 0; kirby->unkD8 = 0; - kirby->base.base.base.unk54 = 0; - kirby->base.base.base.unk55 = 0; + kirby->base.base.base.objBase54 = 0; + kirby->base.base.base.objBase55 = 0; kirby->unkD9 = 0; kirby->base.other.unk7C[1].unk1F = 0xE; sub_0806EC28(kirby); @@ -8843,8 +8843,8 @@ void sub_08058F3C(struct Kirby *kirby) { kirby->unkD4 = 57; kirby->base.base.base.counter = 0; - kirby->base.base.base.unk54 = 0; - kirby->base.base.base.unk55 = 0; + kirby->base.base.base.objBase54 = 0; + kirby->base.base.base.objBase55 = 0; kirby->unkD8 = 0; kirby->unkD9 = 0; kirby->base.other.unk7C[1].unk1F = 0xE; @@ -8974,7 +8974,7 @@ void sub_080598E8(struct Kirby *kirby) --kirby->unkD8; if (kirby->base.base.base.unk62 & 4) { - kirby->base.base.base.unk10.unk1C = 0x10; + kirby->base.base.base.sprite.unk1C = 0x10; kirby->base.other.unk7C[1].unk1C = 0x10; sub_08058628(kirby); return; @@ -9017,24 +9017,24 @@ void sub_080598E8(struct Kirby *kirby) kirby->base.base.base.flags &= ~4; kirby->base.base.base.unk1 = 0; kirby->base.base.base.unk2 = 0; - kirby->base.base.base.unk10.unk1B = 0xFF; + kirby->base.base.base.sprite.unk1B = 0xFF; PlaySfx(&kirby->base.base.base, 117); kirby->base.base.base.counter = 0xF; kirby->base.base.base.yspeed = 0xF0; } kirby->unkD4 = 62; - kirby->base.base.base.unk10.unk1C = 0x1A; + kirby->base.base.base.sprite.unk1C = 0x1A; kirby->base.other.unk7C[1].unk1C = 0x1A; } else { - kirby->base.base.base.unk10.unk1C = 0x10; + kirby->base.base.base.sprite.unk1C = 0x10; kirby->base.other.unk7C[1].unk1C = 0x10; } } else { - kirby->base.base.base.unk10.unk1C = 0x10; + kirby->base.base.base.sprite.unk1C = 0x10; kirby->base.other.unk7C[1].unk1C = 0x10; if (!(kirby->unk118 & 0x30) && kirby->unk118 & 0x41) { @@ -9045,7 +9045,7 @@ void sub_080598E8(struct Kirby *kirby) kirby->base.base.base.flags &= ~4; kirby->base.base.base.unk1 = 0; kirby->base.base.base.unk2 = 0; - kirby->base.base.base.unk10.unk1B = 0xFF; + kirby->base.base.base.sprite.unk1B = 0xFF; kirby->base.base.base.counter = 0xF; kirby->base.base.base.yspeed = 0x168; } @@ -9059,7 +9059,7 @@ void sub_080598E8(struct Kirby *kirby) } if (kirby->base.base.base.unk62 & 4) { - kirby->base.base.base.unk10.unk1C = 0x10; + kirby->base.base.base.sprite.unk1C = 0x10; kirby->base.other.unk7C[1].unk1C = 0x10; sub_08058628(kirby); return; @@ -9212,17 +9212,17 @@ void sub_0805A938(struct Kirby *kirby) } if (kirby->base.base.base.flags & 2) { - kirby->base.base.base.unk54 = 0; + kirby->base.base.base.objBase54 = 0; Macro_0803FF64_6(kirby); return; } if (kirby->unkD6 < 5) { - kirby->base.base.base.unk54 = gUnk_0834C18D[kirby->unkD6 >> 1]; + kirby->base.base.base.objBase54 = gUnk_0834C18D[kirby->unkD6 >> 1]; ++kirby->unkD6; } else - kirby->base.base.base.unk54 = 0; + kirby->base.base.base.objBase54 = 0; sub_0805B2C8(kirby); if (!(kirby->base.base.base.unk62 & 4)) { @@ -9886,7 +9886,7 @@ void sub_0805BA58(struct Kirby *kirby) else if (kirby->base.base.base.yspeed > 0) kirby->base.base.base.yspeed >>= 2; sub_0808CBCC(&kirby->base.base.base); - kirby->base.base.base.unk10.unk1C = 0x10; + kirby->base.base.base.sprite.unk1C = 0x10; kirby->base.other.unk7C[1].unk1C = 0x10; kirby->base.base.base.unkC &= ~0x8000; kirby->base.base.base.unk5C &= ~0x20000; @@ -9899,7 +9899,7 @@ void sub_0805BBB4(struct Kirby *kirby) kirby->base.other.unk7C[1].unk1F = kirby->base.base.base.unk56 + 4; sub_0806ED58(kirby); PlaySfx(&kirby->base.base.base, 128); - kirby->base.base.base.unk10.unk1C = 0x10; + kirby->base.base.base.sprite.unk1C = 0x10; kirby->base.other.unk7C[1].unk1C = 0x10; kirby->base.base.base.unkC &= ~0x8000; } @@ -10153,7 +10153,7 @@ void sub_0805C11C(struct Kirby *kirby) kirby->base.base.base.flags |= 0x200; kirby->base.base.base.flags |= 0x800; kirby->ability = KIRBY_ABILITY_NORMAL; - kirby->base.base.base.unk10.unk1C = 0x10; + kirby->base.base.base.sprite.unk1C = 0x10; kirby->base.other.unk7C[1].unk1C = 0x10; gCurLevelInfo[kirby->base.base.base.unk56].unk8 |= 8; kirby->base.base.base.xspeed = 0; @@ -10325,7 +10325,7 @@ void sub_0805C700(struct Kirby *kirby) if (kirby->base.base.base.counter == 3 && kirby->ability == KIRBY_ABILITY_BURNING) { kirby->base.base.base.unkC |= 0x200; - SpriteSomething(&sprite, 0x6000000, 0x161, 0, 0xFF, 0, 0, 0, 0, 0x10, kirby->base.base.base.unk10.unk1F & 0xF, 0x80000); + SpriteSomething(&sprite, 0x6000000, 0x161, 0, 0xFF, 0, 0, 0, 0, 0x10, kirby->base.base.base.sprite.unk1F & 0xF, 0x80000); } } else @@ -10389,7 +10389,7 @@ void sub_0805C954(struct Kirby *kirby) break; case KIRBY_ABILITY_LASER: obj4 = sub_0808BEA4(&kirby->base.base.base, (kirby->base.base.base.unk56 << 11) + 0x6010380, 0xEB, 0, 0); - obj4->unkC.unk1F = kirby->base.base.base.unk10.unk1F; + obj4->sprite.unk1F = kirby->base.base.base.sprite.unk1F; obj4 = sub_0808BA6C(&kirby->base.base.base, (kirby->base.base.base.unk56 << 11) + 0x6010400, 0xEC, 0); obj4->flags |= 0x4000; sub_0807BCE0(kirby); @@ -10578,7 +10578,7 @@ void sub_0805CEEC(struct Kirby *kirby) void sub_0805D044(struct Kirby *kirby) { kirby->unkD4 = 53; - kirby->base.base.base.unk10.unk1C = 0; + kirby->base.base.base.sprite.unk1C = 0; kirby->base.other.unk7C[1].unk1C = 0; if (kirby->base.base.base.counter == 4 && !(kirby->base.base.base.unkC & 0x20)) sub_0803CC80(kirby->base.base.base.unk56); @@ -10591,7 +10591,7 @@ void sub_0805D044(struct Kirby *kirby) kirby->base.base.base.unkC &= ~0x20; sub_080335B4(kirby->base.base.base.unk56); kirby->base.base.base.flags &= ~0x2000; - kirby->base.base.base.unk10.unk1C = 0x10; + kirby->base.base.base.sprite.unk1C = 0x10; kirby->base.other.unk7C[1].unk1C = 0x10; kirby->base.base.base.unk1 = 0; kirby->base.base.base.unk2 = 0; @@ -10777,7 +10777,7 @@ void sub_0805D554(struct Kirby *kirby) { kirby->unkD4 = 52; kirby->base.base.unk78 = sub_0805D630; - --kirby->base.base.base.unk10.unk14; + --kirby->base.base.base.sprite.unk14; sub_08074AB0(kirby); sub_0808F0E8(kirby); } @@ -10821,7 +10821,7 @@ void sub_0805D734(struct Kirby *kirby) sub_0805BE80(kirby); if (kirby->base.base.base.flags & 2) { - ++kirby->base.base.base.unk10.unk14; + ++kirby->base.base.base.sprite.unk14; Macro_0803FF64_6(kirby); return; } @@ -10935,7 +10935,7 @@ void sub_0805DBA4(struct Kirby *kirby) sub_080897A0(&kirby->base.base.base); sub_08091614(kirby); obj4 = sub_0808BEA4(&kirby->base.base.base, (kirby->base.base.base.unk56 << 11) + 0x6010600, 0x163, 0, 0); - obj4->unkC.unk1F = kirby->base.base.base.unk10.unk1F + 4; + obj4->sprite.unk1F = kirby->base.base.base.sprite.unk1F + 4; obj4->flags |= 0x4000; kirby->base.base.unk78 = sub_0805DC70; } @@ -10954,7 +10954,7 @@ void sub_0805DC70(struct Kirby *kirby) if (kirby->base.base.base.flags & 2) { kirby->base.base.base.unkC |= 0x200; - SpriteSomething(&sprite, 0x6000000, 0x161, 0, 0xFF, 0, 0, 0, 0, 0x10, kirby->base.base.base.unk10.unk1F & 0xF, 0x80000); + SpriteSomething(&sprite, 0x6000000, 0x161, 0, 0xFF, 0, 0, 0, 0, 0x10, kirby->base.base.base.sprite.unk1F & 0xF, 0x80000); kirby->base.base.base.flags &= ~2; kirby->unkD4 = 52; kirby->base.base.unk78 = sub_0805DE18; @@ -10967,7 +10967,7 @@ void sub_0805DC70(struct Kirby *kirby) sub_08091B5C(kirby); sub_08091F38(kirby); obj4 = sub_0808BEA4(&kirby->base.base.base, (kirby->base.base.base.unk56 << 11) + 0x6010600, 0x163, 1, 0); - obj4->unkC.unk1F = kirby->base.base.base.unk10.unk1F + 4; + obj4->sprite.unk1F = kirby->base.base.base.sprite.unk1F + 4; obj4->flags |= 0x4000; } else @@ -11037,18 +11037,18 @@ void sub_0805DE18(struct Kirby *kirby) case 11: case 22: kirby->base.base.base.unkC |= 0x200; - SpriteSomething(&sprite, 0x6000000, 0x161, 0, 0xFF, 0, 0, 0, 0, 0x10, kirby->base.base.base.unk10.unk1F & 0xF, 0x80000); + SpriteSomething(&sprite, 0x6000000, 0x161, 0, 0xFF, 0, 0, 0, 0, 0x10, kirby->base.base.base.sprite.unk1F & 0xF, 0x80000); break; case 4: case 15: case 24: kirby->base.base.base.unkC |= 0x200; - SpriteSomething(&sprite, 0x6000000, 0x161, 1, 0xFF, 0, 0, 0, 0, 0x10, kirby->base.base.base.unk10.unk1F & 0xF, 0x80000); + SpriteSomething(&sprite, 0x6000000, 0x161, 1, 0xFF, 0, 0, 0, 0, 0x10, kirby->base.base.base.sprite.unk1F & 0xF, 0x80000); break; case 6: case 17: kirby->base.base.base.unkC |= 0x200; - SpriteSomething(&sprite, 0x6000000, 0x161, 2, 0xFF, 0, 0, 0, 0, 0x10, kirby->base.base.base.unk10.unk1F & 0xF, 0x80000); + SpriteSomething(&sprite, 0x6000000, 0x161, 2, 0xFF, 0, 0, 0, 0, 0x10, kirby->base.base.base.sprite.unk1F & 0xF, 0x80000); break; } r3 = kirby->base.base.base.y - kirby->base.base.base.unk4C; @@ -11160,7 +11160,7 @@ void sub_0805E304(struct Kirby *kirby) kirby->base.base.base.flags &= ~0x10; if (kirby->ability == KIRBY_ABILITY_STONE) sub_0808BEA4(&kirby->base.base.base, (kirby->base.base.base.unk56 << 11) + 0x6010400, 0x1B6, 0, 0) - ->unkC.unk1F = kirby->base.base.base.unk56 + 4; + ->sprite.unk1F = kirby->base.base.base.unk56 + 4; } kirby->base.base.base.flags &= ~2; sub_0807988C(kirby); @@ -11183,7 +11183,7 @@ void sub_0805E448(struct Kirby *kirby) kirby->unkD4 = 53; kirby->base.base.base.counter = 0; sub_0808BEA4(&kirby->base.base.base, (kirby->base.base.base.unk56 << 11) + 0x6010400, 0x1B6, 0, 0) - ->unkC.unk1F = kirby->base.base.base.unk56 + 4; + ->sprite.unk1F = kirby->base.base.base.unk56 + 4; } if (kirby->base.base.base.yspeed < 0) { @@ -11204,7 +11204,7 @@ void sub_0805E448(struct Kirby *kirby) { if (!(kirby->base.base.base.flags & 0x10)) kirby->base.base.base.xspeed = 0; - kirby->base.base.base.unk10.unk14 = 0x740; + kirby->base.base.base.sprite.unk14 = 0x740; kirby->base.other.unk7C[1].unk14 = 0x740; kirby->base.base.base.yspeed = 0; kirby->unkD4 = 52; @@ -11301,7 +11301,7 @@ void sub_0805E5D4(struct Kirby *kirby) if (kirby->base.base.base.counter >> 5 && kirby->base.base.base.counter >> 5 != 4 && kirby->unkD8 > 0xC) - kirby->base.base.base.unk54 += gUnk_0203AD40 & 2; + kirby->base.base.base.objBase54 += gUnk_0203AD40 & 2; } } else @@ -11411,7 +11411,7 @@ void sub_0805E5D4(struct Kirby *kirby) break; } if (abs(kirby->base.base.base.xspeed) > 0xC0 - && kirby->base.base.base.unk10.unk1A == 3 + && kirby->base.base.base.sprite.unk1A == 3 && kirby->base.base.base.unk1 == 1) sub_08089B14(&kirby->base.base.base); kirby->base.base.base.flags &= ~1; @@ -11427,7 +11427,7 @@ void sub_0805E5D4(struct Kirby *kirby) void sub_0805EA50(struct Kirby *kirby) { kirby->base.base.base.flags |= 4; - kirby->base.base.base.unk10.unk1C = 0; + kirby->base.base.base.sprite.unk1C = 0; if (kirby->unk11A & 2) { if (kirby->unkD6 & 0x10) @@ -11440,7 +11440,7 @@ void sub_0805EA50(struct Kirby *kirby) sub_0806FE64(0x201, &kirby->base.base.base); PlaySfx(&kirby->base.base.base, 152); } - kirby->base.base.base.unk10.unk1C = 0x10; + kirby->base.base.base.sprite.unk1C = 0x10; kirby->unkD4 = 54; if (!(kirby->base.base.base.flags & 0x60)) { @@ -11462,7 +11462,7 @@ void sub_0805EA50(struct Kirby *kirby) if (kirby->base.base.base.unk58 & 2) { sub_0805BA58(kirby); - kirby->base.base.base.unk10.unk14 = 0x740; + kirby->base.base.base.sprite.unk14 = 0x740; kirby->base.other.unk7C[1].unk14 = 0x740; kirby->base.base.unk78 = sub_0805EF18; } @@ -11495,7 +11495,7 @@ void sub_0805ED40(struct Kirby *kirby) kirby->base.base.base.flags |= 4; if (kirby->unk11A & 3) { - kirby->base.base.base.unk10.unk1C = 0x10; + kirby->base.base.base.sprite.unk1C = 0x10; kirby->unkD4 = 54; if (!(kirby->base.base.base.flags & 0x60)) { @@ -11514,7 +11514,7 @@ void sub_0805ED40(struct Kirby *kirby) if (kirby->base.base.base.unk58 & 2) { sub_0805BA58(kirby); - kirby->base.base.base.unk10.unk14 = 0x740; + kirby->base.base.base.sprite.unk14 = 0x740; kirby->base.other.unk7C[1].unk14 = 0x740; kirby->base.base.unk78 = sub_0805F210; return; @@ -11562,7 +11562,7 @@ void sub_0805ED40(struct Kirby *kirby) void sub_0805EF18(struct Kirby *kirby) { kirby->base.base.base.flags |= 4; - kirby->base.base.base.unk10.unk1C = 0; + kirby->base.base.base.sprite.unk1C = 0; if (kirby->unk11A & 3) { if (kirby->unkD6 & 0x10) @@ -11575,7 +11575,7 @@ void sub_0805EF18(struct Kirby *kirby) sub_0806FE64(0x201, &kirby->base.base.base); PlaySfx(&kirby->base.base.base, 152); } - kirby->base.base.base.unk10.unk1C = 0x10; + kirby->base.base.base.sprite.unk1C = 0x10; kirby->unkD4 = 54; if (!(kirby->base.base.base.flags & 0x60)) { @@ -11632,7 +11632,7 @@ void sub_0805F210(struct Kirby *kirby) kirby->base.base.base.flags |= 4; if (kirby->unk11A & 3) { - kirby->base.base.base.unk10.unk1C = 0x10; + kirby->base.base.base.sprite.unk1C = 0x10; kirby->unkD4 = 54; if (!(kirby->base.base.base.flags & 0x60)) { @@ -12230,7 +12230,7 @@ void sub_08060300(struct Kirby *kirby) kirby->unkD4 = 66; else kirby->unkD4 = 53; - kirby->base.base.base.unk10.unk1C = 0x20; + kirby->base.base.base.sprite.unk1C = 0x20; kirby->base.other.unk7C[1].unk1C = 0x20; kirby->base.base.unk78 = sub_080612FC; sub_08092C10(kirby); @@ -12580,14 +12580,14 @@ void sub_08060F00(struct Kirby *kirby) struct Object4 *obj4 = sub_0808AE30(&kirby->base.base.base, 0, 0x293, 1); obj4->flags |= kirby->base.base.base.flags & 1; - obj4->unk34 -= 0x800; - obj4->unk38 += 0x800; + obj4->x -= 0x800; + obj4->y += 0x800; obj4->unk3C = -0x80; obj4->unk3E = 0x180; if (kirby->base.base.base.flags & 1) { obj4->unk3C = 0x80; - obj4->unk34 += 0x1000; + obj4->x += 0x1000; } } if (kirby->base.base.base.flags & 2) @@ -12774,14 +12774,14 @@ void sub_080615E8(struct Kirby *kirby) } if (kirby->unkD8 > 1) { - kirby->base.base.base.unk10.unk1C = 0x10; + kirby->base.base.base.sprite.unk1C = 0x10; kirby->base.other.unk7C[1].unk1C = 0x10; sub_08060E18(kirby); return; } if (kirby->base.base.base.flags & 2) { - kirby->base.base.base.unk10.unk1C = 0x10; + kirby->base.base.base.sprite.unk1C = 0x10; kirby->base.other.unk7C[1].unk1C = 0x10; Macro_0803FF64_6(kirby); return; @@ -13716,7 +13716,7 @@ void sub_08063A88(struct Kirby *kirby) } if (kirby->unkD6 <= 9) { - kirby->base.base.base.unk54 = gUnk_0834C188[kirby->unkD6 >> 1]; + kirby->base.base.base.objBase54 = gUnk_0834C188[kirby->unkD6 >> 1]; ++kirby->unkD6; } Macro_080435F8(kirby); @@ -13797,7 +13797,7 @@ void sub_08063E50(struct Kirby *kirby) kirby->unkD4 = 52; kirby->base.base.unk78 = sub_08063F74; obj4 = sub_0808BEA4(&kirby->base.base.base, (kirby->base.base.base.unk56 << 11) + 0x6010380, 0xEB, 0, 0); - obj4->unkC.unk1F = kirby->base.base.base.unk10.unk1F; + obj4->sprite.unk1F = kirby->base.base.base.sprite.unk1F; obj4 = sub_0808BA6C(&kirby->base.base.base, (kirby->base.base.base.unk56 << 11) + 0x6010400, 0xEC, 0); obj4->flags |= 0x4000; sub_0807BCE0(kirby); @@ -14977,7 +14977,7 @@ void sub_080668A4(struct Kirby *kirby) sub_0807E430(kirby); PlaySfx(&kirby->base.base.base, 163); gCurLevelInfo[kirby->base.base.base.unk56].unk8 |= 8; - kirby->base.base.base.unk10.unk14 = 0x700; + kirby->base.base.base.sprite.unk14 = 0x700; kirby->base.other.unk7C[1].unk14 = 0x700; } @@ -15201,8 +15201,8 @@ void sub_0806724C(struct Kirby *kirby) { struct Object4 *obj4 = sub_0808AE30(&kirby->base.base.base, 0, 0x2BA, 1); - obj4->unk34 -= 4 * kirby->base.base.base.xspeed; - obj4->unk38 += 4 * kirby->base.base.base.yspeed; + obj4->x -= 4 * kirby->base.base.base.xspeed; + obj4->y += 4 * kirby->base.base.base.yspeed; obj4->unk3C = -(kirby->base.base.base.xspeed >> 1); obj4->unk3E = -(kirby->base.base.base.yspeed >> 1); } @@ -15253,7 +15253,7 @@ void sub_08067458(struct Kirby *kirby) kirby->base.base.base.flags |= 0x200; kirby->base.base.unk78 = sub_08067520; kirby->base.base.base.unkC |= 0x200; - SpriteSomething(&sprite, 0x6000000, 0x231, 0, 0xFF, 0, 0, 0, 0, 0x10, kirby->base.base.base.unk10.unk1F & 0xF, 0x80000); + SpriteSomething(&sprite, 0x6000000, 0x231, 0, 0xFF, 0, 0, 0, 0, 0x10, kirby->base.base.base.sprite.unk1F & 0xF, 0x80000); } } @@ -16015,11 +16015,11 @@ void sub_08068AB8(struct Kirby *kirby) { struct Object4 *obj4 = sub_0808AE30(&kirby->base.base.base, 0, 0x2B6, 0); - obj4->unk38 -= 0x1800; + obj4->y -= 0x1800; if (kirby->base.base.base.flags & 1) - obj4->unk34 -= 0xB00; + obj4->x -= 0xB00; else - obj4->unk34 += 0xB00; + obj4->x += 0xB00; kirby->unkD8 = Rand16() & 7; sub_08096AC4(kirby, gUnk_0834C490[kirby->unkD8]); PlaySfx(&kirby->base.base.base, 214); @@ -16224,7 +16224,7 @@ void sub_08069270(struct Kirby *kirby) kirby->base.base.unk78 = sub_080606A0; sub_08093390(kirby, -0x18, 0); sub_08080E9C(kirby); - SpriteSomething(&sprite, 0x6000000, 0x285, 0, 0xFF, 0, 0, 0, 0, 0x10, (kirby->base.base.base.unk10.unk1F + 4) & 0xF, 0x80000); + SpriteSomething(&sprite, 0x6000000, 0x285, 0, 0xFF, 0, 0, 0, 0, 0x10, (kirby->base.base.base.sprite.unk1F + 4) & 0xF, 0x80000); } else if (kirby->base.base.base.flags & 0x20) { @@ -16238,7 +16238,7 @@ void sub_08069270(struct Kirby *kirby) kirby->unkD4 = 113; sub_080806FC(kirby); PlaySfx(&kirby->base.base.base, 185); - SpriteSomething(&sprite, 0x6000000, 0x287, 0, 0xFF, 0, 0, 0, 0, 0x10, (kirby->base.base.base.unk10.unk1F + 4) & 0xF, 0x80000); + SpriteSomething(&sprite, 0x6000000, 0x287, 0, 0xFF, 0, 0, 0, 0, 0x10, (kirby->base.base.base.sprite.unk1F + 4) & 0xF, 0x80000); } else { @@ -16253,14 +16253,14 @@ void sub_08069270(struct Kirby *kirby) kirby->unkD4 = 103; sub_080806FC(kirby); PlaySfx(&kirby->base.base.base, 185); - SpriteSomething(&sprite, 0x6000000, 0x287, 0, 0xFF, 0, 0, 0, 0, 0x10, (kirby->base.base.base.unk10.unk1F + 4) & 0xF, 0x80000); + SpriteSomething(&sprite, 0x6000000, 0x287, 0, 0xFF, 0, 0, 0, 0, 0x10, (kirby->base.base.base.sprite.unk1F + 4) & 0xF, 0x80000); } else if (kirby->unk118 & 0x80) sub_0805E304(kirby); else { sub_080694EC(kirby); - SpriteSomething(&sprite, 0x6000000, 0x1FA, 0, 0xFF, 0, 0, 0, 0, 0x10, (kirby->base.base.base.unk10.unk1F + 4) & 0xF, 0x80000); + SpriteSomething(&sprite, 0x6000000, 0x1FA, 0, 0xFF, 0, 0, 0, 0, 0x10, (kirby->base.base.base.sprite.unk1F + 4) & 0xF, 0x80000); } kirby->base.base.base.flags &= ~2; } @@ -16310,8 +16310,8 @@ void sub_08069578(struct Kirby *kirby) sub_080802CC(kirby, 1); kirby->unkD4 = 112; sub_08092C10(kirby); - kirby->base.base.base.unk10.unk18 = 0; - kirby->base.base.base.unk10.unk1B = 0; + kirby->base.base.base.sprite.unk18 = 0; + kirby->base.base.base.sprite.unk1B = 0; kirby->base.base.base.flags &= ~2; kirby->base.base.base.counter = 0; kirby->unkD8 = 0; @@ -16565,16 +16565,16 @@ void sub_0806A03C(struct Kirby *kirby) obj4->unk3E = 0x200; obj4->unk4 = 0x60; obj4->unk8 = -0x40; - obj4->unk38 += 0x400; + obj4->y += 0x400; if (kirby->base.base.base.flags & 1) { obj4->unk3C = -obj4->unk3C; obj4->unk4 = -obj4->unk4; - obj4->unk34 += 0x800; + obj4->x += 0x800; } else { - obj4->unk34 -= 0x800; + obj4->x -= 0x800; } } } @@ -17598,9 +17598,9 @@ void sub_0806D728(struct Kirby *kirby) if (sub_0805BC78(kirby)) return; if (kirby->unkD8 < 5) { - kirby->base.base.base.unk54 = gUnk_0834C5AA[kirby->unkD8++]; + kirby->base.base.base.objBase54 = gUnk_0834C5AA[kirby->unkD8++]; if (kirby->base.base.base.flags & 1) - kirby->base.base.base.unk54 = -kirby->base.base.base.unk54; + kirby->base.base.base.objBase54 = -kirby->base.base.base.objBase54; } if (kirby->base.base.base.flags & 2) { @@ -17648,9 +17648,9 @@ void sub_0806D978(struct Kirby *kirby) if (sub_0805BC78(kirby)) return; if (kirby->unkD8 < 7) { - kirby->base.base.base.unk54 = gUnk_0834C5AF[kirby->unkD8++]; + kirby->base.base.base.objBase54 = gUnk_0834C5AF[kirby->unkD8++]; if (kirby->base.base.base.flags & 1) - kirby->base.base.base.unk54 = -kirby->base.base.base.unk54; + kirby->base.base.base.objBase54 = -kirby->base.base.base.objBase54; } if (kirby->base.base.base.flags & 2) { @@ -17698,9 +17698,9 @@ void sub_0806DBCC(struct Kirby *kirby) if (sub_0805BC78(kirby)) return; if (kirby->unkD4 == 31 && kirby->unkD8 < 7) { - kirby->base.base.base.unk54 = gUnk_0834C5B7[kirby->unkD8++]; + kirby->base.base.base.objBase54 = gUnk_0834C5B7[kirby->unkD8++]; if (kirby->base.base.base.flags & 1) - kirby->base.base.base.unk54 = -kirby->base.base.base.unk54; + kirby->base.base.base.objBase54 = -kirby->base.base.base.objBase54; } if (kirby->base.base.base.flags & 2) { diff --git a/src/laser_ball.c b/src/laser_ball.c index 8319d6c..0d3f055 100644 --- a/src/laser_ball.c +++ b/src/laser_ball.c @@ -301,91 +301,23 @@ static void sub_080B2780(struct Object2* arg0) { } sub_0803E2B0(&laser->base, 2, -3, 10, 3); sub_0803E308(&laser->base, 16, -1, 18, 1); - sub_080708DC(&laser->base, &laser->base.unk10, 4, 0x321, 6, 9); - laser->base.unk10.unk1F = 0; - if (arg0->base.unkC & 0x10) { - if (gKirbys[gUnk_0203AD3C].base.base.base.roomId == laser->base.roomId) { - laser->base.unk10.unk1F = sub_0803DF24(gUnk_08351648[OBJ_DROPPY].unk8); - if (laser->base.unk10.unk1F == 0xff) { - laser->base.unk10.unk1F = sub_0803DFAC(gUnk_08351648[OBJ_DROPPY].unk8, 0); - } - } - else { - laser->base.unk10.unk1F = 0; - } - } - else { - if (gKirbys[gUnk_0203AD3C].base.base.base.roomId == laser->base.roomId) { - laser->base.unk10.unk1F = sub_0803DF24(0x321); - if (laser->base.unk10.unk1F == 0xff) { - laser->base.unk10.unk1F = sub_0803DFAC(0x321, 0); - } - } - else { - laser->base.unk10.unk1F = arg0->base.unkC & 0x10; - } - } + sub_080708DC(&laser->base, &laser->base.sprite, 4, 0x321, 6, 9); + laser->base.sprite.unk1F = 0; + if (arg0->base.unkC & 0x10) + Macro_081050E8(&laser->base, &laser->base.sprite, gUnk_08351648[OBJ_DROPPY].unk8, 1); + else + Macro_081050E8(&laser->base, &laser->base.sprite, 0x321, 1); PlaySfx(&laser->base, 0x13c); } static u32 sub_080B2A30(struct Laser* arg0) { - struct Sprite sprite, *sprite2, *sprite3; + struct Sprite sprite; struct Object2 *parent = arg0->base.parent; - if (gKirbys[gUnk_0203AD3C].base.base.base.roomId == arg0->base.roomId) { - if (arg0->base.flags & 0x4000) { - if (arg0->base.unk10.unk0 == 0) { - (sprite2 = &arg0->base.unk10)->unk0 = sub_0803DE54(4, arg0->base.unk10.unkC, arg0->base.unk10.unk1A); - sprite2->unk8 = arg0->base.unk10.unk8 & ~0x80000; - CpuCopy32(sprite2, &sprite, sizeof(struct Sprite)); - sub_0815521C(&sprite, arg0->base.unk1); - sprite2->unk8 = arg0->base.unk10.unk8 | 0x80000; - } - } - else { - if (arg0->base.unk10.unk0 == 0) { - (sprite3 = &arg0->base.unk10)->unk0 = sub_081570B0(4); - sprite3->unk8 = arg0->base.unk10.unk8 & ~0x80000; - CpuCopy32(&arg0->base.unk10, &sprite, sizeof(struct Sprite)); - sub_0815521C(&sprite, arg0->base.unk1); - } - } - } - else { - if (arg0->base.unk10.unk0 != 0) { - bool8 val = arg0->base.flags & 0x4000; - if (!(arg0->base.flags & 0x4000)) { - sub_08157190(arg0->base.unk10.unk0); - arg0->base.unk10.unk0 = val; - } - } - arg0->base.unk10.unk8 |= 0x80000; - } - if (parent->base.unkC & 0x10) { - if (gKirbys[gUnk_0203AD3C].base.base.base.roomId == arg0->base.roomId) { - if (arg0->base.unk10.unk1F == 0) { - arg0->base.unk10.unk1F = sub_0803DF24(gUnk_08351648[OBJ_DROPPY].unk8); - if (arg0->base.unk10.unk1F == 0xff) { - arg0->base.unk10.unk1F = sub_0803DFAC(gUnk_08351648[OBJ_DROPPY].unk8, 0); - } - } - } - else { - arg0->base.unk10.unk1F = 0; - } - } - else { - if (gKirbys[gUnk_0203AD3C].base.base.base.roomId == arg0->base.roomId) { - if (arg0->base.unk10.unk1F == 0) { - arg0->base.unk10.unk1F = sub_0803DF24(0x321); - if (arg0->base.unk10.unk1F == 0xff) { - arg0->base.unk10.unk1F = sub_0803DFAC(0x321, 0); - } - } - } - else { - arg0->base.unk10.unk1F = parent->base.unkC & 0x10; - } - } + Macro_08107BA8_4(&arg0->base, &arg0->base.sprite, &sprite, 4, &arg0->base.sprite); + if (parent->base.unkC & 0x10) + Macro_081050E8(&arg0->base, &arg0->base.sprite, gUnk_08351648[OBJ_DROPPY].unk8, !arg0->base.sprite.unk1F); + else + Macro_081050E8(&arg0->base, &arg0->base.sprite, 0x321, !arg0->base.sprite.unk1F); if (arg0->unk88 != 0 && arg0->base.flags & 2) { arg0->base.flags |= 0x1000; return 1; @@ -457,7 +389,7 @@ static void sub_080B2D68(struct Object2* arg0) { } static u32 sub_080B2D74(struct Laser* arg0) { - arg0->base.unk10.unk1A = 7; + arg0->base.sprite.unk1A = 7; arg0->unk88 = 1; arg0->base.flags &= ~0x200; arg0->base.flags &= ~0x100; diff --git a/src/metal_guardian.c b/src/metal_guardian.c index 5e4c739..d4e20ba 100644 --- a/src/metal_guardian.c +++ b/src/metal_guardian.c @@ -80,7 +80,7 @@ void* CreateMetalGuardian(struct Object* arg0, u8 arg1) { obj->base.unk5C &= ~7; obj->base.unk5C |= 3; ObjectInitSprite(obj); - obj->base.unk10.unk14 = 0x6C0; + obj->base.sprite.unk14 = 0x6C0; if (obj->object->subtype1 != 0) { sub_080BE25C(obj); } @@ -165,10 +165,10 @@ static void sub_080BD634(struct Object2* arg0) { else { if (arg0->base.unk1 <= 7) { if (arg0->base.flags & 1) { - arg0->base.unk54 = -gUnk_08354BA0[arg0->base.unk1]; + arg0->base.objBase54 = -gUnk_08354BA0[arg0->base.unk1]; } else { - arg0->base.unk54 = gUnk_08354BA0[arg0->base.unk1]; + arg0->base.objBase54 = gUnk_08354BA0[arg0->base.unk1]; } } if (arg0->base.flags & 2) { @@ -246,22 +246,22 @@ static void sub_080BDA70(struct Object2* arg0, u8 arg1) { laser->base.yspeed = 0x5a2; sub_0803E2B0(&laser->base, 2, -3, 10, 3); sub_0803E308(&laser->base, 16, -1, 18, 1); - sub_080708DC(&laser->base, &laser->base.unk10, 0xc, 0x311, 9, 0x1b); - laser->base.unk10.unk8 |= 0x800; + sub_080708DC(&laser->base, &laser->base.sprite, 0xc, 0x311, 9, 0x1b); + laser->base.sprite.unk8 |= 0x800; break; case 2: laser->base.xspeed = 0x5a2; laser->base.yspeed = -0x5a2; sub_0803E2B0(&laser->base, 2, -3, 10, 3); sub_0803E308(&laser->base, 16, -1, 18, 1); - sub_080708DC(&laser->base, &laser->base.unk10, 0xc, 0x311, 9, 0x1b); + sub_080708DC(&laser->base, &laser->base.sprite, 0xc, 0x311, 9, 0x1b); break; default: laser->base.xspeed = 0x800; laser->base.yspeed = 0; sub_0803E2B0(&laser->base, 2, -3, 10, 3); sub_0803E308(&laser->base, 16, -1, 18, 1); - sub_080708DC(&laser->base, &laser->base.unk10, 0xc, 0x311, 8, 0x1b); + sub_080708DC(&laser->base, &laser->base.sprite, 0xc, 0x311, 8, 0x1b); break; } if (arg0->base.flags & 1) { @@ -272,22 +272,22 @@ static void sub_080BDA70(struct Object2* arg0, u8 arg1) { else { laser->base.x += 0x800; } - laser->base.unk10.unk1F = 0; + laser->base.sprite.unk1F = 0; if (gKirbys[gUnk_0203AD3C].base.base.base.roomId == laser->base.roomId) { - laser->base.unk10.unk1F = sub_0803DF24(0x311); - if (laser->base.unk10.unk1F == 0xff) { - laser->base.unk10.unk1F = sub_0803DFAC(0x311, 0); + laser->base.sprite.unk1F = sub_0803DF24(0x311); + if (laser->base.sprite.unk1F == 0xff) { + laser->base.sprite.unk1F = sub_0803DFAC(0x311, 0); } } else { - laser->base.unk10.unk1F = 0; + laser->base.sprite.unk1F = 0; } } static u32 sub_080BDD1C(struct MetalGuardianLaser* arg0) { struct Sprite sprite; - Macro_08107BA8_4(&arg0->base, &arg0->base.unk10, &sprite, 0xc, &arg0->base.unk10); - Macro_081050E8(&arg0->base, &arg0->base.unk10, 0x311, !arg0->base.unk10.unk1F); + Macro_08107BA8_4(&arg0->base, &arg0->base.sprite, &sprite, 0xc, &arg0->base.sprite); + Macro_081050E8(&arg0->base, &arg0->base.sprite, 0x311, !arg0->base.sprite.unk1F); if (arg0->unk88 != 0 && arg0->base.flags & 2) { arg0->base.flags |= 0x1000; return 1; @@ -339,16 +339,16 @@ static void sub_080BDE7C(struct Object2* arg0) { } sub_0803E2B0(&laser->base, 2, -3, 10, 3); sub_0803E308(&laser->base, 16, -1, 18, 1); - sub_080708DC(&laser->base, &laser->base.unk10, 0xc, 0x311, 7, 0x1b); - laser->base.unk10.unk1F = 0; + sub_080708DC(&laser->base, &laser->base.sprite, 0xc, 0x311, 7, 0x1b); + laser->base.sprite.unk1F = 0; if (gKirbys[gUnk_0203AD3C].base.base.base.roomId == laser->base.roomId) { - laser->base.unk10.unk1F = sub_0803DF24(0x311); - if (laser->base.unk10.unk1F == 0xff) { - laser->base.unk10.unk1F = sub_0803DFAC(0x311, 0); + laser->base.sprite.unk1F = sub_0803DF24(0x311); + if (laser->base.sprite.unk1F == 0xff) { + laser->base.sprite.unk1F = sub_0803DFAC(0x311, 0); } } else { - laser->base.unk10.unk1F = 0; + laser->base.sprite.unk1F = 0; } PlaySfx(&laser->base, 0x139); } @@ -356,8 +356,8 @@ static void sub_080BDE7C(struct Object2* arg0) { static u32 sub_080BE0E8(struct MetalGuardianLaser* arg0) { struct Sprite sprite; arg0->base.flags |= 4; - Macro_08107BA8_4(&arg0->base, &arg0->base.unk10, &sprite, 0xc, &arg0->base.unk10); - Macro_081050E8(&arg0->base, &arg0->base.unk10, 0x311, !arg0->base.unk10.unk1F); + Macro_08107BA8_4(&arg0->base, &arg0->base.sprite, &sprite, 0xc, &arg0->base.sprite); + Macro_081050E8(&arg0->base, &arg0->base.sprite, 0x311, !arg0->base.sprite.unk1F); return 0; } @@ -389,7 +389,7 @@ static u32 sub_080BE2A8(struct MetalGuardianLaser* arg0) { } static u32 sub_080BE2C4(struct MetalGuardianLaser* arg0) { - arg0->base.unk10.unk1A = 10; + arg0->base.sprite.unk1A = 10; arg0->unk88 = 1; arg0->base.flags &= ~0x200; arg0->base.flags &= ~0x100; diff --git a/src/noddy.c b/src/noddy.c index 9b61b6d..875deae 100644 --- a/src/noddy.c +++ b/src/noddy.c @@ -87,47 +87,47 @@ static void sub_080C2438(struct Object2 *r6) { sub_0803E3B0(r4); r4->unk0 = 3; - r4->unk34 = r6->base.x; - r4->unk38 = r6->base.y; - r4->unk44 = r6; + r4->x = r6->base.x; + r4->y = r6->base.y; + r4->parent = r6; r4->roomId = r6->base.roomId; r4->unk3C = 0x20; r4->unk3E = 0x40; if (r6->base.flags & 1) { - r4->unk34 += 0xC00; + r4->x += 0xC00; r4->unk3C = -r4->unk3C; } else { r4->flags |= 1; - r4->unk34 -= 0xC00; + r4->x -= 0xC00; } if (Macro_0810B1F4(&r6->base)) r4->flags |= 0x2000; - sub_080709F8(r4, &r4->unkC, 1, 0x322, 6, 12); - r4->unkC.unk1F = 0; + sub_080709F8(r4, &r4->sprite, 1, 0x322, 6, 12); + r4->sprite.unk1F = 0; if (r6->base.unkC & 0x10) - Macro_081050E8(r4, &r4->unkC, gUnk_08351648[OBJ_DROPPY].unk8, 1); + Macro_081050E8(r4, &r4->sprite, gUnk_08351648[OBJ_DROPPY].unk8, 1); else - Macro_081050E8(r4, &r4->unkC, 0x322, 1); + Macro_081050E8(r4, &r4->sprite, 0x322, 1); } static void sub_080C25CC(void) { struct Object4 *r0, *r5 = TaskGetStructPtr(gCurTask, r0); - struct Object2 *r6 = r5->unk44, *r3; + struct Object2 *r6 = r5->parent, *r3; struct Sprite sprite; if (r5->flags & 0x1000) { TaskDestroy(gCurTask); return; } - Macro_08107BA8_4(r5, &r5->unkC, &sprite, 1, &r5->unkC); + Macro_08107BA8_4(r5, &r5->sprite, &sprite, 1, &r5->sprite); if (r6->base.unkC & 0x10) - Macro_081050E8(r5, &r5->unkC, gUnk_08351648[OBJ_DROPPY].unk8, !r5->unkC.unk1F); + Macro_081050E8(r5, &r5->sprite, gUnk_08351648[OBJ_DROPPY].unk8, !r5->sprite.unk1F); else - Macro_081050E8(r5, &r5->unkC, 0x322, !r5->unkC.unk1F); - r3 = r5->unk44; + Macro_081050E8(r5, &r5->sprite, 0x322, !r5->sprite.unk1F); + r3 = r5->parent; if (r3) { if (r3->base.unk0 && r3->base.flags & 0x1000) { - r5->unk44 = NULL; + r5->parent = NULL; r3 = NULL; } if (!r3) @@ -146,8 +146,8 @@ static void sub_080C25CC(void) { r5->flags |= 0x1000; } else { if (!(r5->flags & 0x800)) { - r5->unk34 += r5->unk3C; - r5->unk38 -= r5->unk3E; + r5->x += r5->unk3C; + r5->y -= r5->unk3E; } sub_0806FAC8(r5); } diff --git a/src/object.c b/src/object.c index d6c6f23..b8e5eba 100644 --- a/src/object.c +++ b/src/object.c @@ -166,9 +166,9 @@ void ObjectMain(void) { obj->base.unkC &= ~8; } } - if (obj->base.unk10.unk20[0].unk0 == 0) { - if (obj->base.unk10.unk16 == 0) { - obj->base.unk10.unk20[0].unk0 = -1; + if (obj->base.sprite.unk20[0].unk0 == 0) { + if (obj->base.sprite.unk16 == 0) { + obj->base.sprite.unk20[0].unk0 = -1; } } sub_0809A7A4(); @@ -202,13 +202,13 @@ void ObjectDestroy(struct Task* arg0) { } } if (gUnk_08351648[obj->type].unk8 & 0x1000) { - if (obj->base.unk10.unk1F != 0) { - sub_0803E4D4(obj->base.unk10.unk1F); + if (obj->base.sprite.unk1F != 0) { + sub_0803E4D4(obj->base.sprite.unk1F); } } - if (obj->base.unk10.unk0 != 0) { + if (obj->base.sprite.unk0 != 0) { if (!(obj->base.flags & 0x4000)) { - sub_08157190(obj->base.unk10.unk0); + sub_08157190(obj->base.sprite.unk0); } } if (obj->unk8C != NULL) { @@ -274,8 +274,8 @@ static void sub_0809A580(struct Task *task) { break; } } - if (obj->base.unk10.unk0 && !(obj->base.flags & 0x4000)) - sub_08157190(obj->base.unk10.unk0); + if (obj->base.sprite.unk0 && !(obj->base.flags & 0x4000)) + sub_08157190(obj->base.sprite.unk0); if (obj->unk8C) EwramFree(obj->unk8C); if (obj->base.unk56 != 0xFF) @@ -289,17 +289,17 @@ static void sub_0809A630(struct Object2 *obj) { s32 v4; if (!gUnk_08351648[obj->type].unkC) return; - r6 = &obj->base.unk10; + r6 = &obj->base.sprite; if (!(obj->base.unkC & 0x200)) { if (gKirbys[gUnk_0203AD3C].base.base.base.roomId == obj->base.roomId) { - if (!obj->base.unk10.unk0) { + if (!obj->base.sprite.unk0) { if (obj->base.flags & 0x4000) { r6->unk0 = sub_0803DD58(obj->type); r6->unk8 &= ~0x80000; CpuCopy32(r6, &sprite, sizeof(struct Sprite)); sub_0815521C(&sprite, obj->base.unk1); } else { - obj->base.unk10.unk0 = sub_081570B0(gUnk_08351648[obj->type].unkC); + obj->base.sprite.unk0 = sub_081570B0(gUnk_08351648[obj->type].unkC); r6->unk8 &= ~0x80000; CpuCopy32(r6, &sprite, sizeof(struct Sprite)); sub_0815521C(&sprite, obj->base.unk1); @@ -321,10 +321,10 @@ static void sub_0809A630(struct Object2 *obj) { r6->unk1F = v4; } } else { - if (obj->base.unk10.unk0) { + if (obj->base.sprite.unk0) { if (!(obj->base.flags & 0x4000)) - sub_08157190(obj->base.unk10.unk0); - obj->base.unk10.unk0 = 0; + sub_08157190(obj->base.sprite.unk0); + obj->base.sprite.unk0 = 0; } r6->unk8 |= 0x80000; r6->unk1F = 0; @@ -338,7 +338,7 @@ static void sub_0809A7A4(void) { struct Sprite *r6; if (gUnk_08351648[r7->type].unkC) { - r6 = &r7->base.unk10; + r6 = &r7->base.sprite; if (r7->base.flags & 1) r6->unk8 &= ~0x400; else @@ -369,12 +369,12 @@ static void sub_0809A7A4(void) { } if (!(r7->base.flags & 0x400) && gKirbys[gUnk_0203AD3C].base.base.base.roomId == r7->base.roomId) { - r6->unk10 = (r7->base.x >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unkC >> 8) + r7->base.unk54; - r6->unk12 = (r7->base.y >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unk10 >> 8) + r7->base.unk55; + r6->unk10 = (r7->base.x >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unkC >> 8) + r7->base.objBase54; + r6->unk12 = (r7->base.y >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unk10 >> 8) + r7->base.objBase55; r6->unk10 += gUnk_0203AD18[0]; r6->unk12 += gUnk_0203AD18[1]; - r7->base.unk55 = 0; - r7->base.unk54 = 0; + r7->base.objBase55 = 0; + r7->base.objBase54 = 0; if (r7->base.flags & 0x4000) sub_081564D8(r6); else @@ -442,13 +442,13 @@ static void sub_0809AA10(struct Object2 *r10, struct ObjectBase *sp00) { if (r10->type != OBJ_DARK_MIND_FORM_2) { struct Object4 *r0 = sub_0808AE30(&r10->base, 0, 0x2A3, 0); - r0->unkC.unk14 = 0x240; + r0->sprite.unk14 = 0x240; Rand32(); - r0->unk34 += 0x800; - r0->unk34 -= ((gRngVal >> 16) & 0xFFF); + r0->x += 0x800; + r0->x -= ((gRngVal >> 16) & 0xFFF); Rand32(); - r0->unk38 += 0x800; - r0->unk38 -= ((gRngVal >> 16) & 0xFFF); + r0->y += 0x800; + r0->y -= ((gRngVal >> 16) & 0xFFF); } if (sp04 < r7) { sp04 = r7; @@ -479,13 +479,13 @@ static void sub_0809AA10(struct Object2 *r10, struct ObjectBase *sp00) { if (r10->type != OBJ_DARK_MIND_FORM_2) { struct Object4 *r0 = sub_0808AE30(&r10->base, 0, 0x2A3, 2); - r0->unkC.unk14 = 0x240; + r0->sprite.unk14 = 0x240; Rand32(); - r0->unk34 += 0x800; - r0->unk34 -= ((gRngVal >> 16) & 0xFFF); + r0->x += 0x800; + r0->x -= ((gRngVal >> 16) & 0xFFF); Rand32(); - r0->unk38 += 0x800; - r0->unk38 -= ((gRngVal >> 16) & 0xFFF); + r0->y += 0x800; + r0->y -= ((gRngVal >> 16) & 0xFFF); } if (sp04 < r7) { sp04 = r7; @@ -502,13 +502,13 @@ static void sub_0809AA10(struct Object2 *r10, struct ObjectBase *sp00) { if (r10->type != OBJ_DARK_MIND_FORM_2) { struct Object4 *r0 = sub_0808AE30(&r10->base, 0, 0x2A3, 0); - r0->unkC.unk14 = 0x240; + r0->sprite.unk14 = 0x240; Rand32(); - r0->unk34 += 0x800; - r0->unk34 -= ((gRngVal >> 16) & 0xFFF); + r0->x += 0x800; + r0->x -= ((gRngVal >> 16) & 0xFFF); Rand32(); - r0->unk38 += 0x800; - r0->unk38 -= ((gRngVal >> 16) & 0xFFF); + r0->y += 0x800; + r0->y -= ((gRngVal >> 16) & 0xFFF); } if (sp04 < r7) { sp04 = r7; @@ -787,7 +787,7 @@ void sub_0809B1E4(struct Object2 *r4) { } r4->base.flags |= 0xB00; r4->base.counter = 0; - r4->base.unk10.unk1C = 0; + r4->base.sprite.unk1C = 0; r4->unk78 = sub_0809F88C; } else { if (!(r4->base.flags & 0x4000000)) { @@ -850,13 +850,13 @@ static void sub_0809B6A8(struct Object2 *r3) { r3->base.unkC &= ~0x4000; r3->base.unk5C |= 0x80; if (r3->unk9E < 8) { - r3->base.unk55 = gUnk_08352DD0[r3->unk9E]; + r3->base.objBase55 = gUnk_08352DD0[r3->unk9E]; ++r3->unk9E; } if (r3->base.counter > 10) { if (!(r3->base.flags & 0x4000000)) r3->base.flags &= ~0x800; - r3->base.unk55 = 0; + r3->base.objBase55 = 0; r3->base.counter = 0; if (r3->base.yspeed) r3->base.flags |= 0x20; @@ -1018,7 +1018,7 @@ static void sub_0809C180(struct Object2 *r4) { } r4->base.yspeed = 0; if (r4->base.counter < 8) - r4->base.unk55 = gUnk_08352DD0[r4->base.counter]; + r4->base.objBase55 = gUnk_08352DD0[r4->base.counter]; if (r4->base.counter > 10) r4->unk78 = sub_0809BEF8; ++r4->base.counter; @@ -1288,7 +1288,7 @@ static void sub_0809CE80(struct Object2 *r4) { struct Object2 *obj; if (r4->base.counter < 8) - r4->base.unk54 = gUnk_08352DD0[r4->base.counter]; + r4->base.objBase54 = gUnk_08352DD0[r4->base.counter]; if (++r4->base.counter > 30) { r6 = OBJ_SMALL_FOOD; r12 = 0; @@ -1491,12 +1491,12 @@ static void sub_0809D710(struct Object2 *r3) { static void sub_0809D7C8(struct Object2 *r8) { u8 r4; - struct Sprite *r7 = &r8->base.unk10; + struct Sprite *r7 = &r8->base.sprite; - if (r8->base.unk10.unk0 && !(r8->base.flags & 0x400) + if (r8->base.sprite.unk0 && !(r8->base.flags & 0x400) && gKirbys[gUnk_0203AD3C].base.base.base.roomId == r8->base.roomId) { - r7->unk10 = (r8->base.x >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unkC >> 8) + r8->base.unk54; - r7->unk12 = (r8->base.y >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unk10 >> 8) + r8->base.unk55; + r7->unk10 = (r8->base.x >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unkC >> 8) + r8->base.objBase54; + r7->unk12 = (r8->base.y >> 8) - (gCurLevelInfo[gUnk_0203AD3C].unk10 >> 8) + r8->base.objBase55; r7->unk10 += gUnk_0203AD18[0]; r7->unk12 += gUnk_0203AD18[1]; r4 = r7->unk1C; @@ -1637,9 +1637,9 @@ static void sub_0809E424(struct Object2 *sb) { TaskGetStructPtr(task, r7); sub_0803E3B0(r7); r7->unk0 = 3; - r7->unk34 = sb->base.x; - r7->unk38 = sb->base.y; - r7->unk44 = sb; + r7->x = sb->base.x; + r7->y = sb->base.y; + r7->parent = sb; r7->roomId = sb->base.roomId; r7->flags |= 0x4000; Rand32(); @@ -1651,12 +1651,12 @@ static void sub_0809E424(struct Object2 *sb) { if (Macro_0810B1F4(&sb->base)) r7->flags |= 0x2000; r7->flags |= 0x4000; - sub_080709F8(r7, &r7->unkC, 0x6012000, 0x297, 1, 12); + sub_080709F8(r7, &r7->sprite, 0x6012000, 0x297, 1, 12); } static void sub_0809E55C(void) { struct Object4 *r0_, *r7 = TaskGetStructPtr(gCurTask, r0_); - struct Object2 *ip = r7->unk44; + struct Object2 *ip = r7->parent; u16 r1; if (r7->flags & 0x1000) { @@ -1692,8 +1692,8 @@ static void sub_0809E55C(void) { } else { r7->unk3E -= gUnk_08352DF8[r7->unk1 >> 1]; } - r7->unk34 = ip->base.x + r7->unk3C; - r7->unk38 = ip->base.y + r7->unk3E; + r7->x = ip->base.x + r7->unk3C; + r7->y = ip->base.y + r7->unk3E; sub_0806FAC8(r7); } } @@ -1706,9 +1706,9 @@ void sub_0809E79C(struct Object2 *sb) { TaskGetStructPtr(task, r7); sub_0803E3B0(r7); r7->unk0 = 3; - r7->unk34 = sb->base.x; - r7->unk38 = sb->base.y; - r7->unk44 = sb; + r7->x = sb->base.x; + r7->y = sb->base.y; + r7->parent = sb; r7->roomId = sb->base.roomId; r7->flags |= 0x4000; Rand32(); @@ -1720,12 +1720,12 @@ void sub_0809E79C(struct Object2 *sb) { if (Macro_0810B1F4(&sb->base)) r7->flags |= 0x2000; r7->flags |= 0x4000; - sub_080709F8(r7, &r7->unkC, 0x6012000, 0x29D, 0, 12); + sub_080709F8(r7, &r7->sprite, 0x6012000, 0x29D, 0, 12); } static void sub_0809E8D4(void) { struct Object4 *r0_, *r7 = TaskGetStructPtr(gCurTask, r0_); - struct Object2 *ip = r7->unk44; + struct Object2 *ip = r7->parent; u16 r1; if (r7->flags & 0x1000) { @@ -1753,8 +1753,8 @@ static void sub_0809E8D4(void) { r1 = Rand16(); r7->unk3E = ({12 - ((r1 % 16) + (r1 % 8));}) << 8; } - r7->unk34 = ip->base.x + r7->unk3C; - r7->unk38 = ip->base.y + r7->unk3E; + r7->x = ip->base.x + r7->unk3C; + r7->y = ip->base.y + r7->unk3E; switch (r7->unk1) { case 0: r7->unk3C += 0x100; @@ -1792,9 +1792,9 @@ static void sub_0809EB90(struct Object2 *sb) { TaskGetStructPtr(task, r7); sub_0803E3B0(r7); r7->unk0 = 3; - r7->unk34 = sb->base.x; - r7->unk38 = sb->base.y; - r7->unk44 = sb; + r7->x = sb->base.x; + r7->y = sb->base.y; + r7->parent = sb; r7->roomId = sb->base.roomId; r7->unk8 = 0; r7->flags |= 0x4000; @@ -1808,12 +1808,12 @@ static void sub_0809EB90(struct Object2 *sb) { if (Macro_0810B1F4(&sb->base)) r7->flags |= 0x2000; r7->flags |= 0x4000; - sub_080709F8(r7, &r7->unkC, 0x6012000, 0x29e, 0, 12); + sub_080709F8(r7, &r7->sprite, 0x6012000, 0x29e, 0, 12); } static void sub_0809ECD0(void) { struct Object4 *r0_, *r7 = TaskGetStructPtr(gCurTask, r0_); - struct Object2 *ip = r7->unk44; + struct Object2 *ip = r7->parent; if (r7->flags & 0x1000) { TaskDestroy(gCurTask); @@ -1870,8 +1870,8 @@ static void sub_0809ECD0(void) { r7->unk3C += r7->unk4; r7->unk4 -= 7; } - r7->unk34 = ip->base.x + r7->unk3C; - r7->unk38 = ip->base.y + r7->unk3E; + r7->x = ip->base.x + r7->unk3C; + r7->y = ip->base.y + r7->unk3E; sub_0806FAC8(r7); } } @@ -2021,17 +2021,17 @@ void ObjectInitSprite(struct Object2* arg0) { if (gUnk_08351648[arg0->type].unkC != 0) { if (gKirbys[gUnk_0203AD3C].base.base.base.roomId == arg0->base.roomId) { if (arg0->base.flags & 0x4000) { - arg0->base.unk10.unk0 = sub_0803DD58(arg0->type); + arg0->base.sprite.unk0 = sub_0803DD58(arg0->type); } else { - arg0->base.unk10.unk0 = sub_081570B0(gUnk_08351648[arg0->type].unkC); + arg0->base.sprite.unk0 = sub_081570B0(gUnk_08351648[arg0->type].unkC); } - arg0->base.unk10.unk14 = r7 << 6; - arg0->base.unk10.unkC = gUnk_08351648[arg0->type].unk14[arg0->unk83].unk0; - arg0->base.unk10.unk1A = gUnk_08351648[arg0->type].unk14[arg0->unk83].unk2; - arg0->base.unk10.unk16 = 0; - arg0->base.unk10.unk1B = 0xff; - arg0->base.unk10.unk1C = 0x10; + arg0->base.sprite.unk14 = r7 << 6; + arg0->base.sprite.unkC = gUnk_08351648[arg0->type].unk14[arg0->unk83].unk0; + arg0->base.sprite.unk1A = gUnk_08351648[arg0->type].unk14[arg0->unk83].unk2; + arg0->base.sprite.unk16 = 0; + arg0->base.sprite.unk1B = 0xff; + arg0->base.sprite.unk1C = 0x10; r4 = gUnk_08351648[arg0->type].unk8; if (arg0->base.unkC & 0x10) { r4 = gUnk_08351648[OBJ_DROPPY].unk8; @@ -2046,26 +2046,26 @@ void ObjectInitSprite(struct Object2* arg0) { ret = 0; } } - arg0->base.unk10.unk1F = ret; - arg0->base.unk10.unk10 = arg0->base.x >> 8; - arg0->base.unk10.unk12 = arg0->base.y >> 8; - arg0->base.unk10.unk8 = 0x42000; - arg0->base.unk10.unk20[0].unk0 = -1; - sub_08155128(&arg0->base.unk10); + arg0->base.sprite.unk1F = ret; + arg0->base.sprite.unk10 = arg0->base.x >> 8; + arg0->base.sprite.unk12 = arg0->base.y >> 8; + arg0->base.sprite.unk8 = 0x42000; + arg0->base.sprite.unk20[0].unk0 = -1; + sub_08155128(&arg0->base.sprite); } else { - arg0->base.unk10.unk0 = 0; - arg0->base.unk10.unk14 = r7 << 6; - arg0->base.unk10.unkC = gUnk_08351648[arg0->type].unk14[arg0->unk83].unk0; - arg0->base.unk10.unk1A = gUnk_08351648[arg0->type].unk14[arg0->unk83].unk2; - arg0->base.unk10.unk16 = 0; - arg0->base.unk10.unk1B = 0xff; - arg0->base.unk10.unk1C = 0x10; - arg0->base.unk10.unk1F = 0; - arg0->base.unk10.unk10 = arg0->base.x >> 8; - arg0->base.unk10.unk12 = arg0->base.y >> 8; - arg0->base.unk10.unk8 = 0xc2000; - sub_08155128(&arg0->base.unk10); + arg0->base.sprite.unk0 = 0; + arg0->base.sprite.unk14 = r7 << 6; + arg0->base.sprite.unkC = gUnk_08351648[arg0->type].unk14[arg0->unk83].unk0; + arg0->base.sprite.unk1A = gUnk_08351648[arg0->type].unk14[arg0->unk83].unk2; + arg0->base.sprite.unk16 = 0; + arg0->base.sprite.unk1B = 0xff; + arg0->base.sprite.unk1C = 0x10; + arg0->base.sprite.unk1F = 0; + arg0->base.sprite.unk10 = arg0->base.x >> 8; + arg0->base.sprite.unk12 = arg0->base.y >> 8; + arg0->base.sprite.unk8 = 0xc2000; + sub_08155128(&arg0->base.sprite); } } } @@ -2075,7 +2075,7 @@ void *CreateEmpty(struct Object *r6, u8 r7) { struct Object2 *r4; sub_0803E380(&TaskGetStructPtr(task, r4)->base); - r4->base.unk10.unk0 = 0; + r4->base.sprite.unk0 = 0; r4->base.unk0 = 1; r4->base.roomId = gCurLevelInfo[r7].currentRoom; r4->base.unk56 = r7; @@ -2150,7 +2150,7 @@ void sub_0809F840(struct Object2 *obj) { static void sub_0809F88C(struct Object2 *obj) { ++obj->base.counter; - obj->base.unk10.unk1C = 0; + obj->base.sprite.unk1C = 0; if (obj->base.counter == 2) { obj->base.flags |= 0x1000; sub_0809DA30(obj); @@ -2161,14 +2161,14 @@ static void sub_0809F8BC(struct Object2 *obj) { struct Object3 *obj3 = obj->base.parent; obj->base.flags |= 0x2F00; - obj->base.unk10.unk8 &= ~0x800; - obj->base.unk10.unk8 |= obj3->base.unk10.unk8 & 0x800; + obj->base.sprite.unk8 &= ~0x800; + obj->base.sprite.unk8 |= obj3->base.sprite.unk8 & 0x800; obj->base.flags &= ~1; obj->base.flags |= (obj3->base.flags & 1); obj->base.x = obj3->base.x; obj->base.y = obj3->base.y; - obj->base.unk54 = obj3->base.unk54; - obj->base.unk55 = obj3->base.unk55; + obj->base.objBase54 = obj3->base.objBase54; + obj->base.objBase55 = obj3->base.objBase55; if (obj3->base.flags & 0x1000) obj->base.flags |= 0x1000; } diff --git a/src/parasol.c b/src/parasol.c index 2c0ba07..424c275 100644 --- a/src/parasol.c +++ b/src/parasol.c @@ -141,12 +141,12 @@ static void sub_080C2D44(struct Object2 *r3) { r3->base.flags |= 4; r5 = r3->base.parent; ip = &r5->base; - if (ip->unk10.unk8 & 0x800) - r3->base.unk10.unk8 |= 0x800; + if (ip->sprite.unk8 & 0x800) + r3->base.sprite.unk8 |= 0x800; else - r3->base.unk10.unk8 &= ~0x800; - r3->base.unk54 = ip->unk54; - r3->base.unk55 = ip->unk55; + r3->base.sprite.unk8 &= ~0x800; + r3->base.objBase54 = ip->objBase54; + r3->base.objBase55 = ip->objBase55; if (r5->type == OBJ_SHOTZO_1) { r5->base.flags |= 0x40; r5->base.flags &= ~0x20; @@ -174,8 +174,8 @@ static void sub_080C2D44(struct Object2 *r3) { return; } } - if (ip->unk10.unkC == 0x330) { - if (!ip->unk10.unk1A) { + if (ip->sprite.unkC == 0x330) { + if (!ip->sprite.unk1A) { if (ip->flags & 1) r3->base.x = ip->x + 0x100; else @@ -183,13 +183,13 @@ static void sub_080C2D44(struct Object2 *r3) { r3->base.y = ip->y + (gUnk_08355490[ip->unk1] * 0x100); } else { r3->base.x = ip->x; - if (r3->base.unk10.unk8 & 0x800) + if (r3->base.sprite.unk8 & 0x800) r3->base.y = ip->y + 0x1200; else r3->base.y = ip->y - 0x1200; } - } else if (ip->unk10.unkC == 0x308) { - if (!ip->unk10.unk1A) { + } else if (ip->sprite.unkC == 0x308) { + if (!ip->sprite.unk1A) { if (ip->flags & 1) r3->base.x = ip->x + 0x100; else @@ -200,14 +200,14 @@ static void sub_080C2D44(struct Object2 *r3) { r3->base.x = ip->x + 0x100; else r3->base.x = ip->x - 0x100; - if (r3->base.unk10.unk8 & 0x800) + if (r3->base.sprite.unk8 & 0x800) r3->base.y = ip->y + 0x1100; else r3->base.y = ip->y - 0x1100; } } else { r3->base.x = ip->x; - if (r3->base.unk10.unk8 & 0x800) + if (r3->base.sprite.unk8 & 0x800) r3->base.y = ip->y + 0x1200; else r3->base.y = ip->y - 0x1200; diff --git a/src/pengy.c b/src/pengy.c index 332f315..a586a2f 100644 --- a/src/pengy.c +++ b/src/pengy.c @@ -324,7 +324,7 @@ void sub_080BB080(struct Object2* arg0, u8 arg1) { } sub_0803E2B0(obj, -2, -2, 2, 2); sub_0803E308(obj, 0, 0, 0, 0); - sub_080708DC(obj, &obj->unk10, 0x12, 0x334, 0, 0xc); + sub_080708DC(obj, &obj->sprite, 0x12, 0x334, 0, 0xc); PlaySfx(obj, 0x13d); } @@ -344,7 +344,7 @@ static void sub_080BB290(void) { obj->x += obj->xspeed; obj->y -= obj->yspeed; } - Macro_08107BA8_4(obj, &obj->unk10, &sprite, 0x12, &obj->unk10); + Macro_08107BA8_4(obj, &obj->sprite, &sprite, 0x12, &obj->sprite); sub_0806F8BC(obj); } } @@ -355,26 +355,26 @@ void sub_080BB470(struct Object2* arg0) { struct Object4 *obj2, *obj = TaskGetStructPtr(task, obj2); sub_0803E3B0(obj); obj->unk0 = 3; - obj->unk34 = arg0->base.x; - obj->unk38 = arg0->base.y; - obj->unk44 = arg0; + obj->x = arg0->base.x; + obj->y = arg0->base.y; + obj->parent = arg0; obj->roomId = arg0->base.roomId; obj->flags |= 0x4000; obj->unk3C = 0x300; obj->unk3E = 0; if (arg0->base.flags & 1) { - obj->unk34 -= 0xa00; + obj->x -= 0xa00; obj->unk3C = -obj->unk3C; obj->flags |= 1; } else { - obj->unk34 += 0xa00; + obj->x += 0xa00; obj->flags &= ~1; } if (Macro_0810B1F4(&arg0->base)) { obj->flags |= 0x2000; } - sub_080709F8(obj, &obj->unkC, 0x12, 0x334, 1, 0xc); + sub_080709F8(obj, &obj->sprite, 0x12, 0x334, 1, 0xc); } static void sub_080BB568(void) { @@ -386,12 +386,12 @@ static void sub_080BB568(void) { TaskDestroy(gCurTask); else { - r1 = obj->unk44; + r1 = obj->parent; if (r1) { if (r1->base.unk0 && r1->base.flags & 0x1000) { - obj->unk44 = NULL; + obj->parent = NULL; r1 = NULL; } if (!r1) @@ -419,10 +419,10 @@ static void sub_080BB568(void) { obj->unk3C -= 0x50; } obj->unk3E = 0x40; - Macro_08107BA8_4(obj, &obj->unkC, &sprite, 0x12, &obj->unkC); + Macro_08107BA8_4(obj, &obj->sprite, &sprite, 0x12, &obj->sprite); if (!(obj->flags & 0x800)) { - obj->unk34 += obj->unk3C; - obj->unk38 -= obj->unk3E; + obj->x += obj->unk3C; + obj->y -= obj->unk3E; } sub_0806FAC8(obj); } @@ -434,9 +434,9 @@ void sub_080BB804(struct Object2* arg0, u8 arg1) { struct Object4 *obj2, *obj = TaskGetStructPtr(task, obj2); sub_0803E3B0(obj); obj->unk0 = 3; - obj->unk34 = arg0->base.x; - obj->unk38 = arg0->base.y; - obj->unk44 = arg0; + obj->x = arg0->base.x; + obj->y = arg0->base.y; + obj->parent = arg0; obj->roomId = arg0->base.roomId; obj->flags |= 0x4000; obj->unk3C = 0; @@ -444,12 +444,12 @@ void sub_080BB804(struct Object2* arg0, u8 arg1) { obj->unk8 = arg1; if (arg0->base.flags & 1) { - obj->unk34 -= 0xa00; + obj->x -= 0xa00; obj->unk3C = -obj->unk3C; obj->flags |= 1; } else { - obj->unk34 += 0xa00; + obj->x += 0xa00; #ifndef NONMATCHING asm("":::"r2"); #endif @@ -458,7 +458,7 @@ void sub_080BB804(struct Object2* arg0, u8 arg1) { if (Macro_0810B1F4(&arg0->base)) { obj->flags |= 0x2000; } - sub_080709F8(obj, &obj->unkC, 0x12, 0x334, 2, 0xc); + sub_080709F8(obj, &obj->sprite, 0x12, 0x334, 2, 0xc); } static void sub_080BB8FC(void) { @@ -470,12 +470,12 @@ static void sub_080BB8FC(void) { TaskDestroy(gCurTask); else { - r1 = obj->unk44; + r1 = obj->parent; if (r1) { if (r1->base.unk0 && r1->base.flags & 0x1000) { - obj->unk44 = NULL; + obj->parent = NULL; r1 = NULL; } if (!r1) @@ -514,10 +514,10 @@ static void sub_080BB8FC(void) { obj->unk3C = -obj->unk3C; } obj->unk4++; - Macro_08107BA8_4(obj, &obj->unkC, &sprite, 0x12, &obj->unkC); + Macro_08107BA8_4(obj, &obj->sprite, &sprite, 0x12, &obj->sprite); if (!(obj->flags & 0x800)) { - obj->unk34 += obj->unk3C; - obj->unk38 -= obj->unk3E; + obj->x += obj->unk3C; + obj->y -= obj->unk3E; } sub_0806FAC8(obj); } diff --git a/src/waddle_doo.c b/src/waddle_doo.c index ed30879..817f1c7 100644 --- a/src/waddle_doo.c +++ b/src/waddle_doo.c @@ -287,13 +287,13 @@ static void sub_080B6DDC(struct Object2* arg0, u8 arg1) { } sub_0803E2B0(obj, -2, -2, 2, 2); sub_0803E308(obj, 0, 0, 0, 0); - sub_080708DC(obj, &obj->unk10, 8, 0x330, 0xa, 0xc); - obj->unk10.unk1F = 0; + sub_080708DC(obj, &obj->sprite, 8, 0x330, 0xa, 0xc); + obj->sprite.unk1F = 0; if (arg0->base.unkC & 0x10) { - Macro_081050E8(obj, &obj->unk10, gUnk_08351648[OBJ_DROPPY].unk8, 1); + Macro_081050E8(obj, &obj->sprite, gUnk_08351648[OBJ_DROPPY].unk8, 1); } else { - Macro_081050E8(obj, &obj->unk10, 0x308, 1); + Macro_081050E8(obj, &obj->sprite, 0x308, 1); } PlaySfx(obj, 0x13a); } @@ -302,12 +302,12 @@ static void sub_080B7068(void) { struct Sprite sprite; struct ObjectBase *obj2, *obj = TaskGetStructPtr(gCurTask, obj2); struct Object2 *parent = obj->parent; - Macro_08107BA8_4(obj, &obj->unk10, &sprite, 8, &obj->unk10); + Macro_08107BA8_4(obj, &obj->sprite, &sprite, 8, &obj->sprite); if (parent->base.unkC & 0x10) { - Macro_081050E8(obj, &obj->unk10, gUnk_08351648[OBJ_DROPPY].unk8, obj->unk10.unk1F == 0); + Macro_081050E8(obj, &obj->sprite, gUnk_08351648[OBJ_DROPPY].unk8, obj->sprite.unk1F == 0); } else { - Macro_081050E8(obj, &obj->unk10, 0x308, obj->unk10.unk1F == 0); + Macro_081050E8(obj, &obj->sprite, 0x308, obj->sprite.unk1F == 0); } parent = obj->parent; if (obj->roomId != 0xffff && parent->base.flags & 0x1000) {