Преглед на файлове

Update Visual Studio project and filter files to have correct assets.
Change ParticleEmitter to throw and error instead on missing required texture now instead of falling back to a default particle texture.

setaylor преди 13 години
родител
ревизия
daf856a3c3
променени са 2 файла, в които са добавени 5 реда и са изтрити 4 реда
  1. 2 0
      gameplay-template/template.bar-descriptor.xml
  2. 3 4
      gameplay/src/ParticleEmitter.cpp

+ 2 - 0
gameplay-template/template.bar-descriptor.xml

@@ -39,6 +39,8 @@
 
     <!--  Unique author ID assigned by signing authority. Required if using debug tokens. -->
     <!-- <authorId>gYAAgPkLP1tZlyYP1wiMaRFFNMw</authorId> -->
+    
+    <platformVersion>2.0.0.7971</platformVersion>
 
     <initialWindow>
         <aspectRatio>landscape</aspectRatio>

+ 3 - 4
gameplay/src/ParticleEmitter.cpp

@@ -50,12 +50,11 @@ ParticleEmitter* ParticleEmitter::create(const char* textureFile, TextureBlendin
     Texture* texture = NULL;
     texture = Texture::create(textureFile, true);    
 
-    if (!texture)
+	if (!texture)
     {
-        // Use default texture.
-        texture = Texture::create("res/particle-default.png", true);
+        LOG_ERROR_VARG("Error creating ParticleEmitter: Could not read texture file: %s", textureFile);
+        return NULL;
     }
-    assert(texture);
 
     // Use default SpriteBatch material.
     SpriteBatch* batch =  SpriteBatch::create(texture, NULL, particleCountMax);