diff options
| author | octorock <79596758+octorock@users.noreply.github.com> | 2022-03-31 22:36:32 +0200 |
|---|---|---|
| committer | octorock <79596758+octorock@users.noreply.github.com> | 2022-03-31 22:38:53 +0200 |
| commit | 03e15c611ceb2c35a0766afde467fddf02327dc8 (patch) | |
| tree | ed075d25376eb80aa764231ecd23a1253b0c502f /src/object | |
| parent | ced56e2fa30db327ffe98f27455702133f40fcf8 (diff) | |
Decompile some of beanstalkSubtask
Diffstat (limited to 'src/object')
| -rw-r--r-- | src/object/chestSpawner.c | 3 | ||||
| -rw-r--r-- | src/object/jailBars.c | 6 | ||||
| -rw-r--r-- | src/object/macroPlayer.c | 18 | ||||
| -rw-r--r-- | src/object/object74.c | 5 | ||||
| -rw-r--r-- | src/object/pushableGrave.c | 4 | ||||
| -rw-r--r-- | src/object/stoneTablet.c | 5 |
6 files changed, 22 insertions, 19 deletions
diff --git a/src/object/chestSpawner.c b/src/object/chestSpawner.c index af7f4adb..0e6eadf6 100644 --- a/src/object/chestSpawner.c +++ b/src/object/chestSpawner.c @@ -288,6 +288,7 @@ void ChestSpawner_Type0Action3(ChestSpawnerEntity* this) { } void sub_080842D8(ChestSpawnerEntity* this) { + // TODO recreate as TileData[] static const u8 gUnk_0811F854[] = { 35, 64, 191, 255, 35, 64, 192, 255, 38, 64, 255, 255, 38, 64, 0, 0, 255, 255, }; @@ -310,7 +311,7 @@ void sub_080842D8(ChestSpawnerEntity* this) { if ((super->y.HALF.HI & 8) != 0) { index += 2; } - SetMultipleTiles((u16*)gUnk_0811F898[index], COORD_TO_TILE(super), super->collisionLayer); + SetMultipleTiles((TileData*)gUnk_0811F898[index], COORD_TO_TILE(super), super->collisionLayer); } const Hitbox gUnk_0811F8A8 = { 0, -3, { 0, 0, 0, 0 }, 6, 6 }; diff --git a/src/object/jailBars.c b/src/object/jailBars.c index 3a4abc9b..3758a766 100644 --- a/src/object/jailBars.c +++ b/src/object/jailBars.c @@ -8,8 +8,8 @@ static void SetJailBarTiles(Entity*, u32); extern void (*const gUnk_08124950[])(Entity*); -extern u16 gUnk_08124960[]; -extern u16 gUnk_0812497A[]; +extern TileData gUnk_08124960[]; +extern TileData gUnk_0812497A[]; void JailBars(Entity* this) { gUnk_08124950[this->action](this); @@ -49,7 +49,7 @@ void nullsub_127(Entity* this) { } static void SetJailBarTiles(Entity* this, u32 arg1) { - u16* puVar1; + TileData* puVar1; puVar1 = gUnk_08124960; if (arg1 == 1) { diff --git a/src/object/macroPlayer.c b/src/object/macroPlayer.c index 4b9f4182..5a75369b 100644 --- a/src/object/macroPlayer.c +++ b/src/object/macroPlayer.c @@ -11,7 +11,6 @@ typedef struct { u16 unk6a; } MacroPlayerEntity; -extern u8 gUnk_02018EB0[]; extern int sub_0807A094(int); void MacroPlayer_Type0(MacroPlayerEntity*); @@ -112,8 +111,7 @@ void MacroPlayer_Type0_Init(MacroPlayerEntity* this) { this->unk6a = 4; super->spriteRendering.b0 = 3; SetAffineInfo(super, 4, 4, 0); - ptr = gUnk_02018EB0; - *(Entity**)&ptr[0x14] = super; + gUnk_02018EB0.unk_14 = super; ChangeObjPalette(super, sub_0807A094(0)); pEVar1 = CreateObject(PORTAL_FALLING_PLAYER, 1, 0); if (pEVar1 != NULL) { @@ -139,7 +137,7 @@ void MacroPlayer_Type0_Action1(MacroPlayerEntity* this) { super->zVelocity = 0x30000; super->spriteSettings.shadow = 0; super->child->subAction = 1; - gUnk_02018EB0[0x18] = 1; + gUnk_02018EB0.unk_18 = 1; } } @@ -153,7 +151,7 @@ void MacroPlayer_Type0_Action2(MacroPlayerEntity* this) { super->direction = 10; super->speed = 0xc0; super->zVelocity = 0x28000; - gUnk_02018EB0[0x19] = 1; + gUnk_02018EB0.unk_19 = 1; } } @@ -167,7 +165,7 @@ void MacroPlayer_Type0_Action3(MacroPlayerEntity* this) { super->direction = 17; super->speed = 0x100; super->zVelocity = 0x24000; - gUnk_02018EB0[0x1a] = 1; + gUnk_02018EB0.unk_1a = 1; } } @@ -216,7 +214,7 @@ void MacroPlayer_Type0_Action7(MacroPlayerEntity* this) { super->direction = DirectionWest; } if (super->x.HALF.HI < 0x30) { - gUnk_02018EB0[0x1b] = 1; + gUnk_02018EB0.unk_1b = 1; } } @@ -227,7 +225,7 @@ void MacroPlayer_Type0_Action8(MacroPlayerEntity* this) { super->direction = DirectionEast; } if (super->x.HALF.HI > 0xd0) { - gUnk_02018EB0[0x1b] = 1; + gUnk_02018EB0.unk_1b = 1; } } @@ -235,7 +233,7 @@ void MacroPlayer_Type0_Action9(MacroPlayerEntity* this) { UpdateAnimationSingleFrame(super); LinearMoveUpdate(super); if (super->y.HALF.HI > 0x120) { - gUnk_02018EB0[0x1b] = 1; + gUnk_02018EB0.unk_1b = 1; } } @@ -246,6 +244,6 @@ void MacroPlayer_Type0_Action10(MacroPlayerEntity* this) { super->direction = DirectionWest; } if (super->x.HALF.HI < 0x10) { - gUnk_02018EB0[0x1b] = 1; + gUnk_02018EB0.unk_1b = 1; } } diff --git a/src/object/object74.c b/src/object/object74.c index 828ad006..977d9365 100644 --- a/src/object/object74.c +++ b/src/object/object74.c @@ -103,14 +103,15 @@ void sub_08097CB4(Object74Entity* this) { } void sub_08097CFC(Object74Entity* this) { + // TODO recreate as TileData[] static const u16 gUnk_08123344[] = { 16448, 65471, 16449, 65472, 16450, 65473, 16451, 65535, 16452, 0, 16453, 1, 16454, 63, 16455, 64, 16456, 65, 65535 }; static const u16 gUnk_0812336A[] = { 16449, 65471, 16449, 65472, 16452, 65535, 16452, 0, 16455, 63, 16455, 64, 65535 }; if ((super->x.HALF.HI & 0xf) == 0) { - SetMultipleTiles((u16*)gUnk_0812336A, COORD_TO_TILE(super), super->collisionLayer); + SetMultipleTiles((TileData*)gUnk_0812336A, COORD_TO_TILE(super), super->collisionLayer); } else { - SetMultipleTiles((u16*)gUnk_08123344, COORD_TO_TILE(super), super->collisionLayer); + SetMultipleTiles((TileData*)gUnk_08123344, COORD_TO_TILE(super), super->collisionLayer); } } diff --git a/src/object/pushableGrave.c b/src/object/pushableGrave.c index f84681ea..04d97a5a 100644 --- a/src/object/pushableGrave.c +++ b/src/object/pushableGrave.c @@ -78,7 +78,7 @@ void PushableGrave_Init(PushableGraveEntity* this) { super->hitbox = (Hitbox*)&gUnk_080FD570; SetTile(tileIndex, tilePosition, super->collisionLayer); if (super->type2 == 2) { - SetMultipleTiles((u16*)gUnk_081232C0, tilePosition, super->collisionLayer); + SetMultipleTiles((TileData*)gUnk_081232C0, tilePosition, super->collisionLayer); } } } @@ -200,6 +200,8 @@ bool32 sub_0809798C(PushableGraveEntity* this) { void (*const gUnk_081232AC[])(PushableGraveEntity*) = { PushableGrave_Init, PushableGrave_Action1, PushableGrave_Action2, PushableGrave_Action3, PushableGrave_Action4, }; + +// TODO recreate as TileData[] const u8 gUnk_081232C0[] = { 61, 64, 191, 255, 61, 64, 192, 255, 61, 64, 193, 255, 61, 64, 255, 255, 61, 64, 1, 0, 61, 64, 63, 0, 61, 64, 65, 0, 255, 255, diff --git a/src/object/stoneTablet.c b/src/object/stoneTablet.c index ce0df01e..a6888bfd 100644 --- a/src/object/stoneTablet.c +++ b/src/object/stoneTablet.c @@ -15,6 +15,7 @@ void StoneTablet(Entity* this) { } void sub_080979CC(Entity* this) { + // TODO recreate as TileData[] static const u16 gUnk_081232EC[] = { 0x4022, 0xfffe, 0x4022, 0xffff, 0x4022, 0x0, 0x4022, 0x1, 0xffff }; static const u16 gUnk_081232FE[] = { 0x4065, 0xffbf, 0x4022, 0xffc0, 0x4066, 0xffc1, 0x4029, 0xffff, 0x4026, 0x0, 0x402a, 0x1, 0xffff }; @@ -22,10 +23,10 @@ void sub_080979CC(Entity* this) { this->spriteSettings.draw = 1; if (this->type == 3) { this->frameIndex = 0; - SetMultipleTiles((u16*)gUnk_081232FE, COORD_TO_TILE(this), this->collisionLayer); + SetMultipleTiles((TileData*)gUnk_081232FE, COORD_TO_TILE(this), this->collisionLayer); } else { this->frameIndex = this->type; - SetMultipleTiles((u16*)gUnk_081232EC, COORD_TO_TILE(this), this->collisionLayer); + SetMultipleTiles((TileData*)gUnk_081232EC, COORD_TO_TILE(this), this->collisionLayer); } } |
