[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/worldobjs conveyor_belt.cxx,1.8,1.9 c
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/worldobjs conveyor_belt.cxx,1.8,1.9 conveyor_belt.hxx,1.6,1.7 guillotine.cxx,1.1,1.2 guillotine.hxx,1.1,1.2 ice_block.cxx,1.9,1.10 ice_block.hxx,1.7,1.8 info_box.cxx,1.5,1.6 info_box.hxx,1.7,1.8 |
Date: |
4 Sep 2002 19:40:22 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src/worldobjs
In directory dark:/tmp/cvs-serv28686/worldobjs
Modified Files:
conveyor_belt.cxx conveyor_belt.hxx guillotine.cxx
guillotine.hxx ice_block.cxx ice_block.hxx info_box.cxx
info_box.hxx
Log Message:
some more GC adds
Index: conveyor_belt.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/conveyor_belt.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- conveyor_belt.cxx 4 Sep 2002 14:55:13 -0000 1.8
+++ conveyor_belt.cxx 4 Sep 2002 19:40:20 -0000 1.9
@@ -18,6 +18,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <fstream>
+#include "../graphic_context.hxx"
#include "../col_map.hxx"
#include "../editor/editor_view.hxx"
#include "../world.hxx"
@@ -127,15 +128,18 @@
}
void
-ConveyorBelt::draw_offset (int x_of, int y_of, float /*s*/)
+ConveyorBelt::draw (GraphicContext& gc)
{
- left_sur.put_screen (int(pos.x + x_of), int(pos.y + y_of), int(counter));
+ gc.draw(left_sur, pos, int(counter));
for (int i=0; i < width; ++i)
- middle_sur.put_screen (int(pos.x + left_sur.get_width () +
i*middle_sur.get_width () + x_of),
- int(pos.y + y_of),
- int(counter));
- right_sur.put_screen (int(pos.x + left_sur.get_width () +
width*middle_sur.get_width () + x_of),
- int(pos.y + y_of), int(counter));
+ gc.draw(middle_sur,
+ int(pos.x + left_sur.get_width () + i * middle_sur.get_width ()),
+ int(pos.y),
+ int(counter));
+
+ gc.draw(right_sur,
+ int(pos.x + left_sur.get_width () + width*middle_sur.get_width ()),
+ int(pos.y), int(counter));
}
void
Index: conveyor_belt.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/conveyor_belt.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- conveyor_belt.hxx 23 Aug 2002 15:49:57 -0000 1.6
+++ conveyor_belt.hxx 4 Sep 2002 19:40:20 -0000 1.7
@@ -61,7 +61,7 @@
public:
ConveyorBelt (WorldObjData*);
- void draw_offset (int x_of, int y_of, float s = 1.0);
+ void draw (GraphicContext& gc);
void draw_colmap();
void update(float delta);
float get_z_pos() const { return pos.z; }
Index: guillotine.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/guillotine.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- guillotine.cxx 4 Sep 2002 14:55:13 -0000 1.1
+++ guillotine.cxx 4 Sep 2002 19:40:20 -0000 1.2
@@ -17,6 +17,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#include "../graphic_context.hxx"
#include "guillotine.hxx"
#include "../pingus_resource.hxx"
#include "../pingu_holder.hxx"
@@ -48,18 +49,16 @@
}
void
- Guillotine::draw_offset (int x, int y, float s)
+ Guillotine::draw (GraphicContext& gc)
{
if (killing) {
if (data->direction.is_left())
- data->surface.put_screen(static_cast<int>(data->pos.x + x),
static_cast<int>(data->pos.y + y), data->counter);
+ gc.draw(data->surface, data->pos, data->counter);
else
- data->surface.put_screen(static_cast<int>(data->pos.x + x),
static_cast<int>(data->pos.y + y), data->counter + 12);
+ gc.draw (data->surface, data->pos, data->counter + 12);
} else {
- data->idle_surf.put_screen(static_cast<int>(data->pos.x + x),
static_cast<int>(data->pos.y + y), data->idle_counter);
- }
-
- UNUSED_ARG(s);
+ gc.draw (data->idle_surf, data->pos, data->idle_counter);
+ }
}
Index: guillotine.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/guillotine.hxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- guillotine.hxx 4 Sep 2002 14:55:13 -0000 1.1
+++ guillotine.hxx 4 Sep 2002 19:40:20 -0000 1.2
@@ -44,8 +44,7 @@
float get_z_pos () const;
void update (float delta);
- void draw_offset (int x, int y, float s);
-
+ void draw (GraphicContext& gc);
protected:
void catch_pingu (Pingu*);
Index: ice_block.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/ice_block.cxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- ice_block.cxx 4 Sep 2002 14:55:13 -0000 1.9
+++ ice_block.cxx 4 Sep 2002 19:40:20 -0000 1.10
@@ -18,6 +18,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <fstream>
+#include "../graphic_context.hxx"
#include "../col_map.hxx"
#include "../world.hxx"
#include "../pingu_holder.hxx"
@@ -101,13 +102,12 @@
///
void
-IceBlock::draw_offset(int x_of, int y_of, float /*s*/)
+IceBlock::draw (GraphicContext& gc)
{
if (is_finished)
return;
- block_sur.put_screen (int(pos.x + x_of), int(pos.y + y_of),
- (int)((1.0 - thickness) * (block_sur.get_num_frames ()
- 1)));
+ gc.draw (block_sur, pos, (int)((1.0 - thickness) * (block_sur.get_num_frames
() - 1)));
}
///
Index: ice_block.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/ice_block.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- ice_block.hxx 23 Aug 2002 15:49:57 -0000 1.7
+++ ice_block.hxx 4 Sep 2002 19:40:20 -0000 1.8
@@ -65,7 +65,7 @@
float get_z_pos () const { return 100; }
void draw_colmap ();
- void draw_offset (int x, int y, float s = 1.0);
+ void draw (GraphicContext& gc);
void update (float delta);
private:
Index: info_box.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/info_box.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- info_box.cxx 23 Aug 2002 15:49:57 -0000 1.5
+++ info_box.cxx 4 Sep 2002 19:40:20 -0000 1.6
@@ -20,6 +20,7 @@
#include <fstream>
#include <ClanLib/Display/Font/font.h>
#include <ClanLib/Display/Display/display.h>
+#include "../graphic_context.hxx"
#include "../pingu_holder.hxx"
#include "../world.hxx"
#include "../pingus_resource.hxx"
@@ -115,8 +116,11 @@
}
void
-InfoBox::draw_offset (int x, int y, float /*s*/)
+InfoBox::draw (GraphicContext& gc)
{
+ int x = int(gc.get_x_offset () + (gc.get_width ()/2));
+ int y = int(gc.get_y_offset () + (gc.get_height ()/2));
+
int x_pos = int(pos.x) + x;
int y_pos = int(pos.y) + y - 100;
@@ -124,9 +128,8 @@
{
int width = font->get_text_width (info_text.c_str ());
int border = 6;
- CL_Display::draw_line (int(pos.x + x), int(pos.y + y),
- x_pos, y_pos, 0.0f, 1.0f, 0.0f, 1.0f);
- sprite.put_screen (pos + CL_Vector (x, y));
+ gc.draw_line (pos, pos + CL_Vector(x, y - 100), 0.0f, 1.0f, 0.0f, 1.0f);
+ gc.draw(sprite, pos);
CL_Display::fill_rect (x_pos - width/2 - border, y_pos - border,
x_pos + width/2 + border, y_pos + font->get_height
() + border,
0.0, 0.0, 0.0, 1.0);
@@ -134,7 +137,7 @@
}
else
{
- sprite.put_screen (pos + CL_Vector (x, y));
+ sprite.put_screen (pos);
}
}
Index: info_box.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/info_box.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- info_box.hxx 23 Aug 2002 15:49:57 -0000 1.7
+++ info_box.hxx 4 Sep 2002 19:40:20 -0000 1.8
@@ -61,7 +61,7 @@
public:
InfoBox (const InfoBoxData& data);
- void draw_offset (int x, int y, float s = 1.0);
+ void draw (GraphicContext& gc);
void update (float delta);
float get_z_pos() const { return pos.z; }
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/worldobjs conveyor_belt.cxx,1.8,1.9 conveyor_belt.hxx,1.6,1.7 guillotine.cxx,1.1,1.2 guillotine.hxx,1.1,1.2 ice_block.cxx,1.9,1.10 ice_block.hxx,1.7,1.8 info_box.cxx,1.5,1.6 info_box.hxx,1.7,1.8,
grumbel <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src/backgrounds surface_background.cxx,1.5,1.6 surface_background.hxx,1.5,1.6
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src Makefile.am,1.93,1.94 client.cxx,1.18,1.19 col_map.cxx,1.6,1.7 col_map.hxx,1.5,1.6 entrance.cxx,1.4,1.5 entrance.hxx,1.3,1.4 exit.cxx,1.5,1.6 exit.hxx,1.3,1.4 hotspot.cxx,1.2,1.3 hotspot.hxx,1.3,1.4 liquid.cxx,1.3,1.4 liquid.hxx,1.3,1.4 pingu_map.cxx,1.1,1.2 pingu_map.hxx,1.3,1.4 playfield_view.cxx,1.1,1.2 playfield_view.hxx,1.4,1.5 spot_map.cxx,1.9,1.10 spot_map.hxx,1.4,1.5 view.cxx,1.8,1.9 view.hxx,1.7,1.8 world.cxx,1.20,1.21 world.hxx,1.9,1.10 worldobj.cxx,1.5,1.6 bmp_map.cxx,1.2,NONE bmp_map.hxx,1.3,NONE
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src/backgrounds surface_background.cxx,1.5,1.6 surface_background.hxx,1.5,1.6
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src Makefile.am,1.93,1.94 client.cxx,1.18,1.19 col_map.cxx,1.6,1.7 col_map.hxx,1.5,1.6 entrance.cxx,1.4,1.5 entrance.hxx,1.3,1.4 exit.cxx,1.5,1.6 exit.hxx,1.3,1.4 hotspot.cxx,1.2,1.3 hotspot.hxx,1.3,1.4 liquid.cxx,1.3,1.4 liquid.hxx,1.3,1.4 pingu_map.cxx,1.1,1.2 pingu_map.hxx,1.3,1.4 playfield_view.cxx,1.1,1.2 playfield_view.hxx,1.4,1.5 spot_map.cxx,1.9,1.10 spot_map.hxx,1.4,1.5 view.cxx,1.8,1.9 view.hxx,1.7,1.8 world.cxx,1.20,1.21 world.hxx,1.9,1.10 worldobj.cxx,1.5,1.6 bmp_map.cxx,1.2,NONE bmp_map.hxx,1.3,NONE
- Index(es):