[Orxonox-commit 7460] r12067 - in code/branches/wagnis_HS18: data/levels src/modules/wagnis

kunzro at orxonox.net kunzro at orxonox.net
Wed Oct 31 11:27:04 CET 2018


Author: kunzro
Date: 2018-10-31 11:27:04 +0100 (Wed, 31 Oct 2018)
New Revision: 12067

Modified:
   code/branches/wagnis_HS18/data/levels/Wagnis.oxw
   code/branches/wagnis_HS18/src/modules/wagnis/WagnisGameboard.cc
   code/branches/wagnis_HS18/src/modules/wagnis/WagnisProvince.cc
   code/branches/wagnis_HS18/src/modules/wagnis/WagnisProvince.h
Log:
XML and CMake updated, Gameboard is working

Modified: code/branches/wagnis_HS18/data/levels/Wagnis.oxw
===================================================================
--- code/branches/wagnis_HS18/data/levels/Wagnis.oxw	2018-10-31 10:23:24 UTC (rev 12066)
+++ code/branches/wagnis_HS18/data/levels/Wagnis.oxw	2018-10-31 10:27:04 UTC (rev 12067)
@@ -11,10 +11,7 @@
   include("templates/lodInformation.oxt")
 ?>
 
-<?lua
-  include("templates/spaceshipEscort.oxt")
-?>
-
+<!--
 <Template name=pongbatcameras defaults=0>
   <PongBat>
     <camerapositions>
@@ -30,13 +27,13 @@
   <PongBat camerapositiontemplate=pongbatcameras>
     <attached>
       <Model position="0,0,3" mesh="cube.mesh" scale3D="14,2,2" />
-      <!--Model roll=180 mesh="pongbat.mesh" scale=0.045 /-->
+      <-Model roll=180 mesh="pongbat.mesh" scale=0.045 /->
     </attached>
   </PongBat>
-</Template>
+</Template> -->
 
-<Level>
-  gametype = 
+
+<Level plugins="wagnis" gametype="Deathmatch">
   <templates>
     <Template link=lodtemplate_default />
   </templates>
@@ -50,44 +47,57 @@
     <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/>
     <SpawnPoint position="100, 45, 75" lookat="0, 45, 75" />
 
+<WagnisGameboard position="0,0,0">
+ <Provinces>
+    <WagnisProvince ID="1" continent="1" position="0,30,30" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
+      <attached>
+        <Model position="0,0,0" mesh="ast1.mesh" scale3D="2,2,2" />
+      </attached>
+    </WagnisProvince>
 
+    <WagnisProvince ID="2" continent="1" position="0,40,30" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
+      <attached>
+        <Model position="0,0,0" mesh="ast1.mesh" scale3D="2,2,2" />
+      </attached>
+    </WagnisProvince>
 
 
-<MovableEntity position="0,0,0" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
-    <attached>
-        <Model position="0,0,0" mesh="ast1.mesh" scale3D="2,2,2" />
-    </attached>
-</MovableEntity>
 
-<MovableEntity position="0,0,10" rotationrate="26" rotationaxis="0,2,1">
+
+
+  </Provinces>
+</WagnisGameboard>
+
+<!-->
+  <WagnisProvince ID="1" continent="1" position="0,30,30" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
     <attached>
-        <Model position="0,0,0" mesh="ast2.mesh" scale3D="2,2,2" />
+      <Model position="0,0,0" mesh="ast1.mesh" scale3D="2,2,2" />
     </attached>
-</MovableEntity>
+ </WagnisProvince>
 
-<MovableEntity position="0,10,0" rotationrate="44" rotationaxis="3,1,1">
+  <WagnisProvince ID="1" continent="1" position="0,43,33" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
     <attached>
-        <Model position="0,0,0" mesh="ast3.mesh" scale3D="2,2,2" />
+      <Model position="0,0,0" mesh="ast1.mesh" scale3D="2,2,2" />
     </attached>
-</MovableEntity>
+  </WagnisProvince>
 
-<MovableEntity position="0,10,10" rotationrate="10" rotationaxis="2,9,1">
+  <WagnisProvince ID="1" continent="1" position="0,22,28" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
     <attached>
