[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] r4018 - in trunk/pingus/src: components display editor gui
From: |
grumbel at BerliOS |
Subject: |
[Pingus-CVS] r4018 - in trunk/pingus/src: components display editor gui input math pingus screen worldmap worldobjs |
Date: |
Wed, 4 Nov 2009 07:24:18 +0100 |
Author: grumbel
Date: 2009-11-04 07:24:07 +0100 (Wed, 04 Nov 2009)
New Revision: 4018
Modified:
trunk/pingus/src/components/check_box.cpp
trunk/pingus/src/components/choice_box.cpp
trunk/pingus/src/components/label.cpp
trunk/pingus/src/components/slider_box.cpp
trunk/pingus/src/components/smallmap.cpp
trunk/pingus/src/display/drawing_context.cpp
trunk/pingus/src/display/framebuffer_surface.cpp
trunk/pingus/src/display/scene_context.cpp
trunk/pingus/src/editor/action_properties.cpp
trunk/pingus/src/editor/button.cpp
trunk/pingus/src/editor/checkbox.cpp
trunk/pingus/src/editor/combobox.cpp
trunk/pingus/src/editor/editor_screen.cpp
trunk/pingus/src/editor/file_dialog.cpp
trunk/pingus/src/editor/file_list.cpp
trunk/pingus/src/editor/inputbox.cpp
trunk/pingus/src/editor/label.cpp
trunk/pingus/src/editor/level_objs.cpp
trunk/pingus/src/editor/level_properties.cpp
trunk/pingus/src/editor/minimap.cpp
trunk/pingus/src/editor/object_properties.cpp
trunk/pingus/src/editor/object_selector.cpp
trunk/pingus/src/editor/panel.cpp
trunk/pingus/src/gui/group_component.cpp
trunk/pingus/src/gui/gui_manager.cpp
trunk/pingus/src/input/control.hpp
trunk/pingus/src/input/core_driver.cpp
trunk/pingus/src/math/size.hpp
trunk/pingus/src/pingus/addon_menu.hpp
trunk/pingus/src/pingus/credits.cpp
trunk/pingus/src/pingus/demo_session.cpp
trunk/pingus/src/pingus/font_description.cpp
trunk/pingus/src/pingus/game_session.cpp
trunk/pingus/src/pingus/level_menu.cpp
trunk/pingus/src/pingus/levelset.cpp
trunk/pingus/src/pingus/option_menu.cpp
trunk/pingus/src/pingus/option_menu.hpp
trunk/pingus/src/pingus/pingu.cpp
trunk/pingus/src/pingus/pingu_holder.cpp
trunk/pingus/src/pingus/pingus_main.hpp
trunk/pingus/src/pingus/pingus_menu.cpp
trunk/pingus/src/pingus/resource_manager.cpp
trunk/pingus/src/pingus/result_screen.cpp
trunk/pingus/src/pingus/savegame_manager.cpp
trunk/pingus/src/pingus/sprite.cpp
trunk/pingus/src/pingus/start_screen.cpp
trunk/pingus/src/pingus/story_screen.cpp
trunk/pingus/src/pingus/surface.cpp
trunk/pingus/src/screen/gui_screen.cpp
trunk/pingus/src/worldmap/level_dot.cpp
trunk/pingus/src/worldmap/path.cpp
trunk/pingus/src/worldmap/worldmap_component.cpp
trunk/pingus/src/worldmap/worldmap_screen.cpp
trunk/pingus/src/worldobjs/conveyor_belt.cpp
Log:
Fixed a bunch of -Wshadow warnings and a few bugs along the way
Modified: trunk/pingus/src/components/check_box.cpp
===================================================================
--- trunk/pingus/src/components/check_box.cpp 2009-11-04 05:41:19 UTC (rev
4017)
+++ trunk/pingus/src/components/check_box.cpp 2009-11-04 06:24:07 UTC (rev
4018)
@@ -19,9 +19,9 @@
#include "display/drawing_context.hpp"
#include "components/check_box.hpp"
-CheckBox::CheckBox(const Rect& rect)
- : RectComponent(rect),
- state(false)
+CheckBox::CheckBox(const Rect& rect_) :
+ RectComponent(rect_),
+ state(false)
{
}
Modified: trunk/pingus/src/components/choice_box.cpp
===================================================================
--- trunk/pingus/src/components/choice_box.cpp 2009-11-04 05:41:19 UTC (rev
4017)
+++ trunk/pingus/src/components/choice_box.cpp 2009-11-04 06:24:07 UTC (rev
4018)
@@ -19,8 +19,8 @@
#include "display/drawing_context.hpp"
#include "components/choice_box.hpp"
-ChoiceBox::ChoiceBox(const Rect& rect)
- : RectComponent(rect)
+ChoiceBox::ChoiceBox(const Rect& rect_)
+ : RectComponent(rect_)
{
current_choice = 0;
}
Modified: trunk/pingus/src/components/label.cpp
===================================================================
--- trunk/pingus/src/components/label.cpp 2009-11-04 05:41:19 UTC (rev
4017)
+++ trunk/pingus/src/components/label.cpp 2009-11-04 06:24:07 UTC (rev
4018)
@@ -19,9 +19,9 @@
#include "display/drawing_context.hpp"
#include "components/label.hpp"
-Label::Label(const std::string& label, const Rect& rect)
- : RectComponent(rect),
- label(label)
+Label::Label(const std::string& label_, const Rect& rect_)
+ : RectComponent(rect_),
+ label(label_)
{
}
Modified: trunk/pingus/src/components/slider_box.cpp
===================================================================
--- trunk/pingus/src/components/slider_box.cpp 2009-11-04 05:41:19 UTC (rev
4017)
+++ trunk/pingus/src/components/slider_box.cpp 2009-11-04 06:24:07 UTC (rev
4018)
@@ -20,8 +20,8 @@
#include "display/drawing_context.hpp"
#include "components/slider_box.hpp"
-SliderBox::SliderBox(const Rect& rect)
- : RectComponent(rect),
+SliderBox::SliderBox(const Rect& rect_)
+ : RectComponent(rect_),
value(10),
drag_drop(false)
{
Modified: trunk/pingus/src/components/smallmap.cpp
===================================================================
--- trunk/pingus/src/components/smallmap.cpp 2009-11-04 05:41:19 UTC (rev
4017)
+++ trunk/pingus/src/components/smallmap.cpp 2009-11-04 06:24:07 UTC (rev
4018)
@@ -29,8 +29,8 @@
#include "components/playfield.hpp"
#include "components/smallmap.hpp"
-SmallMap::SmallMap(Server* server_, Playfield* playfield_, const Rect& rect)
- : RectComponent(rect),
+SmallMap::SmallMap(Server* server_, Playfield* playfield_, const Rect& rect_)
+ : RectComponent(rect_),
server(server_),
playfield(playfield_),
gc_ptr(0)
Modified: trunk/pingus/src/display/drawing_context.cpp
===================================================================
--- trunk/pingus/src/display/drawing_context.cpp 2009-11-04 05:41:19 UTC
(rev 4017)
+++ trunk/pingus/src/display/drawing_context.cpp 2009-11-04 06:24:07 UTC
(rev 4018)
@@ -40,8 +40,8 @@
std::string text;
public:
- FontDrawingRequest(Font font_, Origin origin_, const Vector2i& pos, const
std::string& text_, float z)
- : DrawingRequest(pos, z),
+ FontDrawingRequest(Font font_, Origin origin_, const Vector2i& pos_, const
std::string& text_, float z_)
+ : DrawingRequest(pos_, z_),
font(font_),
origin(origin_),
text(text_)
@@ -103,8 +103,8 @@
LineDrawingRequest(const Vector2i& pos1_,
const Vector2i& pos2_,
const Color& color_,
- float z)
- : DrawingRequest(Vector2i(0, 0), z),
+ float z_)
+ : DrawingRequest(Vector2i(0, 0), z_),
pos1(pos1_),
pos2(pos2_),
color(color_)
@@ -126,8 +126,8 @@
bool filled;
public:
- RectDrawingRequest(const Rect& rect_, const Color& color_, bool filled_,
float z)
- : DrawingRequest(Vector2i(0, 0), z),
+ RectDrawingRequest(const Rect& rect_, const Color& color_, bool filled_,
float z_)
+ : DrawingRequest(Vector2i(0, 0), z_),
d_rect(rect_), color(color_), filled(filled_)
{}
@@ -156,8 +156,8 @@
DrawingContext& dc;
public:
- DrawingContextDrawingRequest(DrawingContext& dc_, float z)
- : DrawingRequest(Vector2i(0,0) ,z),
+ DrawingContextDrawingRequest(DrawingContext& dc_, float z_)
+ : DrawingRequest(Vector2i(0,0), z_),
dc(dc_)
{}
@@ -266,27 +266,27 @@
}
void
-DrawingContext::draw_fillrect(const Rect& rect, const Color& color, float z)
+DrawingContext::draw_fillrect(const Rect& rect_, const Color& color_, float z_)
{
- draw(new RectDrawingRequest(Rect(int(rect.left + translate_stack.back().x),
- int(rect.top + translate_stack.back().y),
- int(rect.right + translate_stack.back().x),
- int(rect.bottom +
translate_stack.back().y)),
- color,
+ draw(new RectDrawingRequest(Rect(int(rect_.left + translate_stack.back().x),
+ int(rect_.top + translate_stack.back().y),
+ int(rect_.right +
translate_stack.back().x),
+ int(rect_.bottom +
translate_stack.back().y)),
+ color_,
true,
- z));
+ z_));
}
void
-DrawingContext::draw_rect(const Rect& rect, const Color& color, float z)
+DrawingContext::draw_rect(const Rect& rect_, const Color& color_, float z_)
{
- draw(new RectDrawingRequest(Rect(int(rect.left + translate_stack.back().x),
- int(rect.top + translate_stack.back().y),
- int(rect.right + translate_stack.back().x),
- int(rect.bottom +
translate_stack.back().y)),
- color,
+ draw(new RectDrawingRequest(Rect(int(rect_.left +
translate_stack.back().x),
+ int(rect_.top +
translate_stack.back().y),
+ int(rect_.right +
translate_stack.back().x),
+ int(rect_.bottom +
translate_stack.back().y)),
+ color_,
false,
- z));
+ z_));
}
void
Modified: trunk/pingus/src/display/framebuffer_surface.cpp
===================================================================
--- trunk/pingus/src/display/framebuffer_surface.cpp 2009-11-04 05:41:19 UTC
(rev 4017)
+++ trunk/pingus/src/display/framebuffer_surface.cpp 2009-11-04 06:24:07 UTC
(rev 4018)
@@ -20,8 +20,8 @@
{
}
-FramebufferSurface::FramebufferSurface(FramebufferSurfaceImpl* impl)
- : impl(impl)
+FramebufferSurface::FramebufferSurface(FramebufferSurfaceImpl* impl_)
+ : impl(impl_)
{
}
Modified: trunk/pingus/src/display/scene_context.cpp
===================================================================
--- trunk/pingus/src/display/scene_context.cpp 2009-11-04 05:41:19 UTC (rev
4017)
+++ trunk/pingus/src/display/scene_context.cpp 2009-11-04 06:24:07 UTC (rev
4018)
@@ -172,9 +172,9 @@
impl->highlight.clear();
}
-SceneContextDrawingRequest::SceneContextDrawingRequest(SceneContext* sc, const
Vector2i& pos, float z)
- : DrawingRequest(pos, z),
- sc(sc)
+SceneContextDrawingRequest::SceneContextDrawingRequest(SceneContext* sc_,
const Vector2i& pos_, float z_)
+ : DrawingRequest(pos_, z_),
+ sc(sc_)
{
}
Modified: trunk/pingus/src/editor/action_properties.cpp
===================================================================
--- trunk/pingus/src/editor/action_properties.cpp 2009-11-04 05:41:19 UTC
(rev 4017)
+++ trunk/pingus/src/editor/action_properties.cpp 2009-11-04 06:24:07 UTC
(rev 4018)
@@ -33,8 +33,9 @@
* [active] [Actionname] [count]
*
*/
-ActionProperties::ActionProperties(EditorScreen* editor, const Rect& rect)
- : GroupComponent(rect),
+ActionProperties::ActionProperties(EditorScreen* editor_, const Rect& rect_)
+ : GroupComponent(rect_),
+ editor(editor_),
y_pos(0)
{
add_action(Actions::BASHER);
Modified: trunk/pingus/src/editor/button.cpp
===================================================================
--- trunk/pingus/src/editor/button.cpp 2009-11-04 05:41:19 UTC (rev 4017)
+++ trunk/pingus/src/editor/button.cpp 2009-11-04 06:24:07 UTC (rev 4018)
@@ -20,8 +20,8 @@
namespace Editor {
-Button::Button(const Rect& rect, const std::string& text_)
- : RectComponent(rect),
+Button::Button(const Rect& rect_, const std::string& text_)
+ : RectComponent(rect_),
text(text_),
mouse_over(false),
mouse_down(false),
Modified: trunk/pingus/src/editor/checkbox.cpp
===================================================================
--- trunk/pingus/src/editor/checkbox.cpp 2009-11-04 05:41:19 UTC (rev
4017)
+++ trunk/pingus/src/editor/checkbox.cpp 2009-11-04 06:24:07 UTC (rev
4018)
@@ -20,8 +20,8 @@
namespace Editor {
-Checkbox::Checkbox(const Rect& rect, const std::string& label_)
- : RectComponent(rect),
+Checkbox::Checkbox(const Rect& rect_, const std::string& label_)
+ : RectComponent(rect_),
checked(false),
label(label_)
{
Modified: trunk/pingus/src/editor/combobox.cpp
===================================================================
--- trunk/pingus/src/editor/combobox.cpp 2009-11-04 05:41:19 UTC (rev
4017)
+++ trunk/pingus/src/editor/combobox.cpp 2009-11-04 06:24:07 UTC (rev
4018)
@@ -26,8 +26,8 @@
namespace Editor {
-Combobox::Combobox(const Rect& rect)
- : RectComponent(rect),
+Combobox::Combobox(const Rect& rect_)
+ : RectComponent(rect_),
sprite("core/editor/combobox"),
current_item(-1),
drop_down(false)
Modified: trunk/pingus/src/editor/editor_screen.cpp
===================================================================
--- trunk/pingus/src/editor/editor_screen.cpp 2009-11-04 05:41:19 UTC (rev
4017)
+++ trunk/pingus/src/editor/editor_screen.cpp 2009-11-04 06:24:07 UTC (rev
4018)
@@ -161,25 +161,25 @@
if (show_help)
{
- Size size(600, 400);
- gc.draw_fillrect(Rect(gc.get_width()/2 - size.width/2 - 2,
- gc.get_height()/2 - size.height/2 - 2,
- gc.get_width()/2 + size.width/2 + 2,
- gc.get_height()/2 + size.height/2 + 2),
+ Size size_(600, 400);
+ gc.draw_fillrect(Rect(gc.get_width()/2 - size_.width/2 - 2,
+ gc.get_height()/2 - size_.height/2 - 2,
+ gc.get_width()/2 + size_.width/2 + 2,
+ gc.get_height()/2 + size_.height/2 + 2),
Color(0,0,0));
- gc.draw_fillrect(Rect(gc.get_width()/2 - size.width/2,
- gc.get_height()/2 - size.height/2,
- gc.get_width()/2 + size.width/2,
- gc.get_height()/2 + size.height/2),
+ gc.draw_fillrect(Rect(gc.get_width()/2 - size_.width/2,
+ gc.get_height()/2 - size_.height/2,
+ gc.get_width()/2 + size_.width/2,
+ gc.get_height()/2 + size_.height/2),
Color(255,255,255));
gc.print_center(Fonts::verdana11,
Vector2i(gc.get_width()/2,
- gc.get_height()/2 - size.height/2 + 12),
+ gc.get_height()/2 - size_.height/2 + 12),
"Editor Help");
- int x = gc.get_width()/2 - size.width/2 + 12;
- int y = gc.get_height()/2 - size.height/2 + 36;
+ int x = gc.get_width()/2 - size_.width/2 + 12;
+ int y = gc.get_height()/2 - size_.height/2 + 36;
gc.print_center(Fonts::verdana11, Vector2i(x + 50, y),
"A\n"
"Shift+A\n"
@@ -202,7 +202,7 @@
"Rotate 270 degree\n"));
x = int(gc.get_width()/2 + 12);
- y = int(gc.get_height()/2) - size.height/2 + 36;
+ y = int(gc.get_height()/2) - size_.height/2 + 36;
gc.print_center(Fonts::verdana11, Vector2i(x + 50, y),
"F\n"
"Shift+F\n"
@@ -224,7 +224,7 @@
);
gc.print_left(Fonts::verdana11,
- Vector2i(gc.get_width()/2 - size.width/2 + 12,
+ Vector2i(gc.get_width()/2 - size_.width/2 + 12,
gc.get_height()/2 - 10),
_("You should name your level files systematically, i.e.
by their theme, "
"their number and your nickname:\n\n"
@@ -470,43 +470,43 @@
void
EditorScreen::update_layout()
{
- Size size(gui_manager->get_rect().get_width(),
+ Size size_(gui_manager->get_rect().get_width(),
gui_manager->get_rect().get_height());
- minimap->set_rect(Rect(Vector2i(size.width-244, size.height-183), Size(244,
183)));
+ minimap->set_rect(Rect(Vector2i(size_.width-244, size_.height-183),
Size(244, 183)));
if (minimap->is_visible())
- object_selector->set_rect(Rect(size.width-244, 38, size.width, size.height
- 183));
+ object_selector->set_rect(Rect(size_.width-244, 38, size_.width,
size_.height - 183));
else
- object_selector->set_rect(Rect(size.width-244, 38, size.width,
size.height));
+ object_selector->set_rect(Rect(size_.width-244, 38, size_.width,
size_.height));
if (object_selector->is_visible())
{
- viewport->set_rect(Rect(0, 38, size.width - 244, size.height));
- level_properties->set_rect(Rect(Vector2i(0,38), Size(size.width-244,
302)));
+ viewport->set_rect(Rect(0, 38, size_.width - 244, size_.height));
+ level_properties->set_rect(Rect(Vector2i(0,38), Size(size_.width-244,
302)));
}
else
{
- viewport->set_rect(Rect(0, 38, size.width, size.height));
- level_properties->set_rect(Rect(Vector2i(0,38), Size(size.width, 302)));
+ viewport->set_rect(Rect(0, 38, size_.width, size_.height));
+ level_properties->set_rect(Rect(Vector2i(0,38), Size(size_.width,
302)));
}
action_properties->set_rect(Rect(Vector2i(0, 38), Size(150, 240)));
- object_properties->set_rect(Rect(Vector2i(0, size.height -
object_properties->get_rect().get_height()),
+ object_properties->set_rect(Rect(Vector2i(0, size_.height -
object_properties->get_rect().get_height()),
Size(object_properties->get_rect().get_width(),
object_properties->get_rect().get_height())));
- file_load_dialog->set_rect(Rect(Vector2i(50, 50), Size(size.width - 100,
- size.height - 100)));
- file_save_dialog->set_rect(Rect(Vector2i(50, 50), Size(size.width - 100,
- size.height - 100)));
+ file_load_dialog->set_rect(Rect(Vector2i(50, 50), Size(size_.width - 100,
+ size_.height - 100)));
+ file_save_dialog->set_rect(Rect(Vector2i(50, 50), Size(size_.width - 100,
+ size_.height - 100)));
}
void
-EditorScreen::resize(const Size& size)
+EditorScreen::resize(const Size& size_)
{
- gui_manager->set_rect(Rect(Vector2i(0, 0), size));
+ gui_manager->set_rect(Rect(Vector2i(0, 0), size_));
update_layout();
}
Modified: trunk/pingus/src/editor/file_dialog.cpp
===================================================================
--- trunk/pingus/src/editor/file_dialog.cpp 2009-11-04 05:41:19 UTC (rev
4017)
+++ trunk/pingus/src/editor/file_dialog.cpp 2009-11-04 06:24:07 UTC (rev
4018)
@@ -32,8 +32,8 @@
namespace Editor {
-FileDialog::FileDialog(EditorScreen* editor_, const Rect& rect, Mode mode_)
- : GroupComponent(rect),
+FileDialog::FileDialog(EditorScreen* editor_, const Rect& rect_, Mode mode_)
+ : GroupComponent(rect_),
editor(editor_),
mode(mode_)
{
Modified: trunk/pingus/src/editor/file_list.cpp
===================================================================
--- trunk/pingus/src/editor/file_list.cpp 2009-11-04 05:41:19 UTC (rev
4017)
+++ trunk/pingus/src/editor/file_list.cpp 2009-11-04 06:24:07 UTC (rev
4018)
@@ -24,8 +24,8 @@
namespace Editor {
-FileList::FileList(const Rect& rect)
- : RectComponent(rect),
+FileList::FileList(const Rect& rect_)
+ : RectComponent(rect_),
current_item(-1),
click_item(-1),
page(0),
Modified: trunk/pingus/src/editor/inputbox.cpp
===================================================================
--- trunk/pingus/src/editor/inputbox.cpp 2009-11-04 05:41:19 UTC (rev
4017)
+++ trunk/pingus/src/editor/inputbox.cpp 2009-11-04 06:24:07 UTC (rev
4018)
@@ -22,8 +22,8 @@
namespace Editor {
-Inputbox::Inputbox(const Rect& rect)
- : RectComponent(rect)
+Inputbox::Inputbox(const Rect& rect_)
+ : RectComponent(rect_)
{
}
Modified: trunk/pingus/src/editor/label.cpp
===================================================================
--- trunk/pingus/src/editor/label.cpp 2009-11-04 05:41:19 UTC (rev 4017)
+++ trunk/pingus/src/editor/label.cpp 2009-11-04 06:24:07 UTC (rev 4018)
@@ -20,8 +20,8 @@
namespace Editor {
-Label::Label(const Rect& rect, const std::string& text_)
- : RectComponent(rect),
+Label::Label(const Rect& rect_, const std::string& text_)
+ : RectComponent(rect_),
text(text_)
{
}
Modified: trunk/pingus/src/editor/level_objs.cpp
===================================================================
--- trunk/pingus/src/editor/level_objs.cpp 2009-11-04 05:41:19 UTC (rev
4017)
+++ trunk/pingus/src/editor/level_objs.cpp 2009-11-04 06:24:07 UTC (rev
4018)
@@ -207,15 +207,15 @@
{
fw.begin_section(section_name.c_str());
- const unsigned attribs = get_attributes(section_name);
+ const unsigned attribs_ = get_attributes(section_name);
- if (attribs & HAS_TYPE)
+ if (attribs_ & HAS_TYPE)
fw.write_string("type", object_type);
- if (attribs & HAS_GPTYPE)
+ if (attribs_ & HAS_GPTYPE)
fw.write_string("type", ground_type);
- if (attribs & HAS_SURFACE)
+ if (attribs_ & HAS_SURFACE)
{
fw.begin_section("surface");
fw.write_string("image", desc.res_name);
@@ -225,38 +225,38 @@
fw.write_vector("position", pos);
- if (attribs & HAS_SPEED)
+ if (attribs_ & HAS_SPEED)
fw.write_int("speed", speed);
- if (attribs & HAS_PARALLAX)
+ if (attribs_ & HAS_PARALLAX)
fw.write_float("parallax", parallax);
- if (attribs & HAS_REPEAT)
+ if (attribs_ & HAS_REPEAT)
fw.write_int("repeat", repeat);
- if (attribs & HAS_OWNER)
+ if (attribs_ & HAS_OWNER)
fw.write_int("owner-id", owner_id);
- if (attribs & HAS_DIRECTION)
+ if (attribs_ & HAS_DIRECTION)
fw.write_string("direction", direction);
- if (attribs & HAS_RELEASE_RATE)
+ if (attribs_ & HAS_RELEASE_RATE)
fw.write_int("release-rate", release_rate);
- if (attribs & HAS_COLOR)
+ if (attribs_ & HAS_COLOR)
fw.write_color("color", color);
- if (attribs & HAS_STRETCH)
+ if (attribs_ & HAS_STRETCH)
{
fw.write_bool("stretch-x", stretch_x);
fw.write_bool("stretch-y", stretch_y);
fw.write_bool("keep-aspect", keep_aspect);
}
- if (attribs & HAS_SCROLL)
+ if (attribs_ & HAS_SCROLL)
{
fw.write_float("scroll-x", scroll_x);
fw.write_float("scroll-y", scroll_y);
}
- if (attribs & HAS_PARA)
+ if (attribs_ & HAS_PARA)
{
fw.write_float("para-x", para_x);
fw.write_float("para-y", para_y);
}
- if (attribs & HAS_STARFIELD)
+ if (attribs_ & HAS_STARFIELD)
{
fw.write_int("small-stars", small_stars);
fw.write_int("middle-stars", middle_stars);
Modified: trunk/pingus/src/editor/level_properties.cpp
===================================================================
--- trunk/pingus/src/editor/level_properties.cpp 2009-11-04 05:41:19 UTC
(rev 4017)
+++ trunk/pingus/src/editor/level_properties.cpp 2009-11-04 06:24:07 UTC
(rev 4018)
@@ -37,8 +37,8 @@
namespace Editor {
-LevelProperties::LevelProperties(EditorScreen* editor_, const Rect& rect)
- : GroupComponent(rect),
+LevelProperties::LevelProperties(EditorScreen* editor_, const Rect& rect_)
+ : GroupComponent(rect_),
editor(editor_),
level(0)
{
Modified: trunk/pingus/src/editor/minimap.cpp
===================================================================
--- trunk/pingus/src/editor/minimap.cpp 2009-11-04 05:41:19 UTC (rev 4017)
+++ trunk/pingus/src/editor/minimap.cpp 2009-11-04 06:24:07 UTC (rev 4018)
@@ -23,8 +23,8 @@
namespace Editor {
-Minimap::Minimap(EditorScreen* editor_, const Rect& rect)
- : RectComponent(rect),
+Minimap::Minimap(EditorScreen* editor_, const Rect& rect_)
+ : RectComponent(rect_),
editor(editor_),
drawing_context(new DrawingContext(rect.grow(-3))),
dragging(false)
Modified: trunk/pingus/src/editor/object_properties.cpp
===================================================================
--- trunk/pingus/src/editor/object_properties.cpp 2009-11-04 05:41:19 UTC
(rev 4017)
+++ trunk/pingus/src/editor/object_properties.cpp 2009-11-04 06:24:07 UTC
(rev 4018)
@@ -33,8 +33,8 @@
namespace Editor {
-ObjectProperties::ObjectProperties(EditorScreen* editor_, const Rect& rect)
- : GUI::GroupComponent(rect, false),
+ObjectProperties::ObjectProperties(EditorScreen* editor_, const Rect& rect_)
+ : GUI::GroupComponent(rect_, false),
editor(editor_)
{
add(type_label = new Label(Rect(Vector2i(4, 4), Size(120, 20)),
_("Object:")));
Modified: trunk/pingus/src/editor/object_selector.cpp
===================================================================
--- trunk/pingus/src/editor/object_selector.cpp 2009-11-04 05:41:19 UTC (rev
4017)
+++ trunk/pingus/src/editor/object_selector.cpp 2009-11-04 06:24:07 UTC (rev
4018)
@@ -44,12 +44,12 @@
ResDescriptor desc;
std::string type;
- Groundpiece(const std::string& name, const std::string& type)
- : Object(Sprite(name),
- Resource::load_thumb_sprite(name)),
- desc(name),
- type(type)
- {}
+ Groundpiece(const std::string& name_, const std::string& type_) :
+ Object(Sprite(name_),
+ Resource::load_thumb_sprite(name_)),
+ desc(name_),
+ type(type_)
+ {}
LevelObj* create(const Vector2i& pos, LevelImpl* impl) {
LevelObj* obj = new LevelObj("groundpiece", impl);
@@ -103,11 +103,11 @@
ResDescriptor desc;
int z_pos;
- Hotspot(const std::string& name, int z_pos = 0)
- : Object(Sprite(name),
- Resource::load_thumb_sprite(name)),
- desc(name),
- z_pos(z_pos)
+ Hotspot(const std::string& name_, int z_pos_ = 0)
+ : Object(Sprite(name_),
+ Resource::load_thumb_sprite(name_)),
+ desc(name_),
+ z_pos(z_pos_)
{}
LevelObj* create(const Vector2i& pos, LevelImpl* impl) {
@@ -212,12 +212,12 @@
public:
ObjectSelectorButton(ObjectSelectorList* object_list_,
- const Vector2i& pos, const std::string& sprite, const
std::string& tooltip_)
- : RectComponent(Rect(pos, Size(30, 30))),
+ const Vector2i& pos_, const std::string& sprite_, const
std::string& tooltip_)
+ : RectComponent(Rect(pos_, Size(30, 30))),
object_list(object_list_),
button_raised(Sprite("core/editor/obj_button-raised")),
button_pressed(Sprite("core/editor/obj_button-pressed")),
- sprite(Sprite(sprite)),
+ sprite(Sprite(sprite_)),
mouse_over(false),
mouse_down(false),
tooltip(tooltip_)
Modified: trunk/pingus/src/editor/panel.cpp
===================================================================
--- trunk/pingus/src/editor/panel.cpp 2009-11-04 05:41:19 UTC (rev 4017)
+++ trunk/pingus/src/editor/panel.cpp 2009-11-04 06:24:07 UTC (rev 4018)
@@ -229,9 +229,9 @@
}
void
-Panel::add_button(const std::string& image, const std::string& tooltip,
Callback callback)
+Panel::add_button(const std::string& image, const std::string& tooltip,
Callback callback_)
{
- PanelButton* comp = new PanelButton(editor, pos, image, tooltip, callback);
+ PanelButton* comp = new PanelButton(editor, pos, image, tooltip, callback_);
pos.x += comp->get_width();
editor->get_gui_manager()->add(comp);
}
Modified: trunk/pingus/src/gui/group_component.cpp
===================================================================
--- trunk/pingus/src/gui/group_component.cpp 2009-11-04 05:41:19 UTC (rev
4017)
+++ trunk/pingus/src/gui/group_component.cpp 2009-11-04 06:24:07 UTC (rev
4018)
@@ -20,9 +20,9 @@
namespace GUI {
-GroupComponent::GroupComponent(const Rect& rect, bool clip)
- : RectComponent(rect),
- drawing_context(rect, clip),
+GroupComponent::GroupComponent(const Rect& rect_, bool clip_)
+ : RectComponent(rect_),
+ drawing_context(rect_, clip_),
mouse_over_comp(0),
focused_comp(0),
grabbed_comp(0),
Modified: trunk/pingus/src/gui/gui_manager.cpp
===================================================================
--- trunk/pingus/src/gui/gui_manager.cpp 2009-11-04 05:41:19 UTC (rev
4017)
+++ trunk/pingus/src/gui/gui_manager.cpp 2009-11-04 06:24:07 UTC (rev
4018)
@@ -31,8 +31,8 @@
{
}
-GUIManager::GUIManager(const Rect& rect)
- : GroupComponent(rect),
+GUIManager::GUIManager(const Rect& rect_)
+ : GroupComponent(rect_),
mouse_pos(400,300)
{
}
Modified: trunk/pingus/src/input/control.hpp
===================================================================
--- trunk/pingus/src/input/control.hpp 2009-11-04 05:41:19 UTC (rev 4017)
+++ trunk/pingus/src/input/control.hpp 2009-11-04 06:24:07 UTC (rev 4018)
@@ -42,13 +42,13 @@
virtual void notify_parent()
{
if (parent)
- {
- parent->update(this);
- }
+ {
+ parent->update(this);
+ }
else
- {
- std::cout << "Input: Control: Error: parent missing! " << std::endl;
- }
+ {
+ std::cout << "Input: Control: Error: parent missing! " << std::endl;
+ }
}
virtual void update(float delta) {
@@ -65,9 +65,9 @@
ButtonState state;
public:
- Button(Control* parent)
- : Control(parent),
- state(BUTTON_RELEASED)
+ Button(Control* parent_) :
+ Control(parent_),
+ state(BUTTON_RELEASED)
{}
bool get_state() const { return state; }
@@ -75,10 +75,10 @@
virtual void set_state(ButtonState new_state)
{
if (new_state != state)
- {
- state = new_state;
- notify_parent();
- }
+ {
+ state = new_state;
+ notify_parent();
+ }
}
};
@@ -88,8 +88,8 @@
std::vector<Button*> buttons;
public:
- ButtonGroup(Control* parent)
- : Button(parent)
+ ButtonGroup(Control* parent_) :
+ Button(parent_)
{}
~ButtonGroup()
@@ -98,8 +98,8 @@
delete *i;
}
- void add_button(Button* button) {
- buttons.push_back(button);
+ void add_button(Button* button_) {
+ buttons.push_back(button_);
}
void update(float delta) {
@@ -113,16 +113,16 @@
for(std::vector<Button*>::iterator i = buttons.begin();
i != buttons.end(); ++i)
- {
- if ((*i)->get_state() == BUTTON_PRESSED)
- new_state = BUTTON_PRESSED;
- }
+ {
+ if ((*i)->get_state() == BUTTON_PRESSED)
+ new_state = BUTTON_PRESSED;
+ }
if (new_state != state)
- {
- state = new_state;
- notify_parent();
- }
+ {
+ state = new_state;
+ notify_parent();
+ }
}
};
@@ -152,11 +152,11 @@
bool invert;
public:
- Axis(Control* parent)
- : Control(parent),
- pos(0.0f),
- dead_zone(0.2f),
- invert(false)
+ Axis(Control* parent_) :
+ Control(parent_),
+ pos(0.0f),
+ dead_zone(0.2f),
+ invert(false)
{}
float get_pos() const { return pos; }
@@ -169,10 +169,10 @@
new_pos = 0.0f;
if (new_pos != pos)
- {
- pos = new_pos;
- notify_parent();
- }
+ {
+ pos = new_pos;
+ notify_parent();
+ }
}
};
@@ -182,18 +182,18 @@
Vector2f pos;
public:
- Pointer(Control* parent)
- : Control(parent)
+ Pointer(Control* parent_) :
+ Control(parent_)
{}
Vector2f get_pos() const { return pos; }
void set_pos(const Vector2f& new_pos) {
if (pos != new_pos)
- {
- pos = new_pos;
- notify_parent();
- }
+ {
+ pos = new_pos;
+ notify_parent();
+ }
}
};
@@ -203,19 +203,19 @@
Vector2f delta;
public:
- Scroller(Control* parent)
- : Control(parent),
- delta(0.0f, 0.0f)
+ Scroller(Control* parent_) :
+ Control(parent_),
+ delta(0.0f, 0.0f)
{}
Vector2f get_delta() const { return delta; }
void set_delta(const Vector2f& new_delta) {
if (delta != new_delta)
- {
- delta = new_delta;
- notify_parent();
- }
+ {
+ delta = new_delta;
+ notify_parent();
+ }
}
};
@@ -224,8 +224,8 @@
std::vector<Axis*> axes;
public:
- AxisGroup(Control* parent)
- : Axis(parent)
+ AxisGroup(Control* parent_) :
+ Axis(parent_)
{}
~AxisGroup()
@@ -248,9 +248,9 @@
float new_pos = 0;
for(std::vector<Axis*>::iterator i = axes.begin(); i != axes.end(); ++i)
- {
- new_pos += (*i)->get_pos();
- }
+ {
+ new_pos += (*i)->get_pos();
+ }
new_pos = Math::clamp(-1.0f, new_pos, 1.0f);
@@ -282,8 +282,8 @@
std::vector<Pointer*> pointer;
public:
- PointerGroup(Control* parent)
- : Pointer(parent)
+ PointerGroup(Control* parent_) :
+ Pointer(parent_)
{}
~PointerGroup()
@@ -293,14 +293,14 @@
}
void update(Control* p) {
- Pointer* pointer = dynamic_cast<Pointer*>(p);
- assert(pointer);
- Vector2f new_pos = pointer->get_pos();
+ Pointer* pointer_ = dynamic_cast<Pointer*>(p);
+ assert(pointer_);
+ Vector2f new_pos = pointer_->get_pos();
if (new_pos != pos)
- {
- pos = new_pos;
- notify_parent();
- }
+ {
+ pos = new_pos;
+ notify_parent();
+ }
}
void update(float delta) {
@@ -337,8 +337,8 @@
std::vector<Scroller*> scrollers;
public:
- ScrollerGroup(Control* parent)
- : Scroller(parent)
+ ScrollerGroup(Control* parent_) :
+ Scroller(parent_)
{}
~ScrollerGroup()
@@ -347,9 +347,9 @@
delete *i;
}
- void update(float delta) {
+ void update(float delta_) {
for(std::vector<Scroller*>::iterator i = scrollers.begin(); i !=
scrollers.end(); ++i)
- (*i)->update(delta);
+ (*i)->update(delta_);
}
void update(Control* p) {
@@ -388,8 +388,8 @@
unsigned short chr;
public:
- Keyboard(Control* parent)
- : Control(parent)
+ Keyboard(Control* parent_) :
+ Control(parent_)
{}
void send_char(unsigned short c) { chr = c; notify_parent(); }
@@ -402,8 +402,8 @@
std::vector<Keyboard*> keyboards;
public:
- KeyboardGroup(Control* parent)
- : Keyboard(parent)
+ KeyboardGroup(Control* parent_) :
+ Keyboard(parent_)
{}
~KeyboardGroup()
Modified: trunk/pingus/src/input/core_driver.cpp
===================================================================
--- trunk/pingus/src/input/core_driver.cpp 2009-11-04 05:41:19 UTC (rev
4017)
+++ trunk/pingus/src/input/core_driver.cpp 2009-11-04 06:24:07 UTC (rev
4018)
@@ -31,10 +31,10 @@
float speed;
public:
- AxisPointer(Control* parent)
- : Pointer(parent),
- x_axis(0), y_axis(0), speed_button(0),
- speed(400.0f)
+ AxisPointer(Control* parent_) :
+ Pointer(parent_),
+ x_axis(0), y_axis(0), speed_button(0),
+ speed(400.0f)
{
}
@@ -92,10 +92,10 @@
float speed;
public:
- AxisScroller(Control* parent)
- : Scroller(parent),
- x_axis(0), y_axis(0), speed_button(0),
- speed(800.0f)
+ AxisScroller(Control* parent_) :
+ Scroller(parent_),
+ x_axis(0), y_axis(0), speed_button(0),
+ speed(800.0f)
{
}
@@ -115,12 +115,12 @@
//std::cout << "event" << std::endl;
}
- void update(float delta)
+ void update(float delta_)
{
- x_axis->update(delta);
- y_axis->update(delta);
+ x_axis->update(delta_);
+ y_axis->update(delta_);
- if (speed_button) speed_button->update(delta);
+ if (speed_button) speed_button->update(delta_);
float c_speed = speed;
@@ -129,8 +129,8 @@
c_speed *= 5.0f;
}
- this->delta.x = -x_axis->get_pos() * c_speed * delta;
- this->delta.y = y_axis->get_pos() * c_speed * delta;
+ this->delta.x = -x_axis->get_pos() * c_speed * delta_;
+ this->delta.y = y_axis->get_pos() * c_speed * delta_;
notify_parent();
}
@@ -146,10 +146,10 @@
float speed;
public:
- ButtonScroller(Control* parent)
- : Scroller(parent),
- up(0), down(0), left(0), right(0),
- speed(800.0f)
+ ButtonScroller(Control* parent_) :
+ Scroller(parent_),
+ up(0), down(0), left(0), right(0),
+ speed(800.0f)
{
}
Modified: trunk/pingus/src/math/size.hpp
===================================================================
--- trunk/pingus/src/math/size.hpp 2009-11-04 05:41:19 UTC (rev 4017)
+++ trunk/pingus/src/math/size.hpp 2009-11-04 06:24:07 UTC (rev 4018)
@@ -54,8 +54,8 @@
//param size: Size structure to construct this one from.
Size() : width(0), height(0) { return; }
- Size(int width, int height)
- : width(width), height(height) { }
+ Size(int width_, int height_)
+ : width(width_), height(height_) { }
Size(const Size &s)
{ width = s.width; height = s.height; }
@@ -115,8 +115,8 @@
height(static_cast<float>(s.height))
{}
- Sizef(float width, float height)
- : width(width), height(height) { }
+ Sizef(float width_, float height_)
+ : width(width_), height(height_) { }
Sizef(const Sizef &s)
{ width = s.width; height = s.height; }
Modified: trunk/pingus/src/pingus/addon_menu.hpp
===================================================================
--- trunk/pingus/src/pingus/addon_menu.hpp 2009-11-04 05:41:19 UTC (rev
4017)
+++ trunk/pingus/src/pingus/addon_menu.hpp 2009-11-04 06:24:07 UTC (rev
4018)
@@ -33,12 +33,12 @@
std::string description;
std::string author;
- AddOnEntry(const std::string& title,
- const std::string& description,
- const std::string& author)
- : title(title),
- description(description),
- author(author)
+ AddOnEntry(const std::string& title_,
+ const std::string& description_,
+ const std::string& author_)
+ : title(title_),
+ description(description_),
+ author(author_)
{}
};
Modified: trunk/pingus/src/pingus/credits.cpp
===================================================================
--- trunk/pingus/src/pingus/credits.cpp 2009-11-04 05:41:19 UTC (rev 4017)
+++ trunk/pingus/src/pingus/credits.cpp 2009-11-04 06:24:07 UTC (rev 4018)
@@ -254,6 +254,13 @@
void
Credits::draw_background (DrawingContext& gc)
{
+ {
+ // Paint the background wood panel
+ for(int y = 0; y < gc.get_height(); y += background.get_height())
+ for(int x = 0; x < gc.get_width(); x += background.get_width())
+ gc.draw(background, Vector2i(x, y));
+ }
+
int x;
int y;
int yof;
@@ -261,11 +268,6 @@
x = Display::get_width()/2;
y = (int)offset;
- // Paint the background wood panel
- for(int y = 0; y < gc.get_height(); y += background.get_height())
- for(int x = 0; x < gc.get_width(); x += background.get_width())
- gc.draw(background, Vector2i(x, y));
-
gc.draw(blackboard, Vector2i(gc.get_width()/2, gc.get_height()/2));
gc.draw(pingu, Vector2i(gc.get_width()/2, gc.get_height()/2 - 20));
@@ -277,25 +279,25 @@
gc.get_width()/2 + 685/2, gc.get_height()/2
+ 250));
for (std::vector<std::string>::iterator i = credits.begin(); i !=
credits.end(); ++i)
+ {
+ switch ((*i)[0])
{
- switch ((*i)[0])
- {
- case '-':
- scene_context->color().print_center(font, Vector2i(x, (y + yof)),
i->substr(1));
- yof += font.get_height() + 5;
- break;
- case '_':
- scene_context->color().print_center(font_small, Vector2i(x, (y +
yof)), i->substr(1));
- yof += font_small.get_height() + 5;
- break;
- case 'n':
- yof += 50;
- break;
- default:
- std::cout << "Credits: Syntax error: Unknown format: '" << (*i)[0] <<
"'" << std::endl;
- break;
- }
+ case '-':
+ scene_context->color().print_center(font, Vector2i(x, (y + yof)),
i->substr(1));
+ yof += font.get_height() + 5;
+ break;
+ case '_':
+ scene_context->color().print_center(font_small, Vector2i(x, (y +
yof)), i->substr(1));
+ yof += font_small.get_height() + 5;
+ break;
+ case 'n':
+ yof += 50;
+ break;
+ default:
+ std::cout << "Credits: Syntax error: Unknown format: '" << (*i)[0] <<
"'" << std::endl;
+ break;
}
+ }
gc.draw(new SceneContextDrawingRequest(scene_context, Vector2i(0,0), 100));
}
Modified: trunk/pingus/src/pingus/demo_session.cpp
===================================================================
--- trunk/pingus/src/pingus/demo_session.cpp 2009-11-04 05:41:19 UTC (rev
4017)
+++ trunk/pingus/src/pingus/demo_session.cpp 2009-11-04 06:24:07 UTC (rev
4018)
@@ -226,9 +226,9 @@
}
void
-DemoSession::resize(const Size& size)
+DemoSession::resize(const Size& size_)
{
- GUIScreen::resize(size);
+ GUIScreen::resize(size_);
int world_width = server->get_world()->get_width();
int world_height = server->get_world()->get_height();
Modified: trunk/pingus/src/pingus/font_description.cpp
===================================================================
--- trunk/pingus/src/pingus/font_description.cpp 2009-11-04 05:41:19 UTC
(rev 4017)
+++ trunk/pingus/src/pingus/font_description.cpp 2009-11-04 06:24:07 UTC
(rev 4018)
@@ -67,9 +67,9 @@
if (i->read_section("glyphs", glyph_section))
{
std::vector<FileReader> glyph_reader =
glyph_section.get_sections();
- for(std::vector<FileReader>::iterator i =
glyph_reader.begin(); i != glyph_reader.end(); ++i)
+ for(std::vector<FileReader>::iterator j =
glyph_reader.begin(); j != glyph_reader.end(); ++j)
{
- image_desc.glyphs.push_back(GlyphDescription(*i));
+ image_desc.glyphs.push_back(GlyphDescription(*j));
}
}
images.push_back(image_desc);
Modified: trunk/pingus/src/pingus/game_session.cpp
===================================================================
--- trunk/pingus/src/pingus/game_session.cpp 2009-11-04 05:41:19 UTC (rev
4017)
+++ trunk/pingus/src/pingus/game_session.cpp 2009-11-04 06:24:07 UTC (rev
4018)
@@ -362,9 +362,9 @@
}
void
-GameSession::resize(const Size& size)
+GameSession::resize(const Size& size_)
{
- GUIScreen::resize(size);
+ GUIScreen::resize(size_);
int world_width = server->get_world()->get_width();
int world_height = server->get_world()->get_height();
Modified: trunk/pingus/src/pingus/level_menu.cpp
===================================================================
--- trunk/pingus/src/pingus/level_menu.cpp 2009-11-04 05:41:19 UTC (rev
4017)
+++ trunk/pingus/src/pingus/level_menu.cpp 2009-11-04 06:24:07 UTC (rev
4018)
@@ -433,8 +433,10 @@
}
void
-LevelMenu::resize(const Size& size)
+LevelMenu::resize(const Size& size_)
{
+ GUIScreen::resize(size_);
+
x_pos = (size.width - default_screen_width)/2;
y_pos = (size.height - default_screen_height)/2;
Modified: trunk/pingus/src/pingus/levelset.cpp
===================================================================
--- trunk/pingus/src/pingus/levelset.cpp 2009-11-04 05:41:19 UTC (rev
4017)
+++ trunk/pingus/src/pingus/levelset.cpp 2009-11-04 06:24:07 UTC (rev
4018)
@@ -35,9 +35,9 @@
{
reader.read_string("title", title);
reader.read_string("description", description);
- std::string image;
- if (reader.read_string("image", image))
- this->image = Sprite(image);
+ std::string image_str;
+ if (reader.read_string("image", image_str))
+ this->image = Sprite(image_str);
FileReader level_reader = reader.read_section("levels");
std::vector<FileReader> sections = level_reader.get_sections();
Modified: trunk/pingus/src/pingus/option_menu.cpp
===================================================================
--- trunk/pingus/src/pingus/option_menu.cpp 2009-11-04 05:41:19 UTC (rev
4017)
+++ trunk/pingus/src/pingus/option_menu.cpp 2009-11-04 06:24:07 UTC (rev
4018)
@@ -277,9 +277,9 @@
}
void
-OptionMenu::resize(const Size& size)
+OptionMenu::resize(const Size& size_)
{
- GUIScreen::resize(size);
+ GUIScreen::resize(size_);
if (ok_button)
ok_button->set_pos(size.width/2 + 225, size.height/2 + 125);
@@ -370,10 +370,10 @@
{
if (str != "Custom")
{
- Size size;
- if (sscanf(str.c_str(), "%dx%d", &size.width, &size.height) == 2)
+ Size size_;
+ if (sscanf(str.c_str(), "%dx%d", &size_.width, &size_.height) == 2)
{
- config_manager.set_resolution(size);
+ config_manager.set_resolution(size_);
}
}
}
Modified: trunk/pingus/src/pingus/option_menu.hpp
===================================================================
--- trunk/pingus/src/pingus/option_menu.hpp 2009-11-04 05:41:19 UTC (rev
4017)
+++ trunk/pingus/src/pingus/option_menu.hpp 2009-11-04 06:24:07 UTC (rev
4018)
@@ -43,8 +43,8 @@
Label* label;
GUI::RectComponent* control;
- Option(Label* label, GUI::RectComponent* control)
- : label(label), control(control)
+ Option(Label* label_, GUI::RectComponent* control_)
+ : label(label_), control(control_)
{}
};
Modified: trunk/pingus/src/pingus/pingu.cpp
===================================================================
--- trunk/pingus/src/pingus/pingu.cpp 2009-11-04 05:41:19 UTC (rev 4017)
+++ trunk/pingus/src/pingus/pingu.cpp 2009-11-04 06:24:07 UTC (rev 4018)
@@ -460,9 +460,9 @@
}
boost::shared_ptr<PinguAction>
-Pingu::create_action(ActionName action)
+Pingu::create_action(ActionName action_)
{
- switch(action)
+ switch(action_)
{
case ANGEL: return boost::shared_ptr<PinguAction>(new Angel(this));
case BASHER: return boost::shared_ptr<PinguAction>(new Basher(this));
Modified: trunk/pingus/src/pingus/pingu_holder.cpp
===================================================================
--- trunk/pingus/src/pingus/pingu_holder.cpp 2009-11-04 05:41:19 UTC (rev
4017)
+++ trunk/pingus/src/pingus/pingu_holder.cpp 2009-11-04 06:24:07 UTC (rev
4018)
@@ -118,13 +118,13 @@
}
Pingu*
-PinguHolder::get_pingu(unsigned int id)
+PinguHolder::get_pingu(unsigned int id_)
{
- if (id < all_pingus.size())
+ if (id_ < all_pingus.size())
{
- Pingu* pingu = all_pingus[id];
+ Pingu* pingu = all_pingus[id_];
- assert(pingu->get_id() == id);
+ assert(pingu->get_id() == id_);
if (pingu->get_status() == PS_ALIVE)
return pingu;
Modified: trunk/pingus/src/pingus/pingus_main.hpp
===================================================================
--- trunk/pingus/src/pingus/pingus_main.hpp 2009-11-04 05:41:19 UTC (rev
4017)
+++ trunk/pingus/src/pingus/pingus_main.hpp 2009-11-04 06:24:07 UTC (rev
4018)
@@ -60,10 +60,8 @@
PingusMain (const PingusMain&);
PingusMain& operator= (const PingusMain&);
+};
-} app; // golbal class instance
-
-
#endif
/* EOF */
Modified: trunk/pingus/src/pingus/pingus_menu.cpp
===================================================================
--- trunk/pingus/src/pingus/pingus_menu.cpp 2009-11-04 05:41:19 UTC (rev
4017)
+++ trunk/pingus/src/pingus/pingus_menu.cpp 2009-11-04 06:24:07 UTC (rev
4018)
@@ -41,25 +41,25 @@
{
is_init = false;
- Size size(Display::get_width(), Display::get_height());
+ Size size_(Display::get_width(), Display::get_height());
- start_button = new MenuButton(this, Vector2i(size.width/2 - 150,
- size.height/2 + 20),
+ start_button = new MenuButton(this, Vector2i(size_.width/2 - 150,
+ size_.height/2 + 20),
_("Story"),
_("..:: Start the game ::.."));
- editor_button = new MenuButton(this, Vector2i(size.width/2 + 150,
- size.height/2 + 20),
+ editor_button = new MenuButton(this, Vector2i(size_.width/2 + 150,
+ size_.height/2 + 20),
_("Editor"),
_("..:: Create your own levels ::.."));
- quit_button = new MenuButton(this, Vector2i(size.width/2 + 150,
- size.height/2 + 100),
+ quit_button = new MenuButton(this, Vector2i(size_.width/2 + 150,
+ size_.height/2 + 100),
_("Exit"),
_("..:: Bye, bye ::.."));
- contrib_button = new MenuButton(this, Vector2i(size.width/2 - 150,
- size.height/2 + 100),
+ contrib_button = new MenuButton(this, Vector2i(size_.width/2 - 150,
+ size_.height/2 + 100),
_("Levelsets"),
_("..:: Play User Built levels ::.."));
@@ -201,7 +201,7 @@
}
void
-PingusMenu::create_background(const Size& size)
+PingusMenu::create_background(const Size& size_)
{
// Recreate the layer manager in the new size
background = std::auto_ptr<LayerManager>(new LayerManager());
@@ -212,8 +212,8 @@
Surface layer4 = Resource::load_surface("core/menu/layer4");
Surface layer5 = Resource::load_surface("core/menu/layer5");
- int w = size.width;
- int h = size.height;
+ int w = size_.width;
+ int h = size_.height;
// We only need to scale the background main menu images if the screen
// resolution is not default
@@ -242,9 +242,9 @@
}
void
-PingusMenu::resize(const Size& size)
+PingusMenu::resize(const Size& size_)
{
- GUIScreen::resize(size);
+ GUIScreen::resize(size_);
create_background(size);
start_button->set_pos(size.width/2 - 150,
Modified: trunk/pingus/src/pingus/resource_manager.cpp
===================================================================
--- trunk/pingus/src/pingus/resource_manager.cpp 2009-11-04 05:41:19 UTC
(rev 4017)
+++ trunk/pingus/src/pingus/resource_manager.cpp 2009-11-04 06:24:07 UTC
(rev 4018)
@@ -145,10 +145,10 @@
}
else
{
- Aliases::const_iterator i = aliases.find(name);
- if (i != aliases.end())
+ Aliases::const_iterator j = aliases.find(name);
+ if (j != aliases.end())
{
- return get_sprite_description(i->second);
+ return get_sprite_description(j->second);
}
else
{
Modified: trunk/pingus/src/pingus/result_screen.cpp
===================================================================
--- trunk/pingus/src/pingus/result_screen.cpp 2009-11-04 05:41:19 UTC (rev
4017)
+++ trunk/pingus/src/pingus/result_screen.cpp 2009-11-04 06:24:07 UTC (rev
4018)
@@ -307,9 +307,9 @@
}
void
-ResultScreen::resize(const Size& size)
+ResultScreen::resize(const Size& size_)
{
- GUIScreen::resize(size);
+ GUIScreen::resize(size_);
if (ok_button)
ok_button->set_pos(size.width/2 + 225, size.height/2 + 125);
Modified: trunk/pingus/src/pingus/savegame_manager.cpp
===================================================================
--- trunk/pingus/src/pingus/savegame_manager.cpp 2009-11-04 05:41:19 UTC
(rev 4017)
+++ trunk/pingus/src/pingus/savegame_manager.cpp 2009-11-04 06:24:07 UTC
(rev 4018)
@@ -97,9 +97,9 @@
}
Savegame*
-SavegameManager::get(const std::string& filename)
+SavegameManager::get(const std::string& filename_)
{
- SavegameTable::iterator i = find(filename);
+ SavegameTable::iterator i = find(filename_);
if (i == savegames.end())
return 0;
else
@@ -133,13 +133,13 @@
}
SavegameManager::SavegameTable::iterator
-SavegameManager::find(const std::string& filename)
+SavegameManager::find(const std::string& filename_)
{
//std::cout << "SavegameManager::find: \"" << filename << "\"" << std::endl;
for(SavegameTable::iterator i = savegames.begin();
i != savegames.end(); ++i)
- if ((*i)->get_filename() == filename)
+ if ((*i)->get_filename() == filename_)
return i;
return savegames.end();
Modified: trunk/pingus/src/pingus/sprite.cpp
===================================================================
--- trunk/pingus/src/pingus/sprite.cpp 2009-11-04 05:41:19 UTC (rev 4017)
+++ trunk/pingus/src/pingus/sprite.cpp 2009-11-04 06:24:07 UTC (rev 4018)
@@ -43,9 +43,9 @@
}
else
{
- SpriteDescription desc;
- desc.filename = Pathname("images/core/misc/404.png",
Pathname::DATA_PATH);
- impl = boost::shared_ptr<SpriteImpl>(new SpriteImpl(desc));
+ SpriteDescription desc_;
+ desc_.filename = Pathname("images/core/misc/404.png",
Pathname::DATA_PATH);
+ impl = boost::shared_ptr<SpriteImpl>(new SpriteImpl(desc_));
}
}
@@ -58,9 +58,9 @@
}
else
{
- SpriteDescription desc;
- desc.filename = Pathname("images/core/misc/404.png",
Pathname::DATA_PATH);
- impl = boost::shared_ptr<SpriteImpl>(new SpriteImpl(desc));
+ SpriteDescription desc_;
+ desc_.filename = Pathname("images/core/misc/404.png",
Pathname::DATA_PATH);
+ impl = boost::shared_ptr<SpriteImpl>(new SpriteImpl(desc_));
}
}
Modified: trunk/pingus/src/pingus/start_screen.cpp
===================================================================
--- trunk/pingus/src/pingus/start_screen.cpp 2009-11-04 05:41:19 UTC (rev
4017)
+++ trunk/pingus/src/pingus/start_screen.cpp 2009-11-04 06:24:07 UTC (rev
4018)
@@ -242,9 +242,9 @@
}
void
-StartScreen::resize(const Size& size)
+StartScreen::resize(const Size& size_)
{
- GUIScreen::resize(size);
+ GUIScreen::resize(size_);
abort_button->set_pos(size.width/2 - 300, size.height/2 + 144);
ok_button ->set_pos(size.width/2 + 225, size.height/2 + 125);
Modified: trunk/pingus/src/pingus/story_screen.cpp
===================================================================
--- trunk/pingus/src/pingus/story_screen.cpp 2009-11-04 05:41:19 UTC (rev
4017)
+++ trunk/pingus/src/pingus/story_screen.cpp 2009-11-04 06:24:07 UTC (rev
4018)
@@ -282,9 +282,9 @@
}
void
-StoryScreen::resize(const Size& size)
+StoryScreen::resize(const Size& size_)
{
- GUIScreen::resize(size);
+ GUIScreen::resize(size_);
continue_button->set_pos(size.width/2 + 220 + 40,
size.height/2 + 180 +32);
Modified: trunk/pingus/src/pingus/surface.cpp
===================================================================
--- trunk/pingus/src/pingus/surface.cpp 2009-11-04 05:41:19 UTC (rev 4017)
+++ trunk/pingus/src/pingus/surface.cpp 2009-11-04 06:24:07 UTC (rev 4018)
@@ -32,8 +32,8 @@
: surface(0)
{}
- SurfaceImpl(SDL_Surface* surface)
- : surface(surface)
+ SurfaceImpl(SDL_Surface* surface_) :
+ surface(surface_)
{}
~SurfaceImpl()
Modified: trunk/pingus/src/screen/gui_screen.cpp
===================================================================
--- trunk/pingus/src/screen/gui_screen.cpp 2009-11-04 05:41:19 UTC (rev
4017)
+++ trunk/pingus/src/screen/gui_screen.cpp 2009-11-04 06:24:07 UTC (rev
4018)
@@ -160,9 +160,9 @@
}
void
-GUIScreen::resize(const Size& size)
+GUIScreen::resize(const Size& size_)
{
- Screen::resize(size);
+ Screen::resize(size_);
gui_manager->set_rect(Rect(Vector2i(0, 0), size));
}
Modified: trunk/pingus/src/worldmap/level_dot.cpp
===================================================================
--- trunk/pingus/src/worldmap/level_dot.cpp 2009-11-04 05:41:19 UTC (rev
4017)
+++ trunk/pingus/src/worldmap/level_dot.cpp 2009-11-04 06:24:07 UTC (rev
4018)
@@ -175,11 +175,11 @@
Savegame* savegame = SavegameManager::instance()->get(plf.get_resname());
if (savegame == 0 || savegame->get_status() == Savegame::NONE)
{
- Savegame savegame(plf.get_resname(),
+ Savegame savegame_(plf.get_resname(),
Savegame::ACCESSIBLE,
0,
0);
- SavegameManager::instance()->store(savegame);
+ SavegameManager::instance()->store(savegame_);
}
else
{
Modified: trunk/pingus/src/worldmap/path.cpp
===================================================================
--- trunk/pingus/src/worldmap/path.cpp 2009-11-04 05:41:19 UTC (rev 4017)
+++ trunk/pingus/src/worldmap/path.cpp 2009-11-04 06:24:07 UTC (rev 4018)
@@ -56,14 +56,14 @@
}
else
{
- float length = 0;
+ float length_ = 0;
Vec::iterator prev = vec.begin();
for(Vec::iterator next = prev + 1; next != vec.end(); ++next)
{
- length += Vector3f ::distance2d(*prev, *next);
+ length_ += Vector3f ::distance2d(*prev, *next);
prev = next;
}
- return length;
+ return length_;
}
}
@@ -78,18 +78,18 @@
float comp_length = 0.0f;
while (next != vec.end())
{
- float length = Vector3f::distance2d(*current, *next);
+ float length_ = Vector3f::distance2d(*current, *next);
// The pingu is between current and next
- if (comp_length + length > vec_position)
+ if (comp_length + length_ > vec_position)
{
float perc = (vec_position - comp_length) // length to walk from
current node
- / length;
+ / length_;
return Vector3f::interpolate(*current, *next, perc);
}
- comp_length += length;
+ comp_length += length_;
++current;
++next;
Modified: trunk/pingus/src/worldmap/worldmap_component.cpp
===================================================================
--- trunk/pingus/src/worldmap/worldmap_component.cpp 2009-11-04 05:41:19 UTC
(rev 4017)
+++ trunk/pingus/src/worldmap/worldmap_component.cpp 2009-11-04 06:24:07 UTC
(rev 4018)
@@ -22,10 +22,9 @@
namespace WorldmapNS {
-WorldmapComponent::WorldmapComponent(WorldmapScreen* worldmap_screen)
- : scene_context(new SceneContext()),
- worldmap_screen(worldmap_screen)
-
+WorldmapComponent::WorldmapComponent(WorldmapScreen* worldmap_screen_) :
+ scene_context(new SceneContext),
+ worldmap_screen(worldmap_screen_)
{
}
Modified: trunk/pingus/src/worldmap/worldmap_screen.cpp
===================================================================
--- trunk/pingus/src/worldmap/worldmap_screen.cpp 2009-11-04 05:41:19 UTC
(rev 4017)
+++ trunk/pingus/src/worldmap/worldmap_screen.cpp 2009-11-04 06:24:07 UTC
(rev 4018)
@@ -86,12 +86,12 @@
void on_pointer_enter();
};
-WorldmapScreenCreditsButton::WorldmapScreenCreditsButton(WorldmapScreen*
worldmap_screen)
- : GUI::SurfaceButton(Display::get_width() - 150, 0,
- "core/worldmap/credits_button_normal",
- "core/worldmap/credits_button_pressed",
- "core/worldmap/credits_button_hover"),
- worldmap_screen(worldmap_screen)
+WorldmapScreenCreditsButton::WorldmapScreenCreditsButton(WorldmapScreen*
worldmap_screen_) :
+ GUI::SurfaceButton(Display::get_width() - 150, 0,
+ "core/worldmap/credits_button_normal",
+ "core/worldmap/credits_button_pressed",
+ "core/worldmap/credits_button_hover"),
+ worldmap_screen(worldmap_screen_)
{
}
@@ -115,12 +115,12 @@
worldmap_screen->show_end_story();
}
-WorldmapScreenStoryButton::WorldmapScreenStoryButton(WorldmapScreen*
worldmap_screen)
- : GUI::SurfaceButton(0, 0,
- "core/worldmap/story_button_normal",
- "core/worldmap/story_button_pressed",
- "core/worldmap/story_button_hover"),
- worldmap_screen(worldmap_screen)
+WorldmapScreenStoryButton::WorldmapScreenStoryButton(WorldmapScreen*
worldmap_screen_) :
+ GUI::SurfaceButton(0, 0,
+ "core/worldmap/story_button_normal",
+ "core/worldmap/story_button_pressed",
+ "core/worldmap/story_button_hover"),
+ worldmap_screen(worldmap_screen_)
{
}
@@ -144,12 +144,12 @@
worldmap_screen->show_intro_story();
}
-WorldmapScreenCloseButton::WorldmapScreenCloseButton(WorldmapScreen*
worldmap_screen)
- : GUI::SurfaceButton(0, Display::get_height() - 37,
- "core/worldmap/leave_button_normal",
- "core/worldmap/leave_button_pressed",
- "core/worldmap/leave_button_hover"),
- worldmap_screen(worldmap_screen)
+WorldmapScreenCloseButton::WorldmapScreenCloseButton(WorldmapScreen*
worldmap_screen_) :
+ GUI::SurfaceButton(0, Display::get_height() - 37,
+ "core/worldmap/leave_button_normal",
+ "core/worldmap/leave_button_pressed",
+ "core/worldmap/leave_button_hover"),
+ worldmap_screen(worldmap_screen_)
{
}
@@ -173,12 +173,12 @@
ScreenManager::instance ()->pop_screen ();
}
-WorldmapScreenEnterButton::WorldmapScreenEnterButton(WorldmapScreen*
worldmap_screen)
- : GUI::SurfaceButton(Display::get_width() - 119, Display::get_height() - 37,
- "core/worldmap/enter_button_normal",
- "core/worldmap/enter_button_pressed",
- "core/worldmap/enter_button_hover"),
- worldmap_screen(worldmap_screen)
+WorldmapScreenEnterButton::WorldmapScreenEnterButton(WorldmapScreen*
worldmap_screen_) :
+ GUI::SurfaceButton(Display::get_width() - 119, Display::get_height() - 37,
+ "core/worldmap/enter_button_normal",
+ "core/worldmap/enter_button_pressed",
+ "core/worldmap/enter_button_hover"),
+ worldmap_screen(worldmap_screen_)
{
}
@@ -193,17 +193,17 @@
WorldmapScreenEnterButton::draw (DrawingContext& gc)
{
if (worldmap_screen->get_worldmap()->get_pingus()->is_walking())
- {
- gc.draw(button_surface, Vector2i(x_pos, y_pos));
- }
+ {
+ gc.draw(button_surface, Vector2i(x_pos, y_pos));
+ }
else
- {
- SurfaceButton::draw(gc);
- gc.print_center(Fonts::chalk_small,
- Vector2i(Display::get_width() - 43 - 22,
- Display::get_height() - 25),
- _("Enter?"));
- }
+ {
+ SurfaceButton::draw(gc);
+ gc.print_center(Fonts::chalk_small,
+ Vector2i(Display::get_width() - 43 - 22,
+ Display::get_height() - 25),
+ _("Enter?"));
+ }
}
void
@@ -242,9 +242,9 @@
bool credits_unlocked = false;
//StatManager::instance()->get_bool(worldmap->get_short_name() +
"-endstory-seen", credits_unlocked);
if (credits_unlocked)
- {
- gui_manager->add(new WorldmapScreenCreditsButton(this));
- }
+ {
+ gui_manager->add(new WorldmapScreenCreditsButton(this));
+ }
}
void
@@ -275,9 +275,9 @@
// Check if new worldmap is set and if so, change it
if (new_worldmap.get())
- {
- worldmap = new_worldmap;
- }
+ {
+ worldmap = new_worldmap;
+ }
}
void
@@ -315,8 +315,10 @@
}
void
-WorldmapScreen::resize(const Size& size)
+WorldmapScreen::resize(const Size& size_)
{
+ GUIScreen::resize(size_);
+
close_button->set_pos(0, size.height - 37);
story_button->set_pos(0, 0);
enter_button->set_pos(size.width - 119, size.height - 37);
Modified: trunk/pingus/src/worldobjs/conveyor_belt.cpp
===================================================================
--- trunk/pingus/src/worldobjs/conveyor_belt.cpp 2009-11-04 05:41:19 UTC
(rev 4017)
+++ trunk/pingus/src/worldobjs/conveyor_belt.cpp 2009-11-04 06:24:07 UTC
(rev 4018)
@@ -75,9 +75,9 @@
&& (*pingu)->get_pos().y > pos.y - 2
&& (*pingu)->get_pos().y < pos.y + 10)
{
- Vector3f pos = (*pingu)->get_pos();
- pos.x -= speed * 0.025f;
- (*pingu)->set_pos(pos);
+ Vector3f pos_ = (*pingu)->get_pos();
+ pos_.x -= speed * 0.025f;
+ (*pingu)->set_pos(pos_);
}
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] r4018 - in trunk/pingus/src: components display editor gui input math pingus screen worldmap worldobjs,
grumbel at BerliOS <=