[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/actions boarder.cxx,1.9,1.10 bomber.c
From: |
torangan |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/actions boarder.cxx,1.9,1.10 bomber.cxx,1.13,1.14 bridger.cxx,1.17,1.18 bridger.hxx,1.13,1.14 drown.cxx,1.8,1.9 exiter.cxx,1.8,1.9 faller.cxx,1.24,1.25 floater.cxx,1.16,1.17 jumper.cxx,1.12,1.13 laser_kill.cxx,1.9,1.10 slider.cxx,1.10,1.11 smashed.cxx,1.8,1.9 splashed.cxx,1.8,1.9 waiter.cxx,1.8,1.9 walker.cxx,1.23,1.24 |
Date: |
28 Sep 2002 11:52:55 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src/actions
In directory dark:/tmp/cvs-serv10023/actions
Modified Files:
boarder.cxx bomber.cxx bridger.cxx bridger.hxx drown.cxx
exiter.cxx faller.cxx floater.cxx jumper.cxx laser_kill.cxx
slider.cxx smashed.cxx splashed.cxx waiter.cxx walker.cxx
Log Message:
replaced CL_Vector with a smaller Vector class
Index: boarder.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/boarder.cxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- boarder.cxx 14 Sep 2002 19:06:33 -0000 1.9
+++ boarder.cxx 28 Sep 2002 11:52:23 -0000 1.10
@@ -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 <ClanLib/Core/Math/cl_vector.h>
+#include "../vector.hxx"
#include "../graphic_context.hxx"
#include "../pingu.hxx"
#include "../pingus_resource.hxx"
@@ -71,7 +71,7 @@
pingu->set_x(old_pos); // + (pingu->direction * 10);
////pingu->pos.y = 10;
- pingu->apply_force (CL_Vector(speed * pingu->direction * 0.5,
+ pingu->apply_force (Vector(speed * pingu->direction * 0.5,
-speed * abs(pingu->direction) *
0.5));
pingu->set_action(Actions::Walker);
return;
@@ -80,7 +80,7 @@
}
else
{
- pingu->apply_force (CL_Vector(speed * pingu->direction, 0));
+ pingu->apply_force (Vector(speed * pingu->direction, 0));
pingu->set_action(Actions::Walker);
}
}
Index: bomber.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/bomber.cxx,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- bomber.cxx 14 Sep 2002 19:06:33 -0000 1.13
+++ bomber.cxx 28 Sep 2002 11:52:23 -0000 1.14
@@ -71,7 +71,7 @@
{
if (sprite.get_frame () >= 13 && !gfx_exploded)
{
- gc.draw (explo_surf, CL_Vector(static_cast<int>(pingu->get_x () - 32),
+ gc.draw (explo_surf, Vector(static_cast<int>(pingu->get_x () - 32),
static_cast<int>(pingu->get_y () - 48)));
gfx_exploded = true;
}
@@ -110,7 +110,7 @@
static_cast<int>(pingu->get_y () - 16 - (bomber_radius.get_width()/2)));
// Add an explosion to the forces list
- ForcesHolder::add_force(ExplosionForce(5,30,CL_Vector(pingu->get_x (),
+ ForcesHolder::add_force(ExplosionForce(5,30,Vector(pingu->get_x (),
pingu->get_y () -
20)));
}
Index: bridger.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/bridger.cxx,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- bridger.cxx 24 Sep 2002 17:03:28 -0000 1.17
+++ bridger.cxx 28 Sep 2002 11:52:23 -0000 1.18
@@ -91,7 +91,7 @@
else
build_sprite.set_direction (Sprite::RIGHT);
- gc.draw(build_sprite, CL_Vector(pingu->get_x () - (x_offset *
pingu->direction),
+ gc.draw(build_sprite, Vector(pingu->get_x () - (x_offset *
pingu->direction),
pingu->get_y () + y_offset));
break;
@@ -100,7 +100,7 @@
walk_sprite.set_direction (Sprite::LEFT);
else
walk_sprite.set_direction (Sprite::RIGHT);
- gc.draw (walk_sprite, CL_Vector(static_cast<int>(pingu->get_x () -
(x_offset * pingu->direction)),
+ gc.draw (walk_sprite, Vector(static_cast<int>(pingu->get_x () -
(x_offset * pingu->direction)),
static_cast<int>(pingu->get_y () +
y_offset)));
break;
}
Index: bridger.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/bridger.hxx,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- bridger.hxx 27 Sep 2002 11:26:44 -0000 1.13
+++ bridger.hxx 28 Sep 2002 11:52:23 -0000 1.14
@@ -20,7 +20,7 @@
#ifndef HEADER_PINGUS_ACTIONS_BRIDGER_HXX
#define HEADER_PINGUS_ACTIONS_BRIDGER_HXX
-#include <ClanLib/Core/Math/cl_vector.h>
+#include "../vector.hxx"
#include "../game_counter.hxx"
#include "../pingu_action.hxx"
#include "../sprite.hxx"
Index: drown.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/drown.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- drown.cxx 14 Sep 2002 19:06:33 -0000 1.8
+++ drown.cxx 28 Sep 2002 11:52:23 -0000 1.9
@@ -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 <ClanLib/Core/Math/cl_vector.h>
+#include "../vector.hxx"
#include "../graphic_context.hxx"
#include "../pingu.hxx"
#include "drown.hxx"
Index: exiter.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/exiter.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- exiter.cxx 14 Sep 2002 19:06:33 -0000 1.8
+++ exiter.cxx 28 Sep 2002 11:52:23 -0000 1.9
@@ -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 <ClanLib/Core/Math/cl_vector.h>
+#include "../vector.hxx"
#include "../graphic_context.hxx"
#include "../pingu.hxx"
#include "../sound.hxx"
Index: faller.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/faller.cxx,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- faller.cxx 16 Sep 2002 20:31:09 -0000 1.24
+++ faller.cxx 28 Sep 2002 11:52:23 -0000 1.25
@@ -68,8 +68,8 @@
// Apply all forces
pingu->set_velocity(ForcesHolder::apply_forces(pingu->get_pos(),
pingu->get_velocity()));
- CL_Vector newp = pingu->get_velocity();
- CL_Vector last_pos;
+ Vector newp = pingu->get_velocity();
+ Vector last_pos;
// Update x and y by moving the penguin to it's target *slowly*
// and checking if the penguin has hit the bottom at each loop
@@ -138,7 +138,7 @@
}
}
// Reset the velocity
- pingu->set_velocity(CL_Vector(-(pingu->get_velocity().x/3), 0));
+ pingu->set_velocity(Vector(-(pingu->get_velocity().x/3), 0));
pingu->set_pos(last_pos);
// FIXME: UGLY!
Index: floater.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/floater.cxx,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- floater.cxx 16 Sep 2002 20:31:09 -0000 1.16
+++ floater.cxx 28 Sep 2002 11:52:23 -0000 1.17
@@ -42,7 +42,7 @@
{
sprite.update (delta);
- pingu->set_velocity(CL_Vector(0.0, 0.0));
+ pingu->set_velocity(Vector(0.0, 0.0));
if (rel_getpixel(0, -1) == Groundtype::GP_NOTHING) {
++step;
if (step > 0) {
Index: jumper.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/jumper.cxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- jumper.cxx 14 Sep 2002 19:06:33 -0000 1.12
+++ jumper.cxx 28 Sep 2002 11:52:23 -0000 1.13
@@ -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 <ClanLib/Core/Math/cl_vector.h>
+#include "../vector.hxx"
#include "../graphic_context.hxx"
#include "../pingu.hxx"
#include "../string_converter.hxx"
@@ -47,13 +47,13 @@
void
Jumper::update (float delta)
{
- //FIXME CL_Vector
- CL_Vector temp(pingu->get_velocity());
+ //FIXME Vector
+ Vector temp(pingu->get_velocity());
if (pingu->direction.is_right()) {
- pingu->set_velocity(temp + CL_Vector(10.0, -10.0));
+ pingu->set_velocity(temp + Vector(10.0, -10.0));
} else {
- pingu->set_velocity(temp + CL_Vector(-10.0, -10.0));
+ pingu->set_velocity(temp + Vector(-10.0, -10.0));
}
// Move the pingu in the air, so that it can start 'falling'
Index: laser_kill.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/laser_kill.cxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- laser_kill.cxx 14 Sep 2002 22:41:31 -0000 1.9
+++ laser_kill.cxx 28 Sep 2002 11:52:23 -0000 1.10
@@ -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 <ClanLib/Core/Math/cl_vector.h>
+#include "../vector.hxx"
#include "../graphic_context.hxx"
#include "../pingu.hxx"
#include "laser_kill.hxx"
@@ -44,7 +44,7 @@
else
sprite.set_direction(Sprite::RIGHT);
- gc.draw(sprite, pingu->get_pos () + CL_Vector (0, 2));
+ gc.draw(sprite, pingu->get_pos () + Vector (0, 2));
}
void
Index: slider.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/slider.cxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- slider.cxx 16 Sep 2002 20:31:09 -0000 1.10
+++ slider.cxx 28 Sep 2002 11:52:23 -0000 1.11
@@ -56,12 +56,12 @@
{
speed = (speed > 5) ? 5 : speed;
- //FIXME CL_Vector
- CL_Vector temp(pingu->get_velocity());
+ //FIXME Vector
+ Vector temp(pingu->get_velocity());
if (pingu->direction.is_right()) {
- pingu->set_velocity(temp + CL_Vector(speed, 0.0));
+ pingu->set_velocity(temp + Vector(speed, 0.0));
} else {
- pingu->set_velocity(temp + CL_Vector(-speed, 0.0));
+ pingu->set_velocity(temp + Vector(-speed, 0.0));
}
pingu->set_action(Actions::Walker);
@@ -76,7 +76,7 @@
void
Slider::draw (GraphicContext& gc)
{
- gc.draw (sprite, pingu->get_pos() + CL_Vector(0, -2));
+ gc.draw (sprite, pingu->get_pos() + Vector(0, -2));
}
} // namespace Actions
Index: smashed.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/smashed.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- smashed.cxx 16 Sep 2002 16:47:41 -0000 1.8
+++ smashed.cxx 28 Sep 2002 11:52:23 -0000 1.9
@@ -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 <ClanLib/Core/Math/cl_vector.h>
+#include "../vector.hxx"
#include "../graphic_context.hxx"
#include "../pingu.hxx"
#include "smashed.hxx"
Index: splashed.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/splashed.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- splashed.cxx 14 Sep 2002 19:06:33 -0000 1.8
+++ splashed.cxx 28 Sep 2002 11:52:23 -0000 1.9
@@ -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 <ClanLib/Core/Math/cl_vector.h>
+#include "../vector.hxx"
#include "../graphic_context.hxx"
#include "../world.hxx"
#include "../pingu.hxx"
Index: waiter.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/waiter.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- waiter.cxx 14 Sep 2002 19:06:33 -0000 1.8
+++ waiter.cxx 28 Sep 2002 11:52:23 -0000 1.9
@@ -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 <ClanLib/Core/Math/cl_vector.h>
+#include "../vector.hxx"
#include "../graphic_context.hxx"
#include "../pingu.hxx"
#include "../pingus_resource.hxx"
Index: walker.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/walker.cxx,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- walker.cxx 16 Sep 2002 20:31:09 -0000 1.23
+++ walker.cxx 28 Sep 2002 11:52:23 -0000 1.24
@@ -34,7 +34,7 @@
walker.set_align_center_bottom();
// Reset the velocity
- pingu->set_velocity(CL_Vector());
+ pingu->set_velocity(Vector());
}
void
@@ -43,7 +43,7 @@
// update the sprite
walker.update(delta);
- CL_Vector last_pos = pingu->get_pos();
+ Vector last_pos = pingu->get_pos();
/* How should this code work?
@@ -204,7 +204,7 @@
else
walker.set_direction(Sprite::RIGHT);
- gc.draw (walker, pingu->get_pos() + CL_Vector (0, +2));
+ gc.draw (walker, pingu->get_pos() + Vector (0, +2));
}
} // namespace Actions
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/actions boarder.cxx,1.9,1.10 bomber.cxx,1.13,1.14 bridger.cxx,1.17,1.18 bridger.hxx,1.13,1.14 drown.cxx,1.8,1.9 exiter.cxx,1.8,1.9 faller.cxx,1.24,1.25 floater.cxx,1.16,1.17 jumper.cxx,1.12,1.13 laser_kill.cxx,1.9,1.10 slider.cxx,1.10,1.11 smashed.cxx,1.8,1.9 splashed.cxx,1.8,1.9 waiter.cxx,1.8,1.9 walker.cxx,1.23,1.24,
torangan <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src/worldobjsdata bumper_data.hxx,1.3,1.4 conveyor_belt_data.cxx,1.5,1.6 conveyor_belt_data.hxx,1.3,1.4 entrance_data.cxx,1.1,1.2 entrance_data.hxx,1.1,1.2 exit_data.hxx,1.1,1.2 fake_exit_data.hxx,1.3,1.4 groundpiece_data.cxx,1.5,1.6 groundpiece_data.hxx,1.2,1.3 guillotine_data.hxx,1.3,1.4 hammer_data.hxx,1.3,1.4 hotspot_data.hxx,1.2,1.3 ice_block_data.cxx,1.5,1.6 ice_block_data.hxx,1.3,1.4 info_box_data.cxx,1.7,1.8 info_box_data.hxx,1.3,1.4 laser_exit_data.hxx,1.3,1.4 liquid_data.hxx,1.2,1.3 prefab_obj_data.cxx,1.3,1.4 prefab_obj_data.hxx,1.3,1.4 smasher_data.hxx,1.3,1.4 snow_generator_data.cxx,1.3,1.4 snow_generator_data.hxx,1.3,1.4 solid_color_background_data.hxx,1.2,1.3 spike_data.hxx,1.3,1.4 starfield_background_data.cxx,1.3,1.4 surface_background_data.cxx,1.3,1.4 surface_background_data.hxx,1.2,1.3 switch_door_data.cxx,1.6,1.7 switch_door_data.hxx,1.3,1.4 teleporter_data.hxx,1.2,1.3 thunderstorm_background_data.hxx,1.2,1.3 worldobj_group_data.cxx,1.5,1.6
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src/editor editor.cxx,1.34,1.35 editor_event.cxx,1.36,1.37 editor_view.cxx,1.3,1.4 editor_view.hxx,1.6,1.7 editorobj.hxx,1.16,1.17 editorobj_group.cxx,1.5,1.6 editorobj_group.hxx,1.11,1.12 entrance_window.cxx,1.5,1.6 object_manager.cxx,1.34,1.35 object_manager.hxx,1.20,1.21 object_selector.cxx,1.28,1.29 object_selector.hxx,1.12,1.13 rect_editorobj.cxx,1.6,1.7 rect_editorobj.hxx,1.6,1.7 scroll_map.cxx,1.4,1.5 selection.cxx,1.14,1.15 selection.hxx,1.11,1.12 sprite_editorobj.cxx,1.7,1.8 sprite_editorobj.hxx,1.8,1.9 start_pos.cxx,1.6,1.7 start_pos.hxx,1.7,1.8 status_line.cxx,1.8,1.9 weather_obj.cxx,1.10,1.11 weather_obj.hxx,1.9,1.10
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src/worldobjsdata bumper_data.hxx,1.3,1.4 conveyor_belt_data.cxx,1.5,1.6 conveyor_belt_data.hxx,1.3,1.4 entrance_data.cxx,1.1,1.2 entrance_data.hxx,1.1,1.2 exit_data.hxx,1.1,1.2 fake_exit_data.hxx,1.3,1.4 groundpiece_data.cxx,1.5,1.6 groundpiece_data.hxx,1.2,1.3 guillotine_data.hxx,1.3,1.4 hammer_data.hxx,1.3,1.4 hotspot_data.hxx,1.2,1.3 ice_block_data.cxx,1.5,1.6 ice_block_data.hxx,1.3,1.4 info_box_data.cxx,1.7,1.8 info_box_data.hxx,1.3,1.4 laser_exit_data.hxx,1.3,1.4 liquid_data.hxx,1.2,1.3 prefab_obj_data.cxx,1.3,1.4 prefab_obj_data.hxx,1.3,1.4 smasher_data.hxx,1.3,1.4 snow_generator_data.cxx,1.3,1.4 snow_generator_data.hxx,1.3,1.4 solid_color_background_data.hxx,1.2,1.3 spike_data.hxx,1.3,1.4 starfield_background_data.cxx,1.3,1.4 surface_background_data.cxx,1.3,1.4 surface_background_data.hxx,1.2,1.3 switch_door_data.cxx,1.6,1.7 switch_door_data.hxx,1.3,1.4 teleporter_data.hxx,1.2,1.3 thunderstorm_background_data.hxx,1.2,1.3 worldobj_group_data.cxx,1.5,1.6
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src/editor editor.cxx,1.34,1.35 editor_event.cxx,1.36,1.37 editor_view.cxx,1.3,1.4 editor_view.hxx,1.6,1.7 editorobj.hxx,1.16,1.17 editorobj_group.cxx,1.5,1.6 editorobj_group.hxx,1.11,1.12 entrance_window.cxx,1.5,1.6 object_manager.cxx,1.34,1.35 object_manager.hxx,1.20,1.21 object_selector.cxx,1.28,1.29 object_selector.hxx,1.12,1.13 rect_editorobj.cxx,1.6,1.7 rect_editorobj.hxx,1.6,1.7 scroll_map.cxx,1.4,1.5 selection.cxx,1.14,1.15 selection.hxx,1.11,1.12 sprite_editorobj.cxx,1.7,1.8 sprite_editorobj.hxx,1.8,1.9 start_pos.cxx,1.6,1.7 start_pos.hxx,1.7,1.8 status_line.cxx,1.8,1.9 weather_obj.cxx,1.10,1.11 weather_obj.hxx,1.9,1.10
- Index(es):