Update help

This commit is contained in:
Miloslav Číž 2020-09-27 01:11:19 +02:00
parent 38774c8b6c
commit 94a7129d4d
2 changed files with 66 additions and 10 deletions

View File

@ -74,6 +74,40 @@ info see the website at <WEBSITE> or the repository at <REPOURL>.
======== short manual ======== ======== short manual ========
Anarch is a unique suckless FPS game. Collect weapons and items and destroy
robot enemies in your way in order to get to the level finish. Some door are
locked and require access cards. Good luck!
created by Miloslav "drummyfish" Ciz, released under CC0 1.0 (public domain)
CLI flags:
-h print this help and exit
-w force window
-f force fullscreen
controls:
- arrows, numpad, [W] [S] [A] [D] [Q] [R]: movement
- mouse: rotation, [LMB] shoot, [RMB] toggle free look, wheel weapon change
- [SPACE]: jump
- [G] [RETURN] [SHIFT]: game A button (confirm, strafe)
- [H] [CTRL]: game B button (cancel, shoot)
- [O] [P] [X] [Y] [Z]: change weapons
- [TAB]: map
- [ESCAPE]: menu
general controls:
- arrows: movement
- A: confirm
A + arrows: strafe, look up/down
- B: cancel, shoot
- C:
C + UP: jump
C + DOWN: menu
C + LEFT/RIGHT: change weapons
C + A/B: change weapons
========== pokitto =========== ========== pokitto ===========

View File

@ -174,11 +174,16 @@ int8_t SFG_keyPressed(uint8_t key)
break; break;
case SFG_KEY_A: case SFG_KEY_A:
return sdlKeyboardState[SDL_SCANCODE_G] || sdlKeyboardState[SDL_SCANCODE_RETURN]; return sdlKeyboardState[SDL_SCANCODE_G] ||
sdlKeyboardState[SDL_SCANCODE_RETURN] ||
sdlKeyboardState[SDL_SCANCODE_LSHIFT];
break; break;
case SFG_KEY_B: case SFG_KEY_B:
return sdlKeyboardState[SDL_SCANCODE_H] || (sdlMouseButtonState & SDL_BUTTON_LMASK); return sdlKeyboardState[SDL_SCANCODE_H] ||
(sdlMouseButtonState & SDL_BUTTON_LMASK) ||
sdlKeyboardState[SDL_SCANCODE_LCTRL] ||
sdlKeyboardState[SDL_SCANCODE_RCTRL];
break; break;
case SFG_KEY_C: case SFG_KEY_C:
@ -208,6 +213,9 @@ int8_t SFG_keyPressed(uint8_t key)
break; break;
case SFG_KEY_NEXT_WEAPON: case SFG_KEY_NEXT_WEAPON:
if (sdlKeyboardState[SDL_SCANCODE_P] || sdlKeyboardState[SDL_SCANCODE_X])
return 1;
if (sdlMouseWheelState > 0) if (sdlMouseWheelState > 0)
{ {
sdlMouseWheelState--; sdlMouseWheelState--;
@ -218,6 +226,10 @@ int8_t SFG_keyPressed(uint8_t key)
break; break;
case SFG_KEY_PREVIOUS_WEAPON: case SFG_KEY_PREVIOUS_WEAPON:
if (sdlKeyboardState[SDL_SCANCODE_O] || sdlKeyboardState[SDL_SCANCODE_Y]
|| sdlKeyboardState[SDL_SCANCODE_Z])
return 1;
if (sdlMouseWheelState < 0) if (sdlMouseWheelState < 0)
{ {
sdlMouseWheelState++; sdlMouseWheelState++;
@ -343,14 +355,24 @@ int main(int argc, char *argv[])
if (argHelp) if (argHelp)
{ {
puts("TODOGAME, a suckless first person shooter game (SDL2 frontend)\n"); puts("Anarch, version " SFG_VERSION_STRING "\n");
puts("version TODO, by Miloslav Ciz, released under CC0 1.0 + waiver of all IP"); puts("Anarch is a unique suckless FPS game. Collect weapons and items and destroy");
puts("possible arguments:\n"); puts("robot enemies in your way in order to get to the level finish. Some door are");
puts("-h print this help and end"); puts("locked and require access cards. Good luck!\n");
puts("-w force run in window"); puts("created by Miloslav \"drummyfish\" Ciz, released under CC0 1.0 (public domain)\n");
puts("-f force run fullscreen\n"); puts("CLI flags:\n");
puts("controls:"); puts("-h print this help and exit");
puts("TODO"); puts("-w force window");
puts("-f force fullscreen\n");
puts("controls:\n");
puts("- arrows, numpad, [W] [S] [A] [D] [Q] [R]: movement");
puts("- mouse: rotation, [LMB] shoot, [RMB] toggle free look, wheel weapon change");
puts("- [SPACE]: jump");
puts("- [G] [RETURN] [SHIFT]: game A button (confirm, strafe)");
puts("- [H] [CTRL]: game B button (cancel, shoot)");
puts("- [O] [P] [X] [Y] [Z]: change weapons");
puts("- [TAB]: map");
puts("- [ESCAPE]: menu");
return 0; return 0;
} }