Crossfire Server, Trunk  1.75.0
assets.h
Go to the documentation of this file.
1 #ifndef ASSETS_H
2 #define ASSETS_H
3 
10 #include "global.h"
11 #include "image.h"
12 #include "quest.h"
13 
20 #define ASSETS_ARCHETYPES 0x0001
21 #define ASSETS_FACES 0x0002
22 #define ASSETS_ANIMATIONS 0x0004
23 #define ASSETS_FACESETS 0x0008
24 #define ASSETS_TREASURES 0x0010
25 #define ASSETS_PNG 0x0020
26 #define ASSETS_MESSAGES 0x0040
27 #define ASSETS_ARTIFACTS 0x0080
28 #define ASSETS_FORMULAE 0x0100
29 #define ASSETS_ATTACK_MESSAGES 0x0200
30 #define ASSETS_QUESTS 0x0400
31 #define ASSETS_REGIONS 0x0800
32 #define ASSETS_ALL 0xFFFF
33 
35 void load_assets(void);
36 
37 void assets_init();
38 void assets_free();
39 void assets_collect(const char* datadir, int what);
40 void assets_end_load();
41 
42 typedef void(*arch_op)(archetype *);
43 typedef void(*face_op)(const Face *);
44 typedef void(*anim_op)(const Animations *);
45 typedef void(*faceset_op)(const face_sets *);
46 
48 
51 
57 void assets_pack(const char *type, const char *filename);
58 
60 
66 
73 
79 void quest_for_each(quest_op op, void *user);
80 
81 size_t quests_count(bool includeSystem);
82 
83 class AssetsManager *getManager();
84 
85 #endif /* ASSETS_H */
Face
New face structure - this enforces the notion that data is face by face only - you can not change the...
Definition: face.h:14
global.h
assets_finish_archetypes_for_play
void assets_finish_archetypes_for_play()
Definition: assets.cpp:508
quest_op
void(* quest_op)(const quest_definition *, void *)
Definition: quest.h:50
getManager
class AssetsManager * getManager()
Definition: assets.cpp:304
face_op
void(* face_op)(const Face *)
Definition: assets.h:43
archetypes_for_each
void archetypes_for_each(arch_op op)
Definition: assets.cpp:300
assets_number_of_treasures
size_t assets_number_of_treasures()
Definition: assets.cpp:254
faceset_op
void(* faceset_op)(const face_sets *)
Definition: assets.h:45
quest_find_by_code
quest_definition * quest_find_by_code(sstring code)
Find a quest from its code, logging if no matching quest.
Definition: assets.cpp:518
assets_end_load
void assets_end_load()
Called after collect is complete, to check various things.
Definition: assets.cpp:226
quests_count
size_t quests_count(bool includeSystem)
Definition: assets.cpp:542
quest_for_each
void quest_for_each(quest_op op, void *user)
Iterate over all quests.
Definition: assets.cpp:538
assets_number_of_treasurelists
size_t assets_number_of_treasurelists()
Definition: assets.cpp:257
archetype
The archetype structure is a set of rules on how to generate and manipulate objects which point to ar...
Definition: object.h:483
image.h
assets_free
void assets_free()
Free all assets-related memory.
Definition: assets.cpp:71
assets_collect
void assets_collect(const char *datadir, int what)
Collect all assets from the specified directory and all its subdirectories.
Definition: assets.cpp:112
quest.h
assets_pack
void assets_pack(const char *type, const char *filename)
Pack the specified assets in a file.
Definition: assets.cpp:417
load_assets
void load_assets(void)
Definition: init.cpp:310
sstring
const typedef char * sstring
Definition: sstring.h:2
Animations
This represents one animation.
Definition: face.h:25
quest_definition
Definition of an in-game quest.
Definition: quest.h:37
anim_op
void(* anim_op)(const Animations *)
Definition: assets.h:44
AssetsManager
Represents all assets of the game.
Definition: AssetsManager.h:28
code
Crossfire Architecture the general intention is to enhance the enjoyability and playability of CF In this code
Definition: arch-handbook.txt:14
assets_init
void assets_init()
Init assets-related variables.
Definition: assets.cpp:64
arch_op
void(* arch_op)(archetype *)
Definition: assets.h:42
face_sets
Information about one face set.
Definition: image.h:17
quest_get_by_code
quest_definition * quest_get_by_code(sstring code)
Find a quest from its code if it exists.
Definition: assets.cpp:529
is_valid_types_gen.type
list type
Definition: is_valid_types_gen.py:25
datadir
the server will also quite happily load unpacked files as long as they have the right file which is convenient if you want to edit your maps and archetypes live It also contains a few like which have hard coded names and are not identified by extension localdir Usually var crossfire Modern systems probably want var lib crossfire instead Contains data that the server does need to live apartment high the contents of player edited etc mapdir Usually maps Always relative to datadir or depending on context Relative to the datadir
Definition: server-directories.txt:69