Cyb, that is precisely the problem: I can see that something isn't being cleaned up correctly (or in the correct order) because this crash is a classic example of what happens when trying to dereference a pointer to a variable which has had its memory cleared.
For rapid-development reasons, I have used Irrlicht predominantly for everything in the viewer, from texture-creation to mesh-rendering. Something is going wrong with the Irrlicht side of things, I am sure of it.
The strange thing is, the viewer has absolutely no problems switching between the Character models rapidly. Which suggests maybe that there is an issue with bulk-memory allocation/deallocation going on with the map-models specifically.
I may just have to switch to static pre-allocated arrays, or do an extra initial pass to determine memory requirements and deallocate/allocate prior to parsing the data.
MrAdults, the textures I am specifically having problems with are 64xN sized ones (where N is any value other than 64). And these are all 4-bit images, presumably with 32x8 tiles because using that value, the interlacing works fine with 64x64 textures.
And I forgot to mention this before:
Notice the big tree blocking the entrance to Nibelheim? (strange, no
)
Those must be independant models which get positioned by the game at sometime, but are initially planted at the origin (0,0,0).
It is also the same in the Church map, where the door (leading out) is also initially loaded at the origin (on top of the flower-bed actually, standing upright).
Perhaps their precise position values are what is contained in [unknown-chunk-1] of these [!]-model files?
We never did find out what that chunk contained