Pārlūkot izejas kodu

Merge pull request #1358 from dgough/next

Fixed spaceship pre-build event
Sean Taylor 12 gadi atpakaļ
vecāks
revīzija
6ce143cf98

+ 1 - 2
gameplay/src/AIStateMachine.cpp

@@ -71,10 +71,9 @@ AIState* AIStateMachine::getState(const char* id) const
 {
     GP_ASSERT(id);
 
-    AIState* state;
     for (std::list<AIState*>::const_iterator itr = _states.begin(); itr != _states.end(); ++itr)
     {
-        state = (*itr);
+        AIState* state = (*itr);
 
         if (strcmp(id, state->getId()) == 0)
             return state;

+ 1 - 2
gameplay/src/Animation.cpp

@@ -298,11 +298,10 @@ AnimationClip* Animation::findClip(const char* id) const
 {
     if (_clips)
     {
-        AnimationClip* clip = NULL;
         size_t clipCount = _clips->size();
         for (size_t i = 0; i < clipCount; i++)
         {
-            clip = _clips->at(i);
+            AnimationClip* clip = _clips->at(i);
             GP_ASSERT(clip);
             if (clip->_id.compare(id) == 0)
             {

+ 1 - 1
gameplay/src/Joystick.cpp

@@ -4,7 +4,7 @@
 namespace gameplay
 {
 
-Joystick::Joystick() : _radius(1.0f), _relative(true), _innerSize(NULL), _outerSize(NULL)
+Joystick::Joystick() : _radius(1.0f), _relative(true), _innerSize(NULL), _outerSize(NULL), _index(0)
 {
 }
 

+ 2 - 4
gameplay/src/ParticleEmitter.cpp

@@ -685,8 +685,6 @@ void ParticleEmitter::setSpriteFrameCoords(unsigned int frameCount, int width, i
     GP_ASSERT(width);
     GP_ASSERT(height);
 
-    int x;
-    int y;
     Rectangle* frameCoords = new Rectangle[frameCount];
     unsigned int cols = _spriteTextureWidth / width;
     unsigned int rows = _spriteTextureHeight / height;
@@ -694,10 +692,10 @@ void ParticleEmitter::setSpriteFrameCoords(unsigned int frameCount, int width, i
     unsigned int n = 0;
     for (unsigned int i = 0; i < rows; ++i)
     {
-        y = i * height;
+        int y = i * height;
         for (unsigned int j = 0; j < cols; ++j)
         {
-            x = j * width;
+            int x = j * width;
             frameCoords[i*cols + j] = Rectangle(x, y, width, height);
             if (++n == frameCount)
             {

+ 1 - 1
gameplay/src/SceneLoader.cpp

@@ -1230,7 +1230,7 @@ void splitURL(const std::string& url, std::string* file, std::string* id)
 }
 
 SceneLoader::SceneNode::SceneNode()
-    : _nodeID(""), _exactMatch(true)
+    : _nodeID(""), _exactMatch(true), _namespace(NULL)
 {
 }
 

+ 0 - 2
gameplay/src/Slider.cpp

@@ -278,8 +278,6 @@ bool Slider::mouseEvent(Mouse::MouseEvent evt, int x, int y, int wheelDelta)
 
 bool Slider::gamepadEvent(Gamepad::GamepadEvent evt, Gamepad* gamepad, unsigned int analogIndex)
 {
-    bool eventConsumed = false;
-
     switch (evt)
     {
         case Gamepad::JOYSTICK_EVENT:

+ 1 - 1
gameplay/src/TextBox.cpp

@@ -334,7 +334,7 @@ unsigned int TextBox::drawImages(Form* form, const Rectangle& clip)
         const Rectangle& region = _caretImage->getRegion();
         if (!region.isEmpty())
         {
-            const Theme::UVs uvs = _caretImage->getUVs();
+            const Theme::UVs& uvs = _caretImage->getUVs();
             Vector4 color = _caretImage->getColor();
             color.w *= _opacity;
 

+ 3 - 9
samples/character/sample-character.vcxproj

@@ -158,9 +158,7 @@
     <PreBuildEvent>
       <Command>xcopy ..\..\gameplay\res\shaders res\shaders\* /s /y /d
 xcopy ..\..\gameplay\res\ui res\ui\* /s /y /d
-
-copy ..\..\gameplay\res\logo_powered_white.png res
-
+copy ..\..\gameplay\res\logo_powered_white.png res
 copy .\game.dxt.config .\game.config</Command>
     </PreBuildEvent>
   </ItemDefinitionGroup>
@@ -221,9 +219,7 @@ copy .\game.dxt.config .\game.config</Command>
     <PreBuildEvent>
       <Command>xcopy ..\..\gameplay\res\shaders res\shaders\* /s /y /d
 xcopy ..\..\gameplay\res\ui res\ui\* /s /y /d
-
-copy ..\..\gameplay\res\logo_powered_white.png res
-
+copy ..\..\gameplay\res\logo_powered_white.png res
 copy .\game.dxt.config .\game.config</Command>
     </PreBuildEvent>
   </ItemDefinitionGroup>
@@ -285,9 +281,7 @@ copy .\game.dxt.config .\game.config</Command>
     <PreBuildEvent>
       <Command>xcopy ..\..\gameplay\res\shaders res\shaders\* /s /y /d
 xcopy ..\..\gameplay\res\ui res\ui\* /s /y /d
-
-copy ..\..\gameplay\res\logo_powered_white.png res
-
+copy ..\..\gameplay\res\logo_powered_white.png res
 copy .\game.dxt.config .\game.config</Command>
     </PreBuildEvent>
   </ItemDefinitionGroup>

+ 0 - 3
samples/lua/sample-lua.vcxproj

@@ -162,7 +162,6 @@
     <PreBuildEvent>
       <Command>xcopy ..\..\gameplay\res\shaders res\shaders\* /s /y /d
 xcopy ..\..\gameplay\res\ui res\ui\* /s /y /d
-
 copy ..\..\gameplay\res\logo_powered_white.png res</Command>
     </PreBuildEvent>
   </ItemDefinitionGroup>
@@ -222,7 +221,6 @@ copy ..\..\gameplay\res\logo_powered_white.png res</Command>
     <PreBuildEvent>
       <Command>xcopy ..\..\gameplay\res\shaders res\shaders\* /s /y /d
 xcopy ..\..\gameplay\res\ui res\ui\* /s /y /d
-
 copy ..\..\gameplay\res\logo_powered_white.png res</Command>
     </PreBuildEvent>
   </ItemDefinitionGroup>
@@ -284,7 +282,6 @@ copy ..\..\gameplay\res\logo_powered_white.png res</Command>
     <PreBuildEvent>
       <Command>xcopy ..\..\gameplay\res\shaders res\shaders\* /s /y /d
 xcopy ..\..\gameplay\res\ui res\ui\* /s /y /d
-
 copy ..\..\gameplay\res\logo_powered_white.png res</Command>
     </PreBuildEvent>
   </ItemDefinitionGroup>

+ 0 - 3
samples/mesh/sample-mesh.vcxproj

@@ -162,7 +162,6 @@
     <PreBuildEvent>
       <Command>xcopy ..\..\gameplay\res\shaders res\shaders\* /s /y /d
 xcopy ..\..\gameplay\res\ui res\ui\* /s /y /d
-
 copy ..\..\gameplay\res\logo_powered_white.png res</Command>
     </PreBuildEvent>
   </ItemDefinitionGroup>
@@ -222,7 +221,6 @@ copy ..\..\gameplay\res\logo_powered_white.png res</Command>
     <PreBuildEvent>
       <Command>xcopy ..\..\gameplay\res\shaders res\shaders\* /s /y /d
 xcopy ..\..\gameplay\res\ui res\ui\* /s /y /d
-
 copy ..\..\gameplay\res\logo_powered_white.png res</Command>
     </PreBuildEvent>
   </ItemDefinitionGroup>
@@ -284,7 +282,6 @@ copy ..\..\gameplay\res\logo_powered_white.png res</Command>
     <PreBuildEvent>
       <Command>xcopy ..\..\gameplay\res\shaders res\shaders\* /s /y /d
 xcopy ..\..\gameplay\res\ui res\ui\* /s /y /d
-
 copy ..\..\gameplay\res\logo_powered_white.png res</Command>
     </PreBuildEvent>
   </ItemDefinitionGroup>

+ 0 - 3
samples/particles/sample-particles.vcxproj

@@ -211,7 +211,6 @@
     <PreBuildEvent>
       <Command>xcopy ..\..\gameplay\res\shaders res\shaders\* /s /y /d
 xcopy ..\..\gameplay\res\ui res\ui\* /s /y /d
-
 copy ..\..\gameplay\res\logo_powered_white.png res</Command>
     </PreBuildEvent>
   </ItemDefinitionGroup>
@@ -271,7 +270,6 @@ copy ..\..\gameplay\res\logo_powered_white.png res</Command>
     <PreBuildEvent>
       <Command>xcopy ..\..\gameplay\res\shaders res\shaders\* /s /y /d
 xcopy ..\..\gameplay\res\ui res\ui\* /s /y /d
-
 copy ..\..\gameplay\res\logo_powered_white.png res</Command>
     </PreBuildEvent>
   </ItemDefinitionGroup>
@@ -333,7 +331,6 @@ copy ..\..\gameplay\res\logo_powered_white.png res</Command>
     <PreBuildEvent>
       <Command>xcopy ..\..\gameplay\res\shaders res\shaders\* /s /y /d
 xcopy ..\..\gameplay\res\ui res\ui\* /s /y /d
-
 copy ..\..\gameplay\res\logo_powered_white.png res</Command>
     </PreBuildEvent>
   </ItemDefinitionGroup>

+ 3 - 12
samples/racer/sample-racer.vcxproj

@@ -163,12 +163,9 @@
       <Outputs>game.config.dummy</Outputs>
     </CustomBuildStep>
     <PreBuildEvent>
-      <Command>xcopy ..\..\gameplay\res\shaders res\shaders\* /s /y /d
-
+      <Command>xcopy ..\..\gameplay\res\shaders res\shaders\* /s /y /d
 xcopy ..\..\gameplay\res\ui res\ui\* /s /y /d
-
 copy ..\..\gameplay\res\logo_powered_white.png res
-
 copy .\game.dxt.config .\game.config</Command>
     </PreBuildEvent>
   </ItemDefinitionGroup>
@@ -220,12 +217,9 @@ copy .\game.dxt.config .\game.config</Command>
       <Outputs>game.config.dummy</Outputs>
     </CustomBuildStep>
     <PreBuildEvent>
-      <Command>xcopy ..\..\gameplay\res\shaders res\shaders\* /s /y /d
-
+      <Command>xcopy ..\..\gameplay\res\shaders res\shaders\* /s /y /d
 xcopy ..\..\gameplay\res\ui res\ui\* /s /y /d
-
 copy ..\..\gameplay\res\logo_powered_white.png res
-
 copy .\game.dxt.config .\game.config</Command>
     </PreBuildEvent>
   </ItemDefinitionGroup>
@@ -279,12 +273,9 @@ copy .\game.dxt.config .\game.config</Command>
       <Outputs>game.config.dummy</Outputs>
     </CustomBuildStep>
     <PreBuildEvent>
-      <Command>xcopy ..\..\gameplay\res\shaders res\shaders\* /s /y /d
-
+      <Command>xcopy ..\..\gameplay\res\shaders res\shaders\* /s /y /d
 xcopy ..\..\gameplay\res\ui res\ui\* /s /y /d
-
 copy ..\..\gameplay\res\logo_powered_white.png res
-
 copy .\game.dxt.config .\game.config</Command>
     </PreBuildEvent>
   </ItemDefinitionGroup>

+ 8 - 11
samples/spaceship/sample-spaceship.vcxproj

@@ -151,9 +151,8 @@
       </Outputs>
     </CustomBuildStep>
     <PreBuildEvent>
-      <Command>xcopy ..\..\gameplay\res\shaders res\shaders\* /s /y /u
-xcopy ..\..\gameplay\res\ui res\ui\* /s /y /d
-
+      <Command>xcopy ..\..\gameplay\res\shaders res\shaders\* /s /y /d
+      xcopy ..\..\gameplay\res\ui res\ui\* /s /y /d
 copy ..\..\gameplay\res\logo_powered_white.png res</Command>
     </PreBuildEvent>
   </ItemDefinitionGroup>
@@ -216,10 +215,9 @@ copy ..\..\gameplay\res\logo_powered_white.png res</Command>
       </Outputs>
     </CustomBuildStep>
     <PreBuildEvent>
-      <Command>xcopy ..\..\gameplay\res\shaders res\shaders\* /s /y /u
-xcopy ..\..\gameplay\res\ui res\ui\* /s /y /d
-
-copy ..\..\gameplay\res\logo_powered_white.png res</Command>
+      <Command>xcopy ..\..\gameplay\res\shaders res\shaders\* /s /y /d
+      xcopy ..\..\gameplay\res\ui res\ui\* /s /y /d
+      copy ..\..\gameplay\res\logo_powered_white.png res</Command>
     </PreBuildEvent>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugMem|x64'">
@@ -284,10 +282,9 @@ copy ..\..\gameplay\res\logo_powered_white.png res</Command>
       </Outputs>
     </CustomBuildStep>
     <PreBuildEvent>
-      <Command>xcopy ..\..\gameplay\res\shaders res\shaders\* /s /y /u
-xcopy ..\..\gameplay\res\ui res\ui\* /s /y /d
-
-copy ..\..\gameplay\res\logo_powered_white.png res</Command>
+      <Command>xcopy ..\..\gameplay\res\shaders res\shaders\* /s /y /d
+      xcopy ..\..\gameplay\res\ui res\ui\* /s /y /d
+      copy ..\..\gameplay\res\logo_powered_white.png res</Command>
     </PreBuildEvent>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">