CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli <strk> 07/11/29 09:31:03
Modified files: . : ChangeLog server : character.cpp character.h movie_root.cpp testsuite/actionscript.all: MovieClip.as testsuite/misc-mtasc.all: level5.as level99.as levels.as Log message: Set proper depth for _level# movies CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5013&r2=1.5014 http://cvs.savannah.gnu.org/viewcvs/gnash/server/character.cpp?cvsroot=gnash&r1=1.65&r2=1.66 http://cvs.savannah.gnu.org/viewcvs/gnash/server/character.h?cvsroot=gnash&r1=1.110&r2=1.111 http://cvs.savannah.gnu.org/viewcvs/gnash/server/movie_root.cpp?cvsroot=gnash&r1=1.130&r2=1.131 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/MovieClip.as?cvsroot=gnash&r1=1.104&r2=1.105 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-mtasc.all/level5.as?cvsroot=gnash&r1=1.5&r2=1.6 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-mtasc.all/level99.as?cvsroot=gnash&r1=1.5&r2=1.6 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-mtasc.all/levels.as?cvsroot=gnash&r1=1.4&r2=1.5 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.5013 retrieving revision 1.5014 diff -u -b -r1.5013 -r1.5014 --- ChangeLog 29 Nov 2007 09:09:13 -0000 1.5013 +++ ChangeLog 29 Nov 2007 09:31:02 -0000 1.5014 @@ -1,5 +1,15 @@ 2007-11-29 Sandro Santilli <[EMAIL PROTECTED]> + * server/movie_root.cpp: add staticDepthOffset to _level# movies. + * server/character.{cpp,h}: get target right for _level# now + that we encode staticDepthOffset-modified depth. + * testsuite/actionscript.all/MovieClip.as: success getting _root's + depth. + * testsuite/misc-mtasc.all/: levels.as, level5.as, level99.as: + success getting levels depth. + +2007-11-29 Sandro Santilli <[EMAIL PROTECTED]> + * testsuite/generic-testrunner.sh: print run test on consistency error. * testsuite/misc-mtasc.all/Dejagnu.as: have Dejagnu.done() trace Index: server/character.cpp =================================================================== RCS file: /sources/gnash/gnash/server/character.cpp,v retrieving revision 1.65 retrieving revision 1.66 diff -u -b -r1.65 -r1.66 --- server/character.cpp 27 Nov 2007 11:05:28 -0000 1.65 +++ server/character.cpp 29 Nov 2007 09:31:02 -0000 1.66 @@ -17,7 +17,7 @@ // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // -/* $Id: character.cpp,v 1.65 2007/11/27 11:05:28 strk Exp $ */ +/* $Id: character.cpp,v 1.66 2007/11/29 09:31:02 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -797,7 +797,7 @@ { assert(dynamic_cast<const movie_instance*>(ch)); std::stringstream ss; - ss << "_level" << ch->get_depth(); + ss << "_level" << ch->get_depth()-character::staticDepthOffset; path.push_back(ss.str()); // it is completely legal to set root's _name //assert(ch->get_name().empty()); Index: server/character.h =================================================================== RCS file: /sources/gnash/gnash/server/character.h,v retrieving revision 1.110 retrieving revision 1.111 diff -u -b -r1.110 -r1.111 --- server/character.h 16 Nov 2007 21:28:54 -0000 1.110 +++ server/character.h 29 Nov 2007 09:31:03 -0000 1.111 @@ -19,7 +19,7 @@ // // -/* $Id: character.h,v 1.110 2007/11/16 21:28:54 strk Exp $ */ +/* $Id: character.h,v 1.111 2007/11/29 09:31:03 strk Exp $ */ #ifndef GNASH_CHARACTER_H #define GNASH_CHARACTER_H @@ -342,7 +342,7 @@ public: - /// This is the amount substracted from displaylist tag defined depths. + /// This is the amount added to displaylist tag defined depths. /// Character placed by tags (vs. characters instantiated by ActionScript) /// always have negative depths by effect of this offset. // Index: server/movie_root.cpp =================================================================== RCS file: /sources/gnash/gnash/server/movie_root.cpp,v retrieving revision 1.130 retrieving revision 1.131 diff -u -b -r1.130 -r1.131 --- server/movie_root.cpp 28 Nov 2007 12:47:04 -0000 1.130 +++ server/movie_root.cpp 29 Nov 2007 09:31:03 -0000 1.131 @@ -140,6 +140,9 @@ m_viewport_height = (int)movie->get_movie_definition()->get_height_pixels(); m_pixel_scale = 1; + // assert(movie->get_depth() == 0); ? + movie->set_depth(character::staticDepthOffset); + try { setLevel(0, movie); @@ -161,7 +164,7 @@ movie_root::setLevel(unsigned int num, boost::intrusive_ptr<movie_instance> movie) { assert(movie != NULL); - assert(static_cast<unsigned int>(movie->get_depth()) == num); + assert(static_cast<unsigned int>(movie->get_depth()) == num+character::staticDepthOffset); //movie->setLevel(num) //movie->set_depth(num); @@ -204,7 +207,7 @@ extern_movie->setVariables(vars); character* ch = extern_movie.get(); - ch->set_depth(num); + ch->set_depth(num+character::staticDepthOffset); save_extern_movie(extern_movie.get()); Index: testsuite/actionscript.all/MovieClip.as =================================================================== RCS file: /sources/gnash/gnash/testsuite/actionscript.all/MovieClip.as,v retrieving revision 1.104 retrieving revision 1.105 diff -u -b -r1.104 -r1.105 --- testsuite/actionscript.all/MovieClip.as 27 Nov 2007 11:28:50 -0000 1.104 +++ testsuite/actionscript.all/MovieClip.as 29 Nov 2007 09:31:03 -0000 1.105 @@ -20,7 +20,7 @@ // compile this test case with Ming makeswf, and then // execute it like this gnash -1 -r 0 -v out.swf -rcsid="$Id: MovieClip.as,v 1.104 2007/11/27 11:28:50 strk Exp $"; +rcsid="$Id: MovieClip.as,v 1.105 2007/11/29 09:31:03 strk Exp $"; #include "check.as" @@ -889,7 +889,7 @@ // _level0 is at depth 0 ! // _level1 is at depth 1 ! (and so on).. -xcheck_equals(_root.getDepth(), -16384); +check_equals(_root.getDepth(), -16384); static_clip_name = "__shared_assets"; static_clip = eval(static_clip_name); Index: testsuite/misc-mtasc.all/level5.as =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-mtasc.all/level5.as,v retrieving revision 1.5 retrieving revision 1.6 diff -u -b -r1.5 -r1.6 --- testsuite/misc-mtasc.all/level5.as 29 Nov 2007 08:32:39 -0000 1.5 +++ testsuite/misc-mtasc.all/level5.as 29 Nov 2007 09:31:03 -0000 1.6 @@ -29,7 +29,7 @@ check_equals(mc._currentframe, 1); // Check our depth - xcheck_equals(mc.getDepth(), -16379); + check_equals(mc.getDepth(), -16379); // The ""+ is there to force conversion to a string check_equals(""+mc, "_level5"); Index: testsuite/misc-mtasc.all/level99.as =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-mtasc.all/level99.as,v retrieving revision 1.5 retrieving revision 1.6 diff -u -b -r1.5 -r1.6 --- testsuite/misc-mtasc.all/level99.as 29 Nov 2007 08:32:39 -0000 1.5 +++ testsuite/misc-mtasc.all/level99.as 29 Nov 2007 09:31:03 -0000 1.6 @@ -29,7 +29,7 @@ check_equals(mc._currentframe, 1); // Check our depth - xcheck_equals(mc.getDepth(), -16285); + check_equals(mc.getDepth(), -16285); // The ""+ is there to force conversion to a string check_equals(""+mc, "_level99"); Index: testsuite/misc-mtasc.all/levels.as =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-mtasc.all/levels.as,v retrieving revision 1.4 retrieving revision 1.5 diff -u -b -r1.4 -r1.5 --- testsuite/misc-mtasc.all/levels.as 29 Nov 2007 08:32:39 -0000 1.4 +++ testsuite/misc-mtasc.all/levels.as 29 Nov 2007 09:31:03 -0000 1.5 @@ -33,7 +33,7 @@ test.run(); // Check our depth - xcheck_equals(mc.getDepth(), -16384); + check_equals(mc.getDepth(), -16384); // The ""+ is there to force conversion to a string check_equals(""+mc, "_level0"); _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit