Transparency Tables | |
Variables | |
cpct_transparentMaskTable00M0 | Look-up table for drawing a normal sprite using colour 0 as trasnparent. |
Macros | |
cpct_transparentMaskTable00M0_address | Macro used to set the location where cpct_transparentMaskTable00M0 must be included in memory. |
Look-up table for drawing a normal sprite using colour 0 as trasnparent.
To use it in a C program, you have to define the constant cpct_transparentMaskTable00M0_address, selecting the location in memory where you want it to be, and include <sprites/transparency_tables.h>
// Include transparency table for mode 0 at 0x2100 (0x2100 - 0x21FF) #define cpct_transparentMaskTable00M0_address 0x2100 #include <sprites/transparency_tables.h>
With this definition, you are including cpct_transparentMaskTable00M0 in your binary at address 0x2100 (256-bytes aligned, from 0x2100 to 0x21FF, never changing the Most significant byte). You are always required to provide a concrete address for this table at definition time.
256 (0x100) bytes
Look-up table (array) containing all the masks for the 256 possible combinations of byte pixel data values, assuming firmware colour 0 as being transparent. It is used by sprite-drawing functions to draw the sprites using colour 0 as transparent.
This table should be placed at a specific location in memory. It is recommended to place it at a 256-byte aligned memory location (a memory location whose Least signficant byte is 0, so the address has the form 0x??00). In fact, some functions like cpct_drawSpriteMaskedAlignedTable require it to be 256-byte aligned or they will fail.
To be able to use this table, all you have to do is defining the macro (constant value) cpct_transparentMaskTable00M0_address before the inclusion of <sprites/transparency_tables.h>, CPCtelera’s header file.
Once the table has been defined, you can access it through the symbol cpct_transparentMaskTable00M0.
Macro used to set the location where cpct_transparentMaskTable00M0 must be included in memory. When this macro is defined, cpct_transparentMaskTable00M0 is included.