12 #include "ModelGameObject.h" 19 #include "lua5.1/lua.h" 20 #include "lua5.1/lualib.h" 21 #include "lua5.1/lauxlib.h" 24 #define MAX_LEVEL_OBJECTS 1024 26 #define TYPE_GAME_OBJECT 1 27 #define TYPE_GAME_TEXT 2 28 #define TYPE_GAME_SPRITE 3 40 bool loadLevel(
const char*);
41 bool loadLevelFromBuffer(
const char*);
42 void loadScript(
const std::string &);
44 Object* findEnemyOfType(
const int&);
54 void updateTerrain(
int &x,
int &z,
float &height,
int &type,
float &red,
float &green,
float &blue);
55 void updateColor(
int &x,
int &z,
float &red,
float &green,
float &blue);
57 void getTerrainInfo(
int &x,
int &z,
float &height,
int &type,
float &red,
float &green,
float &blue);
58 void saveTerrain(
const char*);
60 void toggleBoundingBoxes();
61 void toggleControlTriangles();
64 void drawObjectOutlines();
67 void updateObjects(
Vector*);
68 void prepareObjects();
69 void animateObjects(
const float&);
71 Object* addObject(
const std::string&, lua_State*,
const unsigned int&);
76 ModelGameObject* getPlayer() {
return((ModelGameObject*)player_); }
77 Music* getMusic() {
return &music_; }
78 void setCamera(
Camera* camera) {
80 idToObjectMap_[0] = (
Object*)camera_;
81 camera_->setGameLevelId(0);
84 void setId(
const int &
id) { id_ = id; }
85 int getId() {
return id_; }
87 float getElapsedTime() {
return elapsedTime_; }
88 void setElapsedTime(
const float &elapsedTime) { elapsedTime_ = elapsedTime; }
90 void setComplete(
const bool &isComplete) { isComplete_ = isComplete; }
91 std::string getMusicPath() {
return musicPath_; }
92 void setMusicPath(
const std::string &musicPath) { musicPath_ = musicPath; }
93 Vector* getLightDirection() {
return &lightDirection_; }
95 void setSkyBox(
float[][3],
const int&,
const int&);
96 void setLightDirection(
const float &x,
const float &y,
const float &z) {
97 lightDirection_.setVector(x, y, z);
98 lightDirection_.normalize();
101 Object* getObjectFromId(
const int &
id) {
102 return (
id >= 0 &&
id < MAX_LEVEL_OBJECTS ? idToObjectMap_[
id] : NULL);
110 ModelGameObject* player_;
117 std::map <std::string, ObjectList> freeObjects_;
118 Object* idToObjectMap_[MAX_LEVEL_OBJECTS];
119 unsigned int numObjects_;
122 float bgcolor_[3][3];
133 bool controlTriangles_;
135 std::string musicPath_;
139 lua_State* luaState_;
141 bool prepLevelLoad(
const char* luaCode);
142 bool finishLevelLoad();
Definition: QuadTree.h:18
Create a linked list of game objects.
Definition: DisplayList.h:12
Definition: ObjectList.h:13
Base game object from which all concrete types are defined.
Definition: GameLevel.h:30
representation of a quadtree.