gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/trunk r10782: Header cleanups, tidy up mem


From: Benjamin Wolsey
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r10782: Header cleanups, tidy up member access, rename some functions and enums,
Date: Thu, 09 Apr 2009 15:17:00 +0200
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 10782
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Thu 2009-04-09 15:17:00 +0200
message:
  Header cleanups, tidy up member access, rename some functions and enums,
  const correct.
modified:
  cygnal/cvm.cpp
  gui/gui.cpp
  libcore/DisplayObject.h
  libcore/MovieClip.cpp
  libcore/MovieClip.h
  libcore/Shape.h
  libcore/StaticText.h
  libcore/TextField.cpp
  libcore/Video.cpp
  libcore/impl.cpp
  libcore/movie_root.h
  libcore/parser/SWFMovieDefinition.cpp
  libcore/parser/SWFMovieDefinition.h
  libcore/parser/movie_definition.h
  libcore/parser/sprite_definition.h
  libcore/swf/ControlTag.h
  libcore/swf/DefineTextTag.cpp
  libcore/swf/DefineTextTag.h
  libcore/swf/TextRecord.cpp
  libcore/swf/TextRecord.h
  libcore/swf/tag_loaders.cpp
  libcore/swf_event.h
  libcore/vm/ASHandlers.cpp
  testsuite/actionscript.all/MovieClip.as
  testsuite/libcore.all/ClassSizes.cpp
  testsuite/misc-ming.all/ButtonEventsTest-Runner.cpp
  testsuite/misc-ming.all/DefineEditTextTest-Runner.cpp
  testsuite/misc-ming.all/DefineEditTextVariableNameTest-Runner.cpp
  testsuite/misc-ming.all/DefineTextTest-Runner.cpp
  testsuite/misc-ming.all/RollOverOutTest-Runner.cpp
  testsuite/misc-ming.all/SpriteButtonEventsTest-Runner.cpp
  testsuite/misc-ming.all/Video-EmbedSquareTestRunner.cpp
  testsuite/misc-ming.all/attachMovieLoopingTestRunner.cpp
  testsuite/misc-ming.all/attachMovieTestRunner.cpp
  testsuite/misc-ming.all/intervalTestRunner.cpp
  testsuite/misc-ming.all/loop_test-Runner.cpp
  testsuite/misc-ming.all/loop_test2runner.cpp
  testsuite/misc-ming.all/masks_testrunner.cpp
  testsuite/misc-ming.all/registerClassTestRunner.cpp
  testsuite/misc-ming.all/replace_buttons1test_runner.cpp
  testsuite/misc-ming.all/replace_shapes1test_runner.cpp
  testsuite/misc-ming.all/replace_sprites1test_runner.cpp
  testsuite/misc-ming.all/root_stop_testrunner.cpp
  testsuite/misc-ming.all/simple_loop_testrunner.cpp
  utilities/processor.cpp
    ------------------------------------------------------------
    revno: 10781.1.1
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Wed 2009-04-08 12:58:37 +0200
    message:
      Const correct.
    modified:
      libcore/swf_event.h
    ------------------------------------------------------------
    revno: 10781.1.2
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Wed 2009-04-08 15:00:17 +0200
    message:
      Remove line break.
    modified:
      libcore/Video.cpp
    ------------------------------------------------------------
    revno: 10781.1.3
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Wed 2009-04-08 15:16:47 +0200
    message:
      Use a typedef for std::vector<TextRecord>.
    modified:
      libcore/swf/TextRecord.cpp
      libcore/swf/TextRecord.h
    ------------------------------------------------------------
    revno: 10781.1.4
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Wed 2009-04-08 16:08:39 +0200
    message:
      Use typedef.
    modified:
      libcore/swf/DefineTextTag.h
    ------------------------------------------------------------
    revno: 10781.1.5
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2009-04-09 08:17:15 +0200
    message:
      Leave callers to decide what matrix and cxform to pass for displaying
      TextRecords.
    modified:
      libcore/TextField.cpp
      libcore/swf/DefineTextTag.cpp
      libcore/swf/TextRecord.cpp
      libcore/swf/TextRecord.h
    ------------------------------------------------------------
    revno: 10781.1.6
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2009-04-09 08:29:33 +0200
    message:
      Move variables to where they are needed.
    modified:
      libcore/swf/TextRecord.cpp
    ------------------------------------------------------------
    revno: 10781.1.7
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2009-04-09 09:00:34 +0200
    message:
      Use algorithm.
    modified:
      libcore/TextField.cpp
    ------------------------------------------------------------
    revno: 10781.1.8
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2009-04-09 10:59:49 +0200
    message:
      Move ControlTag under SWF namespace. Const correct movie_definition.
    modified:
      libcore/parser/SWFMovieDefinition.cpp
      libcore/parser/SWFMovieDefinition.h
      libcore/parser/movie_definition.h
      libcore/parser/sprite_definition.h
      libcore/swf/ControlTag.h
    ------------------------------------------------------------
    revno: 10781.1.9
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2009-04-09 11:58:40 +0200
    message:
      Make all DisplayObjects non-copyable.
    modified:
      libcore/DisplayObject.h
    ------------------------------------------------------------
    revno: 10781.1.10
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2009-04-09 13:39:48 +0200
    message:
      Renaming, move things about.
    modified:
      gui/gui.cpp
      libcore/MovieClip.cpp
      libcore/MovieClip.h
      libcore/movie_root.h
      libcore/swf/ControlTag.h
      libcore/vm/ASHandlers.cpp
      testsuite/actionscript.all/MovieClip.as
      utilities/processor.cpp
    ------------------------------------------------------------
    revno: 10781.1.11
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2009-04-09 13:41:59 +0200
    message:
      Fix testsuite.
    modified:
      testsuite/misc-ming.all/ButtonEventsTest-Runner.cpp
      testsuite/misc-ming.all/DefineEditTextTest-Runner.cpp
      testsuite/misc-ming.all/DefineEditTextVariableNameTest-Runner.cpp
      testsuite/misc-ming.all/DefineTextTest-Runner.cpp
      testsuite/misc-ming.all/RollOverOutTest-Runner.cpp
      testsuite/misc-ming.all/SpriteButtonEventsTest-Runner.cpp
      testsuite/misc-ming.all/Video-EmbedSquareTestRunner.cpp
      testsuite/misc-ming.all/attachMovieLoopingTestRunner.cpp
      testsuite/misc-ming.all/attachMovieTestRunner.cpp
      testsuite/misc-ming.all/intervalTestRunner.cpp
      testsuite/misc-ming.all/loop_test-Runner.cpp
      testsuite/misc-ming.all/loop_test2runner.cpp
      testsuite/misc-ming.all/masks_testrunner.cpp
      testsuite/misc-ming.all/registerClassTestRunner.cpp
      testsuite/misc-ming.all/replace_buttons1test_runner.cpp
      testsuite/misc-ming.all/replace_shapes1test_runner.cpp
      testsuite/misc-ming.all/replace_sprites1test_runner.cpp
      testsuite/misc-ming.all/root_stop_testrunner.cpp
      testsuite/misc-ming.all/simple_loop_testrunner.cpp
    ------------------------------------------------------------
    revno: 10781.1.12
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2009-04-09 14:45:20 +0200
    message:
      Clean up includes and forward declarations. Add more classes to 
ClassSizes.
    modified:
      cygnal/cvm.cpp
      libcore/Shape.h
      libcore/StaticText.h
      libcore/TextField.cpp
      libcore/impl.cpp
      libcore/parser/SWFMovieDefinition.h
      libcore/swf/tag_loaders.cpp
      testsuite/libcore.all/ClassSizes.cpp
=== modified file 'cygnal/cvm.cpp'
--- a/cygnal/cvm.cpp    2009-02-25 22:33:03 +0000
+++ b/cygnal/cvm.cpp    2009-04-09 12:45:20 +0000
@@ -537,7 +537,7 @@
                 fprintf(stderr, "Kicking movie after %g seconds in STOP mode, 
kick ct = %d\n", waitforadvance, kick_count);
                 fflush(stderr);
                 m.goto_frame(last_frame + 1);
-                m.set_play_state(gnash::MovieClip::PLAY);
+                m.set_play_state(gnash::MovieClip::PLAYSTATE_PLAY);
                 kick_count++;
 
                 if (kick_count > 10) {

=== modified file 'gui/gui.cpp'
--- a/gui/gui.cpp       2009-04-03 18:45:30 +0000
+++ b/gui/gui.cpp       2009-04-09 11:39:48 +0000
@@ -950,7 +950,7 @@
        bool advanced = m->advance();
        m->get_movie_definition()->ensure_frame_loaded(tot_frames);
        m->goto_frame(cur_frame+1);
-       m->set_play_state(gnash::MovieClip::PLAY);
+    m->set_play_state(gnash::MovieClip::PLAYSTATE_PLAY);
        log_debug(_("Frame %d"), m->get_current_frame());
 #endif
 

=== modified file 'libcore/DisplayObject.h'
--- a/libcore/DisplayObject.h   2009-04-08 07:08:06 +0000
+++ b/libcore/DisplayObject.h   2009-04-09 09:58:40 +0000
@@ -40,6 +40,7 @@
 #include <string>
 #include <cassert>
 #include <boost/cstdint.hpp> // For C99 int types
+#include <boost/noncopyable.hpp>
 
 //#define DEBUG_SET_INVALIDATED 1
 
@@ -79,7 +80,7 @@
 /// dynamic DisplayObjects, but tags are not always stored. They are not
 /// stored in most InteractiveObjects because most properties can be
 /// overridden during SWF execution.
-class DisplayObject : public as_object
+class DisplayObject : public as_object, boost::noncopyable
 {
 public:
 

=== modified file 'libcore/MovieClip.cpp'
--- a/libcore/MovieClip.cpp     2009-04-08 07:08:06 +0000
+++ b/libcore/MovieClip.cpp     2009-04-09 11:39:48 +0000
@@ -483,26 +483,25 @@
         DisplayObject* parent, int id)
     :
     InteractiveObject(parent, id),
+    _def(def),
     m_root(r),
-    m_play_state(PLAY),
-    m_current_frame(0),
-    m_has_looped(false),
+    _playState(PLAYSTATE_PLAY),
+    _currentFrame(0),
+    _hasLooped(false),
     _callingFrameActions(false),
-    m_as_environment(_vm),
-    _text_variables(),
+    _environment(_vm),
     m_sound_stream_id(-1),
     _userCxform(),
     _droptarget(),
-    _lockroot(false),
-    m_def(def)
+    _lockroot(false)
 {
-    assert(m_def != NULL);
+    assert(_def != NULL);
     assert(m_root != NULL);
 
     set_prototype(getMovieClipInterface());
             
     //m_root->add_ref();    // @@ circular!
-    m_as_environment.set_target(this);
+    _environment.set_target(this);
 
     // TODO: have the 'MovieClip' constructor take care of this !
     attachMovieClipProperties(*this);
@@ -546,7 +545,7 @@
 DisplayObject*
 MovieClip::getDisplayObjectAtDepth(int depth)
 {
-    return m_display_list.getDisplayObjectAtDepth(depth);
+    return _displayList.getDisplayObjectAtDepth(depth);
 }
 
 // Set *val to the value of the named member and
@@ -617,9 +616,9 @@
     // Try items on our display list.
     DisplayObject* ch;
     if ( _vm.getSWFVersion() >= 7 ) {
-        ch = m_display_list.getDisplayObjectByName(name);
+        ch = _displayList.getDisplayObjectByName(name);
     }
-    else ch = m_display_list.getDisplayObjectByName_i(name);
+    else ch = _displayList.getDisplayObjectByName_i(name);
     if (ch) {
             // Found object.
 
@@ -688,7 +687,7 @@
 
     if (!isFinite(num) || int(num) != num || num == 0)
     {
-        bool ret = m_def->get_labeled_frame(fspecStr, frameno);
+        bool ret = _def->get_labeled_frame(fspecStr, frameno);
         //log_debug("get_labeled_frame(%s) returned %d, frameno is %d", 
fspecStr, ret, frameno);
         return ret;
     }
@@ -735,14 +734,14 @@
     //             to properly queue actions back on the global queue.
     //
     _callingFrameActions=true;
-    const PlayList* playlist = m_def->getPlaylist(frame_number);
+    const PlayList* playlist = _def->getPlaylist(frame_number);
     if ( playlist )
     {
     PlayList::const_iterator it = playlist->begin();
         const PlayList::const_iterator e = playlist->end();
     for(; it != e; it++)
     {
-        (*it)->execute_action(this, m_display_list);
+        (*it)->execute_action(this, _displayList);
     }
     }
     _callingFrameActions=false;
@@ -764,7 +763,7 @@
     //             an existing one !
     set_invalidated(); 
 
-    m_display_list.placeDisplayObject(movieclip, depth);     
+    _displayList.placeDisplayObject(movieclip, depth);     
 
     return movieclip;
 }
@@ -789,7 +788,7 @@
     txt_char->setMatrix(txt_matrix, true); // update caches (altought 
shouldn't be needed as we only set translation)
 
     // Here we add the DisplayObject to the displayList.    
-    m_display_list.placeDisplayObject(txt_char.get(), depth); 
+    _displayList.placeDisplayObject(txt_char.get(), depth); 
 
     return txt_char;
 }
@@ -811,7 +810,7 @@
         return NULL;
     }
 
