From: Ingo Ruhnke Date: Sun, 11 Apr 2004 12:43:35 +0000 (+0000) Subject: - change gameobjs names from lower case to upper case X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=757f86033c33cff80bab1b1885c5c952e543fd5c;p=supertux.git - change gameobjs names from lower case to upper case SVN-Revision: 470 --- diff --git a/src/gameobjs.cpp b/src/gameobjs.cpp index 0257db330..f1c7a810e 100644 --- a/src/gameobjs.cpp +++ b/src/gameobjs.cpp @@ -23,7 +23,7 @@ #include "gameobjs.h" void -bouncy_distro_type::init(float x, float y) +BouncyDistro::init(float x, float y) { base.x = x; base.y = y; @@ -31,18 +31,18 @@ bouncy_distro_type::init(float x, float y) } void -bouncy_distro_type::action() +BouncyDistro::action() { base.y = base.y + base.ym * frame_ratio; base.ym += 0.1 * frame_ratio; if (base.ym >= 0) - world.bouncy_distros.erase(static_cast::iterator>(this)); + world.bouncy_distros.erase(static_cast::iterator>(this)); } void -bouncy_distro_type::draw() +BouncyDistro::draw() { texture_draw(&img_distro[0], base.x - scroll_x, @@ -51,7 +51,7 @@ bouncy_distro_type::draw() void -broken_brick_type::init(Tile* tile_, float x, float y, float xm, float ym) +BrokenBrick::init(Tile* tile_, float x, float y, float xm, float ym) { tile = tile_; base.x = x; @@ -64,17 +64,17 @@ broken_brick_type::init(Tile* tile_, float x, float y, float xm, float ym) } void -broken_brick_type::action() +BrokenBrick::action() { base.x = base.x + base.xm * frame_ratio; base.y = base.y + base.ym * frame_ratio; if (!timer_check(&timer)) - world.broken_bricks.erase(static_cast::iterator>(this)); + world.broken_bricks.erase(static_cast::iterator>(this)); } void -broken_brick_type::draw() +BrokenBrick::draw() { SDL_Rect src, dest; src.x = rand() % 16; @@ -93,7 +93,7 @@ broken_brick_type::draw() } void -bouncy_brick_type::init(float x, float y) +BouncyBrick::init(float x, float y) { base.x = x; base.y = y; @@ -103,7 +103,7 @@ bouncy_brick_type::init(float x, float y) } void -bouncy_brick_type::action() +BouncyBrick::action() { offset = (offset + offset_m * frame_ratio); @@ -115,11 +115,11 @@ bouncy_brick_type::action() /* Stop bouncing? */ if (offset >= 0) - world.bouncy_bricks.erase(static_cast::iterator>(this)); + world.bouncy_bricks.erase(static_cast::iterator>(this)); } void -bouncy_brick_type::draw() +BouncyBrick::draw() { int s; SDL_Rect dest; @@ -156,7 +156,7 @@ bouncy_brick_type::draw() } void -floating_score_type::init(float x, float y, int s) +FloatingScore::init(float x, float y, int s) { base.x = x; base.y = y - 16; @@ -166,16 +166,16 @@ floating_score_type::init(float x, float y, int s) } void -floating_score_type::action() +FloatingScore::action() { base.y = base.y - 2 * frame_ratio; if(!timer_check(&timer)) - world.floating_scores.erase(static_cast::iterator>(this)); + world.floating_scores.erase(static_cast::iterator>(this)); } void -floating_score_type::draw() +FloatingScore::draw() { char str[10]; sprintf(str, "%d", value); diff --git a/src/gameobjs.h b/src/gameobjs.h index c279e4c7e..1b759a605 100644 --- a/src/gameobjs.h +++ b/src/gameobjs.h @@ -29,7 +29,7 @@ #define NO_BOUNCE 0 #define BOUNCE 1 -class bouncy_distro_type +class BouncyDistro { public: base_type base; @@ -46,7 +46,7 @@ extern texture_type img_distro[4]; class Tile; -class broken_brick_type +class BrokenBrick { public: base_type base; @@ -58,7 +58,7 @@ class broken_brick_type void draw(); }; -class bouncy_brick_type +class BouncyBrick { public: float offset; @@ -71,7 +71,7 @@ class bouncy_brick_type void draw(); }; -class floating_score_type +class FloatingScore { public: int value; diff --git a/src/world.cpp b/src/world.cpp index 6c879f16b..cc51e5cba 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -256,15 +256,15 @@ World::add_score(float x, float y, int s) { score += s; - floating_score_type new_floating_score; -new_floating_score.init(x,y,s); + FloatingScore new_floating_score; + new_floating_score.init(x,y,s); floating_scores.push_back(new_floating_score); } void World::add_bouncy_distro(float x, float y) { - bouncy_distro_type new_bouncy_distro; + BouncyDistro new_bouncy_distro; new_bouncy_distro.init(x,y); bouncy_distros.push_back(new_bouncy_distro); } @@ -282,7 +282,7 @@ World::add_broken_brick(Tile* tile, float x, float y) void World::add_broken_brick_piece(Tile* tile, float x, float y, float xm, float ym) { - broken_brick_type new_broken_brick; + BrokenBrick new_broken_brick; new_broken_brick.init(tile, x, y, xm, ym); broken_bricks.push_back(new_broken_brick); } @@ -290,7 +290,7 @@ World::add_broken_brick_piece(Tile* tile, float x, float y, float xm, float ym) void World::add_bouncy_brick(float x, float y) { - bouncy_brick_type new_bouncy_brick; + BouncyBrick new_bouncy_brick; new_bouncy_brick.init(x,y); bouncy_bricks.push_back(new_bouncy_brick); } diff --git a/src/world.h b/src/world.h index c29e769a7..953e739c4 100644 --- a/src/world.h +++ b/src/world.h @@ -35,10 +35,10 @@ class World public: Level* level; - std::vector bouncy_distros; - std::vector broken_bricks; - std::vector bouncy_bricks; - std::vector floating_scores; + std::vector bouncy_distros; + std::vector broken_bricks; + std::vector bouncy_bricks; + std::vector floating_scores; std::vector bad_guys; std::vector upgrades;