// ****************************************************************************
//
// Logic 246: Garbage Truck
//
// ****************************************************************************

#include "defines.txt"
#define corpse o1

if (new_room) {
  load.pic(room_no);
  draw.pic(room_no);
  discard.pic(room_no);
  set.horizon(0);

  stop.motion(ego);
  erase(ego);

  show.pic();

  animate.obj(corpse);
  load.view(12);
  set.view(corpse,12);
  set.loop(corpse,0);
  set.cel(corpse,0);
  set.priority(corpse,5);
  v255 = 18;
  cycle.time(corpse,v255);
  start.cycling(corpse);
  ignore.objs(corpse);
  position(corpse,35,120);
  draw(corpse);

  reset(f254);
  reset(f255);

}

if ((said("look","garbage") || said("take","garbage") || said("move","garbage") || said ("investigate","garbage") || said("dig","garbage") || said("open","garbage") || said("feel","garbage"))) {
  load.sound(3);
  prevent.input();
  set.loop(corpse,1); v255 = 8; cycle.time(corpse,v255);
  sound(3,f255);
  end.of.loop(corpse,f254);
}

if ((f254) && (f255)) {
  reset(f254); reset(f255);
  accept.input();
  new.room(3);
}


if ((said("look") || said("look","truck") || said("look","trunk"))) {
  print("There is some mysterious rustling in the pile of garbage.");
}


return();