home *** CD-ROM | disk | FTP | other *** search
/ World of Graphics / WOGRAPH.BIN / 595.RIE.DOC < prev    next >
Text File  |  1992-05-24  |  34KB  |  867 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.                                  RRRR  I EEEEE
  14.                                  R   R I E
  15.                                  RRRR  I EE
  16.                                  R R   I E
  17.                                  R  R  I EEEEE
  18.  
  19.                               Rimrock Icon Editor
  20.                                  Version 1.04
  21.                                20 February 1992
  22.  
  23.                     Copyright (C) 1992 by Rimrock Software
  24.                               All Rights Reserved
  25.  
  26.  
  27.  
  28.  
  29.                              ┌─────────┐
  30.                        ┌─────┴───┐     │               (R)
  31.                      ──│         │o    │──────────────────
  32.                        │   ┌─────┴╨──┐ │  Association of
  33.                        │   │         │─┘  Shareware
  34.                        └───│    o    │    Professionals
  35.                      ──────│    ║    │────────────────────
  36.                            └────╨────┘    MEMBER
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45. Rimrock Software
  46. P.O. Box 2406
  47. Hayden, ID  83835
  48. (208) 772-9347 (after 6 pm Pacific Time)
  49.  
  50.  
  51.                        RIE Shareware Information
  52.  
  53. RIE is a shareware product.  No matter how you obtained this product, we 
  54. encourage you to freely copy and distribute RIE, provided that 
  55.  
  56.     1. No fee is charged beyond normal media duplication and shipping costs. 
  57.  
  58.     2. The RIE archive distribution file must be distributed in its original 
  59.        form.  Specifically, the files listed in the PACKING.LST must be 
  60.        included.  None of these files should be altered, and no new files 
  61.        should be added.  Advertising within the RIE archive file is 
  62.        prohibited. 
  63.  
  64.     3. Commercial use of RIE is prohibited unless the program is registered 
  65.        for the specific number of computers on which it will be used. 
  66.  
  67. See the ORDER.FRM file for more licensing information. 
  68.  
  69. If you received RIE as shareware, i.e., you didn't pay a registration fee for 
  70. it or you got it from a shareware library, and you use it on a regular basis, 
  71. you must register the program using the accompanying order form.  Registering 
  72. shareware encourages program authors to continue making improvements to 
  73. programs and to create newer and better software. 
  74.  
  75. For your $29 registration fee, you will receive the latest registered version 
  76. of RIE, all accompanying files, and a printed user's manual.  You will also be 
  77. entitled to unlimited technical support.
  78.  
  79. Rimrock Software is a member of the Association of Shareware Professionals 
  80. (ASP).  ASP wants to make sure that the shareware principle works for you.  If 
  81. you are unable to resolve a shareware-related problem with an ASP member by 
  82. contacting the member directly, ASP may be able to help.  The ASP Ombudsman 
  83. can help you resolve a dispute or problem with an ASP member, but does not 
  84. provide technical support for members' products.  Please write to the ASP 
  85. Ombudsman at 545 Grover Road, Muskegon, MI  49442-9427 or send a CompuServe 
  86. message via easyplex to ASP Ombudsman 70007,3536 
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.                                       -i-
  100.                                TABLE OF CONTENTS
  101.  
  102.     Introduction to RIE . . . . . . . . . . . . . . . . . . . . . .  1
  103.         Overview. . . . . . . . . . . . . . . . . . . . . . . . . .  1
  104.         System Requirements . . . . . . . . . . . . . . . . . . . .  1
  105.         Technical Support . . . . . . . . . . . . . . . . . . . . .  1
  106.         Registration Information. . . . . . . . . . . . . . . . . .  2
  107.  
  108.     Using RIE . . . . . . . . . . . . . . . . . . . . . . . . . . .  2
  109.         Running RIE . . . . . . . . . . . . . . . . . . . . . . . .  2
  110.         RIE and the Mouse . . . . . . . . . . . . . . . . . . . . .  2
  111.         RIE and the Keyboard. . . . . . . . . . . . . . . . . . . .  3
  112.         The RIE Display . . . . . . . . . . . . . . . . . . . . . .  3
  113.           The Pulldown Menu . . . . . . . . . . . . . . . . . . . .  4
  114.             File Menu . . . . . . . . . . . . . . . . . . . . . . .  4
  115.             Info Menu . . . . . . . . . . . . . . . . . . . . . . .  7
  116.           The File Frame. . . . . . . . . . . . . . . . . . . . . .  7
  117.           The Icon Information Frame. . . . . . . . . . . . . . . .  7
  118.           The Icon Editing Frame. . . . . . . . . . . . . . . . . .  8
  119.           The Toolbox . . . . . . . . . . . . . . . . . . . . . . .  9
  120.     Loading Icons to the Display Adapter. . . . . . . . . . . . . . 11
  121.         How Icons Work. . . . . . . . . . . . . . . . . . . . . . . 11
  122.         How to load an Icon . . . . . . . . . . . . . . . . . . . . 12
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.                                      -ii-
  150. Introduction to RIE
  151. -------------------
  152.  
  153.     Overview
  154.     --------
  155.  
  156.     Have you ever wanted to dress up the text-based programs you create with 
  157.     graphic images, without actually going through the hassle of rewriting 
  158.     your program for a graphics display mode?  With icons created by the 
  159.     Rimrock Icon Editor (RIE), you can create 'pseudo-graphic' images that can 
  160.     be displayed on an EGA or VGA display in text mode. 
  161.  
  162.     RIE allows you to graphically create a 16 bit by 32 bit icon, which is 
  163.     stored in a C source file.  This information can then be used as 4 
  164.     characters of 16 lines, which can be loaded as user-defined characters 
  165.     into the display adapter.
  166.  
  167.     RIE was created primarily to support version 6 of TCXL, the TesSeRact C 
  168.     eXtended Library (TCXL is copyright (C) 1987-92 by Innovative Data 
  169.     Concepts).  TCXL is an excellent library that allows you to create virtual 
  170.     windows, menus, data entry forms and much more.  We use it ourselves and 
  171.     can heartily recommend it.  However, once you know how, you can load and 
  172.     use icons without using TCXL.  We will show you how in this manual and 
  173.     with the included ICONLOAD sample program. 
  174.  
  175.     System Requirements
  176.     -------------------
  177.  
  178.     DOS Version: 2.10 or higher
  179.     Memory:      640k
  180.     Disk drives: 1 floppy or hard disk for file storage/retrieval.
  181.     Display:     EGA, VGA or Hercules display required.
  182.     Other:       A Microsoft compatible mouse and driver is optional 
  183.                  but desirable.
  184.  
  185.     Technical Support
  186.     -----------------
  187.  
  188.     If you have any questions regarding RIE, you may call Rimrock Software for 
  189.     technical assistance.  Technical support is available throughout the week, 
  190.     from 6:00 pm to 10:00 pm, Pacific time.  The phone number is (208) 772-
  191.     9347.  Technical support is NOT limited to registered users, although we 
  192.     encourage you to register the RIE package. 
  193.  
  194.     You may reach Rimrock Software on CompuServe.  We regularly monitor the 
  195.     SHAREWARE forum, section 1, for questions about our software.  Please 
  196.     direct your questions to Michael Burton, 71211,70. 
  197.  
  198.     You may obtain the latest shareware version of RIE, and ask questions 
  199.     about it, on the Tech Board BBS, (208) 765-0180. The Tech Board sysop is 
  200.     Dan Boss and he has kindly provided an area for support of Rimrock 
  201.     Software products.  Many thanks, Dan. 
  202.         
  203.                                       -1-
  204.     Registration Information
  205.     ------------------------
  206.  
  207.     The unregistered version of RIE is a fully functional, uncrippled program. 
  208.     If you find this program to be useful, you can become a registered user.  
  209.     Registration entitles you to the latest version of the program and a 
  210.     bound, printed manual, as well as unlimited technical support.  The only 
  211.     difference between the registered and the unregistered versions of the 
  212.     program is that the registered version does not have any registration 
  213.     reminders.  An order form is included with RIE, and may be printed by 
  214.     entering the following at the DOS prompt: 
  215.  
  216.         COPY ORDER.FRM PRN
  217.  
  218.     Be sure to fill out all the information on the order form, including the 
  219.     RIE unregistered version you are using. 
  220.  
  221. Using RIE
  222. ---------
  223.  
  224.     Running RIE
  225.     -----------
  226.  
  227.     RIE is easy to use.  The only file necessary is RIE.EXE.  To run the 
  228.     program, simply enter 
  229.  
  230.         RIE
  231.  
  232.     No command line options are available.  When RIE executes, you will see a 
  233.     registration request screen.  You may continue on to the RIE display by 
  234.     pressing any key. 
  235.  
  236.     RIE and the Mouse
  237.     -----------------
  238.  
  239.     RIE does not require a mouse.  If you have one, though, using RIE is much 
  240.     easier. 
  241.  
  242.     Moving the mouse will produce corresponding motion of the cursor on the 
  243.     RIE display.
  244.  
  245.     Clicking the left mouse button will select whatever item you happen to 
  246.     have the cursor pointing at.  For instance, to pull down the File menu, 
  247.     you would move the cursor to the word 'File' on the menu bar and then 
  248.     click the left mouse button.  To load a file, you would then move the 
  249.     cursor down to the word 'Load' and click the left mouse button again.  If 
  250.     you are in the Icon Editing Frame (see figure 1), clicking the left mouse 
  251.     button will change the state of the icon pixel you are pointing at. 
  252.  
  253.     If you press and hold down the left mouse button in the Icon Editing 
  254.     Frame, and move the mouse, then many of the icon pixels will change state. 
  255.  
  256.                                       -2-
  257.     If you press and hold down the right mouse button, you can move the 
  258.     various RIE frames around.  The only frame that is glued down is the Icon 
  259.     Editing Frame.  All the other frames, including the Pulldown Menu, can be 
  260.     moved.  
  261.     
  262.     NOTE: RIE creates a configuration file that contains the positions of all 
  263.     the frames.  If you move them around and then leave RIE, when you reenter 
  264.     RIE the frames will be where you left them.  If you want them to go back 
  265.     to the default positions, erase the RIE.CFG file. 
  266.     
  267.     NOTE: If you move any of the frames so they overlap the Icon Editing 
  268.     Frame, drawing will slow down.  Try to keep the other frames out of the 
  269.     Icon Editing Frame. 
  270.  
  271.     RIE and the Keyboard
  272.     --------------------
  273.  
  274.     You can still use RIE, even if you don't have a mouse.  You can use the 
  275.     cursor keys to move the cursor and the Enter key to select an item.
  276.  
  277.     Cursor keys - Move the cursor around.  Unshifted cursor keys provide gross 
  278.     movement, and shifted cursor keys provide fine movement. 
  279.  
  280.     Enter key - Functions as the left mouse key.  Press and release it to 
  281.     select an item.  In the Icon Editing Frame, you can press and hold the 
  282.     Enter key down and then move around with the cursor keys to change many 
  283.     pixels.
  284.  
  285.     Alt-F key - Selects the File menu item.  You may then select one of the 
  286.     file options by pressing the underlined letter for that item.  NOTE: If 
  287.     you press Alt-F and the menu comes down, then goes away, move the cursor 
  288.     out of the Icon Editing Frame and try again.
  289.  
  290.     Alt-I key - Selects the Info menu item.  You may then select one of the 
  291.     info options by pressing the underlined letter for that item.  NOTE: If 
  292.     you press Alt-I and the menu comes down, then goes away, move the cursor 
  293.     out of the Icon Editing Frame and try again. 
  294.  
  295.     Ctrl-Break key - A nasty way to leave RIE.  You are NOT given a chance to 
  296.     save your work if you use this key.  USE CTRL-BREAK ONLY AS A LAST RESORT.  
  297.     Use the File Exit menu item to leave RIE normally. 
  298.  
  299.     The RIE Display
  300.     ---------------
  301.  
  302.     Other than the registration request screen, there is only one other 
  303.     display in RIE.  There are five major frames in the display (see figure 
  304.     1); the Pulldown Menu, the File Frame, the Icon Information Frame, the 
  305.     Icon Editing Frame and the Toolbox. 
  306.  
  307.  
  308.                                       -3-
  309.     +--------------------------------------------------------------------+
  310.     | File  Info                                                         |
  311.     +--------------------------------------------------------------------+
  312.     |                                                                    |
  313.     |  +-------+     +-----------------------+  +---------------------+  |
  314.     |  |RIMROCK|     |                       |  |File:  [File Frame]  |  |
  315.     |  |ICON   |     |                       |  |---------------------|  |
  316.     |  |EDITOR |     |                       |  |Unregistered Version |  |
  317.     |  +-------+     |                       |  +---------------------+  |
  318.     |                |                       |                           |
  319.     | +-----------+  |                       |  +------+                 |
  320.     | |PX:        |  |                       |  |      |                 |
  321.     | |PY:        |  |                       |  +------+                 |
  322.     | |           |  |                       |  |      |                 |
  323.     | | [Icon     |  | [Icon Editing Frame]  |  +------+                 |
  324.     | |Information|  |                       |  |      | <-[Toolbox]     |
  325.     | |  Frame]   |  |                       |  +------+                 |
  326.     | +-----------+  |                       |  |      |                 |
  327.     |                |                       |  +------+                 |
  328.     |                |                       |  |      |                 |
  329.     |                |                       |  +------+                 |
  330.     |                |                       |  |      |                 |
  331.     |                |                       |  +------+                 |
  332.     |                |                       |  |      |                 |
  333.     |                |                       |  +------+                 |
  334.     |                |                       |  |      |                 |
  335.     |                |                       |  +------+                 |
  336.     |                |                       |                           |
  337.     |                |                       |                           |
  338.     |                |                       |                           |
  339.     |                +-----------------------+                           |
  340.     |                                                                    |
  341.     +--------------------------------------------------------------------+
  342.  
  343.                          Figure 1  RIE Editing Display
  344.  
  345.         The Pulldown Menu
  346.         -----------------
  347.  
  348.             File Menu
  349.             ---------
  350.  
  351.             The file menu is used to load and save icons, and to leave 
  352.             RIE when you are finished. It contains four items, detailed below 
  353.             (see figure 2). 
  354.  
  355.  
  356.  
  357.  
  358.                                       -4-
  359.                                   +-----------------
  360.                                   | File   Info
  361.                                   +-------------+---
  362.                                   | Load        |
  363.                                   | Save        |
  364.                                   | Save as     |
  365.                                   +-------------+
  366.                                   | Exit to DOS |
  367.                                   +-------------+
  368.  
  369.                                 Figure 2  File Menu
  370.  
  371.             In general, when you select a file load or save item, a pop up 
  372.             file selection window appears (see figure 3).  This window 
  373.             contains an empty file name box, a current directory box, a 
  374.             scrolling list of file names, a scrolling list of directories and 
  375.             drives, a Cancel button and an Ok button. 
  376.             
  377.             To select a file for loading or saving, you must fill out the 
  378.             empty file name box.  You can do this in two different ways; 
  379.             clicking on a file name in the file name scrolling list or typing 
  380.             the name into the file name box.  
  381.             
  382.             To click on an existing file name, move the file name list up or 
  383.             down using the scroll controls, then click on the appropriate file 
  384.             name.  That file name will be displayed in the file name box.  If 
  385.             you need to change to a different directory or drive, click on it 
  386.             in the directory/drive list.
  387.             
  388.             To type in a file name, click on the empty file name box.  A bar 
  389.             cursor will appear, indicating you may start typing.  Type in a 
  390.             file name.
  391.  
  392.             Once the file name box is filled out, click on OK or press the 
  393.             Enter key.
  394.  
  395.             NOTE: RIE files have an extension of '.C'.  Any extension you 
  396.             enter in the file name box will be ignored and will be replaced 
  397.             with '.C'.
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.                                       -5-
  409.  
  410.            +-------------------------------------------------------+
  411.            |                      Load Icon                        |
  412.            +-------------------------------------------------------+
  413.            |           +-----------------+                         |
  414.            | Filename: |                 |                         |
  415.            |           +-----------------+                         |
  416.            |           +-----------------------------------------+ |
  417.            | Directory:|H:\RIE                                   | |
  418.            |           +-----------------------------------------+ |
  419.            | +---------------------+-+ +-----------------------+-+ |
  420.            | | DIALOG.C            |^| | [.]                   |^| |
  421.            | | INFO.C              +-+ | [..]                  +-+ |
  422.            | | INFO2.C             | | | [RIESRC]              | | |
  423.            | | INFO3.C             | | | [-A-]                 | | |
  424.            | | QUERY.C             | | | [-B-]                 | | |
  425.            | | QUERY2.C            | | | [-C-]                 | | |
  426.            | | QUERY3.C            +-+ | [-D-]                 +-+ |
  427.            | | WARN.C              |V| | [-E-]                 |V| |
  428.            | +---------------------+-+ +-----------------------+-+ |
  429.            |                                      +------+  +----+ |
  430.            |                                      |CANCEL|  | OK | |
  431.            |                                      +------+  +----+ |
  432.            +-------------------------------------------------------+
  433.  
  434.                         Figure 3  File Selection Window
  435.  
  436.             Load
  437.  
  438.             The Load menu item allows you to load an icon into RIE from a C 
  439.             source file.  If you select Load and you have not saved your 
  440.             current work, you will be prompted to do so.
  441.  
  442.             Save
  443.  
  444.             The Save menu item allows you to update an icon file with the 
  445.             changes you have made.  For new work, selecting Save is the same 
  446.             as selecting Save as.
  447.  
  448.             Save as
  449.  
  450.             Allows you to specify a file into which you may save your work.  
  451.             This is especially useful if you load a file, make changes, and 
  452.             then wish to save the changes out as a different file.
  453.  
  454.             Exit to DOS
  455.  
  456.             Quit to DOS allows you to leave RIE and return to DOS.  You will 
  457.             be prompted to save your work, if you have not already done so.
  458.  
  459.                                       -6-
  460.             Info Menu
  461.             ---------
  462.  
  463.             The Info Menu contains information about RIE and how to 
  464.             register the RIE package (see figure 7).
  465.  
  466.                               +------------------------
  467.                               | File   Info
  468.                               +-------+------------+---
  469.                                       | About      |
  470.                                       | Order Info |
  471.                                       +------------+
  472.  
  473.                                   Figure 7  Info Menu
  474.  
  475.             About RIE
  476.  
  477.             About contains information about the date and version of 
  478.             RIE and directs you to Order Info for more information. 
  479.  
  480.             Order Info
  481.  
  482.             Order Info displays information about how to create an 
  483.             order form, so you can register the RIE package. 
  484.  
  485.     The File Frame
  486.     --------------
  487.  
  488.     The File Frame contains the name of the file you are currently working on.  
  489.     It also contains a reminder that this version of RIE is unregistered, and 
  490.     that it would help your conscience to register it (see figure 8).
  491.  
  492.                               +---------------------+
  493.                               |File:                |
  494.                               |---------------------|
  495.                               |Unregistered Version |
  496.                               +---------------------+
  497.  
  498.                                Figure 8  File Frame
  499.  
  500.     The Icon Information Frame
  501.     --------------------------
  502.  
  503.     The Icon Information Frame displays two important bits of information.  It 
  504.     shows the X and Y coordinates of where you currently are in the Icon 
  505.     Editing Frame.  This is helpful when editing from a completely black 
  506.     (inverted) image.  The Icon Information Frame also shows an EXACT image of 
  507.     icon, as you will see it when you use it in a text mode program (see 
  508.     figure 9).
  509.  
  510.                                       -7-
  511.                                    +-----------+
  512.                                    |PX: 5      |
  513.                                    |PY: 12     |
  514.                                    |           |
  515.                                    | XXXX      |
  516.                                    | XXXX      |
  517.                                    | XXXX      |
  518.                                    +-----------+
  519.  
  520.                          Figure 9  Icon Information Frame
  521.  
  522.     The Icon Editing Frame
  523.     ----------------------
  524.  
  525.     The Icon Editing Frame is where all the real action takes place in RIE 
  526.     (see figure 10). The current icon is displayed here in a magnified view. 
  527.     You may set or clear any pixels of the icon.  To set a pixel, move to it 
  528.     and click.  To clear a pixel, do the same thing.  The Toolbox also allows 
  529.     you to make changes to the icon displayed here. 
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  
  537.  
  538.  
  539.  
  540.  
  541.  
  542.  
  543.  
  544.  
  545.  
  546.  
  547.  
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560.                                       -8-
  561.                        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  562.                        | | | | | | | | | | | | | | | | |
  563.                        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  564.                        | | | | | |*|*|*|*|*|*| | | | | |
  565.                        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  566.                        | | | | |*|*| | | | |*|*| | | | |
  567.                        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  568.                        | | | |*|*| | | | | | |*|*| | | |
  569.                        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  570.                        | | | |*|*| | | | | | |*|*| | | |
  571.                        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  572.                        | | | | | | | | | | | |*|*| | | |
  573.                        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  574.                        | | | | | | | | | | | |*|*| | | |
  575.                        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  576.                        | | | | | | | | | | |*|*| | | | |
  577.                        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  578.                        | | | | | | | | | |*|*| | | | | |
  579.                        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  580.                        | | | | | | | | |*|*| | | | | | |
  581.                        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  582.                        | | | | | | | |*|*| | | | | | | |
  583.                        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  584.                        | | | | | | | |*| | | | | | | | |
  585.                        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  586.                        | | | | | | | |*| | | | | | | | |
  587.                        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  588.                        | | | | | | | |*| | | | | | | | |
  589.                        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  590.                        |                               |
  591.                        |                               |
  592.                        |                               |
  593.                        |                               |
  594.                        |                               |
  595.                        |                               |
  596.                        |                               |
  597.                        +-------------------------------+
  598.  
  599.                          Figure 10  Icon Editing Frame
  600.  
  601.     The Toolbox
  602.     -----------
  603.  
  604.     The Toolbox allows you to make gross changes to the icon.  The Toolbox is 
  605.     located adjacent to the Icon Editing Frame.  There are eight controls; up, 
  606.     down, left, right, flip horizontal, flip vertical, invert and clear (see 
  607.     figure 11). 
  608.  
  609.  
  610.                                       -9-
  611.                                    +-------+
  612.                                    |   ^   |
  613.                                    +-------+
  614.                                    |   v   |
  615.                                    +-------+
  616.                                    |  <<   |
  617.                                    +-------+
  618.                                    |  >>   |
  619.                                    +-------+
  620.                                    |  <->  |
  621.                                    +-------+
  622.                                    |  ^v   |
  623.                                    +-------+
  624.                                    |  O-*  |
  625.                                    +-------+
  626.                                    |   O   |
  627.                                    +-------+
  628.  
  629.                             Figure 11  The Toolbox
  630.  
  631.     When you click on the up arrow control, the entire icon is moved up by one 
  632.     pixel row.  The top row of pixels is lost. 
  633.  
  634.     When you click on the down arrow control, the entire icon is moved down by 
  635.     one pixel row.  The bottom row of pixels is lost. 
  636.  
  637.     When you click on the left arrow control, the entire icon is moved to the 
  638.     left by one pixel column.  The left column of pixels is lost. 
  639.  
  640.     When you click on the right arrow control, the entire icon is moved to the 
  641.     right by one pixel column.  The right column of pixels is lost. 
  642.  
  643.     Clicking on the flip horizontal control flips the icon over horizontally, 
  644.     i.e., a left to right mirror image of the icon is produced. 
  645.  
  646.     Clicking on the flip vertical control flips the icon over vertically, 
  647.     i.e., a top to bottom mirror image of the icon is produced. 
  648.  
  649.     Clicking on the invert control inverts the icon.  All the pixels that were 
  650.     set are cleared and all the pixels that were clear are set. 
  651.  
  652.     Clicking on the clear control clears all the pixels of the icon.
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.                                      -10-
  661. Loading Icons to the Display Adapter
  662. ------------------------------------
  663.  
  664.     How Icons Work
  665.     --------------
  666.  
  667.     Pseudo-graphical images like icons take advantage of a special EGA and VGA 
  668.     capability, the ability to load your own character set into the display 
  669.     adapter and use it in place of the default font. (For more information 
  670.     about this user font capability, see Rimrock Software's DFE - Display Font 
  671.     Editor, available wherever RIE is available). 
  672.  
  673.     Basically, an icon is a display of 8 8x8 characters from the upper 128 
  674.     characters of the display set, arranged as a 2 x 4 matrix, like 
  675.  
  676.         AE
  677.         BF
  678.         CG
  679.         DH
  680.  
  681.     These characters are created by RIE and are stored in a C source file so 
  682.     they can be used in your program.  When the characters are loaded into the 
  683.     display adapter and displayed as shown, they form one continuous image. 
  684.     You can easily create a simple example of an icon from the built-in font 
  685.     by drawing a box, using the 4 corner characters (218, 191, 192 and 217). 
  686.  
  687.     The adapter characters are all 8 bits wide.  For VGAs, the adapter 
  688.     automatically adds a ninth bit to the character as a margin. Characters 
  689.     192 through 223 (0xc0 - 0xdf) of the display set handle this ninth bit in 
  690.     a special way.  These characters duplicate their rightmost bit in the 
  691.     ninth position.  This allows you to draw boxes without dashed lines in 
  692.     them.  In the RIE Icon Information Frame, the icon is drawn with this 
  693.     ninth bit added.  Since you want to make the icon continuous, it is 
  694.     necessary to set the icon's first four characters (A through D) in the 
  695.     192-223 range.  The last four characters, E through H, should not be in 
  696.     the 192-223 range (see figure 12). To make things easy, we will use 8 
  697.     contiguous characters, 220-227 (DC-E3).
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.                                      -11-
  714.                                       +- margin         +- margin
  715.                                       | (extended bit)  | (bit not extended)
  716.                                       v                 v
  717.  
  718.                      |    Char A     | |    Char E     | |
  719.                     -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
  720.                      | | | | | | | | | | | | | | | | | | |
  721.                      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  722.                      | | | | | |*|*|*|*|*|*|*| | | | | | |
  723.                      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  724.                      | | | | |*|*| | | | | |*|*| | | | | |
  725.                      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  726.                      | | | |*|*| | | | | | | |*|*| | | | |
  727.               Char A +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Char E
  728.                      | | | |*|*| | | | | | | |*|*| | | | |
  729.                      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  730.                      | | | | | | | | | | | | |*|*| | | | |
  731.                      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  732.                      | | | | | | | | | | | | |*|*| | | | |
  733.                      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  734.                      | | | | | | | | | | | |*|*| | | | | |
  735.                     -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
  736.                      | | | | | | | | | | |*|*| | | | | | |
  737.                      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  738.                      | | | | | | | | | |*|*| | | | | | | |
  739.                      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  740.                      | | | | | | | |*|*|*| | | | | | | | |
  741.                      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  742.                      | | | | | | | |*|*| | | | | | | | | |
  743.               Char B +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Char F
  744.                      | | | | | | | |*|*| | | | | | | | | |
  745.                      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  746.                      | | | | | | | |*|*| | | | | | | | | |
  747.                      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  748.                      | | | | | | | | | | | | | | | | | | |
  749.                      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  750.                      | | | | | | | | | | | | | | | | | | |
  751.                     -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
  752.  
  753.                      Figure 12  Icon Characters A, B, E and F
  754.  
  755.     How to load an Icon
  756.     -------------------
  757.  
  758.     Assuming you have already created an icon with RIE, you must do the 
  759.     following to load an icon.
  760.  
  761.     1. Pick the character positions where the icon will be loaded.  Make sure 
  762.     that the first and third characters are in the 192-223 range and that the 
  763.     second and fourth are not.
  764.  
  765.                                      -12-
  766.     2. Load the characters into the display using interrupt 10h, function 11h, 
  767.     subfunction 10h.
  768.  
  769.  
  770.     An example of this, to be compiled with Borland C follows.
  771.  
  772.     #include <dos.h>
  773.  
  774.     #define LINES *((unsigned char far *) 0x00000485)
  775.  
  776.     /* An icon generated by RIE */
  777.     unsigned char iconDIALOG[64] = {
  778.        0xff,0x80,0x80,0x80,0x80,0x88,0x88,0x88,
  779.        0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
  780.        0x80,0x80,0x80,0x80,0x80,0x80,0x81,0x87,
  781.        0x83,0x83,0x83,0x9e,0x83,0x83,0x87,0xff,
  782.        0xff,0xff,0xff,0xff,0xe3,0xc1,0x81,0x81,
  783.        0xb5,0x81,0xad,0x81,0xb9,0x81,0xb5,0x81,
  784.        0xbd,0x81,0xad,0x81,0xad,0x81,0x81,0x81,
  785.        0x81,0x83,0x83,0x7,0xff,0xff,0xff,0xff
  786.     };
  787.  
  788.     /* Load an icon into the display adapter */
  789.     void load_icon(unsigned char *chr, unsigned char_num)
  790.     {
  791.        struct REGPACK r;
  792.        int i;
  793.  
  794.        r.r_es = FP_SEG(chr);
  795.        r.r_bp = FP_OFF(chr);        /* character address in ES:BP        */
  796.        r.r_bx = LINES << 8;         /* bytes per char in BH, 0 in BL     */
  797.        r.r_cx = 8;                  /* number of chars to load           */
  798.        r.r_dx = char_num;           /* which char will be loaded (0-255) */
  799.        r.r_ax = 0x1100;             /* function 11h, subfunction 00h     */
  800.        intr(0x10,&r);               /* go load the character             */
  801.     }
  802.  
  803.  
  804.  
  805.  
  806.  
  807.  
  808.  
  809.  
  810.  
  811.  
  812.  
  813.  
  814.  
  815.                                      -13-
  816.  
  817.     /* Display an icon generated with the Rimrock Icon Editor */
  818.     void main()
  819.     {
  820.        unsigned char icon_array[256];
  821.        int i, j, start;
  822.  
  823.        start = ((LINES * 8) - 64) / 4;
  824.  
  825.        memset(icon_array, 0, 256);
  826.  
  827.        for(i=start,j=0; i<start+32; i++,j++)
  828.           icon_array[i] = iconDIALOG[j];
  829.  
  830.        start += ((LINES * 8) / 2);
  831.  
  832.        for(i=start; i<start+32; i++,j++)
  833.           icon_array[i] = iconDIALOG[j];
  834.  
  835.        load_icon(icon_array,0xdc);
  836.  
  837.     }                                  /* and that's it, folks. */
  838.  
  839.  
  840.  
  841.     To display the icon, you would display the characters 220-227 as follows: 
  842.  
  843.                 220 224
  844.                 221 225
  845.                 222 226
  846.                 223 227
  847.  
  848.     See ICONLOAD.C and EXAMPLE.BAT for more information.
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864.  
  865.                                      -14-
  866.  
  867.