Graphics (DATA)

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply
RayBritton
Veteran
Posts: 109
Joined: Thu Feb 10, 2005 12:38 pm

Graphics (DATA)

Post by RayBritton »

Hi,

I have a problem
I used PP256 to create DATA pictures but when they are used as data statements in QB, the pictures comes out wierd. I'm using the DATA directly insteat of though the subs provided withn pp256 because i can't get them to work
User avatar
{Nathan}
Veteran
Posts: 1169
Joined: Thu Aug 19, 2004 6:08 pm
Location: The wetlands of central Ohio, USA
Contact:

Post by {Nathan} »

It would help if you posted code :)

I think you're putting x before y in your loop, you need to have y first or it will be screwed up. Other than that, POST YOUR CODE (and make sure to use the code tags)
Image
Rattrapmax6
Veteran
Posts: 1055
Joined: Sun Jan 02, 2005 2:11 pm
Location: At my computer
Contact:

Post by Rattrapmax6 »

PP256 uses weird values in the DATA statments that I think has something to do with the pallett, or pallet changing... Therefor you're probaly way better of using, or learning to use the SUB routines... Or looking into the routines to see how to render the DATA..

:wink:
-Kevin (aka:Rattra)
(x.t.r.GRAPHICS)
RayBritton
Veteran
Posts: 109
Joined: Thu Feb 10, 2005 12:38 pm

Post by RayBritton »

unfortunately i don't understand the code in the subs, and it is the data statement, the data statements in the file are similar to this

Code: Select all

DATA 486
DATA 00,00,3516,00,00
DATA 00,3516,00,00,3516
DATA 3516,00,00,3516,00
DATA 00,00,3516,00,3156
DATA 00,3516,00,3516,00
DATA 3516,00,3516,00,00
DATA 00,00,3516,00,00
DATA 00,3516,00,00,00
When it should be this

Code: Select all

DATA 00,00,00,00,00
DATA 00,00,00,00,00
DATA 00,3516,00,00,00
DATA 00,00,3516,00,00
DATA 00,00,00,3516,00
DATA 00,00,00,00,3516
DATA 00,00,00,00,00
DATA 00,00,00,00,00
Rattrapmax6
Veteran
Posts: 1055
Joined: Sun Jan 02, 2005 2:11 pm
Location: At my computer
Contact:

Post by Rattrapmax6 »

Looks like from reading over the code, its a simple matter of putting the DATA into a code.. then doing this: Copy the stuff for | InitImageData (FileName$, ImageArray()) | into your code. Then in your code do this:

Code: Select all

InitImageData "", Picture1()

PUT (1, 1), Picture1, PSET
Try that, If that doesn't work, I'll take another look at it and see what I can do.. :wink:
-Kevin (aka:Rattra)
(x.t.r.GRAPHICS)
RayBritton
Veteran
Posts: 109
Joined: Thu Feb 10, 2005 12:38 pm

Post by RayBritton »

don't worry now
Nodtveidt
Veteran
Posts: 826
Joined: Sun Jul 25, 2004 4:24 am
Location: Quebradillas, PR
Contact:

Post by Nodtveidt »

pp256's routines suck. :D
Post Reply