[Super-tux-commit] supertux/src badguy.cpp,1.19,1.20 player.cpp,1.20,1.21
Brought to you by:
wkendrick
From: Ingo R. <gr...@us...> - 2004-04-09 16:38:38
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25081 Modified Files: badguy.cpp player.cpp Log Message: - fixed snowball anim Index: player.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/player.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- player.cpp 9 Apr 2004 02:19:09 -0000 1.20 +++ player.cpp 9 Apr 2004 16:25:17 -0000 1.21 @@ -602,7 +602,7 @@ if (!got_coffee) { - if (physic.get_velocity_y() > 0) + if (physic.get_velocity_y() != 0) { if (dir == RIGHT) texture_draw(&smalltux_jump_right, base.x - scroll_x, base.y - 10); Index: badguy.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/badguy.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- badguy.cpp 4 Apr 2004 00:32:10 -0000 1.19 +++ badguy.cpp 9 Apr 2004 16:25:17 -0000 1.20 @@ -48,8 +48,8 @@ texture_type img_flyingsnowball_squished[1]; texture_type img_spiky_left[3]; texture_type img_spiky_right[3]; -texture_type img_snowball_left[3]; -texture_type img_snowball_right[3]; +texture_type img_snowball_left[4]; +texture_type img_snowball_right[4]; texture_type img_snowball_squished_left[1]; texture_type img_snowball_squished_right[1]; @@ -178,14 +178,14 @@ set_texture(img_fish, img_fish, 2, 1); physic.enable_gravity(true); } else if(kind == BAD_FLYINGSNOWBALL) { - set_texture(img_flyingsnowball, img_flyingsnowball, 2); + set_texture(img_flyingsnowball, img_flyingsnowball, 2, 5); physic.enable_gravity(false); } else if(kind == BAD_SPIKY) { physic.set_velocity(-1.3, 0); set_texture(img_spiky_left, img_spiky_right, 3); } else if(kind == BAD_SNOWBALL) { physic.set_velocity(-1.3, 0); - set_texture(img_snowball_left, img_snowball_right, 3); + set_texture(img_snowball_left, img_snowball_right, 4, 5); } // if we're in a solid tile at start correct that now @@ -1114,16 +1114,16 @@ } /** snowball */ - for(int i = 0; i < 3; ++i) { - char num[4]; - snprintf(num, 4, "%d", i); - texture_load(&img_snowball_left[i], - datadir + "/images/shared/snowball-left-" + num + ".png", - USE_ALPHA); - texture_load(&img_snowball_right[i], - datadir + "/images/shared/snowball-right-" + num + ".png", - USE_ALPHA); - } + texture_load(&img_snowball_left[0], datadir + "/images/shared/snowball-left-0.png", USE_ALPHA); + texture_load(&img_snowball_left[1], datadir + "/images/shared/snowball-left-1.png", USE_ALPHA); + texture_load(&img_snowball_left[2], datadir + "/images/shared/snowball-left-2.png", USE_ALPHA); + texture_load(&img_snowball_left[3], datadir + "/images/shared/snowball-left-1.png", USE_ALPHA); + + texture_load(&img_snowball_right[0], datadir + "/images/shared/snowball-right-0.png", USE_ALPHA); + texture_load(&img_snowball_right[1], datadir + "/images/shared/snowball-right-1.png", USE_ALPHA); + texture_load(&img_snowball_right[2], datadir + "/images/shared/snowball-right-2.png", USE_ALPHA); + texture_load(&img_snowball_right[3], datadir + "/images/shared/snowball-right-1.png", USE_ALPHA); + texture_load(&img_snowball_squished_left[0], datadir + "/images/shared/bsod-squished-left.png", USE_ALPHA); texture_load(&img_snowball_squished_right[0], @@ -1194,7 +1194,7 @@ texture_free(&img_spiky_left[i]); texture_free(&img_spiky_right[i]); } - for(int i = 0; i<3; ++i) { + for(int i = 0; i<4; ++i) { texture_free(&img_snowball_left[i]); texture_free(&img_snowball_right[i]); } |