gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog server/Makefile.am server/impl....


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog server/Makefile.am server/impl....
Date: Thu, 24 May 2007 20:10:43 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/05/24 20:10:42

Modified files:
        .              : ChangeLog 
        server         : Makefile.am impl.cpp 
        server/swf     : tag_loaders.cpp 
Added files:
        server/swf     : DoActionTag.h 

Log message:
                * server/: Makefile.am, impl.cpp, swf/DoActionTag.h,
                  swf/tag_loaders.cpp:
                  Move DoAction and DoInitAction tag stuff to its
                  own file (both loader and parser).

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3344&r2=1.3345
http://cvs.savannah.gnu.org/viewcvs/gnash/server/Makefile.am?cvsroot=gnash&r1=1.112&r2=1.113
http://cvs.savannah.gnu.org/viewcvs/gnash/server/impl.cpp?cvsroot=gnash&r1=1.106&r2=1.107
http://cvs.savannah.gnu.org/viewcvs/gnash/server/swf/tag_loaders.cpp?cvsroot=gnash&r1=1.109&r2=1.110
http://cvs.savannah.gnu.org/viewcvs/gnash/server/swf/DoActionTag.h?cvsroot=gnash&rev=1.1

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3344
retrieving revision 1.3345
diff -u -b -r1.3344 -r1.3345
--- ChangeLog   24 May 2007 18:43:31 -0000      1.3344
+++ ChangeLog   24 May 2007 20:10:42 -0000      1.3345
@@ -1,5 +1,12 @@
 2007-05-24 Sandro Santilli <address@hidden>
 
+       * server/: Makefile.am, impl.cpp, swf/DoActionTag.h,
+         swf/tag_loaders.cpp:
+         Move DoAction and DoInitAction tag stuff to its 
+         own file (both loader and parser).
+
+2007-05-24 Sandro Santilli <address@hidden>
+
        * server/sprite_instance.cpp (replace_display_object):
          When the object being replaced is NOT a scriptable object,
          move instead of replacing.

Index: server/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/server/Makefile.am,v
retrieving revision 1.112
retrieving revision 1.113
diff -u -b -r1.112 -r1.113
--- server/Makefile.am  23 May 2007 20:06:19 -0000      1.112
+++ server/Makefile.am  24 May 2007 20:10:42 -0000      1.113
@@ -18,7 +18,7 @@
 # 
 #
 
-# $Id: Makefile.am,v 1.112 2007/05/23 20:06:19 strk Exp $
+# $Id: Makefile.am,v 1.113 2007/05/24 20:10:42 strk Exp $
 
 AUTOMAKE_OPTIONS = 
 
@@ -147,6 +147,7 @@
        swf/PlaceObject2Tag.h \
        swf/RemoveObjectTag.h \
        swf/DisplayListTag.h \
