- add support for big endian CPUs

- enable the build on SPARC64
- add runtime-requirements for SPARC64
- bump version number to 4.10
This commit is contained in:
Yamagi Burmeister 2012-04-16 06:54:48 +00:00
parent 1d6f8335a3
commit b6bb97e223
8 changed files with 19 additions and 8 deletions

View file

@ -9,6 +9,8 @@ Quake II 4.03 to 4.10
- Reenable support for gamma via SDL, since the upstream
bug was fixed with SDL 1.2.15. Gamma via X11 can be
forced by defining X11GAMMA at compile time.
- Add support for big endian architectures and enable
the build on SPARC64 CPUs. (by Kieron Gillespie)
Quake II 4.02 to 4.03
- Fix wrong function call in the Quake II file system.

View file

@ -30,9 +30,11 @@ ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/amd64/x86_64/)
# (You'll need some #ifdef for your unsupported plattform!)
ifneq ($(ARCH),i386)
ifneq ($(ARCH),x86_64)
ifneq ($(ARCH),sparc64)
$(error arch $(ARCH) is currently not supported)
endif
endif
endif
# ----------

View file

@ -32,7 +32,7 @@
#include "shared.h"
#include "crc.h"
#define VERSION 4.03
#define VERSION 4.10
#define BASEDIRNAME "baseq2"
#if defined __linux__
@ -47,6 +47,8 @@
#define CPUSTRING "i386"
#elif defined __x86_64__
#define CPUSTRING "amd64"
#elif defined __sparc__
#define CPUSTRING "sparc64"
#else
#define CPUSTRING "Unknown"
#endif

View file

@ -48,8 +48,8 @@ void FloodArea_r (carea_t *area, int floodnum)
for (i=0 ; i<area->numareaportals ; i++, p++)
{
if (portalopen[p->portalnum])
FloodArea_r (&map_areas[p->otherarea], floodnum);
if (portalopen[LittleLong(p->portalnum)])
FloodArea_r (&map_areas[LittleLong(p->otherarea)], floodnum);
}
}

View file

@ -87,7 +87,7 @@ byte *CM_ClusterPVS (int cluster)
memset (pvsrow, 0, (numclusters+7)>>3);
else
CM_DecompressVis (map_visibility + map_vis->bitofs[cluster][DVIS_PVS], pvsrow);
CM_DecompressVis (map_visibility + LittleLong(map_vis->bitofs[cluster][DVIS_PVS]), pvsrow);
return pvsrow;
}
@ -98,7 +98,7 @@ byte *CM_ClusterPHS (int cluster)
memset (phsrow, 0, (numclusters+7)>>3);
else
CM_DecompressVis (map_visibility + map_vis->bitofs[cluster][DVIS_PHS], phsrow);
CM_DecompressVis (map_visibility + LittleLong(map_vis->bitofs[cluster][DVIS_PHS]), phsrow);
return phsrow;
}

View file

@ -791,8 +791,8 @@ BigShort(short l)
short
LittleShort(short l)
{return
_LittleShort(l);
{
return _LittleShort(l);
}
int
@ -904,6 +904,9 @@ Swap_Init(void)
_BigFloat = FloatNoSwap;
_LittleFloat = FloatSwap;
}
if (LittleShort(*(short *)swaptest) != 1)
assert("Error in the endian conversion!");
}
/*

View file

@ -96,6 +96,8 @@
#define ARCH "i386"
#elif defined(__x86_64__)
#define ARCH "amd64"
#elif defined(__sparc__)
#define ARCH "sparc64"
#else
#define ARCH "unknown"
#endif

View file

@ -500,7 +500,7 @@ R_DrawParticles ( void )
qglEnable( GL_BLEND );
qglDisable( GL_TEXTURE_2D );
qglPointSize( gl_particle_size->value );
qglPointSize( LittleFloat(gl_particle_size->value) );
qglBegin( GL_POINTS );