Ver Fonte

Updated the api-docs and regenerated the lua bindings for gesture support.

setaylor há 13 anos atrás
pai
commit
2193c8bee8

+ 23 - 15
gameplay-luagen/gameplay-luagen.doxyfile

@@ -1,4 +1,4 @@
-# Doxyfile 1.8.1
+# Doxyfile 1.8.0
 
 # This file describes the settings to be used by the documentation system
 # doxygen (www.doxygen.org) for a project
@@ -32,7 +32,7 @@ PROJECT_NAME           = gameplay
 # This could be handy for archiving the generated documentation or 
 # if some version control system is used.
 
-PROJECT_NUMBER         = 1.4.0
+PROJECT_NUMBER         = 1.5.0
 
 # Using the PROJECT_BRIEF tag one can provide an optional one line description 
 # for a project that appears at the top of each page and should give viewer 
@@ -564,6 +564,12 @@ MAX_INITIALIZER_LINES  = 30
 
 SHOW_USED_FILES        = NO
 
+# If the sources in your project are distributed over multiple directories 
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy 
+# in the documentation. The default is NO.
+
+SHOW_DIRECTORIES       = NO
+
 # Set the SHOW_FILES tag to NO to disable the generation of the Files page. 
 # This will remove the Files entry from the Quick Index and from the 
 # Folder Tree View (if specified). The default is YES.
@@ -948,23 +954,20 @@ HTML_COLORSTYLE_GAMMA  = 80
 
 HTML_TIMESTAMP         = YES
 
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
+# files or namespaces will be aligned in HTML using tables. If set to 
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS     = YES
+
 # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML 
 # documentation will contain sections that can be hidden and shown after the 
-# page has loaded.
+# page has loaded. For this to work a browser that supports 
+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox 
+# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
 
 HTML_DYNAMIC_SECTIONS  = NO
 
-# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of 
-# entries shown in the various tree structured indices initially; the user 
-# can expand and collapse entries dynamically later on. Doxygen will expand 
-# the tree to such a level that at most the specified number of entries are 
-# visible (unless a fully collapsed tree already exceeds this amount). 
-# So setting the number of entries 1 will produce a full collapsed tree by 
-# default. 0 is a special value representing an infinite number of entries 
-# and will result in a full expanded tree by default.
-
-HTML_INDEX_NUM_ENTRIES = 113
-
 # If the GENERATE_DOCSET tag is set to YES, additional index files 
 # will be generated that can be used as input for Apple's Xcode 3 
 # integrated development environment, introduced with OSX 10.5 (Leopard). 
@@ -1143,6 +1146,11 @@ GENERATE_TREEVIEW      = NO
 
 ENUM_VALUES_PER_LINE   = 4
 
+# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, 
+# and Class Hierarchy pages using a tree view instead of an ordered list.
+
+USE_INLINE_TREES       = NO
+
 # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
 # used to set the initial width (in pixels) of the frame in which the tree 
 # is shown.
@@ -1705,7 +1713,7 @@ CALLER_GRAPH           = NO
 
 GRAPHICAL_HIERARCHY    = YES
 
-# If the DIRECTORY_GRAPH and HAVE_DOT tags are set to YES 
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES 
 # then doxygen will show the dependencies a directory has on other directories 
 # in a graphical way. The dependency relations are determined by the #include 
 # relations between the files in the directories.

+ 23 - 15
gameplay.doxyfile

@@ -1,4 +1,4 @@
-# Doxyfile 1.8.1
+# Doxyfile 1.8.0
 
 # This file describes the settings to be used by the documentation system
 # doxygen (www.doxygen.org) for a project
@@ -32,7 +32,7 @@ PROJECT_NAME           = gameplay
 # This could be handy for archiving the generated documentation or 
 # if some version control system is used.
 
-PROJECT_NUMBER         = 1.4.0
+PROJECT_NUMBER         = 1.5.0
 
 # Using the PROJECT_BRIEF tag one can provide an optional one line description 
 # for a project that appears at the top of each page and should give viewer 
@@ -564,6 +564,12 @@ MAX_INITIALIZER_LINES  = 30
 
 SHOW_USED_FILES        = NO
 
+# If the sources in your project are distributed over multiple directories 
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy 
+# in the documentation. The default is NO.
+
+SHOW_DIRECTORIES       = NO
+
 # Set the SHOW_FILES tag to NO to disable the generation of the Files page. 
 # This will remove the Files entry from the Quick Index and from the 
 # Folder Tree View (if specified). The default is YES.