-    boost::intrusive_ptr<MovieClip> newmovieclip = new MovieClip(m_def.get(),
+    boost::intrusive_ptr<MovieClip> newmovieclip = new MovieClip(_def.get(),
             m_root, parent, get_id());
     newmovieclip->set_name(newname);
 
@@ -833,7 +832,7 @@
     newmovieclip->set_ratio(get_ratio());    
     newmovieclip->set_clip_depth(get_clip_depth());    
     
-    parent->m_display_list.placeDisplayObject(newmovieclip.get(), depth, 
+    parent->_displayList.placeDisplayObject(newmovieclip.get(), depth, 
             initObject);
     
     return newmovieclip; 
@@ -939,7 +938,7 @@
             if ( isDynamic() ) break;
 
             sprite_definition* def =
-                dynamic_cast<sprite_definition*>(m_def.get());
+                dynamic_cast<sprite_definition*>(_def.get());
 
             // must be a loaded movie (loadMovie doesn't mark it as 
             // "dynamic" - should it? no, or getBytesLoaded will always
@@ -970,7 +969,7 @@
 
         if ( method )
         {
-            call_method0(as_value(method.get()), m_as_environment, this);
+            call_method0(as_value(method.get()), _environment, this);
             called = true;
         }
     }
@@ -1000,9 +999,9 @@
     // See if we have a match on the display list.
     DisplayObject* ch;
     if ( _vm.getSWFVersion() >= 7 ) ch = 
-        m_display_list.getDisplayObjectByName(name);
+        _displayList.getDisplayObjectByName(name);
 
-    else ch = m_display_list.getDisplayObjectByName_i(name);
+    else ch = _displayList.getDisplayObjectByName_i(name);
 
             // TODO: should we check for isActionScriptReferenceable here ?
     if ( ch )
@@ -1111,10 +1110,10 @@
     processCompletedLoadVariableRequests();
 
 #ifdef GNASH_DEBUG
-    size_t frame_count = m_def->get_frame_count();
+    size_t frame_count = _def->get_frame_count();
 
     log_debug(_("Advance_movieclip for movieclip '%s' - frame %u/%u "),
-        getTarget(), m_current_frame,
+        getTarget(), _currentFrame,
         frame_count);
 #endif
 
@@ -1122,27 +1121,27 @@
     queueEvent(event_id::ENTER_FRAME, movie_root::apDOACTION);
 
     // Update current and next frames.
-    if (m_play_state == PLAY)
+    if (_playState == PLAYSTATE_PLAY)
     {
 #ifdef GNASH_DEBUG
-        log_debug(_("MovieClip::advance_movieclip we're in PLAY mode"));
+        log_debug(_("MovieClip::advance_movieclip we're in PLAYSTATE_PLAY 
mode"));
 #endif
 
-        int prev_frame = m_current_frame;
+        int prev_frame = _currentFrame;
 
 #ifdef GNASH_DEBUG
         log_debug(_("on_event_load called, incrementing"));
 #endif
         increment_frame_and_check_for_loop();
 #ifdef GNASH_DEBUG
-        log_debug(_("after increment we are at frame %u/%u"), m_current_frame, 
frame_count);
+        log_debug(_("after increment we are at frame %u/%u"), _currentFrame, 
frame_count);
 #endif
 
         // Execute the current frame's tags.
-        // First time execute_frame_tags(0) executed in dlist.cpp(child) or 
SWFMovieDefinition(root)
-        if (m_current_frame != (size_t)prev_frame)
+        // First time executeFrameTags(0) executed in dlist.cpp(child) or 
SWFMovieDefinition(root)
+        if (_currentFrame != (size_t)prev_frame)
         {
-            if ( m_current_frame == 0 && has_looped() )
+            if ( _currentFrame == 0 && has_looped() )
             {
 #ifdef GNASH_DEBUG
                 log_debug(_("Jumping back to frame 0 of movieclip %s"),
@@ -1154,11 +1153,12 @@
             {
 #ifdef GNASH_DEBUG
                 log_debug(_("Executing frame%d (0-based) tags of movieclip "
-                            "%s"), m_current_frame, getTarget());
+                            "%s"), _currentFrame, getTarget());
 #endif
-                // Make sure m_current_frame is 0-based during execution of 
DLIST tags
-                execute_frame_tags(m_current_frame, m_display_list,
-                        TAG_DLIST|TAG_ACTION);
+                // Make sure _currentFrame is 0-based during execution of 
DLIST tags
+                executeFrameTags(_currentFrame, _displayList,
+                        SWF::ControlTag::TAG_DLIST |
+                        SWF::ControlTag::TAG_ACTION);
             }
         }
 
@@ -1166,9 +1166,9 @@
 #ifdef GNASH_DEBUG
     else
     {
-        log_debug(_("MovieClip::advance_movieclip we're in STOP mode"));
-        // shouldn't we execute frame tags anyway when in STOP mode ?
-        //execute_frame_tags(m_current_frame);
+        log_debug(_("MovieClip::advance_movieclip we're in PLAYSTATE_STOP 
mode"));
+        // shouldn't we execute frame tags anyway when in PLAYSTATE_STOP mode ?
+        //executeFrameTags(_currentFrame);
     }
 #endif
 }
@@ -1181,7 +1181,7 @@
 
 #ifdef GNASH_DEBUG
     log_debug(_("Advance movieclip '%s' at frame %u/%u"),
-        getTargetPath(), m_current_frame,
+        getTargetPath(), _currentFrame,
         get_frame_count());
 #endif
 
@@ -1201,7 +1201,7 @@
     {
 #ifdef GNASH_DEBUG
         log_debug(_("Queuing init actions in frame %d of movieclip %s"),
-                m_current_frame, getTarget());
+                _currentFrame, getTarget());
 #endif
         std::auto_ptr<ExecutableCode> code ( 
                 new GlobalCode(a, boost::intrusive_ptr<MovieClip>(this)) );
@@ -1220,7 +1220,7 @@
 void
 MovieClip::execute_action(const action_buffer& ab)
 {
-    as_environment& env = m_as_environment; // just type less
+    as_environment& env = _environment; // just type less
 
     ActionExec exec(ab, env);
     exec();
@@ -1233,36 +1233,37 @@
     // This is not tested as usable for jump-forwards (yet)...
     // TODO: I guess just moving here the code currently in goto_frame
     //             for jump-forwards would do
-    assert(tgtFrame <= m_current_frame);
+    assert(tgtFrame <= _currentFrame);
 
     // Just invalidate this DisplayObject before jumping back.
     // Should be optimized, but the invalidating model is not clear enough,
     // and there are some old questions spreading the source files.
     set_invalidated();
 
-    DisplayList m_tmp_display_list;
+    DisplayList tmplist;
     for (size_t f = 0; f<tgtFrame; ++f)
     {
-        m_current_frame = f;
-        execute_frame_tags(f, m_tmp_display_list, TAG_DLIST);
+        _currentFrame = f;
+        executeFrameTags(f, tmplist, SWF::ControlTag::TAG_DLIST);
     }
 
     // Execute both action tags and DLIST tags of the target frame
-    m_current_frame = tgtFrame;
-    execute_frame_tags(tgtFrame, m_tmp_display_list, TAG_DLIST|TAG_ACTION);
+    _currentFrame = tgtFrame;
+    executeFrameTags(tgtFrame, tmplist, SWF::ControlTag::TAG_DLIST |
+                                        SWF::ControlTag::TAG_ACTION);
 
-    m_display_list.mergeDisplayList(m_tmp_display_list);
+    _displayList.mergeDisplayList(tmplist);
 }
 
 // 0-based frame number !
 void
-MovieClip::execute_frame_tags(size_t frame, DisplayList& dlist, int typeflags)
+MovieClip::executeFrameTags(size_t frame, DisplayList& dlist, int typeflags)
 {
     testInvariant();
 
     assert(typeflags);
 
-    const PlayList* playlist = m_def->getPlaylist(frame);
+    const PlayList* playlist = _def->getPlaylist(frame);
     if ( playlist )
     {
         PlayList::const_iterator it = playlist->begin();
@@ -1275,14 +1276,15 @@
                 getTargetPath());
         );
 
-        if ( (typeflags&TAG_DLIST) && (typeflags&TAG_ACTION) )
+        if ((typeflags & SWF::ControlTag::TAG_DLIST) && 
+                (typeflags & SWF::ControlTag::TAG_ACTION) )
         {
             for( ; it != e; it++)
             {
                 (*it)->execute(this, dlist);
             }
         }
-        else if ( typeflags & TAG_DLIST )
+        else if ( typeflags & SWF::ControlTag::TAG_DLIST )
         {
             for( ; it != e; it++)
             {
@@ -1291,7 +1293,7 @@
         }
         else
         {
-            assert(typeflags & TAG_ACTION);
+            assert(typeflags & SWF::ControlTag::TAG_ACTION);
             for( ; it != e; it++)
             {
                 (*it)->execute_action(this, dlist);
@@ -1307,42 +1309,42 @@
 {
 #if defined(DEBUG_GOTOFRAME) || defined(GNASH_DEBUG_TIMELINE)
     log_debug(_("movieclip %s ::goto_frame(%d) - current frame is %d"),
-        getTargetPath(), target_frame_number, m_current_frame);
+        getTargetPath(), target_frame_number, _currentFrame);
 #endif
 
     // goto_frame stops by default.
     // ActionGotoFrame tells the movieClip to go to the target frame 
     // and stop at that frame. 
-    set_play_state(STOP);
+    setPlayState(PLAYSTATE_STOP);
 
-    if ( target_frame_number > m_def->get_frame_count() - 1)
+    if ( target_frame_number > _def->get_frame_count() - 1)
     {
-        target_frame_number = m_def->get_frame_count() - 1;
+        target_frame_number = _def->get_frame_count() - 1;
 
-        if ( ! m_def->ensure_frame_loaded(target_frame_number+1) )
+        if ( ! _def->ensure_frame_loaded(target_frame_number+1) )
         {
             log_error(_("Target frame of a gotoFrame(%d) was never loaded,"
                         "although frame count in header (%d) said we "
                         "should have found it"),
-                        target_frame_number+1, m_def->get_frame_count());
+                        target_frame_number+1, _def->get_frame_count());
             return; // ... I guess, or not ?
         }
 
         // Just set _currentframe and return.
-        m_current_frame = target_frame_number;
+        _currentFrame = target_frame_number;
 
         // don't push actions, already tested.
         return;
     }
 
-    if (target_frame_number == m_current_frame)
+    if (target_frame_number == _currentFrame)
     {
         // don't push actions
         return;
     }
 
     // Unless the target frame is the next one, stop playback of soundstream
-    if (target_frame_number != m_current_frame+1 )
+    if (target_frame_number != _currentFrame+1 )
     {
         stopStreamSound();
     }
@@ -1363,12 +1365,12 @@
             loaded_frames);
 
         );
-        if ( ! m_def->ensure_frame_loaded(target_frame_number+1) )
+        if ( ! _def->ensure_frame_loaded(target_frame_number+1) )
         {
             log_error(_("Target frame of a gotoFrame(%d) was never loaded, "
                         "although frame count in header (%d) said we should"
                         " have found it"),
-                        target_frame_number+1, m_def->get_frame_count());
+                        target_frame_number+1, _def->get_frame_count());
             return; // ... I guess, or not ?
         }
     }
@@ -1378,7 +1380,7 @@
     // Construct the DisplayList of the target frame
     //
 
-    if (target_frame_number < m_current_frame)
+    if (target_frame_number < _currentFrame)
     {
         // Go backward to a previous frame
         // NOTE: just in case we're being called by code in a called frame
@@ -1387,25 +1389,26 @@
         _callingFrameActions = false;
 
         // restoreDisplayList takes care of properly setting the 
-        // m_current_frame variable
+        // _currentFrame variable
         restoreDisplayList(target_frame_number);
-        assert(m_current_frame == target_frame_number);
+        assert(_currentFrame == target_frame_number);
         _callingFrameActions = callingFrameActionsBackup;
     }
     else
     // Go forward to a later frame
     {
-        // We'd immediately return if target_frame_number == m_current_frame
-        assert(target_frame_number > m_current_frame);
-        while (++m_current_frame < target_frame_number)
+        // We'd immediately return if target_frame_number == _currentFrame
+        assert(target_frame_number > _currentFrame);
+        while (++_currentFrame < target_frame_number)
         {
-            //for (size_t f = m_current_frame+1; f<target_frame_number; ++f) 
+            //for (size_t f = _currentFrame+1; f<target_frame_number; ++f) 
             // Second argument requests that only "DisplayList" tags
             // are executed. This means NO actions will be
             // pushed on m_action_list.
-            execute_frame_tags(m_current_frame, m_display_list, TAG_DLIST);
+            executeFrameTags(_currentFrame, _displayList,
+                   SWF::ControlTag::TAG_DLIST);
         }
-        assert(m_current_frame == target_frame_number);
+        assert(_currentFrame == target_frame_number);
 
 
         // Now execute target frame tags (queuing actions)
@@ -1413,18 +1416,19 @@
         //             we'll backup and resume the _callingFrameActions flag
         bool callingFrameActionsBackup = _callingFrameActions;
         _callingFrameActions = false;
-        execute_frame_tags(target_frame_number, m_display_list,
-                TAG_DLIST|TAG_ACTION);
+        executeFrameTags(target_frame_number, _displayList,
+                SWF::ControlTag::TAG_DLIST |
+                SWF::ControlTag::TAG_ACTION);
         _callingFrameActions = callingFrameActionsBackup;
     }
 
-    assert(m_current_frame == target_frame_number);
+    assert(_currentFrame == target_frame_number);
 }
 
 bool MovieClip::goto_labeled_frame(const std::string& label)
 {
     size_t target_frame;
-    if (m_def->get_labeled_frame(label, target_frame))
+    if (_def->get_labeled_frame(label, target_frame))
     {
         goto_frame(target_frame);
         return true;
@@ -1453,7 +1457,7 @@
     
     
     // descend the display list
-    m_display_list.display();
+    _displayList.display();
      
     clear_invalidated();
 }
@@ -1461,7 +1465,7 @@
 void MovieClip::omit_display()
 {
     if (m_child_invalidated)
-        m_display_list.omit_display();
+        _displayList.omit_display();
         
     clear_invalidated();
 }
@@ -1469,7 +1473,7 @@
 bool
 MovieClip::attachCharacter(DisplayObject& newch, int depth, as_object* 
initObject)
 { 
-    m_display_list.placeDisplayObject(&newch, depth, initObject);    
+    _displayList.placeDisplayObject(&newch, depth, initObject);    
 
     // FIXME: check return from placeDisplayObject above ?
     return true; 
@@ -1496,10 +1500,10 @@
 MovieClip::add_display_object(const SWF::PlaceObject2Tag* tag,
         DisplayList& dlist)
 {
-    assert(m_def);
+    assert(_def);
     assert(tag);
 
-    SWF::DefinitionTag* cdef = m_def->getDefinitionTag(tag->getID());
+    SWF::DefinitionTag* cdef = _def->getDefinitionTag(tag->getID());
     if (!cdef)
     {
         IF_VERBOSE_MALFORMED_SWF(
@@ -1561,10 +1565,10 @@
 
 void MovieClip::replace_display_object(const SWF::PlaceObject2Tag* tag, 
DisplayList& dlist)
 {
-    assert(m_def != NULL);
+    assert(_def != NULL);
     assert(tag != NULL);
 
-    SWF::DefinitionTag* cdef = m_def->getDefinitionTag(tag->getID());
+    SWF::DefinitionTag* cdef = _def->getDefinitionTag(tag->getID());
     if (cdef == NULL)
     {
         log_error(_("movieclip::replace_display_object(): "
@@ -1628,14 +1632,14 @@
         bool use_old_cxform, bool use_old_matrix)
 {
     assert(ch);
-    m_display_list.replaceDisplayObject(ch, depth,
+    _displayList.replaceDisplayObject(ch, depth,
             use_old_cxform, use_old_matrix);
 }
 
 int
 MovieClip::get_id_at_depth(int depth)
 {
-    DisplayObject* ch = m_display_list.getDisplayObjectAtDepth(depth);
+    DisplayObject* ch = _displayList.getDisplayObjectAtDepth(depth);
     if ( ! ch ) return -1;
     return ch->get_id();
 }
@@ -1644,14 +1648,14 @@
 MovieClip::increment_frame_and_check_for_loop()
 {
     size_t frame_count = get_loaded_frames(); 
-    if ( ++m_current_frame >= frame_count )
+    if ( ++_currentFrame >= frame_count )
     {
         // Loop.
-        m_current_frame = 0;
-        m_has_looped = true;
+        _currentFrame = 0;
+        _hasLooped = true;
         if (frame_count > 1)
         {
-            //m_display_list.reset();
+            //_displayList.reset();
         }
     }
 
@@ -1679,7 +1683,7 @@
 MovieClip::pointInShape(boost::int32_t x, boost::int32_t y) const
 {
     ShapeContainerFinder finder(x, y);
-    const_cast<DisplayList&>(m_display_list).visitBackward(finder);
+    const_cast<DisplayList&>(_displayList).visitBackward(finder);
     if ( finder.hitFound() ) return true;
     return hitTestDrawable(x, y);
 }
@@ -1708,7 +1712,7 @@
         return false;
     }
     VisibleShapeContainerFinder finder(x, y);
-    const_cast<DisplayList&>(m_display_list).visitBackward(finder);
+    const_cast<DisplayList&>(_displayList).visitBackward(finder);
     if (finder.hitFound()) return true;
     return hitTestDrawable(x, y);
 }
@@ -1733,7 +1737,7 @@
     if (mask && !mask->pointInShape(x, y)) return false;
             
     HitableShapeContainerFinder finder(x, y);
-    m_display_list.visitBackward(finder);
+    _displayList.visitBackward(finder);
     if (finder.hitFound()) return true; 
     
     return hitTestDrawable(x, y); 
@@ -1770,7 +1774,7 @@
     m.invert().transform(pp);
 
     MouseEntityFinder finder(wp, pp);
-    m_display_list.visitAll(finder);
+    _displayList.visitAll(finder);
     InteractiveObject* ch = finder.getEntity();
 
     // It doesn't make any sense to query _drawable, as it's
@@ -1898,7 +1902,7 @@
     if ( ! isVisible() ) return 0; // isn't me !
 
     DropTargetFinder finder(x, y, dragging);
-    m_display_list.visitAll(finder);
+    _displayList.visitAll(finder);
 
     // does it hit any child ?
     const DisplayObject* ch = finder.getDropChar();
@@ -1957,7 +1961,7 @@
 DisplayObject*
 MovieClip::getDisplayObject(int /* id */)
 {
-    //return m_def->getDefinitionTag(id);
+    //return _def->getDefinitionTag(id);
     // @@ TODO -- look through our dlist for a match
     log_unimpl(_("%s doesn't even check for a char"),
         __PRETTY_FUNCTION__);
@@ -2075,7 +2079,7 @@
     }
     
     
-    m_display_list.add_invalidated_bounds(ranges, force||m_invalidated);
+    _displayList.add_invalidated_bounds(ranges, force||m_invalidated);
 
     /// Add drawable.
     rect bounds;
@@ -2134,7 +2138,8 @@
 #ifdef GNASH_DEBUG
         log_debug(_("Executing tags of frame0 in movieclip %s"), getTarget());
 #endif
-        execute_frame_tags(0, m_display_list, TAG_DLIST|TAG_ACTION);
+        executeFrameTags(0, _displayList, SWF::ControlTag::TAG_DLIST |
+                                          SWF::ControlTag::TAG_ACTION);
 
         if (_vm.getSWFVersion() > 5)
         {
@@ -2155,7 +2160,8 @@
 #ifdef GNASH_DEBUG
         log_debug(_("Executing tags of frame0 in movieclip %s"), getTarget());
 #endif
-        execute_frame_tags(0, m_display_list, TAG_DLIST|TAG_ACTION);
+        executeFrameTags(0, _displayList, SWF::ControlTag::TAG_DLIST | 
+                                          SWF::ControlTag::TAG_ACTION);
     }
 
     // We execute events immediately when the stage-placed DisplayObject 
@@ -2224,7 +2230,7 @@
             break;
         }
 
-        sprite_definition* def = dynamic_cast<sprite_definition*>(m_def.get());
+        sprite_definition* def = dynamic_cast<sprite_definition*>(_def.get());
 
         // We won't "construct" top-level movies
         if ( ! def ) break;
@@ -2301,7 +2307,7 @@
     // stop any pending streaming sounds
     stopStreamSound();
 
-    bool childHaveUnloadHandler = m_display_list.unload();
+    bool childHaveUnloadHandler = _displayList.unload();
 
     // We won't be displayed again, so worth releasing
     // some memory. The drawable might take a lot of memory
@@ -2541,7 +2547,7 @@
 {
     rect bounds;
     BoundsFinder f(bounds);
-    const_cast<DisplayList&>(m_display_list).visitAll(f);
+    const_cast<DisplayList&>(_displayList).visitAll(f);
     rect drawableBounds = _drawable.getBounds();
     bounds.expand_to_rect(drawableBounds);
     
@@ -2600,15 +2606,15 @@
 MovieClip::enumerateNonProperties(as_environment& env) const
 {
     EnumerateVisitor visitor(env);
-    m_display_list.visitAll(visitor);
+    _displayList.visitAll(visitor);
 }
 
 void
 MovieClip::cleanupDisplayList()
 {
     //log_debug("%s.cleanDisplayList() called, current dlist is %p", 
-    //getTarget(), (void*)&m_display_list);
-    m_display_list.removeUnloaded();
+    //getTarget(), (void*)&_displayList);
+    _displayList.removeUnloaded();
 
     cleanup_textfield_variables();
 }
@@ -2625,12 +2631,12 @@
 {
     ReachableMarker marker;
 
-    m_display_list.visitAll(marker);
+    _displayList.visitAll(marker);
 
-    m_as_environment.markReachableResources();
+    _environment.markReachableResources();
 
     // Mark our own definition
-    if ( m_def.get() ) m_def->setReachable();
+    if ( _def.get() ) _def->setReachable();
 
     // Mark textfields in the TextFieldMap
     if ( _text_variables.get() )
@@ -2678,7 +2684,7 @@
 {
     stopStreamSound();
 
-    m_display_list.destroy();
+    _displayList.destroy();
 
     /// We don't need these anymore
     clearProperties();
@@ -2782,11 +2788,11 @@
 }
 
 void
-MovieClip::set_play_state(play_state s)
+MovieClip::setPlayState(PlayState s)
 {
-    if ( s == m_play_state ) return; // nothing to do
-    if ( s == MovieClip::STOP ) stopStreamSound();
-    m_play_state = s;
+    if (s == _playState) return; // nothing to do
+    if (s == PLAYSTATE_STOP) stopStreamSound();
+    _playState = s;
 }
 
 #ifdef USE_SWFTREE
@@ -2819,14 +2825,14 @@
 {
     InfoTree::iterator selfIt = DisplayObject::getMovieInfo(tr, it);
     std::ostringstream os;
-    os << m_display_list.size();
+    os << _displayList.size();
     InfoTree::iterator localIter = tr.append_child(selfIt,
             StringPair(_("Children"), os.str()));            
     //localIter = tr.append_child(localIter, StringPair("child1", "fake"));
     //localIter = tr.append_child(localIter, StringPair("child2", "fake"));
 
     MovieInfoVisitor v(tr, localIter);
-    m_display_list.visitAll(v);
+    _displayList.visitAll(v);
 
     return selfIt;
 
@@ -2999,7 +3005,7 @@
     boost::intrusive_ptr<MovieClip> movieclip =
         ensureType<MovieClip>(fn.this_ptr);
 
-    movieclip->set_play_state(MovieClip::PLAY);
+    movieclip->setPlayState(MovieClip::PLAYSTATE_PLAY);
     return as_value();
 }
 
@@ -3009,7 +3015,7 @@
     boost::intrusive_ptr<MovieClip> movieclip =
         ensureType<MovieClip>(fn.this_ptr);
 
-    movieclip->set_play_state(MovieClip::STOP);
+    movieclip->setPlayState(MovieClip::PLAYSTATE_STOP);
 
     return as_value();
 }
@@ -3534,7 +3540,7 @@
 
     // Convert to 0-based
     movieclip->goto_frame(frame_number);
-    movieclip->set_play_state(MovieClip::PLAY);
+    movieclip->setPlayState(MovieClip::PLAYSTATE_PLAY);
     return as_value();
 }
 
@@ -3564,7 +3570,7 @@
 
     // Convert to 0-based
     movieclip->goto_frame(frame_number);
-    movieclip->set_play_state(MovieClip::STOP);
+    movieclip->setPlayState(MovieClip::PLAYSTATE_STOP);
     return as_value();
 }
 
@@ -3579,7 +3585,7 @@
     {
         movieclip->goto_frame(current_frame + 1);
     }
-    movieclip->set_play_state(MovieClip::STOP);
+    movieclip->setPlayState(MovieClip::PLAYSTATE_STOP);
     return as_value();
 }
 
@@ -3594,7 +3600,7 @@
     {
         movieclip->goto_frame(current_frame - 1);
     }
-    movieclip->set_play_state(MovieClip::STOP);
+    movieclip->setPlayState(MovieClip::PLAYSTATE_STOP);
     return as_value();
 }
 

=== modified file 'libcore/MovieClip.h'
--- a/libcore/MovieClip.h       2009-04-08 07:08:06 +0000
+++ b/libcore/MovieClip.h       2009-04-09 11:39:48 +0000
@@ -25,6 +25,7 @@
 #include "gnashconfig.h" // GNASH_USE_GC, USE_SWFTREE
 #endif
 
+#include "swf/ControlTag.h"
 #include "movie_definition.h" // for inlines
 #include "DisplayList.h" // DisplayList 
 #include "InteractiveObject.h"
@@ -42,7 +43,6 @@
 #include <list>
 #include <map>
 #include <string>
-#include <boost/noncopyable.hpp>
 
 // Forward declarations
 namespace gnash {
@@ -68,7 +68,7 @@
 /// This means that they define a variable scope (see
 /// the as_environment member) and are divided into "frames"
 ///
-class MovieClip : public InteractiveObject, boost::noncopyable
+class MovieClip : public InteractiveObject 
 {
 
 public:
@@ -108,24 +108,12 @@
 
     virtual ~MovieClip();
 
-    enum play_state
-    {
-        PLAY,
-        STOP
-    };
-
-    /// Type of execute tags
-    //
-    /// TODO: move to ControlTag.h ?
-    ///
-    enum control_tag_type
-    {
-        /// Action tag
-        TAG_ACTION = 1<<0,
-
-        /// DisplayList tag
-        TAG_DLIST  = 1<<1
-    };
+    enum PlayState
+    {
+        PLAYSTATE_PLAY,
+        PLAYSTATE_STOP
+    };
+
 
     // Overridden to use the m_root member
     virtual movie_instance* get_root() const;
@@ -142,7 +130,7 @@
     /// Return the sprite_definition (or movie_definition)
     /// from which this MovieClip has been created
     movie_definition* get_movie_definition() {
-        return m_def.get();
+        return _def.get();
     }
 
     /// \brief
@@ -151,7 +139,7 @@
     //
     int getSWFVersion() const
     {
-        return m_def->get_version();
+        return _def->get_version();
     }
 
     /// Get the composite bounds of all component drawing elements
@@ -173,12 +161,12 @@
     /// Return 0-based index to current frame
     size_t get_current_frame() const
     {
-        return m_current_frame;
+        return _currentFrame;
     }
 
     size_t get_frame_count() const
     {
-        return m_def->get_frame_count();
+        return _def->get_frame_count();
     }
 
     /// Return number of completely loaded frames of this sprite/movie
@@ -188,26 +176,26 @@
     ///
     size_t get_loaded_frames() const
     {
-        return m_def->get_loading_frame();
+        return _def->get_loading_frame();
     }
 
     /// Return total number of bytes in the movie
     /// (not sprite!)
     size_t get_bytes_total() const
     {
-        return isDynamic() ? 0 : m_def->get_bytes_total();
+        return isDynamic() ? 0 : _def->get_bytes_total();
     }
 
     /// Return number of loaded bytes in the movie
     /// (not sprite!)
     size_t get_bytes_loaded() const
     {
-        return isDynamic() ? 0 : m_def->get_bytes_loaded();
+        return isDynamic() ? 0 : _def->get_bytes_loaded();
     }
 
     const rect& get_frame_size() const
     {
-        return m_def->get_frame_size();
+        return _def->get_frame_size();
     }
 
     /// Stop or play the sprite.
@@ -215,9 +203,9 @@
     /// If stopped, any stream sound associated with this sprite
     /// will also be stopped.
     ///
-    DSOEXPORT void set_play_state(play_state s);
+    DSOEXPORT void setPlayState(PlayState s);
 
-    play_state get_play_state() const { return m_play_state; }
+    PlayState getPlayState() const { return _playState; }
 
     DisplayObject* getDisplayObject(int DisplayObject_id);
 
@@ -229,7 +217,7 @@
 
     bool has_looped() const
     {
-        return m_has_looped;
+        return _hasLooped;
     }
 
     /// Return true if we have any mouse event handlers.
@@ -331,7 +319,7 @@
     ///
     void swapDepths(DisplayObject* ch1, int newdepth)
     {
-        m_display_list.swapDepths(ch1, newdepth);
+        _displayList.swapDepths(ch1, newdepth);
     }
 
     /// Return the DisplayObject at given depth in our DisplayList.
@@ -416,7 +404,7 @@
     void remove_display_object(int depth, int /* id */)
     {
         set_invalidated();
-        m_display_list.removeDisplayObject(depth);
+        _displayList.removeDisplayObject(depth);
     }
 
     void unloadMovie();
@@ -601,7 +589,7 @@
 
     // inherited from DisplayObject class, see dox in DisplayObject.h
     as_environment& get_environment() {
-        return m_as_environment;
+        return _environment;
     }
 
     /// \brief
@@ -615,7 +603,7 @@
     void add_invalidated_bounds(InvalidatedRanges& ranges, bool force);
     
     const DisplayList& getDisplayList() const {
-            return m_display_list;
+            return _displayList;
     }
 
     /// Return the next highest available depth
@@ -625,16 +613,14 @@
     /// that is displayd above all others
     ///
     int getNextHighestDepth() const {
-        return m_display_list.getNextHighestDepth();
+        return _displayList.getNextHighestDepth();
     }
 
     void testInvariant() const {
-        assert(m_play_state == PLAY || m_play_state == STOP);
-
-        // m_current_frame may be 0, since this is our initial
+        // _currentFrame may be 0, since this is our initial
         // condition. Still, frame count might be 0 as well, and
         // loaded frames too !
-        //assert(m_current_frame < m_def->get_frame_count());
+        //assert(_currentFrame < _def->get_frame_count());
 #ifndef GNASH_USE_GC 
         assert(get_ref_count() > 0); // or we're constructed but
                                      // not stored in a boost::intrusive_ptr
@@ -712,12 +698,14 @@
         _drawable.beginFill(color);
     }
 
-    void beginLinearGradientFill(const std::vector<gradient_record>& grad, 
const SWFMatrix& mat)
+    void beginLinearGradientFill(const std::vector<gradient_record>& grad,
+            const SWFMatrix& mat)
     {
         _drawable.beginLinearGradientFill(grad, mat);
     }
 
-    void beginRadialGradientFill(const std::vector<gradient_record>& grad, 
const SWFMatrix& mat)
+    void beginRadialGradientFill(const std::vector<gradient_record>& grad,
+            const SWFMatrix& mat)
     {
         _drawable.beginRadialGradientFill(grad, mat);
     }
@@ -757,7 +745,6 @@
     virtual bool handleFocus();
 
     /// @} Drawing API
-    
 
     typedef std::map<std::string, std::string> VariableMap;
 
@@ -774,12 +761,12 @@
     /// from the display lists
     void cleanupDisplayList();
 
-        /// Queue the given action buffer
-        //
-        /// The action will be pushed on the current
-        /// global list (see movie_root).
-        ///
-        void queueAction(const action_buffer& buf);
+    /// Queue the given action buffer
+    //
+    /// The action will be pushed on the current
+    /// global list (see movie_root).
+    ///
+    void queueAction(const action_buffer& buf);
 
     /// Construct this instance as an ActionScript object
     //
@@ -805,11 +792,61 @@
 
 #ifdef USE_SWFTREE
     // Override to append display list info, see dox in DisplayObject.h
-    virtual InfoTree::iterator getMovieInfo(InfoTree& tr, InfoTree::iterator 
it);
+    virtual InfoTree::iterator getMovieInfo(InfoTree& tr,
+            InfoTree::iterator it);
 #endif
 
+protected:
+
+    /// Used both by this class and movie_instance.
+    //
+    /// TODO: do this with proper Sprite -> MovieClip inheritance.
+    void advance_sprite();
+
+#ifdef GNASH_USE_GC
+    /// Mark sprite-specific reachable resources and invoke
+    /// the parent's class version (markDisplayObjectReachable)
+    //
+    /// sprite-specific reachable resources are:
+    ///     - DisplayList items (current, backup and frame0 ones)
+    /// - Canvas for dynamic drawing (_drawable)
+    /// - sprite environment
+    /// - definition the sprite has been instantiated from
+    /// - Textfields having an associated variable registered in this instance.
+    /// - Relative root of this instance (m_root)
+    ///
+    virtual void markReachableResources() const;
+#endif // GNASH_USE_GC
+    
+    // Used by BitmapMovieInstance.
+    void placeDisplayObject(DisplayObject* ch, int depth) {       
+        _displayList.placeDisplayObject(ch, depth);  
+    }
+
 private:
 
+
+    /// Process any completed loadVariables request
+    void processCompletedLoadVariableRequests();
+
+    /// Process a completed loadVariables request
+    void processCompletedLoadVariableRequest(LoadVariablesThread& request);
+
+    
+    /// Execute the tags associated with the specified frame.
+    //
+    /// @param frame
+    ///     Frame number. 0-based
+    ///
+    /// @param dlist
+    ///     The display list to have control tags act upon.
+    ///
+    /// @param typeflags
+    ///     Which kind of control tags we want to execute. 
+    void executeFrameTags(size_t frame, DisplayList& dlist,
+            int typeflags = SWF::ControlTag::TAG_DLIST |
+                            SWF::ControlTag::TAG_ACTION);
+
     void stopStreamSound();
 
     /// Register this sprite as a listener of core broadcasters
@@ -852,7 +889,7 @@
     ///   more at the original depth
     /// - Dynamic instances found in the static depth zone
     /// - Execute all displaylist tags from first to one-before target frame,
-    ///   appropriately setting m_current_frame as it goes, finally execute
+    ///   appropriately setting _currentFrame as it goes, finally execute
     ///   both displaylist and action
     ///   tags for target frame.
     ///
@@ -871,7 +908,7 @@
     //
     /// POSTCONDITIONS:
     ///
-    /// - m_current_frame == targetFrame
+    /// - _currentFrame == targetFrame
     ///
     /// TODO: consider using this same function for jump-forward too,
     ///       with some modifications...
@@ -892,11 +929,28 @@
     ///
     void execute_actions(ActionList& action_list);
 
-    // TODO: shouldn't we keep this by intrusive_ptr ?
+    /// Increment _currentFrame, and take care of looping.
+    void increment_frame_and_check_for_loop();
+    
+    /// List of loadVariables requests
+    typedef std::list<LoadVariablesThread*> LoadVariablesThreads;
+
+    /// This is either sprite_definition (for sprites defined by
+    /// DefineSprite tag) or movie_def_impl (for the top-level movie).
+    boost::intrusive_ptr<movie_definition>  _def;
+
+    /// List of active loadVariable requests 
+    //
+    /// At ::advance_sprite time, all completed requests will
+    /// be processed (variables imported in this timeline scope)
+    /// and removed from the list.
+    LoadVariablesThreads _loadVariableRequests;
+
+    /// The SWF that this MovieClip belongs to.
     movie_instance* m_root;
 
     /// Current Display List contents.
-    DisplayList m_display_list;
+    DisplayList _displayList;
 
     /// The canvas for dynamic drawing
     DynamicShape _drawable;
@@ -905,22 +959,19 @@
     // actions to the global action queue
     //ActionList    m_goto_frame_action_list;
 
-    play_state  m_play_state;
+    PlayState _playState;
 
     // 0-based index to current frame
-    size_t      m_current_frame;
+    size_t _currentFrame;
 
     // true if this sprite reached the last frame and restarted
-    bool        m_has_looped;
+    bool _hasLooped;
 
     // true is we're calling frame actions
     bool _callingFrameActions;
 
     /// This timeline's variable scope
-    as_environment  m_as_environment;
-
-    /// Increment m_current_frame, and take care of looping.
-    void increment_frame_and_check_for_loop();
+    as_environment _environment;
 
     typedef boost::intrusive_ptr<TextField> TextFieldPtr;
     typedef std::vector<TextFieldPtr> TextFieldPtrVect;
@@ -960,69 +1011,6 @@
     std::string _droptarget;
 
     bool _lockroot;
-
-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);  
-    }
-
-    /// Execute the tags associated with the specified frame.
-    //
-    /// @param frame
-    ///     Frame number. 0-based
-    ///
-    /// @param dlist
-    ///     The display list to have control tags act upon.
-    ///
-    /// @param typeflags
-    ///     Which kind of control tags we want to execute. 
-    ///     See control_tag_type enum. TODO: *take* a control_tag_type ?
-    ///
-    void execute_frame_tags(size_t frame, DisplayList& dlist,
-            int typeflags = TAG_DLIST | TAG_ACTION);
-
-    /// \brief
-    /// This is either sprite_definition (for sprites defined by
-    /// DefineSprite tag) or movie_def_impl (for the top-level movie).
-    boost::intrusive_ptr<movie_definition>  m_def;
-
-    /// List of loadVariables requests
-    typedef std::list<LoadVariablesThread*> LoadVariablesThreads;
-
-    /// List of active loadVariable requests 
-    //
-    /// At ::advance_sprite time, all completed requests will
-    /// be processed (variables imported in this timeline scope)
-    /// and removed from the list.
-    LoadVariablesThreads _loadVariableRequests;
-
-    /// Process any completed loadVariables request
-    void processCompletedLoadVariableRequests();
-
-    /// Process a completed loadVariables request
-    void processCompletedLoadVariableRequest(LoadVariablesThread& request);
-
-#ifdef GNASH_USE_GC
-    /// Mark sprite-specific reachable resources and invoke
-    /// the parent's class version (markDisplayObjectReachable)
-    //
-    /// sprite-specific reachable resources are:
-    ///     - DisplayList items (current, backup and frame0 ones)
-    /// - Canvas for dynamic drawing (_drawable)
-    /// - sprite environment
-    /// - definition the sprite has been instantiated from
-    /// - Textfields having an associated variable registered in this instance.
-    /// - Relative root of this instance (m_root)
-    ///
-    virtual void markReachableResources() const;
-#endif // GNASH_USE_GC
 };
 
 /// Initialize the global MovieClip class

=== modified file 'libcore/Shape.h'
--- a/libcore/Shape.h   2009-04-07 12:45:25 +0000
+++ b/libcore/Shape.h   2009-04-09 12:45:20 +0000
@@ -27,11 +27,6 @@
 #include <cassert>
 #include <boost/shared_ptr.hpp>
 
-// Forward declarations
-namespace gnash {
-    class DefinitionTag;
-}
-
 namespace gnash {
 
 /// For DisplayObjects that don't store unusual state in their instances.

=== modified file 'libcore/StaticText.h'
--- a/libcore/StaticText.h      2009-04-07 17:48:48 +0000
+++ b/libcore/StaticText.h      2009-04-09 12:45:20 +0000
@@ -29,7 +29,6 @@
 
 // Forward declarations
 namespace gnash {
-    class DefinitionTag;
     namespace SWF {
         class TextRecord;
     }

=== modified file 'libcore/TextField.cpp'
--- a/libcore/TextField.cpp     2009-04-07 12:46:29 +0000
+++ b/libcore/TextField.cpp     2009-04-09 12:45:20 +0000
@@ -51,6 +51,7 @@
 #include <string>
 #include <boost/algorithm/string/case_conv.hpp>
 #include <boost/assign/list_of.hpp>
+#include <boost/bind.hpp>
 
 // Text fields have a fixed 2 pixel padding for each side (regardless of 
border)
 #define PADDING_TWIPS 40 
@@ -336,14 +337,14 @@
     // A cleaner implementation is likely correctly setting the
     // _xOffset and _yOffset memebers in glyph records.
     // Anyway, see bug #17954 for a testcase.
-    SWFMatrix m;
+    SWFMatrix m = getWorldMatrix();
 
-    if (!_bounds.is_null()) 
-    {
+    if (!_bounds.is_null()) {
         m.concatenate_translation(_bounds.get_x_min(), _bounds.get_y_min()); 
     }
     
-    SWF::TextRecord::displayRecords(m, *this, _textRecords, _embedFonts);
+    SWF::TextRecord::displayRecords(m, get_world_cxform(), _textRecords,
+            _embedFonts);
 
     if (m_has_focus) show_cursor(wmat);
     
@@ -1285,7 +1286,6 @@
             break;
         }
 
-
         if (m_cursor > idx)
         {
             m_xcursor = x;
@@ -1638,20 +1638,12 @@
 void
 TextField::setTextColor(const rgba& col)
 {
-    if ( _textColor != col )
-    {
+    if (_textColor != col) {
+
         set_invalidated();
-
         _textColor = col;
-
-        // Change color of all current glyph records
-        for (TextRecords::iterator i=_textRecords.begin(),
-            e = _textRecords.end(); i!=e; ++i)
-        {
-            SWF::TextRecord& rec = *i;
-            rec.setColor(_textColor);
-        }
-
+        std::for_each(_textRecords.begin(), _textRecords.end(),
+                boost::bind(&SWF::TextRecord::setColor, _1, _textColor));
     }
 }
 
@@ -2390,7 +2382,6 @@
 as_value
 textfield_setTextFormat(const fn_call& fn)
 {
-    //GNASH_REPORT_FUNCTION;
 
     boost::intrusive_ptr<TextField> text = ensureType<TextField>(fn.this_ptr);
 

=== modified file 'libcore/Video.cpp'
--- a/libcore/Video.cpp 2009-04-06 11:16:20 +0000
+++ b/libcore/Video.cpp 2009-04-08 13:00:17 +0000
@@ -269,8 +269,7 @@
 }
 
 void
-Video::add_invalidated_bounds(InvalidatedRanges& ranges, 
-       bool force)
+Video::add_invalidated_bounds(InvalidatedRanges& ranges, bool force)
 {      
        if (!force && !m_invalidated) return; // no need to redraw
     

=== modified file 'libcore/impl.cpp'
--- a/libcore/impl.cpp  2009-04-07 12:45:25 +0000
+++ b/libcore/impl.cpp  2009-04-09 12:45:20 +0000
@@ -348,8 +348,7 @@
       return NULL;
   }
 
-  std::string urlstr = url.str();
-  const char* movie_url = reset_url ? reset_url : urlstr.c_str();
+  std::string movie_url = reset_url ? reset_url : url.str();
   movie_definition* ret = create_movie(in, movie_url, runInfo,
           startLoaderThread);
 
@@ -557,7 +556,8 @@
     /// Mark all library elements as reachable (for GC)
     void markReachableResources() const
     {
-        for ( LibraryContainer::const_iterator i=_map.begin(), e=_map.end(); 
i!=e; ++i)
+        for (LibraryContainer::const_iterator i=_map.begin(), e=_map.end();
+                i!=e; ++i)
         {
             i->second.def->setReachable();
         }

=== modified file 'libcore/movie_root.h'
--- a/libcore/movie_root.h      2009-04-04 20:08:19 +0000
+++ b/libcore/movie_root.h      2009-04-09 11:39:48 +0000
@@ -392,9 +392,9 @@
     /// Delegate to originating root movie
     //
     /// TODO: drop ?
-    void set_play_state(MovieClip::play_state s)
+    void set_play_state(MovieClip::PlayState s)
     {
-        getRootMovie()->set_play_state(s);
+        getRootMovie()->setPlayState(s);
     }
 
     /// Notify still loaded DisplayObject listeners for key events

=== modified file 'libcore/parser/SWFMovieDefinition.cpp'
--- a/libcore/parser/SWFMovieDefinition.cpp     2009-04-07 12:52:56 +0000
+++ b/libcore/parser/SWFMovieDefinition.cpp     2009-04-09 08:59:49 +0000
@@ -234,7 +234,7 @@
 }
 
 SWF::DefinitionTag*
-SWFMovieDefinition::getDefinitionTag(int id)
+SWFMovieDefinition::getDefinitionTag(int id) const
 {
 
        boost::mutex::scoped_lock lock(_dictionaryMutex);
@@ -277,9 +277,9 @@
 }
 
 BitmapInfo*
-SWFMovieDefinition::getBitmap(int id)
+SWFMovieDefinition::getBitmap(int id) const
 {
-    Bitmaps::iterator it = _bitmaps.find(id);
+    Bitmaps::const_iterator it = _bitmaps.find(id);
     if (it == _bitmaps.end()) return 0;
     
     return it->second.get();
@@ -293,10 +293,11 @@
 
 }
 
-sound_sample* SWFMovieDefinition::get_sound_sample(int id)
+sound_sample*
+SWFMovieDefinition::get_sound_sample(int id) const
 {
-    SoundSampleMap::iterator it = m_sound_samples.find(id);
-    if ( it == m_sound_samples.end() ) return NULL;
+    SoundSampleMap::const_iterator it = m_sound_samples.find(id);
+    if ( it == m_sound_samples.end() ) return 0;
 
     boost::intrusive_ptr<sound_sample> ch = it->second;
 #ifndef GNASH_USE_GC
@@ -511,9 +512,9 @@
 }
 
 boost::intrusive_ptr<SWF::DefinitionTag>
-CharacterDictionary::getDisplayObject(int id)
+CharacterDictionary::getDisplayObject(int id) const
 {
-       CharacterIterator it = _map.find(id);
+    CharacterConstIterator it = _map.find(id);
        if ( it == _map.end() )
        {
                IF_VERBOSE_PARSE(
@@ -529,7 +530,6 @@
 CharacterDictionary::addDisplayObject(int id,
         boost::intrusive_ptr<SWF::DefinitionTag> c)
 {
-       //log_debug(_("CharacterDictionary: add char %d"), id);
        _map[id] = c;
 }
 
@@ -851,7 +851,8 @@
 }
 
 bool
-SWFMovieDefinition::get_labeled_frame(const std::string& label, size_t& 
frame_number)
+SWFMovieDefinition::get_labeled_frame(const std::string& label,
+        size_t& frame_number)
 {
     boost::mutex::scoped_lock lock(_namedFramesMutex);
     NamedFrameMap::const_iterator it = _namedFrames.find(label);

=== modified file 'libcore/parser/SWFMovieDefinition.h'
--- a/libcore/parser/SWFMovieDefinition.h       2009-04-07 12:46:29 +0000
+++ b/libcore/parser/SWFMovieDefinition.h       2009-04-09 12:45:20 +0000
@@ -27,7 +27,6 @@
 #endif
 
 #include "smart_ptr.h" // GNASH_USE_GC
-#include "fontlib.h"
 #include "GnashImageJpeg.h"
 #include "IOChannel.h"
 #include "movie_definition.h" // for inheritance
@@ -130,7 +129,7 @@
        //
        /// returns a NULL if the id is unknown.
        ///
-       boost::intrusive_ptr<SWF::DefinitionTag> getDisplayObject(int id);
+       boost::intrusive_ptr<SWF::DefinitionTag> getDisplayObject(int id) const;
 
        /// Add a Character assigning it the given id
        //
@@ -250,10 +249,7 @@
 
        /// \brief
        /// Return a DisplayObject from the dictionary
-       /// NOTE: call add_ref() on the return or put in a 
boost::intrusive_ptr<>
-       /// TODO: return a boost::intrusive_ptr<> directly...
-       ///
-    SWF::DefinitionTag* getDefinitionTag(int DisplayObject_id);
+    SWF::DefinitionTag* getDefinitionTag(int DisplayObject_id) const;
 
        // See dox in movie_definition
        //
@@ -263,30 +259,30 @@
 
        void    add_font(int font_id, Font* f);
 
-       Font*   get_font(int font_id) const;
+       Font* get_font(int font_id) const;
 
        Font* get_font(const std::string& name, bool bold, bool italic) const;
 
        // See dox in movie_definition.h
-       BitmapInfo* getBitmap(int DisplayObject_id);
+       BitmapInfo* getBitmap(int DisplayObject_id) const;
 
        // See dox in movie_definition.h
        void addBitmap(int DisplayObject_id, boost::intrusive_ptr<BitmapInfo> 
im);
 
        // See dox in movie_definition.h
-       sound_sample*   get_sound_sample(int DisplayObject_id);
-
-       // See dox in movie_definition.h
-       virtual void    add_sound_sample(int DisplayObject_id, sound_sample* 
sam);
-
-       // See dox in movie_definition.h
-       virtual void    set_loading_sound_stream_id(int id) { 
m_loading_sound_stream = id; }
-
-       // See dox in movie_definition.h
-       int get_loading_sound_stream_id() { return m_loading_sound_stream; }
-
-       // See dox in movie_definition.h
-       void    addControlTag(ControlTag* tag)
+       sound_sample* get_sound_sample(int DisplayObject_id) const;
+
+       // See dox in movie_definition.h
+       virtual void add_sound_sample(int DisplayObject_id, sound_sample* sam);
+
+       // See dox in movie_definition.h
+       virtual void set_loading_sound_stream_id(int id) { 
m_loading_sound_stream = id; }
+
+       // See dox in movie_definition.h
+       int get_loading_sound_stream_id() const { return 
m_loading_sound_stream; }
+
+       // See dox in movie_definition.h
+       void addControlTag(SWF::ControlTag* tag)
        {
            assert(tag);
            boost::mutex::scoped_lock lock(_frames_loaded_mutex);
@@ -318,7 +314,7 @@
        }
 
        // See dox in movie_definition.h
-       JpegImageInput* get_jpeg_loader()
+       JpegImageInput* get_jpeg_loader() const
        {
            return m_jpeg_in.get();
        }

=== modified file 'libcore/parser/movie_definition.h'
--- a/libcore/parser/movie_definition.h 2009-04-07 13:13:16 +0000
+++ b/libcore/parser/movie_definition.h 2009-04-09 08:59:49 +0000
@@ -64,7 +64,9 @@
        class BitmapInfo;
        class movie_instance;
        class MovieClip;
-       class ControlTag;
+       namespace SWF {
+        class ControlTag;
+    }
     class Font;
     class ExportableResource;
     class sound_sample;
@@ -96,7 +98,7 @@
 class movie_definition : public SWF::DefinitionTag
 {
 public:
-       typedef std::vector<ControlTag*> PlayList;
+       typedef std::vector<SWF::ControlTag*> PlayList;
 
        virtual int     get_version() const = 0;
        virtual float   get_width_pixels() const = 0;
@@ -195,7 +197,7 @@
        /// @return NULL if no DisplayObject with the given ID is found
        ///         (this is the default)
        ///
-       virtual DefinitionTag*  getDefinitionTag(int /*id*/)
+       virtual DefinitionTag* getDefinitionTag(int /*id*/) const
        {
                return NULL;
        }
@@ -276,7 +278,7 @@
        /// TODO: take an auto_ptr.
        /// NOTE: the default implementation just let the ControlTag leak.
        ///
-       virtual void    addControlTag(ControlTag* /*c*/)
+       virtual void addControlTag(SWF::ControlTag* /*c*/)
        {
        }
 
@@ -314,7 +316,7 @@
        ///
        /// NOTE: ownership of the returned object is NOT transferred
        ///
-       virtual JpegImageInput* get_jpeg_loader()
+       virtual JpegImageInput* get_jpeg_loader() const
        {
                return NULL;
        }
@@ -332,7 +334,7 @@
        ///
        /// The default implementation returns 0.
        ///
-       virtual BitmapInfo* getBitmap(int /*DisplayObject_id*/)
+       virtual BitmapInfo* getBitmap(int /*DisplayObject_id*/) const
        {
                return 0;
        }
@@ -354,7 +356,7 @@
        ///
        /// The default implementation always returns NULL
        ///
-       virtual sound_sample* get_sound_sample(int /*DisplayObject_id*/)
+       virtual sound_sample* get_sound_sample(int /*DisplayObject_id*/) const
        {
                return NULL;
        }
@@ -385,7 +387,7 @@
        ///
        /// @returns -1 if no sound stream is being currently loading
        ///
-       virtual int get_loading_sound_stream_id()
+       virtual int get_loading_sound_stream_id() const
        {
                return -1;
        }

=== modified file 'libcore/parser/sprite_definition.h'
--- a/libcore/parser/sprite_definition.h        2009-04-07 12:51:13 +0000
+++ b/libcore/parser/sprite_definition.h        2009-04-09 08:59:49 +0000
@@ -160,7 +160,7 @@
        }
 
        /// Delegate call to associated root movie
-       virtual BitmapInfo* getBitmap(int id)
+       virtual BitmapInfo* getBitmap(int id) const
        {
                return m_movie_def.getBitmap(id);
        }
@@ -174,7 +174,7 @@
        }
 
        /// Delegate call to associated root movie
-       virtual sound_sample* get_sound_sample(int id)
+       virtual sound_sample* get_sound_sample(int id) const
        {
                return m_movie_def.get_sound_sample(id);
        }
@@ -195,7 +195,7 @@
        }
 
        // See dox in movie_definition.h
-       virtual int get_loading_sound_stream_id()
+       virtual int get_loading_sound_stream_id() const
        {
                return _loadingSoundStream;
        }
@@ -227,7 +227,7 @@
        /// Get a SWF::DefinitionTag from this Sprite's root movie
        /// CharacterDictionary.
        ///
-       virtual SWF::DefinitionTag*     getDefinitionTag(int id)
+       virtual SWF::DefinitionTag*     getDefinitionTag(int id) const
        {
            return m_movie_def.getDefinitionTag(id);
        }
@@ -275,7 +275,7 @@
 
 
        // See dox in movie_definition.h
-       virtual void    addControlTag(ControlTag* c)
+       virtual void addControlTag(SWF::ControlTag* c)
        {
                m_playlist[m_loading_frame].push_back(c);
        }

=== modified file 'libcore/swf/ControlTag.h'
--- a/libcore/swf/ControlTag.h  2009-02-25 22:33:03 +0000
+++ b/libcore/swf/ControlTag.h  2009-04-09 11:39:48 +0000
@@ -20,19 +20,29 @@
 
 #include <cassert>
 
-namespace gnash {
-
 // Forward declarations
-class MovieClip;
-class DisplayList;
+namespace gnash {
+    class MovieClip;
+    class DisplayList;
+}
+
+namespace gnash {
+namespace SWF {
 
 /// Control tags are swf tags that control the operation of the movie. 
 //
-/// Essentially, these are the events associated with a frame.
+/// These are the events associated with a frame.
 ///
 class ControlTag
 {
 public:
+    
+    /// Type of ControlTag
+    enum Type
+    {
+        TAG_ACTION = 1 << 0,
+        TAG_DLIST  = 1 << 1
+    };
 
        virtual ~ControlTag()
        {
@@ -63,10 +73,10 @@
 };
 
 
+} // namespace SWF
 } // namespace gnash
 
-
-#endif // GNASH_EXECUTE_TAG_H
+#endif 
 
 
 // Local Variables:

=== modified file 'libcore/swf/DefineTextTag.cpp'
--- a/libcore/swf/DefineTextTag.cpp     2009-04-07 11:14:10 +0000
+++ b/libcore/swf/DefineTextTag.cpp     2009-04-09 06:17:15 +0000
@@ -109,10 +109,10 @@
 DefineTextTag::display(const StaticText& inst) const
 {
 
-       const bool useEmbeddedGlyphs = true;
+    SWFMatrix mat = inst.getWorldMatrix();
+    mat.concatenate(_matrix);
 
-    TextRecord::displayRecords(_matrix, inst, _textRecords,
-            useEmbeddedGlyphs); 
+    TextRecord::displayRecords(mat, inst.get_world_cxform(), _textRecords);
 }
 
 

=== modified file 'libcore/swf/DefineTextTag.h'
--- a/libcore/swf/DefineTextTag.h       2009-04-07 12:34:43 +0000
+++ b/libcore/swf/DefineTextTag.h       2009-04-08 14:08:39 +0000
@@ -88,7 +88,7 @@
 
        void read(SWFStream& in, movie_definition& m, TagType tag);
        
-    std::vector<TextRecord> _textRecords;
+    TextRecord::TextRecords _textRecords;
 };
 
 /// Parse a DefineText2Tag.

=== modified file 'libcore/swf/TextRecord.cpp'
--- a/libcore/swf/TextRecord.cpp        2009-04-08 08:58:27 +0000
+++ b/libcore/swf/TextRecord.cpp        2009-04-09 06:29:33 +0000
@@ -144,22 +144,15 @@
 
 // Render the given glyph records.
 void
-TextRecord::displayRecords(const SWFMatrix& this_mat,
-        const DisplayObject& inst, const std::vector<TextRecord>& records,
-        bool embedded)
+TextRecord::displayRecords(const SWFMatrix& mat, const cxform& cx,
+        const TextRecords& records, bool embedded)
 {
 
-    SWFMatrix mat = inst.getWorldMatrix();
-    mat.concatenate(this_mat);
-
-    cxform cx = inst.get_world_cxform();
-    const SWFMatrix base_matrix = mat;
-
     // Starting positions.
     float x = 0.0f;
     float y = 0.0f;
 
-    for (std::vector<TextRecord>::const_iterator i = records.begin(),
+    for (TextRecords::const_iterator i = records.begin(),
             e = records.end(); i !=e; ++i)
     {
 
@@ -189,7 +182,7 @@
 
         boost::int16_t startX = x; // for the underline, if any
 
-        rgba textColor = cx.transform(rec.color());
+        const rgba textColor = cx.transform(rec.color());
 
         for (Glyphs::const_iterator j = rec.glyphs().begin(),
                 je = rec.glyphs().end(); j != je; ++j)
@@ -199,15 +192,11 @@
 
             const int index = ge.index;
                 
-            mat = base_matrix;
-            mat.concatenate_translation(x, y);
-            mat.concatenate_scale(scale, scale);
+            SWFMatrix m = mat;
+            m.concatenate_translation(x, y);
+            m.concatenate_scale(scale, scale);
 
-            if (index == -1)
-            {
-#ifdef GNASH_DEBUG_TEXT_RENDERING
-    log_error(_("invalid glyph (-1)"));
-#endif
+            if (index == -1) {
 
 #ifdef DRAW_INVALID_GLYPHS_AS_EMPTY_BOXES
                 // The EM square is 1024x1024, but usually isn't filled up.
@@ -219,25 +208,21 @@
                 //       square is not hard-coded anymore but can be
                 //       queried from the font class
                 //
-                static const std::vector<point> emptyCharBox = 
boost::assign::list_of
-                     (point(32, 32))
-                     (point(480, 32))
-                     (point(480, -656))
-                     (point(32, -656))
-                     (point(32,32));
-                render::drawLine(emptyCharBox, textColor, mat);  
+                static const std::vector<point> emptyCharBox =
+                    boost::assign::list_of (point(32, 32))
+                                           (point(480, 32))
+                                           (point(480, -656))
+                                           (point(32, -656))
+                                           (point(32,32));
+                render::drawLine(emptyCharBox, textColor, m);
 #endif
 
             }
-            else
-            {
+            else {
                 ShapeRecord* glyph = fnt->get_glyph(index, embedded);
 
                 // Draw the DisplayObject using the filled outline.
-                if (glyph)
-                {
-                    render::drawGlyph(*glyph, textColor, mat);
-                }
+                if (glyph) render::drawGlyph(*glyph, textColor, m);
             }
             x += ge.advance;
         }
@@ -252,7 +237,7 @@
             // This will only be known if a glyph was actually found,
             // or would be the size of the empty box (arbitrary size)
             //
-            boost::int16_t endX = (int)x; // - 
rec.m_glyphs.back().m_glyph_advance + (480.0*scale);
+            boost::int16_t endX = static_cast<boost::int16_t>(x); 
 
             // The underline is made to be some pixels below the baseline (0)
             // and scaled so it's further as font size increases.
@@ -264,7 +249,7 @@
                 (point(startX, posY))
                 (point(endX, posY));
 
-            render::drawLine(underline, textColor, base_matrix);
+            render::drawLine(underline, textColor, mat);
         }
     }
 }

=== modified file 'libcore/swf/TextRecord.h'
--- a/libcore/swf/TextRecord.h  2009-04-07 11:14:10 +0000
+++ b/libcore/swf/TextRecord.h  2009-04-09 06:17:15 +0000
@@ -23,10 +23,10 @@
 #include <vector>
 
 namespace gnash {
-    class DisplayObject;
     class movie_definition;
     class SWFStream;
     class SWFMatrix;
+    class cxform;
     class Font;
 }
 
@@ -43,6 +43,8 @@
 {
 public:
 
+    typedef std::vector<TextRecord> TextRecords;
+
     struct GlyphEntry
     {
         int index;
@@ -86,10 +88,8 @@
     bool read(SWFStream& in, movie_definition& m, int glyphBits,
             int advanceBits, TagType tag);
 
-    static void displayRecords(const SWFMatrix& this_mat,
-            const DisplayObject& inst,
-            const std::vector<SWF::TextRecord>& records,
-            bool useEmbeddedGlyphs);
+    static void displayRecords(const SWFMatrix& mat, const cxform& cx,
+            const TextRecords& records, bool embedded = true);
 
     const Glyphs& glyphs() const {
         return _glyphs;

=== modified file 'libcore/swf/tag_loaders.cpp'
--- a/libcore/swf/tag_loaders.cpp       2009-04-07 12:46:29 +0000
+++ b/libcore/swf/tag_loaders.cpp       2009-04-09 12:45:20 +0000
@@ -27,7 +27,6 @@
 #include "action.h"
 #include "action_buffer.h"
 #include "Font.h"
-#include "fontlib.h"
 #include "log.h"
 #include "Geometry.h"
 #include "SWFStream.h"

=== modified file 'libcore/swf_event.h'
--- a/libcore/swf_event.h       2009-02-25 22:33:03 +0000
+++ b/libcore/swf_event.h       2009-04-08 10:58:37 +0000
@@ -72,7 +72,7 @@
        /// (by PlaceObject tag in this design)
        /// and may be shared between multiple swf_events
        ///
-       action_buffer& m_action_buffer;
+       const action_buffer& m_action_buffer;
 
        /// Can't assign to an swf_event
        void operator=(const swf_event& /*s*/);

=== modified file 'libcore/vm/ASHandlers.cpp'
--- a/libcore/vm/ASHandlers.cpp 2009-04-03 09:51:28 +0000
+++ b/libcore/vm/ASHandlers.cpp 2009-04-09 11:39:48 +0000
@@ -506,7 +506,7 @@
 
     DisplayObject* tgtch = env.get_target();
     MovieClip* tgt = tgtch ? tgtch->to_movie() : 0;
-    if ( tgt ) tgt->set_play_state(MovieClip::PLAY);
+    if ( tgt ) tgt->setPlayState(MovieClip::PLAYSTATE_PLAY);
     else log_debug(_("ActionPlay: as_environment target is null or not a 
sprite"));
 }
 
@@ -522,7 +522,7 @@
 
     DisplayObject* tgtch = env.get_target();
     MovieClip* tgt = tgtch ? tgtch->to_movie() : 0;
-    if ( tgt ) tgt->set_play_state(MovieClip::STOP);
+    if ( tgt ) tgt->setPlayState(MovieClip::PLAYSTATE_STOP);
     else log_debug(_("ActionStop: as_environment target is null or not a 
sprite"));
 }
 
@@ -2555,7 +2555,8 @@
     // frame is shown in stop mode.
 
     unsigned char play_flag = code[pc + 3];
-    MovieClip::play_state state = play_flag ? MovieClip::PLAY : 
MovieClip::STOP;
+    const MovieClip::PlayState state = 
+        play_flag ? MovieClip::PLAYSTATE_PLAY : MovieClip::PLAYSTATE_STOP;
 
     std::string target_frame = env.pop().to_string();
     std::string target_path;
@@ -2590,7 +2591,7 @@
             return;
         }
         target_sprite->goto_frame(frame_number);
-        target_sprite->set_play_state(state);
+        target_sprite->setPlayState(state);
     }
     else
     {

=== modified file 'testsuite/actionscript.all/MovieClip.as'
--- a/testsuite/actionscript.all/MovieClip.as   2009-03-03 16:26:50 +0000
+++ b/testsuite/actionscript.all/MovieClip.as   2009-04-09 11:39:48 +0000
@@ -115,15 +115,15 @@
 #endif
 
 #if OUTPUT_VERSION == 6
-       check_totals(891); // SWF6
+       check_totals(894); // SWF6
 #endif
 
 #if OUTPUT_VERSION == 7
-       check_totals(908); // SWF7
+       check_totals(911); // SWF7
 #endif
 
 #if OUTPUT_VERSION >= 8
-       check_totals(1000); // SWF8+
+       check_totals(1003); // SWF8+
 #endif
 
        play();
@@ -131,7 +131,7 @@
 
 #if OUTPUT_VERSION < 6
 note("WARNING: it has been reported that adobe flash player version 9 fails a 
few tests here.");
-note("         We belive those are actually adobe player bugs since older 
versions ");
+note("         We believe those are actually adobe player bugs since older 
versions ");
 note("         of the player are reported to pass all tests. If you have 
another idea ");
 note("         we'd be glad to hear from you, just check the testcase source 
code.");
 note();
@@ -516,6 +516,7 @@
 check_equals(mc2_mc.getBytesTotal(), 0);
 check_equals(mc2.getBytesLoaded(), 0);
 check_equals(mc2.getBytesTotal(), 0);
+check_equals(mc2._url, _root._url);
 
 xcheck(!mc2.hasOwnProperty('_parent'));
 
@@ -929,6 +930,10 @@
 check_equals(_root.copy1.getDepth(), 63);
 check_equals(_root.copy1._x, 100);
 
+duplicateMovieClip(_root, "copy88", -1000);
+check_equals(typeof(_root.getBytesLoaded()), "number");
+check_equals(copy88.getBytesLoaded(), undefined);
+
 #if OUTPUT_VERSION == 6
 // SWF7 and higher removed duplicateMovieClip method of MovieClip class
 _root.original.duplicateMovieClip("copy2", 64);

=== modified file 'testsuite/libcore.all/ClassSizes.cpp'
--- a/testsuite/libcore.all/ClassSizes.cpp      2009-04-07 16:32:11 +0000
+++ b/testsuite/libcore.all/ClassSizes.cpp      2009-04-09 12:45:20 +0000
@@ -32,6 +32,20 @@
 #include "Button.h"
 #include "MorphShape.h"
 #include "Shape.h"
+#include "TextField.h"
+#include "SWFStream.h"
+#include "swf/DefineFontAlignZonesTag.h"
+#include "swf/DefineShapeTag.h"
+#include "swf/DefineButtonCxformTag.h"
+#include "swf/CSMTextSettingsTag.h"
+#include "swf/DefineFontTag.h"
+#include "swf/DefineTextTag.h"
+#include "swf/PlaceObject2Tag.h"
+#include "swf/RemoveObjectTag.h"
+#include "swf/DoActionTag.h"
+#include "swf/DoInitActionTag.h"
+#include "swf/DefineEditTextTag.h"
+#include "swf/SetBackgroundColorTag.h"
 
 #include <iostream>
 #include <sstream>
@@ -43,42 +57,35 @@
 
 #include "check.h"
 
+#include <boost/preprocessor/seq/for_each.hpp>
+
 using namespace gnash;
 using namespace std;
 using namespace boost;
+using namespace gnash::SWF;
+
+#define SIZE(x, _, t) \
+    std::cout << BOOST_PP_STRINGIZE(t)": " << (sizeof(t)) << "\n";
+
+// Add types in brackets to this macro to have their size printed.
+#define TYPES \
+(int) (float) (long) (double) \
+(Property*) (auto_ptr<Property>) (scoped_ptr<Property>) \
+(shared_ptr<Property>) (intrusive_ptr<as_object>) (GcResource) \
+(rgba) (SWFMatrix) (rect) (line_style) (fill_style) (cxform) \
+(as_value) \
+(DynamicShape)(ShapeRecord)(TextRecord) \
+(Property) (PropertyList) \
+(DefinitionTag) (DefineTextTag) (DefineFontTag) (DefineMorphShapeTag) \
+(as_object) \
+(DisplayObject) (StaticText) (MorphShape) (Shape) \
+(InteractiveObject) (MovieClip) (TextField) (Button) (movie_instance) \
+(movie_root) 
 
 int
 main(int /*argc*/, char** /*argv*/)
 {
-       std::cout << "sizeof(int): " << (sizeof(int)) << std::endl;
-       std::cout << "sizeof(float): " << (sizeof(float)) << std::endl;
-
-       std::cout << "sizeof(long): " << (sizeof(long)) << std::endl;
-       std::cout << "sizeof(double): " << (sizeof(double)) << std::endl;
-
-       std::cout << "sizeof(as_value): " << (sizeof(as_value)) << std::endl;
-
-       std::cout << "sizeof(Property): " << (sizeof(Property)) << std::endl;
-       std::cout << "sizeof(Property*): " << (sizeof(Property*)) << std::endl;
-       std::cout << "sizeof(PropertyList): " << (sizeof(PropertyList)) << 
std::endl;
-       std::cout << "sizeof(auto_ptr<PropertyList>): " << 
(sizeof(auto_ptr<PropertyList>)) << std::endl;
-       std::cout << "sizeof(scoped_ptr<PropertyList>): " << 
(sizeof(scoped_ptr<PropertyList>)) << std::endl;
-
-       std::cout << "sizeof(GcResource): " << (sizeof(GcResource)) << 
std::endl;
-       std::cout << "sizeof(as_object): " << (sizeof(as_object)) << std::endl;
-       std::cout << "sizeof(DisplayObject): " << (sizeof(DisplayObject)) << 
std::endl;
-       std::cout << "sizeof(MovieClip): " << (sizeof(MovieClip)) << std::endl;
-
-       std::cout << "sizeof(rgba): " << (sizeof(rgba)) << std::endl;
-       std::cout << "sizeof(line_style): " << (sizeof(line_style)) << 
std::endl;
-       std::cout << "sizeof(fill_style): " << (sizeof(fill_style)) << 
std::endl;
-       std::cout << "sizeof(SWFMatrix): " << (sizeof(SWFMatrix)) << std::endl;
-       std::cout << "sizeof(movie_root): " << (sizeof(movie_root)) << 
std::endl;
-       
-    std::cout << "sizeof(ShapeRecord): " << (sizeof(SWF::ShapeRecord)) << 
std::endl;
-       std::cout << "sizeof(StaticText): " << (sizeof(StaticText)) << 
std::endl;
-       std::cout << "sizeof(MorphShape): " << (sizeof(MorphShape)) << 
std::endl;
-       std::cout << "sizeof(Shape): " << (sizeof(Shape)) << std::endl;
-       std::cout << "sizeof(Button): " << (sizeof(Button)) << std::endl;
+    std::cout << "Gnash class sizes:\n";
+    BOOST_PP_SEQ_FOR_EACH(SIZE, _, TYPES)
 }
 

=== modified file 'testsuite/misc-ming.all/ButtonEventsTest-Runner.cpp'
--- a/testsuite/misc-ming.all/ButtonEventsTest-Runner.cpp       2009-04-03 
09:29:19 +0000
+++ b/testsuite/misc-ming.all/ButtonEventsTest-Runner.cpp       2009-04-09 
11:41:59 +0000
@@ -306,7 +306,7 @@
        }
 
        // last advance should not restart the loop (it's in STOP mode)
-        check_equals(root->get_play_state(), MovieClip::STOP);
+        check_equals(root->getPlayState(), MovieClip::PLAYSTATE_STOP);
        check_equals(root->get_current_frame(), 6);
 
 }

=== modified file 'testsuite/misc-ming.all/DefineEditTextTest-Runner.cpp'
--- a/testsuite/misc-ming.all/DefineEditTextTest-Runner.cpp     2009-04-03 
09:29:19 +0000
+++ b/testsuite/misc-ming.all/DefineEditTextTest-Runner.cpp     2009-04-09 
11:41:59 +0000
@@ -46,7 +46,7 @@
        assert(root);
 
        check_equals(root->get_frame_count(), 5);
-       check_equals(root->get_play_state(), MovieClip::PLAY);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_PLAY);
        check_equals(root->get_current_frame(), 0);
 
        for (int i=0; i<30; ++i)

=== modified file 
'testsuite/misc-ming.all/DefineEditTextVariableNameTest-Runner.cpp'
--- a/testsuite/misc-ming.all/DefineEditTextVariableNameTest-Runner.cpp 
2009-04-03 09:29:19 +0000
+++ b/testsuite/misc-ming.all/DefineEditTextVariableNameTest-Runner.cpp 
2009-04-09 11:41:59 +0000
@@ -43,7 +43,7 @@
        assert(root);
 
        check_equals(root->get_frame_count(), 14);
-       check_equals(root->get_play_state(), MovieClip::PLAY);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_PLAY);
        check_equals(root->get_current_frame(), 0);
 
        const DisplayObject* mc1 = tester.findDisplayItemByName(*root, "mc1");
@@ -59,12 +59,12 @@
        for (unsigned f=root->get_current_frame(); f<root->get_frame_count()-1; 
++f)
        {
                check_equals(root->get_current_frame(), f);
-               check_equals(root->get_play_state(), MovieClip::PLAY);
+               check_equals(root->getPlayState(), MovieClip::PLAYSTATE_PLAY);
                tester.advance();
        }
 
        // does stop() on last frame
-       check_equals(root->get_play_state(), MovieClip::STOP);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_STOP);
        check_equals(root->get_current_frame(), root->get_frame_count()-1);
 
 }

=== modified file 'testsuite/misc-ming.all/DefineTextTest-Runner.cpp'
--- a/testsuite/misc-ming.all/DefineTextTest-Runner.cpp 2009-04-03 09:29:19 
+0000
+++ b/testsuite/misc-ming.all/DefineTextTest-Runner.cpp 2009-04-09 11:41:59 
+0000
@@ -48,7 +48,7 @@
        assert(root);
 
        check_equals(root->get_frame_count(), 3);
-       check_equals(root->get_play_state(), MovieClip::PLAY);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_PLAY);
        check_equals(root->get_current_frame(), 0);
 
        rgba white(255,255,255,255);

=== modified file 'testsuite/misc-ming.all/RollOverOutTest-Runner.cpp'
--- a/testsuite/misc-ming.all/RollOverOutTest-Runner.cpp        2009-04-03 
09:29:19 +0000
+++ b/testsuite/misc-ming.all/RollOverOutTest-Runner.cpp        2009-04-09 
11:41:59 +0000
@@ -46,7 +46,7 @@
        assert(root);
 
        check_equals(root->get_frame_count(), 4);
-       check_equals(root->get_play_state(), MovieClip::PLAY);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_PLAY);
        check_equals(root->get_current_frame(), 0);
 
        tester.advance();  // advance to the second frame.
@@ -58,7 +58,7 @@
 
        check_equals(mc1->isVisible(), true);
        check_equals(mc2->isVisible(), false);
-       check_equals(root->get_play_state(), MovieClip::STOP);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_STOP);
        check_equals(root->get_current_frame(), 1);
 
        // we're in stop mode, so advance should not advance anything
@@ -73,7 +73,7 @@
        tester.movePointerTo(60, 60);
        tester.advance();
        check_equals(root->get_current_frame(), 2);
-       check_equals(root->get_play_state(), MovieClip::STOP);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_STOP);
        tester.advance();
        check_equals(root->get_current_frame(), 2);
 

=== modified file 'testsuite/misc-ming.all/SpriteButtonEventsTest-Runner.cpp'
--- a/testsuite/misc-ming.all/SpriteButtonEventsTest-Runner.cpp 2009-04-03 
09:29:19 +0000
+++ b/testsuite/misc-ming.all/SpriteButtonEventsTest-Runner.cpp 2009-04-09 
11:41:59 +0000
@@ -269,7 +269,7 @@
        }
 
        // last advance should not restart the loop (it's in STOP mode)
-        check_equals(root->get_play_state(), MovieClip::STOP);
+        check_equals(root->getPlayState(), MovieClip::PLAYSTATE_STOP);
        check_equals(root->get_current_frame(), 4);
 
 }

=== modified file 'testsuite/misc-ming.all/Video-EmbedSquareTestRunner.cpp'
--- a/testsuite/misc-ming.all/Video-EmbedSquareTestRunner.cpp   2009-04-03 
09:29:19 +0000
+++ b/testsuite/misc-ming.all/Video-EmbedSquareTestRunner.cpp   2009-04-09 
11:41:59 +0000
@@ -89,7 +89,7 @@
                        // Frame X
                        tester.advance();
                        int framenum = root->get_current_frame();
-                       cout << "---- Pixel checking in frame " << framenum+1 
<< " play state " << root->get_play_state() << endl;
+                       cout << "---- Pixel checking in frame " << framenum+1 
<< " play state " << root->getPlayState() << endl;
                        
                        int i = (framenum-1)*10;
 
@@ -111,7 +111,7 @@
                        if ( framenum == framecount-2 )
                        {
                                // check we're playing, or we'll never get to 
next loop...
-                               check_equals(root->get_play_state(), 
MovieClip::PLAY);
+                               check_equals(root->getPlayState(), 
MovieClip::PLAYSTATE_PLAY);
                                break;
                        }
 
@@ -123,11 +123,11 @@
                // Check the color in (5,5) - should be yellow. Well, anything
                // but white or transparent.
                check_pixel(5, 5, 2, yellow, 5);
-               check_equals(root->get_play_state(), MovieClip::STOP);
+               check_equals(root->getPlayState(), MovieClip::PLAYSTATE_STOP);
                tester.click();
 
                // Sanity check
-               check_equals(root->get_play_state(), MovieClip::PLAY);
+               check_equals(root->getPlayState(), MovieClip::PLAYSTATE_PLAY);
 
                tester.advance();
 

=== modified file 'testsuite/misc-ming.all/attachMovieLoopingTestRunner.cpp'
--- a/testsuite/misc-ming.all/attachMovieLoopingTestRunner.cpp  2009-04-03 
09:29:19 +0000
+++ b/testsuite/misc-ming.all/attachMovieLoopingTestRunner.cpp  2009-04-09 
11:41:59 +0000
@@ -46,7 +46,7 @@
        assert(root);
 
        check_equals(root->get_frame_count(), 2);
-       check_equals(root->get_play_state(), MovieClip::PLAY);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_PLAY);
        check_equals(root->get_current_frame(), 0);
 
        check(! tester.findDisplayItemByDepth(*root, 70) );

=== modified file 'testsuite/misc-ming.all/attachMovieTestRunner.cpp'
--- a/testsuite/misc-ming.all/attachMovieTestRunner.cpp 2009-04-03 09:29:19 
+0000
+++ b/testsuite/misc-ming.all/attachMovieTestRunner.cpp 2009-04-09 11:41:59 
+0000
@@ -49,7 +49,7 @@
        as_value tmp;
 
        check_equals(root->get_frame_count(), 5);
-       check_equals(root->get_play_state(), MovieClip::PLAY);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_PLAY);
        check_equals(root->get_current_frame(), 0);
 
        check(! tester.findDisplayItemByDepth(*root, 70) );

=== modified file 'testsuite/misc-ming.all/intervalTestRunner.cpp'
--- a/testsuite/misc-ming.all/intervalTestRunner.cpp    2009-04-03 09:29:19 
+0000
+++ b/testsuite/misc-ming.all/intervalTestRunner.cpp    2009-04-09 11:41:59 
+0000
@@ -51,13 +51,13 @@
 
        check_equals(root->get_frame_count(), 2);
        check_equals(root->get_current_frame(), 0);
-       check_equals(root->get_play_state(), MovieClip::PLAY);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_PLAY);
 
        tester.advanceClock(50); // "sleep" 50 milliseconds
        tester.advance(); // execute actions in second frame frame
 
        check_equals(root->get_current_frame(), 1);
-       check_equals(root->get_play_state(), MovieClip::STOP);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_STOP);
 
        // Now timers are set and counters initialized
 

=== modified file 'testsuite/misc-ming.all/loop_test-Runner.cpp'
--- a/testsuite/misc-ming.all/loop_test-Runner.cpp      2009-04-03 09:29:19 
+0000
+++ b/testsuite/misc-ming.all/loop_test-Runner.cpp      2009-04-09 11:41:59 
+0000
@@ -104,7 +104,7 @@
 
                // Let's break if we stopped, as we'll print totals() thus
                // enlarging invalidated bounds too ...
-               if (root->get_play_state() == MovieClip::STOP) break;
+               if (root->getPlayState() == MovieClip::PLAYSTATE_STOP) break;
 
                // Compute 1-based currentFrame
                size_t currentFrame = root->get_current_frame()+1;

=== modified file 'testsuite/misc-ming.all/loop_test2runner.cpp'
--- a/testsuite/misc-ming.all/loop_test2runner.cpp      2009-04-03 09:29:19 
+0000
+++ b/testsuite/misc-ming.all/loop_test2runner.cpp      2009-04-09 11:41:59 
+0000
@@ -70,7 +70,7 @@
        // FRAME 1 (start)
 
        check_equals(root->get_frame_count(), 4);
-       check_equals(root->get_play_state(), MovieClip::PLAY);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_PLAY);
        check_equals(root->get_current_frame(), 0);
        check_equals(root->getDisplayList().size(), 1);  // dejagnu clip
        invalidated = tester.getInvalidatedRanges();
@@ -79,7 +79,7 @@
        tester.advance(); // FRAME 2, place DisplayObjects (black on top)
        invalidated = tester.getInvalidatedRanges();
        
-       check_equals(root->get_play_state(), MovieClip::PLAY);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_PLAY);
        check_equals(root->get_current_frame(), 1);
        check_equals(root->getDisplayList().size(), 3); // dejagnu + red square 
+ black square
 
@@ -97,7 +97,7 @@
        tester.advance(); // FRAME 3, depth-swap the two DisplayObjects
        invalidated = tester.getInvalidatedRanges();
        
-       check_equals(root->get_play_state(), MovieClip::PLAY);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_PLAY);
        check_equals(root->get_current_frame(), 2);
        check_equals(root->getDisplayList().size(), 3); // dejagnu + red square 
+ black square
 
@@ -116,7 +116,7 @@
        tester.advance(); // FRAME 4, jump to frame 2 and stop
        invalidated = tester.getInvalidatedRanges();
 
-       check_equals(root->get_play_state(), MovieClip::STOP);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_STOP);
        check_equals(root->get_current_frame(), 1);
        check_equals(root->getDisplayList().size(), 3); // dejagnu + red square 
