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


From: zou lunkai
Subject: Re: [Gnash-commit] gnash ChangeLog server/sprite_instance.cpp
Date: Fri, 7 Sep 2007 08:34:25 +0800

> only syntetize and instance name when actually placing a new character 
> (simplifies
> the code and fixes a case related to ratio compatibility).

Then you triggered new bugs. This is not the expected behaviour. yes,
it's my fault not to commit related testcases:)


On 9/6/07, Sandro Santilli <address@hidden> wrote:
> CVSROOT:        /sources/gnash
> Module name:    gnash
> Changes by:     Sandro Santilli <strk>  07/09/06 12:47:07
>
> Modified files:
>        .              : ChangeLog
>        server         : sprite_instance.cpp
>
> Log message:
>                * server/sprite_instance.cpp (add_display_object): only 
> syntetize
>                  and instance name when actually placing a new character 
> (simplifies
>                  the code and fixes a case related to ratio compatibility).
>
> CVSWeb URLs:
> http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4238&r2=1.4239
> http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&r1=1.328&r2=1.329
>
> Patches:
> Index: ChangeLog
> ===================================================================
> RCS file: /sources/gnash/gnash/ChangeLog,v
> retrieving revision 1.4238
> retrieving revision 1.4239
> diff -u -b -r1.4238 -r1.4239
> --- ChangeLog   6 Sep 2007 12:21:05 -0000       1.4238
> +++ ChangeLog   6 Sep 2007 12:47:07 -0000       1.4239
> @@ -1,3 +1,9 @@
> +2007-09-06 Sandro Santilli <address@hidden>
> +
> +       * server/sprite_instance.cpp (add_display_object): only syntetize
> +         and instance name when actually placing a new character (simplifies
> +         the code and fixes a case related to ratio compatibility).
> +
>  2007-09-06 Tomas Groth Christensen <address@hidden>
>
>        * libbase/FLVParser.cpp: Made it more robust by accepting empty
>
> Index: server/sprite_instance.cpp
> ===================================================================
> RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v
> retrieving revision 1.328
> retrieving revision 1.329
> diff -u -b -r1.328 -r1.329
> --- server/sprite_instance.cpp  5 Sep 2007 15:48:08 -0000       1.328
> +++ server/sprite_instance.cpp  6 Sep 2007 12:47:07 -0000       1.329
> @@ -2775,10 +2775,19 @@
>
>     boost::intrusive_ptr<character> ch;
>
> -    // Create a new instance and syntetize an instance name if scriptable 
> when:
> -    //  (1) target depth is empty
> -    //  (2) we are in jump-back-mode
> -    if(!existing_char || is_jumping_back)
> +    bool is_ratio_compatible=true;
> +    if(existing_char)
> +    {
> +     is_ratio_compatible= (ratio == existing_char->get_ratio())
> +        || (ratio==character::noRatioValue && existing_char->get_ratio()==0)
> +        || (ratio==0 && existing_char->get_ratio()==character::noRatioValue);
> +    }
> +
> +    // Place a new character if:
> +    //  (1)target depth is empty
> +    //  (2)target depth is not empty but the character has a different ratio
> +    // in jump-back-mode.
> +    if(!existing_char || (is_jumping_back && !is_ratio_compatible))
>     {
>         // TODO: Optimize this.
>         // Create_character_instance() is too expensive for some characters.
> @@ -2798,22 +2807,7 @@
>             std::string instance_name = getNextUnnamedInstanceName();
>             ch->set_name(instance_name.c_str());
>         }
> -    }
>
> -    bool is_ratio_compatible=true;
> -    if(existing_char)
> -    {
> -     is_ratio_compatible= (ratio == existing_char->get_ratio())
> -        || (ratio==character::noRatioValue && existing_char->get_ratio()==0)
> -        || (ratio==0 && existing_char->get_ratio()==character::noRatioValue);
> -    }
> -
> -    // Place a new character if:
> -    //  (1)target depth is empty
> -    //  (2)target depth is not empty but the character has a different ratio
> -    // in jump-back-mode.
> -    if(!existing_char || (is_jumping_back && !is_ratio_compatible))
> -    {
>         // Attach event handlers (if any).
>         for (size_t i = 0, n = event_handlers.size(); i < n; i++)
>         {
>
>
> _______________________________________________
> 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]