home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of Shareware - Software Farm 2
/
wosw_2.zip
/
wosw_2
/
CPROG
/
WGT_TC21.ZIP
/
WGT21.C
< prev
next >
Wrap
C/C++ Source or Header
|
1992-07-17
|
933b
|
57 lines
#include <conio.h>
#include <stdio.h>
#include "c:\tc\wgt\wgt.h"
/* WORDUP Graphics Toolkit Version 2.1
Demonstration program 21
Shows off some special FX using wvertres.
*/
void crush(block,block,int);
block screen1,screen2; // two virtual screens
int y,s;
color palette[256];
void main(void)
{
vga256(); // initializes system
screen1=wloadblock("c:\\tc\\wgt\\wgt1.blk");
screen2=wloadblock("c:\\tc\\wgt\\wgt2.blk");
wloadpalette("c:\\tc\\wgt\\wgt1.pal",&palette);
wputblock(0,0,screen1,0);
do {
crush(screen1,screen2,5);
crush(screen2,screen1,5);
mread();
} while (but==0);
wfreeblock(screen1); // remember to free that memory
wfreeblock(screen2);
textmode(C80); // used to return to text mode
}
void crush(block b1, block b2, int dir)
{
int q,w,e;
for (q=199; q>=0; q-=dir)
{
wvertres(b1,0,q);
wvertres(b2,q,199);
}
}