From: Matthijs Kooijman Date: Mon, 11 Jun 2007 18:45:58 +0000 (+0200) Subject: * Let a Playground know about the CKernel. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=5bb865575bdc27859da689b5a53f3b3b65eebd04;p=matthijs%2FABM2.git * Let a Playground know about the CKernel. --- 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));