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 / How to do a Wallpaper

Author
Message
Tidus
22
Years of Service
User Offline
Joined: 17th Oct 2003
Location:
Posted: 30th Oct 2003 16:15
How can a do the Opening screen with an image or bitmap and center the image iam using a jpg image.?
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 30th Oct 2003 16:54
If you mean a splash screen, I suggest starting in windowed 640x480 mode and loading an image into bitmap 0, or loading an image and pasting it.

Either:
LOAD BITMAP "Title.jpg",0

or

LOAD IMAGE "Title.jpg",1
PASTE IMAGE 1,0,0
SYNC

Don't do too much if your using windowed mode and having to change the resolution, once you change the resolution you'll often have to re-load the media.

If you don't want a splash screen, the same commands apply, except you might want to look into sprites instead, you can stretch a sprite over the whole screen:

LOAD IMAGE "Title.jpg",1
SPRITE 1,0,0
SIZE SPRITE 1,screen width(),screen width()
SYNC
`Wait for a keypress
SUSPEND FOR KEY
`Tidy up
DELETE SPRITE 1
DELETE IMAGE 1

You just got to find a way that suits your program best, personally - I'm more likely to go for a 640x480 window with display options etc, then change the resolution and colour depth before running the program properly.

HTH,

Van-B

Login to post a reply

Server time is: 2026-07-26 13:02:06
Your offset time is: 2026-07-26 13:02:06