![]() |
Crossfire Server, Trunk
1.75.0
|
Include dependency graph for assets.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Macros | |
| #define | ASSETS_ALL 0xFFFF |
| #define | ASSETS_ANIMATIONS 0x0004 |
| #define | ASSETS_ARCHETYPES 0x0001 |
| #define | ASSETS_ARTIFACTS 0x0080 |
| #define | ASSETS_ATTACK_MESSAGES 0x0200 |
| #define | ASSETS_FACES 0x0002 |
| #define | ASSETS_FACESETS 0x0008 |
| #define | ASSETS_FORMULAE 0x0100 |
| #define | ASSETS_MESSAGES 0x0040 |
| #define | ASSETS_PNG 0x0020 |
| #define | ASSETS_QUESTS 0x0400 |
| #define | ASSETS_REGIONS 0x0800 |
| #define | ASSETS_TREASURES 0x0010 |
Typedefs | |
| typedef void(* | anim_op) (const Animations *) |
| typedef void(* | arch_op) (archetype *) |
| typedef std::function< void(BufferReader *, const char *)> | collectorHook |
| typedef void(* | face_op) (const Face *) |
| typedef void(* | faceset_op) (const face_sets *) |
Functions | |
| void | archetypes_for_each (arch_op op) |
| void | assets_add_collector_hook (const char *name, collectorHook hook) |
| void | assets_collect (const char *datadir, int what) |
| Collect all assets from the specified directory and all its subdirectories. More... | |
| void | assets_end_load () |
| Called after collect is complete, to check various things. More... | |
| void | assets_finish_archetypes_for_play () |
| void | assets_free () |
| Free all assets-related memory. More... | |
| void | assets_init () |
| Init assets-related variables. More... | |
| size_t | assets_number_of_treasurelists () |
| size_t | assets_number_of_treasures () |
| void | assets_pack (const char *type, const char *filename) |
| Pack the specified assets in a file. More... | |
| class AssetsManager * | getManager () |
| void | load_assets (void) |
| quest_definition * | quest_find_by_code (sstring code) |
| Find a quest from its code, logging if no matching quest. More... | |
| void | quest_for_each (quest_op op, void *user) |
| Iterate over all quests. More... | |
| quest_definition * | quest_get_by_code (sstring code) |
| Find a quest from its code if it exists. More... | |
| size_t | quests_count (bool includeSystem) |
C function wrappers to interact with assets. Should not be used by C++ code, except for getManager() to get the AssetsManager.
Definition in file assets.h.
| typedef void(* anim_op) (const Animations *) |
| typedef std::function<void(BufferReader *, const char *)> collectorHook |
| void archetypes_for_each | ( | arch_op | op | ) |
Definition at line 305 of file assets.cpp.
References AssetsManager::archetypes(), AssetsCollection< T, Key >::each(), and manager.
Referenced by cast_create_food(), init_gods(), init_mon_info(), init_skills(), and spellpath_msg().
Here is the call graph for this function:
Here is the caller graph for this function:| void assets_add_collector_hook | ( | const char * | name, |
| collectorHook | hook | ||
| ) |
Definition at line 556 of file assets.cpp.
References collector_hooks, and name.
Referenced by add_server_collect_hooks(), cfcitybell_init(), and citylife_init().
Here is the caller graph for this function:| void assets_collect | ( | const char * | datadir, |
| int | what | ||
| ) |
Collect all assets from the specified directory and all its subdirectories.
| datadir | directory to search from. |
| what | combination of |
Definition at line 113 of file assets.cpp.
References AssetCollector::addLoader(), AssetsManager::animations(), AssetsManager::archetypes(), artifact_post_load(), ASSETS_ARCHETYPES, ASSETS_ARTIFACTS, ASSETS_ATTACK_MESSAGES, ASSETS_FACES, ASSETS_FACESETS, ASSETS_FORMULAE, ASSETS_MESSAGES, ASSETS_PNG, ASSETS_QUESTS, ASSETS_REGIONS, Settings::assets_tracker, ASSETS_TREASURES, AssetCollector::collect(), collector_hooks, datadir, AssetsManager::faces(), AssetsManager::facesets(), init_attackmess(), init_formulae(), init_regions(), llevInfo, LOG(), manager, AssetsManager::messages(), AssetsManager::quests(), settings, and AssetsManager::treasures().
Referenced by command_purge_quest_definitions(), and load_assets().
Here is the call graph for this function:
Here is the caller graph for this function:| void assets_end_load | ( | ) |
Called after collect is complete, to check various things.
Definition at line 231 of file assets.cpp.
References check_formulae(), check_generators(), check_recipes(), check_spells(), check_summoned(), AssetsCollection< T, Key >::each(), list, manager, and AssetsManager::treasures().
Referenced by load_assets().
Here is the call graph for this function:
Here is the caller graph for this function:| void assets_finish_archetypes_for_play | ( | ) |
Definition at line 513 of file assets.cpp.
References AssetsManager::archetypes(), archetype::clone, AssetsCollection< T, Key >::each(), manager, and object::speed.
Referenced by command_recollect(), and init_beforeplay().
Here is the call graph for this function:
Here is the caller graph for this function:| void assets_free | ( | ) |
Free all assets-related memory.
Definition at line 72 of file assets.cpp.
References manager.
Referenced by free_globals().
Here is the caller graph for this function:| void assets_init | ( | ) |
Init assets-related variables.
Definition at line 65 of file assets.cpp.
References manager.
Referenced by init_library().
Here is the caller graph for this function:| size_t assets_number_of_treasurelists | ( | ) |
Definition at line 262 of file assets.cpp.
References AssetsCollection< T, Key >::count(), manager, and AssetsManager::treasures().
Referenced by malloc_info().
Here is the call graph for this function:
Here is the caller graph for this function:| size_t assets_number_of_treasures | ( | ) |
Definition at line 259 of file assets.cpp.
References nroftreasures.
Referenced by malloc_info().
Here is the caller graph for this function:| void assets_pack | ( | const char * | type, |
| const char * | filename | ||
| ) |
Pack the specified assets in a file.
| type | assets type, see actual implementation. |
| filename | destination file. |
Definition at line 422 of file assets.cpp.
References add_to_tar(), AssetsManager::animations(), AssetsManager::archetypes(), buf, do_pack(), AssetsManager::faces(), AssetsManager::facesets(), fatal(), llevError, LOG(), manager, MAX_PACK, AssetsManager::messages(), mtar_close(), MTAR_ESUCCESS, mtar_finalize(), mtar_open(), name, pack_artifacts(), pack_formulae(), pack_images(), AssetsManager::quests(), SEE_LAST_ERROR, split(), split_string(), strdup_local, stringbuffer_delete(), stringbuffer_finish(), stringbuffer_length(), stringbuffer_new(), t, AssetsManager::treasures(), and is_valid_types_gen::type.
Referenced by server_pack_assets().
Here is the call graph for this function:
Here is the caller graph for this function:| class AssetsManager* getManager | ( | ) |
Definition at line 309 of file assets.cpp.
References manager.
Referenced by build_class_list_reply(), build_race_list_reply(), cfapi_system_get_archetype_vector(), create_archetype_by_object_name(), dump_abilities(), dump_all_archetypes(), dump_animations(), dump_faces(), dump_monster_treasure(), dump_spells(), find_archetype_by_object_name(), find_archetype_by_object_type_name(), finish_races(), get_archetype_by_skill_name(), get_archetype_by_type_subtype(), get_player_archetype(), get_spell_by_name(), init_library(), malloc_info(), msgfile_msg(), polymorph_item(), polymorph_living(), print_monsters(), recipe_find_ingredient_cost(), send_image_info(), and send_map_info().
Here is the caller graph for this function:| void load_assets | ( | void | ) |
Definition at line 551 of file assets.cpp.
References ASSETS_ALL, assets_collect(), assets_end_load(), Settings::datadir, and settings.
Referenced by command_recollect(), and init_library().
Here is the call graph for this function:
Here is the caller graph for this function:| quest_definition* quest_find_by_code | ( | sstring | code | ) |
Find a quest from its code, logging if no matching quest.
| code | quest to search. |
Definition at line 523 of file assets.cpp.
References code, llevError, LOG(), and quest_get_by_code().
Referenced by get_quest_by_number(), quest_display(), quest_get_player_state(), quest_info(), quest_set_state(), and quest_start().
Here is the call graph for this function:
Here is the caller graph for this function:| void quest_for_each | ( | quest_op | op, |
| void * | user | ||
| ) |
Iterate over all quests.
| op | function to call for each quest. |
| user | extra parameter to give the function. |
Definition at line 543 of file assets.cpp.
| quest_definition* quest_get_by_code | ( | sstring | code | ) |
Find a quest from its code if it exists.
Definition at line 534 of file assets.cpp.
References code, AssetsCollection< T, Key >::find(), manager, and AssetsManager::quests().
Referenced by command_quest(), quest_find_by_code(), quest_read_player_data(), and quest_send_initial_states().
Here is the call graph for this function:
Here is the caller graph for this function:| size_t quests_count | ( | bool | includeSystem | ) |
Definition at line 547 of file assets.cpp.
References AssetsCollection< T, Key >::count(), manager, AssetsManager::quests(), and Quests::visibleCount().
Here is the call graph for this function: