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 Discussion / Problem with bitmaps

Author
Message
ManiacBR
18
Years of Service
User Offline
Joined: 26th Oct 2006
Location:
Posted: 5th Nov 2006 16:23
I'm trying to make my program so that when I press "I" on the keyboard the current bitmap will disapear and another one will appear on the screen.
Newbie stuff I know, but when I press "I" the current bitmap dissapears, but the screen just remains blank. I cant figure out what's wrong so could someone help?



I've taken the unessecary code out to make it more readable for you.

Strange thing is, is that when i ste the current bitmap at the top to 2 it still comes up showing bitmap 0.

Help please.
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 5th Nov 2006 23:57 Edited at: 5th Nov 2006 23:58
It's because Darkbasic always keeps bitmap 0 as the viewing screen. "set current bitmap x" changes the working screen so you can manipulate graphics without the user seeing whats happening. Mainly for loading a bitmap with multiple images so you can capture them individually with "get image".

It's better to use "load image" instead of bitmap and paste the images to the screen. "load image" is best when the images are single... it also eliminates the need to use "get image" and reseting the current working bitmap.

Login to post a reply

Server time is: 2025-05-25 22:47:58
Your offset time is: 2025-05-25 22:47:58