home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Developer CD v1.2
/
amidev_cd_12.iso
/
devcon
/
milan_1991
/
devcon91.2
/
tiga
/
demos
/
dots.c
< prev
next >
Wrap
C/C++ Source or Header
|
1992-09-01
|
897b
|
44 lines
#include <stdio.h>
#include <a2410/typedefs.h>
#include <a2410/devtiga.h>
#include <clib/a2410_protos.h>
#include <math.h>
BOOL TIGA_Init(void);
void TIGA_Close(void);
void TIGA_Break(void);
void TIGA_SetRandPalet(void);
void DotsDemo(void);
/* ================================================================================ */
void main(int argc, char **argv)
{
if (TIGA_Init())
{
onbreak(TIGA_Break);
TIGA_SetRandPalet();
DotsDemo();
TIGA_Close();
}
}
/* ------------------------------------------------------------------------------- */
void DotsDemo()
{
int x,y,i;
CONFIG config;
get_config(&config);
for (;;)
{
chkabort();
x = rand() % config.mode.disp_hres;
y = rand() % config.mode.disp_vres;
i = rand() % config.mode.palet_size;
set_fcolor(i);
draw_point(x, y);
}
}
/* ------------------------------------------------------------------------------- */