summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTal Hayon <talhayon1@gmail.com>2022-07-22 10:22:03 +0300
committerTal Hayon <talhayon1@gmail.com>2022-07-22 10:22:03 +0300
commitdbe2cd55b2b4b2d4a8d42ebb8da13cf19cf17cda (patch)
treecac7e0224cc4494cb18c91f2013c60f1ea587bed /src
parent0123ca26bd774589afc603652d00b21cf8790579 (diff)
Document two fields in PlayerState
Diffstat (limited to 'src')
-rw-r--r--src/player.c2
-rw-r--r--src/playerUtils.c18
2 files changed, 10 insertions, 10 deletions
diff --git a/src/player.c b/src/player.c
index 92452736..e509c7de 100644
--- a/src/player.c
+++ b/src/player.c
@@ -3705,7 +3705,7 @@ void SurfaceAction_20(Entity* this) {
if (e != NULL) {
e->timer = 1;
UpdateSpriteForCollisionLayer(e);
- CloneTile(57, gPlayerState.field_0x22[0], this->collisionLayer);
+ CloneTile(57, gPlayerState.tilePosition, this->collisionLayer);
}
}
SurfaceAction_Water(this);
diff --git a/src/playerUtils.c b/src/playerUtils.c
index a45a7a6f..1c6dcb9a 100644
--- a/src/playerUtils.c
+++ b/src/playerUtils.c
@@ -56,7 +56,7 @@ void* sub_08077C54(ItemBehavior*);
u32 sub_08079FD4(Entity*, u32);
void LoadRoomGfx(void);
u32 sub_0807A094(u32);
-u32 GetSurfaceCalcType(Entity*, s32, s32);
+SurfaceType GetSurfaceCalcType(Entity*, s32, s32);
void sub_0807AAF8(Entity*, u32);
extern struct_0811BE48 gUnk_0811BE48[];
@@ -243,7 +243,7 @@ bool32 sub_080777A0(void) {
return FALSE;
default:
if ((((gUnk_0200AF00.unk_2c == 0xc) && (gPlayerState.field_0x1c == 0)) &&
- (gPlayerState.floor_type != 0x11)) &&
+ (gPlayerState.floor_type != SURFACE_SWAMP)) &&
((((gPlayerState.field_0x90 & 0xf00) != 0 &&
((gPlayerState.flags & (PL_BURNING | PL_ROLLING)) == 0)) &&
((gPlayerState.jump_status == 0 && (gPlayerState.field_0x3[1] == 0)))))) {
@@ -1192,8 +1192,8 @@ void ClearPlayerState(void) {
gPlayerState.field_0x1f[0] = 0;
gPlayerState.field_0x1f[1] = 0;
gPlayerState.field_0x1f[2] = 0;
- gPlayerState.field_0x22[0] = 0;
- gPlayerState.field_0x22[1] = 0;
+ gPlayerState.tilePosition = 0;
+ gPlayerState.tileType = 0;
gPlayerState.swim_state = 0;
gPlayerState.item = NULL;
gPlayerState.speed_modifier = 0;
@@ -1863,15 +1863,15 @@ void UpdateFloorType(void) {
gUnk_0811C120[gPlayerState.floor_type](&gPlayerEntity);
}
-u32 GetSurfaceCalcType(Entity* param_1, s32 x, s32 y) {
+SurfaceType GetSurfaceCalcType(Entity* param_1, s32 x, s32 y) {
u32 position = TILE(param_1->x.HALF.HI + (u32)x, param_1->y.HALF.HI + y);
u32 tileType = GetTileTypeByPos(param_1->x.HALF.HI + x, param_1->y.HALF.HI + y, gPlayerEntity.collisionLayer);
- if (tileType != gPlayerState.field_0x22[1]) {
+ if (tileType != gPlayerState.tileType) {
gPlayerState.field_0x37 = 0;
}
- if ((tileType != gPlayerState.field_0x22[1]) || (position != gPlayerState.field_0x22[0])) {
- gPlayerState.field_0x22[0] = position;
- gPlayerState.field_0x22[1] = tileType;
+ if ((tileType != gPlayerState.tileType) || (position != gPlayerState.tilePosition)) {
+ gPlayerState.tilePosition = position;
+ gPlayerState.tileType = tileType;
gPlayerState.field_0x11 = 0;
}