[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    playground/games/astrododge/src
From:       Rivo Laks <rivolaks () hot ! ee>
Date:       2008-09-06 15:49:38
Message-ID: 1220716178.002078.28418.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 857844 by rivol:

- Add level loader class.
  ATM it can only load asteroid fields, but more is coming!
- Objects are now loaded from test1 level, instead of being hardcoded.

 M  +1 -0      CMakeLists.txt  
 M  +5 -2      gameworld.cpp  
 A             levelloader.cpp   [License: GPL (v2+)]
 A             levelloader.h   [License: GPL (v2+)]


--- trunk/playground/games/astrododge/src/CMakeLists.txt #857843:857844
@@ -6,6 +6,7 @@
         gameobject.cpp
         gameworld.cpp
         inputhandler.cpp
+        levelloader.cpp
         lodinfowidget.cpp
         main.cpp
         mainwindow.cpp
--- trunk/playground/games/astrododge/src/gameworld.cpp #857843:857844
@@ -23,6 +23,7 @@
 #include "inputhandler.h"
 #include "bullet.h"
 #include "model.h"
+#include "levelloader.h"
 
 #include <kgllib/texture.h>
 #include <kgllib/program.h>
@@ -350,7 +351,7 @@
 
     // Create some objects
     emit updateLoadingProgress("loading misc objects", 70);
-    GameObject* obj;
+    /*GameObject* obj;
     obj = createObject("cube");
     obj->setPosition(Vector3f(0, 0, -100));
     addObject(obj);
@@ -376,8 +377,10 @@
     // Create one massive asteroid
     createAsteroids(1 , 500, 500, 500, 500);
     const int asteroidCount = 200;
-    addAsteroids(asteroidCount);
+    addAsteroids(asteroidCount);*/
 
+    LevelLoader level(this, "test1");
+
     return true;
 }
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic