OpenRaider  0.1.4-dev
Open Source Tomb Raider Game Engine implementation
Macros | Enumerations | Functions
global.h File Reference

Included everywhere. More...

#include "config.h"
#include <GL/gl.h>
#include <GL/glext.h>
#include <glm/glm.hpp>
#include <iostream>
#include <execinfo.h>
Include dependency graph for global.h:

Go to the source code of this file.

Macros

#define NDEBUG
 
#define assert(x)
 
#define assertEqual(x, y)
 
#define assertNotEqual(x, y)
 
#define assertLessThan(x, y)
 
#define assertLessThanEqual(x, y)
 
#define assertGreaterThan(x, y)
 
#define assertGreaterThanEqual(x, y)
 

Enumerations

enum  ActionEvents {
  menuAction = 0, debugAction, consoleAction, forwardAction,
  backwardAction, leftAction, rightAction, jumpAction,
  crouchAction, useAction, holsterAction, walkAction,
  ActionEventCount
}
 
enum  KeyboardButton {
  zeroKey = '0', oneKey = '1', twoKey = '2', threeKey = '3',
  fourKey = '4', fiveKey = '5', sixKey = '6', sevenKey = '7',
  eightKey = '8', nineKey = '9', aKey = 'a', bKey = 'b',
  cKey = 'c', dKey = 'd', eKey = 'e', fKey = 'f',
  gKey = 'g', hKey = 'h', iKey = 'i', jKey = 'j',
  kKey = 'k', lKey = 'l', mKey = 'm', nKey = 'n',
  oKey = 'o', pKey = 'p', qKey = 'q', rKey = 'r',
  sKey = 's', tKey = 't', uKey = 'u', vKey = 'v',
  wKey = 'w', xKey = 'x', yKey = 'y', zKey = 'z',
  quoteKey, backslashKey, backspaceKey, capslockKey,
  commaKey, delKey, upKey, downKey,
  leftKey, rightKey, endKey, equalsKey,
  escapeKey, f1Key, f2Key, f3Key,
  f4Key, f5Key, f6Key, f7Key,
  f8Key, f9Key, f10Key, f11Key,
  f12Key, backquoteKey, homeKey, insertKey,
  leftaltKey, leftctrlKey, leftbracketKey, leftguiKey,
  leftshiftKey, minusKey, numlockKey, pagedownKey,
  pageupKey, pauseKey, dotKey, rightaltKey,
  rightctrlKey, enterKey, rightguiKey, rightbracketKey,
  rightshiftKey, scrolllockKey, semicolonKey, slashKey,
  spaceKey, tabKey, leftmouseKey, middlemouseKey,
  rightmouseKey, fourthmouseKey, fifthmouseKey, aButton,
  bButton, xButton, yButton, backButton,
  startButton, guideButton, leftStick, rightStick,
  leftShoulder, rightShoulder, padUp, padDown,
  padLeft, padRight, leftXAxis, leftYAxis,
  rightXAxis, rightYAxis, leftTrigger, rightTrigger,
  unknownKey
}
 

Functions

void renderFrame ()
 
template<typename T , typename U >
void assertEqualImplementation (const char *exp, T a, U b, const char *file, int line, const char *str=nullptr)
 

Detailed Description

Included everywhere.

Author
xythobuz

Definition in file global.h.

Macro Definition Documentation

#define NDEBUG
FIXME:
gl3 header?
FIXME:
Is there a better way to handle this? We wan't to use our own assert(). Unfortunately, glm includes cassert in its headers. So we need to define NDEBUG here. To avoid a conflict, our flag is now called NODEBUG instead.

Definition at line 89 of file global.h.

#define assert (   x)
Value:
{ \
auto assertEvalTemp = x; \
if (!assertEvalTemp) \
assertEqualImplementation(#x, assertEvalTemp, true, __FILE__, __LINE__); \
}
void assertEqualImplementation(const char *exp, T a, U b, const char *file, int line, const char *str=nullptr)
Definition: global.h:101

Definition at line 124 of file global.h.

#define assertEqual (   x,
 
)
Value:
{ \
auto assertEvalTemp = x; \
auto assertEvalTemp2 = y; \
if (assertEvalTemp != assertEvalTemp2) \
assertEqualImplementation(#x " == " #y, assertEvalTemp, assertEvalTemp2, \
__FILE__, __LINE__, "!="); \
}
void assertEqualImplementation(const char *exp, T a, U b, const char *file, int line, const char *str=nullptr)
Definition: global.h:101

Definition at line 130 of file global.h.

#define assertNotEqual (   x,
 
)
Value:
{ \
auto assertEvalTemp = x; \
auto assertEvalTemp2 = y; \
if (assertEvalTemp == assertEvalTemp2) \
assertEqualImplementation(#x " != " #y, assertEvalTemp, assertEvalTemp2, \
__FILE__, __LINE__, "=="); \
}
void assertEqualImplementation(const char *exp, T a, U b, const char *file, int line, const char *str=nullptr)
Definition: global.h:101

