r12745 - in packages/trunk/invaders/debian: . patches
Fabian Greffrath
fabian-guest at alioth.debian.org
Mon Oct 31 13:17:16 UTC 2011
Author: fabian-guest
Date: 2011-10-31 13:17:16 +0000 (Mon, 31 Oct 2011)
New Revision: 12745
Added:
packages/trunk/invaders/debian/patches/05-pause.patch
Modified:
packages/trunk/invaders/debian/changelog
packages/trunk/invaders/debian/patches/series
Log:
05-pause.patch: Use "P" to pause and resume.
Modified: packages/trunk/invaders/debian/changelog
===================================================================
--- packages/trunk/invaders/debian/changelog 2011-10-31 13:14:16 UTC (rev 12744)
+++ packages/trunk/invaders/debian/changelog 2011-10-31 13:17:16 UTC (rev 12745)
@@ -8,6 +8,7 @@
io.h to allow for non-optimized builds.
* 04-change-colors.patch: Use PgUp and PgDown to toggle through the color
palette and use a secret key to toggle "psychedelic mode". ;)
+ * 05-pause.patch: Use "P" to pause and resume.
-- Fabian Greffrath <fabian+debian at greffrath.com> Mon, 31 Oct 2011 13:10:20 +0100
Added: packages/trunk/invaders/debian/patches/05-pause.patch
===================================================================
--- packages/trunk/invaders/debian/patches/05-pause.patch (rev 0)
+++ packages/trunk/invaders/debian/patches/05-pause.patch 2011-10-31 13:17:16 UTC (rev 12745)
@@ -0,0 +1,49 @@
+Author: Fabian Greffrath <fabian+debian at 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';
+ };
+ };
+
Modified: packages/trunk/invaders/debian/patches/series
===================================================================
--- packages/trunk/invaders/debian/patches/series 2011-10-31 13:14:16 UTC (rev 12744)
+++ packages/trunk/invaders/debian/patches/series 2011-10-31 13:17:16 UTC (rev 12745)
@@ -4,3 +4,4 @@
02-static-inline.patch
03-reboot-on-esc.patch
04-change-colors.patch
+05-pause.patch
More information about the Pkg-games-commits
mailing list