by Foxi4 » July 5th, 2011, 5:10 am
Well, not exactly. The buffers are fixed and memory IS allocated for them, but that's a huge space saver anyways.
In the example, there is 1 buffer char* into which a sprite is loaded. The difference between this and the standard method is that you can have as many sprites as you like and load them from Nitro into the buffer whenever you like, rather than keeping all of them in RAM at the same time.
If you have a room in which you know you will use only, say, 5 sprites and you have 25 sprites altogether, it's more "space efficient" to prepare 5 buffers and load the 5 sprites you need rather than loading all the sprites when the application starts. You save ALOT of RAM space and you can swap the sprites currently loaded at any given time.
Current Projects:
FalloutDS: Postponed until proper libraries are created, 10%
Foxi_Lib: A completely revised version of NitroSprites[FINAL], NitroBackgrounds and NitroText[FINAL], 40%