Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : FXCOL.ZIP
Filename : FXCOLOR.DOC
²²²²² ² ² ²²²²² ²²²²² ² ²²²²² ²²²²²
² ² ² ² ² ² ² ² ² ² ²
²²² ² ² ² ² ² ² ² ²²²²²
² ² ² ² ² ² ² ² ² ² ²
² ² ² ²²²²² ²²²²² ²²²²² ²²²²² ² ²
User Reference
FXCOLOR DOCUMENTATION
Special Color Effects For The VGA System Using Clipper 5.01
Written by Jim Fowler
April 16, 1992
While recently developing an application in Clipper 5.01 for a client, I
was asked by the client why he was "stuck" with the sixteen basic
colors. After all, he had paid a lot of money for a first-class VGA
system, so he figured he should be receiving an application that took
advantage of the color capabilities of the VGA. I explained that a
text-based application is limited to 16 displayable colors by DOS, and
that Clipper only uses the "standard" colors. "I've seen other Clipper
applications and they use other than the 16 standard colors", he replied.
Thus began my search for a palette editing function for Clipper.
Several third-party libraries have such a function. However, I am no
longer in the mood to spend a couple of hundred dollars every time I
need a function.
SOAPBOX( ON )
Clipper 5.01 is the best development language I have used. It is also
the most expensive. I paid $500 to purchase Clipper 5.0 about a year
ago. Since, I have spent nearly $1,600 for third-party products to
enhance Clipper. I fear the day when the next version of Clipper is
released. I'll probably have to come up with a couple hundred dollars
to upgrade Clipper, and maybe a thousand dollars to upgrade the
third-party libraries.
My #1 complaint with Clipper is that it is not a full-development
product. Clipper provides a "base" of functions, but not the functions
needed to really make your product shine. You have to get these from
third-party developers. In my opinion, if all you use is Clipper's
"base" functions, you have nothing more than a better way of executing
dBase code. In addition, Clipper provides no editing environment
(PE.EXE is a joke), and a very poor database utility (DBU.EXE). The
debugger, CLD.EXE, is an improvement, but still sadly lacking. Ever
tried "auto-stepping" through the code? And where's the mouse
interface?
A GREAT majority of my clients still perceive Clipper as a dBase
compiler. Nantucket has apparently done little (or have been
ineffective) in changing this perception. Now that Borland owns dBase,
and with their reputation for programming languages, a dBase with a
dBase compiler is surely at hand. I wonder if most of those clients
will still believe they need Clipper.
SOAPBOX( OFF )
Not wanting to spend more money on, yet, another library just to get a
function, I began searching for something in the public domain. I
didn't find a function specifically for Clipper, but I did find a great
little program written by Chris Dunford. Unfortunately, it was written
in assembly and my knowledge of assembly is limited. It appeared quite
a few modifications would be required to make it work with Clipper.
Nevertheless, having more pride and principles than money, I thought I'd
give it a try. FXCOLOR is the result.
CREDITS
-------
Chris Dunford deserves credit for writing the code upon which FXCOLOR is
based. Without his code to go by, and his methodology, I doubt I could
have written FXCOLOR. Although a great majority of the code in
FXCOLOR.ASM was written by me, portions of the code were taken directly
from Chris's program. The document VGA.DOC was written by Chris and
edited by me for inclusion with this package. It is one of the better
explanations of the VGA and DOS color system I have seen.
Your comments, suggestions, and criticisms concerning FXCOLOR are
welcome and should be addressed to me -- Jim Fowler, CompuServe ID#
73340,3425.
I am releasing FXCOLOR to the public domain for reasons stated in my
soapbox diatribe. Maybe it will save a few dollars for someone else
who, like me, doesn't want to continue to spend hundreds of dollars just
to produce a quality program.
DISCLAIMER & DISTRIBUTION RIGHTS
--------------------------------
Neither Jim Fowler, or Chris Dunford, make any guarantees of any kind
about this product. By using it, you agree that they will not be held
liable for any damage caused by the use of this product. USE IT AT
YOUR OWN RISK. If your screen displays some wierd colors or patterns,
or your computer sizzles, or for any other catastrophe, it is YOUR
problem, not ours.
This product is released to the public domain. It may be copied and
distributed for free. You may not charge any fee for its distribution
other than a small charge for postage and diskette(s). You may use this
product in the development of applications without fee or royalty to the
author. You MAY NOT use this product in the development of commercial
libraries for resale without the permission of the author.
If you distribute this product, you must include all of the following
files, unedited:
README.1ST -> Text file containing instructions and latest info
MAKEDEMO.BAT -> Batch file for compiling the demo program
FXDEMO.PRG -> Source code for the demo program
FXCOLOR.ASM -> The source code for this product
FXCOLOR.OBJ -> The compiled object file
FXCOLOR.DOC -> Documentation of the product (this file)
VGA.DOC -> Document file describing the VGA color system
The file VGA.DOC is an edited version of a copyrighted document by Chris
Dunford. The contents of that file may not be republished without the
written permission of Jim Fowler and Chris Dunford. The original
document by Chris Dunford can be obtained by contacting him.
USING FXCOLOR WITH CLIPPER
--------------------------
FXCOLOR is designed for Clipper version 5.01. It has not been tested
with other versions and may or may not be compatible. It requires a VGA
system and will not install itself unless a VGA is detected. It is
designed to work with color systems. The effects on a non-color system
has not been tested.
FXCOLOR must be installed before it can be used. The command
fx_Enable() is used to install FXCOLOR. None of the commands (except
fx_IsFxOn() and fx_IsVGA() - see docs for those commands) will perform
any action and will probably return meaningless values if called while
FXCOLOR is NOT installed.
FXCOLOR must be uninstalled before exiting your application. The
command fx_Disable() is used to uninstall FXCOLOR. Although FXCOLOR
includes detection for program termination and will uninstall itself if
program termination is detected, this should not be relied upon. You
should use the fx_Disable() command.
When FXCOLOR is installed, it hooks the timer interrupt 1Ch and
interrupt 21h. These remain active until uninstalled. If your
application uses other intercept routines, you should be sure to nest
those routines. An example is below:
fx_Enable() <- FXCOLOR timer intercept is installed
OtherTimer( ON ) <- another timer intercept is installed
.... <- other application code
OtherTimer( OFF ) <- another timer intercept is uninstalled
fx_Disable() <- FXCOLOR timer intercept is uninstalled
Failure to nest intercept routines will undoubtedly cause you great
suffering.
FXCOLOR also disables the hardware blinking bit when installed and
re-enables it when uninstalled. When the hardware blinking bit is
disabled, high-intensity background colors are allowed. The Clipper
SetBlink() command performs the same function. You may use the
SetBlink() command while FXCOLOR is installed to set hardware blinking
ON or OFF. Remember though, if any high-intensity background colors are
currently displayed, they will revert to normal and the foreground text
will begin blinking.
With hardware blinking OFF, if you want to display a high-intensity
background color, you should use an asterisk "*" instead of a plus-sign
"+" for the background color in the CLIPPER color string:
"r/bg*" <- Ok
"r/bg+" <- Does not work
For FXCOLOR parameters however, you must use the plus-sign "+" to denote
high-intensity colors:
fx_Blink( "r", "bg+" ) <- Ok
fx_Blink( "r", "bg*" ) <- Does not work
CHANGING SCREEN MODES
---------------------
When your computer is booted, it defaults to a "mode 0" which configures
the video to 4 palettes of 64 colors each for text mode. FXCOLOR
changes to "mode 1" which configures the video to 16 palettes of 16
colors each for text mode (see VGA.DOC for more info). If you change
screen modes during your application (i.e. say from a 25 row screen to a
43 row screen), the video is reconfigured to "mode 0". This would
result in some odd results for your video. Therefore, when changing
screen modes, it is recommended that you uninstall FXCOLOR (with
fx_Disable()) and then reinstall (with fx_Enable()) after you have
changed screen modes. Unfortunately, all of your color definitions will
be lost and will have to be redefined.
ATTRIBUTES, PALETTES, AND RGB VALUES
------------------------------------
When using FXCOLOR, you should think in terms of attributes rather than
colors. Normally, they are the same thing. However, if you change
attribute 1, blue, to the color orange, it no longer has anything to do
with blue. Unfortunately, in Clipper, you must still refer to this
attribute by the color symbol "b". It would be much better if you could
refer to it by attribute number rather than color symbol. In that were
the case, if you preferred the symbols, you could always use
pre-processor #DEFINE's. To maintain consistentcy with Clipper however,
FXCOLOR will only accept the color symbols. To do otherwise would just
cause more confusion on top of the confusion you will encounter trying
to remember what color symbol produces what color you've defined.
As mentioned earlier, FXCOLOR uses 16 palettes of 16 attributes each.
The palettes are referred to by the values 0 to 15. Palette 0 is the
primary palette used to determine the RGB definitions of attributes
for those commands creating special effects. For example, the command
fx_Fade( "g" , "b" ) means to fade the RGB values of attribute 2 ("g")
to the RGB values of attribute 1 ("b"). The RGB values for both
attributes are taken from palette 0. Thus, the RGB value of attribute
2, as defined in palette 0, will fade to the RGB value of attribute 1,
as defined in palette 0.
RGB values are the RED, GREEN, and BLUE values that, when mixed in
different proportions, produces colors on your monitor (refer to VGA.DOC
for more info). RGB values are specified in the range 0 to 63 and refer
to the intensity of a particular primary color.
CONVENTIONS USED
----------------
Arguments to commands which are enclosed in brackets "[]" are optional
to the command.
All variable argument names are prefaced by a lower case letter. This
letter denotes the type of variable:
"c" denotes a character string
"n" denotes a numeric value
"l" denotes a logical (.T./.F.) value
fx_Attr()
---------
Gets/sets the RGB values of a single attribute for all palettes.
Syntax:
fx_Attr(
Arguments:
whose RGB values are to be get/set. The attribute symbol must be
one of the following color symbols supported by Clipper:
"N", "B", "G", "BG", "R", "RB", "GR", "W", "N+", "B+", "G+", "BG+",
"R+", "RB+", "GR+", or "W+". (Case is not important.)
containing an ASCII value representing the RGB values of the
attribute for all 16 palettes. The first three bytes represent the
RED/GREEN/BLUE (RGB) values for the attribute in palette 0, the
fourth through sixth bytes represent palette 1, and so forth. In
chart form:
Palette 0 Palette 15
Red Green Blue Red Green Blue
Byte # -> 1 2 3 ..... 46 47 48
Returns:
Returns the current RGB settings for the attribute in a 48-byte
character string where each byte of the string is an ASCII value
representing the RGB values of the attribute across each of the 16
palettes. If an undefined attribute symbol is specified or the
string is not exactly 48 bytes in length (when specified) or an
error occurs, an empty string is returned.
Description:
fx_Attr() is a function that allows you to get or set the RGB
values of an attribute for all 16 palettes. When
specified, it sets the new RGB values contained in the character
string for
to 63, that particular RGB value is skipped.
Examples:
// Replaces the RGB values for attribute "g" in palette 4
// with the RGB values for high-intensity red.
IF .NOT. EMPTY( cColor := fx_Attr( "g" ) )
cColor := STUFF( cColor, 13, 3, CHR(63) + CHR(0) + CHR(0) )
fx_Attr( "g", cColor )
ENDIF
// Makes the attribute "w" equal to the attribute "n"
// in all palettes.
cColor := fx_Attr( "n" )
fx_Attr( "w", cColor )
See Also:
fx_AttrAll(), fx_PalAll(), fx_Palette()
fx_AttrAll()
------------
Gets/sets the RGB values of all attributes for all palettes.
Syntax:
fx_AttrAll( [
Arguments:
containing an ASCII value representing the RGB values for each
attribute for all palettes. The first forty-eight bytes represent
the RED/GREEN/BLUE (RGB) values for attribute 0 for all palettes,
the next 48 bytes represent the next attribute, and so forth. In
chart form:
Palette 0 Palette 15
Red Green Blue Red Green Blue
Attribute 0 -> 1 2 3 ..... 46 47 48
... -> ... ... ... ..... ... ... ...
Attribute 15 -> 721 722 723 ..... 766 767 768
Byte # ------^-----^-----^---------------^-----^-----^
Returns:
Returns the current RGB settings for all attributes in a 768-byte
character string where each byte of the string is an ASCII value
representing the RGB values of each attribute foe each of the 16
palettes. The string is in attribute order. If the string is not
exactly 768 bytes in length (when specified) or an error occurs, an
empty string is returned.
Description:
fx_AttrAll() is a function that allows you to get or set the RGB
values of all attributes for all palettes. When
specified, it sets the new RGB values contained in the character
string for
to 63, that particular RGB value is skipped.
Examples:
// Prints the RGB values of all attributes in attribute order.
cAttr := fx_AttrAll()
? "Attribute Pal_0 Pal_1 Pal_2 ... Pal_15"
FOR nLoop = 1 to 768
IF nLoop % 48 == 1
?? CHR(13) + CHR(10)
?? STR( nLoop, 3 ) + SPACE( 8 )
ENDIF
?? STR( ASC( SUBSTR( cAttr, nLoop, 1 ) ), 2 ) + SPACE ( 5 )
NEXT
// Saves and restores the RGB values in attribute order.
cSaveAttr := fx_AttrAll()
... // (your code)
fx_AttrAll( cSaveAttr )
See Also:
fx_Attr(), fx_PalAll(), fx_Palette()
fx_Blink()
----------
Produces a blinking effect.
Syntax:
fx_Blink(
Arguments:
to blink FROM. The attribute symbol must be one of the following
color symbols supported by Clipper:
"N", "B", "G", "BG", "R", "RB", "GR", "W", "N+", "B+", "G+", "BG+",
"R+", "RB+", "GR+", or "W+". (Case is not important.)
symbol to blink TO. The attribute symbol must also be one of the
color symbols supported by Clipper.
blinking effect is "softened" by fading
value is FALSE.
Returns:
Always returns a NIL value.
Description:
fx_Blink() produces a blinking effect by alternating
and
undefined attribute symbol is specified or an error occurs, the
effect will not occur. Usually
attribute and
does not have to be the case.
Examples:
// Blinks attribute "r" to attribute "g".
fx_Blink( "r", "g" )
// Blinks attribute "w" to attribute "n" with a softened effect.
fx_Blink( "w", "n", .T. )
See Also:
fx_IntRate(), fx_PalRate(), fx_SetFix()
fx_Disable()
------------
Uninstalls the color effects system.
Syntax:
fx_Disable() -> NIL
Arguments:
None.
Returns:
Always returns NIL value.
Description:
fx_Disable() must be called prior to termination of the application
program. It may however, be called at any time within the program
when it is desirable to uninstall the color effects system. It
should also be called prior to switching screen modes. When
called, all settings are cleared and lost. Calling fx_Disable()
when the color effects system has not been installed has no effect.
Example:
// Installs and uninstalls the color effects system.
IF fx_Enable()
? "Color effects system installed, now uninstalling".
fx_Disable()
ENDIF
See Also:
fx_Enable(), fx_IsFxOn()
fx_Enable()
-----------
Installs the color effects system.
Syntax:
fx_Enable() -> lSuccess
Arguments:
None.
Returns:
Returns a logical TRUE or FALSE (.T./.F.) indicating whether or not
the color effects system was installed.
Description:
fx_Enable() must be called prior to using any of the color effects
system commands except fx_IsFxOn() and fx_IsVGA(), and to reinstall
the color effects system after a fx_Disable() command. Subsequent
calls to fx_Enable() after it is already installed return a logical
TRUE value. fx_Enable() will return a FALSE value if a VGA system
is not detected. The command fx_IsVGA() can be used to test for a
VGA. To test whether or not the color effects system is installed
without actually installing it, use the command fx_IsFxOn().
Example:
// Installs the color effects system if there is no error.
IF fx_Enable()
? "Color effects system installed."
ELSE
? "Color effects system NOT installed."
ENDIF
See Also:
fx_Disable(), fx_IsFxOn(), fx_IsVGA()
fx_Fade()
---------
Produces a fading effect.
Syntax:
fx_Fade(
Arguments:
to fade FROM. The attribute symbol must be one of the following
color symbols supported by Clipper:
"N", "B", "G", "BG", "R", "RB", "GR", "W", "N+", "B+", "G+", "BG+",
"R+", "RB+", "GR+", or "W+". (Case is not important.)
symbol to fade TO. The attribute symbol must also be one of the
color symbols supported by Clipper.
Returns:
Always returns a NIL value.
Description:
fx_Fade() produces a fading effect by gradually changing the RGB
values for
back again. If an undefined attribute symbol is specified or an
error occurs, the effect will not occur.
Examples:
// Fades attribute "b" to attribute "r+".
fx_Fade( "b", "r+" )
// Fades attribute "bg+" to attribute "n".
fx_Fade( "bg+", "n", .T. )
See Also:
fx_IntRate(), fx_PalRate(), fx_SetFix()
fx_IntRate()
------------
Gets/sets the timer tick interval period.
Syntax:
fx_IntRate( [
Arguments:
value determines the number of timer ticks (18.2 per second) to
SKIP before incrementing (rotating) the current palette.
Returns:
Returns the current setting as an integer value.
Description:
fx_IntRate() is primarily used to DECREASE the speed of the fading,
pulsing, and blinking effects.
Example:
// Print the current setting and reset a new rate.
? fx_IntRate( 2 )
See Also:
fx_PalRate(), fx_SetFix()
fx_IsFxOn()
-----------
Tests for installation of the color effects system.
Syntax:
fx_IsFxOn() -> lInstalled
Arguments:
None.
Returns:
Returns a logical TRUE or FALSE value (.T./.F.) indicating whether
or not the color effects system is installed.
Description:
fx_IsFxOn() can be used to determine if the color effects system is
installed without actually installing it. This command may be used
at any time.
Example:
// If the color effects system is installed,
// then fade some attributes.
IF fx_IsFxOn()
fx_Fade( "n", "w" )
ENDIF
See Also:
fx_Disable(), fx_Enable()
fx_IsVGA()
----------
Tests for installation of a VGA.
Syntax:
fx_IsVGA() -> lInstalled
Arguments:
None.
Returns:
Returns a logical TRUE or FALSE value (.T./.F.) indicating whether
or not a VGA system is installed.
Description:
fx_IsVGA() can be used to determine if a VGA system is installed.
A VGA is required to install the color effects system. This
command may be used at any time.
Examples:
// If a VGA is installed, then install the color effects system.
IF fx_IsVGA()
fx_Enable()
ENDIF
See Also:
fx_Enable()
fx_PalAll()
-----------
Gets/sets the RGB values of all palettes for all attributes.
Syntax:
fx_PalAll( [
Arguments:
containing an ASCII value representing the RGB values for attribute
in each palette. The first forty-eight bytes represent the
RED/GREEN/BLUE (RGB) values for palette 0 for all attributes, the
next 48 bytes represent the next palette, and so forth. In chart
form:
Attribute 0 Attribute 15
Red Green Blue Red Green Blue
Palette 0 -> 1 2 3 ..... 46 47 48
... -> ... ... ... ..... ... ... ...
Palette 15 -> 721 722 723 ..... 766 767 768
Byte # ------^-----^-----^---------------^-----^-----^
Returns:
Returns the current RGB settings for all attributes in a 768-byte
character string where each byte of the string is an ASCII value
representing the RGB values of each attribute in each palette. The
string is in palette order. If the string is not exactly 768 bytes
in length (when specified) or an error occurs, an empty string is
returned.
Description:
fx_PalAll() is a function that allows you to get or set the RGB
values of all attributes for all palettes. When
specified, it sets the new RGB values contained in the character
string for
to 63, that particular RGB value is skipped.
Examples:
// Print the RGB values of all attributes in palette order.
cPals := fx_PalAll()
? "Palette Attr_0 Attr_1 Attr_2 ... Attr_15"
FOR nLoop = 1 to 768
IF nLoop % 48 == 1
?? CHR(13) + CHR(10)
?? STR( nLoop, 3 ) + SPACE( 6 )
ENDIF
?? STR( ASC( SUBSTR( cPals, nLoop, 1 ) ), 2 ) + SPACE ( 6 )
NEXT
// Save and restore the RGB values in palette order.
cSavePals := fx_PalAll()
... // (your code)
fx_PalAll( cSavePals )
See Also:
fx_Attr(), fx_AttrAll(), fx_Palette()
fx_Palette()
------------
Gets/sets the RGB values of all attributes in a single palette.
Syntax:
fx_Palette(
Arguments:
the palette number to get/set.
containing an ASCII value representing the RGB values of each
attribute for all attributes in the palette. The first three bytes
represent the RED/GREEN/BLUE (RGB) values for attribute 0, the
fourth through sixth bytes represent attribute 1, and so forth.
In chart form:
Attribute 0 Attribute 15
Red Green Blue Red Green Blue
Byte # -> 1 2 3 ..... 46 47 48
Returns:
Returns the current RGB settings for each attribute in a 48 byte
character string where each byte of the string is an ASCII
value representing the RGB values of all the attributes in the
the palette. If an undefined palette is specified or the string
is not exactly 48 bytes in length (when specified) or an error
occurs, an empty string is returned.
Description:
fx_Palette() is a function that allows you to get or set the RGB
values of all attributes in a palette. When
specified, it sets the new RGB values for all attributes in
particular RGB value is skipped.
Examples:
// Replace the RGB values for attribute "gr+" in palette 7
// with the RGB values for high-intensity blue.
IF .NOT. EMPTY( cPal := fx_Palette( 7 ) )
cPal := STUFF( cPal, 43, 3, CHR(0) + CHR(0) + CHR(63) )
fx_Palette( 7, cPal )
ENDIF
// Make all high-intensity attributes equal to their normal
// intensity complementary attribute in palette 2.
cPal := fx_Palette( 2 )
cSub := SUBSTR( cPal, 1, 24 )
cPal := cSub + cSub
fx_Palette( 2, cPal )
See Also:
fx_Attr(), fx_AttrAll(), fx_PalAll()
fx_PalRate()
------------
Gets/sets the palette rotation increment rate.
Syntax:
fx_PalRate( [
Arguments:
value determines the number of palettes to SKIP when rotating the
current palette.
Returns:
Returns the current setting as an integer value.
Description:
fx_PalRate() is primarily used to INCREASE the speed of the fading,
pulsing, and blinking effects. It does this by skipping palettes
when rotated by the timer intercept routine. Please be aware that
skipping palettes may cause some palettes never to be shown (ex: an
even increment will never display an odd numbered palette). This
could cause some effects to not occur as intended.
Example:
// Print the current setting and reset a new rate.
? fx_PalRate( 3 )
See Also:
fx_IntRate(), fx_SetFix()
fx_Pulse()
----------
Produces a pulsing effect.
Syntax:
fx_Pulse(
Arguments:
to pulse. The attribute symbol must be one of the following color
symbols supported by Clipper:
"N", "B", "G", "BG", "R", "RB", "GR", "W", "N+", "B+", "G+", "BG+",
"R+", "RB+", "GR+", or "W+". (Case is not important.)
Returns:
Always returns a NIL value.
Description:
fx_Pulse() produces a pulsing effect by periodically and gradually
displaying the maximum high-intensity RGB value of an attribute.
If an undefined attribute symbol is specified or an error occurs,
the effect will not occur.
Examples:
// Pulse attribute "b" to maximum high-intensity.
fx_Pulse( "b" )
// Pulse attribute "bg+" to maximum high-intensity.
fx_Pulse( "bg+" )
See Also:
fx_IntRate(), fx_PalRate(), fx_SetFix()
fx_RestAll()
------------
Restores all attributes.
Syntax:
fx_RestAll() -> NIL
Arguments:
None.
Returns:
Always returns a NIL value.
Description:
fx_RestAll() restores all attributes to their default RGB values
when the color effects system was installed. It also resets the
palette increment rate and the timer interval period back to their
default values. It sets the current "fixed" palette back to
palette 0 but DOES NOT change the current palette mode from "fixed"
to "rotation" or vice-versa. This function may be called at any
time.
Example:
// Create several special color effects and then
// cancel all of them when a key is pressed.
fx_Fade( "n+", "gr" )
fx_Blink( "w", "r", .T. )
fx_Pulse( "gr+" )
INKEY( 0 )
fx_RestAll()
See Also:
fx_Restore()
fx_Restore()
------------
Restores a specified attribute.
Syntax:
fx_Restore(
Arguments:
to restore. The attribute symbol must be one of the following
color symbols supported by Clipper:
"N", "B", "G", "BG", "R", "RB", "GR", "W", "N+", "B+", "G+", "BG+",
"R+", "RB+", "GR+", or "W+". (Case is not important.)
Returns:
Always returns a NIL value.
Description:
fx_Restore() restores the RGB values of an attribute to its default
RGB values when the color effects system was installed.
Example:
// Blink an attribute and then restore
// it when a key is pressed.
fx_Blink( "bg+", "n" )
INKEY( 0 )
fx_Restore( "bg+")
See Also:
fx_RestAll()
fx_SetFix()
-----------
Sets/cancels "fixed" palette mode.
Syntax:
fx_SetFix( [
Arguments:
to enable or disable the "fixed" palette mode. When
TRUE, "fixed" mode is enabled. When
mode is disabled and palette rotations occur.
Returns:
Returns a logical TRUE/FALSE value (.T./.F.) indicating the current
palette mode setting, where TRUE indicates it is in "fixed" mode
and FALSE indicates "rotation" mode.
Description:
fx_SetFix() toggles the palette mode between "fixed" and
"rotation". While in "fixed" mode, no palette changes are made by
the timer intercept routine. This, in effect, suspends the
following commands:
fx_PalRate()
fx_IntRate()
fx_Blink()
fx_Fade()
fx_Pulse()
The commands are still "active", i.e. they will continue to behave
as normal except they will not be displayed. Normally, "fixed"
mode is used only when a certain palette must be continuously
displayed, like when a color scheme has been defined for a
particular palette and needs to remain constant.
Examples:
// Suspend all color effects and display only
// the attributes in palette 5.
fx_SetFix( .T. )
fx_SetPal( 5 )
// Restore all attributes to default RGB values
// and cancel "fixed" palette mode.
fx_RestAll()
fx_SetFix( .F. )
See Also:
fx_SetPal()
fx_SetPal()
-----------
Gets/sets the palette to display when "fixed" mode is enabled.
Syntax:
fx_SetPal( [
Arguments:
the palette number to get/set.
Returns:
Returns the integer number of the current palette displayed.
Description:
fx_SetPal() allows switching between palettes when "fixed" palette
mode is enabled. If an undefined palette is specified or an error
occurs, no switching will occur.
Example:
// Save the current displayed palette and switch
// to palette 5. When a key is pressed, return
// to the original palette.
nSavePal := fx_SetPal( 5 )
INKEY( 0 )
fx_SetPal( nSavePal )
See Also:
fx_FixPal()
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/