Qbasicnews.com
October 14, 2019, 10:59:38 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: GFXlib "DRAW" command  (Read 7018 times)
steven_basic
Senior Member
**
Posts: 244


WWW
« on: February 03, 2005, 01:52:41 PM »

Trying do do a simple command with the DRAW function...

Code:
SCREEN 12
DRAW "C15 BM100,100 L5E5F5L5"
sleep


It should go to position 100, 100 and draw a simple triangle, but I am not seeing anything on the screen.  I have tried various commands, but can't seem to get any screen/draw combinations to work
Logged

ature has its way of warning a person away from danger:  The distinct black and white coloration on a skunk, the chilling buzz of a rattlesanke, a redneck handing you his beer and saying "Watch this!"
lillo
Guru
**
Posts: 269


WWW
« Reply #1 on: February 03, 2005, 03:20:14 PM »

Spaces inside the commands string aren't supported: the routine thinks they are unknown commands, so it exits without drawing anything. Actually I didn't even know QB was supposed to accept spaces, I missed it from the QB DRAW inline documentation.

I've now made it accept space and tab characters; new version in CVS. Until new version is out, just remove spaces from your string and it'll work as it should.
Logged

ngelo Mottola - EC++
steven_basic
Senior Member
**
Posts: 244


WWW
« Reply #2 on: February 03, 2005, 03:24:10 PM »

Thanks.
I thought I had tried that (no spaces), but apparently I did not.

Works great!
Logged

ature has its way of warning a person away from danger:  The distinct black and white coloration on a skunk, the chilling buzz of a rattlesanke, a redneck handing you his beer and saying "Watch this!"
lillo
Guru
**
Posts: 269


WWW
« Reply #3 on: February 03, 2005, 03:51:55 PM »

Actually your example led me to discover there were rounding errors in DRAW... infact your triangle has bad corners. Now fixed in CVS.
Logged

ngelo Mottola - EC++
Jofers
Been there, done that
*****
Posts: 1040



WWW
« Reply #4 on: February 03, 2005, 05:37:44 PM »

Wow... DRAW support.  I thought I'd never see the day when that old thing gets put back into the mainstream Smiley
Logged
steven_basic
Senior Member
**
Posts: 244


WWW
« Reply #5 on: February 03, 2005, 06:22:12 PM »

Quote from: "lillo"
Now fixed in CVS.


Any chance on getting a pre-compiled lib for download to replace the one in 0.11 without having to re-compile source?
Logged

ature has its way of warning a person away from danger:  The distinct black and white coloration on a skunk, the chilling buzz of a rattlesanke, a redneck handing you his beer and saying "Watch this!"
lillo
Guru
**
Posts: 269


WWW
« Reply #6 on: February 03, 2005, 06:32:45 PM »

you have to wait at least tomorrow... I'm in the middle of big internal changes in the win32 side of things, adding a GDI driver alongside the existing DirectX one, for systems where DX is not installed.
Logged

ngelo Mottola - EC++
steven_basic
Senior Member
**
Posts: 244


WWW
« Reply #7 on: February 03, 2005, 07:11:50 PM »

No problem.  

In the meantime, here is a little "fun with DRAW" for others to enjoy:

The source for this "demo" is located here:
testshipslide.bas

This is just "playing around" code and is not a complete anything.  However, I would like to know if others see the odd "warping effect" when either the player or the target slides across the center of the screen.  I wonder if its the GFXlib, or if its my video card...
Logged

ature has its way of warning a person away from danger:  The distinct black and white coloration on a skunk, the chilling buzz of a rattlesanke, a redneck handing you his beer and saying "Watch this!"
mipooh
Member
*
Posts: 56


WWW
« Reply #8 on: February 04, 2005, 12:40:30 AM »

I tried that and then I tried ALT+Enter to get fullscreen mode....
That made something like an endless loop, the mousecurser was flickering, so I stopped the program with Ctrl+Alt+Delete...
Mipooh
Logged
Dr_Davenstein
Na_th_an
*****
Posts: 2052


« Reply #9 on: February 04, 2005, 04:30:29 AM »

I didn't see the weird warping effect. It just has a couple of odd placed pixels when I go full-screen. That's the same thing QB did.  It's pretty funny though... reminds me of Atari 2600.  

:lol:
Logged
steven_basic
Senior Member
**
Posts: 244


WWW
« Reply #10 on: February 04, 2005, 11:17:13 AM »

I just dl'ed and used the latest gfxlib to recompile the program.  I had to change the following lines:

Code:

'  add the include
'$include:'win/gdi32.bi'

'  comment out the folowing
'#define FALSE 0
'#define TRUE  NOT FALSE


The weird "warping" effect as drawn graphics passed over the center line of the window is now gone, so it must have been something in the gfxlib (or a combo of it and my graphics card).
Logged

ature has its way of warning a person away from danger:  The distinct black and white coloration on a skunk, the chilling buzz of a rattlesanke, a redneck handing you his beer and saying "Watch this!"
steven_basic
Senior Member
**
Posts: 244


WWW
« Reply #11 on: February 04, 2005, 11:27:53 AM »

Quote from: "Dr_Davenstein"
It's pretty funny though... reminds me of Atari 2600.


I'm wondering about re-creating a space invaders type game using nothing but the draw statements...

Getting the DRAW strings for the invader characters would be the most time consuming.

Anyone want to "donate" an invader string?

Also, the file for the source link above has been updated with the couple of line changes.  It shouldn't make any difference which gfxlib is used to recompile.
Logged

ature has its way of warning a person away from danger:  The distinct black and white coloration on a skunk, the chilling buzz of a rattlesanke, a redneck handing you his beer and saying "Watch this!"
lillo
Guru
**
Posts: 269


WWW
« Reply #12 on: February 05, 2005, 07:35:40 AM »

The "warping" effect you described maybe was due to the same "blurry" window bug already reported... This was fixed in CVS so the gfxlib snapshot posted here was not affected by it anymore.
Logged

ngelo Mottola - EC++
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!