home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / GRAPHICS / MISC / FGL110B.ZIP / REF.TXT next >
Encoding:
Text File  |  1992-02-07  |  208.5 KB  |  11,504 lines

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