gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog server/button_character_instanc...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog server/button_character_instanc...
Date: Mon, 10 Dec 2007 20:17:18 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/12/10 20:17:18

Modified files:
        .              : ChangeLog 
        server         : button_character_instance.cpp 
                         button_character_instance.h character.h 
                         impl.cpp movie_instance.cpp movie_instance.h 
                         movie_root.cpp movie_root.h sprite_instance.cpp 
                         sprite_instance.h video_stream_instance.cpp 
                         video_stream_instance.h 

Log message:
        Drop the delta time argument to character::advance,
        make sprite_instance::advance_sprite non-virtual,
        drop unused cache-related code in impl.cpp

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5119&r2=1.5120
http://cvs.savannah.gnu.org/viewcvs/gnash/server/button_character_instance.cpp?cvsroot=gnash&r1=1.66&r2=1.67
http://cvs.savannah.gnu.org/viewcvs/gnash/server/button_character_instance.h?cvsroot=gnash&r1=1.27&r2=1.28
http://cvs.savannah.gnu.org/viewcvs/gnash/server/character.h?cvsroot=gnash&r1=1.113&r2=1.114
http://cvs.savannah.gnu.org/viewcvs/gnash/server/impl.cpp?cvsroot=gnash&r1=1.129&r2=1.130
http://cvs.savannah.gnu.org/viewcvs/gnash/server/movie_instance.cpp?cvsroot=gnash&r1=1.19&r2=1.20
http://cvs.savannah.gnu.org/viewcvs/gnash/server/movie_instance.h?cvsroot=gnash&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/gnash/server/movie_root.cpp?cvsroot=gnash&r1=1.133&r2=1.134
http://cvs.savannah.gnu.org/viewcvs/gnash/server/movie_root.h?cvsroot=gnash&r1=1.94&r2=1.95
http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&r1=1.407&r2=1.408
http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.h?cvsroot=gnash&r1=1.154&r2=1.155
http://cvs.savannah.gnu.org/viewcvs/gnash/server/video_stream_instance.cpp?cvsroot=gnash&r1=1.43&r2=1.44
http://cvs.savannah.gnu.org/viewcvs/gnash/server/video_stream_instance.h?cvsroot=gnash&r1=1.23&r2=1.24

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5119
retrieving revision 1.5120
diff -u -b -r1.5119 -r1.5120
--- ChangeLog   10 Dec 2007 17:45:34 -0000      1.5119
+++ ChangeLog   10 Dec 2007 20:17:15 -0000      1.5120
@@ -1,3 +1,15 @@
+2007-12-10 Sandro Santilli <address@hidden>
+
+       * server/button_character_instance.{cpp,h},
+         server/character.h, server/impl.cpp,
+         server/movie_instance.{cpp,h},
+         server/movie_root.{cpp,h},
+         server/sprite_instance.{cpp,h},
+         server/video_stream_instance.{cpp,h}:
+         Drop the delta time argument to character::advance,
+         make sprite_instance::advance_sprite non-virtual,
+         drop unused cache-related code in impl.cpp
+
 2007-12-10  Rob Savoye  <address@hidden>
 
        * libbase/image.h: Include boost/cstdint.hpp to get uint8_t in a

Index: server/button_character_instance.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/button_character_instance.cpp,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -b -r1.66 -r1.67
--- server/button_character_instance.cpp        24 Nov 2007 17:21:44 -0000      
1.66
+++ server/button_character_instance.cpp        10 Dec 2007 20:17:16 -0000      
1.67
@@ -368,7 +368,7 @@
 }
 
 void
-button_character_instance::advance(float delta_time)
+button_character_instance::advance()
 {
 //                     printf("%s:\n", __PRETTY_FUNCTION__); // FIXME:
 
@@ -393,7 +393,7 @@
                    ((m_mouse_state == DOWN) && (rec.m_down)) ||
                    ((m_mouse_state == OVER) && (rec.m_over)))
                {
-                       m_record_character[i]->advance(delta_time);
+                       m_record_character[i]->advance();
                }
        }}
 }

Index: server/button_character_instance.h
===================================================================
RCS file: /sources/gnash/gnash/server/button_character_instance.h,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -b -r1.27 -r1.28
--- server/button_character_instance.h  26 Oct 2007 13:03:56 -0000      1.27
+++ server/button_character_instance.h  10 Dec 2007 20:17:16 -0000      1.28
@@ -21,7 +21,7 @@
 
 // SWF buttons.  Mouse-sensitive update/display, actions, etc.
 
