2 // nazghul - an old-school RPG engine
3 // Copyright (C) 2002, 2003 Gordon McNutt
5 // This program is free software; you can redistribute it and/or modify it
6 // under the terms of the GNU General Public License as published by the Free
7 // Software Foundation; either version 2 of the License, or (at your option)
10 // This program is distributed in the hope that it will be useful, but WITHOUT
11 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 // You should have received a copy of the GNU General Public License along with
16 // this program; if not, write to the Free Foundation, Inc., 59 Temple Place,
17 // Suite 330, Boston, MA 02111-1307 USA
20 // gmcnutt@users.sourceforge.net
30 class VehicleType:public ObjectType {
32 virtual int getType();
33 virtual bool isType(int classID);
34 VehicleType(const char *tag, const char *name, struct sprite *sprite,
35 struct terrain_map *map,
36 class ArmsType *ordnance,
44 int crosswind_penalty,
48 virtual ~VehicleType();
49 virtual class ArmsType *getOrdnance();
50 virtual char *getMvDesc();
51 virtual sound_t *get_movement_sound();
52 virtual bool mustTurn();
53 virtual class Object *createInstance();
54 virtual int getWindPenalty(int facing);
58 bool killsOccupants();
60 struct formation *formation;
61 struct terrain_map *map;
62 closure_t *renderCombat;
66 class ArmsType *ordnance;
68 bool kills_occupants; /* on destroy */
75 int crosswind_penalty;
79 class Vehicle:public Object {
81 virtual bool isType(int classID);
82 virtual int getType();
83 Vehicle (VehicleType*);
84 Vehicle (VehicleType*, int facing, int hp);
86 virtual class VehicleType *getObjectType();
87 virtual const char *getName();
90 virtual class ArmsType *getOrdnance();
91 virtual struct mmode *getMovementMode();
92 virtual char *getMvDesc();
93 virtual sound_t *get_movement_sound();
94 virtual bool mustTurn();
95 virtual int get_facing_to_fire_weapon(int dx, int dy);
96 virtual bool fire_weapon(int dx, int dy, class Object *user);
97 virtual struct formation *get_formation();
98 virtual struct place *getPlace();
99 virtual void destroy();
100 virtual void save(struct save *save);
101 virtual void describe();
104 bool turn(int dx, int dy, int *cost);
105 int getMovementCostMultiplier();
106 void damage(int amount);
107 void setName(char *val);
108 class Object *getOccupant();
109 void setOccupant(class Object *val);
114 class Object *occupant;