Page 1 of 1

Screen 12 isn't working...

Posted: Tue Jan 22, 2008 10:08 pm
by Mentat
I updated my compiler, and now when I use SCREEN 12, nothing will draw.

Waddaya mean?

Posted: Wed Jan 23, 2008 2:37 am
by burger2227
You wrote your own compiler(doubtful) or you went for a better virgin?

What is your problem Man? Get a version that woks pal.

BTW ass, respond to your other posts or get lost!

Ted

Posted: Wed Jan 23, 2008 7:12 am
by Mentat
It's a FreeBasic compiler (0.18.2). I updated it by changing the FB directory in the IDE.

Hence "Pete's QBASIC Site Forum Index -> Freebasic Questions & Answers". :D

Posted: Wed Jan 23, 2008 8:51 am
by Nodtveidt
Ignore burger, he's an assclown troll just looking for a response from you.

I gave screen 12 a try with the latest beta (0.18.3b) and indeed, it doesn't work. It works fine with the build I generally use (0.14b).

EDIT: I was trying something foolish (using &HFFFFFF as the color) and it didn't work. I changed it to 15 and it worked. It seems that SCREEN 12 more closely emulates QB's SCREEN 12 now.

Code: Select all

screen 12
dim a as integer
for a = 0 to 639 step 3
line (0,0)-(a,479),&HFFFFFF
next a
do: loop while inkey$=""
worked fine in 0.14b but not in 0.18.3b. However

Code: Select all

screen 12
dim a as integer
for a = 0 to 639 step 3
line (0,0)-(a,479),15
next a
do: loop while inkey$=""
works fine in 0.18.3b.

Posted: Wed Jan 23, 2008 5:52 pm
by Mentat
Fixed it. Thanks. Has the color issue been adressed in the FB community?

Posted: Wed Jan 23, 2008 6:29 pm
by Lachie Dazdarian
Tried using ScreenRes and setting the desired screen width, height and bit-depth like that? Not many still use Screen, unless prefering to code with -lang QB.

Posted: Wed Jan 23, 2008 6:40 pm
by Mentat
There's another way? I've been using screen 12 due to the fact it's the only one I know enough, and I'm used to the dimensions of the screen.

[edit] Oh. Is there a way to get the color to use &h _ _ _ _ _ _? And how would I get it to read a variable?

Posted: Wed Jan 23, 2008 7:49 pm
by Nodtveidt
SCREENRES xpixels, ypixels, bits-per-pixel, video pages, options (set to 1 for fullscreen)

That's how I use it; there might be more to it though. I think it can also set up an opengl window but I never use it for that so I don't remember how to do it. Look it up in the FB doc wiki if you need more info.

Posted: Fri Jan 25, 2008 12:57 pm
by BadMrBox
Set the flag to GFX_OPENGL or &h02 for opengl window.

@Mentat
You can use the RGB/RGBA commands.

Using &h seems to work dandy in any mode but 8bit.

Code: Select all

screenres 640,480,32
do
Line(0,0)-(319,479), &hFFFFFF
Line(639,0)-(320,479), RGB(0,0,255) 
loop until inkey$="q"

Posted: Tue Jan 29, 2008 8:07 pm
by Mentat
The RGB() isn't working for me. :(

Posted: Tue Jan 29, 2008 9:21 pm
by Nodtveidt
Don't bother with RGB, just use a hex value.

RGB(0,0,255) would be &H0000FF

Posted: Thu Jan 31, 2008 3:30 pm
by Mentat
Ohh...I think I figured it out. I needed the screen to have 32 bits per pixel.
Thanks.

Posted: Sat Feb 02, 2008 4:31 am
by BadMrBox
Gah, sorry Mentat. I was sure I hade mentioned that you have to use higher that 8bits.