r3709 - in packages/trunk/hex-a-hop/debian: . patches
Jens Seidel
jseidel-guest at alioth.debian.org
Sun Aug 19 00:11:40 UTC 2007
Author: jseidel-guest
Date: 2007-08-19 00:11:39 +0000 (Sun, 19 Aug 2007)
New Revision: 3709
Added:
packages/trunk/hex-a-hop/debian/patches/array_subscripts_warning.patch
Modified:
packages/trunk/hex-a-hop/debian/patches/series
packages/trunk/hex-a-hop/debian/rules
Log:
Proper fix for the warning: array subscript has type ‘char’
Added: packages/trunk/hex-a-hop/debian/patches/array_subscripts_warning.patch
===================================================================
--- packages/trunk/hex-a-hop/debian/patches/array_subscripts_warning.patch (rev 0)
+++ packages/trunk/hex-a-hop/debian/patches/array_subscripts_warning.patch 2007-08-19 00:11:39 UTC (rev 3709)
@@ -0,0 +1,79 @@
+Index: hex-a-hop.svn/hex_puzzzle.cpp
+===================================================================
+--- hex-a-hop.svn.orig/hex_puzzzle.cpp 2007-08-19 01:49:09.000000000 +0200
++++ hex-a-hop.svn/hex_puzzzle.cpp 2007-08-19 01:51:21.000000000 +0200
+@@ -3761,7 +3761,7 @@
+
+ if (!isMap && !editMode && undoTime < 0)
+ {
+- if (keyState['z'] || keyState[SDLK_BACKSPACE] || keyState['u'])
++ if (keyState[SDLK_z] || keyState[SDLK_BACKSPACE] || keyState[SDLK_u])
+ {
+ Undo();
+ return;
+@@ -3770,12 +3770,12 @@
+ if (isMap && !editMode)
+ {
+
+- if ((keyState['q'] | keyState[SDLK_KP7]) & 2) keyboardp.x--;
+- else if ((keyState['d'] | keyState[SDLK_KP3]) & 2) keyboardp.x++;
+- else if ((keyState['e'] | keyState[SDLK_KP9]) & 2) keyboardp.x++, keyboardp.y--;
+- else if ((keyState['a'] | keyState[SDLK_KP1]) & 2) keyboardp.x--, keyboardp.y++;
+- else if ((keyState['w'] | keyState[SDLK_KP8] | keyState[SDLK_UP]) & 2) keyboardp.y--;
+- else if ((keyState['s'] | keyState[SDLK_KP2] | keyState[SDLK_DOWN]) & 2) keyboardp.y++;
++ if ((keyState[SDLK_q] | keyState[SDLK_KP7]) & 2) keyboardp.x--;
++ else if ((keyState[SDLK_d] | keyState[SDLK_KP3]) & 2) keyboardp.x++;
++ else if ((keyState[SDLK_e] | keyState[SDLK_KP9]) & 2) keyboardp.x++, keyboardp.y--;
++ else if ((keyState[SDLK_a] | keyState[SDLK_KP1]) & 2) keyboardp.x--, keyboardp.y++;
++ else if ((keyState[SDLK_w] | keyState[SDLK_KP8] | keyState[SDLK_UP]) & 2) keyboardp.y--;
++ else if ((keyState[SDLK_s] | keyState[SDLK_KP2] | keyState[SDLK_DOWN]) & 2) keyboardp.y++;
+ else if ((keyState[SDLK_LEFT]) & 2) keyboardp.x--, keyboardp.y+=keyboardp.x&1;
+ else if (((keyState[SDLK_RIGHT]) & 2)) { if (keyboardp.x < mapRightBound) keyboardp.y-=keyboardp.x&1, keyboardp.x++; }
+ else if ((keyState[SDLK_RETURN] | keyState[SDLK_KP5] | keyState[SDLK_SPACE] | keyState[SDLK_KP_ENTER]) & 2)
+@@ -3805,12 +3805,12 @@
+ {
+ static int usedDiag = 0;
+
+- if (keyState['q'] || keyState[SDLK_KP7]) HandleKey('q', 0);
+- else if (keyState['w'] || keyState[SDLK_KP8]) HandleKey('w', 0);
+- else if (keyState['e'] || keyState[SDLK_KP9]) HandleKey('e', 0);
+- else if (keyState['a'] || keyState[SDLK_KP1]) HandleKey('a', 0);
+- else if (keyState['s'] || keyState[SDLK_KP2]) HandleKey('s', 0);
+- else if (keyState['d'] || keyState[SDLK_KP3]) HandleKey('d', 0);
++ if (keyState[SDLK_q] || keyState[SDLK_KP7]) HandleKey('q', 0);
++ else if (keyState[SDLK_w] || keyState[SDLK_KP8]) HandleKey('w', 0);
++ else if (keyState[SDLK_e] || keyState[SDLK_KP9]) HandleKey('e', 0);
++ else if (keyState[SDLK_a] || keyState[SDLK_KP1]) HandleKey('a', 0);
++ else if (keyState[SDLK_s] || keyState[SDLK_KP2]) HandleKey('s', 0);
++ else if (keyState[SDLK_d] || keyState[SDLK_KP3]) HandleKey('d', 0);
+
+ else if (keyState[SDLK_UP] && keyState[SDLK_LEFT]) HandleKey('q', 0), usedDiag=1;
+ else if (keyState[SDLK_UP] && keyState[SDLK_RIGHT]) HandleKey('e', 0), usedDiag=1;
+Index: hex-a-hop.svn/Makefile
+===================================================================
+--- hex-a-hop.svn.orig/Makefile 2007-08-19 01:51:32.000000000 +0200
++++ hex-a-hop.svn/Makefile 2007-08-19 01:51:52.000000000 +0200
+@@ -3,9 +3,7 @@
+ VERSION = 1.0.0
+ CC = gcc
+ DATA_DIR="."
+-# See http://www.thescripts.com/forum/thread471291.html for
+-# details to -Wno-char-subscripts
+-CXXFLAGS += -Wall -W -Wno-char-subscripts -g
++CXXFLAGS += -Wall -W -g
+ GCC =g++
+ CXXSOURCES = gfx.cpp hex_puzzzle.cpp i18n.cpp
+ #INCLUDES =
+Index: hex-a-hop.svn/menus.h
+===================================================================
+--- hex-a-hop.svn.orig/menus.h 2007-08-19 01:51:40.000000000 +0200
++++ hex-a-hop.svn/menus.h 2007-08-19 01:51:52.000000000 +0200
+@@ -858,7 +858,7 @@
+ t = td;
+ if (keyState[SDLK_LSHIFT])
+ t = td*5;
+- if (keyState['0'])
++ if (keyState[SDLK_0])
+ t = MAX(-td*5, -time);
+
+ Menu::Update(t);
Modified: packages/trunk/hex-a-hop/debian/patches/series
===================================================================
--- packages/trunk/hex-a-hop/debian/patches/series 2007-08-19 00:10:00 UTC (rev 3708)
+++ packages/trunk/hex-a-hop/debian/patches/series 2007-08-19 00:11:39 UTC (rev 3709)
@@ -7,3 +7,4 @@
compiler_warnings.patch
pango_fonts.patch
remove_old_font_handling.patch
+array_subscripts_warning.patch
Modified: packages/trunk/hex-a-hop/debian/rules
===================================================================
--- packages/trunk/hex-a-hop/debian/rules 2007-08-19 00:10:00 UTC (rev 3708)
+++ packages/trunk/hex-a-hop/debian/rules 2007-08-19 00:11:39 UTC (rev 3709)
@@ -3,8 +3,7 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
-# TODO: -Wno-char-subscripts needs to be removed later but for now it's save
-CFLAGS = -Wall -W -Wno-char-subscripts -g -DUSE_GETTEXT
+CFLAGS = -Wall -W -g -DUSE_GETTEXT
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
More information about the Pkg-games-commits
mailing list