Decompile most of PullableMushroom

This commit is contained in:
octorock 2022-01-30 00:35:09 +01:00
parent 96a2c5bbfe
commit fb9174c0d3
11 changed files with 727 additions and 1698 deletions

View File

@ -0,0 +1,155 @@
.syntax unified
push {r4, r5, lr}
adds r4, r0, #0
ldr r0, [r4, #0x50]
ldrh r1, [r0, #0xc]
ldr r0, _0808AC38 @ =0x00000201
cmp r1, r0
bne _0808ABD6
bl DeleteThisEntity
_0808ABD6:
ldr r0, [r4, #0x54]
ldr r1, [r4, #0x50]
bl sub_0808B1F0
adds r2, r0, #0
cmp r2, #7
bhi _0808ABE6
movs r2, #0
_0808ABE6:
ldrb r3, [r4, #0x14]
lsls r1, r3, #2
ldr r0, _0808AC3C @ =gUnk_081211CC
adds r5, r1, r0
cmp r2, #0x1f
bhi _0808AC5A
cmp r2, #0
beq _0808ABF8
subs r2, #6
_0808ABF8:
ldrh r0, [r5]
str r0, [r4, #0x70]
ldr r1, [r4, #0x50]
movs r0, #2
ldrsb r0, [r5, r0]
ldrh r3, [r1, #0x2e]
adds r0, r0, r3
strh r0, [r4, #0x2e]
movs r0, #3
ldrsb r0, [r5, r0]
ldrh r1, [r1, #0x32]
adds r0, r0, r1
strh r0, [r4, #0x32]
ldrb r1, [r4, #0x14]
movs r0, #1
ands r0, r1
cmp r0, #0
beq _0808AC40
lsls r1, r2, #4
movs r0, #0x80
lsls r0, r0, #2
subs r0, r0, r1
str r0, [r4, #0x74]
lsls r0, r2, #3
movs r1, #0x90
lsls r1, r1, #1
adds r0, r0, r1
str r0, [r4, #0x78]
movs r0, #0xf
strb r0, [r4, #0x1e]
b _0808ACDE
.align 2, 0
_0808AC38: .4byte 0x00000201
_0808AC3C: .4byte gUnk_081211CC
_0808AC40:
lsls r1, r2, #4
movs r0, #0x80
lsls r0, r0, #2
subs r0, r0, r1
str r0, [r4, #0x78]
lsls r0, r2, #3
movs r3, #0x90
lsls r3, r3, #1
adds r0, r0, r3
str r0, [r4, #0x74]
movs r0, #0x14
strb r0, [r4, #0x1e]
b _0808ACDE
_0808AC5A:
movs r0, #1
ands r3, r0
cmp r3, #0
beq _0808AC9E
adds r1, r2, #0
subs r1, #0x20
lsls r1, r1, #2
adds r0, #0xff
subs r0, r0, r1
str r0, [r4, #0x74]
lsls r0, r2, #3
movs r1, #0xa0
lsls r1, r1, #1
adds r0, r0, r1
str r0, [r4, #0x78]
movs r0, #0x10
strb r0, [r4, #0x1e]
ldrb r1, [r4, #0x14]
movs r0, #2
ands r0, r1
cmp r0, #0
beq _0808AC92
ldr r0, [r4, #0x50]
lsrs r1, r2, #1
ldrh r0, [r0, #0x2e]
subs r0, r0, r1
strh r0, [r4, #0x2e]
b _0808ACDE
_0808AC92:
ldr r1, [r4, #0x50]
lsrs r0, r2, #1
ldrh r1, [r1, #0x2e]
adds r0, r0, r1
strh r0, [r4, #0x2e]
b _0808ACDE
_0808AC9E:
adds r1, r2, #0
subs r1, #0x20
lsls r1, r1, #2
movs r0, #0x80
lsls r0, r0, #1
subs r0, r0, r1
str r0, [r4, #0x78]
lsls r0, r2, #3
movs r3, #0xa0
lsls r3, r3, #1
adds r0, r0, r3
str r0, [r4, #0x74]
movs r0, #0x15
strb r0, [r4, #0x1e]
ldrb r1, [r4, #0x14]
movs r0, #2
ands r0, r1
cmp r0, #0
beq _0808ACCE
ldr r0, [r4, #0x50]
lsrs r1, r2, #1
ldrh r0, [r0, #0x32]
adds r1, r1, r0
b _0808ACD6
_0808ACCE:
ldr r0, [r4, #0x50]
lsrs r2, r2, #1
ldrh r1, [r0, #0x32]
subs r1, r1, r2
_0808ACD6:
movs r0, #3
ldrsb r0, [r5, r0]
adds r0, r0, r1
strh r0, [r4, #0x32]
_0808ACDE:
ldr r1, [r4, #0x74]
ldr r2, [r4, #0x78]
ldr r3, [r4, #0x70]
adds r0, r4, #0
bl sub_0805EC9C
pop {r4, r5, pc}
.syntax divided

View File

@ -0,0 +1,75 @@
.syntax unified
push {r4, lr}
adds r4, r0, #0
adds r0, #0x58
ldrb r0, [r0]
cmp r0, #0
beq _0808AD00
adds r0, r4, #0
movs r1, #0
bl InitializeAnimation
_0808AD00:
adds r0, r4, #0
adds r0, #0x41
ldrb r1, [r0]
movs r0, #0x7f
ands r0, r1
subs r0, #4
cmp r0, #0x12
bhi _0808AD92
lsls r0, r0, #2
ldr r1, _0808AD1C @ =_0808AD20
adds r0, r0, r1
ldr r0, [r0]
mov pc, r0
.align 2, 0
_0808AD1C: .4byte _0808AD20
_0808AD20: @ jump table
.4byte _0808AD6C @ case 0
.4byte _0808AD6C @ case 1
.4byte _0808AD6C @ case 2
.4byte _0808AD92 @ case 3
.4byte _0808AD6C @ case 4
.4byte _0808AD6C @ case 5
.4byte _0808AD6C @ case 6
.4byte _0808AD6C @ case 7
.4byte _0808AD6C @ case 8
.4byte _0808AD6C @ case 9
.4byte _0808AD92 @ case 10
.4byte _0808AD92 @ case 11
.4byte _0808AD6C @ case 12
.4byte _0808AD6C @ case 13
.4byte _0808AD6C @ case 14
.4byte _0808AD88 @ case 15
.4byte _0808AD6C @ case 16
.4byte _0808AD92 @ case 17
.4byte _0808AD6C @ case 18
_0808AD6C:
ldrb r1, [r4, #0x10]
movs r0, #0x7f
ands r0, r1
strb r0, [r4, #0x10]
adds r0, r4, #0
adds r0, #0x3e
ldrb r0, [r0]
bl sub_0806F5A4
strb r0, [r4, #0x14]
movs r0, #2
strb r0, [r4, #0xd]
strb r0, [r4, #0xe]
b _0808AD9E
_0808AD88:
movs r1, #0
movs r0, #3
strb r0, [r4, #0xc]
strb r1, [r4, #0xd]
b _0808AD9E
_0808AD92:
movs r0, #0
strb r0, [r4, #0xf]
strb r0, [r4, #0xe]
adds r0, r4, #0
bl sub_08078930
_0808AD9E:
pop {r4, pc}
.syntax divided

View File

@ -0,0 +1,85 @@
.syntax unified
push {r4, r5, r6, r7, lr}
sub sp, #0x88
adds r5, r0, #0
ldr r1, [r5, #0x50]
bl sub_0808B1F0
adds r7, r0, #0
ldrb r0, [r5, #0xa]
cmp r0, #0
beq _0808B0D6
cmp r0, #1
beq _0808B0DE
b _0808B162
_0808B0D6:
adds r0, r5, #0
bl GetNextFrame
b _0808B162
_0808B0DE:
ldr r6, _0808B148 @ =gPlayerEntity
ldrb r0, [r6, #0x14]
movs r1, #0xe
ands r1, r0
ldr r0, _0808B14C @ =gUnk_08126EE4
adds r1, r1, r0
mov r2, sp
movs r0, #0
ldrsb r0, [r1, r0]
ldrh r3, [r6, #0x2e]
adds r0, r0, r3
strh r0, [r2, #0x2e]
movs r0, #1
ldrsb r0, [r1, r0]
ldrh r1, [r6, #0x32]
adds r0, r0, r1
strh r0, [r2, #0x32]
mov r0, sp
adds r1, r5, #0
movs r2, #7
movs r3, #7
bl sub_0800419C
cmp r0, #0
beq _0808B154
ldrb r0, [r6, #0xc]
cmp r0, #1
bne _0808B162
ldr r4, _0808B150 @ =gPlayerState
adds r0, r4, #0
adds r0, #0x26
ldrb r0, [r0]
cmp r0, #0
bne _0808B162
movs r0, #0x1b
strb r0, [r4, #0xc]
adds r0, r4, #0
adds r0, #0x38
strb r7, [r0]
ldrb r0, [r5, #0x15]
movs r1, #0x10
eors r0, r1
adds r1, r4, #0
adds r1, #0x39
strb r0, [r1]
ldr r0, [r5, #0x50]
adds r1, r6, #0
bl sub_0808B1F0
adds r1, r4, #0
adds r1, #0x3a
strb r0, [r1]
b _0808B162
.align 2, 0
_0808B148: .4byte gPlayerEntity
_0808B14C: .4byte gUnk_08126EE4
_0808B150: .4byte gPlayerState
_0808B154:
movs r0, #0x40
strh r0, [r5, #0x24]
cmp r7, #0x3f
bhi _0808B162
adds r0, r5, #0
bl LinearMoveUpdate
_0808B162:
add sp, #0x88
pop {r4, r5, r6, r7, pc}
.align 2, 0
.syntax divided

View File

@ -0,0 +1,68 @@
.syntax unified
push {r4, r5, lr}
adds r3, r0, #0
cmp r1, #0
beq _0808B188
ldrb r0, [r3, #0x14]
movs r1, #2
eors r1, r0
lsls r1, r1, #1
ldr r0, _0808B184 @ =gUnk_081211F4
adds r2, r1, r0
adds r1, r2, #1
ldr r4, [r3, #0x50]
adds r5, r4, #0
b _0808B1CE
.align 2, 0
_0808B184: .4byte gUnk_081211F4
_0808B188:
ldrb r1, [r3, #0x14]
movs r0, #1
ands r0, r1
cmp r0, #0
beq _0808B1B8
ldr r5, _0808B1AC @ =gPlayerEntity
ldr r4, [r3, #0x50]
ldrb r1, [r3, #0x14]
lsls r2, r1, #1
ldr r0, _0808B1B0 @ =gUnk_081211FC
adds r2, r2, r0
movs r0, #2
eors r1, r0
lsls r1, r1, #1
ldr r0, _0808B1B4 @ =gUnk_081211F5
adds r1, r1, r0
b _0808B1CE
.align 2, 0
_0808B1AC: .4byte gPlayerEntity
_0808B1B0: .4byte gUnk_081211FC
_0808B1B4: .4byte gUnk_081211F4+1
_0808B1B8:
ldr r5, [r3, #0x50]
ldr r4, _0808B1E4 @ =gPlayerEntity
movs r0, #2
eors r0, r1
lsls r0, r0, #1
ldr r1, _0808B1E8 @ =gUnk_081211F4
adds r2, r0, r1
ldrb r0, [r3, #0x14]
lsls r0, r0, #1
ldr r1, _0808B1EC @ =gUnk_081211FD
adds r1, r0, r1
_0808B1CE:
movs r0, #0
ldrsb r0, [r2, r0]
ldrh r5, [r5, #0x2e]
adds r0, r0, r5
strh r0, [r3, #0x2e]
movs r0, #0
ldrsb r0, [r1, r0]
ldrh r4, [r4, #0x32]
adds r0, r0, r4
strh r0, [r3, #0x32]
pop {r4, r5, pc}
.align 2, 0
_0808B1E4: .4byte gPlayerEntity
_0808B1E8: .4byte gUnk_081211F4
_0808B1EC: .4byte gUnk_081211FC+1
.syntax divided

File diff suppressed because it is too large Load Diff

View File

@ -26175,81 +26175,6 @@
"size": 5,
"type": "animation"
},
{
"path": "octorokBoss/gUnk_080CF070.bin",
"start": 847984,
"size": 8
},
{
"path": "octorokBoss/gUnk_080CF08C.bin",
"start": 848012,
"size": 32
},
{
"path": "octorokBoss/gUnk_080CF0D8.bin",
"start": 848088,
"size": 4
},
{
"path": "octorokBoss/gUnk_080CF0DC.bin",
"start": 848092,
"size": 4
},
{
"path": "octorokBoss/gUnk_080CF10C.bin",
"start": 848140,
"size": 4
},
{
"path": "octorokBoss/gUnk_080CF110.bin",
"start": 848144,
"size": 4
},
{
"path": "octorokBoss/gUnk_080CF114.bin",
"start": 848148,
"size": 5
},
{
"path": "octorokBoss/gUnk_080CF119.bin",
"start": 848153,
"size": 5
},
{
"path": "octorokBoss/gUnk_080CF11E.bin",
"start": 848158,
"size": 6
},
{
"path": "octorokBoss/gUnk_080CF134.bin",
"start": 848180,
"size": 4
},
{
"path": "octorokBoss/gUnk_080CF138.bin",
"start": 848184,
"size": 4
},
{
"path": "octorokBoss/gUnk_080CF13C.bin",
"start": 848188,
"size": 3
},
{
"path": "octorokBoss/gUnk_080CF13F.bin",
"start": 848191,
"size": 3
},
{
"path": "octorokBoss/gUnk_080CF142.bin",
"start": 848194,
"size": 5
},
{
"path": "octorokBoss/gUnk_080CF147.bin",
"start": 848199,
"size": 5
},
{
"path": "flyingPot/gUnk_080CF290.bin",
"start": 848528,
@ -26375,16 +26300,6 @@
"size": 20,
"type": "animation"
},
{
"path": "octorokGolden/gUnk_080CF490.bin",
"start": 849040,
"size": 8
},
{
"path": "octorokGolden/gUnk_080CF498.bin",
"start": 849048,
"size": 8
},
{
"path": "animations/gSpriteAnimations_CloudPiranha_0.bin",
"start": 849200,
@ -27175,26 +27090,6 @@
"size": 21,
"type": "animation"
},
{
"path": "bowMoblin/gUnk_080CFFA4.bin",
"start": 851876,
"size": 8
},
{
"path": "bowMoblin/gUnk_080CFFAC.bin",
"start": 851884,
"size": 16
},
{
"path": "bowMoblin/gUnk_080CFFBC.bin",
"start": 851900,
"size": 8
},
{
"path": "bowMoblin/gUnk_080CFFC4.bin",
"start": 851908,
"size": 8
},
{
"path": "animations/gSpriteAnimations_Lakitu_0.bin",
"start": 852316,
@ -27771,16 +27666,6 @@
"size": 13,
"type": "animation"
},
{
"path": "ballChainSoldier/gUnk_080D0728.bin",
"start": 853800,
"size": 8
},
{
"path": "ballChainSoldier/gUnk_080D0730.bin",
"start": 853808,
"size": 8
},
{
"path": "animations/gSpriteAnimations_BallChainSoldier_3.bin",
"start": 853816,
@ -30859,70 +30744,6 @@
"start": 1034656,
"size": 16
},
{
"path": "data_080FC8A4/sCutsceneData.bin",
"start": 1034784,
"size": 80
},
{
"path": "data_080FC8A4/gUnk_080FCA84.bin",
"start": 1034884,
"size": 8
},
{
"path": "data_080FC8A4/gUnk_080FCA8C.bin",
"start": 1034892,
"size": 24
},
{
"path": "data_080FC8A4/gUnk_080FCAA4.bin",
"start": 1034916,
"size": 36
},
{
"path": "data_080FC8A4/gUnk_080FCB38.bin",
"start": 1035064,
"size": 42
},
{
"path": "data_080FC8A4/gUnk_080FCB62_JP.bin",
"variants": [
"JP"
],
"starts": {
"JP": 1034258
},
"size": 50
},
{
"path": "data_080FC8A4/gUnk_080FCB62_1_DEMO_JP.bin",
"variants": [
"DEMO_JP"
],
"starts": {
"DEMO_JP": 1033030
},
"size": 50
},
{
"path": "data_080FC8A4/gUnk_080FCB62_2_EU.bin",
"variants": [
"EU"
],
"starts": {
"EU": 1032358
},
"size": 50
},
{
"path": "data_080FC8A4/gUnk_080FCB62_3_USA-DEMO_USA.bin",
"variants": [
"USA",
"DEMO_USA"
],
"start": 1035106,
"size": 50
},
{
"path": "data_080FC8A4/gUnk_080FCB94.bin",
"start": 1035156,
@ -42132,71 +41953,6 @@
"start": 1161680,
"size": 8
},
{
"path": "data_0811B9E0/gUnk_0811BABC.bin",
"start": 1161916,
"size": 8
},
{
"path": "data_0811B9E0/gUnk_0811BAC4.bin",
"start": 1161924,
"size": 16
},
{
"path": "data_0811B9E0/gUnk_0811BAF0.bin",
"start": 1161968,
"size": 60
},
{
"path": "data_0811B9E0/gUnk_0811BBBC.bin",
"start": 1162172,
"size": 6
},
{
"path": "data_0811B9E0/gUnk_0811BBC2.bin",
"start": 1162178,
"size": 6
},
{
"path": "data_0811B9E0/gUnk_0811BBC8.bin",
"start": 1162184,
"size": 6
},
{
"path": "data_0811B9E0/gUnk_0811BBCE.bin",
"start": 1162190,
"size": 6
},
{
"path": "data_0811B9E0/gUnk_0811BBEC.bin",
"start": 1162220,
"size": 12
},
{
"path": "data_0811B9E0/gUnk_0811BC28.bin",
"start": 1162280,
"size": 8
},
{
"path": "data_0811B9E0/gUnk_0811BC30.bin",
"start": 1162288,
"size": 8
},
{
"path": "data_0811B9E0/gUnk_0811BC38.bin",
"start": 1162296,
"size": 8
},
{
"path": "data_0811B9E0/gUnk_0811BC40.bin",
"start": 1162304,
"size": 8
},
{
"path": "data_0811B9E0/gUnk_0811BC80.bin",
"start": 1162368,
"size": 8
},
{
"path": "itemBomb/gUnk_0811BDAC.bin",
"start": 1162668,
@ -42429,21 +42185,6 @@
"DEMO_JP": -2192
}
},
{
"path": "data_0811E750/gUnk_0811E750.bin",
"start": 1173328,
"size": 8
},
{
"path": "data_0811E750/gUnk_0811E758.bin",
"start": 1173336,
"size": 8
},
{
"path": "data_0811E750/gUnk_0811E760.bin",
"start": 1173344,
"size": 8
},
{
"path": "data_0811E750/gUnk_0811E7BC.bin",
"start": 1173436,
@ -42951,26 +42692,6 @@
"start": 1175948,
"size": 4
},
{
"path": "blockPushed/gUnk_0811F62C.bin",
"start": 1177132,
"size": 8
},
{
"path": "blockPushed/gUnk_0811F634.bin",
"start": 1177140,
"size": 8
},
{
"path": "blockPushed/gUnk_0811F63C.bin",
"start": 1177148,
"size": 8
},
{
"path": "blockPushed/gUnk_0811F644.bin",
"start": 1177156,
"size": 8
},
{
"path": "animations/gSpriteAnimations_Object9_0.bin",
"start": 1177440,
@ -43951,41 +43672,6 @@
"size": 17,
"type": "animation"
},
{
"path": "animations/gSpriteAnimations_PressurePlate_0.bin",
"start": 1182705,
"size": 4,
"type": "animation"
},
{
"path": "animations/gSpriteAnimations_PressurePlate_1.bin",
"start": 1182709,
"size": 4,
"type": "animation"
},
{
"path": "animations/gSpriteAnimations_PressurePlate_2.bin",
"start": 1182713,
"size": 4,
"type": "animation"
},
{
"path": "animations/gSpriteAnimations_PressurePlate_3.bin",
"start": 1182717,
"size": 4,
"type": "animation"
},
{
"path": "animations/gSpriteAnimations_PressurePlate_4.bin",
"start": 1182721,
"size": 7,
"type": "animation"
},
{
"path": "PressurePlate/gUnk_08120BEC.bin",
"start": 1182700,
"size": 5
},
{
"path": "animations/gSpriteAnimations_BigBarrel_0.bin",
"start": 1182822,
@ -44038,42 +43724,12 @@
"start": 1182814,
"size": 8
},
{
"path": "barrelInside/gUnk_08120C80.bin",
"start": 1182848,
"size": 18
},
{
"path": "barrelInside/gUnk_08120C92.bin",
"start": 1182866,
"size": 6
},
{
"path": "animations/gSpriteAnimations_PushableStatue_0.bin",
"start": 1183110,
"size": 6,
"type": "animation"
},
{
"path": "pushableStatue/gUnk_08120CB4.bin",
"start": 1182900,
"size": 8
},
{
"path": "pushableStatue/gUnk_08120CBC.bin",
"start": 1182908,
"size": 16
},
{
"path": "pushableStatue/gUnk_08120CCC.bin",
"start": 1182924,
"size": 160
},
{
"path": "pushableStatue/gUnk_08120D6C.bin",
"start": 1183084,
"size": 26
},
{
"path": "animations/gSpriteAnimations_AmbientClouds_0.bin",
"start": 1183136,
@ -44238,16 +43894,6 @@
"size": 4,
"type": "animation"
},
{
"path": "pushableRock/gUnk_08121088.bin",
"start": 1183880,
"size": 8
},
{
"path": "hittableLever/gUnk_08121180.bin",
"start": 1184128,
"size": 8
},
{
"path": "object30/gUnk_08121194.bin",
"start": 1184148,
@ -44331,36 +43977,6 @@
"size": 4,
"type": "animation"
},
{
"path": "pullableMushroom/gUnk_081211CC.bin",
"start": 1184204,
"size": 16
},
{
"path": "pullableMushroom/gUnk_081211E4.bin",
"start": 1184228,
"size": 8
},
{
"path": "pullableMushroom/gUnk_081211F4.bin",
"start": 1184244,
"size": 1
},
{
"path": "pullableMushroom/gUnk_081211F5.bin",
"start": 1184245,
"size": 7
},
{
"path": "pullableMushroom/gUnk_081211FC.bin",
"start": 1184252,
"size": 1
},
{
"path": "pullableMushroom/gUnk_081211FD.bin",
"start": 1184253,
"size": 7
},
{
"path": "animations/gSpriteAnimations_Bollard_0.bin",
"start": 1184532,
@ -44756,16 +44372,6 @@
"start": 1187507,
"size": 5
},
{
"path": "pushableFurniture/gUnk_08121EE4.bin",
"start": 1187556,
"size": 12
},
{
"path": "pushableFurniture/gUnk_08121EF0.bin",
"start": 1187568,
"size": 8
},
{
"path": "furniture/gUnk_08122128.bin",
"start": 1188136,
@ -44811,11 +44417,6 @@
"start": 1188360,
"size": 16
},
{
"path": "furniture/gUnk_08122244.bin",
"start": 1188420,
"size": 16
},
{
"path": "furniture/gUnk_08121EF8.bin",
"start": 1187576,
@ -45011,21 +44612,6 @@
"size": 4,
"type": "animation"
},
{
"path": "pullableLever/gUnk_081222A8.bin",
"start": 1188520,
"size": 8
},
{
"path": "pullableLever/gUnk_081222B8.bin",
"start": 1188536,
"size": 8
},
{
"path": "pullableLever/gUnk_081222C0.bin",
"start": 1188544,
"size": 4
},
{
"path": "minecart/gUnk_081223E8.bin",
"start": 1188840,
@ -45896,16 +45482,6 @@
"start": 1192608,
"size": 4
},
{
"path": "pushableGrave/gUnk_081232C0.bin",
"start": 1192640,
"size": 30
},
{
"path": "pushableGrave/gUnk_081232DE.bin",
"start": 1192670,
"size": 6
},
{
"path": "stoneTablet/gUnk_081232EC.bin",
"start": 1192684,
@ -45976,11 +45552,6 @@
"start": 1192988,
"size": 6
},
{
"path": "steam/gUnk_08123484.bin",
"start": 1193092,
"size": 16
},
{
"path": "animations/gSpriteAnimations_PushableLever_0.bin",
"start": 1193140,
@ -45993,21 +45564,6 @@
"size": 23,
"type": "animation"
},
{
"path": "pushableLever/gUnk_081234A0.bin",
"start": 1193120,
"size": 4
},
{
"path": "pushableLever/gUnk_081234A4.bin",
"start": 1193124,
"size": 8
},
{
"path": "pushableLever/gUnk_081234AC.bin",
"start": 1193132,
"size": 8
},
{
"path": "macroShoes/gUnk_081234F4.bin",
"start": 1193204,
@ -46109,21 +45665,6 @@
"size": 23,
"type": "animation"
},
{
"path": "bigPushableLever/gUnk_081236E8.bin",
"start": 1193704,
"size": 4
},
{
"path": "bigPushableLever/gUnk_081236EC.bin",
"start": 1193708,
"size": 8
},
{
"path": "bigPushableLever/gUnk_081236F4.bin",
"start": 1193716,
"size": 8
},
{
"path": "animations/gSpriteAnimations_SmallIceBlock_0.bin",
"start": 1193834,
@ -46148,16 +45689,6 @@
"size": 22,
"type": "animation"
},
{
"path": "smallIceBlock/gUnk_08123748.bin",
"start": 1193800,
"size": 8
},
{
"path": "smallIceBlock/gUnk_08123750.bin",
"start": 1193808,
"size": 26
},
{
"path": "animations/gSpriteAnimations_BigIceBlock_0.bin",
"start": 1193914,
@ -46188,11 +45719,6 @@
"size": 22,
"type": "animation"
},
{
"path": "bigIceBlock/gUnk_081237B0.bin",
"start": 1193904,
"size": 10
},
{
"path": "animations/gSpriteAnimations_Object86_0.bin",
"start": 1193996,
@ -46205,21 +45731,6 @@
"size": 20,
"type": "animation"
},
{
"path": "object87/gUnk_0812384C.bin",
"start": 1194060,
"size": 64
},
{
"path": "object87/gUnk_0812388C.bin",
"start": 1194124,
"size": 20
},
{
"path": "object87/gUnk_081238A0.bin",
"start": 1194144,
"size": 992
},
{
"path": "animations/gSpriteAnimations_MacroBook_0.bin",
"start": 1195192,
@ -48333,16 +47844,6 @@
"start": 1253604,
"size": 12
},
{
"path": "data_081320FC/_DEMO_JP.bin",
"variants": [
"DEMO_JP"
],
"starts": {
"DEMO_JP": 1251376
},
"size": 1280
},
{
"offsets": {
"DEMO_JP": -988
@ -52221,4 +51722,4 @@
},
"size": 129
}
]
]

View File

@ -1,47 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
.align 2
gUnk_081211A4:: @ 081211A4
.4byte sub_0808AA1C
.4byte sub_0808AB68
.4byte sub_0808AE84
.4byte sub_0808AFF0
gUnk_081211B4:: @ 081211B4
.4byte sub_0808AB80
.4byte sub_0808AB98
.4byte sub_0808ABC4
gUnk_081211C0:: @ 081211C0
.4byte sub_0808ACEC
.4byte sub_0808ADA0
.4byte sub_0808ADF0
gUnk_081211CC:: @ 081211CC
.incbin "pullableMushroom/gUnk_081211CC.bin"
gUnk_081211DC:: @ 081211DC
.4byte sub_0808AEB0
.4byte sub_0808AFD4
gUnk_081211E4:: @ 081211E4
.incbin "pullableMushroom/gUnk_081211E4.bin"
gUnk_081211EC:: @ 081211EC
.4byte sub_0808B05C
.4byte sub_0808B0BC
gUnk_081211F4:: @ 081211F4
.incbin "pullableMushroom/gUnk_081211F4.bin"
gUnk_081211F5:: @ 081211F5
.incbin "pullableMushroom/gUnk_081211F5.bin"
gUnk_081211FC:: @ 081211FC
.incbin "pullableMushroom/gUnk_081211FC.bin"
gUnk_081211FD:: @ 081211FD
.incbin "pullableMushroom/gUnk_081211FD.bin"

View File

@ -650,7 +650,7 @@ SECTIONS {
asm/object/minishEmoticon.o(.text);
src/object/pot.o(.text);
asm/object/ezloCap.o(.text);
asm/object/blockPushed.o(.text);
src/object/blockPushed.o(.text);
src/object/lockedDoor.o(.text);
asm/object/object9.o(.text);
src/object/objectA.o(.text);
@ -683,18 +683,18 @@ SECTIONS {
src/object/pressurePlate.o(.text);
asm/object/bigBarrel.o(.text);
src/object/barrelInside.o(.text);
asm/object/pushableStatue.o(.text);
src/object/pushableStatue.o(.text);
asm/object/object28.o(.text);
asm/object/ambientClouds.o(.text);
src/object/object2A.o(.text);
asm/object/object2B.o(.text);
asm/object/beanstalk.o(.text);
src/object/smoke.o(.text);
asm/object/pushableRock.o(.text);
src/object/pushableRock.o(.text);
src/object/hittableLever.o(.text);
asm/object/object30.o(.text);
src/object/frozenFlower.o(.text);
asm/object/pullableMushroom.o(.text);
src/object/pullableMushroom.o(.text);
asm/object/bollard.o(.text);
src/object/warpPoint.o(.text);
asm/object/object35.o(.text);
@ -723,7 +723,7 @@ SECTIONS {
src/object/object49.o(.text);
src/object/backgroundCloud.o(.text);
asm/object/object4B.o(.text);
asm/object/pushableFurniture.o(.text);
src/object/pushableFurniture.o(.text);
src/object/furniture.o(.text);
src/object/minishSizedEntrance.o(.text);
src/object/archway.o(.text);
@ -761,7 +761,7 @@ SECTIONS {
src/object/mineralWaterSource.o(.text);
src/object/minishSizedArchway.o(.text);
asm/object/object70.o(.text);
asm/object/pushableGrave.o(.text);
src/object/pushableGrave.o(.text);
asm/object/stoneTablet.o(.text);
src/object/lilypadSmall.o(.text);
asm/object/object74.o(.text);
@ -778,8 +778,8 @@ SECTIONS {
asm/object/object81.o(.text);
src/object/bigVortex.o(.text);
src/object/bigPushableLever.o(.text);
asm/object/smallIceBlock.o(.text);
asm/object/bigIceBlock.o(.text);
src/object/smallIceBlock.o(.text);
src/object/bigIceBlock.o(.text);
src/object/object86.o(.text);
src/object/octorokBossObject.o(.text);
asm/object/macroBook.o(.text);
@ -1366,7 +1366,7 @@ SECTIONS {
data/animations/object/pot.o(.rodata);
data/const/object/ezloCap.o(.rodata);
data/animations/object/ezloCap.o(.rodata);
data/const/object/blockPushed.o(.rodata);
src/object/blockPushed.o(.rodata);
src/object/lockedDoor.o(.rodata);
data/const/object/object9.o(.rodata);
data/animations/object/object9.o(.rodata);
@ -1407,7 +1407,7 @@ SECTIONS {
data/const/object/bigBarrel.o(.rodata);
data/animations/object/bigBarrel.o(.rodata);
src/object/barrelInside.o(.rodata);
data/const/object/pushableStatue.o(.rodata);
src/object/pushableStatue.o(.rodata);
data/animations/object/pushableStatue.o(.rodata);
data/const/object/ambientClouds.o(.rodata);
data/animations/object/ambientClouds.o(.rodata);
@ -1416,12 +1416,12 @@ SECTIONS {
data/const/object/beanstalk.o(.rodata);
data/animations/object/beanstalk.o(.rodata);
data/const/object/smoke.o(.rodata);
data/const/object/pushableRock.o(.rodata);
src/object/pushableRock.o(.rodata);
data/animations/object/pushableRock.o(.rodata);
src/object/hittableLever.o(.rodata);
data/const/object/object30.o(.rodata);
data/const/object/object31.o(.rodata);
data/const/object/pullableMushroom.o(.rodata);
src/object/pullableMushroom.o(.rodata);
data/animations/object/pullableMushroom.o(.rodata);
data/const/object/bollard.o(.rodata);
data/animations/object/bollard.o(.rodata);
@ -1459,7 +1459,7 @@ SECTIONS {
data/const/object/object49.o(.rodata);
data/const/object/backgroundCloud.o(.rodata);
data/const/object/object4B.o(.rodata);
data/const/object/pushableFurniture.o(.rodata);
src/object/pushableFurniture.o(.rodata);
data/const/object/furniture.o(.rodata);
data/animations/object/furniture.o(.rodata);
src/object/furniture.o(.rodata);
@ -1503,7 +1503,7 @@ SECTIONS {
data/const/object/objectOnPillar.o(.rodata);
data/const/object/mineralWaterSource.o(.rodata);
data/const/object/object70.o(.rodata);
data/const/object/pushableGrave.o(.rodata);
src/object/pushableGrave.o(.rodata);
data/const/object/stoneTablet.o(.rodata);
data/const/object/lilypadSmall.o(.rodata);
data/const/object/object74.o(.rodata);
@ -1525,9 +1525,9 @@ SECTIONS {
data/animations/object/bigVortex.o(.rodata);
src/object/bigPushableLever.o(.rodata);
data/animations/object/bigPushableLever.o(.rodata);
data/const/object/smallIceBlock.o(.rodata);
src/object/smallIceBlock.o(.rodata);
data/animations/object/smallIceBlock.o(.rodata);
data/const/object/bigIceBlock.o(.rodata);
src/object/bigIceBlock.o(.rodata);
data/animations/object/bigIceBlock.o(.rodata);
data/const/object/object86.o(.rodata);
data/animations/object/object86.o(.rodata);

View File

@ -328,4 +328,4 @@ void (*const BigIceBlock_Actions[])(BigIceBlockEntity*) = {
};
const u16 gUnk_081237B0[] = {
256, 266, 275, 284, 293,
};
};

View File

@ -164,10 +164,18 @@ void sub_080832D8(u32 param_1, BlockPushedEntity* this) {
}
}
void (*const gUnk_0811F624[])(BlockPushedEntity*) = {sub_08082EB4, sub_08083094, };
void (*const gUnk_0811F624[])(BlockPushedEntity*) = {
sub_08082EB4,
sub_08083094,
};
const Hitbox gUnk_0811F62C = { 0, 0, { 0, 0, 0, 0 }, 5, 4 };
const Hitbox gUnk_0811F634 = { 0, 0, { 0, 0, 0, 0 }, 13, 12 };
const Hitbox gUnk_0811F63C = { 0, 0, { 0, 0, 0, 0 }, 21, 20 };
const Hitbox gUnk_0811F644 = { 0, 0, { 0, 0, 0, 0 }, 29, 28 };
const Hitbox* const gUnk_0811F64C[] = {&gUnk_0811F62C, &gUnk_0811F634, &gUnk_0811F63C, &gUnk_0811F644, };
const Hitbox* const gUnk_0811F64C[] = {
&gUnk_0811F62C,
&gUnk_0811F634,
&gUnk_0811F63C,
&gUnk_0811F644,
};

View File

@ -0,0 +1,316 @@
/**
* @file pullableMushroom.c
* @ingroup Objects
*
* @brief Pullable Mushroom object
*/
#define NENT_DEPRECATED
#include "global.h"
#include "object.h"
#include "functions.h"
#include "game.h"
typedef struct {
/*0x00*/ Entity base;
/*0x68*/ u8 unk_68[0x8];
/*0x70*/ u32 unk_70;
/*0x74*/ u32 unk_74;
/*0x78*/ u32 unk_78;
/*0x7c*/ u32 unk_7c;
} PullableMushroomEntity;
extern const Hitbox gUnk_080FD224;
extern const u8 gUnk_08126EE4[];
extern void (*const gUnk_081211A4[])(PullableMushroomEntity*);
extern void (*const gUnk_081211B4[])(PullableMushroomEntity*);
extern void (*const gUnk_081211C0[])(PullableMushroomEntity*);
extern const u16 gUnk_081211CC[];
extern void (*const gUnk_081211DC[])(PullableMushroomEntity*);
extern const u16 gUnk_081211E4[];
extern void (*const gUnk_081211EC[])(PullableMushroomEntity*);
extern const u8 gUnk_081211F4[];
extern const u8 gUnk_081211FC[];
void sub_0808AB68(PullableMushroomEntity*);
void sub_0808B168(PullableMushroomEntity*, u32);
u32 sub_0808B1F0(PullableMushroomEntity*, Entity*);
bool32 sub_0808B21C(PullableMushroomEntity*, u32);
void PullableMushroom(PullableMushroomEntity* this) {
gUnk_081211A4[super->action](this);
super->bitfield = 0;
}
void sub_0808AA1C(PullableMushroomEntity* this) {
super->action = 1;
if (AreaIsDungeon() == 0) {
ChangeObjPalette(super, 0);
}
switch (super->type) {
case 0:
super->spritePriority.b0 = 4;
super->hitbox = (Hitbox*)&gUnk_080FD224;
super->field_0x16 = 1;
SetTile(0x4022, COORD_TO_TILE(super), super->collisionLayer);
super->health = 1;
super->field_0x3c = 7;
super->hitType = 0x6e;
super->flags2 = 0x0e;
super->field_0x1c = 1;
super->flags |= 0x80;
super->spriteOffsetY = 4;
break;
case 1:
super->spritePriority.b0 = 4;
if (super->type2 != 0) {
super->hitbox = (Hitbox*)&gUnk_080FD224;
super->flags |= 0x80;
super->health = 1;
super->field_0x3c = 7;
super->hitType = 0x6e;
super->flags2 = 4;
super->field_0x1c = 1;
super->action = 3;
}
InitializeAnimation(super, super->animationState + 9);
break;
case 2:
super->spritePriority.b0 = 5;
super->spriteRendering.b0 = 3;
if ((super->animationState & 1)) {
this->unk_74 = 0x200;
this->unk_78 = 0x100;
} else {
this->unk_78 = 0x200;
this->unk_74 = 0x100;
}
break;
}
sub_0808AB68(this);
}
void sub_0808AB68(PullableMushroomEntity* this) {
gUnk_081211B4[super->type](this);
}
void sub_0808AB80(PullableMushroomEntity* this) {
gUnk_081211C0[super->subAction](this);
}
void sub_0808AB98(PullableMushroomEntity* this) {
if (*(u16*)&super->parent->action == 0x201) {
super->parent->child = NULL;
DeleteThisEntity();
} else if (super->parent->action == 2) {
sub_0808B168(this, 0);
}
}
ASM_FUNC("asm/non_matching/pullableMushroom/sub_0808ABC4.inc", void sub_0808ABC4(PullableMushroomEntity* this))
ASM_FUNC("asm/non_matching/pullableMushroom/sub_0808ACEC.inc", void sub_0808ACEC(PullableMushroomEntity* this))
void sub_0808ADA0(PullableMushroomEntity* this) {
if ((sub_0808B1F0(this, super->child) < 8) || (super->child == NULL)) {
super->subAction += 1;
super->actionDelay = 2;
super->flags |= 0x80;
super->animationState ^= 2;
super->spritePriority.b0 = 4;
} else {
super->child->speed = 0x400;
LinearMoveUpdate(super->child);
}
}
void sub_0808ADF0(PullableMushroomEntity* this) {
if (super->animationState + 0xd == super->animIndex) {
if ((super->frame & 0x80) != 0) {
super->subAction = 0;
super->flags |= 0x80;
} else {
GetNextFrame(super);
}
} else {
if (super->animationState + 1 != super->animIndex) {
InitializeAnimation(super, super->animationState + 1);
if (super->animationState == 3) {
super->spriteSettings.flipX = 0;
} else {
super->spriteSettings.flipX = 1;
}
SoundReq(SFX_12E);
} else {
GetNextFrame(super);
if (((super->frame & 0x80) != 0) && (--super->actionDelay == 0xff)) {
InitializeAnimation(super, super->animationState + 0xd);
}
}
}
}
void sub_0808AE84(PullableMushroomEntity* this) {
if (gPlayerState.heldObject == 0) {
super->subAction = 6;
}
gUnk_081211DC[super->subAction - 5](this);
}
void sub_0808AEB0(PullableMushroomEntity* this) {
u32 uVar1;
if (super->actionDelay != 0) {
uVar1 = sub_0808B1F0(this, super->child);
if ((gPlayerState.field_0x90 & gUnk_081211E4[super->animationState]) != 0) {
GetNextFrame(super);
if (uVar1 < 0x40) {
sub_080044AE(&gPlayerEntity, 0x40, super->direction);
if (--this->unk_7c == 0xffffffff) {
this->unk_7c = 4;
SoundReq(SFX_12F);
}
}
super->field_0xf = 1;
} else {
if (((super->field_0xf != 0) && (gPlayerEntity.action == 1)) && (gPlayerState.swim_state == 0)) {
gPlayerState.queued_action = 0x1b;
gPlayerState.field_0x38 = uVar1;
gPlayerState.field_0x39 = super->direction ^ 0x10;
gPlayerState.field_0x3a = sub_0808B1F0(this, &gPlayerEntity);
super->subAction++;
}
}
} else {
super->actionDelay = 1;
this->unk_7c = 1;
super->animationState = gPlayerEntity.animationState >> 1 ^ 2;
super->direction = (super->animationState << 3);
super->flags &= 0x7f;
super->spriteSettings.flipX = gPlayerEntity.spriteSettings.flipX;
InitializeAnimation(super, super->animationState + 5);
if (sub_0808B21C(this, 0)) {
sub_0808B168((PullableMushroomEntity*)super->child, 0);
}
if ((super->animationState & 1) != 0) {
gPlayerEntity.y.HALF.HI = super->y.HALF.HI;
} else {
gPlayerEntity.x.HALF.HI = super->x.HALF.HI;
}
}
}
void sub_0808AFD4(PullableMushroomEntity* this) {
super->action = 1;
super->subAction = 1;
(super->child)->direction = super->direction ^ 0x10;
SoundReq(SFX_130);
}
void sub_0808AFF0(PullableMushroomEntity* this) {
gUnk_081211EC[super->subAction](this);
if ((((gPlayerState.field_0x1c & 0xf) != 1) || ((super->bitfield & 0x7f) != 0x13)) && (super->type == 1)) {
(super->parent)->action = 1;
(super->parent)->subAction = 1;
super->direction = super->parent->direction ^ 0x10;
super->parent->flags &= 0x7f;
super->flags &= 0x7f;
super->action = 1;
SoundReq(SFX_130);
}
}
void sub_0808B05C(PullableMushroomEntity* this) {
if (super->type == 0) {
super->animationState = gPlayerEntity.animationState >> 1 ^ 2;
super->direction = super->animationState << 3;
super->spriteSettings.flipX = gPlayerEntity.spriteSettings.flipX;
super->flags &= 0x7f;
InitializeAnimation(super, super->animationState + 5);
if (sub_0808B21C(this, 1)) {
sub_0808B168((PullableMushroomEntity*)super->child, 1);
}
}
super->subAction++;
}
ASM_FUNC("asm/non_matching/pullableMushroom/sub_0808B0BC.inc", void sub_0808B0BC(PullableMushroomEntity* this))
ASM_FUNC("asm/non_matching/pullableMushroom/sub_0808B168.inc",
void sub_0808B168(PullableMushroomEntity* this, u32 param_2))
u32 sub_0808B1F0(PullableMushroomEntity* this, Entity* other) {
s32 sVar1;
s32 sVar2;
u32 uVar3;
if ((super->animationState & 1) != 0) {
sVar1 = super->x.HALF.HI;
sVar2 = other->x.HALF.HI;
} else {
sVar1 = super->y.HALF.HI;
sVar2 = other->y.HALF.HI;
}
uVar3 = (s32)sVar1 - (s32)sVar2;
if ((s32)uVar3 < 0) {
uVar3 = -uVar3;
}
return uVar3;
}
bool32 sub_0808B21C(PullableMushroomEntity* this, u32 param_2) {
Entity* obj;
super->spritePriority.b0 = 6;
obj = CreateObjectWithParent(super, PULLABLE_MUSHROOM, 1, 0);
super->child = obj;
if (obj != NULL) {
obj->animationState = super->animationState;
(super->child)->direction = super->direction;
super->child->spriteSettings.flipX = super->spriteSettings.flipX;
(super->child)->parent = super;
(super->child)->type2 = (u8)param_2;
}
obj = CreateObjectWithParent(super, PULLABLE_MUSHROOM, 2, 0);
super->parent = obj;
if (obj != NULL) {
obj->animationState = super->animationState;
(super->parent)->child = super->child;
return TRUE;
}
return FALSE;
}
void (*const gUnk_081211A4[])(PullableMushroomEntity*) = {
sub_0808AA1C,
sub_0808AB68,
sub_0808AE84,
sub_0808AFF0,
};
void (*const gUnk_081211B4[])(PullableMushroomEntity*) = {
sub_0808AB80,
sub_0808AB98,
sub_0808ABC4,
};
void (*const gUnk_081211C0[])(PullableMushroomEntity*) = {
sub_0808ACEC,
sub_0808ADA0,
sub_0808ADF0,
};
const u16 gUnk_081211CC[] = { 32768, 64000, 0, 64517, 0, 0, 32768, 64763 };
void (*const gUnk_081211DC[])(PullableMushroomEntity*) = {
sub_0808AEB0,
sub_0808AFD4,
};
const u16 gUnk_081211E4[] = { 1024, 256, 2048, 512 };
void (*const gUnk_081211EC[])(PullableMushroomEntity*) = {
sub_0808B05C,
sub_0808B0BC,
};
const u8 gUnk_081211F4[] = {
0, 8, 248, 252, 0, 248, 8, 252,
};
const u8 gUnk_081211FC[] = {
0, 3, 248, 252, 0, 244, 8, 252,
};