Quellcode durchsuchen

Renamed any getID with getId to be consistent with Node and other classes that had already been using getId.

setaylor vor 13 Jahren
Ursprung
Commit
f083148ab5

+ 2 - 2
gameplay/src/AnimationClip.cpp

@@ -64,7 +64,7 @@ AnimationClip::ListenerEvent::~ListenerEvent()
 {
 }
 
-const char* AnimationClip::getID() const
+const char* AnimationClip::getId() const
 {
     return _id.c_str();
 }
@@ -553,7 +553,7 @@ void AnimationClip::resetClipStateBit(unsigned char bit)
 AnimationClip* AnimationClip::clone(Animation* animation) const
 {
     // Don't clone the elapsed time, listeners or crossfade information.
-    AnimationClip* newClip = new AnimationClip(getID(), animation, getStartTime(), getEndTime());
+    AnimationClip* newClip = new AnimationClip(getId(), animation, getStartTime(), getEndTime());
     newClip->setRepeatCount(getRepeatCount());
     newClip->setSpeed(getSpeed());
     newClip->setRepeatCount(getRepeatCount());

+ 1 - 1
gameplay/src/AnimationClip.h

@@ -75,7 +75,7 @@ public:
      *
      * @return The AnimationClip's ID.
      */
-    const char* getID() const;
+    const char* getId() const;
 
     /**
      * Gets the Animation that this AnimationClip was created from.

+ 8 - 8
gameplay/src/Bundle.cpp

@@ -1129,37 +1129,37 @@ void Bundle::resolveJointReferences(Scene* sceneContext, Node* nodeContext)
                     // No parent currently set for this joint.
                     // Lookup its parentID in case it references a node that was not yet loaded as part
                     // of the mesh skin's joint list.
-                    std::string nodeID = node->getId();
+                    std::string nodeId = node->getId();
 
                     while (true)
                     {
                         // Get the node's type.
-                        Reference* ref = find(nodeID.c_str());
+                        Reference* ref = find(nodeId.c_str());
                         if (ref == NULL)
                         {
-                            GP_ERROR("No object with name '%s' in bundle '%s'.", nodeID.c_str(), _path.c_str());
+                            GP_ERROR("No object with name '%s' in bundle '%s'.", nodeId.c_str(), _path.c_str());
                             return;
                         }
 
                         // Seek to the current node in the file so we can get it's parent ID.
-                        seekTo(nodeID.c_str(), ref->type);
+                        seekTo(nodeId.c_str(), ref->type);
 
                         // Skip over the node type (1 unsigned int) and transform (16 floats) and read the parent id.
                         if (fseek(_file, sizeof(unsigned int) + sizeof(float)*16, SEEK_CUR) != 0)
                         {
-                            GP_ERROR("Failed to skip over node type and transform for node '%s' in bundle '%s'.", nodeID.c_str(), _path.c_str());
+                            GP_ERROR("Failed to skip over node type and transform for node '%s' in bundle '%s'.", nodeId.c_str(), _path.c_str());
                             return;
                         }
                         std::string parentID = readString(_file);
                         
                         if (!parentID.empty())
-                            nodeID = parentID;
+                            nodeId = parentID;
                         else
                             break;
                     }
 
-                    if (nodeID != rootJoint->getId())
-                        loadedNodes.push_back(loadNode(nodeID.c_str(), sceneContext, nodeContext));
+                    if (nodeId != rootJoint->getId())
+                        loadedNodes.push_back(loadNode(nodeId.c_str(), sceneContext, nodeContext));
 
                     break;
                 }

+ 2 - 2
gameplay/src/Container.cpp

@@ -222,7 +222,7 @@ void Container::removeControl(const char* id)
     for (it = _controls.begin(); it < _controls.end(); it++)
     {
         Control* c = *it;
-        if (strcmp(id, c->getID()) == 0)
+        if (strcmp(id, c->getId()) == 0)
         {
             _controls.erase(it);
             return;
@@ -258,7 +258,7 @@ Control* Container::getControl(const char* id) const
     {
         Control* c = *it;
         GP_ASSERT(c);
-        if (strcmp(id, c->getID()) == 0)
+        if (strcmp(id, c->getId()) == 0)
         {
             return c;
         }

+ 1 - 1
gameplay/src/Control.cpp

@@ -134,7 +134,7 @@ void initialize(const char* id, Theme::Style* style, const Vector2& position, co
 
 }
 
-const char* Control::getID() const
+const char* Control::getId() const
 {
     return _id.c_str();
 }

+ 1 - 1
gameplay/src/Control.h

@@ -187,7 +187,7 @@ public:
      *
      * @return This control's ID.
      */
-    const char* getID() const;
+    const char* getId() const;
 
     /**
      * Set the position of this control relative to its parent container.

+ 2 - 2
gameplay/src/DepthStencilTarget.cpp

@@ -46,7 +46,7 @@ DepthStencilTarget* DepthStencilTarget::getDepthStencilTarget(const char* id)
     {
         DepthStencilTarget* dst = *it;
         GP_ASSERT(dst);
-        if (strcmp(id, dst->getID()) == 0)
+        if (strcmp(id, dst->getId()) == 0)
         {
             return dst;
         }
@@ -54,7 +54,7 @@ DepthStencilTarget* DepthStencilTarget::getDepthStencilTarget(const char* id)
     return NULL;
 }
 
-const char* DepthStencilTarget::getID() const
+const char* DepthStencilTarget::getId() const
 {
     return _id.c_str();
 }

+ 1 - 1
gameplay/src/DepthStencilTarget.h

@@ -62,7 +62,7 @@ public:
      *
      * @return The ID of this DepthStencilTarget.
      */
-    const char* getID() const;
+    const char* getId() const;
 
     /**
      * Returns the format of the DepthStencilTarget.

+ 3 - 3
gameplay/src/Form.cpp

@@ -200,7 +200,7 @@ Form* Form::create(const char* url)
     // Add all the controls to the form.
     form->addControls(theme, formProperties);
 
-    form->update();
+    form->update(0.0f);
 
     SAFE_DELETE(properties);
 
@@ -216,7 +216,7 @@ Form* Form::getForm(const char* id)
     {
         Form* f = *it;
         GP_ASSERT(f);
-        if (strcmp(id, f->getID()) == 0)
+        if (strcmp(id, f->getId()) == 0)
         {
             return f;
         }
@@ -394,7 +394,7 @@ void Form::setNode(Node* node)
     _node = node;
 }
 
-void Form::update()
+void Form::update(float elapsedTime)
 {
     if (isDirty())
     {

+ 1 - 1
gameplay/src/Form.h

@@ -130,7 +130,7 @@ public:
     /**
      * Updates each control within this form, and positions them according to its layout.
      */
-    void update();
+    void update(float elapsedTime);
 
     /**
      * Draws this form.

+ 2 - 2
gameplay/src/FrameBuffer.cpp

@@ -106,7 +106,7 @@ FrameBuffer* FrameBuffer::getFrameBuffer(const char* id)
     {
         FrameBuffer* fb = *it;
         GP_ASSERT(fb);
-        if (strcmp(id, fb->getID()) == 0)
+        if (strcmp(id, fb->getId()) == 0)
         {
             return fb;
         }
@@ -114,7 +114,7 @@ FrameBuffer* FrameBuffer::getFrameBuffer(const char* id)
     return NULL;
 }
 
-const char* FrameBuffer::getID() const
+const char* FrameBuffer::getId() const
 {
     return _id.c_str();
 }

+ 1 - 1
gameplay/src/FrameBuffer.h

@@ -50,7 +50,7 @@ public:
      *
      * @return The ID of this FrameBuffer.
      */
-    const char* getID() const;
+    const char* getId() const;
 
     /**
      * Gets the width of the frame buffer.

+ 2 - 2
gameplay/src/Gamepad.cpp

@@ -71,11 +71,11 @@ const char* Gamepad::getId() const
     return _id.c_str();
 }
 
-void Gamepad::update()
+void Gamepad::update(float elapsedTime)
 {
     if (_gamepadForm && _gamepadForm->isEnabled())
     {
-        _gamepadForm->update();
+        _gamepadForm->update(elapsedTime);
     }
 }
 

+ 1 - 1
gameplay/src/Gamepad.h

@@ -101,7 +101,7 @@ public:
     /**
      * Updates the gamepad.
      */
-    void update();
+    void update(float elapsedTime);
 
     /**
      * Draws the gamepad if it is based on a form and if the form is enabled.

+ 2 - 2
gameplay/src/RenderTarget.cpp

@@ -51,7 +51,7 @@ RenderTarget* RenderTarget::getRenderTarget(const char* id)
     {
         RenderTarget* dst = *it;
         GP_ASSERT(dst);
-        if (strcmp(id, dst->getID()) == 0)
+        if (strcmp(id, dst->getId()) == 0)
         {
             return dst;
         }
@@ -60,7 +60,7 @@ RenderTarget* RenderTarget::getRenderTarget(const char* id)
     return NULL;
 }
 
-const char* RenderTarget::getID() const
+const char* RenderTarget::getId() const
 {
     return _id.c_str();
 }

+ 1 - 1
gameplay/src/RenderTarget.h

@@ -42,7 +42,7 @@ public:
      *
      * @return The ID of this RenderTarget.
      */
-    const char* getID() const;
+    const char* getId() const;
 
     /**
      * Get the backing texture of this RenderTarget.