mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-12-01 17:37:09 +01:00
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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BqfRrTiBDaAyQ2gT6ZrnZD
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user