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.

2D All the way! / Bitmap Help?

Author
Message
Duderiza
20
Years of Service
User Offline
Joined: 27th Aug 2003
Location:
Posted: 15th Jan 2004 22:46
Hi All!! I was wondering, i have got small bitmaps of the alphabet, and i want to print them to the screen. I have managed to do that.

Example: if inkey$()="a"
load bitmap "letters\a.bmp"

But i want that letter to stay on screen, then when the next key is pressed, i want another bitmap to come up, to the right of the previous one. I just get it going over the top of the other bitmap deleting it. The set cursor command doesn't work. I would be grateful of any help. Cheers

Here is a code snippet of what im trying to say

CloseToPerfect
21
Years of Service
User Offline
Joined: 20th Dec 2002
Location: United States
Posted: 15th Jan 2004 23:23
1) you don't want the load bitmap command, this is to load a image straight to a area of video memory. use load image load each image into a memory slot (1 though 65000) are the image numbers you can use.

2) use paste image to paste the image to the screen. paste image uses screen coord to put the image where every you want.

3) now you will have to keep track of how many letters have been pressed and adjust the x-coord enough so the images wont overlap.

hope this helps, if not I'll work up an example.
CTP

RGT may be gone but the best DBP forum is still alive and kicking, check it out.
http://www.dannywartnaby.co.uk/rgt/
Duderiza
20
Years of Service
User Offline
Joined: 27th Aug 2003
Location:
Posted: 16th Jan 2004 19:41
Thanx CloseToPerfect, on DBC, paste image command is not recognised, i would be helpful if you could show me an example, so i can get my head around it more. I want to keep the BITMAP IMAGE LETTER up on the screen, then press another key, and i want that letter to be next to the first BITMAP IMAGE LETTER. an example would be nice.

Thanx
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 16th Jan 2004 20:26
Paste Image is a DB Classic command.

Duderiza
20
Years of Service
User Offline
Joined: 27th Aug 2003
Location:
Posted: 17th Jan 2004 00:09 Edited at: 17th Jan 2004 00:11
Hi Guys! This is my new code, its not right for what i want, its just the general picture of what im doing. I am so very grateful for more suggestions, and an example of anything that would help me, would be very good.

So i want the program to know when an image is on screen, i want it to know to display the next image so many pixels to the right of the previous image. I want sum order of commands that can work for all of the alphabet images.

Here is my code so far



Im not 2 good at programming, just a novice, just learning basic things, plus im young and doing other things, so i just cant concentrate on DB too much, got school n stuff. THANX 4 HELP
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 17th Jan 2004 01:27
Change all these...........paste image 30,0,0

To..


Top of Program
X = 0
Y = 0
.
.
.
.
Middle of Program
.
.
.
paste image 30,X,Y

X = X + 50

Rem the 50 can be any size!

Everytime you put a new letter on the screen..X = X + 50 or inc X,50


Pincho.

Duderiza
20
Years of Service
User Offline
Joined: 27th Aug 2003
Location:
Posted: 17th Jan 2004 13:29
Cheers Pincho, ur a real gr8 help. I wish i could think like you. But hey im new, and ill soon start to have common sense. But i'm very grateful 2 u. Cheers

Login to post a reply

Server time is: 2024-05-12 13:28:33
Your offset time is: 2024-05-12 13:28:33