Index: branches/network/src/defs/class_id.h
===================================================================
--- branches/network/src/defs/class_id.h	(revision 6501)
+++ branches/network/src/defs/class_id.h	(revision 6502)
@@ -73,4 +73,7 @@
 
   CL_STORY_ENTITY               =    0x02000000,
+
+  CL_GAME_WORLD                 =    0x50000000,
+  CL_GAME_WORLD_DATA            =    0x60000000,
 
   CL_PHYSICS_INTERFACE          =    0x04000000,
@@ -148,10 +151,11 @@
   CL_CAMPAIGN                   =    0x00000101,
   CL_CAMPAIGN_DATA              =    0x00000102,
-  CL_GAME_WORLD                 =    0x00000103,
-  CL_GAME_WORLD_DATA            =    0x00000104,
+  CL_SIMPLE_GAME_MENU           =    0x00000103,
+  CL_SIMPLE_GAME_MENU_DATA      =    0x00000104,
   CL_SINGLE_PLAYER_WORLD        =    0x00000105,
   CL_SINGLE_PLAYER_WORLD_DATA   =    0x00000106,
   CL_MULTI_PLAYER_WORLD         =    0x00000107,
   CL_MULTI_PLAYER_WORLD_DATA    =    0x00000108,
+
 
   // WorldEntities (range from 0x00000200 to 0x000004ff)
Index: branches/network/src/story_entities/simple_game_menu.cc
===================================================================
--- branches/network/src/story_entities/simple_game_menu.cc	(revision 6501)
+++ branches/network/src/story_entities/simple_game_menu.cc	(revision 6502)
@@ -19,58 +19,193 @@
 #include "simple_game_menu.h"
 
+#include "state.h"
+#include "class_list.h"
+
+#include "load_param.h"
+#include "fast_factory.h"
+#include "factory.h"
+
+#include "world_entity.h"
+#include "terrain.h"
+
+#include "cd_engine.h"
+
+
 using namespace std;
 
 
-/**
- * SimpleGameMenu constructor
- */
-SimpleGameMenu::SimpleGameMenu()
+//! This creates a Factory to fabricate a SimpleGameMenu
+CREATE_FACTORY(SimpleGameMenu, CL_SIMPLE_GAME_MENU);
+
+
+
+SimpleGameMenu::SimpleGameMenu(const TiXmlElement* root)
+  : GameWorld(root)
+{
+  this->setClassID(CL_SIMPLE_GAME_MENU, "SimpleGameMenu");
+  this->setName("SimpleGameMenu uninitialized");
+
+  this->dataTank = new SimpleGameMenuData();
+
+  this->loadParams(root);
+}
+
+
+/**
+ *  remove the SimpleGameMenu from memory
+ *
+ *  delete everything explicitly, that isn't contained in the parenting tree!
+ *  things contained in the tree are deleted automaticaly
+ */
+SimpleGameMenu::~SimpleGameMenu ()
+{
+  PRINTF(3)("SimpleGameMenu::~SimpleGameMenu() - deleting current world\n");
+
+  if( this->dataTank)
+    delete this->dataTank;
+}
+
+
+/**
+ * loads the parameters of a SimpleGameMenu from an XML-element
+ * @param root the XML-element to load from
+ */
+void SimpleGameMenu::loadParams(const TiXmlElement* root)
+{
+  /* skip the GameWorld, since it does not define any useful loadParams for this class */
+  static_cast<StoryEntity*>(this)->loadParams(root);
+
+  PRINTF(4)("Loaded SimpleGameMenu specific stuff\n");
+}
+
+
+/**
+ * no collision detection in the menu
+ */
+void SimpleGameMenu::collide()
 {}
 
 
-/** SimpleGameMenu deconstructor
- */
-SimpleGameMenu::~SimpleGameMenu()
+
+
+
+
+
+
+
+/**********************************************************************************************
+    SimpleGameMenuData
+ **********************************************************************************************/
+
+
+/**
+ * SimpleGameMenuData constructor
+ */
+SimpleGameMenuData::SimpleGameMenuData()
 {}
 
