Explorar o código

Various Mac fixes.

sgrenier %!s(int64=11) %!d(string=hai) anos
pai
achega
b365d09649

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 262 - 706
gameplay/gameplay.xcodeproj/project.pbxproj


+ 1 - 1
gameplay/src/Script.h

@@ -126,4 +126,4 @@ private:
 
 }
 
-#endif SCRIPT_H_
+#endif

+ 2 - 2
gameplay/src/ScriptController.h

@@ -688,8 +688,8 @@ private:
 
     lua_State* _lua;
     unsigned int _returnCount;
-    std::map<std::string, std::vector<std::string>> _hierarchy;
-    std::map<std::string, std::vector<Script*>> _scripts;
+    std::map<std::string, std::vector<std::string> > _hierarchy;
+    std::map<std::string, std::vector<Script*> > _scripts;
     std::vector<Script*> _envStack;
     std::list<ScriptTimeListener*> _timeListeners;
 };

+ 1 - 1
gameplay/src/ScriptController.inl

@@ -303,7 +303,7 @@ template<typename T> T ScriptController::executeFunction(Script* script, const c
 
 template<typename T> T ScriptController::executeFunction(const char* func, const char* args, va_list* list)
 {
-    return executeFunctionHelper((Script*)NULL, func, args, list);
+    return executeFunctionHelper(1, func, args, list, (Script*)NULL);
 }
 
 template<typename T> T ScriptController::executeFunction(Script* script, const char* func, const char* args, va_list* list)

+ 8 - 7
gameplay/src/ScriptTarget.h

@@ -25,7 +25,7 @@ public: \
             static ScriptEvents instance; \
             return &instance; \
         } \
-        ScriptTarget::EventRegistry* getRegistry() \
+        static ScriptTarget::EventRegistry* getRegistry() \
         { \
             static ScriptTarget::EventRegistry registry; \
             return &registry; \
@@ -48,13 +48,14 @@ public: \
         { \
             SCRIPT_EVENT_ ## eventName() \
             { \
-                getEvent(); \
+                _event = ScriptEvents::getRegistry()->addEvent(#eventName, eventArgs); \
             } \
-            static const ScriptTarget::Event* getEvent() \
+            const ScriptTarget::Event* getEvent() \
             { \
-                static const ScriptTarget::Event* event = ScriptEvents::getInstance()->getRegistry()->addEvent(#eventName, eventArgs); \
-                return event; \
+                return _event; \
             } \
+        private: \
+            const ScriptTarget::Event* _event; \
         }; \
         SCRIPT_EVENT_ ## eventName eventName;
 
@@ -77,7 +78,7 @@ public: \
  * @script{ignore}
  */
 #define GP_GET_SCRIPT_EVENT(eventClass, eventName) \
-    eventClass ## ::ScriptEvents::getInstance()-> ## eventName ## .getEvent()
+    eventClass::ScriptEvents::getInstance()->eventName.getEvent()
 
 
 /**
@@ -381,7 +382,7 @@ protected:
     /** Holds the list of scripts referenced by this ScriptTarget. */
     ScriptEntry* _scripts;
     /** Holds the list of callback functions registered for this ScriptTarget. */
-    std::map<const Event*, std::vector<CallbackFunction>>* _scriptCallbacks;
+    std::map<const Event*, std::vector<CallbackFunction> >* _scriptCallbacks;
 };
 
 template<typename T> T ScriptTarget::fireScriptEvent(const Event* evt, ...)

+ 1 - 1
newproject.sh

@@ -21,7 +21,7 @@ shopt -s expand_aliases
 
 #Alias the sed in-place command for OSX and Linux - incompatibilities between BSD and Linux sed args
 if [[ "$unamestr" == "Darwin" ]]; then
-	alias aliassedinplace='sed -i ""'
+	alias aliassedinplace='sed -i""'
 else
 	#For Linux, notice no space after the '-i' 
 	alias aliassedinplace='sed -i""'

+ 6 - 0
tools/luagen/generate-doxygen-xml.sh

@@ -0,0 +1,6 @@
+#!/bin/bash
+
+rm -r -f xml/
+mkdir xml
+doxygen gameplay-luagen.doxyfile
+

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio