-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgame.h
38 lines (32 loc) · 906 Bytes
/
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
#pragma once
namespace Tmpl8 {
class Game
{
public:
void SetTarget( Surface* surface ) { screen = surface; }
void Init();
void Shutdown();
void Tick( float deltaTime );
void MouseUp( int button ) { /* implement if you want to detect mouse button presses */ }
void MouseDown( int button ) { /* implement if you want to detect mouse button presses */ }
void MouseMove( int x, int y ) { /* implement if you want to detect mouse movement */ }
void KeyUp( int key ) { /* implement if you want to handle keys */ }
void KeyDown( int key ) { /* implement if you want to handle keys */ }
void handleInput();
private:
Surface* screen;
void loadSimpleScene();
void loadNiceScene();
void loadTeddy();
void loadTeapot();
};
class RayTracerJob : public Job
{
public:
RayTracerJob(int start, int end) : start(start), end(end) {};
void Main();
private:
int start;
int end;
};
}; // namespace Tmpl8