Delete some dead code

This commit is contained in:
sfan5 2024-02-18 16:32:45 +01:00
parent 19819bd23a
commit 89d0717779
7 changed files with 3 additions and 165 deletions

@ -19,75 +19,9 @@ enum E_ATTRIBUTE_TYPE
// float attribute
EAT_FLOAT,
// string attribute
EAT_STRING,
// boolean attribute
EAT_BOOL,
// enumeration attribute
EAT_ENUM,
// color attribute
EAT_COLOR,
// floating point color attribute
EAT_COLORF,
// 3d vector attribute
EAT_VECTOR3D,
// 2d position attribute
EAT_POSITION2D,
// vector 2d attribute
EAT_VECTOR2D,
// rectangle attribute
EAT_RECT,
// matrix attribute
EAT_MATRIX,
// quaternion attribute
EAT_QUATERNION,
// 3d bounding box
EAT_BBOX,
// plane
EAT_PLANE,
// 3d triangle
EAT_TRIANGLE3D,
// line 2d
EAT_LINE2D,
// line 3d
EAT_LINE3D,
// array of stringws attribute
EAT_STRINGWARRAY,
// array of float
EAT_FLOATARRAY,
// array of int
EAT_INTARRAY,
// binary data attribute
EAT_BINARY,
// texture reference attribute
EAT_TEXTURE,
// user pointer void*
EAT_USER_POINTER,
// dimension attribute
EAT_DIMENSION2D,
// known attribute type count
EAT_COUNT,

@ -6,25 +6,10 @@
#define __I_ATTRIBUTES_H_INCLUDED__
#include "IReferenceCounted.h"
#include "SColor.h"
#include "vector3d.h"
#include "vector2d.h"
#include "line2d.h"
#include "line3d.h"
#include "triangle3d.h"
#include "position2d.h"
#include "rect.h"
#include "dimension2d.h"
#include "matrix4.h"
#include "quaternion.h"
#include "plane3d.h"
#include "triangle3d.h"
#include "line2d.h"
#include "line3d.h"
#include "irrString.h"
#include "irrArray.h"
#include "EAttributes.h"
#include "path.h"
// not needed here but I can't be bothered to clean the transitive includes up.
#include "quaternion.h"
namespace irr
{
@ -55,16 +40,6 @@ public:
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
virtual E_ATTRIBUTE_TYPE getAttributeType(s32 index) const = 0;
//! Returns the type string of the attribute
//! \param attributeName: String for the attribute type
//! \param defaultNotFound Value returned when attributeName was not found
virtual const wchar_t* getAttributeTypeString(const c8* attributeName, const wchar_t* defaultNotFound = L"unknown") const = 0;
//! Returns the type string of the attribute by index.
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
//! \param defaultNotFound Value returned for an invalid index
virtual const wchar_t* getAttributeTypeString(s32 index, const wchar_t* defaultNotFound = L"unknown") const = 0;
//! Returns if an attribute with a name exists
virtual bool existsAttribute(const c8* attributeName) const = 0;

@ -62,11 +62,6 @@ public:
return EAT_BOOL;
}
const wchar_t* getTypeString() const override
{
return L"bool";
}
bool BoolValue;
};
@ -106,11 +101,6 @@ public:
return EAT_INT;
}
const wchar_t* getTypeString() const override
{
return L"int";
}
s32 Value;
};
@ -150,11 +140,6 @@ public:
return EAT_FLOAT;
}
const wchar_t* getTypeString() const override
{
return L"float";
}
f32 Value;
};

@ -172,26 +172,6 @@ E_ATTRIBUTE_TYPE CAttributes::getAttributeType(s32 index) const
return Attributes[index]->getType();
}
//! Returns the type of an attribute
const wchar_t* CAttributes::getAttributeTypeString(const c8* attributeName, const wchar_t* defaultNotFound) const
{
const IAttribute* att = getAttributeP(attributeName);
if (att)
return att->getTypeString();
else
return defaultNotFound;
}
//! Returns attribute type string by index.
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
const wchar_t* CAttributes::getAttributeTypeString(s32 index, const wchar_t* defaultNotFound) const
{
if ((u32)index >= Attributes.size())
return defaultNotFound;
return Attributes[index]->getTypeString();
}
//! Gets an attribute as integer value
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
s32 CAttributes::getAttributeAsInt(s32 index) const

@ -41,15 +41,6 @@ public:
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
E_ATTRIBUTE_TYPE getAttributeType(s32 index) const override;
//! Returns the type string of the attribute
//! \param attributeName: String for the attribute type
//! \param defaultNotFound Value returned when attributeName was not found
const wchar_t* getAttributeTypeString(const c8* attributeName, const wchar_t* defaultNotFound = L"unknown") const override;
//! Returns the type string of the attribute by index.
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
const wchar_t* getAttributeTypeString(s32 index, const wchar_t* defaultNotFound = L"unknown") const override;
//! Returns if an attribute with a name exists
bool existsAttribute(const c8* attributeName) const override;

@ -56,7 +56,6 @@ public:
core::stringc Name;
virtual E_ATTRIBUTE_TYPE getType() const = 0;
virtual const wchar_t* getTypeString() const = 0;
};
} // end namespace io

@ -1,26 +0,0 @@
// Copyright (C) 2002-2012 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
#pragma once
#include "vector2d.h"
typedef signed short TZBufferType;
namespace irr
{
namespace video
{
struct S2DVertex
{
core::vector2d<s32> Pos; // position
core::vector2d<s32> TCoords; // texture coordinates
TZBufferType ZValue; // zvalue
u16 Color;
};
} // end namespace video
} // end namespace irr