Please, do keep up the good work! If this gets into the stable releases (nightlies) of OpenTTD, it will completely change the gaming experience and ways of thought of all players.
![Bowing Down :bow:](./images/smilies/bowdown.gif)
Moderator: OpenTTD Developers
Code: Select all
d:/development/ottd/vtile/src/train_cmd.cpp: In function 'void FreeTrainTrackRes
ervation(const Train*)':
d:/development/ottd/vtile/src/train_cmd.cpp:2236:10: error: 'ft' cannot appear i
n a constant-expression
d:/development/ottd/vtile/src/train_cmd.cpp:2236:13: error: '.' cannot appear in
a constant-expression
d:/development/ottd/vtile/src/train_cmd.cpp:2243:10: error: 'ft' cannot appear i
n a constant-expression
d:/development/ottd/vtile/src/train_cmd.cpp:2243:13: error: '.' cannot appear in
a constant-expression
make[1]: *** [train_cmd.o] Error 1
Code: Select all
if (first) {
if (ft.m_flag == ft.TF_BRIDGE) {
if (ft.m_old.InWormhole()) {
assert(IsRailBridgeTile(ft.m_old.wormhole));
} else {
assert(IsRailBridgeTile(ft.m_old.tile));
}
} else if (ft.m_flag == ft.TF_TUNNEL) {
if (ft.m_old.InWormhole()) {
assert(IsTunnelTile(ft.m_old.wormhole));
} else {
assert(IsTunnelTile(ft.m_old.tile));
}
}
break;
}
Code: Select all
hans@H ~
$ gcc -v
Using built-in specs.
COLLECT_GCC=d:\MinGW\bin\gcc.exe
COLLECT_LTO_WRAPPER=d:/mingw/bin/../libexec/gcc/mingw32/4.5.0/lto-wrapper.exe
Target: mingw32
Configured with: ../gcc-4.5.0/configure --enable-languages=c,c++,ada,fortran,obj
c,obj-c++ --disable-sjlj-exceptions --with-dwarf2 --enable-shared --enable-libgo
mp --disable-win32-registry --enable-libstdcxx-debug --enable-version-specific-r
untime-libs --disable-werror --build=mingw32 --prefix=/mingw
Thread model: win32
gcc version 4.5.0 (GCC)
hans@H ~
$
Code: Select all
d:/development/ottd/vtile/src/elrail.cpp: In function 'void DrawCatenaryRailway(
const TileInfo*)':
d:/development/ottd/vtile/src/elrail.cpp:339:26: warning: 'sprite_halftile' may
be used uninitialized in this function
Code: Select all
_mc[t] = { 0, 0, 0, 0, 0, 0, 0 };
Exactly. An integer type, when used as a boolean, should behave as true iff nonzero. It may be a matter of coding style, but "performance warning"? The compiler should just generate the same code in either case.HackaLittleBit wrote:rail_map.h:429
EDIT2: return (*SignalByte(tile, TrackdirToTrack(trackdir)) & (IsSignalHighBit(trackdir) ? 0x10 : 0x08)) != 0;
Thanks for the link; I have changed the code not to use a compound literal.HackaLittleBit wrote:_mc[t] = { 0, 0, 0, 0, 0, 0, 0 }; see this
I installed hg and applied your patch to 100% clean trunk.cirdan wrote:With respect to the bug in your last post, I am unable to reproduce it. Is there something specific that I must do?
that looks like intended behaviour to me. if tunnels are now individual tiles with individual reservation state (this is in any case necessary for proper signals on bridges/in tunnels), then there is no reason to keep the tunnel entrance reserved. it only needs making sure that the pathfinder will correctly return a path collision for the next train.HackaLittleBit wrote:when loading game tunnel reservation is changed
Don't know if this is intended behaviour but can be reason for crash.
see photo
You are a keen observer... That is intended behaviour indeed. In trunk, bridges and tunnels are reserved as a whole, since they effectively behave like one long piece of track. With my patch, however, bridgeheads can have signals, or junctions, or two parallel pieces of track, so each bridgehead must be dealt with separately from the rest of the bridge. Tunnels receive the same treatment because it was easier to change both of them at the same time and because it will make it easier to add signals on tunnelheads.HackaLittleBit wrote:when loading game tunnel reservation is changed
Don't know if this is intended behaviour but can be reason for crash.
see photo
I think that testing complex games is precisely what it is needed. I consider the patch to be mostly finished in what it does, so any kind of testing is appreciated.HackaLittleBit wrote:This game crashes on 2 of june
cirdan maybe it is not yet a good idea to test on very complex games.
Users browsing this forum: No registered users and 5 guests