Drawing from a Datafile

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

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()?

Matthew Dalrymple

Double Post...
Other post

Thread #590707. Printed from Allegro.cc