Skip to content
Snippets Groups Projects
Commit c0576a0f authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Support for cursor movement keys (e.g. ANSI) - no more NumLock!

parent b9ee6b4f
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #187 passed
...@@ -370,6 +370,7 @@ void movement(int sx,int sy,int sz,int sgx,int sgy) ...@@ -370,6 +370,7 @@ void movement(int sx,int sy,int sz,int sgx,int sgy)
break; break;
case '4': /* Move West */ case '4': /* Move West */
case 'A': case 'A':
case TERM_KEY_LEFT:
check=inway(x,y,z,gx-1,gy); check=inway(x,y,z,gx-1,gy);
if(weapon_ready) { tpic=LEFT; if(weapon_ready) { tpic=LEFT;
if(check) if(check)
...@@ -404,6 +405,7 @@ void movement(int sx,int sy,int sz,int sgx,int sgy) ...@@ -404,6 +405,7 @@ void movement(int sx,int sy,int sz,int sgx,int sgy)
break; break;
case '6': /* Move East */ case '6': /* Move East */
case 'D': case 'D':
case TERM_KEY_RIGHT:
check=inway(x,y,z,gx+1,gy); check=inway(x,y,z,gx+1,gy);
if(weapon_ready) { tpic=RIGHT; if(weapon_ready) { tpic=RIGHT;
if(check) if(check)
...@@ -438,6 +440,7 @@ void movement(int sx,int sy,int sz,int sgx,int sgy) ...@@ -438,6 +440,7 @@ void movement(int sx,int sy,int sz,int sgx,int sgy)
break; break;
case '2': /* Move South */ case '2': /* Move South */
case 'X': case 'X':
case TERM_KEY_DOWN:
check=inway(x,y,z,gx,gy+1); check=inway(x,y,z,gx,gy+1);
if(weapon_ready) { tpic=DOWN; if(weapon_ready) { tpic=DOWN;
if(check) if(check)
...@@ -474,6 +477,7 @@ void movement(int sx,int sy,int sz,int sgx,int sgy) ...@@ -474,6 +477,7 @@ void movement(int sx,int sy,int sz,int sgx,int sgy)
break; break;
case '8': /* Move North */ case '8': /* Move North */
case 'W': case 'W':
case TERM_KEY_UP:
check=inway(x,y,z,gx,gy-1); check=inway(x,y,z,gx,gy-1);
if(weapon_ready) { tpic=UP; if(weapon_ready) { tpic=UP;
if(check) if(check)
...@@ -512,6 +516,7 @@ void movement(int sx,int sy,int sz,int sgx,int sgy) ...@@ -512,6 +516,7 @@ void movement(int sx,int sy,int sz,int sgx,int sgy)
break; break;
case '7': /* Move NorthWest */ case '7': /* Move NorthWest */
case 'Q': case 'Q':
case TERM_KEY_HOME:
check=inway(x,y,z,gx-1,gy-1); check=inway(x,y,z,gx-1,gy-1);
if(weapon_ready) { tpic=UP; if(weapon_ready) { tpic=UP;
if(check) if(check)
...@@ -534,6 +539,7 @@ void movement(int sx,int sy,int sz,int sgx,int sgy) ...@@ -534,6 +539,7 @@ void movement(int sx,int sy,int sz,int sgx,int sgy)
break; break;
case '9': /* Move NorthEast */ case '9': /* Move NorthEast */
case 'E': case 'E':
case TERM_KEY_PAGEUP:
check=inway(x,y,z,gx+1,gy-1); check=inway(x,y,z,gx+1,gy-1);
if(weapon_ready) { tpic=UP; if(weapon_ready) { tpic=UP;
if(check) if(check)
...@@ -556,6 +562,7 @@ void movement(int sx,int sy,int sz,int sgx,int sgy) ...@@ -556,6 +562,7 @@ void movement(int sx,int sy,int sz,int sgx,int sgy)
break; break;
case '1': /* Move SouthWest */ case '1': /* Move SouthWest */
case 'Z': case 'Z':
case TERM_KEY_END:
check=inway(x,y,z,gx-1,gy+1); check=inway(x,y,z,gx-1,gy+1);
if(weapon_ready) { tpic=DOWN; if(weapon_ready) { tpic=DOWN;
if(check) if(check)
...@@ -578,6 +585,7 @@ void movement(int sx,int sy,int sz,int sgx,int sgy) ...@@ -578,6 +585,7 @@ void movement(int sx,int sy,int sz,int sgx,int sgy)
break; break;
case '3': /* Move SouthEast */ case '3': /* Move SouthEast */
case 'C': case 'C':
case TERM_KEY_PAGEDN:
check=inway(x,y,z,gx+1,gy+1); check=inway(x,y,z,gx+1,gy+1);
if(weapon_ready) { tpic=DOWN; if(weapon_ready) { tpic=DOWN;
if(check) if(check)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment