Assembla home | Assembla project page
 

root/week1oplossing/AbstractGame.h

Revision 1, 2.3 kB (checked in by machiel.sleeuwaert, 1 year ago)

--

Line 
1 //-----------------------------------------------------------------
2 // AbstractGame Object
3 // C++ Header - AbstractGame.h - version 2008 v3_02
4 // Copyright Kevin Hoefman - kevin.hoefman@howest.be
5 // http://www.digitalartsandentertainment.be/
6 //
7 // AbstractGame is the abstract class which defines the functions that a
8 // game class can implement for use in the game engine
9 //-----------------------------------------------------------------
10
11 #pragma once
12
13 //-----------------------------------------------------------------
14 // Include Files
15 //-----------------------------------------------------------------
16 #define WIN32_LEAN_AND_MEAN
17 #include <windows.h>
18 #include <tchar.h>
19
20 //-----------------------------------------------------------------
21 // AbstractGame Class
22 //-----------------------------------------------------------------
23 class AbstractGame
24 {
25 public :       
26         AbstractGame()
27         {
28                 // nothing to create
29         }
30
31         virtual ~AbstractGame()
32         {
33                 // nothing to destroy
34         }
35
36         virtual void GameInitialize(HINSTANCE hInstance);
37         virtual void GameStart(void) {}                                                                                                                         // empty definition
38         virtual void GameEnd(void) {}                                                                                                                           // empty definition
39         virtual void GameActivate(HDC hDC, RECT rect) {}                                                                                        // empty definition
40         virtual void GameDeactivate(HDC hDC, RECT rect) {}                                                                                      // empty definition
41         virtual void MouseButtonAction(bool isLeft, bool isDown, int x, int y, WPARAM wParam) {}        // empty definition
42         virtual void MouseMove(int x, int y, WPARAM wParam) {}                                                                          // empty definition
43         virtual void CheckKeyboard(void) {}                                                                                                                     // empty definition
44         virtual void KeyPressed(TCHAR cKey) {}                                                                                                          // empty definition
45         virtual void GamePaint(RECT rect) {}                                                                                                            // empty definition
46         virtual void GameCycle(RECT rect) {}                                                                                                            // empty definition
47
48         // -------------------------
49         // Disabling default copy constructor and default assignment operator.
50         // If you get a linker error from one of these functions, your class is internally trying to use them. This is
51         // an error in your class, these declarations are deliberately made without implementation because they should never be used.
52         // -------------------------
53         AbstractGame(const AbstractGame& tRef);
54         AbstractGame& operator=(const AbstractGame& tRef);
55 };
Note: See TracBrowser for help on using the browser.