-
Notifications
You must be signed in to change notification settings - Fork 0
/
gameCore.h
143 lines (110 loc) · 2.8 KB
/
gameCore.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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
/***************************************************************************
** gameCore é utilizada para renderização, pegar todas as informações e **
** gerencialas para que o jogo funcione de forma correta **
** Criado por Lucas P. Stark **
** Nightmare Fiction Engine - NFE **
***************************************************************************/
#ifndef GAMECORE_H
#define GAMECORE_H
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <sstream>
#include <GL/glut.h>
#include <list>
#include <math.h>
#include <SDL/SDL.h>
#include "EMD.h"
#include "EMD1.h"
#include "PLD.h"
#include "RDT.h"
#include "PLW.h"
#include "gameSound.h"
#include "gameMath.h"
#include "gameEvent.h"
#include "gameMisc.h"
#include "vr.h"
#include "cam.h"
#include "AI.h"
#include "depack_vlc.h"
#include "depack_mdec.h"
#include "file_functions.h"
#define RES_HEIGHT 640
#define RES_WIDTH 480
#define MAX_MODEL 20
enum EVENT_SYSTEM_KEY {
EVENT_SYSTEM_KEY_UP = 0,
EVENT_SYSTEM_KEY_DOWN = 1,
EVENT_SYSTEM_KEY_LEFT = 2,
EVENT_SYSTEM_KEY_RIGHT = 3,
EVENT_SYSTEM_KEY_X = 4,
EVENT_SYSTEM_KEY_Z = 5,
EVENT_SYSTEM_KEY_C = 6
};
class gameCore {
public:
gameCore(int, char**);
~gameCore();
/*
* OpenGL, GLUT and Texture Stuff
*/
void renderInit();
void renderLoadResource();
void renderMainMenu();
void renderGame();
void renderSelectChar();
void renderStateMachine();
void renderCredits();
/*
* Input
*/
void eventSystem_debugMenu();
void eventSystem_downKey(int key, int x, int y);
void eventSystem_upKey(int key, int x, int y);
void eventSystem_keyboardDown(unsigned char key, int x, int y);
void eventSystem_keyboardUp(unsigned char key, int x, int y);
void eventSystem_gameAction(unsigned int key, bool pressed);
/*
* Animation
*/
void engineAnimation(entity *e);
/*
* Gun
*/
void gunHandle();
/*
* Player Action
*/
void handlePlayerAction();
/*
* System callback's and related
*/
static void renderSetObj(gameCore *obj);
static void renderCallback();
static void eventSystemUpCallBack(int key, int x, int y) ;
static void eventSystemDownCallBack(int key, int x, int y) ;
static void eventSystemKeyboardUpCallBack(unsigned char key, int x, int y);
static void eventSystemKeyboardDownCallBack(unsigned char key, int x, int y);
/*
* animation timer
*/
unsigned int coreTmr_anim;
/*
* key Pressed
*/
bool keyList[0x10];
cam camMode;
AI engineAI;
VR vrMode;
std::vector<Mix_Chunk*> mixList;
private:
std::vector<EMD_SEC2_DATA_T> interAnimation;
unsigned int inInterpolation;
unsigned int oldAnim;
unsigned int oldSection;
GLuint fontTexture;
char GAME_NAME[20];
};
void renderScene( void );
extern gameCore *mainGame;
#endif