gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] /srv/bzr/gnash/trunk r10771: Remove unused functions.


From: Benjamin Wolsey
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r10771: Remove unused functions.
Date: Sun, 05 Apr 2009 12:10:39 +0200
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 10771
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Sun 2009-04-05 12:10:39 +0200
message:
  Remove unused functions.
modified:
  libcore/Button.cpp
  libcore/Button.h
  libcore/DisplayObject.h
  libcore/MovieClip.cpp
  libcore/MovieClip.h
    ------------------------------------------------------------
    revno: 10770.1.1
    committer: Benjamin Wolsey <address@hidden>
    branch nick: temp
    timestamp: Sun 2009-04-05 09:43:04 +0200
    message:
      Remove unused functions from the inheritance chain.
    modified:
      libcore/Button.cpp
      libcore/Button.h
      libcore/DisplayObject.h
      libcore/MovieClip.cpp
      libcore/MovieClip.h
    ------------------------------------------------------------
    revno: 10770.1.2
    committer: Benjamin Wolsey <address@hidden>
    branch nick: temp
    timestamp: Sun 2009-04-05 09:47:59 +0200
    message:
      Indentation.
    modified:
      libcore/MovieClip.h
    ------------------------------------------------------------
    revno: 10770.1.3
    committer: Benjamin Wolsey <address@hidden>
    branch nick: temp
    timestamp: Sun 2009-04-05 10:55:10 +0200
    message:
      Make some Button members private.
    modified:
      libcore/Button.h
=== modified file 'libcore/Button.cpp'
--- a/libcore/Button.cpp        2009-04-04 15:35:18 +0000
+++ b/libcore/Button.cpp        2009-04-05 07:43:04 +0000
@@ -365,12 +365,6 @@
 
 
 void
-Button::restart()
-{
-    log_error("Button::restart called, from whom??");
-}
-
-void
 Button::display()
 {
 

=== modified file 'libcore/Button.h'
--- a/libcore/Button.h  2009-04-04 15:35:18 +0000
+++ b/libcore/Button.h  2009-04-05 08:55:10 +0000
@@ -61,7 +61,6 @@
                OVER_UP = FLAG_OVER,
                OUT_DOWN = FLAG_DOWN
        };
-       int     m_last_mouse_flags, m_mouse_flags;
 
        enum MouseState
        {
@@ -71,13 +70,11 @@
                HIT
        };
 
-       static const char* mouseStateName(MouseState s);
-
-       MouseState m_mouse_state;
-
        Button(SWF::DefineButtonTag& def, DisplayObject* parent, int id);
 
        ~Button();
+       
+    static const char* mouseStateName(MouseState s);
 
     /// Initialize the global Button class
     static void init(as_object& global);
@@ -91,8 +88,6 @@
        // called from keypress listener only
        bool on_event(const event_id& id);
 
-       void restart();
-
        void display();
        
        void set_current_state(MouseState new_state);
@@ -166,6 +161,10 @@
 
 private:
 
+       int     m_last_mouse_flags, m_mouse_flags;
+
+       MouseState m_mouse_state;
+    
     SWF::DefineButtonTag& _def;
 
        DisplayObjects _stateCharacters;

=== modified file 'libcore/DisplayObject.h'
--- a/libcore/DisplayObject.h   2009-04-04 15:35:18 +0000
+++ b/libcore/DisplayObject.h   2009-04-05 07:43:04 +0000
@@ -513,16 +513,6 @@
         return getPathElementSeparator(key);
     }
 
-    /// Restart the DisplayObject
-    //
-    /// This is only meaningful for sprite instances, but default
-    /// it's a no-op.
-    ///
-    /// It is needed by Button
-    /// TODO: have Button cast to_movie()
-    ///             and drop this one
-    virtual void restart() { }
-
     /// Advance this DisplayObject to next frame.
     //
     /// Character advancement is only meaningful for sprites
@@ -533,7 +523,6 @@
     /// 
     virtual void advance()
     {
-        // GNASH_REPORT_FUNCTION 
     }
 
     /// \brief

=== modified file 'libcore/MovieClip.cpp'
--- a/libcore/MovieClip.cpp     2009-04-04 15:35:18 +0000
+++ b/libcore/MovieClip.cpp     2009-04-05 07:43:04 +0000
@@ -1971,23 +1971,6 @@
 
     return false;
 }
-        
-void MovieClip::restart()
-{
-// see Whack-a-doc.swf, we tried to restart an unloaded DisplayObject.
-// It shouldn't happen anyway.
-// TODO: drop this function.
-
-    // Stop any streaming sound associated with us
-    stopStreamSound();
-
-    if( ! isUnloaded() )
-    {
-        restoreDisplayList(0); 
-    }
-
-    m_play_state = PLAY;
-}
 
 DisplayObject*
 MovieClip::getDisplayObject(int /* DisplayObject_id */)

=== modified file 'libcore/MovieClip.h'
--- a/libcore/MovieClip.h       2009-04-04 15:35:18 +0000
+++ b/libcore/MovieClip.h       2009-04-05 07:47:59 +0000
@@ -224,15 +224,8 @@
     // delegates to movie_root (possibly wrong)
     virtual float get_background_alpha() const;
 
-    // delegates to movie_root 
-    //virtual void get_mouse_state(int& x, int& y, int& buttons);
-
     // delegates to movie_root (possibly wrong)
-    void    set_background_color(const rgba& color);
-
-    //float get_timer() const;
-
-    void restart();
+    void set_background_color(const rgba& color);
 
     bool has_looped() const
     {
@@ -273,8 +266,6 @@
 
     virtual void advance();
 
-    void advance_sprite();
-
     /// Set the sprite state at the specified frame number.
     //
     /// 0-based frame numbers!! 
@@ -328,10 +319,9 @@
 
     /// Look up the labeled frame, and jump to it.
     bool goto_labeled_frame(const std::string& label);
-
         
     /// Display (render?) this Sprite/MovieClip, unless invisible
-    void    display();
+    void display();
     
     void omit_display();
 
@@ -361,7 +351,8 @@
     /// and places it on the stage at the given depth.
     ///
     /// If the specified depth is already occupied, it results a no-ops.
-    /// Otherwise, a new DisplayObject will be created and onload handler will 
be triggerred.
+    /// Otherwise, a new DisplayObject will be created and onload handler
+    /// will be triggerred.
     ///
     /// @param tag
     ///     A swf defined placement tag (PlaceObject, or PlaceObject2,
@@ -408,9 +399,8 @@
     /// if false, the transformation SWFMatrix of the new DisplayObject will
     /// be untouched.
     ///
-    void replace_display_object(DisplayObject* ch,  int depth,
-        bool use_old_cxform,
-        bool use_old_matrix);
+    void replace_display_object(DisplayObject* ch, int depth,
+        bool use_old_cxform, bool use_old_matrix);
 
 
     /// \brief
@@ -984,6 +974,11 @@
 
 protected:
 
+    /// Used both by this class and movie_instance.
+    //
+    /// TODO: do this with proper Sprite -> MovieClip inheritance.
+    void advance_sprite();
+
     void placeDisplayObject(DisplayObject* ch, int depth)  
     {       
         m_display_list.placeDisplayObject(ch, depth);  


reply via email to

[Prev in Thread] Current Thread [Next in Thread]