The International Simutrans Forum

Development => Bug Reports => Topic started by: R1dO on December 13, 2017, 10:43:30 PM

Title: [r8351] Unable to compile with config flag -DDESTINATION_CITYCARS
Post by: R1dO on December 13, 2017, 10:43:30 PM
Hi

When trying to build a version where city-cars would have destinations (to see if it would give an interesting experience during play) the compilation failed with the following message:


simcity.cc: In member function 'void stadt_t::step_passagiere()':
simcity.cc:1905:27: error: 'start_halt' was not declared in this scope
     generate_private_cars(start_halt->get_basis_pos(), step_count, ziel);
                           ^~~~~~~~~~
simcity.cc:1905:68: error: 'ziel' was not declared in this scope
     generate_private_cars(start_halt->get_basis_pos(), step_count, ziel);
                                                                    ^~~~
simcity.cc:1974:68: error: 'ziel' was not declared in this scope
     generate_private_cars(start_halt->get_basis_pos(), step_count, ziel);
                                                                    ^~~~
simcity.cc:2152:25: error: 'k' was not declared in this scope
   generate_private_cars(k, step_count, ziel);
                         ^
common.mk:50: recipe for target 'build/sdl2/simcity.o' failed
make: *** [build/sdl2/simcity.o] Error 1


Unfortunately i am too unfamiliar with the code to have a clue what the intended starting/ending position is supposed to be.
Title: Re: [r8351] Unable to compile with config flag -DDESTINATION_CITYCARS
Post by: Dwachs on December 14, 2017, 07:35:47 AM
This part of the code is not maintained. I have never tried to compile with this compile flag.
Title: Re: [r8351] Unable to compile with config flag -DDESTINATION_CITYCARS
Post by: R1dO on December 25, 2017, 02:20:10 PM
No problem with that, i kinda suspected this was the case.

One question though. If it is unmaintained and unlikely to be in the future (just guessing here). Would it not be better to warn about it in the section describing that flag (or even remove the functionality from the code-base) ?
Title: Re: [r8351] Unable to compile with config flag -DDESTINATION_CITYCARS
Post by: prissi on December 25, 2017, 03:28:20 PM
It may be possible to revive with a few extra lines of code.
Title: Re: [r8351] Unable to compile with config flag -DDESTINATION_CITYCARS
Post by: prissi on January 09, 2018, 07:50:56 AM
By looking through the cunrnent code I get the impression there are currently more cars generated, the more pax are transported and not the other way round as it should be.
Title: Re: [r8351] Unable to compile with config flag -DDESTINATION_CITYCARS
Post by: R1dO on January 09, 2018, 09:27:44 PM
That sounds like it would need a bit more than just a few lines of code to revive, hope i haven't opened pandora's box here.
Title: Re: [r8351] Unable to compile with config flag -DDESTINATION_CITYCARS
Post by: prissi on January 10, 2018, 12:14:24 AM
No, just that the citycars are now indirectly deermined and also take into account transportation of goods and mail. But that can be easily incorporated.