1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
**
** $Id: GetBMHD.S,v 21.1 92/05/15 03:21:31 chris Exp $
** $Revision: 21.1 $
**
** $Filename: GetBMHD.S $
** $Author: chris $
** $Date: 92/05/15 03:21:31 $
**
** iff.library/IFFL_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 IFFL_GetBMHD
SECTION text,CODE
INCLUDE "IffLib.i"
XREF SetError,ClearError,FindChunkFunc
XDEF GetBMHDFunc
******* iff.library/IFFL_GetBMHD ********************************************
*
* NAME
* IFFL_GetBMHD -- find a BitMapHeader of an IFF-file
*
* SYNOPSIS
* header = IFFL_GetBMHD( iff )
* D0 A1
*
* struct BitMapHeader *IFFL_GetBMHD( IFFL_HANDLE )
*
* FUNCTION
* Returns a pointer to a BMHD (BitMapHeader) structure as defined
* in iff.h and iff.i
*
* INPUTS
* iff - IFF file handle, from IFFL_OpenIFF()
*
* RESULTS
* Pointer to the BitMapHeader, or NULL if no BMHD chunk found
*
* SEE ALSO
* IFFL_FindChunk(), IFFL_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 #IFFL_ERROR_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
|