mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-01-22 09:11:33 +00:00
cin: support tga/jpg/png static image
This commit is contained in:
parent
6590097752
commit
3906f6d146
4 changed files with 13 additions and 6 deletions
|
@ -912,7 +912,10 @@ SCR_PlayCinematic(char *arg)
|
|||
dot = strstr(arg, ".");
|
||||
|
||||
/* static pcx image */
|
||||
if (dot && !strcmp(dot, ".pcx"))
|
||||
if (dot && (!strcmp(dot, ".pcx") ||
|
||||
!strcmp(dot, ".tga") ||
|
||||
!strcmp(dot, ".jpg") ||
|
||||
!strcmp(dot, ".png")))
|
||||
{
|
||||
cvar_t *r_retexturing;
|
||||
|
||||
|
|
|
@ -371,7 +371,8 @@ CM_InitBoxHull(void)
|
|||
(cmod->numbrushsides <= 0) ||
|
||||
(cmod->numplanes <= 0))
|
||||
{
|
||||
Com_Error(ERR_DROP, "%s: Not enough room for box tree", __func__);
|
||||
Com_Printf("%s: Not enough room for box tree\n", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
box_brush = &cmod->map_brushes[cmod->numbrushes];
|
||||
|
@ -1933,9 +1934,10 @@ CM_LoadCachedMap(const char *name, model_t *mod)
|
|||
|
||||
length = FS_LoadFile(name, (void **)&buf);
|
||||
|
||||
if (!buf)
|
||||
if (!buf || length <= 0)
|
||||
{
|
||||
Com_Error(ERR_DROP, "%s: Couldn't load %s", name, __func__);
|
||||
Com_Printf("%s: Couldn't load %s\n", __func__, name);
|
||||
return;
|
||||
}
|
||||
|
||||
mod->checksum = LittleLong(Com_BlockChecksum(buf, length));
|
||||
|
|
|
@ -259,7 +259,6 @@ SV_GameMap_f(void)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/* start up the next map */
|
||||
SV_Map(false, map, false, false);
|
||||
|
||||
|
|
|
@ -569,7 +569,10 @@ SV_Map(qboolean attractloop, char *levelstring, qboolean loadgame, qboolean isau
|
|||
SV_BroadcastCommand("changing\n");
|
||||
SV_SpawnServer(level, spawnpoint, ss_demo, attractloop, loadgame, isautosave);
|
||||
}
|
||||
else if ((l > 4) && !strcmp(level + l - 4, ".pcx"))
|
||||
else if ((l > 4) && (!strcmp(level + l - 4, ".pcx") ||
|
||||
!strcmp(level + l - 4, ".tga") ||
|
||||
!strcmp(level + l - 4, ".jpg") ||
|
||||
!strcmp(level + l - 4, ".png")))
|
||||
{
|
||||
#ifndef DEDICATED_ONLY
|
||||
SCR_BeginLoadingPlaque(); /* for local system */
|
||||
|
|
Loading…
Reference in a new issue