| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | bounce.c |
/* */
/* Written by Matthew Parker and released to the public domain */
/* */
/* */
/* Just a quick program I wrote. It's only based on what bounce.moo does as */
/* I couldn't properly understand the moo file. Define WALL if you want a */
/* wall. This is my first attempt at writing a program like this so if it is */
/* not very well written and full of bugs you know why. The source looks */
/* fairly ugly IMO but it is free for anyone who wants it. Should work with
*/ /* Borland and Watcom.
*/
/* */
/* Note: Yes I know that the clr isn't very compatible put the program only */
/* works with colour screen adapters anyway. */
/* */
/* #define WALL */
#include
#include
#include
#include
#define MAXBALLS 25
#define ESC 27
#define RED 0x0400
#define GREEN 0x0200
#define BLUE 0x0100
#define WHITE 0x0f00
void clr(void);
#pragma aux clr=\
"mov ax,3"\
"int 10h"\
modify [ax];
#ifdef __BORLANDC__
void clr(void)
{
asm{
mov ax,3
int 10h
}
}
#endif
int x[MAXBALLS],y[MAXBALLS],xd[MAXBALLS],yd[MAXBALLS],colour[MAXBALLS];
main()
{
int i,select[]={RED,GREEN,BLUE,WHITE};
unsigned int far *screen=MK_FP(0xb800,0);
srand((unsigned)time(NULL));
clr();
#ifdef WALL
for(i=0;i<30;i++)
*(screen+(8*80)+i+4)=0x7f00|' ';
#endif
for(i=0;i * Origin: Blueee Lilly Snowy (3:711/934.31)SEEN-BY: 690/718 711/809 934 @PATH: 711/934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.