home *** CD-ROM | disk | FTP | other *** search
/ Enter 2005 March / ENTER.ISO / files / fwp-0.0.6-win32-installer.exe / Arena.h < prev    next >
Encoding:
C/C++ Source or Header  |  2004-12-19  |  1.3 KB  |  68 lines

  1. #ifndef __Arena_h__
  2. #define __Arena_h__
  3.  
  4. #include <stdio.h>
  5.  
  6. #include "Texture.h"
  7. #include "Model.h"
  8. #include "vectormath.h"
  9. #include "SpacePartitioningTree.h"
  10. #include "Console.h"
  11. //#include "q3bsp.h"
  12.  
  13. //#define ARENA_MAX_SPAWNPOINTS    8
  14.  
  15. typedef struct arenaCycleElement_s{
  16.     char arena[CON_MAX_STRING_LENGTH];
  17.     unsigned long durationMillis;
  18. }arenaCycleElement_t;
  19.  
  20. typedef struct arenaCycle_s{
  21.     vector<arenaCycleElement_t> arenaCycleElements;
  22.     int currentArena;
  23.     unsigned long playingSinceMillis;
  24. }arenaCycle_t;
  25.  
  26. typedef struct spawnpoint_s{
  27.     vec3_t min, max;
  28.     unsigned int teamFlags;
  29. }spawnpoint_t;
  30.  
  31. typedef struct supplypad_s{
  32.     vec3_t pos;
  33. }supplypad_t;
  34.  
  35. class Arena{
  36. public:
  37.     char* name;
  38.  
  39.     Model* model;
  40.     Model* skybox;
  41.     Model* collisionModel;
  42.     SpacePartitioningTree* sptree;
  43.  
  44.     vector<spawnpoint_t> spawnpoints;
  45.     vector<supplypad_t> supplypads;
  46.  
  47.     Texture* mapTexture;
  48.     Texture* thumbnailTexture;
  49.     vec3_t min, max;
  50.  
  51.     vec4_t fogColor;
  52.     float fogStart, fogEnd, fogDensity;
  53.     bool fogEnabled;
  54.  
  55.     float gravity;
  56.  
  57.     Arena(const char* filename);
  58.     ~Arena();
  59.  
  60.     void render();
  61.     void readFromFile(File* f);
  62.     void loadModel(const char* filename);
  63.     Face* getFaceIntersectingAABB(vec3_t min, vec3_t max);
  64.     Face* getFrontFacingFaceIntersectingAABB(vec3_t min, vec3_t max, vec3_t dir);
  65. };
  66.  
  67. #endif    /* __Arena_h__ */
  68.