Page 1 of 2
QB Layers?
Posted: Tue Jan 25, 2005 10:03 pm
by Mitth'raw'nuruodo
Does QB have something like a .Layers object, you should know what I'm taking about.
Posted: Tue Jan 25, 2005 10:06 pm
by Rattrapmax6
If you on layering like CADing, I don't think so,.. course, I might be on a diff subject..

Posted: Tue Jan 25, 2005 10:10 pm
by Mitth'raw'nuruodo
hmmm...CADing....CADing....where hav I heard that before. Isn't that like some Architect Graphing software?
Ummm...I'm talking about like lets say you have a peice of graphic that you want in the forground, but all you want is to change its position and everything in the layer behind it drawn is not messed around with, like the internet uses layers, the mouse uses layers, windows uses layers.
Well, that's what I mean.
Posted: Wed Jan 26, 2005 4:13 am
by Nodtveidt
I thought you knew lots about QB?
QB doesn't natively support layers, but you can use a graphics library which does.
CAD: Computer Assisted Drafting (or Design, depending on what industry you're in).
Posted: Wed Jan 26, 2005 6:38 am
by {Nathan}
Actually, QB does support layers. In screen 7, there are different pages. Use pcopy to copy pages and look at the screen syntax on how to set the page (leave colorswitch blank)
Posted: Wed Jan 26, 2005 11:04 am
by Mitth'raw'nuruodo
Now...Now...I didn't say I knew everything Nek.

. I'm probably going to get another identical comment from you with my other post on the SPACE WARP [POLL] topic. *sigh* Everyone's learns something every day and if they don't shame on them.
So SCREEN pages are Layers Nate, I thought they we're more like "pages" where one page shows up at a time on the SCREEN.
But if they all show up on the SCREEN in different Layers then thats a different story....I 'll have to experiment.
BTW Nate, SCREEN pages are NOT limited to SCREEN 7 that much I know, other SCREENs have them in different numbers, I believe some some SCREENs have 1, 2, 8, and some as many as you want as long as there is memory availible for them.

Posted: Wed Jan 26, 2005 11:21 am
by Z!re
QB Help:
Code: Select all
VGA Screen Modes:
Rows and Page
Mode Columns Resolution Size Pages
0 40x25 360x400 - 8
40x43 320x350 - 8
40x50 320x400 - 4
80x25 720x400 - 8
80x43 640x350 - 4
80x43 720x350 - 4
80x50 640x400 - 4
80x50 720x400 - 4
1 40x25 320x200 16K 1
2 80x25 640x200 16K 1
7 40x25 320x200 32K (a)
8 80x25 640x200 64K (a)
9 80x25 640x350 128K (a)
80x43 640x350 128K (a)
10 80x25 640x350 64K (b)
80x43 640x350 64K (b)
11 80x30 640x480 64K 1
80x60 640x480 64K 1
12 80x30 640x480 256K 1
80x60 640x480 256K 1
13 40x25 320x200 64K 1
_____________________________________________________________________
(a) Pages = Screen memory divided by page size. Eight page maximum.
(b) Pages = Screen memory divided by 2 divided by page size. Eight
page maximum.
Note that screen 0 is text only.
QB has no layer support.
Screen pages are not layers.
If you use screen 13 you can easily write your own layer handling engine. Quite easy.
Posted: Wed Jan 26, 2005 11:32 am
by Mitth'raw'nuruodo
Posted: Wed Jan 26, 2005 11:55 am
by Z!re
64kb is the maximum amount of memory you can allocate in a array in QB, an array acts like a layer or buffer.
As long as the screen is 64kb or less in size, you can create layers.
The reason many go with screen 13, is that you get 256 colors.
I suggest you download SuperPut, and SetVideoSeg
And learn how to use them.
Posted: Wed Jan 26, 2005 1:10 pm
by Mitth'raw'nuruodo
Well I already seen SetVideoSeg and it was way beyound me.
But I believe I could come up with a layer-based scheme function on my own.

Posted: Wed Jan 26, 2005 3:32 pm
by Rattrapmax6

Sorry, lol,. I have a AutoCAD sorta program called IntelliCAD... and layering is when you well layer your drawing to be able to brake it down in parts...
I've heard of a masking that works on backround layers tho. Like your mouse comment,. say I'm going to set a sprite on the backround, I capture that little bit of space where its going to go, then lay the sprite.
When I move the sprite, I set the mask back where it went, capture the next sprite location, then set the sprite there. If thats what you want, its right simple.

Posted: Wed Jan 26, 2005 3:55 pm
by Mitth'raw'nuruodo
Yes, ok, thanks for the help. I got it.
The reason I was asking because I wanted to start playing with the mouse a little. AKA make my own mouse cursor that corresponds to the mouse. Now that I think about it pretty simple, right?
Just gotta get mouse coord, get other graphic points, clear screen, draw other graphic points, draw mouse cursor at points, pause, loop
This will work because all layers is is just sorting the order of drawing the objects. The ones in the back first to the ones on top. They will just cover up one another, simple. Since the mouse is on the top layer, you just draw it last and no harm comes to your graphics, you just have to draw everything every loop. Or at least everytime your grapics change or the mouse coordinates....
I was just wondering if there was something in QB that would do that automaticaly. But I'll just have to do it manually...

Posted: Wed Jan 26, 2005 5:02 pm
by Nodtveidt
Doing a manual mouse cursor is rather easy. You have to take a couple things into consideration though:
1. You'll need an array just as large as the mouse cursor to grab the pixels behind the cursor
2. Unless you're using XOR to PUT it, you'll need a mask array as well, which will also be the same size
For a normal mouse cursor, the trick is to turn the cursor off before doing any blitting. Then, once your blits are done, turn it back on.
Posted: Wed Jan 26, 2005 5:05 pm
by Mitth'raw'nuruodo
Umm...Nek I think I like my way better (artifical layers). Read my post above.
But if flickering gets to be a problem then I'll have to do it the other way.

Posted: Wed Jan 26, 2005 8:15 pm
by Z!re
Just sort by a depth value, and draw the objects deepest into the screen first, with the mouse being the last.
Posted: Wed Jan 26, 2005 8:36 pm
by Mitth'raw'nuruodo
Thank you Z!re thats what I was talking about.

. But thanks.
Posted: Wed Jan 26, 2005 11:53 pm
by Nodtveidt
You want an entire layer for a mouse cursor? Wow, talk about inefficient.

Posted: Thu Jan 27, 2005 12:05 am
by Z!re
He doesent mean layers, he means Z-Ordering sprites/objects
Posted: Thu Jan 27, 2005 1:29 am
by Nodtveidt
Umm...that's common practice...

Posted: Thu Jan 27, 2005 1:52 am
by Z!re
Yup, thats why he wants to do it, everyone realizes it's good
