-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGLFrame.h
78 lines (54 loc) · 1.16 KB
/
GLFrame.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
/*
* File: GLWindow.h
* Author: brandon
*
* Created on June 1, 2011, 3:14 PM
*/
#ifndef GLWINDOW_H
#define GLWINDOW_H
#define MENU 0
#define INGAME 1
#define TRADE 2
#define PAUSE 3
#include <Qt/qgl.h>
#include <QtGui/QKeyEvent>
#include <QtCore/QTimer>
#include "Board.h"
#include "Player.h"
#include "TradeMenu.h"
#include "PauseMenu.h"
#include "Sprite.h"
#include "vmath.h"
class GLFrame : public QGLWidget {
Q_OBJECT
public:
GLFrame(QWidget* parent = 0);
virtual ~GLFrame();
void newGame();
signals:
void playerInfoUpdate();
protected slots:
void update();
private:
void initializeGL();
void resizeGL(int width, int height);
void paintGL();
void buildLists();
void keyPressEvent(QKeyEvent* q);
void keyReleaseEvent(QKeyEvent* q);
void enterEvent(QEvent* ev);
void initResources();
void drawPlayerPorts();
void drawGUI();
int state;
Vector3f globalRotation;
Vector3f globalPosition;
Board* board;
GLuint boardList;
std::vector<Player*>* players;
PauseMenu* pauseMenu;
Vector2i dice;
Sprite* portIcons;
QTimer* timer;
};
#endif /* GLWINDOW_H */