Welcome, Guest. Please login or register.

Author Topic: intuition screens quast.  (Read 1099 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline kas1eTopic starter

intuition screens quast.
« on: July 14, 2003, 02:55:44 AM »
hi all. i have little quastion about Intuition screens. How i can set palette for my 16bit screens ? For example i open my screen over OpenScreenTag, and want set 'black' palette for my screen. LoadRGB32() not easy way i think ?

so, if you can give me example with working color registers /palette on 16bit screens, this will be wery good. or if its is posible set over LoadRGB32(), give examples too.

ps. of course i read autodocs,rkrm and etc. maybe who now good docs about working in 16/32bit hi-resolutions screens ?
 

Offline xeron

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 2533
    • Show only replies by xeron
    • http://www.petergordon.org.uk
Re: intuition screens quast.
« Reply #1 on: July 14, 2003, 03:15:13 AM »
Why do you want to set a palette? With 16 bit screen depths, you don't set palettes directly with LoadRGB32(), as you don't get any change on screen until the new colours you've set are actually used (unlike on 8 bit or less screens, where the whole display updates immediately).

If you want to use pens, use ObtainPen() and make your own local palette that way, for example:



WORD mypal[ numcolours ];

...

for( i=0; i{
  mypal[ i ] = ObtainBestPen( r, g, b, TAG_DONE );
}

... use your palette here, e.g. SetAPen( win->RPort, mypal[ col ] ) ...

for( i=0; i{
  if( mypal > -1 ) ReleasePen( mypal;
}


Alternatively, do all your graphics directly in highcolour, and you don't need to set any palettes or use any pens. The only restriction is that (AFAIK) P96 and cybergraphics offer no way to use graphics.library/Text() with an arbitary highcolour value (ie, you need to get a pen for text).
Playstation Network ID: xeron6
 

Offline kas1eTopic starter

Re: intuition screens quast.
« Reply #2 on: July 14, 2003, 03:28:05 AM »
in generally i need solve this problem:

i open screen/windows and draw jpeg picture. on 040 - this slow, and i see slow window fillling. So, i want in theory this: open screen with black palette, draw my pict
(cant see drawing, becouse screen palette is black)
and slowly change palette to original. in result -  i have draw image + nice fading image.
 

Offline iamaboringperson

  • Hero Member
  • *****
  • Join Date: Jun 2002
  • Posts: 5744
    • Show only replies by iamaboringperson
Re: intuition screens quast.
« Reply #3 on: July 14, 2003, 03:54:00 AM »
you cant do that with 15/16/24 bit screen modes
the best thing you can do is write to another bitmap and then copy/swap it over
you would decode it once, and then when copying it each frame(using double buffering) you would copy it from very dark to very light

well not exactly copy, however...
you would modify the RGB values each time...

-edit-
p.s... ...please spell question: 'question' not, 'quastion'