-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathblankGame.cpp
More file actions
54 lines (40 loc) · 1.08 KB
/
blankGame.cpp
File metadata and controls
54 lines (40 loc) · 1.08 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
#include "Framework.h"
#include "GetArg.h"
using GetArg::Resolution;
using GetArg::getResolution;
// might be useful for hunting down memory leak
class BlankFrame : public Framework {
private:
static constexpr Resolution defaultRes { 600, 800 };
Resolution resolution;
public:
virtual void PreInit(int& width, int& height, bool& fullscreen) {
width = resolution.x;
height = resolution.y;
fullscreen = false;
}
virtual bool Init() {
return true;
}
virtual void Close() {
}
virtual bool Tick() {
//drawTestBackground();
return false;
}
virtual void onMouseMove(int x, int y, int xrelative, int yrelative) {
}
virtual void onMouseButtonClick(FRMouseButton button, bool isReleased) {
}
virtual void onKeyPressed(FRKey k) {
}
virtual void onKeyReleased(FRKey k) {
}
virtual const char* GetTitle() override {
return "Arcanoid";
}
BlankFrame(Resolution res) : resolution{ res.x && res.y ? res : defaultRes } { }
};
int main(int argc, char** argv) {
return run(new BlankFrame(getResolution(argc, argv)));
}