From 5bb865575bdc27859da689b5a53f3b3b65eebd04 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Mon, 11 Jun 2007 20:45:58 +0200 Subject: [PATCH] * Let a Playground know about the CKernel. --- ABM2/Playground.cpp | 5 +++++ ABM2/Playground.h | 2 ++ ABM2/main.cpp | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ABM2/Playground.cpp b/ABM2/Playground.cpp index 7b686e1..ec80024 100755 --- a/ABM2/Playground.cpp +++ b/ABM2/Playground.cpp @@ -8,6 +8,11 @@ LPD3DXSPRITE d3dspt; LPD3DXFONT font; #endif + +Playground::Playground(CKernel* kernel) { + this->kernel = kernel; +} + bool Playground::Start() { #if WIN32 diff --git a/ABM2/Playground.h b/ABM2/Playground.h index 541bf2a..7c14f7c 100755 --- a/ABM2/Playground.h +++ b/ABM2/Playground.h @@ -57,6 +57,7 @@ private: class Playground : public ITask { public: + Playground(CKernel *kernel); bool Start(); void Update(); void Stop(); @@ -76,4 +77,5 @@ private: void move_left(); DWORD old_counter; + CKernel *kernel; }; diff --git a/ABM2/main.cpp b/ABM2/main.cpp index e325647..5e1a52a 100755 --- a/ABM2/main.cpp +++ b/ABM2/main.cpp @@ -174,7 +174,7 @@ void CApplication::Run(int argc, char *argv[]) CSpriteManager *sm = new CSpriteManager(videoTask->getGraphics(), defaultSprites); CKernel::GetSingleton().setSpriteManager(sm); - Playground game; + Playground game(&CKernel::GetSingleton()); game.priority=100; CKernel::GetSingleton().AddTask(CMMPointer(&game)); -- 2.30.2