Xref: news2.mv.net comp.os.msdos.djgpp:5235 From: Ben Ashley Newsgroups: comp.os.msdos.djgpp Subject: Allegro Blues Date: Fri, 21 Jun 96 10:30:42 GMT Organization: Flag Bearers Lines: 68 Message-ID: <835353042snz@flag.demon.co.uk> Reply-To: Ben AT flag DOT demon DOT co DOT uk To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Yup... me again... :) I am having some problems with allegro. I am running under Windows 95, using RHIDE as the Editor. I seem to have an erratic bug. I am making some GUI class libraries, and things seem to go wrong in my CApp constructor. This class simply initializes the entire system, ready for use. It goes like this /* CApp Class Implementation ========================= */ #include #include #include #include #include "app.h" #include "gui.h" #include "control.h" #include "contlist.h" CApp::CApp(int GfxCard, int Width, int Height) { // Initialize Allegro: allegro_init(); install_keyboard(); install_mouse(); install_timer(); // Initialize Screen: set_gfx_mode(GfxCard, Width, Height, 0, 0); show_mouse(screen); // Defaults: ActiveWindow = NULL; QuitFlag = FALSE; // Set to non-zero to quit the app DblClickSpeed= 400; // Over-ride as necessary Zone.Left = 0; // Define zone for window Zone.Top = 0; // movement... Zone.Width = SCREEN_W; // ... Zone.Height = SCREEN_H; // ... Event_Open(); }; Sometimes everything opens nice and correctly. Most mostly, ALLEGRO quits with a GPF. From some testing, it seems to occur around the set_gfx_mode() function. I am passing 'GFX_AUTODETECT, 640, 480' to the constructor which then, as you can see gets put in the set_gfx_mode() function. Has anyone got any ideas? -- Cheers, Ben -=Look for "Moo-Juice" on the IRC=- ---------------------====### legal notice ###====-------------------------- Microsoft Network is prohibited from redistributing this work in any form,in whole or in part. License to distribute this post is available to Microsoft for $499. Posting without permission constitutes an agreement to these terms.