PlayerObj exsists || FogTileMap
Set Tile (Player.X/TileSize)+1,(Player.Y/TileSize), [emptyTile]
Set Tile (Player.X/TileSize)+1,(Player.Y/TileSize), [emptyTile]+1
Set Tile (Player.X/TileSize),(Player.Y/TileSize), [emptyTile]+1
Set Tile (Player.X/TileSize)-1,(Player.Y/TileSize), [emptyTile]+1
Set Tile (Player.X/TileSize)-1,(Player.Y/TileSize), [emptyTile]
Set Tile (Player.X/TileSize)-1,(Player.Y/TileSize), [emptyTile]-1
Set Tile (Player.X/TileSize),(Player.Y/TileSize), [emptyTile]-1
Set Tile (Player.X/TileSize)+1,(Player.Y/TileSize), [emptyTile]-1
So this checks to see if the Player Object exists. If it does then it gets the Player Position. There is an X, then Y. X is always first. If we divide the Player's X Position by the width of the tile, then we have what tile they are on. Y is for height.
After we have those numbers we know what tile the Player is on. If we add 1 or minus 1 then we can get the tiles around the player. We can add more or minus more to affect tiles farther away. We can add nothing to them to get the tile the Player is standing on.
Let me know if that helped