Just rereading some of this thread, and an FYI:
>Well normally you can use 0 to 65535 pallettes but as only a few games
use a lot of pallettes,
>its better to allocate sufficient buffer for pallettes on need. We can
suppose if a game wants
>more 255 palettes, he'll probably use 65535.
The dx8 sdk docs state "There is a maximum of 16,384 palettes", so in
theory MAX_PALETTES could be increased to that value. Depends on whether
the memory overhead by doing that is too high (which it might be, 256
palettes * 256 entries * 4 bytes/entry = 256K but 16384 palettes works
out at 16mb?) - In which case as Raphael states - maybe we can start
with 256 and only go to 16384 if required.
Another alternative is to look at the lights support - Have a linked
list of the palettes which are 'used', and effectively only allocate a
new palette on demand and add it to the list. This would save on wasted
memory, but have an overhead on accessing an entry.
Feel free to code it - A while ago, I was trying to find a demo of a
game which used color index mode (ie palettes), and couldnt - gta3 is
the only one I could find and there is (was) no demo.
Jason
- Is it time for playing games on WINE? Carlos Lozano
- Re: Is it time for playing games on WINE? Carlos Lozano
- Re: Is it time for playing games on WINE? Raphaël Junqueira
- Re: Is it time for playing games on WINE? Sylvain Petreolle
- Re: Is it time for playing games on WI... Carlos Lozano
- Re: Is it time for playing games on WI... Raphaël Junqueira
- Re: Is it time for playing games on WINE? Jason Edmeades
- Re: Is it time for playing games on WINE? Raphaël Junqueira
- copy protection - was: Re: Is it time for play... Zsolt Rizsanyi
- Re: copy protection - was: Re: Is it time ... Tom
- Re: copy protection - was: Re: Is it t... Alexandre Julliard
- Re: copy protection - was: Re: Is... Raphaël Junqueira
- Re: copy protection - was: Re... Carlos Lozano
- Re: copy protection - was: Re... K. Vogel
- Re: copy protection - was... Carlos Lozano
- Re: copy protection - was: Re: Is... Jonathan Wilson
- Re: copy protection - was: Re... Robert Shearman