Config
Log for #openttd on 23rd December 2022:
Times are UTC Toggle Colours
10:44:07  <petern> Okay, Discord in browser with crap blocked with uBlock 😄
10:44:48  <andythenorth> Horse now 22.4 MB
10:45:06  <petern> That'll download quicker 😄
10:45:17  <andythenorth> concurrent action 2s: 243/256 -> 207/256
10:45:27  <andythenorth> further from the limit 😛
10:45:53  <petern> Oof.
10:46:14  <petern> Oh no, the zip on my jumper is busted 😦
10:47:09  <andythenorth> oh approved but not merged 🙂
10:47:22  <andythenorth> well
10:47:28  <petern> https://www.thespruce.com/how-to-fix-a-broken-zipper-2145771 This looks far too hard
10:48:43  <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1055799107089862676/image.png
10:48:43  <andythenorth> such unmerginess 🙂
10:53:45  <andythenorth> hmm
10:54:03  <andythenorth> special flag to define what ctrl-click does per-vehicle?
10:54:17  <andythenorth> 1) flip 2) increment a byte that rolls over
10:54:41  <petern> It increments a bit that rolls over.
10:54:44  <andythenorth> it does
10:54:48  <andythenorth> it works great
10:56:03  <andythenorth> I use it to invert company colour 😛
10:56:25  <andythenorth> but then for asymmetric sprites, I'm handling the flip state to stop them visually flipping 😛
10:56:29  <andythenorth> such life
10:56:40  <petern> Double-edged sword eh?
10:59:49  <andythenorth> byte campaign continues 😛
10:59:58  <andythenorth> because mod(x) exists 😛
11:01:49  <dP> hm, so with 10262 is it not possible to disable flips completely?
11:02:21  <dP> like, newgrf can handle it do do nothing but it will still have the flip state internally afaict
11:03:14  <andythenorth> should do
11:03:38  <andythenorth> what does the flag do now?  I didn't read the implementation
11:06:44  <dP> afaict it just changes the way offsets and bboxes are handled
11:07:00  <dP> for flipped vehicles
11:09:03  <andythenorth> ok I've cut about 100k duplicate action 1s so far
11:09:12  <andythenorth> few more I can remove
11:09:26  <petern> The only reason disabling flips was introduced is because flipping shorter engines broke things.
11:09:39  <dP> also I don't understand this check: `!_gted[e->index].prop27_set && e->GetGRF() != nullptr && is_custom_sprite(e->u.rail.image_index)`
11:09:51  <dP> there are other flags in prop27, why are any of them affecting flip states?
11:10:45  <petern> Hmm, prop27_set can be removed.
11:11:35  <petern> dP, the default engines have the flag set, but we didn't want any NewGRF engines to have the flag set by default.
11:11:52  <petern> So the test is "did the NewGRF change prop27?"
11:12:11  <petern> If it did, we don't clear anything, if it didn't, ,we clear the flag, so that engines can't be flipped.
11:17:01  <dP> what if newgrf allowed flipping but kept default sprite?
11:17:21  <dP> I think that should've worked as they're length 8
11:21:43  <petern> Then that will still work.
11:22:11  <andythenorth> ok Horse grf is now 24 MB, from 36 MB
11:22:18  <andythenorth> so 1/3 saving
11:22:20  <petern> They set the flip to allow flipping, so the new flipping code is disabled.
11:22:20  <andythenorth> not bad
11:22:32  <dP> ah, yeah, that would work
11:23:00  <DorpsGek> [OpenTTD/OpenTTD] PeterN dismissed a review for pull request #10262: Change: Support flipping shorter engines without NewGRF support. https://github.com/OpenTTD/OpenTTD/pull/10262#pullrequestreview-1228760138
11:23:03  <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #10262: Change: Support flipping shorter engines without NewGRF support. https://github.com/OpenTTD/OpenTTD/pull/10262
11:23:57  <petern> This is going to give LordAro a complex 😦
11:25:21  <dP> does that change even compile? you seem to remove prop27_set but it's still used in the condition
11:26:04  <petern> The condition was removed, not added.
11:28:36  <dP> oh, lol
11:28:45  <dP> no wonder I couldn't understand it xD
11:37:24  <dP> ok, the other way around then, if previously newgrf stopped default vehicles from flipping by setting prop27
11:37:34  <dP> that would seem to do nothing now
11:43:14  <dP> basically 10262 treats unset EF_RAIL_FLIPS as "I don't care about flipping" when newgrf author could've meant "I don't want it flipping"
11:44:23  <andythenorth> grfs will have to make peace with themselves
11:44:29  <dP> in fact, it was kinda speced as "not flip"
11:45:32  <andythenorth> all of this was silly the first time around
11:45:43  <andythenorth> it was one of the worst behaved dramas when it was changed
11:45:54  <andythenorth> the flag was the most controversial change in grf spec
11:45:59  <andythenorth> and it wasn't even needed
11:46:10  <andythenorth> if I can do the maths for offsets, someone else could have
11:47:32  <andythenorth> hindsight is 20:20 🙂
11:49:03  <petern> <https://github.com/OpenTTD/OpenTTD/issues/4462>
11:50:35  <petern> Looks like they considered actually changing the position of vehicles, rather than just changing the position of where they are drawn.
11:52:37  <dP> isn't that how it works now?
11:52:56  <petern> It would be a mistake to add another flag to say "you can flip but don't make me handle it"
11:53:20  <petern> No, I don't touch x_pos/y_pos.
11:55:16  <dP> not you, seems to be changed in <https://github.com/OpenTTD/OpenTTD/commit/4d2a9e384ccb83eec9992ad36459f495bfcfe60f>
11:57:17  <petern> Well yes, later the vehicle centre was moved to the correct position anyway, including adjusting bounding box offsets but not handling flips because at that point it was already "forbidden"
11:58:44  <dP> gg
12:02:51  <dP> how do articulated vehicles flip now btw?
12:04:53  <dP> ok, looks like they just don't
12:05:28  <dP> so, back to square one - if you want it not to flip define it articulated xDD
12:06:22  <dP> which also reminds me of the hack of using articulation to make vehicles longer than 8
12:08:07  <dP> so with 10262 you'll be able to flip shorter engines but not longer ones
12:09:00  <petern> They still don't, nor multi-head.
12:09:38  <petern> Flipping articulated is not impossible but a whole lot of extra work and probably bugs.
12:10:31  <petern> For the longer vehicles hack, it would probably be fine.
12:11:09  <petern> If we lied about which part was being drawn, and apply the flip, then that would probably be enough as long as the lengths are symmetric.
12:11:37  <petern> Multi-head probably doesn't make sense.
12:12:02  <petern> I think they were already prevented even before the flip.
12:12:59  <dP> and, let me guess, all this flipping mess is because someone wanted to flip some engine at the end for more "realism"? xD
12:20:19  <andythenorth> petern: multihead 🙂  has issues 🙂
12:25:38  <petern> Yes, the whole "ctrl-click to flip" thing is a weird addition tbh.
12:25:43  <petern> What's the issues?
12:26:00  <petern> Movement in the depot is restricted to avoid them becoming detached, which was... a thing.
12:26:29  <andythenorth> let's change ctrl-click 😛
12:30:36  <dP> that could actually be a thing, newgrf defines the length of ctrl-cycle (1 by default), then receives it's position in that cycle in whatever var is currently flipped state is
12:31:11  <dP> so by default it would be flipping and flipping n

Powered by YARRSTE version: svn-trunk