This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Defines.h

By: a guest on Jan 21st, 2011  |  syntax: C++  |  size: 0.89 KB  |  views: 50  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. //global defines
  2. #ifndef DEFINES_CNST
  3. #define DEFINES_CNST
  4.     #define build 0.02
  5.     #define w_width 800
  6.     #define w_height 800
  7.     #define pi 3.14159265358979323
  8.     //Standard includes
  9.     #ifdef __cplusplus
  10.     #include <cstdlib>
  11.     #else
  12.     #include <stdlib.h>
  13.     #endif
  14.     #include <stdio.h>
  15.     #include <string>
  16.     #include <vector>
  17.     #include <math.h>
  18.     #include <iostream>
  19.     #include <sstream>
  20.     //OpenGL stuff
  21.     #ifdef __APPLE__
  22.     #include <SDL/SDL.h>
  23.     #else
  24.     #include <SDL.h>
  25.     #endif
  26.  
  27.     //#include <GL/glee.h>
  28.     #include <SDL_opengl.h>
  29.     #include <GL/gl.h>
  30.     #include <GL/glu.h>
  31.     #include <GL/glext.h>
  32.  
  33.     //global functions (useful?)
  34.     #define RADTODEG(x) (x * 180 / pi)
  35.     #define DEGTORAD(x) (x * pi / 180)
  36.     #define DFABS(x) ((x)<(0)?(x*-1):(x))//gets the absoloute value of any number
  37.     #define RANDOM_NUM(max,min) ((min)+(rand()%((max)-(min))))
  38. #endif
clone this paste RAW Paste Data