[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/gui buffer_graphic_context.cxx, 1.2,
From: |
Ingo Ruhnke |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/gui buffer_graphic_context.cxx, 1.2, 1.3 buffer_graphic_context.hxx, 1.3, 1.4 button.hxx, 1.5, 1.6 component.hxx, 1.14, 1.15 cursor.cxx, 1.3, 1.4 cursor.hxx, 1.2, 1.3 display.cxx, 1.4, 1.5 display.hxx, 1.4, 1.5 display_graphic_context.cxx, 1.7, 1.8 display_graphic_context.hxx, 1.5, 1.6 game_delta.hxx, 1.2, 1.3 graphic_context.cxx, 1.1, 1.2 graphic_context.hxx, 1.5, 1.6 gui_manager.cxx, 1.21, 1.22 gui_screen.hxx, 1.2, 1.3 root_gui_manager.hxx, 1.6, 1.7 screen_manager.cxx, 1.10, 1.11 screen_manager.hxx, 1.6, 1.7 screen_ptr.cxx, 1.3, 1.4 screen_ptr.hxx, 1.2, 1.3 surface_button.cxx, 1.8, 1.9 surface_button.hxx, 1.8, 1.9 |
Date: |
Sun, 19 Oct 2003 01:17:31 +0200 |
Update of /var/lib/cvs/Games/Pingus/src/gui
In directory dark:/tmp/cvs-serv4053/gui
Modified Files:
buffer_graphic_context.cxx buffer_graphic_context.hxx
button.hxx component.hxx cursor.cxx cursor.hxx display.cxx
display.hxx display_graphic_context.cxx
display_graphic_context.hxx game_delta.hxx graphic_context.cxx
graphic_context.hxx gui_manager.cxx gui_screen.hxx
root_gui_manager.hxx screen_manager.cxx screen_manager.hxx
screen_ptr.cxx screen_ptr.hxx surface_button.cxx
surface_button.hxx
Log Message:
- bunch of little fixes for CL0.7, some parts are compilable, but still a bit
more todo
Index: buffer_graphic_context.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/gui/buffer_graphic_context.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- buffer_graphic_context.cxx 21 Aug 2003 20:52:23 -0000 1.2
+++ buffer_graphic_context.cxx 18 Oct 2003 23:17:28 -0000 1.3
@@ -23,6 +23,8 @@
#include "../screenshot.hxx"
#include "buffer_graphic_context.hxx"
+namespace Pingus {
+
BufferGraphicContext::BufferGraphicContext(int width, int height)
{
canvas = new CL_Canvas(width, height);
@@ -88,4 +90,6 @@
canvas->unlock();
}
+} // namespace Pingus
+
/* EOF */
Index: buffer_graphic_context.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/gui/buffer_graphic_context.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- buffer_graphic_context.hxx 21 Aug 2003 20:52:23 -0000 1.3
+++ buffer_graphic_context.hxx 18 Oct 2003 23:17:28 -0000 1.4
@@ -24,14 +24,17 @@
#include "../vector.hxx"
#include <ClanLib/Core/Math/rect.h>
#include <ClanLib/Display/SurfaceProviders/canvas.h>
+#include <ClanLib/Display/font.h>
#include "graphic_context.hxx"
-class Sprite;
class CL_Surface;
class CL_Font;
class CL_Canvas;
-typedef CL_Font* FontHandle;
+namespace Pingus {
+
+class Sprite;
+typedef CL_Font FontHandle;
/** Abstract interface */
class BufferGraphicContext : public GraphicContext
@@ -90,6 +93,8 @@
void write(const std::string& filename);
};
+} // namespace Pingus
+
#endif
/* EOF */
Index: button.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/gui/button.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- button.hxx 19 Apr 2003 10:23:18 -0000 1.5
+++ button.hxx 18 Oct 2003 23:17:28 -0000 1.6
@@ -22,22 +22,24 @@
#include "../pingus.hxx"
-namespace GUI
+namespace Pingus {
+namespace GUI {
+class Button
{
- class Button
- {
- protected:
- bool pressed;
- bool mouse_over;
+protected:
+ bool pressed;
+ bool mouse_over;
- public:
- void on_primary_button_press (int x, int y);
- void on_primary_button_release (int x, int y);
+public:
+ void on_primary_button_press (int x, int y);
+ void on_primary_button_release (int x, int y);
- void on_pointer_enter ();
- void on_pointer_leave ();
- };
-}
+ void on_pointer_enter ();
+ void on_pointer_leave ();
+};
+
+} // namespace GUI
+} // namespace Pingus
#endif
Index: component.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/gui/component.hxx,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- component.hxx 19 Apr 2003 10:23:18 -0000 1.14
+++ component.hxx 18 Oct 2003 23:17:28 -0000 1.15
@@ -24,8 +24,8 @@
class GraphicContext;
-namespace GUI
-{
+namespace Pingus {
+namespace GUI {
/** A component represents an area which recivies events in the GUI,
some people might call it a widget */
@@ -83,6 +83,7 @@
};
} // namespace GUI
+} // namespace Pingus
#endif
Index: cursor.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/gui/cursor.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- cursor.cxx 19 Apr 2003 10:23:18 -0000 1.3
+++ cursor.cxx 18 Oct 2003 23:17:28 -0000 1.4
@@ -21,6 +21,8 @@
#include "../input/pointer.hxx"
#include "cursor.hxx"
+namespace Pingus {
+
Cursor::Cursor (std::string ident, std::string datafile)
: sprite (ident, datafile, 15.0f)
{
@@ -41,8 +43,10 @@
Cursor::on_event()
{
const Input::Pointer* pointer =
Input::Controller::get_current()->get_pointer();
- sprite.put_screen (static_cast<int>(pointer->get_x_pos ()),
- static_cast<int>(pointer->get_y_pos ()));
+ sprite.draw(static_cast<int>(pointer->get_x_pos ()),
+ static_cast<int>(pointer->get_y_pos ()));
}
+} // namespace Pingus
+
/* EOF */
Index: cursor.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/gui/cursor.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- cursor.hxx 19 Apr 2003 10:23:18 -0000 1.2
+++ cursor.hxx 18 Oct 2003 23:17:28 -0000 1.3
@@ -24,6 +24,8 @@
#include "display.hxx"
#include "../sprite.hxx"
+namespace Pingus {
+
/** A simple mouse cursor class and stupid. We can't use the X11/win32
nativ mouse cursor because we want also to support non-mouse input
devices and because we want to support multiple cursors */
@@ -44,6 +46,8 @@
Cursor& operator= (const Cursor&);
};
+} // namespace Pingus
+
#endif
/* EOF */
Index: display.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/gui/display.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- display.cxx 18 Oct 2003 12:11:31 -0000 1.4
+++ display.cxx 18 Oct 2003 23:17:28 -0000 1.5
@@ -20,8 +20,7 @@
#include <algorithm>
#include <stdio.h>
#include <iostream>
-#include <ClanLib/Display/Display/display.h>
-#include <ClanLib/Display/Display/mousecursor.h>
+#include <ClanLib/Display/display.h>
#include "../globals.hxx"
#include "display.hxx"
@@ -44,13 +43,22 @@
is_visible = !is_visible;
}
+CL_Color
+Display::to_color(float r, float g, float b, float a)
+{
+ return CL_Color(static_cast<int>(r*255),
+ static_cast<int>(g*255),
+ static_cast<int>(b*255),
+ static_cast<int>(a*255));
+}
+
void
Display::draw_rect(int x1, int y1, int x2, int y2, float r, float g, float b,
float a)
{
- CL_Display::draw_line(x1, y1, x2, y1, r, g, b, a);
- CL_Display::draw_line(x1, y2, x2, y2, r, g, b, a);
- CL_Display::draw_line(x1, y1, x1, y2, r, g, b, a);
- CL_Display::draw_line(x2, y1, x2, y2, r, g, b, a);
+ CL_Display::draw_line(x1, y1, x2, y1, to_color(r, g, b, a));
+ CL_Display::draw_line(x1, y2, x2, y2, to_color(r, g, b, a));
+ CL_Display::draw_line(x1, y1, x1, y2, to_color(r, g, b, a));
+ CL_Display::draw_line(x2, y1, x2, y2, to_color(r, g, b, a));
}
void
@@ -63,7 +71,7 @@
(*i)->on_event();
}
- CL_Display::flip_display(sync);
+ CL_Display::flip();
//CL_Display::put_display (CL_Rect (320, 0, 800, 600));
}
Index: display.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/gui/display.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- display.hxx 18 Oct 2003 12:11:31 -0000 1.4
+++ display.hxx 18 Oct 2003 23:17:28 -0000 1.5
@@ -21,6 +21,7 @@
#define HEADER_PINGUS_DISPLAY_HXX
#include "../pingus.hxx"
+#include <ClanLib/Display/color.h>
#include <list>
namespace Pingus {
@@ -53,6 +54,7 @@
private:
static std::list<DisplayHook*> display_hooks;
public:
+ static CL_Color to_color(float r, float g, float b, float a);
static void draw_rect(int x1, int y1, int x2, int y2, float r, float g,
float b, float a);
static void flip_display(bool sync=false);
Index: display_graphic_context.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/gui/display_graphic_context.cxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- display_graphic_context.cxx 18 Oct 2003 12:11:31 -0000 1.7
+++ display_graphic_context.cxx 18 Oct 2003 23:17:28 -0000 1.8
@@ -21,10 +21,13 @@
#include <ClanLib/Display/display.h>
#include <ClanLib/Display/font.h>
#include <config.h>
+#include "display.hxx"
#include "display_graphic_context.hxx"
#include "../math.hxx"
#include "../sprite.hxx"
+namespace Pingus {
+
DisplayGraphicContext::DisplayGraphicContext (int x1_, int y1_, int x2_, int
y2_,
int /*x_offset*/, int
/*y_offset*/)
: x1(x1_), y1(y1_), x2(x2_), y2(y2_), offset(-(x2_ - x1_) / 2.0f, -(y2_ -
x1_) / 2.0f, 1.0f)
@@ -79,13 +82,13 @@
{
CL_Rect rect;
- rect.x1 = Math::min (arg_rect.x1, arg_rect.x2);
- rect.x2 = Math::max (arg_rect.x1, arg_rect.x2);
- rect.y1 = Math::min (arg_rect.y1, arg_rect.y2);
- rect.y2 = Math::max (arg_rect.y1, arg_rect.y2);
+ rect.left = Math::min (arg_rect.left, arg_rect.right);
+ rect.right = Math::max (arg_rect.left, arg_rect.right);
+ rect.top = Math::min (arg_rect.top, arg_rect.bottom);
+ rect.bottom = Math::max (arg_rect.top, arg_rect.bottom);
- Vector pos1 = screen_to_world (Vector(rect.x1, rect.y1));
- Vector pos2 = screen_to_world (Vector(rect.x2, rect.y2));
+ Vector pos1 = screen_to_world (Vector(rect.left, rect.top));
+ Vector pos2 = screen_to_world (Vector(rect.right, rect.bottom));
Vector center_ = (pos2 + pos1) * 0.5f;
offset = -center_;
@@ -154,7 +157,7 @@
void
DisplayGraphicContext::clear (float r, float g, float b)
{
- CL_Display::clear_display(r, g, b);
+ CL_Display::clear(Display::to_color(r, g, b, 1.0f));
}
void
@@ -162,12 +165,12 @@
{
if (offset.z == 1.0)
{
- sur.put_screen(w2s_x(x_pos), w2s_y(y_pos));
+ sur.draw(w2s_x(x_pos), w2s_y(y_pos));
}
else
{
- sur.put_screen(w2s_x(x_pos), w2s_y(y_pos),
- offset.z, offset.z);
+ sur.draw(w2s_x(x_pos), w2s_y(y_pos),
+ offset.z, offset.z);
}
}
@@ -176,13 +179,13 @@
{
if (offset.z == 1.0)
{
- sur.put_screen (w2s_x(x_pos), w2s_y(y_pos), frame);
+ sur.draw(w2s_x(x_pos), w2s_y(y_pos), frame);
}
else
{
- sur.put_screen (w2s_x(x_pos), w2s_y(y_pos),
- offset.z, offset.z,
- frame);
+ sur.draw(w2s_x(x_pos), w2s_y(y_pos),
+ offset.z, offset.z,
+ frame);
}
}
@@ -190,9 +193,9 @@
DisplayGraphicContext::draw (CL_Surface& sur, int x_pos, int y_pos,
float size_x, float size_y, int frame)
{
- sur.put_screen (w2s_x(x_pos), w2s_y(y_pos),
- size_x * offset.z,
- size_y * offset.z, frame);
+ sur.draw(w2s_x(x_pos), w2s_y(y_pos),
+ size_x * offset.z,
+ size_y * offset.z, frame);
}
void
@@ -276,4 +279,6 @@
font->print_right(w2s_x(x_pos), w2s_y(y_pos), str.c_str ());
}
+} // namespace Pingus
+
/* EOF */
Index: display_graphic_context.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/gui/display_graphic_context.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- display_graphic_context.hxx 16 Aug 2003 20:51:28 -0000 1.5
+++ display_graphic_context.hxx 18 Oct 2003 23:17:28 -0000 1.6
@@ -26,6 +26,8 @@
#include "graphic_context.hxx"
+namespace Pingus {
+
/** A GraphicContext which represents the display and allows you to
paint on it */
class DisplayGraphicContext : public GraphicContext
@@ -131,6 +133,8 @@
DisplayGraphicContext& operator= (const DisplayGraphicContext&);
};
+} // namespace Pingus
+
#endif
/* EOF */
Index: game_delta.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/gui/game_delta.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- game_delta.hxx 19 Apr 2003 10:23:18 -0000 1.2
+++ game_delta.hxx 18 Oct 2003 23:17:28 -0000 1.3
@@ -24,6 +24,8 @@
#include "../delta_manager.hxx"
#include "../input/event_fwd.hxx"
+namespace Pingus {
+
/** Input for the game engine */
class GameDelta
{
@@ -61,6 +63,8 @@
GameDelta& operator= (const GameDelta&);
};
+} // namespace Pingus
+
#endif
/* EOF */
Index: graphic_context.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/gui/graphic_context.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- graphic_context.cxx 16 Aug 2003 20:52:38 -0000 1.1
+++ graphic_context.cxx 18 Oct 2003 23:17:28 -0000 1.2
@@ -17,9 +17,18 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#include <assert.h>
#include "../sprite.hxx"
#include "graphic_context.hxx"
+namespace Pingus {
+
+void
+GraphicContext::draw (CL_Sprite& sprite, const Vector& pos)
+{
+ assert(0);
+}
+
void
GraphicContext::draw (Sprite& sprite, const Vector& pos)
{
@@ -46,4 +55,6 @@
draw(sur, int(pos.x), int(pos.y));
}
+} // namespace Pingus
+
/* EOF */
Index: graphic_context.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/gui/graphic_context.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- graphic_context.hxx 16 Aug 2003 20:51:28 -0000 1.5
+++ graphic_context.hxx 18 Oct 2003 23:17:28 -0000 1.6
@@ -24,11 +24,13 @@
#include "../vector.hxx"
#include <ClanLib/Core/Math/rect.h>
-class Sprite;
class CL_Surface;
+class CL_Sprite;
class CL_Font;
-typedef CL_Font* FontHandle;
+namespace Pingus {
+
+class Sprite;
/** Abstract interface */
class GraphicContext
@@ -65,6 +67,8 @@
virtual void clear (float r, float g, float b) =0;
+ virtual void draw (CL_Sprite& sprite, const Vector& pos);
+
virtual void draw (Sprite& sprite, const Vector& pos);
virtual void draw (Sprite& sprite, const Vector& pos, int frame);
@@ -103,15 +107,17 @@
// Font handling routines
/** Print a text left aligned */
- virtual void print_left (FontHandle font, int x_pos, int y_pos, const
std::string& str) =0;
+ virtual void print_left (CL_Font font, int x_pos, int y_pos, const
std::string& str) =0;
/** Print a text centred to the given position */
- virtual void print_center (FontHandle font, int x_pos, int y_pos, const
std::string& str) =0;
+ virtual void print_center (CL_Font font, int x_pos, int y_pos, const
std::string& str) =0;
/** Print a text right aligned */
- virtual void print_right (FontHandle font, int x_pos, int y_pos, const
std::string& str) =0;
+ virtual void print_right (CL_Font font, int x_pos, int y_pos, const
std::string& str) =0;
};
+} // namespace Pingus
+
#endif
/* EOF */
Index: gui_manager.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/gui/gui_manager.cxx,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- gui_manager.cxx 19 Apr 2003 10:23:18 -0000 1.21
+++ gui_manager.cxx 18 Oct 2003 23:17:28 -0000 1.22
@@ -24,6 +24,8 @@
#include "gui_manager.hxx"
+namespace Pingus {
+
using namespace GUI;
using namespace Input;
@@ -265,4 +267,6 @@
UNUSED_ARG(time_stamp);
}
+} // namespace Pingus
+
/* EOF */
Index: gui_screen.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/gui/gui_screen.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- gui_screen.hxx 19 Apr 2003 10:23:18 -0000 1.2
+++ gui_screen.hxx 18 Oct 2003 23:17:28 -0000 1.3
@@ -22,13 +22,13 @@
#include "screen.hxx"
-namespace GUI
-{
+namespace Pingus {
+
+namespace GUI {
class GUIManager;
}
-namespace Input
-{
+namespace Input {
struct ButtonEvent;
}
@@ -71,6 +71,8 @@
GUIScreen& operator= (const GUIScreen&);
};
+} // namespace Pingus
+
#endif
/* EOF */
Index: root_gui_manager.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/gui/root_gui_manager.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- root_gui_manager.hxx 19 Apr 2003 10:23:18 -0000 1.6
+++ root_gui_manager.hxx 18 Oct 2003 23:17:28 -0000 1.7
@@ -22,32 +22,35 @@
#include "gui_manager.hxx"
-namespace Input
-{
- class Controller;
+namespace Pingus {
+
+namespace Input {
+class Controller;
}
-namespace GUI
+namespace GUI {
+
+/** Root GUI manager
+ */
+class RootGUIManager : public GUIManager
{
- /** Root GUI manager
- */
- class RootGUIManager : public GUIManager
- {
- private:
- Input::Controller* controller;
+private:
+ Input::Controller* controller;
- public:
- RootGUIManager (Input::Controller* c);
- ~RootGUIManager ();
+public:
+ RootGUIManager (Input::Controller* c);
+ ~RootGUIManager ();
- void update (float delta);
+ void update (float delta);
- private:
- RootGUIManager (const RootGUIManager&);
- RootGUIManager& operator= (const RootGUIManager&);
- };
+private:
+ RootGUIManager (const RootGUIManager&);
+ RootGUIManager& operator= (const RootGUIManager&);
+};
}
+} // namespace Pingus
+
#endif
/* EOF */
Index: screen_manager.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/gui/screen_manager.cxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- screen_manager.cxx 16 Aug 2003 20:51:28 -0000 1.10
+++ screen_manager.cxx 18 Oct 2003 23:17:28 -0000 1.11
@@ -18,8 +18,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <iostream>
-#include <ClanLib/Display/Display/display.h>
-#include <ClanLib/Display/Display/mousecursor.h>
+#include <ClanLib/display.h>
#include "../globals.hxx"
#include "cursor.hxx"
@@ -31,6 +30,8 @@
#include "../path_manager.hxx"
#include "../input/controller.hxx"
+namespace Pingus {
+
ScreenManager* ScreenManager::instance_ = 0;
ScreenManager::ScreenManager ()
@@ -64,7 +65,7 @@
{
cursor = new Cursor("cursors/animcross", "core");
Display::add_flip_screen_hook(cursor);
- CL_MouseCursor::hide();
+ //CL_MouseCursor::hide();
}
DeltaManager delta_manager;
@@ -256,10 +257,11 @@
int border_y = int((CL_Display::get_height ()/2) * (1.0f - progress));
old_screen->draw(*display_gc);
- CL_Display::push_clip_rect(CL_ClipRect (0 + border_x,
- 0 + border_y,
- CL_Display::get_width () -
border_x,
- CL_Display::get_height () -
border_y));
+ CL_Display::get_current_window()->get_gc()
+ ->push_cliprect(CL_Rect(0 + border_x,
+ 0 + border_y,
+ CL_Display::get_width () - border_x,
+ CL_Display::get_height () - border_y));
new_screen->draw(*display_gc);
//GameDelta delta (time_delta, CL_System::get_time(), events);
@@ -267,7 +269,7 @@
//new_screen->update (delta);
//old_screen->update (delta);
- CL_Display::pop_clip_rect ();
+ CL_Display::get_current_window()->get_gc()->pop_cliprect ();
Display::flip_display ();
CL_System::keep_alive ();
@@ -290,4 +292,6 @@
delete instance_;
}
+} // namespace Pingus
+
/* EOF */
Index: screen_manager.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/gui/screen_manager.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- screen_manager.hxx 18 Oct 2003 12:11:31 -0000 1.6
+++ screen_manager.hxx 18 Oct 2003 23:17:28 -0000 1.7
@@ -25,10 +25,10 @@
#include "screen_ptr.hxx"
-class GraphicContext;
namespace Pingus {
+
+class GraphicContext;
class Screen;
-} // namespace Pingus
class ScreenManager
{
@@ -95,6 +95,8 @@
ScreenManager& operator= (const ScreenManager&);
};
+} // namespace Pingus
+
#endif
/* EOF */
Index: screen_ptr.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/gui/screen_ptr.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- screen_ptr.cxx 19 Apr 2003 10:23:18 -0000 1.3
+++ screen_ptr.cxx 18 Oct 2003 23:17:28 -0000 1.4
@@ -21,6 +21,8 @@
#include <iostream>
#include "screen_ptr.hxx"
+namespace Pingus {
+
void
ScreenPtr::decrease_refcount()
{
@@ -54,4 +56,6 @@
}
}
+} // namespace Pingus
+
/* EOF */
Index: screen_ptr.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/gui/screen_ptr.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- screen_ptr.hxx 19 Apr 2003 10:23:18 -0000 1.2
+++ screen_ptr.hxx 18 Oct 2003 23:17:28 -0000 1.3
@@ -22,6 +22,8 @@
#include "screen.hxx"
+namespace Pingus {
+
/** The ScreenPtr is a simple smart pointer to point at a Screen. It
either deletes the pointer or not, depending on the value of
delete_it */
@@ -103,6 +105,8 @@
void increase_refcount();
};
+} // namespace Pingus
+
#endif
/* EOF */
Index: surface_button.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/gui/surface_button.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- surface_button.cxx 19 Apr 2003 10:23:18 -0000 1.8
+++ surface_button.cxx 18 Oct 2003 23:17:28 -0000 1.9
@@ -21,7 +21,9 @@
#include "graphic_context.hxx"
#include "surface_button.hxx"
-using namespace GUI;
+namespace Pingus {
+
+namespace GUI {
SurfaceButton::SurfaceButton (int arg_x_pos, int arg_y_pos,
const ResDescriptor& arg_button_surface,
@@ -98,4 +100,7 @@
UNUSED_ARG(y);
}
+} // namespace GUI
+} // namespace Pingus
+
/* EOF */
Index: surface_button.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/gui/surface_button.hxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- surface_button.hxx 19 Apr 2003 10:23:18 -0000 1.8
+++ surface_button.hxx 18 Oct 2003 23:17:28 -0000 1.9
@@ -25,8 +25,9 @@
class ResDescriptor;
-namespace GUI
-{
+namespace Pingus {
+namespace GUI {
+
/** A simple surface button, which different surfaces for pressed,
released and mouse over */
class SurfaceButton : public Component
@@ -62,7 +63,9 @@
SurfaceButton (const SurfaceButton&);
SurfaceButton& operator= (const SurfaceButton&);
};
-}
+
+} // namespace GUI
+} // namespace Pingus
#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/gui buffer_graphic_context.cxx, 1.2, 1.3 buffer_graphic_context.hxx, 1.3, 1.4 button.hxx, 1.5, 1.6 component.hxx, 1.14, 1.15 cursor.cxx, 1.3, 1.4 cursor.hxx, 1.2, 1.3 display.cxx, 1.4, 1.5 display.hxx, 1.4, 1.5 display_graphic_context.cxx, 1.7, 1.8 display_graphic_context.hxx, 1.5, 1.6 game_delta.hxx, 1.2, 1.3 graphic_context.cxx, 1.1, 1.2 graphic_context.hxx, 1.5, 1.6 gui_manager.cxx, 1.21, 1.22 gui_screen.hxx, 1.2, 1.3 root_gui_manager.hxx, 1.6, 1.7 screen_manager.cxx, 1.10, 1.11 screen_manager.hxx, 1.6, 1.7 screen_ptr.cxx, 1.3, 1.4 screen_ptr.hxx, 1.2, 1.3 surface_button.cxx, 1.8, 1.9 surface_button.hxx, 1.8, 1.9,
Ingo Ruhnke <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src/editorobjs bumper_obj.cxx, 1.10, 1.11 bumper_obj.hxx, 1.10, 1.11 conveyor_belt_obj.cxx, 1.8, 1.9 conveyor_belt_obj.hxx, 1.8, 1.9 entrance_obj.hxx, 1.4, 1.5 exit_obj.cxx, 1.2, 1.3 exit_obj.hxx, 1.3, 1.4 fake_exit_obj.cxx, 1.11, 1.12 fake_exit_obj.hxx, 1.11, 1.12 groundpiece_obj.cxx, 1.15, 1.16 groundpiece_obj.hxx, 1.5, 1.6 guillotine_obj.cxx, 1.10, 1.11 guillotine_obj.hxx, 1.10, 1.11 hammer_obj.cxx, 1.11, 1.12 hammer_obj.hxx, 1.10, 1.11 hotspot_obj.cxx, 1.3, 1.4 hotspot_obj.hxx, 1.6, 1.7 ice_block_obj.cxx, 1.7, 1.8 ice_block_obj.hxx, 1.6, 1.7 info_box_obj.cxx, 1.5, 1.6 info_box_obj.hxx, 1.7, 1.8 laser_exit_obj.cxx, 1.11, 1.12 laser_exit_obj.hxx, 1.10, 1.11 liquid_obj.cxx, 1.6, 1.7 liquid_obj.hxx, 1.6, 1.7 prefab_obj.cxx, 1.1, 1.2 prefab_obj.hxx, 1.4, 1.5 smasher_obj.cxx, 1.9, 1.10 smasher_obj.hxx, 1.11, 1.12 solid_color_background_obj.cxx, 1.7, 1.8 solid_color_background_obj.hxx, 1.7, 1.8 spike_obj.cxx, 1.11, 1.12 spike_obj.hxx, 1.11, 1.12 starfield_background_obj.cxx, 1.6, 1.7 starfield_background_obj.hxx, 1.7, 1.8 surface_background_obj.cxx, 1.10, 1.11 surface_background_obj.hxx, 1.7, 1.8 switch_door_obj.cxx, 1.8, 1.9 switch_door_obj.hxx, 1.8, 1.9 switch_door_switch_obj.cxx, 1.3, 1.4 switch_door_switch_obj.hxx, 1.5, 1.6 teleporter_obj.hxx, 1.10, 1.11 teleporter_target_obj.hxx, 1.5, 1.6 thunderstorm_background_obj.cxx, 1.3, 1.4 thunderstorm_background_obj.hxx, 1.5, 1.6
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src/actions angel.cxx, 1.18, 1.19 angel.hxx, 1.15, 1.16 basher.cxx, 1.29, 1.30 basher.hxx, 1.17, 1.18 blocker.cxx, 1.20, 1.21 blocker.hxx, 1.15, 1.16 boarder.cxx, 1.15, 1.16 boarder.hxx, 1.14, 1.15 bomber.cxx, 1.34, 1.35 bomber.hxx, 1.20, 1.21 bridger.cxx, 1.30, 1.31 bridger.hxx, 1.18, 1.19 climber.cxx, 1.22, 1.23 climber.hxx, 1.15, 1.16 digger.cxx, 1.24, 1.25 digger.hxx, 1.15, 1.16 drown.cxx, 1.14, 1.15 drown.hxx, 1.13, 1.14 exiter.cxx, 1.18, 1.19 exiter.hxx, 1.14, 1.15 faller.cxx, 1.40, 1.41 faller.hxx, 1.20, 1.21 floater.cxx, 1.24, 1.25 floater.hxx, 1.15, 1.16 jumper.cxx, 1.20, 1.21 jumper.hxx, 1.13, 1.14 laser_kill.cxx, 1.15, 1.16 laser_kill.hxx, 1.14, 1.15 miner.cxx, 1.23, 1.24 miner.hxx, 1.14, 1.15 rocket_launcher.cxx, 1.15, 1.16 rocket_launcher.hxx, 1.13, 1.14 slider.cxx, 1.18, 1.19 slider.hxx, 1.13, 1.14 smashed.cxx, 1.14, 1.15 smashed.hxx, 1.15, 1.16 splashed.cxx, 1.15, 1.16 splashed.hxx, 1.15, 1.16 superman.cxx, 1.12, 1.13 superman.hxx, 1.14, 1.15 teleported.cxx, 1.13, 1.14 teleported.hxx, 1.14, 1.15 waiter.cxx, 1.16, 1.17 waiter.hxx, 1.14, 1.15 walker.cxx, 1.33, 1.34 walker.hxx, 1.14, 1.15
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src/editorobjs bumper_obj.cxx, 1.10, 1.11 bumper_obj.hxx, 1.10, 1.11 conveyor_belt_obj.cxx, 1.8, 1.9 conveyor_belt_obj.hxx, 1.8, 1.9 entrance_obj.hxx, 1.4, 1.5 exit_obj.cxx, 1.2, 1.3 exit_obj.hxx, 1.3, 1.4 fake_exit_obj.cxx, 1.11, 1.12 fake_exit_obj.hxx, 1.11, 1.12 groundpiece_obj.cxx, 1.15, 1.16 groundpiece_obj.hxx, 1.5, 1.6 guillotine_obj.cxx, 1.10, 1.11 guillotine_obj.hxx, 1.10, 1.11 hammer_obj.cxx, 1.11, 1.12 hammer_obj.hxx, 1.10, 1.11 hotspot_obj.cxx, 1.3, 1.4 hotspot_obj.hxx, 1.6, 1.7 ice_block_obj.cxx, 1.7, 1.8 ice_block_obj.hxx, 1.6, 1.7 info_box_obj.cxx, 1.5, 1.6 info_box_obj.hxx, 1.7, 1.8 laser_exit_obj.cxx, 1.11, 1.12 laser_exit_obj.hxx, 1.10, 1.11 liquid_obj.cxx, 1.6, 1.7 liquid_obj.hxx, 1.6, 1.7 prefab_obj.cxx, 1.1, 1.2 prefab_obj.hxx, 1.4, 1.5 smasher_obj.cxx, 1.9, 1.10 smasher_obj.hxx, 1.11, 1.12 solid_color_background_obj.cxx, 1.7, 1.8 solid_color_background_obj.hxx, 1.7, 1.8 spike_obj.cxx, 1.11, 1.12 spike_obj.hxx, 1.11, 1.12 starfield_background_obj.cxx, 1.6, 1.7 starfield_background_obj.hxx, 1.7, 1.8 surface_background_obj.cxx, 1.10, 1.11 surface_background_obj.hxx, 1.7, 1.8 switch_door_obj.cxx, 1.8, 1.9 switch_door_obj.hxx, 1.8, 1.9 switch_door_switch_obj.cxx, 1.3, 1.4 switch_door_switch_obj.hxx, 1.5, 1.6 teleporter_obj.hxx, 1.10, 1.11 teleporter_target_obj.hxx, 1.5, 1.6 thunderstorm_background_obj.cxx, 1.3, 1.4 thunderstorm_background_obj.hxx, 1.5, 1.6
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src/actions angel.cxx, 1.18, 1.19 angel.hxx, 1.15, 1.16 basher.cxx, 1.29, 1.30 basher.hxx, 1.17, 1.18 blocker.cxx, 1.20, 1.21 blocker.hxx, 1.15, 1.16 boarder.cxx, 1.15, 1.16 boarder.hxx, 1.14, 1.15 bomber.cxx, 1.34, 1.35 bomber.hxx, 1.20, 1.21 bridger.cxx, 1.30, 1.31 bridger.hxx, 1.18, 1.19 climber.cxx, 1.22, 1.23 climber.hxx, 1.15, 1.16 digger.cxx, 1.24, 1.25 digger.hxx, 1.15, 1.16 drown.cxx, 1.14, 1.15 drown.hxx, 1.13, 1.14 exiter.cxx, 1.18, 1.19 exiter.hxx, 1.14, 1.15 faller.cxx, 1.40, 1.41 faller.hxx, 1.20, 1.21 floater.cxx, 1.24, 1.25 floater.hxx, 1.15, 1.16 jumper.cxx, 1.20, 1.21 jumper.hxx, 1.13, 1.14 laser_kill.cxx, 1.15, 1.16 laser_kill.hxx, 1.14, 1.15 miner.cxx, 1.23, 1.24 miner.hxx, 1.14, 1.15 rocket_launcher.cxx, 1.15, 1.16 rocket_launcher.hxx, 1.13, 1.14 slider.cxx, 1.18, 1.19 slider.hxx, 1.13, 1.14 smashed.cxx, 1.14, 1.15 smashed.hxx, 1.15, 1.16 splashed.cxx, 1.15, 1.16 splashed.hxx, 1.15, 1.16 superman.cxx, 1.12, 1.13 superman.hxx, 1.14, 1.15 teleported.cxx, 1.13, 1.14 teleported.hxx, 1.14, 1.15 waiter.cxx, 1.16, 1.17 waiter.hxx, 1.14, 1.15 walker.cxx, 1.33, 1.34 walker.hxx, 1.14, 1.15
- Index(es):