[Scummvm-devel] ATTN PORTERS: OSystem::grabPalette requirement change

Johannes Schickel lordhoto at scummvm.org
Thu Dec 23 00:44:38 CET 2010


On 12/22/2010 11:10 AM, Max Horn wrote:
> Am 21.12.2010 um 13:11 schrieb Angus Lees:
>
>>   On Tue, Dec 21, 2010 at 22:48, Max Horn<max at quendi.de>  wrote:
>>> Am 20.12.2010 um 23:06 schrieb Marcus Comstedt:
>>> [...]
>>>> This kind of makes me wonder:  If the only function of the method is
>>>> to return the exact same data as was passed to setPalette, why does it
>>>> need to be in the backend at all?  If the engines really need help
>>>> remembering what palettes they set, couldn't a function somewhere in
>>>> graphics/ provide that service?
>>> Excellent point.  Ising a unified implementation would make life  easier for porters and ensures consistency across all platforms.
>> More generally, there are probably a bunch of platforms which don't
>> have paletted hardware and so need to fake that whole layer. I imagine
>> this set/grab/copy/lock/etc code looks awfully similar across all such
>> backends (except for where that common code is in the SDL library).
>>
>> How far down this rabbit hole do you want to go ;)
> If it's useful for new ports, we should investigate it. As long as it does not incur bloat for other backends, i.e. is completely optional. And as long as it really becomes used eventually...
>
> But let's start small. Folks, any objections to my rough PaletteManager proposal? If not, I'll have a go at it.
>

Nope, looks fine to me.

// Johannes





More information about the Scummvm-devel mailing list