[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src action_button.cxx,1.16,1.17 client.cx
From: |
torangan |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src action_button.cxx,1.16,1.17 client.cxx,1.29,1.30 display_graphic_context.cxx,1.6,1.7 exit_menu.cxx,1.11,1.12 fade_out.cxx,1.4,1.5 fade_out.hxx,1.4,1.5 pingu.cxx,1.34,1.35 pingu_action.hxx,1.17,1.18 pingus_resource.cxx,1.16,1.17 playfield.cxx,1.26,1.27 playfield.hxx,1.12,1.13 surface_button.cxx,1.15,1.16 theme.cxx,1.8,1.9 |
Date: |
12 Oct 2002 00:49:12 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src
In directory dark:/tmp/cvs-serv10029
Modified Files:
action_button.cxx client.cxx display_graphic_context.cxx
exit_menu.cxx fade_out.cxx fade_out.hxx pingu.cxx
pingu_action.hxx pingus_resource.cxx playfield.cxx
playfield.hxx surface_button.cxx theme.cxx
Log Message:
removed a few variable shadowings
Index: action_button.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/action_button.cxx,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- action_button.cxx 4 Oct 2002 16:54:03 -0000 1.16
+++ action_button.cxx 12 Oct 2002 00:49:09 -0000 1.17
@@ -99,11 +99,11 @@
action_holder = h;
}
-VerticalActionButton::VerticalActionButton(int x, int y, ActionName name, int
owner_id) :
+VerticalActionButton::VerticalActionButton(int x, int y, ActionName name_, int
owner_id) :
background (PingusResource::load_surface("buttons/buttonbackground",
"core")),
backgroundhl (PingusResource::load_surface("buttons/buttonbackgroundhl",
"core"))
{
- init(x, y, name, owner_id);
+ init(x, y, name_, owner_id);
}
VerticalActionButton::~VerticalActionButton () {}
Index: client.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/client.cxx,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- client.cxx 7 Oct 2002 23:11:09 -0000 1.29
+++ client.cxx 12 Oct 2002 00:49:09 -0000 1.30
@@ -89,8 +89,7 @@
// Connect the button_panel with the playfield
playfield->set_buttons(button_panel);
playfield->set_server(server);
- playfield->set_client(this);
-
+
timer.stop();
}
Index: display_graphic_context.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/display_graphic_context.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- display_graphic_context.cxx 28 Sep 2002 22:24:24 -0000 1.6
+++ display_graphic_context.cxx 12 Oct 2002 00:49:09 -0000 1.7
@@ -25,10 +25,10 @@
#include "sprite.hxx"
#include "display_graphic_context.hxx"
-DisplayGraphicContext::DisplayGraphicContext (int x1, int y1, int x2, int y2,
+DisplayGraphicContext::DisplayGraphicContext (int x1_, int y1_, int x2_, int
y2_,
int /*x_offset*/, int
/*y_offset*/)
- : x1 (x1), y1 (y1), x2 (x2), y2 (y2), offset (-(x2 - x1)/2.0f,
-(y2-x1)/2.0f, 1.0f)
-{
+ : x1(x1_), y1(y1_), x2(x2_), y2(y2_), offset(-(x2_ - x1_) / 2.0f, -(y2_ -
x1_) / 2.0f, 1.0f)
+{
center = Vector ((x2 - x1)/2.0f + x1,
(y2 - y1)/2.0f + y1);
std::cout << "View: " << x1 << ", " << y1 << ", " << x2 << ", " << y2
@@ -85,8 +85,8 @@
Vector pos1 = screen_to_world (Vector(rect.x1, rect.y1));
Vector pos2 = screen_to_world (Vector(rect.x2, rect.y2));
- Vector center = (pos2 + pos1) * 0.5f;
- offset = -center;
+ Vector center_ = (pos2 + pos1) * 0.5f;
+ offset = -center_;
float width = pos2.x - pos1.x;
float height = pos2.y - pos1.y;
@@ -242,35 +242,35 @@
}
void
-DisplayGraphicContext::draw_line (int x1, int y1, int x2, int y2,
- float r, float g, float b, float a)
+DisplayGraphicContext::draw_line (int x1_, int y1_, int x2_, int y2_,
+ float r, float g, float b, float a)
{
- CL_Display::draw_line (int((x1 + get_x_offset ()) * offset.z + center.x),
- int((y1 + get_y_offset ()) * offset.z + center.y),
- int((x2 + get_x_offset ()) * offset.z + center.x),
- int((y2 + get_y_offset ()) * offset.z + center.y),
+ CL_Display::draw_line (static_cast<int>((x1_ + get_x_offset()) * offset.z +
center.x),
+ static_cast<int>((y1_ + get_y_offset()) * offset.z +
center.y),
+ static_cast<int>((x2_ + get_x_offset()) * offset.z +
center.x),
+ static_cast<int>((y2_ + get_y_offset()) * offset.z +
center.y),
r, g, b, a);
}
void
-DisplayGraphicContext::draw_fillrect (int x1, int y1, int x2, int y2,
- float r, float g, float b, float a)
+DisplayGraphicContext::draw_fillrect (int x1_, int y1_, int x2_, int y2_,
+ float r, float g, float b, float a)
{
- CL_Display::fill_rect (int((x1 + get_x_offset ()) * offset.z + center.x),
- int((y1 + get_y_offset ()) * offset.z + center.y),
- int((x2 + get_x_offset ()) * offset.z + center.x),
- int((y2 + get_y_offset ()) * offset.z + center.y),
+ CL_Display::fill_rect (static_cast<int>((x1_ + get_x_offset()) * offset.z +
center.x),
+ static_cast<int>((y1_ + get_y_offset()) * offset.z +
center.y),
+ static_cast<int>((x2_ + get_x_offset()) * offset.z +
center.x),
+ static_cast<int>((y2_ + get_y_offset()) * offset.z +
center.y),
r, g, b, a);
}
void
-DisplayGraphicContext::draw_rect (int x1, int y1, int x2, int y2,
+DisplayGraphicContext::draw_rect (int x1_, int y1_, int x2_, int y2_,
float r, float g, float b, float a)
{
- CL_Display::draw_rect (int((x1 + get_x_offset ()) * offset.z + center.x),
- int((y1 + get_y_offset ()) * offset.z + center.y),
- int((x2 + get_x_offset ()) * offset.z + center.x),
- int((y2 + get_y_offset ()) * offset.z + center.y),
+ CL_Display::draw_rect (static_cast<int>((x1_ + get_x_offset()) * offset.z +
center.x),
+ static_cast<int>((y1_ + get_y_offset()) * offset.z +
center.y),
+ static_cast<int>((x2_ + get_x_offset()) * offset.z +
center.x),
+ static_cast<int>((y2_ + get_y_offset()) * offset.z +
center.y),
r, g, b, a);
}
Index: exit_menu.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/exit_menu.cxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- exit_menu.cxx 1 Oct 2002 21:48:32 -0000 1.11
+++ exit_menu.cxx 12 Oct 2002 00:49:09 -0000 1.12
@@ -71,11 +71,11 @@
}
};
-ExitMenu::ExitMenu (PingusMenuManager* manager)
- : PingusSubMenu (manager)
+ExitMenu::ExitMenu (PingusMenuManager* manager_)
+ : PingusSubMenu (manager_)
{
- gui_manager->add (new ExitMenuYesButton (manager), true);
- gui_manager->add (new ExitMenuNoButton (manager), true);
+ gui_manager->add(new ExitMenuYesButton(manager), true);
+ gui_manager->add(new ExitMenuNoButton (manager), true);
}
ExitMenu::~ExitMenu ()
Index: fade_out.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/fade_out.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- fade_out.cxx 11 Sep 2002 12:45:57 -0000 1.4
+++ fade_out.cxx 12 Oct 2002 00:49:10 -0000 1.5
@@ -27,9 +27,9 @@
using namespace std;
-FadeOut::FadeOut (float seconds, Color color)
- : complete_time (seconds), passed_time (0),
- color (color)
+FadeOut::FadeOut (float seconds, Color color_)
+ : complete_time(seconds), passed_time(0),
+ color(color_)
{
}
Index: fade_out.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/fade_out.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- fade_out.hxx 27 Sep 2002 11:26:43 -0000 1.4
+++ fade_out.hxx 12 Oct 2002 00:49:10 -0000 1.5
@@ -67,8 +67,8 @@
{
private:
public:
- EnlargingRectFadeOut (float seconds = 1.0f, Color color = Color ())
- : FadeOut (seconds, color) {}
+ EnlargingRectFadeOut (float seconds = 1.0f, Color color_ = Color())
+ : FadeOut (seconds, color_) {}
~EnlargingRectFadeOut () {}
void draw ();
Index: pingu.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingu.cxx,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- pingu.cxx 12 Oct 2002 00:24:26 -0000 1.34
+++ pingu.cxx 12 Oct 2002 00:49:10 -0000 1.35
@@ -42,7 +42,7 @@
countdown_action (0),
wall_action(0),
fall_action(0),
- previous_action (Actions::Faller),
+ previous_action(Actions::Faller),
id(arg_id),
action_time(-1),
owner_id(owner),
@@ -198,19 +198,19 @@
default:
pout(PINGUS_DEBUG_ACTIONS) << "unknown action activation_mode" <<
std::endl;
- assert(0);
ret_val = false;
+ assert(0);
break;
}
}
- if (ret_val == true) // Action successfull applied
+ if (ret_val) // Action successfull applied
{
- act->on_successfull_apply (this);
+ act->on_successfull_apply();
}
else // Action failed to be set
{
- act->on_failed_apply (this);
+ act->on_failed_apply(this);
}
return ret_val;
Index: pingu_action.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingu_action.hxx,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- pingu_action.hxx 1 Oct 2002 19:53:44 -0000 1.17
+++ pingu_action.hxx 12 Oct 2002 00:49:10 -0000 1.18
@@ -53,7 +53,7 @@
virtual ~PinguAction();
/// Gives the PinguAction class access to the data of the Pingu.
- void set_pingu(Pingu*);
+ void set_pingu (Pingu*);
/** Get the pixel from the colmap, relative to the pingu position.
@@ -62,7 +62,7 @@
@param y 1 is up, -1 is down
*/
- int rel_getpixel(int x, int y);
+ int rel_getpixel (int x, int y);
/** Checks if this action allows to be overwritten with the given new action
*/
virtual bool change_allowed (Actions::ActionName) { return true; }
@@ -96,10 +96,10 @@
virtual bool need_catch();
///
- virtual void catch_pingu(Pingu*) { /* do nothing */}
+ virtual void catch_pingu (Pingu*) { /* do nothing */}
/// The time the action needs to get activated (see bomber.cxx)
- virtual int activation_time() { return -1; };
+ virtual int activation_time () { return -1; };
/** Return true if the pingu can be catched with the mouse and
another action can be applied, false otherwise (exiter,
@@ -110,7 +110,7 @@
bool head_collision_on_walk (int x, int y);
/** Called if the action was successfully applied via request_set_action */
- virtual void on_successfull_apply (Pingu*) { }
+ virtual void on_successfull_apply () { }
/** Called if the request_set_action failded to apply this action */
virtual void on_failed_apply (Pingu*) { }
Index: pingus_resource.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingus_resource.cxx,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- pingus_resource.cxx 11 Sep 2002 12:45:57 -0000 1.16
+++ pingus_resource.cxx 12 Oct 2002 00:49:10 -0000 1.17
@@ -142,7 +142,7 @@
}
else // never loaded, need to load it from source
{
- ResDescriptor desc = res_desc;
+ desc = res_desc;
desc.modifier = ResourceModifierNS::ROT0;
pout(PINGUS_DEBUG_RESOURCES) << "PingusResource: Loading surface from
source: " << res_desc << std::endl;
@@ -232,9 +232,8 @@
// FIXME: Memory leak?
pout << "PingusResource::load_surface(" << res_desc.res_name << ")" <<
std::endl;
// FIXME: Add pcx, jpeg, tga support here
- return CL_Surface(new CL_PNGProvider(filename, NULL), true);
pout << "DONE" << std::endl;
- break;
+ return CL_Surface(new CL_PNGProvider(filename, NULL), true);
}
case ResDescriptor::RD_AUTO:
@@ -244,8 +243,7 @@
default:
perr << "PingusResource: Unknown ResDescriptor::type: " << res_desc.type
<< std::endl;
assert (false);
- return CL_Surface();
- break;
+ //return CL_Surface();
}
}
Index: playfield.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/playfield.cxx,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- playfield.cxx 4 Oct 2002 13:46:56 -0000 1.26
+++ playfield.cxx 12 Oct 2002 00:49:10 -0000 1.27
@@ -29,8 +29,8 @@
#include "pingu.hxx"
#include "button_panel.hxx"
-Playfield::Playfield (Client* client, PLF* level_data, World* w)
- : current_pingu(0), current_view(0)
+Playfield::Playfield (Client* client_, PLF* level_data, World* w)
+ : client(client_), current_pingu(0), current_view(0)
{
world = w;
mouse_scrolling = false;
@@ -279,12 +279,6 @@
Playfield::set_server(Server* s)
{
server = s;
-}
-
-void
-Playfield::set_client(Client* c)
-{
- client = c;
}
int
Index: playfield.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/playfield.hxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- playfield.hxx 27 Sep 2002 11:26:44 -0000 1.12
+++ playfield.hxx 12 Oct 2002 00:49:10 -0000 1.13
@@ -91,7 +91,6 @@
void set_pingu_info(PinguInfo*);
void set_buttons(ButtonPanel*);
void set_server(Server*);
- void set_client(Client*);
bool is_at (int x, int y) { UNUSED_ARG(x); UNUSED_ARG(y); return true; }
Index: surface_button.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/surface_button.cxx,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- surface_button.cxx 14 Sep 2002 19:06:33 -0000 1.15
+++ surface_button.cxx 12 Oct 2002 00:49:10 -0000 1.16
@@ -161,8 +161,8 @@
///////////////////////////////////////////////
-CreditButton::CreditButton(PingusMenu* menu)
- : menu (menu)
+CreditButton::CreditButton (PingusMenu* menu_)
+ : menu(menu_)
{
// x_pos = CL_Display::get_width() * 500 / 640;
// y_pos = CL_Display::get_height() * 420 / 480;
@@ -185,12 +185,12 @@
//surface_p = PingusResource::load_surface("Buttons/play_p", "menu");
}
-CreditButton::~CreditButton()
+CreditButton::~CreditButton ()
{
}
void
-CreditButton::on_click()
+CreditButton::on_click ()
{
std::cout << "Pushing credits screen" << std::endl;
ScreenManager::instance()->push_screen (Credits::instance(), false);
@@ -198,8 +198,8 @@
///////////////////////////////////////////////
-OptionsButton::OptionsButton(PingusMenu* menu)
- : menu (menu)
+OptionsButton::OptionsButton (PingusMenu* menu_)
+ : menu(menu_)
{
// x_pos = CL_Display::get_width() * 150 / 640; //150;
// y_pos = CL_Display::get_height() * 330 / 480; //330;
@@ -221,7 +221,7 @@
// surface_p = PingusResource::load_surface("Buttons/options_p", "menu");
}
-OptionsButton::~OptionsButton()
+OptionsButton::~OptionsButton ()
{
}
@@ -295,8 +295,8 @@
}*/
}
-EditorButton::EditorButton( PingusMenu* menu)
- : menu (menu)
+EditorButton::EditorButton (PingusMenu* menu_)
+ : menu(menu_)
{
// x_pos = CL_Display::get_width() * 335 / 640;
// y_pos = CL_Display::get_height() * 370 / 480;
@@ -321,13 +321,13 @@
surface_p = PingusResource::load_surface("menu/create_on", "core");
}
-EditorButton::~EditorButton()
+EditorButton::~EditorButton ()
{
}
void
-EditorButton::load_level(const std::string& str)
+EditorButton::load_level (const std::string& str)
{
Editor::instance ()->load_level (str);
}
@@ -338,8 +338,8 @@
ScreenManager::instance()->push_screen (Editor::instance(), false);
}
-StoryButton::StoryButton (PingusMenu* menu)
- : menu (menu)
+StoryButton::StoryButton (PingusMenu* menu_)
+ : menu(menu_)
{
// x_pos = CL_Display::get_width() * 150 / 640;
// y_pos = CL_Display::get_height() * 430 / 480;
@@ -360,10 +360,10 @@
surface_p = PingusResource::load_surface("menu/play_on", "core");
}
-StoryButton::~StoryButton() {}
+StoryButton::~StoryButton () {}
void
-StoryButton::on_click()
+StoryButton::on_click ()
{
PingusSound::play_sound ("sounds/letsgo.wav");
std::cout << "Set story" << std::endl;
@@ -371,8 +371,8 @@
std::cout << "Set done" << std::endl;
}
-ThemeButton::ThemeButton (PingusMenu* menu)
- : menu (menu)
+ThemeButton::ThemeButton (PingusMenu* menu_)
+ : menu(menu_)
{
x_pos = CL_Display::get_width() * 321 / 640;
y_pos = CL_Display::get_height() * 100 / 480;
@@ -385,7 +385,7 @@
}
void
-ThemeButton::on_click()
+ThemeButton::on_click ()
{
PingusSound::play_sound ("sounds/letsgo.wav");
@@ -393,8 +393,8 @@
theme_selector.display();
}
-MultiplayerButton::MultiplayerButton (PingusMenu* menu)
- : menu (menu)
+MultiplayerButton::MultiplayerButton (PingusMenu* menu_)
+ : menu(menu_)
{
x_pos = CL_Display::get_width() * 320 / 640;
y_pos = CL_Display::get_height() * 369 / 480;
@@ -412,7 +412,7 @@
}
void
-MultiplayerButton::on_click()
+MultiplayerButton::on_click ()
{
multiplayer_config.display ();
}
Index: theme.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/theme.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- theme.cxx 28 Sep 2002 11:52:22 -0000 1.8
+++ theme.cxx 12 Oct 2002 00:49:10 -0000 1.9
@@ -36,10 +36,10 @@
#include "xml_plf.hxx"
#include "screen_manager.hxx"
-Theme::Theme (const std::string& filename)
+Theme::Theme (const std::string& filename_)
: font(PingusResource::load_font("Fonts/pingus_small","fonts")),
title(PingusResource::load_font("Fonts/pingus","fonts")),
- filename (filename),
+ filename (filename_),
is_loaded(false)
{
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src action_button.cxx,1.16,1.17 client.cxx,1.29,1.30 display_graphic_context.cxx,1.6,1.7 exit_menu.cxx,1.11,1.12 fade_out.cxx,1.4,1.5 fade_out.hxx,1.4,1.5 pingu.cxx,1.34,1.35 pingu_action.hxx,1.17,1.18 pingus_resource.cxx,1.16,1.17 playfield.cxx,1.26,1.27 playfield.hxx,1.12,1.13 surface_button.cxx,1.15,1.16 theme.cxx,1.8,1.9,
torangan <=