+ black square
 

=== modified file 'testsuite/misc-ming.all/masks_testrunner.cpp'
--- a/testsuite/misc-ming.all/masks_testrunner.cpp      2009-04-03 09:29:19 
+0000
+++ b/testsuite/misc-ming.all/masks_testrunner.cpp      2009-04-09 11:41:59 
+0000
@@ -52,7 +52,7 @@
        // FRAME 1 (start)
 
        check_equals(root->get_frame_count(), 6);
-       check_equals(root->get_play_state(), MovieClip::PLAY);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_PLAY);
        check_equals(root->get_current_frame(), 0);
        check_equals(root->getDisplayList().size(), 1);  // dejagnu clip
        invalidated = tester.getInvalidatedRanges();
@@ -61,7 +61,7 @@
        // FRAME 2 -- masks at different depth ranges
        tester.advance();
        
-       check_equals(root->get_play_state(), MovieClip::STOP);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_STOP);
        check_equals(root->get_current_frame(), 1); // 0-based
        check_equals(root->getDisplayList().size(), 9);
        root->getDisplayList().dump();

=== modified file 'testsuite/misc-ming.all/registerClassTestRunner.cpp'
--- a/testsuite/misc-ming.all/registerClassTestRunner.cpp       2009-04-03 
09:29:19 +0000
+++ b/testsuite/misc-ming.all/registerClassTestRunner.cpp       2009-04-09 
11:41:59 +0000
@@ -46,7 +46,7 @@
        assert(root);
 
        check_equals(root->get_frame_count(), 6);
