Update of /cvsroot/super-tux/supertux/src/badguy
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16796/src/badguy
Modified Files:
badguy.cpp jumpy.cpp jumpy.h
Log Message:
-Incorporated Marcin KoÅcielnicki patch that reintroduces the flying
snowball, thanks
-Changed worldmapfile format to support intro texts
-Moved intro.txt extro.txt and extro-bonus.txt to levels/world1 and
levels/bonus1
-Added a new text mode to the textfile system display that aligns the text at
the left side. This is alot easier to read than all text centered.
Still the current font is hard to read for long texts and should be
improved/replaced somehow...
-Use new translation system in the .txt files
Index: jumpy.cpp
===================================================================
RCS file: /cvsroot/super-tux/supertux/src/badguy/jumpy.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- jumpy.cpp 2 Dec 2004 00:25:27 -0000 1.6
+++ jumpy.cpp 5 Dec 2004 16:57:14 -0000 1.7
@@ -47,3 +47,14 @@
return CONTINUE;
}
+
+void
+Jumpy::active_action(float elapsed_time)
+{
+ BadGuy::active_action(elapsed_time);
+
+ dir = Sector::current()->player->get_pos().x > get_pos().x
+ ? RIGHT : LEFT;
+ //FIXME: add middle and up here
+ sprite->set_action(dir == LEFT ? "left-down" : "right-down");
+}
Index: jumpy.h
===================================================================
RCS file: /cvsroot/super-tux/supertux/src/badguy/jumpy.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- jumpy.h 29 Nov 2004 00:12:24 -0000 1.3
+++ jumpy.h 5 Dec 2004 16:57:14 -0000 1.4
@@ -12,6 +12,7 @@
HitResponse collision_badguy(BadGuy& other, const CollisionHit& hit);
void write(lisp::Writer& writer);
+ void active_action(float);
private:
HitResponse hit(const CollisionHit& hit);
Index: badguy.cpp
===================================================================
RCS file: /cvsroot/super-tux/supertux/src/badguy/badguy.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- badguy.cpp 29 Nov 2004 00:12:24 -0000 1.8
+++ badguy.cpp 5 Dec 2004 16:57:14 -0000 1.9
@@ -155,6 +155,7 @@
{
SoundManager::get()->play_sound(IDToSound(SND_SQUISH), get_pos(),
player.get_pos());
+ physic.enable_gravity(true);
physic.set_velocity_x(0);
physic.set_velocity_y(0);
set_state(STATE_SQUISHED);
|