Welcome, Guest. Please login or register.
Amiga Kit Amiga Store Iridium Banner AMIStore App Store A1200/A600 4xIDE Interface

AuthorTopic: LoadRGB32/Palette/Parts_os_Screen  (Read 952 times)

0 Members and 1 Guest are viewing this topic.

Offline kas1e

LoadRGB32/Palette/Parts_os_Screen
« on: October 05, 2007, 07:58:39 AM »
I put this question on UtilityBase and on ADA, but, not have clear answer about it. So, here is situation: i have 256colors screen 640x480 or 640x512 by size (aga or cgx screen does not matter). I can use LoadRGB32 for load palette for all screen (screen->ViewPort). Then, over changing the palette+ WaitTOF() i can do FadeIn/Out effects of whole screen, which works fast even on 030.

Now is question: i need to change palette not for full screen, but for only area of screen. In other words, some part of screen need to be still visibly, but other part of screen must have fadedown/fadein effect. I know that it possible to do it by Copper List, but it's AGA directly coding and i want to avoid it. (but, do it still works on AGA fast).

So, any idea, even very tricky, will be good. I think for example about this way: done on screen 2 window, and change palette for only one of it, but , loadrgb32 works with ViewPort, then, it's will not works with windows (i think). Maybe it possible do create 2 screens on one screen, and change palette for one of them ? Any idea will be very good. Thanks.
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
  • Total likes: 0
    • http://www.iki.fi/sintonen/
Re: LoadRGB32/Palette/Parts_os_Screen
« Reply #1 on: October 05, 2007, 08:05:05 AM »
Only use subset of colours for the part of the screen you want to change. That's the only truly portable (AGA, CGX and P96) and fast way.

So if you have same colours used for the different parts (non-fading and fading) you'll need to have duplicate colours initially.
 

Offline kas1e

Re: LoadRGB32/Palette/Parts_os_Screen
« Reply #2 on: October 05, 2007, 08:28:40 AM »
Piru, did you mean split palette on 2 parts (for example) for first part use only first 128 colours (for example) and for second parts second 128 colours (for example). And colours must be not duplicated. If i have only white color in second part, and for first no white color, then while i will fade white color it will changed for one part, and not changed for second. I understand right this moment ?

Second part of reply i do not understand :( can you explain it more deeply ? (about duplicate colours initially)

At this moment i have one palette for full screen (256 cols).
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
  • Total likes: 0
    • http://www.iki.fi/sintonen/
Re: LoadRGB32/Palette/Parts_os_Screen
« Reply #3 on: October 05, 2007, 09:14:47 AM »
Say you have two copies of the same image side by side and you want to fade the left one (and do NOT want to fade the right one).

In this case you have the same palette twice, with duplicate colours. Initially the palettes are the same. When you fade, you only change colours in one of the palettes.

Obviously if the fading part initially has totally different colours then you don't have dupes.
 

Offline kas1e

Re: LoadRGB32/Palette/Parts_os_Screen
« Reply #4 on: October 05, 2007, 09:21:11 AM »
Piru, 2 palette mean 1 push by LoadRGB32(), where we have first 128 cols as first palette, and second 128 cols, as second palette ?
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
  • Total likes: 0
    • http://www.iki.fi/sintonen/
Re: LoadRGB32/Palette/Parts_os_Screen
« Reply #5 on: October 05, 2007, 09:46:34 AM »
For example. The palette can be split in whatever way you want.

The point is that you have the gfx you want to fade drawn using only part of the colours on the screen and you change these colours.
 

Offline kas1e

Re: LoadRGB32/Palette/Parts_os_Screen
« Reply #6 on: October 06, 2007, 09:43:23 AM »
Piru, thank, it works. I done 2 palettes 160 cols and 96 cols.
Then push it by one loadrgb32, and change colors of need it palettes. If works fast on 030-50mhz / AGA, but i think it will works also fast on 020 ?:)