|
Drawing from a Datafile |
SkaxCo
Member #8,323
February 2007
|
If you are mousing over this...just please answer it. IT WON'T TAKE VERY LONG... Whenever I try to draw from a datafile, nothing happens. Just nothing- the screen stays black. However, it worked in a test file. This is the relevant code: #include "ZomOn.h" DATAFILE *zombo = load_datafile("ZomOn.dat"); int main(){ //init stuff here blit((BITMAP*)zombo[hud_back].dat, screen, 0, 0, 0, 480, 480, 60); } This doesn't work. It just stays black (the screen). Why? |
Johan Halmén
Member #1,550
September 2001
|
Too little information. There's nothing wrong in what you provided, so the error is somewhere else. Well, I would put the load_datafile() call inside main. I feel unsure with function calls outside function bodies. When does the function call happen? Before allegro_init(), which is inside main()? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Years of thorough research have revealed that what people find beautiful about the Mandelbrot set is not the set itself, but all the rest. |
Matthew Dalrymple
Member #7,922
October 2006
|
Double Post... =-----===-----===-----= |
|