Since we are using four sided Tilemaps where each sides may or may not have exits, can we use a struct that has a Pointer to the next tile? We would have a struct ExitTilemap:
| struct ExitTilemap
{
Tilemap* PointerToTilemap; //The new PlayerTileX and PlayerTileY can be computed easily using current player location.
int32 Position; //Where on the row or coloumn the exit is. Won't be necessary if we assign a unique ID to these tiles.
}
|
Four of these will sit inside each tile_map struct, one for each direction.