[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src action_button.hxx,1.7,1.8 action_hold
From: |
torangan |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src action_button.hxx,1.7,1.8 action_holder.cxx,1.4,1.5 action_holder.hxx,1.3,1.4 algo.hxx,1.3,1.4 alpha_button.hxx,1.3,1.4 anim_counter.hxx,1.2,1.3 blitter.hxx,1.6,1.7 bmp_map.hxx,1.2,1.3 button_panel.hxx,1.8,1.9 capture_rectangle.cxx,1.4,1.5 capture_rectangle.hxx,1.3,1.4 client.hxx,1.12,1.13 col_map.hxx,1.4,1.5 color.hxx,1.3,1.4 config.hxx,1.3,1.4 console.hxx,1.6,1.7 counter.hxx,1.3,1.4 credits.cxx,1.8,1.9 credits.hxx,1.6,1.7 cursor.hxx,1.3,1.4 debug_stream.cxx,1.5,1.6 debug_stream.hxx,1.7,1.8 delta_manager.hxx,1.3,1.4 demo_player.hxx,1.3,1.4 demo_recorder.hxx,1.3,1.4 display.hxx,1.3,1.4 editor_hotspot.hxx,1.5,1.6 entrance.hxx,1.2,1.3 entrance_data.cxx,1.5,1.6 entrance_data.hxx,1.4,1.5 exit.hxx,1.2,1.3 exit_data.cxx,1.4,1.5 exit_data.hxx,1.4,1.5 exit_menu.hxx,1.5,1.6 fade_out.hxx,1.2,1.3 force_vector.cxx,1.4,1.5 force_vector.hxx,1.3,1.4 fps_counter.hxx,1.2,1.3 game_counter.hxx,1.3,1.4 game_delta.hxx,1.7,1.8 game_event.hxx,1.5,1.6 game_session.cxx,1.6,1.7 game_session.hxx,1.5,1.6 game_session_result.cxx,1.1,1.2 game_session_result.hxx,1.3,1.4 game_time.hxx,1.5,1.6 generic_main.hxx,1.3,1.4 global_event.cxx,1.6,1.7 global_event.hxx,1.4,1.5 globals.hxx,1.7,1.8 groundpiece_data.cxx,1.6,1.7 groundpiece_data.hxx,1.9,1.10 gui_obj.hxx,1.5,1.6 gui_screen.hxx,1.6,1.7 hotspot.hxx,1.2,1.3 hotspot_data.cxx,1.3,1.4 hotspot_data.hxx,1.4,1.5 html_browser.hxx,1.2,1.3 hurry_up.hxx,1.3,1.4 input_event.hxx,1.6,1.7 intro.hxx,1.3,1.4 layer_manager.hxx,1.4,1.5 level_desc.cxx,1.5,1.6 level_desc.hxx,1.3,1.4 level_interrupt.hxx,1.3,1.4 level_result.hxx,1.3,1.4 libxmlfwd.hxx,1.2,1.3 liquid.hxx,1.2,1.3 liquid_data.cxx,1.5,1.6 liquid_data.hxx,1.5,1.6 loading.cxx,1.1,1.2 loading.hxx,1.3,1.4 main_menu.hxx,1.3,1.4 menu_background.hxx,1.4,1.5 message_box.cxx,1.1,1.2 message_box.hxx,1.3,1.4 multiline_text.hxx,1.3,1.4 multiplayer_client.hxx,1.4,1.5 multiplayer_client_child.hxx,1.4,1.5 multiplayer_config.hxx,1.3,1.4 multiplayer_game.hxx,1.3,1.4 music_provider.cxx,1.2,1.3 music_provider.hxx,1.2,1.3 option_menu.cxx,1.2,1.3 option_menu.hxx,1.3,1.4 path_manager.cxx,1.2,1.3 path_manager.hxx,1.3,1.4 pingu.cxx,1.18,1.19 pingu.hxx,1.9,1.10 pingu_action.cxx,1.5,1.6 pingu_action.hxx,1.10,1.11 pingu_action_factory.cxx,1.6,1.7 pingu_action_factory.hxx,1.3,1.4 pingu_enums.hxx,1.5,1.6 pingu_holder.cxx,1.3,1.4 pingu_holder.hxx,1.2,1.3 pingu_info.hxx,1.3,1.4 pingu_map.hxx,1.2,1.3 pingus_counter.hxx,1.5,1.6 pingus_counter_bar.hxx,1.2,1.3 pingus_error.cxx,1.3,1.4 pingus_error.hxx,1.5,1.6 pingus_main.hxx,1.3,1.4 pingus_map_manager.cxx,1.1,1.2 pingus_map_manager.hxx,1.3,1.4 pingus_menu.hxx,1.5,1.6 pingus_menu_manager.hxx,1.8,1.9 pingus_resource.hxx,1.6,1.7 pingus_sub_menu.hxx,1.5,1.6 playfield.cxx,1.16,1.17 playfield.hxx,1.9,1.10 playfield_view.hxx,1.2,1.3 plf.cxx,1.3,1.4 plf.hxx,1.2,1.3 plf_parser.cxx,1.3,1.4 plf_parser.hxx,1.3,1.4 plf_plf.cxx,1.6,1.7 plf_plf.hxx,1.2,1.3 plf_preview.hxx,1.4,1.5 plt_parser.hxx,1.2,1.3 plt_xml.cxx,1.5,1.6 plt_xml.hxx,1.3,1.4 prefab_data.hxx,1.1,1.2 psm_parser.cxx,1.4,1.5 psm_parser.hxx,1.2,1.3 range.hxx,1.3,1.4 res_descriptor.cxx,1.8,1.9 res_descriptor.hxx,1.5,1.6 resource_modifier.hxx,1.2,1.3 result.hxx,1.3,1.4 screen.hxx,1.6,1.7 screen_manager.hxx,1.9,1.10 screen_manager_impl.hxx,1.3,1.4 screenshot.hxx,1.3,1.4 server.cxx,1.10,1.11 server.hxx,1.3,1.4 smallmap.hxx,1.7,1.8 smallmap_image.cxx,1.4,1.5 smallmap_image.hxx,1.5,1.6 sound.cxx,1.5,1.6 sound.hxx,1.6,1.7 sound_dummy.hxx,1.2,1.3 sound_real.cxx,1.5,1.6 sound_real.hxx,1.3,1.4 sounds.hxx,1.1,1.2 specs_reader.cxx,1.3,1.4 specs_reader.hxx,1.3,1.4 spot_map.cxx,1.7,1.8 spot_map.hxx,1.3,1.4 sprite.cxx,1.4,1.5 sprite.hxx,1.4,1.5 story.hxx,1.5,1.6 string_converter.hxx,1.4,1.5 surface_button.hxx,1.7,1.8 system.hxx,1.3,1.4 target_provider.hxx,1.3,1.4 theme.cxx,1.5,1.6 theme.hxx,1.2,1.3 theme_selector.cxx,1.4,1.5 theme_selector.hxx,1.3,1.4 time_display.hxx,1.4,1.5 timer.hxx,1.3,1.4 trap.hxx,1.2,1.3 trap_data.cxx,1.5,1.6 trap_data.hxx,1.5,1.6 true_server.hxx,1.3,1.4 usb_mouse_controller.hxx,1.4,1.5 view.hxx,1.5,1.6 wav_provider.cxx,1.2,1.3 wav_provider.hxx,1.3,1.4 weather_data.cxx,1.2,1.3 weather_data.hxx,1.3,1.4 world.cxx,1.17,1.18 world.hxx,1.7,1.8 worldobj.cxx,1.2,1.3 worldobj.hxx,1.3,1.4 worldobj_data.hxx,1.4,1.5 worldobj_data_factory.hxx,1.4,1.5 worldobj_group_data.hxx,1.4,1.5 xml_helper.hxx,1.6,1.7 xml_plf.cxx,1.9,1.10 xml_plf.hxx,1.3,1.4 |
Date: |
23 Aug 2002 15:50:29 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src
In directory dark:/tmp/cvs-serv21141
Modified Files:
action_button.hxx action_holder.cxx action_holder.hxx algo.hxx
alpha_button.hxx anim_counter.hxx blitter.hxx bmp_map.hxx
button_panel.hxx capture_rectangle.cxx capture_rectangle.hxx
client.hxx col_map.hxx color.hxx config.hxx console.hxx
counter.hxx credits.cxx credits.hxx cursor.hxx
debug_stream.cxx debug_stream.hxx delta_manager.hxx
demo_player.hxx demo_recorder.hxx display.hxx
editor_hotspot.hxx entrance.hxx entrance_data.cxx
entrance_data.hxx exit.hxx exit_data.cxx exit_data.hxx
exit_menu.hxx fade_out.hxx force_vector.cxx force_vector.hxx
fps_counter.hxx game_counter.hxx game_delta.hxx game_event.hxx
game_session.cxx game_session.hxx game_session_result.cxx
game_session_result.hxx game_time.hxx generic_main.hxx
global_event.cxx global_event.hxx globals.hxx
groundpiece_data.cxx groundpiece_data.hxx gui_obj.hxx
gui_screen.hxx hotspot.hxx hotspot_data.cxx hotspot_data.hxx
html_browser.hxx hurry_up.hxx input_event.hxx intro.hxx
layer_manager.hxx level_desc.cxx level_desc.hxx
level_interrupt.hxx level_result.hxx libxmlfwd.hxx liquid.hxx
liquid_data.cxx liquid_data.hxx loading.cxx loading.hxx
main_menu.hxx menu_background.hxx message_box.cxx
message_box.hxx multiline_text.hxx multiplayer_client.hxx
multiplayer_client_child.hxx multiplayer_config.hxx
multiplayer_game.hxx music_provider.cxx music_provider.hxx
option_menu.cxx option_menu.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.hxx pingu_holder.cxx
pingu_holder.hxx pingu_info.hxx pingu_map.hxx
pingus_counter.hxx pingus_counter_bar.hxx pingus_error.cxx
pingus_error.hxx pingus_main.hxx pingus_map_manager.cxx
pingus_map_manager.hxx pingus_menu.hxx pingus_menu_manager.hxx
pingus_resource.hxx pingus_sub_menu.hxx playfield.cxx
playfield.hxx playfield_view.hxx plf.cxx plf.hxx
plf_parser.cxx plf_parser.hxx plf_plf.cxx plf_plf.hxx
plf_preview.hxx plt_parser.hxx plt_xml.cxx plt_xml.hxx
prefab_data.hxx psm_parser.cxx psm_parser.hxx range.hxx
res_descriptor.cxx res_descriptor.hxx resource_modifier.hxx
result.hxx screen.hxx screen_manager.hxx
screen_manager_impl.hxx screenshot.hxx server.cxx server.hxx
smallmap.hxx smallmap_image.cxx smallmap_image.hxx sound.cxx
sound.hxx sound_dummy.hxx sound_real.cxx sound_real.hxx
sounds.hxx specs_reader.cxx specs_reader.hxx spot_map.cxx
spot_map.hxx sprite.cxx sprite.hxx story.hxx
string_converter.hxx surface_button.hxx system.hxx
target_provider.hxx theme.cxx theme.hxx theme_selector.cxx
theme_selector.hxx time_display.hxx timer.hxx trap.hxx
trap_data.cxx trap_data.hxx true_server.hxx
usb_mouse_controller.hxx view.hxx wav_provider.cxx
wav_provider.hxx weather_data.cxx weather_data.hxx world.cxx
world.hxx worldobj.cxx worldobj.hxx worldobj_data.hxx
worldobj_data_factory.hxx worldobj_group_data.hxx
xml_helper.hxx xml_plf.cxx xml_plf.hxx
Log Message:
- added copy constructor/operator= or private declarations
- some cleanup
Index: action_button.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/action_button.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- action_button.hxx 3 Aug 2002 12:00:58 -0000 1.7
+++ action_button.hxx 23 Aug 2002 15:49:47 -0000 1.8
@@ -57,6 +57,10 @@
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&);
};
// ----------------- snip --------------------
@@ -79,6 +83,10 @@
void draw();
bool is_at (int x, int y);
void on_primary_button_click (int x, int y);
+
+private:
+ ForwardButton (const ForwardButton&);
+ ForwardButton operator= (const ForwardButton&);
};
// ----------------- snip --------------------
@@ -101,6 +109,10 @@
void draw();
bool is_at (int x, int y);
void on_primary_button_click (int x, int y);
+
+private:
+ PauseButton (const PauseButton&);
+ PauseButton operator= (const PauseButton&);
};
// ----------------- snip --------------------
@@ -147,6 +159,10 @@
virtual bool is_at(int x, int y) = 0;
void set_action_holder(ActionHolder* h);
+
+private:
+ ActionButton (const ActionButton&);
+ ActionButton operator= (const ActionButton&);
};
// ----------------- snip --------------------
@@ -163,6 +179,10 @@
void draw();
bool is_at (int x, int y);
+
+private:
+ VerticalActionButton (const VerticalActionButton&);
+ VerticalActionButton operator= (const VerticalActionButton&);
};
// ----------------- snip --------------------
@@ -170,7 +190,3 @@
#endif /* ACTIONBUTTON */
/* EOF */
-
-
-
-
Index: action_holder.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/action_holder.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- action_holder.cxx 22 Aug 2002 02:24:59 -0000 1.4
+++ action_holder.cxx 23 Aug 2002 15:49:47 -0000 1.5
@@ -17,7 +17,6 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#include "pingus.hxx"
#include "globals.hxx"
#include "plf.hxx"
Index: action_holder.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/action_holder.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- action_holder.hxx 28 Jun 2002 15:12:22 -0000 1.3
+++ action_holder.hxx 23 Aug 2002 15:49:47 -0000 1.4
@@ -72,6 +72,10 @@
* The deletion of the action is handled by this class.
*/
PinguAction* get_action(ActionName);
+
+private:
+ ActionHolder (const ActionHolder&);
+ ActionHolder operator= (const ActionHolder&);
};
#endif
Index: algo.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/algo.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- algo.hxx 16 Aug 2002 13:03:34 -0000 1.3
+++ algo.hxx 23 Aug 2002 15:49:47 -0000 1.4
@@ -21,8 +21,8 @@
#ifndef HEADER_PINGUS_ALGO_HXX
#define HEADER_PINGUS_ALGO_HXX
-#include <string>
#include "pingus.hxx"
+#include <string>
#ifndef WIN32
#include <unistd.h>
Index: alpha_button.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/alpha_button.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- alpha_button.hxx 16 Aug 2002 13:03:34 -0000 1.3
+++ alpha_button.hxx 23 Aug 2002 15:49:48 -0000 1.4
@@ -20,8 +20,8 @@
#ifndef HEADER_PINGUS_ALPHA_BUTTON_HXX
#define HEADER_PINGUS_ALPHA_BUTTON_HXX
-#include <string>
#include "pingus.hxx"
+#include <string>
class CL_Font;
@@ -48,6 +48,10 @@
void draw(void);
///
bool mouse_over(void);
+
+private:
+ AlphaButton (const AlphaButton&);
+ AlphaButton operator= (const AlphaButton&);
}///
;
Index: anim_counter.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/anim_counter.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- anim_counter.hxx 24 Jun 2002 22:52:53 -0000 1.2
+++ anim_counter.hxx 23 Aug 2002 15:49:48 -0000 1.3
@@ -50,6 +50,10 @@
/// Returs the speed which is used for this counter
int get_speed() const;
+
+private:
+ AnimCounter (const AnimCounter&);
+ AnimCounter operator= (const AnimCounter&);
}///
;
Index: blitter.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/blitter.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- blitter.hxx 16 Aug 2002 13:03:34 -0000 1.6
+++ blitter.hxx 23 Aug 2002 15:49:48 -0000 1.7
@@ -96,6 +96,10 @@
@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
Index: bmp_map.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/bmp_map.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- bmp_map.hxx 24 Jun 2002 22:52:54 -0000 1.2
+++ bmp_map.hxx 23 Aug 2002 15:49:48 -0000 1.3
@@ -53,6 +53,10 @@
ColMap* get_colmap(void);
///
CL_Surface get_surface(void);
+
+private:
+ PinguBmpMap (const PinguBmpMap&);
+ PinguBmpMap operator= (const PinguBmpMap&);
};
#endif
Index: button_panel.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/button_panel.hxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- button_panel.hxx 9 Aug 2002 22:02:13 -0000 1.8
+++ button_panel.hxx 23 Aug 2002 15:49:48 -0000 1.9
@@ -70,6 +70,10 @@
/// Select the previous action
void previous_action ();
+
+private:
+ ButtonPanel (const ButtonPanel&);
+ ButtonPanel operator= (const ButtonPanel&);
};
#endif
Index: capture_rectangle.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/capture_rectangle.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- capture_rectangle.cxx 28 Jun 2002 15:12:22 -0000 1.4
+++ capture_rectangle.cxx 23 Aug 2002 15:49:48 -0000 1.5
@@ -25,8 +25,6 @@
#include "pingu_action.hxx"
#include "button_panel.hxx"
-using namespace boost;
-
CaptureRectangle::CaptureRectangle(ButtonPanel* arg_button_panel)
: pingu (0),
owner_id (0),
Index: capture_rectangle.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/capture_rectangle.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- capture_rectangle.hxx 24 Jun 2002 22:52:54 -0000 1.3
+++ capture_rectangle.hxx 23 Aug 2002 15:49:48 -0000 1.4
@@ -26,11 +26,6 @@
class PinguAction;
class Pingu;
class CL_Font;
-
-namespace boost {
- template <class T> class shared_ptr;
-}
-
class ButtonPanel;
/** The rectangle that is shown when the mouse cursor is above a
@@ -59,6 +54,10 @@
void set_pingu(Pingu* pingu);
void draw_offset(int x_offset, int y_offset, float s = 1.0);
+
+private:
+ CaptureRectangle (const CaptureRectangle&);
+ CaptureRectangle operator= (const CaptureRectangle&);
};
#endif
Index: client.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/client.hxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- client.hxx 17 Aug 2002 01:03:27 -0000 1.12
+++ client.hxx 23 Aug 2002 15:49:48 -0000 1.13
@@ -113,6 +113,10 @@
void on_armageddon_press ();
void on_escape_press ();
void on_action_axis_move (float);
+
+private:
+ Client (const Client&);
+ Client operator= (const Client&);
};
#endif
Index: col_map.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/col_map.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- col_map.hxx 25 Jun 2002 18:15:18 -0000 1.4
+++ col_map.hxx 23 Aug 2002 15:49:48 -0000 1.5
@@ -86,6 +86,10 @@
void remove(CL_SurfaceProvider*, int x, int y);
void draw(int, int, float);
+
+private:
+ ColMap (const ColMap&);
+ ColMap operator= (const ColMap&);
};
#endif /* COLMAP_HH */
Index: color.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/color.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- color.hxx 16 Aug 2002 13:03:34 -0000 1.3
+++ color.hxx 23 Aug 2002 15:49:48 -0000 1.4
@@ -30,25 +30,39 @@
float blue;
float alpha;
- Color() {
- red = green = blue = 0.0;
- alpha = 1.0;
+ Color () : red(0.0), green(0.0), blue(0.0), alpha(1.0)
+ {
}
- Color(float red, float green, float blue, float alpha = 1.0) {
- this->red = red;
- this->green = green;
- this->blue = blue;
- this->alpha = alpha;
+ Color (float red_, float green_, float blue_, float alpha_ = 1.0) :
red(red_), green(green_), blue(blue_), alpha(alpha_)
+ {
}
- bool operator!=(const Color& color) const {
+ 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);
}
- bool operator==(const Color& color) const {
+ bool operator== (const Color& color) const {
return red == color.red && green == color.green && blue == color.blue &&
alpha == color.alpha;
}
+
};
#endif
Index: config.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/config.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- config.hxx 16 Aug 2002 13:03:34 -0000 1.3
+++ config.hxx 23 Aug 2002 15:49:48 -0000 1.4
@@ -20,10 +20,10 @@
#ifndef HEADER_PINGUS_CONFIG_HXX
#define HEADER_PINGUS_CONFIG_HXX
+#include "pingus.hxx"
#include <string>
#include <fstream>
-#include "pingus.hxx"
-///
+
class ConfigParser
{
private:
@@ -61,6 +61,10 @@
virtual ~ConfigParser(); /// Close the file
void init(std::string); /// Init the PLFParser and start parsing
+
+private:
+ ConfigParser (const ConfigParser&);
+ ConfigParser operator= (const ConfigParser&);
};
///
@@ -84,6 +88,10 @@
///
void set_value(std::string valueid,
std::string value);
+
+private:
+ Config (const Config&);
+ Config operator= (const Config&);
}///
;
Index: console.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/console.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- console.hxx 17 Aug 2002 17:21:25 -0000 1.6
+++ console.hxx 23 Aug 2002 15:49:48 -0000 1.7
@@ -49,6 +49,9 @@
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
@@ -101,6 +104,10 @@
void puts(const std::string&);
///
void newline();
+
+private:
+ Console (const Console&);
+ Console operator= (const Console&);
};
/** The globale console object to which you can send messages */
Index: counter.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/counter.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- counter.hxx 16 Aug 2002 13:03:34 -0000 1.3
+++ counter.hxx 23 Aug 2002 15:49:48 -0000 1.4
@@ -22,59 +22,35 @@
#include "pingus.hxx"
-///
class Counter
{
public:
- ///
- enum CounterType { loop, once, ping_pong, ping_pong_once }///
-;
+ enum CounterType { loop, once, ping_pong, ping_pong_once };
private:
- ///
int s;
- ///
int count;
- ///
int add;
- ///
CounterType type;
public:
- ///
Counter(int s);
- ///
Counter();
- ///
Counter(const Counter&);
- ///
virtual ~Counter();
- ///
Counter& operator=(const Counter&);
- ///
int inc();
- ///
int operator++();
- ///
int operator--();
- ///
int operator=(int i);
- ///
int get_value() const;
- ///
int size() const;
- ///
int set_count(int i);
- ///
int set_size(int s);
- ///
void set_type(CounterType);
- ///
- operator int() const { return count; }///
-;
-}///
-;
+ operator int() const { return count; };
+};
#endif
Index: credits.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/credits.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- credits.cxx 22 Aug 2002 02:24:59 -0000 1.8
+++ credits.cxx 23 Aug 2002 15:49:48 -0000 1.9
@@ -17,7 +17,6 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#include "pingus.hxx"
#include <iostream>
#include <ClanLib/Display/Display/display.h>
#include <ClanLib/Display/Input/keyboard.h>
@@ -38,12 +37,10 @@
Credits* Credits::instance_ = 0;
-Credits::Credits()
- : is_init(false)
+Credits::Credits() : is_init(false)
{
}
-///
void
Credits::init ()
{
@@ -71,6 +68,7 @@
credits.push_back("_Ingo Ruhnke");
credits.push_back("_Michael K\"aser");
credits.push_back("_Peter Todd");
+ credits.push_back("_David Philippi");
credits.push_back("n");
credits.push_back(_("-Gfx"));
@@ -89,7 +87,6 @@
credits.push_back(_("-Special"));
credits.push_back(_("-Thanks to"));
credits.push_back("_Jules Bean");
- credits.push_back("_David Philippi");
credits.push_back("_Kenneth Gangstø");
credits.push_back("_Johnny Taporg");
credits.push_back("_Werner Steiner");
@@ -103,9 +100,8 @@
}
}
-Credits::~Credits()
+Credits::~Credits ()
{
-
}
void
Index: credits.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/credits.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- credits.hxx 17 Aug 2002 00:25:06 -0000 1.6
+++ credits.hxx 23 Aug 2002 15:49:48 -0000 1.7
@@ -51,9 +51,9 @@
*/
std::vector<std::string> credits;
- Credits();
public:
- virtual ~Credits();
+ Credits ();
+ virtual ~Credits ();
void init ();
void update (float);
@@ -66,6 +66,12 @@
void on_pause_press ();
void on_fast_forward_press ();
void on_escape_press ();
+
+
+private:
+ Credits (const Credits&);
+ Credits operator= (const Credits&);
+
};
#endif
Index: cursor.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/cursor.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- cursor.hxx 9 Aug 2002 22:02:13 -0000 1.3
+++ cursor.hxx 23 Aug 2002 15:49:48 -0000 1.4
@@ -38,6 +38,10 @@
virtual void update (float delta);
virtual void on_event();
+
+private:
+ Cursor (const Cursor&);
+ Cursor operator= (const Cursor&);
};
#endif
Index: debug_stream.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/debug_stream.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- debug_stream.cxx 22 Aug 2002 02:24:59 -0000 1.5
+++ debug_stream.cxx 23 Aug 2002 15:49:48 -0000 1.6
@@ -17,7 +17,6 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#include "pingus.hxx"
#include "debug_stream.hxx"
#include "globals.hxx"
Index: debug_stream.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/debug_stream.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- debug_stream.hxx 17 Aug 2002 17:21:25 -0000 1.7
+++ debug_stream.hxx 23 Aug 2002 15:49:48 -0000 1.8
@@ -20,10 +20,10 @@
#ifndef HEADER_PINGUS_DEBUG_STREAM_HXX
#define HEADER_PINGUS_DEBUG_STREAM_HXX
+#include "pingus.hxx"
#include <string>
#include <vector>
#include <iostream>
-#include "pingus.hxx"
class NilStream;
@@ -71,6 +71,10 @@
void add (std::ostream& s);
void set_prefix (const std::string & prefix);
+
+private:
+ DebugStream (const DebugStream&);
+ DebugStream operator= (const DebugStream&);
};
Index: delta_manager.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/delta_manager.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- delta_manager.hxx 16 Aug 2002 13:03:34 -0000 1.3
+++ delta_manager.hxx 23 Aug 2002 15:49:48 -0000 1.4
@@ -20,8 +20,8 @@
#ifndef HEADER_PINGUS_DELTA_MANAGER_HXX
#define HEADER_PINGUS_DELTA_MANAGER_HXX
-#include <ClanLib/Core/System/system.h>
#include "pingus.hxx"
+#include <ClanLib/Core/System/system.h>
class DeltaManager
{
@@ -48,6 +48,10 @@
{
return (CL_System::get_time () - last_time) / 1000.0f;
}
+
+private:
+ DeltaManager (const DeltaManager&);
+ DeltaManager operator= (const DeltaManager&);
};
#endif
Index: demo_player.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/demo_player.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- demo_player.hxx 24 Jun 2002 22:52:54 -0000 1.3
+++ demo_player.hxx 23 Aug 2002 15:49:48 -0000 1.4
@@ -53,6 +53,10 @@
bool empty() {
return event_queue.empty();
}
+
+private:
+ DemoPlayer (const DemoPlayer&);
+ DemoPlayer operator= (const DemoPlayer&);
}///
;
Index: demo_recorder.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/demo_recorder.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- demo_recorder.hxx 16 Aug 2002 13:03:34 -0000 1.3
+++ demo_recorder.hxx 23 Aug 2002 15:49:48 -0000 1.4
@@ -20,9 +20,9 @@
#ifndef HEADER_PINGUS_DEMO_RECORDER_HXX
#define HEADER_PINGUS_DEMO_RECORDER_HXX
+#include "pingus.hxx"
#include <fstream>
#include <string>
-#include "pingus.hxx"
///
class DemoRecorder
@@ -47,6 +47,10 @@
void queue_event(const std::string&);
///
void set_levelname(const std::string&);
+
+private:
+ DemoRecorder (const DemoRecorder&);
+ DemoRecorder operator= (const DemoRecorder&);
}///
;
Index: display.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/display.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- display.hxx 16 Aug 2002 13:03:34 -0000 1.3
+++ display.hxx 23 Aug 2002 15:49:48 -0000 1.4
@@ -20,8 +20,8 @@
#ifndef HEADER_PINGUS_DISPLAY_HXX
#define HEADER_PINGUS_DISPLAY_HXX
-#include <list>
#include "pingus.hxx"
+#include <list>
class DisplayHook;
class CL_MouseCursorProvider;
@@ -39,6 +39,10 @@
/** Called sortly before a flip_display () */
virtual void on_event() = 0;
virtual void toggle_display();
+
+private:
+ DisplayHook (const DisplayHook&);
+ DisplayHook operator= (const DisplayHook&);
};
/** This is a kind of wrapper class around CL_Display, it provides
@@ -60,6 +64,11 @@
static void add_flip_screen_hook(DisplayHook*);
static void remove_flip_screen_hook(DisplayHook*);
+
+private:
+ Display ();
+ Display (const Display&);
+ Display operator= (const Display&);
};
#endif
Index: editor_hotspot.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor_hotspot.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- editor_hotspot.hxx 16 Aug 2002 13:03:34 -0000 1.5
+++ editor_hotspot.hxx 23 Aug 2002 15:49:48 -0000 1.6
@@ -44,6 +44,10 @@
+ to_string(pos.x) + ", "
+ to_string(pos.y) + ", "
+ to_string(pos.z); }
+
+private:
+ EditorHotspot (const EditorHotspot&);
+ EditorHotspot operator= (const EditorHotspot&);
};
Index: entrance.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/entrance.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- entrance.hxx 24 Jun 2002 22:52:54 -0000 1.2
+++ entrance.hxx 23 Aug 2002 15:49:48 -0000 1.3
@@ -36,7 +36,7 @@
int last_release;
public:
- Entrance(const EntranceData& data);
+ Entrance (const EntranceData& data);
virtual ~Entrance() {}
float get_z_pos() const { return int(pos.z); }
@@ -44,6 +44,10 @@
virtual Pingu* get_pingu(void);
virtual void update(float delta);
virtual void draw_offset(int x, int y, float s = 1.0);
+
+private:
+ Entrance (const Entrance&);
+ Entrance operator= (const Entrance&);
};
#endif
Index: entrance_data.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/entrance_data.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- entrance_data.cxx 22 Aug 2002 00:36:30 -0000 1.5
+++ entrance_data.cxx 23 Aug 2002 15:49:48 -0000 1.6
@@ -24,7 +24,6 @@
#include "pingus_error.hxx"
#include "string_converter.hxx"
#include "xml_helper.hxx"
-#include "boost/smart_ptr.hpp"
EntranceData::EntranceData (xmlDocPtr doc, xmlNodePtr cur)
{
@@ -78,6 +77,34 @@
}
cur = cur->next;
}
+}
+
+EntranceData::EntranceData (const EntranceData& old) : WorldObjData(old),
+
direction(old.direction),
+ desc(old.desc),
+ pos(old.pos),
+
release_rate(old.release_rate),
+ owner_id(old.owner_id),
+ type(old.type)
+{
+}
+
+EntranceData
+EntranceData::operator= (const EntranceData& old)
+{
+ if (this == &old)
+ return *this;
+
+ WorldObjData::operator=(old);
+
+ direction = old.direction;
+ desc = old.desc;
+ pos = old.pos;
+ release_rate = old.release_rate;
+ owner_id = old.owner_id;
+ type = old.type;
+
+ return *this;
}
void
Index: entrance_data.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/entrance_data.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- entrance_data.hxx 25 Jun 2002 12:20:31 -0000 1.4
+++ entrance_data.hxx 23 Aug 2002 15:49:48 -0000 1.5
@@ -30,6 +30,8 @@
{
public:
enum EntranceDirection { LEFT, RIGHT, MISC };
+
+public:
EntranceDirection direction;
ResDescriptor desc;
CL_Vector pos;
@@ -39,25 +41,29 @@
/// The type of the entrance type (woodthing, generic, etc.)
std::string type;
+public:
EntranceData (xmlDocPtr doc, xmlNodePtr cur);
- EntranceData() {
+ EntranceData () {
clean();
}
+ EntranceData (const EntranceData& old);
+ EntranceData operator= (const EntranceData& old);
+
virtual ~EntranceData () {}
- void clean(void) {
+ void clean (void) {
type = "generic";
direction = MISC;
release_rate = 50;
owner_id = 0;
}
- void write_xml(std::ostream&);
+ void write_xml (std::ostream&);
- EditorObjLst create_EditorObj();
- WorldObj* create_WorldObj();
+ EditorObjLst create_EditorObj ();
+ WorldObj* create_WorldObj ();
};
#endif
Index: exit.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/exit.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- exit.hxx 24 Jun 2002 22:52:54 -0000 1.2
+++ exit.hxx 23 Aug 2002 15:49:48 -0000 1.3
@@ -39,6 +39,10 @@
void draw_offset(int x, int y, float s = 1.0);
void update (float delta);
float get_z_pos() const { return (int) pos.z; }
+
+private:
+ Exit (const Exit&);
+ Exit operator= (const Exit&);
};
#endif
Index: exit_data.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/exit_data.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- exit_data.cxx 22 Aug 2002 00:36:30 -0000 1.4
+++ exit_data.cxx 23 Aug 2002 15:49:48 -0000 1.5
@@ -22,7 +22,6 @@
#include "editor/plfobj.hxx"
#include "string_converter.hxx"
#include "xml_helper.hxx"
-#include "boost/smart_ptr.hpp"
ExitData::ExitData (xmlDocPtr doc, xmlNodePtr cur)
{
@@ -67,6 +66,30 @@
}
cur = cur->next;
}
+}
+
+ExitData::ExitData (const ExitData& old) : WorldObjData(old),
+ pos(old.pos),
+ desc(old.desc),
+ owner_id(old.owner_id),
+
use_old_pos_handling(old.use_old_pos_handling)
+{
+}
+
+ExitData
+ExitData::operator= (const ExitData& old)
+{
+ if (this == &old)
+ return *this;
+
+ WorldObjData::operator=(old);
+
+ pos = old.pos;
+ desc = old.desc;
+ owner_id = old.owner_id;
+ use_old_pos_handling = old.use_old_pos_handling;
+
+ return *this;
}
void
Index: exit_data.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/exit_data.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- exit_data.hxx 25 Jun 2002 12:20:31 -0000 1.4
+++ exit_data.hxx 23 Aug 2002 15:49:48 -0000 1.5
@@ -41,9 +41,12 @@
convenience. */
bool use_old_pos_handling;
- ///
+public:
ExitData() { clean (); }
ExitData (xmlDocPtr doc, xmlNodePtr cur);
+
+ ExitData (const ExitData& old);
+ ExitData operator= (const ExitData& old);
/// Reset the values to default
void clean(void)
Index: exit_menu.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/exit_menu.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- exit_menu.hxx 3 Aug 2002 17:20:37 -0000 1.5
+++ exit_menu.hxx 23 Aug 2002 15:49:48 -0000 1.6
@@ -37,6 +37,10 @@
void draw ();
void update (float delta);
void preload ();
+
+private:
+ ExitMenu (const ExitMenu&);
+ ExitMenu operator= (const ExitMenu&);
};
#endif
Index: fade_out.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/fade_out.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- fade_out.hxx 24 Jun 2002 22:52:54 -0000 1.2
+++ fade_out.hxx 23 Aug 2002 15:49:48 -0000 1.3
@@ -57,6 +57,10 @@
static void fade_to_black(int steps = 20);
///
static void clear(void);
+
+private:
+ FadeOut (const FadeOut&);
+ FadeOut operator= (const FadeOut&);
};
class EnlargingRectFadeOut : public FadeOut
@@ -68,6 +72,10 @@
~EnlargingRectFadeOut () {}
void draw ();
+
+private:
+ EnlargingRectFadeOut (const EnlargingRectFadeOut&);
+ EnlargingRectFadeOut operator= (const EnlargingRectFadeOut&);
};
#endif
Index: force_vector.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/force_vector.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- force_vector.cxx 17 Aug 2002 17:56:23 -0000 1.4
+++ force_vector.cxx 23 Aug 2002 15:49:48 -0000 1.5
@@ -27,6 +27,29 @@
std::vector<GravityForce> ForcesHolder::grav_array;
std::vector<ExplosionForce> ForcesHolder::explo_array;
+
+GravityForce GravityForce::operator= (const GravityForce& old)
+{
+ if (this == &old)
+ return *this;
+
+ ifv = old.ifv;
+
+ return *this;
+}
+
+ExplosionForce ExplosionForce::operator= (const ExplosionForce& old)
+{
+ if (this == &old)
+ return *this;
+
+ iinten = old.iinten;
+ isize = old.isize;
+ ip = old.ip;
+
+ return *this;
+}
+
// Apply the explosion force
CL_Vector
ExplosionForce::apply_forces(CL_Vector p,CL_Vector v)
Index: force_vector.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/force_vector.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- force_vector.hxx 16 Aug 2002 13:03:35 -0000 1.3
+++ force_vector.hxx 23 Aug 2002 15:49:48 -0000 1.4
@@ -22,9 +22,9 @@
#ifndef HEADER_PINGUS_FORCE_VECTOR_HXX
#define HEADER_PINGUS_FORCE_VECTOR_HXX
+#include "pingus.hxx"
#include <vector>
#include <ClanLib/Core/Math/cl_vector.h>
-#include "pingus.hxx"
/// Gravity
extern CL_Vector grav;
@@ -37,16 +37,24 @@
public:
///
- GravityForce(CL_Vector fv){
- ifv = fv;
+ GravityForce(CL_Vector fv) : ifv(fv)
+ {
}
/** Applies the force to a velocity vector, v, a position p and
returns the new velicty vector. Just adds fv to v, p is ignored
as gravity is universal. */
- CL_Vector apply_forces(CL_Vector /*p*/,CL_Vector v){
+ CL_Vector apply_forces(CL_Vector p,CL_Vector v)
+ {
+ UNUSED_ARG(p);
return v + ifv;
}
+
+ GravityForce (const GravityForce& old) : ifv(old.ifv)
+ {
+ }
+
+ GravityForce operator= (const GravityForce& old);
};
/** An Explosion Force is a radial force which points away from its
@@ -63,15 +71,18 @@
CL_Vector ip;
public:
- ///
- ExplosionForce(float inten, float size,CL_Vector p){
- iinten = inten;
- isize = size;
- ip = p;
+ ExplosionForce(float inten, float size,CL_Vector p) : iinten(inten),
isize(size), ip(p)
+ {
}
- ///
+ ExplosionForce (const ExplosionForce& old) : iinten(old.iinten),
isize(old.isize), ip(old.ip)
+ {
+ }
+
+ ExplosionForce operator= (const ExplosionForce& old);
+
CL_Vector apply_forces(CL_Vector p,CL_Vector v);
+
};
/// The force holder
@@ -103,6 +114,10 @@
/// Apply forces
static CL_Vector apply_forces(CL_Vector p,CL_Vector v);
+
+private:
+ ForcesHolder (const ForcesHolder&);
+ ForcesHolder operator= (const ForcesHolder&);
};
#endif /* FVEC_HH */
Index: fps_counter.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/fps_counter.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- fps_counter.hxx 24 Jun 2002 22:52:54 -0000 1.2
+++ fps_counter.hxx 23 Aug 2002 15:49:48 -0000 1.3
@@ -60,6 +60,10 @@
/** Load all the gfx and fonts... */
void init();
+
+private:
+ FPSCounter (const FPSCounter&);
+ FPSCounter operator= (const FPSCounter&);
};
/** The fps_counter is a global object, so we don't need to construct
Index: game_counter.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/game_counter.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- game_counter.hxx 16 Aug 2002 13:03:35 -0000 1.3
+++ game_counter.hxx 23 Aug 2002 15:49:48 -0000 1.4
@@ -22,61 +22,40 @@
#include "pingus.hxx"
-///
class GameCounter
{
public:
- ///
- enum CounterType { loop, once, ping_pong }///
-;
+ enum CounterType { loop, once, ping_pong };
private:
- ///
int last_time;
- ///
double count;
- ///
double add;
- ///
double size;
- ///
bool is_finished;
- ///
CounterType type;
- ///
void check_overflow(void);
public:
- ///
GameCounter();
- ///
~GameCounter();
- ///
void set_type(CounterType t);
- ///
void set_size(int);
- ///
int get_size();
- ///
bool finished();
- ///
void set_speed(double i);
- ///
int value();
- ///
bool enough_time_passed();
- ///
int operator++();
- ///
int operator++(int);
- ///
int operator--();
- ///
int operator=(int i);
- ///
operator int ();
-}///
-;
+
+private:
+ GameCounter (const GameCounter&);
+ GameCounter operator= (const GameCounter&);
+};
#endif
Index: game_delta.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/game_delta.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- game_delta.hxx 16 Aug 2002 13:03:35 -0000 1.7
+++ game_delta.hxx 23 Aug 2002 15:49:48 -0000 1.8
@@ -20,8 +20,8 @@
#ifndef HEADER_PINGUS_GAME_DELTA_HXX
#define HEADER_PINGUS_GAME_DELTA_HXX
-#include <list>
#include "pingus.hxx"
+#include <list>
namespace Input
{
@@ -49,6 +49,10 @@
/** Return the events */
const std::list<Input::Event*>& get_events () const { return events; }
+
+private:
+ GameDelta (const GameDelta&);
+ GameDelta operator= (const GameDelta&);
};
#endif
Index: game_event.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/game_event.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- game_event.hxx 16 Aug 2002 13:03:35 -0000 1.5
+++ game_event.hxx 23 Aug 2002 15:49:48 -0000 1.6
@@ -22,8 +22,8 @@
#error "Don't used this the moment, its underdevelopment and not compilable"
-#include <string>
#include "pingus.hxx"
+#include <string>
/** This will need some^H^H^H^H a lot of work */
typedef enum {
Index: game_session.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/game_session.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- game_session.cxx 9 Aug 2002 22:02:13 -0000 1.6
+++ game_session.cxx 23 Aug 2002 15:49:48 -0000 1.7
@@ -24,8 +24,6 @@
#include "plf.hxx"
#include "screen_manager.hxx"
-using boost::shared_ptr;
-
PingusGameSession::PingusGameSession (std::string arg_filename)
: filename (arg_filename),
plf(PLF::create (filename)),
Index: game_session.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/game_session.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- game_session.hxx 2 Aug 2002 13:17:42 -0000 1.5
+++ game_session.hxx 23 Aug 2002 15:49:48 -0000 1.6
@@ -72,6 +72,10 @@
void on_fast_forward_press ();
void on_armageddon_press ();
void on_escape_press ();
+
+private:
+ PingusGameSession (const PingusGameSession&);
+ PingusGameSession operator= (const PingusGameSession&);
};
#endif
Index: game_session_result.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/game_session_result.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- game_session_result.cxx 12 Jun 2002 19:09:37 -0000 1.1
+++ game_session_result.cxx 23 Aug 2002 15:49:48 -0000 1.2
@@ -19,6 +19,10 @@
#include "game_session_result.hxx"
+PingusGameSessionResult::PingusGameSessionResult ()
+{
+}
+
bool
PingusGameSessionResult::finished ()
{
Index: game_session_result.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/game_session_result.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- game_session_result.hxx 16 Aug 2002 13:03:35 -0000 1.3
+++ game_session_result.hxx 23 Aug 2002 15:49:48 -0000 1.4
@@ -28,6 +28,11 @@
class PingusGameSessionResult
{
public:
+ PingusGameSessionResult ();
+
+ PingusGameSessionResult (const PingusGameSessionResult&) { }
+ void operator= (const PingusGameSessionResult&) { }
+
/** Gives information if the level was succeeded or not
@return true if the level was succeeded, otherwise false */
bool finished ();
Index: game_time.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/game_time.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- game_time.hxx 16 Aug 2002 13:03:35 -0000 1.5
+++ game_time.hxx 23 Aug 2002 15:49:48 -0000 1.6
@@ -55,6 +55,10 @@
/** Start from zero */
void reset(void);
+
+private:
+ GameTime (const GameTime&);
+ GameTime operator= (const GameTime&);
};
#endif
Index: generic_main.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/generic_main.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- generic_main.hxx 16 Aug 2002 13:03:35 -0000 1.3
+++ generic_main.hxx 23 Aug 2002 15:49:48 -0000 1.4
@@ -20,8 +20,8 @@
#ifndef HEADER_PINGUS_GENERIC_MAIN_HXX
#define HEADER_PINGUS_GENERIC_MAIN_HXX
-#include <ClanLib/application.h>
#include "pingus.hxx"
+#include <ClanLib/application.h>
class AbstractMain
{
Index: global_event.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/global_event.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- global_event.cxx 28 Jun 2002 08:32:20 -0000 1.6
+++ global_event.cxx 23 Aug 2002 15:49:48 -0000 1.7
@@ -32,6 +32,10 @@
// FIXME: This belongs into ClanLib
#define PINGUS_CL_KEY_HELP 91
+GlobalEvent::GlobalEvent ()
+{
+}
+
void
GlobalEvent::on_button_press(CL_InputDevice *device, const CL_Key &key)
{
Index: global_event.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/global_event.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- global_event.hxx 16 Aug 2002 17:15:31 -0000 1.4
+++ global_event.hxx 23 Aug 2002 15:49:48 -0000 1.5
@@ -27,12 +27,15 @@
class GlobalEvent
{
-private:
-
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);
-
+
+private:
+ GlobalEvent (const GlobalEvent&);
+ GlobalEvent operator= (const GlobalEvent&);
};
extern GlobalEvent global_event;
Index: globals.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/globals.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- globals.hxx 17 Aug 2002 00:27:21 -0000 1.7
+++ globals.hxx 23 Aug 2002 15:49:48 -0000 1.8
@@ -23,8 +23,8 @@
#ifndef HEADER_PINGUS_GLOBALS_HXX
#define HEADER_PINGUS_GLOBALS_HXX
-#include <string>
#include "pingus.hxx"
+#include <string>
extern int game_speed; ///< -t, --set-speed
extern bool print_fps; ///< --print-fps
Index: groundpiece_data.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/groundpiece_data.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- groundpiece_data.cxx 22 Aug 2002 00:36:30 -0000 1.6
+++ groundpiece_data.cxx 23 Aug 2002 15:49:48 -0000 1.7
@@ -20,15 +20,15 @@
#include <fstream>
#include "xml_helper.hxx"
#include "editor/editor_groundpiece_obj.hxx"
-#include "boost/smart_ptr.hpp"
#include "xml_helper.hxx"
-GroundpieceData::GroundpieceData ()
+GroundpieceData::GroundpieceData () : resource(0)
{
// do nothing
}
GroundpieceData::GroundpieceData (xmlDocPtr doc, xmlNodePtr cur)
+ : resource(0)
{
gptype = GroundpieceData::GP_GROUND;
@@ -65,6 +65,35 @@
}
cur = cur->next;
}
+}
+
+GroundpieceData::GroundpieceData (const GroundpieceData& old)
+ : surface(old.surface),
+ resource(new CL_Resource(*(old.resource))),
+ desc(old.desc),
+ pos(old.pos),
+ gptype(old.gptype)
+{
+}
+
+GroundpieceData
+GroundpieceData::operator= (const GroundpieceData& old)
+{
+ if (this == &old)
+ return *this;
+
+ surface = old.surface;
+ resource = new CL_Resource(*(old.resource));
+ desc = old.desc;
+ pos = old.pos;
+ gptype = old.gptype;
+
+ return *this;
+}
+
+GroundpieceData::~GroundpieceData ()
+{
+ delete resource;
}
GroundpieceData::GPType
Index: groundpiece_data.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/groundpiece_data.hxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- groundpiece_data.hxx 2 Jul 2002 10:42:38 -0000 1.9
+++ groundpiece_data.hxx 23 Aug 2002 15:49:48 -0000 1.10
@@ -29,11 +29,6 @@
class EditorObj;
-namespace boost {
- template <class T> class shared_ptr;
-}
-
-///
class GroundpieceData
{
public:
@@ -42,7 +37,7 @@
ResDescriptor desc;
CL_Vector pos;
- typedef enum {
+ enum GPType {
GP_NOTHING,
GP_SOLID,
GP_TRANSPARENT,
@@ -52,15 +47,17 @@
GP_LAVA,
GP_REMOVE,
GP_OUTOFSCREEN
- } GPType;
+ };
+
GPType gptype;
- /********************/
- /* Static Functions */
- /********************/
-
GroundpieceData ();
GroundpieceData (xmlDocPtr doc, xmlNodePtr cur);
+
+ GroundpieceData (const GroundpieceData& old);
+ GroundpieceData operator= (const GroundpieceData& old);
+
+ virtual ~GroundpieceData ();
EditorObjLst create_EditorObj();
void write_xml(std::ostream& xml);
Index: gui_obj.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/gui_obj.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- gui_obj.hxx 16 Aug 2002 13:03:35 -0000 1.5
+++ gui_obj.hxx 23 Aug 2002 15:49:48 -0000 1.6
@@ -45,13 +45,13 @@
virtual void draw_clipped();
/** Return true if the mouse is over this GUI component */
- virtual bool mouse_over (int x, int y) { if(x); if(y); return false; }
+ virtual bool mouse_over (int x, int y) { UNUSED_ARG(x); UNUSED_ARG(y);
return false; }
/// Draw the gui element
virtual void draw() = 0;
/// Move the world one step further
- virtual void update(float delta);
+ virtual void update (float delta);
/** Update all elements, which are indepented of the world speed
(for example scrolling). */
@@ -65,6 +65,10 @@
virtual void on_mouse_click () {}
virtual void on_mouse_press () {}
virtual void on_mouse_release () {}
+
+private:
+ GuiObj (const GuiObj&);
+ GuiObj operator= (const GuiObj&);
};
#endif
Index: gui_screen.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/gui_screen.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- gui_screen.hxx 17 Aug 2002 01:03:27 -0000 1.6
+++ gui_screen.hxx 23 Aug 2002 15:49:48 -0000 1.7
@@ -67,6 +67,9 @@
private:
void process_button_event (Input::ButtonEvent* event);
+
+ GUIScreen (const GUIScreen&);
+ GUIScreen operator= (const GUIScreen&);
};
#endif
Index: hotspot.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/hotspot.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- hotspot.hxx 24 Jun 2002 22:52:54 -0000 1.2
+++ hotspot.hxx 23 Aug 2002 15:49:49 -0000 1.3
@@ -39,6 +39,10 @@
void draw_offset(int x, int y, float s = 1.0);
virtual float get_z_pos() const { return (int) pos.z; }
+
+private:
+ Hotspot (const Hotspot&);
+ Hotspot operator= (const Hotspot&);
};
#endif
Index: hotspot_data.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/hotspot_data.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- hotspot_data.cxx 2 Jul 2002 10:42:38 -0000 1.3
+++ hotspot_data.cxx 23 Aug 2002 15:49:49 -0000 1.4
@@ -69,6 +69,30 @@
}
}
+HotspotData::HotspotData (const HotspotData& old) : WorldObjData(old),
+ pos(old.pos),
+ speed(old.speed),
+ para(old.para),
+ desc(old.desc)
+{
+}
+
+HotspotData
+HotspotData::operator= (const HotspotData& old)
+{
+ if (this == &old)
+ return *this;
+
+ WorldObjData::operator=(old);
+
+ pos = old.pos;
+ speed = old.speed;
+ para = old.para;
+ desc = old.desc;
+
+ return *this;
+}
+
WorldObj*
HotspotData::create_WorldObj()
{
Index: hotspot_data.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/hotspot_data.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- hotspot_data.hxx 25 Jun 2002 12:20:31 -0000 1.4
+++ hotspot_data.hxx 23 Aug 2002 15:49:49 -0000 1.5
@@ -37,7 +37,11 @@
HotspotData() {
clean();
}
+
HotspotData (xmlDocPtr doc, xmlNodePtr cur);
+
+ HotspotData (const HotspotData& old);
+ HotspotData operator= (const HotspotData& old);
void clean() {
Index: html_browser.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/html_browser.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- html_browser.hxx 16 Aug 2002 13:03:35 -0000 1.2
+++ html_browser.hxx 23 Aug 2002 15:49:49 -0000 1.3
@@ -20,8 +20,8 @@
#ifndef PINGUS_HTML_BROWSER_HXX
#define PINGUS_HTML_BROWSER_HXX
-#include <string>
#include "pingus.hxx"
+#include <string>
/** Class for launching a HTMLBrowser */
class HTMLBrowser
Index: hurry_up.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/hurry_up.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- hurry_up.hxx 2 Aug 2002 11:53:52 -0000 1.3
+++ hurry_up.hxx 23 Aug 2002 15:49:49 -0000 1.4
@@ -47,6 +47,10 @@
virtual void draw();
virtual void update(float delta);
void set_client(Client*);
+
+private:
+ HurryUp (const HurryUp&);
+ HurryUp operator= (const HurryUp&);
};
#endif
Index: input_event.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/input_event.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- input_event.hxx 16 Aug 2002 13:03:35 -0000 1.6
+++ input_event.hxx 23 Aug 2002 15:49:49 -0000 1.7
@@ -22,8 +22,8 @@
#error "Don't used this the moment, its underdevelopment and not compilable"
-#include <ClanLib/Core/Math/cl_vector.h>
#include "pingus.hxx"
+#include <ClanLib/Core/Math/cl_vector.h>
/** This will need some^H^H^H^H a lot of work */
typedef enum {
Index: intro.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/intro.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- intro.hxx 16 Aug 2002 17:15:31 -0000 1.3
+++ intro.hxx 23 Aug 2002 15:49:49 -0000 1.4
@@ -42,12 +42,16 @@
unsigned int blink_time;
public:
- Intro(PingusMenuManager* m);
+ Intro (PingusMenuManager* m);
~Intro();
void draw();
void update (float delta);
void preload ();
+
+private:
+ Intro (const Intro&);
+ Intro operator= (const Intro&);
};
#endif
Index: layer_manager.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/layer_manager.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- layer_manager.hxx 16 Aug 2002 13:03:35 -0000 1.4
+++ layer_manager.hxx 23 Aug 2002 15:49:49 -0000 1.5
@@ -20,9 +20,9 @@
#ifndef HEADER_PINGUS_LAYER_MANAGER_HXX
#define HEADER_PINGUS_LAYER_MANAGER_HXX
+#include "pingus.hxx"
#include <cmath>
#include <ClanLib/Display/Display/surface.h>
-#include "pingus.hxx"
class LayerManager
{
@@ -30,9 +30,7 @@
class Layer
{
public:
- Layer () {
- x_pos = 0.0f;
- y_pos = 0.0f;
+ Layer () : x_pos(0.0f), y_pos(0.0f) {
}
void draw () {
@@ -57,6 +55,27 @@
float x_pos;
float y_pos;
+
+ Layer (const Layer& old) : sur(old.sur),
+ x_update(old.x_update), y_update(old.y_update),
+ x_offset(old.x_offset), y_offset(old.y_offset),
+ x_pos(old.x_pos), y_pos(old.y_pos)
+ { }
+
+ Layer operator= (const Layer& old) {
+ if (this == &old)
+ return *this;
+
+ sur = old.sur;
+ x_update = old.x_update;
+ y_update = old.y_update;
+ x_offset = old.x_offset;
+ y_offset = old.y_offset;
+ x_pos = old.x_pos;
+ y_pos = old.y_pos;
+
+ return *this;
+ }
};
std::vector<Layer> layers;
@@ -68,9 +87,12 @@
void add_layer (const CL_Surface& sur, float x_o, float y_o, float x_u,
float y_u);
void draw ();
void update (float delta);
+
+private:
+ LayerManager (const LayerManager&);
+ LayerManager operator= (const LayerManager&);
};
#endif
/* EOF */
-
Index: level_desc.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/level_desc.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- level_desc.cxx 22 Aug 2002 02:24:59 -0000 1.5
+++ level_desc.cxx 23 Aug 2002 15:49:49 -0000 1.6
@@ -17,7 +17,6 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#include "pingus.hxx"
#include <stdio.h>
#include <ClanLib/Core/System/system.h>
#include <ClanLib/Display/Display/display.h>
Index: level_desc.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/level_desc.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- level_desc.hxx 9 Aug 2002 22:02:13 -0000 1.3
+++ level_desc.hxx 23 Aug 2002 15:49:49 -0000 1.4
@@ -43,6 +43,10 @@
PingusLevelDesc(PLF*);
void draw(PingusLevelDesc::LoadingStatus status);
+
+private:
+ PingusLevelDesc (const PingusLevelDesc&);
+ PingusLevelDesc operator= (const PingusLevelDesc&);
};
#endif
Index: level_interrupt.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/level_interrupt.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- level_interrupt.hxx 16 Aug 2002 13:03:35 -0000 1.3
+++ level_interrupt.hxx 23 Aug 2002 15:49:49 -0000 1.4
@@ -22,26 +22,21 @@
#include "pingus.hxx"
-///
class LevelInterrupt
{
public:
- ///
- enum Status { restart, quit, select_new, undef }///
-;
+ enum Status { restart, quit, select_new, undef };
- ///
- LevelInterrupt();
- ///
- LevelInterrupt(Status s);
+ LevelInterrupt ();
+ LevelInterrupt (Status s);
- ///
Status get_status();
private:
- ///
Status status;
-}///
-;
+
+ LevelInterrupt (const LevelInterrupt&);
+ LevelInterrupt operator= (const LevelInterrupt&);
+};
#endif
Index: level_result.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/level_result.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- level_result.hxx 16 Aug 2002 13:03:35 -0000 1.3
+++ level_result.hxx 23 Aug 2002 15:49:49 -0000 1.4
@@ -20,14 +20,13 @@
#ifndef HEADER_PINGUS_LEVEL_RESULT_HXX
#define HEADER_PINGUS_LEVEL_RESULT_HXX
-#include <ClanLib/Display/Display/surface.h>
#include "pingus.hxx"
+#include <ClanLib/Display/Display/surface.h>
class CL_Font;
class World;
class Controller;
-///
class PingusLevelResult
{
private:
@@ -42,6 +41,10 @@
void draw(void);
std::string get_message(int);
+
+private:
+ PingusLevelResult (const PingusLevelResult&);
+ PingusLevelResult operator= (const PingusLevelResult&);
};
#endif
Index: libxmlfwd.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/libxmlfwd.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- libxmlfwd.hxx 16 Aug 2002 13:03:35 -0000 1.2
+++ libxmlfwd.hxx 23 Aug 2002 15:49:49 -0000 1.3
@@ -24,6 +24,7 @@
#ifndef WIN32
// FIXME: This might not work with each and every version of libxml
+// maybe some #ifdef for different versions are required
class _xmlDoc; typedef _xmlDoc* xmlDocPtr;
class _xmlNode; typedef _xmlNode* xmlNodePtr;
#else
Index: liquid.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/liquid.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- liquid.hxx 24 Jun 2002 22:52:55 -0000 1.2
+++ liquid.hxx 23 Aug 2002 15:49:49 -0000 1.3
@@ -41,6 +41,10 @@
float get_z_pos() const { return (int) pos.z; }
void draw_colmap();
void draw_offset(int, int, float s = 1.0);
+
+private:
+ Liquid (const Liquid&);
+ Liquid operator= (const Liquid&);
};
#endif
Index: liquid_data.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/liquid_data.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- liquid_data.cxx 22 Aug 2002 00:36:30 -0000 1.5
+++ liquid_data.cxx 23 Aug 2002 15:49:49 -0000 1.6
@@ -22,7 +22,6 @@
#include "editor/plfobj.hxx"
#include "string_converter.hxx"
#include "xml_helper.hxx"
-#include "boost/smart_ptr.hpp"
void
LiquidData::write_xml(std::ostream& xml)
@@ -77,6 +76,32 @@
cur = cur->next;
}
+}
+
+LiquidData::LiquidData (const LiquidData& old) : WorldObjData(old),
+ desc(old.desc),
+ pos(old.pos),
+
old_width_handling(old.old_width_handling),
+ width(old.width),
+ speed(old.speed)
+{
+}
+
+LiquidData
+LiquidData::operator= (const LiquidData& old)
+{
+ if (this == &old)
+ return *this;
+
+ WorldObjData::operator=(old);
+
+ desc = old.desc;
+ pos = old.pos;
+ old_width_handling = old.old_width_handling;
+ width = old.width;
+ speed = old.speed;
+
+ return *this;
}
WorldObj*
Index: liquid_data.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/liquid_data.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- liquid_data.hxx 2 Jul 2002 10:42:38 -0000 1.5
+++ liquid_data.hxx 23 Aug 2002 15:49:49 -0000 1.6
@@ -26,7 +26,6 @@
#include "libxmlfwd.hxx"
-///
class LiquidData : public WorldObjData
{
public:
@@ -38,13 +37,17 @@
int width;
int speed;
-
- ///
+
+public:
LiquidData()
{
clean();
}
+
LiquidData (xmlDocPtr doc, xmlNodePtr cur);
+
+ LiquidData (const LiquidData& old);
+ LiquidData operator= (const LiquidData& old);
/** Reset the object to some reasonable defaults */
void clean()
Index: loading.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/loading.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- loading.cxx 12 Jun 2002 19:09:37 -0000 1.1
+++ loading.cxx 23 Aug 2002 15:49:49 -0000 1.2
@@ -65,7 +65,7 @@
}
void
-Loading::draw_progress(std::string str, float progress)
+Loading::draw_progress(const std::string& str, float progress)
{
bool cursor_shown = Display::cursor_shown();
Index: loading.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/loading.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- loading.hxx 16 Aug 2002 13:03:35 -0000 1.3
+++ loading.hxx 23 Aug 2002 15:49:49 -0000 1.4
@@ -20,37 +20,31 @@
#ifndef HEADER_PINGUS_LOADING_HXX
#define HEADER_PINGUS_LOADING_HXX
-#include <ClanLib/Display/Display/surface.h>
#include "pingus.hxx"
+#include <ClanLib/Display/Display/surface.h>
class CL_Font;
-///
class Loading
{
private:
- ///
CL_Surface sur;
- ///
CL_Font* font;
- ///
bool is_init;
public:
- ///
- Loading();
- ///
- ~Loading();
- ///
- void init();
- ///
- void draw();
- ///
- void draw_progress(std::string, float);
-}///
-;
+ Loading ();
+ ~Loading ();
+
+ void init ();
+ void draw ();
+ void draw_progress (const std::string& str, float progress);
+
+private:
+ Loading (const Loading&);
+ Loading operator= (const Loading&);
+};
-///
extern Loading loading_screen;
#endif
Index: main_menu.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/main_menu.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- main_menu.hxx 16 Aug 2002 13:03:35 -0000 1.3
+++ main_menu.hxx 23 Aug 2002 15:49:49 -0000 1.4
@@ -22,16 +22,17 @@
#include "pingus.hxx"
-///
class MainMenu
{
private:
public:
- MainMenu();
- ///
- void start(void);
-}///
-;
+ MainMenu ();
+ void start (void);
+
+private:
+ MainMenu (const MainMenu&);
+ MainMenu operator= (const MainMenu&);
+};
#endif
Index: menu_background.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/menu_background.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- menu_background.hxx 3 Aug 2002 17:20:37 -0000 1.4
+++ menu_background.hxx 23 Aug 2002 15:49:49 -0000 1.5
@@ -32,6 +32,10 @@
void draw ();
void update (float delta);
+
+private:
+ MenuBackground (const MenuBackground&);
+ MenuBackground operator= (const MenuBackground&);
};
#endif
Index: message_box.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/message_box.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- message_box.cxx 12 Jun 2002 19:09:37 -0000 1.1
+++ message_box.cxx 23 Aug 2002 15:49:49 -0000 1.2
@@ -26,11 +26,11 @@
#include "pingus_resource.hxx"
#include "message_box.hxx"
-PingusMessageBox::PingusMessageBox(std::string s)
+PingusMessageBox::PingusMessageBox (const std::string& s)
+ : str(s),
+ font
(PingusResource::load_font("Fonts/xterm","fonts"))
{
- str = s;
std::cout << "Error: " << str << std::endl;
- font = PingusResource::load_font("Fonts/xterm","fonts");
draw();
}
Index: message_box.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/message_box.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- message_box.hxx 16 Aug 2002 13:03:35 -0000 1.3
+++ message_box.hxx 23 Aug 2002 15:49:49 -0000 1.4
@@ -20,27 +20,25 @@
#ifndef HEADER_PINGUS_MESSAGE_BOX_HXX
#define HEADER_PINGUS_MESSAGE_BOX_HXX
-#include <string>
#include "pingus.hxx"
+#include <string>
class CL_Font;
-///
class PingusMessageBox
{
private:
- ///
std::string str;
- ///
CL_Font* font;
public:
- ///
- PingusMessageBox(std::string);
+ PingusMessageBox (const std::string& s);
- ///
- void draw(void);
-}///
-;
+ void draw (void);
+
+private:
+ PingusMessageBox (const PingusMessageBox&);
+ PingusMessageBox operator= (const PingusMessageBox&);
+};
#endif
Index: multiline_text.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/multiline_text.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- multiline_text.hxx 16 Aug 2002 13:03:35 -0000 1.3
+++ multiline_text.hxx 23 Aug 2002 15:49:49 -0000 1.4
@@ -20,42 +20,33 @@
#ifndef HEADER_PINGUS_MULTILINE_TEXT_HXX
#define HEADER_PINGUS_MULTILINE_TEXT_HXX
+#include "pingus.hxx"
#include <string>
#include <vector>
-#include "pingus.hxx"
class CL_Font;
-///
class MultiLineText
{
private:
- ///
CL_Font* font;
- ///
std::vector<std::string> text;
- ///
int width, height;
public:
- ///
MultiLineText();
- ///
void set_font(CL_Font*);
- ///
void set_text(const std::string&, int width);
- ///
void print_left(int, int);
- ///
void print_right(int, int);
- ///
void print_center(int, int);
- ///
int get_width();
- ///
int get_height();
-}///
-;
+
+private:
+ MultiLineText (const MultiLineText&);
+ MultiLineText operator= (const MultiLineText&);
+};
#endif
Index: multiplayer_client.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/multiplayer_client.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- multiplayer_client.hxx 2 Jul 2002 15:46:58 -0000 1.4
+++ multiplayer_client.hxx 23 Aug 2002 15:49:49 -0000 1.5
@@ -45,6 +45,10 @@
void update (float delta);
void draw ();
+
+private:
+ MultiplayerClient (const MultiplayerClient&);
+ MultiplayerClient operator= (const MultiplayerClient&);
};
#endif
Index: multiplayer_client_child.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/multiplayer_client_child.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- multiplayer_client_child.hxx 12 Aug 2002 22:52:04 -0000 1.4
+++ multiplayer_client_child.hxx 23 Aug 2002 15:49:49 -0000 1.5
@@ -71,6 +71,10 @@
void on_next_action_press (const CL_Vector& pos);
void on_previous_action_press (const CL_Vector& pos);
+
+private:
+ MultiplayerClientChild (const MultiplayerClientChild&);
+ MultiplayerClientChild operator= (const MultiplayerClientChild&);
};
#endif
Index: multiplayer_config.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/multiplayer_config.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- multiplayer_config.hxx 16 Aug 2002 13:03:35 -0000 1.3
+++ multiplayer_config.hxx 23 Aug 2002 15:49:49 -0000 1.4
@@ -33,6 +33,10 @@
void display ();
void start ();
+
+private:
+ MultiplayerConfig (const MultiplayerConfig&);
+ MultiplayerConfig operator= (const MultiplayerConfig&);
};
#endif
Index: multiplayer_game.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/multiplayer_game.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- multiplayer_game.hxx 16 Aug 2002 13:03:35 -0000 1.3
+++ multiplayer_game.hxx 23 Aug 2002 15:49:49 -0000 1.4
@@ -31,6 +31,10 @@
~MultiplayerGame ();
void start ();
+
+private:
+ MultiplayerGame (const MultiplayerGame&);
+ MultiplayerGame operator= (const MultiplayerGame&);
};
#endif
Index: music_provider.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/music_provider.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- music_provider.cxx 17 Aug 2002 17:56:23 -0000 1.2
+++ music_provider.cxx 23 Aug 2002 15:49:49 -0000 1.3
@@ -21,10 +21,10 @@
#include "pingus_error.hxx"
#include "music_provider.hxx"
-std::list<PingusMusicProvider::music_pair> PingusMusicProvider::music;
+std::map<std::string, Mix_Music*> PingusMusicProvider::music;
Mix_Music*
-PingusMusicProvider::load(std::string str)
+PingusMusicProvider::load (const std::string& str)
{
#ifdef HAVE_LIBSDL_MIXER
Mix_Music* music_data;
@@ -37,33 +37,29 @@
}
else
{
- music_pair song;
- song.filename = str;
- song.data = Mix_LoadMUS(str.c_str());
+ music_data = Mix_LoadMUS(str.c_str());
- if (!song.data)
+ if (!music_data)
{
throw PingusError("PingusMusicProvider: Couldn't load " + str + ": "
+ SDL_GetError());
}
else
{
- music.push_back(song);
- return song.data;
+ music[str] = music_data;
+ return music_data;
}
}
#endif /* HAVE_LIBSDL_MIXER */
- if (str.size()); // suppress warning about unused argument
+ UNUSED_ARG(str);
return 0;
}
Mix_Music*
-PingusMusicProvider::get(std::string str)
+PingusMusicProvider::get (const std::string& str)
{
- for(std::list<music_pair>::iterator i = music.begin(); i != music.end(); ++i)
- {
- if (i->filename == str)
- return i->data;
- }
+ if (music.count(str))
+ return music[str];
+
return 0;
}
Index: music_provider.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/music_provider.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- music_provider.hxx 24 Jun 2002 22:52:55 -0000 1.2
+++ music_provider.hxx 23 Aug 2002 15:49:49 -0000 1.3
@@ -20,31 +20,22 @@
#ifndef HEADER_PINGUS_MUSIC_PROVIDER_HXX
#define HEADER_PINGUS_MUSIC_PROVIDER_HXX
-#include <list>
+#include <map>
#include <string>
#include "audio.hxx"
-///
class PingusMusicProvider
{
-private:
- ///
- struct music_pair {
- ///
- Mix_Music* data;
- ///
- std::string filename;
- }///
-;
- ///
- static std::list<music_pair> music;
+ static std::map<std::string, Mix_Music*> music;
+
public:
- ///
- static Mix_Music* load(std::string);
- ///
- static Mix_Music* get(std::string);
-}///
-;
+ static Mix_Music* load (const std::string& str);
+ static Mix_Music* get (const std::string& str);
+
+private:
+ PingusMusicProvider (const PingusMusicProvider&);
+ PingusMusicProvider operator= (const PingusMusicProvider&);
+};
#endif
Index: option_menu.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/option_menu.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- option_menu.cxx 13 Jun 2002 14:25:12 -0000 1.2
+++ option_menu.cxx 23 Aug 2002 15:49:49 -0000 1.3
@@ -41,37 +41,92 @@
// ----- OptionEntry -----
-OptionEntry::OptionEntry(std::string s, bool* v, int x, int y)
+OptionEntry::OptionEntry (const std::string& s, bool* v, int x, int y)
+ : value_bool(v),
+ value_int(0),
+ value_str(0),
+ font(PingusResource::load_font("Fonts/smallfont_h",
"fonts")),
+ x_pos(x),
+ y_pos(y),
+ str(s)
{
- font = PingusResource::load_font("Fonts/smallfont_h", "fonts");
- str = s;
- value_bool = v;
- value_int = 0;
- value_str = 0;
- x_pos = x;
- y_pos = y;
}
-OptionEntry::OptionEntry(std::string s, std::string* v, int x, int y)
+OptionEntry::OptionEntry (const std::string& s, std::string* v, int x, int y)
+ : value_bool(0),
+ value_int(0),
+ value_str(v),
+ font(PingusResource::load_font("Fonts/smallfont_h",
"fonts")),
+ x_pos(x),
+ y_pos(y),
+ str(s)
{
- font = PingusResource::load_font("Fonts/smallfont_h", "fonts");
- str = s;
- value_str = v;
- value_int = 0;
- value_bool = 0;
- x_pos = x;
- y_pos = y;
}
-OptionEntry::OptionEntry(std::string s, int* v, int x, int y)
+OptionEntry::OptionEntry (const std::string& s, int* v, int x, int y)
+ : value_bool(0),
+ value_int(v),
+ value_str(0),
+ font(PingusResource::load_font("Fonts/smallfont_h",
"fonts")),
+ x_pos(x),
+ y_pos(y),
+ str(s)
{
- font = PingusResource::load_font("Fonts/smallfont_h", "fonts");
- str = s;
- value_str = 0;
- value_int = v;
- value_bool = 0;
- x_pos = x;
- y_pos = y;
+}
+
+OptionEntry::OptionEntry (const OptionEntry& old) : value_bool(0),
+ value_int(0),
+ value_str(0),
+ font(new
CL_Font(*(old.font))),
+ x_pos(old.x_pos),
+ y_pos(old.y_pos),
+ str(old.str)
+{
+ if (old.value_bool)
+ value_bool = new bool(*(old.value_bool));
+
+ if (old.value_int)
+ value_int = new int(*(old.value_int));
+
+ if (old.value_str)
+ value_str = new std::string(*(old.value_str));
+}
+
+OptionEntry
+OptionEntry::operator= (const OptionEntry& old)
+{
+ if (this == &old)
+ return *this;
+
+ font = new CL_Font(*(old.font));
+ x_pos = old.x_pos;
+ y_pos = old.y_pos;
+ str = old.str;
+
+ if (old.value_bool)
+ value_bool = new bool(*(old.value_bool));
+ else
+ value_bool = 0;
+
+ if (old.value_int)
+ value_int = new int(*(old.value_int));
+ else
+ value_int = 0;
+
+ if (old.value_str)
+ value_str = new std::string(*(old.value_str));
+ else
+ value_str = 0;
+
+ return *this;
+}
+
+OptionEntry::~OptionEntry ()
+{
+ delete value_bool;
+ delete value_int;
+ delete value_str;
+ delete font;
}
void
@@ -137,9 +192,15 @@
}
}
+OptionMenu::Event::Event ()
+{
+}
+
void
-OptionMenu::Event::on_button_press(CL_InputDevice * /*device*/, const CL_Key &
/*key*/)
+OptionMenu::Event::on_button_press(CL_InputDevice * device, const CL_Key & key)
{
+ UNUSED_ARG(device);
+ UNUSED_ARG(key);
}
void
@@ -233,21 +294,21 @@
}
void
-OptionMenu::add_entry(std::string e, bool* v)
+OptionMenu::add_entry (const std::string& e, bool* v)
{
entry.push_back(OptionEntry(e, v, entry_x, entry_y));
entry_y += 20;
}
void
-OptionMenu::add_entry(std::string e, int* v)
+OptionMenu::add_entry (const std::string& e, int* v)
{
entry.push_back(OptionEntry(e, v, entry_x, entry_y));
entry_y += 20;
}
void
-OptionMenu::add_entry(std::string e, std::string* v)
+OptionMenu::add_entry (const std::string& e, std::string* v)
{
entry.push_back(OptionEntry(e, v, entry_x, entry_y));
entry_y += 20;
Index: option_menu.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/option_menu.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- option_menu.hxx 2 Jul 2002 15:46:58 -0000 1.3
+++ option_menu.hxx 23 Aug 2002 15:49:49 -0000 1.4
@@ -29,112 +29,90 @@
class CL_Font;
class CL_InputDevice;
-///
class OptionEntry
{
private:
- ///
- std::string str;
- ///
- bool* value_bool;
- ///
+ bool* value_bool;
+ int* value_int;
std::string* value_str;
- ///
- int* value_int;
- ///
- int x_pos, y_pos;
- ///
- CL_Font* font;
+ CL_Font* font;
+ int x_pos;
+ int y_pos;
+ std::string str;
public:
- ///
- OptionEntry(std::string, bool*, int, int);
- ///
- OptionEntry(std::string, int*, int, int);
- ///
- OptionEntry(std::string, std::string*, int, int);
- ///
+ OptionEntry (const std::string&, bool*, int, int);
+ OptionEntry (const std::string&, int*, int, int);
+ OptionEntry (const std::string&, std::string*, int, int);
+
+ OptionEntry (const OptionEntry& old);
+ OptionEntry operator= (const OptionEntry& old);
+
+ ~OptionEntry ();
+
bool mouse_over();
- ///
void draw();
- ///
void toggle();
- ///
void rtoggle();
-}///
-;
+};
/** F***ing, stupid, ugly option menu, need to rewrite that... */
class OptionMenu : public PingusSubMenu
{
private:
- ///
CL_Font* font;
- ///
CL_Font* title_font;
- ///
CL_Surface background;
- ///
CL_Surface back;
- ///
bool quit;
- ///
bool is_init;
- ///
int entry_x, entry_y;
- ///
typedef std::vector<OptionEntry>::iterator EntryIter;
- ///
std::vector<OptionEntry> entry;
- ///
class Event //: public CL_Event_ButtonPress, public CL_Event_ButtonRelease
{
public:
- ///
OptionMenu* option_menu;
- ///
- virtual void on_button_press(CL_InputDevice *device, const CL_Key &key);
- ///
- virtual void on_button_release(CL_InputDevice *device, const CL_Key &key);
+
+ 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);
+
+ private:
+ Event (const Event&);
+ Event operator= (const Event&);
};
- ///
+
+
friend class Event;
- ///
Event* event;
public:
- ///
- OptionMenu(PingusMenuManager* m);
- ///
- ~OptionMenu();
+ OptionMenu (PingusMenuManager* m);
+ ~OptionMenu ();
- ///
- void init();
- ///
- void display();
- ///
- void draw_background();
- ///
+ void init ();
+ void display ();
+ void draw_background ();
void preload () { init (); }
void update (float delta);
- void draw();
- ///
- void check_click();
- ///
- EntryIter current_item();
- ///
- void add_entry(std::string e, bool* v);
- ///
- void add_entry(std::string e, int* v);
- ///
- void add_entry(std::string e, std::string* v);
+ void draw ();
+ void check_click ();
+ EntryIter current_item ();
+ void add_entry (const std::string& e, bool* v);
+ void add_entry (const std::string& e, int* v);
+ void add_entry (const std::string& e, std::string* v);
+
+private:
+ OptionMenu (const OptionMenu&);
+ OptionMenu operator= (const OptionMenu&);
};
-///
extern OptionMenu option_menu;
#endif
/* EOF */
-
Index: path_manager.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/path_manager.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- path_manager.cxx 23 Jun 2002 19:16:41 -0000 1.2
+++ path_manager.cxx 23 Aug 2002 15:49:49 -0000 1.3
@@ -35,13 +35,13 @@
}
void
-PathManager::add_path (std::string path)
+PathManager::add_path (const std::string& path)
{
path_list.push_back (path);
}
std::string
-PathManager::complete (std::string relative_path)
+PathManager::complete (const std::string& relative_path)
{
std::string comp_path = base_path + "/" + relative_path;
pout(PINGUS_DEBUG_LOADING) << "PathManager: " << relative_path << " -> " <<
comp_path << std::endl;
@@ -50,7 +50,7 @@
}
bool
-PathManager::find_path (std::list<std::string> file_list)
+PathManager::find_path (const std::list<std::string>& file_list)
{
for (PathIter i = path_list.begin (); !path_found && i != path_list.end ();
++i)
{
@@ -78,7 +78,7 @@
/** Search for a path which contains the file 'file' */
bool
-PathManager::find_path (std::string file)
+PathManager::find_path (const std::string& file)
{
for (PathIter i = path_list.begin (); !path_found && i != path_list.end ();
++i)
{
@@ -99,7 +99,7 @@
}
void
-PathManager::set_path (std::string path)
+PathManager::set_path (const std::string& path)
{
base_path = path;
}
Index: path_manager.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/path_manager.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- path_manager.hxx 16 Aug 2002 13:03:35 -0000 1.3
+++ path_manager.hxx 23 Aug 2002 15:49:49 -0000 1.4
@@ -20,15 +20,15 @@
#ifndef HEADER_PINGUS_PATH_MANAGER_HXX
#define HEADER_PINGUS_PATH_MANAGER_HXX
+#include "pingus.hxx"
#include <string>
#include <list>
-#include "pingus.hxx"
class PathManager
{
private:
std::list<std::string> path_list;
- typedef std::list<std::string>::iterator PathIter;
+ typedef std::list<std::string>::const_iterator PathIter;
bool path_found;
std::string base_path;
@@ -38,27 +38,27 @@
/** Search for a path which contains all the files given in
file_list */
- bool find_path (std::list<std::string> file_list);
+ bool find_path (const std::list<std::string>& file_list);
/** Search for a path which contains the file 'file' */
- bool find_path (std::string file);
+ bool find_path (const std::string& file);
/** Set the path directly without using find_path/add_path
Must include trailing slash */
- void set_path (std::string path);
+ void set_path (const std::string& path);
/** Add a path to the search list */
- void add_path (std::string path);
-
- /** Set the executable name (argv[0]), its use as a hint to find the
- correct path */
- void set_executable (std::string executable);
+ void add_path (const std::string& path);
std::string get_base_path () { return base_path; }
/** Complete a releative path to the absolute path, the returned
path contains a trailing slash */
- std::string complete (std::string relative_path);
+ std::string complete (const std::string& relative_path);
+
+private:
+ PathManager (const PathManager&);
+ PathManager operator= (const PathManager&);
};
extern PathManager path_manager;
Index: pingu.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingu.cxx,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- pingu.cxx 22 Aug 2002 10:21:29 -0000 1.18
+++ pingu.cxx 23 Aug 2002 15:49:49 -0000 1.19
@@ -208,6 +208,8 @@
{
act->on_failed_apply (this);
}
+
+ return ret_val;
}
bool
Index: pingu.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingu.hxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- pingu.hxx 28 Jun 2002 18:11:10 -0000 1.9
+++ pingu.hxx 23 Aug 2002 15:49:49 -0000 1.10
@@ -78,12 +78,10 @@
CL_Vector velocity;
-public:
bool request_set_action (PinguAction*);
void set_action (PinguAction*);
-public:
/** Creates a new Pingu at the given coordinates
@param pos The start position of the pingu
@param owner The owner id of the pingu (used for multiplayer) */
@@ -199,6 +197,10 @@
another action can be applied, false otherwise (exiter,
splashed, etc.) */
bool catchable ();
+
+private:
+ Pingu (const Pingu&);
+ Pingu operator= (const Pingu&);
};
#endif /* PINGU_HH */
Index: pingu_action.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingu_action.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- pingu_action.cxx 28 Jun 2002 15:12:22 -0000 1.5
+++ pingu_action.cxx 23 Aug 2002 15:49:49 -0000 1.6
@@ -26,17 +26,16 @@
// Initialise class static.
const int PinguAction::pingu_height = 26;
-PinguAction::PinguAction()
- : pingu (0)
+PinguAction::PinguAction () : pingu (0)
{
}
-PinguAction::~PinguAction()
+PinguAction::~PinguAction ()
{
}
void
-PinguAction::set_pingu(Pingu* pingu_data)
+PinguAction::set_pingu (Pingu* pingu_data)
{
pingu = pingu_data;
assert(pingu);
@@ -54,13 +53,13 @@
// Wrapper around the colmap, to get the pixels infront of the pingu,
// from is current position
int
-PinguAction::rel_getpixel(int x, int y)
+PinguAction::rel_getpixel (int x, int y)
{
return pingu->get_world()->get_colmap()->getpixel(pingu->get_x() + (x *
pingu->direction), (pingu->get_y ()) - y);
}
ActionType
-PinguAction::get_activation_mode() const
+PinguAction::get_activation_mode () const
{
return INSTANT;
}
Index: pingu_action.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingu_action.hxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- pingu_action.hxx 22 Aug 2002 10:21:29 -0000 1.10
+++ pingu_action.hxx 23 Aug 2002 15:49:49 -0000 1.11
@@ -24,9 +24,6 @@
#include "pingu_enums.hxx"
class Pingu;
-
-using namespace Pingus::Actions;
-
class ActionHolder;
enum ActionType
@@ -37,10 +34,10 @@
COUNTDOWN_TRIGGERED
};
-// 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.
+/** 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. */
class PinguAction : public WorldObj
{
protected:
@@ -68,29 +65,29 @@
int rel_getpixel(int x, int y);
/** Checks if this action allows to be overwritten with the given new action
*/
- virtual bool change_allowed (ActionName) { return true; }
+ virtual bool change_allowed (Pingus::Actions::ActionName) { return true; }
/** Used to load all data, which is needed by the action, its
seperated and called in set_pingu(), because some data will be
only valid if set_pingu() is called. */
- virtual void init(void) {};
+ virtual void init (void) {};
/// The "AI" of the pingu.
- virtual void update(float delta) = 0;
+ virtual void update (float delta) = 0;
/** Draws the surfaced defined by the action, can be overwritten if
the action needs a more complicated way of drawing. */
- virtual void draw_offset(int x, int y, float s) =0;
+ virtual void draw_offset (int x, int y, float s) =0;
/// Returns the activation mode
- virtual ActionType get_activation_mode(void) const;
+ virtual ActionType get_activation_mode (void) const;
/** 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(void) const =0;
+ virtual std::string get_name () const =0;
/// The type of the action
- virtual ActionName get_type() const =0;
+ virtual Pingus::Actions::ActionName get_type () const =0;
/** Return the character that is shown when a persitent action is
activated in the CaptureRectangle. */
@@ -117,10 +114,14 @@
bool head_collision_on_walk (int x, int y);
/** Called if the action was successfully applied via request_set_action */
- virtual void on_successfull_apply (Pingu*) {}
+ virtual void on_successfull_apply (Pingu*) { }
/** Called if the request_set_action failded to apply this action */
- virtual void on_failed_apply (Pingu*) {}
+ virtual void on_failed_apply (Pingu*) { }
+
+private:
+ PinguAction (const PinguAction&);
+ PinguAction operator= (const PinguAction&);
};
#endif /* PINGU_ACTION_HH */
Index: pingu_action_factory.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingu_action_factory.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- pingu_action_factory.cxx 22 Aug 2002 02:24:59 -0000 1.6
+++ pingu_action_factory.cxx 23 Aug 2002 15:49:49 -0000 1.7
@@ -17,7 +17,6 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#include "pingus.hxx"
#include <iostream>
#include "pingus_error.hxx"
Index: pingu_action_factory.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingu_action_factory.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- pingu_action_factory.hxx 28 Jun 2002 15:12:22 -0000 1.3
+++ pingu_action_factory.hxx 23 Aug 2002 15:49:49 -0000 1.4
@@ -49,6 +49,10 @@
/** Allocate the given action */
PinguAction* create (ActionName id);
+
+private:
+ PinguActionFactory (const PinguActionFactory&);
+ PinguActionFactory operator= (const PinguActionFactory&);
};
class PinguActionAbstractFactory
@@ -59,6 +63,10 @@
}
virtual PinguAction* create () =0;
+
+private:
+ PinguActionAbstractFactory (const PinguActionAbstractFactory&);
+ PinguActionAbstractFactory operator= (const PinguActionAbstractFactory&);
};
template<class T>
@@ -73,6 +81,10 @@
PinguAction* create () {
return new T ();
}
+
+private:
+ PinguActionFactoryImpl (const PinguActionFactoryImpl&);
+ PinguActionFactoryImpl operator= (const PinguActionFactoryImpl&);
};
#endif
Index: pingu_enums.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingu_enums.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- pingu_enums.hxx 16 Aug 2002 13:03:35 -0000 1.5
+++ pingu_enums.hxx 23 Aug 2002 15:49:49 -0000 1.6
@@ -20,8 +20,8 @@
#ifndef HEADER_PINGUS_PINGU_ENUMS_HXX
#define HEADER_PINGUS_PINGU_ENUMS_HXX
-#include <string>
#include "pingus.hxx"
+#include <string>
/** Haven't yet experimented much with pingu status, but maybe it is a
good idea. Maybe that should be changed to a bitmask. */
@@ -62,8 +62,8 @@
Walker
};
- std::string action_to_string(ActionName action);
- ActionName action_from_string(const std::string& action);
+ std::string action_to_string (ActionName action);
+ ActionName action_from_string (const std::string& action);
}
}
Index: pingu_holder.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingu_holder.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- pingu_holder.cxx 17 Jun 2002 09:54:44 -0000 1.3
+++ pingu_holder.cxx 23 Aug 2002 15:49:49 -0000 1.4
@@ -18,10 +18,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "pingu_holder.hxx"
-#include "boost/smart_ptr.hpp"
#include "pingu.hxx"
-
-using namespace boost;
PinguHolder::PinguHolder()
{
Index: pingu_holder.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingu_holder.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- pingu_holder.hxx 24 Jun 2002 22:52:55 -0000 1.2
+++ pingu_holder.hxx 23 Aug 2002 15:49:49 -0000 1.3
@@ -36,10 +36,8 @@
/// The uniq id for the next Pingu
int id_count;
- /// ???
int total_size_count;
- /// ???
int saved_pingus;
/** This vector holds all pingus which are ever allocated in the
@@ -72,6 +70,10 @@
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&);
};
#endif
Index: pingu_info.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingu_info.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- pingu_info.hxx 2 Jul 2002 15:46:58 -0000 1.3
+++ pingu_info.hxx 23 Aug 2002 15:49:49 -0000 1.4
@@ -36,6 +36,10 @@
void draw();
void set_pingu(Pingu* p);
+
+private:
+ PinguInfo (const PinguInfo&);
+ PinguInfo operator= (const PinguInfo&);
};
#endif
Index: pingu_map.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingu_map.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- pingu_map.hxx 24 Jun 2002 22:52:55 -0000 1.2
+++ pingu_map.hxx 23 Aug 2002 15:49:49 -0000 1.3
@@ -35,7 +35,6 @@
///
class PinguMap : public WorldObj
{
-private:
public:
///
PinguMap();
@@ -53,26 +52,26 @@
*/
virtual void draw(int x1, int y1, int w, int h,
int x_of, int y_of, float s=1.0) = 0;
+
virtual void update (float delta);
+
virtual void draw_offset (int, int, float delta);
- ///
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&);
};
#endif
Index: pingus_counter.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingus_counter.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- pingus_counter.hxx 2 Aug 2002 11:53:52 -0000 1.5
+++ pingus_counter.hxx 23 Aug 2002 15:49:49 -0000 1.6
@@ -39,6 +39,10 @@
void draw(void);
void set_client(Client*);
+
+private:
+ PingusCounter (const PingusCounter&);
+ PingusCounter operator= (const PingusCounter&);
};
#endif
Index: pingus_counter_bar.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingus_counter_bar.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- pingus_counter_bar.hxx 24 Jun 2002 22:52:55 -0000 1.2
+++ pingus_counter_bar.hxx 23 Aug 2002 15:49:49 -0000 1.3
@@ -39,6 +39,10 @@
void update(float delta);
void draw ();
+
+private:
+ PingusCounterBar (const PingusCounterBar&);
+ PingusCounterBar operator= (const PingusCounterBar&);
};
#endif
Index: pingus_error.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingus_error.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- pingus_error.cxx 16 Aug 2002 15:13:59 -0000 1.3
+++ pingus_error.cxx 23 Aug 2002 15:49:49 -0000 1.4
@@ -17,8 +17,6 @@
// 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 "pingus_error.hxx"
/* Headers needed for i18n / gettext */
@@ -27,7 +25,7 @@
#include "my_gettext.hxx"
-PingusException::PingusException ()
+PingusException::PingusException (const std::string& mes) : message(mes)
{
}
@@ -35,40 +33,78 @@
{
}
-PingusBug::PingusBug(std::string mes)
+PingusException::PingusException (const PingusException& old) :
message(old.message)
{
- message = mes;
- std::cout << _("PingusBug: ") << message << std::endl;
}
void
-PingusBug::raise (std::string msg)
+PingusException::operator= (const PingusException& old)
+{
+ if (this != &old)
+ message = old.message;
+}
+
+
+PingusBug::PingusBug (const std::string& mes) : PingusException(_("PingusBug:
") + mes)
+{
+}
+
+PingusBug::PingusBug (const PingusBug& old) : PingusException(old)
+{
+}
+
+PingusBug
+PingusBug::operator= (const PingusBug& old)
+{
+ if (this == &old);
+ return *this;
+
+ PingusException::operator=(old);
+
+ return *this;
+}
+
+void
+PingusBug::raise (const std::string& msg)
{
throw PingusBug(msg);
}
-std::string
+const std::string&
PingusBug::get_message () const
{
- return _("PingusBug: ") + message;
+ return message;
}
-PingusError::PingusError(std::string mes)
+PingusError::PingusError (const std::string& mes) :
PingusException(_("PingusError: ") + mes)
+{
+}
+
+PingusError::PingusError (const PingusError& old) : PingusException(old)
{
- message = mes;
- std::cout << _("PingusError: ") << message << std::endl;
+}
+
+PingusError
+PingusError::operator= (const PingusError& old)
+{
+ if (this == &old);
+ return *this;
+
+ PingusException::operator=(old);
+
+ return *this;
}
void
-PingusError::raise (std::string msg)
+PingusError::raise (const std::string& msg)
{
throw PingusError(msg);
}
-std::string
+const std::string&
PingusError::get_message () const
{
- return _("PingusError: ") + message;
+ return message;
}
/* EOF */
Index: pingus_error.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingus_error.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- pingus_error.hxx 16 Aug 2002 15:13:59 -0000 1.5
+++ pingus_error.hxx 23 Aug 2002 15:49:49 -0000 1.6
@@ -20,17 +20,21 @@
#ifndef HEADER_PINGUS_PINGUS_ERROR_HXX
#define HEADER_PINGUS_PINGUS_ERROR_HXX
-#include <string>
#include "pingus.hxx"
+#include <string>
class PingusException
{
protected:
std::string message;
public:
- PingusException ();
+ PingusException (const std::string& mes);
virtual ~PingusException ();
- virtual std::string get_message () const =0;
+ virtual const std::string& get_message () const =0;
+
+protected:
+ PingusException (const PingusException& old);
+ void operator= (const PingusException& old);
};
/** PingusBug gets thrown on events which are a bug in Pingus, this
@@ -38,13 +42,15 @@
when the thing is properly working. */
class PingusBug : public PingusException
{
-private:
- PingusBug(std::string mes);
+protected:
+ PingusBug (const std::string& mes);
+ PingusBug (const PingusBug& old);
+ PingusBug operator= (const PingusBug& old);
public:
- virtual std::string get_message() const;
+ virtual const std::string& get_message () const;
- static void raise (std::string msg);
+ static void raise (const std::string& msg);
};
@@ -52,13 +58,15 @@
invalid user input, file not found events or similar stuff. */
class PingusError : public PingusException
{
-private:
- PingusError(std::string mes);
+protected:
+ PingusError (const std::string& mes);
+ PingusError (const PingusError& old);
+ PingusError operator= (const PingusError& old);
public:
- virtual std::string get_message () const;
+ virtual const std::string& get_message () const;
- static void raise (std::string msg);
+ static void raise (const std::string& msg);
};
#endif
Index: pingus_main.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingus_main.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- pingus_main.hxx 29 Jun 2002 14:01:32 -0000 1.3
+++ pingus_main.hxx 23 Aug 2002 15:49:50 -0000 1.4
@@ -25,15 +25,13 @@
#include "generic_main.hxx"
-///
void segfault_handler(int);
-///
class PingusMain : public AbstractMain
{
private:
bool no_config_file;
- // the name of the exe: argv[0]
+ /// the name of the exe: argv[0]
std::string executable_name;
std::string levelfile;
std::string resolution;
@@ -59,6 +57,10 @@
void init_clanlib(void);
/// void intro(void);
void init_pingus(void);
+
+private:
+ PingusMain (const PingusMain&);
+ PingusMain operator= (const PingusMain&);
};
Index: pingus_map_manager.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingus_map_manager.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- pingus_map_manager.cxx 12 Jun 2002 19:06:12 -0000 1.1
+++ pingus_map_manager.cxx 23 Aug 2002 15:49:50 -0000 1.2
@@ -24,13 +24,14 @@
std::string PingusMapManager::directory;
CL_Surface
-PingusMapManager::get_surface (std::string /*level_filename*/)
+PingusMapManager::get_surface (const std::string& level_filename)
{
+ UNUSED_ARG(level_filename);
return CL_Surface ();
}
void
-PingusMapManager::set_surface (std::string /*level_filename*/, const
CL_Surface& surf)
+PingusMapManager::set_surface (const std::string& level_filename, const
CL_Surface& surf)
{
CL_SurfaceProvider* provider = surf.get_provider ();
@@ -41,6 +42,8 @@
//provider->get_data ();
provider->unlock ();
+
+ UNUSED_ARG(level_filename);
}
/* EOF */
Index: pingus_map_manager.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingus_map_manager.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- pingus_map_manager.hxx 16 Aug 2002 13:03:35 -0000 1.3
+++ pingus_map_manager.hxx 23 Aug 2002 15:49:50 -0000 1.4
@@ -20,9 +20,9 @@
#ifndef HEADER_PINGUS_PINGUS_MAP_MANAGER_HXX
#define HEADER_PINGUS_PINGUS_MAP_MANAGER_HXX
+#include "pingus.hxx"
#include <string>
#include <assert.h>
-#include "pingus.hxx"
class CL_Surface;
@@ -32,8 +32,12 @@
static std::string directory;
public:
- static CL_Surface get_surface (std::string level_filename);
- static void set_surface (std::string level_filename, const CL_Surface&);
+ 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&);
};
#endif
Index: pingus_menu.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingus_menu.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- pingus_menu.hxx 17 Aug 2002 00:28:30 -0000 1.5
+++ pingus_menu.hxx 23 Aug 2002 15:49:50 -0000 1.6
@@ -53,15 +53,19 @@
LayerManager layer_manager;
CL_Surface cursor_sur;
- void on_resize(int w, int h);
+ void on_resize (int w, int h);
public:
- PingusMenu(PingusMenuManager* m);
+ PingusMenu (PingusMenuManager* m);
~PingusMenu();
/// Load all images and other stuff for the menu
void preload ();
void on_escape_press ();
+
+private:
+ PingusMenu (const PingusMenu&);
+ PingusMenu operator= (const PingusMenu&);
};
#endif
Index: pingus_menu_manager.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingus_menu_manager.hxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- pingus_menu_manager.hxx 4 Aug 2002 15:42:23 -0000 1.8
+++ pingus_menu_manager.hxx 23 Aug 2002 15:49:50 -0000 1.9
@@ -49,8 +49,6 @@
/// Unregister all event-handling stuff
void unregister_events ();
- PingusMenuManager ();
-
public:
/* Menu's FIXME: These shouldn't get exported to the outsite,
instead only handles (enum's) should be visible */
@@ -93,6 +91,13 @@
void push_menu (PingusSubMenu * menu);
static PingusMenuManager* instance ();
+
+protected:
+ PingusMenuManager ();
+
+private:
+ PingusMenuManager (const PingusMenuManager&);
+ PingusMenuManager operator= (const PingusMenuManager&);
};
#endif
Index: pingus_resource.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingus_resource.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- pingus_resource.hxx 28 Jun 2002 17:02:25 -0000 1.6
+++ pingus_resource.hxx 23 Aug 2002 15:49:50 -0000 1.7
@@ -71,9 +71,12 @@
/** */
static CL_ResourceManager* get(const std::string&);
+
+private:
+ PingusResource (const PingusResource&);
+ PingusResource operator= (const PingusResource&);
};
#endif
/* EOF */
-
Index: pingus_sub_menu.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingus_sub_menu.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- pingus_sub_menu.hxx 17 Aug 2002 00:28:49 -0000 1.5
+++ pingus_sub_menu.hxx 23 Aug 2002 15:49:50 -0000 1.6
@@ -40,6 +40,10 @@
/// Return a handle to the parent menu manager
PingusMenuManager* get_manager () { return manager; }
+
+private:
+ PingusSubMenu (const PingusSubMenu&);
+ PingusSubMenu operator= (const PingusSubMenu&);
};
#endif
Index: playfield.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/playfield.cxx,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- playfield.cxx 17 Aug 2002 00:29:27 -0000 1.16
+++ playfield.cxx 23 Aug 2002 15:49:50 -0000 1.17
@@ -29,8 +29,6 @@
#include "button_panel.hxx"
#include "pingu_enums.hxx"
-using boost::shared_ptr;
-
Playfield::Playfield(Client* client, PLF* level_data, World* w)
: current_pingu(0), current_view(0)
{
@@ -108,7 +106,7 @@
if (needs_clear_screen)
{
//CL_Display::clear_display();
- for(std::vector<Playfield::Rect>::iterator i =
clipping_rectangles.begin();
+ for(std::vector<CL_Rect>::iterator i = clipping_rectangles.begin();
i != clipping_rectangles.end();
i++)
{
@@ -311,16 +309,17 @@
void
Playfield::generate_clipping_rects(int x1, int y1, int x2, int y2)
{
- clipping_rectangles.push_back(Playfield::Rect(0, 0, CL_Display::get_width()
- 1, y1));
- clipping_rectangles.push_back(Playfield::Rect(0, y1, x1, y2+1));
- clipping_rectangles.push_back(Playfield::Rect(x2+1, y1,
CL_Display::get_width() - 1, y2+1));
- clipping_rectangles.push_back(Playfield::Rect(0, y2+1,
CL_Display::get_width() - 1, CL_Display::get_height() - 1));
+ clipping_rectangles.push_back(CL_Rect(0, 0, CL_Display::get_width() - 1,
y1));
+ clipping_rectangles.push_back(CL_Rect(0, y1, x1, y2+1));
+ clipping_rectangles.push_back(CL_Rect(x2+1, y1, CL_Display::get_width() - 1,
y2+1));
+ clipping_rectangles.push_back(CL_Rect(0, y2+1, CL_Display::get_width() - 1,
CL_Display::get_height() - 1));
}
void
-Playfield::scroll (int /*x*/, int /*y*/)
+Playfield::scroll (int x, int y)
{
-
+ UNUSED_ARG(x);
+ UNUSED_ARG(y);
}
/* EOF */
Index: playfield.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/playfield.hxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- playfield.hxx 14 Aug 2002 12:45:02 -0000 1.9
+++ playfield.hxx 23 Aug 2002 15:49:50 -0000 1.10
@@ -20,6 +20,7 @@
#ifndef HEADER_PINGUS_PLAYFIELD_HXX
#define HEADER_PINGUS_PLAYFIELD_HXX
+#include <ClanLib/Core/Math/rect.h>
#include "view.hxx"
#include "client.hxx"
#include "gui/component.hxx"
@@ -55,23 +56,12 @@
int scroll_center_x;
int scroll_center_y;
- // FIXME: can be replaced with CL_Rect
- struct Rect {
- Rect(int arg_x1, int arg_y1, int arg_x2, int arg_y2) {
- x1 = arg_x1;
- y1 = arg_y1;
- x2 = arg_x2;
- y2 = arg_y2;
- }
- int x1, y1, x2, y2;
- };
-
- std::vector<Rect> clipping_rectangles;
+ std::vector<CL_Rect> clipping_rectangles;
int mouse_x;
int mouse_y;
public:
- Playfield(Client*, PLF* plf, World*);
+ Playfield (Client*, PLF* plf, World*);
virtual ~Playfield();
int get_x_offset();
@@ -103,7 +93,11 @@
void set_server(Server*);
void set_client(Client*);
- bool is_at (int x, int y) { if(x); if(y); return true; }
+ bool is_at (int x, int y) { UNUSED_ARG(x); UNUSED_ARG(y); return true; }
+
+private:
+ Playfield (const Playfield&);
+ Playfield operator= (const Playfield&);
};
#endif
Index: playfield_view.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/playfield_view.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- playfield_view.hxx 24 Jun 2002 22:52:56 -0000 1.2
+++ playfield_view.hxx 23 Aug 2002 15:49:50 -0000 1.3
@@ -48,6 +48,10 @@
// Return the pingu at the given *screen* coordinates
Pingu* get_pingu (const CL_Vector& pos);
+
+private:
+ PlayfieldView (const PlayfieldView&);
+ PlayfieldView operator= (const PlayfieldView&);
};
#endif
Index: plf.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/plf.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- plf.cxx 22 Aug 2002 02:24:59 -0000 1.3
+++ plf.cxx 23 Aug 2002 15:49:50 -0000 1.4
@@ -17,14 +17,12 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#include "pingus.hxx"
#include "xml_plf.hxx"
#include "plf_plf.hxx"
#include "globals.hxx"
#include "system.hxx"
using namespace std;
-using namespace boost;
PLF::PLF()
{
Index: plf.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/plf.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- plf.hxx 24 Jun 2002 22:52:56 -0000 1.2
+++ plf.hxx 23 Aug 2002 15:49:50 -0000 1.3
@@ -156,6 +156,10 @@
/** 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&);
};
#endif
Index: plf_parser.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/plf_parser.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- plf_parser.cxx 16 Aug 2002 15:13:59 -0000 1.3
+++ plf_parser.cxx 23 Aug 2002 15:49:50 -0000 1.4
@@ -40,7 +40,7 @@
}
void
-PLFParser::init(string filename)
+PLFParser::init(const string& filename)
{
// Init local vars
last_atom = ' ';
@@ -53,7 +53,7 @@
// Open the file and do some error checking.
void
-PLFParser::open(string filename)
+PLFParser::open(const string& filename)
{
in.open(filename.c_str());
eof = false;
Index: plf_parser.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/plf_parser.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- plf_parser.hxx 16 Aug 2002 13:03:35 -0000 1.3
+++ plf_parser.hxx 23 Aug 2002 15:49:50 -0000 1.4
@@ -20,14 +20,18 @@
#ifndef HEADER_PINGUS_PLF_PARSER_HXX
#define HEADER_PINGUS_PLF_PARSER_HXX
+#include "pingus.hxx"
#include <fstream>
#include <string>
-#include "pingus.hxx"
/** This gets thrown if a end of file is found inside a PLF file */
class PLFParserEOF {
public:
- PLFParserEOF();
+ PLFParserEOF ();
+
+private:
+ PLFParserEOF (const PLFParserEOF&);
+ PLFParserEOF operator= (const PLFParserEOF&);
};
/** A parser for PLF files */
@@ -47,40 +51,40 @@
// private functions
/// Return the next char and to a eof check
- char get_char(void);
+ char get_char ();
/// Return the next atom and keep the old one
- char get_atom(void);
+ char get_atom ();
/// Return the next atom (removes all comments)
- char get_raw_atom(void);
+ char get_raw_atom ();
/// Return the groupname and check for errors
- std::string get_groupname(void);
+ std::string get_groupname ();
/// Return the value identifer
- std::string get_valueid(void);
+ std::string get_valueid ();
/// Return the value
- std::string get_value(void);
+ std::string get_value ();
/// Return the cast, else ""
- std::string get_cast(void);
+ std::string get_cast ();
/// Jump to the next token, after char
- void jump_after(char);
+ void jump_after (char);
/// Jump over spaces to the next token
- void jump(void);
+ void jump ();
/// Do a clean shutdown on a syntax error
- void syntax_error(std::string);
+ void syntax_error (std::string);
/// Parse the opened file
- void parse(void);
+ void parse ();
/// Open the file
- void open(std::string);
+ void open (const std::string&);
/** Some virtual functions
Put the retrieved value in the correct struct */
@@ -100,7 +104,11 @@
/** Init the PLFParser and start parsing
@param filename The filename which should be parsed */
- void init(std::string filename);
+ void init (const std::string& filename);
+
+private:
+ PLFParser (const PLFParser&);
+ PLFParser operator= (const PLFParser&);
};
#endif
Index: plf_plf.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/plf_plf.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- plf_plf.cxx 22 Aug 2002 02:24:59 -0000 1.6
+++ plf_plf.cxx 23 Aug 2002 15:49:50 -0000 1.7
@@ -17,7 +17,6 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#include "pingus.hxx"
#include <stdio.h>
#include "globals.hxx"
#include "pingus_error.hxx"
Index: plf_plf.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/plf_plf.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- plf_plf.hxx 24 Jun 2002 22:52:56 -0000 1.2
+++ plf_plf.hxx 23 Aug 2002 15:49:50 -0000 1.3
@@ -62,6 +62,10 @@
public:
PLFPLF(std::string);
virtual ~PLFPLF();
+
+private:
+ PLFPLF (const PLFPLF&);
+ PLFPLF operator= (const PLFPLF&);
};
#endif
Index: plf_preview.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/plf_preview.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- plf_preview.hxx 16 Aug 2002 13:03:35 -0000 1.4
+++ plf_preview.hxx 23 Aug 2002 15:49:50 -0000 1.5
@@ -20,8 +20,8 @@
#ifndef HEADER_PINGUS_PLF_PREVIEW_HXX
#define HEADER_PINGUS_PLF_PREVIEW_HXX
-#include <ClanLib/Display/Display/surface.h>
#include "pingus.hxx"
+#include <ClanLib/Display/Display/surface.h>
class CL_Canvas;
class PLF;
@@ -37,6 +37,10 @@
PLFPreview(PLF*);
void load(PLF*);
CL_Surface get_surface();
+
+private:
+ PLFPreview (const PLFPreview&);
+ PLFPreview operator= (const PLFPreview&);
};
#endif
Index: plt_parser.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/plt_parser.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- plt_parser.hxx 24 Jun 2002 22:52:56 -0000 1.2
+++ plt_parser.hxx 23 Aug 2002 15:49:50 -0000 1.3
@@ -25,67 +25,43 @@
#include "res_descriptor.hxx"
-///
-struct PLTEOF {}///
-;
+struct PLTEOF {};
-///
class PLTParser
{
private:
- ///
std::ifstream in;
- ///
int lineno;
- ///
bool in_header;
- ///
std::vector<std::string> levels;
- ///
std::string theme_name;
- ///
std::string theme_description;
- ///
std::string theme_image;
- ///
std::string background_image;
public:
- ///
PLTParser();
- ///
~PLTParser();
- ///
void parse(std::string);
- ///
std::vector<std::string> get_levels();
- ///
std::string get_name();
- ///
std::string get_description();
- ///
std::string get_surface();
- ///
ResDescriptor get_background();
private:
- ///
char get_char();
- ///
void expect(char);
- ///
void jump_spaces();
- ///
std::string get_string();
- ///
void check_newline();
- ///
std::string get_line();
- ///
void add_pair(std::string, std::string);
-}///
-;
+
+ PLTParser (const PLTParser&);
+ PLTParser operator= (const PLTParser&);
+};
#endif
Index: plt_xml.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/plt_xml.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- plt_xml.cxx 22 Aug 2002 02:24:59 -0000 1.5
+++ plt_xml.cxx 23 Aug 2002 15:49:50 -0000 1.6
@@ -17,7 +17,6 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#include "pingus.hxx"
#include "globals.hxx"
#include "pingus_error.hxx"
#include "xml_helper.hxx"
Index: plt_xml.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/plt_xml.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- plt_xml.hxx 24 Jun 2002 22:52:56 -0000 1.3
+++ plt_xml.hxx 23 Aug 2002 15:49:50 -0000 1.4
@@ -42,24 +42,20 @@
void parse_level_list(xmlNodePtr cur);
public:
- ///
- PLTXML();
- ///
- ~PLTXML();
+ PLTXML ();
+ ~PLTXML ();
- ///
- void parse(std::string filename);
+ void parse (std::string filename);
- ///
- std::map<std::string,std::string> get_name();
- ///
- std::map<std::string,std::string> get_description();
- ///
- SurfaceBackgroundData get_background();
- ///
- std::string get_surface() { return ""; }
- ///
- std::vector<std::string> get_levels();
+ std::map<std::string,std::string> get_name ();
+ std::map<std::string,std::string> get_description ();
+ SurfaceBackgroundData get_background ();
+ std::string get_surface () { return ""; }
+ std::vector<std::string> get_levels ();
+
+private:
+ PLTXML (const PLTXML&);
+ PLTXML operator= (const PLTXML&);
};
#endif
Index: prefab_data.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/prefab_data.hxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- prefab_data.hxx 26 Jun 2002 09:40:32 -0000 1.1
+++ prefab_data.hxx 23 Aug 2002 15:49:50 -0000 1.2
@@ -44,6 +44,10 @@
public:
PrefabData (xmlDocPtr doc, xmlNodePtr cur);
+
+private:
+ PrefabData (const PrefabData&);
+ PrefabData operator= (const PrefabData&);
};
#endif
Index: psm_parser.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/psm_parser.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- psm_parser.cxx 16 Aug 2002 15:13:59 -0000 1.4
+++ psm_parser.cxx 23 Aug 2002 15:49:50 -0000 1.5
@@ -72,11 +72,11 @@
surface.push_back(temp);
}
}
- catch (PSMParseError err) {
+ catch (const PSMParseError& err) {
cout << "PSMParseError occured: " << err.message << " at line: " << lines
<< endl;
PingusError::raise(err.message);
}
- catch (PSMEOF) {}
+ catch (const PSMEOF&) {}
file_parsed = true;
in.close();
}
Index: psm_parser.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/psm_parser.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- psm_parser.hxx 24 Jun 2002 22:52:56 -0000 1.2
+++ psm_parser.hxx 23 Aug 2002 15:49:50 -0000 1.3
@@ -24,65 +24,47 @@
#include <fstream>
#include "groundpiece_data.hxx"
-///
-struct PSMEOF {}///
-;
+struct PSMEOF {};
-///
struct PSMParseError
{
- ///
std::string message;
+ PSMParseError(std::string str) : message(str) { }
+
+ PSMParseError (const PSMParseError& old) : message(old.message) { }
+
+private:
+ PSMParseError operator= (const PSMParseError&);
+};
- ///
- PSMParseError(std::string str) {
- message = str;
- }
-}///
-;
-
-///
class PSMParser
{
private:
- ///
std::vector<GroundpieceData> surface;
- ///
bool file_parsed;
- ///
std::ifstream in;
- ///
int lines;
- ///
char get_char(void);
- ///
char get_atom(void);
- ///
int get_int(void);
- ///
std::string get_string(void);
- ///
ResDescriptor get_resdesc(void);
- ///
void jump_spaces(void);
- ///
void expect(char);
public:
- ///
PSMParser();
- ///
~PSMParser();
- ///
void load_surfaces(void);
- ///
void parse(std::string filename);
- ///
std::vector<GroundpieceData> get_surfaces(void);
-}///
-;
+
+private:
+ PSMParser (const PSMParser&);
+ PSMParser operator= (const PSMParser&);
+};
#endif
Index: range.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/range.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- range.hxx 16 Aug 2002 13:03:35 -0000 1.3
+++ range.hxx 23 Aug 2002 15:49:50 -0000 1.4
@@ -24,49 +24,33 @@
// A class similar to an integer, but keeps the value in a given range.
-///
class Range
{
private:
- ///
int count;
- ///
int start;
- ///
int stop;
- ///
void check_range();
public:
- ///
Range();
- ///
Range(int b);
- ///
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);
- ///
Range& operator=(int a);
- ///
+
void set_range(int, int);
-}///
-;
+};
#endif
Index: res_descriptor.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/res_descriptor.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- res_descriptor.cxx 16 Aug 2002 15:13:59 -0000 1.8
+++ res_descriptor.cxx 23 Aug 2002 15:49:50 -0000 1.9
@@ -33,12 +33,25 @@
modifier = ROT0;
}
-ResDescriptor::ResDescriptor(const ResDescriptor& res_desc)
+ResDescriptor::ResDescriptor (const ResDescriptor& res_desc)
+ : type(res_desc.type),
+ datafile(res_desc.datafile),
+ res_name(res_desc.res_name),
+ modifier(res_desc.modifier)
{
- type = res_desc.type;
- datafile = res_desc.datafile;
- res_name = res_desc.res_name;
- modifier = res_desc.modifier;
+}
+
+ResDescriptor ResDescriptor::operator= (const ResDescriptor& old)
+{
+ if (this == &old)
+ return *this;
+
+ type = old.type;
+ datafile = old.datafile;
+ res_name = old.res_name;
+ modifier = old.modifier;
+
+ return *this;
}
ResDescriptor::ResDescriptor(const std::string& arg_res_name,
Index: res_descriptor.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/res_descriptor.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- res_descriptor.hxx 25 Jun 2002 21:31:40 -0000 1.5
+++ res_descriptor.hxx 23 Aug 2002 15:49:50 -0000 1.6
@@ -40,15 +40,17 @@
Pingus::ResourceModifier modifier;
- ResDescriptor();
- ResDescriptor(const ResDescriptor&);
+ ResDescriptor ();
+ ResDescriptor (const ResDescriptor& old);
+ ResDescriptor operator= (const ResDescriptor&);
- ResDescriptor(const std::string& res_name, const std::string& datafile,
+ ResDescriptor (const std::string& res_name, const std::string& datafile,
ResourceType type, Pingus::ResourceModifier modifier =
Pingus::ROT0);
- ResDescriptor(const std::string& cast, const std::string& value);
- ResDescriptor(const std::string& str);
+ ResDescriptor (const std::string& cast, const std::string& value);
+ ResDescriptor (const std::string& str);
- bool operator<(const ResDescriptor&) const;
+ bool operator< (const ResDescriptor&) const;
+
};
/// Our own function to print out the ResDescriptor
Index: resource_modifier.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/resource_modifier.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- resource_modifier.hxx 16 Aug 2002 13:03:35 -0000 1.2
+++ resource_modifier.hxx 23 Aug 2002 15:49:50 -0000 1.3
@@ -20,8 +20,8 @@
#ifndef HEADER_PINGUS_RESOURCE_MODIFIER_HXX
#define HEADER_PINGUS_RESOURCE_MODIFIER_HXX
-#include <string>
#include "pingus.hxx"
+#include <string>
namespace Pingus
{
Index: result.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/result.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- result.hxx 16 Aug 2002 13:03:35 -0000 1.3
+++ result.hxx 23 Aug 2002 15:49:50 -0000 1.4
@@ -22,25 +22,16 @@
#include "pingus.hxx"
-///
struct Result
{
- ///
int saved;
- ///
int killed;
- ///
int total;
- ///
int time;
- ///
int unknown;
- ///
int status;
- ///
int needed;
-}///
-;
+};
#endif
Index: screen.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/screen.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- screen.hxx 4 Aug 2002 19:57:15 -0000 1.6
+++ screen.hxx 23 Aug 2002 15:49:50 -0000 1.7
@@ -30,6 +30,9 @@
private:
public:
+
+ Screen () { }
+
/** Draw this screen */
virtual void draw () =0;
@@ -43,6 +46,10 @@
/** Called once the screen gets replaced or poped or shadowed by a
newly pushed screen */
virtual void on_shutdown () {}
+
+private:
+ Screen (const Screen&);
+ Screen operator= (const Screen&);
};
#endif
Index: screen_manager.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/screen_manager.hxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- screen_manager.hxx 17 Aug 2002 12:32:23 -0000 1.9
+++ screen_manager.hxx 23 Aug 2002 15:49:50 -0000 1.10
@@ -20,8 +20,8 @@
#ifndef HEADER_PINGUS_SCREEN_MANAGER_HXX
#define HEADER_PINGUS_SCREEN_MANAGER_HXX
-#include <vector>
#include "pingus.hxx"
+#include <vector>
class Screen;
@@ -45,11 +45,12 @@
enum { none, pop, replace } cached_action;
std::pair<Screen*, bool> replace_screen_arg;
+protected:
ScreenManager ();
public:
~ScreenManager ();
- /** Start the screen manager and let it take controll, this will
+ /** Start the screen manager and let it take control, this will
not return until the somebody signals a quit() */
void display ();
@@ -73,6 +74,10 @@
void fade_over (Screen* old_screen, Screen* new_screen);
public:
static ScreenManager* instance ();
+
+private:
+ ScreenManager (const ScreenManager&);
+ ScreenManager operator= (const ScreenManager&);
};
#endif
Index: screen_manager_impl.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/screen_manager_impl.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- screen_manager_impl.hxx 16 Aug 2002 13:03:35 -0000 1.3
+++ screen_manager_impl.hxx 23 Aug 2002 15:49:50 -0000 1.4
@@ -31,6 +31,10 @@
~ScreenManagerImpl ();
void display ();
+
+private:
+ ScreenManagerImpl (const ScreenManagerImpl&);
+ ScreenManagerImpl operator= (const ScreenManagerImpl&);
};
#endif
Index: screenshot.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/screenshot.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- screenshot.hxx 16 Aug 2002 13:03:35 -0000 1.3
+++ screenshot.hxx 23 Aug 2002 15:49:50 -0000 1.4
@@ -20,8 +20,8 @@
#ifndef HEADER_PINGUS_SCREENSHOT_HXX
#define HEADER_PINGUS_SCREENSHOT_HXX
-#include <string>
#include "pingus.hxx"
+#include <string>
class CL_Target;
@@ -29,19 +29,18 @@
class Screenshot
{
private:
- ///
static std::string get_date();
- ///
static std::string get_filename();
- ///
static void save_16bit_target_to_file(CL_Target*, std::string filename);
- ///
static void save_generic_target_to_file(CL_Target*, std::string filename);
public:
- ///
static std::string make_screenshot();
- ///
static void save_target_to_file(CL_Target*, std::string filename);
+
+private:
+ Screenshot ();
+ Screenshot (const Screenshot&);
+ Screenshot operator= (const Screenshot&);
};
#endif
Index: server.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/server.cxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- server.cxx 22 Aug 2002 00:36:30 -0000 1.10
+++ server.cxx 23 Aug 2002 15:49:50 -0000 1.11
@@ -49,6 +49,23 @@
}
}
+PingusEvent::PingusEvent (const PingusEvent& old) : game_time(old.game_time),
+ str(old.str)
+{
+}
+
+PingusEvent PingusEvent::operator= (const PingusEvent& old)
+{
+ if (this == &old)
+ return *this;
+
+ game_time = old.game_time;
+ str = old.str;
+
+ return *this;
+}
+
+
Server::Server(PLF* plf)
: action_holder (plf)
{
Index: server.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/server.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- server.hxx 3 Aug 2002 12:00:58 -0000 1.3
+++ server.hxx 23 Aug 2002 15:49:50 -0000 1.4
@@ -35,13 +35,17 @@
*/
class PingusEvent {
public:
- PingusEvent();
- PingusEvent(std::string);
-
/// The GameTime at which the event happend
int game_time;
/// A string describing the event
std::string str;
+
+public:
+ PingusEvent ();
+ PingusEvent (std::string);
+
+ PingusEvent (const PingusEvent& old);
+ PingusEvent operator= (const PingusEvent&);
};
/** A abstract server-like class */
@@ -88,6 +92,10 @@
void send_event(std::string);
void set_demo(std::string);
void record_demo();
+
+private:
+ Server (const Server&);
+ Server operator= (const Server&);
};
#endif
Index: smallmap.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/smallmap.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- smallmap.hxx 2 Aug 2002 22:55:19 -0000 1.7
+++ smallmap.hxx 23 Aug 2002 15:49:50 -0000 1.8
@@ -63,6 +63,10 @@
// Events
void on_pointer_enter ();
void on_pointer_leave ();
+
+private:
+ SmallMap (const SmallMap&);
+ SmallMap operator= (const SmallMap&);
};
#endif
Index: smallmap_image.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/smallmap_image.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- smallmap_image.cxx 29 Jul 2002 10:44:12 -0000 1.4
+++ smallmap_image.cxx 23 Aug 2002 15:49:50 -0000 1.5
@@ -24,8 +24,6 @@
#include "col_map.hxx"
#include "server.hxx"
-using boost::shared_ptr;
-
SmallMapImage::SmallMapImage (Server * s, CL_Vector arg_pos, int width, int
height)
: sur (create_surface (s, width, height)),
pos (arg_pos)
@@ -43,9 +41,10 @@
}
void
-SmallMapImage::update (float /*delta*/)
+SmallMapImage::update (float delta)
{
// FIXME: Updating not implemented!
+ UNUSED_ARG(delta);
}
CL_Surface
Index: smallmap_image.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/smallmap_image.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- smallmap_image.hxx 16 Aug 2002 13:03:35 -0000 1.5
+++ smallmap_image.hxx 23 Aug 2002 15:49:50 -0000 1.6
@@ -20,9 +20,9 @@
#ifndef HEADER_PINGUS_SMALLMAP_IMAGE_HXX
#define HEADER_PINGUS_SMALLMAP_IMAGE_HXX
+#include "pingus.hxx"
#include <ClanLib/Display/Display/surface.h>
#include <ClanLib/Core/Math/cl_vector.h>
-#include "pingus.hxx"
class Server;
@@ -43,6 +43,10 @@
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&);
};
#endif
Index: sound.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/sound.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- sound.cxx 22 Aug 2002 00:36:30 -0000 1.5
+++ sound.cxx 23 Aug 2002 15:49:50 -0000 1.6
@@ -51,19 +51,19 @@
switch (name)
{
case Sound::DIGGER:
- play_sound (path_manager.complete ("sounds/digger.wav"));
+ play_sound (path_manager.complete ("sounds/digger.wav"), volume,
panning);
break;
case Sound::PLOP:
- play_sound (path_manager.complete ("sounds/plop.wav"));
+ play_sound (path_manager.complete ("sounds/plop.wav"), volume, panning);
break;
case Sound::GOODIDEA:
- play_sound (path_manager.complete ("sounds/goodidea.wav"));
+ play_sound (path_manager.complete ("sounds/goodidea.wav"), volume,
panning);
break;
case Sound::OHNO:
- play_sound (path_manager.complete ("sounds/ohno.wav"));
+ play_sound (path_manager.complete ("sounds/ohno.wav"), volume, panning);
break;
case Sound::TICK:
- play_sound (path_manager.complete ("sounds/tick.wav"));
+ play_sound (path_manager.complete ("sounds/tick.wav"), volume, panning);
break;
}
}
Index: sound.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/sound.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- sound.hxx 22 Aug 2002 02:20:12 -0000 1.6
+++ sound.hxx 23 Aug 2002 15:49:50 -0000 1.7
@@ -21,13 +21,15 @@
#define HEADER_PINGUS_SOUND_HXX
#include <string>
-#include "pingus.hxx"
#include "sounds.hxx"
class PingusSound
{
protected:
static PingusSound* sound;
+
+protected:
+ PingusSound () { }
virtual void real_play_sound(const std::string & filename, float volume,
float panning) =0;
virtual void real_play_music(const std::string & filename, float volume) =0;
@@ -45,6 +47,10 @@
static void play_music(const std::string & filename, float volume = 1.0f);
static void play_sound(Sound::Name name, float volume = 1.0f, float panning
= 0.0f);
+
+private:
+ PingusSound (const PingusSound&);
+ PingusSound operator= (const PingusSound&);
};
#endif
Index: sound_dummy.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/sound_dummy.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- sound_dummy.hxx 24 Jun 2002 22:52:57 -0000 1.2
+++ sound_dummy.hxx 23 Aug 2002 15:49:50 -0000 1.3
@@ -25,10 +25,14 @@
class PingusSoundDummy : public PingusSound
{
public:
+ PingusSoundDummy () { }
- virtual void real_play_sound(const std::string & filename, float volume,
float panning);
- virtual void real_play_music(const std::string & filename, float volume);
+ virtual void real_play_sound (const std::string & filename, float volume,
float panning);
+ virtual void real_play_music (const std::string & filename, float volume);
+private:
+ PingusSoundDummy (const PingusSoundDummy&);
+ PingusSoundDummy operator= (const PingusSoundDummy&);
};
#endif
Index: sound_real.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/sound_real.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- sound_real.cxx 22 Aug 2002 00:36:30 -0000 1.5
+++ sound_real.cxx 23 Aug 2002 15:49:50 -0000 1.6
@@ -92,11 +92,11 @@
if (!sound_enabled)
return;
- std::vector<CL_SoundBuffer_Session *>::iterator it;
std::cout << "FIXME: this is broken PingusSoundReal::real_play_sound(const
std::string & filename, float volume, float panning)" << std::endl;
// search for unused SoundBuffer_Sessions - clean them up
/* FIXME: This causes segfaults, newing SoundBuffer_Session is IIRC incorrect
+ std::vector<CL_SoundBuffer_Session *>::iterator it;
for (it = sound_holder.begin(); it != sound_holder.end(); it++) {
if (!(*it) -> is_playing()) {
delete *it;
Index: sound_real.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/sound_real.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- sound_real.hxx 2 Jul 2002 15:46:58 -0000 1.3
+++ sound_real.hxx 23 Aug 2002 15:49:50 -0000 1.4
@@ -69,7 +69,10 @@
@param panning The panning to play the sound with */
virtual void real_play_sound(const std::string & filename, float volume,
float panning);
-
+
+private:
+ PingusSoundReal (const PingusSoundReal&);
+ PingusSoundReal operator= (const PingusSoundReal&);
};
#endif
Index: sounds.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/sounds.hxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- sounds.hxx 22 Aug 2002 01:13:23 -0000 1.1
+++ sounds.hxx 23 Aug 2002 15:49:50 -0000 1.2
@@ -20,6 +20,8 @@
#ifndef HEADER_PINGUS_SOUNDS_HXX
#define HEADER_PINGUS_SOUNDS_HXX
+#include "pingus.hxx"
+
namespace Sound
{
enum Name {
Index: specs_reader.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/specs_reader.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- specs_reader.cxx 22 Aug 2002 02:24:59 -0000 1.3
+++ specs_reader.cxx 23 Aug 2002 15:49:50 -0000 1.4
@@ -17,7 +17,6 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#include "pingus.hxx"
#include <iostream>
#include "pingus_error.hxx"
Index: specs_reader.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/specs_reader.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- specs_reader.hxx 16 Aug 2002 13:03:35 -0000 1.3
+++ specs_reader.hxx 23 Aug 2002 15:49:50 -0000 1.4
@@ -20,39 +20,32 @@
#ifndef HEADER_PINGUS_SPECS_READER_HXX
#define HEADER_PINGUS_SPECS_READER_HXX
+#include "pingus.hxx"
#include <map>
#include <fstream>
#include <string>
-#include "pingus.hxx"
-///
class SpecsReader
{
private:
- ///
std::map<std::string, int> token_ids;
- ///
std::map<int, std::string> values;
- ///
std::ifstream in;
public:
- ///
SpecsReader();
- ///
int open(const char*);
- ///
void close();
- ///
int next_token();
- ///
void register_token(int token_id, std::string token_value);
- ///
std::string operator[](int t);
-}///
-;
+
+private:
+ SpecsReader (const SpecsReader&);
+ SpecsReader operator= (const SpecsReader&);
+};
#endif
Index: spot_map.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/spot_map.cxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- spot_map.cxx 17 Aug 2002 17:56:23 -0000 1.7
+++ spot_map.cxx 23 Aug 2002 15:49:50 -0000 1.8
@@ -33,13 +33,28 @@
using namespace Pingus;
using namespace std;
-MapTileSurface::MapTileSurface()
+MapTileSurface::MapTileSurface () : empty(true)
{
- empty = true;
}
MapTileSurface::~MapTileSurface()
{
+}
+
+MapTileSurface::MapTileSurface (const MapTileSurface& old) : empty(old.empty),
+
surface(old.surface)
+{
+}
+
+MapTileSurface MapTileSurface::operator= (const MapTileSurface& old)
+{
+ if (this == &old)
+ return *this;
+
+ empty = old.empty;
+ surface = old.surface;
+
+ return *this;
}
void
Index: spot_map.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/spot_map.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- spot_map.hxx 24 Jun 2002 22:52:57 -0000 1.3
+++ spot_map.hxx 23 Aug 2002 15:49:51 -0000 1.4
@@ -37,14 +37,17 @@
public:
CL_Surface surface;
- MapTileSurface();
- virtual ~MapTileSurface();
+ MapTileSurface ();
+ virtual ~MapTileSurface ();
+
+ MapTileSurface (const MapTileSurface& old);
+ MapTileSurface operator= (const MapTileSurface& old);
- void reload(void);
- inline bool is_empty(void) { return empty; }
- void mark_dirty(void);
- void check_empty(void);
- void set_empty(bool);
+ void reload (void);
+ inline bool is_empty (void) { return empty; }
+ void mark_dirty (void);
+ void check_empty (void);
+ void set_empty (bool);
};
/** This map type is the defaulh maptype, it is should be used for the
@@ -92,6 +95,10 @@
void mark_tiles_not_empty(int, int, int, int);
float get_z_pos () const { return 0; }
+
+private:
+ PingusSpotMap (const PingusSpotMap&);
+ PingusSpotMap operator= (const PingusSpotMap&);
};
#endif
Index: sprite.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/sprite.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- sprite.cxx 25 Jun 2002 21:31:40 -0000 1.4
+++ sprite.cxx 23 Aug 2002 15:49:51 -0000 1.5
@@ -35,17 +35,34 @@
}
Sprite::Sprite (const Sprite& sprite) :
- frame (sprite.frame),
- frames_per_second (sprite.frames_per_second),
- sur (sprite.sur),
- direction (sprite.direction),
- looptype (sprite.looptype),
- is_finished (sprite.is_finished),
- x_align (sprite.x_align),
- y_align (sprite.y_align)
+ frame (sprite.frame),
+ frames_per_second (sprite.frames_per_second),
+ sur (sprite.sur),
+ direction (sprite.direction),
+ looptype (sprite.looptype),
+ is_finished (sprite.is_finished),
+ x_align (sprite.x_align),
+ y_align (sprite.y_align)
{
}
+Sprite Sprite::operator= (const Sprite& sprite)
+{
+ if (this == &sprite)
+ return *this;
+
+ frame = sprite.frame;
+ frames_per_second = sprite.frames_per_second;
+ sur = sprite.sur;
+ direction = sprite.direction;
+ looptype = sprite.looptype;
+ is_finished = sprite.is_finished;
+ x_align = sprite.x_align;
+ y_align = sprite.y_align;
+
+ return *this;
+}
+
Sprite::Sprite (std::string arg_sur_name,
std::string arg_datafile,
float arg_frames_per_second,
@@ -53,12 +70,12 @@
LoopType arg_loop_type)
: frame (0.0f),
frames_per_second (arg_frames_per_second),
+ sur(PingusResource::load_surface (arg_sur_name, arg_datafile)),
direction (dir),
looptype (arg_loop_type),
is_finished (false),
x_align (0), y_align (0)
{
- sur = PingusResource::load_surface (arg_sur_name, arg_datafile);
}
Sprite::Sprite (const CL_Surface& arg_sur,
Index: sprite.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/sprite.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- sprite.hxx 16 Aug 2002 13:03:35 -0000 1.4
+++ sprite.hxx 23 Aug 2002 15:49:51 -0000 1.5
@@ -20,8 +20,8 @@
#ifndef HEADER_PINGUS_SPRITE_HXX
#define HEADER_PINGUS_SPRITE_HXX
-#include <ClanLib/Display/Display/surface.h>
#include "pingus.hxx"
+#include <ClanLib/Display/Display/surface.h>
class CL_Vector;
class ResDescriptor;
@@ -30,7 +30,7 @@
{
public:
typedef enum { NONE, LEFT, RIGHT } Direction;
- typedef enum { ENDLESS, ONCE, } LoopType;
+ typedef enum { ENDLESS, ONCE } LoopType;
private:
float frame;
@@ -51,6 +51,9 @@
/// 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,
Index: story.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/story.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- story.hxx 17 Aug 2002 00:31:06 -0000 1.5
+++ story.hxx 23 Aug 2002 15:49:51 -0000 1.6
@@ -37,11 +37,11 @@
CL_Font* small_font;
public:
- Story(PingusMenuManager* manager);
- ~Story();
+ Story (PingusMenuManager* manager);
+ ~Story ();
/// Load all surfaces into memory.
- void init();
+ void init ();
void preload () { init (); }
@@ -49,13 +49,17 @@
void update (float delta);
/// Display a string at the right position
- void display_string(std::string);
+ void display_string (std::string);
bool is_at (int x, int y);
void on_pause_press ();
void on_fast_forward_press ();
void on_escape_press ();
+
+private:
+ Story (const Story&);
+ Story operator= (const Story&);
};
#endif
Index: string_converter.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/string_converter.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- string_converter.hxx 16 Aug 2002 13:03:35 -0000 1.4
+++ string_converter.hxx 23 Aug 2002 15:49:51 -0000 1.5
@@ -20,9 +20,9 @@
#ifndef HEADER_PINGUS_STRING_CONVERTER_HXX
#define HEADER_PINGUS_STRING_CONVERTER_HXX
+#include "pingus.hxx"
#include <string>
#include <stdexcept>
-#include "pingus.hxx"
#ifdef HAVE_CONFIG_H
#include <config.h>
@@ -41,15 +41,13 @@
{
#ifdef HAVE_SSTREAM
std::ostringstream oss;
- oss << any;
- return oss.str();
#else
std::ostrstream oss;
- oss << any << std::ends;
- std::string temp(oss.str());
- oss.freeze(false); // tell the ostrstream that it should free the memory
- return temp;
#endif
+ oss << any;
+ return oss.str();
+ oss << any << std::ends;
+ oss.str();
}
@@ -90,6 +88,11 @@
static std::string to_string (int i);
static std::string to_string (long int i);
static std::string to_string (float i);
+
+private:
+ StringConverter ();
+ StringConverter (const StringConverter&);
+ StringConverter operator= (const StringConverter&);
};
#endif
Index: surface_button.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/surface_button.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- surface_button.hxx 14 Aug 2002 12:45:02 -0000 1.7
+++ surface_button.hxx 23 Aug 2002 15:49:51 -0000 1.8
@@ -65,6 +65,10 @@
void on_primary_button_click (int x, int y) { on_click (); if(x); if(y); }
virtual void on_click () =0;
+
+private:
+ SurfaceButton (const SurfaceButton&);
+ SurfaceButton operator= (const SurfaceButton&);
};
class CreditButton : public SurfaceButton
@@ -75,6 +79,10 @@
CreditButton(PingusMenu* menu);
virtual ~CreditButton();
void on_click();
+
+private:
+ CreditButton (const CreditButton&);
+ CreditButton operator= (const CreditButton&);
};
class OptionsButton : public SurfaceButton
@@ -85,6 +93,10 @@
OptionsButton(PingusMenu* menu);
virtual ~OptionsButton();
void on_click();
+
+private:
+ OptionsButton (const OptionsButton&);
+ OptionsButton operator= (const OptionsButton&);
};
class QuitButton : public SurfaceButton
@@ -95,6 +107,10 @@
QuitButton(PingusMenu*);
virtual ~QuitButton();
void on_click();
+
+private:
+ QuitButton (const QuitButton&);
+ QuitButton operator= (const QuitButton&);
};
class LoadButton : public SurfaceButton
@@ -103,6 +119,10 @@
LoadButton();
virtual ~LoadButton();
void on_click();
+
+private:
+ LoadButton (const LoadButton&);
+ LoadButton operator= (const LoadButton&);
};
class EditorButton : public SurfaceButton
@@ -116,6 +136,10 @@
void on_click();
void load_level(const std::string& str);
+
+private:
+ EditorButton (const EditorButton&);
+ EditorButton operator= (const EditorButton&);
};
class StoryButton : public SurfaceButton
@@ -126,6 +150,10 @@
StoryButton(PingusMenu* menu);
~StoryButton();
void on_click();
+
+private:
+ StoryButton (const StoryButton&);
+ StoryButton operator= (const StoryButton&);
};
class ThemeButton : public SurfaceButton
@@ -135,6 +163,10 @@
public:
ThemeButton(PingusMenu* menu);
void on_click();
+
+private:
+ ThemeButton (const ThemeButton&);
+ ThemeButton operator= (const ThemeButton&);
};
class MultiplayerButton : public SurfaceButton
@@ -146,11 +178,12 @@
MultiplayerButton(PingusMenu* menu);
virtual ~MultiplayerButton();
void on_click();
+
+private:
+ MultiplayerButton (const MultiplayerButton&);
+ MultiplayerButton operator= (const MultiplayerButton&);
};
#endif
/* EOF */
-
-
-
Index: system.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/system.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- system.hxx 16 Aug 2002 13:03:35 -0000 1.3
+++ system.hxx 23 Aug 2002 15:49:51 -0000 1.4
@@ -21,10 +21,10 @@
#ifndef HEADER_PINGUS_SYSTEM_HXX
#define HEADER_PINGUS_SYSTEM_HXX
+#include "pingus.hxx"
#include <string>
#include <list>
#include <map>
-#include "pingus.hxx"
/** A wrapper class around some system dependend functions (mostly
POSIX stuff) */
@@ -123,6 +123,10 @@
generation is very primitiv and should probably be replaced by CRC
or md5. */
static std::string checksum (std::string filename);
+
+private:
+ System (const System&);
+ System operator= (const System&);
};
#endif
Index: target_provider.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/target_provider.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- target_provider.hxx 16 Aug 2002 13:03:35 -0000 1.3
+++ target_provider.hxx 23 Aug 2002 15:49:51 -0000 1.4
@@ -20,8 +20,8 @@
#ifndef HEADER_PINGUS_TARGET_PROVIDER_HXX
#define HEADER_PINGUS_TARGET_PROVIDER_HXX
-#include <ClanLib/Display/Display/surfaceprovider.h>
#include "pingus.hxx"
+#include <ClanLib/Display/Display/surfaceprovider.h>
class CL_Target;
class CL_Palette;
@@ -54,12 +54,12 @@
unsigned int get_src_colorkey () const { return 0; }
static CL_Canvas* create_canvas (CL_Target*);
+
+private:
+ TargetProvider (const TargetProvider&);
+ TargetProvider operator= (const TargetProvider&);
};
#endif
/* EOF */
-
-
-
-
Index: theme.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/theme.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- theme.cxx 22 Aug 2002 02:24:59 -0000 1.5
+++ theme.cxx 23 Aug 2002 15:49:51 -0000 1.6
@@ -17,7 +17,6 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#include "pingus.hxx"
#include <ClanLib/Core/System/error.h>
#include <ClanLib/Core/System/system.h>
#include <ClanLib/Display/Display/display.h>
@@ -36,21 +35,20 @@
#include "xml_plf.hxx"
#include "screen_manager.hxx"
-Theme::Theme(std::string filename)
- : filename (filename)
+Theme::Theme (const std::string& filename)
+ : font(PingusResource::load_font("Fonts/pingus_small","fonts")),
+ title(PingusResource::load_font("Fonts/pingus","fonts")),
+ filename (filename),
+ is_loaded(false)
{
- //std::cout << "Theme: Constructing: " << filename << std::endl;
- title = PingusResource::load_font("Fonts/pingus","fonts");
- font = PingusResource::load_font("Fonts/pingus_small","fonts");
- is_loaded = false;
}
-Theme::~Theme()
+Theme::~Theme ()
{
}
void
-Theme::load(std::string filename)
+Theme::load (const std::string& filename)
{
if (verbose) std::cout << "Theme: loading: " << filename << std::endl;
plt.parse(filename);
Index: theme.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/theme.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- theme.hxx 24 Jun 2002 22:52:57 -0000 1.2
+++ theme.hxx 23 Aug 2002 15:49:51 -0000 1.3
@@ -26,19 +26,13 @@
class CL_Font;
-///
class Theme
{
private:
- ///
PLTXML plt;
- ///
CL_Surface surface;
- ///
CL_Surface background;
- ///
CL_Font* font;
- ///
CL_Font* title;
/** The last level, which is accessible */
@@ -55,7 +49,6 @@
/** The filenames of the levels */
std::vector<std::string> level_filenames;
- ///
std::string title_name;
std::string status_file;
@@ -63,40 +56,33 @@
used to calculate mark_level_at_point() */
int level_start_y_pos;
- ///
bool has_description;
- ///
MultiLineText description;
bool is_loaded;
- ///
void load_status(std::string);
- ///
void load_levels();
public:
- ///
- Theme(std::string);
- ///
- ~Theme();
+ Theme (const std::string& filename);
+ ~Theme ();
void preload ();
/** 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);
- ///
- void next_level();
- ///
- void previous_level();
- ///
- void load(std::string);
- ///
- void draw_title();
- ///
- void play();
+ int mark_level_at_point (int x, int y);
+ void next_level ();
+ void previous_level ();
+ void load (const std::string& filename);
+ void draw_title ();
+ void play ();
+
+private:
+ Theme (const Theme&);
+ Theme operator= (const Theme&);
};
#endif
Index: theme_selector.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/theme_selector.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- theme_selector.cxx 17 Aug 2002 17:56:23 -0000 1.4
+++ theme_selector.cxx 23 Aug 2002 15:49:51 -0000 1.5
@@ -67,6 +67,21 @@
font = PingusResource::load_font("Fonts/smallfont_h","fonts");
}
+ListItem::ListItem (const ListItem& old) : label(old.label), font(new
CL_Font(*(old.font)))
+{
+}
+
+ListItem ListItem::operator= (const ListItem& old)
+{
+ if (this == &old)
+ return *this;
+
+ label = old.label;
+ font = new CL_Font(*(old.font));
+
+ return *this;
+}
+
void
ListItem::draw_offset(int x, int y)
{
Index: theme_selector.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/theme_selector.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- theme_selector.hxx 16 Aug 2002 13:03:35 -0000 1.3
+++ theme_selector.hxx 23 Aug 2002 15:49:51 -0000 1.4
@@ -20,11 +20,11 @@
#ifndef HEADER_PINGUS_THEME_SELECTOR_HXX
#define HEADER_PINGUS_THEME_SELECTOR_HXX
+#include "pingus.hxx"
#include <vector>
#include <string>
#include <ClanLib/Signals/slot.h>
#include <ClanLib/Display/Display/surface.h>
-#include "pingus.hxx"
class CL_Key;
class CL_Font;
@@ -32,79 +32,70 @@
class Theme;
class AlphaButton;
-///
class ListItem
{
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);
};
-///
class ListBox
{
private:
- ///
std::vector<ListItem> items;
- ///
typedef std::vector<ListItem>::iterator ListIter;
public:
- ///
ListBox();
- ///
void add_item(std::string);
- ///
void draw_offset(int x, int y);
+
+private:
+ ListBox (const ListBox&);
+ ListBox operator= (const ListBox&);
};
-///
class ThemeSelector
{
public:
- ///
CL_Slot on_button_press_slot;
- ///
CL_Slot on_button_release_slot;
- ///
CL_Slot on_mouse_move_slot;
- ///
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;
- ///
std::vector<Theme*>::iterator current_theme;
/** A large font, used for the Title Name */
@@ -120,15 +111,11 @@
/// The back button
CL_Surface back;
- ///
bool dir_read;
- ///
bool finished;
- ///
ListBox list_box;
- ///
+
void draw();
- ///
bool key_pressed(int key);
/** Marks the level, which is under the given coordinates
@@ -137,23 +124,20 @@
@return The current_level at point or -1 if no level is under point */
int mark_level_at_point(int x, int y);
- ///
void readdir(std::string path);
public:
- ///
ThemeSelector();
- ///
~ThemeSelector();
/** Display the theme selector */
void display ();
+
+private:
+ ThemeSelector (const ThemeSelector&);
+ ThemeSelector operator= (const ThemeSelector&);
};
#endif
/* EOF */
-
-
-
-
Index: time_display.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/time_display.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- time_display.hxx 2 Aug 2002 11:53:52 -0000 1.4
+++ time_display.hxx 23 Aug 2002 15:49:51 -0000 1.5
@@ -30,12 +30,17 @@
private:
Server* server;
CL_Font* font;
+
public:
TimeDisplay();
virtual ~TimeDisplay() {}
void draw();
void set_server(Server*);
+
+private:
+ TimeDisplay (const TimeDisplay&);
+ TimeDisplay operator= (const TimeDisplay&);
};
#endif
Index: timer.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/timer.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- timer.hxx 16 Aug 2002 13:03:35 -0000 1.3
+++ timer.hxx 23 Aug 2002 15:49:51 -0000 1.4
@@ -27,12 +27,10 @@
class Timer
{
private:
- ///
int last_time;
- ///
bool running;
+
public:
- ///
Timer();
/** Start the timer
@@ -41,8 +39,11 @@
/** Stop the timer
@return The time passed since the last start() */
int stop();
-}///
-;
+
+private:
+ Timer (const Timer&);
+ Timer operator= (const Timer&);
+};
#endif
Index: trap.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/trap.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- trap.hxx 24 Jun 2002 22:52:57 -0000 1.2
+++ trap.hxx 23 Aug 2002 15:49:51 -0000 1.3
@@ -45,9 +45,12 @@
virtual void draw_offset(int x, int y, float s = 1.0);
virtual void update(float delta);
- // FIXME: catch_pingu() need not be public. now, it is only called
- // from update()
+protected:
virtual void catch_pingu(Pingu*) =0;
+
+private:
+ Trap (const Trap&);
+ Trap operator= (const Trap&);
};
#endif
Index: trap_data.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/trap_data.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- trap_data.cxx 22 Aug 2002 00:36:30 -0000 1.5
+++ trap_data.cxx 23 Aug 2002 15:49:51 -0000 1.6
@@ -29,7 +29,10 @@
#include "pingus_error.hxx"
#include "editor/plfobj.hxx"
#include "xml_helper.hxx"
-#include "boost/smart_ptr.hpp"
+
+TrapData::TrapData ()
+{
+}
TrapData::TrapData (xmlDocPtr doc, xmlNodePtr cur)
{
@@ -61,6 +64,30 @@
}
}
+TrapData::TrapData (const TrapData& old) : WorldObjData(old),
+ type(old.type),
+ pos(old.pos),
+ x_target(old.x_target),
+ y_target(old.y_target)
+{
+}
+
+TrapData
+TrapData::operator= (const TrapData& old)
+{
+ if (this == &old)
+ return *this;
+
+ WorldObjData::operator=(old);
+
+ type = old.type;
+ pos = old.pos;
+ x_target = old.x_target;
+ y_target = old.y_target;
+
+ return *this;
+}
+
void
TrapData::write_xml(std::ostream& xml)
{
@@ -103,4 +130,3 @@
}
/* EOF */
-
Index: trap_data.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/trap_data.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- trap_data.hxx 2 Jul 2002 10:42:38 -0000 1.5
+++ trap_data.hxx 23 Aug 2002 15:49:51 -0000 1.6
@@ -26,10 +26,6 @@
#include "libxmlfwd.hxx"
-namespace boost {
- template <class T> class shared_ptr;
-}
-
/// Structure holding all the data needed for a trap.
class TrapData : public WorldObjData
{
@@ -39,14 +35,13 @@
int x_target, y_target;
- TrapData(){}
- TrapData(const TrapData& data)
- : WorldObjData(data),
- type (data.type),
- pos (data.pos) {}
+ TrapData ();
TrapData (xmlDocPtr doc, xmlNodePtr cur);
- virtual ~TrapData(){}
- void clean(){}
+ TrapData (const TrapData& old);
+ TrapData operator= (const TrapData& old);
+
+ virtual ~TrapData () {}
+ void clean () {}
void write_xml(std::ostream& xml);
@@ -60,7 +55,3 @@
#endif
/* EOF */
-
-
-
-
Index: true_server.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/true_server.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- true_server.hxx 3 Aug 2002 12:00:58 -0000 1.3
+++ true_server.hxx 23 Aug 2002 15:49:51 -0000 1.4
@@ -36,6 +36,7 @@
/** Reference to the PLF for this level, this must not be deleted */
PLF* plf;
+
public:
TrueServer(PLF* plf);
virtual ~TrueServer();
@@ -53,6 +54,10 @@
void set_armageddon ();
bool get_armageddon ();
+
+private:
+ TrueServer (const TrueServer&);
+ TrueServer operator= (const TrueServer&);
};
#endif
Index: usb_mouse_controller.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/usb_mouse_controller.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- usb_mouse_controller.hxx 16 Aug 2002 13:03:35 -0000 1.4
+++ usb_mouse_controller.hxx 23 Aug 2002 15:49:51 -0000 1.5
@@ -20,6 +20,7 @@
#ifndef HEADER_PINGUS_USB_MOUSE_CONTROLLER_HXX
#define HEADER_PINGUS_USB_MOUSE_CONTROLLER_HXX
+#include "pingus.hxx"
#include <stdio.h>
#include <sys/time.h>
#include <sys/types.h>
@@ -27,7 +28,6 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
-#include "pingus.hxx"
#ifdef WIN32
# error "This file must not included in Win32, its GNU/Linux only"
Index: view.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/view.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- view.hxx 2 Aug 2002 13:17:42 -0000 1.5
+++ view.hxx 23 Aug 2002 15:49:51 -0000 1.6
@@ -48,7 +48,6 @@
/// Static objects which are equal for all Views
static World* world;
- ///
void make_range();
public:
@@ -57,13 +56,9 @@
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()}. */
//@{
- ///
int x1_pos;
- ///
int y1_pos;
- ///
int x2_pos;
- ///
int y2_pos;
//@}
@@ -96,6 +91,10 @@
static void set_world(World*);
void on_pointer_move (int x, int y);
+
+private:
+ View (const View&);
+ View operator= (const View&);
};
#endif
Index: wav_provider.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/wav_provider.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- wav_provider.cxx 23 Jun 2002 19:16:41 -0000 1.2
+++ wav_provider.cxx 23 Aug 2002 15:49:51 -0000 1.3
@@ -27,7 +27,7 @@
std::map<std::string, Mix_Chunk*> PingusWavProvider::wave;
Mix_Chunk*
-PingusWavProvider::load(std::string str)
+PingusWavProvider::load (const std::string& str)
{
#ifdef HAVE_LIBSDL_MIXER
Mix_Chunk* wav_data;
Index: wav_provider.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/wav_provider.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- wav_provider.hxx 16 Aug 2002 13:03:35 -0000 1.3
+++ wav_provider.hxx 23 Aug 2002 15:49:51 -0000 1.4
@@ -20,20 +20,24 @@
#ifndef HEADER_PINGUS_WAV_PROVIDER_HXX
#define HEADER_PINGUS_WAV_PROVIDER_HXX
+#include "pingus.hxx"
#include <map>
#include <string>
-#include "pingus.hxx"
class Mix_Chunk;
-///
class PingusWavProvider
{
private:
static std::map<std::string, Mix_Chunk*> wave;
+
public:
- ///
- static Mix_Chunk* load(std::string);
+ static Mix_Chunk* load (const std::string& str);
+
+private:
+ PingusWavProvider ();
+ PingusWavProvider (const PingusWavProvider&);
+ PingusWavProvider operator= (const PingusWavProvider&);
};
#endif
Index: weather_data.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/weather_data.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- weather_data.cxx 2 Jul 2002 10:42:38 -0000 1.2
+++ weather_data.cxx 23 Aug 2002 15:49:51 -0000 1.3
@@ -20,7 +20,17 @@
#include <iostream>
#include "editor/editorobj.hxx"
#include "weather_data.hxx"
-#include "boost/smart_ptr.hpp"
+
+WeatherData
+WeatherData::operator= (const WeatherData& old)
+{
+ if (this == &old)
+ return *this;
+
+ type = old.type;
+
+ return *this;
+}
EditorObjLst
WeatherData::create_EditorObj ()
Index: weather_data.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/weather_data.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- weather_data.hxx 2 Jul 2002 10:42:38 -0000 1.3
+++ weather_data.hxx 23 Aug 2002 15:49:52 -0000 1.4
@@ -25,19 +25,18 @@
class EditorObj;
-namespace boost {
-
- template <class T> class shared_ptr;
-}
-
class WeatherData
{
-private:
-
public:
std::string type;
+
+public:
+ WeatherData () { }
+ WeatherData (const WeatherData& old) : type(old.type) { }
+ WeatherData operator= (const WeatherData& old);
EditorObjLst create_EditorObj ();
+
};
#endif
Index: world.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/world.cxx,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- world.cxx 22 Aug 2002 14:37:51 -0000 1.17
+++ world.cxx 23 Aug 2002 15:49:52 -0000 1.18
@@ -34,7 +34,6 @@
#include "game_time.hxx"
using namespace std;
-using boost::shared_ptr;
using Pingus::Actions::Bomber;
static
Index: world.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/world.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- world.hxx 22 Aug 2002 02:17:19 -0000 1.7
+++ world.hxx 23 Aug 2002 15:49:52 -0000 1.8
@@ -20,10 +20,10 @@
#ifndef HEADER_PINGUS_WORLD_HXX
#define HEADER_PINGUS_WORLD_HXX
+#include "pingus.hxx"
#include <list>
#include <vector>
#include <string>
-#include "pingus.hxx"
// Forward declarations
class CL_Vector;
@@ -171,6 +171,10 @@
/** Return a pointer to the GameTime object of this World */
GameTime* get_game_time ();
+
+private:
+ World (const World&);
+ World operator= (const World&);
};
#endif
Index: worldobj.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobj.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- worldobj.cxx 13 Jun 2002 14:25:12 -0000 1.2
+++ worldobj.cxx 23 Aug 2002 15:49:52 -0000 1.3
@@ -34,6 +34,18 @@
// z_pos = 0;
}
+WorldObj::WorldObj (const WorldObj& old)
+{
+ UNUSED_ARG(old);
+}
+
+void
+WorldObj::operator= (const WorldObj& old)
+{
+ UNUSED_ARG(old);
+}
+
+
WorldObj::~WorldObj()
{
Index: worldobj.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobj.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- worldobj.hxx 16 Aug 2002 13:03:35 -0000 1.3
+++ worldobj.hxx 23 Aug 2002 15:49:52 -0000 1.4
@@ -45,7 +45,10 @@
public:
/** Creates a new WorldObj*/
- WorldObj();
+ WorldObj ();
+
+ WorldObj (const WorldObj& old);
+ void operator= (const WorldObj& old);
/** Destroys a world object */
virtual ~WorldObj();
Index: worldobj_data.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobj_data.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- worldobj_data.hxx 2 Jul 2002 10:42:38 -0000 1.4
+++ worldobj_data.hxx 23 Aug 2002 15:49:52 -0000 1.5
@@ -27,10 +27,6 @@
class WorldObj;
class EditorObj;
-namespace boost {
- template <class T> class shared_ptr;
-}
-
typedef std::vector<EditorObj*> EditorObjLst;
/** The root data class for all objects in the Pingus world. Each
@@ -43,6 +39,13 @@
public:
/// Empty placeholder
WorldObjData() {}
+
+ /// Empty placeholder
+ WorldObjData (const WorldObjData&) { }
+
+ /// Empty placeholder
+ void operator= (const WorldObjData&) { }
+
/// Empty placeholder
virtual ~WorldObjData() {}
Index: worldobj_data_factory.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobj_data_factory.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- worldobj_data_factory.hxx 2 Jul 2002 15:46:58 -0000 1.4
+++ worldobj_data_factory.hxx 23 Aug 2002 15:49:52 -0000 1.5
@@ -55,6 +55,10 @@
'type' property. This is for backward compatibility only! */
WorldObjData* create (const std::string& id,
xmlDocPtr doc, xmlNodePtr cur);
+
+private:
+ WorldObjDataFactory (const WorldObjDataFactory&);
+ WorldObjDataFactory operator= (const WorldObjDataFactory&);
};
/** WorldObjDataAbstractFactory, interface for creating factories */
@@ -66,6 +70,10 @@
}
virtual WorldObjData* create (xmlDocPtr doc, xmlNodePtr cur) =0;
+
+private:
+ WorldObjDataAbstractFactory (const WorldObjDataAbstractFactory&);
+ WorldObjDataAbstractFactory operator= (const WorldObjDataAbstractFactory&);
};
/** Template to create factories, usage:
@@ -80,7 +88,10 @@
WorldObjData* create (xmlDocPtr doc, xmlNodePtr cur) {
return new T (doc, cur);
}
-
+
+private:
+ WorldObjDataFactoryImpl (const WorldObjDataFactoryImpl&);
+ WorldObjDataFactoryImpl operator= (const WorldObjDataFactoryImpl&);
};
#endif
Index: worldobj_group_data.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobj_group_data.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- worldobj_group_data.hxx 25 Jun 2002 12:20:31 -0000 1.4
+++ worldobj_group_data.hxx 23 Aug 2002 15:49:52 -0000 1.5
@@ -44,6 +44,10 @@
/** Create an EditorObj from the given data object */
EditorObjLst create_EditorObj ();
+
+private:
+ WorldObjGroupData (const WorldObjGroupData&);
+ WorldObjGroupData operator= (const WorldObjGroupData&);
};
#endif
Index: xml_helper.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/xml_helper.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- xml_helper.hxx 16 Aug 2002 13:02:06 -0000 1.6
+++ xml_helper.hxx 23 Aug 2002 15:49:52 -0000 1.7
@@ -20,12 +20,12 @@
#ifndef HEADER_PINGUS_XML_HELPER_HXX
#define HEADER_PINGUS_XML_HELPER_HXX
+#include "pingus.hxx"
#include <config.h>
#include <string>
#include <iosfwd>
#include <ClanLib/Core/Math/cl_vector.h>
-#include "pingus.hxx"
// FIX: Under windows, it's necessary to use libxml/parser.h, or MS's
// compiler will fails.
@@ -83,6 +83,11 @@
/** Write a CL_Vector to an xml stream */
static void write_vector_xml(std::ostream& xml, const CL_Vector& pos);
//@}
+
+private:
+ XMLhelper ();
+ XMLhelper (const XMLhelper&);
+ XMLhelper operator= (const XMLhelper&);
};
#endif
Index: xml_plf.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/xml_plf.cxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- xml_plf.cxx 22 Aug 2002 02:24:59 -0000 1.9
+++ xml_plf.cxx 23 Aug 2002 15:49:52 -0000 1.10
@@ -17,9 +17,8 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#include "pingus.hxx"
-#include "xml_plf.hxx"
#include "xml_helper.hxx"
+#include "xml_plf.hxx"
#include "globals.hxx"
#include "system.hxx"
#include "pingus_error.hxx"
Index: xml_plf.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/xml_plf.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- xml_plf.hxx 24 Jun 2002 22:52:57 -0000 1.3
+++ xml_plf.hxx 23 Aug 2002 15:49:52 -0000 1.4
@@ -30,17 +30,21 @@
void parse_file();
- void parse_background (xmlNodePtr cur);
- void parse_actions (xmlNodePtr cur);
- void parse_global (xmlNodePtr cur);
+ void parse_background (xmlNodePtr cur);
+ void parse_actions (xmlNodePtr cur);
+ void parse_global (xmlNodePtr cur);
void parse_groundpiece (xmlNodePtr cur);
- void parse_group (xmlNodePtr cur);
- void parse_start_pos (xmlNodePtr cur);
- void parse_weather (xmlNodePtr cur);
+ void parse_group (xmlNodePtr cur);
+ void parse_start_pos (xmlNodePtr cur);
+ void parse_weather (xmlNodePtr cur);
public:
- XMLPLF(const std::string& filename);
+ XMLPLF (const std::string& filename);
virtual ~XMLPLF();
+
+private:
+ XMLPLF (const XMLPLF&);
+ XMLPLF operator= (const XMLPLF&);
};
#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src action_button.hxx,1.7,1.8 action_holder.cxx,1.4,1.5 action_holder.hxx,1.3,1.4 algo.hxx,1.3,1.4 alpha_button.hxx,1.3,1.4 anim_counter.hxx,1.2,1.3 blitter.hxx,1.6,1.7 bmp_map.hxx,1.2,1.3 button_panel.hxx,1.8,1.9 capture_rectangle.cxx,1.4,1.5 capture_rectangle.hxx,1.3,1.4 client.hxx,1.12,1.13 col_map.hxx,1.4,1.5 color.hxx,1.3,1.4 config.hxx,1.3,1.4 console.hxx,1.6,1.7 counter.hxx,1.3,1.4 credits.cxx,1.8,1.9 credits.hxx,1.6,1.7 cursor.hxx,1.3,1.4 debug_stream.cxx,1.5,1.6 debug_stream.hxx,1.7,1.8 delta_manager.hxx,1.3,1.4 demo_player.hxx,1.3,1.4 demo_recorder.hxx,1.3,1.4 display.hxx,1.3,1.4 editor_hotspot.hxx,1.5,1.6 entrance.hxx,1.2,1.3 entrance_data.cxx,1.5,1.6 entrance_data.hxx,1.4,1.5 exit.hxx,1.2,1.3 exit_data.cxx,1.4,1.5 exit_data.hxx,1.4,1.5 exit_menu.hxx,1.5,1.6 fade_out.hxx,1.2,1.3 force_vector.cxx,1.4,1.5 force_vector.hxx,1.3,1.4 fps_counter.hxx,1.2,1.3 game_counter.hxx,1.3,1.4 game_delta.hxx,1.7,1.8 game_event.hxx,1.5,1.6 game_session.cxx,1.6,1.7 game_session.hxx,1.5,1.6 game_session_result.cxx,1.1,1.2 game_session_result.hxx,1.3,1.4 game_time.hxx,1.5,1.6 generic_main.hxx,1.3,1.4 global_event.cxx,1.6,1.7 global_event.hxx,1.4,1.5 globals.hxx,1.7,1.8 groundpiece_data.cxx,1.6,1.7 groundpiece_data.hxx,1.9,1.10 gui_obj.hxx,1.5,1.6 gui_screen.hxx,1.6,1.7 hotspot.hxx,1.2,1.3 hotspot_data.cxx,1.3,1.4 hotspot_data.hxx,1.4,1.5 html_browser.hxx,1.2,1.3 hurry_up.hxx,1.3,1.4 input_event.hxx,1.6,1.7 intro.hxx,1.3,1.4 layer_manager.hxx,1.4,1.5 level_desc.cxx,1.5,1.6 level_desc.hxx,1.3,1.4 level_interrupt.hxx,1.3,1.4 level_result.hxx,1.3,1.4 libxmlfwd.hxx,1.2,1.3 liquid.hxx,1.2,1.3 liquid_data.cxx,1.5,1.6 liquid_data.hxx,1.5,1.6 loading.cxx,1.1,1.2 loading.hxx,1.3,1.4 main_menu.hxx,1.3,1.4 menu_background.hxx,1.4,1.5 message_box.cxx,1.1,1.2 message_box.hxx,1.3,1.4 multiline_text.hxx,1.3,1.4 multiplayer_client.hxx,1.4,1.5 multiplayer_client_child.hxx,1.4,1.5 multiplayer_config.hxx,1.3,1.4 multiplayer_game.hxx,1.3,1.4 music_provider.cxx,1.2,1.3 music_provider.hxx,1.2,1.3 option_menu.cxx,1.2,1.3 option_menu.hxx,1.3,1.4 path_manager.cxx,1.2,1.3 path_manager.hxx,1.3,1.4 pingu.cxx,1.18,1.19 pingu.hxx,1.9,1.10 pingu_action.cxx,1.5,1.6 pingu_action.hxx,1.10,1.11 pingu_action_factory.cxx,1.6,1.7 pingu_action_factory.hxx,1.3,1.4 pingu_enums.hxx,1.5,1.6 pingu_holder.cxx,1.3,1.4 pingu_holder.hxx,1.2,1.3 pingu_info.hxx,1.3,1.4 pingu_map.hxx,1.2,1.3 pingus_counter.hxx,1.5,1.6 pingus_counter_bar.hxx,1.2,1.3 pingus_error.cxx,1.3,1.4 pingus_error.hxx,1.5,1.6 pingus_main.hxx,1.3,1.4 pingus_map_manager.cxx,1.1,1.2 pingus_map_manager.hxx,1.3,1.4 pingus_menu.hxx,1.5,1.6 pingus_menu_manager.hxx,1.8,1.9 pingus_resource.hxx,1.6,1.7 pingus_sub_menu.hxx,1.5,1.6 playfield.cxx,1.16,1.17 playfield.hxx,1.9,1.10 playfield_view.hxx,1.2,1.3 plf.cxx,1.3,1.4 plf.hxx,1.2,1.3 plf_parser.cxx,1.3,1.4 plf_parser.hxx,1.3,1.4 plf_plf.cxx,1.6,1.7 plf_plf.hxx,1.2,1.3 plf_preview.hxx,1.4,1.5 plt_parser.hxx,1.2,1.3 plt_xml.cxx,1.5,1.6 plt_xml.hxx,1.3,1.4 prefab_data.hxx,1.1,1.2 psm_parser.cxx,1.4,1.5 psm_parser.hxx,1.2,1.3 range.hxx,1.3,1.4 res_descriptor.cxx,1.8,1.9 res_descriptor.hxx,1.5,1.6 resource_modifier.hxx,1.2,1.3 result.hxx,1.3,1.4 screen.hxx,1.6,1.7 screen_manager.hxx,1.9,1.10 screen_manager_impl.hxx,1.3,1.4 screenshot.hxx,1.3,1.4 server.cxx,1.10,1.11 server.hxx,1.3,1.4 smallmap.hxx,1.7,1.8 smallmap_image.cxx,1.4,1.5 smallmap_image.hxx,1.5,1.6 sound.cxx,1.5,1.6 sound.hxx,1.6,1.7 sound_dummy.hxx,1.2,1.3 sound_real.cxx,1.5,1.6 sound_real.hxx,1.3,1.4 sounds.hxx,1.1,1.2 specs_reader.cxx,1.3,1.4 specs_reader.hxx,1.3,1.4 spot_map.cxx,1.7,1.8 spot_map.hxx,1.3,1.4 sprite.cxx,1.4,1.5 sprite.hxx,1.4,1.5 story.hxx,1.5,1.6 string_converter.hxx,1.4,1.5 surface_button.hxx,1.7,1.8 system.hxx,1.3,1.4 target_provider.hxx,1.3,1.4 theme.cxx,1.5,1.6 theme.hxx,1.2,1.3 theme_selector.cxx,1.4,1.5 theme_selector.hxx,1.3,1.4 time_display.hxx,1.4,1.5 timer.hxx,1.3,1.4 trap.hxx,1.2,1.3 trap_data.cxx,1.5,1.6 trap_data.hxx,1.5,1.6 true_server.hxx,1.3,1.4 usb_mouse_controller.hxx,1.4,1.5 view.hxx,1.5,1.6 wav_provider.cxx,1.2,1.3 wav_provider.hxx,1.3,1.4 weather_data.cxx,1.2,1.3 weather_data.hxx,1.3,1.4 world.cxx,1.17,1.18 world.hxx,1.7,1.8 worldobj.cxx,1.2,1.3 worldobj.hxx,1.3,1.4 worldobj_data.hxx,1.4,1.5 worldobj_data_factory.hxx,1.4,1.5 worldobj_group_data.hxx,1.4,1.5 xml_helper.hxx,1.6,1.7 xml_plf.cxx,1.9,1.10 xml_plf.hxx,1.3,1.4,
torangan <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src/actions angel.hxx,1.5,1.6 basher.cxx,1.9,1.10 basher.hxx,1.5,1.6 blocker.cxx,1.3,1.4 blocker.hxx,1.5,1.6 boarder.cxx,1.3,1.4 boarder.hxx,1.5,1.6 bomber.hxx,1.7,1.8 bridger.cxx,1.9,1.10 bridger.hxx,1.7,1.8 climber.cxx,1.5,1.6 climber.hxx,1.4,1.5 digger.cxx,1.7,1.8 digger.hxx,1.4,1.5 drown.hxx,1.4,1.5 exiter.hxx,1.4,1.5 faller.cxx,1.14,1.15 faller.hxx,1.9,1.10 floater.cxx,1.9,1.10 floater.hxx,1.6,1.7 jumper.cxx,1.5,1.6 jumper.hxx,1.4,1.5 laser_kill.hxx,1.4,1.5 miner.cxx,1.5,1.6 miner.hxx,1.4,1.5 rocket_launcher.cxx,1.3,1.4 rocket_launcher.hxx,1.4,1.5 slider.cxx,1.3,1.4 slider.hxx,1.4,1.5 smashed.hxx,1.4,1.5 splashed.hxx,1.4,1.5 superman.hxx,1.5,1.6 teleported.cxx,1.3,1.4 teleported.hxx,1.4,1.5 waiter.cxx,1.2,1.3 waiter.hxx,1.4,1.5 walker.cxx,1.15,1.16 walker.hxx,1.4,1.5
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src/input/buttons - New directory
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src/actions angel.hxx,1.5,1.6 basher.cxx,1.9,1.10 basher.hxx,1.5,1.6 blocker.cxx,1.3,1.4 blocker.hxx,1.5,1.6 boarder.cxx,1.3,1.4 boarder.hxx,1.5,1.6 bomber.hxx,1.7,1.8 bridger.cxx,1.9,1.10 bridger.hxx,1.7,1.8 climber.cxx,1.5,1.6 climber.hxx,1.4,1.5 digger.cxx,1.7,1.8 digger.hxx,1.4,1.5 drown.hxx,1.4,1.5 exiter.hxx,1.4,1.5 faller.cxx,1.14,1.15 faller.hxx,1.9,1.10 floater.cxx,1.9,1.10 floater.hxx,1.6,1.7 jumper.cxx,1.5,1.6 jumper.hxx,1.4,1.5 laser_kill.hxx,1.4,1.5 miner.cxx,1.5,1.6 miner.hxx,1.4,1.5 rocket_launcher.cxx,1.3,1.4 rocket_launcher.hxx,1.4,1.5 slider.cxx,1.3,1.4 slider.hxx,1.4,1.5 smashed.hxx,1.4,1.5 splashed.hxx,1.4,1.5 superman.hxx,1.5,1.6 teleported.cxx,1.3,1.4 teleported.hxx,1.4,1.5 waiter.cxx,1.2,1.3 waiter.hxx,1.4,1.5 walker.cxx,1.15,1.16 walker.hxx,1.4,1.5
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src/input/buttons - New directory
- Index(es):