I was about to start on an implementation of BackdropSlice, and I 
noticed the comments in slices.bi above the SpriteSliceData type.

'FIXME: This is limited to unmodified 4-bit sprites with flipping tacked 
on; generalise!

I am pretty happy with the way SpriteSlice currently works. How might we 
generalize it to support arbitrary frames without losing the current 
convenient interface to sprite data records?

I am reluctant to have the same slice type to represent Sprites, 
Backdrops, and arbitrary Frames that you can paint on. I gues that I 
could make .spritetype and .record become meaningless for arbitrary 
SpriteSlices, and I could make .pal become meaningless for backdrops, 
but does it make sense to do it that way?

Another approach would be to have three separate slice types

SpriteSlice -- current functionality

BackdropSlice -- would have a .record property, but not .spritetype or 
.pal or .frame

BitmapSlice -- resizeable and paintable full-color Frame. There would be 
commands to draw pixels or lines onto these, or to blit one onto 
another. There would be a command to convert SpriteSlice or Backdrop 
Slice into one of these.

Scripting using these might look something like this:

variable(ship, gun)

# load the space ship body
ship := bitmap(load medium enemy sprite(5))
gun := load medium enemy sprite(14)
blit (ship, gun)
flip sprite horiz(gun)
blit (ship, gun)
free slice (gun)

I dunno... I haven't really thought out blit()...

---
James
_______________________________________________
Ohrrpgce mailing list
[email protected]
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org

Reply via email to