PlayerSprite smalltux;
PlayerSprite largetux;
+PlayerSprite icetux;
PlayerSprite firetux;
PlayerKeymap keymap;
base.height = 32;
size = SMALL;
- got_coffee = false;
+ got_power = NONE_POWER;
base.x = plevel->start_pos_x;
base.y = plevel->start_pos_y;
/* Shoot! */
- if (input.fire == DOWN && input.old_fire == UP && got_coffee)
+ if (input.fire == DOWN && input.old_fire == UP && got_power != NONE_POWER)
{
World::current()->add_bullet(base.x, base.y, physic.get_velocity_x(), dir);
input.old_fire = DOWN;
if (size == SMALL)
sprite = &smalltux;
- else if (got_coffee)
+ else if (got_power == FIRE_POWER)
sprite = &firetux;
+ else if (got_power == ICE_POWER)
+ sprite = &icetux;
else
sprite = &largetux;
}
if (debug_mode)
- fillrect(base.x, base.y,
+ fillrect(base.x - scroll_x, base.y - scroll_y,
base.width, base.height, 75,75,75, 150);
}
if (mode == SHRINK && size == BIG)
{
- if (got_coffee)
+ if (got_power != NONE_POWER)
{
- got_coffee = false;
+ got_power = NONE_POWER;
}
else
{
void
Player::remove_powerups()
{
- got_coffee = false;
+ got_power = NONE_POWER;
size = SMALL;
base.height = 32;
}