IRC logs for #openttd on OFTC at 2024-10-09
        
        
        
            ⏴ go to previous day
02:03:59  *** herms61 has quit IRC (Quit: bye)
 
02:05:01  *** herms61 has joined #openttd
 
02:14:11  *** Wormnest has quit IRC (Quit: Leaving)
 
02:17:39  *** debdog has quit IRC (Ping timeout: 480 seconds)
 
03:03:29  *** gnu_jj_ has quit IRC (Ping timeout: 480 seconds)
 
04:19:18  <ahyangyi> I think the same applies to all building-types: house, object, station, etc
 
04:19:37  <ahyangyi> The NewGRF has to ensure that the preview sprites are sorted in the right order
 
04:22:04  <wensimehrp> _pruple: Yep you'll have to manually sort them
 
04:52:48  <_pruple> hmm... I guess that's doable
 
05:15:33  *** keikoz has quit IRC (Ping timeout: 480 seconds)
 
05:44:54  <andythenorth[d]> pff sleeping, over-rated eh
 
06:03:36  <andythenorth[d]> pff thought of an option B, less change to existing bits
 
06:03:57  <andythenorth[d]> any of this, I'll put a FIRS parameter in to switch to old classes
 
08:06:28  <peter1138> Hmm, that is a limitation I wasn't really aware of. Makes sense that it's the same forr other types because it's the same drawing function.
 
08:09:04  <andythenorth[d]> the canvas in 4o is such a good idea, but so slow and buggy
 
08:10:44  <andythenorth[d]> so where are specific classes baked into current OpenTTD?
 
08:11:00  <andythenorth[d]> I've found cargotype.h
 
08:22:15  <andythenorth[d]> do I read correctly?  Base game vehicles have a cargotype, which determines label, classes etc? e.g. CT_LIVESTOCK
 
08:23:04  <andythenorth[d]> hmm ConDumpCargoTypes was unexpected
 
08:25:26  <peter1138> It is only 4 years old.
 
08:27:45  <peter1138> Base vehicles have a bit of magic to support different cargo label depending on the climate.
 
08:28:11  <peter1138> Base cargo types have cargo classes assigned.
 
08:29:00  <andythenorth[d]> in cargo_const.h?
 
08:29:11  <andythenorth[d]> oh dear GS has specific constants for specific classes
 
08:29:18  <andythenorth[d]> and presumably AI
 
08:29:54  <peter1138> And then there's a mapping from climate + cargo label to cargo classes to apply refits to default vehicles.
 
