home *** CD-ROM | disk | FTP | other *** search
- #ifndef __Arena_h__
- #define __Arena_h__
-
- #include <stdio.h>
-
- #include "Texture.h"
- #include "Model.h"
- #include "vectormath.h"
- #include "SpacePartitioningTree.h"
- #include "Console.h"
- //#include "q3bsp.h"
-
- //#define ARENA_MAX_SPAWNPOINTS 8
-
- typedef struct arenaCycleElement_s{
- char arena[CON_MAX_STRING_LENGTH];
- unsigned long durationMillis;
- }arenaCycleElement_t;
-
- typedef struct arenaCycle_s{
- vector<arenaCycleElement_t> arenaCycleElements;
- int currentArena;
- unsigned long playingSinceMillis;
- }arenaCycle_t;
-
- typedef struct spawnpoint_s{
- vec3_t min, max;
- unsigned int teamFlags;
- }spawnpoint_t;
-
- typedef struct supplypad_s{
- vec3_t pos;
- }supplypad_t;
-
- class Arena{
- public:
- char* name;
-
- Model* model;
- Model* skybox;
- Model* collisionModel;
- SpacePartitioningTree* sptree;
-
- vector<spawnpoint_t> spawnpoints;
- vector<supplypad_t> supplypads;
-
- Texture* mapTexture;
- Texture* thumbnailTexture;
- vec3_t min, max;
-
- vec4_t fogColor;
- float fogStart, fogEnd, fogDensity;
- bool fogEnabled;
-
- float gravity;
-
- Arena(const char* filename);
- ~Arena();
-
- void render();
- void readFromFile(File* f);
- void loadModel(const char* filename);
- Face* getFaceIntersectingAABB(vec3_t min, vec3_t max);
- Face* getFrontFacingFaceIntersectingAABB(vec3_t min, vec3_t max, vec3_t dir);
- };
-
- #endif /* __Arena_h__ */
-