-       check_equals(root->get_play_state(), MovieClip::PLAY);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_PLAY);
        check_equals(root->get_current_frame(), 0);
 
        check(! tester.findDisplayItemByDepth(*root, 71) );

=== modified file 'testsuite/misc-ming.all/replace_buttons1test_runner.cpp'
--- a/testsuite/misc-ming.all/replace_buttons1test_runner.cpp   2009-04-03 
09:29:19 +0000
+++ b/testsuite/misc-ming.all/replace_buttons1test_runner.cpp   2009-04-09 
11:41:59 +0000
@@ -61,7 +61,7 @@
        // FRAME 1 (start)
 
        check_equals(root->get_frame_count(), 4);
-       check_equals(root->get_play_state(), MovieClip::PLAY);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_PLAY);
        check_equals(root->get_current_frame(), 0);
        check_equals(root->getDisplayList().size(), 1);  // dejagnu clip
        invalidated = tester.getInvalidatedRanges();
@@ -70,7 +70,7 @@
        tester.advance(); // FRAME 2, place DisplayObject
        invalidated = tester.getInvalidatedRanges();
        
-       check_equals(root->get_play_state(), MovieClip::PLAY);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_PLAY);
        check_equals(root->get_current_frame(), 1);
        check_equals(root->getDisplayList().size(), 2); // dejagnu + red square
 
