1 /*-----------------------------------------------------------------------
\r
3 ; XPOINT - header file
\r
7 ; ****** XLIB - Mode X graphics library ****************
\r
8 ; ****** ****************
\r
9 ; ****** Written By Themie Gouthas ****************
\r
11 ; Macros written by Mathew Mackenzie
\r
13 ; egg@dstos3.dsto.gov.au
\r
14 ; teg@bart.dsto.gov.au
\r
16 ; Terminology & notes:
\r
18 ; SRAM == System RAM
\r
19 ; X coordinates are in pixels unless explicitly stated
\r
21 ;-----------------------------------------------------------------------*/
\r
23 #ifndef _XBMTOOLS_H_
\r
24 #define _XBMTOOLS_H_
\r
26 #define BM_WIDTH_ERROR 1
\r
28 #define LBMHeight(lbitmap) lbitmap[1]
\r
29 #define LBMWidth(lbitmap) lbitmap[0]
\r
30 #define PBMHeight(pbitmap) pbitmap[1]
\r
31 #define PBMWidth(pbitmap) (pbitmap[0]<<2)
\r
32 #define PBMByteWidth(pbitmap) pbitmap[0]
\r
34 #define LBMPutPix(x,y,lbitmap,color) \
\r
35 lbitmap[2 + (x) + (y) * LBMWidth(lbitmap)] = color
\r
37 #define LBMGetPix(x,y,lbitmap) \
\r
38 (lbitmap[2 + (x) + (y) * LBMWidth(lbitmap)])
\r
42 /* FUNCTIONS =========================================================== */
\r
48 int x_pbm_to_bm( /* Convert from planar bitmap to linear */
\r
49 char far * source_pbm,
\r
50 char far * dest_bm);
\r
52 int x_bm_to_pbm( /* Convert from linear bitmap to planar */
\r
53 char far * source_pbm,
\r
54 char far * dest_bm);
\r