more fixes for Kugelblitz and Rain
[supertux.git] / src / badguy / yeti.cpp
index 87faba0..50aa888 100644 (file)
 #include <float.h>
 #include <sstream>
 #include <memory>
-#include "yeti.h"
-#include "object/camera.h"
-#include "yeti_stalactite.h"
-#include "bouncing_snowball.h"
-#include "game_session.h"
-#include "scripting/script_interpreter.h"
+#include "yeti.hpp"
+#include "object/camera.hpp"
+#include "yeti_stalactite.hpp"
+#include "bouncing_snowball.hpp"
+#include "game_session.hpp"
+#include "scripting/script_interpreter.hpp"
 
 static const float JUMP_VEL1 = 250;
 static const float JUMP_VEL2 = 700;
@@ -47,8 +47,10 @@ Yeti::Yeti(const lisp::Lisp& reader)
   sprite->set_action("right");
   state = INIT;
   side = LEFT;
+#if 0
   sound_manager->preload_sound("yeti_gna");
   sound_manager->preload_sound("yeti_roar");
+#endif
   hit_points = INITIAL_HITPOINTS;
   reader.get("dead-script", dead_script);
   countMe = false;
@@ -62,7 +64,7 @@ void
 Yeti::draw(DrawingContext& context)
 {
   // we blink when we are safe
-  if(safe_timer.started() && size_t(global_time*40)%2)
+  if(safe_timer.started() && size_t(game_time*40)%2)
     return;
 
   BadGuy::draw(context);
@@ -87,7 +89,7 @@ Yeti::active_update(float elapsed_time)
     case ANGRY_JUMPING:
       if(timer.check()) {
         // jump
-        sound_manager->play_sound("yeti_gna");
+        sound_manager->play("sounds/yeti_gna.wav");
         physic.set_velocity_y(JUMP_VEL1);
       }
       break;
@@ -139,7 +141,7 @@ Yeti::collision_squished(Player& player)
     return true;
 
   player.bounce(*this);
-  sound_manager->play_sound("yeti_roar");
+  sound_manager->play("sounds/yeti_roar.wav");
   hit_points--;
   if(hit_points <= 0) {
     sprite->set_action("dead");