[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.29,1.30 action_bu
From: |
torangan |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src action_button.cxx,1.29,1.30 action_button.hxx,1.16,1.17 action_data.cxx,1.6,1.7 action_data.hxx,1.6,1.7 action_holder.cxx,1.11,1.12 action_holder.hxx,1.11,1.12 alpha_button.cxx,1.2,1.3 alpha_button.hxx,1.5,1.6 blitter.cxx,1.27,1.28 blitter.hxx,1.9,1.10 blitter_impl.hxx,1.9,1.10 button_panel.cxx,1.24,1.25 button_panel.hxx,1.17,1.18 capture_rectangle.cxx,1.12,1.13 capture_rectangle.hxx,1.6,1.7 cheat.cxx,1.2,1.3 cheat.hxx,1.1,1.2 client.cxx,1.44,1.45 col_map.cxx,1.17,1.18 col_map.hxx,1.10,1.11 color.cxx,1.2,1.3 color.hxx,1.6,1.7 config.cxx,1.14,1.15 config.hxx,1.8,1.9 config_xml.cxx,1.3,1.4 config_xml.hxx,1.3,1.4 console.cxx,1.12,1.13 console.hxx,1.12,1.13 counter.cxx,1.4,1.5 credits.cxx,1.31,1.32 credits.hxx,1.12,1.13 debug.hxx,1.2,1.3 debug_stream.cxx,1.7,1.8 debug_stream.hxx,1.9,1.10 delta_manager.hxx,1.9,1.10 demo_player.cxx,1.8,1.9 demo_player.hxx,1.6,1.7 demo_recorder.cxx,1.17,1.18 demo_recorder.hxx,1.8,1.9 demo_session.cxx,1.7,1.8 demo_session.hxx,1.4,1.5 direction.cxx,1.2,1.3 direction.hxx,1.5,1.6 exit_menu.cxx,1.18,1.19 exit_menu.hxx,1.10,1.11 fade_out.cxx,1.7,1.8 fade_out.hxx,1.5,1.6 file_reader.hxx,1.2,1.3 file_writer.hxx,1.2,1.3 fonts.hxx,1.4,1.5 fps_counter.cxx,1.5,1.6 fps_counter.hxx,1.6,1.7 game_counter.cxx,1.2,1.3 game_counter.hxx,1.6,1.7 game_event.hxx,1.6,1.7 game_session.cxx,1.39,1.40 game_session.hxx,1.18,1.19 game_session_result.cxx,1.2,1.3 game_session_result.hxx,1.5,1.6 game_time.cxx,1.8,1.9 game_time.hxx,1.9,1.10 global_event.cxx,1.9,1.10 global_event.hxx,1.6,1.7 globals.cxx,1.13,1.14 globals.hxx,1.16,1.17 goal_manager.cxx,1.6,1.7 goal_manager.hxx,1.3,1.4 groundtype.cxx,1.1,1.2 groundtype.hxx,1.2,1.3 gui_obj.cxx,1.1,1.2 gui_obj.hxx,1.7,1.8 html_browser.hxx,1.3,1.4 hurry_up.cxx,1.6,1.7 hurry_up.hxx,1.7,1.8 indexed_canvas.hxx,1.2,1.3 input_event.hxx,1.8,1.9 layer_manager.cxx,1.5,1.6 layer_manager.hxx,1.9,1.10 level_desc.cxx,1.10,1.11 level_desc.hxx,1.5,1.6 level_interrupt.hxx,1.5,1.6 level_result.cxx,1.13,1.14 level_result.hxx,1.5,1.6 libxmlfwd.hxx,1.3,1.4 loading.cxx,1.4,1.5 loading.hxx,1.5,1.6 main_menu.hxx,1.5,1.6 math.hxx,1.7,1.8 menu_background.cxx,1.8,1.9 menu_background.hxx,1.7,1.8 menu_button.cxx,1.8,1.9 menu_button.hxx,1.2,1.3 mover.hxx,1.2,1.3 multiline_text.cxx,1.6,1.7 multiline_text.hxx,1.5,1.6 my_gettext.hxx,1.4,1.5 path_manager.cxx,1.5,1.6 path_manager.hxx,1.5,1.6 pingu.cxx,1.41,1.42 pingu.hxx,1.24,1.25 pingu_action.cxx,1.24,1.25 pingu_action.hxx,1.26,1.27 pingu_action_factory.cxx,1.14,1.15 pingu_action_factory.hxx,1.11,1.12 pingu_enums.cxx,1.6,1.7 pingu_holder.cxx,1.20,1.21 pingu_holder.hxx,1.14,1.15 pingu_map.cxx,1.6,1.7 pingu_map.hxx,1.5,1.6 pingus.hxx,1.6,1.7 pingus_counter.cxx,1.13,1.14 pingus_counter_bar.cxx,1.5,1.6 pingus_counter_bar.hxx,1.4,1.5 pingus_error.cxx,1.8,1.9 pingus_error.hxx,1.7,1.8 pingus_main.cxx,1.86,1.87 pingus_main.hxx,1.11,1.12 pingus_map_manager.cxx,1.2,1.3 pingus_map_manager.hxx,1.5,1.6 pingus_menu.cxx,1.19,1.20 pingus_menu.hxx,1.10,1.11 pingus_menu_manager.cxx,1.25,1.26 pingus_menu_manager.hxx,1.20,1.21 pingus_resource.cxx,1.27,1.28 pingus_resource.hxx,1.13,1.14 pingus_sub_menu.hxx,1.8,1.9 playfield.cxx,1.34,1.35 playfield.hxx,1.15,1.16 playfield_view.cxx,1.4,1.5 playfield_view.hxx,1.8,1.9 plf.cxx,1.15,1.16 plf.hxx,1.10,1.11 plf_handle.hxx,1.1,1.2 plf_res_mgr.cxx,1.4,1.5 plf_res_mgr.hxx,1.2,1.3 plt_xml.cxx,1.11,1.12 plt_xml.hxx,1.7,1.8 prefab.cxx,1.6,1.7 prefab.hxx,1.5,1.6 range.cxx,1.1,1.2 range.hxx,1.5,1.6 res_descriptor.cxx,1.15,1.16 res_descriptor.hxx,1.12,1.13 resource_modifier.cxx,1.2,1.3 resource_modifier.hxx,1.4,1.5 result.cxx,1.2,1.3 result.hxx,1.7,1.8 result_screen.cxx,1.14,1.15 result_screen.hxx,1.3,1.4 savegame.cxx,1.2,1.3 savegame.hxx,1.2,1.3 savegame_manager.cxx,1.6,1.7 savegame_manager.hxx,1.2,1.3 screenshot.cxx,1.11,1.12 screenshot.hxx,1.6,1.7 server.cxx,1.27,1.28 server.hxx,1.14,1.15 server_event.cxx,1.7,1.8 server_event.hxx,1.3,1.4 smallmap.cxx,1.36,1.37 smallmap.hxx,1.17,1.18 smallmap_image.cxx,1.9,1.10 smallmap_image.hxx,1.8,1.9 spot_map.cxx,1.25,1.26 spot_map.hxx,1.8,1.9 sprite.cxx,1.13,1.14 sprite.hxx,1.9,1.10 start_screen.cxx,1.18,1.19 start_screen.hxx,1.4,1.5 stat_manager.cxx,1.7,1.8 stat_manager.hxx,1.1,1.2 story.cxx,1.25,1.26 story.hxx,1.13,1.14 story_screen.cxx,1.18,1.19 story_screen.hxx,1.5,1.6 string_converter.hxx,1.11,1.12 string_format.cxx,1.1,1.2 string_tokenizer.hxx,1.2,1.3 system.cxx,1.18,1.19 system.hxx,1.9,1.10 target_provider.cxx,1.1,1.2 target_provider.hxx,1.5,1.6 theme.cxx,1.16,1.17 theme.hxx,1.5,1.6 theme_selector.cxx,1.11,1.12 theme_selector.hxx,1.5,1.6 time_display.cxx,1.13,1.14 time_display.hxx,1.10,1.11 timer.cxx,1.4,1.5 timer.hxx,1.6,1.7 true_server.cxx,1.19,1.20 true_server.hxx,1.12,1.13 usb_mouse_controller.cxx,1.3,1.4 usb_mouse_controller.hxx,1.6,1.7 vector.cxx,1.3,1.4 vector.hxx,1.3,1.4 view.cxx,1.13,1.14 view.hxx,1.11,1.12 wav_provider.cxx,1.5,1.6 wav_provider.hxx,1.5,1.6 world.cxx,1.44,1.45 world.hxx,1.27,1.28 worldobj.cxx,1.11,1.12 worldobj.hxx,1.11,1.12 worldobj_data.hxx,1.10,1.11 worldobj_data_factory.cxx,1.33,1.34 worldobj_data_factory.hxx,1.6,1.7 xml_file_reader.cxx,1.3,1.4 xml_file_reader.hxx,1.4,1.5 xml_file_writer.cxx,1.3,1.4 xml_file_writer.hxx,1.4,1.5 xml_helper.cxx,1.30,1.31 xml_helper.hxx,1.20,1.21 xml_pdf.cxx,1.7,1.8 xml_pdf.hxx,1.2,1.3 xml_plf.cxx,1.37,1.38 xml_plf.hxx,1.9,1.10 |
Date: |
Sat, 19 Apr 2003 10:27:03 -0000 |
Update of /var/lib/cvs/Games/Pingus/src
In directory dark:/tmp/cvs-serv20737
Modified Files:
action_button.cxx action_button.hxx action_data.cxx
action_data.hxx action_holder.cxx action_holder.hxx
alpha_button.cxx alpha_button.hxx blitter.cxx blitter.hxx
blitter_impl.hxx button_panel.cxx button_panel.hxx
capture_rectangle.cxx capture_rectangle.hxx cheat.cxx
cheat.hxx client.cxx col_map.cxx col_map.hxx color.cxx
color.hxx config.cxx config.hxx config_xml.cxx config_xml.hxx
console.cxx console.hxx counter.cxx credits.cxx credits.hxx
debug.hxx debug_stream.cxx debug_stream.hxx delta_manager.hxx
demo_player.cxx demo_player.hxx demo_recorder.cxx
demo_recorder.hxx demo_session.cxx demo_session.hxx
direction.cxx direction.hxx exit_menu.cxx exit_menu.hxx
fade_out.cxx fade_out.hxx file_reader.hxx file_writer.hxx
fonts.hxx fps_counter.cxx fps_counter.hxx game_counter.cxx
game_counter.hxx game_event.hxx game_session.cxx
game_session.hxx game_session_result.cxx
game_session_result.hxx game_time.cxx game_time.hxx
global_event.cxx global_event.hxx globals.cxx globals.hxx
goal_manager.cxx goal_manager.hxx groundtype.cxx
groundtype.hxx gui_obj.cxx gui_obj.hxx html_browser.hxx
hurry_up.cxx hurry_up.hxx indexed_canvas.hxx input_event.hxx
layer_manager.cxx layer_manager.hxx level_desc.cxx
level_desc.hxx level_interrupt.hxx level_result.cxx
level_result.hxx libxmlfwd.hxx loading.cxx loading.hxx
main_menu.hxx math.hxx menu_background.cxx menu_background.hxx
menu_button.cxx menu_button.hxx mover.hxx multiline_text.cxx
multiline_text.hxx my_gettext.hxx path_manager.cxx
path_manager.hxx pingu.cxx pingu.hxx pingu_action.cxx
pingu_action.hxx pingu_action_factory.cxx
pingu_action_factory.hxx pingu_enums.cxx pingu_holder.cxx
pingu_holder.hxx pingu_map.cxx pingu_map.hxx pingus.hxx
pingus_counter.cxx pingus_counter_bar.cxx
pingus_counter_bar.hxx pingus_error.cxx pingus_error.hxx
pingus_main.cxx pingus_main.hxx pingus_map_manager.cxx
pingus_map_manager.hxx pingus_menu.cxx pingus_menu.hxx
pingus_menu_manager.cxx pingus_menu_manager.hxx
pingus_resource.cxx pingus_resource.hxx pingus_sub_menu.hxx
playfield.cxx playfield.hxx playfield_view.cxx
playfield_view.hxx plf.cxx plf.hxx plf_handle.hxx
plf_res_mgr.cxx plf_res_mgr.hxx plt_xml.cxx plt_xml.hxx
prefab.cxx prefab.hxx range.cxx range.hxx res_descriptor.cxx
res_descriptor.hxx resource_modifier.cxx resource_modifier.hxx
result.cxx result.hxx result_screen.cxx result_screen.hxx
savegame.cxx savegame.hxx savegame_manager.cxx
savegame_manager.hxx screenshot.cxx screenshot.hxx server.cxx
server.hxx server_event.cxx server_event.hxx smallmap.cxx
smallmap.hxx smallmap_image.cxx smallmap_image.hxx
spot_map.cxx spot_map.hxx sprite.cxx sprite.hxx
start_screen.cxx start_screen.hxx stat_manager.cxx
stat_manager.hxx story.cxx story.hxx story_screen.cxx
story_screen.hxx string_converter.hxx string_format.cxx
string_tokenizer.hxx system.cxx system.hxx target_provider.cxx
target_provider.hxx theme.cxx theme.hxx theme_selector.cxx
theme_selector.hxx time_display.cxx time_display.hxx timer.cxx
timer.hxx true_server.cxx true_server.hxx
usb_mouse_controller.cxx usb_mouse_controller.hxx vector.cxx
vector.hxx view.cxx view.hxx wav_provider.cxx wav_provider.hxx
world.cxx world.hxx worldobj.cxx worldobj.hxx
worldobj_data.hxx worldobj_data_factory.cxx
worldobj_data_factory.hxx xml_file_reader.cxx
xml_file_reader.hxx xml_file_writer.cxx xml_file_writer.hxx
xml_helper.cxx xml_helper.hxx xml_pdf.cxx xml_pdf.hxx
xml_plf.cxx xml_plf.hxx
Log Message:
removed trailing whitespace
Index: action_button.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/action_button.cxx,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- action_button.cxx 18 Apr 2003 17:08:56 -0000 1.29
+++ action_button.cxx 19 Apr 2003 10:23:17 -0000 1.30
@@ -7,7 +7,7 @@
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
-//
+//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@@ -83,8 +83,8 @@
return name;
}
-VerticalActionButton::VerticalActionButton(ActionHolder* h,
- int x, int y, ActionName name_, int
owner_id)
+VerticalActionButton::VerticalActionButton(ActionHolder* h,
+ int x, int y, ActionName name_, int
owner_id)
: ActionButton(h),
background (PingusResource::load_surface("buttons/buttonbackground",
"core")),
backgroundhl (PingusResource::load_surface("buttons/buttonbackgroundhl",
"core"))
@@ -98,11 +98,11 @@
VerticalActionButton::is_at (int x, int y)
{
if (x > x_pos && x < x_pos + 60
- && y > y_pos && y <= y_pos + 35)
+ && y > y_pos && y <= y_pos + 35)
{
return true;
- }
- else
+ }
+ else
{
return false;
}
@@ -113,7 +113,7 @@
{
UNUSED_ARG(gc);
- if (pressed)
+ if (pressed)
{
if (fast_mode) {
CL_Display::fill_rect(x_pos, y_pos, x_pos + 60, y_pos + 35,
@@ -127,7 +127,7 @@
else
{
sprite.set_frame(0);
-
+
if (fast_mode) {
// do nothing
} else {
@@ -138,13 +138,13 @@
if (is_multi_direct)
sprite.set_direction(Sprite::RIGHT);
gc.draw(sprite, Vector(x_pos + 20, y_pos + 32));
-
+
// print the action name next to the button, when mouse pointer is on
// the button.
// FIXME: this should use the GUI events, not CL_Mouse
- if (action_help
+ if (action_help
&& CL_Mouse::get_x() > x_pos && CL_Mouse::get_x() < x_pos + 60
- && CL_Mouse::get_y() < y_pos + 35 && CL_Mouse::get_y() > y_pos)
+ && CL_Mouse::get_y() < y_pos + 35 && CL_Mouse::get_y() > y_pos)
{
font_b->print_left(x_pos + 65, y_pos, action_to_screenname(name));
}
@@ -181,8 +181,8 @@
{
backgroundhl.put_screen (x_pos, y_pos);
gc.draw(sprite, Vector(x_pos, y_pos));
- }
- else
+ }
+ else
{
if (!fast_mode)
background.put_screen (x_pos, y_pos);
@@ -222,7 +222,7 @@
return true;
} else {
return false;
- }
+ }
}
void
@@ -236,17 +236,17 @@
{
pressed = true;
}
-
+
UNUSED_ARG(x);
UNUSED_ARG(y);
}
-ForwardButton::ForwardButton (TrueServer* s, int x, int y)
+ForwardButton::ForwardButton (TrueServer* s, int x, int y)
: server (s),
x_pos (x), y_pos (y),
background (PingusResource::load_surface("buttons/hbuttonbgb", "core")),
backgroundhl(PingusResource::load_surface("buttons/hbuttonbg", "core"))
-{
+{
surface = PingusResource::load_surface("buttons/fast_forward", "core");
}
@@ -278,24 +278,24 @@
return true;
} else {
return false;
- }
+ }
}
void
ForwardButton::on_primary_button_click (int x, int y)
{
server->set_fast_forward(!server->get_fast_forward());
-
+
UNUSED_ARG(x);
UNUSED_ARG(y);
}
-PauseButton::PauseButton (TrueServer* s, int x, int y)
+PauseButton::PauseButton (TrueServer* s, int x, int y)
: server (s),
x_pos(x), y_pos(y),
background (PingusResource::load_surface("buttons/hbuttonbgb", "core")),
backgroundhl(PingusResource::load_surface("buttons/hbuttonbg", "core"))
-{
+{
surface = PingusResource::load_surface("buttons/pause", "core");
}
@@ -304,14 +304,14 @@
void
PauseButton::draw (GraphicContext& gc)
{
- if (server->get_pause())
+ if (server->get_pause())
backgroundhl.put_screen (x_pos, y_pos);
else
{
if (!fast_mode)
background.put_screen (x_pos, y_pos);
}
-
+
surface.put_screen(x_pos, y_pos);
UNUSED_ARG(gc);
}
@@ -325,14 +325,14 @@
return true;
} else {
return false;
- }
+ }
}
void
PauseButton::on_primary_button_click (int x, int y)
{
server->set_pause(!server->get_pause());
-
+
UNUSED_ARG(x);
UNUSED_ARG(y);
}
Index: action_button.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/action_button.hxx,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- action_button.hxx 1 Dec 2002 17:45:21 -0000 1.16
+++ action_button.hxx 19 Apr 2003 10:23:17 -0000 1.17
@@ -58,7 +58,7 @@
void update(float);
bool is_at(int x, int y);
void on_primary_button_click (int x, int y);
-
+
private:
ArmageddonButton (const ArmageddonButton&);
ArmageddonButton& operator= (const ArmageddonButton&);
@@ -67,7 +67,7 @@
// ----------------- snip --------------------
/** Fast Forward button, press it to let the game run faster, press it
- again to return to normal speed
+ again to return to normal speed
\sa Client */
class ForwardButton : public GUI::Component
@@ -87,7 +87,7 @@
void draw(GraphicContext& gc);
bool is_at (int x, int y);
void on_primary_button_click (int x, int y);
-
+
private:
ForwardButton (const ForwardButton&);
ForwardButton& operator= (const ForwardButton&);
@@ -96,7 +96,7 @@
// ----------------- snip --------------------
/** Pause button, press it to pause the game, press it again to
- continue
+ continue
\sa Client */
class PauseButton : public GUI::Component
@@ -116,7 +116,7 @@
void draw(GraphicContext& gc);
bool is_at (int x, int y);
void on_primary_button_click (int x, int y);
-
+
private:
PauseButton (const PauseButton&);
PauseButton& operator= (const PauseButton&);
@@ -141,7 +141,7 @@
ActionHolder* action_holder;
-public:
+public:
bool pressed;
ActionButton(ActionHolder*);
@@ -171,7 +171,7 @@
action will be set to the action represented by the button.
\sa Client */
-class VerticalActionButton : public ActionButton
+class VerticalActionButton : public ActionButton
{
private:
CL_Surface background;
@@ -183,7 +183,7 @@
void draw(GraphicContext& gc);
bool is_at (int x, int y);
-
+
private:
VerticalActionButton (const VerticalActionButton&);
VerticalActionButton& operator= (const VerticalActionButton&);
Index: action_data.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/action_data.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- action_data.cxx 14 Sep 2002 19:06:33 -0000 1.6
+++ action_data.cxx 19 Apr 2003 10:23:17 -0000 1.7
@@ -21,7 +21,7 @@
using namespace Actions;
-std::vector<ActionData> default_actions;
+std::vector<ActionData> default_actions;
void init_default_actions ()
{
Index: action_data.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/action_data.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- action_data.hxx 2 Nov 2002 19:03:40 -0000 1.6
+++ action_data.hxx 19 Apr 2003 10:23:17 -0000 1.7
@@ -37,7 +37,7 @@
/** Actions that are available through the GUI in the level editor,
only useable action are here, hidden actions like walker or drawn
are not here */
-extern std::vector<ActionData> default_actions;
+extern std::vector<ActionData> default_actions;
void init_default_actions ();
#endif
Index: action_holder.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/action_holder.cxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- action_holder.cxx 19 Feb 2003 11:33:00 -0000 1.11
+++ action_holder.cxx 19 Apr 2003 10:23:17 -0000 1.12
@@ -27,13 +27,13 @@
ActionHolder::ActionHolder (PLF* plf)
{
std::vector<ActionData> action_data = plf->get_actions();
-
+
if (action_data.size() == 0 || Cheat::all_actions)
{
std::cout << "Error: ActionHolder: No actions given in this level! Using
defaults" << std::endl;
action_data = default_actions;
}
-
+
for (std::vector<ActionData>::iterator i = action_data.begin(); i !=
action_data.end(); ++i) {
set_actions(i->name, i->number_of);
}
@@ -51,7 +51,7 @@
for(std::map<ActionName, int>::iterator i= available_actions.begin();
i != available_actions.end(); ++i)
ret.push_back(i->first);
-
+
return ret;
}
@@ -86,7 +86,7 @@
}
else
{
- return false;
+ return false;
}
}
}
Index: action_holder.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/action_holder.hxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- action_holder.hxx 28 Dec 2002 16:57:38 -0000 1.11
+++ action_holder.hxx 19 Apr 2003 10:23:17 -0000 1.12
@@ -38,13 +38,13 @@
class ActionHolder
{
private:
- /** A map holding the number of available actions.
+ /** A map holding the number of available actions.
* For each action <i>name</i> there is a map (<i>name</i>, <i>n</i>)
- * where the integer <i>n</i> indicates how much more actions
+ * where the integer <i>n</i> indicates how much more actions
* called <i>name</i> can be created.
*/
std::map<ActionName, int> available_actions;
-
+
public:
/** Create an action holder from the number of actions given in a
PLF file */
@@ -59,7 +59,7 @@
* @param available the number of actions available
*/
void set_actions (ActionName name, int available);
-
+
/** Adds an action to the pool of actions, making one more action available
* @param name the name of the action
*/
@@ -70,12 +70,12 @@
actions where available */
bool pop_action (ActionName name);
- /** Returns the number of actions of the specified name which are available
- * thru get_action()
+ /** Returns the number of actions of the specified name which are available
+ * thru get_action()
* @return 0 if the name is unknown FIXME: should use .find instead of []
*/
int get_available (ActionName);
-
+
private:
ActionHolder (const ActionHolder&);
ActionHolder& operator= (const ActionHolder&);
Index: alpha_button.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/alpha_button.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- alpha_button.cxx 19 Jun 2002 15:19:26 -0000 1.2
+++ alpha_button.cxx 19 Apr 2003 10:23:17 -0000 1.3
@@ -52,7 +52,7 @@
}
}
-bool
+bool
AlphaButton::is_pressed()
{
if (mouse_over() && CL_Mouse::left_pressed()) {
@@ -66,13 +66,13 @@
AlphaButton::mouse_over(void)
{
if ( CL_Mouse::get_x() > x1_pos
- && CL_Mouse::get_x() < x2_pos
+ && CL_Mouse::get_x() < x2_pos
&& CL_Mouse::get_y() > y1_pos
&& CL_Mouse::get_y() < y2_pos)
{
return true;
}
- else
+ else
{
return false;
}
Index: alpha_button.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/alpha_button.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- alpha_button.hxx 27 Sep 2002 11:26:43 -0000 1.5
+++ alpha_button.hxx 19 Apr 2003 10:23:17 -0000 1.6
@@ -38,7 +38,7 @@
bool is_pressed ();
void draw (void);
bool mouse_over (void);
-
+
private:
AlphaButton (const AlphaButton&);
AlphaButton& operator= (const AlphaButton&);
Index: blitter.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/blitter.cxx,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- blitter.cxx 18 Apr 2003 12:48:50 -0000 1.27
+++ blitter.cxx 19 Apr 2003 10:23:17 -0000 1.28
@@ -47,7 +47,7 @@
Blitter::put_surface(canvas, sur.get_provider(), x, y);
}
-void
+void
Blitter::put_surface(CL_Canvas* canvas, CL_SurfaceProvider* provider,
int x, int y)
{
@@ -61,10 +61,10 @@
case 32:
put_surface_32bit(canvas, provider, x, y);
break;
- default:
+ default:
PingusError::raise("Blitter:put_surface:Unknown color depth: " +
to_string(provider->get_depth()));
break;
- }
+ }
}
void
@@ -76,7 +76,7 @@
int start_i;
unsigned char* tbuffer; // Target buffer
int twidth, theight, tpitch;
-
+
unsigned char* sbuffer; // Source buffer
int swidth, sheight, spitch;
@@ -109,32 +109,32 @@
if (y < 0)
y_offset = 0-y;
- else
+ else
y_offset = 0;
-
- if (x < 0)
+
+ if (x < 0)
x_offset = -x;
else
x_offset = 0;
unsigned char* palette = cl_palette->palette;
-
+
if (sprovider->uses_src_colorkey ())
{
unsigned int colorkey = sprovider->get_src_colorkey();
-
+
for(int line=y_offset;
- line < sheight && (line + y) < theight;
- ++line)
+ line < sheight && (line + y) < theight;
+ ++line)
{
start_i = ((line + y) * tpitch) + (x*4);
-
- for(int i=start_i+(4*x_offset),j=line*spitch+x_offset;
+
+ for(int i=start_i+(4*x_offset),j=line*spitch+x_offset;
(i < start_i + (4*swidth))
&& ((i-start_i+(x*4)) < (4*twidth));
- i += 4, ++j)
+ i += 4, ++j)
{
- if (sbuffer[j] != colorkey)
+ if (sbuffer[j] != colorkey)
{
tbuffer[i + 0] = 255; //
alpha
tbuffer[i + 1] = palette[sbuffer[j] * 3 + 2]; // blue
@@ -147,15 +147,15 @@
else
{
for(int line=y_offset;
- line < sheight && (line + y) < theight;
- ++line)
+ line < sheight && (line + y) < theight;
+ ++line)
{
start_i = ((line + y) * tpitch) + (x*4);
-
- for(int i=start_i+(4*x_offset),j=line*spitch+x_offset;
+
+ for(int i=start_i+(4*x_offset),j=line*spitch+x_offset;
(i < start_i + (4*swidth))
&& ((i-start_i+(x*4)) < (4*twidth));
- i += 4, ++j)
+ i += 4, ++j)
{
tbuffer[i + 0] = 255; // alpha
tbuffer[i + 1] = palette[sbuffer[j] * 3 + 2]; // blue
@@ -167,9 +167,9 @@
#if COMPILE_WITH_MEMORY_HOLE
#warning "FIXME: Blitter::put_surface_8bit(CL_Canvas* provider,
CL_SurfaceProvider* sprovider, int x, int y) contains memory hole"
-#else
+#else
sprovider->unlock();
- provider->unlock();
+ provider->unlock();
#endif
}
@@ -180,9 +180,9 @@
assert (canvas);
assert (provider);
- pout(PINGUS_DEBUG_BLITTER) << "Blitting: SurfaceProvider:" <<
provider->get_width ()
- << "x" << provider->get_height () << ":" <<
provider
- << " Canvas:" << canvas->get_width () << "x"
+ pout(PINGUS_DEBUG_BLITTER) << "Blitting: SurfaceProvider:" <<
provider->get_width ()
+ << "x" << provider->get_height () << ":" <<
provider
+ << " Canvas:" << canvas->get_width () << "x"
<< canvas->get_height () << ":" << canvas <<
std::endl;
float red, green, blue, alpha;
@@ -202,14 +202,14 @@
provider->lock();
if (1) // slow
{
- for(int y = Math::max(0, -y_pos); y < sheight && (y + y_pos) < theight;
++y)
- for(int x = Math::max(0,-x_pos); x < swidth && (x + x_pos) < twidth;
++x)
+ for(int y = Math::max(0, -y_pos); y < sheight && (y + y_pos) < theight;
++y)
+ for(int x = Math::max(0,-x_pos); x < swidth && (x + x_pos) < twidth;
++x)
{
provider->get_pixel(x, y, &red, &green, &blue, &alpha);
canvas->get_pixel(x + x_pos, y + y_pos, &tred, &tgreen, &tblue,
&talpha);
-
+
// FIXME: This doesn't give correct alpha values
- canvas->draw_pixel(x + x_pos, y + y_pos,
+ canvas->draw_pixel(x + x_pos, y + y_pos,
Math::mid(0.0f, 1.0f, (red * alpha) + (tred
* (1.0f - alpha))),
Math::mid(0.0f, 1.0f, (green * alpha) + (tgreen
* (1.0f - alpha))),
Math::mid(0.0f, 1.0f, (blue * alpha) + (tblue
* (1.0f - alpha))),
@@ -218,7 +218,7 @@
}
else // fast?!
{
-
+
}
#if COMPILE_WITH_MEMORY_HOLE
@@ -238,7 +238,7 @@
int start_i;
unsigned char* tbuffer; // Target buffer
int twidth, theight, tpitch;
-
+
unsigned char* sbuffer; // Source buffer
int swidth, sheight, spitch;
@@ -264,7 +264,7 @@
tbuffer = static_cast<unsigned char*>(provider->get_data());
sbuffer = static_cast<unsigned char*>(sprovider->get_data());
-
+
palette = sprovider->get_palette();
assert(palette);
@@ -278,10 +278,10 @@
if (y < 0)
y_offset = 0-y;
- else
+ else
y_offset = 0;
-
- if (x < 0)
+
+ if (x < 0)
x_offset = -x;
else
x_offset = 0;
@@ -289,7 +289,7 @@
for(int line=y_offset; line < sheight && (line + y) < theight; ++line) {
start_i = ((line + y) * tpitch) + (x*4);
- for(int i=start_i+(4*x_offset),j=line*spitch+x_offset;
+ for(int i=start_i+(4*x_offset),j=line*spitch+x_offset;
i < start_i + (4*swidth) && (i-start_i+(x*4)) < (4*twidth); i+=4,++j) {
if (sbuffer[j]) {
tbuffer[i + 0] = 0; // alpha
@@ -301,7 +301,7 @@
#warning "FIXME: Blitter::put_alpha_surface(CL_Canvas* provider,
CL_SurfaceProvider* sprovider, int x, int y) contains memory hole"
#else
sprovider->unlock();
- provider->unlock();
+ provider->unlock();
#endif
}
@@ -310,7 +310,7 @@
{
assert (canvas);
unsigned char* buffer;
-
+
canvas->lock();
buffer = static_cast<unsigned char*>(canvas->get_data());
memset(buffer, 0, sizeof(unsigned char) * canvas->get_pitch() *
canvas->get_height());
@@ -340,11 +340,11 @@
{
canvas->lock();
prov->lock();
-
+
int buffer_size = prov->get_pitch () * prov->get_height ();
unsigned char* sbuffer = static_cast<unsigned char*>(prov->get_data ());
unsigned char* tbuffer = static_cast<unsigned char*>(canvas->get_data
());
-
+
for (int si = 0, ti = 0; si < buffer_size; si += 3, ti += 4)
{
tbuffer[ti + 0] = 255; // Alpha
@@ -352,7 +352,7 @@
tbuffer[ti + 2] = sbuffer[si + 1];
tbuffer[ti + 3] = sbuffer[si + 2];
}
-
+
// -FIXME: memory hole
prov->unlock();
canvas->unlock();
@@ -376,14 +376,14 @@
return canvas;
}
-CL_Surface
+CL_Surface
Blitter::scale_surface (const CL_Surface& sur, int width, int height)
{
assert (sur);
return CL_Surface(Blitter::scale_surface_to_canvas(sur, width, height),
true);
}
-CL_Canvas*
+CL_Canvas*
Blitter::scale_surface_to_canvas (const CL_Surface& sur, int width, int height)
{
assert (sur);
@@ -408,7 +408,7 @@
{
for (int x = 0; x < width; ++x)
{
- unsigned char pixel = *(static_cast<unsigned
char*>(provider->get_data ())
+ unsigned char pixel = *(static_cast<unsigned
char*>(provider->get_data ())
+ (y * pheight/height) *
provider->get_pitch() + (x * pwidth/width));
color.red = provider->get_palette()->palette[pixel*3 +0] /
255.0f;
@@ -439,7 +439,7 @@
int ti = (y * width + x) * 4;
int si = ((y * pheight / height) * pwidth
+ (x * pwidth / width)) * 3;
-
+
tbuffer[ti + 0] = 255; // alpha
tbuffer[ti + 1] = sbuffer[(si + 0)]; // blue
tbuffer[ti + 2] = sbuffer[(si + 1)]; // green
@@ -457,7 +457,7 @@
int ti = (y * width + x) * 4;
int si = ((y * pheight / height) * pwidth
+ (x * pwidth / width)) * 4;
-
+
tbuffer[ti + 0] = sbuffer[(si + 0)]; // alpha
tbuffer[ti + 1] = sbuffer[(si + 1)]; // blue
tbuffer[ti + 2] = sbuffer[(si + 2)]; // green
@@ -514,7 +514,7 @@
int i;
sprov->lock();
- switch(sprov->get_depth())
+ switch(sprov->get_depth())
{
case 32:
tprov = new CL_Canvas(sprov->get_width(),
@@ -536,9 +536,9 @@
sprov->get_height());
palette = sprov->get_palette();
tprov->lock();
-
+
sbuffer = static_cast<unsigned char*>(sprov->get_data());
- tbuffer = static_cast<unsigned char*>(tprov->get_data());
+ tbuffer = static_cast<unsigned char*>(tprov->get_data());
for(i=0; i < (sprov->get_height() * sprov->get_pitch()); ++i)
{
@@ -547,20 +547,20 @@
tbuffer[i * 4 + 2] = palette->palette[sbuffer[i] * 3 + 1];
tbuffer[i * 4 + 3] = palette->palette[sbuffer[i] * 3 + 0];
}
-
- tprov->unlock();
+
+ tprov->unlock();
break;
default:
- std::cout << "convert_to_emptyprovider(): Wrong source format: "
+ std::cout << "convert_to_emptyprovider(): Wrong source format: "
<< static_cast<int>(sprov->get_depth()) << std::endl;
assert(false);
break;
}
sprov->unlock();
-
+
return tprov;
}
-*/
+*/
/** Flip a surface horizontal */
CL_Surface
@@ -591,7 +591,7 @@
IndexedCanvas* canvas = new IndexedCanvas(pheight, pwidth);
if (prov->uses_src_colorkey())
canvas->set_src_colorkey(prov->get_src_colorkey());
-
+
prov->lock ();
canvas->lock ();
@@ -608,7 +608,7 @@
canvas->unlock ();
prov->unlock ();
- return CL_Surface(canvas, true);
+ return CL_Surface(canvas, true);
}
else
{
Index: blitter.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/blitter.hxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- blitter.hxx 16 Oct 2002 09:14:45 -0000 1.9
+++ blitter.hxx 19 Apr 2003 10:23:17 -0000 1.10
@@ -68,13 +68,13 @@
/** Sets all pixels of a canvas to zero */
static CL_Canvas* clear_canvas(CL_Canvas*);
-
+
/** Creates a new surface (based on a canvas) with the given width
and height and stretches the source surface onto it
@param sur The source surface
- @param width The new width of the surface.
- @param height The new height of the surface.
+ @param width The new width of the surface.
+ @param height The new height of the surface.
@return A newly created surface, the caller is responsible to delete it.
*/
static CL_Surface scale_surface (const CL_Surface& sur, int width, int
height);
@@ -102,17 +102,17 @@
to delete the returned CL_Canvas.
@param sur The source surface
- @param width The new width of the surface.
- @param height The new height of the surface.
+ @param width The new width of the surface.
+ @param height The new height of the surface.
@return A newly created surface, the caller is responsible to delete it.
*/
static CL_Canvas* scale_surface_to_canvas (const CL_Surface& sur, int width,
int height);
-
+
private:
Blitter (const Blitter&);
Blitter& operator= (const Blitter&);
};
-#endif
+#endif
/* EOF */
Index: blitter_impl.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/blitter_impl.hxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- blitter_impl.hxx 3 Apr 2003 17:03:24 -0000 1.9
+++ blitter_impl.hxx 19 Apr 2003 10:23:17 -0000 1.10
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2002 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -72,11 +72,11 @@
/** Rotate a surface 270 degree */
struct transform_rot270
{
- static inline int get_index(int width, int height, int x, int y) {
+ static inline int get_index(int width, int height, int x, int y) {
return ((width - x - 1) * height) + y;
}
- static inline int get_x(int width, int height, int x, int y) {
+ static inline int get_x(int width, int height, int x, int y) {
UNUSED_ARG(width); UNUSED_ARG(height); UNUSED_ARG(x);
return y;
}
@@ -100,12 +100,12 @@
return (y * width) + (width - x - 1);
}
- static inline int get_x(int width, int height, int x, int y) {
+ static inline int get_x(int width, int height, int x, int y) {
UNUSED_ARG(height); UNUSED_ARG(y);
return width - x - 1;
}
- static inline int get_y(int width, int height, int x, int y) {
+ static inline int get_y(int width, int height, int x, int y) {
UNUSED_ARG(width); UNUSED_ARG(height); UNUSED_ARG(x);
return y;
}
@@ -122,12 +122,12 @@
return (x * height) + y;
}
- static inline int get_x(int width, int height, int x, int y) {
+ static inline int get_x(int width, int height, int x, int y) {
UNUSED_ARG(width); UNUSED_ARG(height); UNUSED_ARG(x);
return y;
}
- static inline int get_y(int width, int height, int x, int y) {
+ static inline int get_y(int width, int height, int x, int y) {
UNUSED_ARG(width); UNUSED_ARG(height); UNUSED_ARG(y);
return x;
}
@@ -139,16 +139,16 @@
/** Rotate a surface 180 degree and then flip it */
struct transform_rot180_flip
{
- static inline int get_index(int width, int height, int x, int y) {
+ static inline int get_index(int width, int height, int x, int y) {
return ((height - y - 1) * width) + x;
}
- static inline int get_x(int width, int height, int x, int y) {
+ static inline int get_x(int width, int height, int x, int y) {
UNUSED_ARG(width); UNUSED_ARG(height); UNUSED_ARG(y);
return x;
}
- static inline int get_y(int width, int height, int x, int y) {
+ static inline int get_y(int width, int height, int x, int y) {
UNUSED_ARG(width); UNUSED_ARG(x);
return height - y - 1;
}
@@ -164,12 +164,12 @@
return ((width - x - 1) * height) + height - y - 1;
}
- static inline int get_x(int width, int height, int x, int y) {
+ static inline int get_x(int width, int height, int x, int y) {
UNUSED_ARG(width); UNUSED_ARG(x);
return height - y - 1;
}
- static inline int get_y(int width, int height, int x, int y) {
+ static inline int get_y(int width, int height, int x, int y) {
UNUSED_ARG(height); UNUSED_ARG(y);
return width - x - 1;
}
@@ -194,7 +194,7 @@
TransF::get_height(pwidth,
pheight));
if (prov->uses_src_colorkey())
canvas->set_src_colorkey(prov->get_src_colorkey());
-
+
prov->lock ();
canvas->lock ();
@@ -206,14 +206,14 @@
for (int y = 0; y < pheight; ++y)
for (int x = 0; x < pwidth; ++x)
{
-#ifdef PINGUS_DO_ROTBLITTER_BOUNDCHECK
+#ifdef PINGUS_DO_ROTBLITTER_BOUNDCHECK
int i = TransF::get_index(pwidth, pheight, x, y);
if (i < 0 || i >= pwidth * pheight)
{
std::cout << "Target: Out of bounce: " << i << " " << pwidth
<< "x" << pheight
<< " " << typeid(TransF()).name() << std::endl;
}
-
+
if (y * pwidth + x < 0
|| y * pwidth + x >= pwidth * pheight)
{
@@ -226,7 +226,7 @@
canvas->unlock ();
prov->unlock ();
- return CL_Surface(canvas, true);
+ return CL_Surface(canvas, true);
}
else
{
Index: button_panel.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/button_panel.cxx,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- button_panel.cxx 30 Mar 2003 13:12:35 -0000 1.24
+++ button_panel.cxx 19 Apr 2003 10:23:17 -0000 1.25
@@ -41,7 +41,7 @@
armageddon_pressed(false),
left_pressed(0),
last_press(0),
- x_pos (arg_x_pos),
+ x_pos (arg_x_pos),
y_pos (arg_y_pos)
{
ActionHolder* aholder = server->get_action_holder();
@@ -82,7 +82,7 @@
ButtonPanel::~ButtonPanel()
{
- for (AButtonIter it = a_buttons.begin(); it != a_buttons.end(); ++it)
+ for (AButtonIter it = a_buttons.begin(); it != a_buttons.end(); ++it)
{
delete *it;
}
@@ -93,10 +93,10 @@
{
a_buttons[pressed_button]->update(delta);
- if (last_press + 350 < CL_System::get_time())
+ if (last_press + 350 < CL_System::get_time())
{
armageddon_pressed = 0;
- }
+ }
}
ActionName
@@ -105,19 +105,19 @@
return a_buttons[pressed_button]->get_action_name();
}
-void
-ButtonPanel::draw(GraphicContext& gc)
+void
+ButtonPanel::draw(GraphicContext& gc)
{
float alpha;
if (fast_mode)
alpha = 1.0;
- else
+ else
alpha = 0.5;
-
+
for(int i = 0; i < static_cast<int>(a_buttons.size()); ++i)
{
- if (i == pressed_button)
+ if (i == pressed_button)
a_buttons[i]->pressed = true;
else
a_buttons[i]->pressed = false;
@@ -168,14 +168,14 @@
}
/// Select the next action
-void
+void
ButtonPanel::next_action ()
{
pressed_button = (pressed_button + 1) % a_buttons.size();
}
/// Select the previous action
-void
+void
ButtonPanel::previous_action ()
{
pressed_button = (pressed_button - 1 + a_buttons.size()) % a_buttons.size();
Index: button_panel.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/button_panel.hxx,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- button_panel.hxx 30 Mar 2003 13:12:35 -0000 1.17
+++ button_panel.hxx 19 Apr 2003 10:23:17 -0000 1.18
@@ -74,7 +74,7 @@
private:
ButtonPanel (const ButtonPanel&);
- ButtonPanel& operator= (const ButtonPanel&);
+ ButtonPanel& operator= (const ButtonPanel&);
};
#endif
Index: capture_rectangle.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/capture_rectangle.cxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- capture_rectangle.cxx 12 Oct 2002 00:24:26 -0000 1.12
+++ capture_rectangle.cxx 19 Apr 2003 10:23:17 -0000 1.13
@@ -1,4 +1,4 @@
-// $Id$
+// $Id$
//
// Pingus - A free Lemmings clone
// Copyright (C) 1999 Ingo Ruhnke <address@hidden>
@@ -49,33 +49,33 @@
void
CaptureRectangle::draw_offset (int x_offset, int y_offset, float s)
-{
+{
if (pingu && pingu->catchable())
{
Sprite* sur;
-
+
// FIXME: A check for surface good/bad should be placed here
if (pingu->change_allowed(button_panel->get_action_name()))
sur = &good;
else
sur = &bad;
-
- if (s == 1.0)
+
+ if (s == 1.0)
{ // FIXME: this should use GC
// Draw the caputure rectangle
sur->put_screen(pingu->get_center_pos() + Vector(x_offset,y_offset));
-
+
font->print_center(static_cast<int>(pingu->get_center_pos().x) +
x_offset,
static_cast<int>(pingu->get_center_pos().y) +
y_offset - 32,
action_str.c_str());
/*font->print_center(pingu->get_center_pos().x + x_offset,
pingu->get_center_pos().y + y_offset - 16 + 62,
to_string(pingu->get_owner()).c_str());*/
-
+
// Paint the direction arrow
- if (pingu->direction.is_left())
+ if (pingu->direction.is_left())
{
arrow_left.put_screen(pingu->get_center_pos() + Vector(x_offset,
y_offset + 28));
}
@@ -83,8 +83,8 @@
{
arrow_right.put_screen(pingu->get_center_pos() + Vector(x_offset,
y_offset + 28));
}
- }
- else
+ }
+ else
{
sur->put_screen(pingu->get_center_pos() + Vector(x_offset, y_offset));
}
@@ -99,7 +99,7 @@
if (pingu)
{
action_str = pingu->get_name();
-
+
if (pingu->get_wall_action() || pingu->get_fall_action())
{
action_str += "[";
Index: capture_rectangle.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/capture_rectangle.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- capture_rectangle.hxx 4 Oct 2002 11:38:28 -0000 1.6
+++ capture_rectangle.hxx 19 Apr 2003 10:23:17 -0000 1.7
@@ -35,13 +35,13 @@
class CaptureRectangle
{
private:
- Pingu* pingu;
- std::string action_str;
+ Pingu* pingu;
+ std::string action_str;
/// The id of the owner of this capture rectangle
int owner_id;
-
- Sprite good;
+
+ Sprite good;
Sprite bad;
Sprite arrow_left;
Sprite arrow_right;
@@ -51,12 +51,12 @@
public:
CaptureRectangle(ButtonPanel*);
- ~CaptureRectangle();
-
- void set_pingu(Pingu* pingu);
+ ~CaptureRectangle();
+
+ void set_pingu(Pingu* pingu);
+
+ void draw_offset(int x_offset, int y_offset, float s = 1.0);
- void draw_offset(int x_offset, int y_offset, float s = 1.0);
-
private:
CaptureRectangle (const CaptureRectangle&);
CaptureRectangle& operator= (const CaptureRectangle&);
Index: cheat.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/cheat.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- cheat.cxx 16 Mar 2003 23:07:02 -0000 1.2
+++ cheat.cxx 19 Apr 2003 10:23:17 -0000 1.3
@@ -28,11 +28,11 @@
void
Cheat::activate(const std::string& cheat)
{
- if (cheat == "unlimited-actions" || cheat == "ua")
+ if (cheat == "unlimited-actions" || cheat == "ua")
{
unlimited_actions = true;
}
- else if (cheat == "all-actions" || cheat == "aa")
+ else if (cheat == "all-actions" || cheat == "aa")
{
all_actions = true;
unlimited_actions = true;
@@ -54,14 +54,14 @@
void
Cheat::print_help()
{
- std::cout
+ std::cout
<< "Pingus Cheats\n"
<< "-------------\n"
<< " unlimited-actions(ua) - the number of available actions is not
limited\n"
<< " all-actions(aa) - all actions are available in all levels and
unlimited\n"
<< " no-time-limit(nt) - time limit is disabled everywhere\n"
<< std::endl;
-
+
exit(EXIT_SUCCESS);
}
Index: cheat.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/cheat.hxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- cheat.hxx 8 Nov 2002 01:38:27 -0000 1.1
+++ cheat.hxx 19 Apr 2003 10:23:17 -0000 1.2
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2002 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -33,7 +33,7 @@
/** all actions are available in all levels */
extern bool all_actions;
-
+
/** Activate the given cheat */
void activate(const std::string&);
Index: client.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/client.cxx,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- client.cxx 15 Apr 2003 19:06:50 -0000 1.44
+++ client.cxx 19 Apr 2003 10:23:17 -0000 1.45
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 1999 Ingo Ruhnke <address@hidden>
//
@@ -53,14 +53,14 @@
//Display::add_flip_screen_hook(cursor);
unplayable.set_align_center();
-
+
Timer timer("Client UI generation");
// These object will get deleted by the gui_manager
button_panel = new ButtonPanel(this, 2, CL_Display::get_height()/2);
playfield = new Playfield(this);
hurry_up = new HurryUp(this);
- pcounter = new PingusCounter(get_server());
+ pcounter = new PingusCounter(get_server());
small_map = new SmallMap(this);
time_display = new TimeDisplay(this);
@@ -97,18 +97,18 @@
{
const Input::EventLst& events = delta.get_events ();
- for (Input::EventLst::const_iterator i = events.begin ();
- i != events.end ();
+ for (Input::EventLst::const_iterator i = events.begin ();
+ i != events.end ();
++i)
{
//std::cout << "Events: " << (*i)->get_type () << std::endl;
-
+
switch (i->type)
{
case Input::ButtonEventType:
{
const Input::ButtonEvent& ev = i->button;
-
+
if (ev.state == Input::pressed)
{
if (ev.name >= Input::action_1 && ev.name <= Input::action_10)
@@ -136,7 +136,7 @@
// ???
process_axis_event (i->axis);
break;
-
+
case Input::ScrollEventType:
process_scroll_event(i->scroll);
break;
@@ -152,7 +152,7 @@
void
Client::process_scroll_event (const Input::ScrollEvent& ev)
{
- std::cout << "Client::process_scroll_event ()" << std::endl;
+ std::cout << "Client::process_scroll_event ()" << std::endl;
playfield->scroll(static_cast<int>(ev.x_delta),
static_cast<int>(ev.y_delta));
}
@@ -187,7 +187,7 @@
Client::set_finished()
{
is_finished = true;
- server->set_finished();
+ server->set_finished();
}
#if 0
@@ -219,19 +219,19 @@
enabled = true;
break;
- // Playfield scrolling
+ // Playfield scrolling
case CL_KEY_LEFT:
playfield->view[playfield->current_view]->set_x_offset(playfield->view[playfield->current_view]->get_x_offset()
+ playfield->scroll_speed);
break;
-
+
case CL_KEY_RIGHT:
playfield->view[playfield->current_view]->set_x_offset(playfield->view[playfield->current_view]->get_x_offset()
- playfield->scroll_speed);
break;
-
+
case CL_KEY_UP:
playfield->view[playfield->current_view]->set_y_offset(playfield->view[playfield->current_view]->get_y_offset()
+ playfield->scroll_speed);
break;
-
+
case CL_KEY_DOWN:
playfield->view[playfield->current_view]->set_y_offset(playfield->view[playfield->current_view]->get_y_offset()
- playfield->scroll_speed);
break;
@@ -240,11 +240,11 @@
case CL_KEY_PAGEDOWN:
playfield->view[playfield->current_view]->set_zoom(playfield->view[playfield->current_view]->get_zoom()
/ 1.05);
break;
-
+
case CL_KEY_PAGEUP:
playfield->view[playfield->current_view]->set_zoom(playfield->view[playfield->current_view]->get_zoom()
/ 0.95);
break;
-
+
case CL_KEY_END:
playfield->view[playfield->current_view]->set_zoom(1.0);
break;
@@ -258,11 +258,11 @@
case CL_KEY_A:
server->send_armageddon_event();
break;
-
+
case CL_KEY_R:
do_restart();
break;
-
+
case CL_KEY_SPACE:
set_fast_forward(!get_fast_forward());
break;
@@ -279,22 +279,22 @@
break;
case CL_KEY_F3:
button_panel->set_button(2);
- break;
+ break;
case CL_KEY_F4:
button_panel->set_button(3);
- break;
+ break;
case CL_KEY_F5:
button_panel->set_button(4);
- break;
+ break;
case CL_KEY_F6:
button_panel->set_button(5);
- break;
+ break;
case CL_KEY_F7:
button_panel->set_button(6);
- break;
+ break;
case CL_KEY_F8:
button_panel->set_button(7);
- break;
+ break;
default:
if (verbose > 1) std::cout << "Client: Got unknown button: ID=" <<
key.id << " ASCII=" << char(key.ascii) << std::endl;
}
@@ -313,13 +313,13 @@
server->set_pause (!server->get_pause ());
}
-void
+void
Client::on_fast_forward_press ()
{
server->set_fast_forward(!server->get_fast_forward());
}
-void
+void
Client::on_armageddon_press ()
{
server->send_armageddon_event();
@@ -363,7 +363,7 @@
}
if (verbose)
- std::cout << "Client: Entering main_loop. Startup time: "
+ std::cout << "Client: Entering main_loop. Startup time: "
<< CL_System::get_time() << " msec." << std::endl;
}
Index: col_map.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/col_map.cxx,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- col_map.cxx 18 Apr 2003 12:51:17 -0000 1.17
+++ col_map.cxx 19 Apr 2003 10:23:17 -0000 1.18
@@ -50,11 +50,11 @@
if (x >= 0 && x < width && y >= 0 && y < height) {
return colmap[x+y*width];
} else {
- return Groundtype::GP_OUTOFSCREEN;
+ return Groundtype::GP_OUTOFSCREEN;
}
}
-unsigned char*
+unsigned char*
ColMap::get_data()
{
return colmap;
@@ -72,20 +72,20 @@
return width;
}
-void
+void
ColMap::remove(const CL_Surface& sur, int x, int y)
{
remove(sur.get_provider(), x, y);
}
-void
+void
ColMap::remove(CL_SurfaceProvider* provider, int x, int y)
{
++serial;
assert(provider);
- if (provider->get_depth() == 32)
+ if (provider->get_depth() == 32)
{
unsigned char* buffer;
int swidth = provider->get_width();
@@ -98,11 +98,11 @@
provider->lock();
buffer = static_cast<unsigned char*>(provider->get_data());
- for(int line = y_offset; line < sheight && (line + y) < height; ++line)
+ for(int line = y_offset; line < sheight && (line + y) < height; ++line)
{
- for (int i = x_offset; i < swidth && (i+x) < width; ++i)
+ for (int i = x_offset; i < swidth && (i+x) < width; ++i)
{
- if (buffer[(i + (swidth*line)) * 4] != 0)
+ if (buffer[(i + (swidth*line)) * 4] != 0)
{
if (colmap[i + (width*(line+y) + x)] != Groundtype::GP_SOLID)
colmap[i + (width*(line+y) + x)] = Groundtype::GP_NOTHING;
@@ -126,11 +126,11 @@
provider->lock();
buffer = static_cast<unsigned char*>(provider->get_data());
- for(int line = y_offset; line < sheight && (line + y) < height; ++line)
+ for(int line = y_offset; line < sheight && (line + y) < height; ++line)
{
- for (int i = x_offset; i < swidth && (i+x) < width; ++i)
+ for (int i = x_offset; i < swidth && (i+x) < width; ++i)
{
- if (buffer[i + (swidth*line)])
+ if (buffer[i + (swidth*line)])
{
if (colmap[i + (width*(line+y) + x)] != Groundtype::GP_SOLID)
colmap[i + (width*(line+y) + x)] = Groundtype::GP_NOTHING;
@@ -153,7 +153,7 @@
++serial;
if (x > 0 && x < width
- && y > 0 && y < height)
+ && y > 0 && y < height)
{
colmap[x+y*width] = p;
}
@@ -193,9 +193,9 @@
if (pixel == Groundtype::GP_TRANSPARENT)
return;
- if ((sur_x > width) || (sur_y > height))
+ if ((sur_x > width) || (sur_y > height))
{
- if (verbose > 3)
+ if (verbose > 3)
{
std::cout << "Warning: ColMap: Spot out of screen" << std::endl;
std::cout << "sur_x: " << sur_x << " sur_y: " << sur_y << std::endl;
@@ -204,13 +204,13 @@
}
provider->lock();
-
- if (provider->get_depth() == 32)
+
+ if (provider->get_depth() == 32)
{
float r, g, b, a;
// Rewritting blitter for 32bit depth (using get_pixel())
for (unsigned int y=0; y < provider->get_height(); ++y)
- for (unsigned int x=0; x < provider->get_width(); ++x)
+ for (unsigned int x=0; x < provider->get_width(); ++x)
{
provider->get_pixel(x, y, &r, &g, &b, &a);
if (a > 0.1) // Alpha threshold
@@ -236,20 +236,20 @@
if (provider->uses_src_colorkey())
{
unsigned int colorkey = provider->get_src_colorkey();
- for(int line = y_offset; line < sheight && (line + sur_y) < height;
++line)
- for (int i = x_offset; i < swidth && (i+sur_x) < width; ++i)
+ for(int line = y_offset; line < sheight && (line + sur_y) < height;
++line)
+ for (int i = x_offset; i < swidth && (i+sur_x) < width; ++i)
{
if (buffer[i + (swidth*line)] != colorkey)
{
if (blit_allowed (i + sur_x, line + sur_y, pixel))
- colmap[i + (width*(line+sur_y) + sur_x)] = pixel;
+ colmap[i + (width*(line+sur_y) + sur_x)] = pixel;
}
}
}
else
{
- for(int line = y_offset; line < sheight && (line + sur_y) < height;
++line)
- for (int i = x_offset; i < swidth && (i+sur_x) < width; ++i)
+ for(int line = y_offset; line < sheight && (line + sur_y) < height;
++line)
+ for (int i = x_offset; i < swidth && (i+sur_x) < width; ++i)
{
if (blit_allowed (i + sur_x, line + sur_y, pixel))
colmap[i + (width*(line+sur_y) + sur_x)] = pixel;
@@ -273,7 +273,7 @@
canvas->lock();
buffer = static_cast<unsigned char*>(canvas->get_data());
-
+
for(int i = 0; i < (width * height); ++i)
{
switch(colmap[i])
Index: col_map.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/col_map.hxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- col_map.hxx 7 Oct 2002 23:09:14 -0000 1.10
+++ col_map.hxx 19 Apr 2003 10:23:17 -0000 1.11
@@ -38,13 +38,13 @@
/** The serial number indicates the state of the colmap, on every
change of the colmap it will get increased. */
unsigned int serial;
-
+
/** The width of the collision map. */
int width;
/** The height of the collision map. */
int height;
-
+
/** A array of uchar, each uchar represents a pixel on the map. */
unsigned char* colmap;
@@ -71,7 +71,7 @@
/** @return a number which represents the state of the collision
map, once it changes the serial changes also */
unsigned get_serial();
-
+
/** Return true if the given GroundType i*/
bool blit_allowed (int x, int y, Groundtype::GPType);
@@ -84,7 +84,7 @@
void remove(CL_SurfaceProvider*, int x, int y);
void draw(GraphicContext& gc);
-
+
private:
ColMap (const ColMap&);
ColMap& operator= (const ColMap&);
Index: color.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/color.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- color.cxx 12 Apr 2003 00:57:43 -0000 1.2
+++ color.cxx 19 Apr 2003 10:23:17 -0000 1.3
@@ -21,7 +21,7 @@
std::ostream& operator<<(std::ostream& s, const Color& color)
{
- s << "[RGBA: "
+ s << "[RGBA: "
<< color.red << ", "
<< color.green << ", "
<< color.blue << ", "
Index: color.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/color.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- color.hxx 11 Apr 2003 16:51:15 -0000 1.6
+++ color.hxx 19 Apr 2003 10:23:17 -0000 1.7
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -30,11 +30,11 @@
float green;
float blue;
float alpha;
-
+
Color () : red(0.0), green(0.0), blue(0.0), alpha(1.0)
{
}
-
+
Color (float red_, float green_, float blue_, float alpha_ = 1.0) :
red(red_), green(green_), blue(blue_), alpha(alpha_)
{
}
@@ -42,20 +42,20 @@
Color (const Color& old): red(old.red), green(old.green), blue(old.blue),
alpha(old.alpha)
{
}
-
+
Color& operator= (const Color& old)
{
if (this == &old)
return *this;
-
+
red = old.red;
green = old.green;
blue = old.blue;
alpha = old.alpha;
-
+
return *this;
}
-
+
bool operator!= (const Color& color) const {
return !operator==(color);
}
@@ -63,7 +63,7 @@
bool operator== (const Color& color) const {
return red == color.red && green == color.green && blue == color.blue &&
alpha == color.alpha;
}
-
+
};
std::ostream& operator<<(std::ostream& s, const Color& color);
Index: config.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/config.cxx,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- config.cxx 16 Apr 2003 01:15:45 -0000 1.14
+++ config.cxx 19 Apr 2003 10:23:17 -0000 1.15
@@ -67,9 +67,9 @@
in.open(filename.c_str());
eof = false;
- if (!in)
+ if (!in)
PingusError::raise(_("Couldn't open: ") + filename);
-
+
if (verbose > 1)
std::cout << "Successfully opened plf file." << std::endl;
}
@@ -113,16 +113,16 @@
if (eof)
return ' ';
-
+
return get_atom();
}
- if (isspace(c))
+ if (isspace(c))
{
temp_c = c;
while (isspace(c = get_char()));
in.putback(c);
- if (isspace(last_atom))
+ if (isspace(last_atom))
return get_atom();
return temp_c;
}
@@ -135,7 +135,7 @@
ConfigParser::get_atom(void)
{
last_atom = get_raw_atom();
-
+
return last_atom;
}
@@ -145,32 +145,32 @@
{
std::string ret_val;
char atom;
-
+
jump();
- while(true)
+ while(true)
{
atom = get_atom();
-
+
if (isgraph(atom) && atom != '=')
{
ret_val += atom;
- }
- else if (isspace(atom))
+ }
+ else if (isspace(atom))
{
return ret_val;
}
- else if (atom == '=')
+ else if (atom == '=')
{
in.putback(atom);
return ret_val;
}
- else
+ else
{
syntax_error(std::string(_("Unexpected char: '")) + atom + "'");
}
- }
-
+ }
+
return ret_val;
}
@@ -196,7 +196,7 @@
in.putback(atom);
return ret_val;
}
-
+
if (!isalnum(atom) && atom != '-' && atom != '_') {
if (isspace(atom)){
return ret_val;
@@ -204,10 +204,10 @@
syntax_error(std::string(_("Unexpected char '")) + atom + "'");
}
}
-
+
ret_val += atom;
}
-
+
return ret_val;
}
@@ -217,11 +217,11 @@
ConfigParser::jump_after(char c)
{
char atom;
-
+
jump();
atom = get_atom();
- if (isspace(atom) || atom == c)
+ if (isspace(atom) || atom == c)
{
if (atom == c) {
return;
@@ -230,7 +230,7 @@
if (atom == c)
return;
}
- }
+ }
syntax_error(std::string("jump_after(): Expected '") + c + "', got '" + atom
+ "'" );
}
@@ -255,7 +255,7 @@
char tmp[16];
snprintf(tmp, 16, "%d\n", lineno);
-
+
error_str = std::string("PLF: Syntax Error at line ") + tmp;
if (error != "")
@@ -271,14 +271,14 @@
std::string valueid;
std::string value;
- try
+ try
{
- while(!eof)
+ while(!eof)
{
- valueid = get_valueid();
+ valueid = get_valueid();
jump_after('=');
value = get_value();
- jump_after(';');
+ jump_after(';');
set_value(valueid, value);
}
}
@@ -289,7 +289,7 @@
Config::Config()
{
-
+
}
Config::Config(std::string f)
@@ -390,7 +390,7 @@
{
PingusError::raise("Config: value: " + str + " is not of type bool.");
}
-
+
return false; // never reached
}
@@ -399,7 +399,7 @@
{
int ret_val;
- if (sscanf(str.c_str(), "%d", &ret_val) != 1)
+ if (sscanf(str.c_str(), "%d", &ret_val) != 1)
{
PingusError::raise("Config: Couldn't convert std::string to integer: " +
str);
}
Index: config.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/config.hxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- config.hxx 25 Jan 2003 18:34:36 -0000 1.8
+++ config.hxx 19 Apr 2003 10:23:17 -0000 1.9
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -28,7 +28,7 @@
class ConfigParser
{
private:
-
+
///
std::ifstream in; /// The file to parse
@@ -37,7 +37,7 @@
bool eof;
// std::string filename; // The name of the current file
- /// private functions
+ /// private functions
char get_char(void); /// Return the next char and to a eof check
char get_atom(void); /// Return the next atom and keep the old one
char get_raw_atom(void); /// Return the next atom (removes all comments)
@@ -51,17 +51,17 @@
// Some virtual functions
/// Put the retrieved value in the correct struct
- virtual void set_value(const std::string& valueid, const std::string& value)
= 0;
+ virtual void set_value(const std::string& valueid, const std::string& value)
= 0;
public:
///
- ConfigParser();
+ ConfigParser();
///
ConfigParser(std::string); /// Open the file and parse it
virtual ~ConfigParser(); /// Close the file
-
+
void init(std::string);
-
+
private:
ConfigParser (const ConfigParser&);
ConfigParser& operator= (const ConfigParser&);
@@ -74,13 +74,13 @@
bool str_to_bool(const std::string&);
int str_to_int(const std::string&);
-
+
public:
Config ();
Config (std::string);
void set_value(const std::string& valueid, const std::string& value);
-
+
private:
Config (const Config&);
Config& operator= (const Config&);
Index: config_xml.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/config_xml.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- config_xml.cxx 13 Oct 2002 20:25:00 -0000 1.3
+++ config_xml.cxx 19 Apr 2003 10:23:17 -0000 1.4
@@ -39,7 +39,7 @@
}
else
{
- PingusError::raise("ConfigXML: Not a valid pingus-config file \"" +
arg_filename + "\"");
+ PingusError::raise("ConfigXML: Not a valid pingus-config file \"" +
arg_filename + "\"");
}
}
@@ -48,13 +48,13 @@
parse_directory(doc, cur, "");
}
-void
+void
ConfigXML::parse_directory(xmlDocPtr doc, xmlNodePtr cur, const std::string&
prefix)
{
while(cur)
{
std::string name = reinterpret_cast<const char*>(cur->name);
-
+
if (is_directory(doc, cur))
{
parse_directory(doc, cur->children, prefix + name + "/");
@@ -73,7 +73,7 @@
{
std::cout << "ConfigXML: parse error 123: " << cur->name <<
std::endl;
}
-
+
cur = cur->next;
cur = XMLhelper::skip_blank(cur);
}
Index: config_xml.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/config_xml.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- config_xml.hxx 28 Dec 2002 16:57:38 -0000 1.3
+++ config_xml.hxx 19 Apr 2003 10:23:17 -0000 1.4
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2002 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -27,11 +27,11 @@
class ConfigXML
{
private:
- //std::map<std::string, Prop>
+ //std::map<std::string, Prop>
public:
ConfigXML(const std::string& filename);
ConfigXML(xmlDocPtr doc, xmlNodePtr cur);
-
+
private:
void parse_directory(xmlDocPtr doc, xmlNodePtr cur, const std::string&
prefix);
bool is_directory(xmlDocPtr doc, xmlNodePtr cur);
Index: console.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/console.cxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- console.cxx 18 Apr 2003 12:51:17 -0000 1.12
+++ console.cxx 19 Apr 2003 10:23:17 -0000 1.13
@@ -30,25 +30,25 @@
// Globale console
Console console;
-ConsoleBuffer::ConsoleBuffer () : buffer(NUM_LINES)
+ConsoleBuffer::ConsoleBuffer () : buffer(NUM_LINES)
{
// Set the output buffer
setp (char_buffer, char_buffer + CONSOLE_BUFFER_SIZE - 1);
-
+
// Switch of input buffer
setg(0, 0, 0);
}
-
-ConsoleBuffer::~ConsoleBuffer ()
+
+ConsoleBuffer::~ConsoleBuffer ()
{
sync ();
}
int
-ConsoleBuffer::overflow (int c)
+ConsoleBuffer::overflow (int c)
{
std::string str = fill_buffer(true);
-
+
str += c;
buffer.push_back(str);
buffer.pop_front();
@@ -56,9 +56,9 @@
setp (char_buffer, char_buffer + CONSOLE_BUFFER_SIZE - 1);
return 0;
}
-
-int
-ConsoleBuffer::sync ()
+
+int
+ConsoleBuffer::sync ()
{
std::string str = fill_buffer(false);
@@ -67,7 +67,7 @@
buffer.push_back(str);
buffer.pop_front();
}
-
+
setp(char_buffer, char_buffer + CONSOLE_BUFFER_SIZE - 1);
return 0;
}
@@ -85,7 +85,7 @@
for (char* c = pbase (); c != pptr (); ++c)
{
- if (*c != '\n')
+ if (*c != '\n')
str += *c;
else
{
@@ -97,16 +97,16 @@
buffer.push_back(str.substr(0, pos));
buffer.pop_front();
-
+
str = str.substr(pos, str.size());
}
-
+
buffer.push_back(str);
buffer.pop_front();
str = "";
}
}
-
+
return str;
}
@@ -154,7 +154,7 @@
assert(is_init);
/** Callculate the position of the first line on the screen */
- int start_y_pos =
+ int start_y_pos =
CL_Display::get_height() - (font->get_height() * (number_of_lines + 3));
// The background of the console
@@ -168,17 +168,17 @@
unsigned int window_start = Math::max(0, static_cast<int>(buffer.size() -
number_of_lines - current_pos));
std::list<std::string>::const_iterator it = buffer.begin();
-
+
// move iterator to the first line to be displayed
for (unsigned int i = 0; i < window_start; ++i)
++it;
-
- for (unsigned int i = 0;
- i < number_of_lines && i + window_start < buffer.size();
+
+ for (unsigned int i = 0;
+ i < number_of_lines && i + window_start < buffer.size();
++it, ++i)
{
- font->print_left(10,
- start_y_pos + (i * (font->get_height() + 2)),
+ font->print_left(10,
+ start_y_pos + (i * (font->get_height() + 2)),
it->c_str()
);
}
@@ -197,7 +197,7 @@
--number_of_lines;
}
-void
+void
Console::scroll_up()
{
if (current_pos + number_of_lines < streambuf.get_buffer().size())
Index: console.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/console.hxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- console.hxx 19 Feb 2003 09:50:35 -0000 1.12
+++ console.hxx 19 Apr 2003 10:23:17 -0000 1.13
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -37,25 +37,25 @@
std::list<std::string> buffer;
char char_buffer[CONSOLE_BUFFER_SIZE];
-
+
public:
- ConsoleBuffer ();
+ ConsoleBuffer ();
virtual ~ConsoleBuffer ();
- int overflow (int c);
+ int overflow (int c);
int sync ();
const std::list<std::string>& get_buffer ();
-
+
private:
/// helper function used by overflow and sync
std::string fill_buffer (bool append);
-
+
ConsoleBuffer (const ConsoleBuffer&);
ConsoleBuffer& operator= (const ConsoleBuffer&);
};
/** A "Quake" like console, but it can just handle output, you can't
type anything. */
-class Console :
+class Console :
public std::ostream,
public DisplayHook
{
@@ -101,7 +101,7 @@
void puts(const std::string&);
void newline();
-
+
private:
Console (const Console&);
Console& operator= (const Console&);
Index: counter.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/counter.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- counter.cxx 20 Jun 2002 11:23:53 -0000 1.4
+++ counter.cxx 19 Apr 2003 10:23:17 -0000 1.5
@@ -89,10 +89,10 @@
case loop:
++count;
- if (count >= s)
+ if (count >= s)
count = 0;
break;
-
+
case once:
++count;
if (count >= s)
@@ -101,10 +101,10 @@
default:
std::cout << "Counter: Unknown type" << std::endl;
- assert(false);
+ assert(false);
break;
}
-
+
return count;
}
@@ -146,13 +146,13 @@
return new_size;
}
-int
+int
Counter::size() const
{
return s;
}
-void
+void
Counter::set_type(CounterType new_type)
{
type = new_type;
Index: credits.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/credits.cxx,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- credits.cxx 19 Apr 2003 08:15:03 -0000 1.31
+++ credits.cxx 19 Apr 2003 10:23:17 -0000 1.32
@@ -77,7 +77,7 @@
credits.push_back("n");
credits.push_back(_("-Music"));
- credits.push_back("_H. Matthew Smith");
+ credits.push_back("_H. Matthew Smith");
credits.push_back("_Joseph Toscano");
credits.push_back("_Yuri Sucupira");
credits.push_back("n");
@@ -153,7 +153,7 @@
credits.push_back(_("_Thank you for"));
credits.push_back(_("_playing!"));
- end_offset = -CL_Display::get_height()/2 - 50; // screen height + grace time
+ end_offset = -CL_Display::get_height()/2 - 50; // screen height + grace time
for (std::vector<std::string>::iterator i = credits.begin(); i !=
credits.end(); ++i)
{
switch ((*i)[0])
@@ -179,7 +179,7 @@
{
}
-void
+void
Credits::update (float delta)
{
if (offset < end_offset)
@@ -195,7 +195,7 @@
}
}
-void
+void
Credits::draw_background (GraphicContext& gc)
{
int x;
@@ -208,7 +208,7 @@
gc.draw(background,
gc.get_width()/2 - background.get_width()/2,
gc.get_height()/2 - background.get_height()/2);
-
+
gc.draw(pingu, (gc.get_width() / 2) - (pingu.get_width() / 2),
(gc.get_height() / 2) - (pingu.get_height() / 2) - 20);
@@ -263,7 +263,7 @@
instance_ = 0;
}
-void
+void
Credits::deinit()
{
delete instance_;
Index: credits.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/credits.hxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- credits.hxx 9 Apr 2003 23:35:28 -0000 1.12
+++ credits.hxx 19 Apr 2003 10:23:17 -0000 1.13
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -47,7 +47,7 @@
/** The string's which are shown in the scrolling text, the first
character of the string can be used to apply a special format.
-
+
'n' - Inserts a newline
'_' - Use small font
'-' - Use large font
@@ -71,8 +71,8 @@
void on_pause_press ();
void on_fast_forward_press ();
void on_escape_press ();
-
-
+
+
private:
Credits (const Credits&);
Credits& operator= (const Credits&);
Index: debug.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/debug.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- debug.hxx 24 Jun 2002 22:52:54 -0000 1.2
+++ debug.hxx 19 Apr 2003 10:23:17 -0000 1.3
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Index: debug_stream.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/debug_stream.cxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- debug_stream.cxx 5 Sep 2002 16:47:46 -0000 1.7
+++ debug_stream.cxx 19 Apr 2003 10:23:17 -0000 1.8
@@ -43,12 +43,12 @@
DebugStream::Buffer::overflow (int c)
{
std::string str;
-
+
for (char* ptr = pbase (); ptr != pptr (); ++ptr)
{
str += *ptr;
-
- if (*ptr == '\n')
+
+ if (*ptr == '\n')
{
put_line (prefix + str);
str = "";
@@ -56,7 +56,7 @@
}
str += c;
put_line (str);
-
+
setp (char_buffer, char_buffer + buffersize - 1);
return 0;
}
@@ -82,19 +82,19 @@
DebugStream::Buffer::sync ()
{
std::string str;
-
- // Walk through the buffer
+
+ // Walk through the buffer
for (char* c = pbase (); c != pptr (); ++c)
{
str += *c;
- if (*c == '\n')
+ if (*c == '\n')
{
put_line (prefix + str);
str = "";
}
}
-
+
if (!str.empty ())
put_line (str);
@@ -136,7 +136,7 @@
return *this;
} else {
return nilstream;
- }
+ }
}
void
@@ -153,8 +153,8 @@
NilStream::NilStream ()
- : ostream(&buffer)
-{
+ : ostream(&buffer)
+{
}
/* EOF */
Index: debug_stream.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/debug_stream.hxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- debug_stream.hxx 27 Sep 2002 11:26:43 -0000 1.9
+++ debug_stream.hxx 19 Apr 2003 10:23:17 -0000 1.10
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -42,22 +42,22 @@
char char_buffer[buffersize];
std::string prefix;
-
+
public:
Buffer (const std::string& prefix);
virtual ~Buffer ();
- int overflow (int c);
+ int overflow (int c);
int sync ();
void add (std::ostream& s);
void set_prefix (const std::string & prefix_);
-
+
private:
void put_line (const std::string& line);
-
+
} buffer;
static NilStream nilstream;
@@ -71,10 +71,10 @@
void add (std::ostream& s);
void set_prefix (const std::string & prefix);
-
+
private:
DebugStream (const DebugStream&);
- DebugStream& operator= (const DebugStream&);
+ DebugStream& operator= (const DebugStream&);
};
@@ -88,14 +88,14 @@
class NilBuffer : public std::streambuf
{
private:
-
+
char char_buffer[4];
-
+
public:
-
+
NilBuffer () { setp(char_buffer, char_buffer + 3); setg(0,0,0); }
~NilBuffer () { }
-
+
int overflow (int) { return 0; }
int sync () { return 0; }
} buffer;
@@ -103,10 +103,10 @@
NilStream ();
~NilStream () { }
- NilStream (const NilStream &); ///< not supported
+ NilStream (const NilStream &); ///< not supported
public:
-
+
// Avoid unneccessary calls to internal buffer and conversions
NilStream & operator << (const char *) { return *this; }
NilStream & operator << (const std::string &) { return *this; }
Index: delta_manager.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/delta_manager.hxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- delta_manager.hxx 5 Apr 2003 18:36:50 -0000 1.9
+++ delta_manager.hxx 19 Apr 2003 10:23:17 -0000 1.10
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -42,13 +42,13 @@
set ();
return ret;
}
-
- void set ()
+
+ void set ()
{
last_time = CL_System::get_time ();
absolute_time += last_time;
}
-
+
float get () const
{
unsigned int t = CL_System::get_time ();
@@ -62,7 +62,7 @@
return (CL_System::get_time () - last_time) / 1000.0f;
}
}
-
+
/** @return time in miliseconds passed since the start of the DeltaManager */
unsigned int get_absolute() const
{
Index: demo_player.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/demo_player.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- demo_player.cxx 15 Jan 2003 21:16:41 -0000 1.8
+++ demo_player.cxx 19 Apr 2003 10:23:17 -0000 1.9
@@ -1,56 +1,56 @@
-// $Id$
-//
-// Pingus - A free Lemmings clone
-// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-#include <iostream>
-#include "server.hxx"
-#include "demo_player.hxx"
-#include "xml_pdf.hxx"
-
-DemoPlayer::DemoPlayer(Server* s, XMLPDF* pdf)
- : server(s),
- events(pdf->get_events())
-{
-}
-
-DemoPlayer::~DemoPlayer()
-{
-}
-
-void
-DemoPlayer::update()
-{
- while(!events.empty() && events.back().time_stamp == server->get_time())
- {
- ServerEvent& event = events.back();
-
- std::cout << "Sending: ";
- event.write_xml(std::cout);
-
- event.send(server);
- events.pop_back();
- }
-
- // Check for unexpected things (might happen if the demo file is broken)
- if (!events.empty() && events.back().time_stamp < server->get_time())
- {
- std::cout << "DemoPlayer Bug: We missed a timestamp: " <<
events.back().time_stamp << std::endl;
- }
-}
-
-/* EOF */
+// $Id$
+//
+// Pingus - A free Lemmings clone
+// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+#include <iostream>
+#include "server.hxx"
+#include "demo_player.hxx"
+#include "xml_pdf.hxx"
+
+DemoPlayer::DemoPlayer(Server* s, XMLPDF* pdf)
+ : server(s),
+ events(pdf->get_events())
+{
+}
+
+DemoPlayer::~DemoPlayer()
+{
+}
+
+void
+DemoPlayer::update()
+{
+ while(!events.empty() && events.back().time_stamp == server->get_time())
+ {
+ ServerEvent& event = events.back();
+
+ std::cout << "Sending: ";
+ event.write_xml(std::cout);
+
+ event.send(server);
+ events.pop_back();
+ }
+
+ // Check for unexpected things (might happen if the demo file is broken)
+ if (!events.empty() && events.back().time_stamp < server->get_time())
+ {
+ std::cout << "DemoPlayer Bug: We missed a timestamp: " <<
events.back().time_stamp << std::endl;
+ }
+}
+
+/* EOF */
Index: demo_player.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/demo_player.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- demo_player.hxx 3 Oct 2002 01:02:12 -0000 1.6
+++ demo_player.hxx 19 Apr 2003 10:23:17 -0000 1.7
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -35,9 +35,9 @@
public:
DemoPlayer(Server* s, XMLPDF* pdf);
~DemoPlayer();
-
+
void update();
-
+
private:
DemoPlayer (const DemoPlayer&);
DemoPlayer& operator= (const DemoPlayer&);
Index: demo_recorder.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/demo_recorder.cxx,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- demo_recorder.cxx 18 Apr 2003 12:48:50 -0000 1.17
+++ demo_recorder.cxx 19 Apr 2003 10:23:17 -0000 1.18
@@ -45,7 +45,7 @@
if (!out)
{
record_demo = false;
- std::cout << "DemoRecorder: Error: Couldn't write DemoFile '" <<
filename
+ std::cout << "DemoRecorder: Error: Couldn't write DemoFile '" <<
filename
<< "', demo recording will be disabled" << std::endl;
}
else
@@ -86,12 +86,12 @@
{
if (record_demo)
{
- event.write_xml(out);
+ event.write_xml(out);
//event.write_xml(std::cout);
}
}
-std::string
+std::string
DemoRecorder::get_date ()
{
char buffer[32];
Index: demo_recorder.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/demo_recorder.hxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- demo_recorder.hxx 7 Oct 2002 12:25:07 -0000 1.8
+++ demo_recorder.hxx 19 Apr 2003 10:23:17 -0000 1.9
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -44,7 +44,7 @@
public:
DemoRecorder(Server* server);
~DemoRecorder();
-
+
void record_event (const ServerEvent& event);
private:
Index: demo_session.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/demo_session.cxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- demo_session.cxx 21 Mar 2003 22:08:06 -0000 1.7
+++ demo_session.cxx 19 Apr 2003 10:23:17 -0000 1.8
@@ -57,7 +57,7 @@
if (CL_Keyboard::get_keycode(CL_KEY_LEFT))
gc.move(Vector(10.0, 0.0));
-
+
if(CL_Keyboard::get_keycode(CL_KEY_RIGHT))
gc.move(Vector(-10.0, 0.0));
@@ -71,11 +71,11 @@
float y_of = -gc.get_y_offset();
x_of = Math::mid(float(gc.get_width()/2),
- x_of,
+ x_of,
float(world->get_width() - 1 - gc.get_width()/2));
y_of = Math::mid(float(gc.get_height()/2),
- y_of,
+ y_of,
float(world->get_height() - 1 - gc.get_height()/2));
gc.set_offset(-x_of, -y_of);
Index: demo_session.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/demo_session.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- demo_session.hxx 19 Feb 2003 09:50:35 -0000 1.4
+++ demo_session.hxx 19 Apr 2003 10:23:17 -0000 1.5
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2002 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -49,7 +49,7 @@
/** Pass a delta to the screen */
void update(float delta);
-
+
private:
DemoSession (const DemoSession&);
DemoSession& operator= (const DemoSession&);
Index: direction.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/direction.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- direction.cxx 19 Jun 2002 15:19:26 -0000 1.2
+++ direction.cxx 19 Apr 2003 10:23:17 -0000 1.3
@@ -65,7 +65,7 @@
{
if (direction == -1)
return true;
- else
+ else
return false;
}
@@ -74,7 +74,7 @@
{
if (direction == 1)
return true;
- else
+ else
return false;
}
Index: direction.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/direction.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- direction.hxx 4 Sep 2002 14:55:11 -0000 1.5
+++ direction.hxx 19 Apr 2003 10:23:17 -0000 1.6
@@ -27,12 +27,12 @@
{
private:
int direction;
-
+
public:
Direction ();
Direction (const Direction& dir);
~Direction ();
-
+
Direction& operator= (const Direction&);
operator int () const { return direction; }
Index: exit_menu.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/exit_menu.cxx,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- exit_menu.cxx 10 Apr 2003 16:01:02 -0000 1.18
+++ exit_menu.cxx 19 Apr 2003 10:23:17 -0000 1.19
@@ -30,7 +30,7 @@
private:
PingusMenuManager* manager;
public:
- ExitMenuYesButton (PingusMenuManager* m)
+ ExitMenuYesButton (PingusMenuManager* m)
: GUI::SurfaceButton(CL_Display::get_width()/2 - 170,
CL_Display::get_height()/2 + 15,
ResDescriptor("menu/exit_button_normal", "core"),
@@ -39,7 +39,7 @@
manager (m)
{
}
-
+
void draw (GraphicContext& gc) {
SurfaceButton::draw(gc);
gc.print_right(Fonts::chalk_large, CL_Display::get_width()/2 - 80,
@@ -102,19 +102,19 @@
{
}
-bool
+bool
ExitMenu::draw (GraphicContext& gc)
{
//gc.draw_fillrect (0, 0, CL_Display::get_width (), CL_Display::get_height
(),
//0, 0, 0, 0.5);
- gc.draw(sur, gc.get_width ()/2 - sur.get_width ()/2,
+ gc.draw(sur, gc.get_width ()/2 - sur.get_width ()/2,
gc.get_height ()/2 - sur.get_height ()/2);
gc.print_center(Fonts::chalk_large, gc.get_width()/2, gc.get_height()/2 -
70, _("Exit Pingus?"));
PingusSubMenu::draw(gc);
return true;
}
-void
+void
ExitMenu::preload ()
{
sur = PingusResource::load_surface ("menu/exit_menu", "core");
Index: exit_menu.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/exit_menu.hxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- exit_menu.hxx 2 Apr 2003 10:34:58 -0000 1.10
+++ exit_menu.hxx 19 Apr 2003 10:23:17 -0000 1.11
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -36,7 +36,7 @@
bool draw (GraphicContext& gc);
void preload ();
-
+
private:
ExitMenu (const ExitMenu&);
ExitMenu& operator= (const ExitMenu&);
Index: fade_out.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/fade_out.cxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- fade_out.cxx 19 Feb 2003 09:50:35 -0000 1.7
+++ fade_out.cxx 19 Apr 2003 10:23:17 -0000 1.8
@@ -35,7 +35,7 @@
{
}
-void
+void
FadeOut::reset ()
{
passed_time = 0;
@@ -50,10 +50,10 @@
void
FadeOut::set_progress (float /*progress*/)
{
-
+
}
-bool
+bool
FadeOut::finished ()
{
if (get_progress () >= 1.0f)
@@ -72,7 +72,7 @@
FadeOut::random (void)
{
if (maintainer_mode) {
- CL_Display::clear_display();
+ CL_Display::clear_display();
} else {
switch(rand() % 2) {
case 0:
@@ -85,7 +85,7 @@
break;
case 2:
CL_Display::clear_display();
- if (verbose) std::cout << "FadeOut::clear_display()" << std::endl;
+ if (verbose) std::cout << "FadeOut::clear_display()" << std::endl;
break;
default:
black_rect();
@@ -103,17 +103,17 @@
CL_Display::sync_buffers();
- for(int i=0; i <= steps; ++i)
+ for(int i=0; i <= steps; ++i)
{
x1 = static_cast<int>((CL_Display::get_width() / 2) - (step_w * i));
y1 = static_cast<int>((CL_Display::get_height() / 2) - (step_h * i));
x2 = static_cast<int>((CL_Display::get_width() / 2) + (step_w * i));
y2 = static_cast<int>((CL_Display::get_height() / 2) + (step_h * i));
-
+
CL_Display::fill_rect(x1, y1, x2, y2, 0.0, 0.0, 0.0, 1.0);
CL_System::sleep(0);
Display::flip_display(true);
- }
+ }
clear();
}
@@ -142,7 +142,7 @@
CL_Display::sync_buffers();
}
-void
+void
EnlargingRectFadeOut::draw ()
{
//std::cout << "EnlargingRectFadeOut:: draw" << std::endl;
Index: fade_out.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/fade_out.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- fade_out.hxx 12 Oct 2002 00:49:10 -0000 1.5
+++ fade_out.hxx 19 Apr 2003 10:23:17 -0000 1.6
@@ -31,7 +31,7 @@
/** The time that passed since the fadeout was started */
float passed_time;
-
+
protected:
Color color;
public:
@@ -39,7 +39,7 @@
complete */
FadeOut (float seconds = 1.0f, Color color = Color ());
virtual ~FadeOut ();
-
+
// Reset the fadeout to the start
virtual void reset ();
@@ -48,7 +48,7 @@
virtual void set_progress (float progress);
virtual float get_progress ();
virtual bool finished ();
-
+
///
static void random(void);
///
@@ -57,7 +57,7 @@
static void fade_to_black(int steps = 20);
///
static void clear(void);
-
+
private:
FadeOut (const FadeOut&);
FadeOut& operator= (const FadeOut&);
@@ -70,9 +70,9 @@
EnlargingRectFadeOut (float seconds = 1.0f, Color color_ = Color())
: FadeOut (seconds, color_) {}
~EnlargingRectFadeOut () {}
-
+
void draw ();
-
+
private:
EnlargingRectFadeOut (const EnlargingRectFadeOut&);
EnlargingRectFadeOut& operator= (const EnlargingRectFadeOut&);
Index: file_reader.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/file_reader.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- file_reader.hxx 20 Dec 2002 19:39:13 -0000 1.2
+++ file_reader.hxx 19 Apr 2003 10:23:17 -0000 1.3
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2002 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Index: file_writer.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/file_writer.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- file_writer.hxx 28 Dec 2002 16:57:38 -0000 1.2
+++ file_writer.hxx 19 Apr 2003 10:23:17 -0000 1.3
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2002 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Index: fonts.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/fonts.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- fonts.hxx 21 Mar 2003 22:08:06 -0000 1.4
+++ fonts.hxx 19 Apr 2003 10:23:17 -0000 1.5
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2002 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Index: fps_counter.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/fps_counter.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- fps_counter.cxx 18 Feb 2003 18:41:58 -0000 1.5
+++ fps_counter.cxx 19 Apr 2003 10:23:17 -0000 1.6
@@ -37,7 +37,7 @@
// We are not initialising the fpscounter in the constructor, 'cause
-// that doesn't work (ClanLib hasn't init the display at that point)
+// that doesn't work (ClanLib hasn't init the display at that point)
void
FPSCounter::init()
{
@@ -54,7 +54,7 @@
if (odd_frame)
{
- font->print_right(CL_Display::get_width(),
+ font->print_right(CL_Display::get_width(),
CL_Display::get_height() - (2 * font->get_height()),
"o");
odd_frame = false;
@@ -64,20 +64,20 @@
odd_frame = true;
}
- font->print_right(CL_Display::get_width(),
+ font->print_right(CL_Display::get_width(),
CL_Display::get_height() - font->get_height(),
fps_string);
}
-void
+void
FPSCounter::update_fps_counter()
{
unsigned int current_time = CL_System::get_time();
int current_fps;
fps_count++;
-
- if (start_time + 1000 < current_time)
+
+ if (start_time + 1000 < current_time)
{
current_fps = fps_count * 1000 / (current_time - start_time);
snprintf(fps_string, 16, "%d fps", current_fps);
Index: fps_counter.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/fps_counter.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- fps_counter.hxx 19 Feb 2003 09:50:35 -0000 1.6
+++ fps_counter.hxx 19 Apr 2003 10:23:17 -0000 1.7
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -60,7 +60,7 @@
/** Load all the gfx and fonts... */
void init();
-
+
private:
FPSCounter (const FPSCounter&);
FPSCounter& operator= (const FPSCounter&);
Index: game_counter.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/game_counter.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- game_counter.cxx 13 Jun 2002 14:25:12 -0000 1.2
+++ game_counter.cxx 19 Apr 2003 10:23:17 -0000 1.3
@@ -32,7 +32,7 @@
GameCounter::~GameCounter()
{
-
+
}
void
@@ -128,17 +128,17 @@
{
count -= add;
check_overflow();
- return int(count);
+ return int(count);
}
int
GameCounter::operator=(int i)
{
- is_finished = false;
+ is_finished = false;
return int(count = double(i));
}
-int
+int
GameCounter::value(void)
{
return int(count);
Index: game_counter.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/game_counter.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- game_counter.hxx 27 Sep 2002 11:26:43 -0000 1.6
+++ game_counter.hxx 19 Apr 2003 10:23:17 -0000 1.7
@@ -51,7 +51,7 @@
int operator-- ();
int operator= (int i);
operator int ();
-
+
private:
GameCounter (const GameCounter&);
GameCounter& operator= (const GameCounter&);
Index: game_event.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/game_event.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- game_event.hxx 23 Aug 2002 15:49:48 -0000 1.6
+++ game_event.hxx 19 Apr 2003 10:23:17 -0000 1.7
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -42,7 +42,7 @@
{
/** The id of the pingu to which this action should apply
int pingu_id;
-
+
/** The action to apply to the pingu */
std::string action;
};
Index: game_session.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/game_session.cxx,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- game_session.cxx 9 Apr 2003 16:20:19 -0000 1.39
+++ game_session.cxx 19 Apr 2003 10:23:17 -0000 1.40
@@ -59,7 +59,7 @@
if (maintainer_mode)
std::cout << "XXXXXXXX"
<< " Redraws: " << number_of_redraws
- << " Updates: " << number_of_updates
+ << " Updates: " << number_of_updates
<< " FrameSkip: " << number_of_updates - number_of_redraws
<< std::endl;
@@ -102,7 +102,7 @@
//ScreenManager::instance()->pop_screen();
PinguHolder* pingu_holder = server->get_world()->get_pingus();
Result result;
-
+
result.plf = server->get_plf();
result.saved = pingu_holder->get_number_of_exited();
@@ -142,7 +142,7 @@
{
int i;
- for (i = 0;
+ for (i = 0;
((i * update_time < time_passed)
|| i < min_frame_skip)
&& !(i > max_frame_skip);
@@ -152,7 +152,7 @@
server->update ();
++number_of_updates;
}
-
+
// Time that got not used for updates
left_over_time = time_passed - (i * update_time);
}
@@ -162,7 +162,7 @@
// FIXME: This doesn't really belong here
CL_System::sleep(-left_over_time);
}
-
+
// Client is independend of the update limit, well, not completly...
client->update (delta);
@@ -176,25 +176,25 @@
void
PingusGameSession::on_pause_press ()
{
- client->on_pause_press ();
+ client->on_pause_press ();
}
void
PingusGameSession::on_fast_forward_press ()
{
- client->on_fast_forward_press ();
+ client->on_fast_forward_press ();
}
void
-PingusGameSession::on_armageddon_press ()
+PingusGameSession::on_armageddon_press ()
{
- client->on_armageddon_press ();
+ client->on_armageddon_press ();
}
void
-PingusGameSession::on_escape_press ()
-{
- client->on_escape_press ();
+PingusGameSession::on_escape_press ()
+{
+ client->on_escape_press ();
}
/* EOF */
Index: game_session.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/game_session.hxx,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- game_session.hxx 21 Mar 2003 22:08:06 -0000 1.18
+++ game_session.hxx 19 Apr 2003 10:23:17 -0000 1.19
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -54,7 +54,7 @@
/** Number of redraws (frameskip == number_of_updates - number_of_redraws) */
unsigned int number_of_redraws;
-
+
public:
PingusGameSession (PLFHandle arg_plf, bool arg_show_result_screen);
@@ -64,7 +64,7 @@
/** Get the results of the last gaming session */
PingusGameSessionResult get_result ();
- // Overloaded Screen functions
+ // Overloaded Screen functions
/** Draw this screen */
bool draw(GraphicContext& gc);
@@ -79,7 +79,7 @@
void on_armageddon_press ();
void on_escape_press ();
-private:
+private:
PingusGameSession (const PingusGameSession&);
PingusGameSession& operator= (const PingusGameSession&);
};
Index: game_session_result.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/game_session_result.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- game_session_result.cxx 23 Aug 2002 15:49:48 -0000 1.2
+++ game_session_result.cxx 19 Apr 2003 10:23:17 -0000 1.3
@@ -36,7 +36,7 @@
return 100.0;
}
-float
+float
PingusGameSessionResult::percentage_time ()
{
return 100.0;
Index: game_session_result.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/game_session_result.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- game_session_result.hxx 27 Sep 2002 11:26:43 -0000 1.5
+++ game_session_result.hxx 19 Apr 2003 10:23:17 -0000 1.6
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -29,11 +29,11 @@
{
public:
PingusGameSessionResult ();
-
+
PingusGameSessionResult (const PingusGameSessionResult&) { }
PingusGameSessionResult& operator= (const PingusGameSessionResult&) { return
*this; }
- /** Gives information if the level was succeeded or not
+ /** Gives information if the level was succeeded or not
@return true if the level was succeeded, otherwise false */
bool finished ();
Index: game_time.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/game_time.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- game_time.cxx 13 Apr 2003 21:50:48 -0000 1.8
+++ game_time.cxx 19 Apr 2003 10:23:17 -0000 1.9
@@ -33,7 +33,7 @@
return count * game_speed;
}
-int
+int
GameTime::get_ticks(void)
{
return count;
@@ -72,12 +72,12 @@
int total_seconds = ticks * game_speed / 1000;
int seconds = total_seconds % 60;
int minutes = total_seconds / 60;
-
+
// Stop displaying negative seconds, which can happen if armageddon is
// clicked with 1 second left.
if (seconds < 0)
seconds = 0;
-
+
snprintf(time_str, time_str_size, "%2d:%02d", minutes, seconds);
}
return time_str;
Index: game_time.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/game_time.hxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- game_time.hxx 6 Apr 2003 14:37:07 -0000 1.9
+++ game_time.hxx 19 Apr 2003 10:23:17 -0000 1.10
@@ -31,13 +31,13 @@
private:
/** Tick counter */
int count;
-
+
/** How long does a tick take in msec */
int tick_time;
public:
GameTime (int arg_tick_time);
-
+
/** Number of ticks since the time starts, a tick is one basically
update call to the world */
int get_ticks(void);
@@ -50,13 +50,13 @@
/** Increase the tick count */
void update(void);
-
+
/** Start from zero */
void reset(void);
/** Convert time given in ticks, into a string of Minutes:Seconds */
static std::string ticks_to_realtime_string(int ticks);
-
+
private:
GameTime (const GameTime&);
GameTime& operator= (const GameTime&);
Index: global_event.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/global_event.cxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- global_event.cxx 1 Apr 2003 15:13:33 -0000 1.9
+++ global_event.cxx 19 Apr 2003 10:23:17 -0000 1.10
@@ -59,7 +59,7 @@
case CL_KEY_DOWN:
//if (CL_Keyboard::get_keycode(PINGUS_CL_KEY_HELP))
- // console.scroll_down();
+ // console.scroll_down();
break;
#ifdef CL_HAS_KEY_GRAVE
@@ -68,7 +68,7 @@
case CL_KEY_NONE_OF_THE_ABOVE:
#endif
console.toggle_display();
- break;
+ break;
case CL_KEY_F11:
fps_counter.toggle_display();
@@ -100,7 +100,7 @@
break;
case CL_KEY_END:
- if (CL_Keyboard::get_keycode(CL_KEY_LCTRL)
+ if (CL_Keyboard::get_keycode(CL_KEY_LCTRL)
&& CL_Keyboard::get_keycode(CL_KEY_ALT))
{
puts ("---:: Emergency exit ::---");
@@ -119,8 +119,8 @@
{
if (device == CL_Input::keyboards[0])
{
-
- }
+
+ }
}
/* EOF */
Index: global_event.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/global_event.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- global_event.hxx 27 Sep 2002 11:26:43 -0000 1.6
+++ global_event.hxx 19 Apr 2003 10:23:17 -0000 1.7
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -25,11 +25,11 @@
class CL_Key;
class CL_InputDevice;
-class GlobalEvent
+class GlobalEvent
{
public:
GlobalEvent ();
-
+
virtual void on_button_press(CL_InputDevice *device, const CL_Key &key);
virtual void on_button_release(CL_InputDevice *device, const CL_Key &key);
Index: globals.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/globals.cxx,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- globals.cxx 15 Apr 2003 10:33:15 -0000 1.13
+++ globals.cxx 19 Apr 2003 10:23:17 -0000 1.14
@@ -54,7 +54,7 @@
std::string controller_file;
std::string global_username;
-std::string global_email;
+std::string global_email;
std::string default_language = "en";
int pingus_debug_flags = 0;
Index: globals.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/globals.hxx,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- globals.hxx 15 Apr 2003 10:33:15 -0000 1.16
+++ globals.hxx 19 Apr 2003 10:23:17 -0000 1.17
@@ -43,7 +43,7 @@
extern bool start_editor; ///<
extern std::string demo_file; ///<
extern bool auto_scrolling; ///<
--enable-auto-scrolling
-extern int tile_size; ///< --tile-size
+extern int tile_size; ///< --tile-size
extern bool fullscreen_enabled; ///< --enable-fullscreen
extern int screen_width; ///<
extern int screen_height; ///<
@@ -63,7 +63,7 @@
extern std::string default_language; ///< The default language,
which is used when the env var LANG is not set
extern int pingus_debug_flags; ///< Set some bits in this
thing to get debug infos
-extern int min_frame_skip;
+extern int min_frame_skip;
extern int max_frame_skip;
enum { PINGUS_DEBUG_ACTIONS = (1 << 0),
Index: goal_manager.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/goal_manager.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- goal_manager.cxx 25 Mar 2003 00:37:44 -0000 1.6
+++ goal_manager.cxx 19 Apr 2003 10:23:17 -0000 1.7
@@ -41,7 +41,7 @@
{
// we are finished, now wait a few second so that everybody can
// see the particles, etc.
- if (maintainer_mode)
+ if (maintainer_mode)
std::cout << "XXXX goal reached: " << goal << std::endl;
exit_time = server->get_time() + 125;
return false;
Index: goal_manager.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/goal_manager.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- goal_manager.hxx 10 Oct 2002 12:25:53 -0000 1.3
+++ goal_manager.hxx 19 Apr 2003 10:23:17 -0000 1.4
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2002 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Index: groundtype.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/groundtype.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- groundtype.cxx 16 Sep 2002 20:31:09 -0000 1.1
+++ groundtype.cxx 19 Apr 2003 10:23:17 -0000 1.2
@@ -20,12 +20,12 @@
#include <iostream>
#include "groundtype.hxx"
-Groundtype::GPType
-Groundtype::string_to_type(const std::string& arg_type)
+Groundtype::GPType
+Groundtype::string_to_type(const std::string& arg_type)
{
if (arg_type == "solid")
return Groundtype::GP_SOLID;
- else if (arg_type == "transparent")
+ else if (arg_type == "transparent")
return Groundtype::GP_TRANSPARENT;
else if (arg_type == "ground")
return Groundtype::GP_GROUND;
@@ -33,9 +33,9 @@
return Groundtype::GP_BRIDGE;
else if (arg_type == "water")
return Groundtype::GP_WATER;
- else if (arg_type == "lava")
+ else if (arg_type == "lava")
return Groundtype::GP_LAVA;
- else if (arg_type == "remove")
+ else if (arg_type == "remove")
return Groundtype::GP_REMOVE;
else
{
@@ -45,11 +45,11 @@
}
-std::string
-Groundtype::type_to_string(GPType arg_type)
+std::string
+Groundtype::type_to_string(GPType arg_type)
{
switch (arg_type)
- {
+ {
case Groundtype::GP_SOLID:
return "solid";
case Groundtype::GP_TRANSPARENT:
Index: groundtype.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/groundtype.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- groundtype.hxx 27 Sep 2002 11:26:43 -0000 1.2
+++ groundtype.hxx 19 Apr 2003 10:23:17 -0000 1.3
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2002 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -28,15 +28,15 @@
class Groundtype
{
public:
- enum GPType {
+ enum GPType {
GP_NOTHING,
- GP_SOLID,
+ GP_SOLID,
GP_TRANSPARENT,
GP_GROUND,
- GP_BRIDGE,
+ GP_BRIDGE,
GP_WATER,
GP_LAVA,
- GP_REMOVE,
+ GP_REMOVE,
GP_OUTOFSCREEN
};
Index: gui_obj.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/gui_obj.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- gui_obj.cxx 12 Jun 2002 19:09:37 -0000 1.1
+++ gui_obj.cxx 19 Apr 2003 10:23:17 -0000 1.2
@@ -33,7 +33,7 @@
{
}
-void
+void
GuiObj::set_clip_rect(int ax1, int ay1, int ax2, int ay2)
{
x1 = ax1;
Index: gui_obj.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/gui_obj.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- gui_obj.hxx 27 Sep 2002 11:26:43 -0000 1.7
+++ gui_obj.hxx 19 Apr 2003 10:23:17 -0000 1.8
@@ -26,7 +26,7 @@
screen, the complete screen is representated by a window obtect. A
GuiObj must provide a methode to react on input, update the screen
and redraw it. */
-class GuiObj
+class GuiObj
{
protected:
// FIXME: Do we need that here?! (its used for clipping)
@@ -40,7 +40,7 @@
virtual ~GuiObj();
void set_clip_rect(int, int, int, int);
-
+
/// Draw the gui element and do the clipping.
virtual void draw_clipped();
@@ -58,14 +58,14 @@
virtual void updateX();
// Events
-
- // Called when
+
+ // Called when
virtual void on_mouse_enter () {}
virtual void on_mouse_leave () {}
virtual void on_mouse_click () {}
virtual void on_mouse_press () {}
virtual void on_mouse_release () {}
-
+
private:
GuiObj (const GuiObj&);
GuiObj& operator= (const GuiObj&);
Index: html_browser.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/html_browser.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- html_browser.hxx 23 Aug 2002 15:49:49 -0000 1.3
+++ html_browser.hxx 19 Apr 2003 10:23:17 -0000 1.4
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Index: hurry_up.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/hurry_up.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- hurry_up.cxx 19 Feb 2003 10:37:31 -0000 1.6
+++ hurry_up.cxx 19 Apr 2003 10:23:17 -0000 1.7
@@ -23,7 +23,7 @@
#include "pingus_resource.hxx"
#include "hurry_up.hxx"
-HurryUp::HurryUp (Client* c)
+HurryUp::HurryUp (Client* c)
: font(PingusResource::load_font("Fonts/pingus","fonts")),
is_running(false),
is_finished(false),
Index: hurry_up.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/hurry_up.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- hurry_up.hxx 19 Feb 2003 10:37:31 -0000 1.7
+++ hurry_up.hxx 19 Apr 2003 10:23:17 -0000 1.8
@@ -47,7 +47,7 @@
void draw(GraphicContext& gc);
void update(float delta);
void set_client(Client*);
-
+
private:
HurryUp (const HurryUp&);
HurryUp& operator= (const HurryUp&);
Index: indexed_canvas.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/indexed_canvas.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- indexed_canvas.hxx 16 Oct 2002 10:27:31 -0000 1.2
+++ indexed_canvas.hxx 19 Apr 2003 10:23:17 -0000 1.3
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2002 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Index: input_event.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/input_event.hxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- input_event.hxx 28 Sep 2002 11:52:21 -0000 1.8
+++ input_event.hxx 19 Apr 2003 10:23:17 -0000 1.9
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -29,7 +29,7 @@
typedef enum {
/** Pointer Events (pos contains the move-delta) */
MOUSE_MOVE,
-
+
/** The scroll controll has been move, in theory this could be a
second mouse, an second analog stick or a combination of button
press and cursor movement */
@@ -41,10 +41,10 @@
/*** Generic button events (pos contains position) */
PRIMARY_BUTTON_PRESSED,
SECONDARY_BUTTON_PRESSED,
-
+
/** Escape is pressed */
ESCAPE_TRIGGERED,
-
+
/** 'p' or 'Pause' got pressed */
PAUSE_PRESSED,
FASTFORWARD_TRIGGERED
@@ -52,7 +52,7 @@
/** Buttons for switching to the next/previous Action */
ACTION_UP,
ACTION_DOWN,
-
+
/** Action selected, Most likly one of the F1-F?? buttons is
pressed, this could also be a combination of shift-button or
something else */
@@ -66,10 +66,10 @@
public:
/** Position or movement */
Vector pos;
-
+
/** integer data */
int data;
-
+
/** The type of event */
EventType type;
Index: layer_manager.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/layer_manager.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- layer_manager.cxx 11 Apr 2003 01:21:21 -0000 1.5
+++ layer_manager.cxx 19 Apr 2003 10:23:17 -0000 1.6
@@ -37,15 +37,15 @@
void
LayerManager::draw (GraphicContext& gc)
{
- for (std::vector<Layer>::iterator i = layers.begin ();
+ for (std::vector<Layer>::iterator i = layers.begin ();
i != layers.end (); ++i)
i->draw (gc);
}
-void
+void
LayerManager::update (float delta)
{
- for (std::vector<Layer>::iterator i = layers.begin ();
+ for (std::vector<Layer>::iterator i = layers.begin ();
i != layers.end (); ++i)
i->update (delta);
}
Index: layer_manager.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/layer_manager.hxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- layer_manager.hxx 11 Apr 2003 15:15:34 -0000 1.9
+++ layer_manager.hxx 19 Apr 2003 10:23:17 -0000 1.10
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -41,9 +41,9 @@
float x_offset;
float y_offset;
-
+
public:
- Layer ()
+ Layer ()
: x_pos(0), y_pos(0),
x_update(0), y_update(0),
x_offset(0), y_offset(0)
@@ -55,8 +55,8 @@
x_update(x_u), y_update(y_u),
x_offset(x_o), y_offset(y_o)
{}
-
- void draw (GraphicContext& gc)
+
+ void draw (GraphicContext& gc)
{
gc.draw(sur, int(x_pos + x_offset),
int(y_pos + y_offset));
@@ -64,7 +64,7 @@
int(y_pos + y_offset));
}
- void update (float delta)
+ void update (float delta)
{
x_pos = fmod((x_pos + x_update * delta),800);
y_pos = fmod((y_pos + y_update * delta),600);
@@ -80,7 +80,7 @@
void add_layer (const CL_Surface& sur, float x_o, float y_o, float x_u,
float y_u);
void draw (GraphicContext& gc);
void update (float delta);
-
+
private:
LayerManager (const LayerManager&);
LayerManager& operator= (const LayerManager&);
Index: level_desc.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/level_desc.cxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- level_desc.cxx 19 Feb 2003 09:50:36 -0000 1.10
+++ level_desc.cxx 19 Apr 2003 10:23:17 -0000 1.11
@@ -45,7 +45,7 @@
{
int x_pos = CL_Display::get_width() / 2 ;
int y_pos = 120;
-
+
for(int y = 0; y < CL_Display::get_height(); y += background.get_height())
for(int x = 0; x < CL_Display::get_width(); x += background.get_width())
background.put_screen(x, y);
@@ -63,10 +63,10 @@
description.print_center(x_pos, y_pos);
y_pos += description.get_height() + 40;
}
-
+
if (!plf->get_author().empty())
{
- font->print_center(CL_Display::get_width() / 2,
+ font->print_center(CL_Display::get_width() / 2,
CL_Display::get_height() - 30,
(_("Designed by ") + plf->get_author()).c_str());
}
@@ -81,11 +81,11 @@
if (status == LOADING) {
font->print_center(CL_Display::get_width() / 2, CL_Display::get_height() -
80, _("Loading..."));
- Display::flip_display();
+ Display::flip_display();
} else {
font->print_center(CL_Display::get_width() / 2, CL_Display::get_height() -
80, _("Loading finished. Press a mouse button to start the level"));
Display::flip_display();
-
+
/*
// FIXME: Busy waiting... ugly
while (!controller->pause->is_pressed () && !controller->left->is_pressed
())
@@ -98,4 +98,4 @@
}
/* EOF */
-
+
Index: level_desc.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/level_desc.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- level_desc.hxx 27 Sep 2002 11:26:43 -0000 1.5
+++ level_desc.hxx 19 Apr 2003 10:23:17 -0000 1.6
@@ -35,15 +35,15 @@
CL_Font* font;
CL_Font* title;
PLF* plf;
-
+
MultiLineText description;
std::string levelname;
public:
enum LoadingStatus { LOADING, FINISHED };
PingusLevelDesc(PLF*);
-
+
void draw(PingusLevelDesc::LoadingStatus status);
-
+
private:
PingusLevelDesc (const PingusLevelDesc&);
PingusLevelDesc& operator= (const PingusLevelDesc&);
Index: level_interrupt.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/level_interrupt.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- level_interrupt.hxx 27 Sep 2002 11:26:43 -0000 1.5
+++ level_interrupt.hxx 19 Apr 2003 10:23:17 -0000 1.6
@@ -33,7 +33,7 @@
Status get_status();
private:
Status status;
-
+
LevelInterrupt (const LevelInterrupt&);
LevelInterrupt& operator= (const LevelInterrupt&);
};
Index: level_result.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/level_result.cxx,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- level_result.cxx 15 Apr 2003 20:08:26 -0000 1.13
+++ level_result.cxx 19 Apr 2003 10:23:17 -0000 1.14
@@ -53,28 +53,28 @@
background.put_screen(x, y);
CL_Display::fill_rect(0, 0, CL_Display::get_width(),
CL_Display::get_height(), 0.0, 0.0, 0.0, 0.5);
-
+
title->print_center(CL_Display::get_width() / 2, 50, _("Results:"));
-
+
/* Ending messages are censored for the momement
font->print_center(CL_Display::get_width() / 2, 100,
get_message(100 * world->get_saved_pingus() /
world->get_allowed_pingus()).c_str());
*/
- snprintf(str, 128, _("Pingus saved: %3d/%3d"),
+ snprintf(str, 128, _("Pingus saved: %3d/%3d"),
world->get_pingus()->get_number_of_exited(),
world->get_pingus()->get_number_of_allowed());
font->print_center(CL_Display::get_width() / 2, 140, str);
- snprintf(str, 128, _("Pingus killed: %3d/%3d"),
- world->get_pingus()->get_number_of_allowed()
+ snprintf(str, 128, _("Pingus killed: %3d/%3d"),
+ world->get_pingus()->get_number_of_allowed()
- world->get_pingus()->get_number_of_exited(),
world->get_pingus()->get_number_of_allowed());
font->print_center(CL_Display::get_width() / 2, 160, str);
/*
- snprintf(str, 128, _("Required Time: %2d:%2d:%2d"),
+ snprintf(str, 128, _("Required Time: %2d:%2d:%2d"),
result.time / (60 * game_speed),
- result.time / game_speed % 60,
+ result.time / game_speed % 60,
(result.time * 100) / game_speed % 100);
*/
@@ -86,7 +86,7 @@
while(!CL_Mouse::left_pressed())
CL_System::keep_alive();
-
+
while(CL_Mouse::left_pressed())
CL_System::keep_alive();
}
Index: level_result.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/level_result.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- level_result.hxx 27 Sep 2002 11:26:43 -0000 1.5
+++ level_result.hxx 19 Apr 2003 10:23:17 -0000 1.6
@@ -41,7 +41,7 @@
void draw(void);
std::string get_message(int);
-
+
private:
PingusLevelResult (const PingusLevelResult&);
PingusLevelResult& operator= (const PingusLevelResult&);
Index: libxmlfwd.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/libxmlfwd.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- libxmlfwd.hxx 23 Aug 2002 15:49:49 -0000 1.3
+++ libxmlfwd.hxx 19 Apr 2003 10:23:17 -0000 1.4
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Index: loading.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/loading.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- loading.cxx 15 Apr 2003 19:06:50 -0000 1.4
+++ loading.cxx 19 Apr 2003 10:23:17 -0000 1.5
@@ -31,7 +31,7 @@
}
Loading::~Loading()
-{
+{
}
void
@@ -67,7 +67,7 @@
sur.put_screen((CL_Display::get_width() - sur.get_width())/2,
(CL_Display::get_height() - sur.get_height())/2);
- font->print_center(CL_Display::get_width() / 2,
+ font->print_center(CL_Display::get_width() / 2,
CL_Display::get_height() - 130,
str.c_str());
Index: loading.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/loading.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- loading.hxx 27 Sep 2002 11:26:43 -0000 1.5
+++ loading.hxx 19 Apr 2003 10:23:17 -0000 1.6
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -35,11 +35,11 @@
public:
Loading ();
~Loading ();
-
+
void init ();
void draw ();
void draw_progress (const std::string& str, float progress);
-
+
private:
Loading (const Loading&);
Loading& operator= (const Loading&);
Index: main_menu.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/main_menu.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- main_menu.hxx 27 Sep 2002 11:26:43 -0000 1.5
+++ main_menu.hxx 19 Apr 2003 10:23:17 -0000 1.6
@@ -28,7 +28,7 @@
public:
MainMenu ();
void start (void);
-
+
private:
MainMenu (const MainMenu&);
MainMenu& operator= (const MainMenu&);
Index: math.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/math.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- math.hxx 19 Feb 2003 17:16:59 -0000 1.7
+++ math.hxx 19 Apr 2003 10:23:17 -0000 1.8
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -25,16 +25,16 @@
/** A collection of small math helper functions, some of them might be
equal in functionality to standard STL functions, but provided
- here for portability and broken STL implementations
-
+ here for portability and broken STL implementations
+
@brief A collection of mathematical helper functions */
namespace Math {
const double pi = 3.14159265358979323846; /* pi */
const double pi_2 = 1.57079632679489661923; /* pi/2 */
-template<class T>
-T min (const T& a, const T& b)
+template<class T>
+T min (const T& a, const T& b)
{
if (a < b)
return a;
@@ -42,8 +42,8 @@
return b;
}
-template<class T>
-T max (const T& a, const T& b)
+template<class T>
+T max (const T& a, const T& b)
{
if (a > b)
return a;
@@ -51,8 +51,8 @@
return b;
}
-template<class T>
-T mid (const T& a, const T& b, const T& c)
+template<class T>
+T mid (const T& a, const T& b, const T& c)
{
return max((a), min((b), (c)));
}
Index: menu_background.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/menu_background.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- menu_background.cxx 11 Apr 2003 01:21:21 -0000 1.8
+++ menu_background.cxx 19 Apr 2003 10:23:17 -0000 1.9
@@ -34,13 +34,13 @@
{
}
-void
+void
MenuBackground::draw (GraphicContext& gc)
{
layer_manager.draw (gc);
}
-void
+void
MenuBackground::update (float delta)
{
layer_manager.update (delta);
Index: menu_background.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/menu_background.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- menu_background.hxx 24 Mar 2003 11:18:53 -0000 1.7
+++ menu_background.hxx 19 Apr 2003 10:23:17 -0000 1.8
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -34,7 +34,7 @@
void draw (GraphicContext& gc);
void update (float delta);
-
+
private:
MenuBackground (const MenuBackground&);
MenuBackground& operator= (const MenuBackground&);
Index: menu_button.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/menu_button.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- menu_button.cxx 12 Apr 2003 13:18:43 -0000 1.8
+++ menu_button.cxx 19 Apr 2003 10:23:17 -0000 1.9
@@ -56,13 +56,13 @@
{
}
-void
+void
SurfaceButton::draw (GraphicContext& gc)
{
if (mouse_over && !pressed)
{
- gc.print_center(font, CL_Display::get_width() / 2,
- CL_Display::get_height() - 20,
+ gc.print_center(font, CL_Display::get_width() / 2,
+ CL_Display::get_height() - 20,
desc.c_str());
gc.draw(surface_p, x_pos - surface_p.get_width()/2,
@@ -70,13 +70,13 @@
if (line2.empty())
{
- gc.print_center(font_large, x_pos + 32,
+ gc.print_center(font_large, x_pos + 32,
y_pos - 32 - font_large->get_height()/2,
line1.c_str());
}
else
{
- gc.print_center(font_large, x_pos + 32, y_pos - 32 -
font_large->get_height(),
+ gc.print_center(font_large, x_pos + 32, y_pos - 32 -
font_large->get_height(),
line1.c_str());
gc.print_center(font_large, x_pos + 32, y_pos - 32,
line2.c_str());
@@ -85,12 +85,12 @@
else if (mouse_over && pressed)
{
float shrink = 0.9f;
-
- gc.print_center(font, CL_Display::get_width() / 2,
- CL_Display::get_height() - 20,
+
+ gc.print_center(font, CL_Display::get_width() / 2,
+ CL_Display::get_height() - 20,
desc.c_str());
- gc.draw(surface_p,
+ gc.draw(surface_p,
static_cast<int>(x_pos - surface_p.get_width()/2 * shrink),
static_cast<int>(y_pos - surface_p.get_height()/2 * shrink),
shrink, shrink, 0);
@@ -98,22 +98,22 @@
if (line2.empty())
{
gc.print_center(font_large,
- x_pos + 32,
+ x_pos + 32,
y_pos - 32 - font_large->get_height()/2,
line1.c_str());
}
else
{
- gc.print_center(font_large,
- x_pos + 32, y_pos - 32 - font_large->get_height(),
+ gc.print_center(font_large,
+ x_pos + 32, y_pos - 32 - font_large->get_height(),
line1.c_str());
gc.print_center(font_large, x_pos + 32, y_pos - 32,
line2.c_str());
}
- }
- else
+ }
+ else
{
- gc.draw(surface_p,
+ gc.draw(surface_p,
x_pos - surface_p.get_width()/2,
y_pos - surface_p.get_height()/2);
}
@@ -122,7 +122,7 @@
void
SurfaceButton::update (float delta)
-{
+{
UNUSED_ARG(delta);
}
@@ -146,7 +146,7 @@
{
pressed = true;
}
-
+
void
SurfaceButton::on_pointer_release ()
{
@@ -176,7 +176,7 @@
// desc["en"] = "..:: Starts the level you played at last ::..";
desc = _("..:: The people who brought this game to you ::..");
//desc["de"] = "..:: Wer hat den dieses Spiel verbrochen...? ::..";
-
+
line1 = _("Credits");
//line1["de"] = "Credits";
@@ -191,7 +191,7 @@
{
}
-void
+void
CreditButton::on_click ()
{
std::cout << "Pushing credits screen" << std::endl;
@@ -211,7 +211,7 @@
desc = _("..:: Takes you to the options menu ::..");
// desc["de"] = "..:: Einstellungen und Mogeleien ::..";
-
+
line1 = _("Options");
//line1["de"] = "Einstellungen";
@@ -226,7 +226,7 @@
{
}
-void
+void
OptionsButton::on_click()
{
//option_menu.display();
@@ -239,11 +239,11 @@
QuitButton::QuitButton(PingusMenu* m)
: menu (m)
{
- // x_pos = CL_Display::get_width() * 500 / 640;
- // y_pos = CL_Display::get_height() * 320 / 480;
+ // x_pos = CL_Display::get_width() * 500 / 640;
+ // y_pos = CL_Display::get_height() * 320 / 480;
- x_pos = CL_Display::get_width() * 650 / 800;
- y_pos = CL_Display::get_height() * 370 / 600;
+ x_pos = CL_Display::get_width() * 650 / 800;
+ y_pos = CL_Display::get_height() * 370 / 600;
desc = _("..:: Bye, bye ::..");
//desc["de"] = "..:: Auf Wiedersehen ::..";
@@ -252,10 +252,10 @@
//line1["de"] = "Ausgang";
// surface = PingusResource::load_surface("Buttons/quit", "menu");
- // surface_p = PingusResource::load_surface("Buttons/quit_p", "menu");
+ // surface_p = PingusResource::load_surface("Buttons/quit_p", "menu");
// surface = PingusResource::load_surface("NewButtons/exit_off", "menu");
- surface_p = PingusResource::load_surface("menu/exit_on", "core");
+ surface_p = PingusResource::load_surface("menu/exit_on", "core");
}
QuitButton::~QuitButton()
@@ -273,7 +273,7 @@
LoadButton::LoadButton()
{
x_pos = CL_Display::get_width() * 400 / 800;
- y_pos = CL_Display::get_height() * 500 / 600;
+ y_pos = CL_Display::get_height() * 500 / 600;
//surface = PingusResource::load_surface("menu/load", "core");
surface_p = PingusResource::load_surface("menu/load_p", "core");
@@ -297,7 +297,7 @@
: menu(menu_)
{
x_pos = CL_Display::get_width() * 150 / 800;
- y_pos = CL_Display::get_height() * 370 / 600;
+ y_pos = CL_Display::get_height() * 370 / 600;
desc = _("..:: Launch the level editor ::..");
//desc["de"] = "..:: Den Level Editor starten ::..";
@@ -319,7 +319,7 @@
}
-void
+void
EditorButton::load_level (const std::string& str)
{
Editor::instance ()->load_level (str);
@@ -335,20 +335,20 @@
: menu(menu_)
{
x_pos = CL_Display::get_width() * 400 / 800;
- y_pos = CL_Display::get_height() * 370 / 600;
+ y_pos = CL_Display::get_height() * 370 / 600;
desc = _("..:: Start the game ::..");
line1 = _("Start");
- surface_p = PingusResource::load_surface("menu/play_on", "core");
+ surface_p = PingusResource::load_surface("menu/play_on", "core");
}
StoryButton::~StoryButton () {}
-void
+void
StoryButton::on_click ()
{
PingusSound::play_sound ("letsgo");
-
+
bool story_seen = false;
StatManager::instance()->get_bool("story-seen", story_seen);
@@ -365,7 +365,7 @@
ThemeButton::ThemeButton (PingusMenu* menu_)
: menu(menu_)
{
- x_pos = CL_Display::get_width() * 321 / 640;
+ x_pos = CL_Display::get_width() * 321 / 640;
y_pos = CL_Display::get_height() * 100 / 480;
desc = _("..:: Start a contrib level ::..");
@@ -378,7 +378,7 @@
ThemeButton::on_click ()
{
PingusSound::play_sound ("letsgo");
-
+
ThemeSelector theme_selector;
theme_selector.display();
}
@@ -391,16 +391,16 @@
y_pos = CL_Display::get_height() * 369 / 480;
desc = _("..:: Multiplayer Modes... experimental stuff ::..");
-
+
line1 = _("Multi");
-
+
surface_p = PingusResource::load_surface("menu/multi_on", "core");
}
-
+
MultiplayerButton::~MultiplayerButton ()
{
}
-
+
void
MultiplayerButton::on_click ()
{
Index: menu_button.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/menu_button.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- menu_button.hxx 12 Apr 2003 13:18:43 -0000 1.2
+++ menu_button.hxx 19 Apr 2003 10:23:17 -0000 1.3
@@ -35,7 +35,7 @@
CL_Surface surface_p;
CL_Font* font;
CL_Font* font_large;
-
+
int x_pos;
int y_pos;
@@ -49,7 +49,7 @@
public:
SurfaceButton();
virtual ~SurfaceButton();
-
+
void draw(GraphicContext& gc);
void update (float delta);
@@ -59,11 +59,11 @@
void on_pointer_leave ();
void on_pointer_press ();
void on_pointer_release ();
-
+
void on_primary_button_click (int x, int y) { on_click (); UNUSED_ARG(x);
UNUSED_ARG(y); }
virtual void on_click () =0;
-
+
private:
SurfaceButton (const SurfaceButton&);
SurfaceButton& operator= (const SurfaceButton&);
@@ -77,7 +77,7 @@
CreditButton(PingusMenu* menu);
virtual ~CreditButton();
void on_click();
-
+
private:
CreditButton (const CreditButton&);
CreditButton& operator= (const CreditButton&);
@@ -91,7 +91,7 @@
OptionsButton(PingusMenu* menu);
virtual ~OptionsButton();
void on_click();
-
+
private:
OptionsButton (const OptionsButton&);
OptionsButton& operator= (const OptionsButton&);
@@ -105,7 +105,7 @@
QuitButton(PingusMenu*);
virtual ~QuitButton();
void on_click();
-
+
private:
QuitButton (const QuitButton&);
QuitButton& operator= (const QuitButton&);
@@ -117,7 +117,7 @@
LoadButton();
virtual ~LoadButton();
void on_click();
-
+
private:
LoadButton (const LoadButton&);
LoadButton& operator= (const LoadButton&);
@@ -134,7 +134,7 @@
void on_click();
void load_level(const std::string& str);
-
+
private:
EditorButton (const EditorButton&);
EditorButton& operator= (const EditorButton&);
@@ -148,7 +148,7 @@
StoryButton(PingusMenu* menu);
~StoryButton();
void on_click();
-
+
private:
StoryButton (const StoryButton&);
StoryButton& operator= (const StoryButton&);
@@ -161,7 +161,7 @@
public:
ThemeButton(PingusMenu* menu);
void on_click();
-
+
private:
ThemeButton (const ThemeButton&);
ThemeButton& operator= (const ThemeButton&);
@@ -177,12 +177,12 @@
MultiplayerButton(PingusMenu* menu);
virtual ~MultiplayerButton();
void on_click();
-
+
private:
MultiplayerButton (const MultiplayerButton&);
MultiplayerButton& operator= (const MultiplayerButton&);
};
-#endif
+#endif
#endif
Index: mover.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/mover.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- mover.hxx 9 Mar 2003 20:41:30 -0000 1.2
+++ mover.hxx 19 Apr 2003 10:23:17 -0000 1.3
@@ -49,7 +49,7 @@
protected:
/** World in which the object should move */
World* const world;
-
+
/** Position of the object to move */
Vector pos;
Index: multiline_text.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/multiline_text.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- multiline_text.cxx 29 Dec 2002 23:29:00 -0000 1.6
+++ multiline_text.cxx 19 Apr 2003 10:23:17 -0000 1.7
@@ -42,24 +42,24 @@
assert(font);
- for(unsigned int j=0; j < str.length(); )
+ for(unsigned int j=0; j < str.length(); )
{
last_pos = str.length();
- for(unsigned int i=j; /* i < (text_width + j) */
+ for(unsigned int i=j; /* i < (text_width + j) */
font->get_text_width(str.substr(j, i-j).c_str()) < text_width;
++i)
{
- if (i >= str.length())
+ if (i >= str.length())
{
last_pos = str.length();
break;
- }
+ }
else if (str[i] == ' ')
{
last_pos = i;
- }
- else if (str[i] == '\n')
+ }
+ else if (str[i] == '\n')
{
last_pos = i;
break;
@@ -87,7 +87,7 @@
{
int y_inc = 0;
- for(std::vector<std::string>::iterator i = text.begin();
+ for(std::vector<std::string>::iterator i = text.begin();
i != text.end();
++i)
{
@@ -95,13 +95,13 @@
y_inc += font->get_height();
}
}
-
+
void
MultiLineText::print_right(int x_pos, int y_pos)
{
int y_inc = 0;
- for(std::vector<std::string>::iterator i = text.begin();
+ for(std::vector<std::string>::iterator i = text.begin();
i != text.end();
++i)
{
@@ -115,7 +115,7 @@
{
int y_inc = 0;
- for(std::vector<std::string>::iterator i = text.begin();
+ for(std::vector<std::string>::iterator i = text.begin();
i != text.end();
++i)
{
@@ -130,7 +130,7 @@
return width;
}
-int
+int
MultiLineText::get_height()
{
return height;
Index: multiline_text.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/multiline_text.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- multiline_text.hxx 27 Sep 2002 11:26:43 -0000 1.5
+++ multiline_text.hxx 19 Apr 2003 10:23:17 -0000 1.6
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -42,7 +42,7 @@
void print_center(int, int);
int get_width();
int get_height();
-
+
private:
MultiLineText (const MultiLineText&);
MultiLineText& operator= (const MultiLineText&);
Index: my_gettext.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/my_gettext.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- my_gettext.hxx 18 Feb 2003 18:41:59 -0000 1.4
+++ my_gettext.hxx 19 Apr 2003 10:23:17 -0000 1.5
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Index: path_manager.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/path_manager.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- path_manager.cxx 13 Apr 2003 23:33:19 -0000 1.5
+++ path_manager.cxx 19 Apr 2003 10:23:17 -0000 1.6
@@ -33,23 +33,23 @@
{
}
-void
+void
PathManager::add_path (const std::string& path)
{
pout(PINGUS_DEBUG_PATHMGR) << "PathManager: add_path: " << path << std::endl;
path_list.push_back (path);
}
-std::string
+std::string
PathManager::complete (const std::string& relative_path)
{
std::string comp_path = base_path + "/" + relative_path;
pout(PINGUS_DEBUG_PATHMGR) << "PathManager: " << relative_path << " -> " <<
comp_path << std::endl;
-
+
return comp_path;
}
-bool
+bool
PathManager::find_path (const std::list<std::string>& file_list)
{
for (PathIter i = path_list.begin (); !path_found && i != path_list.end ();
++i)
@@ -77,7 +77,7 @@
}
/** Search for a path which contains the file 'file' */
-bool
+bool
PathManager::find_path (const std::string& file)
{
for (PathIter i = path_list.begin (); !path_found && i != path_list.end ();
++i)
@@ -98,7 +98,7 @@
return false;
}
-void
+void
PathManager::set_path (const std::string& path)
{
base_path = path;
Index: path_manager.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/path_manager.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- path_manager.hxx 27 Sep 2002 11:26:43 -0000 1.5
+++ path_manager.hxx 19 Apr 2003 10:23:17 -0000 1.6
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -43,7 +43,7 @@
/** Search for a path which contains the file 'file' */
bool find_path (const std::string& file);
- /** Set the path directly without using find_path/add_path
+ /** Set the path directly without using find_path/add_path
Must include trailing slash */
void set_path (const std::string& path);
@@ -55,7 +55,7 @@
/** Complete a releative path to the absolute path, the returned
path contains a trailing slash */
std::string complete (const std::string& relative_path);
-
+
private:
PathManager (const PathManager&);
PathManager& operator= (const PathManager&);
Index: pingu.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingu.cxx,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- pingu.cxx 15 Apr 2003 19:06:50 -0000 1.41
+++ pingu.cxx 19 Apr 2003 10:23:17 -0000 1.42
@@ -77,14 +77,14 @@
Pingu::set_x (float x)
{
//std::cout << "Pingu::set_x (" << x << ")" << std::endl;
- pos_x = x;
+ pos_x = x;
}
-
+
void
Pingu::set_y (float y)
-{
+{
//std::cout << "Pingu::set_y (" << y << ")" << std::endl;
- pos_y = y;
+ pos_y = y;
}
void
@@ -123,16 +123,16 @@
ret_val = false;
}
else
- {
+ {
switch (act->get_activation_mode()) {
-
+
case INSTANT:
-
- if (act->get_type() == action->get_type())
+
+ if (act->get_type() == action->get_type())
{
pout(PINGUS_DEBUG_ACTIONS) << "Pingu: Already have action" <<
std::endl;
ret_val = false;
- }
+ }
else if (action->change_allowed(act->get_type()))
{
pout(PINGUS_DEBUG_ACTIONS) << "setting instant action" << std::endl;
@@ -145,9 +145,9 @@
ret_val = false;
}
break;
-
+
case WALL_TRIGGERED:
-
+
if (wall_action && wall_action->get_type() == act->get_type())
{
pout(PINGUS_DEBUG_ACTIONS) << "Not using wall action, we have
already" << std::endl;
@@ -160,9 +160,9 @@
ret_val = true;
}
break;
-
+
case FALL_TRIGGERED:
-
+
if (fall_action && fall_action->get_type() == act->get_type())
{
pout(PINGUS_DEBUG_ACTIONS) << "Not using fall action, we have
already" << std::endl;
@@ -177,23 +177,23 @@
break;
case COUNTDOWN_TRIGGERED:
-
+
if (countdown_action && countdown_action->get_type() == act->get_type())
{
pout(PINGUS_DEBUG_ACTIONS) << "Not using countdown action, we have
already" << std::endl;
ret_val = false;
break;
}
-
+
pout(PINGUS_DEBUG_ACTIONS) << "Setting countdown action" << std::endl;
// We set the action and start the countdown
action_time = act->activation_time();
countdown_action = act;
ret_val = true;
break;
-
+
default:
- pout(PINGUS_DEBUG_ACTIONS) << "unknown action activation_mode" <<
std::endl;
+ pout(PINGUS_DEBUG_ACTIONS) << "unknown action activation_mode" <<
std::endl;
ret_val = false;
assert(0);
break;
@@ -208,25 +208,25 @@
{
act->on_failed_apply(this);
}
-
+
return ret_val;
}
-bool
+bool
Pingu::request_set_action (ActionName action_name)
{
return request_set_action (PinguActionFactory::instance ()->create (this,
action_name));
}
void
-Pingu::set_action (ActionName action_name)
+Pingu::set_action (ActionName action_name)
{
set_action(PinguActionFactory::instance()->create(this, action_name));
}
// Sets an action without any checking
void
-Pingu::set_action (PinguAction* act)
+Pingu::set_action (PinguAction* act)
{
assert(act);
@@ -243,7 +243,7 @@
set_action(fall_action);
return true;
}
-
+
return false;
}
@@ -287,7 +287,7 @@
assert (x1 < x2);
assert (y1 < y2);
- return (pos_x > x1 && pos_x < x2
+ return (pos_x > x1 && pos_x < x2
&&
pos_y > y1 && pos_y < y2);
}
@@ -297,7 +297,7 @@
Pingu::dist (int x, int y)
{
Vector p = get_center_pos ();
-
+
return sqrt(((p.x - x) * (p.x - x) + (p.y - y) * (p.y - y)));
}
@@ -311,7 +311,7 @@
// FIXME: Out of screen check is ugly
/** The Pingu has hit the edge of the screen, a good time to let him
die. */
- if (rel_getpixel(0, -1) == Groundtype::GP_OUTOFSCREEN)
+ if (rel_getpixel(0, -1) == Groundtype::GP_OUTOFSCREEN)
{
PingusSound::play_sound("die");
status = PS_DEAD;
@@ -319,18 +319,18 @@
}
// if an countdown action is set, update the countdown time
- if (action_time > -1)
+ if (action_time > -1)
--action_time;
- if (action_time == 0 && countdown_action)
+ if (action_time == 0 && countdown_action)
{
set_action(countdown_action);
- // Reset the countdown action handlers
+ // Reset the countdown action handlers
countdown_action = 0;
action_time = -1;
return;
}
-
+
action->update();
}
@@ -341,16 +341,16 @@
char str[16];
action->draw (gc);
-
- if (action_time != -1)
+
+ if (action_time != -1)
{
// FIXME: some people preffer a 5-0 or a 9-0 countdown, not sure
// FIXME: about that got used to the 50-0 countdown [counting is
// FIXME: in ticks, should probally be in seconds]
snprintf(str, 16, "%d", action_time/3);
-
- gc.print_center(Fonts::lcd,
- static_cast<int>(pos_x), static_cast<int>(pos_y - 45) +
2,
+
+ gc.print_center(Fonts::lcd,
+ static_cast<int>(pos_x), static_cast<int>(pos_y - 45) + 2,
str);
}
}
@@ -358,7 +358,7 @@
int
Pingu::rel_getpixel (int x, int y)
{
- return WorldObj::get_world()->get_colmap()->getpixel(static_cast<int>(pos_x
+ (x * direction)),
+ return WorldObj::get_world()->get_colmap()->getpixel(static_cast<int>(pos_x
+ (x * direction)),
static_cast<int>(pos_y
- y));
}
@@ -373,7 +373,7 @@
{
if (status == PS_DEAD || status == PS_EXITED)
return false;
-
+
return action->need_catch();
}
@@ -407,7 +407,7 @@
*velocity += arg_v;
// Moving the pingu on pixel up, so that the force can take effect
// FIXME: this should be handled by a state-machine
- --pos_y;
+ --pos_y;
}
Vector
@@ -419,16 +419,16 @@
Vector
Pingu::get_center_pos () const
{
- return Vector(pos_x, pos_y) + Vector (0, -16);
+ return Vector(pos_x, pos_y) + Vector (0, -16);
}
-int
+int
Pingu::get_owner ()
{
return owner_id;
}
-bool
+bool
Pingu::catchable ()
{
return action->catchable ();
Index: pingu.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingu.hxx,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- pingu.hxx 3 Nov 2002 13:29:09 -0000 1.24
+++ pingu.hxx 19 Apr 2003 10:23:17 -0000 1.25
@@ -37,7 +37,7 @@
private:
/** The primary action with is currently in use */
PinguAction* action;
-
+
/** A secondary action which will turn active after a given amount of time
The only example is currently the bomber. */
PinguAction* countdown_action;
@@ -62,11 +62,11 @@
/// The stat of the pingu, these can be modified by PinguActions
PinguStatus status;
-
+
float pos_x;
float pos_y;
-
- Vector* const velocity;
+
+ Vector* const velocity;
bool request_set_action (PinguAction*);
void set_action (PinguAction*);
@@ -81,10 +81,10 @@
@param pos The start position of the pingu
@param owner The owner id of the pingu (used for multiplayer) */
Pingu (int arg_id, const Vector& pos, int owner);
-
+
/** Destruct the pingu... */
~Pingu ();
-
+
/** Return the logical pingus position, this is the position which
is used for collision detection to the ground (the pingus
feet) */
@@ -110,7 +110,7 @@
bool is_alive (void);
/// Return the status of the pingu
- PinguStatus get_status (void) const;
+ PinguStatus get_status (void) const;
PinguStatus set_status (PinguStatus);
@@ -120,22 +120,22 @@
std::string get_name();
/// Returns the unique id of the pingu
- unsigned int get_id (void);
-
+ unsigned int get_id (void);
+
/// Set the pingu to the given coordinates
void set_pos (float x, float y);
void set_x (float x);
-
+
void set_y (float y);
/// Set the pingu to the given coordinates
void set_pos (const Vector& arg_pos);
const Vector& get_velocity () const { return *velocity; }
-
+
void set_velocity (const Vector& velocity_);
-
+
// Set the pingu in the gives direction
void set_direction (Direction d);
@@ -148,19 +148,19 @@
/** Set an action without any checking, the action will take
instantly control. */
void set_action (Actions::ActionName action_name);
-
+
/// set the wall action if we have one
bool request_wall_action ();
-
+
/// set the fall action if we have one
bool request_fall_action ();
PinguAction* get_wall_action () { return wall_action; }
-
+
PinguAction* get_fall_action () { return fall_action; }
- /** Returns the `color' of the colmap in the walking direction
- Examples:
+ /** Returns the `color' of the colmap in the walking direction
+ Examples:
(0, -1) is the pixel under the pingu
(1, 0) is the pixel in front of the pingu
*/
@@ -173,15 +173,15 @@
/** Returns true if the pingu needs to catch another pingu */
bool need_catch ();
-
+
void draw (GraphicContext& gc);
void apply_force (Vector);
-
+
void update();
-
+
/** Indicate if the pingu's speed is above the deadly velocity */
//bool is_tumbling () const;
-
+
float get_z_pos () const { return 0; }
/** @return The owner_id of the owner, only used in multiplayer
@@ -211,7 +211,7 @@
private:
Pingu (const Pingu&);
- Pingu& operator= (const Pingu&);
+ Pingu& operator= (const Pingu&);
};
#endif /* PINGU_HH */
Index: pingu_action.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingu_action.cxx,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- pingu_action.cxx 18 Apr 2003 17:08:56 -0000 1.24
+++ pingu_action.cxx 19 Apr 2003 10:23:17 -0000 1.25
@@ -35,12 +35,12 @@
{
}
-// Checks if the pingu action needs to catch another pingu (needed for
+// Checks if the pingu action needs to catch another pingu (needed for
// example by the blocker)
-bool
-PinguAction::need_catch ()
-{
- return false;
+bool
+PinguAction::need_catch ()
+{
+ return false;
}
// Wrapper around the colmap, to get the pixels infront of the pingu,
@@ -154,7 +154,7 @@
}
}
#else // Old Code
-
+
// FIXME: What does this variable do?
Vector resultant_force = pingu->get_velocity();
@@ -189,7 +189,7 @@
Vector force_counter = resultant_force;
// Keep moving the Pingu until there is only a fraction left
- while ( force_counter.x <= -1
+ while ( force_counter.x <= -1
|| force_counter.x >= 1
|| force_counter.y <= -1
|| force_counter.y >= 1)
Index: pingu_action.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingu_action.hxx,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- pingu_action.hxx 18 Apr 2003 17:08:56 -0000 1.26
+++ pingu_action.hxx 19 Apr 2003 10:23:17 -0000 1.27
@@ -34,7 +34,7 @@
COUNTDOWN_TRIGGERED
};
-/** This class provides an abstract interface for pingu actions. It is
+/** This class provides an abstract interface for pingu actions. It is
used to inherit classes which represent the actions. The actions
are stored in a seperate library, have a look in actions/ for some
examples. */
@@ -62,7 +62,7 @@
/** Checks if this action allows to be overwritten with the given new action
*/
virtual bool change_allowed (Actions::ActionName) { return true; }
-
+
/// The "AI" of the pingu.
virtual void update () = 0;
@@ -75,10 +75,10 @@
/** The name of the action, this is used in the CaputreRectangle, so
it can contain more than just the name */
virtual std::string get_name () const;
-
+
/// The type of the action
virtual Actions::ActionName get_type () const =0;
-
+
/** Return the character that is shown when a persitent action is
activated in the CaptureRectangle. */
virtual char get_persistent_char ();
@@ -99,16 +99,16 @@
/// True if Pingu in specified position would bang its head if it were
walking
bool head_collision_on_walk (int x, int y);
-
+
/// True if Pingu in specified position would have a collision if it were
walking
bool collision_on_walk (int x, int y);
-
+
/** Called if the action was successfully applied via request_set_action */
virtual void on_successfull_apply () { }
/** Called if the request_set_action failded to apply this action */
virtual void on_failed_apply (Pingu*) { }
-
+
/** Move Pingu according to the forces applied to it */
void move_with_forces ();
Index: pingu_action_factory.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingu_action_factory.cxx,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- pingu_action_factory.cxx 25 Mar 2003 00:37:44 -0000 1.14
+++ pingu_action_factory.cxx 19 Apr 2003 10:23:17 -0000 1.15
@@ -68,7 +68,7 @@
factories.clear();
}
-PinguActionFactory*
+PinguActionFactory*
PinguActionFactory::instance ()
{
if ( ! instance_)
@@ -91,7 +91,7 @@
delete instance_;
}
-void
+void
PinguActionFactory::register_core_actions ()
{
new PinguActionFactoryImpl<class Angel> (Angel);
@@ -119,28 +119,28 @@
new PinguActionFactoryImpl<class Walker> (Walker);
}
-PinguAction*
+PinguAction*
PinguActionFactory::create (Pingu* pingu, ActionName id)
{
//std::cout << "PinguActionFactory: number of actions: " <<
all_actions.size() << std::endl;
std::map<ActionName, PinguActionAbstractFactory*>::iterator it =
factories.find(id);
-
+
if (it == factories.end())
PingusError::raise("PinguActionFactory: Invalid id: " + id);
- else
+ else
{
PinguAction* action = it->second->create (pingu);
all_actions.push_back (action);
return action;
}
-
+
return 0; // never reached
}
void
PinguActionFactory::delete_actions ()
{
- //std::cout << "PinguActionFactory::delete_actions (): Deleting all Actions:
"
+ //std::cout << "PinguActionFactory::delete_actions (): Deleting all Actions:
"
//<< all_actions.size() << std::endl;
for (std::vector<PinguAction*>::iterator i = all_actions.begin ();
i != all_actions.end (); ++i)
@@ -151,7 +151,7 @@
//std::cout << "PinguActionFactory::delete_actions (): Deleting all Actions:
done" << std::endl;
}
-void
+void
PinguActionFactory::register_factory (ActionName id,
PinguActionAbstractFactory* factory)
{
// FIXME: Could need some more error checking
Index: pingu_action_factory.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingu_action_factory.hxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- pingu_action_factory.hxx 19 Feb 2003 11:33:00 -0000 1.11
+++ pingu_action_factory.hxx 19 Apr 2003 10:23:17 -0000 1.12
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -35,11 +35,11 @@
std::map<Actions::ActionName, PinguActionAbstractFactory*> factories;
static PinguActionFactory* instance_;
-
+
PinguActionFactory ();
~PinguActionFactory ();
void register_core_actions ();
-
+
public:
static PinguActionFactory* instance ();
static void init();
@@ -55,7 +55,7 @@
/** Allocate the given action */
PinguAction* create (Pingu* p, Actions::ActionName id);
-
+
private:
PinguActionFactory (const PinguActionFactory&);
PinguActionFactory& operator= (const PinguActionFactory&);
@@ -67,9 +67,9 @@
PinguActionAbstractFactory (Actions::ActionName id) {
PinguActionFactory::instance ()-> register_factory (id, this);
}
-
+
virtual PinguAction* create (Pingu* p) =0;
-
+
private:
PinguActionAbstractFactory (const PinguActionAbstractFactory&);
PinguActionAbstractFactory& operator= (const PinguActionAbstractFactory&);
@@ -87,7 +87,7 @@
PinguAction* create (Pingu* p) {
return new T (p);
}
-
+
private:
PinguActionFactoryImpl (const PinguActionFactoryImpl&);
PinguActionFactoryImpl& operator= (const PinguActionFactoryImpl&);
Index: pingu_enums.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingu_enums.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- pingu_enums.cxx 18 Apr 2003 17:08:56 -0000 1.6
+++ pingu_enums.cxx 19 Apr 2003 10:23:17 -0000 1.7
@@ -29,7 +29,7 @@
std::string action_to_screenname (ActionName action)
{
- switch (action)
+ switch (action)
{
case Angel : return _("Angel");
case Basher : return _("Basher");
@@ -60,7 +60,7 @@
std::string action_to_string (ActionName action)
{
- switch (action)
+ switch (action)
{
case Angel : return "angel";
case Basher : return "basher";
@@ -89,7 +89,7 @@
}
}
-ActionName action_from_string(const std::string& action)
+ActionName action_from_string(const std::string& action)
{
if (action == "angel") return Angel;
if (action == "basher") return Basher;
Index: pingu_holder.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingu_holder.cxx,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- pingu_holder.cxx 18 Apr 2003 12:48:50 -0000 1.20
+++ pingu_holder.cxx 19 Apr 2003 10:23:17 -0000 1.21
@@ -64,14 +64,14 @@
PinguHolder::draw (GraphicContext& gc)
{
// Draw all walkers
- for(std::list<Pingu*>::iterator pingu = pingus.begin();
- pingu != pingus.end();
+ for(std::list<Pingu*>::iterator pingu = pingus.begin();
+ pingu != pingus.end();
++pingu)
{
- if ((*pingu)->get_action() == Actions::Walker)
+ if ((*pingu)->get_action() == Actions::Walker)
(*pingu)->draw (gc);
}
-
+
// Draw all non-walkers, so that they are easier spotable
// FIXME: This might be usefull, but looks kind of ugly in the game
@@ -79,8 +79,8 @@
// FIMME: uglyness. Either we rip this code out again or fix the
// FIXME: bridger so that it looks higher and better with walkers
// FIXME: behind him.
- for(std::list<Pingu*>::iterator pingu = pingus.begin();
- pingu != pingus.end();
+ for(std::list<Pingu*>::iterator pingu = pingus.begin();
+ pingu != pingus.end();
++pingu)
{
if ((*pingu)->get_action() != Actions::Walker)
@@ -92,11 +92,11 @@
PinguHolder::update()
{
PinguIter pingu = pingus.begin();
-
+
while(pingu != pingus.end())
{
(*pingu)->update();
-
+
// FIXME: The draw-loop is not the place for things like this,
// this belongs in the update loop
if ((*pingu)->get_status() == PS_DEAD)
@@ -106,12 +106,12 @@
// keep track of the allocated Pingus
pingu = pingus.erase(pingu);
}
- else if ((*pingu)->get_status() == PS_EXITED)
+ else if ((*pingu)->get_status() == PS_EXITED)
{
number_of_exited += 1;
pingu = pingus.erase(pingu);
}
- else
+ else
{
// move to the next Pingu
++pingu;
Index: pingu_holder.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingu_holder.hxx,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- pingu_holder.hxx 8 Oct 2002 00:09:55 -0000 1.14
+++ pingu_holder.hxx 19 Apr 2003 10:23:17 -0000 1.15
@@ -50,13 +50,13 @@
/** A list holding all Pingus, the PinguHolder itself has only the
active (not dead) ones */
std::list<Pingu*> pingus;
-
+
public:
PinguHolder(PLF*);
~PinguHolder();
- /address@hidden
- @name overloaded stuff for WorldObj
+ /address@hidden
+ @name overloaded stuff for WorldObj
*/
void draw (GraphicContext& gc);
@@ -64,7 +64,7 @@
PinguAction::update()) */
void update();
- /** The z-pos at which the pingus gets draw.
+ /** The z-pos at which the pingus gets draw.
@return 50 */
float get_z_pos() const;
/address@hidden/
@@ -84,7 +84,7 @@
/** @return the total number of pingus released, this is alive +
killed + exited */
int get_number_of_released();
-
+
/** @return the maximal number of pingus that will get released in
this level */
int get_number_of_allowed();
@@ -97,7 +97,7 @@
/** Get a pingu by id, references to dead or exited Pingus are not
returned, but 0 instead
-
+
@return the pingu with the id, or 0 if none found or pingu is
dead or exited */
Pingu* get_pingu(unsigned int id);
@@ -109,7 +109,7 @@
std::list<Pingu*>::iterator begin () { return pingus.begin (); }
std::list<Pingu*>::iterator end () { return pingus.end (); }
std::list<Pingu*>::size_type size () { return pingus.size (); }
-
+
private:
PinguHolder (const PinguHolder&);
PinguHolder& operator= (const PinguHolder&);
Index: pingu_map.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingu_map.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- pingu_map.cxx 29 Dec 2002 23:29:00 -0000 1.6
+++ pingu_map.cxx 19 Apr 2003 10:23:17 -0000 1.7
@@ -29,7 +29,7 @@
//std::cout << "PinguMap:~PinguMap()" << std::endl;
}
-void
+void
PinguMap::mark_dirty(int x,int y,int w,int h)
{
UNUSED_ARG(x);
@@ -55,13 +55,13 @@
void
PinguMap::remove(CL_SurfaceProvider*, int, int)
{
-
+
}
-void
+void
PinguMap::put(CL_SurfaceProvider*, int, int)
{
-
+
}
void
Index: pingu_map.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingu_map.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- pingu_map.hxx 27 Sep 2002 11:26:44 -0000 1.5
+++ pingu_map.hxx 19 Apr 2003 10:23:17 -0000 1.6
@@ -41,17 +41,17 @@
virtual void mark_dirty(int,int,int,int);
virtual ColMap *get_colmap();
-
+
virtual int get_width() = 0;
virtual int get_height() = 0;
-
+
virtual void remove(int, int) {};
virtual void remove(CL_SurfaceProvider*, int, int);
virtual void remove(const CL_Surface&, int, int);
-
+
virtual void put(const CL_Surface&, int, int);
virtual void put(CL_SurfaceProvider*, int, int);
-
+
private:
PinguMap (const PinguMap&);
PinguMap& operator= (const PinguMap&);
Index: pingus.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingus.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- pingus.hxx 28 Nov 2002 17:42:14 -0000 1.6
+++ pingus.hxx 19 Apr 2003 10:23:17 -0000 1.7
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Index: pingus_counter.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingus_counter.cxx,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- pingus_counter.cxx 19 Feb 2003 10:37:31 -0000 1.13
+++ pingus_counter.cxx 19 Apr 2003 10:23:17 -0000 1.14
@@ -36,16 +36,16 @@
font = PingusResource::load_font("Fonts/pingus_small_fix_num","fonts");
}
-void
+void
PingusCounter::draw(GraphicContext& gc)
{
char str[128];
if (!fast_mode)
background.put_screen (CL_Display::get_width ()/2 -
background.get_width()/2, 0);
-
+
World* world = server->get_world();
-
+
snprintf(str, 128, _("Released:%3d/%-3d Out:%3d Saved:%3d/%-3d"),
world->get_pingus()->get_number_of_released(),
world->get_pingus()->get_number_of_allowed(),
Index: pingus_counter_bar.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingus_counter_bar.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- pingus_counter_bar.cxx 29 Dec 2002 23:29:00 -0000 1.5
+++ pingus_counter_bar.cxx 19 Apr 2003 10:23:17 -0000 1.6
@@ -27,23 +27,23 @@
: server (s),
orientation (o),
rect (arg_rect.x1 + 2, arg_rect.y1 + 2, arg_rect.x2 - 2, arg_rect.y2 - 2)
-{
+{
}
PingusCounterBar::~PingusCounterBar ()
{
}
-void
+void
PingusCounterBar::update(float /*delta*/)
-{
+{
}
void
PingusCounterBar::draw ()
{
int length = rect.y2 - rect.y1;
-
+
int complete = server->get_world
()->get_pingus()->get_number_of_allowed();
int current_out = server->get_world
()->get_pingus()->get_number_of_released();
int current_saved = server->get_world
()->get_pingus()->get_number_of_exited();
Index: pingus_counter_bar.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingus_counter_bar.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- pingus_counter_bar.hxx 27 Sep 2002 11:26:44 -0000 1.4
+++ pingus_counter_bar.hxx 19 Apr 2003 10:23:17 -0000 1.5
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -39,7 +39,7 @@
void update(float delta);
void draw ();
-
+
private:
PingusCounterBar (const PingusCounterBar&);
PingusCounterBar& operator= (const PingusCounterBar&);
Index: pingus_error.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingus_error.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- pingus_error.cxx 8 Apr 2003 19:56:40 -0000 1.8
+++ pingus_error.cxx 19 Apr 2003 10:23:17 -0000 1.9
@@ -37,7 +37,7 @@
{
if (this != &old)
message = old.message;
-
+
return *this;
}
@@ -55,9 +55,9 @@
{
if (this == &old)
return *this;
-
+
PingusException::operator=(old);
-
+
return *this;
}
@@ -86,9 +86,9 @@
{
if (this == &old)
return *this;
-
+
PingusException::operator=(old);
-
+
return *this;
}
Index: pingus_error.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingus_error.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- pingus_error.hxx 27 Sep 2002 11:26:44 -0000 1.7
+++ pingus_error.hxx 19 Apr 2003 10:23:17 -0000 1.8
@@ -23,15 +23,15 @@
#include "pingus.hxx"
#include <string>
-class PingusException
+class PingusException
{
protected:
- std::string message;
+ std::string message;
public:
PingusException (const std::string& mes);
virtual ~PingusException ();
virtual const std::string& get_message () const =0;
-
+
protected:
PingusException (const PingusException& old);
PingusException& operator= (const PingusException& old);
@@ -40,7 +40,7 @@
/** PingusBug gets thrown on events which are a bug in Pingus, this
can be unsupported object types or things that must not happen
when the thing is properly working. */
-class PingusBug : public PingusException
+class PingusBug : public PingusException
{
protected:
PingusBug (const std::string& mes);
@@ -49,7 +49,7 @@
public:
virtual const std::string& get_message () const;
-
+
static void raise (const std::string& msg);
};
@@ -65,7 +65,7 @@
public:
virtual const std::string& get_message () const;
-
+
static void raise (const std::string& msg);
};
Index: pingus_main.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingus_main.cxx,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -d -r1.86 -r1.87
--- pingus_main.cxx 16 Apr 2003 18:02:27 -0000 1.86
+++ pingus_main.cxx 19 Apr 2003 10:23:17 -0000 1.87
@@ -1,14 +1,14 @@
// $Id$
// ___
// | _\ A Free Lemmings[tm] Clone
-// | /_ _ _ ___ _ _ ___
+// | /_ _ _ ___ _ _ ___
// | || || \ || _ || |_| ||_ -'
// |__||_||_\_||_ ||_____||___|
// _| |
// |___|
//
// Copyright (C) 1998 Ingo Ruhnke <address@hidden>
-//
+//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
@@ -134,7 +134,7 @@
{
}
-char*
+char*
PingusMain::get_title()
{
#ifdef OFFICIAL_PINGUS_BUILD
@@ -165,8 +165,8 @@
}
// Checking for all options, which needs to be known *before* the
-// config file is read.
-void
+// config file is read.
+void
PingusMain::quick_check_args(int argc, char** argv)
{
no_config_file = false;
@@ -181,13 +181,13 @@
// check_ars() checks the command line for options and set the
// corresponding global variables to the set values.
-void
+void
PingusMain::check_args(int argc, char** argv)
{
#ifdef WIN32
cursor_enabled = true;
#endif
- int c = 0;
+ int c = 0;
int option_index = 0;
optind = 0;
@@ -232,11 +232,11 @@
// FIXME: is the number stuff correct?
{"fast", no_argument, 0, 132},
{"fast-mode", no_argument, 0, 132},
- {"disable-previews",no_argument, 0, 133},
+ {"disable-previews",no_argument, 0, 133},
{"maintainer-mode", no_argument, 0, 134},
{"disable-auto-scrolling", no_argument, 0, 137},
- //
+ //
{"no-cfg-file", no_argument, 0, 142},
{"tile-size", required_argument, 0, 144},
{"config-file", required_argument, 0, 147},
@@ -246,7 +246,7 @@
while(true) {
c = getopt_long(argc, argv, "r:p:smv:d:l:hVp:bxS:g:it:cqefFG",
long_options, &option_index);
-
+
if (c == -1 || c == 1)
break;
@@ -297,7 +297,7 @@
char c;
if (sscanf(optarg, "%d%c%d", &screen_width, &c, &screen_height) != 3
&& c != 'x')
{
- std::cout << "Resolution std::string is wrong, it should be like:
\n"
+ std::cout << "Resolution std::string is wrong, it should be like:
\n"
<< "\"640x480\" or \"800x600\"" << std::endl;
exit(EXIT_FAILURE);
}
@@ -310,17 +310,17 @@
case 'S':
std::cout << "not impl. XALA" << std::endl;
//pingus_soundfile = optarg;
- //if (verbose)
+ //if (verbose)
//std::cout << "check_args: Sound File = " << pingus_soundfile <<
std::endl;
break;
case 'm': // -m, --disable-music
music_enabled = false;
break;
case 'd': // -d, --datadir
- if (optarg)
+ if (optarg)
{
path_manager.add_path(optarg);
-
+
if (verbose)
std::cout << "check_args: Pingus Data Dir = "
<< optarg << std::endl;
@@ -331,12 +331,12 @@
}
break;
case 'V':
- std::cout << "Pingus Version " << VERSION
+ std::cout << "Pingus Version " << VERSION
#ifndef OFFICIAL_PINGUS_BUILD
<< " (unofficial build)"
#endif
<< std::endl;
-
+
std::cout << "\n"
"Copyright (C) 2003 Ingo Ruhnke <address@hidden>\n"
"There is NO warranty. You may redistribute this software\n"
@@ -362,7 +362,7 @@
case 'f': // --fullscreen
fullscreen_enabled = true;
break;
-
+
case 'w': // --window
fullscreen_enabled = false;
break;
@@ -374,7 +374,7 @@
case 134: // --maintainer_mode
std::cout << "---------------------------------" << std::endl
<< "--- Maintainer Mode activated ---" << std::endl
- << "---------------------------------" << std::endl;
+ << "---------------------------------" << std::endl;
maintainer_mode = true;
break;
@@ -388,7 +388,7 @@
case 144:
sscanf(optarg, "%d", &tile_size);
break;
-
+
case 145:
swcursor_enabled = false;
break;
@@ -400,7 +400,7 @@
case 147:
config_file = optarg;
break;
-
+
case 152:
if (strcmp (optarg, "all") == 0)
{
@@ -486,7 +486,7 @@
default:
if (verbose) std::cout << _("Unknow char: ") << c << std::endl <<
std::endl;
std::cout << _("Usage: ") << argv[0] << _(" [OPTIONS]... [LEVELFILE]")
<< std::endl;
- std::cout
+ std::cout
<< "\n"
<< _("Options:")
<< "\n -g, --geometry {width}x{height}"
@@ -549,7 +549,7 @@
}
// Treating non option arguments
- for(int i = optind; i < argc; ++i)
+ for(int i = optind; i < argc; ++i)
{
if (levelfile.empty()) {
levelfile = argv[i];
@@ -592,7 +592,7 @@
path_manager.add_path("share/pingus/"); // started from base directory of
the binary
path_manager.add_path("../share/pingus/"); // started from base directory
of the binary
path_manager.add_path(PINGUS_DATADIR); // started from $PATH
-
+
// somebody created a symlink in /usr/bin/ or so to the real binary elsewhere
if (System::is_symlink(executable_name))
{
@@ -665,7 +665,7 @@
path_manager.set_path("data");
path_manager.set_path(".");
#endif /* !WIN32 */
-
+
#ifdef HAVE_GETTEXT
if (maintainer_mode)
std::cout << "Setting gettext path to: " << path_manager.get_base_path ()
+ "/../../locale" << std::endl;
@@ -690,7 +690,7 @@
// setlocate(LC_CTYPE,"") causes all sorts of throuble
bind_textdomain_codeset(PACKAGE, "ISO-8859-1");
-#endif
+#endif
if (maintainer_mode)
std::cout << "BasePath: " << path_manager.get_base_path () << std::endl;
}
@@ -707,7 +707,7 @@
for (unsigned int i = 0; i < greeting.length(); ++i)
std::cout.put('=');
std::cout << std::endl;
-
+
#ifdef HAVE_LIBCLANVORBIS
std::cout << _("clanVorbis support: ok") << std::endl;
#else
@@ -758,7 +758,7 @@
// Register the global event catcher
on_button_press_slot = CL_Input::sig_button_press ().connect (&global_event,
&GlobalEvent::on_button_press);
on_button_release_slot = CL_Input::sig_button_release ().connect
(&global_event, &GlobalEvent::on_button_release);
-
+
// Set the root screen
if (show_input_debug_screen) // show a debug screen
{
@@ -786,12 +786,12 @@
if (successfull)
{
- if (start_editor)
+ if (start_editor)
{
Editor::instance ()->load_level (levelfile);
levelfile = "";
ScreenManager::instance()->push_screen(Editor::instance (),
false);
- }
+ }
else
{
/*ScreenManager::instance()->push_screen
@@ -800,10 +800,10 @@
(new StartScreen(PLFResMgr::load_plf_from_filename(levelfile)),
true);
}
- }
+ }
}
else if (start_editor) // Start an empty editor workspace
- {
+ {
ScreenManager::instance()->push_screen(Editor::instance (), false);
}
else if (!demo_file.empty()) // start a demo
@@ -827,7 +827,7 @@
ScreenManager::instance ()->display ();
if (maintainer_mode)
std::cout << "PingusMain::quit game and screen_manager" << std::endl;
-
+
// unregister the global event catcher
CL_Input::sig_button_press ().disconnect (on_button_press_slot);
CL_Input::sig_button_release ().disconnect(on_button_release_slot);
@@ -837,7 +837,7 @@
PingusMain::main(int argc, char** argv)
{
executable_name = argv[0];
-
+
// Register the segfault_handler
#ifndef WIN32
signal(SIGSEGV, signal_handler);
@@ -856,7 +856,7 @@
perr.add (std::cout);
perr.add (console);
- try
+ try
{
quick_check_args(argc, argv);
read_rc_file();
@@ -867,22 +867,22 @@
print_greeting_message();
init_clanlib();
- init_pingus();
+ init_pingus();
// Avoid uglyness on window opening
CL_Display::clear_display();
CL_Display::flip_display();
start_game();
-
+
deinit_pingus();
deinit_clanlib();
}
-
+
catch (const CL_Error& err) {
std::cout << _("Error caught from ClanLib: ") << err.message << std::endl;
}
-
+
catch (const PingusError& err) {
std::cout << _("Error caught from Pingus: ") << err.get_message () <<
std::endl;
}
@@ -922,19 +922,19 @@
on_exit_press_slot = CL_System::sig_quit().connect(this,
&PingusMain::on_exit_press);
- if (verbose)
+ if (verbose)
{
- std::cout << "Using resolution: "
+ std::cout << "Using resolution: "
<< screen_width << "x" << screen_height << std::endl;
}
// Initing the display
- CL_Display::set_videomode(screen_width, screen_height, 16,
- fullscreen_enabled,
+ CL_Display::set_videomode(screen_width, screen_height, 16,
+ fullscreen_enabled,
false); // allow resize
CL_Display::clear_display();
CL_Display::flip_display();
-
+
#ifdef HAVE_LIBCLANGL
if (use_opengl)
{
@@ -957,7 +957,7 @@
CL_SetupDisplay::deinit();
#ifdef HAVE_LIBCLANGL
if (use_opengl)
- CL_SetupGL::deinit();
+ CL_SetupGL::deinit();
#endif
CL_SetupGUI::deinit ();
CL_SetupPNG::deinit();
@@ -970,7 +970,7 @@
{
SavegameManager::instance();
StatManager::init();
-
+
Fonts::init();
Story::init();
ScreenManager::init();
@@ -978,7 +978,7 @@
PingusResource::init();
XMLhelper::init();
PinguActionFactory::init();
- Editor::init();
+ Editor::init();
Credits::init();
fps_counter.init();
@@ -1000,6 +1000,6 @@
PingusSound::deinit();
ScreenManager::deinit();
StatManager::deinit();
-}
+}
/* EOF */
Index: pingus_main.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingus_main.hxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- pingus_main.hxx 9 Apr 2003 23:35:28 -0000 1.11
+++ pingus_main.hxx 19 Apr 2003 10:23:17 -0000 1.12
@@ -69,7 +69,7 @@
void init_pingus();
void init_path_finder();
void deinit_pingus();
-
+
PingusMain (const PingusMain&);
PingusMain& operator= (const PingusMain&);
Index: pingus_map_manager.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingus_map_manager.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- pingus_map_manager.cxx 23 Aug 2002 15:49:50 -0000 1.2
+++ pingus_map_manager.cxx 19 Apr 2003 10:23:17 -0000 1.3
@@ -23,14 +23,14 @@
std::string PingusMapManager::directory;
-CL_Surface
+CL_Surface
PingusMapManager::get_surface (const std::string& level_filename)
{
UNUSED_ARG(level_filename);
return CL_Surface ();
}
-void
+void
PingusMapManager::set_surface (const std::string& level_filename, const
CL_Surface& surf)
{
CL_SurfaceProvider* provider = surf.get_provider ();
@@ -40,9 +40,9 @@
provider->lock ();
//provider->get_data ();
-
+
provider->unlock ();
-
+
UNUSED_ARG(level_filename);
}
Index: pingus_map_manager.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingus_map_manager.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- pingus_map_manager.hxx 27 Sep 2002 11:26:44 -0000 1.5
+++ pingus_map_manager.hxx 19 Apr 2003 10:23:17 -0000 1.6
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -30,11 +30,11 @@
{
private:
static std::string directory;
-
+
public:
static CL_Surface get_surface (const std::string& level_filename);
static void set_surface (const std::string& level_filename, const
CL_Surface&);
-
+
private:
PingusMapManager (const PingusMapManager&);
PingusMapManager& operator= (const PingusMapManager&);
Index: pingus_menu.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingus_menu.cxx,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- pingus_menu.cxx 10 Apr 2003 16:01:02 -0000 1.19
+++ pingus_menu.cxx 19 Apr 2003 10:23:17 -0000 1.20
@@ -75,23 +75,23 @@
{
if (gc.get_height() == 480)
{
- gc.draw(background,
- (gc.get_width()/2) - (background.get_width()/2),
+ gc.draw(background,
+ (gc.get_width()/2) - (background.get_width()/2),
20);
}
else
{
- gc.draw(background, (gc.get_width()/2) - (background.get_width()/2),
+ gc.draw(background, (gc.get_width()/2) - (background.get_width()/2),
CL_Display::get_height()/10);
}
#ifdef OFFICIAL_PINGUS_BUILD
- gc.print_left(Fonts::pingus_small, 20, CL_Display::get_height()-100,
+ gc.print_left(Fonts::pingus_small, 20, CL_Display::get_height()-100,
"Pingus version "VERSION", Copyright (C) 2003 Ingo Ruhnke
<address@hidden>\n");
#else
- gc.print_left(Fonts::pingus_small, 20, CL_Display::get_height()-100,
+ gc.print_left(Fonts::pingus_small, 20, CL_Display::get_height()-100,
"Pingus version "VERSION" (unofficial build), Copyright (C)
2003 Ingo Ruhnke <address@hidden>\n");
#endif
- gc.print_left(Fonts::pingus_small, 20, CL_Display::get_height()-70,
+ gc.print_left(Fonts::pingus_small, 20, CL_Display::get_height()-70,
"Pingus comes with ABSOLUTELY NO WARRANTY. This is free
software, and you are welcome\n"
"to redistribute it under certain conditions; see the file
COPYING for details.\n");
}
Index: pingus_menu.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingus_menu.hxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- pingus_menu.hxx 27 Mar 2003 15:57:22 -0000 1.10
+++ pingus_menu.hxx 19 Apr 2003 10:23:17 -0000 1.11
@@ -49,7 +49,7 @@
CL_Surface background;
LayerManager layer_manager;
CL_Surface cursor_sur;
-
+
void on_resize (int w, int h);
public:
PingusMenu (PingusMenuManager* m);
Index: pingus_menu_manager.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingus_menu_manager.cxx,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- pingus_menu_manager.cxx 11 Apr 2003 14:30:05 -0000 1.25
+++ pingus_menu_manager.cxx 19 Apr 2003 10:23:17 -0000 1.26
@@ -40,7 +40,7 @@
PingusMenuManager::draw (GraphicContext& gc)
{
background.draw (gc);
-
+
gc.draw_fillrect(0, CL_Display::get_height () - 22,
CL_Display::get_width (), CL_Display::get_height (),
0, 0, 0, 1.0f);
@@ -63,21 +63,21 @@
menu_stack.back ()->update (delta);
}
-void
+void
PingusMenuManager::set_menu (PingusSubMenu * menu)
{
pop_menu ();
push_menu (menu);
}
-void
+void
PingusMenuManager::push_menu (PingusSubMenu * menu)
{
menu->preload ();
menu_stack.push_back (menu);
}
-void
+void
PingusMenuManager::pop_menu ()
{
if (!menu_stack.empty ())
@@ -101,7 +101,7 @@
}
}
-void
+void
PingusMenuManager::fadeout ()
{
std::cout << "PingusMenuManager::fadeout () Not implemented" << std::endl;
@@ -120,7 +120,7 @@
CL_System::keep_alive ();
}
-#endif
+#endif
}
void
Index: pingus_menu_manager.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingus_menu_manager.hxx,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- pingus_menu_manager.hxx 11 Apr 2003 14:30:05 -0000 1.20
+++ pingus_menu_manager.hxx 19 Apr 2003 10:23:17 -0000 1.21
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -74,7 +74,7 @@
/** Remove the current menu and fall back to the last one.
This is used for yes/no dialoges and such things. */
void pop_menu ();
-
+
/** Add's a new menu to the menu stack. This is used for yes/no
dialoges and such things.*/
void push_menu (PingusSubMenu * menu);
@@ -87,7 +87,7 @@
protected:
PingusMenuManager ();
-
+
private:
PingusMenuManager (const PingusMenuManager&);
PingusMenuManager& operator= (const PingusMenuManager&);
Index: pingus_resource.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingus_resource.cxx,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- pingus_resource.cxx 11 Apr 2003 16:51:15 -0000 1.27
+++ pingus_resource.cxx 19 Apr 2003 10:23:17 -0000 1.28
@@ -39,7 +39,7 @@
std::map<ResDescriptor, CL_Surface> PingusResource::surface_map;
std::map<ResDescriptor, CL_Font*> PingusResource::font_map;
-void
+void
PingusResource::init()
{
// do nothing
@@ -48,13 +48,13 @@
void
PingusResource::deinit()
{
- for (std::map<std::string, CL_ResourceManager*>::iterator i =
resource_map.begin();
+ for (std::map<std::string, CL_ResourceManager*>::iterator i =
resource_map.begin();
i != resource_map.end ();
++i)
delete i->second;
-
+
for (std::map<ResDescriptor, CL_Font*>::iterator i = font_map.begin();
- i != font_map.end ();
+ i != font_map.end ();
++i)
delete i->second;
}
@@ -78,21 +78,21 @@
res_filename = "data/" + filename;
- // FIXME: Memory hole...
+ // FIXME: Memory hole...
res_manager = new CL_ResourceManager(path_manager.complete
(res_filename.c_str()),
/* is_datafile = */false);
-
+
resource_map[filename] = res_manager;
return res_manager;
}
}
CL_Surface
-PingusResource::load_surface(const std::string& res_name,
+PingusResource::load_surface(const std::string& res_name,
const std::string& datafile,
ResourceModifierNS::ResourceModifier modifier)
{
- return load_surface(ResDescriptor(res_name, datafile,
+ return load_surface(ResDescriptor(res_name, datafile,
ResDescriptor::RD_RESOURCE,
modifier));
}
@@ -116,7 +116,7 @@
{
pout(PINGUS_DEBUG_RESOURCES) << "PingusResource: Loading surface from
cache 1/2: " << res_desc << std::endl;
surf = apply_modifier (surf, res_desc);
-
+
surface_map[res_desc] = surf;
}
else // never loaded, need to load it from source
@@ -162,7 +162,7 @@
// FIXME: muahhhaa... I write slower code than you....
case ResourceModifierNS::ROT0:
return surf;
-
+
case ResourceModifierNS::ROT90:
return Blitter::rotate_90(surf);
@@ -211,17 +211,17 @@
}
}
break;
-
+
case ResDescriptor::RD_FILE:
{
std::string filename = System::get_statdir() + "images/" +
res_desc.res_name;
// FIXME: Memory leak?
pout << "PingusResource::load_surface(" << res_desc.res_name << ")" <<
std::endl;
- // FIXME: Add pcx, jpeg, tga support here
+ // FIXME: Add pcx, jpeg, tga support here
pout << "DONE" << std::endl;
return CL_Surface(new CL_PNGProvider(filename, NULL), true);
}
-
+
case ResDescriptor::RD_AUTO:
perr << "PingusResource: ResDescriptor::AUTO not implemented" <<
std::endl;
assert (false);
@@ -233,22 +233,22 @@
}
}
-CL_Font*
+CL_Font*
PingusResource::load_font(const std::string& res_name,
const std::string& datafile)
{
- return load_font(ResDescriptor(res_name, datafile,
+ return load_font(ResDescriptor(res_name, datafile,
ResDescriptor::RD_RESOURCE));
}
-CL_Font*
+CL_Font*
PingusResource::load_font(const ResDescriptor& res_desc)
{
pout(PINGUS_DEBUG_RESOURCES) << "PingusResource: Loading font: " << res_desc
<< std::endl;
CL_Font* font = font_map[res_desc];
-
- if (font)
+
+ if (font)
{
return font;
}
@@ -267,11 +267,11 @@
}
font_map[res_desc] = font;
return font;
-
+
case ResDescriptor::RD_FILE:
pout << "PingusResource: ResDescriptor::FILE not implemented" <<
std::endl;
return 0;
-
+
case ResDescriptor::RD_AUTO:
pout << "PingusResource: ResDescriptor::AUTO not implemented" <<
std::endl;
return 0;
@@ -287,7 +287,7 @@
PingusResource::cleanup ()
{
pout(PINGUS_DEBUG_RESOURCES) << "PingusResource::cleanup ()" << std::endl;
-
+
for (std::map<ResDescriptor, CL_Surface>::iterator i = surface_map.begin ();
i != surface_map.end (); ++i)
{
@@ -312,10 +312,10 @@
PingusResource::get_mtime (const std::string& res_name,
const std::string& datafile)
{
- try
+ try
{
CL_ResourceManager* res_man = PingusResource::get(datafile);
-
+
if (!res_man->is_from_source ())
{
// FIXME: not implemented
@@ -324,7 +324,7 @@
else
{
CL_Resource& res = res_man->get_resource(res_name);
-
+
std::string filename = res.get_full_location();
#ifndef WIN32
@@ -338,8 +338,8 @@
return 0;
#endif
}
- }
- catch (CL_Error& err)
+ }
+ catch (CL_Error& err)
{
std::cout << "PingusResource::get_mtime: CL_Error: " << err.message <<
std::endl;
return 0;
Index: pingus_resource.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingus_resource.hxx,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- pingus_resource.hxx 4 Mar 2003 10:26:18 -0000 1.13
+++ pingus_resource.hxx 19 Apr 2003 10:23:17 -0000 1.14
@@ -45,7 +45,7 @@
public:
static void init();
static void deinit();
-
+
/** */
static unsigned int get_mtime (const std::string& res_name,
const std::string& datafile);
@@ -55,7 +55,7 @@
const std::string& datafile,
ResourceModifierNS::ResourceModifier modifier
= ResourceModifierNS::ROT0);
-
+
/** Load a surface from the ResDescriptor */
static CL_Surface load_surface(const ResDescriptor&);
@@ -71,7 +71,7 @@
/** */
static CL_ResourceManager* get(const std::string&);
-
+
private:
PingusResource (const PingusResource&);
PingusResource& operator= (const PingusResource&);
Index: pingus_sub_menu.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingus_sub_menu.hxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- pingus_sub_menu.hxx 19 Feb 2003 09:50:36 -0000 1.8
+++ pingus_sub_menu.hxx 19 Apr 2003 10:23:17 -0000 1.9
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -40,7 +40,7 @@
/// Return a handle to the parent menu manager
PingusMenuManager* get_manager () { return manager; }
-
+
private:
PingusSubMenu (const PingusSubMenu&);
PingusSubMenu& operator= (const PingusSubMenu&);
Index: playfield.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/playfield.cxx,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- playfield.cxx 15 Apr 2003 23:12:29 -0000 1.34
+++ playfield.cxx 19 Apr 2003 10:23:17 -0000 1.35
@@ -47,9 +47,9 @@
y1 = (CL_Display::get_height() - world->get_height()) / 2;
y2 = y1 + world->get_height() - 1;
- if (x1 < 0)
+ if (x1 < 0)
x1 = 0;
- if (x2 >= CL_Display::get_width())
+ if (x2 >= CL_Display::get_width())
x2 = CL_Display::get_width() - 1;
if (y1 < 0)
y1 = 0;
@@ -69,10 +69,10 @@
}
view.push_back(new View(client, x1, y1, x2, y2));
-
+
view[0]->set_x_offset(((x2 - x1) / 2) - world->get_start_x());
view[0]->set_y_offset(((y2 - y1) / 2) - world->get_start_y());
-
+
world->set_view (view[0]);
}
}
@@ -81,7 +81,7 @@
{
if (verbose)
std::cout << "Playfield going down" << std::endl;
-
+
for (std::vector<View*>::iterator it = view.begin(); it != view.end(); ++it)
{
delete *it;
}
@@ -89,9 +89,9 @@
void
Playfield::draw (GraphicContext& gc)
-{
+{
for(std::vector<View*>::iterator i = view.begin();
- i != view.end();
+ i != view.end();
++i)
{
(*i)->draw();
@@ -142,22 +142,22 @@
double dist;
Pingu* c_pingu = 0;
- for (PinguIter pingu = world->get_pingus()->begin();
+ for (PinguIter pingu = world->get_pingus()->begin();
pingu != world->get_pingus()->end();
++pingu)
{
if ((*pingu)->is_over(x_pos, y_pos))
{
dist = (*pingu)->dist(x_pos, y_pos);
-
- if (dist < min_dist)
+
+ if (dist < min_dist)
{
min_dist = dist;
c_pingu = *pingu;
}
}
}
- return c_pingu;
+ return c_pingu;
}
void
@@ -174,10 +174,10 @@
view[i]->update (delta);
if (view[i]->is_current() && !mouse_scrolling)
- {
+ {
current_view = i;
current_pingu = current_pingu_find(mouse_x - view[i]->get_x_pos() -
(view[i]->get_x_offset()),
- mouse_y - view[i]->get_y_pos() -
(view[i]->get_y_offset()));
+ mouse_y - view[i]->get_y_pos() -
(view[i]->get_y_offset()));
view[i]->set_pingu(current_pingu);
break;
}
@@ -195,27 +195,27 @@
// FIXME: This should be delta dependant
scroll_speed = 30;
- if (mouse_x < 2)
+ if (mouse_x < 2)
{
view[current_view]->set_x_offset(view[current_view]->get_x_offset() +
scroll_speed);
- }
- else if (mouse_x > CL_Display::get_width() - 3)
+ }
+ else if (mouse_x > CL_Display::get_width() - 3)
{
view[current_view]->set_x_offset(view[current_view]->get_x_offset() -
scroll_speed);
}
-
- if (mouse_y < 2)
+
+ if (mouse_y < 2)
{
view[current_view]->set_y_offset(view[current_view]->get_y_offset() +
scroll_speed);
}
- else if (mouse_y > CL_Display::get_height() - 3)
+ else if (mouse_y > CL_Display::get_height() - 3)
{
view[current_view]->set_y_offset(view[current_view]->get_y_offset() -
scroll_speed);
}
}
}
-void
+void
Playfield::on_primary_button_press(int x, int y)
{
UNUSED_ARG(x);
@@ -254,7 +254,7 @@
for(unsigned int i=0; i < view.size(); ++i)
{
view[i]->on_pointer_move (x, y);
- }
+ }
}
void
@@ -278,7 +278,7 @@
int
Playfield::get_y_offset()
{
- return view[0]->get_y_offset();
+ return view[0]->get_y_offset();
}
void
@@ -288,7 +288,7 @@
view[0]->set_y_offset((CL_Display::get_height() / 2) - y);
}
-void
+void
Playfield::generate_clipping_rects(int x1, int y1, int x2, int y2)
{
clipping_rectangles.push_back(CL_Rect(0, 0, CL_Display::get_width() - 1,
y1));
@@ -297,7 +297,7 @@
clipping_rectangles.push_back(CL_Rect(0, y2+1, CL_Display::get_width() - 1,
CL_Display::get_height() - 1));
}
-void
+void
Playfield::scroll (int x, int y)
{
view[current_view]->shift_x_offset(x);
Index: playfield.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/playfield.hxx,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- playfield.hxx 15 Apr 2003 23:12:29 -0000 1.15
+++ playfield.hxx 19 Apr 2003 10:23:17 -0000 1.16
@@ -34,7 +34,7 @@
/** This class encapsulates all the different Views */
class Playfield : public GUI::Component
{
-private:
+private:
friend class Client;
CL_Surface buffer;
@@ -44,7 +44,7 @@
ButtonPanel* buttons;
World* world;
std::vector<View*> view;
-
+
///int x_offset, y_offset;
Pingu* current_pingu;
bool mouse_scrolling;
@@ -90,7 +90,7 @@
void set_server(Server*);
bool is_at (int x, int y) { UNUSED_ARG(x); UNUSED_ARG(y); return true; }
-
+
private:
Playfield (const Playfield&);
Playfield& operator= (const Playfield&);
Index: playfield_view.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/playfield_view.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- playfield_view.cxx 28 Sep 2002 11:52:22 -0000 1.4
+++ playfield_view.cxx 19 Apr 2003 10:23:17 -0000 1.5
@@ -32,18 +32,18 @@
{
}
-void
+void
PlayfieldView::update (float /*delta*/)
{
}
-void
+void
PlayfieldView::draw ()
{
world->draw(gc);
}
-void
+void
PlayfieldView::scroll (Vector delta)
{
x_offset += (int) delta.x;
Index: playfield_view.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/playfield_view.hxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- playfield_view.hxx 19 Feb 2003 09:50:36 -0000 1.8
+++ playfield_view.hxx 19 Apr 2003 10:23:17 -0000 1.9
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -42,16 +42,16 @@
// Update the playfield
void update (float delta);
-
+
// Draw the playfied
void draw ();
-
+
// Scroll the playfield
void scroll (Vector delta);
-
+
// Return the pingu at the given *screen* coordinates
Pingu* get_pingu (const Vector& pos);
-
+
private:
PlayfieldView (const PlayfieldView&);
PlayfieldView& operator= (const PlayfieldView&);
Index: plf.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/plf.cxx,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- plf.cxx 30 Mar 2003 20:43:52 -0000 1.15
+++ plf.cxx 19 Apr 2003 10:23:17 -0000 1.16
@@ -31,7 +31,7 @@
max_time = -1;
number_to_save = 0;
number_of_pingus = 100;
- difficulty = 5;
+ difficulty = 5;
playable = false;
music = "none";
}
@@ -132,13 +132,13 @@
return number_to_save;
}
-int
+int
PLF::get_difficulty()
{
return difficulty;
}
-bool
+bool
PLF::get_playable()
{
return playable;
@@ -156,20 +156,20 @@
return author;
}
-std::vector<WorldObjsData::GroundpieceData>
+std::vector<WorldObjsData::GroundpieceData>
PLF::get_groundpieces(void)
{
return groundpieces;
}
-std::vector<WorldObjData*>
+std::vector<WorldObjData*>
PLF::get_worldobjs_data ()
{
//std::cout << "World: " << worldobjs_data.size () << std::endl;
return worldobjs_data;
}
-PLF*
+PLF*
PLF::create (const std::string& pathname)
{
std::string extension = System::extension (pathname);
Index: plf.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/plf.hxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- plf.hxx 30 Mar 2003 20:43:52 -0000 1.10
+++ plf.hxx 19 Apr 2003 10:23:17 -0000 1.11
@@ -27,23 +27,23 @@
class WorldObjData;
/** The Pingus Level File
-
+
The PLF class holds all object information, which are needed to
build a level, like the levelname, description, number of pingus,
etc. */
-class PLF
+class PLF
{
protected:
std::map<std::string, std::string> levelname;
/** The name of the file from were the current level was loaded */
std::string filename;
-
+
/** Resource name of the PLF, see PLFResMgr */
std::string resname;
std::map<std::string, std::string> description;
-
+
/** Author of this level */
std::string author;
@@ -87,7 +87,7 @@
/** levels flagged with playable=false are not playable or havn't been yet
tested */
bool playable;
-
+
std::vector<ActionData> actions;
std::vector<WorldObjsData::GroundpieceData> groundpieces;
@@ -118,7 +118,7 @@
/** Returns the number of Pingus, which are going to be released in
this level. */
int get_pingus(void);
-
+
/** Returns the time you have to complete a level */
int get_time(void);
@@ -160,7 +160,7 @@
/** Creates a PLF (XMLPLF or PLFPLF, depending on the file
extension) from a file. The pathname must be complete */
static PLF* create (const std::string& pathname);
-
+
private:
PLF (const PLF&);
PLF& operator= (const PLF&);
Index: plf_handle.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/plf_handle.hxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- plf_handle.hxx 3 Mar 2003 23:01:40 -0000 1.1
+++ plf_handle.hxx 19 Apr 2003 10:23:17 -0000 1.2
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2002 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -37,12 +37,12 @@
PLF* operator->() { assert(plf); return plf; }
PLF* operator*() { assert(plf); return plf; }
-
- PLFHandle& operator=(const PLFHandle& p)
- {
- plf = p.plf;
- return *this;
- }
+
+ PLFHandle& operator=(const PLFHandle& p)
+ {
+ plf = p.plf;
+ return *this;
+ }
};
#endif
Index: plf_res_mgr.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/plf_res_mgr.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- plf_res_mgr.cxx 30 Mar 2003 22:09:33 -0000 1.4
+++ plf_res_mgr.cxx 19 Apr 2003 10:23:17 -0000 1.5
@@ -26,21 +26,21 @@
PLFResMgr::PLFMap PLFResMgr::plf_map;
-PLFHandle
+PLFHandle
PLFResMgr::load_plf_raw(const std::string& res_name,
const std::string& filename)
{
//std::cout << "PLFResMgr: " << res_name << "\n " << filename << std::endl;
PLFMap::iterator i = plf_map.find(res_name);
-
+
if (i == plf_map.end())
{ // Entry not cached, so load it and add it to cache
pout(PINGUS_DEBUG_LOADING) << "PLFResMgr: Loading level from DISK: '" <<
res_name << "' -> '" << filename << "'" << std::endl;
PLF* plf = PLF::create(filename);
-
- PLFEntry entry;
+
+ PLFEntry entry;
entry.plf = plf;
entry.mtime = System::get_mtime(filename);
@@ -62,8 +62,8 @@
// Reload the file since it has changed on disk
PLF* plf = PLF::create(filename);
-
- PLFEntry entry;
+
+ PLFEntry entry;
entry.plf = plf;
entry.mtime = System::get_mtime(filename);
@@ -77,7 +77,7 @@
else
{ // File in cache is up to date, everything is already, return it
pout(PINGUS_DEBUG_LOADING) << "PLFResMgr: Loading level from CACHE:
'" << res_name << "' -> '" << filename << "'" << std::endl;
-
+
return i->second.plf;
}
}
@@ -86,11 +86,11 @@
PLFHandle
PLFResMgr::load_plf_from_filename(const std::string& filename)
{
- std::string res_name = System::basename(filename);
+ std::string res_name = System::basename(filename);
// This should give us the tutorial/, wip/, etc. part of the res_name
- std::string dirname = System::basename(System::dirname(filename));
-
+ std::string dirname = System::basename(System::dirname(filename));
+
return load_plf_raw(dirname + "/" + res_name.substr(0, res_name.length()-4),
filename);
}
@@ -98,7 +98,7 @@
PLFHandle
PLFResMgr::load_plf(const std::string& res_name)
{
- return load_plf_raw(res_name,
+ return load_plf_raw(res_name,
path_manager.complete("levels/" + res_name + ".xml"));
}
Index: plf_res_mgr.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/plf_res_mgr.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- plf_res_mgr.hxx 7 Mar 2003 18:49:20 -0000 1.2
+++ plf_res_mgr.hxx 19 Apr 2003 10:23:17 -0000 1.3
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2002 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -31,7 +31,7 @@
unsigned int mtime;
};
- typedef std::map<std::string, PLFEntry> PLFMap;
+ typedef std::map<std::string, PLFEntry> PLFMap;
static PLFMap plf_map;
/** Loads PLF from filename and stores it under 'res_name' in the
@@ -46,10 +46,10 @@
static PLFHandle load_plf(const std::string& res_name);
/** @return a handle to the PLF, instead of loading it from a
- res_name, load it from a system dependend filename
-
+ res_name, load it from a system dependend filename
+
@param filename The filename of the plf, aka
"../data/levels/snow11-grumbel.xml" */
- static PLFHandle load_plf_from_filename(const std::string& filename);
+ static PLFHandle load_plf_from_filename(const std::string& filename);
};
#endif
Index: plt_xml.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/plt_xml.cxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- plt_xml.cxx 14 Oct 2002 11:15:15 -0000 1.11
+++ plt_xml.cxx 19 Apr 2003 10:23:17 -0000 1.12
@@ -47,7 +47,7 @@
}
}
-void
+void
PLTXML::parse_background (xmlNodePtr cur)
{
cur = cur->children;
@@ -91,15 +91,15 @@
std::cout << "PLTXML::parse_background(): Unhandled: " << cur->name
<< std::endl;
}
cur = cur->next;
- }
+ }
}
-void
+void
PLTXML::parse_description(xmlNodePtr cur)
{
std::string desc;
std::string lang;
-
+
if (XMLhelper::node_list_get_string(doc, cur->children, 1, desc)) {
if (XMLhelper::get_prop(cur, "lang", lang))
description[lang] = desc;
@@ -108,7 +108,7 @@
}
}
-void
+void
PLTXML::parse_world_name (xmlNodePtr cur)
{
std::string name;
@@ -143,7 +143,7 @@
std::cout << "PLTXML: Unhandled: " << cur->name << std::endl;
}
cur = cur->next;
- }
+ }
}
void
@@ -182,19 +182,19 @@
}
}
-std::vector<std::string>
+std::vector<std::string>
PLTXML::get_levels ()
{
return level_list;
}
-std::map<std::string,std::string>
+std::map<std::string,std::string>
PLTXML::get_name ()
{
return world_name;
}
-std::map<std::string,std::string>
+std::map<std::string,std::string>
PLTXML::get_description ()
{
Index: plt_xml.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/plt_xml.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- plt_xml.hxx 27 Sep 2002 11:26:44 -0000 1.7
+++ plt_xml.hxx 19 Apr 2003 10:23:17 -0000 1.8
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -39,7 +39,7 @@
void parse_description(xmlNodePtr cur);
void parse_world_name(xmlNodePtr cur);
void parse_level_list(xmlNodePtr cur);
-
+
public:
PLTXML ();
~PLTXML ();
@@ -51,7 +51,7 @@
SurfaceBackgroundData get_background ();
std::string get_surface () { return ""; }
std::vector<std::string> get_levels ();
-
+
private:
PLTXML (const PLTXML&);
PLTXML& operator= (const PLTXML&);
Index: prefab.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/prefab.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- prefab.cxx 5 Mar 2003 19:55:14 -0000 1.6
+++ prefab.cxx 19 Apr 2003 10:23:17 -0000 1.7
@@ -34,7 +34,7 @@
if (doc)
{
xmlNodePtr cur = doc->ROOT;
-
+
cur = XMLhelper::skip_blank (cur);
if (XMLhelper::equal_str(cur->name, "pingus-prefab"))
@@ -64,20 +64,20 @@
if (data)
{
std::cout << "Prefab: object defined twice! Overwriting
first object!" << std::endl;
- delete data;
+ delete data;
}
- std::cout << "XXX Prefab Object is a: "
- << XMLhelper::skip_blank(cur->children)->name
+ std::cout << "XXX Prefab Object is a: "
+ << XMLhelper::skip_blank(cur->children)->name
<< std::endl;
- data = WorldObjDataFactory::instance ()->create (doc,
+ data = WorldObjDataFactory::instance ()->create (doc,
XMLhelper::skip_blank(cur->children));
}
else
{
std::cout << "Prefab: Unhandled: " << cur->name << std::endl;
}
-
+
cur = cur->next;
cur = XMLhelper::skip_blank (cur);
}
Index: prefab.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/prefab.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- prefab.hxx 5 Mar 2003 19:13:59 -0000 1.5
+++ prefab.hxx 19 Apr 2003 10:23:17 -0000 1.6
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2002 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -67,7 +67,7 @@
/** @return a pointer to the WorldObjData of this Prefab */
WorldObjData* get_data ();
-
+
private:
Prefab (const Prefab&);
Prefab& operator= (const Prefab&);
Index: range.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/range.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- range.cxx 12 Jun 2002 19:09:37 -0000 1.1
+++ range.cxx 19 Apr 2003 10:23:17 -0000 1.2
@@ -77,7 +77,7 @@
{
++count;
check_range();
-
+
return *this;
}
@@ -86,7 +86,7 @@
{
count += a;
check_range();
-
+
return *this;
}
@@ -95,7 +95,7 @@
{
count -= a;
check_range();
-
+
return *this;
}
@@ -104,7 +104,7 @@
{
count = a;
check_range();
-
+
return *this;
}
Index: range.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/range.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- range.hxx 11 Sep 2002 12:45:57 -0000 1.5
+++ range.hxx 19 Apr 2003 10:23:17 -0000 1.6
@@ -22,7 +22,7 @@
#include "pingus.hxx"
-/** A class similar to an integer, but keeps the value in a given range.
+/** A class similar to an integer, but keeps the value in a given range.
@deprecated The idea of this class is to keep a value inside a,
but this class is a bit cheap and I don't really know if we need
@@ -41,13 +41,13 @@
Range(int a, int b);
Range(const Range&);
~Range();
-
+
Range& operator=(const Range&);
-
+
operator int() const {
return count;
}
-
+
Range& operator++();
Range& operator+=(int a);
Range& operator-=(int a);
Index: res_descriptor.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/res_descriptor.cxx,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- res_descriptor.cxx 2 Apr 2003 19:59:04 -0000 1.15
+++ res_descriptor.cxx 19 Apr 2003 10:23:17 -0000 1.16
@@ -22,7 +22,7 @@
#include "res_descriptor.hxx"
#include "pingus_error.hxx"
-/*
+/*
uri -> file:///home/ingo/.pingus/images/...
uri -> resource://core/result/ok
uri -> file://bla.png (relative to ~/.pingus/images/)
@@ -50,13 +50,13 @@
{
if (this == &old)
return *this;
-
+
type = old.type;
datafile = old.datafile;
res_name = old.res_name;
modifier = old.modifier;
-
- return *this;
+
+ return *this;
}
ResDescriptor::ResDescriptor(const std::string& arg_res_name,
@@ -74,7 +74,7 @@
ResDescriptor::operator<(const ResDescriptor& res_desc) const
{
// FIXME: This is ugly and slow
- //return (datafile + res_name + to_string (type) + to_string (modifier))
+ //return (datafile + res_name + to_string (type) + to_string (modifier))
// < (res_desc.datafile + res_desc.res_name + to_string (res_desc.type) +
to_string (res_desc.modifier));
if (datafile < res_desc.datafile)
@@ -100,7 +100,7 @@
else if (type > res_desc.type)
return false;
else
- return false;
+ return false;
}
}
}
@@ -111,7 +111,7 @@
switch (desc.type)
{
case ResDescriptor::RD_RESOURCE:
- return s << "[" << desc.res_name << ", " << desc.datafile
+ return s << "[" << desc.res_name << ", " << desc.datafile
<< ", " << ResourceModifierNS::rs_to_string(desc.modifier) <<
"]";
break;
case ResDescriptor::RD_FILE:
Index: res_descriptor.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/res_descriptor.hxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- res_descriptor.hxx 2 Apr 2003 19:59:04 -0000 1.12
+++ res_descriptor.hxx 19 Apr 2003 10:23:17 -0000 1.13
@@ -27,16 +27,16 @@
{
public:
enum ResourceType { RD_RESOURCE, RD_FILE, RD_AUTO };
-
+
/// Where to get the data from?
- ResourceType type;
-
+ ResourceType type;
+
/// The name of the resource (.dat) file
std::string datafile;
-
+
/// The name of the data, filename or resourcename ("Textures/desert")
std::string res_name;
-
+
ResourceModifierNS::ResourceModifier modifier;
ResDescriptor ();
@@ -45,11 +45,11 @@
ResDescriptor (const std::string& res_name, const std::string& datafile,
ResourceType type = RD_RESOURCE,
- ResourceModifierNS::ResourceModifier modifier
+ ResourceModifierNS::ResourceModifier modifier
= ResourceModifierNS::ROT0);
bool operator< (const ResDescriptor&) const;
-
+
};
/// Our own function to print out the ResDescriptor
Index: resource_modifier.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/resource_modifier.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- resource_modifier.cxx 11 Sep 2002 12:45:57 -0000 1.2
+++ resource_modifier.cxx 19 Apr 2003 10:23:17 -0000 1.3
@@ -31,7 +31,7 @@
case ROT90:
return ROT90FLIP;
case ROT180:
- return ROT180FLIP;
+ return ROT180FLIP;
case ROT270:
return ROT270FLIP;
case ROT0FLIP:
@@ -83,7 +83,7 @@
case ROT90:
return ROT180;
case ROT180:
- return ROT270;
+ return ROT270;
case ROT270:
return ROT0;
case ROT0FLIP:
@@ -109,7 +109,7 @@
case ROT90:
return ROT0;
case ROT180:
- return ROT90;
+ return ROT90;
case ROT270:
return ROT180;
case ROT0FLIP:
@@ -135,7 +135,7 @@
case ROT90:
return "ROT90";
case ROT180:
- return "ROT180";
+ return "ROT180";
case ROT270:
return "ROT270";
case ROT0FLIP:
@@ -149,7 +149,7 @@
default:
assert (0);
return "--Error--";
- }
+ }
}
ResourceModifier rs_from_string (const std::string& modifier)
Index: resource_modifier.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/resource_modifier.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- resource_modifier.hxx 11 Sep 2002 12:45:57 -0000 1.4
+++ resource_modifier.hxx 19 Apr 2003 10:23:17 -0000 1.5
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -26,8 +26,8 @@
namespace ResourceModifierNS {
/** This array contains possible modifications of a surface */
-typedef enum {
- ROT0,
+typedef enum {
+ ROT0,
ROT90,
ROT180,
ROT270,
Index: result.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/result.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- result.cxx 13 Jun 2002 14:25:12 -0000 1.2
+++ result.cxx 19 Apr 2003 10:23:17 -0000 1.3
@@ -28,7 +28,7 @@
saved = 0;
}
-int
+int
Result::get_total()
{
return total;
@@ -63,13 +63,13 @@
return killed = k;
}
-int
+int
Result::set_saved(int s)
{
return saved = s;
}
-int
+int
Result::set_time(int t)
{
return time = t;
Index: result.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/result.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- result.hxx 28 Mar 2003 16:16:00 -0000 1.7
+++ result.hxx 19 Apr 2003 10:23:17 -0000 1.8
@@ -37,13 +37,13 @@
/** Total number of Pingus */
int total;
-
+
/** Time used to finish this level */
int used_time;
-
+
/** Maximum time available for this level */
int max_time;
-
+
/** Number of Pingus needed to save */
int needed;
Index: result_screen.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/result_screen.cxx,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- result_screen.cxx 10 Apr 2003 16:59:57 -0000 1.14
+++ result_screen.cxx 19 Apr 2003 10:23:17 -0000 1.15
@@ -48,7 +48,7 @@
void draw(GraphicContext& gc) ;
};
-class ResultScreenOkButton
+class ResultScreenOkButton
: public GUI::SurfaceButton
{
private:
@@ -56,7 +56,7 @@
public:
ResultScreenOkButton(ResultScreen* p)
: GUI::SurfaceButton(CL_Display::get_width()/2 + 225,
- CL_Display::get_height()/2 + 125,
+ CL_Display::get_height()/2 + 125,
ResDescriptor("start/ok", "core",
ResDescriptor::RD_RESOURCE),
ResDescriptor("start/ok_clicked", "core",
ResDescriptor::RD_RESOURCE),
ResDescriptor("start/ok_hover", "core",
ResDescriptor::RD_RESOURCE)),
@@ -84,7 +84,7 @@
public:
ResultScreenAbortButton(ResultScreen* p)
: GUI::SurfaceButton(CL_Display::get_width()/2 - 278,
- CL_Display::get_height()/2 + 144,
+ CL_Display::get_height()/2 + 144,
ResDescriptor("start/back", "core",
ResDescriptor::RD_RESOURCE),
ResDescriptor("start/back_clicked", "core",
ResDescriptor::RD_RESOURCE),
ResDescriptor("start/back_hover", "core",
ResDescriptor::RD_RESOURCE)),
@@ -109,7 +109,7 @@
}
};
-class ResultScreenRetryButton
+class ResultScreenRetryButton
: public GUI::SurfaceButton
{
private:
@@ -117,7 +117,7 @@
public:
ResultScreenRetryButton(ResultScreen* p)
: GUI::SurfaceButton(CL_Display::get_width()/2 + 225,
- CL_Display::get_height()/2 + 125,
+ CL_Display::get_height()/2 + 125,
ResDescriptor("start/ok", "core",
ResDescriptor::RD_RESOURCE),
ResDescriptor("start/ok_clicked", "core",
ResDescriptor::RD_RESOURCE),
ResDescriptor("start/ok_hover", "core",
ResDescriptor::RD_RESOURCE)),
@@ -125,7 +125,7 @@
{
}
- void on_click()
+ void on_click()
{
parent->retry_level();
}
@@ -147,7 +147,7 @@
chalk_pingus.push_back(PingusResource::load_surface("misc/chalk_pingu2",
"core"));
chalk_pingus.push_back(PingusResource::load_surface("misc/chalk_pingu3",
"core"));
chalk_pingus.push_back(PingusResource::load_surface("misc/chalk_pingu4",
"core"));
-
+
if (result.max_time == -1)
time_str = "-";
else
@@ -155,16 +155,16 @@
}
void
-ResultScreenComponent::draw(GraphicContext& gc)
+ResultScreenComponent::draw(GraphicContext& gc)
{
gc.draw(background, Vector(gc.get_width()/2, gc.get_height()/2));
if (!result.success())
- gc.print_right(Fonts::chalk_normal,
+ gc.print_right(Fonts::chalk_normal,
CL_Display::get_width()/2 + 275,
CL_Display::get_height()/2 + 110, _("Retry"));
- gc.print_center(Fonts::chalk_large, gc.get_width()/2,
CL_Display::get_height()/2 - 200,
+ gc.print_center(Fonts::chalk_large, gc.get_width()/2,
CL_Display::get_height()/2 - 200,
System::translate(result.plf->get_levelname()));
if (result.success())
@@ -181,7 +181,7 @@
/*gc.print_center(Fonts::pingus_normal, gc.get_width()/2,
gc.get_height()-30,
"..:: Press Space to retry the level ::..");*/
}
-
+
std::string message;
if (result.success())
{
@@ -213,7 +213,7 @@
else
message = _("Better luck next time!");
}
- gc.print_center(Fonts::chalk_normal, gc.get_width()/2,
+ gc.print_center(Fonts::chalk_normal, gc.get_width()/2,
CL_Display::get_height()/2 - 70, message);
@@ -226,9 +226,9 @@
int left_x = CL_Display::get_width()/2 - 100;
int right_x = CL_Display::get_width()/2 + 100;
int y = CL_Display::get_height()/2 + 10;
-
+
gc.print_left(Fonts::chalk_normal, left_x, y, _("Saved: "));
- gc.print_right(Fonts::chalk_normal, right_x, y, to_string(result.saved)
+ gc.print_right(Fonts::chalk_normal, right_x, y, to_string(result.saved)
+ "/" + to_string(result.needed));;
gc.print_left(Fonts::chalk_normal, left_x, y+=30, _("Killed: "));
@@ -284,10 +284,10 @@
void
ResultScreen::close_screen()
{
- ScreenManager::instance()->pop_screen();
+ ScreenManager::instance()->pop_screen();
}
-void
+void
ResultScreen::on_fast_forward_press()
{
on_pause_press();
Index: result_screen.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/result_screen.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- result_screen.hxx 30 Mar 2003 13:12:35 -0000 1.3
+++ result_screen.hxx 19 Apr 2003 10:23:17 -0000 1.4
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2002 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Index: savegame.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/savegame.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- savegame.cxx 1 Apr 2003 15:13:33 -0000 1.2
+++ savegame.cxx 19 Apr 2003 10:23:17 -0000 1.3
@@ -26,7 +26,7 @@
std::string
Savegame::status_to_string (Status status)
{
- switch (status)
+ switch (status)
{
case FINISHED:
return "finished";
@@ -50,7 +50,7 @@
return FINISHED;
else if (str == "none")
return NONE;
- else
+ else
return NONE;
}
Index: savegame.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/savegame.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- savegame.hxx 1 Apr 2003 15:13:33 -0000 1.2
+++ savegame.hxx 19 Apr 2003 10:23:17 -0000 1.3
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2002 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -30,7 +30,7 @@
private:
public:
enum Status { FINISHED, // level is successfully finished
- ACCESSIBLE, // level is accessible and can be played
+ ACCESSIBLE, // level is accessible and can be played
NONE}; // level is not finished and cannot be accessed
static std::string status_to_string (Status s);
static Status string_to_status (std::string s);
Index: savegame_manager.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/savegame_manager.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- savegame_manager.cxx 18 Apr 2003 12:50:24 -0000 1.6
+++ savegame_manager.cxx 19 Apr 2003 10:23:17 -0000 1.7
@@ -30,16 +30,16 @@
SavegameManager::instance()
{
if (instance_)
- return instance_;
+ return instance_;
else
- return (instance_ = new SavegameManager(System::get_statdir() +
"savegames/savegames.xml"));
+ return (instance_ = new SavegameManager(System::get_statdir() +
"savegames/savegames.xml"));
}
SavegameManager::SavegameManager(const std::string& arg_filename)
: filename(arg_filename)
{
xmlDocPtr doc = xmlParseFile(filename.c_str());
-
+
if (!doc)
{
std::cout << "SavegameManager: Couldn't find savegame file '" << filename
@@ -53,9 +53,9 @@
else
{
xmlNodePtr cur = doc->ROOT;
-
+
cur = XMLhelper::skip_blank(cur);
-
+
if (cur && XMLhelper::equal_str(cur->name, "pingus-savegame"))
{
cur = XMLhelper::skip_blank(cur);
@@ -83,15 +83,15 @@
}
else
{
- std::cout << "SavegameManager: Unknownen tag: " << cur->name
<< std::endl;
+ std::cout << "SavegameManager: Unknownen tag: " << cur->name
<< std::endl;
}
-
+
cur = cur->next;
cur = XMLhelper::skip_blank(cur);
}
}
-
+
xmlFreeDoc(doc);
}
}
@@ -132,7 +132,7 @@
i->second = savegame;
}
}
-
+
flush();
}
@@ -142,14 +142,14 @@
std::ofstream xml(filename.c_str());
xml << "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n\n"
<< "<pingus-savegame>\n";
-
+
for(SavegameTable::iterator i = savegames.begin(); i != savegames.end(); ++i)
{
assert(i->second);
i->second->write_xml(xml);
}
- xml << "</pingus-savegame>\n"
+ xml << "</pingus-savegame>\n"
<< std::endl;
}
Index: savegame_manager.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/savegame_manager.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- savegame_manager.hxx 1 Apr 2003 15:13:33 -0000 1.2
+++ savegame_manager.hxx 19 Apr 2003 10:23:17 -0000 1.3
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2002 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -27,7 +27,7 @@
class SavegameManager
{
private:
- static SavegameManager* instance_;
+ static SavegameManager* instance_;
typedef std::map<std::string, Savegame*> SavegameTable;
std::string filename;
@@ -37,10 +37,10 @@
SavegameManager(const std::string& filename);
~SavegameManager();
-
+
Savegame* get(const std::string& levelname);
void store(Savegame&);
-
+
/** Write the current savegames down to file */
void flush();
private:
Index: screenshot.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/screenshot.cxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- screenshot.cxx 28 Mar 2003 23:54:14 -0000 1.11
+++ screenshot.cxx 19 Apr 2003 10:23:17 -0000 1.12
@@ -36,17 +36,17 @@
{
CL_Target* target = CL_Display::get_target();
- if (target)
+ if (target)
{
std::string filename = get_filename();
-
+
std::cout << _("Screenshot: Saving screenshot to: ") << filename <<
std::endl;
save_target_to_file(target, filename);
std::cout << _("Screnshot: Screenshot is done.") << std::endl;
return filename;
- }
- else
+ }
+ else
{
std::cout << _("Screenshot: Couldn't save screenshot") << std::endl;
return "";
@@ -78,7 +78,7 @@
for (int i = 0; i < num_pixels; ++i)
{
unsigned int color = *((unsigned short*)(target_buffer + i*2));
-
+
buffer[i*3 + 0] = (color & rmask) * 255 / rmask;
buffer[i*3 + 1] = (color & gmask) * 255 / gmask;
buffer[i*3 + 2] = (color & bmask) * 255 / bmask;
@@ -86,7 +86,7 @@
break;
}
case 3: // 24bit
- {
+ {
// that should do the trick - untested !!!
for (int i = 0; i < num_pixels; ++i)
{
@@ -96,7 +96,7 @@
#else
unsigned int color = (*d) | (*(d+1) << 8) | (*(d+2) << 16);
#endif
-
+
buffer[i*3 + 0] = (color & rmask) * 255 / rmask;
buffer[i*3 + 1] = (color & gmask) * 255 / gmask;
buffer[i*3 + 2] = (color & bmask) * 255 / bmask;
@@ -104,18 +104,18 @@
break;
}
case 4: // 32bit
- {
+ {
for (int i = 0; i < num_pixels; ++i)
{
unsigned int color = *((unsigned int*)(target_buffer + i*4));
-
+
buffer[i*3 + 0] = (color & rmask) * 255 / rmask;
buffer[i*3 + 1] = (color & gmask) * 255 / gmask;
buffer[i*3 + 2] = (color & bmask) * 255 / bmask;
}
break;
}
-
+
}
target->unlock();
@@ -128,7 +128,7 @@
{
FILE* out = fopen(filename.c_str(), "wb");
- if (!out)
+ if (!out)
{
perror(filename.c_str());
std::cout << _("Screenshot: Couldn't write file: ") << filename <<
std::endl;
@@ -145,7 +145,7 @@
height);
fwrite(buffer, sizeof(unsigned char), width * height * 3, out);
- fclose(out);
+ fclose(out);
}
void
@@ -153,7 +153,7 @@
{
std::ofstream out(filename.c_str());
- out << "P3\n"
+ out << "P3\n"
<< "# CREATOR: Pingus... some version\n"
<< target->get_width() << " "
<< target->get_height() << "\n"
@@ -162,12 +162,12 @@
target->lock();
float red, green, blue, alpha;
- for (unsigned int y=0; y < target->get_height(); ++y)
+ for (unsigned int y=0; y < target->get_height(); ++y)
{
for (unsigned int x=0; x < target->get_width(); ++x)
{
target->get_pixel(x, y, &red, &green, &blue, &alpha);
- out << (int)(red * 255) << " "
+ out << (int)(red * 255) << " "
<< (int)(green * 255) << " "
<< (int)(blue * 255) << "\n";
}
@@ -185,15 +185,15 @@
do {
snprintf(str, 16, "%d.ppm", i);
- tmp_filename = System::get_statdir() + "screenshots/"
+ tmp_filename = System::get_statdir() + "screenshots/"
+ "pingus-" + get_date() + "-" + std::string(str);
++i;
} while (System::exist(tmp_filename));
-
+
return tmp_filename;
}
-std::string
+std::string
Screenshot::get_date()
{
char buffer[64];
Index: screenshot.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/screenshot.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- screenshot.hxx 28 Mar 2003 23:54:14 -0000 1.6
+++ screenshot.hxx 19 Apr 2003 10:23:17 -0000 1.7
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Index: server.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/server.cxx,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- server.cxx 10 Apr 2003 19:38:51 -0000 1.27
+++ server.cxx 19 Apr 2003 10:23:17 -0000 1.28
@@ -80,8 +80,8 @@
}
if (demo_recorder)
-
demo_recorder->record_event(ServerEvent::make_pingu_action_event(get_time(),
-
pingu->get_id(),
+
demo_recorder->record_event(ServerEvent::make_pingu_action_event(get_time(),
+
pingu->get_id(),
action));
}
Index: server.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/server.hxx,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- server.hxx 5 Apr 2003 18:36:50 -0000 1.14
+++ server.hxx 19 Apr 2003 10:23:17 -0000 1.15
@@ -67,7 +67,7 @@
/* Event handling stuff */
void send_armageddon_event();
void send_pingu_action_event(Pingu* pingu, Actions::ActionName action);
-
+
private:
Server (const Server&);
Server& operator= (const Server&);
Index: server_event.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/server_event.cxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- server_event.cxx 18 Apr 2003 17:08:56 -0000 1.7
+++ server_event.cxx 19 Apr 2003 10:23:17 -0000 1.8
@@ -72,7 +72,7 @@
xml << " <armageddon time=\"" << to_string(time_stamp) << "\"/>" <<
std::endl;
break;
case PINGU_ACTION_EVENT:
- xml << " <pingu-action time=\"" << to_string(time_stamp) << "\" id=\""
<< pingu_id
+ xml << " <pingu-action time=\"" << to_string(time_stamp) << "\" id=\""
<< pingu_id
<< "\" action=\"" << Actions::action_to_string(pingu_action) <<
"\"/>" << std::endl;
break;
default:
Index: server_event.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/server_event.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- server_event.hxx 15 Jan 2003 21:16:41 -0000 1.3
+++ server_event.hxx 19 Apr 2003 10:23:17 -0000 1.4
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2002 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -41,15 +41,15 @@
/** the time at which the event should take place */
int time_stamp;
-
+
// stuff for pingu_action_event
/** Id of the pingu which should get the actions */
int pingu_id;
-
+
/** action name */
Actions::ActionName pingu_action;
-
+
ServerEvent();
/** Construct an server event from an xml subtree */
Index: smallmap.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/smallmap.cxx,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- smallmap.cxx 2 Apr 2003 12:04:04 -0000 1.36
+++ smallmap.cxx 19 Apr 2003 10:23:17 -0000 1.37
@@ -49,7 +49,7 @@
height = 100;
scroll_mode = false;
-
+
init();
}
@@ -57,7 +57,7 @@
{
delete canvas;
}
-
+
void
SmallMap::init()
{
@@ -69,7 +69,7 @@
entrance_sur = PingusResource::load_surface("misc/smallmap_entrance",
"core");
exit_sur = PingusResource::load_surface("misc/smallmap_exit", "core");
- ColMap* colmap = client->get_server()->get_world()->get_colmap();
+ ColMap* colmap = client->get_server()->get_world()->get_colmap();
buffer = colmap->get_data();
colmap_serial = colmap->get_serial();
@@ -95,9 +95,9 @@
canvas = new CL_Canvas(width, height);
}
-
+
canvas->lock();
-
+
cbuffer = static_cast<unsigned char*>(canvas->get_data());
int alpha;
@@ -118,9 +118,9 @@
tx = x * cmap_width / width;
ty = y * cmap_height / height;
-
+
current_pixel = buffer[tx + (ty * cmap_width)];
-
+
switch (current_pixel)
{
case Groundtype::GP_NOTHING:
@@ -129,14 +129,14 @@
cbuffer[i + 2] = 0;
cbuffer[i + 3] = 0;
break;
-
+
case Groundtype::GP_BRIDGE:
cbuffer[i + 0] = 255;
cbuffer[i + 1] = 100;
cbuffer[i + 2] = 255;
cbuffer[i + 3] = 0;
break;
-
+
case Groundtype::GP_WATER:
case Groundtype::GP_LAVA:
cbuffer[i + 0] = 255;
@@ -151,10 +151,10 @@
cbuffer[i + 0] = 255; // alpha
cbuffer[i + 1] = 255; // blue
cbuffer[i + 2] = 128; // green
- cbuffer[i + 3] = 128; // red
+ cbuffer[i + 3] = 128; // red
break;
#endif
-
+
case Groundtype::GP_SOLID:
cbuffer[i + 0] = 255;
cbuffer[i + 1] = 100;
@@ -194,31 +194,31 @@
int x_of = playfield->get_x_offset();
int y_of = playfield->get_y_offset();
- sur.put_screen(x_pos, y_pos);
+ sur.put_screen(x_pos, y_pos);
#if 0
if (has_focus)
Display::draw_rect(x_pos, y_pos,
- x_pos + sur.get_width (), y_pos + sur.get_height () - 1,
+ x_pos + sur.get_width (), y_pos + sur.get_height () - 1,
1.0f, 1.0f, 1.0f, 1.0f);
#endif
-
-
+
+
x_of = x_pos - x_of * width /
client->get_server()->get_world()->get_colmap()->get_width();
y_of = y_pos - y_of * height /
client->get_server()->get_world()->get_colmap()->get_height();
- Display::draw_rect(x_of,
+ Display::draw_rect(x_of,
y_of,
x_of + Math::min(rwidth, static_cast<int>(sur.get_width()
- 1)),
y_of + Math::min(rheight,
static_cast<int>(sur.get_height() - 1)),
0.0, 1.0, 0.0, 1.0);
-
+
// FIXME: This should use put_target(), but put_target(), does not
// seem to work?!
/* vector<exit_data> exit_d = plf->get_exit();
for(std::vector<exit_data>::iterator i = exit_d.begin(); i != exit_d.end();
++i)
{
- exit_sur->put_screen(i->x_pos * width / colmap->get_width() + x_pos -
3,
+ exit_sur->put_screen(i->x_pos * width / colmap->get_width() + x_pos - 3,
i->y_pos * height / colmap->get_height() + y_pos -
3);
}
@@ -266,7 +266,7 @@
if (update_count > smallmap_update_time)
{
update_count = 0.0f;
- ColMap* colmap = client->get_server()->get_world()->get_colmap();
+ ColMap* colmap = client->get_server()->get_world()->get_colmap();
if (colmap_serial != colmap->get_serial())
{
@@ -281,7 +281,7 @@
World* world = client->get_server()->get_world();
float x = x_pos + (pos.x * width / world->get_colmap()->get_width());
float y = y_pos + (pos.y * height / world->get_colmap()->get_height());
-
+
gc_ptr->draw(sprite, Vector(x, y));
}
@@ -302,7 +302,7 @@
{
cx = (x - x_pos) * static_cast<int>(colmap->get_width() / width);
cy = (y - y_pos) * static_cast<int>(colmap->get_height() / height);
-
+
client->get_playfield()->set_viewpoint(cx, cy);
}
}
@@ -331,13 +331,13 @@
void
SmallMap::on_pointer_enter ()
{
- has_focus = true;
+ has_focus = true;
}
void
SmallMap::on_pointer_leave ()
{
- has_focus = false;
+ has_focus = false;
}
/* EOF */
Index: smallmap.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/smallmap.hxx,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- smallmap.hxx 2 Apr 2003 12:04:04 -0000 1.17
+++ smallmap.hxx 19 Apr 2003 10:23:17 -0000 1.18
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -43,7 +43,7 @@
/** Graphic surface for the generated rectanglar background of the small map
*/
CL_Surface sur;
-
+
/** The canvas that represents the small-colmap */
CL_Canvas* canvas;
@@ -68,7 +68,7 @@
/** Max height of the small map */
int max_height;
- /** Indicates whether the playfield should can be scrolled around depending
+ /** Indicates whether the playfield should can be scrolled around depending
on the position of the cursor in the small map */
bool scroll_mode;
@@ -110,16 +110,16 @@
void update(float delta);
/*}*/
- /** draws a symbolic sprite onto the smallmap
+ /** draws a symbolic sprite onto the smallmap
@param sprite the Sprite to draw, it will keep its original size
@param pos the position to draw it in World COs, it will get
recalculated to screen CO */
void draw_sprite(Sprite sprite, Vector pos);
-
+
private:
void init();
void draw_pingus();
-
+
SmallMap (const SmallMap&);
SmallMap& operator= (const SmallMap&);
};
Index: smallmap_image.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/smallmap_image.cxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- smallmap_image.cxx 29 Dec 2002 23:29:00 -0000 1.9
+++ smallmap_image.cxx 19 Apr 2003 10:23:17 -0000 1.10
@@ -26,20 +26,20 @@
SmallMapImage::SmallMapImage (Server * s, Vector arg_pos, int width, int
height)
: sur (create_surface (s, width, height)),
pos (arg_pos)
-{
+{
}
SmallMapImage::~SmallMapImage ()
{
}
-void
+void
SmallMapImage::draw ()
{
sur.put_screen (int(pos.x), int(pos.y));
}
-void
+void
SmallMapImage::update (float delta)
{
// FIXME: Updating not implemented!
@@ -57,13 +57,13 @@
World* world = server->get_world();
- ColMap* colmap = world->get_colmap();
+ ColMap* colmap = world->get_colmap();
buffer = colmap->get_data();
canvas = new CL_Canvas(width, height);
-
+
canvas->lock();
-
+
cbuffer = static_cast<unsigned char*>(canvas->get_data());
for(int y = 0; y < height; y++)
@@ -72,9 +72,9 @@
{
tx = x * colmap->get_width() / width;
ty = y * colmap->get_height() / height;
-
+
current_pixel = buffer[tx + (ty * colmap->get_width())];
-
+
if (current_pixel == Groundtype::GP_NOTHING)
{
cbuffer[4 * ((y * width) + x) + 0] = 150;
@@ -127,8 +127,8 @@
for(std::vector<ExitData>::iterator i = exit_d.begin(); i != exit_d.end();
i++)
{
// FIXME: Replace this with put_target() when it is bug free
- Blitter::put_surface(canvas, exit_sur,
- i->pos.x * width / colmap->get_width() -
(exit_sur.get_width()/2),
+ Blitter::put_surface(canvas, exit_sur,
+ i->pos.x * width / colmap->get_width() -
(exit_sur.get_width()/2),
i->pos.y * height / colmap->get_height() -
(exit_sur.get_height()));
}
@@ -138,7 +138,7 @@
Blitter::put_surface(canvas, entrance_sur,
i->pos.x * width / colmap->get_width() -
(entrance_sur.get_width()/2),
i->pos.y * height / colmap->get_height() -
(entrance_sur.get_height()));
-
+
//entrance_sur->put_target(i->x_pos * width /
colmap->get_width(),
//i->y_pos * height / colmap->get_height(),
//0, canvas);
@@ -146,15 +146,15 @@
#endif
canvas->unlock();
-
+
return CL_Surface(canvas, true);
}
-bool
+bool
SmallMapImage::mouse_over (int x, int y)
{
return (pos.x < x && pos.x + sur.get_width () > x
- &&
+ &&
pos.y < y && pos.y + sur.get_height () > y);
}
Index: smallmap_image.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/smallmap_image.hxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- smallmap_image.hxx 28 Sep 2002 11:52:22 -0000 1.8
+++ smallmap_image.hxx 19 Apr 2003 10:23:17 -0000 1.9
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -43,7 +43,7 @@
bool mouse_over (int x, int y);
static CL_Surface create_surface (Server * server, int width, int height);
-
+
private:
SmallMapImage (const SmallMapImage&);
SmallMapImage& operator= (const SmallMapImage&);
Index: spot_map.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/spot_map.cxx,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- spot_map.cxx 25 Mar 2003 00:37:44 -0000 1.25
+++ spot_map.cxx 19 Apr 2003 10:23:17 -0000 1.26
@@ -43,7 +43,7 @@
{
}
-MapTileSurface&
+MapTileSurface&
MapTileSurface::operator= (const MapTileSurface& old)
{
if (this == &old)
@@ -51,7 +51,7 @@
empty = old.empty;
surface = old.surface;
-
+
return *this;
}
@@ -84,9 +84,9 @@
empty = true;
provider->lock();
- lenght = provider->get_pitch() * provider->get_height();
+ lenght = provider->get_pitch() * provider->get_height();
buffer = static_cast<unsigned char*>(provider->get_data());
-
+
// Jumping 4 steps because of RGBA
for(int i=0; i < lenght; i += 4) {
if (buffer[i] != 0) {
@@ -108,19 +108,19 @@
// Checking that the map has the correct size, only multiples of
// tile_size are allowed, anything else wouldn't fit very well on
// the colmap
- if ((width % tile_size) != 0)
+ if ((width % tile_size) != 0)
{
width += (tile_size - (width % tile_size));
}
-
- if ((height % tile_size) != 0)
+
+ if ((height % tile_size) != 0)
{
height += (tile_size - (height % tile_size));
- }
+ }
// Allocating tile map
tile.resize(width/tile_size);
- for(TileIter i=0; i < tile.size(); ++i)
+ for(TileIter i=0; i < tile.size(); ++i)
tile[i].resize(height/tile_size);
// fix the height back to the correct values
@@ -148,9 +148,9 @@
int tiles_total = 0;
int tiles_empty = 0;
int tiles_used = 0;
- for(TileIter x=0; x < tile.size(); ++x)
+ for(TileIter x=0; x < tile.size(); ++x)
{
- for(TileIter y=0; y < tile[x].size(); ++y)
+ for(TileIter y=0; y < tile[x].size(); ++y)
{
if (tile[x][y].is_empty())
++tiles_empty;
@@ -179,7 +179,7 @@
unsigned int tilemap_height = display.get_height() / tile_size + 1;
// drawing the stuff
- for (TileIter x = start_x;
+ for (TileIter x = start_x;
x <= (start_x + tilemap_width) && x < tile.size();
++x)
{
@@ -187,14 +187,14 @@
y <= start_y + tilemap_height && y < tile[x].size();
++y)
{
- if (!tile[x][y].is_empty())
+ if (!tile[x][y].is_empty())
{
gc.draw(tile[x][y].surface,
x * tile_size,
y * tile_size);
#ifdef PINGUS_EARTHQUAKE
gc.draw(tile[x][y].surface,
- x * tile_size + rand ()%20-10,
+ x * tile_size + rand ()%20-10,
y * tile_size + rand ()%20-10);
#endif
}
@@ -218,30 +218,30 @@
}
// Returns the height of the map, it is read directly from the *.psm file
-int
+int
PingusSpotMap::get_height(void)
{
return height;
}
-void
+void
PingusSpotMap::remove(CL_SurfaceProvider* sprovider, int x, int y)
{
// Get the start tile and end tile
int start_x = Math::max(x / tile_size, 0);
int start_y = Math::max(y / tile_size, 0);
- int end_x = Math::min((x + sprovider->get_width()) / tile_size,
+ int end_x = Math::min((x + sprovider->get_width()) / tile_size,
static_cast<unsigned int>((width - 1) / tile_size));
- int end_y = Math::min((y + sprovider->get_height()) / tile_size,
+ int end_y = Math::min((y + sprovider->get_height()) / tile_size,
static_cast<unsigned int>((height - 1) / tile_size));
-
-
- for(int ix = start_x; ix <= end_x; ++ix)
+
+
+ for(int ix = start_x; ix <= end_x; ++ix)
{
- for(int iy = start_y; iy <= end_y; ++iy)
+ for(int iy = start_y; iy <= end_y; ++iy)
{
- if (!tile[ix][iy].is_empty())
+ if (!tile[ix][iy].is_empty())
{
put_alpha_surface(static_cast<CL_Canvas*>(tile[ix][iy].surface.get_provider()),
sprovider,
@@ -262,7 +262,7 @@
int start_i;
unsigned char* tbuffer; // Target buffer
int twidth, theight, tpitch;
-
+
unsigned char* sbuffer; // Source buffer
int swidth, sheight, spitch;
@@ -285,7 +285,7 @@
tbuffer = static_cast<unsigned char*>(provider->get_data());
sbuffer = static_cast<unsigned char*>(sprovider->get_data());
-
+
twidth = provider->get_width();
theight = provider->get_height();
tpitch = provider->get_pitch();
@@ -308,27 +308,27 @@
real_y = real_y_arg;
real_x = real_x_arg;
-
- for(int line=y_offset; line < sheight && (line + y) < theight; ++line)
+
+ for(int line=y_offset; line < sheight && (line + y) < theight; ++line)
{
start_i = ((line + y) * tpitch) + (x*4);
-
+
real_x = real_x_arg;
- for(int i=start_i+(4*x_offset),j=line*spitch+x_offset;
+ for(int i=start_i+(4*x_offset),j=line*spitch+x_offset;
i < start_i + (4*swidth) && (i-start_i+(x*4)) < (4*twidth); i+=4,++j)
{
- if (sbuffer[j])
+ if (sbuffer[j])
{
if (pingus_debug_flags & PINGUS_DEBUG_ACTIONS)
{
- if (!(colmap->getpixel(real_x, real_y) ==
Groundtype::GP_SOLID))
+ if (!(colmap->getpixel(real_x, real_y) ==
Groundtype::GP_SOLID))
{
tbuffer[i + 0] = 255;
tbuffer[i + 1] = 255;
tbuffer[i + 2] = 255;
tbuffer[i + 3] = 255;
- }
- else
+ }
+ else
{
tbuffer[i + 0] = 255;
tbuffer[i + 1] = 255;
@@ -340,7 +340,7 @@
{
if (!(colmap->getpixel(real_x, real_y) ==
Groundtype::GP_SOLID))
{
- tbuffer[i + 0] = 0;
+ tbuffer[i + 0] = 0;
}
}
}
@@ -350,7 +350,7 @@
}
sprovider->unlock();
- provider->unlock();
+ provider->unlock();
}
void
@@ -361,7 +361,7 @@
int start_y = y / tile_size;
int end_x = (x + sprovider->get_width()) / tile_size;
int end_y = (y + sprovider->get_height()) / tile_size;
-
+
if (start_x < 0)
start_x = 0;
if (start_y < 0)
@@ -372,9 +372,9 @@
if (end_y > (int) tile[0].size() - 1)
end_y = tile[0].size() - 1;
- for(int ix = start_x; ix <= end_x; ++ix)
+ for(int ix = start_x; ix <= end_x; ++ix)
{
- for(int iy = start_y; iy <= end_y; ++iy)
+ for(int iy = start_y; iy <= end_y; ++iy)
{
if (tile[ix][iy].surface == 0)
{
@@ -396,7 +396,7 @@
}
/*
CL_Surface s = CL_Surface::create(sprovider);
- s->put_target(x - (ix * tile_size), y - (iy * tile_size), 0,
+ s->put_target(x - (ix * tile_size), y - (iy * tile_size), 0,
tile[ix][iy].surface->get_provider());*/
tile[ix][iy].reload();
tile[ix][iy].set_empty(false);
Index: spot_map.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/spot_map.hxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- spot_map.hxx 27 Sep 2002 11:26:44 -0000 1.8
+++ spot_map.hxx 19 Apr 2003 10:23:17 -0000 1.9
@@ -16,7 +16,7 @@
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-// 02111-1307, USA.
+// 02111-1307, USA.
#ifndef HEADER_PINGUS_SPOT_MAP_HXX
#define HEADER_PINGUS_SPOT_MAP_HXX
@@ -39,7 +39,7 @@
MapTileSurface ();
virtual ~MapTileSurface ();
-
+
MapTileSurface (const MapTileSurface& old);
MapTileSurface& operator= (const MapTileSurface& old);
@@ -79,7 +79,7 @@
int get_height();
int get_width();
-
+
/** Put the gives surface provider onto the given coordinates */
void put(CL_SurfaceProvider*, int x, int y);
@@ -88,7 +88,7 @@
void remove(CL_SurfaceProvider*, int x, int y);
float get_z_pos () const { return 0; }
-
+
private:
/** Low level version of the remove() call, acts on a single canvas
instead on the complete map-tiles */
Index: sprite.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/sprite.cxx,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- sprite.cxx 28 Dec 2002 16:31:37 -0000 1.13
+++ sprite.cxx 19 Apr 2003 10:23:17 -0000 1.14
@@ -24,7 +24,7 @@
#include "sprite.hxx"
#include "globals.hxx"
-int round (float f)
+int round (float f)
{
if (f >= 0.0f)
return int(f + 0.5f);
@@ -53,7 +53,7 @@
{
if (this == &sprite)
return *this;
-
+
frame = sprite.frame;
frames_per_second = sprite.frames_per_second;
sur = sprite.sur;
@@ -62,7 +62,7 @@
is_finished = sprite.is_finished;
x_align = sprite.x_align;
y_align = sprite.y_align;
-
+
return *this;
}
@@ -109,7 +109,7 @@
sur = PingusResource::load_surface (desc);
}
-void
+void
Sprite::put_screen (int x, int y)
{
if (!sur)
@@ -136,14 +136,14 @@
}
-void
+void
Sprite::put_screen (const Vector& pos)
{
put_screen (int(pos.x), int(pos.y));
}
-void
+void
Sprite::set_align (int arg_x, int arg_y)
{
x_align = arg_x;
@@ -157,15 +157,15 @@
y_align = -int(sur.get_height ())/2;
}
-void
+void
Sprite::set_align_center_bottom ()
{
x_align = -int(sur.get_width ())/2;
- y_align = -int(sur.get_height ());
+ y_align = -int(sur.get_height ());
}
-void
+void
Sprite::next_frame ()
{
++frame;
@@ -176,29 +176,29 @@
-void
+void
Sprite::previous_frame ()
{
--frame;
if (round(frame) < 0)
- frame = sur.get_num_frames () - 1;
+ frame = sur.get_num_frames () - 1;
}
-int
+int
Sprite::get_frame ()
{
return int(frame);
}
-float
+float
Sprite::get_progress ()
{
return float(frame)/max_frames ();
}
-int
+int
Sprite::max_frames ()
{
switch (direction)
@@ -246,20 +246,20 @@
frame = 0;
}
break;
-
+
case ONCE:
frame += frames_per_second * delta;
- if (round(frame) >= max_frames ())
+ if (round(frame) >= max_frames ())
{
is_finished = true;
frame = max_frames () - 1;
}
-
+
break;
}
}
-bool
+bool
Sprite::finished ()
{
switch (looptype)
@@ -276,7 +276,7 @@
}
}
-void
+void
Sprite::reset ()
{
frame = 0.0f;
Index: sprite.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/sprite.hxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- sprite.hxx 26 Nov 2002 21:30:37 -0000 1.9
+++ sprite.hxx 19 Apr 2003 10:23:17 -0000 1.10
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -31,7 +31,7 @@
public:
typedef enum { NONE, LEFT, RIGHT } Direction;
typedef enum { ENDLESS, ONCE } LoopType;
-
+
private:
float frame;
float frames_per_second;
@@ -42,19 +42,19 @@
int x_align;
int y_align;
-
+
int max_frames ();
-
+
public:
/// Creates an empty sprite, drawing and updating does nothing
Sprite ();
/// Copy a sprite
Sprite (const Sprite& sprite);
-
+
/// Copy a sprite
Sprite& operator= (const Sprite& sprite);
-
+
Sprite (std::string arg_sur_name,
std::string arg_datafile,
float arg_frames_per_second = 10.0f,
@@ -80,11 +80,11 @@
the alignment */
void put_screen (const Vector& pos);
- /** Set the alignment (aka offset) of the surface
+ /** Set the alignment (aka offset) of the surface
@param arg_x The x offset by which the surface drawn
@param arg_y The y offset by which the surface drawn */
void set_align (int arg_x, int arg_y);
-
+
/** Shortcut for setting the aligment to the center of the surface */
void set_align_center ();
@@ -97,14 +97,14 @@
/** Return the y alignment */
int get_y_align () { return y_align; }
-
+
/** Go to the next frame */
void next_frame ();
/** Go to the previous frame */
void previous_frame ();
- /** Get the currently displaed frame
+ /** Get the currently displaed frame
@return the currently displayed frame */
int get_frame ();
@@ -114,7 +114,7 @@
/** Set the current direction of the surface, WARNING: Does only
work in a few cases... FIXME: rewrite when
- CL_Surface::get_num_xframes () exists
+ CL_Surface::get_num_xframes () exists
@param dir Direction: LEFT, RIGHT, NONE */
void set_direction (Sprite::Direction dir) { direction = dir; }
Index: start_screen.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/start_screen.cxx,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- start_screen.cxx 16 Apr 2003 18:02:27 -0000 1.18
+++ start_screen.cxx 19 Apr 2003 10:23:17 -0000 1.19
@@ -43,12 +43,12 @@
Sprite background;
std::string time_str;
std::string description;
-
+
public:
StartScreenComponent(PLFHandle plf);
void draw(GraphicContext& gc);
virtual ~StartScreenComponent() {}
-
+
private:
const std::string& format_description(int length);
};
@@ -60,7 +60,7 @@
public:
StartScreenOkButton(StartScreen* p)
: GUI::SurfaceButton(CL_Display::get_width()/2 + 225,
- CL_Display::get_height()/2 + 125,
+ CL_Display::get_height()/2 + 125,
ResDescriptor("start/ok", "core",
ResDescriptor::RD_RESOURCE),
ResDescriptor("start/ok_clicked", "core",
ResDescriptor::RD_RESOURCE),
ResDescriptor("start/ok_hover", "core",
ResDescriptor::RD_RESOURCE)),
@@ -73,7 +73,7 @@
gc.print_center(Fonts::chalk_normal, x_pos + 32, y_pos - 17, _("Ok"));
}
- void on_click()
+ void on_click()
{
PingusSound::play_sound("yipee");
parent->start_game();
@@ -96,7 +96,7 @@
public:
StartScreenAbortButton(StartScreen* p)
: GUI::SurfaceButton(CL_Display::get_width()/2 - 278,
- CL_Display::get_height()/2 + 144,
+ CL_Display::get_height()/2 + 144,
ResDescriptor("start/back", "core",
ResDescriptor::RD_RESOURCE),
ResDescriptor("start/back_clicked", "core",
ResDescriptor::RD_RESOURCE),
ResDescriptor("start/back_hover", "core",
ResDescriptor::RD_RESOURCE)),
@@ -122,7 +122,7 @@
StartScreen::~StartScreen()
{
-
+
}
StartScreenComponent::StartScreenComponent(PLFHandle p)
@@ -138,13 +138,13 @@
{
//gc.clear(0,0,0);
background.put_screen(CL_Display::get_width()/2,CL_Display::get_height()/2);
-
+
int left_x = CL_Display::get_width()/2 - 120;
int right_x = CL_Display::get_width()/2 + 120;
int y = CL_Display::get_height()/2 + 10;
- gc.print_center(Fonts::chalk_large,
- gc.get_width()/2,
+ gc.print_center(Fonts::chalk_large,
+ gc.get_width()/2,
CL_Display::get_height()/2 - 200,
System::translate(plf->get_levelname()));
@@ -161,7 +161,7 @@
gc.print_left (Fonts::chalk_normal, left_x, y += 30, _("Time: "));
gc.print_right(Fonts::chalk_normal, right_x, y, time_str);
-
+
gc.print_left (Fonts::chalk_normal, left_x, y += 30, _("Difficulty:"));
gc.print_right(Fonts::chalk_normal, right_x, y,
to_string(plf->get_difficulty()) + "/100");
@@ -174,7 +174,7 @@
if (maintainer_mode)
gc.print_left(Fonts::chalk_small, 110, 430, _("Filename: ") +
plf->get_resname());
-
+
CL_System::sleep(30);
}
@@ -183,14 +183,14 @@
{
if (description != "")
return description;
-
+
description = System::translate(plf->get_description());
-
+
if (description == "")
return description;
description = StringFormat::break_line(description, length,
Fonts::chalk_normal);
-
+
return description;
}
Index: start_screen.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/start_screen.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- start_screen.hxx 11 Apr 2003 15:15:34 -0000 1.4
+++ start_screen.hxx 19 Apr 2003 10:23:17 -0000 1.5
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2002 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -28,7 +28,7 @@
{
private:
PLFHandle plf;
-
+
public:
StartScreen(PLFHandle plf);
~StartScreen();
@@ -39,7 +39,7 @@
void on_pause_press();
void on_fast_forward_press();
void on_escape_press();
-
+
private:
StartScreen (const StartScreen&);
Index: stat_manager.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/stat_manager.cxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- stat_manager.cxx 11 Apr 2003 12:45:39 -0000 1.7
+++ stat_manager.cxx 19 Apr 2003 10:23:17 -0000 1.8
@@ -30,7 +30,7 @@
StatManager::instance()
{
if (instance_)
- return instance_;
+ return instance_;
else
return (instance_ = new StatManager(System::get_statdir() +
"savegames/variables.xml"));
}
@@ -66,9 +66,9 @@
if (doc)
{
xmlNodePtr cur = doc->ROOT;
-
+
cur = XMLhelper::skip_blank(cur);
-
+
if (cur && XMLhelper::equal_str(cur->name, "pingus-stats"))
{
cur = XMLhelper::skip_blank(cur);
@@ -119,7 +119,7 @@
xml << "</pingus-stats>\n";
}
-bool
+bool
StatManager::get_int(const std::string& name, int& value)
{
std::string str;
@@ -129,7 +129,7 @@
return false;
}
-bool
+bool
StatManager::get_bool(const std::string& name, bool& value)
{
std::string str;
@@ -139,7 +139,7 @@
return false;
}
-bool
+bool
StatManager::get_string(const std::string& name, std::string& value)
{
Table::iterator i = stats.find(name);
@@ -154,7 +154,7 @@
}
}
-void
+void
StatManager::set_string(const std::string& name, const std::string& value)
{
stats[name] = value;
Index: stat_manager.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/stat_manager.hxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- stat_manager.hxx 28 Mar 2003 13:06:55 -0000 1.1
+++ stat_manager.hxx 19 Apr 2003 10:23:17 -0000 1.2
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2002 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Index: story.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/story.cxx,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- story.cxx 17 Apr 2003 16:43:47 -0000 1.25
+++ story.cxx 19 Apr 2003 10:23:17 -0000 1.26
@@ -32,7 +32,7 @@
init_intro();
init_credits();
}
-
+
void
Story::init_credits()
{
@@ -51,7 +51,7 @@
credits.pages.push_back
(StoryPage
- (ResDescriptor("Story/credits2", "story"),
+ (ResDescriptor("Story/credits2", "story"),
StringFormat::break_line(
_("But as the eldest have said, the Tutorial Island provides not\n"
"only a way to practive, but it is also the starting point into\n"
@@ -59,20 +59,20 @@
"of this, the large tree at the end of the island provides good\n"
"wood to construct a float.\n"), 570, Fonts::chalk_normal)
));
-
+
credits.pages.push_back
(StoryPage
- (ResDescriptor("Story/credits3", "story"),
+ (ResDescriptor("Story/credits3", "story"),
StringFormat::break_line(
_("So the Pingus set out and constructed some large floats, enough\n"
"to carry them all. After also packaging up a bunch of provisions\n"
"they where prepared to finally start of their journey and leave\n"
"their familiar ground and enter the unknown parts of the world.\n"),
570, Fonts::chalk_normal)
));
-
+
credits.pages.push_back
(StoryPage
- (ResDescriptor("Story/credits4", "story"),
+ (ResDescriptor("Story/credits4", "story"),
StringFormat::break_line(
_("So the Pingus sat on their float, worrying whats to come and\n"
"where to go, while floating into the sunset.\n"
@@ -84,8 +84,8 @@
}
void
-Story::init_intro()
-{
+Story::init_intro()
+{
intro.title = _("The Journey Begins");
intro.pages.push_back
(StoryPage
@@ -99,7 +99,7 @@
intro.pages.push_back
(StoryPage
- (ResDescriptor("Story/story1", "story"),
+ (ResDescriptor("Story/story1", "story"),
StringFormat::break_line(
_("But then one day, things began to slowly change, the sky got darker\n"
"and the earth got warmer, first of they thought this was just a\n"
@@ -110,7 +110,7 @@
intro.pages.push_back
(StoryPage
- (ResDescriptor("Story/story2", "story"),
+ (ResDescriptor("Story/story2", "story"),
StringFormat::break_line(
_("The snow began to melt away in a few regions and food became an\n"
"issue. Other animals tended to leave the region to search\n"
@@ -120,17 +120,17 @@
intro.pages.push_back
(StoryPage
- (ResDescriptor("Story/story3", "story"),
+ (ResDescriptor("Story/story3", "story"),
StringFormat::break_line(
_("So the circle of the eldest came together to decide what to do\n"
"about it. They decided to send out an expedition around the world\n"
"to find the cause for this warming. The expedition consisted of\n"
"hundreds of the bravest Pingus around on the south pole."), 570,
Fonts::chalk_normal)
));
-
+
intro.pages.push_back
(StoryPage
- (ResDescriptor("Story/story4", "story"),
+ (ResDescriptor("Story/story4", "story"),
StringFormat::break_line(
_("And they picked you to lead them on their journey around the\n"
"world. Since the journey will be dangerous and difficult, your\n"
@@ -141,7 +141,7 @@
intro.pages.push_back
(StoryPage
- (ResDescriptor("Story/story5", "story"),
+ (ResDescriptor("Story/story5", "story"),
StringFormat::break_line(
_("The island consists of many regions which are ideal to train the\n"
"abilities of the Pingus. The Pingus can there train their ability\n"
@@ -151,7 +151,7 @@
intro.pages.push_back
(StoryPage
- (ResDescriptor("Story/story6", "story"),
+ (ResDescriptor("Story/story6", "story"),
StringFormat::break_line(
_("You may, on the other hand, practice there your ability to\n"
"command and guide the Pingus. You can also get familiar with\n"
@@ -162,7 +162,7 @@
intro.pages.push_back
(StoryPage
- (ResDescriptor("Story/story6", "story"),
+ (ResDescriptor("Story/story6", "story"),
StringFormat::break_line(
_("Now that you and the Pingus have arrived at Tutorial Island it\n"
"is time to take command and begin your mission.\n"
Index: story.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/story.hxx,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- story.hxx 6 Apr 2003 12:40:47 -0000 1.13
+++ story.hxx 19 Apr 2003 10:23:17 -0000 1.14
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2002 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Index: story_screen.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/story_screen.cxx,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- story_screen.cxx 15 Apr 2003 23:12:29 -0000 1.18
+++ story_screen.cxx 19 Apr 2003 10:23:17 -0000 1.19
@@ -68,7 +68,7 @@
StoryScreenComponent* story_comp;
public:
StoryScreenContinueButton(StoryScreenComponent* arg_story_comp)
- : GUI::SurfaceButton(CL_Display::get_width()/2 + 220,
CL_Display::get_height()/2 + 160,
+ : GUI::SurfaceButton(CL_Display::get_width()/2 + 220,
CL_Display::get_height()/2 + 160,
ResDescriptor("misc/next", "core",
ResDescriptor::RD_RESOURCE),
ResDescriptor("misc/next", "core",
ResDescriptor::RD_RESOURCE),
ResDescriptor("misc/next_hover", "core",
ResDescriptor::RD_RESOURCE)),
@@ -82,7 +82,7 @@
PingusSound::play_sound ("tick", .3);
}
- void on_click()
+ void on_click()
{
story_comp->next_text();
//ScreenManager::instance()->replace_screen (PingusMenuManager::instance
(), false);
@@ -123,14 +123,14 @@
gc.draw(background,
gc.get_width()/2 - background.get_width()/2,
gc.get_height()/2 - background.get_height()/2);
-
- gc.print_center(Fonts::chalk_large, CL_Display::get_width()/2,
+
+ gc.print_center(Fonts::chalk_large, CL_Display::get_width()/2,
CL_Display::get_height()/2 - 200, story.title);
- gc.draw(page_surface,
+ gc.draw(page_surface,
gc.get_width()/2 - page_surface.get_width()/2,
gc.get_height()/2 - 140);
-
- gc.print_left(Fonts::chalk_normal,
+
+ gc.print_left(Fonts::chalk_normal,
CL_Display::get_width()/2 - 280,
CL_Display::get_height()/2 + 35, display_text);
}
@@ -164,7 +164,7 @@
ScreenManager::instance()->replace_screen(WorldMapNS::WorldMapManager::instance
());
}
-void
+void
StoryScreen::on_startup()
{
//PingusSound::play_sound ("letsgo");
@@ -177,7 +177,7 @@
if (!page_displayed_completly)
{
page_displayed_completly = true;
- display_text = current_page.text;
+ display_text = current_page.text;
}
else
{
Index: story_screen.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/story_screen.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- story_screen.hxx 6 Apr 2003 12:40:47 -0000 1.5
+++ story_screen.hxx 19 Apr 2003 10:23:17 -0000 1.6
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2002 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -34,7 +34,7 @@
StoryPage(ResDescriptor arg_image, std::string arg_text)
: image(arg_image), text(arg_text)
-
+
{}
ResDescriptor image;
Index: string_converter.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/string_converter.hxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- string_converter.hxx 29 Dec 2002 23:29:00 -0000 1.11
+++ string_converter.hxx 19 Apr 2003 10:23:17 -0000 1.12
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Index: string_format.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/string_format.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- string_format.cxx 16 Apr 2003 18:02:27 -0000 1.1
+++ string_format.cxx 19 Apr 2003 10:23:17 -0000 1.2
@@ -26,12 +26,12 @@
unsigned int pos = 0;
while ((pos = text.find('\t', pos)) != std::string::npos)
text.replace(pos, 1, 1, ' ');
-
+
pos = 0;
while ((pos = text.find(" ", pos)) != std::string::npos)
text.replace(pos, 2, 1, ' ');
- pos = 0;
+ pos = 0;
while ((pos = text.find('\n', pos)) != std::string::npos)
{
if (pos < text.length() && text[pos + 1] == '\n') // double enter
marks paragraph
@@ -50,13 +50,13 @@
if (pos && text[pos - 1] == ' ')
text.replace(pos - 1, 2, 1, '\n'); // no whitespace in
front
-
+
if (pos < text.length() && text[pos + 1] == ' ')
text.replace(pos, 2, 1, '\n'); // no
whitespace behind
-
+
++pos; // we don't want to
find it again
}
-
+
pos = 0;
while ((pos = text.find(" ", pos)) != std::string::npos)
text.replace(pos, 2, 1, ' ');
Index: string_tokenizer.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/string_tokenizer.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- string_tokenizer.hxx 14 Apr 2003 19:40:41 -0000 1.2
+++ string_tokenizer.hxx 19 Apr 2003 10:23:17 -0000 1.3
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2002 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Index: system.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/system.cxx,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- system.cxx 16 Apr 2003 10:00:32 -0000 1.18
+++ system.cxx 19 Apr 2003 10:23:17 -0000 1.19
@@ -55,10 +55,10 @@
{
std::list<System::DirectoryEntry> dir_list;
-#ifndef WIN32
+#ifndef WIN32
DIR* dp;
- dirent* de;
-
+ dirent* de;
+
dp = ::opendir(pathname.c_str());
if (dp == 0)
@@ -67,24 +67,24 @@
}
else
{
- while ((de = ::readdir(dp)) != 0)
+ while ((de = ::readdir(dp)) != 0)
{
- if (fnmatch(pattern.c_str(), de->d_name, FNM_PATHNAME) == 0)
+ if (fnmatch(pattern.c_str(), de->d_name, FNM_PATHNAME) == 0)
{
struct stat buf;
stat ((pathname + "/" + de->d_name).c_str (), &buf);
-
+
if (S_ISDIR(buf.st_mode))
{
dir_list.push_back(DirectoryEntry(de->d_name,
DirectoryEntry::DE_DIRECTORY));
}
- else
+ else
{
dir_list.push_back(DirectoryEntry(de->d_name,
DirectoryEntry::DE_FILE));
}
}
}
-
+
closedir(dp);
}
#else /* !WIN32 */
@@ -97,14 +97,14 @@
{
std::cout << "System: Couldn't open: " << pathname << std::endl;
}
-
+
do
- {
+ {
dir_list.push_back(DirectoryEntry(coFindData.cFileName));
}
while (FindNextFile(hFind,&coFindData));
- FindClose(hFind);
+ FindClose(hFind);
#endif
return dir_list;
@@ -118,13 +118,13 @@
const char* str = filename.c_str();
int i;
- for(i = filename.size() - 1; i >= 0; --i)
+ for(i = filename.size() - 1; i >= 0; --i)
{
if (*(str + i) == '/') {
break;
}
}
-
+
return (str+i + 1);
}
@@ -134,13 +134,13 @@
const char* str = filename.c_str();
int i;
- for(i = filename.size() - 1; i >= 0; --i)
+ for(i = filename.size() - 1; i >= 0; --i)
{
if (*(str + i) == '/') {
break;
}
}
-
+
return filename.substr(0, i);
}
@@ -151,7 +151,7 @@
int i;
int last_char = filename.size() - 1;
- for(i = last_char; i >= 0; --i)
+ for(i = last_char; i >= 0; --i)
{
if (str[i] == '.' ) {
if (i != last_char)
@@ -192,7 +192,7 @@
{
std::cout << "Successfully created: " << directory << std::endl;
}
- }
+ }
else
{
if (verbose) std::cout << "Found: " << directory << std::endl;
@@ -219,7 +219,7 @@
{
std::string statdir = get_statdir();
std::string vardir = get_vardir();
-
+
create_dir(statdir);
// FIXME: We need a better seperation between user created levels,
@@ -233,8 +233,8 @@
// Backups of edited levels in the level editor
create_dir(statdir + "backup/");
-
- // User created images
+
+ // User created images
create_dir(statdir + "images/");
// Thumbnail cache
@@ -247,7 +247,7 @@
create_dir(statdir + "screenshots/");
// create_dir(vardir);
}
-
+
std::string
System::get_statdir()
{
@@ -256,7 +256,7 @@
#else /* !WIN32 */
char* homedir = getenv("HOME");
- if (homedir)
+ if (homedir)
{
return std::string(homedir) + "/.pingus/";
}
@@ -267,13 +267,13 @@
#endif
}
-std::string
+std::string
System::get_cachedir()
{
return get_statdir() + "cache/";
}
-std::string
+std::string
System::get_backupdir()
{
return get_statdir() + "backup/";
@@ -282,7 +282,7 @@
std::string
System::get_vardir()
{
-#ifdef WIN32
+#ifdef WIN32
return "var\\";
#else
return "/var/games/pingus/";
@@ -292,7 +292,7 @@
std::string
System::get_tmpdir()
{
-#ifdef WIN32
+#ifdef WIN32
// FIXME: Warning: these hardcoded values are most probably wrong!
return "c:\\windows\\temp\\";
#else
@@ -320,7 +320,7 @@
}
/** Returns the EMail of the user or an empty string */
-std::string
+std::string
System::get_email()
{
if (default_email.empty())
@@ -348,13 +348,13 @@
#else
char* lang_c = setlocale(LC_MESSAGES, NULL);
std::string lang;
-
+
if (lang_c)
lang = lang_c;
-
+
if (lang.empty() || lang == "C")
return default_language;
- else
+ else
return lang.substr(0, 2);
#endif
}
@@ -364,7 +364,7 @@
{
if (pingus_debug_flags & PINGUS_DEBUG_TRANSLATOR)
{
- std::cout << ",-- [ Translator: lang=" << System::get_language ()
+ std::cout << ",-- [ Translator: lang=" << System::get_language ()
<< " default=" << default_language << " ] --" << std::endl;
for (std::map<std::string, std::string>::const_iterator i = strs.begin
();
i != strs.end (); ++i)
@@ -425,10 +425,10 @@
return "";
}
- do
+ do
{
bytes_read = fread (buffer, sizeof (char), 4096, in);
-
+
if (bytes_read == -1)
{
throw Error ("System:checksum: file read error");
@@ -436,7 +436,7 @@
for (int i=0; i < bytes_read; ++i)
checksum = checksum * 17 + buffer[i];
- }
+ }
while (bytes_read != 0);
fclose (in);
@@ -455,7 +455,7 @@
return stat_buf.st_mtime;
else
return 0;
-
+
#else
return 0;
#endif
Index: system.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/system.hxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- system.hxx 13 Apr 2003 23:33:19 -0000 1.9
+++ system.hxx 19 Apr 2003 10:23:17 -0000 1.10
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 1999 Ingo Ruhnke <address@hidden>
//
@@ -12,11 +12,11 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-// 02111-1307, USA.
+// 02111-1307, USA.
#ifndef HEADER_PINGUS_SYSTEM_HXX
#define HEADER_PINGUS_SYSTEM_HXX
@@ -37,7 +37,7 @@
public:
struct Error {
std::string message;
-
+
Error (const std::string& str)
: message (str) {}
};
@@ -53,7 +53,7 @@
///
typedef std::list<DirectoryEntry> Directory;
typedef std::list<DirectoryEntry>::iterator DirectoryIter;
-
+
///
static Directory opendir(const std::string& pathname, const std::string&
pattern = "*");
@@ -68,8 +68,8 @@
/** Change into the directory named dir, on error throw an PingusError */
static void change_dir (std::string dir);
-
- /** Check if all needed directories are available, if not then create
+
+ /** Check if all needed directories are available, if not then create
them. */
static void init_directories();
@@ -106,7 +106,7 @@
static std::string get_vardir();
/** Asks different variables to check were the directory for
- temporary files is located
+ temporary files is located
@return The location of the tmp directory */
static std::string get_tmpdir();
Index: target_provider.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/target_provider.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- target_provider.cxx 12 Jun 2002 19:09:38 -0000 1.1
+++ target_provider.cxx 19 Apr 2003 10:23:17 -0000 1.2
@@ -20,7 +20,7 @@
#include <ClanLib/Display/SurfaceProviders/canvas.h>
#include "target_provider.hxx"
-CL_Canvas*
+CL_Canvas*
TargetProvider::create_canvas (CL_Target* target)
{
CL_Canvas* canvas;
@@ -34,7 +34,7 @@
target->get_pixel (x_pos, y_pos, &r, &g, &b, &a);
canvas->draw_pixel (x_pos, y_pos, r, g, b);
}
-
+
return canvas;
}
Index: target_provider.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/target_provider.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- target_provider.hxx 27 Sep 2002 11:26:44 -0000 1.5
+++ target_provider.hxx 19 Apr 2003 10:23:17 -0000 1.6
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -52,9 +52,9 @@
CL_Palette* get_palette () const { return target->get_palette (); }
bool uses_src_colorkey() const { return false; }
unsigned int get_src_colorkey () const { return 0; }
-
+
static CL_Canvas* create_canvas (CL_Target*);
-
+
private:
TargetProvider (const TargetProvider&);
TargetProvider& operator= (const TargetProvider&);
Index: theme.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/theme.cxx,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- theme.cxx 11 Apr 2003 12:45:39 -0000 1.16
+++ theme.cxx 19 Apr 2003 10:23:17 -0000 1.17
@@ -35,7 +35,7 @@
#include "xml_plf.hxx"
#include "gui/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_),
@@ -46,7 +46,7 @@
Theme::~Theme ()
{
}
-
+
void
Theme::load (const std::string& filename)
{
@@ -70,25 +70,25 @@
has_description = false;
}
- try
+ try
{
if (!plt.get_surface().empty ())
surface = PingusResource::load_surface(plt.get_surface(), "global");
}
-
- catch (CL_Error& err)
+
+ catch (CL_Error& err)
{
if (verbose) std::cout << "Theme:CL_Error:" << filename << ":" <<
err.message << std::endl;
}
- try
+ try
{
if (plt.get_background().desc.res_name != "-")
background = PingusResource::load_surface(plt.get_background().desc);
}
- catch (CL_Error& err)
+ catch (CL_Error& err)
{
- if (verbose)
+ if (verbose)
{
std::cout << "Theme:" << filename << ":" << err.message << std::endl;
std::cout << "Theme: Ignoring missing resource, disable background."
<< std::endl;
@@ -106,11 +106,11 @@
int y_pos = level_start_y_pos;
for(std::vector<std::string>::iterator i = levelnames.begin();
- i < levelnames.end();
+ i < levelnames.end();
++i, ++j)
{
int width = font->get_text_width(i->c_str());
-
+
if ((CL_Display::get_width()/2 - width/2) < x
&& (CL_Display::get_width()/2 + width/2) > x
&& y_pos < y
@@ -123,7 +123,7 @@
return current_level;
}
return -1;
- }
+ }
y_pos += font->get_height() + 4;
}
return -1;
@@ -138,31 +138,31 @@
int x_pos = x_center;
int y_pos = 10;
- if (!background)
+ if (!background)
{
CL_Display::clear_display();
}
- else
+ else
{
// Fill the screen with the background surface
- for(int y=0; y < CL_Display::get_height(); y += background.get_height())
+ for(int y=0; y < CL_Display::get_height(); y += background.get_height())
{
- for(int x=0; x < CL_Display::get_width(); x +=
background.get_width())
+ for(int x=0; x < CL_Display::get_width(); x += background.get_width())
background.put_screen(x, y);
}
}
-
- if (title_name != "-")
+
+ if (title_name != "-")
{
title->print_center(x_center, y_pos, title_name.c_str());
y_pos += 50;
}
- if (surface)
+ if (surface)
{
x_pos -= surface.get_width() / 2;
surface.put_screen(x_pos, y_pos);
-
+
y_pos += surface.get_height() + 20;
}
@@ -180,42 +180,42 @@
y_pos += description.get_height() + 15 + 20;
int j = 0;
-
+
level_start_y_pos = y_pos;
for(std::vector<std::string>::iterator i = levelnames.begin(); i !=
levelnames.end(); ++i)
{
- if (j > accessible_levels)
+ if (j > accessible_levels)
{
// Level is not yet accessible
font->print_center(x_center, y_pos, (*i).c_str());
CL_Display::fill_rect(x_center - font->get_text_width(i->c_str())/2 -
1,
y_pos - 1,
- x_center + font->get_text_width(i->c_str())/2 +
1,
+ x_center + font->get_text_width(i->c_str())/2 +
1,
y_pos + font->get_height() + 1,
0.0, 0.0, 0.0, 0.5);
- }
- else if (j == current_level)
+ }
+ else if (j == current_level)
{
// Level is accessible
CL_Display::fill_rect(x_center - font->get_text_width(i->c_str())/2 -
1,
y_pos - 1,
- x_center + font->get_text_width(i->c_str())/2 +
1,
+ x_center + font->get_text_width(i->c_str())/2 +
1,
y_pos + font->get_height() + 1,
0.0f, 0.0f, 0.0f, 1.0f);
CL_Display::draw_rect(x_center - font->get_text_width(i->c_str())/2 -
1,
y_pos - 1,
- x_center + font->get_text_width(i->c_str())/2 +
1,
+ x_center + font->get_text_width(i->c_str())/2 +
1,
y_pos + font->get_height() + 1,
1.0f, 1.0f, 1.0f, 1.0f);
font->print_center(x_center, y_pos, (*i).c_str());
- }
- else
+ }
+ else
{
font->print_center(x_center, y_pos, (*i).c_str());
}
++j;
- y_pos += font->get_height() + 4;
+ y_pos += font->get_height() + 4;
}
}
@@ -224,28 +224,28 @@
{
status_file = System::basename(name);
std::string rawname = status_file.substr(0, status_file.rfind("."));
-
+
if (verbose > 1) std::cout << "Filename: " << status_file << std::endl;
if (verbose > 1) std::cout << "Rawfile: " << status_file.substr(0,
status_file.rfind(".")) << std::endl;
-
+
status_file = System::get_statdir() + "savegames/" + rawname + ".pst";
-
+
if (verbose > 1) std::cout << "Filename to open: " << status_file <<
std::endl;
- if (System::exist(status_file))
+ if (System::exist(status_file))
{
std::ifstream in;
in.open(status_file.c_str());
in >> accessible_levels;
in.close();
- }
- else
+ }
+ else
{
if (verbose) std::cout << "Theme: No Savegame for this theme found" <<
std::endl;
accessible_levels = 0;
}
- if ((unsigned int)(accessible_levels) >= level_filenames.size())
+ if ((unsigned int)(accessible_levels) >= level_filenames.size())
{
if (verbose) std::cout << "Warning: Accessible_Level is to high! " <<
accessible_levels << std::endl;
accessible_levels = level_filenames.size() - 1;
@@ -257,27 +257,27 @@
Theme::play()
{
preload ();
-
- try
+
+ try
{
assert (!"Theme::play unimplemented");
-
+
ScreenManager::instance()->push_screen
(new
PingusGameSession(PLFResMgr::load_plf(plt.get_levels()[current_level]), true),
true);
if (current_level == accessible_levels)
++accessible_levels;
-
+
if ((unsigned int)(accessible_levels) >= level_filenames.size())
accessible_levels = level_filenames.size() - 1;
-
+
std::ofstream out (status_file.c_str());
out << accessible_levels;
out.close();
}
- catch (PingusError& err)
+ catch (PingusError& err)
{
std::cout << "Pingus_Error: " << err.get_message () << std::endl;
}
@@ -294,12 +294,12 @@
++current_level;
- if ((unsigned int)(current_level) >= level_filenames.size())
+ if ((unsigned int)(current_level) >= level_filenames.size())
current_level = level_filenames.size() - 1;
-
- if (current_level > accessible_levels)
+
+ if (current_level > accessible_levels)
current_level = accessible_levels;
-
+
//std::cout << "Level: " << current_level << std::endl;
}
@@ -312,7 +312,7 @@
if (current_level < 0)
current_level = 0;
-
+
// std::cout << "Level: " << current_level << std::endl;
}
@@ -320,10 +320,10 @@
Theme::load_levels()
{
std::string filename;
-
+
if (verbose) std::cout << "Theme opening levels... " << std::flush;
- for(std::vector<std::string>::iterator i = level_filenames.begin();
+ for(std::vector<std::string>::iterator i = level_filenames.begin();
i != level_filenames.end(); ++i)
{
filename = path_manager.complete("levels/" + *i);
@@ -341,7 +341,7 @@
levelnames.push_back(System::translate(plf.get_levelname()));
}
}
- catch (PingusError& err)
+ catch (PingusError& err)
{
std::cout << "Theme: PingusError: " << err.get_message () <<
std::endl;
}
@@ -351,7 +351,7 @@
std::cout << "Levelnames: " << levelnames.size () << std::endl;
}
-void
+void
Theme::preload ()
{
if (!is_loaded)
Index: theme.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/theme.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- theme.hxx 27 Sep 2002 11:26:44 -0000 1.5
+++ theme.hxx 19 Apr 2003 10:23:17 -0000 1.6
@@ -16,7 +16,7 @@
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-// 02111-1307, USA.
+// 02111-1307, USA.
#ifndef HEADER_PINGUS_THEME_HXX
#define HEADER_PINGUS_THEME_HXX
@@ -59,7 +59,7 @@
bool has_description;
MultiLineText description;
-
+
bool is_loaded;
void load_status(std::string);
@@ -71,7 +71,7 @@
void preload ();
- /** Marks the level, which is under the given coordinates
+ /** Marks the level, which is under the given coordinates
@param x X-Position (normaly CL_Mouse::get_x())
@param y Y-Position (normaly CL_Mouse::get_y()) */
int mark_level_at_point (int x, int y);
@@ -80,7 +80,7 @@
void load (const std::string& filename);
void draw_title ();
void play ();
-
+
private:
Theme (const Theme&);
Theme& operator= (const Theme&);
Index: theme_selector.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/theme_selector.cxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- theme_selector.cxx 15 Apr 2003 19:06:50 -0000 1.11
+++ theme_selector.cxx 19 Apr 2003 10:23:17 -0000 1.12
@@ -77,10 +77,10 @@
{
if (this == &old)
return *this;
-
+
label = old.label;
font = new CL_Font(*(old.font));
-
+
return *this;
}
@@ -92,10 +92,10 @@
// ---=== ThemeSelector ===---
-void
+void
ThemeSelector::Event::on_button_release(CL_InputDevice * /*device*/, const
CL_Key & /*key*/)
{
- if (!enabled) return;
+ if (!enabled) return;
}
void
@@ -112,16 +112,16 @@
break;
case CL_KEY_LEFT:
theme_selector->current_theme++;
- if (theme_selector->current_theme == theme_selector->themes.end())
+ if (theme_selector->current_theme == theme_selector->themes.end())
theme_selector->current_theme = theme_selector->themes.begin();
break;
case CL_KEY_RIGHT:
- if (theme_selector->current_theme == theme_selector->themes.begin())
+ if (theme_selector->current_theme == theme_selector->themes.begin())
theme_selector->current_theme = theme_selector->themes.end();
theme_selector->current_theme--;
break;
-
+
case CL_KEY_DOWN:
(*(theme_selector->current_theme))->next_level();
break;
@@ -145,14 +145,14 @@
{
case CL_MOUSE_LEFTBUTTON: // Left mouse button
tmp_level = theme_selector->mark_level_at_point(int(key.x),
int(key.y));
- if (tmp_level != -1)
+ if (tmp_level != -1)
{
// We clicked on a level, start it now.
enabled = false;
loading_screen.draw();
(*(theme_selector->current_theme))->play();
- enabled = true;
- }
+ enabled = true;
+ }
else
{
// Check if we clicked on one of the red buttons
@@ -161,7 +161,7 @@
&& key.y < (CL_Display::get_height() +
theme_selector->left_arrow.get_height()) / 2)
{
theme_selector->current_theme++;
- if (theme_selector->current_theme ==
theme_selector->themes.end())
+ if (theme_selector->current_theme ==
theme_selector->themes.end())
theme_selector->current_theme =
theme_selector->themes.begin();
}
else if (key.x > CL_Display::get_width() -
theme_selector->right_arrow.get_width()
@@ -169,7 +169,7 @@
&& key.y > (CL_Display::get_height() -
theme_selector->right_arrow.get_height()) / 2
&& key.y < (CL_Display::get_height() +
theme_selector->right_arrow.get_height()) / 2)
{
- if (theme_selector->current_theme ==
theme_selector->themes.begin())
+ if (theme_selector->current_theme ==
theme_selector->themes.begin())
theme_selector->current_theme =
theme_selector->themes.end();
theme_selector->current_theme--;
}
@@ -181,13 +181,13 @@
}
break;
case CL_MOUSE_MIDDLEBUTTON: // Middle mouse
- theme_selector->finished = true;
+ theme_selector->finished = true;
break;
default:
break;
}
}
-
+
theme_selector->draw();
return;
@@ -197,10 +197,10 @@
ThemeSelector::Event::on_mouse_move(CL_InputDevice *, int mouse_x, int mouse_y)
{
//std::cout << "Event: on_mouse_move called.." << std::endl;
- if (!enabled) return;
- //std::cout << "Event: on_mouse_move active.." << std::endl;
+ if (!enabled) return;
+ //std::cout << "Event: on_mouse_move active.." << std::endl;
theme_selector->mark_level_at_point(mouse_x, mouse_y);
-}
+}
ThemeSelector::ThemeSelector()
{
@@ -216,7 +216,7 @@
event->enabled = false;
event->theme_selector = this;
-
+
//CL_Input::chain_button_press.push_back(event);
//CL_Input::chain_button_release.push_back(event);
//CL_Input::chain_mouse_move.push_back(event);
@@ -238,11 +238,11 @@
// CL_Input::chain_mouse_move.remove(event);
// CL_Input::chain_button_press.remove(event);
// CL_Input::chain_button_release.remove(event);
-
+
CL_Input::sig_button_press ().disconnect (on_button_press_slot);
CL_Input::sig_button_release ().disconnect (on_button_release_slot);
CL_Input::sig_mouse_move ().disconnect (on_mouse_move_slot);
-
+
delete event;
}
@@ -250,11 +250,11 @@
ThemeSelector::display()
{
event->enabled = true;
-
- while(CL_Mouse::left_pressed() || CL_Mouse::middle_pressed())
+
+ while(CL_Mouse::left_pressed() || CL_Mouse::middle_pressed())
CL_System::keep_alive();
-
- if (!dir_read)
+
+ if (!dir_read)
{
loading_screen.draw();
@@ -286,16 +286,16 @@
//CL_Display::fill_rect(0,0,640,480,0.5,0.0,0.0,0.5);
(*current_theme)->draw_title();
-
+
{
int item_width = (CL_Display::get_width() / themes.size());
int item_index = themes.size() - std::distance(themes.begin(),
current_theme) - 1;
-
- Display::draw_rect(item_index * item_width, CL_Display::get_height() - 15,
+
+ Display::draw_rect(item_index * item_width, CL_Display::get_height() - 15,
(item_index + 1) * item_width, CL_Display::get_height(),
0.0, 1.0, 0.0, 1.0);
}
-
+
left_arrow.put_screen(0, (CL_Display::get_height() -
left_arrow.get_height()) / 2);
right_arrow.put_screen(CL_Display::get_width() - right_arrow.get_width(),
(CL_Display::get_height() - right_arrow.get_height())
/ 2);
@@ -314,10 +314,10 @@
void
ThemeSelector::readdir(std::string path)
{
- System::Directory dir;
+ System::Directory dir;
std::string pathname;
- std::string::size_type pos = 0;
- std::string::size_type last_pos = 0;
+ std::string::size_type pos = 0;
+ std::string::size_type last_pos = 0;
bool exit_for = false;
// Remove this and pingus_datadir should become a vector
@@ -325,19 +325,19 @@
!exit_for;
last_pos = pos + 1, pos = path.find(":", last_pos))
{
- if (pos == std::string::npos)
+ if (pos == std::string::npos)
{
pathname = path.substr(last_pos, std::string::npos);
exit_for = true;
- }
- else
+ }
+ else
{
pathname = path.substr(last_pos, pos - last_pos);
}
-
+
std::cout << "ThemeSelector: " << pathname << std::endl;
dir = System::opendir(pathname, "*.xml");
-
+
for(System::Directory::iterator entry = dir.begin(); entry != dir.end();
++entry)
{
if (verbose) std::cout << "ThemeSelelector: Name of entry: " <<
pathname + entry->name << std::endl;
Index: theme_selector.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/theme_selector.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- theme_selector.hxx 27 Sep 2002 11:26:44 -0000 1.5
+++ theme_selector.hxx 19 Apr 2003 10:23:17 -0000 1.6
@@ -37,12 +37,12 @@
private:
std::string label;
CL_Font* font;
-
+
public:
ListItem(std::string);
void draw_offset(int x, int y);
bool mouse_over();
-
+
ListItem (const ListItem& old);
ListItem& operator= (const ListItem& old);
};
@@ -56,7 +56,7 @@
ListBox();
void add_item(std::string);
void draw_offset(int x, int y);
-
+
private:
ListBox (const ListBox&);
ListBox& operator= (const ListBox&);
@@ -69,30 +69,30 @@
CL_Slot on_button_release_slot;
CL_Slot on_mouse_move_slot;
- class Event /*: public CL_Event_ButtonPress,
+ class Event /*: public CL_Event_ButtonPress,
public CL_Event_ButtonRelease,
public CL_Event_MouseMove*/
{
public:
bool enabled;
ThemeSelector* theme_selector;
-
+
public:
Event () { }
-
+
virtual void on_button_press(CL_InputDevice *device, const CL_Key &key);
virtual void on_button_release(CL_InputDevice *device, const CL_Key &key);
virtual void on_mouse_move(CL_InputDevice *,int mouse_x, int mouse_y);
-
+
private:
Event (const Event&);
Event& operator= (const Event&);
};
-
+
friend class Event;
Event* event;
-
+
private:
std::vector<AlphaButton*> theme;
std::vector<Theme*> themes;
@@ -118,7 +118,7 @@
void draw();
bool key_pressed(int key);
- /** Marks the level, which is under the given coordinates
+ /** Marks the level, which is under the given coordinates
@param x X-Position (normaly CL_Mouse::get_x())
@param y Y-Position (normaly CL_Mouse::get_y())
@return The current_level at point or -1 if no level is under point */
@@ -129,10 +129,10 @@
public:
ThemeSelector();
~ThemeSelector();
-
+
/** Display the theme selector */
void display ();
-
+
private:
ThemeSelector (const ThemeSelector&);
ThemeSelector& operator= (const ThemeSelector&);
Index: time_display.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/time_display.cxx,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- time_display.cxx 6 Apr 2003 14:37:07 -0000 1.13
+++ time_display.cxx 19 Apr 2003 10:23:17 -0000 1.14
@@ -45,7 +45,7 @@
{
int time_value = server->get_plf()->get_time() -
server->get_world()->get_time_passed();
std::string time_string;
-
+
if (server->get_plf()->get_time() == -1 && !(pingus_debug_flags &
PINGUS_DEBUG_GAMETIME))
{
infinity_symbol.put_screen(CL_Display::get_width()
@@ -53,7 +53,7 @@
2);
}
else
- {
+ {
if (!(pingus_debug_flags & PINGUS_DEBUG_GAMETIME))
{
time_string = GameTime::ticks_to_realtime_string(time_value);
Index: time_display.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/time_display.hxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- time_display.hxx 19 Feb 2003 10:37:31 -0000 1.10
+++ time_display.hxx 19 Apr 2003 10:23:17 -0000 1.11
@@ -33,13 +33,13 @@
Server* server;
CL_Font* font;
CL_Surface infinity_symbol;
-
+
public:
TimeDisplay(Client* c);
virtual ~TimeDisplay() {}
void draw(GraphicContext& gc);
-
+
private:
TimeDisplay (const TimeDisplay&);
TimeDisplay& operator= (const TimeDisplay&);
Index: timer.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/timer.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- timer.cxx 25 Mar 2003 00:37:44 -0000 1.4
+++ timer.cxx 19 Apr 2003 10:23:17 -0000 1.5
@@ -33,7 +33,7 @@
{
unsigned int time = CL_System::get_time() - start_time;
pout(PINGUS_DEBUG_LOADING)
- << "Timer: '" << description << "' took "
+ << "Timer: '" << description << "' took "
<< time << "msec" << std::endl;
}
Index: timer.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/timer.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- timer.hxx 7 Oct 2002 23:11:09 -0000 1.6
+++ timer.hxx 19 Apr 2003 10:23:17 -0000 1.7
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -37,7 +37,7 @@
/** Stop the timer
@return The time passed since the last start() */
void stop();
-
+
private:
Timer (const Timer&);
Timer& operator= (const Timer&);
Index: true_server.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/true_server.cxx,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- true_server.cxx 7 Apr 2003 11:58:19 -0000 1.19
+++ true_server.cxx 19 Apr 2003 10:23:17 -0000 1.20
@@ -62,7 +62,7 @@
return fast_forward;
}
-void
+void
TrueServer::set_pause(bool value)
{
pause = value;
Index: true_server.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/true_server.hxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- true_server.hxx 5 Apr 2003 18:36:50 -0000 1.12
+++ true_server.hxx 19 Apr 2003 10:23:17 -0000 1.13
@@ -38,15 +38,15 @@
void set_fast_forward(bool value);
bool get_fast_forward();
-
+
void set_pause(bool);
bool get_pause();
/** set the server into the finshed state, this is used when you
press ESCAPE inside a game */
void set_finished();
-
-private:
+
+private:
TrueServer (const TrueServer&);
TrueServer& operator= (const TrueServer&);
};
Index: usb_mouse_controller.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/usb_mouse_controller.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- usb_mouse_controller.cxx 20 Oct 2002 18:28:49 -0000 1.3
+++ usb_mouse_controller.cxx 19 Apr 2003 10:23:17 -0000 1.4
@@ -50,7 +50,7 @@
{
return mouse.y;
}
-
+
Vector
USBMouseController::get_pos ()
{
@@ -77,7 +77,7 @@
if (retval)
{
unsigned char data[4];
-
+
read (fd, data, sizeof (data));
mouse.button1 = ((data[0]&1)>0);
Index: usb_mouse_controller.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/usb_mouse_controller.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- usb_mouse_controller.hxx 28 Sep 2002 11:52:22 -0000 1.6
+++ usb_mouse_controller.hxx 19 Apr 2003 10:23:17 -0000 1.7
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -35,7 +35,7 @@
class USBMouseData
{
-public:
+public:
USBMouseData () {
button1 = button2 = button3 = button4 = button5 = false;
x = 0;
@@ -66,7 +66,7 @@
int get_x ();
int get_y ();
-
+
Vector get_pos ();
void keep_alive ();
Index: vector.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/vector.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- vector.cxx 3 Nov 2002 22:20:29 -0000 1.3
+++ vector.cxx 19 Apr 2003 10:23:17 -0000 1.4
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -38,7 +38,7 @@
y = old.y;
z = old.z;
}
-
+
return *this;
}
@@ -97,7 +97,7 @@
Vector::normalize ()
{
float f = sqrt(x * x + y * y + z * z);
-
+
if (f)
{
x /= f;
@@ -117,15 +117,15 @@
{
const float s = sin(angle);
const float c = cos(angle);
-
+
return Vector( x * (pos.x * pos.x * (1-c) + c)
+ y * (pos.x * pos.y * (1-c) - pos.z *s)
+ z * (pos.x * pos.z * (1-c) + pos.y *s),
-
+
x * (pos.y * pos.x * (1-c) + pos.z *s)
+ y * (pos.y * pos.y * (1-c) + c)
+ z * (pos.y * pos.z * (1-c) - pos.x *s),
-
+
x * (pos.x * pos.z * (1-c) - pos.y *s)
+ y * (pos.y * pos.z * (1-c) + pos.x *s)
+ z * (pos.z * pos.z * (1-c) + c)
@@ -138,7 +138,7 @@
float x = b.x - a.x;
float y = b.y - a.y;
float z = b.z - a.z;
-
+
return fabsf(sqrt((x * x) + (y * y) + (z * z)));
}
@@ -147,7 +147,7 @@
{
float x = b.x - a.x;
float y = b.y - a.y;
-
+
return fabsf(sqrt((x * x) + (y * y)));
}
Index: vector.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/vector.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- vector.hxx 3 Nov 2002 22:20:29 -0000 1.3
+++ vector.hxx 19 Apr 2003 10:23:17 -0000 1.4
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -29,10 +29,10 @@
float x;
float y;
float z;
-
+
public:
explicit Vector (float x_=0, float y_=0, float z_=0);
-
+
Vector (const Vector& old);
Vector& operator= (const Vector& old);
@@ -41,15 +41,15 @@
Vector operator+ (const Vector& add) const;
Vector operator- (const Vector& sub) const;
Vector operator* ( float mul) const;
-
+
Vector& operator+= (const Vector& add);
Vector& operator-= (const Vector& sub);
Vector& operator*= ( float mul);
-
+
void normalize ();
float length() const;
-
+
Vector rotate (float angle, const Vector& pos) const;
static float distance(const Vector& a, const Vector& b);
@@ -57,7 +57,7 @@
/** Calculate a position between a and b, relative to the value of
\a perc (perc == 0 -> a, perc == 1.0 -> b) */
- static Vector interpolate(const Vector& a, const Vector& b, float perc);
+ static Vector interpolate(const Vector& a, const Vector& b, float perc);
friend std::ostream& operator<< (std::ostream& os, const Vector& v);
};
Index: view.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/view.cxx,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- view.cxx 28 Sep 2002 11:52:22 -0000 1.13
+++ view.cxx 19 Apr 2003 10:23:17 -0000 1.14
@@ -34,7 +34,7 @@
assert(world);
size = s;
-
+
// FIXME: clip_rect = CL_ClipRect(x1, y1, x2 + 1, y2 + 1);
x1_pos = x1;
@@ -42,7 +42,7 @@
x2_pos = x2;
y2_pos = y2;
-
+
x_offset = 0;
y_offset = 0;
@@ -57,18 +57,18 @@
View::draw()
{
assert(world);
-
+
// Update the scroll position
//display_gc.set_zoom (2.0f);
display_gc.set_offset (x_offset - (x2_pos - x1_pos)/2,
y_offset - (y2_pos - y1_pos)/2);
world->draw (display_gc);
-
+
cap.set_pingu(current_pingu);
- cap.draw_offset(get_x_pos() + get_x_offset(),
+ cap.draw_offset(get_x_pos() + get_x_offset(),
get_y_pos() + get_y_offset(),
size);
-
+
// FIXME: CL_Display::pop_clip_rect();
}
@@ -79,7 +79,7 @@
{
mouse_over = true;
}
- else
+ else
{
mouse_over = false;
}
@@ -172,13 +172,13 @@
return size;
}
-void
+void
View::set_pingu(Pingu* p)
{
current_pingu = p;
}
-Vector
+Vector
View::get_center ()
{
return Vector (-x_offset + get_width ()/2, -y_offset + get_height ()/2);
Index: view.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/view.hxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- view.hxx 19 Feb 2003 09:50:36 -0000 1.11
+++ view.hxx 19 Apr 2003 10:23:17 -0000 1.12
@@ -30,7 +30,7 @@
class Controller;
class Client;
-/** A class to controll the rentering of the playfield, each display on
+/** A class to controll the rentering of the playfield, each display on
the screen, which displays the pingus world is an view object. */
class View
{
@@ -40,15 +40,15 @@
CL_ClipRect clip_rect;
/** The position of the view in the world */
- Range x_offset, y_offset;
+ Range x_offset, y_offset;
bool mouse_over;
/** The zoom of the View, 1 is default */
- double size;
+ double size;
int mouse_x;
int mouse_y;
-
+
CaptureRectangle cap;
Pingu* current_pingu;
/// Static objects which are equal for all Views
@@ -58,7 +58,7 @@
public:
/** @name The position of the View.
-
+
The View should reach from [x1_pos, x2_pos), x2_pos is not
included in the View, just like in {\tt CL_Display::fill_rect()}. */
//@{
@@ -79,7 +79,7 @@
int get_x_offset() const;
int get_y_offset() const;
int get_x_pos() const;
- int get_y_pos() const;
+ int get_y_pos() const;
void set_x_offset(int);
void set_y_offset(int);
void shift_x_offset(int);
@@ -97,7 +97,7 @@
static void set_world(World*);
void on_pointer_move (int x, int y);
-
+
private:
View (const View&);
View& operator= (const View&);
Index: wav_provider.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/wav_provider.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- wav_provider.cxx 29 Dec 2002 23:29:00 -0000 1.5
+++ wav_provider.cxx 19 Apr 2003 10:23:17 -0000 1.6
@@ -41,8 +41,8 @@
}
else
{
- wav_data = Mix_LoadWAV(str.c_str());
-
+ wav_data = Mix_LoadWAV(str.c_str());
+
if (!wav_data)
{
throw PingusError ("PingusWaveProvider: Couldn't open '" + str + "'");
@@ -52,10 +52,10 @@
wav_data->volume = 80;
- if (!wav_data)
+ if (!wav_data)
{
throw PingusError("PingusWavProvider: Couldn't load " + str + ":
" + SDL_GetError());
- }
+ }
else
{
wave[str] = wav_data;
Index: wav_provider.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/wav_provider.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- wav_provider.hxx 27 Sep 2002 11:26:44 -0000 1.5
+++ wav_provider.hxx 19 Apr 2003 10:23:17 -0000 1.6
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -30,10 +30,10 @@
{
private:
static std::map<std::string, Mix_Chunk*> wave;
-
+
public:
static Mix_Chunk* load (const std::string& str);
-
+
private:
PingusWavProvider ();
PingusWavProvider (const PingusWavProvider&);
Index: world.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/world.cxx,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- world.cxx 25 Mar 2003 00:56:33 -0000 1.44
+++ world.cxx 19 Apr 2003 10:23:17 -0000 1.45
@@ -35,8 +35,8 @@
using Actions::Bomber;
-static
-bool WorldObj_less (WorldObj* a, WorldObj* b)
+static
+bool WorldObj_less (WorldObj* a, WorldObj* b)
{
return a->get_z_pos () < b->get_z_pos ();
}
@@ -49,7 +49,7 @@
colmap(gfx_map->get_colmap()),
view(0),
gravitational_acceleration(0.25f)
-{
+{
WorldObj::set_world(this);
start_x_pos = plf->get_startx();
@@ -104,12 +104,12 @@
for (WorldObjIter it = world_obj.begin(); it != world_obj.end(); ++it) {
delete *it;
}
-
+
delete game_time;
}
// Merge the different layers on the screen together
-/*void
+/*void
World::draw(int x1, int y1, int w, int h,
int x_of, int y_of, float s)
{
@@ -120,7 +120,7 @@
{
(*obj)->draw_offset(x_of, y_of, s);
}
-
+
particle_holder->draw_offset(x_of, y_of, s);
}*/
@@ -143,10 +143,10 @@
for(WorldObjIter obj = world_obj.begin(); obj != world_obj.end(); ++obj)
{
(*obj)->draw_smallmap (smallmap);
- }
+ }
}
-void
+void
World::update()
{
WorldObj::set_world(this);
@@ -160,7 +160,7 @@
while (armageddon_count < pingus->get_end_id())
{
Pingu* pingu = pingus->get_pingu(armageddon_count);
-
+
if (pingu && pingu->get_status() == PS_ALIVE)
{
pingu->request_set_action(Bomber);
@@ -171,11 +171,11 @@
++armageddon_count;
}
}
-
+
++armageddon_count;
}
}
-
+
// Let all pingus move and
// Let the pingus catch each other and
// Let the traps catch the pingus and
@@ -198,7 +198,7 @@
World::get_width()
{
assert(gfx_map);
- return gfx_map->get_width();
+ return gfx_map->get_width();
}
int
@@ -214,7 +214,7 @@
return game_time->get_ticks();
}
-void
+void
World::armageddon(void)
{
PingusSound::play_sound ("goodidea");
@@ -228,7 +228,7 @@
return colmap;
}
-PinguMap*
+PinguMap*
World::get_gfx_map ()
{
return gfx_map;
@@ -240,7 +240,7 @@
return action_holder;
}*/
-void
+void
World::play_sound(std::string name, const Vector& pos, float volume)
{
if (view)
@@ -285,7 +285,7 @@
}
}
}
-
+
return current_pingu;
}
Index: world.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/world.hxx,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- world.hxx 25 Mar 2003 00:56:33 -0000 1.27
+++ world.hxx 19 Apr 2003 10:23:17 -0000 1.28
@@ -51,8 +51,8 @@
}
-/** The World holds all objects of the pingu enviroment.
-
+/** The World holds all objects of the pingu enviroment.
+
It holds the pingus, traps, exits, entrances, etc.. It keeps
control that all objects become time to move and can catch each
other. */
@@ -79,7 +79,7 @@
std::vector<WorldObj*> world_obj;
typedef std::vector<WorldObj*>::iterator WorldObjIter;
-
+
// These pointers hold objects and must be deleted
Particles::PinguParticleHolder* pingu_particle_holder;
Particles::RainParticleHolder* rain_particle_holder;
@@ -100,7 +100,7 @@
public:
World(PLF*);
virtual ~World();
-
+
/** Add an object to the world, obj needs to be new'ed the World
make sure that it will get deleted */
void add_object (WorldObj* obj);
@@ -133,7 +133,7 @@
/** @return A pointer to the worlds pingu particle holder */
Particles::PinguParticleHolder* get_pingu_particle_holder () { return
pingu_particle_holder; }
-
+
/** @return A pointer to the worlds rain particle holder */
Particles::RainParticleHolder* get_rain_particle_holder () { return
rain_particle_holder; }
@@ -148,7 +148,7 @@
/** Play a sound as if it would have been generated at the given
position, adjust panning and volume by the position relative to
- the center of the screen
+ the center of the screen
@param name The name of the sound to play ("ohno", not "sounds/ohno.wav")
@param pos Position from which the sound seems to come (z-pos is
going to be ignored) void play_sound (std::string name, const
@@ -157,7 +157,7 @@
void play_sound (std::string name, const Vector& pos, float volume = 0.5f);
/** Sets the main view, it is needed to play stereo wave and for
- other screen orientated effects
+ other screen orientated effects
FIXME: This is really ugly and should be handled otherwise, by a
FIXME: play_sound (View*) analog to draw() and update() or something
@@ -168,10 +168,10 @@
/** @return the pingu at the given word coordinates, 0 if none is there */
Pingu* get_pingu (const Vector& pos);
-
+
/** Return a pointer to the GameTime object of this World */
GameTime* get_game_time ();
-
+
int get_start_x() const { return start_x_pos; }
int get_start_y() const { return start_y_pos; }
Index: worldobj.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldobj.cxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- worldobj.cxx 19 Feb 2003 09:50:36 -0000 1.11
+++ worldobj.cxx 19 Apr 2003 10:23:17 -0000 1.12
@@ -16,7 +16,7 @@
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-// 02111-1307, USA.
+// 02111-1307, USA.
#include <typeinfo>
#include <iostream>
@@ -38,7 +38,7 @@
WorldObj::~WorldObj()
{
-
+
}
void
@@ -46,18 +46,18 @@
{
// do nothing
}
-
-void
+
+void
WorldObj::update()
{
// do nothing
}
-void
+void
WorldObj::draw_offset(int /*x*/, int /*y*/, float /*s*/)
{
// do nothing
- std::cout << "WorldObj::draw_offset(): not implemented, probally a bug: "
+ std::cout << "WorldObj::draw_offset(): not implemented, probally a bug: "
<< typeid(*this).name () << std::endl;
}
@@ -71,10 +71,10 @@
WorldObj::draw (GraphicContext& gc)
{
// FIXME: I need some docu on the meaning of get_x_offset() and co.
- std::cout << "WorldObj:draw(GraphicContext): Using compat-wrapper: "
+ std::cout << "WorldObj:draw(GraphicContext): Using compat-wrapper: "
<< typeid(*this).name () << std::endl;
- draw_offset (static_cast<int>(gc.get_x_offset () + gc.get_width ()/2),
- static_cast<int>(gc.get_y_offset () + gc.get_height ()/2),
+ draw_offset (static_cast<int>(gc.get_x_offset () + gc.get_width ()/2),
+ static_cast<int>(gc.get_y_offset () + gc.get_height ()/2),
gc.get_zoom ());
}
Index: worldobj.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldobj.hxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- worldobj.hxx 10 Oct 2002 12:25:53 -0000 1.11
+++ worldobj.hxx 19 Apr 2003 10:23:17 -0000 1.12
@@ -41,7 +41,7 @@
public:
/** Set the world pointer for all world objects */
static void set_world(World*);
-
+
/** Return the current active world */
static World* get_world () { return world; }
@@ -85,7 +85,7 @@
* specifies how much time is passed since the last update
* delta = 1.0 means that one second of realtime has passed. */
virtual void update ();
-
+
virtual WorldObjData* get_data () { return 0; }
};
Index: worldobj_data.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldobj_data.hxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- worldobj_data.hxx 5 Mar 2003 19:13:59 -0000 1.10
+++ worldobj_data.hxx 19 Apr 2003 10:23:17 -0000 1.11
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -42,16 +42,16 @@
public:
/// Empty placeholder
WorldObjData() {}
-
+
/// Empty placeholder
WorldObjData (const WorldObjData&) { }
-
+
/// Empty placeholder
WorldObjData& operator= (const WorldObjData&) { return *this; }
-
+
/// Empty placeholder
virtual ~WorldObjData() {}
-
+
/** Writte the content of this object formated as xml to the given
stream */
virtual void write_xml (std::ostream& xml) =0;
Index: worldobj_data_factory.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldobj_data_factory.cxx,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- worldobj_data_factory.cxx 5 Mar 2003 22:18:51 -0000 1.33
+++ worldobj_data_factory.cxx 19 Apr 2003 10:23:17 -0000 1.34
@@ -58,13 +58,13 @@
// Register all WorldObjData's
}
-WorldObjDataFactory*
-WorldObjDataFactory::instance ()
-{
- if ( ! instance_)
+WorldObjDataFactory*
+WorldObjDataFactory::instance ()
+{
+ if ( ! instance_)
{
instance_ = new WorldObjDataFactory ();
-
+
// Registring Factories
new WorldObjDataFactoryImpl<LiquidData>("liquid");
new WorldObjDataFactoryImpl<HotspotData>("hotspot");
@@ -82,7 +82,7 @@
new WorldObjDataFactoryImpl<SmasherData>("smasher");
new WorldObjDataFactoryImpl<SpikeData>("spike");
- // Special Objects
+ // Special Objects
new WorldObjDataFactoryImpl<SwitchDoorData>("switchdoor");
new WorldObjDataFactoryImpl<InfoBoxData>("infobox");
new WorldObjDataFactoryImpl<IceBlockData>("iceblock");
@@ -152,11 +152,11 @@
}
else
{
- PingusError::raise ("WorldObjDataFactory::create: Error, no type
given. - "
+ PingusError::raise ("WorldObjDataFactory::create: Error, no type
given. - "
+ std::string((char*) cur->name));
}
}
-
+
return 0; //never reached
}
@@ -167,13 +167,13 @@
//std::cout << "WorldObjDataFactory::create (id, xmlDocPtr doc, xmlNodePtr
cur)" << std::endl;
std::map<std::string, WorldObjDataAbstractFactory*>::iterator it =
factories.find(id);
-
+
if (it == factories.end())
PingusError::raise("WorldObjDataFactory: Invalid id: '" + id + "' at line "
+ to_string(XMLhelper::get_line(cur)));
- else
+ else
return it->second->create (doc, cur);
-
+
return 0; // never reached
}
Index: worldobj_data_factory.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldobj_data_factory.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- worldobj_data_factory.hxx 27 Sep 2002 11:26:44 -0000 1.6
+++ worldobj_data_factory.hxx 19 Apr 2003 10:23:17 -0000 1.7
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -68,9 +68,9 @@
WorldObjDataAbstractFactory (const std::string& id) {
WorldObjDataFactory::instance ()-> register_factory (id, this);
}
-
+
virtual WorldObjData* create (xmlDocPtr doc, xmlNodePtr cur) =0;
-
+
private:
WorldObjDataAbstractFactory (const WorldObjDataAbstractFactory&);
WorldObjDataAbstractFactory& operator= (const WorldObjDataAbstractFactory&);
@@ -86,12 +86,12 @@
: WorldObjDataAbstractFactory (id) {}
WorldObjData* create (xmlDocPtr doc, xmlNodePtr cur) {
- return new T (doc, cur);
+ return new T (doc, cur);
}
private:
WorldObjDataFactoryImpl (const WorldObjDataFactoryImpl&);
- WorldObjDataFactoryImpl& operator= (const WorldObjDataFactoryImpl&);
+ WorldObjDataFactoryImpl& operator= (const WorldObjDataFactoryImpl&);
};
#endif
Index: xml_file_reader.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/xml_file_reader.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- xml_file_reader.cxx 18 Feb 2003 10:14:52 -0000 1.3
+++ xml_file_reader.cxx 19 Apr 2003 10:23:17 -0000 1.4
@@ -52,18 +52,18 @@
{
// Whole section is empty
return NULL;
- }
+ }
xmlNodePtr node = section_node->children;
-
+
while (node)
{
- if (xmlIsBlankNode(node))
+ if (xmlIsBlankNode(node))
{
node = node->next;
continue;
}
-
+
if (XMLhelper::equal_str(node->name, name))
{
return node;
@@ -99,7 +99,7 @@
return true;
}
- return false;
+ return false;
}
bool
Index: xml_file_reader.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/xml_file_reader.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- xml_file_reader.hxx 26 Mar 2003 12:01:17 -0000 1.4
+++ xml_file_reader.hxx 19 Apr 2003 10:23:17 -0000 1.5
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2002 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -29,7 +29,7 @@
private:
/** Pointer to the XML document */
xmlDocPtr doc;
-
+
/** Pointer to the current section node, if one wants to access the
content of the section one has to use cur->children */
xmlNodePtr section_node;
@@ -58,7 +58,7 @@
bool read_enum (const char* name, E& value, T enum2string)
{
xmlNodePtr node = find_node(name);
-
+
if (node)
{
value = enum2string(XMLhelper::parse_string(doc, node));
Index: xml_file_writer.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/xml_file_writer.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- xml_file_writer.cxx 18 Feb 2003 01:23:51 -0000 1.3
+++ xml_file_writer.cxx 19 Apr 2003 10:23:17 -0000 1.4
@@ -29,7 +29,7 @@
XMLFileWriter::~XMLFileWriter()
{
-
+
}
void
Index: xml_file_writer.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/xml_file_writer.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- xml_file_writer.hxx 26 Mar 2003 12:01:17 -0000 1.4
+++ xml_file_writer.hxx 19 Apr 2003 10:23:17 -0000 1.5
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2002 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -51,11 +51,11 @@
void write_vector (const char* name, const Vector&);
template<class E, class F>
- void write_enum (const char* name, E value, F enum2string)
+ void write_enum (const char* name, E value, F enum2string)
{
(*out) << "<" << name << ">" << enum2string(value) << "</" << name <<
">\n";
}
-
+
private:
XMLFileWriter (const XMLFileWriter&);
XMLFileWriter& operator= (const XMLFileWriter&);
Index: xml_helper.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/xml_helper.cxx,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- xml_helper.cxx 9 Apr 2003 21:57:24 -0000 1.30
+++ xml_helper.cxx 19 Apr 2003 10:23:17 -0000 1.31
@@ -39,13 +39,13 @@
return s;
#else
xmlNodePtr cur = &node;
-
+
while (cur != NULL)
{
s << cur->name << "/";
cur = cur->parent;
}
-
+
return s;
#endif
}
@@ -69,10 +69,10 @@
XMLhelper::get_prop (xmlNodePtr cur, const char* name, std::string& value)
{
char* retval = reinterpret_cast<char*>(xmlGetProp(cur,
reinterpret_cast<const xmlChar*>(name)));
-
+
if (!retval)
return false;
-
+
value = retval;
xmlFree(retval);
return true;
@@ -82,10 +82,10 @@
XMLhelper::get_prop (xmlNodePtr cur, const char* name, float& value)
{
char* retval = reinterpret_cast<char*>(xmlGetProp(cur,
reinterpret_cast<const xmlChar*>(name)));
-
+
if (!retval)
return false;
-
+
value = strtod(retval, reinterpret_cast<char**>(NULL));
xmlFree(retval);
return true;
@@ -97,7 +97,7 @@
char* retval = reinterpret_cast<char*>(xmlGetProp(cur,
reinterpret_cast<const xmlChar*>(name)));
if (!retval)
return false;
-
+
value = strtol(retval, reinterpret_cast<char**>(NULL), 10);
xmlFree(retval);
return true;
@@ -107,10 +107,10 @@
XMLhelper::get_prop (xmlNodePtr cur, const char* name, bool& value)
{
char* retval = reinterpret_cast<char*>(xmlGetProp(cur,
reinterpret_cast<const xmlChar*>(name)));
-
+
if (!retval)
return false;
-
+
value = strtol(retval, reinterpret_cast<char**>(NULL), 10);
xmlFree(retval);
return true;
@@ -122,7 +122,7 @@
xmlChar* retval = xmlNodeListGetString(doc, cur, inLine);
if (!retval)
return false;
-
+
value = xmlChar2string(retval);
xmlFree(retval);
return true;
@@ -134,7 +134,7 @@
char * retval = reinterpret_cast<char*>(xmlNodeListGetString(doc, cur,
inLine));
if (!retval)
return false;
-
+
value = strtod(retval, reinterpret_cast<char**>(NULL));
xmlFree(retval);
return true;
@@ -146,7 +146,7 @@
char * retval = reinterpret_cast<char*>(xmlNodeListGetString(doc, cur,
inLine));
if (!retval)
return false;
-
+
value = strtol(retval, reinterpret_cast<char**>(NULL), 10);
xmlFree(retval);
return true;
@@ -159,7 +159,7 @@
std::string str = arg_str;
std::string::size_type i;
// std::cout << "encode_xml: " << str << std::endl;
-
+
i = str.find("<");
if (i != std::string::npos)
str.replace(i, 1, "<");
@@ -177,10 +177,10 @@
XMLhelper::parse_vector (xmlDocPtr doc, xmlNodePtr cur)
{
Vector pos;
- cur = cur->children;
+ cur = cur->children;
while (cur)
{
- if (xmlIsBlankNode(cur))
+ if (xmlIsBlankNode(cur))
{
cur = cur->next;
continue;
@@ -215,7 +215,7 @@
XMLhelper::parse_int (xmlDocPtr doc, xmlNodePtr cur)
{
cur = cur->children;
-
+
int number = 999;
if (!node_list_get_string(doc, cur, 1, number)) {
std::cout << "Error: XMLhelper: parse_int: Field empty: " << *cur <<
std::endl;
@@ -227,7 +227,7 @@
XMLhelper::parse_float (xmlDocPtr doc, xmlNodePtr cur)
{
cur = cur->children;
-
+
float number = 3.1415927f;
if (!node_list_get_string(doc, cur, 1, number)) {
std::cout << "XMLhelper: parse_int: Field empty: " << *cur << std::endl;
@@ -242,8 +242,8 @@
cur = cur->children;
while (cur)
- {
- if (xmlIsBlankNode(cur))
+ {
+ if (xmlIsBlankNode(cur))
{
cur = cur->next;
continue;
@@ -267,37 +267,37 @@
}
else
{
- std::cout << "XMLhelper: Unhandled color ident: " << cur->name <<
std::endl;
+ std::cout << "XMLhelper: Unhandled color ident: " << cur->name <<
std::endl;
}
cur = cur->next;
}
return color;
}
-ResDescriptor
+ResDescriptor
XMLhelper::parse_surface(xmlDocPtr doc, xmlNodePtr cur)
{
ResDescriptor desc;
- cur = cur->children;
+ cur = cur->children;
while (cur)
{
- if (xmlIsBlankNode(cur))
+ if (xmlIsBlankNode(cur))
{
cur = cur->next;
continue;
}
-
+
std::string type;
if (get_prop(cur, "type", type))
{
if (type == "file")
{
- desc.type = ResDescriptor::RD_FILE;
+ desc.type = ResDescriptor::RD_FILE;
xmlNodePtr ccur = cur->children;
desc.type = ResDescriptor::RD_RESOURCE;
while (ccur)
{
- if (xmlIsBlankNode(cur))
+ if (xmlIsBlankNode(cur))
{
cur = cur->next;
continue;
@@ -308,7 +308,7 @@
if (node_list_get_string(doc, ccur->children, 1,
desc.res_name))
{
desc.type = ResDescriptor::RD_FILE;
- }
+ }
}
else if (XMLhelper::equal_str(ccur->name, "modifier"))
{
@@ -334,7 +334,7 @@
desc.type = ResDescriptor::RD_RESOURCE;
while (ccur)
{
- if (xmlIsBlankNode(ccur))
+ if (xmlIsBlankNode(ccur))
{
ccur = ccur->next;
continue;
@@ -353,10 +353,10 @@
{
//std::cout << "Modifier!!!!!" << std::endl;
std::string ident;
- if (node_list_get_string(doc, ccur->children, 1, ident))
+ if (node_list_get_string(doc, ccur->children, 1, ident))
{
//std::cout << "Seen: modifier: " << ident <<
std::endl;
-
+
desc.modifier =
ResourceModifierNS::rs_from_string(ident);
}
}
@@ -369,7 +369,7 @@
}
else
{
- std::cout << "XMLhelper: Unhandled resource type: " << type <<
std::endl;
+ std::cout << "XMLhelper: Unhandled resource type: " << type <<
std::endl;
}
}
cur = cur->next;
@@ -380,13 +380,13 @@
return desc;
}
-std::string
+std::string
XMLhelper::parse_string (xmlDocPtr doc, xmlNodePtr cur)
{
std::string ret_str;
if (!node_list_get_string(doc,cur->children, 1, ret_str) && maintainer_mode)
- {
+ {
std::cout << "XMLhelper::parse_string: Field empty: " << *cur <<
std::endl;
}
@@ -424,7 +424,7 @@
xml << " </resource></surface>" << std::endl;
}
-void
+void
XMLhelper::write_vector_xml(std::ostream& xml, const Vector& pos)
{
xml << " <position>\n"
@@ -464,11 +464,11 @@
unsigned char* out = new unsigned char[out_len];
//std::cout << "OUT: in_len: " << in_len << " out_len: " << out_len <<
std::endl;
- int ret = UTF8Toisolat1(out, &out_len, in, &in_len);
+ int ret = UTF8Toisolat1(out, &out_len, in, &in_len);
if (ret != 0)
{
- std::cout << "Error: XMLhelper: Encoding failed: ret: " << ret
+ std::cout << "Error: XMLhelper: Encoding failed: ret: " << ret
<< " in: " << in_len
<< " out: " << out_len
<< " str: " << reinterpret_cast<const char*>(in)
Index: xml_helper.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/xml_helper.hxx,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- xml_helper.hxx 4 Apr 2003 11:23:27 -0000 1.20
+++ xml_helper.hxx 19 Apr 2003 10:23:17 -0000 1.21
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -70,10 +70,10 @@
cur */
static xmlNodePtr skip_blank (xmlNodePtr cur);
- /** Compare a xmlChar* string with a char* one
+ /** Compare a xmlChar* string with a char* one
@return true if both strings are equal */
static bool equal_str (const xmlChar* comp, const char* orig);
-
+
/** get the propertie of the given name
@param name the name of the property
@param value gets the value if the property exists or remains unchanged
@@ -127,7 +127,7 @@
static void init();
static void deinit();
-
+
private:
XMLhelper ();
XMLhelper (const XMLhelper&);
Index: xml_pdf.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/xml_pdf.cxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- xml_pdf.cxx 15 Jan 2003 21:16:41 -0000 1.7
+++ xml_pdf.cxx 19 Apr 2003 10:23:17 -0000 1.8
@@ -32,7 +32,7 @@
PingusError::raise("XMLPDF: Couldn't open \"" + filename + "\"");
xmlNodePtr cur = doc->ROOT;
-
+
if (XMLhelper::equal_str(cur->name, "pingus-demo"))
{
cur = cur->children;
@@ -105,7 +105,7 @@
i != events.end();
++i)
i->write_xml(xml);
-
+
xml << " </events>\n";
}
@@ -117,14 +117,14 @@
}
/** @return the levelname */
-std::string
+std::string
XMLPDF::get_levelname()
{
return levelname;
}
/** Returns a reference to the events of this demo */
-std::vector<ServerEvent>
+std::vector<ServerEvent>
XMLPDF::get_events()
{
return events;
Index: xml_pdf.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/xml_pdf.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- xml_pdf.hxx 15 Jan 2003 21:16:41 -0000 1.2
+++ xml_pdf.hxx 19 Apr 2003 10:23:17 -0000 1.3
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2002 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Index: xml_plf.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/xml_plf.cxx,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- xml_plf.cxx 5 Apr 2003 23:24:32 -0000 1.37
+++ xml_plf.cxx 19 Apr 2003 10:23:17 -0000 1.38
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -81,13 +81,13 @@
if (!cur->children)
std::cout << "XMLPLF: node: " << cur->name << std::endl;
-
+
cur = cur->children;
cur = XMLhelper::skip_blank(cur);
-
+
while (cur)
{
- if (xmlIsBlankNode(cur))
+ if (xmlIsBlankNode(cur))
{
cur = cur->next;
continue;
@@ -166,7 +166,7 @@
else if (XMLhelper::equal_str(cur->name, "weather"))
{
worldobjs_data.push_back(WorldObjDataFactory::instance()->create
(doc, cur));
- }
+ }
else
{
printf("XMLPLF: Unhandled: %s\n", reinterpret_cast<const
char*>(cur->name));
@@ -183,7 +183,7 @@
XMLPLF::parse_group (xmlNodePtr cur)
{
cur = cur->children;
-
+
while (cur)
{
if (XMLhelper::equal_str(cur->name, "background"))
@@ -246,12 +246,12 @@
while (cur)
{
- if (xmlIsBlankNode(cur))
+ if (xmlIsBlankNode(cur))
{
cur = cur->next;
continue;
}
-
+
if (XMLhelper::equal_str(cur->name, "position"))
{
Vector pos = XMLhelper::parse_vector(doc, cur);
@@ -266,7 +266,7 @@
}
}
-void
+void
XMLPLF::parse_background (xmlNodePtr cur)
{
// The allocated objects are delete'd in the destructor
@@ -285,19 +285,19 @@
}
}
-void
+void
XMLPLF::parse_actions (xmlNodePtr cur)
{
cur = cur->children;
while (cur)
{
- if (xmlIsBlankNode(cur))
+ if (xmlIsBlankNode(cur))
{
cur = cur->next;
continue;
}
-
+
ActionData button;
button.name = action_from_string(reinterpret_cast<const
char*>(cur->name));
@@ -309,16 +309,16 @@
}
actions.push_back(button);
-
+
cur = cur->next;
- }
+ }
}
void
XMLPLF::parse_global (xmlNodePtr cur)
{
XMLFileReader reader(doc, cur);
-
+
reader.read_string("author", author);
reader.read_int("number-of-pingus", number_of_pingus);
reader.read_int("number-to-save", number_to_save);
@@ -333,7 +333,7 @@
cur = cur->children;
while (cur)
{
- if (xmlIsBlankNode(cur))
+ if (xmlIsBlankNode(cur))
{
cur = cur->next;
continue;
@@ -357,7 +357,7 @@
std::string lang;
if (XMLhelper::node_list_get_string(doc, cur->children, 1, desc)) {
- if (XMLhelper::get_prop(cur, "lang", lang))
+ if (XMLhelper::get_prop(cur, "lang", lang))
description[lang] = desc;
else
description[default_language] = desc;
@@ -367,7 +367,7 @@
}
}
-void
+void
XMLPLF::parse_groundpiece (xmlNodePtr cur)
{
groundpieces.push_back(WorldObjsData::GroundpieceData (doc, cur));
@@ -377,7 +377,7 @@
XMLPLF::parse_traps (xmlNodePtr cur)
{
xmlNodePtr child_cur = XMLhelper::skip_blank(cur->children);
-
+
if (XMLhelper::equal_str(child_cur->name, "type"))
{
std::string name;
Index: xml_plf.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/xml_plf.hxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- xml_plf.hxx 27 Sep 2002 11:26:44 -0000 1.9
+++ xml_plf.hxx 19 Apr 2003 10:23:17 -0000 1.10
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// Pingus - A free Lemmings clone
// Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
@@ -12,7 +12,7 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -26,7 +26,7 @@
class XMLPLF : public PLF
{
private:
- xmlDocPtr doc;
+ xmlDocPtr doc;
void parse_file ();
@@ -45,7 +45,7 @@
public:
XMLPLF (const std::string& filename);
virtual ~XMLPLF();
-
+
private:
XMLPLF (const XMLPLF&);
XMLPLF& operator= (const XMLPLF&);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src action_button.cxx,1.29,1.30 action_button.hxx,1.16,1.17 action_data.cxx,1.6,1.7 action_data.hxx,1.6,1.7 action_holder.cxx,1.11,1.12 action_holder.hxx,1.11,1.12 alpha_button.cxx,1.2,1.3 alpha_button.hxx,1.5,1.6 blitter.cxx,1.27,1.28 blitter.hxx,1.9,1.10 blitter_impl.hxx,1.9,1.10 button_panel.cxx,1.24,1.25 button_panel.hxx,1.17,1.18 capture_rectangle.cxx,1.12,1.13 capture_rectangle.hxx,1.6,1.7 cheat.cxx,1.2,1.3 cheat.hxx,1.1,1.2 client.cxx,1.44,1.45 col_map.cxx,1.17,1.18 col_map.hxx,1.10,1.11 color.cxx,1.2,1.3 color.hxx,1.6,1.7 config.cxx,1.14,1.15 config.hxx,1.8,1.9 config_xml.cxx,1.3,1.4 config_xml.hxx,1.3,1.4 console.cxx,1.12,1.13 console.hxx,1.12,1.13 counter.cxx,1.4,1.5 credits.cxx,1.31,1.32 credits.hxx,1.12,1.13 debug.hxx,1.2,1.3 debug_stream.cxx,1.7,1.8 debug_stream.hxx,1.9,1.10 delta_manager.hxx,1.9,1.10 demo_player.cxx,1.8,1.9 demo_player.hxx,1.6,1.7 demo_recorder.cxx,1.17,1.18 demo_recorder.hxx,1.8,1.9 demo_session.cxx,1.7,1.8 demo_session.hxx,1.4,1.5 direction.cxx,1.2,1.3 direction.hxx,1.5,1.6 exit_menu.cxx,1.18,1.19 exit_menu.hxx,1.10,1.11 fade_out.cxx,1.7,1.8 fade_out.hxx,1.5,1.6 file_reader.hxx,1.2,1.3 file_writer.hxx,1.2,1.3 fonts.hxx,1.4,1.5 fps_counter.cxx,1.5,1.6 fps_counter.hxx,1.6,1.7 game_counter.cxx,1.2,1.3 game_counter.hxx,1.6,1.7 game_event.hxx,1.6,1.7 game_session.cxx,1.39,1.40 game_session.hxx,1.18,1.19 game_session_result.cxx,1.2,1.3 game_session_result.hxx,1.5,1.6 game_time.cxx,1.8,1.9 game_time.hxx,1.9,1.10 global_event.cxx,1.9,1.10 global_event.hxx,1.6,1.7 globals.cxx,1.13,1.14 globals.hxx,1.16,1.17 goal_manager.cxx,1.6,1.7 goal_manager.hxx,1.3,1.4 groundtype.cxx,1.1,1.2 groundtype.hxx,1.2,1.3 gui_obj.cxx,1.1,1.2 gui_obj.hxx,1.7,1.8 html_browser.hxx,1.3,1.4 hurry_up.cxx,1.6,1.7 hurry_up.hxx,1.7,1.8 indexed_canvas.hxx,1.2,1.3 input_event.hxx,1.8,1.9 layer_manager.cxx,1.5,1.6 layer_manager.hxx,1.9,1.10 level_desc.cxx,1.10,1.11 level_desc.hxx,1.5,1.6 level_interrupt.hxx,1.5,1.6 level_result.cxx,1.13,1.14 level_result.hxx,1.5,1.6 libxmlfwd.hxx,1.3,1.4 loading.cxx,1.4,1.5 loading.hxx,1.5,1.6 main_menu.hxx,1.5,1.6 math.hxx,1.7,1.8 menu_background.cxx,1.8,1.9 menu_background.hxx,1.7,1.8 menu_button.cxx,1.8,1.9 menu_button.hxx,1.2,1.3 mover.hxx,1.2,1.3 multiline_text.cxx,1.6,1.7 multiline_text.hxx,1.5,1.6 my_gettext.hxx,1.4,1.5 path_manager.cxx,1.5,1.6 path_manager.hxx,1.5,1.6 pingu.cxx,1.41,1.42 pingu.hxx,1.24,1.25 pingu_action.cxx,1.24,1.25 pingu_action.hxx,1.26,1.27 pingu_action_factory.cxx,1.14,1.15 pingu_action_factory.hxx,1.11,1.12 pingu_enums.cxx,1.6,1.7 pingu_holder.cxx,1.20,1.21 pingu_holder.hxx,1.14,1.15 pingu_map.cxx,1.6,1.7 pingu_map.hxx,1.5,1.6 pingus.hxx,1.6,1.7 pingus_counter.cxx,1.13,1.14 pingus_counter_bar.cxx,1.5,1.6 pingus_counter_bar.hxx,1.4,1.5 pingus_error.cxx,1.8,1.9 pingus_error.hxx,1.7,1.8 pingus_main.cxx,1.86,1.87 pingus_main.hxx,1.11,1.12 pingus_map_manager.cxx,1.2,1.3 pingus_map_manager.hxx,1.5,1.6 pingus_menu.cxx,1.19,1.20 pingus_menu.hxx,1.10,1.11 pingus_menu_manager.cxx,1.25,1.26 pingus_menu_manager.hxx,1.20,1.21 pingus_resource.cxx,1.27,1.28 pingus_resource.hxx,1.13,1.14 pingus_sub_menu.hxx,1.8,1.9 playfield.cxx,1.34,1.35 playfield.hxx,1.15,1.16 playfield_view.cxx,1.4,1.5 playfield_view.hxx,1.8,1.9 plf.cxx,1.15,1.16 plf.hxx,1.10,1.11 plf_handle.hxx,1.1,1.2 plf_res_mgr.cxx,1.4,1.5 plf_res_mgr.hxx,1.2,1.3 plt_xml.cxx,1.11,1.12 plt_xml.hxx,1.7,1.8 prefab.cxx,1.6,1.7 prefab.hxx,1.5,1.6 range.cxx,1.1,1.2 range.hxx,1.5,1.6 res_descriptor.cxx,1.15,1.16 res_descriptor.hxx,1.12,1.13 resource_modifier.cxx,1.2,1.3 resource_modifier.hxx,1.4,1.5 result.cxx,1.2,1.3 result.hxx,1.7,1.8 result_screen.cxx,1.14,1.15 result_screen.hxx,1.3,1.4 savegame.cxx,1.2,1.3 savegame.hxx,1.2,1.3 savegame_manager.cxx,1.6,1.7 savegame_manager.hxx,1.2,1.3 screenshot.cxx,1.11,1.12 screenshot.hxx,1.6,1.7 server.cxx,1.27,1.28 server.hxx,1.14,1.15 server_event.cxx,1.7,1.8 server_event.hxx,1.3,1.4 smallmap.cxx,1.36,1.37 smallmap.hxx,1.17,1.18 smallmap_image.cxx,1.9,1.10 smallmap_image.hxx,1.8,1.9 spot_map.cxx,1.25,1.26 spot_map.hxx,1.8,1.9 sprite.cxx,1.13,1.14 sprite.hxx,1.9,1.10 start_screen.cxx,1.18,1.19 start_screen.hxx,1.4,1.5 stat_manager.cxx,1.7,1.8 stat_manager.hxx,1.1,1.2 story.cxx,1.25,1.26 story.hxx,1.13,1.14 story_screen.cxx,1.18,1.19 story_screen.hxx,1.5,1.6 string_converter.hxx,1.11,1.12 string_format.cxx,1.1,1.2 string_tokenizer.hxx,1.2,1.3 system.cxx,1.18,1.19 system.hxx,1.9,1.10 target_provider.cxx,1.1,1.2 target_provider.hxx,1.5,1.6 theme.cxx,1.16,1.17 theme.hxx,1.5,1.6 theme_selector.cxx,1.11,1.12 theme_selector.hxx,1.5,1.6 time_display.cxx,1.13,1.14 time_display.hxx,1.10,1.11 timer.cxx,1.4,1.5 timer.hxx,1.6,1.7 true_server.cxx,1.19,1.20 true_server.hxx,1.12,1.13 usb_mouse_controller.cxx,1.3,1.4 usb_mouse_controller.hxx,1.6,1.7 vector.cxx,1.3,1.4 vector.hxx,1.3,1.4 view.cxx,1.13,1.14 view.hxx,1.11,1.12 wav_provider.cxx,1.5,1.6 wav_provider.hxx,1.5,1.6 world.cxx,1.44,1.45 world.hxx,1.27,1.28 worldobj.cxx,1.11,1.12 worldobj.hxx,1.11,1.12 worldobj_data.hxx,1.10,1.11 worldobj_data_factory.cxx,1.33,1.34 worldobj_data_factory.hxx,1.6,1.7 xml_file_reader.cxx,1.3,1.4 xml_file_reader.hxx,1.4,1.5 xml_file_writer.cxx,1.3,1.4 xml_file_writer.hxx,1.4,1.5 xml_helper.cxx,1.30,1.31 xml_helper.hxx,1.20,1.21 xml_pdf.cxx,1.7,1.8 xml_pdf.hxx,1.2,1.3 xml_plf.cxx,1.37,1.38 xml_plf.hxx,1.9,1.10,
torangan <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus README,1.15,1.16
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src/editor action_window.cxx,1.15,1.16 action_window.hxx,1.8,1.9 editor.cxx,1.50,1.51 editor.hxx,1.24,1.25 editor_event.cxx,1.56,1.57 editor_event.hxx,1.17,1.18 editor_help_screen.cxx,1.9,1.10 editor_help_screen.hxx,1.5,1.6 editor_view.cxx,1.7,1.8 editor_view.hxx,1.7,1.8 editorobj.cxx,1.6,1.7 editorobj.hxx,1.18,1.19 editorobj_group.cxx,1.9,1.10 editorobj_group.hxx,1.15,1.16 editorobj_mgr.hxx,1.1,1.2 generic_property_frame.cxx,1.5,1.6 generic_property_frame.hxx,1.2,1.3level_property_window.cxx,1.12,1.13 level_property_window.hxx,1.10,1.11 level_resizer.cxx,1.4,1.5 level_resizer.hxx,1.3,1.4 object_manager.cxx,1.47,1.48 object_manager.hxx,1.27,1.28 object_selector.cxx,1.39,1.40 object_selector.hxx,1.14,1.15 object_selector_window.hxx,1.2,1.3 panel.cxx,1.6,1.7 panel.hxx,1.8,1.9 panel_icons.cxx,1.8,1.9 panel_icons.hxx,1.8,1.9 property_frame.hxx,1.8,1.9 property_window.cxx,1.15,1.16 property_window.hxx,1.10,1.11 rect_editorobj.cxx,1.8,1.9 rect_editorobj.hxx,1.7,1.8 scroll_map.cxx,1.6,1.7 scroll_map.hxx,1.6,1.7 selection.cxx,1.18,1.19 selection.hxx,1.14,1.15 sprite_editorobj.cxx,1.9,1.10 sprite_editorobj.hxx,1.9,1.10 start_pos.cxx,1.7,1.8 start_pos.hxx,1.10,1.11 status_line.cxx,1.9,1.10 status_line.hxx,1.10,1.11 string_reader.cxx,1.7,1.8 string_reader.hxx,1.6,1.7 surface_selector.cxx,1.7,1.8 surface_selector.hxx,1.7,1.8 thumb_cache.cxx,1.12,1.13 thumb_cache.hxx,1.8,1.9 weather_obj.cxx,1.11,1.12 weather_obj.hxx,1.11,1.12
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus README,1.15,1.16
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src/editor action_window.cxx,1.15,1.16 action_window.hxx,1.8,1.9 editor.cxx,1.50,1.51 editor.hxx,1.24,1.25 editor_event.cxx,1.56,1.57 editor_event.hxx,1.17,1.18 editor_help_screen.cxx,1.9,1.10 editor_help_screen.hxx,1.5,1.6 editor_view.cxx,1.7,1.8 editor_view.hxx,1.7,1.8 editorobj.cxx,1.6,1.7 editorobj.hxx,1.18,1.19 editorobj_group.cxx,1.9,1.10 editorobj_group.hxx,1.15,1.16 editorobj_mgr.hxx,1.1,1.2 generic_property_frame.cxx,1.5,1.6 generic_property_frame.hxx,1.2,1.3level_property_window.cxx,1.12,1.13 level_property_window.hxx,1.10,1.11 level_resizer.cxx,1.4,1.5 level_resizer.hxx,1.3,1.4 object_manager.cxx,1.47,1.48 object_manager.hxx,1.27,1.28 object_selector.cxx,1.39,1.40 object_selector.hxx,1.14,1.15 object_selector_window.hxx,1.2,1.3 panel.cxx,1.6,1.7 panel.hxx,1.8,1.9 panel_icons.cxx,1.8,1.9 panel_icons.hxx,1.8,1.9 property_frame.hxx,1.8,1.9 property_window.cxx,1.15,1.16 property_window.hxx,1.10,1.11 rect_editorobj.cxx,1.8,1.9 rect_editorobj.hxx,1.7,1.8 scroll_map.cxx,1.6,1.7 scroll_map.hxx,1.6,1.7 selection.cxx,1.18,1.19 selection.hxx,1.14,1.15 sprite_editorobj.cxx,1.9,1.10 sprite_editorobj.hxx,1.9,1.10 start_pos.cxx,1.7,1.8 start_pos.hxx,1.10,1.11 status_line.cxx,1.9,1.10 status_line.hxx,1.10,1.11 string_reader.cxx,1.7,1.8 string_reader.hxx,1.6,1.7 surface_selector.cxx,1.7,1.8 surface_selector.hxx,1.7,1.8 thumb_cache.cxx,1.12,1.13 thumb_cache.hxx,1.8,1.9 weather_obj.cxx,1.11,1.12 weather_obj.hxx,1.11,1.12
- Index(es):