BB2 C port
API reference: Blitz libraries in C and the shared code
Loading...
Searching...
No Matches
bb_blitlib.c File Reference
#include "blitzlib.h"
#include "blitzobj.h"

Macros

#define BUFLIBS
#define CUSTOM   ((UBYTE *)0xdff000)
#define CW(o)
#define CL(o)
#define HIDE_A(p)
#define PLANELOOP_START
#define PLANELOOP_END   " dbf %[n],0b"
#define MYBLITSIZE   (1 + (16 << 6)) /* 16 lines of one word */
#define MYBLITSIZESCROLL   (2 + (16 << 6)) /* 16 lines of two words */
#define DEPTH   6 /* TBlockImage */
#define IMAGEPLANESIZE   32
#define IMAGESIZE   (IMAGEPLANESIZE * (DEPTH + 1))
#define SHAPE_DEPTH   6 /* BTBlockImage */
#define SHAPE_EBWIDTH   2
#define SHAPE_BLITSIZE   ((16 * 64) + SHAPE_EBWIDTH)
#define SHAPE_PLANEBYTESIZE   (SHAPE_EBWIDTH * 16)
#define SHAPE_ONEBPMEMX   ((SHAPE_EBWIDTH + 2) * 16)
#define SHAPE_BYTESIZE   (SHAPE_PLANEBYTESIZE * (SHAPE_DEPTH + 1))
#define PUT(v)
#define BSAVE(ebw, size, save)
#define BWAIT
#define BMODS
#define PUT(type, v)

Enumerations

enum  {
  BLTCON0 = 0x40 , BLTCON1 = 0x42 , BLTAFWM = 0x44 , BLTALWM = 0x46 ,
  BLTCPT = 0x48 , BLTBPT = 0x4c , BLTAPT = 0x50 , BLTDPT = 0x54 ,
  BLTSIZE = 0x58 , BLTCMOD = 0x60 , BLTBMOD = 0x62 , BLTAMOD = 0x64 ,
  BLTDMOD = 0x66
}

Functions

void _specialblock (void)
void _specialblock2 (void)
void _specialblockbitmap (void)
void _specialblockbitmap2 (void)
void _tblock (void)
void _predatorblit (void)
void _bpredatorblit (void)
 BPredatorBlit buffer,shape,x,y: PredatorBlit, buffered.
void _MapInfo (void)
void _createshape (void)
void _specialblocktoshape (void)
void _blocktoshape (void)
void docolblit (void)
 BColourBlit buffer,shape,x,y,colour: a shape's cookie in one colour, buffered.
void _tblockimage (void)
void _btblockimage (void)
 BTBlockImage buffer,image_addr,x,y,image: TBlockImage, buffered and shifted.
void _errSBlockToShape (void)
void _errBlockToShape (void)
void _errCreateShape (void)
void _errShapeA1 (void)
void _errShapeA3 (void)
static void _libinit (void)
 init: does nothing (RTS).
static void _libfinit (void)
 finit: does nothing (RTS).
static BLITZ_ENTRYPOINT void mapinfo_c (UWORD w)
 SetupMapTwo ebwidth: the bytes per line of the bitmaps.
BL_ALWAYS_INLINE UWORD xyoff (UWORD x, UWORD y, UWORD width)
BL_ALWAYS_INLINE void specialblock (UWORD off, struct bb_bitmap *bm, struct bb_shape *top, struct bb_shape *bot)
 SpecialBlock topshape,bottomshape,offset: a 16x16 block of two shapes into the used bitmap.
static BLITZ_ENTRYPOINT void specialblock_c (UWORD x, UWORD y, struct bb_bitmap *bm, struct bb_shape *top, struct bb_shape *bot)
 SpecialBlock topshape,bottomshape,x,y: as the offset form, at y * SetupMapTwo's width + x/8.
static BLITZ_ENTRYPOINT void specialblock2_c (UWORD off, struct bb_bitmap *bm, struct bb_shape *top, struct bb_shape *bot)
 SpecialBlock topshape,bottomshape,offset: the entry of the offset form (specialblock() above; d2 the offset, a0-a2 as there).
