Graphics array translation

Please use this Board for QBasic related requests ( file research, programming, etc.)

Moderators: Administrator, Global Moderator

Post Reply
Jehovah
Jr. Member
Posts: 24
Joined: Tue Oct 29, 2002 10:54 pm
Location: Boise, Idaho

Graphics array translation

Post by Jehovah »

i need to translate a graphics array into a normal numaric (in base 10 (dec)) arry in order to finish my drawing program.  Does anyone know the layout?  I would use DOS's DEBUG program, but I don't realy know how to use it.
Guest

Re: Graphics array translation

Post by Guest »

Do you want to use Assembler?

IF "YES" THEN

"USE MASM INSTEAD OF DEBUG!"

END IF
Guest

Re: Graphics array translation

Post by Guest »

i need to translate a graphics array into a normal numaric (in base 10 (dec)) arry in order to finish my drawing program.  Does anyone know the layout?  I would use DOS's DEBUG program, but I don't realy know how to use it.

Since the QB GET/PUT array is scanline based, you could do this:

Untested.

Xmax=Array(0)\8  'widht
Ymax=Array(1)

offset&=varptr(Array(2))
Def Seg=Varseg(Array(0))

For Y=0 to Ymax-1
For X=0 to Xmax-1
     C=Peek(offset&+I&)  'that's the color you want.
      Print C
   I&=I&+1
Next X
Next Y


;*)
Post Reply