Crossfire Server, Trunk
|
#include "global.h"
Go to the source code of this file.
Functions | |
int | main (int argc, char *argv[]) |
void | map_path (const char *map, int flags, char *pathname, size_t bufsize) |
mapstruct * | mapfile_load_lowlevel (const char *map, const char *pathname, int flags) |
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 24 of file test_mapsave.cpp.
References buf, Settings::debug, flags, free_map(), init_library(), llevInfo, LOG(), m, map_path(), MAP_PLAYER_UNIQUE, mapfile_load(), mapfile_load_lowlevel(), MAX_BUF, save_map(), and settings.
void map_path | ( | const char * | map, |
int | flags, | ||
char * | pathname, | ||
size_t | bufsize | ||
) |
test_mapsave.cpp – save stability test
This file creates a program that loads and saves a map given by the in-game PATH (e.g. /world/world_105_115). If everything is working, load/save should not change the file.
Due to the lack of correct linked list reversing, we load/save twice to get the same order of objects again.
For normal (e.g. world) maps, load/save saves to a temporary file, so we can avoid modifying the original file and diff between the original and saved temporary file.
For unique (e.g. apartment) maps, this test SAVES OVER THE ORIGINAL FILE. So you should make a copy of the original file so you can diff the result.
Definition at line 1165 of file map.cpp.
References create_overlay_pathname(), create_pathname(), flags, Settings::localdir, disinfect::map, MAP_OVERLAY, MAP_PLAYER_UNIQUE, Settings::playerdir, and settings.
Referenced by main(), map_info(), and mapfile_load().
mapstruct* mapfile_load_lowlevel | ( | const char * | map, |
const char * | pathname, | ||
int | flags | ||
) |
Definition at line 1175 of file map.cpp.
References allocate_map(), delete_map(), flags, get_linked_map(), HUGE_BUF, llevDebug, llevError, load_map_header(), load_objects(), LOG(), m, disinfect::map, MAP_IN_MEMORY, MAP_LOADING, MAP_PLAYER_UNIQUE, MAP_STYLE, and safe_strncpy.
Referenced by main(), and mapfile_load().