summaryrefslogtreecommitdiff
path: root/src/projectile
diff options
context:
space:
mode:
Diffstat (limited to 'src/projectile')
-rw-r--r--src/projectile/arrowProjectile.c9
-rw-r--r--src/projectile/ballAndChain.c2
-rw-r--r--src/projectile/boneProjectile.c5
-rw-r--r--src/projectile/cannonballProjectile.c11
-rw-r--r--src/projectile/dekuSeedProjectile.c7
-rw-r--r--src/projectile/dirtBallProjectile.c6
-rw-r--r--src/projectile/fireProjectile.c5
-rw-r--r--src/projectile/gleerokProjectile.c6
-rw-r--r--src/projectile/guardLineOfSight.c2
-rw-r--r--src/projectile/gyorgMaleEnergyProjectile.c3
-rw-r--r--src/projectile/gyorgTail.c1
-rw-r--r--src/projectile/iceProjectile.c5
-rw-r--r--src/projectile/keatonDagger.c4
-rw-r--r--src/projectile/lakituCloudProjectile.c6
-rw-r--r--src/projectile/lakituLightning.c4
-rw-r--r--src/projectile/mandiblesProjectile.c9
-rw-r--r--src/projectile/moblinSpear.c2
-rw-r--r--src/projectile/octorokBossProjectile.c8
-rw-r--r--src/projectile/projectile5.c1
-rw-r--r--src/projectile/removableDust.c6
-rw-r--r--src/projectile/rockProjectile.c6
-rw-r--r--src/projectile/spiderWeb.c13
-rw-r--r--src/projectile/spikedRollers.c2
-rw-r--r--src/projectile/stalfosProjectile.c6
-rw-r--r--src/projectile/torchTrapProjectile.c4
-rw-r--r--src/projectile/v1DarkMagicProjectile.c6
-rw-r--r--src/projectile/v1EyeLaser.c3
-rw-r--r--src/projectile/v1FireProjectile.c5
-rw-r--r--src/projectile/v2Projectile.c11
-rw-r--r--src/projectile/v3ElectricProjectile.c4
-rw-r--r--src/projectile/v3HandProjectile.c5
-rw-r--r--src/projectile/v3TennisBallProjectile.c5
-rw-r--r--src/projectile/windProjectile.c5
-rw-r--r--src/projectile/winder.c4
34 files changed, 135 insertions, 46 deletions
diff --git a/src/projectile/arrowProjectile.c b/src/projectile/arrowProjectile.c
index c47f0414..eeba0cf0 100644
--- a/src/projectile/arrowProjectile.c
+++ b/src/projectile/arrowProjectile.c
@@ -6,9 +6,14 @@
*/
#include "collision.h"
#include "enemy.h"
+#include "sound.h"
+#include "effects.h"
+#include "projectile.h"
#include "entity.h"
-#include "functions.h"
#include "object.h"
+#include "asm.h"
+#include "physics.h"
+#include "player.h"
extern void (*const ArrowProjectile_Functions[])(Entity*);
extern void (*const ArrowProjectile_Actions[])(Entity*);
@@ -95,7 +100,7 @@ void ArrowProjectile_Action3(Entity* this) {
void ArrowProjectile_Action4(Entity* this) {
if (GravityUpdate(this, Q_8_8(40.0)) == 0) {
- CreateDust(this);
+ CreateDeathFx(this);
DeleteThisEntity();
} else {
if (--this->timer == 0) {
diff --git a/src/projectile/ballAndChain.c b/src/projectile/ballAndChain.c
index a727240a..fa1c5d0f 100644
--- a/src/projectile/ballAndChain.c
+++ b/src/projectile/ballAndChain.c
@@ -5,9 +5,9 @@
* @brief Ball and Chain Projectile
*/
#include "entity.h"
-#include "functions.h"
#include "hitbox.h"
#include "projectile.h"
+#include "physics.h"
typedef struct {
/*0x00*/ Entity base;
diff --git a/src/projectile/boneProjectile.c b/src/projectile/boneProjectile.c
index 336920a2..c15e3da7 100644
--- a/src/projectile/boneProjectile.c
+++ b/src/projectile/boneProjectile.c
@@ -6,8 +6,11 @@
*/
#include "collision.h"
#include "enemy.h"
+#include "projectile.h"
#include "entity.h"
-#include "functions.h"
+#include "physics.h"
+#include "script.h"
+#include "asm.h"
extern void (*const BoneProjectile_Functions[])(Entity*);
extern void (*const BoneProjectile_Actions[])(Entity*);
diff --git a/src/projectile/cannonballProjectile.c b/src/projectile/cannonballProjectile.c
index c5b4244f..8e52b1df 100644
--- a/src/projectile/cannonballProjectile.c
+++ b/src/projectile/cannonballProjectile.c
@@ -6,8 +6,11 @@
*/
#include "collision.h"
#include "enemy.h"
+#include "effects.h"
+#include "projectile.h"
#include "entity.h"
-#include "functions.h"
+#include "physics.h"
+#include "asm.h"
extern void (*const CannonballProjectile_Functions[])(Entity*);
extern void (*const CannonballProjectile_Actions[])(Entity*);
@@ -65,13 +68,13 @@ void CannonballProjectile_Action2(Entity* this) {
bool32 sub_080AB5F4(Entity* this) {
switch (GetTileHazardType(this)) {
case 1:
- CreatePitFallFX(this);
+ CreatePitFallFx(this);
return TRUE;
case 2:
- CreateDrownFX(this);
+ CreateDrownFx(this);
return TRUE;
case 3:
- CreateLavaDrownFX(this);
+ CreateLavaDrownFx(this);
return TRUE;
}
return FALSE;
diff --git a/src/projectile/dekuSeedProjectile.c b/src/projectile/dekuSeedProjectile.c
index f3b2f5e7..326e4ad1 100644
--- a/src/projectile/dekuSeedProjectile.c
+++ b/src/projectile/dekuSeedProjectile.c
@@ -6,8 +6,13 @@
*/
#include "collision.h"
#include "enemy.h"
+#include "sound.h"
+#include "flags.h"
+#include "projectile.h"
#include "entity.h"
-#include "functions.h"
+#include "physics.h"
+#include "script.h"
+#include "asm.h"
extern void (*const DekuSeedProjectile_Functions[])(Entity*);
extern void (*const DekuSeedProjectile_Actions[])(Entity*);
diff --git a/src/projectile/dirtBallProjectile.c b/src/projectile/dirtBallProjectile.c
index a03009de..06690e5f 100644
--- a/src/projectile/dirtBallProjectile.c
+++ b/src/projectile/dirtBallProjectile.c
@@ -5,11 +5,13 @@
* @brief Dirt Ball Projectile
*/
#include "enemy.h"
+#include "sound.h"
+#include "effects.h"
+#include "projectile.h"
#include "entity.h"
-#include "functions.h"
#include "physics.h"
#include "player.h"
-#include "sound.h"
+#include "asm.h"
typedef struct {
/*0x00*/ Entity base;
diff --git a/src/projectile/fireProjectile.c b/src/projectile/fireProjectile.c
index cd81f3d3..c121411a 100644
--- a/src/projectile/fireProjectile.c
+++ b/src/projectile/fireProjectile.c
@@ -5,8 +5,11 @@
* @brief Fire Projectile
*/
#include "enemy.h"
+#include "sound.h"
+#include "projectile.h"
#include "entity.h"
-#include "functions.h"
+#include "physics.h"
+#include "script.h"
extern void (*const FireProjectile_Actions[])(Entity*);
diff --git a/src/projectile/gleerokProjectile.c b/src/projectile/gleerokProjectile.c
index 3fd4bbf5..223d05ce 100644
--- a/src/projectile/gleerokProjectile.c
+++ b/src/projectile/gleerokProjectile.c
@@ -5,9 +5,13 @@
* @brief Gleerok Projectile
*/
#include "enemy.h"
+#include "sound.h"
+#include "effects.h"
#include "entity.h"
-#include "functions.h"
#include "player.h"
+#include "room.h"
+#include "physics.h"
+#include "asm.h"
typedef struct {
/*0x00*/ Entity base;
diff --git a/src/projectile/guardLineOfSight.c b/src/projectile/guardLineOfSight.c
index d117507c..6ac4146c 100644
--- a/src/projectile/guardLineOfSight.c
+++ b/src/projectile/guardLineOfSight.c
@@ -7,10 +7,10 @@
#include "asm.h"
#include "collision.h"
#include "entity.h"
-#include "functions.h"
#include "hitbox.h"
#include "physics.h"
#include "projectile.h"
+#include "map.h"
extern u32 sub_080644C8(Entity*);
diff --git a/src/projectile/gyorgMaleEnergyProjectile.c b/src/projectile/gyorgMaleEnergyProjectile.c
index b3ee446d..c5d91c8c 100644
--- a/src/projectile/gyorgMaleEnergyProjectile.c
+++ b/src/projectile/gyorgMaleEnergyProjectile.c
@@ -5,8 +5,9 @@
* @brief Gyorg Male Energy Projectile
*/
#include "enemy.h"
+#include "sound.h"
+#include "projectile.h"
#include "entity.h"
-#include "functions.h"
#include "physics.h"
#include "player.h"
diff --git a/src/projectile/gyorgTail.c b/src/projectile/gyorgTail.c
index a6f30104..e11b7daa 100644
--- a/src/projectile/gyorgTail.c
+++ b/src/projectile/gyorgTail.c
@@ -6,7 +6,6 @@
*/
#include "asm.h"
#include "entity.h"
-#include "functions.h"
#include "hitbox.h"
#include "physics.h"
#include "projectile.h"
diff --git a/src/projectile/iceProjectile.c b/src/projectile/iceProjectile.c
index 7a430b38..41031cfb 100644
--- a/src/projectile/iceProjectile.c
+++ b/src/projectile/iceProjectile.c
@@ -5,8 +5,11 @@
* @brief Ice Projectile
*/
#include "enemy.h"
+#include "sound.h"
+#include "projectile.h"
#include "entity.h"
-#include "functions.h"
+#include "physics.h"
+#include "script.h"
extern void (*const IceProjectile_Actions[])(Entity*);
diff --git a/src/projectile/keatonDagger.c b/src/projectile/keatonDagger.c
index cf1fa109..90e89e05 100644
--- a/src/projectile/keatonDagger.c
+++ b/src/projectile/keatonDagger.c
@@ -8,7 +8,7 @@
#include "player.h"
#include "physics.h"
-extern void sub_0803C0AC(Entity*);
+extern void StealRupees(Entity*);
extern const Hitbox* const gUnk_08129998[];
@@ -21,7 +21,7 @@ void KeatonDagger(Entity* this) {
parent = this->parent;
if (((parent == NULL) || (parent->health == 0)) || (parent->next == NULL)) {
if (((this->contactFlags & CONTACT_NOW) != 0) && (this->contactedEntity == &gPlayerEntity.base)) {
- sub_0803C0AC(this);
+ StealRupees(this);
}
DeleteEntity(this);
} else {
diff --git a/src/projectile/lakituCloudProjectile.c b/src/projectile/lakituCloudProjectile.c
index 8c0a11f2..ec6d6b88 100644
--- a/src/projectile/lakituCloudProjectile.c
+++ b/src/projectile/lakituCloudProjectile.c
@@ -5,8 +5,12 @@
* @brief Lakitu Cloud Projectile
*/
#include "enemy.h"
+#include "sound.h"
+#include "effects.h"
+#include "projectile.h"
#include "entity.h"
-#include "functions.h"
+#include "player.h"
+#include "physics.h"
extern void SoundReqClipped(Entity*, u32);
extern void sub_08079D84(void);
diff --git a/src/projectile/lakituLightning.c b/src/projectile/lakituLightning.c
index 279ef9e9..78536197 100644
--- a/src/projectile/lakituLightning.c
+++ b/src/projectile/lakituLightning.c
@@ -6,8 +6,10 @@
*/
#include "collision.h"
#include "enemy.h"
+#include "effects.h"
+#include "projectile.h"
#include "entity.h"
-#include "functions.h"
+#include "physics.h"
extern void (*const LakituLightning_Functions[])(Entity*);
extern void (*const LakituLightning_Actions[])(Entity*);
diff --git a/src/projectile/mandiblesProjectile.c b/src/projectile/mandiblesProjectile.c
index 99ceb48b..29a9507c 100644
--- a/src/projectile/mandiblesProjectile.c
+++ b/src/projectile/mandiblesProjectile.c
@@ -5,12 +5,17 @@
* @brief Mandibles Projectile
*/
#include "enemy.h"
+#include "sound.h"
#include "entity.h"
-#include "functions.h"
-#include "game.h"
+#include "room.h"
#include "hitbox.h"
#include "physics.h"
#include "tiles.h"
+#include "player.h"
+#include "asm.h"
+#ifndef EU
+#include "game.h"
+#endif
typedef struct {
/*0x00*/ Entity base;
diff --git a/src/projectile/moblinSpear.c b/src/projectile/moblinSpear.c
index 2e58a091..a89eba94 100644
--- a/src/projectile/moblinSpear.c
+++ b/src/projectile/moblinSpear.c
@@ -5,6 +5,8 @@
* @brief Moblin Spear Projectile
*/
#include "enemy.h"
+#include "sound.h"
+#include "projectile.h"
#include "entity.h"
#include "physics.h"
diff --git a/src/projectile/octorokBossProjectile.c b/src/projectile/octorokBossProjectile.c
index 8ca0d67d..5c7dea7e 100644
--- a/src/projectile/octorokBossProjectile.c
+++ b/src/projectile/octorokBossProjectile.c
@@ -6,9 +6,13 @@
*/
#include "collision.h"
#include "enemy.h"
-#include "entity.h"
-#include "functions.h"
+#include "sound.h"
+#include "effects.h"
#include "projectile.h"
+#include "entity.h"
+#include "physics.h"
+#include "player.h"
+#include "asm.h"
typedef struct {
/*0x00*/ Entity base;
diff --git a/src/projectile/projectile5.c b/src/projectile/projectile5.c
index f84d2a7b..f1895384 100644
--- a/src/projectile/projectile5.c
+++ b/src/projectile/projectile5.c
@@ -6,6 +6,7 @@
*/
#include "asm.h"
#include "enemy.h"
+#include "projectile.h"
#include "entity.h"
#include "physics.h"
#include "player.h"
diff --git a/src/projectile/removableDust.c b/src/projectile/removableDust.c
index c6b7a5ff..d5ccd5f4 100644
--- a/src/projectile/removableDust.c
+++ b/src/projectile/removableDust.c
@@ -5,9 +5,13 @@
* @brief Removable Dust Projectile
*/
#include "enemy.h"
+#include "sound.h"
+#include "flags.h"
+#include "common.h"
#include "entity.h"
-#include "functions.h"
#include "object.h"
+#include "asm.h"
+#include "player.h"
#include "physics.h"
#include "room.h"
#include "tiles.h"
diff --git a/src/projectile/rockProjectile.c b/src/projectile/rockProjectile.c
index a2e75f11..b7888f58 100644
--- a/src/projectile/rockProjectile.c
+++ b/src/projectile/rockProjectile.c
@@ -5,8 +5,12 @@
* @brief Rock Projectile
*/
#include "enemy.h"
+#include "sound.h"
+#include "projectile.h"
#include "entity.h"
-#include "functions.h"
+#include "physics.h"
+#include "script.h"
+#include "asm.h"
extern void (*const RockProjectile_Functions[])(Entity*);
extern void (*const RockProjectile_Actions[])(Entity*);
diff --git a/src/projectile/spiderWeb.c b/src/projectile/spiderWeb.c
index 6a386f64..069e881b 100644
--- a/src/projectile/spiderWeb.c
+++ b/src/projectile/spiderWeb.c
@@ -6,9 +6,14 @@
*/
#include "enemy.h"
#include "entity.h"
-#include "functions.h"
#include "hitbox.h"
#include "object.h"
+#include "asm.h"
+#include "sound.h"
+#include "flags.h"
+#include "room.h"
+#include "physics.h"
+#include "player.h"
#include "tiles.h"
typedef struct {
@@ -16,7 +21,7 @@ typedef struct {
/*0x68*/ u8 unused1[28];
/*0x84*/ u8 unk_84;
/*0x85*/ u8 unused2;
- /*0x86*/ u16 unk_86;
+ /*0x86*/ u16 flag;
} SpiderWebEntity;
typedef struct {
@@ -134,7 +139,7 @@ void SpiderWeb_Init(SpiderWebEntity* this) {
&gUnk_080FD42C,
&gUnk_080FD434,
};
- if (CheckFlags(this->unk_86) != 0) {
+ if (CheckFlags(this->flag) != 0) {
DeleteThisEntity();
}
super->action = 1;
@@ -251,7 +256,7 @@ void sub_080AAA68(Entity* this) {
}
void sub_080AAAA8(SpiderWebEntity* this) {
- SetFlag(this->unk_86);
+ SetFlag(this->flag);
RestorePrevTileEntity(TILE(super->x.HALF.HI, super->y.HALF.HI), super->collisionLayer);
DeleteThisEntity();
}
diff --git a/src/projectile/spikedRollers.c b/src/projectile/spikedRollers.c
index bc641510..2c5b6298 100644
--- a/src/projectile/spikedRollers.c
+++ b/src/projectile/spikedRollers.c
@@ -5,7 +5,7 @@
* @brief Spiked Rollers Projectile
*/
#include "entity.h"
-#include "functions.h"
+#include "physics.h"
typedef struct {
/*0x00*/ Entity base;
diff --git a/src/projectile/stalfosProjectile.c b/src/projectile/stalfosProjectile.c
index bbe7b728..24f9b6d4 100644
--- a/src/projectile/stalfosProjectile.c
+++ b/src/projectile/stalfosProjectile.c
@@ -5,8 +5,12 @@
* @brief Stalfos Projectile
*/
#include "enemy.h"
+#include "sound.h"
+#include "effects.h"
+#include "projectile.h"
#include "entity.h"
-#include "functions.h"
+#include "physics.h"
+#include "asm.h"
extern void (*const StalfosProjectile_Functions[])(Entity*);
extern void (*const StalfosProjectile_Actions[])(Entity*);
diff --git a/src/projectile/torchTrapProjectile.c b/src/projectile/torchTrapProjectile.c
index 5176b451..ee472563 100644
--- a/src/projectile/torchTrapProjectile.c
+++ b/src/projectile/torchTrapProjectile.c
@@ -6,8 +6,8 @@
*/
#include "collision.h"
#include "enemy.h"
-#include "entity.h"
-#include "functions.h"
+#include "projectile.h"
+#include "physics.h"
extern void (*const TorchTrapProjectile_Functions[])(Entity*);
extern void (*const TorchTrapProjectile_Actions[])(Entity*);
diff --git a/src/projectile/v1DarkMagicProjectile.c b/src/projectile/v1DarkMagicProjectile.c
index dd3d1d0b..b0a95ad3 100644
--- a/src/projectile/v1DarkMagicProjectile.c
+++ b/src/projectile/v1DarkMagicProjectile.c
@@ -5,10 +5,14 @@
* @brief V1 Dark Magic Projectile
*/
#include "enemy.h"
+#include "sound.h"
+#include "effects.h"
+#include "projectile.h"
#include "entity.h"
-#include "functions.h"
#include "physics.h"
#include "player.h"
+#include "asm.h"
+#include "color.h"
typedef struct {
/*0x00*/ Entity base;
diff --git a/src/projectile/v1EyeLaser.c b/src/projectile/v1EyeLaser.c
index a79f5c94..f5f38f5f 100644
--- a/src/projectile/v1EyeLaser.c
+++ b/src/projectile/v1EyeLaser.c
@@ -5,8 +5,9 @@
* @brief V1 Eye Laser Projectile
*/
#include "entity.h"
-#include "functions.h"
#include "projectile.h"
+#include "room.h"
+#include "physics.h"
typedef struct {
/*0x00*/ Entity base;
diff --git a/src/projectile/v1FireProjectile.c b/src/projectile/v1FireProjectile.c
index bdf914bf..66a30bb4 100644
--- a/src/projectile/v1FireProjectile.c
+++ b/src/projectile/v1FireProjectile.c
@@ -5,9 +5,12 @@
* @brief V1 Fire Projectile
*/
#include "enemy.h"
+#include "sound.h"
#include "entity.h"
-#include "functions.h"
#include "player.h"
+#include "room.h"
+#include "physics.h"
+#include "asm.h"
typedef struct {
/*0x00*/ Entity base;
diff --git a/src/projectile/v2Projectile.c b/src/projectile/v2Projectile.c
index b96a2be5..9223dedd 100644
--- a/src/projectile/v2Projectile.c
+++ b/src/projectile/v2Projectile.c
@@ -6,9 +6,16 @@
*/
#include "enemy.h"
#include "entity.h"
-#include "functions.h"
#include "object.h"
+#include "asm.h"
+#include "sound.h"
+#include "effects.h"
+#include "room.h"
+#include "physics.h"
+#include "player.h"
#include "tiles.h"
+#include "color.h"
+#include "map.h"
typedef struct {
/*0x00*/ Entity base;
@@ -56,7 +63,7 @@ void V2Projectile_OnCollision(V2ProjectileEntity* this) {
}
case 3:
case 0x14: {
- CreateDust(super);
+ CreateDeathFx(super);
DeleteThisEntity();
break;
}
diff --git a/src/projectile/v3ElectricProjectile.c b/src/projectile/v3ElectricProjectile.c
index 2fe12fb2..539792b2 100644
--- a/src/projectile/v3ElectricProjectile.c
+++ b/src/projectile/v3ElectricProjectile.c
@@ -6,10 +6,12 @@
*/
#include "collision.h"
#include "enemy.h"
+#include "sound.h"
+#include "projectile.h"
#include "entity.h"
-#include "functions.h"
#include "physics.h"
#include "player.h"
+#include "asm.h"
typedef struct {
/*0x00*/ Entity base;
diff --git a/src/projectile/v3HandProjectile.c b/src/projectile/v3HandProjectile.c
index ff594836..b896a9db 100644
--- a/src/projectile/v3HandProjectile.c
+++ b/src/projectile/v3HandProjectile.c
@@ -6,8 +6,9 @@
*/
#include "collision.h"
#include "enemy.h"
-#include "entity.h"
-#include "functions.h"
+#include "sound.h"
+#include "projectile.h"
+#include "physics.h"
#include "player.h"
extern void (*const V3HandProjectile_Functions[])(Entity*);
diff --git a/src/projectile/v3TennisBallProjectile.c b/src/projectile/v3TennisBallProjectile.c
index abc6d35c..0456d5cd 100644
--- a/src/projectile/v3TennisBallProjectile.c
+++ b/src/projectile/v3TennisBallProjectile.c
@@ -6,8 +6,11 @@
*/
#include "collision.h"
#include "enemy.h"
+#include "sound.h"
+#include "effects.h"
+#include "projectile.h"
#include "entity.h"
-#include "functions.h"
+#include "physics.h"
extern void (*const V3TennisBallProjectile_Functions[])(Entity*);
extern void (*const V3TennisBallProjectile_Actions[])(Entity*);
diff --git a/src/projectile/windProjectile.c b/src/projectile/windProjectile.c
index 2682b104..3e97e606 100644
--- a/src/projectile/windProjectile.c
+++ b/src/projectile/windProjectile.c
@@ -5,8 +5,11 @@
* @brief Wind Projectile
*/
#include "enemy.h"
+#include "sound.h"
+#include "projectile.h"
#include "entity.h"
-#include "functions.h"
+#include "physics.h"
+#include "script.h"
extern void (*const WindProjectile_Actions[])(Entity*);
diff --git a/src/projectile/winder.c b/src/projectile/winder.c
index d8b5c5d8..aac4bba7 100644
--- a/src/projectile/winder.c
+++ b/src/projectile/winder.c
@@ -9,8 +9,10 @@
#include "collision.h"
#include "common.h"
#include "entity.h"
-#include "functions.h"
+#include "physics.h"
#include "projectile.h"
+#include "room.h"
+#include "map.h"
extern s16 gUnk_080B4488[];