Sprite Printing
Martin Avison (27) 1494 posts |
I have a very simple 8×14 sprite which is currently defined with 16 colours, no palette, a mask, in Mode 27, which displays nicely on the screen with other outline font text and lines. However, when a display which contains the sprite is printed (using PDriver), it raises error &1E71C: ‘This sprite operation requires a full palette (print cancelled)’ at the SpriteOp &234 (Plot Sprite Scaled) of the sprite. Without the SpriteOp all the rest prints as expected. I am expecting to have to modify the sprite and/or add some code, but the only clue I can find in the PRM is that it says ‘You should set colours for the sprite using a translation table, set up by using ColourTrans’. So I tried to use ColourTrans_GenerateTable, but still got the same message. Any suggestions please? |
Martin Avison (27) 1494 posts |
Hmmm. This may be more a function of the printer driver, as using the original code it fails using PS3 to PDF, but works with my real printer (using Gutenprint) and with SPrinter. But I can see nothing relevant in the PS3 documentation. :-(( |
nemo (145) 2546 posts |
Which SpriteOp are you using, 28? If so, that only works if the output MODE happens to be the same as the sprite MODE. When you’re outputting to PostScript there’s no such thing as an output MODE (and in general you’ve no idea what MODE a Printer Driver is pretending to be). You haven’t said whether your program is operating in the Wimp (in which case the palette is the default Wimp colours) or outside it (in which case you either have the default TTL colours or your own palette). If you’re in the Wimp, use Wimp_ReadPixTrans to give you a translation table to pass to SpriteOp &34 However, if you give SelectTable your sprite, then it’s going to be no wiser about your palette – the best ColourTrans can do is assume the default TTL colours for the MODE. You can either create a palette block or a tiny sprite with a palette, pass that to SelectTable, then use the resulting translation table for all your other unpaletted sprites of the same format. |
Martin Avison (27) 1494 posts |
I am using SpriteOp &234 (Plot Sprite Scaled with sprite area & pointer), not 28 (&1C). It is a Wimp program, and I am using Wimp_ReadPixTrans beforehand to get the scale factors and translation table for SpriteOp. But it certainly seems it is only the PS3 driver that causes problems. |