X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fapp%2FInput.h;h=2e66b009ffaeb4f108c45e976c63bcb9a6d651d0;hb=85aa2343f438894dd19e6ad1228eaca47bfb83a9;hp=415d11f0890ade422591d14753570f230b4bba05;hpb=aa1a197e532673f0c4d33dee5bed27298c050d38;p=l2e.git diff --git a/src/app/Input.h b/src/app/Input.h index 415d11f..2e66b00 100644 --- a/src/app/Input.h +++ b/src/app/Input.h @@ -1,10 +1,3 @@ -/* - * Input.h - * - * Created on: Aug 6, 2012 - * Author: holy - */ - #ifndef APP_INPUT_H_ #define APP_INPUT_H_ @@ -13,6 +6,19 @@ namespace app { +/// Maps SDL key events to virtual buttons. +/// Records the state and whether it was pressed/released in the current +/// iteration. +/// Multiple buttons can be passed by ORing them bitwise. +/// The MapKey(SDLKey, Button) function introduces a mapping for the given key +/// to the given virtual button. Each key can be assigned to one button only, +/// but there is no limit (well, except for memory, I guess) on how many keys +/// may map to the same button. +/// Each iteration should first call ResetInteractiveState() to drop the just +/// pressed/released information and then pass each SDL_KeyboardEvent to +/// HandleKeyboardEvent(const SDL_KeyboardEvent &). +/// The four DEBUG_? buttons do not map to any real SNES/Lufia 2 button and may +/// be used for debugging or non-gameplay-related input. class Input { public: @@ -72,4 +78,4 @@ private: } -#endif /* APP_INPUT_H_ */ +#endif