News:

SimuTranslator
Make Simutrans speak your language.

Patch to move colours to 16 bit

Started by An_dz, December 29, 2016, 03:43:09 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dwachs

You can commit this in my opinion.
Parsley, sage, rosemary, and maggikraut.

An_dz

I just noticed that the map background (not minimap) gets a weird colour after the second start. Even though I know that the saving/loading is not enabled yet, all other colours still load correctly.

An_dz

It was an easy fix, I forgot that rdwr is read AND write so I have to initialise the values with something.

And it's committed, available in r8134. Theme maintainers should be aware of the two new theme parameters and the two that were removed.

prissi

Does this need a savegame update? If so, please increase the SERVER savegame version.

An_dz

Is any colour apart from player colours saved with a savegame? If not then it's ok, player colours are still the 8 bit index.

prissi


TurfIt

Is this patch responsible for [Bug] global-buffer-overflow in simgraph16.cc ?  i.e. Were the SDL1 issues fixed?

An_dz

No, it can't be responsible for that because it's not attached to simgraph_init nor any of its variables. It also does not change how the RGB555 is translated to system format. It does not even keep/save stuff in the memory (in an array), it simply calls get_system_color and the 8 bit palette and returns an RGB colour in system format.

And yes SDL1 works, the design was changed for it, and it was changed to be safer. Changed as I explained above.