summaryrefslogtreecommitdiff
path: root/Source/GetBMHD.S
diff options
context:
space:
mode:
authorChristian A. Weber <chris@gna.ch>1992-05-12 22:26:12 +0000
committerChristian A. Weber <chris@gna.ch>1992-05-12 22:26:12 +0000
commit36c824864c02f0a3f62c8a1d365d1670835c8c96 (patch)
treef3f433e4af522925d4c91f56865d38efaf83a456 /Source/GetBMHD.S
downloadiff-library-36c824864c02f0a3f62c8a1d365d1670835c8c96.tar.gz
iff-library-36c824864c02f0a3f62c8a1d365d1670835c8c96.tar.bz2
iff-library-36c824864c02f0a3f62c8a1d365d1670835c8c96.zip
Initial revision
Diffstat (limited to 'Source/GetBMHD.S')
-rw-r--r--Source/GetBMHD.S71
1 files changed, 71 insertions, 0 deletions
diff --git a/Source/GetBMHD.S b/Source/GetBMHD.S
new file mode 100644
index 0000000..35aec40
--- /dev/null
+++ b/Source/GetBMHD.S
@@ -0,0 +1,71 @@
+**
+** $Id: $
+** $Revision: $
+**
+** $Filename: GetBMHD.S $
+** $Author: Christian A. Weber $
+** $Release: 19.1 $
+** $Date: 92/05/11 21:11:27 $
+**
+** iff.library/IFFLib_GetBMHD
+**
+** COPYRIGHT (C) 1987-1992 BY CHRISTIAN A. WEBER, BRUGGERWEG 2,
+** CH-8037 ZUERICH, SWITZERLAND. ALL RIGHTS RESERVED. NO PART
+** OF THIS SOFTWARE MAY BE COPIED, REPRODUCED, OR TRANSMITTED
+** IN ANY FORM OR BY ANY MEANS, WITHOUT THE PRIOR WRITTEN PER-
+** MISSION OF THE AUTHOR. USE AT YOUR OWN RISK.
+**
+
+
+ IDNT IFFLib_GetBMHD
+ SECTION text,CODE
+
+ INCLUDE "IffLib.i"
+
+ XREF SetError,ClearError,FindChunkFunc
+ XDEF GetBMHDFunc
+
+
+******* iff.library/IFFLib_GetBMHD ******************************************
+*
+* NAME
+* IFFLib_GetBMHD -- find a BitMapHeader of an IFF-file
+*
+* SYNOPSIS
+* header = IFFLib_GetBMHD( ifffile )
+* D0 A1
+*
+* struct BitMapHeader *IFFLib_GetBMHD( IFFFILE )
+*
+* FUNCTION
+* Returns a pointer to a 'BitMapHeader' structure as defined in
+* iff.h and iff.i
+*
+* INPUTS
+* ifffile - IFF file pointer, returned by IFFLib_OpenIFF()
+*
+* RESULTS
+* Pointer to the BitMapHeader, or NULL if no BMHD chunk found
+*
+* SEE ALSO
+* IFFLib_FindChunk(), IFFLib_GetColorTab()
+*
+*****************************************************************************
+
+GetBMHDFunc: movem.l d2/a5-a6,-(SP)
+ movea.l a6,a5 ; IFFBase für ClearError()
+ move.l #'BMHD',d0
+ bsr FindChunkFunc ; setzt Z-Flag wenn not found
+ bne.s 1$ ; Chunk gefunden --->
+ moveq.l #IFF_NOBMHD,d0
+ bsr SetError
+ bra.s 99$
+1$:
+ addq.l #8,d0 ; BMHD.... überspringen
+ move.l d0,d2
+ bsr ClearError
+ move.l d2,d0
+99$: movem.l (SP)+,d2/a5-a6
+ rts
+
+ END