A MOUSE POINTER DESIGNER

by Mark Davis

Design your own stylised pointers with this short, easy-to-use program.

The Archi-medes firmware provides a single standard mouse pointer activated with *Pointer. The operating system permits up to 4 resident pointer definitions of 32 by 32 pixels. The present program makes use of this fact, and allows the creation of user-defined pointers. Perhaps the most important feature of the program is that the data statements for defining the pointer are laid out in such a way that you can easily design your own pointer. At present, the program creates a "RISC USER" pointer as pointer number 2 (line 290), but by using an editor in "over-write" mode you can easily alter the program to suit your own requirements.

The data grid in lines 300-620 is set out as follows: transparent parts of the pointer are represented by dots, while a 1, 2 or / indicate a pixel in one of 3 colours. These are defined (in red green and blue components) in lines 640-660. The only other thing to note is the position of the active part of the pointer (i.e. the part which "points") - in our example it is dead centre. The active point is defined by the position of the two asterisks. The one on the first data line indicates the pixel column of the active point, while the one at the end of the data line (at line 460) indicates the active pixel row. A little experiment should clarify how it all works.

10 REM >Pointer5
20 REM Program User defined pointer
30 REM Version A 0.1
40 REM Author Mark J Davis
50 REM RISC User March 1988
60 REM Program Subject to Copyright
70 :
80 DIM block 10,data 256
90 MODE9:READ number
100 READ A$:xpos=INSTR(A$,"*"):ypos=0
110 FOR X%=0 TO 31:P%=data+X%*8
120 READ A$:FOR Y%=0 TO 7:Q%=0
130 FOR Z%=0 TO 7 STEP 2
140 N%=(ASC MID$(A$,Y%*4+Z%/2+1,1)-46)< 150 Q%=Q%+N%:NEXT Z%:P%?Y%=Q%:NEXT Y%
160 IF RIGHT$(A$,1)="*" THEN ypos=X%
170 NEXT X%
180 ?block=0:block?1=number:block?2=8
190 block?3=&20:block?4=xpos
200 block?5=ypos:block!6=data
210 SYS 7,&15,block
220 *POINTER
230 FOR C%=1 TO 3:READ R%,G%,B%
240 MOUSE COLOUR C%,R%,G%,B%
250 NEXT
260 MOUSE ON 2
270 END
280 :
290 DATA 2 :REM Pointer no.
300 DATA ...............*................
310 DATA //////..///////..////....////...
320 DATA /00000/./00000/./0000/../0000/..
330 DATA /0////0////0////0////0//0////0/.
340 DATA /0/../0/../0/../0/...///0/..///.
350 DATA /0////0/../0/../0////../0/......
360 DATA /00000/.../0/.../0000/./0/......
370 DATA /0//0/..../0/....////0//0/......
380 DATA /0/./0/.../0/..//.../0//0/..///.
390 DATA /0/../0////0////0////0//0////0/.
400 DATA /0/..//0/00000/./0000/../0000/..
410 DATA ///.../////////..////....////...
420 DATA ................................
430 DATA ................................
440 DATA ...............//...............
450 DATA ....///......./11/.......///....
460 DATA .///000///.../1..1/...///000///.*
470 DATA /000///000/../1..1/../000///000/
480 DATA .///...///..../11/....///...///.
490 DATA ...............//...............
500 DATA ................................
510 DATA ................................
520 DATA ///..///..////../////////////...
530 DATA /0/../0/./0000/./000000/00000/..
540 DATA /0/../0//0////0//0//////0////0/.
550 DATA /0/../0//0/...///0/..../0/../0/.
560 DATA /0/../0//0////../0//////0////0/.
570 DATA /0/../0/./0000/./00000//00000/..
580 DATA /0/../0/..////0//0//////0//0/...
590 DATA /0/../0///.../0//0/..../0/./0/..
600 DATA /0////0//0////0//0//////0/../0/.
610 DATA ./0000/../0000/./000000/0/..//0/
620 DATA ..////....////..//////////...///
630 REM Colour Definitions
640 DATA 64,190,220 :REM Colour 0
650 DATA 220,0,64 :REM Colour /
660 DATA 240,240,240 :REM Colour 1