home *** CD-ROM | disk | FTP | other *** search
- /*
- * inline_iff.h
- *
- * Created: Mon Jul 06 21:23:21 1992 too
- * Last modified: Tue Sep 08 16:27:56 1992 too
- *
- */
- #ifndef __INLINE_IFF_H
- #define __INLINE_IFF_H
-
- #include <inline/stubs.h>
-
- __BEGIN_DECLS
-
- #ifndef BASE_EXT_DECL
- #define BASE_EXT_DECL extern struct Library * IFFBase;
- #endif
- #ifndef BASE_PAR_DECL
- #define BASE_PAR_DECL
- #define BASE_PAR_DECL0 void
- #endif
- #ifndef BASE_NAME
- #define BASE_NAME IFFBase
- #endif
-
- static __inline void
- IFFL_CloseIFF(BASE_PAR_DECL IFFL_HANDLE iff)
- {
- BASE_EXT_DECL
- register void * a6 __asm ("a6");
- register IFFL_HANDLE a1 __asm ("a1");
-
- a6 = BASE_NAME;
- a1 = iff;
- __asm volatile ("
- jsr a6@(-0x24)"
- : /* no output */
- : "r" (a6), "r" (a1)
- : "d0", "d1", "a0", "a1");
- }
-
- static __inline BOOL
- IFFL_DecodePic(BASE_PAR_DECL IFFL_HANDLE iff, struct BitMap *bitmap)
- {
- BASE_EXT_DECL
- register BOOL res __asm ("d0");
- register void * a6 __asm ("a6");
- register IFFL_HANDLE a1 __asm ("a1");
- register struct BitMap * a0 __asm ("a0");
-
- a6 = BASE_NAME;
- a1 = iff;
- a0 = bitmap;
- __asm volatile ("
- jsr a6@(-0x3c)"
- : "=r" (res)
- : "r" (a6), "r" (a1), "r" (a0)
- : "d0", "d1", "a0", "a1");
- return res;
- }
-
- static __inline struct IFFL_BMHD *
- IFFL_GetBMHD(BASE_PAR_DECL IFFL_HANDLE iff)
- {
- BASE_EXT_DECL
- register struct IFFL_BMHD * res __asm ("d0");
- register void * a6 __asm ("a6");
- register IFFL_HANDLE a1 __asm ("a1");
-
- a6 = BASE_NAME;
- a1 = iff;
- __asm volatile ("
- jsr a6@(-0x30)"
- : "=r" (res)
- : "r" (a6), "r" (a1)
- : "d0", "d1", "a0", "a1");
- return res;
- }
-
- static __inline IFFL_HANDLE
- IFFL_OpenIFF(BASE_PAR_DECL char *filename, ULONG mode)
- {
- BASE_EXT_DECL
- register IFFL_HANDLE res __asm ("d0");
- register void * a6 __asm ("a6");
- register char * a0 __asm ("a0");
- register ULONG d0 __asm ("d0");
-
- a6 = BASE_NAME;
- a0 = filename;
- d0 = mode;
- __asm volatile ("
- jsr a6@(-0x78)"
- : "=r" (res)
- : "r" (a6), "r" (a0), "r" (d0)
- : "d0", "d1", "a0", "a1");
- return res;
- }
-
- static __inline BOOL
- IFFL_SaveBitMap(BASE_PAR_DECL char *filename, struct BitMap *bitmap, WORD *colortable, LONG flags)
- {
- BASE_EXT_DECL
- register BOOL res __asm ("d0");
- register void * a6 __asm ("a6");
- register char * a0 __asm ("a0");
- register struct BitMap* a1 __asm ("a1");
- register WORD * a2 __asm ("a2");
- register LONG d0 __asm ("d0");
-
- a6 = BASE_NAME;
- a0 = filename;
- a1 = bitmap;
- a2 = colortable;
- d0 = flags;
- __asm volatile ("
- jsr a6@(-0x42)"
- : "=r" (res)
- : "r" (a6), "r" (a0), "r" (a1), "r" (a2), "r" (d0)
- : "d0", "d1", "a0", "a1");
- return res;
- }
-
- #undef BASE_EXT_DECL
- #undef BASE_PAR_DECL
- #undef BASE_PAR_DECL0
- #undef BASE_NAME
-
- __END_DECLS
-
- #endif /* _INLINE_IFF_H */
-