gnash-commit
[Top][All Lists]
Advanced

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

Re: [Gnash-commit] gnash ChangeLog server/sprite_instance.cpp serv...


From: zou lunkai
Subject: Re: [Gnash-commit] gnash ChangeLog server/sprite_instance.cpp serv...
Date: Wed, 5 Sep 2007 10:46:20 +0800

> +       * server/swf/DoActionTag.h: execute init actions by directly
> +         execute them (opposed to use add_action_buffer which queues them)

init actions should be executed after all placement tags. More
generally, actions should be started after executing all other tags.
All actions should respect the tags order(and creation order when
thinking about AS created characters), don't try to violate this:)

BTW, init actions might not need to(or shouldn't) be pushed to the
action list.  Just execute them after finishing all other frame tags,
and this will fix xchecks in movieclip_destruction_test1.sc.

--zou


On 9/5/07, Sandro Santilli <address@hidden> wrote:
> CVSROOT:        /sources/gnash
> Module name:    gnash
> Changes by:     Sandro Santilli <strk>  07/09/04 20:50:01
>
> Modified files:
>         .              : ChangeLog
>         server         : sprite_instance.cpp sprite_instance.h
>         server/swf     : DoActionTag.h
>
> Log message:
>                 * server/sprite_instance.h: make execute_action() public, for 
> use
>                   by DoActionTag (for init actions).
>                 * server/swf/DoActionTag.h: execute init actions by directly
>                   execute them (opposed to use add_action_buffer which queues 
> them)
>                 * server/sprite_instance.cpp (execute_frame_tags): simplify 
> execution
>                   of init tag (simply execute them rather then have them 
> queue and
>                   then execute the queue).
>
> CVSWeb URLs:
> http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4218&r2=1.4219
> http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&r1=1.324&r2=1.325
> http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.h?cvsroot=gnash&r1=1.135&r2=1.136
> http://cvs.savannah.gnu.org/viewcvs/gnash/server/swf/DoActionTag.h?cvsroot=gnash&r1=1.3&r2=1.4
>
> Patches:
> Index: ChangeLog
> ===================================================================
> RCS file: /sources/gnash/gnash/ChangeLog,v
> retrieving revision 1.4218
> retrieving revision 1.4219
> diff -u -b -r1.4218 -r1.4219
> --- ChangeLog   4 Sep 2007 20:03:12 -0000       1.4218
> +++ ChangeLog   4 Sep 2007 20:50:00 -0000       1.4219
> @@ -1,5 +1,15 @@
>  2007-09-04 Sandro Santilli <address@hidden>
>
> +       * server/sprite_instance.h: make execute_action() public, for use
> +         by DoActionTag (for init actions).
> +       * server/swf/DoActionTag.h: execute init actions by directly
> +         execute them (opposed to use add_action_buffer which queues them)
> +       * server/sprite_instance.cpp (execute_frame_tags): simplify execution
> +         of init tag (simply execute them rather then have them queue and
> +         then execute the queue).
> +
> +2007-09-04 Sandro Santilli <address@hidden>
> +
>         * NEWS: updated by copying from 0.8.1
>         * server/edit_text_character.cpp: support case-insensitive
>           htmlText property (for SWF6).
>
> Index: server/sprite_instance.cpp
> ===================================================================
> RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v
> retrieving revision 1.324
> retrieving revision 1.325
> diff -u -b -r1.324 -r1.325
> --- server/sprite_instance.cpp  3 Sep 2007 13:21:59 -0000       1.324
> +++ server/sprite_instance.cpp  4 Sep 2007 20:50:00 -0000       1.325
> @@ -2515,7 +2515,7 @@
>                         );
>
>
> -                       // Need to execute these actions.
> +                       // Need to execute these actions (init actions should 
> be executed immediately)
>                         std::for_each(init_actions->begin(), 
> init_actions->end(),
>                                 
> std::bind2nd(std::mem_fun(&execute_tag::execute), this));
>
> @@ -2523,7 +2523,7 @@
>                         // init actions again.
>                         m_init_actions_executed[frame] = true;
>
> -                       do_actions();
> +                       //do_actions();
>                 }
>         }
>
>
> Index: server/sprite_instance.h
> ===================================================================
> RCS file: /sources/gnash/gnash/server/sprite_instance.h,v
> retrieving revision 1.135
> retrieving revision 1.136
> diff -u -b -r1.135 -r1.136
> --- server/sprite_instance.h    1 Sep 2007 01:20:47 -0000       1.135
> +++ server/sprite_instance.h    4 Sep 2007 20:50:00 -0000       1.136
> @@ -481,6 +481,8 @@
>             m_action_list.push_back(a);
>         }
>
> +       /// Execute a single action buffer (DOACTION block)
> +       void execute_action(const action_buffer& ab);
>
>         /// For debugging -- return the id of the character
>         /// at the specified depth.
> @@ -828,9 +830,6 @@
>         ///
>         void queueActions(ActionList& action_list);
>
> -       /// Execute a single action buffer (DOACTION block)
> -       void execute_action(const action_buffer& ab);
> -
>         /// Execute the actions in the action list
>         //
>         /// The list of action will be consumed starting from the first
>
> Index: server/swf/DoActionTag.h
> ===================================================================
> RCS file: /sources/gnash/gnash/server/swf/DoActionTag.h,v
> retrieving revision 1.3
> retrieving revision 1.4
> diff -u -b -r1.3 -r1.4
> --- server/swf/DoActionTag.h    1 Jul 2007 10:54:35 -0000       1.3
> +++ server/swf/DoActionTag.h    4 Sep 2007 20:50:00 -0000       1.4
> @@ -19,7 +19,7 @@
>  //
>  //
>
> -/* $Id: DoActionTag.h,v 1.3 2007/07/01 10:54:35 bjacques Exp $ */
> +/* $Id: DoActionTag.h,v 1.4 2007/09/04 20:50:00 strk Exp $ */
>
>  #ifndef GNASH_SWF_DOACTIONTAG_H
>  #define GNASH_SWF_DOACTIONTAG_H
> @@ -51,6 +51,11 @@
>  {
>  public:
>
> +       DoActionTag(bool isInitAction)
> +               :
> +               _isInitAction(isInitAction)
> +       {}
> +
>         /// Read a DoAction block from the stream
>         //
>         void read(stream* in)
> @@ -60,8 +65,16 @@
>
>         virtual void execute(sprite_instance* m) const
>         {
> +               if ( _isInitAction )
> +               {
> +                       m->execute_action(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
> @@ -71,7 +84,7 @@
>
>         static void doActionLoader(stream* in, tag_type tag, 
> movie_definition* m)
>         {
> -               DoActionTag* da = new DoActionTag;
> +               DoActionTag* da = new DoActionTag(false);
>                 da->read(in);
>
>                 IF_VERBOSE_PARSE (
> @@ -84,7 +97,7 @@
>
>         static void doInitActionLoader(stream* in, tag_type tag, 
> movie_definition* m)
>         {
> -               DoActionTag* da = new DoActionTag;
> +               DoActionTag* da = new DoActionTag(true);
>                 int cid = in->read_u16();
>                 UNUSED(cid);
>                 da->read(in);
> @@ -99,6 +112,8 @@
>
>  private:
>
> +       bool _isInitAction;
> +
>         action_buffer m_buf;
>  };
>
>
>
> _______________________________________________
> Gnash-commit mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/gnash-commit
>




reply via email to

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