Skip to main content
GameDev.net gamedev.net
🔒 Locked

ALLEGRO DEV-CPP HELP

Started by welburn1010 Feb 25, 2005 at 8:21 AM 4 replies 1.1k views
Original Post
welburn1010
welburn1010
Hi I have succesfully got Dev-cpp working with the latest allegro package but theres one thing i need help with. Everytime i use datafiles in my apps and try to compile them i get the error: "can not convert char to *bitmap" this happens everytime i try to access an object in a datafile even though the datafile is loaded into memory. Any help is much appreciated. Cheers
welburn1010
welburn1010
draw_sprite(active, game_dat[file].dat, x, y);
draw_sprite(active, game_dat[file].dat, x, y);
draw_sprite(active, game_dat[file].dat, x, y);

active being bitmap to screen
game_dat = datafile

And i have included the datafile header.

and the datafile has been loaded the errors only come up on the draw_sprite fucntion which accesses the datafile.

is there anything else i need to add ?

cheers.
konForce
konForce
It sounds like you are using C++, in which case you'll need to cast:
draw_sprite(active, (BITMAP*)game_dat[file].dat, x, y);
welburn1010
welburn1010
Hi

Cheers for that it worked perfectly much appreciated.

Thanks,

Welburn1010

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.