Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

Join.h

Go to the documentation of this file.
00001 
00007 #ifndef _SCENE_JOIN_H_
00008 #define _SCENE_JOIN_H_
00009 
00010 #include "Scene.h"
00011 #include "GGlobals.h"
00012 #include "../Math/Vector.h"
00013 #include "../Util/Objects/Sphere.h"
00014 #include "../Util/Objects/Box.h"
00015 #include "../Util/Objects/Cubemap.h"
00016 #include "../Util/OpenGL/OpenGLParticleSystem.h"
00017 #include "../Sound/Sound.h"
00018 
00019 #define JOIN_TEXTURES           8
00020 #define JOIN_TEX_PLANET_0       0       // --> Planets NEEDS to be first!
00021 #define JOIN_TEX_PLANET_1       1
00022 #define JOIN_TEX_PLANET_2       2
00023 #define JOIN_TEX_PLANET_3       3
00024 #define JOIN_TEX_PLANET_4       4       // <--
00025 #define JOIN_TEX_CUBEMAP        5
00026 #define JOIN_TEX_SELECTION      6
00027 #define JOIN_TEX_LVL_LIST       7
00028 //#define JOIN_TEX_AVATAR               8
00029 
00030 #define JOIN_OBJECTS            3
00031 #define JOIN_OBJ_CUBEMAP        0
00032 #define JOIN_OBJ_SPHERE         1
00033 #define JOIN_OBJ_BOX            2
00034 
00035 #define JOIN_SOUNDS                     4
00036 #define JOIN_SOUND_SELECT       0
00037 #define JOIN_SOUND_ONLINE       1
00038 #define JOIN_SOUND_ADD          2
00039 #define JOIN_SOUND_REMOVE       3
00040 
00041 #define JOIN_LIGHTS     1
00042 
00043 #define JOIN_NET_SELECT                 (-1)
00044 #define JOIN_NET_ADD                    (-2)
00045 #define JOIN_NET_REMOVE                 (-3)
00046 #define JOIN_NET_START                  (-4)
00047 #define JOIN_NET_PLAYER_MODEL   (-5)
00048 
00049 class Join : public Scene {
00050         public:
00051                 Join();
00052                 virtual ~Join();
00053 
00054                 bool load(Application *parent);
00055                 bool unload();
00056                 bool update();
00057                 bool drawFrame();
00058 
00059         protected:
00060                 Vec4 getPlayerChatColor(int playerID);
00061                 bool loadGalaxies();
00062                 bool unloadGalaxies();
00063                 void setLvl(int galaxy, int lvl, const char *name, const char *file);
00064                 bool setGalaxy(int galaxy, const char *name, int levels);
00065                 void networkLoop();
00066                 void serverLoop();
00067                 bool addLevel(int galaxy, int level);
00068                 bool removeLevel();
00069 
00070                 void drawGalaxies();
00071                 void drawLevels();
00072                 void drawQuad(TextureID tex, float x, float y, float w, float h);
00073 
00074                 void setCamera(Vec3 pos, float pitch, float heading, bool soft = false);
00075 
00076         protected:
00077                 TextureID               m_textures[JOIN_TEXTURES];
00078                 OpenGLObject    *m_objects[JOIN_OBJECTS];
00079 
00080                 Sound                   m_sounds[JOIN_SOUNDS];
00081 
00082                 SLight                  m_lights[JOIN_LIGHTS];
00083 
00084                 int             m_selectedGalaxy;
00085                 int             m_selectedLevel;
00086 
00087                 float   m_camDist;
00088                 bool    m_camReached;
00089 
00090                 TextureID       m_texModels[MODELS];
00091 };
00092 
00093 #endif

Generated on Sun Jun 5 15:47:04 2005 for Defacto by  doxygen 1.4.3