home *** CD-ROM | disk | FTP | other *** search
/ The Devil's Doorknob BBS Capture (1996-2003) / devilsdoorknobbbscapture1996-2003.iso / Dloads / PROGRAMM / FGL112B.ZIP / REF.DOC < prev    next >
Text File  |  1992-10-05  |  213KB  |  11,504 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Fastgraph (tm)
  8. Reference Manual
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.                                                            Ted Gruber Software
  55.                                                                   PO Box 13408
  56.                                                           Las Vegas, NV  89112
  57.  
  58.                                                                 (702) 735-1980
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74. Copyright (c) 1991,1992 by Ted Gruber Software.
  75.  
  76. All rights reserved.  No part of this publication may be reproduced, stored
  77. in a retrieval system, or transmitted by any means, electronic, mechanical,
  78. photocopying, recording, or otherwise, without express written permission
  79. from Ted Gruber Software.  The software described in this publication is
  80. furnished under a license agreement and may be used or copied only in
  81. accordance with the terms of that agreement.
  82.  
  83. This publication and its associated software are sold without warranties,
  84. either expressed or implied, regarding their merchantability or fitness for
  85. any particular application or purpose.  The information in this publication
  86. is subject to change without notice and does not represent a commitment on
  87. the part of Ted Gruber Software.  In no event shall Ted Gruber Software be
  88. liable for any loss of profit or any other commercial damage, including but
  89. not limited to special, incidental, consequential, or other damages resulting
  90. from the use of or the inability to use this product, even if Ted Gruber
  91. Software has been notified of the possibility of such damages.
  92.  
  93.  
  94. Second Printing, January 1992
  95.  
  96. Fastgraph version 2.10
  97. Fastgraph/Light version 1.10
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104. Fastgraph and Fastgraph/Light are trademarks of Ted Gruber Software.
  105. Hercules is a trademark of Hercules Computer Technology.
  106. IBM, IBM PC, IBM PC/XT, IBM PC/AT, PS/2, PCjr, and PC-DOS are registered
  107.    trademarks of International Business Machines, Inc.
  108. Intel is a registered trademark of Intel Corporation.
  109. Microsoft and MS-DOS are registered trademarks of Microsoft Corporation.
  110. QuickBASIC is a trademark of Microsoft Corporation.
  111. Tandy is a registered trademark of Tandy Corporation.
  112. Turbo Pascal is a registered trademark of Borland International, Inc.
  113.  
  114.  
  115.  
  116. All other brand and product names mentioned in this publication are
  117. trademarks or registered trademarks of their respective holders.
  118.  
  119.                       T a b l e   o f   C o n t e n t s
  120.  
  121. Introduction  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .    1
  122.  
  123. Fastgraph Routines by Category  . . . . . . . . . . . . . . . . . . . . .    1
  124.  
  125. Alphabetical List of Fastgraph Routines . . . . . . . . . . . . . . . . .    2
  126.      fg_allocate  . . . . . . . . . . . . . . . . . . . . . . . . . . . .    3
  127.      fg_alloccms  . . . . . . . . . . . . . . . . . . . . . . . . . . . .    4
  128.      fg_allocems  . . . . . . . . . . . . . . . . . . . . . . . . . . . .    5
  129.      fg_allocxms  . . . . . . . . . . . . . . . . . . . . . . . . . . . .    6
  130.      fg_automode  . . . . . . . . . . . . . . . . . . . . . . . . . . . .    7
  131.      fg_bestmode  . . . . . . . . . . . . . . . . . . . . . . . . . . . .    8
  132.      fg_box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .    9
  133.      fg_boxdepth  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   10
  134.      fg_button  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   11
  135.      fg_capslock  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   12
  136.      fg_chgattr . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   13
  137.      fg_chgtext . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   14
  138.      fg_circle  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   15
  139.      fg_circlew . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   16
  140.      fg_clipmask  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   17
  141.      fg_clpimage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   18
  142.      fg_clprect . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   19
  143.      fg_clprectw  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   20
  144.      fg_copypage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   21
  145.      fg_cursor  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   22
  146.      fg_dash  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   23
  147.      fg_dashrel . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   24
  148.      fg_dashrw  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   25
  149.      fg_dashw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   26
  150.      fg_defcolor  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   27
  151.      fg_dispfile  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   28
  152.      fg_display . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   29
  153.      fg_displayp  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   31
  154.      fg_disppcx . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   33
  155.      fg_draw  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   35
  156.      fg_drawmap . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   36
  157.      fg_drawmask  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   37
  158.      fg_drawrel . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   39
  159.      fg_drawrw  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   40
  160.      fg_draww . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   41
  161.      fg_drect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   42
  162.      fg_drectw  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   43
  163.      fg_drwimage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   44
  164.      fg_egacheck  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   45
  165.      fg_ellipse . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   46
  166.      fg_ellipsew  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   47
  167.      fg_erase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   48
  168.      fg_fadein  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   49
  169.      fg_fadeout . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   50
  170.      fg_flipmask  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   51
  171.      fg_flpimage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   52
  172.      fg_freepage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   53
  173.      fg_getaddr . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   54
  174.      fg_getattr . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   55
  175.  
  176.                                      iii
  177.      fg_getchar . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   56
  178.      fg_getclock  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   57
  179.      fg_getcolor  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   58
  180.      fg_getdacs . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   59
  181.      fg_gethpage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   60
  182.      fg_getimage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   61
  183.      fg_getindex  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   62
  184.      fg_getkey  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   63
  185.      fg_getlines  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   64
  186.      fg_getmap  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   65
  187.      fg_getmaxx . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   66
  188.      fg_getmaxy . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   67
  189.      fg_getmode . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   68
  190.      fg_getpage . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   69
  191.      fg_getpixel  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   70
  192.      fg_getrgb  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   71
  193.      fg_getvpage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   72
  194.      fg_getworld  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   73
  195.      fg_getxjoy . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   74
  196.      fg_getxpos . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   75
  197.      fg_getyjoy . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   76
  198.      fg_getypos . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   77
  199.      fg_hush  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   78
  200.      fg_hushnext  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   79
  201.      fg_imagesiz  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   80
  202.      fg_initems . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   81
  203.      fg_initjoy . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   82
  204.      fg_initw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   83
  205.      fg_initxms . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   84
  206.      fg_intjoy  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   85
  207.      fg_intkey  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   87
  208.      fg_locate  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   88
  209.      fg_makepcx . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   89
  210.      fg_maprgb  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   91
  211.      fg_measure . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   92
  212.      fg_memavail  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   93
  213.      fg_mousebut  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   94
  214.      fg_mousecur  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   95
  215.      fg_mouseini  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   96
  216.      fg_mouselim  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   97
  217.      fg_mousemov  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   98
  218.      fg_mousepos  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   99
  219.      fg_mouseptr  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  100
  220.      fg_mousespd  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  101
  221.      fg_mousevis  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  102
  222.      fg_move  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  103
  223.      fg_moverel . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  104
  224.      fg_moverw  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  105
  225.      fg_movew . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  106
  226.      fg_music . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  107
  227.      fg_musicb  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  109
  228.      fg_numlock . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  110
  229.      fg_paint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  111
  230.      fg_paintw  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  112
  231.      fg_palette . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  113
  232.      fg_palettes  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  115
  233.      fg_pan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  116
  234.  
  235.                                       iv
  236.      fg_panw  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  117
  237.      fg_pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  118
  238.      fg_playing . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  119
  239.      fg_point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  120
  240.      fg_pointw  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  121
  241.      fg_polygon . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  122
  242.      fg_polygonw  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  123
  243.      fg_quiet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  124
  244.      fg_rect  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  125
  245.      fg_rectw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  126
  246.      fg_reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  127
  247.      fg_resize  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  128
  248.      fg_restore . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  129
  249.      fg_restorew  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  130
  250.      fg_resume  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  131
  251.      fg_revimage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  132
  252.      fg_revmask . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  133
  253.      fg_save  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  134
  254.      fg_savew . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  135
  255.      fg_scrlock . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  136
  256.      fg_scroll  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  137
  257.      fg_setangle  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  139
  258.      fg_setattr . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  140
  259.      fg_setcaps . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  141
  260.      fg_setclip . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  142
  261.      fg_setclipw  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  143
  262.      fg_setcolor  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  144
  263.      fg_setdacs . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  145
  264.      fg_setfunc . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  146
  265.      fg_sethpage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  147
  266.      fg_setlines  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  148
  267.      fg_setmode . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  149
  268.      fg_setnum  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  151
  269.      fg_setpage . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  152
  270.      fg_setratio  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  153
  271.      fg_setrgb  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  154
  272.      fg_setsize . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  155
  273.      fg_setsizew  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  156
  274.      fg_setvpage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  157
  275.      fg_setworld  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  158
  276.      fg_sound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  159
  277.      fg_sounds  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  160
  278.      fg_stall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  162
  279.      fg_suspend . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  163
  280.      fg_swchar  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  164
  281.      fg_swlength  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  165
  282.      fg_swtext  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  166
  283.      fg_tcmask  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  167
  284.      fg_tcxfer  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  168
  285.      fg_testmode  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  170
  286.      fg_text  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  171
  287.      fg_transfer  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  172
  288.      fg_version . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  174
  289.      fg_voice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  175
  290.      fg_voices  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  177
  291.      fg_waitfor . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  179
  292.      fg_waitkey . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  180
  293.  
  294.                                       v
  295.      fg_where . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  181
  296.      fg_xalpha  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  182
  297.      fg_xconvert  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  183
  298.      fg_xscreen . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  184
  299.      fg_xworld  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  185
  300.      fg_yalpha  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  186
  301.      fg_yconvert  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  187
  302.      fg_yscreen . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  188
  303.      fg_yworld  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  189
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.                                       vi
  354. Introduction
  355.  
  356.      The Fastgraph Reference Manual is a companion publication to the
  357. Fastgraph User's Guide.  Whereas the latter publication is essentially a
  358. detailed tutorial about Fastgraph, the Fastgraph Reference Manual is intended
  359. as a reference for programmers familiar with the product.
  360.  
  361.      This manual has two major parts.  The first part lists the Fastgraph
  362. routines by category; each category corresponds to a chapter in the Fastgraph
  363. User's Guide.  The second part, which occupies the larger portion of this
  364. manual, gives descriptions of each Fastgraph routine in alphabetical order.
  365.  
  366.  
  367. Fastgraph Routines by Category
  368.  
  369.      This section lists the Fastgraph routines by category.  These categories
  370. parallel the chapters in the Fastgraph User's Guide.  The lists in this
  371. section are provided as a general overview of Fastgraph's capabilities.  You
  372. can find detailed information about each Fastgraph routine in the next
  373. section of this manual, and of course in the Fastgraph User's Guide.
  374.  
  375. Video Initialization Routines:  fg_automode, fg_bestmode, fg_cursor,
  376. fg_egacheck, fg_getlines, fg_getmode, fg_reset, fg_setlines, fg_setmode,
  377. fg_testmode.
  378.  
  379. Coordinate Routines:  fg_getmaxx, fg_getmaxy, fg_getworld, fg_initw,
  380. fg_setworld, fg_xalpha, fg_xconvert, fg_xscreen, fg_xworld, fg_yalpha,
  381. fg_yconvert, fg_yscreen, fg_yworld.
  382.  
  383. Color-Related Routines:  fg_defcolor, fg_getcolor, fg_getdacs, fg_getindex,
  384. fg_getrgb, fg_maprgb, fg_palette, fg_palettes, fg_setattr, fg_setcolor,
  385. fg_setdacs, fg_setrgb.
  386.  
  387. Fundamental Graphics Routines:  fg_box, fg_boxdepth, fg_circle, fg_circlew,
  388. fg_clprect, fg_clprectw, fg_dash, fg_dashrel, fg_dashrw, fg_dashw, fg_draw,
  389. fg_drawrel, fg_drawrw, fg_draww, fg_drect, fg_drectw, fg_ellipse,
  390. fg_ellipsew, fg_erase, fg_getpixel, fg_getxpos, fg_getypos, fg_move,
  391. fg_moverel, fg_moverw, fg_movew, fg_paint, fg_paintw, fg_point, fg_pointw,
  392. fg_polygon, fg_polygonw, fg_rect, fg_rectw, fg_setclip, fg_setclipw.
  393.  
  394. Character Display Routines:  fg_chgattr, fg_chgtext, fg_getattr, fg_getchar,
  395. fg_locate, fg_setangle, fg_setattr, fg_setcolor, fg_setratio, fg_setsize,
  396. fg_setsizew, fg_swchar, fg_swlength, fg_swtext, fg_text, fg_where, fg_xalpha,
  397. fg_xconvert, fg_yalpha, fg_yconvert.
  398.  
  399. Video Page Management Routines:  fg_allocate, fg_alloccms, fg_allocems,
  400. fg_allocxms, fg_copypage, fg_freepage, fg_getaddr, fg_gethpage, fg_getpage,
  401. fg_getvpage, fg_initems, fg_initxms, fg_resize, fg_sethpage, fg_setpage,
  402. fg_setvpage.
  403.  
  404. Image Management Routines:  fg_clipmask, fg_clpimage, fg_copypage,
  405. fg_dispfile, fg_display, fg_displayp, fg_disppcx, fg_drawmap, fg_drawmask,
  406. fg_drwimage, fg_flipmask, fg_flpimage, fg_getimage, fg_getmap, fg_imagesiz,
  407. fg_makepcx, fg_pattern, fg_restore, fg_restorew, fg_revimage, fg_revmask,
  408. fg_save, fg_savew, fg_tcmask, fg_tcxfer, fg_transfer.
  409.  
  410.  
  411.  
  412.                                       1
  413. Special Effects Routines:  fg_fadein, fg_fadeout, fg_pan, fg_panw, fg_resize,
  414. fg_scroll.
  415.  
  416. Input Routines:  fg_button, fg_capslock, fg_getkey, fg_getxjoy, fg_getyjoy,
  417. fg_initjoy, fg_intjoy, fg_intkey, fg_mousebut, fg_mousecur, fg_mouseini,
  418. fg_mouselim, fg_mousemov, fg_mousepos, fg_mouseptr, fg_mousespd, fg_mousevis,
  419. fg_numlock, fg_scrlock, fg_setcaps, fg_setnum, fg_waitkey.
  420.  
  421. Sound Routines:  fg_hush, fg_hushnext, fg_music, fg_musicb, fg_playing,
  422. fg_quiet, fg_resume, fg_sound, fg_sounds, fg_suspend, fg_voice, fg_voices.
  423.  
  424. Timing Routines:  fg_getclock, fg_measure, fg_stall, fg_waitfor.
  425.  
  426. Miscellaneous Routines:  fg_memavail, fg_setfunc, fg_version.
  427.  
  428.  
  429. Alphabetical List of Fastgraph Routines
  430.  
  431.      This section presents a detailed description of each Fastgraph routine.
  432. Once you're familiar with Fastgraph, you'll probably refer to these
  433. descriptions more often than any other section of the two Fastgraph
  434. publications.
  435.  
  436.      The information presented for each routine includes the following:
  437.  
  438.      function prototypes or declarations for each supported language
  439.      a description of the routine itself
  440.      the number of parameters, their purpose, and their data types
  441.      the meaning and data type of the routine's return value (if any)
  442.      information about important restrictions pertaining to the routine
  443.      references to similar routines, or other routines that affect the
  444.         routine
  445.      example programs in the Fastgraph User's Guide that use the routine
  446.  
  447.      A prototype specifies the data types of a routine's parameters and
  448. return value.  The description of each Fastgraph routine includes prototypes
  449. for C, QuickBASIC, FORTRAN, and Turbo Pascal (in that order).  For example,
  450. the prototypes for the fg_allocate routine are:
  451.  
  452.  
  453.            int fg_allocate (int page_number);
  454.            function FGallocate% (page_number%)
  455.            integer*2 function fg_allocate (integer*2 page_number)
  456.            function fg_allocate (page_number : integer) : integer;
  457.  
  458.  
  459. The C, QuickBASIC, and Turbo Pascal prototypes use the declaration syntax for
  460. those languages.  FORTRAN does not use function prototypes, so we've created
  461. our own prototype syntax for FORTRAN.  In the FORTRAN prototypes, each
  462. parameter is preceded by its data type.  Furthermore, if the routine has a
  463. return value, the prototype begins with the return value's data type and the
  464. word function.  If the routine has no return value, the prototype begins with
  465. the word subroutine.
  466.  
  467.  
  468.  
  469.  
  470.  
  471.                                       2
  472. fg_allocate
  473.  
  474. Prototype
  475.  
  476.    int fg_allocate (int page_number);
  477.    function FGallocate% (page_number%)
  478.    integer*2 function fg_allocate (integer*2 page_number)
  479.    function fg_allocate (page_number : integer) : integer;
  480.  
  481. Description
  482.  
  483.    The fg_allocate routine creates a virtual video page.  The amount of memory
  484.    required depends on the current video mode.
  485.  
  486. Parameters
  487.  
  488.    page_number is the number by which the virtual page will be referenced.  It
  489.    must be between 0 and 63.
  490.  
  491. Return value
  492.  
  493.    A status code indicating the success or failure of the virtual page
  494.    creation, as shown below.
  495.  
  496.      0 = virtual page created
  497.      1 = specified page is a physical or logical page
  498.      7 = virtual page created, but memory control blocks were destroyed
  499.      8 = insufficient memory to create the virtual page
  500.  
  501. Restrictions
  502.  
  503.    This routine has no effect if page_number references a physical video page,
  504.    a logical video page, or if used in a video mode that does not support
  505.    virtual video pages.
  506.  
  507. See also
  508.  
  509.    fg_freepage
  510.  
  511. Examples
  512.  
  513.    8-3, 8-4, 8-5, 8-6, 8-8, 9-23, 9-24, 9-25, 10-4, 10-5, 11-2, 11-5, 15-1
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.                                       3
  531. fg_alloccms
  532.  
  533. Prototype
  534.  
  535.    int fg_alloccms (int page_number);
  536.    function FGalloccms% (page_number%)
  537.    integer*2 function fg_alloccms (integer*2 page_number)
  538.    function fg_alloccms (page_number : integer) : integer;
  539.  
  540. Description
  541.  
  542.    The fg_alloccms routine creates a logical page in conventional memory.  The
  543.    amount of memory required depends on the current video mode and video
  544.    buffer dimensions.
  545.  
  546. Parameters
  547.  
  548.    page_number is the number by which the logical page will be referenced.  It
  549.    must be between 1 and 63.
  550.  
  551. Return value
  552.  
  553.     0 = logical page created in conventional memory
  554.    -2 = invalid page number
  555.    -3 = page already created, or page exists as a physical or virtual page
  556.    -4 = insufficient expanded memory to create the page
  557.  
  558. Restrictions
  559.  
  560.    This routine has no effect if page_number references a physical or virtual
  561.    video page.
  562.  
  563.    The only function you can perform with logical pages is copying one entire
  564.    page to another (with fg_copypage).
  565.  
  566. See also
  567.  
  568.    fg_allocems, fg_allocxms, fg_copypage, fg_freepage
  569.  
  570. Examples
  571.  
  572.    8-9
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.                                       4
  590. fg_allocems
  591.  
  592. Prototype
  593.  
  594.    int fg_allocems (int page_number);
  595.    function FGallocems% (page_number%)
  596.    integer*2 function fg_allocems (integer*2 page_number)
  597.    function fg_allocems (page_number : integer) : integer;
  598.  
  599. Description
  600.  
  601.    The fg_allocems routine creates a logical page in expanded memory (EMS).
  602.    The amount of memory required depends on the current video mode and video
  603.    buffer dimensions.
  604.  
  605. Parameters
  606.  
  607.    page_number is the number by which the logical page will be referenced.  It
  608.    must be between 1 and 63.
  609.  
  610. Return value
  611.  
  612.     0 = logical page created in expanded memory
  613.    -1 = Expanded Memory Manager not initialized
  614.    -2 = invalid page number
  615.    -3 = page already created, or page exists as a physical or virtual page
  616.    -4 = insufficient expanded memory to create the page
  617.  
  618. Restrictions
  619.  
  620.    This routine has no effect if page_number references a physical or virtual
  621.    video page.
  622.  
  623.    Before using this routine, you must use the fg_initems routine to
  624.    initialize the Expanded Memory Manager.
  625.  
  626.    The only function you can perform with EMS logical pages is copying one
  627.    entire page to another (with fg_copypage).
  628.  
  629. See also
  630.  
  631.    fg_alloccms, fg_allocxms, fg_copypage, fg_freepage, fg_initems
  632.  
  633. Examples
  634.  
  635.    8-9
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.                                       5
  649. fg_allocxms
  650.  
  651. Prototype
  652.  
  653.    int fg_allocxms (int page_number);
  654.    function FGallocxms% (page_number%)
  655.    integer*2 function fg_allocxms (integer*2 page_number)
  656.    function fg_allocxms (page_number : integer) : integer;
  657.  
  658. Description
  659.  
  660.    The fg_allocxms routine creates a logical page in extended memory (XMS).
  661.    The amount of memory required depends on the current video mode and video
  662.    buffer dimensions.
  663.  
  664. Parameters
  665.  
  666.    page_number is the number by which the logical page will be referenced.  It
  667.    must be between 1 and 63.
  668.  
  669. Return value
  670.  
  671.     0 = logical page created in extended memory
  672.    -1 = XMS driver not present
  673.    -2 = invalid page number
  674.    -3 = page already created, or page exists as a physical or virtual page
  675.    -4 = insufficient extended memory to create the page
  676.  
  677. Restrictions
  678.  
  679.    This routine has no effect if page_number references a physical or virtual
  680.    video page.
  681.  
  682.    Before using this routine, you must use the fg_initxms routine to
  683.    initialize the XMS driver.
  684.  
  685.    The only function you can perform with XMS logical pages is copying one
  686.    entire page to another (with fg_copypage).
  687.  
  688. See also
  689.  
  690.    fg_alloccms, fg_allocems, fg_copypage, fg_freepage, fg_initxms
  691.  
  692. Examples
  693.  
  694.    8-9
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.                                       6
  708. fg_automode
  709.  
  710. Prototype
  711.  
  712.    int fg_automode (void);
  713.    function FGautomode% ()
  714.    integer*2 function fg_automode ()
  715.    function fg_automode : integer;
  716.  
  717. Description
  718.  
  719.    The fg_automode routine determines the graphics video mode that offers the
  720.    most features for the user's display and adapter configuration.
  721.  
  722. Parameters
  723.  
  724.    none
  725.  
  726. Return value
  727.  
  728.    The return value is the proposed video mode number.  The current display
  729.    and adapter configuration determine the mode number, as illustrated in the
  730.    following table.
  731.  
  732.  
  733.                                          display
  734.                        adapter   mono   RGB   ECD   VGA
  735.  
  736.                           MDA       7     0     7     7
  737.                           HGC      11     0     0    11
  738.                           CGA       0     4     0     0
  739.                           EGA      15    13    16     0
  740.                           VGA      17    17    17    18
  741.                          MCGA      17    17    17    19
  742.                         Tandy       7     9     0     0
  743.                          PCjr       7     9     0     0
  744.  
  745.  
  746.    The return value can either be passed directly to the fg_setmode routine,
  747.    or it can help determine suitable video modes for your program.
  748.  
  749. Restrictions
  750.  
  751.    none
  752.  
  753. See also
  754.  
  755.    fg_bestmode, fg_setmode, fg_testmode
  756.  
  757. Examples
  758.  
  759.    3-7, 4-3
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.                                       7
  767. fg_bestmode
  768.  
  769. Prototype
  770.  
  771.    int fg_bestmode (int horizontal, int vertical, int pages);
  772.    function FGbestmode% (horizontal%, vertical%, pages%)
  773.    integer*2 function fg_bestmode (integer*2 horizontal, integer*2 vertical,
  774.    integer*2 pages)
  775.    function fg_bestmode (horizontal, vertical, pages : integer) : integer;
  776.  
  777. Description
  778.  
  779.    The fg_bestmode routine determines the video mode having the requested
  780.    resolution and the most features for the user's display and adapter
  781.    configuration.  It is similar to fg_automode, but it excludes video modes
  782.    that do not offer the specified resolution and video page requirements.
  783.    The video pages can include physical pages, virtual pages, or both.
  784.  
  785. Parameters
  786.  
  787.    horizontal specifies the required horizontal resolution.
  788.  
  789.    vertical specifies the required vertical resolution.
  790.  
  791.    pages specifies the required number of video pages.
  792.  
  793. Return value
  794.  
  795.    If fg_bestmode finds a video mode that offers the specified resolution and
  796.    video page requirements, it returns the corresponding video mode number.
  797.    If not, it returns -1.
  798.  
  799. Restrictions
  800.  
  801.    none
  802.  
  803. See also
  804.  
  805.    fg_automode, fg_setmode, fg_testmode
  806.  
  807. Examples
  808.  
  809.    3-4, 3-8
  810.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.                                       8
  826. fg_box
  827.  
  828. Prototype
  829.  
  830.    void fg_box (int minx, int maxx, int miny, int maxy);
  831.    sub FGbox (minx%, maxx%, miny%, maxy%)
  832.    subroutine fg_box (integer*2 minx, integer*2 maxx, integer*2 miny,
  833.    integer*2 maxy)
  834.    procedure fg_box (minx, maxx, miny, maxy : integer);
  835.  
  836. Description
  837.  
  838.    The fg_box routine draws an unfilled rectangle in screen space, with
  839.    respect to the clipping region.  The width of the rectangle's edges is one
  840.    pixel unless changed with the fg_boxdepth routine.
  841.  
  842. Parameters
  843.  
  844.    minx is the x coordinate of the rectangle's left edge.
  845.  
  846.    maxx is the x coordinate of the rectangle's right edge.  It must be greater
  847.    than or equal to the value of minx.
  848.  
  849.    miny is the y coordinate of the rectangle's top edge.
  850.  
  851.    maxy is the y coordinate of the rectangle's bottom edge.  It must be
  852.    greater than or equal to the value of miny.
  853.  
  854. Return value
  855.  
  856.    none
  857.  
  858. Restrictions
  859.  
  860.    This routine has no effect in text video modes.
  861.  
  862. See also
  863.  
  864.    fg_boxdepth, fg_rect
  865.  
  866. Examples
  867.  
  868.    6-11, 11-7
  869.  
  870.  
  871.  
  872.  
  873.  
  874.  
  875.  
  876.  
  877.  
  878.  
  879.  
  880.  
  881.  
  882.  
  883.  
  884.                                       9
  885. fg_boxdepth
  886.  
  887. Prototype
  888.  
  889.    void fg_boxdepth (int xdepth, int ydepth);
  890.    sub FGboxdepth (xdepth%, ydepth%)
  891.    subroutine fg_boxdepth (integer*2 xdepth, integer*2 ydepth)
  892.    procedure fg_boxdepth (xdepth, ydepth : integer);
  893.  
  894. Description
  895.  
  896.    The fg_boxdepth routine defines the depth of rectangles drawn with the
  897.    fg_box routine.  The fg_setmode routine initializes the box depth to one
  898.    pixel in each direction.
  899.  
  900. Parameters
  901.  
  902.    xdepth is the width in pixels of the rectangle's left and right sides.  It
  903.    must be greater than zero.
  904.  
  905.    ydepth is the height in pixels of the rectangle's top and bottom sides.  It
  906.    must be greater than zero.
  907.  
  908. Return value
  909.  
  910.    none
  911.  
  912. Restrictions
  913.  
  914.    none
  915.  
  916. See also
  917.  
  918.    fg_box
  919.  
  920. Examples
  921.  
  922.    6-11
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.  
  932.  
  933.  
  934.  
  935.  
  936.  
  937.  
  938.  
  939.  
  940.  
  941.  
  942.  
  943.                                       10
  944. fg_button
  945.  
  946. Prototype
  947.  
  948.    int fg_button (int n);
  949.    function FGbutton% (n%)
  950.    integer*2 function fg_button (integer*2 n)
  951.    function fg_button (n : integer) : integer;
  952.  
  953. Description
  954.  
  955.    The fg_button routine returns information about the state of either
  956.    joystick's button status.
  957.  
  958. Parameters
  959.  
  960.    n specifies the joystick number, either 1 or 2.
  961.  
  962. Return value
  963.  
  964.    A status code indicating the current button status for the requested
  965.    joystick, as shown below.
  966.  
  967.      0 = neither button pressed
  968.      1 = top button pressed
  969.      2 = bottom button pressed
  970.      3 = top and bottom buttons pressed
  971.  
  972. Restrictions
  973.  
  974.    none
  975.  
  976. See also
  977.  
  978.    fg_getxjoy, fg_getyjoy, fg_initjoy, fg_intjoy
  979.  
  980. Examples
  981.  
  982.    12-11
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.  
  998.  
  999.  
  1000.  
  1001.  
  1002.                                       11
  1003. fg_capslock
  1004.  
  1005. Prototype
  1006.  
  1007.    int fg_capslock (void);
  1008.    function FGcapslock% ()
  1009.    integer*2 function fg_capslock ()
  1010.    function fg_capslock : integer;
  1011.  
  1012. Description
  1013.  
  1014.    The fg_capslock routine determines the state of the CapsLock key.
  1015.  
  1016. Parameters
  1017.  
  1018.    none
  1019.  
  1020. Return value
  1021.  
  1022.    If the return value is 0, it means the CapsLock key is off.  If it is 1, it
  1023.    means the CapsLock key is on.
  1024.  
  1025. Restrictions
  1026.  
  1027.    none
  1028.  
  1029. See also
  1030.  
  1031.    fg_numlock, fg_scrlock, fg_setcaps, fg_setnum
  1032.  
  1033. Examples
  1034.  
  1035.    12-3
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.                                       12
  1062. fg_chgattr
  1063.  
  1064. Prototype
  1065.  
  1066.    void fg_chgattr (int n);
  1067.    sub FGchgattr (n%)
  1068.    subroutine fg_chgattr (integer*2 n)
  1069.    procedure fg_chgattr (n: integer);
  1070.  
  1071. Description
  1072.  
  1073.    The fg_chgattr routine applies the current text attribute to a given number
  1074.    of characters, starting at the text cursor position.  This routine leaves
  1075.    the text cursor one column to the right of the last character changed (or
  1076.    the first column of the next row if the last character is at the end of a
  1077.    row).
  1078.  
  1079. Parameters
  1080.  
  1081.    n is the number of characters for which to change the text attribute.
  1082.  
  1083. Return value
  1084.  
  1085.    none
  1086.  
  1087. Restrictions
  1088.  
  1089.    This routine has no effect in graphics video modes.
  1090.  
  1091. See also
  1092.  
  1093.    fg_chgtext, fg_text
  1094.  
  1095. Examples
  1096.  
  1097.    7-3
  1098.  
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.                                       13
  1121. fg_chgtext
  1122.  
  1123. Prototype
  1124.  
  1125.    void fg_chgtext (char *string, int n);
  1126.    sub FGchgtext (string$, n%)
  1127.    subroutine fg_chgtext (character*(*) string, integer*2 n)
  1128.    procedure fg_chgtext (string : string; n : integer);
  1129.  
  1130. Description
  1131.  
  1132.    The fg_chgtext routine displays a string of hardware characters, starting
  1133.    at the text cursor position, using the existing text attributes.  This
  1134.    routine leaves the text cursor one column to the right of the last
  1135.    character changed (or the first column of the next row if the last
  1136.    character is at the end of a row).
  1137.  
  1138. Parameters
  1139.  
  1140.    string is the arbitrary-length sequence of characters to display.
  1141.  
  1142.    n is the number of characters in string.
  1143.  
  1144. Return value
  1145.  
  1146.    none
  1147.  
  1148. Restrictions
  1149.  
  1150.    This routine has no effect in graphics video modes.
  1151.  
  1152. See also
  1153.  
  1154.    fg_chgattr, fg_text
  1155.  
  1156. Examples
  1157.  
  1158.    7-3
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.                                       14
  1180. fg_circle
  1181.  
  1182. Prototype
  1183.  
  1184.    void fg_circle (int radius);
  1185.    sub FGcircle (radius%)
  1186.    subroutine fg_circle (integer*2 radius)
  1187.    procedure fg_circle (radius : integer);
  1188.  
  1189. Description
  1190.  
  1191.    The fg_circle routine draws an unfilled circle in screen space.  The circle
  1192.    is centered at the current graphics cursor position.
  1193.  
  1194. Parameters
  1195.  
  1196.    radius defines the circle's radius in horizontal screen space units.  Its
  1197.    value must be greater than zero.
  1198.  
  1199. Return value
  1200.  
  1201.    none
  1202.  
  1203. Restrictions
  1204.  
  1205.    This routine has no effect in text video modes.
  1206.  
  1207. See also
  1208.  
  1209.    fg_circlew, fg_ellipse, fg_ellipsew
  1210.  
  1211. Examples
  1212.  
  1213.    6-9
  1214.  
  1215.  
  1216.  
  1217.  
  1218.  
  1219.  
  1220.  
  1221.  
  1222.  
  1223.  
  1224.  
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.                                       15
  1239. fg_circlew
  1240.  
  1241. Prototype
  1242.  
  1243.    void fg_circlew (double radius);
  1244.    sub FGcirclew (radius#)
  1245.    subroutine fg_circlew (real*8 radius)
  1246.    procedure fg_circlew (radius : real);
  1247.  
  1248. Description
  1249.  
  1250.    The fg_circlew routine draws an unfilled circle in world space.  The circle
  1251.    is centered at the current graphics cursor position.
  1252.  
  1253. Parameters
  1254.  
  1255.    radius defines the circle's radius in horizontal world space units.  Its
  1256.    value must be greater than zero.
  1257.  
  1258. Return value
  1259.  
  1260.    none
  1261.  
  1262. Restrictions
  1263.  
  1264.    This routine is not available in Fastgraph/Light and has no effect in text
  1265.    video modes.
  1266.  
  1267. See also
  1268.  
  1269.    fg_circle, fg_ellipse, fg_ellipsew
  1270.  
  1271. Examples
  1272.  
  1273.    6-8
  1274.  
  1275.  
  1276.  
  1277.  
  1278.  
  1279.  
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.                                       16
  1298. fg_clipmask
  1299.  
  1300. Prototype
  1301.  
  1302.    void fg_clipmask (char *map_array, int runs, int width);
  1303.    sub FGclipmask (map_array$, runs%, width%)
  1304.    subroutine fg_clipmask (integer*1 map_array, integer*2 runs, integer*2
  1305.    width)
  1306.    procedure fg_clipmask (var map_array : byte; runs, width : integer);
  1307.  
  1308. Description
  1309.  
  1310.    The fg_clipmask routine displays a clipped image stored as a masking map.
  1311.    The image will be positioned so that its lower left corner is at the
  1312.    graphics cursor position.  Refer to the description of the fg_drawmask
  1313.    routine for more information about masking maps.
  1314.  
  1315. Parameters
  1316.  
  1317.    map_array is the arbitrary-length array containing the masking map.
  1318.  
  1319.    runs is the number of pixel runs in the masking map.
  1320.  
  1321.    width is the width in pixels of the masking map.
  1322.  
  1323. Return value
  1324.  
  1325.    none
  1326.  
  1327. Restrictions
  1328.  
  1329.    This routine has no effect in text video modes, or in the native EGA and
  1330.    VGA graphics video modes.
  1331.  
  1332. See also
  1333.  
  1334.    fg_drawmask, fg_flipmask, fg_revmask, fg_setclip
  1335.  
  1336. Examples
  1337.  
  1338.    9-16
  1339.  
  1340.  
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346.  
  1347.  
  1348.  
  1349.  
  1350.  
  1351.  
  1352.  
  1353.  
  1354.  
  1355.  
  1356.                                       17
  1357. fg_clpimage
  1358.  
  1359. Prototype
  1360.  
  1361.    void fg_clpimage (char *map_array, int width, int height);
  1362.    sub FGclpimage (map_array$, width%, height%)
  1363.    subroutine fg_clpimage (integer*1 map_array, integer*2 width, integer*2
  1364.    height)
  1365.    procedure fg_clpimage (var map_array : byte; width, height : integer);
  1366.  
  1367. Description
  1368.  
  1369.    The fg_clpimage routine displays a clipped image stored as a mode-specific
  1370.    bit map.  The image will be positioned so that its lower left corner is at
  1371.    the graphics cursor position.  Only that part of the image that falls
  1372.    within the current clipping limits will be displayed, but the clipping
  1373.    limits will be extended to a byte boundary if necessary.  Refer to the
  1374.    Fastgraph User's Guide for complete information about mode-specific bit
  1375.    maps.
  1376.  
  1377. Parameters
  1378.  
  1379.    map_array is the arbitrary-length array containing the bit map.
  1380.  
  1381.    width is the width in bytes of the bit map.
  1382.  
  1383.    height is the height in bytes (pixel rows) of the bit map.
  1384.  
  1385. Return value
  1386.  
  1387.    none
  1388.  
  1389. Restrictions
  1390.  
  1391.    This routine has no effect in text video modes.
  1392.  
  1393. See also
  1394.  
  1395.    fg_drwimage, fg_flpimage, fg_getimage, fg_revimage, fg_setclip
  1396.  
  1397. Examples
  1398.  
  1399.    9-8, 9-9
  1400.  
  1401.  
  1402.  
  1403.  
  1404.  
  1405.  
  1406.  
  1407.  
  1408.  
  1409.  
  1410.  
  1411.  
  1412.  
  1413.  
  1414.  
  1415.                                       18
  1416. fg_clprect
  1417.  
  1418. Prototype
  1419.  
  1420.    void fg_clprect (int minx, int maxx, int miny, int maxy);
  1421.    sub FGclprect (minx%, maxx%, miny%, maxy%)
  1422.    subroutine fg_clprect (integer*2 minx, integer*2 maxx, integer*2 miny,
  1423.    integer*2 maxy)
  1424.    procedure fg_clprect (minx, maxx, miny, maxy : integer);
  1425.  
  1426. Description
  1427.  
  1428.    The fg_clprect routine draws a solid (filled) rectangle in screen space,
  1429.    with respect to the clipping region.
  1430.  
  1431. Parameters
  1432.  
  1433.    minx is the screen space x coordinate of the rectangle's left edge.
  1434.  
  1435.    maxx is the screen space x coordinate of the rectangle's right edge.  It
  1436.    must be greater than or equal to the value of minx.
  1437.  
  1438.    miny is the screen space y coordinate of the rectangle's top edge.
  1439.  
  1440.    maxy is the screen space y coordinate of the rectangle's bottom edge.  It
  1441.    must be greater than or equal to the value of miny.
  1442.  
  1443. Return value
  1444.  
  1445.    none
  1446.  
  1447. Restrictions
  1448.  
  1449.    This routine has no effect in text video modes.
  1450.  
  1451. See also
  1452.  
  1453.    fg_clprectw, fg_rect, fg_rectw, fg_setclip
  1454.  
  1455. Examples
  1456.  
  1457.    10-1, 10-2, 10-3, 10-4
  1458.  
  1459.  
  1460.  
  1461.  
  1462.  
  1463.  
  1464.  
  1465.  
  1466.  
  1467.  
  1468.  
  1469.  
  1470.  
  1471.  
  1472.  
  1473.  
  1474.                                       19
  1475. fg_clprectw
  1476.  
  1477. Prototype
  1478.  
  1479.    void fg_clprectw (double xmin, double xmax, double ymin, double ymax);
  1480.    sub FGclprectw (xmin#, xmax#, ymin#, ymax#)
  1481.    subroutine fg_clprectw (real*8 xmin, real*8 xmax, real*8 ymin, real*8 ymax)
  1482.    procedure fg_clprectw (xmin, xmax, ymin, ymax : real);
  1483.  
  1484. Description
  1485.  
  1486.    The fg_clprectw routine draws a solid (filled) rectangle in world space,
  1487.    with respect to the clipping region.
  1488.  
  1489. Parameters
  1490.  
  1491.    xmin is the world space x coordinate of the rectangle's left edge.
  1492.  
  1493.    xmax is the world space x coordinate of the rectangle's right edge.  It
  1494.    must be greater than or equal to the value of xmin.
  1495.  
  1496.    ymin is the world space y coordinate of the rectangle's bottom edge.
  1497.  
  1498.    ymax is the world space y coordinate of the rectangle's top edge.  It must
  1499.    be greater than or equal to the value of ymin.
  1500.  
  1501. Return value
  1502.  
  1503.    none
  1504.  
  1505. Restrictions
  1506.  
  1507.    This routine is not available in Fastgraph/Light and has no effect in text
  1508.    video modes.
  1509.  
  1510. See also
  1511.  
  1512.    fg_clprect, fg_rect, fg_rectw, fg_setclipw
  1513.  
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.  
  1525.  
  1526.  
  1527.  
  1528.  
  1529.  
  1530.  
  1531.  
  1532.  
  1533.                                       20
  1534. fg_copypage
  1535.  
  1536. Prototype
  1537.  
  1538.    void fg_copypage (int source_page, int dest_page);
  1539.    sub FGcopypage (source_page%, dest_page%)
  1540.    subroutine fg_copypage (integer*2 source_page, integer*2 dest_page)
  1541.    procedure fg_copypage (source_page, dest_page : integer);
  1542.  
  1543. Description
  1544.  
  1545.    The fg_copypage routine transfers the contents of one video page to
  1546.    another.  The pages may be physical, virtual, or logical video pages.  The
  1547.    call
  1548.  
  1549.      fg_copypage(source,dest);
  1550.  
  1551.    is equivalent to
  1552.  
  1553.      fg_transfer(0,fg_getmaxx(),0,fg_getmaxy(),0,fg_getmaxx(),source,dest);
  1554.  
  1555. Parameters
  1556.  
  1557.    source_page is the source video page number.  It must be between 0 and 63.
  1558.  
  1559.    dest_page is the destination video page number.  It must be between 0 and
  1560.    63.
  1561.  
  1562. Return value
  1563.  
  1564.    none
  1565.  
  1566. Restrictions
  1567.  
  1568.    If source_page and dest_page both reference logical pages, the pages must
  1569.    exist in the same type of memory.  For example, you cannot copy a logical
  1570.    page in extended memory to a logical page in conventional memory.
  1571.  
  1572. See also
  1573.  
  1574.    fg_alloccms, fg_allocems, fg_allocxms, fg_initems, fg_initxms, fg_transfer
  1575.  
  1576. Examples
  1577.  
  1578.    8-9, 9-22
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.  
  1592.                                       21
  1593. fg_cursor
  1594.  
  1595. Prototype
  1596.  
  1597.    void fg_cursor (int state);
  1598.    sub FGcursor (state%)
  1599.    subroutine fg_cursor (integer*2 state)
  1600.    procedure fg_cursor (state : integer);
  1601.  
  1602. Description
  1603.  
  1604.    The fg_cursor routine determines the ROM BIOS cursor visibility in text
  1605.    video modes.  After calling fg_setmode, the cursor is made visible by
  1606.    default.
  1607.  
  1608. Parameters
  1609.  
  1610.    The state parameter defines the cursor visibility.  If it is 0, the cursor
  1611.    becomes invisible; if it is 1, the cursor becomes visible.
  1612.  
  1613. Return value
  1614.  
  1615.    none
  1616.  
  1617. Restrictions
  1618.  
  1619.    This routine has no effect in graphics video modes.
  1620.  
  1621. Examples
  1622.  
  1623.    3-1, 3-2, 3-3, 3-4, 3-5, 5-16, 7-1, 7-2, 7-3, 8-3, 8-5, 8-7, 9-7, 9-21,
  1624.    9-23, 9-25, 11-4
  1625.  
  1626.  
  1627.  
  1628.  
  1629.  
  1630.  
  1631.  
  1632.  
  1633.  
  1634.  
  1635.  
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.  
  1648.  
  1649.  
  1650.  
  1651.                                       22
  1652. fg_dash
  1653.  
  1654. Prototype
  1655.  
  1656.    void fg_dash (int ix, int iy, int pattern);
  1657.    sub FGdash (ix%, iy%, pattern%)
  1658.    subroutine fg_dash (integer*2 ix, integer*2 iy, integer*2 pattern)
  1659.    procedure fg_dash (ix, iy, pattern : integer);
  1660.  
  1661. Description
  1662.  
  1663.    The fg_dash routine draws a dashed line from the graphics cursor position
  1664.    to an absolute screen space position.  It also makes the destination
  1665.    position the new graphics cursor position.
  1666.  
  1667. Parameters
  1668.  
  1669.    ix is the screen space x coordinate of the destination position.
  1670.  
  1671.    iy is the screen space y coordinate of the destination position.
  1672.  
  1673.    pattern is a 16-bit value representing a cyclic dash pattern.  Bits that
  1674.    are 1 will result in a pixel being drawn; bits that are 0 will result in a
  1675.    pixel being skipped.
  1676.  
  1677. Return value
  1678.  
  1679.    none
  1680.  
  1681. Restrictions
  1682.  
  1683.    This routine has no effect in text video modes.
  1684.  
  1685. See also
  1686.  
  1687.    fg_dashrel, fg_dashrw, fg_dashw, fg_move
  1688.  
  1689. Examples
  1690.  
  1691.    6-6
  1692.  
  1693.  
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.                                       23
  1711. fg_dashrel
  1712.  
  1713. Prototype
  1714.  
  1715.    void fg_dashrel (int ix, int iy, int pattern);
  1716.    sub FGdashrel (ix%, iy%, pattern%)
  1717.    subroutine fg_dashrel (integer*2 ix, integer*2 iy, integer*2 pattern)
  1718.    procedure fg_dashrel (ix, iy, pattern : integer);
  1719.  
  1720. Description
  1721.  
  1722.    The fg_dash routine draws a dashed line from the graphics cursor position
  1723.    to a screen space position relative to it.  It also makes the destination
  1724.    position the new graphics cursor position.
  1725.  
  1726. Parameters
  1727.  
  1728.    ix is the screen space x offset of the destination position.
  1729.  
  1730.    iy is the screen space y offset of the destination position.
  1731.  
  1732.    pattern is a 16-bit value representing a cyclic dash pattern.  Bits that
  1733.    are 1 will result in a pixel being drawn; bits that are 0 will result in a
  1734.    pixel being skipped.
  1735.  
  1736. Return value
  1737.  
  1738.    none
  1739.  
  1740. Restrictions
  1741.  
  1742.    This routine has no effect in text video modes.
  1743.  
  1744. See also
  1745.  
  1746.    fg_dash, fg_dashrw, fg_dashw, fg_moverel
  1747.  
  1748.  
  1749.  
  1750.  
  1751.  
  1752.  
  1753.  
  1754.  
  1755.  
  1756.  
  1757.  
  1758.  
  1759.  
  1760.  
  1761.  
  1762.  
  1763.  
  1764.  
  1765.  
  1766.  
  1767.  
  1768.  
  1769.                                       24
  1770. fg_dashrw
  1771.  
  1772. Prototype
  1773.  
  1774.    void fg_dashrw (double x, double y, int pattern);
  1775.    sub FGdashrw (x#, y#, pattern%)
  1776.    subroutine fg_dashrw (real*8 x, real*8 y, integer*2 pattern)
  1777.    procedure fg_dashrw (x, y : real; pattern : integer);
  1778.  
  1779. Description
  1780.  
  1781.    The fg_dashrw routine draws a dashed line from the graphics cursor position
  1782.    to a world space position relative to it.  It also makes the destination
  1783.    position the new graphics cursor position.
  1784.  
  1785. Parameters
  1786.  
  1787.    x is the world space x offset of the destination position.
  1788.  
  1789.    y is the world space y offset of the destination position.
  1790.  
  1791.    pattern is a 16-bit value representing a cyclic dash pattern.  Bits that
  1792.    are 1 will result in a pixel being drawn; bits that are 0 will result in a
  1793.    pixel being skipped.
  1794.  
  1795. Return value
  1796.  
  1797.    none
  1798.  
  1799. Restrictions
  1800.  
  1801.    This routine is not available in Fastgraph/Light and has no effect in text
  1802.    video modes.
  1803.  
  1804. See also
  1805.  
  1806.    fg_dash, fg_dashrel, fg_dashw, fg_moverw
  1807.  
  1808.  
  1809.  
  1810.  
  1811.  
  1812.  
  1813.  
  1814.  
  1815.  
  1816.  
  1817.  
  1818.  
  1819.  
  1820.  
  1821.  
  1822.  
  1823.  
  1824.  
  1825.  
  1826.  
  1827.  
  1828.                                       25
  1829. fg_dashw
  1830.  
  1831. Prototype
  1832.  
  1833.    void fg_dashw (double x, double y, int pattern);
  1834.    sub FGdashw (x#, y#, pattern%)
  1835.    subroutine fg_dashw (real*8 x, real*8 y, integer*2 pattern)
  1836.    procedure fg_dashw (x, y : real; pattern : integer);
  1837.  
  1838. Description
  1839.  
  1840.    The fg_dashw routine draws a dashed line from the graphics cursor position
  1841.    to an absolute world space position.  It also makes the destination
  1842.    position the new graphics cursor position.
  1843.  
  1844. Parameters
  1845.  
  1846.    x is the world space x coordinate of the destination position.
  1847.  
  1848.    y is the world space y coordinate of the destination position.
  1849.  
  1850.    pattern is a 16-bit value representing a cyclic dash pattern.  Bits that
  1851.    are 1 will result in a pixel being drawn; bits that are 0 will result in a
  1852.    pixel being skipped.
  1853.  
  1854. Return value
  1855.  
  1856.    none
  1857.  
  1858. Restrictions
  1859.  
  1860.    This routine is not available in Fastgraph/Light and has no effect in text
  1861.    video modes.
  1862.  
  1863. See also
  1864.  
  1865.    fg_dash, fg_dashrel, fg_dashrw, fg_movew
  1866.  
  1867.  
  1868.  
  1869.  
  1870.  
  1871.  
  1872.  
  1873.  
  1874.  
  1875.  
  1876.  
  1877.  
  1878.  
  1879.  
  1880.  
  1881.  
  1882.  
  1883.  
  1884.  
  1885.  
  1886.  
  1887.                                       26
  1888. fg_defcolor
  1889.  
  1890. Prototype
  1891.  
  1892.    void fg_defcolor (int index, int value);
  1893.    sub FGdefcolor (index%, value%)
  1894.    subroutine fg_defcolor (integer*2 index, integer*2 value)
  1895.    procedure fg_defcolor (index, value : integer);
  1896.  
  1897. Description
  1898.  
  1899.    The fg_defcolor routine assigns a color value to a virtual color index.
  1900.  
  1901. Parameters
  1902.  
  1903.    index is the virtual color index to define, between 0 and 255.
  1904.  
  1905.    value is the color value to assign to the specified color index.  It must
  1906.    be between 0 and the maximum color value for the current video mode.
  1907.  
  1908. Return value
  1909.  
  1910.    none
  1911.  
  1912. Restrictions
  1913.  
  1914.    This routine has no effect in text video modes or in 256-color graphics
  1915.    video modes.
  1916.  
  1917. See also
  1918.  
  1919.    fg_getindex, fg_palette, fg_setcolor
  1920.  
  1921. Examples
  1922.  
  1923.    5-15, 5-16
  1924.  
  1925.  
  1926.  
  1927.  
  1928.  
  1929.  
  1930.  
  1931.  
  1932.  
  1933.  
  1934.  
  1935.  
  1936.  
  1937.  
  1938.  
  1939.  
  1940.  
  1941.  
  1942.  
  1943.  
  1944.  
  1945.  
  1946.                                       27
  1947. fg_dispfile
  1948.  
  1949. Prototype
  1950.  
  1951.    void fg_dispfile (char *filename, int width, int format);
  1952.    sub FGdispfile (filename$, width%, format%)
  1953.    subroutine fg_dispfile (character*(*) filename, integer*2 width, integer*2
  1954.    format)
  1955.    procedure fg_dispfile (filename : string; width, format : integer);
  1956.  
  1957. Description
  1958.  
  1959.    The fg_dispfile routine displays an image stored in Fastgraph's standard or
  1960.    packed pixel run format, where the image resides in an external file.  The
  1961.    image will be positioned so that its lower left corner is at the graphics
  1962.    cursor position.  Refer to the descriptions of the fg_display and
  1963.    fg_displayp routines for more information about the two pixel run formats.
  1964.  
  1965. Parameters
  1966.  
  1967.    filename is the name of the file that contains the image.  A device and
  1968.    path name may be included as part of the file name.  The file name must be
  1969.    terminated by a null character (that is, a zero byte).
  1970.  
  1971.    width is the width of the image in pixels.  It must be greater than zero.
  1972.  
  1973.    format specifies the image format.  The value of format must be 0 if the
  1974.    image is in standard pixel run format, and 1 if the image is in packed
  1975.    pixel run format.
  1976.  
  1977. Return value
  1978.  
  1979.    none
  1980.  
  1981. Restrictions
  1982.  
  1983.    This routine has no effect in text video modes.
  1984.  
  1985. See also
  1986.  
  1987.    fg_display, fg_displayp, fg_disppcx, fg_pattern
  1988.  
  1989. Examples
  1990.  
  1991.    9-13, 9-14
  1992.  
  1993.  
  1994.  
  1995.  
  1996.  
  1997.  
  1998.  
  1999.  
  2000.  
  2001.  
  2002.  
  2003.  
  2004.  
  2005.                                       28
  2006. fg_display
  2007.  
  2008. Prototype
  2009.  
  2010.    void fg_display (char *map_array, int runs, int width);
  2011.    sub FGdisplay (map_array$, runs%, width%)
  2012.    subroutine fg_display (integer*1 map_array, integer*2 runs, integer*2
  2013.    width)
  2014.    procedure fg_display (var map_array : byte; runs, width : integer);
  2015.  
  2016. Description
  2017.  
  2018.    The fg_display routine displays an image stored in Fastgraph's standard
  2019.    pixel run format, where the image resides in an array.  The image will be
  2020.    positioned so that its lower left corner is at the graphics cursor
  2021.    position.
  2022.  
  2023. Parameters
  2024.  
  2025.    map_array is the arbitrary-length array containing the pixel run map.  The
  2026.    pixel runs are represented by (color,count) pairs, as shown below.
  2027.  
  2028.  
  2029.                              [0]   color for run 1
  2030.  
  2031.                              [1]   count for run 1
  2032.  
  2033.                              [2]   color for run 2
  2034.  
  2035.                              [3]   count for run 2
  2036.                                           .
  2037.                                           .
  2038.                                           .
  2039.                           [2n-2]   color for run n
  2040.  
  2041.                           [2n-1]   count for run n
  2042.  
  2043.  
  2044.    Each "color" element is a value between 0 and 255 specifying the color
  2045.    index for that pixel run.  Each "count" element is a value between 0 and
  2046.    255 specifying the length in pixels of that pixel run.
  2047.  
  2048.    runs is the number of pixel runs to display from the pixel run map.  It is
  2049.    normally 1/2 the size of the map_array array.
  2050.  
  2051.    width is the width of the image in pixels.  It must be greater than zero.
  2052.  
  2053. Return value
  2054.  
  2055.    none
  2056.  
  2057. Restrictions
  2058.  
  2059.    This routine has no effect in text video modes.
  2060.  
  2061.  
  2062.  
  2063.  
  2064.                                       29
  2065. fg_display (continued)
  2066.  
  2067. See also
  2068.  
  2069.    fg_dispfile, fg_displayp, fg_pattern
  2070.  
  2071. Examples
  2072.  
  2073.    9-10, 9-12
  2074.  
  2075.  
  2076.  
  2077.  
  2078.  
  2079.  
  2080.  
  2081.  
  2082.  
  2083.  
  2084.  
  2085.  
  2086.  
  2087.  
  2088.  
  2089.  
  2090.  
  2091.  
  2092.  
  2093.  
  2094.  
  2095.  
  2096.  
  2097.  
  2098.  
  2099.  
  2100.  
  2101.  
  2102.  
  2103.  
  2104.  
  2105.  
  2106.  
  2107.  
  2108.  
  2109.  
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.  
  2117.  
  2118.  
  2119.  
  2120.  
  2121.  
  2122.  
  2123.                                       30
  2124. fg_displayp
  2125.  
  2126. Prototype
  2127.  
  2128.    void fg_displayp (char *map_array, int runs, int width);
  2129.    sub FGdisplayp (map_array$, runs%, width%)
  2130.    subroutine fg_displayp (integer*1 map_array, integer*2 runs, integer*2
  2131.    width)
  2132.    procedure fg_displayp (var map_array : byte; runs, width : integer);
  2133.  
  2134. Description
  2135.  
  2136.    The fg_displayp routine displays an image stored in Fastgraph's packed
  2137.    pixel run format, where the image resides in an array.  The image will be
  2138.    positioned so that its lower left corner is at the graphics cursor
  2139.    position.
  2140.  
  2141. Parameters
  2142.  
  2143.    map_array is the arbitrary-length array containing the pixel run map.  The
  2144.    pixel runs are represented by (color,count) pairs, as shown below.
  2145.  
  2146.                         7                4   3                0
  2147.  
  2148.                    [0]    color for run 1     color for run 2
  2149.  
  2150.                    [1]              count for run 1
  2151.  
  2152.                    [2]              count for run 2
  2153.  
  2154.                    [3]    color for run 3     color for run 4
  2155.  
  2156.                    [4]              count for run 3
  2157.  
  2158.                    [5]              count for run 4
  2159.                                            .
  2160.                                            .
  2161.                                            .
  2162.               [3n/2-3]   color for run n-1    color for run n
  2163.  
  2164.               [3n/2-2]             count for run n-1
  2165.  
  2166.               [3n/2-1]              count for run n
  2167.  
  2168.  
  2169.    Each "color" element is a value between 0 and 15 specifying the color index
  2170.    for that pixel run.  Each "count" element is a value between 0 and 255
  2171.    specifying the length in pixels of that pixel run.
  2172.  
  2173.    runs is the number of pixel runs to display from the pixel run map.  It is
  2174.    normally 2/3 the size of the map_array array.
  2175.  
  2176.    width is the width of the image in pixels.  It must be greater than zero.
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.                                       31
  2183. fg_displayp (continued)
  2184.  
  2185. Return value
  2186.  
  2187.    none
  2188.  
  2189. Restrictions
  2190.  
  2191.    This routine has no effect in text video modes.
  2192.  
  2193. See also
  2194.  
  2195.    fg_dispfile, fg_display, fg_pattern
  2196.  
  2197. Examples
  2198.  
  2199.    9-11, 9-12
  2200.  
  2201.  
  2202.  
  2203.  
  2204.  
  2205.  
  2206.  
  2207.  
  2208.  
  2209.  
  2210.  
  2211.  
  2212.  
  2213.  
  2214.  
  2215.  
  2216.  
  2217.  
  2218.  
  2219.  
  2220.  
  2221.  
  2222.  
  2223.  
  2224.  
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239.  
  2240.  
  2241.                                       32
  2242. fg_disppcx
  2243.  
  2244. Prototype
  2245.  
  2246.    int fg_disppcx (char *filename, int flags);
  2247.    function FGdisppcx% (filename$, flags%)
  2248.    integer*2 function fg_disppcx (character*(*) filename, integer*2 flags)
  2249.    function fg_disppcx (filename : string; flags : integer) : integer;
  2250.  
  2251. Description
  2252.  
  2253.    The fg_disppcx routine displays an image stored in a PCX file.  The image
  2254.    will be positioned so that its upper left corner is at the graphics cursor
  2255.    position of the active video page.
  2256.  
  2257. Parameters
  2258.  
  2259.    filename is the name of the PCX file.  A device and path name may be
  2260.    included as part of the file name.  The file name must be terminated by a
  2261.    null character (that is, a zero byte).
  2262.  
  2263.    flags is a bit mask that controls how the image is displayed.
  2264.      Bit 0
  2265.         0 = use palette values stored in the PCX file
  2266.         1 = use the current palette settings
  2267.      Bits 1-15 are reserved for future use and should be zero.
  2268.  
  2269. Return value
  2270.  
  2271.    0 = success
  2272.    1 = file not found
  2273.    2 = file is not a PCX file
  2274.  
  2275. Restrictions
  2276.  
  2277.    PCX files are specific to certain video modes.  The table below summarizes
  2278.    the compatible video modes for PCX files.
  2279.  
  2280.                      If PCX file was   You can display
  2281.                      created in mode   it in these modes
  2282.  
  2283.                      4 or 5            4 or 5
  2284.                      6 or 11           6, 11, 13 to 18
  2285.                      9                 9
  2286.                      13 to 18          13 to 18
  2287.                      19                19 to 23
  2288.  
  2289.    Displaying a PCX file at a lower resolution (for example, a 640x480 PCX
  2290.    file at 320x200) will truncate the display on the right and on the bottom.
  2291.    This effectively displays the upper left corner of the PCX file.  If you
  2292.    attempt to display a PCX file in an incompatible video mode, fg_disppcx
  2293.    will still display something, but it will be garbled.
  2294.  
  2295.    The fg_disppcx routine has no effect in text video modes or in the Hercules
  2296.    low-resolution graphics mode.
  2297.  
  2298.  
  2299.  
  2300.                                       33
  2301. fg_disppcx (continued)
  2302.  
  2303. See also
  2304.  
  2305.    fg_dispfile, fg_makepcx
  2306.  
  2307. Examples
  2308.  
  2309.    9-15
  2310.  
  2311.  
  2312.  
  2313.  
  2314.  
  2315.  
  2316.  
  2317.  
  2318.  
  2319.  
  2320.  
  2321.  
  2322.  
  2323.  
  2324.  
  2325.  
  2326.  
  2327.  
  2328.  
  2329.  
  2330.  
  2331.  
  2332.  
  2333.  
  2334.  
  2335.  
  2336.  
  2337.  
  2338.  
  2339.  
  2340.  
  2341.  
  2342.  
  2343.  
  2344.  
  2345.  
  2346.  
  2347.  
  2348.  
  2349.  
  2350.  
  2351.  
  2352.  
  2353.  
  2354.  
  2355.  
  2356.  
  2357.  
  2358.  
  2359.                                       34
  2360. fg_draw
  2361.  
  2362. Prototype
  2363.  
  2364.    void fg_draw (int ix, int iy);
  2365.    sub FGdraw (ix%, iy%)
  2366.    subroutine fg_draw (integer*2 ix, integer*2 iy)
  2367.    procedure fg_draw (ix, iy : integer);
  2368.  
  2369. Description
  2370.  
  2371.    The fg_draw routine draws a solid line from the graphics cursor position to
  2372.    an absolute screen space position.  It also makes the destination position
  2373.    the new graphics cursor position.
  2374.  
  2375. Parameters
  2376.  
  2377.    ix is the screen space x coordinate of the destination position.
  2378.  
  2379.    iy is the screen space y coordinate of the destination position.
  2380.  
  2381. Return value
  2382.  
  2383.    none
  2384.  
  2385. Restrictions
  2386.  
  2387.    This routine has no effect in text video modes.
  2388.  
  2389. See also
  2390.  
  2391.    fg_drawrel, fg_drawrw, fg_draww, fg_move
  2392.  
  2393. Examples
  2394.  
  2395.    6-2, 6-5, 11-5, 11-6
  2396.  
  2397.  
  2398.  
  2399.  
  2400.  
  2401.  
  2402.  
  2403.  
  2404.  
  2405.  
  2406.  
  2407.  
  2408.  
  2409.  
  2410.  
  2411.  
  2412.  
  2413.  
  2414.  
  2415.  
  2416.  
  2417.  
  2418.                                       35
  2419. fg_drawmap
  2420.  
  2421. Prototype
  2422.  
  2423.    void fg_drawmap (char *map_array, int width, int height);
  2424.    sub FGdrawmap (map_array$, width%, height%)
  2425.    subroutine fg_drawmap (integer*1 map_array, integer*2 width, integer*2
  2426.    height)
  2427.    procedure fg_drawmap (var map_array : byte; width, height : integer);
  2428.  
  2429. Description
  2430.  
  2431.    The fg_drawmap routine displays an image stored as a mode-independent bit
  2432.    map.  The image will be positioned so that its lower left corner is at the
  2433.    graphics cursor position.  Refer to the Fastgraph User's Guide for complete
  2434.    information about mode-independent bit maps.
  2435.  
  2436. Parameters
  2437.  
  2438.    map_array is the arbitrary-length array containing the bit map.  Each byte
  2439.    of map_array represents eight pixels.  Bits that are set (1) result in the
  2440.    corresponding pixel being displayed in the current color.  Bits that are
  2441.    reset (0) leave the corresponding pixel unchanged.
  2442.  
  2443.    width is the width in bytes of the bit map.
  2444.  
  2445.    height is the height in bytes (pixel rows) of the bit map.
  2446.  
  2447. Return value
  2448.  
  2449.    none
  2450.  
  2451. Restrictions
  2452.  
  2453.    none
  2454.  
  2455. See also
  2456.  
  2457.    fg_drwimage, fg_getmap
  2458.  
  2459. Examples
  2460.  
  2461.    9-1, 9-2, 9-18, 9-19
  2462.  
  2463.  
  2464.  
  2465.  
  2466.  
  2467.  
  2468.  
  2469.  
  2470.  
  2471.  
  2472.  
  2473.  
  2474.  
  2475.  
  2476.  
  2477.                                       36
  2478. fg_drawmask
  2479.  
  2480. Prototype
  2481.  
  2482.    void fg_drawmask (char *map_array, int runs, int width);
  2483.    sub FGdrawmask (map_array$, runs%, width%)
  2484.    subroutine fg_drawmask (integer*1 map_array, integer*2 runs, integer*2
  2485.    width)
  2486.    procedure fg_drawmask (var map_array : byte; runs, width : integer);
  2487.  
  2488. Description
  2489.  
  2490.    The fg_drawmask routine displays an image stored as a masking map.  The
  2491.    image will be positioned so that its lower left corner is at the graphics
  2492.    cursor position.  Refer to the Fastgraph User's Guide for a complete
  2493.    discussion of masking maps.
  2494.  
  2495. Parameters
  2496.  
  2497.    map_array is the arbitrary-length array containing the masking map.  The
  2498.    masking map is a series of alternating "protect" and "zero" pixel runs, as
  2499.    shown below.
  2500.  
  2501.                       [1]   length of 1st protect run
  2502.  
  2503.                       [2]   length of 1st  zero   run
  2504.  
  2505.                       [3]   length of 2nd protect run
  2506.  
  2507.                       [4]   length of 2nd  zero   run
  2508.                                          .
  2509.                                          .
  2510.                                          .
  2511.                     [n-2]   length of final protect run
  2512.  
  2513.                     [n-1]   length of final  zero   run
  2514.  
  2515.    The "protect" runs protect video memory, while the "zero" runs zero video
  2516.    memory (that is, set the pixels to the background color).  The length of
  2517.    each run must be between 0 and 255.
  2518.  
  2519.    runs is the number of pixel runs in the masking map.
  2520.  
  2521.    width is the width in pixels of the masking map.
  2522.  
  2523. Return value
  2524.  
  2525.    none
  2526.  
  2527. Restrictions
  2528.  
  2529.    This routine has no effect in text video modes, or in the native EGA and
  2530.    VGA graphics video modes.
  2531.  
  2532.  
  2533.  
  2534.  
  2535.  
  2536.                                       37
  2537. fg_drawmask (continued)
  2538.  
  2539. See also
  2540.  
  2541.    fg_clipmask, fg_flipmask, fg_revmask
  2542.  
  2543. Examples
  2544.  
  2545.    9-16, 9-17
  2546.  
  2547.  
  2548.  
  2549.  
  2550.  
  2551.  
  2552.  
  2553.  
  2554.  
  2555.  
  2556.  
  2557.  
  2558.  
  2559.  
  2560.  
  2561.  
  2562.  
  2563.  
  2564.  
  2565.  
  2566.  
  2567.  
  2568.  
  2569.  
  2570.  
  2571.  
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578.  
  2579.  
  2580.  
  2581.  
  2582.  
  2583.  
  2584.  
  2585.  
  2586.  
  2587.  
  2588.  
  2589.  
  2590.  
  2591.  
  2592.  
  2593.  
  2594.  
  2595.                                       38
  2596. fg_drawrel
  2597.  
  2598. Prototype
  2599.  
  2600.    void fg_drawrel (int ix, int iy);
  2601.    sub FGdrawrel (ix%, iy%)
  2602.    subroutine fg_drawrel (integer*2 ix, integer*2 iy)
  2603.    procedure fg_drawrel (ix, iy : integer);
  2604.  
  2605. Description
  2606.  
  2607.    The fg_drawrel routine draws a solid line from the graphics cursor position
  2608.    to a screen space position relative to it.  It also makes the destination
  2609.    position the new graphics cursor position.
  2610.  
  2611. Parameters
  2612.  
  2613.    ix is the screen space x offset of the destination position.
  2614.  
  2615.    iy is the screen space y offset of the destination position.
  2616.  
  2617. Return value
  2618.  
  2619.    none
  2620.  
  2621. Restrictions
  2622.  
  2623.    This routine has no effect in text video modes.
  2624.  
  2625. See also
  2626.  
  2627.    fg_draw, fg_drawrw, fg_draww, fg_moverel
  2628.  
  2629. Examples
  2630.  
  2631.    6-3, 6-15
  2632.  
  2633.  
  2634.  
  2635.  
  2636.  
  2637.  
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.  
  2645.  
  2646.  
  2647.  
  2648.  
  2649.  
  2650.  
  2651.  
  2652.  
  2653.  
  2654.                                       39
  2655. fg_drawrw
  2656.  
  2657. Prototype
  2658.  
  2659.    void fg_drawrw (double x, double y);
  2660.    sub FGdrawrw (x#, y#)
  2661.    subroutine fg_drawrw (real*8 x, real*8 y)
  2662.    procedure fg_drawrw (x, y : real);
  2663.  
  2664. Description
  2665.  
  2666.    The fg_drawrw routine draws a solid line from the graphics cursor position
  2667.    to a world space position relative to it.  It also makes the destination
  2668.    position the new graphics cursor position.
  2669.  
  2670. Parameters
  2671.  
  2672.    x is the world space x offset of the destination position.
  2673.  
  2674.    y is the world space y offset of the destination position.
  2675.  
  2676. Return value
  2677.  
  2678.    none
  2679.  
  2680. Restrictions
  2681.  
  2682.    This routine is not available in Fastgraph/Light and has no effect in text
  2683.    video modes.
  2684.  
  2685. See also
  2686.  
  2687.    fg_draw, fg_drawrel, fg_draww, fg_moverw
  2688.  
  2689.  
  2690.  
  2691.  
  2692.  
  2693.  
  2694.  
  2695.  
  2696.  
  2697.  
  2698.  
  2699.  
  2700.  
  2701.  
  2702.  
  2703.  
  2704.  
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710.  
  2711.  
  2712.  
  2713.                                       40
  2714. fg_draww
  2715.  
  2716. Prototype
  2717.  
  2718.    void fg_draww (double x, double y);
  2719.    sub FGdraww (x#, y#)
  2720.    subroutine fg_draww (real*8 x, real*8 y)
  2721.    procedure fg_draww (x, y : real);
  2722.  
  2723. Description
  2724.  
  2725.    The fg_draww routine draws a dashed line from the graphics cursor position
  2726.    to an absolute world space position.  It also makes the destination
  2727.    position the new graphics cursor position.
  2728.  
  2729. Parameters
  2730.  
  2731.    x is the world space x coordinate of the destination position.
  2732.  
  2733.    y is the world space y coordinate of the destination position.
  2734.  
  2735. Return value
  2736.  
  2737.    none
  2738.  
  2739. Restrictions
  2740.  
  2741.    This routine is not available in Fastgraph/Light and has no effect in text
  2742.    video modes.
  2743.  
  2744. See also
  2745.  
  2746.    fg_draw, fg_drawrel, fg_drawrw, fg_movew
  2747.  
  2748. Examples
  2749.  
  2750.    6-4
  2751.  
  2752.  
  2753.  
  2754.  
  2755.  
  2756.  
  2757.  
  2758.  
  2759.  
  2760.  
  2761.  
  2762.  
  2763.  
  2764.  
  2765.  
  2766.  
  2767.  
  2768.  
  2769.  
  2770.  
  2771.  
  2772.                                       41
  2773. fg_drect
  2774.  
  2775. Prototype
  2776.  
  2777.    void fg_drect (int minx, int maxx, int miny, int maxy, char *matrix);
  2778.    sub FGdrect (minx%, maxx%, miny%, maxy%, matrix$)
  2779.    subroutine fg_drect (integer*2 minx, integer*2 maxx, integer*2 miny,
  2780.    integer*2 maxy,
  2781.      integer*1 matrix)
  2782.    procedure FGdrect (minx, maxx, miny, maxy : integer; var matrix : byte);
  2783.  
  2784. Description
  2785.  
  2786.    The fg_drect routine draws a dithered rectangle in screen space, without
  2787.    regard to the clipping region.
  2788.  
  2789. Parameters
  2790.  
  2791.    minx is the screen space x coordinate of the rectangle's left edge.
  2792.  
  2793.    maxx is the screen space x coordinate of the rectangle's right edge.  It
  2794.    must be greater than or equal to the value of minx.
  2795.  
  2796.    miny is the screen space y coordinate of the rectangle's top edge.
  2797.  
  2798.    maxy is the screen space y coordinate of the rectangle's bottom edge.  It
  2799.    must be greater than or equal to the value of miny.
  2800.  
  2801.    matrix is a four-element array (an eight-element array in 256-color
  2802.    graphics modes) that defines the dithering matrix.  The format of the
  2803.    dithering matrix is dependent on the video mode; refer to the Fastgraph
  2804.    User's Guide for more information.
  2805.  
  2806. Return value
  2807.  
  2808.    none
  2809.  
  2810. Restrictions
  2811.  
  2812.    This routine has no effect in text video modes.
  2813.  
  2814. See also
  2815.  
  2816.    fg_drectw, fg_rect, fg_rectw
  2817.  
  2818. Examples
  2819.  
  2820.    6-12, 6-13, 6-14
  2821.  
  2822.  
  2823.  
  2824.  
  2825.  
  2826.  
  2827.  
  2828.  
  2829.  
  2830.  
  2831.                                       42
  2832. fg_drectw
  2833.  
  2834. Prototype
  2835.  
  2836.    void fg_drectw (double xmin, double xmax, double ymin, double ymax, char
  2837.    *matrix);
  2838.    sub FGdrectw (xmin#, xmax#, ymin#, ymax#, matrix$)
  2839.    subroutine fg_drectw (real*8 xmin, real*8 xmax, real*8 ymin, real*8 ymax,
  2840.    integer*1 matrix)
  2841.    procedure fg_drectw (xmin, xmax, ymin, ymax : real; var matrix : byte);
  2842.  
  2843. Description
  2844.  
  2845.    The fg_drectw routine draws a dithered rectangle in world space, without
  2846.    regard to the clipping region.
  2847.  
  2848. Parameters
  2849.  
  2850.    xmin is the world space x coordinate of the rectangle's left edge.
  2851.  
  2852.    xmax is the world space x coordinate of the rectangle's right edge.  It
  2853.    must be greater than or equal to the value of xmin.
  2854.  
  2855.    ymin is the world space y coordinate of the rectangle's bottom edge.
  2856.  
  2857.    ymax is the world space y coordinate of the rectangle's top edge.  It must
  2858.    be greater than or equal to the value of ymin.
  2859.  
  2860.    matrix is a four-element array (an eight-element array in 256-color
  2861.    graphics modes) that defines the dithering matrix.  The format of the
  2862.    dithering matrix is dependent on the video mode; refer to the Fastgraph
  2863.    User's Guide for more information.
  2864.  
  2865. Return value
  2866.  
  2867.    none
  2868.  
  2869. Restrictions
  2870.  
  2871.    This routine is not available in Fastgraph/Light and has no effect in text
  2872.    video modes.
  2873.  
  2874. See also
  2875.  
  2876.    fg_drect, fg_rect, fg_rectw
  2877.  
  2878.  
  2879.  
  2880.  
  2881.  
  2882.  
  2883.  
  2884.  
  2885.  
  2886.  
  2887.  
  2888.  
  2889.  
  2890.                                       43
  2891. fg_drwimage
  2892.  
  2893. Prototype
  2894.  
  2895.    void fg_drwimage (char *map_array, int width, int height);
  2896.    sub FGdrwimage (map_array$, width%, height%)
  2897.    subroutine fg_drwimage (integer*1 map_array, integer*2 width, integer*2
  2898.    height)
  2899.    procedure fg_drwimage (var map_array : byte; width, height : integer);
  2900.  
  2901. Description
  2902.  
  2903.    The fg_drwimage routine displays an image stored as a mode-specific bit
  2904.    map.  The image will be positioned so that its lower left corner is at the
  2905.    graphics cursor position (or the text cursor position in text video modes).
  2906.    Refer to the Fastgraph User's Guide for complete information about mode-
  2907.    specific bit maps.
  2908.  
  2909. Parameters
  2910.  
  2911.    map_array is the arbitrary-length array containing the bit map.
  2912.  
  2913.    width is the width in bytes of the bit map.
  2914.  
  2915.    height is the height in bytes (pixel rows) of the bit map.
  2916.  
  2917. Return value
  2918.  
  2919.    none
  2920.  
  2921. Restrictions
  2922.  
  2923.    none
  2924.  
  2925. See also
  2926.  
  2927.    fg_clpimage, fg_flpimage, fg_getimage, fg_revimage
  2928.  
  2929. Examples
  2930.  
  2931.    9-3, 9-4, 9-5, 9-6, 9-7, 9-8, 9-9, 9-17, 9-20, 9-21
  2932.  
  2933.  
  2934.  
  2935.  
  2936.  
  2937.  
  2938.  
  2939.  
  2940.  
  2941.  
  2942.  
  2943.  
  2944.  
  2945.  
  2946.  
  2947.  
  2948.  
  2949.                                       44
  2950. fg_egacheck
  2951.  
  2952. Prototype
  2953.  
  2954.    int fg_egacheck (void);
  2955.    function FGegacheck% ()
  2956.    integer*2 function fg_egacheck ()
  2957.    function fg_egacheck : integer;
  2958.  
  2959. Description
  2960.  
  2961.    The fg_egacheck routine returns information about the active EGA adapter
  2962.    and display (or the EGA emulation capabilities of a VGA).  It is useful in
  2963.    checking if the adapter has enough memory to run a program.
  2964.  
  2965. Parameters
  2966.  
  2967.    none
  2968.  
  2969. Return value
  2970.  
  2971.    The fg_egacheck routine returns a value of 0 if an EGA is not found, or if
  2972.    an EGA without an Enhanced Color Display (ECD) is detected.  Otherwise,
  2973.    fg_egacheck returns a positive integer indicating the number of 64K-byte
  2974.    increments of video memory on the EGA, as summarized below.
  2975.  
  2976.      1 = EGA with 64K video memory
  2977.      2 = EGA with 128K video memory
  2978.      3 = EGA with 192K video memory
  2979.      4 = EGA with 256K video memory
  2980.  
  2981. Restrictions
  2982.  
  2983.    none
  2984.  
  2985. See also
  2986.  
  2987.    fg_testmode
  2988.  
  2989. Examples
  2990.  
  2991.    3-6, 15-2
  2992.  
  2993.  
  2994.  
  2995.  
  2996.  
  2997.  
  2998.  
  2999.  
  3000.  
  3001.  
  3002.  
  3003.  
  3004.  
  3005.  
  3006.  
  3007.  
  3008.                                       45
  3009. fg_ellipse
  3010.  
  3011. Prototype
  3012.  
  3013.    void fg_ellipse (int horiz, int vert);
  3014.    sub FGellipse (horiz%, vert%)
  3015.    subroutine fg_ellipse (integer*2 horiz, integer*2 vert)
  3016.    procedure fg_ellipse (horiz, vert : integer);
  3017.  
  3018. Description
  3019.  
  3020.    The fg_ellipse routine draws an unfilled ellipse in screen space.  The
  3021.    ellipse is centered at the current graphics cursor position, and its size
  3022.    is determined by the specified lengths of its semi-axes.
  3023.  
  3024. Parameters
  3025.  
  3026.    horiz defines the horizontal semi-axis of the ellipse (the absolute screen
  3027.    space distance from the center of the ellipse to its horizontal extremity).
  3028.  
  3029.    vert defines the vertical semi-axis of the ellipse (the absolute screen
  3030.    space distance from the center of the ellipse to its vertical extremity).
  3031.  
  3032. Return value
  3033.  
  3034.    none
  3035.  
  3036. Restrictions
  3037.  
  3038.    This routine has no effect in text video modes.
  3039.  
  3040. See also
  3041.  
  3042.    fg_circle, fg_circlew, fg_ellipsew
  3043.  
  3044. Examples
  3045.  
  3046.    6-9, 10-4, 10-5
  3047.  
  3048.  
  3049.  
  3050.  
  3051.  
  3052.  
  3053.  
  3054.  
  3055.  
  3056.  
  3057.  
  3058.  
  3059.  
  3060.  
  3061.  
  3062.  
  3063.  
  3064.  
  3065.  
  3066.  
  3067.                                       46
  3068. fg_ellipsew
  3069.  
  3070. Prototype
  3071.  
  3072.    void fg_ellipsew (double horiz, double vert);
  3073.    sub FGellipsew (horiz#, vert#)
  3074.    subroutine fg_ellipsew (real*8 horiz, real*8 vert)
  3075.    procedure fg_ellipsew (horiz, vert : real);
  3076.  
  3077. Description
  3078.  
  3079.    The fg_ellipsew routine draws an unfilled ellipse in world space.  The
  3080.    ellipse is centered at the current graphics cursor position, and its size
  3081.    is determined by the specified lengths of its semi-axes.
  3082.  
  3083. Parameters
  3084.  
  3085.    horiz defines the horizontal semi-axis of the ellipse (the absolute world
  3086.    space distance from the center of the ellipse to its horizontal extremity).
  3087.  
  3088.    vert defines the vertical semi-axis of the ellipse (the absolute world
  3089.    space distance from the center of the ellipse to its vertical extremity).
  3090.  
  3091. Return value
  3092.  
  3093.    none
  3094.  
  3095. Restrictions
  3096.  
  3097.    This routine is not available in Fastgraph/Light and has no effect in text
  3098.    video modes.
  3099.  
  3100. See also
  3101.  
  3102.    fg_circle, fg_circlew, fg_ellipse
  3103.  
  3104. Examples
  3105.  
  3106.    6-8
  3107.  
  3108.  
  3109.  
  3110.  
  3111.  
  3112.  
  3113.  
  3114.  
  3115.  
  3116.  
  3117.  
  3118.  
  3119.  
  3120.  
  3121.  
  3122.  
  3123.  
  3124.  
  3125.  
  3126.                                       47
  3127. fg_erase
  3128.  
  3129. Prototype
  3130.  
  3131.    void fg_erase (void);
  3132.    sub FGerase ()
  3133.    subroutine fg_erase ()
  3134.    procedure fg_erase;
  3135.  
  3136. Description
  3137.  
  3138.    The fg_erase routine clears the active video page.  In text modes, fg_erase
  3139.    stores a space character (ASCII 32) with a gray foreground attribute in
  3140.    each character cell.  In graphics modes, fg_erase sets each pixel to zero.
  3141.  
  3142. Parameters
  3143.  
  3144.    none
  3145.  
  3146. Return value
  3147.  
  3148.    none
  3149.  
  3150. Restrictions
  3151.  
  3152.    none
  3153.  
  3154. See also
  3155.  
  3156.    fg_reset
  3157.  
  3158. Examples
  3159.  
  3160.    8-9, 8-10, 9-12, 9-13, 9-22
  3161.  
  3162.  
  3163.  
  3164.  
  3165.  
  3166.  
  3167.  
  3168.  
  3169.  
  3170.  
  3171.  
  3172.  
  3173.  
  3174.  
  3175.  
  3176.  
  3177.  
  3178.  
  3179.  
  3180.  
  3181.  
  3182.  
  3183.  
  3184.  
  3185.                                       48
  3186. fg_fadein
  3187.  
  3188. Prototype
  3189.  
  3190.    void fg_fadein (int delay);
  3191.    sub FGfadein (delay%)
  3192.    subroutine fg_fadein (integer*2 delay)
  3193.    procedure fg_fadein (delay : integer);
  3194.  
  3195. Description
  3196.  
  3197.    The fg_fadein routine replaces the visual page contents with the hidden
  3198.    page contents.  The replacement is done randomly in small sections, thus
  3199.    giving a "fade in" effect.
  3200.  
  3201. Parameters
  3202.  
  3203.    delay controls the speed at which the replacement takes place.  A value of
  3204.    zero means to perform the replacement as quickly as possible, while 1 is
  3205.    slightly slower, 2 is slower yet, and so forth.
  3206.  
  3207. Return value
  3208.  
  3209.    none
  3210.  
  3211. Restrictions
  3212.  
  3213.    This routine has no effect in text video modes.
  3214.  
  3215. See also
  3216.  
  3217.    fg_fadeout, fg_sethpage
  3218.  
  3219. Examples
  3220.  
  3221.    11-2
  3222.  
  3223.  
  3224.  
  3225.  
  3226.  
  3227.  
  3228.  
  3229.  
  3230.  
  3231.  
  3232.  
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238.  
  3239.  
  3240.  
  3241.  
  3242.  
  3243.  
  3244.                                       49
  3245. fg_fadeout
  3246.  
  3247. Prototype
  3248.  
  3249.    void fg_fadeout (int delay);
  3250.    sub FGfadeout (delay%)
  3251.    subroutine fg_fadeout (integer*2 delay)
  3252.    procedure fg_fadeout (delay : integer);
  3253.  
  3254. Description
  3255.  
  3256.    The fg_fadeout routine replaces the visual page contents with pixels of the
  3257.    current color.  The replacement is done randomly in small sections, thus
  3258.    giving a "fade out" effect.
  3259.  
  3260. Parameters
  3261.  
  3262.    delay controls the speed at which the replacement takes place.  A value of
  3263.    zero means to perform the replacement as quickly as possible, while 1 is
  3264.    slightly slower, 2 is slower yet, and so forth.
  3265.  
  3266. Return value
  3267.  
  3268.    none
  3269.  
  3270. Restrictions
  3271.  
  3272.    This routine has no effect in text video modes.
  3273.  
  3274. See also
  3275.  
  3276.    fg_fadein, fg_setcolor
  3277.  
  3278. Examples
  3279.  
  3280.    11-1
  3281.  
  3282.  
  3283.  
  3284.  
  3285.  
  3286.  
  3287.  
  3288.  
  3289.  
  3290.  
  3291.  
  3292.  
  3293.  
  3294.  
  3295.  
  3296.  
  3297.  
  3298.  
  3299.  
  3300.  
  3301.  
  3302.  
  3303.                                       50
  3304. fg_flipmask
  3305.  
  3306. Prototype
  3307.  
  3308.    void fg_flipmask (char *map_array, int runs, int width);
  3309.    sub FGflipmask (map_array$, runs%, width%)
  3310.    subroutine fg_flipmask (integer*1 map_array, integer*2 runs, integer*2
  3311.    width)
  3312.    procedure fg_flipmask (var map_array : byte; runs, width : integer);
  3313.  
  3314. Description
  3315.  
  3316.    The fg_flipmask routine displays a reversed clipped image stored as a
  3317.    masking map.  The image will be positioned so that its lower left corner is
  3318.    at the graphics cursor position.  Refer to the description of the
  3319.    fg_drawmask routine for more information about masking maps.
  3320.  
  3321. Parameters
  3322.  
  3323.    map_array is the arbitrary-length array containing the masking map.
  3324.  
  3325.    runs is the number of pixel runs in the masking map.
  3326.  
  3327.    width is the width in pixels of the masking map.
  3328.  
  3329. Return value
  3330.  
  3331.    none
  3332.  
  3333. Restrictions
  3334.  
  3335.    This routine has no effect in text video modes, or in the native EGA and
  3336.    VGA graphics video modes.
  3337.  
  3338. See also
  3339.  
  3340.    fg_clipmask, fg_drawmask, fg_revmask, fg_setclip
  3341.  
  3342. Examples
  3343.  
  3344.    9-16
  3345.  
  3346.  
  3347.  
  3348.  
  3349.  
  3350.  
  3351.  
  3352.  
  3353.  
  3354.  
  3355.  
  3356.  
  3357.  
  3358.  
  3359.  
  3360.  
  3361.  
  3362.                                       51
  3363. fg_flpimage
  3364.  
  3365. Prototype
  3366.  
  3367.    void fg_flpimage (char *map_array, int width, int height);
  3368.    sub FGflpimage (map_array$, width%, height%)
  3369.    subroutine fg_flpimage (integer*1 map_array, integer*2 width, integer*2
  3370.    height)
  3371.    procedure fg_flpimage (var map_array : byte; width, height : integer);
  3372.  
  3373. Description
  3374.  
  3375.    The fg_flpimage routine displays a reversed clipped image stored as a mode-
  3376.    specific bit map.  The image will be positioned so that its lower left
  3377.    corner is at the graphics cursor position.  Only that part of the image
  3378.    that falls within the current clipping limits will be displayed, but the
  3379.    clipping limits will be extended to a byte boundary if necessary.  Refer to
  3380.    the Fastgraph User's Guide for complete information about mode-specific bit
  3381.    maps.
  3382.  
  3383. Parameters
  3384.  
  3385.    map_array is the arbitrary-length array containing the bit map.
  3386.  
  3387.    width is the width in bytes of the bit map.
  3388.  
  3389.    height is the height in bytes (pixel rows) of the bit map.
  3390.  
  3391. Return value
  3392.  
  3393.    none
  3394.  
  3395. Restrictions
  3396.  
  3397.    This routine has no effect in text video modes.
  3398.  
  3399. See also
  3400.  
  3401.    fg_clpimage, fg_drwimage, fg_getimage, fg_revimage, fg_setclip
  3402.  
  3403. Examples
  3404.  
  3405.    9-8, 9-9
  3406.  
  3407.  
  3408.  
  3409.  
  3410.  
  3411.  
  3412.  
  3413.  
  3414.  
  3415.  
  3416.  
  3417.  
  3418.  
  3419.  
  3420.  
  3421.                                       52
  3422. fg_freepage
  3423.  
  3424. Prototype
  3425.  
  3426.    int fg_freepage (int page_number);
  3427.    function FGfreepage% (page_number%)
  3428.    integer*2 function fg_freepage (integer*2 page_number)
  3429.    function fg_freepage (page_number : integer) : integer;
  3430.  
  3431. Description
  3432.  
  3433.    The fg_freepage routine releases a virtual or logical video page created
  3434.    with the fg_allocate, fg_alloccms, fg_allocems, or fg_allocxms routines.
  3435.  
  3436. Parameters
  3437.  
  3438.    page_number is the number of the virtual page to release.  It must be
  3439.    between 0 and 63.
  3440.  
  3441. Return value
  3442.  
  3443.    A status code indicating the success or failure of the virtual page
  3444.    release, as shown below.
  3445.  
  3446.      0 = virtual page released
  3447.      1 = specified page is a physical page
  3448.      7 = virtual page released, but memory control blocks were destroyed
  3449.      9 = attempt to use fg_freepage on a virtual or logical page that was
  3450. never created
  3451.  
  3452. Restrictions
  3453.  
  3454.    This routine has no effect if page_number references a physical video page,
  3455.    or a virtual page that was never created.
  3456.  
  3457. See also
  3458.  
  3459.    fg_allocate, fg_alloccms, fg_allocems, fg_allocxms
  3460.  
  3461. Examples
  3462.  
  3463.    8-3, 8-4, 8-5, 8-6, 8-8, 8-9, 9-22, 9-23, 9-24, 9-25, 10-4, 10-5, 11-2,
  3464.    11-5, 15-1
  3465.  
  3466.  
  3467.  
  3468.  
  3469.  
  3470.  
  3471.  
  3472.  
  3473.  
  3474.  
  3475.  
  3476.  
  3477.  
  3478.  
  3479.  
  3480.                                       53
  3481. fg_getaddr
  3482.  
  3483. Prototype
  3484.  
  3485.    int fg_getaddr (void);
  3486.    function FGgetaddr% ()
  3487.    integer*2 function fg_getaddr ()
  3488.    function fg_getaddr : integer;
  3489.  
  3490. Description
  3491.  
  3492.    The fg_getaddr routine returns the segment address of the active video
  3493.    page.
  3494.  
  3495. Parameters
  3496.  
  3497.    none
  3498.  
  3499. Return value
  3500.  
  3501.    The segment address of the active video page.
  3502.  
  3503. Restrictions
  3504.  
  3505.    none
  3506.  
  3507. See also
  3508.  
  3509.    fg_setpage
  3510.  
  3511. Examples
  3512.  
  3513.    8-8
  3514.  
  3515.  
  3516.  
  3517.  
  3518.  
  3519.  
  3520.  
  3521.  
  3522.  
  3523.  
  3524.  
  3525.  
  3526.  
  3527.  
  3528.  
  3529.  
  3530.  
  3531.  
  3532.  
  3533.  
  3534.  
  3535.  
  3536.  
  3537.  
  3538.  
  3539.                                       54
  3540. fg_getattr
  3541.  
  3542. Prototype
  3543.  
  3544.    int fg_getattr (int row, int column);
  3545.    function FGgetattr% (row%, column%)
  3546.    integer*2 function fg_getattr (integer*2 row, integer*2 column)
  3547.    function fg_getattr (row, column : integer) : integer;
  3548.  
  3549. Description
  3550.  
  3551.    The fg_getattr routine returns the character attribute stored at the
  3552.    specified position on the active video page.
  3553.  
  3554. Parameters
  3555.  
  3556.    row is the row number of the character cell to examine, between 0 and 24
  3557.    (unless you've called fg_setlines to increase the number of lines per
  3558.    page).
  3559.  
  3560.    column is the column number of the character cell to examine, between 0 and
  3561.    39 for 40-column modes, or between 0 and 79 for 80-column modes.
  3562.  
  3563. Return value
  3564.  
  3565.    The character attribute stored at the specified position.
  3566.  
  3567. Restrictions
  3568.  
  3569.    This routine has no effect in graphics video modes.
  3570.  
  3571. See also
  3572.  
  3573.    fg_getchar, fg_getimage
  3574.  
  3575. Examples
  3576.  
  3577.    7-4
  3578.  
  3579.  
  3580.  
  3581.  
  3582.  
  3583.  
  3584.  
  3585.  
  3586.  
  3587.  
  3588.  
  3589.  
  3590.  
  3591.  
  3592.  
  3593.  
  3594.  
  3595.  
  3596.  
  3597.  
  3598.                                       55
  3599. fg_getchar
  3600.  
  3601. Prototype
  3602.  
  3603.    int fg_getchar (int row, int column);
  3604.    function FGgetchar% (row%, column%)
  3605.    integer*2 function fg_getchar (integer*2 row, integer*2 column)
  3606.    function fg_getchar (row, column : integer) : integer;
  3607.  
  3608. Description
  3609.  
  3610.    The fg_getchar routine returns the character value stored at the specified
  3611.    position on the active video page.
  3612.  
  3613. Parameters
  3614.  
  3615.    row is the row number of the character cell to examine, between 0 and 24
  3616.    (unless you've called fg_setlines to increase the number of lines per
  3617.    page).
  3618.  
  3619.    column is the column number of the character cell to examine, between 0 and
  3620.    39 for 40-column modes, or between 0 and 79 for 80-column modes.
  3621.  
  3622. Return value
  3623.  
  3624.    The character value stored at the specified position.
  3625.  
  3626. Restrictions
  3627.  
  3628.    This routine has no effect in graphics video modes.
  3629.  
  3630. See also
  3631.  
  3632.    fg_getattr, fg_getimage
  3633.  
  3634. Examples
  3635.  
  3636.    7-4
  3637.  
  3638.  
  3639.  
  3640.  
  3641.  
  3642.  
  3643.  
  3644.  
  3645.  
  3646.  
  3647.  
  3648.  
  3649.  
  3650.  
  3651.  
  3652.  
  3653.  
  3654.  
  3655.  
  3656.  
  3657.                                       56
  3658. fg_getclock
  3659.  
  3660. Prototype
  3661.  
  3662.    long fg_getclock (void);
  3663.    function FGgetclock& ()
  3664.    integer*4 function fg_getclock ()
  3665.    function fg_getclock : longint;
  3666.  
  3667. Description
  3668.  
  3669.    The fg_getclock routine returns the number of clock ticks since midnight.
  3670.  
  3671. Parameters
  3672.  
  3673.    none
  3674.  
  3675. Return value
  3676.  
  3677.    The number of clock ticks since midnight.  There are approximately 18.2
  3678.    clock ticks per second.
  3679.  
  3680. Restrictions
  3681.  
  3682.    none
  3683.  
  3684. Examples
  3685.  
  3686.    14-2
  3687.  
  3688.  
  3689.  
  3690.  
  3691.  
  3692.  
  3693.  
  3694.  
  3695.  
  3696.  
  3697.  
  3698.  
  3699.  
  3700.  
  3701.  
  3702.  
  3703.  
  3704.  
  3705.  
  3706.  
  3707.  
  3708.  
  3709.  
  3710.  
  3711.  
  3712.  
  3713.  
  3714.  
  3715.  
  3716.                                       57
  3717. fg_getcolor
  3718.  
  3719. Prototype
  3720.  
  3721.    int fg_getcolor (void);
  3722.    function FGgetcolor% ()
  3723.    integer*2 function fg_getcolor ()
  3724.    function fg_getcolor : integer;
  3725.  
  3726. Description
  3727.  
  3728.    The fg_getcolor routine returns the current text attribute (in text modes)
  3729.    or color index (in graphics modes), as defined by the most recent call to
  3730.    fg_setattr or fg_setcolor.
  3731.  
  3732. Parameters
  3733.  
  3734.    none
  3735.  
  3736. Return value
  3737.  
  3738.    In graphics video modes, the return value is the current color index.  In
  3739.    text modes, it is the current text attribute.
  3740.  
  3741. Restrictions
  3742.  
  3743.    none
  3744.  
  3745. See also
  3746.  
  3747.    fg_setattr, fg_setcolor
  3748.  
  3749.  
  3750.  
  3751.  
  3752.  
  3753.  
  3754.  
  3755.  
  3756.  
  3757.  
  3758.  
  3759.  
  3760.  
  3761.  
  3762.  
  3763.  
  3764.  
  3765.  
  3766.  
  3767.  
  3768.  
  3769.  
  3770.  
  3771.  
  3772.  
  3773.  
  3774.  
  3775.                                       58
  3776. fg_getdacs
  3777.  
  3778. Prototype
  3779.  
  3780.    void fg_getdacs (int start, int count, char *values);
  3781.    sub FGgetdacs (start%, count%, values$)
  3782.    subroutine fg_getdacs (integer*2 start, integer*2 count, integer*1 values)
  3783.    procedure fg_getdacs (start, count : integer; var values : shortint);
  3784.  
  3785. Description
  3786.  
  3787.    The fg_getdacs routine retrieves the red, green, and blue color components
  3788.    of a contiguous block of video DAC registers.  Each color component is a
  3789.    value between 0 and 63; increasing values produce more intense colors.
  3790.    Reading many DAC registers with fg_getdacs is considerably faster than
  3791.    doing so individually with fg_getrgb.
  3792.  
  3793. Parameters
  3794.  
  3795.    start is the starting video DAC register number, between 0 and 255.
  3796.  
  3797.    count is the number of contiguous DAC registers to retrieve, between 1 and
  3798.    256.  If the sum of start and count exceeds 255, the register numbers wrap
  3799.    around and resume with register number 0.
  3800.  
  3801.    values is the array that will receive the color components.  The first
  3802.    three bytes of this array receive the red, green, and blue components for
  3803.    DAC register start, the next three bytes receive the components for
  3804.    register start+1, and so forth.  The size of the values array must be at
  3805.    least 3*count bytes.
  3806.  
  3807. Return value
  3808.  
  3809.    none
  3810.  
  3811. Restrictions
  3812.  
  3813.    This routine has no effect in text video modes, or in any graphics video
  3814.    mode numbered 16 or below (because these video modes do not use DAC
  3815.    registers).
  3816.  
  3817. See also
  3818.  
  3819.    fg_getrgb, fg_setdacs, fg_setrgb
  3820.  
  3821. Examples
  3822.  
  3823.    5-12
  3824.  
  3825.  
  3826.  
  3827.  
  3828.  
  3829.  
  3830.  
  3831.  
  3832.  
  3833.  
  3834.                                       59
  3835. fg_gethpage
  3836.  
  3837. Prototype
  3838.  
  3839.    int fg_gethpage (void);
  3840.    function FGgethpage% ()
  3841.    integer*2 function fg_gethpage ()
  3842.    function fg_gethpage : integer;
  3843.  
  3844. Description
  3845.  
  3846.    The fg_gethpage routine returns the hidden video page number (as set in the
  3847.    most recent call to fg_sethpage).
  3848.  
  3849. Parameters
  3850.  
  3851.    none
  3852.  
  3853. Return value
  3854.  
  3855.    The number of the hidden video page, between 0 and 63.
  3856.  
  3857. Restrictions
  3858.  
  3859.    none
  3860.  
  3861. See also
  3862.  
  3863.    fg_sethpage
  3864.  
  3865.  
  3866.  
  3867.  
  3868.  
  3869.  
  3870.  
  3871.  
  3872.  
  3873.  
  3874.  
  3875.  
  3876.  
  3877.  
  3878.  
  3879.  
  3880.  
  3881.  
  3882.  
  3883.  
  3884.  
  3885.  
  3886.  
  3887.  
  3888.  
  3889.  
  3890.  
  3891.  
  3892.  
  3893.                                       60
  3894. fg_getimage
  3895.  
  3896. Prototype
  3897.  
  3898.    void fg_getimage (char *map_array, int width, int height);
  3899.    sub FGgetimage (map_array$, width%, height%)
  3900.    subroutine fg_getimage (integer*1 map_array, integer*2 width, integer*2
  3901.    height)
  3902.    procedure fg_getimage (var map_array : byte; width, height : integer);
  3903.  
  3904. Description
  3905.  
  3906.    The fg_getimage routine retrieves an image as a mode-specific bit map.  The
  3907.    graphics cursor position (the text cursor position in text video modes)
  3908.    defines the lower left corner of the image to retrieve.  Refer to the
  3909.    Fastgraph User's Guide for complete information about mode-specific bit
  3910.    maps.
  3911.  
  3912. Parameters
  3913.  
  3914.    map_array is the arbitrary-length array in which to retrieve the bit map.
  3915.  
  3916.    width is the width in bytes of the bit map.
  3917.  
  3918.    height is the height in bytes (pixel rows) of the bit map.
  3919.  
  3920. Return value
  3921.  
  3922.    none
  3923.  
  3924. Restrictions
  3925.  
  3926.    none
  3927.  
  3928. See also
  3929.  
  3930.    fg_clpimage, fg_drwimage, fg_flpimage, fg_getmap, fg_revimage
  3931.  
  3932. Examples
  3933.  
  3934.    9-20, 9-21
  3935.  
  3936.  
  3937.  
  3938.  
  3939.  
  3940.  
  3941.  
  3942.  
  3943.  
  3944.  
  3945.  
  3946.  
  3947.  
  3948.  
  3949.  
  3950.  
  3951.  
  3952.                                       61
  3953. fg_getindex
  3954.  
  3955. Prototype
  3956.  
  3957.    int fg_getindex (int index);
  3958.    function FGgetindex% (index%)
  3959.    integer*2 function fg_getindex (integer*2 index)
  3960.    function fg_getindex (index : integer) : integer;
  3961.  
  3962. Description
  3963.  
  3964.    The fg_getindex routine returns the color value assigned to a specified
  3965.    virtual color index.
  3966.  
  3967. Parameters
  3968.  
  3969.    index is the virtual color index to retrieve, between 0 and 255.
  3970.  
  3971. Return value
  3972.  
  3973.    In graphics video modes with fewer than 256 available colors, the return
  3974.    value is the color value assigned to the specified virtual index.  In text
  3975.    modes and 256-color graphics modes, the fg_getindex routine returns the
  3976.    value passed to it.
  3977.  
  3978. Restrictions
  3979.  
  3980.    none
  3981.  
  3982. See also
  3983.  
  3984.    fg_defcolor, fg_palette, fg_setcolor
  3985.  
  3986.  
  3987.  
  3988.  
  3989.  
  3990.  
  3991.  
  3992.  
  3993.  
  3994.  
  3995.  
  3996.  
  3997.  
  3998.  
  3999.  
  4000.  
  4001.  
  4002.  
  4003.  
  4004.  
  4005.  
  4006.  
  4007.  
  4008.  
  4009.  
  4010.  
  4011.                                       62
  4012. fg_getkey
  4013.  
  4014. Prototype
  4015.  
  4016.    void fg_getkey (unsigned char *key, unsigned char *aux);
  4017.    sub FGgetkey (key$, aux$)
  4018.    subroutine fg_getkey (integer*1 key, integer*1 aux)
  4019.    procedure fg_getkey (var key, aux : byte);
  4020.  
  4021. Description
  4022.  
  4023.    The fg_getkey routine waits for a keystroke, or reads the next entry from
  4024.    the BIOS keyboard buffer (without echo).  It returns the keystroke's
  4025.    standard or extended keyboard code (a list of these appears in Chapter 12
  4026.    of the Fastgraph User's Guide).
  4027.  
  4028. Parameters
  4029.  
  4030.    key receives the keystroke's standard keyboard code if it represents a
  4031.    standard character.  If the keystroke represents an extended character, key
  4032.    will be set to zero.  In QuickBASIC, you must explicitly declare key as a
  4033.    fixed-length string variable of length 1.
  4034.  
  4035.    aux receives the keystroke's extended keyboard code if it represents an
  4036.    extended character.  If the keystroke represents a standard character, aux
  4037.    will be set to zero.  In QuickBASIC, you must explicitly declare aux as a
  4038.    fixed-length string variable of length 1.
  4039.  
  4040. Return value
  4041.  
  4042.    none
  4043.  
  4044. Restrictions
  4045.  
  4046.    none
  4047.  
  4048. See also
  4049.  
  4050.    fg_intkey, fg_waitkey
  4051.  
  4052. Examples
  4053.  
  4054.    12-1, 14-2
  4055.  
  4056.  
  4057.  
  4058.  
  4059.  
  4060.  
  4061.  
  4062.  
  4063.  
  4064.  
  4065.  
  4066.  
  4067.  
  4068.  
  4069.  
  4070.                                       63
  4071. fg_getlines
  4072.  
  4073. Prototype
  4074.  
  4075.    int fg_getlines (void);
  4076.    function FGgetlines% ()
  4077.    integer*2 function fg_getlines ()
  4078.    function fg_getlines : integer;
  4079.  
  4080. Description
  4081.  
  4082.    The fg_getlines routine returns the number of text rows per video page for
  4083.    the current video mode.
  4084.  
  4085. Parameters
  4086.  
  4087.    none
  4088.  
  4089. Return value
  4090.  
  4091.    The number of text rows per video page for the current video mode.
  4092.  
  4093. Restrictions
  4094.  
  4095.    none
  4096.  
  4097. See also
  4098.  
  4099.    fg_setlines
  4100.  
  4101. Examples
  4102.  
  4103.    3-5
  4104.  
  4105.  
  4106.  
  4107.  
  4108.  
  4109.  
  4110.  
  4111.  
  4112.  
  4113.  
  4114.  
  4115.  
  4116.  
  4117.  
  4118.  
  4119.  
  4120.  
  4121.  
  4122.  
  4123.  
  4124.  
  4125.  
  4126.  
  4127.  
  4128.  
  4129.                                       64
  4130. fg_getmap
  4131.  
  4132. Prototype
  4133.  
  4134.    void fg_getmap (char *map_array, int width, int height);
  4135.    sub FGgetmap (map_array$, width%, height%)
  4136.    subroutine fg_getmap (integer*1 map_array, integer*2 width, integer*2
  4137.    height)
  4138.    procedure fg_getmap (var map_array : byte; width, height : integer);
  4139.  
  4140. Description
  4141.  
  4142.    The fg_getmap routine retrieves an image as a mode-independent bit map.
  4143.    The graphics cursor position defines the lower left corner of the image to
  4144.    retrieve.  Refer to the Fastgraph User's Guide for complete information
  4145.    about mode-independent bit maps.
  4146.  
  4147. Parameters
  4148.  
  4149.    map_array is the arbitrary-length array in which to retrieve the bit map.
  4150.    Each byte of map_array represents eight pixels.  Pixels of the current
  4151.    color set the corresponding bits in map_array.  Pixels of other colors make
  4152.    the corresponding map_array bits zero.  In QuickBASIC, you must explicitly
  4153.    declare map_array as a fixed-length string variable of length width*height.
  4154.  
  4155.    width is the width in bytes of the bit map.
  4156.  
  4157.    height is the height in bytes (pixel rows) of the bit map.
  4158.  
  4159. Return value
  4160.  
  4161.    none
  4162.  
  4163. Restrictions
  4164.  
  4165.    This routine has no effect in text video modes.
  4166.  
  4167. See also
  4168.  
  4169.    fg_drawmap, fg_getimage
  4170.  
  4171. Examples
  4172.  
  4173.    9-18, 9-19
  4174.  
  4175.  
  4176.  
  4177.  
  4178.  
  4179.  
  4180.  
  4181.  
  4182.  
  4183.  
  4184.  
  4185.  
  4186.  
  4187.  
  4188.                                       65
  4189. fg_getmaxx
  4190.  
  4191. Prototype
  4192.  
  4193.    int fg_getmaxx (void);
  4194.    function FGgetmaxx% ()
  4195.    integer*2 function fg_getmaxx ()
  4196.    function fg_getmaxx : integer;
  4197.  
  4198. Description
  4199.  
  4200.    The fg_getmaxx routine returns the maximum x coordinate in screen space
  4201.    when used in a graphics video mode.  It returns the maximum column number
  4202.    in character space when used in a text mode.  In either case, the maximum x
  4203.    coordinate is one less than the horizontal screen resolution.
  4204.  
  4205. Parameters
  4206.  
  4207.    none
  4208.  
  4209. Return value
  4210.  
  4211.    The maximum x coordinate.
  4212.  
  4213. Restrictions
  4214.  
  4215.    none
  4216.  
  4217. See also
  4218.  
  4219.    fg_getmaxy
  4220.  
  4221. Examples
  4222.  
  4223.    4-1, 4-2
  4224.  
  4225.  
  4226.  
  4227.  
  4228.  
  4229.  
  4230.  
  4231.  
  4232.  
  4233.  
  4234.  
  4235.  
  4236.  
  4237.  
  4238.  
  4239.  
  4240.  
  4241.  
  4242.  
  4243.  
  4244.  
  4245.  
  4246.  
  4247.                                       66
  4248. fg_getmaxy
  4249.  
  4250. Prototype
  4251.  
  4252.    int fg_getmaxy (void);
  4253.    function FGgetmaxy% ()
  4254.    integer*2 function fg_getmaxy ()
  4255.    function fg_getmaxy : integer;
  4256.  
  4257. Description
  4258.  
  4259.    The fg_getmaxy routine returns the maximum y coordinate in screen space
  4260.    when used in a graphics video mode.  It returns the maximum row number in
  4261.    character space when used in a text mode.  In either case, the maximum y
  4262.    coordinate is one less than the vertical screen resolution.
  4263.  
  4264. Parameters
  4265.  
  4266.    none
  4267.  
  4268. Return value
  4269.  
  4270.    The maximum y coordinate.
  4271.  
  4272. Restrictions
  4273.  
  4274.    none
  4275.  
  4276. See also
  4277.  
  4278.    fg_getmaxx
  4279.  
  4280. Examples
  4281.  
  4282.    4-1, 4-2
  4283.  
  4284.  
  4285.  
  4286.  
  4287.  
  4288.  
  4289.  
  4290.  
  4291.  
  4292.  
  4293.  
  4294.  
  4295.  
  4296.  
  4297.  
  4298.  
  4299.  
  4300.  
  4301.  
  4302.  
  4303.  
  4304.  
  4305.  
  4306.                                       67
  4307. fg_getmode
  4308.  
  4309. Prototype
  4310.  
  4311.    int fg_getmode (void);
  4312.    function FGgetmode% ()
  4313.    integer*2 function fg_getmode ()
  4314.    function fg_getmode : integer;
  4315.  
  4316. Description
  4317.  
  4318.    The fg_getmode routine returns the current video mode number.  It is
  4319.    typically one of the first Fastgraph routines called in a program.  The
  4320.    value returned by fg_getmode can be retained to restore the original video
  4321.    mode when a program transfers control back to DOS.
  4322.  
  4323. Parameters
  4324.  
  4325.    none
  4326.  
  4327. Return value
  4328.  
  4329.    The current video mode number, between 0 and 23.  Refer to the description
  4330.    of the fg_setmode routine for descriptions of each video mode.
  4331.  
  4332. Restrictions
  4333.  
  4334.    none
  4335.  
  4336. See also
  4337.  
  4338.    fg_setmode
  4339.  
  4340. Examples
  4341.  
  4342.    3-3, 3-4, 3-5, 3-6, 3-7, 3-8, 3-9
  4343.  
  4344.  
  4345.  
  4346.  
  4347.  
  4348.  
  4349.  
  4350.  
  4351.  
  4352.  
  4353.  
  4354.  
  4355.  
  4356.  
  4357.  
  4358.  
  4359.  
  4360.  
  4361.  
  4362.  
  4363.  
  4364.  
  4365.                                       68
  4366. fg_getpage
  4367.  
  4368. Prototype
  4369.  
  4370.    int fg_getpage (void);
  4371.    function FGgetpage% ()
  4372.    integer*2 function fg_getpage ()
  4373.    function fg_getpage : integer;
  4374.  
  4375. Description
  4376.  
  4377.    The fg_getpage routine returns the active video page number (as set in the
  4378.    most recent call to fg_setpage).
  4379.  
  4380. Parameters
  4381.  
  4382.    none
  4383.  
  4384. Return value
  4385.  
  4386.    The number of the active video page, between 0 and 63.
  4387.  
  4388. Restrictions
  4389.  
  4390.    none
  4391.  
  4392. See also
  4393.  
  4394.    fg_setpage
  4395.  
  4396. Examples
  4397.  
  4398.    8-8
  4399.  
  4400.  
  4401.  
  4402.  
  4403.  
  4404.  
  4405.  
  4406.  
  4407.  
  4408.  
  4409.  
  4410.  
  4411.  
  4412.  
  4413.  
  4414.  
  4415.  
  4416.  
  4417.  
  4418.  
  4419.  
  4420.  
  4421.  
  4422.  
  4423.  
  4424.                                       69
  4425. fg_getpixel
  4426.  
  4427. Prototype
  4428.  
  4429.    int fg_getpixel (int ix, int iy);
  4430.    function FGgetpixel% (ix%, iy%)
  4431.    integer*2 function fg_getpixel (integer*2 ix, integer*2 iy)
  4432.    function fg_getpixel (ix, iy : integer) : integer;
  4433.  
  4434. Description
  4435.  
  4436.    The fg_getpixel routine returns the color value of a specified pixel.
  4437.  
  4438. Parameters
  4439.  
  4440.    ix is the pixel's screen space x coordinate.
  4441.  
  4442.    iy is the pixel's screen space y coordinate.
  4443.  
  4444. Return value
  4445.  
  4446.    The color value of the pixel, between 0 and one less than the number of
  4447.    colors available in the current video mode.  In text modes, fg_getpixel
  4448.    always returns zero.
  4449.  
  4450. Restrictions
  4451.  
  4452.    none
  4453.  
  4454. See also
  4455.  
  4456.    fg_point, fg_pointw
  4457.  
  4458. Examples
  4459.  
  4460.    6-1
  4461.  
  4462.  
  4463.  
  4464.  
  4465.  
  4466.  
  4467.  
  4468.  
  4469.  
  4470.  
  4471.  
  4472.  
  4473.  
  4474.  
  4475.  
  4476.  
  4477.  
  4478.  
  4479.  
  4480.  
  4481.  
  4482.  
  4483.                                       70
  4484. fg_getrgb
  4485.  
  4486. Prototype
  4487.  
  4488.    void fg_getrgb (int number, int *red, int *green, int *blue);
  4489.    sub FGgetrgb (number%, red%, green%, blue%)
  4490.    subroutine fg_getrgb (integer*2 number, integer*2 red, integer*2 green,
  4491.    integer*2 blue)
  4492.    procedure fg_getrgb (number : integer; var red, green, blue : integer);
  4493.  
  4494. Description
  4495.  
  4496.    The fg_getrgb routine returns the red, green, and blue color components for
  4497.    a specified video DAC register.  Each color component is a value between 0
  4498.    and 63; increasing values produce more intense colors.
  4499.  
  4500. Parameters
  4501.  
  4502.    number is the video DAC register number.  It must be between 0 and 15 in
  4503.    video modes 17 and 18, or between 0 and 255 in modes 19 through 23.
  4504.  
  4505.    red, green, and blue respectively receive the red, green, and blue
  4506.    components of the specified video DAC register.
  4507.  
  4508. Return value
  4509.  
  4510.    none
  4511.  
  4512. Restrictions
  4513.  
  4514.    This routine has no effect in text video modes, or in any graphics video
  4515.    mode numbered 16 or below (because these video modes do not use DAC
  4516.    registers).
  4517.  
  4518. See also
  4519.  
  4520.    fg_getdacs, fg_palette, fg_setdacs, fg_setrgb
  4521.  
  4522. Examples
  4523.  
  4524.    5-11
  4525.  
  4526.  
  4527.  
  4528.  
  4529.  
  4530.  
  4531.  
  4532.  
  4533.  
  4534.  
  4535.  
  4536.  
  4537.  
  4538.  
  4539.  
  4540.  
  4541.  
  4542.                                       71
  4543. fg_getvpage
  4544.  
  4545. Prototype
  4546.  
  4547.    int fg_getvpage (void);
  4548.    function FGgetvpage% ()
  4549.    integer*2 function fg_getvpage ()
  4550.    function fg_getvpage : integer;
  4551.  
  4552. Description
  4553.  
  4554.    The fg_getvpage routine returns the visual video page number (as set in the
  4555.    most recent call to fg_setvpage).
  4556.  
  4557. Parameters
  4558.  
  4559.    none
  4560.  
  4561. Return value
  4562.  
  4563.    The number of the visual video page, between 0 and 63.
  4564.  
  4565. Restrictions
  4566.  
  4567.    none
  4568.  
  4569. See also
  4570.  
  4571.    fg_setvpage
  4572.  
  4573. Examples
  4574.  
  4575.    8-8
  4576.  
  4577.  
  4578.  
  4579.  
  4580.  
  4581.  
  4582.  
  4583.  
  4584.  
  4585.  
  4586.  
  4587.  
  4588.  
  4589.  
  4590.  
  4591.  
  4592.  
  4593.  
  4594.  
  4595.  
  4596.  
  4597.  
  4598.  
  4599.  
  4600.  
  4601.                                       72
  4602. fg_getworld
  4603.  
  4604. Prototype
  4605.  
  4606.    void fg_getworld (double *xmin, double *xmax, double *ymin, double *ymax);
  4607.    sub FGgetworld (xmin#, xmax#, ymin#, ymax#)
  4608.    subroutine fg_getworld (real*8 xmin, real*8 xmax, real*8 ymin, real*8 ymax)
  4609.    procedure fg_getworld (var xmin, xmax, ymin, ymax : real);
  4610.  
  4611. Description
  4612.  
  4613.    The fg_getworld routine returns the current world space limits, as defined
  4614.    in the most recent call to fg_setworld.
  4615.  
  4616. Parameters
  4617.  
  4618.    xmin receives the world space coordinate of the screen's left edge.
  4619.  
  4620.    xmax receives the world space coordinate of the screen's right edge.
  4621.  
  4622.    ymin receives the world space coordinate of the screen's top edge.
  4623.  
  4624.    ymax receives the world space coordinate of the screen's bottom edge.
  4625.  
  4626. Return value
  4627.  
  4628.    none
  4629.  
  4630. Restrictions
  4631.  
  4632.    This routine is not available in Fastgraph/Light.
  4633.  
  4634. See also
  4635.  
  4636.    fg_setworld
  4637.  
  4638. Examples
  4639.  
  4640.    4-3
  4641.  
  4642.  
  4643.  
  4644.  
  4645.  
  4646.  
  4647.  
  4648.  
  4649.  
  4650.  
  4651.  
  4652.  
  4653.  
  4654.  
  4655.  
  4656.  
  4657.  
  4658.  
  4659.  
  4660.                                       73
  4661. fg_getxjoy
  4662.  
  4663. Prototype
  4664.  
  4665.    int fg_getxjoy (int n);
  4666.    function FGgetxjoy% (n%)
  4667.    integer*2 function fg_getxjoy (integer*2 n)
  4668.    function fg_getxjoy (n : integer) : integer;
  4669.  
  4670. Description
  4671.  
  4672.    The fg_getxjoy routine returns the horizontal coordinate position of the
  4673.    specified joystick.  The actual coordinates depend on the processor speed
  4674.    and brand of joystick used.
  4675.  
  4676. Parameters
  4677.  
  4678.    n specifies the joystick number, either 1 or 2.
  4679.  
  4680. Return value
  4681.  
  4682.    If the return value is positive, it represents the current horizontal
  4683.    coordinate position of the requested joystick.  If the return value is -1,
  4684.    it means the requested joystick has not been initialized or is not present.
  4685.  
  4686. Restrictions
  4687.  
  4688.    Before using this routine, you must use the fg_initjoy routine to
  4689.    initialize the requested joystick.
  4690.  
  4691. See also
  4692.  
  4693.    fg_button, fg_getyjoy, fg_initjoy, fg_intjoy
  4694.  
  4695. Examples
  4696.  
  4697.    12-11
  4698.  
  4699.  
  4700.  
  4701.  
  4702.  
  4703.  
  4704.  
  4705.  
  4706.  
  4707.  
  4708.  
  4709.  
  4710.  
  4711.  
  4712.  
  4713.  
  4714.  
  4715.  
  4716.  
  4717.  
  4718.  
  4719.                                       74
  4720. fg_getxpos
  4721.  
  4722. Prototype
  4723.  
  4724.    int fg_getxpos (void);
  4725.    function FGgetxpos% ()
  4726.    integer*2 function fg_getxpos ()
  4727.    function fg_getxpos : integer;
  4728.  
  4729. Description
  4730.  
  4731.    The fg_getxpos routine returns the screen space x coordinate of the
  4732.    graphics cursor position.
  4733.  
  4734. Parameters
  4735.  
  4736.    none
  4737.  
  4738. Return value
  4739.  
  4740.    The x coordinate of graphics cursor position.
  4741.  
  4742. Restrictions
  4743.  
  4744.    none
  4745.  
  4746. See also
  4747.  
  4748.    fg_getypos
  4749.  
  4750.  
  4751.  
  4752.  
  4753.  
  4754.  
  4755.  
  4756.  
  4757.  
  4758.  
  4759.  
  4760.  
  4761.  
  4762.  
  4763.  
  4764.  
  4765.  
  4766.  
  4767.  
  4768.  
  4769.  
  4770.  
  4771.  
  4772.  
  4773.  
  4774.  
  4775.  
  4776.  
  4777.  
  4778.                                       75
  4779. fg_getyjoy
  4780.  
  4781. Prototype
  4782.  
  4783.    int fg_getyjoy (int n);
  4784.    function FGgetyjoy% (n%)
  4785.    integer*2 function fg_getyjoy (integer*2 n)
  4786.    function fg_getyjoy (n : integer) : integer;
  4787.  
  4788. Description
  4789.  
  4790.    The fg_getyjoy routine returns the vertical coordinate position of the
  4791.    specified joystick.  The actual coordinates depend on the processor speed
  4792.    and brand of joystick used.
  4793.  
  4794. Parameters
  4795.  
  4796.    n specifies the joystick number, either 1 or 2.
  4797.  
  4798. Return value
  4799.  
  4800.    If the return value is positive, it represents the current vertical
  4801.    coordinate position of the requested joystick.  If the return value is -1,
  4802.    it means the requested joystick has not been initialized or is not present.
  4803.  
  4804. Restrictions
  4805.  
  4806.    Before using this routine, you must use the fg_initjoy routine to
  4807.    initialize the requested joystick.
  4808.  
  4809. See also
  4810.  
  4811.    fg_button, fg_getxjoy, fg_initjoy, fg_intjoy
  4812.  
  4813. Examples
  4814.  
  4815.    12-11
  4816.  
  4817.  
  4818.  
  4819.  
  4820.  
  4821.  
  4822.  
  4823.  
  4824.  
  4825.  
  4826.  
  4827.  
  4828.  
  4829.  
  4830.  
  4831.  
  4832.  
  4833.  
  4834.  
  4835.  
  4836.  
  4837.                                       76
  4838. fg_getypos
  4839.  
  4840. Prototype
  4841.  
  4842.    int fg_getypos (void);
  4843.    function FGgetypos% ()
  4844.    integer*2 function fg_getypos ()
  4845.    function fg_getypos : integer;
  4846.  
  4847. Description
  4848.  
  4849.    The fg_getypos routine returns the screen space y coordinate of the
  4850.    graphics cursor position.
  4851.  
  4852. Parameters
  4853.  
  4854.    none
  4855.  
  4856. Return value
  4857.  
  4858.    The y coordinate of graphics cursor position.
  4859.  
  4860. Restrictions
  4861.  
  4862.    none
  4863.  
  4864. See also
  4865.  
  4866.    fg_getxpos
  4867.  
  4868.  
  4869.  
  4870.  
  4871.  
  4872.  
  4873.  
  4874.  
  4875.  
  4876.  
  4877.  
  4878.  
  4879.  
  4880.  
  4881.  
  4882.  
  4883.  
  4884.  
  4885.  
  4886.  
  4887.  
  4888.  
  4889.  
  4890.  
  4891.  
  4892.  
  4893.  
  4894.  
  4895.  
  4896.                                       77
  4897. fg_hush
  4898.  
  4899. Prototype
  4900.  
  4901.    void fg_hush (void);
  4902.    sub FGhush ()
  4903.    subroutine fg_hush ()
  4904.    procedure fg_hush;
  4905.  
  4906. Description
  4907.  
  4908.    The fg_hush routine immediately stops asynchronous sound started with the
  4909.    fg_musicb, fg_sounds, or fg_voices routines.  It has no effect if there is
  4910.    no asynchronous sound in progress.
  4911.  
  4912. Parameters
  4913.  
  4914.    none
  4915.  
  4916. Return value
  4917.  
  4918.    none
  4919.  
  4920. Restrictions
  4921.  
  4922.    none
  4923.  
  4924. See also
  4925.  
  4926.    fg_hushnext, fg_musicb, fg_sounds, fg_suspend, fg_voices
  4927.  
  4928. Examples
  4929.  
  4930.    13-7
  4931.  
  4932.  
  4933.  
  4934.  
  4935.  
  4936.  
  4937.  
  4938.  
  4939.  
  4940.  
  4941.  
  4942.  
  4943.  
  4944.  
  4945.  
  4946.  
  4947.  
  4948.  
  4949.  
  4950.  
  4951.  
  4952.  
  4953.  
  4954.  
  4955.                                       78
  4956. fg_hushnext
  4957.  
  4958. Prototype
  4959.  
  4960.    void fg_hushnext (void);
  4961.    sub FGhushnext ()
  4962.    subroutine fg_hushnext ()
  4963.    procedure fg_hushnext;
  4964.  
  4965. Description
  4966.  
  4967.    The fg_hushnext routine stops asynchronous sound started with the
  4968.    fg_musicb, fg_sounds, or fg_voices routines, but not until the current
  4969.    repetition finishes.  It has no effect if there is no asynchronous sound in
  4970.    progress.
  4971.  
  4972. Parameters
  4973.  
  4974.    none
  4975.  
  4976. Return value
  4977.  
  4978.    none
  4979.  
  4980. Restrictions
  4981.  
  4982.    This routine has no effect unless the asynchronous sound is continuous.
  4983.  
  4984. See also
  4985.  
  4986.    fg_hush, fg_musicb, fg_sounds, fg_suspend, fg_voices
  4987.  
  4988. Examples
  4989.  
  4990.    13-7
  4991.  
  4992.  
  4993.  
  4994.  
  4995.  
  4996.  
  4997.  
  4998.  
  4999.  
  5000.  
  5001.  
  5002.  
  5003.  
  5004.  
  5005.  
  5006.  
  5007.  
  5008.  
  5009.  
  5010.  
  5011.  
  5012.  
  5013.  
  5014.                                       79
  5015. fg_imagesiz
  5016.  
  5017. Prototype
  5018.  
  5019.    long fg_imagesiz (int width, int height);
  5020.    function FGimagesiz& (width%, height%)
  5021.    integer*4 function fg_imagesiz (integer*2 width, integer*2 height)
  5022.    function fg_imagesiz (width, height : integer) : longint;
  5023.  
  5024. Description
  5025.  
  5026.    The fg_imagesiz routine determines the number of bytes required to store a
  5027.    mode-specific bit-mapped image of specified dimensions.
  5028.  
  5029. Parameters
  5030.  
  5031.    width specifies the image width in pixels.
  5032.  
  5033.    height specifies the image height in pixels.
  5034.  
  5035. Return value
  5036.  
  5037.    The number of bytes required to store a mode-specific bit-mapped image of
  5038.    the specified size in the current video mode.
  5039.  
  5040. Restrictions
  5041.  
  5042.    none
  5043.  
  5044. See also
  5045.  
  5046.    fg_clpimage, fg_drwimage, fg_flpimage, fg_getimage, fg_revimage
  5047.  
  5048. Examples
  5049.  
  5050.    9-20
  5051.  
  5052.  
  5053.  
  5054.  
  5055.  
  5056.  
  5057.  
  5058.  
  5059.  
  5060.  
  5061.  
  5062.  
  5063.  
  5064.  
  5065.  
  5066.  
  5067.  
  5068.  
  5069.  
  5070.  
  5071.  
  5072.  
  5073.                                       80
  5074. fg_initems
  5075.  
  5076. Prototype
  5077.  
  5078.    int fg_initems (void);
  5079.    function FGinitems% ()
  5080.    integer*2 function fg_initems ()
  5081.    function fg_initems : integer;
  5082.  
  5083. Description
  5084.  
  5085.    The fg_initems routine initializes expanded memory (EMS) for use with
  5086.    Fastgraph.
  5087.  
  5088. Parameters
  5089.  
  5090.    none
  5091.  
  5092. Return value
  5093.  
  5094.     0 = success
  5095.    -1 = Expanded Memory Manager not installed or not accessible
  5096.  
  5097. Restrictions
  5098.  
  5099.    This routine requires an Expanded Memory Manager (EMM) that conforms to the
  5100.    Lotus/Intel/Microsoft Expanded Memory Specification (LIM-EMS) version 3.2
  5101.    or later.  On 80386 and 80486 systems, the EMM386.EXE device driver
  5102.    supplied with DOS 5.0 can be used to treat some or all of extended memory
  5103.    as expanded memory.
  5104.  
  5105.    The Expanded Memory Manager uses interrupt 67h.  As a result, this vector
  5106.    is not available for application programs.
  5107.  
  5108. See also
  5109.  
  5110.    fg_allocems, fg_initxms
  5111.  
  5112. Examples
  5113.  
  5114.    8-9
  5115.  
  5116.  
  5117.  
  5118.  
  5119.  
  5120.  
  5121.  
  5122.  
  5123.  
  5124.  
  5125.  
  5126.  
  5127.  
  5128.  
  5129.  
  5130.  
  5131.  
  5132.                                       81
  5133. fg_initjoy
  5134.  
  5135. Prototype
  5136.  
  5137.    int fg_initjoy (int n);
  5138.    function FGinitjoy% (n%)
  5139.    integer*2 function fg_initjoy (integer*2 n)
  5140.    function fg_initjoy (n : integer) : integer;
  5141.  
  5142. Description
  5143.  
  5144.    The fg_initjoy routine initializes either joystick and must be called
  5145.    before using fg_getxjoy, fg_getyjoy, or fg_intjoy.
  5146.  
  5147. Parameters
  5148.  
  5149.    n specifies the joystick number, either 1 or 2.
  5150.  
  5151. Return value
  5152.  
  5153.    If the return value is 0, it means the joystick initialization was
  5154.    successful.  If it is -1, it means the machine has no game port, or the
  5155.    requested joystick is not connected to the game port.
  5156.  
  5157. Restrictions
  5158.  
  5159.    When you call fg_initjoy, Fastgraph assumes the requested joystick is
  5160.    centered.
  5161.  
  5162. See also
  5163.  
  5164.    fg_button, fg_getxjoy, fg_getyjoy, fg_intjoy
  5165.  
  5166. Examples
  5167.  
  5168.    12-10, 12-11, 12-12
  5169.  
  5170.  
  5171.  
  5172.  
  5173.  
  5174.  
  5175.  
  5176.  
  5177.  
  5178.  
  5179.  
  5180.  
  5181.  
  5182.  
  5183.  
  5184.  
  5185.  
  5186.  
  5187.  
  5188.  
  5189.  
  5190.  
  5191.                                       82
  5192. fg_initw
  5193.  
  5194. Prototype
  5195.  
  5196.    void fg_initw (void);
  5197.    sub FGinitw ()
  5198.    subroutine fg_initw ()
  5199.    procedure fg_initw;
  5200.  
  5201. Description
  5202.  
  5203.    The fg_initw routine initializes Fastgraph's internal parameters for world
  5204.    space.  This routine must be called once, before any other routine that
  5205.    uses world space coordinates.
  5206.  
  5207. Parameters
  5208.  
  5209.    none
  5210.  
  5211. Return value
  5212.  
  5213.    none
  5214.  
  5215. Restrictions
  5216.  
  5217.    This routine is not available in Fastgraph/Light.
  5218.  
  5219. Examples
  5220.  
  5221.    4-3, 6-4, 6-8, 7-8, 7-9, 7-10, 7-11
  5222.  
  5223.  
  5224.  
  5225.  
  5226.  
  5227.  
  5228.  
  5229.  
  5230.  
  5231.  
  5232.  
  5233.  
  5234.  
  5235.  
  5236.  
  5237.  
  5238.  
  5239.  
  5240.  
  5241.  
  5242.  
  5243.  
  5244.  
  5245.  
  5246.  
  5247.  
  5248.  
  5249.  
  5250.                                       83
  5251. fg_initxms
  5252.  
  5253. Prototype
  5254.  
  5255.    int fg_initxms (void);
  5256.    function FGinitxms% ()
  5257.    integer*2 function fg_initxms ()
  5258.    function fg_initxms : integer;
  5259.  
  5260. Description
  5261.  
  5262.    The fg_initxms routine initializes extended memory (XMS) for use with
  5263.    Fastgraph.
  5264.  
  5265. Parameters
  5266.  
  5267.    none
  5268.  
  5269. Return value
  5270.  
  5271.     0 = success
  5272.    -1 = XMS driver not installed or not accessible
  5273.  
  5274. Restrictions
  5275.  
  5276.    This routine requires an external driver that conforms to the
  5277.    Lotus/Intel/Microsoft/AST eXtended Memory Specification (XMS) version 2.0,
  5278.    such as HIMEM.SYS.  XMS drivers require an 80286, 80386, or 80486 system.
  5279.  
  5280. See also
  5281.  
  5282.    fg_allocxms, fg_initems
  5283.  
  5284. Examples
  5285.  
  5286.    8-9
  5287.  
  5288.  
  5289.  
  5290.  
  5291.  
  5292.  
  5293.  
  5294.  
  5295.  
  5296.  
  5297.  
  5298.  
  5299.  
  5300.  
  5301.  
  5302.  
  5303.  
  5304.  
  5305.  
  5306.  
  5307.  
  5308.  
  5309.                                       84
  5310. fg_intjoy
  5311.  
  5312. Prototype
  5313.  
  5314.    void fg_intjoy (int n, char *key, char *aux);
  5315.    sub FGintjoy (n%, key$, aux$)
  5316.    subroutine fg_intjoy (integer*2 n, integer*1 key, integer*1 aux)
  5317.    procedure fg_intjoy (n : integer; var key, aux : byte);
  5318.  
  5319. Description
  5320.  
  5321.    The fg_intjoy routine returns the standard and extended keyboard codes
  5322.    analogous to the current position and button status of the specified
  5323.    joystick.
  5324.  
  5325. Parameters
  5326.  
  5327.    n specifies the joystick number, either 1 or 2.
  5328.  
  5329.    key receives the joystick's button status.  If any button on the requested
  5330.    joystick is pressed, key is set to 13, the standard keyboard code for the
  5331.    Enter key.  If no buttons are pressed, key is set to zero.  In QuickBASIC,
  5332.    you must explicitly declare key as a fixed-length string variable of length
  5333.    1.
  5334.  
  5335.    aux receives the joystick's analog position, as listed below.  In
  5336.    QuickBASIC, you must explicitly declare aux as a fixed-length string
  5337.    variable of length 1.
  5338.  
  5339.    If the requested joystick has not been initialized, both key and aux will
  5340.    be set to zero.
  5341.  
  5342. Return value
  5343.  
  5344.    none
  5345.  
  5346. Restrictions
  5347.  
  5348.    Before using this routine, you must use the fg_initjoy routine to
  5349.    initialize the requested joystick.
  5350.  
  5351. See also
  5352.  
  5353.    fg_button, fg_getxjoy, fg_getyjoy, fg_initjoy, fg_intkey
  5354.  
  5355.  
  5356.  
  5357.  
  5358.  
  5359.  
  5360.  
  5361.  
  5362.  
  5363.  
  5364.  
  5365.  
  5366.  
  5367.  
  5368.                                       85
  5369. fg_intjoy (continued)
  5370.  
  5371. Examples
  5372.  
  5373.    12-12
  5374.  
  5375.  
  5376.  
  5377.  
  5378.  
  5379.  
  5380.  
  5381.  
  5382.  
  5383.  
  5384.  
  5385.  
  5386.  
  5387.  
  5388.  
  5389.  
  5390.  
  5391.  
  5392.  
  5393.  
  5394.  
  5395.  
  5396.  
  5397.  
  5398.  
  5399.  
  5400.  
  5401.  
  5402.  
  5403.  
  5404.  
  5405.  
  5406.  
  5407.  
  5408.  
  5409.  
  5410.  
  5411.  
  5412.  
  5413.  
  5414.  
  5415.  
  5416.  
  5417.  
  5418.  
  5419.  
  5420.  
  5421.  
  5422.  
  5423.  
  5424.  
  5425.  
  5426.  
  5427.                                       86
  5428. fg_intkey
  5429.  
  5430. Prototype
  5431.  
  5432.    void fg_intkey (unsigned char *key, unsigned char *aux);
  5433.    sub FGintkey (key$, aux$)
  5434.    subroutine fg_intkey (integer*1 key, integer*1 aux)
  5435.    procedure fg_intkey (var key, aux : byte);
  5436.  
  5437. Description
  5438.  
  5439.    The fg_intkey routine reads the next entry from the BIOS keyboard buffer
  5440.    (without echo) and returns the keystroke's standard or extended keyboard
  5441.    code (a list of these appears in Chapter 12 of the Fastgraph User's Guide).
  5442.    It is similar to fg_getkey, but it does not wait for a keystroke if the
  5443.    keyboard buffer is empty.
  5444.  
  5445. Parameters
  5446.  
  5447.    key receives the keystroke's standard keyboard code if it represents a
  5448.    standard character.  If the keystroke represents an extended character, key
  5449.    will be set to zero.  In QuickBASIC, you must explicitly declare key as a
  5450.    fixed-length string variable of length 1.
  5451.  
  5452.    aux receives the keystroke's extended keyboard code if it represents an
  5453.    extended character.  If the keystroke represents a standard character, aux
  5454.    will be set to zero.  In QuickBASIC, you must explicitly declare aux as a
  5455.    fixed-length string variable of length 1.
  5456.  
  5457.    If the BIOS keyboard buffer is empty, both key and aux will be set to zero.
  5458.  
  5459. Return value
  5460.  
  5461.    none
  5462.  
  5463. Restrictions
  5464.  
  5465.    none
  5466.  
  5467. See also
  5468.  
  5469.    fg_getkey, fg_intjoy, fg_waitkey
  5470.  
  5471. Examples
  5472.  
  5473.    12-2, 13-7, 14-1, 14-3
  5474.  
  5475.  
  5476.  
  5477.  
  5478.  
  5479.  
  5480.  
  5481.  
  5482.  
  5483.  
  5484.  
  5485.  
  5486.                                       87
  5487. fg_locate
  5488.  
  5489. Prototype
  5490.  
  5491.    void fg_locate (int row, int column);
  5492.    sub FGlocate (row%, column%)
  5493.    subroutine fg_locate (integer*2 row, integer*2 column)
  5494.    procedure fg_locate (row, column : integer);
  5495.  
  5496. Description
  5497.  
  5498.    The fg_locate routine changes the text cursor position for the active
  5499.    display page.  The fg_setmode routine sets each page's text cursor position
  5500.    to (0,0).
  5501.  
  5502. Parameters
  5503.  
  5504.    row is the text cursor's destination row number, between 0 and one less
  5505.    than the number of character rows available.
  5506.  
  5507.    column is text cursor's destination column number, between 0 and one less
  5508.    than the number of character columns available.
  5509.  
  5510. Return value
  5511.  
  5512.    none
  5513.  
  5514. Restrictions
  5515.  
  5516.    The first eight video pages (0 to 7) each have their own text cursor.  Each
  5517.    subsequent group of 8 video pages (pages 8 through 15, pages 16 to 23, and
  5518.    so forth) respectively share the same text cursor positions as the first 8
  5519.    pages.  For example, changing the text cursor position on video page 9 also
  5520.    changes its position on video page 1.
  5521.  
  5522. See also
  5523.  
  5524.    fg_where
  5525.  
  5526. Examples
  5527.  
  5528.    7-1 to 7-8
  5529.  
  5530.  
  5531.  
  5532.  
  5533.  
  5534.  
  5535.  
  5536.  
  5537.  
  5538.  
  5539.  
  5540.  
  5541.  
  5542.  
  5543.  
  5544.  
  5545.                                       88
  5546. fg_makepcx
  5547.  
  5548. Prototype
  5549.  
  5550.    int fg_makepcx (int minx, int maxx, int miny, int maxy, char *filename);
  5551.    function FGmakepcx% (minx%, maxx%, miny%, maxy%, filename$)
  5552.    integer*2 function fg_makepcx (integer*2 minx, integer*2 maxx, integer*2
  5553.    miny, integer*2 maxy,
  5554.      character*(*) filename)
  5555.    function fg_makepcx (minx, maxx, miny, maxy : integer; filename : string) :
  5556.    integer;
  5557.  
  5558. Description
  5559.  
  5560.    The fg_makepcx routine creates a PCX file from the specified rectangular
  5561.    region of the active video page.  The region's extremes are expressed in
  5562.    screen space units.
  5563.  
  5564. Parameters
  5565.  
  5566.    minx is the x coordinate of the region's left edge.  Its value is reduced
  5567.    to a byte boundary if necessary.
  5568.  
  5569.    maxx is the x coordinate of the region's right edge.  It must be greater
  5570.    than or equal to minx.
  5571.  
  5572.    miny is the y coordinate of the region's top edge.
  5573.  
  5574.    maxy is the y coordinate of the region's bottom edge.  It must be greater
  5575.    than or equal to miny.
  5576.  
  5577.    filename is the name of the PCX file to create.  A device and path name may
  5578.    be included as part of the file name.  The file name must be terminated by
  5579.    a null character (that is, a zero byte).  If an identically named file
  5580.    already exists, it is overwritten.
  5581.  
  5582. Return value
  5583.  
  5584.    0 = success
  5585.    1 = file not created
  5586.  
  5587. Restrictions
  5588.  
  5589.    The fg_makepcx routine has no effect in text video modes or in the Hercules
  5590.    low-resolution graphics mode.  Refer to the description of the fg_disppcx
  5591.    routine for information about PCX file compatibility between different
  5592.    video modes.
  5593.  
  5594.    In the Tandy/PCjr 16-color graphics mode (mode 9) and the native EGA
  5595.    graphics modes (modes 13 through 16), the palette registers are not
  5596.    readable.  Hence, fg_makepcx will use the default palette settings when
  5597.    used in these video modes.
  5598.  
  5599. See also
  5600.  
  5601.    fg_disppcx
  5602.  
  5603.  
  5604.                                       89
  5605. fg_makepcx (continued)
  5606.  
  5607. Examples
  5608.  
  5609.    9-15
  5610.  
  5611.  
  5612.  
  5613.  
  5614.  
  5615.  
  5616.  
  5617.  
  5618.  
  5619.  
  5620.  
  5621.  
  5622.  
  5623.  
  5624.  
  5625.  
  5626.  
  5627.  
  5628.  
  5629.  
  5630.  
  5631.  
  5632.  
  5633.  
  5634.  
  5635.  
  5636.  
  5637.  
  5638.  
  5639.  
  5640.  
  5641.  
  5642.  
  5643.  
  5644.  
  5645.  
  5646.  
  5647.  
  5648.  
  5649.  
  5650.  
  5651.  
  5652.  
  5653.  
  5654.  
  5655.  
  5656.  
  5657.  
  5658.  
  5659.  
  5660.  
  5661.  
  5662.  
  5663.                                       90
  5664. fg_maprgb
  5665.  
  5666. Prototype
  5667.  
  5668.    int fg_maprgb (int red, int green, int blue);
  5669.    function FGmaprgb% (red%, green%, blue%)
  5670.    integer*2 function fg_maprgb (integer*2 red, integer*2 green, integer*2
  5671.    blue)
  5672.    function fg_maprgb (red, green, blue : integer) : integer;
  5673.  
  5674. Description
  5675.  
  5676.    The fg_maprgb routine maps six-bit red, green, and blue color components
  5677.    into a suitable palette value for the current video mode.  You can then
  5678.    pass this value to the fg_palette routine.
  5679.  
  5680. Parameters
  5681.  
  5682.    red, green, and blue respectively specify the color's red, green, and blue
  5683.    components.  These values must be between 0 and 63; increasing values
  5684.    produce more intense colors.
  5685.  
  5686. Return value
  5687.  
  5688.    The mode-specific palette value for the specified color components.
  5689.  
  5690. Restrictions
  5691.  
  5692.    This routine is meaningful only in 16-color graphics video modes.
  5693.  
  5694. See also
  5695.  
  5696.    fg_palette, fg_palettes, fg_setrgb
  5697.  
  5698. Examples
  5699.  
  5700.    5-13
  5701.  
  5702.  
  5703.  
  5704.  
  5705.  
  5706.  
  5707.  
  5708.  
  5709.  
  5710.  
  5711.  
  5712.  
  5713.  
  5714.  
  5715.  
  5716.  
  5717.  
  5718.  
  5719.  
  5720.  
  5721.  
  5722.                                       91
  5723. fg_measure
  5724.  
  5725. Prototype
  5726.  
  5727.    int fg_measure (void);
  5728.    function FGmeasure% ()
  5729.    integer*2 function fg_measure ()
  5730.    function fg_measure : integer;
  5731.  
  5732. Description
  5733.  
  5734.    The fg_measure routine returns the approximate number of delay units per
  5735.    clock tick.  This quantity is proportional to the system's processor speed.
  5736.    Delay units are used by the fg_stall routine.
  5737.  
  5738. Parameters
  5739.  
  5740.    none
  5741.  
  5742. Return value
  5743.  
  5744.    The approximate number of delay units per clock tick.  Typical values for
  5745.    some common systems are:
  5746.  
  5747.                         system         delay units
  5748.                         type           per clock tick
  5749.  
  5750.                         Tandy 1000 HX        675
  5751.                         10 MHz 80286       3,000
  5752.                         25 MHz 80386      11,000
  5753.  
  5754. Restrictions
  5755.  
  5756.    none
  5757.  
  5758. See also
  5759.  
  5760.    fg_stall
  5761.  
  5762. Examples
  5763.  
  5764.    14-3
  5765.  
  5766.  
  5767.  
  5768.  
  5769.  
  5770.  
  5771.  
  5772.  
  5773.  
  5774.  
  5775.  
  5776.  
  5777.  
  5778.  
  5779.  
  5780.  
  5781.                                       92
  5782. fg_memavail
  5783.  
  5784. Prototype
  5785.  
  5786.    long fg_memavail (void);
  5787.    function FGmemavail& ()
  5788.    integer*4 function fg_memavail ()
  5789.    function fg_memavail : longint;
  5790.  
  5791. Description
  5792.  
  5793.    The fg_memavail routine determines the amount of conventional memory
  5794.    available to DOS.
  5795.  
  5796. Parameters
  5797.  
  5798.    none
  5799.  
  5800. Return value
  5801.  
  5802.    The amount of conventional memory (in bytes) available to DOS.
  5803.  
  5804. Restrictions
  5805.  
  5806.    none
  5807.  
  5808. Examples
  5809.  
  5810.    15-1
  5811.  
  5812.  
  5813.  
  5814.  
  5815.  
  5816.  
  5817.  
  5818.  
  5819.  
  5820.  
  5821.  
  5822.  
  5823.  
  5824.  
  5825.  
  5826.  
  5827.  
  5828.  
  5829.  
  5830.  
  5831.  
  5832.  
  5833.  
  5834.  
  5835.  
  5836.  
  5837.  
  5838.  
  5839.  
  5840.                                       93
  5841. fg_mousebut
  5842.  
  5843. Prototype
  5844.  
  5845.    void fg_mousebut (int number, int *count, int *lastx, int *lasty);
  5846.    sub FGmousebut (number%, count%, lastx%, lasty%)
  5847.    subroutine fg_mousebut (integer*2 number, integer*2 count, integer*2 lastx,
  5848.    integer*2 lasty)
  5849.    procedure fg_mousebut (number : integer; var count, lastx, lasty :
  5850.    integer);
  5851.  
  5852. Description
  5853.  
  5854.    The fg_mousebut routine returns information about mouse button press or
  5855.    release counts, as well as the mouse cursor position at the time of the
  5856.    last button press or release.
  5857.  
  5858. Parameters
  5859.  
  5860.    number is the mouse button for which to report information (1 means the
  5861.    left button, 2 the right button, and 3 the middle button).  If number is
  5862.    positive, button press counts will be reported.  If it is negative, release
  5863.    counts will be reported.
  5864.  
  5865.    count receives the number of press or release counts for the requested
  5866.    button since the last check, or since calling the fg_mouseini routine.
  5867.  
  5868.    lastx receives the x coordinate (in screen space) of the mouse cursor
  5869.    position at the time of the last press or release of the requested button.
  5870.    If count is zero, lastx is also set to zero.
  5871.  
  5872.    lasty receives the y coordinate (in screen space) of the mouse cursor
  5873.    position at the time of the last press or release of the requested button.
  5874.    If count is zero, lasty is also set to zero.
  5875.  
  5876. Return value
  5877.  
  5878.    none
  5879.  
  5880. Restrictions
  5881.  
  5882.    none
  5883.  
  5884. See also
  5885.  
  5886.    fg_mousepos
  5887.  
  5888. Examples
  5889.  
  5890.    12-7
  5891.  
  5892.  
  5893.  
  5894.  
  5895.  
  5896.  
  5897.  
  5898.  
  5899.                                       94
  5900. fg_mousecur
  5901.  
  5902. Prototype
  5903.  
  5904.    void fg_mousecur (int screen_mask, int cursor_mask);
  5905.    sub FGmousecur (screen_mask%, cursor_mask%)
  5906.    subroutine fg_mousecur (integer*2 screen_mask, integer*2 cursor_mask)
  5907.    procedure fg_mousecur (screen_mask, cursor_mask : integer);
  5908.  
  5909. Description
  5910.  
  5911.    The fg_mousecur routine defines the appearance of the mouse cursor in text
  5912.    video modes.  Refer to Chapter 12 of the Fastgraph User's Guide for
  5913.    complete information about defining the mouse cursor in text modes.
  5914.  
  5915. Parameters
  5916.  
  5917.    screen_mask defines the screen mask.  When you position the mouse over a
  5918.    specific character cell, the mouse driver logically ANDs the screen mask
  5919.    with the existing contents of that cell.
  5920.  
  5921.    cursor_mask defines the cursor mask.  After logically ANDing the screen
  5922.    mask with the contents of a character cell, the mouse driver XORs the
  5923.    cursor mask with the result to produce the mouse cursor.
  5924.  
  5925.    The binary structure of screen_mask and cursor_mask is:
  5926.  
  5927.                        bits      meaning
  5928.  
  5929.                        0 to 7    ASCII character value
  5930.                        8 to 11   foreground color
  5931.                        12 to 14  background color
  5932.                        15        blink
  5933.  
  5934. Return value
  5935.  
  5936.    none
  5937.  
  5938. Restrictions
  5939.  
  5940.    This routine has no effect in graphics video modes.
  5941.  
  5942. See also
  5943.  
  5944.    fg_mouseini, fg_mouseptr, fg_mousevis
  5945.  
  5946. Examples
  5947.  
  5948.    12-8
  5949.  
  5950.  
  5951.  
  5952.  
  5953.  
  5954.  
  5955.  
  5956.  
  5957.  
  5958.                                       95
  5959. fg_mouseini
  5960.  
  5961. Prototype
  5962.  
  5963.    int fg_mouseini (void);
  5964.    function FGmouseini% ()
  5965.    integer*2 function fg_mouseini ()
  5966.    function fg_mouseini : integer;
  5967.  
  5968. Description
  5969.  
  5970.    The fg_mouseini routine initializes the mouse and must be called before any
  5971.    of Fastgraph's other mouse support routines.
  5972.  
  5973. Parameters
  5974.  
  5975.    none
  5976.  
  5977. Return value
  5978.  
  5979.    If the return value is positive, it indicates the number of buttons on the
  5980.    mouse being used (2 or 3).  If the return value is -1, it means the
  5981.    initialization failed because the mouse driver has not been loaded or the
  5982.    mouse is not physically connected.
  5983.  
  5984. Restrictions
  5985.  
  5986.    There is no mouse support available in video modes 20 through 23.  The
  5987.    fg_mouseini routine will always return -1 when used in these video modes.
  5988.  
  5989. See also
  5990.  
  5991.    fg_mousebut, fg_mousecur, fg_mouselim, fg_mousemov, fg_mousepos,
  5992.    fg_mouseptr, fg_mousespd, fg_mousevis, fg_resize
  5993.  
  5994. Examples
  5995.  
  5996.    12-5, 12-6, 12-7, 12-8, 12-9
  5997.  
  5998.  
  5999.  
  6000.  
  6001.  
  6002.  
  6003.  
  6004.  
  6005.  
  6006.  
  6007.  
  6008.  
  6009.  
  6010.  
  6011.  
  6012.  
  6013.  
  6014.  
  6015.  
  6016.  
  6017.                                       96
  6018. fg_mouselim
  6019.  
  6020. Prototype
  6021.  
  6022.    void fg_mouselim (int minx, int maxx, int miny, int maxy);
  6023.    sub FGmouselim (minx%, maxx%, miny%, maxy%)
  6024.    subroutine fg_mouselim (integer*2 minx, integer*2 maxx, integer*2 miny,
  6025.    integer*2 maxy)
  6026.    procedure fg_mouselim (minx, maxx, miny, maxy : integer);
  6027.  
  6028. Description
  6029.  
  6030.    The fg_mouselim routine defines the rectangular area in which the mouse
  6031.    cursor may move.  In graphics modes, the area is defined in screen space
  6032.    coordinates.  In text modes, it is defined in rows and columns.
  6033.  
  6034. Parameters
  6035.  
  6036.    minx is the x coordinate of the area's left edge.
  6037.  
  6038.    maxx is the x coordinate of the area's right edge.  It must be greater than
  6039.    or equal to the value of minx.
  6040.  
  6041.    miny is the y coordinate of the area's top edge.
  6042.  
  6043.    maxy is the y coordinate of the area's bottom edge.  It must be greater
  6044.    than or equal to the value of miny.
  6045.  
  6046. Return value
  6047.  
  6048.    none
  6049.  
  6050. Restrictions
  6051.  
  6052.    none
  6053.  
  6054. See also
  6055.  
  6056.    fg_mouseini, fg_mousemov
  6057.  
  6058. Examples
  6059.  
  6060.    12-6
  6061.  
  6062.  
  6063.  
  6064.  
  6065.  
  6066.  
  6067.  
  6068.  
  6069.  
  6070.  
  6071.  
  6072.  
  6073.  
  6074.  
  6075.  
  6076.                                       97
  6077. fg_mousemov
  6078.  
  6079. Prototype
  6080.  
  6081.    void fg_mousemov (int ix, int iy);
  6082.    sub FGmousemov (ix%, iy%)
  6083.    subroutine fg_mousemov (integer*2 ix, integer*2 iy)
  6084.    procedure fg_mousemov (ix, iy : integer);
  6085.  
  6086. Description
  6087.  
  6088.    The fg_mousemov routine moves the mouse cursor to the specified character
  6089.    cell (in text modes) or screen space position (in graphics modes).  The
  6090.    mouse cursor is moved whether or not it is currently visible.
  6091.  
  6092. Parameters
  6093.  
  6094.    ix is the x coordinate of the mouse cursor position.
  6095.  
  6096.    iy is the y coordinate of the mouse cursor position.
  6097.  
  6098. Return value
  6099.  
  6100.    none
  6101.  
  6102. Restrictions
  6103.  
  6104.    If you attempt to move the mouse cursor outside the area defined by
  6105.    fg_mouselim, the fg_mousemov routine just positions the cursor at the
  6106.    nearest point possible within that area.
  6107.  
  6108. See also
  6109.  
  6110.    fg_mouseini, fg_mouselim
  6111.  
  6112. Examples
  6113.  
  6114.    12-6
  6115.  
  6116.  
  6117.  
  6118.  
  6119.  
  6120.  
  6121.  
  6122.  
  6123.  
  6124.  
  6125.  
  6126.  
  6127.  
  6128.  
  6129.  
  6130.  
  6131.  
  6132.  
  6133.  
  6134.  
  6135.                                       98
  6136. fg_mousepos
  6137.  
  6138. Prototype
  6139.  
  6140.    void fg_mousepos (int *ix, int *iy, int *buttons);
  6141.    sub FGmousepos (ix%, iy%, buttons%)
  6142.    subroutine fg_mousepos (integer*2 ix, integer*2 iy, integer*2 buttons)
  6143.    procedure fg_mousepos (var ix, iy, buttons : integer);
  6144.  
  6145. Description
  6146.  
  6147.    The fg_mousepos routine returns the current mouse position and button
  6148.    status.  In graphics modes, the position is defined in screen space
  6149.    coordinates.  In text modes, it is defined in rows and columns.
  6150.  
  6151. Parameters
  6152.  
  6153.    ix receives the x coordinate of the mouse cursor position.
  6154.  
  6155.    iy receives the y coordinate of the mouse cursor position.
  6156.  
  6157.    buttons receives a bit mask representing the button status, where each bit
  6158.    is set if the corresponding button is pressed.  Bit 0 corresponds to the
  6159.    left button, bit 1 to the right button, and bit 2 to the middle button.
  6160.  
  6161. Return value
  6162.  
  6163.    none
  6164.  
  6165. Restrictions
  6166.  
  6167.    none
  6168.  
  6169. See also
  6170.  
  6171.    fg_mousebut, fg_mouseini
  6172.  
  6173. Examples
  6174.  
  6175.    12-7
  6176.  
  6177.  
  6178.  
  6179.  
  6180.  
  6181.  
  6182.  
  6183.  
  6184.  
  6185.  
  6186.  
  6187.  
  6188.  
  6189.  
  6190.  
  6191.  
  6192.  
  6193.  
  6194.                                       99
  6195. fg_mouseptr
  6196.  
  6197. Prototype
  6198.  
  6199.    void fg_mouseptr (int *masks, int xoffset, int yoffset);
  6200.    sub FGmouseptr (masks%(), xoffset%, yoffset%)
  6201.    subroutine fg_mouseptr (integer*2 masks, integer*2 xoffset, integer*2
  6202.    yoffset)
  6203.    procedure fg_mouseptr (var masks : integer; xoffset, yoffset : integer);
  6204.  
  6205. Description
  6206.  
  6207.    The fg_mouseptr routine defines the shape and appearance of the mouse
  6208.    cursor in graphics video modes.  Refer to Chapter 12 of the Fastgraph
  6209.    User's Guide for complete information about defining the mouse cursor in
  6210.    graphics modes.
  6211.  
  6212. Parameters
  6213.  
  6214.    masks is a 32-element array containing the 16-element screen mask followed
  6215.    by the 16-element cursor mask.  The mouse driver displays the mouse cursor
  6216.    by logically ANDing video memory with the screen mask, and then XORing that
  6217.    result with the cursor mask.  The first item of each mask corresponds to
  6218.    the top row of the mouse cursor.  The following table summarizes the cursor
  6219.    appearance for all possible combinations of mask bits.
  6220.  
  6221.           screen mask bit   cursor mask bit   resulting cursor pixel
  6222.  
  6223.                  0                 0          black
  6224.                  0                 1          white
  6225.                  1                 0          unchanged
  6226.                  1                 1          inverted
  6227.  
  6228.    xoffset is the x coordinate of the "hot spot" relative to the upper left
  6229.    corner of the mouse cursor.
  6230.  
  6231.    yoffset is the y coordinate of the "hot spot" relative to the upper left
  6232.    corner of the mouse cursor.
  6233.  
  6234. Return value
  6235.  
  6236.    none
  6237.  
  6238. Restrictions
  6239.  
  6240.    This routine has no effect in text video modes.
  6241.  
  6242. See also
  6243.  
  6244.    fg_mousecur, fg_mouseini, fg_mousevis
  6245.  
  6246. Examples
  6247.  
  6248.    12-9
  6249.  
  6250.  
  6251.  
  6252.  
  6253.                                      100
  6254. fg_mousespd
  6255.  
  6256. Prototype
  6257.  
  6258.    void fg_mousespd (int xmickeys, int ymickeys);
  6259.    sub FGmousespd (xmickeys%, ymickeys%)
  6260.    subroutine fg_mousespd (integer*2 xmickeys, integer*2 ymickeys)
  6261.    procedure fg_mousespd (xmickeys, ymickeys : integer);
  6262.  
  6263. Description
  6264.  
  6265.    The fg_mousespd routine defines the number of mickey units per eight pixels
  6266.    of cursor movement (one mickey unit equals 1/200 of an inch).  This
  6267.    effectively controls the speed at which the mouse cursor moves relative to
  6268.    the movement of the mouse itself.
  6269.  
  6270. Parameters
  6271.  
  6272.    xmickeys is the number of mickey units per eight pixels of horizontal mouse
  6273.    cursor movement (the default is 8).
  6274.  
  6275.    ymickeys is the number of mickey units per eight pixels of vertical mouse
  6276.    cursor movement (the default is 16).
  6277.  
  6278. Return value
  6279.  
  6280.    none
  6281.  
  6282. Restrictions
  6283.  
  6284.    none
  6285.  
  6286. See also
  6287.  
  6288.    fg_mouseini
  6289.  
  6290. Examples
  6291.  
  6292.    12-6
  6293.  
  6294.  
  6295.  
  6296.  
  6297.  
  6298.  
  6299.  
  6300.  
  6301.  
  6302.  
  6303.  
  6304.  
  6305.  
  6306.  
  6307.  
  6308.  
  6309.  
  6310.  
  6311.  
  6312.                                      101
  6313. fg_mousevis
  6314.  
  6315. Prototype
  6316.  
  6317.    void fg_mousevis (int state);
  6318.    sub FGmousevis (state%)
  6319.    subroutine fg_mousevis (integer*2 state)
  6320.    procedure fg_mousevis (state : integer);
  6321.  
  6322. Description
  6323.  
  6324.    The fg_mousevis routine makes the mouse cursor visible or invisible.  After
  6325.    calling fg_mouseini, the mouse cursor is invisible.
  6326.  
  6327. Parameters
  6328.  
  6329.    state defines the mouse cursor visibility.  If state is 0, the mouse cursor
  6330.    is made invisible.  If it is 1, the mouse cursor is made visible.
  6331.  
  6332. Return value
  6333.  
  6334.    none
  6335.  
  6336. Restrictions
  6337.  
  6338.    none
  6339.  
  6340. See also
  6341.  
  6342.    fg_mouseini
  6343.  
  6344. Examples
  6345.  
  6346.    12-6, 12-7, 12-8, 12-9
  6347.  
  6348.  
  6349.  
  6350.  
  6351.  
  6352.  
  6353.  
  6354.  
  6355.  
  6356.  
  6357.  
  6358.  
  6359.  
  6360.  
  6361.  
  6362.  
  6363.  
  6364.  
  6365.  
  6366.  
  6367.  
  6368.  
  6369.  
  6370.  
  6371.                                      102
  6372. fg_move
  6373.  
  6374. Prototype
  6375.  
  6376.    void fg_move (int ix, int iy);
  6377.    sub FGmove (ix%, iy%)
  6378.    subroutine fg_move (integer*2 ix, integer*2 iy)
  6379.    procedure fg_move (ix, iy : integer);
  6380.  
  6381. Description
  6382.  
  6383.    The fg_move routine establishes the graphics cursor position at an absolute
  6384.    screen space point.  The fg_setmode routine sets the graphics cursor
  6385.    position to (0,0).
  6386.  
  6387. Parameters
  6388.  
  6389.    ix is the screen space x coordinate of the graphics cursor's new position.
  6390.  
  6391.    iy is the screen space y coordinate of the graphics cursor's new position.
  6392.  
  6393. Return value
  6394.  
  6395.    none
  6396.  
  6397. Restrictions
  6398.  
  6399.    This routine has no effect in text video modes.
  6400.  
  6401. See also
  6402.  
  6403.    fg_moverel, fg_moverw, fg_movew
  6404.  
  6405. Examples
  6406.  
  6407.    6-2, 6-3, 6-5, 6-6, 6-9, 6-15, 9-1
  6408.  
  6409.  
  6410.  
  6411.  
  6412.  
  6413.  
  6414.  
  6415.  
  6416.  
  6417.  
  6418.  
  6419.  
  6420.  
  6421.  
  6422.  
  6423.  
  6424.  
  6425.  
  6426.  
  6427.  
  6428.  
  6429.  
  6430.                                      103
  6431. fg_moverel
  6432.  
  6433. Prototype
  6434.  
  6435.    void fg_moverel (int ix, int iy);
  6436.    sub FGmoverel (ix%, iy%)
  6437.    subroutine fg_moverel (integer*2 ix, integer*2 iy)
  6438.    procedure fg_moverel (ix, iy : integer);
  6439.  
  6440. Description
  6441.  
  6442.    The fg_moverel routine establishes the graphics cursor position at a screen
  6443.    space point relative to the current position.
  6444.  
  6445. Parameters
  6446.  
  6447.    ix is the screen space x offset of the graphics cursor's new position.
  6448.  
  6449.    iy is the screen space y offset of the graphics cursor's new position.
  6450.  
  6451. Return value
  6452.  
  6453.    none
  6454.  
  6455. Restrictions
  6456.  
  6457.    This routine has no effect in text video modes.
  6458.  
  6459. See also
  6460.  
  6461.    fg_move, fg_moverw, fg_movew
  6462.  
  6463. Examples
  6464.  
  6465.    6-3
  6466.  
  6467.  
  6468.  
  6469.  
  6470.  
  6471.  
  6472.  
  6473.  
  6474.  
  6475.  
  6476.  
  6477.  
  6478.  
  6479.  
  6480.  
  6481.  
  6482.  
  6483.  
  6484.  
  6485.  
  6486.  
  6487.  
  6488.  
  6489.                                      104
  6490. fg_moverw
  6491.  
  6492. Prototype
  6493.  
  6494.    void fg_moverw (double x, double y);
  6495.    sub FGmoverw (x#, y#)
  6496.    subroutine fg_moverw (real*8 x, real*8 y)
  6497.    procedure fg_moverw (x, y : real);
  6498.  
  6499. Description
  6500.  
  6501.    The fg_moverw routine establishes the graphics cursor position at a world
  6502.    space point relative to the current position.
  6503.  
  6504. Parameters
  6505.  
  6506.    x is the world space x offset of the graphics cursor's new position.
  6507.  
  6508.    y is the world space y offset of the graphics cursor's new position.
  6509.  
  6510. Return value
  6511.  
  6512.    none
  6513.  
  6514. Restrictions
  6515.  
  6516.    This routine is not available in Fastgraph/Light and has no effect in text
  6517.    video modes.
  6518.  
  6519. See also
  6520.  
  6521.    fg_move, fg_moverel, fg_movew
  6522.  
  6523.  
  6524.  
  6525.  
  6526.  
  6527.  
  6528.  
  6529.  
  6530.  
  6531.  
  6532.  
  6533.  
  6534.  
  6535.  
  6536.  
  6537.  
  6538.  
  6539.  
  6540.  
  6541.  
  6542.  
  6543.  
  6544.  
  6545.  
  6546.  
  6547.  
  6548.                                      105
  6549. fg_movew
  6550.  
  6551. Prototype
  6552.  
  6553.    void fg_movew (double x, double y);
  6554.    sub FGmovew (x#, y#)
  6555.    subroutine fg_movew (real*8 x, real*8 y)
  6556.    procedure fg_movew (x, y : real);
  6557.  
  6558. Description
  6559.  
  6560.    The fg_movew routine establishes the graphics cursor position at an
  6561.    absolute world space point.  The fg_initw routine sets the graphics cursor
  6562.    position to (0.0,0.0).
  6563.  
  6564. Parameters
  6565.  
  6566.    x is the world space x coordinate of the graphics cursor's new position.
  6567.  
  6568.    y is the world space y coordinate of the graphics cursor's new position.
  6569.  
  6570. Return value
  6571.  
  6572.    none
  6573.  
  6574. Restrictions
  6575.  
  6576.    This routine is not available in Fastgraph/Light and has no effect in text
  6577.    video modes.
  6578.  
  6579. See also
  6580.  
  6581.    fg_move, fg_moverel, fg_moverw
  6582.  
  6583. Examples
  6584.  
  6585.    6-4, 6-8, 7-8, 7-9, 7-10, 7-11
  6586.  
  6587.  
  6588.  
  6589.  
  6590.  
  6591.  
  6592.  
  6593.  
  6594.  
  6595.  
  6596.  
  6597.  
  6598.  
  6599.  
  6600.  
  6601.  
  6602.  
  6603.  
  6604.  
  6605.  
  6606.  
  6607.                                      106
  6608. fg_music
  6609.  
  6610. Prototype
  6611.  
  6612.    void fg_music (char *music_string);
  6613.    sub FGmusic (music_string$)
  6614.    subroutine fg_music (character*(*) music_string)
  6615.    procedure fg_music (music_string : string);
  6616.  
  6617. Description
  6618.  
  6619.    The fg_music routine uses the programmable timer to play a sequence of
  6620.    musical tones.
  6621.  
  6622. Parameters
  6623.  
  6624.    music_string is an arbitrary-length sequence of music commands, followed by
  6625.    a dollar-sign ($) terminator.  Music commands are summarized in the
  6626.    following table:
  6627.  
  6628.    commandmeaning
  6629.  
  6630.    A thru G  Play the specified note in the current octave.
  6631.  
  6632.    #      May be appended to a note character (A through G) to make that note
  6633.           sharp.
  6634.  
  6635.    .      May be appended to a note character (A through G) or a sharp (#) to
  6636.           extend that note by half its normal length.  Multiple dots may be
  6637.           used, and each will again extend the note by half as much as the
  6638.           previous extension.
  6639.  
  6640.    Ln     Set the length of subsequent notes and pauses.  The value of n is
  6641.           an integer between 1 and 64, where 1 indicates a whole note, 2 a
  6642.           half note, 4 a quarter note, and so forth.  If no L command is
  6643.           present, L4 is assumed.
  6644.  
  6645.    On     Set the octave for subsequent notes.  The value of n may be an
  6646.           integer between 0 and 6 to set a specific octave.  It also can be a
  6647.           plus (+) or minus (-) character to increment or decrement the
  6648.           current octave number.  Octave 4 contains middle C, and if no O
  6649.           command is present, O4 is assumed.
  6650.  
  6651.    P      Pause (rest) for the duration specified by the most recent L
  6652.           command.
  6653.  
  6654.    Sn     Set the amount of silence between notes.  The value of n is an
  6655.           integer between 0 and 2.  If n is 0, each note plays for the full
  6656.           period set by the L command (music legato).  If n is 1, each note
  6657.           plays for 7/8 the period set by the L command (music normal).  If n
  6658.           is 2, each note plays for 3/4 the period set by the L command
  6659.           (music staccato).  If no S command is present, S1 is assumed.
  6660.  
  6661.    Tn     Set the tempo of the music (the number of quarter notes per
  6662.           minute).  The value of n is an integer between 32 and 255.  If no T
  6663.           command is present, T120 is assumed.
  6664.  
  6665.  
  6666.                                         107
  6667. fg_music (continued)
  6668.  
  6669. Parameters (continued)
  6670.  
  6671.    The fg_music routine ignores any other characters in music_string.  It also
  6672.    ignores command values outside the allowable range, such as T20 or O8.
  6673.  
  6674. Return value
  6675.  
  6676.    none
  6677.  
  6678. Restrictions
  6679.  
  6680.    This routine has no effect if there is asynchronous sound in progress.
  6681.  
  6682. See also
  6683.  
  6684.    fg_musicb
  6685.  
  6686. Examples
  6687.  
  6688.    13-3
  6689.  
  6690.  
  6691.  
  6692.  
  6693.  
  6694.  
  6695.  
  6696.  
  6697.  
  6698.  
  6699.  
  6700.  
  6701.  
  6702.  
  6703.  
  6704.  
  6705.  
  6706.  
  6707.  
  6708.  
  6709.  
  6710.  
  6711.  
  6712.  
  6713.  
  6714.  
  6715.  
  6716.  
  6717.  
  6718.  
  6719.  
  6720.  
  6721.  
  6722.  
  6723.  
  6724.  
  6725.                                      108
  6726. fg_musicb
  6727.  
  6728. Prototype
  6729.  
  6730.    void fg_musicb (char *music_string, int ntimes);
  6731.    sub FGmusicb (music_string$, ntimes%)
  6732.    subroutine fg_musicb (character*(*) music_string, integer*2 ntimes)
  6733.    procedure fg_musicb (music_string : string; ntimes : integer);
  6734.  
  6735. Description
  6736.  
  6737.    The fg_musicb routine uses the programmable timer to play a sequence of
  6738.    musical tones, concurrent with other activity.
  6739.  
  6740. Parameters
  6741.  
  6742.    music_string is an arbitrary-length sequence of music commands, followed by
  6743.    a dollar-sign ($) terminator.  Refer to the description of the fg_music
  6744.    routine for a complete list of music commands.
  6745.  
  6746.    ntimes specifies the number of times to cycle through the music commands in
  6747.    music_string.  If ntimes is negative, the music will play repetitively
  6748.    until you stop it with the fg_hush or fg_hushnext routine.
  6749.  
  6750. Return value
  6751.  
  6752.    none
  6753.  
  6754. Restrictions
  6755.  
  6756.    This routine has no effect if there is asynchronous sound already in
  6757.    progress.  To allow for fast-tempo music, Fastgraph temporarily quadruples
  6758.    the clock tick interrupt rate from 18.2 to 72.8 ticks per second while
  6759.    producing asynchronous sound.  Because many disk controllers rely on the
  6760.    18.2 tick per second clock rate to synchronize disk accesses, your programs
  6761.    should not perform any disk operations when asynchronous sound is in
  6762.    progress.
  6763.  
  6764. See also
  6765.  
  6766.    fg_hush, fg_hushnext, fg_music, fg_playing, fg_resume, fg_suspend
  6767.  
  6768. Examples
  6769.  
  6770.    13-6, 13-7, 13-8
  6771.  
  6772.  
  6773.  
  6774.  
  6775.  
  6776.  
  6777.  
  6778.  
  6779.  
  6780.  
  6781.  
  6782.  
  6783.  
  6784.                                      109
  6785. fg_numlock
  6786.  
  6787. Prototype
  6788.  
  6789.    int fg_numlock (void);
  6790.    function FGnumlock% ()
  6791.    integer*2 function fg_numlock ()
  6792.    function fg_numlock : integer;
  6793.  
  6794. Description
  6795.  
  6796.    The fg_numlock routine determines the state of the NumLock key.
  6797.  
  6798. Parameters
  6799.  
  6800.    none
  6801.  
  6802. Return value
  6803.  
  6804.    If the return value is 0, it means the NumLock key is off.  If it is 1, it
  6805.    means the NumLock key is on.
  6806.  
  6807. Restrictions
  6808.  
  6809.    none
  6810.  
  6811. See also
  6812.  
  6813.    fg_capslock, fg_scrlock, fg_setcaps, fg_setnum
  6814.  
  6815. Examples
  6816.  
  6817.    12-3
  6818.  
  6819.  
  6820.  
  6821.  
  6822.  
  6823.  
  6824.  
  6825.  
  6826.  
  6827.  
  6828.  
  6829.  
  6830.  
  6831.  
  6832.  
  6833.  
  6834.  
  6835.  
  6836.  
  6837.  
  6838.  
  6839.  
  6840.  
  6841.  
  6842.  
  6843.                                      110
  6844. fg_paint
  6845.  
  6846. Prototype
  6847.  
  6848.    void fg_paint (int ix, int iy);
  6849.    sub FGpaint (ix%, iy%)
  6850.    subroutine fg_paint (integer*2 ix, integer*2 iy)
  6851.    procedure fg_paint (ix, iy : integer);
  6852.  
  6853. Description
  6854.  
  6855.    The fg_paint routine fills an arbitrary closed region with the current
  6856.    color value.  The region is defined by specifying a screen space point
  6857.    within its interior.
  6858.  
  6859. Parameters
  6860.  
  6861.    ix is the screen space x coordinate of the interior point.
  6862.  
  6863.    iy is the screen space y coordinate of the interior point.
  6864.  
  6865. Return value
  6866.  
  6867.    none
  6868.  
  6869. Restrictions
  6870.  
  6871.    This routine has no effect in text video modes.  The screen edges are not
  6872.    considered region boundaries, and filling an open region will cause
  6873.    fg_paint to behave unpredictably.
  6874.  
  6875. See also
  6876.  
  6877.    fg_paintw
  6878.  
  6879. Examples
  6880.  
  6881.    6-15, 11-5
  6882.  
  6883.  
  6884.  
  6885.  
  6886.  
  6887.  
  6888.  
  6889.  
  6890.  
  6891.  
  6892.  
  6893.  
  6894.  
  6895.  
  6896.  
  6897.  
  6898.  
  6899.  
  6900.  
  6901.  
  6902.                                      111
  6903. fg_paintw
  6904.  
  6905. Prototype
  6906.  
  6907.    void fg_paintw (double x, double y);
  6908.    sub FGpaintw (x#, y#)
  6909.    subroutine fg_paintw (real*8 x, real*8 y)
  6910.    procedure fg_paintw (x, y : real);
  6911.  
  6912. Description
  6913.  
  6914.    The fg_paintw routine fills an arbitrary closed region with the current
  6915.    color value.  The region is defined by specifying a world space point
  6916.    within its interior.
  6917.  
  6918. Parameters
  6919.  
  6920.    x is the world space x coordinate of the interior point.
  6921.  
  6922.    y is the world space y coordinate of the interior point.
  6923.  
  6924. Return value
  6925.  
  6926.    none
  6927.  
  6928. Restrictions
  6929.  
  6930.    This routine is not available in Fastgraph/Light and has no effect in text
  6931.    video modes.  The screen edges are not considered region boundaries, and
  6932.    filling an open region will cause fg_paintw to behave unpredictably.
  6933.  
  6934. See also
  6935.  
  6936.    fg_paint
  6937.  
  6938.  
  6939.  
  6940.  
  6941.  
  6942.  
  6943.  
  6944.  
  6945.  
  6946.  
  6947.  
  6948.  
  6949.  
  6950.  
  6951.  
  6952.  
  6953.  
  6954.  
  6955.  
  6956.  
  6957.  
  6958.  
  6959.  
  6960.  
  6961.                                      112
  6962. fg_palette
  6963.  
  6964. Prototype
  6965.  
  6966.    void fg_palette (int number, int color);
  6967.    sub FGpalette (number%, color%)
  6968.    subroutine fg_palette (integer*2 number, integer*2 color)
  6969.    procedure fg_palette (number, color : integer);
  6970.  
  6971. Description
  6972.  
  6973.    The fg_palette routine has different functions depending on the current
  6974.    graphics video mode.  For CGA four-color modes (modes 4 and 5), it
  6975.    establishes the current palette and defines the background color for that
  6976.    palette.  In the CGA two-color mode (mode 6), it defines the foreground
  6977.    color.  For Tandy/PCjr, EGA, and VGA graphics modes (modes 9, 13, 14, 15,
  6978.    16, 17, and 18), it defines the value of a palette register.  For 256-color
  6979.    MCGA and VGA graphics modes (modes 19 through 23), it defines the value of
  6980.    a video DAC register.
  6981.  
  6982. Parameters
  6983.  
  6984.    The meanings of the number and color parameters depend on the current video
  6985.    mode.  The following table summarizes the parameter meanings and legal
  6986.    values for each video mode.
  6987.  
  6988.    mode   number parameter (range)           color parameter (range)
  6989.  
  6990.    4,5    CGA palette number (0-5)           background color (0-15)
  6991.    6      ignored                            foreground color (0-15)
  6992.    9      palette register number (0-15)     palette value (0-15)
  6993.    13,14  palette register number (0-15)     palette value (0-23)
  6994.    15     palette register number (0,1,4,5)  palette value (0,8,24)
  6995.    16     palette register number (0-15)     palette value (0-63)
  6996.    17     palette register number (0-1)      video DAC register number (0-15)
  6997.    18     palette register number (0-15)     video DAC register number (0-15)
  6998.    19-23  video DAC register number (0-255)  DAC value (0-63)
  6999.  
  7000.    Refer to Chapter 5 of the Fastgraph User's Guide for more specific
  7001.    information about the number and color parameters.
  7002.  
  7003. Return value
  7004.  
  7005.    none
  7006.  
  7007. Restrictions
  7008.  
  7009.    This routine has no effect in text video modes or Hercules graphics modes.
  7010.    Changing the foreground color (in mode 6) always works on true CGA
  7011.    adapters, but there are very few EGA and VGA adapters that correctly
  7012.    implement this capability in their mode 6 emulation.
  7013.  
  7014. See also
  7015.  
  7016.    fg_defcolor, fg_maprgb, fg_palettes, fg_setcolor, fg_setdacs, fg_setrgb
  7017.  
  7018.  
  7019.  
  7020.                                      113
  7021. fg_palette (continued)
  7022.  
  7023. Examples
  7024.  
  7025.    5-1, 5-2, 5-3, 5-6, 5-7, 5-8, 5-9, 5-13, 5-16, 9-14
  7026.  
  7027.  
  7028.  
  7029.  
  7030.  
  7031.  
  7032.  
  7033.  
  7034.  
  7035.  
  7036.  
  7037.  
  7038.  
  7039.  
  7040.  
  7041.  
  7042.  
  7043.  
  7044.  
  7045.  
  7046.  
  7047.  
  7048.  
  7049.  
  7050.  
  7051.  
  7052.  
  7053.  
  7054.  
  7055.  
  7056.  
  7057.  
  7058.  
  7059.  
  7060.  
  7061.  
  7062.  
  7063.  
  7064.  
  7065.  
  7066.  
  7067.  
  7068.  
  7069.  
  7070.  
  7071.  
  7072.  
  7073.  
  7074.  
  7075.  
  7076.  
  7077.  
  7078.  
  7079.                                      114
  7080. fg_palettes
  7081.  
  7082. Prototype
  7083.  
  7084.    void fg_palettes (int *color_array);
  7085.    sub FGpalettes (color_array%())
  7086.    subroutine fg_palettes (integer*2 color_array)
  7087.    procedure fg_palettes (var color_array : integer);
  7088.  
  7089. Description
  7090.  
  7091.    The fg_palettes routine defines all 16 palette registers (in Tandy/PCjr,
  7092.    EGA, and VGA graphics modes), or the first 16 video DAC registers (in 256-
  7093.    color MCGA and VGA graphics modes).
  7094.  
  7095. Parameters
  7096.  
  7097.    color_array is a 16-element array that contains the values to assign to the
  7098.    palette registers or video DAC registers.
  7099.  
  7100. Return value
  7101.  
  7102.    none
  7103.  
  7104. Restrictions
  7105.  
  7106.    This routine has no effect in text video modes, CGA graphics modes, or
  7107.    Hercules graphics modes.
  7108.  
  7109. See also
  7110.  
  7111.    fg_maprgb, fg_palette, fg_setdacs
  7112.  
  7113. Examples
  7114.  
  7115.    5-14
  7116.  
  7117.  
  7118.  
  7119.  
  7120.  
  7121.  
  7122.  
  7123.  
  7124.  
  7125.  
  7126.  
  7127.  
  7128.  
  7129.  
  7130.  
  7131.  
  7132.  
  7133.  
  7134.  
  7135.  
  7136.  
  7137.  
  7138.                                      115
  7139. fg_pan
  7140.  
  7141. Prototype
  7142.  
  7143.    void fg_pan (int ix, int iy);
  7144.    sub FGpan (ix%, iy%)
  7145.    subroutine fg_pan (integer*2 ix, integer*2 iy)
  7146.    procedure fg_pan (ix, iy : integer);
  7147.  
  7148. Description
  7149.  
  7150.    The fg_pan routine changes the screen origin (the upper left corner of the
  7151.    screen) to the specified screen space coordinates.
  7152.  
  7153. Parameters
  7154.  
  7155.    ix is the new screen space x coordinate for the screen origin.
  7156.  
  7157.    iy is the new screen space y coordinate for the screen origin.
  7158.  
  7159. Return value
  7160.  
  7161.    none
  7162.  
  7163. Restrictions
  7164.  
  7165.    This routine has no effect in text video odes.  Because of hardware
  7166.    limitations, only certain coordinate positions can be used as the screen
  7167.    origin.  Fastgraph compensates for these restrictions by reducing ix and iy
  7168.    to values that are acceptable to the current video mode, as shown in the
  7169.    following table.
  7170.  
  7171.                            x will be reduced  y will be reduced
  7172.                video mode  to a multiple of:  to a multiple of:
  7173.  
  7174.                   4, 5              8                  2
  7175.                     6              16                  2
  7176.                     9               4                  4
  7177.                    11               8                  4
  7178.                    12               4                2 or 3
  7179.                 19 to 23            4                  1
  7180.  
  7181. See also
  7182.  
  7183.    fg_panw
  7184.  
  7185. Examples
  7186.  
  7187.    11-6, 11-7
  7188.  
  7189.  
  7190.  
  7191.  
  7192.  
  7193.  
  7194.  
  7195.  
  7196.  
  7197.                                      116
  7198. fg_panw
  7199.  
  7200. Prototype
  7201.  
  7202.    void fg_panw (double x, double y);
  7203.    sub FGpanw (x#, y#)
  7204.    subroutine fg_panw (real*8 x, real*8 y)
  7205.    procedure fg_panw (x, y : real);
  7206.  
  7207. Description
  7208.  
  7209.    The fg_panw routine changes the screen origin (the upper left corner of the
  7210.    screen) to the specified world space coordinates.
  7211.  
  7212. Parameters
  7213.  
  7214.    x is the new world space x coordinate for the screen origin.
  7215.  
  7216.    y is the new world space y coordinate for the screen origin.
  7217.  
  7218. Return value
  7219.  
  7220.    none
  7221.  
  7222. Restrictions
  7223.  
  7224.    This routine is not available in Fastgraph/Light and has no effect in text
  7225.    video modes.  To compensate for the hardware limitations that restrict the
  7226.    screen origin coordinates (see the description of the fg_pan routine),
  7227.    Fastgraph reduces x and y to an acceptable screen space equivalent.
  7228.  
  7229. See also
  7230.  
  7231.    fg_pan
  7232.  
  7233.  
  7234.  
  7235.  
  7236.  
  7237.  
  7238.  
  7239.  
  7240.  
  7241.  
  7242.  
  7243.  
  7244.  
  7245.  
  7246.  
  7247.  
  7248.  
  7249.  
  7250.  
  7251.  
  7252.  
  7253.  
  7254.  
  7255.  
  7256.                                      117
  7257. fg_pattern
  7258.  
  7259. Prototype
  7260.  
  7261.    void fg_pattern (int index, int display_pattern);
  7262.    sub FGpattern (index%, display_pattern%)
  7263.    subroutine fg_pattern (integer*2 index, integer*2 display_pattern)
  7264.    procedure fg_pattern (index, display_pattern : integer);
  7265.  
  7266. Description
  7267.  
  7268.    The fg_pattern routine defines one of Fastgraph's 256 display patterns used
  7269.    with the fg_dispfile, fg_display, or fg_displayp routines.  When using
  7270.    these routines to display a pixel run map, Fastgraph will use the pattern
  7271.    associated with that color index instead of displaying the color itself.
  7272.    Refer to the Fastgraph User's Guide for more information about display
  7273.    patterns and their default values for each graphics video mode.
  7274.  
  7275. Parameters
  7276.  
  7277.    index is the number of the display pattern to define, between 0 and 255.
  7278.  
  7279.    display_pattern is a 16-bit value representing the actual display pattern.
  7280.    Its structure depends on the video mode, as summarized in the following
  7281.    table.
  7282.  
  7283.    video modes pattern structure
  7284.    4, 5, 12  shift count (8 bits), four pixels (2 bits each)
  7285.    6, 11  shift count (8 bits), eight pixels (1 bit each)
  7286.    9 shift count (8 bits), two pixels (4 bits each)
  7287.    13, 14, 15, 16, 18  unused (8 bits), two pixels (4 bits each)
  7288.    17unused (14 bits), two pixels (1 bit each)
  7289.  
  7290.    The shift count defines the number of bits that display_pattern is rotated
  7291.    left when applied to odd-numbered pixel rows, while the pixels are the
  7292.    actual color values replicated through the pixel run.  For the EGA and VGA
  7293.    graphics modes, an implied one pixel shift count is used.
  7294.  
  7295. Return value
  7296.  
  7297.    none
  7298.  
  7299. Restrictions
  7300.  
  7301.    This routine has no effect in text video modes or in 256-color graphics
  7302.    modes.
  7303.  
  7304. See also
  7305.  
  7306.    fg_dispfile, fg_display, fg_displayp
  7307.  
  7308. Examples
  7309.  
  7310.    9-14
  7311.  
  7312.  
  7313.  
  7314.  
  7315.                                      118
  7316. fg_playing
  7317.  
  7318. Prototype
  7319.  
  7320.    int fg_playing (void);
  7321.    function FGplaying% ()
  7322.    integer*2 function fg_playing ()
  7323.    function fg_playing : integer;
  7324.  
  7325. Description
  7326.  
  7327.    The fg_playing routine determines whether or not there is any asynchronous
  7328.    sound in progress.
  7329.  
  7330. Parameters
  7331.  
  7332.    none
  7333.  
  7334. Return value
  7335.  
  7336.    If the return value is 0, it means there is no asynchronous sound in
  7337.    progress.  If it is 1, then there is asynchronous sound in progress.
  7338.  
  7339. Restrictions
  7340.  
  7341.    none
  7342.  
  7343. See also
  7344.  
  7345.    fg_musicb, fg_sounds, fg_voices
  7346.  
  7347. Examples
  7348.  
  7349.    13-4, 13-5, 13-6, 13-7, 13-8
  7350.  
  7351.  
  7352.  
  7353.  
  7354.  
  7355.  
  7356.  
  7357.  
  7358.  
  7359.  
  7360.  
  7361.  
  7362.  
  7363.  
  7364.  
  7365.  
  7366.  
  7367.  
  7368.  
  7369.  
  7370.  
  7371.  
  7372.  
  7373.  
  7374.                                      119
  7375. fg_point
  7376.  
  7377. Prototype
  7378.  
  7379.    void fg_point (int ix, int iy);
  7380.    sub FGpoint (ix%, iy%)
  7381.    subroutine fg_point (integer*2 ix, integer*2 iy)
  7382.    procedure fg_point (ix, iy : integer);
  7383.  
  7384. Description
  7385.  
  7386.    The fg_point routine draws a point (displays a pixel) in screen space.
  7387.  
  7388. Parameters
  7389.  
  7390.    ix is the point's screen space x coordinate.
  7391.  
  7392.    iy is the point's screen space y coordinate.
  7393.  
  7394. Return value
  7395.  
  7396.    none
  7397.  
  7398. Restrictions
  7399.  
  7400.    This routine has no effect in text video modes.
  7401.  
  7402. See also
  7403.  
  7404.    fg_pointw
  7405.  
  7406. Examples
  7407.  
  7408.    6-1
  7409.  
  7410.  
  7411.  
  7412.  
  7413.  
  7414.  
  7415.  
  7416.  
  7417.  
  7418.  
  7419.  
  7420.  
  7421.  
  7422.  
  7423.  
  7424.  
  7425.  
  7426.  
  7427.  
  7428.  
  7429.  
  7430.  
  7431.  
  7432.  
  7433.                                      120
  7434. fg_pointw
  7435.  
  7436. Prototype
  7437.  
  7438.    void fg_pointw (double x, double y);
  7439.    sub FGpointw (x#, y#)
  7440.    subroutine fg_pointw (real*8 x, real*8 y)
  7441.    procedure fg_pointw (x, y : real);
  7442.  
  7443. Description
  7444.  
  7445.    The fg_pointw routine draws a point (displays a pixel) in world space.
  7446.  
  7447. Parameters
  7448.  
  7449.    x is the point's world space x coordinate.
  7450.  
  7451.    y is the point's world space y coordinate.
  7452.  
  7453. Return value
  7454.  
  7455.    none
  7456.  
  7457. Restrictions
  7458.  
  7459.    This routine is not available in Fastgraph/Light and has no effect in text
  7460.    video modes.
  7461.  
  7462. See also
  7463.  
  7464.    fg_point
  7465.  
  7466.  
  7467.  
  7468.  
  7469.  
  7470.  
  7471.  
  7472.  
  7473.  
  7474.  
  7475.  
  7476.  
  7477.  
  7478.  
  7479.  
  7480.  
  7481.  
  7482.  
  7483.  
  7484.  
  7485.  
  7486.  
  7487.  
  7488.  
  7489.  
  7490.  
  7491.  
  7492.                                      121
  7493. fg_polygon
  7494.  
  7495. Prototype
  7496.  
  7497.    void fg_polygon (int *ix_array, int *iy_array, int n);
  7498.    sub FGpolygon (ix_array%(), iy_array%(), n%)
  7499.    subroutine fg_polygon (integer*2 ix_array, integer*2 iy_array, integer*2 n)
  7500.    procedure fg_polygon (var ix_array, iy_array : integer; n : integer);
  7501.  
  7502. Description
  7503.  
  7504.    The fg_polygon routine draws an unfilled polygon in screen space, using two
  7505.    coordinate arrays to define the polygon vertices.  The drawing of the
  7506.    polygon begins at the graphics cursor position, through the vertices
  7507.    defined by the coordinate arrays, and finally back to the original graphics
  7508.    cursor position if necessary.
  7509.  
  7510. Parameters
  7511.  
  7512.    ix_array is an arbitrary-length array containing the screen space x
  7513.    coordinates of the polygon vertices.
  7514.  
  7515.    iy_array is an arbitrary-length array containing the screen space y
  7516.    coordinates of the polygon vertices.
  7517.  
  7518.    n is the number of vertices in the polygon.
  7519.  
  7520. Return value
  7521.  
  7522.    none
  7523.  
  7524. Restrictions
  7525.  
  7526.    This routine has no effect in text video modes.
  7527.  
  7528. See also
  7529.  
  7530.    fg_polygonw
  7531.  
  7532. Examples
  7533.  
  7534.    6-7
  7535.  
  7536.  
  7537.  
  7538.  
  7539.  
  7540.  
  7541.  
  7542.  
  7543.  
  7544.  
  7545.  
  7546.  
  7547.  
  7548.  
  7549.  
  7550.  
  7551.                                      122
  7552. fg_polygonw
  7553.  
  7554. Prototype
  7555.  
  7556.    void fg_polygonw (double *x_array, double *y_array, int n);
  7557.    sub FGpolygonw (x_array#(), y_array#(), n%)
  7558.    subroutine fg_polygonw (real*8 x_array, real*8 y_array, integer*2 n)
  7559.    procedure fg_polygonw (var x_array, y_array : real; n : integer);
  7560.  
  7561. Description
  7562.  
  7563.    The fg_polygonw routine draws an unfilled polygon in world space, using two
  7564.    coordinate arrays to define the polygon vertices.  The drawing of the
  7565.    polygon begins at the graphics cursor position, through the vertices
  7566.    defined by the coordinate arrays, and finally back to the original graphics
  7567.    cursor position if necessary.
  7568.  
  7569. Parameters
  7570.  
  7571.    x_array is an arbitrary-length array containing the world space x
  7572.    coordinates of the polygon vertices.
  7573.  
  7574.    y_array is an arbitrary-length array containing the world space y
  7575.    coordinates of the polygon vertices.
  7576.  
  7577.    n is the number of vertices in the polygon.
  7578.  
  7579. Return value
  7580.  
  7581.    none
  7582.  
  7583. Restrictions
  7584.  
  7585.    This routine is not available in Fastgraph/Light and has no effect in text
  7586.    video modes.
  7587.  
  7588. See also
  7589.  
  7590.    fg_polygon
  7591.  
  7592.  
  7593.  
  7594.  
  7595.  
  7596.  
  7597.  
  7598.  
  7599.  
  7600.  
  7601.  
  7602.  
  7603.  
  7604.  
  7605.  
  7606.  
  7607.  
  7608.  
  7609.  
  7610.                                      123
  7611. fg_quiet
  7612.  
  7613. Prototype
  7614.  
  7615.    void fg_quiet (void);
  7616.    sub FGquiet ()
  7617.    subroutine fg_quiet ()
  7618.    procedure fg_quiet;
  7619.  
  7620. Description
  7621.  
  7622.    The fg_quiet routine stops continuous synchronous sound started with the
  7623.    fg_sound or fg_voice routines.  It has no effect if there is no continuous
  7624.    sound in progress.
  7625.  
  7626. Parameters
  7627.  
  7628.    none
  7629.  
  7630. Return value
  7631.  
  7632.    none
  7633.  
  7634. Restrictions
  7635.  
  7636.    none
  7637.  
  7638. See also
  7639.  
  7640.    fg_sound, fg_voice
  7641.  
  7642. Examples
  7643.  
  7644.    13-2
  7645.  
  7646.  
  7647.  
  7648.  
  7649.  
  7650.  
  7651.  
  7652.  
  7653.  
  7654.  
  7655.  
  7656.  
  7657.  
  7658.  
  7659.  
  7660.  
  7661.  
  7662.  
  7663.  
  7664.  
  7665.  
  7666.  
  7667.  
  7668.  
  7669.                                      124
  7670. fg_rect
  7671.  
  7672. Prototype
  7673.  
  7674.    void fg_rect (int minx, int maxx, int miny, int maxy);
  7675.    sub FGrect (minx%, maxx%, miny%, maxy%)
  7676.    subroutine fg_rect (integer*2 minx, integer*2 maxx, integer*2 miny,
  7677.    integer*2 maxy)
  7678.    procedure fg_rect (minx, maxx, miny, maxy : integer);
  7679.  
  7680. Description
  7681.  
  7682.    The fg_rect routine draws a solid (filled) rectangle in screen space or
  7683.    character space, without regard to the clipping region.
  7684.  
  7685. Parameters
  7686.  
  7687.    minx is the x coordinate of the rectangle's left edge.
  7688.  
  7689.    maxx is the x coordinate of the rectangle's right edge.  It must be greater
  7690.    than or equal to the value of minx.
  7691.  
  7692.    miny is the y coordinate of the rectangle's top edge.
  7693.  
  7694.    maxy is the y coordinate of the rectangle's bottom edge.  It must be
  7695.    greater than or equal to the value of miny.
  7696.  
  7697. Return value
  7698.  
  7699.    none
  7700.  
  7701. Restrictions
  7702.  
  7703.    none
  7704.  
  7705. See also
  7706.  
  7707.    fg_clprect, fg_clprectw, fg_drect, fg_drectw, fg_rectw
  7708.  
  7709. Examples
  7710.  
  7711.    6-10, 7-5, 7-7
  7712.  
  7713.  
  7714.  
  7715.  
  7716.  
  7717.  
  7718.  
  7719.  
  7720.  
  7721.  
  7722.  
  7723.  
  7724.  
  7725.  
  7726.  
  7727.  
  7728.                                      125
  7729. fg_rectw
  7730.  
  7731. Prototype
  7732.  
  7733.    void fg_rectw (double xmin, double xmax, double ymin, double ymax);
  7734.    sub FGrectw (xmin#, xmax#, ymin#, ymax#)
  7735.    subroutine fg_rectw (real*8 xmin, real*8 xmax, real*8 ymin, real*8 ymax)
  7736.    procedure fg_rectw (xmin, xmax, ymin, ymax : real);
  7737.  
  7738. Description
  7739.  
  7740.    The fg_rectw routine draws a solid (filled) rectangle in world space,
  7741.    without regard to the clipping region.
  7742.  
  7743. Parameters
  7744.  
  7745.    xmin is the world space x coordinate of the rectangle's left edge.
  7746.  
  7747.    xmax is the world space x coordinate of the rectangle's right edge.  It
  7748.    must be greater than or equal to the value of xmin.
  7749.  
  7750.    ymin is the world space y coordinate of the rectangle's bottom edge.
  7751.  
  7752.    ymax is the world space y coordinate of the rectangle's top edge.  It must
  7753.    be greater than or equal to the value of ymin.
  7754.  
  7755. Return value
  7756.  
  7757.    none
  7758.  
  7759. Restrictions
  7760.  
  7761.    This routine is not available in Fastgraph/Light.
  7762.  
  7763. See also
  7764.  
  7765.    fg_clprect, fg_clprectw, fg_drect, fg_drectw, fg_rect
  7766.  
  7767. Examples
  7768.  
  7769.    7-11
  7770.  
  7771.  
  7772.  
  7773.  
  7774.  
  7775.  
  7776.  
  7777.  
  7778.  
  7779.  
  7780.  
  7781.  
  7782.  
  7783.  
  7784.  
  7785.  
  7786.  
  7787.                                      126
  7788. fg_reset
  7789.  
  7790. Prototype
  7791.  
  7792.    void fg_reset (void);
  7793.    sub FGreset ()
  7794.    subroutine fg_reset ()
  7795.    procedure fg_reset;
  7796.  
  7797. Description
  7798.  
  7799.    When the ANSI.SYS driver is not loaded, the fg_reset routine erases the
  7800.    screen.  When ANSI.SYS is loaded, fg_reset also restores any previously set
  7801.    screen attributes.  It is generally the last Fastgraph routine called in a
  7802.    program.
  7803.  
  7804. Parameters
  7805.  
  7806.    none
  7807.  
  7808. Return value
  7809.  
  7810.    none
  7811.  
  7812. Restrictions
  7813.  
  7814.    This routine has no effect in graphics video modes.
  7815.  
  7816. See also
  7817.  
  7818.    fg_erase
  7819.  
  7820. Examples
  7821.  
  7822.    3-2
  7823.  
  7824.  
  7825.  
  7826.  
  7827.  
  7828.  
  7829.  
  7830.  
  7831.  
  7832.  
  7833.  
  7834.  
  7835.  
  7836.  
  7837.  
  7838.  
  7839.  
  7840.  
  7841.  
  7842.  
  7843.  
  7844.  
  7845.  
  7846.                                      127
  7847. fg_resize
  7848.  
  7849. Prototype
  7850.  
  7851.    void fg_resize (int width, int height);
  7852.    sub FGresize (width%, height%)
  7853.    subroutine fg_resize (integer*2 width, integer*2 height)
  7854.    procedure fg_resize (width, height : integer);
  7855.  
  7856. Description
  7857.  
  7858.    The fg_resize routine changes the dimensions of a video page in EGA and VGA
  7859.    graphics modes.
  7860.  
  7861. Parameters
  7862.  
  7863.    width specifies the new video page width in pixels.
  7864.  
  7865.    height specifies the new video page height in pixels.
  7866.  
  7867. Return value
  7868.  
  7869.    none
  7870.  
  7871. Restrictions
  7872.  
  7873.    The size of a video page is constrained only by the amount of video memory
  7874.    available.  Increasing the video page size reduces the number of physical
  7875.    pages available proportionally.  In mode 13, for example, increasing the
  7876.    page size from 320x200 to 640x400 reduces the number of video pages from 8
  7877.    to 2.
  7878.  
  7879.    When you call fg_resize, the visual page must be page 0.
  7880.  
  7881.    If you have created any logical video pages, you must release them with
  7882.    fg_freepage before calling fg_resize, and then create them again afterward.
  7883.  
  7884.    If you have initialized the mouse (with fg_mouseini), joysticks (with
  7885.    fg_initjoy), expanded memory (with fg_initems), or extended memory (with
  7886.    fg_initxms), you should re-initialize these resources after calling
  7887.    fg_resize.  Most mouse drivers expect a fixed video page width, so the
  7888.    mouse cursor may become distorted after resizing video pages.
  7889.  
  7890.    The fg_setmode routine re-establishes the dimensions of a video page to the
  7891.    default screen resolution for the selected video mode.
  7892.  
  7893.    This routine is meaningful only in the native EGA graphics modes (13 to
  7894.    16), native VGA graphics modes (17 and 18), and extended VGA graphics modes
  7895.    (20 to 23).  It has no effect in other video modes.
  7896.  
  7897. See also
  7898.  
  7899.    fg_pan
  7900.  
  7901. Examples
  7902.  
  7903.    8-10, 11-7
  7904.  
  7905.                                      128
  7906. fg_restore
  7907.  
  7908. Prototype
  7909.  
  7910.    void fg_restore (int minx, int maxx, int miny, int maxy);
  7911.    sub FGrestore (minx%, maxx%, miny%, maxy%)
  7912.    subroutine fg_restore (integer*2 minx, integer*2 maxx, integer*2 miny,
  7913.    integer*2 maxy)
  7914.    procedure fg_restore (minx, maxx, miny, maxy : integer);
  7915.  
  7916. Description
  7917.  
  7918.    The fg_restore routine copies a rectangular region from the hidden video
  7919.    page to the same position on the active video page.  In text modes, the
  7920.    region is defined in character space; in graphics modes, it is defined in
  7921.    screen space.
  7922.  
  7923. Parameters
  7924.  
  7925.    minx is the x coordinate of the region's left edge.  In graphics modes, its
  7926.    value is reduced to a byte boundary if necessary.
  7927.  
  7928.    maxx is the x coordinate of the region's right edge.  It must be greater
  7929.    than or equal to the value of minx.  In graphics modes, its value is
  7930.    extended to a byte boundary if necessary.
  7931.  
  7932.    miny is the y coordinate of the region's top edge.
  7933.  
  7934.    maxy is the y coordinate of the region's bottom edge.  It must be greater
  7935.    than or equal to the value of miny.
  7936.  
  7937. Return value
  7938.  
  7939.    none
  7940.  
  7941. Restrictions
  7942.  
  7943.    none
  7944.  
  7945. See also
  7946.  
  7947.    fg_restorew, fg_save, fg_savew, fg_sethpage, fg_transfer
  7948.  
  7949. Examples
  7950.  
  7951.    9-23, 9-24
  7952.  
  7953.  
  7954.  
  7955.  
  7956.  
  7957.  
  7958.  
  7959.  
  7960.  
  7961.  
  7962.  
  7963.  
  7964.                                      129
  7965. fg_restorew
  7966.  
  7967. Prototype
  7968.  
  7969.    void fg_restorew (double xmin, double xmax, double ymin, double ymax);
  7970.    sub FGrestorew (xmin#, xmax#, ymin#, ymax#)
  7971.    subroutine fg_restorew (real*8 xmin, real*8 xmax, real*8 ymin, real*8 ymax)
  7972.    procedure fg_restorew (xmin, xmax, ymin, ymax : real);
  7973.  
  7974. Description
  7975.  
  7976.    The fg_restorew routine copies a rectangular region, defined in world
  7977.    space, from the hidden video page to the same position on the active video
  7978.    page.
  7979.  
  7980. Parameters
  7981.  
  7982.    xmin is the world space x coordinate of the region's left edge.  In
  7983.    graphics modes, its value is reduced to a byte boundary if necessary.
  7984.  
  7985.    xmax is the world space x coordinate of the region's right edge.  It must
  7986.    be greater than or equal to the value of xmin.  In graphics modes, its
  7987.    value is extended to a byte boundary if necessary.
  7988.  
  7989.    ymin is the world space y coordinate of the region's bottom edge.
  7990.  
  7991.    ymax is the world space y coordinate of the region's top edge.  It must be
  7992.    greater than or equal to the value of ymin.
  7993.  
  7994. Return value
  7995.  
  7996.    none
  7997.  
  7998. Restrictions
  7999.  
  8000.    This routine is not available in Fastgraph/Light.
  8001.  
  8002. See also
  8003.  
  8004.    fg_restore, fg_save, fg_savew, fg_sethpage, fg_transfer
  8005.  
  8006.  
  8007.  
  8008.  
  8009.  
  8010.  
  8011.  
  8012.  
  8013.  
  8014.  
  8015.  
  8016.  
  8017.  
  8018.  
  8019.  
  8020.  
  8021.  
  8022.  
  8023.                                      130
  8024. fg_resume
  8025.  
  8026. Prototype
  8027.  
  8028.    void fg_resume (void);
  8029.    sub FGresume ()
  8030.    subroutine fg_resume ()
  8031.    procedure fg_resume;
  8032.  
  8033. Description
  8034.  
  8035.    The fg_resume routine restarts asynchronous music previously suspended by
  8036.    the fg_suspend routine.  It has no effect if there is no suspended music.
  8037.  
  8038. Parameters
  8039.  
  8040.    none
  8041.  
  8042. Return value
  8043.  
  8044.    none
  8045.  
  8046. Restrictions
  8047.  
  8048.    none
  8049.  
  8050. See also
  8051.  
  8052.    fg_musicb, fg_suspend
  8053.  
  8054. Examples
  8055.  
  8056.    13-8
  8057.  
  8058.  
  8059.  
  8060.  
  8061.  
  8062.  
  8063.  
  8064.  
  8065.  
  8066.  
  8067.  
  8068.  
  8069.  
  8070.  
  8071.  
  8072.  
  8073.  
  8074.  
  8075.  
  8076.  
  8077.  
  8078.  
  8079.  
  8080.  
  8081.  
  8082.                                      131
  8083. fg_revimage
  8084.  
  8085. Prototype
  8086.  
  8087.    void fg_revimage (char *map_array, int width, int height);
  8088.    sub FGrevimage (map_array$, width%, height%)
  8089.    subroutine fg_revimage (integer*1 map_array, integer*2 width, integer*2
  8090.    height)
  8091.    procedure fg_revimage (var map_array : byte; width, height : integer);
  8092.  
  8093. Description
  8094.  
  8095.    The fg_revimage routine displays a reversed image stored as a mode-specific
  8096.    bit map.  The image will be positioned so that its lower left corner is at
  8097.    the graphics cursor position.  Refer to the Fastgraph User's Guide for
  8098.    complete information about mode-specific bit maps.
  8099.  
  8100. Parameters
  8101.  
  8102.    map_array is the arbitrary-length array containing the bit map.
  8103.  
  8104.    width is the width in bytes of the bit map.
  8105.  
  8106.    height is the height in bytes (pixel rows) of the bit map.
  8107.  
  8108. Return value
  8109.  
  8110.    none
  8111.  
  8112. Restrictions
  8113.  
  8114.    This routine has no effect in text video modes.
  8115.  
  8116. See also
  8117.  
  8118.    fg_clpimage, fg_drwimage, fg_flpimage, fg_getimage
  8119.  
  8120. Examples
  8121.  
  8122.    9-8, 9-9
  8123.  
  8124.  
  8125.  
  8126.  
  8127.  
  8128.  
  8129.  
  8130.  
  8131.  
  8132.  
  8133.  
  8134.  
  8135.  
  8136.  
  8137.  
  8138.  
  8139.  
  8140.  
  8141.                                      132
  8142. fg_revmask
  8143.  
  8144. Prototype
  8145.  
  8146.    void fg_revmask (char *map_array, int runs, int width);
  8147.    sub FGrevmask (map_array$, runs%, width%)
  8148.    subroutine fg_revmask (integer*1 map_array, integer*2 runs, integer*2
  8149.    width)
  8150.    procedure fg_revmask (var map_array : byte; runs, width : integer);
  8151.  
  8152. Description
  8153.  
  8154.    The fg_revmask routine displays a reversed image stored as a masking map.
  8155.    The image will be positioned so that its lower left corner is at the
  8156.    graphics cursor position.  Refer to the description of the fg_drawmask
  8157.    routine for more information about masking maps.
  8158.  
  8159. Parameters
  8160.  
  8161.    map_array is the arbitrary-length array containing the masking map.
  8162.  
  8163.    runs is the number of pixel runs in the masking map.
  8164.  
  8165.    width is the width in pixels of the masking map.
  8166.  
  8167. Return value
  8168.  
  8169.    none
  8170.  
  8171. Restrictions
  8172.  
  8173.    This routine has no effect in text video modes, or in the native EGA and
  8174.    VGA graphics video modes.
  8175.  
  8176. See also
  8177.  
  8178.    fg_clipmask, fg_drawmask, fg_flipmask
  8179.  
  8180. Examples
  8181.  
  8182.    9-16
  8183.  
  8184.  
  8185.  
  8186.  
  8187.  
  8188.  
  8189.  
  8190.  
  8191.  
  8192.  
  8193.  
  8194.  
  8195.  
  8196.  
  8197.  
  8198.  
  8199.  
  8200.                                      133
  8201. fg_save
  8202.  
  8203. Prototype
  8204.  
  8205.    void fg_save (int minx, int maxx, int miny, int maxy);
  8206.    sub FGsave (minx%, maxx%, miny%, maxy%)
  8207.    subroutine fg_save (integer*2 minx, integer*2 maxx, integer*2 miny,
  8208.    integer*2 maxy)
  8209.    procedure fg_save (minx, maxx, miny, maxy : integer);
  8210.  
  8211. Description
  8212.  
  8213.    The fg_save routine copies a rectangular region from the active video page
  8214.    to the same position on the hidden video page.  In text modes, the region
  8215.    is defined in character space; in graphics modes, it is defined in screen
  8216.    space.
  8217.  
  8218. Parameters
  8219.  
  8220.    minx is the x coordinate of the region's left edge.  In graphics modes, its
  8221.    value is reduced to a byte boundary if necessary.
  8222.  
  8223.    maxx is the x coordinate of the region's right edge.  It must be greater
  8224.    than or equal to the value of minx.  In graphics modes, its value is
  8225.    extended to a byte boundary if necessary.
  8226.  
  8227.    miny is the y coordinate of the region's top edge.
  8228.  
  8229.    maxy is the y coordinate of the region's bottom edge.  It must be greater
  8230.    than or equal to the value of miny.
  8231.  
  8232. Return value
  8233.  
  8234.    none
  8235.  
  8236. Restrictions
  8237.  
  8238.    none
  8239.  
  8240. See also
  8241.  
  8242.    fg_restore, fg_restorew, fg_savew, fg_sethpage, fg_transfer
  8243.  
  8244. Examples
  8245.  
  8246.    9-23, 9-24
  8247.  
  8248.  
  8249.  
  8250.  
  8251.  
  8252.  
  8253.  
  8254.  
  8255.  
  8256.  
  8257.  
  8258.  
  8259.                                      134
  8260. fg_savew
  8261.  
  8262. Prototype
  8263.  
  8264.    void fg_savew (double xmin, double xmax, double ymin, double ymax);
  8265.    sub FGsavew (xmin#, xmax#, ymin#, ymax#)
  8266.    subroutine fg_savew (real*8 xmin, real*8 xmax, real*8 ymin, real*8 ymax)
  8267.    procedure fg_savew (xmin, xmax, ymin, ymax : real);
  8268.  
  8269. Description
  8270.  
  8271.    The fg_savew routine copies a rectangular region, defined in world space,
  8272.    from the active video page to the same position on the hidden video page.
  8273.  
  8274. Parameters
  8275.  
  8276.    xmin is the world space x coordinate of the region's left edge.  In
  8277.    graphics modes, its value is reduced to a byte boundary if necessary.
  8278.  
  8279.    xmax is the world space x coordinate of the region's right edge.  It must
  8280.    be greater than or equal to the value of xmin.  In graphics modes, its
  8281.    value is extended to a byte boundary if necessary.
  8282.  
  8283.    ymin is the world space y coordinate of the region's bottom edge.
  8284.  
  8285.    ymax is the world space y coordinate of the region's top edge.  It must be
  8286.    greater than or equal to the value of ymin.
  8287.  
  8288. Return value
  8289.  
  8290.    none
  8291.  
  8292. Restrictions
  8293.  
  8294.    This routine is not available in Fastgraph/Light.
  8295.  
  8296. See also
  8297.  
  8298.    fg_restore, fg_restorew, fg_save, fg_sethpage, fg_transfer
  8299.  
  8300.  
  8301.  
  8302.  
  8303.  
  8304.  
  8305.  
  8306.  
  8307.  
  8308.  
  8309.  
  8310.  
  8311.  
  8312.  
  8313.  
  8314.  
  8315.  
  8316.  
  8317.  
  8318.                                      135
  8319. fg_scrlock
  8320.  
  8321. Prototype
  8322.  
  8323.    int fg_scrlock (void);
  8324.    function FGscrlock% ()
  8325.    integer*2 function fg_scrlock ()
  8326.    function fg_scrlock : integer;
  8327.  
  8328. Description
  8329.  
  8330.    The fg_scrlock routine determines the state of the ScrollLock key.
  8331.  
  8332. Parameters
  8333.  
  8334.    none
  8335.  
  8336. Return value
  8337.  
  8338.    If the return value is 0, it means the ScrollLock key is off.  If it is 1,
  8339.    it means the ScrollLock key is on.
  8340.  
  8341. Restrictions
  8342.  
  8343.    Not all PC keyboards have a ScrollLock key.  For such systems, fg_scrlock
  8344.    will return a value of zero.
  8345.  
  8346. See also
  8347.  
  8348.    fg_capslock, fg_numlock, fg_setcaps, fg_setnum
  8349.  
  8350. Examples
  8351.  
  8352.    12-3
  8353.  
  8354.  
  8355.  
  8356.  
  8357.  
  8358.  
  8359.  
  8360.  
  8361.  
  8362.  
  8363.  
  8364.  
  8365.  
  8366.  
  8367.  
  8368.  
  8369.  
  8370.  
  8371.  
  8372.  
  8373.  
  8374.  
  8375.  
  8376.  
  8377.                                      136
  8378. fg_scroll
  8379.  
  8380. Prototype
  8381.  
  8382.    void fg_scroll (int minx, int maxx, int miny, int maxy, int jump, int
  8383.    type);
  8384.    sub FGscroll (minx%, maxx%, miny%, maxy%, jump%, type%)
  8385.    subroutine fg_scroll (integer*2 minx, integer*2 maxx, integer*2 miny,
  8386.    integer*2 maxy,
  8387.      integer*2 jump, integer*2 type)
  8388.    procedure fg_scroll (minx, maxx, miny, maxy, jump, type : integer);
  8389.  
  8390. Description
  8391.  
  8392.    The fg_scroll routine vertically scrolls a region of the active video page.
  8393.    The scrolling may be done either up or down, using either an end-off or
  8394.    circular method.  In text modes, the region is defined in character space;
  8395.    in graphics modes, it is defined in screen space.
  8396.  
  8397. Parameters
  8398.  
  8399.    minx is the x coordinate of the scrolling region's left edge.  In graphics
  8400.    modes, its value is reduced to a byte boundary if necessary.
  8401.  
  8402.    maxx is the x coordinate of the scrolling region's right edge.  It must be
  8403.    greater than or equal to the value of minx.  In graphics modes, its value
  8404.    is extended to a byte boundary if necessary.
  8405.  
  8406.    miny is the y coordinate of the scrolling region's top edge.
  8407.  
  8408.    maxy is the y coordinate of the scrolling region's bottom edge.  It must be
  8409.    greater than or equal to the value of miny.
  8410.  
  8411.    jump is the number of pixels to jump between each scrolling iteration.  If
  8412.    jump is negative, the region will scroll toward the top of the screen.  If
  8413.    jump is positive, the region will scroll toward the bottom of the screen.
  8414.  
  8415.    type specifies the type of scroll.  If type is zero, rows that scroll off
  8416.    one edge appear at the opposite edge, thus producing a circular scrolling
  8417.    effect.  If type is any other value, rows that scroll off one edge will be
  8418.    replaced at the opposite edge by lines of the current color.
  8419.  
  8420. Return value
  8421.  
  8422.    none
  8423.  
  8424. Restrictions
  8425.  
  8426.    Circular scrolling uses part of the hidden page (as defined in the most
  8427.    recent call to fg_sethpage) as a temporary workspace.
  8428.  
  8429. See also
  8430.  
  8431.    fg_setcolor, fg_sethpage
  8432.  
  8433.  
  8434.  
  8435.  
  8436.                                      137
  8437. fg_scroll (continued)
  8438.  
  8439. Examples
  8440.  
  8441.    11-3, 11-4, 11-5
  8442.  
  8443.  
  8444.  
  8445.  
  8446.  
  8447.  
  8448.  
  8449.  
  8450.  
  8451.  
  8452.  
  8453.  
  8454.  
  8455.  
  8456.  
  8457.  
  8458.  
  8459.  
  8460.  
  8461.  
  8462.  
  8463.  
  8464.  
  8465.  
  8466.  
  8467.  
  8468.  
  8469.  
  8470.  
  8471.  
  8472.  
  8473.  
  8474.  
  8475.  
  8476.  
  8477.  
  8478.  
  8479.  
  8480.  
  8481.  
  8482.  
  8483.  
  8484.  
  8485.  
  8486.  
  8487.  
  8488.  
  8489.  
  8490.  
  8491.  
  8492.  
  8493.  
  8494.  
  8495.                                      138
  8496. fg_setangle
  8497.  
  8498. Prototype
  8499.  
  8500.    void fg_setangle (double angle);
  8501.    sub FGsetangle (angle#)
  8502.    subroutine fg_setangle (real*8 angle)
  8503.    procedure fg_setangle (angle : real);
  8504.  
  8505. Description
  8506.  
  8507.    The fg_setangle routine defines the angle or orientation at which software
  8508.    characters are displayed.  If a program draws software characters before
  8509.    calling fg_setangle, Fastgraph will use its default angle of zero degrees
  8510.    (that is, horizontal).
  8511.  
  8512. Parameters
  8513.  
  8514.    angle is the angle of rotation, expressed in degrees and measured
  8515.    counterclockwise from the positive x axis.
  8516.  
  8517. Return value
  8518.  
  8519.    none
  8520.  
  8521. Restrictions
  8522.  
  8523.    This routine is not available in Fastgraph/Light.  Before using this
  8524.    routine, you must use the fg_initw and fg_setworld routines to establish a
  8525.    world space coordinate system.
  8526.  
  8527. See also
  8528.  
  8529.    fg_initw, fg_setratio, fg_setsize, fg_setsizew, fg_setworld, fg_swchar,
  8530.    fg_swlength, fg_swtext
  8531.  
  8532. Examples
  8533.  
  8534.    7-10
  8535.  
  8536.  
  8537.  
  8538.  
  8539.  
  8540.  
  8541.  
  8542.  
  8543.  
  8544.  
  8545.  
  8546.  
  8547.  
  8548.  
  8549.  
  8550.  
  8551.  
  8552.  
  8553.  
  8554.                                      139
  8555. fg_setattr
  8556.  
  8557. Prototype
  8558.  
  8559.    void fg_setattr (int foreground, int background, int blink);
  8560.    sub FGsetattr (foreground%, background%, blink%)
  8561.    subroutine fg_setattr (integer*2 foreground, integer*2 background,
  8562.    integer*2 blink)
  8563.    procedure fg_setattr (foreground, background, blink : integer);
  8564.  
  8565. Description
  8566.  
  8567.    The fg_setattr routine establishes the current text attribute in text video
  8568.    modes.
  8569.  
  8570. Parameters
  8571.  
  8572.    foreground is attribute's foreground component, between 0 and 15.
  8573.  
  8574.    background is the attribute's background component, between 0 and 7.
  8575.  
  8576.    blink is the attribute's blink component, between 0 and 1.
  8577.  
  8578. Return value
  8579.  
  8580.    none
  8581.  
  8582. Restrictions
  8583.  
  8584.    This routine has no effect in graphics video modes.
  8585.  
  8586. See also
  8587.  
  8588.    fg_setcolor
  8589.  
  8590. Examples
  8591.  
  8592.    7-1, 7-2, 7-3, 7-4, 8-1, 8-3, 8-5, 8-7, 9-21, 9-23, 9-25, 11-4, 12-8
  8593.  
  8594.  
  8595.  
  8596.  
  8597.  
  8598.  
  8599.  
  8600.  
  8601.  
  8602.  
  8603.  
  8604.  
  8605.  
  8606.  
  8607.  
  8608.  
  8609.  
  8610.  
  8611.  
  8612.  
  8613.                                      140
  8614. fg_setcaps
  8615.  
  8616. Prototype
  8617.  
  8618.    void fg_setcaps (int state);
  8619.    sub FGsetcaps (state%)
  8620.    subroutine fg_setcaps (integer*2 state)
  8621.    procedure fg_setcaps (state : integer);
  8622.  
  8623. Description
  8624.  
  8625.    The fg_setcaps routine controls the state of the CapsLock key.
  8626.  
  8627. Parameters
  8628.  
  8629.    state defines the CapsLock key state.  If state is 0, the CapsLock key is
  8630.    turned off.  If it is 1, the CapsLock key is turned on.
  8631.  
  8632. Return value
  8633.  
  8634.    none
  8635.  
  8636. Restrictions
  8637.  
  8638.    On most keyboards, changing the CapsLock key state will also change the
  8639.    keyboard state light to reflect the new key state.  However, some older
  8640.    keyboards, especially when used on PC, PC/XT, or Tandy 1000 systems, do not
  8641.    update the state light.  This makes the state light inconsistent with the
  8642.    true key state.
  8643.  
  8644. See also
  8645.  
  8646.    fg_capslock, fg_numlock, fg_scrlock, fg_setnum
  8647.  
  8648. Examples
  8649.  
  8650.    12-4
  8651.  
  8652.  
  8653.  
  8654.  
  8655.  
  8656.  
  8657.  
  8658.  
  8659.  
  8660.  
  8661.  
  8662.  
  8663.  
  8664.  
  8665.  
  8666.  
  8667.  
  8668.  
  8669.  
  8670.  
  8671.  
  8672.                                      141
  8673. fg_setclip
  8674.  
  8675. Prototype
  8676.  
  8677.    void fg_setclip (int minx, int maxx, int miny, int maxy);
  8678.    sub FGsetclip (minx%, maxx%, miny%, maxy%)
  8679.    subroutine fg_setclip (integer*2 minx, integer*2 maxx, integer*2 miny,
  8680.    integer*2 maxy)
  8681.    procedure fg_setclip (minx, maxx, miny, maxy : integer);
  8682.  
  8683. Description
  8684.  
  8685.    The fg_setclip routine defines the clipping region in screen space.  The
  8686.    clipping region is a rectangular area outside of which graphics are
  8687.    suppressed.
  8688.  
  8689. Parameters
  8690.  
  8691.    minx is the screen space x coordinate of the clipping region's left edge.
  8692.  
  8693.    maxx is the screen space x coordinate of the clipping region's right edge.
  8694.    It must be greater than or equal to the value of minx.
  8695.  
  8696.    miny is the screen space y coordinate of the clipping region's top edge.
  8697.  
  8698.    maxy is the screen space y coordinate of the clipping region's bottom edge.
  8699.    It must be greater than or equal to the value of miny.
  8700.  
  8701. Return value
  8702.  
  8703.    none
  8704.  
  8705. Restrictions
  8706.  
  8707.    This routine has no effect in text video modes.
  8708.  
  8709. See also
  8710.  
  8711.    fg_setclipw
  8712.  
  8713. Examples
  8714.  
  8715.    6-5, 9-8, 9-9, 9-16, 10-4
  8716.  
  8717.  
  8718.  
  8719.  
  8720.  
  8721.  
  8722.  
  8723.  
  8724.  
  8725.  
  8726.  
  8727.  
  8728.  
  8729.  
  8730.  
  8731.                                      142
  8732. fg_setclipw
  8733.  
  8734. Prototype
  8735.  
  8736.    void fg_setclipw (double xmin, double xmax, double ymin, double ymax);
  8737.    sub FGsetclipw (xmin#, xmax#, ymin#, ymax#)
  8738.    subroutine fg_setclipw (real*8 xmin, real*8 xmax, real*8 ymin, real*8 ymax)
  8739.    procedure fg_setclipw (xmin, xmax, ymin, ymax : real);
  8740.  
  8741. Description
  8742.  
  8743.    The fg_setclipw routine defines the clipping region in world space.  The
  8744.    clipping region is a rectangular area outside of which graphics are
  8745.    suppressed.
  8746.  
  8747. Parameters
  8748.  
  8749.    xmin is the world space x coordinate of the clipping region's left edge.
  8750.  
  8751.    xmax is the world space x coordinate of the clipping region's right edge.
  8752.    It must be greater than or equal to the value of xmin.
  8753.  
  8754.    ymin is the world space y coordinate of the clipping region's bottom edge.
  8755.  
  8756.    ymax is the world space y coordinate of the clipping region's top edge.  It
  8757.    must be greater than or equal to the value of ymin.
  8758.  
  8759. Return value
  8760.  
  8761.    none
  8762.  
  8763. Restrictions
  8764.  
  8765.    This routine is not available in Fastgraph/Light and has no effect in text
  8766.    video modes.
  8767.  
  8768. See also
  8769.  
  8770.    fg_setclip
  8771.  
  8772.  
  8773.  
  8774.  
  8775.  
  8776.  
  8777.  
  8778.  
  8779.  
  8780.  
  8781.  
  8782.  
  8783.  
  8784.  
  8785.  
  8786.  
  8787.  
  8788.  
  8789.  
  8790.                                      143
  8791. fg_setcolor
  8792.  
  8793. Prototype
  8794.  
  8795.    void fg_setcolor (int color);
  8796.    sub FGsetcolor (color%)
  8797.    subroutine fg_setcolor (integer*2 color)
  8798.    procedure fg_setcolor (color : integer);
  8799.  
  8800. Description
  8801.  
  8802.    The fg_setcolor routine establishes the current color index (which may be a
  8803.    virtual color index) in graphics modes.  In text modes, fg_setcolor
  8804.    provides an alternate method of defining the current text attribute.
  8805.  
  8806. Parameters
  8807.  
  8808.    color defines the current color index (in graphics modes) or text attribute
  8809.    (in text modes).  Its value must be between 0 and 255.
  8810.  
  8811. Return value
  8812.  
  8813.    none
  8814.  
  8815. Restrictions
  8816.  
  8817.    none
  8818.  
  8819. See also
  8820.  
  8821.    fg_defcolor, fg_getcolor, fg_palette
  8822.  
  8823. Examples
  8824.  
  8825.    3-1 to 3-9
  8826.  
  8827.  
  8828.  
  8829.  
  8830.  
  8831.  
  8832.  
  8833.  
  8834.  
  8835.  
  8836.  
  8837.  
  8838.  
  8839.  
  8840.  
  8841.  
  8842.  
  8843.  
  8844.  
  8845.  
  8846.  
  8847.  
  8848.  
  8849.                                      144
  8850. fg_setdacs
  8851.  
  8852. Prototype
  8853.  
  8854.    void fg_setdacs (int start, int count, char *values);
  8855.    sub FGsetdacs (start%, count%, values$)
  8856.    subroutine fg_setdacs (integer*2 start, integer*2 count, integer*1 values)
  8857.    procedure fg_setdacs (start, count : integer; var values : shortint);
  8858.  
  8859. Description
  8860.  
  8861.    The fg_setdacs routine defines the values of a block of contiguous video
  8862.    DAC registers by specifying their red, green, and blue color components.
  8863.    Defining many DAC registers with fg_setdacs is considerably faster than
  8864.    doing so individually with fg_setrgb.
  8865.  
  8866. Parameters
  8867.  
  8868.    start is the starting video DAC register number, between 0 and 255.
  8869.  
  8870.    count is the number of contiguous DAC registers to define, between 1 and
  8871.    256.  If the sum of start and count exceeds 255, the register numbers wrap
  8872.    around and resume with register number 0.
  8873.  
  8874.    values is the array containing the color components.  The first three bytes
  8875.    of this array must contain the red, green, and blue components for DAC
  8876.    register start, the next three bytes contain the components for register
  8877.    start+1, and so forth.  The size of the values array must be at least
  8878.    3*count bytes.
  8879.  
  8880. Return value
  8881.  
  8882.    none
  8883.  
  8884. Restrictions
  8885.  
  8886.    This routine has no effect in text video modes, or in any graphics video
  8887.    mode numbered 16 or below (because these video modes do not use DAC
  8888.    registers).
  8889.  
  8890. See also
  8891.  
  8892.    fg_getdacs, fg_getrgb, fg_setrgb
  8893.  
  8894. Examples
  8895.  
  8896.    5-12
  8897.  
  8898.  
  8899.  
  8900.  
  8901.  
  8902.  
  8903.  
  8904.  
  8905.  
  8906.  
  8907.  
  8908.                                      145
  8909. fg_setfunc
  8910.  
  8911. Prototype
  8912.  
  8913.    void fg_setfunc (int mode);
  8914.    sub FGsetfunc (mode%)
  8915.    subroutine fg_setfunc (integer*2 mode)
  8916.    procedure fg_setfunc (mode : integer);
  8917.  
  8918. Description
  8919.  
  8920.    The fg_setfunc routine specifies the logical operation applied when video
  8921.    memory changes in the native EGA and VGA graphics modes.  Replacement mode
  8922.    is selected after you use the fg_setmode routine to establish a video mode.
  8923.  
  8924. Parameters
  8925.  
  8926.    mode defines the logical operation, as shown below.
  8927.  
  8928.                           value of  logical
  8929.                             mode    operation
  8930.  
  8931.                               0     replacement
  8932.                               1     and
  8933.                               2     or
  8934.                               3     exclusive or
  8935.  
  8936. Return value
  8937.  
  8938.    none
  8939.  
  8940. Restrictions
  8941.  
  8942.    This routine only functions in the native EGA and VGA graphics video modes
  8943.    (modes 13 through 18).
  8944.  
  8945. Examples
  8946.  
  8947.    10-3, 15-2
  8948.  
  8949.  
  8950.  
  8951.  
  8952.  
  8953.  
  8954.  
  8955.  
  8956.  
  8957.  
  8958.  
  8959.  
  8960.  
  8961.  
  8962.  
  8963.  
  8964.  
  8965.  
  8966.  
  8967.                                      146
  8968. fg_sethpage
  8969.  
  8970. Prototype
  8971.  
  8972.    void fg_sethpage (int page_number);
  8973.    sub FGsethpage (page_number%)
  8974.    subroutine fg_sethpage (integer*2 page_number)
  8975.    procedure fg_sethpage (page_number : integer);
  8976.  
  8977. Description
  8978.  
  8979.    The fg_sethpage routine establishes the hidden video page.  It may be a
  8980.    physical or virtual video page.  The fg_setmode routine designates video
  8981.    page 0 as the hidden page.
  8982.  
  8983. Parameters
  8984.  
  8985.    page_number is the hidden video page number, between 0 and 63.
  8986.  
  8987. Return value
  8988.  
  8989.    none
  8990.  
  8991. Restrictions
  8992.  
  8993.    This routine has no effect if page_number references a physical video page
  8994.    that does not exist, or a virtual video page that has not been created.
  8995.  
  8996. See also
  8997.  
  8998.    fg_gethpage, fg_setpage, fg_setvpage
  8999.  
  9000. Examples
  9001.  
  9002.    9-23, 9-24, 11-2, 11-5
  9003.  
  9004.  
  9005.  
  9006.  
  9007.  
  9008.  
  9009.  
  9010.  
  9011.  
  9012.  
  9013.  
  9014.  
  9015.  
  9016.  
  9017.  
  9018.  
  9019.  
  9020.  
  9021.  
  9022.  
  9023.  
  9024.  
  9025.  
  9026.                                      147
  9027. fg_setlines
  9028.  
  9029. Prototype
  9030.  
  9031.    void fg_setlines (int lines);
  9032.    sub FGsetlines (lines%)
  9033.    subroutine fg_setlines (integer*2 lines)
  9034.    procedure fg_setlines (lines : integer);
  9035.  
  9036. Description
  9037.  
  9038.    The fg_setlines routine extends an 80-column text mode to 25, 43, or 50
  9039.    lines per screen.  The fg_setmode routine sets the number of lines to 25
  9040.    when establishing an 80-column text mode.
  9041.  
  9042. Parameters
  9043.  
  9044.    lines is the number of text rows per screen.  On EGA systems, the value of
  9045.    lines must be 25 or 43.  On MCGA systems, it must be 25 or 50.  On VGA
  9046.    systems, it must be 25, 43, or 50.  Any other value is ignored.  Before
  9047.    calling fg_setlines, you should call fg_testmode with pages=0 to see if the
  9048.    user's system supports the number of rows needed.
  9049.  
  9050. Return value
  9051.  
  9052.    none
  9053.  
  9054. Restrictions
  9055.  
  9056.    This routine is only meaningful when running in 80-column text modes on
  9057.    EGA, VGA, or MCGA systems (in other cases it does nothing).
  9058.  
  9059.    When you call fg_setlines, the visual page must be page 0.
  9060.  
  9061.    Calling fg_setlines makes the text cursor visible.
  9062.  
  9063.    If you have initialized the mouse (with fg_mouseini), joysticks (with
  9064.    fg_initjoy), expanded memory (with fg_initems), or extended memory (with
  9065.    fg_initxms), you should call re-initialize these resources after calling
  9066.    fg_setlines.
  9067.  
  9068. See also
  9069.  
  9070.    fg_getlines, fg_testmode
  9071.  
  9072. Examples
  9073.  
  9074.    3-5
  9075.  
  9076.  
  9077.  
  9078.  
  9079.  
  9080.  
  9081.  
  9082.  
  9083.  
  9084.  
  9085.                                      148
  9086. fg_setmode
  9087.  
  9088. Prototype
  9089.  
  9090.    void fg_setmode (int mode_number);
  9091.    sub FGsetmode (mode_number%)
  9092.    subroutine fg_setmode (integer*2 mode_number)
  9093.    procedure fg_setmode (mode_number : integer);
  9094.  
  9095. Description
  9096.  
  9097.    The fg_setmode routine establishes a video mode and initializes Fastgraph's
  9098.    internal parameters for that video mode.  It must be called before any
  9099.    Fastgraph routine that performs video output.  A program can call
  9100.    fg_setmode as many times as needed to switch between different video modes.
  9101.  
  9102. Parameters
  9103.  
  9104.    mode_number is the video mode number, between 0 and 23.  The following
  9105.    table lists Fastgraph's supported video modes.
  9106.  
  9107.      Mode                      No. of    Supported         Supported
  9108.     Number  Type    Resolution Colors    Adapters          Displays
  9109.  
  9110.        0    Text    40 x 25    16/8      CGA,EGA,VGA,MCGA  RGB,ECD,VGA
  9111.        1    Text    40 x 25    16/8      CGA,EGA,VGA,MCGA  RGB,ECD,VGA
  9112.        2    Text    80 x 25    16/8      CGA,EGA,VGA,MCGA  RGB,ECD,VGA
  9113.        3    Text    80 x 25    16/8      CGA,EGA,VGA,MCGA  RGB,ECD,VGA
  9114.        4  Graphics  320 x 200  4         CGA,EGA,VGA,MCGA  RGB,ECD,VGA
  9115.        5  Graphics  320 x 200  4         CGA,EGA,VGA,MCGA  RGB,ECD,VGA
  9116.        6  Graphics  640 x 200  2/16      CGA,EGA,VGA,MCGA  RGB,ECD,VGA
  9117.        7    Text    80 x 25    b/w       MDA,HGC,EGA,VGA   Mono,ECD,VGA
  9118.        9  Graphics  320 x 200  16        Tandy 1000,PCjr   RGB
  9119.       11  Graphics  720 x 348  b/w       HGC               Monochrome
  9120.       12  Graphics  320 x 200  b/w       HGC               Monochrome
  9121.       13  Graphics  320 x 200  16        EGA,VGA           RGB,ECD,VGA
  9122.       14  Graphics  640 x 200  16        EGA,VGA           RGB,ECD,VGA
  9123.       15  Graphics  640 x 350  b/w       EGA,VGA           Mono,VGA
  9124.       16  Graphics  640 x 350  16/64     EGA,VGA           ECD,VGA
  9125.       17  Graphics  640 x 480  2/256K    VGA,MCGA          VGA
  9126.       18  Graphics  640 x 480  16/256K   VGA               VGA
  9127.       19  Graphics  320 x 200  256/256K  VGA,MCGA          VGA
  9128.       20  Graphics  320 x 200  256/256K  VGA               VGA
  9129.       21  Graphics  320 x 400  256/256K  VGA               VGA
  9130.       22  Graphics  320 x 240  256/256K  VGA               VGA
  9131.       23  Graphics  320 x 480  256/256K  VGA               VGA
  9132.  
  9133.    For more information about each video mode, including their required
  9134.    display adapters (graphics cards) and monitors, please refer to the
  9135.    Fastgraph User's Guide.
  9136.  
  9137.    The value of the mode_number parameter also can be -1, which tells
  9138.    Fastgraph to use the current video mode.  This feature is often useful in
  9139.    programs that use only text video modes, programs executed from another
  9140.    program, or terminate and stay resident (TSR) programs.
  9141.  
  9142.  
  9143.  
  9144.                                      149
  9145. fg_setmode (continued)
  9146.  
  9147. Return value
  9148.  
  9149.    none
  9150.  
  9151. Restrictions
  9152.  
  9153.    The fg_setmode routine does not check if the specified video mode is
  9154.    available on the user's system.  If necessary, you should first use the
  9155.    fg_testmode routine to do this.
  9156.  
  9157. See also
  9158.  
  9159.    fg_automode, fg_bestmode, fg_testmode
  9160.  
  9161. Examples
  9162.  
  9163.    3-1
  9164.  
  9165.  
  9166.  
  9167.  
  9168.  
  9169.  
  9170.  
  9171.  
  9172.  
  9173.  
  9174.  
  9175.  
  9176.  
  9177.  
  9178.  
  9179.  
  9180.  
  9181.  
  9182.  
  9183.  
  9184.  
  9185.  
  9186.  
  9187.  
  9188.  
  9189.  
  9190.  
  9191.  
  9192.  
  9193.  
  9194.  
  9195.  
  9196.  
  9197.  
  9198.  
  9199.  
  9200.  
  9201.  
  9202.  
  9203.                                      150
  9204. fg_setnum
  9205.  
  9206. Prototype
  9207.  
  9208.    void fg_setnum (int state);
  9209.    sub FGsetnum (state%)
  9210.    subroutine fg_setnum (integer*2 state)
  9211.    procedure fg_setnum (state : integer);
  9212.  
  9213. Description
  9214.  
  9215.    The fg_setnum routine controls the state of the NumLock key.
  9216.  
  9217. Parameters
  9218.  
  9219.    state defines the NumLock key state.  If state is 0, the NumLock key is
  9220.    turned off.  If it is 1, the NumLock key is turned on.
  9221.  
  9222. Return value
  9223.  
  9224.    none
  9225.  
  9226. Restrictions
  9227.  
  9228.    On most keyboards, changing the NumLock key state will also change the
  9229.    keyboard state light to reflect the new key state.  However, some older
  9230.    keyboards, especially when used on PC, PC/XT, or Tandy 1000 systems, do not
  9231.    update the state light.  This makes the state light inconsistent with the
  9232.    true key state.
  9233.  
  9234. See also
  9235.  
  9236.    fg_capslock, fg_numlock, fg_scrlock, fg_setcaps
  9237.  
  9238. Examples
  9239.  
  9240.    12-4
  9241.  
  9242.  
  9243.  
  9244.  
  9245.  
  9246.  
  9247.  
  9248.  
  9249.  
  9250.  
  9251.  
  9252.  
  9253.  
  9254.  
  9255.  
  9256.  
  9257.  
  9258.  
  9259.  
  9260.  
  9261.  
  9262.                                      151
  9263. fg_setpage
  9264.  
  9265. Prototype
  9266.  
  9267.    void fg_setpage (int page_number);
  9268.    sub FGsetpage (page_number%)
  9269.    subroutine fg_setpage (integer*2 page_number)
  9270.    procedure fg_setpage (page_number : integer);
  9271.  
  9272. Description
  9273.  
  9274.    The fg_setpage routine establishes the active video page.  It may be a
  9275.    physical or virtual video page.  The fg_setmode routine designates video
  9276.    page 0 as the active page.
  9277.  
  9278. Parameters
  9279.  
  9280.    page_number is the active video page number, between 0 and 63.
  9281.  
  9282. Return value
  9283.  
  9284.    none
  9285.  
  9286. Restrictions
  9287.  
  9288.    This routine has no effect if page_number references a physical video page
  9289.    that does not exist, or a virtual video page that has not been created.
  9290.  
  9291. See also
  9292.  
  9293.    fg_getpage, fg_sethpage, fg_setvpage
  9294.  
  9295. Examples
  9296.  
  9297.    8-1 to 8-8, 10-4, 10-5, 11-2
  9298.  
  9299.  
  9300.  
  9301.  
  9302.  
  9303.  
  9304.  
  9305.  
  9306.  
  9307.  
  9308.  
  9309.  
  9310.  
  9311.  
  9312.  
  9313.  
  9314.  
  9315.  
  9316.  
  9317.  
  9318.  
  9319.  
  9320.  
  9321.                                      152
  9322. fg_setratio
  9323.  
  9324. Prototype
  9325.  
  9326.    void fg_setratio (double ratio);
  9327.    sub FGsetratio (ratio#)
  9328.    subroutine fg_setratio (real*8 ratio)
  9329.    procedure fg_setratio (ratio : real);
  9330.  
  9331. Description
  9332.  
  9333.    The fg_setratio routine defines the aspect ratio for software characters.
  9334.    The aspect ratio is the ratio of character width to character height.  If a
  9335.    program draws software characters before calling fg_setratio, Fastgraph
  9336.    will use its default aspect ratio of 1.
  9337.  
  9338. Parameters
  9339.  
  9340.    ratio is the aspect ratio.  It must be greater than zero.
  9341.  
  9342. Return value
  9343.  
  9344.    none
  9345.  
  9346. Restrictions
  9347.  
  9348.    This routine is not available in Fastgraph/Light.  Before using this
  9349.    routine, you must use the fg_initw and fg_setworld routines to establish a
  9350.    world space coordinate system.
  9351.  
  9352. See also
  9353.  
  9354.    fg_initw, fg_setangle, fg_setsize, fg_setsizew, fg_setworld, fg_swchar,
  9355.    fg_swlength, fg_swtext
  9356.  
  9357. Examples
  9358.  
  9359.    7-9
  9360.  
  9361.  
  9362.  
  9363.  
  9364.  
  9365.  
  9366.  
  9367.  
  9368.  
  9369.  
  9370.  
  9371.  
  9372.  
  9373.  
  9374.  
  9375.  
  9376.  
  9377.  
  9378.  
  9379.  
  9380.                                      153
  9381. fg_setrgb
  9382.  
  9383. Prototype
  9384.  
  9385.    void fg_setrgb (int number, int red, int green, int blue);
  9386.    sub FGsetrgb (number%, red%, green%, blue%)
  9387.    subroutine fg_setrgb (integer*2 number, integer*2 red, integer*2 green,
  9388.    integer*2 blue)
  9389.    procedure fg_setrgb (number, red, green, blue : integer);
  9390.  
  9391. Description
  9392.  
  9393.    The fg_setrgb defines the value of a palette register (in Tandy/PCjr and
  9394.    EGA graphics modes) or video DAC register (in VGA and MCGA graphics modes)
  9395.    by specifying its red, green, and blue color components.
  9396.  
  9397. Parameters
  9398.  
  9399.    number is the palette or video DAC register number.  If it references a
  9400.    palette register, it must be between 0 and 15 (0 and 1 in mode 17).  If it
  9401.    references a video DAC register, it must be between 0 and 255.  The value
  9402.    of number may be negative to specify an intense color for that palette
  9403.    register in Tandy/PCjr and 200-line EGA graphics modes.
  9404.  
  9405.    red, green, and blue respectively specify the red, green, and blue
  9406.    components of the specified palette or video DAC register.  These values
  9407.    must be 0 or 1 for Tandy/PCjr and 200-line EGA graphics modes, between 0
  9408.    and 3 for 350-line EGA modes, and between 0 and 63 for VGA and MCGA modes.
  9409.  
  9410. Return value
  9411.  
  9412.    none
  9413.  
  9414. Restrictions
  9415.  
  9416.    This routine has no effect in text video modes, CGA graphics modes, or
  9417.    Hercules graphics modes.
  9418.  
  9419. See also
  9420.  
  9421.    fg_getrgb, fg_palette, fg_setcolor, fg_setdacs
  9422.  
  9423. Examples
  9424.  
  9425.    5-9, 5-11, 5-13, 5-16, 9-14
  9426.  
  9427.  
  9428.  
  9429.  
  9430.  
  9431.  
  9432.  
  9433.  
  9434.  
  9435.  
  9436.  
  9437.  
  9438.  
  9439.                                      154
  9440. fg_setsize
  9441.  
  9442. Prototype
  9443.  
  9444.    void fg_setsize (int isize);
  9445.    sub FGsetsize (isize%)
  9446.    subroutine fg_setsize (integer*2 isize)
  9447.    procedure fg_setsize (isize : integer);
  9448.  
  9449. Description
  9450.  
  9451.    The fg_setsize routine defines the height of software characters in screen
  9452.    space units.  If neither fg_setsize nor fg_setsizew is called, Fastgraph
  9453.    will use its default character height of one world space unit.
  9454.  
  9455. Parameters
  9456.  
  9457.    isize is the character height in screen space units.
  9458.  
  9459. Return value
  9460.  
  9461.    none
  9462.  
  9463. Restrictions
  9464.  
  9465.    This routine is not available in Fastgraph/Light.  Before using this
  9466.    routine, you must use the fg_initw and fg_setworld routines to establish a
  9467.    world space coordinate system.
  9468.  
  9469. See also
  9470.  
  9471.    fg_initw, fg_setangle, fg_setratio, fg_setsizew, fg_setworld, fg_swchar,
  9472.    fg_swlength, fg_swtext
  9473.  
  9474.  
  9475.  
  9476.  
  9477.  
  9478.  
  9479.  
  9480.  
  9481.  
  9482.  
  9483.  
  9484.  
  9485.  
  9486.  
  9487.  
  9488.  
  9489.  
  9490.  
  9491.  
  9492.  
  9493.  
  9494.  
  9495.  
  9496.  
  9497.  
  9498.                                      155
  9499. fg_setsizew
  9500.  
  9501. Prototype
  9502.  
  9503.    void fg_setsizew (double size);
  9504.    sub FGsetsizew (size#)
  9505.    subroutine fg_setsizew (real*8 size)
  9506.    procedure fg_setsizew (size : real);
  9507.  
  9508. Description
  9509.  
  9510.    The fg_setsizew routine defines the height of software characters in world
  9511.    space units.  If neither fg_setsize nor fg_setsizew is called, Fastgraph
  9512.    will use its default character height of one world space unit.
  9513.  
  9514. Parameters
  9515.  
  9516.    size is the character height in world space units.
  9517.  
  9518. Return value
  9519.  
  9520.    none
  9521.  
  9522. Restrictions
  9523.  
  9524.    This routine is not available in Fastgraph/Light.  Before using this
  9525.    routine, you must use the fg_initw and fg_setworld routines to establish a
  9526.    world space coordinate system.
  9527.  
  9528. See also
  9529.  
  9530.    fg_initw, fg_setangle, fg_setratio, fg_setsize, fg_setworld, fg_swchar,
  9531.    fg_swlength, fg_swtext
  9532.  
  9533. Examples
  9534.  
  9535.    7-8, 7-9, 7-10, 7-11
  9536.  
  9537.  
  9538.  
  9539.  
  9540.  
  9541.  
  9542.  
  9543.  
  9544.  
  9545.  
  9546.  
  9547.  
  9548.  
  9549.  
  9550.  
  9551.  
  9552.  
  9553.  
  9554.  
  9555.  
  9556.  
  9557.                                      156
  9558. fg_setvpage
  9559.  
  9560. Prototype
  9561.  
  9562.    void fg_setvpage (int page_number);
  9563.    sub FGsetvpage (page_number%)
  9564.    subroutine fg_setvpage (integer*2 page_number)
  9565.    procedure fg_setvpage (page_number : integer);
  9566.  
  9567. Description
  9568.  
  9569.    The fg_setvpage routine establishes the visual video page.  It may be a
  9570.    physical or virtual video page.  The fg_setmode routine designates video
  9571.    page 0 as the visual page.
  9572.  
  9573. Parameters
  9574.  
  9575.    page_number is the visual video page number, between 0 and 63.
  9576.  
  9577. Return value
  9578.  
  9579.    none
  9580.  
  9581. Restrictions
  9582.  
  9583.    This routine has no effect if page_number references a physical video page
  9584.    that does not exist, or a virtual video page that has not been created.
  9585.  
  9586. See also
  9587.  
  9588.    fg_getpage, fg_sethpage, fg_setpage
  9589.  
  9590. Examples
  9591.  
  9592.    8-1 to 8-7
  9593.  
  9594.  
  9595.  
  9596.  
  9597.  
  9598.  
  9599.  
  9600.  
  9601.  
  9602.  
  9603.  
  9604.  
  9605.  
  9606.  
  9607.  
  9608.  
  9609.  
  9610.  
  9611.  
  9612.  
  9613.  
  9614.  
  9615.  
  9616.                                      157
  9617. fg_setworld
  9618.  
  9619. Prototype
  9620.  
  9621.    void fg_setworld (double xmin, double xmax, double ymin, double ymax);
  9622.    sub FGsetworld (xmin#, xmax#, ymin#, ymax#)
  9623.    subroutine fg_setworld (real*8 xmin, real*8 xmax, real*8 ymin, real*8 ymax)
  9624.    procedure fg_setworld (xmin, xmax, ymin, ymax : real);
  9625.  
  9626. Description
  9627.  
  9628.    The fg_setworld routine defines the world space coordinates that correspond
  9629.    to the physical edges of the screen.
  9630.  
  9631. Parameters
  9632.  
  9633.    xmin is the world space coordinate of the screen's left edge.
  9634.  
  9635.    xmax is the world space coordinate of the screen's right edge.  It must be
  9636.    greater than the value of xmin.
  9637.  
  9638.    ymin is the world space coordinate of the screen's top edge.
  9639.  
  9640.    ymax is the world space coordinate of the screen's bottom edge.  It must be
  9641.    greater than the value of ymin.
  9642.  
  9643. Return value
  9644.  
  9645.    none
  9646.  
  9647. Restrictions
  9648.  
  9649.    This routine is not available in Fastgraph/Light.  Before using this
  9650.    routine, you must call the fg_initw routine to initialize Fastgraph's world
  9651.    space parameters.
  9652.  
  9653. See also
  9654.  
  9655.    fg_getworld, fg_initw
  9656.  
  9657. Examples
  9658.  
  9659.    4-3, 6-4, 6-8, 7-8, 7-9, 7-10, 7-11
  9660.  
  9661.  
  9662.  
  9663.  
  9664.  
  9665.  
  9666.  
  9667.  
  9668.  
  9669.  
  9670.  
  9671.  
  9672.  
  9673.  
  9674.  
  9675.                                      158
  9676. fg_sound
  9677.  
  9678. Prototype
  9679.  
  9680.    void fg_sound (int frequency, int duration);
  9681.    sub FGsound (frequency%, duration%)
  9682.    subroutine fg_sound (integer*2 frequency, integer*2 duration)
  9683.    procedure fg_sound (frequency, duration : integer);
  9684.  
  9685. Description
  9686.  
  9687.    The fg_sound routine produces a tone of a specified frequency and duration
  9688.    using the programmable timer.
  9689.  
  9690. Parameters
  9691.  
  9692.    frequency is tone's frequency in Hertz, between 18 and 32,767.
  9693.  
  9694.    duration is the tone's length in clock ticks (there are approximately 18.2
  9695.    clock ticks per second).  If duration is zero or negative, the tone is said
  9696.    to be continuous and will play until you stop it with the fg_quiet routine.
  9697.  
  9698. Return value
  9699.  
  9700.    none
  9701.  
  9702. Restrictions
  9703.  
  9704.    This routine has no effect if there is asynchronous sound already in
  9705.    progress.
  9706.  
  9707. See also
  9708.  
  9709.    fg_music, fg_quiet, fg_sounds, fg_voice
  9710.  
  9711. Examples
  9712.  
  9713.    13-1
  9714.  
  9715.  
  9716.  
  9717.  
  9718.  
  9719.  
  9720.  
  9721.  
  9722.  
  9723.  
  9724.  
  9725.  
  9726.  
  9727.  
  9728.  
  9729.  
  9730.  
  9731.  
  9732.  
  9733.  
  9734.                                      159
  9735. fg_sounds
  9736.  
  9737. Prototype
  9738.  
  9739.    void fg_sounds (int *sound_array, int ntimes);
  9740.    sub FGsounds (sound_array%(), ntimes%)
  9741.    subroutine fg_sounds (integer*2 sound_array, integer*2 ntimes)
  9742.    procedure fg_sounds (var sound_array : integer; ntimes : integer);
  9743.  
  9744. Description
  9745.  
  9746.    The fg_sounds routine uses the programmable timer to play a series of tones
  9747.    of specified frequencies and durations, concurrent with other activity.  It
  9748.    is the asynchronous version of the fg_sound routine.
  9749.  
  9750. Parameters
  9751.  
  9752.    sound_array is an arbitrary-length array containing a series of
  9753.    (frequency,duration) sound definitions.  The format of this array is:
  9754.  
  9755.  
  9756.                           [0]    frequency of sound 1
  9757.  
  9758.                           [1]    duration  of sound 1
  9759.  
  9760.                           [2]    frequency of sound 2
  9761.  
  9762.                           [3]    duration  of sound 2
  9763.                                            .
  9764.                                            .
  9765.                                            .
  9766.                        [2n-2]    frequency of sound n
  9767.  
  9768.                        [2n-1]    duration  of sound n
  9769.  
  9770.                          [2n]       terminator (0)
  9771.  
  9772.  
  9773.    Each frequency value is measured in Hertz and must be between 18 and
  9774.    32,767.  The durations are measured in clock ticks (there are approximately
  9775.    72.8 clock ticks per second).  A null character (that is, a zero byte)
  9776.    terminates the array.
  9777.  
  9778.    ntimes specifies the number of times to cycle through the sounds defined in
  9779.    sound_array.  If ntimes is negative, the sounds will play repetitively
  9780.    until stopped with the fg_hush or fg_hushnext routine.
  9781.  
  9782. Return value
  9783.  
  9784.    none
  9785.  
  9786.  
  9787.  
  9788.  
  9789.  
  9790.  
  9791.  
  9792.  
  9793.                                      160
  9794. fg_sounds (continued)
  9795.  
  9796. Restrictions
  9797.  
  9798.    This routine has no effect if there is asynchronous sound already in
  9799.    progress.  To expand the range of sound effects, Fastgraph temporarily
  9800.    quadruples the clock tick interrupt rate from 18.2 to 72.8 ticks per second
  9801.    while producing asynchronous sound.  Because many disk controllers rely on
  9802.    the 18.2 tick per second clock rate to synchronize disk accesses, your
  9803.    programs should not perform any disk operations when asynchronous sound is
  9804.    in progress.
  9805.  
  9806. See also
  9807.  
  9808.    fg_hush, fg_hushnext, fg_musicb, fg_playing, fg_sound, fg_voice, fg_voices
  9809.  
  9810. Examples
  9811.  
  9812.    13-4
  9813.  
  9814.  
  9815.  
  9816.  
  9817.  
  9818.  
  9819.  
  9820.  
  9821.  
  9822.  
  9823.  
  9824.  
  9825.  
  9826.  
  9827.  
  9828.  
  9829.  
  9830.  
  9831.  
  9832.  
  9833.  
  9834.  
  9835.  
  9836.  
  9837.  
  9838.  
  9839.  
  9840.  
  9841.  
  9842.  
  9843.  
  9844.  
  9845.  
  9846.  
  9847.  
  9848.  
  9849.  
  9850.  
  9851.  
  9852.                                      161
  9853. fg_stall
  9854.  
  9855. Prototype
  9856.  
  9857.    void fg_stall (int delay);
  9858.    sub FGstall (delay%)
  9859.    subroutine fg_stall (integer*2 delay)
  9860.    procedure fg_stall (delay : integer);
  9861.  
  9862. Description
  9863.  
  9864.    The fg_stall routine delays a program's execution for a given number of
  9865.    processor-specific delay units.  You can use the fg_measure routine to
  9866.    obtain the number of delay units per clock tick for the system being used.
  9867.  
  9868. Parameters
  9869.  
  9870.    delay is the number of delay units to wait.
  9871.  
  9872. Return value
  9873.  
  9874.    none
  9875.  
  9876. Restrictions
  9877.  
  9878.    none
  9879.  
  9880. See also
  9881.  
  9882.    fg_measure, fg_waitfor
  9883.  
  9884. Examples
  9885.  
  9886.    14-3
  9887.  
  9888.  
  9889.  
  9890.  
  9891.  
  9892.  
  9893.  
  9894.  
  9895.  
  9896.  
  9897.  
  9898.  
  9899.  
  9900.  
  9901.  
  9902.  
  9903.  
  9904.  
  9905.  
  9906.  
  9907.  
  9908.  
  9909.  
  9910.  
  9911.                                      162
  9912. fg_suspend
  9913.  
  9914. Prototype
  9915.  
  9916.    void fg_suspend (void);
  9917.    sub FGsuspend ()
  9918.    subroutine fg_suspend ()
  9919.    procedure fg_suspend;
  9920.  
  9921. Description
  9922.  
  9923.    The fg_suspend routine suspends asynchronous music previously started by
  9924.    the fg_musicb routine.  It has no effect if there is no asynchronous music
  9925.    in progress.
  9926.  
  9927. Parameters
  9928.  
  9929.    none
  9930.  
  9931. Return value
  9932.  
  9933.    none
  9934.  
  9935. Restrictions
  9936.  
  9937.    A program must not exit to DOS with music suspended.  You must call fg_hush
  9938.    to cancel the music first.
  9939.  
  9940. See also
  9941.  
  9942.    fg_hush, fg_musicb, fg_resume
  9943.  
  9944. Examples
  9945.  
  9946.    13-8
  9947.  
  9948.  
  9949.  
  9950.  
  9951.  
  9952.  
  9953.  
  9954.  
  9955.  
  9956.  
  9957.  
  9958.  
  9959.  
  9960.  
  9961.  
  9962.  
  9963.  
  9964.  
  9965.  
  9966.  
  9967.  
  9968.  
  9969.  
  9970.                                      163
  9971. fg_swchar
  9972.  
  9973. Prototype
  9974.  
  9975.    void fg_swchar (char *string, int n, int justify);
  9976.    sub FGswchar (string$, n%, justify%)
  9977.    subroutine fg_swchar (character*(*) string, integer*2 n, integer*2 justify)
  9978.    procedure fg_swchar (string : string; n, justify : integer);
  9979.  
  9980. Description
  9981.  
  9982.    The fg_swchar routine displays a string of software characters in the
  9983.    current color index.  The string may be left justified, centered, or right
  9984.    justified relative to the graphics cursor.
  9985. Parameters
  9986.  
  9987.    string is the arbitrary-length sequence of characters to display.  It may
  9988.    contain special operators, as summarized in the following table.
  9989.  
  9990.             operator    meaning
  9991.  
  9992.             \           switch to other font
  9993.             \^          superscript the next character
  9994.             \v          subscript the next character
  9995.             _           begin underlining characters until another
  9996.                         underscore character is encountered
  9997.  
  9998.    n is the number of characters in string, including any special operator
  9999.    characters.
  10000.  
  10001.    justify determines how string is positioned relative to the current
  10002.    position.  If justify is negative, string is left justified; if it is zero,
  10003.    string is centered; if it is positive, string is right justified.
  10004.  
  10005. Return value
  10006.  
  10007.    none
  10008.  
  10009. Restrictions
  10010.  
  10011.    Before using this routine, you must use the fg_initw and fg_setworld
  10012.    routines to establish a world space coordinate system.  This routine is not
  10013.    available in Fastgraph/Light and has no effect in text video modes.
  10014.  
  10015. See also
  10016.  
  10017.    fg_initw, fg_setangle, fg_setratio, fg_setsize, fg_setsizew, fg_setworld,
  10018.    fg_swlength, fg_swtext
  10019.  
  10020. Examples
  10021.  
  10022.    7-8, 7-9
  10023.  
  10024.  
  10025.  
  10026.  
  10027.  
  10028.  
  10029.                                      164
  10030. fg_swlength
  10031.  
  10032. Prototype
  10033.  
  10034.    double fg_swlength (char *string, int n);
  10035.    function FGswlength# (string$, n%)
  10036.    real*8 function fg_swlength (character*(*) string, integer*2 n)
  10037.    function fg_swlength (string : string; n : integer) : real;
  10038.  
  10039. Description
  10040.  
  10041.    The fg_swlength routine computes the length of a string of software
  10042.    characters.
  10043.  
  10044. Parameters
  10045.  
  10046.    string is the arbitrary-length sequence of characters for which to compute
  10047.    the length.  It may contain special operators used by the fg_swchar and
  10048.    fg_swtext routines.
  10049.  
  10050.    n is the number of characters in string, including any special operator
  10051.    characters.
  10052.  
  10053.    justify determines how string is positioned relative to the current
  10054.    position.  If justify is negative, string is left justified; if it is zero,
  10055.    string is centered; if it is positive, string is right justified.
  10056.  
  10057. Return value
  10058.  
  10059.    The length of string, in world space units.
  10060.  
  10061. Restrictions
  10062.  
  10063.    Before using this routine, you must use the fg_initw and fg_setworld
  10064.    routines to establish a world space coordinate system.  This routine is not
  10065.    available in Fastgraph/Light and has no effect in text video modes.
  10066.  
  10067. See also
  10068.  
  10069.    fg_initw, fg_setangle, fg_setratio, fg_setsize, fg_setsizew, fg_setworld,
  10070.    fg_swchar, fg_swtext
  10071.  
  10072. Examples
  10073.  
  10074.    7-11
  10075.  
  10076.  
  10077.  
  10078.  
  10079.  
  10080.  
  10081.  
  10082.  
  10083.  
  10084.  
  10085.  
  10086.  
  10087.  
  10088.                                      165
  10089. fg_swtext
  10090.  
  10091. Prototype
  10092.  
  10093.    void fg_swtext (char *string, int n, int justify);
  10094.    sub FGswtext (string$, n%, justify%)
  10095.    subroutine fg_swtext (character*(*) string, integer*2 n, integer*2 justify)
  10096.    procedure fg_swtext (string : string; n, justify : integer);
  10097.  
  10098. Description
  10099.  
  10100.    The fg_swtext routine is a scaled down version of the fg_swchar routine.
  10101.    It does not include the alternate font character definitions and thus
  10102.    requires less memory than fg_swchar.
  10103.  
  10104. Parameters
  10105.  
  10106.    string is the arbitrary-length sequence of characters to display.  It may
  10107.    contain special operators, as summarized in the following table.
  10108.  
  10109.             operator    meaning
  10110.  
  10111.             \^          superscript the next character
  10112.             \v          subscript the next character
  10113.             _           begin underlining characters until another
  10114.                         underscore character is encountered
  10115.  
  10116.    n is the number of characters in string, including any special operator
  10117.    characters.
  10118.  
  10119.    justify determines how string is positioned relative to the current
  10120.    position.  If justify is negative, string is left justified; if it is zero,
  10121.    string is centered; if it is positive, string is right justified.
  10122.  
  10123. Return value
  10124.  
  10125.    none
  10126.  
  10127. Restrictions
  10128.  
  10129.    Before using this routine, you must use the fg_initw and fg_setworld
  10130.    routines to establish a world space coordinate system.  This routine is not
  10131.    available in Fastgraph/Light and has no effect in text video modes.
  10132.  
  10133. See also
  10134.  
  10135.    fg_initw, fg_setangle, fg_setratio, fg_setsize, fg_setsizew, fg_setworld,
  10136.    fg_swchar, fg_swlength
  10137.  
  10138. Examples
  10139.  
  10140.    7-10, 7-11
  10141.  
  10142.  
  10143.  
  10144.  
  10145.  
  10146.  
  10147.                                      166
  10148. fg_tcmask
  10149.  
  10150. Prototype
  10151.  
  10152.    void fg_tcmask (int mask);
  10153.    sub FGtcmask (mask%)
  10154.    subroutine fg_tcmask (integer*2 mask)
  10155.    procedure fg_tcmask (mask : integer);
  10156.  
  10157. Description
  10158.  
  10159.    The fg_tcmask routine defines which color values the fg_tcxfer routine will
  10160.    consider transparent.
  10161.  
  10162. Parameters
  10163.  
  10164.    mask is a 16-bit mask, where each bit indicates whether or not the
  10165.    corresponding color value is transparent.  For example, if bit 0 (the
  10166.    rightmost bit) is 1, then color 0 will be transparent.  If bit 0 is 0,
  10167.    color 0 will not be transparent.  Because the mask size is 16 bits, only
  10168.    the first 16 color values may be defined as transparent.
  10169.  
  10170. Return value
  10171.  
  10172.    none
  10173.  
  10174. Restrictions
  10175.  
  10176.    This routine has no effect in text video modes.
  10177.  
  10178. See also
  10179.  
  10180.    fg_tcxfer
  10181.  
  10182. Examples
  10183.  
  10184.    9-28
  10185.  
  10186.  
  10187.  
  10188.  
  10189.  
  10190.  
  10191.  
  10192.  
  10193.  
  10194.  
  10195.  
  10196.  
  10197.  
  10198.  
  10199.  
  10200.  
  10201.  
  10202.  
  10203.  
  10204.  
  10205.  
  10206.                                      167
  10207. fg_tcxfer
  10208.  
  10209. Prototype
  10210.  
  10211.    void fg_tcxfer (int minx, int maxx, int miny, int maxy, int newx, int newy,
  10212.       int source_page, int dest_page);
  10213.    sub FGtcxfer (minx%, maxx%, miny%, maxy%, newx%, newy%, source_page%,
  10214.       dest_page%)
  10215.    subroutine fg_tcxfer (integer*2 minx, integer*2 maxx, integer*2 miny,
  10216.       integer*2 maxy, integer*2 newx, integer*2 newy, integer*2 source_page,
  10217.       integer*2 dest_page);
  10218.    procedure fg_tcxfer (minx, maxx, miny, maxy, newx, newy, source_page,
  10219.       dest_page : integer);
  10220.  
  10221. Description
  10222.  
  10223.    The fg_tcxfer routine copies a rectangular region from any position on any
  10224.    video page to any position on any video page, excluding any pixels whose
  10225.    color is transparent.  The transparent colors are defined by the fg_tcmask
  10226.    routine.
  10227.  
  10228. Parameters
  10229.  
  10230.    minx is the x coordinate of the source region's left edge.  Its value is
  10231.    reduced to a byte boundary if necessary.
  10232.  
  10233.    maxx is the x coordinate of the source region's right edge.  It must be
  10234.    greater than or equal to the value of minx.  Its value is extended to a
  10235.    byte boundary if necessary.
  10236.  
  10237.    miny is the y coordinate of the source region's top edge.
  10238.  
  10239.    maxy is the y coordinate of the source region's bottom edge.  It must be
  10240.    greater than or equal to the value of miny.
  10241.  
  10242.    newx is the x coordinate of the destination region's left edge.
  10243.  
  10244.    newy is the y coordinate of the destination region's bottom edge.
  10245.  
  10246.    source_page is the video page number containing the source region.
  10247.  
  10248.    dest_page is the video page number for the destination region.
  10249.  
  10250. Return value
  10251.  
  10252.    none
  10253.  
  10254. Restrictions
  10255.  
  10256.    If source_page and dest_page reference the same video page, the source
  10257.    region and destination region must not overlap.  This routine has no effect
  10258.    in text video modes.
  10259.  
  10260. See also
  10261.  
  10262.    fg_tcmask, fg_transfer
  10263.  
  10264.  
  10265.                                      168
  10266. fg_tcxfer (continued)
  10267.  
  10268. Examples
  10269.  
  10270.    9-28
  10271.  
  10272.  
  10273.  
  10274.  
  10275.  
  10276.  
  10277.  
  10278.  
  10279.  
  10280.  
  10281.  
  10282.  
  10283.  
  10284.  
  10285.  
  10286.  
  10287.  
  10288.  
  10289.  
  10290.  
  10291.  
  10292.  
  10293.  
  10294.  
  10295.  
  10296.  
  10297.  
  10298.  
  10299.  
  10300.  
  10301.  
  10302.  
  10303.  
  10304.  
  10305.  
  10306.  
  10307.  
  10308.  
  10309.  
  10310.  
  10311.  
  10312.  
  10313.  
  10314.  
  10315.  
  10316.  
  10317.  
  10318.  
  10319.  
  10320.  
  10321.  
  10322.  
  10323.  
  10324.                                      169
  10325. fg_testmode
  10326.  
  10327. Prototype
  10328.  
  10329.    int fg_testmode (int mode, int pages);
  10330.    function FGtestmode% (mode%, pages%)
  10331.    integer*2 function fg_testmode (integer*2 mode, integer*2 pages)
  10332.    function fg_testmode (mode, pages : integer) : integer;
  10333.  
  10334. Description
  10335.  
  10336.    The fg_testmode routine determines whether or not a specified video mode is
  10337.    available on the user's system.  Additionally, fg_testmode can check if
  10338.    there is enough video memory (for physical pages) or random-access memory
  10339.    (for virtual pages) to support the number of video pages needed.
  10340.  
  10341. Parameters
  10342.  
  10343.    mode is the video mode number to test, between 0 and 23.  Refer to the
  10344.    description of the fg_setmode routine for a list of available video modes.
  10345.  
  10346.    pages is the number of video pages required (either physical pages, virtual
  10347.    pages, or both).  If the pages parameter is zero or negative, fg_testmode
  10348.    checks for availability of the video mode but does not consider video
  10349.    memory requirements.
  10350.  
  10351. Return value
  10352.  
  10353.    If the requested video mode is available (with the requested number of
  10354.    video pages), fg_testmode returns 1.  If not, it returns 0.
  10355.  
  10356. Restrictions
  10357.  
  10358.    none
  10359.  
  10360. See also
  10361.  
  10362.    fg_automode, fg_bestmode, fg_egacheck, fg_setmode
  10363.  
  10364. Examples
  10365.  
  10366.    3-3, 3-5, 3-9, 5-16, 6-7
  10367.  
  10368.  
  10369.  
  10370.  
  10371.  
  10372.  
  10373.  
  10374.  
  10375.  
  10376.  
  10377.  
  10378.  
  10379.  
  10380.  
  10381.  
  10382.  
  10383.                                      170
  10384. fg_text
  10385.  
  10386. Prototype
  10387.  
  10388.    void fg_text (char *string, int n);
  10389.    sub FGtext (string$, n%)
  10390.    subroutine fg_text (character*(*) string, integer*2 n)
  10391.    procedure fg_text (string : string; n : integer);
  10392.  
  10393. Description
  10394.  
  10395.    The fg_text routine displays a string of hardware characters, starting at
  10396.    the text cursor position, using the current text attribute (for text modes)
  10397.    or color index (for graphics modes).  This routine leaves the text cursor
  10398.    one column to the right of the last character changed (or the first column
  10399.    of the next row if the last character is at the end of a row).
  10400.  
  10401. Parameters
  10402.  
  10403.    string is the arbitrary-length sequence of characters to display.
  10404.  
  10405.    n is the number of characters to display from string.
  10406.  
  10407. Return value
  10408.  
  10409.    none
  10410.  
  10411. Restrictions
  10412.  
  10413.    none
  10414.  
  10415. See also
  10416.  
  10417.    fg_locate
  10418.  
  10419. Examples
  10420.  
  10421.    7-1 to 7-8, 7-10, 7-11
  10422.  
  10423.  
  10424.  
  10425.  
  10426.  
  10427.  
  10428.  
  10429.  
  10430.  
  10431.  
  10432.  
  10433.  
  10434.  
  10435.  
  10436.  
  10437.  
  10438.  
  10439.  
  10440.  
  10441.  
  10442.                                      171
  10443. fg_transfer
  10444.  
  10445. Prototype
  10446.  
  10447.    void fg_transfer (int minx, int maxx, int miny, int maxy, int newx,
  10448.       int newy, int source_page, int dest_page);
  10449.    sub FGtransfer (minx%, maxx%, miny%, maxy%, newx%, newy%, source_page%,
  10450.       dest_page%)
  10451.    subroutine fg_transfer (integer*2 minx, integer*2 maxx, integer*2 miny,
  10452.       integer*2 maxy, integer*2 newx, integer*2 newy, integer*2 source_page,
  10453.       integer*2 dest_page);
  10454.    procedure fg_transfer (minx, maxx, miny, maxy, newx, newy, source_page,
  10455.       dest_page : integer);
  10456.  
  10457. Description
  10458.  
  10459.    The fg_transfer routine copies a rectangular region from any position on
  10460.    any video page to any position on any video page.  In text modes, the
  10461.    region is defined in character space; in graphics modes, it is defined in
  10462.    screen space.  It is Fastgraph's most general image transfer routine.
  10463.  
  10464. Parameters
  10465.  
  10466.    minx is the x coordinate of the source region's left edge.  In graphics
  10467.    modes, its value is reduced to a byte boundary if necessary.
  10468.  
  10469.    maxx is the x coordinate of the source region's right edge.  It must be
  10470.    greater than or equal to the value of minx.  In graphics modes, its value
  10471.    is extended to a byte boundary if necessary.
  10472.  
  10473.    miny is the y coordinate of the source region's top edge.
  10474.  
  10475.    maxy is the y coordinate of the source region's bottom edge.  It must be
  10476.    greater than or equal to the value of miny.
  10477.  
  10478.    newx is the x coordinate of the destination region's left edge.
  10479.  
  10480.    newy is the y coordinate of the destination region's bottom edge.
  10481.  
  10482.    source_page is the video page number containing the source region.
  10483.  
  10484.    dest_page is the video page number for the destination region.
  10485.  
  10486. Return value
  10487.  
  10488.    none
  10489.  
  10490. Restrictions
  10491.  
  10492.    If source_page and dest_page reference the same video page, the source
  10493.    region and destination region must not overlap.
  10494.  
  10495. See also
  10496.  
  10497.    fg_copypage, fg_restore, fg_restorew, fg_save, fg_savew, fg_tcxfer
  10498.  
  10499.  
  10500.  
  10501.                                      172
  10502. fg_transfer (continued)
  10503.  
  10504. Examples
  10505.  
  10506.    9-25, 9-26, 9-27, 10-4, 10-5
  10507.  
  10508.  
  10509.  
  10510.  
  10511.  
  10512.  
  10513.  
  10514.  
  10515.  
  10516.  
  10517.  
  10518.  
  10519.  
  10520.  
  10521.  
  10522.  
  10523.  
  10524.  
  10525.  
  10526.  
  10527.  
  10528.  
  10529.  
  10530.  
  10531.  
  10532.  
  10533.  
  10534.  
  10535.  
  10536.  
  10537.  
  10538.  
  10539.  
  10540.  
  10541.  
  10542.  
  10543.  
  10544.  
  10545.  
  10546.  
  10547.  
  10548.  
  10549.  
  10550.  
  10551.  
  10552.  
  10553.  
  10554.  
  10555.  
  10556.  
  10557.  
  10558.  
  10559.  
  10560.                                      173
  10561. fg_version
  10562.  
  10563. Prototype
  10564.  
  10565.    void fg_version (int *major, int *minor);
  10566.    sub FGversion (major%, minor%)
  10567.    subroutine fg_version (integer*2 major, integer*2 minor)
  10568.    procedure fg_version (var major, minor : integer);
  10569.  
  10570. Description
  10571.  
  10572.    The fg_version routine returns the major and minor version numbers for your
  10573.    copy of Fastgraph or Fastgraph/Light.  For example, if you are using
  10574.    Fastgraph version 2.10, the major version number is 2 and the minor version
  10575.    number is 10.
  10576.  
  10577. Parameters
  10578.  
  10579.    major receives the major version number.
  10580.  
  10581.    minor receives the minor version number, expressed in hundredths.
  10582.  
  10583. Return value
  10584.  
  10585.    none
  10586.  
  10587. Restrictions
  10588.  
  10589.    none
  10590.  
  10591. Examples
  10592.  
  10593.    1-1, 1-2, 1-3
  10594.  
  10595.  
  10596.  
  10597.  
  10598.  
  10599.  
  10600.  
  10601.  
  10602.  
  10603.  
  10604.  
  10605.  
  10606.  
  10607.  
  10608.  
  10609.  
  10610.  
  10611.  
  10612.  
  10613.  
  10614.  
  10615.  
  10616.  
  10617.  
  10618.  
  10619.                                      174
  10620. fg_voice
  10621.  
  10622. Prototype
  10623.  
  10624.    void fg_voice (int channel, int frequency, int volume, int duration);
  10625.    sub FGvoice (channel%, frequency%, volume%, duration%)
  10626.    subroutine fg_voice (integer*2 channel, integer*2 frequency, integer*2
  10627.    volume, integer*2 duration)
  10628.    procedure fg_voice (channel, frequency, volume, duration : integer);
  10629.  
  10630. Description
  10631.  
  10632.    The fg_voice routine produces a tone of a specified frequency, duration,
  10633.    and volume using one of the TI sound chip's four independent voice
  10634.    channels.
  10635.  
  10636. Parameters
  10637.  
  10638.    channel defines the voice channel or type of noise, as shown below.
  10639.  
  10640.                    value meaning
  10641.  
  10642.                      1   voice channel #1
  10643.                      2   voice channel #2
  10644.                      3   voice channel #3
  10645.                      4   voice channel #4, periodic noise
  10646.                      5   voice channel #4, white noise
  10647.  
  10648.    frequency defines the tone's frequency in Hertz.  If channel is 1, 2, or 3,
  10649.    then frequency represents the actual frequency, between 18 and 32,767.  If
  10650.    channel is 4 or 5, frequency is instead a value that represents a specific
  10651.    frequency, as shown below.
  10652.  
  10653.                                value  frequency
  10654.  
  10655.                                  0    512 Hertz
  10656.                                  1   1024 Hertz
  10657.                                  2   2048 Hertz
  10658.  
  10659.    volume is the tone's volume, between 0 (silent) and 15 (loudest).
  10660.  
  10661.    duration is the tone's length in clock ticks (there are approximately 18.2
  10662.    clock ticks per second).  If duration is zero or negative, the tone is said
  10663.    to be continuous and will play until you stop it with the fg_quiet routine.
  10664.  
  10665. Return value
  10666.  
  10667.    none
  10668.  
  10669.  
  10670.  
  10671.  
  10672.  
  10673.  
  10674.  
  10675.  
  10676.  
  10677.  
  10678.                                      175
  10679. fg_voice (continued)
  10680.  
  10681. Restrictions
  10682.  
  10683.    This routine should only be used on systems equipped with the TI sound chip
  10684.    (namely, the PCjr and Tandy 1000 systems).  It has no effect if there is
  10685.    asynchronous sound already in progress.
  10686.  
  10687. See also
  10688.  
  10689.    fg_music, fg_quiet, fg_sound, fg_voices
  10690.  
  10691. Examples
  10692.  
  10693.    13-2
  10694.  
  10695.  
  10696.  
  10697.  
  10698.  
  10699.  
  10700.  
  10701.  
  10702.  
  10703.  
  10704.  
  10705.  
  10706.  
  10707.  
  10708.  
  10709.  
  10710.  
  10711.  
  10712.  
  10713.  
  10714.  
  10715.  
  10716.  
  10717.  
  10718.  
  10719.  
  10720.  
  10721.  
  10722.  
  10723.  
  10724.  
  10725.  
  10726.  
  10727.  
  10728.  
  10729.  
  10730.  
  10731.  
  10732.  
  10733.  
  10734.  
  10735.  
  10736.  
  10737.                                      176
  10738. fg_voices
  10739.  
  10740. Prototype
  10741.  
  10742.    void fg_voices (int *sound_array, int ntimes);
  10743.    sub FGvoices (sound_array%(), ntimes%)
  10744.    subroutine fg_voices (integer*2 sound_array, integer*2 ntimes)
  10745.    procedure fg_voices (var sound_array : integer; ntimes : integer);
  10746.  
  10747. Description
  10748.  
  10749.    The fg_voices routine uses the TI sound chip to play a series of tones of
  10750.    specified frequencies, durations, and volumes, concurrent with other
  10751.    activity.  It is the asynchronous version of the fg_voice routine.
  10752.  
  10753. Parameters
  10754.  
  10755.    sound_array is an arbitrary-length array containing a series of
  10756.    (channel,frequency,volume,duration) sound definitions.  The format of this
  10757.    array is:
  10758.  
  10759.  
  10760.                           [0]    channel # of sound 1
  10761.  
  10762.                           [1]    frequency of sound 1
  10763.  
  10764.                           [2]    volume    of sound 1
  10765.  
  10766.                           [3]    duration  of sound 1
  10767.                                            .
  10768.                                            .
  10769.                                            .
  10770.                        [4n-4]    channel # of sound n
  10771.  
  10772.                        [4n-3]    frequency of sound n
  10773.  
  10774.                        [4n-2]    volume    of sound n
  10775.  
  10776.                        [4n-1]    duration  of sound n
  10777.  
  10778.                          [4n]       terminator (0)
  10779.  
  10780.  
  10781.    The channel numbers, frequencies, volumes, and durations must be in the
  10782.    same ranges as discussed in the description of the fg_voice routine, except
  10783.    the durations are quadrupled because of the accelerated clock tick
  10784.    interrupt rate (there are 72.8 instead of 18.2 clock ticks per second).  A
  10785.    null character (that is, a zero byte) terminates the array.
  10786.  
  10787.    ntimes specifies the number of times to cycle through the sounds defined in
  10788.    sound_array.  If ntimes is negative, the sounds will play repetitively
  10789.    until stopped with the fg_hush or fg_hushnext routine.
  10790.  
  10791.  
  10792.  
  10793.  
  10794.  
  10795.  
  10796.                                      177
  10797. fg_voices (continued)
  10798.  
  10799. Return value
  10800.  
  10801.    none
  10802.  
  10803. Restrictions
  10804.  
  10805.    This routine should only be used on systems equipped with the TI sound chip
  10806.    (namely, the PCjr and Tandy 1000 systems).  It has no effect if there is
  10807.    asynchronous sound already in progress.  To expand the range of sound
  10808.    effects, Fastgraph temporarily quadruples the clock tick interrupt rate
  10809.    from 18.2 to 72.8 ticks per second while producing asynchronous sound.
  10810.    Because many disk controllers rely on the 18.2 tick per second clock rate
  10811.    to synchronize disk accesses, your programs should not perform any disk
  10812.    operations when asynchronous sound is in progress.
  10813.  
  10814. See also
  10815.  
  10816.    fg_hush, fg_hushnext, fg_musicb, fg_playing, fg_sounds, fg_voice
  10817.  
  10818. Examples
  10819.  
  10820.    13-5
  10821.  
  10822.  
  10823.  
  10824.  
  10825.  
  10826.  
  10827.  
  10828.  
  10829.  
  10830.  
  10831.  
  10832.  
  10833.  
  10834.  
  10835.  
  10836.  
  10837.  
  10838.  
  10839.  
  10840.  
  10841.  
  10842.  
  10843.  
  10844.  
  10845.  
  10846.  
  10847.  
  10848.  
  10849.  
  10850.  
  10851.  
  10852.  
  10853.  
  10854.  
  10855.                                      178
  10856. fg_waitfor
  10857.  
  10858. Prototype
  10859.  
  10860.    void fg_waitfor (int ticks);
  10861.    sub FGwaitfor (ticks%)
  10862.    subroutine fg_waitfor (integer*2 ticks)
  10863.    procedure fg_waitfor (ticks : integer);
  10864.  
  10865. Description
  10866.  
  10867.    The fg_waitfor routine delays a program's execution for a given number of
  10868.    clock ticks.  There are 18.2 clock ticks per second, regardless of the
  10869.    system's processor speed.
  10870.  
  10871. Parameters
  10872.  
  10873.    ticks is the number of clock ticks to wait.
  10874.  
  10875. Return value
  10876.  
  10877.    none
  10878.  
  10879. Restrictions
  10880.  
  10881.    none
  10882.  
  10883. See also
  10884.  
  10885.    fg_stall
  10886.  
  10887. Examples
  10888.  
  10889.    5-11, 10-1 to 10-5, 11-5, 11-6, 12-2, 12-6, 12-7, 12-11, 12-12, 13-1, 13-2,
  10890.    13-3, 13-6, 13-7, 14-1
  10891.  
  10892.  
  10893.  
  10894.  
  10895.  
  10896.  
  10897.  
  10898.  
  10899.  
  10900.  
  10901.  
  10902.  
  10903.  
  10904.  
  10905.  
  10906.  
  10907.  
  10908.  
  10909.  
  10910.  
  10911.  
  10912.  
  10913.  
  10914.                                      179
  10915. fg_waitkey
  10916.  
  10917. Prototype
  10918.  
  10919.    void fg_waitkey (void);
  10920.    sub FGwaitkey ()
  10921.    subroutine fg_waitkey ()
  10922.    procedure fg_waitkey;
  10923.  
  10924. Description
  10925.  
  10926.    The fg_waitkey routine flushes the BIOS keyboard buffer (that is, removes
  10927.    any type-ahead characters) and then waits for another keystroke.  It is
  10928.    most useful in "press any key to continue" situations.
  10929.  
  10930. Parameters
  10931.  
  10932.    none
  10933.  
  10934. Return value
  10935.  
  10936.    none
  10937.  
  10938. Restrictions
  10939.  
  10940.    none
  10941.  
  10942. See also
  10943.  
  10944.    fg_getkey, fg_intkey
  10945.  
  10946. Examples
  10947.  
  10948.    3-2 to 3-8
  10949.  
  10950.  
  10951.  
  10952.  
  10953.  
  10954.  
  10955.  
  10956.  
  10957.  
  10958.  
  10959.  
  10960.  
  10961.  
  10962.  
  10963.  
  10964.  
  10965.  
  10966.  
  10967.  
  10968.  
  10969.  
  10970.  
  10971.  
  10972.  
  10973.                                      180
  10974. fg_where
  10975.  
  10976. Prototype
  10977.  
  10978.    void fg_where (int *row, int *column);
  10979.    sub FGwhere (row%, column%)
  10980.    subroutine fg_where (integer*2 row, integer*2 column)
  10981.    procedure fg_where (row, column : integer);
  10982.  
  10983. Description
  10984.  
  10985.    The fg_where routine retrieves the text cursor position for the active
  10986.    display page.
  10987.  
  10988. Parameters
  10989.  
  10990.    row receives the text cursor's current row number, between 0 and one less
  10991.    than the number of character rows available.
  10992.  
  10993.    column receives text cursor's current column number, between 0 and one less
  10994.    than the number of character columns available.
  10995.  
  10996. Return value
  10997.  
  10998.    none
  10999.  
  11000. Restrictions
  11001.  
  11002.    none
  11003.  
  11004. See also
  11005.  
  11006.    fg_locate
  11007.  
  11008. Examples
  11009.  
  11010.    7-2
  11011.  
  11012.  
  11013.  
  11014.  
  11015.  
  11016.  
  11017.  
  11018.  
  11019.  
  11020.  
  11021.  
  11022.  
  11023.  
  11024.  
  11025.  
  11026.  
  11027.  
  11028.  
  11029.  
  11030.  
  11031.  
  11032.                                      181
  11033. fg_xalpha
  11034.  
  11035. Prototype
  11036.  
  11037.    int fg_xalpha (int ix);
  11038.    function FGxalpha% (ix%)
  11039.    integer*2 function fg_xalpha (integer*2 ix)
  11040.    function fg_xalpha (ix : integer) : integer;
  11041.  
  11042. Description
  11043.  
  11044.    The fg_xalpha routine translates a screen space x coordinate to the
  11045.    character space column containing that coordinate.
  11046.  
  11047. Parameters
  11048.  
  11049.    ix is the screen space coordinate to translate.
  11050.  
  11051. Return value
  11052.  
  11053.    The character space column containing the screen space coordinate ix.  In
  11054.    text modes, the return value is equal to the value of ix.
  11055.  
  11056. Restrictions
  11057.  
  11058.    none
  11059.  
  11060. See also
  11061.  
  11062.    fg_xconvert, fg_yalpha, fg_yconvert
  11063.  
  11064. Examples
  11065.  
  11066.    12-9
  11067.  
  11068.  
  11069.  
  11070.  
  11071.  
  11072.  
  11073.  
  11074.  
  11075.  
  11076.  
  11077.  
  11078.  
  11079.  
  11080.  
  11081.  
  11082.  
  11083.  
  11084.  
  11085.  
  11086.  
  11087.  
  11088.  
  11089.  
  11090.  
  11091.                                      182
  11092. fg_xconvert
  11093.  
  11094. Prototype
  11095.  
  11096.    int fg_xconvert (int column);
  11097.    function FGxconvert% (column%)
  11098.    integer*2 function fg_xconvert (integer*2 column)
  11099.    function fg_xconvert (column : integer) : integer;
  11100.  
  11101. Description
  11102.  
  11103.    The fg_xconvert routine translates a character space column to the screen
  11104.    space coordinate of its leftmost pixel.  In graphics video modes,
  11105.    fg_xconvert(1) is an easy way to determine the width in pixels of a
  11106.    character cell.
  11107.  
  11108. Parameters
  11109.  
  11110.    column is the character space column to translate.
  11111.  
  11112. Return value
  11113.  
  11114.    The screen space x coordinate of the leftmost pixel in the character space
  11115.    column column.  In text modes, the return value is equal to the value of
  11116.    column.
  11117.  
  11118. Restrictions
  11119.  
  11120.    none
  11121.  
  11122. See also
  11123.  
  11124.    fg_xalpha, fg_yalpha, fg_yconvert
  11125.  
  11126. Examples
  11127.  
  11128.    7-7, 12-7
  11129.  
  11130.  
  11131.  
  11132.  
  11133.  
  11134.  
  11135.  
  11136.  
  11137.  
  11138.  
  11139.  
  11140.  
  11141.  
  11142.  
  11143.  
  11144.  
  11145.  
  11146.  
  11147.  
  11148.  
  11149.  
  11150.                                      183
  11151. fg_xscreen
  11152.  
  11153. Prototype
  11154.  
  11155.    int fg_xscreen (double x);
  11156.    function FGxscreen% (x#)
  11157.    integer*2 function fg_xscreen (real*8 x)
  11158.    function fg_xscreen (x : real) : integer;
  11159.  
  11160. Description
  11161.  
  11162.    The fg_xscreen routine translates a world space x coordinate to its screen
  11163.    space equivalent.
  11164.  
  11165. Parameters
  11166.  
  11167.    x is the world space coordinate to translate.
  11168.  
  11169. Return value
  11170.  
  11171.    The screen space x coordinate equivalent to the world space coordinate x.
  11172.  
  11173. Restrictions
  11174.  
  11175.    This routine is not available in Fastgraph/Light.
  11176.  
  11177. See also
  11178.  
  11179.    fg_xworld, fg_yscreen, fg_yworld
  11180.  
  11181.  
  11182.  
  11183.  
  11184.  
  11185.  
  11186.  
  11187.  
  11188.  
  11189.  
  11190.  
  11191.  
  11192.  
  11193.  
  11194.  
  11195.  
  11196.  
  11197.  
  11198.  
  11199.  
  11200.  
  11201.  
  11202.  
  11203.  
  11204.  
  11205.  
  11206.  
  11207.  
  11208.  
  11209.                                      184
  11210. fg_xworld
  11211.  
  11212. Prototype
  11213.  
  11214.    double fg_xworld (int ix);
  11215.    function FGxworld# (ix%)
  11216.    real*8 function fg_xworld (integer*2 ix)
  11217.    function fg_xworld (ix : integer) : real;
  11218.  
  11219. Description
  11220.  
  11221.    The fg_xworld routine translates a screen space x coordinate to its world
  11222.    space equivalent.
  11223.  
  11224. Parameters
  11225.  
  11226.    ix is the screen space coordinate to translate.
  11227.  
  11228. Return value
  11229.  
  11230.    The world space x coordinate equivalent to the screen space coordinate ix.
  11231.  
  11232. Restrictions
  11233.  
  11234.    This routine is not available in Fastgraph/Light.
  11235.  
  11236. See also
  11237.  
  11238.    fg_xscreen, fg_yscreen, fg_yworld
  11239.  
  11240.  
  11241.  
  11242.  
  11243.  
  11244.  
  11245.  
  11246.  
  11247.  
  11248.  
  11249.  
  11250.  
  11251.  
  11252.  
  11253.  
  11254.  
  11255.  
  11256.  
  11257.  
  11258.  
  11259.  
  11260.  
  11261.  
  11262.  
  11263.  
  11264.  
  11265.  
  11266.  
  11267.  
  11268.                                      185
  11269. fg_yalpha
  11270.  
  11271. Prototype
  11272.  
  11273.    int fg_yalpha (int iy);
  11274.    function FGyalpha% (iy%)
  11275.    integer*2 function fg_yalpha (integer*2 iy)
  11276.    function fg_yalpha (iy : integer) : integer;
  11277.  
  11278. Description
  11279.  
  11280.    The fg_yalpha routine translates a screen space y coordinate to the
  11281.    character space row containing that coordinate.
  11282.  
  11283. Parameters
  11284.  
  11285.    iy is the screen space coordinate to translate.
  11286.  
  11287. Return value
  11288.  
  11289.    The character space row containing the screen space coordinate iy.  In text
  11290.    modes, the return value is equal to the value of iy.
  11291.  
  11292. Restrictions
  11293.  
  11294.    none
  11295.  
  11296. See also
  11297.  
  11298.    fg_xalpha, fg_xconvert, fg_yconvert
  11299.  
  11300. Examples
  11301.  
  11302.    12-9
  11303.  
  11304.  
  11305.  
  11306.  
  11307.  
  11308.  
  11309.  
  11310.  
  11311.  
  11312.  
  11313.  
  11314.  
  11315.  
  11316.  
  11317.  
  11318.  
  11319.  
  11320.  
  11321.  
  11322.  
  11323.  
  11324.  
  11325.  
  11326.  
  11327.                                      186
  11328. fg_yconvert
  11329.  
  11330. Prototype
  11331.  
  11332.    int fg_yconvert (int row);
  11333.    function FGyconvert% (row%)
  11334.    integer*2 function fg_yconvert (integer*2 row)
  11335.    function fg_yconvert (row : integer) : integer;
  11336.  
  11337. Description
  11338.  
  11339.    The fg_yconvert routine translates a character space row to the screen
  11340.    space coordinate of its top (lowest-numbered) pixel.  In graphics video
  11341.    modes, fg_yconvert(1) is an easy way to determine the height in pixels of a
  11342.    character cell.
  11343.  
  11344. Parameters
  11345.  
  11346.    row is the character space row to translate.
  11347.  
  11348. Return value
  11349.  
  11350.    The screen space y coordinate of the top pixel in the character space row
  11351.    row.  In text modes, the return value is equal to the value of row.
  11352.  
  11353. Restrictions
  11354.  
  11355.    none
  11356.  
  11357. See also
  11358.  
  11359.    fg_xalpha, fg_xconvert, fg_yalpha
  11360.  
  11361. Examples
  11362.  
  11363.    7-7, 12-7
  11364.  
  11365.  
  11366.  
  11367.  
  11368.  
  11369.  
  11370.  
  11371.  
  11372.  
  11373.  
  11374.  
  11375.  
  11376.  
  11377.  
  11378.  
  11379.  
  11380.  
  11381.  
  11382.  
  11383.  
  11384.  
  11385.  
  11386.                                      187
  11387. fg_yscreen
  11388.  
  11389. Prototype
  11390.  
  11391.    int fg_yscreen (double y);
  11392.    function FGyscreen% (y#)
  11393.    integer*2 function fg_yscreen (real*8 y)
  11394.    function fg_yscreen (y : real) : integer;
  11395.  
  11396. Description
  11397.  
  11398.    The fg_yscreen routine translates a world space y coordinate to its screen
  11399.    space equivalent.
  11400.  
  11401. Parameters
  11402.  
  11403.    y is the world space coordinate to translate.
  11404.  
  11405. Return value
  11406.  
  11407.    The screen space y coordinate equivalent to the world space coordinate y.
  11408.  
  11409. Restrictions
  11410.  
  11411.    This routine is not available in Fastgraph/Light.
  11412.  
  11413. See also
  11414.  
  11415.    fg_xscreen, fg_xworld, fg_yworld
  11416.  
  11417.  
  11418.  
  11419.  
  11420.  
  11421.  
  11422.  
  11423.  
  11424.  
  11425.  
  11426.  
  11427.  
  11428.  
  11429.  
  11430.  
  11431.  
  11432.  
  11433.  
  11434.  
  11435.  
  11436.  
  11437.  
  11438.  
  11439.  
  11440.  
  11441.  
  11442.  
  11443.  
  11444.  
  11445.                                      188
  11446. fg_yworld
  11447.  
  11448. Prototype
  11449.  
  11450.    double fg_yworld (int iy);
  11451.    function FGyworld# (iy%)
  11452.    real*8 function fg_yworld (integer*2 iy)
  11453.    function fg_yworld (iy : integer) : real;
  11454.  
  11455. Description
  11456.  
  11457.    The fg_yworld routine translates a screen space y coordinate to its world
  11458.    space equivalent.
  11459.  
  11460. Parameters
  11461.  
  11462.    iy is the screen space coordinate to translate.
  11463.  
  11464. Return value
  11465.  
  11466.    The world space y coordinate equivalent to the screen space coordinate iy.
  11467.  
  11468. Restrictions
  11469.  
  11470.    This routine is not available in Fastgraph/Light.
  11471.  
  11472. See also
  11473.  
  11474.    fg_xscreen, fg_xworld, fg_yscreen
  11475.  
  11476.  
  11477.  
  11478.  
  11479.  
  11480.  
  11481.  
  11482.  
  11483.  
  11484.  
  11485.  
  11486.  
  11487.  
  11488.  
  11489.  
  11490.  
  11491.  
  11492.  
  11493.  
  11494.  
  11495.  
  11496.  
  11497.  
  11498.  
  11499.  
  11500.  
  11501.  
  11502.  
  11503.  
  11504.                                      189