cin: support tga/jpg/png static image

This commit is contained in:
Denis Pauk 2024-03-17 23:21:49 +02:00
parent 6590097752
commit 3906f6d146
4 changed files with 13 additions and 6 deletions

View file

@ -912,7 +912,10 @@ SCR_PlayCinematic(char *arg)
dot = strstr(arg, "."); dot = strstr(arg, ".");
/* static pcx image */ /* 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; cvar_t *r_retexturing;

View file

@ -371,7 +371,8 @@ CM_InitBoxHull(void)
(cmod->numbrushsides <= 0) || (cmod->numbrushsides <= 0) ||
(cmod->numplanes <= 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]; 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); 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)); mod->checksum = LittleLong(Com_BlockChecksum(buf, length));

View file

@ -259,7 +259,6 @@ SV_GameMap_f(void)
} }
} }
/* start up the next map */ /* start up the next map */
SV_Map(false, map, false, false); SV_Map(false, map, false, false);

View file

@ -569,7 +569,10 @@ SV_Map(qboolean attractloop, char *levelstring, qboolean loadgame, qboolean isau
SV_BroadcastCommand("changing\n"); SV_BroadcastCommand("changing\n");
SV_SpawnServer(level, spawnpoint, ss_demo, attractloop, loadgame, isautosave); 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 #ifndef DEDICATED_ONLY
SCR_BeginLoadingPlaque(); /* for local system */ SCR_BeginLoadingPlaque(); /* for local system */