summaryrefslogtreecommitdiff
path: root/src/object/object70.c
diff options
context:
space:
mode:
authorTheo <65437533+notyourav@users.noreply.github.com>2023-12-30 14:35:18 -0800
committerGitHub <noreply@github.com>2023-12-30 14:35:18 -0800
commit9c87bcca8ea4b52199ed908c0ea28ab08b1d0747 (patch)
tree8df9fe68628826c949bf4ec0de9f74db40a9914d /src/object/object70.c
parent3c0c1ba5a0653e0acb1c433c3619cda0e3223ddd (diff)
parent8b69eadaef0e0d9f1a4071d1cfad00e93183590b (diff)
Merge pull request #679 from octorock/enemies
Use new entity structs for enemies and player
Diffstat (limited to 'src/object/object70.c')
-rw-r--r--src/object/object70.c35
1 files changed, 17 insertions, 18 deletions
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();
}