home *** CD-ROM | disk | FTP | other *** search
/ Borland Programmer's Resource / Borland_Programmers_Resource_CD_1995.iso / code / bcpp / file10 / fgdemo.doc < prev    next >
Encoding:
Text File  |  1995-05-19  |  20.6 KB  |  382 lines

  1.                              FGDEMO version 1.1
  2.  
  3. Ted Gruber Software                                      Voice: (702) 735-1980
  4. PO Box 13408                                               FAX: (702) 735-4603
  5. Las Vegas, NV  89112                                       BBS: (702) 796-7134
  6.                                                            CIS:     72000,1642
  7.  
  8. ------------------------------------------------------------------------------
  9.     FGDEMO:  the demo program for Fastgraph v2.10 and Fastgraph/Light v1.10
  10. ------------------------------------------------------------------------------
  11.  
  12. This program illustrates some of the features of the Fastgraph (tm) graphics
  13. library.  It was written by Diana Gruber, senior programmer at Ted Gruber
  14. Software.  You can contact Ted Gruber Software at the address and phone
  15. numbers listed at the bottom of this file.
  16.  
  17. FGDEMO is distributed with source code.  It was originally compiled with the
  18. Microsoft C 6.0 medium memory model.  You may use the source code in FGDEMO in
  19. your own applications.  This program requires either Fastgraph version 2.10 or
  20. Fastgraph/Light (tm) version 1.10 to link.  If you want to use this code, and
  21. you don't have a copy of Fastgraph, please contact Ted Gruber Software.
  22.  
  23. ------------------------------------------------------------------------------
  24.                                 Starting FGDEMO
  25. ------------------------------------------------------------------------------
  26.  
  27. You can install FGDEMO on a hard disk or run it from diskette.  Just type
  28. FGDEMO at the DOS command prompt.  To install FGDEMO on a hard disk, create a
  29. subdirectory and copy all the files from the diskette to the subdirectory.
  30.  
  31. ------------------------------------------------------------------------------
  32.                                   Video modes
  33. ------------------------------------------------------------------------------
  34.  
  35. FGDEMO runs in a choice of 4 video modes:
  36.  
  37.    640x200 2-color CGA
  38.    640x200 16-color EGA
  39.    640x350 16-color EGA
  40.    720x348 Hercules monochrome
  41.  
  42. When you start the program, you will be given a default video mode choice, and
  43. an opportunity to change to one of the other video modes.  We suggest you try
  44. all of them, and see what they look like.  Note that some of these video modes
  45. may not be available on your system.
  46.  
  47. ------------------------------------------------------------------------------
  48.                                 Running FGDEMO
  49. ------------------------------------------------------------------------------
  50.  
  51. After you start FGDEMO and choose a video mode, an attractive horizontal menu
  52. bar will appear at the top of the screen.  Press any key or click the left
  53. mouse button to get the first pull-down vertical menu.  Select a feature from
  54. this or any menu.  The menus are intuitive.  Select and try all the features
  55. on all the menus.
  56.  
  57. ------------------------------------------------------------------------------
  58.                               Distributing FGDEMO
  59. ------------------------------------------------------------------------------
  60.  
  61. You may freely distribute FGDEMO as long as all the files are distributed
  62. together in their original unaltered state.  If you want to zip the files
  63. together for BBS distribution, please use the file name FGDEMO11.ZIP for
  64. version 1.1 of FGDEMO.  The following files are included in the FGDEMO
  65. distribution:
  66.  
  67. Files required to run FGDEMO:
  68.     FGDEMO   EXE  - the Fastgraph demo program
  69.     08PT     FNT  - 8pt font file (packed pixel run format)
  70.     14PT     FNT  - 14pt font file (packed pixel run format)
  71.     CASINO   PCX  - graphic file (PCX format)
  72.     CASINO   PPR  - graphic file (packed pixel run format)
  73.     ORDER    FRM  - order form (can be printed from File menu)
  74.  
  75. Documentation:
  76.     FGDEMO   DOC  - this file
  77.  
  78. Source code for FGDEMO:
  79.     CHAR     C   - character display and management functions
  80.     COMMON   C   - initialization, termination, general i/o functions
  81.     DISPLAY  C   - functions on Display submenu
  82.     EDITOR   C   - text editor functions
  83.     FGDEMO   C   - function main and screen drawing functions
  84.     FILE     C   - functions on File submenu
  85.     FUNDMTLS C   - functions on Fundamentals submenu
  86.     MENU     C   - define and manage the horizontal and vertical menus
  87.     MISC     C   - functions on Miscellaneous submenu
  88.     UTILITY  C   - functions on Utilities submenu
  89.     VIDEO    C   - functions on Video submenu
  90.  
  91. Header files:
  92.     DEFS     H   - general declarations and initializations
  93.     BIRDMAPS H   - Bird animation bitmaps
  94.     TNTMAPS  H   - TNT and "Kablooy" bitmaps for explosion
  95.     CHAR     H   - these files contain the function declarations.
  96.     COMMON   H     Each one is associated with a source code file.
  97.     DISPLAY  H     The Microsoft C compiler creates these files
  98.     EDITOR   H     when the /Zg switch is used.
  99.     FGDEMO   H
  100.     FILE     H
  101.     FUNDMTLS H
  102.     MENU     H
  103.     MISC     H
  104.     UTILITY  H
  105.     VIDEO    H
  106.  
  107. Make files:
  108.     BUILDBC  BAT - batch file to compile and link FGDEMO with Borland C++
  109.     BUILDMSC BAT - batch file to compile and link FGDEMO with MSC or QuickC
  110.     BUILDTC  BAT - batch file to compile and link FGDEMO with Turbo C/C++
  111.     FGDEMO       - make file for Microsoft C or Quick C
  112.     FGDEMO   MAK - make file for Borland C++ or Turbo C++
  113.     FGDEMO   PRJ - project file for Turbo C
  114.  
  115. ------------------------------------------------------------------------------
  116.                          Compiling and linking FGDEMO
  117. ------------------------------------------------------------------------------
  118.  
  119. The source code files may be recompiled using either Microsoft C, Turbo C,
  120. Turbo C++, Borland C++.  The medium memory model is recommended, and the large
  121. model will also work.  FGDEMO is too big to use the small memory model.
  122.  
  123. If you are using Microsoft C, you can use the make file FGDEMO (no extension)
  124. to rebuild FGDEMO.  If you want to link FGDEMO with Fastgraph instead of
  125. Fastgraph/Light, change the library name FGLM to FGM in the LINK command.
  126.  
  127. If you are using Turbo C or Turbo C++, you can use the project file FGDEMO.PRJ
  128. to rebuild FGDEMO.  If you are compiling from withing the IDE, set the
  129. compilation options to use the medium memory model.  Alternatively, you can
  130. use the command file BUILDTC.BAT to perform the compilation and linking. If
  131. you want to link FGDEMO with Fastgraph instead of Fastgraph/Light, change the
  132. library name FGLM to FGM in the TLINK command, or in the last line of the
  133. project make file.
  134.  
  135. If you are using Borland C++, you can use the make file FGDEMO.MAK to rebuild
  136. FGDEMO.  If you are compiling from withing the IDE, set the compilation
  137. options to use the medium memory model.  Alternatively, you can use the
  138. command file BUILDBC.BAT to perform the compilation and linking. If you want
  139. to link FGDEMO with Fastgraph instead of Fastgraph/Light, change the library
  140. name FGLM to FGM in the TLINK command, or in the last line of the project make
  141. file.
  142.  
  143. You may have problems running FGDEMO in the CGA 640x200 2-color mode (mode 6)
  144. in the Turbo C integrated development environment.  That is because the
  145. environment allocates all available memory, making it impossible for Fastgraph
  146. to allocate a virtual video page.  FGDEMO requires two video pages, of which
  147. one is virtual in mode 6.  You should be able to run FGDEMO in the other video
  148. modes, and you should have no trouble compiling, linking, and running FGDEMO
  149. from the DOS command line.
  150.  
  151. We have had some reports of trouble with older versions of TLINK finding the
  152. Fastgraph or Fastgraph/Light libraries.  If you have this problem, be sure the
  153. full path name of the library appears in your TLINK.CFG file.  If that does
  154. not solve the problem, include the full library path name in the TLINK
  155. command.  We called Borland technical support about this problem, and they
  156. told us there is no TLINK.CFG file supported in Turbo C version 2.0, but it is
  157. supported in Turbo C++ and Borland C++.
  158.  
  159. ------------------------------------------------------------------------------
  160.                             About the FGDEMO menus
  161. ------------------------------------------------------------------------------
  162.  
  163. The menu structure is defined in the file DEFS.H.  A typdef CMD is defined
  164. which is a structure containing information about each menu item:  the
  165. function called when the menu choice is activated, the descriptive name of the
  166. menu item, the x and y location of the menu item, and pointers to the next and
  167. previous items on the menu.  Each menu is defined by an array of these
  168. structures, and is initialized at the top of MENU.C.
  169.  
  170. There are two types of menus:  a horizontal menu, which is the moving bar menu
  171. at the top of the screen, and vertical menus, also known as "pull-down"
  172. menus.  When a pull-down menu is visible, a menu function may be activated by
  173. either clicking the mouse on a highlighted menu function, or by pressing
  174. <Enter>.  Arrow keys are used to highlight the next and previous menu item,
  175. and a mouse may also be used.
  176.  
  177. User input relevant to the menus is accepted in two places:  within the
  178. vertical_menu function (to activate a menu choice), or in the main function
  179. (to control the horizontal menu).  The horizontal menu is also controlled
  180. within the vertical menu, to the extent that if an arrow key is pressed, the
  181. next or previous pull-down menu becomes active.
  182.  
  183. The entire screen, including the horizontal menu and the dithered background,
  184. is drawn at the beginning of the program and stored on the hidden page.  When
  185. a function is called, for example "point", part or all of the visual page is
  186. overwritten, in this case with a pattern of points.  When a key or mouse
  187. button is pressed, the relevant parts of the hidden page are copied back to
  188. the visual page using fg_transfer, resulting in quick (almost instantaneous)
  189. screen redraws.  Occasionally, the entire hidden page needs to be completely
  190. redrawn, such as after the graphics file is displayed, but in most cases only
  191. a small part of the hidden page needs to be redrawn, usually with a single
  192. call to fg_drect.  In general, the hidden page is assumed to have a "clean"
  193. copy of the horizontal menu screen throughout the program, and whenever it is
  194. overwritten it is immediately restored.
  195.  
  196. ------------------------------------------------------------------------------
  197.                                   Fastgraph
  198. ------------------------------------------------------------------------------
  199.  
  200. Fastgraph is a versatile, high-performance programmer's graphics library for
  201. DOS-based PC systems.  It is powerful enough to satisfy the most demanding
  202. graphics application, yet it is easy enough for even the novice graphics
  203. programmer.  Fastgraph includes more than 170 hand-optimized routines, from
  204. pixel display to sophisticated animation tools.  This collection of routines
  205. provides a programmer with proven, powerful tools to take command of the PC
  206. and PS/2 text and graphics video environment.
  207.  
  208. Fastgraph's major functional areas include:
  209.  
  210.    * Video mode detection and initialization
  211.    * Colors, virtual colors, and palettes
  212.    * Graphics fundamentals, including points, solid and dashed lines,
  213.      polygons, circles, ellipses, solid and dithered rectangles, region
  214.      fill, and clipping
  215.    * Redefinable world space coordinate system
  216.    * A scalable stroked character font
  217.    * Image display facilities, including mode-specific and mode-independent
  218.      images, clipped and reversed images, image retrieval, pixel run maps,
  219.      PCX file display and creation, and fast image transfer
  220.    * Physical, virtual, and logical video page management
  221.    * Resizeable video pages for smooth, flicker-free panning
  222.    * Animation and special effects
  223.    * Keyboard, mouse, and joystick support
  224.    * Sound effects and music, both synchronous and asynchronous
  225.    * Support for Borland C++, Turbo C and C++, Microsoft C and QuickC,
  226.      Power C, Turbo Pascal, QuickBASIC, Microsoft FORTRAN, and MASM/TASM
  227.    * Support for small, medium, and large memory models
  228.    * Extensive tutorial-style user's guide and reference manual
  229.    * No royalties
  230.  
  231. Fastgraph is an ideal development tool for entertainment and educational
  232. software, presentation graphics products, scientific and engineering
  233. applications, CAD/CAM, animation, and any application that requires robust
  234. graphics.  Fastgraph supports 22 video modes, including VGA (standard and
  235. extended), EGA, MCGA, CGA, Hercules, Tandy, and monochrome and color text.
  236. With Fastgraph, it's possible to write programs that run in many different
  237. video modes by changing only a few lines of code, resulting in fast program
  238. development.
  239.  
  240. Originally developed for use in commercial video games, Fastgraph represents
  241. the cutting edge in graphics technology for the IBM PC.  It has been used in
  242. commercial products such as Accolade's Test Drive III, Day of the Viper, Steel
  243. Thunder, and Gunboat; ComputerEasy's Video Poker a la Carte; Compu-Teach's
  244. Once Upon a Time series, Puppet Playhouse, and Destination Mars; and all our
  245. shareware products.
  246.  
  247. ------------------------------------------------------------------------------
  248.                                Fastgraph/Light
  249. ------------------------------------------------------------------------------
  250.  
  251. Fastgraph/Light is the shareware version of Fastgraph.  It includes all the
  252. features of Fastgraph except the world space coordinate system and stroked
  253. character font.  Unlike Fastgraph, Fastgraph/Light uses an external video
  254. driver (FGDRIVER) that you load before running a program developed with
  255. Fastgraph/Light, just as you load a mouse driver before you run a program that
  256. uses a mouse.  Fastgraph does not use the external video driver but instead
  257. includes the necessary functions directly in your EXE or COM file.
  258.  
  259. Any programs developed using Fastgraph/Light are 100% source code compatible
  260. with Fastgraph.  If you upgrade from Fastgraph/Light to Fastgraph, all you
  261. need to do is re-link your programs.  As with Fastgraph, we don't charge
  262. royalties for using Fastgraph/Light.  The Fastgraph/Light software license
  263. agreement allows you to distribute the external video driver without charge
  264. as part of your applications.
  265.  
  266. ------------------------------------------------------------------------------
  267.                                Fastgraph/Fonts
  268. ------------------------------------------------------------------------------
  269.  
  270. Fastgraph/Fonts lets you easily add bit-mapped character support to Fastgraph
  271. applications.  The product includes 40 font files in several point sizes.  A
  272. program can load up to 32 fonts simultaneously.  Font files shipped with
  273. Fastgraph/Fonts may be distributed without royalties in your applications.
  274.  
  275. The Fastgraph/Fonts manual includes a detailed description of the font file
  276. format, so you can create your own font files.  PCX templates and a MAKEFONT
  277. utility are included to assist in font file creation.
  278.  
  279. Fastgraph/Fonts requires any version of Fastgraph or Fastgraph/Light.
  280.  
  281. ------------------------------------------------------------------------------
  282.                                Fastgraph/Image
  283. ------------------------------------------------------------------------------
  284.  
  285. Fastgraph/Image is a Fastgraph add-on product that provides functions and
  286. utilities for managing libraries containing images and other files.  While
  287. the product was designed to manage and display PCX, PPR, and SPR images
  288. stored in a library file, Fastgraph/Image can be used with any type of file,
  289. including bit maps, text files, and Fastgraph/Fonts font files.
  290.  
  291. Functions are provided for opening a library, displaying an image file from
  292. a library, retrieving a file from a library, and closing a library.  The
  293. product also includes a library management utility that lets you add, delete,
  294. extract, and replace files in a library.
  295.  
  296. If an application uses several image files, Fastgraph/Image is especially
  297. valuable because it lets you distribute these images in a single file.  This
  298. provides added security because users can't take your image files and use
  299. them for other purposes (at least not easily).  Another benefit is that
  300. combining many images in a single file uses less disk space than distributing
  301. separate files for each image.
  302.  
  303. Fastgraph/Fonts requires any version of Fastgraph.
  304.  
  305. ------------------------------------------------------------------------------
  306.                              Ordering Information
  307. ------------------------------------------------------------------------------
  308.  
  309. The Fastgraph family of products represents a high-performance, comprehensive
  310. development system for graphics programmers.  For more information about any
  311. of our products, please call, write, or FAX.  You can download evaluation
  312. versions and product demos from our technical support BBS at (702) 796-7134.
  313.  
  314. We accept Visa, MasterCard, and COD (extra charge for COD orders).  Purchase
  315. orders are welcome from most companies, schools, and government agencies.
  316.  
  317. Site licenses are available for all products.  Please call, write, or FAX for
  318. specific details.
  319.  
  320. For your convenience, the order form below appears by itself in the ORDER.FRM
  321. file.
  322.  
  323. Order from:                                              Voice: (702) 735-1980
  324. Ted Gruber Software                                        FAX: (702) 735-4603
  325. PO Box 13408                                               BBS: (702) 796-7134
  326. Las Vegas, NV  89112                                       CIS:     72000,1642
  327.  
  328. Name:    _____________________________________________________________________
  329.  
  330. Company: _____________________________________________________________________
  331.  
  332. Address: _____________________________________________________________________
  333.  
  334. City:    _____________________________________  State: ________  Zip: ________
  335.  
  336. Country: _____________________________________  Phone: _______________________
  337.  
  338. +=====+=========================================+=======+============+=======+
  339. |     |                                         | Price |  Shipping  |       |
  340. | Qty |            Product Description          | Each  | Code  Cost | Total |
  341. +=====+=========================================+=======+=====+======+=======+
  342. |     | Fastgraph graphics library              | $169  |  1  |      |       |
  343. +-----+-----------------------------------------+-------+-----+------+-------+
  344. |     | Fastgraph/Light with on-line manuals    |  $49  |  2  |      |       |
  345. +-----+-----------------------------------------+-------+-----+------+-------+
  346. |     | Fastgraph/Light with printed manuals    |  $74  |  1  |      |       |
  347. +-----+-----------------------------------------+-------+-----+------+-------+
  348. |     | Fastgraph/Fonts bit-mapped font support |  $49  |  2  |      |       |
  349. |     | (requires Fastgraph or Fastgraph/Light) |       |     |      |       |
  350. +-----+-----------------------------------------+-------+-----+------+-------+
  351. |     | Fastgraph/Image image management library|  $49  |  2  |      |       |
  352. |     | (requires Fastgraph)                    |       |     |      |       |
  353. +-----+-----------------------------------------+-------+-----+------+-------+
  354. |     | FG/Fonts and FG/Image bundle            |  $88  |  2  |      |       |
  355. +-----+-----------------------------------------+-------+-----+------+-------+
  356. |     | Graphics Power Pack                     | $249  |  1  |      |       |
  357. |     | Fastgraph, FG/Fonts, and FG/Image       |       |     |      |       |
  358. +=====+=========================================+=======+=====+======+=======+
  359.                                                            Subtotal  |       |
  360. *********************************                                    +=======+
  361. *                               *    Nevada residents add sales tax  |       |
  362. * Shipping charges per product: *                                    +=======+
  363. *                               *     COD orders (U.S. only) add $4  |       |
  364. *     Code 1         Code 2     *                                    +=======+
  365. *   ----------     ----------   *                             Total  |       |
  366. *   U.S.    $5     U.S.    $3   *                                    +=======+
  367. *   Canada $12     Canada  $3   *    Specify disk format:
  368. *   Other  $39     Other   $6   *
  369. *                               *       [ ]  3.5-inch    [ ]  5.25-inch
  370. *********************************
  371.                                      Method of payment:
  372.  
  373.                                         [ ] payment enclosed
  374.                                         [ ] Visa or MasterCard
  375.                                         [ ] COD
  376.                                         [ ] purchase order # _________________
  377. For credit card orders only:
  378.  
  379. Card number: ____________________________________  Expiration date: __________
  380.  
  381. Signature:   _________________________________________________________________
  382.