BB2 C port
API reference: Blitz libraries in C and the shared code
Loading...
Searching...
No Matches
rishapeslib.c File Reference
#include "blitzlib.h"
#include "blitzobj.h"
#include <stddef.h>
#include <proto/dos.h>

Data Structures

struct  paldata
struct  iffchunk
struct  shhd
struct  lehead
struct  leshape

Macros

#define __NOLIBBASE__
#define DOS_BASE_NAME   dosbase
#define TOK_packpbm   ((LIB_ripacklib << 7) + 1)
#define TOK_unpackpbm   ((LIB_ripacklib << 7) + 8)
#define TOK_loadshapes   ((LIB_shapeslib << 7) + 10)
#define SW(p, o)
#define SL(p, o)
#define ID(a, b, c, d)
#define FW(p, T, f)
#define FL(p, T, f)
#define FPAIR(p, T, f)
#define SHW(p, f)
#define SHL(p, f)
#define SHPAIR(p, f)

Enumerations

enum  { FREEALL , FREEMEMORY , FREEFILE }

Functions

void _loadshapes (void)
void _loadshapestoaddress (void)
void _safetoblit (void)
void _leloadshapes (void)
void _leloadshapesnop (void)
void _leloadshapesinglenop (void)
void _leloadshapesingle (void)
void _lesaveshapesnop (void)
void _lesaveshapes (void)
void _setcompress (void)
void _lecludgeshapes (void)
void _lecludgeshapes2 (void)
void _leinitshape (void)
void _lescanshapes (void)
void _leMaxShapeWidth (void)
void _leMaxShapeHeight (void)
void _leMaxShapeDepth (void)
void _leautocookie (void)
void rishapeslib_libinit (void)
void rishapeslib_libfinit (void)
 finit (_libfinit): nothing, an RTS.
static UWORD getw (const UBYTE *p)
static ULONG getl (const UBYTE *p)
static ULONG galloc (ULONG size, ULONG flags)
static ULONG gfree (ULONG mem, ULONG size)
static void rs_crash (UBYTE *pushed)
static void libinit_c (void)
 init: LECompressShapes off, LEAutoCookie on, the maxima of LEScanShapes 0.
static void leautocookie_c (BB_BOOL on)
 LEAutoCookie on|off: whether CludgeShapes makes the cookies of its shapes (on at the start).
static void setcompress_c (BB_BOOL on)
 LECompressShapes True|False: whether LESaveShapes packs the shape data (PackPBM of RIPackLib).
static ULONG maxwidth_c (void)
 LEMaxShapeWidth: the largest width of the last LEScanShapes.
static ULONG maxheight_c (void)
 LEMaxShapeHeight: the largest height of the last LEScanShapes.
static ULONG maxdepth_c (void)
 LEMaxShapeDepth: the largest depth of the last LEScanShapes.
static void lescanshapes_c (UBYTE *shape, UBYTE *last)
 LEScanShapes startshape#,endshape#: the largest width, height and depth of the used shapes in the range (for LEMaxShape...).
static BB_BOOL safetoblit_c (ULONG shapenum, ULONG x, ULONG y, UBYTE *bitmap, UBYTE *shape, ULONG maxshapes)
 SafeToBlit(shape,x,y): whether the shape can be blitted at x,y into the used bitmap.
static void createcookie (UBYTE *shape, UBYTE *pushed)
static void freecookie (UBYTE *shape)
static void freeshapesm (UBYTE *shape)
static BB_BOOL loadshapes_c (ULONG shapenum, ULONG numshapes, ULONG address, UBYTE *objects)
 CludgeShapes shape#,numshapes,address: makes shapes of shapes in memory (a 32-byte shape header + the data each), copied into chip memory.
static BB_BOOL loadshapestoaddress_c (ULONG objects, ULONG numshapes, ULONG address)
 CludgeShapesToAddress Address,numshapes,address: CludgeShapes into shape objects at an address of the program's own.
