Crossfire Server, Trunk
|
#include "global.h"
Go to the source code of this file.
Functions | |
void | allocate_map (mapstruct *m) |
void | load_objects (mapstruct *m, FILE *fp, int mapflags) |
int | main (int argc, char *argv[]) |
int | mapsave_test (const char *map) |
int | save_objects (mapstruct *m, FILE *fp, FILE *fp2, int flag) |
void allocate_map | ( | mapstruct * | m | ) |
This basically allocates the dynamic array of spaces for the map.
m | map to check. |
Definition at line 812 of file map.cpp.
References fatal(), llevError, LOG(), m, MAP_IN_MEMORY, map_size(), and OUT_OF_MEMORY.
Referenced by get_empty_map(), load_temporary_map(), mapfile_load_lowlevel(), and mapsave_test().
void load_objects | ( | mapstruct * | m, |
FILE * | fp, | ||
int | mapflags | ||
) |
Loads (and parses) the objects into a given map from the specified file pointer.
m | m being loaded. |
fp | file to read from. |
mapflags | the same as we get with mapfile_load() |
Definition at line 603 of file map.cpp.
References FLAG_IS_FLOOR, FLAG_OBJ_ORIGINAL, FLAG_OVERLAY_FLOOR, FLAG_UNIQUE, FOR_MAP_FINISH, FOR_MAP_PREPARE, INS_ABOVE_FLOOR_ONLY, INS_MAP_LOAD, INS_NO_MERGE, INS_NO_WALK_ON, INS_ON_TOP, link_multipart_objects(), LL_MORE, LL_NORMAL, llevDebug, llevError, LO_NEWFILE, LO_REPEAT, load_object(), LOG(), m, MAP_HEIGHT, MAP_OVERLAY, MAP_PLAYER_UNIQUE, MAP_STYLE, MAP_WIDTH, object::more, object_free_drop_inventory(), object_insert_in_map_at(), object_new(), object_remove_from_active_list(), object_sum_weight(), give::op, PLAYER, PROFILE_BEGIN, PROFILE_END, QUERY_FLAG, and SET_FLAG.
Referenced by load_overlay_map(), load_temporary_map(), load_unique_objects(), mapfile_load_lowlevel(), and mapsave_test().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 47 of file check_mapsave.cpp.
References Settings::debug, init_library(), llevDebug, mapsave_test(), and settings.
int mapsave_test | ( | const char * | map | ) |
Definition at line 7 of file check_mapsave.cpp.
References allocate_map(), flags, free_map(), get_linked_map(), load_objects(), m, disinfect::map, MAP_LOADING, MAP_PLAYER_UNIQUE, MAP_SAVING, MAP_STYLE, mapfile_load(), and save_objects().
Referenced by main().
int save_objects | ( | mapstruct * | m, |
FILE * | fp, | ||
FILE * | fp2, | ||
int | flag | ||
) |
This saves all the objects on the map in a non destructive fashion. We only save the head of multi part objects - this is needed in order to do map tiling properly.
m | map to save. |
fp | file where regular objects are saved. |
fp2 | file to save unique objects. |
flag | combination of SAVE_FLAG_xxx flags. |
Definition at line 715 of file map.cpp.
References disinfect::count, FLAG_IS_FLOOR, FLAG_OBJ_ORIGINAL, FLAG_UNIQUE, FLAG_UNPAID, FOR_MAP_FINISH, FOR_MAP_PREPARE, llevDebug, LOG(), m, MAP_HEIGHT, MAP_WIDTH, object_get_owner(), give::op, PLAYER, PROFILE_BEGIN, PROFILE_END, QUERY_FLAG, SAVE_FLAG_NO_REMOVE, SAVE_FLAG_SAVE_UNPAID, save_object_in_sb(), stringbuffer_finish(), and stringbuffer_new().
Referenced by mapsave_test(), and save_map().