DynRPG v0.32 Unofficial
Plugin SDK
|
Used for key input. More...
#include <Input.h>
Public Member Functions | |
int * | key (RPG::Key keyId) |
Provides easy access to the key assignments. | |
bool | pressed (RPG::Key keyId) |
Checks whether a RPG::Key is pressed. | |
void | update () |
Updates the RPG Maker's internal key cache. | |
Public Attributes | |
int | joystickId |
The ID of the first joystick. | |
int | keys [48] |
Array of key codes assigned to the different RPG::Key values (part 1) | |
int | keys2k3 [120] |
Array of key codes assigned to the different RPG::Key values (part 2) | |
int | resolutionTime |
In milliseconds. | |
int | uTimerId |
0 if timerEvent for input not existing | |
KeyDown_T | isPressed |
Are a combination of keys pressed & released (See RPG::KeyDown) | |
KeyDownAlt_T | isShiftCtrlPressed |
Are the Shift or Ctrl keys & released (See RPG::KeyDownAlt) | |
KeyDown_T | isHeld |
Are a combination of keys held (See RPG::KeyDown) | |
KeyDownAlt_T | isShiftCtrlHeld |
Are the Shift or Ctrl keys held (See RPG::KeyDownAlt) | |
KeyDown_T | isTapped |
Are a combination of keys tapped (See RPG::KeyDown) | |
KeyDownAlt_T | isShiftCtrlTapped |
Are the Shift or Ctrl keys tapped (See RPG::KeyDownAlt) | |
int | joyInfo [4] |
JOYINFO button state? | |
int | keyHoldTimer |
Amount of time a key is held? | |
char | leftRight |
int | directionNumpad |
down (2), left (4), right (6), up (8) | |
bool | joyRepsonseFlag |
If 1, response for button status of joy device took too long & don't process JoyInput. | |
Used for key input.
int * RPG::Input::key | ( | RPG::Key | keyId | ) |
Provides easy access to the key assignments.
This function returns a pointer to the "block" of 8 key codes in the keys
or keys2k3
array which corresponds to the given RPG::Key value. The result should be used with the []
syntax with an index from 0
to 7
.
Example:
This example would assign the TAB
key as a new decision key (the default decision keys are Enter
, Space
and Z
, indexes 3
to 7
are not assigned by default).
The values used for key assignments are virtual key codes, zero meaning "not assigned".
keyId | RPG::Key for which the key codes should be read or changed |
bool RPG::Input::pressed | ( | RPG::Key | keyId | ) |
void RPG::Input::update | ( | ) |
Updates the RPG Maker's internal key cache.
The RPG Maker uses an internal key cache which is normally updated every frame. This function updates the key cache.
int RPG::Input::keys[48] |
Array of key codes assigned to the different RPG::Key values (part 1)
This array contains the key assignments for those key functions which exist both in RPG Maker 2000 and RPG Maker 2003. Use the key method for easy access.
Indexes:
0-7: Down 8-15: Left 16-23: Right 24-31: Up 32-39: Decision 40-47: Cancel
int RPG::Input::keys2k3[120] |
Array of key codes assigned to the different RPG::Key values (part 2)
This array contains the key assignments for those key functions which exist only in RPG Maker 2003. Use the key method for easy access. Specifically these are the key assignments for numpad keys or otherwise that are detected via the "Key Input Processing" event command
Indexes: 0-7: 0 (Detected via Key Input Processing normally) 8-15: 1 " 16-23: 2 " 24-31: 3 " 32-39: 4 " 40-47: 5 " 48-55: 6 " 56-63: 7 " 64-71: 8 " 72-79: 9 " 80-87: + " 88-95: - " 96-103: * " 104-111: / " 112-119: . "