Large refactoring. Also, reimplemented resource manager to use parsers. Changed from json to xml (it allows comments!!!).
This commit is contained in:
@@ -13,20 +13,37 @@ namespace input {
|
||||
|
||||
enum GameKey
|
||||
{
|
||||
// Movement
|
||||
Right,
|
||||
Up,
|
||||
Left,
|
||||
Down,
|
||||
|
||||
Action,
|
||||
Action2,
|
||||
Run,
|
||||
|
||||
// Actions
|
||||
Action,
|
||||
Action2,
|
||||
|
||||
// Alternative move keys
|
||||
AltRight,
|
||||
AltUp,
|
||||
AltLeft,
|
||||
AltDown,
|
||||
|
||||
// Inventory
|
||||
InventoryToggle,
|
||||
Inventory1,
|
||||
Inventory2,
|
||||
Inventory3,
|
||||
Inventory4,
|
||||
Inventory5,
|
||||
Inventory6,
|
||||
Inventory7,
|
||||
Inventory8,
|
||||
Inventory9,
|
||||
Inventory10,
|
||||
|
||||
// Debug keys
|
||||
Debug_ZoomIn,
|
||||
Debug_ZoomOut,
|
||||
|
||||
|
@@ -17,20 +17,37 @@ namespace input {
|
||||
{
|
||||
.keys =
|
||||
{
|
||||
// Movement
|
||||
SDL_SCANCODE_RIGHT, // Right
|
||||
SDL_SCANCODE_UP, // Up
|
||||
SDL_SCANCODE_LEFT, // Left
|
||||
SDL_SCANCODE_DOWN, // Down
|
||||
|
||||
SDL_SCANCODE_SPACE, // Action
|
||||
SDL_SCANCODE_LCTRL, // Action2
|
||||
SDL_SCANCODE_LSHIFT, // Run
|
||||
|
||||
// Action keys
|
||||
SDL_SCANCODE_SPACE, // Action
|
||||
SDL_SCANCODE_LCTRL, // Action2
|
||||
|
||||
// Alternative movement
|
||||
SDL_SCANCODE_D, // AltRight
|
||||
SDL_SCANCODE_W, // AltUp
|
||||
SDL_SCANCODE_A, // AltLeft
|
||||
SDL_SCANCODE_S, // AltRight
|
||||
|
||||
// Inventory
|
||||
SDL_SCANCODE_I, // InventoryToggle
|
||||
SDL_SCANCODE_1, // Inventory1
|
||||
SDL_SCANCODE_2, // Inventory2
|
||||
SDL_SCANCODE_3, // Inventory3
|
||||
SDL_SCANCODE_4, // Inventory4
|
||||
SDL_SCANCODE_5, // Inventory5
|
||||
SDL_SCANCODE_6, // Inventory6
|
||||
SDL_SCANCODE_7, // Inventory7
|
||||
SDL_SCANCODE_8, // Inventory8
|
||||
SDL_SCANCODE_9, // Inventory9
|
||||
SDL_SCANCODE_0, // Inventory10
|
||||
|
||||
// Debug
|
||||
SDL_SCANCODE_KP_PLUS, // Debug_ZoomIn,
|
||||
SDL_SCANCODE_KP_MINUS, // Debug_ZoomOut,
|
||||
}
|
||||
|
Reference in New Issue
Block a user