Re: Some graphical glitches with fences.
Reply #5 –
The glitches presented in the first post are partly due to the current implementation of the background images.
I want to propose a slightly different scheme to be used in the code and maybe afterwards in dat/pak-files. For each side of the background one can distingiush 16 different images (16*16=256 both sides -> one byte in memory).
No Configuration Natural Fence Comment
0 no background image
1 _ only fence, downward slope behind
2 / y y upward slope
3 / n y
4 \ y y downward slope
5 \ n y
6 - n n one full slope, no fence, bridge ending on this slope
7 - y y one full slope
8 - n y
9 / y y one and a half slope ...
||
10 / n y one and a half slope ...
||
11 \ y y one and a half slope ...
||
12 \ n y one and a half slope ...
||
13 - n n double full slope, no fence, bridge ending on this slope
||
14 - y y double full slope
||
15 - n y
||
Fence=(y) means the graphic is allowed to contain an additional fence above the slope
=(n) graphic must not have a fence since bridge ends on this slope
Natural=(y) stone-like graphics
=(n) concrete-like graphics
..Number 6 and 13 (bridge end slopes) can only have one of this graphics modes. Imho this is no restriction since the slopes are constructed by the player and thus are of natural type.
Number 1 (a fence is there) can be used as a flag to indicate the presence of a fence, the actual offset and slope of the fence is then determined by the slope of the tile.
For some paksets (eg pak64, pak.german), the sprites 6 and 13 must be produced from existing ones (delete fences). Fences on slopes (not plain horizontal) are also not present in current simutrans.
Any comments appreciated