Debian Codegraph @

types/legacy/process.c

raw symbols SCIP
1 /*
2 CrossFire, A Multiplayer game for X-windows
3
4 Copyright (C) 2006 Mark Wedel & Crossfire Development Team
5 Copyright (C) 1992 Frank Tore Johansen
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20
21 The authors can be reached via e-mail to [email protected]
22 */
23 #include <global.h>
24 #include <ob_methods.h>
25 #include <ob_types.h>
26 #include <sproto.h>
27
28 /** @file process.c
29 * Legacy implementation of the process method.
30 */
31 method_ret legacy_ob_process(ob_methods *context, object *op) {
32 switch (op->type) {
33 case ROD:
34 regenerate_rod(op);
35 return METHOD_OK;
36
37 case FORCE:
38 case POTION_RESIST_EFFECT:
39 legacy_remove_force(op);
40 return METHOD_OK;
41
42 case DISEASE:
43 move_disease(op);
44 return METHOD_OK;
45
46 case SYMPTOM:
47 move_symptom(op);
48 return METHOD_OK;
49
50 case DOOR:
51 remove_door(op);
52 return METHOD_OK;
53
54 case LOCKED_DOOR:
55 remove_locked_door(op);
56 return METHOD_OK;
57
58 case GOLEM:
59 pets_move_golem(op);
60 return METHOD_OK;
61
62 case EARTHWALL:
63 hit_player(op, 2, op, AT_PHYSICAL, 1);
64 return METHOD_OK;
65
66 case FIREWALL:
67 move_firewall(op);
68 if (op->stats.maxsp)
69 animate_turning(op);
70 return METHOD_OK;
71
72 case TRIGGER_BUTTON:
73 case TRIGGER_PEDESTAL:
74 case TRIGGER_ALTAR:
75 legacy_animate_trigger(op);
76 return METHOD_OK;
77
78 case DIRECTOR:
79 if (op->stats.maxsp)
80 animate_turning(op);
81 return METHOD_OK;
82
83 case HOLE:
84 legacy_move_hole(op);
85 return METHOD_OK;
86
87 case PLAYERMOVER:
88 move_player_mover(op);
89 return METHOD_OK;
90 }
91 return METHOD_UNHANDLED;
92 }