1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

Purge some dead code (mostly Irrlicht) (#16111)

* Remove obsolete Irrlicht attributes system

* Remove dead GUI element types

* Remove some obsolete Irrlicht headers

* Fix some oopsies from d96f5e1
This commit is contained in:
Lars Müller 2025-05-04 16:31:44 +02:00 committed by GitHub
parent 377fa5bb14
commit f4285a59ac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
39 changed files with 24 additions and 831 deletions

View file

@ -2,7 +2,6 @@
// SPDX-License-Identifier: LGPL-2.1-or-later
// Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
#include "IAttributes.h"
#include "gui/mainmenumanager.h"
#include "clouds.h"
#include "gui/touchcontrols.h"
@ -111,9 +110,6 @@ bool ClientLauncher::run(GameStartData &start_data, const Settings &cmd_args)
init_input();
m_rendering_engine->get_scene_manager()->getParameters()->
setAttribute(scene::ALLOW_ZWRITE_ON_TRANSPARENT, true);
guienv = m_rendering_engine->get_gui_env();
config_guienv();
g_settings->registerChangedCallback("dpi_change_notifier", setting_changed_callback, this);

View file

@ -5,7 +5,6 @@
#include "game.h"
#include <cmath>
#include "IAttributes.h"
#include "client/renderingengine.h"
#include "camera.h"
#include "client.h"
@ -959,8 +958,6 @@ bool Game::startup(bool *kill,
driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, g_settings->getBool("mip_map"));
smgr->getParameters()->setAttribute(scene::OBJ_LOADER_IGNORE_MATERIAL_FILES, true);
// Reinit runData
runData = GameRunData();
runData.time_from_last_punch = 10.0;

View file

@ -10,9 +10,11 @@
#include <limits>
#include <sstream>
#include "guiFormSpecMenu.h"
#include "EGUIElementTypes.h"
#include "constants.h"
#include "gamedef.h"
#include "client/keycode.h"
#include "gui/guiTable.h"
#include "util/strfnd.h"
#include <IGUIButton.h>
#include <IGUICheckBox.h>
@ -198,7 +200,7 @@ void GUIFormSpecMenu::setInitialFocus()
// 3. first table
for (gui::IGUIElement *it : children) {
if (it->getTypeName() == std::string("GUITable")) {
if (it->getType() == gui::EGUIET_TABLE) {
Environment->setFocus(it);
return;
}

View file

@ -8,7 +8,6 @@
#include <IAnimatedMeshSceneNode.h>
#include <IVideoDriver.h>
#include <ISceneManager.h>
#include "IAttributes.h"
#include "porting.h"
#include "client/mesh.h"
@ -21,8 +20,6 @@ GUIScene::GUIScene(gui::IGUIEnvironment *env, scene::ISceneManager *smgr,
m_cam = m_smgr->addCameraSceneNode(0, v3f(0.f, 0.f, -100.f), v3f(0.f));
m_cam->setFOV(30.f * core::DEGTORAD);
m_smgr->getParameters()->setAttribute(scene::ALLOW_ZWRITE_ON_TRANSPARENT, true);
}
GUIScene::~GUIScene()

View file

@ -635,11 +635,6 @@ void GUITable::setDynamicData(const DynamicData &dyndata)
m_scrollbar->setPos(dyndata.scrollpos);
}
const c8* GUITable::getTypeName() const
{
return "GUITable";
}
void GUITable::updateAbsolutePosition()
{
IGUIElement::updateAbsolutePosition();

View file

@ -118,9 +118,6 @@ public:
/* Set selection, scroll position and opened (sub)trees */
void setDynamicData(const DynamicData &dyndata);
/* Returns "GUITable" */
virtual const c8* getTypeName() const;
/* Must be called when position or size changes */
virtual void updateAbsolutePosition();

View file

@ -1085,9 +1085,8 @@ std::optional<double> my_string_to_double(const std::string &s)
if (s.empty())
return std::nullopt;
char *end = nullptr;
errno = 0;
// Note: this also supports hexadecimal notation like "0x1.0p+1"
double number = std::strtod(s.data(), &end);
double number = std::strtod(s.c_str(), &end);
if (end != &*s.end())
return std::nullopt;
return number;