[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.4,
From: |
Ingo Ruhnke |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/gui buffer_graphic_context.cxx, 1.4, 1.5 display_graphic_context.cxx, 1.9, 1.10 graphic_context.hxx, 1.7, 1.8 |
Date: |
Mon, 20 Oct 2003 15:33:46 +0200 |
Update of /var/lib/cvs/Games/Pingus/src/gui
In directory dark:/tmp/cvs-serv18306/gui
Modified Files:
buffer_graphic_context.cxx display_graphic_context.cxx
graphic_context.hxx
Log Message:
- some namespace and CL0.7 stuff
Index: buffer_graphic_context.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/gui/buffer_graphic_context.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- buffer_graphic_context.cxx 19 Oct 2003 12:25:47 -0000 1.4
+++ buffer_graphic_context.cxx 20 Oct 2003 13:33:43 -0000 1.5
@@ -18,6 +18,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <iostream>
+#include <ClanLib/display.h>
#include "../pingus_error.hxx"
#include "../blitter.hxx"
#include "../canvas.hxx"
@@ -62,6 +63,7 @@
void
BufferGraphicContext::draw (CL_Surface& sur, int x_pos, int y_pos, int frame)
{
+#ifdef CLANLIB_0_6
//std::cout << "BufferGraphicContext: " << x_pos << ", " << y_pos << "
frame: " << frame << std::endl;
try {
Blitter::put_surface(canvas, sur.get_provider(), x_pos, y_pos);
@@ -69,6 +71,7 @@
std::cout << "BufferGraphicContext: " << err.get_message() << std::endl;
}
UNUSED_ARG(frame);
+#endif
}
void
@@ -87,10 +90,12 @@
void
BufferGraphicContext::write(const std::string& filename)
{
+#ifdef CLANLIB_0_6
std::cout << "BufferGraphicContext::write: " << filename << std::endl;
canvas->lock();
Screenshot::save_target_to_file(canvas, filename);
canvas->unlock();
+#endif
}
} // namespace Pingus
Index: display_graphic_context.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/gui/display_graphic_context.cxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- display_graphic_context.cxx 19 Oct 2003 12:25:47 -0000 1.9
+++ display_graphic_context.cxx 20 Oct 2003 13:33:44 -0000 1.10
@@ -217,16 +217,16 @@
{
CL_Display::draw_line(w2s_x(x1), w2s_y(y1),
w2s_x(x2), w2s_y(y2),
- r, g, b, a);
+ Display::to_color(r, g, b, a));
}
void
DisplayGraphicContext::draw_fillrect (int x1, int y1, int x2, int y2,
float r, float g, float b, float a)
{
- CL_Display::fill_rect(w2s_x(x1), w2s_y(y1),
- w2s_x(x2), w2s_y(y2),
- r, g, b, a);
+ CL_Display::fill_rect(CL_Rect(w2s_x(x1), w2s_y(y1),
+ w2s_x(x2), w2s_y(y2)),
+ Display::to_color(r, g, b, a));
}
void
@@ -276,13 +276,17 @@
void
DisplayGraphicContext::print_center (CL_Font font, int x_pos, int y_pos, const
std::string& str)
{
+#ifdef CLANLIB_0_6
font.print_center(w2s_x(x_pos), w2s_y(y_pos), str.c_str ());
+#endif
}
void
DisplayGraphicContext::print_right (CL_Font font, int x_pos, int y_pos, const
std::string& str)
{
+#ifdef CLANLIB_0_6
font->print_right(w2s_x(x_pos), w2s_y(y_pos), str.c_str ());
+#endif
}
} // namespace Pingus
Index: graphic_context.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/gui/graphic_context.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- graphic_context.hxx 19 Oct 2003 12:25:47 -0000 1.7
+++ graphic_context.hxx 20 Oct 2003 13:33:44 -0000 1.8
@@ -69,6 +69,7 @@
virtual void clear (float r, float g, float b) =0;
virtual void draw (CL_Sprite& sprite, const Vector& pos);
+ virtual void draw (CL_Sprite& sprite, const Vector& pos, int frame);
virtual void draw (Sprite& sprite, const Vector& pos);
virtual void draw (Sprite& sprite, const Vector& pos, int frame);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/gui buffer_graphic_context.cxx, 1.4, 1.5 display_graphic_context.cxx, 1.9, 1.10 graphic_context.hxx, 1.7, 1.8,
Ingo Ruhnke <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src/input/buttons double_button.cxx, 1.2, 1.3 double_button.hxx, 1.4, 1.5 joystick_button.cxx, 1.4, 1.5 joystick_button.hxx, 1.4, 1.5 key_button.cxx, 1.4, 1.5 key_button.hxx, 1.7, 1.8 mouse_button.cxx, 1.4, 1.5 mouse_button.hxx, 1.6, 1.7 multiple_button.cxx, 1.2, 1.3 multiple_button.hxx, 1.4, 1.5 triple_button.cxx, 1.2, 1.3 triple_button.hxx, 1.4, 1.5
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src/input/axes Makefile.am, 1.4, 1.5 button_axis.cxx, 1.6, 1.7 button_axis.hxx, 1.5, 1.6 joystick_axis.cxx, 1.3, 1.4 joystick_axis.hxx, 1.4, 1.5
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src/input/buttons double_button.cxx, 1.2, 1.3 double_button.hxx, 1.4, 1.5 joystick_button.cxx, 1.4, 1.5 joystick_button.hxx, 1.4, 1.5 key_button.cxx, 1.4, 1.5 key_button.hxx, 1.7, 1.8 mouse_button.cxx, 1.4, 1.5 mouse_button.hxx, 1.6, 1.7 multiple_button.cxx, 1.2, 1.3 multiple_button.hxx, 1.4, 1.5 triple_button.cxx, 1.2, 1.3 triple_button.hxx, 1.4, 1.5
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src/input/axes Makefile.am, 1.4, 1.5 button_axis.cxx, 1.6, 1.7 button_axis.hxx, 1.5, 1.6 joystick_axis.cxx, 1.3, 1.4 joystick_axis.hxx, 1.4, 1.5
- Index(es):