diff options
author | Cheng Hann Gan <chenghanngan.us@gmail.com> | 2021-12-09 13:56:12 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-09 10:56:12 -0800 |
commit | a34c9ab91b553fcb1f72b94eb912b94bea58885b (patch) | |
tree | a31d0805938a56d1552f952db6ec6ab2defdebe5 /include/map.h | |
parent | 4fc272fea6bc7332fae031ebeb12362cff1c35de (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 'include/map.h')
-rw-r--r-- | include/map.h | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/include/map.h b/include/map.h index a0a5660..38fe68a 100644 --- a/include/map.h +++ b/include/map.h @@ -5,21 +5,11 @@ #define MAX_ROOM_COUNT 24 // Empirical max, not sure if the code supports any more. - -struct MapTileBitFlagStair -{ - /* 0x0 */ u8 tileFlags; - /* 0x1 */ bool8 stairs; -}; - struct MapTile { - // TODO: can we get rid of the union... is tileFlags a u16 only? - union MapTileUnion - { - struct MapTileBitFlagStair unk0; - u16 tileFlags_u16; - } MapTileUnion; + // Uses the TileType bit flags. + /* 0x0 */ u16 tileType; + u8 fill2[0x4 - 0x2]; u16 unk4; u16 unk6; u8 unk8; @@ -52,9 +42,10 @@ struct RoomExit s16 y; }; -enum TileFlag +enum TileType { TILE_TYPE_FLOOR = 1 << 0, + TILE_TYPE_UNK_1 = 1 << 1, TILE_TYPE_LIQUID = 1 << 2, // Water or lava depending on the dungeon. TILE_TYPE_ROOM_EXIT = 1 << 3, TILE_TYPE_MAP_EDGE = 1 << 4, |