summaryrefslogtreecommitdiff
path: root/src/object
diff options
context:
space:
mode:
Diffstat (limited to 'src/object')
-rw-r--r--src/object/ambientClouds.c29
-rw-r--r--src/object/angryStatue.c1
-rw-r--r--src/object/archway.c1
-rw-r--r--src/object/backgroundCloud.c1
-rw-r--r--src/object/bakerOven.c15
-rw-r--r--src/object/barrelInside.c1
-rw-r--r--src/object/barrelSpiderweb.c7
-rw-r--r--src/object/beanstalk.c7
-rw-r--r--src/object/bedCover.c1
-rw-r--r--src/object/bell.c1
-rw-r--r--src/object/bench.c1
-rw-r--r--src/object/bigBarrel.c1
-rw-r--r--src/object/bigIceBlock.c1
-rw-r--r--src/object/bigPushableLever.c7
-rw-r--r--src/object/bigVortex.c11
-rw-r--r--src/object/bird.c37
-rw-r--r--src/object/blockPushed.c1
-rw-r--r--src/object/board.c7
-rw-r--r--src/object/bollard.c1
-rw-r--r--src/object/book.c9
-rw-r--r--src/object/bossDoor.c3
-rw-r--r--src/object/bush.c3
-rw-r--r--src/object/button.c7
-rw-r--r--src/object/cabinFurniture.c1
-rw-r--r--src/object/cameraTarget.c3
-rw-r--r--src/object/carlovObject.c1
-rw-r--r--src/object/chestSpawner.c7
-rw-r--r--src/object/chuchuBossCutscene.c1
-rw-r--r--src/object/chuchuBossParticle.c1
-rw-r--r--src/object/chuchuBossStartParticle.c1
-rw-r--r--src/object/cloud.c3
-rw-r--r--src/object/crackingGround.c1
-rw-r--r--src/object/crenelBeanSprout.c13
-rw-r--r--src/object/cuccoMinigame.c1
-rw-r--r--src/object/cutsceneMiscObject.c21
-rw-r--r--src/object/cutsceneOrchestrator.c1
-rw-r--r--src/object/deathFx.c1
-rw-r--r--src/object/dirtParticle.c3
-rw-r--r--src/object/doubleBookshelf.c3
-rw-r--r--src/object/elementsBackground.c1
-rw-r--r--src/object/enemyItem.c1
-rw-r--r--src/object/evilSpirit.c10
-rw-r--r--src/object/eyeSwitch.c1
-rw-r--r--src/object/ezloCap.c19
-rw-r--r--src/object/ezloCapFlying.c34
-rw-r--r--src/object/fairy.c9
-rw-r--r--src/object/fan.c7
-rw-r--r--src/object/fanWind.c1
-rw-r--r--src/object/figurineDevice.c9
-rw-r--r--src/object/fileScreenObjects.c1
-rw-r--r--src/object/fireballChain.c1
-rw-r--r--src/object/fireplace.c1
-rw-r--r--src/object/flame.c1
-rw-r--r--src/object/floatingBlock.c1
-rw-r--r--src/object/floatingPlatform.c5
-rw-r--r--src/object/fourElements.c3
-rw-r--r--src/object/frozenFlower.c1
-rw-r--r--src/object/frozenOctorok.c3
-rw-r--r--src/object/frozenWaterElement.c1
-rw-r--r--src/object/furniture.c12
-rw-r--r--src/object/gentariCurtain.c1
-rw-r--r--src/object/giantBookLadder.c1
-rw-r--r--src/object/giantLeaf.c1
-rw-r--r--src/object/giantRock.c1
-rw-r--r--src/object/giantRock2.c1
-rw-r--r--src/object/giantTwig.c3
-rw-r--r--src/object/gleerokParticle.c3
-rw-r--r--src/object/graveyardKey.c12
-rw-r--r--src/object/greatFairy.c9
-rw-r--r--src/object/guruguruBar.c1
-rw-r--r--src/object/gustJarParticle.c9
-rw-r--r--src/object/gyorgBossObject.c9
-rw-r--r--src/object/heartContainer.c1
-rw-r--r--src/object/hiddenLadderDown.c1
-rw-r--r--src/object/hitSwitch.c1
-rw-r--r--src/object/hittableLever.c1
-rw-r--r--src/object/houseDoorExterior.c3
-rw-r--r--src/object/houseDoorInterior.c4
-rw-r--r--src/object/houseSign.c11
-rw-r--r--src/object/itemForSale.c22
-rw-r--r--src/object/itemOnGround.c11
-rw-r--r--src/object/jailBars.c1
-rw-r--r--src/object/japaneseSubtitle.c1
-rw-r--r--src/object/jarPortal.c1
-rw-r--r--src/object/keyStealingTakkuri.c16
-rw-r--r--src/object/kinstoneSpark.c1
-rw-r--r--src/object/ladderHoleInBookshelf.c11
-rw-r--r--src/object/ladderUp.c3
-rw-r--r--src/object/lamp.c1
-rw-r--r--src/object/lampParticle.c1
-rw-r--r--src/object/lavaPlatform.c5
-rw-r--r--src/object/lightDoor.c1
-rw-r--r--src/object/lightRay.c29
-rw-r--r--src/object/lightableSwitch.c1
-rw-r--r--src/object/lilypadLarge.c65
-rw-r--r--src/object/lilypadLargeFalling.c1
-rw-r--r--src/object/lilypadSmall.c5
-rw-r--r--src/object/linkAnimation.c21
-rw-r--r--src/object/linkEmptyingBottle.c13
-rw-r--r--src/object/linkFire.c21
-rw-r--r--src/object/linkHoldingItem.c1
-rw-r--r--src/object/litArea.c1
-rw-r--r--src/object/lockedDoor.c9
-rw-r--r--src/object/macroAcorn.c1
-rw-r--r--src/object/macroBook.c5
-rw-r--r--src/object/macroDecorations.c1
-rw-r--r--src/object/macroMushroomStalk.c1
-rw-r--r--src/object/macroPlayer.c1
-rw-r--r--src/object/macroShoe.c1
-rw-r--r--src/object/mask.c11
-rw-r--r--src/object/mazaalBossObject.c4
-rw-r--r--src/object/mazaalObject.c1
-rw-r--r--src/object/metalDoor.c1
-rw-r--r--src/object/minecart.c69
-rw-r--r--src/object/minecartDoor.c17
-rw-r--r--src/object/mineralWaterSource.c1
-rw-r--r--src/object/minishEmoticon.c3
-rw-r--r--src/object/minishLight.c1
-rw-r--r--src/object/minishPortalCloseup.c1
-rw-r--r--src/object/minishPortalStone.c1
-rw-r--r--src/object/minishSizedArchway.c1
-rw-r--r--src/object/minishSizedEntrance.c6
-rw-r--r--src/object/minishVillageObject.c1
-rw-r--r--src/object/moleMittsParticle.c5
-rw-r--r--src/object/mulldozerSpawnPoint.c1
-rw-r--r--src/object/object1D.c1
-rw-r--r--src/object/object1F.c3
-rw-r--r--src/object/object30.c1
-rw-r--r--src/object/object37.c3
-rw-r--r--src/object/object53.c1
-rw-r--r--src/object/object63.c1
-rw-r--r--src/object/object70.c35
-rw-r--r--src/object/objectA.c1
-rw-r--r--src/object/objectA2.c1
-rw-r--r--src/object/objectA7.c1
-rw-r--r--src/object/objectA8.c9
-rw-r--r--src/object/objectBF.c1
-rw-r--r--src/object/objectBlockingStairs.c15
-rw-r--r--src/object/objectOnPillar.c11
-rw-r--r--src/object/objectOnSpinyBeetle.c3
-rw-r--r--src/object/octorokBossObject.c3
-rw-r--r--src/object/palaceArchway.c1
-rw-r--r--src/object/paper.c4
-rw-r--r--src/object/parallaxRoomView.c1
-rw-r--r--src/object/picoBloom.c1
-rw-r--r--src/object/pinwheel.c1
-rw-r--r--src/object/playerClone.c43
-rw-r--r--src/object/pot.c5
-rw-r--r--src/object/pressurePlate.c3
-rw-r--r--src/object/pullableLever.c17
-rw-r--r--src/object/pullableMushroom.c34
-rw-r--r--src/object/pushableFurniture.c30
-rw-r--r--src/object/pushableGrave.c3
-rw-r--r--src/object/pushableLever.c7
-rw-r--r--src/object/pushableRock.c1
-rw-r--r--src/object/pushableStatue.c23
-rw-r--r--src/object/railtrack.c1
-rw-r--r--src/object/rotatingTrapdoor.c1
-rw-r--r--src/object/rupee.c1
-rw-r--r--src/object/sanctuaryStoneTablet.c1
-rw-r--r--src/object/shrinkingHieroglyphs.c5
-rw-r--r--src/object/smallIceBlock.c1
-rw-r--r--src/object/smoke.c1
-rw-r--r--src/object/smokeParticle.c1
-rw-r--r--src/object/specialChest.c1
-rw-r--r--src/object/specialFx.c5
-rw-r--r--src/object/steam.c3
-rw-r--r--src/object/stoneTablet.c1
-rw-r--r--src/object/swordParticle.c17
-rw-r--r--src/object/swordsmanNewsletter.c1
-rw-r--r--src/object/thoughtBubble.c1
-rw-r--r--src/object/thunderbolt.c3
-rw-r--r--src/object/titleScreenObject.c1
-rw-r--r--src/object/trapdoor.c5
-rw-r--r--src/object/treeHidingPortal.c9
-rw-r--r--src/object/treeThorns.c1
-rw-r--r--src/object/unusedSkull.c1
-rw-r--r--src/object/vaati1Portal.c5
-rw-r--r--src/object/vaati2Particle.c1
-rw-r--r--src/object/vaati3Arm.c1
-rw-r--r--src/object/vaati3Death.c1
-rw-r--r--src/object/vaati3PlayerObject.c3
-rw-r--r--src/object/warpPoint.c42
-rw-r--r--src/object/waterDropObject.c1
-rw-r--r--src/object/waterElement.c1
-rw-r--r--src/object/waterfallOpening.c1
-rw-r--r--src/object/well.c5
-rw-r--r--src/object/whirlwind.c24
-rw-r--r--src/object/whiteTriangleEffect.c1
-rw-r--r--src/object/windTribeFlag.c1
-rw-r--r--src/object/windTribeTeleporter.c27
-rw-r--r--src/object/windcrest.c1
192 files changed, 507 insertions, 719 deletions
diff --git a/src/object/ambientClouds.c b/src/object/ambientClouds.c
index c24b16f4..7e885373 100644
--- a/src/object/ambientClouds.c
+++ b/src/object/ambientClouds.c
@@ -4,7 +4,6 @@
*
* @brief Ambient Clouds object
*/
-#define NENT_DEPRECATED
#include "asm.h"
#include "effects.h"
#include "entity.h"
@@ -83,12 +82,12 @@ void AmbientClouds_Action1(Entity* this) {
this->spriteOrientation.flipY = 1;
this->spriteRendering.b3 = 0;
if ((this->type2 == 1) || (this->child->action == 2)) {
- if (gPlayerEntity.z.HALF.HI < -0x24)
+ if (gPlayerEntity.base.z.HALF.HI < -0x24)
this->timer = 1;
else
this->timer = 0;
this->y.HALF.HI += (this->type2 - 1) * -0x24;
- if (EntityInRectRadius(this, &gPlayerEntity, 15, 15) && (this->timer != 0)) {
+ if (EntityInRectRadius(this, &gPlayerEntity.base, 15, 15) && (this->timer != 0)) {
this->action = 2;
this->spriteOrientation.flipY = 2;
this->spriteRendering.b3 = 3;
@@ -96,23 +95,23 @@ void AmbientClouds_Action1(Entity* this) {
this->child->action = 1;
}
gPlayerState.field_0x14 = 1;
- gPlayerEntity.y.HALF.HI -= 0x24;
- gPlayerEntity.z.HALF.HI += 0x24;
- sub_0807AA80(&gPlayerEntity);
+ gPlayerEntity.base.y.HALF.HI -= 0x24;
+ gPlayerEntity.base.z.HALF.HI += 0x24;
+ sub_0807AA80(&gPlayerEntity.base);
if (this->subtimer == 0) {
- Entity* fx = CreateFx(&gPlayerEntity, FX_DEATH, 0);
+ Entity* fx = CreateFx(&gPlayerEntity.base, FX_DEATH, 0);
if (fx != NULL) {
fx->x.HALF.HI += 8;
}
- fx = CreateFx(&gPlayerEntity, FX_DEATH, 0);
+ fx = CreateFx(&gPlayerEntity.base, FX_DEATH, 0);
if (fx != NULL) {
fx->x.HALF.HI -= 8;
}
- fx = CreateFx(&gPlayerEntity, FX_DEATH, 0);
+ fx = CreateFx(&gPlayerEntity.base, FX_DEATH, 0);
if (fx != NULL) {
fx->y.HALF.HI += 8;
}
- fx = CreateFx(&gPlayerEntity, FX_DEATH, 0);
+ fx = CreateFx(&gPlayerEntity.base, FX_DEATH, 0);
if (fx != NULL) {
fx->y.HALF.HI -= 8;
}
@@ -126,20 +125,20 @@ void AmbientClouds_Action1(Entity* this) {
void AmbientClouds_Action2(Entity* this) {
this->y.HALF.HI += this->type2 * -0x24;
- if (EntityInRectRadius(this, &gPlayerEntity, 15, 15)) {
+ if (EntityInRectRadius(this, &gPlayerEntity.base, 15, 15)) {
gPlayerState.field_0x14 = 1;
gPlayerState.flags |= PL_FLAGS2;
} else {
this->action = 1;
- gPlayerEntity.z.HALF_U.HI += this->z.HALF_U.HI;
- gPlayerEntity.y.HALF_U.HI -= this->z.HALF_U.HI;
- gPlayerEntity.collisionLayer = 1;
+ gPlayerEntity.base.z.HALF_U.HI += this->z.HALF_U.HI;
+ gPlayerEntity.base.y.HALF_U.HI -= this->z.HALF_U.HI;
+ gPlayerEntity.base.collisionLayer = 1;
}
this->y.HALF.HI += this->type2 * 0x24;
}
void AmbientClouds_Action3(Entity* this) {
- if (EntityInRectRadius(this, &gPlayerEntity, 15, 15)) {
+ if (EntityInRectRadius(this, &gPlayerEntity.base, 15, 15)) {
gPlayerState.field_0x14 = 1;
}
}
diff --git a/src/object/angryStatue.c b/src/object/angryStatue.c
index 75e705e3..0204c90e 100644
--- a/src/object/angryStatue.c
+++ b/src/object/angryStatue.c
@@ -4,7 +4,6 @@
*
* @brief Angry Statue object
*/
-#define NENT_DEPRECATED
#include "asm.h"
#include "entity.h"
#include "hitbox.h"
diff --git a/src/object/archway.c b/src/object/archway.c
index 2feceae8..76a9df16 100644
--- a/src/object/archway.c
+++ b/src/object/archway.c
@@ -4,7 +4,6 @@
*
* @brief Archway object
*/
-#define NENT_DEPRECATED
#include "entity.h"
#include "game.h"
diff --git a/src/object/backgroundCloud.c b/src/object/backgroundCloud.c
index 691ff2cb..0c150823 100644
--- a/src/object/backgroundCloud.c
+++ b/src/object/backgroundCloud.c
@@ -4,7 +4,6 @@
*
* @brief BackgroundCloud object
*/
-#define NENT_DEPRECATED
#include "object.h"
typedef struct {
diff --git a/src/object/bakerOven.c b/src/object/bakerOven.c
index a84472db..22b5fbbb 100644
--- a/src/object/bakerOven.c
+++ b/src/object/bakerOven.c
@@ -4,7 +4,6 @@
*
* @brief Baker Oven object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "object.h"
@@ -76,15 +75,15 @@ void BakerOven_Action1(BakerOvenEntity* this) {
}
/* Damage minish link if he touches a steam cloud */
- if (super->subtimer == 0 && gPlayerEntity.iframes == 0 && super->frameIndex &&
- sub_0806FC80(super, &gPlayerEntity, 4)) {
+ if (super->subtimer == 0 && gPlayerEntity.base.iframes == 0 && super->frameIndex &&
+ sub_0806FC80(super, &gPlayerEntity.base, 4)) {
super->subtimer++;
ModHealth(-2);
- SoundReqClipped(&gPlayerEntity, SFX_PLY_VO6);
- gPlayerEntity.iframes = 16;
- gPlayerEntity.knockbackDirection = 16;
- gPlayerEntity.knockbackDuration = 12;
- gPlayerEntity.knockbackSpeed = 16;
+ SoundReqClipped(&gPlayerEntity.base, SFX_PLY_VO6);
+ gPlayerEntity.base.iframes = 16;
+ gPlayerEntity.base.knockbackDirection = 16;
+ gPlayerEntity.base.knockbackDuration = 12;
+ gPlayerEntity.base.knockbackSpeed = 16;
}
}
}
diff --git a/src/object/barrelInside.c b/src/object/barrelInside.c
index 1bd43f7e..3ef99da4 100644
--- a/src/object/barrelInside.c
+++ b/src/object/barrelInside.c
@@ -4,7 +4,6 @@
*
* @brief Barrel Inside object
*/
-#define NENT_DEPRECATED
#include "entity.h"
typedef struct {
diff --git a/src/object/barrelSpiderweb.c b/src/object/barrelSpiderweb.c
index a3dcc448..386f2c74 100644
--- a/src/object/barrelSpiderweb.c
+++ b/src/object/barrelSpiderweb.c
@@ -4,7 +4,6 @@
*
* @brief Barrel Spiderweb object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "hitbox.h"
#include "object.h"
@@ -44,7 +43,7 @@ void BarrelSpiderweb_Init(Entity* this) {
this->flags2 = 4;
this->hitbox = (Hitbox*)&gHitbox_0;
this->frameIndex = 2;
- this->collisionLayer = gPlayerEntity.collisionLayer;
+ this->collisionLayer = gPlayerEntity.base.collisionLayer;
sub_0808BDB0(this);
this->y.HALF.HI = 0x170 - (this->parent)->zVelocity;
sub_0808BBE0(this);
@@ -116,9 +115,9 @@ void BarrelSpiderweb_Action2(Entity* this) {
SetAffineInfo(this, 0x200 - this->subtimer, 0x200 - this->subtimer, 0);
}
if (this->contactFlags == 0x93) {
- this->direction = GetFacingDirection(this, &gPlayerEntity);
+ this->direction = GetFacingDirection(this, &gPlayerEntity.base);
LinearMoveUpdate(this);
- if (EntityWithinDistance(this, gPlayerEntity.x.HALF.HI, gPlayerEntity.y.HALF.HI - 6, 0x1c)) {
+ if (EntityWithinDistance(this, gPlayerEntity.base.x.HALF.HI, gPlayerEntity.base.y.HALF.HI - 6, 0x1c)) {
sub_0808BD00(this);
}
} else {
diff --git a/src/object/beanstalk.c b/src/object/beanstalk.c
index d2f7899c..fb6abf4e 100644
--- a/src/object/beanstalk.c
+++ b/src/object/beanstalk.c
@@ -4,7 +4,6 @@
*
* @brief Beanstalk object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "object.h"
@@ -276,7 +275,7 @@ void Beanstalk_Action1Type7(BeanstalkEntity* this) {
case 3:
case 4:
if (gPlayerState.floor_type == SURFACE_LADDER) {
- if (EntityInRectRadius(super, &gPlayerEntity, 0, 8)) {
+ if (EntityInRectRadius(super, &gPlayerEntity.base, 0, 8)) {
if ((super->animIndex == (super->type2 - 1) * 3 + 1) && (super->timer == 0)) {
super->timer = 1;
InitializeAnimation(super, super->animIndex + 1);
@@ -335,8 +334,8 @@ void Beanstalk_Action1Type9(BeanstalkEntity* this) {
super->y.HALF.HI += 0x28;
this->unk_72 = sub_080B1A0C(super, 0, -0x18);
}
- super->spriteOrientation.flipY = gPlayerEntity.spriteOrientation.flipY;
- super->spriteRendering.b3 = gPlayerEntity.spriteRendering.b3;
+ super->spriteOrientation.flipY = gPlayerEntity.base.spriteOrientation.flipY;
+ super->spriteRendering.b3 = gPlayerEntity.base.spriteRendering.b3;
if (gPlayerState.floor_type == SURFACE_LADDER) {
super->spritePriority.b0 = 0;
if (sub_080B1A0C(super, 0, -0x18) != 0x4014) {
diff --git a/src/object/bedCover.c b/src/object/bedCover.c
index 7e9f62a3..a24189f5 100644
--- a/src/object/bedCover.c
+++ b/src/object/bedCover.c
@@ -4,7 +4,6 @@
*
* @brief Bed Cover object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "object.h"
diff --git a/src/object/bell.c b/src/object/bell.c
index 59d9baf5..5898b204 100644
--- a/src/object/bell.c
+++ b/src/object/bell.c
@@ -4,7 +4,6 @@
*
* @brief Bell object
*/
-#define NENT_DEPRECATED
#include "object.h"
void Bell_Init(Entity* this);
diff --git a/src/object/bench.c b/src/object/bench.c
index 5c196409..ead81b3b 100644
--- a/src/object/bench.c
+++ b/src/object/bench.c
@@ -4,7 +4,6 @@
*
* @brief Bench object
*/
-#define NENT_DEPRECATED
#include "entity.h"
#include "functions.h"
#include "player.h"
diff --git a/src/object/bigBarrel.c b/src/object/bigBarrel.c
index 07708c40..0dd13f8f 100644
--- a/src/object/bigBarrel.c
+++ b/src/object/bigBarrel.c
@@ -4,7 +4,6 @@
*
* @brief Big Barrel object
*/
-#define NENT_DEPRECATED
#include "asm.h"
#include "common.h"
#include "entity.h"
diff --git a/src/object/bigIceBlock.c b/src/object/bigIceBlock.c
index 6ad61e85..e52d4323 100644
--- a/src/object/bigIceBlock.c
+++ b/src/object/bigIceBlock.c
@@ -4,7 +4,6 @@
*
* @brief Big Ice Block object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "hitbox.h"
#include "item.h"
diff --git a/src/object/bigPushableLever.c b/src/object/bigPushableLever.c
index be0c1a32..e4110703 100644
--- a/src/object/bigPushableLever.c
+++ b/src/object/bigPushableLever.c
@@ -4,7 +4,6 @@
*
* @brief Big Pushable Lever object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "object.h"
@@ -59,9 +58,9 @@ void BigPushableLever_Idle(BigPushableLeverEntity* this) {
gPlayerState.pushedObject = 0x98;
gPlayerState.queued_action = PLAYER_PUSH;
gPlayerState.flags |= PL_BUSY;
- gPlayerEntity.x.HALF.LO = 0;
- gPlayerEntity.y.HALF.LO = 0;
- gPlayerEntity.direction = gPlayerEntity.animationState << 2;
+ gPlayerEntity.base.x.HALF.LO = 0;
+ gPlayerEntity.base.y.HALF.LO = 0;
+ gPlayerEntity.base.direction = gPlayerEntity.base.animationState << 2;
}
}
}
diff --git a/src/object/bigVortex.c b/src/object/bigVortex.c
index 7efe0113..91b510b9 100644
--- a/src/object/bigVortex.c
+++ b/src/object/bigVortex.c
@@ -4,7 +4,6 @@
*
* @brief Big Vortex object
*/
-#define NENT_DEPRECATED
#include "entity.h"
#include "flags.h"
#include "functions.h"
@@ -76,12 +75,12 @@ void BigVortex_Action2(BigVortexEntity* this) {
void BigVortex_Action3(BigVortexEntity* this) {
- if (sub_0800419C(super, &gPlayerEntity, 8, 8) != 0) {
- CopyPosition(super, &gPlayerEntity);
+ if (sub_0800419C(super, &gPlayerEntity.base, 8, 8) != 0) {
+ CopyPosition(super, &gPlayerEntity.base);
sub_08004542(super);
- sub_08004542(&gPlayerEntity);
- gPlayerEntity.collisionLayer = 1;
- SortEntityAbove(super, &gPlayerEntity);
+ sub_08004542(&gPlayerEntity.base);
+ gPlayerEntity.base.collisionLayer = 1;
+ SortEntityAbove(super, &gPlayerEntity.base);
gPlayerState.queued_action = PLAYER_PARACHUTE;
gPlayerState.field_0x38 = 1;
gPlayerState.field_0x39 = super->type2;
diff --git a/src/object/bird.c b/src/object/bird.c
index 485c0695..bbd382ff 100644
--- a/src/object/bird.c
+++ b/src/object/bird.c
@@ -4,7 +4,6 @@
*
* @brief Bird object
*/
-#define NENT_DEPRECATED
#include "collision.h"
#include "functions.h"
#include "game.h"
@@ -212,26 +211,26 @@ void Bird_Type8(BirdEntity* this) {
super->spriteRendering.b3 = 0;
super->spriteOrientation.flipY = 1;
super->x.HALF.HI = gRoomControls.scroll_x;
- super->y.HALF.HI = gPlayerEntity.y.HALF.HI;
+ super->y.HALF.HI = gPlayerEntity.base.y.HALF.HI;
super->child = NULL;
SetEntityPriority(super, 6);
InitAnimationForceUpdate(super, 0);
SoundReq(0x123);
break;
case 1:
- super->collisionLayer = gPlayerEntity.collisionLayer;
+ super->collisionLayer = gPlayerEntity.base.collisionLayer;
super->speed += 8;
if (super->speed > 0x300) {
super->speed = 0x300;
}
- if ((gPlayerEntity.flags & ENT_COLLIDE) && (gMessage.state & MESSAGE_ACTIVE) == 0 &&
- gPlayerEntity.action != PLAYER_SLEEP && gPlayerEntity.action != PLAYER_BOUNCE &&
- gPlayerEntity.action != PLAYER_MINISH && gPlayerState.framestate != PL_STATE_CLIMB &&
+ if ((gPlayerEntity.base.flags & ENT_COLLIDE) && (gMessage.state & MESSAGE_ACTIVE) == 0 &&
+ gPlayerEntity.base.action != PLAYER_SLEEP && gPlayerEntity.base.action != PLAYER_BOUNCE &&
+ gPlayerEntity.base.action != PLAYER_MINISH && gPlayerState.framestate != PL_STATE_CLIMB &&
gPlayerState.framestate != PL_STATE_JUMP && gPlayerState.framestate != PL_STATE_PARACHUTE &&
- PlayerCanBeMoved() && (EntityInRectRadius(super, &gPlayerEntity, 0xe, 0xe))) {
- s32 z = gPlayerEntity.z.HALF.HI - super->z.HALF.HI - 8;
- if ((u16)z < 0x20 && gPlayerEntity.health != 0) {
+ PlayerCanBeMoved() && (EntityInRectRadius(super, &gPlayerEntity.base, 0xe, 0xe))) {
+ s32 z = gPlayerEntity.base.z.HALF.HI - super->z.HALF.HI - 8;
+ if ((u16)z < 0x20 && gPlayerEntity.base.health != 0) {
pEVar5 = CreateObject(BIRD, 10, 0);
if (pEVar5 != NULL) {
super->child = pEVar5;
@@ -245,8 +244,8 @@ void Bird_Type8(BirdEntity* this) {
PutAwayItems();
gPlayerState.swim_state = 0;
gPlayerState.jump_status = 0;
- gPlayerEntity.flags &= ~0x80;
- gPlayerEntity.spriteSettings.draw = 0;
+ gPlayerEntity.base.flags &= ~0x80;
+ gPlayerEntity.base.spriteSettings.draw = 0;
gPriorityHandler.event_priority = 6;
gPauseMenuOptions.disabled = 1;
}
@@ -255,7 +254,7 @@ void Bird_Type8(BirdEntity* this) {
break;
default:
PausePlayer();
- gPlayerEntity.spriteSettings.draw = 0;
+ gPlayerEntity.base.spriteSettings.draw = 0;
break;
}
LinearMoveUpdate(super);
@@ -263,7 +262,7 @@ void Bird_Type8(BirdEntity* this) {
UpdateAnimationSingleFrame(super);
pEVar5 = super->child;
if (pEVar5 != NULL) {
- if (gPlayerEntity.x.HALF.HI < super->x.HALF.HI - 8) {
+ if (gPlayerEntity.base.x.HALF.HI < super->x.HALF.HI - 8) {
super->timer = 0;
}
@@ -275,7 +274,7 @@ void Bird_Type8(BirdEntity* this) {
pEVar5->spriteOrientation.flipY = super->spriteOrientation.flipY;
} else {
super->timer--;
- CopyPosition(&gPlayerEntity, pEVar5);
+ CopyPosition(&gPlayerEntity.base, pEVar5);
}
}
@@ -309,13 +308,13 @@ void Bird_Type9(BirdEntity* this) {
super->spriteOrientation.flipY = 1;
SetEntityPriority(super, 6);
super->x.HALF.HI = gRoomControls.scroll_x;
- super->y.HALF.HI = gPlayerEntity.y.HALF.HI;
+ super->y.HALF.HI = gPlayerEntity.base.y.HALF.HI;
SoundReq(SFX_123);
super->spritePriority.b1 = 2;
InitAnimationForceUpdate(super, 0);
PausePlayer();
} else if (super->action == 1) {
- gPlayerEntity.spriteSettings.draw = 0;
+ gPlayerEntity.base.spriteSettings.draw = 0;
child = super->child;
if (child != NULL) {
PositionRelative(super, child, Q_16_16(-8), 0);
@@ -331,8 +330,8 @@ void Bird_Type9(BirdEntity* this) {
if (child != NULL) {
child->action++;
}
- gRoomControls.camera_target = &gPlayerEntity;
- gPlayerEntity.spriteSettings.draw = 1;
+ gRoomControls.camera_target = &gPlayerEntity.base;
+ gPlayerEntity.base.spriteSettings.draw = 1;
ResetPlayerAnimationAndAction();
ResetPlayerEventPriority();
gPauseMenuOptions.disabled = 0;
@@ -355,7 +354,7 @@ void Bird_Type9(BirdEntity* this) {
}
void Bird_Type10(BirdEntity* this) {
- super->palette.b.b0 = gPlayerEntity.palette.b.b0;
+ super->palette.b.b0 = gPlayerEntity.base.palette.b.b0;
switch (super->action) {
case 0:
super->action = 1;
diff --git a/src/object/blockPushed.c b/src/object/blockPushed.c
index d871f4ac..b7173736 100644
--- a/src/object/blockPushed.c
+++ b/src/object/blockPushed.c
@@ -4,7 +4,6 @@
*
* @brief Block Pushed object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "object.h"
diff --git a/src/object/board.c b/src/object/board.c
index 6bb75f1c..dbdcabea 100644
--- a/src/object/board.c
+++ b/src/object/board.c
@@ -4,7 +4,6 @@
*
* @brief Board object
*/
-#define NENT_DEPRECATED
#include "asm.h"
#include "entity.h"
#include "functions.h"
@@ -64,10 +63,10 @@ void Board_Action1(BoardEntity* this) {
}
void sub_08098BE8(BoardEntity* this) {
- if ((gPlayerState.flags & PL_MINISH) && sub_08098C30(this, &gPlayerEntity) && PlayerCanBeMoved() &&
- gPlayerEntity.z.HALF.HI == 0) {
+ if ((gPlayerState.flags & PL_MINISH) && sub_08098C30(this, &gPlayerEntity.base) && PlayerCanBeMoved() &&
+ gPlayerEntity.base.z.HALF.HI == 0) {
gPlayerState.field_0x14 = 1;
- sub_0807AAF8(&gPlayerEntity, this->tile);
+ sub_0807AAF8(&gPlayerEntity.base, this->tile);
}
}
diff --git a/src/object/bollard.c b/src/object/bollard.c
index 2f73e5be..6a5d45cc 100644
--- a/src/object/bollard.c
+++ b/src/object/bollard.c
@@ -4,7 +4,6 @@
*
* @brief Bollard object
*/
-#define NENT_DEPRECATED
#include "asm.h"
#include "entity.h"
#include "flags.h"
diff --git a/src/object/book.c b/src/object/book.c
index 4ebd3f7d..6a516500 100644
--- a/src/object/book.c
+++ b/src/object/book.c
@@ -4,7 +4,6 @@
*
* @brief Book object
*/
-#define NENT_DEPRECATED
#include "collision.h"
#include "functions.h"
#include "item.h"
@@ -111,9 +110,9 @@ void Book_Action1(BookEntity* this) {
gPlayerState.queued_action = PLAYER_PUSH;
gPlayerState.flags |= PL_BUSY;
- gPlayerEntity.x.HALF.LO = 0;
- gPlayerEntity.y.HALF.LO = 0;
- gPlayerEntity.direction = gPlayerEntity.animationState << 2;
+ gPlayerEntity.base.x.HALF.LO = 0;
+ gPlayerEntity.base.y.HALF.LO = 0;
+ gPlayerEntity.base.direction = gPlayerEntity.base.animationState << 2;
EnqueueSFX(SFX_10F);
} else {
super->timer = 22;
@@ -220,7 +219,7 @@ void Book_Action5(BookEntity* this) {
}
u32 sub_0809B688(Entity* this) {
- u32 ret = EntityInRectRadius(this, &gPlayerEntity, 6, 12);
+ u32 ret = EntityInRectRadius(this, &gPlayerEntity.base, 6, 12);
if (ret == 1 && gPlayerState.direction != DirectionSouth) {
ret = 0;
diff --git a/src/object/bossDoor.c b/src/object/bossDoor.c
index cf18f937..8502dd14 100644
--- a/src/object/bossDoor.c
+++ b/src/object/bossDoor.c
@@ -4,7 +4,6 @@
*
* @brief Boss Door object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "hitbox.h"
#include "object.h"
@@ -106,7 +105,7 @@ void BossDoor_Action3(BossDoorEntity* this) {
if (--super->timer == 0) {
if (super->type < 4) {
sub_08078AC0(0x40, 0, 1);
- gPlayerEntity.direction = super->type << 3;
+ gPlayerEntity.base.direction = super->type << 3;
}
DeleteThisEntity();
}
diff --git a/src/object/bush.c b/src/object/bush.c
index 857e63f7..6e7a08af 100644
--- a/src/object/bush.c
+++ b/src/object/bush.c
@@ -4,7 +4,6 @@
*
* @brief Bush object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "hitbox.h"
#include "object.h"
@@ -61,7 +60,7 @@ void Bush_Init(BushEntity* this) {
super->gustJarTolerance = gUnk_08120588[super->type].unk_1;
super->gustJarFlags = gUnk_08120588[super->type].unk_2;
super->speed = 0x80;
- super->collisionLayer = gPlayerEntity.collisionLayer;
+ super->collisionLayer = gPlayerEntity.base.collisionLayer;
super->health = 1;
super->collisionFlags = 7;
super->hitType = 0x6e;
diff --git a/src/object/button.c b/src/object/button.c
index 0bf4bb7e..ad621bc7 100644
--- a/src/object/button.c
+++ b/src/object/button.c
@@ -4,7 +4,6 @@
*
* @brief Button object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "object.h"
@@ -172,7 +171,7 @@ Entity* sub_08081D74(ButtonEntity* this) {
ent = 0;
if (sub_08081E0C(super)) {
if ((gPlayerState.flags & PL_CAPTURED) == 0 && (gPlayerState.flags & PL_MINISH) == 0) {
- ent = &gPlayerEntity;
+ ent = &gPlayerEntity.base;
}
} else {
if (gPlayerState.flags & PL_CLONING) {
@@ -190,7 +189,7 @@ Entity* sub_08081D74(ButtonEntity* this) {
}
u32 sub_08081E0C(Entity* this) {
- Entity* tmp = &gPlayerEntity;
+ Entity* tmp = &gPlayerEntity.base;
if (tmp->z.HALF.HI != 0 || !PlayerCanBeMoved()) {
return 0;
} else {
@@ -290,7 +289,7 @@ bool32 sub_08081F7C(ButtonEntity* this, u32 r7) {
void sub_08081FF8(Entity* this) {
u32 direction;
u32 i;
- if (this->child != &gPlayerEntity)
+ if (this->child != &gPlayerEntity.base)
return;
direction = GetFacingDirection(this->child, this);
sub_080044AE(this->child, 0x200, direction);
diff --git a/src/object/cabinFurniture.c b/src/object/cabinFurniture.c
index c2704dcd..e23df88c 100644
--- a/src/object/cabinFurniture.c
+++ b/src/object/cabinFurniture.c
@@ -4,7 +4,6 @@
*
* @brief Cabin Furniture object
*/
-#define NENT_DEPRECATED
#include "asm.h"
#include "entity.h"
#include "flags.h"
diff --git a/src/object/cameraTarget.c b/src/object/cameraTarget.c
index e21b2f7d..f327c414 100644
--- a/src/object/cameraTarget.c
+++ b/src/object/cameraTarget.c
@@ -4,7 +4,6 @@
*
* @brief Camera Target object
*/
-#define NENT_DEPRECATED
#include "common.h"
#include "entity.h"
#include "functions.h"
@@ -151,7 +150,7 @@ void sub_08083A40(Entity* this) {
this->spriteSettings.draw = 1;
this->action = 2;
- if (this->child->x.HALF.HI > gPlayerEntity.x.HALF.HI) {
+ if (this->child->x.HALF.HI > gPlayerEntity.base.x.HALF.HI) {
bVar1 = 0;
this->spriteOffsetX = 8;
} else {
diff --git a/src/object/carlovObject.c b/src/object/carlovObject.c
index 003b61f0..2a093491 100644
--- a/src/object/carlovObject.c
+++ b/src/object/carlovObject.c
@@ -4,7 +4,6 @@
*
* @brief Carlov Object object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "object.h"
diff --git a/src/object/chestSpawner.c b/src/object/chestSpawner.c
index dd9038db..f40a7b1a 100644
--- a/src/object/chestSpawner.c
+++ b/src/object/chestSpawner.c
@@ -4,7 +4,6 @@
*
* @brief Chest Spawner object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "item.h"
#include "object.h"
@@ -114,14 +113,14 @@ void ChestSpawner_Type2Action2(ChestSpawnerEntity* this) {
SetPriorityTimer(30);
switch (super->subAction) {
case 0:
- if (EntityInRectRadius(super, &gPlayerEntity, 0x10, 8)) {
+ if (EntityInRectRadius(super, &gPlayerEntity.base, 0x10, 8)) {
sub_08078AC0(0x10, 0, 0);
- gPlayerEntity.direction = 0x10;
+ gPlayerEntity.base.direction = 0x10;
}
super->subAction = 1;
break;
case 1:
- if ((super->type == 5) || (gPlayerEntity.action == PLAYER_NORMAL)) {
+ if ((super->type == 5) || (gPlayerEntity.base.action == PLAYER_NORMAL)) {
super->subAction = 2;
super->timer = 8;
super->subtimer = 0;
diff --git a/src/object/chuchuBossCutscene.c b/src/object/chuchuBossCutscene.c
index 235a1f91..9c1287f2 100644
--- a/src/object/chuchuBossCutscene.c
+++ b/src/object/chuchuBossCutscene.c
@@ -4,7 +4,6 @@
*
* @brief Chuchu Boss Cutscene object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "menu.h"
#include "object.h"
diff --git a/src/object/chuchuBossParticle.c b/src/object/chuchuBossParticle.c
index b0b0da51..355405c4 100644
--- a/src/object/chuchuBossParticle.c
+++ b/src/object/chuchuBossParticle.c
@@ -4,7 +4,6 @@
*
* @brief Chuchu Boss Particle object
*/
-#define NENT_DEPRECATED
#include "entity.h"
void ChuchuBossParticle_Init(Entity*);
diff --git a/src/object/chuchuBossStartParticle.c b/src/object/chuchuBossStartParticle.c
index 25763c0f..ddd7032a 100644
--- a/src/object/chuchuBossStartParticle.c
+++ b/src/object/chuchuBossStartParticle.c
@@ -4,7 +4,6 @@
*
* @brief Chuchu Boss Start Particle object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "object.h"
diff --git a/src/object/cloud.c b/src/object/cloud.c
index 9f99213d..58d34f12 100644
--- a/src/object/cloud.c
+++ b/src/object/cloud.c
@@ -4,7 +4,6 @@
*
* @brief Cloud object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "object.h"
#include "structures.h"
@@ -135,7 +134,7 @@ void sub_0809F69C(CloudEntity* this) {
if (--super->timer == 0) {
super->timer = 30;
super->action = 4;
- gRoomControls.camera_target = &gPlayerEntity;
+ gRoomControls.camera_target = &gPlayerEntity.base;
SoundReq(SFX_SECRET_BIG);
}
}
diff --git a/src/object/crackingGround.c b/src/object/crackingGround.c
index 21845417..3c8c9e85 100644
--- a/src/object/crackingGround.c
+++ b/src/object/crackingGround.c
@@ -4,7 +4,6 @@
*
* @brief Cracking Ground object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "object.h"
diff --git a/src/object/crenelBeanSprout.c b/src/object/crenelBeanSprout.c
index 7480ba07..384722b2 100644
--- a/src/object/crenelBeanSprout.c
+++ b/src/object/crenelBeanSprout.c
@@ -4,7 +4,6 @@
*
* @brief Crenel Bean Sprout object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "hitbox.h"
#include "object.h"
@@ -54,7 +53,7 @@ void CrenelBeanSprout_Init(CrenelBeanSproutEntity* this) {
case 0:
if (CheckGlobalFlag(WATERBEAN_OUT)) {
if (CheckGlobalFlag(WATERBEAN_PUT) == 0) {
- PositionRelative(&gPlayerEntity, super, 0, 0x10000);
+ PositionRelative(&gPlayerEntity.base, super, 0, 0x10000);
SetTile(0x4022, 0xdc, super->collisionLayer);
} else {
if (CheckLocalFlag(super->type2) == 0) {
@@ -80,9 +79,9 @@ void CrenelBeanSprout_Init(CrenelBeanSproutEntity* this) {
case 3:
if (CheckGlobalFlag(WATERBEAN_OUT)) {
if (CheckGlobalFlag(WATERBEAN_PUT) == 0) {
- super->spritePriority.b0 = gPlayerEntity.spritePriority.b0 - 1;
- *(((u8*)&gPlayerEntity) + 0x79) = tmp;
- PositionRelative(&gPlayerEntity, super, 0, -0x180000);
+ super->spritePriority.b0 = gPlayerEntity.base.spritePriority.b0 - 1;
+ *(((u8*)&gPlayerEntity.base) + 0x79) = tmp;
+ PositionRelative(&gPlayerEntity.base, super, 0, -0x180000);
} else {
DeleteThisEntity();
}
@@ -166,7 +165,7 @@ void CrenelBeanSprout_Action1(CrenelBeanSproutEntity* this) {
} else {
GetNextFrame(super);
}
- tmp = gPlayerEntity.animationState & 6;
+ tmp = gPlayerEntity.base.animationState & 6;
this->unk_70 = ((super->x.HALF.HI + (s8)gUnk_08123184[tmp]) & -0x10) | 8;
this->unk_72 = ((super->y.HALF.HI + (s8)gUnk_08123184[(tmp) + 1]) & -0x10) | 8;
if (sub_080B1AB4(this->unk_70, this->unk_72, super->collisionLayer) == 0x19) {
@@ -174,7 +173,7 @@ void CrenelBeanSprout_Action1(CrenelBeanSproutEntity* this) {
} else {
gUnk_0200AF00.rActionPlayerState = R_ACTION_NONE;
}
- PositionRelative(&gPlayerEntity, super, 0, 0x10000);
+ PositionRelative(&gPlayerEntity.base, super, 0, 0x10000);
if (GetTileUnderEntity(super) == 0x19) {
RestorePrevTileEntity(0xdc, super->collisionLayer);
sub_08096A78(this);
diff --git a/src/object/cuccoMinigame.c b/src/object/cuccoMinigame.c
index 75b9dc59..d1da7c44 100644
--- a/src/object/cuccoMinigame.c
+++ b/src/object/cuccoMinigame.c
@@ -5,7 +5,6 @@
*
* @brief Cucco Minigame object
*/
-#define NENT_DEPRECATED
#include "enemy.h"
#include "entity.h"
#include "fileselect.h"
diff --git a/src/object/cutsceneMiscObject.c b/src/object/cutsceneMiscObject.c
index 44fc603f..68f86a77 100644
--- a/src/object/cutsceneMiscObject.c
+++ b/src/object/cutsceneMiscObject.c
@@ -4,7 +4,6 @@
*
* @brief Cutscene Misc object
*/
-#define NENT_DEPRECATED
#include "area.h"
#include "functions.h"
#include "item.h"
@@ -185,7 +184,7 @@ void sub_08094B80(CutsceneMiscObjectEntity* this) {
void sub_08094B94(CutsceneMiscObjectEntity* this) {
Entity* e = CreateObject(CUTSCENE_MISC_OBJECT, 0x22, 0);
if (e != NULL) {
- CopyPosition(&gPlayerEntity, e);
+ CopyPosition(&gPlayerEntity.base, e);
e->z.HALF.HI = -48;
((CutsceneMiscObjectEntity*)e)->ctx = StartCutscene(e, &script_CutsceneMiscObjectTheLittleHat);
CreateDust(e);
@@ -197,7 +196,7 @@ void sub_08094B94(CutsceneMiscObjectEntity* this) {
void sub_08094BE0(Entity* this) {
Entity* e = FindEntity(OBJECT, CUTSCENE_MISC_OBJECT, 6, 0x22, 0);
if (e != NULL) {
- CopyPosition(&gPlayerEntity, e);
+ CopyPosition(&gPlayerEntity.base, e);
e->z.HALF.HI = -12;
e->y.HALF.HI++;
e->collisionLayer = 2;
@@ -413,7 +412,7 @@ void CutsceneMiscObject_Type6(CutsceneMiscObjectEntity* this) {
}
break;
case 3:
- if (gPlayerEntity.action != PLAYER_EMPTYBOTTLE) {
+ if (gPlayerEntity.base.action != PLAYER_EMPTYBOTTLE) {
super->action = 4;
#ifndef EU
if (!CheckGlobalFlag(BIN_DOGFOOD)) {
@@ -1052,7 +1051,7 @@ void sub_08095D30(CutsceneMiscObjectEntity* this, u32 a2) {
void sub_08095D54(CutsceneMiscObjectEntity* this, ScriptExecutionContext* ctx) {
Entity* e = CreateObject(CUTSCENE_MISC_OBJECT, 0x1C, 0);
if (e != NULL) {
- CopyPosition(&gPlayerEntity, e);
+ CopyPosition(&gPlayerEntity.base, e);
e->collisionLayer = 2;
((CutsceneMiscObjectEntity*)e)->ctx = StartCutscene(e, (u16*)ctx->intVariable);
}
@@ -1153,7 +1152,7 @@ void CutsceneMiscObject_Type31(CutsceneMiscObjectEntity* this) {
break;
}
ChangeObjPalette(super, pal);
- if ((gPlayerEntity.frame & 1) == 0) {
+ if ((gPlayerEntity.base.frame & 1) == 0) {
local->anim = 0x8BF;
super->timer = 52;
super->subtimer = -75;
@@ -1162,16 +1161,16 @@ void CutsceneMiscObject_Type31(CutsceneMiscObjectEntity* this) {
super->timer = 85;
super->subtimer = -42;
}
- CopyPosition(&gPlayerEntity, super);
+ CopyPosition(&gPlayerEntity.base, super);
super->spritePriority.b0 = 3;
}
- if (gPlayerEntity.frame & 0x10) {
- gPlayerEntity.frame &= ~0x10;
+ if (gPlayerEntity.base.frame & 0x10) {
+ gPlayerEntity.base.frame &= ~0x10;
SoundReq(468);
}
- if ((u16)gPlayerEntity.spriteIndex != local->anim >> 8 || gPlayerEntity.animIndex != (u8)local->anim)
+ if ((u16)gPlayerEntity.base.spriteIndex != local->anim >> 8 || gPlayerEntity.base.animIndex != (u8)local->anim)
DeleteThisEntity();
- tmp = gPlayerEntity.frameIndex - super->timer + super->subtimer;
+ tmp = gPlayerEntity.base.frameIndex - super->timer + super->subtimer;
if (tmp != super->frameIndex) {
super->frameIndex = tmp;
sub_080042D0(super, super->frameIndex, (u16)super->spriteIndex);
diff --git a/src/object/cutsceneOrchestrator.c b/src/object/cutsceneOrchestrator.c
index e844b93d..efc726a3 100644
--- a/src/object/cutsceneOrchestrator.c
+++ b/src/object/cutsceneOrchestrator.c
@@ -4,7 +4,6 @@
*
* @brief Cutscene Orchestrator object
*/
-#define NENT_DEPRECATED
#include "entity.h"
#include "functions.h"
#include "hitbox.h"
diff --git a/src/object/deathFx.c b/src/object/deathFx.c
index 2d4204e4..2f51e110 100644
--- a/src/object/deathFx.c
+++ b/src/object/deathFx.c
@@ -4,7 +4,6 @@
*
* @brief Death Fx object
*/
-#define NENT_DEPRECATED
#include "object/deathFx.h"
#include "enemy.h"
#include "entity.h"
diff --git a/src/object/dirtParticle.c b/src/object/dirtParticle.c
index 8bf6bd31..827456c2 100644
--- a/src/object/dirtParticle.c
+++ b/src/object/dirtParticle.c
@@ -4,7 +4,6 @@
*
* @brief Dirt Particle object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "object.h"
@@ -91,7 +90,7 @@ void DirtParticle_Init(DirtParticleEntity* this) {
}
super->x.HALF.HI += tmp;
super->y.HALF.HI += tmp;
- super->collisionLayer = gPlayerEntity.collisionLayer;
+ super->collisionLayer = gPlayerEntity.base.collisionLayer;
InitializeAnimation(super, 10);
return;
case 1:
diff --git a/src/object/doubleBookshelf.c b/src/object/doubleBookshelf.c
index 3003c776..cbc27c93 100644
--- a/src/object/doubleBookshelf.c
+++ b/src/object/doubleBookshelf.c
@@ -4,7 +4,6 @@
*
* @brief Double Bookshelf object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "object.h"
@@ -146,7 +145,7 @@ void sub_0809B234(DoubleBookshelfEntity* this) {
}
void sub_0809B274(DoubleBookshelfEntity* this) {
- Entity* player = &gPlayerEntity;
+ Entity* player = &gPlayerEntity.base;
switch (this->unk_84) {
case 0:
if (player->y.HALF.HI + 0x14 >= super->y.HALF.HI) {
diff --git a/src/object/elementsBackground.c b/src/object/elementsBackground.c
index e02bba1b..f046d3b7 100644
--- a/src/object/elementsBackground.c
+++ b/src/object/elementsBackground.c
@@ -4,7 +4,6 @@
*
* @brief Elements Background object
*/
-#define NENT_DEPRECATED
#include "entity.h"
#include "functions.h"
#include "screen.h"
diff --git a/src/object/enemyItem.c b/src/object/enemyItem.c
index 3f199ff8..16cae432 100644
--- a/src/object/enemyItem.c
+++ b/src/object/enemyItem.c
@@ -4,7 +4,6 @@
*
* @brief Enemy Item object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "object.h"
diff --git a/src/object/evilSpirit.c b/src/object/evilSpirit.c
index 0208d997..a09392a4 100644
--- a/src/object/evilSpirit.c
+++ b/src/object/evilSpirit.c
@@ -1,4 +1,3 @@
-#define NENT_DEPRECATED
#include "entity.h"
#include "functions.h"
#include "flags.h"
@@ -87,7 +86,8 @@ void EvilSpirit_Action1(EvilSpiritEntity* this) {
sub_080045DA(super->parent->x.WORD - super->x.WORD, super->parent->y.WORD - super->y.WORD) ^ 0x80;
} else {
super->speed = 0x600;
- dir = sub_080045DA(gPlayerEntity.x.WORD - super->x.WORD, gPlayerEntity.y.WORD - super->y.WORD) ^ 0x80;
+ dir = sub_080045DA(gPlayerEntity.base.x.WORD - super->x.WORD, gPlayerEntity.base.y.WORD - super->y.WORD) ^
+ 0x80;
if (dir != super->direction) {
if ((u8)(dir - super->direction) > 0x80) {
super->direction += 3;
@@ -95,7 +95,7 @@ void EvilSpirit_Action1(EvilSpiritEntity* this) {
super->direction -= 3;
}
}
- if ((gPlayerEntity.animationState & 2) == 0) {
+ if ((gPlayerEntity.base.animationState & 2) == 0) {
this->unk76 = this->unk7c + 0x40;
} else {
this->unk76 = this->unk7c - 0x20;
@@ -113,7 +113,7 @@ void EvilSpirit_Action1(EvilSpiritEntity* this) {
super->direction++;
super->gustJarTolerance--;
this->unk7f = 1;
- if ((gPlayerEntity.animationState & 2) == 0) {
+ if ((gPlayerEntity.base.animationState & 2) == 0) {
this->unk76 = this->unk7c + 0x10;
} else {
this->unk76 = this->unk7c - 0x20;
@@ -184,7 +184,7 @@ void EvilSpirit_Action3(EvilSpiritEntity* this) {
super->gustJarTolerance--;
this->unk7f = 1;
- if ((gPlayerEntity.animationState & 2) == 0) {
+ if ((gPlayerEntity.base.animationState & 2) == 0) {
this->unk76 = this->unk7c + 0x10;
} else {
this->unk76 = this->unk7c - 0x20;
diff --git a/src/object/eyeSwitch.c b/src/object/eyeSwitch.c
index 8769fd4f..152d511a 100644
--- a/src/object/eyeSwitch.c
+++ b/src/object/eyeSwitch.c
@@ -4,7 +4,6 @@
*
* @brief EyeSwitch object
*/
-#define NENT_DEPRECATED
#include "entity.h"
#include "flags.h"
#include "hitbox.h"
diff --git a/src/object/ezloCap.c b/src/object/ezloCap.c
index 4c7f39bb..de1beb00 100644
--- a/src/object/ezloCap.c
+++ b/src/object/ezloCap.c
@@ -4,7 +4,6 @@
*
* @brief Ezlo Cap object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "message.h"
#include "object.h"
@@ -56,12 +55,12 @@ void EzloCap(EzloCapEntity* this) {
void EzloCap_Type0Init(EzloCapEntity* this) {
super->updatePriority = 6;
- super->spriteRendering.b3 = gPlayerEntity.spriteRendering.b3;
- super->spritePriority.b0 = gPlayerEntity.spritePriority.b0 - 1;
- super->palette.b.b0 = gPlayerEntity.palette.b.b0;
- super->collisionLayer = gPlayerEntity.collisionLayer;
+ super->spriteRendering.b3 = gPlayerEntity.base.spriteRendering.b3;
+ super->spritePriority.b0 = gPlayerEntity.base.spritePriority.b0 - 1;
+ super->palette.b.b0 = gPlayerEntity.base.palette.b.b0;
+ super->collisionLayer = gPlayerEntity.base.collisionLayer;
super->action = 1;
- if (gPlayerEntity.animationState == 2) {
+ if (gPlayerEntity.base.animationState == 2) {
super->spriteSettings.flipX = 1;
}
LoadSwapGFX(super, 1, 3);
@@ -79,7 +78,7 @@ void EzloCap_Type0Init(EzloCapEntity* this) {
void EzloCap_Type0Action1(EzloCapEntity* this) {
static const u8 gUnk_0811F16C[] = { 4, 0, 2, 6, 10, 8, 9, 5, 1, 0, 0, 0 };
- u32 tmp = gPlayerEntity.palette.b.b0;
+ u32 tmp = gPlayerEntity.base.palette.b.b0;
super->palette.b.b0 = tmp;
if ((gMessage.state & MESSAGE_ACTIVE) == 0) {
DeleteEntity(super);
@@ -161,8 +160,8 @@ void EzloCap_Type1Action1(EzloCapEntity* this) {
void EzloCap_ScriptedInit(EzloCapEntity* this) {
super->updatePriority = 2;
- super->palette.b.b0 = gPlayerEntity.palette.b.b0;
- super->collisionLayer = gPlayerEntity.collisionLayer;
+ super->palette.b.b0 = gPlayerEntity.base.palette.b.b0;
+ super->collisionLayer = gPlayerEntity.base.collisionLayer;
super->spritePriority.b1 = 3;
super->spriteSettings.shadow = 1;
super->action = 1;
@@ -171,7 +170,7 @@ void EzloCap_ScriptedInit(EzloCapEntity* this) {
this->unk_82 = 0;
ExecuteScript(super, this->unk_84);
sub_08082D20(this, this->unk_84);
- if (gPlayerEntity.animationState == 2) {
+ if (gPlayerEntity.base.animationState == 2) {
super->spriteSettings.flipX = 1;
}
sub_08082C5C(this);
diff --git a/src/object/ezloCapFlying.c b/src/object/ezloCapFlying.c
index d05ada5f..91c197a0 100644
--- a/src/object/ezloCapFlying.c
+++ b/src/object/ezloCapFlying.c
@@ -4,9 +4,7 @@
*
* @brief Ezlo Cap Flying object
*/
-#define NENT_DEPRECATED
#include "functions.h"
-#include "new_player.h"
#include "object.h"
typedef struct {
@@ -32,7 +30,7 @@ void EzloCapFlying(EzloCapFlyingEntity* this) {
};
if ((gPlayerState.flags & PL_PARACHUTE) == 0) {
if (super->type == 0) {
- gRoomControls.camera_target = &gPlayerEntity;
+ gRoomControls.camera_target = &gPlayerEntity.base;
}
DeleteThisEntity();
}
@@ -42,7 +40,7 @@ void EzloCapFlying(EzloCapFlyingEntity* this) {
void EzloCapFlying_Init(EzloCapFlyingEntity* this) {
super->action = 1;
super->lastFrameIndex = 0xff;
- super->palette.b.b0 = gPlayerEntity.palette.b.b0;
+ super->palette.b.b0 = gPlayerEntity.base.palette.b.b0;
if (super->type == 0) {
gRoomControls.camera_target = super;
super->spriteRendering.b0 = 3;
@@ -66,7 +64,7 @@ void EzloCapFlying_Action1Type0(EzloCapFlyingEntity* this) {
if ((s16)this->unk_6e < 0) {
this->unk_6e = -this->unk_6e;
}
- switch (gPlayerEntity.subAction) {
+ switch (gPlayerEntity.base.subAction) {
case 1:
this->unk_72 -= 4;
break;
@@ -104,10 +102,10 @@ void EzloCapFlying_Action1Type0(EzloCapFlyingEntity* this) {
sub_080936C8(this);
break;
}
- tmp = gPlayerEntity.animationState & 2;
+ tmp = gPlayerEntity.base.animationState & 2;
if (tmp != 0) {
super->frameIndex = 1;
- if (gPlayerEntity.animationState == 2) {
+ if (gPlayerEntity.base.animationState == 2) {
this->unk_6e = -this->unk_6e;
}
} else {
@@ -117,32 +115,32 @@ void EzloCapFlying_Action1Type0(EzloCapFlyingEntity* this) {
super->lastFrameIndex = super->frameIndex;
sub_080042D0(super, super->frameIndex, super->spriteIndex);
}
- CopyPosition(&gPlayerEntity, super);
+ CopyPosition(&gPlayerEntity.base, super);
- super->spriteOrientation.flipY = gPlayerEntity.spriteOrientation.flipY;
- super->spriteRendering.b3 = gPlayerEntity.spriteRendering.b3;
+ super->spriteOrientation.flipY = gPlayerEntity.base.spriteOrientation.flipY;
+ super->spriteRendering.b3 = gPlayerEntity.base.spriteRendering.b3;
sub_0806FCF4(super, this->unk_72, 10, 2);
SetAffineInfo(super, this->unk_6e, this->unk_72, 0);
- sub_0806FEBC(&gPlayerEntity, 1, super);
+ sub_0806FEBC(&gPlayerEntity.base, 1, super);
}
void EzloCapFlying_Action1Type1(EzloCapFlyingEntity* this) {
- super->frameIndex = ((gPlayerEntity.direction + (gPlayerEntity.direction >> 1)) >> 2) + 2;
+ super->frameIndex = ((gPlayerEntity.base.direction + (gPlayerEntity.base.direction >> 1)) >> 2) + 2;
if (super->frameIndex != super->lastFrameIndex) {
super->lastFrameIndex = super->frameIndex;
sub_080042D0(super, super->frameIndex, super->spriteIndex);
}
- CopyPosition(&gPlayerEntity, super);
- super->spriteOrientation.flipY = gPlayerEntity.spriteOrientation.flipY;
- super->spriteRendering.b3 = gPlayerEntity.spriteRendering.b3;
+ CopyPosition(&gPlayerEntity.base, super);
+ super->spriteOrientation.flipY = gPlayerEntity.base.spriteOrientation.flipY;
+ super->spriteRendering.b3 = gPlayerEntity.base.spriteRendering.b3;
sub_0806FCF4(super, ((EzloCapFlyingEntity*)super->parent)->unk_72, 0x18, 0);
super->spriteOffsetY = -super->spriteOffsetY;
- sub_0806FEBC(&gPlayerEntity, 0, super);
+ sub_0806FEBC(&gPlayerEntity.base, 0, super);
}
void sub_080936C8(EzloCapFlyingEntity* this) {
- s32 tmp = gNewPlayerEntity.unk_7c;
- this->unk_76 = 0x138 - (gNewPlayerEntity.unk_7c >> 2);
+ s32 tmp = gPlayerEntity.unk_7c.WORD_U;
+ this->unk_76 = 0x138 - (gPlayerEntity.unk_7c.WORD_U >> 2);
this->unk_74 = 8 - (tmp / 0x3c);
if (super->timer == 0) {
if (this->unk_76 < this->unk_6e) {
diff --git a/src/object/fairy.c b/src/object/fairy.c
index e937288f..871da3dd 100644
--- a/src/object/fairy.c
+++ b/src/object/fairy.c
@@ -4,7 +4,6 @@
*
* @brief Fairy object
*/
-#define NENT_DEPRECATED
#include "collision.h"
#include "functions.h"
#include "hitbox.h"
@@ -182,7 +181,7 @@ void Fairy_Action3(FairyEntity* this) {
} else {
CopyPosition(super->child, super);
super->z.HALF.HI--;
- if (IsColliding(super, &gPlayerEntity)) {
+ if (IsColliding(super, &gPlayerEntity.base)) {
sub_0808DB2C(this);
}
}
@@ -246,8 +245,8 @@ void sub_0808DAD0(FairyEntity* this) {
super->spriteSettings.draw = 1;
super->spritePriority.b1 = 2;
super->spriteOffsetY = -5;
- super->child = &gPlayerEntity;
- CopyPosition(&gPlayerEntity, super);
+ super->child = &gPlayerEntity.base;
+ CopyPosition(&gPlayerEntity.base, super);
}
void sub_0808DB2C(FairyEntity* this) {
@@ -255,5 +254,5 @@ void sub_0808DB2C(FairyEntity* this) {
super->subAction = 0;
super->flags |= ENT_COLLIDE;
super->flags2 = 1;
- CopyPosition(&gPlayerEntity, super);
+ CopyPosition(&gPlayerEntity.base, super);
}
diff --git a/src/object/fan.c b/src/object/fan.c
index b1197147..f786981a 100644
--- a/src/object/fan.c
+++ b/src/object/fan.c
@@ -4,7 +4,6 @@
*
* @brief Fan object
*/
-#define NENT_DEPRECATED
#include "collision.h"
#include "entity.h"
#include "flags.h"
@@ -115,7 +114,7 @@ void sub_0809EE44(FanEntity* this) {
uVar4 = (super->frame & 7);
super->speed = this->unk7e << uVar4;
if (uVar4 != 0) {
- pEVar1 = &gPlayerEntity;
+ pEVar1 = &gPlayerEntity.base;
if (sub_0809EF78(this, pEVar1)) {
if (PlayerCanBeMoved()) {
sub_08079E58(super->speed, super->direction);
@@ -136,8 +135,8 @@ void sub_0809EE44(FanEntity* this) {
bVar3 = 1;
break;
case 0x3:
- if (pEVar1->x.HALF.HI != gPlayerEntity.x.HALF.HI ||
- pEVar1->y.HALF.HI != gPlayerEntity.y.HALF.HI)
+ if (pEVar1->x.HALF.HI != gPlayerEntity.base.x.HALF.HI ||
+ pEVar1->y.HALF.HI != gPlayerEntity.base.y.HALF.HI)
bVar3 = 1;
break;
break;
diff --git a/src/object/fanWind.c b/src/object/fanWind.c
index 3f6d74b3..a33a58d7 100644
--- a/src/object/fanWind.c
+++ b/src/object/fanWind.c
@@ -4,7 +4,6 @@
*
* @brief Fan Wind object
*/
-#define NENT_DEPRECATED
#include "collision.h"
#include "entity.h"
#include "functions.h"
diff --git a/src/object/figurineDevice.c b/src/object/figurineDevice.c
index 86c09f1d..8572dc38 100644
--- a/src/object/figurineDevice.c
+++ b/src/object/figurineDevice.c
@@ -4,7 +4,6 @@
*
* @brief Figurine Device object
*/
-#define NENT_DEPRECATED
#include "figurineMenu.h"
#include "fileselect.h"
#include "functions.h"
@@ -718,7 +717,7 @@ void FigurineDevice_NoFigurinesLeftMessage(void) {
gMessage.rupees = 5;
}
#ifndef EU
- gPlayerEntity.animationState = 6;
+ gPlayerEntity.base.animationState = 6;
#endif
}
@@ -795,9 +794,9 @@ void sub_0808861C(FigurineDeviceEntity* this, ScriptExecutionContext* context) {
// If I understand this correctly then it checks if the player is at the lever
context->condition = CheckPlayerInRegion(168, 84, 12, 8);
#ifdef JP
- if ((gPlayerEntity.animationState != 0)) {
+ if ((gPlayerEntity.base.animationState != 0)) {
#else
- if ((gPlayerEntity.animationState != 0) || (gPlayerEntity.z.HALF.HI != 0)) {
+ if ((gPlayerEntity.base.animationState != 0) || (gPlayerEntity.base.z.HALF.HI != 0)) {
#endif
context->condition = 0;
}
@@ -807,7 +806,7 @@ void sub_0808861C(FigurineDeviceEntity* this, ScriptExecutionContext* context) {
#if !defined(JP)
void sub_08088658(FigurineDeviceEntity* this, ScriptExecutionContext* context) {
context->condition = CheckPlayerInRegion(120, 120, 16, 8); // And this is if the player is at the door
- if (gPlayerEntity.z.HALF.HI != 0) {
+ if (gPlayerEntity.base.z.HALF.HI != 0) {
context->condition = 0;
}
gActiveScriptInfo.flags |= 1;
diff --git a/src/object/fileScreenObjects.c b/src/object/fileScreenObjects.c
index 42afe6f5..b474fdd6 100644
--- a/src/object/fileScreenObjects.c
+++ b/src/object/fileScreenObjects.c
@@ -4,7 +4,6 @@
*
* @brief File Screen Objects object
*/
-#define NENT_DEPRECATED
#include "fileselect.h"
#include "functions.h"
#include "main.h"
diff --git a/src/object/fireballChain.c b/src/object/fireballChain.c
index 3e9905a7..af1aa68e 100644
--- a/src/object/fireballChain.c
+++ b/src/object/fireballChain.c
@@ -4,7 +4,6 @@
*
* @brief Fireball Chain object
*/
-#define NENT_DEPRECATED
#include "entity.h"
#include "functions.h"
#include "global.h"
diff --git a/src/object/fireplace.c b/src/object/fireplace.c
index 50b959c3..98cfa2a6 100644
--- a/src/object/fireplace.c
+++ b/src/object/fireplace.c
@@ -4,7 +4,6 @@
*
* @brief Fireplace object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "object.h"
diff --git a/src/object/flame.c b/src/object/flame.c
index b31ae8a2..34013762 100644
--- a/src/object/flame.c
+++ b/src/object/flame.c
@@ -4,7 +4,6 @@
*
* @brief Flame object
*/
-#define NENT_DEPRECATED
#include "entity.h"
#include "flags.h"
#include "functions.h"
diff --git a/src/object/floatingBlock.c b/src/object/floatingBlock.c
index 7457797f..79b784b5 100644
--- a/src/object/floatingBlock.c
+++ b/src/object/floatingBlock.c
@@ -4,7 +4,6 @@
*
* @brief Floating Block object
*/
-#define NENT_DEPRECATED
#include "object.h"
void FloatingBlock(Entity* this) {
diff --git a/src/object/floatingPlatform.c b/src/object/floatingPlatform.c
index 76f00964..3a260350 100644
--- a/src/object/floatingPlatform.c
+++ b/src/object/floatingPlatform.c
@@ -4,7 +4,6 @@
*
* @brief Floating Platform object
*/
-#define NENT_DEPRECATED
#include "entity.h"
#include "functions.h"
#include "object.h"
@@ -64,9 +63,9 @@ bool32 sub_08086168(FloatingPlatformEntity* this) {
const u8* ptr;
ptr = gUnk_08120658 + super->type * 2;
- if (((EntityInRectRadius(super, &gPlayerEntity, ptr[0], ptr[1])) && PlayerCanBeMoved())) {
+ if (((EntityInRectRadius(super, &gPlayerEntity.base, ptr[0], ptr[1])) && PlayerCanBeMoved())) {
gPlayerState.field_0x14 = 1;
- if (gPlayerEntity.z.HALF.HI == 0) {
+ if (gPlayerEntity.base.z.HALF.HI == 0) {
return TRUE;
} else {
return FALSE;
diff --git a/src/object/fourElements.c b/src/object/fourElements.c
index bb99e701..b8d9ea50 100644
--- a/src/object/fourElements.c
+++ b/src/object/fourElements.c
@@ -4,7 +4,6 @@
*
* @brief Four Elements object
*/
-#define NENT_DEPRECATED
#include "collision.h"
#include "functions.h"
#include "hitbox.h"
@@ -108,7 +107,7 @@ void FourElements_Action3(FourElementsEntity* this) {
if (super->timer != 0) {
sub_080A0424(this);
if (--super->timer == 0) {
- SetEntityPriority(&gPlayerEntity, 0);
+ SetEntityPriority(&gPlayerEntity.base, 0);
}
} else {
RequestPriorityDuration(NULL, 60);
diff --git a/src/object/frozenFlower.c b/src/object/frozenFlower.c
index d046715c..0b93b1de 100644
--- a/src/object/frozenFlower.c
+++ b/src/object/frozenFlower.c
@@ -4,7 +4,6 @@
*
* @brief Frozen Flower object
*/
-#define NENT_DEPRECATED
#include "object.h"
void FrozenFlower_Init(Entity*);
diff --git a/src/object/frozenOctorok.c b/src/object/frozenOctorok.c
index 089436dc..be88eb5f 100644
--- a/src/object/frozenOctorok.c
+++ b/src/object/frozenOctorok.c
@@ -4,7 +4,6 @@
*
* @brief Frozen Octorok object
*/
-#define NENT_DEPRECATED
#include "enemy/octorokBoss.h"
#include "functions.h"
#include "message.h"
@@ -387,7 +386,7 @@ void FrozenOctorok_Action1SubAction6(FrozenOctorokEntity* this) {
LinearMoveUpdate(super);
if ((gRoomControls.origin_y + 0x1c8) < super->y.HALF.HI) {
gRoomControls.scrollSpeed = 4;
- gRoomControls.camera_target = &gPlayerEntity;
+ gRoomControls.camera_target = &gPlayerEntity.base;
SetLocalFlag(0x9b);
DeleteEntity(super->parent);
DeleteEntity(&this->heap->mouthObject->base);
diff --git a/src/object/frozenWaterElement.c b/src/object/frozenWaterElement.c
index eb91890c..dd40d3ab 100644
--- a/src/object/frozenWaterElement.c
+++ b/src/object/frozenWaterElement.c
@@ -4,7 +4,6 @@
*
* @brief Frozen Water Element object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "object.h"
diff --git a/src/object/furniture.c b/src/object/furniture.c
index 0e88178c..31d06f14 100644
--- a/src/object/furniture.c
+++ b/src/object/furniture.c
@@ -4,7 +4,6 @@
*
* @brief Furniture object
*/
-#define NENT_DEPRECATED
#include "entity.h"
#include "functions.h"
#include "object.h"
@@ -310,7 +309,8 @@ static void FurnitureInit(FurnitureEntity* this) {
static void FurnitureUpdate(FurnitureEntity* this) {
switch (this->flags & 0x7FFF) {
case 0x1:
- if (gPlayerEntity.y.HALF.HI < super->y.HALF.HI || gPlayerEntity.y.HALF.HI > super->y.HALF.HI + 24) {
+ if (gPlayerEntity.base.y.HALF.HI < super->y.HALF.HI ||
+ gPlayerEntity.base.y.HALF.HI > super->y.HALF.HI + 24) {
super->spriteRendering.b3 = 2;
} else {
super->spriteRendering.b3 = 3;
@@ -338,16 +338,16 @@ static void FurnitureUpdate(FurnitureEntity* this) {
}
break;
case 0x80:
- if (gPlayerEntity.y.HALF.HI < super->y.HALF.HI + 8) {
+ if (gPlayerEntity.base.y.HALF.HI < super->y.HALF.HI + 8) {
if (gPlayerState.floor_type != SURFACE_LADDER && GetTileTypeByEntity(super) == 0x4017) {
SetTile(0x4026, this->tile, super->collisionLayer);
SetTile(0x403D, this->tile - 64, super->collisionLayer);
SetTile(0x403D, this->tile - 128, super->collisionLayer);
}
} else {
- if (gPlayerEntity.collisionLayer & 2) {
- gPlayerEntity.collisionLayer = 1;
- UpdateSpriteForCollisionLayer(&gPlayerEntity);
+ if (gPlayerEntity.base.collisionLayer & 2) {
+ gPlayerEntity.base.collisionLayer = 1;
+ UpdateSpriteForCollisionLayer(&gPlayerEntity.base);
}
if (GetTileTypeByEntity(super) != 0x4017) {
SetTile(0x4017, this->tile, super->collisionLayer);
diff --git a/src/object/gentariCurtain.c b/src/object/gentariCurtain.c
index bcfce42e..d980d400 100644
--- a/src/object/gentariCurtain.c
+++ b/src/object/gentariCurtain.c
@@ -4,7 +4,6 @@
*
* @brief Gentari Curtain object
*/
-#define NENT_DEPRECATED
#include "asm.h"
#include "entity.h"
#include "flags.h"
diff --git a/src/object/giantBookLadder.c b/src/object/giantBookLadder.c
index fd1e2a25..1553723b 100644
--- a/src/object/giantBookLadder.c
+++ b/src/object/giantBookLadder.c
@@ -4,7 +4,6 @@
*
* @brief Giant Book Ladder object
*/
-#define NENT_DEPRECATED
#include "object.h"
#include "manager.h"
diff --git a/src/object/giantLeaf.c b/src/object/giantLeaf.c
index 15923716..5c6b1d3c 100644
--- a/src/object/giantLeaf.c
+++ b/src/object/giantLeaf.c
@@ -4,7 +4,6 @@
*
* @brief Giant Leaf object
*/
-#define NENT_DEPRECATED
#include "object.h"
void sub_0808D618(Entity* this);
diff --git a/src/object/giantRock.c b/src/object/giantRock.c
index 9c7cf68f..c8a5747e 100644
--- a/src/object/giantRock.c
+++ b/src/object/giantRock.c
@@ -4,7 +4,6 @@
*
* @brief Giant Rock object
*/
-#define NENT_DEPRECATED
#include "entity.h"
void GiantRock(Entity* this) {
diff --git a/src/object/giantRock2.c b/src/object/giantRock2.c
index 09080f29..2f5765da 100644
--- a/src/object/giantRock2.c
+++ b/src/object/giantRock2.c
@@ -4,7 +4,6 @@
*
* @brief Giant Rock 2 object
*/
-#define NENT_DEPRECATED
#include "asm.h"
#include "entity.h"
#include "room.h"
diff --git a/src/object/giantTwig.c b/src/object/giantTwig.c
index 6bb928ce..62deab7a 100644
--- a/src/object/giantTwig.c
+++ b/src/object/giantTwig.c
@@ -4,7 +4,6 @@
*
* @brief Giant Twig object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "object.h"
@@ -103,7 +102,7 @@ void GiantTwig_Type0Init(GiantTwigEntity* this) {
void GiantTwig_Type0Idle(GiantTwigEntity* this) {
if (super->type == 0) {
- if (gPlayerEntity.y.HALF.HI < super->y.HALF.HI + 0x20) {
+ if (gPlayerEntity.base.y.HALF.HI < super->y.HALF.HI + 0x20) {
super->spriteRendering.b3 = 1;
} else {
super->spriteRendering.b3 = 2;
diff --git a/src/object/gleerokParticle.c b/src/object/gleerokParticle.c
index 67efcb36..23bd5d17 100644
--- a/src/object/gleerokParticle.c
+++ b/src/object/gleerokParticle.c
@@ -4,7 +4,6 @@
*
* @brief Gleerok Particle object
*/
-#define NENT_DEPRECATED
#include "asm.h"
#include "effects.h"
#include "entity.h"
@@ -78,7 +77,7 @@ void GleerokParticle_Init(GleerokParticleEntity* this) {
gRoomControls.camera_target = super;
} else {
if (--this->unk78 == -1) {
- gRoomControls.camera_target = &gPlayerEntity;
+ gRoomControls.camera_target = &gPlayerEntity.base;
DeleteThisEntity();
}
}
diff --git a/src/object/graveyardKey.c b/src/object/graveyardKey.c
index bef307ed..699bb95a 100644
--- a/src/object/graveyardKey.c
+++ b/src/object/graveyardKey.c
@@ -4,7 +4,6 @@
*
* @brief Graveyard Key object
*/
-#define NENT_DEPRECATED
#include "asm.h"
#include "collision.h"
#include "effects.h"
@@ -93,7 +92,7 @@ void GraveyardKey_Init(Entity* this, const struct_gUnk_08123FB0* param_2) {
if ((this->direction & DIR_NOT_MOVING_CHECK)) {
dir = this->direction;
if (dir == (DIR_NOT_MOVING_CHECK | 0x1)) {
- this->direction = (((gPlayerEntity.animationState * 4 + (Random() & 3)) - 2) & 0x1f) ^ DirectionSouth;
+ this->direction = (((gPlayerEntity.base.animationState * 4 + (Random() & 3)) - 2) & 0x1f) ^ DirectionSouth;
}
}
UpdateSpriteForCollisionLayer(this);
@@ -131,7 +130,7 @@ void GraveyardKey_Action2(Entity* this, const struct_gUnk_08123FB0* param_2) {
this->zVelocity = param_2->unk14 << 3;
} else {
this->action++;
- this->collisionLayer = gPlayerEntity.collisionLayer;
+ this->collisionLayer = gPlayerEntity.base.collisionLayer;
UpdateSpriteForCollisionLayer(this);
if (param_2->funcEnt != NULL) {
param_2->funcEnt(this);
@@ -178,13 +177,14 @@ void sub_0809D91C(Entity* this) {
bool32 sub_0809D93C(Entity* this, const struct_gUnk_08123FB0* param_2) {
u32 uVar1;
- if (gPlayerEntity.action == PLAYER_BOUNCE && ((param_2->unk0c >> gPlayerEntity.animationState & 1) != 0)) {
- uVar1 = (gPlayerEntity.x.HALF.HI - this->x.HALF.HI) + param_2->unk08 + param_2->unk0a;
+ if (gPlayerEntity.base.action == PLAYER_BOUNCE &&
+ ((param_2->unk0c >> gPlayerEntity.base.animationState & 1) != 0)) {
+ uVar1 = (gPlayerEntity.base.x.HALF.HI - this->x.HALF.HI) + param_2->unk08 + param_2->unk0a;
if (param_2->unk0a * 2 <= (u16)uVar1) {
return 0;
}
- uVar1 = (gPlayerEntity.y.HALF.HI - (this->y.HALF.HI + param_2->y)) + param_2->unk09 + param_2->unk0b;
+ uVar1 = (gPlayerEntity.base.y.HALF.HI - (this->y.HALF.HI + param_2->y)) + param_2->unk09 + param_2->unk0b;
if (param_2->unk0b * 2 > (u16)uVar1) {
return 1;
}
diff --git a/src/object/greatFairy.c b/src/object/greatFairy.c
index 1416d564..3099571c 100644
--- a/src/object/greatFairy.c
+++ b/src/object/greatFairy.c
@@ -4,7 +4,6 @@
*
* @brief Great Fairy object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "object.h"
#include "save.h"
@@ -66,12 +65,12 @@ void GreatFairy(GreatFairyEntity* this) {
void GreatFairy_CallBehavior(GreatFairyEntity* this) {
GreatFairy_Behaviors[super->action](this);
- if ((gPlayerEntity.y.HALF.HI - gRoomControls.origin_y) < 168) {
+ if ((gPlayerEntity.base.y.HALF.HI - gRoomControls.origin_y) < 168) {
gRoomControls.camera_target = super;
gRoomControls.scrollSpeed = 2;
} else {
- gRoomControls.camera_target = &gPlayerEntity;
+ gRoomControls.camera_target = &gPlayerEntity.base;
gRoomControls.scrollSpeed = 2;
}
}
@@ -542,8 +541,8 @@ void sub_08087424(GreatFairyEntity* this, ScriptExecutionContext* context) {
ResetPlayerAnimationAndAction();
ent = CreateObject(THUNDERBOLT, 0, 0);
if (ent != NULL) {
- ent->parent = &gPlayerEntity;
- CopyPosition(&gPlayerEntity, ent);
+ ent->parent = &gPlayerEntity.base;
+ CopyPosition(&gPlayerEntity.base, ent);
SetEntityPriority(ent, PRIO_MESSAGE);
}
diff --git a/src/object/guruguruBar.c b/src/object/guruguruBar.c
index 2c1365c1..40fa7d41 100644
--- a/src/object/guruguruBar.c
+++ b/src/object/guruguruBar.c
@@ -4,7 +4,6 @@
*
* @brief Guruguru Bar object
*/
-#define NENT_DEPRECATED
#include "entity.h"
#include "functions.h"
#include "object.h"
diff --git a/src/object/gustJarParticle.c b/src/object/gustJarParticle.c
index 4c03551f..afbc0aa1 100644
--- a/src/object/gustJarParticle.c
+++ b/src/object/gustJarParticle.c
@@ -4,7 +4,6 @@
*
* @brief Gust Jar Particle object
*/
-#define NENT_DEPRECATED
#include "asm.h"
#include "entity.h"
#include "physics.h"
@@ -26,10 +25,10 @@ void GustJarParticle(Entity* this) {
void GustJarParticle_Init(Entity* this) {
this->action = 1;
this->speed = 0x80;
- this->spriteRendering.b3 = gPlayerEntity.spriteRendering.b3;
- this->spritePriority.b0 = gPlayerEntity.spritePriority.b0;
- this->collisionLayer = gPlayerEntity.collisionLayer;
- this->spriteOrientation.flipY = gPlayerEntity.spriteOrientation.flipY;
+ this->spriteRendering.b3 = gPlayerEntity.base.spriteRendering.b3;
+ this->spritePriority.b0 = gPlayerEntity.base.spritePriority.b0;
+ this->collisionLayer = gPlayerEntity.base.collisionLayer;
+ this->spriteOrientation.flipY = gPlayerEntity.base.spriteOrientation.flipY;
this->type = Random() & 1;
InitializeAnimation(this, 0x11);
}
diff --git a/src/object/gyorgBossObject.c b/src/object/gyorgBossObject.c
index a5c34d89..2de64ed0 100644
--- a/src/object/gyorgBossObject.c
+++ b/src/object/gyorgBossObject.c
@@ -4,7 +4,6 @@
*
* @brief Gyorg Boss object
*/
-#define NENT_DEPRECATED
#include "area.h"
#include "enemy/gyorg.h"
#include "entity.h"
@@ -229,7 +228,7 @@ void GyorgBossObject_FemalePhase4(GyorgBossObjectEntity* this) {
}
this->unk_6c = 0;
gRoomTransition.field_0x39 = 0;
- if (PlayerCanBeMoved() && gPlayerEntity.z.HALF.HI == 0) {
+ if (PlayerCanBeMoved() && gPlayerEntity.base.z.HALF.HI == 0) {
super->action = 9;
super->timer = 0;
super->subtimer = 240;
@@ -237,7 +236,7 @@ void GyorgBossObject_FemalePhase4(GyorgBossObjectEntity* this) {
super->direction = 0;
super->speed = 0x60;
gPlayerState.flags &= ~PL_GYORG_FIGHT;
- CopyPosition(&gPlayerEntity, super);
+ CopyPosition(&gPlayerEntity.base, super);
gRoomControls.camera_target = super;
SetPlayerControl(2);
}
@@ -464,7 +463,7 @@ void sub_080A1FF0(GyorgBossObjectEntity* this) {
}
}
if (this->unk_7b) {
- if (EntityWithinDistance(&gPlayerEntity, gRoomControls.origin_x + 0x200, gRoomControls.origin_y + 0x210,
+ if (EntityWithinDistance(&gPlayerEntity.base, gRoomControls.origin_x + 0x200, gRoomControls.origin_y + 0x210,
0x100)) {
if (super->timer == 0) {
super->timer = 120;
@@ -483,7 +482,7 @@ u32 sub_080A20B8(GyorgBossObjectEntity* this, GyorgMaleEntity* other) {
if (other == NULL) {
return 1;
}
- if (PlayerCanBeMoved() && gPlayerEntity.z.HALF.HI == 0) {
+ if (PlayerCanBeMoved() && gPlayerEntity.base.z.HALF.HI == 0) {
return other->unk_7c == 0 && gPlayerState.field_0x14 != 0;
}
return 0;
diff --git a/src/object/heartContainer.c b/src/object/heartContainer.c
index 95d1b074..1817b8c3 100644
--- a/src/object/heartContainer.c
+++ b/src/object/heartContainer.c
@@ -4,7 +4,6 @@
*
* @brief HeartContainer object
*/
-#define NENT_DEPRECATED
#include "collision.h"
#include "entity.h"
#include "flags.h"
diff --git a/src/object/hiddenLadderDown.c b/src/object/hiddenLadderDown.c
index b17d9717..5b12f8a6 100644
--- a/src/object/hiddenLadderDown.c
+++ b/src/object/hiddenLadderDown.c
@@ -4,7 +4,6 @@
*
* @brief Hidden Ladder Down object
*/
-#define NENT_DEPRECATED
#include "asm.h"
#include "entity.h"
#include "flags.h"
diff --git a/src/object/hitSwitch.c b/src/object/hitSwitch.c
index a0931519..4763a4ac 100644
--- a/src/object/hitSwitch.c
+++ b/src/object/hitSwitch.c
@@ -4,7 +4,6 @@
*
* @brief Hit Switch object
*/
-#define NENT_DEPRECATED
#include "entity.h"
#include "physics.h"
diff --git a/src/object/hittableLever.c b/src/object/hittableLever.c
index d92fbfa3..8e6b63be 100644
--- a/src/object/hittableLever.c
+++ b/src/object/hittableLever.c
@@ -4,7 +4,6 @@
*
* @brief Hittable Lever object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "object.h"
diff --git a/src/object/houseDoorExterior.c b/src/object/houseDoorExterior.c
index 2835e202..79ecf0d8 100644
--- a/src/object/houseDoorExterior.c
+++ b/src/object/houseDoorExterior.c
@@ -4,7 +4,6 @@
*
* @brief House Door Exterior object
*/
-#define NENT_DEPRECATED
#include "entity.h"
#include "flags.h"
#include "functions.h"
@@ -183,7 +182,7 @@ void sub_0808692C(HouseDoorExteriorEntity* this) {
static u8 sub_08086954(HouseDoorExteriorEntity* this) {
if (sub_0800445C(super)) {
- if (GetAnimationStateInRectRadius(super, 6, 20) >= 0 && gPlayerEntity.animationState == 0 &&
+ if (GetAnimationStateInRectRadius(super, 6, 20) >= 0 && gPlayerEntity.base.animationState == 0 &&
(u16)gPlayerState.playerInput.heldInput == INPUT_UP && gPlayerState.jump_status == 0) {
super->timer--;
}
diff --git a/src/object/houseDoorInterior.c b/src/object/houseDoorInterior.c
index 8e69feef..f2a51b32 100644
--- a/src/object/houseDoorInterior.c
+++ b/src/object/houseDoorInterior.c
@@ -4,7 +4,6 @@
*
* @brief House Door Interior object
*/
-#define NENT_DEPRECATED
#include "entity.h"
#include "flags.h"
#include "functions.h"
@@ -92,7 +91,8 @@ void HouseDoorInterior_Action1(HouseDoorInteriorEntity* this) {
if (sub_0800445C(super) && this->unk7d == 0) {
ptr = gUnk_081227CC + super->type2;
if (GetAnimationStateInRectRadius(super, ptr->x, ptr->y) >= 0 &&
- ptr->animationState == gPlayerEntity.animationState && gPlayerState.playerInput.heldInput & ptr->unk2) {
+ ptr->animationState == gPlayerEntity.base.animationState &&
+ gPlayerState.playerInput.heldInput & ptr->unk2) {
--super->timer;
}
} else {
diff --git a/src/object/houseSign.c b/src/object/houseSign.c
index 4353e3ad..149d3cc6 100644
--- a/src/object/houseSign.c
+++ b/src/object/houseSign.c
@@ -4,16 +4,9 @@
*
* @brief HouseSign object
*/
-#define NENT_DEPRECATED
-#include "asm.h"
-#include "entity.h"
+#include "object/houseSign.h"
-typedef struct {
- /*0x00*/ Entity base;
- /*0x68*/ u8 unused1[24];
- /*0x80*/ s16 unk_80;
- /*0x82*/ s16 unk_82;
-} HouseSignEntity;
+#include "asm.h"
/*
This object is created by HouseSignManager.
diff --git a/src/object/itemForSale.c b/src/object/itemForSale.c
index 0106fb63..0b99381d 100644
--- a/src/object/itemForSale.c
+++ b/src/object/itemForSale.c
@@ -4,20 +4,12 @@
*
* @brief Item for Sale object
*/
-#define NENT_DEPRECATED
+#include "object/itemForSale.h"
+
#include "functions.h"
#include "hitbox.h"
#include "kinstone.h"
#include "message.h"
-#include "new_player.h"
-#include "object.h"
-
-typedef struct {
- /*0x00*/ Entity base;
- /*0x68*/ u8 unk_68[0x18];
- /*0x80*/ u16 unk_80;
- /*0x82*/ u16 unk_82;
-} ItemForSaleEntity;
typedef struct {
u8 before[0x20];
@@ -99,7 +91,7 @@ void ItemForSale_Action1(ItemForSaleEntity* this) {
PausePlayer();
ResetActiveItems();
gPlayerState.heldObject = 4;
- gNewPlayerEntity.unk_74 = super;
+ gPlayerEntity.unk_74 = super;
gUnk_0200AF00.rActionPlayerState = R_ACTION_DROP;
MessageClose();
}
@@ -111,8 +103,8 @@ void ItemForSale_Action2(ItemForSaleEntity* this) {
void* ptr;
gUnk_0200AF00.rActionPlayerState = R_ACTION_DROP;
- super->spriteSettings.draw = gPlayerEntity.spriteSettings.draw;
- if ((gPlayerState.heldObject == 0) || (super != gNewPlayerEntity.unk_74)) {
+ super->spriteSettings.draw = gPlayerEntity.base.spriteSettings.draw;
+ if ((gPlayerState.heldObject == 0) || (super != gPlayerEntity.unk_74)) {
sub_080819B4(this);
} else {
ptr = sub_080784E4();
@@ -137,7 +129,7 @@ void sub_080819B4(ItemForSaleEntity* this) {
DeleteThisEntity();
}
gPlayerState.heldObject = 0;
- gNewPlayerEntity.unk_74 = 0;
+ gPlayerEntity.unk_74 = 0;
ptr = &gUnk_0200AF00;
gRoomVars.shopItemType = 0;
ptr->rActionInteractObject = R_ACTION_NONE;
@@ -148,7 +140,7 @@ void sub_080819B4(ItemForSaleEntity* this) {
super->z.WORD = 0;
super->action = 1;
super->subAction = 0;
- super->spriteOrientation.flipY = gPlayerEntity.spriteOrientation.flipY;
+ super->spriteOrientation.flipY = gPlayerEntity.base.spriteOrientation.flipY;
super->collisionLayer = 1;
super->spritePriority.b0 = 4;
UpdateSpriteForCollisionLayer(super);
diff --git a/src/object/itemOnGround.c b/src/object/itemOnGround.c
index 5c46e2dd..3a755c87 100644
--- a/src/object/itemOnGround.c
+++ b/src/object/itemOnGround.c
@@ -4,7 +4,6 @@
*
* @brief Item On Ground object
*/
-#define NENT_DEPRECATED
#include "object/itemOnGround.h"
#include "collision.h"
#include "entity.h"
@@ -188,7 +187,7 @@ void sub_080810FC(ItemOnGroundEntity* this) {
super->subAction = 0;
COLLISION_ON(super);
super->flags2 = 0x11;
- CopyPosition(&gPlayerEntity, super);
+ CopyPosition(&gPlayerEntity.base, super);
}
}
@@ -296,10 +295,10 @@ void sub_080812A8(ItemOnGroundEntity* this) {
void sub_080812E8(ItemOnGroundEntity* this) {
PlayerState* playerState = &gPlayerState;
#ifdef EU
- if ((playerState->swim_state & 0x80) && IsColliding(super, &gPlayerEntity)) {
+ if ((playerState->swim_state & 0x80) && IsColliding(super, &gPlayerEntity.base)) {
#else
if ((playerState->swim_state & 0x80) && (playerState->flags & PL_MINISH) == 0 &&
- IsColliding(super, &gPlayerEntity)) {
+ IsColliding(super, &gPlayerEntity.base)) {
#endif
sub_080810FC(this);
}
@@ -315,7 +314,7 @@ void ItemOnGround_Action3(ItemOnGroundEntity* this) {
} else {
CopyPosition(other, super);
super->z.HALF.HI--;
- other = &gPlayerEntity;
+ other = &gPlayerEntity.base;
if (IsColliding(super, other)) {
sub_080810FC(this);
}
@@ -482,7 +481,7 @@ void sub_08081598(ItemOnGroundEntity* this) {
super->spriteSettings.draw = 1;
super->spritePriority.b1 = 2;
super->spritePriority.b0 = 3;
- super->child = &gPlayerEntity;
+ super->child = &gPlayerEntity.base;
CopyPosition(super->child, super);
super->z.HALF.HI -= 4;
if (super->type != 0x5F && sub_08081420(this)) {
diff --git a/src/object/jailBars.c b/src/object/jailBars.c
index fb81b2b8..814a7bff 100644
--- a/src/object/jailBars.c
+++ b/src/object/jailBars.c
@@ -4,7 +4,6 @@
*
* @brief Jail Bars object
*/
-#define NENT_DEPRECATED
#include "entity.h"
#include "flags.h"
#include "functions.h"
diff --git a/src/object/japaneseSubtitle.c b/src/object/japaneseSubtitle.c
index 745b7b1a..11e7f85f 100644
--- a/src/object/japaneseSubtitle.c
+++ b/src/object/japaneseSubtitle.c
@@ -4,7 +4,6 @@
*
* @brief Japanese Subtitle object
*/
-#define NENT_DEPRECATED
#include "entity.h"
#include "menu.h"
#include "object.h"
diff --git a/src/object/jarPortal.c b/src/object/jarPortal.c
index 90aaf6a0..aa94b26f 100644
--- a/src/object/jarPortal.c
+++ b/src/object/jarPortal.c
@@ -4,7 +4,6 @@
*
* @brief Jar Portal object
*/
-#define NENT_DEPRECATED
#include "area.h"
#include "functions.h"
#include "object.h"
diff --git a/src/object/keyStealingTakkuri.c b/src/object/keyStealingTakkuri.c
index 8a5a40b1..c5a8bdf3 100644
--- a/src/object/keyStealingTakkuri.c
+++ b/src/object/keyStealingTakkuri.c
@@ -4,7 +4,6 @@
*
* @brief Key Stealing Takkuri object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "object.h"
@@ -170,7 +169,7 @@ void KeyStealingTakkuri_Type5_Action1(KeyStealingTakkuriEntity* this) {
super->zVelocity = Q_16_16(1.0);
} else {
super->action++;
- super->collisionLayer = gPlayerEntity.collisionLayer;
+ super->collisionLayer = gPlayerEntity.base.collisionLayer;
UpdateSpriteForCollisionLayer(super);
}
SoundReq(SFX_RUPEE_BOUNCE);
@@ -393,7 +392,7 @@ void sub_0809E0A0(KeyStealingTakkuriEntity* this) {
obj->parent = super;
super->child = obj;
super->subtimer = 0;
- CopyPosition(&gPlayerEntity, obj);
+ CopyPosition(&gPlayerEntity.base, obj);
obj->z.HALF.HI = -8;
}
}
@@ -415,7 +414,7 @@ void sub_0809E0D4(KeyStealingTakkuriEntity* this, ScriptExecutionContext* contex
return;
}
} else {
- entity = &gPlayerEntity;
+ entity = &gPlayerEntity.base;
}
context->unk_18++;
sub_0807DEDC(super, context, entity->x.HALF.HI, entity->y.HALF.HI);
@@ -476,7 +475,8 @@ void sub_0809E1F0(KeyStealingTakkuriEntity* this) {
}
void sub_0809E210(KeyStealingTakkuriEntity* this) {
- gPlayerEntity.animationState = GetAnimationStateForDirection8(GetFacingDirection(&gPlayerEntity, super)) & 0xfe;
+ gPlayerEntity.base.animationState =
+ GetAnimationStateForDirection8(GetFacingDirection(&gPlayerEntity.base, super)) & 0xfe;
gPlayerState.animation = ANIM_DEFAULT;
}
@@ -505,8 +505,8 @@ u32 sub_0809E2C4(KeyStealingTakkuriEntity* this, u32 param_2) {
s32 roomY;
ptr = &gUnk_08124178[param_2 * 2];
- roomX = gPlayerEntity.x.HALF.HI - (gRoomControls.origin_x + ptr[0]);
- roomY = gPlayerEntity.y.HALF.HI - (gRoomControls.origin_y + ptr[1]);
+ roomX = gPlayerEntity.base.x.HALF.HI - (gRoomControls.origin_x + ptr[0]);
+ roomY = gPlayerEntity.base.y.HALF.HI - (gRoomControls.origin_y + ptr[1]);
tmp = gUnk_08124158;
counter = 0;
while (counter < 4) {
@@ -516,7 +516,7 @@ u32 sub_0809E2C4(KeyStealingTakkuriEntity* this, u32 param_2) {
uVar1 = roomY - tmp->unk_2 + tmp->unk_5;
uVar2 = tmp->unk_5 * 2;
if (uVar2 > (u16)uVar1) {
- if (tmp->unk_6 == gPlayerEntity.animationState && gPlayerEntity.action == PLAYER_BOUNCE) {
+ if (tmp->unk_6 == gPlayerEntity.base.animationState && gPlayerEntity.base.action == PLAYER_BOUNCE) {
return 1;
}
return 2;
diff --git a/src/object/kinstoneSpark.c b/src/object/kinstoneSpark.c
index 56da199c..ad596c89 100644
--- a/src/object/kinstoneSpark.c
+++ b/src/object/kinstoneSpark.c
@@ -4,7 +4,6 @@
*
* @brief Kinstone Fusion Particle object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "kinstone.h"
#include "object.h"
diff --git a/src/object/ladderHoleInBookshelf.c b/src/object/ladderHoleInBookshelf.c
index 9c856fe8..0082e9d3 100644
--- a/src/object/ladderHoleInBookshelf.c
+++ b/src/object/ladderHoleInBookshelf.c
@@ -4,7 +4,6 @@
*
* @brief Ladder Hole In Bookshelf object
*/
-#define NENT_DEPRECATED
#include "entity.h"
#include "player.h"
@@ -30,7 +29,7 @@ void LadderHoleInBookshelf_Init(Entity* this) {
void LadderHoleInBookshelf_Action1(Entity* this) {
if (sub_08094064(this)) {
if (this->collisionLayer == 2) {
- switch (gPlayerEntity.action) {
+ switch (gPlayerEntity.base.action) {
case PLAYER_CLIMB:
case PLAYER_USEENTRANCE:
return;
@@ -39,7 +38,7 @@ void LadderHoleInBookshelf_Action1(Entity* this) {
UpdateSpriteForCollisionLayer(this);
this->spritePriority.b0 = 5;
} else {
- switch (gPlayerEntity.action) {
+ switch (gPlayerEntity.base.action) {
case PLAYER_CLIMB:
case PLAYER_USEENTRANCE:
this->collisionLayer = 2;
@@ -47,10 +46,10 @@ void LadderHoleInBookshelf_Action1(Entity* this) {
this->spritePriority.b0 = 1;
break;
default:
- if ((gPlayerEntity.collisionLayer & 2) == 0) {
+ if ((gPlayerEntity.base.collisionLayer & 2) == 0) {
break;
}
- gPlayerEntity.collisionLayer = 1;
+ gPlayerEntity.base.collisionLayer = 1;
break;
}
}
@@ -59,7 +58,7 @@ void LadderHoleInBookshelf_Action1(Entity* this) {
bool32 sub_08094064(Entity* this) {
bool32 rv = 1;
- if (gPlayerEntity.x.HALF.HI - this->x.HALF.HI + 0x1cU >= 0x39) {
+ if (gPlayerEntity.base.x.HALF.HI - this->x.HALF.HI + 0x1cU >= 0x39) {
rv = 0;
}
diff --git a/src/object/ladderUp.c b/src/object/ladderUp.c
index 8722022a..cfdadfb9 100644
--- a/src/object/ladderUp.c
+++ b/src/object/ladderUp.c
@@ -4,7 +4,6 @@
*
* @brief Ladder Up object
*/
-#define NENT_DEPRECATED
#include "asm.h"
#include "effects.h"
#include "entity.h"
@@ -65,7 +64,7 @@ void LadderUp(Entity* this) {
#endif
default:
if (this->type2 == 0) {
- if (gPlayerEntity.y.HALF.HI < this->y.HALF.HI) {
+ if (gPlayerEntity.base.y.HALF.HI < this->y.HALF.HI) {
if (gPlayerState.floor_type != SURFACE_LADDER && (GetTileTypeByEntity(this) == 0x4017)) {
SetTile(0x4023, COORD_TO_TILE(this), this->collisionLayer);
RestorePrevTileEntity(COORD_TO_TILE_OFFSET(this, 0, 0x10), this->collisionLayer);
diff --git a/src/object/lamp.c b/src/object/lamp.c
index 705d43e5..1992f36a 100644
--- a/src/object/lamp.c
+++ b/src/object/lamp.c
@@ -4,7 +4,6 @@
*
* @brief Lamp object
*/
-#define NENT_DEPRECATED
#include "entity.h"
void Lamp_Init(Entity* this);
diff --git a/src/object/lampParticle.c b/src/object/lampParticle.c
index 85c73532..fbdd3abb 100644
--- a/src/object/lampParticle.c
+++ b/src/object/lampParticle.c
@@ -4,7 +4,6 @@
*
* @brief LampParticle object
*/
-#define NENT_DEPRECATED
#include "entity.h"
#include "item.h"
#include "player.h"
diff --git a/src/object/lavaPlatform.c b/src/object/lavaPlatform.c
index be968d08..5db1f0b9 100644
--- a/src/object/lavaPlatform.c
+++ b/src/object/lavaPlatform.c
@@ -4,7 +4,6 @@
*
* @brief Lava Platform object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "hitbox.h"
#include "object.h"
@@ -279,10 +278,10 @@ void sub_0809264C(LavaPlatformEntity* this) {
}
bool32 LavaPlatform_IsPlayerOnPlatform(LavaPlatformEntity* this) {
- if ((gPlayerState.flags & PL_MINISH) == 0 && EntityInRectRadius(super, &gPlayerEntity, 0x10, 0x10) &&
+ if ((gPlayerState.flags & PL_MINISH) == 0 && EntityInRectRadius(super, &gPlayerEntity.base, 0x10, 0x10) &&
PlayerCanBeMoved()) {
gPlayerState.field_0x14 = 1;
- if (gPlayerEntity.z.HALF.HI == 0) {
+ if (gPlayerEntity.base.z.HALF.HI == 0) {
super->subtimer = 1;
return TRUE;
}
diff --git a/src/object/lightDoor.c b/src/object/lightDoor.c
index b8c30d7b..e128c65c 100644
--- a/src/object/lightDoor.c
+++ b/src/object/lightDoor.c
@@ -4,7 +4,6 @@
*
* @brief Light Door object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "object.h"
#include "screen.h"
diff --git a/src/object/lightRay.c b/src/object/lightRay.c
index bd437bc6..a48ffa53 100644
--- a/src/object/lightRay.c
+++ b/src/object/lightRay.c
@@ -4,7 +4,6 @@
*
* @brief Light Ray object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "object.h"
#include "screen.h"
@@ -42,12 +41,12 @@ void LightRay_Type0(LightRayEntity* this) {
super->subtimer = 0;
gRoomControls.camera_target = super;
gRoomControls.scrollSpeed = 1;
- if (super->x.HALF.HI > gPlayerEntity.x.HALF.HI) {
+ if (super->x.HALF.HI > gPlayerEntity.base.x.HALF.HI) {
tmp = 2;
} else {
tmp = 6;
}
- gPlayerEntity.animationState = tmp;
+ gPlayerEntity.base.animationState = tmp;
gScreen.lcd.displayControl = (gScreen.lcd.displayControl & 0xbfff) | 0x2800;
gScreen.controls.window0HorizontalDimensions = 0;
gScreen.controls.window0VerticalDimensions = 0xa0;
@@ -67,7 +66,7 @@ void LightRay_Type0(LightRayEntity* this) {
super->action = 2;
super->timer = 60;
gScreen.lcd.displayControl &= 0xdfff;
- gRoomControls.camera_target = &gPlayerEntity;
+ gRoomControls.camera_target = &gPlayerEntity.base;
SoundReq(SFX_134);
}
}
@@ -116,12 +115,12 @@ void LightRay_Type1(LightRayEntity* this) {
super->subtimer = 32;
gRoomControls.camera_target = super;
gRoomControls.scrollSpeed = 1;
- if (super->x.HALF.HI > gPlayerEntity.x.HALF.HI) {
+ if (super->x.HALF.HI > gPlayerEntity.base.x.HALF.HI) {
tmp = 2;
} else {
tmp = 6;
}
- gPlayerEntity.animationState = tmp;
+ gPlayerEntity.base.animationState = tmp;
gScreen.lcd.displayControl = (gScreen.lcd.displayControl & 0xbfff) | 0x2000;
gScreen.controls.window0HorizontalDimensions = DISPLAY_WIDTH;
gScreen.controls.window0VerticalDimensions = DISPLAY_HEIGHT;
@@ -140,7 +139,7 @@ void LightRay_Type1(LightRayEntity* this) {
} else {
super->action = 2;
super->timer = 60;
- gRoomControls.camera_target = &gPlayerEntity;
+ gRoomControls.camera_target = &gPlayerEntity.base;
SoundReq(SFX_134);
}
}
@@ -167,12 +166,12 @@ void LightRay_Type2(LightRayEntity* this) {
super->subtimer = 0;
gRoomControls.camera_target = super;
gRoomControls.scrollSpeed = 1;
- if (super->x.HALF.HI > gPlayerEntity.x.HALF.HI) {
+ if (super->x.HALF.HI > gPlayerEntity.base.x.HALF.HI) {
tmp = 2;
} else {
tmp = 6;
}
- gPlayerEntity.animationState = tmp;
+ gPlayerEntity.base.animationState = tmp;
gScreen.controls.window0HorizontalDimensions = 0x60;
gScreen.controls.window0VerticalDimensions = 0xa0;
break;
@@ -212,7 +211,7 @@ void LightRay_Type2(LightRayEntity* this) {
case 3:
if (--super->timer == 0) {
super->action = 4;
- gRoomControls.camera_target = &gPlayerEntity;
+ gRoomControls.camera_target = &gPlayerEntity.base;
gRoomControls.scrollSpeed = 2;
}
break;
@@ -237,12 +236,12 @@ void LightRay_Type3(LightRayEntity* this) {
super->subtimer = 0;
gRoomControls.camera_target = super;
gRoomControls.scrollSpeed = 1;
- if (super->x.HALF.HI > gPlayerEntity.x.HALF.HI) {
+ if (super->x.HALF.HI > gPlayerEntity.base.x.HALF.HI) {
tmp = 2;
} else {
tmp = 6;
}
- gPlayerEntity.animationState = tmp;
+ gPlayerEntity.base.animationState = tmp;
gScreen.controls.window0HorizontalDimensions = 0x80f0;
gScreen.controls.window0VerticalDimensions = 0xa0;
super->subAction = 0x80;
@@ -293,12 +292,12 @@ void LightRay_Type4(LightRayEntity* this) {
super->subtimer = 128;
gRoomControls.camera_target = super;
gRoomControls.scrollSpeed = 1;
- if (super->x.HALF.HI > gPlayerEntity.x.HALF.HI) {
+ if (super->x.HALF.HI > gPlayerEntity.base.x.HALF.HI) {
tmp = 2;
} else {
tmp = 6;
}
- gPlayerEntity.animationState = tmp;
+ gPlayerEntity.base.animationState = tmp;
break;
case 1:
if (super->timer != 0) {
@@ -311,7 +310,7 @@ void LightRay_Type4(LightRayEntity* this) {
} else {
super->action = 2;
super->timer = 60;
- gRoomControls.camera_target = &gPlayerEntity;
+ gRoomControls.camera_target = &gPlayerEntity.base;
SoundReq(SFX_134);
}
}
diff --git a/src/object/lightableSwitch.c b/src/object/lightableSwitch.c
index 4484c9c4..927a4c9d 100644
--- a/src/object/lightableSwitch.c
+++ b/src/object/lightableSwitch.c
@@ -4,7 +4,6 @@
*
* @brief Lightable Switch object
*/
-#define NENT_DEPRECATED
#include "asm.h"
#include "entity.h"
#include "flags.h"
diff --git a/src/object/lilypadLarge.c b/src/object/lilypadLarge.c
index 5571ca47..7a09ee3a 100644
--- a/src/object/lilypadLarge.c
+++ b/src/object/lilypadLarge.c
@@ -4,7 +4,6 @@
*
* @brief Large Lilypad object
*/
-#define NENT_DEPRECATED
#include "object/lilypadLarge.h"
#include "area.h"
#include "functions.h"
@@ -101,19 +100,19 @@ void LilypadLarge_Action1(LilypadLargeEntity* this) {
u32 uVar4;
super->flags |= 0x20;
- if (sub_0806FC80(super, &gPlayerEntity, 0x18) != 0) {
+ if (sub_0806FC80(super, &gPlayerEntity.base, 0x18) != 0) {
gPlayerState.flags |= PL_FLAGS2;
- if (gPlayerEntity.z.WORD == 0) {
+ if (gPlayerEntity.base.z.WORD == 0) {
if (gPlayerState.swim_state != 0) {
- gPlayerEntity.collisionFlags &= 0xfb;
+ gPlayerEntity.base.collisionFlags &= 0xfb;
gPlayerState.swim_state = 0;
}
gPlayerState.lilypad = super;
if (super->collisionLayer == 1) {
- ResetCollisionLayer(&gPlayerEntity);
+ ResetCollisionLayer(&gPlayerEntity.base);
} else {
- sub_08004542(&gPlayerEntity);
+ sub_08004542(&gPlayerEntity.base);
}
if (super->subtimer == 0) {
super->subtimer = 4;
@@ -128,7 +127,7 @@ void LilypadLarge_Action1(LilypadLargeEntity* this) {
}
if (gPlayerState.field_0x1c == 3) {
tmp = gUnk_08120620[gPlayerState.gustJarSpeed - 1];
- switch (gPlayerEntity.animationState & 6) {
+ switch (gPlayerEntity.base.animationState & 6) {
case 4:
this->unk_70 -= tmp;
break;
@@ -151,8 +150,8 @@ void LilypadLarge_Action1(LilypadLargeEntity* this) {
SoundReq(SFX_WATER_WALK);
}
if ((super->contactFlags & 0x7f) == 0x13) {
- sVar10 = gPlayerEntity.x.HALF.HI + gUnk_08126EE4[gPlayerEntity.animationState & 0xe];
- uVar4 = gPlayerEntity.y.HALF.HI + gUnk_08126EE4[gPlayerEntity.animationState | 1];
+ sVar10 = gPlayerEntity.base.x.HALF.HI + gUnk_08126EE4[gPlayerEntity.base.animationState & 0xe];
+ uVar4 = gPlayerEntity.base.y.HALF.HI + gUnk_08126EE4[gPlayerEntity.base.animationState | 1];
super->direction = CalculateDirectionTo(super->x.HALF.HI, super->y.HALF.HI, sVar10, uVar4);
switch (gPlayerState.gustJarSpeed) {
@@ -378,26 +377,26 @@ void sub_08085B40(LilypadLargeEntity* this) {
this->unk_78.WORD += 0x100000;
SetAffineInfo(super, this->unk_78.HALF_U.HI, this->unk_78.HALF_U.HI, this->unk_7c.HALF_U.HI);
}
- gPlayerEntity.y.HALF.HI = (super->y.HALF.HI + super->z.HALF.HI) - this->unk_74;
+ gPlayerEntity.base.y.HALF.HI = (super->y.HALF.HI + super->z.HALF.HI) - this->unk_74;
if (gArea.locationIndex == 0x1b) {
- gPlayerEntity.z.HALF.HI = super->y.HALF.HI - this->unk_74 - 0xd0 - gPlayerEntity.y.HALF.HI;
+ gPlayerEntity.base.z.HALF.HI = super->y.HALF.HI - this->unk_74 - 0xd0 - gPlayerEntity.base.y.HALF.HI;
} else {
- gPlayerEntity.z.HALF.HI = super->y.HALF.HI - this->unk_74 - 0x40 - gPlayerEntity.y.HALF.HI;
+ gPlayerEntity.base.z.HALF.HI = super->y.HALF.HI - this->unk_74 - 0x40 - gPlayerEntity.base.y.HALF.HI;
}
}
} else {
ResetCollisionLayer(super);
if (GetTileUnderEntity(super) == 0xd) {
- ResetCollisionLayer(&gPlayerEntity);
+ ResetCollisionLayer(&gPlayerEntity.base);
LilypadLarge_Action4(this);
- super->direction = GetFacingDirection(&gPlayerEntity, super);
- LinearMoveDirection(&gPlayerEntity, 0x100, super->direction);
+ super->direction = GetFacingDirection(&gPlayerEntity.base, super);
+ LinearMoveDirection(&gPlayerEntity.base, 0x100, super->direction);
}
}
if (this->unk_82 == 0) {
- if (GravityUpdate(&gPlayerEntity, Q_8_8(32.0)) == 0) {
- ResetCollisionLayer(&gPlayerEntity);
+ if (GravityUpdate(&gPlayerEntity.base, Q_8_8(32.0)) == 0) {
+ ResetCollisionLayer(&gPlayerEntity.base);
sub_08085F1C(this);
super->action = 1;
super->subtimer = 4;
@@ -419,23 +418,23 @@ void sub_08085B40(LilypadLargeEntity* this) {
}
void LilypadLarge_Action3(LilypadLargeEntity* this) {
- if (sub_0806FC80(super, &gPlayerEntity, 0x18) != 0) {
+ if (sub_0806FC80(super, &gPlayerEntity.base, 0x18) != 0) {
LinearMoveUpdate(super);
- gPlayerEntity.speed = super->speed;
- gPlayerEntity.direction = super->direction;
- LinearMoveUpdate(&gPlayerEntity);
+ gPlayerEntity.base.speed = super->speed;
+ gPlayerEntity.base.direction = super->direction;
+ LinearMoveUpdate(&gPlayerEntity.base);
gPlayerState.flags |= PL_FLAGS2;
if (super->collisionLayer == 1) {
- ResetCollisionLayer(&gPlayerEntity);
+ ResetCollisionLayer(&gPlayerEntity.base);
} else {
- sub_08004542(&gPlayerEntity);
+ sub_08004542(&gPlayerEntity.base);
}
}
if (gRoomControls.reload_flags == 0) {
super->flags &= ~ENT_PERSIST;
super->action = 1;
super->updatePriority = super->updatePriorityPrev;
- gRoomControls.camera_target = &gPlayerEntity;
+ gRoomControls.camera_target = &gPlayerEntity.base;
}
}
@@ -499,7 +498,7 @@ void sub_08085D60(LilypadLargeEntity* this) {
if (sub_080806BC((super->x.HALF.HI - gRoomControls.origin_x) + tmpX,
(super->y.HALF.HI - gRoomControls.origin_y) + tmpY, r4, 5) == 0) {
- if (sub_0807BD14(&gPlayerEntity, r4 >> 3) != 0) {
+ if (sub_0807BD14(&gPlayerEntity.base, r4 >> 3) != 0) {
super->direction = r4;
sub_08085E74(this);
return;
@@ -515,7 +514,7 @@ void sub_08085D60(LilypadLargeEntity* this) {
tmpX2 = gUnk_08120638[tmp];
tmpY2 = gUnk_08120638[tmp + 1];
if (sub_080B1AF0(super, tmpX2, tmpY2) == 0xff) {
- if (sub_0807BD14(&gPlayerEntity, r6 >> 3) != 0) {
+ if (sub_0807BD14(&gPlayerEntity.base, r6 >> 3) != 0) {
super->direction = (u8)r6;
sub_08085E74(this);
}
@@ -548,9 +547,9 @@ void sub_08085E74(LilypadLargeEntity* this) {
this->unk_6c = 0;
super->x.HALF.LO = 0;
super->y.HALF.LO = 0;
- gPlayerEntity.x.HALF.LO = 0;
- gPlayerEntity.y.HALF.LO = 0;
- gPlayerEntity.direction = super->direction;
+ gPlayerEntity.base.x.HALF.LO = 0;
+ gPlayerEntity.base.y.HALF.LO = 0;
+ gPlayerEntity.base.direction = super->direction;
gPlayerState.animation = ANIM_DEFAULT;
gRoomControls.camera_target = super;
if (gPlayerState.item != NULL) {
@@ -560,13 +559,13 @@ void sub_08085E74(LilypadLargeEntity* this) {
}
void sub_08085EFC(LilypadLargeEntity* this) {
- this->unk_76 = super->x.HALF.HI - gPlayerEntity.x.HALF.HI;
- this->unk_74 = super->y.HALF.HI - gPlayerEntity.y.HALF.HI;
+ this->unk_76 = super->x.HALF.HI - gPlayerEntity.base.x.HALF.HI;
+ this->unk_74 = super->y.HALF.HI - gPlayerEntity.base.y.HALF.HI;
}
void sub_08085F1C(LilypadLargeEntity* this) {
- gPlayerEntity.x.HALF.HI = super->x.HALF.HI - this->unk_76;
- gPlayerEntity.y.HALF.HI = super->y.HALF.HI - this->unk_74;
+ gPlayerEntity.base.x.HALF.HI = super->x.HALF.HI - this->unk_76;
+ gPlayerEntity.base.y.HALF.HI = super->y.HALF.HI - this->unk_74;
sub_0807A5B8(super->direction);
}
diff --git a/src/object/lilypadLargeFalling.c b/src/object/lilypadLargeFalling.c
index e32b0f88..d0b19b12 100644
--- a/src/object/lilypadLargeFalling.c
+++ b/src/object/lilypadLargeFalling.c
@@ -4,7 +4,6 @@
*
* @brief LilypadLargeFalling object
*/
-#define NENT_DEPRECATED
#include "entity.h"
#include "functions.h"
#include "object/lilypadLarge.h"
diff --git a/src/object/lilypadSmall.c b/src/object/lilypadSmall.c
index 1d84c392..2d92e4f0 100644
--- a/src/object/lilypadSmall.c
+++ b/src/object/lilypadSmall.c
@@ -4,7 +4,6 @@
*
* @brief Lilypad Small object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "object.h"
@@ -43,13 +42,13 @@ void LilypadSmall(LilypadSmallEntity* this) {
static bool32 CheckMovePlayer(LilypadSmallEntity* this) {
if (!(gPlayerState.flags & PL_MINISH)) {
return FALSE;
- } else if (EntityInRectRadius(super, &gPlayerEntity, 8, 8) == 0) {
+ } else if (EntityInRectRadius(super, &gPlayerEntity.base, 8, 8) == 0) {
return FALSE;
} else if (!PlayerCanBeMoved()) {
return FALSE;
} else {
gPlayerState.field_0x14 = 1;
- if (gPlayerEntity.z.HALF.HI != 0) {
+ if (gPlayerEntity.base.z.HALF.HI != 0) {
return FALSE;
} else {
return TRUE;
diff --git a/src/object/linkAnimation.c b/src/object/linkAnimation.c
index 5f790559..71e1a494 100644
--- a/src/object/linkAnimation.c
+++ b/src/object/linkAnimation.c
@@ -5,7 +5,6 @@
* @brief Link Animation object. This is used during "item get" sequences and
* replaces the player entity for the duration.
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "message.h"
#include "object.h"
@@ -53,19 +52,19 @@ void LinkAnimation_ItemGet(LinkAnimationEntity* this) {
u8* ptr;
// hide player entity
- gPlayerEntity.flags &= ~ENT_COLLIDE;
- gPlayerEntity.spriteSettings.draw = 0;
+ gPlayerEntity.base.flags &= ~ENT_COLLIDE;
+ gPlayerEntity.base.spriteSettings.draw = 0;
- super->palette.b.b0 = gPlayerEntity.palette.b.b0;
+ super->palette.b.b0 = gPlayerEntity.base.palette.b.b0;
switch (super->subAction) {
case ITEMGET_INIT:
one = 1;
super->subAction = one;
super->spriteSettings.draw = one;
- super->collisionLayer = gPlayerEntity.collisionLayer;
- super->spritePriority.b0 = gPlayerEntity.spritePriority.b0;
- super->spriteRendering.b3 = gPlayerEntity.spriteRendering.b3;
- super->spriteOrientation.flipY = gPlayerEntity.spriteOrientation.flipY;
+ super->collisionLayer = gPlayerEntity.base.collisionLayer;
+ super->spritePriority.b0 = gPlayerEntity.base.spritePriority.b0;
+ super->spriteRendering.b3 = gPlayerEntity.base.spriteRendering.b3;
+ super->spriteOrientation.flipY = gPlayerEntity.base.spriteOrientation.flipY;
super->spriteSettings.flipX = 0;
super->animationState = 4;
SetEntityPriority(super, PRIO_PLAYER_EVENT);
@@ -99,9 +98,9 @@ void LinkAnimation_ItemGet(LinkAnimationEntity* this) {
if (super->frame & ANIM_DONE) {
super->action = PLAYER_NORMAL;
// restore player state
- gPlayerEntity.flags = this->storeFlags;
- gPlayerEntity.spriteSettings.draw = this->storeDrawFlags;
- gPlayerEntity.iframes = this->storeIFrames;
+ gPlayerEntity.base.flags = this->storeFlags;
+ gPlayerEntity.base.spriteSettings.draw = this->storeDrawFlags;
+ gPlayerEntity.base.iframes = this->storeIFrames;
gPlayerState.field_0x7 = this->storeField7;
gPlayerState.keepFacing = this->storeKeepFacing;
gPlayerState.field_0xa = this->storeFieldA;
diff --git a/src/object/linkEmptyingBottle.c b/src/object/linkEmptyingBottle.c
index f9787ac4..e3b77637 100644
--- a/src/object/linkEmptyingBottle.c
+++ b/src/object/linkEmptyingBottle.c
@@ -5,7 +5,6 @@
* @brief Link Emptying Bottle object
* Handles effects of using water, mineral water or a fairy in a bottle in PlayerItemBottle_UseOther.
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "item.h"
#include "object.h"
@@ -40,8 +39,9 @@ void LinkEmptyingBottle_Init(LinkEmptyingBottleEntity* this) {
effect = CreateFx(super, FX_WATER_SPLASH, 0);
super->child = effect;
if (effect != NULL) {
- PositionRelative(&gPlayerEntity, effect, gUnk_08122A18[gPlayerEntity.animationState & 6] << 0x10,
- gUnk_08122A18[gPlayerEntity.animationState | 1] << 0x10);
+ PositionRelative(&gPlayerEntity.base, effect,
+ gUnk_08122A18[gPlayerEntity.base.animationState & 6] << 0x10,
+ gUnk_08122A18[gPlayerEntity.base.animationState | 1] << 0x10);
}
CopyPosition(super->child, super);
sub_08094980(this, 0x4032, 0x4033);
@@ -51,8 +51,9 @@ void LinkEmptyingBottle_Init(LinkEmptyingBottleEntity* this) {
effect = CreateFx(super, FX_GREEN_SPLASH2, 0);
super->child = effect;
if (effect != NULL) {
- PositionRelative(&gPlayerEntity, effect, gUnk_08122A18[gPlayerEntity.animationState & 6] << 0x10,
- gUnk_08122A18[gPlayerEntity.animationState | 1] << 0x10);
+ PositionRelative(&gPlayerEntity.base, effect,
+ gUnk_08122A18[gPlayerEntity.base.animationState & 6] << 0x10,
+ gUnk_08122A18[gPlayerEntity.base.animationState | 1] << 0x10);
}
if (super->type2 == 0) {
CopyPosition(super->child, super);
@@ -65,7 +66,7 @@ void LinkEmptyingBottle_Init(LinkEmptyingBottleEntity* this) {
}
break;
case 2:
- child = CreateGroundItem(&gPlayerEntity, ITEM_FAIRY, 0);
+ child = CreateGroundItem(&gPlayerEntity.base, ITEM_FAIRY, 0);
super->child = child;
if (child != NULL) {
child->timer = 1;
diff --git a/src/object/linkFire.c b/src/object/linkFire.c
index 7a5b4292..1a12c93f 100644
--- a/src/object/linkFire.c
+++ b/src/object/linkFire.c
@@ -4,7 +4,6 @@
*
* @brief Link Fire object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "object.h"
@@ -60,22 +59,22 @@ void sub_0808DDE8(LinkFireEntity* this) {
gPlayerState.flags &= ~PL_BURNING;
DeleteThisEntity();
}
- player = &gPlayerEntity;
- super->x.HALF.HI = (s8)gUnk_081217B8[gPlayerEntity.animationState >> 1] + player->x.HALF.HI;
- super->y.HALF.HI = gPlayerEntity.y.HALF.HI + -6;
- super->z = gPlayerEntity.z;
- super->collisionLayer = gPlayerEntity.collisionLayer;
- super->spriteRendering.b3 = gPlayerEntity.spriteRendering.b3;
- super->spriteOrientation.flipY = gPlayerEntity.spriteOrientation.flipY;
+ player = &gPlayerEntity.base;
+ super->x.HALF.HI = (s8)gUnk_081217B8[gPlayerEntity.base.animationState >> 1] + player->x.HALF.HI;
+ super->y.HALF.HI = gPlayerEntity.base.y.HALF.HI + -6;
+ super->z = gPlayerEntity.base.z;
+ super->collisionLayer = gPlayerEntity.base.collisionLayer;
+ super->spriteRendering.b3 = gPlayerEntity.base.spriteRendering.b3;
+ super->spriteOrientation.flipY = gPlayerEntity.base.spriteOrientation.flipY;
if ((gPlayerState.flags & PL_BURNING) != 0) {
GetNextFrame(super);
} else {
DeleteThisEntity();
}
- if (gPlayerEntity.animationState >> 1 == 2) {
- sub_0806FEBC(&gPlayerEntity, 3, super);
+ if (gPlayerEntity.base.animationState >> 1 == 2) {
+ sub_0806FEBC(&gPlayerEntity.base, 3, super);
super->y.HALF.HI -= 5;
} else {
- sub_0806FEBC(&gPlayerEntity, 0, super);
+ sub_0806FEBC(&gPlayerEntity.base, 0, super);
}
}
diff --git a/src/object/linkHoldingItem.c b/src/object/linkHoldingItem.c
index 009535a7..6e5bedd2 100644
--- a/src/object/linkHoldingItem.c
+++ b/src/object/linkHoldingItem.c
@@ -4,7 +4,6 @@
*
* @brief Link Holding Item object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "game.h"
#include "item.h"
diff --git a/src/object/litArea.c b/src/object/litArea.c
index 8d39ddf1..53b34d1f 100644
--- a/src/object/litArea.c
+++ b/src/object/litArea.c
@@ -4,7 +4,6 @@
*
* @brief Lit Area object
*/
-#define NENT_DEPRECATED
#include "entity.h"
#include "flags.h"
#include "functions.h"
diff --git a/src/object/lockedDoor.c b/src/object/lockedDoor.c
index ae3ae896..d7f089a2 100644
--- a/src/object/lockedDoor.c
+++ b/src/object/lockedDoor.c
@@ -4,7 +4,6 @@
*
* @brief Looked Door object
*/
-#define NENT_DEPRECATED
#include "asm.h"
#include "common.h"
#include "effects.h"
@@ -284,19 +283,19 @@ u32 sub_08083734(Entity* this, u32 unk0) {
// struct?
switch (unk0) {
case 0:
- if (((LockedDoorEntity*)this)->unk_72 + 0xd - gPlayerEntity.y.HALF.HI < 0)
+ if (((LockedDoorEntity*)this)->unk_72 + 0xd - gPlayerEntity.base.y.HALF.HI < 0)
return 1;
break;
case 1:
- if (gPlayerEntity.x.HALF.HI - (((LockedDoorEntity*)this)->unk_70 - 0xb) < 0)
+ if (gPlayerEntity.base.x.HALF.HI - (((LockedDoorEntity*)this)->unk_70 - 0xb) < 0)
return 1;
break;
case 2:
- if (gPlayerEntity.y.HALF.HI - (((LockedDoorEntity*)this)->unk_72 - 0x8) < 0)
+ if (gPlayerEntity.base.y.HALF.HI - (((LockedDoorEntity*)this)->unk_72 - 0x8) < 0)
return 1;
break;
case 3:
- if (((LockedDoorEntity*)this)->unk_70 + 0xa - gPlayerEntity.x.HALF.HI < 0)
+ if (((LockedDoorEntity*)this)->unk_70 + 0xa - gPlayerEntity.base.x.HALF.HI < 0)
return 1;
break;
}
diff --git a/src/object/macroAcorn.c b/src/object/macroAcorn.c
index 044ab9f1..a7f32871 100644
--- a/src/object/macroAcorn.c
+++ b/src/object/macroAcorn.c
@@ -4,7 +4,6 @@
*
* @brief Macro Acorn object
*/
-#define NENT_DEPRECATED
#include "entity.h"
#include "object.h"
#include "physics.h"
diff --git a/src/object/macroBook.c b/src/object/macroBook.c
index 0c116b44..c0cb253e 100644
--- a/src/object/macroBook.c
+++ b/src/object/macroBook.c
@@ -4,7 +4,6 @@
*
* @brief Macro Book object
*/
-#define NENT_DEPRECATED
#include "asm.h"
#include "entity.h"
#include "flags.h"
@@ -126,7 +125,7 @@ void MacroBook_Action3(MacroBookEntity* this) {
SetAffineInfo(super, this->unk80, this->unk80, 0);
} else {
sub_0809AA9C(this, super->child, 0);
- sub_0809AA9C(this, &gPlayerEntity, 1);
+ sub_0809AA9C(this, &gPlayerEntity.base, 1);
if (gPlayerClones[0] != NULL) {
sub_0809AA9C(this, gPlayerClones[0], 1);
}
@@ -183,7 +182,7 @@ void sub_0809AA00(MacroBookEntity* this) {
} else {
sub_0809AA9C(this, super->child, 0);
}
- ent = &gPlayerEntity;
+ ent = &gPlayerEntity.base;
this->playerWithinRect = EntityInRectRadius(super, ent, 0x20, 0x22);
if (this->playerWithinRect != 0) {
sub_0809AA9C(this, ent, 1);
diff --git a/src/object/macroDecorations.c b/src/object/macroDecorations.c
index 5227ec46..4e886ae0 100644
--- a/src/object/macroDecorations.c
+++ b/src/object/macroDecorations.c
@@ -4,7 +4,6 @@
*
* @brief Macro Decoration object
*/
-#define NENT_DEPRECATED
#include "asm.h"
#include "entity.h"
#include "room.h"
diff --git a/src/object/macroMushroomStalk.c b/src/object/macroMushroomStalk.c
index 92f70fa0..45eb8fe0 100644
--- a/src/object/macroMushroomStalk.c
+++ b/src/object/macroMushroomStalk.c
@@ -4,7 +4,6 @@
*
* @brief Macro Mushroom Stalk object
*/
-#define NENT_DEPRECATED
#include "area.h"
#include "entity.h"
#include "main.h"
diff --git a/src/object/macroPlayer.c b/src/object/macroPlayer.c
index deb5a7c8..a313729b 100644
--- a/src/object/macroPlayer.c
+++ b/src/object/macroPlayer.c
@@ -4,7 +4,6 @@
*
* @brief Macro Player object
*/
-#define NENT_DEPRECATED
#include "area.h"
#include "entity.h"
#include "functions.h"
diff --git a/src/object/macroShoe.c b/src/object/macroShoe.c
index e9b12000..2d4b5ac2 100644
--- a/src/object/macroShoe.c
+++ b/src/object/macroShoe.c
@@ -4,7 +4,6 @@
*
* @brief Macro Shoe object
*/
-#define NENT_DEPRECATED
#include "asm.h"
#include "entity.h"
diff --git a/src/object/mask.c b/src/object/mask.c
index e6934e5a..5fd949ef 100644
--- a/src/object/mask.c
+++ b/src/object/mask.c
@@ -4,7 +4,6 @@
*
* @brief Mask object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "object.h"
@@ -81,21 +80,21 @@ void Mask_Init(MaskEntity* this) {
// Probably related to knocking it down
void Mask_Action1(MaskEntity* this) {
// Check for the first frame of bonking animation
- if (gPlayerEntity.action != PLAYER_BOUNCE) {
+ if (gPlayerEntity.base.action != PLAYER_BOUNCE) {
return;
}
- if (gPlayerEntity.animationState != 0) {
+ if (gPlayerEntity.base.animationState != 0) {
return;
}
// Check if link is close enough to the mask
- if (super->y.HALF.HI + 40 < gPlayerEntity.y.HALF.HI) {
+ if (super->y.HALF.HI + 40 < gPlayerEntity.base.y.HALF.HI) {
return;
}
- if (super->x.HALF.HI - gPlayerEntity.x.HALF.HI >= super->subtimer ||
- super->x.HALF.HI - gPlayerEntity.x.HALF.HI <= -super->subtimer) {
+ if (super->x.HALF.HI - gPlayerEntity.base.x.HALF.HI >= super->subtimer ||
+ super->x.HALF.HI - gPlayerEntity.base.x.HALF.HI <= -super->subtimer) {
return;
}
diff --git a/src/object/mazaalBossObject.c b/src/object/mazaalBossObject.c
index c65e7c02..9fc03361 100644
--- a/src/object/mazaalBossObject.c
+++ b/src/object/mazaalBossObject.c
@@ -4,12 +4,10 @@
*
* @brief Mazaal Boss object
*/
-#define NENT_DEPRECATED
#include "enemy.h"
#include "entity.h"
#include "functions.h"
#include "item.h"
-#include "new_player.h"
#include "object.h"
#include "player.h"
#include "room.h"
@@ -187,7 +185,7 @@ void MazaalBossObject_Action8(MazaalBossObjectEntity* this) {
break;
case 2:
if (--super->timer == 0) {
- gRoomControls.camera_target = &gNewPlayerEntity.base;
+ gRoomControls.camera_target = &gPlayerEntity.base;
gPlayerState.controlMode = CONTROL_1;
DeleteThisEntity();
}
diff --git a/src/object/mazaalObject.c b/src/object/mazaalObject.c
index 68c76041..949e3897 100644
--- a/src/object/mazaalObject.c
+++ b/src/object/mazaalObject.c
@@ -4,7 +4,6 @@
*
* @brief Mazaal Object object
*/
-#define NENT_DEPRECATED
#include "entity.h"
#include "physics.h"
diff --git a/src/object/metalDoor.c b/src/object/metalDoor.c
index 0703a301..0c7fbfd0 100644
--- a/src/object/metalDoor.c
+++ b/src/object/metalDoor.c
@@ -4,7 +4,6 @@
*
* @brief Metal Door object
*/
-#define NENT_DEPRECATED
#include "asm.h"
#include "effects.h"
#include "entity.h"
diff --git a/src/object/minecart.c b/src/object/minecart.c
index 73cf2e51..67d52465 100644
--- a/src/object/minecart.c
+++ b/src/object/minecart.c
@@ -4,7 +4,6 @@
*
* @brief Minecart object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "hitbox.h"
#include "object.h"
@@ -85,9 +84,9 @@ void Minecart_Action1(MinecartEntity* this) {
super->action++;
gPlayerState.jump_status = 0x81;
gPlayerState.flags |= PL_ENTER_MINECART;
- gPlayerEntity.zVelocity = Q_16_16(2.0);
- gPlayerEntity.speed = 0x100;
- gPlayerEntity.flags &= ~PL_MINISH;
+ gPlayerEntity.base.zVelocity = Q_16_16(2.0);
+ gPlayerEntity.base.speed = 0x100;
+ gPlayerEntity.base.flags &= ~PL_MINISH;
ResetActiveItems();
DeleteClones();
SoundReq(SFX_PLY_JUMP);
@@ -99,21 +98,21 @@ void Minecart_Action1(MinecartEntity* this) {
}
void Minecart_Action2(MinecartEntity* this) {
- if (EntityInRectRadius(super, &gPlayerEntity, 2, 2) != 0) {
- gPlayerEntity.x.HALF.HI = super->x.HALF.HI;
- gPlayerEntity.y.HALF.HI = super->y.HALF.HI;
- if (gPlayerEntity.z.HALF.HI > -0x10) {
- if (gPlayerEntity.zVelocity >= 0) {
+ if (EntityInRectRadius(super, &gPlayerEntity.base, 2, 2) != 0) {
+ gPlayerEntity.base.x.HALF.HI = super->x.HALF.HI;
+ gPlayerEntity.base.y.HALF.HI = super->y.HALF.HI;
+ if (gPlayerEntity.base.z.HALF.HI > -0x10) {
+ if (gPlayerEntity.base.zVelocity >= 0) {
return;
}
- gPlayerEntity.animationState = super->animationState << 1;
+ gPlayerEntity.base.animationState = super->animationState << 1;
gPlayerState.flags = (gPlayerState.flags ^ PL_ENTER_MINECART) | PL_IN_MINECART;
super->action++;
super->subtimer = 1;
super->flags |= ENT_PERSIST;
super->hitType = 0x97;
- super->collisionFlags = (gPlayerEntity.collisionFlags + 1) | 0x20;
- super->flags2 = gPlayerEntity.flags2;
+ super->collisionFlags = (gPlayerEntity.base.collisionFlags + 1) | 0x20;
+ super->flags2 = gPlayerEntity.base.flags2;
super->hurtType = 0x18;
super->damage = 8;
sub_0801766C(super);
@@ -121,10 +120,10 @@ void Minecart_Action2(MinecartEntity* this) {
SoundReq(SFX_137);
}
} else {
- gPlayerEntity.direction = GetFacingDirection(&gPlayerEntity, super);
+ gPlayerEntity.base.direction = GetFacingDirection(&gPlayerEntity.base, super);
}
- if (gPlayerEntity.zVelocity < 0) {
- gPlayerEntity.spritePriority.b0 = super->spritePriority.b0 - 1;
+ if (gPlayerEntity.base.zVelocity < 0) {
+ gPlayerEntity.base.spritePriority.b0 = super->spritePriority.b0 - 1;
}
}
@@ -140,20 +139,20 @@ void Minecart_Action3(MinecartEntity* this) {
return;
}
- if ((gPlayerEntity.frame & 0xf) == 0) {
+ if ((gPlayerEntity.base.frame & 0xf) == 0) {
COLLISION_OFF(super);
- CopyPosition(super, &gPlayerEntity);
- if ((gPlayerEntity.frame & 0xf0) == 0x10) {
+ CopyPosition(super, &gPlayerEntity.base);
+ if ((gPlayerEntity.base.frame & 0xf0) == 0x10) {
super->spriteOffsetY = 1;
} else {
super->spriteOffsetY = 0;
}
} else {
COLLISION_ON(super);
- gPlayerEntity.speed = 0;
+ gPlayerEntity.base.speed = 0;
LinearMoveUpdate(super);
- CopyPosition(super, &gPlayerEntity);
- gPlayerEntity.spritePriority.b0 = super->spritePriority.b0 - 1;
+ CopyPosition(super, &gPlayerEntity.base);
+ gPlayerEntity.base.spritePriority.b0 = super->spritePriority.b0 - 1;
if (!sub_08091DDC(this)) {
if ((gRoomTransition.frameCount & 0xf) == 0) {
SoundReq(SFX_138);
@@ -182,11 +181,11 @@ void Minecart_Action3(MinecartEntity* this) {
sub_08017744(super);
gPlayerState.jump_status = 0x41;
gPlayerState.flags = (gPlayerState.flags ^ PL_IN_MINECART) | PL_ENTER_MINECART;
- gPlayerEntity.zVelocity = Q_16_16(2.0);
- gPlayerEntity.speed = 0x200;
- gPlayerEntity.animationState = super->animationState << 1;
- gPlayerEntity.direction = super->direction;
- gPlayerEntity.flags |= PL_MINISH;
+ gPlayerEntity.base.zVelocity = Q_16_16(2.0);
+ gPlayerEntity.base.speed = 0x200;
+ gPlayerEntity.base.animationState = super->animationState << 1;
+ gPlayerEntity.base.direction = super->direction;
+ gPlayerEntity.base.flags |= PL_MINISH;
sub_08004168(super);
InitAnimationForceUpdate(super, super->animationState + 0xc);
SoundReq(SFX_PLY_VO4);
@@ -202,14 +201,14 @@ void Minecart_Action3(MinecartEntity* this) {
case 0x6f:
if (uVar3 == GetTileUnderEntity(super)) {
Minecart_Action4(this);
- gPlayerEntity.animationState = super->animationState << 1;
+ gPlayerEntity.base.animationState = super->animationState << 1;
return;
}
break;
}
}
- gPlayerEntity.animationState = super->animationState << 1;
+ gPlayerEntity.base.animationState = super->animationState << 1;
if (super->animIndex == super->animationState) {
UpdateAnimationSingleFrame(super);
} else {
@@ -221,7 +220,7 @@ void Minecart_Action3(MinecartEntity* this) {
void Minecart_Action4(MinecartEntity* this) {
sub_08004168(super);
- CopyPosition(super, &gPlayerEntity);
+ CopyPosition(super, &gPlayerEntity.base);
switch (GetTileUnderEntity(super)) {
case 0x67:
if (super->direction == DirectionWest) {
@@ -265,16 +264,16 @@ void Minecart_Action4(MinecartEntity* this) {
}
super->action = 3;
- gPlayerEntity.animationState = super->animationState << 1;
+ gPlayerEntity.base.animationState = super->animationState << 1;
}
void Minecart_Action5(MinecartEntity* this) {
LinearMoveUpdate(super);
- CopyPosition(super, &gPlayerEntity);
+ CopyPosition(super, &gPlayerEntity.base);
if (gRoomControls.reload_flags == 0) {
super->action = 3;
super->speed = 0x700;
- gRoomControls.camera_target = &gPlayerEntity;
+ gRoomControls.camera_target = &gPlayerEntity.base;
}
}
@@ -294,7 +293,7 @@ void Minecart_Action6(MinecartEntity* this) {
SetTile(0x4022, COORD_TO_TILE(super), super->collisionLayer);
} else {
UpdateAnimationSingleFrame(super);
- gPlayerEntity.spritePriority.b0 = super->spritePriority.b0 - 1;
+ gPlayerEntity.base.spritePriority.b0 = super->spritePriority.b0 - 1;
}
}
@@ -314,7 +313,7 @@ bool32 sub_08091DDC(MinecartEntity* this) {
static const s8 gUnk_081223D0[] = { 0, -8, 8, 0, 0, 8, -8, 0 };
if ((sub_080B1AF0(super, gUnk_081223D0[super->animationState * 2], gUnk_081223D0[super->animationState * 2 + 1]) ==
0xff) &&
- (sub_0807BD14(&gPlayerEntity, super->animationState))) {
+ (sub_0807BD14(&gPlayerEntity.base, super->animationState))) {
super->updatePriority = 6;
super->action = 5;
switch (super->direction) {
@@ -325,7 +324,7 @@ bool32 sub_08091DDC(MinecartEntity* this) {
super->speed = 0xa0;
break;
}
- gPlayerEntity.direction = super->direction;
+ gPlayerEntity.base.direction = super->direction;
gRoomControls.camera_target = super;
return 1;
} else {
diff --git a/src/object/minecartDoor.c b/src/object/minecartDoor.c
index a6746467..6c70abd8 100644
--- a/src/object/minecartDoor.c
+++ b/src/object/minecartDoor.c
@@ -4,7 +4,6 @@
*
* @brief Minecart Door object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "object.h"
@@ -99,7 +98,7 @@ void MinecartDoor_Action3(MinecartDoorEntity* this) {
return;
}
if ((gPlayerState.flags & PL_IN_MINECART) != 0) {
- if (super->type * 2 - (u32)gPlayerEntity.animationState == 0) {
+ if (super->type * 2 - (u32)gPlayerEntity.base.animationState == 0) {
if (sub_08083734(super, super->type) == 0) {
return;
}
@@ -132,15 +131,15 @@ bool32 sub_08096CEC(MinecartDoorEntity* this) {
return TRUE;
} else {
if ((gPlayerState.flags & PL_IN_MINECART) != 0) {
- Entity* player = &gPlayerEntity;
+ Entity* player = &gPlayerEntity.base;
if ((((super->type << 1) ^ player->animationState) & 2) == 0) {
if ((super->type & 1) != 0) {
- if (sub_08096D68(gPlayerEntity.y.HALF.HI, super->y.HALF.HI, gPlayerEntity.x.HALF.HI,
+ if (sub_08096D68(gPlayerEntity.base.y.HALF.HI, super->y.HALF.HI, gPlayerEntity.base.x.HALF.HI,
super->x.HALF.HI)) {
return TRUE;
}
} else {
- if (sub_08096D68(gPlayerEntity.x.HALF.HI, super->x.HALF.HI, gPlayerEntity.y.HALF.HI,
+ if (sub_08096D68(gPlayerEntity.base.x.HALF.HI, super->x.HALF.HI, gPlayerEntity.base.y.HALF.HI,
super->y.HALF.HI)) {
return TRUE;
}
@@ -162,22 +161,22 @@ bool32 sub_08096D68(s32 param_1, s32 param_2, s32 param_3, s32 param_4) {
bool32 sub_08096D84(MinecartDoorEntity* this) {
switch (super->type) {
case 0:
- if (((super->y.HALF.HI + 10) - (gPlayerEntity.y.HALF.HI)) < 0x65U) {
+ if (((super->y.HALF.HI + 10) - (gPlayerEntity.base.y.HALF.HI)) < 0x65U) {
return TRUE;
}
break;
case 1:
- if (((gPlayerEntity.x.HALF.HI) - (super->x.HALF.HI - 10)) < 0x65U) {
+ if (((gPlayerEntity.base.x.HALF.HI) - (super->x.HALF.HI - 10)) < 0x65U) {
return TRUE;
}
break;
case 2:
- if (((gPlayerEntity.y.HALF.HI) - (super->y.HALF.HI - 10)) < 0x65U) {
+ if (((gPlayerEntity.base.y.HALF.HI) - (super->y.HALF.HI - 10)) < 0x65U) {
return TRUE;
}
break;
case 3:
- if (((super->x.HALF.HI + 10) - (gPlayerEntity.x.HALF.HI)) < 0x65U) {
+ if (((super->x.HALF.HI + 10) - (gPlayerEntity.base.x.HALF.HI)) < 0x65U) {
return TRUE;
}
break;
diff --git a/src/object/mineralWaterSource.c b/src/object/mineralWaterSource.c
index 56667b11..e60006d8 100644
--- a/src/object/mineralWaterSource.c
+++ b/src/object/mineralWaterSource.c
@@ -4,7 +4,6 @@
*
* @brief Mineral Water Source object
*/
-#define NENT_DEPRECATED
#include "object.h"
void MineralWaterSource_Init(Entity*);
diff --git a/src/object/minishEmoticon.c b/src/object/minishEmoticon.c
index 279c66e4..147ca51d 100644
--- a/src/object/minishEmoticon.c
+++ b/src/object/minishEmoticon.c
@@ -4,7 +4,6 @@
*
* @brief Minish Emoticon object
*/
-#define NENT_DEPRECATED
#include "entity.h"
#include "functions.h"
@@ -38,7 +37,7 @@ void MinishEmoticon_Action1(Entity* this) {
if ((gPlayerState.flags & PL_MINISH) == 0) {
DeleteThisEntity();
}
- playerEnt = &gPlayerEntity;
+ playerEnt = &gPlayerEntity.base;
sub_08079BD8(this);
this->spriteOrientation.flipY = 1;
this->palette.b.b0 = playerEnt->palette.b.b0;
diff --git a/src/object/minishLight.c b/src/object/minishLight.c
index 36569b66..382056ee 100644
--- a/src/object/minishLight.c
+++ b/src/object/minishLight.c
@@ -4,7 +4,6 @@
*
* @brief Minish Light object
*/
-#define NENT_DEPRECATED
#include "entity.h"
void MinishLight_Init(Entity*);
diff --git a/src/object/minishPortalCloseup.c b/src/object/minishPortalCloseup.c
index e683e3bc..e9ded723 100644
--- a/src/object/minishPortalCloseup.c
+++ b/src/object/minishPortalCloseup.c
@@ -4,7 +4,6 @@
*
* @brief Minish Portal Closeup object
*/
-#define NENT_DEPRECATED
#include "area.h"
#include "functions.h"
#include "main.h"
diff --git a/src/object/minishPortalStone.c b/src/object/minishPortalStone.c
index 5dc4bfcf..929f65ac 100644
--- a/src/object/minishPortalStone.c
+++ b/src/object/minishPortalStone.c
@@ -4,7 +4,6 @@
*
* @brief Minish Portal Stone object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "object.h"
#include "screen.h"
diff --git a/src/object/minishSizedArchway.c b/src/object/minishSizedArchway.c
index e92e6fef..01a81cfc 100644
--- a/src/object/minishSizedArchway.c
+++ b/src/object/minishSizedArchway.c
@@ -4,7 +4,6 @@
*
* @brief Minish Sized Archway object
*/
-#define NENT_DEPRECATED
#include "entity.h"
#include "game.h"
diff --git a/src/object/minishSizedEntrance.c b/src/object/minishSizedEntrance.c
index d63eba55..cbe61fc8 100644
--- a/src/object/minishSizedEntrance.c
+++ b/src/object/minishSizedEntrance.c
@@ -4,7 +4,6 @@
*
* @brief MinishSizedEntrance object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "game.h"
#include "object.h"
@@ -46,8 +45,9 @@ void MinishSizedEntrance_Action1(Entity* this) {
DeleteThisEntity();
}
}
- if ((gPlayerState.flags & PL_MINISH) && EntityInRectRadius(this, &gPlayerEntity, 4, 4) &&
- (gPlayerEntity.z.HALF.HI == 0) && (((u16)gPlayerState.playerInput.heldInput) & gUnk_0812225C[this->type2])) {
+ if ((gPlayerState.flags & PL_MINISH) && EntityInRectRadius(this, &gPlayerEntity.base, 4, 4) &&
+ (gPlayerEntity.base.z.HALF.HI == 0) &&
+ (((u16)gPlayerState.playerInput.heldInput) & gUnk_0812225C[this->type2])) {
DoExitTransition(GetCurrentRoomProperty(this->timer));
}
}
diff --git a/src/object/minishVillageObject.c b/src/object/minishVillageObject.c
index dbefdeb9..ef5c9780 100644
--- a/src/object/minishVillageObject.c
+++ b/src/object/minishVillageObject.c
@@ -4,7 +4,6 @@
*
* @brief Minish Village Object object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "object.h"
#include "screen.h"
diff --git a/src/object/moleMittsParticle.c b/src/object/moleMittsParticle.c
index 02f3e72e..125a679d 100644
--- a/src/object/moleMittsParticle.c
+++ b/src/object/moleMittsParticle.c
@@ -4,7 +4,6 @@
*
* @brief Mole Mitts Particle object
*/
-#define NENT_DEPRECATED
#include "area.h"
#include "functions.h"
#include "object.h"
@@ -27,7 +26,7 @@ void MoleMittsParticle_Init(Entity* this) {
u32 palette;
this->action = 1;
- this->animationState = gPlayerEntity.animationState >> 1;
+ this->animationState = gPlayerEntity.base.animationState >> 1;
this->spriteRendering.b3 = 2;
this->spritePriority.b0 = 3;
this->spriteOrientation.flipY--;
@@ -73,7 +72,7 @@ void MoleMittsParticle_Action1(Entity* this) {
DeleteThisEntity();
}
if (this->type2 != 0) {
- this->spritePriority.b0 = gPlayerEntity.spritePriority.b0 + 1 - this->frame;
+ this->spritePriority.b0 = gPlayerEntity.base.spritePriority.b0 + 1 - this->frame;
}
}
diff --git a/src/object/mulldozerSpawnPoint.c b/src/object/mulldozerSpawnPoint.c
index 17a33331..8ba4d3b0 100644
--- a/src/object/mulldozerSpawnPoint.c
+++ b/src/object/mulldozerSpawnPoint.c
@@ -4,7 +4,6 @@
*
* @brief Mulldozer Spawn Point object
*/
-#define NENT_DEPRECATED
#include "entity.h"
#include "sound.h"
diff --git a/src/object/object1D.c b/src/object/object1D.c
index 4252f9b0..0635d64c 100644
--- a/src/object/object1D.c
+++ b/src/object/object1D.c
@@ -4,7 +4,6 @@
*
* @brief Object1D object
*/
-#define NENT_DEPRECATED
#include "entity.h"
void Object1D_Init(Entity*);
diff --git a/src/object/object1F.c b/src/object/object1F.c
index bff26637..1843e02e 100644
--- a/src/object/object1F.c
+++ b/src/object/object1F.c
@@ -4,7 +4,6 @@
*
* @brief Object1F object
*/
-#define NENT_DEPRECATED
#include "asm.h"
#include "effects.h"
#include "entity.h"
@@ -59,7 +58,7 @@ void Object1F_Init(Object1FEntity* this) {
temp = gUnk_08120A18[super->subtimer].unk1;
super->palette.b.b0 = temp;
this->unk6c = gUnk_08120A18[super->subtimer].unk2;
- super->collisionLayer = gPlayerEntity.collisionLayer;
+ super->collisionLayer = gPlayerEntity.base.collisionLayer;
super->speed = 0x100;
InitializeAnimation(super, gUnk_08120A18[super->subtimer].animationState);
}
diff --git a/src/object/object30.c b/src/object/object30.c
index 446d2bf6..61b3448f 100644
--- a/src/object/object30.c
+++ b/src/object/object30.c
@@ -4,7 +4,6 @@
*
* @brief Object30 object
*/
-#define NENT_DEPRECATED
#include "collision.h"
#include "functions.h"
#include "item.h"
diff --git a/src/object/object37.c b/src/object/object37.c
index 619f8482..35f32e93 100644
--- a/src/object/object37.c
+++ b/src/object/object37.c
@@ -4,7 +4,6 @@
*
* @brief Object37 object
*/
-#define NENT_DEPRECATED
#include "entity.h"
#include "functions.h"
#include "item.h"
@@ -47,7 +46,7 @@ void Object37_Action1(Object37Entity* this) {
if ((gSave.kinstones.fusionUnmarked[0] != 0) && (this->unk70 != *this->unk78)) {
item = CreateGroundItem(super, ITEM_RUPEE100, 0);
if (item != 0) {
- item->direction = gPlayerEntity.animationState << 2;
+ item->direction = gPlayerEntity.base.animationState << 2;
item->speed = 0x80;
item->zVelocity = Q_16_16(2.0);
}
diff --git a/src/object/object53.c b/src/object/object53.c
index e7716e64..e00e9ef2 100644
--- a/src/object/object53.c
+++ b/src/object/object53.c
@@ -4,7 +4,6 @@
*
* @brief Object53 object
*/
-#define NENT_DEPRECATED
#include "asm.h"
#include "entity.h"
#include "functions.h"
diff --git a/src/object/object63.c b/src/object/object63.c
index b87c79f6..bbf74160 100644
--- a/src/object/object63.c
+++ b/src/object/object63.c
@@ -4,7 +4,6 @@
*
* @brief Object63 object
*/
-#define NENT_DEPRECATED
#include "asm.h"
#include "entity.h"
#include "functions.h"
diff --git a/src/object/object70.c b/src/object/object70.c
index efe82743..f9017446 100644
--- a/src/object/object70.c
+++ b/src/object/object70.c
@@ -4,7 +4,6 @@
*
* @brief Object70 object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "object.h"
@@ -25,9 +24,9 @@ void Object70_Init(Entity* this) {
this->frameIndex = this->type + 0xb;
if (this->type != 0) {
sub_08004168(this);
- gPlayerEntity.spriteOrientation.flipY = 3;
- if ((gPlayerEntity.spritePriority.b0) != 7) {
- this->spritePriority.b0 = gPlayerEntity.spritePriority.b0 + 1;
+ gPlayerEntity.base.spriteOrientation.flipY = 3;
+ if ((gPlayerEntity.base.spritePriority.b0) != 7) {
+ this->spritePriority.b0 = gPlayerEntity.base.spritePriority.b0 + 1;
} else {
this->spritePriority.b0 = 7;
}
@@ -37,23 +36,23 @@ void Object70_Init(Entity* this) {
void Object70_Action1(Entity* this) {
if (this->type == 0) {
- if (gPlayerEntity.z.WORD != 0 || (gPlayerState.dash_state & 0x40) != 0 ||
+ if (gPlayerEntity.base.z.WORD != 0 || (gPlayerState.dash_state & 0x40) != 0 ||
gPlayerState.floor_type != SURFACE_SWAMP ||
- (gPlayerEntity.action != PLAYER_NORMAL && gPlayerEntity.action != PLAYER_ROLL &&
- gPlayerEntity.action != PLAYER_JUMP)) {
- if (gPlayerEntity.z.WORD == 0) {
- CreateFx(&gPlayerEntity, FX_GREEN_SPLASH, 0);
+ (gPlayerEntity.base.action != PLAYER_NORMAL && gPlayerEntity.base.action != PLAYER_ROLL &&
+ gPlayerEntity.base.action != PLAYER_JUMP)) {
+ if (gPlayerEntity.base.z.WORD == 0) {
+ CreateFx(&gPlayerEntity.base, FX_GREEN_SPLASH, 0);
}
- gPlayerEntity.spriteOrientation.flipY = 2;
+ gPlayerEntity.base.spriteOrientation.flipY = 2;
DeleteThisEntity();
}
- this->x = gPlayerEntity.x;
- this->y = gPlayerEntity.y;
+ this->x = gPlayerEntity.base.x;
+ this->y = gPlayerEntity.base.y;
if (gPlayerState.jump_status == 0) {
- gPlayerEntity.spriteOrientation.flipY = 3;
- if (gPlayerEntity.spritePriority.b0 != 7) {
- this->spritePriority.b0 = gPlayerEntity.spritePriority.b0 + 1;
+ gPlayerEntity.base.spriteOrientation.flipY = 3;
+ if (gPlayerEntity.base.spritePriority.b0 != 7) {
+ this->spritePriority.b0 = gPlayerEntity.base.spritePriority.b0 + 1;
} else {
this->spritePriority.b0 = 7;
}
@@ -61,11 +60,11 @@ void Object70_Action1(Entity* this) {
return;
}
- if (gPlayerEntity.action != PLAYER_USEENTRANCE) {
+ if (gPlayerEntity.base.action != PLAYER_USEENTRANCE) {
if (this->collisionLayer == 1) {
- gPlayerEntity.spriteOrientation.flipY = 2;
+ gPlayerEntity.base.spriteOrientation.flipY = 2;
} else {
- gPlayerEntity.spriteOrientation.flipY = 1;
+ gPlayerEntity.base.spriteOrientation.flipY = 1;
}
DeleteThisEntity();
}
diff --git a/src/object/objectA.c b/src/object/objectA.c
index aad2385c..2d4eb4c3 100644
--- a/src/object/objectA.c
+++ b/src/object/objectA.c
@@ -4,7 +4,6 @@
*
* @brief ObjectA object
*/
-#define NENT_DEPRECATED
#include "entity.h"
#include "flags.h"
#include "functions.h"
diff --git a/src/object/objectA2.c b/src/object/objectA2.c
index 4f9c55cb..5aca031b 100644
--- a/src/object/objectA2.c
+++ b/src/object/objectA2.c
@@ -4,7 +4,6 @@
*
* @brief Object A2 object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "menu.h"
#include "object.h"
diff --git a/src/object/objectA7.c b/src/object/objectA7.c
index a711d644..bf8cc69e 100644
--- a/src/object/objectA7.c
+++ b/src/object/objectA7.c
@@ -4,7 +4,6 @@
*
* @brief Object A7 object
*/
-#define NENT_DEPRECATED
#include "entity.h"
void ObjectA7(Entity* this) {
diff --git a/src/object/objectA8.c b/src/object/objectA8.c
index 819495d4..4de9ccae 100644
--- a/src/object/objectA8.c
+++ b/src/object/objectA8.c
@@ -4,7 +4,6 @@
*
* @brief ObjectA8 object
*/
-#define NENT_DEPRECATED
#include "collision.h"
#include "functions.h"
#include "hitbox.h"
@@ -55,7 +54,7 @@ void ObjectA8(ObjectA8Entity* this) {
case 0x1e:
case 0x1f:
super->action = 5;
- super->child = &gPlayerEntity;
+ super->child = &gPlayerEntity.base;
CreateItemEntity(super->type, 0, 0);
DeleteThisEntity();
}
@@ -131,7 +130,7 @@ void ObjectA8_Action2Subaction2(ObjectA8Entity* this) {
if (sub_0806F3E4(super)) {
super->flags &= ~ENT_COLLIDE;
super->action = 5;
- super->child = &gPlayerEntity;
+ super->child = &gPlayerEntity.base;
GiveItem(super->type, 0);
}
}
@@ -175,7 +174,7 @@ void ObjectA8_Action4(ObjectA8Entity* this) {
} else {
CopyPosition(super->child, super);
super->z.HALF.HI--;
- if (IsColliding(super, &gPlayerEntity)) {
+ if (IsColliding(super, &gPlayerEntity.base)) {
sub_0809FECC(this);
GiveItem(super->type, 0);
}
@@ -239,7 +238,7 @@ bool32 sub_0809FE9C(ObjectA8Entity* this) {
}
void sub_0809FECC(ObjectA8Entity* this) {
- super->child = &gPlayerEntity;
+ super->child = &gPlayerEntity.base;
super->action = 5;
super->subAction = 0;
}
diff --git a/src/object/objectBF.c b/src/object/objectBF.c
index 0c884d18..a66a2b61 100644
--- a/src/object/objectBF.c
+++ b/src/object/objectBF.c
@@ -4,7 +4,6 @@
*
* @brief Object BF object
*/
-#define NENT_DEPRECATED
#include "entity.h"
void ObjectBF(Entity* this) {
diff --git a/src/object/objectBlockingStairs.c b/src/object/objectBlockingStairs.c
index 18234b59..b35f6777 100644
--- a/src/object/objectBlockingStairs.c
+++ b/src/object/objectBlockingStairs.c
@@ -4,7 +4,6 @@
*
* @brief Object Blocking Stairs object
*/
-#define NENT_DEPRECATED
#include "asm.h"
#include "effects.h"
#include "entity.h"
@@ -87,7 +86,7 @@ void ObjectBlockingStairs_Action1(ObjectBlockingStairsEntity* this) {
int xDist;
Entity* ent;
- xDist = (int)gPlayerEntity.x.HALF.HI - super->x.HALF.HI;
+ xDist = (int)gPlayerEntity.base.x.HALF.HI - super->x.HALF.HI;
if (this->objFlags) {
if (!CheckFlags(this->objFlags)) {
@@ -117,7 +116,7 @@ void ObjectBlockingStairs_Action1(ObjectBlockingStairsEntity* this) {
case 0x4030:
case 0x4031:
super->action = 3;
- super->direction = Direction8FromAnimationState(gPlayerEntity.animationState);
+ super->direction = Direction8FromAnimationState(gPlayerEntity.base.animationState);
super->speed = 0x80;
super->timer = 64;
RequestPriorityDuration(super, 80);
@@ -126,7 +125,7 @@ void ObjectBlockingStairs_Action1(ObjectBlockingStairsEntity* this) {
return;
}
- if ((gPlayerEntity.animationState & 2) == 0) {
+ if ((gPlayerEntity.base.animationState & 2) == 0) {
return;
}
RegisterCarryEntity(super);
@@ -160,13 +159,13 @@ void ObjectBlockingStairs_Action2(ObjectBlockingStairsEntity* this) {
sub_08093280(this);
} else {
if (gPlayerState.heldObject == 0x12) {
- if ((gPlayerEntity.frame & 2) != 0 && ++super->subtimer > 8) {
+ if ((gPlayerEntity.base.frame & 2) != 0 && ++super->subtimer > 8) {
gPlayerState.queued_action = PLAYER_PULL;
gPlayerState.field_0x38 = 0x40;
gPlayerState.flags |= PL_BUSY;
- gPlayerEntity.x.HALF.LO = 0;
- gPlayerEntity.y.HALF.LO = 0;
- super->direction = (gPlayerEntity.animationState ^ 4) << 2;
+ gPlayerEntity.base.x.HALF.LO = 0;
+ gPlayerEntity.base.y.HALF.LO = 0;
+ super->direction = (gPlayerEntity.base.animationState ^ 4) << 2;
super->timer = 64;
EnqueueSFX(SFX_10F);
sub_08093248(this);
diff --git a/src/object/objectOnPillar.c b/src/object/objectOnPillar.c
index 6f3381dc..7815dd74 100644
--- a/src/object/objectOnPillar.c
+++ b/src/object/objectOnPillar.c
@@ -4,7 +4,6 @@
*
* @brief Object on Pillar object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "hitbox.h"
#include "object.h"
@@ -122,17 +121,17 @@ void ObjectOnPillar_SubAction0(ObjectOnPillarEntity* this) {
const s8* ptr;
if (this->unk_72 == 0) {
this->unk_72 = 1;
- ptr = &gUnk_08123274[gPlayerEntity.animationState];
- PositionRelative(super, &gPlayerEntity, ptr[0] << 0x10, ptr[1] << 0x10);
+ ptr = &gUnk_08123274[gPlayerEntity.base.animationState];
+ PositionRelative(super, &gPlayerEntity.base, ptr[0] << 0x10, ptr[1] << 0x10);
}
sub_08097008(this);
if (sub_080896B0()) {
gPlayerState.queued_action = PLAYER_PULL;
gPlayerState.field_0x38 = 0x20;
gPlayerState.flags |= PL_BUSY;
- gPlayerEntity.x.HALF.LO = 0;
- gPlayerEntity.y.HALF.LO = 0;
- super->direction = ((gPlayerEntity.animationState ^ 4) << 2);
+ gPlayerEntity.base.x.HALF.LO = 0;
+ gPlayerEntity.base.y.HALF.LO = 0;
+ super->direction = ((gPlayerEntity.base.animationState ^ 4) << 2);
sub_08097098(this);
}
}
diff --git a/src/object/objectOnSpinyBeetle.c b/src/object/objectOnSpinyBeetle.c
index 8c6beccf..17597f8f 100644
--- a/src/object/objectOnSpinyBeetle.c
+++ b/src/object/objectOnSpinyBeetle.c
@@ -4,7 +4,6 @@
*
* @brief Object on Spiny Beetle object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "object.h"
@@ -139,7 +138,7 @@ void ObjectOnSpinyBeetle_Action2Subaction0(ObjectOnSpinyBeetleEntity* this) {
super->flags |= ENT_COLLIDE;
super->collisionFlags = 7;
super->hitType = 1;
- super->flags2 = gPlayerEntity.flags2;
+ super->flags2 = gPlayerEntity.base.flags2;
super->spriteOffsetY = 0;
(super->parent)->child = NULL;
super->subAction++;
diff --git a/src/object/octorokBossObject.c b/src/object/octorokBossObject.c
index 1410d0d1..ddab7bce 100644
--- a/src/object/octorokBossObject.c
+++ b/src/object/octorokBossObject.c
@@ -4,7 +4,6 @@
*
* @brief Octorok Boss Object object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "game.h"
#include "object.h"
@@ -318,7 +317,7 @@ void OctorokBossObject_Action1(OctorokBossObjectEntity* this) {
case 9:
PausePlayer();
if ((this->unk_78.WORD_U)-- == 0) {
- gRoomControls.camera_target = &gPlayerEntity;
+ gRoomControls.camera_target = &gPlayerEntity.base;
DeleteThisEntity();
}
break;
diff --git a/src/object/palaceArchway.c b/src/object/palaceArchway.c
index b7240a49..4f545bef 100644
--- a/src/object/palaceArchway.c
+++ b/src/object/palaceArchway.c
@@ -4,7 +4,6 @@
*
* @brief Palace Archway object
*/
-#define NENT_DEPRECATED
#include "object.h"
void PalaceArchway_Init(Entity*);
diff --git a/src/object/paper.c b/src/object/paper.c
index a3b515ee..62e49ff7 100644
--- a/src/object/paper.c
+++ b/src/object/paper.c
@@ -4,7 +4,6 @@
*
* @brief Paper object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "object.h"
@@ -67,7 +66,8 @@ void Paper_Type2(Entity* this) {
void Paper_Action1(Entity* this) {
if (this->type == 0) {
- if ((gPlayerEntity.y.HALF.HI < this->y.HALF.HI) || (gPlayerEntity.y.HALF.HI) > this->y.HALF.HI + 0x18) {
+ if ((gPlayerEntity.base.y.HALF.HI < this->y.HALF.HI) ||
+ (gPlayerEntity.base.y.HALF.HI) > this->y.HALF.HI + 0x18) {
this->spriteRendering.b3 = 1;
} else {
this->spriteRendering.b3 = 2;
diff --git a/src/object/parallaxRoomView.c b/src/object/parallaxRoomView.c
index bd08c984..49be0837 100644
--- a/src/object/parallaxRoomView.c
+++ b/src/object/parallaxRoomView.c
@@ -4,7 +4,6 @@
*
* @brief Parallax Room View object
*/
-#define NENT_DEPRECATED
#include "entity.h"
#include "room.h"
diff --git a/src/object/picoBloom.c b/src/object/picoBloom.c
index 085295e4..157e344c 100644
--- a/src/object/picoBloom.c
+++ b/src/object/picoBloom.c
@@ -4,7 +4,6 @@
*
* @brief Pico Bloom object
*/
-#define NENT_DEPRECATED
#include "asm.h"
#include "entity.h"
#include "sound.h"
diff --git a/src/object/pinwheel.c b/src/object/pinwheel.c
index e98c5144..35d161a8 100644
--- a/src/object/pinwheel.c
+++ b/src/object/pinwheel.c
@@ -4,7 +4,6 @@
*
* @brief Pinwheel object
*/
-#define NENT_DEPRECATED
#include "entity.h"
#include "flags.h"
#include "object.h"
diff --git a/src/object/playerClone.c b/src/object/playerClone.c
index 56a3c8bf..36c4dd8b 100644
--- a/src/object/playerClone.c
+++ b/src/object/playerClone.c
@@ -4,7 +4,6 @@
*
* @brief Player Clone object
*/
-#define NENT_DEPRECATED
#include "asm.h"
#include "collision.h"
#include "effects.h"
@@ -73,8 +72,8 @@ void PlayerClone_Action1(PlayerCloneEntity* this) {
super->updatePriority = 6;
super->hitbox = (Hitbox*)&PlayerCloneHitbox;
super->subtimer = (super->type + 1) * 15;
- this->unk78 = super->x.HALF.HI - gPlayerEntity.x.HALF.HI;
- this->unk7a = super->y.HALF.HI - gPlayerEntity.y.HALF.HI;
+ this->unk78 = super->x.HALF.HI - gPlayerEntity.base.x.HALF.HI;
+ this->unk7a = super->y.HALF.HI - gPlayerEntity.base.y.HALF.HI;
if ((this->unk78 != 0) && (this->unk7a != 0)) {
((PlayerCloneEntity*)gPlayerClones[super->type])->unk70 = 1;
}
@@ -107,13 +106,13 @@ void PlayerClone_Action2(PlayerCloneEntity* this) {
if (gPlayerState.chargeState.action == 5 && gPlayerClones[super->type] != NULL &&
gPlayerState.framestate != PL_STATE_TALKEZLO && super->health != 0) {
- if (gPlayerEntity.iframes >= 1) {
+ if (gPlayerEntity.base.iframes >= 1) {
gPlayerState.chargeState.action = 1;
} else {
GetTileUnderEntity(super);
sub_08084B1C(this);
- super->x.HALF.HI = gPlayerEntity.x.HALF.HI + this->unk78;
- super->y.HALF.HI = gPlayerEntity.y.HALF.HI + this->unk7a;
+ super->x.HALF.HI = gPlayerEntity.base.x.HALF.HI + this->unk78;
+ super->y.HALF.HI = gPlayerEntity.base.y.HALF.HI + this->unk7a;
sub_08084CAC(this);
sub_080085B0(super);
if ((super->collisions & (COL_NORTH_FULL | COL_SOUTH_FULL | COL_EAST_FULL | COL_WEST_FULL)) !=
@@ -152,22 +151,22 @@ void PlayerClone_Action2(PlayerCloneEntity* this) {
}
void sub_08084B1C(PlayerCloneEntity* this) {
- super->flags = gPlayerEntity.flags;
- super->spriteVramOffset = gPlayerEntity.spriteVramOffset;
- super->frameIndex = gPlayerEntity.frameIndex;
- super->frameSpriteSettings = gPlayerEntity.frameSpriteSettings;
- super->spriteIndex = gPlayerEntity.spriteIndex;
- super->direction = gPlayerEntity.direction;
- super->animationState = gPlayerEntity.animationState;
- super->spriteSettings.flipX = gPlayerEntity.spriteSettings.flipX;
- super->spriteRendering.b3 = gPlayerEntity.spriteRendering.b3;
- super->spritePriority.b0 = gPlayerEntity.spritePriority.b0;
- super->spriteOrientation.flipY = gPlayerEntity.spriteOrientation.flipY;
- super->collisionLayer = gPlayerEntity.collisionLayer;
- super->flags2 = gPlayerEntity.flags2;
- super->hitType = gPlayerEntity.hitType;
- super->collisionFlags = gPlayerEntity.collisionFlags;
- super->hurtType = gPlayerEntity.hurtType;
+ super->flags = gPlayerEntity.base.flags;
+ super->spriteVramOffset = gPlayerEntity.base.spriteVramOffset;
+ super->frameIndex = gPlayerEntity.base.frameIndex;
+ super->frameSpriteSettings = gPlayerEntity.base.frameSpriteSettings;
+ super->spriteIndex = gPlayerEntity.base.spriteIndex;
+ super->direction = gPlayerEntity.base.direction;
+ super->animationState = gPlayerEntity.base.animationState;
+ super->spriteSettings.flipX = gPlayerEntity.base.spriteSettings.flipX;
+ super->spriteRendering.b3 = gPlayerEntity.base.spriteRendering.b3;
+ super->spritePriority.b0 = gPlayerEntity.base.spritePriority.b0;
+ super->spriteOrientation.flipY = gPlayerEntity.base.spriteOrientation.flipY;
+ super->collisionLayer = gPlayerEntity.base.collisionLayer;
+ super->flags2 = gPlayerEntity.base.flags2;
+ super->hitType = gPlayerEntity.base.hitType;
+ super->collisionFlags = gPlayerEntity.base.collisionFlags;
+ super->hurtType = gPlayerEntity.base.hurtType;
CopyPosition(super, super->child);
if (gPlayerState.attack_status != 0) {
super->child->damage = gPlayerState.item->damage;
diff --git a/src/object/pot.c b/src/object/pot.c
index 93bc1995..388b35cc 100644
--- a/src/object/pot.c
+++ b/src/object/pot.c
@@ -4,7 +4,6 @@
*
* @brief Pot object
*/
-#define NENT_DEPRECATED
#include "entity.h"
#include "flags.h"
#include "functions.h"
@@ -157,7 +156,7 @@ void sub_08082510(PotEntity* this) {
super->hitbox = (Hitbox*)&gUnk_080FD340;
super->collisionFlags = 7;
super->hitType = 1;
- super->flags2 = gPlayerEntity.flags2;
+ super->flags2 = gPlayerEntity.base.flags2;
super->spriteOffsetY = 0;
SetTile((u16)this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
super->subAction++;
@@ -182,7 +181,7 @@ void sub_0808259C(PotEntity* this) {
CreateFx(super, FX_LAVA_SPLASH, 0);
break;
default:
- sub_08082850(this, &gPlayerEntity);
+ sub_08082850(this, &gPlayerEntity.base);
return;
}
diff --git a/src/object/pressurePlate.c b/src/object/pressurePlate.c
index ebb5d3a2..df373091 100644
--- a/src/object/pressurePlate.c
+++ b/src/object/pressurePlate.c
@@ -4,7 +4,6 @@
*
* @brief Pressure Plate object
*/
-#define NENT_DEPRECATED
#include "collision.h"
#include "functions.h"
#include "hitbox.h"
@@ -121,7 +120,7 @@ static u32 get_standing_count(PressurePlateEntity* this) {
num = 0;
if (IsCollidingPlayer(super) != 0) {
- gPlayerEntity.spriteOffsetY = sSpriteOffsets[this->dir];
+ gPlayerEntity.base.spriteOffsetY = sSpriteOffsets[this->dir];
num = 1;
}
if ((gPlayerState.flags & PL_CLONING) != 0) {
diff --git a/src/object/pullableLever.c b/src/object/pullableLever.c
index 4b99f202..991f7c2e 100644
--- a/src/object/pullableLever.c
+++ b/src/object/pullableLever.c
@@ -4,7 +4,6 @@
*
* @brief Pullable Lever object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "hitbox.h"
#include "object.h"
@@ -106,7 +105,7 @@ void PullableLever_HandleAction2(PullableLeverEntity* this) {
void PullableLever_HandleSubAction0(PullableLeverEntity* this) {
u16 y;
u16 x;
- Entity* player = &gPlayerEntity;
+ Entity* player = &gPlayerEntity.base;
if (this->unk_75 == 0) {
if (-player->animationState + super->type2 * 2 == 0) {
@@ -123,7 +122,7 @@ void PullableLever_HandleSubAction0(PullableLeverEntity* this) {
if (player->animationState >> 1 == super->type2) {
if (gPlayerState.framestate == PL_STATE_PULL) {
if (gPlayerState.heldObject & 2) {
- if (gPlayerEntity.frame & 2) {
+ if (gPlayerEntity.base.frame & 2) {
sub_0809153C(this);
if (this->unk_75 == 1) {
this->unk_75 = 2;
@@ -192,15 +191,15 @@ void sub_0809153C(PullableLeverEntity* this) {
s16 diff;
s32 radius;
- Entity* player = &gPlayerEntity;
+ Entity* player = &gPlayerEntity.base;
dir = gUnk_081222C0[super->type2];
if (this->necessaryPullLength <= this->pullLength) {
return;
}
prevX = player->x.HALF.HI;
prevY = player->y.HALF.HI;
- sub_080044AE(&gPlayerEntity, super->speed, dir);
- if ((prevX == gPlayerEntity.x.HALF.HI) && (prevY == gPlayerEntity.y.HALF.HI)) {
+ sub_080044AE(&gPlayerEntity.base, super->speed, dir);
+ if ((prevX == gPlayerEntity.base.x.HALF.HI) && (prevY == gPlayerEntity.base.y.HALF.HI)) {
return;
}
@@ -209,13 +208,13 @@ void sub_0809153C(PullableLeverEntity* this) {
diff = player->y.HALF.HI - prevY;
break;
case 1:
- diff = prevX - gPlayerEntity.x.HALF.HI;
+ diff = prevX - gPlayerEntity.base.x.HALF.HI;
break;
case 2:
- diff = prevY - gPlayerEntity.y.HALF.HI;
+ diff = prevY - gPlayerEntity.base.y.HALF.HI;
break;
case 3:
- diff = gPlayerEntity.x.HALF.HI - prevX;
+ diff = gPlayerEntity.base.x.HALF.HI - prevX;
break;
}
radius = (diff << 0x18);
diff --git a/src/object/pullableMushroom.c b/src/object/pullableMushroom.c
index 0fd58dcf..63fcdfbb 100644
--- a/src/object/pullableMushroom.c
+++ b/src/object/pullableMushroom.c
@@ -4,7 +4,6 @@
*
* @brief Pullable Mushroom object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "game.h"
#include "hitbox.h"
@@ -270,7 +269,7 @@ void sub_0808AEB0(PullableMushroomEntity* this) {
if ((gPlayerState.playerInput.heldInput & gUnk_081211E4[super->animationState]) != 0) {
GetNextFrame(super);
if (uVar1 < 0x40) {
- sub_080044AE(&gPlayerEntity, 0x40, super->direction);
+ sub_080044AE(&gPlayerEntity.base, 0x40, super->direction);
if (this->unk_7c-- == 0) {
this->unk_7c = 4;
SoundReq(SFX_12F);
@@ -279,29 +278,30 @@ void sub_0808AEB0(PullableMushroomEntity* this) {
super->subtimer = 1;
} else {
- if (((super->subtimer != 0) && (gPlayerEntity.action == PLAYER_NORMAL)) && (gPlayerState.swim_state == 0)) {
+ if (((super->subtimer != 0) && (gPlayerEntity.base.action == PLAYER_NORMAL)) &&
+ (gPlayerState.swim_state == 0)) {
gPlayerState.queued_action = PLAYER_08072C9C;
gPlayerState.field_0x38 = uVar1;
gPlayerState.field_0x39 = super->direction ^ 0x10;
- gPlayerState.field_0x3a = sub_0808B1F0(this, &gPlayerEntity);
+ gPlayerState.field_0x3a = sub_0808B1F0(this, &gPlayerEntity.base);
super->subAction++;
}
}
} else {
super->timer = 1;
this->unk_7c = 1;
- super->animationState = AnimationStateFlip90(gPlayerEntity.animationState >> 1);
+ super->animationState = AnimationStateFlip90(gPlayerEntity.base.animationState >> 1);
super->direction = (super->animationState << 3);
super->flags &= ~0x80;
- super->spriteSettings.flipX = gPlayerEntity.spriteSettings.flipX;
+ super->spriteSettings.flipX = gPlayerEntity.base.spriteSettings.flipX;
InitializeAnimation(super, super->animationState + 5);
if (sub_0808B21C(this, 0)) {
sub_0808B168((PullableMushroomEntity*)super->child, 0);
}
if ((super->animationState & 1) != 0) {
- gPlayerEntity.y.HALF.HI = super->y.HALF.HI;
+ gPlayerEntity.base.y.HALF.HI = super->y.HALF.HI;
} else {
- gPlayerEntity.x.HALF.HI = super->x.HALF.HI;
+ gPlayerEntity.base.x.HALF.HI = super->x.HALF.HI;
}
}
}
@@ -333,9 +333,9 @@ void PullableMushroom_Action3(PullableMushroomEntity* this) {
void sub_0808B05C(PullableMushroomEntity* this) {
if (super->type == 0) {
- super->animationState = AnimationStateFlip90(gPlayerEntity.animationState >> 1);
+ super->animationState = AnimationStateFlip90(gPlayerEntity.base.animationState >> 1);
super->direction = super->animationState << 3;
- super->spriteSettings.flipX = gPlayerEntity.spriteSettings.flipX;
+ super->spriteSettings.flipX = gPlayerEntity.base.spriteSettings.flipX;
super->flags &= ~0x80;
InitializeAnimation(super, super->animationState + 5);
if (sub_0808B21C(this, 1)) {
@@ -356,16 +356,16 @@ void sub_0808B0BC(PullableMushroomEntity* this) {
GetNextFrame(super);
break;
case 1:
- ptr = &gUnk_08126EE4[gPlayerEntity.animationState & 0xe];
- ent.base.x.HALF.HI = ptr[0] + gPlayerEntity.x.HALF.HI;
- ent.base.y.HALF.HI = ptr[1] + gPlayerEntity.y.HALF.HI;
+ ptr = &gUnk_08126EE4[gPlayerEntity.base.animationState & 0xe];
+ ent.base.x.HALF.HI = ptr[0] + gPlayerEntity.base.x.HALF.HI;
+ ent.base.y.HALF.HI = ptr[1] + gPlayerEntity.base.y.HALF.HI;
if (sub_0800419C(&ent.base, super, 7, 7)) {
- if ((gPlayerEntity.action != PLAYER_NORMAL) || (gPlayerState.swim_state != 0))
+ if ((gPlayerEntity.base.action != PLAYER_NORMAL) || (gPlayerState.swim_state != 0))
return;
gPlayerState.queued_action = PLAYER_08072C9C;
gPlayerState.field_0x38 = uVar2;
gPlayerState.field_0x39 = super->direction ^ 0x10;
- gPlayerState.field_0x3a = sub_0808B1F0((PullableMushroomEntity*)super->parent, &gPlayerEntity);
+ gPlayerState.field_0x3a = sub_0808B1F0((PullableMushroomEntity*)super->parent, &gPlayerEntity.base);
} else {
super->speed = 0x40;
if (uVar2 < 0x40) {
@@ -398,13 +398,13 @@ void sub_0808B168(PullableMushroomEntity* this, u32 param_2) {
pEVar6 = pEVar5;
} else {
if ((super->animationState & 1) != 0) {
- pEVar6 = &gPlayerEntity;
+ pEVar6 = &gPlayerEntity.base;
pEVar5 = super->parent;
pcVar5 = (gUnk_081211FC + super->animationState * 2);
pcVar3 = (gUnk_081211F4 + 1 + AnimationStateFlip90(super->animationState) * 2);
} else {
pEVar6 = super->parent;
- pEVar5 = &gPlayerEntity;
+ pEVar5 = &gPlayerEntity.base;
pcVar5 = (gUnk_081211F4 + AnimationStateFlip90(super->animationState) * 2);
pcVar3 = (gUnk_081211FC + 1 + super->animationState * 2);
}
diff --git a/src/object/pushableFurniture.c b/src/object/pushableFurniture.c
index 58b1c1aa..327dfbe6 100644
--- a/src/object/pushableFurniture.c
+++ b/src/object/pushableFurniture.c
@@ -4,28 +4,9 @@
*
* @brief Pushable Furniture object
*/
-#define NENT_DEPRECATED
+#include "object/pushableFurniture.h"
+
#include "functions.h"
-#include "object.h"
-
-typedef struct {
- /*0x00*/ Entity base;
- /*0x68*/ u8 unk_68[0x8];
- /*0x70*/ u16 unk_70;
- /*0x72*/ u16 unk_72;
- /*0x74*/ u16 unk_74;
- /*0x76*/ u16 unk_76;
- /*0x78*/ u8 unk_78[0x2];
- /*0x7a*/ u16 unk_7a;
- /*0x7c*/ u16 unk_7c;
- /*0x7e*/ u16 unk_7e;
- /*0x80*/ u8 unk_80;
- /*0x81*/ u8 unk_81;
- /*0x82*/ u8 unk_82;
- /*0x83*/ u8 unk_83;
- /*0x84*/ u8 unk_84[0x2];
- /*0x86*/ u16 unk_86;
-} PushableFurnitureEntity;
extern const s16 gUnk_080B4488[];
@@ -340,9 +321,10 @@ void sub_0808FDE8(PushableFurnitureEntity* this) {
bool32 sub_0808FECC(PushableFurnitureEntity* this) {
bool32 result = TRUE;
- if (!((gPlayerState.flags & PL_MINISH) == 0 && (gPlayerEntity.action == PLAYER_BOUNCE) &&
- (gPlayerEntity.animationState == 0) && (gPlayerEntity.y.HALF.HI - super->y.HALF.HI < 0x14) &&
- (super->x.HALF.HI + 0xc > gPlayerEntity.x.HALF.HI) && (super->x.HALF.HI - 12 < gPlayerEntity.x.HALF.HI))) {
+ if (!((gPlayerState.flags & PL_MINISH) == 0 && (gPlayerEntity.base.action == PLAYER_BOUNCE) &&
+ (gPlayerEntity.base.animationState == 0) && (gPlayerEntity.base.y.HALF.HI - super->y.HALF.HI < 0x14) &&
+ (super->x.HALF.HI + 0xc > gPlayerEntity.base.x.HALF.HI) &&
+ (super->x.HALF.HI - 12 < gPlayerEntity.base.x.HALF.HI))) {
result = FALSE;
}
return result;
diff --git a/src/object/pushableGrave.c b/src/object/pushableGrave.c
index 245763e3..eb343f09 100644
--- a/src/object/pushableGrave.c
+++ b/src/object/pushableGrave.c
@@ -4,7 +4,6 @@
*
* @brief Pushable Grave object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "hitbox.h"
#include "object.h"
@@ -119,7 +118,7 @@ void PushableGrave_Action3(PushableGraveEntity* this) {
EnqueueSFX(SFX_SECRET);
sub_080977F4(this);
if (super->type == 0) {
- gRoomControls.camera_target = &gPlayerEntity;
+ gRoomControls.camera_target = &gPlayerEntity.base;
gRoomControls.scrollSpeed = 4;
}
}
diff --git a/src/object/pushableLever.c b/src/object/pushableLever.c
index 493bf92c..bfdc1a46 100644
--- a/src/object/pushableLever.c
+++ b/src/object/pushableLever.c
@@ -4,7 +4,6 @@
*
* @brief Pushable Lever object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "object.h"
@@ -58,9 +57,9 @@ void PushableLever_Idle(PushableLeverEntity* this) {
gPlayerState.pushedObject = 0x90;
gPlayerState.queued_action = PLAYER_PUSH;
gPlayerState.flags |= PL_BUSY;
- gPlayerEntity.x.HALF.LO = 0;
- gPlayerEntity.y.HALF.LO = 0;
- gPlayerEntity.direction = gPlayerEntity.animationState << 2;
+ gPlayerEntity.base.x.HALF.LO = 0;
+ gPlayerEntity.base.y.HALF.LO = 0;
+ gPlayerEntity.base.direction = gPlayerEntity.base.animationState << 2;
}
}
}
diff --git a/src/object/pushableRock.c b/src/object/pushableRock.c
index ca862173..00d8739a 100644
--- a/src/object/pushableRock.c
+++ b/src/object/pushableRock.c
@@ -4,7 +4,6 @@
*
* @brief Pushable Rock object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "object.h"
diff --git a/src/object/pushableStatue.c b/src/object/pushableStatue.c
index c5c57579..90ba2fc2 100644
--- a/src/object/pushableStatue.c
+++ b/src/object/pushableStatue.c
@@ -4,7 +4,6 @@
*
* @brief Pushable Statue object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "hitbox.h"
#include "object.h"
@@ -105,9 +104,9 @@ void PushableStatue_SubAction0(PushableStatueEntity* this) {
if (this->unk_83 == 0) {
this->unk_83 = 1;
- index = gPlayerEntity.animationState;
+ index = gPlayerEntity.base.animationState;
ptr = &gUnk_08120CB4[index];
- PositionRelative(super, &gPlayerEntity, *(ptr) << 0x10, *(ptr + 1) << 0x10);
+ PositionRelative(super, &gPlayerEntity.base, *(ptr) << 0x10, *(ptr + 1) << 0x10);
}
tileType = GetTileType(this->unk_84, super->collisionLayer);
if (tileType != 0x400b) {
@@ -132,9 +131,9 @@ void PushableStatue_SubAction0(PushableStatueEntity* this) {
gPlayerState.queued_action = PLAYER_PULL;
gPlayerState.field_0x38 = 0x20;
gPlayerState.flags |= PL_BUSY;
- gPlayerEntity.x.HALF.LO = 0;
- gPlayerEntity.y.HALF.LO = 0;
- super->direction = (gPlayerEntity.animationState ^ 4) << 2;
+ gPlayerEntity.base.x.HALF.LO = 0;
+ gPlayerEntity.base.y.HALF.LO = 0;
+ super->direction = (gPlayerEntity.base.animationState ^ 4) << 2;
sub_08089538(this);
}
}
@@ -259,13 +258,13 @@ bool32 sub_080896B0(void) {
u32 tmp2;
u32 val;
- if (((gPlayerState.heldObject & 0x1f) == 0x12) && ((gPlayerEntity.frame & 1) != 0)) {
- ptr = &gUnk_080B4468[gPlayerEntity.animationState & 6];
- uVar1 = gUnk_080B4488[gPlayerEntity.animationState >> 1];
- uVar4 = COORD_TO_TILE_OFFSET(&gPlayerEntity, -ptr[0], -ptr[1]) - uVar1;
- val = sub_080B1AE0(uVar4, gPlayerEntity.collisionLayer);
+ if (((gPlayerState.heldObject & 0x1f) == 0x12) && ((gPlayerEntity.base.frame & 1) != 0)) {
+ ptr = &gUnk_080B4468[gPlayerEntity.base.animationState & 6];
+ uVar1 = gUnk_080B4488[gPlayerEntity.base.animationState >> 1];
+ uVar4 = COORD_TO_TILE_OFFSET(&gPlayerEntity.base, -ptr[0], -ptr[1]) - uVar1;
+ val = sub_080B1AE0(uVar4, gPlayerEntity.base.collisionLayer);
if ((val - 0x26 > 1) && (val != 0x29)) {
- layer = GetLayerByIndex(gPlayerEntity.collisionLayer);
+ layer = GetLayerByIndex(gPlayerEntity.base.collisionLayer);
iVar2 = (uVar4 * 0x10000) >> 0x10;
tmp1 = layer->collisionData[iVar2];
tmp2 = layer->collisionData[(iVar2 - uVar1)];
diff --git a/src/object/railtrack.c b/src/object/railtrack.c
index 9fe52d41..5582202f 100644
--- a/src/object/railtrack.c
+++ b/src/object/railtrack.c
@@ -4,7 +4,6 @@
*
* @brief Railtrack object
*/
-#define NENT_DEPRECATED
#include "asm.h"
#include "entity.h"
#include "flags.h"
diff --git a/src/object/rotatingTrapdoor.c b/src/object/rotatingTrapdoor.c
index 9aa0f947..f8e05f49 100644
--- a/src/object/rotatingTrapdoor.c
+++ b/src/object/rotatingTrapdoor.c
@@ -4,7 +4,6 @@
*
* @brief Rotating Trapdoor object
*/
-#define NENT_DEPRECATED
#include "asm.h"
#include "entity.h"
#include "functions.h"
diff --git a/src/object/rupee.c b/src/object/rupee.c
index fe38b3ad..b729c071 100644
--- a/src/object/rupee.c
+++ b/src/object/rupee.c
@@ -4,7 +4,6 @@
*
* @brief Rupee object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "hitbox.h"
#include "object.h"
diff --git a/src/object/sanctuaryStoneTablet.c b/src/object/sanctuaryStoneTablet.c
index 4a107f5a..31201381 100644
--- a/src/object/sanctuaryStoneTablet.c
+++ b/src/object/sanctuaryStoneTablet.c
@@ -4,7 +4,6 @@
*
* @brief Sanctuary Stone Tablet object
*/
-#define NENT_DEPRECATED
#include "effects.h"
#include "entity.h"
#include "flags.h"
diff --git a/src/object/shrinkingHieroglyphs.c b/src/object/shrinkingHieroglyphs.c
index daa132f1..c490b834 100644
--- a/src/object/shrinkingHieroglyphs.c
+++ b/src/object/shrinkingHieroglyphs.c
@@ -4,7 +4,6 @@
*
* @brief Shrinking Hieroglyphs object
*/
-#define NENT_DEPRECATED
#include "entity.h"
#include "functions.h"
#include "player.h"
@@ -70,7 +69,7 @@ void ShrinkingHieroglyphs_Action1(ShrinkingHieroglyphsEntity* this) {
if (super->type == 0) {
UpdateAnimationSingleFrame(super);
if (super->type2 != 0) {
- gPlayerEntity.subtimer = 0;
+ gPlayerEntity.base.subtimer = 0;
super->action++;
InitAnimationForceUpdate(super, 1);
SoundReq(SFX_178);
@@ -110,7 +109,7 @@ void ShrinkingHieroglyphs_Action2(ShrinkingHieroglyphsEntity* this) {
}
void sub_08098130(ShrinkingHieroglyphsEntity* this) {
- CopyPosition(&gPlayerEntity, super);
+ CopyPosition(&gPlayerEntity.base, super);
super->direction = this->objDir.HALF.HI;
super->speed = this->unk7a;
LinearMoveUpdate(super);
diff --git a/src/object/smallIceBlock.c b/src/object/smallIceBlock.c
index 255dbb40..ed2cdea1 100644
--- a/src/object/smallIceBlock.c
+++ b/src/object/smallIceBlock.c
@@ -4,7 +4,6 @@
*
* @brief Small Ice Block object
*/
-#define NENT_DEPRECATED
#include "collision.h"
#include "functions.h"
#include "hitbox.h"
diff --git a/src/object/smoke.c b/src/object/smoke.c
index bffaa8b8..62b4d1ac 100644
--- a/src/object/smoke.c
+++ b/src/object/smoke.c
@@ -4,7 +4,6 @@
*
* @brief Smoke object
*/
-#define NENT_DEPRECATED
#include "object.h"
void Smoke_Type0(Entity*);
diff --git a/src/object/smokeParticle.c b/src/object/smokeParticle.c
index 4e871bfc..ab50e2b8 100644
--- a/src/object/smokeParticle.c
+++ b/src/object/smokeParticle.c
@@ -4,7 +4,6 @@
*
* @brief Smoke Particle object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "object.h"
diff --git a/src/object/specialChest.c b/src/object/specialChest.c
index fd57c7fc..f2fbc8ae 100644
--- a/src/object/specialChest.c
+++ b/src/object/specialChest.c
@@ -4,7 +4,6 @@
*
* @brief Special Chest object
*/
-#define NENT_DEPRECATED
#include "entity.h"
#include "flags.h"
#include "player.h"
diff --git a/src/object/specialFx.c b/src/object/specialFx.c
index 8780cf0c..bfe1a5e5 100644
--- a/src/object/specialFx.c
+++ b/src/object/specialFx.c
@@ -4,7 +4,6 @@
*
* @brief Special FX object
*/
-#define NENT_DEPRECATED
#include "entity.h"
#include "functions.h"
#include "object.h"
@@ -308,8 +307,8 @@ void sub_080847E0(SpecialFxObject* this) {
if (gRoomControls.reload_flags == 1) {
DeleteThisEntity();
}
- PositionRelative(&gPlayerEntity, super, 0, -0x30000);
+ PositionRelative(&gPlayerEntity.base, super, 0, -0x30000);
super->z.HALF.HI = -3;
- SortEntityAbove(&gPlayerEntity, super);
+ SortEntityAbove(&gPlayerEntity.base, super);
sub_080845DC(this);
}
diff --git a/src/object/steam.c b/src/object/steam.c
index d3b7a13e..7cef37d1 100644
--- a/src/object/steam.c
+++ b/src/object/steam.c
@@ -4,7 +4,6 @@
*
* @brief Steam object
*/
-#define NENT_DEPRECATED
#include "asm.h"
#include "entity.h"
#include "player.h"
@@ -44,7 +43,7 @@ void Steam(Entity* _this) {
type = super->type;
ptr = &this->unk_0x68;
if (type != 0) {
- if (gPlayerEntity.x.HALF.HI - gRoomControls.origin_x > (0xf8 << 1)) {
+ if (gPlayerEntity.base.x.HALF.HI - gRoomControls.origin_x > (0xf8 << 1)) {
if (*ptr < 0x40) {
(*ptr)++;
}
diff --git a/src/object/stoneTablet.c b/src/object/stoneTablet.c
index 15605a4b..06049ca9 100644
--- a/src/object/stoneTablet.c
+++ b/src/object/stoneTablet.c
@@ -4,7 +4,6 @@
*
* @brief Stone Tablet object
*/
-#define NENT_DEPRECATED
#include "entity.h"
#include "functions.h"
#include "room.h"
diff --git a/src/object/swordParticle.c b/src/object/swordParticle.c
index 63415fb6..f86879a0 100644
--- a/src/object/swordParticle.c
+++ b/src/object/swordParticle.c
@@ -4,7 +4,6 @@
*
* @brief Sword Particle object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "item.h"
#include "object.h"
@@ -34,8 +33,8 @@ void SwordParticle_Init(SwordParticleEntity* this) {
super->action = 1;
super->flags |= ENT_PERSIST;
super->spritePriority.b0 = 0;
- super->spriteOrientation.flipY = gPlayerEntity.spriteOrientation.flipY;
- super->animationState = gPlayerEntity.animationState >> 1;
+ super->spriteOrientation.flipY = gPlayerEntity.base.spriteOrientation.flipY;
+ super->animationState = gPlayerEntity.base.animationState >> 1;
super->direction = (((super->animationState + 1) & 3) << 3);
super->subtimer = 6;
super->speed = 0x140;
@@ -122,12 +121,12 @@ void SwordParticle_Action1(SwordParticleEntity* this) {
}
}
- super->spriteRendering.b3 = gPlayerEntity.spriteRendering.b3;
+ super->spriteRendering.b3 = gPlayerEntity.base.spriteRendering.b3;
ptr2 = &ptr[super->animationState * 2];
- super->x.HALF.HI = ptr2[0] + gPlayerEntity.x.HALF.HI;
- super->y.HALF.HI = ptr[super->animationState * 2 + 1] + gPlayerEntity.y.HALF.HI;
- super->z.HALF.HI = gPlayerEntity.z.HALF.HI;
- super->collisionLayer = gPlayerEntity.collisionLayer;
+ super->x.HALF.HI = ptr2[0] + gPlayerEntity.base.x.HALF.HI;
+ super->y.HALF.HI = ptr[super->animationState * 2 + 1] + gPlayerEntity.base.y.HALF.HI;
+ super->z.HALF.HI = gPlayerEntity.base.z.HALF.HI;
+ super->collisionLayer = gPlayerEntity.base.collisionLayer;
switch (super->animationState) {
default:
super->y.HALF.HI -= this->unk_6c;
@@ -169,7 +168,7 @@ void SwordParticle_Action2(SwordParticleEntity* this) {
sub_08079BD8(super);
super->action++;
super->spriteSettings.draw = 1;
- super->animationState = gPlayerEntity.animationState;
+ super->animationState = gPlayerEntity.base.animationState;
super->spriteVramOffset = 0;
super->palette.b.b0 = 4;
super->spriteIndex = 0xaf;
diff --git a/src/object/swordsmanNewsletter.c b/src/object/swordsmanNewsletter.c
index 732927c9..bc17266a 100644
--- a/src/object/swordsmanNewsletter.c
+++ b/src/object/swordsmanNewsletter.c
@@ -4,7 +4,6 @@
*
* @brief Swordsman Newsletter object
*/
-#define NENT_DEPRECATED
#include "entity.h"
#include "message.h"
diff --git a/src/object/thoughtBubble.c b/src/object/thoughtBubble.c
index 7ab561c5..10b9de5e 100644
--- a/src/object/thoughtBubble.c
+++ b/src/object/thoughtBubble.c
@@ -4,7 +4,6 @@
*
* @brief Thought Bubble object
*/
-#define NENT_DEPRECATED
#include "entity.h"
#include "sound.h"
diff --git a/src/object/thunderbolt.c b/src/object/thunderbolt.c
index 697a32e3..543c08c4 100644
--- a/src/object/thunderbolt.c
+++ b/src/object/thunderbolt.c
@@ -4,7 +4,6 @@
*
* @brief Thunderbolt object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "object.h"
@@ -101,7 +100,7 @@ void sub_08093EF0(ThunderboltEntity* this) {
if ((super->frame & ANIM_DONE) == 0) {
return;
}
- if (super->parent == &gPlayerEntity) {
+ if (super->parent == &gPlayerEntity.base) {
SoundReq(SFX_PLY_VO6);
sub_08079D84();
}
diff --git a/src/object/titleScreenObject.c b/src/object/titleScreenObject.c
index 9144d0e3..dc94e9fc 100644
--- a/src/object/titleScreenObject.c
+++ b/src/object/titleScreenObject.c
@@ -4,7 +4,6 @@
*
* @brief Title Screen object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "object.h"
diff --git a/src/object/trapdoor.c b/src/object/trapdoor.c
index 2bf94151..809643dd 100644
--- a/src/object/trapdoor.c
+++ b/src/object/trapdoor.c
@@ -4,7 +4,6 @@
*
* @brief Trapdoor object
*/
-#define NENT_DEPRECATED
#include "item.h"
#include "object.h"
@@ -64,7 +63,7 @@ void Trapdoor_Action2(Entity* this) {
}
void Trapdoor_Action3(Entity* this) {
- if (EntityInRectRadius(this, &gPlayerEntity, 0xc, 0xc)) {
+ if (EntityInRectRadius(this, &gPlayerEntity.base, 0xc, 0xc)) {
if (this->subAction == 0) {
sub_08099ECC(this);
RequestPriorityDuration(this, 30);
@@ -80,7 +79,7 @@ void Trapdoor_Action4(Entity* this) {
void sub_08099ECC(Entity* this) {
this->subAction = 1;
- CopyPosition(this, &gPlayerEntity);
+ CopyPosition(this, &gPlayerEntity.base);
gPlayerState.queued_action = PLAYER_FALL;
gPlayerState.field_0x38 = 0;
gPlayerState.flags |= PL_PIT_IS_EXIT;
diff --git a/src/object/treeHidingPortal.c b/src/object/treeHidingPortal.c
index 4acf1d76..dc1792c3 100644
--- a/src/object/treeHidingPortal.c
+++ b/src/object/treeHidingPortal.c
@@ -4,7 +4,6 @@
*
* @brief Tree Hiding Portal object
*/
-#define NENT_DEPRECATED
#include "effects.h"
#include "entity.h"
#include "flags.h"
@@ -53,7 +52,7 @@ void TreeHidingPortal_Init(TreeHidingPortalEntity* this) {
void TreeHidingPortal_Action1(TreeHidingPortalEntity* this) {
- if (sub_0800419C(super, &gPlayerEntity, 0x30, 0x30)) {
+ if (sub_0800419C(super, &gPlayerEntity.base, 0x30, 0x30)) {
if (CheckGlobalFlag(EZERO_1ST)) {
if (((gRoomTransition.frameCount & 3) == 0)) {
CreateSparkle(super);
@@ -113,11 +112,11 @@ static u32 sub_0809E9A0(void) {
u32 rv;
const s16* ptr;
- if (gPlayerEntity.action != PLAYER_BOUNCE) {
+ if (gPlayerEntity.base.action != PLAYER_BOUNCE) {
rv = 0;
} else {
- ptr = &gUnk_080B4468[gPlayerEntity.animationState & 6];
- rv = sub_080B1AE0(COORD_TO_TILE_OFFSET(&gPlayerEntity, -ptr[0], -ptr[1]), 1);
+ ptr = &gUnk_080B4468[gPlayerEntity.base.animationState & 6];
+ rv = sub_080B1AE0(COORD_TO_TILE_OFFSET(&gPlayerEntity.base, -ptr[0], -ptr[1]), 1);
}
return rv;
diff --git a/src/object/treeThorns.c b/src/object/treeThorns.c
index 15aac684..a51bf700 100644
--- a/src/object/treeThorns.c
+++ b/src/object/treeThorns.c
@@ -4,7 +4,6 @@
*
* @brief Three Thorns object
*/
-#define NENT_DEPRECATED
#include "entity.h"
#include "hitbox.h"
#include "object.h"
diff --git a/src/object/unusedSkull.c b/src/object/unusedSkull.c
index 68a22cef..204fc9b6 100644
--- a/src/object/unusedSkull.c
+++ b/src/object/unusedSkull.c
@@ -4,7 +4,6 @@
*
* @brief Unused Skull object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "hitbox.h"
#include "object.h"
diff --git a/src/object/vaati1Portal.c b/src/object/vaati1Portal.c
index dfbc8487..78924aff 100644
--- a/src/object/vaati1Portal.c
+++ b/src/object/vaati1Portal.c
@@ -4,7 +4,6 @@
*
* @brief Vaati1 Portal object
*/
-#define NENT_DEPRECATED
#include "asm.h"
#include "entity.h"
#include "flags.h"
@@ -50,7 +49,7 @@ void Vaati1Portal_Action2(Entity* this) {
if (CheckRoomFlag(1)) {
sub_080A0190(this);
RequestPriorityDuration(this, 30);
- if (EntityInRectRadius(this, &gPlayerEntity, 0x10, 0x10)) {
+ if (EntityInRectRadius(this, &gPlayerEntity.base, 0x10, 0x10)) {
CreateHoleManager(0x37);
}
}
@@ -58,7 +57,7 @@ void Vaati1Portal_Action2(Entity* this) {
void sub_080A0190(Entity* this) {
this->subAction = 1;
- CopyPosition(this, &gPlayerEntity);
+ CopyPosition(this, &gPlayerEntity.base);
gPlayerState.queued_action = PLAYER_FALL;
gPlayerState.field_0x38 = 0;
gPlayerState.flags |= PL_PIT_IS_EXIT;
diff --git a/src/object/vaati2Particle.c b/src/object/vaati2Particle.c
index a9d42284..d39afa96 100644
--- a/src/object/vaati2Particle.c
+++ b/src/object/vaati2Particle.c
@@ -4,7 +4,6 @@
*
* @brief Vaati2 Particle object
*/
-#define NENT_DEPRECATED
#include "entity.h"
#include "physics.h"
diff --git a/src/object/vaati3Arm.c b/src/object/vaati3Arm.c
index 6ba31113..f18f0851 100644
--- a/src/object/vaati3Arm.c
+++ b/src/object/vaati3Arm.c
@@ -4,7 +4,6 @@
*
* @brief Vaati3 Arm object
*/
-#define NENT_DEPRECATED
#include "entity.h"
#include "physics.h"
diff --git a/src/object/vaati3Death.c b/src/object/vaati3Death.c
index 04553f75..fd9db473 100644
--- a/src/object/vaati3Death.c
+++ b/src/object/vaati3Death.c
@@ -4,7 +4,6 @@
*
* @brief Vaati3 Death object
*/
-#define NENT_DEPRECATED
#include "entity.h"
#include "physics.h"
diff --git a/src/object/vaati3PlayerObject.c b/src/object/vaati3PlayerObject.c
index b491cb2a..6420cbab 100644
--- a/src/object/vaati3PlayerObject.c
+++ b/src/object/vaati3PlayerObject.c
@@ -4,7 +4,6 @@
*
* @brief Vaati3 Player object
*/
-#define NENT_DEPRECATED
#include "entity.h"
#include "physics.h"
#include "player.h"
@@ -17,5 +16,5 @@ void Vaati3PlayerObject(Entity* this) {
#ifndef EU
gRoomControls.camera_target = this;
#endif
- PositionRelative(&gPlayerEntity, this, 0, Q_16_16(-40.0));
+ PositionRelative(&gPlayerEntity.base, this, 0, Q_16_16(-40.0));
}
diff --git a/src/object/warpPoint.c b/src/object/warpPoint.c
index d83bc106..67798907 100644
--- a/src/object/warpPoint.c
+++ b/src/object/warpPoint.c
@@ -4,7 +4,6 @@
*
* @brief Warp Point object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "game.h"
#include "hitbox.h"
@@ -70,9 +69,9 @@ void WarpPoint_Init(WarpPointEntity* this) {
return;
super->action = 4;
super->subtimer = 96;
- gPlayerEntity.x.HALF.HI = super->x.HALF.HI;
- gPlayerEntity.y.HALF.HI = super->y.HALF.HI;
- gPlayerEntity.animationState = 4;
+ gPlayerEntity.base.x.HALF.HI = super->x.HALF.HI;
+ gPlayerEntity.base.y.HALF.HI = super->y.HALF.HI;
+ gPlayerEntity.base.animationState = 4;
EnqueueSFX(SFX_112);
RequestPriorityDuration(super, super->subtimer + 16);
}
@@ -105,10 +104,10 @@ void WarpPoint_Action3(WarpPointEntity* this) {
super->action = 5;
super->subtimer = 96;
PutAwayItems();
- gPlayerEntity.x.HALF.HI = super->x.HALF.HI;
- gPlayerEntity.y.HALF.HI = super->y.HALF.HI;
- gPlayerEntity.animationState = 4;
- gPlayerEntity.flags &= ~ENT_COLLIDE;
+ gPlayerEntity.base.x.HALF.HI = super->x.HALF.HI;
+ gPlayerEntity.base.y.HALF.HI = super->y.HALF.HI;
+ gPlayerEntity.base.animationState = 4;
+ gPlayerEntity.base.flags &= ~ENT_COLLIDE;
RequestPriorityDuration(super, super->subtimer + 16);
SoundReq(SFX_113);
} else {
@@ -121,8 +120,8 @@ void WarpPoint_Action4(WarpPointEntity* this) {
if (!--super->subtimer) {
super->action = 3;
super->timer = 1;
- gPlayerEntity.animationState = 4;
- gPlayerEntity.direction = DirectionSouth;
+ gPlayerEntity.base.animationState = 4;
+ gPlayerEntity.base.direction = DirectionSouth;
return;
}
tmp = 0;
@@ -142,7 +141,7 @@ void WarpPoint_Action4(WarpPointEntity* this) {
break;
case 0:
if (!(super->subtimer & 7)) {
- if (gPlayerEntity.animationState == 4) {
+ if (gPlayerEntity.base.animationState == 4) {
if (super->subtimer > 0x18) {
tmp = 1;
}
@@ -153,8 +152,8 @@ void WarpPoint_Action4(WarpPointEntity* this) {
break;
}
if (tmp) {
- gPlayerEntity.animationState += 2;
- gPlayerEntity.animationState &= 6;
+ gPlayerEntity.base.animationState += 2;
+ gPlayerEntity.base.animationState &= 6;
}
}
@@ -193,13 +192,13 @@ void WarpPoint_Action5(WarpPointEntity* this) {
tmp = 1;
}
} else {
- gPlayerEntity.spriteSettings.draw = 0;
+ gPlayerEntity.base.spriteSettings.draw = 0;
}
break;
}
if (tmp) {
- gPlayerEntity.animationState += 2;
- gPlayerEntity.animationState &= 6;
+ gPlayerEntity.base.animationState += 2;
+ gPlayerEntity.base.animationState &= 6;
}
}
@@ -209,10 +208,10 @@ void sub_0808B73C(WarpPointEntity* this) {
super->palette.b.b0 = super->parent->palette.b.b0;
InitializeAnimation(super, 1);
}
- if (EntityWithinDistance(super, gPlayerEntity.x.HALF.HI, gPlayerEntity.y.HALF.HI, 0x28)) {
+ if (EntityWithinDistance(super, gPlayerEntity.base.x.HALF.HI, gPlayerEntity.base.y.HALF.HI, 0x28)) {
super->spriteSettings.draw = 1;
} else {
- if (EntityWithinDistance(super, gPlayerEntity.x.HALF.HI, gPlayerEntity.y.HALF.HI, 0x2e)) {
+ if (EntityWithinDistance(super, gPlayerEntity.base.x.HALF.HI, gPlayerEntity.base.y.HALF.HI, 0x2e)) {
super->spriteSettings.draw ^= 1;
} else {
super->spriteSettings.draw = 0;
@@ -222,9 +221,10 @@ void sub_0808B73C(WarpPointEntity* this) {
}
u32 sub_0808B7C8(WarpPointEntity* this) {
- if (!(gPlayerState.flags & PL_MINISH) && gPlayerState.framestate != PL_STATE_DIE && gPlayerEntity.health != 0 &&
- PlayerCanBeMoved() && EntityInRectRadius(super, &gPlayerEntity, 5, 5) && gPlayerEntity.z.HALF.HI == 0) {
- if (super->timer == 0 && gPlayerEntity.action == PLAYER_08072C9C) {
+ if (!(gPlayerState.flags & PL_MINISH) && gPlayerState.framestate != PL_STATE_DIE &&
+ gPlayerEntity.base.health != 0 && PlayerCanBeMoved() && EntityInRectRadius(super, &gPlayerEntity.base, 5, 5) &&
+ gPlayerEntity.base.z.HALF.HI == 0) {
+ if (super->timer == 0 && gPlayerEntity.base.action == PLAYER_08072C9C) {
ResetPlayerAnimationAndAction();
}
return 1;
diff --git a/src/object/waterDropObject.c b/src/object/waterDropObject.c
index d1236267..056afa57 100644
--- a/src/object/waterDropObject.c
+++ b/src/object/waterDropObject.c
@@ -4,7 +4,6 @@
*
* @brief Water Drop object
*/
-#define NENT_DEPRECATED
#include "entity.h"
#include "functions.h"
diff --git a/src/object/waterElement.c b/src/object/waterElement.c
index 9b4d9902..6f55a27c 100644
--- a/src/object/waterElement.c
+++ b/src/object/waterElement.c
@@ -4,7 +4,6 @@
*
* @brief Water Element object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "object.h"
diff --git a/src/object/waterfallOpening.c b/src/object/waterfallOpening.c
index 72c724d1..47baad61 100644
--- a/src/object/waterfallOpening.c
+++ b/src/object/waterfallOpening.c
@@ -4,7 +4,6 @@
*
* @brief Waterfall Opening object
*/
-#define NENT_DEPRECATED
#include "entity.h"
#include "flags.h"
#include "functions.h"
diff --git a/src/object/well.c b/src/object/well.c
index ed033493..c48948b1 100644
--- a/src/object/well.c
+++ b/src/object/well.c
@@ -4,7 +4,6 @@
*
* @brief Well object
*/
-#define NENT_DEPRECATED
#include "asm.h"
#include "entity.h"
#include "functions.h"
@@ -41,8 +40,8 @@ void Well_Action1(WellEntity* this) {
u32 tileIndex = GetTileType(this->unk_80, 1);
if (tileIndex != 0x407D) {
PausePlayer();
- gPlayerEntity.x.WORD = super->x.WORD;
- gPlayerEntity.y.HALF.HI = super->y.HALF.HI + 4;
+ gPlayerEntity.base.x.WORD = super->x.WORD;
+ gPlayerEntity.base.y.HALF.HI = super->y.HALF.HI + 4;
DeleteThisEntity();
}
}
diff --git a/src/object/whirlwind.c b/src/object/whirlwind.c
index 5febac8c..979a62a3 100644
--- a/src/object/whirlwind.c
+++ b/src/object/whirlwind.c
@@ -4,7 +4,6 @@
*
* @brief Whirlwind object
*/
-#define NENT_DEPRECATED
#include "area.h"
#include "functions.h"
#include "hitbox.h"
@@ -60,24 +59,25 @@ void Whirlwind_Action1(Entity* this) {
if (this->spriteSettings.draw != 0) {
GetNextFrame(this);
if ((((((gPlayerState.flags & PL_MINISH) == 0)) && (gPlayerState.field_0x3c == 0)) &&
- ((gPlayerEntity.action == PLAYER_JUMP || ((gPlayerEntity.flags & ENT_COLLIDE) != 0)))) &&
- ((gPlayerEntity.action != PLAYER_BOUNCE && (sub_0800419C(this, &gPlayerEntity, 0xc, 0xc) != 0)))) {
- if (((gPlayerState.flags & PL_PARACHUTE) == 0) && (gPlayerEntity.action != PLAYER_JUMP)) {
- if ((this->type2 != 1) && (-0x10 < gPlayerEntity.z.HALF.HI)) {
+ ((gPlayerEntity.base.action == PLAYER_JUMP || ((gPlayerEntity.base.flags & ENT_COLLIDE) != 0)))) &&
+ ((gPlayerEntity.base.action != PLAYER_BOUNCE &&
+ (sub_0800419C(this, &gPlayerEntity.base, 0xc, 0xc) != 0)))) {
+ if (((gPlayerState.flags & PL_PARACHUTE) == 0) && (gPlayerEntity.base.action != PLAYER_JUMP)) {
+ if ((this->type2 != 1) && (-0x10 < gPlayerEntity.base.z.HALF.HI)) {
return;
}
- } else if (gPlayerEntity.z.HALF.HI == 0) {
+ } else if (gPlayerEntity.base.z.HALF.HI == 0) {
return;
}
- CopyPosition(this, &gPlayerEntity);
+ CopyPosition(this, &gPlayerEntity.base);
sub_08004542(this);
- sub_08004542(&gPlayerEntity);
- gPlayerEntity.collisionLayer = 1;
- gPlayerEntity.flags |= ENT_COLLIDE;
+ sub_08004542(&gPlayerEntity.base);
+ gPlayerEntity.base.collisionLayer = 1;
+ gPlayerEntity.base.flags |= ENT_COLLIDE;
gPlayerState.queued_action = PLAYER_PARACHUTE;
gPlayerState.field_0x38 = this->type2;
gPlayerState.field_0x39 = 0xff;
- this->spritePriority.b0 = gPlayerEntity.spritePriority.b0 - 1;
+ this->spritePriority.b0 = gPlayerEntity.base.spritePriority.b0 - 1;
this->action++;
PutAwayItems();
SoundReq(SFX_153);
@@ -88,7 +88,7 @@ void Whirlwind_Action1(Entity* this) {
void Whirlwind_Action2(Entity* this) {
UpdateAnimationSingleFrame(this);
- if (sub_0800419C(this, &gPlayerEntity, 0xc, 0xc) == 0) {
+ if (sub_0800419C(this, &gPlayerEntity.base, 0xc, 0xc) == 0) {
ResetCollisionLayer(this);
this->spriteOrientation.flipY = 1;
this->spriteRendering.b3 = 1;
diff --git a/src/object/whiteTriangleEffect.c b/src/object/whiteTriangleEffect.c
index ec70dab3..2d7f24e3 100644
--- a/src/object/whiteTriangleEffect.c
+++ b/src/object/whiteTriangleEffect.c
@@ -4,7 +4,6 @@
*
* @brief White Triangle Effect object
*/
-#define NENT_DEPRECATED
#include "functions.h"
#include "object.h"
#include "screen.h"
diff --git a/src/object/windTribeFlag.c b/src/object/windTribeFlag.c
index 19aa7f63..99b8572f 100644
--- a/src/object/windTribeFlag.c
+++ b/src/object/windTribeFlag.c
@@ -4,7 +4,6 @@
*
* @brief Wind Tribe Flag object
*/
-#define NENT_DEPRECATED
#include "object.h"
void WindTribeFlag(Entity* this) {
diff --git a/src/object/windTribeTeleporter.c b/src/object/windTribeTeleporter.c
index fd785ab9..5a238478 100644
--- a/src/object/windTribeTeleporter.c
+++ b/src/object/windTribeTeleporter.c
@@ -4,7 +4,6 @@
*
* @brief Wind Tribe Teleporter object
*/
-#define NENT_DEPRECATED
#include "collision.h"
#include "functions.h"
#include "hitbox.h"
@@ -41,8 +40,8 @@ void WindTribeTeleporter_Init(WindTribeTeleporterEntity* this) {
super->hitbox = (Hitbox*)&gHitbox_22;
SetEntityPriority(super, 6);
if (PlayerCollidingTeleporter(this)) {
- gPlayerEntity.x.HALF.HI = super->x.HALF.HI;
- gPlayerEntity.y.HALF.HI = super->y.HALF.HI;
+ gPlayerEntity.base.x.HALF.HI = super->x.HALF.HI;
+ gPlayerEntity.base.y.HALF.HI = super->y.HALF.HI;
SetPlayerControl(CONTROL_DISABLED);
PausePlayer();
SetPlayerEventPriority();
@@ -56,8 +55,8 @@ void WindTribeTeleporter_Init(WindTribeTeleporterEntity* this) {
void WindTribeTeleporter_Action1(WindTribeTeleporterEntity* this) {
if (PlayerCollidingTeleporter(this)) {
if (this->unk_68 == 0) {
- gPlayerEntity.x.HALF.HI = super->x.HALF.HI;
- gPlayerEntity.y.HALF.HI = super->y.HALF.HI;
+ gPlayerEntity.base.x.HALF.HI = super->x.HALF.HI;
+ gPlayerEntity.base.y.HALF.HI = super->y.HALF.HI;
SetPlayerControl(CONTROL_DISABLED);
PausePlayer();
SetPlayerEventPriority();
@@ -89,7 +88,7 @@ void WindTribeTeleporter_Action2(WindTribeTeleporterEntity* this) {
SoundReq(SFX_113);
} else {
if ((gRoomTransition.frameCount & 7) == 0) {
- gPlayerEntity.animationState = (gPlayerEntity.animationState + 2) & 6;
+ gPlayerEntity.base.animationState = (gPlayerEntity.base.animationState + 2) & 6;
}
}
break;
@@ -99,7 +98,7 @@ void WindTribeTeleporter_Action2(WindTribeTeleporterEntity* this) {
super->timer = 30;
} else {
if ((gRoomTransition.frameCount & 3) == 0) {
- gPlayerEntity.animationState = (gPlayerEntity.animationState + 2) & 6;
+ gPlayerEntity.base.animationState = (gPlayerEntity.base.animationState + 2) & 6;
}
}
break;
@@ -118,7 +117,7 @@ void WindTribeTeleporter_Action2(WindTribeTeleporterEntity* this) {
#endif
} else {
if ((gRoomTransition.frameCount & 1) == 0) {
- gPlayerEntity.animationState = (gPlayerEntity.animationState + 2) & 6;
+ gPlayerEntity.base.animationState = (gPlayerEntity.base.animationState + 2) & 6;
}
}
break;
@@ -135,7 +134,7 @@ void WindTribeTeleporter_Action3(WindTribeTeleporterEntity* this) {
case 1:
if (--super->timer != 0) {
if ((gRoomTransition.frameCount & 1) == 0) {
- gPlayerEntity.animationState = (gPlayerEntity.animationState + 2) & 6;
+ gPlayerEntity.base.animationState = (gPlayerEntity.base.animationState + 2) & 6;
}
} else {
super->subAction++;
@@ -148,7 +147,7 @@ void WindTribeTeleporter_Action3(WindTribeTeleporterEntity* this) {
super->timer = 30;
} else {
if ((gRoomTransition.frameCount & 3) == 0) {
- gPlayerEntity.animationState = (gPlayerEntity.animationState + 2) & 6;
+ gPlayerEntity.base.animationState = (gPlayerEntity.base.animationState + 2) & 6;
}
}
break;
@@ -157,16 +156,16 @@ void WindTribeTeleporter_Action3(WindTribeTeleporterEntity* this) {
super->subAction++;
} else {
if ((gRoomTransition.frameCount & 7) == 0) {
- gPlayerEntity.animationState = (gPlayerEntity.animationState + 2) & 6;
+ gPlayerEntity.base.animationState = (gPlayerEntity.base.animationState + 2) & 6;
}
}
break;
default:
- if (gPlayerEntity.animationState != 4) {
+ if (gPlayerEntity.base.animationState != 4) {
if ((gRoomTransition.frameCount & 7U) != 0) {
return;
}
- gPlayerEntity.animationState = (gPlayerEntity.animationState + 2) & 6;
+ gPlayerEntity.base.animationState = (gPlayerEntity.base.animationState + 2) & 6;
} else {
super->action = 1;
super->subAction = 0;
@@ -178,7 +177,7 @@ void WindTribeTeleporter_Action3(WindTribeTeleporterEntity* this) {
}
static bool32 PlayerCollidingTeleporter(WindTribeTeleporterEntity* this) {
- if (gPlayerEntity.z.HALF.HI != 0) {
+ if (gPlayerEntity.base.z.HALF.HI != 0) {
return FALSE;
} else {
return IsCollidingPlayer(super);
diff --git a/src/object/windcrest.c b/src/object/windcrest.c
index 2ce20d42..ad1b63a3 100644
--- a/src/object/windcrest.c
+++ b/src/object/windcrest.c
@@ -4,7 +4,6 @@
*
* @brief Windcrest object
*/
-#define NENT_DEPRECATED
#include "effects.h"
#include "entity.h"
#include "functions.h"