diff --git a/src/map.c b/src/map.c
index dfc7b7071c0a9744264c2fef70438415ae74bcf9..880abb479da44101744d7aa0b1cc23f3cc7ef427 100644 (file)
--- a/src/map.c
+++ b/src/map.c
+/* Copyright (C) 1996-1997 Aleksey Volynskov
+ * Copyright (C) 2011 Rambo
+ * Copyright (C) 2020 SovietPony
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, version 3 of the License ONLY.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
#include "map.h"
#include "game.h"
#include <string.h>
#include "my.h"
#include "error.h"
+#include "cp866.h"
enum {
MB_COMMENT = -1, MB_END = 0,
switch (blk.t) {
case MB_MUSIC:
myfread(g_music, 8, 1, h);
- if (music_random) {
- F_randmus(g_music);
- }
- F_loadmus(g_music);
+ //if (music_random) {
+ // F_randmus(g_music);
+ //}
+ MUS_load(g_music);
return 1;
}
return 0;
}
if (!g_dm) {
if (j == -1) {
- ERR_fatal("Предмет игрок_1 не найден");
+ ERR_fatal("Player 1 point not exists on the map");
}
dm_pos[0].x = it[j].o.x;
dm_pos[0].y = it[j].o.y;
}
if (!g_dm && _2pl) {
if (j == -1) {
- ERR_fatal("Предмет игрок_2 не найден");
+ ERR_fatal("Player 2 point not exists on the map");
}
dm_pos[1].x = it[j].o.x;
dm_pos[1].y = it[j].o.y;
}
}
if (g_dm && j < 2) {
- ERR_fatal("Меньше 2-ух точек DM");
+ ERR_fatal("Required at least two DM points on the map");
}
if (g_dm) {
dm_pnum = j;
case 1:
buf = malloc(blk.sz);
if (buf == NULL) {
- ERR_fatal("Не хватает памяти");
+ ERR_fatal("Out of memory");
}
myfread(buf, blk.sz, 1, h);
unpack(buf, blk.sz, p);
myfread(s, 8, 1, h);
walf[i] = myfread8(h) ? 1 : 0; // ???
R_load(s);
- if (strncasecmp(s, "VTRAP01", 8) == 0) {
+ if (cp866_strncasecmp(s, "VTRAP01", 8) == 0) {
walf[i] |= 2;
}
}
myfread(hdr.id, 8, 1, h);
hdr.ver = myfread16(h);
if (memcmp(hdr.id, "Doom2D\x1A", 8) != 0) {
- ERR_fatal("%.8s не является уровнем", n);
+ ERR_fatal("%.8s not map", n);
}
for (;;) {
blk.t = myfread16(h);
if(!W_load(h)) {
if(!IT_load(h)) {
if(!SW_load(h)) {
- ERR_fatal("Неизвестный блок %d(%d) в уровне %.8s", blk.t, blk.st, n);
+ ERR_fatal("Unknown block %d(%d) on map %.8s", blk.t, blk.st, n);
}
}
}