[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/worldobjs liquid.cxx,1.4,1.5 liquid.h
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/worldobjs liquid.cxx,1.4,1.5 liquid.hxx,1.3,1.4 |
Date: |
1 Dec 2002 17:45:24 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src/worldobjs
In directory dark:/tmp/cvs-serv15977/worldobjs
Modified Files:
liquid.cxx liquid.hxx
Log Message:
- more old cruft removed
Index: liquid.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/liquid.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- liquid.cxx 12 Oct 2002 13:02:30 -0000 1.4
+++ liquid.cxx 1 Dec 2002 17:45:22 -0000 1.5
@@ -28,13 +28,10 @@
Liquid::Liquid (const WorldObjsData::LiquidData& data_) :
data(new WorldObjsData::LiquidData(data_)),
- sur(PingusResource::load_surface(data->desc.res_name, "global"))
+ sur(data->desc, data->speed)
{
if (!data->old_width_handling)
data->width *= sur.get_width();
-
- counter.set_size(sur.get_num_frames());
- counter.set_speed(data->speed);
}
Liquid::~Liquid ()
@@ -66,9 +63,13 @@
for(int x = static_cast<int>(data->pos.x);
x < data->pos.x + data->width;
x += sur.get_width())
- gc.draw(sur, x, static_cast<int>(data->pos.y), static_cast<int>(counter));
-
- ++counter;
+ gc.draw(sur, Vector(x, data->pos.y));
+}
+
+void
+Liquid::update(float delta)
+{
+ sur.update(delta);
}
} // namespace WorldObjs
Index: liquid.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/liquid.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- liquid.hxx 27 Sep 2002 18:36:41 -0000 1.3
+++ liquid.hxx 1 Dec 2002 17:45:22 -0000 1.4
@@ -20,8 +20,7 @@
#ifndef HEADER_PINGUS_WORLDOBJS_LIQUID_HXX
#define HEADER_PINGUS_WORLDOBJS_LIQUID_HXX
-#include <ClanLib/Display/Display/surface.h>
-#include "../anim_counter.hxx"
+#include "../sprite.hxx"
#include "../worldobj.hxx"
namespace WorldObjsData {
@@ -34,8 +33,7 @@
{
private:
WorldObjsData::LiquidData* const data;
- CL_Surface sur;
- AnimCounter counter;
+ Sprite sur;
public:
CL_Surface colmap_sur;
@@ -46,6 +44,7 @@
float get_z_pos () const;
void on_startup();
void draw (GraphicContext& gc);
+ void update(float delta);
private:
Liquid (const Liquid&);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/worldobjs liquid.cxx,1.4,1.5 liquid.hxx,1.3,1.4,
grumbel <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src Makefile.am,1.122,1.123 config.cxx,1.8,1.9 pingus_main.cxx,1.37,1.38 sound_real.hxx,1.7,1.8 theme.cxx,1.9,1.10 audio.cxx,1.1,NONE audio.hxx,1.3,NONE message_box.cxx,1.2,NONE message_box.hxx,1.5,NONE music_provider.cxx,1.3,NONE music_provider.hxx,1.4,NONE
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src Makefile.am,1.123,1.124 action_button.cxx,1.21,1.22 action_button.hxx,1.15,1.16 button_panel.hxx,1.15,1.16 anim_counter.cxx,1.1,NONE anim_counter.hxx,1.4,NONE
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src Makefile.am,1.122,1.123 config.cxx,1.8,1.9 pingus_main.cxx,1.37,1.38 sound_real.hxx,1.7,1.8 theme.cxx,1.9,1.10 audio.cxx,1.1,NONE audio.hxx,1.3,NONE message_box.cxx,1.2,NONE message_box.hxx,1.5,NONE music_provider.cxx,1.3,NONE music_provider.hxx,1.4,NONE
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src Makefile.am,1.123,1.124 action_button.cxx,1.21,1.22 action_button.hxx,1.15,1.16 button_panel.hxx,1.15,1.16 anim_counter.cxx,1.1,NONE anim_counter.hxx,1.4,NONE
- Index(es):