Mail Archives: djgpp/1999/03/06/19:05:38
Thanks for the note about load creating a bitmap in memory. I guess I
was inadvertently creating a memory leak.
Man this prob is annoying me. I tested the loads like this:
if((message2 = load_bmp("win.bmp",message_pal2)) == NULL) {
cout << "Error loading bitmap win.bmp" << endl;
game_over(circles);
}
and
if((message1 = load_bmp("player1.bmp",message_pal1)) == NULL) {
cout << "Error loading bitmape player1.bmp. Exiting!" <<
endl;
game_over(circles);
}
and so on. Nothing is printed to the console so I am guessing it
initializes the pointer correctly. This is leading me to believe that
the problem is in the blit function. I don't use rhine, I write it in
ultraedit and compile at the prompt. I have been looking at the html
docs that came with allegro for function info. About rhide I can't
get the stupid thing to even compile a hello world program I did
however try loading it up and adding allegro.inf and looking through
the help file. It's the same stuff that's in the html docs. This is
really innoying. Only idea I have at the moment is it might have
something to do with the palettes, but I don't know what.
Any more ideas anyone, keep am coming.
Thanks for your help
-John
On 6 Mar 1999 22:46:27 GMT, bitland AT aol DOT com (Bitland) wrote:
>Hi!
>You use message1 and message2 twice. Once creating bitmaps and the second time
>in returning them from the load_bitmap-functions. You only have to provide the
>pointers, don't use create_bitmap. This is done by load_bitmap, if successful,
>but that seems to be the next problem. If unsuccessful NULL is returned - and
>nothing can be seen. Check the docs for load_bitmap.
>If using RHIDE you could add Allegro in Help->SyntaxHelp->Files to search. Then
>you always can use the online help :)
>
>CU
> Andy
- Raw text -