@@ -948,23 +954,20 @@ HTML_COLORSTYLE_GAMMA  = 80
 
 HTML_TIMESTAMP         = YES
 
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
+# files or namespaces will be aligned in HTML using tables. If set to 
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS     = YES
+
 # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML 
 # documentation will contain sections that can be hidden and shown after the 
-# page has loaded.
+# page has loaded. For this to work a browser that supports 
+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox 
+# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
 
 HTML_DYNAMIC_SECTIONS  = NO
 
-# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of 
-# entries shown in the various tree structured indices initially; the user 
-# can expand and collapse entries dynamically later on. Doxygen will expand 
-# the tree to such a level that at most the specified number of entries are 
-# visible (unless a fully collapsed tree already exceeds this amount). 
-# So setting the number of entries 1 will produce a full collapsed tree by 
-# default. 0 is a special value representing an infinite number of entries 
-# and will result in a full expanded tree by default.
-
-HTML_INDEX_NUM_ENTRIES = 100
-
 # If the GENERATE_DOCSET tag is set to YES, additional index files 
 # will be generated that can be used as input for Apple's Xcode 3 
 # integrated development environment, introduced with OSX 10.5 (Leopard). 
@@ -1143,6 +1146,11 @@ GENERATE_TREEVIEW      = NO
 
 ENUM_VALUES_PER_LINE   = 4
 
+# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, 
+# and Class Hierarchy pages using a tree view instead of an ordered list.
+
+USE_INLINE_TREES       = NO
+
 # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
 # used to set the initial width (in pixels) of the frame in which the tree 
 # is shown.
@@ -1705,7 +1713,7 @@ CALLER_GRAPH           = NO
 
 GRAPHICAL_HIERARCHY    = YES
 
-# If the DIRECTORY_GRAPH and HAVE_DOT tags are set to YES 
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES 
 # then doxygen will show the dependencies a directory has on other directories 
 # in a graphical way. The dependency relations are determined by the #include 
 # relations between the files in the directories.

+ 4 - 0
gameplay/gameplay.vcxproj

@@ -114,6 +114,8 @@
     <ClCompile Include="src\lua\lua_GamepadButtonState.cpp" />
     <ClCompile Include="src\lua\lua_GamepadGamepadEvent.cpp" />
     <ClCompile Include="src\lua\lua_GameState.cpp" />
+    <ClCompile Include="src\lua\lua_Gesture.cpp" />
+    <ClCompile Include="src\lua\lua_GestureGestureEvent.cpp" />
     <ClCompile Include="src\lua\lua_Global.cpp" />
     <ClCompile Include="src\lua\lua_Image.cpp" />
     <ClCompile Include="src\lua\lua_ImageFormat.cpp" />
@@ -373,6 +375,8 @@
     <ClInclude Include="src\lua\lua_GamepadButtonState.h" />
     <ClInclude Include="src\lua\lua_GamepadGamepadEvent.h" />
     <ClInclude Include="src\lua\lua_GameState.h" />
+    <ClInclude Include="src\lua\lua_Gesture.h" />
+    <ClInclude Include="src\lua\lua_GestureGestureEvent.h" />
     <ClInclude Include="src\lua\lua_Global.h" />
     <ClInclude Include="src\lua\lua_Image.h" />
     <ClInclude Include="src\lua\lua_ImageFormat.h" />

+ 12 - 0
gameplay/gameplay.vcxproj.filters

@@ -786,6 +786,12 @@
     <ClCompile Include="src\PlatformLinux.cpp">
       <Filter>src</Filter>
     </ClCompile>
+    <ClCompile Include="src\lua\lua_Gesture.cpp">
+      <Filter>lua</Filter>
+    </ClCompile>
+    <ClCompile Include="src\lua\lua_GestureGestureEvent.cpp">
+      <Filter>lua</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="src\Animation.h">
@@ -1562,6 +1568,12 @@
     <ClInclude Include="src\Gesture.h">
       <Filter>src</Filter>
     </ClInclude>
+    <ClInclude Include="src\lua\lua_Gesture.h">
+      <Filter>lua</Filter>
+    </ClInclude>
+    <ClInclude Include="src\lua\lua_GestureGestureEvent.h">
+      <Filter>lua</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <None Include="src\gameplay-main-macosx.mm">

+ 1 - 1
gameplay/src/AnimationValue.h

@@ -45,7 +45,7 @@ public:
      * Copies one or more float values into the AnimationValue.
      *
      * @param index The index of the first component to set the value for.
-     * @param vaules Array of values to copy into the AnimationValue.
+     * @param values Array of values to copy into the AnimationValue.
      * @param count Number of values to in the array to copy in.
      */
     void setFloats(unsigned int index, float* values, unsigned int count);

+ 1 - 1
gameplay/src/Game.h

@@ -401,7 +401,7 @@ public:
      *
      * @param x The centroid x-coordinate of the rotate.
      * @param y The centroid y-coordinate of the rotate.
-     * @param scale The scale of the pinch.
+     * @param angle The angle of the rotation.
      */
     virtual void gestureRotateEvent(int x, int y, float angle);
 

+ 3 - 2
gameplay/src/Gamepad.h

@@ -78,7 +78,7 @@ public:
      * Returns the specified joystick's value as a Vector2.
      *
      * @param joystickId The index of the joystick to get the value for.
-     * @param outValue The current x-axis and y-asix value displacement of the joystick.
+     * @param outValues The current x-axis and y-asix value displacement of the joystick.
      */
     void getJoystickAxisValues(unsigned int joystickId, Vector2* outValues) const;
 
@@ -130,7 +130,7 @@ private:
     /**
      * Constructs a gamepad from the specified .form file.
      *
-     * @param id The gamepad's id.
+     * @param handle The gamepad handle
      * @param formPath The path the the .form file.
      */ 
     Gamepad(unsigned int handle, const char* formPath);
@@ -139,6 +139,7 @@ private:
      * Constructs a physical gamepad.
      *
      * @param id The gamepad's id.
+     * @param handle The gamepad handle
      * @param buttonCount the number of buttons on the gamepad. 
      * @param joystickCount the number of joysticks on the gamepad.
      * @param triggerCount the number of triggers on the gamepad.

+ 24 - 6
gameplay/src/Gesture.h

