Skip to content

Commit

Permalink
Merge input layer refactor.
Browse files Browse the repository at this point in the history
Conflicts:
	overmap.cpp
  • Loading branch information
kevingranade committed Sep 28, 2013
2 parents b667b78 + d382d1d commit b30b774
Show file tree
Hide file tree
Showing 7 changed files with 1,082 additions and 55 deletions.
257 changes: 257 additions & 0 deletions data/raw/keybindings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,257 @@
[
{
"id":"UP",
"name":"Pan up",
"bindings":[
{
"input_method":"keyboard",
"key":"j"
},
{
"input_method":"keyboard",
"key":"UP"
},
{
"input_method":"gamepad",
"key":"JOY_UP"
}
]
},
{
"id":"DOWN",
"name":"Pan down",
"bindings":[
{
"input_method":"keyboard",
"key":"k"
},
{
"input_method":"keyboard",
"key":"DOWN"
},
{
"input_method":"gamepad",
"key":"JOY_DOWN"
}
]
},
{
"id":"LEFT",
"name":"Pan left",
"bindings":[
{
"input_method":"keyboard",
"key":"h"
},
{
"input_method":"keyboard",
"key":"LEFT"
},
{
"input_method":"gamepad",
"key":"JOY_LEFT"
}
]
},
{
"id":"RIGHT",
"name":"Pan right",
"bindings":[
{
"input_method":"keyboard",
"key":"k"
},
{
"input_method":"keyboard",
"key":"RIGHT"
},
{
"input_method":"gamepad",
"key":"JOY_RIGHT"
}
]
},
{
"id":"LEFTUP",
"name":"Pan up-left",
"bindings":[
{
"input_method":"keyboard",
"key":"u"
},
{
"input_method":"gamepad",
"key":"JOY_LEFTUP"
}
]
},
{
"id":"RIGHTUP",
"name":"Pan up-right",
"bindings":[
{
"input_method":"keyboard",
"key":"i"
},
{
"input_method":"gamepad",
"key":"JOY_RIGHTUP"
}
]
},
{
"id":"LEFTDOWN",
"name":"Pan down-left",
"bindings":[
{
"input_method":"keyboard",
"key":"n"
},
{
"input_method":"gamepad",
"key":"JOY_LEFTDOWN"
}
]
},
{
"id":"RIGHTDOWN",
"name":"Pan down-right",
"bindings":[
{
"input_method":"keyboard",
"key":"m"
},
{
"input_method":"gamepad",
"key":"JOY_RIGHTDOWN"
}
]
},
{
"id":"HELP_KEYBINDINGS",
"name":"Display Help",
"bindings":[
{
"input_method":"keyboard",
"key":"?"
}
]
},
{
"id":"CENTER",
"category":"OVERMAP",
"name":"Center On Character",
"bindings":[
{
"input_method":"keyboard",
"key":"0"
}
]
},
{
"id":"LEVEL_UP",
"name":"Go Up",
"bindings":[
{
"input_method":"keyboard",
"key":"<"
}
]
},
{
"id":"LEVEL_DOWN",
"name":"Go Down",
"bindings":[
{
"input_method":"keyboard",
"key":">"
}
]
},
{
"id":"CONFIRM",
"name":"Confirm Choice",
"bindings":[
{
"input_method":"keyboard",
"key":"RETURN"
}
]
},
{
"id":"DELETE_NOTE",
"category":"OVERMAP",
"name":"Delete Note",
"bindings":[
{
"input_method":"keyboard",
"key":"D"
}
]
},
{
"id":"CREATE_NOTE",
"category":"OVERMAP",
"name":"Create/Edit Note",
"bindings":[
{
"input_method":"keyboard",
"key":"N"
}
]
},
{
"id":"LIST_NOTES",
"category":"OVERMAP",
"name":"List Notes",
"bindings":[
{
"input_method":"keyboard",
"key":"L"
}
]
},
{
"id":"SEARCH",
"name":"Search",
"bindings":[
{
"input_method":"keyboard",
"key":"/"
}
]
},
{
"id":"QUIT",
"name":"Exit Screen",
"bindings":[
{
"input_method":"keyboard",
"key":"ESC"
}
]
},
{
"id":"QUIT",
"category":"OVERMAP",
"name":"Exit Screen",
"bindings":[
{
"input_method":"keyboard",
"key":"ESC"
},
{
"input_method":"keyboard",
"key":"q"
},
{
"input_method":"keyboard",
"key":"Q"
},
{
"input_method":"gamepad",
"key":"JOY_3"
}
]
}
]
1 change: 1 addition & 0 deletions game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ game::game() :
init_autosave(); // Set up autosave
init_diseases(); // Set up disease lookup table
init_parrot_speech(); // Set up Mi-Go parrot speech (SEE monattack.cpp)
inp_mngr.init(); // Load input config JSON
} catch(std::string &error_message)
{
uquit = QUIT_ERROR;
Expand Down
Loading

0 comments on commit b30b774

Please sign in to comment.