Jürgen, thank you for your contribution. Any chance you could expose the problem in an automated testcase within the existing testsuite ? Chances are you can produce a fully self-contained testcase (pure SWF printing PASSED/FAILED, like those under actionscript.all).
--strk; On Wed, Jan 16, 2013 at 10:37:24PM +0100, Jürgen Rühle wrote: > Currently the tower defense game GemCraft Chapter One from > gameinabottle.com/games/gemcraft1.swf doesn't draw the play map correctly, > making the game unplayable. > > It turns out that the problem is clipping: the clipping check thinks that the > MovieClip is completely outside the update area and therefore isn't drawn at > all. This happens because the clipping check uses the MovieClip's world > Matrix that is potentially (and in this case actually) different from the > transform used while drawing the MovieClip into the bitmap. > > This patch works around the problem by temporarily resetting the MovieClip's > Matrix during the draw operation. > > This fixes the problem in GemCraft Chapter One and actually makes the game > playable (though some minor problems remain). > > A real fix should probably review the usage of a different transformation > for the clipping check compared to the actual drawing operation. > --- > libcore/asobj/flash/display/BitmapData_as.cpp | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/libcore/asobj/flash/display/BitmapData_as.cpp > b/libcore/asobj/flash/display/BitmapData_as.cpp > index 4d36794..a9cfb4f 100644 > --- a/libcore/asobj/flash/display/BitmapData_as.cpp > +++ b/libcore/asobj/flash/display/BitmapData_as.cpp > @@ -1107,7 +1107,11 @@ bitmapdata_draw(const fn_call& fn) > fillRect(*ptr, t.matrix.tx() / 20, t.matrix.ty() / 20, (int) > (t.matrix.get_x_scale() * 25), (int) (t.matrix.get_y_scale() * 25), > 0x80000000 | (color << 19) | (color << 12) | (color << 3)); > #endif > > + SWFMatrix oldM = mc->transform().matrix; > + mc->setMatrix(t.matrix, true); > ptr->draw(*mc, t); > + mc->setMatrix(oldM, true); > + > return as_value(); > } > > -- > 1.7.4.1 > > > _______________________________________________ > Gnash-dev mailing list > Gnash-dev@gnu.org > https://lists.gnu.org/mailman/listinfo/gnash-dev -- http://www.cartodb.com - Map, analyze and build applications with your data ~~ http://strk.keybit.net _______________________________________________ Gnash-dev mailing list Gnash-dev@gnu.org https://lists.gnu.org/mailman/listinfo/gnash-dev