From: Tobias Markus Date: Tue, 19 Mar 2013 20:03:40 +0000 (-1000) Subject: Fixed several compiler warnings from bug 955 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=45977d8e77f9e11f979ee7284c95ca7d9f35341e;p=supertux.git Fixed several compiler warnings from bug 955 --- diff --git a/src/object/brick.cpp b/src/object/brick.cpp index 8e3e01dd7..f9a1d61d2 100644 --- a/src/object/brick.cpp +++ b/src/object/brick.cpp @@ -51,7 +51,7 @@ Brick::collision(GameObject& other, const CollisionHit& hit){ Player* player = dynamic_cast (&other); if (player) { - if (player->does_buttjump) try_break(); + if (player->does_buttjump) try_break(player); } BadGuy* badguy = dynamic_cast (&other); @@ -60,14 +60,14 @@ Brick::collision(GameObject& other, const CollisionHit& hit){ // Badguy's bottom has to be below the top of the brick // SHIFT_DELTA is required to slide over one tile gaps. if( badguy->can_break() && ( badguy->get_bbox().get_bottom() > get_bbox().get_top() + SHIFT_DELTA ) ){ - try_break(); + try_break(player); } } Portable* portable = dynamic_cast (&other); if(portable) { MovingObject* moving = dynamic_cast (&other); if(moving->get_bbox().get_top() > get_bbox().get_bottom() - SHIFT_DELTA) { - try_break(); + try_break(player); } } return Block::collision(other, hit); diff --git a/src/video/gl/gl_lightmap.cpp b/src/video/gl/gl_lightmap.cpp index 2ac49efd7..f8a67358d 100644 --- a/src/video/gl/gl_lightmap.cpp +++ b/src/video/gl/gl_lightmap.cpp @@ -120,9 +120,9 @@ GLLightmap::do_draw() float vertices[] = { 0, 0, - SCREEN_WIDTH, 0, - SCREEN_WIDTH, SCREEN_HEIGHT, - 0, SCREEN_HEIGHT + float(SCREEN_WIDTH), 0, + float(SCREEN_WIDTH), float(SCREEN_HEIGHT), + 0, float(SCREEN_HEIGHT) }; glVertexPointer(2, GL_FLOAT, 0, vertices); @@ -207,9 +207,9 @@ GLLightmap::draw_gradient(const DrawingRequest& request) float vertices[] = { 0, 0, - SCREEN_WIDTH, 0, - SCREEN_WIDTH, SCREEN_HEIGHT, - 0, SCREEN_HEIGHT + float(SCREEN_WIDTH), 0, + float(SCREEN_WIDTH), float(SCREEN_HEIGHT), + 0, float(SCREEN_HEIGHT) }; glVertexPointer(2, GL_FLOAT, 0, vertices); diff --git a/src/video/gl/gl_renderer.cpp b/src/video/gl/gl_renderer.cpp index 2f1f505ef..0e66433c4 100644 --- a/src/video/gl/gl_renderer.cpp +++ b/src/video/gl/gl_renderer.cpp @@ -186,9 +186,9 @@ GLRenderer::draw_gradient(const DrawingRequest& request) float vertices[] = { 0, 0, - SCREEN_WIDTH, 0, - SCREEN_WIDTH, SCREEN_HEIGHT, - 0, SCREEN_HEIGHT + float(SCREEN_WIDTH), 0, + float(SCREEN_WIDTH), float(SCREEN_HEIGHT), + 0, float(SCREEN_HEIGHT) }; glVertexPointer(2, GL_FLOAT, 0, vertices);