예제 #1
0
int32_t I_MenuDown(void)
{
    return (
            KB_KeyPressed(sc_DownArrow) ||
            KB_KeyPressed(sc_kpad_2) ||
            (MOUSE_GetButtons()&WHEELDOWN_MOUSE) ||
            BUTTON(gamefunc_Move_Backward) ||
            (JOYSTICK_GetHat(0)&HAT_DOWN)
            );
}
예제 #2
0
int32_t I_MenuUp(void)
{
    return (
            KB_KeyPressed(sc_UpArrow) ||
            KB_KeyPressed(sc_kpad_8) ||
            (MOUSE_GetButtons()&WHEELUP_MOUSE) ||
            BUTTON(gamefunc_Move_Forward) ||
            (JOYSTICK_GetHat(0)&HAT_UP)
            );
}
예제 #3
0
int32_t I_MenuLeft(void)
{
    return (
            KB_KeyPressed(sc_LeftArrow) ||
            KB_KeyPressed(sc_kpad_4) ||
            (SHIFTS_IS_PRESSED && KB_KeyPressed(sc_Tab)) ||
            BUTTON(gamefunc_Turn_Left) ||
            BUTTON(gamefunc_Strafe_Left) ||
            (JOYSTICK_GetHat(0)&HAT_LEFT)
            );
}
예제 #4
0
int32_t I_MenuRight(void)
{
    return (
            KB_KeyPressed(sc_RightArrow) ||
            KB_KeyPressed(sc_kpad_6) ||
            (!SHIFTS_IS_PRESSED && KB_KeyPressed(sc_Tab)) ||
            BUTTON(gamefunc_Turn_Right) ||
            BUTTON(gamefunc_Strafe_Right) ||
            (MOUSE_GetButtons()&MIDDLE_MOUSE) ||
            (JOYSTICK_GetHat(0)&HAT_RIGHT)
            );
}
예제 #5
0
파일: input.c 프로젝트: clobber/eduke32
int32_t I_AdvanceTrigger(void)
{
    return (
            KB_KeyPressed(sc_kpad_Enter) ||
            KB_KeyPressed(sc_Enter) ||
            (MOUSE_GetButtons()&LEFT_MOUSE) ||
#if defined(GEKKO)
            (JOYSTICK_GetButtons()&WII_A)
#else
            BUTTON(gamefunc_Open) ||
            BUTTON(gamefunc_Fire)
#endif
            );
}
예제 #6
0
int32_t I_PanelUp(void)
{
    return (
            KB_KeyPressed(sc_PgUp) ||
            I_MenuUp() ||
            I_MenuLeft()
            );
}
예제 #7
0
int32_t I_PanelDown(void)
{
    return (
            KB_KeyPressed(sc_PgDn) ||
            I_MenuDown() ||
            I_MenuRight() ||
            I_AdvanceTrigger()
            );
}
예제 #8
0
int32_t I_EscapeTrigger(void)
{
    return (
            KB_KeyPressed(sc_Escape)
#if defined(GEKKO)
            || (JOYSTICK_GetButtons()&WII_HOME)
#endif
            );
}
예제 #9
0
int32_t I_ReturnTrigger(void)
{
    return (
            KB_KeyPressed(sc_Escape) ||
            (MOUSE_GetButtons()&RIGHT_MOUSE) ||
            BUTTON(gamefunc_Crouch)
#if defined(GEKKO)
            || (JOYSTICK_GetButtons()&(WII_B|WII_HOME))
#endif
            );
}
예제 #10
0
int32_t I_AdvanceTrigger(void)
{
    return (
            KB_KeyPressed(sc_kpad_Enter) ||
            KB_KeyPressed(sc_Enter) ||
#if !defined EDUKE32_TOUCH_DEVICES
            MOUSEINACTIVECONDITIONAL(MOUSE_GetButtons()&LEFT_MOUSE) ||
#endif
#if defined(GEKKO)
            MOUSEINACTIVECONDITIONAL(JOYSTICK_GetButtons()&WII_A)
#else
            BUTTON(gamefunc_Open) ||
# if !defined EDUKE32_TOUCH_DEVICES
            MOUSEINACTIVECONDITIONAL(BUTTON(gamefunc_Fire))
# else
            BUTTON(gamefunc_Fire)
# endif
#endif
            );
}
예제 #11
0
파일: setup.c 프로젝트: Hendricks266/SWP
void main()
{
    char * song;
    char * voc;
    volatile int32 lasttime;

    RegisterShutdownFunction( ShutDown );
    KB_Startup();
    timerhandle = TIME_AddTimer( 40, &timer );
    //CONFIG_GetSetupFilename();
    CONFIG_ReadSetup();
    CONTROL_Startup( 1, &GetTime, 1500 );
    SetupGameButtons();

    MusicStartup();
    SoundStartup();
    RTS_Init(RTSName);

    // load in some test data

    LoadFile("test.mid",&song);
    LoadFile("test.voc",&voc);

    // start playing a song

    MUSIC_PlaySong( song, MUSIC_LoopSong );


    lasttime = timer;
    while (1)
    {
       int32 i;
       ControlInfo info;

       while (lasttime==timer)
       {
           ServiceEvents();
       }
       lasttime = timer;
//       printf("timer=%ld\n",timer);
       CONTROL_GetInput( &info );

       if  (
           info.dx!=0 ||
           info.dy!=0 ||
           info.dz!=0 ||
           info.dpitch!=0 ||
           info.dyaw!=0 ||
           info.droll!=0
           )
           printf("x=%6ld y=%6ld z=%6ld yaw=%6ld pitch=%6ld roll=%6ld\n",
                  info.dx,info.dy,info.dz,info.dyaw,info.dpitch,info.droll);
       // Get Keyboard input and set appropiate game function states
       for (i=0;i<NUMGAMEFUNCTIONS;i++)
       {
          if (BUTTON(i) && !BUTTONHELD(i))
          {
              printf("%s\n",gamefunctions[i]);
          }
       }
       for (i=0;i<10;i++)
       {
          if (KB_KeyPressed(sc_F1+i))
          {
              byte * ptr;
              KB_ClearKeyDown(sc_F1+i);
              ptr = RTS_GetSound(i);
              FX_PlayVOC( ptr, 0, 255, 255, 255, 255, 0);
          }
       }
       // Check to see if fire is being pressed so we can play a sound
       if (BUTTON(gamefunc_Fire) && !BUTTONHELD(gamefunc_Fire))
       {
           FX_PlayVOC( voc, 0, 255, 255, 255, 255, 0);
       }

       // Check to see if we want to exit
       if ( KB_KeyPressed(sc_Escape) )
       {
           break;
       }
    }
    ShutDown();
}