Hoeloe wrote:Rednaxela wrote:
The old API will still work as always, because compatibility is king, but thought I'd mention what way the new API was heading.
I'm still not sure what all the arguments to placeSprite do. I know that two of the available "types" are world space and screen space placement, but are there any others, and what does the "extra" argument do?
So... for the types,
look here and
here
So aside from the absolute and relative position plain old ones... there's a "collectable item" which can be configured to trigger an autocode event, there's a process bar one, there's some sort of phanto implementation, and there's some sort of 'custom' one. I've never tried using any of them myself.
The "extra" corresponds to some autocode string argument, which... for the case of the "collectable item" one gets interpreted as an integer representing the autocode event to trigger... and for the case of the 'custom' one gets treated as the "blueprint name". Not entirely sure what that's about, but looks like there are undocumented Autocode commands for making those blueprints and doing a couple other things with custom sprites. Basically... all that is some (so far as I know) undocumented Autocode API stuff that Kil had been working on at one pont.
I'm thinking that 1) I want to add a "drawImage" API some time that bypasses all that custom sprite code... because no reason to go through that custom sprite instantiation stuff for just drawing an image for a frame... and 2) More properly integrate that custom sprite system with Lua, among other things by extending "placeSprite" to return a reference to the created custom sprite and being able to do things with that (and possibly replacing placeSprite's type argument with multiple functions... because overloading function arguments to do multiple different things like is done with 'extra', is lame...)