BL_ALWAYS_INLINE void specialblockbitmap (UWORD off, struct bb_bitmap *bm, struct bb_shape *shape, struct bb_bitmap *src)
 SpecialBlockBitmap topshape,bitmap,offset: a shape over another bitmap into the used bitmap.
static BLITZ_ENTRYPOINT void specialblockbitmap_c (UWORD x, UWORD y, struct bb_bitmap *bm, struct bb_shape *shape, struct bb_bitmap *src)
 SpecialBlockBitmap topshape,bitmap,x,y: as the offset form, at y * the used bitmap's width + x/8.
static BLITZ_ENTRYPOINT void specialblockbitmap2_c (UWORD off, struct bb_bitmap *bm, struct bb_shape *shape, struct bb_bitmap *src)
 SpecialBlockBitmap topshape,bitmap,offset: the entry of the offset form (specialblockbitmap() above; d2 the offset, a0-a2 as there).
static BLITZ_ENTRYPOINT void tblock_c (UWORD x, UWORD y, struct bb_bitmap *bm, struct bb_shape *shape)
 TBlock shape,x,y: a 16x16 shape through its cookie onto the used bitmap.
static BLITZ_ENTRYPOINT ULONG predatorblit_c (UWORD x, UWORD y, struct bb_bitmap *bm, struct bb_shape *shape)
 PredatorBlit(shape,x,y): the "predator" effect inside a shape's cookie.
static BLITZ_ENTRYPOINT void tblockimage_c (ULONG addr, UWORD image, UWORD x, UWORD y, struct bb_bitmap *bm)
 TBlockImage image_addr,image,x,y: a 16x16 image of 6 planes through its mask.
static BLITZ_ENTRYPOINT void createshape_c (UWORD count, ULONG mem, struct bb_shape *shape, struct bb_shape *like)
 CreateShape start_shape,count,chipmemblock,like_shape: shape objects whose data lie in a given block.
static BLITZ_ENTRYPOINT void specialblocktoshape_c (struct bb_shape *dest, struct bb_shape *top, struct bb_shape *bot)
 SpecialBlockToShape topshape,bottomshape,destshape: SpecialBlock into a shape.
static BLITZ_ENTRYPOINT void blocktoshape_c (struct bb_shape *shape, struct bb_shape *dest)
 BlockToShape shape,destshape: copies a shape's data into another.
 BLITZ_ALIAS_EP (_specialblock, specialblock_c)
 BLITZ_ALIAS_EP (_specialblock2, specialblock2_c)
 BLITZ_ALIAS_EP (_specialblockbitmap, specialblockbitmap_c)
 BLITZ_ALIAS_EP (_specialblockbitmap2, specialblockbitmap2_c)
 BLITZ_ALIAS_EP (_tblock, tblock_c)
 BLITZ_ALIAS_EP (_predatorblit, predatorblit_c)
 BLITZ_ALIAS_EP (_MapInfo, mapinfo_c)
 BLITZ_ALIAS_EP (_createshape, createshape_c)
 BLITZ_ALIAS_EP (_specialblocktoshape, specialblocktoshape_c)
 BLITZ_ALIAS_EP (_blocktoshape, blocktoshape_c)
 BLITZ_ALIAS_EP (_tblockimage, tblockimage_c)
static void errblocktoshape_c (struct bb_shape *shape, struct bb_shape *dest)
 BlockToShape's error check: dest has data, both shapes the same size (size, +26), and the shape fits one blit.
static void errsblocktoshape_c (struct bb_shape *dest, struct bb_shape *top)
 SpecialBlockToShape's error check: the same for dest and the top shape, then the top shape's depth.
static void errshapea1_c (struct bb_shape *shape)
 The error check of SpecialBlock, SpecialBlockBitmap, TBlock and PredatorBlit (not in the original): the shape in a1 has planes.
static void errshapea3_c (struct bb_shape *shape)
 The error check of BPredatorBlit and BColourBlit (not in the original): the shape in a3 has planes.
