Crossfire Server, Trunk
|
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 32 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 49 of file ob_types.c.
References base_type, init_ob_method_struct(), OBJECT_TYPE_MAX, Ice::tmp, and type_methods.
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 62 of file ob_types.c.
References ob_methods::apply, and type_methods.
Referenced by init_type_armour_improver(), init_type_book(), init_type_cf_handle(), init_type_clock(), init_type_dragon_focus(), init_type_exit(), init_type_food(), init_type_lamp(), init_type_lightable(), init_type_lighter(), init_type_mimic(), 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 80 of file ob_types.c.
References ob_methods::describe, and type_methods.
Referenced by init_type_lamp(), init_type_power_crystal(), and init_type_spellbook().
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 89 of file ob_types.c.
References ob_methods::move_on, and type_methods.
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 71 of file ob_types.c.
References ob_methods::process, and type_methods.
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 98 of file ob_types.c.
References ob_methods::trigger, and type_methods.
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 25 of file ob_types.c.
Referenced by init_ob_types(), ob_apply(), ob_describe(), ob_move_on(), ob_process(), ob_trigger(), register_apply(), register_describe(), register_move_on(), register_process(), and register_trigger().