2020-10-29 05:48:29 +00:00
// SONIC ROBO BLAST 2
//-----------------------------------------------------------------------------
2020-10-29 20:32:31 +00:00
// Copyright (C) 1998-2000 by DooM Legacy Team.
2023-03-31 12:53:31 +00:00
// Copyright (C) 1999-2023 by Sonic Team Junior.
2020-10-29 05:48:29 +00:00
//
// 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 deh_tables.h
/// \brief Define DeHackEd tables.
# ifndef __DEH_TABLES_H__
# define __DEH_TABLES_H__
# include "doomdef.h" // Constants
# include "d_think.h" // actionf_t
# include "info.h" // Mobj, state, sprite, etc constants
2020-11-29 20:54:15 +00:00
# include "lua_script.h"
2020-10-29 05:48:29 +00:00
// Free slot names
// The crazy word-reading stuff uses these.
2020-12-01 03:04:23 +00:00
extern char * FREE_STATES [ NUMSTATEFREESLOTS ] ;
extern char * FREE_MOBJS [ NUMMOBJFREESLOTS ] ;
extern char * FREE_SKINCOLORS [ NUMCOLORFREESLOTS ] ;
extern UINT8 used_spr [ ( NUMSPRITEFREESLOTS / 8 ) + 1 ] ; // Bitwise flag for sprite freeslot in use! I would use ceil() here if I could, but it only saves 1 byte of memory anyway.
2020-10-29 05:48:29 +00:00
# define initfreeslots() {\
memset ( FREE_STATES , 0 , sizeof ( char * ) * NUMSTATEFREESLOTS ) ; \
memset ( FREE_MOBJS , 0 , sizeof ( char * ) * NUMMOBJFREESLOTS ) ; \
memset ( FREE_SKINCOLORS , 0 , sizeof ( char * ) * NUMCOLORFREESLOTS ) ; \
memset ( used_spr , 0 , sizeof ( UINT8 ) * ( ( NUMSPRITEFREESLOTS / 8 ) + 1 ) ) ; \
2022-02-06 20:16:30 +00:00
memset ( actionsoverridden , LUA_REFNIL , sizeof ( actionsoverridden ) ) ; \
2020-10-29 05:48:29 +00:00
}
struct flickytypes_s {
const char * name ;
const mobjtype_t type ;
} ;
# define MAXFLICKIES 64
/** Action pointer for reading actions from Dehacked lumps.
*/
typedef struct
{
actionf_t action ; ///< Function pointer corresponding to the actual action.
const char * name ; ///< Name of the action in ALL CAPS.
} actionpointer_t ;
struct int_const_s {
const char * n ;
// has to be able to hold both fixed_t and angle_t, so drastic measure!!
lua_Integer v ;
} ;
extern const char NIGHTSGRADE_LIST [ ] ;
extern struct flickytypes_s FLICKYTYPES [ ] ;
extern actionpointer_t actionpointers [ ] ; // Array mapping action names to action functions.
extern const char * const STATE_LIST [ ] ;
extern const char * const MOBJTYPE_LIST [ ] ;
extern const char * const MOBJFLAG_LIST [ ] ;
extern const char * const MOBJFLAG2_LIST [ ] ; // \tMF2_(\S+).*// (.+) --> \t"\1", // \2
extern const char * const MOBJEFLAG_LIST [ ] ;
extern const char * const MAPTHINGFLAG_LIST [ 4 ] ;
extern const char * const PLAYERFLAG_LIST [ ] ;
extern const char * const GAMETYPERULE_LIST [ ] ;
2021-12-31 07:53:00 +00:00
extern const char * const ML_LIST [ ] ; // Linedef flags
extern const char * const MSF_LIST [ ] ; // Sector flags
extern const char * const SSF_LIST [ ] ; // Sector special flags
extern const char * const SD_LIST [ ] ; // Sector damagetype
2021-12-31 10:39:34 +00:00
extern const char * const TO_LIST [ ] ; // Sector triggerer
2020-10-29 05:48:29 +00:00
extern const char * COLOR_ENUMS [ ] ;
extern const char * const POWERS_LIST [ ] ;
extern const char * const HUDITEMS_LIST [ ] ;
extern const char * const MENUTYPES_LIST [ ] ;
extern struct int_const_s const INT_CONST [ ] ;
2021-02-16 18:46:31 +00:00
// Moved to this file because it can't work compile-time otherwise
void DEH_TableCheck ( void ) ;
2020-10-29 05:48:29 +00:00
# endif