[Orxonox-commit 7442] r12049 - in code/branches/wagnis_HS18/src/modules: . wagnis

stadlero at orxonox.net stadlero at orxonox.net
Sun Oct 21 13:28:52 CEST 2018


Author: stadlero
Date: 2018-10-21 13:28:52 +0200 (Sun, 21 Oct 2018)
New Revision: 12049

Added:
   code/branches/wagnis_HS18/src/modules/wagnis/
   code/branches/wagnis_HS18/src/modules/wagnis/CMakeLists.txt
   code/branches/wagnis_HS18/src/modules/wagnis/WagnisGameboard.cc
   code/branches/wagnis_HS18/src/modules/wagnis/WagnisGameboard.h
   code/branches/wagnis_HS18/src/modules/wagnis/WagnisPrereqs.h
   code/branches/wagnis_HS18/src/modules/wagnis/WagnisProvince.cc
   code/branches/wagnis_HS18/src/modules/wagnis/WagnisProvince.h
Log:
Klassen jetzt hinzugefugt -Oli

Added: code/branches/wagnis_HS18/src/modules/wagnis/CMakeLists.txt
===================================================================
--- code/branches/wagnis_HS18/src/modules/wagnis/CMakeLists.txt	                        (rev 0)
+++ code/branches/wagnis_HS18/src/modules/wagnis/CMakeLists.txt	2018-10-21 11:28:52 UTC (rev 12049)
@@ -0,0 +1,14 @@
+SET_SOURCE_FILES(WAGNIS_SRC_FILES
+  WagnisProvince.cc
+  WagnisGameboard.cc
+)
+
+ORXONOX_ADD_LIBRARY(wagnis
+  PLUGIN
+  FIND_HEADER_FILES
+  LINK_LIBRARIES
+    orxonox
+    overlays
+    objects
+  SOURCE_FILES ${WAGNIS_SRC_FILES}
+)

Added: code/branches/wagnis_HS18/src/modules/wagnis/WagnisGameboard.cc
===================================================================
--- code/branches/wagnis_HS18/src/modules/wagnis/WagnisGameboard.cc	                        (rev 0)
+++ code/branches/wagnis_HS18/src/modules/wagnis/WagnisGameboard.cc	2018-10-21 11:28:52 UTC (rev 12049)
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+#include "WagnisGameboard.h"
+#include "core/CoreIncludes.h"
+#include "BulletDynamics/Dynamics/btRigidBody.h"
+#include <vector>
+
+
+namespace orxonox
+{
+    RegisterClass(WagnisGameboard);
+    
+    WagnisGameboard::WagnisGameboard(Context* context) : StaticEntity(context){
+        RegisterObject(WagnisGameboard);
+    }
+    WagnisGameboard::~WagnisGameboard(){
+
+    }
+    //XML Port
+    void WagnisGameboard::XMLPort(Element& element,XMLPort::Mode mode){
+        
+    }
+    void WagnisGameboard::setPosition(const Vector3&){
+
+    }
+    void WagnisGameboard::setOrientation(const Quaternion&){
+
+    }
+}
\ No newline at end of file

Added: code/branches/wagnis_HS18/src/modules/wagnis/WagnisGameboard.h
===================================================================
--- code/branches/wagnis_HS18/src/modules/wagnis/WagnisGameboard.h	                        (rev 0)
+++ code/branches/wagnis_HS18/src/modules/wagnis/WagnisGameboard.h	2018-10-21 11:28:52 UTC (rev 12049)
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+#ifndef Wagnis_Gameboard_h
+#define Wagnis_Gameboard_h
+
+#include "WagnisProvince.h"
+
+#include "OrxonoxPrereqs.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "worldentities/StaticEntity.h"
+#include <vector>
+
+
+namespace orxonox
+{
+    class WagnisGameboard : public StaticEntity
+    {
+    public:
+        WagnisGameboard(Context*);
+        virtual ~WagnisGameboard();
+        virtual void XMLPort(Element&,XMLPort::Mode);
+
+        void setPosition(const Vector3&) override;
+        void setOrientation(const Quaternion&) override;
+
+    
+    private:
+        std::vector<WagnisProvince*> provs;
+        Vector3 position;
+        Quaternion orientation;
+    };
+}
+
+
+#endif

