The International Simutrans Forum

Development => Bug Reports => Topic started by: VS on October 17, 2010, 09:08:55 PM

Title: special_pal
Post by: VS on October 17, 2010, 09:08:55 PM
Hi,
together with Sim we tried to replace the player colour schemes. This is not possible, because these data serve more than one purpose - in fact, so far we found these interpretations:

Indexing into the array changes what programmer writes from triple to char. That's all, still magic numbers and no symbolic names. This feels wonderfully 1980 - a relic from the ancient times of Simutrans, no doubt :D

At this moment I haven't looked yet where the array is used in the code. However - is this the desirable state? Are there any reasons to not attempt a rewrite? If so, what should be the new organization of data like? As far as I can tell, minimap should have its own array and the gui-related stuff perhaps macros (constants?).


edit: Of course I'll gladly do the coding, but talking first seems more safe :)
Title: Re: special_pal
Post by: prissi on October 17, 2010, 11:20:18 PM
Reason not to rewrite:
colors are mostly balanced
colors are used for UI and for minimap

One could use another array for player colors, since those are used normally with a flag. (Mostly) This is probably the only proper way of doing this.

What is the purpose of the rewrite?