3f30ee653e890ac5eb475490cdb9d93e2adc1058
[supertux.git] / src / gameobjs_bridge.h
1 /***************************************************************************
2                           gameobjs_bridge.h  -  description
3                              -------------------
4     begin                : Dec, 19 2004
5     copyright            : (C) 2004 by Ricardo Cruz
6     email                : rick2@aeiou.pt
7  ***************************************************************************/
8
9 /***************************************************************************
10  *                                                                         *
11  *   This program is free software; you can redistribute it and/or modify  *
12  *   it under the terms of the GNU General Public License as published by  *
13  *   the Free Software Foundation; either version 2 of the License, or     *
14  *   (at your option) any later version.                                   *
15  *                                                                         *
16  ***************************************************************************/
17
18 #ifndef GAMEOBJS_BRIDGE_H
19 #define GAMEOBJS_BRIDGE_H
20
21 #include <string>
22
23 //#include "lisp/parser.h"
24 #include "lisp/lisp.h"
25 //#include "lisp/writer.h"
26 //#include "lisp/list_iterator.h"
27
28 //class GameObject;
29 #include "object/gameobjs.h"
30
31
32 /** This is just a set of functions aim to provide a common way
33     to create new game objects. Game objects that ain't really
34     interactive don't fit in here. */
35
36 enum GameObjectsType {
37   // Game Objects
38   COIN_OBJECT,
39   INVISIBLE_BLOCK_OBJECT,
40   PLATFORM_OBJECT,
41   ROCK_OBJECT,
42   // Bad Guys
43   JUMPY_BADGUY,
44   SNOWBALL_BADGUY,
45   BOUNCING_SNOWBALL_BADGUY,
46   FLAME_BADGUY,
47   FLYING_SNOWBALL_BADGUY,
48   MRICEBLOCK_BADGUY,
49   MRBOMB_BADGUY,
50   DISPENSER_BADGUY,
51   SPIKE_BADGUY,
52   SPIKY_BADGUY,
53   NOLOK_01_BADGUY,
54   // Triggers
55   DOOR_TRIGGER,
56
57   TOTAL_GAMEOBJECTS,
58   NOT_RECOGNIZED_GAMEOBJECT
59   };
60
61 /* Objects identifiers. */
62 std::string object_type_to_string(int kind);
63 GameObjectsType object_name_to_type(const std::string& name);
64
65 bool is_object(const std::string& name);
66
67 /* Calls to return a pointer to a created GameObjects.
68    Don't forget to delete them! */
69 GameObject* create_object(GameObjectsType kind, const lisp::Lisp& reader);
70 GameObject* create_object(GameObjectsType kind, const Vector& pos);
71
72 #endif /*GAMEOBJS_BRIDGE_H*/