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 / Get image black screen

Author
Message
Zombie 20
13
Years of Service
User Offline
Joined: 26th Nov 2006
Location: Etters, PA
Posted: 2nd Sep 2010 23:05
Hello all, I have a little sample background (bmp file) I would like to paste to the screen as a test screen for a little side project now that I have a week off of school. I've been playing around here for about 40 minutes or so and can't seem to get my image to display, now I can get a little square guy animated to my mouse cursor so I didn't really think this would be all that difficult. Ah well, I am rambling again.

Here is the code, nice and simple.



I would appreciate any advice on what I am missing, thank you again. I will include the sample paint background as well.


Coffee coffee coffee coffee coffee coffee cappacino, JAVA!

Attachments

Login to view attachments
TheComet
12
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 2nd Sep 2010 23:37
try turning the backdrop on, and loading the file as an image. Also, you can ditch the cls if you have the backdrop on:



TheComet

Zombie 20
13
Years of Service
User Offline
Joined: 26th Nov 2006
Location: Etters, PA
Posted: 3rd Sep 2010 00:17
works like a charm, thanks comet!!


Coffee coffee coffee coffee coffee coffee cappacino, JAVA!
BN2 Productions
16
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 3rd Sep 2010 08:48
Just to fix your first example, it WAS working, but when you load a bitmap using LOAD BITMAP, that bitmap becomes the current working one. So it WAS pasting the image at the mouse coordinates, but it was pasting it on bitmap 1 instead of bitmap 0 (which is the screen).

The fix is right before the DO-LOOP put the command

SET CURRENT BITMAP 0

Great Quote:
"Time...LINE??? Time isn't made out of lines...it is made out of circles. That is why clocks are round!" -Caboose
Zombie 20
13
Years of Service
User Offline
Joined: 26th Nov 2006
Location: Etters, PA
Posted: 3rd Sep 2010 14:27
@BN2 - Ah I see I understand now. And I suppose it is so much better to ask then to sit in a dark corner going what do i do now?


Coffee coffee coffee coffee coffee coffee cappacino, JAVA!

Login to post a reply

Server time is: 2020-08-12 02:11:59
Your offset time is: 2020-08-12 02:11:59