mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 00:14:22 +00:00
Rename _countof to sizeOfArray (#921)
This commit is contained in:

committed by
GitHub

parent
95ed90aacb
commit
e32e06321a
@@ -108,21 +108,21 @@ LegoResult LegoLOD::Read(Tgl::Renderer* p_renderer, LegoTextureContainer* p_text
|
||||
}
|
||||
|
||||
if (numVerts > 0) {
|
||||
vertices = new float[numVerts][_countof(*vertices)];
|
||||
vertices = new float[numVerts][sizeOfArray(*vertices)];
|
||||
if (p_storage->Read(vertices, numVerts * sizeof(*vertices)) != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
if (numNormals > 0) {
|
||||
normals = new float[numNormals][_countof(*normals)];
|
||||
normals = new float[numNormals][sizeOfArray(*normals)];
|
||||
if (p_storage->Read(normals, numNormals * sizeof(*normals)) != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
if (numTextureVertices > 0) {
|
||||
textureVertices = new float[numTextureVertices][_countof(*textureVertices)];
|
||||
textureVertices = new float[numTextureVertices][sizeOfArray(*textureVertices)];
|
||||
if (p_storage->Read(textureVertices, numTextureVertices * sizeof(*textureVertices)) != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
@@ -143,7 +143,7 @@ LegoResult LegoLOD::Read(Tgl::Renderer* p_renderer, LegoTextureContainer* p_text
|
||||
goto done;
|
||||
}
|
||||
|
||||
polyIndices = new LegoU32[numPolys & MAXWORD][_countof(*polyIndices)];
|
||||
polyIndices = new LegoU32[numPolys & MAXWORD][sizeOfArray(*polyIndices)];
|
||||
if (p_storage->Read(polyIndices, (numPolys & MAXWORD) * sizeof(*polyIndices)) != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
@@ -153,7 +153,7 @@ LegoResult LegoLOD::Read(Tgl::Renderer* p_renderer, LegoTextureContainer* p_text
|
||||
}
|
||||
|
||||
if (numTextureIndices > 0) {
|
||||
textureIndices = new LegoU32[numPolys & MAXWORD][_countof(*textureIndices)];
|
||||
textureIndices = new LegoU32[numPolys & MAXWORD][sizeOfArray(*textureIndices)];
|
||||
if (p_storage->Read(textureIndices, (numPolys & MAXWORD) * sizeof(*textureIndices)) != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
@@ -212,7 +212,7 @@ LegoResult LegoLOD::Read(Tgl::Renderer* p_renderer, LegoTextureContainer* p_text
|
||||
|
||||
if (textureName != NULL) {
|
||||
if (mesh->GetUnknown0x21()) {
|
||||
LegoROI::FUN_100a9cf0(textureName, paletteEntries, _countof(paletteEntries));
|
||||
LegoROI::FUN_100a9cf0(textureName, paletteEntries, sizeOfArray(paletteEntries));
|
||||
}
|
||||
|
||||
textureInfo = p_textureContainer->Get(mesh->GetTextureName());
|
||||
|
@@ -609,7 +609,7 @@ LegoBool LegoROI::FUN_100a9bf0(const LegoChar* p_param, float& p_red, float& p_g
|
||||
// FUNCTION: LEGO1 0x100a9c50
|
||||
LegoBool LegoROI::ColorAliasLookup(const LegoChar* p_param, float& p_red, float& p_green, float& p_blue, float& p_alpha)
|
||||
{
|
||||
for (MxU32 i = 0; i < _countof(g_roiColorAliases); i++) {
|
||||
for (MxU32 i = 0; i < sizeOfArray(g_roiColorAliases); i++) {
|
||||
if (strcmpi(g_roiColorAliases[i].m_name, p_param) == 0) {
|
||||
p_red = g_roiColorAliases[i].m_red / 255.0;
|
||||
p_green = g_roiColorAliases[i].m_green / 255.0;
|
||||
|
Reference in New Issue
Block a user