Review mapNewMap
This commit is contained in:
parent
b1a8707fb2
commit
980b40dcdd
|
@ -819,7 +819,7 @@ int lsgLoadGame(int mode)
|
||||||
|
|
||||||
messageListFree(&gLoadSaveMessageList);
|
messageListFree(&gLoadSaveMessageList);
|
||||||
|
|
||||||
_map_new_map();
|
mapNewMap();
|
||||||
|
|
||||||
_game_user_wants_to_quit = 2;
|
_game_user_wants_to_quit = 2;
|
||||||
|
|
||||||
|
@ -1143,7 +1143,7 @@ int lsgLoadGame(int mode)
|
||||||
|
|
||||||
showDialogBox(_str0, body, 1, 169, 116, _colorTable[32328], 0, _colorTable[32328], DIALOG_BOX_LARGE);
|
showDialogBox(_str0, body, 1, 169, 116, _colorTable[32328], 0, _colorTable[32328], DIALOG_BOX_LARGE);
|
||||||
|
|
||||||
_map_new_map();
|
mapNewMap();
|
||||||
|
|
||||||
_game_user_wants_to_quit = 2;
|
_game_user_wants_to_quit = 2;
|
||||||
|
|
||||||
|
|
20
src/map.cc
20
src/map.cc
|
@ -285,7 +285,7 @@ void _map_init()
|
||||||
debugPrint("\nError initing map_msg_file!");
|
debugPrint("\nError initing map_msg_file!");
|
||||||
}
|
}
|
||||||
|
|
||||||
_map_new_map();
|
mapNewMap();
|
||||||
tickersAdd(gameMouseRefresh);
|
tickersAdd(gameMouseRefresh);
|
||||||
_gmouse_disable(0);
|
_gmouse_disable(0);
|
||||||
windowUnhide(gIsoWindow);
|
windowUnhide(gIsoWindow);
|
||||||
|
@ -676,7 +676,7 @@ int mapSetEnteringLocation(int elevation, int tile_num, int orientation)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 0x482938
|
// 0x482938
|
||||||
void _map_new_map()
|
void mapNewMap()
|
||||||
{
|
{
|
||||||
mapSetElevation(0);
|
mapSetElevation(0);
|
||||||
tileSetCenter(20100, TILE_SET_CENTER_FLAG_0x02);
|
tileSetCenter(20100, TILE_SET_CENTER_FLAG_0x02);
|
||||||
|
@ -690,17 +690,11 @@ void _map_new_map()
|
||||||
_obj_remove_all();
|
_obj_remove_all();
|
||||||
animationStop();
|
animationStop();
|
||||||
|
|
||||||
if (gMapGlobalVars != NULL) {
|
// NOTE: Uninline.
|
||||||
internal_free(gMapGlobalVars);
|
mapGlobalVariablesFree();
|
||||||
gMapGlobalVars = NULL;
|
|
||||||
gMapGlobalVarsLength = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (gMapLocalVars != NULL) {
|
// NOTE: Uninline.
|
||||||
internal_free(gMapLocalVars);
|
mapLocalVariablesFree();
|
||||||
gMapLocalVars = NULL;
|
|
||||||
gMapLocalVarsLength = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
_square_reset();
|
_square_reset();
|
||||||
_map_place_dude_and_mouse();
|
_map_place_dude_and_mouse();
|
||||||
|
@ -949,7 +943,7 @@ err:
|
||||||
char message[100]; // TODO: Size is probably wrong.
|
char message[100]; // TODO: Size is probably wrong.
|
||||||
sprintf(message, "%s while loading map.", error);
|
sprintf(message, "%s while loading map.", error);
|
||||||
debugPrint(message);
|
debugPrint(message);
|
||||||
_map_new_map();
|
mapNewMap();
|
||||||
rc = -1;
|
rc = -1;
|
||||||
} else {
|
} else {
|
||||||
_obj_preload_art_cache(gMapHeader.flags);
|
_obj_preload_art_cache(gMapHeader.flags);
|
||||||
|
|
|
@ -97,7 +97,7 @@ char* _map_get_description_idx_(int map_index);
|
||||||
int mapGetCurrentMap();
|
int mapGetCurrentMap();
|
||||||
int mapScroll(int dx, int dy);
|
int mapScroll(int dx, int dy);
|
||||||
int mapSetEnteringLocation(int a1, int a2, int a3);
|
int mapSetEnteringLocation(int a1, int a2, int a3);
|
||||||
void _map_new_map();
|
void mapNewMap();
|
||||||
int mapLoadByName(char* fileName);
|
int mapLoadByName(char* fileName);
|
||||||
int mapLoadById(int map_index);
|
int mapLoadById(int map_index);
|
||||||
int mapLoadSaved(char* fileName);
|
int mapLoadSaved(char* fileName);
|
||||||
|
|
Loading…
Reference in New Issue