[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src Makefile.am, 1.155, 1.156 action_butt
From: |
Ingo Ruhnke |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src Makefile.am, 1.155, 1.156 action_button.cxx, 1.34, 1.35 action_button.hxx, 1.19, 1.20 action_holder.cxx, 1.13, 1.14 alpha_button.cxx, 1.6, 1.7 alpha_button.hxx, 1.7, 1.8 blitter.cxx, 1.32, 1.33 blitter_impl.hxx, 1.14, 1.15 button_panel.cxx, 1.26, 1.27 button_panel.hxx, 1.19, 1.20 capture_rectangle.cxx, 1.15, 1.16 capture_rectangle.hxx, 1.8, 1.9 client.cxx, 1.49, 1.50 client.hxx, 1.29, 1.30 col_map.cxx, 1.21, 1.22 col_map.hxx, 1.13, 1.14 console.cxx, 1.17, 1.18 credits.cxx, 1.40, 1.41 exit_menu.cxx, 1.22, 1.23 fade_out.cxx, 1.10, 1.11 fps_counter.hxx, 1.8, 1.9 global_event.cxx, 1.12, 1.13 globals.cxx, 1.16, 1.17 hurry_up.hxx, 1.9, 1.10 indexed_canvas.hxx, 1.5, 1.6 loading.cxx, 1.8, 1.9 menu_button.cxx, 1.13, 1.14 multiline_text.cxx, 1.8, 1.9 multiline_text.hxx, 1.7, 1.8 pingu.cxx, 1.44, 1.45 pingu_map.cxx, 1.9, 1.10 pingu_map.hxx, 1.7, 1.8 pingus_counter.hxx, 1.12, 1.13 pingus_counter_bar.cxx, 1.9, 1.10 pingus_map_manager.cxx, 1.5, 1.6 pingus_menu_manager.cxx, 1.27, 1.28 pingus_resource.cxx, 1.30, 1.31 pingus_resource.hxx, 1.18, 1.19 playfield.cxx, 1.37, 1.38 playfield_view.cxx, 1.5, 1.6 savegame.hxx, 1.5, 1.6 theme_selector.cxx, 1.14, 1.15 theme_selector.hxx, 1.8, 1.9 time_display.cxx, 1.17, 1.18 time_display.hxx, 1.12, 1.13 world.cxx, 1.46, 1.47 |
Date: |
Tue, 21 Oct 2003 13:01:55 +0200 |
Update of /var/lib/cvs/Games/Pingus/src
In directory dark:/tmp/cvs-serv31821
Modified Files:
Makefile.am action_button.cxx action_button.hxx
action_holder.cxx alpha_button.cxx alpha_button.hxx
blitter.cxx blitter_impl.hxx button_panel.cxx button_panel.hxx
capture_rectangle.cxx capture_rectangle.hxx client.cxx
client.hxx col_map.cxx col_map.hxx console.cxx credits.cxx
exit_menu.cxx fade_out.cxx fps_counter.hxx global_event.cxx
globals.cxx hurry_up.hxx indexed_canvas.hxx loading.cxx
menu_button.cxx multiline_text.cxx multiline_text.hxx
pingu.cxx pingu_map.cxx pingu_map.hxx pingus_counter.hxx
pingus_counter_bar.cxx pingus_map_manager.cxx
pingus_menu_manager.cxx pingus_resource.cxx
pingus_resource.hxx playfield.cxx playfield_view.cxx
savegame.hxx theme_selector.cxx theme_selector.hxx
time_display.cxx time_display.hxx world.cxx
Log Message:
- bunch of misc changes
Index: Makefile.am
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/Makefile.am,v
retrieving revision 1.155
retrieving revision 1.156
diff -u -d -r1.155 -r1.156
--- Makefile.am 19 Oct 2003 12:25:47 -0000 1.155
+++ Makefile.am 21 Oct 2003 11:01:52 -0000 1.156
@@ -232,8 +232,6 @@
res_descriptor.hxx \
resource_modifier.cxx \
resource_modifier.hxx \
-result.cxx \
-result.hxx \
result_screen.cxx \
result_screen.hxx \
savegame.hxx \
Index: action_button.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/action_button.cxx,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- action_button.cxx 18 Oct 2003 23:17:27 -0000 1.34
+++ action_button.cxx 21 Oct 2003 11:01:52 -0000 1.35
@@ -27,6 +27,7 @@
#include "world.hxx"
#include "gui/graphic_context.hxx"
#include "string_converter.hxx"
+#include "gui/display.hxx"
#include "fonts.hxx"
namespace Pingus {
@@ -46,7 +47,6 @@
y_pos = y;
name = name_;
-
font = Fonts::pingus_small;
font_b = Fonts::pingus_large;
@@ -117,8 +117,8 @@
if (pressed)
{
if (fast_mode) {
- CL_Display::fill_rect(x_pos, y_pos, x_pos + 60, y_pos + 35,
- 1.0, 1.0, 1.0, 1.0);
+ CL_Display::fill_rect(CL_Rect(x_pos, y_pos, x_pos + 60, y_pos + 35),
+ Display::to_color(1.0, 1.0, 1.0, 1.0));
} else {
//CL_Display::fill_rect(x_pos, y_pos, x_pos + 60, y_pos + 35 ,
//1.0, 1.0, 1.0, 0.5);
@@ -140,6 +140,7 @@
sprite.set_direction(Sprite::RIGHT);
gc.draw(sprite, Vector(x_pos + 20, y_pos + 32));
+#ifdef CLANLIB_0_6
// print the action name next to the button, when mouse pointer is on
// the button.
// FIXME: this should use the GUI events, not CL_Mouse
@@ -160,6 +161,7 @@
std::string str = to_string(action_holder->get_available(name));
font->print_center(x_pos + 46, y_pos + 5, str.c_str ());
}
+#endif
}
ArmageddonButton::ArmageddonButton (TrueServer* s, int x, int y)
Index: action_button.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/action_button.hxx,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- action_button.hxx 18 Oct 2003 23:17:27 -0000 1.19
+++ action_button.hxx 21 Oct 2003 11:01:52 -0000 1.20
@@ -133,11 +133,11 @@
Sprite sprite;
int x_pos;
int y_pos;
- CL_Font* font;
+ CL_Font font;
// Added for printing action names next to the button.
- CL_Font* font_b;
+ CL_Font font_b;
- ActionName name;
+ Actions::ActionName name;
bool is_multi_direct;
ActionHolder* action_holder;
@@ -148,13 +148,13 @@
ActionButton(ActionHolder*);
virtual ~ActionButton();
- void init(int x, int y, ActionName name_, int owner_id);
+ void init(int x, int y, Actions::ActionName name_, int owner_id);
/// Not used.
void update(float delta);
/// Returns the name of the action the button represents.
- ActionName get_action_name();
+ Actions::ActionName get_action_name();
/// Returns true if the button is pressed.
bool is_pressed();
@@ -179,7 +179,7 @@
CL_Surface backgroundhl;
public:
- VerticalActionButton(ActionHolder* h, int x, int y, ActionName name, int
owner_id);
+ VerticalActionButton(ActionHolder* h, int x, int y, Actions::ActionName
name, int owner_id);
virtual ~VerticalActionButton();
void draw(GraphicContext& gc);
Index: action_holder.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/action_holder.cxx,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- action_holder.cxx 18 Oct 2003 23:17:27 -0000 1.13
+++ action_holder.cxx 21 Oct 2003 11:01:52 -0000 1.14
@@ -25,6 +25,8 @@
namespace Pingus {
+using namespace Actions;
+
ActionHolder::ActionHolder (PLF* plf)
{
std::vector<ActionData> action_data = plf->get_actions();
@@ -44,7 +46,7 @@
{
}
-std::vector<ActionName>
+std::vector<Actions::ActionName>
ActionHolder::get_available_actions()
{
std::vector<ActionName> ret;
Index: alpha_button.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/alpha_button.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- alpha_button.cxx 18 Oct 2003 23:17:27 -0000 1.6
+++ alpha_button.cxx 21 Oct 2003 11:01:52 -0000 1.7
@@ -20,6 +20,7 @@
#include <ClanLib/Display/display.h>
#include <ClanLib/Display/font.h>
#include <ClanLib/Display/mouse.h>
+#include <ClanLib/Display/keys.h>
#include "fonts.hxx"
#include "alpha_button.hxx"
@@ -40,6 +41,7 @@
void
AlphaButton::draw(void)
{
+#ifdef CLANLIB_0_6
if (is_pressed()) {
CL_Display::fill_rect(x1_pos, y1_pos, x2_pos, y2_pos,
1.0, 1.0, 1.0, 0.5);
@@ -51,12 +53,13 @@
font->print_center(x1_pos + (x2_pos - x1_pos)/2, y1_pos + (y2_pos -
y1_pos)/2,
name.c_str());
}
+#endif
}
bool
AlphaButton::is_pressed()
{
- if (mouse_over() && CL_Mouse::left_pressed()) {
+ if (mouse_over() && CL_Mouse::get_keycode(CL_MOUSE_LEFT)) {
return true;
} else {
return false;
Index: alpha_button.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/alpha_button.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- alpha_button.hxx 18 Oct 2003 23:17:27 -0000 1.7
+++ alpha_button.hxx 21 Oct 2003 11:01:52 -0000 1.8
@@ -31,8 +31,8 @@
{
private:
bool pressed;
- CL_Font* font;
- CL_Font* font_h;
+ CL_Font font;
+ CL_Font font_h;
std::string name;
int x1_pos, y1_pos, x2_pos, y2_pos;
public:
Index: blitter.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/blitter.cxx,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- blitter.cxx 19 Oct 2003 12:25:47 -0000 1.32
+++ blitter.cxx 21 Oct 2003 11:01:52 -0000 1.33
@@ -42,6 +42,7 @@
Blitter::put_surface(CL_PixelBuffer* canvas, const CL_Surface& sur,
int x, int y)
{
+#ifdef CLANLIB_0_6
//Blitter::put_surface(canvas, sur->get_provider(), x, y);
/* if (sur->get_provider()->get_depth() != 8)
sur->put_target(x, y, 0, canvas);
@@ -49,12 +50,14 @@
assert (sur);
assert (canvas);
Blitter::put_surface(canvas, sur.get_provider(), x, y);
+#endif
}
void
Blitter::put_surface(CL_PixelBuffer* canvas, CL_PixelBuffer* provider,
int x, int y)
{
+#ifdef CLANLIB_0_6
assert (provider);
assert (canvas);
switch(provider->get_depth())
@@ -69,12 +72,14 @@
PingusError::raise("Blitter:put_surface:Unknown color depth: " +
to_string(provider->get_depth()));
break;
}
+#endif
}
void
Blitter::put_surface_8bit(CL_PixelBuffer* provider, CL_PixelBuffer* sprovider,
int x, int y)
{
+#ifdef CLANLIB_0_6
assert (provider);
assert (sprovider);
int start_i;
@@ -175,12 +180,14 @@
sprovider->unlock();
provider->unlock();
#endif
+#endif
}
void
Blitter::put_surface_32bit(CL_PixelBuffer* canvas, CL_PixelBuffer* provider,
const int x_pos, const int y_pos)
{
+#ifdef CLANLIB_0_6
assert (canvas);
assert (provider);
@@ -231,12 +238,14 @@
provider->unlock();
canvas->unlock();
#endif
+#endif
}
void
Blitter::put_alpha_surface(CL_PixelBuffer* provider, CL_PixelBuffer* sprovider,
int x, int y)
{
+#ifdef CLANLIB_0_6
assert (provider);
assert (sprovider);
int start_i;
@@ -307,11 +316,14 @@
sprovider->unlock();
provider->unlock();
#endif
+
+#endif
}
CL_PixelBuffer*
Blitter::clear_canvas(CL_PixelBuffer* canvas)
{
+#ifdef CLANLIB_0_6
assert (canvas);
unsigned char* buffer;
@@ -322,18 +334,23 @@
//canvas->unlock();
return canvas;
+#endif
+ return 0;
}
CL_PixelBuffer*
Blitter::create_canvas(const CL_Surface& sur)
{
+#ifdef CLANLIB_0_6
assert (sur);
return create_canvas(sur.get_provider());
+#endif
}
CL_PixelBuffer*
Blitter::create_canvas(CL_PixelBuffer* prov)
{
+#ifdef CLANLIB_0_6
assert (prov);
CL_PixelBuffer* canvas = new CL_PixelBuffer(prov->get_width(),
prov->get_height());
@@ -378,18 +395,23 @@
break;
}
return canvas;
+#endif
+ return 0;
}
CL_Surface
Blitter::scale_surface (const CL_Surface& sur, int width, int height)
{
+#ifdef CLANLIB_0_6
assert (sur);
return CL_Surface(Blitter::scale_surface_to_canvas(sur, width, height),
true);
+#endif
}
CL_PixelBuffer*
Blitter::scale_surface_to_canvas (const CL_Surface& sur, int width, int height)
{
+#ifdef CLANLIB_0_6
assert (sur);
Color color;
@@ -494,6 +516,8 @@
#endif
return canvas;
+#endif
+ return 0;
}
/*
Index: blitter_impl.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/blitter_impl.hxx,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- blitter_impl.hxx 19 Oct 2003 12:25:47 -0000 1.14
+++ blitter_impl.hxx 21 Oct 2003 11:01:52 -0000 1.15
@@ -24,6 +24,7 @@
#include <ClanLib/Display/pixel_buffer.h>
#include <ClanLib/Display/surface.h>
#include "pingus.hxx"
+#include "canvas.hxx"
namespace Pingus {
@@ -188,8 +189,7 @@
if (prov->is_indexed())
{
- //std::cout << "Using indexed blitter" << std::endl;
-
+#ifdef CLANLIB_0_6
IndexedCanvas* canvas = new IndexedCanvas(TransF::get_width (pwidth,
pheight),
TransF::get_height(pwidth,
pheight));
if (prov->uses_src_colorkey())
@@ -202,6 +202,7 @@
unsigned char* source_buf = static_cast<unsigned
char*>(prov->get_data());
unsigned char* target_buf = static_cast<unsigned
char*>(canvas->get_data());
+#endif
for (int y = 0; y < pheight; ++y)
for (int x = 0; x < pwidth; ++x)
Index: button_panel.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/button_panel.cxx,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- button_panel.cxx 18 Oct 2003 23:17:27 -0000 1.26
+++ button_panel.cxx 21 Oct 2003 11:01:52 -0000 1.27
@@ -70,7 +70,7 @@
}
void
-ButtonPanel::on_wheel_move(const CL_Key& key)
+ButtonPanel::on_wheel_move(const CL_InputEvent& key)
{
if (key.id == CL_MOUSE_WHEELDOWN)
{
Index: button_panel.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/button_panel.hxx,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- button_panel.hxx 18 Oct 2003 23:17:27 -0000 1.19
+++ button_panel.hxx 21 Oct 2003 11:01:52 -0000 1.20
@@ -24,7 +24,7 @@
#include "action_button.hxx"
-class CL_Key;
+class CL_InputEvent;
namespace Pingus {
@@ -52,7 +52,7 @@
int x_pos, y_pos;
CL_Slot wheel_slot;
- void on_wheel_move(const CL_Key& key);
+ void on_wheel_move(const CL_InputEvent& key);
public:
ButtonPanel(Client* c, int arg_x_pos, int arg_y_pos);
virtual ~ButtonPanel();
@@ -62,7 +62,7 @@
bool is_at (int x, int y);
- ActionName get_action_name();
+ Actions::ActionName get_action_name();
void update(float delta);
void draw(GraphicContext& gc);
Index: capture_rectangle.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/capture_rectangle.cxx,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- capture_rectangle.cxx 18 Oct 2003 23:17:27 -0000 1.15
+++ capture_rectangle.cxx 21 Oct 2003 11:01:52 -0000 1.16
@@ -70,13 +70,14 @@
// Draw the caputure rectangle
sur->draw(pingu->get_center_pos() + Vector(x_offset,y_offset));
- font->print_center(static_cast<int>(pingu->get_center_pos().x) +
x_offset,
- static_cast<int>(pingu->get_center_pos().y) +
y_offset - 32,
- action_str.c_str());
+#ifdef CLANLIB_0_6
+ font.print_center(static_cast<int>(pingu->get_center_pos().x) +
x_offset,
+ static_cast<int>(pingu->get_center_pos().y) +
y_offset - 32,
+ action_str.c_str());
/*font->print_center(pingu->get_center_pos().x + x_offset,
pingu->get_center_pos().y + y_offset - 16 + 62,
to_string(pingu->get_owner()).c_str());*/
-
+#endif
// Paint the direction arrow
if (pingu->direction.is_left())
Index: capture_rectangle.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/capture_rectangle.hxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- capture_rectangle.hxx 18 Oct 2003 23:17:27 -0000 1.8
+++ capture_rectangle.hxx 21 Oct 2003 11:01:52 -0000 1.9
@@ -50,7 +50,7 @@
Sprite arrow_right;
ButtonPanel* button_panel;
- CL_Font* font;
+ CL_Font font;
public:
CaptureRectangle(ButtonPanel*);
Index: client.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/client.cxx,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- client.cxx 20 Oct 2003 19:28:54 -0000 1.49
+++ client.cxx 21 Oct 2003 11:01:52 -0000 1.50
@@ -353,11 +353,11 @@
if (server->get_plf()->get_music() == "none")
{
- PingusSound::stop_music();
+ Sound::PingusSound::stop_music();
}
else
{
- PingusSound::play_music(server->get_plf ()->get_music());
+ Sound::PingusSound::play_music(server->get_plf ()->get_music());
}
if (verbose)
Index: client.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/client.hxx,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- client.hxx 20 Oct 2003 13:33:43 -0000 1.29
+++ client.hxx 21 Oct 2003 11:01:52 -0000 1.30
@@ -21,11 +21,12 @@
#define HEADER_PINGUS_CLIENT_HXX
#include <ClanLib/Signals/slot.h>
-#include <ClanLib/Display/inputdevice.h>
+#include <ClanLib/Display/input_device.h>
#include "gui/gui_screen.hxx"
-#include "result.hxx"
#include "sprite.hxx"
+class CL_InputEvent;
+
namespace Pingus {
namespace Input {
@@ -40,7 +41,6 @@
class RootGUIManager;
} // namespace GUI
-class CL_Key;
class Vector;
class ButtonPanel;
class Controller;
@@ -57,7 +57,6 @@
class Client : public GUIScreen
{
private:
- Result result;
TrueServer* server;
int skip_frame;
@@ -97,8 +96,8 @@
void on_primary_button_press(int x, int y);
void on_primary_button_release(int x, int y);
- void on_butmouse_button_press(const CL_Key &key);
- void on_mouse_button_release(const CL_Key &key);
+ void on_butmouse_button_press(const CL_InputEvent &key);
+ void on_mouse_button_release(const CL_InputEvent &key);
// Overloaded GUIScreen stuff
bool draw (GraphicContext& gc);
Index: col_map.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/col_map.cxx,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- col_map.cxx 20 Oct 2003 19:28:54 -0000 1.21
+++ col_map.cxx 21 Oct 2003 11:01:52 -0000 1.22
@@ -20,9 +20,11 @@
#include <iostream>
#include <assert.h>
#include <ClanLib/Display/pixel_buffer.h>
+#include <ClanLib/Display/surface.h>
#include "gui/graphic_context.hxx"
#include "globals.hxx"
#include "col_map.hxx"
+#include "canvas.hxx"
#include "gettext.h"
#define COLMAP_WITH_MEMORY_HOLE 1
@@ -83,24 +85,25 @@
}
void
-ColMap::remove(CL_PixelBuffer* provider, int x, int y)
+ColMap::remove(const CL_PixelBuffer& provider, int x, int y)
{
+#ifdef CLANLIB_0_6
++serial;
assert(provider);
- if (provider->get_depth() == 32)
+ if (provider.get_depth() == 32)
{
unsigned char* buffer;
- int swidth = provider->get_width();
- int sheight = provider->get_height();
+ int swidth = provider.get_width();
+ int sheight = provider.get_height();
int y_offset = -y;
int x_offset = -x;
if (y_offset < 0) y_offset = 0;
if (x_offset < 0) x_offset = 0;
- provider->lock();
- buffer = static_cast<unsigned char*>(provider->get_data());
+ provider.lock();
+ buffer = static_cast<unsigned char*>(provider.get_data());
for(int line = y_offset; line < sheight && (line + y) < height; ++line)
{
@@ -114,21 +117,21 @@
}
}
#if COLMAP_WITH_MEMORY_HOLE
- provider->unlock();
+ provider.unlock();
#endif
}
- else if (provider->get_depth() == 8)
+ else if (provider.get_depth() == 8)
{
unsigned char* buffer;
- int swidth = provider->get_width();
- int sheight = provider->get_height();
+ int swidth = provider.get_width();
+ int sheight = provider.get_height();
int y_offset = -y;
int x_offset = -x;
if (y_offset < 0) y_offset = 0;
if (x_offset < 0) x_offset = 0;
- provider->lock();
- buffer = static_cast<unsigned char*>(provider->get_data());
+ provider.lock();
+ buffer = static_cast<unsigned char*>(provider.get_data());
for(int line = y_offset; line < sheight && (line + y) < height; ++line)
{
@@ -142,13 +145,14 @@
}
}
#if COLMAP_WITH_MEMORY_HOLE
- provider->unlock();
+ provider.unlock();
#endif
}
else
{
assert(!"ColMap::remove: Color depth not supported");
}
+#endif
}
void
@@ -183,12 +187,6 @@
}
}
-void
-ColMap::put(const CL_Surface& sur, int sur_x, int sur_y, Groundtype::GPType
gptype)
-{
- put(sur.get_provider(), sur_x, sur_y, gptype);
-}
-
// Puts a surface on the colmap
void
ColMap::put(const CL_PixelBuffer& provider, int sur_x, int sur_y,
Groundtype::GPType pixel)
@@ -207,16 +205,16 @@
return;
}
- provider->lock();
+ provider.lock();
- if (provider->get_depth() == 32)
+ if (provider.get_depth() == 32)
{
float r, g, b, a;
// Rewritting blitter for 32bit depth (using get_pixel())
- for (unsigned int y=0; y < provider->get_height(); ++y)
- for (unsigned int x=0; x < provider->get_width(); ++x)
+ for (unsigned int y=0; y < provider.get_height(); ++y)
+ for (unsigned int x=0; x < provider.get_width(); ++x)
{
- provider->get_pixel(x, y, &r, &g, &b, &a);
+ provider.get_pixel(x, y, &r, &g, &b, &a);
if (a > 0.1) // Alpha threshold
{
if (blit_allowed (x + sur_x, y + sur_y, pixel))
@@ -224,22 +222,22 @@
}
}
}
- else if (provider->get_depth() == 8)
+ else if (provider.get_depth() == 8)
{
unsigned char* buffer;
- int swidth = provider->get_width();
- int sheight = provider->get_height();
+ int swidth = provider.get_width();
+ int sheight = provider.get_height();
int y_offset = -sur_y;
int x_offset = -sur_x;
if (y_offset < 0) y_offset = 0;
if (x_offset < 0) x_offset = 0;
- //provider->lock();
- buffer = static_cast<unsigned char*>(provider->get_data());
+ //provider.lock();
+ buffer = static_cast<unsigned char*>(provider.get_data());
- if (provider->uses_src_colorkey())
+ if (provider.uses_src_colorkey())
{
- unsigned int colorkey = provider->get_src_colorkey();
+ unsigned int colorkey = provider.get_src_colorkey();
for(int line = y_offset; line < sheight && (line + sur_y) < height;
++line)
for (int i = x_offset; i < swidth && (i+sur_x) < width; ++i)
{
@@ -265,18 +263,18 @@
std::cout << "ColMap: Unsupported color depth, ignoring" << std::endl;
}
// FIXME: Memory hole
- // provider->unlock();
+ // provider.unlock();
}
void
ColMap::draw(GraphicContext& gc)
{
- CL_Canvas* canvas = new CL_Canvas(width, height);
+ CL_PixelBuffer canvas = Canvas::create(width, height);
CL_Surface sur;
unsigned char* buffer;
- canvas->lock();
- buffer = static_cast<unsigned char*>(canvas->get_data());
+ canvas.lock();
+ buffer = static_cast<unsigned char*>(canvas.get_data());
for(int i = 0; i < (width * height); ++i)
{
@@ -314,7 +312,7 @@
// FIXME: Memory hole
#if COLMAP_WITH_MEMORY_HOLE
- canvas->unlock();
+ canvas.unlock();
#endif
sur = CL_Surface(canvas, true);
Index: col_map.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/col_map.hxx,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- col_map.hxx 20 Oct 2003 13:33:43 -0000 1.13
+++ col_map.hxx 21 Oct 2003 11:01:52 -0000 1.14
@@ -80,10 +80,8 @@
void put(int x, int y, Groundtype::GPType p = Groundtype::GP_GROUND);
void put(const CL_PixelBuffer&, int x, int y, Groundtype::GPType);
- void put(CL_PixelBuffer*, int x, int y, Groundtype::GPType);
/// void remove(int x, int y);
- void remove(const CL_Surface&, int x, int y);
void remove(const CL_PixelBuffer&, int x, int y);
void draw(GraphicContext& gc);
Index: console.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/console.cxx,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- console.cxx 18 Oct 2003 23:17:27 -0000 1.17
+++ console.cxx 21 Oct 2003 11:01:52 -0000 1.18
@@ -157,7 +157,7 @@
/** Callculate the position of the first line on the screen */
int start_y_pos =
- CL_Display::get_height() - (font->get_height() * (number_of_lines + 3));
+ CL_Display::get_height() - (font.get_height() * (number_of_lines + 3));
// The background of the console
CL_Display::fill_rect(0, start_y_pos - 15,
@@ -179,8 +179,8 @@
i < number_of_lines && i + window_start < buffer.size();
++it, ++i)
{
- font->print_left(10,
- start_y_pos + (i * (font->get_height() + 2)),
+ font.print_left(10,
+ start_y_pos + (i * (font.get_height() + 2)),
it->c_str()
);
}
Index: credits.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/credits.cxx,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- credits.cxx 20 Oct 2003 19:28:54 -0000 1.40
+++ credits.cxx 21 Oct 2003 11:01:52 -0000 1.41
@@ -207,6 +207,7 @@
void
Credits::draw_background (GraphicContext& gc)
{
+#ifdef CLANLIB_0_6
int x;
int y;
int yof;
@@ -225,7 +226,7 @@
CL_Display::get_width(), CL_Display::get_height(),
0.0, 0.0, 0.0, 1.0);*/
- CL_Display::push_clip_rect(CL_ClipRect(0, gc.get_height()/2-225, 600,
gc.get_height()/2+200));
+ CL_Display::push_clip_rect(CL_Rect(0, gc.get_height()/2-225, 600,
gc.get_height()/2+200));
yof = 0;
for (std::vector<std::string>::iterator i = credits.begin(); i !=
credits.end(); ++i)
{
@@ -248,6 +249,7 @@
}
}
CL_Display::pop_clip_rect();
+#endif
}
void
Index: exit_menu.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/exit_menu.cxx,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- exit_menu.cxx 20 Oct 2003 19:28:54 -0000 1.22
+++ exit_menu.cxx 21 Oct 2003 11:01:52 -0000 1.23
@@ -50,14 +50,14 @@
void on_click()
{
- PingusSound::play_sound ("yipee");
+ Sound::PingusSound::play_sound ("yipee");
manager->exit ();
}
void on_pointer_enter()
{
SurfaceButton::on_pointer_enter();
- PingusSound::play_sound ("tick");
+ Sound::PingusSound::play_sound ("tick");
}
};
@@ -82,14 +82,14 @@
}
void on_click() {
- PingusSound::play_sound ("yipee");
+ Sound::PingusSound::play_sound ("yipee");
manager->pop_menu();
}
void on_pointer_enter()
{
SurfaceButton::on_pointer_enter();
- PingusSound::play_sound ("tick");
+ Sound::PingusSound::play_sound ("tick");
}
};
Index: fade_out.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/fade_out.cxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- fade_out.cxx 20 Oct 2003 19:28:54 -0000 1.10
+++ fade_out.cxx 21 Oct 2003 11:01:52 -0000 1.11
@@ -103,7 +103,9 @@
double step_w = (CL_Display::get_width() / 2.0) / steps;
double step_h = (CL_Display::get_height() / 2.0) / steps ;
+#ifdef CLANLIB_0_6
CL_Display::sync_buffers();
+#endif
for(int i=0; i <= steps; ++i)
{
@@ -112,7 +114,8 @@
x2 = static_cast<int>((CL_Display::get_width() / 2) + (step_w * i));
y2 = static_cast<int>((CL_Display::get_height() / 2) + (step_h * i));
- CL_Display::fill_rect(x1, y1, x2, y2, 0.0, 0.0, 0.0, 1.0);
+ CL_Display::fill_rect(CL_Rect(x1, y1, x2, y2),
+ Display::to_color(0.0, 0.0, 0.0, 1.0));
CL_System::sleep(0);
Display::flip_display(true);
}
@@ -122,15 +125,17 @@
void
FadeOut::fade_to_black (int steps)
{
+#ifdef CLANLIB_0_6
CL_Display::sync_buffers();
+#endif
for(int i = 0; i < steps; ++i)
{
- CL_Display::fill_rect(0, 0,
- CL_Display::get_width(),
- CL_Display::get_height(),
- 0.0f, 0.0f, 0.0f,
- static_cast<float>(i)/steps);
+ CL_Display::fill_rect(CL_Rect(0, 0,
+ CL_Display::get_width(),
+ CL_Display::get_height()),
+ Display::to_color(0.0f, 0.0f, 0.0f,
+ static_cast<float>(i)/steps));
Display::flip_display(true);
}
@@ -141,7 +146,9 @@
{
CL_Display::clear();
Display::flip_display();
+#ifdef CLANLIB_0_6
CL_Display::sync_buffers();
+#endif
}
void
@@ -149,8 +156,8 @@
{
//std::cout << "EnlargingRectFadeOut:: draw" << std::endl;
int width = int(CL_Display::get_width () * get_progress ());
- CL_Display::fill_rect (0, 0, width, CL_Display::get_height (),
- color.red, color.green, color.blue);
+ CL_Display::fill_rect (CL_Rect(0, 0, width, CL_Display::get_height ()),
+ Display::to_color(color.red, color.green, color.blue,
1.0f));
}
} // namespace Pingus
Index: fps_counter.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/fps_counter.hxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- fps_counter.hxx 18 Oct 2003 12:11:30 -0000 1.8
+++ fps_counter.hxx 21 Oct 2003 11:01:52 -0000 1.9
@@ -20,10 +20,9 @@
#ifndef HEADER_PINGUS_FPS_COUNTER_HXX
#define HEADER_PINGUS_FPS_COUNTER_HXX
+#include <ClanLib/Dislpay/font.h>
#include "gui/display.hxx"
-class CL_Font;
-
namespace Pingus {
///
@@ -31,7 +30,7 @@
{
private:
/** The font... */
- CL_Font* font;
+ CL_Font font;
/** Used to know when the frame has changed */
bool odd_frame;
Index: global_event.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/global_event.cxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- global_event.cxx 20 Oct 2003 19:28:54 -0000 1.12
+++ global_event.cxx 21 Oct 2003 11:01:52 -0000 1.13
@@ -21,12 +21,15 @@
#include <stdio.h>
#include <algorithm>
#include <ClanLib/Display/keyboard.h>
+#include <ClanLib/Display/keys.h>
#include "screenshot.hxx"
#include "console.hxx"
#include "fps_counter.hxx"
#include "global_event.hxx"
#include "globals.hxx"
+namespace Pingus {
+
GlobalEvent global_event;
GlobalEvent::GlobalEvent ()
@@ -122,4 +125,6 @@
}
}
+} // namespace Pingus
+
/* EOF */
Index: globals.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/globals.cxx,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- globals.cxx 16 Aug 2003 20:51:28 -0000 1.16
+++ globals.cxx 21 Oct 2003 11:01:52 -0000 1.17
@@ -19,6 +19,8 @@
#include "globals.hxx"
+namespace Pingus {
+
int game_speed = 20;
bool print_fps = false;
int verbose = 0;
@@ -64,4 +66,6 @@
int pingus_debug_flags = 0;
+} // namespace Pingus
+
/* EOF */
Index: hurry_up.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/hurry_up.hxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- hurry_up.hxx 18 Oct 2003 23:17:27 -0000 1.9
+++ hurry_up.hxx 21 Oct 2003 11:01:52 -0000 1.10
@@ -32,7 +32,7 @@
class HurryUp : public GUI::Component
{
private:
- CL_Font* font;
+ CL_Font font;
bool is_running;
bool is_finished;
bool center_reached;
Index: indexed_canvas.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/indexed_canvas.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- indexed_canvas.hxx 19 Oct 2003 12:25:47 -0000 1.5
+++ indexed_canvas.hxx 21 Oct 2003 11:01:52 -0000 1.6
@@ -23,6 +23,8 @@
#include <ClanLib/Display/pixel_buffer.h>
#include <ClanLib/Display/palette.h>
+namespace Pingus {
+
/** This class is analog to CL_Canvas, but instead of being true
color, it is indexed */
class IndexedCanvas : public CL_PixelBuffer
@@ -67,6 +69,8 @@
IndexedCanvas& operator= (const IndexedCanvas&);
};
+} // namespace Pingus
+
#endif
/* EOF */
Index: loading.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/loading.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- loading.cxx 20 Oct 2003 19:28:54 -0000 1.8
+++ loading.cxx 21 Oct 2003 11:01:52 -0000 1.9
@@ -70,9 +70,11 @@
sur.draw((CL_Display::get_width() - sur.get_width())/2,
(CL_Display::get_height() - sur.get_height())/2);
+#ifdef CLANLIB_0_6
font.print_center(CL_Display::get_width() / 2,
CL_Display::get_height() - 130,
str.c_str());
+#endif
CL_Display::fill_rect(50, CL_Display::get_height() - 100,
CL_Display::get_width() - 50, CL_Display::get_height()
- 50,
Index: menu_button.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/menu_button.cxx,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- menu_button.cxx 18 Oct 2003 23:17:27 -0000 1.13
+++ menu_button.cxx 21 Oct 2003 11:01:52 -0000 1.14
@@ -64,7 +64,7 @@
if (mouse_over && !pressed)
{
gc.print_center(font, CL_Display::get_width() / 2,
- CL_Display::get_height() - font->get_height(),
+ CL_Display::get_height() - font.get_height(),
desc.c_str());
gc.draw(surface_p, x_pos - surface_p.get_width()/2,
@@ -73,12 +73,12 @@
if (line2.empty())
{
gc.print_center(font_large, x_pos + 32,
- y_pos - 32 - font_large->get_height()/2,
+ y_pos - 32 - font_large.get_height()/2,
line1.c_str());
}
else
{
- gc.print_center(font_large, x_pos + 32, y_pos - 32 -
(font_large->get_height() - 5),
+ gc.print_center(font_large, x_pos + 32, y_pos - 32 -
(font_large.get_height() - 5),
line1.c_str());
gc.print_center(font_large, x_pos + 32, y_pos - 32,
line2.c_str());
@@ -101,13 +101,13 @@
{
gc.print_center(font_large,
x_pos + 32,
- y_pos - 32 - font_large->get_height()/2,
+ y_pos - 32 - font_large.get_height()/2,
line1.c_str());
}
else
{
gc.print_center(font_large,
- x_pos + 32, y_pos - 32 - font_large->get_height(),
+ x_pos + 32, y_pos - 32 - font_large.get_height(),
line1.c_str());
gc.print_center(font_large, x_pos + 32, y_pos - 32,
line2.c_str());
@@ -132,7 +132,7 @@
SurfaceButton::on_pointer_enter ()
{
mouse_over = true;
- PingusSound::play_sound ("tick");
+ Sound::PingusSound::play_sound ("tick");
//std::cout << "X: " << this << "enter" << std::endl;
}
@@ -349,7 +349,7 @@
void
StoryButton::on_click ()
{
- PingusSound::play_sound ("letsgo");
+ Sound::PingusSound::play_sound ("letsgo");
bool story_seen = false;
StatManager::instance()->get_bool("story-seen", story_seen);
@@ -379,7 +379,7 @@
void
ThemeButton::on_click ()
{
- PingusSound::play_sound ("letsgo");
+ Sound::PingusSound::play_sound ("letsgo");
ThemeSelector theme_selector;
theme_selector.display();
Index: multiline_text.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/multiline_text.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- multiline_text.cxx 18 Oct 2003 23:17:27 -0000 1.8
+++ multiline_text.cxx 21 Oct 2003 11:01:52 -0000 1.9
@@ -40,6 +40,7 @@
void
MultiLineText::set_text(const std::string& str, int text_width)
{
+#ifdef CLANLIB_0_6
int last_pos;
assert(font);
@@ -82,6 +83,7 @@
width = Math::max(width, font->get_text_width(i->c_str()));
height = text.size() * font->get_height();
+#endif
}
void
@@ -93,7 +95,7 @@
i != text.end();
++i)
{
- font->print_left(x_pos, y_pos + y_inc, i->c_str());
+ font.draw(x_pos, y_pos + y_inc, i->c_str());
y_inc += font->get_height();
}
}
@@ -101,6 +103,7 @@
void
MultiLineText::print_right(int x_pos, int y_pos)
{
+#ifdef CLANLIB_0_6
int y_inc = 0;
for(std::vector<std::string>::iterator i = text.begin();
@@ -110,6 +113,7 @@
font->print_right(x_pos, y_pos + y_inc, i->c_str());
y_inc += font->get_height();
}
+#endif
}
void
Index: multiline_text.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/multiline_text.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- multiline_text.hxx 18 Oct 2003 23:17:27 -0000 1.7
+++ multiline_text.hxx 21 Oct 2003 11:01:52 -0000 1.8
@@ -21,17 +21,16 @@
#define HEADER_PINGUS_MULTILINE_TEXT_HXX
#include "pingus.hxx"
+#include <ClanLib/Display/font.h>
#include <string>
#include <vector>
-class CL_Font;
-
namespace Pingus {
class MultiLineText
{
private:
- CL_Font* font;
+ CL_Font font;
std::vector<std::string> text;
int width, height;
public:
Index: pingu.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingu.cxx,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- pingu.cxx 18 Oct 2003 23:17:27 -0000 1.44
+++ pingu.cxx 21 Oct 2003 11:01:52 -0000 1.45
@@ -315,7 +315,7 @@
die. */
if (rel_getpixel(0, -1) == Groundtype::GP_OUTOFSCREEN)
{
- PingusSound::play_sound("die");
+ Sound::PingusSound::play_sound("die");
status = PS_DEAD;
return;
}
Index: pingu_map.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingu_map.cxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- pingu_map.cxx 19 Oct 2003 12:25:47 -0000 1.9
+++ pingu_map.cxx 21 Oct 2003 11:01:52 -0000 1.10
@@ -49,12 +49,6 @@
}
void
-PinguMap::remove(const CL_Surface& sur, int x, int y)
-{
- remove(sur.get_provider(), x, y);
-}
-
-void
PinguMap::remove(const CL_PixelBuffer&, int, int)
{
@@ -66,12 +60,6 @@
}
-void
-PinguMap::put(const CL_Surface& sur, int x, int y)
-{
- put (sur.get_provider (), x, y);
-}
-
} // namespace Pingus
/* EOF */
Index: pingu_map.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingu_map.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- pingu_map.hxx 18 Oct 2003 23:17:27 -0000 1.7
+++ pingu_map.hxx 21 Oct 2003 11:01:52 -0000 1.8
@@ -49,9 +49,6 @@
virtual void remove(int, int) {};
virtual void remove(const CL_PixelBuffer&, int, int);
- virtual void remove(const CL_Surface&, int, int);
-
- virtual void put(const CL_Surface&, int, int);
virtual void put(const CL_PixelBuffer&, int, int);
private:
Index: pingus_counter.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingus_counter.hxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- pingus_counter.hxx 19 Oct 2003 12:25:47 -0000 1.12
+++ pingus_counter.hxx 21 Oct 2003 11:01:52 -0000 1.13
@@ -21,6 +21,7 @@
#define HEADER_PINGUS_PINGUS_COUNTER_HXX
#include <ClanLib/Display/surface.h>
+#include <ClanLib/Display/font.h>
#include "gui/component.hxx"
class CL_Font;
@@ -34,7 +35,7 @@
{
private:
Server* server;
- CL_Font* font;
+ CL_Font font;
CL_Surface background;
public:
PingusCounter(Server* s);
Index: pingus_counter_bar.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingus_counter_bar.cxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- pingus_counter_bar.cxx 20 Oct 2003 19:28:54 -0000 1.9
+++ pingus_counter_bar.cxx 21 Oct 2003 11:01:52 -0000 1.10
@@ -21,6 +21,7 @@
#include "pingus_counter_bar.hxx"
#include "pingu_holder.hxx"
#include "server.hxx"
+#include "display.hxx"
#include "world.hxx"
namespace Pingus {
@@ -51,20 +52,20 @@
int current_saved = server->get_world
()->get_pingus()->get_number_of_exited();
//std::cout << "Drawing Counterbar: " << rect << std::endl;
- CL_Display::fill_rect (rect.left, rect.top, rect.right, rect.bottom,
- 0.0, 0.0, 1.0, 0.5);
+ CL_Display::fill_rect (CL_Rect(rect.left, rect.top, rect.right, rect.bottom),
+ Display::to_color(0.0, 0.0, 1.0, 0.5));
int y_pos = rect.bottom;
int tmp_y_pos = y_pos;
y_pos -= (current_saved * length) / complete;
- CL_Display::fill_rect (rect.left, tmp_y_pos, rect.right, y_pos,
- 0.0f, 1.0f, 0.0f, 0.8f);
+ CL_Display::fill_rect (CL_Rect(rect.left, tmp_y_pos, rect.right, y_pos),
+ Display::to_color(0.0f, 1.0f, 0.0f, 0.8f));
tmp_y_pos = y_pos;
y_pos -= ((current_out - current_saved) * length) / complete;
- CL_Display::fill_rect (rect.left, tmp_y_pos, rect.right, y_pos,
- 1.0f, 0.0f, 0.0f, 0.8f);
+ CL_Display::fill_rect (CL_Rect(rect.left, tmp_y_pos, rect.right, y_pos),
+ Display::to_color(1.0f, 0.0f, 0.0f, 0.8f));
tmp_y_pos = y_pos;
}
Index: pingus_map_manager.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingus_map_manager.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- pingus_map_manager.cxx 19 Oct 2003 12:25:47 -0000 1.5
+++ pingus_map_manager.cxx 21 Oct 2003 11:01:52 -0000 1.6
@@ -21,6 +21,8 @@
#include <ClanLib/Display/pixel_buffer.h>
#include "pingus_map_manager.hxx"
+namespace Pingus {
+
std::string PingusMapManager::directory;
CL_Surface
@@ -33,6 +35,7 @@
void
PingusMapManager::set_surface (const std::string& level_filename, const
CL_Surface& surf)
{
+#ifdef CLANLIB_0_6
CL_PixelBuffer* provider = surf.get_provider ();
assert (provider);
@@ -44,6 +47,9 @@
provider->unlock ();
UNUSED_ARG(level_filename);
+#endif
}
+} // namespace Pingus
+
/* EOF */
Index: pingus_menu_manager.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingus_menu_manager.cxx,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- pingus_menu_manager.cxx 19 Oct 2003 12:25:47 -0000 1.27
+++ pingus_menu_manager.cxx 21 Oct 2003 11:01:52 -0000 1.28
@@ -23,6 +23,8 @@
#include "sound/sound.hxx"
#include "pingus_menu_manager.hxx"
+namespace Pingus {
+
PingusMenuManager* PingusMenuManager::instance_ = 0;
PingusMenuManager::PingusMenuManager ()
@@ -163,4 +165,6 @@
delete instance_;
}
+} // namespace Pingus
+
/* EOF */
Index: pingus_resource.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingus_resource.cxx,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- pingus_resource.cxx 18 Oct 2003 23:17:27 -0000 1.30
+++ pingus_resource.cxx 21 Oct 2003 11:01:52 -0000 1.31
@@ -39,7 +39,7 @@
std::map<std::string, CL_ResourceManager*> PingusResource::resource_map;
std::map<ResDescriptor, CL_Surface> PingusResource::surface_map;
-std::map<ResDescriptor, CL_Font*> PingusResource::font_map;
+std::map<ResDescriptor, CL_Font> PingusResource::font_map;
void
PingusResource::init()
Index: pingus_resource.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/pingus_resource.hxx,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- pingus_resource.hxx 20 Oct 2003 13:33:43 -0000 1.18
+++ pingus_resource.hxx 21 Oct 2003 11:01:52 -0000 1.19
@@ -24,7 +24,6 @@
#include <ClanLib/display.h>
#include "res_descriptor.hxx"
-class CL_Font;
class CL_ResourceManager;
namespace Pingus {
Index: playfield.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/playfield.cxx,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- playfield.cxx 19 Oct 2003 12:25:47 -0000 1.37
+++ playfield.cxx 21 Oct 2003 11:01:52 -0000 1.38
@@ -105,8 +105,8 @@
i != clipping_rectangles.end();
i++)
{
- CL_Display::fill_rect(i->x1, i->y1,
- i->x2 + 1, i->y2 + 1,
+ CL_Display::fill_rect(i->left, i->top,
+ i->right + 1, i->bottom + 1,
0.0, 0.0, 0.0, 1.0);
}
}
Index: playfield_view.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/playfield_view.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- playfield_view.cxx 19 Apr 2003 10:23:17 -0000 1.5
+++ playfield_view.cxx 21 Oct 2003 11:01:52 -0000 1.6
@@ -20,6 +20,8 @@
#include "playfield_view.hxx"
#include "world.hxx"
+namespace Pingus {
+
PlayfieldView::PlayfieldView (World * w, const CL_Rect& rect)
: gc (0, 0, 300, 300, 0, 0), // FIXME: broken
world (w), x_offset (0), y_offset (0)
@@ -57,4 +59,6 @@
pos.y - y1 - y_offset));
}
+} // namespace Pingus
+
/* EOF */
Index: savegame.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/savegame.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- savegame.hxx 20 Oct 2003 19:28:54 -0000 1.5
+++ savegame.hxx 21 Oct 2003 11:01:52 -0000 1.6
@@ -32,8 +32,8 @@
private:
public:
enum Status { FINISHED, // level is successfully finished
- ACCESSIBLE, // level is accessible and can be played
- NONE }; // level is not finished and cannot be accessed
+ ACCESSIBLE, // level is accessible and can be played
+ NONE }; // level is not finished and cannot be accessed
static std::string status_to_string (Status s);
static Status string_to_status (std::string s);
Index: theme_selector.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/theme_selector.cxx,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- theme_selector.cxx 18 Oct 2003 23:17:27 -0000 1.14
+++ theme_selector.cxx 21 Oct 2003 11:01:52 -0000 1.15
@@ -95,13 +95,13 @@
// ---=== ThemeSelector ===---
void
-ThemeSelector::Event::on_button_release(CL_InputDevice * /*device*/, const
CL_Key & /*key*/)
+ThemeSelector::Event::on_button_release(const CL_InputEvent& event)
{
if (!enabled) return;
}
void
-ThemeSelector::Event::on_button_press(CL_InputDevice *device, const CL_Key
&key)
+ThemeSelector::Event::on_button_press(const CL_InputEvent& event)
{
if (!enabled) return;
Index: theme_selector.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/theme_selector.hxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- theme_selector.hxx 19 Oct 2003 12:25:47 -0000 1.8
+++ theme_selector.hxx 21 Oct 2003 11:01:52 -0000 1.9
@@ -83,9 +83,9 @@
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);
+ virtual void on_button_press(const CL_InputEvent& event);
+ virtual void on_button_release(const CL_InputEvent& event);
+ virtual void on_mouse_move(const CL_InputEvent& event);
private:
Event (const Event&);
Index: time_display.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/time_display.cxx,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- time_display.cxx 20 Oct 2003 13:33:43 -0000 1.17
+++ time_display.cxx 21 Oct 2003 11:01:52 -0000 1.18
@@ -32,6 +32,8 @@
#include "fonts.hxx"
#include "string_converter.hxx"
+namespace Pingus {
+
TimeDisplay::TimeDisplay (Client* c)
: server(c->get_server()),
infinity_symbol(PingusResource::load_surface("misc/infinity", "core"))
@@ -69,4 +71,6 @@
UNUSED_ARG(gc);
}
+} // namespace Pingus
+
/* EOF */
Index: time_display.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/time_display.hxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- time_display.hxx 20 Oct 2003 19:28:55 -0000 1.12
+++ time_display.hxx 21 Oct 2003 11:01:52 -0000 1.13
@@ -24,6 +24,9 @@
#include "gui/component.hxx"
class CL_Font;
+
+namespace Pingus {
+
class Server;
class Client;
@@ -45,6 +48,8 @@
TimeDisplay& operator= (const TimeDisplay&);
};
+} // namespace Pingus
+
#endif
/* EOF */
Index: world.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/world.cxx,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- world.cxx 18 Oct 2003 23:17:27 -0000 1.46
+++ world.cxx 21 Oct 2003 11:01:52 -0000 1.47
@@ -219,7 +219,7 @@
void
World::armageddon(void)
{
- PingusSound::play_sound ("goodidea");
+ Sound::PingusSound::play_sound ("goodidea");
do_armageddon = true;
armageddon_count = 0;
}
@@ -257,11 +257,11 @@
if (panning < -1.0f)
panning = -1.0f;
- PingusSound::play_sound(name, volume, panning);
+ Sound::PingusSound::play_sound(name, volume, panning);
}
else // No view available, so no stereo enabled
{
- PingusSound::play_sound(name, volume);
+ Sound::PingusSound::play_sound(name, volume);
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src Makefile.am, 1.155, 1.156 action_button.cxx, 1.34, 1.35 action_button.hxx, 1.19, 1.20 action_holder.cxx, 1.13, 1.14 alpha_button.cxx, 1.6, 1.7 alpha_button.hxx, 1.7, 1.8 blitter.cxx, 1.32, 1.33 blitter_impl.hxx, 1.14, 1.15 button_panel.cxx, 1.26, 1.27 button_panel.hxx, 1.19, 1.20 capture_rectangle.cxx, 1.15, 1.16 capture_rectangle.hxx, 1.8, 1.9 client.cxx, 1.49, 1.50 client.hxx, 1.29, 1.30 col_map.cxx, 1.21, 1.22 col_map.hxx, 1.13, 1.14 console.cxx, 1.17, 1.18 credits.cxx, 1.40, 1.41 exit_menu.cxx, 1.22, 1.23 fade_out.cxx, 1.10, 1.11 fps_counter.hxx, 1.8, 1.9 global_event.cxx, 1.12, 1.13 globals.cxx, 1.16, 1.17 hurry_up.hxx, 1.9, 1.10 indexed_canvas.hxx, 1.5, 1.6 loading.cxx, 1.8, 1.9 menu_button.cxx, 1.13, 1.14 multiline_text.cxx, 1.8, 1.9 multiline_text.hxx, 1.7, 1.8 pingu.cxx, 1.44, 1.45 pingu_map.cxx, 1.9, 1.10 pingu_map.hxx, 1.7, 1.8 pingus_counter.hxx, 1.12, 1.13 pingus_counter_bar.cxx, 1.9, 1.10 pingus_map_manager.cxx, 1.5, 1.6 pingus_menu_manager.cxx, 1.27, 1.28 pingus_resource.cxx, 1.30, 1.31 pingus_resource.hxx, 1.18, 1.19 playfield.cxx, 1.37, 1.38 playfield_view.cxx, 1.5, 1.6 savegame.hxx, 1.5, 1.6 theme_selector.cxx, 1.14, 1.15 theme_selector.hxx, 1.8, 1.9 time_display.cxx, 1.17, 1.18 time_display.hxx, 1.12, 1.13 world.cxx, 1.46, 1.47,
Ingo Ruhnke <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src/sound slot_manager.cxx, 1.2, 1.3 slot_manager.hxx, 1.2, 1.3 sound.cxx, 1.6, 1.7 sound.hxx, 1.3, 1.4 sound_dummy.hxx, 1.2, 1.3 sound_real.cxx, 1.10, 1.11 sound_real.hxx, 1.3, 1.4 sound_res_mgr.cxx, 1.4, 1.5 sounds.hxx, 1.2, 1.3
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src/actions basher.cxx, 1.30, 1.31 bomber.cxx, 1.35, 1.36 bridger.cxx, 1.32, 1.33 digger.cxx, 1.25, 1.26 exiter.cxx, 1.19, 1.20 miner.cxx, 1.24, 1.25
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src/sound slot_manager.cxx, 1.2, 1.3 slot_manager.hxx, 1.2, 1.3 sound.cxx, 1.6, 1.7 sound.hxx, 1.3, 1.4 sound_dummy.hxx, 1.2, 1.3 sound_real.cxx, 1.10, 1.11 sound_real.hxx, 1.3, 1.4 sound_res_mgr.cxx, 1.4, 1.5 sounds.hxx, 1.2, 1.3
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src/actions basher.cxx, 1.30, 1.31 bomber.cxx, 1.35, 1.36 bridger.cxx, 1.32, 1.33 digger.cxx, 1.25, 1.26 exiter.cxx, 1.19, 1.20 miner.cxx, 1.24, 1.25
- Index(es):