static void errcreateshape_c (UWORD count, UWORD max, struct bb_shape *table, struct bb_shape *shape)
 CreateShape's error check (not in the original): a count of at least 1 that stays inside the shape table.

Variables

struct { 
   UWORD   ebwidth 
   UWORD   modwidth 
   UWORD   modwidth2 
} map = { 40, 38, 36 }
static UWORD coltoblit

Macro Definition Documentation

◆ BMODS

#define BMODS
Value:
" swap d5\n" \
" move.l d5,0x60(a1)\n" /* BLTCMOD, BLTBMOD */ \
" swap d5\n" \
" move.l d5,0x64(a1)\n" /* BLTAMOD, BLTDMOD */

◆ BSAVE

#define BSAVE ( ebw,
size,
save )

◆ BUFLIBS

#define BUFLIBS
Value:
LIB_bblitlib, BL_IA0|BL_PD0, LIB_bitmaplib, BL_UA2, LIB_chipbaselib, BL_LA1, \
LIB_graphicslib, BL_IFAMIGA|BL_LA6
#define BL_IA0
Definition blitzlib.h:239
#define BL_LA1
Definition blitzlib.h:198
#define BL_PD0
Definition blitzlib.h:231
#define BL_LA6
Definition blitzlib.h:201
#define BL_UA2
Definition blitzlib.h:213
#define BL_IFAMIGA
Definition blitzlib.h:187

◆ BWAIT

#define BWAIT
Value:
" tst.b 2(a1)\n" \
"0: btst #6,2(a1)\n" \
" bne.s 0b\n"

◆ CL

#define CL ( o)
Value:
BL_CUSTOML(cb, o)
#define BL_CUSTOML(cb, o)
Definition blitzhelp.h:167

◆ CUSTOM

#define CUSTOM   ((UBYTE *)0xdff000)

◆ CW

#define CW ( o)
Value:
BL_CUSTOMW(cb, o)
#define BL_CUSTOMW(cb, o)
Definition blitzhelp.h:166

◆ DEPTH

#define DEPTH   6 /* TBlockImage */

◆ HIDE_A

#define HIDE_A ( p)
Value:
__asm__("" : "+a"(p))

◆ IMAGEPLANESIZE

#define IMAGEPLANESIZE   32

◆ IMAGESIZE

#define IMAGESIZE   (IMAGEPLANESIZE * (DEPTH + 1))

◆ MYBLITSIZE

#define MYBLITSIZE   (1 + (16 << 6)) /* 16 lines of one word */

◆ MYBLITSIZESCROLL

#define MYBLITSIZESCROLL   (2 + (16 << 6)) /* 16 lines of two words */

◆ PLANELOOP_END

#define PLANELOOP_END   " dbf %[n],0b"

◆ PLANELOOP_START

#define PLANELOOP_START
Value:
" bra.s 1f\n" \
"0: tst.b 2(%[cb])\n" \
"2: btst #6,2(%[cb])\n" \
" bne.s 2b\n" \
"1:\n"

◆ PUT [1/2]

#define PUT ( type,
v )
Value:
do { *(type *)d = (v); d += sizeof(type); HIDE_A(d); } while (0)
#define HIDE_A(p)
Definition bb_blitlib.c:218
static struct @065163037313156332013005143365272036211065172003 d
UWORD type
Definition editlib.c:263
static struct @342026374002303043102303243063125232020331002053 v

◆ PUT [2/2]

#define PUT ( v)
Value:
do { *p++ = (v); HIDE_A(p); } while (0)

◆ SHAPE_BLITSIZE

#define SHAPE_BLITSIZE   ((16 * 64) + SHAPE_EBWIDTH)

◆ SHAPE_BYTESIZE

#define SHAPE_BYTESIZE   (SHAPE_PLANEBYTESIZE * (SHAPE_DEPTH + 1))

◆ SHAPE_DEPTH

#define SHAPE_DEPTH   6 /* BTBlockImage */

