Esempio n. 1
0
static void
clevel (unsigned char *message, int size)
{
  int             nos;
  GETCHAR (message, lastlevel);
  GETCHAR (message + 1, nos);
  GETCHAR (message + 2, gameplan);
  gamemode = GAME;
#ifdef SOUND
  sound = ssound;
#endif
  gameplan_init ();
  effect (nos);
  nodisplayco = 10;
  Ready ();
}
Esempio n. 2
0
void
start ()
{
  int             i;
#ifdef JOYSTICK
  if (joystickplayer[0] >= 0 && !calibrated[0])
    {
      joystick = 0;
      joypos = 0;
      gamemode = JOY;
      calibrate_init ();
      return;
    }
  if (joystickplayer[1] >= 1 && !calibrated[1])
    {
      joystick = 1;
      joypos = 0;
      gamemode = JOY;
      calibrate_init ();
      return;
    }
#endif
  for (i = 0; i < nrockets; i++)
    {
      object[i].score = 0;
#ifdef JOYSTICK
      if(joystickplayer[0]==i)
	  {
	     object[i].joymulx = joystickmul[0]/center[0][0];
	     object[i].joymuly = joystickmul[0]/center[0][1];
	     object[i].joythresh = joystickthresh[0];
	  }
      else if(joystickplayer[1]==i)
	  {
	     object[i].joymulx = joystickmul[1]/center[1][0];
	     object[i].joymuly = joystickmul[1]/center[1][1];
	     object[i].joythresh = joystickthresh[1];
	  }
#endif
    }
  sound = ssound;
  gamemode = GAME;
  gameplan_init ();
  init_objects ();
}