1 // SONIC ROBO BLAST 2 2 //----------------------------------------------------------------------------- 3 // Copyright (C) 1998-2000 by DooM Legacy Team. 4 // Copyright (C) 1999-2020 by Sonic Team Junior. 5 // 6 // This program is free software distributed under the 7 // terms of the GNU General Public License, version 2. 8 // See the 'LICENSE' file for more details. 9 //----------------------------------------------------------------------------- 10 /// \file dehacked.h 11 /// \brief Dehacked files. 12 13 #ifndef __DEHACKED_H__ 14 #define __DEHACKED_H__ 15 16 #include "m_fixed.h" // for get_number 17 18 typedef enum 19 { 20 UNDO_NONE = 0x00, 21 UNDO_NEWLINE = 0x01, 22 UNDO_SPACE = 0x02, 23 UNDO_CUTLINE = 0x04, 24 UNDO_HEADER = 0x07, 25 UNDO_ENDTEXT = 0x08, 26 UNDO_TODO = 0, 27 UNDO_DONE = 0, 28 } undotype_f; 29 30 void DEH_LoadDehackedLump(lumpnum_t lumpnum); 31 void DEH_LoadDehackedLumpPwad(UINT16 wad, UINT16 lump, boolean mainfile); 32 33 fixed_t get_number(const char *word); 34 FUNCPRINTF void deh_warning(const char *first, ...); 35 void deh_strlcpy(char *dst, const char *src, size_t size, const char *warntext); 36 37 extern boolean deh_loaded; 38 39 extern boolean gamedataadded; 40 extern boolean titlechanged; 41 extern boolean introchanged; 42 43 #define MAXRECURSION 30 44 extern const char *superactions[MAXRECURSION]; 45 extern UINT8 superstack; 46 47 // If the dehacked patch does not match this version, we throw a warning 48 #define PATCHVERSION 220 49 50 #define MAXLINELEN 1024 51 52 // the code was first write for a file 53 // converted to use memory with this functions 54 typedef struct 55 { 56 char *data; 57 char *curpos; 58 size_t size; 59 UINT16 wad; 60 } MYFILE; 61 #define myfeof(a) (a->data + a->size <= a->curpos) 62 char *myfgets(char *buf, size_t bufsize, MYFILE *f); 63 char *myhashfgets(char *buf, size_t bufsize, MYFILE *f); 64 #endif 65