Przeglądaj źródła

Merge branch 'next' of https://github.com/blackberry-gaming/GamePlay into next-sgrenier

Steve Grenier 13 lat temu
rodzic
commit
014c4f3463

+ 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])

+ 2 - 2
gameplay-template/gameplay-template.vcxproj

@@ -169,8 +169,8 @@
     <None Include="res\box.dae" />
     <None Include="res\box.gpb" />
     <None Include="res\box.material" />
-    <None Include="res\colored.fsh" />
-    <None Include="res\colored.vsh" />
+    <None Include="res\colored.frag" />
+    <None Include="res\colored.vert" />
   </ItemGroup> 
   <ItemGroup>
     <ClCompile Include="src\TemplateGame.cpp" />

+ 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;

+ 17 - 4
gameplay/src/Font.cpp

@@ -751,12 +751,19 @@ void Font::measureText(const char* text, unsigned int size, unsigned int* width,
     GP_ASSERT(width);
     GP_ASSERT(height);
 
-    float scale = (float)size / _size;
     const int length = strlen(text);
+    if (length == 0)
+    {
+        *width = 0;
+        *height = 0;
+        return;
+    }
+
+    float scale = (float)size / _size;
     const char* token = text;
 
     *width = 0;
-    *height = 0;
+    *height = size;
 
     // Measure a line at a time.
     while (token[0] != 0)
@@ -784,6 +791,12 @@ void Font::measureText(const char* text, const Rectangle& clip, unsigned int siz
     GP_ASSERT(text);
     GP_ASSERT(out);
 
+    if (strlen(text) == 0)
+    {
+        out->set(0, 0, 0, 0);
+        return;
+    }
+
     float scale = (float)size / _size;
     Justify vAlign = static_cast<Justify>(justify & 0xF0);
     if (vAlign == 0)
@@ -802,8 +815,8 @@ void Font::measureText(const char* text, const Rectangle& clip, unsigned int siz
     std::vector<Vector2> lines;
 
     unsigned int lineWidth = 0;
-    int yPos = clip.y;
-    const float viewportHeight = clip.height - size;
+    int yPos = clip.y + size;
+    const float viewportHeight = clip.height;
 
     if (wrap)
     {

+ 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);

+ 58 - 60
gameplay/src/Game.cpp

@@ -5,7 +5,6 @@
 #include "FileSystem.h"
 #include "FrameBuffer.h"
 
-// Extern global variables
 GLenum __gl_error_code = GL_NO_ERROR;
 ALenum __al_error_code = AL_NO_ERROR;
 
@@ -130,7 +129,7 @@ bool Game::startup()
     _physicsController = new PhysicsController();
     _physicsController->initialize();
 
-    loadGamepad();
+    loadGamepads();
     
     _state = RUNNING;
 
@@ -181,7 +180,6 @@ void Game::pause()
         GP_ASSERT(_animationController);
         GP_ASSERT(_audioController);
         GP_ASSERT(_physicsController);
-
         _state = PAUSED;
         _pausedTimeLast = Platform::getAbsoluteTime();
         _animationController->pause();
@@ -197,7 +195,6 @@ void Game::resume()
         GP_ASSERT(_animationController);
         GP_ASSERT(_audioController);
         GP_ASSERT(_physicsController);
-
         _state = RUNNING;
         _pausedTimeTotal += Platform::getAbsoluteTime() - _pausedTimeLast;
         _animationController->resume();
@@ -268,6 +265,24 @@ void Game::frame()
     }
 }
 
+void Game::updateOnce()
+{
+    GP_ASSERT(_animationController);
+    GP_ASSERT(_audioController);
+    GP_ASSERT(_physicsController);
+
+    // Update Time.
+    static double lastFrameTime = getGameTime();
+    double frameTime = getGameTime();
+    float elapsedTime = (frameTime - lastFrameTime);
+    lastFrameTime = frameTime;
+
+    // Update the internal controllers.
+    _animationController->update(elapsedTime);
+    _physicsController->update(elapsedTime);
+    _audioController->update(elapsedTime);
+}
+
 void Game::setViewport(const Rectangle& viewport)
 {
     _viewport = viewport;
@@ -326,7 +341,7 @@ AudioListener* Game::getAudioListener()
     return _audioListener;
 }
 
-void Game::menu()
+void Game::menuEvent()
 {
 }
 
@@ -338,6 +353,11 @@ void Game::touchEvent(Touch::TouchEvent evt, int x, int y, unsigned int contactI
 {
 }
 
+bool Game::mouseEvent(Mouse::MouseEvent evt, int x, int y, int wheelDelta)
+{
+    return false;
+}
+
 void Game::gamepadEvent(Gamepad::GamepadEvent evt, Gamepad* gamepad)
 {
 }
@@ -349,27 +369,32 @@ void Game::schedule(float timeOffset, TimeListener* timeListener, void* cookie)
     _timeEvents->push(timeEvent);
 }
 
-bool Game::mouseEvent(Mouse::MouseEvent evt, int x, int y, int wheelDelta)
+void Game::fireTimeEvents(double frameTime)
 {
-    return false;
+    while (_timeEvents->size() > 0)
+    {
+        const TimeEvent* timeEvent = &_timeEvents->top();
+        if (timeEvent->time > frameTime)
+        {
+            break;
+        }
+        if (timeEvent->listener)
+        {
+            timeEvent->listener->timeEvent(frameTime - timeEvent->time, timeEvent->cookie);
+        }
+        _timeEvents->pop();
+    }
 }
 
-void Game::updateOnce()
+Game::TimeEvent::TimeEvent(double time, TimeListener* timeListener, void* cookie)
+    : time(time), listener(timeListener), cookie(cookie)
 {
-    GP_ASSERT(_animationController);
-    GP_ASSERT(_audioController);
-    GP_ASSERT(_physicsController);
-
-    // Update Time.
-    static double lastFrameTime = getGameTime();
-    double frameTime = getGameTime();
-    float elapsedTime = (frameTime - lastFrameTime);
-    lastFrameTime = frameTime;
+}
 
-    // Update the internal controllers.
-    _animationController->update(elapsedTime);
-    _physicsController->update(elapsedTime);
-    _audioController->update(elapsedTime);
+bool Game::TimeEvent::operator<(const TimeEvent& v) const
+{
+    // The first element of std::priority_queue is the greatest.
+    return time > v.time;
 }
 
 Properties* Game::getConfig() const
@@ -392,65 +417,38 @@ void Game::loadConfig()
             // Load filesystem aliases.
             Properties* aliases = _properties->getNamespace("aliases", true);
             if (aliases)
+            {
                 FileSystem::loadResourceAliases(aliases);
+            }
         }
     }
 }
 
