Changes

Speccy Port

31 bytes added, 13:03, 1 October 2012
/* Graphics with transparency */
However, if we sacrifice 1 colour, so we have 1 pen which is fully transparent and 3 for opaque sprite colours then we don't need the mask to be stored this way. The mask is common for all sprites and we could store this as a single 256 byte array. We would still need 4 bytes for the pixel data but the result now is: 4*8 = 32 bytes. The same weight as the Spectrum.
Mode 2 is generally not used for games on the Amstradbecause of it's lack of colour. The pixels in this mode are half as wide as the Spectrum's. If the Spectrum data was used directly, which it could be, then the sprites would be half the width of the Spectrum's. We would still be forced to store mask and pixels the same as on the Spectrum, and to maintain the same resolution we would need to double up each pixel, effectively magnifying it in the width by 2. The result would be twice the size of the Spectrum data.
If mode 0 is used, we could either store a mask and byte, as for the Spectrum, or more commonly we use pen 0 for full transparent and leave the other 15 pens to define the sprite. We could then use half the number of pixels horizontally and lower resolution too. Each byte now contains 2 pixels. The sprite is 8x16 now = (8/2)*16 = 64 bytes. So again twice the size.
2,541
edits