summaryrefslogtreecommitdiff
path: root/src/enemy
diff options
context:
space:
mode:
authortheo3 <arisstephenson2@gmail.com>2020-08-08 14:59:11 -0700
committertheo3 <arisstephenson2@gmail.com>2020-08-08 14:59:11 -0700
commitac67812a254a71f6face762b96a2849ef4e9ea76 (patch)
tree91f3b89b091c267ddf7dc173b08e13d9f80e0320 /src/enemy
parent0cb4a64f67e94bcdd9c511ae30a422839a5f173b (diff)
renamed all occurences of "link" to "player"
Diffstat (limited to 'src/enemy')
-rw-r--r--src/enemy/bombPeahat.c6
-rw-r--r--src/enemy/keese.c6
-rw-r--r--src/enemy/lakitu.c10
-rw-r--r--src/enemy/lakituCloud.c4
-rw-r--r--src/enemy/rupeeLike.c40
-rw-r--r--src/enemy/wisp.c4
6 files changed, 35 insertions, 35 deletions
diff --git a/src/enemy/bombPeahat.c b/src/enemy/bombPeahat.c
index 1dc3d30f..932c7f6a 100644
--- a/src/enemy/bombPeahat.c
+++ b/src/enemy/bombPeahat.c
@@ -1,7 +1,7 @@
#include "global.h"
#include "entity.h"
#include "functions.h"
-#include "link.h"
+#include "player.h"
extern s32 sub_080012DC(Entity*);
extern u32 GetNextFunction(Entity*);
@@ -72,8 +72,8 @@ void sub_0802A8F4(Entity *this)
void sub_0802A8FC(Entity *this)
{
- if ((gLinkState.field_0x1c & 0xf) == 0) {
- this->currentHealth = gLinkState.field_0x1c & 0xf;
+ if ((gPlayerState.field_0x1c & 0xf) == 0) {
+ this->currentHealth = gPlayerState.field_0x1c & 0xf;
}
}
diff --git a/src/enemy/keese.c b/src/enemy/keese.c
index ea25214b..825c75ed 100644
--- a/src/enemy/keese.c
+++ b/src/enemy/keese.c
@@ -1,7 +1,7 @@
#include "global.h"
#include "entity.h"
#include "enemy.h"
-#include "link.h"
+#include "player.h"
extern void sub_0804AA30(Entity*, void *);
extern u32 sub_0806F520(Entity*);
@@ -113,7 +113,7 @@ void sub_08021EBC(Entity *this)
this->actionDelay--;
}
else {
- iVar1 = sub_0806FCB8(this, gLinkEntity.x.HALF.HI, gLinkEntity.y.HALF.HI, 0x70);
+ iVar1 = sub_0806FCB8(this, gPlayerEntity.x.HALF.HI, gPlayerEntity.y.HALF.HI, 0x70);
if (iVar1 != 0) {
sub_08021EF0(this);
}
@@ -139,7 +139,7 @@ void sub_08021F24(Entity *this)
this->actionDelay = gUnk_080CB6F6[Random() & 0xf];
InitializeAnimation(this, 1);
}
- else if (!this->field_0x7a && !(sub_0806FCB8(this, gLinkEntity.x.HALF.HI, gLinkEntity.y.HALF.HI, 0x70))) {
+ else if (!this->field_0x7a && !(sub_0806FCB8(this, gPlayerEntity.x.HALF.HI, gPlayerEntity.y.HALF.HI, 0x70))) {
this->action = 3;
this->actionDelay = 0x1e;
InitializeAnimation(this, 1);
diff --git a/src/enemy/lakitu.c b/src/enemy/lakitu.c
index 94dbd2f4..a6d32f1c 100644
--- a/src/enemy/lakitu.c
+++ b/src/enemy/lakitu.c
@@ -3,7 +3,7 @@
#include "functions.h"
#include "trig.h"
#include "random.h"
-#include "link.h"
+#include "player.h"
// Lakitu
extern void EnemyFunctionHandler(Entity *, void (*const funcs[])(Entity*));
@@ -268,8 +268,8 @@ void sub_0803CA0C(Entity *this) {
}
bool32 sub_0803CA4C(Entity *this) {
- if (sub_0806FCB8(this, gLinkEntity.x.HALF.HI, gLinkEntity.y.HALF.HI, 0x28) == 0) {
- if (sub_080041A0(this, &gLinkEntity, 0x70, 0x50)) {
+ if (sub_0806FCB8(this, gPlayerEntity.x.HALF.HI, gPlayerEntity.y.HALF.HI, 0x28) == 0) {
+ if (sub_080041A0(this, &gPlayerEntity, 0x70, 0x50)) {
return 1;
}
}
@@ -278,7 +278,7 @@ bool32 sub_0803CA4C(Entity *this) {
}
void sub_0803CA84(Entity *this, u32 unkParameter) {
- u32 altAnimState = GetFacingDirection(this, &gLinkEntity);
+ u32 altAnimState = GetFacingDirection(this, &gPlayerEntity);
if (((altAnimState - 3) & 7) > 2 || ((this->animationState - (altAnimState >> 3)) & 3) > 1) {
u32 intermediate = (altAnimState + 4) & 0x18;
@@ -324,7 +324,7 @@ void sub_0803CB34(Entity *this) {
this->action = 5;
this->damageType = 0xa6;
- this->field_0x78.HALF.LO = GetFacingDirection(this, &gLinkEntity);
+ this->field_0x78.HALF.LO = GetFacingDirection(this, &gPlayerEntity);
InitAnimationForceUpdate(this, this->animationState + 8);
}
diff --git a/src/enemy/lakituCloud.c b/src/enemy/lakituCloud.c
index 0dca3465..241c8f68 100644
--- a/src/enemy/lakituCloud.c
+++ b/src/enemy/lakituCloud.c
@@ -1,6 +1,6 @@
#include "global.h"
#include "entity.h"
-#include "link.h"
+#include "player.h"
extern u32 GetNextFunction(Entity *);
@@ -60,7 +60,7 @@ void sub_0803CD40(Entity *this) {
ModHealth(-2);
- sub_0800449C(&gLinkEntity, 122);
+ sub_0800449C(&gPlayerEntity, 122);
sub_08079D84();
sub_0803CE3C(this);
diff --git a/src/enemy/rupeeLike.c b/src/enemy/rupeeLike.c
index cbd991c4..c127367e 100644
--- a/src/enemy/rupeeLike.c
+++ b/src/enemy/rupeeLike.c
@@ -4,7 +4,7 @@
#include "functions.h"
#include "npc.h"
#include "structures.h"
-#include "link.h"
+#include "player.h"
extern void sub_080293DC(Entity*);
extern void sub_080296D8(Entity*);
@@ -61,7 +61,7 @@ void sub_08029318(Entity* this) {
this->field_0xf = 0;
this->field_0x82.HALF.HI = 0x41;
this->flags2 &= 0xfc;
- this->field_0x80.HALF.LO = gLinkEntity.spritePriority.b1;
+ this->field_0x80.HALF.LO = gPlayerEntity.spritePriority.b1;
sub_08004488(0x104);
} else {
if (this->field_0x43 != 0) {
@@ -116,7 +116,7 @@ void sub_08029474(Entity* this) {
if (this->frames.b.f3) {
this->action = 3;
this->actionDelay = 8;
- bVar1 = GetFacingDirection(this, &gLinkEntity);
+ bVar1 = GetFacingDirection(this, &gPlayerEntity);
this->direction = bVar1;
this->animationState = (bVar1 << 0x18) >> 0x1c;
InitializeAnimation(this, this->animationState);
@@ -133,7 +133,7 @@ void sub_080294D4(Entity* this) {
if (sub_08049FDC(this, 1) != 0) {
if (--this->actionDelay == 0) {
this->actionDelay = 8;
- sub_08004596(this, GetFacingDirection(this, &gLinkEntity));
+ sub_08004596(this, GetFacingDirection(this, &gPlayerEntity));
sub_0802969C(this);
}
sub_080AEF88(this);
@@ -162,13 +162,13 @@ void sub_0802953C(Entity* this) {
if (((this->field_0xf > 0x2d) || (gUnk_02002A40.stats.rupees == 0)) && (this->actionDelay == 0)) {
sub_080296D8(this);
} else {
- ResetLink();
- gLinkState.field_0x1a[0] |= 0x80;
- PositionRelative(this, &gLinkEntity, 0, 0x10000);
+ ResetPlayer();
+ gPlayerState.field_0x1a[0] |= 0x80;
+ PositionRelative(this, &gPlayerEntity, 0, 0x10000);
pbVar3 = GetSpriteSubEntryOffsetDataPointer((u16)this->spriteIndex, this->frameIndex);
- gLinkEntity.spriteOffsetX = pbVar3[0];
- gLinkEntity.spriteOffsetY = pbVar3[1] - 1;
- gLinkEntity.spritePriority.b1 = 0;
+ gPlayerEntity.spriteOffsetX = pbVar3[0];
+ gPlayerEntity.spriteOffsetY = pbVar3[1] - 1;
+ gPlayerEntity.spritePriority.b1 = 0;
if (--this->field_0x82.HALF.HI == 0) {
this->field_0x82.HALF.HI = 0x41;
if (gUnk_02002A40.stats.rupees != 0) {
@@ -230,16 +230,16 @@ void sub_080296C8(Entity* this) {
}
void sub_080296D8(Entity* this) {
- gLinkState.jumpStatus = 0x41;
- gLinkState.flags.all &= 0xffffffef;
- gLinkEntity.flags |= 0x80;
- gLinkEntity.field_0x20 = 0x18000;
- gLinkEntity.hurtBlinkTime = 0xa6;
- gLinkEntity.height.HALF.HI = -2;
- gLinkEntity.direction = gLinkEntity.animationState << 2;
- gLinkEntity.spritePriority.b1 = this->field_0x80.HALF.LO;
- gLinkEntity.spriteOffsetY = 0;
- gLinkEntity.nonPlanarMovement = 0x140;
+ gPlayerState.jumpStatus = 0x41;
+ gPlayerState.flags.all &= 0xffffffef;
+ gPlayerEntity.flags |= 0x80;
+ gPlayerEntity.field_0x20 = 0x18000;
+ gPlayerEntity.hurtBlinkTime = 0xa6;
+ gPlayerEntity.height.HALF.HI = -2;
+ gPlayerEntity.direction = gPlayerEntity.animationState << 2;
+ gPlayerEntity.spritePriority.b1 = this->field_0x80.HALF.LO;
+ gPlayerEntity.spriteOffsetY = 0;
+ gPlayerEntity.nonPlanarMovement = 0x140;
this->action = 5;
this->field_0xf = 0x3c;
this->flags2 |= 3;
diff --git a/src/enemy/wisp.c b/src/enemy/wisp.c
index d6729201..b54bda31 100644
--- a/src/enemy/wisp.c
+++ b/src/enemy/wisp.c
@@ -2,7 +2,7 @@
#include "entity.h"
#include "enemy.h"
#include "structures.h"
-#include "link.h"
+#include "player.h"
#include "functions.h"
extern void (*const gUnk_080CEB74[])(Entity*);
@@ -34,7 +34,7 @@ void sub_08033564(Entity* this) {
this->spriteSettings.b.draw = FALSE;
this->flags &= 0x7f;
this->field_0x7c.HALF.LO = 0x27c;
- gLinkState.flags.all |= 0x4000;
+ gPlayerState.flags.all |= 0x4000;
gUnk_02002A40.stats.filler2[4] = this->entityType.form + 1;
gUnk_02002A40.stats.field_0x20 = 600;
if (this->entityType.form == 0) {