home *** CD-ROM | disk | FTP | other *** search
- \ Copyright 1989 NerveWare
- \ No portion of this code may used for commercial purposes,
- \ nor may any executable version of this code be disributed for
- \ commercial purposes without the author's express written permission.
- \ This code is shareware, all rights reserved.
- \ Nick Didkovsky 2/11/88
-
- \ Change the shape of the mouse pointer
-
- getmodule includes
-
- anew task-mandelmouseptr
-
- variable WaitChipData
- variable CrossHairsChipData
-
- variable WVP \ ViewPortAddress
-
-
- binary
-
- create WaitData
- 0 w, 0 w, \ position, control
-
- 111100000001111 w, $ 0 w,
- 011000010000110 w, $ 0 w,
- 001100111001100 w, $ 0 w,
- 000111101111000 w, $ 0 w,
- 000011000110000 w, $ 0 w,
- 000111101111000 w, $ 0 w,
-
- 000000010000000 w, $ 0 w,
- 000000111000000 w, $ 0 w,
- 000001101100000 w, $ 0 w,
- 000011000110000 w, $ 0 w,
- 000111111111000 w, $ 0 w,
- 001100000001100 w, $ 0 w,
- 001100000001100 w, $ 0 w,
-
- 0 w, 0 w,
-
- 001111111111000 w, $ 0 w,
- 001100110011000 w, $ 0 w,
- 000000110000000 w, $ 0 w,
- 000000110000000 w, $ 0 w,
- 001100110011000 w, $ 0 w,
- 001111111111000 w, $ 0 w,
-
- 0 w, 0 w,
-
- 001111111111000 w, $ 0 w,
- 001100110011000 w, $ 0 w,
- 000000110000000 w, $ 0 w,
- 000000110000000 w, $ 0 w,
- 000000110000000 w, $ 0 w,
- 000000110000000 w, $ 0 w,
- 000001111000000 w, $ 0 w,
-
- 0 w, 0 w,
-
- \ end of WaitData
-
- decimal
-
- HERE WaitData - constant WaitDataSize
-
-
- create CrossHairsData
- 0 w, 0 w, \ position, control
-
- $ 0140 w, $ 0140 w,
- $ 0140 w, $ 0140 w,
- $ 0140 w, $ 0140 w,
- $ 0140 w, $ 0140 w,
- $ 0140 w, $ 0140 w,
-
- $ 7F7F w, $ 7F7F w,
-
- $ 0 w, $ 0 w,
-
- $ 7F7F w, $ 7F7F w,
-
- $ 0140 w, $ 0140 w,
- $ 0140 w, $ 0140 w,
- $ 0140 w, $ 0140 w,
- $ 0140 w, $ 0140 w,
- $ 0140 w, $ 0140 w,
-
- 0 w, 0 w,
-
- \ end of CrossHairsData
-
- HERE CrossHairsData - constant CrossHairsDataSize
-
- \ Sprite Data MUST be in CHIP RAM!
-
- : ALLOC.MOUSE.SPACE ( -- )
- WaitChipData off
- MEMF_CHIP MEMF_CLEAR | WaitDataSize AllocBlock ?dup
- IF WaitChipData ! ( rel-data-addr)
- ELSE ." Not enough CHIP ram for wait pointer!" cr ABORT
- THEN
- CrossHairsChipData off
- MEMF_CHIP MEMF_CLEAR | CrossHairsDataSize AllocBlock ?dup
- IF CrossHairsChipData ! ( rel-data-addr)
- ELSE ." Not enough CHIP ram for crosshairs pointer!" cr ABORT
- THEN
- ;
-
-
- \ Used after successful CHIP ram allocation, copy data to CHIP ram
-
- : COPY.MOUSE.SPRITE.DATA ( -- )
- Waitdata WaitChipData @ WaitDataSize MOVE
- CrossHairsData CrossHairsChipData @ CrossHairsDataSize MOVE
- ;
-
- : GetWVP
- gr-curwindow @ >abs call intuition_lib ViewPortAddress WVP !
- ;
-
- : WAIT.POINTER ( -- )
- gr-curwindow @ >abs WaitChipData @ >abs 28 15 -7 -7
- callvoid intuition_lib SetPointer
- ;
-
- : CROSSHAIRS.POINTER ( -- )
- gr-curwindow @ >abs CrossHairsChipData @ >abs 13 15 -11 -7
- callvoid intuition_lib SetPointer
- ;
-
- : NORMAL.POINTER ( -- )
- gr-curwindow @ >abs callvoid intuition_lib ClearPointer
- ;
-
- : MOUSE.PTR.INIT ( -- )
- WaitChipData off
- CrossHairsChipData off
- alloc.mouse.space
- copy.mouse.sprite.data
- ;
-
- : FREE.MOUSE.DATA ( -- )
- WaitChipData @ ?dup IF freeblock WaitChipData off THEN
- CrossHairsChipData @ ?dup IF freeblock CrossHairsChipData off THEN
- ." Mouse pointer chip data freed" cr
- ;
-