|
| void | ilbminit (void) |
| void | ilbmgetbyte (void) |
| void | ilbmbitmap (void) |
| void | doilbminfo (void) |
| void | doilbmwidth (void) |
| void | doilbmheight (void) |
| void | doilbmdepth (void) |
| void | doilbmviewmode (void) |
| void | _decodeilbm (void) |
| static BB_BOOL | ilbminit_ (const char *name) |
| static BB_BOOL | ilbminit_c (const char *name) |
| | ilbminit (+1): open an ILBM file and read its BMHD into iffstuff.
|
| static ULONG | getme (ULONG byte, struct iffstuff *st) |
| static ULONG | getbyte (ULONG byte, struct iffstuff *st) |
| static ULONG | ilbmgetbyte_c (ULONG byte, struct iffstuff *st) |
| | ilbmgetbyte (+2): the next byte of the BODY, ByteRun1 decoded (for lib 154).
|
| static void | ilbmbitmap_c (ULONG value, const char *name, struct BitMap *bm) |
| | ilbmbitmap (+3): load an ILBM file into a BitMap (for libs 158, 160).
|
| static BB_BOOL | doilbminfo_c (const char *name) |
| | ILBMInfo Filename$: read the size, depth and view mode of an ILBM file (for ILBMWidth, ILBMHeight, ILBMDepth, ILBMViewMode); also a function.
|
| | BLITZ_ALIAS (doilbminfo, doilbminfo_c) |
| static UWORD | ilbmwidth_c (void) |
| | ILBMWidth: the width in pixels of the last ILBMInfo (ilbminit).
|
| static UWORD | ilbmheight_c (void) |
| | ILBMHeight: the height of the last ILBMInfo (ilbminit).
|
| static UWORD | ilbmdepth_c (void) |
| | ILBMDepth: the number of planes of the last ILBMInfo (ilbminit).
|
| | BLITZ_ALIAS (doilbmwidth, ilbmwidth_c) |
| | BLITZ_ALIAS (doilbmheight, ilbmheight_c) |
| | BLITZ_ALIAS (doilbmdepth, ilbmdepth_c) |
| static ULONG | ilbmviewmode_c (void) |
| | ILBMViewMode: the view mode of the last ILBMInfo (ilbminit): $8000 HIRES, 4 LACE.
|
| | BLITZ_ALIAS (doilbmviewmode, ilbmviewmode_c) |
| static ULONG | padded (const UBYTE *data, ULONG len) |
| static const UBYTE * | unpackrow (const UBYTE *src, UBYTE *dst, LONG left, UWORD keep) |
| static const UBYTE * | copyrow (const UBYTE *src, UBYTE *dst, UWORD len, UWORD keep) |
| static void | decodeilbm_c (const ULONG *mem) |
| | DecodeILBM Bitmap#,MemoryLocation: decode an ILBM file in memory into a bitmap.
|
| | BLITZ_ALIAS (_decodeilbm, decodeilbm_c) |
| void decodeilbm_c |
( |
const ULONG * | mem | ) |
|
|
static |
DecodeILBM Bitmap#,MemoryLocation: decode an ILBM file in memory into a bitmap.
Finds BMHD and BODY in the FORM ILBM; ByteRun1 or uncompressed rows (copied as words). The bitmap object comes in a3 (!libs {bitmaplib,$1380}). Errors: "Can't Find IFF 'BMHD'" (no FORM/ILBM/BMHD), "Can't Find IFF
'BODY'" (the messages in the normal code, fixed: #192). Fixed (#189): the pad byte of an odd chunk is skipped (unless it is not 0: a writer without pad bytes, the original SaveBitmap). Fixed (#190, #191): only the planes, rows and bytes per row that both the ILBM and the bitmap have are stored, a run is cut at the row end; the rest is decoded and dropped (the original wrote all planes, rows and bytes of the ILBM, and a run over the row end into the next row).
- Parameters
-
| mem | d1: the address of the FORM ILBM |
| BB_BOOL doilbminfo_c |
( |
const char * | name | ) |
|
|
static |
ILBMInfo Filename$: read the size, depth and view mode of an ILBM file (for ILBMWidth, ILBMHeight, ILBMDepth, ILBMViewMode); also a function.
View mode: pageWidth >= 480 gives $8000 (HIRES), pageHeight >= 300 |4 (LACE). Fixed (#186): iffclose closes only an open file (the original: dos Close of 0 for a file that could not be opened).
- Parameters
-
- Returns
- d0: BB_TRUE ok, BB_FALSE no file / no BMHD
| void ilbmbitmap_c |
( |
ULONG | value, |
|
|
const char * | name, |
|
|
struct BitMap * | bm ) |
|
static |
ilbmbitmap (+3): load an ILBM file into a BitMap (for libs 158, 160).
Reads row after row, plane after plane, width-in-words*2 bytes each, and stores what fits into BytesPerRow/Depth/Rows; closes the file. Errors: "Can't Open File", "Can't Find IFF 'BMHD'" (fixed, #187: the original ignored a failed ilbminit and searched "BODY" in what was left in iffiolib's buffer), "Can't Find IFF 'BODY'" (the messages in the normal code, fixed: #192; the file closed first, fixed: #1053, the original left it open); "Can't Read File" from the byte reader (the file closed first, fixed: #1065). Fixed (#188): the depth test is on the byte Depth (the original: the word over Flags and Depth).
- Parameters
-
| value | d0: the start value of the byte reader |
| name | a0: the file name |
| bm | a1: the BitMap; a0 = iffstuff afterwards |