1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-01 18:43:33 +02:00
VVVVVV/desktop_version/src/ActionSets.h
Dav999-v e55e9efd9b Add controller button layout mappings
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).
2023-03-21 19:59:48 -07:00

91 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