mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-26 18:21:04 +00:00
Irrlicht cleanups (mostly getting rid of core::array
)
Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>
This commit is contained in:
parent
5acc2736db
commit
5d226268df
45 changed files with 308 additions and 1227 deletions
|
@ -4,6 +4,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include "SMaterial.h"
|
||||
|
||||
namespace irr
|
||||
|
@ -57,7 +58,7 @@ struct SOverrideMaterial
|
|||
};
|
||||
|
||||
//! To overwrite SMaterial::MaterialType
|
||||
core::array<SMaterialTypeReplacement> MaterialTypes;
|
||||
std::vector<SMaterialTypeReplacement> MaterialTypes;
|
||||
|
||||
//! Default constructor
|
||||
SOverrideMaterial() :
|
||||
|
@ -83,9 +84,8 @@ struct SOverrideMaterial
|
|||
void apply(SMaterial &material)
|
||||
{
|
||||
if (Enabled) {
|
||||
for (u32 i = 0; i < MaterialTypes.size(); ++i) {
|
||||
const SMaterialTypeReplacement &mtr = MaterialTypes[i];
|
||||
if (mtr.Original < 0 || (s32)mtr.Original == material.MaterialType)
|
||||
for (const auto &mtr : MaterialTypes) {
|
||||
if (mtr.Original < 0 || mtr.Original == (s32)material.MaterialType)
|
||||
material.MaterialType = (E_MATERIAL_TYPE)mtr.Replacement;
|
||||
}
|
||||
for (u32 f = 0; f < 32; ++f) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue