Removed pointless #ifdef __alpha__

Fixed alignment of size in D_SCAlloc() for 64-bit platforms.
This commit is contained in:
Marcus Sundberg 2000-01-08 05:57:44 +00:00
parent 0a9edb73c5
commit dada532112

View file

@ -137,12 +137,12 @@ surfcache_t *D_SCAlloc (int width, int size)
if ((size <= 0) || (size > 0x10000)) if ((size <= 0) || (size > 0x10000))
Sys_Error ("D_SCAlloc: bad cache size %d\n", size); Sys_Error ("D_SCAlloc: bad cache size %d\n", size);
#ifdef __alpha__ /* This adds the offset of data[0] in the surfcache_t struct. */
size = (int)((long)&((surfcache_t *)0)->data[size]); size += (int)((surfcache_t *)0)->data;
#else
size = (int)&((surfcache_t *)0)->data[size]; #define SIZE_ALIGN (sizeof(surfcache_t*)-1)
#endif size = (size + SIZE_ALIGN) & ~SIZE_ALIGN;
size = (size + 3) & ~3; #undef SIZE_ALIGN
if (size > sc_size) if (size > sc_size)
Sys_Error ("D_SCAlloc: %i > cache size",size); Sys_Error ("D_SCAlloc: %i > cache size",size);