[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] r2663 - in branches/pingus_sdl/src: . actions colliders mov
From: |
grumbel at BerliOS |
Subject: |
[Pingus-CVS] r2663 - in branches/pingus_sdl/src: . actions colliders movers particles |
Date: |
Tue, 16 Jan 2007 01:35:02 +0100 |
Author: grumbel
Date: 2007-01-16 01:34:58 +0100 (Tue, 16 Jan 2007)
New Revision: 2663
Modified:
branches/pingus_sdl/src/SConscript
branches/pingus_sdl/src/actions/angel.hxx
branches/pingus_sdl/src/actions/boarder.cxx
branches/pingus_sdl/src/actions/bomber.hxx
branches/pingus_sdl/src/actions/bridger.hxx
branches/pingus_sdl/src/actions/digger.hxx
branches/pingus_sdl/src/actions/drown.cxx
branches/pingus_sdl/src/actions/exiter.cxx
branches/pingus_sdl/src/actions/faller.cxx
branches/pingus_sdl/src/actions/floater.cxx
branches/pingus_sdl/src/actions/floater.hxx
branches/pingus_sdl/src/actions/jumper.cxx
branches/pingus_sdl/src/actions/laser_kill.cxx
branches/pingus_sdl/src/actions/miner.hxx
branches/pingus_sdl/src/actions/slider.cxx
branches/pingus_sdl/src/actions/smashed.cxx
branches/pingus_sdl/src/actions/smashed.hxx
branches/pingus_sdl/src/actions/splashed.cxx
branches/pingus_sdl/src/actions/splashed.hxx
branches/pingus_sdl/src/actions/superman.hxx
branches/pingus_sdl/src/actions/teleported.hxx
branches/pingus_sdl/src/actions/waiter.cxx
branches/pingus_sdl/src/actions/waiter.hxx
branches/pingus_sdl/src/actions/walker.cxx
branches/pingus_sdl/src/blitter.cxx
branches/pingus_sdl/src/blitter.hxx
branches/pingus_sdl/src/blitter_impl.hxx
branches/pingus_sdl/src/blitter_test.cxx
branches/pingus_sdl/src/capture_rectangle.cxx
branches/pingus_sdl/src/col_map.cxx
branches/pingus_sdl/src/col_map.hxx
branches/pingus_sdl/src/collider.cxx
branches/pingus_sdl/src/collider.hxx
branches/pingus_sdl/src/colliders/pingu_collider.cxx
branches/pingus_sdl/src/colliders/pingu_collider.hxx
branches/pingus_sdl/src/console.cxx
branches/pingus_sdl/src/file_dialog.cxx
branches/pingus_sdl/src/file_dialog_item.cxx
branches/pingus_sdl/src/font.hpp
branches/pingus_sdl/src/ground_map.cxx
branches/pingus_sdl/src/ground_map.hxx
branches/pingus_sdl/src/indexed_canvas.hxx
branches/pingus_sdl/src/loading.cxx
branches/pingus_sdl/src/mover.cxx
branches/pingus_sdl/src/mover.hxx
branches/pingus_sdl/src/movers/linear_mover.cxx
branches/pingus_sdl/src/movers/linear_mover.hxx
branches/pingus_sdl/src/multiline_text.cxx
branches/pingus_sdl/src/multiline_text.hxx
branches/pingus_sdl/src/particles/pingu_particle_holder.cxx
branches/pingus_sdl/src/particles/pingu_particle_holder.hxx
branches/pingus_sdl/src/particles/rain_particle_holder.cxx
branches/pingus_sdl/src/particles/rain_particle_holder.hxx
branches/pingus_sdl/src/particles/smoke_particle_holder.cxx
branches/pingus_sdl/src/particles/smoke_particle_holder.hxx
branches/pingus_sdl/src/particles/snow_particle_holder.cxx
branches/pingus_sdl/src/particles/snow_particle_holder.hxx
branches/pingus_sdl/src/pingu.hxx
branches/pingus_sdl/src/pingu_action.hxx
branches/pingus_sdl/src/pingus_map_manager.cxx
branches/pingus_sdl/src/resource.cxx
branches/pingus_sdl/src/resource.hxx
branches/pingus_sdl/src/result_screen.cxx
branches/pingus_sdl/src/screenshot.cxx
branches/pingus_sdl/src/screenshot.hxx
branches/pingus_sdl/src/smallmap_image.hxx
branches/pingus_sdl/src/sprite.cpp
branches/pingus_sdl/src/sprite.hpp
branches/pingus_sdl/src/start_screen.cxx
branches/pingus_sdl/src/target_provider.hxx
branches/pingus_sdl/src/world.cxx
branches/pingus_sdl/src/xml_file_reader.cxx
branches/pingus_sdl/src/xml_file_writer.cxx
branches/pingus_sdl/src/xml_file_writer.hxx
Log:
- a bunch of more code compilable, however not yet linkable
Modified: branches/pingus_sdl/src/SConscript
===================================================================
--- branches/pingus_sdl/src/SConscript 2007-01-16 00:01:18 UTC (rev 2662)
+++ branches/pingus_sdl/src/SConscript 2007-01-16 00:34:58 UTC (rev 2663)
@@ -76,26 +76,26 @@
# 'actions/boarder.cxx',
# 'actions/bomber.cxx',
# 'actions/bridger.cxx',
-# 'actions/climber.cxx',
-# 'actions/digger.cxx',
-# 'actions/drown.cxx',
-# 'actions/exiter.cxx',
-# 'actions/faller.cxx',
-# 'actions/floater.cxx',
-# 'actions/jumper.cxx',
-# 'actions/laser_kill.cxx',
-# 'actions/miner.cxx',
-# 'actions/rocket_launcher.cxx',
-# 'actions/slider.cxx',
-# 'actions/smashed.cxx',
-# 'actions/splashed.cxx',
-# 'actions/superman.cxx',
-# 'actions/teleported.cxx',
-# 'actions/waiter.cxx',
-# 'actions/walker.cxx',
+'actions/climber.cxx',
+'actions/digger.cxx',
+'actions/drown.cxx',
+'actions/exiter.cxx',
+'actions/faller.cxx',
+'actions/floater.cxx',
+'actions/jumper.cxx',
+'actions/laser_kill.cxx',
+'actions/miner.cxx',
+'actions/rocket_launcher.cxx',
+'actions/slider.cxx',
+'actions/smashed.cxx',
+'actions/splashed.cxx',
+'actions/superman.cxx',
+'actions/teleported.cxx',
+'actions/waiter.cxx',
+'actions/walker.cxx',
# 'blitter.cxx',
# 'blitter_test.cxx',
-# 'capture_rectangle.cxx',
+'capture_rectangle.cxx',
'cheat.cxx',
'client.cxx',
# 'col_map.cxx',
@@ -148,9 +148,9 @@
'gettext.cxx',
# 'global_event.cxx',
'globals.cxx',
-# 'goal_manager.cxx',
+'goal_manager.cxx',
'graphic_context_state.cxx',
-# 'groundtype.cxx',
+'groundtype.cxx',
# 'gui/checkbox.cxx',
# 'gui/combobox.cxx',
# 'gui/cursor.cxx',
@@ -201,15 +201,15 @@
# 'level_interrupt.cxx',
# 'loading.cxx',
'components/menu_button.cxx',
-# 'mover.cxx',
-# 'movers/linear_mover.cxx',
-# 'multiline_text.cxx',
-# 'particles/explosive_particle.cxx',
-# 'particles/ground_particle.cxx',
-# 'particles/pingu_particle_holder.cxx',
-# 'particles/rain_particle_holder.cxx',
-# 'particles/smoke_particle_holder.cxx',
-# 'particles/snow_particle_holder.cxx',
+'mover.cxx',
+'movers/linear_mover.cxx',
+'multiline_text.cxx',
+'particles/explosive_particle.cxx',
+'particles/ground_particle.cxx',
+'particles/pingu_particle_holder.cxx',
+'particles/rain_particle_holder.cxx',
+'particles/smoke_particle_holder.cxx',
+'particles/snow_particle_holder.cxx',
'path_manager.cxx',
# 'pingu.cxx',
# 'pingu_action.cxx',
@@ -260,7 +260,7 @@
'math/vector3f.cpp',
'physfs/physfs_sdl.cpp',
'physfs/physfs_stream.cpp',
-# 'world.cxx',
+'world.cxx',
'worldmap/dot.cxx',
'worldmap/dot_factory.cxx',
Modified: branches/pingus_sdl/src/actions/angel.hxx
===================================================================
--- branches/pingus_sdl/src/actions/angel.hxx 2007-01-16 00:01:18 UTC (rev
2662)
+++ branches/pingus_sdl/src/actions/angel.hxx 2007-01-16 00:34:58 UTC (rev
2663)
@@ -29,7 +29,7 @@
private:
double counter;
double x_pos;
- CL_Sprite sprite;
+ Sprite sprite;
public:
Angel (Pingu* p);
Modified: branches/pingus_sdl/src/actions/boarder.cxx
===================================================================
--- branches/pingus_sdl/src/actions/boarder.cxx 2007-01-16 00:01:18 UTC (rev
2662)
+++ branches/pingus_sdl/src/actions/boarder.cxx 2007-01-16 00:34:58 UTC (rev
2663)
@@ -17,7 +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 "../vector.hxx"
+#include "../math/vector3f.hpp"
#include "../display/scene_context.hxx"
#include "../pingu.hxx"
#include "../resource.hxx"
Modified: branches/pingus_sdl/src/actions/bomber.hxx
===================================================================
--- branches/pingus_sdl/src/actions/bomber.hxx 2007-01-16 00:01:18 UTC (rev
2662)
+++ branches/pingus_sdl/src/actions/bomber.hxx 2007-01-16 00:34:58 UTC (rev
2663)
@@ -40,8 +40,9 @@
static CL_PixelBuffer bomber_radius_gfx;
StateSprite sprite;
- CL_Sprite explo_surf;
+ Sprite explo_surf;
+
public:
Bomber (Pingu* p);
Modified: branches/pingus_sdl/src/actions/bridger.hxx
===================================================================
--- branches/pingus_sdl/src/actions/bridger.hxx 2007-01-16 00:01:18 UTC (rev
2662)
+++ branches/pingus_sdl/src/actions/bridger.hxx 2007-01-16 00:34:58 UTC (rev
2663)
@@ -20,7 +20,7 @@
#ifndef HEADER_PINGUS_ACTIONS_BRIDGER_HXX
#define HEADER_PINGUS_ACTIONS_BRIDGER_HXX
-#include "../vector.hxx"
+#include "../math/vector3f.hpp"
#include "../pingu_action.hxx"
#include "../state_sprite.hxx"
Modified: branches/pingus_sdl/src/actions/digger.hxx
===================================================================
--- branches/pingus_sdl/src/actions/digger.hxx 2007-01-16 00:01:18 UTC (rev
2662)
+++ branches/pingus_sdl/src/actions/digger.hxx 2007-01-16 00:34:58 UTC (rev
2663)
@@ -27,9 +27,9 @@
class Digger : public PinguAction
{
private:
- CL_PixelBuffer digger_radius;
- CL_PixelBuffer digger_radius_gfx;
- CL_Sprite sprite;
+ PixelBuffer digger_radius;
+ PixelBuffer digger_radius_gfx;
+ Sprite sprite;
int digger_c;
/** Width of the digger_radius surface */
Modified: branches/pingus_sdl/src/actions/drown.cxx
===================================================================
--- branches/pingus_sdl/src/actions/drown.cxx 2007-01-16 00:01:18 UTC (rev
2662)
+++ branches/pingus_sdl/src/actions/drown.cxx 2007-01-16 00:34:58 UTC (rev
2663)
@@ -17,7 +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 "../vector.hxx"
+#include "../math/vector3f.hpp"
#include "../display/scene_context.hxx"
#include "../pingu.hxx"
#include "../resource.hxx"
Modified: branches/pingus_sdl/src/actions/exiter.cxx
===================================================================
--- branches/pingus_sdl/src/actions/exiter.cxx 2007-01-16 00:01:18 UTC (rev
2662)
+++ branches/pingus_sdl/src/actions/exiter.cxx 2007-01-16 00:34:58 UTC (rev
2663)
@@ -17,7 +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 "../vector.hxx"
+#include "../math/vector3f.hpp"
#include "../display/scene_context.hxx"
#include "../resource.hxx"
#include "../pingu.hxx"
Modified: branches/pingus_sdl/src/actions/faller.cxx
===================================================================
--- branches/pingus_sdl/src/actions/faller.cxx 2007-01-16 00:01:18 UTC (rev
2662)
+++ branches/pingus_sdl/src/actions/faller.cxx 2007-01-16 00:34:58 UTC (rev
2663)
@@ -69,12 +69,12 @@
// Apply gravity
pingu->set_velocity(pingu->get_velocity()
- + Vector(0.0f, WorldObj::get_world()->get_gravity()) );
+ + Vector3f(0.0f, WorldObj::get_world()->get_gravity()) );
bool collided;
- Vector velocity = pingu->get_velocity();
- Vector move = velocity;
+ Vector3f velocity = pingu->get_velocity();
+ Vector3f move = velocity;
Movers::LinearMover mover(WorldObj::get_world(), pingu->get_pos());
Modified: branches/pingus_sdl/src/actions/floater.cxx
===================================================================
--- branches/pingus_sdl/src/actions/floater.cxx 2007-01-16 00:01:18 UTC (rev
2662)
+++ branches/pingus_sdl/src/actions/floater.cxx 2007-01-16 00:34:58 UTC (rev
2663)
@@ -38,7 +38,7 @@
{
sprite.update ();
- pingu->set_velocity(Vector(0.0f, 1.0f));
+ pingu->set_velocity(Vector3f(0.0f, 1.0f));
if (rel_getpixel(0, -1) == Groundtype::GP_NOTHING)
{
Modified: branches/pingus_sdl/src/actions/floater.hxx
===================================================================
--- branches/pingus_sdl/src/actions/floater.hxx 2007-01-16 00:01:18 UTC (rev
2662)
+++ branches/pingus_sdl/src/actions/floater.hxx 2007-01-16 00:34:58 UTC (rev
2663)
@@ -29,7 +29,8 @@
private:
int falling_depth;
int step;
- CL_Sprite sprite;
+ Sprite sprite;
+
public:
Floater(Pingu* p);
Modified: branches/pingus_sdl/src/actions/jumper.cxx
===================================================================
--- branches/pingus_sdl/src/actions/jumper.cxx 2007-01-16 00:01:18 UTC (rev
2662)
+++ branches/pingus_sdl/src/actions/jumper.cxx 2007-01-16 00:34:58 UTC (rev
2663)
@@ -17,7 +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 "../vector.hxx"
+#include "../math/vector3f.hpp"
#include "../display/scene_context.hxx"
#include "../pingu.hxx"
#include "../resource.hxx"
@@ -44,9 +44,9 @@
Jumper::update ()
{
if (pingu->direction.is_right()) {
- pingu->set_velocity(pingu->get_velocity() + Vector(5.0, -5.0));
+ pingu->set_velocity(pingu->get_velocity() + Vector3f(5.0, -5.0));
} else {
- pingu->set_velocity(pingu->get_velocity() + Vector(-5.0, -5.0));
+ pingu->set_velocity(pingu->get_velocity() + Vector3f(-5.0, -5.0));
}
// Move the pingu in the air, so that it can start 'falling'
Modified: branches/pingus_sdl/src/actions/laser_kill.cxx
===================================================================
--- branches/pingus_sdl/src/actions/laser_kill.cxx 2007-01-16 00:01:18 UTC
(rev 2662)
+++ branches/pingus_sdl/src/actions/laser_kill.cxx 2007-01-16 00:34:58 UTC
(rev 2663)
@@ -17,7 +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 "../vector.hxx"
+#include "../math/vector3f.hpp"
#include "../resource.hxx"
#include "../display/scene_context.hxx"
#include "../pingu.hxx"
@@ -35,7 +35,7 @@
void
LaserKill::draw (SceneContext& gc)
{
- gc.color().draw(sprite[pingu->direction], pingu->get_pos () + Vector (0, 2));
+ gc.color().draw(sprite[pingu->direction], pingu->get_pos () + Vector3f (0,
2));
}
void
Modified: branches/pingus_sdl/src/actions/miner.hxx
===================================================================
--- branches/pingus_sdl/src/actions/miner.hxx 2007-01-16 00:01:18 UTC (rev
2662)
+++ branches/pingus_sdl/src/actions/miner.hxx 2007-01-16 00:34:58 UTC (rev
2663)
@@ -20,7 +20,6 @@
#ifndef HEADER_PINGUS_ACTIONS_MINER_HXX
#define HEADER_PINGUS_ACTIONS_MINER_HXX
-#include <ClanLib/display.h>
#include "../pingu_action.hxx"
#include "../state_sprite.hxx"
@@ -29,8 +28,8 @@
class Miner : public PinguAction
{
private:
- CL_PixelBuffer miner_radius;
- CL_PixelBuffer miner_radius_gfx;
+ PixelBuffer miner_radius;
+ PixelBuffer miner_radius_gfx;
StateSprite sprite;
int slow_count;
Modified: branches/pingus_sdl/src/actions/slider.cxx
===================================================================
--- branches/pingus_sdl/src/actions/slider.cxx 2007-01-16 00:01:18 UTC (rev
2662)
+++ branches/pingus_sdl/src/actions/slider.cxx 2007-01-16 00:34:58 UTC (rev
2663)
@@ -50,11 +50,11 @@
if (pingu->direction.is_right())
{
- pingu->set_velocity(pingu->get_velocity() + Vector(speed, 0.0));
+ pingu->set_velocity(pingu->get_velocity() + Vector3f(speed,
0.0));
}
else
{
- pingu->set_velocity(pingu->get_velocity() + Vector(-speed, 0.0));
+ pingu->set_velocity(pingu->get_velocity() + Vector3f(-speed,
0.0));
}
pingu->set_action(Actions::Walker);
@@ -73,7 +73,7 @@
void
Slider::draw (SceneContext& gc)
{
- gc.color().draw(sprite[pingu->direction], pingu->get_pos() + Vector(0, -2));
+ gc.color().draw(sprite[pingu->direction], pingu->get_pos() + Vector3f(0,
-2));
}
} // namespace Actions
Modified: branches/pingus_sdl/src/actions/smashed.cxx
===================================================================
--- branches/pingus_sdl/src/actions/smashed.cxx 2007-01-16 00:01:18 UTC (rev
2662)
+++ branches/pingus_sdl/src/actions/smashed.cxx 2007-01-16 00:34:58 UTC (rev
2663)
@@ -18,7 +18,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "../resource.hxx"
-#include "../vector.hxx"
+#include "../math/vector3f.hpp"
#include "../display/scene_context.hxx"
#include "../pingu.hxx"
#include "smashed.hxx"
Modified: branches/pingus_sdl/src/actions/smashed.hxx
===================================================================
--- branches/pingus_sdl/src/actions/smashed.hxx 2007-01-16 00:01:18 UTC (rev
2662)
+++ branches/pingus_sdl/src/actions/smashed.hxx 2007-01-16 00:34:58 UTC (rev
2663)
@@ -20,7 +20,6 @@
#ifndef HEADER_PINGUS_ACTIONS_SMASHED_HXX
#define HEADER_PINGUS_ACTIONS_SMASHED_HXX
-#include <ClanLib/Display/sprite.h>
#include "../pingu_action.hxx"
namespace Actions {
@@ -31,7 +30,7 @@
{
private:
bool sound_played;
- CL_Sprite sprite;
+ Sprite sprite;
public:
Smashed (Pingu*);
Modified: branches/pingus_sdl/src/actions/splashed.cxx
===================================================================
--- branches/pingus_sdl/src/actions/splashed.cxx 2007-01-16 00:01:18 UTC
(rev 2662)
+++ branches/pingus_sdl/src/actions/splashed.cxx 2007-01-16 00:34:58 UTC
(rev 2663)
@@ -18,7 +18,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "../resource.hxx"
-#include "../vector.hxx"
+#include "../math/vector3f.hpp"
#include "../display/scene_context.hxx"
#include "../world.hxx"
#include "../pingu.hxx"
Modified: branches/pingus_sdl/src/actions/splashed.hxx
===================================================================
--- branches/pingus_sdl/src/actions/splashed.hxx 2007-01-16 00:01:18 UTC
(rev 2662)
+++ branches/pingus_sdl/src/actions/splashed.hxx 2007-01-16 00:34:58 UTC
(rev 2663)
@@ -29,7 +29,7 @@
private:
bool particle_thrown;
bool sound_played;
- CL_Sprite sprite;
+ Sprite sprite;
public:
Splashed (Pingu*);
Modified: branches/pingus_sdl/src/actions/superman.hxx
===================================================================
--- branches/pingus_sdl/src/actions/superman.hxx 2007-01-16 00:01:18 UTC
(rev 2662)
+++ branches/pingus_sdl/src/actions/superman.hxx 2007-01-16 00:34:58 UTC
(rev 2663)
@@ -29,7 +29,7 @@
private:
double counter;
double x_pos;
- CL_Sprite sprite;
+ Sprite sprite;
public:
Superman (Pingu*);
Modified: branches/pingus_sdl/src/actions/teleported.hxx
===================================================================
--- branches/pingus_sdl/src/actions/teleported.hxx 2007-01-16 00:01:18 UTC
(rev 2662)
+++ branches/pingus_sdl/src/actions/teleported.hxx 2007-01-16 00:34:58 UTC
(rev 2663)
@@ -18,7 +18,6 @@
#ifndef HEADER_PINGUS_ACTIONS_TELEPORTED_HXX
#define HEADER_PINGUS_ACTIONS_TELEPORTED_HXX
-#include <ClanLib/Display/sprite.h>
#include "../pingu_action.hxx"
namespace Actions {
@@ -28,7 +27,8 @@
private:
//bool particle_thrown;
bool sound_played;
- CL_Sprite sprite;
+ Sprite sprite;
+
public:
Teleported (Pingu*);
Modified: branches/pingus_sdl/src/actions/waiter.cxx
===================================================================
--- branches/pingus_sdl/src/actions/waiter.cxx 2007-01-16 00:01:18 UTC (rev
2662)
+++ branches/pingus_sdl/src/actions/waiter.cxx 2007-01-16 00:34:58 UTC (rev
2663)
@@ -17,7 +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 "../vector.hxx"
+#include "../math/vector3f.hpp"
#include "../display/scene_context.hxx"
#include "../pingu.hxx"
#include "../resource.hxx"
Modified: branches/pingus_sdl/src/actions/waiter.hxx
===================================================================
--- branches/pingus_sdl/src/actions/waiter.hxx 2007-01-16 00:01:18 UTC (rev
2662)
+++ branches/pingus_sdl/src/actions/waiter.hxx 2007-01-16 00:34:58 UTC (rev
2663)
@@ -31,7 +31,7 @@
{
private:
float countdown;
- CL_Sprite sprite;
+ Sprite sprite;
public:
Waiter (Pingu*);
Modified: branches/pingus_sdl/src/actions/walker.cxx
===================================================================
--- branches/pingus_sdl/src/actions/walker.cxx 2007-01-16 00:01:18 UTC (rev
2662)
+++ branches/pingus_sdl/src/actions/walker.cxx 2007-01-16 00:34:58 UTC (rev
2663)
@@ -36,7 +36,7 @@
floaterlayer.load(Direction::RIGHT, "other/floaterlayer/right");
// Reset the velocity
- pingu->set_velocity(Vector());
+ pingu->set_velocity(Vector3f());
}
void
@@ -46,7 +46,7 @@
walker[pingu->direction].update(0.033);
floaterlayer[pingu->direction].update(0.033);
- Vector last_pos = pingu->get_pos();
+ Vector3f last_pos = pingu->get_pos();
/* How should this code work?
Modified: branches/pingus_sdl/src/blitter.cxx
===================================================================
--- branches/pingus_sdl/src/blitter.cxx 2007-01-16 00:01:18 UTC (rev 2662)
+++ branches/pingus_sdl/src/blitter.cxx 2007-01-16 00:34:58 UTC (rev 2663)
@@ -38,14 +38,14 @@
#include "gettext.h"
void
-Blitter::put_surface(CL_PixelBuffer canvas, const CL_Surface& sur,
+Blitter::put_surface(PixelBuffer canvas, const CL_Surface& sur,
int x, int y)
{
Blitter::put_surface(canvas, sur.get_pixeldata(), x, y);
}
void
-Blitter::put_surface(CL_PixelBuffer canvas, CL_PixelBuffer provider,
+Blitter::put_surface(PixelBuffer canvas, PixelBuffer provider,
int x, int y)
{
switch(provider.get_format().get_depth())
@@ -63,7 +63,7 @@
}
void
-Blitter::put_surface_8bit(CL_PixelBuffer target, CL_PixelBuffer source,
+Blitter::put_surface_8bit(PixelBuffer target, PixelBuffer source,
int x_pos, int y_pos)
{
//std::cout << "8bit blit" << std::endl;
@@ -159,7 +159,7 @@
}
void
-Blitter::put_surface_32bit(CL_PixelBuffer target, CL_PixelBuffer source,
+Blitter::put_surface_32bit(PixelBuffer target, PixelBuffer source,
const int x_pos, const int y_pos)
{
//std::cout << "32bit blit" << std::endl;
@@ -266,7 +266,7 @@
}
void
-Blitter::fill_rect(CL_PixelBuffer target, const CL_Rect& rect, const CL_Color&
color)
+Blitter::fill_rect(PixelBuffer target, const CL_Rect& rect, const Color& color)
{
if (target.get_format().get_depth() != 32
&& target.get_format().get_depth() != 24)
@@ -406,7 +406,7 @@
}
void
-Blitter::clear_canvas(CL_PixelBuffer canvas, CL_Color color)
+Blitter::clear_canvas(PixelBuffer canvas, Color color)
{
unsigned char* buffer;
@@ -416,16 +416,16 @@
canvas.unlock();
}
-CL_PixelBuffer
+PixelBuffer
Blitter::create_canvas(const CL_Surface& sur)
{
return create_canvas(sur.get_pixeldata());
}
-CL_PixelBuffer
-Blitter::create_canvas(CL_PixelBuffer prov)
+PixelBuffer
+Blitter::create_canvas(PixelBuffer prov)
{
- CL_PixelBuffer canvas(prov.get_width(), prov.get_height(),
prov.get_width()*4, CL_PixelFormat::rgba8888);
+ PixelBuffer canvas(prov.get_width(), prov.get_height(), prov.get_width()*4,
CL_PixelFormat::rgba8888);
switch (prov.get_format().get_depth())
{
@@ -483,14 +483,14 @@
CL_Surface
Blitter::scale_surface (const CL_Surface& sur, int width, int height)
{
- CL_PixelBuffer buf = Blitter::scale_surface_to_canvas(sur, width, height);
- return CL_Surface(CL_PixelBuffer(buf));
+ PixelBuffer buf = Blitter::scale_surface_to_canvas(sur, width, height);
+ return CL_Surface(PixelBuffer(buf));
}
-CL_PixelBuffer
-Blitter::scale_surface_to_canvas (CL_PixelBuffer provider, int width, int
height)
+PixelBuffer
+Blitter::scale_surface_to_canvas (PixelBuffer provider, int width, int height)
{
- CL_PixelBuffer canvas(width, height, width*4, CL_PixelFormat::rgba8888);
+ PixelBuffer canvas(width, height, width*4, CL_PixelFormat::rgba8888);
provider.lock ();
canvas.lock ();
@@ -503,7 +503,7 @@
if (provider.get_format().get_type() == pixelformat_index)
{
- CL_Color color;
+ Color color;
pout(PINGUS_DEBUG_ACTIONS) <<
"Blitter::scale_surface_to_canvas() - Scaling indexed
image" << std::endl;
@@ -599,7 +599,7 @@
for (int y = 0; y < height; ++y)
for (int x = 0; x < width; ++x)
{
- CL_Color color = provider.get_pixel(x * pwidth
/ width,
+ Color color = provider.get_pixel(x * pwidth /
width,
y * pheight / height);
// FIXME: ignoring the source alpha due to
get_pixel
// brokeness... no time to test the patch
@@ -615,60 +615,60 @@
return canvas;
}
-CL_PixelBuffer
+PixelBuffer
Blitter::scale_surface_to_canvas(const CL_Surface& sur, int width, int height)
{
return Blitter::scale_surface_to_canvas(sur.get_pixeldata(), width, height);
}
/** Flip a surface horizontal */
-CL_PixelBuffer
-Blitter::flip_horizontal (CL_PixelBuffer prov)
+PixelBuffer
+Blitter::flip_horizontal (PixelBuffer prov)
{
return BlitterImpl::modify(prov, BlitterImpl::transform_flip());
}
/** Flip a surface vertical */
-CL_PixelBuffer
-Blitter::flip_vertical (CL_PixelBuffer sur)
+PixelBuffer
+Blitter::flip_vertical (PixelBuffer sur)
{
return BlitterImpl::modify(sur, BlitterImpl::transform_rot180_flip());
}
/** Rotate a surface 90 degrees */
-CL_PixelBuffer
-Blitter::rotate_90 (CL_PixelBuffer sur)
+PixelBuffer
+Blitter::rotate_90 (PixelBuffer sur)
{
return BlitterImpl::modify(sur, BlitterImpl::transform_rot90());
}
-CL_PixelBuffer
-Blitter::rotate_180 (CL_PixelBuffer sur)
+PixelBuffer
+Blitter::rotate_180 (PixelBuffer sur)
{
return BlitterImpl::modify(sur, BlitterImpl::transform_rot180());
}
-CL_PixelBuffer
-Blitter::rotate_270 (CL_PixelBuffer sur)
+PixelBuffer
+Blitter::rotate_270 (PixelBuffer sur)
{
return BlitterImpl::modify(sur, BlitterImpl::transform_rot270());
}
-CL_PixelBuffer
-Blitter::rotate_90_flip (CL_PixelBuffer sur)
+PixelBuffer
+Blitter::rotate_90_flip (PixelBuffer sur)
{
return BlitterImpl::modify(sur, BlitterImpl::transform_rot90_flip());
}
-CL_PixelBuffer
-Blitter::rotate_180_flip (CL_PixelBuffer sur)
+PixelBuffer
+Blitter::rotate_180_flip (PixelBuffer sur)
{
return BlitterImpl::modify(sur, BlitterImpl::transform_rot180_flip());
}
-CL_PixelBuffer
-Blitter::rotate_270_flip (CL_PixelBuffer sur)
+PixelBuffer
+Blitter::rotate_270_flip (PixelBuffer sur)
{
return BlitterImpl::modify(sur, BlitterImpl::transform_rot270_flip());
}
Modified: branches/pingus_sdl/src/blitter.hxx
===================================================================
--- branches/pingus_sdl/src/blitter.hxx 2007-01-16 00:01:18 UTC (rev 2662)
+++ branches/pingus_sdl/src/blitter.hxx 2007-01-16 00:34:58 UTC (rev 2663)
@@ -24,42 +24,42 @@
////#include <ClanLib/Display/color.h>
class CL_Surface;
-class CL_PixelBuffer;
+class PixelBuffer;
#if 0
/** A bunch of blitting and creation functions to operate on
- CL_PixelBuffer. Some of them a similar to the ones in ClanLib, but
+ PixelBuffer. Some of them a similar to the ones in ClanLib, but
this are slower and work. */
class Blitter
{
private:
///
- static void put_surface_8bit(CL_PixelBuffer target, CL_PixelBuffer source,
+ static void put_surface_8bit(PixelBuffer target, PixelBuffer source,
int x, int y);
///
- static void put_surface_32bit(CL_PixelBuffer target, CL_PixelBuffer source,
+ static void put_surface_32bit(PixelBuffer target, PixelBuffer source,
int x, int y);
public:
/** Puts a given surface to a given canvas at position x, y. */
- static void put_surface(CL_PixelBuffer target, const CL_Surface& source,
+ static void put_surface(PixelBuffer target, const CL_Surface& source,
int x, int y);
/** Puts a given surface provider to a given canvas at position x, y. */
- static void put_surface(CL_PixelBuffer target, CL_PixelBuffer source,
+ static void put_surface(PixelBuffer target, PixelBuffer source,
int x, int y);
/** Returns a newly allocated canvas. The canvas contains the same
image as the given surface. */
- static CL_PixelBuffer create_canvas(const CL_Surface&);
+ static PixelBuffer create_canvas(const CL_Surface&);
/** Returns a newly allocated canvas. The canvas contains the same
image as the given surface provider */
- static CL_PixelBuffer create_canvas(CL_PixelBuffer );
+ static PixelBuffer create_canvas(PixelBuffer );
/** Sets all pixels of a canvas to zero */
- static void clear_canvas(CL_PixelBuffer, CL_Color color = CL_Color(0, 0, 0,
0));
+ static void clear_canvas(PixelBuffer, Color color = Color(0, 0, 0, 0));
- static void fill_rect(CL_PixelBuffer target, const CL_Rect& rect, const
CL_Color& color);
+ static void fill_rect(PixelBuffer target, const CL_Rect& rect, const Color&
color);
/** Creates a new surface (based on a canvas) with the given width
and height and stretches the source surface onto it
@@ -71,35 +71,35 @@
static CL_Surface scale_surface (const CL_Surface& sur, int width, int
height);
/** Flip a surface horizontal */
- static CL_PixelBuffer flip_horizontal (CL_PixelBuffer sur);
+ static PixelBuffer flip_horizontal (PixelBuffer sur);
/** Flip a surface vertical */
- static CL_PixelBuffer flip_vertical (CL_PixelBuffer sur);
+ static PixelBuffer flip_vertical (PixelBuffer sur);
/** Rotate a surface 90 degrees */
- static CL_PixelBuffer rotate_90 (CL_PixelBuffer sur);
+ static PixelBuffer rotate_90 (PixelBuffer sur);
- static CL_PixelBuffer rotate_180 (CL_PixelBuffer sur);
+ static PixelBuffer rotate_180 (PixelBuffer sur);
- static CL_PixelBuffer rotate_270 (CL_PixelBuffer sur);
+ static PixelBuffer rotate_270 (PixelBuffer sur);
- static CL_PixelBuffer rotate_90_flip (CL_PixelBuffer sur);
+ static PixelBuffer rotate_90_flip (PixelBuffer sur);
- static CL_PixelBuffer rotate_180_flip (CL_PixelBuffer sur);
+ static PixelBuffer rotate_180_flip (PixelBuffer sur);
- static CL_PixelBuffer rotate_270_flip (CL_PixelBuffer sur);
+ static PixelBuffer rotate_270_flip (PixelBuffer sur);
/** Creates a new canvas with the given width and height and
stretches the source surface onto it, the caller is responsible
- to delete the returned CL_PixelBuffer.
+ to delete the returned PixelBuffer.
@param sur The source surface
@param width The new width of the surface.
@param height The new height of the surface.
@return A newly created surface, the caller is responsible to delete it.
*/
- static CL_PixelBuffer scale_surface_to_canvas (const CL_Surface& sur, int
width, int height);
+ static PixelBuffer scale_surface_to_canvas (const CL_Surface& sur, int
width, int height);
- static CL_PixelBuffer scale_surface_to_canvas (CL_PixelBuffer sur, int
width, int height);
+ static PixelBuffer scale_surface_to_canvas (PixelBuffer sur, int width, int
height);
private:
Blitter (const Blitter&);
Modified: branches/pingus_sdl/src/blitter_impl.hxx
===================================================================
--- branches/pingus_sdl/src/blitter_impl.hxx 2007-01-16 00:01:18 UTC (rev
2662)
+++ branches/pingus_sdl/src/blitter_impl.hxx 2007-01-16 00:34:58 UTC (rev
2663)
@@ -179,7 +179,7 @@
template<class TransF>
inline
-CL_PixelBuffer modify(CL_PixelBuffer prov, const TransF&)
+PixelBuffer modify(PixelBuffer prov, const TransF&)
{
if (prov.get_format().get_type() == pixelformat_index)
{
@@ -187,7 +187,7 @@
prov.get_format().has_colorkey(),
prov.get_format().get_colorkey(),
pixelformat_index);
- CL_PixelBuffer canvas(TransF::get_width (prov.get_width(),
prov.get_height()),
+ PixelBuffer canvas(TransF::get_width (prov.get_width(),
prov.get_height()),
TransF::get_height(prov.get_width(),
prov.get_height()),
TransF::get_width (prov.get_width(),
prov.get_height()),
format, prov.get_palette());
@@ -217,7 +217,7 @@
int pwidth = prov.get_width();
int pheight = prov.get_height();
- CL_PixelBuffer canvas(prov.get_height(), pwidth,
pheight*4, CL_PixelFormat::rgba8888);
+ PixelBuffer canvas(prov.get_height(), pwidth,
pheight*4, CL_PixelFormat::rgba8888);
prov.lock();
canvas.lock();
@@ -225,7 +225,7 @@
for (int y = 0; y < pheight; ++y)
for (int x = 0; x < pwidth; ++x)
{
- CL_Color color = prov.get_pixel(x, y);
+ Color color = prov.get_pixel(x, y);
canvas.draw_pixel(TransF::get_x(pwidth, pheight, x, y),
TransF::get_y(pwidth, pheight, x, y),
color);
Modified: branches/pingus_sdl/src/blitter_test.cxx
===================================================================
--- branches/pingus_sdl/src/blitter_test.cxx 2007-01-16 00:01:18 UTC (rev
2662)
+++ branches/pingus_sdl/src/blitter_test.cxx 2007-01-16 00:34:58 UTC (rev
2663)
@@ -34,19 +34,19 @@
//CL_Surface surf = Resource::load_surface("textures/stone", "textures");
CL_Surface surf = Resource::load_surface("textures/greentex");
- CL_PixelBuffer buf(256, 256, 256*4, CL_PixelFormat::rgba8888);
- CL_PixelBuffer data = surf.get_pixeldata();
+ PixelBuffer buf(256, 256, 256*4, CL_PixelFormat::rgba8888);
+ PixelBuffer data = surf.get_pixeldata();
Timer bench("Blit");
Blitter::put_surface(buf, data, 0, 0);
- Blitter::fill_rect(buf, CL_Rect(-50, -50, 250, 250), CL_Color(255, 150,
50, 128));
- Blitter::fill_rect(buf, CL_Rect(50, 50, 150, 150), CL_Color(255, 150, 50,
155));
+ Blitter::fill_rect(buf, CL_Rect(-50, -50, 250, 250), Color(255, 150, 50,
128));
+ Blitter::fill_rect(buf, CL_Rect(50, 50, 150, 150), Color(255, 150, 50,
155));
bench.stop();
CL_Surface surf2(buf);
while(!CL_Keyboard::get_keycode(CL_KEY_ESCAPE))
{
- CL_Display::clear(CL_Color(155, 0, 0));
+ CL_Display::clear(Color(155, 0, 0));
surf.draw(0, 0);
surf2.draw(400, 0);
Modified: branches/pingus_sdl/src/capture_rectangle.cxx
===================================================================
--- branches/pingus_sdl/src/capture_rectangle.cxx 2007-01-16 00:01:18 UTC
(rev 2662)
+++ branches/pingus_sdl/src/capture_rectangle.cxx 2007-01-16 00:34:58 UTC
(rev 2663)
@@ -17,9 +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 <ClanLib/Display/font.h>
-#include <ClanLib/Core/System/clanstring.h>
-#include "vector.hxx"
+#include "math/vector3f.hpp"
#include "pingu.hxx"
#include "resource.hxx"
#include "capture_rectangle.hxx"
@@ -53,21 +51,21 @@
// Draw the capture rectangle
if (pingu->change_allowed(button_panel->get_action_name()))
{
- sc.color().draw(good, pingu->get_center_pos() + Vector(0, 0, 1000));
+ sc.color().draw(good, pingu->get_center_pos() + Vector3f(0, 0,
1000));
}
else
{
- sc.color().draw(bad, pingu->get_center_pos() + Vector(0, 0, 1000));
+ sc.color().draw(bad, pingu->get_center_pos() + Vector3f(0, 0, 1000));
}
// Paint the direction arrow
if (pingu->direction.is_left())
{
- sc.color().draw(arrow_left, pingu->get_center_pos() + Vector(0, 0,
1000));
+ sc.color().draw(arrow_left, pingu->get_center_pos() + Vector3f(0, 0,
1000));
}
else
{
- sc.color().draw(arrow_right, pingu->get_center_pos() + Vector(0, 0,
1000));
+ sc.color().draw(arrow_right, pingu->get_center_pos() + Vector3f(0,
0, 1000));
}
sc.color().print_center(font,
@@ -103,7 +101,7 @@
if (maintainer_mode)
{
action_str += " Id: ";
- action_str += CL_String::to(pingu->get_id());
+ ////action_str += CL_String::to(pingu->get_id());
}
}
}
Modified: branches/pingus_sdl/src/col_map.cxx
===================================================================
--- branches/pingus_sdl/src/col_map.cxx 2007-01-16 00:01:18 UTC (rev 2662)
+++ branches/pingus_sdl/src/col_map.cxx 2007-01-16 00:34:58 UTC (rev 2663)
@@ -76,7 +76,7 @@
}
void
-ColMap::remove(CL_PixelBuffer provider, int x, int y)
+ColMap::remove(PixelBuffer provider, int x, int y)
{
++serial;
@@ -162,7 +162,7 @@
// Puts a surface on the colmap
void
-ColMap::put(CL_PixelBuffer provider, int sur_x, int sur_y, Groundtype::GPType
pixel)
+ColMap::put(PixelBuffer provider, int sur_x, int sur_y, Groundtype::GPType
pixel)
{
// transparent groundpieces are only drawn on the gfx map, not on the colmap
if (pixel == Groundtype::GP_TRANSPARENT)
@@ -186,7 +186,7 @@
for (int y=0; y < provider.get_height(); ++y)
for (int x=0; x < provider.get_width(); ++x)
{
- CL_Color color = provider.get_pixel(x, y);
+ Color color = provider.get_pixel(x, y);
if (color.get_alpha() > 0.1) // Alpha threshold
{
if (blit_allowed (x + sur_x, y + sur_y, pixel))
@@ -242,7 +242,7 @@
void
ColMap::draw(DrawingContext& gc)
{
- CL_PixelBuffer canvas(width, height, width*4, CL_PixelFormat::rgba8888);
+ PixelBuffer canvas(width, height, width*4, CL_PixelFormat::rgba8888);
CL_Surface sur;
unsigned char* buffer;
Modified: branches/pingus_sdl/src/col_map.hxx
===================================================================
--- branches/pingus_sdl/src/col_map.hxx 2007-01-16 00:01:18 UTC (rev 2662)
+++ branches/pingus_sdl/src/col_map.hxx 2007-01-16 00:34:58 UTC (rev 2663)
@@ -23,9 +23,8 @@
#include "groundtype.hxx"
class CL_Surface;
-class CL_PixelBuffer;
+class PixelBuffer;
-
class DrawingContext;
class ResDescriptor;
class PixelStatus;
@@ -78,10 +77,10 @@
bool blit_allowed (int x, int y, Groundtype::GPType);
void put(int x, int y, Groundtype::GPType p = Groundtype::GP_GROUND);
- void put(CL_PixelBuffer, int x, int y, Groundtype::GPType);
+ void put(PixelBuffer, int x, int y, Groundtype::GPType);
- /// void remove(int x, int y);
- void remove(CL_PixelBuffer, int x, int y);
+ void remove(int x, int y);
+ void remove(PixelBuffer, int x, int y);
void draw(DrawingContext& gc);
Modified: branches/pingus_sdl/src/collider.cxx
===================================================================
--- branches/pingus_sdl/src/collider.cxx 2007-01-16 00:01:18 UTC (rev
2662)
+++ branches/pingus_sdl/src/collider.cxx 2007-01-16 00:34:58 UTC (rev
2663)
@@ -19,7 +19,7 @@
#include "collider.hxx"
#include "col_map.hxx"
-#include "vector.hxx"
+#include "math/vector3f.hxx"
#include "world.hxx"
Collider::Collider()
@@ -30,8 +30,8 @@
{
}
-bool Collider::operator() (World* const world, Vector current_pos,
- const Vector& step_vector) const
+bool Collider::operator() (World* const world, Vector3f current_pos,
+ const Vector3f& step_vector) const
{
UNUSED_ARG(world);
UNUSED_ARG(current_pos);
@@ -40,7 +40,7 @@
return false;
}
-int Collider::getpixel(World* const world, const Vector& pos) const
+int Collider::getpixel(World* const world, const Vector3f& pos) const
{
return world->get_colmap()->getpixel(static_cast<int>(pos.x),
static_cast<int>(pos.y));
Modified: branches/pingus_sdl/src/collider.hxx
===================================================================
--- branches/pingus_sdl/src/collider.hxx 2007-01-16 00:01:18 UTC (rev
2662)
+++ branches/pingus_sdl/src/collider.hxx 2007-01-16 00:34:58 UTC (rev
2663)
@@ -21,7 +21,7 @@
#define HEADER_PINGUS_COLLIDER_HXX
-class Vector;
+class Vector3f;
class World;
class Collider
@@ -34,13 +34,13 @@
virtual ~Collider() = 0;
/** Find out if object will collide with something */
- virtual bool operator() (World* const world, Vector current_pos,
- const Vector& step_vector) const = 0;
+ virtual bool operator() (World* const world, Vector3f current_pos,
+ const Vector3f& step_vector) const = 0;
protected:
/** Get the Collision Map pixel at the specified position in the specified
world */
- int getpixel(World* const world, const Vector& pos) const;
+ int getpixel(World* const world, const Vector3f& pos) const;
};
Modified: branches/pingus_sdl/src/colliders/pingu_collider.cxx
===================================================================
--- branches/pingus_sdl/src/colliders/pingu_collider.cxx 2007-01-16
00:01:18 UTC (rev 2662)
+++ branches/pingus_sdl/src/colliders/pingu_collider.cxx 2007-01-16
00:34:58 UTC (rev 2663)
@@ -32,10 +32,10 @@
{
}
-bool PinguCollider::operator() (World* const world, Vector current_pos,
- const Vector& step_vector) const
+bool PinguCollider::operator() (World* const world, Vector3f current_pos,
+ const Vector3f& step_vector) const
{
- Vector new_pos = current_pos + step_vector;
+ Vector3f new_pos = current_pos + step_vector;
int pixel;
bool falling = false;
bool collided = false;
@@ -66,7 +66,7 @@
// If the Pingu is not falling...
else if (!falling)
{
- pixel = getpixel(world, Vector(new_pos.x, new_pos.y - height));
+ pixel = getpixel(world, Vector3f(new_pos.x, new_pos.y - height));
// If the top of the Pingu has hit something except a bridge...
if (pixel != Groundtype::GP_NOTHING && pixel != Groundtype::GP_BRIDGE)
Modified: branches/pingus_sdl/src/colliders/pingu_collider.hxx
===================================================================
--- branches/pingus_sdl/src/colliders/pingu_collider.hxx 2007-01-16
00:01:18 UTC (rev 2662)
+++ branches/pingus_sdl/src/colliders/pingu_collider.hxx 2007-01-16
00:34:58 UTC (rev 2663)
@@ -35,8 +35,8 @@
/** Find out if a Pingu at the specified position is colliding with
something */
- bool operator() (World* const world, Vector current_pos,
- const Vector& step_vector) const;
+ bool operator() (World* const world, Vector3f current_pos,
+ const Vector3f& step_vector) const;
private:
/** Pingu could be on its belly. Therefore, this is the current height of
Modified: branches/pingus_sdl/src/console.cxx
===================================================================
--- branches/pingus_sdl/src/console.cxx 2007-01-16 00:01:18 UTC (rev 2662)
+++ branches/pingus_sdl/src/console.cxx 2007-01-16 00:34:58 UTC (rev 2663)
@@ -169,7 +169,7 @@
////CL_Display::fill_rect(CL_Rect(0, start_y_pos - 15,
//// CL_Display::get_width(),
////CL_Display::get_height()),
- ////CL_Color(0, 0, 0, 128));
+ ////Color(0, 0, 0, 128));
const std::list<std::string>& buffer = streambuf.get_buffer ();
Modified: branches/pingus_sdl/src/file_dialog.cxx
===================================================================
--- branches/pingus_sdl/src/file_dialog.cxx 2007-01-16 00:01:18 UTC (rev
2662)
+++ branches/pingus_sdl/src/file_dialog.cxx 2007-01-16 00:34:58 UTC (rev
2663)
@@ -161,7 +161,7 @@
gc.draw(sprite, pos);
if (hover)
gc.draw_rect(pos.x, pos.y, pos.x +
sprite.get_width(),
- pos.y + sprite.get_height(),
CL_Color(255,255,255,150));
+ pos.y + sprite.get_height(),
Color(255,255,255,150));
}
}
@@ -213,7 +213,7 @@
gc.draw(sprite, pos);
if (hover)
gc.draw_rect(pos.x, pos.y, pos.x +
sprite.get_width(),
- pos.y + sprite.get_height(),
CL_Color(255,255,255,150));
+ pos.y + sprite.get_height(),
Color(255,255,255,150));
}
void on_primary_button_click(int x, int y)
@@ -300,7 +300,7 @@
gc.draw(sprite, Vector(gc.get_width ()/2 - sprite.get_width
()/2,
gc.get_height ()/2 - sprite.get_height ()/2));
gc.draw_rect(gc.get_width() / 2 - 285, gc.get_height() / 2 -
160,
- gc.get_width() / 2 + 285, gc.get_height() / 2 + 160,
CL_Color::black);
+ gc.get_width() / 2 + 285, gc.get_height() / 2 + 160,
Color::black);
gc.print_center(Fonts::chalk_large, gc.get_width()/2,
gc.get_height()/2 - 220,
current_file.friendly_name == "" ? current_file.name :
current_file.friendly_name);
Modified: branches/pingus_sdl/src/file_dialog_item.cxx
===================================================================
--- branches/pingus_sdl/src/file_dialog_item.cxx 2007-01-16 00:01:18 UTC
(rev 2662)
+++ branches/pingus_sdl/src/file_dialog_item.cxx 2007-01-16 00:34:58 UTC
(rev 2663)
@@ -164,18 +164,18 @@
{
if (file_item.is_directory)
gc.draw_rect(pos.x, pos.y, pos.x +
sprite.get_width(),
- pos.y + sprite.get_height(),
CL_Color(255,255,255,150));
+ pos.y + sprite.get_height(),
Color(255,255,255,150));
else // It's a file
{
// Determine which color to draw the
background rectangle.
- CL_Color color;
+ Color color;
if (file_item.is_accessible)
if (file_item.is_finished)
- color = CL_Color::azure;
+ color = Color::azure;
else
- color = CL_Color::aqua;
+ color = Color::aqua;
else
- color = CL_Color::red;
+ color = Color::red;
gc.draw_fillrect(pos.x+50, pos.y,
pos.x+270, pos.y+75, color);
// Draw level or worldmap information.
Modified: branches/pingus_sdl/src/font.hpp
===================================================================
--- branches/pingus_sdl/src/font.hpp 2007-01-16 00:01:18 UTC (rev 2662)
+++ branches/pingus_sdl/src/font.hpp 2007-01-16 00:34:58 UTC (rev 2663)
@@ -37,7 +37,7 @@
private:
public:
Font() {}
- void draw(int, int, const std::string& text, SDL_Surface* target) {}
+ void draw(int, int, const std::string& text, SDL_Surface* target = 0) {}
void set_alignment(Origin origin) {}
int get_height() { return 0; }
Rect bounding_rect(int , int, const std::string& str) const;
Modified: branches/pingus_sdl/src/ground_map.cxx
===================================================================
--- branches/pingus_sdl/src/ground_map.cxx 2007-01-16 00:01:18 UTC (rev
2662)
+++ branches/pingus_sdl/src/ground_map.cxx 2007-01-16 00:34:58 UTC (rev
2663)
@@ -48,13 +48,13 @@
{
if (!pixelbuffer)
{
- pixelbuffer = CL_PixelBuffer(tile_size, tile_size,
tile_size*4, CL_PixelFormat::rgba8888);
+ pixelbuffer = PixelBuffer(tile_size, tile_size,
tile_size*4, CL_PixelFormat::rgba8888);
Blitter::clear_canvas(pixelbuffer);
}
}
void
- MapTile::remove(CL_PixelBuffer obj, int x, int y,
+ MapTile::remove(PixelBuffer obj, int x, int y,
int real_x, int real_y,
GroundMap* parent)
{
if (surface)
@@ -65,7 +65,7 @@
}
void
- MapTile::put(CL_PixelBuffer obj, int x, int y)
+ MapTile::put(PixelBuffer obj, int x, int y)
{
prepare();
Blitter::put_surface(pixelbuffer, obj, x, y);
@@ -152,7 +152,7 @@
static_cast<float>(y * tile_size),
static_cast<float>(x * tile_size +
tile_size),
static_cast<float>(y * tile_size +
tile_size),
-
CL_Color(255, 0, 0, 75));
+
Color(255, 0, 0, 75));
}
}
}
@@ -173,7 +173,7 @@
}
void
- GroundMap::remove(CL_PixelBuffer sprovider, int x, int y)
+ GroundMap::remove(PixelBuffer sprovider, int x, int y)
{
// Get the start tile and end tile
int start_x = Math::max(x / tile_size, 0);
@@ -192,7 +192,7 @@
}
void
- GroundMap::put_alpha_surface(CL_PixelBuffer provider, CL_PixelBuffer
sprovider,
+ GroundMap::put_alpha_surface(PixelBuffer provider, PixelBuffer
sprovider,
int x_pos, int y_pos, int real_x_arg, int real_y_arg)
{
if (sprovider.get_format().get_depth() != 8)
@@ -273,7 +273,7 @@
}
void
- GroundMap::put(CL_PixelBuffer sprovider, int x, int y)
+ GroundMap::put(PixelBuffer sprovider, int x, int y)
{
// Get the start tile and end tile
int start_x = std::max(0, x / tile_size);
Modified: branches/pingus_sdl/src/ground_map.hxx
===================================================================
--- branches/pingus_sdl/src/ground_map.hxx 2007-01-16 00:01:18 UTC (rev
2662)
+++ branches/pingus_sdl/src/ground_map.hxx 2007-01-16 00:34:58 UTC (rev
2663)
@@ -22,15 +22,11 @@
#define HEADER_PINGUS_GROUND_MAP_HXX
#include <vector>
-#include <ClanLib/Display/pixel_buffer.h>
-#include <ClanLib/Display/surface.h>
#include "globals.hxx"
#include "worldobj.hxx"
#include "ground_map.hxx"
+#include "pixel_buffer.hpp"
-class CL_PixelBuffer;
-
-
class SceneContext;
class PingusLevel;
class ColMap;
@@ -39,18 +35,18 @@
class MapTile
{
private:
- CL_Surface surface;
- CL_PixelBuffer pixelbuffer;
+ ////CL_Surface surface;
+ PixelBuffer pixelbuffer;
void prepare();
public:
MapTile();
~MapTile();
- void remove(CL_PixelBuffer, int x, int y, int real_x, int real_y,
GroundMap*);
- void put(CL_PixelBuffer, int x, int y);
+ void remove(PixelBuffer, int x, int y, int real_x, int real_y, GroundMap*);
+ void put(PixelBuffer, int x, int y);
- CL_Surface get_surface() const { return surface; }
+ ////CL_Surface get_surface() const { return surface; }
};
/** This map type is the defaulh maptype, it is should be used for the
@@ -85,18 +81,18 @@
int get_width();
/** Put the gives surface provider onto the given coordinates */
- void put(CL_PixelBuffer, int x, int y);
+ void put(PixelBuffer, int x, int y);
/** Remove the gives surface provider onto the given coordinates
(everything non-transparent that isn't Groundtype::GP_Solid
is removed from the map) */
- void remove(CL_PixelBuffer, int x, int y);
+ void remove(PixelBuffer, int x, int y);
float get_z_pos () const { return 0; }
/** Low level version of the remove() call, acts on a single tile
instead of the complete map-tiles */
- void put_alpha_surface(CL_PixelBuffer provider, CL_PixelBuffer sprovider,
+ void put_alpha_surface(PixelBuffer provider, PixelBuffer sprovider,
int x, int y, int real_x, int real_y);
private:
Modified: branches/pingus_sdl/src/indexed_canvas.hxx
===================================================================
--- branches/pingus_sdl/src/indexed_canvas.hxx 2007-01-16 00:01:18 UTC (rev
2662)
+++ branches/pingus_sdl/src/indexed_canvas.hxx 2007-01-16 00:34:58 UTC (rev
2663)
@@ -26,7 +26,7 @@
/** This class is analog to CL_Canvas, but instead of being true
color, it is indexed */
-class IndexedCanvas : public CL_PixelBuffer
+class IndexedCanvas : public PixelBuffer
{
private:
unsigned int width;
Modified: branches/pingus_sdl/src/loading.cxx
===================================================================
--- branches/pingus_sdl/src/loading.cxx 2007-01-16 00:01:18 UTC (rev 2662)
+++ branches/pingus_sdl/src/loading.cxx 2007-01-16 00:34:58 UTC (rev 2663)
@@ -77,12 +77,12 @@
CL_Display::fill_rect(CL_Rect(50, CL_Display::get_height() - 100,
CL_Display::get_width() - 50,
CL_Display::get_height() - 50),
- CL_Color(128, 128, 128));
+ Color(128, 128, 128));
CL_Display::fill_rect(CL_Rect(50, CL_Display::get_height() - 100,
50 + (int)((CL_Display::get_width()-100) *
progress),
CL_Display::get_height() - 50),
- CL_Color(255, 0, 0));
+ Color(255, 0, 0));
Display::flip_display();
}
Modified: branches/pingus_sdl/src/mover.cxx
===================================================================
--- branches/pingus_sdl/src/mover.cxx 2007-01-16 00:01:18 UTC (rev 2662)
+++ branches/pingus_sdl/src/mover.cxx 2007-01-16 00:34:58 UTC (rev 2663)
@@ -20,7 +20,7 @@
#include "mover.hxx"
-Mover::Mover(World* const world_arg, const Vector& pos_arg)
+Mover::Mover(World* const world_arg, const Vector3f& pos_arg)
: world(world_arg),
pos(pos_arg),
remaining_move(0.0f, 0.0f, 0.0f),
@@ -32,12 +32,12 @@
{
}
-Vector Mover::get_pos() const
+Vector3f Mover::get_pos() const
{
return pos;
}
-Vector Mover::remaining() const
+Vector3f Mover::remaining() const
{
return remaining_move;
}
Modified: branches/pingus_sdl/src/mover.hxx
===================================================================
--- branches/pingus_sdl/src/mover.hxx 2007-01-16 00:01:18 UTC (rev 2662)
+++ branches/pingus_sdl/src/mover.hxx 2007-01-16 00:34:58 UTC (rev 2663)
@@ -20,9 +20,8 @@
#ifndef HEADER_PINGUS_MOVER_HXX
#define HEADER_PINGUS_MOVER_HXX
-#include "vector.hxx"
+#include "math/vector3f.hpp"
-
class Collider;
class World;
@@ -30,19 +29,19 @@
{
public:
/** Constructor of abstract class */
- Mover(World* const world_arg, const Vector& pos_arg);
+ Mover(World* const world_arg, const Vector3f& pos_arg);
/** Destructor of abstract class */
virtual ~Mover() = 0;
/** Updates the position of the object taking into account collisions */
- virtual void update(const Vector& move, const Collider& collider) = 0;
+ virtual void update(const Vector3f& move, const Collider& collider) = 0;
/** Get the resulting position vector */
- Vector get_pos() const;
+ Vector3f get_pos() const;
/** Get the move vector remaining after a collision */
- Vector remaining() const;
+ Vector3f remaining() const;
/** Get whether object stopped moving because it collided with something */
bool collided() const;
@@ -52,10 +51,10 @@
World* const world;
/** Position of the object to move */
- Vector pos;
+ Vector3f pos;
/** Move vector remaining after a collision */
- Vector remaining_move;
+ Vector3f remaining_move;
/** Flag to denote whether object has had a collision */
bool collision;
Modified: branches/pingus_sdl/src/movers/linear_mover.cxx
===================================================================
--- branches/pingus_sdl/src/movers/linear_mover.cxx 2007-01-16 00:01:18 UTC
(rev 2662)
+++ branches/pingus_sdl/src/movers/linear_mover.cxx 2007-01-16 00:34:58 UTC
(rev 2663)
@@ -22,7 +22,7 @@
namespace Movers {
-LinearMover::LinearMover(World* const world_arg, const Vector& pos_arg)
+LinearMover::LinearMover(World* const world_arg, const Vector3f& pos_arg)
: Mover(world_arg, pos_arg)
{
}
@@ -31,10 +31,10 @@
{
}
-void LinearMover::update(const Vector& move, const Collider& collision_check)
+void LinearMover::update(const Vector3f& move, const Collider& collision_check)
{
- Vector target_pos = pos + move;
- Vector step_vector = move;
+ Vector3f target_pos = pos + move;
+ Vector3f step_vector = move;
// Static cast to stop warning
int move_length = static_cast<int>(move.length());
Modified: branches/pingus_sdl/src/movers/linear_mover.hxx
===================================================================
--- branches/pingus_sdl/src/movers/linear_mover.hxx 2007-01-16 00:01:18 UTC
(rev 2662)
+++ branches/pingus_sdl/src/movers/linear_mover.hxx 2007-01-16 00:34:58 UTC
(rev 2663)
@@ -31,13 +31,13 @@
{
public:
/** Constructor */
- LinearMover(World* const world_arg, const Vector& pos_arg);
+ LinearMover(World* const world_arg, const Vector3f& pos_arg);
/** Destructor */
~LinearMover();
/** Updates the position of the object taking into account collisions */
- void update(const Vector& move, const Collider& collision_at);
+ void update(const Vector3f& move, const Collider& collision_at);
};
} // namespace Movers
Modified: branches/pingus_sdl/src/multiline_text.cxx
===================================================================
--- branches/pingus_sdl/src/multiline_text.cxx 2007-01-16 00:01:18 UTC (rev
2662)
+++ branches/pingus_sdl/src/multiline_text.cxx 2007-01-16 00:34:58 UTC (rev
2663)
@@ -18,7 +18,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <assert.h>
-#include <ClanLib/Display/font.h>
+#include "font.hpp"
#include "multiline_text.hxx"
#include "math.hxx"
@@ -30,7 +30,7 @@
}
void
-MultiLineText::set_font(CL_Font f)
+MultiLineText::set_font(Font f)
{
font = f;
}
@@ -119,7 +119,7 @@
{
int y_inc = 0;
- CL_Font myfont = font;
+ Font myfont = font;
myfont.set_alignment(origin_top_center);
for(std::vector<std::string>::iterator i = text.begin();
Modified: branches/pingus_sdl/src/multiline_text.hxx
===================================================================
--- branches/pingus_sdl/src/multiline_text.hxx 2007-01-16 00:01:18 UTC (rev
2662)
+++ branches/pingus_sdl/src/multiline_text.hxx 2007-01-16 00:34:58 UTC (rev
2663)
@@ -21,7 +21,7 @@
#define HEADER_PINGUS_MULTILINE_TEXT_HXX
#include "pingus.hxx"
-#include <ClanLib/Display/font.h>
+#include "font.hpp"
#include <string>
#include <vector>
@@ -29,13 +29,14 @@
class MultiLineText
{
private:
- CL_Font font;
+ Font font;
std::vector<std::string> text;
int width, height;
+
public:
MultiLineText();
- void set_font(CL_Font font);
+ void set_font(Font font);
void set_text(const std::string&, int width);
void print_left(int, int);
void print_right(int, int);
Modified: branches/pingus_sdl/src/particles/pingu_particle_holder.cxx
===================================================================
--- branches/pingus_sdl/src/particles/pingu_particle_holder.cxx 2007-01-16
00:01:18 UTC (rev 2662)
+++ branches/pingus_sdl/src/particles/pingu_particle_holder.cxx 2007-01-16
00:34:58 UTC (rev 2663)
@@ -32,8 +32,8 @@
PinguParticleHolder::PinguParticle::PinguParticle (int x, int y)
: livetime(50 + (rand() % 75)),
use_frame2((rand() % 5) == 0),
- pos(Vector(x, y)),
- velocity(Vector((float)Math::frand() * 7 - 3.5, (float)Math::frand() * -9))
+ pos(Vector3f(x, y)),
+ velocity(Vector3f((float)Math::frand() * 7 - 3.5, (float)Math::frand() *
-9))
{
}
Modified: branches/pingus_sdl/src/particles/pingu_particle_holder.hxx
===================================================================
--- branches/pingus_sdl/src/particles/pingu_particle_holder.hxx 2007-01-16
00:01:18 UTC (rev 2662)
+++ branches/pingus_sdl/src/particles/pingu_particle_holder.hxx 2007-01-16
00:34:58 UTC (rev 2663)
@@ -21,8 +21,8 @@
#define HEADER_PINGUS_PARTICLES_PINGU_PARTICLE_HOLDER_HXX
#include <vector>
-#include <ClanLib/Display/sprite.h>
-#include "../vector.hxx"
+#include "../sprite.hpp"
+#include "../math/vector3f.hpp"
#include "../worldobj.hxx"
@@ -36,16 +36,16 @@
int livetime;
bool use_frame2;
/// The current position of the particle
- Vector pos;
+ Vector3f pos;
/// The velocity of the particle
- Vector velocity;
+ Vector3f velocity;
PinguParticle (int x, int y);
};
private:
- CL_Sprite surface;
+ Sprite surface;
std::vector<PinguParticle> particles;
public:
Modified: branches/pingus_sdl/src/particles/rain_particle_holder.cxx
===================================================================
--- branches/pingus_sdl/src/particles/rain_particle_holder.cxx 2007-01-16
00:01:18 UTC (rev 2662)
+++ branches/pingus_sdl/src/particles/rain_particle_holder.cxx 2007-01-16
00:34:58 UTC (rev 2663)
@@ -28,7 +28,7 @@
namespace Particles {
RainParticleHolder::RainParticle::RainParticle(int x, int y)
- : alive(true), splash(false), use_rain2_surf(false), splash_counter(0),
splash_frame(0), pos(Vector(x, y))
+ : alive(true), splash(false), use_rain2_surf(false), splash_counter(0),
splash_frame(0), pos(Vector3f(x, y))
{
use_rain2_surf = ((rand() % 3) == 0);
pos.z = 1.0 + (float)Math::frand() * 3.0;
Modified: branches/pingus_sdl/src/particles/rain_particle_holder.hxx
===================================================================
--- branches/pingus_sdl/src/particles/rain_particle_holder.hxx 2007-01-16
00:01:18 UTC (rev 2662)
+++ branches/pingus_sdl/src/particles/rain_particle_holder.hxx 2007-01-16
00:34:58 UTC (rev 2663)
@@ -21,8 +21,8 @@
#define HEADER_PINGUS_PARTICLES_RAIN_PARTICLE_HOLDER_HXX
#include <vector>
-#include <ClanLib/Display/sprite.h>
-#include "../vector.hxx"
+#include "../sprite.hpp"
+#include "../math/vector3f.hpp"
#include "../worldobj.hxx"
@@ -40,15 +40,15 @@
float splash_frame;
// pos.z contains a modificator for x and y pos
- Vector pos;
+ Vector3f pos;
RainParticle(int x, int y);
};
private:
- CL_Sprite rain1_surf;
- CL_Sprite rain2_surf;
- CL_Sprite rain_splash;
+ Sprite rain1_surf;
+ Sprite rain2_surf;
+ Sprite rain_splash;
std::vector<RainParticle> particles;
Modified: branches/pingus_sdl/src/particles/smoke_particle_holder.cxx
===================================================================
--- branches/pingus_sdl/src/particles/smoke_particle_holder.cxx 2007-01-16
00:01:18 UTC (rev 2662)
+++ branches/pingus_sdl/src/particles/smoke_particle_holder.cxx 2007-01-16
00:34:58 UTC (rev 2663)
@@ -25,7 +25,7 @@
namespace Particles {
SmokeParticleHolder::SmokeParticle::SmokeParticle (float x, float y, float
vel_x, float vel_y)
- : pos(Vector(x,y)), velocity(Vector(vel_x, vel_y))
+ : pos(Vector3f(x,y)), velocity(Vector3f(vel_x, vel_y))
{
time = livetime = 25 + (rand() % 10);
use_surf2 = rand() % 2;
Modified: branches/pingus_sdl/src/particles/smoke_particle_holder.hxx
===================================================================
--- branches/pingus_sdl/src/particles/smoke_particle_holder.hxx 2007-01-16
00:01:18 UTC (rev 2662)
+++ branches/pingus_sdl/src/particles/smoke_particle_holder.hxx 2007-01-16
00:34:58 UTC (rev 2663)
@@ -21,8 +21,8 @@
#define HEADER_PINGUS_PARTICLES_SMOKE_PARTICLE_HOLDER_HXX
#include <vector>
-#include <ClanLib/Display/sprite.h>
-#include "../vector.hxx"
+#include "../sprite.hpp"
+#include "../math/vector3f.hpp"
#include "../worldobj.hxx"
@@ -36,15 +36,15 @@
int time;
int livetime;
bool use_surf2;
- Vector pos;
- Vector velocity;
+ Vector3f pos;
+ Vector3f velocity;
SmokeParticle(float x, float y, float vel_x, float vel_y);
};
private:
- CL_Sprite surf1;
- CL_Sprite surf2;
+ Sprite surf1;
+ Sprite surf2;
std::vector<SmokeParticle> particles;
Modified: branches/pingus_sdl/src/particles/snow_particle_holder.cxx
===================================================================
--- branches/pingus_sdl/src/particles/snow_particle_holder.cxx 2007-01-16
00:01:18 UTC (rev 2662)
+++ branches/pingus_sdl/src/particles/snow_particle_holder.cxx 2007-01-16
00:34:58 UTC (rev 2663)
@@ -31,8 +31,8 @@
SnowParticleHolder::SnowParticle::SnowParticle (int x, int y, bool colliding_)
: alive(true),
colliding(colliding_),
- pos(Vector(x,y)),
- velocity(Vector(0.0f, 1 + ((float)Math::frand() * 3.5f)))
+ pos(Vector3f(x,y)),
+ velocity(Vector3f(0.0f, 1 + ((float)Math::frand() * 3.5f)))
{
switch (rand() % 10)
{
Modified: branches/pingus_sdl/src/particles/snow_particle_holder.hxx
===================================================================
--- branches/pingus_sdl/src/particles/snow_particle_holder.hxx 2007-01-16
00:01:18 UTC (rev 2662)
+++ branches/pingus_sdl/src/particles/snow_particle_holder.hxx 2007-01-16
00:34:58 UTC (rev 2663)
@@ -21,8 +21,8 @@
#define HEADER_PINGUS_PARTICLES_SNOW_PARTICLE_HOLDER_HXX
#include <vector>
-#include <ClanLib/Display/sprite.h>
-#include "../vector.hxx"
+#include "../sprite.hpp"
+#include "../math/vector3f.hpp"
#include "../worldobj.hxx"
@@ -39,8 +39,8 @@
bool alive;
bool colliding;
ParticleType type;
- Vector pos;
- Vector velocity;
+ Vector3f pos;
+ Vector3f velocity;
SnowParticle(int x, int y, bool colliding_);
};
@@ -48,12 +48,12 @@
friend struct SnowParticle;
private:
- CL_Sprite snow1;
- CL_Sprite snow2;
- CL_Sprite snow3;
- CL_Sprite snow4;
- CL_Sprite snow5;
- CL_Sprite ground;
+ Sprite snow1;
+ Sprite snow2;
+ Sprite snow3;
+ Sprite snow4;
+ Sprite snow5;
+ Sprite ground;
std::vector<SnowParticle> particles;
Modified: branches/pingus_sdl/src/pingu.hxx
===================================================================
--- branches/pingus_sdl/src/pingu.hxx 2007-01-16 00:01:18 UTC (rev 2662)
+++ branches/pingus_sdl/src/pingu.hxx 2007-01-16 00:34:58 UTC (rev 2663)
@@ -24,7 +24,7 @@
#include "pingu_enums.hxx"
// Forward declarations
-class Vector;
+class Vector3f;
class ActionHolder;
class PinguAction;
class SceneContext;
@@ -66,7 +66,7 @@
float pos_x;
float pos_y;
- Vector* const velocity;
+ Vector3f* const velocity;
bool request_set_action (PinguAction*);
void set_action (PinguAction*);
@@ -80,7 +80,7 @@
@param arg_id The uniq id of the pingu
@param pos The start position of the pingu
@param owner The owner id of the pingu (used for multiplayer) */
- Pingu (int arg_id, const Vector& pos, int owner);
+ Pingu (int arg_id, const Vector3f& pos, int owner);
/** Destruct the pingu... */
~Pingu ();
@@ -88,11 +88,11 @@
/** Return the logical pingus position, this is the position which
is used for collision detection to the ground (the pingus
feet) */
- Vector get_pos () const;
+ Vector3f get_pos () const;
/** Returns the visible position of the pingu, the graphical center
of the pingu. */
- Vector get_center_pos () const;
+ Vector3f get_center_pos () const;
/** Returns the x position of the pingu
* For backward comp. only
@@ -130,11 +130,11 @@
void set_y (float y);
/// Set the pingu to the given coordinates
- void set_pos (const Vector& arg_pos);
+ void set_pos (const Vector3f& arg_pos);
- const Vector& get_velocity () const { return *velocity; }
+ const Vector3f& get_velocity () const { return *velocity; }
- void set_velocity (const Vector& velocity_);
+ void set_velocity (const Vector3f& velocity_);
// Set the pingu in the gives direction
void set_direction (Direction d);
@@ -175,7 +175,7 @@
bool need_catch ();
void draw (SceneContext& gc);
- void apply_force (Vector);
+ void apply_force (Vector3f);
void update();
Modified: branches/pingus_sdl/src/pingu_action.hxx
===================================================================
--- branches/pingus_sdl/src/pingu_action.hxx 2007-01-16 00:01:18 UTC (rev
2662)
+++ branches/pingus_sdl/src/pingu_action.hxx 2007-01-16 00:34:58 UTC (rev
2663)
@@ -21,8 +21,8 @@
#define HEADER_PINGUS_PINGU_ACTION_HXX
#include "pingu_enums.hxx"
+#include "pixel_buffer.hpp"
-
class ActionHolder;
class SceneContext;
class Pingu;
Modified: branches/pingus_sdl/src/pingus_map_manager.cxx
===================================================================
--- branches/pingus_sdl/src/pingus_map_manager.cxx 2007-01-16 00:01:18 UTC
(rev 2662)
+++ branches/pingus_sdl/src/pingus_map_manager.cxx 2007-01-16 00:34:58 UTC
(rev 2663)
@@ -34,7 +34,7 @@
void
PingusMapManager::set_surface (const std::string& level_filename, const
CL_Surface& surf)
{
- CL_PixelBuffer provider = surf.get_pixeldata();
+ PixelBuffer provider = surf.get_pixeldata();
provider.lock ();
Modified: branches/pingus_sdl/src/resource.cxx
===================================================================
--- branches/pingus_sdl/src/resource.cxx 2007-01-16 00:01:18 UTC (rev
2662)
+++ branches/pingus_sdl/src/resource.cxx 2007-01-16 00:34:58 UTC (rev
2663)
@@ -144,10 +144,13 @@
return CL_SpriteDescription("core/misc/404sprite", &resmgr);
}
}
+#endif
-CL_PixelBuffer
+PixelBuffer
Resource::load_pixelbuffer(const ResDescriptor& desc_)
{
+ return PixelBuffer();
+#if 0
CL_SpriteDescription desc = load_sprite_desc(desc_.res_name);
if (desc.get_frames().size() == 0)
@@ -157,14 +160,16 @@
}
return apply_modifier_to_pixelbuffer(desc.get_frames().begin()->first,
desc_);
+#endif
}
-CL_PixelBuffer
+PixelBuffer
Resource::load_pixelbuffer(const std::string& res_name)
{
- return load_pixelbuffer(ResDescriptor(res_name));
+ return PixelBuffer(); ////load_pixelbuffer(ResDescriptor(res_name));
}
+#if 0
CL_Surface
Resource::load_surface(const ResDescriptor& res_desc)
{
@@ -221,8 +226,8 @@
}
}
-CL_PixelBuffer
-Resource::apply_modifier_to_pixelbuffer(CL_PixelBuffer prov, const
ResDescriptor& res_desc)
+PixelBuffer
+Resource::apply_modifier_to_pixelbuffer(PixelBuffer prov, const ResDescriptor&
res_desc)
{
switch (res_desc.modifier)
{
@@ -259,7 +264,7 @@
CL_Surface
Resource::apply_modifier (const CL_Surface& surf, const ResDescriptor&
res_desc)
{
- CL_PixelBuffer prov = surf.get_pixeldata();
+ PixelBuffer prov = surf.get_pixeldata();
switch (res_desc.modifier)
{
Modified: branches/pingus_sdl/src/resource.hxx
===================================================================
--- branches/pingus_sdl/src/resource.hxx 2007-01-16 00:01:18 UTC (rev
2662)
+++ branches/pingus_sdl/src/resource.hxx 2007-01-16 00:34:58 UTC (rev
2663)
@@ -23,6 +23,7 @@
#include <map>
#include <vector>
#include "sprite.hpp"
+#include "pixel_buffer.hpp"
#include "res_descriptor.hxx"
#include "resource_manager.hpp"
@@ -42,7 +43,7 @@
static CL_Surface load_from_source (const ResDescriptor& res_desc);
static CL_Surface load_from_cache (const ResDescriptor& res_desc);
static CL_Surface apply_modifier (const CL_Surface&, const ResDescriptor&
res_desc);
- static CL_PixelBuffer apply_modifier_to_pixelbuffer(CL_PixelBuffer, const
ResDescriptor& res_desc);
+ static PixelBuffer apply_modifier_to_pixelbuffer(PixelBuffer, const
ResDescriptor& res_desc);
/** Returns a list of resources for the given section.
Returns all if blank */
@@ -72,11 +73,12 @@
#endif
static Sprite load_sprite(const ResDescriptor&);
static Sprite load_sprite(const std::string& res_name);
+ static PixelBuffer load_pixelbuffer(const std::string& res_name);
+ static PixelBuffer load_pixelbuffer(const ResDescriptor&);
+
#if 0
static CL_Sprite load_sprite(const std::string& res_name);
static CL_SpriteDescription load_sprite_desc(const std::string& res_name);
- static CL_PixelBuffer load_pixelbuffer(const std::string& res_name);
- static CL_PixelBuffer load_pixelbuffer(const ResDescriptor&);
/** Load a font with res_name from datafile */
static CL_Font load_font(const std::string& res_name);
Modified: branches/pingus_sdl/src/result_screen.cxx
===================================================================
--- branches/pingus_sdl/src/result_screen.cxx 2007-01-16 00:01:18 UTC (rev
2662)
+++ branches/pingus_sdl/src/result_screen.cxx 2007-01-16 00:34:58 UTC (rev
2663)
@@ -145,7 +145,7 @@
background = Resource::load_sprite("core/menu/startscreenbg");
else
{
- CL_PixelBuffer pb =
Blitter::scale_surface_to_canvas(Resource::load_pixelbuffer(
+ PixelBuffer pb =
Blitter::scale_surface_to_canvas(Resource::load_pixelbuffer(
"core/menu/startscreenbg"), CL_Display::get_width(),
CL_Display::get_height());
CL_SpriteDescription desc;
desc.add_frame(pb);
Modified: branches/pingus_sdl/src/screenshot.cxx
===================================================================
--- branches/pingus_sdl/src/screenshot.cxx 2007-01-16 00:01:18 UTC (rev
2662)
+++ branches/pingus_sdl/src/screenshot.cxx 2007-01-16 00:34:58 UTC (rev
2663)
@@ -46,13 +46,13 @@
}
void
-Screenshot::save_target_to_file(CL_PixelBuffer target, const std::string&
filename)
+Screenshot::save_target_to_file(PixelBuffer target, const std::string&
filename)
{
save_target_to_file_fast(target, filename);
}
void
-Screenshot::save_target_to_file_fast(CL_PixelBuffer target, const std::string&
filename)
+Screenshot::save_target_to_file_fast(PixelBuffer target, const std::string&
filename)
{
target.lock();
int num_pixels = target.get_width() * target.get_height();
@@ -139,7 +139,7 @@
}
void
-Screenshot::save_target_to_file_slow(CL_PixelBuffer target, const std::string&
filename)
+Screenshot::save_target_to_file_slow(PixelBuffer target, const std::string&
filename)
{
std::ofstream out(filename.c_str());
@@ -155,7 +155,7 @@
{
for (int x=0; x < target.get_width(); ++x)
{
- CL_Color color = target.get_pixel(x, y);
+ Color color = target.get_pixel(x, y);
out << (int)(color.get_red()) << " "
<< (int)(color.get_green()) << " "
<< (int)(color.get_blue()) << "\n";
Modified: branches/pingus_sdl/src/screenshot.hxx
===================================================================
--- branches/pingus_sdl/src/screenshot.hxx 2007-01-16 00:01:18 UTC (rev
2662)
+++ branches/pingus_sdl/src/screenshot.hxx 2007-01-16 00:34:58 UTC (rev
2663)
@@ -33,11 +33,11 @@
private:
static std::string get_date();
static std::string get_filename();
- static void save_target_to_file_fast(CL_PixelBuffer , const std::string&
filename);
- static void save_target_to_file_slow(CL_PixelBuffer , const std::string&
filename);
+ static void save_target_to_file_fast(PixelBuffer , const std::string&
filename);
+ static void save_target_to_file_slow(PixelBuffer , const std::string&
filename);
public:
static std::string make_screenshot();
- static void save_target_to_file(CL_PixelBuffer , const std::string&
filename);
+ static void save_target_to_file(PixelBuffer , const std::string& filename);
/** buffer must be RGB and width*height*3 large */
static void save_ppm(const std::string& filename, unsigned char* buffer, int
width, int height);
Modified: branches/pingus_sdl/src/smallmap_image.hxx
===================================================================
--- branches/pingus_sdl/src/smallmap_image.hxx 2007-01-16 00:01:18 UTC (rev
2662)
+++ branches/pingus_sdl/src/smallmap_image.hxx 2007-01-16 00:34:58 UTC (rev
2663)
@@ -32,7 +32,7 @@
Server* server;
/** The canvas that represents the small-colmap */
- ////CL_PixelBuffer canvas;
+ ////PixelBuffer canvas;
/** Graphic surface for the generated rectanglar background of the small map
*/
Sprite sur;
Modified: branches/pingus_sdl/src/sprite.cpp
===================================================================
--- branches/pingus_sdl/src/sprite.cpp 2007-01-16 00:01:18 UTC (rev 2662)
+++ branches/pingus_sdl/src/sprite.cpp 2007-01-16 00:34:58 UTC (rev 2663)
@@ -147,4 +147,16 @@
}
+int
+Sprite::get_frame_count() const
+{
+ return 1;
+}
+
+bool
+Sprite::is_finished() const
+{
+ return true;
+}
+
/* EOF */
Modified: branches/pingus_sdl/src/sprite.hpp
===================================================================
--- branches/pingus_sdl/src/sprite.hpp 2007-01-16 00:01:18 UTC (rev 2662)
+++ branches/pingus_sdl/src/sprite.hpp 2007-01-16 00:34:58 UTC (rev 2663)
@@ -45,10 +45,12 @@
int get_width();
int get_height();
- void update(float delta);
+ void update(float delta = 0.033f);
void draw(float x, float y, SDL_Surface* target);
void set_frame(int i);
+ int get_frame_count() const;
+ bool is_finished() const;
operator bool();
private:
SharedPtr<SpriteImpl> impl;
Modified: branches/pingus_sdl/src/start_screen.cxx
===================================================================
--- branches/pingus_sdl/src/start_screen.cxx 2007-01-16 00:01:18 UTC (rev
2662)
+++ branches/pingus_sdl/src/start_screen.cxx 2007-01-16 00:34:58 UTC (rev
2663)
@@ -135,7 +135,7 @@
else
{
#if 0
- CL_PixelBuffer pb =
Blitter::scale_surface_to_canvas(Resource::load_pixelbuffer(
+ PixelBuffer pb =
Blitter::scale_surface_to_canvas(Resource::load_pixelbuffer(
"core/menu/startscreenbg"), Display::get_width(), Display::get_height());
CL_SpriteDescription desc;
desc.add_frame(pb);
Modified: branches/pingus_sdl/src/target_provider.hxx
===================================================================
--- branches/pingus_sdl/src/target_provider.hxx 2007-01-16 00:01:18 UTC (rev
2662)
+++ branches/pingus_sdl/src/target_provider.hxx 2007-01-16 00:34:58 UTC (rev
2663)
@@ -28,7 +28,7 @@
class CL_Canvas;
-class TargetProvider : public CL_PixelBuffer
+class TargetProvider : public PixelBuffer
{
private:
CL_Target* target;
Modified: branches/pingus_sdl/src/world.cxx
===================================================================
--- branches/pingus_sdl/src/world.cxx 2007-01-16 00:01:18 UTC (rev 2662)
+++ branches/pingus_sdl/src/world.cxx 2007-01-16 00:34:58 UTC (rev 2663)
@@ -45,7 +45,7 @@
}
World::World(const PingusLevel& plf)
- : ambient_light(CL_Color(plf.get_ambient_light())),
+ : ambient_light(Color(plf.get_ambient_light())),
gfx_map(new GroundMap(plf)),
game_time(new GameTime (game_speed)),
do_armageddon(false),
@@ -114,7 +114,7 @@
{
WorldObj::set_world(this);
- gc.light().fill_screen(CL_Color(ambient_light));
+ gc.light().fill_screen(Color(ambient_light));
for(WorldObjIter obj = world_obj.begin(); obj != world_obj.end(); ++obj)
{
Modified: branches/pingus_sdl/src/xml_file_reader.cxx
===================================================================
--- branches/pingus_sdl/src/xml_file_reader.cxx 2007-01-16 00:01:18 UTC (rev
2662)
+++ branches/pingus_sdl/src/xml_file_reader.cxx 2007-01-16 00:34:58 UTC (rev
2663)
@@ -113,7 +113,7 @@
}
}
- bool read_color(const char* name, CL_Colorf& value) const
+ bool read_color(const char* name, Colorf& value) const
{
CL_DomElement node = get_node_by_name(name);
if (node.is_element())
Modified: branches/pingus_sdl/src/xml_file_writer.cxx
===================================================================
--- branches/pingus_sdl/src/xml_file_writer.cxx 2007-01-16 00:01:18 UTC (rev
2662)
+++ branches/pingus_sdl/src/xml_file_writer.cxx 2007-01-16 00:34:58 UTC (rev
2663)
@@ -71,7 +71,7 @@
}
void
-XMLFileWriter::write_color (const char* name, const CL_Colorf& color)
+XMLFileWriter::write_color (const char* name, const Colorf& color)
{
(*out) << "<" << name << ">\n"
<< " <red>" << color.red << "</red>\n"
Modified: branches/pingus_sdl/src/xml_file_writer.hxx
===================================================================
--- branches/pingus_sdl/src/xml_file_writer.hxx 2007-01-16 00:01:18 UTC (rev
2662)
+++ branches/pingus_sdl/src/xml_file_writer.hxx 2007-01-16 00:34:58 UTC (rev
2663)
@@ -46,7 +46,7 @@
void write_int (const char* name, int);
void write_float (const char* name, float);
void write_bool (const char* name, bool);
- void write_color (const char* name, const CL_Colorf&);
+ void write_color (const char* name, const Colorf&);
void write_string (const char* name, const std::string&);
void write_vector (const char* name, const Vector&);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] r2663 - in branches/pingus_sdl/src: . actions colliders movers particles,
grumbel at BerliOS <=