summaryrefslogtreecommitdiff
path: root/src/code_80521D0_1.c
diff options
context:
space:
mode:
authorCheng Hann Gan <chenghanngan.us@gmail.com>2021-12-09 13:56:12 -0500
committerGitHub <noreply@github.com>2021-12-09 10:56:12 -0800
commita34c9ab91b553fcb1f72b94eb912b94bea58885b (patch)
treea31d0805938a56d1552f952db6ec6ab2defdebe5 /src/code_80521D0_1.c
parent4fc272fea6bc7332fae031ebeb12362cff1c35de (diff)
AI decomp + type cleanup (#82)
* Decomped SetAction() * Changed MapTile.tileType to u16 bit field * Decomped FindStraightThrowableTargets() * Cleaned up CannotAttack() * Cleaned up some externs * Converted dungeon action to substruct
Diffstat (limited to 'src/code_80521D0_1.c')
-rw-r--r--src/code_80521D0_1.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/code_80521D0_1.c b/src/code_80521D0_1.c
index 0ed02f1..433194d 100644
--- a/src/code_80521D0_1.c
+++ b/src/code_80521D0_1.c
@@ -209,9 +209,9 @@ void sub_808BCE4(void)
struct MapTile *puVar1;
puVar1 = GetMapEntity(gDungeonGlobalData->unkE23C, gDungeonGlobalData->unkE23E);
- puVar1->MapTileUnion.tileFlags_u16 &= 0xfffc;
- puVar1->MapTileUnion.tileFlags_u16 |= TILE_TYPE_MAP_EDGE;
- puVar1->MapTileUnion.tileFlags_u16 &= 0xfdff;
+ puVar1->tileType &= ~(TILE_TYPE_FLOOR | TILE_TYPE_UNK_1);
+ puVar1->tileType |= TILE_TYPE_MAP_EDGE;
+ puVar1->tileType &= ~TILE_TYPE_STAIRS;
sub_8049884();
sub_8049B8C();
sub_8049ED4();
@@ -223,10 +223,10 @@ void sub_808BD38(void)
struct MapTile *puVar1;
puVar1 = GetMapEntity(gDungeonGlobalData->unkE23C, gDungeonGlobalData->unkE23E);
- puVar1->MapTileUnion.tileFlags_u16 &= 0xfffc;
- puVar1->MapTileUnion.tileFlags_u16 |= TILE_TYPE_FLOOR;
- puVar1->MapTileUnion.tileFlags_u16 &= 0xffef;
- puVar1->MapTileUnion.tileFlags_u16 |= TILE_TYPE_STAIRS;
+ puVar1->tileType &= ~(TILE_TYPE_FLOOR | TILE_TYPE_UNK_1);
+ puVar1->tileType |= TILE_TYPE_FLOOR;
+ puVar1->tileType &= ~TILE_TYPE_MAP_EDGE;
+ puVar1->tileType |= TILE_TYPE_STAIRS;
puVar1->unk8 = 1;
sub_8049884();
sub_8049B8C();
@@ -1114,7 +1114,7 @@ void sub_808C998(void)
void sub_808C9B0(struct DungeonEntity *param_1)
{
- param_1->entityData->facingDir = DIRECTION_NORTH;
+ param_1->entityData->action.facingDir = DIRECTION_NORTH;
sub_806CE68(param_1, DIRECTION_NORTH);
}