-/* $Id: button_character_instance.h,v 1.27 2007/10/26 13:03:56 strk Exp $ */
+/* $Id: button_character_instance.h,v 1.28 2007/12/10 20:17:16 strk Exp $ */
 
 #ifndef GNASH_BUTTON_CHARACTER_INSTANCE_H
 #define GNASH_BUTTON_CHARACTER_INSTANCE_H
@@ -92,7 +92,7 @@
 
        void    restart();
 
-       virtual void    advance(float delta_time);
+       virtual void    advance();
 
        void    display();
        

Index: server/character.h
===================================================================
RCS file: /sources/gnash/gnash/server/character.h,v
retrieving revision 1.113
retrieving revision 1.114
diff -u -b -r1.113 -r1.114
--- server/character.h  7 Dec 2007 01:33:25 -0000       1.113
+++ server/character.h  10 Dec 2007 20:17:16 -0000      1.114
@@ -19,7 +19,7 @@
 //
 //
 
-/* $Id: character.h,v 1.113 2007/12/07 01:33:25 zoulunkai Exp $ */
+/* $Id: character.h,v 1.114 2007/12/10 20:17:16 strk Exp $ */
 
 #ifndef GNASH_CHARACTER_H
 #define GNASH_CHARACTER_H
@@ -761,7 +761,7 @@
        /// 
        /// Frame advancement include execution of all control tags.
        /// 
-       virtual void advance(float /*delta_time*/)
+       virtual void advance()
        {
                // GNASH_REPORT_FUNCTION 
        }

Index: server/impl.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/impl.cpp,v
retrieving revision 1.129
retrieving revision 1.130
diff -u -b -r1.129 -r1.130
--- server/impl.cpp     4 Dec 2007 11:45:28 -0000       1.129
+++ server/impl.cpp     10 Dec 2007 20:17:17 -0000      1.130
@@ -17,7 +17,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-/* $Id: impl.cpp,v 1.129 2007/12/04 11:45:28 strk Exp $ */
+/* $Id: impl.cpp,v 1.130 2007/12/10 20:17:17 strk Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -405,7 +405,7 @@
 // Create a movie_definition from a png stream
 // NOTE: this method assumes this *is* a png stream
 static movie_definition*
-create_png_movie(std::auto_ptr<tu_file> in, const std::string& url)
+create_png_movie(std::auto_ptr<tu_file> /*in*/, const std::string& /*url*/)
 {
        log_unimpl(_("Loading of png"));
        return NULL;
@@ -811,107 +811,6 @@
 }
 
 
-void   precompute_cached_data(movie_definition* movie_def)
-    // Fill in cached data in movie_def.
-    // @@@@ NEEDS TESTING -- MIGHT BE BROKEN!!!
-{
-    assert(movie_def != NULL);
-
-    // Temporarily install null render and sound handlers,
-    // so we don't get output during preprocessing.
-    //
-    // Use automatic class var to make sure we restore
-    // when exiting the function.
-    class save_stuff
-    {
-    public:
-       render_handler* m_original_rh;
-       media::sound_handler*   m_original_sh;
-
-       save_stuff()
-           {
-               // Save.
-               m_original_rh = get_render_handler();
-               m_original_sh = get_sound_handler();
-               set_render_handler(NULL);
-               set_sound_handler(NULL);
-           }
-
-       ~save_stuff()
-           {
-               // Restore.
-               set_render_handler(m_original_rh);
-               set_sound_handler(m_original_sh);
-           }
-    } save_stuff_instance;
-
-    // Need an instance.
-    gnash::sprite_instance*    m = movie_def->create_instance();
-    if (m == NULL)
-       {
-           log_error(_("precompute_cached_data can't create instance of 
movie"));
-           return;
-       }
-               
-    // Run through the movie's frames.
-    //
-    // @@ there might be cleaner ways to do this; e.g. do
-    // execute_frame_tags(i, true) on movie and all child
-    // sprites.
-    int        kick_count = 0;
-    for (;;)
-       {
-           // @@ do we also have to run through all sprite frames
-           // as well?
-           //
-           // @@ also, ActionScript can rescale things
-           // dynamically -- we can't really do much about that I
-           // guess?
-           //
-           // @@ Maybe we should allow the user to specify some
-           // safety margin on scaled shapes.
-
-           size_t last_frame = m->get_current_frame();
-           m->advance(0.010f);
-           m->display();
-
-           if (m->get_current_frame() == movie_def->get_frame_count() - 1)
-               {
-                   // Done.
-                   break;
-               }
-
-           if (m->get_play_state() == gnash::sprite_instance::STOP)
-               {
-                   // Kick the movie.
-                   //log_msg(_("kicking movie, kick ct = %d"), kick_count);
-                   m->goto_frame(last_frame + 1);
-                   m->set_play_state(gnash::sprite_instance::PLAY);
-                   kick_count++;
-
-                   if (kick_count > 10)
-                       {
-                           //log_msg(_("movie is stalled; giving up on playing 
it through"));
-                           break;
-                       }
-               }
-           else if (m->get_current_frame() < last_frame)
-               {
-                   // Hm, apparently we looped back.  Skip ahead...
-                   log_error(_("loop back; jumping to frame " SIZET_FMT), 
last_frame);
-                   m->goto_frame(last_frame + 1);
-               }
-           else
-               {
-                   kick_count = 0;
-               }
-       }
-
-#ifndef GNASH_USE_GC
-    m->drop_ref();
-#endif //ndef GNASH_USE_GC
-}
-
 #ifdef GNASH_USE_GC
 /// A GC root used to mark all reachable collectable pointers
 class GnashGcRoot : public GcRoot 

Index: server/movie_instance.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/movie_instance.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- server/movie_instance.cpp   25 Sep 2007 14:57:05 -0000      1.19
+++ server/movie_instance.cpp   10 Dec 2007 20:17:17 -0000      1.20
@@ -69,7 +69,7 @@
 
 // Advance of an SWF-defined movie instance
 void
-movie_instance::advance(float delta_time)
+movie_instance::advance()
 {
        //GNASH_REPORT_FUNCTION;
 
@@ -91,7 +91,7 @@
                );
        }
 
-       advance_sprite(delta_time); 
+       advance_sprite(); 
 
        //_def->resumeLoader();
 }

