From b2290d92c934529e08ae4f0067e3948852a4c791 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sat, 2 Jun 2012 20:32:36 +0900 Subject: [PATCH] Nuke UNALIGNED_OK. It's not really necessary (and was effectively dead anyway). --- include/qw/bothdefs.h | 10 +--------- libs/video/renderer/sw/sw_rsky.c | 16 ---------------- nq/include/game.h | 6 ------ 3 files changed, 1 insertion(+), 31 deletions(-) diff --git a/include/qw/bothdefs.h b/include/qw/bothdefs.h index 8da1c0836..3f9d8590b 100644 --- a/include/qw/bothdefs.h +++ b/include/qw/bothdefs.h @@ -28,16 +28,8 @@ #ifndef _BOTHDEFS_H #define _BOTHDEFS_H -#ifdef USE_INTEL_ASM -# define UNALIGNED_OK 1 // set to 0 if unaligned accesses are not supported -#else -# define UNALIGNED_OK 0 -#endif -#define UNUSED(x) (x = x) // for pesky compiler / lint warnings - - // Error out if we get less than 4MB -#define MINIMUM_MEMORY 0x400000 +#define MINIMUM_MEMORY 0x400000 // Error out if we get less than 4MB diff --git a/libs/video/renderer/sw/sw_rsky.c b/libs/video/renderer/sw/sw_rsky.c index 7caa8d0b1..5a5670c57 100644 --- a/libs/video/renderer/sw/sw_rsky.c +++ b/libs/video/renderer/sw/sw_rsky.c @@ -110,21 +110,6 @@ R_MakeSky (void) for (y = 0; y < SKYSIZE; y++) { baseofs = ((y + yshift) & SKYMASK) * 131; - -// FIXME: clean this up -#if UNALIGNED_OK - for (x = 0; x < SKYSIZE; x += 4) { - ofs = baseofs + ((x + xshift) & SKYMASK); - - // PORT: unaligned dword access to bottommask and bottomsky - - *pnewsky = (*(pnewsky + (128 / sizeof (unsigned int))) & - *(unsigned int *) &bottommask[ofs]) | - *(unsigned int *) &bottomsky[ofs]; - - pnewsky++; - } -#else for (x = 0; x < SKYSIZE; x++) { ofs = baseofs + ((x + xshift) & SKYMASK); @@ -133,7 +118,6 @@ R_MakeSky (void) *(byte *) & bottomsky[ofs]; pnewsky = (unsigned int *) ((byte *) pnewsky + 1); } -#endif pnewsky += 128 / sizeof (unsigned int); } diff --git a/nq/include/game.h b/nq/include/game.h index 06b2c8d70..44eb7ee19 100644 --- a/nq/include/game.h +++ b/nq/include/game.h @@ -49,12 +49,6 @@ #include #include -#ifdef USE_INTEL_ASM -#define UNALIGNED_OK 1 // set to 0 if unaligned accesses are not supported -#else -#define UNALIGNED_OK 0 -#endif - #define MINIMUM_MEMORY 0x550000 #define MINIMUM_MEMORY_LEVELPAK (MINIMUM_MEMORY + 0x100000)