Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
About console stuff in freeBASIC linux.
#1
Maybe the reply to this question is quite obvious, but I was wondering if there was any way to detect the console size from a fB program. Mainly using the linux port.

I want my word-wrapping functions to work in any terminal, and to stretch to the maximum width possible.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#2
Code:
blah = WIDTH
xResolution = blah AND &hFFFF
yResolution = blah SHR 16
Reply
#3
Thanks Smile I didn't know WIDTH was a function now. You made my day Big Grin
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#4
I found some about the behaviour of Width as a function which doesn't seem to be documented on the freebasic site: as soon as it is called, the cursor goes to the top-left of the console window/screen. Nothing very terrible as it can be walked around using POS and CSRLIN.

Are you aware of it?

I'm using Ubuntu, btw.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#5
I've noticed it too.
/post]
Reply
#6
Yep, same here on Gentoo in Konsole.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)