Definition at line 138 of file global.h.

#define assertLessThan (   x,
 
)
Value:
{ \
auto assertEvalTemp = x; \
auto assertEvalTemp2 = y; \
if (assertEvalTemp >= assertEvalTemp2) \
assertEqualImplementation(#x " < " #y, assertEvalTemp, assertEvalTemp2, \
__FILE__, __LINE__, ">="); \
}
void assertEqualImplementation(const char *exp, T a, U b, const char *file, int line, const char *str=nullptr)
Definition: global.h:101

Definition at line 146 of file global.h.

#define assertLessThanEqual (   x,
 
)
Value:
{ \
auto assertEvalTemp = x; \
auto assertEvalTemp2 = y; \
if (assertEvalTemp > assertEvalTemp2) \
assertEqualImplementation(#x " <= " #y, assertEvalTemp, assertEvalTemp2, \
__FILE__, __LINE__, ">"); \
}
void assertEqualImplementation(const char *exp, T a, U b, const char *file, int line, const char *str=nullptr)
Definition: global.h:101

Definition at line 154 of file global.h.

#define assertGreaterThan (   x,
 
)
Value:
{ \
auto assertEvalTemp = x; \
auto assertEvalTemp2 = y; \
if (assertEvalTemp <= assertEvalTemp2) \
assertEqualImplementation(#x " > " #y, assertEvalTemp, assertEvalTemp2, \
__FILE__, __LINE__, "<="); \
}
void assertEqualImplementation(const char *exp, T a, U b, const char *file, int line, const char *str=nullptr)
Definition: global.h:101

Definition at line 162 of file global.h.

#define assertGreaterThanEqual (   x,
 
)
Value:
{ \
auto assertEvalTemp = x; \
auto assertEvalTemp2 = y; \
if (assertEvalTemp < assertEvalTemp2) \
assertEqualImplementation(#x " >= " #y, assertEvalTemp, assertEvalTemp2, \
__FILE__, __LINE__, "<"); \
}
void assertEqualImplementation(const char *exp, T a, U b, const char *file, int line, const char *str=nullptr)
Definition: global.h:101

Definition at line 170 of file global.h.

Enumeration Type Documentation

Enumerator
menuAction 
debugAction 
consoleAction 
forwardAction 
backwardAction 
leftAction 
rightAction 
jumpAction 
crouchAction 
useAction 
holsterAction 
walkAction 
ActionEventCount 

Definition at line 15 of file global.h.

Enumerator
zeroKey 
oneKey 
twoKey 
threeKey 
fourKey 
fiveKey 
sixKey 
sevenKey 
eightKey 
nineKey 
aKey 
bKey 
cKey 
dKey 
eKey 
fKey 
gKey 
hKey 
iKey 
jKey 
kKey 
lKey 
mKey 
nKey 
oKey 
pKey 
qKey 
rKey 
sKey 
tKey 
uKey 
vKey 
wKey 
xKey 
yKey 
zKey 
quoteKey 
backslashKey 
backspaceKey 
capslockKey 
commaKey 
delKey 
upKey 
downKey 
leftKey 
rightKey 
endKey 
equalsKey 
escapeKey 
f1Key 
f2Key 
f3Key 
f4Key 
f5Key 
f6Key 
f7Key 
f8Key 
f9Key 
f10Key 
f11Key 
f12Key 
backquoteKey 
homeKey 
insertKey 
leftaltKey 
leftctrlKey 
leftbracketKey 
leftguiKey 
leftshiftKey 
minusKey 
numlockKey 
pagedownKey 
pageupKey 
pauseKey 
dotKey 
rightaltKey 
rightctrlKey 
enterKey 
rightguiKey 
rightbracketKey 
rightshiftKey 
scrolllockKey 
semicolonKey 
slashKey 
spaceKey 
tabKey 
leftmouseKey 
middlemouseKey 
rightmouseKey 
fourthmouseKey 
fifthmouseKey 
aButton 
bButton 
xButton 
yButton 
backButton 
startButton 
guideButton 
leftStick 
rightStick 
leftShoulder 
rightShoulder 
padUp 
padDown 
padLeft 
padRight 
leftXAxis 
leftYAxis 
rightXAxis 
rightYAxis 
leftTrigger 
rightTrigger 
unknownKey 

Definition at line 34 of file global.h.

Function Documentation

void renderFrame ( )

Definition at line 147 of file main.cpp.

template<typename T , typename U >
void assertEqualImplementation ( const char *  exp,
a,
b,
const char *  file,
int  line,
const char *  str = nullptr 
)

Definition at line 101 of file global.h.