huge weapon-code cleanup (buggy!), pch, demo fix

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1475 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2007-12-24 21:38:53 +00:00
parent 8ace59243e
commit 9c3e74cbdf
47 changed files with 795 additions and 627 deletions
+3 -5
View File
@@ -1,5 +1,6 @@
// implementation of generic tools
#include "pch.h"
#include "cube.h"
///////////////////////// file system ///////////////////////
@@ -246,15 +247,12 @@ bool cmpf(char *fn, enet_uint32 c)
void endianswap(void *memory, int stride, int length) // little endian as storage format
{
#ifdef SDL_BYTEORDER
#if SDL_BYTEORDER == SDL_BIG_ENDIAN
loop(w, length) loop(i, stride/2)
static const int littleendian = 1;
if(!*(const char *)&littleendian) loop(w, length) loop(i, stride/2)
{
uchar *p = (uchar *)memory+w*stride;
uchar t = p[i];
p[i] = p[stride-i-1];
p[stride-i-1] = t;
}
#endif
#endif
}