- adjustments for the Blood merge.

This commit is contained in:
Christoph Oelckers 2019-09-19 22:26:44 +02:00
parent 53335f20ec
commit dd7ce38cbb
2 changed files with 20 additions and 17 deletions

View file

@ -102,18 +102,20 @@ void fullscreen_tint_gl_blood(void)
polymost_useColorOnly(true); polymost_useColorOnly(true);
glColor4ub(max(tint_blood_r, 0), max(tint_blood_g, 0), max(tint_blood_b, 0), 255); glColor4ub(max(tint_blood_r, 0), max(tint_blood_g, 0), max(tint_blood_b, 0), 255);
glBegin(GL_TRIANGLES); auto data = GLInterface.AllocVertices(3);
glVertex2f(-2.5f, 1.f); auto vt = data.second;
glVertex2f(2.5f, 1.f); vt[0].Set(-2.5f, 1.f);
glVertex2f(.0f, -2.5f); vt[1].Set(2.5f, 1.f);
glEnd(); vt[2].Set(.0f, -2.5f);
GLInterface.Draw(DT_TRIANGLES, data.first, 3);
glBlendEquation(GL_FUNC_REVERSE_SUBTRACT); glBlendEquation(GL_FUNC_REVERSE_SUBTRACT);
glColor4ub(max(-tint_blood_r, 0), max(-tint_blood_g, 0), max(-tint_blood_b, 0), 255); glColor4ub(max(-tint_blood_r, 0), max(-tint_blood_g, 0), max(-tint_blood_b, 0), 255);
glBegin(GL_TRIANGLES); data = GLInterface.AllocVertices(3);
glVertex2f(-2.5f, 1.f); vt = data.second;
glVertex2f(2.5f, 1.f); vt[0].Set(-2.5f, 1.f);
glVertex2f(.0f, -2.5f); vt[1].Set(2.5f, 1.f);
glEnd(); vt[2].Set(.0f, -2.5f);
GLInterface.Draw(DT_TRIANGLES, data.first, 3);
glBlendEquation(GL_FUNC_ADD); glBlendEquation(GL_FUNC_ADD);
glColor4ub(0,0,0,0); glColor4ub(0,0,0,0);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
@ -207,7 +209,8 @@ void paletteLoadFromDisk(void)
return; return;
} }
if ((fil = kopen4load("palette.dat", 0)) == buildvfs_kfd_invalid) auto fil = kopen4load("palette.dat", 0);
if (fil) == buildvfs_kfd_invalid)
return; return;

View file

@ -5937,10 +5937,10 @@ static void G_Startup(void)
if (g_modDir[0] != '/' && (cwd = buildvfs_getcwd(NULL, 0))) if (g_modDir[0] != '/' && (cwd = buildvfs_getcwd(NULL, 0)))
{ {
buildvfs_chdir(g_modDir); buildvfs_chdir(g_modDir);
if (artLoadFiles("tiles000.art", MAXCACHE1DSIZE) < 0) if (artLoadFiles("tiles%03d.art", MAXCACHE1DSIZE) < 0)
{ {
buildvfs_chdir(cwd); buildvfs_chdir(cwd);
if (artLoadFiles("tiles000.art", MAXCACHE1DSIZE) < 0) if (artLoadFiles("tiles%03d.art", MAXCACHE1DSIZE) < 0)
G_GameExit("Failed loading art."); G_GameExit("Failed loading art.");
} }
buildvfs_chdir(cwd); buildvfs_chdir(cwd);
@ -5948,7 +5948,7 @@ static void G_Startup(void)
Bfree(cwd); Bfree(cwd);
#endif #endif
} }
else if (artLoadFiles("tiles000.art",MAXCACHE1DSIZE) < 0) else if (artLoadFiles("tiles%03d.art",MAXCACHE1DSIZE) < 0)
G_GameExit("Failed loading art."); G_GameExit("Failed loading art.");
// Make the fullscreen nuke logo background non-fullbright. Has to be // Make the fullscreen nuke logo background non-fullbright. Has to be