summaryrefslogtreecommitdiff
path: root/src/engine/main.cpp
diff options
context:
space:
mode:
authorxolatile2025-08-04 18:17:30 +0200
committerxolatile2025-08-04 18:17:30 +0200
commita89dca11cf475e0bd1399cf5d5c5135d00495ec3 (patch)
tree4d551a7f4193bc89a0b8560e955f4f874101b388 /src/engine/main.cpp
parent9d533fa4d82935a083ff93a09aed95baea9fbfd4 (diff)
downloadxolatile-badassbug-a89dca11cf475e0bd1399cf5d5c5135d00495ec3.tar.xz
xolatile-badassbug-a89dca11cf475e0bd1399cf5d5c5135d00495ec3.tar.zst
Minor changes...
Diffstat (limited to 'src/engine/main.cpp')
-rw-r--r--src/engine/main.cpp41
1 files changed, 0 insertions, 41 deletions
diff --git a/src/engine/main.cpp b/src/engine/main.cpp
index 40ef42a..499002f 100644
--- a/src/engine/main.cpp
+++ b/src/engine/main.cpp
@@ -190,7 +190,6 @@ void renderbackground(const char *caption, Texture *mapshot, const char *mapname
gettextres(w, h);
static int lastupdate = -1, lastw = -1, lasth = -1;
- //~static float backgroundu = 0, backgroundv = 0, detailu = 0, detailv = 0;
static int numdecals = 0;
static struct decal { float x, y, size; int side; } decals[12];
if((renderedframe && !mainmenu && lastupdate != lastmillis) || lastw != w || lasth != h)
@@ -199,10 +198,6 @@ void renderbackground(const char *caption, Texture *mapshot, const char *mapname
lastw = w;
lasth = h;
- //~backgroundu = rndscale(1);
- //~backgroundv = rndscale(1);
- //~detailu = rndscale(1);
- //~detailv = rndscale(1);
numdecals = sizeof(decals)/sizeof(decals[0]);
numdecals = numdecals/3 + rnd((numdecals*2)/3 + 1);
float maxsize = min(w, h)/16.0f;
@@ -214,19 +209,6 @@ void renderbackground(const char *caption, Texture *mapshot, const char *mapname
}
else if(lastupdate != lastmillis) lastupdate = lastmillis;
- //~if (mapname) {
- //~defformatstring(backpath, "background/%s.png", mapname);
- //~if (file_does_indeed_exist(backpath)) {
- //~settexture(backpath, 0);
- //~bgquad(0, 0, 1920, 1080, 0, 0, 1920, 1080);
- //~gle::begin(GL_TRIANGLE_STRIP);
- //~gle::attribf(0.0f, 0.0f); gle::attribf(0.0f, 0.0f);
- //~gle::attribf(1.0f, 0.0f); gle::attribf(1920.0f, 0.0f);
- //~gle::attribf(0.0f, 1.0f); gle::attribf(0.0f, 1.0f);
- //~gle::attribf(1.0f, 1.0f); gle::attribf(1920.0f, 1.0f);
- //~gle::end();
- //~}
- //~} else {
loopi(restore ? 1 : 3)
{
hudmatrix.ortho(0, w, h, 0, -1, 1);
@@ -238,30 +220,9 @@ void renderbackground(const char *caption, Texture *mapshot, const char *mapname
gle::defvertex(2);
gle::deftexcoord0();
- //~defformatstring(backpath, "background/%s.png", mapname);
- //~if (file_does_indeed_exist(backpath)) {
- //~settexture(backpath, 0);
settexture("background/daemex.png", 0);
bgquad(0, 0, screenw, screenh, 0, 0, 1, 1);
- //~settexture("data/background.png", 0);
- //~float bu = w*0.67f/256.0f + backgroundu, bv = h*0.67f/256.0f + backgroundv;
- //~bgquad(0, 0, w, h, 0, 0, bu, bv);
- //~glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);
- //~settexture("data/background_detail.png", 0);
- //~float du = w*0.8f/512.0f + detailu, dv = h*0.8f/512.0f + detailv;
- //~bgquad(0, 0, w, h, 0, 0, du, dv);
- //~settexture("data/background_decal.png", 3);
- //~gle::begin(GL_QUADS);
- //~loopj(numdecals)
- //~{
- //~float hsz = decals[j].size, hx = clamp(decals[j].x, hsz, w-hsz), hy = clamp(decals[j].y, hsz, h-hsz), side = decals[j].side;
- //~gle::attribf(hx-hsz, hy-hsz); gle::attribf(side, 0);
- //~gle::attribf(hx+hsz, hy-hsz); gle::attribf(1-side, 0);
- //~gle::attribf(hx+hsz, hy+hsz); gle::attribf(1-side, 1);
- //~gle::attribf(hx-hsz, hy+hsz); gle::attribf(side, 1);
- //~}
- //~gle::end();
float lh = 0.5f*min(w, h), lw = lh*2,
lx = 0.5f*(w - lw), ly = 0.5f*(h*0.5f - lh);
settexture((maxtexsize ? min(maxtexsize, hwtexsize) : hwtexsize) >= 1024 && (screenw > 1280 || screenh > 800) ? "data/logo_1024.png" : "data/logo.png", 3);
@@ -334,7 +295,6 @@ void renderbackground(const char *caption, Texture *mapshot, const char *mapname
glDisable(GL_BLEND);
if(!restore) swapbuffers(false);
}
- //~}
if(!restore) setbackgroundinfo(caption, mapshot, mapname, mapinfo);
}
@@ -1354,7 +1314,6 @@ int main(int argc, char **argv)
if(initscript) execute(initscript);
- initmumble();
resetfpshistory();
inputgrab(grabinput = true);