-
Well zero is still a valid value for the array to store, a page full of zero values is no less valid than all ones, or any combination of the two. As such there would be no reason for the array to view this as a command to redimension the array.
May I ask how this is causing you a problem? Perhaps I can suggest how to overcome it :)
-
Part of the data improtant to the set up of the level is the length of the level itself, which should be related directly to the size of the array. I'm creating a game with a level editor in it, so the player can decide the length of a level, or edit a level, therebye changing its length... I dont want "tag-along" garbage data at the end of a level if it had been longer and the player decides to cut it short.....I'll have to settle with using the first "cel" in the array to store the length of the level, give it a max length, then just set any values that might exast after that to zero...
This will do, but is a bit sloppy and wasteful... Man, I wish Ini++ worked with all the exporters....sigh
-
I realise it is not a perfect solution, but consider using a second array file to store that data. It won't add a lot in terms of file overhead and you can store much more data of a different type than a level data grid would normally hold, so it is quite a natural fit to have a second array.
I don't know about junk data handling in the arrays, I'll enquire whether there's any internal efficiency routines to clean things up in any way and get back to you :)
-
One solution I use for resetting the array to a default size is to destroy it and then recreate it when you are about to populate it.