Functions that access the tmp_map_buf based on x, y, cur_x, and cur_y like tile_is_black can get values that crash when near the edge of the map. I've added some checks on tile_is_black that should stop crashes but it isn't a real fix.
You get erroneous darkness messages when looking on the other side of the world wrap, The npcs at 0,0,0 disappear depending on which side of the world you are on which could be problematic in MD. Mouse handling is screwed up near the world edge.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I now call tmpBufTileIsBlack in tile_is_black and it doesn't seem to crash though the there may still be issues.
drawActors(), get_objAtCursor(), and get_objAtCursor() might have issues.
You get erroneous darkness messages when looking on the other side of the world wrap, The npcs at 0,0,0 disappear depending on which side of the world you are on which could be problematic in MD. Mouse handling is screwed up near the world edge.