Eliminated some problems resulting from last merge
[openstranded.git] / src / object.hh
blob38c57cd83e4f849ed493611d39c02768de6a9868
1 /*
2 * This file includes the definitions for the object specific classes
3 * derived from the Kingdom, Type and Entity base classes.
5 * Copyright (C) 2008 David Kolossa
7 * This file is part of OpenStranded
9 * OpenStranded is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation, either version 3 of the License, or
12 * (at your option) any later version.
14 * OpenStranded is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with OpenStranded. If not, see <http://www.gnu.org/licenses/>.
23 #ifndef STRANDED_OBJECT_HH
24 #define STRANDED_OBJECT_HH
26 #include "kingdom.hh"
27 #include "type.hh"
28 #include "entity.hh"
30 #define S2_OBJECT 1
33 * This is the class of all entities which belong to the kingdom
34 * "object".
35 * An object is an entity which doesn't move, except on script actions.
36 * In addition, the player's action with objects are mostly limited to
37 * damaging and destroying them (without scripts).
39 class ObjectEntity: public Entity
41 public:
42 ObjectEntity (ID type);
47 * This is the class of the object types, derived from the type base
48 * class.
49 * The single ObjectType instances define the default values for new
50 * created object entities as given in the definition files.
52 class ObjectType: public Type
54 public:
55 ObjectType (const char* name);
61 * Object kingdom class
63 class ObjectKingdom: public Kingdom
65 public:
66 // Constructor
67 ObjectKingdom ();
69 // Virtual methods
70 Entity*
71 createEntity (ID type);
73 Type*
74 createType (const char* name);
77 #endif /* STRANDED_OBJECT_HH */