Which of these still really have both versions used?
# DOUBLE_GROUNDS: Enables two height tiles
I'm particularly wondering about this. There's a *lot* of code with two different versions here. Is the DOUBLE_GROUNDS version
currently used by anyone; planned to be used for the future; or a leftover from a project which has been abandoned?
I was thinking of translating ribi.h and the files using it into English, but I realized I have to translate two different versions of it, one with DOUBLE_GROUNDS and one without, and make sure that both compile correctly. :-/ Unless DOUBLE_GROUNDS is either obsolete or can be turned on permanently.
# OTTD_LIKE: Enables half height tiles and crossconnected industries; defaul folder pak.ttd/
Cross-connected factories can be enabled in the pak config file, and the default pak folder is no longer used now that there's a pak selector. And the half height tiles are enabled by HALF_HEIGHT. Can this be removed?
# STEPS16: 16 steps per tile - nicer on pak64
And this one seems to be always on -- and it doesn't seem to do anything any more! Is there a reason it's still in the config file -- can it be removed?
DOUBLE_GROUNDS: this is an incomplete implementation of a double-height system. Afaik it does not compile. Imho this can be deleted. (If you want to translate ribi,h please also translate the corner1..4 macros, they should go into ribi.h anyway I think)
HALF_HEIGHT is mandatory if one wants to use TTD-Graphics, since in TTD (and its relatives) heights are half the heigts as in simutrans. Should not get removed.
STEPS16 can be deleted. Not used anymore.
Quote from: Dwachs on April 12, 2010, 05:07:46 AM
DOUBLE_GROUNDS: this is an incomplete implementation of a double-height system. Afaik it does not compile. Imho this can be deleted. (If you want to translate ribi,h please also translate the corner1..4 macros, they should go into ribi.h anyway I think)
OK, thanks.... I'll wait to see if anyone else thinks DOUBLE_GROUNDS should stay....
QuoteHALF_HEIGHT is mandatory if one wants to use TTD-Graphics, since in TTD (and its relatives) heights are half the heigts as in simutrans. Should not get removed.
I was referring to removing the OTTD_LIKE define, not HALF_HEIGHT.
QuoteSTEPS16 can be deleted. Not used anymore.
OK thanks!
Imho OTTD_LIKE can stay, as there is no gain in removing it. It is there for convenience of those who want to compile Simutrans with opentdd-settings: half height slopes and industries interconnected (as goods have no destinations in openttd).
DOUBLE_GROUNDS was working fine; the only problem is that the rendering code is not extended to two height steps. If you do that (and can live with the many transition images) then DOUBLE_GOURNDS could be restored easily.
OTTD_LIKE is just an abbreviation. I would lkie to keep it in.
STEPS_16 is only needed for the old system, which is no longer in the code and can go.
Simutrans does not compile with DOUBLE_GROUNDS anymore though.
@prissi: did you test the double-height code with the clipping routines?
No, as there are no suitable textures for double ground mode. I would need to use the old standard ground (which would be easy to add again, though).
However, there might be some other places that need a fix; espeically some underground mode stuff. But double grounds worked fine back then.
Quote from: prissi on April 12, 2010, 11:16:44 AM
DOUBLE_GROUNDS was working fine; the only problem is that the rendering code is not extended to two height steps. If you do that (and can live with the many transition images) then DOUBLE_GOURNDS could be restored easily.
It looks like it makes some heavily used data structures significantly larger. I guess this is not a practical problem for performance?
I can certainly do my best to update both compilation alternatives, but the codebase doesn't compile with DOUBLE_GROUNDS right now, and in a pretty serious way (missing subroutines) so it may be already badly bitrotted:
boden/brueckenboden.cc:100: error: ���rotate90��� is not a member of ���hang_t���
EDIT: Attached is a patch to clean up STEPS16, and remove the dead code related to the now-irrelevant default pak.
(EDIT: The patch is also on my git repository at github at neroden/simutrans in the 'standard' branch. EDiT: not anymore.... only copy is here now...)
As rotation came after double step heights, missing rotation routines for double heights are not so surprising ...
I found another one: USE_16BIT_DIB. It seems to be turned on unconditionally -- repeatedly. It's turned on in the Makefile for SDL targets -- which don't care about it. Then it's turned on again by a #define in simsys_w16.cc.
Even when it's turned off, much of the code appears to be the same, notably this:
#ifdef USE_16BIT_DIB
settings.dmBitsPerPel = 16;
#else
settings.dmBitsPerPel = 16;
#endif
It's also turned on, always, in simsys_w8.cc, which appears to be used only if COLOUR_DEPTH=8. These are the only two files which use it at all.
I don't really understand the code (it seems to be Windows-only), but it looks like this switch may be entirely obsolete; I can prepare a patch to eliminate the switch (leaving it on all the time). If not, perhaps I could at least take it out of the Makefile.
I have just glanced at the code so far, but this feels a lot like the latter number should be 15 (so it's a bug).
Of course, if it's dead, the point is moot :)
Actually, you can have either 15 or 16 bit per pixels; the latter is always supported, but slower and less pretty. Thus I have either 15 or 16 bit per pixel.