2019-06-29 22:17:03 +08:00

115 lines
2.4 KiB
Plaintext

; Version: 3.07
; Created: Friday, October 20, 1989 at 9:35:40 PM
;
; File: PickerEqu.a
;
; Assembler Interface to the Macintosh Libraries
; Copyright Apple Computer, Inc. 1987-1988
; All Rights Reserved
;
;--------------------------------------------------------------------
IF &TYPE('__IncludingPickerEqu__') = 'UNDEFINED' THEN
__IncludingPickerEqu__ SET 1
MaxSmallFract EQU $0000FFFF ; Maximum small fract value, as LONGINT
; For developmental simplicity in switching between the HLS and HSV
; models, HLS is reordered into HSL. Thus both models start with
; hue and saturation values; value/lightness/brightness is last.
HSVColor RECORD 0
hue DS.W 1 ; Fraction of circle, red at 0
saturation DS.W 1 ; 0-1, 0 for gray, 1 for pure color
value DS.W 1 ; 0-1, 0 for black, 1 for max intensity
ENDR
HSLColor RECORD 0
hue DS.W 1 ; Fraction of circle, red at 0
saturation DS.W 1 ; 0-1, 0 for gray, 1 for pure color
lightness DS.W 1 ; 0-1, 0 for black, 1 for white
ENDR
CMYColor RECORD 0
cyan DS.W 1
magenta DS.W 1
yellow DS.W 1
ENDR
; Selectors for color picker macros:
fix2SmallFract EQU 1
smallFract2Fix EQU 2
cmy2RGB EQU 3
rgb2CMY EQU 4
hsl2RGB EQU 5
rgb2HSL EQU 6
hsv2RGB EQU 7
rgb2HSV EQU 8
getColor EQU 9
MACRO
_Fix2SmallFract
MOVE.W #fix2SmallFract,-(SP)
DC.W $A82E ; _Pack12
ENDM
MACRO
_SmallFract2Fix
MOVE.W #smallFract2Fix,-(SP)
DC.W $A82E ; _Pack12
ENDM
MACRO
_CMY2RGB
MOVE.W #cmy2RGB,-(SP)
DC.W $A82E ; _Pack12
ENDM
MACRO
_RGB2CMY
MOVE.W #rgb2CMY,-(SP)
DC.W $A82E ; _Pack12
ENDM
MACRO
_HSL2RGB
MOVE.W #hsl2RGB,-(SP)
DC.W $A82E ; _Pack12
ENDM
MACRO
_RGB2HSL
MOVE.W #rgb2HSL,-(SP)
DC.W $A82E ; _Pack12
ENDM
MACRO
_HSV2RGB
MOVE.W #hsv2RGB,-(SP)
DC.W $A82E ; _Pack12
ENDM
MACRO
_RGB2HSV
MOVE.W #rgb2HSV,-(SP)
DC.W $A82E ; _Pack12
ENDM
MACRO
_GetColor
MOVE.W #getColor,-(SP)
DC.W $A82E ; _Pack12
ENDM
ENDIF ; ...already included