mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 15:31:39 +00:00
the custom embedded comback image is intended to replace the id1 image ..
* .. when running in fitz-compatibility mode (-fitz command line switch) * .. or when the mods themselves did not provide their own conback image themselves, ie. the "Q" conback image of id1 is just not wanted. So, just modify/corrupt the gfx/conback.lmp filename in the id1/pak0.pak file list, achieving the intention that way. common.c (kill_id1_conback): new QuakeSpasm customization helper. (COM_InitFilesystem): call kill_id1_conback() just after adding the id1 directory to the search path when not running in fitzmode. gl_draw.c (Draw_ConbackPic): when not running in fitzmode, do search for the gfx/conback.lmp file before loading the embedded custom image to see whether the mod provided its own conback image. git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@76 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
a759b9f4eb
commit
e76b9c7050
2 changed files with 32 additions and 0 deletions
|
@ -1813,6 +1813,29 @@ void COM_AddGameDirectory (char *dir)
|
|||
}
|
||||
}
|
||||
|
||||
static void kill_id1_conback (void) /* QuakeSpasm customization: */
|
||||
{
|
||||
searchpath_t *search;
|
||||
int i;
|
||||
|
||||
for (search = com_searchpaths; search; search = search->next)
|
||||
{
|
||||
if (!search->pack)
|
||||
continue;
|
||||
if (!strstr(search->pack->filename, "/id1/pak0.pak"))
|
||||
continue;
|
||||
for (i = 0 ; i < search->pack->numfiles ; i++)
|
||||
{
|
||||
if (strcmp(search->pack->files[i].name,
|
||||
"gfx/conback.lmp") == 0)
|
||||
{
|
||||
search->pack->files[i].name[0] = '$';
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
COM_InitFilesystem
|
||||
|
@ -1854,6 +1877,11 @@ void COM_InitFilesystem () //johnfitz -- modified based on topaz's tutorial
|
|||
COM_AddGameDirectory (va("%s/"GAMENAME, basedir) );
|
||||
strcpy (com_gamedir, va("%s/"GAMENAME, basedir));
|
||||
|
||||
if (!fitzmode)
|
||||
{ /* QuakeSpasm customization: */
|
||||
kill_id1_conback ();
|
||||
}
|
||||
|
||||
//johnfitz -- track number of mission packs added
|
||||
//since we don't want to allow the "game" command to strip them away
|
||||
com_nummissionpacks = 0;
|
||||
|
|
|
@ -323,6 +323,10 @@ qpic_t *Draw_ConbackPic (void)
|
|||
{
|
||||
if (fitzmode) {
|
||||
return Draw_CachePic ("gfx/conback.lmp");
|
||||
} else if (COM_LoadTempFile("gfx/conback.lmp")) {
|
||||
/* even if we are running in custom mode
|
||||
allow for mod-provided conback images */
|
||||
return Draw_CachePic ("gfx/conback.lmp");
|
||||
} else {
|
||||
/* QuakeSpasm customization: */
|
||||
cachepic_t *pic;
|
||||
|
|
Loading…
Reference in a new issue