Picture Resource File.
More...
Picture Resource File.
All graphics are stored in the PICS resource file. This is the accessor code to all those pictures. Pictures can be locked as a picture or locked as just a raw data file.
- See Also
- http://www.amuletsandarmor.com/AALicense.txt
PictureExist determines if a the given name corresponds to a picture in the picture resource file.
- Parameters
-
name | – Name of picture to check for existance |
- Returns
- TRUE = found, FALSE = not found
PictureFind finds the corresponding resource handle for the given resource name.
- Parameters
-
name | – Name of resource to find. |
- Returns
- Corresponding resource handle or RESOURCE_BAD
PictureGetHeight returns the picture height
- Parameters
-
p_picture | – Pointer to the picture to get size of |
- Returns
- picture height
PictureGetName returns a pointer to the picture's stub name (without sub-directory info.)
- Parameters
-
p_picture | – Pointer to the picture |
- Returns
- Found name
PictureGetWidth returns the pictures with.
- Parameters
-
p_picture | – Pointer to the picture to get size of |
- Returns
- picture width
PictureGetXY size gets the size of the picture and returns it by reference.
- Parameters
-
p_picture | – Pointer to the picture to get size of |
sizeX | – Get the size of the picture in the X |
sizeY | – Get the size of the picture in the Y |
PictureLockData is the same as PictureLock except that it is used to lock non-pictures in the picture database. Therefore, all of the data is available (pictures skip some bytes at the beginning).
- Parameters
-
name | – Name of resource to load |
res | – Pointer to resource to record where the resource came from. Is used by PictureUnlock. |
- Returns
- Pointer to picture data.
PictureLockQuick is a simpler lock routine for a picture since it takes the resource handle of an already found picture (from PictureFind).
NOTE: Do NOT call GrDrawBitmap (or similar) with the returned pointer from this routine. Use PictureToBitmap to get the correct pointer.
- Parameters
-
res | – Resource of picture to lock. |
- Returns
- Pointer to resource data.
PictureLockQuick is a simpler lock routine for a picture since it takes the resource handle of an already found picture (from PictureFind).
NOTE: Do NOT call GrDrawBitmap (or similar) with the returned pointer from this routine. Use PictureToBitmap to get the correct pointer.
- Parameters
-
res | – Resource of picture to lock. |
- Returns
- Pointer to resource data.
PicturePrint prints out the structure related to the given picture to the given output.
- Parameters
-
fp | – File to output picture info |
p_pic | – Picture to print |
PicturesDump outputs the picture index file.
PicturesFinish is called when the pictures resource file is no longer needed (typically when exiting the program). When this occurs, the resource file is closed out.
PicturesInitialize opens up the picture database in preparation for all future picture locking and unlocking.
PictureToBitmap converts a picture pointer (from PictureLock) into a corresponding bitmap pointer for use by the graphic drawing routines.
NOTE: Make sure you ONLY pass a pointer from PictureLock or PictureLockQuick
- Parameters
-
- Returns
- Pointer to bitmap
PictureUnfind removes all references to the given resource picture.
- Parameters
-
PictureUnlock removes a picture that was in memory.
- Parameters
-
res | – Resource to the picture. |
PictureUnlockAndUnfind does a PictureUnlock and then a PictureUnfind.
- Parameters
-
res | – Resource to unlock and unfind |