Mail Archives: djgpp/1998/06/16/22:25:31
Nicolas Blais wrote:
>
> Hi, thanks for helping, with your help I was able to fix the midi and font
> problem, but the bitmap problem still arises. I tried what you told me to
> do but I can do so because show_centered_bmp is a call to a function I
> made. I guess I have to modify something in my function, I tried putting
> (BITMAP *) everywhere but no success. Can you help one last time?
>
> > void show_centered_bmp(char filename[20],int y)
> > {
> > BITMAP* bmp;
> > PALETTE pal;
> > bmp = load_bmp(filename,pal);
> > masked_blit(bmp,screen,0,0,(SCREEN_W-bmp->w)/2,y,bmp->w,bmp->h);
> > destroy_bitmap(bmp);
> > }
> > show_centered_bmp(datafile[Title_Main].dat, 100);
So the "Title_Main" object is a string? Okay then:
show_centered_bmp((char *)datafile[Title_Main].dat, 100);
Casts should be covered in any C++ book, and comp.lang.c++ would be a
better place for questions like this.
--
Nate Eldredge
nate AT cartsys DOT com
- Raw text -