[Alephmodular-devel] Re: Macintosh oddity: GetCTable(8)?
Status: Pre-Alpha
Brought to you by:
brefin
From: Br'fin <br...@ma...> - 2003-03-31 04:19:50
|
After some double-checking. Chris seems to be right. While I can't find any documentation of this behavior I did find the following: References on GetCTable() in PB and on Apple's website that mirrors Inside Macintosh: Quickdraw both refer to the resource IDs that are documented. However, Apple's Sample code from similar to later time periods also uses GetCTable(8) ... Aha, finally finally found a reference... How the Palette Manager Restores the Color Environment http://developer.apple.com/techpubs/mac/ACI/ACI-20.html Resources: 1, 2, 4, 8 are the default color resources for each depth Add 32 to get the default greyscale resources for each depth Add 64 to get the default colors resources + highlight color for each depth Hsm, adding that in to the mix, then 72 would still be the proper value to make sure the highlight color is properly set as well. But aside from the highlight color, there's zilch wrong in using resource id 8. -Jeremy Parsons On Sunday, March 30, 2003, at 10:37 PM, Chris Bergmann wrote: > It would appear that this is correct behavior. It may have been > depreciated some time ago (carbon? system 9?) however there seems to > be a fair bit of code around which uses this approach and run fine. I > have a suspicion that if we looked up the original inside mac series > it would specify 8 as being the system-standard 256 color table and 40 > (8+32) as being the standard 256 grayscale table. 'course i don't have > it in front of me at work so ymmv :-) > > that said, you may as well fix it to use the new constants. sooner or > later they may drop the old stuff. > > chris > > > On Monday, March 31, 2003, at 07:32 AM, Br'fin wrote: > >> I was poking through AlephModular while trying to rehandle how cluts >> were used. And I stumbled upon the usage of GetCTable(8). Which, upon >> checking PB's docs for GetCTable seemed wrong. And so I checked in >> AlephOne and found the same issue (It dates back to the Marathon2 >> code originally) >> >> Both things call GetCTable with an argument of 8 ... it seems like >> the correct argument should be 72. I don't know of any tech notes >> that would say that 8 should also work for a 256 color system clut. >> >> Can anyone confirm or deny that this is some kind of 256 color >> problem? |