Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Problems with sprites and bitmaps (DBC->DBPro)

Author
Message
ATHAN
21
Years of Service
User Offline
Joined: 11th Sep 2003
Location:
Posted: 29th Sep 2004 23:24
Hi,
I try to use the following code (that is working fine in DB ) with DBPro 5.6 that displays a single image on screen and waits for a keystroke.
The problem is that when I call load_dice function before the display_image, I see the image for a second or less, and then I get a blue screen!
After debugging I discover that the problem is with sprite commands! When I rem them there is no problem.

Why is happening and what is the solution on that?

thanks

Source:
path_graphics$="General\Graphics\"

load_dice(path_graphics$)

display_image(path_graphics$+"logo.bmp",0)
wait key

function display_image(imagename$,time_to_display)
print imagename$
wait key
load bitmap imagename$,20
copy bitmap 20,0
wait time_to_display
delete bitmap 20
endfunction

function load_dice(path$)
load image path$+"zari1.bmp",21
sprite 1,0,0,21
hide sprite 1
delete sprite 1
delete image 21
endfunction
Osiris
20
Years of Service
User Offline
Joined: 6th Aug 2004
Location: Robbinsdale, MN
Posted: 30th Sep 2004 06:51
some comands are different in dbpro you cant just copy and paste to it so check that out

anyone can be a hero, but a soldier can be a hero five minuets longer....
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 30th Sep 2004 07:12 Edited at: 30th Sep 2004 08:00
The problem may be that sprites turn the backdrop on and since you are not using manual syncing the back drop is covering the image. Have you tried putting the "backdrop off" command at the top of the program or change over to manual syncing "sync on".

[edit]
And this all cancels each other out

you are making it, then hiding it,then deleting it, and then deleting the image. all so fast you will not be able to see it without manual syncing. So what is it supposed to do?

ATHAN
21
Years of Service
User Offline
Joined: 11th Sep 2003
Location:
Posted: 1st Oct 2004 07:04
well the "delete sprite 1" should not be there! It is there by fault (remains of some debugging...).

Ok I ll try to play with sync on and backdrop off and I ll let u know

thanks
ATHAN
21
Years of Service
User Offline
Joined: 11th Sep 2003
Location:
Posted: 1st Oct 2004 07:17
well unfortunately when I use the backdrop off command, the screen does not turn in blue any more but now turns in black !!! And without displaying the bitmap at all!

Any ideas? Come on it shouldn't be that hard!

Login to post a reply

Server time is: 2024-11-27 10:38:28
Your offset time is: 2024-11-27 10:38:28