Crossfire Server, Branches 1.12
R18729
|
Go to the source code of this file.
Functions | |
void | init_ob_method_struct (ob_methods *methods, ob_methods *fallback) |
void | init_ob_types (ob_methods *base_type) |
void | register_apply (int ob_type, apply_func method) |
void | register_describe (int ob_type, describe_func method) |
void | register_move_on (int ob_type, move_on_func method) |
void | register_process (int ob_type, process_func method) |
void | register_trigger (int ob_type, trigger_func method) |
Variables | |
ob_methods | type_methods [OBJECT_TYPE_MAX] |
Those functions deal with the object/type system.
Definition in file ob_types.c.
void init_ob_method_struct | ( | ob_methods * | methods, |
ob_methods * | fallback | ||
) |
Initializes a ob_methods struct. Make sure this always matches ob_methods.h
methods | ob_method structure to initialize |
fallback | Default fallback for the ob_method |
Definition at line 49 of file ob_types.c.
References ob_methods::apply, ob_methods::describe, ob_methods::fallback, ob_methods::move_on, ob_methods::process, and ob_methods::trigger.
Referenced by init_ob_methods(), and init_ob_types().
void init_ob_types | ( | ob_methods * | base_type | ) |
Initializes the object system.
base_type | base type to use as a base for all types. |
Definition at line 66 of file ob_types.c.
References init_ob_method_struct(), and OBJECT_TYPE_MAX.
Referenced by init_ob_methods().
void register_apply | ( | int | ob_type, |
apply_func | method | ||
) |
Registers the apply method for the given type.
ob_type | The type of object to register this method to |
method | The method to link |
Definition at line 79 of file ob_types.c.
References ob_methods::apply.
Referenced by init_type_armour_improver(), init_type_book(), init_type_cf_handle(), init_type_clock(), init_type_exit(), init_type_food(), init_type_lamp(), init_type_lighter(), init_type_poison(), init_type_potion(), init_type_power_crystal(), init_type_savebed(), init_type_scroll(), init_type_shop_inventory(), init_type_sign(), init_type_skillscroll(), init_type_spellbook(), init_type_transport(), init_type_treasure(), init_type_trigger(), and init_type_weapon_improver().
void register_describe | ( | int | ob_type, |
describe_func | method | ||
) |
Registers the describe method for the given type.
ob_type | The type of object to register this method to |
method | The method to link |
Definition at line 97 of file ob_types.c.
References ob_methods::describe.
Referenced by init_type_power_crystal().
void register_move_on | ( | int | ob_type, |
move_on_func | method | ||
) |
Registers the move_on method for the given type.
ob_type | The type of object to register this method to |
method | The method to link |
Definition at line 106 of file ob_types.c.
References ob_methods::move_on.
Referenced by init_type_altar(), init_type_arrow(), init_type_button(), init_type_check_inv(), init_type_container(), init_type_converter(), init_type_deep_swamp(), init_type_director(), init_type_exit(), init_type_hole(), init_type_identify_altar(), init_type_pedestal(), init_type_player_mover(), init_type_rune(), init_type_shop_mat(), init_type_sign(), init_type_spell_effect(), init_type_spinner(), init_type_thrown_object(), init_type_trap(), init_type_trapdoor(), init_type_trigger_altar(), init_type_trigger_button(), and init_type_trigger_pedestal().
void register_process | ( | int | ob_type, |
process_func | method | ||
) |
Registers the process method for the given type.
ob_type | The type of object to register this method to |
method | The method to link |
Definition at line 88 of file ob_types.c.
References ob_methods::process.
Referenced by init_type_arrow(), init_type_blindness(), init_type_creator(), init_type_deep_swamp(), init_type_detector(), init_type_gate(), init_type_marker(), init_type_mood_floor(), init_type_peacemaker(), init_type_player_changer(), init_type_poisoning(), init_type_rune(), init_type_spell_effect(), init_type_teleporter(), init_type_thrown_object(), init_type_transport(), init_type_trap(), and init_type_trigger().
void register_trigger | ( | int | ob_type, |
trigger_func | method | ||
) |
Registers the trigger method for the given type.
ob_type | The type of object to register this method to |
method | The method to link |
Definition at line 115 of file ob_types.c.
References ob_methods::trigger.
Referenced by init_type_creator(), init_type_duplicator(), init_type_marker(), init_type_mood_floor(), and init_type_teleporter().
ob_methods type_methods[OBJECT_TYPE_MAX] |
Registered method handlers.
Definition at line 42 of file ob_types.c.
Referenced by ob_apply(), ob_describe(), ob_move_on(), ob_process(), and ob_trigger().