Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Possible speedup in draw() (crossfire0.8) (fwd)




>> At present there are 13 colors including black and white, what you are 
>> purposing is to create 169 GCs
>
>No, just 156 (n*n-n).
>

Actually, this isn't quite right either...

You don't need EVERY combination of EVERY color used, just every different
foreground/background combination that is used.

Looking at color.h shows that there are only 16 DIFFERENT color combinations 
currently being used - 

Black - White
Black - Gold
Black - Khaki
Black - DarkOrange2
White - Khaki
Brown - White
Brown - Khaki
Gold - Khaki
DodgerBlue4 - Khaki
Red - Khaki
Yellow1 - Khaki
DarkOrchid3 - Khaki
DarkOrange2 - Khaki
ForestGreen - Khaki
ForestGreen - DodgerBlue4
Grey35 - Khaki

Sure, there could be more (once configuring colors on a per display basis
via resources is available), but the people who want 100+ different color
combinations will just have to suffer with the larger space requirements.
Besides, some colors just don't go with each other and too many different
(and odd) color combinations causes the game to have that "Las Vegas" look.
(For those of you not familiar with Las Vegas, Nevada, that isn't a good
thing.)

However, you'll need more GCs than the 16 combos above, because each display 
(player) needs its own GCs.

Rich