home *** CD-ROM | disk | FTP | other *** search
-
- TPAL4C v1.00 (C) Copyright 1994 Peak Computing
- All Rights Reserved
- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- Designed & Written by Brian Manning
-
-
- * What is TPAL4C?
-
- TPAL is a collection of video palette fading routines for VGA display
- adapters. These routines work in text video modes and directly
- modify the video's internal palette registers for blazing speed!
- The original version of TPAL was written for QuickBASIC, then I created
- a Pascal version, and now I've have created a version for C/C++ users!
- (These routines were written in Borland C v3.1)
-
-
- * What do I get when I register?
-
- You get the latest version of TPAL4C (with all of the memory models)
- and all the tech support you need! ;-) Plus free upgrades!
-
-
- * How do I use TPAL4C?
-
- These routines are very simple to use, just load the C Editor (IDE) and
- create a project containing the proper library for the memory model your
- using, then add TPAL to your "include" statements, here is an example:
-
- #include "tpal.h"
-
- (If you want to use fonts include "fonts.h" as well)
-
- After that your ready to begin calling the routines. The first routine you
- need to call is "InitTPALDriver" this routine intializes the video card and
- gets the current default palette settings. After doing this all the other
- routines you just call whenever you want text fading or to create effects!
-
-
- * Routine Summary:
-
-
- Name: InitTPALDriver
- Dec.: void InitTPALDriver(void)
-
- Initializes the video card & routines. This only needs to be called
- once at the begining of your program. Note: This REALLY should be
- one of the first routines called upon, as it reads the current font &
- palette settings to be used in the routines.
-
- InitTPALDriver();
-
-
- Name: TPALDone
- Dec.: void TPALDone(void)
-
- Un-initializes the video card & routines. You should call this routine
- before your program exits, what this routine does is restore the palette
- and font to the original settings.
-
- TPALDone();
-
-
- Name: TBlankPalette
- Dec.: void TBlankPalette(void)
-
- Blanks out the current palette, sets palette to black.
-
- TBlankPalette();
-
-
- Name: TSavePalette
- Dec.: int TSavePalette(char FileName[255])
-
- Saves the current palette to disk, if no extention is given the routine
- will assume the extention .PAL (See TLoadPalette)
-
- strcpy(FileName,"TEST");
- ErrCode = TSavePalette(FileName);
-
- FileName - Filename to save palette. (may include path)
- --------
- ErrCode - 0 if no error, otherwise disk error.
-
-
- Name: TLoadPalette
- Dec.: int TLoadPalette(char FileName[255])
-
- Loads a palette from disk, if no extention is given the routine
- will assume the extention .PAL (See TSavePalette)
-
- strcpy(FileName,"TEST");
- ErrCode = TLoadPalette(FileName);
- IF ErrCode = 256 then printf("\nNot a TPAL file!\n");
-
- FileName - Palette filename to load. (may include path)
- ---------
- ErrCode% - 0 no error, 256 the file is not a "TPAL" saved file.
-
-
- Name: TFadeInPalette
- Dec.: void TFadeInPalette(int FadeSpeed)
-
- Fades a palette from black to its original settings. (See TFadeOutPalette)
-
- FadeSpeed=10;
- TFadeInPalette(FadeSpeed);
-
- FadeSpeed - Fading speed in milliseconds.
-
-
- Name: TFadeOutPalette
- Dec.: void TFadeOutPalette(int FadeSpeed)
-
- Fades a palette to black. (See TFadeInPalette, TBlankPalette)
-
- FadeSpeed=10;
- TFadeOutPalette(FadeSpeed);
-
- FadeSpeed - Fading speed in milliseconds.
-
-
- Name: TSetBright
- Dec.: void TSetBright(int Brightness)
-
- Sets the screens 'brightness' by changing the palette intensity levels.
-
- Brightness=31;
- TSetBright(Brightness);
-
- Brightness - Range 1-63, 1 being the darkest setting (black)
-
-
- Name: TResetPalette
- Dec.: void TResetPalette(void)
-
- Sets the video palette back to it's original settings that were established
- when 'InitTPALDriver' was called.
-
- TResetPalette();
-
-
- Name: TSetFont
- Dec.: void TSetFont(char FontData[8193])
-
- Sets the current font. You must include "FONTS.H" and make sure
- you have FONTS_x.LIB included in your project. Here is a list of fonts
- availible in the TPAL4C library: (32 total fonts, in alph. order)
-
- amb antique boxy broad
- cour1 cour2 deck decor
- fresno future ghost hylas
- italian italics king lewis
- medieval modern muchery olden
- petite puter roman sanserif
- scribble script startrek system1
- system2 tall tektite thix
-
- TSetFont(scribble);
-
-
- Name: TResetFont
- Dec.: void TResetFont(void)
-
- Sets the font back to it's original settings established when
- 'InitTPALDriver' was called.
-
- TResetFont();
-
-
- * Notes:
-
- No news is good news!
-
-
-