home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / amiga / programm / programi / gcc_9112.lzh / include20 / inline / diskfont.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-12-15  |  2.4 KB  |  102 lines

  1. #include <inline/stub.h>
  2. #ifndef BASE_EXT_DECL
  3. #define BASE_EXT_DECL extern struct Library * DiskfontBase;
  4. #endif
  5. #ifndef BASE_PAR_DECL
  6. #define BASE_PAR_DECL
  7. #define BASE_PAR_DECL0 void
  8. #endif
  9. #ifndef BASE_NAME
  10. #define BASE_NAME DiskfontBase
  11. #endif
  12. __inline static struct TextFont* OpenDiskFont(BASE_PAR_DECL struct TextAttr* textAttr)
  13. {
  14.     BASE_EXT_DECL
  15.     register struct TextFont* res __asm("d0");
  16.     register void *a6 __asm ("a6");
  17.     register struct TextAttr* a0 __asm("a0");
  18.  
  19.     a6 = BASE_NAME;
  20.     a0 = textAttr;
  21.     __asm volatile ("
  22.     jsr a6@(-0x1e)"
  23.     : "=g" (res)
  24.     : "g" (a6), "g" (a0)
  25.     : "d0", "d1", "a0", "a1");
  26.     return res;
  27. }
  28. __inline static LONG AvailFonts(BASE_PAR_DECL STRPTR buffer, long int bufBytes, long int flags)
  29. {
  30.     BASE_EXT_DECL
  31.     register LONG res __asm("d0");
  32.     register void *a6 __asm ("a6");
  33.     register STRPTR a0 __asm("a0");
  34.     register long int d0 __asm("d0");
  35.     register long int d1 __asm("d1");
  36.  
  37.     a6 = BASE_NAME;
  38.     a0 = buffer;
  39.     d0 = bufBytes;
  40.     d1 = flags;
  41.     __asm volatile ("
  42.     jsr a6@(-0x24)"
  43.     : "=g" (res)
  44.     : "g" (a6), "g" (a0), "g" (d0), "g" (d1)
  45.     : "d0", "d1", "a0", "a1");
  46.     return res;
  47. }
  48. __inline static struct FontContentsHeader* NewFontContents(BASE_PAR_DECL BPTR fontsLock, STRPTR fontName)
  49. {
  50.     BASE_EXT_DECL
  51.     register struct FontContentsHeader* res __asm("d0");
  52.     register void *a6 __asm ("a6");
  53.     register BPTR a0 __asm("a0");
  54.     register STRPTR a1 __asm("a1");
  55.  
  56.     a6 = BASE_NAME;
  57.     a0 = fontsLock;
  58.     a1 = fontName;
  59.     __asm volatile ("
  60.     jsr a6@(-0x2a)"
  61.     : "=g" (res)
  62.     : "g" (a6), "g" (a0), "g" (a1)
  63.     : "d0", "d1", "a0", "a1");
  64.     return res;
  65. }
  66. __inline static void DisposeFontContents(BASE_PAR_DECL struct FontContentsHeader* fontContentsHeader)
  67. {
  68.     BASE_EXT_DECL
  69.     register void *a6 __asm ("a6");
  70.     register struct FontContentsHeader* a1 __asm("a1");
  71.  
  72.     a6 = BASE_NAME;
  73.     a1 = fontContentsHeader;
  74.     __asm volatile ("
  75.     jsr a6@(-0x30)"
  76.     : /* no output */
  77.     : "g" (a6), "g" (a1)
  78.     : "d0", "d1", "a0", "a1");
  79. }
  80. __inline static struct DiskFontHeader* NewScaledDiskFont(BASE_PAR_DECL struct TextFont* sourceFont, struct TextAttr* destTextAttr)
  81. {
  82.     BASE_EXT_DECL
  83.     register struct DiskFontHeader* res __asm("d0");
  84.     register void *a6 __asm ("a6");
  85.     register struct TextFont* a0 __asm("a0");
  86.     register struct TextAttr* a1 __asm("a1");
  87.  
  88.     a6 = BASE_NAME;
  89.     a0 = sourceFont;
  90.     a1 = destTextAttr;
  91.     __asm volatile ("
  92.     jsr a6@(-0x36)"
  93.     : "=g" (res)
  94.     : "g" (a6), "g" (a0), "g" (a1)
  95.     : "d0", "d1", "a0", "a1");
  96.     return res;
  97. }
  98. #undef BASE_EXT_DECL
  99. #undef BASE_PAR_DECL
  100. #undef BASE_PAR_DECL0
  101. #undef BASE_NAME
  102.