Page 1 of 3
Help with DATA graphics
Posted: Thu Feb 10, 2005 12:55 pm
by RayBritton
If you do:
Code: Select all
DATA 01,01,01,01
DATA 01,00,00,01
DATA 01,00,00,01
DATA 01,01,01,01
FOR x = 1 TO 4
FOR x = 1 TO 4
READ z
PSET(x, y), z
NEXT
NEXT
DIM box(4*4)
GET (0, 0) - (4, 4), box
but i get a syntax error about the PSET(x, y), z
so i redid it but now i get a syntax about GET (0,0) - etc.
Posted: Thu Feb 10, 2005 3:13 pm
by Z!re
Code: Select all
DATA 01,01,01,01
DATA 01,00,00,01
DATA 01,00,00,01
DATA 01,01,01,01
SCREEN 13
FOR x = 1 TO 4
FOR x = 1 TO 4
READ z
PSET(x, y), z
NEXT
NEXT
DIM box(4*4)
GET (0, 0) - (4, 4), box
You need to initialize graphics mode before you can do any graphics.
Is this QB or FB?
Posted: Thu Feb 10, 2005 3:26 pm
by Rattrapmax6
Graphics mode or not, you messed it up in one spot. Your not reading to a Y cordinate,. The FOR.. NEXT contol reading time to cords X & Y,.. This is what you got..
Code: Select all
FOR x = 1 TO 4
FOR x = 1 TO 4
READ z
PSET(x, y), z
NEXT
NEXT
This is what you need to do,. look completely repaired code.
Code: Select all
DATA 01,01,01,01
DATA 01,00,00,01
DATA 01,00,00,01
DATA 01,01,01,01
SCREEN 13
FOR y = 1 TO 4 ' You need to read Y
FOR x = 1 TO 4 ' Then X, not just X
READ z
PSET(x, y), z
NEXT
NEXT
DIM box(4*4)
GET (0, 0) - (4, 4), box
And make sure you read Y b4 X like I did above, and like Z!re said, you need it in SCREEN 13, or any graphic supporting screen, but 13 is the best...
Posted: Thu Feb 10, 2005 3:35 pm
by {Nathan}
13? What about the new bigger modes thata Adugun A. Polack found?!
Posted: Thu Feb 10, 2005 3:40 pm
by Rattrapmax6
, Do any of them have 256 color pallet, I looked over what I could at the time and din't see any??
Hay Ray, There more post above this one,
, Helpful ones too
Posted: Thu Feb 10, 2005 3:50 pm
by Mitth'raw'nuruodo
Ya Rattrap I saw that right away too....
You got here before me though....heh.
Oh well,
Posted: Thu Feb 10, 2005 3:55 pm
by Rattrapmax6
Yeah, Heh, I was looking for your post, but like you said, I got here first..
At least you got back up when it comes to helping other QBers tho,.
Posted: Thu Feb 10, 2005 4:00 pm
by Mitth'raw'nuruodo
Posted: Thu Feb 10, 2005 5:38 pm
by {Nathan}
16 ATTRIBUTES and 256 COLORS! Lots of colors, little atts (like screen 12)!
Posted: Thu Feb 10, 2005 9:51 pm
by Mitth'raw'nuruodo
No I like 13 because of its 256 color ATTRIBUTES!!!
Helpful for those 3D programs (shading)....Lol
Posted: Thu Feb 10, 2005 10:13 pm
by Rattrapmax6
No, he's on some bigger modes a QBer over at QBNews found,. right inpressive..
Posted: Fri Feb 11, 2005 12:32 am
by RayBritton
thanks, the problem was i forgot to put it in a screen
the two xs wasn't in my code i typed it wrong
thanks again
Posted: Fri Feb 11, 2005 7:53 am
by Mitth'raw'nuruodo
Welcome
Ummm Rattrap he discovered a new screen mode I thought there were only 14?
Posted: Fri Feb 11, 2005 8:42 am
by Z!re
Change to freeBASIC:
SCREEN 21 = 1280x1024x8bit
Or just use SDL directly like I do, and get any resolution you want, with any bithdepth you want.
Posted: Fri Feb 11, 2005 11:48 am
by Rattrapmax6
Z!re wrote:Change to freeBASIC:
SCREEN 21 = 1280x1024x8bit
Or just use SDL directly like I do, and get any resolution you want, with any bithdepth you want.
21
Thats how you get that screen!!
Crap, I've have a heck of a time with the SDL lib thing, or on the exapmle things, can't get it to go, or find 'em, what ever the error is.. I'll just stick with the 21 for now
Say, what the SCREEN for 800*600*8bit??
Posted: Fri Feb 11, 2005 3:09 pm
by Mitth'raw'nuruodo
Holy crap that's what XP has!
hmm...aw.
I didn't know QB had a 21 SCREEN.....
Posted: Fri Feb 11, 2005 5:04 pm
by Rattrapmax6
NO!! We are on FREEBASIC!!
The new screens in QB are moded SCREEN 12 and another I think,. but no, SCREEN 21 is FreeBasic...
Posted: Fri Feb 11, 2005 5:45 pm
by Mitth'raw'nuruodo
Oh, I'm sorry....You know this is a QB site so I assumed that you were talking about QB...stupid thinking really...
Ummm...I don't know what you just said but QB has modes 0-14 last time I checked....
Posted: Fri Feb 11, 2005 6:49 pm
by Rattrapmax6
Here, Mitth, look at this...
http://forum.qbasicnews.com/viewtopic.p ... highlight=
Takes you to the thread with the new modes,..
Posted: Fri Feb 11, 2005 7:08 pm
by Mitth'raw'nuruodo
hmmm...confusing...very confusing...