delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/18/11:15:51

From: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: easy Allegro grahics help
Date: 17 Dec 1997 07:23:09 GMT
Organization: The National Capital FreeNet
Lines: 46
Message-ID: <677ukt$f60@freenet-news.carleton.ca>
References: <34974CE7 DOT 421A AT alpha DOT delta DOT edu>
Reply-To: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire)
NNTP-Posting-Host: freenet3.carleton.ca
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

/**********************************************************************
* 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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019