From: G DOT DegliEsposti AT ads DOT it To: djgpp AT delorie DOT com Message-ID: Date: Thu, 26 Mar 1998 11:24:11 +0100 Subject: Re: Re: even more graphics problems with allegro Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Precedence: bulk >> I guess what you wanted was something like this: >> blit((BITMAP *)data[selecto].dat, screen, 0, 0, 0, 0, 320, 200); > >Actually, the typecast is not neccessary, AFAIK. >simply using > >blit(data[selecto].dat, screen, 0, 0, 0, 0, 320, 200); > >should work fine, and it's slightly less long to type. Yes, maybe I was mislead my this piece of information form the Allegro docs... --- If you are programming in C++ you will get an error because the dat field is a void pointer and draw_sprite() expects a BITMAP pointer. You can get around this with a cast, eg: draw_sprite(screen, (BITMAP *)data[THE_IMAGE].dat, x, y); --- Anyway, I had some bad experiences with pointers while programming under windows 3.1 and I put explicit casts to avoid problems every time I can. ciao Giacomo