Screen 12 isn't working...

The forum for all of your Freebasic needs!

Moderators: Pete, Mods

Post Reply
User avatar
Mentat
Veteran
Posts: 409
Joined: Tue Aug 07, 2007 3:39 pm
Location: NC, US

Screen 12 isn't working...

Post by Mentat »

I updated my compiler, and now when I use SCREEN 12, nothing will draw.
For any grievances posted above, I blame whoever is in charge . . .
User avatar
burger2227
Veteran
Posts: 2466
Joined: Mon Aug 21, 2006 12:40 am
Location: Pittsburgh, PA

Waddaya mean?

Post 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
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
User avatar
Mentat
Veteran
Posts: 409
Joined: Tue Aug 07, 2007 3:39 pm
Location: NC, US

Post 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
For any grievances posted above, I blame whoever is in charge . . .
Nodtveidt
Veteran
Posts: 826
Joined: Sun Jul 25, 2004 4:24 am
Location: Quebradillas, PR
Contact:

Post 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.
User avatar
Mentat
Veteran
Posts: 409
Joined: Tue Aug 07, 2007 3:39 pm
Location: NC, US

Post by Mentat »

Fixed it. Thanks. Has the color issue been adressed in the FB community?
For any grievances posted above, I blame whoever is in charge . . .
Lachie Dazdarian
Veteran
Posts: 202
Joined: Mon Aug 30, 2004 6:18 am
Location: Croatia
Contact:

Post 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.
Lachie Dazdarian - The Maker Of Stuff
User avatar
Mentat
Veteran
Posts: 409
Joined: Tue Aug 07, 2007 3:39 pm
Location: NC, US

Post 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?
Nodtveidt
Veteran
Posts: 826
Joined: Sun Jul 25, 2004 4:24 am
Location: Quebradillas, PR
Contact:

Post 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.
User avatar
BadMrBox
Veteran
Posts: 86
Joined: Tue Feb 28, 2006 12:19 pm

Post 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"
User avatar
Mentat
Veteran
Posts: 409
Joined: Tue Aug 07, 2007 3:39 pm
Location: NC, US

Post by Mentat »

The RGB() isn't working for me. :(
For any grievances posted above, I blame whoever is in charge . . .
Nodtveidt
Veteran
Posts: 826
Joined: Sun Jul 25, 2004 4:24 am
Location: Quebradillas, PR
Contact:

Post by Nodtveidt »

Don't bother with RGB, just use a hex value.

RGB(0,0,255) would be &H0000FF
User avatar
Mentat
Veteran
Posts: 409
Joined: Tue Aug 07, 2007 3:39 pm
Location: NC, US

Post by Mentat »

Ohh...I think I figured it out. I needed the screen to have 32 bits per pixel.
Thanks.
For any grievances posted above, I blame whoever is in charge . . .
User avatar
BadMrBox
Veteran
Posts: 86
Joined: Tue Feb 28, 2006 12:19 pm

Post by BadMrBox »

Gah, sorry Mentat. I was sure I hade mentioned that you have to use higher that 8bits.
Post Reply