static void shapesizes (UBYTE *shape, int all)
static void leinitshape_c (ULONG width, ULONG height, ULONG depth, UBYTE *shape)
 LEInitShape shape#,width,height,depth: makes an empty shape.
static void read_palette (const UBYTE *cmap)
static void readshapes (UBYTE *data)
static UBYTE * skipchunk (UBYTE *p, ULONG len)
static void lecludgeshapes2_c (ULONG file, ULONG copymem, UBYTE *palette, UBYTE *first, UBYTE *last)
 LECludgeShapes shape#,shape#,address,palette#,copymemflag: the shapes (and the palette) of an LE file in memory.
static void lecludgeshapes_c (ULONG file, UBYTE *palette, UBYTE *first, UBYTE *last)
 LECludgeShapes shape#,shape#,address,palette#: as above with copymemflag 0 (CLR.l d4).
static void acidloadshapes (UBYTE *first, UBYTE *last)
static void freechunk (void)
static ULONG cleanup (int from)
static ULONG readchunk (BPTR fh)
static ULONG leloadshapes (ULONG shape1, ULONG shape2, ULONG name, UBYTE *palette, UBYTE *first, UBYTE *last, struct DosLibrary *dos)
static void leloadshapesp_c (ULONG shape1, ULONG shape2, ULONG name, UBYTE *palette, UBYTE *first, UBYTE *last, struct DosLibrary *dos)
 LELoadShapes shape#,shape#,filename$,palette#: loads the shapes (and the palette) of an LE file into the range of shapes.
static void leloadshapesnop_c (ULONG shape1, ULONG shape2, ULONG name, UBYTE *first, UBYTE *last, struct DosLibrary *dos)
 LELoadShapes shape#,shape#,filename$: as above without a palette (the CMAP is skipped).
static void leloadshapesingle_c (ULONG shapenum, ULONG name, ULONG maxshapes, UBYTE *palette, UBYTE *first, UBYTE *objects, struct DosLibrary *dos)
 LELoadShapes shape#,filename$,palette#: as above from shape# up to the last shape (the maximum - 1), as many as the file has.
static void leloadshapesinglenop_c (ULONG shapenum, ULONG name, ULONG maxshapes, UBYTE *first, UBYTE *objects, struct DosLibrary *dos)
 LELoadShapes shape#,filename$: as above without a palette.
static ULONG savecmap (BPTR fh, ULONG result)
static ULONG writeshapes (BPTR fh)
static void lesaveshapes_c (ULONG shape1, ULONG shape2, ULONG name, UBYTE *palette, UBYTE *first, UBYTE *last, struct DosLibrary *dos)
 LESaveShapes shape#,shape#,filename$,palette#: saves the range of shapes (and the palette) as an LE file.
static void lesaveshapesnop_c (ULONG shape1, ULONG shape2, ULONG name, UBYTE *first, UBYTE *last, struct DosLibrary *dos)
 LESaveShapes shape#,shape#,filename$: as above without a palette (no CMAP).

Variables

static struct DosLibrary * dosbase
static UWORD maxw
static UWORD maxh
static UWORD maxd
static ULONG bytespershape
static ULONG centry
static ULONG chunksize
static ULONG chunkptr
static ULONG chunkid
static ULONG filehandle
static UBYTE * paletteptr
static UBYTE * startshape
static UBYTE * endshape
static ULONG shapecount
static UWORD colourcount
static UWORD aciddata_s1
static UWORD aciddata_s2
static ULONG aciddata_name
static UWORD compress
static UWORD compressed
static ULONG packsize
static ULONG packptr
static ULONG packedsize
static LONG inchip
static ULONG cookeeemode = 1
static struct lehead emptyheader
static const char pme [] = "Not enough memory to pack shapes"
static const char coer [] = "Shape Compression Failed!"

Macro Definition Documentation

◆ __NOLIBBASE__

#define __NOLIBBASE__

◆ DOS_BASE_NAME

