diff options
| author | theo3 <arisstephenson2@gmail.com> | 2020-08-08 14:59:11 -0700 |
|---|---|---|
| committer | theo3 <arisstephenson2@gmail.com> | 2020-08-08 14:59:11 -0700 |
| commit | ac67812a254a71f6face762b96a2849ef4e9ea76 (patch) | |
| tree | 91f3b89b091c267ddf7dc173b08e13d9f80e0320 /src/object | |
| parent | 0cb4a64f67e94bcdd9c511ae30a422839a5f173b (diff) | |
renamed all occurences of "link" to "player"
Diffstat (limited to 'src/object')
| -rw-r--r-- | src/object/cloud.c | 10 | ||||
| -rw-r--r-- | src/object/greatFairy.c | 4 | ||||
| -rw-r--r-- | src/object/heartContainer.c | 2 | ||||
| -rwxr-xr-x | src/object/houseDoorExterior.c | 6 | ||||
| -rw-r--r-- | src/object/mask.c | 10 | ||||
| -rw-r--r-- | src/object/minecart.c | 74 | ||||
| -rw-r--r-- | src/object/object49.c | 2 | ||||
| -rw-r--r-- | src/object/object86.c | 12 | ||||
| -rw-r--r-- | src/object/objectA8.c | 4 | ||||
| -rw-r--r-- | src/object/treeHidingPortal.c | 4 | ||||
| -rw-r--r-- | src/object/well.c | 6 |
11 files changed, 67 insertions, 67 deletions
diff --git a/src/object/cloud.c b/src/object/cloud.c index 54fa6621..fce592f1 100644 --- a/src/object/cloud.c +++ b/src/object/cloud.c @@ -1,7 +1,7 @@ #include "global.h" #include "entity.h" #include "room.h" -#include "link.h" +#include "player.h" #include "flags.h" extern void sub_0809F7BC(Entity*); @@ -25,8 +25,8 @@ extern void sub_0807BB68(u32*, u32, u32); extern u8 gUnk_02034490; extern u32 gScreenTransition; extern void* gUnk_080DD750; -extern Entity gLinkEntity; -extern LinkState gLinkState; +extern Entity gPlayerEntity; +extern PlayerState gPlayerState; extern u8 gUnk_081247C0[]; extern u16 gUnk_081247C8[]; extern u32 gUnk_081247D0; @@ -123,7 +123,7 @@ void sub_0809F69C(Entity* this) { if (--this->actionDelay == 0) { this->actionDelay = 30; this->action = 4; - gRoomControls.cameraTarget = &gLinkEntity; + gRoomControls.cameraTarget = &gPlayerEntity; PlaySFX(115); } } @@ -131,7 +131,7 @@ void sub_0809F69C(Entity* this) { void sub_0809F6CC(Entity* this) { if (((gRoomControls.unk6 & 4) == 0) && (--this->actionDelay == 0)) { - gLinkState.field_0x8b = 1; + gPlayerState.field_0x8b = 1; DeleteThisEntity(); } } diff --git a/src/object/greatFairy.c b/src/object/greatFairy.c index 4e2c4d40..bfdf0807 100644 --- a/src/object/greatFairy.c +++ b/src/object/greatFairy.c @@ -32,12 +32,12 @@ void GreatFairy(Entity* this) { void GreatFairy_CallBehavior(Entity* this) { GreatFairy_Behaviors[this->action](this); - if ((gLinkEntity.y.HALF.HI - gRoomControls.roomOriginY) < 168) { + if ((gPlayerEntity.y.HALF.HI - gRoomControls.roomOriginY) < 168) { gRoomControls.cameraTarget = this; gRoomControls.unk5 = 2; } else { - gRoomControls.cameraTarget = &gLinkEntity; + gRoomControls.cameraTarget = &gPlayerEntity; gRoomControls.unk5 = 2; } } diff --git a/src/object/heartContainer.c b/src/object/heartContainer.c index b32b1981..d55f7171 100644 --- a/src/object/heartContainer.c +++ b/src/object/heartContainer.c @@ -63,7 +63,7 @@ static void sub_0808E714(Entity* this) { static void sub_0808E764(Entity* this) { sub_08080CB4(this); - if (!(gLinkState.flags.all & 0x80) && sub_08017850(this)) { + if (!(gPlayerState.flags.all & 0x80) && sub_08017850(this)) { SetFlag(this->cutsceneBeh.HWORD); CreateItemEntity(0x62, 0, 0); DeleteThisEntity(); diff --git a/src/object/houseDoorExterior.c b/src/object/houseDoorExterior.c index c68f6b23..4b53add6 100755 --- a/src/object/houseDoorExterior.c +++ b/src/object/houseDoorExterior.c @@ -166,9 +166,9 @@ void sub_0808692C(Entity* this) { static u8 sub_08086954(Entity* this) { if (sub_0800445C(this)) { if (sub_0806ED9C(this, 6, 20) >= 0 && - gLinkEntity.animationState == 0 && - (u16)gLinkState.field_0x90.HALF.LO == 0x400 && - gLinkState.jumpStatus == 0) { + gPlayerEntity.animationState == 0 && + (u16)gPlayerState.field_0x90.HALF.LO == 0x400 && + gPlayerState.jumpStatus == 0) { this->actionDelay--; } } else { diff --git a/src/object/mask.c b/src/object/mask.c index 033039e4..dfabc160 100644 --- a/src/object/mask.c +++ b/src/object/mask.c @@ -3,7 +3,7 @@ #include "room.h" #include "random.h" -extern Entity gLinkEntity; +extern Entity gPlayerEntity; extern u16 gScreenTransition[]; extern void (*MaskActionFuncs[])(Entity *); @@ -76,20 +76,20 @@ void sub_080929A4(Entity *this) { // Probably related to knocking it down void sub_08092A94(Entity *this) { // Check for the first frame of bonking animation - if (gLinkEntity.action != 6) { + if (gPlayerEntity.action != 6) { return; } - if (gLinkEntity.animationState != 0) { + if (gPlayerEntity.animationState != 0) { return; } // Check if link is close enough to the mask - if (this->y.HALF.HI + 40 < gLinkEntity.y.HALF.HI) { + if (this->y.HALF.HI + 40 < gPlayerEntity.y.HALF.HI) { return; } - if (this->x.HALF.HI - gLinkEntity.x.HALF.HI >= this->field_0xf || this->x.HALF.HI - gLinkEntity.x.HALF.HI <= -this->field_0xf) { + if (this->x.HALF.HI - gPlayerEntity.x.HALF.HI >= this->field_0xf || this->x.HALF.HI - gPlayerEntity.x.HALF.HI <= -this->field_0xf) { return; } diff --git a/src/object/minecart.c b/src/object/minecart.c index bc434ff7..783e9696 100644 --- a/src/object/minecart.c +++ b/src/object/minecart.c @@ -36,7 +36,7 @@ void sub_080916EC(Entity* this) { struct_030010EC* unk = &gUnk_030010EC[this->actionDelay]; *(struct_030010EC**)&this->cutsceneBeh.HWORD = unk; - if ((gRoomControls.roomID != unk->field_0x4) || (gLinkState.flags.all & 0x1000) != 0) { + if ((gRoomControls.roomID != unk->field_0x4) || (gPlayerState.flags.all & 0x1000) != 0) { DeleteThisEntity(); } this->x.HALF.HI = gRoomControls.roomOriginX + ((unk->field_0x0 & 0x3f) << 4) + 8; @@ -66,8 +66,8 @@ void sub_080917DC(Entity* this) { PlaySFX(0x13b); } else { if (sub_0800445C(this) != 0) { - if (((gLinkState.flags.all & 0x40080) == 0) && (gLinkState.field_0x1c == 0) && - (gLinkState.heldObject == 0) && (gLinkState.jumpStatus == 0)) { + if (((gPlayerState.flags.all & 0x40080) == 0) && (gPlayerState.field_0x1c == 0) && + (gPlayerState.heldObject == 0) && (gPlayerState.jumpStatus == 0)) { this->actionDelay++; } else { this->actionDelay = 0; @@ -78,12 +78,12 @@ void sub_080917DC(Entity* this) { if ((this->entityType).parameter == 0) { if (8 < this->actionDelay) { this->action = this->action + 1; - gLinkState.jumpStatus = 0x81; - gLinkState.flags.all |= 0x4000000; - gLinkEntity.field_0x20 = 0x20000; - gLinkEntity.nonPlanarMovement = 0x100; - gLinkEntity.flags &= 0x7f; - ResetLink(); + gPlayerState.jumpStatus = 0x81; + gPlayerState.flags.all |= 0x4000000; + gPlayerEntity.field_0x20 = 0x20000; + gPlayerEntity.nonPlanarMovement = 0x100; + gPlayerEntity.flags &= 0x7f; + ResetPlayer(); sub_0807A108(); PlaySFX(0x7c); } @@ -95,21 +95,21 @@ void sub_080917DC(Entity* this) { void sub_080918A4(Entity *this) { - if (sub_080041A0(this, &gLinkEntity, 2, 2) != 0) { - gLinkEntity.x.HALF.HI = this->x.HALF.HI; - gLinkEntity.y.HALF.HI = this->y.HALF.HI; - if (gLinkEntity.height.HALF.HI > -0x10) { - if ((s32)gLinkEntity.field_0x20 > -1) { + if (sub_080041A0(this, &gPlayerEntity, 2, 2) != 0) { + gPlayerEntity.x.HALF.HI = this->x.HALF.HI; + gPlayerEntity.y.HALF.HI = this->y.HALF.HI; + if (gPlayerEntity.height.HALF.HI > -0x10) { + if ((s32)gPlayerEntity.field_0x20 > -1) { return; } - gLinkEntity.animationState = this->animationState << 1; - gLinkState.flags.all = (gLinkState.flags.all ^ 0x4000000) | 0x1000; + gPlayerEntity.animationState = this->animationState << 1; + gPlayerState.flags.all = (gPlayerState.flags.all ^ 0x4000000) | 0x1000; this->action++; this->field_0xf = 1; this->flags |= 0x20; this->damageType = 0x97; - this->field_0x3c = (gLinkEntity.field_0x3c + 1) | 0x20; - this->flags2 = gLinkEntity.flags2; + this->field_0x3c = (gPlayerEntity.field_0x3c + 1) | 0x20; + this->flags2 = gPlayerEntity.flags2; this->field_0x40 = 0x18; this->field_0x44 = 8; sub_0801766C(this); @@ -118,10 +118,10 @@ void sub_080918A4(Entity *this) } } else { - gLinkEntity.direction = GetFacingDirection(&gLinkEntity, this); + gPlayerEntity.direction = GetFacingDirection(&gPlayerEntity, this); } - if (gLinkEntity.field_0x20 < 0) { - gLinkEntity.spritePriority.b0 = this->spritePriority.b0 - 1; + if (gPlayerEntity.field_0x20 < 0) { + gPlayerEntity.spritePriority.b0 = this->spritePriority.b0 - 1; } } @@ -131,25 +131,25 @@ void sub_080919AC(Entity *this) u32 uVar3; gRoomControls.unk5 = 7; - if ((gLinkState.flags.all & 0x1000) == 0) { + if ((gPlayerState.flags.all & 0x1000) == 0) { this->action = 1; return; } - if ((gLinkEntity.frames.all & 0xf) == 0) { + if ((gPlayerEntity.frames.all & 0xf) == 0) { this->flags = this->flags & 0x7f; - CopyPosition(this,&gLinkEntity); - if ((gLinkEntity.frames.all & 0xf0) == 0x10) { + CopyPosition(this,&gPlayerEntity); + if ((gPlayerEntity.frames.all & 0xf0) == 0x10) { this->spriteOffsetY = 1; } else { this->spriteOffsetY = 0; } } else { this->flags = this->flags | 0x80; - gLinkEntity.nonPlanarMovement = 0; + gPlayerEntity.nonPlanarMovement = 0; sub_0806F69C(this); - CopyPosition(this,&gLinkEntity); - gLinkEntity.spritePriority.b0 = this->spritePriority.b0 - 1; + CopyPosition(this,&gPlayerEntity); + gPlayerEntity.spritePriority.b0 = this->spritePriority.b0 - 1; if (!sub_08091DDC(this)) { if ((gScreenTransition.frameCount & 0xf) == 0) { PlaySFX(0x138); @@ -175,13 +175,13 @@ void sub_080919AC(Entity *this) this->flags2 = 0x80; this->action = 6; sub_08017744(this); - gLinkState.jumpStatus = 0x41; - gLinkState.flags.all = (gLinkState.flags.all ^ 0x1000) | 0x4000000; - gLinkEntity.field_0x20 = 0x20000; - gLinkEntity.nonPlanarMovement = 0x200; - gLinkEntity.animationState = this->animationState << 1; - gLinkEntity.direction = this->direction; - gLinkEntity.flags |= 0x80; + gPlayerState.jumpStatus = 0x41; + gPlayerState.flags.all = (gPlayerState.flags.all ^ 0x1000) | 0x4000000; + gPlayerEntity.field_0x20 = 0x20000; + gPlayerEntity.nonPlanarMovement = 0x200; + gPlayerEntity.animationState = this->animationState << 1; + gPlayerEntity.direction = this->direction; + gPlayerEntity.flags |= 0x80; sub_08004168(this); InitAnimationForceUpdate(this, this->animationState + 0xc); PlaySFX(0x78); @@ -197,14 +197,14 @@ void sub_080919AC(Entity *this) case 0x6f: if (uVar3 == sub_080002B8(this)) { sub_08091C0C(this); - gLinkEntity.animationState = this->animationState << 1; + gPlayerEntity.animationState = this->animationState << 1; return; } break; } } - gLinkEntity.animationState = this->animationState << 1; + gPlayerEntity.animationState = this->animationState << 1; if (this->animIndex == this->animationState) { UpdateAnimationSingleFrame(this); } diff --git a/src/object/object49.c b/src/object/object49.c index 925e47ea..e3fa37dd 100644 --- a/src/object/object49.c +++ b/src/object/object49.c @@ -236,7 +236,7 @@ void sub_0808F498(Entity* this) { DeleteThisEntity(); } - if (gLinkState.field_0x1c != 1) { + if (gPlayerState.field_0x1c != 1) { DeleteThisEntity(); } } else { diff --git a/src/object/object86.c b/src/object/object86.c index 5a1c0aec..0520cb55 100644 --- a/src/object/object86.c +++ b/src/object/object86.c @@ -1,6 +1,6 @@ #include "global.h" #include "entity.h" -#include "link.h" +#include "player.h" #include "flags.h" extern u32 sub_080041A0(Entity*, Entity*, u32, u32); @@ -58,7 +58,7 @@ void sub_08099E58(Entity *this) void sub_08099E8C(Entity *this) { - if (sub_080041A0(this, &gLinkEntity, 0xc, 0xc)) { + if (sub_080041A0(this, &gPlayerEntity, 0xc, 0xc)) { if (this->previousActionFlag == 0) { sub_08099ECC(this); sub_0805E4E0(this, 0x1e); @@ -74,8 +74,8 @@ void nullsub_534(Entity* this) {} void sub_08099ECC(Entity *this) { this->previousActionFlag = 1; - CopyPosition(this, &gLinkEntity); - gLinkState.linkAction = 3; - gLinkState.field_0x34[4] = 0; - gLinkState.flags.all |= 0x8000; + CopyPosition(this, &gPlayerEntity); + gPlayerState.playerAction = 3; + gPlayerState.field_0x34[4] = 0; + gPlayerState.flags.all |= 0x8000; } diff --git a/src/object/objectA8.c b/src/object/objectA8.c index b68a141a..ab7713c5 100644 --- a/src/object/objectA8.c +++ b/src/object/objectA8.c @@ -7,7 +7,7 @@ extern void sub_08080CB4(Entity*); extern void (*gUnk_08124824[])(Entity*); -extern Entity gLinkEntity; +extern Entity gPlayerEntity; void ObjectA8(Entity *this) { @@ -26,7 +26,7 @@ void ObjectA8(Entity *this) case 0x1e: case 0x1f: this->action = 5; - this->attachedEntity = &gLinkEntity; + this->attachedEntity = &gPlayerEntity; CreateItemEntity((this->entityType).form, 0, 0); DeleteThisEntity(); } diff --git a/src/object/treeHidingPortal.c b/src/object/treeHidingPortal.c index 5b8522b3..52fa5a25 100644 --- a/src/object/treeHidingPortal.c +++ b/src/object/treeHidingPortal.c @@ -1,7 +1,7 @@ #include "global.h" #include "entity.h" #include "flags.h" -#include "link.h" +#include "player.h" #include "room.h" extern void sub_0809E96C(Entity*); @@ -34,7 +34,7 @@ void sub_0809E83C(Entity* this) { void sub_0809E86C(Entity* this) { - if (sub_0800419C(this, &gLinkEntity, 0x30, 0x30)) { + if (sub_0800419C(this, &gPlayerEntity, 0x30, 0x30)) { if (CheckGlobalFlag(EZERO_1ST)) { if (((gScreenTransition & 3) == 0)) { sub_080A2B80(this); diff --git a/src/object/well.c b/src/object/well.c index 07c1237b..fda35fed 100644 --- a/src/object/well.c +++ b/src/object/well.c @@ -1,7 +1,7 @@ #include "global.h" #include "entity.h" #include "room.h" -#include "link.h" +#include "player.h" void SetTile(u32 tileIndex, s32 tilePosition, s32 layerIndex); s32 GetTileType(s32 tilePosition, s32 layerIndex); @@ -29,8 +29,8 @@ void sub_080A0EF0(Entity* ent) { tileIndex = GetTileType(ent->field_0x80.HWORD, 1); if (tileIndex != 0x407D) { sub_08078B48(); - gLinkEntity.x.WORD = ent->x.WORD; - gLinkEntity.y.HALF.HI = ent->y.HALF.HI + 4; + gPlayerEntity.x.WORD = ent->x.WORD; + gPlayerEntity.y.HALF.HI = ent->y.HALF.HI + 4; DeleteThisEntity(); } } |
