Re: get_palette()?

new topic     » goto parent     » topic index » view thread      » older message » newer message

>
>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 thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu