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.

DarkBASIC Professional Discussion / Why must I 'load image' more than once.

Author
Message
bitoart
22
Years of Service
User Offline
Joined: 20th Nov 2003
Location: California
Posted: 30th Nov 2003 10:24
I use the LOAD IMAGE command at program start.
I then PASTE it (the image) in a subroutine that includes CLS, PASTE and PRINT message$ in that order.
The first loop through, all workes fine.
When I GOSUB the loop again the image will no longer paste. -as if it forgets where the image is??!!
I can fix this by including LOAD IMAGE in the subroutine: CLS,LOAD IMAGE, PASTE,PRINT
Why should I need to reload this image every time? -thanks all
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 30th Nov 2003 12:23
Huh? You don't need to load you image each time, but you may (depending on your code) need to paste it again.

How about a bit of example code so that we can help you properly?
bitoart
22
Years of Service
User Offline
Joined: 20th Nov 2003
Location: California
Posted: 1st Dec 2003 21:46
Hey! I trimmed down the program so I could paste a sample here and think I've found the cause to be a strange bug in DB itself. What do you think? It appears I need to PRINT something... anything in a routine before I PASTE an image, or it wont take. Play with sample code and see for yourself. (You'll need your own image though).
OSX Using Happy Dude
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 1st Dec 2003 22:02
Its possible that two SYNC's were needed... It works with and without the PRINT command for me...


Mirrors are more fun than television. Well, that was fun, in a not-so-fun sort of way...
bitoart
22
Years of Service
User Offline
Joined: 20th Nov 2003
Location: California
Posted: 1st Dec 2003 22:20
Yeah, maybe a SYNC is required here.
It worked for you eh? Did you enter some text? - that is when the background disappears.
Age Piranha
22
Years of Service
User Offline
Joined: 27th Nov 2003
Location: Paris
Posted: 1st Dec 2003 22:49
I'm not sure that's your solution, but if you change something to your screnn (window on/off, set display mode...), the video memory is empty by the program, you need to reload all image...
So ther is a bug, that's why they aren't error message...

Sublimons La Beauté, but you can't understand
www.pirasite.fr.st , if you speak french
OSX Using Happy Dude
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 1st Dec 2003 22:51
Yes, typed in some text, and the image stayed there...


Mirrors are more fun than television. Well, that was fun, in a not-so-fun sort of way...

Login to post a reply

Server time is: 2026-07-27 01:33:00
Your offset time is: 2026-07-27 01:33:00