-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 ||0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
SoCoder -> Snippet Home -> Graphical Effects

Evil Roy Ferguson
Created : 07 June 2009
Edited : 27 July 2009
System : Windows
Language : Blitz

Spectrum-Style Graphics

Does what it says on the tin.

This isn't exactly what I'd call optimized, but it more or less works for putting basic Spectrum-like graphics in your games.

You can download this file, plus a small example program and the font file you'll need to get it working here.

Include this file:


Loading an image becomes:



Your main loop will look something like this:



The difference between the 2/regular versions is that the "2" versions are marginally faster but also are constrained to drawing 8x8 pixel images to coordinates that are multiples of 8 pixels.

Comments


Sunday, 26 July 2009, 13:43
JL235
I tried this, but was unable to get it to work. I just get a black screen. Perhaps you could upload a folder with a BB project all written and ready to run.
Sunday, 26 July 2009, 14:44
Evil Roy Ferguson
I'll write up a more complete example soon. In retrospect, not including a complete working example is something of a glaring omission.

Does Zieks also show a blank screen? If so, then the effect itself is broken on your hardware and I will need to fix it. (This is something of a concern, since the buffer stuff it's doing IS kind of weird.)
Sunday, 26 July 2009, 14:51
JL235
Yes, Zieks worked fine.
Monday, 27 July 2009, 01:22
Evil Roy Ferguson
Here's a quick example.
Monday, 27 July 2009, 16:46
steve_ancell
'Spec'tacular