diff options
| author | theo3 <arisstephenson2@gmail.com> | 2022-03-30 00:52:53 -0700 |
|---|---|---|
| committer | theo3 <arisstephenson2@gmail.com> | 2022-03-30 00:52:53 -0700 |
| commit | a633efd88ca533b8d601eb9a673c5eb7e68dd19d (patch) | |
| tree | 9bc7eb383d88bb2023a6fd69c982915931a33d30 /src/object | |
| parent | 65b80571b230d08426e6329dc7eb4348ca5012d1 (diff) | |
sort out most of functions.h
Diffstat (limited to 'src/object')
| -rw-r--r-- | src/object/bird.c | 10 | ||||
| -rw-r--r-- | src/object/book.c | 1 | ||||
| -rw-r--r-- | src/object/fairy.c | 1 | ||||
| -rw-r--r-- | src/object/fan.c | 1 | ||||
| -rw-r--r-- | src/object/fourElements.c | 1 | ||||
| -rw-r--r-- | src/object/heartContainer.c | 1 | ||||
| -rw-r--r-- | src/object/itemOnGround.c | 1 | ||||
| -rw-r--r-- | src/object/lightableSwitch.c | 11 | ||||
| -rw-r--r-- | src/object/macroShoes.c | 1 | ||||
| -rw-r--r-- | src/object/object30.c | 1 | ||||
| -rw-r--r-- | src/object/object96.c | 1 | ||||
| -rw-r--r-- | src/object/object98.c | 1 | ||||
| -rw-r--r-- | src/object/objectA8.c | 1 | ||||
| -rw-r--r-- | src/object/objectB2.c | 1 | ||||
| -rw-r--r-- | src/object/pressurePlate.c | 1 | ||||
| -rw-r--r-- | src/object/treeHidingPortal.c | 11 | ||||
| -rw-r--r-- | src/object/windTribeTeleporter.c | 1 |
17 files changed, 35 insertions, 11 deletions
diff --git a/src/object/bird.c b/src/object/bird.c index 94b13bf2..44af688e 100644 --- a/src/object/bird.c +++ b/src/object/bird.c @@ -4,6 +4,7 @@ #include "item.h" #include "message.h" #include "game.h" +#include "collision.h" extern u16 script_EzloTalkOcarina[]; @@ -211,10 +212,11 @@ void Bird_Type8(Entity* this) { this->speed = 0x300; } - if ((gPlayerEntity.flags & ENT_COLLIDE) && (gMessage.doTextBox & 0x7f) == 0 && gPlayerEntity.action != PLAYER_SLEEP && - gPlayerEntity.action != PLAYER_BOUNCE && gPlayerEntity.action != PLAYER_MINISH && gPlayerState.framestate != PL_STATE_CLIMB && - gPlayerState.framestate != PL_STATE_JUMP && gPlayerState.framestate != PL_STATE_PARACHUTE && PlayerCanBeMoved() && - (EntityInRectRadius(this, &gPlayerEntity, 0xe, 0xe))) { + if ((gPlayerEntity.flags & ENT_COLLIDE) && (gMessage.doTextBox & 0x7f) == 0 && + gPlayerEntity.action != PLAYER_SLEEP && gPlayerEntity.action != PLAYER_BOUNCE && + gPlayerEntity.action != PLAYER_MINISH && gPlayerState.framestate != PL_STATE_CLIMB && + gPlayerState.framestate != PL_STATE_JUMP && gPlayerState.framestate != PL_STATE_PARACHUTE && + PlayerCanBeMoved() && (EntityInRectRadius(this, &gPlayerEntity, 0xe, 0xe))) { s32 z = gPlayerEntity.z.HALF.HI - this->z.HALF.HI - 8; if ((u16)z < 0x20 && gPlayerEntity.health != 0) { pEVar5 = CreateObject(0x95, 10, 0); diff --git a/src/object/book.c b/src/object/book.c index 05af98ed..01f3a15e 100644 --- a/src/object/book.c +++ b/src/object/book.c @@ -3,6 +3,7 @@ #include "message.h" #include "item.h" #include "npc.h" +#include "collision.h" extern void (*const BookActionFuncs[])(Entity*); extern s8 const gUnk_08123D94[]; diff --git a/src/object/fairy.c b/src/object/fairy.c index 76fdb2df..988d56e7 100644 --- a/src/object/fairy.c +++ b/src/object/fairy.c @@ -11,6 +11,7 @@ #include "functions.h" #include "item.h" #include "hitbox.h" +#include "collision.h" typedef struct { /*0x00*/ Entity base; diff --git a/src/object/fan.c b/src/object/fan.c index 882edd33..b9a98d01 100644 --- a/src/object/fan.c +++ b/src/object/fan.c @@ -6,6 +6,7 @@ #include "functions.h" #include "sound.h" #include "object.h" +#include "collision.h" typedef struct { Entity base; diff --git a/src/object/fourElements.c b/src/object/fourElements.c index 8fd25f49..fb26c54b 100644 --- a/src/object/fourElements.c +++ b/src/object/fourElements.c @@ -12,6 +12,7 @@ #include "hitbox.h" #include "screen.h" #include "message.h" +#include "collision.h" typedef struct { /*0x00*/ Entity base; diff --git a/src/object/heartContainer.c b/src/object/heartContainer.c index 89f7cc8e..b195e6f6 100644 --- a/src/object/heartContainer.c +++ b/src/object/heartContainer.c @@ -3,6 +3,7 @@ #include "flags.h" #include "functions.h" #include "item.h" +#include "collision.h" static void sub_0808E6A0(Entity*); static void sub_0808E6E4(Entity*); diff --git a/src/object/itemOnGround.c b/src/object/itemOnGround.c index b356c38a..f9806ec8 100644 --- a/src/object/itemOnGround.c +++ b/src/object/itemOnGround.c @@ -8,6 +8,7 @@ #include "itemMetaData.h" #include "functions.h" #include "hitbox.h" +#include "collision.h" void sub_08081150(Entity*); u8 sub_0808147C(u32); diff --git a/src/object/lightableSwitch.c b/src/object/lightableSwitch.c index 3c5aefd0..a3680f93 100644 --- a/src/object/lightableSwitch.c +++ b/src/object/lightableSwitch.c @@ -6,11 +6,16 @@ #include "flags.h" #include "functions.h" #include "hitbox.h" +#include "object.h" extern void (*const gUnk_081243B4[])(Entity*); extern void (*const gUnk_081243BC[])(Entity*); extern void (*const gUnk_081243C4[])(Entity*); +static void sub_0809EB30(Entity* this); +static void sub_0809EAD8(Entity* this); +static void sub_0809EABC(Entity* this); + void LightableSwitch(Entity* this) { gUnk_081243B4[this->type](this); sub_0809EB30(this); @@ -47,7 +52,7 @@ void sub_0809EA80(Entity* this) { sub_0809EABC(this); } -void sub_0809EABC(Entity* this) { +static void sub_0809EABC(Entity* this) { bool32 anySet = 0; if (CheckFlags(this->field_0x86.HWORD)) { @@ -58,7 +63,7 @@ void sub_0809EABC(Entity* this) { } } -void sub_0809EAD8(Entity* this) { +static void sub_0809EAD8(Entity* this) { u8 bVar1; Entity* pEVar2; @@ -72,7 +77,7 @@ void sub_0809EAD8(Entity* this) { } } -void sub_0809EB30(Entity* this) { +static void sub_0809EB30(Entity* this) { u16 uVar1; u16* puVar2; diff --git a/src/object/macroShoes.c b/src/object/macroShoes.c index 36cc84e5..1de5ee00 100644 --- a/src/object/macroShoes.c +++ b/src/object/macroShoes.c @@ -1,7 +1,6 @@ #include "entity.h" #include "asm.h" -void sub_0800445C(Entity*); void MacroShoes_Init(Entity*); void MacroShoes_Idle(Entity*); diff --git a/src/object/object30.c b/src/object/object30.c index 4f6f1d33..5dc2cff7 100644 --- a/src/object/object30.c +++ b/src/object/object30.c @@ -10,6 +10,7 @@ #include "object.h" #include "functions.h" #include "item.h" +#include "collision.h" typedef struct { /*0x00*/ Entity base; diff --git a/src/object/object96.c b/src/object/object96.c index fde07cb0..ab630662 100644 --- a/src/object/object96.c +++ b/src/object/object96.c @@ -7,6 +7,7 @@ #include "item.h" #include "flags.h" #include "effects.h" +#include "collision.h" typedef struct _struct_gUnk_08123FB0 { void (*const funcEnt)(Entity*); diff --git a/src/object/object98.c b/src/object/object98.c index a5de48e9..96626eeb 100644 --- a/src/object/object98.c +++ b/src/object/object98.c @@ -3,6 +3,7 @@ #include "projectile.h" #include "room.h" #include "functions.h" +#include "object.h" typedef struct { Entity base; diff --git a/src/object/objectA8.c b/src/object/objectA8.c index 4f2c0c13..83f9d422 100644 --- a/src/object/objectA8.c +++ b/src/object/objectA8.c @@ -11,6 +11,7 @@ #include "functions.h" #include "item.h" #include "hitbox.h" +#include "collision.h" typedef struct { /*0x00*/ Entity base; diff --git a/src/object/objectB2.c b/src/object/objectB2.c index a791b9fb..dae02bf1 100644 --- a/src/object/objectB2.c +++ b/src/object/objectB2.c @@ -1,6 +1,7 @@ #include "global.h" #include "entity.h" #include "functions.h" +#include "collision.h" extern u8 gUnk_02027EB4[]; extern u8 gUnk_0200D654[]; diff --git a/src/object/pressurePlate.c b/src/object/pressurePlate.c index 4536eeda..bcbe72d1 100644 --- a/src/object/pressurePlate.c +++ b/src/object/pressurePlate.c @@ -2,6 +2,7 @@ #include "object.h" #include "functions.h" #include "hitbox.h" +#include "collision.h" typedef struct { Entity base; diff --git a/src/object/treeHidingPortal.c b/src/object/treeHidingPortal.c index 696f469e..6756d82f 100644 --- a/src/object/treeHidingPortal.c +++ b/src/object/treeHidingPortal.c @@ -6,6 +6,7 @@ #include "room.h" #include "functions.h" #include "effects.h" +#include "object.h" extern const s16 gUnk_080B4468[]; @@ -14,6 +15,10 @@ void sub_0809E86C(Entity* this); void sub_0809E8BC(Entity* this); void sub_0809E8EC(Entity* this); +static void sub_0809E96C(Entity* this); +static u32 sub_0809E9A0(void); +static void sub_0809E918(Entity* this); + void TreeHidingPortal(Entity* this) { static void (*const actionFuncs[])(Entity*) = { sub_0809E83C, @@ -69,7 +74,7 @@ void sub_0809E8EC(Entity* this) { } } -void sub_0809E918(Entity* this) { +static void sub_0809E918(Entity* this) { static const s16 gUnk_08124364[] = { 0, -4, 8, -4, 16, -4, 22, -4, -8, -4, -16, -4, -22, -4, 0, -12, 0, 4, 8, -12, 8, 4, -8, -12, -8, 4, 8, -16, -8, -16, 12, -16, -12, -16, 16, -14, -16, -14, -1000, 0, @@ -88,11 +93,11 @@ void sub_0809E918(Entity* this) { } } -void sub_0809E96C(Entity* this) { +static void sub_0809E96C(Entity* this) { CreateMinishEntrance(COORD_TO_TILE_OFFSET(this, 0x20, 0x8)); } -u32 sub_0809E9A0(void) { +static u32 sub_0809E9A0(void) { u32 rv; const s16* ptr; diff --git a/src/object/windTribeTeleporter.c b/src/object/windTribeTeleporter.c index c76a6190..5e4cb50e 100644 --- a/src/object/windTribeTeleporter.c +++ b/src/object/windTribeTeleporter.c @@ -10,6 +10,7 @@ #include "object.h" #include "functions.h" #include "hitbox.h" +#include "collision.h" typedef struct { /*0x00*/ Entity base; |
