181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
|
entity tmp = ents[i];
endianswap(&tmp, sizeof(short), 4);
gzwrite(f, &tmp, sizeof(persistent_entity));
}
}
sqr *t = NULL;
int sc = 0;
#define spurge \
while (sc) { \
gzputc(f, 255); \
if (sc > 255) { \
gzputc(f, 255); \
sc -= 255; \
} else { \
gzputc(f, sc); \
sc = 0; \
} \
}
loopk(cubicsize)
{
sqr *s = &world[k];
#define c(f) (s->f == t->f)
// 4 types of blocks, to compress a bit:
// 255 (2): same as previous block + count
|
|
|
|
|
|
|
|
|
|
|
|
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
|
entity tmp = ents[i];
endianswap(&tmp, sizeof(short), 4);
gzwrite(f, &tmp, sizeof(persistent_entity));
}
}
sqr *t = NULL;
int sc = 0;
#define spurge \
while (sc) { \
gzputc(f, 255); \
if (sc > 255) { \
gzputc(f, 255); \
sc -= 255; \
} else { \
gzputc(f, sc); \
sc = 0; \
} \
}
loopk(cubicsize)
{
sqr *s = &world[k];
#define c(f) (s->f == t->f)
// 4 types of blocks, to compress a bit:
// 255 (2): same as previous block + count
|