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 / Simple sprite inconsistency DBC/DBPro

Author
Message
roswell
21
Years of Service
User Offline
Joined: 17th Dec 2002
Location: United States
Posted: 22nd Apr 2003 08:12 Edited at: 22nd Apr 2003 08:13
Can someone tell me why the following code works just fine in DBClassic, but it won't work in DBPro? In DBClassic, I get a section of the bitmap, "character.bmp" and paste it at 100 x 100 on the screen. In DBPro, I just get a black screen. Is this a problem on my system, or is there something wrong with the code? I would think this would be the simplest process!



My relevant system specs are:

Dual AMD Athlon 2.0Ghz / 1GB RAM / GeForce Ti4200 128MB

/* You are not expected to understand this. */

Dual Athlon 2.0/1GB RAM/GeForce Ti4200-128/Win2000 Pro
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 22nd Apr 2003 09:49
try something more akin to this

replace my temp img code with your loading image.




Pal
21
Years of Service
User Offline
Joined: 13th Apr 2003
Location:
Posted: 22nd Apr 2003 10:59
i think codes of db and dbpro are different.

CloseToPerfect
21
Years of Service
User Offline
Joined: 20th Dec 2002
Location: United States
Posted: 22nd Apr 2003 16:11
between LOAD BITMAP and GET IMAGE you need a SET CURRENT BITMAP 1 command. After the GET IMAGE command use SET CURRENT BITMAP 0 to switch back to the screen. In DBP bitmaps are pages of video ram. You must select which page you want to work off of 0 being the screen.

If it's single picture you could just use LOAD IMAGE

CTP

roswell
21
Years of Service
User Offline
Joined: 17th Dec 2002
Location: United States
Posted: 22nd Apr 2003 16:27
You're right CloseToPerfect, but why do I have to set the current bitmap back to the screen after I grab the image? I know the current bitmap has to be 0 when pasting bitmaps to the screen, but is it the same for images and sprites as well?

/* You are not expected to understand this. */

Dual Athlon 2.0/1GB RAM/GeForce Ti4200-128/Win2000 Pro
CloseToPerfect
21
Years of Service
User Offline
Joined: 20th Dec 2002
Location: United States
Posted: 23rd Apr 2003 03:33
Well, bitmaps by DBP anyway are section of video memory. You can define any size of bitmap or as many as 31 besides #0 as long as you have enough memory. Bitmap 0 is the screen it is the only one you can see. When you use SET CURRENT BITMAP it directs all drawing to the section of video memory you have set aside for that bitmap. To view what is on another bitmap you can COPY BITMAP from number, 0(screen). You can copy any bitmap to any bitmap but you may not copy the screen bitmap ,0, to any bitmap, I don't know if thats a bug or if that has to do with how DBP handle the screen in windows. So, you can load in bitmaps and get images from the alter them draw on them whatever without effecting the screen but bitmap 0 is the only one you will see.

CTP

Login to post a reply

Server time is: 2024-09-20 06:27:46
Your offset time is: 2024-09-20 06:27:46