+       swf/DoActionTag.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.106
retrieving revision 1.107
diff -u -b -r1.106 -r1.107
--- server/impl.cpp     23 May 2007 21:55:05 -0000      1.106
+++ server/impl.cpp     24 May 2007 20:10:42 -0000      1.107
@@ -17,7 +17,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-/* $Id: impl.cpp,v 1.106 2007/05/23 21:55:05 strk Exp $ */
+/* $Id: impl.cpp,v 1.107 2007/05/24 20:10:42 strk Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -51,6 +51,7 @@
 #include "DefineFontAlignZonesTag.h"
 #include "PlaceObject2Tag.h"
 #include "RemoveObjectTag.h"
+#include "DoActionTag.h"
 #include "sound_handler.h" // for get_sound_handler
 
 #include <string>
@@ -156,7 +157,7 @@
        register_tag_loader(SWF::SETBACKGROUNDCOLOR, 
set_background_color_loader);
        register_tag_loader(SWF::DEFINEFONT,    define_font_loader);
        register_tag_loader(SWF::DEFINETEXT,    define_text_loader);
-       register_tag_loader(SWF::DOACTION,      do_action_loader);
+       register_tag_loader(SWF::DOACTION,      DoActionTag::doActionLoader);
        register_tag_loader(SWF::DEFINEFONTINFO, define_font_info_loader);
        register_tag_loader(SWF::DEFINEFONTINFO2, define_font_info_loader);
        register_tag_loader(SWF::DEFINESOUND,   define_sound_loader);
@@ -210,7 +211,7 @@
        // (might be nice to dump the password instead..)
        register_tag_loader(SWF::ENABLEDEBUGGER, null_loader);    // 58
 
-       register_tag_loader(SWF::INITACTION, do_init_action_loader);  // 59  
+       register_tag_loader(SWF::INITACTION, DoActionTag::doInitActionLoader);  
// 59  
 
        register_tag_loader(SWF::DEFINEVIDEOSTREAM, define_video_loader); // 60
        register_tag_loader(SWF::VIDEOFRAME, video_loader); // 61

Index: server/swf/tag_loaders.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/swf/tag_loaders.cpp,v
retrieving revision 1.109
retrieving revision 1.110
diff -u -b -r1.109 -r1.110
--- server/swf/tag_loaders.cpp  24 May 2007 08:48:03 -0000      1.109
+++ server/swf/tag_loaders.cpp  24 May 2007 20:10:42 -0000      1.110
@@ -17,7 +17,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-/* $Id: tag_loaders.cpp,v 1.109 2007/05/24 08:48:03 strk Exp $ */
+/* $Id: tag_loaders.cpp,v 1.110 2007/05/24 20:10:42 strk Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -50,13 +50,11 @@
 #include "generic_character.h"
 #include "text_character_def.h"
 #include "edit_text_character_def.h"
-#include "execute_tag.h" // for do_action inheritance (DOACTION tag loader)
+#include "execute_tag.h" // for set_background_color inheritance 
 #include "URL.h"
 #include "GnashException.h"
 #include "video_stream_def.h"
 #include "sound_definition.h"
-#include "PlaceObject2Tag.h"
-#include "RemoveObjectTag.h"
 
 #ifdef HAVE_ZLIB_H
 #include <zlib.h>
@@ -91,32 +89,6 @@
 //
 
 
-/// Thin wrapper around action_buffer.
-//
-/// TODO: Move in its own DoActionTag files
-///
-class do_action : public execute_tag
-{
-private:
-       action_buffer m_buf;
-public:
-       void read(stream* in)
-       {
-           m_buf.read(in);
-       }
-
-       virtual void execute(sprite_instance* m) const
-       {
-           m->add_action_buffer(&m_buf);
-       }
-
-       // Tell the caller that we are an action tag.
-       virtual bool is_action_tag() const
-       {
-           return true;
-       }
-};
-
 //
 // Tag loaders
 //
@@ -1053,52 +1025,6 @@
 }
 
 //
-// do_action
-//
-
-
-
-
-void
-do_action_loader(stream* in, tag_type tag, movie_definition* m)
-{
-    IF_VERBOSE_PARSE
-    (
-       log_parse(_("tag %d: do_action_loader"), tag);
-       log_parse(_("-- actions in frame " SIZET_FMT), m->get_loading_frame());
-    );
-
-    assert(in);
-    assert(tag == SWF::DOACTION); // 12
-    assert(m);
-
-    do_action* da = new do_action;
-    da->read(in);
-
-    m->add_execute_tag(da);
-}
-
-void
-do_init_action_loader(stream* in, tag_type tag, movie_definition* m)
-{
-    assert(tag == SWF::INITACTION); // 59
-
-    int sprite_character_id = in->read_u16();
-    UNUSED(sprite_character_id);
-
-    IF_VERBOSE_PARSE
-    (
-       log_parse(_("  tag %d: do_init_action_loader"), tag);
-       log_parse(_("  -- init actions for sprite %d"), sprite_character_id);
-    );
-
-    do_action* da = new do_action;
-    da->read(in);
-    //m->add_init_action(sprite_character_id, da);
-    m->add_init_action(da);
-}
-
-//
 // Sound
 //
 

Index: server/swf/DoActionTag.h
===================================================================
RCS file: server/swf/DoActionTag.h
diff -N server/swf/DoActionTag.h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ server/swf/DoActionTag.h    24 May 2007 20:10:42 -0000      1.1
@@ -0,0 +1,114 @@
+// 
+//   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 2 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
+
+// 
+//
+//
+
+/* $Id: DoActionTag.h,v 1.1 2007/05/24 20:10:42 strk Exp $ */
+
+#ifndef GNASH_SWF_DOACTIONTAG_H
+#define GNASH_SWF_DOACTIONTAG_H
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "execute_tag.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 DoAction (12) and DoInitAction (59)
+//
+/// Thin wrapper around action_buffer.
+///
+class DoActionTag : public execute_tag
+{
+public:
+
+       /// Read a DoAction block from the stream
+       //
+       void read(stream* in)
+       {
+           m_buf.read(in);
+       }
+
+       virtual void execute(sprite_instance* m) const
+       {
+           m->add_action_buffer(&m_buf);
+       }
+
+       // Tell the caller that we are an action tag.
+       virtual bool is_action_tag() const
+       {
+           return true;
+       }
+
+       static void doActionLoader(stream* in, tag_type tag, movie_definition* 
m)
+       {
+               DoActionTag* da = new DoActionTag;
+               da->read(in);
+
+               IF_VERBOSE_PARSE (
+               log_parse(_("tag %d: do_action_loader"), tag);
+               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;
+               int cid = in->read_u16();
+               UNUSED(cid);
+               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); // ownership transferred
+       }
+
+private:
+
+       action_buffer m_buf;
+};
+
+} // namespace gnash::SWF
+} // namespace gnash
+
+
+#endif // GNASH_SWF_DOACTIONTAG_H
+
+
+// Local Variables:
+// mode: C++
+// indent-tabs-mode: t
+// End:




reply via email to

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