@@ -11,19 +11,37 @@ class Gesture
 {
 public:
 
+    /**
+     * The gesture event type.
+     */
     enum GestureEvent
     {
-        SWIPE   = 0,
-        PINCH,
-        ROTATE,
-        TAP,
-        TAP_DOUBLE,
-        NONE = -1
+        GESTURE_SWIPE   = 0,
+        GESTURE_PINCH,
+        GESTURE_ROTATE,
+        GESTURE_TAP,
+        GESTURE_TAP_DOUBLE,
+        GESTURE_NONE = -1
     };
 
+    /**
+     * The up direction for a swipe event.
+     */
     static const int SWIPE_DIRECTION_UP = 1 << 0;
+
+    /**
+     * The down direction for a swipe event.
+     */
     static const int SWIPE_DIRECTION_DOWN = 1 << 1;
+
+    /**
+     * The left direction for a swipe event.
+     */
     static const int SWIPE_DIRECTION_LEFT = 1 << 2;
+
+    /**
+     * The right direction for a swipe event.
+     */
     static const int SWIPE_DIRECTION_RIGHT = 1 << 3;
 
 private:

+ 7 - 7
gameplay/src/PlatformQNX.cpp

@@ -1257,14 +1257,14 @@ bool Platform::mouseEventInternal(Mouse::MouseEvent evt, int x, int y, int wheel
 
 void Platform::recognizeGesture(Gesture::GestureEvent evt)
 {
-    if (evt != Gesture::NONE && __gesturesSet == NULL)
+    if (evt != Gesture::GESTURE_NONE && __gesturesSet == NULL)
     {
        __gesturesSet = gestures_set_alloc();
     }
 
     switch(evt)
     {
-    case Gesture::NONE:
+    case Gesture::GESTURE_NONE:
         {
             if (__gesturesSet)
             {
@@ -1274,31 +1274,31 @@ void Platform::recognizeGesture(Gesture::GestureEvent evt)
             break;
         }
 
-    case Gesture::SWIPE:
+    case Gesture::GESTURE_SWIPE:
         {
             swipe_gesture_alloc(NULL, gesture_callback, __gesturesSet);
             break;
         }
 
-    case Gesture::PINCH:
+    case Gesture::GESTURE_PINCH:
         {
             pinch_gesture_alloc(NULL, gesture_callback, __gesturesSet);
             break;
         }
 
-    case Gesture::ROTATE:
+    case Gesture::GESTURE_ROTATE:
         {
             rotate_gesture_alloc(NULL, gesture_callback, __gesturesSet);
             break;
         }
 
-    case Gesture::TAP:
+    case Gesture::GESTURE_TAP:
         {
             tap_gesture_alloc(NULL, gesture_callback, __gesturesSet);
             break;
         }
 
-    case Gesture::TAP_DOUBLE:
+    case Gesture::GESTURE_TAP_DOUBLE:
         {
             double_tap_gesture_alloc(NULL, gesture_callback, __gesturesSet);
             break;

+ 0 - 1
gameplay/src/ScriptController.h

@@ -50,7 +50,6 @@ public:
 	 * Individual items in the array can be set using the 
 	 * set(unsigned int, const T&) method.
 	 * 
-	 * @param object Parameter object.
 	 * @param count Number of elements to store in the parameter.
 	 */
 	LuaArray(int count);

+ 31 - 31
gameplay/src/lua/lua_GestureGestureEvent.cpp

@@ -6,45 +6,45 @@ namespace gameplay
 
 static const char* enumStringEmpty = "";
 
-static const char* luaEnumString_GestureGestureEvent_SWIPE = "SWIPE";
-static const char* luaEnumString_GestureGestureEvent_PINCH = "PINCH";
-static const char* luaEnumString_GestureGestureEvent_ROTATE = "ROTATE";
-static const char* luaEnumString_GestureGestureEvent_TAP = "TAP";
-static const char* luaEnumString_GestureGestureEvent_TAP_DOUBLE = "TAP_DOUBLE";
-static const char* luaEnumString_GestureGestureEvent_NONE = "NONE";
+static const char* luaEnumString_GestureGestureEvent_GESTURE_SWIPE = "GESTURE_SWIPE";
+static const char* luaEnumString_GestureGestureEvent_GESTURE_PINCH = "GESTURE_PINCH";
+static const char* luaEnumString_GestureGestureEvent_GESTURE_ROTATE = "GESTURE_ROTATE";
+static const char* luaEnumString_GestureGestureEvent_GESTURE_TAP = "GESTURE_TAP";
+static const char* luaEnumString_GestureGestureEvent_GESTURE_TAP_DOUBLE = "GESTURE_TAP_DOUBLE";
+static const char* luaEnumString_GestureGestureEvent_GESTURE_NONE = "GESTURE_NONE";
 
 Gesture::GestureEvent lua_enumFromString_GestureGestureEvent(const char* s)
 {
-    if (strcmp(s, luaEnumString_GestureGestureEvent_SWIPE) == 0)
-        return Gesture::SWIPE;
-    if (strcmp(s, luaEnumString_GestureGestureEvent_PINCH) == 0)
-        return Gesture::PINCH;
-    if (strcmp(s, luaEnumString_GestureGestureEvent_ROTATE) == 0)
-        return Gesture::ROTATE;
-    if (strcmp(s, luaEnumString_GestureGestureEvent_TAP) == 0)
-        return Gesture::TAP;
-    if (strcmp(s, luaEnumString_GestureGestureEvent_TAP_DOUBLE) == 0)
-        return Gesture::TAP_DOUBLE;
-    if (strcmp(s, luaEnumString_GestureGestureEvent_NONE) == 0)
-        return Gesture::NONE;
+    if (strcmp(s, luaEnumString_GestureGestureEvent_GESTURE_SWIPE) == 0)
+        return Gesture::GESTURE_SWIPE;
+    if (strcmp(s, luaEnumString_GestureGestureEvent_GESTURE_PINCH) == 0)
+        return Gesture::GESTURE_PINCH;
+    if (strcmp(s, luaEnumString_GestureGestureEvent_GESTURE_ROTATE) == 0)
+        return Gesture::GESTURE_ROTATE;
+    if (strcmp(s, luaEnumString_GestureGestureEvent_GESTURE_TAP) == 0)
+        return Gesture::GESTURE_TAP;
+    if (strcmp(s, luaEnumString_GestureGestureEvent_GESTURE_TAP_DOUBLE) == 0)
+        return Gesture::GESTURE_TAP_DOUBLE;
+    if (strcmp(s, luaEnumString_GestureGestureEvent_GESTURE_NONE) == 0)
+        return Gesture::GESTURE_NONE;
     GP_ERROR("Invalid enumeration value '%s' for enumeration Gesture::GestureEvent.", s);
-    return Gesture::SWIPE;
+    return Gesture::GESTURE_SWIPE;
 }
 
 const char* lua_stringFromEnum_GestureGestureEvent(Gesture::GestureEvent e)
 {
-    if (e == Gesture::SWIPE)
-        return luaEnumString_GestureGestureEvent_SWIPE;
-    if (e == Gesture::PINCH)
-        return luaEnumString_GestureGestureEvent_PINCH;
-    if (e == Gesture::ROTATE)
-        return luaEnumString_GestureGestureEvent_ROTATE;
-    if (e == Gesture::TAP)
-        return luaEnumString_GestureGestureEvent_TAP;
-    if (e == Gesture::TAP_DOUBLE)
-        return luaEnumString_GestureGestureEvent_TAP_DOUBLE;
-    if (e == Gesture::NONE)
-        return luaEnumString_GestureGestureEvent_NONE;
+    if (e == Gesture::GESTURE_SWIPE)
+        return luaEnumString_GestureGestureEvent_GESTURE_SWIPE;
+    if (e == Gesture::GESTURE_PINCH)
+        return luaEnumString_GestureGestureEvent_GESTURE_PINCH;
+    if (e == Gesture::GESTURE_ROTATE)
+        return luaEnumString_GestureGestureEvent_GESTURE_ROTATE;
+    if (e == Gesture::GESTURE_TAP)
+        return luaEnumString_GestureGestureEvent_GESTURE_TAP;
+    if (e == Gesture::GESTURE_TAP_DOUBLE)
+        return luaEnumString_GestureGestureEvent_GESTURE_TAP_DOUBLE;
+    if (e == Gesture::GESTURE_NONE)
+        return luaEnumString_GestureGestureEvent_GESTURE_NONE;
     GP_ERROR("Invalid enumeration value '%d' for enumeration Gesture::GestureEvent.", e);
     return enumStringEmpty;
 }

+ 6 - 6
gameplay/src/lua/lua_Global.cpp

@@ -360,12 +360,12 @@ void luaRegister_lua_Global()
     {
         std::vector<std::string> scopePath;
         scopePath.push_back("Gesture");
-        ScriptUtil::registerConstantString("SWIPE", "SWIPE", scopePath);
-        ScriptUtil::registerConstantString("PINCH", "PINCH", scopePath);
-        ScriptUtil::registerConstantString("ROTATE", "ROTATE", scopePath);
-        ScriptUtil::registerConstantString("TAP", "TAP", scopePath);
-        ScriptUtil::registerConstantString("TAP_DOUBLE", "TAP_DOUBLE", scopePath);
-        ScriptUtil::registerConstantString("NONE", "NONE", scopePath);
+        ScriptUtil::registerConstantString("GESTURE_SWIPE", "GESTURE_SWIPE", scopePath);
+        ScriptUtil::registerConstantString("GESTURE_PINCH", "GESTURE_PINCH", scopePath);
+        ScriptUtil::registerConstantString("GESTURE_ROTATE", "GESTURE_ROTATE", scopePath);
+        ScriptUtil::registerConstantString("GESTURE_TAP", "GESTURE_TAP", scopePath);
+        ScriptUtil::registerConstantString("GESTURE_TAP_DOUBLE", "GESTURE_TAP_DOUBLE", scopePath);
+        ScriptUtil::registerConstantString("GESTURE_NONE", "GESTURE_NONE", scopePath);
     }
 
     // Register enumeration Image::Format.

+ 2 - 2
gameplay/src/lua/lua_Platform.cpp

@@ -2,7 +2,7 @@
 #include "ScriptController.h"
 #include "lua_Platform.h"
 #include "Platform.h"
-#include "lua_.h"
+#include "lua_GestureGestureEvent.h"
 #include "lua_KeyboardKeyEvent.h"
 #include "lua_MouseMouseEvent.h"
 #include "lua_TouchTouchEvent.h"
@@ -1030,7 +1030,7 @@ int lua_Platform_static_recognizeGesture(lua_State* state)
             if ((lua_type(state, 1) == LUA_TSTRING || lua_type(state, 1) == LUA_TNIL))
             {
                 // Get parameter 1 off the stack.
-                 param1 = ()lua_enumFromString_(luaL_checkstring(state, 1));
+                Gesture::GestureEvent param1 = (Gesture::GestureEvent)lua_enumFromString_GestureGestureEvent(luaL_checkstring(state, 1));
 
                 Platform::recognizeGesture(param1);