[Super-tux-commit] supertux/src gameloop.cpp,1.102,1.103 gameloop.h,1.45,1.46 level.cpp,1.51,1.52 sp
Brought to you by:
wkendrick
From: Ingo R. <gr...@us...> - 2004-04-25 23:46:41
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26481 Modified Files: gameloop.cpp gameloop.h level.cpp special.cpp special.h Log Message: - tweaked bullet and endsequence Index: gameloop.h =================================================================== RCS file: /cvsroot/super-tux/supertux/src/gameloop.h,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- gameloop.h 21 Apr 2004 13:41:01 -0000 1.45 +++ gameloop.h 25 Apr 2004 23:46:30 -0000 1.46 @@ -58,7 +58,7 @@ /** If true the end_sequence will be played, user input will be ignored while doing that */ - bool end_sequenze; + bool end_sequence; float last_x_pos; bool game_pause; Index: level.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/level.cpp,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- level.cpp 25 Apr 2004 21:55:39 -0000 1.51 +++ level.cpp 25 Apr 2004 23:46:30 -0000 1.52 @@ -499,7 +499,7 @@ // FIXME: -10 is a rather random value, we still need some kind of // real levelend gola if (use_endsequence) - endpos = 32*(width-20); + endpos = 32*(width-30); else endpos = 32*(width-15); Index: gameloop.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/gameloop.cpp,v retrieving revision 1.102 retrieving revision 1.103 diff -u -d -r1.102 -r1.103 --- gameloop.cpp 25 Apr 2004 13:51:19 -0000 1.102 +++ gameloop.cpp 25 Apr 2004 23:46:29 -0000 1.103 @@ -58,7 +58,7 @@ GameSession* GameSession::current_ = 0; GameSession::GameSession(const std::string& subset_, int levelnb_, int mode) - : world(0), st_gl_mode(mode), levelnb(levelnb_), end_sequenze(false), + : world(0), st_gl_mode(mode), levelnb(levelnb_), end_sequence(false), subset(subset_) { current_ = this; @@ -77,7 +77,7 @@ { game_pause = false; exit_status = NONE; - end_sequenze = false; + end_sequence = false; fps_timer.init(true); frame_timer.init(true); @@ -195,7 +195,7 @@ void GameSession::process_events() { - if (end_sequenze) + if (end_sequence) { Player& tux = *world->get_tux(); @@ -378,13 +378,13 @@ Player* tux = world->get_tux(); /* End of level? */ - if (tux->base.x >= World::current()->get_level()->endpos + 320) + if (tux->base.x >= World::current()->get_level()->endpos + 32 * (get_level()->use_endsequence ? 22 : 10)) { exit_status = LEVEL_FINISHED; } - else if (tux->base.x >= World::current()->get_level()->endpos && !end_sequenze) + else if (tux->base.x >= World::current()->get_level()->endpos && !end_sequence) { - end_sequenze = true; + end_sequence = true; last_x_pos = -1; music_manager->halt_music(); } @@ -528,7 +528,7 @@ while (frame_ratio > 0) { // Update the world - if (end_sequenze) + if (end_sequence) action(.5f); else action(1.0f); Index: special.h =================================================================== RCS file: /cvsroot/super-tux/supertux/src/special.h,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- special.h 25 Apr 2004 21:55:39 -0000 1.17 +++ special.h 25 Apr 2004 23:46:30 -0000 1.18 @@ -65,6 +65,7 @@ class Bullet { public: + int life_count; base_type base; base_type old_base; Index: special.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/special.cpp,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- special.cpp 25 Apr 2004 22:10:32 -0000 1.28 +++ special.cpp 25 Apr 2004 23:46:30 -0000 1.29 @@ -45,6 +45,7 @@ void Bullet::init(float x, float y, float xm, Direction dir) { + life_count = 3; base.width = 4; base.height = 4; @@ -99,6 +100,7 @@ base.ym = 9; else if (base.ym < -9) base.ym = -9; + life_count -= 1; } base.ym = base.ym + 0.5 * frame_ratio; @@ -108,7 +110,8 @@ base.y < 0 || base.y > screen->h || issolid(base.x + 4, base.y + 2) || - issolid(base.x, base.y + 2)) + issolid(base.x, base.y + 2) || + life_count <= 0) { remove_me(); } |