Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mirror a sprite
#7
Another way of doing it is to have (maybe compressed?) sprite data in storage, and unpack the sprites you need for this particular screen or part of the game to a buffer or workspace. You could then write out the reverse versions of these from one part of the workspace to another using the mirroring function.

Note that the fastest way to mirror a byte is a lookup table - so the first entry in the table is the mirror of "1" (128) and the second entry is the mirror of "2" (64), the third entry is the mirror of "3" (192) and so on.

The mirror code is pretty small and tight, though - and especially if you are using this to buffer out sprites in a screen by screen scenario, probably not too bad.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)