mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01:00
e55e9efd9b
This adds mappings from SDL's Xbox-based SDL_GameControllerButton constants, to glyphs for the following layouts: - LAYOUT_NINTENDO_SWITCH_PRO, - LAYOUT_NINTENDO_SWITCH_JOYCON_L, - LAYOUT_NINTENDO_SWITCH_JOYCON_R, - LAYOUT_DECK, - LAYOUT_PLAYSTATION, - LAYOUT_XBOX, - LAYOUT_GENERIC, There may still be errors in these, but they should be mostly correct. I'm leaving it up to Ethan to make it show the correct button glyphs for the correct controllers being connected (and possibly to fix these mappings where needed).
90 lines
1.6 KiB
C
90 lines
1.6 KiB
C
/* For now, this isn't really a foundation for action sets yet; button glyphs
|
|
* just need to be able to identify actions that are printed in text like
|
|
* "Press ENTER to teleport". Thus, this currently ONLY contains identifiers
|
|
* for the actions that button glyphs are needed for.
|
|
*
|
|
* Based on this comment:
|
|
* https://github.com/TerryCavanagh/VVVVVV/issues/834#issuecomment-1015692161
|
|
*/
|
|
|
|
|
|
#ifndef ACTIONSETS_H
|
|
#define ACTIONSETS_H
|
|
|
|
|
|
#ifdef __cplusplus
|
|
extern "C"
|
|
{
|
|
#endif
|
|
|
|
|
|
/*----------------------------------------*
|
|
* List of all action sets (all "states") *
|
|
*----------------------------------------*/
|
|
typedef enum
|
|
{
|
|
//ActionSet_Global,
|
|
ActionSet_Menu,
|
|
ActionSet_InGame
|
|
//ActionSet_Editor
|
|
}
|
|
ActionSet;
|
|
|
|
|
|
/*----------------------------------------------------------*
|
|
* An enum for each actionset, with the actions in that set *
|
|
*----------------------------------------------------------*/
|
|
/*
|
|
typedef enum
|
|
{
|
|
Action_Global_Mute,
|
|
Action_Global_MuteMusic
|
|
}
|
|
Action_Global;
|
|
*/
|
|
|
|
typedef enum
|
|
{
|
|
Action_Menu_Accept
|
|
}
|
|
Action_Menu;
|
|
|
|
typedef enum
|
|
{
|
|
Action_InGame_ACTION,
|
|
Action_InGame_Interact,
|
|
Action_InGame_Map,
|
|
Action_InGame_Restart,
|
|
Action_InGame_Esc
|
|
}
|
|
Action_InGame;
|
|
|
|
/*
|
|
typedef enum
|
|
{
|
|
//Action_Editor_PrevTool,
|
|
//Action_Editor_NextTool
|
|
}
|
|
Action_Editor;
|
|
*/
|
|
|
|
|
|
/*-----------------------------------------*
|
|
* A union to represent any actionset enum *
|
|
*-----------------------------------------*/
|
|
typedef union
|
|
{
|
|
int intval;
|
|
//Action_Global Global;
|
|
Action_Menu Menu;
|
|
Action_InGame InGame;
|
|
//Action_Editor Editor;
|
|
}
|
|
Action;
|
|
|
|
|
|
#ifdef __cplusplus
|
|
} // extern "C"
|
|
#endif
|
|
|
|
#endif // ACTIONSETS_H
|