📄 future.htm
字号:
<html>
<title>Future.Library help file - by Future Software</title>
<body LINK=#409FFF VLINK=#409FFF BGCOLOR=#000040 topmargin=0 leftmargin=0 text=#FFFFFF>
<FONT FACE=Arial SIZE=6 COLOR=#004080><B>Future.Library</FONT></B><BR>
<small><font color=#409FFF face=Arial>Copyright © 1999, Future Software. Visit our homepage at <B><A HREF=http://www.qb45.com style="text-decoration: none">http://www.qb45.com</A></B>.<BR>
Created by <B><A HREF=mailto:ms@Cool.dk style="text-decoration: none">Michael Rye Sorensen</A></B> and <B><A HREF=mailto:Webmaster@Qb45.com style="text-decoration: none">Jorden Chamid</B></A>.
</font>
<p>
<font color=#FFBF00 face=Arial><B><big>SVGA Related</B></big></font>
<ul>
<FONT FACE=Arial>
<B><A HREF=#screenmodes style="text-decoration: none">Setting the screenmode</B></A><BR>
<B><A HREF=#paging style="text-decoration: none">Paging</B></A><BR>
<B><A HREF=#printtext style="text-decoration: none">Printing text to the screen</B></A><BR>
<B><A HREF=#graphical style="text-decoration: none">Graphical (draw) functions</B></A><BR>
<B><A HREF=#pictures style="text-decoration: none">Storing/drawing pictures</B></A><BR>
<B><A HREF=#loadpictures style="text-decoration: none">Loading pictures</B></A><BR>
<B><A HREF=#scrolling style="text-decoration: none">Scrolling</B></A><BR>
</ul>
<font color=#FFBF00 face=Arial><B><big>NON-SVGA</B></big></font>
<ul>
<FONT FACE=Arial>
<B><A HREF=#pictures2 style="text-decoration: none">Saving/loading pictures</B></A><BR>
<B><A HREF=#font style="text-decoration: none">A font that doesn't erase the background</B></A><BR>
</UL>
<font color=#FFBF00 face=Arial><B><big>WAVE</B></big></font>
<ul>
<FONT FACE=Arial>
<B><A HREF=#wave style="text-decoration: none">Loading a WAVE file</B></A><BR>
</UL>
<font color=#FFBF00 face=Arial><B><big>Mouse</B></big></font>
<ul>
<FONT FACE=Arial>
<B><A HREF=#mousesvga style="text-decoration: none">Mouse support in SVGA</B></A><BR>
<B><A HREF=#mouse style="text-decoration: none">Mouse support in normal QB screens</B></A><BR>
</ul>
<font color=#FFBF00 face=Arial><B><big>Other</B></big></font>
<ul>
<FONT FACE=Arial>
<B><A HREF=#ems style="text-decoration: none">EMS support</B></A><BR>
<B><A HREF=#palette style="text-decoration: none">Changing Palette</B></A><BR>
<B><A HREF=#keyboard style="text-decoration: none">Keyboard functions</B></A><BR>
<B><A HREF=#joystick style="text-decoration: none">Joystick functions</B></A><BR>
<B><A HREF=#effects style="text-decoration: none">Two graphical effects</B></A><BR>
<B><A HREF=#timer2 style="text-decoration: none">Timer</B></A><BR>
<B><A HREF=#how2use style="text-decoration: none">How to use Future.Library in your program</B></A><BR>
</UL>
<hr align=left width=90% noshade size=1 color=#FFBF00>
<A NAME=screenmodes>
<font color=#FFBF00 face=Arial><B><big>Setting the screenmode</B></big></font>
<FONT FACE=Arial SIZE=2>
You set a mode by calling Set####x#### where ####x#### is the resolution you want. (i.e. to set a 320x200 resolution you write 'Set320x200') Before exiting you program it is a good idea to call 'ResetScreen', if you don't you
will stay in the selected mode after the program stops. This happens because the library don't know when you want to exit the program, so it can't change back to text mode automatically. By calling 'ResetScreen' the screen is set into text mode also known as SCREEN 0. You must call 'ResetScreen' for this to work, do not call SCREEN 0 directly.<P>
SUBs/FUNCTIONs:<BR>
SUB Set320x200<BR>
SUB Set512x384<BR>
SUB Set640x400<BR>
SUB Set640x480<BR>
SUB Set800x600<BR>
SUB Set1024x768<BR>
SUB Set1152x864<BR>
SUB Set1280x1024<BR>
SUB Set1600x1200<BR>
SUB ReSetScreen<BR>
<hr align=left width=90% noshade size=1 color=#FFBF00>
<A NAME=paging>
<font color=#FFBF00 face=Arial><B><big>Paging</B></big></font>
<FONT FACE=Arial SIZE=2>
If enough video memory is available and paging is supported by video hardware, it is possible to have more then one screen page to work in. Paging is the solution to flicker free animation and by flipping between two pages, while drawing on the page not being displayed, you will remove the flicker. The number of available pages is returned by calling 'Pages' (i.e. NumberOfPages% = Pages%) if 'Pages' return zero paging is not supported in that mode. <BR>
Viewing a page is done by calling 'ViewPage' (i.e. ViewPage pagenumber). Setting the active page for drawing is done by calling 'SetPage'
(i.e. SetPage pagenumber). When setting a screen mode the active page is set to the first page, page zero.<P>
NOTE:<BR>
Normally only one page is available in 320x200, but the library uses a non standard way of getting multiple pages in that mode. Therefor we can not guarantee that it is supported on all cards.<P>
SUBs/FUNCTIONs:<BR>
FUNCTION Pages<BR>
SUB SetPage (P)<BR>
SUB ViewPage (P)<BR>
<hr align=left width=90% noshade size=1 color=#FFBF00>
<A NAME=printtext>
<font color=#FFBF00 face=Arial><B><big>Printing text to the screen</B></big></font>
<FONT FACE=Arial SIZE=2>
You can use 'Future.PRINT' to print text in any of the supported screen modes (i.e. Future.PRINT X, Y, Hello World, F, B) The last two parameters is the foreground and background color to use. If the color is set to -1 it will be transparent (no color will be used). The first two parameters is a X,Y offset in pixels, from the upper left corner, from where the text is to be printed on the screen. In 320x200 the font size will be 8x8 by default, in any other mode the size will be 8x16 in size. After setting a mode you can change the font size by calling 'Setfont' (i.e. Setfont x) where x is 0 for 8x8 font size, 1 for 8x16 font size and 2 for 8x14 font size.<P>
SUBs/FUNCTIONs:<BR>
SUB Future.PRINT (X, Y, t$, F, B)<BR>
SUB SetFont (Mode)<BR>
<hr align=left width=90% noshade size=1 color=#FFBF00>
<A NAME=graphical>
<font color=#FFBF00 face=Arial><B><big>Graphical (draw) functions</B></big></font>
<FONT FACE=Arial SIZE=2>
A set of basic drawing routines was added to the library for easy generating of graphic.<P>
SUBs/FUNCTIONs:<BR>
SUB Future.PSET (X, Y, C)<BR>
SUB Future.LINE (X, Y, X1, Y1, C, BitScan)<BR>
SUB Future.FILLCIRCLE (CX, CY, R, C)<BR>
SUB Future.CIRCLE (CX, CY, R, C)<BR>
SUB Future.CLS (C)<BR>
SUB Future.FILLBOX (X, Y, X1, Y1, C)<BR>
SUB Future.BOX (X, Y, X1, Y1, C)<BR>
FUNCTION Future.POINT (X, Y)<BR>
SUB Future.HLINE (Y, X1, X2, C)<P>
NOTE:<BR>
When using the Future.LINE routine, note that to draw a normal line the 'BitScan' parameter must be set to -1.<BR>
<hr align=left width=90% noshade size=1 color=#FFBF00>
<A NAME=pictures>
<font color=#FFBF00 face=Arial><B><big>Storing/drawing pictures</B></big></font>
<FONT FACE=Arial SIZE=2>
By using Future.PUT you can easily draw a picture on screen, you just need to define an array to hold the picture information. The array can be of any type as no type checking is done when it is passed to the routine. The first four bytes in the array will hold the width and height of the picture. <BR>
Future.GET gets a picture from the screen and stores it in the array passed to the routine. A color filter is added to the PUT routine, so it is possible to filter out a color that you do not want to be drawn. To set the color being filtered out call SetMaskColor C where C is the color you want to filter out. If C is negative the filter is disabled. It is also possible to save a screen page to a file. By calling Future.Snapshot the active screen page will be saved as a bmp file on disk.<P>
NOTE:<BR>
The GET routine does not check for upper and lower boundary of the array, so make sure you allocate enough memory to hold all the picture information plus four extra bytes.<P>
SUBs/FUNCTIONs:<BR>
SUB Future.GET (X, Y, X1, Y1, Array())<BR>
SUB Future.PUT (X, Y, Array())<BR>
SUB SetMaskColor (C)<BR>
SUB Future.Snapshot (filename)<BR>
<hr align=left width=90% noshade size=1 color=#FFBF00>
<A NAME=loadpictures>
<font color=#FFBF00 face=Arial><B><big>Loading pictures</B></big></font>
<FONT FACE=Arial SIZE=2>
You can now load the default image-formats into your SVGA screen, with just one line of code!<P>
SUBs/FUNCTIONs:<BR>
SUB Future.LoadGIF (Filename, XRes, YRes)<BR>
SUB Future.LoadBMP (Filename, Xpos, Ypos)<BR>
SUB Future.LoadPCX (Filename, Xpos, Ypos)<BR>
<hr align=left width=90% noshade size=1 color=#FFBF00>
<A NAME=wave>
<font color=#FFBF00 face=Arial><B><big>Loading a WAVE file</B></big></font>
<FONT FACE=Arial SIZE=2>
We have even added some great functions for adding sound to your program(s)! In our tests, we have loaded a 9 MB WAVE file and it played great!<BR>
SUBs/FUNCTIONs:<BR>
FUNCTION WavDone ()<BR>
SUB LoadWAV (Filename)<BR>
SUB StopAndReset ()<BR>
<hr align=left width=90% noshade size=1 color=#FFBF00>
<A NAME=mousesvga>
<font color=#FFBF00 face=Arial><B><big>Mouse support</B></big></font>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -