Rename movement functions

This commit is contained in:
octorock
2022-02-12 20:00:08 +01:00
parent d6c79aa263
commit b69a6d223c
141 changed files with 2334 additions and 2992 deletions
+2 -2
View File
@@ -1705,7 +1705,7 @@ _0801A32C:
asrs r2, r2, #0x10
adds r0, r3, #0
adds r3, r6, #0
bl sub_080AE4CC
bl IsTileCollision
cmp r0, #0
bne _0801A36C
movs r0, #1
@@ -1901,7 +1901,7 @@ _0801A4B0:
adds r2, r2, r0
adds r0, r3, #0
mov r3, r8
bl sub_080AE4CC
bl IsTileCollision
cmp r0, #0
bne _0801A4F0
ldrb r0, [r5]
+2 -2
View File
@@ -119,10 +119,10 @@ sub_080044AE: @ 0x080044AE
push {r0, r1, r2}
adds r1, r2, #0
movs r2, #2
bl sub_080AE58C
bl CalculateEntityTileCollisions
pop {r0, r1, r2}
movs r3, #2
bl sub_080AE7E8
bl ProcessMovementInternal
_080044C8:
pop {r3}
bx r3
+4 -4
View File
@@ -1374,7 +1374,7 @@ _0802670A:
bl SoundReq
_08026726:
adds r0, r4, #0
bl ProcessMovement
bl ProcessMovement0
_0802672C:
adds r0, r4, #0
adds r0, #0x76
@@ -1556,7 +1556,7 @@ sub_0802686C: @ 0x0802686C
cmp r5, #0
beq _08026888
adds r0, r4, #0
bl ProcessMovement
bl ProcessMovement0
b _080268BE
_08026888:
movs r0, #0x10
@@ -2929,7 +2929,7 @@ _080270D4:
ldrb r0, [r0, #0xc]
strb r0, [r5, #0x15]
adds r0, r5, #0
bl ProcessMovement
bl ProcessMovement0
_080270E0:
adds r0, r6, #0
adds r0, #0x85
@@ -2989,7 +2989,7 @@ _08027110:
b _080271FE
_0802714A:
adds r0, r5, #0
bl ProcessMovement
bl ProcessMovement0
b _080271FE
_08027152:
adds r0, r6, #0
+1 -1
View File
@@ -601,7 +601,7 @@ _08038890:
cmp r0, #0
bne _080388A8
adds r0, r4, #0
bl ProcessMovement
bl ProcessMovement0
b _080388B2
_080388A8:
subs r0, #1
+1 -1
View File
@@ -172,7 +172,7 @@ _0803ECD8:
movs r1, #0x10
bl sub_0803E94C
adds r0, r4, #0
bl ProcessMovement
bl ProcessMovement0
_0803ED02:
pop {r4, r5, r6, pc}
+1 -1
View File
@@ -476,7 +476,7 @@ _080373C4:
sub_080373C8: @ 0x080373C8
push {r4, lr}
adds r4, r0, #0
bl sub_080AEFE0
bl ProcessMovement2
ldrh r0, [r4, #0x2a]
cmp r0, #0
beq _080373DC
-2059
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -32,7 +32,7 @@ _080305E4:
cmp r0, #0
bne _08030608
adds r0, r4, #0
bl ProcessMovement
bl ProcessMovement0
cmp r0, #0
bne _0803064A
ldrb r0, [r4, #0x15]
@@ -59,7 +59,7 @@ _0803061E:
cmp r3, #0
bne _08030638
adds r0, r4, #0
bl ProcessMovement
bl ProcessMovement0
cmp r0, #0
bne _0803064A
ldrb r0, [r4, #0x15]
+1 -1
View File
@@ -93,7 +93,7 @@ _08030758:
adds r2, r2, r0
mov r0, ip
movs r3, #0
bl sub_080AE4CC
bl IsTileCollision
cmp r0, #0
beq _0803079E
movs r0, #4
@@ -148,7 +148,7 @@ _0802C442:
cmp r5, #4
ble _0802C460
adds r0, r4, #0
bl sub_080AEFB4
bl ProcessMovement1
b _0802C48C
.align 2, 0
_0802C45C: .4byte gRoomControls
@@ -75,7 +75,7 @@ _080640E8:
bl InitializeAnimation
_0806410A:
adds r0, r4, #0
bl ProcessMovement
bl ProcessMovement0
movs r0, #0x2e
ldrsh r1, [r4, r0]
adds r2, r4, #0
@@ -49,7 +49,7 @@ _080641E6:
movs r0, #0x32
ldrsh r4, [r5, r0]
adds r0, r5, #0
bl ProcessMovement
bl ProcessMovement0
movs r1, #0x32
ldrsh r0, [r5, r1]
adds r6, r5, #0
@@ -49,7 +49,7 @@ _08064306:
movs r0, #0x2e
ldrsh r4, [r5, r0]
adds r0, r5, #0
bl ProcessMovement
bl ProcessMovement0
movs r1, #0x2e
ldrsh r0, [r5, r1]
adds r6, r5, #0
+1 -1
View File
@@ -75,7 +75,7 @@ _080629B4:
strh r1, [r0]
_080629D2:
adds r0, r4, #0
bl ProcessMovement
bl ProcessMovement0
movs r3, #0x2e
ldrsh r1, [r4, r3]
adds r2, r4, #0
@@ -389,7 +389,7 @@ _080858E0:
adds r0, r7, #0
bl sub_08085EFC
adds r0, r7, #0
bl sub_080AF134
bl ProcessMovement4
ldr r1, [r7, #0x54]
ldr r0, [r7, #0x2c]
cmp r1, r0
@@ -49,7 +49,7 @@
adds r1, r7, #0
mov r2, sl
adds r3, r4, #0
bl sub_080AE4CC
bl IsTileCollision
adds r6, r0, #0
lsls r6, r6, #1
mov r2, sl
@@ -57,7 +57,7 @@
adds r0, r5, #0
adds r1, r7, #0
adds r3, r4, #0
bl sub_080AE4CC
bl IsTileCollision
orrs r6, r0
lsls r6, r6, #1
mov r0, sl
@@ -66,7 +66,7 @@
adds r0, r5, #0
adds r1, r7, #0
adds r3, r4, #0
bl sub_080AE4CC
bl IsTileCollision
orrs r6, r0
lsls r6, r6, #6
b _080AE6D2
@@ -80,7 +80,7 @@ _080AE628:
adds r1, r7, #0
mov r2, sl
adds r3, r4, #0
bl sub_080AE4CC
bl IsTileCollision
adds r6, r0, #0
lsls r6, r6, #1
mov r2, sl
@@ -88,7 +88,7 @@ _080AE628:
adds r0, r5, #0
adds r1, r7, #0
adds r3, r4, #0
bl sub_080AE4CC
bl IsTileCollision
orrs r6, r0
lsls r6, r6, #1
mov r1, sl
@@ -104,7 +104,7 @@ _080AE65C:
adds r1, r7, #0
mov r2, sl
adds r3, r4, #0
bl sub_080AE4CC
bl IsTileCollision
adds r6, r0, #0
lsls r6, r6, #1
mov r1, sl
@@ -114,7 +114,7 @@ _080AE65C:
adds r1, r7, #0
ldr r2, [sp, #0x10]
adds r3, r4, #0
bl sub_080AE4CC
bl IsTileCollision
orrs r6, r0
lsls r6, r6, #1
mov r2, sl
@@ -124,7 +124,7 @@ _080AE65C:
adds r0, r5, #0
adds r1, r7, #0
adds r3, r4, #0
bl sub_080AE4CC
bl IsTileCollision
orrs r6, r0
lsls r6, r6, #2
ldr r1, [sp, #0xc]
@@ -134,14 +134,14 @@ _080AE65C:
adds r1, r7, #0
mov r2, sl
adds r3, r4, #0
bl sub_080AE4CC
bl IsTileCollision
orrs r6, r0
lsls r6, r6, #1
adds r0, r5, #0
adds r1, r7, #0
ldr r2, [sp, #0x10]
adds r3, r4, #0
bl sub_080AE4CC
bl IsTileCollision
orrs r6, r0
lsls r6, r6, #1
adds r0, r5, #0
@@ -149,7 +149,7 @@ _080AE65C:
mov r2, r8
_080AE6C8:
adds r3, r4, #0
bl sub_080AE4CC
bl IsTileCollision
orrs r6, r0
lsls r6, r6, #2
_080AE6D2:
@@ -174,7 +174,7 @@ _080AE6D2:
ldr r1, [sp, #0xc]
adds r2, r7, #0
adds r3, r4, #0
bl sub_080AE4CC
bl IsTileCollision
orrs r6, r0
lsls r6, r6, #1
ldr r1, [sp, #0xc]
@@ -182,7 +182,7 @@ _080AE6D2:
adds r0, r5, #0
adds r2, r7, #0
adds r3, r4, #0
bl sub_080AE4CC
bl IsTileCollision
orrs r6, r0
lsls r6, r6, #1
ldr r0, [sp, #0xc]
@@ -191,7 +191,7 @@ _080AE6D2:
adds r0, r5, #0
adds r2, r7, #0
adds r3, r4, #0
bl sub_080AE4CC
bl IsTileCollision
orrs r6, r0
lsls r6, r6, #5
b _080AE7D6
@@ -204,7 +204,7 @@ _080AE72C:
ldr r1, [sp, #0xc]
adds r2, r7, #0
adds r3, r4, #0
bl sub_080AE4CC
bl IsTileCollision
orrs r6, r0
lsls r6, r6, #1
ldr r1, [sp, #0xc]
@@ -212,7 +212,7 @@ _080AE72C:
adds r0, r5, #0
adds r2, r7, #0
adds r3, r4, #0
bl sub_080AE4CC
bl IsTileCollision
orrs r6, r0
lsls r6, r6, #1
ldr r2, [sp, #0xc]
@@ -227,7 +227,7 @@ _080AE760:
ldr r1, [sp, #0xc]
adds r2, r7, #0
adds r3, r4, #0
bl sub_080AE4CC
bl IsTileCollision
orrs r6, r0
lsls r6, r6, #1
ldr r1, [sp, #0xc]
@@ -236,7 +236,7 @@ _080AE760:
adds r0, r5, #0
adds r2, r7, #0
adds r3, r4, #0
bl sub_080AE4CC
bl IsTileCollision
orrs r6, r0
lsls r6, r6, #1
ldr r2, [sp, #0xc]
@@ -247,7 +247,7 @@ _080AE760:
mov r1, sb
adds r2, r7, #0
adds r3, r4, #0
bl sub_080AE4CC
bl IsTileCollision
orrs r6, r0
lsls r6, r6, #2
mov r1, sl
@@ -257,14 +257,14 @@ _080AE760:
ldr r1, [sp, #0xc]
adds r2, r7, #0
adds r3, r4, #0
bl sub_080AE4CC
bl IsTileCollision
orrs r6, r0
lsls r6, r6, #1
adds r0, r5, #0
ldr r1, [sp, #0x14]
adds r2, r7, #0
adds r3, r4, #0
bl sub_080AE4CC
bl IsTileCollision
orrs r6, r0
lsls r6, r6, #1
adds r0, r5, #0
@@ -272,7 +272,7 @@ _080AE760:
_080AE7CA:
adds r2, r7, #0
adds r3, r4, #0
bl sub_080AE4CC
bl IsTileCollision
orrs r6, r0
lsls r6, r6, #1
_080AE7D6:
@@ -51,7 +51,7 @@ _080AE928:
adds r0, r4, #0
movs r1, #4
mov r2, sb
bl sub_080AE58C
bl CalculateEntityTileCollisions
b _080AE95C
_080AE942:
movs r0, #0x80
@@ -65,7 +65,7 @@ _080AE942:
adds r0, r4, #0
movs r1, #4
mov r2, sb
bl sub_080AE58C
bl CalculateEntityTileCollisions
_080AE95C:
ldrh r2, [r4, #0x2a]
movs r0, #0xe
@@ -51,7 +51,7 @@ _080AEEE4:
adds r0, r4, #0
movs r1, #0x1c
mov r2, sb
bl sub_080AE58C
bl CalculateEntityTileCollisions
b _080AEF18
_080AEEFE:
movs r0, #0x80
@@ -65,7 +65,7 @@ _080AEEFE:
adds r0, r4, #0
movs r1, #0x1c
mov r2, sb
bl sub_080AE58C
bl CalculateEntityTileCollisions
_080AEF18:
ldrh r2, [r4, #0x2a]
movs r0, #0xe
@@ -51,7 +51,7 @@ _080AEB10:
adds r0, r4, #0
movs r1, #0xc
mov r2, sb
bl sub_080AE58C
bl CalculateEntityTileCollisions
b _080AEB44
_080AEB2A:
movs r0, #0x80
@@ -65,7 +65,7 @@ _080AEB2A:
adds r0, r4, #0
movs r1, #0xc
mov r2, sb
bl sub_080AE58C
bl CalculateEntityTileCollisions
_080AEB44:
ldrh r2, [r4, #0x2a]
movs r0, #0xe0
@@ -51,7 +51,7 @@ _080AECFC:
adds r0, r4, #0
movs r1, #0x14
mov r2, sb
bl sub_080AE58C
bl CalculateEntityTileCollisions
b _080AED30
_080AED16:
movs r0, #0x80
@@ -65,7 +65,7 @@ _080AED16:
adds r0, r4, #0
movs r1, #0x14
mov r2, sb
bl sub_080AE58C
bl CalculateEntityTileCollisions
_080AED30:
ldrh r2, [r4, #0x2a]
movs r0, #0xe0
+1 -1
View File
@@ -64,7 +64,7 @@ _08061040:
adds r1, r5, #0
adds r2, r4, #0
movs r3, #6
bl sub_080AE4CC
bl IsTileCollision
cmp r0, #0
beq _08061064
movs r0, #0
+1 -1
View File
@@ -5,7 +5,7 @@
adds r4, r0, #0
bl UpdateAnimationSingleFrame
adds r0, r4, #0
bl sub_080AF1EC
bl ProcessMovement6
cmp r0, #0
bne _080611CA
adds r0, r4, #0
@@ -127,7 +127,7 @@ _080ACE90:
strh r1, [r4, #0x24]
_080ACEA4:
adds r0, r4, #0
bl sub_080AEFB4
bl ProcessMovement1
b _080ACEB6
.align 2, 0
_080ACEAC: .4byte gUnk_0812AAE8
@@ -66,7 +66,7 @@ _080AD0B4:
cmp r0, #0x26
beq _080AD0C8
adds r0, r4, #0
bl sub_080AF00C
bl ProcessMovement10
_080AD0C8:
movs r1, #0x80
lsls r1, r1, #6
+1 -1
View File
@@ -9,7 +9,7 @@
movs r1, #2
bl UpdateAnimationVariableFrames
adds r0, r4, #0
bl ProcessMovement
bl ProcessMovement0
cmp r0, #0
bne _08038334
adds r0, r4, #0
+1 -1
View File
@@ -334,7 +334,7 @@ _0808D8EE:
strb r0, [r4, #0x18]
_0808D910:
adds r0, r4, #0
bl sub_080AEFB4
bl ProcessMovement1
bl AnyPrioritySet
cmp r0, #0
bne _0808D954
+1 -1
View File
@@ -212,7 +212,7 @@ _0809EFE6:
adds r1, r6, #0
adds r2, r5, #0
movs r3, #9
bl sub_080AE4CC
bl IsTileCollision
cmp r0, #0
beq _0809EFE6
subs r0, r7, #1
+1 -1
View File
@@ -135,7 +135,7 @@ sub_0808776C: @ 0x0808776C
_08087784: .4byte gPlayerState
_08087788:
adds r0, r4, #0
bl sub_080AEFE0
bl ProcessMovement2
movs r1, #0xa0
lsls r1, r1, #6
adds r0, r4, #0
+1 -1
View File
@@ -276,7 +276,7 @@ _0809FC8A:
strb r0, [r4, #0x18]
_0809FCAC:
adds r0, r4, #0
bl sub_080AEFB4
bl ProcessMovement1
bl AnyPrioritySet
cmp r0, #0
bne _0809FCF8
-79
View File
@@ -12,82 +12,3 @@ gUnk_08133368:: @ 08133368
.else
.incbin "data_08132B30/gUnk_08133368_1_USA-JP-DEMO_USA-DEMO_JP.bin"
.endif
gUnk_08133918:: @ 08133918
.incbin "data_08132B30/gUnk_08133918.bin"
gUnk_08133938:: @ 08133938
.incbin "data_08132B30/gUnk_08133938.bin"
gUnk_08133958:: @ 08133958
.incbin "data_08132B30/gUnk_08133958.bin"
gUnk_08133978:: @ 08133978
.incbin "data_08132B30/gUnk_08133978.bin"
gUnk_08133998:: @ 08133998
.incbin "data_08132B30/gUnk_08133998.bin"
gUnk_081339B8:: @ 081339B8
.incbin "data_08132B30/gUnk_081339B8.bin"
gUnk_081339D8:: @ 081339D8
.incbin "data_08132B30/gUnk_081339D8.bin"
gUnk_081339F8:: @ 081339F8
.incbin "data_08132B30/gUnk_081339F8.bin"
gUnk_08133A18:: @ 08133A18
.4byte sub_080AE3E4
.4byte sub_080AE3E8
.4byte sub_080AE3EC
.4byte sub_080AE408
.4byte sub_080AE424
.4byte sub_080AE440
.4byte sub_080AE45C
.4byte sub_080AE478
.4byte sub_080AE494
.4byte sub_080AE4B0
gUnk_08133A40:: @ 08133A40
.incbin "data_08132B30/gUnk_08133A40.bin"
gUnk_08133A5A:: @ 08133A5A
.incbin "data_08132B30/gUnk_08133A5A.bin"
gUnk_08133A67:: @ 08133A67
.incbin "data_08132B30/gUnk_08133A67.bin"
gUnk_08133F48:: @ 08133F48
.4byte sub_080AE800
.4byte sub_080AE8D8
.4byte sub_080AE8D8
.4byte sub_080AE8D8
.4byte sub_080AE8D8
.4byte sub_080AE8D8
.4byte sub_080AE8D8
.4byte sub_080AE8D8
.4byte sub_080AE9CC
.4byte sub_080AEAC0
.4byte sub_080AEAC0
.4byte sub_080AEAC0
.4byte sub_080AEAC0
.4byte sub_080AEAC0
.4byte sub_080AEAC0
.4byte sub_080AEAC0
.4byte sub_080AEBB4
.4byte sub_080AECAC
.4byte sub_080AECAC
.4byte sub_080AECAC
.4byte sub_080AECAC
.4byte sub_080AECAC
.4byte sub_080AECAC
.4byte sub_080AECAC
.4byte sub_080AEDA0
.4byte sub_080AEE94
.4byte sub_080AEE94
.4byte sub_080AEE94
.4byte sub_080AEE94
.4byte sub_080AEE94
.4byte sub_080AEE94
.4byte sub_080AEE94
+6 -2
View File
@@ -66,9 +66,13 @@ typedef enum {
/** Direction. */
typedef enum {
DirectionNorth = 0x00, /**< North. */
DirectionNorthEast = 0x04, /**< North East. */
DirectionEast = 0x08, /**< East. */
DirectionSouthEast = 0x0c, /**< South East. */
DirectionSouth = 0x10, /**< South. */
DirectionSouthWest = 0x14, /**< South West. */
DirectionWest = 0x18, /**< West. */
DirectionNorthWest = 0x1c, /**< North West. */
} Direction;
typedef struct {
@@ -182,7 +186,7 @@ typedef struct Entity_ {
/*0x43*/ u8 confusedTime; /**< Frames that this Entity is confused. */
/*0x44*/ u8 damage; /**< Damage this Entity inflicts. */
/*0x45*/ u8 health; /**< Health of this Entity. */
/*0x46*/ u16 field_0x46;
/*0x46*/ u16 knockbackSpeed; /**< How fast this Entity is knocked back. */
/*0x48*/ Hitbox* hitbox; /**< Hitbox associated with this Entity. */
/*0x4c*/ struct Entity_* field_0x4c;
/*0x50*/ struct Entity_* parent; /**< Parent Entity. Sometimes points to associated data. */
@@ -271,7 +275,7 @@ u8* GetSpriteSubEntryOffsetDataPointer(u32, u32);
*/
u32 GetFacingDirection(Entity* origin, Entity* target);
u32 ProcessMovement(Entity*);
bool32 ProcessMovement0(Entity*);
/// @{
/**
+179 -147
View File
@@ -13,169 +13,201 @@
#include "map.h"
// Identified - to be sorted into header files
extern void SetDirtTile(u32);
extern bool32 LoadFixedGFX(Entity*, u32);
extern void MenuFadeIn(u32, u32);
extern void TryLoadPrologueHyruleTown(void);
extern void CalculateEntityTileCollisions(Entity*, u32, u32);
extern void CopyOAM(void);
extern void CreateChestSpawner(Entity*);
extern void CreateItemOnGround(Entity*);
extern void CreateRandomItemDrop(Entity*, s32);
extern void DrawDirect(u32, u32); // trampoline to sub_080B27F4
extern void DrawEntities(void);
extern void DrawOAMCmd(void);
extern void EnemyFunctionHandlerAfterCollision(Entity*, void (*const[])());
extern u32 EntityWithinDistance(Entity*, s32, s32, s32);
extern void FlushSprites(void);
extern void GenericKnockback2(Entity*);
extern LayerStruct* GetLayerByIndex(u32);
extern u32 GetTileIndex(u32, u32);
extern u32 IsColliding(Entity*, Entity*);
extern u32 IsColliding(Entity*, Entity*);
extern u32 IsCollidingPlayer(Entity*);
extern bool32 IsProjectileOffScreen(Entity*);
extern bool32 IsTileCollision(u8*, s32, s32, u32);
extern void LinearMoveAngle(Entity*, u32, u32);
extern void LinearMoveDirection(Entity*, u32, u32);
extern bool32 LoadFixedGFX(Entity*, u32);
extern bool32 LoadSwapGFX(Entity*, u16, u32);
extern void MenuFadeIn(u32, u32);
extern u32 PlayerInRange(Entity*, u32, u32);
extern u32 PlayerInRange(Entity*, u32, u32);
extern bool32 ProcessMovement1(Entity*);
extern bool32 ProcessMovement12(Entity*);
extern bool32 ProcessMovement2(Entity*);
extern bool32 ProcessMovement3(Entity*);
extern bool32 ProcessMovement4(Entity*);
extern bool32 ProcessMovement5(Entity*);
extern bool32 ProcessMovement6(Entity*);
extern bool32 ProcessMovementInternal(Entity*, s32, s32, u32);
extern void SetDirtTile(u32);
extern void SoundReqClipped(Entity*, u32);
extern void SoundReqClipped(Entity*, u32);
extern void SoundReqClipped(Entity*, u32);
extern void TryLoadPrologueHyruleTown(void);
extern void UnloadOBJPalette(Entity*);
extern void UpdateItemAnim(ItemBehavior*);
// Unidentified
extern void sub_0805EC9C(Entity*, u32, u32, u32);
extern void sub_0805EC60(Entity*);
extern void sub_0806D0B0(Entity*);
extern void sub_0806D02C(Entity*);
extern void sub_0806FD3C(Entity*);
extern void sub_0805ED14(u32*);
extern void sub_080A7C18(u32, u32, u32);
extern void EnemyFunctionHandlerAfterCollision(Entity*, void (*const[])());
extern void sub_0804A720(Entity*);
extern u32 sub_080AEFE0(Entity*);
extern void sub_08000148(u32, u32, u32);
extern u32 sub_080002A8(u32, u32, u32);
extern u32 sub_080002B4(Entity*, u32, u32);
extern u32 sub_080002B8(Entity*);
extern u32 sub_080002C8(u16, u8);
extern u32 sub_080002CC(Entity*, s32, s32);
extern u32 sub_080002D4(s32, s32, u32);
extern u32 sub_080002E0(u32, u32);
extern s32 sub_080012DC(Entity*);
extern u32 sub_0800132C(Entity*, Entity*);
extern u32 sub_080040A2(Entity*);
extern u32 sub_080040D8(Entity*, u8*, s32, s32);
extern void sub_08004168(Entity*);
extern u32 sub_0800419C(Entity*, Entity*, u32, u32);
extern u32 sub_080041DC(Entity*, u32, u32);
extern void sub_080042BA(Entity*, u32);
extern void sub_080042D0(Entity*, u32, u16);
extern void sub_080043A8(Entity*);
extern u32 sub_0800445C(Entity*);
extern void sub_080044AE(Entity*, u32, u32);
extern u32 sub_080044EC(Entity*, u32);
extern void sub_0800451C(Entity*);
extern void sub_08004542(Entity*);
extern void sub_080085B0(Entity*);
extern void sub_08008796(Entity*, u32, u32, u32);
extern void sub_08016AD2(Entity*);
extern u32 sub_0801766C(Entity*);
extern void sub_0801AF18(u8*, u32, u32);
extern void sub_0801AFE4(void);
extern void sub_0801C1D4(void);
extern void sub_0801E104(void);
extern void sub_08030118(u32);
extern u32 sub_08031E04(Entity*);
extern void sub_08031E48(Entity*, Entity*);
extern void sub_08032290(Entity*);
extern u32 sub_080322A4(Entity*);
extern void sub_080322E8(Entity*);
extern void sub_08032338(Entity*);
extern void sub_0803C0AC(Entity*);
extern Entity* sub_08049DF4(u32);
extern u32 sub_08049EE4(Entity*);
extern u32 sub_08049F1C(Entity*, Entity*, u32);
extern u32 sub_08049F84(Entity*, u32);
extern u32 sub_08049FA0(Entity*);
extern u32 sub_08049FDC(Entity*, u32);
extern u32 sub_08049EE4(Entity*);
extern void sub_08077E54(ItemBehavior*);
extern void sub_080042BA(Entity*, u32);
extern bool32 sub_08077F24(ItemBehavior*, u32);
extern void sub_08079184();
extern void sub_08077F50(ItemBehavior* beh, u32 arg1);
extern void sub_0807AA80(Entity*);
extern s32 sub_0807887C(Entity*, u32, u32);
extern s32 sub_08078904();
extern void DrawEntities(void);
extern void CopyOAM(void);
extern void sub_0801E104(void);
extern void sub_080A57F4(void);
extern void sub_08030118(u32);
extern u32 sub_0804A044(Entity*, Entity*, u32);
extern void sub_0804A720(Entity*);
extern void sub_0804AA1C(Entity*);
extern void sub_0804C128();
extern u32 sub_080542AC(u32);
extern void sub_08054564();
extern void sub_08054570(void);
extern s32 sub_08056338(void);
extern void sub_080575C8(u32);
extern void sub_08057688(void);
extern void sub_080580B0(u32);
extern void sub_080751E8(u32, u32, void*);
extern void sub_0808091C(const ScreenTransitionData*, u32);
extern void sub_0805BC4C(void);
extern void sub_0807BB68(u32*, u32, u32);
extern void sub_08054570(void);
extern void sub_08059278(void);
extern void sub_0804C128();
extern void sub_08058324(u32);
extern void sub_0801AFE4(void);
extern void sub_0807AABC(Entity*);
extern void sub_08059278(void);
extern void sub_0805B4D0(u32);
extern void sub_0807BA8C(u32, u32);
extern void sub_080AF284(void);
extern void sub_080A71C4(u32, u32, u32, u32);
extern void sub_08054564();
extern void DrawDirect(u32, u32); // trampoline to sub_080B27F4
extern void sub_0801C1D4(void);
extern void DrawOAMCmd(void);
extern u32 sub_0807953C(void);
extern void sub_080AE068(Entity*);
extern u32 sub_0800445C(Entity*);
extern u32 sub_0801766C(Entity*);
extern void sub_08004168(Entity*);
extern u32 sub_0806F520();
extern void sub_0806F4E8(Entity*);
extern void sub_080784C8();
extern u32 sub_0808288C(Entity*, u32, u32, u32);
extern bool32 sub_0806FDA0(Entity*);
extern bool32 LoadSwapGFX(Entity*, u16, u32);
extern void sub_0807921C();
extern void sub_0807ACCC(Entity*);
extern u32 sub_08079F8C(void);
extern void sub_080787CC(Entity*);
extern u32 sub_080044EC(Entity*, u32);
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 IsCollidingPlayer(Entity*);
extern void sub_080809D4(void);
extern void sub_08080CB4(Entity*);
extern void sub_0807B7D8(u32, u32, u32);
extern void sub_0800451C(Entity*);
extern u32 sub_080040D8(Entity*, u8*, s32, s32);
extern u32 sub_0805F8F8(u32);
extern u32 sub_0805F7A0(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 u32* sub_0805F25C(u32);
u32 EntityWithinDistance(Entity*, s32, s32, s32);
extern void LinearMoveAngle(Entity*, u32, u32);
extern void sub_080A1ED0(u32, u32, u32);
extern u32 sub_0806F5B0(u32);
extern void sub_08078790(Entity*, u32);
extern void sub_080788E0(Entity*);
extern void sub_08078B48(void);
extern void sub_0807919C();
extern void sub_0807CAA0(u32, u32);
extern void sub_080085B0(Entity*);
extern u32 sub_08079D48();
extern u32 sub_080542AC(u32);
extern u32 sub_08079FC4(u32);
extern u32 sub_0805F7A0(u32);
extern void sub_0805F8E4(u32 r0, WStruct* r1);
extern Entity* sub_08077C94(ItemBehavior*, u32);
extern Entity* sub_08077C0C(ItemBehavior*, u32);
extern void sub_08077D38(ItemBehavior*, u32);
extern void sub_08077E78(ItemBehavior*, u32);
extern void UpdateItemAnim(ItemBehavior*);
extern u32 sub_0806F948(Entity*);
extern void sub_08077DF4(ItemBehavior*, u32);
extern void sub_08077BB8(ItemBehavior*);
extern bool32 sub_08077EFC(ItemBehavior*);
extern void sub_08078E84(Entity*, Entity*);
extern void sub_080042D0(Entity*, u32, u16);
extern u32 sub_080002A8(u32, u32, u32);
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 LinearMoveDirection(Entity*, u32, u32);
extern void sub_080A2AF4(Entity*, u32, u32);
extern u32 sub_080002CC(Entity*, s32, s32);
extern bool32 sub_0807BD14(Entity*, u32);
extern void sub_0807A5B8(u32);
extern Entity* sub_080A2AD4(Entity*);
extern u32 sub_080040A2(Entity*);
extern Entity* sub_08049DF4(u32);
extern s32 sub_080012DC(Entity*);
extern s32 sub_08056338(void);
extern s32 sub_080AF090(Entity*);
extern u32 PlayerInRange(Entity*, u32, u32);
extern u32 sub_080002C8(u16, u8);
extern u32 sub_080002D4(s32, s32, u32);
extern u32 sub_080002E0(u32, u32);
extern u32 sub_08031E04(Entity*);
extern u32 sub_080322A4(Entity*);
extern u32 sub_08049F1C(Entity*, Entity*, u32);
extern u32 sub_08049F1C(Entity*, Entity*, u32);
extern void SoundReqClipped(Entity*, u32);
extern void SoundReqClipped(Entity*, u32);
extern void GenericKnockback2(Entity*);
extern void sub_08031E48(Entity*, Entity*);
extern void sub_08032290(Entity*);
extern void sub_08032338(Entity*);
extern void sub_0803C0AC(Entity*);
extern void sub_0804AA1C(Entity*);
extern u32 sub_0805F8F8(u32);
extern void sub_0806D02C(Entity*);
extern void sub_0806D0B0(Entity*);
extern void sub_0806F4E8(Entity*);
extern u32 sub_0806F520();
extern u32 sub_0806F5B0(u32);
extern u32 sub_0806F824(Entity*, Entity*, s32, s32);
extern u32 sub_0806F948(Entity*);
extern void sub_0806FBB4(Entity*);
extern bool32 sub_0806FC80(Entity*, Entity*, s32);
extern void sub_0806FCF4(Entity*, s32, s32, s32);
extern void sub_0806FD3C(Entity*);
extern bool32 sub_0806FDA0(Entity*);
extern void sub_080751E8(u32, u32, void*);
extern void sub_08077BB8(ItemBehavior*);
extern Entity* sub_08077C0C(ItemBehavior*, u32);
extern Entity* sub_08077C94(ItemBehavior*, u32);
extern void sub_08077D38(ItemBehavior*, u32);
extern void sub_08077DF4(ItemBehavior*, u32);
extern void sub_08077E54(ItemBehavior*);
extern void sub_08077E78(ItemBehavior*, u32);
extern bool32 sub_08077EFC(ItemBehavior*);
extern bool32 sub_08077F24(ItemBehavior*, u32);
extern void sub_08077F50(ItemBehavior* beh, u32 arg1);
extern void sub_080784C8();
extern void sub_08078790(Entity*, u32);
extern void sub_080787CC(Entity*);
extern s32 sub_0807887C(Entity*, u32, u32);
extern void sub_080788E0(Entity*);
extern s32 sub_08078904();
extern void sub_08078930(Entity*);
extern void sub_08078930(Entity*);
extern void sub_08078954(Entity*);
extern void sub_08078B48(void);
extern void sub_08078E84(Entity*, Entity*);
extern void sub_08079184();
extern void sub_0807919C();
extern void sub_0807921C();
extern u32 sub_0807953C(void);
extern void sub_08079BD8(Entity*);
extern void sub_080AEFB4(Entity*);
extern void UnloadOBJPalette(Entity*);
void sub_080322E8(Entity*);
extern u32 GetTileIndex(u32, u32);
extern void sub_0806FBB4(Entity*);
extern u32 sub_080002D4(s32, s32, u32);
extern void sub_08078930(Entity*);
extern void sub_080044AE(Entity*, u32, u32);
extern void sub_0801AF18(u8*, u32, u32);
extern u32 sub_08079D48();
extern void sub_08079D84(void);
extern u32 sub_08079F8C(void);
extern u32 sub_08079FC4(u32);
extern void sub_0807A5B8(u32);
extern void sub_0807AA80(Entity*);
extern void sub_0807AABC(Entity*);
extern void sub_0807ACCC(Entity*);
extern void sub_0807B7D8(u32, u32, u32);
extern void sub_0807B9B8(s32, s32, s32);
extern void sub_08000148(u32, u32, u32);
extern void CreateRandomItemDrop(Entity*, s32);
extern void sub_0807BA8C(u32, u32);
extern void sub_0807BB68(u32*, u32, u32);
extern bool32 sub_0807BD14(Entity*, u32);
extern void sub_0807CAA0(u32, u32);
extern bool32 sub_080806BC(u32, u32, u32, u32);
extern void sub_0808091C(const ScreenTransitionData*, u32);
extern void sub_080809D4(void);
extern void sub_08080CB4(Entity*);
extern u32 sub_0808288C(Entity*, u32, u32, u32);
extern void sub_080A1ED0(u32, u32, u32);
extern Entity* sub_080A2A3C(Entity*, u32, u32, u32);
extern void sub_0806FCF4(Entity*, s32, s32, s32);
extern u32 sub_080041DC(Entity*, u32, u32);
extern void sub_080AE58C(Entity*, u32, u32);
extern u32 sub_0800132C(Entity*, Entity*);
extern void sub_08008796(Entity*, u32, u32, u32);
extern bool32 sub_080AE4CC(u8*, s32, s32, s32);
extern LayerStruct* GetLayerByIndex(u32);
extern Entity* sub_080A2AD4(Entity*);
extern void sub_080A2AF4(Entity*, u32, u32);
extern void sub_080A57F4(void);
extern void sub_080A71C4(u32, u32, u32, u32);
extern void sub_080A7C18(u32, u32, u32);
extern void sub_080AE068(Entity*);
extern void sub_080AF284(void);
extern void sub_08078930(Entity*);
extern void sub_08078954(Entity*);
extern void sub_0809EB30(Entity*);
extern void sub_0809EAD8(Entity*);
extern void sub_0809EABC(Entity*);
extern void sub_08079D84(void);
extern void sub_080A2CC0(Entity*, Entity**, u16*);
// extern void sub_080A2CC0(Entity*, void*, void*);
extern void sub_08095C48(Entity*);
extern s32 sub_080012DC(Entity*);
extern u32 sub_0804A024(Entity*, u32, u32);
extern s32 sub_080012DC(Entity*);
extern void sub_08001318(Entity*);
extern void sub_080043A8(Entity*);
extern u32 sub_08049F1C(Entity*, Entity*, u32);
extern void sub_0804AA1C(Entity*);
extern void sub_08027870(Entity*);
extern u32 sub_0804A044(Entity*, Entity*, u32);
extern void sub_0804AA1C(Entity*);
extern void sub_08049CF4(Entity*);
#endif
+1
View File
@@ -1681,6 +1681,7 @@ SECTIONS {
data/const/playerItem/playerItemGustJar.o(.rodata);
data/gfx/fixed_type_gfx.o(.rodata);
data/const/movement.o(.rodata);
src/movement.o(.rodata);
data/map/exit_lists.o(.rodata);
data/gfx_0813AA54.o(.rodata);
data/gfx/sprite_gfx.o(.rodata);
+41 -41
View File
@@ -13,18 +13,18 @@ extern u8 gCollidableCount;
extern u8 gUnk_080B3740[];
typedef struct {
u8 _0;
u8 _1;
u8 _2;
u8 _3;
u8 _4;
u8 _5;
s8 _6;
u8 _7;
u8 _8;
u8 _9;
u8 _a;
u8 _b;
/*0x00*/ u8 orgKnockbackSpeed;
/*0x01*/ u8 orgIframes;
/*0x02*/ u8 orgKnockbackDuration;
/*0x03*/ u8 tgtDamage;
/*0x04*/ u8 orgConfusedTime;
/*0x05*/ u8 tgtKnockbackSpeed;
/*0x06*/ s8 tgtIframes;
/*0x07*/ u8 tgtKnockbackDuration;
/*0x08*/ u8 orgDamage;
/*0x09*/ u8 tgtConfusedTime;
/*0x0a*/ u8 _a;
/*0x0b*/ u8 _b;
} ColSettings;
extern ColSettings gCollisionMtx[173 * 34];
@@ -362,7 +362,7 @@ s32 sub_08017B1C(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
} else {
org->knockbackDuration = 0x10;
org->iframes = -20;
org->field_0x46 = 640;
org->knockbackSpeed = 640;
}
return 1;
}
@@ -374,7 +374,7 @@ s32 sub_08017B58(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
if (x << 24 <= 0) {
tgt->field_0x1d = 0;
tgt->subAction = 2;
tgt->field_0x46 = 0;
tgt->knockbackSpeed = 0;
}
}
} else {
@@ -399,7 +399,7 @@ s32 sub_08017BBC(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
org->health = sub_08017874(org, tgt);
org->knockbackDuration = 12;
org->iframes = 30;
org->field_0x46 = 384;
org->knockbackSpeed = 384;
if (tgt->iframes == 0)
tgt->iframes = -1;
return 1;
@@ -416,7 +416,7 @@ s32 sub_08017C40(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
}
org->knockbackDuration = 12;
org->iframes = 16;
org->field_0x46 = 640;
org->knockbackSpeed = 640;
if (tgt->iframes == 0)
tgt->iframes = -1;
return 1;
@@ -432,7 +432,7 @@ s32 sub_08017CBC(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
tgt->knockbackDuration = 12;
tgt->iframes = 16;
tgt->confusedTime = -16;
tgt->field_0x46 = 768;
tgt->knockbackSpeed = 768;
if (org->iframes == 0)
org->iframes = -1;
}
@@ -444,7 +444,7 @@ s32 sub_08017D28(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
org->field_0x7a.HWORD = 600;
org->knockbackDuration = 12;
org->iframes = 16;
org->field_0x46 = 640;
org->knockbackSpeed = 640;
if (tgt->iframes == 0)
tgt->iframes = -1;
return 1;
@@ -484,7 +484,7 @@ int sub_08017DD4(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
gPlayerEntity.iframes = 12;
gPlayerEntity.knockbackDuration = 16;
gPlayerEntity.knockbackDirection = DirectionTurnAround(direction);
gPlayerEntity.field_0x46 = 640;
gPlayerEntity.knockbackSpeed = 640;
}
if (tgt->iframes == 0)
tgt->iframes = -1;
@@ -493,7 +493,7 @@ int sub_08017DD4(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
s32 sub_08017E88(Entity* org, Entity* tgt, u32 direction, ColSettings* settings) {
org->knockbackDuration = 2;
org->field_0x46 = 640;
org->knockbackSpeed = 640;
if (tgt->iframes == 0)
tgt->iframes = -1;
return 1;
@@ -509,11 +509,11 @@ s32 sub_08017EB0(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
tgt->damage = temp;
gPlayerEntity.knockbackDuration = 12;
gPlayerEntity.iframes = 16;
gPlayerEntity.field_0x46 = 384;
gPlayerEntity.knockbackSpeed = 384;
} else if (org->kind == PLAYER_ITEM && org->id == 5) {
org->knockbackDuration = 8;
org->iframes = -6;
org->field_0x46 = 384;
org->knockbackSpeed = 384;
gPlayerEntity.iframes = 0x80;
}
if (tgt->iframes == 0)
@@ -608,10 +608,10 @@ s32 sub_080180E8(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
if (DirectionNormalize(tgt->direction - v3) <= 0x18) {
org->knockbackDuration = 12;
org->iframes = -16;
org->field_0x46 = 640;
org->knockbackSpeed = 640;
tgt->knockbackDuration = 12;
tgt->iframes = -16;
tgt->field_0x46 = 768;
tgt->knockbackSpeed = 768;
sub_08017940(org, tgt);
return 1;
}
@@ -700,27 +700,27 @@ s32 sub_08018308(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
}
if (!temp) {
u32 tmp2;
org->field_0x46 = 16 * settings->_0;
org->iframes = settings->_1;
org->knockbackSpeed = 16 * settings->orgKnockbackSpeed;
org->iframes = settings->orgIframes;
if (org->iframes == 0)
org->iframes = -1;
org->knockbackDuration = settings->_2;
tgt->damage = settings->_3;
org->knockbackDuration = settings->orgKnockbackDuration;
tgt->damage = settings->tgtDamage;
tmp2 = 0xFF;
if (settings->_3 != 0)
if (settings->tgtDamage != 0)
org->health = sub_08017874(org, tgt);
if (settings->_4 > org->confusedTime)
org->confusedTime = settings->_4;
tgt->field_0x46 = 16 * settings->_5;
tgt->iframes = settings->_6;
if (settings->_6 == 0)
if (settings->orgConfusedTime > org->confusedTime)
org->confusedTime = settings->orgConfusedTime;
tgt->knockbackSpeed = 16 * settings->tgtKnockbackSpeed;
tgt->iframes = settings->tgtIframes;
if (settings->tgtIframes == 0)
tgt->iframes = -1;
tgt->knockbackDuration = settings->_7;
tmp2 &= org->damage = settings->_8;
tgt->knockbackDuration = settings->tgtKnockbackDuration;
tmp2 &= org->damage = settings->orgDamage;
if (tmp2 != 0)
tgt->health = sub_08017874(tgt, org);
if (settings->_9 > tgt->confusedTime)
tgt->confusedTime = settings->_9;
if (settings->tgtConfusedTime > tgt->confusedTime)
tgt->confusedTime = settings->tgtConfusedTime;
}
if (settings->_a & 1)
sub_08017940(org, tgt);
@@ -735,13 +735,13 @@ s32 sub_08018308(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
parent->knockbackDuration = tgt->knockbackDuration;
if (parent->confusedTime == 0)
parent->confusedTime = tgt->confusedTime;
parent->field_0x46 = tgt->field_0x46;
parent->knockbackSpeed = tgt->knockbackSpeed;
parent->field_0x4c = org;
}
}
if (org->kind == PLAYER_ITEM) {
if (org->id == 1) {
if (settings->_8) {
if (settings->orgDamage) {
sub_080179EC(org, tgt);
}
} else if (org->id == 4) {
@@ -749,7 +749,7 @@ s32 sub_08018308(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
sub_08017A90(org, tgt);
}
} else if (org->id == 3) {
if (settings->_9) {
if (settings->tgtConfusedTime) {
SoundReqClipped(tgt, SFX_HIT);
}
} else if (org->id == 5) {
+6 -6
View File
@@ -86,21 +86,21 @@ u32 sub_0806F3E4(Entity* ent) {
return 0;
switch (gPlayerState.field_0x1d) {
case 1:
ent->field_0x46 += 64;
ent->knockbackSpeed += 64;
break;
case 2:
ent->field_0x46 += 128;
ent->knockbackSpeed += 128;
break;
case 3:
ent->field_0x46 += 192;
ent->knockbackSpeed += 192;
break;
}
if (ent->field_0x46 > 0x500)
ent->field_0x46 = 0x500;
if (ent->knockbackSpeed > 0x500)
ent->knockbackSpeed = 0x500;
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;
LinearMoveDirection(ent, ent->field_0x46, GetFacingDirection(ent, &tmp_ent));
LinearMoveDirection(ent, ent->knockbackSpeed, GetFacingDirection(ent, &tmp_ent));
if (sub_0800419C(&tmp_ent, ent, 4, 4)) {
u32 state = ent->field_0x1c & 0xF;
if (state == 2) {
+2 -2
View File
@@ -400,7 +400,7 @@ void sub_08032008(Entity* this) {
if (this->direction & 0xf)
this->spriteSettings.flipX = (this->direction >> 4 ^ 1);
ProcessMovement(this);
ProcessMovement0(this);
} else {
if (this->field_0x76.HALF.HI == 0) {
if (EntityWithinDistance(this, parent->x.HALF.HI, parent->y.HALF.HI, 1) == 0) {
@@ -457,7 +457,7 @@ void sub_08032160(Entity* this) {
}
void sub_080321E8(Entity* this) {
sub_080AEFE0(this);
ProcessMovement2(this);
if (sub_080044EC(this, 0x2000) == 0)
this->action = 8;
+1 -1
View File
@@ -331,7 +331,7 @@ void sub_080309E8(ArmosEntity* this) {
}
void sub_08030A04(ArmosEntity* this) {
ProcessMovement(super);
ProcessMovement0(super);
if ((super->frame & 1) != 0) {
super->frame = super->frame & 0xfe;
EnqueueSFX(SFX_101);
+9 -10
View File
@@ -23,15 +23,14 @@ const u8 gUnk_080D0724[];
const u16 gUnk_080D0728[];
const u16 gUnk_080D0730[];
extern u32 sub_0804A044(Entity*, Entity*, u32);
extern void sub_0803E86C(BallChainSoldierEntity*);
extern void sub_0803E9A4(BallChainSoldierEntity*);
extern bool32 sub_0803E9D4(BallChainSoldierEntity*);
extern void sub_0803E8CC(BallChainSoldierEntity*);
extern void sub_0803E92C(BallChainSoldierEntity*);
extern bool32 sub_0803EA64(BallChainSoldierEntity*);
extern void sub_0803E94C(BallChainSoldierEntity*, u32);
extern bool32 sub_0803EAD0(BallChainSoldierEntity*, u32);
void sub_0803E86C(BallChainSoldierEntity*);
void sub_0803E9A4(BallChainSoldierEntity*);
bool32 sub_0803E9D4(BallChainSoldierEntity*);
void sub_0803E8CC(BallChainSoldierEntity*);
void sub_0803E92C(BallChainSoldierEntity*);
bool32 sub_0803EA64(BallChainSoldierEntity*);
void sub_0803E94C(BallChainSoldierEntity*, u32);
bool32 sub_0803EAD0(BallChainSoldierEntity*, u32);
void BallChainSoldier(Entity* this) {
EnemyFunctionHandler(this, (EntityActionArray)BallChainSoldier_Functions);
@@ -92,7 +91,7 @@ void sub_0803E61C(BallChainSoldierEntity* this) {
sub_0803E9A4(this);
if (sub_0803E9D4(this) == 0) {
if (super->knockbackDuration == 0) {
if (ProcessMovement(super) == 0) {
if (ProcessMovement0(super) == 0) {
sub_0803E86C(this);
return;
}
+4 -6
View File
@@ -8,8 +8,6 @@
#include "enemy.h"
#include "functions.h"
extern u32 PlayerInRange(Entity*, u32, u32);
u32 sub_08021D00(Entity*);
void sub_08021D44(Entity* this, u32 direction);
@@ -114,7 +112,7 @@ void sub_080218CC(Entity* this) {
GetNextFrame(this);
if (this->frame & 1) {
sub_080AEFE0(this);
ProcessMovement2(this);
if (sub_080044EC(this, 0x1c00) == 0)
this->frameDuration = 1;
}
@@ -184,7 +182,7 @@ void sub_08021A64(Entity* this) {
}
sub_08021D44(this, tmp);
}
ProcessMovement(this);
ProcessMovement0(this);
GetNextFrame(this);
}
}
@@ -206,7 +204,7 @@ void sub_08021AD8(Entity* this) {
this->direction = (u8)tmp;
EnqueueSFX(SFX_PLY_JUMP);
}
sub_080AEFE0(this);
ProcessMovement2(this);
if (!GravityUpdate(this, 0x1800))
this->frameDuration = 1;
}
@@ -265,7 +263,7 @@ void sub_08021B64(Entity* this) {
void sub_08021C58(Entity* this) {
GetNextFrame(this);
if (this->frame & 1) {
sub_080AEFE0(this);
ProcessMovement2(this);
if (GravityUpdate(this, 0x1800) == 0)
this->frameDuration = 1;
}
+1 -3
View File
@@ -10,13 +10,11 @@
#include "room.h"
#include "functions.h"
extern void sub_080A2CC0(Entity*, void*, void*);
void BladeTrap(Entity* this) {
if (this->action == 0) {
this->action = 1;
this->child = GetCurrentRoomProperty(this->type);
sub_080A2CC0(this, &this->child, &this->field_0x74);
sub_080A2CC0(this, &this->child, &this->field_0x74.HWORD);
}
if (!(this->direction & 0x80)) {
LinearMoveUpdate(this);
+1 -4
View File
@@ -11,9 +11,6 @@
#include "object.h"
#include "functions.h"
extern void sub_08078930(Entity*);
extern void sub_08078954(Entity*);
void sub_0802CB68(Entity*);
void sub_0802CBC4(Entity*);
void sub_0802CC18(Entity*);
@@ -161,7 +158,7 @@ void sub_0802C8D8(Entity* this) {
void sub_0802C91C(Entity* this) {
GetNextFrame(this);
ProcessMovement(this);
ProcessMovement0(this);
if (this->field_0x82.HALF.LO) {
if (this->collisions) {
sub_0800417E(this, this->collisions);
-2
View File
@@ -14,8 +14,6 @@ typedef struct {
void (*const Bombarossa_Functions[])(Entity*);
const s8 gUnk_080CEB50[];
extern void sub_080A2CC0(Entity*, void*, void*);
void sub_0803350C(BombarossaEntity* this);
void Bombarossa(Entity* this) {
+1 -1
View File
@@ -365,7 +365,7 @@ void sub_0803C6DC(BowMoblinEntity* this) {
super->speed = tmp;
}
ProcessMovement(super);
ProcessMovement0(super);
GetNextFrame(super);
}
+8 -8
View File
@@ -14,18 +14,18 @@
#include "game.h"
#include "item.h"
void sub_08028E9C(Entity*);
void sub_08028EDC(Entity*);
bool32 sub_08028F98(Entity*, u32);
bool32 sub_08028FDC(Entity*);
void sub_08028FFC(Entity*);
void sub_08029078(Entity*);
void sub_080290E0(Entity*, u32);
void sub_080290FC(Entity*);
bool32 sub_0802915C(Entity*);
bool32 sub_080291DC(Entity*);
void sub_0802922C(Entity*);
void sub_08028E9C(Entity*);
void sub_08028FFC(Entity*);
void sub_0802925C(Entity*);
void sub_080290E0(Entity*, u32);
bool32 sub_08028F98(Entity*, u32);
void sub_08029078(Entity*);
bool32 sub_08028FDC(Entity*);
void sub_080290FC(Entity*);
void sub_08028EDC(Entity*);
extern const struct SalesOffering gUnk_080CC954[];
extern const u8 gUnk_080CC9C0[];
+1 -3
View File
@@ -12,6 +12,7 @@ typedef struct {
u32 unk_84;
} BusinessScrubPrologueEntity;
extern void sub_080954AC(Entity*, u32);
extern u16 script_BusinessScrubIntro[];
void (*const BusinessScrubPrologue_Functions[])(Entity*);
@@ -20,9 +21,6 @@ const u8 gUnk_080D1A38[];
const s8 gUnk_080D1A3E[];
const u16 gUnk_080D1A4E[];
extern void sub_08095C48(Entity* this);
extern void sub_080954AC(Entity*, u32);
void sub_08046030(BusinessScrubPrologueEntity*, u32);
bool32 sub_08045F54(BusinessScrubPrologueEntity*, u32);
void sub_08045FF0(BusinessScrubPrologueEntity*);
+1 -6
View File
@@ -8,12 +8,7 @@
#include "enemy.h"
#include "functions.h"
extern s32 sub_080012DC(Entity*);
extern u32 sub_0804A024(Entity*, u32, u32);
extern bool32 sub_080AF038(Entity*);
extern void (*const gUnk_080012C8[])(Entity*);
extern void (*const Chaser_Functions[])(Entity*);
extern void (*const gUnk_080CD298[])(Entity*);
@@ -54,7 +49,7 @@ void sub_0802B56C(Entity* this) {
this->speed = 0x40;
}
if (sub_080AF038(this)) {
if (ProcessMovement12(this)) {
if (this->animIndex != 1) {
InitializeAnimation(this, 1);
}
+9 -17
View File
@@ -9,14 +9,6 @@
#include "enemy.h"
#include "functions.h"
extern s32 sub_080012DC(Entity*);
extern void sub_08001318(Entity*);
extern void sub_080043A8(Entity*);
extern u32 sub_08049F1C(Entity*, Entity*, u32);
extern u32 PlayerInRange(Entity*, u32, u32);
extern void sub_0804AA1C(Entity*);
extern void sub_080AF160(Entity*);
extern Entity* gUnk_020000B0;
void sub_0801F328(Entity*);
@@ -200,7 +192,7 @@ void sub_0801F12C(Entity* this) {
if ((this->field_0xf++ & 7) == 0) {
this->direction = sub_08049F84(this, 1);
}
ProcessMovement(this);
ProcessMovement0(this);
GetNextFrame(this);
if (--this->actionDelay == 0) {
if (PlayerInRange(this, 1, 0x38)) {
@@ -222,7 +214,7 @@ void sub_0801F1B0(Entity* this) {
this->hitType = 90;
EnqueueSFX(SFX_12B);
}
sub_080AEFE0(this);
ProcessMovement2(this);
if (GravityUpdate(this, 0x4000) == 0)
GetNextFrame(this);
} else {
@@ -257,7 +249,7 @@ void sub_0801F270(Entity* this) {
this->direction = sub_08049F84(this, 1);
}
sub_080AF160(this);
ProcessMovement5(this);
GetNextFrame(this);
if (sub_0801FBD0(this))
return;
@@ -405,7 +397,7 @@ void sub_0801F508(Entity* this) {
if (tmp == 4) {
this->direction = sub_08049F84(this, 1);
}
ProcessMovement(this);
ProcessMovement0(this);
GetNextFrame(this);
}
}
@@ -418,7 +410,7 @@ void sub_0801F584(Entity* this) {
this->hitType = 91;
EnqueueSFX(SFX_12B);
}
sub_080AEFE0(this);
ProcessMovement2(this);
if (GravityUpdate(this, 0x4000) == 0)
GetNextFrame(this);
@@ -464,7 +456,7 @@ void sub_0801F688(Entity* this) {
if (sub_0801FBD0(this) || this->field_0x82.HALF.HI) {
this->direction = sub_08049F84(this, 1);
sub_080AF160(this);
ProcessMovement5(this);
GetNextFrame(this);
} else {
sub_0801F748(this);
@@ -583,7 +575,7 @@ void sub_0801F8C0(Entity* this) {
if (tmp == 4) {
this->direction = GetFacingDirection(this, gUnk_020000B0);
}
ProcessMovement(this);
ProcessMovement0(this);
GetNextFrame(this);
}
}
@@ -595,7 +587,7 @@ void sub_0801F940(Entity* this) {
this->frame ^= 1;
EnqueueSFX(SFX_12B);
}
sub_080AEFE0(this);
ProcessMovement2(this);
if (GravityUpdate(this, 0x4000) == 0)
GetNextFrame(this);
} else {
@@ -635,7 +627,7 @@ void sub_0801F9E0(Entity* this) {
void sub_0801FA30(Entity* this) {
if (sub_0801FBD0(this)) {
this->direction = sub_08049F84(this, 1);
sub_080AF160(this);
ProcessMovement5(this);
GetNextFrame(this);
} else if (sub_08049FDC(this, 1) == 0) {
this->action = 9;
+1 -2
View File
@@ -6,8 +6,7 @@
*/
#include "enemy.h"
void sub_08027870(Entity*);
#include "functions.h"
extern void (*const ChuchuBoss_Functions[])(Entity*);
extern void (*const gUnk_080CC1B0[])(Entity*);
+13 -13
View File
@@ -30,16 +30,16 @@ const u16 gUnk_080CF828[];
const s8 gCuccoAggrFxHorizontalOffsets[];
const u8 gCuccoAggrFx[];
extern void sub_080391B4(CuccoAggrEntity* this);
extern void sub_08039218(CuccoAggrEntity* this);
extern void CuccoAggr_CreateFx(CuccoAggrEntity* this);
extern void sub_08039120(CuccoAggrEntity* this);
extern void sub_08039140(CuccoAggrEntity* this);
extern void sub_0803901C(CuccoAggrEntity* this);
extern void sub_08039298(CuccoAggrEntity* this);
extern void sub_080390F8(CuccoAggrEntity* this);
extern void sub_080390C0(CuccoAggrEntity* this);
extern bool32 CuccoAggr_IsOutsideScroll(CuccoAggrEntity* this);
void sub_080391B4(CuccoAggrEntity* this);
void sub_08039218(CuccoAggrEntity* this);
void CuccoAggr_CreateFx(CuccoAggrEntity* this);
void sub_08039120(CuccoAggrEntity* this);
void sub_08039140(CuccoAggrEntity* this);
void sub_0803901C(CuccoAggrEntity* this);
void sub_08039298(CuccoAggrEntity* this);
void sub_080390F8(CuccoAggrEntity* this);
void sub_080390C0(CuccoAggrEntity* this);
bool32 CuccoAggr_IsOutsideScroll(CuccoAggrEntity* this);
void CuccoAggr(Entity* this) {
u32 index = sub_080012DC(this);
@@ -122,7 +122,7 @@ void sub_08038E18(CuccoAggrEntity* this) {
super->spritePriority.b1 = 1;
super->spritePriority.b0 = 4;
super->direction = Random() & 0x1f;
ProcessMovement(super);
ProcessMovement0(super);
UpdateSpriteForCollisionLayer(super);
}
}
@@ -148,7 +148,7 @@ void sub_08038ED0(CuccoAggrEntity* this) {
}
void sub_08038EE0(CuccoAggrEntity* this) {
ProcessMovement(super);
ProcessMovement0(super);
GetNextFrame(super);
sub_08039298(this);
if (GravityUpdate(super, 0x1C00) == 0) {
@@ -172,7 +172,7 @@ void sub_08038F20(CuccoAggrEntity* this) {
void sub_08038F44(CuccoAggrEntity* this) {
super->direction = GetFacingDirection(&gPlayerEntity, super);
sub_080390F8(this);
ProcessMovement(super);
ProcessMovement0(super);
sub_080044EC(super, 0x1800);
GetNextFrame(super);
sub_08039298(this);
+2 -2
View File
@@ -56,7 +56,7 @@ void sub_08022988(Entity* this) {
EnqueueSFX(SFX_VO_CHEEP);
}
ProcessMovement(this);
ProcessMovement0(this);
if (GravityUpdate(this, 0x2000) == 0) {
if (--this->actionDelay == 0) {
sub_08022A88(this);
@@ -92,7 +92,7 @@ void sub_08022A40(Entity* this) {
this->frameIndex = 1;
}
ProcessMovement(this);
ProcessMovement0(this);
if (GravityUpdate(this, 0x2000) == 0) {
if (--this->actionDelay == 0) {
sub_08022A88(this);
+1 -1
View File
@@ -13,7 +13,7 @@ void Curtain_OnTick(Entity* this) {
}
void Curtain_OnCollision(Entity* this) {
if (this->field_0x46) {
if (this->knockbackSpeed != 0) {
this->action = 2;
this->flags &= ~ENT_COLLIDE;
this->spritePriority.b0 = 7;
+15 -18
View File
@@ -14,26 +14,23 @@ typedef struct {
} PACKED stuct_080CAB14;
void sub_08021218(Entity*, u32, u32);
void sub_08021588(Entity*);
void sub_080213D0(Entity*, u32);
void sub_0802124C(Entity*);
u32 sub_08021274(u32, u32);
void sub_08021390(Entity*);
void sub_0802159C(Entity*);
void sub_0804AA1C(Entity*);
void sub_080213B0(Entity*);
void sub_080213D0(Entity*, u32);
void sub_080213F0(Entity*);
void sub_08021400(Entity*);
void sub_08021414(Entity*);
void sub_08021424(Entity*);
u32 sub_080214FC(Entity*);
void sub_08021540(Entity*);
void sub_08021588(Entity*);
void sub_0802159C(Entity*);
void sub_08021600(Entity*);
void sub_080213B0(Entity*);
u32 PlayerInRange(Entity*, u32, u32);
u32 sub_0802169C(Entity*, Entity*);
void sub_0802124C(Entity*);
void sub_08021644(Entity*);
void sub_08021414(Entity*);
void sub_08021400(Entity*);
u32 sub_08021274(u32, u32);
u32 sub_08021664(Entity*, Entity*);
u32 sub_0804A044(Entity*, Entity*, u32);
void sub_08021424(Entity*);
u32 sub_0802169C(Entity*, Entity*);
extern Entity* gUnk_020000B0;
@@ -157,7 +154,7 @@ void sub_08020DD4(Entity* this) {
} else {
if (--this->actionDelay == 0)
sub_08021540(this);
ProcessMovement(this);
ProcessMovement0(this);
UpdateAnimationSingleFrame(this);
}
}
@@ -191,7 +188,7 @@ void sub_08020E98(Entity* this) {
sub_08021218(this, 7, this->animationState);
} else {
this->direction = GetFacingDirection(gUnk_020000B0, this);
if (ProcessMovement(this) == 0) {
if (ProcessMovement0(this) == 0) {
this->action = 8;
sub_08021218(this, 7, this->animationState);
} else {
@@ -205,7 +202,7 @@ void sub_08020E98(Entity* this) {
sub_08021414(this);
} else {
this->direction = GetFacingDirection(this, gUnk_020000B0);
ProcessMovement(this);
ProcessMovement0(this);
sub_0802124C(this);
sub_08021644(this);
}
@@ -324,7 +321,7 @@ void sub_080210E4(Entity* this) {
}
sub_08021644(this);
if ((this->frame & 0x10) && (!ProcessMovement(this) || (this->child && (this->child->bitfield & 0x80)))) {
if ((this->frame & 0x10) && (!ProcessMovement0(this) || (this->child && (this->child->bitfield & 0x80)))) {
sub_080213D0(this, 0);
} else {
if (--this->field_0x76.HWORD == 0)
@@ -519,7 +516,7 @@ void sub_08021424(Entity* this) {
sub_080212B0(this);
} else {
this->direction = CalculateDirectionTo(this->x.HALF.HI, this->y.HALF.HI, x, y);
if (!ProcessMovement(this)) {
if (!ProcessMovement0(this)) {
sub_080212B0(this);
} else {
UpdateAnimationSingleFrame(this);
-1
View File
@@ -9,7 +9,6 @@
#include "enemy.h"
#include "functions.h"
extern void sub_08049CF4(Entity*);
void sub_080221C0(Entity*);
typedef struct {
+2 -2
View File
@@ -273,7 +273,7 @@ void Enemy50_Action6(Enemy50Entity* this) {
sub_08004596(super, GetFacingDirection(super, gUnk_020000B0));
}
sub_0803F66C(this);
sub_080AEFB4(super);
ProcessMovement1(super);
} else {
super->action = 7;
super->actionDelay = 0x1e;
@@ -316,7 +316,7 @@ void Enemy50_Action9(Enemy50Entity* this) {
super->animationState = 0xff;
super->iframes = -0xc;
super->knockbackDuration = 0x14;
super->field_0x46 = 0x180;
super->knockbackSpeed = 0x180;
super->knockbackDirection = gPlayerEntity.animationState << 2 ^ 0x10;
sub_08041128(this);
sub_0803F6EC(this);
+2 -2
View File
@@ -451,7 +451,7 @@ void sub_08031250(EyegoreEntity* this) {
super->y.HALF.HI = this->unk_76;
this->unk_79 = tmp2 | this->unk_79;
}
if (((this->unk_79 & 0x80) == 0) && (ProcessMovement(super) == 0)) {
if (((this->unk_79 & 0x80) == 0) && (ProcessMovement0(super) == 0)) {
if ((this->unk_78 & 0x80) != 0) {
this->unk_78 = 0x82;
} else {
@@ -459,7 +459,7 @@ void sub_08031250(EyegoreEntity* this) {
}
}
} else {
ProcessMovement(super);
ProcessMovement0(super);
}
}
+1 -3
View File
@@ -17,8 +17,6 @@ extern const u16 gUnk_080CD568[];
extern const u8 gUnk_080CD580[];
extern const s16 gUnk_080CD58C[];
extern void sub_080AEFB4(Entity*);
void FallingBoulder(Entity* this) {
EnemyFunctionHandler(this, FallingBoulder_Functions);
}
@@ -115,7 +113,7 @@ NONMATCH("asm/non_matching/fallingBoulder/sub_0802C334.inc", void sub_0802C334(E
y = gRoomControls.origin_y + gRoomControls.height - this->y.HALF.HI;
if (y >= 5) {
sub_080AEFB4(this);
ProcessMovement1(this);
} else {
LinearMoveUpdate(this);
if (this->z.HALF.HI - y > 0x38) {
+1 -1
View File
@@ -52,7 +52,7 @@ void sub_080453E8(Entity* this) {
}
void sub_08045430(Entity* this) {
sub_080AEFE0(this);
ProcessMovement2(this);
GetNextFrame(this);
if (GravityUpdate(this, 0x1800) == 0)
sub_08045524(this);
+1 -1
View File
@@ -221,7 +221,7 @@ void sub_0803A080(FlyingSkullEntity* this) {
void sub_0803A09C(FlyingSkullEntity* this) {
GetNextFrame(super);
sub_080AEFE0(super);
ProcessMovement2(super);
if (super->collisions) {
sub_0803A0E0(this);
+3 -3
View File
@@ -231,7 +231,7 @@ void Ghini_Action6(GhiniEntity* this) {
sub_08004596(super, GetFacingDirection(super, gUnk_020000B0));
}
sub_0803F66C(this);
sub_080AEFB4(super);
ProcessMovement1(super);
GetNextFrame(super);
} else {
super->action = 7;
@@ -274,7 +274,7 @@ void Ghini_Action9(GhiniEntity* this) {
super->animationState = 0xff;
super->iframes = -0xc;
super->knockbackDuration = 0x14;
super->field_0x46 = 0x180;
super->knockbackSpeed = 0x180;
super->knockbackDirection = gPlayerEntity.animationState << 2 ^ 0x10;
sub_0803F51C(this);
sub_0803F6EC(this);
@@ -311,7 +311,7 @@ void sub_0803F58C(GhiniEntity* this) {
s32 yBefore;
yBefore = super->y.WORD;
sub_080AEFB4(super);
ProcessMovement1(super);
yAfter = super->y.WORD;
super->y.WORD = yAfter - (yAfter - yBefore) / 2;
}
+5 -5
View File
@@ -120,7 +120,7 @@ void sub_080375A4(GibdoEntity* this) {
sub_08037794(this);
} else {
UpdateAnimationSingleFrame(super);
if (ProcessMovement(super) == 0) {
if (ProcessMovement0(super) == 0) {
if (!(--super->field_0xf)) {
sub_080379BC(this);
}
@@ -148,7 +148,7 @@ void sub_08037624(GibdoEntity* this) {
} else {
UpdateAnimationSingleFrame(super);
UpdateAnimationSingleFrame(super);
if (ProcessMovement(super) == 0) {
if (ProcessMovement0(super) == 0) {
if (!(--super->field_0xf)) {
sub_080379BC(this);
}
@@ -170,7 +170,7 @@ void sub_08037690(GibdoEntity* this) {
} else {
if ((super->frame & 1) != 0) {
super->hitType = 0x27;
ProcessMovement(super);
ProcessMovement0(super);
}
}
}
@@ -359,7 +359,7 @@ void sub_08037A58(GibdoEntity* this) {
super->iframes = 0xf4;
super->knockbackDirection = DirectionFromAnimationState(super->animationState) ^ 0x10;
super->knockbackDuration = 8;
super->field_0x46 = 0x180;
super->knockbackSpeed = 0x180;
this->field_0x76 = 0x3c;
InitAnimationForceUpdate(super, super->animationState + 0x10);
}
@@ -370,7 +370,7 @@ void sub_08037ACC(GibdoEntity* this) {
gPlayerEntity.iframes = 0x1e;
gPlayerEntity.knockbackDirection = DirectionFromAnimationState(super->animationState);
gPlayerEntity.knockbackDuration = 4;
gPlayerEntity.field_0x46 = 0x180;
gPlayerEntity.knockbackSpeed = 0x180;
}
// Damage player maybe?
+6 -6
View File
@@ -189,7 +189,7 @@ void sub_0802BE18(Entity* this) {
}
void sub_0802BE48(Entity* this) {
if (!sub_080AEFE0(this)) {
if (!ProcessMovement2(this)) {
sub_0802C218(this);
InitScreenShake(8, 0);
} else {
@@ -208,7 +208,7 @@ void sub_0802BE80(Entity* this) {
}
if (this->speed > 0) {
sub_080AEFE0(this);
ProcessMovement2(this);
sub_0802C18C(this);
} else {
sub_0802C1C0(this);
@@ -218,7 +218,7 @@ void sub_0802BE80(Entity* this) {
void sub_0802BEBC(Entity* this) {
this->direction ^= 0x10;
sub_080AEFE0(this);
ProcessMovement2(this);
this->direction ^= 0x10;
if (!sub_080044EC(this, Q_16_16(0.125))) {
sub_0802C1C0(this);
@@ -240,7 +240,7 @@ void sub_0802BEEC(Entity* this) {
}
void sub_0802BF3C(Entity* this) {
ProcessMovement(this);
ProcessMovement0(this);
GetNextFrame(this);
if (--this->actionDelay == 0) {
u32 sprite;
@@ -322,7 +322,7 @@ bool32 sub_0802C06C(Entity* this) {
for (i = 0; i < 8; i++) {
x += xdiff;
y += ydiff;
if (sub_080AE4CC(layer, x, y, 0))
if (IsTileCollision(layer, x, y, 0))
return FALSE;
}
@@ -342,7 +342,7 @@ bool32 sub_0802C0E8(Entity* this) {
u8* layer = this->collisionLayer == 2 ? gUnk_0200D654 : gUnk_02027EB4;
u32 ret = FALSE;
if (!sub_0806FC24(TILE(x, y), 9)) {
if (sub_080AE4CC(layer, x, y, 0)) {
if (IsTileCollision(layer, x, y, 0)) {
ret = 1;
} else {
ret = 0;
+2 -2
View File
@@ -74,7 +74,7 @@ void sub_0803248C(Entity* this) {
if (this->actionDelay == 0) {
sub_08032650(this);
}
if (ProcessMovement(this) == 0) {
if (ProcessMovement0(this) == 0) {
this->actionDelay = 1;
}
UpdateAnimationSingleFrame(this);
@@ -126,7 +126,7 @@ void sub_08032574(Entity* this) {
return;
}
if (--this->field_0x76.HWORD == 0 || !sub_080AEFE0(this)) {
if (--this->field_0x76.HWORD == 0 || !ProcessMovement2(this)) {
sub_0803275C(this);
return;
}
+1 -2
View File
@@ -10,7 +10,6 @@
extern void GenericKnockback2(Entity*);
extern void Keese_StartFly(Entity*);
extern void sub_080AEFB4(Entity*);
extern void sub_08021F24(Entity*);
extern void (*const Keese_Functions[])(Entity*);
@@ -83,7 +82,7 @@ void Keese_Fly(Entity* this) {
if (this->frame & 0x80) {
sub_08021F24(this);
} else {
sub_080AEFB4(this);
ProcessMovement1(this);
}
this->spriteOffsetY = gKeeseSpriteOffsets[this->frame];
}
+1 -1
View File
@@ -271,7 +271,7 @@ void sub_0803CAD0(Entity* this) {
this->direction =
CalculateDirectionTo(this->x.HALF.HI, this->y.HALF.HI, this->field_0x74.HWORD, this->field_0x76.HWORD);
sub_080AEFE0(this);
ProcessMovement2(this);
}
}
+2 -7
View File
@@ -13,17 +13,12 @@
#include "effects.h"
#include "enemy.h"
extern u32 GetNextFunction(Entity*);
extern void (*const LakituCloud_Functions[6])(Entity*);
extern void (*const gUnk_080D0430[3])(Entity*);
extern void (*const gUnk_080D043C[3])(Entity*);
extern void SoundReqClipped(Entity*, u32);
extern void sub_0803CE14(Entity*);
extern void sub_0803CE3C(Entity*);
extern void sub_08079D84(void);
extern void sub_080A2CC0(Entity*, Entity**, u16*);
void sub_0803CE14(Entity*);
void sub_0803CE3C(Entity*);
void LakituCloud(Entity* this) {
LakituCloud_Functions[GetNextFunction(this)](this);
+1 -1
View File
@@ -180,7 +180,7 @@ void Leever_Move(Entity* this) {
}
}
ProcessMovement(this);
ProcessMovement0(this);
}
// clang-format off
+1 -1
View File
@@ -122,7 +122,7 @@ void sub_08027EFC(Entity* this) {
this->field_0x82.HALF.LO = this->direction;
this->actionDelay = 8;
}
ProcessMovement(this);
ProcessMovement0(this);
GetNextFrame(this);
} else {
this->action = 6;
+1 -1
View File
@@ -450,7 +450,7 @@ void sub_0802A098(Entity* this) {
}
uVar1 = this->x.HALF.HI;
uVar2 = this->y.HALF.HI;
ProcessMovement(this);
ProcessMovement0(this);
if (sub_08029F48(this)) {
sub_08029E0C(this);
sub_08029EEC(this);
+1 -1
View File
@@ -48,7 +48,7 @@ void sub_08045618(Entity* this) {
}
void sub_08045654(Entity* this) {
sub_080AEFE0(this);
ProcessMovement2(this);
GetNextFrame(this);
if (GravityUpdate(this, 0x1800) == 0) {
sub_08045678(this);
+1 -1
View File
@@ -88,7 +88,7 @@ void sub_080452FC(Entity* this) {
}
void sub_08045374(Entity* this) {
ProcessMovement(this);
ProcessMovement0(this);
GetNextFrame(this);
if (--this->actionDelay == 0)
this->action = 1;
+1 -1
View File
@@ -101,7 +101,7 @@ void sub_08022D40(Entity* this) {
}
} else {
sub_08022F14(this);
ProcessMovement(this);
ProcessMovement0(this);
if (this->collisions) {
sub_0800417E(this, this->collisions);
+1 -1
View File
@@ -219,7 +219,7 @@ void sub_08023398(Entity* this) {
} else {
int prevX = this->x.WORD;
int prevY = this->y.WORD;
ProcessMovement(this);
ProcessMovement0(this);
if (this->x.WORD == prevX && this->y.WORD == prevY) {
this->field_0x7c.BYTES.byte0--;
}
+3 -3
View File
@@ -159,11 +159,11 @@ void Mulldozer_Action5(MulldozerEntity* this) {
sub_080332A8(this);
}
sub_080331E8(this);
ProcessMovement(super);
ProcessMovement0(super);
}
void Mulldozer_Action6(MulldozerEntity* this) {
ProcessMovement(super);
ProcessMovement0(super);
sub_08032F48(this);
if (--super->field_0xf == 0) {
super->field_0xf = 2;
@@ -206,7 +206,7 @@ void sub_08032F64(MulldozerEntity* this) {
sub_08032F24(this);
}
sub_08032F48(this);
ProcessMovement(super);
ProcessMovement0(super);
}
void sub_08032F90(MulldozerEntity* this) {
+1 -1
View File
@@ -113,7 +113,7 @@ void Octorok_Idle(Entity* this) {
}
void Octorok_Move(Entity* this) {
ProcessMovement(this);
ProcessMovement0(this);
GetNextFrame(this);
if (--this->actionDelay == 0) {
if (Octorok_FacesPlayer(this) && gOctorokSpitChanceModifier[this->type] <= (Random() & 3)) {
+7 -7
View File
@@ -239,7 +239,7 @@ void OctorokBoss_Hit_SubAction1(Entity* this) {
3;
#endif
this->speed = 0x100;
ProcessMovement(this);
ProcessMovement0(this);
} else {
// Freeze
if (this->type2 == 0) {
@@ -784,7 +784,7 @@ void OctorokBoss_Action1_WaitForTurn(Entity* this) {
GET_ATTACK_WAIT_TURNS(this)--;
OctorokBoss_ResetToSubAction0(this);
} else {
if (ProcessMovement(this) == 0) {
if (ProcessMovement0(this) == 0) {
GET_TIMER(this) = 0;
}
}
@@ -802,7 +802,7 @@ void OctorokBoss_Action1_ChargeAttack(Entity* this) {
bool32 knockbackCondition;
if (GET_TIMER(this) == 0) {
ProcessMovement(this);
ProcessMovement0(this);
knockbackCondition = 0;
if ((this->direction != 0) && (this->direction != 0x10)) {
knockbackCondition = ((u32)this->collisions & 0xee00) != 0;
@@ -812,7 +812,7 @@ void OctorokBoss_Action1_ChargeAttack(Entity* this) {
}
if (knockbackCondition != 0) {
this->knockbackDuration = 0x20;
this->field_0x46 = 0x200;
this->knockbackSpeed = 0x200;
this->knockbackDirection = this->direction ^ 0x10;
GET_HELPER(this)->fallingStonesTimer += 0x3c;
OctorokBoss_SetAttackTimer(this);
@@ -1068,7 +1068,7 @@ void OctorokBoss_Burning_SubAction0(Entity* this) {
}
void OctorokBoss_Burning_SubAction1(Entity* this) {
ProcessMovement(this);
ProcessMovement0(this);
if (this->collisions != 0) {
this->subAction = 2;
GET_HELPER(this)->targetAngle = GET_ANGLE_HI(this);
@@ -1079,7 +1079,7 @@ void OctorokBoss_Burning_SubAction1(Entity* this) {
GET_HELPER(this)->targetAngle = -GET_HELPER(this)->targetAngle ^ 0x80;
}
this->knockbackDuration = 0x18;
this->field_0x46 = 0x200;
this->knockbackSpeed = 0x200;
this->knockbackDirection = this->direction ^ 0x10;
GET_HELPER(this)->fallingStonesTimer += 0x1e;
InitScreenShake(0x1e, 0);
@@ -1099,7 +1099,7 @@ void OctorokBoss_Burning_SubAction2(Entity* this) {
this->subAction = 1;
this->direction = ((u8)-GET_ANGLE_HI(this) ^ 0x80) >> 3;
this->collisions = 0;
ProcessMovement(this);
ProcessMovement0(this);
} else {
if ((u8)(GET_HELPER(this)->targetAngle - GET_ANGLE_HI(this)) >= 0x81) {
GET_ANGLE(this) -= GET_ANGULAR_VEL(this);
+2 -2
View File
@@ -64,7 +64,7 @@ void sub_08037D0C(Entity* this) {
}
UpdateAnimationVariableFrames(this, 2);
if (ProcessMovement(this) == 0) {
if (ProcessMovement0(this) == 0) {
sub_08037E14(this);
} else if (--this->actionDelay == 0) {
sub_08037E14(this);
@@ -116,7 +116,7 @@ void sub_08037E14(Entity* this) {
ptr = gUnk_080CF498 + (dir >> 2);
x = this->x.HALF.HI + *ptr;
y = this->y.HALF.HI + *(ptr + 1);
if (sub_080AE4CC(layer, x, y, 0)) {
if (IsTileCollision(layer, x, y, 0)) {
this->direction = Random() & 0x18;
} else {
this->direction = dir;
+6 -6
View File
@@ -171,7 +171,7 @@ void Peahat_Fly(Entity* this) {
}
}
sub_080AEFE0(this);
ProcessMovement2(this);
GetNextFrame(this);
}
@@ -205,7 +205,7 @@ void Peahat_ChargeTarget(Entity* this) {
if ((gRoomTransition.frameCount & 3) == 0)
sub_08004596(this, GetFacingDirection(this, gUnk_020000B0));
}
sub_080AEFE0(this);
ProcessMovement2(this);
} else {
sub_080205F8(this);
}
@@ -223,7 +223,7 @@ void Peahat_ChargeEnd(Entity* this) {
if (this->actionDelay & 1)
this->speed -= 8;
sub_080AEFE0(this);
ProcessMovement2(this);
UpdateAnimationVariableFrames(this, 4);
}
}
@@ -241,7 +241,7 @@ void Peahat_Stunned(Entity* this) {
if (this->direction == 0xff)
this->direction = this->knockbackDirection;
ProcessMovement(this);
ProcessMovement0(this);
GetNextFrame(this);
break;
case PeahatAnimation_SlicedPropeller:
@@ -307,7 +307,7 @@ void Peahat_Hop(Entity* this) {
if (this->frame & 1) {
sub_0800442E(this);
} else {
ProcessMovement(this);
ProcessMovement0(this);
}
}
@@ -324,7 +324,7 @@ void Peahat_Takeoff(Entity* this) {
sub_0800442E(this);
} else {
GravityUpdate(this, 0x1c00);
ProcessMovement(this);
ProcessMovement0(this);
}
}
+1 -1
View File
@@ -548,7 +548,7 @@ void sub_08024940(Entity* this) {
}
}
sub_080AEFB4(this);
ProcessMovement1(this);
GetNextFrame(this);
}
+1 -1
View File
@@ -582,7 +582,7 @@ void sub_08025C2C(Entity* this) {
bool32 sub_08025C44(Entity* this) {
if ((this->frame & 1) == 0) {
return ProcessMovement(this);
return ProcessMovement0(this);
} else {
return FALSE;
}
+1 -1
View File
@@ -87,7 +87,7 @@ void sub_08022390(Entity* this) {
}
if (this->field_0xf == 0) {
ProcessMovement(this);
ProcessMovement0(this);
} else {
this->field_0xf = this->field_0xf - 1;
}
+4 -5
View File
@@ -21,7 +21,6 @@ void sub_08020A7C(Entity*);
bool32 Rollobite_TryToHoleUp(Entity*);
bool32 Rollobite_IsRolledUp(Entity*);
extern void sub_080AE7E8(Entity*, u32, u32, u32);
extern void sub_08078930(Entity*);
void Rollobite(Entity* this) {
@@ -61,8 +60,8 @@ void Rollobite_OnKnockback(Entity* this) {
this->knockbackDuration = 0;
} else if (Rollobite_IsRolledUp(this)) {
this->knockbackDuration--;
sub_080AE58C(this, this->knockbackDirection, 10);
sub_080AE7E8(this, this->field_0x46, this->knockbackDirection, 10);
CalculateEntityTileCollisions(this, this->knockbackDirection, 10);
ProcessMovementInternal(this, this->knockbackSpeed, this->knockbackDirection, 10);
} else {
GenericKnockback(this);
}
@@ -124,7 +123,7 @@ void Rollobite_Walk(Entity* this) {
GetNextFrame(this);
if (this->frame & 0x1) {
this->frame &= ~0x1;
if (!ProcessMovement(this))
if (!ProcessMovement0(this))
this->actionDelay = 1;
}
@@ -192,7 +191,7 @@ void Rollobite_RolledUp(Entity* this) {
EnqueueSFX(SFX_104);
if ((this->direction & 0x80) == 0)
sub_080AEFE0(this);
ProcessMovement2(this);
}
}
+1 -1
View File
@@ -180,5 +180,5 @@ u32 sub_0803163C(Entity* this) {
h = this->field_0x7a.HWORD;
}
this->speed = h;
return ProcessMovement(this);
return ProcessMovement0(this);
}
+1 -1
View File
@@ -69,7 +69,7 @@ void sub_0803827C(Entity* this) {
}
}
UpdateAnimationVariableFrames(this, 0x2);
if (ProcessMovement(this) == 0) {
if (ProcessMovement0(this) == 0) {
sub_080383AC(this);
} else {
if (!(--this->actionDelay)) {
+1 -1
View File
@@ -145,7 +145,7 @@ void sub_080294D4(Entity* this) {
sub_08004596(this, GetFacingDirection(this, &gPlayerEntity));
sub_0802969C(this);
}
ProcessMovement(this);
ProcessMovement0(this);
sub_080296C8(this);
} else {
this->action = 6;
+2 -2
View File
@@ -155,7 +155,7 @@ void sub_08038B08(ScissorsBeetleEntity* this) {
}
void sub_08038B64(ScissorsBeetleEntity* this) {
ProcessMovement(super);
ProcessMovement0(super);
UpdateAnimationSingleFrame(super);
if (--super->field_0xf == 0) {
super->field_0xf = 2;
@@ -165,7 +165,7 @@ void sub_08038B64(ScissorsBeetleEntity* this) {
void sub_08038B90(ScissorsBeetleEntity* this) {
UpdateAnimationSingleFrame(super);
ProcessMovement(super);
ProcessMovement0(super);
sub_0800445C(super);
}
+3 -4
View File
@@ -9,7 +9,6 @@
#include "functions.h"
extern u32 sub_0804A024(Entity*, u32, u32);
extern bool32 sub_080AF038(Entity*);
extern u8 gUnk_02027EB4[];
extern u8 gUnk_0200D654[];
@@ -61,7 +60,7 @@ void sub_0802BA18(Entity* this) {
}
void sub_0802BA8C(Entity* this) {
if (!sub_080AF038(this)) {
if (!ProcessMovement12(this)) {
sub_0802BB10(this);
} else {
switch (this->direction >> 3) {
@@ -86,7 +85,7 @@ void sub_0802BA8C(Entity* this) {
}
void sub_0802BAFC(Entity* this) {
if (!sub_080AF038(this)) {
if (!ProcessMovement12(this)) {
this->action = 1;
}
}
@@ -101,7 +100,7 @@ void sub_0802BB10(Entity* this) {
bool32 sub_0802BB2C(Entity* this, u32 param_2) {
u8* layer = this->collisionLayer == 2 ? gUnk_0200D654 : gUnk_02027EB4;
const s8* ptr = &gUnk_080CD3DC[param_2 >> 2];
return sub_080AE4CC(layer, this->x.HALF.HI + ptr[0], this->y.HALF.HI + ptr[1], 0);
return IsTileCollision(layer, this->x.HALF.HI + ptr[0], this->y.HALF.HI + ptr[1], 0);
}
// clang-format off
+1 -1
View File
@@ -78,7 +78,7 @@ void sub_08045018(Entity* this) {
}
void sub_08045088(Entity* this) {
ProcessMovement(this);
ProcessMovement0(this);
GetNextFrame(this);
if (--this->actionDelay == 0) {
this->action = 1;
+1 -1
View File
@@ -76,7 +76,7 @@ void sub_08023C5C(Entity* this) {
}
void sub_08023C8C(Entity* this) {
ProcessMovement(this);
ProcessMovement0(this);
GetNextFrame(this);
sub_08023E54(this);
if (--this->actionDelay == 0) {
+1 -1
View File
@@ -55,7 +55,7 @@ void sub_0802B35C(Entity* this) {
bool32 is_head;
GetNextFrame(this);
ProcessMovement(this);
ProcessMovement0(this);
is_head = this->type == 0;
if (this->collisions == 0) {
if (--this->field_0xf == 0) {
+3 -3
View File
@@ -235,7 +235,7 @@ void sub_08028528(Entity* this) {
}
if (0x20 < this->field_0x7a.HALF.HI) {
ProcessMovement(this);
ProcessMovement0(this);
}
GetNextFrame(this);
@@ -370,7 +370,7 @@ void sub_08028858(Entity* this) {
this->speed = 0;
}
ProcessMovement(this);
ProcessMovement0(this);
GetNextFrame(this);
}
@@ -383,7 +383,7 @@ void sub_080288C0(Entity* this) {
if (ent && (ent->bitfield & 0x80)) {
this->knockbackDirection = ent->knockbackDirection;
this->iframes = -ent->iframes;
this->field_0x46 = ent->field_0x46;
this->knockbackSpeed = ent->knockbackSpeed;
this->knockbackDuration = ent->knockbackDuration;
ent->knockbackDuration = 0;
}
+3 -3
View File
@@ -94,7 +94,7 @@ void sub_0802B744(Entity* this) {
this->action = 2;
this->actionDelay = 0x1e;
} else {
if (!ProcessMovement(this)) {
if (!ProcessMovement0(this)) {
this->actionDelay = 1;
}
}
@@ -127,7 +127,7 @@ void sub_0802B7FC(Entity* this) {
}
void sub_0802B820(Entity* this) {
if (!sub_080AEFE0(this)) {
if (!ProcessMovement2(this)) {
this->actionDelay = 1;
}
GetNextFrame(this);
@@ -152,7 +152,7 @@ void sub_0802B880(Entity* this) {
}
void sub_0802B8B0(Entity* this) {
sub_080AEFE0(this);
ProcessMovement2(this);
switch (sub_080044EC(this, 0x1800)) {
case 0:
this->action = 7;
+1 -1
View File
@@ -325,7 +325,7 @@ void sub_08033D78(SpinyBeetleEntity* this) {
break;
default:
if (sub_080002E0(tile, super->collisionLayer) - 1 > 0x3e)
ProcessMovement(super);
ProcessMovement0(super);
break;
}
}
+2 -2
View File
@@ -175,7 +175,7 @@ void sub_080226EC(Entity* this) {
this->direction = sub_08049F84(this, 1);
}
ProcessMovement(this);
ProcessMovement0(this);
}
GetNextFrame(this);
@@ -224,7 +224,7 @@ void sub_0802281C(Entity* this) {
void sub_08022854(Entity* this) {
GetNextFrame(this);
if (this->frame & 1) {
sub_080AEFE0(this);
ProcessMovement2(this);
if (GravityUpdate(this, Q_8_8(24.0)) == 0) {
this->action = 7;
this->hitType = 0x5c;
+5 -5
View File
@@ -188,7 +188,7 @@ void Stalfos_Action2(StalfosEntity* this) {
void Stalfos_Action3(StalfosEntity* this) {
if (sub_08039758(this) == 0) {
if (ProcessMovement(super)) {
if (ProcessMovement0(super)) {
UpdateAnimationSingleFrame(super);
if (--this->unk_78 == 0) {
sub_0803998C(this);
@@ -201,7 +201,7 @@ void Stalfos_Action3(StalfosEntity* this) {
}
void Stalfos_Action4(StalfosEntity* this) {
sub_080AEFE0(super);
ProcessMovement2(super);
if (GravityUpdate(super, 0x1800) == 0) {
sub_0803998C(this);
this->unk_7c = 0x5a;
@@ -210,7 +210,7 @@ void Stalfos_Action4(StalfosEntity* this) {
}
void Stalfos_Action5(StalfosEntity* this) {
sub_080AEFE0(super);
ProcessMovement2(super);
GravityUpdate(super, 0x1800);
if (super->zVelocity < 0) {
super->action = 6;
@@ -260,7 +260,7 @@ void Stalfos_Action9(StalfosEntity* this) {
}
void Stalfos_Action11(StalfosEntity* this) {
sub_080AEFE0(super);
ProcessMovement2(super);
UpdateAnimationSingleFrame(super);
if (--this->unk_78 == 0) {
sub_08039AD4(this);
@@ -365,7 +365,7 @@ void sub_0803992C(StalfosEntity* this) {
super->speed = 0xe0;
super->direction = super->animationState << 3;
this->unk_78 = (u16)gUnk_080CF900[Random() & 0xf];
sub_080AE58C(super, super->direction, 0);
CalculateEntityTileCollisions(super, super->direction, 0);
if ((gUnk_080CF910[super->animationState] & super->collisions) != 0) {
InitAnimationForceUpdate(super, super->animationState);
} else {
+1 -1
View File
@@ -116,7 +116,7 @@ void sub_0802F300(Entity* this) {
u32 rand;
GetNextFrame(this);
ProcessMovement(this);
ProcessMovement0(this);
temp = this->z.HALF.HI;
rand = Random() & 0xf;
+1 -1
View File
@@ -104,7 +104,7 @@ void sub_08038048(Entity* this) {
u32 rand;
UpdateAnimationVariableFrames(this, 2);
ProcessMovement(this);
ProcessMovement0(this);
temp = this->z.HALF.HI;
rand = Random() & 0xf;
+1 -1
View File
@@ -698,7 +698,7 @@ void sub_08042EF4(Entity* this) {
}
entity = ((VaatiArm_HeapStruct*)this->myHeap)->entities[3];
entity->direction = this->direction;
ProcessMovement(entity);
ProcessMovement0(entity);
}
}
+1 -1
View File
@@ -246,7 +246,7 @@ void sub_0802F04C(Entity* this) {
oldX = this->x.HALF.HI;
oldY = this->y.HALF.HI;
if (ProcessMovement(this) == 0) {
if (ProcessMovement0(this) == 0) {
sub_0802EFB8(this);
return;
}
+2 -4
View File
@@ -9,8 +9,6 @@
#include "area.h"
#include "functions.h"
extern void sub_080AEFB4(Entity*);
void VaatiRebornEnemyType0PreAction(Entity*);
void VaatiRebornEnemyType1PreAction(Entity*);
void VaatiRebornEnemyType0Action0(Entity*);
@@ -218,7 +216,7 @@ void VaatiRebornEnemyType0Action1(Entity* this) {
this->y.HALF.HI--;
}
}
sub_080AEFB4(this);
ProcessMovement1(this);
}
}
UpdateAnimationSingleFrame(this);
@@ -416,7 +414,7 @@ void VaatiRebornEnemyType0Action5(Entity* this) {
}
if (this->field_0x86.HALF.HI != 0) {
sub_080AEFB4(this);
ProcessMovement1(this);
}
UpdateAnimationSingleFrame(this);
}
+1 -1
View File
@@ -249,7 +249,7 @@ void VaatiTransfiguredType0Action1(Entity* this) {
}
}
if (this->field_0x80.HALF.LO != 0xff) {
ProcessMovement(this);
ProcessMovement0(this);
}
UpdateAnimationSingleFrame(this);
}

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