mirror of https://github.com/zeldaret/tmc
cleanup
This commit is contained in:
parent
3357984494
commit
ef470547e0
|
|
@ -85,3 +85,4 @@ _Deparsed_XSubs.pm
|
|||
*.sna
|
||||
__pycache__
|
||||
Info.plist
|
||||
ctx.c
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ sub_08086284: @ 0x08086284
|
|||
ldrh r2, [r0]
|
||||
adds r0, r4, #0
|
||||
movs r3, #0
|
||||
bl sub_0805EC9C
|
||||
bl SetAffineInfo
|
||||
pop {r4, pc}
|
||||
.align 2, 0
|
||||
_080862B4: .4byte gUnk_08120668
|
||||
|
|
@ -119,10 +119,10 @@ Then, start translating the code to `src/evilSpirit.c`, bit by bit:
|
|||
ldrh r2, [r0]
|
||||
add r0, r4, #0
|
||||
mov r3, #0
|
||||
bl sub_0805EC9C
|
||||
bl SetAffineInfo
|
||||
```
|
||||
```c
|
||||
sub_0805EC9C(r0, *(u16 *)(r0 + 0x76), *(u16 *)(r0 + 0x7a), 0);
|
||||
SetAffineInfo(r0, *(u16 *)(r0 + 0x76), *(u16 *)(r0 + 0x7a), 0);
|
||||
```
|
||||
---
|
||||
```asm
|
||||
|
|
@ -151,7 +151,7 @@ Putting it all together, we get:
|
|||
void sub_08086284(u8 *r0) {
|
||||
gUnk_08120668[*(u8 *)(r0 + 0xc)](r0);
|
||||
*(u8 *)(r0 + 0x41) = 0;
|
||||
sub_0805EC9C(r0, *(u16 *)(r0 + 0x76), *(u16 *)(r0 + 0x7a), 0);
|
||||
SetAffineInfo(r0, *(u16 *)(r0 + 0x76), *(u16 *)(r0 + 0x7a), 0);
|
||||
return;
|
||||
}
|
||||
```
|
||||
|
|
@ -217,7 +217,7 @@ Much better.
|
|||
void sub_08086284(Entity *r0) {
|
||||
gUnk_08120668[r0->action](r0);
|
||||
r0->bitfield = 0;
|
||||
sub_0805EC9C(r0, r0->field_0x76.HWORD, r0->field_0x7a.HWORD, 0);
|
||||
SetAffineInfo(r0, r0->field_0x76.HWORD, r0->field_0x7a.HWORD, 0);
|
||||
return;
|
||||
}
|
||||
```
|
||||
|
|
@ -235,18 +235,18 @@ src/evilSpirit.c: In function `sub_08086284':
|
|||
src/evilSpirit.c:4: syntax error before `*'
|
||||
src/evilSpirit.c:5: `gUnk_08120668' undeclared (first use in this function)
|
||||
src/evilSpirit.c:5: (Each undeclared identifier is reported only once for each function it appears in.)
|
||||
src/evilSpirit.c:7: warning: implicit declaration of function `sub_0805EC9C'
|
||||
src/evilSpirit.c:7: warning: implicit declaration of function `SetAffineInfo'
|
||||
```
|
||||
|
||||
We got some errors. We need to tell the compiler what `gUnk_08120668`, `Entity`, and `sub_0805EC9C` are.
|
||||
We got some errors. We need to tell the compiler what `gUnk_08120668`, `Entity`, and `SetAffineInfo` are.
|
||||
|
||||
We know `r0` is an `Entity`, which is from `entity.h`. We can declare this above the function:
|
||||
```c
|
||||
#include "entity.h"
|
||||
```
|
||||
What about `gUnk_08120668` and `sub_0805EC9C`?
|
||||
What about `gUnk_08120668` and `SetAffineInfo`?
|
||||
```c
|
||||
extern void sub_0805EC9C();
|
||||
extern void SetAffineInfo();
|
||||
extern void (*gUnk_08120668[])(Entity *);
|
||||
```
|
||||
Now the compiler will look outside of this file for both of these. We don't have to set the size of `gUnk_08120668`, a function array, since it's size is irrelevant for now.
|
||||
|
|
@ -258,13 +258,13 @@ Now our file looks like this:
|
|||
#include "global.h"
|
||||
#include "entity.h"
|
||||
|
||||
extern void sub_0805EC9C();
|
||||
extern void SetAffineInfo();
|
||||
extern void (*gUnk_08120668[])(Entity *);
|
||||
|
||||
void sub_08086284(Entity *r0) {
|
||||
gUnk_08120668[r0->action](r0);
|
||||
r0->bitfield = 0;
|
||||
sub_0805EC9C(r0, r0->field_0x76.HWORD, r0->field_0x7a.HWORD, 0);
|
||||
SetAffineInfo(r0, r0->field_0x76.HWORD, r0->field_0x7a.HWORD, 0);
|
||||
return;
|
||||
}
|
||||
```
|
||||
|
|
|
|||
|
|
@ -488,7 +488,7 @@ sub_08026060: @ 0x08026060
|
|||
adds r0, #4
|
||||
ldrh r3, [r0]
|
||||
adds r0, r4, #0
|
||||
bl sub_0805EC9C
|
||||
bl SetAffineInfo
|
||||
pop {r4, pc}
|
||||
.align 2, 0
|
||||
_0802608C: .4byte gUnk_080CC1C8
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ _0805E6CC: .4byte gPlayerEntity
|
|||
_0805E6D0: .4byte gUpdateContext
|
||||
_0805E6D4:
|
||||
adds r4, #0x88
|
||||
ldr r0, _0805E738 @ =gUnk_03003BE0
|
||||
ldr r0, _0805E738 @ =gCarryEntities
|
||||
cmp r4, r0
|
||||
blo _0805E6A8
|
||||
movs r0, #0
|
||||
|
|
@ -101,7 +101,7 @@ _0805E730:
|
|||
mov r8, r3
|
||||
pop {r4, r5, r6, r7, pc}
|
||||
.align 2, 0
|
||||
_0805E738: .4byte gUnk_03003BE0
|
||||
_0805E738: .4byte gCarryEntities
|
||||
_0805E73C: .4byte gEntityLists
|
||||
_0805E740: .4byte gUpdateContext
|
||||
.syntax divided
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ _0802B00C:
|
|||
adds r0, r4, #0
|
||||
adds r1, r2, #0
|
||||
movs r3, #0
|
||||
bl sub_0805EC9C
|
||||
bl SetAffineInfo
|
||||
_0802B022:
|
||||
ldrb r0, [r4, #0xf]
|
||||
ands r0, r7
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ _0805EDB4:
|
|||
strb r0, [r2]
|
||||
ldr r0, _0805EDF8 @ =gInput
|
||||
ldrh r0, [r0]
|
||||
bl sub_0805EE04
|
||||
bl ConvInputToState
|
||||
adds r1, r4, #0
|
||||
adds r1, #0x90
|
||||
strh r0, [r1]
|
||||
|
|
@ -88,7 +88,7 @@ _0805EDC6:
|
|||
ldrh r1, [r0]
|
||||
_0805EDCA:
|
||||
adds r0, r1, #0
|
||||
bl sub_0805EE04
|
||||
bl ConvInputToState
|
||||
ldr r3, _0805EDFC @ =gPlayerState
|
||||
adds r1, r3, #0
|
||||
adds r1, #0x90
|
||||
|
|
@ -252,7 +252,7 @@ _0809C7C4:
|
|||
adds r0, #6
|
||||
ldrh r3, [r0]
|
||||
adds r0, r5, #0
|
||||
bl sub_0805EC9C
|
||||
bl SetAffineInfo
|
||||
b _0809C7DE
|
||||
_0809C7D2:
|
||||
ldr r0, _0809C7E0 @ =gRoomControls
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ _08076138:
|
|||
_0807614A:
|
||||
adds r0, r4, #0
|
||||
movs r1, #0x13
|
||||
bl CreatePlayerBomb
|
||||
bl CreatePlayerItemWithParent
|
||||
adds r3, r0, #0
|
||||
cmp r3, #0
|
||||
bne _08076162
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ _08077370: .4byte gUnk_0811BE16
|
|||
_08077374:
|
||||
adds r0, r4, #0
|
||||
adds r1, r6, #0
|
||||
bl sub_08077E78
|
||||
bl DeletePlayerItem
|
||||
ldr r0, _08077388 @ =gPlayerState
|
||||
adds r0, #0x3d
|
||||
movs r1, #0
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ _080761DE:
|
|||
blo _0807626E
|
||||
cmp r3, #2
|
||||
bne _080762C0
|
||||
ldr r0, _0807622C @ =gUnk_03003BE0
|
||||
ldr r0, _0807622C @ =gCarryEntities
|
||||
ldr r2, [r0, #8]
|
||||
ldrb r1, [r2, #0x16]
|
||||
movs r0, #0xf
|
||||
|
|
@ -49,7 +49,7 @@ _080761DE:
|
|||
_08076220: .4byte gPlayerState
|
||||
_08076224: .4byte 0x00001201
|
||||
_08076228: .4byte gPlayerEntity
|
||||
_0807622C: .4byte gUnk_03003BE0
|
||||
_0807622C: .4byte gCarryEntities
|
||||
_08076230:
|
||||
str r2, [r4, #0x18]
|
||||
strb r3, [r2, #0xc]
|
||||
|
|
@ -132,7 +132,7 @@ _08063186:
|
|||
adds r0, r4, #0
|
||||
adds r1, r2, #0
|
||||
movs r3, #0
|
||||
bl sub_0805EC9C
|
||||
bl SetAffineInfo
|
||||
adds r0, r4, #0
|
||||
movs r1, #0x11
|
||||
bl InitAnimationForceUpdate
|
||||
|
|
@ -163,7 +163,7 @@ _080631CA:
|
|||
ldr r2, [r4, #0x70]
|
||||
adds r0, r4, #0
|
||||
movs r3, #0
|
||||
bl sub_0805EC9C
|
||||
bl SetAffineInfo
|
||||
ldr r1, _080631E4 @ =gActiveScriptInfo
|
||||
movs r0, #0
|
||||
strb r0, [r1, #6]
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
bl ResetPlayerEventPriority
|
||||
adds r0, r5, #0
|
||||
adds r1, r6, #0
|
||||
bl sub_08077E78
|
||||
bl DeletePlayerItem
|
||||
_08076C6E:
|
||||
pop {r4, r5, r6, pc}
|
||||
.align 2, 0
|
||||
|
|
|
|||
|
|
@ -308,7 +308,7 @@ _0809A420:
|
|||
adds r0, #0x7a
|
||||
ldrh r3, [r0]
|
||||
adds r0, r7, #0
|
||||
bl sub_0805EC9C
|
||||
bl SetAffineInfo
|
||||
b _0809A436
|
||||
_0809A432:
|
||||
subs r0, #1
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ _080AD0D8:
|
|||
ldr r0, [r4, #0x34]
|
||||
str r0, [r5, #0x34]
|
||||
adds r0, r4, #0
|
||||
bl sub_080B1AA8
|
||||
bl GetTileUnderEntity
|
||||
cmp r0, #0x11
|
||||
bhi _080AD0FC
|
||||
cmp r0, #0x10
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
cmp r0, #0
|
||||
bne _0801B2DE
|
||||
adds r0, r4, #0
|
||||
bl sub_08078930
|
||||
bl RegisterCarryEntity
|
||||
_0801B2DE:
|
||||
movs r0, #8
|
||||
bl IsItemEquipped
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ _0801B3E0:
|
|||
adds r0, r4, #0
|
||||
adds r1, r2, #0
|
||||
movs r3, #0
|
||||
bl sub_0805EC9C
|
||||
bl SetAffineInfo
|
||||
_0801B3F4:
|
||||
ldrb r0, [r4, #0xf]
|
||||
ands r0, r5
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
push {r4, r5, lr}
|
||||
adds r5, r0, #0
|
||||
movs r4, #0
|
||||
ldr r0, _08078970 @ =gUnk_03003BE0
|
||||
ldr r0, _08078970 @ =gCarryEntities
|
||||
ldrb r1, [r0, #2]
|
||||
adds r2, r0, #0
|
||||
cmp r4, r1
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
subs r0, r1, #1
|
||||
b _0807898C
|
||||
.align 2, 0
|
||||
_08078970: .4byte gUnk_03003BE0
|
||||
_08078970: .4byte gCarryEntities
|
||||
_08078974:
|
||||
adds r4, #1
|
||||
ldrb r3, [r2, #2]
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
.syntax unified
|
||||
push {lr}
|
||||
adds r3, r0, #0
|
||||
ldr r2, _08078950 @ =gUnk_03003BE0
|
||||
ldr r2, _08078950 @ =gCarryEntities
|
||||
ldrb r0, [r2, #2]
|
||||
cmp r0, #0x1f
|
||||
bhi _0807894C
|
||||
|
|
@ -16,5 +16,5 @@
|
|||
_0807894C:
|
||||
pop {pc}
|
||||
.align 2, 0
|
||||
_08078950: .4byte gUnk_03003BE0
|
||||
_08078950: .4byte gCarryEntities
|
||||
.syntax divided
|
||||
|
|
@ -124,7 +124,7 @@ _08078278:
|
|||
ldrb r0, [r0]
|
||||
cmp r0, #0xe
|
||||
beq _080782BC
|
||||
ldr r1, _080782A0 @ =gUnk_03003BE0
|
||||
ldr r1, _080782A0 @ =gCarryEntities
|
||||
ldrb r0, [r1, #1]
|
||||
movs r4, #9
|
||||
cmp r0, #2
|
||||
|
|
@ -136,7 +136,7 @@ _08078278:
|
|||
movs r4, #8
|
||||
b _080782B6
|
||||
.align 2, 0
|
||||
_080782A0: .4byte gUnk_03003BE0
|
||||
_080782A0: .4byte gCarryEntities
|
||||
_080782A4:
|
||||
adds r0, r5, #0
|
||||
adds r0, #0xa8
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@
|
|||
push {r4, r5, r6, r7, lr}
|
||||
mov r7, r8
|
||||
push {r7}
|
||||
ldr r1, _080789BC @ =gUnk_03003BE0
|
||||
ldr r1, _080789BC @ =gCarryEntities
|
||||
ldrb r0, [r1]
|
||||
cmp r0, #0
|
||||
beq _080789C0
|
||||
ldrb r0, [r1, #1]
|
||||
b _08078A88
|
||||
.align 2, 0
|
||||
_080789BC: .4byte gUnk_03003BE0
|
||||
_080789BC: .4byte gCarryEntities
|
||||
_080789C0:
|
||||
ldr r0, _08078A5C @ =gPlayerState
|
||||
ldr r0, [r0, #0x30]
|
||||
|
|
@ -34,7 +34,7 @@ _080789E6:
|
|||
ldrb r0, [r0, #0x12]
|
||||
cmp r0, #0x12
|
||||
beq _08078A56
|
||||
ldr r3, _08078A68 @ =gUnk_03003BE0
|
||||
ldr r3, _08078A68 @ =gCarryEntities
|
||||
movs r0, #1
|
||||
strb r0, [r3]
|
||||
ldrb r4, [r3, #2]
|
||||
|
|
@ -80,7 +80,7 @@ _08078A2E:
|
|||
lsls r2, r2, #0x18
|
||||
asrs r2, r2, #0x18
|
||||
bl sub_080B1A0C
|
||||
ldr r4, _08078A68 @ =gUnk_03003BE0
|
||||
ldr r4, _08078A68 @ =gCarryEntities
|
||||
strh r0, [r4, #4]
|
||||
movs r1, #6
|
||||
bl sub_0806FC24
|
||||
|
|
@ -93,7 +93,7 @@ _08078A56:
|
|||
_08078A5C: .4byte gPlayerState
|
||||
_08078A60: .4byte gPlayerEntity
|
||||
_08078A64: .4byte gUnk_080084BC
|
||||
_08078A68: .4byte gUnk_03003BE0
|
||||
_08078A68: .4byte gCarryEntities
|
||||
_08078A6C: .4byte gUnk_0811BFE0
|
||||
_08078A70: .4byte gUnk_08007DF4
|
||||
_08078A74:
|
||||
|
|
|
|||
|
|
@ -150,6 +150,6 @@ _0808ACDE:
|
|||
ldr r2, [r4, #0x78]
|
||||
ldr r3, [r4, #0x70]
|
||||
adds r0, r4, #0
|
||||
bl sub_0805EC9C
|
||||
bl SetAffineInfo
|
||||
pop {r4, r5, pc}
|
||||
.syntax divided
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ _0808C9FA:
|
|||
adds r0, r4, #0
|
||||
adds r1, r2, #0
|
||||
movs r3, #0
|
||||
bl sub_0805EC9C
|
||||
bl SetAffineInfo
|
||||
_0808CA04:
|
||||
pop {r4, pc}
|
||||
.align 2, 0
|
||||
|
|
@ -205,7 +205,7 @@ _0808CAD6:
|
|||
adds r0, r4, #0
|
||||
adds r1, r3, #0
|
||||
movs r3, #0
|
||||
bl sub_0805EC9C
|
||||
bl SetAffineInfo
|
||||
_0808CAE0:
|
||||
pop {r4, r5, r6, pc}
|
||||
.align 2, 0
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ EvilSpirit: @ 0x08086284
|
|||
ldrh r2, [r0]
|
||||
adds r0, r4, #0
|
||||
movs r3, #0
|
||||
bl sub_0805EC9C
|
||||
bl SetAffineInfo
|
||||
pop {r4, pc}
|
||||
.align 2, 0
|
||||
_080862B4: .4byte gUnk_08120668
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ sub_08091C0C: @ 0x08091C0C
|
|||
adds r0, r4, #0
|
||||
bl CopyPosition
|
||||
adds r0, r4, #0
|
||||
bl sub_080B1AA8
|
||||
bl GetTileUnderEntity
|
||||
cmp r0, #0x68
|
||||
beq _08091C46
|
||||
cmp r0, #0x68
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ _080A04F8:
|
|||
adds r1, r4, #0
|
||||
adds r2, r4, #0
|
||||
movs r3, #0
|
||||
bl sub_0805EC9C
|
||||
bl SetAffineInfo
|
||||
movs r1, #0xe0
|
||||
lsls r1, r1, #1
|
||||
subs r1, r1, r4
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ _08093040:
|
|||
cmp r0, #0
|
||||
beq _080930E6
|
||||
adds r0, r6, #0
|
||||
bl sub_08078930
|
||||
bl RegisterCarryEntity
|
||||
adds r3, r7, #0
|
||||
ldrb r2, [r3]
|
||||
movs r0, #0x80
|
||||
|
|
|
|||
|
|
@ -5,22 +5,22 @@
|
|||
|
||||
.text
|
||||
|
||||
@ r0 = Entity*
|
||||
@ r1 = Gravity strength
|
||||
@ returns z pos
|
||||
thumb_func_start GravityUpdate
|
||||
GravityUpdate: @ 0x08003FC4
|
||||
@ r0 = Entity*
|
||||
@ r1 = Gravity strength
|
||||
@ returns z pos
|
||||
|
||||
adds r3, r0, #0
|
||||
ldr r0, [r3, #0x34]
|
||||
ldr r2, [r3, #0x20]
|
||||
subs r0, r0, r2
|
||||
bpl _08003FD6
|
||||
bpl hitground
|
||||
subs r2, r2, r1
|
||||
str r0, [r3, #0x34]
|
||||
str r2, [r3, #0x20]
|
||||
bx lr
|
||||
_08003FD6:
|
||||
hitground:
|
||||
movs r0, #0
|
||||
str r0, [r3, #0x34]
|
||||
str r0, [r3, #0x20]
|
||||
|
|
@ -29,7 +29,7 @@ _08003FD6:
|
|||
non_word_aligned_thumb_func_start sub_08003FDE
|
||||
sub_08003FDE: @ 0x08003FDE
|
||||
push {r0, lr}
|
||||
bl sub_08003FF2
|
||||
bl CheckEntityPickup
|
||||
cmp r0, #0
|
||||
pop {r2}
|
||||
beq _08003FF0
|
||||
|
|
@ -38,8 +38,8 @@ sub_08003FDE: @ 0x08003FDE
|
|||
_08003FF0:
|
||||
pop {pc}
|
||||
|
||||
non_word_aligned_thumb_func_start sub_08003FF2
|
||||
sub_08003FF2: @ 0x08003FF2
|
||||
non_word_aligned_thumb_func_start CheckEntityPickup
|
||||
CheckEntityPickup: @ 0x08003FF2
|
||||
push {r4, r5, r6, r7, lr}
|
||||
ldr r4, [r1, #0x48]
|
||||
ldrb r5, [r4, #6]
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ _08004516:
|
|||
thumb_func_start sub_0800451C
|
||||
sub_0800451C: @ 0x0800451C
|
||||
push {r0, lr}
|
||||
bl sub_080B1AA8
|
||||
bl GetTileUnderEntity
|
||||
adds r1, r0, #0
|
||||
pop {r0, r3}
|
||||
mov lr, r3
|
||||
|
|
|
|||
|
|
@ -13,37 +13,25 @@ header:
|
|||
start_vector:
|
||||
mov r0, #0x12
|
||||
msr cpsr_fc, r0
|
||||
ldr sp, sp_irq
|
||||
ldr sp, =irq_stack_begin
|
||||
mov r0, #0x1f
|
||||
msr cpsr_fc, r0
|
||||
ldr sp, sp_usr
|
||||
ldr r1, INTR_VECTOR_BUF
|
||||
ldr r0, intr_main
|
||||
ldr sp, =usr_stack_begin
|
||||
ldr r1, =0x03007FFC
|
||||
ldr r0, =ram_IntrMain
|
||||
str r0, [r1]
|
||||
.ifdef EU
|
||||
ldr r1, unk_function
|
||||
mov lr, pc
|
||||
bx r1
|
||||
.else
|
||||
.ifdef DEMO_JP
|
||||
ldr r1, unk_function
|
||||
|
||||
.ifndef USA
|
||||
.ifndef DEMO_USA
|
||||
.ifndef JP
|
||||
ldr r1, =fill_rq_stack
|
||||
mov lr, pc
|
||||
bx r1
|
||||
.endif
|
||||
.endif
|
||||
.endif
|
||||
|
||||
ldr r1, =AgbMain
|
||||
mov lr, pc
|
||||
bx r1
|
||||
_080000F0:
|
||||
b start_vector
|
||||
sp_irq: .4byte irq_stack_begin
|
||||
sp_usr: .4byte usr_stack_begin
|
||||
INTR_VECTOR_BUF: .4byte 0x03007FFC
|
||||
intr_main: .4byte ram_IntrMain
|
||||
.ifdef EU
|
||||
unk_function: .4byte fill_rq_stack
|
||||
.else
|
||||
.ifdef DEMO_JP
|
||||
unk_function: .4byte fill_rq_stack
|
||||
.endif
|
||||
.endif
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ arm_sub_080B1A8C: @ 0x080B1A8C
|
|||
ldrb r2, [r0, #0x38]
|
||||
mov r0, r3
|
||||
b arm_sub_080B1AB4
|
||||
arm_sub_080B1AA8:
|
||||
arm_GetTileUnderEntity:
|
||||
ldrb r2, [r0, #0x38]
|
||||
ldrh r1, [r0, #0x32]
|
||||
ldrh r0, [r0, #0x2e]
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ _08016A64:
|
|||
sub_08016A6C: @ 0x08016A6C
|
||||
push {r4, r5, lr}
|
||||
adds r4, r0, #0
|
||||
bl sub_080B1AA8
|
||||
bl GetTileUnderEntity
|
||||
add r1, pc, #0x38
|
||||
_08016A76:
|
||||
adds r1, #4
|
||||
|
|
|
|||
|
|
@ -0,0 +1,43 @@
|
|||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
.syntax unified
|
||||
.text
|
||||
|
||||
thumb_func_start fill_rq_stack
|
||||
fill_rq_stack: // fill iqr and user stack with 'MCZ3'
|
||||
adr r0, pool
|
||||
ldm r0!, {r1, r2, r3}
|
||||
loop1:
|
||||
subs r2, #4
|
||||
str r1, [r2]
|
||||
cmp r2, r3
|
||||
bgt loop1
|
||||
bx lr
|
||||
|
||||
// unused
|
||||
// returns the maximum values reached by irq stack (r0) and usr stack (r1)
|
||||
check_stack_threshold:
|
||||
adr r0, pool
|
||||
ldm r0!, {r1, r2, r3}
|
||||
loop2:
|
||||
ldr r0, [r3]
|
||||
adds r3, #4
|
||||
cmp r0, r1 // cmp against magic
|
||||
beq loop2
|
||||
|
||||
subs r2, #0xa0
|
||||
loop3:
|
||||
ldr r0, [r2]
|
||||
adds r2, #4
|
||||
cmp r0, r1 // cmp against magic
|
||||
beq loop3
|
||||
|
||||
subs r1, r2, #4
|
||||
subs r0, r3, #4
|
||||
bx lr
|
||||
|
||||
.align 2, 0
|
||||
pool:
|
||||
.byte '3, 'Z, 'C, 'M // r1
|
||||
.4byte irq_stack_begin // r2
|
||||
.4byte usr_stack_top // r3
|
||||
|
|
@ -5,51 +5,6 @@
|
|||
|
||||
.text
|
||||
|
||||
.ifndef USA
|
||||
.ifndef DEMO_USA
|
||||
.ifndef JP
|
||||
thumb_func_start fill_rq_stack
|
||||
fill_rq_stack: // fill iqr and user stack with 'MCZ3'
|
||||
adr r0, 1f
|
||||
ldm r0!, {r1, r2, r3}
|
||||
0:
|
||||
subs r2, #4
|
||||
str r1, [r2]
|
||||
cmp r2, r3
|
||||
bgt 0b
|
||||
bx lr
|
||||
|
||||
// unused
|
||||
// returns the maximum values reached by irq stack (r0) and usr stack (r1)
|
||||
check_stack_threshold:
|
||||
adr r0, 1f
|
||||
ldm r0!, {r1, r2, r3}
|
||||
0:
|
||||
ldr r0, [r3]
|
||||
adds r3, #4
|
||||
cmp r0, r1 // cmp against magic
|
||||
beq 0b
|
||||
|
||||
subs r2, #0xa0
|
||||
0:
|
||||
ldr r0, [r2]
|
||||
adds r2, #4
|
||||
cmp r0, r1 // cmp against magic
|
||||
beq 0b
|
||||
|
||||
subs r1, r2, #4
|
||||
subs r0, r3, #4
|
||||
bx lr
|
||||
|
||||
.align 2, 0
|
||||
1:
|
||||
.byte '3, 'Z, 'C, 'M // r1
|
||||
.4byte irq_stack_begin // r2
|
||||
.4byte usr_stack_top // r3
|
||||
.endif
|
||||
.endif
|
||||
.endif
|
||||
|
||||
thumb_func_start UpdateScrollVram
|
||||
UpdateScrollVram: @ 0x08000108
|
||||
push {r4, lr}
|
||||
|
|
@ -322,9 +277,9 @@ sub_080B1A8C: @ 0x080002B4
|
|||
@ return:
|
||||
@ ========
|
||||
@ Called every frame a pot is thrown, every frame the screen is sliding in a transition, and once when entering stairs.
|
||||
thumb_func_start sub_080B1AA8
|
||||
sub_080B1AA8: @ 0x080002B8
|
||||
ldr r3, _08000324 @ =ram_sub_080B1AA8
|
||||
thumb_func_start GetTileUnderEntity
|
||||
GetTileUnderEntity: @ 0x080002B8
|
||||
ldr r3, _08000324 @ =ram_GetTileUnderEntity
|
||||
bx r3
|
||||
|
||||
@ call 0x080B1AB4
|
||||
|
|
@ -458,7 +413,7 @@ _08000314: .4byte ram_sub_080B1A48
|
|||
_08000318: .4byte ram_sub_080B1A58
|
||||
_0800031C: .4byte ram_GetTileType
|
||||
_08000320: .4byte ram_sub_080B1A8C
|
||||
_08000324: .4byte ram_sub_080B1AA8
|
||||
_08000324: .4byte ram_GetTileUnderEntity
|
||||
_08000328: .4byte ram_sub_080B1AB4
|
||||
_0800032C: .4byte ram_sub_080B1AC8
|
||||
_08000330: .4byte ram_sub_080B1AD8
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
|
||||
gUnk_0811BDB4:: @ 0811BDB4
|
||||
.4byte sub_080761C0
|
||||
.4byte ItemPickupCheck
|
||||
.4byte sub_080762D8
|
||||
.4byte sub_08076488
|
||||
.4byte sub_08076518
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ SCRIPT_START script_ZeldaIntroBusinessScrub
|
|||
SetEntitySpeed 0x0200
|
||||
WalkSouth 0x0008
|
||||
SetAnimation 0x0040
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
SetAnimationState 0x0006
|
||||
DoPostScriptAction 0x0000
|
||||
SetSyncFlag 0x00000002
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ SCRIPT_START script_Npc4EMonsters
|
|||
Call NPC4E_SaveEquippedItems
|
||||
Call SetPlayerActionNormal
|
||||
CallWithArg EquipItem, 0x0000000d
|
||||
CallWithArg sub_0807F29C, gUnk_080049F6
|
||||
CallWithArg SetInputMacro, gUnk_080049F6
|
||||
_0807F0B4 0x0001
|
||||
SetEntityPositionRelative 0x01f8, 0x0068
|
||||
SetSyncFlag 0x00000004
|
||||
|
|
@ -41,7 +41,7 @@ SCRIPT_START script_Npc4EMonsters
|
|||
PlaySound SFX_1C3
|
||||
SetSyncFlag 0x20000000
|
||||
Wait 0x0078
|
||||
CallWithArg sub_0807F29C, 0x00000000
|
||||
CallWithArg SetInputMacro, 0x00000000
|
||||
Call NPC4E_RestoreEquippedItems
|
||||
SetSyncFlag 0x40000000
|
||||
SetSyncFlag 0x00000010
|
||||
|
|
|
|||
|
|
@ -10,11 +10,11 @@ SCRIPT_START script_Npc4EVaatiAttacking
|
|||
Call NPC4E_SaveEquippedItems
|
||||
Call SetPlayerActionNormal
|
||||
CallWithArg EquipItem, 0x0000000d
|
||||
CallWithArg sub_0807F29C, gUnk_080049F6
|
||||
CallWithArg SetInputMacro, gUnk_080049F6
|
||||
Wait 0x001e
|
||||
SetSyncFlag 0x00000100
|
||||
WaitForSyncFlagAndClear 0x00000200
|
||||
CallWithArg sub_0807F29C, 0x00000000
|
||||
CallWithArg SetInputMacro, 0x00000000
|
||||
Call NPC4E_RestoreEquippedItems
|
||||
Wait 0x003c
|
||||
SetSyncFlag 0x08000000
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ SCRIPT_START script_PlayerFainting
|
|||
Call sub_0807F1E8
|
||||
DoPostScriptAction 0x0011
|
||||
EndBlock
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
WaitForSyncFlag 0x80000000
|
||||
Call SetPlayerActionNormal
|
||||
SCRIPT_END
|
||||
|
|
|
|||
|
|
@ -13,21 +13,21 @@ SCRIPT_START script_VaatiIntroCeremony
|
|||
WaitForSyncFlagAndClear 0x00000100
|
||||
SetAnimationState 0x0004
|
||||
DoPostScriptAction 0x001c
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
SetAnimationState 0x0004
|
||||
DoPostScriptAction 0x0000
|
||||
SetSyncFlag 0x00000200
|
||||
WaitForSyncFlagAndClear 0x00000100
|
||||
SetAnimationState 0x0000
|
||||
DoPostScriptAction 0x001c
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
SetAnimationState 0x0000
|
||||
DoPostScriptAction 0x0000
|
||||
SetSyncFlag 0x00000200
|
||||
WaitForSyncFlagAndClear 0x00000100
|
||||
SetAnimationState 0x0000
|
||||
DoPostScriptAction 0x001a
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
DoPostScriptAction 0x0000
|
||||
SetSyncFlag 0x00000200
|
||||
WaitForSyncFlagAndClear 0x00000100
|
||||
|
|
@ -71,7 +71,7 @@ SCRIPT_START script_VaatiIntroCeremony
|
|||
Wait 0x005a
|
||||
SetAnimationState 0x0004
|
||||
DoPostScriptAction 0x001c
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
SetAnimationState 0x0004
|
||||
DoPostScriptAction 0x0000
|
||||
Wait 0x001e
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ script_08011206:
|
|||
Call sub_08066E20
|
||||
Wait 0x0014
|
||||
DoPostScriptAction 0x0010
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
PlaySound SFX_1CA
|
||||
SetSyncFlag 0x00000020
|
||||
WaitForSyncFlagAndClear 0x00000010
|
||||
|
|
|
|||
|
|
@ -164,14 +164,14 @@ SCRIPT_START script_Npc4EIntroTown
|
|||
CallWithArg EquipItem, 0x0000000d
|
||||
SetIntVariable 0x000000ff
|
||||
Call sub_0807F5B0
|
||||
CallWithArg sub_0807F29C, gUnk_080049D6
|
||||
CallWithArg SetInputMacro, gUnk_080049D6
|
||||
Wait 0x00b7
|
||||
SetIntVariable 0x00000000
|
||||
Call sub_0807F5B0
|
||||
MessageFromTargetPos 0x102c, 0x0000
|
||||
WaitUntilTextboxCloses
|
||||
@ Give control back to the player
|
||||
CallWithArg sub_0807F29C, 0x00000000
|
||||
CallWithArg SetInputMacro, 0x00000000
|
||||
Call NPC4E_RestoreEquippedItems
|
||||
_0807F0B4 0x0004
|
||||
CameraTargetPlayer
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ SCRIPT_START script_MinishEzlo
|
|||
SetSyncFlag 0x00010000
|
||||
WaitForSyncFlagAndClear 0x00008000
|
||||
SetAnimation 0x000d
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
SetSyncFlag 0x00010000
|
||||
Wait 0x003c
|
||||
DoPostScriptAction 0x0005
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ SCRIPT_START script_Object6AMinishCap
|
|||
SetSyncFlag 0x00000100
|
||||
WaitForSyncFlagAndClear 0x00000080
|
||||
SetAnimation 0x0001
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
DoPostScriptAction 0x0006
|
||||
SCRIPT_END
|
||||
.2byte 0x0000
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ SCRIPT_START script_Vaati
|
|||
SetSyncFlag 0x00001000
|
||||
WaitForSyncFlagAndClear 0x00000800
|
||||
DoPostScriptAction 0x0018
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
SetAnimationState 0x0004
|
||||
DoPostScriptAction 0x0000
|
||||
SetSyncFlag 0x00001000
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ SCRIPT_START script_VaatiAppearsAgain
|
|||
Wait 0x0014
|
||||
SetAnimationState 0x0000
|
||||
DoPostScriptAction 0x001c
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
DoPostScriptAction 0x0000
|
||||
SetSyncFlag 0x00000004
|
||||
WaitForSyncFlagAndClear 0x00000002
|
||||
|
|
|
|||
|
|
@ -25,17 +25,17 @@ SCRIPT_START script_MinishEzloGoodbye
|
|||
SetSyncFlag 0x00000004
|
||||
WaitForSyncFlagAndClear 0x00000002
|
||||
SetAnimation 0x000c
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
Call sub_08094B94
|
||||
SetSyncFlag 0x00000004
|
||||
WaitForSyncFlagAndClear 0x00000002
|
||||
SetAnimation 0x000f
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
SetSyncFlag 0x00000004
|
||||
WaitForSyncFlagAndClear 0x00000002
|
||||
CallWithArg sub_080960C4, script_Object6AEzloFinalMagic
|
||||
SetAnimation 0x0012
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
Wait 0x001e
|
||||
SetSyncFlag 0x00000020
|
||||
StopBgm
|
||||
|
|
|
|||
|
|
@ -10,20 +10,20 @@ SCRIPT_START script_MinishEzloOutro
|
|||
WaitForSyncFlagAndClear 0x00000002
|
||||
SetAnimation 0x000e
|
||||
DoPostScriptAction 0x0007
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
DoPostScriptAction 0x0004
|
||||
SetSyncFlag 0x00000040
|
||||
WaitForSyncFlagAndClear 0x00000002
|
||||
SetAnimation 0x000c
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
SetSyncFlag 0x00000040
|
||||
WaitForSyncFlagAndClear 0x00000002
|
||||
SetAnimation 0x000f
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
SetSyncFlag 0x00000040
|
||||
WaitForSyncFlagAndClear 0x00000002
|
||||
SetAnimation 0x000c
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
SetSyncFlag 0x00000040
|
||||
WaitForSyncFlagAndClear 0x00000002
|
||||
CallWithArg sub_080960C4, script_EzloZeldaMagic
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
@ Sanctuary Player faint from Vaati attack
|
||||
SCRIPT_START script_PlayerFaintAgain
|
||||
Call sub_0807F1C4
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
Call sub_0807F1E8
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
SetSyncFlag 0x00000002
|
||||
WaitForSyncFlagAndClear 0x00000004
|
||||
PlaySound SFX_PLY_JUMP
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ SCRIPT_START script_VaatiTakeover
|
|||
Wait 0x0014
|
||||
SetAnimationState 0x0000
|
||||
DoPostScriptAction 0x001c
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
DoPostScriptAction 0x0000
|
||||
SetSyncFlag 0x00000020
|
||||
WaitForSyncFlagAndClear 0x00000010
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ SCRIPT_START script_Vaati1Intro
|
|||
PlayBgm BGM_VAATI_REBORN
|
||||
DoPostScriptAction 0x0019
|
||||
PlaySound SFX_198
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
SetRoomFlag 0x0000
|
||||
DoPostScriptAction 0x0008
|
||||
Wait 0x0080
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ SCRIPT_START script_VaatiWithZelda
|
|||
Wait 0x003c
|
||||
SetAnimationState 0x0004
|
||||
DoPostScriptAction 0x001c
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
DoPostScriptAction 0x0000
|
||||
Wait 0x003c
|
||||
SetSyncFlag 0x00000002
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ script_0800DCD0:
|
|||
StopBgm
|
||||
Call sub_08066E50
|
||||
PlaySound SFX_1C9
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
PlaySound SFX_1CA
|
||||
Wait 0x003c
|
||||
DoPostScriptAction 0x0004
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ script_0800E974:
|
|||
JumpIfNot script_0800E974
|
||||
SetPlayerIdle
|
||||
SetAnimation 0x0008
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
SetAnimation 0x0009
|
||||
Call sub_0806B260
|
||||
JumpIfNot script_0800E9E4
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ script_08012440:
|
|||
JumpIfNot script_08012440
|
||||
SetPlayerIdle
|
||||
SetAnimation 0x0008
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
SetAnimation 0x0009
|
||||
Call sub_0806B2B4
|
||||
WaitUntilTextboxCloses
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ script_08008BA2:
|
|||
TriggerInteract
|
||||
SetPlayerIdle
|
||||
SetAnimation 0x0004
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
MessageFromTarget 0x4912
|
||||
WaitUntilTextboxCloses
|
||||
SetAnimation 0x0008
|
||||
|
|
|
|||
|
|
@ -16,13 +16,13 @@ script_08008BD2:
|
|||
SetGlobalFlag 0x0061
|
||||
.endif
|
||||
SetAnimation 0x0004
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
WaitUntilTextboxCloses
|
||||
Call sub_0806BA34
|
||||
JumpIfNot script_08008C54
|
||||
WaitUntilTextboxCloses
|
||||
CallWithArg sub_0806BB1C, 0x00000000
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
CallWithArg sub_0806BB1C, 0x00000001
|
||||
Call sub_0806BB7C
|
||||
JumpIfNot script_08008C5C
|
||||
|
|
@ -34,11 +34,11 @@ script_08008BD2:
|
|||
Wait 0x000f
|
||||
PlaySound SFX_SECRET
|
||||
SetAnimation 0x0004
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
MessageNoOverlap 0x4913
|
||||
WaitUntilTextboxCloses
|
||||
SetAnimation 0x0008
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
Jump script_08008C5C
|
||||
script_08008C54:
|
||||
SetAnimation 0x0008
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ script_08008B6E:
|
|||
TriggerInteract
|
||||
SetPlayerIdle
|
||||
SetAnimation 0x0004
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
Call sub_0806BBB0
|
||||
WaitUntilTextboxCloses
|
||||
SetAnimation 0x0008
|
||||
|
|
|
|||
|
|
@ -12,12 +12,12 @@ script_0800EA6A:
|
|||
SetPlayerIdle
|
||||
FacePlayer
|
||||
CallWithArg sub_0807F3D8, 0x00000004
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
SetAnimation 0x0009
|
||||
Call sub_0806CE80
|
||||
WaitUntilTextboxCloses
|
||||
EnablePlayerControl
|
||||
SetAnimation 0x000a
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
SetAnimation 0x0008
|
||||
Jump script_0800EA6A
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ script_080106BE:
|
|||
JumpIfNot script_080106BE
|
||||
SetPlayerIdle
|
||||
FacePlayer
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
DoPostScriptAction 0x0000
|
||||
HasRoomItemForSale
|
||||
JumpIf script_080106E0
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ script_080107AA:
|
|||
CheckEntityInteractType
|
||||
JumpIfNot script_080107AA
|
||||
SetPlayerIdle
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
DoPostScriptAction 0x0001
|
||||
Call sub_08062CBC
|
||||
WaitUntilTextboxCloses
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ script_08016262:
|
|||
Call sub_08068E00
|
||||
WaitUntilTextboxCloses
|
||||
DoPostScriptAction 0x0001
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
Call sub_08068E90
|
||||
Call sub_08068C8C
|
||||
JumpIf script_0801631C
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ script_0800B0E8:
|
|||
script_0800B0F6:
|
||||
SetPlayerIdle
|
||||
Call sub_0807DF28
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
FacePlayer
|
||||
CallWithArg sub_0806BC94, 0x00000004
|
||||
Call sub_0806BCE8
|
||||
|
|
@ -24,7 +24,7 @@ script_0800B0F6:
|
|||
script_0800B134:
|
||||
SetPlayerIdle
|
||||
Call sub_0807DF28
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
FacePlayer
|
||||
CallWithArg sub_0806BC94, 0x00000004
|
||||
Call sub_0807F650
|
||||
|
|
|
|||
|
|
@ -85,9 +85,9 @@ script_080138D0:
|
|||
.endif
|
||||
Call NPC4E_SaveEquippedItems
|
||||
CallWithArg EquipItem, 0x00010001
|
||||
CallWithArg sub_0807F29C, gUnk_080049FE
|
||||
CallWithArg SetInputMacro, gUnk_080049FE
|
||||
Wait 0x00c8
|
||||
CallWithArg sub_0807F29C, 0x00000000
|
||||
CallWithArg SetInputMacro, 0x00000000
|
||||
Call NPC4E_RestoreEquippedItems
|
||||
script_08013A8E:
|
||||
.ifndef EU
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ SCRIPT_START script_Object6ASword2
|
|||
EndBlock
|
||||
WaitForSyncFlagAndClear 0x00000080
|
||||
SetAnimation 0x000c
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
SetSyncFlag 0x00000100
|
||||
WaitForSyncFlagAndClear 0x00000080
|
||||
DoPostScriptAction 0x0006
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ SCRIPT_START script_Object6ASword3
|
|||
EndBlock
|
||||
WaitForSyncFlagAndClear 0x00000080
|
||||
SetAnimation 0x000d
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
SetSyncFlag 0x00000100
|
||||
WaitForSyncFlagAndClear 0x00000080
|
||||
DoPostScriptAction 0x0006
|
||||
|
|
|
|||
|
|
@ -9,6 +9,6 @@ SCRIPT_START script_Object6ASwordCharge10
|
|||
EndBlock
|
||||
WaitForSyncFlag 0x00000020
|
||||
Wait 0x0078
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
DoPostScriptAction 0x0006
|
||||
SCRIPT_END
|
||||
|
|
|
|||
|
|
@ -6,11 +6,11 @@ SCRIPT_START script_Object6ASwordCharge5
|
|||
EndBlock
|
||||
WaitForSyncFlagAndClear 0x00000200
|
||||
SetAnimation 0x0008
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
SetAnimation 0x000c
|
||||
SetSyncFlag 0x00002000
|
||||
WaitForSyncFlag 0x00000020
|
||||
SetAnimation 0x0010
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
DoPostScriptAction 0x0006
|
||||
SCRIPT_END
|
||||
|
|
|
|||
|
|
@ -6,11 +6,11 @@ SCRIPT_START script_Object6ASwordCharge6
|
|||
EndBlock
|
||||
WaitForSyncFlagAndClear 0x00000400
|
||||
SetAnimation 0x0009
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
SetAnimation 0x000d
|
||||
SetSyncFlag 0x00004000
|
||||
WaitForSyncFlag 0x00000020
|
||||
SetAnimation 0x0011
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
DoPostScriptAction 0x0006
|
||||
SCRIPT_END
|
||||
|
|
|
|||
|
|
@ -7,12 +7,12 @@ SCRIPT_START script_Object6ASwordCharge8
|
|||
EndBlock
|
||||
WaitForSyncFlagAndClear 0x00001000
|
||||
SetAnimation 0x000b
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
SetAnimation 0x000f
|
||||
SetSyncFlag 0x00010000
|
||||
WaitForSyncFlag 0x00000020
|
||||
SetAnimation 0x0013
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
DoPostScriptAction 0x0006
|
||||
SCRIPT_END
|
||||
.2byte 0x0000
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ SCRIPT_START script_Object6ASwordCharge9
|
|||
EndBlock
|
||||
WaitForSyncFlag 0x00000020
|
||||
Wait 0x0078
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
DoPostScriptAction 0x0006
|
||||
SCRIPT_END
|
||||
.2byte 0x0000
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ SCRIPT_START script_Object6ASwordInPedestal
|
|||
EndBlock
|
||||
WaitForSyncFlagAndClear 0x00000080
|
||||
SetAnimation 0x000b
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
SetSyncFlag 0x00000100
|
||||
WaitForSyncFlagAndClear 0x00000080
|
||||
DoPostScriptAction 0x0006
|
||||
|
|
|
|||
|
|
@ -7,12 +7,12 @@ SCRIPT_START script_Objet6ASwordCharge7
|
|||
EndBlock
|
||||
WaitForSyncFlagAndClear 0x00000800
|
||||
SetAnimation 0x000a
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
SetAnimation 0x000e
|
||||
SetSyncFlag 0x00008000
|
||||
WaitForSyncFlag 0x00000020
|
||||
SetAnimation 0x0012
|
||||
Call WaitForFrameHiBit
|
||||
Call WaitForAnimDone
|
||||
DoPostScriptAction 0x0006
|
||||
SCRIPT_END
|
||||
.2byte 0x0000
|
||||
|
|
|
|||
|
|
@ -0,0 +1,38 @@
|
|||
headers=""
|
||||
num=0
|
||||
|
||||
recurse_dir() {
|
||||
for file in `ls $1`
|
||||
do
|
||||
if [ -d $1/$file ]
|
||||
then
|
||||
recurse_dir $1/$file
|
||||
else
|
||||
if [ -f $1/$file ]
|
||||
then
|
||||
if [ ${file##*.} = "h" ]
|
||||
then
|
||||
# make a copy of the path but without ./
|
||||
p=${1#./}
|
||||
#if path begins with / then remove it
|
||||
p=${p#/}
|
||||
# if path isnt empty add /
|
||||
if [ -n "$p" ]
|
||||
then
|
||||
p="$p/"
|
||||
fi
|
||||
headers+="#include \"$p$file\"\n"
|
||||
num=$(( $num + 1 ))
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
cd include
|
||||
recurse_dir ./
|
||||
cd ..
|
||||
|
||||
echo "#include \"gba/types.h\"\n$headers" | cc -E -nostdinc -Iinclude -Itools/agbcc/include - > ctx.c
|
||||
echo "$headers"
|
||||
echo "$num headers, written to ctx.c"
|
||||
|
|
@ -7,13 +7,16 @@
|
|||
s16 FixedMul(s16 r0, s16 r1);
|
||||
s16 FixedDiv(s16 r0, s16 r1);
|
||||
|
||||
void* AllocMutableHitbox(Entity*);
|
||||
void UnloadHitbox(Entity*);
|
||||
|
||||
void CopyPosition(Entity*, Entity*);
|
||||
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 SortEntityAbove(Entity*, Entity*);
|
||||
void SortEntityBelow(Entity*, Entity*);
|
||||
void SortEntityAbove(Entity* below_ent, Entity* above_ent);
|
||||
void SortEntityBelow(Entity* above_ent, Entity* below_ent);
|
||||
|
||||
u32 sub_0806F5A4(u32 idx);
|
||||
bool32 sub_0806F3E4(Entity*);
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ typedef struct {
|
|||
} Hitbox3D;
|
||||
|
||||
typedef struct {
|
||||
u8 b0 : 3; // 1-4
|
||||
u8 b0 : 3; // 1-4 /**< set to is 4 in entity init (default/lowest?)
|
||||
u8 b1 : 3; // 8
|
||||
u8 b2 : 1; // 0x40
|
||||
u8 b3 : 1; // 0x80
|
||||
|
|
@ -504,6 +504,8 @@ extern u8 gManagerCount;
|
|||
#define COLLISION_OFF(entity) ((entity)->flags &= ~ENT_COLLIDE)
|
||||
#define COLLISION_ON(entity) ((entity)->flags |= ENT_COLLIDE)
|
||||
|
||||
#define ANIM_DONE (1 << 7) /* invalid frame index */
|
||||
|
||||
/** @name Tile Macros */ /// @{
|
||||
#define TILE(x, y) (((((x)-gRoomControls.origin_x) >> 4) & 0x3F) | ((((y)-gRoomControls.origin_y) >> 4) & 0x3F) << 6)
|
||||
#define TILE_POS(x, y) (x + (y << 6))
|
||||
|
|
@ -512,7 +514,8 @@ extern u8 gManagerCount;
|
|||
/// @}
|
||||
|
||||
/** @name Animation State Macros */ ///@{
|
||||
#define AnimationStateTurnAround(expr) ((expr) ^ 0x4)
|
||||
#define AnimationStateFlip90(expr) ((expr) ^ 0x2)
|
||||
#define AnimationStateFlip180(expr) ((expr) ^ 0x4)
|
||||
#define AnimationStateIdle(expr) ((expr)&0x6)
|
||||
#define AnimationStateWalk(expr) ((expr)&0xe)
|
||||
///@}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ extern void CreateItemOnGround(Entity*);
|
|||
extern Entity* CreateLargeWaterTrace(Entity*);
|
||||
extern void CreateMagicSparkles(u32, u32, u32);
|
||||
extern void CreateMinishEntrance(u32 tile);
|
||||
extern Entity* CreatePlayerBomb(ItemBehavior*, u32);
|
||||
extern Entity* CreatePlayerItemWithParent(ItemBehavior*, u32);
|
||||
extern u32 CreateRandomItemDrop(Entity*, u32);
|
||||
extern void CreateSparkle(Entity*);
|
||||
extern void DoPlayerAction(Entity*);
|
||||
|
|
@ -85,7 +85,7 @@ extern void sub_08000148(u32, u32, u32);
|
|||
extern u32 sub_080B1A0C(Entity*, s32, s32);
|
||||
extern u32 sub_080B1A48(u32, u32, u32);
|
||||
extern u32 sub_080B1A8C(Entity*, u32, u32);
|
||||
extern u32 sub_080B1AA8(Entity*);
|
||||
extern u32 GetTileUnderEntity(Entity*);
|
||||
extern u32 sub_080B1AE0(u16, u8);
|
||||
extern u32 sub_080B1AF0(Entity*, s32, s32);
|
||||
extern u32 sub_080B1B18(s32, s32, u32);
|
||||
|
|
@ -152,8 +152,8 @@ extern void sub_08059278(void);
|
|||
extern void sub_0805B4D0(u32);
|
||||
extern void sub_0805BC4C(void);
|
||||
extern void sub_0805EC60(Entity*);
|
||||
extern void sub_0805EC9C(Entity*, u32, u32, u32);
|
||||
extern void sub_0805ED14(u32*);
|
||||
extern void SetAffineInfo(Entity*, u32, u32, u32);
|
||||
extern void InitPlayerMacro(u32*);
|
||||
extern u32* sub_0805F25C(u32);
|
||||
extern u32 sub_0805F7A0(u32);
|
||||
extern void sub_0805F8E4(u32 r0, WStruct* r1);
|
||||
|
|
@ -182,7 +182,7 @@ extern void sub_08077D38(ItemBehavior*, u32);
|
|||
extern void sub_08077DF4(ItemBehavior*, u32);
|
||||
extern void sub_08077E3C(ItemBehavior*, u32);
|
||||
extern void sub_08077E54(ItemBehavior*);
|
||||
extern void sub_08077E78(ItemBehavior*, u32);
|
||||
extern void DeletePlayerItem(ItemBehavior*, u32);
|
||||
extern bool32 sub_08077EC8(ItemBehavior*);
|
||||
extern bool32 sub_08077EFC(ItemBehavior*);
|
||||
extern bool32 sub_08077F10(ItemBehavior*);
|
||||
|
|
@ -198,8 +198,8 @@ extern void sub_08078850(Entity*, u32, u32, void*);
|
|||
extern s32 sub_0807887C(Entity*, u32, u32);
|
||||
extern void sub_080788E0(Entity*);
|
||||
extern s32 sub_08078904();
|
||||
extern void sub_08078930(Entity*);
|
||||
extern void sub_08078954(Entity*);
|
||||
extern void RegisterCarryEntity(Entity*);
|
||||
extern void FreeCarryEntity(Entity*);
|
||||
extern void sub_08078AC0(u32, u32, u32);
|
||||
extern void sub_08078B48(void);
|
||||
extern void sub_08078E84(Entity*, Entity*);
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ enum PlayerFlags {
|
|||
PL_FROZEN = 0x800,
|
||||
PL_IN_MINECART = 0x1000,
|
||||
PL_DRUGGED = 0x4000,
|
||||
PL_FLAGS8000 = 0x8000,
|
||||
PL_PIT_IS_EXIT = 0x8000,
|
||||
PL_FLAGS10000 = 0x10000,
|
||||
PL_FLAGS20000 = 0x20000,
|
||||
PL_ROLLING = 0x40000,
|
||||
|
|
@ -204,7 +204,7 @@ typedef struct {
|
|||
/*0x02*/ u8 jump_status;
|
||||
/*0x03*/ u8 field_0x3[2];
|
||||
/*0x05*/ u8 heldObject;
|
||||
/*0x06*/ u8 pushedObject;
|
||||
/*0x06*/ u8 pushedObject; // hi bit is special, rest is used as a timer
|
||||
/*0x07*/ u8 field_0x7;
|
||||
/*0x08*/ u16 animation;
|
||||
/*0x0a*/ u8 field_0xa;
|
||||
|
|
@ -224,7 +224,7 @@ typedef struct {
|
|||
/*0x1a*/ u8 mobility;
|
||||
/*0x1b*/ u8 sword_state;
|
||||
/*0x1c*/ u8 field_0x1c;
|
||||
/*0x1d*/ u8 field_0x1d;
|
||||
/*0x1d*/ u8 gustJarSpeed;
|
||||
/*0x1e*/ u8 dash_state;
|
||||
/*0x1f*/ u8 field_0x1f[3];
|
||||
/*0x22*/ u16 field_0x22[2];
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ typedef struct {
|
|||
/* 0x12 */ u16 dungeon_map_y;
|
||||
/* 0x14 */ u16 overworld_map_x;
|
||||
/* 0x16 */ u16 overworld_map_y;
|
||||
/* 0x18 */ u8 field_0x24[0x8];
|
||||
/* 0x18 */ u8 field_0x24[8];
|
||||
} PlayerRoomStatus;
|
||||
static_assert(sizeof(PlayerRoomStatus) == 0x20);
|
||||
|
||||
|
|
@ -140,7 +140,8 @@ typedef struct {
|
|||
/* 0x09 */ u8 type; // transition when changing areas
|
||||
/* 0x0a */ u16 stairs_idx; // seems to be a tile type
|
||||
/* 0x0c */ PlayerRoomStatus player_status;
|
||||
/* 0x2c */ u8 field_0x2c[0x9];
|
||||
/* 0x2c */ u8 entity_update_type; // differentiates entity priority on kinstone menu?
|
||||
/* 0x2d */ u8 field_0x2c[0x8];
|
||||
/* 0x35 */ u8 hint_height;
|
||||
/* 0x36 */ u16 hint_idx;
|
||||
/* 0x38 */ u8 field_0x38;
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ SECTIONS {
|
|||
. = 0x00035542; gUnk_02035542 = .;
|
||||
. = 0x00036540; gUnk_02036540 = .;
|
||||
. = 0x00036570; gScriptExecutionContextArray = .;
|
||||
. = 0x000369F0; gUnk_020369F0 = .;
|
||||
. = 0x000369F0; gEntityListsBackup = .;
|
||||
. = 0x00036A38; gCurrentWindow = .;
|
||||
. = 0x00036A40; gNewWindow = .;
|
||||
#if defined(DEMO_USA) || defined(DEMO_JP)
|
||||
|
|
@ -177,7 +177,7 @@ SECTIONS {
|
|||
. = 0x00001160; gPlayerEntity = .;
|
||||
. = 0x000011E8; gUnk_030011E8 = .;
|
||||
. = 0x000015A0; gUnk_030015A0 = .;
|
||||
. = 0x00003BE0; gUnk_03003BE0 = .;
|
||||
. = 0x00003BE0; gCarryEntities = .;
|
||||
. = 0x00003C70; gUnk_03003C70 = .;
|
||||
. = 0x00003D70; gEntityLists = .;
|
||||
. = 0x00003DB8; gCollidableCount = .;
|
||||
|
|
@ -213,7 +213,7 @@ SECTIONS {
|
|||
. = 0x000057CC; ram_sub_080B1A58 = .;
|
||||
. = 0x000057D4; ram_GetTileType = .;
|
||||
. = 0x00005800; ram_sub_080B1A8C = .;
|
||||
. = 0x0000581C; ram_sub_080B1AA8 = .;
|
||||
. = 0x0000581C; ram_GetTileUnderEntity = .;
|
||||
. = 0x00005828; ram_sub_080B1AB4 = .;
|
||||
. = 0x0000583C; ram_sub_080B1AC8 = .;
|
||||
. = 0x0000584C; ram_sub_080B1AD8 = .;
|
||||
|
|
@ -274,6 +274,9 @@ SECTIONS {
|
|||
|
||||
/* handwritten assembly */
|
||||
asm/src/crt0.o(.text);
|
||||
#if defined(EU) || defined(DEMO_JP)
|
||||
asm/src/stack_check.o(.text);
|
||||
#endif
|
||||
asm/src/veneer.o(.text);
|
||||
data/data_08000360.o(.rodata);
|
||||
asm/src/code_08000E44.o(.text);
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ void CopyOAM(void) {
|
|||
void DrawEntities(void) {
|
||||
void (*fn)(void);
|
||||
|
||||
gOAMControls._0[6] = gRoomTransition.field_0x2c[3] ? 15 : 0;
|
||||
gOAMControls._0[6] = gRoomTransition.field_0x2c[2] ? 15 : 0;
|
||||
gOAMControls._4 = gRoomControls.aff_x + gRoomControls.scroll_x;
|
||||
gOAMControls._6 = gRoomControls.aff_y + gRoomControls.scroll_y;
|
||||
gOAMControls.field_0x1++;
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ void sub_0805EC60(Entity* this) {
|
|||
}
|
||||
}
|
||||
|
||||
ASM_FUNC("asm/non_matching/sub_0805EC9C.inc", bool32 sub_0805EC9C(Entity* ent, u32 param_2, u32 param_3, u32 param_4))
|
||||
ASM_FUNC("asm/non_matching/SetAffineInfo.inc", bool32 SetAffineInfo(Entity* ent, u32 param_2, u32 param_3, u32 param_4))
|
||||
|
||||
void sub_0805ECEC(int param_1, u32 param_2, u32 param_3, u32 param_4) {
|
||||
u16* temp;
|
||||
|
|
@ -45,46 +45,46 @@ void sub_0805ECEC(int param_1, u32 param_2, u32 param_3, u32 param_4) {
|
|||
temp[2] = param_4;
|
||||
}
|
||||
|
||||
void sub_0805ED14(u32 param_1) {
|
||||
void InitPlayerMacro(u32 param_1) {
|
||||
gPlayerState.field_0x9c = param_1;
|
||||
gPlayerState.field_0x98 = 0;
|
||||
gPlayerState.field_0x9a = 0;
|
||||
}
|
||||
|
||||
ASM_FUNC("asm/non_matching/code_0805EC04/sub_0805ED30.inc", void sub_0805ED30())
|
||||
ASM_FUNC("asm/non_matching/code_0805EC04/UpdatePlayerInput.inc", void UpdatePlayerInput())
|
||||
|
||||
u32 sub_0805EE04(u32 param_1) {
|
||||
u32 result = (s32) - (param_1 & 0x200) >> 0x1f & 0x1000;
|
||||
if ((param_1 & 0x100) != 0) {
|
||||
u32 ConvInputToState(u32 keys) {
|
||||
u32 result = (s32) - (keys & 0x200) >> 0x1f & 0x1000;
|
||||
if (keys & R_BUTTON) {
|
||||
result |= 0x20;
|
||||
result |= 0x8000;
|
||||
result |= 0x80;
|
||||
}
|
||||
if ((param_1 & 1) != 0) {
|
||||
if (keys & A_BUTTON) {
|
||||
result |= 0x8;
|
||||
result |= 0x41;
|
||||
}
|
||||
if ((param_1 & 2) != 0) {
|
||||
if (keys & B_BUTTON) {
|
||||
result |= 0x10;
|
||||
result |= 0x2;
|
||||
}
|
||||
if ((param_1 & 0x10) != 0) {
|
||||
if (keys & DPAD_RIGHT) {
|
||||
result |= 0x100;
|
||||
}
|
||||
if ((param_1 & 0x20) != 0) {
|
||||
if (keys & DPAD_LEFT) {
|
||||
result |= 0x200;
|
||||
}
|
||||
if ((param_1 & 0x40) != 0) {
|
||||
if (keys & DPAD_UP) {
|
||||
result |= 0x400;
|
||||
}
|
||||
if ((param_1 & 0x80) != 0) {
|
||||
if (keys & DPAD_DOWN) {
|
||||
result |= 0x800;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
void sub_0805EE88(void) {
|
||||
if ((gRoomTransition.field_0x2c[3] != 0) && ((gRoomTransition.frameCount & 3) == 0)) {
|
||||
if ((gRoomTransition.field_0x2c[2] != 0) && ((gRoomTransition.frameCount & 3) == 0)) {
|
||||
LoadPaletteGroup((((u32)gRoomTransition.frameCount & 0xc) >> 2) + 0x2f);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -370,7 +370,7 @@ s32 sub_08017B1C(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
|
|||
s32 sub_08017B58(Entity* org, Entity* tgt, u32 direction, ColSettings* settings) {
|
||||
if ((tgt->field_0x3a & 4) != 0) {
|
||||
if (tgt->field_0x1d) {
|
||||
s32 x = tgt->field_0x1d = tgt->field_0x1d - gPlayerState.field_0x1d;
|
||||
s32 x = tgt->field_0x1d = tgt->field_0x1d - gPlayerState.gustJarSpeed;
|
||||
if (x << 24 <= 0) {
|
||||
tgt->field_0x1d = 0;
|
||||
tgt->subAction = 2;
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ void sub_0801D000(u32 a1) {
|
|||
tmp = 0;
|
||||
}
|
||||
|
||||
roomTransition->field_0x2c[3] = tmp;
|
||||
roomTransition->field_0x2c[2] = tmp;
|
||||
if (a1) {
|
||||
CleanUpObjPalettes();
|
||||
sub_0801CFD0(0xf);
|
||||
|
|
|
|||
16
src/coord.c
16
src/coord.c
|
|
@ -20,7 +20,6 @@ extern const u16 gUnk_080047F6[];
|
|||
|
||||
u32 sub_0806F58C(Entity*, Entity*);
|
||||
u32 sub_0806FCA0(Entity*, Entity*);
|
||||
void UnloadHitbox(Entity*);
|
||||
extern u32 sub_08007DD6(u32, const u16*);
|
||||
u32 PointInsideRadius(s32 x, s32 y, s32 radius);
|
||||
extern void sub_0806FEE8(struct_gUnk_020000C0_1*, u32, u32, u32);
|
||||
|
|
@ -61,7 +60,7 @@ bool32 sub_0806F3E4(Entity* ent) {
|
|||
|
||||
if ((gPlayerState.field_0x1c & 0x7F) != 1)
|
||||
return 0;
|
||||
switch (gPlayerState.field_0x1d) {
|
||||
switch (gPlayerState.gustJarSpeed) {
|
||||
case 1:
|
||||
ent->knockbackSpeed += 64;
|
||||
break;
|
||||
|
|
@ -329,12 +328,12 @@ void sub_0806FA90(Entity* source, Entity* target, s32 offsetX, s32 offsetY) {
|
|||
PositionRelative(source, target, Q_16_16(offsetX), Q_16_16(offsetY));
|
||||
}
|
||||
|
||||
void SortEntityAbove(Entity* param_1, Entity* param_2) {
|
||||
param_2->spritePriority.b0 = gSpriteSortAboveTable[param_1->spritePriority.b0];
|
||||
void SortEntityAbove(Entity* below_ent, Entity* above_ent) {
|
||||
above_ent->spritePriority.b0 = gSpriteSortAboveTable[below_ent->spritePriority.b0];
|
||||
}
|
||||
|
||||
void SortEntityBelow(Entity* param_1, Entity* param_2) {
|
||||
param_2->spritePriority.b0 = gSpriteSortBelowTable[param_1->spritePriority.b0];
|
||||
void SortEntityBelow(Entity* above_ent, Entity* below_ent) {
|
||||
below_ent->spritePriority.b0 = gSpriteSortBelowTable[above_ent->spritePriority.b0];
|
||||
}
|
||||
|
||||
void sub_0806FB00(Entity* ent, u32 param_1, u32 param_2, u32 param_3) {
|
||||
|
|
@ -380,9 +379,10 @@ void sub_0806FBB4(Entity* ent) {
|
|||
}
|
||||
}
|
||||
|
||||
void AllocMutableHitbox(Entity* ent) {
|
||||
void* AllocMutableHitbox(Entity* ent) {
|
||||
UnloadHitbox(ent);
|
||||
ent->hitbox = zMalloc(sizeof(Hitbox3D));
|
||||
return ent->hitbox;
|
||||
}
|
||||
|
||||
void UnloadHitbox(Entity* ent) {
|
||||
|
|
@ -538,7 +538,7 @@ u32 LoadExtraSpriteData(Entity* ent, const SpriteLoadData* data) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
void sub_0806FE84(Entity* ent) {
|
||||
void UnloadOBJPalette2(Entity* ent) {
|
||||
u32 index;
|
||||
u32 spriteAnimation = ent->spriteAnimation[2];
|
||||
ent->spriteAnimation[2] = 0;
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ void sub_08031B48(Entity* this) {
|
|||
this->frame = 0;
|
||||
COLLISION_ON(this);
|
||||
} else {
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 0x3;
|
||||
this->actionDelay = gUnk_080CE5B0[Random() & 7];
|
||||
InitializeAnimation(this, 1);
|
||||
|
|
@ -188,7 +188,7 @@ void sub_08031B98(Entity* this) {
|
|||
|
||||
void sub_08031C1C(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = '\x01';
|
||||
this->actionDelay = gUnk_080CE5B8[Random() & 7];
|
||||
this->spriteSettings.draw = 0;
|
||||
|
|
@ -199,7 +199,7 @@ void sub_08031C58(Entity* this) {
|
|||
Entity *a, *b;
|
||||
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
if (gEntCount < 0x43) {
|
||||
u32 tmp = Random();
|
||||
tmp &= 3;
|
||||
|
|
@ -274,7 +274,7 @@ void sub_08031DA0(Entity* this) {
|
|||
}
|
||||
|
||||
void sub_08031DC4(Entity* this) {
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 1;
|
||||
this->actionDelay = 0xb4;
|
||||
this->spriteSettings.draw = 0;
|
||||
|
|
@ -360,7 +360,7 @@ void sub_08031F54(Entity* this) {
|
|||
|
||||
void sub_08031FB0(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if ((this->frame & 0x80) && (this->parent || --this->actionDelay == 0)) {
|
||||
if ((this->frame & ANIM_DONE) && (this->parent || --this->actionDelay == 0)) {
|
||||
this->action = 4;
|
||||
this->direction = sub_08049F84(this, 1);
|
||||
*(u8*)&this->field_0x76 = 0;
|
||||
|
|
@ -469,7 +469,7 @@ void sub_08032204(Entity* this) {
|
|||
this->frame = 0;
|
||||
this->frameDuration = (Random() & 0x30) + 30;
|
||||
} else {
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 9;
|
||||
InitializeAnimation(this, 13);
|
||||
}
|
||||
|
|
@ -478,7 +478,7 @@ void sub_08032204(Entity* this) {
|
|||
|
||||
void sub_08032248(Entity* this) {
|
||||
if (GravityUpdate(this, Q_8_8(24.0)) == 0) {
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
((Entity*)this->field_0x7c.WORD)->actionDelay--;
|
||||
|
||||
DeleteEntity(this);
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ void sub_080301D4(ArmosEntity* this) {
|
|||
|
||||
void sub_08030240(ArmosEntity* this) {
|
||||
if (super->animIndex == 6) {
|
||||
if ((super->frame & 0x80) == 0) {
|
||||
if ((super->frame & ANIM_DONE) == 0) {
|
||||
GetNextFrame(super);
|
||||
}
|
||||
}
|
||||
|
|
@ -188,8 +188,8 @@ void sub_08030338(ArmosEntity* this) {
|
|||
EnqueueSFX(SFX_12A);
|
||||
return;
|
||||
}
|
||||
bVar2 = super->frame & 0x80;
|
||||
if ((super->frame & 0x80) != 0) {
|
||||
bVar2 = super->frame & ANIM_DONE;
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
if (this->unk_80 != 2) {
|
||||
super->action = 3;
|
||||
super->animationState = 0xff;
|
||||
|
|
@ -244,7 +244,7 @@ NONMATCH("asm/non_matching/armos/sub_080304BC.inc", void sub_080304BC(ArmosEntit
|
|||
u32 tmp;
|
||||
|
||||
sub_080309A8(this);
|
||||
tmp = super->frame & 0x80;
|
||||
tmp = super->frame & ANIM_DONE;
|
||||
if (tmp != 0) {
|
||||
sub_08030580(this);
|
||||
} else {
|
||||
|
|
@ -267,7 +267,7 @@ void sub_080304F4(ArmosEntity* this) {
|
|||
}
|
||||
|
||||
void sub_08030524(ArmosEntity* this) {
|
||||
if ((super->frame & 0x80) == 0) {
|
||||
if ((super->frame & ANIM_DONE) == 0) {
|
||||
sub_080309A8(this);
|
||||
} else if (super->frame == 1) {
|
||||
super->frame = 0;
|
||||
|
|
@ -277,7 +277,7 @@ void sub_08030524(ArmosEntity* this) {
|
|||
|
||||
void sub_08030554(ArmosEntity* this) {
|
||||
sub_080309A8(this);
|
||||
if ((super->frame & 0x80) != 0) {
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
super->action = 3;
|
||||
sub_080309C8(this, (u32)super->animationState);
|
||||
sub_080306C4(this);
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ void sub_0803E71C(BallChainSoldierEntity* this) {
|
|||
}
|
||||
|
||||
void sub_0803E75C(BallChainSoldierEntity* this) {
|
||||
if ((super->frame & 0x80) == 0) {
|
||||
if ((super->frame & ANIM_DONE) == 0) {
|
||||
UpdateAnimationSingleFrame(super);
|
||||
} else {
|
||||
if (--super->actionDelay == 0) {
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ void sub_080218CC(Entity* this) {
|
|||
this->frameDuration = 1;
|
||||
}
|
||||
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 2;
|
||||
this->actionDelay = (Random() & 0x38) + 8;
|
||||
this->field_0xf = 1;
|
||||
|
|
@ -209,7 +209,7 @@ void sub_08021AD8(Entity* this) {
|
|||
this->frameDuration = 1;
|
||||
}
|
||||
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 2;
|
||||
this->actionDelay = 20;
|
||||
((u8*)&this->field_0x86)[0] = 60;
|
||||
|
|
@ -268,7 +268,7 @@ void sub_08021C58(Entity* this) {
|
|||
this->frameDuration = 1;
|
||||
}
|
||||
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 2;
|
||||
this->actionDelay = 60;
|
||||
this->field_0xf = 1;
|
||||
|
|
@ -280,7 +280,7 @@ void sub_08021C58(Entity* this) {
|
|||
}
|
||||
|
||||
void sub_08021CD0(Entity* this) {
|
||||
if ((this->frame & 0x80) == 0)
|
||||
if ((this->frame & ANIM_DONE) == 0)
|
||||
GetNextFrame(this);
|
||||
|
||||
if (sub_08049F84(this, 1) == 0xff)
|
||||
|
|
|
|||
|
|
@ -245,7 +245,7 @@ void sub_0802CAF8(Entity* this) {
|
|||
EnqueueSFX(SFX_104);
|
||||
}
|
||||
sub_0802CC18(this);
|
||||
sub_08078930(this);
|
||||
RegisterCarryEntity(this);
|
||||
if (this->field_0xf && this->z.HALF.HI == 0) {
|
||||
this->field_0xf = 0;
|
||||
COLLISION_ON(this);
|
||||
|
|
@ -286,7 +286,7 @@ void sub_0802CBC4(Entity* this) {
|
|||
if (this->field_0x82.HALF.HI) {
|
||||
sub_08079184();
|
||||
}
|
||||
sub_08078954(this);
|
||||
FreeCarryEntity(this);
|
||||
|
||||
ent = CreateObjectWithParent(this, OBJECT_20, 0, 0);
|
||||
if (ent) {
|
||||
|
|
|
|||
|
|
@ -289,7 +289,7 @@ void sub_0802AB40(Entity* this) {
|
|||
#endif
|
||||
|
||||
void sub_0802AC08(Entity* this) {
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 2;
|
||||
this->subAction = 0;
|
||||
this->actionDelay = 0x40;
|
||||
|
|
@ -470,7 +470,7 @@ void sub_0802AED4(Entity* this) {
|
|||
}
|
||||
} else {
|
||||
if (!sub_0800442E(this)) {
|
||||
sub_08078930(this);
|
||||
RegisterCarryEntity(this);
|
||||
}
|
||||
}
|
||||
if (this->type2 != 0 && this->field_0x80.HALF.HI) {
|
||||
|
|
@ -535,7 +535,7 @@ NONMATCH("asm/non_matching/bombPeahat/sub_0802AFC8.inc", void sub_0802AFC8(Entit
|
|||
this->field_0x82.HWORD ^= 0x8000;
|
||||
}
|
||||
tmp = 0x130 - (this->field_0x82.HWORD & 0xf0);
|
||||
sub_0805EC9C(this, tmp, tmp, 0);
|
||||
SetAffineInfo(this, tmp, tmp, 0);
|
||||
}
|
||||
if (this->field_0xf & flag) {
|
||||
this->palette.b.b0 = this->palette.b.b4;
|
||||
|
|
@ -572,7 +572,7 @@ void sub_0802B048(Entity* this) {
|
|||
this->field_0xf = 0x50;
|
||||
this->field_0x82.HWORD = 0;
|
||||
this->spriteRendering.b0 = 3;
|
||||
sub_0805EC9C(this, 0x100, 0x100, 0);
|
||||
SetAffineInfo(this, 0x100, 0x100, 0);
|
||||
}
|
||||
} else {
|
||||
if (this->field_0xf) {
|
||||
|
|
@ -587,7 +587,7 @@ void sub_0802B048(Entity* this) {
|
|||
this->spriteSettings.draw = 0;
|
||||
COLLISION_ON(this);
|
||||
this->field_0x7a.HALF.HI = 0;
|
||||
sub_08078954(this);
|
||||
FreeCarryEntity(this);
|
||||
if (this->parent->next) {
|
||||
this->parent->field_0x80.HALF.HI = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ void sub_08028A74(Entity* this) {
|
|||
switch (this->subAction) {
|
||||
case 0:
|
||||
unk = 1;
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->subAction = 1;
|
||||
this->actionDelay = 0x3c;
|
||||
this->field_0xf = 0x10;
|
||||
|
|
@ -150,7 +150,7 @@ void sub_08028A74(Entity* this) {
|
|||
break;
|
||||
case 3:
|
||||
unk = 2;
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->subAction = 4;
|
||||
this->actionDelay = 0x50;
|
||||
sub_080290E0(this, 1);
|
||||
|
|
@ -189,7 +189,7 @@ void sub_08028BC4(Entity* this) {
|
|||
switch (this->subAction) {
|
||||
case 0:
|
||||
if (this->actionDelay == 0) {
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->subAction = 1;
|
||||
sub_08028FDC(this);
|
||||
sub_080290E0(this, 5);
|
||||
|
|
@ -200,7 +200,7 @@ void sub_08028BC4(Entity* this) {
|
|||
}
|
||||
break;
|
||||
case 1:
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 4;
|
||||
this->subAction = 0;
|
||||
this->actionDelay = 0x1e;
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ void sub_08045CE0(BusinessScrubPrologueEntity* this) {
|
|||
switch (super->subAction) {
|
||||
case 0:
|
||||
r6 = 1;
|
||||
if (super->frame & 0x80) {
|
||||
if (super->frame & ANIM_DONE) {
|
||||
super->subAction = 1;
|
||||
super->actionDelay = 0x3c;
|
||||
super->field_0xf = 0x10;
|
||||
|
|
@ -133,7 +133,7 @@ void sub_08045CE0(BusinessScrubPrologueEntity* this) {
|
|||
break;
|
||||
case 3:
|
||||
r6 = 2;
|
||||
if (super->frame & 0x80) {
|
||||
if (super->frame & ANIM_DONE) {
|
||||
super->subAction = 4;
|
||||
super->actionDelay = 0x50;
|
||||
sub_08046030(this, 1);
|
||||
|
|
@ -170,7 +170,7 @@ void sub_08045E14(BusinessScrubPrologueEntity* this) {
|
|||
switch (super->subAction) {
|
||||
case 0:
|
||||
if (super->actionDelay == 0) {
|
||||
if (super->frame & 0x80) {
|
||||
if (super->frame & ANIM_DONE) {
|
||||
super->subAction = 1;
|
||||
sub_08045F98(this);
|
||||
sub_08046030(this, 5);
|
||||
|
|
@ -181,7 +181,7 @@ void sub_08045E14(BusinessScrubPrologueEntity* this) {
|
|||
}
|
||||
break;
|
||||
case 1:
|
||||
if (super->frame & 0x80) {
|
||||
if (super->frame & ANIM_DONE) {
|
||||
super->action = 5;
|
||||
super->subAction = 0;
|
||||
sub_08046030(this, 0);
|
||||
|
|
@ -222,7 +222,7 @@ void sub_08045EDC(BusinessScrubPrologueEntity* this) {
|
|||
super->frame &= 0xfe;
|
||||
sub_080954AC(super, this->unk_84);
|
||||
EnqueueSFX(SFX_18D);
|
||||
} else if (super->frame & 0x80) {
|
||||
} else if (super->frame & ANIM_DONE) {
|
||||
super->action = 5;
|
||||
super->subAction = 0;
|
||||
sub_08046030(this, 1);
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ void sub_0802B56C(Entity* this) {
|
|||
|
||||
void sub_0802B5C8(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 1;
|
||||
this->actionDelay = 30;
|
||||
InitializeAnimation(this, 0);
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ void Chuchu_OnDeath(Entity* this) {
|
|||
}
|
||||
|
||||
void Chuchu_OnConfused(Entity* this) {
|
||||
if ((this->frame & 0x80) == 0)
|
||||
if ((this->frame & ANIM_DONE) == 0)
|
||||
GetNextFrame(this);
|
||||
GenericConfused(this);
|
||||
}
|
||||
|
|
@ -173,7 +173,7 @@ void nullsub_4(Entity* this) {
|
|||
|
||||
void sub_0801F0C8(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 3;
|
||||
this->actionDelay = (Random() & 3) + 0xc;
|
||||
this->field_0xf = Random();
|
||||
|
|
@ -221,7 +221,7 @@ void sub_0801F1B0(Entity* this) {
|
|||
GetNextFrame(this);
|
||||
}
|
||||
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
if (sub_0801FBD0(this)) {
|
||||
sub_0801F328(this);
|
||||
} else {
|
||||
|
|
@ -240,7 +240,7 @@ void sub_0801F228(Entity* this) {
|
|||
|
||||
void sub_0801F250(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80)
|
||||
if (this->frame & ANIM_DONE)
|
||||
sub_0801F360(this);
|
||||
}
|
||||
|
||||
|
|
@ -267,7 +267,7 @@ void sub_0801F270(Entity* this) {
|
|||
|
||||
void sub_0801F2CC(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 1;
|
||||
this->spriteSettings.draw = 0;
|
||||
InitializeAnimation(this, 4);
|
||||
|
|
@ -277,7 +277,7 @@ void sub_0801F2CC(Entity* this) {
|
|||
void sub_0801F2F8(Entity* this) {
|
||||
GravityUpdate(this, 0x1800);
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
sub_0801F340(this);
|
||||
sub_0804AA1C(this);
|
||||
}
|
||||
|
|
@ -362,7 +362,7 @@ void sub_0801F48C(Entity* this) {
|
|||
|
||||
void sub_0801F494(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 3;
|
||||
this->field_0xf = 30;
|
||||
this->direction = sub_08049F84(this, 1);
|
||||
|
|
@ -418,7 +418,7 @@ void sub_0801F584(Entity* this) {
|
|||
GetNextFrame(this);
|
||||
}
|
||||
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
if (sub_0801FBD0(this)) {
|
||||
this->field_0x82.HALF.HI = 0;
|
||||
sub_0801F730(this);
|
||||
|
|
@ -440,7 +440,7 @@ void sub_0801F61C(Entity* this) {
|
|||
|
||||
void sub_0801F638(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 8;
|
||||
this->field_0xf = 30;
|
||||
this->direction = sub_08049F84(this, 1);
|
||||
|
|
@ -465,7 +465,7 @@ void sub_0801F688(Entity* this) {
|
|||
|
||||
void sub_0801F6CC(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 1;
|
||||
this->spriteSettings.draw = 0;
|
||||
InitializeAnimation(this, 4);
|
||||
|
|
@ -475,7 +475,7 @@ void sub_0801F6CC(Entity* this) {
|
|||
void sub_0801F6F8(Entity* this) {
|
||||
GravityUpdate(this, 0x1800);
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 4;
|
||||
this->speed = 0x20;
|
||||
sub_0804AA1C(this);
|
||||
|
|
@ -538,7 +538,7 @@ void sub_0801F7FC(Entity* this) {
|
|||
|
||||
void sub_0801F840(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
sub_0801FB14(this);
|
||||
COLLISION_ON(this);
|
||||
this->spritePriority.b0 = 4;
|
||||
|
|
@ -594,7 +594,7 @@ void sub_0801F940(Entity* this) {
|
|||
GetNextFrame(this);
|
||||
}
|
||||
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
if (sub_0801FBD0(this)) {
|
||||
sub_0801FAE0(this);
|
||||
} else {
|
||||
|
|
@ -614,7 +614,7 @@ void sub_0801F9C4(Entity* this) {
|
|||
|
||||
void sub_0801F9E0(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 8;
|
||||
this->field_0xf = 30;
|
||||
this->direction = sub_08049F84(this, 1);
|
||||
|
|
@ -639,7 +639,7 @@ void sub_0801FA30(Entity* this) {
|
|||
|
||||
void sub_0801FA78(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 1;
|
||||
this->spriteSettings.draw = 0;
|
||||
InitializeAnimation(this, 4);
|
||||
|
|
@ -650,7 +650,7 @@ void sub_0801FA78(Entity* this) {
|
|||
void sub_0801FAAC(Entity* this) {
|
||||
GravityUpdate(this, 0x1800);
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
sub_0801FB14(this);
|
||||
this->speed = 0x20;
|
||||
sub_0804AA1C(this);
|
||||
|
|
@ -705,7 +705,7 @@ void sub_0801FB68(Entity* this) {
|
|||
}
|
||||
|
||||
u32 sub_0801FBD0(Entity* this) {
|
||||
if (sub_080B1AA8(this) == 0x10) {
|
||||
if (GetTileUnderEntity(this) == 0x10) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ void sub_08038F20(CuccoAggrEntity* this) {
|
|||
sub_08039298(this);
|
||||
GetNextFrame(super);
|
||||
|
||||
if (super->frame & 0x80) {
|
||||
if (super->frame & ANIM_DONE) {
|
||||
sub_0803901C(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -328,7 +328,7 @@ void CuccoAggr_CreateFx(CuccoAggrEntity* this) {
|
|||
|
||||
void sub_08039298(CuccoAggrEntity* this) {
|
||||
if (super->type2 == 0) {
|
||||
sub_08078930(super);
|
||||
RegisterCarryEntity(super);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ void sub_08048268(Entity* this) {
|
|||
}
|
||||
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->actionDelay = 0;
|
||||
InitializeAnimation(this, 0);
|
||||
}
|
||||
|
|
@ -58,7 +58,7 @@ void sub_08048268(Entity* this) {
|
|||
void sub_08048294(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 3;
|
||||
SetLocalFlag(0x72);
|
||||
InitializeAnimation(this, 1);
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ void sub_08020D9C(Entity* this) {
|
|||
|
||||
void sub_08020DB4(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (this->frame & 0x80)
|
||||
if (this->frame & ANIM_DONE)
|
||||
sub_08021390(this);
|
||||
}
|
||||
|
||||
|
|
@ -161,7 +161,7 @@ void sub_08020DD4(Entity* this) {
|
|||
|
||||
void sub_08020E28(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (this->frame & 0x80)
|
||||
if (this->frame & ANIM_DONE)
|
||||
sub_080213B0(this);
|
||||
}
|
||||
|
||||
|
|
@ -170,14 +170,14 @@ void sub_08020E48(Entity* this) {
|
|||
sub_080213F0(this);
|
||||
} else {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (this->frame & 0x80)
|
||||
if (this->frame & ANIM_DONE)
|
||||
sub_080213B0(this);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08020E78(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (this->frame & 0x80)
|
||||
if (this->frame & ANIM_DONE)
|
||||
sub_08021390(this);
|
||||
}
|
||||
|
||||
|
|
@ -211,7 +211,7 @@ void sub_08020E98(Entity* this) {
|
|||
|
||||
void sub_08020F28(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (this->frame & 0x80)
|
||||
if (this->frame & ANIM_DONE)
|
||||
sub_08021400(this);
|
||||
}
|
||||
|
||||
|
|
@ -241,7 +241,7 @@ void sub_08020F48(Entity* this) {
|
|||
}
|
||||
|
||||
void sub_08020FAC(Entity* this) {
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
if (this->field_0x7a.HALF.LO) {
|
||||
this->field_0x7a.HALF.LO--;
|
||||
} else {
|
||||
|
|
@ -264,7 +264,7 @@ void sub_08020FE4(Entity* this) {
|
|||
|
||||
void sub_08021010(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->hitType = 0x56;
|
||||
sub_080213F0(this);
|
||||
}
|
||||
|
|
@ -280,7 +280,7 @@ void sub_08021038(Entity* this) {
|
|||
EnqueueSFX(SFX_10E);
|
||||
}
|
||||
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
sub_08021588(this);
|
||||
if (this->field_0x7c.BYTES.byte0) {
|
||||
this->field_0x7c.BYTES.byte0--;
|
||||
|
|
@ -300,7 +300,7 @@ void sub_080210A8(Entity* this) {
|
|||
this->frame = 0;
|
||||
sub_08021588(this);
|
||||
EnqueueSFX(SFX_15D);
|
||||
} else if (this->frame & 0x80) {
|
||||
} else if (this->frame & ANIM_DONE) {
|
||||
sub_08021390(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -330,7 +330,7 @@ void sub_080210E4(Entity* this) {
|
|||
}
|
||||
|
||||
void sub_08021170(Entity* this) {
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
if (this->field_0x7a.HALF.HI) {
|
||||
this->field_0x7a.HALF.HI--;
|
||||
} else {
|
||||
|
|
@ -346,7 +346,7 @@ void sub_080211A0(Entity* this) {
|
|||
sub_08021390(this);
|
||||
} else {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (this->frame & 0x80)
|
||||
if (this->frame & ANIM_DONE)
|
||||
sub_080213B0(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -357,7 +357,7 @@ void sub_080211D0(Entity* this)
|
|||
UpdateAnimationSingleFrame(this);
|
||||
sub_0802159C(this);
|
||||
|
||||
if (this->frame & 0x80)
|
||||
if (this->frame & ANIM_DONE)
|
||||
sub_08021390(this);
|
||||
}
|
||||
|
||||
|
|
@ -365,7 +365,7 @@ void sub_080211F4(Entity* this) {
|
|||
UpdateAnimationSingleFrame(this);
|
||||
sub_08021600(this);
|
||||
|
||||
if (this->frame & 0x80)
|
||||
if (this->frame & ANIM_DONE)
|
||||
sub_08021390(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ void sub_080220D8(Entity* this) {
|
|||
|
||||
void sub_080220F0(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
const PosOffset* off;
|
||||
u32 i;
|
||||
|
||||
|
|
@ -107,7 +107,7 @@ void sub_08022174(Entity* this) {
|
|||
void sub_08022198(Entity* this) {
|
||||
sub_0800445C(this);
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 1;
|
||||
this->actionDelay = 0x5a;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ void Enemy4D_Action6(Enemy4DEntity* this) {
|
|||
}
|
||||
|
||||
void Enemy4D_Action7(Enemy4DEntity* this) {
|
||||
if ((super->frame & 0x80) == 0) {
|
||||
if ((super->frame & ANIM_DONE) == 0) {
|
||||
UpdateAnimationSingleFrame(super);
|
||||
} else {
|
||||
if (--super->actionDelay == 0) {
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue