![]() |
Crossfire Server, Trunk
1.75.0
|
Include dependency graph for quest.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | quest_condition |
| One condition to automatically move to a quest step. More... | |
| struct | quest_definition |
| Definition of an in-game quest. More... | |
| struct | quest_step_definition |
| One step of a quest. More... | |
Typedefs | |
| typedef void(* | quest_op) (const quest_definition *, void *) |
Functions | |
| void | quest_clear (quest_definition *quest) |
| int | quest_condition_from_string (quest_condition *condition, const char *buffer) |
| Parse a single step condition. More... | |
| quest_definition * | quest_create (const char *name) |
| quest_condition * | quest_create_condition (void) |
| Allocate a quest_condition, will call fatal() if out of memory. More... | |
| quest_step_definition * | quest_create_step (void) |
| Allocate a quest_step_definition, will call fatal() if out of memory. More... | |
| void | quest_destroy (quest_definition *quest) |
| void | quest_destroy_condition (quest_condition *condition) |
| void | quest_destroy_step (quest_step_definition *step) |
| void | quest_for_each (quest_op op, void *user) |
| Iterate over all quests. More... | |
| void | quest_write_condition (char *buf, size_t len, const quest_condition *condition) |
| Write a step condition to a buffer. More... | |
| typedef void(* quest_op) (const quest_definition *, void *) |
| void quest_clear | ( | quest_definition * | quest | ) |
Definition at line 83 of file Quests.cpp.
References FREE_AND_CLEAR_STR_IF, free_string(), quest_definition::quest_code, quest_definition::quest_comment, quest_definition::quest_description, quest_destroy_step(), quest_definition::quest_title, and quest_definition::steps.
Referenced by quest_destroy(), and Quests::replace().
Here is the call graph for this function:
Here is the caller graph for this function:| int quest_condition_from_string | ( | quest_condition * | condition, |
| const char * | buffer | ||
| ) |
Parse a single step condition.
This may be expressed as one of the following:
| condition | condition to fill. |
| buffer | where to read from. |
Definition at line 100 of file Quests.cpp.
References add_string(), buffer, quest_condition::maxstep, quest_condition::minstep, and quest_condition::quest_code.
Referenced by QuestLoader::load().
Here is the call graph for this function:
Here is the caller graph for this function:| quest_definition* quest_create | ( | const char * | name | ) |
Definition at line 63 of file Quests.cpp.
References add_string(), name, and quest_definition::quest_code.
Referenced by asset_create(), and QuestLoader::load().
Here is the call graph for this function:
Here is the caller graph for this function:| quest_condition* quest_create_condition | ( | void | ) |
Allocate a quest_condition, will call fatal() if out of memory.
Definition at line 56 of file Quests.cpp.
References fatal(), and OUT_OF_MEMORY.
Referenced by QuestLoader::load().
Here is the call graph for this function:
Here is the caller graph for this function:| quest_step_definition* quest_create_step | ( | void | ) |
Allocate a quest_step_definition, will call fatal() if out of memory.
Definition at line 49 of file Quests.cpp.
References fatal(), OUT_OF_MEMORY, and step.
Referenced by QuestLoader::load().
Here is the call graph for this function:
Here is the caller graph for this function:| void quest_destroy | ( | quest_definition * | quest | ) |
Definition at line 95 of file Quests.cpp.
References quest_clear().
Referenced by asset_destroy().
Here is the call graph for this function:
Here is the caller graph for this function:| void quest_destroy_condition | ( | quest_condition * | condition | ) |
Definition at line 69 of file Quests.cpp.
References free_string(), and quest_condition::quest_code.
Referenced by quest_destroy_step().
Here is the call graph for this function:
Here is the caller graph for this function:| void quest_destroy_step | ( | quest_step_definition * | step | ) |
Definition at line 74 of file Quests.cpp.
References FREE_AND_CLEAR_STR_IF, quest_destroy_condition(), and step.
Referenced by quest_clear().
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 538 of file assets.cpp.
References AssetsCollection< T, Key >::each(), manager, and AssetsManager::quests().
Referenced by dump_quests(), main(), output_quests(), and update_quests().
Here is the call graph for this function:
Here is the caller graph for this function:| void quest_write_condition | ( | char * | buf, |
| size_t | len, | ||
| const quest_condition * | condition | ||
| ) |
Write a step condition to a buffer.
If the buffer is too small, the line is truncated.
| buf | where to write. |
| len | length of buf. |
| condition | item to write, must not be NULL. |
Definition at line 130 of file Quests.cpp.
References buf, quest_condition::maxstep, quest_condition::minstep, and quest_condition::quest_code.
Referenced by QuestWriter::write().
Here is the caller graph for this function: