home *** CD-ROM | disk | FTP | other *** search
- FUNCTION getbitmap() - allocate and initialize an arbitrary bitmap
-
- struct BitMap *getbitmap(depth, width, height)
- int depth, width, height;
-
- This function will return a pointer to a bitmap of your specified
- depth, width, and height. It will return NULL if any of the memory
- allocations fail (of course taking care to free any memory it has already
- allocated).
-
- Note that the depth variable has a maximum value of 8. If you ask for
- more, the call will fail immediately.
-
- In this example, we will allocate a secondary 3 bitplane bitmap of
- 100x75 pixels. This could be very useful for calls to BltBitMap() :
-
- struct BitMap *bm;
-
- bm = getbitmap(3, 100, 75);
- if (bm == NULL)
- no_bitmap();
-
- /* continue doing stuff ... */
-
- /* free up all that allocated memory */
- free_bitmap(bm, 100, 75);
-
- This call is basically useful for allocating backup storage for making
- calls to BltBitMap() (or its cousins). Just remember to check the error
- return, and other than that you get a fully initialized and allocated
- bitmap structure to your specs! ;^)
-
- TODO : can't think of much else....
-
- BUGS : what's up doc?
-
- ELMER FUDD : come here you silly wabbit!
-
- SEE ALSO : free_bitmap(), makescreen()
-
-