DEADSOFTWARE

update copyrights
[flatwaifu.git] / src / files.c
index 47aaa71eb1a65a2b2997471566b3fa3795f5456d..d78389ff4da1ea5d7038d5eb93ace9be11695d39 100644 (file)
@@ -1,24 +1,19 @@
-/*
-   Copyright (C) Prikol Software 1996-1997
-   Copyright (C) Aleksey Volynskov 1996-1997
-   Copyright (C) <ARembo@gmail.com> 2011
-
-   This file is part of the Doom2D:Rembo project.
-
-   Doom2D:Rembo is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License version 2 as
-   published by the Free Software Foundation.
-
-   Doom2D:Rembo 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/> or
-   write to the Free Software Foundation, Inc.,
-   51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-*/
+/* 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 "glob.h"
 #include <stdio.h>
@@ -47,7 +42,8 @@ typedef struct {
 
 int d_start, d_end;
 mwad_t wad[MAX_WAD];
-map_block_t blk;
+char wads[MAX_WADS][__MAX_PATH];
+FILE* wadh[MAX_WADS];
 
 static byte seq[255];
 static byte seqn;
@@ -60,9 +56,6 @@ static int m_start, m_end;
 static int s_start, s_end;
 static int wad_num;
 
-static char wads[MAX_WADS][__MAX_PATH];
-static FILE* wadh[MAX_WADS];
-
 static char f_drive[__MAX_DRIVE];
 static char f_dir[__MAX_DIR];
 static char f_name[__MAX_FNAME];
@@ -355,44 +348,6 @@ void F_readstrz (FILE* h,char *s,int m) {
 }
 */
 
-void F_loadmap (char n[8]) {
-  int r, o;
-  FILE *h;
-  map_header_t hdr;
-  W_init();
-  r = F_getresid(n);
-  h = wadh[wad[r].f];
-  fseek(h, wad[r].o, SEEK_SET);
-  myfread(hdr.id, 8, 1, h);
-  hdr.ver = myfread16(h);
-  if (memcmp(hdr.id, "Doom2D\x1A", 8) != 0) {
-    ERR_fatal("%.8s не является уровнем", n);
-  }
-  for(;;) {
-    blk.t = myfread16(h);
-    blk.st = myfread16(h);
-    blk.sz = myfread32(h);
-    if(blk.t == MB_END) {
-      break;
-    }
-    if(blk.t == MB_COMMENT) {
-      fseek(h, blk.sz, SEEK_CUR);
-      continue;
-    }
-    o = ftell(h) + blk.sz;
-    if(!G_load(h)) {
-      if(!W_load(h)) {
-        if(!IT_load(h)) {
-          if(!SW_load(h)) {
-            ERR_fatal("Неизвестный блок %d(%d) в уровне %.8s", blk.t, blk.st, n);
-          }
-        }
-      }
-    }
-    fseek(h, o, SEEK_SET);
-  }
-}
-
 /*void F_freemus(void) {
 
   int i;