*** empty log message ***
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@593 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -201,7 +201,6 @@ void keyrepeat(bool on)
|
||||
|
||||
VARF(gamespeed, 10, 100, 1000, if(multiplayer()) gamespeed = 100);
|
||||
|
||||
int islittleendian = 1;
|
||||
int framesinmap = 0;
|
||||
|
||||
int main(int argc, char **argv)
|
||||
@@ -209,7 +208,6 @@ int main(int argc, char **argv)
|
||||
bool dedicated = false;
|
||||
int fs = SDL_FULLSCREEN, depth = 0, bpp = 0, fsaa = 0, par = 0, uprate = 0, maxcl = DEFAULTCLIENTS;
|
||||
char *sdesc = "", *ip = "", *master = NULL, *passwd = "", *maprot = NULL, *masterpwd = NULL;
|
||||
islittleendian = *((char *)&islittleendian);
|
||||
|
||||
#define log(s) puts("init: " s)
|
||||
log("sdl");
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
#include "cube.h"
|
||||
|
||||
extern int islittleendian;
|
||||
|
||||
gzFile f = NULL;
|
||||
bool demorecording = false;
|
||||
bool demoplayback = false;
|
||||
@@ -45,7 +43,7 @@ void savestate(char *fn)
|
||||
f = gzopen(fn, "wb9");
|
||||
if(!f) { conoutf("could not write %s", fn); return; };
|
||||
gzwrite(f, (void *)"CUBESAVE", 8);
|
||||
gzputc(f, islittleendian);
|
||||
gzputc(f, SDL_BYTEORDER==SDL_LITTL_ENDIAN ? 1 : 0);
|
||||
gzputi(SAVEGAMEVERSION);
|
||||
gzputi(sizeof(dynent));
|
||||
gzwrite(f, getclientmap(), _MAXDEFSTR);
|
||||
@@ -77,7 +75,7 @@ void loadstate(char *fn)
|
||||
string buf;
|
||||
gzread(f, buf, 8);
|
||||
if(strncmp(buf, "CUBESAVE", 8)) goto out;
|
||||
if(gzgetc(f)!=islittleendian) goto out; // not supporting save->load accross incompatible architectures simpifies things a LOT
|
||||
if(gzgetc(f)!=(SDL_BYTEORDER==SDL_LITTL_ENDIAN ? 1 : 0)) goto out; // not supporting save->load accross incompatible architectures simpifies things a LOT
|
||||
if(gzgeti()!=SAVEGAMEVERSION || gzgeti()!=sizeof(dynent)) goto out;
|
||||
string mapname;
|
||||
gzread(f, mapname, _MAXDEFSTR);
|
||||
|
||||
Reference in New Issue
Block a user