Hmm will try
Well then it seems to work now.
one of those small mistakes. Thanks a lot of all the help.
since you can exit in the middle of a sound which gave an error just thought I would also have to stop the sounds before exit. Thanks again.
also took the advice and added
thanks for that to
now that the sound is there here is the second thing and I posted about this in 2004 having a problem grabbing from a datafile
|1||BITMAP *grabframe(BITMAP *source, int width, int height, int startx, int starty, int columns, int frame) |
|3|| BITMAP *temp = create_bitmap(width,height);|
|4|| int x = startx + (frame ) * width;|
|5|| //int y = starty + (frame ) * height;|
|7|| return temp;|
|11||temp = load_bitmap("ball.bmp",NULL);|
|12|| for (n = 0;n<6;n++)|
|13|| ball[n] = grabframe(temp,17,17,0,0,1,n);|
|15|| temp = load_bitmap("explode.bmp",NULL);|
|16|| for (n = 0;n<6;n++)|
|17|| explode[n] = grabframe(temp,17,17,0,0,1,n);|
I am sure this can be edited the same way to pull from the datafile aswell but the same technique seems not to work with BITMAP instead of SAMPLE
but that didn't seem to work on got this warning.
[Warning] passing arg 1 of `load_bitmap' from incompatible pointer type
compiles but error right away
ball[n] = grabframe((BITMAP *)data[EXPLODE_BMP].dat,17,17,0,0,1,n);
ball[n] = grabframe(data[EXPLODE_BMP].dat,17,17,0,0,1,n);
also give the same error or so it seems
If only the book "Game Programming All in One" talked more about datafiles then just 2 pages about using BMP's
Enough programming for now back to my "Sword of Truth" series