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 |
//-----------------------------------------------------------------
// AbstractGame Object
// C++ Header - AbstractGame.h - version 2008 v3_02
// Copyright Kevin Hoefman - kevin.hoefman@howest.be
// http://www.digitalartsandentertainment.be/
//
// AbstractGame is the abstract class which defines the functions that a
// game class can implement for use in the game engine
//-----------------------------------------------------------------
#pragma once
//-----------------------------------------------------------------
// Include Files
//-----------------------------------------------------------------
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <tchar.h>
//-----------------------------------------------------------------
// AbstractGame Class
//-----------------------------------------------------------------
class AbstractGame
{
public :
AbstractGame()
{
// nothing to create
}
virtual ~AbstractGame()
{
// nothing to destroy
}
virtual void GameInitialize(HINSTANCE hInstance);
virtual void GameStart(void) {} // empty definition
virtual void GameEnd(void) {} // empty definition
virtual void GameActivate(HDC hDC, RECT rect) {} // empty definition
virtual void GameDeactivate(HDC hDC, RECT rect) {} // empty definition
virtual void MouseButtonAction(bool isLeft, bool isDown, int x, int y, WPARAM wParam) {} // empty definition
virtual void MouseMove(int x, int y, WPARAM wParam) {} // empty definition
virtual void CheckKeyboard(void) {} // empty definition
virtual void KeyPressed(TCHAR cKey) {} // empty definition
virtual void GamePaint(RECT rect) {} // empty definition
virtual void GameCycle(RECT rect) {} // empty definition
// -------------------------
// Disabling default copy constructor and default assignment operator.
// If you get a linker error from one of these functions, your class is internally trying to use them. This is
// an error in your class, these declarations are deliberately made without implementation because they should never be used.
// -------------------------
AbstractGame(const AbstractGame& tRef);
AbstractGame& operator=(const AbstractGame& tRef);
}; |