@@ -92,7 +92,7 @@
        tester.advance(); // FRAME 3, replace DisplayObject
        invalidated = tester.getInvalidatedRanges();
        
-       check_equals(root->get_play_state(), MovieClip::PLAY);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_PLAY);
        check_equals(root->get_current_frame(), 2);
        check_equals(root->getDisplayList().size(), 2); // dejagnu + red square
 
@@ -120,7 +120,7 @@
        tester.advance(); // FRAME 4, jump to frame 2 and stop
        invalidated = tester.getInvalidatedRanges();
 
-       check_equals(root->get_play_state(), MovieClip::STOP);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_STOP);
        check_equals(root->get_current_frame(), 1);
        check_equals(root->getDisplayList().size(), 2); // dejagnu + red square
 

=== modified file 'testsuite/misc-ming.all/replace_shapes1test_runner.cpp'
--- a/testsuite/misc-ming.all/replace_shapes1test_runner.cpp    2009-04-03 
09:29:19 +0000
+++ b/testsuite/misc-ming.all/replace_shapes1test_runner.cpp    2009-04-09 
11:41:59 +0000
@@ -62,7 +62,7 @@
        // FRAME 1 (start)
 
        check_equals(root->get_frame_count(), 4);
-       check_equals(root->get_play_state(), MovieClip::PLAY);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_PLAY);
        check_equals(root->get_current_frame(), 0);
        check_equals(root->getDisplayList().size(), 1);  // dejagnu clip
        invalidated = tester.getInvalidatedRanges();
