Crossfire Server, Trunk
|
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 void(* | face_op) (const Face *) |
typedef void(* | faceset_op) (const face_sets *) |
Functions | |
void | archetypes_for_each (arch_op op) |
void | assets_collect (const char *datadir, int what) |
void | assets_end_load () |
void | assets_finish_archetypes_for_play () |
void | assets_free () |
void | assets_init () |
size_t | assets_number_of_treasurelists () |
size_t | assets_number_of_treasures () |
void | assets_pack (const char *type, const char *filename) |
class AssetsManager * | getManager () |
void | load_assets (void) |
quest_definition * | quest_find_by_code (sstring code) |
void | quest_for_each (quest_op op, void *user) |
quest_definition * | quest_get_by_code (sstring code) |
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 *) |
void archetypes_for_each | ( | arch_op | op | ) |
Definition at line 301 of file assets.cpp.
References AssetsManager::archetypes(), AssetsCollection< T, Key >::each(), manager, and give::op.
Referenced by cast_create_food(), init_gods(), init_mon_info(), init_skills(), and spellpath_msg().
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(), 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(), AssetsManager::faces(), AssetsManager::facesets(), Settings::hooks, Settings::hooks_count, Settings::hooks_filename, init_attackmess(), init_formulae(), init_regions(), llevInfo, LOG(), manager, AssetsManager::messages(), AssetsManager::quests(), settings, and AssetsManager::treasures().
Referenced by cctk_init_std_archetypes(), command_purge_quest_definitions(), load_assets(), and CREMainWindow::onToolReloadAssets().
void assets_end_load | ( | ) |
Called after collect is complete, to check various things.
Definition at line 227 of file assets.cpp.
References check_formulae(), check_generators(), check_recipes(), check_spells(), check_summoned(), AssetsCollection< T, Key >::each(), guildoracle::list, manager, and AssetsManager::treasures().
Referenced by load_assets().
void assets_finish_archetypes_for_play | ( | ) |
Definition at line 509 of file assets.cpp.
References archininventory::arch, AssetsManager::archetypes(), AssetsCollection< T, Key >::each(), manager, and give::op.
Referenced by command_recollect(), and init_beforeplay().
void assets_free | ( | ) |
Free all assets-related memory.
Definition at line 72 of file assets.cpp.
References manager.
Referenced by free_globals(), and teardown().
void assets_init | ( | ) |
Init assets-related variables.
Definition at line 65 of file assets.cpp.
References manager.
Referenced by cctk_init_std_archetypes(), init_library(), and setup().
size_t assets_number_of_treasurelists | ( | ) |
Definition at line 258 of file assets.cpp.
References AssetsCollection< T, Key >::count(), manager, and AssetsManager::treasures().
Referenced by malloc_info().
size_t assets_number_of_treasures | ( | ) |
Definition at line 255 of file assets.cpp.
References nroftreasures.
Referenced by malloc_info().
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 418 of file assets.cpp.
References add_to_tar(), AssetsManager::animations(), AssetsManager::archetypes(), buf, disinfect::count, navar-midane_time::data, do_pack(), AssetsManager::faces(), AssetsManager::facesets(), fatal(), npc_dialog::filename, llevError, LOG(), manager, MAX_PACK, AssetsManager::messages(), mtar_close(), MTAR_ESUCCESS, mtar_finalize(), mtar_open(), give::name, make_face_from_files::out, pack_artifacts(), pack_formulae(), pack_images(), AssetsManager::quests(), SEE_LAST_ERROR, split(), split_string(), strdup_local, stringbuffer_delete(), stringbuffer_finish(), stringbuffer_length(), stringbuffer_new(), Floor::t, AssetsManager::treasures(), and is_valid_types_gen::type.
Referenced by server_pack_assets().
class AssetsManager* getManager | ( | ) |
Definition at line 305 of file assets.cpp.
References manager.
Referenced by ArchetypesWrapper::addArchetype(), addArchetypes(), QuestsWrapper::addQuest(), CREResourcesWindow::addQuest(), AllAssets::AllAssets(), ArchetypeWrapper::appearsOnTreasureList(), ArchetypeComboBox::ArchetypeComboBox(), ArchetypesModel::ArchetypesModel(), ResourcesManager::archetypeUse(), ArtifactPanel::artifactChanged(), CREMapInformationManager::browseMaps(), build_class_list_reply(), build_race_list_reply(), MonsterResistances::buildGraph(), cfapi_system_get_archetype_vector(), create_archetype_by_object_name(), CRESubItemQuest::CRESubItemQuest(), TreasureWrapper::displayIcon(), TreasureListWrapper::drop(), TreasureWrapper::drop(), TreasurePanel::dropEvent(), dump_abilities(), dump_all_archetypes(), dump_animations(), dump_faces(), dump_monster_treasure(), dump_spells(), FaceComboBox::FaceComboBox(), fillEvents(), CREMainWindow::fillFacesets(), 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(), CREPixmap::init(), init_library(), isValidArchFlesh(), FaceMakerDialog::makeFaces(), malloc_info(), msgfile_msg(), CREMainWindow::onReportAlchemy(), CREMainWindow::onReportAlchemyGraph(), CREMainWindow::onReportArchetypes(), CREMainWindow::onReportDuplicate(), CREMainWindow::onReportLicenses(), CREMainWindow::onReportPlayer(), CREMainWindow::onReportQuests(), CREMainWindow::onReportSpellDamage(), CREMainWindow::onReportSpells(), CREMainWindow::onReportSummon(), polymorph_item(), polymorph_living(), print_monsters(), QuestComboBox::QuestComboBox(), recipe_find_ingredient_cost(), CRESubItemQuest::selectedQuestChanged(), send_image_info(), send_map_info(), CREPixmap::setFaceset(), ArchetypeWrapper::setRaw(), SoundsDialog::soundType(), spellsTable(), START_TEST(), treasureContains(), TreasureListComboBox::TreasureListComboBox(), RecipePanel::updateItem(), FacesetsPanel::updateItem(), and ArchetypeWrapper::uses().
void load_assets | ( | void | ) |
Definition at line 312 of file init.cpp.
References ASSETS_ALL, assets_collect(), assets_end_load(), Settings::datadir, and settings.
Referenced by command_recollect(), and init_library().
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 519 of file assets.cpp.
References 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().
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 539 of file assets.cpp.
quest_definition* quest_get_by_code | ( | sstring | code | ) |
Find a quest from its code if it exists.
Definition at line 530 of file assets.cpp.
References 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().
size_t quests_count | ( | bool | includeSystem | ) |
Definition at line 543 of file assets.cpp.
References AssetsCollection< T, Key >::count(), manager, AssetsManager::quests(), and Quests::visibleCount().