Added: code/branches/wagnis_HS18/src/modules/wagnis/WagnisPrereqs.h
===================================================================
--- code/branches/wagnis_HS18/src/modules/wagnis/WagnisPrereqs.h	                        (rev 0)
+++ code/branches/wagnis_HS18/src/modules/wagnis/WagnisPrereqs.h	2018-10-21 11:28:52 UTC (rev 12049)
@@ -0,0 +1,72 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Oliver Stadler
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+ at file
+ at brief
+    Shared library macros, enums, constants and forward declarations for the questsystem module
+*/
+
+#ifndef _WagnisPrereqs_H__
+#define _WagnisPrereqs_H__
+
+#include "OrxonoxConfig.h"
+#include "OrxonoxPrereqs.h"
+
+//-----------------------------------------------------------------------
+// Shared library settings
+//-----------------------------------------------------------------------
+
+#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(WAGNIS_STATIC_BUILD)
+#  ifdef WAGNIS_SHARED_BUILD
+#    define _WagnisExport __declspec(dllexport)
+#  else
+#    if defined( __MINGW32__ )
+#      define _WagnisExport
+#    else
+#      define _WagnisExport __declspec(dllimport)
+#    endif
+#  endif
+#elif defined ( ORXONOX_GCC_VISIBILITY )
+#  define _WagnisExport  __attribute__ ((visibility("default")))
+#else
+#  define _WagnisExport
+#endif
+
+//-----------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------
+
+namespace orxonox
+{
+
+    class WagnisProvince;
+
+}
+
+#endif /* _WagnisPrereqs_H__ */

Added: code/branches/wagnis_HS18/src/modules/wagnis/WagnisProvince.cc
===================================================================
--- code/branches/wagnis_HS18/src/modules/wagnis/WagnisProvince.cc	                        (rev 0)
+++ code/branches/wagnis_HS18/src/modules/wagnis/WagnisProvince.cc	2018-10-21 11:28:52 UTC (rev 12049)
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+#include "WagnisProvince.h"
+#include "core/CoreIncludes.h"
+#include "BulletDynamics/Dynamics/btRigidBody.h"
+#include <vector>
+
+namespace orxonox
+{
+    RegisterClass(WagnisProvince);
+
+    //Constructor
+    WagnisProvince::WagnisProvince(Context* context) : StaticEntity(context){
+        RegisterObject(WagnisProvince);
+        this->owner_ID = 0;
+        this->troops = 0;
+        this->ID = -1;
+        this->continent = -1;
+    }
+    //Destructor
+    WagnisProvince::~WagnisProvince(){
+
+    }
+
+
+
+
+    //SET()
+
+    //set Position
+    void WagnisProvince::setPosition(const Vector3& position){
+        //TODO
+    }
+    //set Orientation
+    void WagnisProvince::setOrientation(const Quaternion& orientation){
+        //TODO
+    }
+    //set owner_ID
+    void WagnisProvince::setOwner_ID(int owner){
+        this->owner_ID = owner;
+    }
+    //set troops
+    void WagnisProvince::setTroops(int troops){
+        this->troops = troops;
+    }
+    //set ID
+    void WagnisProvince::setID(int id){
+        this->ID = id;
+    }
+    //set Continent
+    void WagnisProvince::setContinent(int cont){
+        this->continent = cont;
+    }
+
+
+    //GET()
+
+    //get owner_ID
+    int WagnisProvince::getOwner_ID(){
+        return this->owner_ID;
+    }
+    //get troops
+    int WagnisProvince::getTroops(){
+        return this->troops;
+    }
+    //get ID
+    int WagnisProvince::getID(){
+        return this->ID;
+    }
+    //get continent
+    int WagnisProvince::getContinent(){
+        return this-> continent;
+    }
+
+    //Creates a connection between two provinces.
+    void WagnisProvince::addNeighbor(WagnisProvince* prov){
+        neighbors.push_back(prov);
+        prov->neighbors.push_back(this);
+    }
+}

Added: code/branches/wagnis_HS18/src/modules/wagnis/WagnisProvince.h
===================================================================
--- code/branches/wagnis_HS18/src/modules/wagnis/WagnisProvince.h	                        (rev 0)
+++ code/branches/wagnis_HS18/src/modules/wagnis/WagnisProvince.h	2018-10-21 11:28:52 UTC (rev 12049)
@@ -0,0 +1,50 @@
+
+
+
+
+
+#ifndef Wagnis_Province_h
+#define Wagnis_Province_h
+
+#include "OrxonoxPrereqs.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "worldentities/StaticEntity.h"
+#include <vector>
+
+
+namespace orxonox
+{
+    class WagnisProvince : public StaticEntity
+    {
+    public:
+        WagnisProvince(Context*);
+        virtual ~WagnisProvince();
+        void setPosition(const Vector3&) override;
+        void setOrientation(const Quaternion&) override;
+        void addNeighbor(WagnisProvince*);
+
+        void setOwner_ID(int);
+        void setTroops(int);
+        void setID(int);
+        void setContinent(int);
+
+        int getOwner_ID();
+        int getTroops();
+        int getID();
+        int getContinent();
+
+    
+    private:
+        int owner_ID;
+        int troops;
+        int ID;
+        int continent;
+        std::vector<WagnisProvince*> neighbors;
+        Vector3 position;
+        Quaternion orientation;
+    };
+}
+
+
+#endif



More information about the Orxonox-commit mailing list