From: Nicolas Blais Newsgroups: comp.os.msdos.djgpp Subject: Wonderful Alllegro problem! Date: Sun, 25 Oct 1998 15:24:44 -0500 Organization: Alpha Quark Technologie Lines: 34 Message-ID: <3633890C.AF7611E4@phreaker.net> NNTP-Posting-Host: ts1-08.f2007.quebectel.com Mime-Version: 1.0 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.5b2 [en] (Win95; I) X-Accept-Language: en To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I made a program with Allegro, in 800x600x15bit.  When I load that program, I go into graphic mode, then into text mode with garbage everywhere then back to text mode dos.  It's very fun to see this although I'm starting to twich and get pissed.  HOW DO I STOP THIS?

//********problem:

#define RGB makecol15
BITMAP* window = create_bitmap(800,600);
BITMAP* viewport = create_sub_bitmap(window,1,17,798,582);
clear(window);
clear(viewport);

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) {}
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);
textout_centre(dest, font, win_title, reswin_x / 2, 5, RGB(255,255,255));
}

Nicolas Blais