Index: server/movie_instance.h
===================================================================
RCS file: /sources/gnash/gnash/server/movie_instance.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- server/movie_instance.h     21 Sep 2007 08:29:02 -0000      1.9
+++ server/movie_instance.h     10 Dec 2007 20:17:17 -0000      1.10
@@ -56,7 +56,7 @@
 
        virtual ~movie_instance() {}
 
-       virtual void advance(float delta_time);
+       virtual void advance();
 
        // Could be implemented in sprite_instance too,
        // returning m_root like it is done for get_root_movie...

Index: server/movie_root.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/movie_root.cpp,v
retrieving revision 1.133
retrieving revision 1.134
diff -u -b -r1.133 -r1.134
--- server/movie_root.cpp       10 Dec 2007 10:54:33 -0000      1.133
+++ server/movie_root.cpp       10 Dec 2007 20:17:17 -0000      1.134
@@ -918,7 +918,7 @@
        // Advance all non-unloaded characters in the LiveChars list
        // in reverse order (last added, first advanced)
        // NOTE: can throw ActionLimitException
-       advanceLiveChars(delta_time); 
+       advanceLiveChars(); 
 
        cleanupUnloadedListeners();
 
@@ -1507,7 +1507,7 @@
 
 /*static private*/
 void
-movie_root::advanceLiveChar(boost::intrusive_ptr<character> ch, float 
delta_time)
+movie_root::advanceLiveChar(boost::intrusive_ptr<character> ch)
 {
 
        if ( ! ch->isUnloaded() )
@@ -1515,7 +1515,7 @@
 #ifdef GNASH_DEBUG
                log_debug("    advancing character %s", 
ch->getTarget().c_str());
 #endif
-               ch->advance(delta_time);
+               ch->advance();
        }
 #ifdef GNASH_DEBUG
        else {
@@ -1525,14 +1525,14 @@
 }
 
 void
