Actions followup
After coding for a few hours, I’ve come to a pretty decent idea of what I am dealing with.
At the moment, sprites and sounds are completely separated from actual objects.
Well, sounds are actually extensions of the base Object, and sprites are stored in a MAP with the object id being the key.
The issue right now is that there is no way for the object to inform the sprite as to what graphic it wants to have.
Earlier this was done with the object type string, however the object type is now an integer and is more a generic type to help with the creation of the correct class in python.
I realise now however, that the reason python was using strings for object type was simply because the strings were equal to the class names inside the C++ code. I think I will go back to that for simplicity.
Also, the whole object type thing, while very useful for torpedoes, still needs some clarification as to it’s role in other instances.
As for which sprite will be assigned to which object, perhaps the addObject method can simply accept the name of the sprite that is needed, or even better, the python code will use it’s newly created Action code to assign a sprite to an object, until such a time, the object will simply be a floating piece of nothing.
However upon first creation of the object the action code will assign a sprite by default so we dont have to do too many method calls for creation of every object.
Basically this post if full of random thoughts, so i can remember this stuff tomorrow.