//this is an example world class //it provides data structures, an update function, and a renderer //it knows nothing about the camera, and provides read/write access to the input class, but doesn't know how input works #ifndef __WORLD_H__ #define __WORLD_H__ #include "events.h" #include "skybox.h" #include "course.h" #include "coursecity.h" #include "game.h" #include "playerlocation.h" #include "conversation.h" #include "npc.h" //#include "input.h" //extern tempinput input1; class World { //friend class Input; public: World(){}; virtual ~World(){}; //! Initialize the world void ResetPlayer(int i, bool init, int gamemode); void ResetCamera(int which); bool Init(int gamemode, char *skyboxPath, char *couseFile, char* npcFile, char *eventFile); void SetPlayerFrame(int ID, int delta); void UpdateState(); void RenderPlayer(int ID); void Render(int numplayers, int playerID); void StartGlowing(int player); PlayerState GetPlayer(int); void SetGoal(int, float, float, float);//for reading in the goal bool Finished(int numplayers);//returns whether or not the current level has been finished // protected: PlayerState players[MAXPLAYERS]; CameraState cameras[MAXPLAYERS]; int GetCourseSize(); void actionbutton(int who);//input calls this for the action key conversation chats; coursecity course; NPC npc; eventthing eventer; private: int goaltype;//0 for find an object, can use other things such at wipe out another player or score points or whatever float goalx; float goaly; float goaldistance; bool levelover1;//the value returned by finished-init to false, set to true if the level is over bool levelover2;//for player 2 Skybox skybox; //!< textured skybox cube //Course course; //!< course map }; #endif