-
-/**
- * init the menu
- */
-ErrorMessage SimpleGameMenu::init()
+/**
+ * SimpleGameMenuData decontructor
+ */
+SimpleGameMenuData::~SimpleGameMenuData()
 {}
 
 
 /**
- * load the data
- */
-ErrorMessage SimpleGameMenu::loadData()
-{}
-
-
-/**
- * unload the data again
- */
-ErrorMessage SimpleGameMenu::unloadData()
-{}
-
-
-/**
- * start the menu
- */
-bool SimpleGameMenu::start()
-{}
-
-
-/**
- * stop the menu
- */
-bool SimpleGameMenu::stop()
-{}
-
-
-/**
- * menu running function
- */
-void SimpleGameMenu::run()
-{}
+ *  initialize the GameWorldDataData
+ */
+ErrorMessage SimpleGameMenuData::init()
+{
+  /* call underlying function */
+  GameWorldData::init();
+}
+
+
+/**
+ *  loads the GUI data
+ * @param root reference to the xml root element
+ */
+ErrorMessage SimpleGameMenuData::loadGUI(TiXmlElement* root)
+{
+  /* call underlying function */
+  GameWorldData::loadGUI(root);
+}
+
+
+/**
+ *  unloads the GUI data
+ */
+ErrorMessage SimpleGameMenuData::unloadGUI()
+{
+  /* call underlying function */
+  GameWorldData::unloadGUI();
+}
+
+
+/**
+ *  overloads the GameWorld::loadWorldEntities(...) class since the menu WorldEntity loading is different (less loading stuff)
+ * @param root reference to the xml root parameter
+ */
+ErrorMessage SimpleGameMenuData::loadWorldEntities(TiXmlElement* root)
+{
+  TiXmlElement* element = root->FirstChildElement("WorldEntities");
+
+  if( element != NULL)
+  {
+    element = element->FirstChildElement();
+    PRINTF(4)("Loading WorldEntities\n");
+    while( element != NULL)
+    {
+      BaseObject* created = Factory::fabricate(element);
+      if( created != NULL )
+        printf("Created a %s: %s\n", created->getClassName(), created->getName());
+
+      if( element->Value() != NULL && !strcmp( element->Value(), "SkyBox"))
+        this->sky = dynamic_cast<WorldEntity*>(created);
+      if( element->Value() != NULL && !strcmp( element->Value(), "Terrain"))
+      {
+        this->terrain = dynamic_cast<Terrain*>(created);
+        CDEngine::getInstance()->setTerrain(terrain);
+      }
+      element = element->NextSiblingElement();
+    }
+    PRINTF(4)("Done loading WorldEntities\n");
+  }
+
+  /* init the pnode tree */
+  PNode::getNullParent()->init();
+}
+
+
+/**
+ *  unloads the world entities from the xml file
+ */
+ErrorMessage SimpleGameMenuData::unloadWorldEntities()
+{
+  /* call underlying function */
+  GameWorldData::unloadWorldEntities();
+}
+
+
+/**
+ *  loads the scene data
+ * @param root reference to the xml root element
+ */
+ErrorMessage SimpleGameMenuData::loadScene(TiXmlElement* root)
+{
+  /* call underlying function */
+  GameWorldData::loadScene(root);
+}
+
+
+/**
+ *  unloads the scene data
+ */
+ErrorMessage SimpleGameMenuData::unloadScene()
+{
+  /* call underlying function */
+  GameWorldData::unloadScene();
+}
+
+
+
Index: branches/network/src/story_entities/simple_game_menu.h
===================================================================
--- branches/network/src/story_entities/simple_game_menu.h	(revision 6501)
+++ branches/network/src/story_entities/simple_game_menu.h	(revision 6502)
@@ -8,9 +8,10 @@
 
 
-#include "story_entity.h"
-#include "data_tank.h"
+#include "game_world.h"
+#include "game_world_data.h"
 
 
 class SimpleGameMenuData;
+class TiXmlElement;
 
 
@@ -20,32 +21,37 @@
  * loadable and is exchangeable very easely :D
  */
-class SimpleGameMenu : public StoryEntity
+class SimpleGameMenu : public GameWorld
 {
 
   public:
-    SimpleGameMenu();
+    SimpleGameMenu(const TiXmlElement* root = NULL);
     virtual ~SimpleGameMenu();
 
+    void loadParams(const TiXmlElement* root);
 
-    /* initialisation and loading */
-    virtual ErrorMessage init();
-    virtual ErrorMessage loadData();
-    virtual ErrorMessage unloadData();
-
-    /* running, stopping and pausing */
-    virtual bool start();
-    virtual bool stop();
-    virtual bool pause() {}
-    virtual bool resume() {}
-    virtual void run();
+    virtual void collide();
+};
 
 
-  private:
-    SimpleGameMenuData*      simpleGameMenuData;
 
-};
+//! the simple game menu data
+class SimpleGameMenuData : public GameWorldData
+{
 
-class SimpleGameMenuData : public DataTank
-{
+  public:
+    SimpleGameMenuData();
+    virtual ~SimpleGameMenuData();
+
+    virtual ErrorMessage init();
+
+
+  protected:
+    virtual ErrorMessage loadGUI(TiXmlElement* root);
+    virtual ErrorMessage loadWorldEntities(TiXmlElement* root);
+    virtual ErrorMessage loadScene(TiXmlElement* root);
+
+    virtual ErrorMessage unloadGUI();
+    virtual ErrorMessage unloadWorldEntities();
+    virtual ErrorMessage unloadScene();
 
 };
