home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 234 / 234.d81 / t.fontstar < prev    next >
Text File  |  2022-08-26  |  4KB  |  201 lines

  1. u
  2.            F O N T S T A R
  3.            by Dave Moorman
  4.  
  5.  
  6.     As mentioned elsewhere, sometimes
  7. one must build tools in order to build
  8. tools. The Golem Editor became a case
  9. in point. I needed an ML module to
  10. display and manipulate the font. It
  11. turned out to be exactly 1024 bytes in
  12. size, and I figured some of you might
  13. enjoy having it in your arsenal of
  14. WMDs (Welcomed Modules of Design).
  15.  
  16.     I have included two versions, FONT
  17. 192.ML and FONT 156.ML. The number
  18. indicates the page to which the file
  19. is BLOADED. For example:
  20.  
  21.  SYS57812"FONT 192.ML",DV,0
  22.  POKE 780, 0
  23.  POKE 781, 0
  24.  POKE 782, 192 :REM PAGE!
  25.  SYS65493
  26.  
  27.  The beginning address (AD below) is
  28.  
  29.  AD = 192 * 256
  30.  
  31.  
  32. FONT DISPLAY:
  33.   SYS AD,ADDR,SCRROW
  34.     ADDR = Memory Address where Font
  35.            resides.
  36.     SCRROW = Screen Row (0 - 17) where
  37.            first line of Font is
  38.            displayed.
  39.  
  40.     This command MUST be given first,
  41. since it tells FontStar where in
  42. memory (ADDR) your font resides, and
  43. where on the screen to display the
  44. font and edit box. The command puts a
  45. 32 x 8 Font display on the screen,
  46. with an 8 x 8 edit window.
  47.  
  48.  
  49. EDIT:
  50.   SYS AD+3,SC
  51.     SC = Screen Code
  52.  
  53.     This command puts the character of
  54.     SC in the edit window. It is also
  55.     called by other commands after
  56.     they do their work on a character.
  57.  
  58.  
  59. CLEAR:
  60.   SYS AD+6,SC
  61.  
  62.     Turns off all pixels of character
  63.     SC.
  64.  
  65.  
  66. REVERSE:
  67.   SYS AD+9,SC
  68.  
  69.     Flips all pixels of character SC.
  70.  
  71.     Use CLEAR and REVERSE to turn on
  72.     all pixels.
  73.  
  74.  
  75. SCROLL UP:
  76.   SYS AD+12,SC
  77.  
  78.     Scrolls the pixels of character SC
  79.     up one pixel row.
  80.  
  81.  
  82. SCROLL DOWN:
  83.   SYS AD+15,SC
  84.  
  85.     Scrolls the pixels of character SC
  86.     down one pixel row.
  87.  
  88.  
  89. SCROLL RIGHT:
  90.   SYS AD+18,SC
  91.  
  92.     Scrolls the pixels of character SC
  93.     right one pixel column.
  94.  
  95.  
  96. SCROLL LEFT:
  97.   SYS AD+21,SC
  98.  
  99.     Scrolls the pixels of character SC
  100.     left one pixel column.
  101.  
  102.  
  103. TWIST LEFT:
  104.   SYS AD+24,SC
  105.  
  106.     Twists the pixels of character SC
  107.     90 degrees counter-clockwise.
  108.  
  109.  
  110. TWIST RIGHT:
  111.   SYS AD+27,SC
  112.  
  113.     Twists the pixels of character SC
  114.     90 degrees clockwise.
  115.  
  116.  
  117. FLIP VERTICALLY:
  118.   SYS AD+30,SC
  119.  
  120.     Turns character SC upside down.
  121.  
  122.  
  123. FLIP HORIZONALLY:
  124.   SYS AD+33,SC
  125.  
  126.     Makes mirror image of character
  127.     SC.
  128.  
  129.  
  130. COPY:
  131.   SYS AD+36,FROM,TO
  132.     FROM = Screen Code of character to
  133.            be copied.
  134.     TO = Screen Code of character to
  135.          receive copy.
  136.  
  137.     Makes character TO look like
  138.     character FROM.
  139.  
  140.  
  141. ROW TO BUFF:
  142.   SYS AD+39,ROW
  143.     ROW = Thirty-two character Font
  144.           Row as displayed.
  145.  
  146.     Copies all 32 characters of ROW
  147.     into a buffer.
  148.  
  149.  
  150. BUFF TO ROW:
  151.   SYS AD+42,ROW
  152.  
  153.     Copies all 32 characters of buffer
  154.     into ROW.
  155.  
  156.     The BUFFER commands are extremely
  157.     useful for copying parts of one
  158.     font to another.
  159.  
  160.  
  161. TOGGLE:
  162.   SYS AD+45,SC,CX,CY
  163.     SC = Screen Code
  164.     CX = Cell X-coordinate.
  165.     CY = Cell Y-coordinate.
  166.  
  167.     This is the pixel edit command for
  168.     FontStar. The coordinates are
  169.     actual screen character cell
  170.     coordinates. This makes it easy to
  171.     use FontStar with Mr. Mouse! When
  172.     you call ASK BASIC (SYS MM+9), the
  173.     character cell coordinates of the
  174.     mouse arrow are returned in CX%
  175.     and CY%. All you need to do to
  176.     toggle one of the pixels in the
  177.     edit box is point and click. Here
  178.     is the BASIC code:
  179.  
  180. (SC holds screen code of character
  181. being edited. RO is the screen row
  182. where the first row of the Font is
  183. displayed.)
  184.  
  185.  900 REM DEFINE REGION 1 AS THE PIXEL
  186.     EDIT BOX
  187.  901 SYS MM+15, 1, 32, 39, RO, RO+7
  188.  
  189.  999 REM MAIN LOOP...
  190. 1000 SYS MM+9
  191. 1010 IF RG% = 1 THEN
  192.     SYS AD+45, SC, CX%, CY%
  193.  
  194.  
  195.     I think this pretty well covers
  196. it! Now let us see your Font Editor
  197. utilities!
  198.  
  199.  DMM
  200.  
  201.  
  202.