@@ -71,7 +71,7 @@
        tester.advance(); // FRAME 2, place DisplayObject
        invalidated = tester.getInvalidatedRanges();
        
-       check_equals(root->get_play_state(), MovieClip::PLAY);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_PLAY);
        check_equals(root->get_current_frame(), 1);
        check_equals(root->getDisplayList().size(), 2); // dejagnu + red char
 
@@ -93,7 +93,7 @@
        tester.advance(); // FRAME 3, replace DisplayObject
        invalidated = tester.getInvalidatedRanges();
        
-       check_equals(root->get_play_state(), MovieClip::PLAY);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_PLAY);
        check_equals(root->get_current_frame(), 2);
        check_equals(root->getDisplayList().size(), 2); // dejagnu + green char 
 
@@ -119,7 +119,7 @@
        tester.advance(); // FRAME 4, jump to frame 2 and stop
        invalidated = tester.getInvalidatedRanges();
 
-       check_equals(root->get_play_state(), MovieClip::STOP);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_STOP);
        check_equals(root->get_current_frame(), 1);
        check_equals(root->getDisplayList().size(), 2); // dejagnu + red char 
 

=== modified file 'testsuite/misc-ming.all/replace_sprites1test_runner.cpp'
--- a/testsuite/misc-ming.all/replace_sprites1test_runner.cpp   2009-04-03 
09:29:19 +0000
+++ b/testsuite/misc-ming.all/replace_sprites1test_runner.cpp   2009-04-09 
11:41:59 +0000
@@ -61,7 +61,7 @@
        // FRAME 1 (start)
 
        check_equals(root->get_frame_count(), 4);
