1
2
3
4
5
6
7
8
9
10
11
|
// worldio.cpp: loading & saving of maps and savegames
#include "cube.h"
#import "Entity.h"
struct persistent_entity {
short x, y, z; // cube aligned position
short attr1;
unsigned char type; // type is one of the above
unsigned char attr2, attr3, attr4;
|
>
|
1
2
3
4
5
6
7
8
9
10
11
12
|
// worldio.cpp: loading & saving of maps and savegames
#include "cube.h"
#import "Command.h"
#import "Entity.h"
struct persistent_entity {
short x, y, z; // cube aligned position
short attr1;
unsigned char type; // type is one of the above
unsigned char attr2, attr3, attr4;
|
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
|
t = s;
}
spurge;
gzclose(f);
conoutf(@"wrote map file %@", cgzname);
settagareas();
}
COMMANDN(savemap, save_world, ARG_1STR)
void
load_world(OFString *mname) // still supports all map formats that have existed
// since the earliest cube betas!
{
stopifrecording();
cleardlights();
|
>
>
|
>
|
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
|
t = s;
}
spurge;
gzclose(f);
conoutf(@"wrote map file %@", cgzname);
settagareas();
}
COMMAND(savemap, ARG_1STR, ^(OFString *mname) {
save_world(mname);
})
void
load_world(OFString *mname) // still supports all map formats that have existed
// since the earliest cube betas!
{
stopifrecording();
cleardlights();
|