diff options
author | Christian Hesse | 2015-10-07 10:47:33 +0200 |
---|---|---|
committer | Christian Hesse | 2015-10-07 10:47:33 +0200 |
commit | 6a4061c39ef4a78ece5337939d7e4b22d034198a (patch) | |
tree | 03a61571c2283e193e5e0396438d41dfde874398 /05-pause.patch | |
parent | e0e6c8a38bae89f5a73f03a7abd07ee8fe6c2b3f (diff) | |
download | aur-6a4061c39ef4a78ece5337939d7e4b22d034198a.tar.gz |
commit grubinvaders 1.0.0-4
Diffstat (limited to '05-pause.patch')
-rw-r--r-- | 05-pause.patch | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/05-pause.patch b/05-pause.patch new file mode 100644 index 000000000000..e4a90f6fc6fe --- /dev/null +++ b/05-pause.patch @@ -0,0 +1,49 @@ +Author: Fabian Greffrath <fabian+debian@greffrath.com> +Description: Use "P" to pause and resume. + +--- invaders-1.0.0.orig/game.c ++++ invaders-1.0.0/game.c +@@ -42,6 +42,21 @@ void changecolors(int c) + else if (aliencolor<1) aliencolor=15; + } + ++void displaypause() ++{ ++ uint8 key; ++ bool pressed; ++ ++ video_usecolor(6,1); ++ video_putstring(30,10," PAUSE "); ++ video_putstring(30,11," PRESS \'P\' "); ++ video_update(); ++ do{ ++ key_decode(&key,&pressed); ++ key_polling(); ++ } while (!(pressed&&(key=='p'))); ++}; ++ + void resetgame() + { + gameover=false; +@@ -167,6 +182,11 @@ void keywork() + } + } + break; ++ case 'p': ++ if (pressed) { ++ displaypause(); ++ } ++ break; + }; + }; + }; +--- invaders-1.0.0.orig/keyboard.c ++++ invaders-1.0.0/keyboard.c +@@ -42,6 +42,7 @@ void key_decode(uint8 *key, bool *presse + if (c==1) *key='@'; + if (c==0x1c) *key='e'; + if (c==0x39) *key=' '; ++ if (c==0x19) *key='p'; + }; + }; + |