[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] r2665 - in branches/pingus_sdl/src: . components worldobjs
From: |
grumbel at BerliOS |
Subject: |
[Pingus-CVS] r2665 - in branches/pingus_sdl/src: . components worldobjs |
Date: |
Tue, 16 Jan 2007 03:33:16 +0100 |
Author: grumbel
Date: 2007-01-16 03:33:09 +0100 (Tue, 16 Jan 2007)
New Revision: 2665
Modified:
branches/pingus_sdl/src/SConscript
branches/pingus_sdl/src/components/smallmap.hxx
branches/pingus_sdl/src/worldobjs/conveyor_belt.cxx
branches/pingus_sdl/src/worldobjs/conveyor_belt.hxx
branches/pingus_sdl/src/worldobjs/entrance.cxx
branches/pingus_sdl/src/worldobjs/entrance.hxx
branches/pingus_sdl/src/worldobjs/exit.cxx
branches/pingus_sdl/src/worldobjs/exit.hxx
branches/pingus_sdl/src/worldobjs/fake_exit.cxx
branches/pingus_sdl/src/worldobjs/fake_exit.hxx
branches/pingus_sdl/src/worldobjs/groundpiece.cxx
branches/pingus_sdl/src/worldobjs/groundpiece.hxx
branches/pingus_sdl/src/worldobjs/guillotine.cxx
branches/pingus_sdl/src/worldobjs/guillotine.hxx
branches/pingus_sdl/src/worldobjs/hammer.hxx
branches/pingus_sdl/src/worldobjs/hotspot.hxx
branches/pingus_sdl/src/worldobjs/ice_block.cxx
branches/pingus_sdl/src/worldobjs/ice_block.hxx
branches/pingus_sdl/src/worldobjs/info_box.cxx
branches/pingus_sdl/src/worldobjs/info_box.hxx
branches/pingus_sdl/src/worldobjs/laser_exit.hxx
branches/pingus_sdl/src/worldobjs/liquid.cxx
branches/pingus_sdl/src/worldobjs/liquid.hxx
branches/pingus_sdl/src/worldobjs/rain_generator.cxx
branches/pingus_sdl/src/worldobjs/smasher.cxx
branches/pingus_sdl/src/worldobjs/smasher.hxx
branches/pingus_sdl/src/worldobjs/solid_color_background.cxx
branches/pingus_sdl/src/worldobjs/solid_color_background.hxx
branches/pingus_sdl/src/worldobjs/spike.hxx
branches/pingus_sdl/src/worldobjs/starfield_background.hxx
branches/pingus_sdl/src/worldobjs/starfield_background_stars.cxx
branches/pingus_sdl/src/worldobjs/starfield_background_stars.hxx
branches/pingus_sdl/src/worldobjs/surface_background.cxx
branches/pingus_sdl/src/worldobjs/surface_background.hxx
branches/pingus_sdl/src/worldobjs/switch_door.cxx
branches/pingus_sdl/src/worldobjs/switch_door.hxx
branches/pingus_sdl/src/worldobjs/teleporter.hxx
branches/pingus_sdl/src/worldobjs/thunderstorm_background.cxx
branches/pingus_sdl/src/worldobjs/thunderstorm_background.hxx
branches/pingus_sdl/src/worldobjs/woodthing.hxx
Log:
- made worldobjs compilable
Modified: branches/pingus_sdl/src/SConscript
===================================================================
--- branches/pingus_sdl/src/SConscript 2007-01-16 01:00:10 UTC (rev 2664)
+++ branches/pingus_sdl/src/SConscript 2007-01-16 02:33:09 UTC (rev 2665)
@@ -281,30 +281,30 @@
'worldmap/worldmap_story.cxx',
'worldobj.cxx',
'worldobj_factory.cxx',
-#'worldobjs/conveyor_belt.cxx',
-# 'worldobjs/entrance.cxx',
-# 'worldobjs/exit.cxx',
-# 'worldobjs/fake_exit.cxx',
-# 'worldobjs/groundpiece.cxx',
-# 'worldobjs/guillotine.cxx',
-# 'worldobjs/hammer.cxx',
-# 'worldobjs/hotspot.cxx',
-# 'worldobjs/ice_block.cxx',
-# 'worldobjs/info_box.cxx',
-# 'worldobjs/laser_exit.cxx',
-# 'worldobjs/liquid.cxx',
-# 'worldobjs/rain_generator.cxx',
-# 'worldobjs/smasher.cxx',
-# 'worldobjs/snow_generator.cxx',
-# 'worldobjs/solid_color_background.cxx',
-# 'worldobjs/spike.cxx',
-# 'worldobjs/starfield_background.cxx',
-# 'worldobjs/starfield_background_stars.cxx',
-# 'worldobjs/surface_background.cxx',
-# 'worldobjs/switch_door.cxx',
-# 'worldobjs/teleporter.cxx',
-# 'worldobjs/thunderstorm_background.cxx',
-# 'worldobjs/woodthing.cxx',
+'worldobjs/conveyor_belt.cxx',
+'worldobjs/entrance.cxx',
+'worldobjs/exit.cxx',
+'worldobjs/fake_exit.cxx',
+'worldobjs/groundpiece.cxx',
+'worldobjs/guillotine.cxx',
+'worldobjs/hammer.cxx',
+'worldobjs/hotspot.cxx',
+'worldobjs/ice_block.cxx',
+'worldobjs/info_box.cxx',
+'worldobjs/laser_exit.cxx',
+'worldobjs/liquid.cxx',
+'worldobjs/rain_generator.cxx',
+'worldobjs/smasher.cxx',
+'worldobjs/snow_generator.cxx',
+'worldobjs/solid_color_background.cxx',
+'worldobjs/spike.cxx',
+'worldobjs/starfield_background.cxx',
+'worldobjs/starfield_background_stars.cxx',
+'worldobjs/surface_background.cxx',
+'worldobjs/switch_door.cxx',
+'worldobjs/teleporter.cxx',
+'worldobjs/thunderstorm_background.cxx',
+'worldobjs/woodthing.cxx',
# 'xml_file_reader.cxx',
# 'xml_file_writer.cxx',
Modified: branches/pingus_sdl/src/components/smallmap.hxx
===================================================================
--- branches/pingus_sdl/src/components/smallmap.hxx 2007-01-16 01:00:10 UTC
(rev 2664)
+++ branches/pingus_sdl/src/components/smallmap.hxx 2007-01-16 02:33:09 UTC
(rev 2665)
@@ -20,10 +20,9 @@
#ifndef HEADER_PINGUS_SMALLMAP_HXX
#define HEADER_PINGUS_SMALLMAP_HXX
+#include "../sprite.hpp"
#include "../gui/component.hxx"
-class CL_Key;
-
class Client;
class Vector3f;
class SmallMapImage;
Modified: branches/pingus_sdl/src/worldobjs/conveyor_belt.cxx
===================================================================
--- branches/pingus_sdl/src/worldobjs/conveyor_belt.cxx 2007-01-16 01:00:10 UTC
(rev 2664)
+++ branches/pingus_sdl/src/worldobjs/conveyor_belt.cxx 2007-01-16 02:33:09 UTC
(rev 2665)
@@ -43,18 +43,18 @@
gc.color().draw(left_sur, pos);
for (int i=0; i < width; ++i)
gc.color().draw(middle_sur,
- Vector(static_cast<int>(pos.x + left_sur.get_width() + i *
middle_sur.get_width()),
+ Vector3f(static_cast<int>(pos.x + left_sur.get_width() + i *
middle_sur.get_width()),
static_cast<int>(pos.y)));
gc.color().draw(right_sur,
- Vector(static_cast<int>(pos.x + left_sur.get_width() + width *
middle_sur.get_width()),
+ Vector3f(static_cast<int>(pos.x + left_sur.get_width() + width *
middle_sur.get_width()),
static_cast<int>(pos.y)));
}
void
ConveyorBelt::on_startup ()
{
- CL_PixelBuffer
sur(Resource::load_pixelbuffer("worldobjs/conveyorbelt_cmap"));
+ PixelBuffer sur(Resource::load_pixelbuffer("worldobjs/conveyorbelt_cmap"));
for (int i=0; i < (width + 2); ++i)
world->get_colmap()->put(sur,
@@ -78,7 +78,7 @@
&& (*pingu)->get_pos().y > pos.y - 2
&& (*pingu)->get_pos().y < pos.y + 10)
{
- Vector pos = (*pingu)->get_pos();
+ Vector3f pos = (*pingu)->get_pos();
pos.x -= speed * 0.025f;
(*pingu)->set_pos(pos);
}
Modified: branches/pingus_sdl/src/worldobjs/conveyor_belt.hxx
===================================================================
--- branches/pingus_sdl/src/worldobjs/conveyor_belt.hxx 2007-01-16 01:00:10 UTC
(rev 2664)
+++ branches/pingus_sdl/src/worldobjs/conveyor_belt.hxx 2007-01-16 02:33:09 UTC
(rev 2665)
@@ -20,11 +20,9 @@
#ifndef HEADER_PINGUS_WORLDOBJS_CONVEYOR_BELT_HXX
#define HEADER_PINGUS_WORLDOBJS_CONVEYOR_BELT_HXX
-#include <ClanLib/Display/sprite.h>
-#include "../vector.hxx"
+#include "../math/vector3f.hpp"
#include "../worldobj.hxx"
-
namespace WorldObjsData {
class ConveyorBeltData;
}
@@ -34,11 +32,11 @@
class ConveyorBelt : public WorldObj
{
private:
- CL_Sprite left_sur;
- CL_Sprite right_sur;
- CL_Sprite middle_sur;
+ Sprite left_sur;
+ Sprite right_sur;
+ Sprite middle_sur;
- Vector pos;
+ Vector3f pos;
int width;
float speed;
float counter;
Modified: branches/pingus_sdl/src/worldobjs/entrance.cxx
===================================================================
--- branches/pingus_sdl/src/worldobjs/entrance.cxx 2007-01-16 01:00:10 UTC
(rev 2664)
+++ branches/pingus_sdl/src/worldobjs/entrance.cxx 2007-01-16 02:33:09 UTC
(rev 2665)
@@ -152,7 +152,7 @@
}
// FIXME: Why do we still have these hardcoded offsets?!
- gc.color().draw(surface, Vector(pos.x - 32, pos.y - 16));
+ gc.color().draw(surface, Vector3f(pos.x - 32, pos.y - 16));
}
void
Modified: branches/pingus_sdl/src/worldobjs/entrance.hxx
===================================================================
--- branches/pingus_sdl/src/worldobjs/entrance.hxx 2007-01-16 01:00:10 UTC
(rev 2664)
+++ branches/pingus_sdl/src/worldobjs/entrance.hxx 2007-01-16 02:33:09 UTC
(rev 2665)
@@ -20,8 +20,7 @@
#ifndef HEADER_PINGUS_ENTRANCE_HXX
#define HEADER_PINGUS_ENTRANCE_HXX
-#include <ClanLib/Display/sprite.h>
-#include "../vector.hxx"
+#include "../math/vector3f.hpp"
#include "../res_descriptor.hxx"
#include "../worldobj.hxx"
@@ -41,15 +40,15 @@
protected:
enum EntranceDirection { LEFT, RIGHT, MISC };
EntranceDirection direction;
- Vector pos;
+ Vector3f pos;
int release_rate;
int owner_id;
/// The type of the entrance type (woodthing, generic, etc.)
std::string type;
- CL_Sprite smallmap_symbol;
- CL_Sprite surface;
+ Sprite smallmap_symbol;
+ Sprite surface;
int last_release;
public:
Modified: branches/pingus_sdl/src/worldobjs/exit.cxx
===================================================================
--- branches/pingus_sdl/src/worldobjs/exit.cxx 2007-01-16 01:00:10 UTC (rev
2664)
+++ branches/pingus_sdl/src/worldobjs/exit.cxx 2007-01-16 02:33:09 UTC (rev
2665)
@@ -18,7 +18,6 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <iostream>
-#include <ClanLib/Core/System/clanstring.h>
#include "../display/scene_context.hxx"
#include "../col_map.hxx"
#include "../world.hxx"
@@ -40,10 +39,10 @@
reader.read_desc ("surface", desc);
reader.read_int ("owner-id", owner_id);
- // Set default owner ID to 0
- if (owner_id < 0 || owner_id > 3) owner_id = 0;
+ // Set default owner ID to 0
+ if (owner_id < 0 || owner_id > 3) owner_id = 0;
- flag = Resource::load_sprite("core/misc/flag" + CL_String::to(owner_id));
+ flag = Resource::load_sprite("core/misc/flag"); ////+
CL_String::to(owner_id));
sprite = Resource::load_sprite(desc);
@@ -58,16 +57,18 @@
void
Exit::on_startup ()
{
+#if 0
world->get_colmap()->remove(sprite.get_frame_pixeldata(0),
static_cast<int>(pos.x) - sprite.get_width()/2,
static_cast<int>(pos.y) - sprite.get_height());
+#endif
}
void
Exit::draw (SceneContext& gc)
{
gc.color().draw(sprite, pos);
- gc.color().draw(flag, pos + Vector(40, 0));
+ gc.color().draw(flag, pos + Vector3f(40, 0));
}
void
@@ -84,25 +85,25 @@
PinguHolder* holder = world->get_pingus();
for (PinguIter pingu = holder->begin(); pingu != holder->end(); ++pingu)
- {
- // Make sure this particular exit is allowed for this pingu
- if ((*pingu)->get_owner() == owner_id)
{
- // Now, make sure the pingu is within range
- if ( (*pingu)->get_pos().x > pos.x - 1 && (*pingu)->get_pos().x <
pos.x + 1
- && (*pingu)->get_pos().y > pos.y - 5 && (*pingu)->get_pos().y
< pos.y + 2)
- {
- // Now, make sure the pingu isn't already exiting, gone, or dead
- if ( (*pingu)->get_status() != PS_EXITED
- && (*pingu)->get_status() != PS_DEAD
- && (*pingu)->get_action() != Actions::Exiter)
+ // Make sure this particular exit is allowed for this pingu
+ if ((*pingu)->get_owner() == owner_id)
{
- // Pingu actually exits
- (*pingu)->set_action(Actions::Exiter);
+ // Now, make sure the pingu is within range
+ if ( (*pingu)->get_pos().x > pos.x - 1 && (*pingu)->get_pos().x <
pos.x + 1
+ && (*pingu)->get_pos().y > pos.y - 5 && (*pingu)->get_pos().y
< pos.y + 2)
+ {
+ // Now, make sure the pingu isn't already exiting, gone, or dead
+ if ( (*pingu)->get_status() != PS_EXITED
+ && (*pingu)->get_status() != PS_DEAD
+ && (*pingu)->get_action() != Actions::Exiter)
+ {
+ // Pingu actually exits
+ (*pingu)->set_action(Actions::Exiter);
+ }
+ }
}
- }
}
- }
}
float
Modified: branches/pingus_sdl/src/worldobjs/exit.hxx
===================================================================
--- branches/pingus_sdl/src/worldobjs/exit.hxx 2007-01-16 01:00:10 UTC (rev
2664)
+++ branches/pingus_sdl/src/worldobjs/exit.hxx 2007-01-16 02:33:09 UTC (rev
2665)
@@ -20,11 +20,9 @@
#ifndef HEADER_PINGUS_WORLDOBJS_EXIT_HXX
#define HEADER_PINGUS_WORLDOBJS_EXIT_HXX
-#include <ClanLib/Display/sprite.h>
#include "../res_descriptor.hxx"
#include "../worldobj.hxx"
-
namespace WorldObjsData {
class ExitData;
}
@@ -34,12 +32,12 @@
class Exit : public WorldObj
{
private:
- Vector pos;
+ Vector3f pos;
int owner_id;
- CL_Sprite sprite;
- CL_Sprite flag;
- CL_Sprite smallmap_symbol;
+ Sprite sprite;
+ Sprite flag;
+ Sprite smallmap_symbol;
public:
Exit(const FileReader& reader);
Modified: branches/pingus_sdl/src/worldobjs/fake_exit.cxx
===================================================================
--- branches/pingus_sdl/src/worldobjs/fake_exit.cxx 2007-01-16 01:00:10 UTC
(rev 2664)
+++ branches/pingus_sdl/src/worldobjs/fake_exit.cxx 2007-01-16 02:33:09 UTC
(rev 2665)
@@ -33,7 +33,7 @@
smashing(false)
{
reader.read_vector("position", pos);
- pos -= Vector((float)surface.get_width ()/2, (float)surface.get_height ());
+ pos -= Vector3f((float)surface.get_width ()/2, (float)surface.get_height ());
}
float
Modified: branches/pingus_sdl/src/worldobjs/fake_exit.hxx
===================================================================
--- branches/pingus_sdl/src/worldobjs/fake_exit.hxx 2007-01-16 01:00:10 UTC
(rev 2664)
+++ branches/pingus_sdl/src/worldobjs/fake_exit.hxx 2007-01-16 02:33:09 UTC
(rev 2665)
@@ -37,10 +37,10 @@
class FakeExit : public WorldObj
{
private:
- CL_Sprite surface;
- CL_Sprite smallmap_symbol;
+ Sprite surface;
+ Sprite smallmap_symbol;
- Vector pos;
+ Vector3f pos;
bool smashing;
Modified: branches/pingus_sdl/src/worldobjs/groundpiece.cxx
===================================================================
--- branches/pingus_sdl/src/worldobjs/groundpiece.cxx 2007-01-16 01:00:10 UTC
(rev 2664)
+++ branches/pingus_sdl/src/worldobjs/groundpiece.cxx 2007-01-16 02:33:09 UTC
(rev 2665)
@@ -41,7 +41,7 @@
void
Groundpiece::on_startup ()
{
- CL_PixelBuffer surface = Resource::load_pixelbuffer(desc);
+ PixelBuffer surface = Resource::load_pixelbuffer(desc);
// FIXME: overdrawing of bridges and similar things aren't handled
// FIXME: here
Modified: branches/pingus_sdl/src/worldobjs/groundpiece.hxx
===================================================================
--- branches/pingus_sdl/src/worldobjs/groundpiece.hxx 2007-01-16 01:00:10 UTC
(rev 2664)
+++ branches/pingus_sdl/src/worldobjs/groundpiece.hxx 2007-01-16 02:33:09 UTC
(rev 2665)
@@ -20,11 +20,10 @@
#ifndef HEADER_PINGUS_WORLDOBJS_GROUNDPIECE_HXX
#define HEADER_PINGUS_WORLDOBJS_GROUNDPIECE_HXX
-#include <ClanLib/Display/sprite.h>
#include "../res_descriptor.hxx"
#include "../groundtype.hxx"
#include "../worldobj.hxx"
-#include "../vector.hxx"
+#include "../math/vector3f.hpp"
namespace WorldObjsData {
@@ -38,7 +37,7 @@
class Groundpiece : public WorldObj
{
private:
- Vector pos;
+ Vector3f pos;
ResDescriptor desc;
Groundtype::GPType gptype;
Modified: branches/pingus_sdl/src/worldobjs/guillotine.cxx
===================================================================
--- branches/pingus_sdl/src/worldobjs/guillotine.cxx 2007-01-16 01:00:10 UTC
(rev 2664)
+++ branches/pingus_sdl/src/worldobjs/guillotine.cxx 2007-01-16 02:33:09 UTC
(rev 2665)
@@ -34,9 +34,11 @@
{
reader.read_vector("position", pos);
+#if 0
sprite_kill_right.set_play_loop(false);
sprite_kill_left.set_play_loop(false);
sprite_idle.set_play_loop(true);
+#endif
}
void
Modified: branches/pingus_sdl/src/worldobjs/guillotine.hxx
===================================================================
--- branches/pingus_sdl/src/worldobjs/guillotine.hxx 2007-01-16 01:00:10 UTC
(rev 2664)
+++ branches/pingus_sdl/src/worldobjs/guillotine.hxx 2007-01-16 02:33:09 UTC
(rev 2665)
@@ -36,10 +36,10 @@
class Guillotine : public WorldObj
{
private:
- CL_Sprite sprite_kill_right;
- CL_Sprite sprite_kill_left;
- CL_Sprite sprite_idle;
- Vector pos;
+ Sprite sprite_kill_right;
+ Sprite sprite_kill_left;
+ Sprite sprite_idle;
+ Vector3f pos;
Direction direction;
bool killing;
Modified: branches/pingus_sdl/src/worldobjs/hammer.hxx
===================================================================
--- branches/pingus_sdl/src/worldobjs/hammer.hxx 2007-01-16 01:00:10 UTC
(rev 2664)
+++ branches/pingus_sdl/src/worldobjs/hammer.hxx 2007-01-16 02:33:09 UTC
(rev 2665)
@@ -34,8 +34,8 @@
class Hammer : public WorldObj
{
private:
- CL_Sprite sprite;
- Vector pos;
+ Sprite sprite;
+ Vector3f pos;
public:
Hammer(const FileReader& reader);
Modified: branches/pingus_sdl/src/worldobjs/hotspot.hxx
===================================================================
--- branches/pingus_sdl/src/worldobjs/hotspot.hxx 2007-01-16 01:00:10 UTC
(rev 2664)
+++ branches/pingus_sdl/src/worldobjs/hotspot.hxx 2007-01-16 02:33:09 UTC
(rev 2665)
@@ -20,10 +20,8 @@
#ifndef HEADER_PINGUS_WORLDOBJS_HOTSPOT_HXX
#define HEADER_PINGUS_WORLDOBJS_HOTSPOT_HXX
-#include <ClanLib/Display/sprite.h>
#include "../worldobj.hxx"
-
namespace WorldObjsData {
class HotspotData;
}
@@ -33,9 +31,9 @@
class Hotspot : public WorldObj
{
private:
- CL_Sprite sprite;
+ Sprite sprite;
float para;
- Vector pos;
+ Vector3f pos;
public:
Hotspot(const FileReader& reader);
Modified: branches/pingus_sdl/src/worldobjs/ice_block.cxx
===================================================================
--- branches/pingus_sdl/src/worldobjs/ice_block.cxx 2007-01-16 01:00:10 UTC
(rev 2664)
+++ branches/pingus_sdl/src/worldobjs/ice_block.cxx 2007-01-16 02:33:09 UTC
(rev 2665)
@@ -42,7 +42,7 @@
void
IceBlock::on_startup ()
{
- CL_PixelBuffer surf(Resource::load_pixelbuffer("worldobjs/iceblock_cmap"));
+ PixelBuffer surf(Resource::load_pixelbuffer("worldobjs/iceblock_cmap"));
world->get_colmap()->put(surf,
static_cast<int>(pos.x),
@@ -88,7 +88,7 @@
is_finished = true;
thickness = 0;
- CL_PixelBuffer
surf(Resource::load_pixelbuffer("worldobjs/iceblock_cmap"));
+ PixelBuffer
surf(Resource::load_pixelbuffer("worldobjs/iceblock_cmap"));
world->get_colmap ()->remove(surf, static_cast<int>(pos.x),
static_cast<int>(pos.y));
world->get_gfx_map()->remove(surf, static_cast<int>(pos.x),
static_cast<int>(pos.y));
return;
Modified: branches/pingus_sdl/src/worldobjs/ice_block.hxx
===================================================================
--- branches/pingus_sdl/src/worldobjs/ice_block.hxx 2007-01-16 01:00:10 UTC
(rev 2664)
+++ branches/pingus_sdl/src/worldobjs/ice_block.hxx 2007-01-16 02:33:09 UTC
(rev 2665)
@@ -20,10 +20,8 @@
#ifndef HEADER_PINGUS_WORLDOBJS_ICE_BLOCK_HXX
#define HEADER_PINGUS_WORLDOBJS_ICE_BLOCK_HXX
-#include <ClanLib/Display/sprite.h>
#include "../worldobj.hxx"
-
namespace WorldObjsData {
class IceBlockData;
}
@@ -34,7 +32,7 @@
{
private:
/// The upper/left position of the iceblock's
- Vector pos;
+ Vector3f pos;
/** The number of iceblocks, only complete blocks are supported */
int width;
@@ -42,7 +40,7 @@
float thickness;
bool is_finished;
int last_contact;
- CL_Sprite block_sur;
+ Sprite block_sur;
public:
IceBlock(const FileReader& reader);
Modified: branches/pingus_sdl/src/worldobjs/info_box.cxx
===================================================================
--- branches/pingus_sdl/src/worldobjs/info_box.cxx 2007-01-16 01:00:10 UTC
(rev 2664)
+++ branches/pingus_sdl/src/worldobjs/info_box.cxx 2007-01-16 02:33:09 UTC
(rev 2665)
@@ -17,8 +17,6 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#include <ClanLib/Display/font.h>
-#include <ClanLib/Display/display.h>
#include "../display/scene_context.hxx"
#include "../pingu.hxx"
#include "../pingu_holder.hxx"
@@ -51,13 +49,13 @@
{
int width = Fonts::pingus_small.bounding_rect(0, 0,
info_text).get_width();
int border = 6;
- gc.color().draw_line(pos, pos + Vector(0, 0 - 100), 0.0f, 1.0f, 0.0f,
1.0f);
+ gc.color().draw_line(pos, pos + Vector3f(0, 0 - 100), 0.0f, 1.0f, 0.0f,
1.0f);
gc.color().draw(sprite, pos);
CL_Display::fill_rect(CL_Rect(x_pos - width/2 - border,
y_pos - border,
x_pos + width/2 + border,
y_pos + Fonts::pingus_small.get_height() +
border),
- CL_Color(0, 0, 0, 255));
+ Color(0, 0, 0, 255));
gc.print_center(Fonts::pingus_small, x_pos, y_pos, info_text);
}
else
Modified: branches/pingus_sdl/src/worldobjs/info_box.hxx
===================================================================
--- branches/pingus_sdl/src/worldobjs/info_box.hxx 2007-01-16 01:00:10 UTC
(rev 2664)
+++ branches/pingus_sdl/src/worldobjs/info_box.hxx 2007-01-16 02:33:09 UTC
(rev 2665)
@@ -20,10 +20,8 @@
#ifndef HEADER_PINGUS_WORLDOBJS_INFO_BOX_HXX
#define HEADER_PINGUS_WORLDOBJS_INFO_BOX_HXX
-#include <ClanLib/Display/sprite.h>
#include "../worldobj.hxx"
-
namespace WorldObjsData {
class InfoBoxData;
}
@@ -34,10 +32,10 @@
{
private:
std::string info_text;
- Vector pos;
- Vector text_pos;
+ Vector3f pos;
+ Vector3f text_pos;
- CL_Sprite sprite;
+ Sprite sprite;
bool is_open;
public:
Modified: branches/pingus_sdl/src/worldobjs/laser_exit.hxx
===================================================================
--- branches/pingus_sdl/src/worldobjs/laser_exit.hxx 2007-01-16 01:00:10 UTC
(rev 2664)
+++ branches/pingus_sdl/src/worldobjs/laser_exit.hxx 2007-01-16 02:33:09 UTC
(rev 2665)
@@ -21,8 +21,8 @@
#define HEADER_PINGUS_WORLDOBJS_LASER_EXIT_HXX
#include "../worldobj.hxx"
+#include "../sprite.hpp"
-
namespace WorldObjsData {
class LaserExitData;
} // namespace WorldObjsData
@@ -34,8 +34,8 @@
class LaserExit : public WorldObj
{
private:
- CL_Sprite surface;
- Vector pos;
+ Sprite surface;
+ Vector3f pos;
bool killing;
Modified: branches/pingus_sdl/src/worldobjs/liquid.cxx
===================================================================
--- branches/pingus_sdl/src/worldobjs/liquid.cxx 2007-01-16 01:00:10 UTC
(rev 2664)
+++ branches/pingus_sdl/src/worldobjs/liquid.cxx 2007-01-16 02:33:09 UTC
(rev 2665)
@@ -58,7 +58,7 @@
void
Liquid::on_startup ()
{
- CL_PixelBuffer colmap_sur = Resource::load_pixelbuffer("liquids/water_cmap");
+ PixelBuffer colmap_sur = Resource::load_pixelbuffer("liquids/water_cmap");
for(int i=0; i < width; ++i)
world->get_colmap()->put(colmap_sur,
@@ -73,7 +73,7 @@
for(int x = static_cast<int>(pos.x);
x < pos.x + width;
x += sur.get_width())
- gc.color().draw(sur, Vector(x, pos.y));
+ gc.color().draw(sur, Vector3f(x, pos.y));
}
void
Modified: branches/pingus_sdl/src/worldobjs/liquid.hxx
===================================================================
--- branches/pingus_sdl/src/worldobjs/liquid.hxx 2007-01-16 01:00:10 UTC
(rev 2664)
+++ branches/pingus_sdl/src/worldobjs/liquid.hxx 2007-01-16 02:33:09 UTC
(rev 2665)
@@ -20,11 +20,9 @@
#ifndef HEADER_PINGUS_WORLDOBJS_LIQUID_HXX
#define HEADER_PINGUS_WORLDOBJS_LIQUID_HXX
-#include <ClanLib/Display/sprite.h>
#include "../res_descriptor.hxx"
#include "../worldobj.hxx"
-
namespace WorldObjsData {
class LiquidData;
}
@@ -34,9 +32,9 @@
class Liquid : public WorldObj
{
private:
- CL_Sprite sur;
+ Sprite sur;
- Vector pos;
+ Vector3f pos;
/** Cause to interpret the width in pixels instead of tiles */
bool old_width_handling;
Modified: branches/pingus_sdl/src/worldobjs/rain_generator.cxx
===================================================================
--- branches/pingus_sdl/src/worldobjs/rain_generator.cxx 2007-01-16
01:00:10 UTC (rev 2664)
+++ branches/pingus_sdl/src/worldobjs/rain_generator.cxx 2007-01-16
02:33:09 UTC (rev 2665)
@@ -18,7 +18,6 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <iostream>
-#include <ClanLib/Display/display.h>
#include "../particles/rain_particle_holder.hxx"
#include "../sound/sound.hxx"
#include "../world.hxx"
@@ -48,7 +47,7 @@
waiter_count = 1.0f;
}
- gc.color().fill_screen(CL_Color(255, 255, 255,
static_cast<int>(thunder_count*255)));
+ gc.color().fill_screen(Color(255, 255, 255,
static_cast<int>(thunder_count*255)));
}
}
Modified: branches/pingus_sdl/src/worldobjs/smasher.cxx
===================================================================
--- branches/pingus_sdl/src/worldobjs/smasher.cxx 2007-01-16 01:00:10 UTC
(rev 2664)
+++ branches/pingus_sdl/src/worldobjs/smasher.cxx 2007-01-16 02:33:09 UTC
(rev 2665)
@@ -108,7 +108,7 @@
Smasher::on_startup ()
{
std::cout << "Drawing colmap entry" << std::endl;
- CL_PixelBuffer buf = Resource::load_pixelbuffer("traps/smasher_cmap");
+ PixelBuffer buf = Resource::load_pixelbuffer("traps/smasher_cmap");
world->get_colmap()->put(buf,
static_cast<int>(pos.x),
static_cast<int>(pos.y),
Modified: branches/pingus_sdl/src/worldobjs/smasher.hxx
===================================================================
--- branches/pingus_sdl/src/worldobjs/smasher.hxx 2007-01-16 01:00:10 UTC
(rev 2664)
+++ branches/pingus_sdl/src/worldobjs/smasher.hxx 2007-01-16 02:33:09 UTC
(rev 2665)
@@ -34,8 +34,8 @@
class Smasher : public WorldObj
{
private:
- CL_Sprite surface;
- Vector pos;
+ Sprite surface;
+ Vector3f pos;
bool smashing;
bool downwards;
Modified: branches/pingus_sdl/src/worldobjs/solid_color_background.cxx
===================================================================
--- branches/pingus_sdl/src/worldobjs/solid_color_background.cxx
2007-01-16 01:00:10 UTC (rev 2664)
+++ branches/pingus_sdl/src/worldobjs/solid_color_background.cxx
2007-01-16 02:33:09 UTC (rev 2665)
@@ -17,7 +17,6 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#include <ClanLib/Display/display.h>
#include "../gui/display.hxx"
#include "../display/scene_context.hxx"
#include "solid_color_background.hxx"
@@ -33,10 +32,7 @@
SolidColorBackground::draw (SceneContext& gc)
{
// FIXME: should use SceneContext, not CL_Display
- gc.color().fill_screen(CL_Color(CL_Colorf(color.red,
- color.green,
- color.blue,
- color.alpha)));
+ gc.color().fill_screen(color);
}
} // namespace WorldObjs
Modified: branches/pingus_sdl/src/worldobjs/solid_color_background.hxx
===================================================================
--- branches/pingus_sdl/src/worldobjs/solid_color_background.hxx
2007-01-16 01:00:10 UTC (rev 2664)
+++ branches/pingus_sdl/src/worldobjs/solid_color_background.hxx
2007-01-16 02:33:09 UTC (rev 2665)
@@ -22,7 +22,6 @@
#include "../worldobj.hxx"
-
namespace WorldObjsData {
class SolidColorBackgroundData;
}
@@ -32,7 +31,7 @@
class SolidColorBackground : public WorldObj
{
private:
- CL_Colorf color;
+ Color color;
public:
SolidColorBackground(const FileReader& reader);
Modified: branches/pingus_sdl/src/worldobjs/spike.hxx
===================================================================
--- branches/pingus_sdl/src/worldobjs/spike.hxx 2007-01-16 01:00:10 UTC (rev
2664)
+++ branches/pingus_sdl/src/worldobjs/spike.hxx 2007-01-16 02:33:09 UTC (rev
2665)
@@ -35,8 +35,8 @@
class Spike : public WorldObj
{
private:
- CL_Sprite surface;
- Vector pos;
+ Sprite surface;
+ Vector3f pos;
bool killing;
public:
Modified: branches/pingus_sdl/src/worldobjs/starfield_background.hxx
===================================================================
--- branches/pingus_sdl/src/worldobjs/starfield_background.hxx 2007-01-16
01:00:10 UTC (rev 2664)
+++ branches/pingus_sdl/src/worldobjs/starfield_background.hxx 2007-01-16
02:33:09 UTC (rev 2665)
@@ -57,7 +57,7 @@
};
} // namespace WorldObjs
-} //
+
#endif
/* EOF */
Modified: branches/pingus_sdl/src/worldobjs/starfield_background_stars.cxx
===================================================================
--- branches/pingus_sdl/src/worldobjs/starfield_background_stars.cxx
2007-01-16 01:00:10 UTC (rev 2664)
+++ branches/pingus_sdl/src/worldobjs/starfield_background_stars.cxx
2007-01-16 02:33:09 UTC (rev 2665)
@@ -62,9 +62,9 @@
void
StarfieldBackgroundStars::draw (SceneContext& gc)
{
- gc.color().draw(sur, Vector (x_pos, y_pos));
+ gc.color().draw(sur, Vector3f (x_pos, y_pos));
}
} // namespace WorldObjs
-} //
+
/* EOF */
Modified: branches/pingus_sdl/src/worldobjs/starfield_background_stars.hxx
===================================================================
--- branches/pingus_sdl/src/worldobjs/starfield_background_stars.hxx
2007-01-16 01:00:10 UTC (rev 2664)
+++ branches/pingus_sdl/src/worldobjs/starfield_background_stars.hxx
2007-01-16 02:33:09 UTC (rev 2665)
@@ -20,15 +20,15 @@
#ifndef HEADER_PINGUS_WORLDOBJS_STARFIELD_BACKGROUND_STARS_HXX
#define HEADER_PINGUS_WORLDOBJS_STARFIELD_BACKGROUND_STARS_HXX
-#include <ClanLib/Display/sprite.h>
#include "../worldobj.hxx"
+#include "../sprite.hpp"
namespace WorldObjs {
class StarfieldBackgroundStars
{
private:
- CL_Sprite sur;
+ Sprite sur;
float x_pos;
float y_pos;
Modified: branches/pingus_sdl/src/worldobjs/surface_background.cxx
===================================================================
--- branches/pingus_sdl/src/worldobjs/surface_background.cxx 2007-01-16
01:00:10 UTC (rev 2664)
+++ branches/pingus_sdl/src/worldobjs/surface_background.cxx 2007-01-16
02:33:09 UTC (rev 2665)
@@ -18,14 +18,13 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <iostream>
-#include <ClanLib/Display/pixel_buffer.h>
-#include <ClanLib/Display/display.h>
#include "../display/scene_context.hxx"
#include "../world.hxx"
#include "../timer.hxx"
#include "../resource.hxx"
#include "../globals.hxx"
#include "../blitter.hxx"
+#include "../gui/display.hxx"
#include "surface_background.hxx"
namespace WorldObjs {
@@ -35,14 +34,14 @@
para_y(0.5),
scroll_x(0.0),
scroll_y(0.0),
- color(CL_Colorf(0,0,0,0)),
+ color(0,0,0,0),
stretch_x(false),
stretch_y(false),
keep_aspect(false),
scroll_ox(0),
scroll_oy(0)
{
- reader.read_vector("position", pos);
+ reader.read_vector("position", pos);
ResDescriptor desc;
@@ -63,32 +62,35 @@
Timer timer("Background creation");
- if (color.alpha > 1.0)
+ if (color.a > 1.0)
std::cout << "Background: Warning dim larger than 1.0 are no longer
supported" << std::endl;
- CL_PixelBuffer canvas = Resource::load_pixelbuffer(desc);
+ PixelBuffer canvas = Resource::load_pixelbuffer(desc);
// Scaling Code
if (stretch_x && stretch_y)
{
- canvas = Blitter::scale_surface_to_canvas(canvas, world->get_width(),
world->get_height());
+ ////canvas = Blitter::scale_surface_to_canvas(canvas,
world->get_width(), world->get_height());
}
else if (stretch_x && !stretch_y)
{
if (keep_aspect)
{
+#if 0
float aspect = canvas.get_height()/float(canvas.get_width());
canvas = Blitter::scale_surface_to_canvas(canvas,
world->get_width(),
int(world->get_width()*aspect));
+#endif
}
else
{
- canvas = Blitter::scale_surface_to_canvas(canvas,
canvas.get_width(), world->get_height());
+ ////canvas = Blitter::scale_surface_to_canvas(canvas,
canvas.get_width(), world->get_height());
}
}
else if (!stretch_x && stretch_y)
{
+#if 0
if (keep_aspect)
{
float aspect = float(canvas.get_width())/canvas.get_height();
@@ -100,11 +102,14 @@
{
canvas = Blitter::scale_surface_to_canvas(canvas,
canvas.get_width(), world->get_height());
}
+#endif
}
- CL_SpriteDescription sprite_desc;
- sprite_desc.add_frame(canvas);
- bg_surface = CL_Sprite(sprite_desc);
+#if 0
+ SpriteDescription sprite_desc;
+ sprite_desc.add_frame(canvas);
+ bg_surface = Sprite(sprite_desc);
+#endif
timer.stop();
}
@@ -119,74 +124,74 @@
SurfaceBackground::update()
{
if (scroll_x)
- {
- scroll_ox += scroll_x;
+ {
+ scroll_ox += scroll_x;
- if (scroll_ox > bg_surface.get_width())
- scroll_ox -= bg_surface.get_width();
- else if (-scroll_ox > bg_surface.get_width())
- scroll_ox += bg_surface.get_width();
- }
+ if (scroll_ox > bg_surface.get_width())
+ scroll_ox -= bg_surface.get_width();
+ else if (-scroll_ox > bg_surface.get_width())
+ scroll_ox += bg_surface.get_width();
+ }
- if (scroll_y)
- {
- scroll_oy += scroll_y;
+ if (scroll_y)
+ {
+ scroll_oy += scroll_y;
- if (scroll_oy > bg_surface.get_height())
- scroll_oy -= bg_surface.get_height();
- else if (-scroll_oy > bg_surface.get_height())
- scroll_oy += bg_surface.get_height();
- }
+ if (scroll_oy > bg_surface.get_height())
+ scroll_oy -= bg_surface.get_height();
+ else if (-scroll_oy > bg_surface.get_height())
+ scroll_oy += bg_surface.get_height();
+ }
}
void
SurfaceBackground::draw (SceneContext& gc)
{
- if (fast_mode)
- {
- CL_Display::clear();
- }
- else
- {
- if (render_preview)
- {
+ if (fast_mode)
+ {
+ ////Display::clear();
+ }
+ else
+ {
+ if (render_preview)
+ {
#if 0 // FIXME:
- for(int y = 0; y < gc.get_height(); y +=
bg_surface.get_height())
- for(int x = 0; x < gc.get_width(); x +=
bg_surface.get_width())
- gc.color().draw(bg_surface, Vector(x,
y));
+ for(int y = 0; y < gc.get_height(); y += bg_surface.get_height())
+ for(int x = 0; x < gc.get_width(); x += bg_surface.get_width())
+ gc.color().draw(bg_surface, Vector3f(x, y));
#endif
- }
- else
- {
- int x_of = gc.color().get_clip_rect().left;
- int y_of = gc.color().get_clip_rect().top;
+ }
+ else
+ {
+ int x_of = gc.color().get_clip_rect().left;
+ int y_of = gc.color().get_clip_rect().top;
- int start_x;
- int start_y;
+ int start_x;
+ int start_y;
- start_x = static_cast<int>((x_of * para_x) + scroll_ox);
- start_y = static_cast<int>((y_of * para_y) + scroll_oy);
+ start_x = static_cast<int>((x_of * para_x) + scroll_ox);
+ start_y = static_cast<int>((y_of * para_y) + scroll_oy);
- while (start_x > 0)
- start_x -= bg_surface.get_width();
+ while (start_x > 0)
+ start_x -= bg_surface.get_width();
- while (start_y > 0)
- start_y -= bg_surface.get_height();
+ while (start_y > 0)
+ start_y -= bg_surface.get_height();
- for(int y = start_y;
- y < world->get_height();
- y += bg_surface.get_height())
- {
- for(int x = start_x;
- x < world->get_width();
- x += bg_surface.get_width())
- {
- gc.color().draw(bg_surface,
Vector(static_cast<float>(x),
-
static_cast<float>(y), pos.z));
- }
- }
- }
- }
+ for(int y = start_y;
+ y < world->get_height();
+ y += bg_surface.get_height())
+ {
+ for(int x = start_x;
+ x < world->get_width();
+ x += bg_surface.get_width())
+ {
+ gc.color().draw(bg_surface, Vector3f(static_cast<float>(x),
+ static_cast<float>(y),
pos.z));
+ }
+ }
+ }
+ }
}
} // namespace WorldObjs
Modified: branches/pingus_sdl/src/worldobjs/surface_background.hxx
===================================================================
--- branches/pingus_sdl/src/worldobjs/surface_background.hxx 2007-01-16
01:00:10 UTC (rev 2664)
+++ branches/pingus_sdl/src/worldobjs/surface_background.hxx 2007-01-16
02:33:09 UTC (rev 2665)
@@ -20,11 +20,9 @@
#ifndef HEADER_PINGUS_WORLDOBJS_SURFACE_BACKGROUND_HXX
#define HEADER_PINGUS_WORLDOBJS_SURFACE_BACKGROUND_HXX
-#include <ClanLib/Display/sprite.h>
#include "../res_descriptor.hxx"
#include "../worldobj.hxx"
-
namespace WorldObjsData {
class SurfaceBackgroundData;
}
@@ -38,7 +36,7 @@
float para_y;
/** Position of the background, only the z_pos is really used. */
- Vector pos;
+ Vector3f pos;
/** The amount of pixel the background is scrolled each frame in x
direction. */
@@ -51,7 +49,7 @@
/** fill_rect() components
An fill_rect() can be drawn over the background, the following
for components are passed to the fill_rect() call. */
- CL_Colorf color;
+ Color color;
/** Stretch the background to the full screen size in x direction */
bool stretch_x;
@@ -63,7 +61,7 @@
bool keep_aspect;
/** Background image */
- CL_Sprite bg_surface;
+ Sprite bg_surface;
/** The horizontal scrolling speed in pixels per tick */
float scroll_ox;
Modified: branches/pingus_sdl/src/worldobjs/switch_door.cxx
===================================================================
--- branches/pingus_sdl/src/worldobjs/switch_door.cxx 2007-01-16 01:00:10 UTC
(rev 2664)
+++ branches/pingus_sdl/src/worldobjs/switch_door.cxx 2007-01-16 02:33:09 UTC
(rev 2665)
@@ -17,7 +17,6 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#include <ClanLib/Display/pixel_buffer.h>
#include "../col_map.hxx"
#include "../display/scene_context.hxx"
#include "../pingu.hxx"
@@ -49,6 +48,7 @@
void
SwitchDoor::on_startup ()
{
+#if 0
world->get_colmap()->put(door_box.get_frame_pixeldata(0),
static_cast<int>(door_pos.x),
static_cast<int>(door_pos.y),
@@ -61,6 +61,7 @@
+ i * door_tile.get_height()
+ door_box.get_height(),
Groundtype::GP_SOLID);
+#endif
}
void
@@ -68,7 +69,7 @@
{
gc.color().draw (door_box, door_pos);
for (int i=0; i < current_door_height; ++i)
- gc.color().draw(door_tile, Vector(door_pos.x,
+ gc.color().draw(door_tile, Vector3f(door_pos.x,
door_pos.y + i * door_tile.get_height() +
door_box.get_height()));
gc.color().draw(switch_sur, switch_pos);
@@ -104,6 +105,7 @@
// it, we remove the door from the colmap
if (current_door_height + 10 < door_height)
{
+#if 0
world->get_colmap()->put(door_box.get_frame_pixeldata(0),
static_cast<int>(door_pos.x),
static_cast<int>(door_pos.y),
@@ -114,6 +116,7 @@
static_cast<int>(door_pos.y) + i *
door_tile.get_height()
+ door_box.get_height(),
Groundtype::GP_NOTHING);
+#endif
}
}
}
Modified: branches/pingus_sdl/src/worldobjs/switch_door.hxx
===================================================================
--- branches/pingus_sdl/src/worldobjs/switch_door.hxx 2007-01-16 01:00:10 UTC
(rev 2664)
+++ branches/pingus_sdl/src/worldobjs/switch_door.hxx 2007-01-16 02:33:09 UTC
(rev 2665)
@@ -20,10 +20,8 @@
#ifndef HEADER_PINGUS_WORLDOBJS_SWITCH_DOOR_HXX
#define HEADER_PINGUS_WORLDOBJS_SWITCH_DOOR_HXX
-#include <ClanLib/Display/sprite.h>
#include "../worldobj.hxx"
-
namespace WorldObjsData {
class SwitchDoorData;
} // namespace WorldObjsData
@@ -36,18 +34,18 @@
{
private:
/// The upper/middle pos of the door
- Vector door_pos;
+ Vector3f door_pos;
/// The bottom/middle pos of the switch
- Vector switch_pos;
+ Vector3f switch_pos;
// The height of the door in graphic tiles
int door_height;
- CL_Sprite door_box;
- CL_Sprite door_tile;
- CL_PixelBuffer door_tile_cmap;
- CL_Sprite switch_sur;
+ Sprite door_box;
+ Sprite door_tile;
+ PixelBuffer door_tile_cmap;
+ Sprite switch_sur;
/** True if the door is opening */
bool is_opening;
Modified: branches/pingus_sdl/src/worldobjs/teleporter.hxx
===================================================================
--- branches/pingus_sdl/src/worldobjs/teleporter.hxx 2007-01-16 01:00:10 UTC
(rev 2664)
+++ branches/pingus_sdl/src/worldobjs/teleporter.hxx 2007-01-16 02:33:09 UTC
(rev 2665)
@@ -20,10 +20,8 @@
#ifndef HEADER_PINGUS_WORLDOBJS_TELEPORTER_HXX
#define HEADER_PINGUS_WORLDOBJS_TELEPORTER_HXX
-#include <ClanLib/Display/sprite.h>
#include "../worldobj.hxx"
-
namespace WorldObjsData {
class TeleporterData;
}
@@ -33,11 +31,11 @@
class Teleporter : public WorldObj
{
private:
- Vector pos;
- Vector target_pos;
+ Vector3f pos;
+ Vector3f target_pos;
- CL_Sprite sprite;
- CL_Sprite target_sprite;
+ Sprite sprite;
+ Sprite target_sprite;
public:
Teleporter(const FileReader& reader);
Modified: branches/pingus_sdl/src/worldobjs/thunderstorm_background.cxx
===================================================================
--- branches/pingus_sdl/src/worldobjs/thunderstorm_background.cxx
2007-01-16 01:00:10 UTC (rev 2664)
+++ branches/pingus_sdl/src/worldobjs/thunderstorm_background.cxx
2007-01-16 02:33:09 UTC (rev 2665)
@@ -47,7 +47,7 @@
void
ThunderstormBackground::draw (SceneContext& gc)
{
- gc.color().draw(clouds_sur, Vector(x_pos, 0));
+ gc.color().draw(clouds_sur, Vector3f(x_pos, 0));
}
} // namespace WorldObjs
Modified: branches/pingus_sdl/src/worldobjs/thunderstorm_background.hxx
===================================================================
--- branches/pingus_sdl/src/worldobjs/thunderstorm_background.hxx
2007-01-16 01:00:10 UTC (rev 2664)
+++ branches/pingus_sdl/src/worldobjs/thunderstorm_background.hxx
2007-01-16 02:33:09 UTC (rev 2665)
@@ -20,10 +20,8 @@
#ifndef HEADER_PINGUS_WORLDOBJS_THUNDERSTORM_BACKGROUND_HXX
#define HEADER_PINGUS_WORLDOBJS_THUNDERSTORM_BACKGROUND_HXX
-#include <ClanLib/Display/sprite.h>
#include "../worldobj.hxx"
-
namespace WorldObjsData {
class ThunderstormBackgroundData;
}
@@ -33,8 +31,8 @@
class ThunderstormBackground : public WorldObj
{
private:
- Vector pos;
- CL_Sprite clouds_sur;
+ Vector3f pos;
+ Sprite clouds_sur;
int x_pos;
public:
Modified: branches/pingus_sdl/src/worldobjs/woodthing.hxx
===================================================================
--- branches/pingus_sdl/src/worldobjs/woodthing.hxx 2007-01-16 01:00:10 UTC
(rev 2664)
+++ branches/pingus_sdl/src/worldobjs/woodthing.hxx 2007-01-16 02:33:09 UTC
(rev 2665)
@@ -29,7 +29,7 @@
class WoodThing : public Entrance
{
private:
- CL_Sprite surface2;
+ Sprite surface2;
public:
WoodThing(const FileReader& reader);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] r2665 - in branches/pingus_sdl/src: . components worldobjs,
grumbel at BerliOS <=