◆ SHAPE_EBWIDTH

#define SHAPE_EBWIDTH   2

◆ SHAPE_ONEBPMEMX

#define SHAPE_ONEBPMEMX   ((SHAPE_EBWIDTH + 2) * 16)

◆ SHAPE_PLANEBYTESIZE

#define SHAPE_PLANEBYTESIZE   (SHAPE_EBWIDTH * 16)

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
BLTCON0 
BLTCON1 
BLTAFWM 
BLTALWM 
BLTCPT 
BLTBPT 
BLTAPT 
BLTDPT 
BLTSIZE 
BLTCMOD 
BLTBMOD 
BLTAMOD 
BLTDMOD 

Function Documentation

◆ _blocktoshape()

void _blocktoshape ( void )

◆ _bpredatorblit()

void _bpredatorblit ( void )

BPredatorBlit buffer,shape,x,y: PredatorBlit, buffered.

The shape's area (at x,y minus the handle) is saved into a record of the buffer as bblitlib's BBlit does, with a blit size one line less (deliberate: ";!!! BB Cludge!"), then PredatorBlit's blit through the shifted cookie (B: the line below, one pixel more). Fixed (#426): B reads the line the bitmap's bytes per row below; the original added SetupMapTwo's width. Depth 0 loops 65536 times: Fixed (#429), errshapea3_c refuses it. In: d2 x, d3 y, a0 the buffer object (bblitlib), a1 the chip base (chipbaselib), a2 the used bitmap object, a3 the shape object.

◆ _btblockimage()

void _btblockimage ( void )

BTBlockImage buffer,image_addr,x,y,image: TBlockImage, buffered and shifted.

