[Orxonox-commit 6754] r11382 - in code/branches/Dialogue_FS17/src/modules: . dialogue
rrogge at orxonox.net
rrogge at orxonox.net
Thu Mar 30 15:14:02 CEST 2017
Author: rrogge
Date: 2017-03-30 15:14:02 +0200 (Thu, 30 Mar 2017)
New Revision: 11382
Added:
code/branches/Dialogue_FS17/src/modules/dialogue/CMakeLists.txt
code/branches/Dialogue_FS17/src/modules/dialogue/DialoguePrereqs.h
Modified:
code/branches/Dialogue_FS17/src/modules/CMakeLists.txt
code/branches/Dialogue_FS17/src/modules/dialogue/DialogueManager.cc
code/branches/Dialogue_FS17/src/modules/dialogue/DialogueManager.h
Log:
30 March
Modified: code/branches/Dialogue_FS17/src/modules/CMakeLists.txt
===================================================================
--- code/branches/Dialogue_FS17/src/modules/CMakeLists.txt 2017-03-30 12:42:31 UTC (rev 11381)
+++ code/branches/Dialogue_FS17/src/modules/CMakeLists.txt 2017-03-30 13:14:02 UTC (rev 11382)
@@ -25,6 +25,7 @@
################ Sub Directories ################
+ADD_SUBDIRECTORY(dialogue)
ADD_SUBDIRECTORY(designtools)
ADD_SUBDIRECTORY(gametypes)
ADD_SUBDIRECTORY(notifications)
Added: code/branches/Dialogue_FS17/src/modules/dialogue/CMakeLists.txt
===================================================================
--- code/branches/Dialogue_FS17/src/modules/dialogue/CMakeLists.txt (rev 0)
+++ code/branches/Dialogue_FS17/src/modules/dialogue/CMakeLists.txt 2017-03-30 13:14:02 UTC (rev 11382)
@@ -0,0 +1,12 @@
+SET_SOURCE_FILES(DIALOGUE_SRC_FILES
+ DialogueManager.cc
+
+)
+
+ORXONOX_ADD_LIBRARY(dialogue
+ MODULE
+ FIND_HEADER_FILES
+ LINK_LIBRARIES
+ orxonox
+ SOURCE_FILES ${DIALOGUE_SRC_FILES}
+)
Modified: code/branches/Dialogue_FS17/src/modules/dialogue/DialogueManager.cc
===================================================================
--- code/branches/Dialogue_FS17/src/modules/dialogue/DialogueManager.cc 2017-03-30 12:42:31 UTC (rev 11381)
+++ code/branches/Dialogue_FS17/src/modules/dialogue/DialogueManager.cc 2017-03-30 13:14:02 UTC (rev 11382)
@@ -6,40 +6,44 @@
#include "network/Host.h"
#include "network/NetworkFunctionIncludes.h"
#include "DialogueManager.h"
+#include "DialoguePrereqs.h"
+#include <vector>
+#include <string>
namespace orxonox {
-RegisterClass(DialogueManager);
+ ManageScopedSingleton(DialogueManager, ScopeID::ROOT, false);
+ RegisterClass(DialogueManager);
- DialogueManager::DialogueManager(): OrxonoxOverlay(context){
+ DialogueManager::DialogueManager(){
RegisterObject(DialogueManager);
}
- ~DialogueManager(){}
+
- std::string setnpc(std::string npc){
+ /*std::string setnpc(std::string npc){
return npc;
}
void setquestion(std::string question){
- this->question=question;
+ question=question;
}
std::string getquestion(void){
- return this->question;
+ return question;
}
void setanswers(std::string option1, std::string option2, std::string option3){
- option[0]=option1;
- option[1]=option2;
- option[2]=option3;
+ options.at(0)=option1;
+ options.at(1)=option2;
+ options.at(2)=option3;
}
- std::string[] getanswers(void){
- return option[];
+ vector<std::string> getanswers(void){
+ return options;
}
- int getnumOptions(options){
- return options.length();
+ int getnumOptions(){
+ return options.size();
}
void DialogueManager::XMLPort(Element& xmlelement, XMLPort::Mode mode)
@@ -47,5 +51,5 @@
SUPER(DialogueManager, XMLPort, xmlelement, mode);
XMLPortParam(DialogueManager, "question", setquestion, getquestion, xmlelement, mode);
- }
+ }*/
}
\ No newline at end of file
Modified: code/branches/Dialogue_FS17/src/modules/dialogue/DialogueManager.h
===================================================================
--- code/branches/Dialogue_FS17/src/modules/dialogue/DialogueManager.h 2017-03-30 12:42:31 UTC (rev 11381)
+++ code/branches/Dialogue_FS17/src/modules/dialogue/DialogueManager.h 2017-03-30 13:14:02 UTC (rev 11382)
@@ -5,27 +5,43 @@
#include "core/singleton/ScopedSingletonIncludes.h"
#include "network/Host.h"
#include "network/NetworkFunctionIncludes.h"
+#include "DialoguePrereqs.h"
+#include "util/Singleton.h"
+#include <string>
+#include <vector>
+#include "OrxonoxPrereqs.h"
-namespace orxonox{
- class DialogueManager {
- DialogueManager::DialogueManager();
- ~DialogueManager();
- virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+//tolua_begin
+namespace orxonox
+//tolua_end
+{//toluaexport
+ class _OrxonoxExport DialogueManager : public Singleton<DialogueManager>{
+ friend class Singleton<DialogueManager>;
+ //tolua_begin
+ //public:
- public:
+ DialogueManager();
+ static DialogueManager& getInstance() { return Singleton<DialogueManager>::getInstance(); } // tolua_export
+ /*virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
void setquestion(std::string question);
std::string getquestion(void);
+
std::string setnpc(std::string npc);
+
void setanswers(std::string option1, std::string option2, std::string option3);
- std::string[] getanswers(void);
- int getnumOptions(options);
+ std::vector <std::string> getanswers(void);
+
+ int getnumOptions();
std::string question;
std::string npc;
- std::string[] options;
+ std::vector<std::string> options;
+ //tolua_end
+*/
+private:
+ static DialogueManager* singletonPtr_s;
-
-
- };
+ };//toluaexport
}
Added: code/branches/Dialogue_FS17/src/modules/dialogue/DialoguePrereqs.h
===================================================================
--- code/branches/Dialogue_FS17/src/modules/dialogue/DialoguePrereqs.h (rev 0)
+++ code/branches/Dialogue_FS17/src/modules/dialogue/DialoguePrereqs.h 2017-03-30 13:14:02 UTC (rev 11382)
@@ -0,0 +1,75 @@
+/*
+ * 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:
+ * Damian 'Mozork' Frick
+ * Co-authors:
+ * ...
+ *
+ */
+
+/**
+ at file
+ at brief
+ Shared library macros, enums, constants and forward declarations for the questsystem module
+*/
+
+#ifndef _DialoguePrereqs_H__
+#define _DialoguePrereqs_H__
+
+#include "OrxonoxConfig.h"
+#include "OrxonoxPrereqs.h"
+
+//-----------------------------------------------------------------------
+// Shared library settings
+//-----------------------------------------------------------------------
+
+#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(Dialogue_STATIC_BUILD)
+# ifdef Dialogue_SHARED_BUILD
+# define _DialogueExport __declspec(dllexport)
+# else
+# if defined( __MINGW32__ )
+# define _DialogueExport
+# else
+# define _DialogueExport __declspec(dllimport)
+# endif
+# endif
+# define _DialoguePrivate
+#elif defined (ORXONOX_GCC_VISIBILITY)
+# define _DialogueExport __attribute__ ((visibility("default")))
+# define _DialoguePrivate __attribute__ ((visibility("hidden")))
+#else
+# define _DialogueExport
+# define _DialoguePrivate
+#endif
+
+//-----------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------
+
+namespace orxonox
+{
+
+ class DialogueManager;
+
+}
+
+#endif /* _DialoguePrereqs_H__ */
More information about the Orxonox-commit
mailing list