'=========================================================================== ' Subject: PSYCHADELIC ELVIS MOUSEBOY Date: 03-09-96 (13:45) ' Author: Dave Shea Code: QB, PDS ' Origin: FidoNet QUIK_BAS Echo Packet: MOUSE.ABC '=========================================================================== 'Psychadelic Elvis MouseBoy - By Dave Shea 'This is a little demonstation to show you how to customize your mouse 'cursor. Alter it, use it, destroy it, do whatever you want with it. Just 'remember to credit me at least a little bit, eh? Just remember you're using 'this at your own risk... If it radiates your cat, don't blame me.... 'These following lines initiate the mouse setup. Sorry, can't remember what 'everything does... :( '$INCLUDE: 'qb.bi' DIM Cursor%(1000): DIM MaskCursor%(1000): DIM Back%(1000) DIM inreg AS RegType: DIM outreg AS RegType: inreg.ax = 0 CALL INTERRUPT(&H33, inreg, outreg) hmin% = 1: hmax% = 290: inreg.cx = hmin%: inreg.dx = hmax%: inreg.ax = 7 CALL INTERRUPT(&H33, inreg, outreg) vmin% = 1: vmax% = 170: inreg.cx = vmin%: inreg.dx = vmax%: inreg.ax = 8 CALL INTERRUPT(&H33, inreg, outreg) inreg.cx = 0: inreg.dx = 0: inreg.ax = 4 CALL INTERRUPT(&H33, inreg, outreg) CLS : SCREEN 13 'I sure as heck hope I don't need DEFINT A-B 'to explain THIS.... 'This draws & GETS my funky Elvis look-alike PSET (16, 7) DRAW "c161nr2dnrlnd2rdc66rc1dc66nrl1drgdc15nenhr3c66rlc15l3" DRAW "l3c66lrc15r3dnrnldnrnld" DRAW "c16nrnlc44dc1nrld3c161nluc1u2r2d3c161nr " GET (5, 4)-(28, 24), Cursor% 'This draws & GETS a mask of my funky Elvis look-alike 'This is vital, as creating a mask will allow you to place the cursor over 'a background without totally destroying it. FOR a = 1 TO 30 FOR B = 1 TO 30 IF POINT(a, B) = 0 THEN PSET (a, B), 255 IF POINT(a, B) <> 0 AND POINT(a, B) <> 255 THEN PSET (a, B), 0 NEXT NEXT GET (5, 4)-(28, 24), MaskCursor% CLS x = 160: y = 100 FOR a = 1 TO 200 'Shnazzy Background setup-sequence LINE (1, a)-(320, a), a NEXT mouseloop: GET ((x - 1) / 2, y)-((x - 1) / 2 + 25, y + 25), Back% 'Get temp background PUT ((x - 1) / 2, y), MaskCursor%, AND 'Lay down the mask PUT ((x - 1) / 2, y), Cursor%, XOR 'Overlap with Elvis WAIT 986, 8 'Vertical retrace PUT ((x - 1) / 2, y), Back%, PSET 'Restore BackGround 'get mouse location and status 'if outreg.bx=1 then left button is pushed 'if outreg.bx=2 then right button is pushed 'if outreg.bx=3 then both buttons have been pushed inreg.ax = 3 CALL INTERRUPT(&H33, inreg, outreg) x = outreg.cx + 1 y = outreg.dx + 1 IF outreg.bx = 1 THEN PSET ((x - 1) / 2, y), 4 IF outreg.bx = 3 THEN END GOTO mouseloop