home *** CD-ROM | disk | FTP | other *** search
/ Esprit de Apple Corps / EDAC-2.iso / Graphics / Apps / Programs / SuperMagic3 / SM.DOC < prev    next >
Encoding:
Text File  |  1991-12-08  |  4.7 KB  |  249 lines

  1. *------------------------------------------------------
  2. *
  3. * Super Magic 3  Documentation (beta)
  4. *
  5. * Written by: Lim Thye Chean
  6. *
  7. *
  8. * Super Magic 3 is a macro programming tools for ORCA/M
  9. * programmers. It allows programmers to create fast
  10. * animation on the Apple IIGS, using simple macros.
  11. *
  12. * The demo s320.e is included. It demonstrate the power
  13. * of Super Magic 3. You can study the s320.asm source
  14. * code, and write your own program.
  15. *
  16. * To use Super Magic 3, includes
  17. *
  18. * 1. mcopy sm.macros
  19. *    at the beginning of your program.
  20. *
  21. * 2. mcopy sm.header
  22. *    at the beginning of your program.
  23. *
  24. * 3. append sm.lib
  25. *    at the end of your program.
  26. *
  27. *
  28. * Super Magic 3 is freeware. It is written by an author
  29. * who loves programming on the Apple IIGS. If you have
  30. * any suggestions or questions, or simply like this
  31. * program, please write your suggestions, questions,
  32. * letter of encouragement, or send anything useful
  33. * to the following address:
  34. *
  35. * Bitnet: issltc@nusvm.bitnet
  36. * Internet: ltchean.iss.nus.sg
  37. * Address: 9, College Green, Singapore 1129
  38. *
  39. * Apple IIGS Forever! - GS Lover Lim Thye Chean
  40. *
  41. * Note: Lim is my surname. Thye Chean is my name.
  42. *
  43. *------------------------------------------------------
  44. *
  45. * Below are the Super Magic 3 macros.
  46. *
  47. * {..} means optional
  48. *
  49. * (..) means argument
  50. *        (pt): Registers x, y protection. Default: yes
  51. *              To overwrite, put pt='no'
  52. *        (ol): Overlay. Default: no
  53. *              To overwrite, put ol='yes'
  54. *        (yc): Y clipping. Default: yes
  55. *              To overwrite, put yc='no'
  56. *
  57.  
  58. startUp
  59.  
  60.          Start up Super Magic.
  61.  
  62.  
  63. shutDown
  64.  
  65.          Shut down Super Magic.
  66.  
  67.  
  68. superHires
  69.  
  70.          Switch on Super Hires display.
  71.  
  72.  
  73. text
  74.          Switch on Text display.
  75.  
  76.  
  77. plotPixel x, y, colour
  78.  
  79.          Plot pixel.
  80.  
  81.  
  82. erasePixel x, y
  83.  
  84.          Erase pixel to colour 0.
  85.  
  86.  
  87. erasePixelFast x, y
  88.  
  89.          Erase pixel to colour 0 fast. Background is destroyed.
  90.  
  91.  
  92. showPixel x, y
  93.  
  94.          Show pixel
  95.  
  96.  
  97. plotHorLine x1, x2, y, colour
  98.  
  99.          Plot a horizontal line from (x1, y) to (x2, y).
  100.          X1 and X2 are constants. X1 is even, X2 is odd.
  101.  
  102.  
  103. plotVerLine x, y1, y2, colour
  104.  
  105.          Plot a vertical line from (x, y1) to (x, y2).
  106.          Y1 and Y2 are constants.
  107.  
  108.  
  109. plotShape x, y, width, height, shape, {mask}, {background}, (protected)
  110.  
  111.          Plot a shape,
  112.          If mask is undefined, no mask is used.
  113.          If background is undefined, no background is saved.
  114.  
  115.  
  116. eraseShape x, y, width, height, {background}, (pt)
  117.  
  118.          Erase a shape.
  119.          If background is undefined, shape is erased by colour 0.
  120.  
  121.  
  122. showShape x, y, width, height, (pt)
  123.  
  124.          Show a shape.
  125.  
  126.  
  127. showFullShape x, y, width, height, (pt)
  128.  
  129.          Show a shape with border of 2 pixels on all sides.
  130.  
  131.  
  132. cycleLeft palette, colour1, colour2
  133.  
  134.          Colour cycle to the left of palette.
  135.          If colour number is defined, range within colour 1 and 2 is cycled.
  136.            Colour 1 < Colour 2.
  137.          If colour number is undefined, whole palette is cycled.
  138.  
  139.  
  140. cycleRight palette, colour1, colour2
  141.  
  142.          Colour cycle to the right of palette.
  143.          If colour number is defined, range within colour 1 and 2 is cycled.
  144.            Colour 1 < Colour 2.
  145.          If colour number is undefined, whole palette is cycled.
  146.  
  147.  
  148. gradientFill palette, gradient colour
  149.  
  150.          Gradient fill the palette.
  151.  
  152.  
  153. setFont font, width, height
  154.  
  155.          Set a font to be used by Super Magic.
  156.  
  157.  
  158. setStandardColour
  159.  
  160.          Set standard colour in all palettes.
  161.  
  162.  
  163. setAllPalette0
  164.  
  165.          Set all lines to palette 0.
  166.  
  167.  
  168. setColour palette, colour, RGB
  169.  
  170.          Set a colour in palette to be a RGB value.
  171.          If RGB is undefined, accumulator is used.
  172.  
  173.  
  174. getColour palette, colour
  175.  
  176.          Get the RGB value from the colour in the palette.
  177.          Output is stored in accumulator.
  178.  
  179.  
  180. print x, y, message, colour, (pt), (ol), (yc)
  181.  
  182.          Print a message.
  183.  
  184.  
  185. centrePrint y, message, colour, (pt), (ol)
  186.  
  187.          Centralize print
  188.  
  189.  
  190. clearScreen {colour}
  191.  
  192.          Clear the screen.
  193.          If colour is undefined, colour 0 is used.
  194.  
  195.  
  196. clearArea Y1, Y2, (pt).
  197.  
  198.          Clear an area from (0, Y1) to (319, Y2).
  199.          Y1 <= Y2, Y1 and Y2 are constant.
  200.  
  201.  
  202. getKey key
  203.  
  204.          Get a key.
  205.          If variable is undefined, no key is returned.
  206.  
  207.  
  208. shadowOn
  209.  
  210.          Switch on shadowing.
  211.  
  212.  
  213. shadowOff
  214.  
  215.          Switch off shadowing
  216.  
  217.  
  218. random
  219.  
  220.          Get a random number.
  221.          Output is stored into accumulator.
  222.          Output is -32768 to 32767.
  223.  
  224.  
  225. startMusicTool
  226.  
  227.          Start music tool (Tool 219).
  228.  
  229.  
  230. loadMusic song
  231.  
  232.          Load one SoundSmith song.
  233.  
  234.  
  235. playMusic loop
  236.  
  237.          Play SoundSmith music. Loop is either '#True' or '#False'.
  238.          If Loop is '#True', the song repeats after finish.
  239.  
  240.  
  241. stopMusic
  242.  
  243.          Stop SoundSmith music.
  244.  
  245.  
  246. shutDownMusicTool
  247.  
  248.          Shut down music tool.
  249.