-void Game::fireTimeEvents(double frameTime)
+void Game::loadGamepads()
 {
-    while (_timeEvents->size() > 0)
+    if (_properties)
     {
-        const TimeEvent* timeEvent = &_timeEvents->top();
-        if (timeEvent->time > frameTime)
+        // Check if there is a virtual keyboard included in the .config file.
+        // If there is, try to create it and assign it to "player one".
+        Properties* gamepadProperties = _properties->getNamespace("gamepads", true);
+        if (gamepadProperties && gamepadProperties->exists("form"))
         {
-            break;
+            const char* gamepadFormPath = gamepadProperties->getString("form");
+            GP_ASSERT(gamepadFormPath);
+            Gamepad* gamepad = createGamepad(gamepadProperties->getId(), gamepadFormPath);
+            GP_ASSERT(gamepad);
         }
-        if (timeEvent->listener)
-            timeEvent->listener->timeEvent(frameTime - timeEvent->time, timeEvent->cookie);
-        _timeEvents->pop();
     }
 }
 
-Game::TimeEvent::TimeEvent(double time, TimeListener* timeListener, void* cookie)
-            : time(time), listener(timeListener), cookie(cookie)
-{
-}
-
-bool Game::TimeEvent::operator<(const TimeEvent& v) const
-{
-    // The first element of std::priority_queue is the greatest.
-    return time > v.time;
-}
-
 Gamepad* Game::createGamepad(const char* gamepadId, const char* gamepadFormPath)
 {
     GP_ASSERT(gamepadFormPath);
-
     Gamepad* gamepad = new Gamepad(gamepadId, gamepadFormPath);
     GP_ASSERT(gamepad);
-
     _gamepads.push_back(gamepad);
 
     return gamepad;
 }
 
-void Game::loadGamepad()
-{
-    if (_properties)
-    {
-        // Check if there is a virtual keyboard included in the .config file.
-        // If there is, try to create it and assign it to "player one".
-        Properties* gamepadProperties = _properties->getNamespace("gamepads", true);
-        if (gamepadProperties && gamepadProperties->exists("form"))
-        {
-            const char* gamepadFormPath = gamepadProperties->getString("form");
-            GP_ASSERT(gamepadFormPath);
-
-            Gamepad* gamepad = createGamepad(gamepadProperties->getId(), gamepadFormPath);
-            GP_ASSERT(gamepad);
-        }
-    }
-}
-
 }

