home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Black Box 4
/
BlackBox.cdr
/
progc
/
teglc.arj
/
ANIMTST2.C
< prev
next >
Wrap
Text File
|
1990-05-14
|
1KB
|
56 lines
/*---------------------------------------------------------------------------*
| TEGL Windows ToolKit II |
| Copyright (C) 1990, TEGL Systems Corporation |
| All Rights Reserved. |
*---------------------------------------------------------------------------*/
#include <dos.h>
#include <conio.h>
#include <stdio.h>
#include <string.h>
#include <graphics.h>
#include "teglsys.h"
animateobject bounceicon;
unsigned exitoption(imagestkptr frame, msclickptr mouseclickpos)
{
abort_msg("Animation Test - The Bouncing Icon.");
return 0;
}
void main(int argc, char **argv)
{
teglinit(ega640x350x16,12288);
setctrlbreakfs(exitoption);
clearteglscreen();
init(&bounceicon);
addframe(&bounceicon,imageBLANKBUT,-15,0,14,37,10,0,0,BLACK);
sequence(&bounceicon,1);
resetsequence(&bounceicon);
addframe(&bounceicon,imageBLANKBUT,15,0,14,37,10,0,0,BLACK);
sequence(&bounceicon,2);
origin(&bounceicon,getmaxx() / 2,getmaxy() / 2);
animateinit();
clearkeyboardbuf();
while (!kbhit())
{
sequence(&bounceicon,1);
animate(&bounceicon,destination(&bounceicon,36,0));
/* animate(&bounceicon,10); */
sequence(&bounceicon,2);
animate(&bounceicon,destination(&bounceicon,560,0));
/* animate(&bounceicon,10); */
}
teglsupervisor();
}