I'm creating a new game with a level editor. I was using the Active Picture object to load the graphics that each room uses from external files.
Now, the process of loading a room is too slow. I need to pre-cache the image files so they're in either the RAM or VRAM already when each room begins to load.
I figured that the best solution would be to use the active object instead. I can prepare like 1024 empty 1x1 animation frames in an animation sequence, load my images into those slots, use an array to memorize what animation frame that is linked to what image. Should work in theory, but I'm having a problem setting the hotspot. As the level format work now, it stores the position of the hotspot relative to the center of the object. I can center the hotspot when loading an image (or position it anywhere I want relative to the top-left of the image), but I can't set the hotspot to an offset of the center (because I can not retrieve the image width before I have already imported the image file). I'm not open for using an extension to figure out the image width and height first, because there's too much data to waste on reading the image files twice, and the hotspot position is essential for scaling and rotation.
What do I do if I need to pre-cache a large set of images when starting a frame (remember I'm not accepting quirky workarounds, everything should be done properly and efficiently)?