+ 25 - 36
gameplay/src/Game.h

@@ -23,7 +23,6 @@ namespace gameplay
  */
 class Game
 {
-
 public:
     
     /**
@@ -273,9 +272,9 @@ public:
     AudioListener* getAudioListener();
 
     /**
-     * Menu callback on menu events.
+     * Menu callback on menu events for platforms with special menu keys or gestures.
      */
-    virtual void menu();
+    virtual void menuEvent();
     
     /**
      * Shows or hides the virtual keyboard (if supported).
@@ -331,6 +330,20 @@ public:
      */
     virtual void gamepadEvent(Gamepad::GamepadEvent evt, Gamepad* gamepad);
 
+    /**
+     * Gets the number of gamepad's connected to the game.
+     * 
+     * @return The number of gamepad's connected to the game.
+     */
+    inline unsigned int getGamepadCount() const;
+
+    /**
+     * Gets the gamepad at the specified index.
+     *
+     * @param index The index to get the gamepad for: 0 <= index <= Game::getGamepadCount()
+     */
+    inline Gamepad* getGamepad(unsigned int index) const;
+
     /**
      * Sets muli-touch is to be enabled/disabled. Default is disabled.
      *
@@ -362,20 +375,6 @@ public:
      * @param cookie The cookie data that the time event will contain.
      */
     void schedule(float timeOffset, TimeListener* timeListener, void* cookie = 0);
-    
-    /**
-     * Gets the number of gamepad's connected to the game.
-     * 
-     * @return The number of gamepad's connected to the game.
-     */
-    inline unsigned int getGamepadCount() const;
-
-    /**
-     * Gets the gamepad at the specified index.
-     *
-     * @param index The index to get the gamepad for (0 <= index <= Game::getGamepadCount) 
-     */
-    inline Gamepad* getGamepad(unsigned int index = 0) const;
 
 protected:
 
@@ -434,21 +433,14 @@ protected:
 private:
 
     /**
-     * TimeEvent represents the event that is sent to TimeListeners as a result of 
-     * calling Game::schedule().
+     * TimeEvent represents the event that is sent to TimeListeners as a result of calling Game::schedule().
      */
     class TimeEvent
     {
     public:
 
         TimeEvent(double time, TimeListener* timeListener, void* cookie);
-        // The comparator is used to determine the order of time events in the priority queue.
         bool operator<(const TimeEvent& v) const;
-        
-        /**
-         * The game time.
-         * @see Game::getGameTime()
-         */
         double time;
         TimeListener* listener;
         void* cookie;
@@ -462,7 +454,7 @@ private:
     Game(const Game& copy);
 
     /**
-     * Starts core game.
+     * Starts the game.
      */
     bool startup();
 
@@ -483,19 +475,16 @@ private:
      */
     void loadConfig();
 
+    /**
+     * Loads the gamepads from the configuration file.
+     */
+    void loadGamepads();
+
     /** 
      * Creates a Gamepad object from a .form file.
-     *
-     * @param playerIndex
-     * @param formPath
      */
     Gamepad* createGamepad(const char* gamepadId, const char* gamepadFormPath);
 
-    /**
-     * Loads a gamepad from the configuration file.
-     */
-    void loadGamepad();
-
     bool _initialized;                          // If game has initialized yet.
     State _state;                               // The game state.
     static double _pausedTimeLast;              // The last time paused.
@@ -514,8 +503,8 @@ private:
     AudioController* _audioController;          // Controls audio sources that are playing in the game.
     PhysicsController* _physicsController;      // Controls the simulation of a physics scene and entities.
     AudioListener* _audioListener;              // The audio listener in 3D space.
-    std::vector<Gamepad*> _gamepads;
-    std::priority_queue<TimeEvent, std::vector<TimeEvent>, std::less<TimeEvent> >* _timeEvents; // Contains the scheduled time events.
+    std::vector<Gamepad*> _gamepads;            // The connected gamepads.
+    std::priority_queue<TimeEvent, std::vector<TimeEvent>, std::less<TimeEvent> >* _timeEvents;     // Contains the scheduled time events.
 
     // Note: Do not add STL object member variables on the stack; this will cause false memory leaks to be reported.
 

+ 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&);
 

+ 6 - 4
gameplay/src/Joystick.cpp

@@ -112,7 +112,7 @@ bool Joystick::touchEvent(Touch::TouchEvent touchEvent, int x, int y, unsigned i
                 {
                     _value.set(value);
                     _dirty = true;
-                    notifyListeners(Control::Listener::VALUE_CHANGED);
+                    notifyListeners(Listener::VALUE_CHANGED);
                 }
 
                 _state = ACTIVE;
@@ -138,7 +138,7 @@ bool Joystick::touchEvent(Touch::TouchEvent touchEvent, int x, int y, unsigned i
                 {
                     _value.set(value);
                     _dirty = true;
-                    notifyListeners(Control::Listener::VALUE_CHANGED);
+                    notifyListeners(Listener::VALUE_CHANGED);
                 }
             }
             else
@@ -151,7 +151,7 @@ bool Joystick::touchEvent(Touch::TouchEvent touchEvent, int x, int y, unsigned i
                 {
                     _value.set(value);
                     _dirty = true;
-                    notifyListeners(Control::Listener::VALUE_CHANGED);
+                    notifyListeners(Listener::VALUE_CHANGED);
                 }
             }
 
@@ -163,6 +163,8 @@ bool Joystick::touchEvent(Touch::TouchEvent touchEvent, int x, int y, unsigned i
         {
             _contactIndex = INVALID_CONTACT_INDEX;
 
+            notifyListeners(Listener::RELEASE);
+
             // Reset displacement and direction vectors.
             _displacement.set(0.0f, 0.0f);
 
@@ -171,7 +173,7 @@ bool Joystick::touchEvent(Touch::TouchEvent touchEvent, int x, int y, unsigned i
             {
                 _value.set(value);
                 _dirty = true;
-                notifyListeners(Control::Listener::VALUE_CHANGED);
+                notifyListeners(Listener::VALUE_CHANGED);
             }
 
             _state = NORMAL;

+ 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&);
 

+ 14 - 1
gameplay/src/Model.cpp

@@ -393,9 +393,22 @@ Model* Model::clone(NodeCloneContext &context)
             GP_ERROR("Failed to clone material for model.");
             return model;
         }
-        model->setMaterial(materialClone); // TODO: Don't forget material parts
+        model->setMaterial(materialClone);
         materialClone->release();
     }
+    if (_partMaterials)
+    {
+        GP_ASSERT(_partCount == model->_partCount);
+        for (unsigned int i = 0; i < _partCount; ++i)
+        {
+            if (_partMaterials[i])
+            {
+                Material* materialClone = _partMaterials[i]->clone(context);
+                model->setMaterial(materialClone, i);
+                materialClone->release();
+            }
+        }
+    }
     return model;
 }
 

+ 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.
      * 

+ 2 - 3
gameplay/src/ParticleEmitter.cpp

@@ -262,7 +262,7 @@ bool ParticleEmitter::isActive() const
     return active;
 }
 
