quake: Fix build with gcc 4.8

The code makes some assumptions about memory layout that aren't
necessarily valid -- code that comes down to

int vecs[3][4];
vecs[0][5]=something; // assume this is the same as vecs[1][1]

Fix that code, and don't error out on unused-parameter warnings.

Change-Id: Ibcba6139261b8aa4ffc449a72d8918496d79e268
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
diff --git a/Android.mk b/Android.mk
index 50c8ddc..45e2e91 100644
--- a/Android.mk
+++ b/Android.mk
@@ -31,7 +31,7 @@
 # Optional tag would mean it doesn't get installed by default
 LOCAL_MODULE_TAGS := optional
 
-LOCAL_CFLAGS := -Werror
+LOCAL_CFLAGS := -Werror -Wno-error=unused-parameter
 
 LOCAL_SRC_FILES:= \
   cd_null.cpp \
diff --git a/quake/src/WinQuake/gl_model.cpp b/quake/src/WinQuake/gl_model.cpp
index 72649bb..227b9f1 100644
--- a/quake/src/WinQuake/gl_model.cpp
+++ b/quake/src/WinQuake/gl_model.cpp
@@ -654,7 +654,7 @@
 	for ( i=0 ; i<count ; i++, in++, out++)
 	{
 		for (j=0 ; j<8 ; j++)
-			out->vecs[0][j] = LittleFloat (in->vecs[0][j]);
+			out->vecs[j/4][j%4] = LittleFloat (in->vecs[j/4][j%4]);
 		len1 = Length (out->vecs[0]);
 		len2 = Length (out->vecs[1]);
 		len1 = (len1 + len2)/2;
diff --git a/quake/src/WinQuake/r_part.cpp b/quake/src/WinQuake/r_part.cpp
index b6fcdca..8551b2e 100644
--- a/quake/src/WinQuake/r_part.cpp
+++ b/quake/src/WinQuake/r_part.cpp
@@ -137,7 +137,7 @@
 if (!avelocities[0][0])
 {
 for (i=0 ; i<NUMVERTEXNORMALS*3 ; i++)
-avelocities[0][i] = (rand()&255) * 0.01;
+avelocities[i/3][i%3] = (rand()&255) * 0.01;
 }