X-Git-Url: https://deadsoftware.ru/gitweb?p=flatwaifu.git;a=blobdiff_plain;f=src%2Ffiles.h;h=5433bfc15b16acb69580b2b73aa0a0822b18fe07;hp=d6b60983402573ffa9f219e54594a890e33891a8;hb=ef16dea09f87b15fc6d58fae0aa0832e0648c00e;hpb=d070670f189ec66ed2ac6b45834a192c004bc92f diff --git a/src/files.h b/src/files.h index d6b6098..5433bfc 100644 --- a/src/files.h +++ b/src/files.h @@ -1,29 +1,26 @@ -/* - Copyright (C) Prikol Software 1996-1997 - Copyright (C) Aleksey Volynskov 1996-1997 - - 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 or - write to the Free Software Foundation, Inc., - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -// File operations - -///#include -//#include -#include +/* 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 . + */ + +#ifndef FILES_H_INCLUDED +#define FILES_H_INCLUDED + +#include "glob.h" +#include // FILE +#include "map.h" // map_block_t #define MAX_WADS 20 #define MAX_WAD 2000 @@ -31,42 +28,33 @@ typedef char wadname[8]; typedef struct { - int o,l; + int o, l; char n[8]; -}wad_t; +} wad_t; typedef struct { - int o,l; + int o, l; char n[8]; int f; -}mwad_t; - -void F_startup(void); -void F_addwad(char *); -void F_initwads(void); -void F_allocres(void); -//void F_preload(void); -void F_readstr(FILE*,char *,int); -void F_readstrz(FILE*,char *,int); -void F_loadres(int,void *,dword,dword); -int F_getresid(char *); -void F_getresname(char *,int); -int F_findres(char *); -int F_getsprid(char[4],int,int); -int F_getreslen(int); -void F_loadmap(char[8]); -void F_loadmus(char[8]); -void F_freemus(void); -void F_nextmus(char*); - -void F_getsavnames(void); -void F_loadgame(int); -void F_savegame(int,char*); - -void F_randmus(char*);// +} mwad_t; +extern int d_start, d_end; +extern mwad_t wad[MAX_WAD]; extern char wads[MAX_WADS][__MAX_PATH]; -extern int wad_num; - -int F_getsprid(char n[4],int s,int d); -int F_getresid(char *n); +extern FILE* wadh[MAX_WADS]; + +void F_startup (void); +void F_addwad (const char *fn); +void F_initwads (void); +void F_allocres (void); +void F_loadres (int r, void *p, dword o, dword l); +int F_findres (const char n[8]); +int F_getresid (const char n[8]); +void F_getresname (char n[8], int r); +int F_getsprid (const char n[4], int s, int d, char *dir); +int F_getreslen (int r); +void F_nextmus (char *s); +void F_randmus (char *s); +void F_readstr (FILE* h, char *s, int m); + +#endif /* FILES_H_INCLUDED */