News:

Simutrans Sites
Know our official sites. Find tools and resources for Simutrans.

makeobj has problems with indexed graphics

Started by Vladki, April 08, 2017, 10:07:05 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Vladki

I have noticed that simutrans-extended sgfaults with pak128.CS compiled with latest makeobj-extended. Fortunately I had an older compiled version that worked fine, so I was able to find the guilty pak to be: ground.LightTexture.pak. This was taken unmodified from pak128, and is also identical to the one in pak128.britain-ex. Even after taking this one form older compile, I had bad artifacts on the screen, traced to ground.Borders.pak, ground.SlopeTrans.pak, and ground.Marker.pak.
All of them were take from pak128... Finally I found out that the main difference to pak128-britain was, that the png files for these paks were indexed in pak128.CS, while they are 8-bit/color RGB in pak128.britain-ex

borders.png:          PNG image data, 1152 x 384, 2-bit colormap, non-interlaced
marker.png:           PNG image data, 1152 x 768, 2-bit colormap, non-interlaced
texture-lightmap.png: PNG image data, 1920 x 640, 8-bit colormap, non-interlaced
texture-slope.png:    PNG image data, 512 x 512, 2-bit colormap, non-interlaced

So, one can guess that 8-bit colormap segfaults, while 2-bit colormap only has bad display.
Unfortunately there is 113 colormap pictures in pak128.CS :(

I suspect this commit to be the culprit:

commit d7df9629691c07f057f2b01416e40f77f3a3197c
Author: James E. Petts <jamespetts@yahoo.com>
Date:   Thu Apr 6 12:58:26 2017 +0100

    ADD: Makeobj support for indexed graphics with transparency (An-dz, from Standard)

I have tried compiling pak128.CS with one commit older (1c6595ffc9f38c62eabb632e552ed64c00138e51) and it works fine.

jamespetts

Hmm - odd: this is just integrating a change from Standard. Have you tried the Standard nightly makeobj to see whether the behaviour is the same there?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Vladki

Oh yes, the problem is in standard as well. I went back to r8170, and that one compiles good pakset. So it is indeed the patch taken from standard.

jamespetts

I have moved this to the Standard bug reports forum given that it can be reproduced there.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

An_dz

#4
I can reproduce, but I get a crash even reverting that commit.

Edit:
Fixed in r8199

Vladki