Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
DAM-OS Screen shots uploaded!!!
#31
Read my post. There comes the formula for SCREEN 12.

For SCREEN 13 you have 1+width%*height%\2.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#32
Hi,
The following code should work. You require 122 * 2 bytes = 244 bytes to hold your image.
Now you would ask how did I get this? Well the answer is that it is given is qb's help.
The following formula will give you number of bytes you will require to store the image:

Formula:
4+INT(((x2-x1+1)*(bits-per-pixel-per-plane)+7)/ 8 )*planes*((y2-y1)+1)

Values:
x2 = 20
y2 = 20
x1 = 1
y1 = 1
bits-per-pixel-per-plane = 1
planes = 4

Now since you are using an integer array, each element is capable of holding 2 bytes. Thus you would require only 122 elements to hold your image.

SCREEN 12
DIM SHARED icon%(122)
LINE (1,1)-(20,20), 7, bf
GET (1,1)-(20,20), icon%

I think if I remember correctly GET(0,0)... has a problem. You cant get at 0,0 Sad

My advice to you would be not to use screen 12 for coding GUIs but rather use Future Lib to create it.
It will give you more advanced control over your GUI and it extends QB's limits by using EMS/XMS memory and many more things Smile
Visit my site and see the screen shots of DAM-OS. I think that should change your mind. 8)

And next time before asking a question try to find the answer yourself. Because I didnt know this answer off-hand. I just went to QB's help > GET(graphics statement) > Details
and got the answer. It took me only a fraction of a second! :-?
Reply
#33
is that made in Qbasic :o
Reply
#34
doh! thanx for the help i didnt understand that formula! I agree get (0,0) dosnt work too well! Hey your gui looks awesome!
nthlon 1800+ OCed to 2800+ speeds
512 mg of crucial pc3200 ram
Radeon 9600 pro
.......
I know that computer is complete overkill for qb but hey, who cares
Reply
#35
I've never had a problem getting from (0,0)... What's the problem :? Maybe you are messing with coordinates. Note that for a 20x20 pixel sprite you get from (0,0) to (19,19) 'cause from 0 to 19 there are 20 pixels.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#36
Quote:I've never had a problem getting from (0,0)... What's the problem :? Maybe you are messing with coordinates. Note that for a 20x20 pixel sprite you get from (0,0) to (19,19) 'cause from 0 to 19 there are 20 pixels.

I think in screen 12 getting at 0,0 will cause an error in QB
Reply
#37
Quote:is that made in Qbasic :o

Yeah do you like it? 8)
Reply
#38
Quote:doh! thanx for the help i didnt understand that formula! I agree get (0,0) dosnt work too well! Hey your gui looks awesome!

Thanx 8)
Reply
#39
fat man.
url=http://www.spreadfirefox.com/?q=affiliates&id=0&t=79][Image: safer.gif][/url]
Reply
#40
Quote:fat man.

What does that mean in plain english?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)