cleanup: flatten dead branches in client render texture and runtime code

This commit is contained in:
MatthewBeshay
2026-03-26 20:29:59 +11:00
parent f19563bbd7
commit 12ff12a263
68 changed files with 169 additions and 6669 deletions

View File

@@ -38,17 +38,6 @@ void ProgressRenderer::_progressStart(int title) {
this->title = title;
LeaveCriticalSection(&ProgressRenderer::s_progress);
#if 0
ScreenSizeCalculator ssc(minecraft->options, minecraft->width, minecraft->height);
glClear(GL_DEPTH_BUFFER_BIT);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(0, (float)ssc.rawWidth, (float)ssc.rawHeight, 0, 100, 300);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslatef(0, 0, -200);
#endif
}
void ProgressRenderer::progressStage(int status) {
@@ -73,79 +62,6 @@ void ProgressRenderer::progressStagePercentage(int i) {
lastPercent = i;
LeaveCriticalSection(&ProgressRenderer::s_progress);
#if 0
if (!minecraft->running)
{
if (noAbort) return;
// throw new StopGameException(); // 4J - removed
}
int64_t now = System::currentTimeMillis();
if (now - lastTime < 20) return;
lastTime = now;
ScreenSizeCalculator ssc(minecraft->options, minecraft->width, minecraft->height);
int screenWidth = ssc.getWidth();
int screenHeight = ssc.getHeight();
glClear(GL_DEPTH_BUFFER_BIT);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(0, (float)ssc.rawWidth, (float)ssc.rawHeight, 0, 100, 300);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslatef(0, 0, -200);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
Tesselator *t = Tesselator::getInstance();
int id = minecraft->textures->loadTexture(L"/gui/background.png");
glBindTexture(GL_TEXTURE_2D, id);
float s = 32;
t->begin();
t->color(0x404040);
t->vertexUV((float)(0), (float)( screenHeight), (float)( 0), (float)( 0), (float)( screenHeight / s));
t->vertexUV((float)(screenWidth), (float)( screenHeight), (float)( 0), (float)( screenWidth / s), (float)( screenHeight / s));
t->vertexUV((float)(screenWidth), (float)( 0), (float)( 0), (float)( screenWidth / s), (float)( 0));
t->vertexUV((float)(0), (float)( 0), (float)( 0), (float)( 0), (float)( 0));
t->end();
if (i >= 0)
{
int w = 100;
int h = 2;
int x = screenWidth / 2 - w / 2;
int y = screenHeight / 2 + 16;
glDisable(GL_TEXTURE_2D);
t->begin();
t->color(0x808080);
t->vertex((float)(x), (float)( y), (float)( 0));
t->vertex((float)(x), (float)( y + h), (float)( 0));
t->vertex((float)(x + w), (float)( y + h), (float)( 0));
t->vertex((float)(x + w), (float)( y), (float)( 0));
t->color(0x80ff80);
t->vertex((float)(x), (float)( y), (float)( 0));
t->vertex((float)(x), (float)( y + h), (float)( 0));
t->vertex((float)(x + i), (float)( y + h), (float)( 0));
t->vertex((float)(x + i), (float)( y), (float)( 0));
t->end();
glEnable(GL_TEXTURE_2D);
}
minecraft->font->drawShadow(title, (screenWidth - minecraft->font->width(title)) / 2, screenHeight / 2 - 4 - 16, 0xffffff);
minecraft->font->drawShadow(status, (screenWidth - minecraft->font->width(status)) / 2, screenHeight / 2 - 4 + 8, 0xffffff);
Display::update();
/* // 4J - removed
try {
Thread.yield();
} catch (Exception e) {
}
*/
#endif
}
int ProgressRenderer::getCurrentPercent() {