-void ParticleEmitter::emit(unsigned int particleCount)
+void ParticleEmitter::emitOnce(unsigned int particleCount)
 {
     GP_ASSERT(_node);
     GP_ASSERT(_particles);
@@ -810,8 +810,7 @@ void ParticleEmitter::update(float elapsedTime)
             {
                 _timeRunning = fmodl(_timeRunning, _timePerEmission);
             }
-
-            emit(emitCount);
+            emitOnce(emitCount);
         }
     }
 

+ 6 - 1
gameplay/src/ParticleEmitter.h

@@ -235,7 +235,7 @@ public:
      *
      * @param particleCount The number of particles to emit immediately.
      */
-    void emit(unsigned int particleCount);
+    void emitOnce(unsigned int particleCount);
 
     /**
      * Gets the current number of particles.
@@ -637,6 +637,11 @@ private:
      */
     ~ParticleEmitter();
 
+    /**
+     * Hidden copy assignment operator.
+     */
+    ParticleEmitter& operator=(const ParticleEmitter&);
+
     /**
      * Sets the node that this emitter is attached to.
      */

+ 1 - 1
gameplay/src/PlatformQNX.cpp

@@ -957,7 +957,7 @@ int Platform::enterMessagePump()
                 switch (bps_event_get_code(event))
                 {
                 case NAVIGATOR_SWIPE_DOWN:
-                    _game->menu();
+                    _game->menuEvent();
                     break;
                 case NAVIGATOR_WINDOW_STATE:
                 {

+ 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);