Dynamic number of models per frame instead of a hard limit of four. (#1298)
* Changed model-related arrays to TArrays. * Update models.cpp Used TArray.Alloc to make TArrays have the correct size depending on the number of models. surfaceSkinIDs was two-dimensional and is now a one-dimensional TArray as well, it's size is now (models * MD3_MAX_SURFACES) surfaceSkinIDs was two-dimensional and is now a one-dimensional TArray as well, elements are accessed via [Row + Column * NumRows], in this case sSurfaceIndex + modelIndex * MD3_MAX_SURFACES] * Edited skinSurfaceIDs access for one-dimensional TArray * Edited skinSurfaceIDs access for one-dimensional TArray * Edited skinSurfaceIDs access for one-dimensional TArray * Changed model-related arrays to TArrays. Also removed MAX_MODELS_PER_FRAME. * Used TArray.Alloc to make TArrays have the correct size depending on the number of models. surfaceSkinIDs was two-dimensional and is now a one-dimensional TArray as well, elements are accessed via [Row + Column * NumRows], in this case surfaceIndex + modelIndex * MD3_MAX_SURFACES] * Used TArray.Alloc to make TArrays have the correct size depending on the number of models. surfaceSkinIDs was two-dimensional and is now a one-dimensional TArray as well, elements are accessed via [Row + Column * NumRows], in this case surfaceIndex + modelIndex * MD3_MAX_SURFACES] * Update models.h * Edited MAX_MODELS_MD3 * Update models_obj.cpp
This commit is contained in:
parent
4d56754171
commit
769d60a64f
6 changed files with 77 additions and 31 deletions
|
|
@ -162,7 +162,7 @@ void hw_PrecacheTexture(uint8_t *texhitlist, TMap<PClassActor*, bool> &actorhitl
|
|||
FSpriteModelFrame * smf = FindModelFrame(cls, state.sprite, state.Frame, false);
|
||||
if (smf != NULL)
|
||||
{
|
||||
for (int i = 0; i < MAX_MODELS_PER_FRAME; i++)
|
||||
for (int i = 0; i < smf->modelsAmount; i++)
|
||||
{
|
||||
if (smf->skinIDs[i].isValid())
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue