static void offsetToPointXY(size_t offset, size_t* point_x, size_t *point_y ) { *point_y = ( offset / main_map.getWidth() ); *point_x = ( offset - ( (*point_y) * main_map.getWidth() ) ) * TILE_WIDTH + (TILE_WIDTH / 2); *point_y = (*point_y) * TILE_HEIGHT + (TILE_HEIGHT / 2); }
static size_t getWidth() { return main_map.getWidth(); }
static iXY getSize() { return iXY(main_map.getWidth(), main_map.getHeight()); }
static void getMapPointSize(iXY *map_size) { map_size->x = main_map.getWidth() * tile_set.getTileXsize(); map_size->y = main_map.getHeight() * tile_set.getTileYsize(); }
static size_t mapXYtoOffset(const iXY& map_loc) { return map_loc.y * main_map.getWidth() + map_loc.x; }
static void offsetToMapXY(size_t offset, size_t& x, size_t& y) { y = offset / main_map.getWidth(); x = offset - y * main_map.getWidth(); }