示例#1
0
static void SetJoystickButtonLabel(void)
{
    char *name;

    name = "None set";

    if (joystick_initted
     && joystick_index >= 0 && joystick_index < SDL_NumJoysticks())
    {
        name = (char *) SDL_JoystickName(joystick_index);
    }

    TXT_SetButtonLabel(joystick_button, name);
}
static void UpdateWarpButton(void)
{
    char buf[10];

    if (warptype == WARP_DOOM1)
    {
        sprintf(buf, "E%iM%i", warpepisode, warpmap);
    }
    else if (warptype == WARP_DOOM2)
    {
        sprintf(buf, "MAP%02i", warpmap);
    }

    TXT_SetButtonLabel(warpbutton, buf);
}
static void UpdateWarpButton(void)
{
    char buf[10];

    if (warptype == WARP_ExMy)
    {
        M_snprintf(buf, sizeof(buf), "E%iM%i", warpepisode, warpmap);
    }
    else if (warptype == WARP_MAPxy)
    {
        M_snprintf(buf, sizeof(buf), "MAP%02i", warpmap);
    }

    TXT_SetButtonLabel(warpbutton, buf);
}