]> 4ch.mooo.com Git - 16.git/blob - 16/xlib/xbmtools.h
16_ca needs huge amounts of work and I should remember what needs to be done soon...
[16.git] / 16 / xlib / xbmtools.h
1 /*-----------------------------------------------------------------------\r
2 ;\r
3 ; XPOINT - header file\r
4 ;\r
5 ;\r
6 ;\r
7 ; ****** XLIB - Mode X graphics library                ****************\r
8 ; ******                                               ****************\r
9 ; ****** Written By Themie Gouthas                     ****************\r
10 ;\r
11 ; Macros written by Mathew Mackenzie\r
12 ;\r
13 ; egg@dstos3.dsto.gov.au\r
14 ; teg@bart.dsto.gov.au\r
15 ;\r
16 ;  Terminology & notes:\r
17 ;         VRAM ==   Video RAM\r
18 ;         SRAM ==   System RAM\r
19 ;         X coordinates are in pixels unless explicitly stated\r
20 ;\r
21 ;-----------------------------------------------------------------------*/\r
22 \r
23 #ifndef _XBMTOOLS_H_\r
24 #define _XBMTOOLS_H_\r
25 \r
26 #define BM_WIDTH_ERROR 1\r
27 \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
33 \r
34 #define LBMPutPix(x,y,lbitmap,color)  \\r
35         lbitmap[2 + (x) + (y) * LBMWidth(lbitmap)] = color\r
36 \r
37 #define LBMGetPix(x,y,lbitmap)  \\r
38         (lbitmap[2 + (x) + (y) * LBMWidth(lbitmap)])\r
39 \r
40 \r
41 \r
42 /* FUNCTIONS =========================================================== */\r
43 \r
44 #ifdef __cplusplus\r
45 extern "C" {\r
46 #endif\r
47 \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
51 \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
55 \r
56 #ifdef __cplusplus\r
57 }\r
58 #endif\r
59 \r
60 \r
61 #endif\r
62 \r
63 \r