-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcore.h
More file actions
78 lines (57 loc) · 1.3 KB
/
Copy pathcore.h
File metadata and controls
78 lines (57 loc) · 1.3 KB
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
#ifndef __CORE_H
#define __CORE_H
//#include <GL/glew.h>
#include "sgtypes.h"
#include "Math3d.h"
#include "Camera.h"
#include "Chunk.h"
#include "Console.h"
#include "Resources.h"
#include "Context.h"
#include <allegro5/allegro.h>
#include <allegro5/allegro_opengl.h>
#include <allegro5/allegro_font.h>
#include <allegro5/allegro_ttf.h>
#include <stdio.h>
class Core {
protected:
ALLEGRO_DISPLAY * display;
ALLEGRO_DISPLAY_MODE display_data;
ALLEGRO_EVENT_QUEUE * event_queue;
ALLEGRO_TIMER * timer;
Camera camera;
Chunk * test_chunk;
Chunk * test_chunk2;
Chunk * test_chunk3;
Chunk * test_chunk4;
ChunkManager manager_test;
FontManager * font_manager;
ResourceContext resource_context;
ShaderManager * shader_manager;
CameraContext camera_context;
DevOverlay * dev_console;
Uint8 show_dev_info;
DevInfo * dev_info;
GenericConsoleContext console_context;
//float rot;
//float roty;
bool keyStates[255];
float mouse_dx;
float mouse_dy;
bool running;
public:
Core();
Uint8 initialize();
void initializeEvents();
void initializeManagers();
Uint8 setupDisplay();
void render();
void handleEvents();
void onKeyUp(ALLEGRO_EVENT ev);
void onKeyDown(ALLEGRO_EVENT ev);
void onMouseMove(float dx, float dy);
void update();
void coreLoop();
~Core();
};
#endif