1. get_palette()?

Hello,
        I've got the interrupts I need, thanks...
I also wanted to know if there is any function to get the current
intensities of Red,
Green, and Blue from the screen.  There is a function to set the intensities
to different intensities /palette()/  but nothing to get them...
/ViC./
 _________________________________________________________________
|  http://www.geocities.com/SiliconValley/Heights/8858/home.htm   |
| It's so difficult to work in groups when you are omnipotent. -Q |

new topic     » topic index » view message » categorize

2. Re: get_palette()?

> Hello,
>         I've got the interrupts I need, thanks...
> I also wanted to know if there is any function to get the current
> intensities of Red,
> Green, and Blue from the screen.  There is a function to set the intensities
> to different intensities /palette()/  but nothing to get them...
> /ViC./

Hi Vic.

When palette() is used to set the intensities of a particular colour, the
PREVIOUS RBG sequence is stored in an object variable. So in a sense, you
can get the current palette of a particular colour by issuing a palette()
command. It is possible to create a default palette list by issuing
palette() commands and printing them to a file.

Hope this helps.

David Gay

new topic     » goto parent     » topic index » view message » categorize

3. Re: get_palette()?

>
>Hi Vic.
>
>When palette() is used to set the intensities of a particular colour, the
>PREVIOUS RBG sequence is stored in an object variable. So in a sense, you
>can get the current palette of a particular colour by issuing a palette()
>command. It is possible to create a default palette list by issuing
>palette() commands and printing them to a file.
>
>Hope this helps.
>
>David Gay

That doesn't seem to work(or i can't do it =) but I foud this Turbo Pascal
code for getting the intensities of a color...Can anyone convert it to
Euphoria? =)

==begin code
Procedure GetPal(ColorNo : Byte; Var R,G,B : Byte);
  { This reads the values of the Red, Green and Blue values of a certain
    color and returns them to you. }
Begin
   Port[$3c7] := ColorNo;
   R := Port[$3c9];
   G := Port[$3c9];
   B := Port[$3c9];
End;
==end code

and also the C++ code...

==begin code
void GetPal(unsigned char ColorNo, unsigned char &R,
     unsigned char &G, unsigned char &B) {

     outp (0x03C7,ColorNo); // here is the palette color I want read
     R = inp (0x03C9);
     G = inp (0x03C9);
     B = inp (0x03C9);
     }
==end code

                                                                          --
-----,
                                                                          /ViC./
 ______________________________________________________________________
|     http://www.geocities.com/SiliconValley/Heights/8858/home.htm     |
|                     Veni vidi, vici. Fiat lux.                       |
|______________________________________________________________________|

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu