From 29dcfd37696652ccce63e0376735fd28cd9b244e Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 27 Nov 2026 12:37:29 +0100 Subject: [PATCH] Drop what the rebase fix-up c0ebdd5 brought back that the base no longer has The second "null" renderer branch of select_gfx_backend(), the opaque text displays (Render_text) and the catch of std::exception in scenarioloader_mode::update(): the base's own code again (std::runtime_error, its own null branch). Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01BqfRrTiBDaAyQ2gT6ZrnZD --- application/application.cpp | 7 +------ application/scenarioloadermode.cpp | 2 +- rendering/common/scenewalk.cpp | 29 ++--------------------------- rendering/common/scenewalk.h | 1 - 4 files changed, 4 insertions(+), 35 deletions(-) diff --git a/application/application.cpp b/application/application.cpp index e8624b9e4..6b3cc4a8f 100644 --- a/application/application.cpp +++ b/application/application.cpp @@ -1538,12 +1538,7 @@ void eu07_application::select_gfx_backend() auto *factory{gfx_renderer_factory::get_instance()}; m_gfxbackend = nullptr; - if (Global.GfxRenderer == "null") - { - // draws nothing and loads no textures (test mode) - m_gfxbackend = factory->backend("null"); - } - else if (Global.GfxRenderer == "vulkan") + if (Global.GfxRenderer == "vulkan") { // a renderer which can't run here falls back to opengl, so a setting in eu07.ini doesn't leave the user with a black screen std::string reason; diff --git a/application/scenarioloadermode.cpp b/application/scenarioloadermode.cpp index 349ff691f..85f81a337 100644 --- a/application/scenarioloadermode.cpp +++ b/application/scenarioloadermode.cpp @@ -71,7 +71,7 @@ bool scenarioloader_mode::update() { } // the file it can't read, as the parser and the scenery opening report it; invalid_scenery_exception is one of these, and so is // what the file system throws - catch (std::exception const &e) { + catch (std::runtime_error const &e) { ErrorLog(std::format("Bad init: scenario \"{}\" couldn't be opened ({})", Global.SceneryFile, e.what())); state.reset(); if (Global.test.enabled) { diff --git a/rendering/common/scenewalk.cpp b/rendering/common/scenewalk.cpp index 1b0cf12e3..de01564f4 100644 --- a/rendering/common/scenewalk.cpp +++ b/rendering/common/scenewalk.cpp @@ -2297,17 +2297,9 @@ void scene_walk::Render(TSubModel *Submodel) } } } - if (Submodel->Child != nullptr && (TSubModel::iAlpha & Submodel->iFlags & 0x001F0000)) - { - if (Submodel->eType == TP_TEXT) - { // the opaque characters of a text display, drawn with depth like the rest of the opaque geometry - Render_text(Submodel); - } - else - { + if (Submodel->Child != nullptr) + if (Submodel->iAlpha & Submodel->iFlags & 0x001F0000) Render(Submodel->Child); - } - } if (Submodel->iFlags & 0xC000) { @@ -3175,23 +3167,6 @@ bool scene_walk::Render_Alpha(TModel3d *Model, material_data const *Material, fl return result; } -// opaque characters of a text display, laid out in a row the same way as the translucent ones -void scene_walk::Render_text(TSubModel *Submodel) -{ - if (TSubModel::pasText == nullptr) - { - return; - } - ::glPushMatrix(); - for (auto *p : Submodel->text_letters(*TSubModel::pasText)) - { - Render(p); - if (p->fMatrix) - ::glMultMatrixf(p->fMatrix->readArray()); // move on to the place of the next character - } - ::glPopMatrix(); -} - // characters of a text display, laid out in a row. the text can be encoded in utf-8 or in windows-1250 void scene_walk::Render_Alpha_text(TSubModel *Submodel) { diff --git a/rendering/common/scenewalk.h b/rendering/common/scenewalk.h index 111fa73fb..0db605644 100644 --- a/rendering/common/scenewalk.h +++ b/rendering/common/scenewalk.h @@ -190,7 +190,6 @@ class scene_walk bool Render_Alpha(TModel3d *Model, material_data const *Material, float const Squaredistance, glm::dvec3 const &Position, glm::vec3 const &Angle); bool Render_Alpha(TModel3d *Model, material_data const *Material, float const Squaredistance); void Render_Alpha(TSubModel *Submodel); - void Render_text(TSubModel *Submodel); // opaque characters of a text display void Render_Alpha_text(TSubModel *Submodel); // characters of a text display // TDynamicObject::renderme as the walk sets and reads it: the walk keeps its own while the passes are walked by several threads at