Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
custom Pixel color problem
#1
hi, ive been wondering how to create custom pixel colors using mixtures of red, green blue.

atm im using this code:

Code:
'Main
DECLARE SUB Setpal (index%, blue%, green%, red%)
DECLARE SUB GetPal (index%, blue%, green%, red%)

SCREEN 9

CALL Setpal(1, 47, 47, 63)

PSET (0, 0), 1


'GetPal

SUB GetPal (index%, blue%, green%, red%)
    OUT &H3C7, index%
    blue% = INP(&H3C9)
    green% = INP(&H3C9)
    red% = INP(&H3C9)
END SUB


'SetPal

SUB Setpal (index%, red%, green%, blue%)
    OUT &H3C8, index%
    OUT &H3C9, blue%
    OUT &H3C9, green%
    OUT &H3C9, red%
END SUB

I would like to create an image using PSET or similar method, with custom color pixels, and then save it with GET statement.

However the problem occurs when setting the color to a new mixture of red, green, blue values, the pixels with color 1 are also changed to the new color, and thus the image produced is all the same color. this is basically the same as the palette statement, when the value is changed, all pixels on the screen change to that new color.

so what i was wondering, is it possible to use the same color value, eg. 1 to create different mixtures of red green blue, put them on the screen, but stop the program from changing the colors already on the screen, when the new mixture of red green blue is made.

or is there any other method of drawing custom color pixels composed of red green blue values to the screen?

thank you all for any help.
Reply


Messages In This Thread
custom Pixel color problem - by Ovenmit - 02-29-2004, 08:35 AM
custom Pixel color problem - by toonski84 - 02-29-2004, 10:38 AM
custom Pixel color problem - by TheBigBasicQ - 02-29-2004, 01:29 PM
aww - by Ovenmit - 03-01-2004, 06:29 AM
custom Pixel color problem - by TheBigBasicQ - 03-01-2004, 11:46 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)