www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/27/12:55:07

From: DougEleveld <deleveld AT dds DOT nl>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Wonderful Alllegro problem!
Date: Tue, 27 Oct 1998 18:52:08 +0100
Organization: Rijksuniversiteit Groningen
Lines: 33
Message-ID: <36360848.E0BC4A4F@dds.nl>
References: <3633890C DOT AF7611E4 AT phreaker DOT net>
NNTP-Posting-Host: client36-66.oprit.rug.nl
Mime-Version: 1.0
X-Mailer: Mozilla 4.0 [en] (Win95; I)
X-Priority: 3 (Normal)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Nicolas Blais wrote:

> gui.create_window(window, "DEMONSTRATION OF OMEGA ENGiNE", 800, 600,
> RGB(0,0,100));
> text_mode(-1);
> rect(viewport, 100, 70, 700, 127, RGB(240,240,240));
> rectfill(viewport, 101, 71, 699, 126, RGB(0,0,100));
> textout_centre(viewport, font, "Hi", res_x / 2, 30, RGB(255,0,0));
> blit(window, screen, 0, 0, 0, 0, 800, 600);
> show_mouse(screen);
> while (!keypressed) {}

Are you sure you don' mean keypressed() here? -forgot brackets-

> return 0;
> 
> void gui::create_window(BITMAP* dest, char win_title[], ushort
> reswin_x, ushort reswin_y, ushort color)
> {
> clear(dest);
> rectfill(dest, 0, 0, reswin_x, 15, color);
> rect(dest, 0, 0, reswin_x -1, reswin_y -1, RGB(240,240,240));
> line(dest, 0, 16, reswin_x, 16, RGB(240,240,240));
> textmode(-1);

You probably mean text_mode(-1);

I made the above changes to your code and then added main and changed
the gui class function to be a normal C function and everything worked
OK for me.  Make the changed that I suggested and if you still have
problems, give me a mail...

Doug Eleveld

- Raw text -


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