mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-11-22 01:45:19 +01:00
filesystem: add new gameinfo.txt key: demomap
This commit is contained in:
parent
7bb5d9a67a
commit
d114dffcb4
@ -78,6 +78,7 @@ These strings are specific to Xash3D FWGS.
|
|||||||
| `internal_vgui_support` | boolean | 0 | Only for programmers! Required to be set as 1 for PrimeXT!<br>When set to 1, the engine will not load vgui_support DLL, as VGUI support is done (or intentionally ignored) on the game side. |
|
| `internal_vgui_support` | boolean | 0 | Only for programmers! Required to be set as 1 for PrimeXT!<br>When set to 1, the engine will not load vgui_support DLL, as VGUI support is done (or intentionally ignored) on the game side. |
|
||||||
| `render_picbutton_text` | boolean | 0 | When set to 1, the UI will not use prerendered `btns_main.bmp` and dynamically render them instead |
|
| `render_picbutton_text` | boolean | 0 | When set to 1, the UI will not use prerendered `btns_main.bmp` and dynamically render them instead |
|
||||||
| `quicksave_aged_count` | integer | 2 | Quick saves limit used in saves rotation |
|
| `quicksave_aged_count` | integer | 2 | Quick saves limit used in saves rotation |
|
||||||
|
| `demomap` | string | Empty string | The name of the demo chapter map (Half-Life Uplink) |
|
||||||
|
|
||||||
## Note on GoldSrc liblist.gam support
|
## Note on GoldSrc liblist.gam support
|
||||||
|
|
||||||
|
@ -619,6 +619,9 @@ static void FS_WriteGameInfo( const char *filepath, gameinfo_t *GameInfo )
|
|||||||
FS_Printf( f, "internal_vgui_support\t\t%s\n", GameInfo->internal_vgui_support ? "1" : "0" );
|
FS_Printf( f, "internal_vgui_support\t\t%s\n", GameInfo->internal_vgui_support ? "1" : "0" );
|
||||||
FS_Printf( f, "render_picbutton_text\t\t%s\n", GameInfo->render_picbutton_text ? "1" : "0" );
|
FS_Printf( f, "render_picbutton_text\t\t%s\n", GameInfo->render_picbutton_text ? "1" : "0" );
|
||||||
|
|
||||||
|
if( COM_CheckStringEmpty( GameInfo->demomap ))
|
||||||
|
FS_Printf( f, "demomap\t\t\"%s\"\n", GameInfo->demomap );
|
||||||
|
|
||||||
FS_Close( f ); // all done
|
FS_Close( f ); // all done
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -879,9 +882,21 @@ static void FS_ParseGenericGameInfo( gameinfo_t *GameInfo, const char *buf, cons
|
|||||||
pfile = COM_ParseFile( pfile, token, sizeof( token ));
|
pfile = COM_ParseFile( pfile, token, sizeof( token ));
|
||||||
GameInfo->autosave_aged_count = bound( 2, Q_atoi( token ), 99 );
|
GameInfo->autosave_aged_count = bound( 2, Q_atoi( token ), 99 );
|
||||||
}
|
}
|
||||||
|
else if( !Q_stricmp( token, "demomap" ))
|
||||||
|
{
|
||||||
|
pfile = COM_ParseFile( pfile, GameInfo->demomap, sizeof( GameInfo->demomap ));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// demomap only valid for gameinfo.txt but HL1 after 25th anniversary update
|
||||||
|
// comes with demo chapter. Set the demomap here.
|
||||||
|
if( !COM_CheckStringEmpty( GameInfo->demomap ))
|
||||||
|
{
|
||||||
|
if( !Q_stricmp( GameInfo->title, "Half-Life" )) // original check from GameUI
|
||||||
|
Q_strncpy( GameInfo->demomap, "hldemo1", sizeof( GameInfo->demomap ));
|
||||||
|
}
|
||||||
|
|
||||||
if( !found_linux || !found_osx )
|
if( !found_linux || !found_osx )
|
||||||
{
|
{
|
||||||
// just replace extension from dll to so/dylib
|
// just replace extension from dll to so/dylib
|
||||||
|
@ -118,6 +118,7 @@ typedef struct gameinfo_s
|
|||||||
// HL25 compatibility keys
|
// HL25 compatibility keys
|
||||||
qboolean hd_background;
|
qboolean hd_background;
|
||||||
qboolean animated_title;
|
qboolean animated_title;
|
||||||
|
char demomap[MAX_QPATH];
|
||||||
} gameinfo_t;
|
} gameinfo_t;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
Loading…
Reference in New Issue
Block a user