IRC logs for #openttd on OFTC at 2018-05-20
            
00:03:55 <_dp_> frosch123, you reviewed old version, that's probably why it's outdated
00:05:39 *** KouDy has quit IRC
00:13:26 <_dp_> frosch123, and he seems to be right, it should work the same
00:36:23 *** Fuco has quit IRC
00:41:52 *** Wormnest has quit IRC
00:52:48 *** synchris_ has quit IRC
01:02:03 *** Wacko1976 has quit IRC
01:15:49 *** iSoSyS has quit IRC
01:18:19 *** frosch123 has quit IRC
01:23:36 *** Progman has quit IRC
01:25:26 *** KouDy has joined #openttd
01:30:46 *** KouDy has quit IRC
02:04:51 *** sim-al2 is now known as Guest3131
02:04:52 *** sim-al2 has joined #openttd
02:08:26 *** Guest3131 has quit IRC
02:39:59 *** KouDy has joined #openttd
02:57:56 *** chomwitt has quit IRC
03:07:36 *** glx has quit IRC
03:37:38 *** supermop_work has joined #openttd
03:45:59 *** KouDy has quit IRC
03:57:46 *** Supercheese has quit IRC
03:58:04 *** Supercheese has joined #openttd
04:27:21 *** muffindrake2 has joined #openttd
04:29:13 *** muffindrake1 has quit IRC
05:08:11 *** KouDy has joined #openttd
05:18:59 *** Flygon has joined #openttd
05:35:49 *** HerzogDeXtEr1 has joined #openttd
05:42:48 *** HerzogDeXtEr has quit IRC
06:02:05 *** KouDy has quit IRC
06:15:16 *** KouDy has joined #openttd
07:23:11 *** Supercheese has quit IRC
07:28:37 *** sla_ro|master has joined #openttd
07:33:09 *** Pikka has joined #openttd
07:42:13 *** Thedarkb-X40 has quit IRC
07:42:52 *** Thedarkb-X40 has joined #openttd
07:47:24 *** Thedarkb-X40 has quit IRC
07:47:31 *** Thedarkb-X40 has joined #openttd
07:50:24 *** Alberth has joined #openttd
07:50:24 *** ChanServ sets mode: +o Alberth
08:10:58 *** nielsm has joined #openttd
08:15:57 *** Wacko1976 has joined #openttd
08:23:30 *** snail_UES_ has quit IRC
08:24:03 *** Wacko1976 has quit IRC
08:30:42 *** andythenorth has joined #openttd
08:33:27 <andythenorth> o/
08:40:11 <Alberth> moin
08:40:55 <Pikka> o/
08:44:51 *** sim-al2 is now known as Guest3144
08:44:52 *** sim-al2 has joined #openttd
08:45:40 <andythenorth> is it done then Pikka?
08:45:49 <Pikka> more or less
08:45:50 <andythenorth> it's nice to play a game with
08:45:59 <andythenorth> better than playing MP with humans :P
08:46:12 <andythenorth> it's not very good at amusing chat though
08:46:33 <Pikka> true
08:47:00 <andythenorth> I had 2 of them in my game
08:48:44 <Pikka> two is a good number
08:48:54 *** Guest3144 has quit IRC
08:49:30 <Pikka> and they seem to be a little less prone to traffic jams now that they don't build bus stops on top of each other. maybe.
08:57:25 * andythenorth looks in game
08:58:12 <andythenorth> they've made some 30 tile jams, but nothing deadlocked
08:58:22 <andythenorth> they're not competing in the same cities, which helps
09:04:16 <Alberth> and not in city that you serve :)
09:13:06 <andythenorth> I serve it with trains
09:13:12 <andythenorth> they grow it with buses :P
09:13:45 <Alberth> :)
09:17:38 <andythenorth> what laptops do people buy now?
09:17:51 * andythenorth has no idea how to know which ones are good
09:17:56 <andythenorth> it used to be 'just buy Dell'
09:18:50 * andythenorth on the HP store, very confusing
09:20:08 <debdog> https://minifree.org/product/libreboot-t400/
09:22:10 *** Progman has joined #openttd
09:24:43 <andythenorth> dissapointingly 'best high end laptops' reviews are saying buy a mac :x
09:25:24 <andythenorth> or a Surface
09:25:38 <andythenorth> but Surface has ridiculous failure rate due to silly engineering
09:44:19 *** chomwitt has joined #openttd
09:46:48 <peter1138> debdog, what is this, 2006?
09:51:05 <andythenorth> I found some kind of Lenovo thing
09:52:07 <andythenorth> same crap battery life as what I've got though ~55 watt hours
09:52:34 <andythenorth> based on 'what laptop to buy in 2018' reviews, it's not currently possible to buy a good laptop of any kind :P
09:56:03 <nielsm> the personal computer is dying
09:57:01 <andythenorth> we have ipad pros for the kids
09:57:05 <andythenorth> they're awesome
09:57:12 <andythenorth> unless you want to type, or use a real OS
09:57:33 <andythenorth> although the plugin keyboard solves typing :P
09:57:42 <nielsm> rent a server somewhere and use a chromebook as thin client
09:57:43 <andythenorth> but iOS is total crap
09:58:01 <andythenorth> I could get a VT220 terminal :P
09:58:09 <andythenorth> one colour, saves on GPU
10:12:52 <peter1138> Er, what does it mean when you have a DirDiff of 5?
10:22:42 *** Wacko1976 has joined #openttd
10:29:54 *** sim-al2 has quit IRC
10:34:46 *** Progman has quit IRC
10:35:14 *** KouDy has quit IRC
10:37:02 *** Wacko1976 has quit IRC
10:38:37 <peter1138> Cool, got it working.
10:39:31 <Eddi|zuHause> dirdiff is in 45° steps, so you have 8 steps for 360°?
10:39:56 <peter1138> Yeah, it means 135 deg rotation, but those are not listed in the enum for some reason.
10:40:59 <Eddi|zuHause> maybe it assumed some kind of normalization?
10:41:06 <peter1138> Possibly.
10:41:20 <peter1138> Hmm, awkard, there's a 1 position shift :S
10:42:10 *** KouDy has joined #openttd
10:45:42 <peter1138> The enum documents that it only contains 6 of the 8.
10:45:51 <peter1138> And you can just add together to get the remaining two.
10:45:53 <peter1138> Seems odd :p
11:01:10 <peter1138> Oh, interesting.
11:01:32 <peter1138> I accidentally made it so that the viewport is only refreshed every MILLISECONDS_PER_TICK.
11:02:00 <peter1138> That means in FFWD with no much going on, several game ticks happen before anything is drawn.
11:02:11 <peter1138> Super-FFWD!
11:02:13 <andythenorth> is it super fast? o_O
11:02:23 *** Fuco has joined #openttd
11:03:13 <Eddi|zuHause> that doesn't sound too unreasonable
11:03:33 <peter1138> http://fuzzle.org/~petern/ottd/superffwd.png
11:03:59 <peter1138> There's a bit of income there :p
11:05:01 <peter1138> I changed the income text to move in realtime as well, so yeah, it sticks around.
11:05:02 <michi_cc> Bah, who disallowed using µ in OTTD sources?
11:05:08 <peter1138> Is it disallowed?
11:05:32 <michi_cc> "b/src/music/dmusic.cpp:37: Non-ASCII found:"
11:05:33 <peter1138> Hmm, oh, maybe there's some test about ASCII or something. Probably an oversight?
11:05:38 <michi_cc> It's in a comment.
11:06:28 <Eddi|zuHause> we discussed the possibility of allowing utf-8 in code files recently
11:06:58 *** frosch123 has joined #openttd
11:07:03 <andythenorth> bbbls
11:07:04 <Eddi|zuHause> no idea what came out of it
11:07:06 *** andythenorth has quit IRC
11:08:23 <peter1138> michi_cc, changes to src/debug.cpp too?
11:10:08 <michi_cc> Was too lazy to do another PR for that.
11:10:16 <peter1138> o_O
11:14:37 <peter1138> Hmm, I wonder if I can prevent ships driving into the dock after finishing loading.
11:15:23 <Eddi|zuHause> by allowing ships to turn inplace and pathfinding in all directions on start?
11:16:38 <nielsm> michi_cc, I'm not entirely sure, but I think the reason my "Sleep(100) hack" works for making all-notes-off actually transmit when the game exits in current dmusic player is just that it allows other threads to process messages, i.e. lets whatever background thread dmusic uses also run its message loop a few times
11:16:51 <nielsm> so it shouldn't need to depend on anything actual timing-related
11:16:59 <nielsm> in fact even Sleep(0) might be enough
11:17:35 <peter1138> Eddi|zuHause, I've got the turn in place thing working.
11:18:30 <peter1138> Pathfinding only happens on a new tile, the issue is loading also happens on a new tile, and once it's finished loading, it's now on that tile and is permitted to travel across it... (into the dock)
11:20:07 <michi_cc> nielsm: Whatever performance Stop does, I couldn't exactly replicate it anyway because I fail to see how to stop an already submitted buffer. As such, the new TransmitNotesOff does a sleep anyway.
11:20:50 <peter1138> Hmm, actually loading happens once it's in the new tile. Maybe doing it before would help.
11:21:51 <nielsm> michi_cc: ahh
11:24:03 <Alberth> so a switch from eg NE to N is first straight to the edge and then diagonal?
11:24:30 <michi_cc> nielsm: I don't own a HW synth though, so it of course might not work like I think it works :)
11:25:57 <nielsm> michi_cc I think it might be okay to also just let dmusic only support the softsynth, and leave hardware synth support to the win32 driver
11:28:33 <peter1138> Oh, found a simple solution. When finished unloading, just force a reverse.
11:28:46 <peter1138> Ideally it should only do that if it's directly facing the dock though.
11:28:58 <nielsm> this sounds dumb, routing midi out to my cheap electric piano, it only has 10 instruments or so, so most things get mapped to piano
11:29:36 <peter1138> nielsm, should I've plug my synth in? It's only got 8 voices, and it's analogue modelling...
11:30:11 <peter1138> Looks a lot better when reversing after docking anyway
11:30:54 <peter1138> Just need to check if the current direction matches the dock direction? Hmm.
11:34:07 <nielsm> http://0x0.st/se6B.MP3 <-- mic-to-speakers recording so also features some bonus bird peeping
11:35:40 <Alberth> tile + 1 == dock :)
11:35:51 <Eddi|zuHause> peter1138: maybe you should still just perform pathfinding in both directions, like when deciding for trains whether they should reverse in station?
11:36:16 <Alberth> preparing for drive-through docks
11:36:18 <peter1138> Eddi|zuHause, no point, if it's facing the dock there'll never be a path.
11:36:39 <peter1138> Alberth, hahah
11:36:59 <nielsm> peter1138: playing GM music through totally inappropriate synths is part of the fun!
11:37:28 <peter1138> nielsm, I had a Gravis Ultrasound back in the day. It was supposedly really good but lack of memory made *everything* a compromise.
11:38:01 <peter1138> I had the 256KB model. The 1MB model was a lot better. Percussion tendded to lose out on the smaller one.
11:38:18 <Eddi|zuHause> peter1138: yeah, but it'll catch other cases like dock-in-river where the ship is maybe continuing on the river but maybe turning back?
11:38:28 <nielsm> my first decent-sounding midi synth was an AWE64
11:38:48 <nielsm> I believe I still have the card, but not sure if it works (and don't have a PC with ISA slot anyway)
11:38:50 <Eddi|zuHause> i had an AWE32
11:38:53 <peter1138> Hmm, ok. Doesn't need to pathfind though. Just check if the next tile is traversable.
11:41:53 <michi_cc> nielsm: It doesn't sound too bad, John Broomhall seems to have done quite a good job :)
11:42:34 <nielsm> damn the brass parts sound so nice on the SC-55 :)
11:42:44 <nielsm> also the bass
11:43:53 <Eddi|zuHause> i remember being totally blown away by one of the midi demos that came with the AWE32
11:44:50 <Eddi|zuHause> (before that the only sound i had was from the speaker)
11:50:52 <peter1138> Yay, working.
11:51:11 <peter1138> Hmm, should we have a NewGRF property... turning speed. :p
11:54:16 *** iSoSyS has joined #openttd
12:00:20 *** gelignite has joined #openttd
12:01:50 <peter1138> Do ships drive or sail?
12:02:00 <peter1138> I'll go with move :p
12:02:21 <Alberth> +1
12:03:11 *** Gja has joined #openttd
12:05:47 <Eddi|zuHause> i'd prefer "drive" over "sail"
12:06:20 <peter1138> The old title game is saved with one of the hovercraft already heading into the dock.
12:06:30 <peter1138> I don't bother preventing that :p
12:09:28 <Alberth> :)
12:09:40 *** synchris has joined #openttd
12:10:00 *** Wormnest has joined #openttd
12:10:05 <Alberth> "float" :)
12:10:28 <nielsm> "go"!
12:10:36 <peter1138> Grr, twitch.tv has OpenTTD listed as "Open Transport Tycoon Deluxe" :(
12:10:39 <nielsm> or travel
12:11:02 <Eddi|zuHause> sue them? :p
12:17:52 <peter1138> Hmm, I think I need to use TrainExitDir
12:18:06 <peter1138> Which is static inline in train_cmd.cpp o_O
12:18:25 <peter1138> q
12:18:30 <peter1138> Oo, not vim.
12:21:03 <peter1138> Hmm, TileAddByDir is also not good enough when moving N
12:23:50 <peter1138> Ok, better.
12:25:28 <FLHerne> peter1138: Using exactly the order-distance limit isn't going to work well
12:25:51 <peter1138> FLHerne, probably needs a little extra, indeed.
12:25:57 <FLHerne> peter1138: If a boat happens to leave the dock going in the wrong direction, it'll immediately be over the limit and get lost :-/
12:26:39 <Eddi|zuHause> you can easily go 2*limit
12:27:21 <Eddi|zuHause> when the point is that there is *some* limit, it doesn't have to be so strict
12:31:35 <peter1138> Eddi|zuHause, the point of the limit is to reduce pathfinding cost, so 2* is a bit excessive.
12:37:42 *** andythenorth_ has joined #openttd
12:37:54 <peter1138> Right, that tweak works better. It didn't work on non-diagonal directions.
12:38:27 <andythenorth_> Pikka: so US Horse, just a GP40 then?
12:45:44 <peter1138> https://www.twitch.tv/peter1138 < yay stuck :p
12:51:30 *** andythenorth_ has quit IRC
12:51:49 *** andythenorth_ has joined #openttd
12:51:59 <andythenorth_> lawks
12:52:10 <andythenorth_> twitch crashed my phone :p
12:56:01 *** andythenorth_ has quit IRC
12:56:03 <peter1138> Oh no!
12:56:07 <peter1138> And I closed it now anyway.
12:56:36 *** andythenorth_ has joined #openttd
12:59:34 *** andythenorth_ has quit IRC
13:06:24 *** andythenorth_ has joined #openttd
13:09:20 <Pikka> lawks indeeed
13:32:20 <nielsm> I've spent almost £18,000 listening to music this game
13:32:50 <nielsm> (loan interest and "other" expenses for almost 8 years of game time doing nothing)
13:32:54 <peter1138> You can pretend you are an audiophool!
13:33:18 <peter1138> £18,000? That's just the oxygen-free directional power cable.
13:33:50 <Eddi|zuHause> "glutenfree","bio"?
13:34:00 <peter1138> Ok, when skipping drawing the viewport in the title game, months pass by at about the same rate as days when not skipping.
13:34:38 <Eddi|zuHause> you mean finally fast forward is actually fast?
13:35:08 <peter1138> Only when not much is going on.
13:35:20 <peter1138> The old title game is pretty minimal.
13:35:30 <peter1138> Pikka-update!"
13:35:32 <peter1138> -"
13:36:19 <Eddi|zuHause> peter1138: so actually, we will get more reports of "fast-forward is not fast", because now the discrepancy between empty map and full map is even bigger?
13:36:32 <peter1138> Right.
13:36:47 <peter1138> I'm going to fix this so it doesn't skip.
13:42:56 <peter1138> orudge, does your changes pile include Windows gesture support?
14:08:22 <Pikka> Pikka-update <- such as it is :P
14:08:33 <Pikka> too much uni this week
14:44:15 <michi_cc> nielsm: Thanks for the look.
14:44:42 <peter1138> michi_cc, building it now
14:46:53 <peter1138> Hmm, sounds different to the win32 driver.
14:47:04 <peter1138> Didn't expect that.
14:47:43 <peter1138> No reverb with win32.
14:47:43 <michi_cc> peter1138: The default DirectMusic synth is *not* the normal Windows MCI synth.
14:47:49 <peter1138> Ahh
14:47:55 <peter1138> :-)
14:48:36 <michi_cc> If both APIs had the identical soft synth backend, I wouldn't have bothered.
14:49:00 <nielsm> michi_cc, and it merged with my dosmusic branch easily as well, so all is good :)
14:50:00 <michi_cc> I think you had a small change to the dmusic driver writing out the smf file, that should be unnecessary then.
14:50:06 <nielsm> yes
14:50:24 <nielsm> instead it needs to check the music file type and call the MPS MIDI loader
14:50:37 <nielsm> maybe that part should also be abstracted...
14:50:47 <nielsm> or moved to midifile.cpp so it can be shared
14:50:56 <nielsm> +rather
14:52:05 *** andythenorth has joined #openttd
14:53:18 <peter1138> Hmm, someone posted the Doom music... isn't that somewhat copyrighted?
14:53:23 <nielsm> yeah
14:53:35 <nielsm> it shouldn't be on bananas
14:53:48 <andythenorth> how long is copyright now?
14:53:52 <andythenorth> probably longer than that
14:53:56 <nielsm> more than 25 years ;)
14:54:05 <andythenorth> it's 50 years since 1968 though eh
14:54:11 <andythenorth> time flies :P
14:55:46 <nielsm> michi_cc, when playing the TTO theme I get a little time compression at the very beginning, as if the first 200 ms or so are compressed into one instant
14:57:42 <Eddi|zuHause> some initialisation missing?
14:57:53 *** sim-al2 has joined #openttd
14:59:18 <nielsm> you don't hear it with the original_windows set since gm_tt00.gm has a bunch of delay at the beginning, but it's also slightly apparent in the Modern Motion theme
15:00:25 <nielsm> (to be fair, TTD DOS running in dosbox actually has a similar problem with songs hurrying a bit right at the beginning)
15:01:14 <nielsm> (hmm, I should make a utility to pack standard midi files into .cat format so you can use any music with ttd dos :)
15:01:39 <Eddi|zuHause> so just add some delay for all files you convert?
15:02:41 <nielsm> (alternatively, write a new music driver for ttd dos that calls something entirely different to play mp3's or whatever :D)
15:02:48 <michi_cc> nielsm: Can you try adding "playback_start_time += _playback.preload_time * MS_TO_REFTIME;" after line 675?
15:02:56 <Eddi|zuHause> TTOPatch?
15:05:28 <nielsm> trying
15:05:38 <nielsm> yeah that seems to fix it
15:08:46 <nielsm> btw, regarding the start/end point and loop flag, I have that in my win32 driver because of the other misc music fixes, the 6 latest commits here: https://github.com/nielsmh/OpenTTD/commits/newmusic
15:09:30 <nielsm> one of those is fixing the delays in the original_windows gm_tt00.gm file ;)
15:19:07 <peter1138> Hmm, okay, I kinda want a daylength patch ;(
15:23:36 *** Pikka has quit IRC
15:29:58 *** gelignite has quit IRC
15:50:04 <andythenorth> such daylength
16:02:02 <_dp_> hm, that reminds me of one more GS patch I wanted to do...
16:06:33 <peter1138> Looping the year? That would probably suffice.
16:07:04 <peter1138> Whew, my nose
16:07:11 <peter1138> Just made some horseradish.
16:08:53 <andythenorth> come back pikka
16:10:07 * andythenorth is planning north american Horse
16:12:15 <andythenorth> stuff like this is OP for most ottd games https://www.american-rails.com/images/WendoverWP402.jpg
16:12:27 <andythenorth> - nerf the stats?
16:12:37 <andythenorth> - leave it out? (there are plenty of smaller trains)
16:12:51 <andythenorth> - nerf the freight wagon capacity to force longer trains?
16:13:03 <peter1138> erm
16:13:27 <peter1138> But it looks cool
16:17:41 <_dp_> peter1138, nah, setting engine availability flags
16:20:59 <andythenorth> - advise freight weight multiplier
16:21:03 <andythenorth> or chibi everything
16:22:54 *** sim-al2 has quit IRC
16:28:09 <nielsm> just make it intensely expensive so it's only worth using with 15+ tile length trains?
16:28:30 <andythenorth> how many 15+ tile stations do you build? o_O
16:28:40 <nielsm> (and maybe have a setting flag for the newgrf to disable ultra heavy duty machines)
16:28:53 <nielsm> some multiplayer games may want to do that...
16:28:56 <andythenorth> I have screenshots somewhere of games where I used to build massive stations
16:29:05 <andythenorth> then co-op bullied me into TL 5
16:31:17 <peter1138> Silly.
16:32:03 <peter1138> Strange, getting tons of ICU crashes :(
16:32:25 *** KouDy has quit IRC
16:32:53 <peter1138> When do we get savegame cloud-storage? :p
16:33:39 * andythenorth shouldn't draw pixels with sunglasses on
16:55:50 *** gelignite has joined #openttd
16:56:01 <_dp_> freight multiplier? I'd rather see a divider :p
16:56:27 <_dp_> passengers are op even without multiplier
16:57:36 <andythenorth> because payment rates? o_O
16:57:50 <andythenorth> or because they're usually payment for both legs of journey?
16:58:29 <_dp_> both
16:58:33 <_dp_> also weight less
16:58:51 <nielsm> or because passengers are generated in absurd amounts compared to town size?
16:59:05 <_dp_> and that too)
17:02:56 <peter1138> LordAro, nice riding
17:03:39 <LordAro> :)
17:04:09 <peter1138> Typical that I get a minor lurgy this lovely weekend :(
17:04:23 <LordAro> :(
17:04:23 <peter1138> Went out yesterday but had no energy.
17:05:31 <FLHerne> andythenorth: I often see max-length trains for steel/goods in MP games
17:05:51 <LordAro> peter1138: a felt a bit meh friday/saturday, luckily didn't progress at all
17:06:22 <LordAro> https://jguegant.github.io/blogs/tech/meta-crush-saga.html hmmmm
17:06:29 <FLHerne> (those tend to have much more centralised/long-distance/efficient networks than SP, for reasons)
17:06:59 <FLHerne> Not sure people would use Horse in such games, though
17:07:37 <FLHerne> (ftr, the last time I built a 15-tile station was yesterday evening on the Reddit server :P)
17:11:48 <_dp_> someone should do a fast food grf
17:12:03 <_dp_> that increases passengers weight with the amount of industries on the map
17:15:08 <peter1138> Hmm, is there a script that will add roads between towns on start up?
17:18:56 <_dp_> there was something like that somewhere
17:23:57 *** KouDy has joined #openttd
17:24:11 <frosch123> there are multiple, i think also pikka wrote one
17:24:19 <frosch123> some are gs, some are ai
17:34:05 *** ToBeFree has joined #openttd
17:36:30 <LordAro> frosch123: is there a particular reason the attributes of CompanyProperties are ordered the way they are? they seem inconsistent
17:38:20 *** ToBeFree has quit IRC
17:39:56 <peter1138> Probably just the order they were in Company?
17:40:22 <frosch123> original order by cs, then people added stuff where they liked
17:40:32 <frosch123> anyway, it does not look that bad to me
17:40:46 <LordAro> name_2 & name_1 are backwards
17:41:00 <LordAro> and i'd probably put them after name anyway
17:41:04 <LordAro> similar for president_name
17:41:27 <frosch123> in those cases, i would not even trust the comments :p
17:41:42 <frosch123> names are magic, which got changed at least twice
17:41:59 <LordAro> hehe
17:42:10 <LordAro> fair enough
17:51:32 *** Thedarkb1 has joined #openttd
17:55:55 <andythenorth> 40% sprites done for Horse :P
17:56:43 * LordAro notes that INVALID_COMPANY == INVALID_OWNER == COMPANY_SPECTATOR
17:56:47 <LordAro> i guess that makes sense
18:01:27 *** KouDy has quit IRC
18:16:19 <LordAro> frosch123: any particular reason for MemCpyT?
18:16:37 <LordAro> in my perfect world, it wouldn't exist at all - std::copy does everything you need it to
18:16:54 <LordAro> (and you also recommended copy_backward later)
18:17:38 <frosch123> memcpy is for pod, std::copy is for non-pod
18:18:05 <frosch123> i would expect using std::copy in the blitter makes ottd unplayable in non-optimised build
18:18:36 <frosch123> memcpy a big block is different to looping and copying 4 bytes at a time
18:18:48 <LordAro> do they not compile to the same code?
18:19:38 <LordAro> https://stackoverflow.com/q/4707012/995325
18:20:04 <LordAro> which is admittedly using -Ofast
18:23:01 <LordAro> https://godbolt.org/g/QMB7Ko godbolt appears to agree
18:23:11 <frosch123> i would expect std::copy to always copy blocks of size of the structure
18:23:17 <frosch123> while memcpy may do bigger blocks
18:23:28 <frosch123> (without optimisation)
18:24:11 <LordAro> i remain unconvinced :p
18:24:58 <frosch123> https://gcc.godbolt.org/#g:!((g:!((g:!((h:codeEditor,i:(j:1,lang:c%2B%2B,source:%27%23include+%3Calgorithm%3E%0A%23include+%3Ccstring%3E%0A%0Astruct+data%0A%7B%0A++int+x,+y%3B++++%0A%7D%3B%0A%0Avoid+foo(data+*a,+data+*b,+size_t+n)%0A%7B%0A++++memcpy(b,+a,+n)%3B%0A%7D%0A%0Avoid+bar(data+*a,+data+*b,+size_t+n)%0A%7B%0A++std::copy(a,+a+%2B+n,+b)%3B%0A%7D%27),l:%275%27,n:%270%27,o:%27C%2B%2B+source+%231%27,t:%270%27)),k:50,l:%274%27,n:%270%27,o:%27%
18:24:59 <frosch123> 27,s:0,t:%270%27),(g:!((h:compiler,i:(compiler:g81,filters:(b:%270%27,binary:%271%27,commentOnly:%270%27,demangle:%270%27,directives:%270%27,execute:%271%27,intel:%271%27,trim:%271%27),lang:c%2B%2B,libs:!(),options:%27-O1%27,source:1),l:%275%27,n:%270%27,o:%27x86-64+gcc+8.1+(Editor+%231,+Compiler+%231)+C%2B%2B%27,t:%270%27)),k:50,l:%274%27,n:%270%27,o:%27%27,s:0,t:%270%27)),l:%272%27,n:%270%27,o:%27%27,t:%270%27)),version:4 <- without
18:25:01 <frosch123> optimisation
18:25:04 <frosch123> oops, long link :p
18:25:09 <LordAro> haha
18:25:13 <frosch123> well, your link, but without "-O1"
18:25:26 <LordAro> true
18:25:39 <frosch123> so, imho blitter also needs to run fast when not optimising
18:27:01 <LordAro> Error: Assertion failed at line 91 of /home/lordaro/dev/openttd/src/tile_map.h: tile < MapSize()
18:27:15 <LordAro> turns out initialising some properties to their "invalid" values didn't go so well
18:28:17 *** Ttech has quit IRC
18:39:06 *** glx has joined #openttd
18:39:06 *** ChanServ sets mode: +v glx
18:40:53 <LordAro> frosch123: i notice no significant difference if i swap the memcpy call inside MemCpyT with std::copy
18:41:26 *** Ttech has joined #openttd
18:44:45 *** iSoSyS has quit IRC
18:45:06 *** snail_UES_ has joined #openttd
18:45:16 *** andythenorth has quit IRC
18:45:20 *** pjpe has joined #openttd
18:57:25 *** KouDy has joined #openttd
19:01:25 *** Flygon has quit IRC
19:19:37 *** snail_UES_ has quit IRC
19:19:59 <LordAro> ew, TinyEnumT
19:20:08 <LordAro> that can be immediately wiped out with c++11
19:21:41 <LordAro> frosch123: any idea about the error on 6781? it doesn't seem to make sense, and my compilers don't error
19:23:05 <peter1138> avail_railtypes was removed.
19:23:32 <peter1138> CI is building it rebased to master.
19:23:48 <LordAro> but i rebased to master?
19:23:52 * LordAro tries again
19:24:05 <peter1138> Is your master up to date?
19:24:23 <LordAro> i rebased to origin/master
19:24:34 <LordAro> but apparently that doesn't mean it gets fetched
19:24:41 <peter1138> Is your origin/master up to date? :p
19:24:52 <LordAro> it would seem not
19:46:34 <LordAro> i like how github now can't order the commits properly
19:48:52 *** Wacko1976 has joined #openttd
19:52:51 *** synchris has quit IRC
19:53:34 *** synchris has joined #openttd
20:02:04 <peter1138> Could you not just set everything to 0?
20:02:20 <peter1138> That's what the memset does, right?
20:03:12 <LordAro> yeah, but they don't seem like the right values
20:03:22 <LordAro> as some of them are "valid", even if they've not been set
20:04:06 <peter1138> It's just awkward because it's gone from a patch to just make it compile without warnings on gcc8, to changing functionality.
20:04:18 <peter1138> Everything creeps :)
20:04:22 <LordAro> hehe
20:04:29 <LordAro> shouldn't be any change in functionality
20:08:25 <peter1138> src/widget_type.h has some strangeness. this->disp_flags = lowered ? SETBITS() : CLRBITS();
20:08:50 <peter1138> this->disp_flags = is not necessary?
20:09:27 <peter1138> Dunno if ternary that ignores value is permitted though.
20:10:58 <LordAro> it's fairly nasty regardless
20:12:10 *** kais58 has quit IRC
20:12:41 <peter1138> Hmm, forums are pretty quiet.,
20:18:16 *** kais58 has joined #openttd
20:20:08 <V453000> ded
20:24:16 <peter1138> Oh
20:34:50 <peter1138> Bah, two horses, one slow, one with barely any health :(
20:39:30 *** tokai has joined #openttd
20:39:30 *** ChanServ sets mode: +v tokai
20:42:41 *** KouDy has quit IRC
20:46:23 *** tokai|noir has quit IRC
20:55:19 *** Gja has quit IRC
21:09:43 *** Thedarkb1 has quit IRC
21:28:26 <peter1138> Hmm. Gone quiet here now, I suppose.
21:29:32 *** synchris has quit IRC
21:32:51 <peter1138> Is 32 cargo types enough?
21:35:32 <nielsm> what's the cost of extending to 256?
21:38:08 *** sla_ro|master has quit IRC
21:39:19 <nielsm> (apart from unwieldy UI)
21:39:30 <peter1138> :-)
21:39:43 <peter1138> Not sure. It's not stored on the map so feasible.
21:39:49 <Alberth> I believe andy thinks so
21:40:04 <peter1138> I think for the moment I will just replace uint32 -> CargoTypes
21:40:16 <peter1138> (which will be typedef uint32)
21:53:21 <Alberth> good night
21:53:28 <peter1138> Night
21:53:33 *** Alberth has left #openttd
21:55:41 <V453000> :( Finally a fun thread and TB locks it
21:55:55 <peter1138> That was so last week!
21:57:41 *** Thedarkb1 has joined #openttd
21:58:20 *** andythenorth has joined #openttd
21:59:48 <peter1138> Speaking of which!"
22:00:53 <V453000> oh.
22:05:37 *** Gja has joined #openttd
22:10:14 <andythenorth> peter1138: I don't see need for more
22:10:18 <andythenorth> 32 is a sweet spot
22:10:26 <peter1138> Indeed.
22:10:32 <andythenorth> more, and things like refit menu, cargo menus etc get horrible
22:17:00 <andythenorth> I ran up against the (old) industry limit quite hard, I've never hit the cargo limit
22:17:40 <andythenorth> biggest economy has one slot free http://bundles.openttdcoop.org/firs/push/LATEST/docs/html/economies.html#extreme
22:21:59 *** KouDy has joined #openttd
22:42:18 *** gelignite has quit IRC
22:46:38 *** iSoSyS has joined #openttd
23:02:36 <peter1138> Woo, crashes!
23:05:10 <andythenorth> congrats
23:05:14 <andythenorth> not ICU?
23:05:44 <peter1138> No. That was earlier.
23:10:00 *** sim-al2 has joined #openttd
23:23:45 *** andythenorth has left #openttd
23:36:38 *** Eddi|zuHause2 has joined #openttd
23:42:18 *** Eddi|zuHause has quit IRC
23:45:33 *** Wacko1976 has quit IRC
23:52:00 *** iSoSyS has quit IRC
23:53:16 *** Thedarkb-X40 has quit IRC
23:53:41 *** Thedarkb-X40 has joined #openttd