-
Notifications
You must be signed in to change notification settings - Fork 2
/
game.h
114 lines (88 loc) · 2.87 KB
/
game.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
#ifndef GAME_H
#define GAME_H
#include <windows.h> // Header File For Windows
#include <stdio.h> // Header File For Standard Input/Output
#include <math.h> // Header File For Math Library
#include <GL\gl.h> // Header File For The OpenGL32 Library
#include <GL\glu.h> // Header File For The GLu32 Library
#include "glext.h"
#include "3dglasses.h"
#include "renderflags.h"
#include "cvars.h"
#include "menus.h"
#include "tokenize.h"
#include "timer.h"
#include "mp3control.h"
#include "console.h"
#include "command.h"
#include "commands.h"
extern HWND hWnd;
void AdjustRockColor(const int&);
extern BYTE keys[];
extern BYTE lastkeys[];
extern BOOL g_bExitApp;
extern BOOL g_bShowMenu;
extern BOOL g_bStartGame;
extern BOOL g_bCheatsEnabled;
extern float g_fNow;
extern cvar_t g_cvResolution;
extern cvar_t g_cvColorDepth;
extern cvar_t g_cvGammaGamma;
extern cvar_t g_cvGammaBrightness;
extern cvar_t g_cvGammaContrast;
extern cvar_t g_cvFullscreen;
extern cvar_t g_cvCopernicusMode;
extern cvar_t g_cvSpaceMode;
extern cvar_t g_cvDifficulty;
extern cvar_t g_cvSpaceSize;
extern cvar_t g_cvInfiniteLives;
extern cvar_t g_cvInfiniteShields;
extern cvar_t g_cvInvincibility;
extern cvar_t g_cvDeveloper;
extern cvar_t g_cvLightingEnabled;
extern cvar_t g_cvBlendingEnabled;
extern cvar_t g_cvTexturesEnabled;
extern cvar_t g_cvWireframeEnabled;
extern cvar_t g_cvBoundingBoxesEnabled;
extern cvar_t g_cvFpsEnabled;
extern cvar_t g_cvVsyncEnabled;
BOOL SetVsync(const BOOL);
extern cvar_t g_cvJoystickEnabled;
extern cvar_t g_cvForceFeedbackEnabled;
extern cvar_t g_cvJoystickDeadzone;
extern BOOL g_bDirectInputEnabled;
extern BOOL g_bForceFeedbackCapable;
extern cvar_t g_cvSoundEnabled;
extern cvar_t g_cvVolume;
extern cvar_t g_cvShipRotateAdjust;
extern cvar_t g_cvMouseSensitivity;
extern cvar_t g_cvMouseEnabled;
void SetSound(const BOOL);
void SetMouse(const BOOL);
void SetVolume(float NewValue);
void SetGamma(void);
void UnacquireMouse();
#define KeyDown(x) ((keys[x] && !lastkeys[x]) && keys[x])
#define KeyUp(x) ((keys[x] && !lastkeys[x]) && !keys[x])
extern const int NUM_KEY_BINDS;
extern char g_asKeyBindsText[][40];
extern cvar_t *g_acvKeyBinds[];
// Function definitions
GLvoid glPrint(int, const GLfloat&, const GLfloat&, const char*);
GLvoid glPrintVar(int, const GLfloat&, const GLfloat&, const char*, ...);
GLvoid glPrintCentered(int, const GLfloat&, const char*);
GLvoid glPrintCenteredVar(int, const GLfloat&, const char*, ...);
void UpdateMessage(const char*, ...);
void PauseGame(const BOOL&);
BOOL InitializeGame(void);
void TerminateGame(void);
float GetRefreshTimingRate(void);
// Sound stuff (for menus)
void PlayMenuBeepSound();
void PlayMenuLowSound();
void PlayMenuExplosionSound();
// 3d glasses stuff
extern cvar_t g_cv3dglasses;
int GetScreenWidth(void);
int GetScreenHeight(void);
#endif