08:30:22  <peter1138> (Or rather, to vehicles that don't set cargo properties)
 
08:30:45  <andythenorth[d]> so many problems with my current plan 🙂
 
08:31:12  <andythenorth[d]> interesting that the classes listed don't conform to the spec
 
08:31:13  <peter1138> The defaults even use excludes which are apparently forbidden...
 
08:32:25  <andythenorth[d]> where are the excludes (which file)?
 
08:37:40  <andythenorth[d]> wondering if `_standard_cargo_mask` makes cargo class bit 15 non-repurposeable
 
08:38:53  <andythenorth[d]> `if (cargo->classes & CC_SPECIAL) break;`
 
08:54:03  <peter1138> Handling of CC_SPECIAL is not particularly consistent anyway.
 
08:54:53  <peter1138> But anything with it is excluded from many UI places.
 
08:58:06  <andythenorth[d]> I'm searching the others to see which are depended on
 
08:59:27  *** mindlesstux has joined #openttd
 
09:00:07  <peter1138> Changing the meanings of existing cargo classes is not a good idea really.
 
09:00:40  <andythenorth[d]> the stupid ones are more debatable
 
09:00:59  <andythenorth[d]> hmm `CalculateRefitMasks`
 
09:01:15  <andythenorth[d]> specifically `DefaultRefitMasks`, my brain says no
 
09:02:36  <peter1138> frosch wrote that code, so it's bound to be well thought out and correct. (This is not sarcasm)
 
09:03:33  <andythenorth[d]> I *think* that if I was prepared to take on the pitchforks, and change the apparently-facts-but-are-they really rules
 
09:03:50  <andythenorth[d]> the existing classes and 2 spare bits would do everything needed
 
09:04:11  <andythenorth[d]> and it could be done 2 ways, either with or without NOT AND exclusions
 
09:04:33  <andythenorth[d]> dunno if that's worth the candle
 
09:04:43  <peter1138> Remember that 2C/2D exist for specific scenarios, classes are for generalising.
 
09:05:39  <andythenorth[d]> so apart from pitchfork factor, the major flaw in my plan is that default vehicles don't support all the classes I would want to declare as 'base'
 
09:05:46  <andythenorth[d]> which is a problem for fallback 😛
 
09:05:57  <andythenorth[d]> like...really kills it dead
 
09:06:20  <andythenorth[d]> I can put a parameter in FIRS to deal with that, but it's a kludge
 
09:06:40  <peter1138> This is why excludes.
 
09:06:56  <andythenorth[d]> I just suspect that if we decompiled all the grfs on bananas
 
09:06:59  <andythenorth[d]> we'd find nobody does that
 
09:07:50  <andythenorth[d]> `GPT can you decompile everything on bananas`
 
09:07:59  <andythenorth[d]> `analysing` -> crashes browser tab
 
09:08:17  <andythenorth[d]> currently, our AI overlords are limited by the rate at which they crash Chrome tabs
 
09:08:49  <ahyangyi> andythenorth[d]: Use Firefox
 
09:09:16  <ahyangyi> That'll make GPT unable to crash Chrome tabs 😛
 
09:09:24  <merni> Firefox'd probably crash even earlier
 
09:09:36  <ahyangyi> but then they are crashing Firefox tabs instead
 
09:09:40  <merni> I say that as a long-time firefox user :logo_Blauwnet:
 
09:10:51  <andythenorth[d]> I can probably address the 'no refits on default vehicles' by always including one of the supported classes
 
09:11:10  <andythenorth[d]> (in cargo action 0 prop 0x16)
 
09:11:14  *** tokai|noir has joined #openttd
 
09:11:14  *** ChanServ sets mode: +v tokai|noir
 
09:11:41  <andythenorth[d]> pff, kind of makes CC_GAS pointless
 
09:12:59  <andythenorth[d]> ah, no, wouldn't have to be CC_LIQUID and CC_GAS
 
09:13:02  <andythenorth[d]> could be piece
 
09:13:06  <andythenorth[d]> almost everything can be piece
 
09:15:03  <andythenorth[d]> vehicles have long been a problem for this
 
09:15:08  <andythenorth[d]> and livestock bothers people
 
09:15:34  <andythenorth[d]> almost all other cargos can be packaged in sacks, boxes, crates, bales, barrels, jars, or palettised
 
09:15:41  <merni> andythenorth[d]: Vehicles are inherently piece, no?
 
09:15:53  <andythenorth[d]> they're a non-standard breakbulk cargo
 
09:15:59  <merni> Do you transport vehicles in one gloopy mass :p
 
09:16:47  <andythenorth[d]> they tend to fall outwith piece handling as they can rolle
 
09:16:54  <andythenorth[d]> and generally don't stack well
 
09:17:21  <merni> Who needs vehicles when you have trains and trams anyway
 
09:18:08  *** tokai has quit IRC (Ping timeout: 480 seconds)
 
09:18:08  <andythenorth[d]> hmm which base vehicles actually refit piece?
 
09:30:05  <andythenorth[d]> _pruple: is it any way necessary for livestock to set piece? 😛
 
09:31:26  <andythenorth[d]> I haven't followed all the way through src
 
09:31:35  <andythenorth[d]> but I think the livestock van has LVST somehow somewhere
 
09:33:39  <andythenorth[d]> ah, no livestock van in tropic
 
09:35:26  <andythenorth[d]> are livestock express? 😛
 
09:35:36  <andythenorth[d]> seems express was always a silly cargo
 
09:36:42  <andythenorth[d]> `Josef Drexler> Refrigerated Goods is a good idea. I "invented" Express Freight with the Transrapid in mind, so it would include the types of freight you could imagine being transported by the Transrapid.`
 
09:40:53  <andythenorth[d]> we've all done it 😛
 
09:43:09  *** emperorjake has joined #openttd
 
09:43:09  <emperorjake> There are definitely places where people take their livestock on the passenger train to bring them to market
 
09:47:54  <andythenorth[d]> if this list also included a set of covered bulk cargos, would we mind?
 
09:48:14  <andythenorth[d]> sand, carbon black, quicklime, cement, potash, phosphate, soda ash
 
09:48:23  <andythenorth[d]> oh, some of those are there anyway
 
09:48:44  <peter1138> You can also exclude by label...
 
09:49:00  <andythenorth[d]> GPT tells me that 😛
 
09:49:42  <andythenorth[d]> I should have screenshotted the default goods van
 
09:50:16  <andythenorth[d]> there, that's my actual question 😄
 
09:51:42  <andythenorth[d]> pretty much everything can be piece
 
09:51:58  <peter1138> Basically we should never have gone above say 16 cargo types.
 
09:52:42  <andythenorth[d]> if pretty much everything can be piece
 
09:52:55  <andythenorth[d]> then most of the crappy 'modifier' classes, which ~nobody uses
 
09:53:00  <andythenorth[d]> can be changed
 
09:54:57  <_pruple> peter1138: who's "we"?
 
09:55:51  <_pruple> the conversation of the last few days has certainly inspired me to nuke everything non-Sunshine from my CTT. 0x12 cargos, much more managable. 🙂
 
09:56:46  <_pruple> and fortunately, I have rather less than 997 wagons to reconfigure...
 
09:57:12  <peter1138> Any actual objects to CC_CLEAN/CC_DIRTY?
 
09:57:56  <peter1138> I'm not sure if andy objects or not.
 
10:00:16  <andythenorth[d]> I won't use them
 
10:00:33  <andythenorth[d]> as the current spec stands
 
10:00:50  <andythenorth[d]> (all classes spec, not clean vs dirty)
 
10:02:21  <_pruple> 🤷 and I'm going to use them regardless, they'll be sunshine spec even if they're unofficial.
 
10:04:01  <emperorjake> I'm not opposed to those new cargo classes, seems like they could make covered hoppers work better
 
10:04:33  <andythenorth[d]> there are no covered hoppers without labels 😛
 
10:04:36  <andythenorth[d]> can't be done
 
10:04:42  <andythenorth[d]> in the current spec
 
10:05:01  <peter1138> What I'm reading is "cargo classes can't perfectly match things so I'm going to throw it all away"
 
10:08:37  <reldred> baby out with the bathwater
 
10:18:20  <peter1138> Why do scrollbars have to fade away these days?
 
10:18:51  <reldred> because very little good has come from technology in the last twenty years
 
10:20:27  <ahyangyi> peter1138: Touchscreen logic, I guess
 
10:22:40  <peter1138> VS Code should never need that.
 
10:28:49  <LordAro> peter1138: chrome does though
 
10:34:34  <xarick> std::unique_ptr vs std::make_unique
 
10:36:19  <xarick> for the heck of me, i can't do this 🙂
 
10:37:18  <peter1138> The first one is the type. The second one makes the first one.
 
10:42:46  <LordAro> for the heck of you indeed
 
10:45:18  <xarick> line 1, line 10 and line 25. Compiling then errors at line 25
 
10:45:36  <xarick> any ideas why I am dumb?
 
10:49:49  <xarick> function does not take 2 arguments?
 
10:49:56  <xarick> but then it doesn't take 1 either
 
10:51:27  <peter1138> You are creating a unique_ptr to hold a unique_ptr? Seems illogical.
 
10:57:13  <xarick> holy crap, that was it?
 
10:57:20  <xarick> line 1 was the problem
 
11:00:17  <xarick> nop, i think i failed yet
 
11:01:20  <peter1138> No doubt not THE problem, but one.
 
11:02:55  <peter1138> std::fill(begin, end, value);
 
11:03:15  <peter1138> Because it's a unique_ptr[], you will need to provide the begin and end as well.
 
11:03:30  <peter1138> .fill only exists on std::array.
 
11:09:30  <xarick> begin and end doesn't exist 😛
 
11:11:02  <ahyangyi> pointers are iterators
 
11:11:21  <LordAro> std::begin & std::end exist though
 
11:12:45  <xarick> it's telling me again that it's a std::unique_ptr for some reason
 
11:13:49  <LordAro> what were you expecting it to be/
 
11:14:00  <_jgr_> You need to use `->begin()` here
 
11:15:53  <peter1138> Not with a unique_ptr<T[]>
 
11:16:30  <ahyangyi> `.get()` and `.get()+N` I guess
 
11:16:32  <LordAro> that error message isn't very useful, i'll give you
 
11:17:30  <peter1138> Using a unique_ptr array when you don't know what you're doing is, well...
 
11:17:37  <peter1138> There's a few foot-guns
 
11:18:12  <_jgr_> Ah, TWaterRegionPatchLabelArray has been changed...
 
11:18:22  <ahyangyi> Yeah, in 99% of the time `vector` does the same and better
 
11:19:09  <xarick> `std::fill(this->data.tile_patch_labels.get(), this->data.tile_patch_labels.get() + GetWaterRegionNumberOfTiles(), INVALID_WATER_REGION_PATCH);`
 
11:19:52  <peter1138> _jgr_: He's making the water region size variable. Nobody knows why.
 
11:20:20  <peter1138> (One size per game, at least, I hope...)
 
11:20:39  <_jgr_> I can see the logic in making it variable at compile time for benchmarking purposes
 
11:21:27  <xarick> alright, one more problem to solve and I think I'm done here
 
11:21:27  <peter1138> Yeah. it is by changing some defines 🙂
 
11:23:57  <kuhnovic> He wants to tell me I'm wrong for settling on 16x16 regions and 4 region lookahead
 
11:24:57  <xarick> yes! I am experimenting swaping between 8x8 with 6 lookaheads to 16x16 with 4 lookaheads
 
11:25:52  <kuhnovic> I agree with you that 8x8 or even 4x4 regions lead to very nice PF results. Until you run a 4K map that is.
 
11:26:46  <kuhnovic> Luckily you of all people know what it's like to run a 4K 70K ship map, so you'll quickly find out how much worse the performance of the PF gets when you do that 😛
 
11:28:45  <kuhnovic> And increasing the region lookahead beyond 4 doesn't improve path quality a whole lot, but the LL PF has to explore a LOT more nodes and becomes quite a bit slower.
 
11:29:14  *** leadnaut has joined #openttd
 
11:29:14  <leadnaut> how are you deciding when to swap? like swap to the smaller regions when you approach the destination?
 
11:29:40  <peter1138> No, it's not possible to be dynamic like that.
 
11:30:25  <peter1138> The only reason to make it dynamic is to test performance differences without recompiling, and... you are not then comparing the same thing.
 
11:30:41  <xarick> i am attempting to make it re-AllocateWaterRegions
 
11:31:26  <xarick> just need to be careful and not trigger an infinite loop
 
11:45:51  <peter1138> It's 1 o'clock and time for lunch, bom de bom de bom.
 
11:51:57  <andythenorth[d]> I'll decide unilaterally eh
 
11:52:11  <andythenorth[d]> and brocolli?
 
11:53:01  <andythenorth[d]> AND NOT brocolli?
 
11:53:19  * andythenorth[d] is a bad person
 
11:56:08  <andythenorth[d]> fishfingers || brocolli || carrots
 
11:56:28  <andythenorth[d]> can't ||, discord makes it spoiler
 
11:56:28  <LordAro> kids refusing to eat their fruit & veg, huh?
 
11:56:39  <andythenorth[d]> brocoli is new to me
 
11:56:49  <andythenorth[d]> not eaten before 2023
 
11:57:02  <andythenorth[d]> brocolli denial
 
12:07:28  <andythenorth[d]> fishfingers cooking
 
12:07:42  <andythenorth[d]> let's see what CC_REFRIGERATED is actually used for in base game
 
12:07:43  <peter1138> Fishfinger sandwiches?
 
12:07:54  <andythenorth[d]> fishfingers and healthy veg
 
12:09:01  <peter1138> Oh, no, not me, I'm a man of repute!
 
12:09:31  <andythenorth[d]> are fishfingers CC_REFRIGERATED?
 
12:16:52  <andythenorth[d]> ach I so nearly have a plan that doesn't involve changing much except some spec words
 
12:17:04  <andythenorth[d]> shame I'm not more clever
 
12:35:01  <andythenorth[d]> I can also report that the LLMs are not more clever
 
12:50:57  <truebrain> the "I don't like this syntax, so here is my even shittier suggestion" comments are most fun to read 🙂
 
12:51:19  <_jgr_> Seems like a good change to me
 
12:52:41  *** Flygon has quit IRC (Read error: Connection reset by peer)
 
13:01:10  <kuhnovic> Has a bit of a goto-ish vibe
 
13:24:35  <peter1138> There's usually the option of breaking things up into smaller functions.
 
13:25:00  <peter1138> Or a bit of RAII if you're worried about the purity of 'Resource'.
 
13:26:32  <LordAro> which is probably covered by both of those
 
13:59:23  <andythenorth[d]> what's CC_REFRIGERATED for?  Not a trick question, and I know how to google 😛 i.e. what cargos should it be set for? 🙂
 
14:04:38  <talltyler> Cargos that need cooling provided by the wagon: meat, produce, dairy, etc.
 
14:04:38  <talltyler> Gases which are cold due to pressure do not qualify, since the wagon does not provide active cooling
 
14:05:02  <talltyler> In my opinion, anyway 🙂
 
14:05:32  <peter1138> Beer doesn't _need_ cooling.
 
14:05:49  <peter1138> (Only shitty lager, tbh)
 
14:06:05  <_pruple> and even that, not during transport 🙂
 
14:06:27  <peter1138> What if you're drinking it while transporting it?
 
14:06:33  <andythenorth[d]> `mb> That sounds fine. You could, of course, classify "Mail" under "Express Freight," but that would probably go against the spirit of TTD. :) And "RefrigeratedGoods" could be its own category (Food, Beer, Fish, ...), or you could rename "Express Freight," because what else would that be? Just Valuables? If it's only "Goods," it would be hard to distinguish, as containers, for example, wouldn't be
 
14:06:33  <andythenorth[d]> Express Freight, but rather slow freight. Hmm.`
 
14:06:39  <andythenorth[d]> origin of refrigerated
 
14:06:47  <andythenorth[d]> could have just been 'food_grade'
 
14:08:56  <peter1138> (Although of course a cargo set from 2005 isn't going to work well with anything)
 
14:10:40  <andythenorth[d]> I've broken something 😛
 
14:10:49  <andythenorth[d]> base vehicles aren't refitting food
 
14:11:57  <peter1138> It's not impossible that I've broken something...
 
14:12:03  <_pruple> I think it might be the base vehicles are wonky
 
14:12:23  <_pruple> I just checked, and with sunshine industries the only vehicle that can refit food is the oil tanker, which can't be right...
 
14:12:32  <peter1138> Ah, no, newcargo.grf doesn't even set classes 😄
 
14:12:49  <peter1138> Too early even for that.
 
14:13:36  <andythenorth[d]> quirky, removing CC_REFRIGERATED causes food to become non-refittale with base vehicles
 
14:13:52  <andythenorth[d]> even though CC_EXPRESS is also set, and supported for other cargos
 
14:14:16  <andythenorth[d]> I'd need to remove and re-add to verify
 
14:14:17  <peter1138> Oh right, there's a NewGRF to add labels/classes to newcargo.grf
 
14:14:56  <andythenorth[d]> anyway, I'm sure I'll find reasons this doesn't work
 
14:15:20  <andythenorth[d]> but CC_REFRIGERATED -> CC_FOOD_GRADE, send pitchforks
 
14:15:45  <andythenorth[d]> refrigeration or not is a detail, and 'food van' or 'food hopper' or 'food tank' is a class
 
14:16:13  <peter1138> I think those classes need tweaking for beer 😄
 
14:16:52  <andythenorth[d]> what's the key, I haven't got dumpinfo open 😛
 
14:17:20  <_pruple> wonky minimum refittability of default vehicles?
 
14:17:28  <peter1138> express, piece, liquid.
 
14:17:46  <andythenorth[d]> so was refrigerated not set?
 
14:18:11  <peter1138> This is an unreleased test GRF I made while doing the default refit mask stuff, not available to anyone else 😉
 
14:18:20  <peter1138> Nobody actually cares about newcargo.grf
 
14:19:22  <_pruple> I don't care about newcargo.grf, but my FOOD is express, piece, liquid, refrigerated, covered, and the only default temperate rail wagon that can carry it is the oil tanker.
 
14:19:44  <_pruple> fortunately, I don't care much about the default vehicles either, I suppose... 🤷
 
14:21:15  <andythenorth[d]> hmm, can I set bits directly in nmlc cargo_classes? 😛
 
14:21:20  <andythenorth[d]> or do I have to use the constants
 
14:21:58  <peter1138> Yeah, the default stuff will exclude due to CC_LIQUID.
 
14:23:12  <peter1138> Maybe the default refit stuff needs to be looked at too.
 
14:23:54  <peter1138> default goods wagon excludes liquid.
 
14:24:14  <andythenorth[d]> "I have a proposal (nearly)"
 
14:25:25  <peter1138> (Or rather, default-anything-that-defaults-to-'GOOD')
 
14:25:55  <_pruple> the spec does suggest that liquid, bulk, and piece may be combined "to simulate multiple modes of transport", and should never be excluded...
 
14:26:16  <andythenorth[d]> extend to "nothing should ever be excluded" 😛
 
14:26:20  <andythenorth[d]> it's just not necessary
 
14:26:36  <andythenorth[d]> exclusion was one person's effort in TTDP to deal with not having anything like labels, in 2005
 
14:26:42  <_pruple> exclusion should certainly be done sparingly
 
14:27:08  <andythenorth[d]> people make honest mistakes, we don't have to keep pretending they got it right
 
14:27:56  <_glx_> at least default vehicles can transport unknown cargo, even if it's not the best vehicle type
 
14:29:42  <xarick> my .reset isn't working
 
14:29:56  <xarick> this->data.tile_patch_labels.reset();
 
14:30:26  <_glx_> it doesn't delete the object pointed ?
 
14:30:45  <kuhnovic> I'm pretty sure it's working, and that you don't understand what reset does.
 
14:33:24  <andythenorth[d]> how many of those would *not* be valid for Piece Goods?
 
14:33:56  <_glx_> of course crash may happen if the code doesn't expect nullptr
 
14:34:27  <andythenorth[d]> (not valid with piece goods to ensure compatibility)
 
14:34:39  <_glx_> like anytime you work with pointers, you need to be careful
 
14:36:05  <andythenorth[d]> ok, not piece goods: pax, livestock, electricity, regearing
 
14:37:01  <xarick> ah, i think i fixed it, it was something stupid of me
 
14:39:23  <xarick> there are 3 allocation calls when starting openttd
 
14:41:49  <xarick> the first one is because _water_region_edge_length is not initialised, is 0, and it checks with the pathfinder settings which are also not initialized
 
14:42:45  <xarick> _water_region_edge_length becomes 16
 
14:44:05  <xarick> the second one it loads the main menu save game, it initialises, but the pathfinder settings are still not defined
 
14:44:18  <xarick> _water_region_edge_length still 16
 
14:44:57  <xarick> 3rd call, it's still loading the main menu... again=
 
14:45:23  <xarick> pathfinder values are now valid
 
14:45:32  <xarick> _water_region_edge_length becomes 8
 
14:46:03  <xarick> well, it's not an infinite loop!
 
14:47:07  <_pruple> refitting using classes (and only classes) seems to work pretty well for me
 
14:49:02  <xarick> let's try the on-the-fly reallocation
 
14:53:47  <xarick> I can't watch the contents of the array though
 
14:56:18  <xarick> bad performance though
 
14:57:28  <xarick> something's failing, ships lost
 
14:58:25  <kuhnovic> Are you resetting the vector that keeps track of whether the regions are invalidated?
 
14:59:00  <kuhnovic> And by resetting I mean filling it with "false" to indicate they are all invalid after a change in region size
 
15:00:57  <andythenorth[d]> _pruple: Try a mineral covhop for sand and not coal 😛
 
15:02:08  <_pruple> andythenorth[d]: Why?
 
15:11:12  <xarick> something feels off here
 
15:18:56  <andythenorth[d]> in another world, there'd be a class that can be set in train prop 0x28
 
15:19:09  <andythenorth[d]> 'any cargo that is not refittable elsewhere'
 
15:19:23  <andythenorth[d]> I guess it doesn't work across vehicle intro dates
 
15:20:57  *** HerzogDeXtEr has joined #openttd
 
15:21:51  <andythenorth[d]> hmm autogenerated ctt with all possible 4 char labels? 😛
 
15:22:02  <andythenorth[d]> might exceed the property size
 
15:35:34  <peter1138> xarick: It's a pointer...
 
15:38:08  <peter1138> Hmm, what's special about Blitter_32bppSSE4_Anim that it needs a cast?
 
15:38:08  <peter1138> Blitter *CreateInstance() override { return static_cast<Blitter_32bppSSE2_Anim *>(new Blitter_32bppSSE4_Anim()); }
 
15:41:28  <andythenorth[d]> oh 2011 cargo classes wiki edit war 😛
 
15:42:35  <andythenorth[d]> was trying to find origins of oversized and hazardous
 
15:42:42  <andythenorth[d]> they predate the wiki move
 
15:42:50  <andythenorth[d]> diffs not in history
 
15:48:11  <andythenorth[d]> diamonds are CC_ARMOURED
 
15:52:33  <andythenorth[d]> pff all I can find in forums is that `oversized` offended everybody, grf devs and openttd devs
 
15:52:43  <andythenorth[d]> and nobody references who added it or why
 
15:53:15  <andythenorth[d]> at some point it was also 'overweight' but that was arbitrarily removed from the spec
 
15:58:04  <andythenorth[d]> the history of edit wars has not aided cargo classes
 
15:58:52  <peter1138> I was wondering what to do about badges...
 
15:59:13  <andythenorth[d]> with bells on
 
15:59:31  <peter1138> Given there is limited spaces (`2^8` classes and `2^24` badges in each class)
 
16:00:44  <peter1138> Unless I forgo the normal convention and just use std::string everywhere...
 
16:01:01  <andythenorth[d]> wonder if nml will take a raw bitmask in the form `bitmask(0, 3, 10)` or if it wants `bitmask(0x00, 0x03, 0x0A)`
 
16:01:06  <peter1138> (Would be pretty hard to do varact2 tests though.)
 
16:02:40  <andythenorth[d]> CC_PIECE_GOODS, CC_EXPRESS
 
16:02:46  <andythenorth[d]> I'll gt my coat
 
16:03:23  <andythenorth[d]> that's a terrifying potential number of badges
 
16:03:36  <andythenorth[d]> even if I autogenerate them
 
16:05:00  <peter1138> Yes, but people will want to use ascii letters/numbers,  bringing it down to 36 and 36^3.
 
16:05:56  <andythenorth[d]> only that's extended unicode or something
 
16:06:32  <_glx_> andythenorth[d]: both are the same thing
 
16:06:51  <andythenorth[d]> I could just yolo class changes, except for NMLC
 
16:07:19  <andythenorth[d]> define my own 'standard' 😛
 
16:10:43  <andythenorth[d]> _glx_: thanks 🙂
 
16:11:35  <_glx_> hexadecimal or decimal are a human thing, software doesn't care
 
16:12:26  <_glx_> you can even write `bitmask(0x00, 0x03, 10)`
 
16:33:45  <xarick> but something is broken at some point
 
16:34:54  <peter1138> If you make regions 1x1 does that improve it?
 
16:37:38  <xarick> and now the ship is lost for ... reasons I don't know yet
 
16:43:25  <peter1138> Definitely working.
 
16:45:10  <xarick> it's "number_of_water_regions_lookahead + 1"
 
16:45:20  <xarick> the pesky +1 was missing
 
16:46:50  <xarick> yep, that was it, problem solved
 
16:52:46  <xarick> alright, enough screenshots
 
16:56:09  <kuhnovic> xarick: Before you start doing any performance comparison and jump to conclusions: BUILD THE THING IN RELEASE
 
17:23:45  <xarick> PrintDebugInfo needs fixing
 
17:25:03  <xarick> std::array<int, 16> traversability_NW{0}; dang.... arrays again
 
17:27:00  <xarick> cannot call non constexpr blabla
 
17:29:04  *** gelignite has joined #openttd
 
17:40:23  <kuhnovic> Or you just comment out that part. The labeling process works the same regardless of what the region size is.
 
17:41:49  <kuhnovic> So not much need to inspect the regions. _And it won't work in release anyway... _
 
17:49:51  <xarick> it's writing many zeros
 
17:55:20  <xarick> "  +{:->{}}+" morse code
 
18:31:48  *** D-HUND is now known as debdog
 
18:47:24  <andythenorth[d]> if base vehicles were less climate limited
 
18:47:29  <andythenorth[d]> oh wait, ogfx + trains 😛
 
18:48:14  <xarick> those 1's are misplaced
 
18:49:38  <andythenorth[d]> I'm only interested in default base game, not what grfs I might 'break'
 
19:10:57  <xarick> fmt::join doesn't like my idea of std::unique_ptr<int[]> traversability_NW = std::make_unique<int[]>(CurrentWaterRegionEdgeLength());
 
19:19:38  <xarick> 'fmt::v10::join': no matching overloaded function found
 
19:31:41  <andythenorth[d]> so cargo badges when?
 
19:31:47  <andythenorth[d]> and vehicles have badges
 
19:31:50  <andythenorth[d]> and cargos have badges
 
19:31:58  <andythenorth[d]> and if the badges match...the vehicle can carry the cargo
 
19:33:13  <dwfreed> xarick: pretty sure you need to deref the unique_ptr
 
19:33:15  <peter1138> Heh, left-overs from C-style strings...
 
19:39:19  *** test123_ has joined #openttd
 
19:40:44  *** test123_ has quit IRC (Remote host closed the connection)
 
19:53:09  *** gelignite has quit IRC (Quit: Stay safe!)
 
20:03:13  *** nielsm has quit IRC (Ping timeout: 480 seconds)
 
20:09:37  <xarick> trying to learn what std::visit works
 
20:10:10  <_glx_> std::join works with arrays
 
20:11:58  <_glx_> maybe try with traversability_NW.get()
 
20:12:42  <_glx_> but I'm not sure C-style array will work
 
20:13:27  <_glx_> using a vector would have been way easier
 
20:13:32  <andythenorth[d]> ok so...I have pissed around fitting classes into the available 11 bits, mostly trying to preserve the meaning of classes that are actually used
 
20:13:36  <andythenorth[d]> but it's a bit weird
 
20:13:52  <andythenorth[d]> it's better than the current classes, but it's weird
 
20:17:41  <xarick> well, i need... something, forgot what
 
20:20:19  <_glx_> usually when you want an array with dynamic size, it's simpler to switch to vector
 
20:21:14  <andythenorth[d]> so can I just have my own cargo class namespace? 😛
 
20:24:43  <_jgr_> _glx_: Allowing each water region to have its own separate size field seems like it'd open up a whole new exciting set of bugs 😛
 
20:27:18  <xarick> that 1 0 0 0 0 0 0 0 should be 0 0 0 0 0 0 0 1
 
20:28:14  <xarick> fmt::join doesn't do it on reverse?
 
20:41:36  <xarick> ```        std::vector<int> traversability_NW(CurrentWaterRegionEdgeLength(), 0);
 
20:41:36  <xarick> for (auto bitIndex : SetBitIterator(this->data.edge_traversability_bits[DIAGDIR_NW])) traversability_NW[bitIndex] = 1;
 
20:41:36  <xarick> std::reverse(traversability_NW.begin(), traversability_NW.end());
 
20:41:36  <xarick> Debug(map, 9, "    {:{}}", fmt::join(traversability_NW, " "), max_element_width);
 
20:48:10  <andythenorth[d]> have you tried Copilot? 😛
 
20:49:01  <xarick> yes, it kinda points me to the right way
 
20:49:24  <xarick> but still fails to provide good code
 
20:50:26  <xarick> CalculateWaterRegionPatchHash, wondering if it needs fixing...
 
21:03:09  <xarick> GetWaterRegionIndex returned 262143
 
21:05:24  <xarick>         CalculateWaterRegionPatchHash returned    67108609    int
 
21:07:14  <xarick> wondering if I change that << 8
 
21:11:57  <andythenorth[d]> pff 11 bits, I would like more
 
21:12:01  <andythenorth[d]> pls send me bits
 
21:13:12  <xarick> `return water_region_patch.label | GetWaterRegionIndex(water_region_patch) << FindFirstBit<uint8_t>(CurrentWaterRegionNumberOfTiles());`
 
21:18:27  <xarick>         CalculateWaterRegionPatchHash returned    16777153    int
 
21:22:10  <xarick> back to the original 256 number of tiles, we get
 
21:22:23  <xarick> +        water_region_patch    {x=255 y=255 label=1 '\x1' }    const WaterRegionPatchDesc &
 
21:22:49  *** keikoz has quit IRC (Ping timeout: 480 seconds)
 
21:23:02  <xarick> oh crap, can't use uint8_t, needs to be larger
 
21:23:43  <andythenorth[d]> send me your extra bits that don't fit, I can use them
 
21:26:41  <xarick>         CalculateWaterRegionPatchHash returned    16776961    int
 
21:28:26  <xarick> almost feels like something is not right
 
21:33:09  <xarick> well, I'm off to bed, good night
 
21:57:59  <andythenorth[d]> hmm.  think I've done a thing
 
22:04:04  *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
 
22:32:25  <andythenorth[d]> cargo class redefinitions
 
22:32:25  <andythenorth[d]> - keeping all the ones required by OpenTTD dependencies
 
22:32:25  <andythenorth[d]> - keeping the commonly used ones
 
22:32:25  <andythenorth[d]> - redefining or replacing the uncommon or almost-never-used ones
 
22:32:25  <andythenorth[d]> - rewrite the "rules" in the "spec" which isn't what it was supposed to be, had some edit wars, and diverges between nfo and nml versions
 
22:32:27  <andythenorth[d]> Pitchfork count: 5
 
22:32:27  <andythenorth[d]> Flaming torch count: 1
 
22:32:29  <andythenorth[d]> Extra bits required: none
 
22:32:29  <andythenorth[d]> Difficulties: nmlc constants patch, which might be controversial
 
22:32:31  <andythenorth[d]> Regrets: some predicted
 
22:33:57  <reldred> I just got up and I want a nap
 
23:35:41  <peter1138> I decided it was an idea to watch Threads.
 
23:46:51  <reldred> I need to start planning re_fabs3
 
23:47:28  <reldred> I can't believe this project has going onto it's third iteration before even being publicly released 💀
 
23:47:50  <reldred> i need to do a better job of planning out ID usage and class ID's
 
continue to next day ⏵