#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;
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;
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);
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;
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");