Mail Archives: djgpp/1998/03/24/14:15:51
This is a multi-part message in MIME format.
------=_NextPart_000_009E_01BD575F.E9C42F20
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
>Can anyone send a simple c or c++ code that runs at 640x480x256 colors
>and prints Hello World without using Allegro? (What a challenge...)
>
>Thanks, Nicolas Blais
>
>
Yeah, sure...
------------------------------------------------
Keso98 - keso-98 AT swipnet DOT se
http://start.at/windows98/
------------------------------------------------
------=_NextPart_000_009E_01BD575F.E9C42F20
Content-Type: application/octet-stream;
name="ex1.c"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="ex1.c"
/*=20
* Example program for the Allegro library, by Shawn Hargreaves.
*
* This is a very simple program showing how to get into graphics
* mode and draw text onto the screen.
*/
#include <stdlib.h>
#include <stdio.h>
#include "allegro.h"
int main()
{
/* you should always do this at the start of Allegro programs */
allegro_init();
/* set up the keyboard handler */
install_keyboard();=20
/* set VGA graphics mode 13h (sized 320x200) */
set_gfx_mode(GFX_VGA, 640, 400, 0, 0);
/* set the color pallete */
set_pallete(desktop_pallete);
/* write some text to the screen */
textout_centre(screen, font, "Welcome to Ulrik Sunnvius world of very =
amature programming", SCREEN_W/2, SCREEN_H/2, 255);
/* wait for a keypress */
readkey();
return 0;
}
------=_NextPart_000_009E_01BD575F.E9C42F20--
- Raw text -