예제 #1
0
// Public functions
Paddle* paddle_create(void)
{
    if (imgPaddle == NULL)
    {
        imgPaddle = gbitmap_create_with_resource(RESOURCE_ID_IMG_PADDLE);
    }
    Paddle* new_paddle = malloc(sizeof(Paddle));
    new_paddle->layer = bitmap_layer_create(PADDLE_START_POS);
    bitmap_layer_set_bitmap(new_paddle->layer, imgPaddle);
    paddle_reset(new_paddle);

    return new_paddle;
}
예제 #2
0
void input_reset(void)
{
  /* Reset input devices */
  int i;
  for (i=0; i<MAX_DEVICES; i++)
  {
    switch (input.dev[i])
    {
      case DEVICE_PAD2B:
      case DEVICE_PAD3B:
      case DEVICE_PAD6B:
      {
        gamepad_reset(i);
        break;
      }

      case DEVICE_LIGHTGUN:
      {
        lightgun_reset(i);
        break;
      }
#ifndef GCWZERO
      case DEVICE_MOUSE:
      {
        mouse_reset(i);
        break;
      }

      case DEVICE_ACTIVATOR:
      {
        activator_reset(i >> 2);
        break;
      }

      case DEVICE_XE_1AP:
      {
        xe_1ap_reset(i);
        break;
      }

      case DEVICE_PADDLE:
      {
        paddle_reset(i);
        break;
      }

      case DEVICE_SPORTSPAD:
      {
        sportspad_reset(i);
        break;
      }

      case DEVICE_TEREBI:
      {
        terebi_oekaki_reset();
        break;
      }

      case DEVICE_GRAPHIC_BOARD:
      {
        graphic_board_reset(i);
        break;
      }
#endif
      default:
      {
        break;
      }
    }
  }

#ifndef GCWZERO
 /* Team Player */
  for (i=0; i<2; i++)
  {
    if (input.system[i] == SYSTEM_TEAMPLAYER)
    {
      teamplayer_reset(i);
    }
  }
#endif
}