2
0
Эх сурвалжийг харах

Merge pull request #514 from blackberry-gaming/next-dgough

Next dgough
Sean Paul Taylor 13 жил өмнө
parent
commit
0c202818f5

+ 2 - 2
gameplay-encoder/src/EncoderArguments.cpp

@@ -181,7 +181,7 @@ void EncoderArguments::printUsage() const
     fprintf(stderr,"  -t\t\t\tWrite text/xml.\n");
     fprintf(stderr,"  -g <node id> <animation id>\n" \
         "\t\t\tGroup all animation channels targetting the nodes into a new animation.\n");
-    fprintf(stderr,"  -heightmaps \"<node ids>\"\n" \
+    fprintf(stderr,"  -h \"<node ids>\"\n" \
         "\t\t\tList of nodes to generate heightmaps for.\n" \
         "\t\t\tNode id list should be in quotes with a space between each id.\n" \
         "\t\t\tHeightmaps will be saved in files named <nodeid>.png.\n");
@@ -313,7 +313,7 @@ void EncoderArguments::readOption(const std::vector<std::string>& options, size_
         break;
     case 'h':
         {
-            if (str.compare("-heightmaps") == 0)
+            if (str.compare("-heightmaps") == 0 || str.compare("-h") == 0)
             {
                 (*index)++;
                 if (*index < options.size())

+ 2 - 1
gameplay-encoder/src/GPBDecoder.cpp

@@ -40,9 +40,10 @@ void GPBDecoder::readBinary(const std::string& filepath)
 bool GPBDecoder::validateHeading()
 {
     const size_t HEADING_SIZE = 9;
-    const char identifier[] = { '«', 'G', 'P', 'B', '»', '\r', '\n', '\x1A', '\n' };
+    const char identifier[] = "\xABGPB\xBB\r\n\x1A\n";
 
     char heading[HEADING_SIZE];
+    fread(heading, sizeof(unsigned char), HEADING_SIZE, _file);
     for (size_t i = 0; i < HEADING_SIZE; ++i)
     {
         if (heading[i] != identifier[i])

+ 10 - 0
gameplay/src/AnimationClip.h

@@ -256,6 +256,11 @@ private:
          */
         ~ListenerEvent();
 
+        /**
+         * Hidden copy assignment operator.
+         */
+        ListenerEvent& operator=(const ListenerEvent&);
+
         Listener* _listener;        // This listener to call back when this event is triggered.
         unsigned long _eventTime;   // The time at which the listener will be called back at during the playback of the AnimationClip.
     };
@@ -280,6 +285,11 @@ private:
      */
     ~AnimationClip();
 
+    /**
+     * Hidden copy assignment operator.
+     */
+    AnimationClip& operator=(const AnimationClip&);
+
     /**
      * Updates the animation with the elapsed time.
      */

+ 5 - 0
gameplay/src/AudioBuffer.h

@@ -29,6 +29,11 @@ private:
      */
     virtual ~AudioBuffer();
 
+    /**
+     * Hidden copy assignment operator.
+     */
+    AudioBuffer& operator=(const AudioBuffer&);
+
     /**
      * Creates an audio buffer from a file.
      * 

+ 5 - 0
gameplay/src/AudioSource.h

@@ -158,6 +158,11 @@ private:
      */
     virtual ~AudioSource();
 
+    /**
+     * Hidden copy assignment operator.
+     */
+    AudioSource& operator=(const AudioSource&);
+
     /**
      * Sets the node for this audio source.
      */

+ 5 - 0
gameplay/src/Bundle.h

@@ -151,6 +151,11 @@ private:
      */
     ~Bundle();
 
+    /**
+     * Hidden copy assignment operator.
+     */
+    Bundle& operator=(const Bundle&);
+
     /**
      * Finds a reference by ID.
      */

+ 5 - 0
gameplay/src/Camera.h

@@ -246,6 +246,11 @@ private:
      */
     virtual ~Camera();
 
+    /**
+     * Hidden copy assignment operator.
+     */
+    Camera& operator=(const Camera&);
+
     /**
      * Clones the camera and returns a new camera.
      * 

+ 5 - 0
gameplay/src/Control.h

@@ -755,6 +755,11 @@ protected:
      */
     virtual ~Control();
 
+    /**
+     * Hidden copy assignment operator.
+     */
+    Control& operator=(const Control&);
+
     /**
      * Get the overlay type corresponding to this control's current state.
      *

+ 6 - 1
gameplay/src/Curve.h

@@ -385,6 +385,11 @@ private:
          * Destructor.
          */
         ~Point();
+
+        /**
+         * Hidden copy assignment operator.
+         */
+        Point& operator=(const Point&);
     };
 
     /**
@@ -411,7 +416,7 @@ private:
     ~Curve();
 
     /**
-     * Copy assignment operator.
+     * Hidden copy assignment operator.
      */
     Curve& operator=(const Curve&);
 

+ 5 - 0
gameplay/src/DepthStencilTarget.h

@@ -83,6 +83,11 @@ private:
      */
     ~DepthStencilTarget();
 
+    /**
+     * Hidden copy assignment operator.
+     */
+    DepthStencilTarget& operator=(const DepthStencilTarget&);
+
     std::string _id;
     Format _format;
     RenderBufferHandle _renderBuffer;

+ 10 - 0
gameplay/src/Effect.h

@@ -223,6 +223,11 @@ private:
      */
     ~Effect();
 
+    /**
+     * Hidden copy assignment operator.
+     */
+    Effect& operator=(const Effect&);
+
     static Effect* createFromSource(const char* vshPath, const char* vshSource, const char* fshPath, const char* fshSource, const char* defines = NULL);
 
     GLuint _program;
@@ -279,6 +284,11 @@ private:
      */
     ~Uniform();
 
+    /**
+     * Hidden copy assignment operator.
+     */
+    Uniform& operator=(const Uniform&);
+
     std::string _name;
     GLint _location;
     GLenum _type;

+ 10 - 0
gameplay/src/Font.h

@@ -96,6 +96,11 @@ public:
          */
         ~Text();
 
+        /**
+         * Hidden copy assignment operator.
+         */
+        Text& operator=(const Text&);
+
         /**
          * Get the string that will be drawn from this Text object.
          */
@@ -286,6 +291,11 @@ private:
      */
     ~Font();
 
+    /**
+     * Hidden copy assignment operator.
+     */
+    Font& operator=(const Font&);
+
     void getMeasurementInfo(const char* text, const Rectangle& area, unsigned int size, Justify justify, bool wrap, bool rightToLeft,
                             std::vector<int>* xPositions, int* yPosition, std::vector<unsigned int>* lineLengths);
 

+ 5 - 0
gameplay/src/FrameBuffer.h

@@ -127,6 +127,11 @@ private:
      */
     ~FrameBuffer();
 
+    /**
+     * Hidden copy assignment operator.
+     */
+    FrameBuffer& operator=(const FrameBuffer&);
+
     static void initialize();
 
     static bool isPowerOfTwo(unsigned int value);

+ 5 - 0
gameplay/src/Image.h

@@ -70,6 +70,11 @@ private:
      */
     ~Image();
 
+    /**
+     * Hidden copy assignment operator.
+     */
+    Image& operator=(const Image&);
+
     unsigned char* _data;
     Format _format;
     unsigned int _height;

+ 1 - 1
gameplay/src/Joint.h

@@ -91,7 +91,7 @@ private:
     Joint(const Joint& copy);
 
     /**
-     * Copy assignment operator.
+     * Hidden copy assignment operator.
      */
     Joint& operator=(const Joint&);
 

+ 5 - 0
gameplay/src/Light.h

@@ -65,6 +65,11 @@ public:
      */
     virtual ~Light();
 
+    /**
+     * Hidden copy assignment operator.
+     */
+    Light& operator=(const Light&);
+
     /**
      * Returns the light type.
      * 

+ 10 - 0
gameplay/src/MaterialParameter.h

@@ -177,6 +177,11 @@ private:
      * Destructor.
      */
     ~MaterialParameter();
+
+    /**
+     * Hidden copy assignment operator.
+     */
+    MaterialParameter& operator=(const MaterialParameter&);
     
     /**
      * Interface implemented by templated method bindings for simple storage and iteration.
@@ -191,6 +196,11 @@ private:
          * Destructor.
          */
         virtual ~MethodBinding() { }
+
+        /**
+         * Hidden copy assignment operator.
+         */
+        MethodBinding& operator=(const MethodBinding&);
     };
 
     /**

+ 5 - 0
gameplay/src/Mesh.h

@@ -302,6 +302,11 @@ private:
      */
     Mesh(const Mesh& copy);
 
+    /**
+     * Hidden copy assignment operator.
+     */
+    Mesh& operator=(const Mesh&);
+
     std::string _url;
     const VertexFormat _vertexFormat;
     unsigned int _vertexCount;

+ 1 - 1
gameplay/src/MeshSkin.h

@@ -128,7 +128,7 @@ private:
     ~MeshSkin();
     
     /**
-     * Copy assignment operator.
+     * Hidden copy assignment operator.
      */
     MeshSkin& operator=(const MeshSkin&);
 

+ 5 - 0
gameplay/src/Model.h

@@ -157,6 +157,11 @@ private:
      */
     ~Model();
 
+    /**
+     * Hidden copy assignment operator.
+     */
+    Model& operator=(const Model&);
+
     /**
      * Sets the MeshSkin for this model.
      * 

+ 5 - 0
gameplay/src/ParticleEmitter.h

@@ -637,6 +637,11 @@ private:
      */
     ~ParticleEmitter();
 
+    /**
+     * Hidden copy assignment operator.
+     */
+    ParticleEmitter& operator=(const ParticleEmitter&);
+
     /**
      * Sets the node that this emitter is attached to.
      */

+ 5 - 0
gameplay/src/RenderTarget.h

@@ -63,6 +63,11 @@ private:
      */
     ~RenderTarget();
 
+    /**
+     * Hidden copy assignment operator.
+     */
+    RenderTarget& operator=(const RenderTarget&);
+
     std::string _id;
     Texture* _texture;
 };

+ 5 - 0
gameplay/src/Scene.h

@@ -216,6 +216,11 @@ private:
      */
     virtual ~Scene();
 
+    /**
+     * Hidden copy assignment operator.
+     */
+    Scene& operator=(const Scene&);
+
     /**
      * Visits the given node and all of its children recursively.
      */

+ 10 - 0
gameplay/src/Texture.h

@@ -116,6 +116,11 @@ public:
 
         ~Sampler();
 
+        /**
+         * Hidden copy assignment operator.
+         */
+        Sampler& operator=(const Sampler&);
+
         Texture* _texture;
         Wrap _wrapS;
         Wrap _wrapT;
@@ -224,6 +229,11 @@ private:
      */
     virtual ~Texture();
 
+    /**
+     * Hidden copy assignment operator.
+     */
+    Texture& operator=(const Texture&);
+
     static Texture* createCompressedPVRTC(const char* path);
 
     static Texture* createCompressedDDS(const char* path);

+ 15 - 0
gameplay/src/Theme.h

@@ -348,6 +348,11 @@ private:
 
         ~ImageList();
 
+        /**
+         * Hidden copy assignment operator.
+         */
+        ImageList& operator=(const ImageList&);
+
         static ImageList* create(float tw, float th, Properties* properties);
 
         std::string _id;
@@ -407,6 +412,11 @@ private:
         
         ~Skin();
 
+        /**
+         * Hidden copy assignment operator.
+         */
+        Skin& operator=(const Skin&);
+
         static Skin* create(const char* id, float tw, float th, const Rectangle& region, const Theme::Border& border, const Vector4& color);
 
         void setRegion(const Rectangle& region, float tw, float th);
@@ -434,6 +444,11 @@ private:
      */
     ~Theme();
 
+    /**
+     * Hidden copy assignment operator.
+     */
+    Theme& operator=(const Theme&);
+
     void setProjectionMatrix(const Matrix& matrix);
 
     SpriteBatch* getSpriteBatch() const;

+ 10 - 0
gameplay/src/ThemeStyle.h

@@ -69,6 +69,11 @@ private:
             
         ~Overlay();
 
+        /**
+         * Hidden copy assignment operator.
+         */
+        Overlay& operator=(const Overlay&);
+
         static Overlay* create();
 
         OverlayType getType();
@@ -186,6 +191,11 @@ private:
      */
     ~Style();
 
+    /**
+     * Hidden copy assignment operator.
+     */
+    Style& operator=(const Style&);
+
     /**
      * Returns the Id of this Style.
      */

+ 5 - 0
gameplay/src/VertexAttributeBinding.h

@@ -99,6 +99,11 @@ private:
      */
     ~VertexAttributeBinding();
 
+    /**
+     * Hidden copy assignment operator.
+     */
+    VertexAttributeBinding& operator=(const VertexAttributeBinding&);
+
     static VertexAttributeBinding* create(Mesh* mesh, const VertexFormat& vertexFormat, void* vertexPointer, Effect* effect);
 
     void setVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalize, GLsizei stride, void* pointer);