Page 4 of 6

Posted: 21 Feb 2007 13:24
by Octopussy
Toni Babelony wrote:I've found a few GRFs that contain trams:

-Hiroshima Tram set (including Iyo-Dentetsu trams drawn by me);
-German Tram set;
-Serbian tram set;
-Czech tram set;
On GRF Crawler I have fond only two GRF which contain tram : the German and the Serbian Set

Posted: 21 Feb 2007 17:38
by Valance
But what GRF we need ?
Seems to be time to edit the first posting in this thread to be used for changelog and downloads. But not now ;)

Here is the needed grf (you still need one with tram vehicles) and a win32 binary (with lang files). I hope it works, wine says it's ok...

Posted: 21 Feb 2007 17:43
by Celestar
Could you update your working copy? I've been trying to read through the diff and its full of the drive-through-roadstop code which is in trunk already, which makes reading it kind of hard :)

Celestar

Posted: 23 Feb 2007 14:36
by Octopussy
Yeah, your diff file is incorrect Valance.

I have another problem with your .exe file : I have build a tram depot and it's impossible to build a tram in it, there are no tram available.

I have previously installed the Geman Tram Set..

Posted: 23 Feb 2007 18:47
by jklamo
Octopussy wrote:Yeah, your diff file is incorrect Valance.

I have another problem with your .exe file : I have build a tram depot and it's impossible to build a tram in it, there are no tram available.

I have previously installed the Geman Tram Set..
same with me, can build tramtracks and depot, have loaded tram GRF (CSTramSet), but no tram available...

EDIT: magic resetengines console command worked OK. With small issues works also for tunnels and bridges. Good work !

Posted: 24 Feb 2007 11:17
by Valance
Yeah, your diff file is incorrect Valance.
I'm sorry for this :(
I have another problem with your .exe file : I have build a tram depot and it's impossible to build a tram in it, there are no tram available.
After cross compiling ottd I started the binary with wine, just to see whether the binary will work under windows, I didn't check building tramrails / trams. But did you see the game year (2001) in my screenshots? Tram vehicles have an construction year, change your starting year or proceed in game time and tram vehicles will become available. They are using same code as normal road vehicles, making me believe it's not a bug ;)
Could you update your working copy? I've been trying to read through the diff and its full of the drive-through-roadstop code which is in trunk already, which makes reading it kind of hard Smile
After getting remove roads/tramrails working correct (I hope) I updated it yesterday. But I'm rather unhappy with my tramsupport functions (in road_map / road_cmd). Perhaps you have some better ideas?

Posted: 24 Feb 2007 13:15
by Octopussy
Thanks for your diff :D
After getting remove roads/tramrails working correct (I hope) I updated it yesterday. But I'm rather unhappy with my tramsupport functions (in road_map / road_cmd).

Yes
I have several errors in
road_cmd.cpp
road_gui.cpp
build_vehicule_gui.cpp

:evil:

Posted: 24 Feb 2007 13:19
by Valance
Hm, but you tried to apply it to rev 8858? (I really should write on which rev my diff is based... silly-me)

Posted: 24 Feb 2007 13:20
by Rubidium
Octopussy, you should apply the patch against revision 8858 of trunk. Anything else it likely to give rejects and thus compile errors; it compiles just fine for me.

Valance, could you explicitly tell against which revision you have made the patches? Preferably in the name of the diff, so something like tramroads-r8858.diff.

And another request, could you check that your editor actually reads the files as UTF8, because it made a mess of gfxinit.cpp.

