CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli <strk> 07/11/23 12:21:28
Modified files: . : ChangeLog server : Makefile.am impl.cpp sprite_instance.cpp sprite_instance.h server/parser : movie_def_impl.cpp movie_def_impl.h movie_definition.h sound_definition.cpp sound_definition.h sprite_definition.cpp sprite_definition.h video_stream_def.h server/swf : DisplayListTag.h DoActionTag.h PlaceObject2Tag.cpp RemoveObjectTag.cpp RemoveObjectTag.h tag_loaders.cpp Added files: server/swf : ControlTag.h DoInitActionTag.h Removed files: server : execute_tag.h Log message: Renamed execute_tag to ControlTag and moved under server/swf; renamed movie_definition::add_execute_tag to addControlTag; split a DoInitActionTag out of DoActionTag. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4934&r2=1.4935 http://cvs.savannah.gnu.org/viewcvs/gnash/server/Makefile.am?cvsroot=gnash&r1=1.129&r2=1.130 http://cvs.savannah.gnu.org/viewcvs/gnash/server/impl.cpp?cvsroot=gnash&r1=1.122&r2=1.123 http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&r1=1.394&r2=1.395 http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.h?cvsroot=gnash&r1=1.150&r2=1.151 http://cvs.savannah.gnu.org/viewcvs/gnash/server/execute_tag.h?cvsroot=gnash&r1=1.17&r2=0 http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/movie_def_impl.cpp?cvsroot=gnash&r1=1.88&r2=1.89 http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/movie_def_impl.h?cvsroot=gnash&r1=1.58&r2=1.59 http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/movie_definition.h?cvsroot=gnash&r1=1.34&r2=1.35 http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/sound_definition.cpp?cvsroot=gnash&r1=1.7&r2=1.8 http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/sound_definition.h?cvsroot=gnash&r1=1.6&r2=1.7 http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/sprite_definition.cpp?cvsroot=gnash&r1=1.22&r2=1.23 http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/sprite_definition.h?cvsroot=gnash&r1=1.33&r2=1.34 http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/video_stream_def.h?cvsroot=gnash&r1=1.16&r2=1.17 http://cvs.savannah.gnu.org/viewcvs/gnash/server/swf/DisplayListTag.h?cvsroot=gnash&r1=1.5&r2=1.6 http://cvs.savannah.gnu.org/viewcvs/gnash/server/swf/DoActionTag.h?cvsroot=gnash&r1=1.7&r2=1.8 http://cvs.savannah.gnu.org/viewcvs/gnash/server/swf/PlaceObject2Tag.cpp?cvsroot=gnash&r1=1.22&r2=1.23 http://cvs.savannah.gnu.org/viewcvs/gnash/server/swf/RemoveObjectTag.cpp?cvsroot=gnash&r1=1.5&r2=1.6 http://cvs.savannah.gnu.org/viewcvs/gnash/server/swf/RemoveObjectTag.h?cvsroot=gnash&r1=1.5&r2=1.6 http://cvs.savannah.gnu.org/viewcvs/gnash/server/swf/tag_loaders.cpp?cvsroot=gnash&r1=1.149&r2=1.150 http://cvs.savannah.gnu.org/viewcvs/gnash/server/swf/ControlTag.h?cvsroot=gnash&rev=1.1 http://cvs.savannah.gnu.org/viewcvs/gnash/server/swf/DoInitActionTag.h?cvsroot=gnash&rev=1.1 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.4934 retrieving revision 1.4935 diff -u -b -r1.4934 -r1.4935 --- ChangeLog 23 Nov 2007 11:55:19 -0000 1.4934 +++ ChangeLog 23 Nov 2007 12:21:25 -0000 1.4935 @@ -1,5 +1,25 @@ 2007-11-23 Sandro Santilli <[EMAIL PROTECTED]> + * server/Makefile.am, server/execute_tag.h, server/impl.cpp, + server/sprite_instance.cpp, server/sprite_instance.h, + server/parser/movie_def_impl.cpp, + server/parser/movie_def_impl.h, + server/parser/movie_definition.h, + server/parser/sound_definition.cpp, + server/parser/sound_definition.h, + server/parser/sprite_definition.cpp, + server/parser/sprite_definition.h, + server/parser/video_stream_def.h, server/swf/ControlTag.h, + server/swf/DisplayListTag.h, server/swf/DoActionTag.h, + server/swf/DoInitActionTag.h, server/swf/PlaceObject2Tag.cpp, + server/swf/RemoveObjectTag.cpp, server/swf/RemoveObjectTag.h, + server/swf/tag_loaders.cpp: + Renamed execute_tag to ControlTag and moved under server/swf; + renamed movie_definition::add_execute_tag to addControlTag; + split a DoInitActionTag out of DoActionTag. + +2007-11-23 Sandro Santilli <[EMAIL PROTECTED]> + * testsuite/swfdec/Makefile.am: fix whitespace following trailing backslash warning. * libbase/tree.hh: we don't want tree.hh documentation Index: server/Makefile.am =================================================================== RCS file: /sources/gnash/gnash/server/Makefile.am,v retrieving revision 1.129 retrieving revision 1.130 diff -u -b -r1.129 -r1.130 --- server/Makefile.am 18 Oct 2007 11:47:53 -0000 1.129 +++ server/Makefile.am 23 Nov 2007 12:21:26 -0000 1.130 @@ -18,7 +18,7 @@ # # -# $Id: Makefile.am,v 1.129 2007/10/18 11:47:53 cmusick Exp $ +# $Id: Makefile.am,v 1.130 2007/11/23 12:21:26 strk Exp $ AUTOMAKE_OPTIONS = @@ -140,7 +140,6 @@ drag_state.h \ edit_text_character.h \ event_id.h \ - execute_tag.h \ fill_style.h \ BitmapFilter.h \ BlurFilter.h \ @@ -174,11 +173,13 @@ swf.h \ swf/TagLoadersTable.h \ swf/tag_loaders.h \ + swf/ControlTag.h \ swf/DefineFontAlignZonesTag.h \ swf/PlaceObject2Tag.h \ swf/RemoveObjectTag.h \ swf/DisplayListTag.h \ swf/DoActionTag.h \ + swf/DoInitActionTag.h \ swf_event.h \ swf_function.h \ tesselate.h \ Index: server/impl.cpp =================================================================== RCS file: /sources/gnash/gnash/server/impl.cpp,v retrieving revision 1.122 retrieving revision 1.123 diff -u -b -r1.122 -r1.123 --- server/impl.cpp 20 Oct 2007 07:06:17 -0000 1.122 +++ server/impl.cpp 23 Nov 2007 12:21:26 -0000 1.123 @@ -17,7 +17,7 @@ // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // -/* $Id: impl.cpp,v 1.122 2007/10/20 07:06:17 strk Exp $ */ +/* $Id: impl.cpp,v 1.123 2007/11/23 12:21:26 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -52,6 +52,7 @@ #include "PlaceObject2Tag.h" #include "RemoveObjectTag.h" #include "DoActionTag.h" +#include "DoInitActionTag.h" #include "sound_handler.h" // for get_sound_handler #ifdef GNASH_USE_GC #include "GC.h" @@ -236,7 +237,7 @@ // (might be nice to dump the password instead..) register_tag_loader(SWF::ENABLEDEBUGGER, null_loader); // 58 - register_tag_loader(SWF::INITACTION, DoActionTag::doInitActionLoader); // 59 + register_tag_loader(SWF::INITACTION, DoInitActionTag::doInitActionLoader); // 59 register_tag_loader(SWF::DEFINEVIDEOSTREAM, define_video_loader); // 60 register_tag_loader(SWF::VIDEOFRAME, video_loader); // 61 Index: server/sprite_instance.cpp =================================================================== RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v retrieving revision 1.394 retrieving revision 1.395 diff -u -b -r1.394 -r1.395 --- server/sprite_instance.cpp 23 Nov 2007 02:57:20 -0000 1.394 +++ server/sprite_instance.cpp 23 Nov 2007 12:21:26 -0000 1.395 @@ -30,7 +30,7 @@ #include "as_value.h" #include "as_function.h" #include "edit_text_character_def.h" // @@ temp hack for createTextField exp. -#include "execute_tag.h" +#include "ControlTag.h" #include "fn_call.h" #include "Key.h" #include "movie_root.h" @@ -2023,10 +2023,10 @@ // Set the current sound_stream_id to -1, meaning that no stream are // active. If there are an active stream it will be updated while - // executing the execute_tags. + // executing the ControlTags. set_sound_stream_id(-1); - // Execute the execute_tag actions + // Execute the ControlTag actions // We set _callingFrameActions to true so that add_action_buffer // will execute immediately instead of queuing them. // NOTE: in case gotoFrame is executed by code in the called frame @@ -2038,7 +2038,7 @@ if ( playlist ) { std::for_each(playlist->begin(), playlist->end(), - boost::bind(&execute_tag::execute_action, _1, this)); + boost::bind(&ControlTag::execute_action, _1, this)); } _callingFrameActions=false; @@ -2606,17 +2606,17 @@ if ( (typeflags&TAG_DLIST) && (typeflags&TAG_ACTION) ) { - std::for_each( playlist->begin(), playlist->end(), boost::bind(&execute_tag::execute, _1, this) ); + std::for_each( playlist->begin(), playlist->end(), boost::bind(&ControlTag::execute, _1, this) ); } else if ( typeflags & TAG_DLIST ) { assert( ! (typeflags & TAG_ACTION) ); - std::for_each( playlist->begin(), playlist->end(), boost::bind(&execute_tag::execute_state, _1, this) ); + std::for_each( playlist->begin(), playlist->end(), boost::bind(&ControlTag::execute_state, _1, this) ); } else { assert(typeflags & TAG_ACTION); - std::for_each(playlist->begin(), playlist->end(), boost::bind(&execute_tag::execute_action, _1, this)); + std::for_each(playlist->begin(), playlist->end(), boost::bind(&ControlTag::execute_action, _1, this)); } } Index: server/sprite_instance.h =================================================================== RCS file: /sources/gnash/gnash/server/sprite_instance.h,v retrieving revision 1.150 retrieving revision 1.151 diff -u -b -r1.150 -r1.151 --- server/sprite_instance.h 15 Nov 2007 22:23:35 -0000 1.150 +++ server/sprite_instance.h 23 Nov 2007 12:21:26 -0000 1.151 @@ -68,7 +68,7 @@ typedef std::list<const action_buffer*> ActionList; // definition must match movie_definition::PlayList - typedef std::vector<execute_tag*> PlayList; + typedef std::vector<ControlTag*> PlayList; typedef std::vector<swf_event*> SWFEventsVector; @@ -95,7 +95,7 @@ /// Type of execute tags // - /// TODO: move to execute_tag.h ? + /// TODO: move to ControlTag.h ? /// enum control_tag_type { Index: server/parser/movie_def_impl.cpp =================================================================== RCS file: /sources/gnash/gnash/server/parser/movie_def_impl.cpp,v retrieving revision 1.88 retrieving revision 1.89 diff -u -b -r1.88 -r1.89 --- server/parser/movie_def_impl.cpp 15 Nov 2007 09:44:06 -0000 1.88 +++ server/parser/movie_def_impl.cpp 23 Nov 2007 12:21:26 -0000 1.89 @@ -38,7 +38,7 @@ #include "movie_root.h" #include "VM.h" // for assertions #include "GnashException.h" // for parser exception -#include "execute_tag.h" +#include "ControlTag.h" #include "sound_definition.h" // for sound_sample #include <boost/bind.hpp> @@ -1151,12 +1151,12 @@ #endif // GNASH_USE_GC void -movie_def_impl::add_init_action(execute_tag* e, int cid) +movie_def_impl::add_init_action(ControlTag* e, int cid) { assert(e); if ( m_init_action_defined.insert(cid).second ) { - add_execute_tag(e); // ownership transferred + addControlTag(e); // ownership transferred } } Index: server/parser/movie_def_impl.h =================================================================== RCS file: /sources/gnash/gnash/server/parser/movie_def_impl.h,v retrieving revision 1.58 retrieving revision 1.59 diff -u -b -r1.58 -r1.59 --- server/parser/movie_def_impl.h 15 Nov 2007 09:44:06 -0000 1.58 +++ server/parser/movie_def_impl.h 23 Nov 2007 12:21:26 -0000 1.59 @@ -482,7 +482,7 @@ int get_loading_sound_stream_id() { return m_loading_sound_stream; } // See dox in movie_definition.h - void add_execute_tag(execute_tag* tag) + void addControlTag(ControlTag* tag) { assert(tag); m_playlist[_frames_loaded].push_back(tag); @@ -490,7 +490,7 @@ /// Need to execute the given tag before entering the /// currently-loading frame for the first time. - void add_init_action(execute_tag* e, int cid); + void add_init_action(ControlTag* e, int cid); // See dox in movie_definition.h // Index: server/parser/movie_definition.h =================================================================== RCS file: /sources/gnash/gnash/server/parser/movie_definition.h,v retrieving revision 1.34 retrieving revision 1.35 diff -u -b -r1.34 -r1.35 --- server/parser/movie_definition.h 15 Nov 2007 09:44:06 -0000 1.34 +++ server/parser/movie_definition.h 23 Nov 2007 12:21:26 -0000 1.35 @@ -65,7 +65,7 @@ class bitmap_info; class movie_instance; class sprite_instance; - class execute_tag; + class ControlTag; } namespace gnash @@ -94,7 +94,7 @@ class movie_definition : public character_def { public: - typedef std::vector<execute_tag*> PlayList; + typedef std::vector<ControlTag*> PlayList; virtual int get_version() const = 0; virtual float get_width_pixels() const = 0; @@ -328,7 +328,7 @@ return NULL; } - /// Add an execute_tag to this movie_definition's playlist + /// Add an ControlTag to this movie_definition's playlist // /// The default implementation is a no-op. /// @@ -338,9 +338,9 @@ /// to the movie_def_impl. /// /// TODO: take an auto_ptr. - /// NOTE: the default implementation just let the execute_tag leak. + /// NOTE: the default implementation just let the ControlTag leak. /// - virtual void add_execute_tag(execute_tag* /*c*/) + virtual void addControlTag(ControlTag* /*c*/) { } @@ -350,7 +350,7 @@ // /// The default implementation is a no-op. /// - virtual void add_init_action(execute_tag* /*c*/, int /*cid*/) + virtual void add_init_action(ControlTag* /*c*/, int /*cid*/) { } Index: server/parser/sound_definition.cpp =================================================================== RCS file: /sources/gnash/gnash/server/parser/sound_definition.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -b -r1.7 -r1.8 --- server/parser/sound_definition.cpp 19 Nov 2007 19:01:37 -0000 1.7 +++ server/parser/sound_definition.cpp 23 Nov 2007 12:21:27 -0000 1.8 @@ -9,7 +9,7 @@ #include "sound_definition.h" #include "stream.h" #include "impl.h" -#include "execute_tag.h" // for start_sound_tag inheritance +#include "ControlTag.h" // for start_sound_tag inheritance #include "movie_definition.h" #include "sprite_instance.h" @@ -68,7 +68,7 @@ } m_handler_id = sam->m_sound_handler_id; - m->add_execute_tag(this); + m->addControlTag(this); } @@ -109,7 +109,7 @@ { m_handler_id = handler_id; m_start = start; - m->add_execute_tag(this); + m->addControlTag(this); } Index: server/parser/sound_definition.h =================================================================== RCS file: /sources/gnash/gnash/server/parser/sound_definition.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -b -r1.6 -r1.7 --- server/parser/sound_definition.h 19 Nov 2007 19:01:37 -0000 1.6 +++ server/parser/sound_definition.h 23 Nov 2007 12:21:27 -0000 1.7 @@ -21,7 +21,7 @@ #include "resource.h" // for sound_sample inheritance #include "sound_handler.h" -#include "execute_tag.h" // for sound tags inheritance +#include "ControlTag.h" // for sound tags inheritance // Forward declarations namespace gnash { @@ -52,7 +52,7 @@ // /// TODO: move in it's own StartSoundTag files... /// -class start_sound_tag : public execute_tag +class start_sound_tag : public ControlTag { public: uint16_t m_handler_id; @@ -93,7 +93,7 @@ // /// TODO: move in it's own SoundStreamBlockTag files... /// -class start_stream_sound_tag : public execute_tag +class start_stream_sound_tag : public ControlTag { public: uint16_t m_handler_id; Index: server/parser/sprite_definition.cpp =================================================================== RCS file: /sources/gnash/gnash/server/parser/sprite_definition.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -u -b -r1.22 -r1.23 --- server/parser/sprite_definition.cpp 14 Nov 2007 11:41:03 -0000 1.22 +++ server/parser/sprite_definition.cpp 23 Nov 2007 12:21:27 -0000 1.23 @@ -22,7 +22,7 @@ #include "sprite_instance.h" #include "sprite_definition.h" -#include "execute_tag.h" // for dtor visibility +#include "ControlTag.h" // for dtor visibility #include "as_function.h" // for dtor visibility #include <vector> Index: server/parser/sprite_definition.h =================================================================== RCS file: /sources/gnash/gnash/server/parser/sprite_definition.h,v retrieving revision 1.33 retrieving revision 1.34 diff -u -b -r1.33 -r1.34 --- server/parser/sprite_definition.h 15 Nov 2007 09:44:06 -0000 1.33 +++ server/parser/sprite_definition.h 23 Nov 2007 12:21:27 -0000 1.34 @@ -295,7 +295,7 @@ // See dox in movie_definition.h - virtual void add_execute_tag(execute_tag* c) + virtual void addControlTag(ControlTag* c) { m_playlist[m_loading_frame].push_back(c); } @@ -303,7 +303,7 @@ /// Overridden just for complaining about malformed SWF // /// Sprite def's should not have do_init_action tags in them! (@@ correct?) - virtual void add_init_action(execute_tag* /*c*/, int /*cid*/) + virtual void add_init_action(ControlTag* /*c*/, int /*cid*/) { IF_VERBOSE_MALFORMED_SWF ( log_swferror(_("sprite_definition::add_init_action called! Ignored")); Index: server/parser/video_stream_def.h =================================================================== RCS file: /sources/gnash/gnash/server/parser/video_stream_def.h,v retrieving revision 1.16 retrieving revision 1.17 diff -u -b -r1.16 -r1.17 --- server/parser/video_stream_def.h 26 Oct 2007 18:43:36 -0000 1.16 +++ server/parser/video_stream_def.h 23 Nov 2007 12:21:27 -0000 1.17 @@ -16,7 +16,7 @@ // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // -// $Id: video_stream_def.h,v 1.16 2007/10/26 18:43:36 tgc Exp $ +// $Id: video_stream_def.h,v 1.17 2007/11/23 12:21:27 strk Exp $ #ifndef GNASH_VIDEO_STREAM_DEF_H #define GNASH_VIDEO_STREAM_DEF_H @@ -30,7 +30,7 @@ #include "movie_definition.h" #include "swf.h" #include "rect.h" // for composition -#include "execute_tag.h" +#include "ControlTag.h" #include "VideoDecoder.h" #include "image.h" Index: server/swf/DisplayListTag.h =================================================================== RCS file: /sources/gnash/gnash/server/swf/DisplayListTag.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -b -r1.5 -r1.6 --- server/swf/DisplayListTag.h 1 Jul 2007 10:54:35 -0000 1.5 +++ server/swf/DisplayListTag.h 23 Nov 2007 12:21:27 -0000 1.6 @@ -20,7 +20,7 @@ // // -/* $Id: DisplayListTag.h,v 1.5 2007/07/01 10:54:35 bjacques Exp $ */ +/* $Id: DisplayListTag.h,v 1.6 2007/11/23 12:21:27 strk Exp $ */ #ifndef GNASH_SWF_DISPLAYLISTTAG_H #define GNASH_SWF_DISPLAYLISTTAG_H @@ -29,7 +29,7 @@ #include "config.h" #endif -#include "execute_tag.h" // for inheritance +#include "ControlTag.h" // for inheritance #include "swf.h" // for tag_type definition //#include "tu_types.h" // for uint16_t, uint32_t etc. definition @@ -53,7 +53,7 @@ /// placing, moving, replacing or removing characters at depths. /// /// -class DisplayListTag : public execute_tag +class DisplayListTag : public ControlTag { public: Index: server/swf/DoActionTag.h =================================================================== RCS file: /sources/gnash/gnash/server/swf/DoActionTag.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -b -r1.7 -r1.8 --- server/swf/DoActionTag.h 14 Nov 2007 13:23:47 -0000 1.7 +++ server/swf/DoActionTag.h 23 Nov 2007 12:21:27 -0000 1.8 @@ -19,8 +19,6 @@ // // -/* $Id: DoActionTag.h,v 1.7 2007/11/14 13:23:47 strk Exp $ */ - #ifndef GNASH_SWF_DOACTIONTAG_H #define GNASH_SWF_DOACTIONTAG_H @@ -28,7 +26,7 @@ #include "config.h" #endif -#include "execute_tag.h" // for inheritance +#include "ControlTag.h" // for inheritance #include "swf.h" // for tag_type definition #include "action_buffer.h" // for composition #include "sprite_instance.h" // for inlines @@ -43,17 +41,15 @@ namespace gnash { namespace SWF { -/// SWF Tag DoAction (12) and DoInitAction (59) +/// SWF Tag DoAction (12) // /// Thin wrapper around action_buffer. /// -class DoActionTag : public execute_tag +class DoActionTag : public ControlTag { public: - DoActionTag(bool isInitAction) - : - _isInitAction(isInitAction) + DoActionTag() {} /// Read a DoAction block from the stream @@ -63,28 +59,10 @@ m_buf.readFullTag(in); } - virtual void execute_state(sprite_instance* m) const - { - if ( _isInitAction ) - { - //m->execute_action(m_buf); - m->execute_init_action_buffer(m_buf); - } - } - virtual void execute(sprite_instance* m) const { - if ( _isInitAction ) - { - //m->execute_action(m_buf); - m->execute_init_action_buffer(m_buf); - } - else - { - //m->queueActions(m_buf); m->add_action_buffer(&m_buf); } - } // Tell the caller that we are an action tag. virtual bool is_action_tag() const @@ -94,7 +72,7 @@ static void doActionLoader(stream* in, tag_type tag, movie_definition* m) { - DoActionTag* da = new DoActionTag(false); + DoActionTag* da = new DoActionTag(); da->read(in); IF_VERBOSE_PARSE ( @@ -102,27 +80,11 @@ log_parse(_("-- actions in frame " SIZET_FMT), m->get_loading_frame()); ); - m->add_execute_tag(da); // ownership transferred - } - - static void doInitActionLoader(stream* in, tag_type tag, movie_definition* m) - { - DoActionTag* da = new DoActionTag(true); - int cid = in->read_u16(); - da->read(in); - - IF_VERBOSE_PARSE ( - log_parse(_(" tag %d: do_init_action_loader"), tag); - log_parse(_(" -- init actions for sprite %d"), cid); - ); - - m->add_init_action(da, cid); // ownership transferred + m->addControlTag(da); // ownership transferred } private: - bool _isInitAction; - action_buffer m_buf; }; Index: server/swf/PlaceObject2Tag.cpp =================================================================== RCS file: /sources/gnash/gnash/server/swf/PlaceObject2Tag.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -u -b -r1.22 -r1.23 --- server/swf/PlaceObject2Tag.cpp 30 Aug 2007 18:19:16 -0000 1.22 +++ server/swf/PlaceObject2Tag.cpp 23 Nov 2007 12:21:27 -0000 1.23 @@ -17,7 +17,7 @@ // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // -/* $Id: PlaceObject2Tag.cpp,v 1.22 2007/08/30 18:19:16 strk Exp $ */ +/* $Id: PlaceObject2Tag.cpp,v 1.23 2007/11/23 12:21:27 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -415,7 +415,7 @@ PlaceObject2Tag* ch = new PlaceObject2Tag(*m); ch->read(in, tag, m->get_version()); - m->add_execute_tag(ch); + m->addControlTag(ch); int depth = ch->getDepth(); if ( depth < 0 && depth >= character::staticDepthOffset ) Index: server/swf/RemoveObjectTag.cpp =================================================================== RCS file: /sources/gnash/gnash/server/swf/RemoveObjectTag.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -b -r1.5 -r1.6 --- server/swf/RemoveObjectTag.cpp 7 Oct 2007 21:37:15 -0000 1.5 +++ server/swf/RemoveObjectTag.cpp 23 Nov 2007 12:21:27 -0000 1.6 @@ -17,7 +17,7 @@ // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // -/* $Id: RemoveObjectTag.cpp,v 1.5 2007/10/07 21:37:15 strk Exp $ */ +/* $Id: RemoveObjectTag.cpp,v 1.6 2007/11/23 12:21:27 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -80,7 +80,7 @@ } // Ownership transferred to movie_definition - m->add_execute_tag(t.release()); + m->addControlTag(t.release()); } } // namespace gnash::SWF Index: server/swf/RemoveObjectTag.h =================================================================== RCS file: /sources/gnash/gnash/server/swf/RemoveObjectTag.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -b -r1.5 -r1.6 --- server/swf/RemoveObjectTag.h 1 Jul 2007 10:54:35 -0000 1.5 +++ server/swf/RemoveObjectTag.h 23 Nov 2007 12:21:27 -0000 1.6 @@ -20,7 +20,7 @@ // // -/* $Id: RemoveObjectTag.h,v 1.5 2007/07/01 10:54:35 bjacques Exp $ */ +/* $Id: RemoveObjectTag.h,v 1.6 2007/11/23 12:21:27 strk Exp $ */ #ifndef GNASH_SWF_REMOVEOBJECTTAG_H #define GNASH_SWF_REMOVEOBJECTTAG_H @@ -47,7 +47,7 @@ // /// The RemoveObject tag removes the character instance at the specified depth. /// -/// TODO: make this and PlaceObject2Tag subclasses of DisplayListTag (subclass of execute_tag) +/// TODO: make this and PlaceObject2Tag subclasses of DisplayListTag (subclass of ControlTag) /// class RemoveObjectTag : public DisplayListTag { @@ -65,7 +65,7 @@ /// Remove object at specified depth from sprite_instance DisplayList. void execute(sprite_instance* m) const; - // See dox in execute_tag.h + // See dox in ControlTag.h bool isRemove() const { return true; } static void loader(stream* in, tag_type tag, movie_definition* m); Index: server/swf/tag_loaders.cpp =================================================================== RCS file: /sources/gnash/gnash/server/swf/tag_loaders.cpp,v retrieving revision 1.149 retrieving revision 1.150 diff -u -b -r1.149 -r1.150 --- server/swf/tag_loaders.cpp 19 Oct 2007 14:02:13 -0000 1.149 +++ server/swf/tag_loaders.cpp 23 Nov 2007 12:21:27 -0000 1.150 @@ -17,7 +17,7 @@ // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // -/* $Id: tag_loaders.cpp,v 1.149 2007/10/19 14:02:13 strk Exp $ */ +/* $Id: tag_loaders.cpp,v 1.150 2007/11/23 12:21:27 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -49,7 +49,7 @@ #include "swf/TagLoadersTable.h" #include "text_character_def.h" #include "edit_text_character_def.h" -#include "execute_tag.h" // for set_background_color inheritance +#include "ControlTag.h" // for set_background_color inheritance #include "URL.h" #include "GnashException.h" #include "video_stream_def.h" @@ -191,7 +191,7 @@ // /// TODO: Move in it's own SetBackgroundColorTag files /// -class set_background_color : public execute_tag +class set_background_color : public ControlTag { private: rgba m_color; @@ -233,7 +233,7 @@ set_background_color* t = new set_background_color; t->read(in); - m->add_execute_tag(t); + m->addControlTag(t); } // Load JPEG compression tables that can be used to load Index: server/swf/ControlTag.h =================================================================== RCS file: server/swf/ControlTag.h diff -N server/swf/ControlTag.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ server/swf/ControlTag.h 23 Nov 2007 12:21:27 -0000 1.1 @@ -0,0 +1,85 @@ +// +// Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +// +// +// + +#ifndef GNASH_EXECUTE_TAG_H +#define GNASH_EXECUTE_TAG_H + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "tu_types.h" // for uint32_t typedef + +#include <cstdarg> +#include <cassert> + +namespace gnash { + +// Forward declarations +class sprite_instance; + +/// Control tags are swf tags that control the operation of the movie. +// +/// Essentially, these are the events associated with a frame. +/// +class ControlTag +{ +public: + + virtual ~ControlTag() + { + } + + /// Execute this tag, whatever it is. + virtual void execute(sprite_instance* /*m*/) const + { + } + + /// Execute this tag but only if it's a "state" tag. + // + /// State tags include all tags except action tags. + /// + virtual void execute_state(sprite_instance* /*m*/) const + { + } + + /// Execute this tag but only if it is an action tag + void execute_action(sprite_instance* m) const + { + if ( is_action_tag() ) execute(m); + } + + /// Return true if this is an action tag. + virtual bool is_action_tag() const { return false; } + +}; + + +} // namespace gnash + + +#endif // GNASH_EXECUTE_TAG_H + + +// Local Variables: +// mode: C++ +// indent-tabs-mode: t +// End: Index: server/swf/DoInitActionTag.h =================================================================== RCS file: server/swf/DoInitActionTag.h diff -N server/swf/DoInitActionTag.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ server/swf/DoInitActionTag.h 23 Nov 2007 12:21:27 -0000 1.1 @@ -0,0 +1,107 @@ +// +// Copyright (C) 2007 Free Software Foundation, Inc. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +// +// +// + +#ifndef GNASH_SWF_DOINITACTIONTAG_H +#define GNASH_SWF_DOINITACTIONTAG_H + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "ControlTag.h" // for inheritance +#include "swf.h" // for tag_type definition +#include "action_buffer.h" // for composition +#include "sprite_instance.h" // for inlines +//#include "tu_types.h" // for uint16_t, uint32_t etc. definition + +// Forward declarations +namespace gnash { + class stream; + class movie_definition; +} + +namespace gnash { +namespace SWF { + +/// SWF Tag DoInitAction (59) +// +/// Thin wrapper around action_buffer. +/// +class DoInitActionTag : public ControlTag +{ +public: + + DoInitActionTag() + {} + + /// Read a DoInitAction block from the stream + // + void read(stream* in) + { + m_buf.readFullTag(in); + } + + virtual void execute_state(sprite_instance* m) const + { + m->execute_init_action_buffer(m_buf); + } + + virtual void execute(sprite_instance* m) const + { + m->execute_init_action_buffer(m_buf); + } + + // Tell the caller that we are an action tag. + virtual bool is_action_tag() const + { + return true; + } + + static void doInitActionLoader(stream* in, tag_type tag, movie_definition* m) + { + DoInitActionTag* da = new DoInitActionTag; + int cid = in->read_u16(); + da->read(in); + + IF_VERBOSE_PARSE ( + log_parse(_(" tag %d: do_init_action_loader"), tag); + log_parse(_(" -- init actions for sprite %d"), cid); + ); + + m->add_init_action(da, cid); // ownership transferred + } + +private: + + action_buffer m_buf; +}; + +} // namespace gnash::SWF +} // namespace gnash + + +#endif // GNASH_SWF_DOINITACTIONTAG_H + + +// Local Variables: +// mode: C++ +// indent-tabs-mode: t +// End: Index: server/execute_tag.h =================================================================== RCS file: server/execute_tag.h diff -N server/execute_tag.h --- server/execute_tag.h 1 Jul 2007 10:54:22 -0000 1.17 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,85 +0,0 @@ -// -// Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc. -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -// -// -// - -#ifndef GNASH_EXECUTE_TAG_H -#define GNASH_EXECUTE_TAG_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "tu_types.h" // for uint32_t typedef - -#include <cstdarg> -#include <cassert> - -namespace gnash { - -// Forward declarations -class sprite_instance; - -/// Execute tags include things that control the operation of the movie. -// -/// Essentially, these are the events associated with a frame. -/// -class execute_tag -{ -public: - - virtual ~execute_tag() - { - } - - /// Execute this tag, whatever it is. - virtual void execute(sprite_instance* /*m*/) const - { - } - - /// Execute this tag but only if it's a "state" tag. - // - /// State tags include all tags except action tags. - /// - virtual void execute_state(sprite_instance* /*m*/) const - { - } - - /// Execute this tag but only if it is an action tag - void execute_action(sprite_instance* m) const - { - if ( is_action_tag() ) execute(m); - } - - /// Return true if this is an action tag. - virtual bool is_action_tag() const { return false; } - -}; - - -} // namespace gnash - - -#endif // GNASH_EXECUTE_TAG_H - - -// Local Variables: -// mode: C++ -// indent-tabs-mode: t -// End: _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit