Browse Source

Merge pull request #333 from seanpaultaylor/next

Scene::createScene() renamed to Scene::create()
Sean Paul Taylor 13 years ago
parent
commit
6f4e6aec9d

+ 1 - 1
gameplay/src/Bundle.cpp

@@ -394,7 +394,7 @@ Scene* Bundle::loadScene(const char* id)
         }
     }
     
-    Scene* scene = Scene::createScene();
+    Scene* scene = Scene::create();
     scene->setId(getIdFromOffset());
 
     // Read the number of children.

+ 4 - 4
gameplay/src/PlatformWin32.cpp

@@ -33,6 +33,7 @@ static HGLRC __hrc = 0;
 static bool __mouseCaptured = false;
 static POINT __mouseCapturePoint = { 0, 0 };
 static bool __cursorVisible = true;
+static unsigned int __gamepadsConnected = 0;
 
 #ifdef USE_XINPUT
 struct XInputGamepad
@@ -46,7 +47,6 @@ struct XInputGamepad
     XINPUT_STATE state;
 };
 
-static unsigned int __xinputGamepadsConnected = 0;
 static XInputGamepad* __xinputGamepads = NULL;
 
 static DWORD getXInputGamepadButtonMask(unsigned int buttonHandle)
@@ -1022,16 +1022,16 @@ void Platform::displayKeyboard(bool display)
 unsigned int Platform::getGamepadsConnected()
 {
     // Check to see what xbox360 gamepads are connected.
-    __xinputGamepadsConnected = 0;
+    __gamepadsConnected = 0;
 
 #ifdef USE_XINPUT
     for (unsigned int i = 0; i < XUSER_MAX_COUNT; i++)
     {
         if (isGamepadConnected(i))
-            __xinputGamepadsConnected++;
+            __gamepadsConnected++;
     }    
 #endif
-    return __xinputGamepadsConnected;
+    return __gamepadsConnected;
 }
 
 bool Platform::isGamepadConnected(unsigned int gamepadHandle)

+ 1 - 1
gameplay/src/Scene.cpp

@@ -31,7 +31,7 @@ Scene::~Scene()
     SAFE_DELETE(_debugBatch);
 }
 
-Scene* Scene::createScene()
+Scene* Scene::create()
 {
     return new Scene();
 }

+ 1 - 1
gameplay/src/Scene.h

@@ -30,7 +30,7 @@ public:
      * @return The newly created empty scene.
      * @script{create}
      */
-    static Scene* createScene();
+    static Scene* create();
 
     /**
      * Loads a scene from the given '.scene' file.

+ 3 - 3
gameplay/src/lua/lua_Scene.cpp

@@ -39,7 +39,7 @@ void luaRegister_Scene()
     };
     const luaL_Reg lua_statics[] = 
     {
-        {"createScene", lua_Scene_static_createScene},
+        {"create", lua_Scene_static_create},
         {"load", lua_Scene_static_load},
         {NULL, NULL}
     };
@@ -897,7 +897,7 @@ int lua_Scene_setId(lua_State* state)
     return 0;
 }
 
-int lua_Scene_static_createScene(lua_State* state)
+int lua_Scene_static_create(lua_State* state)
 {
     // Get the number of parameters.
     int paramCount = lua_gettop(state);
@@ -907,7 +907,7 @@ int lua_Scene_static_createScene(lua_State* state)
     {
         case 0:
         {
-            void* returnPtr = (void*)Scene::createScene();
+            void* returnPtr = (void*)Scene::create();
             if (returnPtr)
             {
                 ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));

+ 1 - 1
gameplay/src/lua/lua_Scene.h

@@ -23,7 +23,7 @@ int lua_Scene_removeNode(lua_State* state);
 int lua_Scene_setActiveCamera(lua_State* state);
 int lua_Scene_setAmbientColor(lua_State* state);
 int lua_Scene_setId(lua_State* state);
-int lua_Scene_static_createScene(lua_State* state);
+int lua_Scene_static_create(lua_State* state);
 int lua_Scene_static_load(lua_State* state);
 int lua_Scene_visit(lua_State* state);