![]() |
Crossfire Server, Trunk
1.75.0
|
#include <ctype.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <time.h>
#include "global.h"
#include "sproto.h"
#include "image.h"
#include "quest.h"
#include <gd.h>
#include <gdfonts.h>
#include <gdfontl.h>
#include <gdfontg.h>
#include "inja.hpp"
#include <map>
#include <set>
Go to the source code of this file.
Data Structures | |
class | pageToRender |
One page to render, with its parameters. More... | |
struct | struct_equipment |
One special item (weapon, shield, ...). More... | |
struct | struct_map_in_quest |
Link between a quest and a map. More... | |
struct | struct_map_in_quest_list |
Utility structure to group map-quest link structure. More... | |
struct | struct_map_info |
Map information. More... | |
struct | struct_map_list |
List of maps. More... | |
struct | struct_npc_info |
Information about a NPC with a custom message. More... | |
struct | struct_quest |
One quest. More... | |
struct | struct_race |
One monster race in the maps. More... | |
struct | struct_race_list |
Collection of races. More... | |
struct | struct_region_info |
Region information. More... | |
struct | struct_slaying_info |
slaying information. More... | |
Macros | |
#define | S_CONNECT 4 |
#define | S_CONTAINER 2 |
#define | S_DETECTOR 3 |
#define | S_DOOR 0 |
Connection/slaying information. More... | |
#define | S_KEY 1 |
#define | S_MAX 5 |
#define | SIZE 50 |
#define | size_large sizes[0] |
#define | size_small sizes[1] |
Typedefs | |
typedef std::vector< struct_npc_info * > | npc_list |
List of NPCs with a custom message. More... | |
Enumerations | |
enum | output_format_type { OF_PNG = 0, OF_JPG = 1 } |
Map output formats. More... | |
enum | SearchType { SearchType::Region = 1, SearchType::Map, SearchType::Item, SearchType::Monster, SearchType::Quest, SearchType::Count } |
Search values, for the JS search engine. More... | |
Functions | |
static void | add_map (struct_map_info *info, struct_map_list *list) |
Adds a map to specified array, if it isn't already. More... | |
static void | add_map_to_quest (struct_map_info *map, const char *name, const char *description) |
Links a map to a quest. More... | |
static void | add_map_to_region (struct_map_info *map, region *reg) |
Links a map to a region. More... | |
static void | add_map_to_slaying (struct_slaying_info *info, int item, struct_map_info *map) |
Adds the specified map to the slaying information if not already present. More... | |
static void | add_monster (object *monster, struct_map_info *map) |
Adds a monster to the monster list. More... | |
static void | add_npc_to_map (npc_list *list, const object *npc) |
Add the specified NPC to the list. More... | |
static void | add_one_item (object *item, struct_map_info *map) |
Adds an item to the list of special items. More... | |
static void | add_race_to_list (struct_race *race, struct_race_list *list, int check) |
Appends a race to a race list. More... | |
static void | add_region_link (mapstruct *source, mapstruct *dest) |
Creates a link between two maps if they are on different regions. More... | |
static void | add_slaying (struct_map_info *map, object *item) |
Adds the item's information to the map. More... | |
void | add_template_to_render (const std::string &template_name, const std::string &output_name, const std::string ¶m) |
Push the specified template, with optional param, on the list of files to process. More... | |
static void | add_to_struct_map_in_quest_list (struct_map_in_quest_list *list, struct_map_in_quest *item) |
static void | append_map_list (struct_map_list &dest, struct_map_list &src) |
Append the contents of src to dest. More... | |
static void | check_equipment (object *item, struct_map_info *map) |
Checks if item and its inventory are worthy to be listed. More... | |
static void | check_slaying_inventory (struct_map_info *map, object *item) |
Recursively checks if the object should be considered for slaying information. More... | |
static int | compare_map_info (const struct_map_info *left, const struct_map_info *right) |
Compares struct_map_info according to the map name or the path if equal. More... | |
static void | create_destination (void) |
Ensures destination directory exists. More... | |
static nlohmann::json | create_map_in_quest_array (struct_map_in_quest_list &list) |
Return an array of map-in-quest items. More... | |
static struct_map_info * | create_map_info (void) |
Returns an initialised struct_map_info. More... | |
static nlohmann::json | create_map_object (struct_map_info *map, const std::string &key) |
Return a JSON map object. More... | |
static nlohmann::json | create_maps_array (struct_map_list &maps) |
Return an array of map identifiers. More... | |
static nlohmann::json | create_npc_array (npc_list &list) |
Return an array of NPC information. More... | |
static struct_npc_info * | create_npc_info (const object *npc) |
Create the struct_npc_info from the specified NPC. More... | |
static nlohmann::json | create_quest_object (struct_quest *quest, const std::string &key) |
Return a JSON quest object. More... | |
static nlohmann::json | create_race_array (struct_race_list &list) |
Return an array of monster information. More... | |
static nlohmann::json | create_region_array (const std::set< region * > ®ions) |
Return an array of region identifiers. More... | |
static struct_map_info * | create_tiled_map (void) |
Create a new tiled map and link it to the tiled map list. More... | |
static void | define_quest (const char *name, struct_map_info *mainmap, const char *description) |
Sets the main map for a quest. More... | |
void | do_auto_apply (mapstruct *m) |
static void | do_exit_map (mapstruct *map) |
Proceses exit / road / blocking information for specified map into the global infomap map. More... | |
static void | do_help (const char *program) |
Prints usage information, and exit. More... | |
static void | do_parameters (int argc, char **argv) |
Handles command-line parameters. More... | |
static void | do_tiled_map_picture (struct_map_info *map) |
Generates the large and small pictures for a tiled map. More... | |
static void | dump_unused_maps (void) |
Writes the list of unused maps, maps found in the directories but not linked from the other maps. More... | |
static struct_equipment * | ensure_unique (struct_equipment *item) |
Searches the item list for an identical item, except maps. More... | |
static void | fill_json (nlohmann::json &json) |
Add all global variables to the data available to templates. More... | |
static void | fill_reverse_maps (struct_map_list &list) |
Fill the reverse_maps array with the provided list. More... | |
static struct_map_info * | find_map_by_key (const std::string &key) |
Get the map with the specified key, nullptr if not found. More... | |
static void | find_maps (const char *from) |
Recursively find all all maps in a directory. More... | |
static struct_quest * | find_quest_info (const char *name) |
Gets the information for a quest if it exists. More... | |
static region * | find_region_by_key (const std::string &key) |
Get the region with the specified key, nullptr if not found. More... | |
static void | fix_exits_for_map (struct_map_info *current, struct_map_list *from, int is_from) |
Changes for the list all maps to the tiled map they are part of, if applicable. More... | |
static void | fix_exits_to_tiled_maps (void) |
Changes all exits to maps in a tiled map to point directly to the tiled map. More... | |
static void | fix_map_names (void) |
Ensures all maps have a name (if there was a limit to map processing, some maps will have a NULL name which causes issues). More... | |
static void | fix_tiled_map (void) |
Ensures all tiled maps have a name, a region, a filename and a path. More... | |
static void | fix_tiled_map_monsters (void) |
Makes all monsters point to tiled maps instead of map when appliable, and merge map monster to tiled map. More... | |
static void | free_equipment (struct_equipment *equip) |
Frees a struct_equipment. More... | |
static nlohmann::json | generate_page_and_link (inja::Arguments &args) |
Create a link to a page, generating it if needed. More... | |
static nlohmann::json | generate_picture_link (inja::Arguments &args) |
Return the link to the picture of the specified item. More... | |
static void | generate_picture_path (const char *path, size_t pic_size, char *out, size_t len) |
static int | get_elevation_color (int elevation, gdImagePtr elevationmap) |
Gets the color for an elevation. More... | |
static struct_equipment * | get_equipment (void) |
Gets an empty struct_equipment. More... | |
static struct_map_info * | get_map_info (const char *path) |
Gets or creates if required the info structure for a map. More... | |
static struct_quest * | get_quest_info (const char *name) |
Gets the information for a quest, create the field if needed. More... | |
static struct_race * | get_race (const char *name) |
Returns the race for specified name. More... | |
static struct_slaying_info * | get_slaying_struct (const char *slaying) |
Returns a struct_slaying_info for specified slaying. More... | |
static inja::Template | get_template (const std::string &filename) |
static void | init_map_list (struct_map_list *list) |
Initialises a list structure. More... | |
static void | init_race_list (struct_race_list *list) |
Blanks a struct_race_list. More... | |
static void | init_renderer_env () |
Initialize env and set various callbacks and options. More... | |
static void | init_struct_map_in_quest_list (struct_map_in_quest_list *list) |
static int | is_blocking (object *item) |
Checks if item blocks movement or not. More... | |
static int | is_road (object *item) |
Checks if object is considered a road or not. More... | |
static int | is_slaying (object *item) |
Is the slaying field relevant for this item? More... | |
static int | is_special_equipment (object *item) |
static void | list_map (const char *path) |
Marks specified path as processed. More... | |
int | main (int argc, char **argv) |
static void | merge_tiled_maps (struct_map_info *map, struct_map_info *tiled_map) |
Merge two tiled maps groups. More... | |
static std::string | path_from_current (const std::string &path) |
Compute the relative path from the specified file to the current file. More... | |
static void | process_map (struct_map_info *info) |
Processes a map. More... | |
static void | process_map_lore (struct_map_info *map) |
Extracts from the map's lore quest information if found. More... | |
static void | quest_callback (const quest_definition *quest, void *) |
static void | relative_path (const char *from, const char *to, char *result) |
Computes the shortest path from one file to another. More... | |
static const char * | remove_trailing_slash (const char *path) |
static void | save_picture (FILE *file, gdImagePtr pic) |
Saves a map to a file, based on jpg/png settings. More... | |
static bool | sort_equipment (const struct_equipment *l, const struct_equipment *r) |
Sort 2 struct_equipment. More... | |
static int | sort_map_info (const void *left, const void *right) |
Sorts the struct_map_info according to the map name or the path if equal. More... | |
static int | sort_race (const void *a, const void *b) |
Sort 2 struct_race. More... | |
static int | sort_region (const void *left, const void *right) |
Sorts an array of struct_region_info by region name. More... | |
static int | sort_slaying (const void *left, const void *right) |
Helper function to sort an array of struct_slaying_info. More... | |
static int | sort_struct_map_in_quest (const void *left, const void *right) |
Sorts 2 struct_map_in_quest, on the map's name or path. More... | |
static int | sort_struct_quest (const void *left, const void *right) |
Sorts 2 struct_quest, on the map's name or path. More... | |
static std::vector< std::string > | split (const std::string &field, const std::string &by) |
static std::string | templates_root ("templates/") |
Directory to get templates from, with a leading /. More... | |
static int | tiled_map_need_pic (struct_map_info *map) |
static void | write_pictures_from_real_size (const char *path, gdImagePtr real, int width, int height) |
static void | write_tiled_map_page (struct_map_info *map) |
Writes the page for a tiled map group. More... | |
static void | write_tiled_maps (void) |
Outputs all tiled map pages. More... | |
static void | write_world_info (void) |
Writes the exit information world map. More... | |
static void | write_world_map (void) |
Generates a big world map. More... | |
static const char * | yesno (int value) |
Helper to write yes/no. More... | |
Variables | |
static nlohmann::json | all_data |
All JSON data available to templates. More... | |
static bool | build_search_file = false |
If set, will build the 'search_data.js' file. More... | |
static int | cached_pics = 0 |
Non recreated pics. More... | |
static int | color_blocking |
Block all movement. More... | |
static int | color_linked_exit |
Exit leading to another map. More... | |
static int | color_road |
Road or equivalent. More... | |
static int | color_slowing |
Slows movement. More... | |
static int | color_unlinked_exit |
Color for exits without a path set. More... | |
static int | created_pics = 0 |
Picture statistics. More... | |
static bool | detail_quests = false |
Whether to show all quests details or not. More... | |
static bool | display_rendered_template = false |
Whether to display the template to be rendered or not. More... | |
static bool | do_regions_link = false |
static int ** | elevation_info |
All elevation spots in the "world_" maps. More... | |
static int | elevation_max |
Lowest elevation found. More... | |
static int | elevation_min |
Maximal elevation found. More... | |
static std::shared_ptr< inja::Environment > | env |
Rendering environment. More... | |
static int | force_pics = 0 |
To force picture regeneration even if map didn't change. More... | |
static std::vector< char * > | found_maps |
Maps found in directories. More... | |
static std::vector< gdImagePtr > | gdfaces |
static int | generate_pics = 1 |
Whether to generate the picture or not. More... | |
static const char * | ignore_name [] |
File names to ignore for map search. More... | |
static const char * | ignore_path [] |
Directories to ignore for map search. More... | |
static gdImagePtr | infomap |
World map with exits / roads / blocking / ... More... | |
static int | jpeg_quality = -1 |
Quality for jpg pictures. More... | |
static bool | list_system_quests = false |
Whether to show 'system' quests or not. More... | |
static int | list_unused_maps = 0 |
If set, program will list maps found in directory but not linked from the first maps. More... | |
static int | map_limit = -1 |
Maximum number of maps to browse, -1 for all. More... | |
static struct_map_list | maps_list |
Maps to process or found. More... | |
static const int | num_sizes = sizeof(sizes)/sizeof(int) |
static const char * | output_extensions [] |
Extensions depending on output format. More... | |
static enum output_format_type | output_format = OF_PNG |
Selected output format. More... | |
static std::vector< pageToRender > | pages |
List of pages to render. More... | |
static std::vector< std::string > | path_stack |
Path, relative to output root, of pages being generated. More... | |
static int | pics_allocated |
Number of created pictures for GD. More... | |
static struct_quest ** | quests = NULL |
All quests in the game. More... | |
static int | quests_allocated = 0 |
Allocated items in quests. More... | |
static int | quests_count = 0 |
Count of quests. More... | |
static struct_race_list | races |
Monsters found in maps. More... | |
static int | rawmaps = 0 |
Whether to generate raw pics or instancied ones. More... | |
static size_t | region_allocated = 0 |
Allocated size of regions. More... | |
static size_t | region_count = 0 |
Count of regions. More... | |
static std::map< region *, std::set< region * > > | region_links |
static struct struct_region_info ** | regions = NULL |
Found regions. More... | |
static std::set< std::string > | rendered_templates |
List of generated files, to not generate multiple times. More... | |
static std::set< std::string > | reset_groups |
All defined reset groups. More... | |
static std::map< struct_map_info *, std::string > | reverse_maps |
Link between a map and its unique identifier. More... | |
static std::map< region *, std::string > | reverse_regions |
Link between a region and its unique identifier. More... | |
static char | root [500] |
Path to store generated files. More... | |
static std::string | SearchName [int(SearchType::Count)] |
Search names for types, for the JS search engine. More... | |
static int | show_maps = 0 |
If set, will generate much information on map loaded. More... | |
static int | sizes [] = {32, 16, 8, 4, 2} |
static size_t | slaying_allocated = 0 |
Allocated size of slaying_info. More... | |
static size_t | slaying_count = 0 |
Count of items in slaying_info. More... | |
static struct_slaying_info ** | slaying_info = NULL |
Found slaying fields. More... | |
static std::vector< struct_equipment * > | special_equipment |
Special equipment list. More... | |
static std::vector< quest_definition * > | system_quests |
static inja::TemplateStorage | templateCache |
static std::vector< std::string > | templates |
List of template files to start processing from. More... | |
static struct_map_list | tiled_map_list |
Pseudo-maps grouping other maps. More... | |
static int | tileset = 0 |
Tileset to use to generate pics. More... | |
static int | warn_no_path = 0 |
Whether to warn of exits without a path. More... | |
static int | world_exit_info = 1 |
If set, will generate a world map of exits. More... | |
static int | world_map = 1 |
If set, will generate a world map. More... | |
Main file for Crossfire Mapper.
Definition in file mapper.cpp.
#define S_CONNECT 4 |
Definition at line 441 of file mapper.cpp.
#define S_CONTAINER 2 |
Definition at line 439 of file mapper.cpp.
#define S_DETECTOR 3 |
Definition at line 440 of file mapper.cpp.
#define S_DOOR 0 |
Connection/slaying information.
Definition at line 437 of file mapper.cpp.
#define S_KEY 1 |
Definition at line 438 of file mapper.cpp.
#define S_MAX 5 |
Definition at line 442 of file mapper.cpp.
#define SIZE 50 |
#define size_large sizes[0] |
Definition at line 364 of file mapper.cpp.
#define size_small sizes[1] |
Definition at line 365 of file mapper.cpp.
typedef std::vector<struct_npc_info *> npc_list |
List of NPCs with a custom message.
Definition at line 216 of file mapper.cpp.
enum output_format_type |
Map output formats.
Enumerator | |
---|---|
OF_PNG | PNG, default value. |
OF_JPG | JPG. |
Definition at line 381 of file mapper.cpp.
|
strong |
Search values, for the JS search engine.
Enumerator | |
---|---|
Region | |
Map | |
Item | |
Monster | |
Quest | |
Count |
Definition at line 295 of file mapper.cpp.
|
static |
Adds a map to specified array, if it isn't already.
info | map to add. |
list | list to add to. |
Definition at line 1218 of file mapper.cpp.
References list.
Referenced by add_map_to_region(), add_map_to_slaying(), add_monster(), add_one_item(), append_map_list(), create_tiled_map(), do_parameters(), fix_exits_for_map(), fix_exits_to_tiled_maps(), fix_tiled_map_monsters(), get_map_info(), merge_tiled_maps(), and process_map().
|
static |
Links a map to a quest.
map | map to link. |
name | quest name. |
description | associated link description. Must not be NULL. |
Definition at line 1014 of file mapper.cpp.
References add_to_struct_map_in_quest_list(), description, struct_map_in_quest::description, get_quest_info(), struct_map_in_quest::map, struct_quest::maps, name, struct_map_in_quest::quest, and struct_map_info::quests.
Referenced by process_map_lore().
|
static |
Links a map to a region.
Will not readd the map if already linked.
map | map name. |
reg | region to link the map to. |
Definition at line 1359 of file mapper.cpp.
References add_map(), struct_region_info::is_world, maps_list, struct_map_info::path, struct_region_info::reg, region_allocated, region_count, regions, struct_region_info::sum, struct_region_info::sum_x, and struct_region_info::sum_y.
Referenced by process_map().
|
static |
Adds the specified map to the slaying information if not already present.
info | structure to add to. |
item | one of the S_xxx values specifying what type of slaying this is. |
map | map to add. |
Definition at line 1470 of file mapper.cpp.
References add_map(), and struct_slaying_info::maps.
Referenced by add_slaying().
|
static |
Adds a monster to the monster list.
monster | monster to add. Can be any part. |
map | map to add the monster to. |
Definition at line 677 of file mapper.cpp.
References add_map(), add_race_to_list(), get_race(), MAX, struct_map_info::max_monster, MIN, struct_map_info::min_monster, monster, struct_map_info::monsters, and struct_race::origin.
Referenced by process_map().
Add the specified NPC to the list.
list | where to add the NPC. |
npc | NPC to add. Must have a name and message. |
Definition at line 1202 of file mapper.cpp.
References create_npc_info(), and list.
Referenced by process_map().
|
static |
Adds an item to the list of special items.
item | item to add. |
map | map it is on. |
Definition at line 557 of file mapper.cpp.
References add_map(), object::arch, arch_to_object(), artifact, object::artifact, calc_item_power(), struct_equipment::calc_power, struct_equipment::diff, ensure_unique(), find_artifact(), FLAG_IDENTIFIED, FLAG_UNPAID, free_equipment(), FREE_OBJ_FREE_INVENTORY, FREE_OBJ_NO_DESTROY_CALLBACK, get_equipment(), get_ob_diff(), give_artifact_abilities(), artifact::item, object::item_power, llevError, LOG(), name, struct_equipment::name, object::name, object::name_pl, object::nrof, object_free(), object_give_identified_properties(), struct_equipment::origin, struct_equipment::power, QUERY_FLAG, SET_FLAG, sstring, stringbuffer_finish(), stringbuffer_new(), object::type, object::x, and object::y.
Referenced by check_equipment().
|
static |
Appends a race to a race list.
race | race to add. |
list | list to add to. |
check | if 0, don't check if race is already on the list ; else don't make duplicated entries. |
Definition at line 335 of file mapper.cpp.
References list.
Referenced by add_monster(), fix_tiled_map_monsters(), and get_race().
Creates a link between two maps if they are on different regions.
source | map from. |
dest | map to. |
Definition at line 1407 of file mapper.cpp.
References d, get_region_by_map(), and region_links.
Referenced by process_map().
|
static |
Adds the item's information to the map.
map | map containing the item. |
item | item which slaying field we're considering. |
Definition at line 1482 of file mapper.cpp.
References add_map_to_slaying(), CONTAINER, DETECTOR, get_slaying_struct(), LOCKED_DOOR, S_CONNECT, S_CONTAINER, S_DETECTOR, S_DOOR, S_KEY, object::slaying, SPECIAL_KEY, and object::type.
Referenced by check_slaying_inventory(), and process_map().
void add_template_to_render | ( | const std::string & | template_name, |
const std::string & | output_name, | ||
const std::string & | param | ||
) |
Push the specified template, with optional param, on the list of files to process.
template_name | template name to use. |
output_name | output file name. |
param | additional parameter to the template. |
Definition at line 2719 of file mapper.cpp.
References pageToRender::output_name, pages, pageToRender::param, rendered_templates, and pageToRender::template_name.
Referenced by generate_page_and_link(), and main().
|
static |
Definition at line 955 of file mapper.cpp.
References list.
Referenced by add_map_to_quest().
|
static |
Append the contents of src to dest.
dest | where to put items. |
src | what to append to dest, unchanged. |
Definition at line 2395 of file mapper.cpp.
References add_map(), struct_map_list::count, and struct_map_list::maps.
Referenced by fill_json().
|
static |
Checks if item and its inventory are worthy to be listed.
item | item to check. |
map | map the item is on. |
Definition at line 631 of file mapper.cpp.
References add_one_item(), FOR_INV_FINISH, FOR_INV_PREPARE, and is_special_equipment().
Referenced by process_map().
|
static |
Recursively checks if the object should be considered for slaying information.
map | map containing the items. |
item | item to consider. Must not be NULL. |
Definition at line 1510 of file mapper.cpp.
References add_slaying(), FOR_INV_FINISH, FOR_INV_PREPARE, and is_slaying().
Referenced by process_map().
|
static |
Compares struct_map_info according to the map name or the path if equal.
left | first item. |
right | second item. |
Definition at line 873 of file mapper.cpp.
References c, struct_map_info::name, struct_map_info::path, strcasecmp(), and struct_map_info::tiled_group.
Referenced by sort_map_info().
|
static |
Ensures destination directory exists.
Definition at line 3113 of file mapper.cpp.
References make_path_to_file(), and root.
Referenced by main().
|
static |
Return an array of map-in-quest items.
list | items to return the JSON of. |
Definition at line 2309 of file mapper.cpp.
References list, m, and reverse_maps.
Referenced by create_map_object(), and create_quest_object().
|
static |
Returns an initialised struct_map_info.
Definition at line 1239 of file mapper.cpp.
References struct_map_info::exits_from, struct_map_info::exits_to, init_map_list(), init_race_list(), init_struct_map_in_quest_list(), struct_map_info::min_monster, struct_map_info::monsters, struct_map_info::npcs, struct_map_info::quests, struct_map_info::readable, struct_map_info::tiled_group, and struct_map_info::tiled_maps.
Referenced by create_tiled_map(), and get_map_info().
|
static |
Return a JSON map object.
map | map to return the JSON of. |
key | map unique identifier. |
Definition at line 2337 of file mapper.cpp.
References struct_map_info::cfregion, create_map_in_quest_array(), create_maps_array(), create_npc_array(), create_race_array(), struct_map_info::exits_from, struct_map_info::exits_to, struct_map_info::level, struct_map_info::lore, struct_map_info::monsters, struct_map_info::name, struct_map_info::npcs, struct_map_info::path, struct_map_info::quests, struct_map_info::readable, remove_trailing_slash(), struct_map_info::reset_group, and reverse_regions.
Referenced by fill_json().
|
static |
Return an array of map identifiers.
maps | items to return the JSON of. |
Definition at line 2257 of file mapper.cpp.
References m, maps, and reverse_maps.
Referenced by create_map_object(), and fill_json().
|
static |
Return an array of NPC information.
list | items to return the JSON of. |
Definition at line 2273 of file mapper.cpp.
References list.
Referenced by create_map_object().
|
static |
Create the struct_npc_info from the specified NPC.
It must have a name and message.
npc | NPC to gather info for. |
Definition at line 1184 of file mapper.cpp.
References struct_npc_info::message, object::msg, struct_npc_info::name, object::name, struct_npc_info::x, object::x, struct_npc_info::y, and object::y.
Referenced by add_npc_to_map().
|
static |
Return a JSON quest object.
quest | quest to return the JSON of. |
key | quest unique key. |
Definition at line 2361 of file mapper.cpp.
References create_map_in_quest_array(), struct_quest::description, struct_quest::mainmap, struct_quest::maps, struct_quest::name, struct_quest::number, and reverse_maps.
Referenced by fill_json().
|
static |
Return an array of monster information.
list | items to return the JSON of. |
Definition at line 2292 of file mapper.cpp.
References list.
Referenced by create_map_object().
Return an array of region identifiers.
regions | regions to process. |
Definition at line 2405 of file mapper.cpp.
References regions, and reverse_regions.
Referenced by fill_json().
|
static |
Create a new tiled map and link it to the tiled map list.
Definition at line 1261 of file mapper.cpp.
References add_map(), create_map_info(), and tiled_map_list.
Referenced by process_map().
|
static |
Sets the main map for a quest.
name | quest name. |
mainmap | main map to associate. |
description | quest description. Must not be NULL. |
Definition at line 1080 of file mapper.cpp.
References description, struct_quest::description, get_quest_info(), struct_quest::mainmap, name, struct_quest::name, and struct_map_info::path.
Referenced by process_map_lore().
void do_auto_apply | ( | mapstruct * | m | ) |
Definition at line 3314 of file mapper.cpp.
References ALTAR, apply_auto(), check_trigger(), CLASS, CONTAINER, create_treasure(), FIREWALL, FLAG_AUTO_APPLY, FLAG_IS_LINKED, FOR_INV_FINISH, FOR_INV_PREPARE, FOR_MAP_FINISH, FOR_MAP_PREPARE, HAS_RANDOM_ITEMS, HEAD, m, MAP_HEIGHT, MAP_WIDTH, object_update_speed(), PLAYER, PLAYER_CHANGER, POTION, QUERY_FLAG, ROD, SCROLL, SPELL, SPELLBOOK, TIMED_GATE, TREASURE, TRIGGER_BUTTON, TRIGGER_PEDESTAL, and WAND.
Referenced by process_map().
|
static |
Proceses exit / road / blocking information for specified map into the global infomap map.
If map isn't a world map, won't do anything.
map | map to write info for. |
Definition at line 777 of file mapper.cpp.
References color_blocking, color_linked_exit, color_road, color_slowing, color_unlinked_exit, elevation_info, elevation_max, elevation_min, EXIT, FOR_MAP_FINISH, FOR_MAP_PREPARE, HEAD, infomap, is_blocking(), is_road(), MAP_HEIGHT, MAP_WIDTH, MAX, MIN, object::move_slow, mapstruct::path, object::slaying, TELEPORTER, and object::type.
Referenced by process_map().
|
static |
Prints usage information, and exit.
program | program path. |
Definition at line 2992 of file mapper.cpp.
Referenced by do_parameters().
|
static |
Handles command-line parameters.
argc | number of parameters, including program name. |
argv | arguments, including program name. |
Definition at line 3029 of file mapper.cpp.
References add_map(), build_search_file, detail_quests, display_rendered_template, do_help(), do_regions_link, force_pics, generate_pics, get_map_info(), jpeg_quality, list_system_quests, list_unused_maps, map_limit, maps_list, OF_JPG, output_format, path(), rawmaps, root, show_maps, templates, templates_root(), tileset, warn_no_path, world_exit_info, and world_map.
Referenced by main().
|
static |
Generates the large and small pictures for a tiled map.
This uses the large/small pictures made during process_map(), so having a map limit could lead to maps not found and invalid results.
map | tiled map to make the picture of. |
Definition at line 2087 of file mapper.cpp.
References struct_map_list::count, generate_pics, generate_picture_path(), struct_map_info::height, struct_map_list::maps, struct_map_info::name, OF_PNG, output_format, struct_map_info::path, struct_map_info::processed, size_large, tiled_map_need_pic(), struct_map_info::tiled_maps, struct_map_info::tiled_x_from, struct_map_info::tiled_y_from, struct_map_info::tiles, struct_map_info::width, and write_pictures_from_real_size().
Referenced by write_tiled_map_page().
|
static |
Writes the list of unused maps, maps found in the directories but not linked from the other maps.
Definition at line 2909 of file mapper.cpp.
References dump(), found_maps, path(), and root.
Referenced by main().
|
static |
Searches the item list for an identical item, except maps.
item | item to search. The variable may be freed, so must not be used after calling this function. |
Definition at line 533 of file mapper.cpp.
References free_equipment(), and special_equipment.
Referenced by add_one_item().
|
static |
Add all global variables to the data available to templates.
json | what to fill. |
Definition at line 2431 of file mapper.cpp.
References append_map_list(), buf, build_search_file, struct_race_list::count, struct_map_in_quest_list::count, struct_map_list::count, Count, create_map_object(), create_maps_array(), create_quest_object(), create_region_array(), detail_quests, env, fill_reverse_maps(), find_quest_info(), get_template(), init_map_list(), Item, region::longname, m, Map, maps, struct_map_list::maps, struct_quest::maps, maps_list, Monster, region::msg, region::name, Quest, quests, quests_count, struct_race_list::races, races, Region, region_count, region_links, regions, reset_groups, reverse_maps, reverse_regions, root, S_CONNECT, S_CONTAINER, S_DETECTOR, S_DOOR, S_KEY, SearchName, slaying_count, slaying_info, sort_map_info(), sort_struct_map_in_quest(), special_equipment, system_quests, and tiled_map_list.
Referenced by main().
|
static |
Fill the reverse_maps array with the provided list.
list | maps to put. |
Definition at line 2376 of file mapper.cpp.
References buf, list, reverse_maps, sort_map_info(), and sort_race().
Referenced by fill_json().
|
static |
Get the map with the specified key, nullptr if not found.
key | key of the map to find. |
Definition at line 2233 of file mapper.cpp.
References c, is_valid_types_gen::found, and reverse_maps.
Referenced by generate_page_and_link(), and generate_picture_link().
|
static |
Recursively find all all maps in a directory.
from | path to search from, without trailing /. |
Definition at line 2869 of file mapper.cpp.
References closedir(), Settings::datadir, found_maps, HUGE_BUF, ignore_name, ignore_path, Settings::mapdir, opendir(), path(), readdir(), and settings.
Referenced by main().
|
static |
Gets the information for a quest if it exists.
name | quest's name. |
Definition at line 968 of file mapper.cpp.
References name, quests, and quests_count.
Referenced by fill_json(), and get_quest_info().
|
static |
Get the region with the specified key, nullptr if not found.
key | key of the region to find. |
Definition at line 2245 of file mapper.cpp.
References c, is_valid_types_gen::found, and reverse_regions.
Referenced by generate_page_and_link().
|
static |
Changes for the list all maps to the tiled map they are part of, if applicable.
current | map currently being processed. |
from | list that contains the exits to/from map to be fixed. |
is_from | if non zero, from is exit_from field, else it is an exit_to. |
Definition at line 1983 of file mapper.cpp.
References add_map(), struct_map_list::count, struct_map_info::exits_from, struct_map_info::exits_to, struct_map_list::maps, and struct_map_info::tiled_group.
Referenced by fix_exits_to_tiled_maps().
|
static |
Changes all exits to maps in a tiled map to point directly to the tiled map.
Same for region lists.
Definition at line 2002 of file mapper.cpp.
References add_map(), struct_map_list::count, struct_map_info::exits_from, struct_map_info::exits_to, fix_exits_for_map(), struct_map_list::maps, maps_list, struct_region_info::maps_list, region_count, regions, and struct_map_info::tiled_group.
Referenced by main().
|
static |
Ensures all maps have a name (if there was a limit to map processing, some maps will have a NULL name which causes issues).
Definition at line 1896 of file mapper.cpp.
References struct_map_list::count, struct_map_info::filename, struct_map_list::maps, maps_list, and struct_map_info::name.
Referenced by main().
|
static |
Ensures all tiled maps have a name, a region, a filename and a path.
Will try to find a suitable name and region from the maps in the group.
Definition at line 1914 of file mapper.cpp.
References struct_map_info::cfregion, struct_map_list::count, struct_map_info::filename, struct_map_list::maps, name, struct_map_info::name, region::name, struct_map_info::path, tiled_map_list, and struct_map_info::tiled_maps.
Referenced by main().
|
static |
Makes all monsters point to tiled maps instead of map when appliable, and merge map monster to tiled map.
Definition at line 2030 of file mapper.cpp.
References add_map(), add_race_to_list(), struct_race_list::count, struct_map_list::count, struct_map_list::maps, maps_list, struct_map_info::monsters, struct_race::origin, struct_race_list::races, races, and struct_map_info::tiled_group.
Referenced by main().
|
static |
Frees a struct_equipment.
equip | item to free. |
Definition at line 499 of file mapper.cpp.
References struct_equipment::diff, and struct_equipment::name.
Referenced by add_one_item(), and ensure_unique().
|
static |
Create a link to a page, generating it if needed.
args | link arguments. |
Definition at line 2654 of file mapper.cpp.
References add_template_to_render(), find_map_by_key(), find_region_by_key(), and path_from_current().
Referenced by init_renderer_env().
|
static |
Return the link to the picture of the specified item.
args | function arguments. |
Definition at line 2685 of file mapper.cpp.
References find_map_by_key(), output_extensions, output_format, and path_from_current().
Referenced by init_renderer_env().
|
static |
Definition at line 1518 of file mapper.cpp.
References output_extensions, output_format, path(), and root.
Referenced by do_tiled_map_picture(), process_map(), tiled_map_need_pic(), and write_pictures_from_real_size().
|
static |
Gets the color for an elevation.
elevation | elevation to get color for. |
elevationmap | picture that will get the color. |
Definition at line 762 of file mapper.cpp.
References elevation_max, and elevation_min.
Referenced by write_world_info().
|
static |
Gets an empty struct_equipment.
Definition at line 486 of file mapper.cpp.
References init_map_list(), and struct_equipment::origin.
Referenced by add_one_item().
|
static |
Gets or creates if required the info structure for a map.
path | map to consider. |
Definition at line 1311 of file mapper.cpp.
References add_map(), struct_map_list::count, create_map_info(), struct_map_info::filename, struct_map_list::maps, maps_list, path(), and struct_map_info::path.
Referenced by do_parameters(), main(), and process_map().
|
static |
Gets the information for a quest, create the field if needed.
name | quest's name. |
Definition at line 985 of file mapper.cpp.
References find_quest_info(), init_struct_map_in_quest_list(), struct_quest::maps, name, struct_quest::name, struct_quest::number, quests, quests_allocated, and quests_count.
Referenced by add_map_to_quest(), and define_quest().
|
static |
Returns the race for specified name.
name | monster's name. |
Definition at line 648 of file mapper.cpp.
References add_race_to_list(), struct_race_list::count, struct_race::count, init_map_list(), name, struct_race::name, struct_race::origin, struct_race_list::races, and races.
Referenced by add_monster().
|
static |
Returns a struct_slaying_info for specified slaying.
Creates a new one if required.
slaying | value to get the structure of. |
Definition at line 1439 of file mapper.cpp.
References init_map_list(), struct_slaying_info::maps, S_MAX, struct_slaying_info::slaying, slaying_allocated, slaying_count, and slaying_info.
Referenced by add_slaying().
|
static |
Definition at line 2417 of file mapper.cpp.
References env, and templateCache.
Referenced by fill_json(), and main().
|
static |
Initialises a list structure.
list | list to blank. |
Definition at line 459 of file mapper.cpp.
References list.
Referenced by create_map_info(), fill_json(), get_equipment(), get_race(), get_slaying_struct(), and main().
|
static |
Blanks a struct_race_list.
list | list to blank. |
Definition at line 319 of file mapper.cpp.
References list.
Referenced by create_map_info(), and main().
|
static |
Initialize env and set various callbacks and options.
Definition at line 2751 of file mapper.cpp.
References buf, env, is_valid_types_gen::found, generate_page_and_link(), generate_picture_link(), path_stack, root, and templates_root().
Referenced by main().
|
static |
Definition at line 949 of file mapper.cpp.
References list.
Referenced by create_map_info(), and get_quest_info().
|
static |
Checks if item blocks movement or not.
item | object to test. |
Definition at line 748 of file mapper.cpp.
References MOVE_ALL, and object::move_block.
Referenced by do_exit_map().
|
static |
Checks if object is considered a road or not.
item | object to check. |
Definition at line 712 of file mapper.cpp.
References object::arch, FLAG_IS_FLOOR, archetype::name, and QUERY_FLAG.
Referenced by do_exit_map().
|
static |
Is the slaying field relevant for this item?
item | item to check. |
Definition at line 1426 of file mapper.cpp.
References CHECK_INV, CONTAINER, LOCKED_DOOR, SPECIAL_KEY, and object::type.
Referenced by check_slaying_inventory(), and process_map().
|
static |
Definition at line 467 of file mapper.cpp.
References AMULET, object::arch, archetype::clone, FLAG_NO_PICK, IS_ARMOR, IS_ARROW, IS_SHIELD, IS_WEAPON, MOVE_ALL, object::move_block, object::name, QUERY_FLAG, RING, ROD, object::title, object::type, and WAND.
Referenced by check_equipment().
|
static |
Marks specified path as processed.
path | map to remove. |
Definition at line 1338 of file mapper.cpp.
References found_maps, and path().
Referenced by process_map().
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 3133 of file mapper.cpp.
References add_template_to_render(), all_data, all_regions, cached_pics, color_blocking, color_linked_exit, color_road, color_slowing, color_unlinked_exit, struct_race_list::count, struct_map_list::count, create_destination(), created_pics, Settings::debug, detail_quests, display_rendered_template, do_parameters(), do_regions_link, dump_unused_maps(), elevation_info, elevation_max, elevation_min, env, region::fallback, fill_json(), find_faceset(), find_maps(), first_map_path, fix_exits_to_tiled_maps(), fix_map_names(), fix_tiled_map(), fix_tiled_map_monsters(), force_pics, found_maps, gdfaces, generate_pics, get_faces_count(), get_map_info(), get_region_struct(), get_template(), infomap, init_globals(), init_gods(), init_library(), init_map_list(), init_race_list(), init_readable(), init_renderer_env(), is_valid_faceset(), jpeg_quality, list_system_quests, list_unused_maps, llevError, region::longname, map_limit, struct_map_list::maps, maps_list, region::name, OF_JPG, output_extensions, output_format, pages, path_stack, pics_allocated, process_map(), quest_callback(), quest_for_each(), quests, quests_count, struct_race_list::races, races, rawmaps, region_count, regions, root, settings, show_maps, slaying_count, slaying_info, sort_equipment(), sort_map_info(), sort_race(), sort_region(), sort_slaying(), sort_struct_quest(), special_equipment, strdup_local, system_quests, templates, templates_root(), tiled_map_list, tileset, time, warn_no_path, world_exit_info, world_map, write_tiled_maps(), write_world_info(), write_world_map(), and yesno().
|
static |
Merge two tiled maps groups.
This can happen if based on processing we do one map with tiled maps, another with tiled maps, and later figure out the tiles are actually linked.
map | the map that being processed has a tiling to a map in another group. Its group will be the final merging group. |
tiled_map | the map tiled to another group. Its group will disappear. |
Definition at line 1277 of file mapper.cpp.
References add_map(), struct_map_list::count, struct_map_list::maps, struct_map_info::tiled_group, tiled_map_list, and struct_map_info::tiled_maps.
Referenced by process_map().
|
static |
Compute the relative path from the specified file to the current file.
path | path to get from. |
Definition at line 2637 of file mapper.cpp.
References path(), path_stack, and relative_path().
Referenced by generate_page_and_link(), and generate_picture_link().
|
static |
Processes a map.
Generates the map pictures (big and small), and exit information.
info | map to process. |
Definition at line 1550 of file mapper.cpp.
References add_map(), add_map_to_region(), add_monster(), add_npc_to_map(), add_region_link(), add_slaying(), add_string(), BOOK, cached_pics, struct_map_info::cfregion, check_equipment(), check_slaying_inventory(), archetype::clone, create_pathname(), create_tiled_map(), created_pics, face_info::data, face_info::datalen, delete_map(), do_auto_apply(), do_exit_map(), do_regions_link, EXIT, EXIT_PATH, struct_map_info::exits_from, struct_map_info::exits_to, face_sets::faces, struct_map_info::filename, find_archetype(), find_faceset(), FLAG_FRIENDLY, FLAG_MONSTER, FLAG_UNAGGRESSIVE, FOR_MAP_FINISH, FOR_MAP_PREPARE, force_pics, gdfaces, generate_pics, generate_picture_path(), get_face_fallback(), get_map_info(), get_region_by_map(), struct_map_info::height, mapstruct::in_memory, is_slaying(), struct_map_info::level, list_map(), list_unused_maps, struct_map_info::lore, m, MAP_HEIGHT, MAP_IN_MEMORY, MAP_WIDTH, MAX_BUF, merge_tiled_maps(), object::msg, struct_map_info::name, struct_map_info::npcs, num_sizes, object_get_multi_size(), struct_map_info::path, path_combine_and_normalize(), struct_map_info::pic_was_done, pics_allocated, PLAYER_CHANGER, process_map_lore(), QUERY_FLAG, rawmaps, struct_map_info::readable, ready_map_name(), struct_map_info::reset_group, reset_groups, mapstruct::reset_time, show_maps, SIGN, size_large, stats, TELEPORTER, struct_map_info::tiled_group, struct_map_info::tiled_maps, struct_map_info::tiles, tileset, warn_no_path, struct_map_info::width, and write_pictures_from_real_size().
Referenced by main().
|
static |
Extracts from the map's lore quest information if found.
May modify map->lore.
map | map to process. |
Definition at line 1099 of file mapper.cpp.
References add_map_to_quest(), define_quest(), description, struct_map_info::lore, and name.
Referenced by process_map().
|
static |
Definition at line 2216 of file mapper.cpp.
References list_system_quests, quest_definition::quest_is_system, and system_quests.
Referenced by main().
|
static |
Computes the shortest path from one file to another.
from | origin. |
to | destination. |
result | string that will contain the calculated path. Must be large enough, no test done. |
Definition at line 834 of file mapper.cpp.
References to.
Referenced by path_from_current().
|
static |
Definition at line 2326 of file mapper.cpp.
References path().
Referenced by create_map_object().
|
static |
Saves a map to a file, based on jpg/png settings.
file | opened file to which to save. |
pic | picture to save. |
Definition at line 1393 of file mapper.cpp.
References jpeg_quality, OF_PNG, and output_format.
Referenced by write_pictures_from_real_size(), write_world_info(), and write_world_map().
|
static |
Sort 2 struct_equipment.
l | |
r | items to compare. |
Definition at line 513 of file mapper.cpp.
References struct_equipment::calc_power, struct_equipment::diff, struct_equipment::name, struct_equipment::power, and strcasecmp().
Referenced by main().
|
static |
Sorts the struct_map_info according to the map name or the path if equal.
left | first item. |
right | second item. |
Definition at line 903 of file mapper.cpp.
References compare_map_info().
Referenced by fill_json(), fill_reverse_maps(), and main().
|
static |
Sort 2 struct_race.
a | |
b | items to compare. |
Definition at line 699 of file mapper.cpp.
References a(), struct_race::name, and strcasecmp().
Referenced by fill_reverse_maps(), and main().
|
static |
Sorts an array of struct_region_info by region name.
left | first region. |
right | second region. |
Definition at line 919 of file mapper.cpp.
Referenced by main().
|
static |
Helper function to sort an array of struct_slaying_info.
left | first item. |
right | second item. |
Definition at line 2979 of file mapper.cpp.
References struct_slaying_info::slaying, and strcasecmp().
Referenced by main().
|
static |
Sorts 2 struct_map_in_quest, on the map's name or path.
left | |
right | items to compare. |
Definition at line 1036 of file mapper.cpp.
References c, struct_map_in_quest::map, struct_map_info::name, struct_map_info::path, strcasecmp(), and struct_map_info::tiled_group.
Referenced by fill_json().
|
static |
Sorts 2 struct_quest, on the map's name or path.
left | |
right | items to compare. |
Definition at line 1064 of file mapper.cpp.
References struct_quest::name, and strcasecmp().
Referenced by main().
|
static |
Definition at line 2734 of file mapper.cpp.
References is_valid_types_gen::found.
Referenced by assets_pack(), cfapi_object_split(), Crossfire_Object_Split(), PngLoader::load(), load_bells(), and load_citylife().
|
static |
Directory to get templates from, with a leading /.
Referenced by do_parameters(), init_renderer_env(), and main().
|
static |
Definition at line 2057 of file mapper.cpp.
References struct_map_list::count, generate_picture_path(), struct_map_list::maps, num_sizes, struct_map_info::path, struct_map_info::pic_was_done, stats, and struct_map_info::tiled_maps.
Referenced by do_tiled_map_picture().
|
static |
Definition at line 1522 of file mapper.cpp.
References generate_picture_path(), make_path_to_file(), MAX_BUF, num_sizes, path(), save_picture(), size_large, and sizes.
Referenced by do_tiled_map_picture(), and process_map().
|
static |
Writes the page for a tiled map group.
Definition at line 2195 of file mapper.cpp.
References do_tiled_map_picture().
Referenced by write_tiled_maps().
|
static |
Outputs all tiled map pages.
Definition at line 2205 of file mapper.cpp.
References struct_map_list::count, struct_map_list::maps, tiled_map_list, and write_tiled_map_page().
Referenced by main().
|
static |
Writes the exit information world map.
Definition at line 2927 of file mapper.cpp.
References elevation_info, elevation_max, elevation_min, get_elevation_color(), infomap, output_extensions, output_format, path(), root, save_picture(), and world_exit_info.
Referenced by main().
|
static |
Generates a big world map.
Definition at line 1793 of file mapper.cpp.
References infomap, name, OF_PNG, output_extensions, output_format, region_allocated, regions, root, save_picture(), SIZE, struct_region_info::sum, struct_region_info::sum_x, struct_region_info::sum_y, and world_map.
Referenced by main().
|
static |
Helper to write yes/no.
value | value to print. |
Definition at line 3129 of file mapper.cpp.
Referenced by main().
|
static |
All JSON data available to templates.
Definition at line 2223 of file mapper.cpp.
Referenced by main().
|
static |
If set, will build the 'search_data.js' file.
Definition at line 374 of file mapper.cpp.
Referenced by do_parameters(), and fill_json().
|
static |
Non recreated pics.
Definition at line 378 of file mapper.cpp.
Referenced by main(), and process_map().
|
static |
Block all movement.
Definition at line 424 of file mapper.cpp.
Referenced by do_exit_map(), and main().
|
static |
Exit leading to another map.
Definition at line 422 of file mapper.cpp.
Referenced by do_exit_map(), and main().
|
static |
Road or equivalent.
Definition at line 423 of file mapper.cpp.
Referenced by do_exit_map(), and main().
|
static |
|
static |
Color for exits without a path set.
Definition at line 421 of file mapper.cpp.
Referenced by do_exit_map(), and main().
|
static |
Picture statistics.
Total created pics.
Definition at line 377 of file mapper.cpp.
Referenced by main(), and process_map().
|
static |
Whether to show all quests details or not.
Definition at line 371 of file mapper.cpp.
Referenced by do_parameters(), fill_json(), and main().
|
static |
Whether to display the template to be rendered or not.
Definition at line 373 of file mapper.cpp.
Referenced by do_parameters(), and main().
|
static |
Definition at line 432 of file mapper.cpp.
Referenced by do_parameters(), main(), and process_map().
|
static |
All elevation spots in the "world_" maps.
Definition at line 427 of file mapper.cpp.
Referenced by do_exit_map(), main(), and write_world_info().
|
static |
Lowest elevation found.
Definition at line 429 of file mapper.cpp.
Referenced by do_exit_map(), get_elevation_color(), main(), and write_world_info().
|
static |
Maximal elevation found.
Definition at line 428 of file mapper.cpp.
Referenced by do_exit_map(), get_elevation_color(), main(), and write_world_info().
|
static |
Rendering environment.
Definition at line 2222 of file mapper.cpp.
Referenced by animate_bomb(), change_object(), do_execute_event(), esrv_move_object(), explode_bullet(), fill_json(), get_template(), init_renderer_env(), knowledge_alchemy_attempt(), main(), mimic_type_apply(), pick_up_object(), remove_unpaid_objects(), save_throw_object(), and spring_trap().
|
static |
To force picture regeneration even if map didn't change.
Definition at line 361 of file mapper.cpp.
Referenced by do_parameters(), main(), and process_map().
|
static |
Maps found in directories.
Definition at line 417 of file mapper.cpp.
Referenced by dump_unused_maps(), find_maps(), list_map(), and main().
|
static |
Definition at line 206 of file mapper.cpp.
Referenced by main(), and process_map().
|
static |
Whether to generate the picture or not.
Definition at line 360 of file mapper.cpp.
Referenced by do_parameters(), do_tiled_map_picture(), main(), and process_map().
|
static |
File names to ignore for map search.
Definition at line 2855 of file mapper.cpp.
Referenced by find_maps().
|
static |
Directories to ignore for map search.
Definition at line 2844 of file mapper.cpp.
Referenced by find_maps().
|
static |
World map with exits / roads / blocking / ...
Definition at line 420 of file mapper.cpp.
Referenced by do_exit_map(), main(), write_world_info(), and write_world_map().
|
static |
Quality for jpg pictures.
Definition at line 396 of file mapper.cpp.
Referenced by do_parameters(), main(), and save_picture().
|
static |
Whether to show 'system' quests or not.
Definition at line 372 of file mapper.cpp.
Referenced by do_parameters(), main(), and quest_callback().
|
static |
If set, program will list maps found in directory but not linked from the first maps.
Definition at line 416 of file mapper.cpp.
Referenced by do_parameters(), main(), and process_map().
|
static |
Maximum number of maps to browse, -1 for all.
Definition at line 366 of file mapper.cpp.
Referenced by do_parameters(), and main().
|
static |
Maps to process or found.
Definition at line 266 of file mapper.cpp.
Referenced by add_map_to_region(), do_parameters(), fill_json(), fix_exits_to_tiled_maps(), fix_map_names(), fix_tiled_map_monsters(), get_map_info(), and main().
|
static |
Definition at line 363 of file mapper.cpp.
Referenced by process_map(), tiled_map_need_pic(), and write_pictures_from_real_size().
|
static |
Extensions depending on output format.
Definition at line 387 of file mapper.cpp.
Referenced by generate_picture_link(), generate_picture_path(), main(), write_world_info(), and write_world_map().
|
static |
Selected output format.
Definition at line 393 of file mapper.cpp.
Referenced by do_parameters(), do_tiled_map_picture(), generate_picture_link(), generate_picture_path(), main(), save_picture(), write_world_info(), and write_world_map().
|
static |
List of pages to render.
Definition at line 2711 of file mapper.cpp.
Referenced by add_template_to_render(), and main().
|
static |
Path, relative to output root, of pages being generated.
Definition at line 2628 of file mapper.cpp.
Referenced by init_renderer_env(), main(), and path_from_current().
|
static |
Number of created pictures for GD.
Definition at line 357 of file mapper.cpp.
Referenced by main(), and process_map().
|
static |
All quests in the game.
Definition at line 943 of file mapper.cpp.
Referenced by fill_json(), find_quest_info(), get_quest_info(), and main().
|
static |
Allocated items in quests.
Definition at line 947 of file mapper.cpp.
Referenced by get_quest_info().
|
static |
Count of quests.
Definition at line 945 of file mapper.cpp.
Referenced by fill_json(), find_quest_info(), get_quest_info(), main(), and quest_display().
|
static |
Monsters found in maps.
Definition at line 290 of file mapper.cpp.
Referenced by fill_json(), fix_tiled_map_monsters(), get_race(), and main().
|
static |
Whether to generate raw pics or instancied ones.
Definition at line 399 of file mapper.cpp.
Referenced by do_parameters(), main(), and process_map().
|
static |
Allocated size of regions.
Definition at line 414 of file mapper.cpp.
Referenced by add_map_to_region(), and write_world_map().
|
static |
Count of regions.
Definition at line 413 of file mapper.cpp.
Referenced by add_map_to_region(), fill_json(), fix_exits_to_tiled_maps(), and main().
Definition at line 434 of file mapper.cpp.
Referenced by add_region_link(), and fill_json().
|
static |
Found regions.
Definition at line 412 of file mapper.cpp.
Referenced by add_map_to_region(), create_region_array(), fill_json(), fix_exits_to_tiled_maps(), main(), and write_world_map().
|
static |
List of generated files, to not generate multiple times.
Definition at line 2224 of file mapper.cpp.
Referenced by add_template_to_render().
|
static |
All defined reset groups.
Definition at line 292 of file mapper.cpp.
Referenced by fill_json(), and process_map().
|
static |
Link between a map and its unique identifier.
Definition at line 2225 of file mapper.cpp.
Referenced by create_map_in_quest_array(), create_maps_array(), create_quest_object(), fill_json(), fill_reverse_maps(), and find_map_by_key().
|
static |
Link between a region and its unique identifier.
Definition at line 2226 of file mapper.cpp.
Referenced by create_map_object(), create_region_array(), fill_json(), and find_region_by_key().
|
static |
Path to store generated files.
Relative or absolute, shouldn't end with a /
Definition at line 354 of file mapper.cpp.
Referenced by create_destination(), do_parameters(), dump_unused_maps(), fill_json(), generate_picture_path(), init_renderer_env(), main(), write_world_info(), and write_world_map().
|
static |
Search names for types, for the JS search engine.
Definition at line 305 of file mapper.cpp.
Referenced by fill_json().
|
static |
If set, will generate much information on map loaded.
Definition at line 367 of file mapper.cpp.
Referenced by do_parameters(), main(), and process_map().
|
static |
Definition at line 362 of file mapper.cpp.
Referenced by write_pictures_from_real_size().
|
static |
Allocated size of slaying_info.
Definition at line 452 of file mapper.cpp.
Referenced by get_slaying_struct().
|
static |
Count of items in slaying_info.
Definition at line 451 of file mapper.cpp.
Referenced by fill_json(), get_slaying_struct(), and main().
|
static |
Found slaying fields.
Definition at line 450 of file mapper.cpp.
Referenced by fill_json(), get_slaying_struct(), and main().
|
static |
Special equipment list.
Definition at line 280 of file mapper.cpp.
Referenced by ensure_unique(), fill_json(), and main().
|
static |
Definition at line 2214 of file mapper.cpp.
Referenced by fill_json(), main(), and quest_callback().
|
static |
Definition at line 2416 of file mapper.cpp.
Referenced by get_template().
|
static |
List of template files to start processing from.
Definition at line 2746 of file mapper.cpp.
Referenced by do_parameters(), and main().
|
static |
Pseudo-maps grouping other maps.
Definition at line 269 of file mapper.cpp.
Referenced by create_tiled_map(), fill_json(), fix_tiled_map(), main(), merge_tiled_maps(), and write_tiled_maps().
|
static |
Tileset to use to generate pics.
Definition at line 370 of file mapper.cpp.
Referenced by do_parameters(), main(), and process_map().
|
static |
Whether to warn of exits without a path.
Definition at line 402 of file mapper.cpp.
Referenced by do_parameters(), main(), and process_map().
|
static |
If set, will generate a world map of exits.
Definition at line 369 of file mapper.cpp.
Referenced by do_parameters(), main(), and write_world_info().
|
static |
If set, will generate a world map.
Definition at line 368 of file mapper.cpp.
Referenced by do_parameters(), main(), and write_world_map().