home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD1.bin / gnu / os-include / inline / colorwheel.h < prev    next >
C/C++ Source or Header  |  1994-09-22  |  1KB  |  57 lines

  1. #ifndef _INLINE_COLORWHEEL_H
  2. #define _INLINE_COLORWHEEL_H
  3.  
  4. #include <sys/cdefs.h>
  5. #include <inline/stubs.h>
  6.  
  7. __BEGIN_DECLS
  8.  
  9. #ifndef BASE_EXT_DECL
  10. #define BASE_EXT_DECL
  11. #define BASE_EXT_DECL0 extern struct Library * ColorWheelBase;
  12. #endif
  13. #ifndef BASE_PAR_DECL
  14. #define BASE_PAR_DECL
  15. #define BASE_PAR_DECL0 void
  16. #endif
  17. #ifndef BASE_NAME
  18. #define BASE_NAME ColorWheelBase
  19. #endif
  20.  
  21. BASE_EXT_DECL0
  22.  
  23. extern __inline void 
  24. ConvertHSBToRGB (BASE_PAR_DECL struct ColorWheelHSB *hsb,struct ColorWheelRGB *rgb)
  25. {
  26.   BASE_EXT_DECL
  27.   register struct Library *a6 __asm("a6") = BASE_NAME;
  28.   register struct ColorWheelHSB *a0 __asm("a0") = hsb;
  29.   register struct ColorWheelRGB *a1 __asm("a1") = rgb;
  30.   __asm __volatile ("jsr a6@(-0x1e)"
  31.   : /* no output */
  32.   : "r" (a6), "r" (a0), "r" (a1)
  33.   : "a0","a1","d0","d1", "memory");
  34. }
  35. extern __inline void 
  36. ConvertRGBToHSB (BASE_PAR_DECL struct ColorWheelRGB *rgb,struct ColorWheelHSB *hsb)
  37. {
  38.   BASE_EXT_DECL
  39.   register struct Library *a6 __asm("a6") = BASE_NAME;
  40.   register struct ColorWheelRGB *a0 __asm("a0") = rgb;
  41.   register struct ColorWheelHSB *a1 __asm("a1") = hsb;
  42.   __asm __volatile ("jsr a6@(-0x24)"
  43.   : /* no output */
  44.   : "r" (a6), "r" (a0), "r" (a1)
  45.   : "a0","a1","d0","d1", "memory");
  46. }
  47.  
  48. #undef BASE_EXT_DECL
  49. #undef BASE_EXT_DECL0
  50. #undef BASE_PAR_DECL
  51. #undef BASE_PAR_DECL0
  52. #undef BASE_NAME
  53.  
  54. __END_DECLS
  55.  
  56. #endif /* _INLINE_COLORWHEEL_H */
  57.