IRC logs for #openttd on OFTC at 2023-11-26
            
00:01:43 <peter1138> _glx_, oh, that's because I removed a cast because OpenTTD's Md5 doesn't need it.
00:02:09 <_glx_> yeah but there are 13 other warnings anyway
00:03:18 <peter1138> The "two" warnings are actually 1 warning from two builds, right?
00:04:28 <peter1138> Well, whatever, it's nicer without all that gumf
00:04:29 <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on pull request #11492: Add: 'Vendor' grfid tool from grfcodec to calculate orig_extra.grf hash https://github.com/OpenTTD/OpenTTD/pull/11492#issuecomment-1826446897
00:05:13 <peter1138> Hehe all the funny warnings about accepting a filename from the command line.
00:05:15 <_glx_> yes it's MSVC 64bit
00:05:18 <peter1138> Yea... that's kinda the point.
00:05:43 <_glx_> these are not warnings, but errors from codeql
00:06:14 <_glx_> because it's not safe to thrust external data
00:06:16 <peter1138> They're still warnings, I am aware they're not compiler warnings.
00:06:24 <peter1138> Definitely don't thrust it.
00:06:43 <_glx_> yeah funny typo
00:06:52 <DorpsGek> [OpenTTD/grfcodec] PeterN dismissed a review for pull request #26: Codechange: Rewrite grfid to use modernish C++. https://github.com/OpenTTD/grfcodec/pull/26#pullrequestreview-1749246527
00:06:55 <DorpsGek> [OpenTTD/grfcodec] PeterN updated pull request #26: Codechange: Rewrite grfid to use modernish C++. https://github.com/OpenTTD/grfcodec/pull/26
00:07:06 <peter1138> Sorry but I'm not fine with adding warnings right now :D
00:08:15 <peter1138> And I ought to sleep before I stay up all night again.
00:12:15 <DorpsGek> [OpenTTD/grfcodec] glx22 approved pull request #26: Codechange: Rewrite grfid to use modernish C++. https://github.com/OpenTTD/grfcodec/pull/26#pullrequestreview-1749247498
00:12:51 <peter1138> :)
00:13:01 <peter1138> I can't merge there so you might as well :-)
00:14:12 <DorpsGek> [OpenTTD/grfcodec] glx22 merged pull request #26: Codechange: Rewrite grfid to use modernish C++. https://github.com/OpenTTD/grfcodec/pull/26
00:15:05 <_glx_> funny locally I get a "The contents of <filesystem> are available only with C++17 or later." warning
00:16:03 <_glx_> probably a VS2022 addition
00:17:05 <peter1138> No, I think -std=c++17 isn't specified.
00:18:21 <_glx_> yup cmake still says 11
00:18:45 <peter1138> Simple to fix. Sorry.
00:19:00 <peter1138> Er, but don't. It doesn't build, lol.
00:20:35 *** dale has joined #openttd
00:20:42 <_glx_> yeah internal compiler error
00:20:46 <_glx_> boost related
00:20:55 <peter1138> uint columns = (uint)max_element(sections.begin(),sections.end(), boost::lambda::bind(&vector<string>::size,boost::lambda::_1) < boost::lambda::bind(&vector<string>::size,boost::lambda::_2))->size();
00:21:08 <peter1138> That is not liked... and I have no idea what that is doing.
00:21:38 <peter1138> Sounds like I've become the grfcodec maintainer ;(
00:25:43 <_glx_> looks like a lambda pre c++11
00:26:04 <_glx_> which happened to still work with c++11
00:40:40 *** dale has quit IRC (Remote host closed the connection)
01:13:16 <_glx_> ok fixed the line, and c++17 works
01:29:35 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
02:15:15 <DorpsGek> [OpenTTD/grfcodec] glx22 opened pull request #27: Cleanup: Fix some warnings https://github.com/OpenTTD/grfcodec/pull/27
02:18:30 <DorpsGek> [OpenTTD/OpenTTD] JGRennison opened pull request #11495: Codechange: Simplify sprite cache memory management https://github.com/OpenTTD/OpenTTD/pull/11495
02:26:53 <DorpsGek> [OpenTTD/OpenTTD] JGRennison updated pull request #11495: Codechange: Simplify sprite cache memory management https://github.com/OpenTTD/OpenTTD/pull/11495
02:32:56 <DorpsGek> [OpenTTD/grfcodec] glx22 updated pull request #27: Cleanup: Fix some warnings https://github.com/OpenTTD/grfcodec/pull/27
02:36:19 <_glx_> BTW the boost::lambda stuff is equivalent to `uint columns = (uint)max_element(sections.begin(),sections.end(), [](auto a, auto b) { return a.size() < b.size(); })->size();`, but I removed the need to switch to c++17
03:14:54 *** D-HUND has joined #openttd
03:17:00 *** Wormnest has quit IRC (Quit: Leaving)
03:18:10 *** debdog has quit IRC (Ping timeout: 480 seconds)
03:19:37 *** D-HUND is now known as debdog
03:20:07 <DorpsGek> [OpenTTD/grfcodec] glx22 updated pull request #27: Cleanup: Fix some warnings https://github.com/OpenTTD/grfcodec/pull/27
04:36:51 <DorpsGek> [OpenTTD/grfcodec] glx22 updated pull request #27: Cleanup: Fix some warnings https://github.com/OpenTTD/grfcodec/pull/27
06:50:40 *** tokai|noir has joined #openttd
06:50:41 *** ChanServ sets mode: +v tokai|noir
06:57:26 *** tokai has quit IRC (Ping timeout: 480 seconds)
06:59:27 *** Flygon has joined #openttd
07:31:33 *** Wolf01 has joined #openttd
07:41:57 *** kuhnovic has joined #openttd
07:41:57 <kuhnovic> talltyler: It definitely needs some heavy play testing. I've done that already with a couple of friends to work out the initial issues. But that's still the developer testing his own stuff, to some extent. It wouldn't hurt to have some extra pairs of eyes look at this ๐Ÿ™‚
08:00:13 *** rau117 has joined #openttd
08:00:13 <rau117> kuhnovic: Is pre-compiled version aviable?
08:00:13 <rau117> If this is really important thing, then it worth making a post in Reddit/ottd website about needed help.
08:00:13 <rau117> __The main thing is not taking away the **only** ship advantage โ€“ no collision with other ships.__
08:05:57 <peter1138[d]> Oh.. filesystem wasn't even needed hah
08:10:31 <Eddi|zuHause> rau117: the main problem with this argument is that it makes no sense for ships to have this advantage in the first place.
08:13:36 <merni> but, fwiw, this patch preserves that advantage
08:22:34 <locosage> it makes sense for them to have at least some advantage, otherwise you may as well remove them from the game :p
08:23:20 <locosage> also, it's quite realistic, a lot of ships can use small canals without colliding, it's just that game scale can't represent that adequately
08:23:27 <rau117> Eddi|zuHause: Planes - simplicity and speed, buses - transfer from inside the city, trains - simply the best form of transport...
08:23:27 <rau117> What about ships? They are slow, not that spacious, and require expensive channels (3.75k per tile) to move deeper into the continent. But they can pass through each other to maintain high throughput. Without this, the ships will remain practically useless.
08:23:27 <rau117> For a more advanced game, of course. Not from the side of โ€œbeginnersโ€ or โ€œrealismโ€ (for realism there is JGR and there is already a setting for collision).
08:28:53 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #11495: Codechange: Simplify sprite cache memory management https://github.com/OpenTTD/OpenTTD/pull/11495#pullrequestreview-1749302431
08:35:53 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1178252777097531422/image.png?ex=65757868&is=65630368&hm=635c05ff008c160796d44108224a0e6829925604f4ca9fef5c9dcbd365d37a2d&
08:35:53 <andythenorth> was if flat docks yet?
08:56:17 <_pruple> dot flacks
08:56:22 <Flygon> Having smaller "level" piers as opposed to bigger ones for rivers would be great hahaha.
08:58:41 *** HerzogDeXtEr has joined #openttd
09:07:18 *** nielsm has joined #openttd
09:19:53 <DorpsGek> [OpenTTD/OpenTTD] JGRennison updated pull request #11495: Codechange: Simplify sprite cache memory management https://github.com/OpenTTD/OpenTTD/pull/11495
09:21:06 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on pull request #11495: Codechange: Simplify sprite cache memory management https://github.com/OpenTTD/OpenTTD/pull/11495#issuecomment-1826732273
09:22:29 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on pull request #11495: Codechange: Simplify sprite cache memory management https://github.com/OpenTTD/OpenTTD/pull/11495#pullrequestreview-1749309779
09:23:50 <truebrain> hmm, that PR now also no longer tells the user when it ran out of memory during sprite-cache stuff, right?
09:24:04 <DorpsGek> [OpenTTD/OpenTTD] JGRennison updated pull request #11495: Codechange: Simplify sprite cache memory management https://github.com/OpenTTD/OpenTTD/pull/11495
09:26:07 <truebrain> the diff is a bit tricky to read ๐Ÿ˜„
09:26:13 <truebrain> due to GitHub's visualization
09:29:41 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on pull request #11495: Codechange: Simplify sprite cache memory management https://github.com/OpenTTD/OpenTTD/pull/11495#pullrequestreview-1749310401
09:31:23 <DorpsGek> [OpenTTD/OpenTTD] LordAro commented on pull request #11495: Codechange: Simplify sprite cache memory management https://github.com/OpenTTD/OpenTTD/pull/11495#issuecomment-1826734331
09:32:10 <truebrain> LordAro: #11488 should be closed either way, as it is a nonsense ticket ๐Ÿ˜›
09:32:19 <truebrain> worrying about virtual memory is a bit pointless ๐Ÿ™‚
09:32:45 <_zephyris> andythenorth: I've never tried a flat dock implementation - is there one? Does it need sprites?
09:32:59 <LordAro> truebrain: :>
09:33:30 <truebrain> To reword it: #11488 is not a bug of any kind. But yes, #11495 seems to do the "feel free to change this" comment of mine ๐Ÿ˜›
09:34:35 <truebrain> _jgr_: I tried to discover myself what happens when allocations fail because the computer ran out of memory, but I have a hard time finding that out ๐Ÿ˜ฆ
09:35:39 <truebrain> I think that will assert on the second sprite after the first fails to allocate?
09:37:00 *** jfs has joined #openttd
09:37:00 <jfs> all that work on a cache thing reminded me of this article, which is probably not relevant but still a good read: https://devblogs.microsoft.com/oldnewthing/20060502-07/?p=31333
09:39:10 <_jgr_> A program can have more virtual memory allocated than physical memory available
09:39:40 <_jgr_> Running out of memory all together typically means that one or more programs are killed outright
09:40:03 <andythenorth> _zephyris: no implementation ๐Ÿ™‚
09:40:10 <truebrain> yes; that is what my comment in the PR was about; but now I was just more wondering: what actually happens? I was trying to follow the code, and I had a bit of a hard time
09:40:11 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1178268961062801508/image.png?ex=6575877b&is=6563127b&hm=e281fd595829c857880db574a7b323af2093c8b06348c1ce655b93abca9fb9aa&
09:40:11 <andythenorth> "this is fine"
09:40:27 <truebrain> the question is not: should we do anything when it fails; it is about: I am trying to follow the code and I fail ๐Ÿ˜›
09:40:28 <_jgr_> It's the same as any other normal allocationusing malloc/new
09:40:54 <truebrain> it seems I have to add more context to my question, as it seems it is being overtaught ๐Ÿ˜„ (which I can understand btw)
09:41:07 <truebrain> I was looking at the Allocate function, and it sets the data to the allocation, and the size to the requested size
09:41:17 <truebrain> so I was like: those can, in theory, mismatch, and you don't check for allocation failure
09:41:21 <truebrain> so is that actually a problem?
09:41:48 <truebrain> as GetData and GetSize will disagree, basically
09:42:27 <_jgr_> If new fails, the program is killed
09:42:40 <truebrain> doesn't it return a nullptr?
09:42:44 <_jgr_> No
09:42:53 <truebrain> a badalloc?
09:43:07 <truebrain> owh, yeah, ofc, you need a `std::nothrow` for that to not happen
09:43:09 <truebrain> gotcha ๐Ÿ™‚
09:43:10 <truebrain> tnx ๐Ÿ™‚
09:43:48 <_jgr_> In principle you could use that, but if you can't allocate a single small object then the game is up already
09:43:49 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain closed issue #11488: [Bug]: spritecache excessive size https://github.com/OpenTTD/OpenTTD/issues/11488
09:43:52 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on issue #11488: [Bug]: spritecache excessive size https://github.com/OpenTTD/OpenTTD/issues/11488
09:43:56 <truebrain> absolutely agree
09:44:43 <truebrain> as I said, my question was much more splicitic in nature ๐Ÿ˜„
09:45:11 <truebrain> now I wonder if there isn't already a container in STL that does what SpriteDataBuffer does ๐Ÿ˜›
09:46:20 <truebrain> Java (yes, I have been writing Java, don't get me started) has a ByteBuffer
09:47:57 <jfs> std::vector<char> is guaranteed to be a contiguous slab of memory that can be reallocated...
09:48:08 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on pull request #11492: Add: 'Vendor' grfid tool from grfcodec to calculate orig_extra.grf hash https://github.com/OpenTTD/OpenTTD/pull/11492#issuecomment-1826737552
09:50:26 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on pull request #11495: Codechange: Simplify sprite cache memory management https://github.com/OpenTTD/OpenTTD/pull/11495#pullrequestreview-1749313717
09:51:27 <truebrain> did _zephyris actually fix river slopes being more visible in their direction?! ๐Ÿ˜ฎ ๐Ÿ˜ฎ
09:51:49 <truebrain> I guess that answers why #11492 is needed .. lol
09:52:51 <_jgr_> I'd always thought that vector was a bit odd for this sort of thing, seeing as it's inherently a resizable container with separate capacity and size
09:53:11 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on pull request #11491: Fix: Add shading to river slopes https://github.com/OpenTTD/OpenTTD/pull/11491#issuecomment-1826738523
09:53:48 <jfs> true, if you resize a vector smaller it doesn't reallocate so might just keep using the same amount of memory
09:56:43 <_jgr_> I suppose there's shrink_to_fit for that
09:57:15 <truebrain> sounds like more code that can break; in that case your code is better ๐Ÿ™‚
10:03:29 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on pull request #11406: Include AppStream metadata info into source distribution https://github.com/OpenTTD/OpenTTD/pull/11406#issuecomment-1826740661
10:03:32 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain closed pull request #11406: Include AppStream metadata info into source distribution https://github.com/OpenTTD/OpenTTD/pull/11406
10:06:45 <truebrain> whole ticket about SDL fullscreen .. why do people run games in fullscreen? It rarely works ๐Ÿ˜›
10:06:46 <truebrain> ๐Ÿ˜„
10:06:54 <truebrain> (sorry, catching up with PRs and issues ๐Ÿ˜› )
10:16:15 <DorpsGek> [OpenTTD/OpenTTD] JGRennison updated pull request #11495: Codechange: Simplify sprite cache memory management https://github.com/OpenTTD/OpenTTD/pull/11495
10:20:52 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on issue #11485: [Bug]: Storybook duplicates some words when wrapping https://github.com/OpenTTD/OpenTTD/issues/11485
10:21:19 <truebrain> _jgr_: tnx for the `to_remove`, that really is much more clear ๐Ÿ™‚
10:44:47 *** lamarr has joined #openttd
10:44:47 <lamarr> truebrain: huh? the vast majority of games I play work fine in fullscreen, I'd even say it's the general standard
10:44:47 <lamarr> nonetheless we found the likely culprit in the openttd code --> https://github.com/OpenTTD/OpenTTD/issues/11353#issuecomment-1762567089
10:54:34 <jfs> can we just remove fullscreen and tell people to resize/maximize the window to desktop size if they need to?
10:55:18 <Eddi|zuHause> have you ripped out a page from the "andy's arguments" book?
10:56:11 <jfs> yes
11:00:03 <Eddi|zuHause> the most problems i had with "fullscreen" in the past were due to changing resolution
11:01:11 <Eddi|zuHause> a problem that doesn't occur with borderless window, as it is naturally forced to the desktop resolution
11:09:41 <_zephyris> There is a maximise/restore bug on windows... If it starts as a non-maximised window, then maximise/restore behave nicely. If it starts maximised then restore doesn't change the window size.
11:10:46 <_zephyris> And annoyingly, at least on win10, going from a maximised window to a restored window increases titlebar size and window padding, so the window edges/corners go off-screen and you can't grab them to resize the window.
11:11:34 <DorpsGek> [OpenTTD/nml] matthijskooijman opened pull request #312: Fix cleanup leaving generated files behind https://github.com/OpenTTD/nml/pull/312
11:20:40 <truebrain> lamarr: Borderless fullscreen is much more common and much better in many ways. Changing resolutions of a screen is very troublesome, on all OSes, for many reasons. It is also a weird concept, that was only useful in the old days, where you would like to run a game fullscreen on a different resolution than your desktop resolution. It no longer makes actual sense
11:21:12 <truebrain> "back in my day", games had to run in 640x480 while your screen was already a wopping 800x600!
11:21:19 <truebrain> but these days that is all nonsense ๐Ÿ˜›
11:21:29 <truebrain> been willing to add borderless fullscreen for years, but never got to it ๐Ÿ˜›
11:21:53 <michi_cc[d]> Add background sounds of certain players getting out the pitchforks ๐Ÿคฃ
11:22:21 <truebrain> it is funny how a lot of games have "Fullscreen", which in fact is implemented as borderless ๐Ÿ˜›
11:22:52 <truebrain> to avoid those pitchforks ๐Ÿ˜„
11:23:06 <michi_cc[d]> Most of them have variable-.sized GUI and content (i.e. rendered 3D) though.
11:23:28 <truebrain> yeah, that caught on nicely in the last few years
11:24:14 <_zephyris> I heard that this 3D thing has been catching on.
11:24:16 <michi_cc[d]> With this the actual resolutions really is mostly whatever.
11:25:37 <michi_cc[d]> Though of course personally I never play anything fullscreen, because I don't have enough desk space to allocate a full monitor to each and every application I run at the same time ๐Ÿ˜›
11:26:07 <truebrain> in the old days, you needed fullscreen as otherwise your GPU couldn't accelerate the game sufficiently
11:26:12 <truebrain> that too, hasn't been true in 10 years ๐Ÿ™‚
11:26:40 <truebrain> it is funny how much things changed in the last decade or so
11:26:59 <truebrain> anyway, the only legit reason I know for OpenTTD to have a fullscreen is what you mentioned already: people on 4k wanting to play the game ๐Ÿ˜›
11:28:38 <Eddi|zuHause> i wonder why OSes haven't implemented window-specific zoom yet
11:29:23 <truebrain> I doubt a generic implementation of that is even possible
11:29:31 <truebrain> an OpenGL pane wouldn't know about that, for example
11:30:23 <michi_cc[d]> On modern Windows it should actually be possible as everything goes through dwm, including 3D content.
11:30:47 <truebrain> handling of subpixels would be awkward in that case
11:30:59 <truebrain> so it would only be able to do 2x, 4x, etc I guess?
11:31:08 <michi_cc[d]> Sure, any sub-pixel text rendering would probably look horrible ๐Ÿ™‚
11:31:25 <truebrain> I think it would make for a very shitty experience ๐Ÿ˜›
11:31:34 <truebrain> (which might be the reason nobody does it ๐Ÿ˜„ )
11:35:59 <lamarr> truebrain: that's fine, I'm not a sticky for 'true' full screen ! I just want the window to take up the full screen space lol
11:36:26 <truebrain> yeah, just to be clear, in no way shape or form I am suggesting the bug isn't legit and shouldn't be fixed
11:36:34 <truebrain> I was just having fun of people still using fullscreen ๐Ÿ™‚
11:38:21 <truebrain> Owh, the old days, where "multimonitor" in X11 just didn't exist ... it was just one big monitor, as far as X11 was concerned ..
11:38:25 <truebrain> you couldn't even maximize a window
11:40:37 <jfs> I don't remember if that's being done already, but imo at least in accelerated video drivers (OpenGL) selecting fullscreen should not use exclusive fullscreen, but just do desktop-sized window and scale the selected resolution to that
11:40:50 <jfs> (windowed fullscreen)
11:41:08 <truebrain> like, a borderless fullscreen you mean? ๐Ÿ˜›
11:41:15 <jfs> yes
11:41:26 <truebrain> truebrain: welcome to 10 minutes ago ๐Ÿ™‚
11:42:01 <jfs> I'm just qualifying it a bit more, with the "when using an accelerated video output"
11:42:26 <truebrain> I was refering to the "if that's being done already" ๐Ÿ™‚
11:42:42 <truebrain> we have two modes: exclusive full screen or windowed
11:44:22 <truebrain> plenty of places to still improve OpenTTD ๐Ÿ˜„
11:44:30 <DorpsGek> [OpenTTD/nml] matthijskooijman commented on pull request #310: Replaced deprecated setup.py with setup.cfg https://github.com/OpenTTD/nml/pull/310#issuecomment-1826761176
12:03:46 <peter1138[d]> Hi
12:04:04 <peter1138[d]> Back now. Yes v2 to allow 32bpp in basesets
12:04:22 <peter1138[d]> Er, in our extra data, sorry
12:04:32 <truebrain> Something to add to the motivation, for future-us ๐Ÿ™‚
12:04:54 <peter1138[d]> Yea, forgot to add that
12:05:29 <peter1138[d]> Also, vectors for a data buffer are good, it avoids messing with pointers at all.
12:06:06 <peter1138[d]> The only advantage of the unique_ptr approach is you don't waste time initializing the buffer
12:06:34 <peter1138[d]> I assumed that was the motivation in the sprite cache stuff.
12:06:35 <truebrain> also no storage container for capacity, I guess. Saves some bytes! ๐Ÿ˜›
12:06:53 <peter1138[d]> Well no, it's just built-in ๐Ÿ™‚
12:07:21 <peter1138[d]> But you can just use a vector instead of that whole class, I think.
12:07:48 <truebrain> a vector stores both the capacity and current-size, not?
12:08:04 <truebrain> just curious btw, don't get what you mean with "built-in"
12:08:11 <peter1138[d]> Ah right, I see what you mean now
12:08:20 <truebrain> storage container is a poor choice of words
12:08:30 <truebrain> replace it with "variable"? Well, what-ever, that! ๐Ÿ˜›
12:26:33 <peter1138[d]> Is it sleep time yet?
12:26:36 <truebrain> yes
12:32:48 <Eddi|zuHause> why is it that games that used to run fine half a year ago don't anymore?
12:32:52 <Eddi|zuHause> like... what even changed?
12:33:48 <_glx_> Optimisations
12:34:09 <peter1138> Do you mean don't run at all, or run but slower?
12:34:12 <DorpsGek> [OpenTTD/nml] matthijskooijman updated pull request #312: Fix cleanup leaving generated files behind https://github.com/OpenTTD/nml/pull/312
12:34:42 <_glx_> Same with subtitles, screen sizes increases, subtitles sizes are smaller ans smaller
12:35:00 <DorpsGek> [OpenTTD/nml] matthijskooijman commented on pull request #312: Fix cleanup leaving generated files behind https://github.com/OpenTTD/nml/pull/312#issuecomment-1826772513
12:35:31 <Eddi|zuHause> like in... it doesn't even start
12:35:51 <peter1138> Okay, then report a bug.
12:35:51 <truebrain> in general, life just progresses worse and worse ๐Ÿ˜›
12:36:17 <peter1138> Don't think it's expected and normal.
12:36:53 <peter1138> (Although I think there's a few revisions which were incompatible due to changing Linkgraph saveload a little.
12:37:08 <peter1138> )
12:37:09 <truebrain> is he even talking about OpenTTD?
12:37:11 <Eddi|zuHause> but report bugs to where? graphics driver? proton? any number of installed libraries?
12:37:21 <peter1138> Oh.
12:37:27 <peter1138> I assumed it was OpenTTD savegames :o
12:37:27 <Eddi|zuHause> no, i'm talking about games in general
12:37:41 <truebrain> it is a sane assumption, but it is Eddi ๐Ÿ˜› ๐Ÿ˜„ โค๏ธ
12:38:02 <Eddi|zuHause> why would anyone even assume "sane"? :p
12:39:17 <_zephyris> Is the chat about v2 container hashes going to change the hash?
12:39:27 <peter1138> No.
12:39:29 <_glx_> Partly
12:40:16 <peter1138> _zephyris, the issue is OpenTTD's built system doesn't use the correct tool to calculate NewGRF hashes, so it miscalculates the hash for container v2 NewGRFs.
12:40:34 <peter1138> But it is just our build system that is wrong, not the tools or OpenTTD itself.
12:40:51 <peter1138> It was never an issue because our NewGRF has always been v1 :)
12:41:19 <_zephyris> I remember it being annoying to get 32bpp base sets working
12:41:45 <peter1138> Was it?
12:42:11 <_zephyris> Ie. You have to use the nmlc reported hash, not the file hash
12:42:29 <peter1138> Yes, that's the same issue. But that is precisely why nmlc reports the hash.
12:43:09 <peter1138> It's by design, in v2 the hash does not cover the graphics themselves.
12:44:11 <peter1138> This means a 32bpp 4x extra zoom NewGRF can be considered compatible with a 8bpp 1x zoom NewGRF, as long as the actions-part of the NewGRF is the same.
12:45:35 <peter1138> _zephyris, there is a tool that comes with grfcodec called "grfid" that... apparently I wrote.
12:45:55 <peter1138> It was since updated to be able to calculate the md5 hash of v1 and v2 container NewGRFs.
12:46:03 <_zephyris> Hah, in the mists of time then ๐Ÿ™‚
12:46:04 <peter1138> So if you need a separate tool to do it, use grfid.
12:46:27 <_zephyris> peter1138: Makes sense
12:46:28 <peter1138> I wrote it in ~ 2009, before v2 existed, and it could only get the grfid back then.
12:47:05 <peter1138> And the latest unreleased version of it uses standard C++ instead of hacking around windows and linux specifics :D
12:53:46 <DorpsGek> [OpenTTD/OpenTTD] PeterN approved pull request #11435: Feature: Mode to display timetable in seconds https://github.com/OpenTTD/OpenTTD/pull/11435#pullrequestreview-1749339685
13:04:38 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #11495: Codechange: Simplify sprite cache memory management https://github.com/OpenTTD/OpenTTD/pull/11495#pullrequestreview-1749341492
13:05:28 <talltyler> Uh Peter, #11435 doesnโ€™t redraw properly yet ๐Ÿ˜„
13:05:48 <talltyler> Thereโ€™s a to-do bullet in the description explaining whatโ€™s wrong ๐Ÿ™‚
13:05:52 <peter1138> Oh, s the second commit wasn't it?
13:05:56 <peter1138> *so
13:05:57 <peter1138> Hmm.
13:19:37 <peter1138> Okay, so.
13:20:09 <peter1138> * [new ref] refs/pull/11435/head -> pr11435
13:20:29 <peter1138> Time to test... with timetables... which I don't normally use :D
13:22:47 <peter1138> timetable_gui.cpp:235 is suspicious.
13:24:10 <peter1138> (It's still building, I didn't get as far as running)
13:37:29 <peter1138> Awkward that we have signed and unsigned ticks.
13:38:42 <peter1138> Does andythenorth use timetables.
13:40:16 <peter1138> talltyler, yeah, "start_time" there changes about every 2 seconds, so...
13:47:15 <talltyler> Signed ticks is like an offset, TickDiff essentially
13:47:23 <talltyler> But yeah itโ€™s odd
13:48:00 <peter1138> It's not odd, it's often considered bad-form to use unsigned where we think it shouldn't go negative.
13:48:10 <peter1138> Because often when calculations is needs to.
13:48:24 <peter1138> *it
13:48:39 <talltyler> Yes, we need to be careful with the unsigned form. One of the reasons I gave it a separate type.
13:48:55 <peter1138> Anyway, using date_fract on that line is definitely the problem. That is rounding it to calendar days, which is 2 seconds.
13:49:08 <peter1138> Er, not rounding, aligning.
13:49:12 <talltyler> Iโ€™m actually considering making Ticks strongly defined like Date and Year, to avoid problems in the future
13:49:26 <talltyler> Oh interesting, Iโ€™ll take a look when I get home from my walk
14:04:21 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
14:18:32 <peter1138> ./build/media/baseset/orig_extra/orig_extra.grf.hash
14:18:41 <peter1138> Ah, it writes it to the build folder :/
14:25:03 <peter1138> Oh right, the -E copy command just below also copies from build to src.
14:34:03 <talltyler> Hmm, now how do we align with full seconds and not use ticks...
14:34:42 <peter1138> Does it need to be aligned to full seconds?
14:35:03 <talltyler> It would be nice to be able to align vehicles
14:35:30 <peter1138> (I don't know what the alignment actually does)
14:35:49 <talltyler> Although, that would be when setting start dates and travel times, not displaying it
14:37:18 <talltyler> Oh, I wonder if the existing alignment is when we're timetabling in ticks, and travel/loading times can be in however many ticks the player wants
14:37:32 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #11492: Add: 'Vendor' grfid tool from grfcodec to calculate orig_extra.grf hash https://github.com/OpenTTD/OpenTTD/pull/11492
14:37:33 <talltyler> So that the date is correct
14:39:04 <talltyler> Let's build it and see if it works ๐Ÿ™‚
14:40:33 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #11492: Add: 'Vendor' grfid tool from grfcodec to calculate orig_extra.grf hash https://github.com/OpenTTD/OpenTTD/pull/11492#issuecomment-1826801789
14:46:10 <talltyler> Cool, it updates every second now, but the countdcwn goes...up??
14:46:42 <talltyler> Ah, missing `-`
14:46:43 <peter1138> Hmm, CI not running for 11492
14:47:18 *** virtualrandomnumber has joined #openttd
14:47:38 *** virtualrandomnumber has quit IRC ()
14:48:51 <peter1138> The way we use cmake's execute_process is a bit naughty :D
14:49:43 <andythenorth> peter1138: I use โ€œwait 10 daysโ€ for loading pax vehicles
14:50:03 <peter1138> Yeah thanks. It was enough to load up your game and see timetable stuff happening :D
15:05:12 <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on pull request #11492: Change: When building NewGRFs, use grfid (from grfcodec) to calculate NewGRF MD5 hash. https://github.com/OpenTTD/OpenTTD/pull/11492#pullrequestreview-1749360302
15:07:16 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #11492: Change: When building NewGRFs, use grfid (from grfcodec) to calculate NewGRF MD5 hash. https://github.com/OpenTTD/OpenTTD/pull/11492#pullrequestreview-1749360664
15:09:33 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #11492: Change: When building NewGRFs, use grfid (from grfcodec) to calculate NewGRF MD5 hash. https://github.com/OpenTTD/OpenTTD/pull/11492
15:09:50 <peter1138> Removed the strip as well so the commit checker doesn't complain.
15:12:18 <_glx_> hmm and I should test locally before approve (CI doesn't validate grfcodec stuff)
15:13:27 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler dismissed a review for pull request #11435: Feature: Mode to display timetable in seconds https://github.com/OpenTTD/OpenTTD/pull/11435#pullrequestreview-1749339685
15:13:30 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler updated pull request #11435: Feature: Mode to display timetable in seconds https://github.com/OpenTTD/OpenTTD/pull/11435
15:14:47 <talltyler> Fixed! I also improved the timer to use ticks instead of seconds for the redraw interval, so it works in fast-forward. ๐Ÿ™‚
15:15:57 <talltyler> Once that's merged, I get to start a really fun rebase of Real-Time Mode ๐Ÿ˜„
15:18:47 <peter1138> Redrawing based on ticks might want a lower limit though. Hmm.
15:19:17 <peter1138> (A minimum interval, that is)
15:25:01 <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on pull request #11492: Change: When building NewGRFs, use grfid (from grfcodec) to calculate NewGRF MD5 hash. https://github.com/OpenTTD/OpenTTD/pull/11492#pullrequestreview-1749363403
15:25:47 <_glx_> custom targets are for manual runs
15:26:58 <_glx_> https://cdn.discordapp.com/attachments/1008473233844097104/1178356232118087802/image.png?ex=6575d8c2&is=656363c2&hm=250c3ac49f877dea7f50d78dd30da4d1649818835885a830177ffdb363995297&
15:28:06 <peter1138> Ah
15:29:26 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #11492: Change: When building NewGRFs, use grfid (from grfcodec) to calculate NewGRF MD5 hash. https://github.com/OpenTTD/OpenTTD/pull/11492
15:36:42 <DorpsGek> [OpenTTD/OpenTTD] glx22 approved pull request #11492: Change: When building NewGRFs, use grfid (from grfcodec) to calculate NewGRF MD5 hash. https://github.com/OpenTTD/OpenTTD/pull/11492#pullrequestreview-1749365118
15:37:07 <_glx_> in some case custom targets are also part of the dependency tree, but not here
15:41:45 <_zephyris> Presumably I need to rebuild and update the river slopes PR to add the hashes?
15:42:26 <peter1138> Not yet, it's not merged yet :-)
15:43:05 <peter1138> But when you do, the .hash files will need to be included.
15:45:06 <andythenorth> peter1138: "timetable" because we don't have partial load order ๐Ÿ˜›
15:46:05 <peter1138> Implement partial loading by automatically adjusting the timetable, you say?
15:47:10 <andythenorth> ๐Ÿ˜›
15:47:14 <andythenorth> why not?
15:47:16 <DorpsGek> [OpenTTD/OpenSFX] matthijskooijman opened pull request #52: Fix: Remove generated .sfo file on clean https://github.com/OpenTTD/OpenSFX/pull/52
15:47:21 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1178361361470869544/image.png?ex=6575dd89&is=65636889&hm=56d7aac0479b41dfa16d8b74cecd5172d4ed458605b20390a8aeef67645d3886&
15:47:21 <andythenorth> hmm more Variants?
15:47:40 <peter1138> Add multiple parents?
15:48:20 <andythenorth> how about groups with dividers?
15:54:32 <peter1138> Divider variants.
15:57:40 <talltyler> What lower limit? Less than a second?
15:58:04 <peter1138> I guess the lower limit is already the display refresh rate anyway, so not worth worring about.
15:59:45 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #11492: Change: When building NewGRFs, use grfid (from grfcodec) to calculate NewGRF MD5 hash. https://github.com/OpenTTD/OpenTTD/pull/11492
16:00:44 <peter1138> _zephyris, now you can rebase and rebuild, and the game should be happy with the updated NewGRF.
16:01:40 <peter1138> (And include the changes to the .hash files in your commit.)
16:01:53 <peter1138> Oh, I said that.
16:02:38 <_glx_> well include grf and hash ๐Ÿ˜‰
16:02:51 <peter1138> GRF is already there :)
16:03:56 <_glx_> the good old time we had to not forget to generate script API and project files and include them in the commit
16:04:42 <peter1138> :)
16:05:13 <_glx_> I think project files was the most often forgotten
16:18:58 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler updated pull request #11435: Feature: Mode to display timetable in seconds https://github.com/OpenTTD/OpenTTD/pull/11435
16:19:04 <talltyler> Hopefully that fixes annotations ๐Ÿ™‚
16:29:08 <DorpsGek> [OpenTTD/OpenTTD] JGRennison updated pull request #11495: Codechange: Simplify sprite cache memory management https://github.com/OpenTTD/OpenTTD/pull/11495
16:40:00 <peter1138> Uh, I wasn't saying it *should* be a vector...
16:44:50 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #11495: Codechange: Simplify sprite cache memory management https://github.com/OpenTTD/OpenTTD/pull/11495#pullrequestreview-1749374314
16:50:15 <DorpsGek> [OpenTTD/OpenTTD] JGRennison commented on pull request #11495: Codechange: Simplify sprite cache memory management https://github.com/OpenTTD/OpenTTD/pull/11495#pullrequestreview-1749375466
16:52:03 <truebrain> Should this be a `Change`, as there is some functional difference? Nitpicking++, but still ๐Ÿ™‚
16:54:16 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #11495: Codechange: Simplify sprite cache memory management https://github.com/OpenTTD/OpenTTD/pull/11495#pullrequestreview-1749375974
16:55:11 <peter1138> truebrain, now the 'bug' will be too much memory fragmentation ;)
16:55:48 <truebrain> They know where to send PRs ๐Ÿ˜›
16:56:05 <peter1138> Especially with Iron Horse.
16:57:03 <truebrain> I am still not sure if allowing allocating all physical memory to spritecache is a good idea. The old approach to avoid it, can be kinda useful for people with low memory and little understanding what spritecache is and does
16:58:08 <truebrain> To be clear, the old implementation was silly. This PR is fine. We can always add later that we restrict the spritecache size
16:58:28 <peter1138> Do you think std::vector is the way to go, or std::unique_ptr + size_t?
16:58:30 <truebrain> I guess we just wait for reports on it (or not)
16:58:42 <peter1138> My comments on that were just comments, not actually requesting a specific direction to go in.
16:59:24 <_jgr_> Items are evicted from the sprite cache when it exceeds the configured limit, that is what the LRU tracking is about
16:59:28 <truebrain> peter1138: Same for me. I was just wondering out loud. Maybe we should benchmark it, what the footprint difference is, to make a call
16:59:39 <_jgr_> It's not unlimited memory use
16:59:53 <peter1138> _jgr_, the point is the configured limit was checked before, now it's not?
17:00:09 <peter1138> (i.e. if you configured it too high you'd get that message.)
17:00:25 <truebrain> _jgr_: Not my point. The old code checked if the limit configured didn't exceed physical memory * 60%
17:00:45 <truebrain> As a smaller cache isn't an actual problem, I guess
17:00:57 <peter1138> But as it is not a continuous allocation it is for use harder to check that.
17:01:06 <peter1138> ... for sure.
17:01:16 <truebrain> We can just do a simple calculation
17:01:20 <truebrain> On startup
17:01:45 <truebrain> We already have code to get the physical memory
17:01:50 <peter1138> 16:19 < talltyler> Hopefully that fixes annotations ๐Ÿ™‚
17:01:52 <peter1138> nope :)
17:02:14 <talltyler> Sigh
17:02:33 <truebrain> @JGR basically the old code prevented people on 1GB ram to set the setting to use 2GB and crash the game
17:02:44 <truebrain> It automatically made it smaller
17:03:23 <_jgr_> On a 64 bit OS, you quite could possibly allocate a 2GB buffer, so long as you never tried to write or page in all of it
17:03:29 <truebrain> But as I said, not really for this PR, just something for us to track, in my opinion
17:03:33 <_jgr_> With 1GB of physical RAM
17:03:56 <truebrain> No, allocation fails if it doesn't fit in your physical memory
17:04:00 <truebrain> I tested that ๐Ÿ˜„
17:04:08 <_jgr_> On which OS?
17:04:13 <truebrain> Linux
17:05:16 <_jgr_> You need a bigger swap partition ๐Ÿ˜›
17:05:34 *** Wormnest has joined #openttd
17:05:38 <peter1138> swap = ram * 2?
17:05:47 <peter1138> I don't fancy having 128GB of swap myself.
17:06:07 <peter1138> It was okay with 128MB RAM.
17:06:19 <truebrain> _jgr_: Never said the current implementation makes sense ๐Ÿ˜› but there is some merit ๐Ÿ™‚
17:06:24 <LordAro> iirc there was an implicit min(.., 4G)
17:06:37 <LordAro> half the time you don't want swap at all nowadays
17:07:18 <_jgr_> Arguably it would be better to determine the limit automatically by sensible metric, instead of hoping the user will pick the right number (and not just go bigger number is better)
17:07:36 <peter1138> So.
17:07:59 <peter1138> LordAro, is it safe to order from Wiggle...?
17:08:02 <truebrain> But let's cross that bridge if a user reports an issue with it ๐Ÿ™‚
17:08:16 <peter1138> I'm not sure how they are still trading under administration.
17:08:58 <truebrain> _jgr_: I like that too; physical memory * 0.6 / 32bpp ๐Ÿ˜„
17:09:35 <peter1138> But also.
17:10:13 <peter1138> Pools. Pools could basically just be a std::vector of std::unique_ptr these days.
17:11:25 <DorpsGek> [OpenTTD/OpenTTD] JGRennison updated pull request #11495: Codechange: Simplify sprite cache memory management https://github.com/OpenTTD/OpenTTD/pull/11495
17:11:43 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler updated pull request #11435: Feature: Mode to display timetable in seconds https://github.com/OpenTTD/OpenTTD/pull/11435
17:12:23 <talltyler> One step closer to making ticks strongdef and making a huge PR to fix all this stuff throughout the code
17:16:25 <talltyler> (I'm happy to make that first commit a separate PR if needed)
17:16:42 <_glx_> there's probably some magic in <https://github.com/OpenTTD/grfcodec/blob/master/src/md5.cpp#L164> construct, but I don't know it (and clang is not super happy about it `warning: performing pointer subtraction with a null pointer may have undefined behavior [-Wnull-pointer-subtraction]`)
17:21:27 <LordAro> peter1138: seems fine
17:22:53 <peter1138> Interesting, building the baseset files can happen at the end of the build now. Oh well :)
17:27:14 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #11496: Change: Set height of larger heightmap/scenario worldgen buttons by text height. https://github.com/OpenTTD/OpenTTD/pull/11496
17:27:24 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler updated pull request #11435: Feature: Mode to display timetable in seconds https://github.com/OpenTTD/OpenTTD/pull/11435
17:30:20 <peter1138> (I've updated the text on that to include another rationale)
17:30:23 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler approved pull request #11496: Change: Set height of larger heightmap/scenario worldgen buttons by text height. https://github.com/OpenTTD/OpenTTD/pull/11496#pullrequestreview-1749380475
17:30:27 <peter1138> Oh, ok :)
17:31:03 <talltyler> Oh, I saw the second rationale as I was coming to the same conclusion
17:31:06 <talltyler> Not missed ๐Ÿ™‚
17:33:24 <peter1138> One of my branches basically removes almost every SetMinimalSize().
17:33:40 <talltyler> Good
17:33:51 <talltyler> Looking forward to reviewing it ๐Ÿ™‚
17:33:59 <peter1138> Most of them are almost certainly just "copied & pasted" from when the original window layouts were fixed pixel layouts.
17:34:35 <LordAro> "almost"
17:34:42 <LordAro> why not all? :p
17:35:27 <peter1138> There are a few windows which are a bit odd w
17:35:32 <peter1138> ith no minimum size.
17:37:03 <peter1138> There are places where we've added widgets with different minimal sizes, but they're inside an NC_EQUALSIZE container.
17:37:18 <peter1138> So yeha.
17:37:22 <jfs> how dynamic can the window layouting be made, I wonder... the one thing that has always been troublesome for me is prose-like text that generally needs to be automatically broken to not produce ultra wide windows with single long lines. but where to break? something like "this window should not be wider than 1/3 the screen width, unless that means it would be taller than the screen", which might
17:37:22 <jfs> require several re-layouts to work out
17:37:50 <peter1138> jfs, this is now handled in a couple of places.
17:37:55 <peter1138> And yes, it requires 2 passes.
17:37:59 <LordAro> css layout engine when?
17:38:13 <peter1138> The main intro menu and the game options menu do it.
17:38:28 <peter1138> They rely on the rest of the window layout to produce a suitable starting point.
17:38:47 <jfs> ah, yeah
17:38:54 <peter1138> Once that is done, during OnResize() it knows the width it has to work with, so can calculate a height
17:40:01 <peter1138> That was the easiest solution without trying to bolt on a multi-pass system, I found.
17:40:34 <peter1138> So if your baseset is missing sprites, or your language is missing translations, that's using the OnResize() method.
17:42:45 <peter1138> Of course if the prose-like text is the main content of the window then there still won't really be a suitable width to start with.
17:43:33 <peter1138> One thing that might help is being able to specify a minimal width in relation to text rather than pixels.
17:44:09 <jfs> although there aren't all that many windows of that kind
17:44:28 <peter1138> The error window is the main one I can think of.
17:44:29 <jfs> the error messages and "quit? y/n" are the main ones I can think of, and then storybook
17:45:11 <jfs> I think for those in specific, going by some fraction of the total screen width might be reasonable
17:45:41 <jfs> ah yeah, there was the "server admins may be able to read this password" text
17:45:42 <peter1138> Story book's minimum is constrained but the 3 controls at the bottom.
17:45:53 <jfs> which I remember fighting a lot to make behave nicely
17:46:30 <peter1138> Anyway, removing SetMinimalSize() was the thing that revealed GetStringHeight(0) was totally broken :)
17:46:53 <peter1138> It trigged an OOM kill for me.
17:55:32 <jfs> ah, trying to make an infinite number of zero-width lines?
17:55:54 <peter1138> I think so.
17:56:55 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #11496: Change: Set height of larger heightmap/scenario worldgen buttons by text height. https://github.com/OpenTTD/OpenTTD/pull/11496
17:58:00 <peter1138> Hmm, Garmin Edge 1040... not bad.
18:16:42 <DorpsGek> [OpenTTD/OpenTTD] zephyris updated pull request #11491: Fix: Add shading to river slopes https://github.com/OpenTTD/OpenTTD/pull/11491
18:17:03 <peter1138> Oof, rebase, don't merge :)
18:22:26 <talltyler> Okay, now it passes all the checks...and even works! ๐Ÿ˜„
18:28:12 <rau117> >>Requires a bump of original graphics grfs to use container version 2
18:28:12 <rau117> And will this... be built into the new version of the game, or will we have to do โ€œsomethingโ€ with the the original_windows baseset?
18:30:36 <peter1138> It's not quite right, it's the container format of the GRF files that come with OpenTTD, not the original basesets.
18:37:25 <rau117> Okay, that's ยฑwhat I thought.
18:41:21 <_glx_> peter1138: and I think it's missing the new hash
18:41:45 <_zephyris> peter1138: YEah, I'm dumb
18:42:16 <_zephyris> Now I'm trying to work out how to revert a merge
18:42:47 <peter1138> interactive rebase, drop the merge commit?
18:43:17 <_glx_> or git reset HEAD~1
18:43:24 <peter1138> Or that.
18:43:52 <_zephyris> Probably shouldn't be trying to do this while holding baby... I'll do bedtime first!
18:43:53 <peter1138> Or create a branch off the original commit, delete the branch with the merge and rename the new branch to the old name.
18:46:31 <peter1138> Oops
18:47:19 <_glx_> oh and after the rebase, you'll need to rebuild to get the missing files
18:53:15 <_zephyris> Currently building
18:53:34 <_zephyris> Let's see if I do anything else dumb!
18:55:56 <peter1138> It's not dumb, it's doesn't need to do this regularly.
18:56:09 <peter1138> (Many projects are happy with merge commits)
18:56:18 <peter1138> Although actually, yeah, not rebuilding was a bit dumb ;)
19:00:40 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #11497: Codechange: cargo_filter_criteria is now a CargoID instead of a index. https://github.com/OpenTTD/OpenTTD/pull/11497
19:04:55 <LordAro> peter1138: no changes in usage?
19:05:21 <peter1138> No, the usage change was already made a few PRs ago.
19:05:30 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #11498: Codechange: Use std::array for industry tile cargo acceptance. https://github.com/OpenTTD/OpenTTD/pull/11498
19:05:39 <peter1138> I... was lazy and didn't bother looking up the commit/PR, sorry!
19:06:07 <peter1138> #11458
19:06:21 <LordAro> ah
19:06:39 <LordAro> more of a fix then? :)
19:06:47 <peter1138> Maybe. It's not broken per se.
19:08:10 <peter1138> Okay, updated the PR title, can change the message on squash.
19:08:56 <peter1138> I picked this up because I rebased my make-CargoID-a-strongtype branch, and this is exactly the sort of thing why it's a strong type :)
19:09:50 <LordAro> :)
19:10:06 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1178412382733738095/image.png?ex=65760d0d&is=6563980d&hm=32c844c475948255774e4c10b98d65a29f336b3d363399c90e87461e790dac8c&
19:10:06 <andythenorth> cdist saturation calculation makes no sense ๐Ÿ˜„
19:10:30 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1178412485053784226/image.png?ex=65760d26&is=65639826&hm=f32ace8ad350fcc03e40afbdc2781ff1e7cf6b82777dcb03774490609ce84604&
19:10:30 <andythenorth> example train on an 'overloaded' route
19:25:58 <peter1138> Hmm, Windows eh.
19:27:07 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler approved pull request #11497: Fix 7cfcf65: cargo_filter_criteria is now a CargoID instead of a index. https://github.com/OpenTTD/OpenTTD/pull/11497#pullrequestreview-1749404251
19:29:10 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #11498: Codechange: Use std::array for industry tile cargo acceptance. https://github.com/OpenTTD/OpenTTD/pull/11498
19:30:25 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #11497: Fix 7cfcf65: cargo_filter_criteria is now a CargoID instead of a index. https://github.com/OpenTTD/OpenTTD/pull/11497
19:32:35 <DorpsGek> [OpenTTD/OpenTTD] zephyris updated pull request #11491: Fix: Add shading to river slopes https://github.com/OpenTTD/OpenTTD/pull/11491
19:32:53 <_zephyris> [please excuse my flailing while I try to work out what I'm doing]
19:35:51 <talltyler> Excused ๐Ÿ™‚
19:42:17 <_zephyris> https://xkcd.com/1597/
19:43:20 <LordAro> one of my favourites
19:43:22 <Rubidium> _glx_: that nullptr subtraction... what good fun... might even be that OpenTTD has UB in the similar code as it does not explicitly check the alignment of the data, and unaligned pointers are UB.
19:47:28 <peter1138> _zephyris, after building you need to add the two .grf.hash files to your commit.
19:48:14 <peter1138> If those are not updated then maybe grfid isn't working for you, but it should show an error at least if not.
19:51:34 *** gelignite has joined #openttd
19:53:04 <_zephyris> My issues are 100% git :)#
20:07:49 <peter1138> Is it okay to ignore invalid cargo in game?
20:08:42 <peter1138> Context is using range-iterator on _sorted_cargo_specs instead of looping from 0 to NUM_CARGO.
20:10:44 <peter1138> It can only be invalid in game if the player has changed NewGRFs that affect cargo types.
20:10:57 <peter1138> So it's probably undefined behaviour either way.
20:13:29 <peter1138> Hmm, I'm going with yes, considering I already made changes that do so :D
20:34:12 <_glx_> Rubidium: and grfcodec/nforenum coding style is so inconsistent
20:36:34 <Rubidium> it has a coding style? :D
20:36:39 <_glx_> only 3 warnings (x2 because clang is used by 2 targets) left in grfcodec, but they are a pain
20:37:29 <_glx_> the weird va_list stuff and the nullptr substraction
20:38:22 <_glx_> <https://github.com/OpenTTD/grfcodec/pull/27/commits/f63b40d45e0dbd9168329222f1832c8449bba96e> <-- fixing a macos warning can be horrible
20:38:41 <peter1138> Can I do it?
20:38:46 <peter1138> Reformat :D
20:39:15 <_glx_> no objections from me
20:40:08 <peter1138> After #27 tho'
20:41:19 <_glx_> `__builtin_available()` is a nice invention, but it's annoying to use as you can't mix it with other conditions
20:41:57 <Rubidium> _glx_: smells like the va_list stuff doesn't like things like enums
20:42:27 <_glx_> yeah and the enum construction is another "funny" thing to follow
20:42:36 <_glx_> all done with macros
20:43:04 <_glx_> so good luck to use "find declaration" feature of the IDE
20:45:29 <_glx_> I think parts of the va_list stuff could be replaced with parameter pack
20:46:14 *** gelignite has quit IRC (Quit: Stay safe!)
20:47:03 <Rubidium> yeah, though that'l leave vIssueMessage
20:48:02 <Rubidium> although, if you change it to vIssueMessage(RenumMessageId message, int alen, int elen, ...) and use va_start on elen... it'll be fine (I think)
20:49:22 <_glx_> same for myvsprintf
20:49:29 *** frosch123 has quit IRC (Quit: User went offline on Discord a while ago)
20:50:21 <Rubidium> might CheckLength be wrong? It doesn't do va_end when alen<elen (i.e. when it returns true)
20:50:27 <peter1138> Almost better to rewrite :o
20:51:08 <Rubidium> lets call rewriting "using nmlc" :D
20:51:21 <peter1138> That also needs a rewrite...
20:51:44 <peter1138> nmlc++ :D
20:52:48 <_glx_> maybe something like the example in https://en.cppreference.com/w/cpp/language/parameter_pack
20:54:37 <_glx_> indeed CheckLength feels wrong
20:55:38 <_glx_> and all this stuff seems to be related to translatable error messages
20:58:36 <DorpsGek> [OpenTTD/OpenTTD] zephyris updated pull request #11491: Fix: Add shading to river slopes https://github.com/OpenTTD/OpenTTD/pull/11491
20:59:49 <_zephyris> What a faff!
20:59:58 <_zephyris> One day I may understand git
21:02:04 <andythenorth> peter1138[d]: was it random reverse? o_O
21:02:10 <andythenorth> or was it Archviles?
21:07:22 <peter1138> Currently, Marmite sausages.
21:18:35 <Eddi|zuHause> maybe git is like quantum mechanics. if someone says they understand it, they don't understand it.
21:25:26 *** nielsm has quit IRC (Ping timeout: 480 seconds)
21:32:18 <peter1138> `uint amount = ...; if (amount > 0) cargo_capacities[v->cargo_type] += amount;`
21:32:21 <peter1138> Good if-condition there ;)
21:32:55 <peter1138> I guess it saves on access to the array.
21:37:06 <DorpsGek> [OpenTTD/grfcodec] PeterN commented on pull request #27: Cleanup: Fix some warnings https://github.com/OpenTTD/grfcodec/pull/27#pullrequestreview-1749420096
21:39:17 <DorpsGek> [OpenTTD/grfcodec] glx22 commented on pull request #27: Cleanup: Fix some warnings https://github.com/OpenTTD/grfcodec/pull/27#pullrequestreview-1749420430
21:49:50 <DorpsGek> [OpenTTD/grfcodec] PeterN commented on pull request #27: Cleanup: Fix some warnings https://github.com/OpenTTD/grfcodec/pull/27#pullrequestreview-1749421920
21:50:26 <_glx_> yeah casting the substraction should be cleaner
21:52:23 <peter1138> "sort of casting" :)
21:54:06 <DorpsGek> [OpenTTD/grfcodec] glx22 updated pull request #27: Cleanup: Fix some warnings https://github.com/OpenTTD/grfcodec/pull/27
22:00:27 <andythenorth> ctrl-click to close *all* variant trees in buy menu?
22:23:31 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1178461057535201310/image.png?ex=65763a62&is=6563c562&hm=e092565fdeadbc26165861b22bb3b232e13469dcceec8a3202a405f32840afae&
22:23:32 <peter1138> NSad
22:31:40 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #11499: Codechange: Use a few less NUM_CARGO loops. https://github.com/OpenTTD/OpenTTD/pull/11499
22:34:15 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #11491: Fix: Add shading to river slopes https://github.com/OpenTTD/OpenTTD/pull/11491#issuecomment-1826917056
22:37:25 <peter1138> I'm not sure how this works :/
22:38:05 <peter1138> Okay, so the pngs are copied to build at some point.
22:39:58 <_zephyris> Yeah, `CreateGrfCommand.cmake` does that, should be recursive for all `*.png`
22:40:32 <peter1138> Yes, it needs the project to be reconfigured.
22:40:38 <peter1138> That is a bug in the build system, I'm sure.
22:41:45 <andythenorth> such docks ๐Ÿ™‚
22:41:47 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1178465655519985685/image.png?ex=65763eab&is=6563c9ab&hm=9e45aca053b61853b2dce5ea1173fb0fafd6db6594b54e37f5dbb96ca2b91af1&
22:42:05 <DorpsGek> [OpenTTD/OpenTTD] JGRennison opened issue #11500: [Bug]: LinkType one definition rule violation https://github.com/OpenTTD/OpenTTD/issues/11500
22:43:52 <_pruple> andythenorth: dutch socks?
22:44:13 <andythenorth> yes
22:47:10 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #11491: Fix: Add shading to river slopes https://github.com/OpenTTD/OpenTTD/pull/11491#issuecomment-1826926746
22:48:25 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
22:48:32 <peter1138> Shall we argue on the exact shade to use? ;)
22:48:42 <andythenorth> 'no'
22:50:27 <_zephyris> There was logic to the shade selection... It's the same shading I use to closely mimic the original graphics temperate terrain slopes.
22:50:36 <DorpsGek> [OpenTTD/OpenTTD] PeterN approved pull request #11491: Fix: Add shading to river slopes https://github.com/OpenTTD/OpenTTD/pull/11491#pullrequestreview-1749440092
22:51:14 <Rubidium> peter1138: yes, I'd suggest U+1F60E
22:51:49 <peter1138> ๐Ÿ˜Ž
22:54:04 <talltyler> Peter: Any interest in re-reviewing #11435 now that I've fixed it? ๐Ÿ™‚
22:54:14 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 merged pull request #11491: Fix: Add shading to river slopes https://github.com/OpenTTD/OpenTTD/pull/11491
22:54:17 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 closed issue #9031: Rivers going uphill are nearly impossible to distinguish from flat river https://github.com/OpenTTD/OpenTTD/issues/9031
22:54:23 <talltyler> \o/
22:55:55 <peter1138> There was the question of why switching to v2 makes the NewGRFs about 10% bigger, but... who cares ;)
22:56:25 <peter1138> Lots of small sprites I suppose.
23:01:37 *** Flygon has joined #openttd
23:06:26 <peter1138> Hmm, carbon saddle rails sounds breakable... little bits of plastic :o
23:10:15 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #11435: Feature: Mode to display timetable in seconds https://github.com/OpenTTD/OpenTTD/pull/11435#pullrequestreview-1749444912
23:27:46 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler updated pull request #11435: Feature: Mode to display timetable in seconds https://github.com/OpenTTD/OpenTTD/pull/11435
23:30:45 <peter1138> Well, ish.
23:31:01 <peter1138> Is it possible for current_order_time to be >= 2^31 ?
23:31:23 <peter1138> i.e. it will switch from a very large value to a negative value.
23:32:28 <peter1138> And if not, I wonder if it's okay to just change it from SLE_UINT32 to SLE_INT32, without a bump. Not sure on that one.
23:35:29 <peter1138> mmamammmmammamamaaamammma, just killed a light
23:40:35 <Rubidium> current_order_time is in ticks, right? So, that'd be about 79.5 thousand game years
23:40:53 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
23:41:22 <_pruple> it's a very slow boat
23:41:40 <peter1138> There's a server that says it's been going for 82,422 years. That might be a lie.
23:41:51 <peter1138> -1950
23:42:01 <peter1138> 1.3.3
23:42:03 <peter1138> :o
23:42:21 <Rubidium> to be "correct" it should probably be the SLE_FILE_U32 | SL_VAR_I32
23:42:59 <_pruple> 1.3.3 will be 10 years old in 2 days!
23:43:17 <_pruple> ๐ŸŽ‚
23:45:00 <peter1138> Rubidium, which is what talltyler has done, but as a full-on savegame bump. But if we're doing a full bump for that should we also check the value is in range... Hmm.
23:45:43 <peter1138> I'm sure I'm definitely over thinking/over questioning this :p
23:47:30 <Rubidium> yes, kind of maybe... currently it doesn't prevent overflows
23:50:20 <Rubidium> and in the new one it doesn't check for overflows either, so it's equally "broken" in both cases
23:52:14 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #11501: Change: Use sparse padding for content download window. https://github.com/OpenTTD/OpenTTD/pull/11501
23:58:26 <talltyler> Donโ€™t you have to do a savegame bump for that? I donโ€™t know another way.
23:58:35 <talltyler> I am thoroughly unworried about it overflowing though
23:58:50 <talltyler> Which is why I originally did no saveload conversion