Sender: nate AT cartsys DOT com Message-ID: <35CDB759.36D13D18@cartsys.com> Date: Sun, 09 Aug 1998 07:51:05 -0700 From: Nate Eldredge MIME-Version: 1.0 To: Einar <"eincar"@[EINAR]vip.cybercity.dk> CC: djgpp AT delorie DOT com Subject: Re: Text and graphics? References: <6qhn55$omq$1 AT news DOT cybercity DOT dk> <6qk59l$qof$1 AT news DOT cybercity DOT dk> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Precedence: bulk Einar wrote: > I can easily place a pre written text onto the screen using: > > textout(bitmap *bmp,font *f,unsigned char *s,int x, y, int color); > > that is provided with Allegro. > But if I try to write a text onto the background picture using: > > scanf("%s", &player1); > > the game freezes. What the hey? `scanf' is for reading, not writing, so obviously you can't write anything using it. Furthermore, it's unlikely to work right in a graphics mode; you'll have to use Allegro's features for that. If you want to put text on the screen, try `sprintf' followed by `textout'. -- Nate Eldredge nate AT cartsys DOT com