[Patch] Departure boards, 24h clock + binary 25 (r27452)

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Patagonicus
Engineer
Engineer
Posts: 26
Joined: 24 Oct 2011 20:42

Re: [Patch] Departure boards, 24h clock + binary 25 (r27452)

Post by Patagonicus »

Just spend some time extracting JGR's fixes (hope he doesn't mine) from his patch pack (viewtopic.php?f=33&t=73469).

Thought I should share them here if you're interested. The fixes I included (from his Git log):
  • Fix main pane of departure boards window not being mouse-wheel scrollable.
  • Fix crash when a station is deleted with the departure boards window open.
  • Fix departures_widget.h being missing from source.list.
  • Fix whitespace issues.
  • Fix timetable rounding depending on the client time display mode setting. This causes desyncs if clients and the server have different values for this client setting.
  • Fix departure boards with orders with timetabled 0 travel times, e.g. those with depot service orders.
The full patch updated to (as of writing) newest trunk is attached.
Attachments
departureboardswallclock25-r27737.diff
(132.37 KiB) Downloaded 286 times
Chuckatron
Engineer
Engineer
Posts: 1
Joined: 22 Dec 2018 12:14

Re: [Patch] Departure boards, 24h clock + binary 25 (r27452)

Post by Chuckatron »

Hi all

I'm trying to compile r27737 with the patch posted above by Patagonicus. I'm not a Windows or C++ dev, so Visual Studio is a scary beast for me and I'm running into problems, I'm hoping someone can shed some light :D

When importing, I retarget for VS2017 and that seems to work OK. However, when I try a build with "x86" & "Release" selected, I receive the following errors:

Code: Select all

1>------ Rebuild All started: Project: OpenTTD, Configuration: Release Win32 ------
1>exe2coff.c
1>c:\users\andrew\desktop\openttd-trunk-r27737\os\dos\exe2coff\exe2coff.c(9): fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory
1>svnver1.c
1>c:\users\andrew\desktop\openttd-trunk-r27737\os\os2\svnver1.c(3): error C2001: newline in constant
1>c:\users\andrew\desktop\openttd-trunk-r27737\os\os2\svnver1.c(4): fatal error C1004: unexpected end-of-file found
1>svnver2.c
1>c:\users\andrew\desktop\openttd-trunk-r27737\os\os2\svnver2.c(1): error C2001: newline in constant
1>c:\users\andrew\desktop\openttd-trunk-r27737\os\os2\svnver2.c(1): error C2059: syntax error: 'string'
1>getaddrinfo.c
1>c:\users\andrew\desktop\openttd-trunk-r27737\src\3rdparty\os2\getaddrinfo.c(38): fatal error C1083: Cannot open include file: 'sys/socket.h': No such file or directory
1>getnameinfo.c
1>c:\users\andrew\desktop\openttd-trunk-r27737\src\3rdparty\os2\getnameinfo.c(56): fatal error C1083: Cannot open include file: 'sys/socket.h': No such file or directory
1>Compiling...
1>Generating Code...
1>Done building project "OpenTTD.vcxproj" -- FAILED.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
Looking at the file paths and Googling the missing file, it looks like these are all non-Windows dependencies, so if that's the case, I'm not surprised it's failing.

I'm sure this is a completely n00b question, so apologies for that. But how would I go about resolving this. It feels like I should be able to ignore missing libraries that don't apply to the platform I'm building for, but I freely admit my ignorance on the subject!

Many thanks! :bow:
Eddi
Tycoon
Tycoon
Posts: 8258
Joined: 17 Jan 2007 00:14

Re: [Patch] Departure boards, 24h clock + binary 25 (r27452)

Post by Eddi »

can you compile the unpatched base revision?
Patagonicus
Engineer
Engineer
Posts: 26
Joined: 24 Oct 2011 20:42

Re: [Patch] Departure boards, 24h clock + binary 25 (r27452)

Post by Patagonicus »

Chuckatron: Thinking the same as Eddi. I only compile on Linux (using cross-compilation for creating Windows binaries). Did you look at the wiki for a Windows compilation guide?
sirsmilerIII
Engineer
Engineer
Posts: 4
Joined: 15 Sep 2013 22:55

