News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

special_pal

Started by VS, October 17, 2010, 09:08:55 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

VS

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:

  • player schemes
  • minimap
  • gui - buttons etc.
  • font
  • intro screen

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 :)

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

prissi

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?