home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 607.lha / PointerX_v2.0 / PointerX.Doc.pp / PointerX.Doc
Encoding:
Text File  |  1992-01-19  |  2.5 KB  |  68 lines

  1.  
  2.     PointerX V2.0, by Steve Tibbett
  3.  
  4.  
  5. The Program
  6. -----------
  7. PointerX - Spins the hands of any pointer that looks like the 
  8. standard 2.0 Workbench Busy pointer.  PointerX only runs under
  9. Kickstart 2.0.
  10.  
  11. This means it will spin not just the WB pointer, but your programs
  12. too - If you use the right pointer.  The pointer as given below in
  13. Source is the one used by 2.0 WB (this data is from a posting on bix),
  14. and you can use it in your own programs too to get the same effect 
  15. there.
  16.  
  17. PointerX 2.0 now also has another hand - a short hand - that counts
  18. the number of sweeps the long hand makes.  And as an added bonus,
  19. whenever a program sets the busy pointer, the hands start off at
  20. 12 o'clock again.  And PointerX 2.0 is under 2300 bytes bytes,
  21. less than half the size of the previous version.
  22.  
  23. To install PointerX just drop it's icon in your WBStartup drawer 
  24. and reboot (or double-click on it) - and it will be active for the
  25. rest of the current session.
  26.  
  27. That's all there is to it!
  28.  
  29. PointerX is written by Steve Tibbett, and is placed in the Public Domain.  
  30. You can reach me on Portal as STEVEX, Bix as s.tibbett, Usenet as 
  31. cognos!alzabo!omx!stevex, on my BBS at 613-731-3419, or by Phone at 
  32. 613-731-5316 in the evenings.
  33.  
  34.  
  35. How it works
  36. ------------
  37. PointerX has 32 images of the long hand, and 24 images of the short
  38. hand, (just the areas that change), and it combines those images with
  39. a stock pointer image to build the image it needs.  
  40.  
  41. PointerX uses the SetPointer() vector to replace any requests to set
  42. a pointer that looks like the standard clock pointer with PointerX's
  43. own internal pointer, which it updates every second vertical blank
  44. (during the vertical blank interrupt).  
  45.  
  46. The code is written in rather efficient assembler, and only kicks in
  47. every second vertical blank, so the time it takes should be immeasurable.
  48.  
  49. The Pointer
  50. -----------
  51. static USHORT __chip BusyPointerData[] = 
  52.     {
  53.     0x0000,0x0000,
  54.     0x0400,0x07C0,0x0000,0x07C0,0x0100,0x0380,0x0000,0x07E0,
  55.     0x07C0,0x1FF8,0x1FF0,0x3FEC,0x3FF8,0x7FDE,0x3FF8,0x7FBE,
  56.     0x7FFC,0xFF7F,0x7EFC,0xFFFF,0x7FFC,0xFFFF,0x3FF8,0x7FFE,
  57.     0x3FF8,0x7FFE,0x1FF0,0x3FFC,0x07C0,0x1FF8,0x0000,0x07E0,
  58.     0x0000,0x0000,
  59.     };
  60.  
  61. SetPointer(Win, BusyPointerData, 16, 16, -6, 0);
  62.  
  63. Use this call, and that data, to get the proper pointer and you'll look
  64. like a real 2.0 program (all good programs use a busy pointer when they
  65. don't accept user input - they also turn off all their window gadgets
  66. so the users don't get confused), and if PointerX is running, it's hands
  67. will spin!
  68.