-#if 0
-void
-Player::collision(void* p_c_object, int c_object)
-{
- //BadGuy* pbad_c = NULL;
- //Trampoline* ptramp_c = NULL;
- //FlyingPlatform* pplatform_c = NULL;
-
- switch (c_object)
- {
- case CO_BADGUY:
- pbad_c = (BadGuy*) p_c_object;
-
- /* Hurt player if he touches a badguy */
- if (!pbad_c->dying && !dying &&
- !safe_timer.started() &&
- pbad_c->mode != BadGuy::HELD)
- {
- if (pbad_c->mode == BadGuy::FLAT && input.fire == DOWN
- && !holding_something)
- {
- holding_something = true;
- pbad_c->mode = BadGuy::HELD;
- pbad_c->base.y-=8;
- }
- else if (pbad_c->mode == BadGuy::FLAT)
- {
- // Don't get hurt if we're kicking a flat badguy!
- }
- else if (pbad_c->mode == BadGuy::KICK)
- {
- /* Hurt if you get hit by kicked laptop: */
- if (!invincible_timer.started())
- {
- kill(SHRINK);
- }
- else
- pbad_c->kill_me(20);
- }
- else if (!pbad_c->frozen_timer.check() && (pbad_c->kind == BAD_MRBOMB
- || pbad_c->kind == BAD_JUMPY || pbad_c->kind == BAD_FISH
- || pbad_c->kind == BAD_SPIKY))
- pbad_c->kill_me(20);
- else
- {
- if (!invincible_timer.started())
- {
- kill(SHRINK);
- }
- else
- {
- pbad_c->kill_me(25);
- }
- }
- player_status.score_multiplier++;
- }
- break;
-
- case CO_TRAMPOLINE:
- ptramp_c = (Trampoline*) p_c_object;
-
- // Pick up trampoline
- if (ptramp_c->mode != Trampoline::M_HELD && input.fire == DOWN && !holding_something && on_ground())
- {
- holding_something = true;
- ptramp_c->mode = Trampoline::M_HELD;
- ptramp_c->base.y -= 8;
- }
- // Set down trampoline
- else if (ptramp_c->mode == Trampoline::M_HELD && input.fire != DOWN)
- {
- holding_something = false;
- ptramp_c->mode = Trampoline::M_NORMAL;
- ptramp_c->base.y += 8;
- ptramp_c->physic.set_velocity(physic.get_velocity_x(), physic.get_velocity_y());
-
- //if (dir == RIGHT)
- // ptramp_c->base.x = base.x + base.width+1;
- //else /* LEFT */
- // ptramp_c->base.x = base.x - base.width-1;
- }
-/*
- // Don't let tux walk through trampoline
- else if (ptramp_c->mode != Trampoline::M_HELD && on_ground())
- {
- if (physic.get_velocity_x() > 0) // RIGHT
- {
- physic.set_velocity_x(0);
- base.x = ptramp_c->base.x - base.width;
- }
- else if (physic.get_velocity_x() < 0) // LEFT
- {
- physic.set_velocity_x(0);
- base.x = ptramp_c->base.x + ptramp_c->base.width;
- }
- }
-*/
- break;
- case CO_FLYING_PLATFORM:
- pplatform_c = (FlyingPlatform*) p_c_object;
-
- base.y = pplatform_c->base.y - base.height;
- physic.set_velocity_x(pplatform_c->get_vel_x());
-
- physic.enable_gravity(false);
- can_jump = true;
- fall_mode = ON_GROUND;
- break;
-
- default:
- break;
- }
-
-}
-#endif
-