SRB2/src/dehacked.h
toasterbabe 299ba49161 Introducing skin patching! (Also, DELFILE is super dead.)
* Create a normal skin, but replace the S_SKIN lump with an almost empty one named P_SKIN.
* Provide "name = existing skin name as one of the first line (comments allowed)
* Reset individual spritenames back to zero sprite2s (or one for SPR2_STND to prevent complete removal) via "reset = SPR2_****" statements.
* No support for changing skin properties that are non-visual at the moment, but I don't really feel like it's wise to have those changable with patch alone. (Hello, tons of "modern Sonic" wadfiles which just change vanilla Sonic's ability to CA_HOMINGTHOK!)
* Sprites patch over.

To see an example in action, look at <root>/toaster/smilespatch.wad.
2017-01-17 00:16:23 +00:00

66 lines
1.6 KiB
C

// SONIC ROBO BLAST 2
//-----------------------------------------------------------------------------
// Copyright (C) 1998-2000 by DooM Legacy Team.
// Copyright (C) 1999-2016 by Sonic Team Junior.
//
// This program is free software distributed under the
// terms of the GNU General Public License, version 2.
// See the 'LICENSE' file for more details.
//-----------------------------------------------------------------------------
/// \file dehacked.h
/// \brief Dehacked files.
#ifndef __DEHACKED_H__
#define __DEHACKED_H__
#include "m_fixed.h" // for get_number
typedef enum
{
UNDO_NONE = 0x00,
UNDO_NEWLINE = 0x01,
UNDO_SPACE = 0x02,
UNDO_CUTLINE = 0x04,
UNDO_HEADER = 0x07,
UNDO_ENDTEXT = 0x08,
UNDO_TODO = 0,
UNDO_DONE = 0,
} undotype_f;
void DEH_LoadDehackedLump(lumpnum_t lumpnum);
void DEH_LoadDehackedLumpPwad(UINT16 wad, UINT16 lump);
void DEH_Check(void);
fixed_t get_number(const char *word);
#ifdef HAVE_BLUA
boolean LUA_SetLuaAction(void *state, const char *actiontocompare);
const char *LUA_GetActionName(void *action);
void LUA_SetActionByName(void *state, const char *actiontocompare);
#endif
extern boolean deh_loaded;
#define MAXRECURSION 30
extern const char *superactions[MAXRECURSION];
extern UINT8 superstack;
// If the dehacked patch does not match this version, we throw a warning
#define PATCHVERSION 210
#define MAXLINELEN 1024
// the code was first write for a file
// converted to use memory with this functions
typedef struct
{
char *data;
char *curpos;
size_t size;
UINT16 wad;
} MYFILE;
#define myfeof(a) (a->data + a->size <= a->curpos)
char *myfgets(char *buf, size_t bufsize, MYFILE *f);
#endif