pingus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pingus-CVS] CVS: Games/Pingus/src/worldobjs bumper.cxx, 1.15, 1.16 conv


From: Ingo Ruhnke
Subject: [Pingus-CVS] CVS: Games/Pingus/src/worldobjs bumper.cxx, 1.15, 1.16 conveyor_belt.cxx, 1.24, 1.25 conveyor_belt.hxx, 1.19, 1.20 entrance.hxx, 1.6, 1.7 fake_exit.cxx, 1.15, 1.16 groundpiece.cxx, 1.4, 1.5 groundpiece.hxx, 1.8, 1.9 guillotine.cxx, 1.10, 1.11 ice_block.cxx, 1.23, 1.24 ice_block.hxx, 1.17, 1.18 info_box.cxx, 1.22, 1.23 laser_exit.cxx, 1.14, 1.15 liquid.cxx, 1.10, 1.11 liquid.hxx, 1.7, 1.8 smasher.cxx, 1.20, 1.21 solid_color_background.cxx, 1.6, 1.7 spike.cxx, 1.11, 1.12 starfield_background_stars.cxx, 1.9, 1.10 starfield_background_stars.hxx, 1.8, 1.9 surface_background.cxx, 1.12, 1.13 surface_background.hxx, 1.7, 1.8 switch_door.cxx, 1.25, 1.26 switch_door.hxx, 1.21, 1.22 thunderstorm_background.cxx, 1.6, 1.7 thunderstorm_background.hxx, 1.9, 1.10
Date: Mon, 20 Oct 2003 15:11:12 +0200

Update of /var/lib/cvs/Games/Pingus/src/worldobjs
In directory dark:/tmp/cvs-serv12729/worldobjs

Modified Files:
        bumper.cxx conveyor_belt.cxx conveyor_belt.hxx entrance.hxx 
        fake_exit.cxx groundpiece.cxx groundpiece.hxx guillotine.cxx 
        ice_block.cxx ice_block.hxx info_box.cxx laser_exit.cxx 
        liquid.cxx liquid.hxx smasher.cxx solid_color_background.cxx 
        spike.cxx starfield_background_stars.cxx 
        starfield_background_stars.hxx surface_background.cxx 
        surface_background.hxx switch_door.cxx switch_door.hxx 
        thunderstorm_background.cxx thunderstorm_background.hxx 
Log Message:
- replaced a few CL_Surfaces with CL_Sprite

Index: bumper.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldobjs/bumper.cxx,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- bumper.cxx  19 Oct 2003 12:25:47 -0000      1.15
+++ bumper.cxx  20 Oct 2003 13:11:09 -0000      1.16
@@ -18,7 +18,7 @@
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 #include <iostream>
-#include <ClanLib/Display/surfaceprovider.h>
+#include <ClanLib/Display/pixel_buffer.h>
 #include "../col_map.hxx"
 #include "../gui/graphic_context.hxx"
 #include "../pingu.hxx"
