Merge remote-tracking branch 'upstream/master' into coord

This commit is contained in:
Tal Hayon
2022-01-23 17:24:55 +02:00
149 changed files with 693 additions and 827 deletions
+1 -1
View File
@@ -446,7 +446,7 @@ sub_08054EFC: @ 0x08054EFC
subs r0, #0x10
strh r0, [r1, #0x32]
adds r0, r4, #0
bl ResolveEntityBelow
bl SortEntityBelow
_08054F54:
movs r0, #0xfd
bl SoundReq
+1 -1
View File
@@ -724,7 +724,7 @@ _08078DE0:
strh r0, [r4, #0x32]
adds r0, r5, #0
adds r1, r4, #0
bl ResolveEntityOnTop
bl SortEntityAbove
ldr r0, _08078E34 @ =gPlayerState
ldrb r0, [r0, #5]
cmp r0, #4
+1 -1
View File
@@ -419,7 +419,7 @@ _08080DB4:
adds r2, #1
strb r0, [r2]
adds r0, r4, #0
bl ResolveEntityOnTop
bl SortEntityAbove
b _08080E00
_08080DEE:
ldr r0, _08080E04 @ =gRoomTransition
+5 -5
View File
@@ -3676,7 +3676,7 @@ _08027676:
mov r0, sl
ldrb r2, [r0]
adds r0, r5, #0
bl sub_0806F62C
bl LinearMoveAngle
ldrb r0, [r5, #0xa]
cmp r0, #1
beq _080276D2
@@ -3692,7 +3692,7 @@ _08027676:
adds r2, r0, #0
adds r2, #0x83
ldrb r2, [r2]
bl sub_0806F62C
bl LinearMoveAngle
ldr r0, [r5, #0x68]
ldr r1, [r5, #0x54]
ldrb r2, [r1, #0xa]
@@ -4033,7 +4033,7 @@ _08027934:
adds r0, #0x83
ldrb r2, [r0]
adds r0, r5, #0
bl sub_0806F62C
bl LinearMoveAngle
ldr r0, [r5, #0x2c]
str r0, [r6, #0x2c]
ldr r0, [r5, #0x30]
@@ -4044,7 +4044,7 @@ _08027934:
adds r0, #0x83
ldrb r2, [r0]
adds r0, r6, #0
bl sub_0806F62C
bl LinearMoveAngle
ldr r0, [r6, #0x2c]
str r0, [r4, #0x2c]
ldr r0, [r6, #0x30]
@@ -4055,7 +4055,7 @@ _08027934:
adds r0, #0x83
ldrb r2, [r0]
adds r0, r4, #0
bl sub_0806F62C
bl LinearMoveAngle
adds r0, r7, #0
bl sub_08027984
pop {r4, r5, r6, r7, pc}
+2 -2
View File
@@ -396,7 +396,7 @@ sub_080386B8: @ 0x080386B8
cmp r1, #0
beq _08038720
adds r0, r4, #0
bl ResolveEntityOnTop
bl SortEntityAbove
_08038720:
pop {r4, pc}
.align 2, 0
@@ -507,7 +507,7 @@ _080387D8:
cmp r1, #0
beq _080387EE
adds r0, r4, #0
bl ResolveEntityOnTop
bl SortEntityAbove
_080387EE:
pop {r4, pc}
+2 -2
View File
@@ -1236,7 +1236,7 @@ sub_08049998: @ 0x08049998
ldrsh r1, [r5, r0]
ldrb r2, [r5, #0x15]
adds r0, r5, #0
bl sub_0806F62C
bl LinearMoveAngle
adds r0, r5, #0
adds r0, #0x7c
ldrb r1, [r0]
@@ -1433,7 +1433,7 @@ sub_08049B20: @ 0x08049B20
ldrsh r1, [r4, r0]
ldrb r2, [r4, #0x15]
adds r0, r4, #0
bl sub_0806F62C
bl LinearMoveAngle
adds r0, r4, #0
adds r0, #0x7c
ldrb r1, [r0]
-30
View File
@@ -1,30 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.syntax unified
.text
thumb_func_start Enemy66
Enemy66: @ 0x08049CAC
push {lr}
adds r2, r0, #0
ldr r1, _08049CC8 @ =gUnk_080D2ABC
ldrb r0, [r2, #0xf]
lsls r0, r0, #2
adds r0, r0, r1
ldr r1, [r0]
cmp r1, #0
beq _08049CCC
adds r0, r2, #0
bl _call_via_r1
b _08049CD0
.align 2, 0
_08049CC8: .4byte gUnk_080D2ABC
_08049CCC:
bl DeleteThisEntity
_08049CD0:
pop {pc}
.align 2, 0
@@ -54,7 +54,7 @@ _080675EC:
strb r0, [r3, #0x19]
adds r0, r4, #0
adds r1, r3, #0
bl ResolveEntityOnTop
bl SortEntityAbove
_08067646:
subs r6, #1
adds r5, #2
@@ -107,7 +107,7 @@ _08067656:
strb r0, [r3, #0x19]
adds r0, r4, #0
adds r1, r3, #0
bl ResolveEntityOnTop
bl SortEntityAbove
_080676B0:
subs r6, #1
adds r5, #2
@@ -95,7 +95,7 @@ _0809A25C:
ldrsh r1, [r7, r2]
ldrb r2, [r7, #0x15]
adds r0, r7, #0
bl sub_0806F62C
bl LinearMoveAngle
ldr r1, [r4]
ldrb r0, [r7, #0xe]
lsls r0, r0, #2
@@ -206,7 +206,7 @@ _0809A33E:
lsls r1, r1, #2
ldrb r2, [r7, #0x15]
adds r0, r7, #0
bl sub_0806F62C
bl LinearMoveAngle
ldr r1, [r7, #0x50]
adds r0, r7, #0
movs r2, #0x48
@@ -216,7 +216,7 @@ _0809A378:
ldrb r2, [r7, #0x15]
adds r0, r7, #0
movs r1, #0x80
bl sub_0806F62C
bl LinearMoveAngle
adds r0, r7, #0
adds r0, #0x5a
ldrb r0, [r0]
@@ -335,7 +335,7 @@ _0809A436:
ldrh r3, [r3]
adds r2, r2, r3
adds r0, r7, #0
bl sub_0806F62C
bl LinearMoveAngle
b _0809A632
.align 2, 0
_0809A468: .4byte gUnk_0812388C
@@ -0,0 +1,59 @@
.syntax unified
push {r4, r5, r6, r7, lr}
mov r7, r8
push {r7}
movs r5, #0
ldrh r1, [r0, #0x2e]
subs r1, #8
lsls r1, r1, #0x10
lsrs r1, r1, #0x10
mov ip, r1
ldrh r1, [r0, #0x32]
subs r1, #8
lsls r1, r1, #0x10
lsrs r7, r1, #0x10
movs r4, #0
ldr r1, _080889A0 @ =gRoomVars
ldr r2, _080889A4 @ =sSpriteOffsets
mov r8, r2
adds r3, r1, #0
adds r3, #0xac
adds r6, r0, #0
adds r6, #0x72
_08088962:
ldr r2, [r3]
cmp r2, #0
beq _08088990
ldrh r0, [r2, #0x2e]
mov r1, ip
subs r0, r0, r1
lsls r0, r0, #0x10
lsrs r0, r0, #0x10
cmp r0, #0x10
bhi _08088990
ldrh r0, [r2, #0x32]
subs r0, r0, r7
lsls r0, r0, #0x10
lsrs r0, r0, #0x10
cmp r0, #0x10
bhi _08088990
ldrb r0, [r6]
add r0, r8
ldrb r1, [r0]
adds r0, r2, #0
adds r0, #0x63
strb r1, [r0]
adds r5, #1
_08088990:
adds r3, #4
adds r4, #1
cmp r4, #7
bls _08088962
adds r0, r5, #0
pop {r3}
mov r8, r3
pop {r4, r5, r6, r7, pc}
.align 2, 0
_080889A0: .4byte gRoomVars
_080889A4: .4byte sSpriteOffsets
.syntax divided
+2 -2
View File
@@ -235,7 +235,7 @@ _08086428:
ldrsh r1, [r6, r0]
ldrb r2, [r6, #0x15]
adds r0, r6, #0
bl sub_0806F62C
bl LinearMoveAngle
b _0808654A
_08086440:
adds r0, r6, #0
@@ -507,7 +507,7 @@ _0808663A:
ldrsh r1, [r7, r0]
ldrb r2, [r7, #0x15]
adds r0, r7, #0
bl sub_0806F62C
bl LinearMoveAngle
ldrb r0, [r7, #0x15]
movs r1, #0x80
eors r0, r1
+1 -1
View File
@@ -392,7 +392,7 @@ _0808D972:
strh r0, [r4, #0x36]
ldr r1, _0808D994 @ =gPlayerEntity
adds r0, r4, #0
bl sub_080177A0
bl IsColliding
cmp r0, #0
beq _0808D992
adds r0, r4, #0
+1 -1
View File
@@ -151,7 +151,7 @@ sub_080A02CC: @ 0x080A02CC
adds r0, r4, #0
bl sub_080A0444
adds r0, r4, #0
bl sub_08017850
bl IsCollidingPlayer
cmp r0, #0
beq _080A0342
ldr r0, [r4, #0x54]
+1 -1
View File
@@ -919,7 +919,7 @@ _08085BB4:
lsls r1, r1, #1
ldrb r2, [r5, #0x15]
adds r0, r4, #0
bl sub_0806F5BC
bl LinearMoveDirection
_08085BE8:
adds r1, r5, #0
adds r1, #0x82
+1 -1
View File
@@ -90,7 +90,7 @@ _0808CB70:
movs r5, #0
str r5, [r4, #0x34]
adds r1, r4, #0
bl ResolveEntityBelow
bl SortEntityBelow
ldrb r0, [r4, #0xd]
cmp r0, #0
beq _0808CB98
+1 -1
View File
@@ -144,7 +144,7 @@ _0808A930:
asrs r0, r0, #0x18
strh r0, [r4, #0x36]
adds r0, r4, #0
bl sub_08017850
bl IsCollidingPlayer
cmp r0, #0
beq _0808A962
_0808A954:
+3 -3
View File
@@ -291,7 +291,7 @@ _0809C5E0: @ jump table
_0809C600:
ldr r0, [r5, #0x50]
adds r1, r5, #0
bl ResolveEntityBelow
bl SortEntityBelow
ldr r0, [r5, #0x50]
ldrb r0, [r0, #0xd]
adds r6, r5, #0
@@ -382,7 +382,7 @@ _0809C6B4: .4byte gUnk_08123E1C
_0809C6B8:
ldr r0, [r5, #0x50]
adds r1, r5, #0
bl ResolveEntityBelow
bl SortEntityBelow
ldr r0, [r5, #0x50]
ldrb r0, [r0, #0xd]
adds r6, r5, #0
@@ -864,7 +864,7 @@ _0809CA30:
adds r2, #2
ldrb r2, [r2]
rsbs r2, r2, #0
bl sub_0806F62C
bl LinearMoveAngle
ldr r1, [r4, #0x54]
adds r0, r4, #0
movs r2, #0x48
+2 -2
View File
@@ -189,7 +189,7 @@ sub_0809D8C8: @ 0x0809D8C8
_0809D8E4: .4byte gPlayerState
_0809D8E8:
adds r0, r5, #0
bl sub_08017850
bl IsCollidingPlayer
cmp r0, #0
beq _0809D90A
ldrb r0, [r6, #0xd]
@@ -223,7 +223,7 @@ sub_0809D91C: @ 0x0809D91C
cmp r1, #0
beq _0809D934
adds r0, r4, #0
bl ResolveEntityBelow
bl SortEntityBelow
_0809D934:
movs r0, #0x72
bl SoundReq
+1 -1
View File
@@ -1024,7 +1024,7 @@ _0809E170:
ldrsh r1, [r5, r0]
ldrb r2, [r5, #0x15]
adds r0, r5, #0
bl sub_0806F62C
bl LinearMoveAngle
movs r1, #0x2e
ldrsh r0, [r5, r1]
mov r2, r8
+1 -1
View File
@@ -340,7 +340,7 @@ _0809FD1C:
strh r0, [r4, #0x36]
ldr r1, _0809FD48 @ =gPlayerEntity
adds r0, r4, #0
bl sub_080177A0
bl IsColliding
cmp r0, #0
beq _0809FD44
adds r0, r4, #0
+4 -4
View File
@@ -95,7 +95,7 @@ _080A0C08:
strh r0, [r4, #0x32]
adds r0, r5, #0
adds r1, r4, #0
bl ResolveEntityBelow
bl SortEntityBelow
_080A0C40:
ldrb r0, [r5, #0xf]
adds r0, #1
@@ -136,7 +136,7 @@ _080A0C6E:
strh r0, [r4, #0x32]
adds r0, r5, #0
adds r1, r4, #0
bl ResolveEntityBelow
bl SortEntityBelow
_080A0C92:
ldrb r0, [r5, #0xf]
adds r0, #1
@@ -159,7 +159,7 @@ _080A0CA0:
strh r0, [r4, #0x32]
adds r0, r5, #0
adds r1, r4, #0
bl ResolveEntityOnTop
bl SortEntityAbove
_080A0CC0:
movs r0, #0xb4
movs r1, #3
@@ -174,7 +174,7 @@ _080A0CC0:
strh r0, [r4, #0x32]
adds r0, r5, #0
adds r1, r4, #0
bl ResolveEntityOnTop
bl SortEntityAbove
_080A0CE0:
pop {r4, r5, pc}
.align 2, 0
+3 -3
View File
@@ -67,7 +67,7 @@ _080985AC:
_080985AE:
ldr r1, [r4, #0x50]
adds r0, r4, #0
bl ResolveEntityBelow
bl SortEntityBelow
adds r0, r4, #0
bl sub_08098918
pop {r4, r5, pc}
@@ -569,7 +569,7 @@ _0809892E:
strb r0, [r2]
ldr r1, [r4, #0x50]
adds r0, r4, #0
bl ResolveEntityBelow
bl SortEntityBelow
_08098968:
ldr r2, _0809898C @ =gUnk_08123558
adds r0, r6, #0
@@ -606,7 +606,7 @@ _08098990:
strb r0, [r2]
ldr r1, [r4, #0x50]
adds r0, r4, #0
bl ResolveEntityBelow
bl SortEntityBelow
_080989B2:
strh r5, [r4, #0x36]
adds r1, r4, #0
-308
View File
@@ -1,308 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.syntax unified
.text
thumb_func_start PressurePlate
PressurePlate: @ 0x08088804
push {r4, lr}
adds r4, r0, #0
ldrb r0, [r4, #0xf]
cmp r0, #0
beq _08088828
subs r0, #1
strb r0, [r4, #0xf]
lsls r0, r0, #0x18
cmp r0, #0
bne _08088828
ldrb r0, [r4, #0x14]
adds r1, r4, #0
adds r1, #0x72
strb r0, [r1]
ldrb r1, [r4, #0x14]
adds r0, r4, #0
bl InitializeAnimation
_08088828:
ldr r0, _0808883C @ =gUnk_08120BE0
ldrb r1, [r4, #0xc]
lsls r1, r1, #2
adds r1, r1, r0
ldr r1, [r1]
adds r0, r4, #0
bl _call_via_r1
pop {r4, pc}
.align 2, 0
_0808883C: .4byte gUnk_08120BE0
thumb_func_start sub_08088840
sub_08088840: @ 0x08088840
movs r3, #1
movs r1, #1
strb r1, [r0, #0xc]
ldrb r2, [r0, #0x18]
subs r1, #5
ands r1, r2
orrs r1, r3
strb r1, [r0, #0x18]
adds r3, r0, #0
adds r3, #0x29
ldrb r1, [r3]
movs r2, #7
orrs r1, r2
strb r1, [r3]
ldr r1, _08088868 @ =gUnk_080FD1D4
str r1, [r0, #0x48]
ldrb r1, [r0, #0x14]
adds r0, #0x72
strb r1, [r0]
bx lr
.align 2, 0
_08088868: .4byte gUnk_080FD1D4
thumb_func_start sub_0808886C
sub_0808886C: @ 0x0808886C
push {r4, r5, lr}
adds r5, r0, #0
bl sub_08088938
adds r4, r0, #0
adds r0, r5, #0
bl sub_080889A8
adds r4, r4, r0
lsls r4, r4, #0x18
lsrs r4, r4, #0x18
ldrb r1, [r5, #0xa]
adds r0, r1, #2
cmp r0, r4
bgt _080888B8
movs r1, #0
movs r0, #2
strb r0, [r5, #0xc]
strb r1, [r5, #0xf]
movs r0, #4
strb r0, [r5, #0x14]
strh r1, [r5, #0x36]
adds r0, r5, #0
movs r1, #4
bl InitializeAnimation
adds r0, r5, #0
adds r0, #0x86
ldrh r0, [r0]
bl SetFlag
ldr r0, _080888B4 @ =0x0000016B
bl EnqueueSFX
b _080888F2
.align 2, 0
_080888B4: .4byte 0x0000016B
_080888B8:
ldrb r0, [r5, #0x14]
cmp r4, r0
bls _080888E4
adds r0, r1, #1
cmp r0, r4
bne _080888D2
movs r0, #4
strb r0, [r5, #0xf]
adds r1, r4, #1
adds r0, r5, #0
bl InitializeAnimation
b _080888DA
_080888D2:
adds r0, r5, #0
adds r1, r4, #0
bl InitializeAnimation
_080888DA:
movs r0, #0x86
lsls r0, r0, #1
bl EnqueueSFX
b _080888F0
_080888E4:
cmp r4, r0
bhs _080888F0
adds r0, r5, #0
adds r1, r4, #0
bl InitializeAnimation
_080888F0:
strb r4, [r5, #0x14]
_080888F2:
pop {r4, r5, pc}
thumb_func_start sub_080888F4
sub_080888F4: @ 0x080888F4
push {r4, r5, lr}
adds r5, r0, #0
adds r0, #0x70
ldrh r0, [r0]
cmp r0, #0
beq _08088934
adds r0, r5, #0
bl sub_08088938
adds r4, r0, #0
adds r0, r5, #0
bl sub_080889A8
adds r4, r4, r0
lsls r4, r4, #0x18
lsrs r4, r4, #0x18
ldrb r0, [r5, #0xa]
adds r0, #2
cmp r0, r4
ble _08088934
movs r0, #1
strb r0, [r5, #0xc]
strb r4, [r5, #0x14]
adds r0, r5, #0
adds r0, #0x86
ldrh r0, [r0]
bl ClearFlag
adds r0, r5, #0
adds r1, r4, #0
bl InitializeAnimation
_08088934:
pop {r4, r5, pc}
.align 2, 0
thumb_func_start sub_08088938
sub_08088938: @ 0x08088938
push {r4, r5, r6, r7, lr}
mov r7, r8
push {r7}
movs r5, #0
ldrh r1, [r0, #0x2e]
subs r1, #8
lsls r1, r1, #0x10
lsrs r1, r1, #0x10
mov ip, r1
ldrh r1, [r0, #0x32]
subs r1, #8
lsls r1, r1, #0x10
lsrs r7, r1, #0x10
movs r4, #0
ldr r1, _080889A0 @ =gRoomVars
ldr r2, _080889A4 @ =gUnk_08120BEC
mov r8, r2
adds r3, r1, #0
adds r3, #0xac
adds r6, r0, #0
adds r6, #0x72
_08088962:
ldr r2, [r3]
cmp r2, #0
beq _08088990
ldrh r0, [r2, #0x2e]
mov r1, ip
subs r0, r0, r1
lsls r0, r0, #0x10
lsrs r0, r0, #0x10
cmp r0, #0x10
bhi _08088990
ldrh r0, [r2, #0x32]
subs r0, r0, r7
lsls r0, r0, #0x10
lsrs r0, r0, #0x10
cmp r0, #0x10
bhi _08088990
ldrb r0, [r6]
add r0, r8
ldrb r1, [r0]
adds r0, r2, #0
adds r0, #0x63
strb r1, [r0]
adds r5, #1
_08088990:
adds r3, #4
adds r4, #1
cmp r4, #7
bls _08088962
adds r0, r5, #0
pop {r3}
mov r8, r3
pop {r4, r5, r6, r7, pc}
.align 2, 0
_080889A0: .4byte gRoomVars
_080889A4: .4byte gUnk_08120BEC
thumb_func_start sub_080889A8
sub_080889A8: @ 0x080889A8
push {r4, r5, r6, lr}
adds r4, r0, #0
movs r5, #0
bl sub_08017850
cmp r0, #0
beq _080889CA
ldr r1, _08088A40 @ =gPlayerEntity
ldr r2, _08088A44 @ =gUnk_08120BEC
adds r0, r4, #0
adds r0, #0x72
ldrb r0, [r0]
adds r0, r0, r2
ldrb r0, [r0]
adds r1, #0x63
strb r0, [r1]
movs r5, #1
_080889CA:
ldr r0, _08088A48 @ =gPlayerState
ldr r0, [r0, #0x30]
movs r1, #0x80
lsls r1, r1, #0xf
ands r0, r1
cmp r0, #0
beq _08088A3A
ldr r6, _08088A4C @ =gPlayerClones
ldr r1, [r6]
adds r0, r4, #0
bl sub_080177A0
cmp r0, #0
beq _080889FA
ldr r1, [r6]
ldr r2, _08088A44 @ =gUnk_08120BEC
adds r0, r4, #0
adds r0, #0x72
ldrb r0, [r0]
adds r0, r0, r2
ldrb r0, [r0]
adds r1, #0x63
strb r0, [r1]
adds r5, #1
_080889FA:
ldr r1, [r6, #4]
adds r0, r4, #0
bl sub_080177A0
cmp r0, #0
beq _08088A1A
ldr r1, [r6, #4]
ldr r2, _08088A44 @ =gUnk_08120BEC
adds r0, r4, #0
adds r0, #0x72
ldrb r0, [r0]
adds r0, r0, r2
ldrb r0, [r0]
adds r1, #0x63
strb r0, [r1]
adds r5, #1
_08088A1A:
ldr r1, [r6, #8]
adds r0, r4, #0
bl sub_080177A0
cmp r0, #0
beq _08088A3A
ldr r1, [r6, #8]
ldr r2, _08088A44 @ =gUnk_08120BEC
adds r0, r4, #0
adds r0, #0x72
ldrb r0, [r0]
adds r0, r0, r2
ldrb r0, [r0]
adds r1, #0x63
strb r0, [r1]
adds r5, #1
_08088A3A:
adds r0, r5, #0
pop {r4, r5, r6, pc}
.align 2, 0
_08088A40: .4byte gPlayerEntity
_08088A44: .4byte gUnk_08120BEC
_08088A48: .4byte gPlayerState
_08088A4C: .4byte gPlayerClones
+1 -1
View File
@@ -459,7 +459,7 @@ _080847F0:
strh r0, [r5, #0x36]
adds r0, r4, #0
adds r1, r5, #0
bl ResolveEntityOnTop
bl SortEntityAbove
adds r0, r5, #0
bl sub_080845DC
pop {r4, r5, pc}
+1 -1
View File
@@ -709,7 +709,7 @@ sub_080A11C0: @ 0x080A11C0
cmp r0, #0
bne _080A11DC
adds r0, r1, #0
bl sub_08017850
bl IsCollidingPlayer
b _080A11DE
.align 2, 0
_080A11D8: .4byte gPlayerEntity
+2 -2
View File
@@ -167,7 +167,7 @@ _080A2BB4:
bl PositionRelative
adds r0, r5, #0
adds r1, r4, #0
bl ResolveEntityOnTop
bl SortEntityAbove
adds r0, r5, #0
adds r0, #0x62
ldrb r0, [r0]
@@ -380,7 +380,7 @@ CreateSpeechBubble: @ 0x080A2D2C
bl CopyPosition
adds r0, r5, #0
adds r1, r4, #0
bl ResolveEntityOnTop
bl SortEntityAbove
str r5, [r4, #0x50]
adds r0, r4, #0
adds r0, #0x62
-10
View File
@@ -29335,16 +29335,6 @@
"start": 862648,
"size": 8
},
{
"path": "enemy66/gUnk_080D2ABC.bin",
"start": 862908,
"size": 88
},
{
"path": "enemy66/gUnk_080D2ABC_1.bin",
"start": 863000,
"size": 320
},
{
"path": "data_080D3D94/gUnk_080D3D94.bin",
"start": 867732,
+2 -2
View File
@@ -2861,7 +2861,7 @@
"size": 52
},
{
"path": "sounds/sfx10C.bin",
"path": "sounds/sfxButtonPress.bin",
"start": 14557448,
"type": "midi",
"options": {
@@ -3906,7 +3906,7 @@
"size": 60
},
{
"path": "sounds/sfx16B.bin",
"path": "sounds/sfxPressurePlate.bin",
"start": 14565100,
"type": "midi",
"options": {
+1 -1
View File
@@ -266,7 +266,7 @@
.equiv SFX_109, 0x109
.equiv SFX_10A, 0x10a
.equiv SFX_10B, 0x10b
.equiv SFX_10C, 0x10c
.equiv SFX_BUTTON_PRESS, 0x10c
.equiv SFX_10D, 0x10d
.equiv SFX_10E, 0x10e
.equiv SFX_10F, 0x10f
-27
View File
@@ -1,27 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
@ .align 2
gSpriteAnimations_PressurePlate_0:: @ 08120BF1
.include "animations/gSpriteAnimations_PressurePlate_0.s"
gSpriteAnimations_PressurePlate_1:: @ 08120BF5
.include "animations/gSpriteAnimations_PressurePlate_1.s"
gSpriteAnimations_PressurePlate_2:: @ 08120BF9
.include "animations/gSpriteAnimations_PressurePlate_2.s"
gSpriteAnimations_PressurePlate_3:: @ 08120BFD
.include "animations/gSpriteAnimations_PressurePlate_3.s"
gSpriteAnimations_PressurePlate_4:: @ 08120C01
.include "animations/gSpriteAnimations_PressurePlate_4.s"
gSpriteAnimations_PressurePlate:: @ 08120C08
.4byte gSpriteAnimations_PressurePlate_0
.4byte gSpriteAnimations_PressurePlate_1
.4byte gSpriteAnimations_PressurePlate_2
.4byte gSpriteAnimations_PressurePlate_3
.4byte gSpriteAnimations_PressurePlate_4
-10
View File
@@ -1,10 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
.align 2
gUnk_080D2ABC:: @ 080D2ABC
.incbin "enemy66/gUnk_080D2ABC.bin"
.4byte sub_08029270
.incbin "enemy66/gUnk_080D2ABC_1.bin"
-13
View File
@@ -1,13 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
.align 2
gUnk_08120BE0:: @ 08120BE0
.4byte sub_08088840
.4byte sub_0808886C
.4byte sub_080888F4
gUnk_08120BEC:: @ 08120BEC
.incbin "PressurePlate/gUnk_08120BEC.bin"
+1 -1
View File
@@ -46,7 +46,7 @@ script_080144C0:
script_080144C8:
ModRupees 0xfff6
MessageFromTarget 0x420c
PlaySound SFX_10C
PlaySound SFX_BUTTON_PRESS
Wait 0x0018
SetRoomFlag 0x0000
SetLocalFlag 0x0092
+2 -2
View File
@@ -232,7 +232,7 @@
.include "sounds/sfx109.s"
.include "sounds/sfx10A.s"
.include "sounds/sfx10B.s"
.include "sounds/sfx10C.s"
.include "sounds/sfxButtonPress.s"
.include "sounds/sfx10D.s"
.include "sounds/sfx10E.s"
.include "sounds/sfx10F.s"
@@ -327,7 +327,7 @@
.include "sounds/sfx168.s"
.include "sounds/sfx169.s"
.include "sounds/sfx16A.s"
.include "sounds/sfx16B.s"
.include "sounds/sfxPressurePlate.s"
.include "sounds/sfx16C.s"
.include "sounds/sfx16D.s"
.include "sounds/sfx16E.s"
+2 -2
View File
@@ -12,8 +12,8 @@ void PositionEntityOnTop(Entity*, Entity*);
void PositionRelative(Entity*, Entity*, s32, s32);
void CopyPositionAndSpriteOffset(Entity* param_1, Entity* param_2);
void sub_0806FA90(Entity*, Entity*, s32, s32);
void ResolveEntityOnTop(Entity*, Entity*);
void ResolveEntityBelow(Entity*, Entity*);
void SortEntityAbove(Entity*, Entity*);
void SortEntityBelow(Entity*, Entity*);
u32 sub_0806F5A4(u32 idx);
u32 sub_0806F3E4(Entity*);
+4 -4
View File
@@ -160,14 +160,14 @@ typedef struct Entity_ {
/*0x1d*/ u8 field_0x1d;
/*0x1e*/ u8 frameIndex;
/*0x1f*/ u8 lastFrameIndex;
/*0x20*/ s32 zVelocity; /**< Z axis speed. */
/*0x20*/ s32 zVelocity; /**< Z axis speed, measured in px/frame */
/*0x24*/ s16 speed; /**< Magnitude of speed. */
/*0x26*/ u8 spriteAnimation[3];
/*0x29*/ SpritePriority spritePriority;
/*0x2a*/ u16 collisions;
/*0x2c*/ union SplitWord x; /**< X position, fixed point. */
/*0x30*/ union SplitWord y; /**< Y position, fixed point. */
/*0x34*/ union SplitWord z; /**< Z position, fixed point. */
/*0x2c*/ union SplitWord x; /**< X position, fixed point Q16.16. */
/*0x30*/ union SplitWord y; /**< Y position, fixed point Q16.16. */
/*0x34*/ union SplitWord z; /**< Z position, fixed point Q16.16. */
/*0x38*/ u8 collisionLayer; /**< Collision layer. */
/*0x39*/ s8 interactType;
/*0x3a*/ u8 field_0x3a;
+3 -3
View File
@@ -86,7 +86,7 @@ extern u32 sub_080002B8(Entity*);
extern u32 sub_08049F84(Entity*, u32);
extern u32 sub_0800419C(Entity*, Entity*, u32, u32);
extern void sub_08004542(Entity*);
extern u32 sub_08017850(Entity*);
extern u32 IsCollidingPlayer(Entity*);
extern void sub_080809D4(void);
extern void sub_08080CB4(Entity*);
extern void sub_0807B7D8(u32, u32, u32);
@@ -96,7 +96,7 @@ extern u32 sub_0805F8F8(u32);
extern u32 sub_0805F7A0(u32);
extern u32* sub_0805F25C(u32);
u32 isEntityWithinDistance(Entity*, s32, s32, s32);
extern void sub_0806F62C(Entity*, u32, u32);
extern void LinearMoveAngle(Entity*, u32, u32);
extern void sub_080A1ED0(u32, u32, u32);
extern u32 sub_0806F5B0(u32);
extern void sub_08078790(Entity*, u32);
@@ -125,7 +125,7 @@ extern bool32 sub_080806BC(u32, u32, u32, u32);
extern bool32 sub_0806FC80(Entity*, Entity*, s32);
extern u32 sub_080002B4(Entity*, u32, u32);
extern u32 sub_080AF134(Entity*);
extern void sub_0806F5BC(Entity*, u32, u32);
extern void LinearMoveDirection(Entity*, u32, u32);
extern void sub_080A2AF4(Entity*, u32, u32);
extern u32 sub_080002CC(Entity*, s32, s32);
extern bool32 sub_0807BD14(Entity*, u32);
+2 -2
View File
@@ -59,8 +59,8 @@
// Converts a number to Q8.8 fixed-point format
#define Q_8_8(n) ((s16)((n)*256))
// Converts a number to Q4.12 fixed-point format
#define Q_4_12(n) ((s16)((n)*4096))
// Converts a number to Q16.16 fixed-point format
#define Q_16_16(n) ((s32)((n) * (1 << 16)))
#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) >= (b) ? (a) : (b))
+1 -1
View File
@@ -262,7 +262,7 @@ void Object20(Entity*);
void Object21(Entity*);
void FigurineDevice(Entity*);
void EyeSwitch(Entity*);
void PressurePlate(Entity*);
void PressurePlate();
void BigBarrel(Entity*);
void BarrelInside(Entity*);
void PushableStatue(Entity*);
+1
View File
@@ -278,6 +278,7 @@ extern void (*const gPlayerItemFunctions[])(Entity*);
extern u8 gBombBagSizes[];
extern u8 gQuiverSizes[];
extern u16 gWalletSizes[];
extern Entity* gPlayerClones[];
extern PlayerState gPlayerState;
extern Entity gPlayerEntity;
+2 -2
View File
@@ -299,7 +299,7 @@ typedef enum {
SFX_109,
SFX_10A,
SFX_10B,
SFX_10C,
SFX_BUTTON_PRESS,
SFX_10D,
SFX_10E,
SFX_10F,
@@ -394,7 +394,7 @@ typedef enum {
SFX_168,
SFX_169,
SFX_16A,
SFX_16B,
SFX_PRESSURE_PLATE,
SFX_16C,
SFX_16D,
SFX_16E,
+1 -1
View File
@@ -22,7 +22,7 @@ typedef struct {
u8 endOfAnimation : 1;
} PACKED b;
} PACKED frameSettings;
} Frame;
} PACKED Frame;
typedef struct {
u8 numGfxTiles;
+4 -5
View File
@@ -425,7 +425,7 @@ SECTIONS {
src/enemy/gyorgFemaleMouth.o(.text);
asm/enemy/enemy64.o(.text);
src/enemy/treeItem.o(.text);
asm/enemy/enemy66.o(.text);
src/enemy/enemy66.o(.text);
/* END enemies */
src/code_08049CD4.o(.text); /* enemyUtils.c */
asm/code_08049D30.o(.text);
@@ -679,7 +679,7 @@ SECTIONS {
asm/object/object21.o(.text);
asm/object/figurineDevice.o(.text);
asm/object/eyeSwitch.o(.text);
asm/object/pressurePlate.o(.text);
src/object/pressurePlate.o(.text);
asm/object/bigBarrel.o(.text);
src/object/barrelInside.o(.text);
asm/object/pushableStatue.o(.text);
@@ -1116,7 +1116,7 @@ SECTIONS {
data/animations/enemy/gyorgFemaleMouth.o(.rodata);
data/const/enemy/enemy64.o(.rodata);
src/enemy/treeItem.o(.rodata);
data/const/enemy/enemy66.o(.rodata);
src/enemy/enemy66.o(.rodata);
src/enemy.o(.rodata);
data/data_080D3D94.o(.rodata);
data/map/entity_headers.o(.rodata);
@@ -1401,8 +1401,7 @@ SECTIONS {
data/animations/object/figurineDevice.o(.rodata);
data/const/object/eyeSwitch.o(.rodata);
data/animations/object/eyeSwitch.o(.rodata);
data/const/object/pressurePlate.o(.rodata);
data/animations/object/pressurePlate.o(.rodata);
src/object/pressurePlate.o(.rodata);
data/const/object/bigBarrel.o(.rodata);
data/animations/object/bigBarrel.o(.rodata);
src/object/barrelInside.o(.rodata);
+1 -1
View File
@@ -250,7 +250,7 @@ u32 CreateItemDrop(Entity* arg0, u32 itemID, u32 itemParameter) {
} else if (arg0->id == 0x1e) {
itemEntity->direction = arg0->animationState << 3 | 0x80;
itemEntity->speed = 0xc0;
itemEntity->zVelocity = 0x18000;
itemEntity->zVelocity = Q_16_16(1.5);
}
}
CopyPosition(arg0, itemEntity);
+6 -6
View File
@@ -177,7 +177,7 @@ NONMATCH("asm/non_matching/arm_proxy/sub_08017744.inc", void sub_08017744(Entity
}
END_NONMATCH
bool32 sub_080177A0(Entity* this, Entity* that) {
bool32 IsColliding(Entity* this, Entity* that) {
u32 this_d;
u32 depth;
@@ -206,9 +206,9 @@ bool32 sub_080177A0(Entity* this, Entity* that) {
return FALSE;
}
bool32 sub_08017850(Entity* this) {
bool32 IsCollidingPlayer(Entity* this) {
if (sub_08079F8C())
return sub_080177A0(this, &gPlayerEntity);
return IsColliding(this, &gPlayerEntity);
return FALSE;
}
@@ -290,7 +290,7 @@ void sub_080179EC(Entity* a1, Entity* a2) {
u32 rand = Random();
Entity* e = CreateFx(a2, p[rand & 3], 0);
if (e != NULL) {
PositionRelative(a2, e, a2->hitbox->offset_x << 16, a2->hitbox->offset_y << 16);
PositionRelative(a2, e, Q_16_16(a2->hitbox->offset_x), Q_16_16(a2->hitbox->offset_y));
e->spritePriority.b0 = 2;
e->spriteOffsetX = (a1->x.HALF.HI + a1->hitbox->offset_x - (a2->x.HALF.HI + a2->hitbox->offset_x)) >> 1;
e->spriteOffsetY = (a1->y.HALF.HI + a1->hitbox->offset_y - (a2->y.HALF.HI + a2->hitbox->offset_y)) >> 1;
@@ -541,9 +541,9 @@ s32 sub_08017F40(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
gPlayerState.jump_status = 0;
if (tgt->kind == ENEMY && (tgt->id == GHINI || tgt->id == ENEMY_50)) {
org->z.HALF.HI = 0;
PositionRelative(org, tgt, 0, 0x10000);
PositionRelative(org, tgt, 0, Q_16_16(1.0));
} else {
PositionRelative(tgt, org, 0, 0x10000);
PositionRelative(tgt, org, 0, Q_16_16(1.0));
}
COLLISION_OFF(org);
org->spriteRendering.b3 = tgt->spriteRendering.b3;
+20 -20
View File
@@ -108,7 +108,7 @@ u32 sub_0806F3E4(Entity* ent) {
p = &gUnk_08126EE4[gPlayerEntity.animationState & 0xE];
tmp_ent.x.HALF.HI = p[0] + gPlayerEntity.x.HALF.HI;
tmp_ent.y.HALF.HI = p[1] + gPlayerEntity.y.HALF.HI;
sub_0806F5BC(ent, ent->field_0x46, GetFacingDirection(ent, &tmp_ent));
LinearMoveDirection(ent, ent->field_0x46, GetFacingDirection(ent, &tmp_ent));
if (sub_0800419C(&tmp_ent, ent, 4, 4)) {
u32 state = ent->field_0x1c & 0xF;
if (state == 2) {
@@ -179,7 +179,7 @@ u32 sub_0806F5B0(u32 idx) {
return gUnk_08114F58[idx];
}
void sub_0806F5BC(Entity* ent, u32 a, u32 b) {
void LinearMoveDirection(Entity* ent, u32 a, u32 b) {
if ((b & 0x80) == 0) {
u32 m1 = b;
@@ -188,15 +188,15 @@ void sub_0806F5BC(Entity* ent, u32 a, u32 b) {
}
}
void sub_0806F62C(Entity* ent, u32 a, u32 b) {
void LinearMoveAngle(Entity* ent, u32 a, u32 b) {
ent->x.WORD += FixedDiv(FixedMul(gSineTable[(u8)b], a), 256) << 8;
ent->y.WORD -= FixedDiv(FixedMul(gSineTable[(u8)b + 64], a), 256) << 8;
}
void LinearMoveUpdate(Entity* ent) {
if ((ent->direction & 0x80) == 0) {
ent->x.WORD += FixedDiv(FixedMul(gSineTable[ent->direction * 8], ent->speed), 256) << 8;
ent->y.WORD -= FixedDiv(FixedMul(gSineTable[ent->direction * 8 + 64], ent->speed), 256) << 8;
ent->x.WORD += FixedDiv(FixedMul(gSineTable[ent->direction * 8], ent->speed), (1 << 8)) << 8;
ent->y.WORD -= FixedDiv(FixedMul(gSineTable[ent->direction * 8 + 64], ent->speed), (1 << 8)) << 8;
}
}
@@ -323,13 +323,13 @@ s16 FixedDiv(s16 r0, s16 r1) {
return (r0 * 256) / r1;
}
void CopyPosition(Entity* param_1, Entity* param_2) {
PositionRelative(param_1, param_2, 0, 0);
void CopyPosition(Entity* source, Entity* target) {
PositionRelative(source, target, 0, 0);
}
void PositionEntityOnTop(Entity* ent, Entity* ent2) {
PositionRelative(ent, ent2, 0, 0);
ResolveEntityOnTop(ent, ent2);
void PositionEntityOnTop(Entity* source, Entity* target) {
PositionRelative(source, target, 0, 0);
SortEntityAbove(source, target);
}
void PositionRelative(Entity* source, Entity* target, s32 offsetX, s32 offsetY) {
@@ -347,23 +347,23 @@ void PositionRelative(Entity* source, Entity* target, s32 offsetX, s32 offsetY)
UpdateSpriteForCollisionLayer(target);
}
void CopyPositionAndSpriteOffset(Entity* param_1, Entity* param_2) {
param_2->spriteOffsetX = param_1->spriteOffsetX;
param_2->spriteOffsetY = param_1->spriteOffsetY;
PositionRelative(param_1, param_2, 0, 0);
void CopyPositionAndSpriteOffset(Entity* source, Entity* target) {
target->spriteOffsetX = source->spriteOffsetX;
target->spriteOffsetY = source->spriteOffsetY;
PositionRelative(source, target, 0, 0);
}
void sub_0806FA90(Entity* param_1, Entity* param_2, s32 offsetX, s32 offsetY) {
param_2->spriteOffsetX = param_1->spriteOffsetX;
param_2->spriteOffsetY = param_1->spriteOffsetY;
PositionRelative(param_1, param_2, offsetX * 64 * 32 * 32, offsetY * 64 * 32 * 32);
void sub_0806FA90(Entity* source, Entity* target, s32 offsetX, s32 offsetY) {
target->spriteOffsetX = source->spriteOffsetX;
target->spriteOffsetY = source->spriteOffsetY;
PositionRelative(source, target, Q_16_16(offsetX), Q_16_16(offsetY));
}
void ResolveEntityOnTop(Entity* param_1, Entity* param_2) {
void SortEntityAbove(Entity* param_1, Entity* param_2) {
param_2->spritePriority.b0 = gEntityOnTopArray[param_1->spritePriority.b0];
}
void ResolveEntityBelow(Entity* param_1, Entity* param_2) {
void SortEntityBelow(Entity* param_1, Entity* param_2) {
param_2->spritePriority.b0 = gEntityBelowArray[param_1->spritePriority.b0];
}
+5 -5
View File
@@ -104,7 +104,7 @@ void sub_080318DC(Entity* this) {
void sub_08031A60(Entity* this) {
if (this->iframes > 0)
GravityUpdate(this, 0x1800);
GravityUpdate(this, Q_8_8(24.0));
sub_08001324(this);
}
@@ -315,7 +315,7 @@ void sub_08031E90(Entity* this) {
void sub_08031EA8(Entity* this) {
this->action = 1;
this->spritePriority.b1 = 1;
this->zVelocity = 0x40000;
this->zVelocity = Q_16_16(4.0);
this->z.HALF.HI = (4 - this->type2) * 0xe;
this->field_0x78.HALF.HI = Random();
InitializeAnimation(this, 4);
@@ -325,7 +325,7 @@ void sub_08031EE8(Entity* this) {
int draw;
this->z.WORD -= this->zVelocity;
this->zVelocity -= 0x1800;
this->zVelocity -= Q_16_16(3.0 / 32.0);
if (this->z.HALF.HI < 1) {
draw = this->spriteSettings.draw;
@@ -442,7 +442,7 @@ void sub_08032160(Entity* this) {
this->spriteSettings.flipX = 0;
}
this->speed = 0xf0;
this->zVelocity = 0x12000;
this->zVelocity = Q_16_16(1.125);
this->spritePriority.b1 = 1;
InitializeAnimation(this, 12);
}
@@ -477,7 +477,7 @@ void sub_08032204(Entity* this) {
}
void sub_08032248(Entity* this) {
if (GravityUpdate(this, 0x1800) == 0) {
if (GravityUpdate(this, Q_8_8(24.0)) == 0) {
if (this->frame & 0x80) {
((Entity*)this->field_0x7c.WORD)->actionDelay--;
+3 -3
View File
@@ -109,7 +109,7 @@ void sub_080218CC(Entity* this) {
this->spriteSettings.draw = 1;
this->direction = ((sub_08049F84(this, 1) ^ 0x10) + gUnk_080CB5DC[Random() & 7]) & 0x1f;
this->speed = 0x100;
this->zVelocity = 0x12000;
this->zVelocity = Q_16_16(1.125);
}
GetNextFrame(this);
@@ -242,7 +242,7 @@ void sub_08021B64(Entity* this) {
if (iVar4 == 0) {
this->action = 6;
this->zVelocity = 0x10000;
this->zVelocity = Q_16_16(1.0);
((u8*)&this->field_0x86)[1] = 0;
if (gPlayerEntity.direction != 0xff) {
this->direction = 0x10 ^ gPlayerEntity.direction;
@@ -303,7 +303,7 @@ u32 sub_08021D00(Entity* this) {
} else {
this->action = 4;
this->actionDelay = 1;
this->zVelocity = 0x18000;
this->zVelocity = Q_16_16(1.5);
InitializeAnimation(this, 4);
ret = 1;
}
+3 -3
View File
@@ -61,7 +61,7 @@ void sub_0802C688(Entity* this) {
this->action = 3;
this->hitType = 0x6e;
this->field_0xf = 1;
this->zVelocity = 0x18000;
this->zVelocity = Q_16_16(1.5);
this->speed = 0;
this->field_0x80.HALF.HI = 1;
InitializeAnimation(this, this->direction >> 4 | 6);
@@ -79,7 +79,7 @@ void sub_0802C7AC(Entity* this) {
if (this->field_0x82.HALF.LO != 2) {
this->speed = this->field_0x82.HALF.LO ? 0x200 : 0x80;
}
this->zVelocity = 0x18000;
this->zVelocity = Q_16_16(1.5);
this->field_0x82.HALF.HI = 0;
this->field_0x80.HALF.HI = 0;
} else {
@@ -232,7 +232,7 @@ void sub_0802CA94(Entity* this) {
COLLISION_OFF(this);
this->field_0xf = 1;
this->spritePriority.b1 = 1;
this->zVelocity = 0x18000;
this->zVelocity = Q_16_16(1.5);
this->speed = 0;
this->field_0x82.HALF.HI = 0;
this->field_0x80.HALF.HI = 0;
+1 -1
View File
@@ -381,7 +381,7 @@ void sub_0802ADDC(Entity* this) {
void sub_0802AE24(Entity* this) {
this->action = 1;
this->actionDelay = 0xf0;
this->zVelocity = 0x8000;
this->zVelocity = Q_16_16(0.5);
this->hitbox = (Hitbox*)&gUnk_080CD174;
this->field_0x3c = 3;
this->field_0x16 = 0;
+1 -1
View File
@@ -722,7 +722,7 @@ u32 sub_0801FBD0(Entity* this) {
void Chuchu_JumpAtPlayer(Entity* this) {
this->speed = 0x180;
this->zVelocity = 0x20000;
this->zVelocity = Q_16_16(2.0);
this->direction = sub_08049F84(this, 1);
InitializeAnimation(this, 3);
}
+3 -3
View File
@@ -52,7 +52,7 @@ void sub_08022988(Entity* this) {
return;
this->frameIndex = 1;
this->zVelocity = 0x10000;
this->zVelocity = Q_16_16(1.0);
EnqueueSFX(0xd6);
}
@@ -78,7 +78,7 @@ void sub_080229F8(Entity* this) {
this->speed = 0xc0;
sub_08022B44(this);
} else {
this->zVelocity = 0x10000;
this->zVelocity = Q_16_16(1.0);
EnqueueSFX(0xd6);
}
}
@@ -141,7 +141,7 @@ u32 sub_08022B20(Entity* this) {
}
void sub_08022B44(Entity* this) {
this->zVelocity = 0xc000;
this->zVelocity = Q_16_16(0.75);
this->direction = GetFacingDirection(this, &gPlayerEntity);
if (this->direction & 0xf)
+16
View File
@@ -0,0 +1,16 @@
#include "entity.h"
void (*const gUnk_080D2ABC[])(Entity*);
extern void sub_08029270(Entity* this);
void Enemy66(Entity* this) {
if (gUnk_080D2ABC[this->field_0xf]) {
gUnk_080D2ABC[this->field_0xf](this);
} else {
DeleteThisEntity();
}
}
void (*const gUnk_080D2ABC[103])(Entity*) = {
[22] = sub_08029270,
};
+2 -2
View File
@@ -37,7 +37,7 @@ void sub_0802C254(Entity* this) {
void sub_0802C258(Entity* this) {
sub_0804A720(this);
this->zVelocity = 0x20000;
this->zVelocity = Q_16_16(2.0);
this->actionDelay = 2;
this->field_0x7a.HWORD = Random() & 0x70;
switch (this->type) {
@@ -195,7 +195,7 @@ void sub_0802C4B0(Entity* this) {
}
rand = Random() & 7;
this->zVelocity = 0x20000;
this->zVelocity = Q_16_16(2.0);
if (rand & 4) {
if (rand & 3) {
*(u32*)&this->cutsceneBeh = gUnk_080CD58C[offset | 1];
+1 -1
View File
@@ -102,7 +102,7 @@ u32 sub_0804A024(Entity*, u32, u32);
void sub_08045524(Entity* this) {
u32 tmp, tmp1, tmp2;
this->zVelocity = 0x1c000;
this->zVelocity = Q_16_16(1.75);
tmp = sub_0804A024(this, 1, 8);
if (tmp != 0xff && (Random() & 3) == 0) {
this->actionDelay = Random() & 3;
+1 -1
View File
@@ -46,7 +46,7 @@ void sub_08039BF8(FlyingSkullEntity* this) {
if (super->bitfield == 0x9d) {
super->action = 7;
COLLISION_OFF(super);
super->zVelocity = 0x2A000;
super->zVelocity = Q_16_16(2.625);
super->spritePriority.b1 = 1;
SetTile(this->unk_0x74, COORD_TO_TILE(super), super->collisionLayer);
} else if (super->z.HALF.HI) {
+1 -1
View File
@@ -605,7 +605,7 @@ NONMATCH("asm/non_matching/gleerok/sub_0802D86C.inc", void sub_0802D86C(GleerokE
super->parent->subAction = 4;
super->parent->type2 = 0;
((GleerokEntity*)super->parent)->unk_7b = 0;
SoundReq(SFX_10C);
SoundReq(SFX_BUTTON_PRESS);
}
} else {
if (super->actionDelay != this->unk_84->filler[1]) {
+2 -2
View File
@@ -1033,7 +1033,7 @@ void sub_08047DF0(GyorgMaleEntity* this, u32 unk1) {
sub_08047EA4(this, unk1);
oldX = super->x.HALF.HI;
oldY = super->y.HALF.HI;
sub_0806F62C(super, super->speed, super->direction);
LinearMoveAngle(super, super->speed, super->direction);
if (this->unk_7c & 1) {
if (sub_08079F8C()) {
gPlayerEntity.x.HALF.HI += super->x.HALF.HI - oldX;
@@ -1051,7 +1051,7 @@ void sub_08047E58(GyorgMaleEntity* this) {
u32 oldX, oldY;
oldX = super->x.HALF.HI;
oldY = super->y.HALF.HI;
sub_0806F62C(super, super->speed, super->direction);
LinearMoveAngle(super, super->speed, super->direction);
if (this->unk_7c & 1) {
if (sub_08079F8C()) {
gPlayerEntity.x.HALF.HI += super->x.HALF.HI - oldX;
+6 -6
View File
@@ -95,7 +95,7 @@ void sub_0802BCA8(Entity* this) {
this->action = 7;
this->actionDelay = 0x5a;
this->zVelocity = 0x18000;
this->zVelocity = Q_16_16(1.5);
this->hitType = 0x19;
this->field_0x3a = this->field_0x3a & 0xfb;
this->field_0x1c = 0x12;
@@ -222,7 +222,7 @@ void sub_0802BEBC(Entity* this) {
this->direction ^= 0x10;
sub_080AEFE0(this);
this->direction ^= 0x10;
if (!sub_080044EC(this, 0x2000)) {
if (!sub_080044EC(this, Q_16_16(0.125))) {
sub_0802C1C0(this);
}
}
@@ -234,7 +234,7 @@ void sub_0802BEEC(Entity* this) {
this->direction = this->animationState << 3;
InitializeAnimation(this, this->animationState + 4);
}
} else if (!GravityUpdate(this, 0x1c00)) {
} else if (!GravityUpdate(this, Q_16_16(0.109375))) {
this->action = 8;
this->actionDelay = 30;
this->speed = 0x120;
@@ -356,7 +356,7 @@ void sub_0802C18C(Entity* this) {
if ((this->field_0x78.HALF.LO & 7) == 0) {
Entity* ent = CreateObject(SPECIAL_FX, 0x11, 0x40);
if (ent) {
PositionRelative(this, ent, 0, 0x10000);
PositionRelative(this, ent, 0, Q_16_16(1.0));
}
}
}
@@ -374,8 +374,8 @@ void sub_0802C1CC(Entity* this) {
void sub_0802C218(Entity* this) {
this->action = 6;
this->speed = 0xe0;
this->zVelocity = 0x18000;
this->speed = Q_8_8(0.875);
this->zVelocity = Q_16_16(1.5);
}
// clang-format off
+1 -1
View File
@@ -229,7 +229,7 @@ void sub_08032794(Entity* this) {
target = CreateFx(this, FX_DASH, 0x40);
if (target != NULL) {
temp = &gUnk_080CE810[this->animationState * 2];
PositionRelative(this, target, temp[0] << 0x10, temp[1] << 0x10);
PositionRelative(this, target, Q_16_16(temp[0]), Q_16_16(temp[1]));
}
}
+12 -10
View File
@@ -59,7 +59,7 @@ void Lakitu_DoAction(Entity* this) {
void sub_0803C784(Entity* this) {
if ((this->bitfield & 0x7f) == 0x1d) {
this->zVelocity = 0x20000;
this->zVelocity = Q_16_16(2.0);
sub_0803CBAC(this);
} else {
@@ -316,7 +316,7 @@ void Lakitu_SpawnLightning(Entity* this) {
lightning->direction = this->field_0x78.HALF.LO;
PositionRelative(this, lightning, offset->x << 16, offset->y << 16);
PositionRelative(this, lightning, Q_16_16(offset->x), Q_16_16(offset->y));
EnqueueSFX(0x193);
}
@@ -346,6 +346,8 @@ void sub_0803CC08(Entity* this) {
Entity* cloud;
Entity* fx;
const s32 diff = Q_8_8(3.0 / 128.0);
cloud = this->child;
if (cloud == NULL) {
return;
@@ -365,26 +367,26 @@ void sub_0803CC08(Entity* this) {
fx = CreateFx(this, FX_DEATH, 0);
if (fx != NULL) {
fx->x.HALF.HI += 6;
fx->y.HALF.HI += 6;
fx->x.HALF.HI += diff;
fx->y.HALF.HI += diff;
}
fx = CreateFx(this, FX_DEATH, 0);
if (fx != NULL) {
fx->x.HALF.HI -= 6;
fx->y.HALF.HI += 6;
fx->x.HALF.HI -= diff;
fx->y.HALF.HI += diff;
}
fx = CreateFx(this, FX_DEATH, 0);
if (fx != NULL) {
fx->x.HALF.HI += 6;
fx->y.HALF.HI -= 6;
fx->x.HALF.HI += diff;
fx->y.HALF.HI -= diff;
}
fx = CreateFx(this, FX_DEATH, 0);
if (fx != NULL) {
fx->x.HALF.HI -= 6;
fx->y.HALF.HI -= 6;
fx->x.HALF.HI -= diff;
fx->y.HALF.HI -= diff;
}
this->child = NULL;
+2 -2
View File
@@ -193,7 +193,7 @@ void sub_0802805C(Entity* this) {
} else {
ResetPlayer();
gPlayerState.mobility |= 0x80;
PositionRelative(this, &gPlayerEntity, 0, 0x10000);
PositionRelative(this, &gPlayerEntity, 0, Q_16_16(1.0));
tmp = GetSpriteSubEntryOffsetDataPointer((u16)this->spriteIndex, this->frameIndex);
gPlayerEntity.spriteOffsetX = tmp[0];
@@ -215,7 +215,7 @@ NONMATCH("asm/non_matching/likeLike/sub_0802810C.inc", void sub_0802810C(Entity*
gPlayerState.field_0xa = 0;
gPlayerState.flags &= 0xffffffef;
gPlayerEntity.flags |= 0x80;
gPlayerEntity.zVelocity = 0x18000;
gPlayerEntity.zVelocity = Q_16_16(1.5);
gPlayerEntity.iframes = -60;
gPlayerEntity.direction = gPlayerEntity.animationState << 2;
gPlayerEntity.spritePriority.b1 = this->field_0x82.HALF.HI;
+8 -8
View File
@@ -189,7 +189,7 @@ void sub_0803A274(Entity* this) {
pEVar1 = CreateObject(OBJECT_7E, 1, 0);
pEVar1->parent = this;
pEVar1->child = this->child;
PositionRelative(this->parent, this, 0x100000, 0x200000);
PositionRelative(this->parent, this, Q_16_16(16.0), Q_16_16(32.0));
} else {
pEVar1 = CreateEnemy(MAZAAL_HAND, 1);
pEVar1->parent = this;
@@ -201,7 +201,7 @@ void sub_0803A274(Entity* this) {
pEVar1->parent = this;
pEVar1->child = this->child;
this->spriteSettings.flipX = 1;
PositionRelative(this->parent, this, -0x100000, 0x200000);
PositionRelative(this->parent, this, Q_16_16(-16.0), Q_16_16(32.0));
}
if (gRoomTransition.field_0x38 != 0) {
this->action = 3;
@@ -917,7 +917,7 @@ void sub_0803B100(Entity* this) {
Entity* temp;
this->action = 0x29;
this->zVelocity = 0x14000;
this->zVelocity = Q_16_16(1.25);
if (this->type == 0) {
this->hitbox = &gUnk_080FD364;
} else {
@@ -974,7 +974,7 @@ void sub_0803B1B8(Entity* this) {
if (temp != (Entity*)0x0) {
temp->actionDelay = 0;
temp->direction = 0x90;
PositionRelative(this, temp, this->hitbox->offset_x << 0x10, this->hitbox->offset_y << 0x10);
PositionRelative(this, temp, Q_16_16(this->hitbox->offset_x), Q_16_16(this->hitbox->offset_y));
}
temp = *(Entity**)&this->field_0x74;
temp->field_0x74.HALF.LO = 0x40;
@@ -1086,7 +1086,7 @@ void sub_0803B480(Entity* this) {
Entity* target;
if (((this->field_0x7c.HALF.HI & 0x1f) == 0) && (target = CreateObject(SMOKE, 1, 0), target != (Entity*)0x0)) {
PositionRelative(this, target, gUnk_080CFD08[this->type] << 0x10, 0);
PositionRelative(this, target, Q_16_16(gUnk_080CFD08[this->type]), 0);
}
if (--this->field_0x7c.HALF.HI == 0) {
sub_0803B6A4(this);
@@ -1115,8 +1115,8 @@ u32 sub_0803B4E4(Entity* this) {
}
void sub_0803B538(Entity* this) {
PositionRelative(this, this->child, 0, -0x10000);
PositionRelative(this, *(Entity**)&this->field_0x74, 0, -0x20000);
PositionRelative(this, this->child, 0, Q_16_16(-1.0));
PositionRelative(this, *(Entity**)&this->field_0x74, 0, Q_16_16(-2.0));
}
void sub_0803B55C(Entity* this) {
@@ -1231,7 +1231,7 @@ void sub_0803B798(void) {
gPlayerState.field_0xa = 0;
gPlayerState.flags &= ~(0xffff0000 | PL_CAPTURED);
gPlayerEntity.flags |= 0x80;
gPlayerEntity.zVelocity = 0x18000;
gPlayerEntity.zVelocity = Q_16_16(1.5);
gPlayerEntity.z.HALF.HI = -10;
gPlayerEntity.direction = 0x10;
gPlayerEntity.animationState = 4;
+2 -2
View File
@@ -741,7 +741,7 @@ void sub_08034A84(Entity* this) {
}
void sub_08034AC4(Entity* this) {
PositionRelative(this->parent, this, 0, 0x10000);
PositionRelative(this->parent, this, 0, Q_16_16(1.0));
gUnk_080CED74[this->action](this);
}
@@ -782,7 +782,7 @@ void sub_08034B38(Entity* this) {
target->direction = this->actionDelay + 0x58;
}
ptr = &gUnk_080CED84[target->type * 2];
PositionRelative(this, target, *(ptr++) << 0x10, *ptr << 0x10);
PositionRelative(this, target, Q_16_16(*(ptr++)), Q_16_16(*ptr));
}
}
}
+1 -1
View File
@@ -57,7 +57,7 @@ void sub_08045654(Entity* this) {
void sub_08045678(Entity* this) {
this->zVelocity = 0x1c000;
this->zVelocity = Q_16_16(1.75);
if (this->actionDelay != 0) {
this->actionDelay--;
} else {
+2 -2
View File
@@ -87,7 +87,7 @@ void sub_080230E4(Entity* this) {
CopyPosition(this, &gPlayerEntity);
gPlayerEntity.flags = gPlayerEntity.flags | 0x80;
gPlayerEntity.spriteSettings.draw = 1;
gPlayerEntity.zVelocity = 0x18000;
gPlayerEntity.zVelocity = Q_16_16(1.5);
gPlayerEntity.direction = 0xff;
gPlayerEntity.iframes = -0x14;
gPlayerState.jump_status = 0x41;
@@ -270,7 +270,7 @@ void sub_0802351C(Entity* this) {
if (this->type2 == 0) {
gPlayerEntity.animationState = this->animationState & 7;
gPlayerState.flags |= PL_MOLDWORM_CAPTURED;
PositionRelative(this, &gPlayerEntity, 0, gUnk_080CBC90[this->animationState & 7] << 0x10);
PositionRelative(this, &gPlayerEntity, 0, Q_16_16(gUnk_080CBC90[this->animationState & 7]));
gPlayerEntity.spriteOffsetY = -gUnk_080CBC90[this->animationState & 7];
}
} else {
+5 -5
View File
@@ -617,7 +617,7 @@ void OctorokBoss_Action1(Entity* this) {
this->field_0x74.HWORD += 4;
}
}
ResolveEntityBelow(this->parent, this);
SortEntityBelow(this->parent, this);
if (((GET_HELPER(this)->field_0x2 != 0) || (this->parent->action == INTRO)) ||
(1 < (u8)(this->parent->subAction - 3))) {
if ((s8)this->field_0xf < 0) {
@@ -649,9 +649,9 @@ void OctorokBoss_Action1(Entity* this) {
if ((GET_HELPER(this)->tailCount - 2) < this->type2) {
DeleteThisEntity();
}
ResolveEntityOnTop(this->parent, this);
SortEntityAbove(this->parent, this);
if (GET_HELPER(this)->tailCount - 2 == this->type2) {
ResolveEntityOnTop(this->parent, this);
SortEntityAbove(this->parent, this);
radius = 0x10000 / this->parent->field_0x74.HWORD;
radius = radius << 0xd >> 0x8;
angle = -this->parent->field_0x7a.HALF.HI;
@@ -693,7 +693,7 @@ void OctorokBoss_Action1(Entity* this) {
if (this->health == 1) {
this->health = 0;
} else {
ResolveEntityBelow(this->parent, this);
SortEntityBelow(this->parent, this);
if ((this->parent->subAction != 4) && (this->health != 1)) {
if (GET_TIMER(this) > 0x1c) {
GET_TIMER(this)--;
@@ -939,7 +939,7 @@ void OctorokBoss_ExecuteAttackVacuum(Entity* this) {
if (sub_0806FC80(this, &gPlayerEntity, 0xf0) != 0) {
if ((gPlayerState.flags & PL_FROZEN) == 0) {
if ((gPlayerEntity.flags & PL_MINISH) != 0) {
sub_0806F62C(&gPlayerEntity, 0x280, -GET_ANGLE_HI(this));
LinearMoveAngle(&gPlayerEntity, 0x280, -GET_ANGLE_HI(this));
if (sub_0806FC80(this, &gPlayerEntity, 0x48) != 0) {
this->field_0x80.HALF.LO = 1;
GET_TIMER(this) = 2;
+2 -2
View File
@@ -265,7 +265,7 @@ void Peahat_RepairPropeller(Entity* this) {
return;
this->action = 9;
this->zVelocity = 0x18000;
this->zVelocity = Q_16_16(1.5);
this->direction = Random() & 0x1f;
sub_0804AA1C(this);
this->animationState = PeahatAnimation_RepairPropeller;
@@ -291,7 +291,7 @@ void Peahat_Hop(Entity* this) {
if (--this->actionDelay == 0) {
if (this->frame & 0x80) {
this->action = 9;
this->zVelocity = 0x18000;
this->zVelocity = Q_16_16(1.5);
this->animationState = PeahatAnimation_NewPropeller;
InitializeAnimation(this, this->animationState);
} else {
+1 -1
View File
@@ -811,7 +811,7 @@ void sub_08024E4C(Entity* this) {
gPlayerState.field_0x38 = 0x14;
gPlayerState.field_0x39 = 1;
*(u8*)&gPlayerState.field_0x3a = 0;
PositionRelative(this, player, 0, 0x10000);
PositionRelative(this, player, 0, Q_16_16(1.0));
player->spriteOffsetY = 0x1a;
player->animationState = 4;
player->spritePriority.b1 = 0;
+9 -9
View File
@@ -198,7 +198,7 @@ void sub_080252E0(Entity* this) {
this->action = 3;
this->actionDelay = 0x1e;
this->field_0xf = 0;
this->zVelocity = 0x18000;
this->zVelocity = Q_16_16(1.5);
InitializeAnimation(this, 1);
}
}
@@ -210,8 +210,8 @@ void sub_0802538C(Entity* this) {
if (this->frame == 0) {
GetNextFrame(this);
} else {
GravityUpdate(this, 0x2000);
if (this->zVelocity < 0x2000) {
GravityUpdate(this, Q_16_16(0.125));
if (this->zVelocity < Q_16_16(0.125)) {
this->action = 4;
InitializeAnimation(this, 2);
}
@@ -240,7 +240,7 @@ void sub_0802541C(Entity* this) {
if (this->frame & 0x80) {
this->action = 3;
this->field_0xf = 1;
this->zVelocity = 0x20000;
this->zVelocity = Q_16_16(2);
InitializeAnimation(this, 1);
}
}
@@ -257,7 +257,7 @@ void sub_0802544C(Entity* this) {
}
void sub_0802547C(Entity* this) {
GravityUpdate(this, 0x2000);
GravityUpdate(this, Q_16_16(0.125));
GetNextFrame(this);
if ((this->actionDelay & 7) == 0) {
sub_08025BD4(this);
@@ -269,7 +269,7 @@ void sub_0802547C(Entity* this) {
}
void sub_080254B4(Entity* this) {
GravityUpdate(this, 0x2000);
GravityUpdate(this, Q_16_16(0.125));
if (this->frame & 0x80) {
if (this->z.HALF.HI == 0) {
if (this->cutsceneBeh.HWORD == 0) {
@@ -553,7 +553,7 @@ void sub_08025B18(Entity* this) {
ent = CreateObject(OBJECT_21, 2, 0);
if (ent) {
PositionRelative(this, ent, offset[0] * 0x10000, offset[1] * 0x10000);
PositionRelative(this, ent, Q_16_16(offset[0]), Q_16_16(offset[1]));
ent->x.HALF.HI &= -0x10;
ent->x.HALF.HI += 8;
ent->y.HALF.HI &= -0x10;
@@ -567,8 +567,8 @@ void sub_08025BD4(Entity* this) {
if (this->field_0x82.HALF.LO && (this->frame & 1) == 0) {
Entity* ent = CreateObject(OBJECT_21, 0, 0);
if (ent) {
PositionRelative(this, ent, gUnk_080CC0BA[this->animationState * 2 + 0] * 0x10000,
gUnk_080CC0BA[this->animationState * 2 + 1] * 0x10000);
PositionRelative(this, ent, Q_16_16(gUnk_080CC0BA[this->animationState * 2 + 0]),
Q_16_16(gUnk_080CC0BA[this->animationState * 2 + 1]));
ent->z.HALF.HI = -10;
}
}
+3 -3
View File
@@ -37,7 +37,7 @@ void Rollobite_OnTick(Entity* this) {
void sub_08020668(Entity* this) {
if (this->hitType == 34 && this->health != 0xff) {
this->action = 4;
this->zVelocity = 0x20000;
this->zVelocity = Q_16_16(2.0);
this->direction = 0xff;
this->health = 0xff;
this->hitType = 35;
@@ -107,7 +107,7 @@ void sub_080207A8(Entity* this) {
this->spritePriority.b0 = 4;
this->field_0x3a &= 0xfb;
this->direction ^= 0x10;
this->zVelocity = 0x18000;
this->zVelocity = Q_16_16(1.5);
this->speed = 0x80;
InitializeAnimation(this, this->animationState + 0x10);
}
@@ -267,7 +267,7 @@ bool32 Rollobite_TryToHoleUp(Entity* this) {
this->x.HALF.HI += 8;
this->y.HALF.HI &= 0xfff0;
this->y.HALF.HI += 13;
this->zVelocity = 0x20000;
this->zVelocity = Q_16_16(2.0);
InitializeAnimation(this, this->animationState + 0x14);
SetTile(0x4034, tile, this->collisionLayer);
return TRUE;
+2 -2
View File
@@ -171,7 +171,7 @@ void sub_0802953C(Entity* this) {
} else {
ResetPlayer();
gPlayerState.mobility |= 0x80;
PositionRelative(this, &gPlayerEntity, 0, 0x10000);
PositionRelative(this, &gPlayerEntity, 0, Q_16_16(1.0));
pbVar3 = GetSpriteSubEntryOffsetDataPointer((u16)this->spriteIndex, this->frameIndex);
gPlayerEntity.spriteOffsetX = pbVar3[0];
gPlayerEntity.spriteOffsetY = pbVar3[1] - 1;
@@ -240,7 +240,7 @@ void sub_080296D8(Entity* this) {
gPlayerState.jump_status = 0x41;
gPlayerState.flags &= ~PL_CAPTURED;
gPlayerEntity.flags |= 0x80;
gPlayerEntity.zVelocity = 0x18000;
gPlayerEntity.zVelocity = Q_16_16(1.5);
gPlayerEntity.iframes = 0xa6;
gPlayerEntity.z.HALF.HI = -2;
gPlayerEntity.direction = gPlayerEntity.animationState << 2;
+2 -2
View File
@@ -124,7 +124,7 @@ void sub_08023CE0(Entity* this) {
EnqueueSFX(0x12d);
InitializeAnimation(this, 4);
}
} else if (!GravityUpdate(this, 0x1800)) {
} else if (!GravityUpdate(this, Q_8_8(24))) {
this->action = 3;
this->spriteSettings.draw = 1;
EnqueueSFX(0x84);
@@ -169,7 +169,7 @@ void sub_08023E54(Entity* this) {
ent = CreateEnemy(SLUGGULA, 2);
if (ent) {
const s8* ptr = &gUnk_080CBDF7[this->animationState * 2];
PositionRelative(this, ent, ptr[0] << 0x10, ptr[1] << 0x10);
PositionRelative(this, ent, Q_16_16(ptr[0]), Q_16_16(ptr[1]));
}
}
}
+2 -2
View File
@@ -54,7 +54,7 @@ void sub_0802B628(Entity* this) {
case 0x1d:
if (this->action < 6) {
this->action = 6;
this->zVelocity = 0x18000;
this->zVelocity = Q_16_16(1.5);
this->speed = 0xc0;
this->direction = this->knockbackDirection;
this->knockbackDuration = 0;
@@ -171,7 +171,7 @@ void sub_0802B8E0(Entity* this) {
}
} else {
this->action = 8;
this->zVelocity = 0x10000;
this->zVelocity = Q_16_16(1.0);
this->speed = 0x60;
this->hitType = 99;
InitializeAnimation(this, this->animationState);
+5 -5
View File
@@ -93,7 +93,7 @@ void sub_080225A0(Entity* this) {
}
void sub_080225BC(Entity* this) {
GravityUpdate(this, 0x1800);
GravityUpdate(this, Q_8_8(24.0));
if (this->frame & 1) {
sub_0804A7D4(this);
} else {
@@ -132,7 +132,7 @@ void sub_08022654(Entity* this) {
InitializeAnimation(this, 0);
/* fallthrough */
case 1:
if (GravityUpdate(this, 0x1800))
if (GravityUpdate(this, Q_8_8(24.0)))
return;
this->subAction = 2;
@@ -163,7 +163,7 @@ void sub_080226EC(Entity* this) {
if (sub_080228F0(this)) {
this->action = 6;
this->zVelocity = 0x12000;
this->zVelocity = Q_16_16(1.125);
this->speed = 0x140;
this->direction = GetFacingDirection(this, gUnk_020000B0);
this->hitType = 0x5a;
@@ -211,7 +211,7 @@ void sub_080227AC(Entity* this) {
}
void sub_0802281C(Entity* this) {
GravityUpdate(this, 0x1800);
GravityUpdate(this, Q_8_8(24.0));
GetNextFrame(this);
if (this->frame & 0x80) {
this->action = 2;
@@ -225,7 +225,7 @@ void sub_08022854(Entity* this) {
GetNextFrame(this);
if (this->frame & 1) {
sub_080AEFE0(this);
if (GravityUpdate(this, 0x1800) == 0) {
if (GravityUpdate(this, Q_8_8(24.0)) == 0) {
this->action = 7;
this->hitType = 0x5c;
InitializeAnimation(this, 5);
+2 -2
View File
@@ -89,7 +89,7 @@ void sub_08037Fe0(Entity* this) {
this->action = 2;
this->actionDelay = 6;
this->field_0xf = 0;
this->zVelocity = 0x38000;
this->zVelocity = Q_16_16(3.5);
sub_08038168(this);
InitializeAnimation(this, 2);
}
@@ -145,7 +145,7 @@ void sub_08038110(Entity* this) {
if (this->field_0x80.HALF.LO < 5) {
this->action = 2;
this->actionDelay = 8;
this->zVelocity = 0x38000;
this->zVelocity = Q_16_16(3.5);
sub_08038168(this);
InitializeAnimation(this, 2);
} else {
+2 -2
View File
@@ -951,7 +951,7 @@ void sub_08043490(Entity* this) {
entity = ((VaatiArm_HeapStruct*)this->myHeap)->entities[4];
if (entity->z.HALF.HI < -4) {
entity->zVelocity = 0x18000;
entity->zVelocity = Q_16_16(1.5);
this->subAction = 2;
this->field_0x7c.BYTES.byte2 = 0;
((VaatiArm_HeapStruct*)this->myHeap)->parent->subAction = 2;
@@ -976,7 +976,7 @@ void sub_08043520(Entity* this) {
Entity* entity;
entity = ((VaatiArm_HeapStruct*)this->myHeap)->entities[4];
GravityUpdate(entity, 0x1a00);
GravityUpdate(entity, Q_8_8(26.0));
if ((entity->zVelocity < 0) && (-6 < entity->z.HALF.HI)) {
entity->z.HALF.HI = -6;
this->subAction = 3;
+5 -5
View File
@@ -71,7 +71,7 @@ void sub_0804468C(Entity* this) {
this->field_0x82.HALF.HI = 0;
this->spriteSettings.draw = 0;
off = &gUnk_080D1620[this->field_0x78.HALF.HI & 3];
PositionRelative(this->parent, this, off->h << 0x10, (off->v - 0x10) * 0x10000);
PositionRelative(this->parent, this, Q_16_16(off->h), Q_16_16(off->v - 0x10));
this->z.HALF.HI = this->parent->z.HALF.HI;
InitAnimationForceUpdate(this, 0);
break;
@@ -397,7 +397,7 @@ void sub_08044B04(Entity* this) {
this->field_0x74.HALF.LO = 1;
this->actionDelay = 80;
COLLISION_OFF(this);
PositionRelative(vaati, this, 0, -0x100000);
PositionRelative(vaati, this, 0, Q_16_16(-16.0));
if (this->field_0xf)
this->spriteSettings.draw = 0;
break;
@@ -463,7 +463,7 @@ void sub_08044DEC(Entity* this) {
this->speed = 0x300;
off = this->parent->field_0x80.HALF.LO - 1;
this->direction = gUnk_080D1628[off][this->field_0x78.HALF.HI];
PositionRelative(this->parent, this, 0, -0x100000);
PositionRelative(this->parent, this, 0, Q_16_16(-16.0));
}
void sub_08044E74(Entity* this, u32 state) {
@@ -475,7 +475,7 @@ void sub_08044E74(Entity* this, u32 state) {
this->action = 2;
this->direction += 0x18;
this->direction &= 0x1f;
PositionRelative(this->parent, this, 0, -0x100000);
PositionRelative(this->parent, this, 0, Q_16_16(-16.0));
this->speed = 12288;
LinearMoveUpdate(this);
this->direction += 0x8;
@@ -509,5 +509,5 @@ void sub_08044E74(Entity* this, u32 state) {
}
this->actionDelay = 1;
this->field_0x78.HALF.LO = 0;
this->speed = 1280;
this->speed = Q_8_8(5);
}
+2 -2
View File
@@ -121,7 +121,7 @@ void VaatiProjectileFunction0Action0(Entity* this) {
this->spriteOrientation.flipY = this->parent->spriteOrientation.flipY;
this->spriteRendering.b3 = this->parent->spriteRendering.b3;
this->spritePriority.b1 = 0;
PositionRelative(this->parent, this, 0, -0x10000);
PositionRelative(this->parent, this, 0, Q_16_16(-1.0));
InitializeAnimation(this, 1);
}
}
@@ -207,7 +207,7 @@ void VaatiProjectileFunction0Action8(Entity* this) {
if (this->parent->next == NULL) {
DeleteThisEntity();
}
PositionRelative(this->parent, this, 0, -0x10000);
PositionRelative(this->parent, this, 0, Q_16_16(-1.0));
GetNextFrame(this);
}
+8 -8
View File
@@ -135,7 +135,7 @@ void VaatiRebornEnemyType0Action0(Entity* this) {
entity->parent = this;
entity->spriteSettings.flipX = i;
ptr = &gUnk_080D04A8[i];
PositionRelative(this, entity, ptr->x << 0x10, ptr->y << 0x10);
PositionRelative(this, entity, Q_16_16(ptr->x), Q_16_16(ptr->y));
}
InitAnimationForceUpdate(this, 0);
}
@@ -292,7 +292,7 @@ void VaatiRebornEnemyType0Action3(Entity* this) {
break;
case 0xff:
if (this->z.HALF.HI != -4) {
this->z.WORD -= 0x2000;
this->z.WORD -= Q_16_16(0.125);
}
if (this->actionDelay == 2) {
this->field_0x74.HALF.LO = 0xfe;
@@ -442,7 +442,7 @@ void VaatiRebornEnemyType0Action6(Entity* this) {
SoundReq(SFX_150);
target = CreateProjectileWithParent(this, 0x18, 0);
if (target != NULL) {
PositionRelative(this, target, 0, -0x100000);
PositionRelative(this, target, 0, Q_16_16(-16.0));
target->parent = this;
}
} else if (this->actionDelay == 0x40) {
@@ -500,7 +500,7 @@ void VaatiRebornEnemyType1Action0(Entity* this) {
this->field_0x74.HALF.HI = 1;
this->actionDelay = 0;
this->spriteOffsetY = -1;
PositionRelative(this->parent, this, 0, 0x10000);
PositionRelative(this->parent, this, 0, Q_16_16(1.0));
enemy = CreateEnemy(VAATI_REBORN_ENEMY, 2);
enemy->parent = this;
enemy->child = this->parent;
@@ -546,7 +546,7 @@ void VaatiRebornEnemyType1Action1(Entity* this) {
}
this->spriteSettings.draw = parent->spriteSettings.draw;
this->spriteOffsetX = parent->spriteOffsetX;
PositionRelative(this->parent, this, 0, 0x10000);
PositionRelative(this->parent, this, 0, Q_16_16(1.0));
UpdateAnimationSingleFrame(this);
}
@@ -559,7 +559,7 @@ void VaatiRebornEnemyType2Action0(Entity* this) {
this->field_0x74.HALF.HI = 0;
this->spriteOffsetY = -2;
this->direction = 0xff;
PositionRelative(source, this, 0, 0x20000);
PositionRelative(source, this, 0, Q_16_16(2.0));
InitAnimationForceUpdate(this, 2);
}
@@ -595,7 +595,7 @@ void VaatiRebornEnemyType2Action1(Entity* this) {
}
this->spriteSettings.draw = parent->spriteSettings.draw;
this->spriteOffsetX = parent->spriteOffsetX;
PositionRelative(parent->parent, this, 0, 0x20000);
PositionRelative(parent->parent, this, 0, Q_16_16(2.0));
UpdateAnimationSingleFrame(this);
}
@@ -637,7 +637,7 @@ void sub_0803DC0C(Entity* this) {
tmp = &gUnk_080D04C8[this->actionDelay];
this->spriteSettings.draw = parent->spriteSettings.draw;
this->spriteOffsetX = parent->spriteOffsetX;
PositionRelative(parent, this, tmp->x << 0x10, (tmp->y + 1) * 0x10000);
PositionRelative(parent, this, Q_16_16(tmp->x), Q_16_16(tmp->y + 1));
UpdateAnimationSingleFrame(this);
}
+4 -4
View File
@@ -314,7 +314,7 @@ void VaatiTransfiguredType0Action3(Entity* this) {
if (this->actionDelay != 0) {
if (--this->actionDelay == 0) {
COLLISION_OFF(this);
this->zVelocity = 0x38000;
this->zVelocity = Q_16_16(3.5);
this->field_0xf = 0x10;
}
break;
@@ -380,12 +380,12 @@ void VaatiTransfiguredType0Action4(Entity* this) {
this->field_0x74.HALF.LO = 0;
this->actionDelay = 0x80;
this->field_0xf = 0;
this->zVelocity = 0x24000;
this->zVelocity = Q_16_16(2.25);
SoundReq(SFX_12B);
}
break;
case 1:
if (GravityUpdate(this, 0x2800) != 0)
if (GravityUpdate(this, Q_8_8(40)) != 0)
break;
this->field_0x80.HALF.LO += 1;
switch (this->cutsceneBeh.HALF.LO) {
@@ -1062,7 +1062,7 @@ void sub_080409B0(Entity* this) {
this->field_0x80.HALF.HI = 3;
COLLISION_OFF(this);
this->hitType = 0x36;
this->zVelocity = 0x18000;
this->zVelocity = Q_16_16(1.5);
SoundReq(SFX_164);
}
}
+2 -2
View File
@@ -215,7 +215,7 @@ void VaatiTransfiguredEyeFunction0Action4(Entity* this) {
void sub_08045A00(Entity* this) {
const struct xy* t = &gUnk_080D18B4[this->type2];
PositionRelative(this->parent, this, t->x << 0x10, (t->y + 3) * 0x10000);
PositionRelative(this->parent, this, Q_16_16(t->x), Q_16_16(t->y + 3));
}
void sub_08045A28(Entity* this) {
@@ -291,7 +291,7 @@ void sub_08045A28(Entity* this) {
break;
}
} else {
PositionRelative(this->parent, this, 0, -0x10000);
PositionRelative(this->parent, this, 0, Q_16_16(-1.0));
switch (this->field_0x82.HALF.HI) {
case 0:
switch (this->frame & 0x70) {
+1 -1
View File
@@ -453,7 +453,7 @@ void VaatiWrathType0ActionA(Entity* this) {
this->subAction = 0;
this->direction = 0;
this->speed = 0x100;
this->zVelocity = 0x12000;
this->zVelocity = Q_16_16(1.125);
ChangeObjPalette(this, 0x16b);
InitAnimationForceUpdate(this, 5);
type1 = ((VaatiWrathHeapStruct*)this->myHeap)->type1;
+1 -1
View File
@@ -148,7 +148,7 @@ void VaatiWrathEyeAction6(Entity* this) {
if (pEVar3 != NULL) {
pEVar3->parent = this;
this->child = pEVar3;
PositionRelative(this, pEVar3, 0, 0xc0000);
PositionRelative(this, pEVar3, 0, Q_16_16(12.0));
}
}
}
+1 -1
View File
@@ -26,7 +26,7 @@ void sub_0802A250(Entity* this) {
this->action = 1;
this->actionDelay = 0;
this->zVelocity = -0x30000;
this->zVelocity = Q_16_16(-3.0);
this->speed = gUnk_080CD03C[Random() & 3];
this->direction = gUnk_080CD040[Random() & 3] + 0x18;
this->collisionLayer = 2;
+1 -1
View File
@@ -68,7 +68,7 @@ void sub_08076758(ItemBehavior* this, u32 arg1) {
if ((gPlayerEntity.zVelocity < 1) && ((gPlayerState.jump_status & 0x10) == 0)) {
this->stateID = 2;
gPlayerEntity.field_0x7a.HWORD = 2;
gPlayerEntity.zVelocity = 0x20000;
gPlayerEntity.zVelocity = Q_16_16(2.0);
gPlayerState.jump_status |= 0x10;
gPlayerState.animation = 0x288;
SoundReq(SFX_172);
+1 -1
View File
@@ -275,7 +275,7 @@ void sub_0806D4C0(Entity* this, u32 param) {
if (npc != NULL) {
npc->parent = this;
CopyPosition(this, npc);
ResolveEntityOnTop(this, npc);
SortEntityAbove(this, npc);
SetDefaultPriority(npc, PRIO_MESSAGE);
}
}
+1 -1
View File
@@ -167,7 +167,7 @@ static void sub_08068BEC(Entity* this, u32 unused) {
target = CreateFx(this, FX_WHITE_SPLASH, 0);
if (target) {
target->spritePriority.b0 = 1;
PositionRelative(this, target, 0, -0x100000);
PositionRelative(this, target, 0, Q_16_16(-16.0));
SoundReq(SFX_FA);
}
}
+2 -2
View File
@@ -134,7 +134,7 @@ void sub_080675D4(Entity* this) {
ent->collisionLayer = this->collisionLayer;
ent->spriteOrientation.flipY = this->spriteOrientation.flipY;
ent->spriteRendering.b3 = this->spriteRendering.b3;
ResolveEntityOnTop(this, ent);
SortEntityAbove(this, ent);
}
};
gUnk = gUnk_08110E8A;
@@ -147,7 +147,7 @@ void sub_080675D4(Entity* this) {
ent->collisionLayer = this->collisionLayer;
ent->spriteOrientation.flipY = this->spriteOrientation.flipY;
ent->spriteRendering.b3 = this->spriteRendering.b3;
ResolveEntityOnTop(this, ent);
SortEntityAbove(this, ent);
}
};
if (this->subAction > 2) {
+1 -1
View File
@@ -75,7 +75,7 @@ void CuccoChick_Fusion(Entity* this) {
this->frameIndex = 1;
} else {
if (GravityUpdate(this, 0x3000) == 0) {
this->zVelocity = 0x10000;
this->zVelocity = Q_16_16(1.0);
}
}
}
+1 -1
View File
@@ -22,7 +22,7 @@ void DrLeft(Entity* this) {
if (this->action == 0) {
this->action += 1;
this->frameIndex = 0;
ResolveEntityBelow(this, this);
SortEntityBelow(this, this);
}
}
}
+1 -1
View File
@@ -54,7 +54,7 @@ void sub_0806D96C(Entity* this) {
Entity* fx = CreateFx(this, FX_STEAM_EFC, 0);
if (fx != NULL) {
fx->spritePriority.b0 = 1;
PositionRelative(this, fx, 0, 0xFFE80000);
PositionRelative(this, fx, 0, Q_16_16(-24.0));
}
}
+6 -6
View File
@@ -70,11 +70,11 @@ void sub_080693D0(Entity* this) {
if (this->frame == 1) {
this->frame = 0;
sub_08069428(this, 0xFFF80000, createFx65);
sub_08069428(this, Q_16_16(-8.0), createFx65);
}
if (this->frame == 2) {
this->frame = 0;
sub_08069428(this, 0x80 << 12, createFx65);
sub_08069428(this, Q_16_16(8.0), createFx65);
}
}
}
@@ -82,14 +82,14 @@ void sub_080693D0(Entity* this) {
void sub_08069428(Entity* this, s32 offsetX, bool32 createFx65) {
Entity* fx = CreateFx(this, FX_ROCK, 0);
if (fx) {
PositionRelative(this, fx, offsetX, 0xFFF00000);
ResolveEntityOnTop(this, fx);
PositionRelative(this, fx, offsetX, Q_16_16(-16.0));
SortEntityAbove(this, fx);
}
if (createFx65 != 0) {
fx = CreateFx(this, FX_REFLECT4, 0);
if (fx) {
PositionRelative(this, fx, offsetX, 0xFFF00000);
ResolveEntityOnTop(this, fx);
PositionRelative(this, fx, offsetX, Q_16_16(-16.0));
SortEntityAbove(this, fx);
}
}
}
+2 -2
View File
@@ -22,13 +22,13 @@ void sub_0806CAF4(Entity* this) {
if (npc != NULL) {
npc->parent = this;
CopyPosition(this, npc);
ResolveEntityBelow(this, npc);
SortEntityBelow(this, npc);
}
npc = CreateNPC(0x4a, 2, 0);
if (npc != NULL) {
npc->parent = this;
CopyPosition(this, npc);
ResolveEntityOnTop(this, npc);
SortEntityAbove(this, npc);
}
sub_0807DD64(this);
sub_08078778(this);
+1 -1
View File
@@ -243,7 +243,7 @@ void sub_080626E0(Entity* this, ScriptExecutionContext* context) {
uVar4 = Random();
this->direction = (this->direction + uVar4 % 0xb) - 5;
}
sub_0806F62C(this, (s32)this->speed, (u32)this->direction);
LinearMoveAngle(this, (s32)this->speed, (u32)this->direction);
if ((u32)((this->x.HALF.HI - context->x.HALF.HI) * 0x100 + ((s32)((u32)(u16)this->speed << 0x10) >> 0x11)) <=
(u32)(s32)this->speed) {
this->x.HALF.HI = context->x.HALF.HI;
+2 -2
View File
@@ -58,12 +58,12 @@ void sub_08065914(Entity* this) {
target = FindEntityByID(7, 0x1F, 7);
if (target != NULL) {
PositionRelative(this, target, 0x180000, -0x10000);
PositionRelative(this, target, Q_16_16(24.0), Q_16_16(-1.0));
target->parent = this;
}
target = FindEntityByID(7, 0x20, 7);
if (target != NULL) {
PositionRelative(this, target, 0x280000, 0);
PositionRelative(this, target, Q_16_16(40.0), 0);
target->parent = this;
}
}
+1 -1
View File
@@ -86,7 +86,7 @@ void sub_08068780(Entity* this) {
}
ent = CreateFx(this, FX_STARS2, 0x20);
if (ent != NULL) {
PositionRelative(this, ent, 0x180000, -0xa0000);
PositionRelative(this, ent, Q_16_16(24.0), Q_16_16(-10.0));
}
}
}
+2 -2
View File
@@ -140,12 +140,12 @@ void sub_0806DB84(Entity* this, ScriptExecutionContext* context) {
this->hitbox = (Hitbox*)&gUnk_08114154;
ent = CreateObject(OBJECT_3E, 4, 0);
if (ent != NULL) {
PositionRelative(this, ent, -0x80000, 0);
PositionRelative(this, ent, Q_16_16(-8.0), 0);
*(ScriptExecutionContext**)&ent->cutsceneBeh = StartCutscene(ent, &script_Object3ELeftStoneOpening);
}
ent = CreateObject(OBJECT_3E, 5, 0);
if (ent != NULL) {
PositionRelative(this, ent, 0x80000, 0);
PositionRelative(this, ent, Q_16_16(8.0), 0);
*(ScriptExecutionContext**)&ent->cutsceneBeh = StartCutscene(ent, &script_Object3ERightStoneOpening);
}
}
+1 -1
View File
@@ -12,7 +12,7 @@ void Pita(Entity* this) {
if (this->action == 0) {
this->action += 1;
SetDefaultPriority(this, PRIO_MESSAGE);
ResolveEntityOnTop(this, this);
SortEntityAbove(this, this);
this->hitbox = &gUnk_0810C428;
sub_0807DD64(this);
}
+1 -1
View File
@@ -143,7 +143,7 @@ void sub_08060528(Entity* this) {
if (0 < (s16)this->field_0x6a.HWORD) {
if ((s16)this->field_0x6a.HWORD > 0x12b) {
this->field_0x6a.HWORD = 0;
this->zVelocity = 0x20000;
this->zVelocity = Q_16_16(2.0);
this->field_0x6c.HALF.HI = 1;
sub_080788E0(this);
EnqueueSFX(0x7c);

Some files were not shown because too many files have changed in this diff Show More