Crossfire Server, Trunk
ob_methods.c
Go to the documentation of this file.
1 /*
2  * Crossfire -- cooperative multi-player graphical RPG and adventure game
3  *
4  * Copyright (c) 1999-2014 Mark Wedel and the Crossfire Development Team
5  * Copyright (c) 1992 Frank Tore Johansen
6  *
7  * Crossfire is free software and comes with ABSOLUTELY NO WARRANTY. You are
8  * welcome to redistribute it under certain conditions. For details, please
9  * see COPYING and LICENSE.
10  *
11  * The authors can be reached via e-mail at <crossfire@metalforge.org>.
12  */
13 
19 #include <global.h>
20 #include <ob_methods.h>
21 #include <ob_types.h>
22 
23 #ifndef __CEXTRACT__
24 #include <sproto.h>
25 #endif
26 
28 
30 
35 void init_ob_methods(void) {
36  /* Init legacy_type. Note, this is just used as a transitionary fallback
37  * until refactoring of type-specific code is complete, and when it is this
38  * ob_methods struct should be removed.
39  */
44  legacy_type.move_on = NULL;
45 
46  /* Init base_type, inheriting from legacy_type. The base_type is susposed to
47  * be a base class of object that all other object types inherit methods
48  * they don't handle individually. Things such as generic drop/pickup code
49  * should go here, in addition some other things such as "I don't know how
50  * to apply that." messages should be handled from here.
51  */
53  /* base_type.foobar = common_ob_foobar; */
54 
55  /* Init object types methods, inheriting from base_type. */
58 }
global.h
legacy_type
static ob_methods legacy_type
Definition: ob_methods.c:29
init_ob_method_struct
void init_ob_method_struct(ob_methods *methods, ob_methods *fallback)
Definition: ob_types.c:32
ob_methods::move_on
move_on_func move_on
Definition: ob_methods.h:49
legacy_ob_describe
void legacy_ob_describe(const object *op, const object *observer, int use_media_tags, char *buf, size_t size)
Definition: legacy_describe.c:38
init_ob_methods
void init_ob_methods(void)
Definition: ob_methods.c:35
base_type
static ob_methods base_type
Definition: ob_methods.c:27
ob_methods::apply
apply_func apply
Definition: ob_methods.h:46
ob_methods
Definition: ob_methods.h:45
init_ob_types
void init_ob_types(ob_methods *base_type)
Definition: ob_types.c:49
sproto.h
ob_methods::describe
describe_func describe
Definition: ob_methods.h:48
ob_types.h
ob_methods::process
process_func process
Definition: ob_methods.h:47
legacy_ob_apply
method_ret legacy_ob_apply(object *op, object *applier, int aflags)
Definition: apply.c:49
register_all_ob_types
void register_all_ob_types(void)
Definition: ob_types.c:31
ob_methods.h
legacy_ob_process
method_ret legacy_ob_process(object *op)
Definition: process.c:31