Posted: 24 Feb 2007 13:31
by Valance
And another request, could you check that your editor actually reads the files as UTF8, because it made a mess of gfxinit.cpp.
Oh :( Not again this silly utf8 problem :shock: This time Eclipse produced it... back to vim again.

Posted: 24 Feb 2007 14:14
by Octopussy
Rubidium wrote:Octopussy, you should apply the patch against revision 8858 of trunk. Anything else it likely to give rejects and thus compile errors; it compiles just fine for me.
OK very nice :P

0 error for patching it :D

Thanks at all !

And only 9 warnings for conversion between int, byte and bool

but under MSVC these warnings are errors... :?

Posted: 24 Feb 2007 18:36
by DaleStan
Could you actually quote the error messages, instead of just mentioning their existence?

Posted: 24 Feb 2007 18:47
by Octopussy
DaleStan wrote:Could you actually quote the error messages, instead of just mentioning their existence?
OK

but it is in french :)
Compilation...
road_cmd.cpp
\source-svn\src\road_cmd.cpp(570) : error C2220: avertissement considéré comme une erreur - aucun fichier objet généré
\source-svn\src\road_cmd.cpp(570) : warning C4800: 'uint32' : valeur forcée à la valeur booléenne 'true' ou 'false' (avertissement sur les performances)
road_gui.cpp
\source-svn\src\road_gui.cpp(431) : error C2220: avertissement considéré comme une erreur - aucun fichier objet généré
\source-svn\src\road_gui.cpp(431) : warning C4800: 'int' : valeur forcée à la valeur booléenne 'true' ou 'false' (avertissement sur les performances)
\source-svn\src\road_gui.cpp(432) : warning C4800: 'int' : valeur forcée à la valeur booléenne 'true' ou 'false' (avertissement sur les performances)
\source-svn\src\road_gui.cpp(433) : warning C4800: 'int' : valeur forcée à la valeur booléenne 'true' ou 'false' (avertissement sur les performances)
\source-svn\src\road_gui.cpp(434) : warning C4800: 'int' : valeur forcée à la valeur booléenne 'true' ou 'false' (avertissement sur les performances)
build_vehicle_gui.cpp
\source-svn\src\build_vehicle_gui.cpp(656) : error C2220: avertissement considéré comme une erreur - aucun fichier objet généré
\source-svn\src\build_vehicle_gui.cpp(656) : warning C4805: '!=' : mélange risqué de type 'bool' et de type 'byte' dans l'opération
Génération de code en cours...

Posted: 25 Feb 2007 01:47
by glx
Here is the translation of the warnings :
C4800 = 'type' : forcing value to bool 'true' or 'false' (performance warning)
C4805 = 'operation' : unsafe mix of type 'type' and type 'type' in operation

Posted: 25 Feb 2007 14:20
by Valance
And another request, could you check that your editor actually reads the files as UTF8, because it made a mess of gfxinit.cpp.
After 4 hours reading howto's, manuals and forums, I didn't find out whats wrong with gentoos unicode support. A bit disappointed about this conclusion I tried to load original gfxinit.cpp with iso-8859-1 (my older linux distros were using it) encoding instead of utf8. It worked :) The same helped me in Eclipse. Now it seems to me, sources aren't utf8 encoded, or my svn converts them from utf8 to iso-8859-1 while checking out. But never mind, problem solved for me ;)
And only 9 warnings for conversion between int, byte and bool
I'll fix those warnings.

Posted: 25 Feb 2007 14:37
by Octopussy
You should also deactivate the truck station button in the tramroad construction box and replace it by a autoreplace button (for making the conversion between road and tramroad automatically).

And in the tram station box there are 4 unexpected choices..

Good luck 8)

Posted: 25 Feb 2007 14:56
by Valance
deactivate the truck station button in the tramroad construction box and replace it by a autoreplace button (for making the conversion between road and tramroad automatically).
Truck (drive-through) station will stay enabled, ttdpatch didn't disable it and perhaps someone will make a grf with trams capable of transporting other cargo than passangers (mail, for example).

Hm, conversion between road and tramrails..., I think the manual conversion like it's already working is enough ;)

Conversion between bus stops and tram stops (and bus/tram stops) will be done by placing the needed roadtype (road/tramrails) onto them (later it will be possible to convert a bus stop into a bus/tram stop while placing a line of tramrails). Conversion from bus/tram stop to just bus stop (and bus/tram to just tram stop) will be done by remove road (or tramrail) from bus/tram stop. (same principle will do converting bridges and tunnels) Hope my explanation is somewhat understandable ;)
And in the tram station box there are 4 unexpected choices..
In my first diff (I think) I had the buttons for normal roadstops disabled, but at the moment they are enabled again. (don't forget, diffs are just work in progress snapshots)

Posted: 25 Feb 2007 15:47
by Octopussy
Truck (drive-through) station will stay enabled, ttdpatch didn't disable it and perhaps someone will make a grf with trams capable of transporting other cargo than passangers (mail, for example).
I think this kind of transportation don't exist in real life
Trams are only for passengers, like bus.

8)

Posted: 25 Feb 2007 15:51
by broodje
not true, in Germany there is even a special cargo tram for car-parts (isn't it in Dresden for the VW factory?) and Amsterdam (in the Netherlands) is currently experimenting with cargo trams.

Not to mention that during the 1900 till 1950(?) there was a coal tram in Groningen that transported Coal to the 'coal gas' plant.

I'm sure there are more examples.

Posted: 25 Feb 2007 16:43
by OczeQ
see here, if You don't believe :)
http://en.wikipedia.org/wiki/CarGoTram