Old school (Spectrum Style UDGs)

BlitzPlus Forums/BlitzPlus Programming/Old school (Spectrum Style UDGs)

BrianT(Posted 2006) [#1]
Hi All
I've been converting some old ZX Spectrum type-ins into Blitz+, and have made my own routine for taking the original DATA statements for user defined graphics (UDG's) and making a 16x16 (24x24 or any multiplier of 8 based) sprite.
I create a new imagebuffer, read the data statement, convert the number into binary and then fill in a 2x2 (3x3 etc) square in that frame if its a "1" and make it blank /transparent colour for "0".
The problem is, assume my background colour is black (for "0" and foreground (for "1" is white) - can I replicate the old Spectrum "INK" command without having to make a copy of the image in each available colour?
I'm thinking copypixel type commands, but if the colour changes often for one UDG then I don't want to slow the program right down to draw it in one colour, replace white with blue and so on.
Can anyone help? When I'm back at my home PC, will upload the function if anyone's interested.


H&K(Posted 2006) [#2]
Well.... As there are only 16 Colours (8 normal and 8 Bright), you could store them all. However if you are going to do a spectrum like screen are you going to attrib clash? If so you could just remember which paper and Ink each char square is going to have, then pass what ever is in that square to a layer that then plots to the screen with the right colours.

Any advice you get really rally does depend on if you are going to fake the problems as well.

I don't want to slow the program right down to draw it in one colour, replace white with blue and so on

To be honest, thats what I would do
Either that, or make a single bit "Fake" screen, then plot that to the real screen with the right colours for each chr square