Category : Pascal Source Code
Archive   : GAMETP20.ZIP
Filename : IMAGING.INT

 
Output of file : IMAGING.INT contained in archive : GAMETP20.ZIP
Unit Imaging;

{ Imaging version 1.1 Copyright (C) 1992 Scott D. Ramsay }
{ [email protected] }

{ This unit is specifically for Mode 13h (320x200x256). It is a }
{ lot faster than using the BGI drivers (VGA256.BGI). Majority of }
{ the code is written using BASM. This will work on 286 machines or }
{ higher. "I don't know about the P5 chip though." 😉 }
{ IMAGING.TPU can be used freely in commerical and non-commerical }
{ programs. As long as you don't give yourself credit for writing }
{ this portion of the code. When distributing it (free only), please }
{ include all files and samples so others may enjoy using the code. }
{ Enjoy. }
{ }
{ Changes from 1.0: }
{ Added function to load gif files. (slow, it my first attempt) }



Interface

Uses VgaKern;

type
VidHdrType = record
position,count : word; { header block for PTR files }
end;

var
rgb256 : RGBlist; { palette of last loaded PCX file }

function loadpcx(pfilename:string):integer;
function loadgif(gfilename:string):integer;
procedure DrawPtr(var p;merge:boolean;sz:longint);
function LoadPTR(fn:string;merge:boolean):integer;
function SavePTR(fn:string):integer;

Implementation

(***********************************************************************)
function loadpcx(pfilename:string):integer;

loads a PCX file from disk to the current page. Returns 0 if no error,
Make sure its a 320x200 image.

(***********************************************************************)
function loadgif(gfilename:string):integer;

loads a GIF file from disk to the current page. Returns 0 if no error,
Make sure its a 320x200 image. This procedure is very slow.

(***********************************************************************)
procedure DrawPtr(var p;merge:boolean;sz:longint);

loads a PTR file from memory to the current page
p : is the PTR location,
merge : set to true to overlay image
sz : size of PTR file

(***********************************************************************)
function LoadPTR(fn:string;merge:boolean):integer;

loads a PTR file from disk to the current page, returns
0 if no error

(***********************************************************************)
function SavePTR(fn:string):integer;

save the current page as a PTR file, returns 0 if no error


(***********************************************************************)

If you have any problems, e-mail at:

[email protected]

Sorry, I don't have permanent snail-mail address yet. I just moved
to the Washington DC area.

The TPU units can be used with in your programs. With out giving
me credit. If you want the source code, more samples or swap-talk,
just e-mail me. I'll give sample use-code for free. Actual TPU-source
code prices can be discussed.


Scott D. Ramsay

  3 Responses to “Category : Pascal Source Code
Archive   : GAMETP20.ZIP
Filename : IMAGING.INT

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. 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/