Best thing to do is use the WSPCX.EXE:

 Wserv bitmap and PCX file conversion utility version 3.14a

 WSPCX [-P|-W|-L|-I] [-X<num> -Y<num>] [-I] [-S] <filename> -O<filename>
 Conversion modes
    -W  -   Convert .PIC to .PCX
    -P  -   Convert .PCX to .PIC
    -L  -   Link a list of .PIC files from a .PLK file
    -I  -   Invert image (can be used on .PCX .PIC or during translation)
 Additional options
    -X<num>  -   Clip size on x-axis (.PCX to .PIC only);
    -Y<num>  -   Clip size on y-axis (.PCX to .PIC only);
    -O<name> -   Override default output file name
    -S       -   Silent mode
    -H       -   Full help text

Say you have three images: 1.PIC, 2.PIC, 3.PIC.  Split the images into black and grey PICs only: 1BLACK.PIC, 1GREY.PIC etc.  Say you also have an icon ICON.PIC - split that into IBLACK.PIC and IGREY.PIC.  Then use a TEST.PLK PIC linking script:

IBLACK.PIC
IGREY.PIC
1BLACK.PIC
1GREY.PIC
2BLACK.PIC
2GREY.PIC
3BLACK.PIC
3GREY.PIC

and the command line:
WSPCX -L TEST.PLK -OTEST.PIC

Then to load the images:

    #define BMP_FIRST       0 // Number of first bitmap after the icon
    #define BMP_LAST            5 // Number of last bitmap after the icon

    int iLp ;
    int hBMP[BMP_LAST - BMP_FIRST + 1] ;
    P_POINT bit_size ;

    for ( iLp = BMP_FIRST ; iLp <= BMP_LAST ; iLp++ ) {
        hBMP[iLp] = gOpenBit((TEXT *) DatCommandPtr, 2 + iLp, 0, &bit_size) ;
    }

As always, there's another technique - you can use a single large bitmap, even incorporating black and grey masks - single memory bitmaps can only have one plane anyway - and copy rectangles from it into your other drawables (sprites, windows).

I use a combination of both, usually - I make separate black and grey bitmaps, so that the offsets within a given bitmap are the same.

Cade
