home *** CD-ROM | disk | FTP | other *** search
/ C++ Games Programming / CPPGAMES.ISO / fgl / fglight / fglight.arj / WHATS.NEW < prev   
Text File  |  1995-02-06  |  18KB  |  342 lines

  1.  
  2.                                 Release Notes
  3.  
  4.                              Fastgraph (tm) V4.0
  5.  
  6.  
  7.  
  8.                              Ted Gruber Software
  9.                                  PO Box 13408
  10.                              Las Vegas, NV  89112
  11.  
  12.                              (702) 735-1980 voice
  13.                               (702) 735-4603 FAX
  14.                               (702) 796-7134 BBS
  15.                                 72000,1642 CIS
  16.  
  17.                  Copyright (c) 1989-1995 Ted Gruber Software.
  18.                              All Rights Reserved.
  19.  
  20.  
  21. ------------------------------------------------------------------------------
  22.                                  Introduction
  23. ------------------------------------------------------------------------------
  24.  
  25. The Fastgraph 4.0 release notes describe the new features added in Fastgraph
  26. 4.0. The release notes will be of interest to customers who are already
  27. familiar with Fastgraph so they can get an overview of the new version. Among
  28. the many new features in Fastgraph 4.0 are:
  29.  
  30. * 16-bit protected mode libraries
  31. * 32-bit protected mode libraries
  32. * Virtual buffers
  33. * Support for Autodesk Animator FLI/FLC files
  34. * Bitmap scaling and shearing capabilities
  35. * Split screen support
  36. * Viewports
  37. * Support for new SVGA chipsets
  38. * Additional PCX and GIF support routines
  39. * Total of 56 new Fastgraph routines
  40. * Support for additional compilers
  41.  
  42. The release notes provide an overview of most of these new features. For
  43. details, refer to the Fastgraph User's Guide and Reference Manual.
  44.  
  45. Please be sure to read the last two sections of this document, which discuss
  46. important compatibility considerations when migrating Fastgraph 2.x and 3.x
  47. programs to version 4.0.
  48.  
  49. ------------------------------------------------------------------------------
  50.                    Summary of New Routines in Fastgraph 4.0
  51. ------------------------------------------------------------------------------
  52.  
  53. The following routines are new to Fastgraph 4.0. Please see the Fastgraph
  54. Reference Manual for full descriptions, including their parameters, return
  55. values, and restrictions.
  56.  
  57. FG_CLIPMAP   Version of FG_DRAWMAP that performs clipping
  58. FG_COLORS    Return number of colors available in the current video mode
  59. FG_FINDPAGE  Find an available page number for virtual/logical pages
  60. FG_FLICDONE  Close an FLI or FLC file
  61. FG_FLICHEAD  Read an FLI or FLC file header
  62. FG_FLICMODE  Determine optimal video mode for an FLI or FLC file
  63. FG_FLICOPEN  Open an FLI or FLC file
  64. FG_FLICPLAY  Play one or more frames from an FLI or FLC file
  65. FG_FLICSIZE  Return FLI or FLC image dimensions
  66. FG_FLICSKIP  Advance one or more frames in an FLI or FLC file
  67. FG_GETBANKS  Return current SVGA read and write bank numbers
  68. FG_GETCLIP   Return current clipping limits
  69. FG_GETVIEW   Return current viewport extremes
  70. FG_GETXBOX   Return FG_BOX left and right edge width
  71. FG_GETXJUST  Return FG_PRINT and FG_PRINTC horizontal justification setting
  72. FG_GETYBOX   Return FG_BOX top and bottom edge width
  73. FG_GETYJUST  Return FG_PRINT and FG_PRINTC vertical justification setting
  74. FG_GIFHEAD   Read a GIF file global header and first local header
  75. FG_GIFMODE   Determine optimal video mode for a GIF file
  76. FG_GIFPAL    Retrieve palette information from a GIF file
  77. FG_GIFRANGE  Return GIF image dimensions
  78. FG_INITPM    Initialize Fastgraph's protected mode kernel
  79. FG_INVERT    Invert orientation of a bitmapped image array
  80. FG_KBLAST    Return scan code of most recent keypress
  81. FG_KBRESET   Reset Fastgraph's low-level keyboard handler
  82. FG_LOADPCX   Load a PCX image into a virtual buffer
  83. FG_MOUSE256  Define 256-color mouse cursor
  84. FG_PACK      Translate "one pixel per byte" bitmap to mode-specific format
  85. FG_PCXPAL    Retrieve palette information from a PCX file
  86. FG_PCXRANGE  Return PCX image dimensions
  87. FG_POLYEDGE  Specify FG_POLYFILL right and bottom edge inclusion
  88. FG_PRINTC    Version of FG_PRINT that performs clipping
  89. FG_SCALE     Scale a bitmapped image
  90. FG_SETBANKS  Define SVGA read and write bank numbers
  91. FG_SETVIEW   Define viewport extremes and position
  92. FG_SHEAR     Shear a bitmapped image
  93. FG_SHOWFLIC  Play an FLI or FLC file
  94. FG_SPLIT     Enable or disable a split screen environment
  95. FG_TEXTC     Version of FG_TEXT that supports clipping
  96. FG_UNPACK    Translate mode-specific bitmap to "one pixel per byte" format
  97. FG_VBADDR    Return address of a virtual buffer
  98. FG_VBALLOC   Create a virtual buffer (allocate memory internally)
  99. FG_VBCLOSE   Close the active virtual buffer
  100. FG_VBCOPY    Copy rectangular region from one virtual buffer to another
  101. FG_VBCUT     Copy rectangular region from active video page to virtual buffer
  102. FG_VBDEFINE  Create a virtual buffer (from previously allocated memory)
  103. FG_VBFREE    Release virtual buffer memory allocated with FG_VBALLOC
  104. FG_VBHANDLE  Return handle of the active virtual buffer
  105. FG_VBINIT    Initialize Fastgraph's virtual buffer environment
  106. FG_VBOPEN    Make an existing virtual buffer the active virtual buffer
  107. FG_VBPASTE   Copy rectangular region from virtual buffer to active video page
  108. FG_VBTCXFER  Version of FG_VBPASTE that supports transparent colors
  109. FG_VBUNDEF   Release a virtual buffer handle
  110. FG_VGASTATE  Save or restore the internal VGA state
  111. FG_XVIEW     Translate horizontal viewport coordinate to screen space
  112. FG_YVIEW     Translate vertical viewport coordinate to screen space
  113.  
  114. Fastgraph/Light 4.0 does not include the new GIF support routines (FG_GIFHEAD,
  115. FG_GIFMODE, FG_GIFPAL, and FG_GIFRANGE). Further, the new FG_INITPM routine is
  116. present in the Fastgraph/Light libraries but is not meaningful.
  117.  
  118. ------------------------------------------------------------------------------
  119.                            Protected Mode Libraries
  120. ------------------------------------------------------------------------------
  121.  
  122. Fastgraph 4.0 includes protected mode libraries for most popular DOS extenders
  123. and protected mode compilers. The protected mode libraries include a new
  124. routine, FG_INITPM, to set up features specific to each supported DOS
  125. extender. It must be called before any other Fastgraph routine when building
  126. protected mode executables. Failure to do this will result in a protection
  127. fault and termination of your program (usually before it sets the video mode).
  128. Note that in many cases, FG_INITPM resides in an extender-specific library
  129. such as FG16PHAR.LIB or FG32DPMI.LIB that must be specified when linking your
  130. program.
  131.  
  132. To build an EXE file from the 16-bit protected mode libraries, you must have
  133. a compiler capable of generating 80286 protected mode instructions, as well
  134. as a 16-bit DOS extender (Borland Pascal 7 does not require a separate DOS
  135. extender). Fastgraph 4.0 supports the following 16-bit compilers and DOS
  136. extenders:
  137.  
  138.         Borland C++ (version 3.0 or later)
  139.         Borland Pascal (version 7.0 or later)
  140.         Microsoft C/C++ (version 6.0 or later)
  141.         Microsoft Visual C++ (version 1.0 or later)
  142.  
  143.         Borland PowerPack for DOS
  144.         Phar Lap 286|Dos-Extender SDK
  145.         Phar Lap 286|Dos-Extender Lite
  146.         Rational Systems DOS/16M
  147.  
  148. To build an EXE file from the 32-bit protected mode libraries, you must have a
  149. compiler capable of generating 80386 protected mode instructions, as well as a
  150. 32-bit DOS extender. Fastgraph 4.0 supports the following 32-bit compilers and
  151. DOS extenders:
  152.  
  153.         Borland C++ (version 4.02 or later)
  154.         MetaWare High C/C++ (version 3.0 or later)
  155.         Microsoft Visual C++ 32-bit Edition (version 1.0 or later)
  156.         WATCOM C/C++ 32 (version 9.5 or later)
  157.         WATCOM C32 for DOS
  158.         Microsoft FORTRAN PowerStation (version 1.0 or later)
  159.  
  160.         Borland PowerPack for DOS
  161.         DOSXMSF (subset of Phar Lap extender supplied with MSF PowerStation)
  162.         Phar Lap TNT Dos-Extender SDK (formerly 386|Dos-Extender SDK)
  163.         Phar Lap TNT Dos-Extender Lite
  164.         Rational Systems DOS/4G
  165.         Rational Systems DOS/4GW (supplied with WATCOM C/C++ 32)
  166.         Rational Systems DOS/4GW Professional
  167.  
  168. See Chapter 1 of the Fastgraph User's Guide for information about building
  169. protected mode programs with each supported compiler and DOS extender. For
  170. other important details regarding conversion of real mode Fastgraph programs
  171. to protected mode, please read Appendix G of the Fastgraph User's Guide.
  172.  
  173. ------------------------------------------------------------------------------
  174.                                 Virtual Buffers
  175. ------------------------------------------------------------------------------
  176.  
  177. Virtual buffers are blocks of conventional memory that you can treat as video
  178. memory. They are much more general than virtual pages, as they are supported
  179. in all graphics video modes and can be smaller or larger than the actual page
  180. size. An application may have up to 32 virtual buffers open simultaneously.
  181.  
  182. Virtual buffers are supported in both real and protected mode, but the memory
  183. requirements for creating large virtual buffers (especially in SVGA graphics
  184. modes) makes protected mode the best platform for virtual buffers. Real mode
  185. virtual buffers must reside in conventional memory. A future version of
  186. Fastgraph may add EMS/XMS virtual buffer support.
  187.  
  188. See pages 185-194 in Chapter 8 of the Fastgraph User's Guide for additional
  189. information about virtual buffers.
  190.  
  191. ------------------------------------------------------------------------------
  192.                                FLI and FLC Files
  193. ------------------------------------------------------------------------------
  194.  
  195. FLI and FLC files (collectively called "flic files") contain sequences of
  196. image frames that can be displayed in rapid succession to achieve the illusion
  197. of movement. FLI files are produced by Autodesk Animator and always have a
  198. 320x200 resolution, while FLC files are produced by Autodesk Animator Pro and
  199. can have any resolution. Fastgraph's flic file routines work with both FLI and
  200. FLC files, but they are restricted to 256-color graphics modes because flic
  201. files always contain 256-color images.
  202.  
  203. Fastgraph 4.0 includes both high-level and low-level routines for working with
  204. flic files. See pages 208-212 in Chapter 9 of the Fastgraph User's Guide for
  205. additional information about Fastgraph's flic file support.
  206.  
  207. ------------------------------------------------------------------------------
  208.                           Bitmap Scaling and Shearing
  209. ------------------------------------------------------------------------------
  210.  
  211. Fastgraph 4.0 includes a new routine, FG_SCALE, for horizontal and vertical
  212. scaling of bitmapped images. FG_SCALE expects a source bitmap stored in the
  213. "one pixel per byte" format of Fastgraph's 256-color modes, and it returns an
  214. expanded or reduced bitmap in the same format. To scale images in graphics
  215. modes with fewer than 256 colors, you must first use the FG_UNPACK routine to
  216. convert the bitmap to the format expected by FG_SCALE, perform the scaling,
  217. and finally use FG_PACK to convert the scaled image back to the mode-specific
  218. format. Note that because Fastgraph's virtual buffers also use the one pixel
  219. per byte format, you can also use FG_SCALE to scale images stored in virtual
  220. buffers.
  221.  
  222. The new FG_SHEAR routine shears bitmapped images. Shearing can be thought of
  223. as anchoring one corner of a rectangular region and stretching the opposite
  224. corner horizontally or vertically. For example, bitmaps containing text or
  225. other characters could be sheared horizontally to the right for an italic
  226. effect. A sheared image will always be larger than the original image, and it
  227. will contain empty triangular areas at its corners. The empty areas will be
  228. filled with color 0 pixels, meaning they will be transparent when you display
  229. a sheared image with FG_DRWIMAGE or related routines. Like FG_SCALE, FG_SHEAR
  230. expects bitmaps in the "one pixel per byte" format and can likewise be used
  231. with images stored in virtual buffers.
  232.  
  233. See pages 259-265 in Chapter 10 of the Fastgraph User's Guide for additional
  234. information about bitmap scaling and shearing.
  235.  
  236. ------------------------------------------------------------------------------
  237.                              Split Screen Support
  238. ------------------------------------------------------------------------------
  239.  
  240. Fastgraph 4.0 provides split screen support for EGA, VGA, and XVGA graphics
  241. modes (modes 13 through 23) through the FG_SPLIT routine. When a split screen
  242. is enabled, the top portion of the screen (rows 0 through n-1, where n is the
  243. pixel row at which the split screen takes effect) will contain a subset of the
  244. visual video page. The bottom portion (starting at row n) will contain the
  245. first maxy-n+1 rows of video page 0. A split screen environment is useful for
  246. maintaining a static image, such as a scoreboard or status box, at the bottom
  247. of the screen while scrolling the top portion.
  248.  
  249. See pages 320-322 in Chapter 13 of the Fastgraph User's Guide for additional
  250. information about Fastgraph's split screen support.
  251.  
  252. ------------------------------------------------------------------------------
  253.                                    Viewports
  254. ------------------------------------------------------------------------------
  255.  
  256. Viewports provide an alternate integer-based coordinate system for referencing
  257. pixels in video memory or virtual buffers. Fastgraph 4.0 includes routines to
  258. create a viewport, return the viewport limits, and scale viewport coordinates.
  259.  
  260. See pages 67-69 in Chapter 4 of the Fastgraph User's Guide for more details
  261. about viewports.
  262.  
  263. ------------------------------------------------------------------------------
  264.                          Support for New SVGA Chipsets
  265. ------------------------------------------------------------------------------
  266.  
  267. Fastgraph 4.0 adds support for these SVGA chipsets:
  268.  
  269.      Avance Logic 2000 series
  270.      Cirrus Logic 6400 series
  271.      NCR 77C22/77C32
  272.      Oak OTI-077
  273.      Oak OTI-087
  274.  
  275. ------------------------------------------------------------------------------
  276.                           New Turbo Pascal Unit Files
  277. ------------------------------------------------------------------------------
  278.  
  279. The Fastgraph 4.0 Pascal distribution includes two new unit files, FGFLIC and
  280. FGVB, containing the new FLI/FLC and virtual buffer routines. Because of size
  281. constraints, it was necessary to move four routines (FG_DRAWMAP, FG_GETMAP,
  282. FG_PRINT, and FG_TEXT) from the Fastgraph 3.x FGMAIN unit file to the FGBITMAP
  283. unit in Fastgraph 4.0. Any Fastgraph program that uses these four routines
  284. must now include the FGBITMAP unit in its uses statement.
  285.  
  286. Real mode Fastgraph unit files use a TPU file extension; their protected mode
  287. counterparts use a TPP extension. For instance, FGMAIN.TPU is the real mode
  288. version of the FGMAIN unit, and FGMAIN.TPP is the protected mode version. If
  289. you install Fastgraph for Borland Pascal, the TPU and TPP files will be copied
  290. to your unit file directory. Installing Fastgraph for Turbo Pascal copies only
  291. the TPU files.
  292.  
  293. Refer to Appendix E of the Fastgraph User's Guide for a list of the Fastgraph
  294. routines in each Pascal unit file.
  295.  
  296. ------------------------------------------------------------------------------
  297.           Converting Applications from Fastgraph 3.x to Fastgraph 4.0
  298. ------------------------------------------------------------------------------
  299.  
  300. Real mode C/C++, BASIC, and FORTRAN applications written with Fastgraph 3.x
  301. should require no changes to link with Fastgraph 4.0.
  302.  
  303. As described in the previous section, real mode Pascal programs will need to
  304. add the FGBITMAP unit to their uses statement if they call the FG_DRAWMAP,
  305. FG_GETMAP, FG_PRINT, or FG_TEXT routines.
  306.  
  307. The issues involved in converting real mode Fastgraph 3.x programs to run in
  308. protected mode are addressed in Appendix G of the Fastgraph User's Guide.
  309.  
  310. ------------------------------------------------------------------------------
  311.           Converting Applications from Fastgraph 2.x to Fastgraph 4.0
  312. ------------------------------------------------------------------------------
  313.  
  314. Only two features in Fastgraph 2.x are not upwardly compatible with version
  315. 4.0. The first applies only to Borland Pascal and Turbo Pascal, while the
  316. second applies to all supported compilers.
  317.  
  318. In Fastgraph 2.x, all Fastgraph routines resided in the FGTP unit file. In
  319. Fastgraph 3.x and 4.0, the Fastgraph routines are split among several unit
  320. files. To convert a Pascal program from Fastgraph 2.x to Fastgraph 4.0, you
  321. must replace the FGTP unit reference with FGMAIN in the program's uses
  322. statement, and then add any other unit file names that contain other routines
  323. used in your program. Appendix E of the Fastgraph User's Guide lists the
  324. Fastgraph routines in each Pascal unit file.
  325.  
  326. The other change pertains to the FG_SHOWPCX routine introduced in Fastgraph
  327. 3.0, which replaces the FG_DISPPCX routine of earlier versions (the routine
  328. was renamed to avoid confusion with the pixel run display routines, which all
  329. have names of the form FG_DISPxxxx). PCX image positioning will generally not
  330. be an issue for full-screen PCX files because the PCX header typically defines
  331. their upper left corner at the screen origin, which is where you'd move to
  332. display a full-screen image anyway. However, if a PCX file is smaller than the
  333. screen resolution and you want to override the image positioning in the PCX
  334. header, you must define a new FG_SHOWPCX flags argument in which bit 1 is set.
  335. That is, the Fastgraph 2.x call FG_DISPPCX(filename,0) is equivalent to
  336. FG_SHOWPCX(filename,2). Similarly, FG_DISPPCX(filename,1) is equivalent to
  337. FG_SHOWPCX(filename,3). Note that C and C++ programmers can use the following
  338. preprocessor directive to make an old FG_DISPPCX call compatible with the new
  339. FG_SHOWPCX routine.
  340.  
  341.                   #define fg_disppcx(a,b) fg_showpcx(a,b|2)
  342.