home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2007 September / maximum-cd-2007-09.iso / Assets / data / AssaultCube_v0.93.exe / source / src / cube.h < prev    next >
Encoding:
C/C++ Source or Header  |  2007-06-04  |  2.4 KB  |  100 lines

  1. #ifndef __CUBE_H__
  2. #define __CUBE_H__
  3.  
  4. #ifdef __GNUC__
  5. #define gamma __gamma
  6. #endif
  7.  
  8. #include <math.h>
  9.  
  10. #ifdef __GNUC__
  11. #undef gamma
  12. #endif
  13.  
  14. #include <string.h>
  15. #ifdef WIN32
  16.     #define strcasecmp(a,b) _stricmp(a,b)
  17. #endif
  18. #include <stdlib.h>
  19. #include <stdio.h>
  20. #include <stdarg.h>
  21. #include <ctype.h>
  22. #include <time.h>
  23. #ifdef __GNUC__
  24. #include <new>
  25. #else
  26. #include <new.h>
  27. #endif
  28.  
  29. #ifdef WIN32
  30.     #define WIN32_LEAN_AND_MEAN
  31.     #include "windows.h"
  32.     #define _WINDOWS
  33.     #define ZLIB_DLL
  34. #endif
  35.  
  36. #include <SDL.h>
  37. #include <SDL_image.h>
  38.  
  39. #define GL_GLEXT_LEGACY
  40. #define __glext_h__
  41. #define NO_SDL_GLEXT
  42. #include <SDL_opengl.h>
  43. #undef __glext_h__
  44.  
  45. #include "GL/glext.h"
  46.  
  47. #include <enet/enet.h>
  48.  
  49. #include <zlib.h>
  50.  
  51. #include "tools.h"
  52. #include "geom.h"
  53. #include "world.h"
  54. #include "model.h"
  55. #include "protocol.h"
  56. #include "entity.h"
  57. #include "sound.h"
  58. #include "command.h"
  59.  
  60. typedef vector<char *> cvector;
  61. typedef vector<int> ivector;
  62.  
  63. // globals ooh naughty
  64.  
  65. extern sqr *world, *wmip[];             // map data, the mips are sequential 2D arrays in memory
  66. extern header hdr;                      // current map header
  67. extern int sfactor, ssize;              // ssize = 2^sfactor
  68. extern int cubicsize, mipsize;          // cubicsize = ssize^2
  69. extern physent *camera1;                // camera representing perspective of player, usually player1
  70. extern playerent *player1;              // special client ent that receives input and acts as camera
  71. extern vector<playerent *> players;     // all the other clients (in multiplayer)
  72. extern vector<bounceent *> bounceents;
  73. extern bool editmode;
  74. extern vector<entity> ents;             // map entities
  75. extern vec worldpos, camup, camright;   // current target of the crosshair in the world
  76. extern vec hitpos;
  77. extern int lastmillis;                  // last time
  78. extern int curtime;                     // current frame time
  79. extern int gamemode, nextmode;
  80. extern int gamespeed;
  81. extern int xtraverts;
  82. extern bool minimap, reflecting, refracting;
  83. extern bool demoplayback;
  84. extern bool intermission;
  85. extern int maxclients;
  86. extern hashtable<char *, enet_uint32> mapinfo;
  87. extern bool hasTE, hasMT, hasMDA;
  88.  
  89. extern int VIRTW;                       // virtual screen size for text & HUD
  90. #define VIRTH 1800
  91. #define FONTH 64
  92. #define PIXELTAB (VIRTW/12)
  93.  
  94. #include "protos.h"                // external function decls
  95.  
  96. #define AC_VERSION 930
  97.  
  98. #endif
  99.  
  100.