X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Ffiles.h;h=972e1a74f6a26de947353be3fc6e2b3b06178b15;hb=30a1e51f4672eed675ef310d67adabc36e3146fc;hp=ba5d280249142f782862538cac8070bdfb932acd;hpb=a2115940e7643dcb1b87286f3d19fe95f7b79bd3;p=flatwaifu.git diff --git a/src/files.h b/src/files.h index ba5d280..972e1a7 100644 --- a/src/files.h +++ b/src/files.h @@ -1,70 +1,64 @@ -/* - Copyright (C) Prikol Software 1996-1997 - Copyright (C) Aleksey Volynskov 1996-1997 - Copyright (C) 2011 +/* 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 . + */ - This file is part of the Doom2D:Rembo project. +#ifndef FILES_H_INCLUDED +#define FILES_H_INCLUDED - 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. +#include "glob.h" - 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. +#define SAVE_MAX 7 +#define SAVE_MAXLEN 24 - 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 -*/ +extern char savname[SAVE_MAX][SAVE_MAXLEN]; +extern char savok[SAVE_MAX]; +extern int d_start, d_end; -// File operations +void F_addwad (const char *fn); +void F_initwads (void); +int F_findres (const char n[8]); +int F_getresid (const char n[8]); +void F_getresname (char n[8], int r); +int F_getreslen (int r); -///#include -//#include -#include +// Get sprite resource id. +// Sprite name has following format: +// (nnnn)('A'+s)('0'+d)[('A'+s)('0'+d)] +// Letter means animation frame +// A for first, B for second... +// Number means direction +// 0 = front +// 1 = left +// 2 = right +// Optional part means that this file can be used for differnt frame/direction. +// Note that if found FRONT direction for this frame than it UNCONDITIONALLY used. +// Note that search performed between markers S_START and S_END in order as paced in wad. +// int n[4] -- sprite name +// int s -- sprite frame +// int d -- sprite direction +// char *dir -- out flag "alternative used" +int F_getsprid (const char n[4], int s, int d, char *dir); -#define MAX_WADS 20 -#define MAX_WAD 2000 +// void F_nextmus (char *s); +// void F_randmus (char *s); -typedef char wadname[8]; +void F_loadmap (char n[8]); -typedef struct { - int o,l; - char n[8]; -}wad_t; +void F_getsavnames (void); +void F_savegame (int n, char *s); +void F_loadgame (int n); -typedef struct { - 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*);// - -extern char wads[MAX_WADS][__MAX_PATH]; -extern int wad_num; +#endif /* FILES_H_INCLUDED */