|
BB2 C port
API reference: Blitz libraries in C and the shared code
|
Data Structures | |
| struct | qitem |
| struct | queue |
| struct | blitstate |
Macros | |
| #define | __NOLIBBASE__ |
| #define | GRAPHICS_BASE_NAME gfx |
| #define | QBLIT_LIBS |
| #define | QBLIT_REGS |
Functions | |
| void | doqueue (void) |
| void | qblitlib_doblit (void) |
| void | qblitlib_doblitex (void) |
| void | dounqueue (void) |
| void | dounqueue2 (void) |
| void | doqblitmode (void) |
| void | doflushqueue (void) |
| FlushQueue Queue# - empty the queue without touching the bitmaps. | |
| void | qblitlib_codeinit (void) |
| void | freequeue (void) |
| void | qblitchk (void) |
| void | unqueuechk (void) |
| void | unqueuechk2 (void) |
| static void | doqblitmode_c (UWORD m) |
| QBlitMode BLTCON0 - set the BLTCON0 value of the following QBlits. | |
| BLITZ_ALIAS (doqblitmode, doqblitmode_c) | |
| static ULONG | codeinit_c (ULONG hiword) |
| Library init: BLTCON0 back to $FCA. | |
| static void | freeq (struct queue *q) |
| static void | freequeue_c (void) |
| Object free routine (_free) of a Queue: free its memory. | |
| static void | doqueue_c (UWORD items) |
| Queue Queue#,Max Items - set up a queue for that many QBlits. | |
| BLITZ_ALIAS (doqueue, doqueue_c) | |
| BL_ALWAYS_INLINE void | qblit (struct queue *q, const struct bb_shape *shape, const struct bb_bitmap *bm, UBYTE *cb, WORD x, WORD y, struct blitstate *st) |
| BL_ALWAYS_INLINE void | qblitex (struct queue *q, const struct bb_shape *shape, const struct bb_bitmap *bm, UBYTE *cb, WORD x, WORD y, UWORD bits) |
| BL_ALWAYS_INLINE void | unqueue (struct queue *q, UBYTE *cb) |
| BL_ALWAYS_INLINE void | unqueue2 (struct queue *q, UBYTE *cb, const struct bb_bitmap *src) |
| static BLITZ_ENTRYPOINT void | b_doblit_c (WORD x, WORD y, struct queue *q, UBYTE *cb, const struct bb_bitmap *bm) |
| QBlit Queue#,Shape#,X,Y - blit a shape and remember the area (Blitz mode). | |
| BLITZ_EP_MARK (b_doblit_c) | |
| static void | a_doblit_c (WORD x, WORD y, struct queue *q, UBYTE *cb, const struct bb_bitmap *bm, struct Library *gfx) |
| QBlit Queue#,Shape#,X,Y in Amiga mode: b_doblit_c between OwnBlitter and DisownBlitter, waiting for the blitter at the end. | |
| static BLITZ_ENTRYPOINT void | b_doblitex_c (WORD x, WORD y, struct queue *q, UBYTE *cb, const struct bb_bitmap *bm, UWORD bits) |
| QBlit Queue#,Shape#,X,Y,Excessonoff - QBlit and fill the bitmap's planes beyond the shape's depth (Blitz mode). | |
| BLITZ_EP_MARK (b_doblitex_c) | |
| static void | a_doblitex_c (WORD x, WORD y, struct queue *q, UBYTE *cb, const struct bb_bitmap *bm, UWORD bits, struct Library *gfx) |
| QBlit Queue#,Shape#,X,Y,Excessonoff in Amiga mode: b_doblitex_c between OwnBlitter and DisownBlitter, waiting for the blitter at the end. | |
| static BLITZ_ENTRYPOINT void | b_dounqueue_c (UBYTE *cb) |
| UnQueue Queue# - clear all queued areas and empty the queue (Blitz mode). | |
| BLITZ_EP_MARK (b_dounqueue_c) | |
| void | a_dounqueue_c (UBYTE *cb, struct Library *gfx) |
| UnQueue Queue# in Amiga mode: b_dounqueue_c between OwnBlitter and DisownBlitter, waiting for the blitter at the end. | |
| static BLITZ_ENTRYPOINT void | b_dounqueue2_c (UBYTE *cb, const struct bb_bitmap *bm) |
| UnQueue Queue#,BitMap# - restore all queued areas from a bitmap and empty the queue (Blitz mode). | |
| BLITZ_EP_MARK (b_dounqueue2_c) | |
| void | a_dounqueue2_c (UBYTE *cb, const struct bb_bitmap *bm, struct Library *gfx) |
| UnQueue Queue#,BitMap# in Amiga mode: b_dounqueue2_c between OwnBlitter and DisownBlitter, waiting for the blitter at the end. | |
| static int | maxchk (const struct bb_shape *shape, const struct bb_bitmap *bm) |
| static int | poschk (const struct bb_shape *shape, const struct bb_bitmap *bm, WORD x, WORD y) |
| static void | qblitchk_c (WORD x, WORD y, const struct queue *q, const struct bb_bitmap *bm) |
| static void | unqueuechk_c (void) |
| static void | unqueuechk2_c (const struct bb_bitmap *bm) |
Variables | |
| QBLIT_LIBS | |
| static UWORD | bcon0 = 0xfca |
| #define __NOLIBBASE__ |
| #define GRAPHICS_BASE_NAME gfx |
| #define QBLIT_LIBS |
| #define QBLIT_REGS |
|
static |
QBlit Queue#,Shape#,X,Y in Amiga mode: b_doblit_c between OwnBlitter and DisownBlitter, waiting for the blitter at the end.
| gfx | a6: graphics.library |
|
static |
QBlit Queue#,Shape#,X,Y,Excessonoff in Amiga mode: b_doblitex_c between OwnBlitter and DisownBlitter, waiting for the blitter at the end.
| bits | d4.w: one bit per excess plane |
| gfx | a6: graphics.library |
| void a_dounqueue2_c | ( | UBYTE * | cb, |
| const struct bb_bitmap * | bm, | ||
| struct Library * | gfx ) |
UnQueue Queue#,BitMap# in Amiga mode: b_dounqueue2_c between OwnBlitter and DisownBlitter, waiting for the blitter at the end.
| cb | a1: the chip base ($DFF000) |
| bm | a2: the bitmap to copy from |
| gfx | a6: graphics.library |
| void a_dounqueue_c | ( | UBYTE * | cb, |
| struct Library * | gfx ) |
UnQueue Queue# in Amiga mode: b_dounqueue_c between OwnBlitter and DisownBlitter, waiting for the blitter at the end.
| cb | a1: the chip base ($DFF000) |
| gfx | a6: graphics.library |
|
static |
QBlit Queue#,Shape#,X,Y - blit a shape and remember the area (Blitz mode).
The shape (a3) is blitted through its cookie into all its planes of the used bitmap at x/y minus the shape's handle (BLTCON0 = shift | the QBlitMode value); an item {modulo, bltsize, bitmap depth - 1, bitmap, offset} is appended to the queue for UnQueue. Blitz mode version: the blitter is used directly, no OwnBlitter.
Errors (qblitchk, debugger only): "Uninitialized Queue", the blitlib checks (cookie, bitmap, shape, depth, coordinates) and "Queue Overflow". By design (#423): only the runtime error checking tests for an overflow. Fixed (#243): a shape of depth 0 loops 65536 times (DBF), refused at its creation in the error check area.
|
static |
QBlit Queue#,Shape#,X,Y,Excessonoff - QBlit and fill the bitmap's planes beyond the shape's depth (Blitz mode).
As b_doblit_c, then for every plane from the shape's depth up to the bitmap's depth one bit of bits (bit 0 first): set = the cookie area is set (minterm $BFA), clear = it is cleared ($B0A). The queue item is the one of b_doblit_c (UnQueue clears all planes of the bitmap anyway).
Errors: as b_doblit_c (qblitchk).
| bits | d4.w: one bit per excess plane |
|
static |
UnQueue Queue#,BitMap# - restore all queued areas from a bitmap and empty the queue (Blitz mode).
As b_dounqueue_c, but every area is copied from the same place of bm (A -> D, minterm $9F0), plane by plane, instead of cleared.
Errors (unqueuechk2, debugger only): "Uninitialized Queue", "Uninitialized BitMap".
| cb | a1: the chip base ($DFF000) |
| bm | a2: the bitmap to copy from |
|
static |
UnQueue Queue# - clear all queued areas and empty the queue (Blitz mode).
a3 = the queue object. Every item's area is cleared in all planes of its bitmap (D only, minterm 0), not only in those of the shape: QBlit with Excessonoff changes them too, and UnQueue is meant to clear the area to colour 0 (not a bug). The write position goes back to the start.
Errors: "Uninitialized Queue" (unqueuechk, debugger only).
| cb | a1: the chip base ($DFF000) |
| BLITZ_ALIAS | ( | doqblitmode | , |
| doqblitmode_c | ) |
| BLITZ_EP_MARK | ( | b_doblit_c | ) |
| BLITZ_EP_MARK | ( | b_doblitex_c | ) |
| BLITZ_EP_MARK | ( | b_dounqueue2_c | ) |
| BLITZ_EP_MARK | ( | b_dounqueue_c | ) |
|
static |
Library init: BLTCON0 back to $FCA.
The original is MOVE #$fca,d0 falling into doqblitmode, so d0.w is $FCA afterwards (its upper word stays).
| hiword | d0: the caller's d0 (only its upper word is kept) |
hiword, $FCA in the low word | void doflushqueue | ( | void | ) |
FlushQueue Queue# - empty the queue without touching the bitmaps.
Inline code MOVE.l 4(a3),(a3): the write position goes back to the start of the queue memory. a3 = the queue object.
Errors: "Uninitialized Queue" (unqueuechk, debugger only).
| void doqblitmode | ( | void | ) |
|
static |
QBlitMode BLTCON0 - set the BLTCON0 value of the following QBlits.
Only the minterm and channel bits are used: QBlit ORs the shift of the x position into it. The default (init) is $FCA (A, B, C, D: cookie cut).
| m | d0.w: BLTCON0 without the shift |
| void doqueue | ( | void | ) |
|
static |
Queue Queue#,Max Items - set up a queue for that many QBlits.
a3 = the queue object. The old memory is freed first (freequeue), then items * 14 bytes are allocated (memlib globalloc, MEMF_PUBLIC); the write position is set to their start. The allocation is not checked.
| items | d1.w: the maximum number of items |
| void dounqueue | ( | void | ) |
| void dounqueue2 | ( | void | ) |
|
static |
| void freequeue | ( | void | ) |
|
static |
Object free routine (_free) of a Queue: free its memory.
a3 = the queue object; memlib globfree of the items, the memory pointer is cleared. BUG(orig) (#244): the write position stays stale.
| BL_ALWAYS_INLINE void qblit | ( | struct queue * | q, |
| const struct bb_shape * | shape, | ||
| const struct bb_bitmap * | bm, | ||
| UBYTE * | cb, | ||
| WORD | x, | ||
| WORD | y, | ||
| struct blitstate * | st ) |
| void qblitchk | ( | void | ) |
| BL_ALWAYS_INLINE void qblitex | ( | struct queue * | q, |
| const struct bb_shape * | shape, | ||
| const struct bb_bitmap * | bm, | ||
| UBYTE * | cb, | ||
| WORD | x, | ||
| WORD | y, | ||
| UWORD | bits ) |
| void qblitlib_codeinit | ( | void | ) |
| void qblitlib_doblit | ( | void | ) |
| void qblitlib_doblitex | ( | void | ) |
| BL_ALWAYS_INLINE void unqueue | ( | struct queue * | q, |
| UBYTE * | cb ) |
| BL_ALWAYS_INLINE void unqueue2 | ( | struct queue * | q, |
| UBYTE * | cb, | ||
| const struct bb_bitmap * | src ) |
| void unqueuechk | ( | void | ) |
| void unqueuechk2 | ( | void | ) |
|
static |
|
static |
|
static |
| QBLIT_LIBS |