-       check_equals(root->get_play_state(), MovieClip::PLAY);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_PLAY);
        check_equals(root->get_current_frame(), 0);
        check_equals(root->getDisplayList().size(), 1);  // dejagnu clip
        invalidated = tester.getInvalidatedRanges();
@@ -70,7 +70,7 @@
        tester.advance(); // FRAME 2, place DisplayObject
        invalidated = tester.getInvalidatedRanges();
        
-       check_equals(root->get_play_state(), MovieClip::PLAY);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_PLAY);
        check_equals(root->get_current_frame(), 1);
        check_equals(root->getDisplayList().size(), 2); // dejagnu + red square
 
@@ -92,7 +92,7 @@
        tester.advance(); // FRAME 3, replace DisplayObject
        invalidated = tester.getInvalidatedRanges();
        
-       check_equals(root->get_play_state(), MovieClip::PLAY);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_PLAY);
        check_equals(root->get_current_frame(), 2);
        check_equals(root->getDisplayList().size(), 2); // dejagnu + red square
 
@@ -118,7 +118,7 @@
        tester.advance(); // FRAME 4, jump to frame 2 and stop
        invalidated = tester.getInvalidatedRanges();
 
-       check_equals(root->get_play_state(), MovieClip::STOP);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_STOP);
        check_equals(root->get_current_frame(), 1);
        check_equals(root->getDisplayList().size(), 2); // dejagnu + red square
 

