1
0
Fork 0
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:
sfan5 2024-08-17 19:49:11 +02:00 committed by GitHub
parent 5acc2736db
commit 5d226268df
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
45 changed files with 308 additions and 1227 deletions

View file

@ -4,10 +4,10 @@
#pragma once
#include <vector>
#include "IAnimatedMesh.h"
#include "IMesh.h"
#include "aabbox3d.h"
#include "irrArray.h"
namespace irr
{
@ -32,15 +32,15 @@ struct SAnimatedMesh : public IAnimatedMesh
virtual ~SAnimatedMesh()
{
// drop meshes
for (u32 i = 0; i < Meshes.size(); ++i)
Meshes[i]->drop();
for (auto *mesh : Meshes)
mesh->drop();
}
//! Gets the frame count of the animated mesh.
/** \return Amount of frames. If the amount is 1, it is a static, non animated mesh. */
u32 getFrameCount() const override
{
return Meshes.size();
return static_cast<u32>(Meshes.size());
}
//! Gets the default animation speed of the animated mesh.
@ -161,7 +161,7 @@ struct SAnimatedMesh : public IAnimatedMesh
}
//! All meshes defining the animated mesh
core::array<IMesh *> Meshes;
std::vector<IMesh *> Meshes;
//! The bounding box of this mesh
core::aabbox3d<f32> Box;