Page 10 of 15

Re: [Patch] Departure boards, 24h clock + binary

Posted: 11 Feb 2011 23:43
by Norfolkadam
hthhs wrote:
Norfolkadam wrote:When you set a station to "no unloading" it doesn't show on the "Calling at:" section. Can you add an option so that it does?
Done.

I've also updated the patch to current trunk, and handled automatic orders as best I can.
Ah sweet thank you've made my day.

Re: [Patch] Departure boards, 24h clock + binary

Posted: 12 Feb 2011 02:46
by Norfolkadam
So I'm new to all this patching malarkee. I've spent the best side of two hours compiling and typing lines of text and I finally get a compiled version of the latest build. I download the Tortoise patching programme and patch it using the latest diff you've put up. However it doesn't seem to have done anything, I have no departure boards yet when I was just using the old version that wasn't a patch it was fine.

Am I missing a step here (I'm sure I am). I've compiled OTTD. I've applied the patch. ...

Re: [Patch] Departure boards, 24h clock + binary

Posted: 12 Feb 2011 02:53
by Yexo
You should patch the source code. If you've done that correctly you have to compile the code again. The resulting binary will have the patch you used.

Re: [Patch] Departure boards, 24h clock + binary

Posted: 12 Feb 2011 03:05
by Norfolkadam
Yexo wrote:You should patch the source code. If you've done that correctly you have to compile the code again. The resulting binary will have the patch you used.
I tried to compile it again (I figured that was probably the missing step) and I got an error a la:

Code: Select all

[SRC] Compiling ai/ai_core.cpp
In file included from c:/ottd/src/ai/..window_func.h:15:0,
from c:/ottd/src/ai/ai_core.cpp:18:
c:/ottd/src/ai/../window_type.h:115:2: error: redfinition of 'WC_DEPARTURES_BOARD'
c:ottd/src/ai/..window_type.h:114:2: error: 'WC_DEPARTURES BOARD' previously defined here
make [1]: *** [ai/ai_core.o] Error 1
make [1]: Leaving directory '/c/ottd/objs/release'
make: *** [all] Error 1
And I have no idea what any of that means.

Re: [Patch] Departure boards, 24h clock + binary

Posted: 12 Feb 2011 03:10
by Yexo
Have you perhaps applied the patch twice? That could explain it. If so, revert the state (there should be a "revert" button in tortoisesvn) and after that apply the patch again, then compile again.

Other possible explanations why compiling could fail after applying a single patch:
-you applied the patch to another version of openttd than it was made for
-the patch is buggy.
Given the error message you posted neither of these is very likely.

Re: [Patch] Departure boards, 24h clock + binary

Posted: 12 Feb 2011 03:18
by Eddi
Yexo wrote:Have you perhaps applied the patch twice? That could explain it. If so, revert the state (there should be a "revert" button in tortoisesvn) and after that apply the patch again, then compile again.
this is missing a step: "reverting" the checkout only reverts files that are present in trunk. new files added to the repository by the patch must be deleted manually

Re: [Patch] Departure boards, 24h clock + binary

Posted: 12 Feb 2011 03:41
by Norfolkadam
Yexo wrote:Have you perhaps applied the patch twice? That could explain it. If so, revert the state (there should be a "revert" button in tortoisesvn) and after that apply the patch again, then compile again.

Other possible explanations why compiling could fail after applying a single patch:
-you applied the patch to another version of openttd than it was made for
-the patch is buggy.
Given the error message you posted neither of these is very likely.
If you were here right now I would kiss you. It's 3:40 and I think I've finally go this ok. It's compiling as we speak. I'll let you know if it works in about 20 minutes.

Re: [Patch] Departure boards, 24h clock + binary

Posted: 12 Feb 2011 03:45
by Norfolkadam
Got as far as compiling departures.cpp and then this:
argh.PNG
(278.74 KiB) Downloaded 3 times

Re: [Patch] Departure boards, 24h clock + binary

Posted: 12 Feb 2011 04:01
by Eddi
that's one of the newly added files i talked about. open it in an editor, and remove anything after the first duplicate line

Re: [Patch] Departure boards, 24h clock + binary

Posted: 12 Feb 2011 04:10
by Norfolkadam
Eddi wrote:that's one of the newly added files i talked about. open it in an editor, and remove anything after the first duplicate line
Ah okey doke. Well because that sounds like something I'd muck up I've re-downloaded my source, patched it (just the once this time :oops: ) and I'm re-compiling. I'll let you know how this goes.

Re: [Patch] Departure boards, 24h clock + binary

Posted: 12 Feb 2011 04:36
by Norfolkadam
So I started doing this at about 11pm and it's now 4:36am and I've finally got it right.

Hooray. Thanks for all your help.

Re: [Patch] Departure boards, 24h clock + binary

Posted: 19 Feb 2011 23:19
by Aylo
You did it!

I started a game, built a small network with about 5 lines and SPENT ONE HOUR just watching this Depature board with all the delayed trains !!

GREAT JOB :bow:

Re: [Patch] Departure boards, 24h clock + binary

Posted: 02 Mar 2011 10:32
by maselbe
I downloaded the win32 binary and tested your patch and it worked like a charm.
But a few day's back I created a scenario and when I started playing it, the game frequently crashed.
Do you still bug fix this patch and if so do I post a savegame here along with my newgrf list?

Re: [Patch] Departure boards, 24h clock + binary

Posted: 02 Mar 2011 13:35
by hthhs
maselbe wrote: Do you still bug fix this patch and if so do I post a savegame here along with my newgrf list?
Yes (assuming the crash is the fault of this patch) and yes.

Re: [Patch] Departure boards, 24h clock + binary

Posted: 02 Mar 2011 19:51
by maselbe
Well i'm assuming it has to be something with the patch, because it's the only thing different from my normal games. If not my apologies.
I'm also playing with the streettraffic AI.

Re: [Patch] Departure boards, 24h clock + binary

Posted: 03 Mar 2011 15:02
by oberhümer
It doesn't look like it has anything to do with the patch, the game's apparently checking the position of a vehicle on a tile, which is something this should not affect. Try to recreate the same situation with unpatched OpenTTD.

Re: [Patch] Departure boards, 24h clock + binary

Posted: 03 Mar 2011 16:29
by maselbe
oberhümer wrote:It doesn't look like it has anything to do with the patch, the game's apparently checking the position of a vehicle on a tile, which is something this should not affect. Try to recreate the same situation with unpatched OpenTTD.
Played the same scenario with the latest stable and same NewGRF files and that game doesn't crash.
I'll try loading the saved game I posted here into the stable and will check if the crash occurs.

Re: [Patch] Departure boards, 24h clock + binary

Posted: 04 Mar 2011 12:41
by hthhs
It isn't a fair comparison unless you test it with unpatched r21920, as it may contain bugs that are not present in the latest stable.

The crash does occur with unpatched r21920, so it's not the fault of the patch.

Re: [Patch] Departure boards, 24h clock + binary

Posted: 04 Mar 2011 13:12
by maselbe
hthhs wrote:It isn't a fair comparison unless you test it with unpatched r21920, as it may contain bugs that are not present in the latest stable.

The crash does occur with unpatched r21920, so it's not the fault of the patch.
So if I understand correctly it is the r21920 release of openttd that causes the crash ?
Is it possible to change the offered win32 binary to a newer (more stable) version ?

Re: [Patch] Departure boards, 24h clock + binary

Posted: 04 Mar 2011 17:18
by hthhs
Done.