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 / Trouble loading bitmaps/sprites

Author
Message
Bullet butter
18
Years of Service
User Offline
Joined: 5th Mar 2006
Location:
Posted: 5th Mar 2006 19:22
Ok, I am pulling my hair out with this problem. Everytime I try to load a bitmap or a sprite, nothing is displayed on my screen. Here is my code:



It loads the program but my bitmap is not displayed, just a blank screen. The bitmap is in the correct project folder and it IS a bitmap.

Attachments

Login to view attachments
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 5th Mar 2006 20:04
sync?

FREE Automatic file updates for your distributed Games and Apps - see Program Announcements Forum - DBP Demo
Bullet butter
18
Years of Service
User Offline
Joined: 5th Mar 2006
Location:
Posted: 5th Mar 2006 20:11
Added sync on to the top of the code and still nothing will display
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 5th Mar 2006 21:47
When you do this: "LOAD BITMAP "F15.bmp",1" you tell Darkbasic to load that bitmap to screen 1. Screen zero is the main screen. Anytime you load a bitmap on a different screen other than zero it changes the current working screen to the number you use (in this case screen 1). You need to change the current working screen back to zero before you can see anything. To change it use "set current bitmap 0" after getting the image.




Also you can save from having to change bitmaps if you use "load image" instead of "load bitmap". "load image" is both "load bitmap" and "get image" in one command. It's mainly used for images that only have one graphic you want (load bitmaps to grab multiple images on the same picture).




CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 5th Mar 2006 23:24
i meant sync right before wait key, and what grog said

FREE Automatic file updates for your distributed Games and Apps - see Program Announcements Forum - DBP Demo

Login to post a reply

Server time is: 2024-09-24 17:31:48
Your offset time is: 2024-09-24 17:31:48