IRC logs for #openttd on OFTC at 2024-11-02
            
00:01:41 *** Tirili has quit IRC (Remote host closed the connection)
00:50:48 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
01:38:35 *** Wormnest has quit IRC (Quit: Leaving)
03:33:45 *** D-HUND has joined #openttd
03:37:18 *** debdog has quit IRC (Ping timeout: 480 seconds)
04:47:25 <DorpsGek> [OpenTTD/OpenTTD] eints-sync[bot] pushed 1 commits to master https://github.com/OpenTTD/OpenTTD/commit/9193d69e0b8cfc2e55defb9b65bb473469389a30
04:47:26 <DorpsGek> - Update: Translations from eints (by translators)
05:12:55 *** keikoz has joined #openttd
06:00:52 *** keikoz has quit IRC ()
06:03:00 *** keikoz has joined #openttd
06:17:16 *** Flygon has joined #openttd
08:28:40 *** nielsm has joined #openttd
08:49:26 *** Wolf01 has joined #openttd
09:04:26 *** mindlesstux has quit IRC (Quit: The Lounge - https://thelounge.chat)
09:05:28 *** mindlesstux has joined #openttd
10:17:48 <xarick> hello
10:17:57 <xarick> how do I use unordered_map
10:32:00 <xarick> I fail <https://gist.github.com/SamuXarick/ccb0d2ab042d7ad3adeb44a806720be9>
10:32:04 <xarick> what is wrong
10:37:08 <xarick> ```std::unordered_map<TileIndex, WaterClass> wc;
10:37:08 <xarick> for (TileIndex t : ta) {
10:37:08 <xarick> wc[t] = HasTileWaterClass(t) ? GetWaterClass(t) : WATER_CLASS_INVALID;
10:37:08 <xarick> }```
10:42:14 <peter1138> You can't using a StrongType as the key of an unordered_map.
10:45:43 <xarick> oh... is that it?
10:50:10 <xarick> not sure how to fix it
10:54:12 <peter1138> Either implement std::hash for a strong type (not impossible, but probably not your strong point (...))
10:54:36 <peter1138> Or use `TileIndex::BaseType` and `wc[t.base()] = ...`
10:56:12 <xarick> uhh kinda ugly
10:56:37 <xarick> wondering if i could get away without TileIndex
10:56:53 <xarick> just a list of WaterClasses
10:56:55 <kuhnovic> We do that in several places. It's a bit ugly but not terrible.
10:57:23 <xarick> hi
11:06:02 <xarick> graphical glitches
11:06:07 <xarick> objects are not prepared
11:12:33 <xarick> oh snap, I've entered the newgrf territory
11:12:43 <xarick> this code is unreadable
11:13:30 <xarick> only scope resolves and variables and hex numbers
11:25:25 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1302232094101082172/image.png?ex=67275da5&is=67260c25&hm=aaf97d7d3133c3ac6878ac89af3446693dad002556803a801e80dde5a201a106&
11:25:25 <xarick> So now that objects can get the correct waterclass, and they're told to draw water, they draw this.
11:25:25 <xarick> <https://github.com/OpenTTD/OpenTTD/blob/master/src/newgrf_object.cpp#L449>
11:25:38 <xarick> pfff
11:26:02 <xarick> glitched
11:34:24 <xarick> let's try HasTileWaterGround
11:35:25 <xarick> nop :/
11:38:57 <xarick> tile is already Object
11:39:03 <xarick> pff 😦
11:43:03 <xarick> IsTileFlat
11:43:13 <kuhnovic> IsDockFlat
11:43:47 <xarick> nop
11:44:31 <johnfranklin> IsWorldFlat
11:46:43 <xarick> IsTileFlat "fixes" it
11:47:06 <xarick> but it's probably the wrong check
11:47:24 <xarick> yep
11:49:45 <xarick> still incomplete
11:50:01 <xarick> river slopes also water but not flat
11:59:23 <_glx_> Objects already have a water class on each tile
12:00:32 <_glx_> And when built they keep the class of the underlying tile
12:01:15 <xarick> objects handle water class in a very weird way, it's very compromised from CmdBuildObject
12:02:39 <xarick> when they run a clear landscape command, the water that was there becomes clear land, and thus invalid water class. Once it BuildObject, it gets the waterclass of a now clear land
12:03:19 <_glx_> It's because clear land skips them
12:03:34 <_glx_> Not related to build or remove object
12:04:37 <_glx_> Only one tile of the object is fully clear
12:06:00 <xarick> for me it's a buggy behaviour, but also feels like a compromise because the drawing code is also built upon the buggy behavioir
12:06:25 <xarick> let me show you where it is
12:08:25 <xarick> This is it, this clears the waterclass, water_cmd.cpp turns the tile into bare land <https://github.com/OpenTTD/OpenTTD/blob/master/src/object_cmd.cpp#L246>
12:10:11 <xarick> happens on Coasts
12:19:16 <peter1138> An object on a slope doesn't have a water class, like a house on a slope doesn't have a water class.
12:19:28 <peter1138> The coast is no longer a coast, it's an object tile.
12:21:08 <xarick> oh line 273 in the original code
12:22:08 <xarick> 2643
12:23:59 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #13050: Codechange: Use span instead of marker terminated array for indexed sprite loading. https://github.com/OpenTTD/OpenTTD/pull/13050
12:24:03 <xarick> or 299 where it actually executes
12:24:42 <peter1138> Can we close this PR before it's even a PR? :p
12:24:53 <peter1138> Because you are just making up problems that don't exist.
12:26:57 <xarick> :^_^
12:28:07 <xarick> what was my goal? I remember I wanted to do something that lead me there
12:33:33 <xarick> goal was to make GetFloodingBehaviour exclusively used in water_cmd.cpp to see if it would speed up anything. That lead me to remove it from rail_cmd.cpp, but that means replacing it with a one fit all approach wouldn't work because object tiles were not maintaining original waterclass
12:33:38 <xarick> yeah, something like that, afk lunch
12:57:23 <DorpsGek> [OpenTTD/OpenTTD] glx22 approved pull request #13050: Codechange: Use span instead of marker terminated array for indexed sprite loading. https://github.com/OpenTTD/OpenTTD/pull/13050#pullrequestreview-2411247879
13:17:12 *** asasnat has joined #openttd
13:17:12 <asasnat> https://cdn.discordapp.com/attachments/1008473233844097104/1302260220302463076/image.png?ex=672777d7&is=67262657&hm=271a768eb2ce05353b4b191c2b0ca1ebd523f2277000d3aff22c76a89779dab4&
13:17:12 <asasnat> I hope this is the correct channel for this, very hacky proof of concept for fractional currency exchange rates (don't mind the glitched custom currency window)
13:18:03 <asasnat> I probably won't be contributing this to the main OpenTTD since I cba to make sure it's up to snuff with the coding style guidelines, make sure existing NewGRFs aren't broken by this etc
13:24:07 *** reldred has joined #openttd
13:24:07 <reldred> skibidi
13:52:11 <xarick> how to Dry Up objects :p
13:53:55 <xarick> case MP_OBJECT:
13:53:55 <xarick> break;
13:53:57 <xarick> kek
14:07:12 *** gelignite has joined #openttd
14:16:29 <peter1138> IIRC, drying up is only for replacing shore tiles with regular dirt tiles. Nothing else.
14:19:10 <xarick> ah, so it needs to do something
14:20:32 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1302276163342831667/image.png?ex=672786b0&is=67263530&hm=f983c526b97cc5547adccd9d45f6ec8e24120ed2868a3ac75b1e002dfb81d4c6&
14:20:32 <xarick> I see...
14:21:46 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1302276471645012068/image.png?ex=672786f9&is=67263579&hm=995d561d624610ebb21a0c8ba4e28440d5c3b69312919c58e6a957ae50959743&
14:21:58 <xarick> dang, feels like I'm reinventing the wheel
14:29:15 <johnfranklin> Transfer between Newark Castle and Newark Northgate is fun.
14:30:10 <johnfranklin> I used 18 minutes, including time for photography.
14:47:53 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #13050: Codechange: Use span instead of marker terminated array for indexed sprite loading. https://github.com/OpenTTD/OpenTTD/pull/13050
14:49:15 <andythenorth> johnfranklin: That’s about the most English thing you could ever do
14:54:51 *** XYZ has joined #openttd
14:57:27 <xarick> new problem... autoslope 🙂
15:06:44 <DorpsGek> [OpenTTD/OpenTTD] ketsuban commented on pull request #13036: Add: Improving town-owned bridges increases company rating https://github.com/OpenTTD/OpenTTD/pull/13036#issuecomment-2453018014
15:17:09 <xarick> oh wow, there's already glitches in current master
15:17:44 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1302290555941683221/image.png?ex=67279417&is=67264297&hm=1b91b7fb63e1fc5f9b3066eb6a1eb60fb64444fe1560d28bef611ef5178edde7&
15:18:01 <xarick> 14.1
15:18:32 <_glx_> blame the object
15:19:25 *** virtualrandomnumber has joined #openttd
15:19:53 <_glx_> it allows this layout on this steep slope
15:20:31 *** virtualrandomnumber has quit IRC ()
15:20:55 <_glx_> and even provides the sprite for it
15:22:11 <peter1138> Yes, there's a lot of badly coded object GRFs.
15:24:09 <xarick> OpenGFX Landscape++ ?
15:25:06 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1302292411837317190/image.png?ex=672795d2&is=67264452&hm=f55934f4ffff9e73bbeedc49cded028a476a5368e893658b031597d3550786b7&
15:28:35 *** Wormnest has joined #openttd
15:38:05 <xarick> i thought it was perfect for testing
15:53:36 *** kunet_android has quit IRC (Quit: User went offline on Discord a while ago)
15:58:44 <xarick> i found a bug
15:58:54 <xarick> placing objects and terraforming
15:59:06 <xarick> hmm how to explain
16:00:40 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1302301360330379417/2024-11-02_15-59-55.mp4?ex=67279e27&is=67264ca7&hm=c5ccd388692552e1a39d1606978c12cbef1744facad9aee711384a78a2a4eacc&
16:00:40 <xarick> video is better
16:01:41 <xarick> is it NewGRF fault or openttd that it doesn't clear it?
16:03:24 <ahyangyi> I don't get it, what is the problem? The behavior looks consistent to me.
16:03:47 <xarick> it's not a foundation
16:04:14 <xarick> the object has no foundation, so logic dictates it should clear the tile
16:05:31 <peter1138> Objects are special. They are basically useless eye-candy.
16:08:26 <ahyangyi> I think I understand Xarick's concern now, though I don't have much of an opinion -- I can see the benefit either way, and sometimes depending on the nature of object.
16:08:26 <ahyangyi> For example, terraforming should definitely *not* clear those "floating cloud" objects...
16:09:58 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1302303703029649418/image.png?ex=6727a056&is=67264ed6&hm=f8d9de18755538c98352f57ebd2b1fb51fe9cee5930f0ce75817014b78f66c67&
16:10:24 <xarick> oh
16:10:43 <_glx_> everything is fine in the video, works as expected
16:12:59 <ahyangyi> peter1138: Except those indestructible objects, they aren't useless 😄
16:13:27 <peter1138> The original immovable objects, purchased tiles and the HQ...
16:13:33 <_glx_> imagine if big cats were immovable
16:13:46 <peter1138> Just place a box near them.
16:16:19 <xarick> the code is adding the price of foundations when the object itself has the flag HAS_NO_FOUNDATION <https://github.com/OpenTTD/OpenTTD/blob/master/src/object_cmd.cpp#L931-L938>
16:16:30 <xarick> i think it's openttd's bug
16:16:42 <xarick> but...
16:18:51 *** SigHunter_ has quit IRC ()
16:19:33 <xarick> `spec->flags = OBJECT_FLAG_AUTOREMOVE | OBJECT_FLAG_BUILT_ON_WATER | OBJECT_FLAG_HAS_NO_FOUNDATION | OBJECT_FLAG_DRAW_WATER | OBJECT_FLAG_ALLOW_UNDER_BRIDGE | OBJECT_FLAG_SCALE_BY_WATER (11308)`
16:24:24 *** SigHunter has joined #openttd
16:33:26 <andythenorth> Hmm
16:45:21 *** debdog has joined #openttd
16:47:36 <xarick> okay nevermind
16:47:45 <xarick> I guess it's wanted behaviour
16:55:24 <xarick> there is a bug in the landscape_grid
16:55:47 <xarick> may be peter's fault, let me check
16:56:45 <xarick> nop, master also wrong
16:57:37 <asasnat> https://cdn.discordapp.com/attachments/1008473233844097104/1302315691260510260/image.png?ex=6727ab80&is=67265a00&hm=0df603abfe8bdaddfa2baf84a9951982cfd8149eb9f644d309f2b66a2ba2044b&
16:57:37 <asasnat> asasnat: fixed custom currency window\
16:58:02 <asasnat> I'll need to do more testing before I even entertain the possibility of contributing this to the main repo though
16:58:29 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1302315912497725460/image.png?ex=6727abb5&is=67265a35&hm=f7b61a2b448744d3b16781dffb44bc9ec4ccb0e65735526264c993a40cbdf77e&
16:58:48 <xarick> objects should be moved 2 times to the right
16:59:39 <LordAro> asasnat: nice
16:59:52 <asasnat> asasnat: one concern I have is that fractional currency conversions could possibly lead to situations where financial operations cause money to magically vanish or appear
17:00:05 <peter1138> Probably by fault, those rowspans are a c...
17:00:58 <peter1138> https://cdn.discordapp.com/attachments/1008473233844097104/1302316535150415962/image.png?ex=6727ac49&is=67265ac9&hm=9843aeb465485c7503ce4b681f5772d68e220e39109fc6b89cf4eced95efcde5&
17:00:58 <peter1138> Graph tweaks?
17:01:15 <peter1138> (Needs an extra key)
17:03:44 <LordAro> depends what it indicates :p
17:03:55 <LordAro> not immediately clear from the graph
17:04:11 <LordAro> %age transported?
17:04:39 <asasnat> asasnat: on the bright side at least, it appears that older save games still have correct money values with my proposed new currency system
17:05:24 <asasnat> it appears that the developers did a good job of not making financial operations currency-dependent, if that makes sense
17:05:27 <asasnat> I have to applaud them for that
17:06:11 <LordAro> transactions based on the currency currently in use would be hilarious
17:07:43 <asasnat> it would indeed be a very stupid mistake to make, but I myself am prone to making very stupid mistakes
17:14:06 <peter1138> LordAro: Just transported, not %age.
17:14:17 <peter1138> Transported and produced.
17:15:24 <LordAro> oh i see
17:15:28 <peter1138> Currency is almost purely visual. You could use fixed-point maths if you wanted to support fractions.
17:15:48 <peter1138> (Floats would work but are likely to lead to Excel-style rounding errors...)
17:16:15 <LordAro> +£3.00000000003
17:16:57 <peter1138> Fixed-point just means treating "1000" as 1 and always dividing by 1000. Or similar.
17:17:35 <peter1138> On the other hand, I think we moved to floats for units conversion.
17:17:47 <peter1138> (Double precision)
17:17:52 <peter1138> Yeah.
17:17:58 <asasnat> I know what fixed point maths are but I've only ever seen them used in Amiga-era 3D games
17:18:48 <peter1138> It's all visual except for a few places when the game conversions from visual to native currency, which is pretty rare.
17:18:49 <LordAro> only ever *noticed* them ;)
17:19:16 <peter1138> NewGRF has fixed-point decimals.
17:19:41 <peter1138> Well, decimals isn't quite right, the one I'm thinking of uses 256 = 1.
17:20:07 <_glx_> 256 based percentages 🙂
17:24:49 <asasnat> the two main modifications I did to make this possible was:
17:24:49 <asasnat> - change line 512 in `strings.cpp` from `number *= spec->rate;` to `number = Money((float)(number * spec->rate / 10));`
17:24:49 <asasnat> - in the `origin_currency_specs` array in `currency.cpp`, multiply all exchange rates by 10 so built-in currencies remain the same
17:25:11 <asasnat> I am personally not a fan of how I did the first change and am willing to accept suggestions on how to make it better
17:25:58 <peter1138> So you made it fixed point math without realising it 😉
17:26:30 <asasnat> I felt like the `(float)` in there would surely invalidate any argument that it's fixed-point math
17:26:40 <peter1138> And yeah, casting money to float and back is going to cause issues when the values get big.
17:27:13 <peter1138> You've done the math before converting it to float.
17:27:24 <peter1138> So it's fixed-point math and a pointless conversion to float and back.
17:28:07 <asasnat> without that (apparently pointless) conversion it wasn't working quite right for me
17:28:32 <asasnat> but, alas, the only thing I know is that I know nothing, so I have to assume you are right
17:29:03 <asasnat> you were right
17:29:06 <xarick> `(float)(number) * spec->rate / 10`
17:29:12 <xarick> i think
17:29:40 <asasnat> I ended up doing `number = number * spec->rate / 10;`
17:29:42 <asasnat> works fine
17:30:19 <asasnat> although it might still be doing a hidden conversion to floating point somewhere
17:30:19 <xarick> or maybe im dumb too
17:30:28 <asasnat> I have no idea at this point
17:30:43 <peter1138> https://cdn.discordapp.com/attachments/1008473233844097104/1302324022083850352/image.png?ex=6727b342&is=672661c2&hm=bbda3bf6b130df1b003adfa349311a8cc1b956b7b6c4dbf9e689ca06e6a9c7e1&
17:30:43 <peter1138> Very FIRS 5.
17:30:52 <peter1138> There's never any implicit conversion to float.
17:31:10 <asasnat> my knowledge on all this floating point bullsh... is very spotty
17:31:10 <peter1138> Well, unless you changed spec->rate to be a float I guess.
17:31:22 <asasnat> spec rate is still an int
17:31:33 <asasnat> just the way it is used has changed
17:32:42 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1302324521314947093/image.png?ex=6727b3b9&is=67266239&hm=572fc360864bf6838d91614ee9551b88011f19611596b9bc9d432566e106296a&
17:32:42 <xarick> so i terraformed a halftile with water
17:33:14 <asasnat> my mind keeps telling me that what I'm trying to do is very stupid and a pointless endeavour
17:33:52 <peter1138> It has issues with larger values.
17:33:53 <asasnat> in return, I keep telling myself that what I'm trying to do is nowhere near as stupid as the magic airboats feature that someone wanted to contribute a while back
17:34:24 <peter1138> Values which, normally we wouldn't care about, but then it's those values that are the entire reason Money has its own data type.
17:35:06 <xarick> my object kept the initial waterclass sea, but since terraforming did not clear it, it just leveled it
17:35:16 <xarick> maintaining the class
17:35:40 <peter1138> Someone™ will complain when their save with £9,223,372,036,854,775,807 shows it incorrectly...
17:39:58 <asasnat> should've looked into how OpenRCT2 (which was the sole inspiration behind this endeavour) does it first...
17:46:54 <xarick> do you know any newgrf object that only allows to be built on water
17:55:13 <Guest7968> xarick: several things in http://www.tt-forums.net/viewtopic.php?f=26&t=56780&p=1063573#p1063573
17:56:00 <Guest7968> ISR/DWE objects has piers and things
17:56:13 <Guest7968> probably some beach set stuff?
17:56:40 <Guest7968> MariCo
17:57:37 <xarick> thx
18:02:29 <asasnat> peter1138: do you happen to have a save file with that much money?
18:02:35 <asasnat> I'm eager for some bug swatting
18:08:25 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1302333512434847846/image.png?ex=6727bc19&is=67266a99&hm=22d6513870ead79d73ade53003e8c0773d560cde4e6899cf7c5a9813de16e9f2&
18:08:25 <xarick> this layout is ... meh
18:08:39 <xarick> i wanted to resize the left pane
18:12:18 <xarick> got a 14.1 crash with one of these newgrfs
18:13:40 <xarick> i guess it's solved already, got no crash on my build
18:17:53 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick opened issue #13051: [Crash]: Some NewGRF crash when starting new game https://github.com/OpenTTD/OpenTTD/issues/13051
18:18:11 <xarick> just in case
18:26:53 <xarick> time to give up on objects with water class
18:48:11 <asasnat> asasnat: I know this is a mega necro but that does appear to be a case
18:48:23 <asasnat> I downloaded a save game that is pretty much all maglevs
18:48:55 <asasnat> they seem to glide effortlessly through all turns, even the 90's
18:49:34 <asasnat> meanwhile one tile up a slope slows them down to a crawl...
18:51:28 <asasnat> Tell me, O Chris Sawyer, what were Thou smoking when Thou were working on train physics for Transport Tycoon Deluxe?
18:59:36 <peter1138> Well it provides a better challenge than being able go up & down slopes willynilly
19:00:30 *** Tirili has joined #openttd
19:07:03 <johnfranklin> andythenorth: what does this mean?
19:21:08 *** gelignite has quit IRC (Read error: Connection reset by peer)
19:33:31 *** gelignite has joined #openttd
19:35:23 <andythenorth> Newark is the epitome of English Midlands
19:35:51 <andythenorth> And the trip from Northgate to Castle is very England
19:36:10 <andythenorth> Also, such a small town, but has two stations
19:36:36 * andythenorth much Newark experience
19:45:19 <peter1138> Never been there, nor heard of it.
19:46:28 <peter1138> Hmm, would a separate graph window be better...
20:18:52 <xarick> i just feel like...
20:19:17 <xarick> nevermind...
20:30:36 <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on issue #13051: [Crash]: Some NewGRF crash when starting new game https://github.com/OpenTTD/OpenTTD/issues/13051
20:37:01 <_glx_> could be already fixed with <https://github.com/OpenTTD/OpenTTD/pull/13012>
20:40:23 *** Borg has joined #openttd
20:40:34 <Borg> howdy.. is there a way to get current currency via GameScript?
20:41:04 <xarick> how do i test for a MP_VOID tile
20:41:30 <xarick> nvm
20:42:14 <_glx_> currency is just a visual setting, every client can use it's own
20:48:32 *** SigHunter has quit IRC ()
20:49:28 <johnfranklin> York = PubLand
20:50:06 <Borg> _glx_: damn..
20:51:24 *** SigHunter has joined #openttd
20:52:04 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick opened issue #13052: [Bug]: landscape_grid.html objects data are misaligned by 2 columns https://github.com/OpenTTD/OpenTTD/issues/13052
21:07:29 <Borg> _glx_: and no hack using GSGameSetting.GetValue() ?
21:08:08 *** nielsm has quit IRC (Ping timeout: 480 seconds)
21:10:09 <Borg> I want to display Loan as Goal
21:11:05 <_glx_> https://cdn.discordapp.com/attachments/1008473233844097104/1302379478634463345/image.png?ex=6727e6e8&is=67269568&hm=aacc0e3f713cfb641a790079cf8606d830a6918af2f8217cfd5a053a530bd470&
21:11:38 <Borg> yeah, but they are sent to client for display
21:11:38 <_glx_> use {CURRENCY_LONG} or {CURRENCY_SHORT} in your string
21:11:48 <Borg> yeah.. thats what I tough about
21:11:56 <Borg> those only works via GSText() right?
21:12:01 <Borg> I cant use raw String?
21:14:18 <_glx_> GSText() is better to format numbers
21:14:35 <Borg> okey.. lets create language file then
21:14:38 <Borg> rthx
21:14:40 <asasnat> peter1138: that value doesn't even seem to fit in a `Money`
21:15:23 <asasnat> https://cdn.discordapp.com/attachments/1008473233844097104/1302380557518241852/image.png?ex=6727e7e9&is=67269669&hm=ea3ac3c5ddca6eb6a4de9d940732dc0505096604c4b64dd43a3c0e0bae341001&
21:15:23 <asasnat> I made a program to try and see when calculation imprecision could occur and it's giving me this
21:16:19 <_glx_> https://cdn.discordapp.com/attachments/1008473233844097104/1302380799567335444/image.png?ex=6727e823&is=672696a3&hm=3367c99febe67b6aa73b7dfb6faa65d543b5c7e7346f36cf7d502dc4eb24a375&
21:16:31 <_glx_> should fit
21:16:37 <johnfranklin> Lucky in Oct
21:17:26 <_glx_> add 1 and it will become -1
21:17:26 <asasnat> _glx_: when I try to set it as a variable in my program it just segfaults when I try to run it
21:17:59 <_glx_> it's a 64bit integer
21:18:00 <asasnat> wait no that's an unrelated issue
21:20:52 <asasnat> well, now it's cutting off the last digit when given that value
21:20:56 <asasnat> which I guess I should've expected
21:21:59 <asasnat> fractional currencies was an interesting experiment, but the changes required to make it happen in OpenTTD are just too fundamental
21:22:10 <asasnat> glad to be done with it
21:26:03 <Borg> _glx_: okey works, thx..
21:26:09 <Borg> I wonder how it is saved tho :D
21:26:38 <Borg> I should save GSText() result? or I can generate it every time I need?
21:29:17 <Borg> hmm Save()/Load() works too
21:32:07 <Borg> _glx_: thx a lot :) works like a charm
21:32:48 <asasnat> asasnat: I mean, it only affects values above 922337203685477580 which I think is not too bad, but as peter said, you can't just assume no one will be pissed off by it
21:37:25 <xarick> lol, I'm stupid
21:40:05 <xarick> my pursuit for performance bears no fruits
21:42:15 <peter1138> https://cdn.discordapp.com/attachments/1008473233844097104/1302387323694088312/image.png?ex=6727ee37&is=67269cb7&hm=41ac02410151ee164d0779bef7e732b6705a6de0a19033b5a900e926cab7cb59&
21:42:15 <peter1138> Buttons?
21:47:59 *** SigHunter has quit IRC ()
21:50:36 *** SigHunter has joined #openttd
21:50:57 <xarick> cool graph
21:51:16 <xarick> what about transported per company? 😛
21:51:25 <xarick> j/k
21:52:18 *** tokai has joined #openttd
21:52:18 *** ChanServ sets mode: +v tokai
21:59:16 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
22:00:20 <xarick> I made a mostly useless change:
22:00:20 <xarick> <https://github.com/OpenTTD/OpenTTD/commit/13c5c5ac3198cb718291ccef2963a51b43619d7f>
22:00:42 <xarick> it improved performance in 0%
22:04:15 <xarick> oh, it fails to build yet again
22:05:35 <xarick> i don't understand the inlining things...
22:06:38 <xarick> or is it the static?
22:09:04 *** SigHunter has quit IRC ()
22:11:38 *** SigHunter has joined #openttd
22:12:51 <xarick> switch/case is slow apparently?
22:29:29 *** Borg has quit IRC (Quit: leaving)
23:06:04 *** keikoz has quit IRC (Ping timeout: 480 seconds)
23:10:27 *** SigHunter has quit IRC ()
23:13:03 *** SigHunter has joined #openttd
23:26:49 <xarick> have you considered casting TileType as uint8_t?
23:27:04 <xarick> enum TileType : uint8_t
23:27:17 <peter1138> That isn't casting.
23:27:24 <xarick> enumerating or whatever
23:30:39 <xarick> does it speed?
23:31:06 <xarick> I'm trying weird stuff
23:31:24 <xarick> ```inline bool HasTileWaterClass(Tile t)
23:31:24 <xarick> {
23:31:24 <xarick> static constexpr int WITH_WATERCLASS_MASK = (1 << MP_INDUSTRY) | (1 << MP_OBJECT) | (1 << MP_STATION) | (1 << MP_TREES) | (1 << MP_WATER);
23:31:24 <xarick> return HasBit(WITH_WATERCLASS_MASK, GetTileType(t));
23:31:24 <xarick> }```
23:31:37 <xarick> speed?
23:41:40 <xarick> an update, so fast!<https://github.com/OpenTTD/OpenTTD/compare/master...SamuXarick:OpenTTD:HasFloodingBehaviour>
23:43:09 <xarick> well, there were only gains when compared against GetFloodingBehaviour != FLOOD_NONE
23:43:27 <xarick> but master doesn't do that in the WaterTile_Loop
23:43:42 <xarick> so... overall, a net of 0% improvements
23:45:10 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
23:58:59 *** Tirili has quit IRC (Quit: Leaving)