#define DOS_BASE_NAME   dosbase

◆ FL

#define FL ( p,
T,
f )
Value:
SL(p, offsetof(struct T, f))
#define T(maxbp, fetchwid, xmask, xrshift, adjwid, adjstop, fmode, diwstrt, diwstop, ddfstrt, ddfstop, bplcon0)
Definition displaylib.c:377
#define SL(p)
Definition palettelib.c:333

◆ FPAIR

#define FPAIR ( p,
T,
f )
Value:
SL(p, offsetof(struct T, f))

◆ FW

#define FW ( p,
T,
f )
Value:
SW(p, offsetof(struct T, f))
#define SW(s, o)
Definition shapeslib.c:336

◆ ID

#define ID ( a,
b,
c,
d )
Value:
((ULONG)(a) << 24 | (ULONG)(b) << 16 | (ULONG)(c) << 8 | (ULONG)(d))
ULONG WORD UWORD c
Definition 2dlib.c:2491
static struct @065163037313156332013005143365272036211065172003 d

◆ SHL

#define SHL ( p,
f )
Value:
FL(p, bb_shape, f)
#define FL(p, T, f)
Definition rishapeslib.c:271
A Shape object, 32 bytes (shapeslib's; also the block SaveShape(s) writes and the header of a shape f...
Definition blitzobj.h:48

◆ SHPAIR

#define SHPAIR ( p,
f )
Value:
#define FPAIR(p, T, f)
Definition rishapeslib.c:272

◆ SHW

#define SHW ( p,
f )
Value:
FW(p, bb_shape, f)
#define FW(p, T, f)
Definition rishapeslib.c:270

◆ SL

#define SL ( p,
o )
Value:
(*(ULONG *)((UBYTE *)(p) + (o)))

◆ SW

#define SW ( p,
o )
Value:
(*(UWORD *)((UBYTE *)(p) + (o)))

◆ TOK_loadshapes

#define TOK_loadshapes   ((LIB_shapeslib << 7) + 10)

◆ TOK_packpbm

#define TOK_packpbm   ((LIB_ripacklib << 7) + 1)

◆ TOK_unpackpbm

#define TOK_unpackpbm   ((LIB_ripacklib << 7) + 8)

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
FREEALL 
FREEMEMORY 
FREEFILE 

Function Documentation

◆ _leautocookie()

void _leautocookie ( void )

◆ _lecludgeshapes()

void _lecludgeshapes ( void )

◆ _lecludgeshapes2()

void _lecludgeshapes2 ( void )

◆ _leinitshape()

void _leinitshape ( void )

◆ _leloadshapes()

void _leloadshapes ( void )

◆ _leloadshapesingle()

void _leloadshapesingle ( void )

◆ _leloadshapesinglenop()

void _leloadshapesinglenop ( void )

◆ _leloadshapesnop()

void _leloadshapesnop ( void )

◆ _leMaxShapeDepth()

void _leMaxShapeDepth ( void )

◆ _leMaxShapeHeight()

void _leMaxShapeHeight ( void )

◆ _leMaxShapeWidth()

void _leMaxShapeWidth ( void )

◆ _lesaveshapes()

void _lesaveshapes ( void )

◆ _lesaveshapesnop()

void _lesaveshapesnop ( void )

◆ _lescanshapes()

void _lescanshapes ( void )

◆ _loadshapes()

void _loadshapes ( void )

◆ _loadshapestoaddress()

void _loadshapestoaddress ( void )

◆ _safetoblit()

void _safetoblit ( void )

◆ _setcompress()

void _setcompress ( void )

◆ acidloadshapes()

void acidloadshapes ( UBYTE * first,
UBYTE * last )
static

◆ cleanup()

ULONG cleanup ( int from)
static

◆ createcookie()

void createcookie ( UBYTE * shape,
UBYTE * pushed )
static

◆ freechunk()

void freechunk ( void )
static

◆ freecookie()

void freecookie ( UBYTE * shape)
static

