1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +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

@ -9,7 +9,6 @@
#include "SMeshBuffer.h"
#include "SAnimatedMesh.h"
#include "IReadFile.h"
#include "IAttributes.h"
#include "fast_atof.h"
#include "coreutil.h"
#include "os.h"
@ -74,8 +73,6 @@ IAnimatedMesh *COBJMeshFileLoader::createMesh(io::IReadFile *file)
const c8 *bufPtr = buf;
core::stringc grpName, mtlName;
bool mtlChanged = false;
bool useGroups = !SceneManager->getParameters()->getAttributeAsBool(OBJ_LOADER_IGNORE_GROUPS);
bool useMaterials = !SceneManager->getParameters()->getAttributeAsBool(OBJ_LOADER_IGNORE_MATERIAL_FILES);
[[maybe_unused]] irr::u32 lineNr = 1; // only counts non-empty lines, still useful in debugging to locate errors
core::array<int> faceCorners;
faceCorners.reallocate(32); // should be large enough
@ -85,15 +82,7 @@ IAnimatedMesh *COBJMeshFileLoader::createMesh(io::IReadFile *file)
while (bufPtr != bufEnd) {
switch (bufPtr[0]) {
case 'm': // mtllib (material)
{
if (useMaterials) {
c8 name[WORD_BUFFER_LENGTH];
bufPtr = goAndCopyNextWord(name, bufPtr, WORD_BUFFER_LENGTH, bufEnd);
#ifdef _IRR_DEBUG_OBJ_LOADER_
os::Printer::log("Ignoring material file", name);
#endif
}
} break;
break; // not supported
case 'v': // v, vn, vt
switch (bufPtr[1]) {
@ -127,12 +116,7 @@ IAnimatedMesh *COBJMeshFileLoader::createMesh(io::IReadFile *file)
#ifdef _IRR_DEBUG_OBJ_LOADER_
os::Printer::log("Loaded group start", grp, ELL_DEBUG);
#endif
if (useGroups) {
if (0 != grp[0])
grpName = grp;
else
grpName = "default";
}
grpName = ('\0' != grp[0]) ? grp : "default";
mtlChanged = true;
} break;