summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCatobat <69204835+Catobat@users.noreply.github.com>2023-04-30 15:10:30 +0200
committerCatobat <69204835+Catobat@users.noreply.github.com>2023-04-30 15:10:30 +0200
commit985eeb67a17517d522e963a1e52eafcd07712520 (patch)
tree0ceaa203dca5acd8fa07d34c5b8e24e971ffa84f /src
parentd1d78ed018967130231a0ce9bb04819e9faef9ce (diff)
Name members for R actions in struct_0200AF00
Diffstat (limited to 'src')
-rw-r--r--src/beanstalkSubtask.c6
-rw-r--r--src/interrupts.c8
-rw-r--r--src/item/itemTryPickupObject.c2
-rw-r--r--src/object/crenelBeanSprout.c6
-rw-r--r--src/object/itemForSale.c12
-rw-r--r--src/player.c4
-rw-r--r--src/playerUtils.c14
-rw-r--r--src/ui.c22
8 files changed, 37 insertions, 37 deletions
diff --git a/src/beanstalkSubtask.c b/src/beanstalkSubtask.c
index 42f6943b..6d102626 100644
--- a/src/beanstalkSubtask.c
+++ b/src/beanstalkSubtask.c
@@ -310,7 +310,7 @@ u32 UpdatePlayerCollision(void) {
if (gPlayerEntity.animationState != 0) {
return 0;
}
- gUnk_0200AF00.unk_2d = 4;
+ gUnk_0200AF00.rActionInteractTile = 4;
if ((gPlayerState.playerInput.newInput & (PLAYER_INPUT_80 | PLAYER_INPUT_40)) == 0) {
return 0;
}
@@ -324,7 +324,7 @@ u32 UpdatePlayerCollision(void) {
if ((gPlayerState.flags & 0x4080) != 0) {
return 0;
}
- gUnk_0200AF00.unk_2d = 6;
+ gUnk_0200AF00.rActionInteractTile = 6;
if ((gPlayerState.playerInput.newInput & (PLAYER_INPUT_80 | PLAYER_INPUT_8)) == 0) {
return 0;
}
@@ -335,7 +335,7 @@ u32 UpdatePlayerCollision(void) {
if (HasDungeonSmallKey() == 0) {
return 0;
}
- gUnk_0200AF00.unk_2d = 6;
+ gUnk_0200AF00.rActionInteractTile = 6;
if ((gPlayerState.playerInput.newInput & (PLAYER_INPUT_80 | PLAYER_INPUT_8)) == 0) {
return 0;
}
diff --git a/src/interrupts.c b/src/interrupts.c
index 63abe0ea..674d064a 100644
--- a/src/interrupts.c
+++ b/src/interrupts.c
@@ -225,9 +225,9 @@ void PlayerUpdate(Entity* this) {
static void HandlePlayerLife(Entity* this) {
u32 temp;
- gUnk_0200AF00.unk_2f = 0;
- gUnk_0200AF00.unk_2d = 0;
- gUnk_0200AF00.unk_2e = 0;
+ gUnk_0200AF00.rActionPlayerState = 0;
+ gUnk_0200AF00.rActionInteractTile = 0;
+ gUnk_0200AF00.rActionGrabbing = 0;
if ((gPlayerEntity.contactFlags & 0x80) && (gPlayerEntity.iframes > 0))
SoundReq(SFX_86);
@@ -323,7 +323,7 @@ static void sub_080171F0(void) {
sub_080028E0(&gPlayerEntity);
if (gPlayerState.flags & PL_CLONING)
- gUnk_0200AF00.unk_2f = 1;
+ gUnk_0200AF00.rActionPlayerState = 1;
sub_08078180();
gPlayerState.field_0x7 &= ~0x80;
diff --git a/src/item/itemTryPickupObject.c b/src/item/itemTryPickupObject.c
index 8a7b40dc..d776eee7 100644
--- a/src/item/itemTryPickupObject.c
+++ b/src/item/itemTryPickupObject.c
@@ -95,7 +95,7 @@ void ItemPickupCheck(ItemBehavior* this, u32 index) {
carried->subAction = 5;
gPlayerState.framestate = PL_STATE_THROW;
sub_080762C4(this, carried, 2, index);
- gUnk_0200AF00.unk_2e = 8;
+ gUnk_0200AF00.rActionGrabbing = 8;
SoundReq(SFX_102);
break;
case 1:
diff --git a/src/object/crenelBeanSprout.c b/src/object/crenelBeanSprout.c
index a0fb206d..ee3364ee 100644
--- a/src/object/crenelBeanSprout.c
+++ b/src/object/crenelBeanSprout.c
@@ -172,9 +172,9 @@ void CrenelBeanSprout_Action1(CrenelBeanSproutEntity* this) {
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) {
- gUnk_0200AF00.unk_2f = 3;
+ gUnk_0200AF00.rActionPlayerState = 3;
} else {
- gUnk_0200AF00.unk_2f = 0;
+ gUnk_0200AF00.rActionPlayerState = 0;
}
PositionRelative(&gPlayerEntity, super, 0, 0x10000);
if (GetTileUnderEntity(super) == 0x19) {
@@ -184,7 +184,7 @@ void CrenelBeanSprout_Action1(CrenelBeanSproutEntity* this) {
if ((gPlayerState.playerInput.newInput & (PLAYER_INPUT_80 | PLAYER_INPUT_40)) == 0) {
return;
}
- if (gUnk_0200AF00.unk_2f != 3) {
+ if (gUnk_0200AF00.rActionPlayerState != 3) {
return;
}
gPlayerState.heldObject = 0;
diff --git a/src/object/itemForSale.c b/src/object/itemForSale.c
index 0f4b1fa5..ad83696b 100644
--- a/src/object/itemForSale.c
+++ b/src/object/itemForSale.c
@@ -85,7 +85,7 @@ void ItemForSale_Init(ItemForSaleEntity* this) {
void ItemForSale_Action1(ItemForSaleEntity* this) {
if (super->subAction != 0) {
super->action = 2;
- gUnk_0200AF00.unk_2f = 2;
+ gUnk_0200AF00.rActionPlayerState = 2;
} else {
if (super->type == 0x36) {
if (super->interactType != 0) {
@@ -102,7 +102,7 @@ void ItemForSale_Action1(ItemForSaleEntity* this) {
ResetActiveItems();
gPlayerState.heldObject = 4;
gNewPlayerEntity.unk_74 = super;
- gUnk_0200AF00.unk_2f = 2;
+ gUnk_0200AF00.rActionPlayerState = 2;
MessageClose();
}
}
@@ -112,14 +112,14 @@ void ItemForSale_Action1(ItemForSaleEntity* this) {
void ItemForSale_Action2(ItemForSaleEntity* this) {
void* ptr;
- gUnk_0200AF00.unk_2f = 2;
+ gUnk_0200AF00.rActionPlayerState = 2;
super->spriteSettings.draw = gPlayerEntity.spriteSettings.draw;
if ((gPlayerState.heldObject == 0) || (super != gNewPlayerEntity.unk_74)) {
sub_080819B4(this);
} else {
ptr = sub_080784E4();
if (((*(int*)(ptr + 8) == 0) ||
- ((*(u8*)(ptr + 1) != 1 || (gUnk_0200AF00.unk_2f = 7, (gPlayerState.playerInput.newInput &
+ ((*(u8*)(ptr + 1) != 1 || (gUnk_0200AF00.rActionPlayerState = 7, (gPlayerState.playerInput.newInput &
(PLAYER_INPUT_80 | PLAYER_INPUT_8)) == 0)))) &&
((gPlayerState.playerInput.newInput & (PLAYER_INPUT_80 | PLAYER_INPUT_10 | PLAYER_INPUT_8)) != 0)) {
sub_080819B4(this);
@@ -142,8 +142,8 @@ void sub_080819B4(ItemForSaleEntity* this) {
gNewPlayerEntity.unk_74 = 0;
ptr = &gUnk_0200AF00;
gRoomVars.shopItemType = 0;
- ptr->unk_2c = 0;
- ptr->unk_2f = 0;
+ ptr->rActionInteractObject = 0;
+ ptr->rActionPlayerState = 0;
gRoomVars.shopItemType2 = 0;
super->x.HALF.HI = this->unk_80 + gRoomControls.origin_x;
super->y.HALF.HI = this->unk_82 + gRoomControls.origin_y;
diff --git a/src/player.c b/src/player.c
index d5f7a4e7..fd341662 100644
--- a/src/player.c
+++ b/src/player.c
@@ -1830,7 +1830,7 @@ static void PlayerPull(Entity* this) {
gPlayerState.framestate = PL_STATE_PULL;
sPlayerPullStates[this->subAction](this);
- gUnk_0200AF00.unk_2e = 8;
+ gUnk_0200AF00.rActionGrabbing = 8;
}
static void sub_08072214(Entity* this) {
@@ -2756,7 +2756,7 @@ static void sub_08073584(Entity* this) {
return;
}
- gUnk_0200AF00.unk_2f = 1;
+ gUnk_0200AF00.rActionPlayerState = 1;
if (sub_0807A2F8(0)) {
this->subAction++;
this->direction = 4 * (this->animationState & 6);
diff --git a/src/playerUtils.c b/src/playerUtils.c
index caad6878..5ce3c50d 100644
--- a/src/playerUtils.c
+++ b/src/playerUtils.c
@@ -211,7 +211,7 @@ bool32 IsPreventedFromUsingItem(void) {
}
return FALSE;
default:
- if ((((gUnk_0200AF00.unk_2c == 0xc) && (gPlayerState.field_0x1c == 0)) &&
+ if ((((gUnk_0200AF00.rActionInteractObject == 0xc) && (gPlayerState.field_0x1c == 0)) &&
(gPlayerState.floor_type != SURFACE_SWAMP)) &&
((((gPlayerState.playerInput.heldInput & PLAYER_INPUT_ANY_DIRECTION) != 0 &&
((gPlayerState.flags & (PL_BURNING | PL_ROLLING)) == 0)) &&
@@ -976,21 +976,21 @@ void sub_08078180(void) {
u8 uVar3;
InteractableObject* ptr;
- if (gUnk_0200AF00.unk_2f != 0)
+ if (gUnk_0200AF00.rActionPlayerState != 0)
return;
uVar1 = 0;
if ((gPlayerState.jump_status == 0) &&
((gPlayerState.flags & (PL_IN_HOLE | PL_FROZEN | PL_BURNING | PL_DISABLE_ITEMS | PL_DRUGGED)) == 0)) {
if ((u8)(gPlayerState.heldObject - 1) < 4) {
- if (gUnk_0200AF00.unk_2e != 0) {
- uVar1 = gUnk_0200AF00.unk_2e;
+ if (gUnk_0200AF00.rActionGrabbing != 0) {
+ uVar1 = gUnk_0200AF00.rActionGrabbing;
} else {
uVar1 = 3;
}
} else {
- if (gUnk_0200AF00.unk_2d != 0) {
- uVar1 = gUnk_0200AF00.unk_2d;
+ if (gUnk_0200AF00.rActionInteractTile != 0) {
+ uVar1 = gUnk_0200AF00.rActionInteractTile;
} else {
ptr = sub_080784E4();
if (ptr->entity->interactType == 0) {
@@ -1040,7 +1040,7 @@ void sub_08078180(void) {
}
}
}
- gUnk_0200AF00.unk_2c = uVar1;
+ gUnk_0200AF00.rActionInteractObject = uVar1;
}
bool32 sub_080782C0(void) {
diff --git a/src/ui.c b/src/ui.c
index f51fdfd6..7b9489d7 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -739,30 +739,30 @@ void ItemUIElement(UIElement* element) {
void TextUIElement(UIElement* element) {
UIElement* buttonUIElement;
- u32 tmp;
+ u32 frameIndex;
if (element->type2 == 9) {
- tmp = gUnk_0200AF00.unk_2f;
- if (tmp == 0) {
+ frameIndex = gUnk_0200AF00.rActionPlayerState;
+ if (frameIndex == 0) {
switch (gArea.portal_mode) {
case 2:
- tmp = 0xb;
+ frameIndex = 0xb;
break;
case 3:
- tmp = 0xa;
+ frameIndex = 0xa;
break;
default:
- tmp = gUnk_0200AF00.unk_2c;
+ frameIndex = gUnk_0200AF00.rActionInteractObject;
break;
}
}
- gUnk_0200AF00.buttonText[2] = tmp;
+ gUnk_0200AF00.buttonText[2] = frameIndex;
}
- tmp = gUnk_0200AF00.buttonText[element->buttonElementId];
+ frameIndex = gUnk_0200AF00.buttonText[element->buttonElementId];
element->unk_0_1 = 0;
- if (tmp != 0) {
- tmp += gUnk_080C9044[((SaveHeader*)0x2000000)->language];
- sub_0801CAFC(element, tmp);
+ if (frameIndex != 0) {
+ frameIndex += gUnk_080C9044[((SaveHeader*)0x2000000)->language];
+ sub_0801CAFC(element, frameIndex);
buttonUIElement = FindUIElement(element->buttonElementId);
if (buttonUIElement != NULL) {
element->x = buttonUIElement->x;