Changeset 10

Author: machiel.sleeuwaert
Date: 7 months ago (2008/11/11 16:35 UTC)

Affected files

week1oplossing/Week1Oplossing.cpp

410
9
// Include Files
9
// Include Files
10
//-----------------------------------------------------------------
10
//-----------------------------------------------------------------
11
#include "Week1Oplossing.h"																				
11
#include "Week1Oplossing.h"																				
12
12
#include "functionpointer.h"
13
//-----------------------------------------------------------------
13
//-----------------------------------------------------------------
14
// Week1Oplossing methods																				
14
// Week1Oplossing methods																				
15
//-----------------------------------------------------------------
15
//-----------------------------------------------------------------
...
...
17
Week1Oplossing::Week1Oplossing()																						
17
Week1Oplossing::Week1Oplossing()																						
18
{
18
{
19
	// nothing to create
19
	// nothing to create
20
	onetime =0;
20
	mFptest = new functionpointertest(this);
21
	
21
}
22
}
22
23
23
Week1Oplossing::~Week1Oplossing()																						
24
Week1Oplossing::~Week1Oplossing()																						
...
...
29
{
30
{
30
	AbstractGame::GameInitialize(hInstance);
31
	AbstractGame::GameInitialize(hInstance);
31
32
32
	GAME_ENGINE->SetTitle(_T("Week1Oplossing"));					
33
	GAME_ENGINE->SetTitle(_T("Week1Oplossing"));	
34
35
	GAME_ENGINE->MessageBox(_T("yow"));
33
}
36
}
34
37
35
void Week1Oplossing::GameStart()
38
void Week1Oplossing::GameStart()
...
...
54
	//lijst4+=lijst1;
57
	//lijst4+=lijst1;
55
58
56
	//lijst4 = lijst4;
59
	//lijst4 = lijst4;
60
	mFptest->setfunction(&Week1Oplossing::MyPwnFunction);
57
}
61
}
58
62
59
void Week1Oplossing::GamePaint(RECT rect)
63
void Week1Oplossing::GamePaint(RECT rect)
60
{
64
{
61
	Vector3 Vector1PTR;
65
	/*Vector3 Vector1PTR;
62
	Vector3 Vector2PTR;
66
	Vector3 Vector2PTR;
63
	Vector3 Vector3PTR;
67
	Vector3 Vector3PTR;
64
	Vector3 Vector4PTR;
68
	Vector3 Vector4PTR;
...
...
73
tstring temp;
77
tstring temp;
74
temp = _T("lol ");
78
temp = _T("lol ");
75
79
76
	GAME_ENGINE->DrawString(temp+Vector1PTR,100,10+(20*0));
80
	GAME_ENGINE->DrawString(temp+Vector1PTR,100,10+(20*0));*/
77
81
78
	//	GAME_ENGINE->DrawString(Vector2PTR.ToString(),100,10+(20*1));
82
	//	GAME_ENGINE->DrawString(Vector2PTR.ToString(),100,10+(20*1));
79
	//	GAME_ENGINE->DrawString(Vector3PTR.ToString(),100,10+(20*2));
83
	//	GAME_ENGINE->DrawString(Vector3PTR.ToString(),100,10+(20*2));
...
...
121
//	GAME_ENGINE->DrawString(test.str(),100,10+(20*++i));
125
//	GAME_ENGINE->DrawString(test.str(),100,10+(20*++i));
122
//	test.str(_T(""));
126
//	test.str(_T(""));
123
127
128
}
129
130
131
void Week1Oplossing::MyPwnFunction(int i)
132
{
133
	GAME_ENGINE->MessageBox(i);
124
}
134
}

week1oplossing/Week1Oplossing.h

210
18
#include "KeyValueLijst.h"
18
#include "KeyValueLijst.h"
19
#include "KeyValuePaar.h"
19
#include "KeyValuePaar.h"
20
#include "vector3.h"
20
#include "vector3.h"
21
22
class functionpointertest;
23
21
using namespace Machiel;
24
using namespace Machiel;
22
//-----------------------------------------------------------------
25
//-----------------------------------------------------------------
23
// Week1Oplossing Class																
26
// Week1Oplossing Class																
...
...
42
	void GameInitialize(HINSTANCE hInstance);
45
	void GameInitialize(HINSTANCE hInstance);
43
	void GameStart();				
46
	void GameStart();				
44
	void GamePaint(RECT rect);
47
	void GamePaint(RECT rect);
48
	void MyPwnFunction(int i);
45
49
46
private:
50
private:
47
	// -------------------------
51
	// -------------------------
48
	// Datamembers
52
	// Datamembers
49
	// -------------------------
53
	// -------------------------
50
	int onetime;
54
// 	int onetime;
51
	IntLijst lijst1;
55
// 	IntLijst lijst1;
52
	IntLijst lijst2;
56
// 	IntLijst lijst2;
53
	IntLijst lijst3;
57
// 	IntLijst lijst3;
54
	IntLijst lijst4;
58
// 	IntLijst lijst4;
59
functionpointertest *mFptest;
55
60
61
56
	// -------------------------
62
	// -------------------------
57
	// Disabling default copy constructor and default assignment operator.
63
	// Disabling default copy constructor and default assignment operator.
58
	// If you get a linker error from one of these functions, your class is internally trying to use them. This is
64
	// If you get a linker error from one of these functions, your class is internally trying to use them. This is

week1oplossing/Week1Oplossing.vcproj

110
171
			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
171
			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
172
			>
172
			>
173
			<File
173
			<File
174
				RelativePath=".\functionpointer.cpp"
175
				>
176
			</File>
177
			<File
178
				RelativePath=".\functionpointer.h"
179
				>
180
			</File>
181
			<File
174
				RelativePath=".\IntLijst.cpp"
182
				RelativePath=".\IntLijst.cpp"
175
				>
183
				>
176
			</File>
184
			</File>