Commit 6a8cb464 authored by Rémi Verschelde's avatar Rémi Verschelde

clang-format: Apply to all headers

Apparently it had only been applied to .cpp files until now. Also added `AccessModifierOffset: -4` in the configuration.
parent 5fca41ab
......@@ -2,6 +2,7 @@
BasedOnStyle: Mozilla
---
Language: Cpp
AccessModifierOffset: -4
AllowShortIfStatementsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
......
......@@ -24,29 +24,39 @@ along with Lugaru. If not, see <http://www.gnu.org/licenses/>.
#include <vector>
enum anim_attack_type {
neutral, normalattack, reversed, reversal
enum anim_attack_type
{
neutral,
normalattack,
reversed,
reversal
};
enum anim_height_type {
lowheight, middleheight, highheight
enum anim_height_type
{
lowheight,
middleheight,
highheight
};
enum animation_type {
enum animation_type
{
#define DECLARE_ANIM(id, ...) id,
#include "Animation.def"
#undef DECLARE_ANIM
animation_count
};
enum animation_bit_offsets {
enum animation_bit_offsets
{
#define DECLARE_ANIM_BIT(bit) o_##bit,
#include "Animation.def"
#undef DECLARE_ANIM_BIT
animation_bit_count
};
enum animation_bits_def {
enum animation_bits_def
{
#define DECLARE_ANIM_BIT(bit) bit = 1 << o_##bit,
#include "Animation.def"
#undef DECLARE_ANIM_BIT
......@@ -60,7 +70,7 @@ static const int animation_bits[animation_count] = {
struct AnimationFrameJointInfo
{
XYZ position;
XYZ position;
float twist;
float twist2;
bool onground;
......
......@@ -25,13 +25,28 @@ along with Lugaru. If not, see <http://www.gnu.org/licenses/>.
#include <vector>
enum bodypart {
head, neck,
leftshoulder, leftelbow, leftwrist, lefthand,
rightshoulder, rightelbow, rightwrist, righthand,
abdomen, lefthip, righthip, groin,
leftknee, leftankle, leftfoot,
rightknee, rightankle, rightfoot
enum bodypart
{
head,
neck,
leftshoulder,
leftelbow,
leftwrist,
lefthand,
rightshoulder,
rightelbow,
rightwrist,
righthand,
abdomen,
lefthip,
righthip,
groin,
leftknee,
leftankle,
leftfoot,
rightknee,
rightankle,
rightfoot
};
class Joint
......
......@@ -25,7 +25,12 @@ along with Lugaru. If not, see <http://www.gnu.org/licenses/>.
#include <vector>
enum muscle_type {boneconnect, constraint, muscle};
enum muscle_type
{
boneconnect,
constraint,
muscle
};
class Muscle
{
......
......@@ -24,9 +24,9 @@ along with Lugaru. If not, see <http://www.gnu.org/licenses/>.
#include "Animation/Animation.hpp"
#include "Animation/Joint.hpp"
#include "Animation/Muscle.hpp"
#include "Graphic/gamegl.hpp"
#include "Graphic/Models.hpp"
#include "Graphic/Sprite.hpp"
#include "Graphic/gamegl.hpp"
#include "Math/XYZ.hpp"
#include "Objects/Object.hpp"
#include "Utils/binio.h"
......@@ -79,8 +79,8 @@ public:
bool freefall;
void FindForwards();
float DoConstraints(XYZ *coords, float *scale);
void DoGravity(float *scale);
float DoConstraints(XYZ* coords, float* scale);
void DoGravity(float* scale);
void FindRotationJoint(int which);
void FindRotationJointSameTwist(int which);
void FindRotationMuscle(int which, int animation);
......@@ -94,7 +94,6 @@ private:
inline Joint& joint(int bodypart) { return joints[jointlabels[bodypart]]; }
inline XYZ& jointPos(int bodypart) { return joint(bodypart).position; }
inline XYZ& jointVel(int bodypart) { return joint(bodypart).velocity; }
};
#endif
......@@ -22,23 +22,24 @@ along with Lugaru. If not, see <http://www.gnu.org/licenses/>.
#include "Math/XYZ.hpp"
enum sound_type {
enum sound_type
{
#define DECLARE_SOUND(id, filename) id,
#include "Sounds.def"
#undef DECLARE_SOUND
sounds_count
};
extern struct OPENAL_SAMPLE *samp[sounds_count];
extern struct OPENAL_SAMPLE* samp[sounds_count];
extern int channels[];
extern void loadAllSounds();
extern void addEnvSound(XYZ coords, float vol = 16, float life = .4);
extern void emit_sound_at(int soundid, const XYZ &pos = XYZ(), float vol = 256.f);
extern void emit_sound_at(int soundid, const XYZ& pos = XYZ(), float vol = 256.f);
extern void emit_sound_np(int soundid, float vol = 256.f);
extern void emit_stream_at(int soundid, const XYZ &pos = XYZ(), float vol = 256.f);
extern void emit_stream_at(int soundid, const XYZ& pos = XYZ(), float vol = 256.f);
extern void emit_stream_np(int soundid, float vol = 256.f);
extern void resume_stream(int soundid);
extern void pause_sound(int soundid);
......
......@@ -25,11 +25,11 @@ along with Lugaru. If not, see <http://www.gnu.org/licenses/>.
#include "Platform/Platform.hpp"
#ifdef __APPLE__
#include <OpenAL/al.h>
#include <OpenAL/alc.h>
#include <OpenAL/al.h>
#include <OpenAL/alc.h>
#else
#include <AL/al.h>
#include <AL/alc.h>
#include <AL/al.h>
#include <AL/alc.h>
#endif
#include <ogg/ogg.h>
......@@ -68,17 +68,16 @@ along with Lugaru. If not, see <http://www.gnu.org/licenses/>.
#endif /* DLL_EXPORTS */
#endif /* if 0 */
typedef struct OPENAL_SAMPLE OPENAL_SAMPLE;
typedef OPENAL_SAMPLE OPENAL_STREAM;
typedef struct OPENAL_DSPUNIT OPENAL_DSPUNIT;
typedef struct OPENAL_SAMPLE OPENAL_SAMPLE;
typedef OPENAL_SAMPLE OPENAL_STREAM;
typedef struct OPENAL_DSPUNIT OPENAL_DSPUNIT;
#define OPENAL_LOOP_OFF 0x00000001 /* For non looping samples. */
#define OPENAL_LOOP_NORMAL 0x00000002 /* For forward looping samples. */
#define OPENAL_HW3D 0x00001000 /* Attempts to make samples use 3d hardware acceleration. (if the card supports it) */
#define OPENAL_2D 0x00002000 /* Tells software (not hardware) based sample not to be included in 3d processing. */
#define OPENAL_FREE -1 /* value to play on any free channel, or to allocate a sample in a free sample slot. */
#define OPENAL_ALL -3 /* for a channel index , this flag will affect ALL channels available! Not supported by every function. */
#define OPENAL_LOOP_OFF 0x00000001 /* For non looping samples. */
#define OPENAL_LOOP_NORMAL 0x00000002 /* For forward looping samples. */
#define OPENAL_HW3D 0x00001000 /* Attempts to make samples use 3d hardware acceleration. (if the card supports it) */
#define OPENAL_2D 0x00002000 /* Tells software (not hardware) based sample not to be included in 3d processing. */
#define OPENAL_FREE -1 /* value to play on any free channel, or to allocate a sample in a free sample slot. */
#define OPENAL_ALL -3 /* for a channel index , this flag will affect ALL channels available! Not supported by every function. */
#ifdef __cplusplus
extern "C" {
......@@ -87,22 +86,22 @@ extern "C" {
#undef AL_API
#define AL_API
AL_API void OPENAL_3D_Listener_SetAttributes(const float *pos, const float *vel, float fx, float fy, float fz, float tx, float ty, float tz);
AL_API signed char OPENAL_3D_SetAttributes(int channel, const float *pos);
AL_API signed char OPENAL_3D_SetAttributes_(int channel, const XYZ &pos);
AL_API signed char OPENAL_Init(int mixrate, int maxsoftwarechannels, unsigned int flags);
AL_API void OPENAL_Close();
AL_API OPENAL_SAMPLE *OPENAL_Sample_Load(int index, const char *name_or_data, unsigned int mode, int offset, int length);
AL_API void OPENAL_Sample_Free(OPENAL_SAMPLE *sptr);
AL_API signed char OPENAL_SetFrequency(int channel, bool slomo = false);
AL_API signed char OPENAL_SetVolume(int channel, int vol);
AL_API signed char OPENAL_SetPaused(int channel, signed char paused);
AL_API void OPENAL_SetSFXMasterVolume(int volume);
AL_API signed char OPENAL_StopSound(int channel);
AL_API signed char OPENAL_Stream_SetMode(OPENAL_STREAM *stream, unsigned int mode);
AL_API void OPENAL_Update();
void PlaySoundEx(int chan, OPENAL_SAMPLE *sptr, OPENAL_DSPUNIT *dsp, signed char startpaused);
void PlayStreamEx(int chan, OPENAL_SAMPLE *sptr, OPENAL_DSPUNIT *dsp, signed char startpaused);
AL_API void OPENAL_3D_Listener_SetAttributes(const float* pos, const float* vel, float fx, float fy, float fz, float tx, float ty, float tz);
AL_API signed char OPENAL_3D_SetAttributes(int channel, const float* pos);
AL_API signed char OPENAL_3D_SetAttributes_(int channel, const XYZ& pos);
AL_API signed char OPENAL_Init(int mixrate, int maxsoftwarechannels, unsigned int flags);
AL_API void OPENAL_Close();
AL_API OPENAL_SAMPLE* OPENAL_Sample_Load(int index, const char* name_or_data, unsigned int mode, int offset, int length);
AL_API void OPENAL_Sample_Free(OPENAL_SAMPLE* sptr);
AL_API signed char OPENAL_SetFrequency(int channel, bool slomo = false);
AL_API signed char OPENAL_SetVolume(int channel, int vol);
AL_API signed char OPENAL_SetPaused(int channel, signed char paused);
AL_API void OPENAL_SetSFXMasterVolume(int volume);
AL_API signed char OPENAL_StopSound(int channel);
AL_API signed char OPENAL_Stream_SetMode(OPENAL_STREAM* stream, unsigned int mode);
AL_API void OPENAL_Update();
void PlaySoundEx(int chan, OPENAL_SAMPLE* sptr, OPENAL_DSPUNIT* dsp, signed char startpaused);
void PlayStreamEx(int chan, OPENAL_SAMPLE* sptr, OPENAL_DSPUNIT* dsp, signed char startpaused);
#ifdef __cplusplus
}
......
......@@ -18,20 +18,21 @@ You should have received a copy of the GNU General Public License
along with Lugaru. If not, see <http://www.gnu.org/licenses/>.
*/
typedef void (*console_handler)(const char *args);
typedef void (*console_handler)(const char* args);
#define DECLARE_COMMAND(cmd) void ch_##cmd(const char *args);
#define DECLARE_COMMAND(cmd) void ch_##cmd(const char* args);
#include "ConsoleCmds.def"
#undef DECLARE_COMMAND
#undef DECLARE_COMMAND
/* FIXME - This is only to get cmd_count, not very clean */
enum console_command {
enum console_command
{
#define DECLARE_COMMAND(cmd) cmd_##cmd,
#include "ConsoleCmds.def"
#undef DECLARE_COMMAND
cmd_count
};
extern const char *cmd_names[cmd_count];
extern const char* cmd_names[cmd_count];
extern console_handler cmd_handlers[cmd_count];
......@@ -33,7 +33,8 @@ public:
int attach;
XYZ location;
inline void setColors(GLfloat cr, GLfloat cg, GLfloat cb,
GLfloat ar, GLfloat ag, GLfloat ab) {
GLfloat ar, GLfloat ag, GLfloat ab)
{
color[0] = cr;
color[1] = cg;
color[2] = cb;
......
......@@ -21,8 +21,8 @@ along with Lugaru. If not, see <http://www.gnu.org/licenses/>.
#ifndef _SKYBOX_HPP_
#define _SKYBOX_HPP_
#include "Graphic/gamegl.hpp"
#include "Graphic/Texture.hpp"
#include "Graphic/gamegl.hpp"
#include "Math/XYZ.hpp"
#include "Math/XYZ.hpp"
#include "Utils/ImageIO.hpp"
......@@ -33,7 +33,7 @@ public:
Texture front, left, back, right, up, down;
void load(const std::string& ffront, const std::string& fleft, const std::string& fback,
const std::string& fright, const std::string& fup, const std::string& fdown);
const std::string& fright, const std::string& fup, const std::string& fdown);
void draw();
SkyBox() {}
......
......@@ -23,16 +23,16 @@ along with Lugaru. If not, see <http://www.gnu.org/licenses/>.
#include "Environment/Lights.hpp"
#include "Graphic/Decal.hpp"
#include "Graphic/gamegl.hpp"
#include "Graphic/Texture.hpp"
#include "Graphic/gamegl.hpp"
#include "Math/Frustum.hpp"
#include "Math/XYZ.hpp"
#include "Utils/ImageIO.hpp"
#define max_terrain_size 256
#define curr_terrain_size size
#define subdivision 64
#define max_patch_elements (max_terrain_size/subdivision)*(max_terrain_size/subdivision)*54
#define max_terrain_size 256
#define curr_terrain_size size
#define subdivision 64
#define max_patch_elements (max_terrain_size / subdivision) * (max_terrain_size / subdivision) * 54
#define allfirst 0
#define mixed 1
......@@ -74,7 +74,7 @@ public:
int numtris[subdivision][subdivision];
int textureness[subdivision][subdivision];
GLfloat vArray[(max_patch_elements)*subdivision*subdivision];
GLfloat vArray[(max_patch_elements)*subdivision * subdivision];
bool visible[subdivision][subdivision];
float avgypatch[subdivision][subdivision];
......@@ -91,7 +91,7 @@ public:
void DeleteDecal(int which);
void MakeDecal(decal_type type, XYZ where, float size, float opacity, float rotation);
void MakeDecalLock(decal_type type, XYZ where, int whichx, int whichy, float size, float opacity, float rotation);
int lineTerrain(XYZ p1, XYZ p2, XYZ *p);
int lineTerrain(XYZ p1, XYZ p2, XYZ* p);
float getHeight(float pointx, float pointz);
float getOpacity(float pointx, float pointz);
XYZ getLighting(float pointx, float pointz);
......
......@@ -26,22 +26,22 @@ along with Lugaru. If not, see <http://www.gnu.org/licenses/>.
#include "Environment/Lights.hpp"
#include "Environment/Skybox.hpp"
#include "Environment/Terrain.hpp"
#include "Graphic/gamegl.hpp"
#include "Graphic/Models.hpp"
#include "Graphic/Sprite.hpp"
#include "Graphic/Stereo.hpp"
#include "Graphic/Text.hpp"
#include "Graphic/Texture.hpp"
#include "Graphic/gamegl.hpp"
#include "Objects/Object.hpp"
#include "Objects/Person.hpp"
#include "Objects/Weapons.hpp"
#include "Thirdparty/optionparser.h"
#include "User/Account.hpp"
#include "Utils/binio.h"
#include "Utils/ImageIO.hpp"
#include "Utils/binio.h"
#include <fstream>
#include <SDL.h>
#include <fstream>
#define NB_CAMPAIGN_MENU_ITEM 7
......@@ -70,7 +70,7 @@ extern float deltah, deltav;
extern int mousecoordh, mousecoordv;
extern int oldmousecoordh, oldmousecoordv;
extern float yaw, pitch;
extern SkyBox *skybox;
extern SkyBox* skybox;
extern bool cameramode;
extern bool firstLoadDone;
......@@ -97,8 +97,8 @@ extern int musictype;
extern XYZ mapcenter;
extern float mapradius;
extern Text *text;
extern Text *textmono;
extern Text* text;
extern Text* textmono;
extern float fps;
extern bool editorenabled;
......@@ -168,43 +168,69 @@ float pitchTo(XYZ start, XYZ end);
float sq(float n);
#ifndef __forceinline
# ifdef __GNUC__
# define __forceinline inline __attribute__((always_inline))
# endif
#ifdef __GNUC__
#define __forceinline inline __attribute__((always_inline))
#endif
#endif
static __forceinline void swap_gl_buffers(void)
{
extern SDL_Window *sdlwindow;
extern SDL_Window* sdlwindow;
SDL_GL_SwapWindow(sdlwindow);
// try to limit this to 60fps, even if vsync fails.
Uint32 now;
static Uint32 frameticks = 0;
const Uint32 endticks = (frameticks + 16);
while ((now = SDL_GetTicks()) < endticks) { /* spin. */ }
while ((now = SDL_GetTicks()) < endticks) { /* spin. */
}
frameticks = now;
}
enum maptypes {
mapkilleveryone, mapgosomewhere,
mapkillsomeone, mapkillmost // These two are unused
enum maptypes
{
mapkilleveryone,
mapgosomewhere,
mapkillsomeone,
mapkillmost // These two are unused
};
enum pathtypes {wpkeepwalking, wppause};
extern const char *pathtypenames[2];
enum pathtypes
{
wpkeepwalking,
wppause
};
enum editortypes {typeactive, typesitting, typesittingwall, typesleeping,
typedead1, typedead2, typedead3, typedead4
};
extern const char* pathtypenames[2];
extern const char *editortypenames[8];
enum editortypes
{
typeactive,
typesitting,
typesittingwall,
typesleeping,
typedead1,
typedead2,
typedead3,
typedead4
};
SDL_bool sdlEventProc(const SDL_Event &e);
extern const char* editortypenames[8];
SDL_bool sdlEventProc(const SDL_Event& e);
enum optionIndex { UNKNOWN, VERSION, HELP, FULLSCREEN, NOMOUSEGRAB, SOUND, OPENALINFO, SHOWRESOLUTIONS, DEVTOOLS };
enum optionIndex
{
UNKNOWN,
VERSION,
HELP,
FULLSCREEN,
NOMOUSEGRAB,
SOUND,
OPENALINFO,
SHOWRESOLUTIONS,
DEVTOOLS
};
/* Number of options + 1 */
const int commandLineOptionsNumber = 10;
......
......@@ -26,7 +26,8 @@ class Model;
#include "Math/XYZ.hpp"
enum decal_type {
enum decal_type
{
shadowdecal = 0,
footprintdecal = 1,
blooddecal = 2,
......
......@@ -22,8 +22,8 @@ along with Lugaru. If not, see <http://www.gnu.org/licenses/>.
#define _MODELS_HPP_
#include "Environment/Terrain.hpp"
#include "Graphic/gamegl.hpp"
#include "Graphic/Texture.hpp"
#include "Graphic/gamegl.hpp"
#include "Math/XYZ.hpp"
#include "Utils/binio.h"
......@@ -35,9 +35,10 @@ along with Lugaru. If not, see <http://www.gnu.org/licenses/>.
//
// Textures List
//
typedef struct {
typedef struct
{
long xsz, ysz;
GLubyte *txt;
GLubyte* txt;
} ModelTexture;
//
......@@ -96,15 +97,15 @@ public:
Model();
~Model();
void DeleteDecal(int which);
void MakeDecal(decal_type atype, XYZ *where, float *size, float *opacity, float *rotation);
void MakeDecal(decal_type atype, XYZ* where, float* size, float* opacity, float* rotation);
void MakeDecal(decal_type atype, XYZ where, float size, float opacity, float rotation);
const XYZ& getTriangleVertex(unsigned triangleId, unsigned vertexId) const;
void drawdecals(Texture shadowtexture, Texture bloodtexture, Texture bloodtexture2, Texture breaktexture);
int SphereCheck(XYZ *p1, float radius, XYZ *p, XYZ *move, float *rotate);
int SphereCheckPossible(XYZ *p1, float radius, XYZ *move, float *rotate);
int LineCheck(XYZ *p1, XYZ *p2, XYZ *p, XYZ *move, float *rotate);
int LineCheckPossible(XYZ *p1, XYZ *p2, XYZ *p, XYZ *move, float *rotate);
int LineCheckSlidePossible(XYZ *p1, XYZ *p2, XYZ *move, float *rotate);
int SphereCheck(XYZ* p1, float radius, XYZ* p, XYZ* move, float* rotate);
int SphereCheckPossible(XYZ* p1, float radius, XYZ* move, float* rotate);
int LineCheck(XYZ* p1, XYZ* p2, XYZ* p, XYZ* move, float* rotate);
int LineCheckPossible(XYZ* p1, XYZ* p2, XYZ* p, XYZ* move, float* rotate);
int LineCheckSlidePossible(XYZ* p1, XYZ* p2, XYZ* move, float* rotate);
void UpdateVertexArray();
void UpdateVertexArrayNoTex();
void UpdateVertexArrayNoTexNoNorm();
......
......@@ -23,8 +23,8 @@ along with Lugaru. If not, see <http://www.gnu.org/licenses/>.
#include "Environment/Lights.hpp"
#include "Environment/Terrain.hpp"
#include "Graphic/gamegl.hpp"
#include "Graphic/Texture.hpp"
#include "Graphic/gamegl.hpp"
#include "Math/Frustum.hpp"
#include "Math/XYZ.hpp"
#include "Objects/Object.hpp"
......@@ -34,7 +34,8 @@ along with Lugaru. If not, see <http://www.gnu.org/licenses/>.
#define max_sprites 20000
enum {
enum
{
cloudsprite = 0,
bloodsprite,
flamesprite,
......@@ -74,16 +75,20 @@ public:
static void DeleteSprite(int which);
static void MakeSprite(int atype, XYZ where, XYZ avelocity, float red, float green, float blue, float asize, float aopacity);
static void Draw();
static void deleteSprites() {
static void deleteSprites()
{
sprites.clear();
}
static void setLastSpriteSpecial(int s) {
static void setLastSpriteSpecial(int s)
{
sprites.back()->special = s;
}
static void setLastSpriteSpeed(int s) {
static void setLastSpriteSpeed(int s)
{
sprites.back()->speed = s;
}
static void setLastSpriteAlivetime(float al) {
static void setLastSpriteAlivetime(float al)
{
sprites.back()->alivetime = al;
}
......
......@@ -23,29 +23,30 @@ along with Lugaru. If not, see <http://www.gnu.org/licenses/>.
#include <string>
enum StereoMode {
enum StereoMode
{
stereoNone,
stereoAnaglyph, /* red/cyan */
stereoHorizontalInterlaced, /* some 3D monitors */
stereoVerticalInterlaced,
stereoHorizontalSplit, /* cross-eyed view */
stereoHorizontalSplit, /* cross-eyed view */
stereoVerticalSplit,
stereoOpenGL, /* Whatever OpenGL does, if supported */
stereoCount /* must be last element */
stereoOpenGL, /* Whatever OpenGL does, if supported */
stereoCount /* must be last element */
};
enum StereoSide {
enum StereoSide
{
// Code multiplies by StereoSide to calculate camera offsets
stereoLeft = -1,
stereoLeft = -1,
stereoCenter = 0,
stereoRight = 1
stereoRight = 1
};
extern StereoMode stereomode;
extern StereoMode newstereomode;
extern float stereoseparation;
extern bool stereoreverse;
extern bool stereoreverse;
bool CanInitStereo(StereoMode mode);
void InitStereo(StereoMode mode);
......
......@@ -21,8 +21,8 @@ along with Lugaru. If not, see <http://www.gnu.org/licenses/>.
#ifndef _TEXT_HPP_
#define _TEXT_HPP_
#include "Graphic/gamegl.hpp"
#include "Graphic/Texture.hpp"
#include "Graphic/gamegl.hpp"
#include "Math/XYZ.hpp"
#include "Utils/ImageIO.hpp"
......
......@@ -24,9 +24,9 @@ along with Lugaru. If not, see <http://www.gnu.org/licenses/>.
#include "Graphic/gamegl.hpp"
#include <map>
#include <memory>
#include <string>
#include <vector>
#include <memory>
class TextureRes
{
......@@ -49,15 +49,19 @@ public:
/* Make sure TextureRes never gets copied */
TextureRes(TextureRes const& other) = delete;
TextureRes & operator=(TextureRes const& other) = delete;
TextureRes& operator=(TextureRes const& other) = delete;
};
class Texture
{
private:
std::shared_ptr<TextureRes> tex;
public:
inline Texture(): tex(nullptr) {}
inline Texture()
: tex(nullptr)
{
}
void load(const string& filename, bool hasMipmap);
void load(const string& filename, bool hasMipmap, GLubyte* array, int* skinsizep);
void bind();
......
......@@ -31,29 +31,27 @@ along with Lugaru. If not, see <http://www.gnu.org/licenses/>.
#include <string>
#ifdef WIN32
#define WIN32_LEAN_AND_MEAN
#define Polygon WinPolygon
#include <windows.h>
#undef Polygon
#define WIN32_LEAN_AND_MEAN
#define Polygon WinPolygon
#include <windows.h>
#undef Polygon
#endif
#define GL_GLEXT_PROTOTYPES 1
#ifdef __APPLE__
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#include <OpenGL/glext.h>
#include <OpenGL/gl.h>
#include <OpenGL/glext.h>
#include <OpenGL/glu.h>
#else
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glext.h>
#include <GL/gl.h>
#include <GL/glext.h>
#include <GL/glu.h>
#endif
using namespace std;
/* !!! FIXME: until we replace logger better. --ryan. */
#define LOGFUNC
void LOG(const std::string &fmt, ...);
void LOG(const std::string& fmt, ...);
#endif