The area is saved as BBlit does, then the image shifted through its mask. Fixed (#427): image*224 is added as a long; the original added it as a word (ADD.w: from image 147 on before image_addr). Assembler like the other buffered blits. In: d1 image_addr, d2 x, d3 y, d4 the image number, a0 the buffer object, a1 the chip base, a2 the used bitmap object.

◆ _createshape()

void _createshape ( void )

◆ _errBlockToShape()

void _errBlockToShape ( void )

◆ _errCreateShape()

void _errCreateShape ( void )

◆ _errSBlockToShape()

void _errSBlockToShape ( void )

◆ _errShapeA1()

void _errShapeA1 ( void )

◆ _errShapeA3()

void _errShapeA3 ( void )

◆ _libfinit()

void _libfinit ( void )
static

finit: does nothing (RTS).

◆ _libinit()

void _libinit ( void )
static

init: does nothing (RTS).

◆ _MapInfo()

void _MapInfo ( void )

◆ _predatorblit()

void _predatorblit ( void )

◆ _specialblock()

void _specialblock ( void )

◆ _specialblock2()

void _specialblock2 ( void )

◆ _specialblockbitmap()

void _specialblockbitmap ( void )

◆ _specialblockbitmap2()

void _specialblockbitmap2 ( void )

◆ _specialblocktoshape()

void _specialblocktoshape ( void )

◆ _tblock()

void _tblock ( void )

◆ _tblockimage()

void _tblockimage ( void )

◆ BLITZ_ALIAS_EP() [1/11]

BLITZ_ALIAS_EP ( _blocktoshape ,
blocktoshape_c  )

◆ BLITZ_ALIAS_EP() [2/11]

BLITZ_ALIAS_EP ( _createshape ,
createshape_c  )

◆ BLITZ_ALIAS_EP() [3/11]

BLITZ_ALIAS_EP ( _MapInfo ,
mapinfo_c  )

◆ BLITZ_ALIAS_EP() [4/11]

BLITZ_ALIAS_EP ( _predatorblit ,
predatorblit_c  )

◆ BLITZ_ALIAS_EP() [5/11]

BLITZ_ALIAS_EP ( _specialblock ,
specialblock_c  )

◆ BLITZ_ALIAS_EP() [6/11]

BLITZ_ALIAS_EP ( _specialblock2 ,
specialblock2_c  )

◆ BLITZ_ALIAS_EP() [7/11]

BLITZ_ALIAS_EP ( _specialblockbitmap ,
specialblockbitmap_c  )

◆ BLITZ_ALIAS_EP() [8/11]

◆ BLITZ_ALIAS_EP() [9/11]

◆ BLITZ_ALIAS_EP() [10/11]

BLITZ_ALIAS_EP ( _tblock ,
tblock_c  )

◆ BLITZ_ALIAS_EP() [11/11]

BLITZ_ALIAS_EP ( _tblockimage ,
tblockimage_c  )

◆ blocktoshape_c()

BLITZ_ENTRYPOINT void blocktoshape_c ( struct bb_shape * shape,
struct bb_shape * dest )
static

BlockToShape shape,destshape: copies a shape's data into another.

One blit of height*depth lines of ebwidth/2 words, modulos 0: the whole data, straight through. Fixed (#425): the original blitted one word per line (ADDQ.w #1), so of a shape wider than 16 pixels only the first 2/ebwidth of the data. The width field is 6 bits (0 = 64 words), the height field 10 bits (0 = 1024 lines); larger shapes are refused by errblocktoshape_c.

Parameters
shapea1: the source shape object
desta2: the destination shape object

◆ createshape_c()

BLITZ_ENTRYPOINT void createshape_c ( UWORD count,
ULONG mem,
struct bb_shape * shape,
struct bb_shape * like )
static

CreateShape start_shape,count,chipmemblock,like_shape: shape objects whose data lie in a given block.

count shape objects from start_shape on like like_shape, their data at chipmemblock one after another (size, +26, of the like shape each), no cookie, "cL" (the data is not the shapes'). count 0 creates 65536 shapes (DBRA), a count past Maximum Shapes writes behind the shape table; Fixed (#428, #1077): the error check errcreateshape_c refuses both.

Parameters
countd1: the number of shapes
memd2: the chip memory block
shapea2: the first shape object
likea3: the shape to copy the sizes from

◆ docolblit()

void docolblit ( void )

BColourBlit buffer,shape,x,y,colour: a shape's cookie in one colour, buffered.

The area is saved as BBlit does, then the shifted cookie is blitted in colour: per plane D = A | C (bit set) or ~A & C. Sets the B modulos it does not use and shifts the colour as a byte (at most 8 planes): original behaviour. Depth 0 loops 65536 times: Fixed (#429), errshapea3_c refuses it. The colour waits in coltoblit while the save uses every data register, as in the original. In: d2 x, d3 y, d4 the colour, a0 the buffer object, a1 the chip base, a2 the used bitmap object, a3 the shape object.

◆ errblocktoshape_c()

void errblocktoshape_c ( struct bb_shape * shape,
struct bb_shape * dest )
static

BlockToShape's error check: dest has data, both shapes the same size (size, +26), and the shape fits one blit.

Runtime errors "Destination shape MUST be pre-reserved!", "Shapes must be the same size!" and, Fixed (#425), "Shape too large for BlockToShape!" for more than 1024 lines (height*depth) or a width above 64 words (1024 pixels): the blitter's limits for the one blit.

Parameters
shapea1: the source shape object
desta2: the destination shape object

◆ errcreateshape_c()

void errcreateshape_c ( UWORD count,
UWORD max,
struct bb_shape * table,
struct bb_shape * shape )
static

CreateShape's error check (not in the original): a count of at least 1 that stays inside the shape table.

Fixed (#428): count 0 makes the routine's DBRA loop create 65536 shapes over the memory behind the shape table; runtime error "CreateShape count must be at least 1!". Fixed (#1077): start_shape + count above Maximum Shapes writes the shapes from Maximum Shapes on behind the table; runtime error "CreateShape start+count above Maximum Shapes!". start_shape itself is checked by the compiler's item check ("Value out of Maximum Range"), so shape - table is below the maximum. The release code is unchanged (an invalid argument); the declaration loads a0 and d4 for this check.

Parameters
countd1: the number of shapes
maxd4: Maximum Shapes (BL_MD4)
tablea0: the shape table, shape 0 (BL_BA0)
shapea2: the first shape object

◆ errsblocktoshape_c()

void errsblocktoshape_c ( struct bb_shape * dest,
struct bb_shape * top )
static

SpecialBlockToShape's error check: the same for dest and the top shape, then the top shape's depth.

Fixed (#429): a top shape of depth 0 (a shape never defined, whose size is that of dest) is the runtime error "Uninitialized Shape"; the original does not test it, and the blit loop runs 65536 times.

Parameters
desta0: the destination shape object
topa1: the top shape object

◆ errshapea1_c()

void errshapea1_c ( struct bb_shape * shape)
static

The error check of SpecialBlock, SpecialBlockBitmap, TBlock and PredatorBlit (not in the original): the shape in a1 has planes.

Fixed (#429): a shape of depth 0 (a shape never defined) makes the blit loop (DBRA on depth-1) run 65536 times over the "plane pointers" behind the bitmap object; runtime error "Uninitialized Shape". The release code is unchanged (an invalid argument).

Parameters
shapea1: the shape object

◆ errshapea3_c()

void errshapea3_c ( struct bb_shape * shape)
static

The error check of BPredatorBlit and BColourBlit (not in the original): the shape in a3 has planes.

Fixed (#429): as errshapea1_c (the save of the background loops over the bitmap's planes, the blit over the shape's).

Parameters
shapea3: the shape object

◆ mapinfo_c()

BLITZ_ENTRYPOINT void mapinfo_c ( UWORD w)
static

SetupMapTwo ebwidth: the bytes per line of the bitmaps.

SpecialBlock, TBlock and the predator blits assume bitmaps of this width (default 40); also sets the modulos ebwidth-2 and ebwidth-4. The three words through an address register (MOVE.w (a0)+, 8 cycles against the original's 16 for an absolute address).

Parameters
wd0: the bytes per line

◆ predatorblit_c()

BLITZ_ENTRYPOINT ULONG predatorblit_c ( UWORD x,
UWORD y,
struct bb_bitmap * bm,
struct bb_shape * shape )
static

PredatorBlit(shape,x,y): the "predator" effect inside a shape's cookie.

B = the bitmap one line (SetupMapTwo's width) further, shifted by x and one pixel more, C = D = the bitmap, 2 words wide at the even word, through the cookie (A, shifted, last word masked). Assumes 16x16 shapes. Depth 0 loops 65536 times: Fixed (#429), errshapea1_c refuses it.

Parameters
xd1: x
yd2: y
bma0: the used bitmap object
shapea1: the shape object
Returns
d0: the address of the shape's cookie

◆ specialblock()

BL_ALWAYS_INLINE void specialblock ( UWORD off,
struct bb_bitmap * bm,
struct bb_shape * top,
struct bb_shape * bot )

SpecialBlock topshape,bottomshape,offset: a 16x16 block of two shapes into the used bitmap.

The top shape (B) over the bottom shape (C) through top's cookie (A) into each plane of the used bitmap at off (D = A ? B : C); B and C go on from plane to plane. Assumes 16x16 shapes and bitmaps of SetupMapTwo's width. Depth 0 loops 65536 times: Fixed (#429), errshapea1_c refuses it.

Parameters
offd2: the byte offset in the bitmap
bma0: the used bitmap object
topa1: the top shape object (parameter 0)
bota2: the bottom shape object (parameter 1)

◆ specialblock2_c()

BLITZ_ENTRYPOINT void specialblock2_c ( UWORD off,
struct bb_bitmap * bm,
struct bb_shape * top,
struct bb_shape * bot )
static

SpecialBlock topshape,bottomshape,offset: the entry of the offset form (specialblock() above; d2 the offset, a0-a2 as there).

◆ specialblock_c()

BLITZ_ENTRYPOINT void specialblock_c ( UWORD x,
UWORD y,
struct bb_bitmap * bm,
struct bb_shape * top,
struct bb_shape * bot )
static

SpecialBlock topshape,bottomshape,x,y: as the offset form, at y * SetupMapTwo's width + x/8.

Parameters
xd2: x (ASR 3: a byte column)
yd3: y
bma0: the used bitmap object
topa1: the top shape object
bota2: the bottom shape object

◆ specialblockbitmap()

BL_ALWAYS_INLINE void specialblockbitmap ( UWORD off,
struct bb_bitmap * bm,
struct bb_shape * shape,
struct bb_bitmap * src )

SpecialBlockBitmap topshape,bitmap,offset: a shape over another bitmap into the used bitmap.

The shape (B, any size) over the same area of the source bitmap (C) through its cookie (A) into the used bitmap, both at off; B goes on from plane to plane. Depth 0 loops 65536 times: Fixed (#429), errshapea1_c refuses it.

Parameters
offd2: the byte offset in both bitmaps
bma0: the used bitmap object
shapea1: the shape object (parameter 0)
srca2: the source bitmap object (parameter 1)

◆ specialblockbitmap2_c()

BLITZ_ENTRYPOINT void specialblockbitmap2_c ( UWORD off,
struct bb_bitmap * bm,
struct bb_shape * shape,
struct bb_bitmap * src )
static

SpecialBlockBitmap topshape,bitmap,offset: the entry of the offset form (specialblockbitmap() above; d2 the offset, a0-a2 as there).

◆ specialblockbitmap_c()

BLITZ_ENTRYPOINT void specialblockbitmap_c ( UWORD x,
UWORD y,
struct bb_bitmap * bm,
struct bb_shape * shape,
struct bb_bitmap * src )
static

SpecialBlockBitmap topshape,bitmap,x,y: as the offset form, at y * the used bitmap's width + x/8.

Parameters
xd2: x (ASR 3)
yd3: y
bma0: the used bitmap object
shapea1: the shape object
srca2: the source bitmap object

◆ specialblocktoshape_c()

BLITZ_ENTRYPOINT void specialblocktoshape_c ( struct bb_shape * dest,
struct bb_shape * top,
struct bb_shape * bot )
static

SpecialBlockToShape topshape,bottomshape,destshape: SpecialBlock into a shape.

The 16x16 block (top over bottom through top's cookie) into the data of dest. Error check: errsblocktoshape_c. Depth 0 loops 65536 times: Fixed (#429), errsblocktoshape_c refuses it.

Parameters
desta0: the destination shape object
topa1: the top shape object
bota2: the bottom shape object

◆ tblock_c()

BLITZ_ENTRYPOINT void tblock_c ( UWORD x,
UWORD y,
struct bb_bitmap * bm,
struct bb_shape * shape )
static

TBlock shape,x,y: a 16x16 shape through its cookie onto the used bitmap.

B = the shape, A = its cookie, C = D = the bitmap at y * SetupMapTwo's width + x/8; B goes on from plane to plane. Depth 0 loops 65536 times: Fixed (#429), errshapea1_c refuses it.

Parameters
xd1: x (ASR 3)
yd2: y
bma0: the used bitmap object
shapea1: the shape object

◆ tblockimage_c()

BLITZ_ENTRYPOINT void tblockimage_c ( ULONG addr,
UWORD image,
UWORD x,
UWORD y,
struct bb_bitmap * bm )
static

TBlockImage image_addr,image,x,y: a 16x16 image of 6 planes through its mask.

Image image of image_addr (224 bytes: the mask, then 6 planes of 16x16) through its mask onto 6 planes of the used bitmap.

Parameters
addrd0: image_addr
imaged1: the image number
xd2: x (ASR 3)
yd3: y
bma0: the used bitmap object

◆ xyoff()

BL_ALWAYS_INLINE UWORD xyoff ( UWORD x,
UWORD y,
UWORD width )

Variable Documentation

◆ coltoblit

UWORD coltoblit
static

◆ ebwidth

UWORD ebwidth

◆ [struct]

struct { ... } map

◆ modwidth

UWORD modwidth

◆ modwidth2

UWORD modwidth2