[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/actions basher.cxx, 1.32, 1.33 basher
From: |
Ingo Ruhnke |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/actions basher.cxx, 1.32, 1.33 basher.hxx, 1.18, 1.19 |
Date: |
Sat, 13 Dec 2003 12:21:26 +0100 |
Update of /var/lib/cvs/Games/Pingus/src/actions
In directory dark:/tmp/cvs-serv4987/actions
Modified Files:
basher.cxx basher.hxx
Log Message:
- some minimal changes to make it compilable
Index: basher.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/actions/basher.cxx,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- basher.cxx 22 Oct 2003 11:11:23 -0000 1.32
+++ basher.cxx 13 Dec 2003 11:21:24 -0000 1.33
@@ -25,6 +25,7 @@
#include "../pingus_resource.hxx"
#include "../pingu.hxx"
#include "../world.hxx"
+#include "../resources.hxx"
#include "basher.hxx"
namespace Pingus {
@@ -32,15 +33,15 @@
Basher::Basher (Pingu* p)
: PinguAction(p),
- sprite("Pingus/basher0", "pingus"),
+ sprite("Pingus/basher0", resources),
bash_radius(PingusResource::load_surface("Other/bash_radius", "pingus")),
bash_radius_gfx(PingusResource::load_surface("Other/bash_radius_gfx",
"pingus")),
basher_c(0),
first_bash(true)
{
- sprite.set_align_center_bottom();
+ sprite.set_alignment(origin_bottom_center);
- bash_radius_width = bash_radius.get_width();
+ bash_radius_width = bash_radius.get_width();
bash_radius_gfx_width = bash_radius_gfx.get_width();
// The +1 is just in case bash_radius is an odd no. In which case, want to
@@ -55,11 +56,12 @@
void
Basher::draw (GraphicContext& gc)
{
+#ifdef CLANLIB_0_6
if (pingu->direction.is_left())
sprite.set_direction (Sprite::LEFT);
else
sprite.set_direction (Sprite::RIGHT);
-
+#endif
gc.draw (sprite, pingu->get_pos() + Vector (0, +1));
}
@@ -99,7 +101,7 @@
if (basher_c % 2 == 0)
bash();
}
- else if (sprite.get_progress () > 0.6f) // FIXME: EVIL!
+ else if (sprite.get_current_frame()/float(sprite.get_frame_count()) >
0.6f) // FIXME: EVIL!
{
pingu->set_action(Actions::Walker);
}
Index: basher.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/actions/basher.hxx,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- basher.hxx 18 Oct 2003 23:17:27 -0000 1.18
+++ basher.hxx 13 Dec 2003 11:21:24 -0000 1.19
@@ -29,7 +29,7 @@
class Basher : public PinguAction
{
private:
- Sprite sprite;
+ CL_Sprite sprite;
CL_Surface bash_radius;
CL_Surface bash_radius_gfx;
int basher_c;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/actions basher.cxx, 1.32, 1.33 basher.hxx, 1.18, 1.19,
Ingo Ruhnke <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src Makefile.am, 1.157, 1.158 globals.hxx, 1.19, 1.20 pingus_error.cxx, 1.11, 1.12 pingus_error.hxx, 1.9, 1.10 pingus_resource.cxx, 1.33, 1.34 system.cxx, 1.22, 1.23 system.hxx, 1.11, 1.12
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src/gui graphic_context.cxx,1.2,1.3
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src Makefile.am, 1.157, 1.158 globals.hxx, 1.19, 1.20 pingus_error.cxx, 1.11, 1.12 pingus_error.hxx, 1.9, 1.10 pingus_resource.cxx, 1.33, 1.34 system.cxx, 1.22, 1.23 system.hxx, 1.11, 1.12
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src/gui graphic_context.cxx,1.2,1.3
- Index(es):