Mail Archives: djgpp/1997/12/18/11:15:51
/**********************************************************************
* Plot.c - Uses Allegro lib to set to plot a pixel...debugged
***********************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include "allegro.h"
/**********************************************************************
* Main
**********************************************************************/
int main()
{
int allegro_init();
int color, x, y;
printf("Enter a value from 1-320: ");
scanf(" %d", &x);
printf("Enter a value from 1-200: ");
scanf(" %d", &y);
// Set the video mode //
set_gfx_mode(GFX_VGA, 320, 200, 0, 0);
// Plots pixel //
putpixel(screen,x,y,color);
// Waits for a key to be pressed //
while (!kbhit()){}
// Here is the line to put text mode back
set_gfx_mode(GFX_TEXT,80,25,0,0);
return 0;
}
--
.*. Friendship, companionship, love, and having fun are the reasons for
-() < life. All else; sex, money, fame, etc.; are just to get/express these.
`*' Send any and all mail with attachments to the hotmail address please.
Paul Derbyshire ao950 AT freenet DOT carleton DOT ca pgd73 AT hotmail DOT com
- Raw text -