123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232 |
-
-
- #ifndef _OPENRAIDER_H_
- #define _OPENRAIDER_H_
-
- #include <List.h>
- #include <Map.h>
- #include <Vector.h>
- #include <TombRaider.h>
- #include <Camera.h>
- #include <Render.h>
- #include <Sound.h>
- #include <SDLSystem.h>
- #include <Network.h>
- #include <World.h>
-
-
- typedef enum {
- OpenRaiderKey_console = 1,
- OpenRaiderKey_attack,
- OpenRaiderKey_forward,
- OpenRaiderKey_left,
- OpenRaiderKey_right,
- OpenRaiderKey_backward,
- OpenRaiderKey_jump,
- OpenRaiderKey_tiltUp,
- OpenRaiderKey_tiltDown,
- OpenRaiderKey_panLeft,
- OpenRaiderKey_panRight,
- OpenRaiderKey_crouch
- } OpenRaider_KeyEvent;
-
- typedef enum {
- OpenRaider_ShowFPS = (1 << 0),
- OpenRaider_DebugMap = (1 << 1),
- OpenRaider_DebugModel = (1 << 2),
- OpenRaider_EnableSound = (1 << 3),
- OpenRaider_DumpTexture = (1 << 4),
- OpenRaider_FullScreen = (1 << 5),
- OpenRaider_Loading = (1 << 6)
- } OpenRaider_Flags;
-
-
- class OpenRaider : public SDLSystem {
- public:
-
-
-
- static OpenRaider *Instance();
-
-
-
- ~OpenRaider();
-
-
-
- void start();
-
-
-
- void handleMouseMotionEvent(float x, float y);
-
-
-
- void handleBoundKeyPressEvent(unsigned int key);
-
-
-
- void handleBoundKeyReleaseEvent(unsigned int key);
-
-
-
- void handleCommand(char *command, unsigned int mode);
-
-
-
- void handleConsoleKeyPressEvent(unsigned int key, unsigned int mod);
-
-
-
- void handleKeyPressEvent(unsigned int key, unsigned int mod);
-
-
-
- void handleKeyReleaseEvent(unsigned int key, unsigned int mod);
-
- void initGL();
-
-
-
- void gameFrame();
-
-
-
- __attribute__((format(printf, 3, 4)))
- void print(bool dump_stdout, const char *format, ...);
-
- protected:
-
-
-
- OpenRaider();
-
- private:
-
- void consoleCommand(char *cmd);
-
- void soundEvent(int type, int id, vec3_t pos, vec3_t angles);
-
-
-
- void processPakSounds();
-
-
-
- void initSound();
-
-
-
- void initTextures();
-
-
-
- void processTextures();
-
-
-
- void processSprites();
-
- void processMoveables();
-
- void processMoveable(int index, int i, int *ent, List <skeletal_model_t *> &cache2, List <unsigned int> &cache, int object_id);
-
-
-
- void processModel(int index);
-
-
-
- void processRoom(int index);
-
-
-
- void loadLevel(char *filename);
-
- void loadPakFolderRecursive(const char *dir);
-
- void menuMapListMove(char dir, bool show);
-
- static OpenRaider *mInstance;
- TombRaider m_tombraider;
- Sound mSound;
- Render m_render;
- Camera m_camera;
- GLString *mText;
-
-
-
- unsigned int mMode[8];
- unsigned int m_flags;
- int m_testSFX;
- float m_mouseX, m_mouseY;
- unsigned int m_texOffset;
- unsigned int mLevelTextureOffset;
-
-
-
- Vector <char *> mMusicList;
- Vector <char *> mMapList;
- char m_mapName[32];
- char *m_pakDir;
- char *m_audioDir;
- char *m_homeDir;
- Vector<entity_t *> mClients;
- };
-
- #endif
|