@@ -60,7 +60,7 @@
   if (upwards)
     {
       ++count;
-      if (count >= static_cast<int>(data->surface.get_num_frames()) )
+      if (count >= static_cast<int>(data->surface.get_frame_count()) )
        {
          count = 0;
          upwards = false;
@@ -73,7 +73,7 @@
 {
   std::cout << "Drawing colmap entry" << std::endl;
 
-  CL_SurfaceProvider* prov = CL_SurfaceProvider::load("Traps/bumper_cmap", 
PingusResource::get("traps"));
+  CL_PixelBuffer prov = 
PingusResource::load_surface_provider("Traps/bumper_cmap", "traps");
   world->get_colmap()->put(prov, static_cast<int>(data->pos.x), 
static_cast<int>(data->pos.y), Groundtype::GP_SOLID);
 }
 

Index: conveyor_belt.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldobjs/conveyor_belt.cxx,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- conveyor_belt.cxx   19 Oct 2003 12:25:47 -0000      1.24
+++ conveyor_belt.cxx   20 Oct 2003 13:11:09 -0000      1.25
@@ -31,9 +31,9 @@
 
 ConveyorBelt::ConveyorBelt (const WorldObjsData::ConveyorBeltData& data_)
   : data(new WorldObjsData::ConveyorBeltData(data_)),
-    left_sur  (PingusResource::load_surface ("conveyorbelt_left",   
"worldobjs")),
-    right_sur (PingusResource::load_surface ("conveyorbelt_right",  
"worldobjs")),
-    middle_sur(PingusResource::load_surface ("conveyorbelt_middle", 
"worldobjs"))
+    left_sur  (PingusResource::load_sprite ("conveyorbelt_left",   
"worldobjs")),
+    right_sur (PingusResource::load_sprite ("conveyorbelt_right",  
"worldobjs")),
+    middle_sur(PingusResource::load_sprite ("conveyorbelt_middle", 
"worldobjs"))
 {
 }
 
@@ -43,20 +43,21 @@
   gc.draw(left_sur, data->pos, static_cast<int>(data->counter));
   for (int i=0; i < data->width; ++i)
     gc.draw(middle_sur,
-           static_cast<int>(data->pos.x + left_sur.get_width() + i * 
middle_sur.get_width()),
-           static_cast<int>(data->pos.y),
+           Vector(static_cast<int>(data->pos.x + left_sur.get_width() + i * 
middle_sur.get_width()),
+                  static_cast<int>(data->pos.y)),
            static_cast<int>(data->counter));
 
   gc.draw(right_sur,
-         static_cast<int>(data->pos.x + left_sur.get_width() + data->width * 
middle_sur.get_width()),
-         static_cast<int>(data->pos.y),
+         Vector(static_cast<int>(data->pos.x + left_sur.get_width() + 
data->width * middle_sur.get_width()),
+                 static_cast<int>(data->pos.y)),
          static_cast<int>(data->counter));
 }
 
 void
 ConveyorBelt::on_startup ()
 {
-  CL_Surface sur(PingusResource::load_surface("conveyorbelt_cmap", 
"worldobjs"));
+  CL_PixelBuffer 
sur(PingusResource::load_surface_provider("conveyorbelt_cmap", "worldobjs"));
+
   for (int i=0; i < (data->width + 2); ++i)
     world->get_colmap()->put(sur,
                              static_cast<int>(data->pos.x) + (15 * i),
@@ -72,7 +73,7 @@
   if (data->counter >= 14.0f)
     data->counter = 0.0f;
   else if (data->counter < 0.0f)
-    data->counter = middle_sur.get_num_frames() - 1;
+    data->counter = middle_sur.get_frame_count() - 1;
 
   PinguHolder* holder = world->get_pingus();
   for (PinguIter pingu = holder->begin(); pingu != holder->end(); ++pingu)

Index: conveyor_belt.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldobjs/conveyor_belt.hxx,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- conveyor_belt.hxx   19 Oct 2003 12:25:47 -0000      1.19
+++ conveyor_belt.hxx   20 Oct 2003 13:11:09 -0000      1.20
@@ -20,7 +20,7 @@
 #ifndef HEADER_PINGUS_WORLDOBJS_CONVEYOR_BELT_HXX
 #define HEADER_PINGUS_WORLDOBJS_CONVEYOR_BELT_HXX
 
-#include <ClanLib/Display/surface.h>
+#include <ClanLib/Display/sprite.h>
 #include "../worldobj.hxx"
 #include "../worldobj_data.hxx"
 #include "../editor/rect_editorobj.hxx"
@@ -38,9 +38,9 @@
 private:
   WorldObjsData::ConveyorBeltData* const data;
 
-  CL_Surface left_sur;
-  CL_Surface right_sur;
-  CL_Surface middle_sur;
+  CL_Sprite left_sur;
+  CL_Sprite right_sur;
+  CL_Sprite middle_sur;
 
 public:
   ConveyorBelt (const WorldObjsData::ConveyorBeltData& data_);

Index: entrance.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldobjs/entrance.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- entrance.hxx        18 Oct 2003 23:17:28 -0000      1.6
+++ entrance.hxx        20 Oct 2003 13:11:09 -0000      1.7
@@ -20,7 +20,7 @@
 #ifndef HEADER_PINGUS_ENTRANCE_HXX
 #define HEADER_PINGUS_ENTRANCE_HXX
 
-#include <ClanLib/Display/surface.h>
+#include <ClanLib/Display/sprite.h>
 #include "../sprite.hxx"
 #include "../worldobj.hxx"
 
@@ -42,7 +42,7 @@
   WorldObjsData::EntranceData* const data;
 
   Sprite smallmap_symbol;
-  CL_Surface surface;
+  CL_Sprite surface;
   int        last_release;
 
 public:

Index: fake_exit.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldobjs/fake_exit.cxx,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- fake_exit.cxx       19 Oct 2003 12:25:47 -0000      1.15
+++ fake_exit.cxx       20 Oct 2003 13:11:09 -0000      1.16
@@ -33,10 +33,10 @@
     smashing(false),
     smallmap_symbol("misc/smallmap_exit", "core")
 {
-  data->counter.set_size(data->surface.get_num_frames());
+  data->counter.set_size(data->surface.get_frame_count());
   data->counter.set_type(GameCounter::once);
   data->counter.set_speed(2.5);
-  data->counter = data->surface.get_num_frames() - 1;
+  data->counter = data->surface.get_frame_count() - 1;
 
   data->pos -= Vector(data->surface.get_width ()/2, data->surface.get_height 
());
 

Index: groundpiece.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldobjs/groundpiece.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- groundpiece.cxx     19 Oct 2003 12:25:47 -0000      1.4
+++ groundpiece.cxx     20 Oct 2003 13:11:09 -0000      1.5
@@ -29,7 +29,7 @@
 
 Groundpiece::Groundpiece (const WorldObjsData::GroundpieceData& data_)
   : data(new WorldObjsData::GroundpieceData(data_)),
-    surface (PingusResource::load_surface(data->desc))
+    surface (PingusResource::load_sprite(data->desc))
 {
   // FIXME: we don't need to load surfaces here, providers would be
   // FIXME: enough and should be faster
@@ -43,6 +43,8 @@
 void
 Groundpiece::on_startup ()
 {
+  CL_PixelBuffer surface = PingusResource::load_surface_provider(data->desc);
+
   // FIXME: overdrawing of bridges and similar things aren't handled
   // FIXME: here
   if (data->gptype == Groundtype::GP_REMOVE)

Index: groundpiece.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldobjs/groundpiece.hxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- groundpiece.hxx     18 Oct 2003 23:17:28 -0000      1.8
+++ groundpiece.hxx     20 Oct 2003 13:11:09 -0000      1.9
@@ -20,7 +20,7 @@
 #ifndef HEADER_PINGUS_WORLDOBJS_GROUNDPIECE_HXX
 #define HEADER_PINGUS_WORLDOBJS_GROUNDPIECE_HXX
 
-#include <ClanLib/Display/surface.h>
+#include <ClanLib/Display/sprite.h>
 #include "../worldobj.hxx"
 
 namespace Pingus {
@@ -37,7 +37,7 @@
 {
 private:
   WorldObjsData::GroundpieceData* const data;
-  CL_Surface surface;
+  CL_Sprite surface;
 
 public:
   Groundpiece (const WorldObjsData::GroundpieceData& data_);

Index: guillotine.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldobjs/guillotine.cxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- guillotine.cxx      19 Oct 2003 12:25:47 -0000      1.10
+++ guillotine.cxx      20 Oct 2003 13:11:09 -0000      1.11
@@ -31,12 +31,12 @@
   : data(new WorldObjsData::GuillotineData(data_)),
     killing(false)
 {
-  data->counter.set_size(data->surface.get_num_frames()/2);
+  data->counter.set_size(data->surface.get_frame_count()/2);
   data->counter.set_type(GameCounter::once);
   data->counter.set_speed(0.7);
   data->counter = 0;
 
-  data->idle_counter.set_size(data->idle_surf.get_num_frames());
+  data->idle_counter.set_size(data->idle_surf.get_frame_count());
   data->idle_counter.set_type(GameCounter::loop);
   data->idle_counter.set_speed(0.3);
   data->idle_counter = 0;

Index: ice_block.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldobjs/ice_block.cxx,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- ice_block.cxx       19 Oct 2003 12:25:47 -0000      1.23
+++ ice_block.cxx       20 Oct 2003 13:11:09 -0000      1.24
@@ -36,7 +36,7 @@
     thickness(1.0),
     is_finished(false),
     last_contact(0),
-    block_sur(PingusResource::load_surface ("iceblock", "worldobjs"))
+    block_sur(PingusResource::load_sprite ("iceblock", "worldobjs"))
 {
 }
 
@@ -48,7 +48,7 @@
 void
 IceBlock::on_startup ()
 {
-  CL_Surface surf(PingusResource::load_surface("iceblock_cmap", "worldobjs"));
+  CL_PixelBuffer surf(PingusResource::load_surface_provider("iceblock_cmap", 
"worldobjs"));
 
   world->get_colmap()->put(surf,
                            static_cast<int>(data->pos.x),
@@ -64,7 +64,7 @@
 
   gc.draw(block_sur,
           data->pos,
-         static_cast<int>((1.0 - thickness) * (block_sur.get_num_frames() - 
1)));
+         static_cast<int>((1.0 - thickness) * (block_sur.get_frame_count() - 
1)));
 }
 
 void
@@ -93,7 +93,8 @@
        {
          is_finished = true;
          thickness = 0;
-         CL_Surface surf(PingusResource::load_surface("iceblock_cmap", 
"worldobjs"));
+
+         CL_PixelBuffer 
surf(PingusResource::load_surface_provider("iceblock_cmap", "worldobjs"));
          world->get_colmap ()->remove(surf, static_cast<int>(data->pos.x), 
static_cast<int>(data->pos.y));
          world->get_gfx_map()->remove(surf, static_cast<int>(data->pos.x), 
static_cast<int>(data->pos.y));
          return;

Index: ice_block.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldobjs/ice_block.hxx,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- ice_block.hxx       18 Oct 2003 23:17:28 -0000      1.17
+++ ice_block.hxx       20 Oct 2003 13:11:09 -0000      1.18
@@ -20,7 +20,7 @@
 #ifndef HEADER_PINGUS_WORLDOBJS_ICE_BLOCK_HXX
 #define HEADER_PINGUS_WORLDOBJS_ICE_BLOCK_HXX
 
-#include <ClanLib/Display/surface.h>
+#include <ClanLib/Display/sprite.h>
 #include "../worldobj.hxx"
 
 namespace Pingus {
@@ -39,7 +39,7 @@
   float thickness;
   bool  is_finished;
   int   last_contact;
-  CL_Surface block_sur;
+  CL_Sprite block_sur;
 
 public:
   IceBlock (const WorldObjsData::IceBlockData& data_);

Index: info_box.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldobjs/info_box.cxx,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- info_box.cxx        19 Oct 2003 12:25:47 -0000      1.22
+++ info_box.cxx        20 Oct 2003 13:11:09 -0000      1.23
@@ -54,6 +54,7 @@
 
   if (is_open)
     {
+#ifdef CLANLIB_0_6
       int width = Fonts::pingus_small.get_text_width(data->info_text.c_str());
       int border = 6;
       gc.draw_line(data->pos, data->pos + Vector(0, 0 - 100), 0.0f, 1.0f, 
0.0f, 1.0f);
@@ -64,6 +65,7 @@
                            y_pos + Fonts::pingus_small->get_height() + border,
                            0.0, 0.0, 0.0, 1.0);
       gc.print_center(Fonts::pingus_small, x_pos, y_pos, 
data->info_text.c_str());
+#endif
     }
   else
     {

Index: laser_exit.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldobjs/laser_exit.cxx,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- laser_exit.cxx      19 Oct 2003 12:25:47 -0000      1.14
+++ laser_exit.cxx      20 Oct 2003 13:11:09 -0000      1.15
@@ -31,7 +31,7 @@
   : data(new WorldObjsData::LaserExitData(data_)),
     killing(false)
 {
-  data->counter.set_size(data->surface.get_num_frames());
+  data->counter.set_size(data->surface.get_frame_count());
   data->counter.set_type(GameCounter::once);
   data->counter.set_speed(5);
   data->counter = 0;

Index: liquid.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldobjs/liquid.cxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- liquid.cxx  19 Oct 2003 12:25:47 -0000      1.10
+++ liquid.cxx  20 Oct 2003 13:11:09 -0000      1.11
@@ -50,7 +50,7 @@
 void
 Liquid::on_startup ()
 {
-  CL_Surface colmap_sur = PingusResource::load_surface("Liquid/water_cmap", 
"global");
+  CL_PixelBuffer colmap_sur = 
PingusResource::load_surface_provider("Liquid/water_cmap", "global");
 
   for(int i=0; i < data->width; ++i)
     world->get_colmap()->put(colmap_sur,

Index: liquid.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldobjs/liquid.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- liquid.hxx  19 Oct 2003 12:25:47 -0000      1.7
+++ liquid.hxx  20 Oct 2003 13:11:09 -0000      1.8
@@ -38,10 +38,8 @@
   Sprite sur;
 
 public:
-  CL_Surface colmap_sur;
-
   Liquid (const WorldObjsData::LiquidData& data_);
- ~Liquid ();
+  ~Liquid ();
 
   float get_z_pos () const;
   void  on_startup();

Index: smasher.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldobjs/smasher.cxx,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- smasher.cxx 19 Oct 2003 12:25:47 -0000      1.20
+++ smasher.cxx 20 Oct 2003 13:11:09 -0000      1.21
@@ -113,7 +113,7 @@
 Smasher::on_startup ()
 {
   std::cout << "Drawing colmap entry" << std::endl;
-  world->get_colmap()->put(PingusResource::load_surface("Traps/smasher_cmap", 
"traps"),
+  
world->get_colmap()->put(PingusResource::load_surface_provider("Traps/smasher_cmap",
 "traps"),
                           static_cast<int>(data->pos.x),
                           static_cast<int>(data->pos.y),
                           Groundtype::GP_SOLID);

Index: solid_color_background.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldobjs/solid_color_background.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- solid_color_background.cxx  19 Oct 2003 12:25:47 -0000      1.6
+++ solid_color_background.cxx  20 Oct 2003 13:11:09 -0000      1.7
@@ -18,7 +18,7 @@
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 #include <ClanLib/Display/display.h>
-#include "../display.hxx"
+#include "../gui/display.hxx"
 #include "../worldobjsdata/solid_color_background_data.hxx"
 #include "solid_color_background.hxx"
 

Index: spike.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldobjs/spike.cxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- spike.cxx   19 Oct 2003 12:25:47 -0000      1.11
+++ spike.cxx   20 Oct 2003 13:11:09 -0000      1.12
@@ -31,7 +31,7 @@
   : data(new WorldObjsData::SpikeData(data_)),
     killing(false)
 {
-  data->counter.set_size(data->surface.get_num_frames());
+  data->counter.set_size(data->surface.get_frame_count());
   data->counter.set_type(GameCounter::once);
   data->counter.set_speed(1);
   data->counter = 0;
@@ -69,7 +69,7 @@
     catch_pingu(*pingu);
   }
 
-  if (data->counter == static_cast<int>(data->surface.get_num_frames()) - 1) {
+  if (data->counter == static_cast<int>(data->surface.get_frame_count()) - 1) {
     killing = false;
     data->counter = 0;
   }

Index: starfield_background_stars.cxx
===================================================================
RCS file: 
/var/lib/cvs/Games/Pingus/src/worldobjs/starfield_background_stars.cxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- starfield_background_stars.cxx      18 Oct 2003 23:17:28 -0000      1.9
+++ starfield_background_stars.cxx      20 Oct 2003 13:11:09 -0000      1.10
@@ -30,13 +30,13 @@
   switch (type)
     {
     case SMALL_STAR:
-      sur = PingusResource::load_surface("Stars/small_star" , "game");
+      sur = PingusResource::load_sprite("Stars/small_star" , "game");
       break;
     case MIDDLE_STAR:
-      sur = PingusResource::load_surface("Stars/middle_star", "game");
+      sur = PingusResource::load_sprite("Stars/middle_star", "game");
       break;
     case LARGE_STAR:
-      sur = PingusResource::load_surface("Stars/large_star" , "game");
+      sur = PingusResource::load_sprite("Stars/large_star" , "game");
       break;
     }
 

Index: starfield_background_stars.hxx
===================================================================
RCS file: 
/var/lib/cvs/Games/Pingus/src/worldobjs/starfield_background_stars.hxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- starfield_background_stars.hxx      19 Oct 2003 12:25:47 -0000      1.8
+++ starfield_background_stars.hxx      20 Oct 2003 13:11:09 -0000      1.9
@@ -20,7 +20,7 @@
 #ifndef HEADER_PINGUS_WORLDOBJS_STARFIELD_BACKGROUND_STARS_HXX
 #define HEADER_PINGUS_WORLDOBJS_STARFIELD_BACKGROUND_STARS_HXX
 
-#include <ClanLib/Display/surface.h>
+#include <ClanLib/Display/sprite.h>
 #include "../worldobj.hxx"
 
 namespace Pingus {
@@ -29,7 +29,7 @@
 class StarfieldBackgroundStars
 {
 private:
-  CL_Surface sur;
+  CL_Sprite sur;
 
   float x_pos;
   float y_pos;

Index: surface_background.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldobjs/surface_background.cxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- surface_background.cxx      18 Oct 2003 23:17:28 -0000      1.12
+++ surface_background.cxx      20 Oct 2003 13:11:09 -0000      1.13
@@ -18,7 +18,7 @@
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 #include <iostream>
-#include <ClanLib/Display/SurfaceProviders/canvas.h>
+#include <ClanLib/Display/pixel_buffer.h>
 #include <ClanLib/Display/display.h>
 #include "../gui/graphic_context.hxx"
 #include "../world.hxx"
@@ -45,7 +45,7 @@
 
   CL_Surface source_surface = PingusResource::load_surface(data->desc);
 
-  CL_Canvas* canvas;
+  CL_PixelBuffer* canvas;
 
   // Scaling Code
   if (data->stretch_x && data->stretch_y)
@@ -103,7 +103,7 @@
   bg_surface = CL_Surface(canvas, true);
 
   //bg_surface = CAImageManipulation::changeHSV(bg_surface, 150, 100, 0);
-  counter.set_size(bg_surface.get_num_frames());
+  counter.set_size(bg_surface.get_frame_count());
   counter.set_speed(1.0);
 
   timer.stop();

Index: surface_background.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldobjs/surface_background.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- surface_background.hxx      18 Oct 2003 23:17:28 -0000      1.7
+++ surface_background.hxx      20 Oct 2003 13:11:09 -0000      1.8
@@ -20,7 +20,7 @@
 #ifndef HEADER_PINGUS_WORLDOBJS_SURFACE_BACKGROUND_HXX
 #define HEADER_PINGUS_WORLDOBJS_SURFACE_BACKGROUND_HXX
 
-#include <ClanLib/Display/surface.h>
+#include <ClanLib/Display/sprite.h>
 #include "../worldobj.hxx"
 #include "../game_counter.hxx"
 

Index: switch_door.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldobjs/switch_door.cxx,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- switch_door.cxx     19 Oct 2003 12:25:47 -0000      1.25
+++ switch_door.cxx     20 Oct 2003 13:11:09 -0000      1.26
@@ -31,10 +31,10 @@
 
 SwitchDoor::SwitchDoor (const WorldObjsData::SwitchDoorData& data_)
   : data(new WorldObjsData::SwitchDoorData(data_)),
-    door_box      (PingusResource::load_surface("switchdoor_box"      , 
"worldobjs")),
-    door_tile     (PingusResource::load_surface("switchdoor_tile"     , 
"worldobjs")),
-    door_tile_cmap(PingusResource::load_surface("switchdoor_tile_cmap", 
"worldobjs")),
-    switch_sur    (PingusResource::load_surface("switchdoor_switch"   , 
"worldobjs")),
+    door_box      (PingusResource::load_sprite("switchdoor_box"      , 
"worldobjs")),
+    door_tile     (PingusResource::load_sprite("switchdoor_tile"     , 
"worldobjs")),
+    
door_tile_cmap(PingusResource::load_surface_provider("switchdoor_tile_cmap", 
"worldobjs")),
+    switch_sur    (PingusResource::load_sprite("switchdoor_switch"   , 
"worldobjs")),
     is_opening(false),
     current_door_height(data->door_height)
 {

Index: switch_door.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldobjs/switch_door.hxx,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- switch_door.hxx     19 Oct 2003 12:25:47 -0000      1.21
+++ switch_door.hxx     20 Oct 2003 13:11:09 -0000      1.22
@@ -20,7 +20,7 @@
 #ifndef HEADER_PINGUS_WORLDOBJS_SWITCH_DOOR_HXX
 #define HEADER_PINGUS_WORLDOBJS_SWITCH_DOOR_HXX
 
-#include <ClanLib/Display/surface.h>
+#include <ClanLib/Display/sprite.h>
 #include "../worldobj.hxx"
 
 namespace Pingus {
@@ -38,10 +38,10 @@
 private:
   WorldObjsData::SwitchDoorData* const data;
 
-  CL_Surface door_box;
-  CL_Surface door_tile;
-  CL_Surface door_tile_cmap;
-  CL_Surface switch_sur;
+  CL_Sprite door_box;
+  CL_Sprite door_tile;
+  CL_PixelBuffer door_tile_cmap;
+  CL_Sprite switch_sur;
 
   /** True if the door is opening */
   bool is_opening;

Index: thunderstorm_background.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldobjs/thunderstorm_background.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- thunderstorm_background.cxx 19 Oct 2003 12:25:47 -0000      1.6
+++ thunderstorm_background.cxx 20 Oct 2003 13:11:09 -0000      1.7
@@ -27,11 +27,9 @@
 
 ThunderstormBackground::ThunderstormBackground (const 
WorldObjsData::ThunderstormBackgroundData& data_)
   : data(new WorldObjsData::ThunderstormBackgroundData(data_)),
-    clouds_sur(PingusResource::load_surface("Textures/thunderstorm", 
"textures")),
+    clouds_sur(PingusResource::load_sprite("Textures/thunderstorm", 
"textures")),
     x_pos(0)
 {
-  // flash_sur.push_back(PingusResource::load_surface("flash1", 
"thunderstorm"));
-  // flash_sur.push_back(PingusResource::load_surface("flash2", 
"thunderstorm"));
 }
 
 ThunderstormBackground::~ThunderstormBackground ()
@@ -56,7 +54,7 @@
 void
 ThunderstormBackground::draw (GraphicContext& gc)
 {
-  gc.draw(clouds_sur, x_pos, 0);
+  gc.draw(clouds_sur, Vector(x_pos, 0));
 }
 
 } // namespace WorldObjs

Index: thunderstorm_background.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/worldobjs/thunderstorm_background.hxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- thunderstorm_background.hxx 19 Oct 2003 12:25:47 -0000      1.9
+++ thunderstorm_background.hxx 20 Oct 2003 13:11:09 -0000      1.10
@@ -20,7 +20,7 @@
 #ifndef HEADER_PINGUS_WORLDOBJS_THUNDERSTORM_BACKGROUND_HXX
 #define HEADER_PINGUS_WORLDOBJS_THUNDERSTORM_BACKGROUND_HXX
 
-#include <ClanLib/Display/surface.h>
+#include <ClanLib/Display/sprite.h>
 #include "../worldobj.hxx"
 
 namespace Pingus {
@@ -35,8 +35,7 @@
 {
 private:
   WorldObjsData::ThunderstormBackgroundData* const data;
-  CL_Surface clouds_sur;
-  //std::vector<CL_Surface> flash_sur;
+  CL_Sprite clouds_sur;
   int x_pos;
 
 public:





reply via email to

[Prev in Thread] Current Thread [Next in Thread]