=== modified file 'testsuite/misc-ming.all/root_stop_testrunner.cpp'
--- a/testsuite/misc-ming.all/root_stop_testrunner.cpp  2009-04-03 09:29:19 
+0000
+++ b/testsuite/misc-ming.all/root_stop_testrunner.cpp  2009-04-09 11:41:59 
+0000
@@ -46,56 +46,56 @@
 
        check_equals(root->get_frame_count(), 2);
        check_equals(root->get_current_frame(), 0);
-       check_equals(root->get_play_state(), MovieClip::STOP);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_STOP);
 
        const DisplayObject* ch = tester.findDisplayItemByName(*root, 
"mc_in_root");
        check(ch);
        const MovieClip* mc = dynamic_cast<const MovieClip*>(ch);
        check(mc);
        check_equals(mc->get_current_frame(), 0);
-       check_equals(mc->get_play_state(), MovieClip::PLAY);
+       check_equals(mc->getPlayState(), MovieClip::PLAYSTATE_PLAY);
 
        tester.advance();
        check_equals(root->get_current_frame(), 0);  // we were in stop mode
        check_equals(mc->get_current_frame(), 1); 
-       check_equals(root->get_play_state(), MovieClip::STOP);
-       check_equals(mc->get_play_state(), MovieClip::PLAY);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_STOP);
+       check_equals(mc->getPlayState(), MovieClip::PLAYSTATE_PLAY);
 
        tester.advance();
        check_equals(root->get_current_frame(), 0); // we were in stop mode
        check_equals(mc->get_current_frame(), 2);  
-       check_equals(root->get_play_state(), MovieClip::STOP);
-       check_equals(mc->get_play_state(), MovieClip::PLAY);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_STOP);
+       check_equals(mc->getPlayState(), MovieClip::PLAYSTATE_PLAY);
 
        tester.advance();
        check_equals(root->get_current_frame(), 0); // we were in stop mode
        check_equals(mc->get_current_frame(), 0); 
-       check_equals(root->get_play_state(), MovieClip::PLAY);
-       check_equals(mc->get_play_state(), MovieClip::PLAY);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_PLAY);
+       check_equals(mc->getPlayState(), MovieClip::PLAYSTATE_PLAY);
 
        tester.advance();
        check_equals(root->get_current_frame(), 1); 
        check_equals(mc->get_current_frame(), 1); 
-       check_equals(root->get_play_state(), MovieClip::PLAY);
-       check_equals(mc->get_play_state(), MovieClip::PLAY);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_PLAY);
+       check_equals(mc->getPlayState(), MovieClip::PLAYSTATE_PLAY);
 
        tester.advance();
        check_equals(root->get_current_frame(), 0);  // looped
        check_equals(mc->get_current_frame(), 2); 
-       check_equals(root->get_play_state(), MovieClip::PLAY);
-       check_equals(mc->get_play_state(), MovieClip::PLAY);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_PLAY);
+       check_equals(mc->getPlayState(), MovieClip::PLAYSTATE_PLAY);
 
        tester.advance();
        check_equals(root->get_current_frame(), 1); 
        check_equals(mc->get_current_frame(), 0); 
-       check_equals(root->get_play_state(), MovieClip::PLAY);
-       check_equals(mc->get_play_state(), MovieClip::PLAY);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_PLAY);
+       check_equals(mc->getPlayState(), MovieClip::PLAYSTATE_PLAY);
 
        tester.advance();
        check_equals(root->get_current_frame(), 0); // looped again
        check_equals(mc->get_current_frame(), 1); 
-       check_equals(root->get_play_state(), MovieClip::PLAY);
-       check_equals(mc->get_play_state(), MovieClip::PLAY);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_PLAY);
+       check_equals(mc->getPlayState(), MovieClip::PLAYSTATE_PLAY);
        
        return 0;
 }

=== modified file 'testsuite/misc-ming.all/simple_loop_testrunner.cpp'
--- a/testsuite/misc-ming.all/simple_loop_testrunner.cpp        2009-04-03 
09:29:19 +0000
+++ b/testsuite/misc-ming.all/simple_loop_testrunner.cpp        2009-04-09 
11:41:59 +0000
@@ -65,7 +65,7 @@
        // FRAME 1/4 (start)
 
        check_equals(root->get_frame_count(), 4);
-       check_equals(root->get_play_state(), MovieClip::PLAY);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_PLAY);
        check_equals(root->get_current_frame(), 0);
        check_equals(root->getDisplayList().size(), 0); // no chars
        invalidated = tester.getInvalidatedRanges();
@@ -75,7 +75,7 @@
 
        tester.advance(); // FRAME 2/4
        
-       check_equals(root->get_play_state(), MovieClip::PLAY);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_PLAY);
        check_equals(root->get_current_frame(), 1);
        check_equals(root->getDisplayList().size(), 1);
        check( tester.findDisplayItemByDepth(*root, 
2+DisplayObject::staticDepthOffset) );
@@ -84,7 +84,7 @@
 
        tester.advance(); // FRAME 3/4
        
-       check_equals(root->get_play_state(), MovieClip::PLAY);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_PLAY);
        check_equals(root->get_current_frame(), 2);
        check_equals(root->getDisplayList().size(), 2);
        check( tester.findDisplayItemByDepth(*root, 
2+DisplayObject::staticDepthOffset) );
@@ -94,7 +94,7 @@
 
        tester.advance(); // FRAME 4/4
        
-       check_equals(root->get_play_state(), MovieClip::PLAY);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_PLAY);
        check_equals(root->get_current_frame(), 3);
        check_equals(root->getDisplayList().size(), 3);
        check( tester.findDisplayItemByDepth(*root, 
2+DisplayObject::staticDepthOffset) );
@@ -105,7 +105,7 @@
 
        tester.advance(); // FRAME 1/4 (loop back)
        
-       check_equals(root->get_play_state(), MovieClip::PLAY);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_PLAY);
        check_equals(root->get_current_frame(), 0);
        check_equals(root->getDisplayList().size(), 0);
        invalidated = tester.getInvalidatedRanges();
@@ -113,7 +113,7 @@
 
        tester.advance(); // FRAME 2/4
        
-       check_equals(root->get_play_state(), MovieClip::PLAY);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_PLAY);
        check_equals(root->get_current_frame(), 1);
        check_equals(root->getDisplayList().size(), 1);
        check( tester.findDisplayItemByDepth(*root, 
2+DisplayObject::staticDepthOffset) );
@@ -122,7 +122,7 @@
 
        tester.advance(); // FRAME 3/4
        
-       check_equals(root->get_play_state(), MovieClip::PLAY);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_PLAY);
        check_equals(root->get_current_frame(), 2);
        check_equals(root->getDisplayList().size(), 2);
        check( tester.findDisplayItemByDepth(*root, 
2+DisplayObject::staticDepthOffset) );
@@ -132,7 +132,7 @@
 
        tester.advance(); // FRAME 4/4
        
-       check_equals(root->get_play_state(), MovieClip::PLAY);
+       check_equals(root->getPlayState(), MovieClip::PLAYSTATE_PLAY);
        check_equals(root->get_current_frame(), 3);
        check_equals(root->getDisplayList().size(), 3);
        check( tester.findDisplayItemByDepth(*root, 
2+DisplayObject::staticDepthOffset) );

=== modified file 'utilities/processor.cpp'
--- a/utilities/processor.cpp   2009-04-01 12:26:49 +0000
+++ b/utilities/processor.cpp   2009-04-09 11:39:48 +0000
@@ -545,7 +545,7 @@
                 fprintf(stderr, "Kicking movie after %g seconds in STOP mode, 
kick ct = %d\n", waitforadvance, kick_count);
                 fflush(stderr);
                 m.goto_frame(last_frame + 1);
-                m.set_play_state(gnash::MovieClip::PLAY);
+                m.set_play_state(gnash::MovieClip::PLAYSTATE_PLAY);
                 kick_count++;
 
                 if (kick_count > 10) {


reply via email to

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