From: "Chaos" Newsgroups: comp.os.msdos.djgpp Subject: Re: fprintf() and using under graphic modes Date: Sun, 21 Nov 1999 17:12:25 +0100 Organization: Chaos Engine Lines: 61 Message-ID: <8195o6$qfc$1@portraits.wsisiz.edu.pl> References: <8176ml$or0$1 AT portraits DOT wsisiz DOT edu DOT pl> NNTP-Posting-Host: pa126.warszawa.ppp.tpnet.pl X-Trace: portraits.wsisiz.edu.pl 943200838 27116 212.160.52.126 (21 Nov 1999 16:13:58 GMT) X-Complaints-To: abuse AT news DOT wsisiz DOT edu DOT pl NNTP-Posting-Date: 21 Nov 1999 16:13:58 GMT X-Newsreader: Microsoft Outlook Express 4.72.3110.1 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.1 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com >> Hi >> >> I've been recently writing 2D video game. >> Nothing really big, but for my pleasure. > >If you want to use graphics, use Allegro. Yeah, I know, but I want to do something only by myself. You know 100% Chaos code. Sound sweet :-) But I' probably gonna switch to that superb thing. >> VESA is used pretty much in my code, > >VESA is buggy. Allegro successfully works around the bugs. ??? What you meen? My philosophy is that: If Allegro can do it I can do it too. BTW. I'm treating that game as learning in programming C and Asm using various algorithms. >> so I was wondering if there is easy (and fast!) method to print >> some text message on the LFB or VRAM (using bank >> switching). My first thought was to make it with fprintf() >> and other *printf functions. I was surpprised, that fprintf >> put a very nice text prompt in 640*480*256c mode (0x101). >> >> Now i'm wondering if I can do it safelly. Can I stick with printing text >> messages such as timer or player name using only printf-family functions. >> Are there any limitations in using those functions in graphics modes? > >They don't work on all cards. Why? I suspected that using fprintf() isn't very good for printing texts in graphic mode, but hey, it's the easiest way to do it as I know. Eli Zarestki told me that I must chceck ScreenRows() and ScreenCols() functions before I can use any of printf-family functions. >None of VESA works when compiling for M$ Windows or X. >Coding for the Allegro Platform is more portable. >http://www.talula.demon.co.uk/allegro/ >And if you're concerned about EXE size, there's UPX. >http://www.nexus.hu/upx/ I'll check it out. Thnx!! >Damian Yerrick Take care. -=| Chaos |=- e-mail: chengin AT alpha DOT net DOT pl chengin AT polbox DOT com _______________________________________________ The statistics on sanity are that one out of every four people is suffering from some form of mental illness. Think of your three best friends. If they are okay, then it's you. _______________________________________________