void
BadGuy::kill_squished(Player& player)
{
- sound_manager->play("sounds/squish.ogg", get_pos());
+ sound_manager->play("sounds/squish.wav", get_pos());
physic.enable_gravity(true);
physic.set_velocity_x(0);
physic.set_velocity_y(0);
void
BadGuy::kill_fall()
{
- sound_manager->play("sounds/fall.ogg", get_pos());
+ sound_manager->play("sounds/fall.wav", get_pos());
global_stats.add_points(BADGUYS_KILLED_STAT, 1);
physic.set_velocity_y(0);
physic.enable_gravity(true);
{
state = 1;
sprite->set_action("explosion");
- sound_manager->play("sounds/explosion.ogg", get_pos());
+ sound_manager->play("sounds/explosion.wav", get_pos());
timer.start(EXPLOSIONTIME);
}
Flame::activate()
{
delete source;
- source = sound_manager->create_sound_source("sounds/flame.ogg");
+ source = sound_manager->create_sound_source("sounds/flame.wav");
if(!source) {
std::cerr << "Couldn't start flame sound.\n";
return;
physic.set_velocity_y(JUMPSPEED);
// TODO create a nice sound for this...
- //sound_manager->play("sounds/skid.ogg");
+ //sound_manager->play("sounds/skid.wav");
} else if(chit.normal.y < .5) { // bumped on roof
physic.set_velocity_y(0);
}
dir = dir == LEFT ? RIGHT : LEFT;
sprite->set_action(dir == LEFT ? "flat-left" : "flat-right");
physic.set_velocity_x(-physic.get_velocity_x());
- sound_manager->play("sounds/iceblock_bump.ogg", get_pos());
+ sound_manager->play("sounds/iceblock_bump.wav", get_pos());
break;
}
case ICESTATE_FLAT:
}
// flatten
- sound_manager->play("sounds/stomp.ogg", get_pos());
+ sound_manager->play("sounds/stomp.wav", get_pos());
physic.set_velocity_x(0);
physic.set_velocity_y(0);
break;
case ICESTATE_FLAT:
// kick
- sound_manager->play("sounds/kick.ogg", get_pos());
+ sound_manager->play("sounds/kick.wav", get_pos());
if(player.get_pos().x < get_pos().x) {
dir = RIGHT;
mystate = STATE_NORMAL;
activate();
- sound_manager->play("sounds/squish.ogg", get_pos());
+ sound_manager->play("sounds/squish.wav", get_pos());
player.bounce(*this);
} else {
sprite->set_action(dir == LEFT ? "squished-left" : "squished-right");
bullet_hitpoints--;
if (bullet_hitpoints <= 0) {
hitpoints = 0;
- sound_manager->play("sounds/fall.ogg", this,
+ sound_manager->play("sounds/fall.wav", this,
Sector::current()->player->get_pos());
physic.set_velocity_y(0);
physic.enable_gravity(true);
RocketExplosion::explode()
{
sprite->set_action(dir == LEFT ? "explosion-left" : "explosion-right");
- sound_manager->play("sounds/explosion.ogg", get_pos());
+ sound_manager->play("sounds/explosion.wav", get_pos());
timer.start(EXPLOSIONTIME, true);
}
case ANGRY_JUMPING:
if(timer.check()) {
// jump
- sound_manager->play("sounds/yeti_gna.ogg");
+ sound_manager->play("sounds/yeti_gna.wav");
physic.set_velocity_y(JUMP_VEL1);
}
break;
return true;
player.bounce(*this);
- sound_manager->play("sounds/yeti_roar.ogg");
+ sound_manager->play("sounds/yeti_roar.wav");
hit_points--;
if(hit_points <= 0) {
sprite->set_action("dead");
try {
std::string filename = "sounds/";
filename += sample;
- filename += ".ogg";
+ filename += ".wav";
sound_source = sound_manager->create_sound_source(filename);
if(!sound_source)
throw std::runtime_error("file not found");
BonusBlock::try_open()
{
if(sprite->get_action_name() == "empty") {
- sound_manager->play("sounds/brick.ogg");
+ sound_manager->play("sounds/brick.wav");
return;
}
get_pos(), new Flower(Flower::FIREFLOWER));
sector->add_object(riser);
}
- sound_manager->play("sounds/upgrade.ogg");
+ sound_manager->play("sounds/upgrade.wav");
break;
case CONTENT_ICEGROW:
get_pos(), new Flower(Flower::ICEFLOWER));
sector->add_object(riser);
}
- sound_manager->play("sounds/upgrade.ogg");
+ sound_manager->play("sounds/upgrade.wav");
break;
case CONTENT_STAR:
SpecialRiser* riser = new SpecialRiser(get_pos(), object);
object = 0;
sector->add_object(riser);
- sound_manager->play("sounds/upgrade.ogg");
+ sound_manager->play("sounds/upgrade.wav");
break;
//default:
if(sprite->get_action_name() == "empty")
return;
- sound_manager->play("sounds/brick.ogg");
+ sound_manager->play("sounds/brick.wav");
Sector* sector = Sector::current();
Player& player = *(sector->player);
if(coin_counter > 0) {
sector->add_object(new Particles(pos, 0, 360, Vector(140, 140),
Vector(0, 0), 45, Color(red, green, 0), 3, 1.3,
LAYER_FOREGROUND1+1));
- sound_manager->play("sounds/fireworks.ogg");
+ sound_manager->play("sounds/fireworks.wav");
timer.start(((float) rand() / RAND_MAX) + .5);
}
}
else
player->set_bonus(ICE_BONUS, true);
- sound_manager->play("sounds/fire-flower.ogg");
+ sound_manager->play("sounds/fire-flower.wav");
remove_me();
return ABORT_MOVE;
}
Player* player = dynamic_cast<Player*>(&other);
if(player != 0) {
player->set_bonus(GROWUP_BONUS, true);
- sound_manager->play("sounds/grow.ogg");
+ sound_manager->play("sounds/grow.wav");
remove_me();
return ABORT_MOVE;
return;
sprite->set_action("empty");
- sound_manager->play("sounds/brick.ogg");
+ sound_manager->play("sounds/brick.wav");
start_bounce();
flags |= FLAG_SOLID;
visible = true;
// let's skid!
if(fabs(vx)>SKID_XM && !skidding_timer.started()) {
skidding_timer.start(SKID_TIME);
- sound_manager->play("sounds/skid.ogg");
+ sound_manager->play("sounds/skid.wav");
// dust some partcles
Sector::current()->add_object(
new Particles(
can_flap = false;
flaps_nb = 0; // Ricardo's flapping
if (is_big())
- sound_manager->play("sounds/bigjump.ogg");
+ sound_manager->play("sounds/bigjump.wav");
else
- sound_manager->play("sounds/jump.ogg");
+ sound_manager->play("sounds/jump.wav");
} else if(!controller->hold(Controller::JUMP)) { // Let go of jump key
if (!flapping && !duck && !falling_from_flap && !on_ground()) {
can_flap = true;
void
Player::make_invincible()
{
- sound_manager->play("sounds/invincible.ogg");
+ sound_manager->play("sounds/invincible.wav");
invincible_timer.start(TUX_INVINCIBLE_TIME);
Sector::current()->play_music(HERRING_MUSIC);
}
safe_timer.get_timeleft() > 0 || invincible_timer.get_timeleft() > 0)
return;
- sound_manager->play("sounds/hurt.ogg");
+ sound_manager->play("sounds/hurt.wav");
physic.set_velocity_x(0);
// some defaults if no script has been set
if (sprite->get_name() == "egg") {
player->set_bonus(GROWUP_BONUS, true);
- sound_manager->play("sounds/grow.ogg");
+ sound_manager->play("sounds/grow.wav");
} else if (sprite->get_name() == "fireflower") {
player->set_bonus(FIRE_BONUS, true);
- sound_manager->play("sounds/fire-flower.ogg");
+ sound_manager->play("sounds/fire-flower.wav");
} else if (sprite->get_name() == "star") {
player->make_invincible();
} else if (sprite->get_name() == "1up") {
{
if(lives < MAX_LIVES)
++lives;
- sound_manager->play("sounds/lifeup.ogg");
+ sound_manager->play("sounds/lifeup.wav");
}
void
incLives();
coins = 0;
}
- sound_manager->play("sounds/coin.ogg");
+ sound_manager->play("sounds/coin.wav");
}
void
}
add_object(new_bullet);
- sound_manager->play("sounds/shoot.ogg");
+ sound_manager->play("sounds/shoot.wav");
return true;
}
if (special_tile->teleport_dest != Vector(-1,-1))
{
// TODO: an animation, camera scrolling or a fading would be a nice touch
- sound_manager->play("sounds/warp.ogg");
+ sound_manager->play("sounds/warp.wav");
tux->back_direction = D_NONE;
tux->set_tile_pos(special_tile->teleport_dest);
SDL_Delay(1000);