I have a few questions....
1) Is there a location for these arbitary images that might be agreed to be sensible? (ie extras/overlays or perhaps the directory that the script is in by default) Or should they reside in lores/ etc. to keep all the textures in one place?
2) The Preloadtexture command relies on the texture being assigned to a Body in a ssc script (I believe). Is adding a function to render.cpp to load these images as textures a good idea? (ie check for existance/^2sides/etc in a new function)
3) I have been looking at the code for a couple of days and I think I have an idea on how to link a function to cel, and thanks to Harald perhaps even binding it incelx, but I guarantee that someone has a much better overview on what needs to be done to achieve this. Any takers to describe the process better?
(NB This is NOT a guide on how to do this. I am seeing if someone knows better. DO NOT try to implement commands based on this! Please!
![Shocked 8O](./images/smilies/icon_eek.gif)
Add to cel script:
add else if in cmdparser.cpp to catch new script element and do command (@ line ~580 or so)
add Command to command.cpp to implement functionality
Add to celx
add new RegisterMethod to CreateCelestiaMetaTable (possibly) in celx.cpp
add that method as a function in celx.cpp to do what you want.
The functionality in this case is loading a texture and adding it as an OverlayImage
Therefore need to tweak existing experimental code in celestiacore.cpp (Lines ~75 and ~3280) to show overlay textures.
+ Need to add 'random' image loading to render.cpp I think