Made KeyControl.cpp ASM-accurate
Didn't realise this file was so tiny. Anyway, working towards #74.
This commit is contained in:
parent
729540d2b8
commit
2c23de27d5
3 changed files with 30 additions and 21 deletions
|
@ -559,6 +559,10 @@ addr = 0x40F330
|
|||
name = "LoadGenericData"
|
||||
addr = 0x411390
|
||||
|
||||
[[func]]
|
||||
name = "GetTrg"
|
||||
addr = 0x4122E0
|
||||
|
||||
[[func]]
|
||||
name = "InitMapData2"
|
||||
addr = 0x413750
|
||||
|
|
|
@ -9,8 +9,10 @@ int gKeyArms = KEY_ARMS;
|
|||
int gKeyArmsRev = KEY_ARMSREV;
|
||||
int gKeyItem = KEY_ITEM;
|
||||
int gKeyMap = KEY_MAP;
|
||||
|
||||
int gKeyOk = KEY_Z;
|
||||
int gKeyCancel = KEY_X;
|
||||
|
||||
int gKeyLeft = KEY_LEFT;
|
||||
int gKeyUp = KEY_UP;
|
||||
int gKeyRight = KEY_RIGHT;
|
||||
|
@ -19,6 +21,7 @@ int gKeyDown = KEY_DOWN;
|
|||
void GetTrg()
|
||||
{
|
||||
static int key_old;
|
||||
gKeyTrg = gKey & (gKey ^ key_old);
|
||||
gKeyTrg = gKey ^ key_old;
|
||||
gKeyTrg = gKey & gKeyTrg;
|
||||
key_old = gKey;
|
||||
}
|
||||
|
|
|
@ -3,35 +3,35 @@
|
|||
enum KEYBIND
|
||||
{
|
||||
//The movement keys go in the order of left, right, up and down
|
||||
KEY_LEFT = 0x00000001,
|
||||
KEY_RIGHT = 0x00000002,
|
||||
KEY_UP = 0x00000004,
|
||||
KEY_DOWN = 0x00000008,
|
||||
KEY_LEFT = 0x00000001,
|
||||
KEY_RIGHT = 0x00000002,
|
||||
KEY_UP = 0x00000004,
|
||||
KEY_DOWN = 0x00000008,
|
||||
//Map key
|
||||
KEY_MAP = 0x00000010,
|
||||
KEY_MAP = 0x00000010,
|
||||
//Okay and cancel / Jump and Shoot keys
|
||||
KEY_X = 0x00000020,
|
||||
KEY_Z = 0x00000040,
|
||||
KEY_X = 0x00000020,
|
||||
KEY_Z = 0x00000040,
|
||||
//Left and right weapon switch keys
|
||||
KEY_ARMS = 0x00000080,
|
||||
KEY_ARMSREV = 0x00000100,
|
||||
KEY_ARMS = 0x00000080,
|
||||
KEY_ARMSREV = 0x00000100,
|
||||
//Unused?
|
||||
KEY_SHIFT = 0x00000200,
|
||||
KEY_SHIFT = 0x00000200,
|
||||
//Function keys
|
||||
KEY_F1 = 0x00000400,
|
||||
KEY_F2 = 0x00000800,
|
||||
KEY_F1 = 0x00000400,
|
||||
KEY_F2 = 0x00000800,
|
||||
//Inventory
|
||||
KEY_ITEM = 0x00001000,
|
||||
KEY_ITEM = 0x00001000,
|
||||
//Escape key
|
||||
KEY_ESCAPE = 0x00008000,
|
||||
//The alt movement keys go in the order of left, up, right and down
|
||||
KEY_ALT_LEFT = 0x00010000,
|
||||
KEY_ALT_DOWN = 0x00020000,
|
||||
KEY_ALT_RIGHT = 0x00040000,
|
||||
KEY_ALT_UP = 0x00180000,
|
||||
//Alt up actually has 2 seperate keys, but they're kind of merged together (and also for some reason the second one is +/=)
|
||||
KEY_L = 0x00080000,
|
||||
KEY_PLUS = 0x00100000
|
||||
KEY_ALT_LEFT = 0x00010000,
|
||||
KEY_ALT_DOWN = 0x00020000,
|
||||
KEY_ALT_RIGHT = 0x00040000,
|
||||
KEY_ALT_UP = 0x00180000,
|
||||
//Alt up actually has 2 seperate keys, but they're kind of merged together
|
||||
KEY_L = 0x00080000,
|
||||
KEY_PLUS = 0x00100000
|
||||
};
|
||||
|
||||
extern int gKey;
|
||||
|
@ -43,8 +43,10 @@ extern int gKeyArms;
|
|||
extern int gKeyArmsRev;
|
||||
extern int gKeyItem;
|
||||
extern int gKeyMap;
|
||||
|
||||
extern int gKeyOk;
|
||||
extern int gKeyCancel;
|
||||
|
||||
extern int gKeyLeft;
|
||||
extern int gKeyUp;
|
||||
extern int gKeyRight;
|
||||
|
|
Loading…
Add table
Reference in a new issue