News:

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

[r7348] transparent image parts

Started by ny911, October 20, 2014, 12:49:11 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ny911

using r7328 with pak128

First I thought it was a bug in my new image (see thread more headquarters) , but when I build up two of them I realized that there is something wrong in simutrans.
The transparent area of the HQ image (here it is only an attraction) is working fine when the new building is placed. let the game run with normal speed four a while and I the transparent area is getting dark gray. Placing a new building of it, its fine at the same time. See picture.
When deleting trees or something beside the gray area one tile get fixed.

Ters

Seems like the ground isn't drawn. Does the building have the flags for that set correctly?

ny911

QuoteDoes the building have the flags for that set correctly?
Well, what will be the correct flag for the set?

I use TileCutter 0.6.1 and  makeobj 55-3.

The problem is, that I didn't understand why the same [building].pak picture
is shown correct and without any drawn ground at the same time.

Ters

I think there is a flag called needs_ground or somthing. I don't do much dat file editing, but I have been through the pak file format on occasions. It is just a shot in the dark that this is the culprit, because the game seems to have made a very deliberate decision not to draw the ground, and I know this is a decision the game makes for buildings that claim to draw the ground themselves. Something might just trigger ground drawing through some alternate trigger that doesn't respect the needs ground flag. The rendering in Simutrans doesn't just draw tile by tile, it goes a bit back and forth from what I've read here.

prissi

Yes, such a building needs the flag needs_ground=1 or it will show holes. If you zoomed in or out, then neighbouring ground does cover it up a little. But any full window redraw will get you grey (or black) ground.

ny911

Now I got it, thanks both for the informations.

It might be helpful, if an unset flag will result an error or note at makeobj process.

So, it's my fault and there is no problem no bug.

Ters

Quote from: ny911 on October 21, 2014, 01:08:57 PM
It might be helpful, if an unset flag will result an error or note at makeobj process.

An unset flag is not an error. Buildings that have their own ground, or otherwise cover the entire tile, should not have needs_ground set. Drawing the ground when it won't be visible is a waste of performance. I guess the default is to not draw the ground, because it's easier to spot that the flag is missing when it's needed, than that the flag is on when it should not be.