| M E M _ R E M A P B I T M A P ( )
| | | | | SOURCE: qdev_autodocs.txt 1.163 (12/09/2014) English
AMIGA - MEM_#?
----------------------------------------------------------------------------
NAME
mem_remapbitmap() - Remaps the BitMap to fit new
ColorMap.
SYNOPSIS
newbm = mem_remapbitmap(bm, rgb32, cm, tab, type);
struct BitMap *mem_remapbitmap(struct BitMap *,
ULONG *, struct ColorMap *, WORD *, ULONG);
FUNCTION
This function allows to remap the bitmap, so it can
be displayed using 'cm'.
INPUTS
bm - BitMap to be remapped.
rgb32 - Palette of that BitMap. An array where the
very first entry is record header of ULONG
and each component(R, G, B) is ULONG wide.
cm - ColorMap pointer.
tab - Pen table, the cache.
type - Type of memory(standard 'AllocMem()' flags)
with one small exception. Passing MEMF_CHIP
means use 'AllocBitMap()'!
RETURNS
Ret. ptr to new bitmap or NULL if there were probs.
BASES
SysBase, GfxBase
NOTES
Please note! Pen table('tab') must be of at least
QDEV_MEM_RBP_PTABSIZE counting in WORDs! Also, it
must be initialised to -1 for each entry on first
use.
This pen table can be used multiple times, so that
remapping other bitmaps with same palette will be
a lot faster.
If you dont display any of the remapped bitmaps do
'mem_freepentab()' or 'mem_freepenholder()' if pen
accumulation was requested!
Important! This func. works on standard 8 bit Amiga
bitmaps only! Interleaved bmaps are not supported!
Pseudo transparency can be achieved by predefining
entry in the table. This is typically entry indexed
with 0 that maps to 0(tab[0] = 0;), but you can do
that for other colors too. Remeber though that such
a table is considered hacked, so you better restore
what you altered to -1 before passing it to the
'mem_freepentab()' function!
BitMap created with this function can be passed to
'FreeBitMap()'.
This func. uses code from 'supp/sup_c2p2c' written
by Morten Eriksen.
SEE ALSO
mem_growpenholder(), mem_freepenholder(),
mem_freepentab(), mem_loadpicture(),
mem_freepicture()
EXAMPLE
See 'a-mem_xxxpicture()' for more details.
BUGS
None known.
----------------------------------------------------------------------------
| |
| |