mirror of
https://github.com/elliotnunn/mac-rom.git
synced 2024-12-29 07:29:15 +00:00
0ba83392d4
Resource forks are included only for .rsrc files. These are DeRezzed into their data fork. 'ckid' resources, from the Projector VCS, are not included. The Tools directory, containing mostly junk, is also excluded.
139 lines
3.2 KiB
Plaintext
139 lines
3.2 KiB
Plaintext
;EASE$$$ READ ONLY COPY of file ÒLCURSOR.m.aÓ
|
|
; 1.1 CCH 11/11/1988 Fixed Header.
|
|
; 1.0 CCH 11/ 9/1988 Adding to EASE.
|
|
; OLD REVISIONS BELOW
|
|
; 1.2 CCH 10/12/1988 Changed Òm.GrafType.aÓ to ÒGrafType.m.aÓ.
|
|
; 1.1 MSH 5/18/88 Changed inclides to use m.GRAPHTYPES to work under EASE.
|
|
; 1.0 BBM 2/11/88 Adding file for the first time into EASEÉ
|
|
; END EASE MODIFICATION HISTORY
|
|
|
|
|
|
BLANKS ON
|
|
STRING ASIS
|
|
|
|
INCLUDE 'GRAFTYPES.m.a'
|
|
|
|
;------------------------------------------------------------------
|
|
;
|
|
; --> LCURSOR.TEXT
|
|
;
|
|
; Links to MacIntosh Cursor routines.
|
|
;
|
|
; System Graphic Jump Vectors:
|
|
;
|
|
; Long pointers to system routine entry points.
|
|
;
|
|
GRAFBEGIN EQU $800 ;GRAF GLOBAL AREA
|
|
JHIDECURSOR EQU GRAFBEGIN
|
|
JSHOWCURSOR EQU JHIDECURSOR+4
|
|
JSHIELDCURSOR EQU JSHOWCURSOR+4
|
|
JSCRNADDR EQU JSHIELDCURSOR+4 ;not used (see _GetScrnBits)
|
|
JSCRNSIZE EQU JSCRNADDR+4 ;not used (see _GetScrnBits)
|
|
JINITCRSR EQU JSCRNSIZE+4
|
|
JSETCRSR EQU JINITCRSR+4
|
|
JCRSROBSCURE EQU JSETCRSR+4
|
|
|
|
|
|
|
|
|
|
InitCursor PROC EXPORT
|
|
IMPORT SetCursor
|
|
;----------------------------------------------------------
|
|
;
|
|
; PROCEDURE InitCursor;
|
|
;
|
|
MOVE.L GRAFGLOBALS(A5),A0 ;POINT TO QUICKDRAW GLOBALS
|
|
PEA ARROW(A0) ;PUSH ADDR OF ARROW
|
|
JSR SETCURSOR ;INSTALL ARROW CURSOR
|
|
MOVE.L JInitCrsr,A0 ;get lo mem pointer
|
|
JMP (A0) ;and call it
|
|
|
|
|
|
|
|
SetCursor PROC EXPORT
|
|
;---------------------------------------------------
|
|
;
|
|
; PROCEDURE SetCursor(crsr: Cursor);
|
|
;
|
|
MOVE.L 4(SP),A0 ;Point to Cursor
|
|
MOVE.L HOTSPOT+V(A0),-(SP) ;PUSH HOTX & HOTY
|
|
MOVE #16,-(SP) ;HEIGHT:=16
|
|
PEA DATA(A0) ;PUSH ADDR OF DATA
|
|
PEA MASK(A0) ;PUSH ADDR OF MASK
|
|
MOVE.L JSetCrsr,A0 ;get lo mem vector
|
|
JSR (A0) ;call vector
|
|
MOVE.L (SP)+,(SP) ;strip param
|
|
RTS ;and return
|
|
|
|
|
|
|
|
HideCursor PROC EXPORT
|
|
;---------------------------------------------------------
|
|
;
|
|
; PROCEDURE HideCursor;
|
|
;
|
|
; ALL REGS PRESERVED.
|
|
;
|
|
MOVE.L JHideCursor,-(SP) ;get lo mem vector
|
|
RTS ;and call it
|
|
|
|
|
|
|
|
ShowCursor PROC EXPORT
|
|
;---------------------------------------------------------
|
|
;
|
|
; PROCEDURE ShowCursor;
|
|
;
|
|
; ALL REGS PRESERVED.
|
|
;
|
|
MOVE.L JShowCursor,-(SP) ;get lo mem vector
|
|
RTS ;and call it
|
|
|
|
|
|
|
|
ShieldCursor PROC EXPORT
|
|
;---------------------------------------------------------
|
|
;
|
|
; PROCEDURE ShieldCursor(shieldRect: Rect; offset: Point);
|
|
;
|
|
; ALL REGS PRESERVED.
|
|
;
|
|
MOVEM.L D0-D3/A0-A1,-(SP) ;SAVE REGS
|
|
MOVE.L 32(SP),A0 ;POINT TO SHIELDRECT
|
|
MOVEM.W (A0)+,D0/D1/D2/D3 ;GET TOP ... RIGHT
|
|
LEA 28(SP),A1
|
|
SUB (A1),D0 ;TOP - OFFSET.V
|
|
SUB (A1)+,D2 ;BOTTOM - OFFSET.V
|
|
SUB (A1),D1 ;LEFT - OFFSET.H
|
|
SUB (A1),D3 ;RIGHT - OFFSET.H
|
|
MOVE D1,-(SP) ;PUSH GLOBAL LEFT
|
|
MOVE D0,-(SP) ;PUSH GLOBAL TOP
|
|
MOVE D3,-(SP) ;PUSH GLOBAL RIGHT
|
|
MOVE D2,-(SP) ;PUSH GLOBAL BOTTOM
|
|
MOVE.L JShieldCursor,A0 ;get lo mem vector
|
|
JSR (A0) ;and call it
|
|
MOVEM.L (SP)+,D0-D3/A0-A1 ;RESTORE REGS
|
|
MOVE.L (SP)+,(SP)
|
|
MOVE.L (SP)+,(SP) ;STRIP 8 BYTES
|
|
RTS ;AND RETURN
|
|
|
|
|
|
|
|
ObscureCursor PROC EXPORT
|
|
;---------------------------------------------------------
|
|
;
|
|
; PROCEDURE ObscureCursor;
|
|
;
|
|
; Hide the cursor image until the next time the mouse moves.
|
|
;
|
|
MOVE.L JCrsrObscure,A0 ;get lo mem vector
|
|
JMP (A0) ;and call it
|
|
|
|
|
|
|
|
|
|
END
|
|
|
|
|
|
|