-        <Model position="0,0,0" mesh="ast4.mesh" scale3D="2,2,2" />
+      <Model position="0,0,0" mesh="ast1.mesh" scale3D="2,2,2" />
     </attached>
-</MovableEntity>
+  </WagnisProvince>
 
-<MovableEntity position="0,20,10" rotationrate="20" rotationaxis="5,2,1">
+  <WagnisProvince ID="1" continent="1" position="0,41,22" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
     <attached>
-        <Model position="0,0,0" mesh="ast5.mesh" scale3D="2,2,2" />
+      <Model position="0,0,0" mesh="ast1.mesh" scale3D="2,2,2" />
     </attached>
-</MovableEntity>
+  </WagnisProvince>
+  -->
 
 <Model position="0,0,0" mesh="Coordinates.mesh" scale="20"/>
 
 
 
-
     
   </Scene>
 </Level>

Modified: code/branches/wagnis_HS18/src/modules/wagnis/WagnisGameboard.cc
===================================================================
--- code/branches/wagnis_HS18/src/modules/wagnis/WagnisGameboard.cc	2018-10-31 10:23:24 UTC (rev 12066)
+++ code/branches/wagnis_HS18/src/modules/wagnis/WagnisGameboard.cc	2018-10-31 10:27:04 UTC (rev 12067)
@@ -1,9 +1,3 @@
-
-
-
-
-
-
 #include "WagnisGameboard.h"
 #include "core/CoreIncludes.h"
 #include "BulletDynamics/Dynamics/btRigidBody.h"
@@ -28,12 +22,15 @@
 
     //XML Port
     void WagnisGameboard::XMLPort(Element& xmlelement,XMLPort::Mode mode){
+        SUPER(WagnisGameboard, XMLPort, xmlelement, mode);
 
-        XMLPortObject(WagnisGameboard, WagnisProvince, "Province", addProvince, getProvince, xmlelement, mode);
+        XMLPortObject(WagnisGameboard, WagnisProvince, "Provinces", addProvince, getProvince, xmlelement, mode);
     }
     //XML add province
     //Adds a Province to the Gameboard
     void WagnisGameboard::addProvince(WagnisProvince* province){
+        orxout() << "added" << endl;
+        orxout() << province->getID() << endl;
         this->provs.push_back(province);
     }
     //XML get province

Modified: code/branches/wagnis_HS18/src/modules/wagnis/WagnisProvince.cc
===================================================================
--- code/branches/wagnis_HS18/src/modules/wagnis/WagnisProvince.cc	2018-10-31 10:23:24 UTC (rev 12066)
+++ code/branches/wagnis_HS18/src/modules/wagnis/WagnisProvince.cc	2018-10-31 10:27:04 UTC (rev 12067)
@@ -1,9 +1,3 @@
-
-
-
-
-
-
 #include "WagnisProvince.h"
 #include "core/CoreIncludes.h"
 #include "BulletDynamics/Dynamics/btRigidBody.h"
@@ -29,6 +23,8 @@
 
     //XML Port
     void WagnisProvince::XMLPort(Element& xmlelement,XMLPort::Mode mode){
+        SUPER(WagnisProvince, XMLPort, xmlelement, mode);
+
         XMLPortParam(WagnisProvince, "ID", setID, getID, xmlelement, mode);
         XMLPortParam(WagnisProvince, "continent", setContinent, getContinent, xmlelement, mode);
     }

Modified: code/branches/wagnis_HS18/src/modules/wagnis/WagnisProvince.h
===================================================================
--- code/branches/wagnis_HS18/src/modules/wagnis/WagnisProvince.h	2018-10-31 10:23:24 UTC (rev 12066)
+++ code/branches/wagnis_HS18/src/modules/wagnis/WagnisProvince.h	2018-10-31 10:27:04 UTC (rev 12067)
@@ -6,7 +6,7 @@
 #ifndef Wagnis_Province_h
 #define Wagnis_Province_h
 
-#include "OrxonoxPrereqs.h"
+#include "WagnisPrereqs.h"
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
 #include "worldentities/MovableEntity.h"
@@ -15,7 +15,7 @@
 
 namespace orxonox
 {
-    class WagnisProvince : public MovableEntity
+    class _WagnisExport WagnisProvince : public MovableEntity
     {
     public:
         WagnisProvince(Context*);



More information about the Orxonox-commit mailing list