finish player.c

This commit is contained in:
theo3
2021-12-27 17:14:52 -08:00
parent 079260dbd6
commit 24750a6bb5
89 changed files with 2566 additions and 4879 deletions
+1 -1
View File
@@ -356,7 +356,7 @@ _0803E7A0:
strb r0, [r2, #0xe]
movs r0, #8
movs r1, #0
bl sub_08080964
bl InitScreenShake
_0803E7B0:
pop {pc}
.align 2, 0
+4 -4
View File
@@ -1033,7 +1033,7 @@ sub_0802647C: @ 0x0802647C
bne _080264A6
movs r0, #0x10
movs r1, #0
bl sub_08080964
bl InitScreenShake
ldr r0, _080264A8 @ =0x000001A1
bl SoundReq
adds r0, r4, #0
@@ -1561,7 +1561,7 @@ sub_0802686C: @ 0x0802686C
_08026888:
movs r0, #0x10
movs r1, #0
bl sub_08080964
bl InitScreenShake
movs r0, #5
strb r0, [r4, #0xd]
adds r0, r4, #0
@@ -1852,7 +1852,7 @@ _08026A7C:
strh r0, [r1]
movs r0, #0x20
movs r1, #0
bl sub_08080964
bl InitScreenShake
ldr r0, _08026B24 @ =0x0000010B
bl SoundReq
adds r0, r6, #0
@@ -2126,7 +2126,7 @@ _08026A98:
strh r0, [r1]
movs r0, #0x20
movs r1, #0
bl sub_08080964
bl InitScreenShake
ldr r0, _08026B24 @ =0x0000010B
bl SoundReq
adds r0, r6, #0
+2 -2
View File
@@ -99,8 +99,8 @@ EnqueueSFX: @ 0x08004488
_0800449A:
bx lr
thumb_func_start sub_0800449C
sub_0800449C: @ 0x0800449C
thumb_func_start SoundReqClipped
SoundReqClipped: @ 0x0800449C
push {r1, lr}
bl CheckOnScreen
cmp r0, #0
+1 -1
View File
@@ -464,7 +464,7 @@ _0800890C:
.byte 0x00, 0xFA, 0x06, 0x00, 0x13, 0x12, 0x12, 0x10, 0x10, 0x11, 0x11, 0x13
_0800891C:
push {r0}
bl sub_08078F60
bl ResetPlayerVelocity
pop {r0}
_08008924:
pop {pc}
+6 -6
View File
@@ -1260,7 +1260,7 @@ _08019FDA:
ands r7, r0
movs r4, #0
movs r6, #0
ldr r5, _0801A088 @ =gUnk_03004040
ldr r5, _0801A088 @ =gPlayerClones
mov sb, r5
_08019FEC:
mov r1, sb
@@ -1340,7 +1340,7 @@ _0801A02A:
_0801A07C: .4byte gPlayerState
_0801A080: .4byte 0x0000FFFF
_0801A084: .4byte 0x00000FFF
_0801A088: .4byte gUnk_03004040
_0801A088: .4byte gPlayerClones
_0801A08C: .4byte gPlayerEntity
_0801A090: .4byte gRoomControls
_0801A094:
@@ -1465,7 +1465,7 @@ _0801A166:
b _0801A2A4
_0801A174:
movs r4, #0
ldr r5, _0801A194 @ =gUnk_03004040
ldr r5, _0801A194 @ =gPlayerClones
_0801A178:
ldr r0, [r5]
movs r1, #0
@@ -1481,7 +1481,7 @@ _0801A186:
b _0801A2A4
.align 2, 0
_0801A190: .4byte gPlayerState
_0801A194: .4byte gUnk_03004040
_0801A194: .4byte gPlayerClones
_0801A198:
subs r7, #0x40
_0801A19A:
@@ -1499,7 +1499,7 @@ _0801A1A6:
cmp r0, #9
ble _0801A2A4
movs r4, #0
ldr r5, _0801A1D0 @ =gUnk_03004040
ldr r5, _0801A1D0 @ =gPlayerClones
_0801A1B6:
ldr r0, [r5]
movs r1, #6
@@ -1513,7 +1513,7 @@ _0801A1B6:
b _0801A2A4
.align 2, 0
_0801A1CC: .4byte gPlayerState
_0801A1D0: .4byte gUnk_03004040
_0801A1D0: .4byte gPlayerClones
_0801A1D4:
movs r0, #2
ands r0, r1
-4332
View File
File diff suppressed because it is too large Load Diff
+9 -9
View File
@@ -862,8 +862,8 @@ sub_08078EE4: @ 0x08078EE4
_08078EF4: .4byte gPlayerEntity
_08078EF8: .4byte gPlayerState
thumb_func_start sub_08078EFC
sub_08078EFC: @ 0x08078EFC
thumb_func_start RunQueuedAction
RunQueuedAction: @ 0x08078EFC
push {lr}
ldr r3, _08078F18 @ =gPlayerState
ldrb r2, [r3, #0xc]
@@ -894,7 +894,7 @@ sub_08078F24: @ 0x08078F24
ands r0, r3
cmp r0, #0
beq _08078F3C
bl sub_08078F60
bl ResetPlayerVelocity
b _08078F5A
.align 2, 0
_08078F38: .4byte gPlayerState
@@ -919,8 +919,8 @@ _08078F5A:
.align 2, 0
_08078F5C: .4byte gSineTable
thumb_func_start sub_08078F60
sub_08078F60: @ 0x08078F60
thumb_func_start ResetPlayerVelocity
ResetPlayerVelocity: @ 0x08078F60
ldr r0, _08078F70 @ =gPlayerState
adds r1, r0, #0
adds r1, #0x8c
@@ -3282,7 +3282,7 @@ _0807A104:
thumb_func_start sub_0807A108
sub_0807A108: @ 0x0807A108
push {lr}
ldr r1, _0807A148 @ =gUnk_03004040
ldr r1, _0807A148 @ =gPlayerClones
movs r0, #0
str r0, [r1]
str r0, [r1, #4]
@@ -3315,7 +3315,7 @@ _0807A130:
_0807A144:
pop {pc}
.align 2, 0
_0807A148: .4byte gUnk_03004040
_0807A148: .4byte gPlayerClones
_0807A14C: .4byte gPlayerState
_0807A150: .4byte 0xFFBFFFFF
_0807A154: .4byte gPlayerEntity
@@ -3483,8 +3483,8 @@ _0807A28C: .4byte gPlayerEntity
_0807A290: .4byte gPlayerState
_0807A294: .4byte gUnk_08007CAC
thumb_func_start sub_0807A298
sub_0807A298: @ 0x0807A298
thumb_func_start EnablePlayerDraw
EnablePlayerDraw: @ 0x0807A298
movs r1, #0
strb r1, [r0, #0xb]
ldrb r1, [r0, #0x18]
+1 -1
View File
@@ -535,7 +535,7 @@ sub_08096740: @ 0x08096740
adds r4, r0, #0
movs r0, #0x10
movs r1, #0
bl sub_08080964
bl InitScreenShake
movs r1, #0
movs r0, #1
strb r0, [r4, #0xc]
+1 -1
View File
@@ -284,7 +284,7 @@ _0803EDC0:
strb r0, [r2, #0xe]
movs r0, #8
movs r1, #0
bl sub_08080964
bl InitScreenShake
_0803EDD0:
pop {pc}
.align 2, 0
+2 -2
View File
@@ -854,7 +854,7 @@ sub_08041134: @ 0x08041134
movs r0, #0x25
strb r0, [r1]
movs r5, #0
ldr r0, _08041168 @ =gUnk_03004040
ldr r0, _08041168 @ =gPlayerClones
ldr r0, [r0]
cmp r0, #0
beq _08041150
@@ -872,7 +872,7 @@ _08041150:
strh r0, [r1]
pop {r4, r5, pc}
.align 2, 0
_08041168: .4byte gUnk_03004040
_08041168: .4byte gPlayerClones
_0804116C: .4byte gUnk_080D0E18
thumb_func_start sub_08041170
+1 -1
View File
@@ -105,7 +105,7 @@ _08048E48:
bl SoundReq
movs r0, #0x28
movs r1, #0
bl sub_08080964
bl InitScreenShake
_08048E5C:
adds r2, r5, #0
adds r2, #0x3d
+3 -3
View File
@@ -851,7 +851,7 @@ sub_0803F630: @ 0x0803F630
movs r0, #0x25
strb r0, [r1]
movs r5, #0
ldr r0, _0803F664 @ =gUnk_03004040
ldr r0, _0803F664 @ =gPlayerClones
ldr r0, [r0]
cmp r0, #0
beq _0803F64C
@@ -869,7 +869,7 @@ _0803F64C:
strh r0, [r1]
pop {r4, r5, pc}
.align 2, 0
_0803F664: .4byte gUnk_03004040
_0803F664: .4byte gPlayerClones
_0803F668: .4byte gUnk_080D0980
thumb_func_start sub_0803F66C
@@ -937,7 +937,7 @@ sub_0803F6C0: @ 0x0803F6C0
bl ModHealth
adds r0, r4, #0
movs r1, #0x7a
bl sub_0800449C
bl SoundReqClipped
pop {r4, pc}
.align 2, 0
_0803F6E8: .4byte gPlayerEntity
+3 -3
View File
@@ -900,7 +900,7 @@ sub_0802D6F0: @ 0x0802D6F0
str r0, [r2, #0x7c]
movs r0, #0x96
movs r1, #0
bl sub_08080964
bl InitScreenShake
_0802D712:
pop {pc}
@@ -2496,7 +2496,7 @@ _0802E23A:
movs r0, #0xf0
strh r0, [r7]
movs r1, #0
bl sub_08080964
bl InitScreenShake
b _0802E2E4
.align 2, 0
_0802E280: .4byte gPlayerEntity
@@ -2545,7 +2545,7 @@ _0802E29E:
strh r0, [r1]
movs r0, #0x1e
movs r1, #0
bl sub_08080964
bl InitScreenShake
_0802E2E4:
movs r0, #5
strb r0, [r5, #0xb]
+7 -7
View File
@@ -399,7 +399,7 @@ sub_080A189C: @ 0x080A189C
bl SoundReq
movs r0, #0x96
movs r1, #1
bl sub_08080964
bl InitScreenShake
_080A18E6:
ldr r2, _080A1904 @ =gPlayerState
ldr r1, _080A1908 @ =gRoomControls
@@ -521,7 +521,7 @@ sub_080A1990: @ 0x080A1990
bl SoundReq
movs r0, #0x96
movs r1, #1
bl sub_08080964
bl InitScreenShake
_080A19D6:
ldr r2, _080A19F4 @ =gPlayerState
ldr r1, _080A19F8 @ =gRoomControls
@@ -640,7 +640,7 @@ sub_080A1A80: @ 0x080A1A80
bl SoundReq
movs r0, #0x96
movs r1, #1
bl sub_08080964
bl InitScreenShake
_080A1AC0:
ldr r2, _080A1AE0 @ =gPlayerState
ldr r1, _080A1AE4 @ =gRoomControls
@@ -728,7 +728,7 @@ sub_080A1B4C: @ 0x080A1B4C
beq _080A1B80
movs r0, #0x2d
movs r1, #1
bl sub_08080964
bl InitScreenShake
movs r0, #0x94
lsls r0, r0, #1
bl SoundReq
@@ -860,7 +860,7 @@ _080A1C76:
movs r0, #0xb4
lsls r0, r0, #2
movs r1, #2
bl sub_08080964
bl InitScreenShake
b _080A1C9A
_080A1C8A:
movs r0, #0x94
@@ -868,7 +868,7 @@ _080A1C8A:
bl SoundReq
movs r0, #0x4b
movs r1, #1
bl sub_08080964
bl InitScreenShake
_080A1C9A:
pop {r4, pc}
@@ -1418,7 +1418,7 @@ _080A20A4:
bne _080A20B4
movs r0, #0x1e
movs r1, #0
bl sub_08080964
bl InitScreenShake
b _080A20B4
_080A20B2:
strb r0, [r4]
+2 -2
View File
@@ -813,7 +813,7 @@ _08046498:
beq _0804650E
movs r0, #8
movs r1, #0
bl sub_08080964
bl InitScreenShake
adds r1, r4, #0
adds r1, #0x82
ldrb r0, [r1]
@@ -965,7 +965,7 @@ _080466D0:
beq _08046746
movs r0, #8
movs r1, #0
bl sub_08080964
bl InitScreenShake
adds r1, r4, #0
adds r1, #0x82
ldrb r0, [r1]
+1 -1
View File
@@ -121,7 +121,7 @@ _0808A7C2:
_0808A7C8:
ldr r1, _0808A7D4 @ =0x00000117
adds r0, r5, #0
bl sub_0800449C
bl SoundReqClipped
_0808A7D0:
pop {r4, r5, pc}
.align 2, 0
+2 -2
View File
@@ -101,7 +101,7 @@ _0808D4E8:
_0808D4FE:
movs r0, #0x1e
movs r1, #0
bl sub_08080964
bl InitScreenShake
ldr r0, _0808D514 @ =0x0000010B
bl SoundReq
movs r0, #2
@@ -358,7 +358,7 @@ _0808DBF8:
_0808DC0E:
movs r0, #0x1e
movs r1, #0
bl sub_08080964
bl InitScreenShake
ldr r0, _0808DC28 @ =0x0000010B
bl SoundReq
movs r0, #2
+1 -1
View File
@@ -1380,7 +1380,7 @@ sub_08085F48: @ 0x08085F48
ldrb r0, [r5, #0x12]
cmp r0, #0x17
bne _08085F6A
bl sub_08078F60
bl ResetPlayerVelocity
movs r0, #0x19
strb r0, [r5, #0x12]
_08085F6A:
+6 -6
View File
@@ -132,7 +132,7 @@ _0809A85C:
beq _0809A87C
subs r0, #1
strb r0, [r4, #0xe]
ldr r0, _0809A878 @ =gUnk_03004040
ldr r0, _0809A878 @ =gPlayerClones
ldr r1, [r0]
cmp r1, #0
bne _0809A8A0
@@ -142,7 +142,7 @@ _0809A870:
strb r1, [r4, #0xe]
b _0809A8A0
.align 2, 0
_0809A878: .4byte gUnk_03004040
_0809A878: .4byte gPlayerClones
_0809A87C:
adds r0, r4, #0
adds r0, #0x5a
@@ -241,7 +241,7 @@ _0809A92A:
adds r0, r4, #0
movs r2, #1
bl sub_0809AA9C
ldr r0, _0809A954 @ =gUnk_03004040
ldr r0, _0809A954 @ =gPlayerClones
ldr r1, [r0]
cmp r1, #0
beq _0809A94E
@@ -252,7 +252,7 @@ _0809A94E:
pop {r4, pc}
.align 2, 0
_0809A950: .4byte gPlayerEntity
_0809A954: .4byte gUnk_03004040
_0809A954: .4byte gPlayerClones
thumb_func_start sub_0809A958
sub_0809A958: @ 0x0809A958
@@ -408,7 +408,7 @@ _0809AA5C:
adds r1, r4, #0
movs r2, #1
bl sub_0809AA9C
ldr r0, _0809AA98 @ =gUnk_03004040
ldr r0, _0809AA98 @ =gPlayerClones
ldr r4, [r0]
cmp r4, #0
beq _0809AA8E
@@ -422,7 +422,7 @@ _0809AA8E:
pop {r4, r5, r6, r7, pc}
.align 2, 0
_0809AA94: .4byte gPlayerEntity
_0809AA98: .4byte gUnk_03004040
_0809AA98: .4byte gPlayerClones
thumb_func_start sub_0809AA9C
sub_0809AA9C: @ 0x0809AA9C
+1 -1
View File
@@ -123,7 +123,7 @@ _08024ECC:
bl ModHealth
adds r0, r6, #0
movs r1, #0x7a
bl sub_0800449C
bl SoundReqClipped
_08024F46:
pop {r4, r5, r6, r7, pc}
.align 2, 0
+6 -6
View File
@@ -99,7 +99,7 @@ _08070852:
adds r0, r5, #0
adds r0, #0x40
strb r4, [r0]
bl sub_08078EFC
bl RunQueuedAction
cmp r0, #0
beq _08070868
b _08070BE4
@@ -156,7 +156,7 @@ _080708AC:
bne _080708C4
bl UpdateFloorType
_080708C4:
bl sub_08078EFC
bl RunQueuedAction
cmp r0, #0
beq _080708CE
b _08070BE4
@@ -195,7 +195,7 @@ _08070902:
b _08070BE4
_0807090C:
bl UpdateFloorType
bl sub_08078EFC
bl RunQueuedAction
b _08070BE4
.align 2, 0
_08070918: .4byte gPlayerState
@@ -296,7 +296,7 @@ _080709D8:
_080709FC:
adds r0, r5, #0
bl sub_08077698
bl sub_08078EFC
bl RunQueuedAction
cmp r0, #0
beq _08070A0C
b _08070BE4
@@ -321,7 +321,7 @@ _08070A26:
_08070A32:
adds r0, r5, #0
bl sub_08073904
bl sub_08078EFC
bl RunQueuedAction
cmp r0, #0
beq _08070A42
b _08070BE4
@@ -432,7 +432,7 @@ _08070B00:
_08070B0E:
cmp r0, #1
bne _08070B18
bl sub_08078F60
bl ResetPlayerVelocity
b _08070B1E
_08070B18:
adds r0, r5, #0
+2 -2
View File
@@ -6,7 +6,7 @@
bl sub_080085B0
bl sub_08079E08
bl UpdateFloorType
bl sub_08078EFC
bl RunQueuedAction
cmp r0, #0
bne _08070E76
movs r1, #0x80
@@ -17,7 +17,7 @@
bne _08070E76
ldr r6, _08070E18 @ =gPlayerState
strb r0, [r6, #2]
bl sub_08078EFC
bl RunQueuedAction
adds r5, r0, #0
cmp r5, #0
bne _08070E76
+280
View File
@@ -0,0 +1,280 @@
.syntax unified
push {r4, r5, r6, lr}
adds r4, r0, #0
ldr r2, _080735DC @ =gPlayerState
adds r0, r2, #0
adds r0, #0x92
ldrh r1, [r0]
movs r5, #0x80
adds r0, r5, #0
ands r0, r1
adds r6, r2, #0
cmp r0, #0
bne _080735C0
adds r0, r4, #0
adds r0, #0x3d
ldrb r0, [r0]
lsls r0, r0, #0x18
asrs r0, r0, #0x18
cmp r0, #0
bgt _080735C0
adds r0, r6, #0
adds r0, #0x3c
ldrb r0, [r0]
cmp r0, #0
bne _080735C0
ldr r0, [r6, #0x30]
movs r1, #0x80
lsls r1, r1, #0x11
ands r0, r1
cmp r0, #0
bne _080735E0
_080735C0:
ldrb r0, [r6, #2]
movs r1, #0x40
orrs r1, r0
strb r1, [r6, #2]
bl sub_0807921C
adds r0, r4, #0
bl sub_08073904
movs r0, #0xe6
lsls r0, r0, #3
strh r0, [r6, #8]
b _08073794
.align 2, 0
_080735DC: .4byte gPlayerState
_080735E0:
ldr r0, _0807360C @ =gUnk_0200AF00
adds r0, #0x2f
movs r1, #1
strb r1, [r0]
movs r0, #0
bl sub_0807A2F8
cmp r0, #0
beq _08073610
ldrb r0, [r4, #0xd]
adds r0, #1
strb r0, [r4, #0xd]
ldrb r1, [r4, #0x14]
movs r0, #6
ands r0, r1
lsls r0, r0, #2
strb r0, [r4, #0x15]
ldrb r1, [r4, #0x10]
movs r0, #0x7f
ands r0, r1
strb r0, [r4, #0x10]
b _08073794
.align 2, 0
_0807360C: .4byte gUnk_0200AF00
_08073610:
ldr r0, _08073620 @ =gArea
ldrb r0, [r0, #1]
cmp r0, #0x10
bne _08073624
movs r0, #0x80
lsls r0, r0, #1
strh r0, [r4, #0x24]
b _08073626
.align 2, 0
_08073620: .4byte gArea
_08073624:
strh r5, [r4, #0x24]
_08073626:
ldr r3, _08073650 @ =gPlayerState
ldrb r1, [r3, #0xd]
movs r0, #0x80
ands r0, r1
adds r2, r4, #0
adds r2, #0x80
cmp r0, #0
bne _0807365A
ldrb r0, [r4, #0x15]
cmp r0, r1
beq _0807365A
ldrb r1, [r3, #0xd]
subs r0, r0, r1
movs r1, #0x1f
ands r0, r1
cmp r0, #0xf
bgt _08073654
ldr r0, [r2]
subs r0, #0x20
b _08073658
.align 2, 0
_08073650: .4byte gPlayerState
_08073654:
ldr r0, [r2]
adds r0, #0x20
_08073658:
str r0, [r2]
_0807365A:
ldr r0, [r2]
lsrs r0, r0, #8
movs r1, #0x1f
ands r0, r1
strb r0, [r4, #0x15]
bl sub_08079E08
ldrb r2, [r4, #0x14]
lsls r3, r2, #2
ldrb r1, [r4, #0x15]
cmp r2, #0
bne _0807367C
adds r3, #8
movs r0, #0x1f
ands r3, r0
adds r1, #8
ands r1, r0
_0807367C:
subs r0, r3, #7
cmp r0, r1
bls _08073686
subs r3, r2, #2
b _0807368E
_08073686:
adds r0, r3, #7
cmp r0, r1
bhs _08073694
adds r3, r2, #2
_0807368E:
movs r0, #7
ands r3, r0
b _08073696
_08073694:
adds r3, r2, #0
_08073696:
movs r0, #0x87
adds r0, r0, r4
mov ip, r0
ldrb r1, [r4, #0x14]
cmp r3, r1
beq _080736A8
movs r0, #0x14
mov r2, ip
strb r0, [r2]
_080736A8:
strb r3, [r4, #0x14]
movs r5, #0
ldr r1, _080736E4 @ =gPlayerState
ldrb r2, [r1, #0xd]
lsrs r3, r2, #2
mov r6, ip
ldrb r0, [r6]
adds r6, r1, #0
cmp r0, #0
beq _080736CA
movs r0, #0x80
ands r0, r2
cmp r0, #0
bne _08073736
ldrb r0, [r4, #0x14]
cmp r0, r3
beq _08073736
_080736CA:
movs r0, #0x80
ands r0, r2
cmp r0, #0
bne _080736FA
ldrb r2, [r4, #0x14]
cmp r2, r3
beq _080736FA
movs r0, #4
eors r0, r3
cmp r2, r0
bne _080736E8
movs r5, #2
b _080736FA
.align 2, 0
_080736E4: .4byte gPlayerState
_080736E8:
movs r0, #6
ands r0, r3
adds r0, #2
movs r1, #7
ands r0, r1
movs r5, #3
cmp r2, r0
bne _080736FA
movs r5, #1
_080736FA:
ldr r1, _0807371C @ =gUnk_0811BC28
lsls r0, r5, #1
adds r0, r0, r1
ldrh r0, [r0]
ldrh r1, [r6, #8]
cmp r0, r1
bne _0807372C
ldr r0, _08073720 @ =gArea
ldrb r0, [r0, #1]
cmp r0, #0x10
bne _08073724
adds r0, r4, #0
movs r1, #2
bl sub_080042BA
b _0807372E
.align 2, 0
_0807371C: .4byte gUnk_0811BC28
_08073720: .4byte gArea
_08073724:
adds r0, r4, #0
bl UpdateAnimationSingleFrame
b _0807372E
_0807372C:
strh r0, [r6, #8]
_0807372E:
adds r0, r4, #0
adds r0, #0x86
strb r5, [r0]
b _08073762
_08073736:
mov r2, ip
ldrb r0, [r2]
subs r0, #1
strb r0, [r2]
ldr r1, _0807375C @ =gUnk_0811BC30
adds r0, r4, #0
adds r0, #0x86
ldrb r0, [r0]
lsls r0, r0, #1
adds r0, r0, r1
ldrh r0, [r0]
ldrh r1, [r6, #8]
cmp r0, r1
bne _08073760
adds r0, r4, #0
bl UpdateAnimationSingleFrame
b _08073762
.align 2, 0
_0807375C: .4byte gUnk_0811BC30
_08073760:
strh r0, [r6, #8]
_08073762:
ldr r0, [r4, #0x7c]
subs r1, r0, #1
str r1, [r4, #0x7c]
movs r0, #1
rsbs r0, r0, #0
cmp r1, r0
bne _08073784
ldr r2, _08073780 @ =gPlayerState
ldrb r1, [r2, #2]
movs r0, #0x40
orrs r0, r1
strb r0, [r2, #2]
bl sub_0807921C
b _08073794
.align 2, 0
_08073780: .4byte gPlayerState
_08073784:
adds r0, r1, #0
movs r1, #0x14
bl __divsi3
ldr r2, _08073798 @ =0x0000FFF8
adds r1, r2, #0
subs r1, r1, r0
strh r1, [r4, #0x36]
_08073794:
pop {r4, r5, r6, pc}
.align 2, 0
_08073798: .4byte 0x0000FFF8
.syntax divided
+123
View File
@@ -0,0 +1,123 @@
.syntax unified
push {r4, r5, r6, lr}
adds r4, r0, #0
bl UpdateAnimationSingleFrame
ldrb r0, [r4, #0xf]
cmp r0, #0
bne _080740EA
ldrb r0, [r4, #0x15]
b _080740F0
_080740EA:
ldrb r1, [r4, #0x15]
movs r0, #0x10
eors r0, r1
_080740F0:
cmp r0, #8
beq _08074128
cmp r0, #8
bhi _080740FE
cmp r0, #0
beq _08074168
b _0807418C
_080740FE:
cmp r0, #0x10
beq _08074148
cmp r0, #0x18
bne _0807418C
movs r0, #0x2e
ldrsh r1, [r4, r0]
ldr r2, [r4, #0x48]
ldrb r0, [r2, #2]
subs r1, r1, r0
movs r0, #0
ldrsb r0, [r2, r0]
adds r1, r1, r0
ldr r3, _08074124 @ =gRoomControls
ldrh r0, [r3, #6]
subs r6, r1, r0
movs r1, #0x32
ldrsh r0, [r4, r1]
b _08074182
.align 2, 0
_08074124: .4byte gRoomControls
_08074128:
ldr r2, [r4, #0x48]
movs r1, #0x2e
ldrsh r0, [r4, r1]
ldrb r1, [r2, #2]
adds r0, r0, r1
movs r1, #0
ldrsb r1, [r2, r1]
adds r0, r0, r1
ldr r3, _08074144 @ =gRoomControls
ldrh r1, [r3, #6]
subs r6, r0, r1
movs r1, #0x32
ldrsh r0, [r4, r1]
b _08074182
.align 2, 0
_08074144: .4byte gRoomControls
_08074148:
movs r0, #0x2e
ldrsh r1, [r4, r0]
ldr r2, [r4, #0x48]
movs r0, #0
ldrsb r0, [r2, r0]
adds r1, r1, r0
ldr r3, _08074164 @ =gRoomControls
ldrh r0, [r3, #6]
subs r6, r1, r0
movs r1, #0x32
ldrsh r0, [r4, r1]
ldrb r1, [r2, #5]
adds r0, r0, r1
b _08074182
.align 2, 0
_08074164: .4byte gRoomControls
_08074168:
movs r0, #0x2e
ldrsh r1, [r4, r0]
ldr r2, [r4, #0x48]
movs r0, #0
ldrsb r0, [r2, r0]
adds r1, r1, r0
ldr r3, _080741A4 @ =gRoomControls
ldrh r0, [r3, #6]
subs r6, r1, r0
movs r1, #0x32
ldrsh r0, [r4, r1]
ldrb r1, [r2, #5]
subs r0, r0, r1
_08074182:
movs r1, #1
ldrsb r1, [r2, r1]
adds r0, r0, r1
ldrh r1, [r3, #8]
subs r5, r0, r1
_0807418C:
ldr r2, _080741A8 @ =gUnk_080082DC
adds r0, r6, #0
adds r1, r5, #0
bl sub_080086B4
cmp r0, #0
beq _080741AC
adds r0, r4, #0
bl sub_0806F69C
b _080741B0
.align 2, 0
_080741A4: .4byte gRoomControls
_080741A8: .4byte gUnk_080082DC
_080741AC:
movs r0, #1
strb r0, [r4, #0xf]
_080741B0:
movs r1, #0x80
lsls r1, r1, #6
adds r0, r4, #0
bl GravityUpdate
cmp r0, #0
bne _080741C2
bl sub_0807921C
_080741C2:
pop {r4, r5, r6, pc}
.syntax divided
+146
View File
@@ -0,0 +1,146 @@
.syntax unified
push {r4, lr}
adds r4, r0, #0
bl sub_080741C4
cmp r0, #0
beq _08074690
ldr r0, _0807468C @ =gPlayerState
movs r1, #0
strb r1, [r0, #0x11]
b _080746CE
.align 2, 0
_0807468C: .4byte gPlayerState
_08074690:
adds r0, r4, #0
adds r0, #0x45
ldrb r0, [r0]
cmp r0, #0
beq _0807476C
adds r0, r4, #0
bl sub_08079C30
adds r1, r0, #0
cmp r1, #0
bne _080746B0
ldr r0, _080746AC @ =gPlayerState
strb r1, [r0, #0x11]
b _080746CE
.align 2, 0
_080746AC: .4byte gPlayerState
_080746B0:
ldr r3, _080746D4 @ =gPlayerState
ldr r1, [r3, #0x30]
movs r0, #0x80
ands r1, r0
cmp r1, #0
bne _0807476C
ldrb r2, [r3, #0x1e]
cmp r2, #0
beq _080746D8
movs r0, #0x40
ands r0, r2
cmp r0, #0
beq _080746DC
strb r1, [r3, #0x11]
adds r0, r3, #0
_080746CE:
adds r0, #0x37
strb r1, [r0]
b _08074792
.align 2, 0
_080746D4: .4byte gPlayerState
_080746D8:
bl sub_08077B20
_080746DC:
ldr r1, _08074700 @ =gPlayerState
adds r0, r1, #0
adds r0, #0x37
ldrb r0, [r0]
cmp r0, #1
bne _08074704
adds r0, r4, #0
movs r1, #0x70
movs r2, #0
movs r3, #0
bl CreateObjectWithParent
adds r0, r4, #0
movs r1, #0x52
movs r2, #0
bl CreateFx
b _08074714
.align 2, 0
_08074700: .4byte gPlayerState
_08074704:
adds r0, r1, #0
adds r0, #0x92
ldrh r1, [r0]
movs r0, #0xf0
lsls r0, r0, #4
ands r0, r1
cmp r0, #0
beq _08074720
_08074714:
ldr r0, _0807471C @ =0x00000161
bl SoundReq
b _08074732
.align 2, 0
_0807471C: .4byte 0x00000161
_08074720:
ldr r0, _08074760 @ =gScreenTransition
ldr r0, [r0]
movs r1, #0xf
ands r0, r1
cmp r0, #0
bne _08074732
ldr r0, _08074764 @ =0x00000161
bl SoundReq
_08074732:
ldr r2, _08074768 @ =gPlayerState
adds r1, r2, #0
adds r1, #0x80
ldrh r0, [r1]
subs r0, #0xf0
strh r0, [r1]
adds r1, #0x28
movs r0, #0x1b
strb r0, [r1]
adds r0, r2, #0
adds r0, #0x37
ldrb r0, [r0]
lsls r3, r0, #0x18
lsrs r0, r3, #0x18
cmp r0, #0xef
bhi _0807476C
subs r1, #0x69
lsrs r0, r3, #0x1d
adds r0, #4
ldrb r2, [r1]
adds r0, r0, r2
strb r0, [r1]
b _08074792
.align 2, 0
_08074760: .4byte gScreenTransition
_08074764: .4byte 0x00000161
_08074768: .4byte gPlayerState
_0807476C:
ldr r2, _08074794 @ =gPlayerState
ldr r0, [r2, #0x30]
ldr r1, _08074798 @ =0xFFFBFFFF
ands r0, r1
str r0, [r2, #0x30]
adds r0, r4, #0
movs r1, #0x52
movs r2, #0
bl CreateFx
adds r1, r4, #0
adds r1, #0x3d
movs r0, #0x20
strb r0, [r1]
subs r0, #0x24
bl ModHealth
bl RespawnPlayer
_08074792:
pop {r4, pc}
.align 2, 0
_08074794: .4byte gPlayerState
_08074798: .4byte 0xFFFBFFFF
.syntax divided
+84
View File
@@ -0,0 +1,84 @@
.syntax unified
push {r4, r5, r6, r7, lr}
adds r7, r0, #0
adds r5, r1, #0
adds r6, r2, #0
ldr r4, _08075230 @ =gPlayerScriptExecutionContext
adds r0, r4, #0
movs r1, #0x24
bl MemClear
str r6, [r4]
ldr r0, _08075234 @ =gPlayerEntity
adds r0, #0x84
str r4, [r0]
ldr r2, _08075238 @ =gPlayerState
movs r1, #0
movs r0, #0x1c
strb r0, [r2, #0xc]
adds r0, r2, #0
adds r0, #0x38
movs r4, #1
strb r4, [r0]
adds r3, r2, #0
adds r3, #0x39
strb r1, [r3]
adds r0, #2
strb r5, [r0]
ldr r0, [r2, #0x30]
movs r1, #8
orrs r0, r1
str r0, [r2, #0x30]
cmp r7, #0
bne _08075240
strb r7, [r3]
ldr r6, _0807523C @ =script_08009ECC
b _08075244
.align 2, 0
_08075230: .4byte gPlayerScriptExecutionContext
_08075234: .4byte gPlayerEntity
_08075238: .4byte gPlayerState
_0807523C: .4byte script_08009ECC
_08075240:
strb r4, [r3]
ldr r6, _08075290 @ =script_08009EF0
_08075244:
ldr r0, _08075294 @ =gPlayerState
adds r0, #0x39
ldrb r0, [r0]
movs r1, #0
cmp r0, #0
bne _08075252
movs r1, #2
_08075252:
movs r0, #0x5b
movs r2, #0
bl CreateObject
adds r4, r0, #0
cmp r4, #0
beq _08075270
ldr r0, _08075298 @ =gPlayerEntity
adds r1, r4, #0
bl CopyPosition
adds r0, r4, #0
adds r1, r6, #0
bl StartCutscene
_08075270:
ldr r4, _08075298 @ =gPlayerEntity
movs r1, #0xe
rsbs r1, r1, #0
movs r2, #0x1c
rsbs r2, r2, #0
adds r0, r4, #0
bl CreateSpeechBubbleSleep
str r0, [r4, #0x6c]
cmp r0, #0
beq _0807528C
movs r1, #3
bl SetDefaultPriority
_0807528C:
pop {r4, r5, r6, r7, pc}
.align 2, 0
_08075290: .4byte script_08009EF0
_08075294: .4byte gPlayerState
_08075298: .4byte gPlayerEntity
.syntax divided
@@ -88,7 +88,7 @@ _080A7AEC:
bne _080A7B4C
ldr r0, _080A7B44 @ =gPlayerEntity
ldr r1, _080A7B48 @ =0x00000119
bl sub_0800449C
bl SoundReqClipped
b _080A7B54
.align 2, 0
_080A7B44: .4byte gPlayerEntity
@@ -96,7 +96,7 @@ _080A7B48: .4byte 0x00000119
_080A7B4C:
ldr r0, _080A7B90 @ =gPlayerEntity
movs r1, #0x74
bl sub_0800449C
bl SoundReqClipped
_080A7B54:
movs r0, #0xf
movs r1, #0x1a
+1 -1
View File
@@ -96,7 +96,7 @@ _0804BFE0:
_0804BFE8:
ldrh r0, [r4, #0xa]
ldrh r1, [r4, #0xc]
bl sub_08080964
bl InitScreenShake
ldrh r0, [r4, #0xe]
bl SoundReq
pop {r3, r4, r5}
+8 -8
View File
@@ -142,7 +142,7 @@ sub_080848C8: @ 0x080848C8
lsls r0, r1, #0x10
cmp r0, #0
beq _0808493C
ldr r0, _0808498C @ =gUnk_03004040
ldr r0, _0808498C @ =gPlayerClones
ldrb r1, [r4, #0xa]
lsls r1, r1, #2
adds r1, r1, r0
@@ -182,7 +182,7 @@ _0808496A:
_08084980: .4byte gPlayerState
_08084984: .4byte gUnk_08120574
_08084988: .4byte gPlayerEntity
_0808498C: .4byte gUnk_03004040
_0808498C: .4byte gPlayerClones
_08084990: .4byte 0x00000315
_08084994:
cmp r0, #4
@@ -195,7 +195,7 @@ _08084994:
adds r2, #0x38
ldrb r2, [r2]
bl sub_08000152
ldr r1, _080849C0 @ =gUnk_03004040
ldr r1, _080849C0 @ =gPlayerClones
ldrb r0, [r4, #0xa]
lsls r0, r0, #2
adds r0, r0, r1
@@ -205,7 +205,7 @@ _08084994:
b _080849D6
.align 2, 0
_080849BC: .4byte 0x00000315
_080849C0: .4byte gUnk_03004040
_080849C0: .4byte gPlayerClones
_080849C4:
ldrb r2, [r4, #0x18]
lsls r1, r2, #0x1e
@@ -246,7 +246,7 @@ _080849F6:
beq _08084A04
b _08084AF8
_08084A04:
ldr r0, _08084A40 @ =gUnk_03004040
ldr r0, _08084A40 @ =gPlayerClones
ldrb r1, [r4, #0xa]
lsls r1, r1, #2
adds r1, r1, r0
@@ -276,7 +276,7 @@ _08084A04:
b _08084AF8
.align 2, 0
_08084A3C: .4byte gPlayerState
_08084A40: .4byte gUnk_03004040
_08084A40: .4byte gPlayerClones
_08084A44: .4byte gPlayerEntity
_08084A48:
adds r0, r4, #0
@@ -585,7 +585,7 @@ _08084CA8: .4byte gPlayerState
sub_08084CAC: @ 0x08084CAC
push {r4, r5, r6, r7, lr}
adds r5, r0, #0
ldr r6, _08084D18 @ =gUnk_03004040
ldr r6, _08084D18 @ =gPlayerClones
ldrb r0, [r5, #0xa]
lsls r0, r0, #2
adds r0, r0, r6
@@ -636,7 +636,7 @@ sub_08084CAC: @ 0x08084CAC
orrs r0, r1
b _08084D30
.align 2, 0
_08084D18: .4byte gUnk_03004040
_08084D18: .4byte gPlayerClones
_08084D1C: .4byte gUnk_080B4468
_08084D20: .4byte gRoomControls
_08084D24:
+2 -2
View File
@@ -250,7 +250,7 @@ _080889CA:
ands r0, r1
cmp r0, #0
beq _08088A3A
ldr r6, _08088A4C @ =gUnk_03004040
ldr r6, _08088A4C @ =gPlayerClones
ldr r1, [r6]
adds r0, r4, #0
bl sub_080177A0
@@ -305,4 +305,4 @@ _08088A3A:
_08088A40: .4byte gPlayerEntity
_08088A44: .4byte gUnk_08120BEC
_08088A48: .4byte gPlayerState
_08088A4C: .4byte gUnk_03004040
_08088A4C: .4byte gPlayerClones
-129
View File
@@ -1,129 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.syntax unified
.text
thumb_func_start sub_080731D8
sub_080731D8: @ 0x080731D8
push {r4, r5, r6, r7, lr}
adds r4, r0, #0
ldrb r1, [r4, #0x10]
movs r0, #0x7f
ands r0, r1
movs r2, #0
strb r0, [r4, #0x10]
movs r1, #0
movs r0, #0x40
strh r0, [r4, #0x24]
strb r1, [r4, #0x14]
ldrh r1, [r4, #0x2e]
movs r5, #0x10
rsbs r5, r5, #0
adds r0, r5, #0
ands r0, r1
movs r7, #8
orrs r0, r7
strh r0, [r4, #0x2e]
strh r2, [r4, #0x2c]
ldr r6, _08073214 @ =gPlayerState
adds r0, r6, #0
adds r0, #0x38
ldrb r0, [r0]
cmp r0, #0
bne _08073218
movs r0, #1
strb r0, [r4, #0xd]
b _0807329A
.align 2, 0
_08073214: .4byte gPlayerState
_08073218:
ldrb r0, [r4, #0x18]
movs r1, #3
orrs r0, r1
strb r0, [r4, #0x18]
movs r0, #3
strb r0, [r4, #0xd]
ldrh r0, [r4, #0x32]
adds r1, r4, #0
adds r1, #0x7e
strh r0, [r1]
ldrh r0, [r4, #0x32]
subs r0, #0x10
strh r0, [r4, #0x32]
adds r0, r4, #0
movs r1, #0x70
movs r2, #1
movs r3, #0
bl CreateObjectWithParent
str r0, [r4, #0x54]
adds r0, r6, #0
adds r0, #0x39
ldrb r0, [r0]
cmp r0, #7
bne _08073270
ldrh r1, [r4, #0x32]
adds r0, r5, #0
ands r0, r1
adds r0, #8
strh r0, [r4, #0x32]
ldrh r1, [r4, #0x2e]
adds r0, r5, #0
ands r0, r1
strh r0, [r4, #0x2e]
strb r7, [r4, #0x15]
movs r0, #2
strb r0, [r4, #0x14]
ldr r0, _0807326C @ =0x00000187
bl SoundReq
b _08073294
.align 2, 0
_0807326C: .4byte 0x00000187
_08073270:
ldrh r1, [r4, #0x32]
adds r0, r5, #0
ands r0, r1
adds r0, #2
strh r0, [r4, #0x32]
ldrh r1, [r4, #0x2e]
adds r0, r5, #0
ands r0, r1
adds r0, #0xf
strh r0, [r4, #0x2e]
movs r0, #0x18
strb r0, [r4, #0x15]
movs r0, #6
strb r0, [r4, #0x14]
movs r0, #0xc4
lsls r0, r0, #1
bl SoundReq
_08073294:
adds r0, r4, #0
bl sub_08066DE4
_0807329A:
ldr r2, _080732AC @ =gPlayerState
ldr r0, [r2, #0x30]
movs r1, #8
ands r0, r1
cmp r0, #0
beq _080732B4
ldr r0, _080732B0 @ =0x00000404
b _080732B8
.align 2, 0
_080732AC: .4byte gPlayerState
_080732B0: .4byte 0x00000404
_080732B4:
movs r0, #0x82
lsls r0, r0, #1
_080732B8:
strh r0, [r2, #8]
ldr r1, _080732CC @ =gRoomControls
movs r0, #0
str r0, [r1, #0x30]
bl sub_0807A108
bl ResetPlayer
pop {r4, r5, r6, r7, pc}
.align 2, 0
_080732CC: .4byte gRoomControls
-69
View File
@@ -1,69 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
.align 2
gUnk_0811BC08:: @ 0811BC08
.4byte sub_08073468
.4byte sub_080734D4
.4byte sub_08073504
.4byte sub_08073584
.4byte sub_0807379C
.4byte sub_080737BC
.4byte sub_0807380C
.4byte sub_08073884
gUnk_0811BC28:: @ 0811BC28
.incbin "data_0811B9E0/gUnk_0811BC28.bin"
gUnk_0811BC30:: @ 0811BC30
.incbin "data_0811B9E0/gUnk_0811BC30.bin"
gUnk_0811BC38:: @ 0811BC38
.incbin "data_0811B9E0/gUnk_0811BC38.bin"
gUnk_0811BC40:: @ 0811BC40
.incbin "data_0811B9E0/gUnk_0811BC40.bin"
gUnk_0811BC48:: @ 0811BC48
.4byte sub_08073924
.4byte sub_08073968
.4byte sub_080739EC
.4byte sub_08073A94
.4byte sub_08073B8C
.4byte sub_08073C30
gUnk_0811BC60:: @ 0811BC60
.4byte sub_08073C80
.4byte sub_08073D20
.4byte sub_08073F04
.4byte sub_08073F4C
.4byte sub_08073FD0
.4byte sub_08074018
.4byte sub_08074060
.4byte sub_080740D8
gUnk_0811BC80:: @ 0811BC80
.incbin "data_0811B9E0/gUnk_0811BC80.bin"
gUnk_0811BC88:: @ 0811BC88
.4byte sub_08074C68
.4byte sub_08074CF8
.4byte sub_08074F00
.4byte sub_080750F4
gUnk_0811BC98:: @ 0811BC98
.4byte sub_08074F1C
.4byte sub_08074F2C
.4byte sub_08074F44
.4byte sub_08074F8C
.4byte sub_08074FEC
.4byte sub_0807501C
.4byte sub_0807508C
gUnk_0811BCB4:: @ 0811BCB4
.4byte sub_08075110
.4byte sub_0807513C
.4byte sub_0807518C
.4byte sub_080751B4
+42 -42
View File
@@ -90,52 +90,52 @@ gUnk_0811C118:: @ 0811C118
.incbin "data_0811BE38/gUnk_0811C118.bin"
gUnk_0811C120:: @ 0811C120
.4byte nullsub_112
.4byte sub_08074200
.4byte SurfaceAction_DoNothing
.4byte SurfaceAction_Pit
.4byte 00000000
.4byte 00000000
.4byte sub_0807422C
.4byte sub_08074238
.4byte sub_080742AC
.4byte sub_080742E4
.4byte sub_08074314
.4byte sub_08074338
.4byte sub_0807435C
.4byte sub_08074380
.4byte sub_08074638
.4byte sub_08074B4C
.4byte sub_08074B74
.4byte sub_08074BA0
.4byte sub_08074BCC
.4byte sub_08074678
.4byte nullsub_112
.4byte nullsub_112
.4byte sub_080743D4
.4byte sub_0807441C
.4byte sub_0807450C
.4byte sub_08074584
.4byte sub_080745B4
.4byte sub_0807479C
.4byte sub_080748C4
.4byte sub_080748DC
.4byte sub_08074918
.4byte SurfaceAction_SlopeGndGndVertical
.4byte SurfaceAction_SlopeGndGndHorizontal
.4byte SurfaceAction_6
.4byte SurfaceAction_7
.4byte SurfaceAction_MinishDoorFront
.4byte SurfaceAction_MinishDoorBack
.4byte SurfaceAction_A
.4byte SurfaceAction_B
.4byte SurfaceAction_SlopeGndWater
.4byte SurfaceAction_D
.4byte SurfaceAction_E
.4byte SurfaceAction_F
.4byte SurfaceAction_10
.4byte SurfaceAction_Swamp
.4byte SurfaceAction_DoNothing
.4byte SurfaceAction_DoNothing
.4byte SurfaceAction_14
.4byte SurfaceAction_CloneTile
.4byte SurfaceAction_16
.4byte SurfaceAction_Ice
.4byte SurfaceAction_ShallowWater
.4byte SurfaceAction_Water
.4byte SurfaceAction_Button
.4byte SurfaceAction_1B
.4byte SurfaceAction_1C
.4byte 00000000
.4byte sub_0807496C
.4byte SurfaceAction_Ladder
.4byte 00000000
.4byte sub_08074A48
.4byte sub_0807450C
.4byte nullsub_504
.4byte sub_080742AC
.4byte sub_080742AC
.4byte sub_08074A9C
.4byte sub_08074AF4
.4byte sub_08074B18
.4byte sub_0807422C
.4byte sub_08074238
.4byte sub_080749D4
.4byte sub_0807493C
.4byte sub_080749A8
.4byte sub_08074A9C
.4byte SurfaceAction_20
.4byte SurfaceAction_16
.4byte SurfaceAction_22
.4byte SurfaceAction_6
.4byte SurfaceAction_6
.4byte SurfaceAction_Dust
.4byte SurfaceAction_26
.4byte SurfaceAction_Hole
.4byte SurfaceAction_SlopeGndGndVertical
.4byte SurfaceAction_SlopeGndGndHorizontal
.4byte SurfaceAction_AutoLadder
.4byte SurfaceAction_ClimbWall
.4byte SurfaceAction_2C
.4byte SurfaceAction_Dust
gUnk_0811C1D8:: @ 0811C1D8
.4byte gUnk_0811C240
+4 -2
View File
@@ -6,8 +6,9 @@
struct Entity_;
extern u32 Random(void);
extern void sub_08000152(u32);
extern void sub_08000152(u32, u32, u32);
extern void SetTile(u32 index, u32 position, u32 layer);
extern u32 sub_080002D0(struct Entity_*);
extern void sub_08001242(struct Entity_*);
extern void sub_08001290(struct Entity_*, u32);
extern void sub_08001324(struct Entity_*);
@@ -15,11 +16,12 @@ extern u32 sub_08002632(struct Entity_*);
extern u32 GravityUpdate(struct Entity_*, u32);
extern u32 sub_080043E8(struct Entity_*);
extern void sub_08004484(struct Entity_*, struct Entity_*);
extern u32 sub_080045D4(s16, s16, u32, u32);
extern u32 sub_080045D4(u32, u32, u32, u32);
extern u32 sub_080045DA(s32, s32);
extern void sub_08004596(struct Entity_*, u32);
extern u32 sub_080045B4(struct Entity_*, u32, u32);
extern u32 EntityInRectRadius(struct Entity_*, struct Entity_*, u32, u32);
extern void UpdateAnimationVariableFrames(struct Entity_*, u32);
extern u32 sub_080086B4(u32, u32, u8*);
#endif // ASM_H
+1 -1
View File
@@ -145,7 +145,7 @@ extern bool32 LoadSwapGFX(Entity*, u16, u32);
extern u32 sub_08016A30(Entity*);
extern void sub_08077728();
extern void sub_0807AEE4();
extern u32 sub_08078EFC();
extern u32 RunQueuedAction();
extern void sub_0807921C();
extern void UpdateFloorType();
extern void sub_08079938();
+18 -6
View File
@@ -34,7 +34,7 @@ enum PlayerActions {
PLAYER_INHOLE,
PLAYER_08072C9C,
PLAYER_08074C44,
PLAYER_08072F34,
PLAYER_CLIMB,
PLAYER_USEENTRANCE,
PLAYER_PARACHUTE,
};
@@ -99,12 +99,23 @@ enum PlayerFlags {
PL_DROWNING = (1 << 2),
PL_NO_CAP = (1 << 3),
PL_USE_PORTAL = (1 << 5),
PL_HIDDEN = (1 << 6),
PL_MINISH = (1 << 7),
PL_FALLING = (1 << 9),
PL_BURNING = (1 << 10),
PL_FROZEN = (1 << 11),
PL_DRUGGED = (1 << 14),
PL_ROLLING = (1 << 18),
PL_TRAPPED = (1 << 19),
PL_IN_HOLE = (1 << 20),
PL_RELEASED = (1 << 21),
PL_CLONING = (1 << 22),
PL_USE_LANTERN = (1 << 23),
PL_PARACHUTE = (1 << 24),
PL_MINECART = (1 << 26),
PL_SWORD_THRUST = (1 << 27),
PL_USE_OCARINA = (1 << 28),
PL_CLIMBING = (1 << 29),
};
enum SurfaceType {
@@ -125,7 +136,7 @@ enum SurfaceType {
SURFACE_E,
SURFACE_F,
SURFACE_10,
SURFACE_11,
SURFACE_SWAMP,
SURFACE_DOOR,
SURFACE_DOOR_13,
SURFACE_14,
@@ -137,9 +148,9 @@ enum SurfaceType {
SURFACE_BUTTON,
SURFACE_1B,
SURFACE_1C,
SURFACE_1D,
SURFACE_1D, // nulled
SURFACE_LADDER,
SURFACE_1F,
SURFACE_1F, // nulled
SURFACE_20,
SURFACE_21,
SURFACE_22,
@@ -165,7 +176,7 @@ typedef struct {
/*0x08*/ u16 animation;
/*0x0a*/ u8 field_0xa;
/*0x0b*/ u8 keepFacing;
/*0x0c*/ u8 playerAction;
/*0x0c*/ u8 queued_action;
/*0x0d*/ u8 field_0xd;
/*0x0e*/ u8 field_0xe;
/*0x0f*/ u8 hurtBlinkSpeed;
@@ -188,7 +199,8 @@ typedef struct {
/*0x2c*/ Entity* item;
/*0x30*/ u32 flags;
/*0x34*/ u8 field_0x34[2];
/*0x36*/ s16 field_0x36;
/*0x36*/ u8 field_0x36;
/*0x37*/ u8 field_0x37;
/*0x38*/ u8 field_0x38;
/*0x39*/ u8 field_0x39;
/*0x3a*/ u8 field_0x3a;
+1 -1
View File
@@ -173,7 +173,7 @@ typedef enum {
} TileEntityType;
extern void SetTileType(u32, u32, u32);
extern void sub_08080964(u32 time, u32 magnitude); // shake screen
extern void InitScreenShake(u32 time, u32 magnitude);
extern void* GetCurrentRoomProperty(u32);
extern void LoadRoomTileEntities();
+2 -4
View File
@@ -225,7 +225,7 @@ SECTIONS {
. = 0x00004010; gUnk_03004010 = .;
. = 0x00004020; gUnk_03004020 = .;
. = 0x00004030; gUnk_03004030 = .;
. = 0x00004040; gUnk_03004040 = .;
. = 0x00004040; gPlayerClones = .;
. = 0x0000404C; SoundMainRAM_Buffer = .;
. = 0x0000404D; gUnk_0300404D = .;
. = 0x000043D0; gSoundInfo = .;
@@ -657,8 +657,7 @@ SECTIONS {
src/playerItem/playerItemPacciCane.o(.text);
asm/code_0807059C.o(.text);
src/player.o(.text);
asm/stairsInteract.o(.text);
asm/code_080732D0.o(.text);
src/item.o(.text);
src/item/itemDebug.o(.text);
src/item/itemSword.o(.text);
src/item/itemLantern.o(.text);
@@ -1382,7 +1381,6 @@ SECTIONS {
data/const/playerItem/playerItem12.o(.rodata);
data/const/playerItem/playerItemPacciCane.o(.rodata);
src/player.o(.rodata);
data/data_0811B9E0.o(.rodata);
src/item.o(.rodata);
data/const/item/itemSword.o(.rodata);
data/const/item/itemLantern.o(.rodata);
+1 -1
View File
@@ -55,7 +55,7 @@ u32* GetLayerByIndex(u32 param_1) {
}
}
void sub_08080964(u32 time, u32 magnitude) {
void InitScreenShake(u32 time, u32 magnitude) {
gRoomControls.screenShakeTime = time;
gRoomControls.screenShakeMagnitude = magnitude & 7;
}
+18 -17
View File
@@ -7,6 +7,7 @@
#include "functions.h"
#include "enemy.h"
#include "effects.h"
#include "object.h"
extern u8 gCollidableCount;
extern u8 gUnk_080B3740[];
@@ -30,7 +31,7 @@ extern ColSettings gCollisionMtx[173 * 34];
extern void gDoCollision(void);
u32 sub_08081420(Entity*);
extern void sub_0800449C(Entity*, u32);
extern void SoundReqClipped(Entity*, u32);
s32 sub_08018308(Entity*, Entity*, u32, ColSettings*);
void sub_08079D84(void);
void sub_080180BC(Entity*, Entity*);
@@ -232,7 +233,7 @@ s32 sub_08017874(Entity* a, Entity* b) {
if (newDmg <= 0)
newDmg = 1;
v5 = ModHealth(-newDmg);
sub_0800449C(a, 122);
SoundReqClipped(a, 122);
} else {
v6 = b->damage;
if (b->kind == 8) {
@@ -248,9 +249,9 @@ s32 sub_08017874(Entity* a, Entity* b) {
v5 = a->health - v6;
if (a->kind == 3) {
if ((a->field_0x6c.HALF.HI & 1) != 0)
sub_0800449C(a, 295);
SoundReqClipped(a, 295);
else
sub_0800449C(a, 254);
SoundReqClipped(a, 254);
}
}
if (v5 <= 0) {
@@ -389,11 +390,11 @@ s32 sub_08017B58(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
}
s32 sub_08017BBC(Entity* org, Entity* tgt, u32 direction, ColSettings* settings) {
if ((gPlayerState.flags & (0x1 | 0x80 | 0x400 | 0x1000)) == 0) {
Entity* e = CreateObject(66, 1, 0);
if ((gPlayerState.flags & (PL_BUSY | PL_MINISH | PL_BURNING | 0x1000)) == 0) {
Entity* e = CreateObject(OBJECT_42, 1, 0);
if (e != NULL) {
e->child = org;
gPlayerState.flags |= 0x400;
gPlayerState.flags |= PL_BURNING;
org->animationState = (direction ^ 0x10) >> 2;
}
}
@@ -408,12 +409,12 @@ s32 sub_08017BBC(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
}
s32 sub_08017C40(Entity* org, Entity* tgt, u32 direction, ColSettings* settings) {
if ((gPlayerState.flags & (0x1 | 0x80 | 0x800 | 0x1000)) == 0 && gPlayerState.playerAction == 0) {
if ((gPlayerState.flags & (PL_BUSY | PL_MINISH | PL_FROZEN | 0x1000)) == 0 && gPlayerState.queued_action == 0) {
if (org->action == 1 || org->action == 24) {
tgt->damage = 4;
org->health = sub_08017874(org, tgt);
gPlayerState.flags = 0x800;
gPlayerState.playerAction = 13;
gPlayerState.flags = PL_FROZEN;
gPlayerState.queued_action = PLAYER_FROZEN;
}
}
org->knockbackDuration = 12;
@@ -533,7 +534,7 @@ s32 sub_08017F40(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
if (org == &gPlayerEntity) {
if (sub_08079F8C() &&
#ifdef EU
(gPlayerState.flags & 0x81) == 0 &&
(gPlayerState.flags & (PL_MINISH | PL_BUSY)) == 0 &&
#else
(gPlayerState.flags & PL_MINISH) == 0 &&
#endif
@@ -622,18 +623,18 @@ s32 sub_080180E8(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
s32 sub_08018168(Entity* org, Entity* tgt, u32 direction, ColSettings* settings) {
if (tgt->field_0x43 == 0) {
if (org == &gPlayerEntity) {
if (((sub_08079F8C() != 0) &&
if (sub_08079F8C() &&
#ifdef EU
((gPlayerState.flags & 0x81) == 0)) &&
(gPlayerState.flags & (PL_MINISH | PL_BUSY)) == 0 &&
#else
((gPlayerState.flags & 0x40080) == 0)) &&
(gPlayerState.flags & (PL_MINISH | PL_ROLLING)) == 0 &&
#endif
(gPlayerState.swimState == 0)) {
gPlayerState.swimState == 0) {
gPlayerState.field_0x1a[0] |= 0x80;
gPlayerState.field_0xa |= 0x80;
gPlayerState.flags |= 0x100;
gPlayerState.jumpStatus = 0;
gPlayerEntity.flags &= ~0x80;
COLLISION_OFF(&gPlayerEntity);
gPlayerEntity.spriteRendering.b3 = tgt->spriteRendering.b3;
gPlayerEntity.spriteOrientation.flipY = tgt->spriteOrientation.flipY;
gPlayerEntity.iframes = 0xff;
@@ -749,7 +750,7 @@ s32 sub_08018308(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
}
} else if (org->id == 3) {
if (settings->_9) {
sub_0800449C(tgt, 254);
SoundReqClipped(tgt, 254);
}
} else if (org->id == 5) {
gPlayerEntity.iframes = 0x80;
+1 -1
View File
@@ -213,7 +213,7 @@ void sub_08021AD8(Entity* this) {
}
void sub_08021B64(Entity* this) {
if (gPlayerState.flags & 4) {
if (gPlayerState.flags & PL_DROWNING) {
this->action = 3;
this->z.WORD = 0;
InitializeAnimation(this, 2);
+4 -4
View File
@@ -21,7 +21,7 @@ void sub_08037A14();
extern void sub_0804A4E4(Entity*, Entity*);
extern Entity* sub_08049DF4(u32);
u32 sub_0804A044(Entity*, Entity*, u32);
extern void sub_0800449C(Entity*, u32);
extern void SoundReqClipped(Entity*, u32);
extern void (*const gGibdo[6])(Entity*);
extern void (*const gUnk_080CF2AC[9])(Entity*);
@@ -347,8 +347,8 @@ void sub_08037A58(Entity* this) {
}
void sub_08037ACC(Entity* this) {
gPlayerState.flags &= 0xFFFFFEFF;
gPlayerEntity.flags |= 0x80;
gPlayerState.flags &= ~0x100;
COLLISION_ON(&gPlayerEntity);
gPlayerEntity.iframes = 0x1e;
gPlayerEntity.knockbackDirection = DirectionFromAnimationState(this->animationState);
gPlayerEntity.knockbackDuration = 4;
@@ -359,7 +359,7 @@ void sub_08037B10(Entity* this) {
u32 h;
gPlayerEntity.iframes = 0xc;
h = ModHealth(-8);
sub_0800449C(&gPlayerEntity, 0x7a);
SoundReqClipped(&gPlayerEntity, 0x7a);
if (h == 0) {
sub_08037A58(this);
this->field_0x76.HALF.LO = 0xf0;
+1 -1
View File
@@ -186,7 +186,7 @@ void sub_0802BE18(Entity* this) {
void sub_0802BE48(Entity* this) {
if (!sub_080AEFE0(this)) {
sub_0802C218(this);
sub_08080964(8, 0);
InitScreenShake(8, 0);
} else {
GetNextFrame(this);
sub_0802C1CC(this);
+2 -2
View File
@@ -11,7 +11,7 @@ extern void (*const gUnk_080D0418[6])(Entity*);
extern void (*const gUnk_080D0430[3])(Entity*);
extern void (*const gUnk_080D043C[3])(Entity*);
extern void sub_0800449C(Entity*, u32);
extern void SoundReqClipped(Entity*, u32);
extern void sub_0803CE14(Entity*);
extern void sub_0803CE3C(Entity*);
extern void sub_08079D84(void);
@@ -56,7 +56,7 @@ void sub_0803CD40(Entity* this) {
ModHealth(-2);
sub_0800449C(&gPlayerEntity, 122);
SoundReqClipped(&gPlayerEntity, 122);
sub_08079D84();
sub_0803CE3C(this);
+7 -7
View File
@@ -20,7 +20,7 @@ void sub_0803B798(void);
void sub_0803BA8C(Entity*, u32);
void sub_0803B724(Entity*);
extern void sub_0800449C(Entity*, u32);
extern void SoundReqClipped(Entity*, u32);
void sub_0803A170(Entity*);
void sub_0803A188(Entity*);
@@ -434,7 +434,7 @@ void sub_0803A740(Entity* this) {
this->actionDelay = 10;
this->parent->field_0x7c.BYTES.byte1 |= 0x40;
sub_0803B8E8(this, 0x13);
sub_08080964(10, 0);
InitScreenShake(10, 0);
SoundReq(SFX_158);
}
}
@@ -713,7 +713,7 @@ void sub_0803ACC0(Entity* this) {
this->z.HALF.HI = 0;
this->actionDelay = 0xc;
this->subAction = 3;
sub_08080964(8, 0);
InitScreenShake(8, 0);
SoundReq(SFX_158);
sub_0803B804(this);
}
@@ -735,7 +735,7 @@ void sub_0803ACC0(Entity* this) {
this->z.HALF.HI = 0;
this->action = 0x1a;
this->actionDelay = 0x3c;
sub_08080964(0x1e, 0);
InitScreenShake(0x1e, 0);
SoundReq(SFX_158);
sub_0803B804(this);
return;
@@ -859,7 +859,7 @@ void sub_0803AFE0(Entity* this) {
this->actionDelay = 0xf0;
*(u8*)&this->cutsceneBeh = 3;
this->z.HALF.HI = 0;
sub_08080964(0xa0, 0);
InitScreenShake(0xa0, 0);
SoundReq(SFX_158);
}
}
@@ -931,7 +931,7 @@ void sub_0803B144(Entity* this) {
this->action = 0x2a;
InitializeAnimation(this, 0x16);
sub_0803B8E8(this, 0x14);
sub_08080964(8, 0);
InitScreenShake(8, 0);
}
}
@@ -1238,7 +1238,7 @@ void sub_0803B798(void) {
void sub_0803B804(Entity* this) {
gPlayerEntity.iframes = 30;
ModHealth(-4);
sub_0800449C(&gPlayerEntity, 0x7a);
SoundReqClipped(&gPlayerEntity, 0x7a);
}
void sub_0803B824(Entity* this) {
+1 -1
View File
@@ -320,7 +320,7 @@ void sub_080342C8(Entity* this) {
this->field_0x7c.HALF.HI = 0x708;
this->field_0x7c.BYTES.byte1 = 0;
this->field_0x80.HALF.HI = 0;
sub_08080964(0x1e, 0);
InitScreenShake(0x1e, 0);
SoundReq(SFX_1A1);
}
}
+1 -1
View File
@@ -195,7 +195,7 @@ void sub_08034F70(Entity* this) {
void sub_08034FA0(Entity* this) {
if (0 < this->iframes) {
this->child->iframes = this->iframes;
sub_08080964(0xc, 1);
InitScreenShake(0xc, 1);
}
switch (this->type2) {
case 0:
+4 -4
View File
@@ -1,7 +1,7 @@
#include "enemy.h"
#include "functions.h"
extern void sub_0800449C(Entity*, u32);
extern void SoundReqClipped(Entity*, u32);
extern bool32 sub_08023A38(u32);
extern void sub_08023990(Entity*, u32, u32);
extern void sub_08023A88(Entity*, u32);
@@ -263,7 +263,7 @@ void sub_0802351C(Entity* this) {
if (this->field_0x7c.BYTES.byte3 == 0) {
if (this->type2 == 0) {
gPlayerEntity.animationState = this->animationState & 7;
gPlayerState.flags |= 0x80000;
gPlayerState.flags |= PL_TRAPPED;
PositionRelative(this, &gPlayerEntity, 0, gUnk_080CBC90[this->animationState & 7] << 0x10);
gPlayerEntity.spriteOffsetY = -gUnk_080CBC90[this->animationState & 7];
}
@@ -398,14 +398,14 @@ void sub_08023894(Entity* this) {
this->parent->field_0x7c.BYTES.byte3 = 1;
InitializeAnimation(this, this->animationState);
if (this->parent->type2 == 0) {
gPlayerState.flags |= 0x200000;
gPlayerState.flags |= PL_RELEASED;
gPlayerEntity.x.HALF.HI = this->x.HALF.HI;
gPlayerEntity.y.HALF.HI = this->y.HALF.HI;
gPlayerEntity.direction = DirectionRoundUp(GetFacingDirection(*(Entity**)&this->field_0x74, this));
gPlayerEntity.animationState = gPlayerEntity.direction >> 2;
gPlayerEntity.iframes = 12;
ModHealth(-0x10);
sub_0800449C(&gPlayerEntity, 0x7a);
SoundReqClipped(&gPlayerEntity, 0x7a);
}
}
}
+3 -3
View File
@@ -811,7 +811,7 @@ void OctorokBoss_Action1_ChargeAttack(Entity* this) {
this->knockbackDirection = this->direction ^ 0x10;
GET_HELPER(this)->fallingStonesTimer += 0x3c;
OctorokBoss_SetAttackTimer(this);
sub_08080964(0x3c, 0);
InitScreenShake(0x3c, 0);
SoundReq(SFX_158);
SoundReq(SFX_14C);
}
@@ -946,7 +946,7 @@ void OctorokBoss_ExecuteAttackVacuum(Entity* this) {
}
}
} else {
gPlayerState.flags &= 0xfffff7ff;
gPlayerState.flags &= ~PL_FROZEN;
}
}
}
@@ -1077,7 +1077,7 @@ void OctorokBoss_Burning_SubAction1(Entity* this) {
this->field_0x46 = 0x200;
this->knockbackDirection = this->direction ^ 0x10;
GET_HELPER(this)->fallingStonesTimer += 0x1e;
sub_08080964(0x1e, 0);
InitScreenShake(0x1e, 0);
SoundReq(SFX_158);
SoundReq(SFX_14C);
}
+5 -5
View File
@@ -5,7 +5,7 @@
#include "save.h"
extern u32 sub_080002E0(u16, u32);
extern void sub_0800449C(Entity*, u32);
extern void SoundReqClipped(Entity*, u32);
extern u32 sub_08049F1C(Entity*, Entity*, u32);
extern u32 PlayerInRange(Entity*, u32, u32);
extern void sub_080AEFB4(Entity*);
@@ -809,7 +809,7 @@ NONMATCH("asm/non_matching/pesto/sub_08024E4C.inc", void sub_08024E4C(Entity* th
ResetPlayer();
gPlayerState.flags |= 0x100;
gPlayerState.field_0xa |= 0x80;
gPlayerState.playerAction = 0xe;
gPlayerState.queued_action = PLAYER_0807204C;
gPlayerState.field_0x38 = 0x14;
gPlayerState.field_0x39 = 1;
*(u8*)&gPlayerState.field_0x3a = 0;
@@ -821,7 +821,7 @@ NONMATCH("asm/non_matching/pesto/sub_08024E4C.inc", void sub_08024E4C(Entity* th
this->field_0x86.HALF.HI++;
player->iframes = 8;
ModHealth(-2);
sub_0800449C(player, 0x7a);
SoundReqClipped(player, 0x7a);
}
}
}
@@ -830,10 +830,10 @@ END_NONMATCH
void sub_08024F50(Entity* this) {
gPlayerState.field_0xa = 0;
gPlayerState.flags &= 0xfffffeff;
gPlayerState.flags &= ~0x100;
CopyPosition(this, &gPlayerEntity);
gPlayerEntity.action = 1;
gPlayerEntity.flags |= 0x80;
COLLISION_ON(&gPlayerEntity);
gPlayerEntity.iframes = -0x3c;
gPlayerEntity.direction = gPlayerEntity.animationState << 2;
gPlayerEntity.speed = 0;
+1 -1
View File
@@ -233,7 +233,7 @@ void sub_080296C8(Entity* this) {
void sub_080296D8(Entity* this) {
gPlayerState.jumpStatus = 0x41;
gPlayerState.flags &= 0xffffffef;
gPlayerState.flags &= ~0x10;
gPlayerEntity.flags |= 0x80;
gPlayerEntity.zVelocity = 0x18000;
gPlayerEntity.iframes = 0xa6;
+1 -1
View File
@@ -662,7 +662,7 @@ void VaatiRebornEnemyType1PreAction(Entity* this) {
}
if (0 < this->iframes) {
SoundReq(0x127);
sub_08080964(0xc, 1);
InitScreenShake(0xc, 1);
if (this->actionDelay == 0)
this->actionDelay = 0x48;
}
+4 -4
View File
@@ -266,7 +266,7 @@ void VaatiTransfiguredType0Action3(Entity* this) {
this->actionDelay = 0xc0;
COLLISION_ON(this);
SoundReq(SFX_14C);
sub_08080964(0x14, 4);
InitScreenShake(0x14, 4);
break;
case 1:
if (--this->actionDelay == 0) {
@@ -321,7 +321,7 @@ void VaatiTransfiguredType0Action3(Entity* this) {
this->field_0x86.HALF.LO = 0;
sub_080408EC(this);
SoundReq(SFX_14C);
sub_08080964(0x1e, 4);
InitScreenShake(0x1e, 4);
} else {
if (this->field_0xf != 0) {
if (--this->field_0xf == 0) {
@@ -399,7 +399,7 @@ void VaatiTransfiguredType0Action4(Entity* this) {
this->field_0xf = 1;
}
SoundReq(SFX_14C);
sub_08080964(0x1e, 4);
InitScreenShake(0x1e, 4);
break;
case 2:
if (--this->actionDelay == 0) {
@@ -1069,7 +1069,7 @@ void sub_080409B0(Entity* this) {
}
} else {
if (((this->bitfield & 0x80) != 0) && (0 < this->iframes)) {
sub_08080964(0xc, 1);
InitScreenShake(0xc, 1);
SoundReq(SFX_BOSS_HIT);
}
if ((this->bitfield == 0x8a) && (gPlayerState.field_0xa0[0] == 5)) {
+2 -2
View File
@@ -475,7 +475,7 @@ void VaatiWrathType0ActionB(Entity* this) {
this->actionDelay = 0xf0;
this->health = 8;
this->hitType = 0x38;
sub_08080964(0x14, 0);
InitScreenShake(0x14, 0);
InitAnimationForceUpdate(this, 6);
InitializeAnimation(((VaatiWrathHeapStruct*)this->myHeap)->type2, 0x16);
}
@@ -709,7 +709,7 @@ void sub_08041E78(Entity* this) {
fx->x.HALF.HI += *temp++;
fx->y.HALF.HI += *temp;
fx->spritePriority.b0 = 3;
sub_08080964(4, 0);
InitScreenShake(4, 0);
}
}
}
+1 -1
View File
@@ -32,7 +32,7 @@ void sub_08033564(Entity* this) {
this->spriteSettings.draw = FALSE;
COLLISION_OFF(this);
this->field_0x7c.HALF.LO = 0x27c;
gPlayerState.flags |= 0x4000;
gPlayerState.flags |= PL_DRUGGED;
gSave.stats.effect = this->type + 1;
gSave.stats.effectTimer = 600;
if (this->type == 0) {
+2 -1
View File
@@ -1,6 +1,7 @@
#include "entity.h"
#include "definitions.h"
#include "functions.h"
#include "object.h"
extern EnemyDefinition gEnemyDefinitions[];
@@ -46,7 +47,7 @@ bool32 EnemyInit(Entity* this) {
if ((this->field_0x6c.HALF.HI & 0x20) != 0) {
u32 uVar4 = gUnk_080D3E74[this->id >> 3] >> ((this->id & 7) << 1) & 3;
if (uVar4 != 0) {
Entity* object = CreateObject(0xa9, uVar4 - 1, 0);
Entity* object = CreateObject(OBJECT_A9, uVar4 - 1, 0);
if (object != NULL) {
object->actionDelay = this->flags;
object->field_0xf = this->spriteSettings.draw;
+15 -15
View File
@@ -21,7 +21,7 @@ extern u16* gUnk_0200B650;
extern u8 gUpdateVisibleTiles;
extern u8 gUnk_03003DF0[];
extern u8 gUnk_03003BE0;
extern Entity* gUnk_03004040[3];
extern Entity* gPlayerClones[3];
extern u16 gUnk_080B2CD8[];
extern u32 gUnk_03000FBC;
@@ -181,16 +181,16 @@ void WaitForNextFrame(void) {
void PlayerUpdate(Entity* this) {
if (gSave.stats.effect != 0)
gPlayerState.flags |= 0x4000;
gPlayerState.flags |= PL_DRUGGED;
else
gPlayerState.flags &= ~0x4000;
gPlayerState.flags &= ~PL_DRUGGED;
if (CheckDontUpdate(this) == 0) {
if ((gPlayerState.flags & 0x80000) != 0) {
if (gPlayerState.flags & PL_TRAPPED) {
sub_08077B20();
if ((gPlayerState.flags & 0x200000) != 0) {
gPlayerState.playerAction = PLAYER_ROLL;
gPlayerState.flags &= ~0x80000;
if (gPlayerState.flags & PL_RELEASED) {
gPlayerState.queued_action = PLAYER_ROLL;
gPlayerState.flags &= ~PL_TRAPPED;
gPlayerState.hurtBlinkSpeed = 240;
COLLISION_ON(this);
} else {
@@ -223,10 +223,10 @@ void HandlePlayerLife(Entity* this) {
if ((gPlayerEntity.bitfield & 0x80) && (gPlayerEntity.iframes > 0))
SoundReq(SFX_86);
gPlayerState.flags &= ~(0x2000000 | 0x200);
gPlayerState.flags &= ~(0x2000000 | PL_FALLING);
if (gPlayerState.flags & PL_BURNING)
ResetPlayer();
if ((gPlayerState.flags & 0x400000) && !gPlayerState.field_0xa0[0])
if ((gPlayerState.flags & PL_CLONING) && !gPlayerState.field_0xa0[0])
sub_0807A108();
if (sub_08079B24() == 0)
sub_08079708(this);
@@ -300,7 +300,7 @@ void sub_080171F0(void) {
gPlayerState.flags &= ~2;
sub_080028E0(&gPlayerEntity);
if (gPlayerState.flags & 0x400000)
if (gPlayerState.flags & PL_CLONING)
gUnk_0200AF00.filler25[10] = 1;
sub_08078180();
@@ -315,13 +315,13 @@ void sub_080171F0(void) {
gPlayerState.field_0x3f = 0;
sub_0807B0C8();
if (gPlayerState.flags & 0x400000)
gUnk_03004040[0]->spriteOffsetY = gUnk_03004040[1]->spriteOffsetY = gUnk_03004040[2]->spriteOffsetY = 0;
if (gPlayerState.flags & PL_CLONING)
gPlayerClones[0]->spriteOffsetY = gPlayerClones[1]->spriteOffsetY = gPlayerClones[2]->spriteOffsetY = 0;
if (gPlayerEntity.action == PLAYER_08072F34)
gPlayerState.flags |= 0x20000000;
if (gPlayerEntity.action == PLAYER_CLIMB)
gPlayerState.flags |= PL_CLIMBING;
else
gPlayerState.flags &= ~0x20000000;
gPlayerState.flags &= ~PL_CLIMBING;
sub_0807A8D8(&gPlayerEntity);
if (gPlayerState.jumpStatus & 0xc0)
+4
View File
@@ -10,3 +10,7 @@ void (*const gItemFunctions[])(ItemBehavior*, u32) = {
ItemPegasusBoots, ItemDebug, ItemOcarina, ItemDebug, ItemDebug, ItemDebug, ItemTryPickupObject,
ItemJarEmpty, ItemJarEmpty, ItemJarEmpty, ItemJarEmpty,
};
void sub_080752E8(ItemBehavior* behavior, u32 arg1) {
gItemFunctions[behavior->behaviorID](behavior, arg1);
}
+2 -2
View File
@@ -3,7 +3,7 @@
extern void (*const gUnk_0811BD78[])(ItemBehavior*, u32);
extern void sub_08078F60(void);
extern void ResetPlayerVelocity(void);
void ItemBoomerang(ItemBehavior* this, u32 arg1) {
gUnk_0811BD78[this->stateID](this, arg1);
@@ -24,7 +24,7 @@ void sub_08075D2C(ItemBehavior* this, u32 arg1) {
void sub_08075D88(ItemBehavior* this, u32 arg1) {
if ((gPlayerState.field_0x3[1] & 0x80) == 0) {
if (((this->behaviorID == 0xc) && ((gPlayerState.field_0xa & 0x80) != 0)) && ((this->field_0x5[9] & 2) != 0)) {
sub_08078F60();
ResetPlayerVelocity();
return;
}
UpdateItemAnim(this);
+9 -9
View File
@@ -1,6 +1,7 @@
#include "item.h"
#include "functions.h"
#include "audio.h"
#include "object.h"
extern void (*const gUnk_0811BD68[])(ItemBehavior*, u32);
@@ -20,22 +21,21 @@ void sub_08075A0C(ItemBehavior* this, u32 arg1) {
u32 itemSlot;
s8* tmp;
itemSlot = IsItemEquipped(this->behaviorID);
if (gPlayerState.heldObject != 0 || gPlayerState.playerAction == 0x18 || gPlayerState.jumpStatus != 0 ||
if (gPlayerState.heldObject != 0 || gPlayerState.queued_action == PLAYER_ROLL || gPlayerState.jumpStatus != 0 ||
gPlayerState.item != NULL || (gPlayerState.flags & PL_MINISH) != 0) {
ForceEquipItem(0xf, itemSlot);
gPlayerState.flags &= 0xff7fffff;
gPlayerState.flags &= ~PL_USE_LANTERN;
ForceEquipItem(0xf, itemSlot);
sub_08077E78(this, arg1);
} else {
this->field_0x5[4] |= 0x80;
sub_08077D38(this, arg1);
sub_08077BD4(this);
sub_0806F948(&gPlayerEntity);
this->behaviorID = 0x10;
ForceEquipItem(0x10, itemSlot);
ForceEquipItem(ITEM_LANTERN_ON, itemSlot);
tmp = &gUnk_08126EEC[gPlayerEntity.animationState & 6];
object = CreateObjectWithParent(&gPlayerEntity, 0x45, 1, 0);
object = CreateObjectWithParent(&gPlayerEntity, OBJECT_45, 1, 0);
if (object != NULL) {
object->spriteVramOffset = gPlayerEntity.spriteVramOffset;
object->x.HALF.HI = tmp[0] + object->x.HALF.HI;
@@ -54,7 +54,7 @@ void sub_08075ADC(ItemBehavior* this, u32 arg1) {
sub_08079D48() == 0) {
this->field_0xf = 0;
this->stateID += 1;
gPlayerState.flags |= 0x800000;
gPlayerState.flags |= PL_USE_LANTERN;
bVar1 = 8 >> arg1;
gPlayerState.field_0x3[1] = gPlayerState.field_0x3[1] & ~((bVar1 << 4) | bVar1);
bVar1 = ~bVar1;
@@ -77,11 +77,11 @@ void sub_08075B54(ItemBehavior* this, u32 arg1) {
itemSlot = IsItemEquipped(this->behaviorID);
if (!(((sub_08077F10(this) == 0) && (itemSlot < 2)) || (gPlayerState.jumpStatus != 0))) {
ForceEquipItem(0xf, itemSlot);
gPlayerState.flags &= 0xff7fffff;
gPlayerState.flags &= ~PL_USE_LANTERN;
sub_08077E78(this, arg1);
SoundReq(SFX_ITEM_LANTERN_OFF);
} else {
if (((gPlayerState.playerAction != 0x18) && (gPlayerEntity.frameIndex < 0x37)) &&
if (((gPlayerState.queued_action != PLAYER_ROLL) && (gPlayerEntity.frameIndex < 0x37)) &&
((u16)gPlayerEntity.spriteIndex == 6)) {
tmp = &gUnk_08126EEC[gPlayerEntity.animationState & 6];
@@ -91,7 +91,7 @@ void sub_08075B54(ItemBehavior* this, u32 arg1) {
this->field_0xf = 0xf;
this->stateID += 1;
gPlayerEntity.field_0x7a.HWORD = 2;
object = CreateObjectWithParent(&gPlayerEntity, 0x45, 1, 0);
object = CreateObjectWithParent(&gPlayerEntity, OBJECT_45, 1, 0);
if (object != NULL) {
object->spriteVramOffset = gPlayerEntity.spriteVramOffset;
object->x.HALF.HI = tmp[0] + object->x.HALF.HI;
+5 -5
View File
@@ -4,7 +4,7 @@
extern void (*const gOcarinaStates[4])(ItemBehavior*, u32);
extern void sub_08078F60(void);
extern void ResetPlayerVelocity(void);
extern void SetPlayerEventPriority(void);
extern void CreateBird(void);
@@ -16,7 +16,7 @@ void ItemOcarina(ItemBehavior* this, u32 arg1) {
}
void OcarinaUse(ItemBehavior* this, u32 arg1) {
if (gPlayerState.playerAction == 0x18) {
if (gPlayerState.queued_action == PLAYER_ROLL) {
sub_08077E78(this, arg1);
} else {
this->field_0x5[4] |= 0xf;
@@ -24,12 +24,12 @@ void OcarinaUse(ItemBehavior* this, u32 arg1) {
gPlayerEntity.spriteSettings.flipX = 0;
gPlayerEntity.flags &= 0x7f;
gPlayerEntity.field_0x7a.HWORD = 2;
gPlayerState.flags |= 0x10000000;
gPlayerState.flags |= PL_USE_OCARINA;
gPlayerState.field_0x27[0] = -1;
gUnk_02034490[0] = 1;
gPlayerState.field_0xa = (8 >> arg1) | gPlayerState.field_0xa;
gPlayerState.keepFacing = (8 >> arg1) | gPlayerState.keepFacing;
sub_08078F60();
ResetPlayerVelocity();
sub_08077D38(this, arg1);
SoundReq(SFX_216);
SetPlayerEventPriority();
@@ -41,7 +41,7 @@ NONMATCH("asm/non_matching/ocarina/OcarinaUpdate.inc", void OcarinaUpdate(ItemBe
UpdateItemAnim(this);
if ((this->field_0x5[9] & 0x80) != 0) {
gPlayerEntity.flags |= 0x80;
gPlayerState.flags &= 0xefffffff;
gPlayerState.flags &= ~PL_USE_OCARINA;
gPlayerState.field_0x27[0] = 0;
gUnk_02034490[0] = 0;
CreateBird();
+1 -1
View File
@@ -24,7 +24,7 @@ void ItemPegasusBoots(ItemBehavior* this, u32 arg1) {
SoundReq(SFX_PLY_LAND);
}
if (((gPlayerState.flags & PL_MINISH) == 0) && ((this->field_0x5[2] & 7) == 0)) {
if (gPlayerState.floor_type == SURFACE_11) {
if (gPlayerState.floor_type == SURFACE_SWAMP) {
if (gPlayerEntity.spriteOffsetY == 0) {
CreateFx(&gPlayerEntity, FX_GREEN_SPLASH, 0);
}
+5 -5
View File
@@ -72,9 +72,9 @@ void sub_0807564C(ItemBehavior* this, u32 arg1) {
void sub_08075694(ItemBehavior* this, u32 arg1) {
this->field_0x5[2] = 1;
if ((gPlayerState.flags & 0x8000000) != 0) {
gPlayerState.flags &= 0xf7ffffff;
gPlayerState.flags &= 0xfffbffff;
if (gPlayerState.flags & PL_SWORD_THRUST) {
gPlayerState.flags &= ~PL_SWORD_THRUST;
gPlayerState.flags &= ~PL_ROLLING;
sub_08077DF4(this, 300);
} else {
gPlayerState.field_0xab = 1;
@@ -86,7 +86,7 @@ void sub_08075694(ItemBehavior* this, u32 arg1) {
gPlayerEntity.hurtType = 0x1e;
gPlayerState.field_0x1a[1] |= 0x40;
gPlayerState.field_0x1a[1] &= 0xdf;
if ((gPlayerState.field_0xa0[0] == 0x04) && ((gPlayerState.flags & 0x400000) == 0)) {
if ((gPlayerState.field_0xa0[0] == 0x04) && ((gPlayerState.flags & PL_CLONING) == 0)) {
gPlayerState.field_0xa0[0] = 0x01;
sub_0807A108();
}
@@ -124,7 +124,7 @@ void sub_080759B8(ItemBehavior* this, u32 arg1) {
if ((gPlayerState.flags & PL_MINISH) == 0) {
gPlayerEntity.hurtType = 0;
}
gPlayerState.flags &= 0xf7ffffff;
gPlayerState.flags &= ~PL_SWORD_THRUST;
gPlayerState.field_0x1a[1] = 0;
gPlayerState.item = NULL;
sub_08077E78(this, arg1);
+2 -2
View File
@@ -315,8 +315,8 @@ void sub_0805A76C(Manager15* this) {
}
void sub_0805A7E4(Manager15* this) {
if (gPlayerState.playerAction != PLAYER_WARP) {
gPlayerState.playerAction = PLAYER_WARP;
if (gPlayerState.queued_action != PLAYER_WARP) {
gPlayerState.queued_action = PLAYER_WARP;
gPlayerState.field_0x38 = 0;
gPlayerState.field_0x39 = 0;
}
+1 -1
View File
@@ -137,7 +137,7 @@ void sub_0805B168(Manager1A* this) {
u32 sub_0805B1CC(Manager1A* this) {
u32 re = 0;
if (CheckPlayerProximity(this->unk_20, this->unk_22, this->unk_24, this->unk_26)) {
if ((gPlayerState.flags & 0x4) && (gPlayerState.flags & 0x1)) {
if ((gPlayerState.flags & PL_DROWNING) && (gPlayerState.flags & PL_BUSY)) {
gPlayerState.flags |= 0x8000;
} else if (gPlayerState.flags & 0x8000) {
re = 1;
+3 -3
View File
@@ -39,11 +39,11 @@ void sub_0805DBF0(Manager34* this) {
sub_0805DC70();
} else {
if (this->field_0x20 == 0x78) {
sub_08080964(0x78, 2);
InitScreenShake(0x78, 2);
} else if (this->field_0x20 == 0xd2) {
sub_08080964(0x5a, 1);
InitScreenShake(0x5a, 1);
} else if (this->field_0x20 == 0x12c) {
sub_08080964(0x5a, 0);
InitScreenShake(0x5a, 0);
}
if (this->field_0x20 < 0x78) {
+1 -1
View File
@@ -117,7 +117,7 @@ static u32 PlayerStateValid(ManagerA* this) {
static void sub_08058514(ManagerA* this) {
switch (this->manager.unk_0d) {
case 1:
if (gPlayerState.flags & (PL_BUSY | PL_DROWNING | PL_USE_PORTAL | 0x1210))
if (gPlayerState.flags & (PL_BUSY | PL_DROWNING | PL_USE_PORTAL | PL_FALLING | 0x1010))
return;
if (gPlayerEntity.z.HALF.HI != 0)
return;
+1 -1
View File
@@ -156,7 +156,7 @@ void sub_08058A04(ManagerC* this) {
s32 tmp2 = gPlayerEntity.y.HALF.HI - gRoomControls.roomOriginY;
if ((this->unk_20 - 0x118 < 0xDu) && CheckGlobalFlag(LV1TARU_OPEN) && (tmp - 0x6d < 0x17u) &&
(tmp2 - 0x45 < 0x17u) && (gPlayerEntity.z.HALF.HI == 0)) {
gPlayerState.playerAction = 3;
gPlayerState.queued_action = PLAYER_FALL;
gPlayerState.field_0x38 = 0;
gPlayerEntity.x.HALF.HI = gRoomControls.roomOriginX + 0x78;
gPlayerEntity.y.HALF.HI = gRoomControls.roomOriginY + 0x50;
+1 -1
View File
@@ -15,7 +15,7 @@ void Carlov(Entity* this) {
if ((this->frame & 0x10) != 0) {
this->frame = this->frame & 0xef;
EnqueueSFX(0x104);
sub_08080964(0x10, 0);
InitScreenShake(0x10, 0);
}
if ((this->frame & 0x20) != 0) {
this->frame = this->frame & 0xdf;
+1 -1
View File
@@ -97,7 +97,7 @@ void sub_08067534(Entity* this) {
}
}
EnqueueSFX(0x14c);
sub_08080964(0x28, 4);
InitScreenShake(0x28, 4);
}
void sub_0806757C(Entity* this) {
+1 -1
View File
@@ -131,7 +131,7 @@ void sub_0806A550(Entity* this) {
} else {
if (this->frame == 1) {
this->frame = 0;
sub_08080964(8, 2);
InitScreenShake(8, 2);
gActiveScriptInfo.unk_00 |= 0x100;
SoundReq(SFX_CHEST_OPEN);
}
+1 -1
View File
@@ -85,7 +85,7 @@ void sub_08066D94(Entity* this) {
DeleteThisEntity();
}
void sub_08066DE4(Entity* this) {
void SetZeldaFollowTarget(Entity* this) {
Entity* pEVar1;
pEVar1 = DeepFindEntityByID(7, 0x2E);
+2 -2
View File
@@ -1,6 +1,6 @@
#include "object.h"
extern void sub_0800449C(Entity*, u32);
extern void SoundReqClipped(Entity*, u32);
extern u32 sub_0806FC80(Entity*, Entity*, s32);
extern void sub_0809CDF0(Entity*);
@@ -61,7 +61,7 @@ void sub_0809CD0C(Entity* this) {
sub_0806FC80(this, &gPlayerEntity, 4)) {
this->field_0xf++;
ModHealth(-2);
sub_0800449C(&gPlayerEntity, 0x7a);
SoundReqClipped(&gPlayerEntity, 0x7a);
gPlayerEntity.iframes = 16;
gPlayerEntity.knockbackDirection = 16;
gPlayerEntity.knockbackDuration = 12;
+1 -1
View File
@@ -67,7 +67,7 @@ void sub_08098DC4(Entity* this) {
sub_08004542(&gPlayerEntity);
gPlayerEntity.collisionLayer = 1;
ResolveEntityOnTop(this, &gPlayerEntity);
gPlayerState.playerAction = 0x1f;
gPlayerState.queued_action = PLAYER_PARACHUTE;
gPlayerState.field_0x34[4] = 1;
gPlayerState.field_0x34[5] = this->type2;
this->action = 4;
+2 -2
View File
@@ -92,8 +92,8 @@ void sub_0809B4A8(Entity* this) {
this->direction = 16;
gPlayerState.pushedObject = 0x9e;
gPlayerState.playerAction = 5;
gPlayerState.flags |= 1;
gPlayerState.queued_action = PLAYER_PUSH;
gPlayerState.flags |= PL_BUSY;
gPlayerEntity.x.HALF.LO = 0;
gPlayerEntity.y.HALF.LO = 0;
+10 -10
View File
@@ -138,7 +138,7 @@ u32 sub_08081D28(Entity* this) {
}
extern u32 sub_080002E0(u32, u32);
extern Entity* gUnk_03004040[3];
extern Entity* gPlayerClones[3];
u32 sub_08081E0C(Entity*);
Entity* sub_08081D74(Entity* this) {
@@ -152,13 +152,13 @@ Entity* sub_08081D74(Entity* this) {
ent = &gPlayerEntity;
}
} else {
if (gPlayerState.flags & 0x400000) {
if (EntityInRectRadius(this, gUnk_03004040[0], 5, 6)) {
ent = gUnk_03004040[0];
} else if (EntityInRectRadius(this, gUnk_03004040[1], 5, 6)) {
ent = gUnk_03004040[1];
} else if (EntityInRectRadius(this, gUnk_03004040[2], 5, 6)) {
ent = gUnk_03004040[2];
if (gPlayerState.flags & PL_CLONING) {
if (EntityInRectRadius(this, gPlayerClones[0], 5, 6)) {
ent = gPlayerClones[0];
} else if (EntityInRectRadius(this, gPlayerClones[1], 5, 6)) {
ent = gPlayerClones[1];
} else if (EntityInRectRadius(this, gPlayerClones[2], 5, 6)) {
ent = gPlayerClones[2];
}
}
}
@@ -272,8 +272,8 @@ void sub_08081FF8(Entity* this) {
direction = GetFacingDirection(this->child, this);
sub_080044AE(this->child, 0x200, direction);
for (i = 0; i < 3; i++) {
if (gUnk_03004040[i]) {
sub_080044AE(gUnk_03004040[i], 0x200, direction);
if (gPlayerClones[i]) {
sub_080044AE(gPlayerClones[i], 0x200, direction);
}
}
}
-1
View File
@@ -17,7 +17,6 @@ void sub_080813BC(Entity*);
void sub_080810FC(Entity*);
bool32 CheckShouldPlayItemGetCutscene(Entity*);
extern u32 sub_080002D0(Entity*);
extern u32 sub_080177A0(Entity*, Entity*);
extern void GiveItem(u32, u32);
+1 -1
View File
@@ -108,7 +108,7 @@ void sub_0808C01C(Entity* this, u32 r1) {
type = 2;
gArea.curPortalType = type;
if (r1 == 1) {
if (((gPlayerState.flags & 0x20) != 0) && (gPlayerState.jumpStatus == 0)) {
if ((gPlayerState.flags & PL_USE_PORTAL) && (gPlayerState.jumpStatus == 0)) {
gArea.field_0x18 = 2;
} else {
if (sub_08057810() != 0) {
+11 -12
View File
@@ -55,7 +55,6 @@ void sub_080916EC(Entity* this) {
}
void sub_080917DC(Entity* this) {
if ((this->bitfield & 0x7f) == 0x1d) {
this->zVelocity = 0x2a000;
this->action = 7;
@@ -63,8 +62,8 @@ void sub_080917DC(Entity* this) {
SoundReq(SFX_13B);
} else {
if (sub_0800445C(this) != 0) {
if (((gPlayerState.flags & 0x40080) == 0) && (gPlayerState.field_0x1c == 0) &&
(gPlayerState.heldObject == 0) && (gPlayerState.jumpStatus == 0)) {
if (!((gPlayerState.flags & (PL_MINISH | PL_ROLLING)) || gPlayerState.field_0x1c ||
gPlayerState.heldObject || gPlayerState.jumpStatus)) {
this->actionDelay++;
} else {
this->actionDelay = 0;
@@ -73,13 +72,13 @@ void sub_080917DC(Entity* this) {
this->actionDelay = 0;
}
if (this->type2 == 0) {
if (8 < this->actionDelay) {
this->action = this->action + 1;
if (this->actionDelay > 8) {
this->action++;
gPlayerState.jumpStatus = 0x81;
gPlayerState.flags |= 0x4000000;
gPlayerState.flags |= PL_MINECART;
gPlayerEntity.zVelocity = 0x20000;
gPlayerEntity.speed = 0x100;
gPlayerEntity.flags &= 0x7f;
gPlayerEntity.flags &= ~PL_MINISH;
ResetPlayer();
sub_0807A108();
SoundReq(SFX_PLY_JUMP);
@@ -95,11 +94,11 @@ void sub_080918A4(Entity* this) {
gPlayerEntity.x.HALF.HI = this->x.HALF.HI;
gPlayerEntity.y.HALF.HI = this->y.HALF.HI;
if (gPlayerEntity.z.HALF.HI > -0x10) {
if ((s32)gPlayerEntity.zVelocity > -1) {
if (gPlayerEntity.zVelocity >= 0) {
return;
}
gPlayerEntity.animationState = this->animationState << 1;
gPlayerState.flags = (gPlayerState.flags ^ 0x4000000) | 0x1000;
gPlayerState.flags = (gPlayerState.flags ^ PL_MINECART) | 0x1000;
this->action++;
this->field_0xf = 1;
this->flags |= ENT_20;
@@ -158,7 +157,7 @@ void sub_080919AC(Entity* this) {
gUnk_081223C8[this->animationState * 2 + 1]);
iVar2 = sub_08007DD6(uVar3, gUnk_081223D8[this->animationState]);
if (iVar2 == 0) {
this->direction = this->direction ^ 0x10;
this->direction = DirectionTurnAround(this->direction);
this->animationState = this->animationState ^ 2;
} else {
switch (uVar3) {
@@ -171,12 +170,12 @@ void sub_080919AC(Entity* this) {
this->action = 6;
sub_08017744(this);
gPlayerState.jumpStatus = 0x41;
gPlayerState.flags = (gPlayerState.flags ^ 0x1000) | 0x4000000;
gPlayerState.flags = (gPlayerState.flags ^ 0x1000) | PL_MINECART;
gPlayerEntity.zVelocity = 0x20000;
gPlayerEntity.speed = 0x200;
gPlayerEntity.animationState = this->animationState << 1;
gPlayerEntity.direction = this->direction;
gPlayerEntity.flags |= 0x80;
gPlayerEntity.flags |= PL_MINISH;
sub_08004168(this);
InitAnimationForceUpdate(this, this->animationState + 0xc);
SoundReq(SFX_PLY_VO4);
+1 -1
View File
@@ -398,7 +398,7 @@ void sub_08094FA8(Object6AEntity* this) {
super->interactType = 0;
super->action = 2;
sub_080788E0(super);
gPlayerState.playerAction = 12;
gPlayerState.queued_action = PLAYER_EMPTYBOTTLE;
gPlayerState.field_0x38 = 54;
#ifndef EU
SetPlayerControl(2);
+1 -1
View File
@@ -69,7 +69,7 @@ void nullsub_534(Entity* this) {
void sub_08099ECC(Entity* this) {
this->subAction = 1;
CopyPosition(this, &gPlayerEntity);
gPlayerState.playerAction = 3;
gPlayerState.queued_action = PLAYER_FALL;
gPlayerState.field_0x34[4] = 0;
gPlayerState.flags |= 0x8000;
}
+3 -3
View File
@@ -351,7 +351,7 @@ void InitializePlayer(void) {
pl = &gPlayerEntity;
gRoomControls.cameraTarget = pl;
gPlayerState.playerAction = sPlayerSpawnStates[gScreenTransition.player_status.spawn_type];
gPlayerState.queued_action = sPlayerSpawnStates[gScreenTransition.player_status.spawn_type];
if (!CheckGlobalFlag(EZERO_1ST)) {
gPlayerState.flags |= PL_NO_CAP;
}
@@ -607,7 +607,7 @@ static u32 StairsAreValid(void) {
for (i = sStairTypes; i[0] != 0; i += 2) {
if (tgt == i[0]) {
gPlayerState.playerAction = 30;
gPlayerState.queued_action = PLAYER_USEENTRANCE;
gPlayerState.field_0x38 = 0;
gPlayerState.field_0x39 = i[1];
if (!gScreenTransition.player_status.spawn_type)
@@ -666,7 +666,7 @@ u32 sub_08052B24(void) {
gUnk_0200AF00.filler0[1])
return 0;
if ((gPlayerState.flags & 0x118) || (gPlayerState.framestate_last > tmp) || gPlayerState.item ||
if ((gPlayerState.flags & (PL_NO_CAP | 0x110)) || (gPlayerState.framestate_last > tmp) || gPlayerState.item ||
gPlayerEntity.field_0x7a.HWORD)
return 0;
+1634 -66
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -4,7 +4,7 @@
#include "player.h"
#include "effects.h"
extern void sub_0800449C(Entity*, u32);
extern void SoundReqClipped(Entity*, u32);
extern void sub_08079D84(void);
extern void (*const LakituCloudProjectile_Functions[])(Entity*);
@@ -44,7 +44,7 @@ void LakituCloudProjectile_SubAction2(Entity* this) {
if (sub_0806F3E4(this) != 0) {
if (this->hitType == 0xa6) {
ModHealth(-2);
sub_0800449C(&gPlayerEntity, 0x7a);
SoundReqClipped(&gPlayerEntity, 0x7a);
sub_08079D84();
}
CreateFx(this, FX_DEATH, 0);
+2 -2
View File
@@ -6,7 +6,7 @@
#include "functions.h"
#include "asm.h"
extern void sub_0800449C(Entity*, u32);
extern void SoundReqClipped(Entity*, u32);
extern void (*const V1DarkMagicProjectile_Functions[])(Entity*);
extern void (*const V1DarkMagicProjectile_Actions[])(Entity*);
@@ -173,7 +173,7 @@ void sub_080AAF74(Entity* this) {
this->actionDelay = 0x1e;
gPlayerEntity.iframes = 8;
ModHealth(-4);
sub_0800449C(&gPlayerEntity, 0x7a);
SoundReqClipped(&gPlayerEntity, 0x7a);
if (gPlayerEntity.health == 0) {
this->health = 0;
}
+2 -2
View File
@@ -12,7 +12,7 @@ extern void (*const gUnk_0812A7F8[])(Entity*);
extern void (*const gUnk_0812A800[])(Entity*);
extern void (*const gUnk_0812A808[])(Entity*);
extern void sub_0800449C(Entity*, u32);
extern void SoundReqClipped(Entity*, u32);
extern void sub_08079D84(void);
extern s32 sub_080AF090(Entity*);
@@ -43,7 +43,7 @@ void nullsub_542(Entity* this) {
void sub_080ABC90(Entity* this) {
if (sub_0806F3E4(this) != 0) {
ModHealth(-2);
sub_0800449C(&gPlayerEntity, 0x7a);
SoundReqClipped(&gPlayerEntity, 0x7a);
sub_08079D84();
CreateFx(this, FX_DEATH, 0);
DeleteThisEntity();
+2 -2
View File
@@ -1010,7 +1010,7 @@ void sub_0804BF38(u32 arg0, struct_0804BF38* arg1)
}
}
sub_08080964(gUnk_080D8E50[iVar3].shakeTime, gUnk_080D8E50[iVar3].shakeMag);
InitScreenShake(gUnk_080D8E50[iVar3].shakeTime, gUnk_080D8E50[iVar3].shakeMag);
SoundReq(gUnk_080D8E50[iVar2].sfx);
}
#else
@@ -4819,7 +4819,7 @@ void sub_StateChange_HouseInteriors2_LinksHouseBedroom(void) {
gArea.musicIndex = gArea.pMusicIndex;
SoundReq(SONG_PLAY_VOL_RESET | BGM_MINISH_CAP);
}
if ((gPlayerState.flags & 8) == 0) {
if ((gPlayerState.flags & PL_NO_CAP) == 0) {
LoadRoomEntityList(&gUnk_080F31D8);
}
}
+3 -3
View File
@@ -223,7 +223,7 @@ void StartPlayerScript(u16* script) {
gPlayerScriptExecutionContext.scriptInstructionPointer = script;
player = &gPlayerEntity;
*(ScriptExecutionContext**)&player->cutsceneBeh = &gPlayerScriptExecutionContext;
gPlayerState.playerAction = 0x1c;
gPlayerState.queued_action = PLAYER_08074C44;
gPlayerState.field_0x3a = 0;
gPlayerState.field_0x39 = 0;
gPlayerState.field_0x38 = 0;
@@ -1072,7 +1072,7 @@ void ScriptCommand_0807E888(Entity* entity, ScriptExecutionContext* context) {
void ScriptCommand_SetPlayerAction(Entity* entity, ScriptExecutionContext* context) {
u32 tmp = GetNextScriptCommandWordAfterCommandMetadata(context->scriptInstructionPointer);
gPlayerState.playerAction = tmp;
gPlayerState.queued_action = tmp;
gPlayerState.field_0x38 = tmp >> 8;
gPlayerState.field_0x39 = tmp >> 0x10;
gPlayerState.field_0x3a = tmp >> 0x18;
@@ -1527,7 +1527,7 @@ void ScriptCommand_0807F0B4(Entity* entity, ScriptExecutionContext* context) {
}
void ScriptCommand_0807F0C8(Entity* entity, ScriptExecutionContext* context) {
sub_08080964(context->scriptInstructionPointer[1], context->scriptInstructionPointer[2]);
InitScreenShake(context->scriptInstructionPointer[1], context->scriptInstructionPointer[2]);
}
extern u8 gUnk_0811E750[];
+1 -1
View File
@@ -5,7 +5,7 @@ extern void sub_0807B778(u32, u32);
void sub_0807B7D8(u32 param_1, u32 param_2, u32 param_3) {
if (param_1 == 53) {
sub_08000152(53);
sub_08000152(53, param_2, param_3);
sub_0807B778(param_2, param_3);
sub_0807B778(param_2 + 1, param_3);
sub_0807B778(param_2 - 1, param_3);