delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/24/14:15:51

From: "Kekke and RaiMO" <keso-98 AT swipnet DOT se>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Simple 640x480x256 Hello World Example?
Date: Tue, 24 Mar 1998 20:03:29 +0100
Organization: A customer of Tele2
Lines: 72
Message-ID: <890766161.933550@nn1>
References: <3517A8C0 DOT 7BEFC585 AT netrover DOT com>
NNTP-Posting-Host: nn1.swip.net
Mime-Version: 1.0
Cache-Post-Path: nn1!s-341394 AT dialup119-1-57 DOT swipnet DOT se
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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 -


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