From: Shawn Hargreaves To: djgpp AT delorie DOT com MMDF-Warning: Parse error in original version of preceding line at punt-1.mail.demon.net Subject: Re: allegro: textout_centre() / gfx_mode_select() Date: Wed, 7 May 1997 09:04:54 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <863006333.0522349.0@[194.129.18.166]> Precedence: bulk KaRNaGE writes: > if (!gfx_mode_select(&video_card, &VIDEO_MAX_X, &VIDEO_MAX_Y)) [snip] > sprintf(sbuffer, "blah %3d", x_angle); > textout_centre(vir_seg, font, sbuffer, SCREEN_W >> 1, SCREEN_H - 40, 255); This is the culprit: gfx_mode_select() is changing the text drawing mode, and the details of what you do with it will affect which mode you are left in. Before calling textout(), you need to reset the mode by calling text_mode(0), text_mode(-1), or whatever... > /* that's pretty mutch all you need to know i think...*/ In this case, yes, but in general it's a lot more use if you can isolate a _compilable_ section of code that demonstrates problems: it's a lot easier to figure out what the problem is if I can actually build and run the thing! -- Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk Beauty is a French phonetic corruption of a short cloth neck ornament