◆ freeshapesm()

void freeshapesm ( UBYTE * shape)
static

◆ galloc()

ULONG galloc ( ULONG size,
ULONG flags )
static

◆ getl()

ULONG getl ( const UBYTE * p)
inlinestatic

◆ getw()

UWORD getw ( const UBYTE * p)
inlinestatic

◆ gfree()

ULONG gfree ( ULONG mem,
ULONG size )
static

◆ leautocookie_c()

void leautocookie_c ( BB_BOOL on)
static

LEAutoCookie on|off: whether CludgeShapes makes the cookies of its shapes (on at the start).

Parameters
ond0: any nonzero value is on Returns nothing (all registers kept).

◆ lecludgeshapes2_c()

void lecludgeshapes2_c ( ULONG file,
ULONG copymem,
UBYTE * palette,
UBYTE * first,
UBYTE * last )
static

LECludgeShapes shape#,shape#,address,palette#,copymemflag: the shapes (and the palette) of an LE file in memory.

Nothing if the file is no FORM LESH with SHHD first or has no SDAT. The shapes are linked into the memory ("cL", no copy) if the file is uncompressed and below 2 MB, unless copymemflag is negative or the shape lies at an odd address; otherwise copied (unpacked) into chip memory. Every shape gets a cookie. At most count + 1 shapes of the file are read. Fixed (#811): the SHHD and CMAP chunks are passed by their lengths with the IFF pad byte (a byte other than 0 there starts the next chunk); the original skipped SHHD as 20 bytes and the CMAP by the colours decoded, so a longer SHHD, a CMAP size that is no multiple of 3 or a pad byte missed SDAT. The palette as in LELoadShapes (fixed #820). Fixed (#1118): the chunk headers behind SHHD and the shape headers are read byte by byte, and a shape whose data lies at an odd address is copied (LESaveShapes writes an odd CMAP without its pad byte; the original read words there, an address error on a 68000, and linked the shapes at the odd address). Fixed (#810): the old cookies are freed. Fixed (#807): a shape in use that is cludged is replaced like any other (the original pops a0 it never pushed and returns past the caller).

Parameters
filed2: the LE file in memory (address)
copymemd4.w: copymemflag (negative: always copy)
palettea0: the palette object of palette# (d3)
firsta2: the first shape object
lasta3: the last shape object Returns nothing (all registers kept).

◆ lecludgeshapes_c()

void lecludgeshapes_c ( ULONG file,
UBYTE * palette,
UBYTE * first,
UBYTE * last )
static

LECludgeShapes shape#,shape#,address,palette#: as above with copymemflag 0 (CLR.l d4).

Parameters
filed2: the LE file in memory
palettea0: the palette object of palette# (d3)
firsta2: the first shape object
lasta3: the last shape object Returns nothing (all registers kept).

◆ leinitshape_c()

void leinitshape_c ( ULONG width,
ULONG height,
ULONG depth,
UBYTE * shape )
static

LEInitShape shape#,width,height,depth: makes an empty shape.

A shape in use is freed first; the sizes are computed, the data and the cookie get new cleared chip memory (the cookie is not computed), the handles are 0. Without memory for the data no cookie is allocated. Fixed (#810): the old cookie is freed (the original's MOVE.l 18(a2),a1:BEQ tested the Z flag of the CLR before it, so it never freed it).

Parameters
widthd1.w: the width
heightd2.w: the height
depthd3.w: the depth
shapea2: the shape object of shape# (d0) Returns nothing (all registers kept).

◆ leloadshapes()

ULONG leloadshapes ( ULONG shape1,
ULONG shape2,
ULONG name,
UBYTE * palette,
UBYTE * first,
UBYTE * last,
struct DosLibrary * dos )
static

◆ leloadshapesingle_c()

void leloadshapesingle_c ( ULONG shapenum,
ULONG name,
ULONG maxshapes,
UBYTE * palette,
UBYTE * first,
UBYTE * objects,
struct DosLibrary * dos )
static

LELoadShapes shape#,filename$,palette#: as above from shape# up to the last shape (the maximum - 1), as many as the file has.

The declaration asks for the palette of d3, not of the third argument (!libs pd3), but no compiled program reaches this form: the compiler takes form 1 (shape#,shape#,filename$), the first with three arguments, as the manual says (not a defect, #812).

Parameters
shapenumd0.w: shape# * 32
named1: filename$
maxshapesd4: the maximum of shapes
palettea0: the palette object of the number in d3
firsta2: the shape object of shape#
objectsa3: the first shape object (item 0)
dosa6: dos.library Returns nothing (all registers kept).

◆ leloadshapesinglenop_c()

void leloadshapesinglenop_c ( ULONG shapenum,
ULONG name,
ULONG maxshapes,
UBYTE * first,
UBYTE * objects,
struct DosLibrary * dos )
static

LELoadShapes shape#,filename$: as above without a palette.

Parameters
shapenumd0.w: shape# * 32
named1: filename$
maxshapesd4: the maximum of shapes
firsta2: the shape object of shape#
objectsa3: the first shape object (item 0)
dosa6: dos.library Returns nothing (all registers kept).

◆ leloadshapesnop_c()

void leloadshapesnop_c ( ULONG shape1,
ULONG shape2,
ULONG name,
UBYTE * first,
UBYTE * last,
struct DosLibrary * dos )
static

LELoadShapes shape#,shape#,filename$: as above without a palette (the CMAP is skipped).

Parameters
shape1d0.w: the first shape# * 32
shape2d1.w: the last shape# * 32
named2: filename$
firsta2: the first shape object
lasta3: the last shape object
dosa6: dos.library Returns nothing (all registers kept).

◆ leloadshapesp_c()

void leloadshapesp_c ( ULONG shape1,
ULONG shape2,
ULONG name,
UBYTE * palette,
UBYTE * first,
UBYTE * last,
struct DosLibrary * dos )
static

LELoadShapes shape#,shape#,filename$,palette#: loads the shapes (and the palette) of an LE file into the range of shapes.

At most count + 1 shapes of the file, unpacked if compressed, each with a cookie; the CMAP into the palette object. A file that is no FORM goes to shapeslib's LoadShapes (form 1), with the shape numbers (d0/d1 >> 5). BUG(orig): a failing chunk allocation frees the header buffer and closes the file twice (#819, never in practice); the palette: no check of the allocation (#821). Fixed (#820): a CMAP of no colour or of more than 65535 leaves the palette. Fixed (#810): the old cookies are freed. Fixed (#807): a shape in use that is cludged is replaced like any other (the original pops a0 it never pushed and returns past the caller without freeing the buffers or closing the file).

Parameters
shape1d0.w: the first shape# * 32 (pd0)
shape2d1.w: the last shape# * 32 (pd1)
named2: filename$
palettea0: the palette object of palette# (d3)
firsta2: the first shape object
lasta3: the last shape object
dosa6: dos.library Returns nothing (all registers kept).

◆ lesaveshapes_c()

void lesaveshapes_c ( ULONG shape1,
ULONG shape2,
ULONG name,
UBYTE * palette,
UBYTE * first,
UBYTE * last,
struct DosLibrary * dos )
static

LESaveShapes shape#,shape#,filename$,palette#: saves the range of shapes (and the palette) as an LE file.

FORM LESH, SHHD (count, compression), CMAP if there is a palette, SDAT with the shapes (packed with PackPBM if LECompressShapes is on, -1 = stored when packing fails). Nothing if the file cannot be opened. BUG(orig): a missing pack buffer is two runtime errors (#818). PackPBM's failure returns -1 and the shape is stored (ripacklib's fix of #772: the original's PackPBM ran on into UnPackPBM, here with d3 = 12, which rishapeslib passes as before). Fixed (#814): the CMAP is written whenever there is a palette with data (the original tested the Z flag of dos Write). Fixed (#823): a palette of 0 colours writes no CMAP (the original copied 65536). Fixed (#816): the FORM length is the file's size - 8 (the original's was 8 larger and had the CMAP size of the last save with a palette). Fixed (#817): the shape header buffer is 12 bytes (the original's had the upper word of the d0 that _saveCMAP left). Fixed (#815): the count is last - first as a word, sign-extended (the original's word subtraction kept the upper word of d1, which compiled code leaves from a long expression).

Parameters
shape1d0.w: the first shape# * 32
shape2d1.w: the last shape# * 32
named2: filename$
palettea0: the palette object of palette# (d3)
firsta2: the first shape object
lasta3: the last shape object
dosa6: dos.library Returns nothing (all registers kept).

◆ lesaveshapesnop_c()

void lesaveshapesnop_c ( ULONG shape1,
ULONG shape2,
ULONG name,
UBYTE * first,
UBYTE * last,
struct DosLibrary * dos )
static

LESaveShapes shape#,shape#,filename$: as above without a palette (no CMAP).

Parameters
shape1d0.w: the first shape# * 32
shape2d1.w: the last shape# * 32
named2: filename$
firsta2: the first shape object
lasta3: the last shape object
dosa6: dos.library Returns nothing (all registers kept).

◆ lescanshapes_c()

void lescanshapes_c ( UBYTE * shape,
UBYTE * last )
static

LEScanShapes startshape#,endshape#: the largest width, height and depth of the used shapes in the range (for LEMaxShape...).

Signed word compares; empty shapes (width 0) are skipped.

Parameters
shapea2: the first shape object
lasta3: the last shape object Returns nothing (all registers kept).

◆ libinit_c()

void libinit_c ( void )
static

init: LECompressShapes off, LEAutoCookie on, the maxima of LEScanShapes 0.

Fixed (#1109): the original's init clears only the compression flag, so a second run of a program with the library still loaded (from the editor) started with the LEAutoCookie setting and the maxima of the run before.

◆ loadshapes_c()

BB_BOOL loadshapes_c ( ULONG shapenum,
ULONG numshapes,
ULONG address,
UBYTE * objects )
static

CludgeShapes shape#,numshapes,address: makes shapes of shapes in memory (a 32-byte shape header + the data each), copied into chip memory.

Shapes that are in use are freed first; a cookie is made if LEAutoCookie is on. A failing cookie allocation would jump to the data address (#806, never in practice). Fixed (#809): an empty shape in memory (width or height 0) advances by 32 (the original by 32 + the low word of the size of the shape before, also of an earlier call). Fixed (#808): a shape whose size (plane size x depth) is 0 is taken as empty, and a size above 64 KB is copied whole (the original copied 65536 bytes for a size of 0, and only the low word of a larger size).

Parameters
shapenumd0: shape# (unused: shifted by 5, as the original)
numshapesd1: the number of shapes
addressd2: the shapes in memory
objectsa0: the shape object of shape#
Returns
d0: -1, or 0 for no shapes or missing chip memory

◆ loadshapestoaddress_c()

BB_BOOL loadshapestoaddress_c ( ULONG objects,
ULONG numshapes,
ULONG address )
static

CludgeShapesToAddress Address,numshapes,address: CludgeShapes into shape objects at an address of the program's own.

MOVE.l d0,a0:MOVEQ #0,d0, then as CludgeShapes (fixed: #808, #809).

Parameters
objectsd0: the first of numshapes shape objects (32 bytes each)
numshapesd1: the number of shapes
addressd2: the shapes in memory
Returns
d0: -1, or 0 for no shapes or missing chip memory

◆ maxdepth_c()

ULONG maxdepth_c ( void )
static

LEMaxShapeDepth: the largest depth of the last LEScanShapes.

Returns
d0.w: the depth

◆ maxheight_c()

ULONG maxheight_c ( void )
static

LEMaxShapeHeight: the largest height of the last LEScanShapes.

Returns
d0.w: the height

◆ maxwidth_c()

ULONG maxwidth_c ( void )
static

LEMaxShapeWidth: the largest width of the last LEScanShapes.

Returns
d0.w: the width

◆ read_palette()

void read_palette ( const UBYTE * cmap)
static

◆ readchunk()

ULONG readchunk ( BPTR fh)
static

◆ readshapes()

void readshapes ( UBYTE * data)
static

◆ rishapeslib_libfinit()

void rishapeslib_libfinit ( void )

finit (_libfinit): nothing, an RTS.

◆ rishapeslib_libinit()

void rishapeslib_libinit ( void )

◆ rs_crash()

void rs_crash ( UBYTE * pushed)
static

◆ safetoblit_c()

BB_BOOL safetoblit_c ( ULONG shapenum,
ULONG x,
ULONG y,
UBYTE * bitmap,
UBYTE * shape,
ULONG maxshapes )
static

SafeToBlit(shape,x,y): whether the shape can be blitted at x,y into the used bitmap.

True if the shape exists (in range, has a cookie), x and y are not negative, and it fits into the bitmap's width and height (+56.w/+58.w of the bitmap object). d0 is the shape number shifted by 5, as compiled code passes it (pd0); the ASR #5 gives the number back for the compare with the maximum (not a defect, #822).

Parameters
shapenumd0.w: shape * 32
xd1.w: x
yd2.w: y
bitmapa2: the used bitmap object
shapea3: the shape object
maxshapesd6: the maximum of shapes
Returns
d0.w: -1 if safe, else 0

◆ savecmap()

ULONG savecmap ( BPTR fh,
ULONG result )
static

◆ setcompress_c()

void setcompress_c ( BB_BOOL on)
static

LECompressShapes True|False: whether LESaveShapes packs the shape data (PackPBM of RIPackLib).

Parameters
ond0.w: negative (True) packs, else stored Returns nothing (all registers kept).

◆ shapesizes()

void shapesizes ( UBYTE * shape,
int all )
static

◆ skipchunk()

UBYTE * skipchunk ( UBYTE * p,
ULONG len )
static

◆ writeshapes()

ULONG writeshapes ( BPTR fh)
static

Variable Documentation

◆ aciddata_name

ULONG aciddata_name
static

◆ aciddata_s1

UWORD aciddata_s1
static

◆ aciddata_s2

UWORD aciddata_s2
static

◆ bytespershape

ULONG bytespershape
static

◆ centry

ULONG centry
static

◆ chunkid

ULONG chunkid
static

◆ chunkptr

ULONG chunkptr
static

◆ chunksize

ULONG chunksize
static

◆ coer

const char coer[] = "Shape Compression Failed!"
static

◆ colourcount

UWORD colourcount
static

◆ compress

UWORD compress
static

◆ compressed

UWORD compressed
static

◆ cookeeemode

ULONG cookeeemode = 1
static

◆ dosbase

struct DosLibrary* dosbase
static

◆ emptyheader

struct lehead emptyheader
static
Initial value:
= {
ID('F', 'O', 'R', 'M'), 0, ID('L', 'E', 'S', 'H'), ID('S', 'H', 'H', 'D'), 20, { 0, 0, { 0 } }
}
#define ID(a, b, c, d)
Definition ciatrklib.c:371

◆ endshape

UBYTE * endshape
static

◆ filehandle

ULONG filehandle
static

◆ inchip

LONG inchip
static

◆ maxd

UWORD maxd
static

◆ maxh

UWORD maxh
static

◆ maxw

UWORD maxw
static

◆ packedsize

ULONG packedsize
static

◆ packptr

ULONG packptr
static

◆ packsize

ULONG packsize
static

◆ paletteptr

UBYTE* paletteptr
static

◆ pme

const char pme[] = "Not enough memory to pack shapes"
static

◆ shapecount

ULONG shapecount
static

◆ startshape

UBYTE * startshape
static