|
DrawPaletteMappedStrip16 | |
DrawPaletteMappedStrip16 Xpos, Ypos, Address, Length, Mask | |
Parameters: Xpos = The output X coordinate of this strip of pixels Ypos = The output Y coordinate of this strip of pixels Address = The Address of the series of bytes to get the colour indexes from Length = Number of pixels / byte in this strip Mask = Mask to apply to the colour index before reading the palette. |
|
Returns: NONE | |
DrawPaletteMappedStrip16 reads a sequential runs of 16bit word values from memory and renders them out to the current surface using a user defined colour palette. So it treats each 16bit byte as the index to the palette array, where the palette contains up to an array of 32bit (ARGB) colours. 16Bit Palettes can contain up to 2^16=65536 unique colours. Using this command we can simulate classic effects like raster bars, mirrors, shadows and glez vectors to name a few. FACTS: * Palette Mapping is used in a classic computer/game console display systems since it's very efficient way of storing images. * Using the CreateFxImageEx command it's possible use 16bit FX images to create your palette mapped screen and sprites with. Example: This example is using the DrawPaletteMappedStrip16 to render a 4096 colour palette. The screen colour indexes are set up so that each pixel on screen is the distance from the screen center. The palette created each frame from 16 banks of 256 colours. Each block of 256 colours is shaded via sinus and offset in the palette table, creating the illusion of pixel motion when only the colours are changing. |
|
Example Source: Download This Example
|
Related Info: | ARGB | DrawPaletteMappedStrip8 | IndexToRGB | RGBtoINDEX | SetPalette : |
|
|||||||||||||||||||||||||||||||||||||||
(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com |