diff --git a/src/map.c b/src/map.c
index a5b5bd8a261d2ca75ad00e2cf377a06bdc8cea55..d70a4fb3cce021c46cf39b16140f794106ddf0c7 100644 (file)
--- a/src/map.c
+++ b/src/map.c
#include <string.h>
#include <assert.h>
#include "error.h"
-#include "cp866.h"
#include "common/streams.h"
#include "common/files.h"
+#include "common/cp866.h"
enum {
MB_COMMENT = -1, MB_END = 0,
}
int MAP_load (Stream *r) {
- assert(r != NULL);
int ok = 0;
+ long off;
map_header_t hdr;
+ assert(r != NULL);
W_init(); // reset all game data
stream_read(hdr.id, 8, 1, r);
hdr.ver = stream_read16(r);
blk.t = stream_read16(r);
blk.st = stream_read16(r);
blk.sz = stream_read32(r);
- long off = stream_getpos(r) + blk.sz;
+ off = stream_getpos(r) + blk.sz;
switch (blk.t) {
case MB_MUSIC:
ok = G_load(r);