* Let a Playground know about the CKernel.
authorMatthijs Kooijman <m.kooijman@student.utwente.nl>
Mon, 11 Jun 2007 18:45:58 +0000 (20:45 +0200)
committerMatthijs Kooijman <m.kooijman@student.utwente.nl>
Mon, 11 Jun 2007 18:45:58 +0000 (20:45 +0200)
ABM2/Playground.cpp
ABM2/Playground.h
ABM2/main.cpp

index 7b686e16f35c41620b1d37a483fba2958b6e2298..ec8002428c39c270ccb84a2afd09735b2e27571e 100755 (executable)
@@ -8,6 +8,11 @@ LPD3DXSPRITE d3dspt;
 LPD3DXFONT font;\r
 \r
 #endif\r
+\r
+Playground::Playground(CKernel* kernel) {\r
+       this->kernel = kernel;\r
+}\r
+\r
 bool Playground::Start()\r
 {\r
        #if WIN32\r
index 541bf2af566c1ca3bf512a060c65bb6f9d82ebd4..7c14f7c3be3759d1b9e39e2dfaf06e4a45687a19 100755 (executable)
@@ -57,6 +57,7 @@ private:
 class Playground : public ITask\r
 {\r
 public:\r
+       Playground(CKernel *kernel);\r
        bool Start();\r
        void Update();\r
        void Stop();\r
@@ -76,4 +77,5 @@ private:
        void move_left();\r
 \r
        DWORD old_counter;\r
+       CKernel *kernel;\r
 };\r
index e325647b86402a4ca002bcbea96218abba118c16..5e1a52ac19125ccf5f86576fbdae4a52557badd5 100755 (executable)
@@ -174,7 +174,7 @@ void CApplication::Run(int argc, char *argv[])
        CSpriteManager *sm = new CSpriteManager(videoTask->getGraphics(), defaultSprites);\r
        CKernel::GetSingleton().setSpriteManager(sm);\r
 \r
-       Playground game;\r
+       Playground game(&CKernel::GetSingleton());\r
        game.priority=100;\r
        CKernel::GetSingleton().AddTask(CMMPointer<ITask>(&game));\r
 \r