2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-11-24 18:59:50 +01:00

wscript: add option to build with extended msurface_t from HL25

This commit is contained in:
Alibek Omarov 2024-11-02 02:16:59 +03:00
parent 93b382f174
commit 09210e4316
2 changed files with 19 additions and 0 deletions

View File

@ -240,6 +240,17 @@ typedef struct mextrasurf_s
intptr_t reserved[32]; // just for future expansions or mod-makers
} mextrasurf_t;
#ifdef SUPPORT_HL25_EXTENDED_STRUCTS
// additional struct at the end of msurface_t for HL25 compatibility
typedef struct mdisplaylist_s
{
unsigned int gl_displaylist;
int rendermode;
float scrolloffset;
int renderDetailTexture;
} mdisplaylist_t;
#endif
struct msurface_s
{
int visframe; // should be drawn when node is crossed
@ -272,6 +283,10 @@ struct msurface_s
color24 *samples; // note: this is the actual lightmap data for this surface
decal_t *pdecals;
#ifdef SUPPORT_HL25_EXTENDED_STRUCTS
mdisplaylist_t displaylist;
#endif
};
typedef struct hull_s

View File

@ -135,6 +135,9 @@ def options(opt):
grp.add_option('--enable-bsp2', action = 'store_true', dest = 'SUPPORT_BSP2_FORMAT', default = False,
help = 'build engine and renderers with BSP2 map support(recommended for Quake, breaks compatibility!) [default: %(default)s]')
grp.add_option('--enable-hl25-extended-structs', action = 'store_true', dest = 'SUPPORT_HL25_EXTENDED_STRUCTS', default = False,
help = 'build engine and renderers with HL25 extended structs compatibility (might be required for some mods) [default: %(default)s]')
grp.add_option('--low-memory-mode', action = 'store', dest = 'LOW_MEMORY', default = 0, type = int,
help = 'enable low memory mode (only for devices have <128 ram)')
@ -377,6 +380,7 @@ def configure(conf):
conf.env.DEDICATED = conf.options.DEDICATED
conf.define_cond('SUPPORT_BSP2_FORMAT', conf.options.SUPPORT_BSP2_FORMAT)
conf.define_cond('SUPPORT_HL25_EXTENDED_STRUCTS', conf.options.SUPPORT_HL25_EXTENDED_STRUCTS)
# disable game_launch compiling on platform where it's not needed
conf.env.DISABLE_LAUNCHER = conf.env.DEST_OS in ['android', 'nswitch', 'psvita', 'dos'] or conf.env.MAGX or conf.env.DEDICATED or conf.env.STATIC_LINKING