-movie_root::advanceLiveChars(float delta_time)
+movie_root::advanceLiveChars()
 {
 
 #ifdef GNASH_DEBUG
        log_debug("---- movie_root::advance: %d live characters in the global 
list", _liveChars.size());
 #endif
 
-       std::for_each(_liveChars.begin(), _liveChars.end(), 
boost::bind(advanceLiveChar, _1, delta_time));
+       std::for_each(_liveChars.begin(), _liveChars.end(), 
boost::bind(advanceLiveChar, _1));
 }
 
 void

Index: server/movie_root.h
===================================================================
RCS file: /sources/gnash/gnash/server/movie_root.h,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -b -r1.94 -r1.95
--- server/movie_root.h 30 Nov 2007 11:26:05 -0000      1.94
+++ server/movie_root.h 10 Dec 2007 20:17:17 -0000      1.95
@@ -15,7 +15,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-/* $Id: movie_root.h,v 1.94 2007/11/30 11:26:05 strk Exp $ */
+/* $Id: movie_root.h,v 1.95 2007/12/10 20:17:17 strk Exp $ */
 
 /// \page events_handling Handling of user events
 ///
@@ -779,14 +779,10 @@
     /// @param ch
     ///     The character to advance, will NOT be advanced if unloaded
     ///
-    /// @param delta_time
-    ///     A left-over parameter from the ancient times... will be forwarded
-    ///     to the calls to ::advance
-    ///
-    static void advanceLiveChar(boost::intrusive_ptr<character> ch, float 
delta_time);
+    static void advanceLiveChar(boost::intrusive_ptr<character> ch);
 
     /// Advance all non-unloaded live chars
-    void advanceLiveChars(float delta_time);
+    void advanceLiveChars();
 
     /// Put the given movie at the given level 
     //

Index: server/sprite_instance.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v
retrieving revision 1.407
retrieving revision 1.408
diff -u -b -r1.407 -r1.408
--- server/sprite_instance.cpp  7 Dec 2007 14:39:20 -0000       1.407
+++ server/sprite_instance.cpp  10 Dec 2007 20:17:17 -0000      1.408
@@ -2418,7 +2418,7 @@
 
 }
 
-void sprite_instance::advance_sprite(float /*delta_time*/)
+void sprite_instance::advance_sprite()
 {
        //GNASH_REPORT_FUNCTION;
 
@@ -2503,7 +2503,7 @@
 }
 
 // child movieclip advance
-void sprite_instance::advance(float delta_time)
+void sprite_instance::advance()
 {
 //     GNASH_REPORT_FUNCTION;
 
@@ -2516,7 +2516,7 @@
        // child movieclip frame rate is the same the root movieclip frame rate
        // that's why it is not needed to analyze 'm_time_remainder'
 
-       advance_sprite(delta_time);
+       advance_sprite();
 
 }
 

Index: server/sprite_instance.h
===================================================================
RCS file: /sources/gnash/gnash/server/sprite_instance.h,v
retrieving revision 1.154
retrieving revision 1.155
diff -u -b -r1.154 -r1.155
--- server/sprite_instance.h    4 Dec 2007 11:45:29 -0000       1.154
+++ server/sprite_instance.h    10 Dec 2007 20:17:17 -0000      1.155
@@ -241,9 +241,9 @@
                return true; // sprites can be referenced 
        }
 
-       virtual void    advance(float delta_time);
-       //virtual void  advance_root(float delta_time);
-       virtual void    advance_sprite(float delta_time);
+       virtual void    advance();
+
+       void    advance_sprite();
 
        /// Set the sprite state at the specified frame number.
        //

Index: server/video_stream_instance.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/video_stream_instance.cpp,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -b -r1.43 -r1.44
--- server/video_stream_instance.cpp    14 Nov 2007 14:33:34 -0000      1.43
+++ server/video_stream_instance.cpp    10 Dec 2007 20:17:17 -0000      1.44
@@ -17,7 +17,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 // 
 
-// $Id: video_stream_instance.cpp,v 1.43 2007/11/14 14:33:34 strk Exp $
+// $Id: video_stream_instance.cpp,v 1.44 2007/12/10 20:17:17 strk Exp $
 
 #include "sprite_instance.h"
 #include "video_stream_instance.h"
@@ -229,7 +229,7 @@
 
 
 void
-video_stream_instance::advance(float /*delta_time*/)
+video_stream_instance::advance()
 {
        if (_ns) {
                _ns->advance();

Index: server/video_stream_instance.h
===================================================================
RCS file: /sources/gnash/gnash/server/video_stream_instance.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- server/video_stream_instance.h      18 Oct 2007 15:56:55 -0000      1.23
+++ server/video_stream_instance.h      10 Dec 2007 20:17:18 -0000      1.24
@@ -16,7 +16,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 // 
-// $Id: video_stream_instance.h,v 1.23 2007/10/18 15:56:55 tgc Exp $
+// $Id: video_stream_instance.h,v 1.24 2007/12/10 20:17:18 strk Exp $
 
 #ifndef GNASH_VIDEO_STREAM_INSTANCE_H
 #define GNASH_VIDEO_STREAM_INSTANCE_H
@@ -59,7 +59,7 @@
        }
 
        /// We use the call to ::advance to properly set invalidated status
-       virtual void    advance(float delta_time);
+       virtual void    advance();
 
        /// Register this video instance as a live character
        virtual void stagePlacementCallback();




reply via email to

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