Re: [Patch] Departure boards, 24h clock + binary 25 (r27452)

Post by sirsmilerIII »

Patagonicus wrote:Just spend some time extracting JGR's fixes (hope he doesn't mine) from his patch pack (viewtopic.php?f=33&t=73469).

Thought I should share them here if you're interested. The fixes I included (from his Git log):
  • Fix main pane of departure boards window not being mouse-wheel scrollable.
  • Fix crash when a station is deleted with the departure boards window open.
  • Fix departures_widget.h being missing from source.list.
  • Fix whitespace issues.
  • Fix timetable rounding depending on the client time display mode setting. This causes desyncs if clients and the server have different values for this client setting.
  • Fix departure boards with orders with timetabled 0 travel times, e.g. those with depot service orders.
The full patch updated to (as of writing) newest trunk is attached.
Sorry to sound stupid but I have downloaded the .diff file, and do not know how to open it in the game. I am using the latest version of the game on Windows, and would love to have departure boards again.
Patagonicus
Engineer
Engineer
Posts: 26
Joined: 24 Oct 2011 20:42

Re: [Patch] Departure boards, 24h clock + binary 25 (r27452)

Post by Patagonicus »

You can't open a patch with the game, you need to apply it to the source code and compile the game yourself, see https://wiki.openttd.org/Patches. You might find that a bit tricky to do, unless you're experienced in software development.

Alternatively, you can have a look at JGR's patch pack (viewtopic.php?f=33&t=73469), it includes departure boards among a lot of other patches - and there's a binary release for windows, ready to download and play :)

sirsmilerIII wrote:Sorry to sound stupid but I have downloaded the .diff file, and do not know how to open it in the game. I am using the latest version of the game on Windows, and would love to have departure boards again.
sirsmilerIII
Engineer
Engineer
Posts: 4
Joined: 15 Sep 2013 22:55

Re: [Patch] Departure boards, 24h clock + binary 25 (r27452)

Post by sirsmilerIII »

Patagonicus wrote:Alternatively, you can have a look at JGR's patch pack (viewtopic.php?f=33&t=73469), it includes departure boards among a lot of other patches - and there's a binary release for windows, ready to download and play :)
Thank you, I've downloaded the JGR Patch Pack instead :D
MathiasBergmann
Engineer
Engineer
Posts: 6
Joined: 10 Dec 2014 09:53

Re: [Patch] Departure boards, 24h clock + binary 25 (r27452)

Post by MathiasBergmann »

Hey guys,

I know it's been a while since the patch was created, but I have a question about it.

Namely, what should I do to have "expected" status at the departure board? It only ever shows "delayed", never expected. Should something be set in the settings? Or maybe it has something to do with the vehicles' timetables?

Thank you in advance for any response,
Mathias
User avatar
SciFurz
Traffic Manager
Traffic Manager
Posts: 154
Joined: 13 Oct 2018 16:33
Contact:

Re: [Patch] Departure boards, 24h clock + binary 25 (r27452)

Post by SciFurz »

MathiasBergmann wrote: 07 Jul 2019 19:57 Hey guys,

I know it's been a while since the patch was created, but I have a question about it.

Namely, what should I do to have "expected" status at the departure board? It only ever shows "delayed", never expected. Should something be set in the settings? Or maybe it has something to do with the vehicles' timetables?

Thank you in advance for any response,
Mathias
It should display automatically as Expt time status (see screenshot where I decreased one travel time).
Refrence, 1980-12-23#1.png
(376.53 KiB) Not downloaded yet
At least, it does in the JGR patchpack. I can't tell if there's been changes in the implementation in that pack.
Tinkering in the code in between writing mostly naughty stuff.
See http://scifurz.wordpress.com/
MathiasBergmann
Engineer
Engineer
Posts: 6
Joined: 10 Dec 2014 09:53

Re: [Patch] Departure boards, 24h clock + binary 25 (r27452)

Post by MathiasBergmann »

For whatever reason it doesn't, but maybe I indeed should try it in JGR Patchpack, as I use a different patchpack normally.

What I noticed in my game, is that it displays the Expt time, but only for like 1/10 of a second and then it just shows "delayed"
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Amazon [Bot] and 6 guests