Log for #openttd on 3rd April 2016:
Times are UTC Toggle Colours
00:15:29  *** Quatroking [] has quit [Read error: Connection reset by peer]
00:15:45  *** FLHerne [] has quit [Quit: There's a real world out here!]
00:16:53  *** Hiddenfunstuff [] has quit [Quit:  HydraIRC -> <- *I* use it, so it must be good!]
00:18:02  *** Eddi|zuHause [] has joined #openttd
00:39:01  *** Samu [] has quit [Quit: Page closed]
00:46:22  *** Eddi|zuHause [] has quit []
00:52:27  *** Eddi|zuHause [] has joined #openttd
01:03:00  *** Snail [] has joined #openttd
01:33:49  *** Snail [] has quit [Quit: Snail]
01:55:03  *** LadyHawk [] has quit [Read error: Connection reset by peer]
01:56:29  *** LadyHawk [] has joined #openttd
02:57:26  *** glx [] has quit [Quit: Bye]
03:24:33  *** liq3 [] has quit []
03:51:19  *** HerzogDeXtEr1 [] has quit [Read error: Connection reset by peer]
03:58:16  *** Snail [] has joined #openttd
04:04:11  *** Snail [] has quit [Quit: Snail]
04:10:47  *** Ketsuban [~ketsuban@2a02:c7d:a34a:9000:35e4:4b:13e:e068] has quit [Quit: Leaving]
04:13:11  *** Snail [] has joined #openttd
04:17:03  *** Snail [] has quit []
04:21:40  *** Snail [] has joined #openttd
04:46:29  *** _johannes [] has joined #openttd
05:02:55  *** Ketsuban [~ketsuban@2a02:c7d:a34a:9000:a08f:babc:787b:40e5] has joined #openttd
05:12:18  *** Snail [] has quit [Quit: Snail]
06:00:36  *** sla_ro|master [slamaster@] has joined #openttd
06:17:21  *** Alberth [~alberth@2001:981:c6c5:1:be5f:f4ff:feac:e11] has joined #openttd
06:17:24  *** mode/#openttd [+o Alberth] by ChanServ
06:34:31  *** Arveen [] has joined #openttd
06:45:31  *** Ketsuban [~ketsuban@2a02:c7d:a34a:9000:a08f:babc:787b:40e5] has quit [Quit: Leaving]
06:50:23  *** andythenorth [] has joined #openttd
06:50:32  <andythenorth> o/
06:58:43  *** Progman [] has joined #openttd
07:04:51  *** andythenorth [] has quit [Ping timeout: 480 seconds]
07:05:00  *** Supercheese [] has quit [Quit: Valete omnes]
07:07:47  <Alberth> moin andy
07:51:06  *** andythenorth [] has joined #openttd
07:55:03  *** Hiddenfunstuff [] has joined #openttd
07:57:04  *** Wolf01 [] has joined #openttd
07:57:37  <Wolf01> o/
08:03:02  <Alberth> hi hi
08:08:45  <_johannes> Can there be trains that are engines but have unit number 0 ?
08:10:35  <_johannes> ah, if the train has multiple engines, the others can have id 0
08:27:59  *** sla_ro|master [slamaster@] has quit []
08:35:00  *** Clockworker_ [] has joined #openttd
08:42:20  <andythenorth> stupid alumninium plant
08:42:23  <andythenorth> is unbalanced
08:42:34  *** Clockworker__ [] has quit [Ping timeout: 480 seconds]
08:43:06  <andythenorth> :D
09:00:12  <Alberth> add more buildings :p
09:04:17  <Wolf01> o/
09:06:04  <Wolf01> lol andy, I got 300 more vip points as excuse reward because I just asked why the inversion switch was removed from the power functions switch
09:06:33  <Wolf01> official answer " The version of the LPF Control switch with the control direction switch on is discontinued and replaced by a newer version without this switch. The reason for removing the switch in the newer version is that it was not used often and had quite a cost overhead"
09:06:46  *** andythenorth [] has quit [Ping timeout: 480 seconds]
09:06:59  <Wolf01> ;_; andy
09:20:46  *** frosch123 [] has joined #openttd
09:21:02  *** MonkeyDrone [~Monkey@] has joined #openttd
09:28:25  *** Quatroking [] has joined #openttd
09:31:34  *** ConductCat [] has joined #openttd
09:38:21  *** ConductorCat [] has quit [Ping timeout: 480 seconds]
09:53:04  *** andythenorth [] has joined #openttd
09:54:05  <andythenorth> ho
09:54:13  * andythenorth ‘won’ Silicon Valley in 42 years
09:54:17  <andythenorth> just missed bronze :P
09:59:21  *** tokai|noir [] has joined #openttd
09:59:24  *** mode/#openttd [+v tokai|noir] by ChanServ
10:00:37  <frosch123> cookies are the best, you can eat them :)
10:01:13  <andythenorth> so I need to get subtype into GetTileTrackStatus_Road
10:01:27  <andythenorth> seems stuffing submode parameter is better than adding another parameter?
10:01:36  <frosch123> definitely :)
10:01:46  <frosch123> because it is shared with rail and ship
10:01:51  <andythenorth> hmm
10:02:24  <frosch123> you could change all of them into a struct ofc
10:03:01  <andythenorth> that’s just words to me right now :D
10:03:16  <andythenorth> not sure if I patch veh.compatible_roadtypes (probably not)
10:03:29  <andythenorth> or find all places RVs call GetTileTrackStatus
10:03:33  <andythenorth> and patch those calls
10:03:56  <andythenorth> seems more like the latter
10:06:03  <frosch123> i think you already patched all of them :p
10:06:19  *** tokai [] has quit [Ping timeout: 480 seconds]
10:07:12  <andythenorth> nah, not yapf and npf ones yet
10:07:32  <andythenorth> nor overtaking :x
10:11:14  <andythenorth> hmm only 22 uses of compatible_roadtypes
10:11:24  <andythenorth> can I stuff that and leave all the other things alone? o_O
10:11:53  *** Wormnest [] has joined #openttd
10:11:55  <andythenorth> compatibility is a union of mode (tram / road) and subtype
10:12:07  <andythenorth> unrelated, ROADTYPE would be better renamed MODE or so :P
10:25:33  <frosch123> if you add some INVALID roadtype and tramtype, you likely do not need the RoadTypes in the submode
10:29:12  *** Nathan1852 [] has joined #openttd
10:35:25  *** Defaultti [] has quit [Quit: Quitting.]
10:36:49  *** Defaultti [] has joined #openttd
10:41:01  <andythenorth> hmm
10:41:13  <andythenorth> don’t I need them to get the right set of track bits?
10:42:17  <frosch123> TypeError: endswith first arg must be bytes or a tuple of bytes, not str <- i don't get that
10:42:41  <frosch123>  changes = [w[3:] for w in changes if w.endswith(file_ext)] <- what is the first arg? "w" or "file_ext"?
10:45:33  <Alberth> w
10:45:45  <Alberth> x.f(y)  <-->  f(x, y)
10:45:58  <frosch123> to my understanding both "w" and "file_ext" should be strings
10:48:04  <frosch123> i may need to add a "universal_newlines=True" to subprocess.check_output
10:48:24  <Eddi|zuHause> the "first argument" of "x.blah(y)" is "x"
10:48:42  <andythenorth> is w bytes or string
10:48:54  <Alberth> you do,  check_output  has weird semantics for text-files if you don't provide that
10:49:03  <Eddi|zuHause> but that error makes not a lot of sense
10:49:16  <andythenorth> bytes.endswith() somehow?
10:49:24  <Alberth> I think it gets confused on a weird combination of bytes and str
10:50:08  <Eddi|zuHause> what if you try "str(w).endswith(...)"?
10:57:36  <frosch123> universal_newlines fixed it
10:57:49  *** Samu [] has joined #openttd
10:58:47  <frosch123> <- eints' first git commit :)
11:00:50  <Eddi|zuHause> so that's a "it works \o/"?
11:01:29  <frosch123> i guess so
11:01:43  <frosch123> i just learned about ssh ControlMaster though, so maybe i can speed up eints scritps a lot
11:08:26  <frosch123> hmm, it slowed it down from 30s to 160s?
11:08:33  <frosch123> what :p
11:11:34  <andythenorth> biddle bobble
11:15:39  <andythenorth> compatible_roadtypes returns RoadTypes not RoadType?
11:15:50  * andythenorth assumes from reading it
11:21:18  <andythenorth> but RoadTypeToRoadTypes takes just one roadtype
11:21:22  * andythenorth confused
11:28:20  <frosch123> compatible_roadtypes makes little sense with your patch
11:28:43  <frosch123> you define compatiblity on subtype level, while road and tram are always separate
11:32:03  <andythenorth> so I can replace it
11:32:28  <andythenorth> but I need to preserve the bits for is road / is tram
11:34:40  <andythenorth> hmm if there are no compatible subtypes on the tile, that’s equivalent to ROADTYPES_NONE
11:35:20  <andythenorth> frosch123: so INVALID might be a subtype for each of roadtype and tramtype?
11:35:25  <andythenorth> 0 or so
11:36:40  <frosch123> usually 0xFF
11:43:33  *** andythenorth is now known as Guest10197
11:43:43  *** andythenorth [] has joined #openttd
11:44:39  <andythenorth> seems like I could patch compatible_roadtypes
11:44:54  <andythenorth> and return 1st bit as bool, road/tram, and then the subtype bits
11:45:02  <andythenorth> and that would be enough
11:45:15  <andythenorth> and for places that are looking only at road/tram, it’s a trivial fix
11:46:43  *** Guest10197 [] has quit [Ping timeout: 480 seconds]
11:47:18  <andythenorth> but RoadType and RoadTypes are enums, so now I am lost :D
11:47:34  <andythenorth> I know an enum is just a list, but how do I bitstuff that?
11:49:43  <Alberth> ?
11:50:52  <andythenorth> exactly :|
11:51:21  <Alberth> /me is mostly confused about "enum is a list" :)
11:51:59  <Alberth> but looking at the source, RoadType is a single roadtype, each with a number (0=road, 1=tram)
11:52:11  <Alberth> RoadTypes is the bitset already
11:52:14  *** liq3 [] has joined #openttd
11:53:11  <Alberth> roadtypes_road is the bitset with only road,  roadtypes_tram is the bitset with only tram, and roadtypes_all is the bitset with both road and tram
11:53:13  <andythenorth> I need to patch v->compatible_roadtypes
11:53:20  <andythenorth> which expects RoadTypeToRoadTypes
11:53:51  <andythenorth> which returns RoadTypes
11:54:18  <Alberth> ok
11:54:31  <andythenorth> not sure how I extend RoadTypes :)
11:54:46  <andythenorth> I want the first bit to be the roadtype, and the remaining bits to be the subtype
11:55:04  <andythenorth> ach, maybe I just don’t use RoadTypes
11:55:35  <Alberth> roadtypes has 2 bits now, 1 for road and 1 for tram
11:55:57  <Alberth> ie 4 possible values (nothing, only road, only tram, or both)
11:56:28  <Alberth> lots of aren't used yet, there :p
11:56:36  <Alberth> +bits
11:57:02  <Alberth> but maybe code expects only 2 bits always, which must be verified
11:57:13  <Alberth> and/or fixed
11:57:35  * andythenorth tries to understand
11:57:44  <andythenorth> when working with tiles, the RoadTypes structure makes sense
11:57:56  <andythenorth> but when working with vehicles, there can only be one roadtype
11:58:04  <andythenorth> this extensible structure is a dead end
11:58:17  <andythenorth> maybe
11:59:11  <andythenorth> road or tram is just a single bit
12:00:10  <Alberth> you can use a bitset with 1 bit set (ie  only road or only tram), or you can use a RoadType value
12:00:49  <andythenorth> can I pack the subtype bits into RoadTypes as well?
12:01:25  <Alberth> you can add a new field for the subtype
12:01:55  <Alberth> but existing code doesn't expect extra bits
12:02:23  <Alberth> so you need a masking function to pull just the current bitset out, and apply that everywhere
12:02:37  <Alberth> or at least check things don't break if you don't
12:02:43  <andythenorth> seems most efficient to change what compatible_roadtypes is doing
12:02:48  <andythenorth> and stop returning RoadTypes from it
12:02:59  <andythenorth> and instead return a bitset containing what I need
12:03:58  <Alberth> you can also make another bitset, but then we'll have 3 sets for road and tram :p
12:04:36  * andythenorth has brain ache :)
12:12:40  <Wolf01> if you want I can give you more :)
12:13:05  * Wolf01 waits another "connection reset by pear"
12:13:14  <Wolf01> or by beer
12:13:23  <Wolf01> sure is not peer
12:14:28  <Alberth> we'll wait for the message and see :p
12:15:07  <Wolf01> andythenorth: I've got an official response from lego about the new pf switch without the inversion switch, it's just to reduce the costs
12:15:55  <Wolf01> also I've got 300 more vip points because I only asked why they decided to change this
12:16:43  <Alberth> ask more questions :)
12:16:47  <Samu> I finally got what the hell is wrong with my research! 3 variables that I got to work with: slopes, edges and corners
12:17:25  <Samu> I was working with the slopes and corners the wrong way
12:17:54  <Wolf01> is there a right way to work with slopes and corners?
12:18:15  <Wolf01> (+5 points to griffindor)
12:18:40  <Samu> if I am seeing this right, the edge_offset has to be split into edge_offset and corner_offset
12:19:07  <Alberth> recursive splitting!
12:19:35  *** andythenorth [] has quit [Quit: andythenorth]
12:19:39  <Samu> it's hard to find what to do, but I'm getting somewhere
12:20:48  *** andythenorth [] has joined #openttd
12:24:13  *** gelignite [] has joined #openttd
12:24:24  <andythenorth> meh
12:24:55  <andythenorth> function_name(my_param = {tram_flag: False, subtype: 0})
12:25:01  <andythenorth> is all I want to do, but in C++
12:25:53  <Alberth> :)
12:26:18  <Alberth> where do you want that dictionary?
12:26:48  <andythenorth> in place of compatible_roadtypes
12:26:53  <Alberth> (probably not as dictionary, but in an enum or so?
12:27:27  *** HerzogDeXtEr [] has joined #openttd
12:27:46  <Alberth> RoadTypes compatible_roadtypes;    <-- change that type?
12:28:06  <andythenorth> I think so
12:28:16  <andythenorth> can I just use a uint and shift it? :P
12:28:41  *** MonkeyDrone [~Monkey@] has quit [Read error: Connection reset by peer]
12:29:12  <Alberth> hmm, field name would be wrong too, I guess
12:34:12  <andythenorth> the places that consume compatible_roadtypes are just looking for a bit currently
12:34:20  <andythenorth> seems over-engineered :)
12:36:29  * andythenorth biab
12:36:30  *** andythenorth [] has quit [Quit: andythenorth]
12:58:52  *** MonkeyDrone [~MonkDAce@] has joined #openttd
12:59:34  *** FLHerne [] has joined #openttd
13:04:56  <Eddi|zuHause> Wolf01: the best one i've seen yet is "Peer Gynt"
13:07:56  <Wolf01> hah poor guy :D
13:10:15  <Wolf01> I've never read that poem, but I think I've had it on my school book
13:11:05  <Eddi|zuHause> i only know the music...
13:16:49  <Wolf01> Yeah, the music is famous
13:23:49  <Wolf01> bah, I'm tired of making lego pantographs... need something else to do
13:27:23  *** norro_ [] has quit [Quit: - Chat comfortably. Anywhere.]
13:27:25  *** norro [] has joined #openttd
13:31:34  <Eddi|zuHause> get me a replacement pantograph for an old E69 model (in H0)
13:38:11  *** FLHerne [] has quit [Read error: No route to host]
13:38:14  *** FLHerne [] has joined #openttd
13:41:59  *** norro [] has quit [Remote host closed the connection]
13:42:03  *** norro [] has joined #openttd
13:42:16  *** norro [] has quit [Remote host closed the connection]
13:42:16  *** norro [] has joined #openttd
14:08:30  *** norro [] has quit [Remote host closed the connection]
14:16:04  *** Eddi|zuHause [] has quit []
14:23:30  *** Eddi|zuHause [] has joined #openttd
14:28:44  *** Eddi|zuHause [] has quit []
14:30:04  *** Eddi|zuHause [] has joined #openttd
14:47:40  *** andythenorth [] has joined #openttd
14:51:31  <Alberth>   hi hi, random-ish attempt to make an extended RT version, for inspiration :)
14:52:47  <Wolf01> :thumb_up:
14:53:41  * andythenorth is going to have to learn what an enum actually is
14:53:46  <andythenorth> google knows
14:56:01  * andythenorth needs a better google
14:56:09  <Wolf01> ask here
14:57:21  <andythenorth> it looks like a dumb class
14:57:35  * andythenorth struggling to see the purpose
14:59:11  <Alberth> enum does 2 things
14:59:33  <Alberth> 1:  introduce names for magic numbers
14:59:58  <Alberth> sort of const, but scales better for bigger amounts of constants
15:00:20  <andythenorth> this guide starts to make sense
15:00:42  <Alberth> 2: Introduce a type, so names are grouped under an umbrella
15:01:02  <andythenorth> is it odd to keep unrelated things in same enum?
15:01:05  * andythenorth assumes so
15:01:40  <Alberth> it is
15:01:56  <Alberth> hmm, negative numbers aren't actually allowed in an enum
15:03:54  <andythenorth> ok, so it makes sense to be able to write code using ROADTYPE_TRAM
15:04:14  <andythenorth> rather than checking a specific bit is 1 in 19 places
15:05:28  <andythenorth> so  ROAD_FOO_ROAD = 1 << ROADTYPE_ROAD
15:05:32  <andythenorth> is shifting by 0 or 1?
15:05:33  <Alberth> yep, it helps a lot, I'd say
15:06:03  <Alberth> don't understand the 0/1 question
15:06:19  <Alberth> lowest bit is numbered 0
15:06:49  <Alberth> 1 == (1 << 0)
15:07:12  <Alberth> 1 == 2**0
15:08:59  <andythenorth> trying to understand what RoadFoo does :)
15:09:50  <andythenorth> seems the subtypes would need to be in an enum for sanity
15:11:10  <Alberth> yup, uint8 is a bit blunt :p
15:11:35  <Alberth> you also likely don't have 256 subtypes
15:11:38  <andythenorth> no
15:11:43  <andythenorth> but there are two types of subtype
15:11:45  <andythenorth> tram and road
15:12:01  <Alberth> and you can have both at the same time?
15:12:04  <andythenorth> yes
15:12:17  <andythenorth> tram and road are completely independent, they happen to occupy same tile
15:12:49  <Alberth> make a "no road" sub-type, and a "no-tram" sub-type, and the road and tram bits can be removed
15:13:03  <Alberth> (lack of tram bit == "no-tram" sub-type)
15:13:30  <Eddi|zuHause> andythenorth: maybe you should further separate them in the code. so you have one data type TramType and one RoadType
15:13:35  <Alberth> so you only have road sub-type and tram sub-type
15:13:49  <Eddi|zuHause> then you don't have to fiddle with weird orthogonal combinations
15:13:57  <Eddi|zuHause> every tile gets a roadtype and a tramtype
15:14:06  <Alberth> +1
15:14:19  <andythenorth> that seems counter-intuitive to me, having read the code a lot :)
15:14:34  <andythenorth> RoadType is only used to distinguish between road and tram
15:14:49  <andythenorth> if they’re split, what do you use to distinguish them?
15:15:04  <Eddi|zuHause> what i named "roadtype" here would be the subtype
15:15:20  <andythenorth> i.e. there is much code of the type (ROADTYPE_ROAD ? 1 : 0)
15:15:34  <andythenorth> which is then used for RV or tram bits, movement code, drawing etc
15:16:15  <andythenorth> I considered splitting them, but it would mean copying all the functions redundantly, afaict
15:16:19  <andythenorth> much more legible though
15:16:20  <Eddi|zuHause> you could also replace all those by (IsRoadSubtype(subtype)?1:0)
15:16:39  <Eddi|zuHause> then have all subtypes as either a road or a tram type (defined by newgrf)
15:16:44  <andythenorth> that would be appealing, but it needs some way to map subtypes back to road or tram
15:16:53  <andythenorth> which I can’t conceive how to do
15:16:57  <Eddi|zuHause> then you have 16 subtypes, which the newgrf can divide up as it wishes
15:17:55  <andythenorth> yes
15:20:47  <andythenorth> all of the is beyond me right now tbh
15:21:09  <Eddi|zuHause> this is usually the point where you stop coding and start planning
15:21:41  <andythenorth> I think I have enough prototype thrown at the wall
15:22:08  <andythenorth> but I would like to get rid of current compatible_roadtypes use before I stop
15:22:24  <andythenorth> I don’t really understand it, nor what breaks if it is changed
15:22:37  <Eddi|zuHause> i can't help you with that
15:22:46  <andythenorth> nah
15:22:58  <andythenorth> I’ve set it to 0
15:23:06  <andythenorth> for stupidity, and now I need to find how it’s used
15:23:55  <andythenorth> maybe 1 is better
15:24:07  <andythenorth> ROADTYPE_ROAD seems to be 0 sometimes, and 1 other times
15:26:57  <andythenorth> yeah ok, changing current use of compatible_roadtypes breaks a bunch of stuff
15:27:17  <andythenorth> it relies on checking multiple bits to detect if vehicle is road or tram
15:27:33  <andythenorth> moving that to a flag in one bit doesn’t work
15:32:25  <andythenorth> the simplest thing would be simply to add a subtype parameter to all the get_tile_track_status_proc functions
15:32:31  <andythenorth> but that seems like total string
15:38:56  *** Ketsuban [~ketsuban@2a02:c7d:a34a:9000:1191:95f8:c397:ed86] has joined #openttd
15:39:05  *** andythenorth [] has left #openttd []
15:49:42  *** andythenorth [] has joined #openttd
15:49:53  <andythenorth> how do I count how many bits an enum uses?
15:51:12  <andythenorth> stack overflow says I shouldn’t try, it’s not safe
15:51:16  <andythenorth> but I need to know
15:52:38  <Alberth> at value level, or memory storage level (ie how many bytes the compiler gave the type)
15:53:08  <andythenorth> specifically I need to know how big compatible_roadtypes is
15:53:09  <Alberth> at value level, find the biggest number of the enum, and how many bits that number needs
15:53:14  <andythenorth> so I can shift some other bits alongside it
15:53:46  <andythenorth> that will be value level
15:54:19  <andythenorth> highest value is 255?
15:54:28  <Alberth> biggest number is 0xff (INVALID_ROADTYPES), ie 8 bits
15:55:05  <andythenorth> thanks
15:55:43  <andythenorth> frosch gave me the method to implement this specific part of the patch yesterday btw, but until I understand why, I understand nothing much :)
15:55:50  <andythenorth> and as yet, I understand nothing much :P
15:55:57  <Alberth> :)
15:56:09  <Alberth> that's where it always starts
15:56:37  <Alberth> exploding into nice generic solution also always happens :p
15:56:51  <andythenorth> it now makes sense why the sub_mode parameter to GetTileTrackStatus_Road should be “road_types | road_subtype << 8 | tram_subtype << 16"
15:57:16  <Alberth> needs parentheses
15:57:30  <andythenorth> yup :)
15:57:46  <andythenorth> only needs to be added in 11 places :P
15:57:59  <Samu> I could composite the edges of river tiles on slopes, but I have bad news :( the green color combinations of the edge stripes won't match... different greens
15:58:10  <Samu> what to do?
15:58:37  <Samu> need more greens!
15:58:49  <andythenorth> nah, it must be possible
15:59:03  <andythenorth> I drew the current river sprites, I was not short of greens
15:59:29  <Alberth> blues were a bigger problem I guess :p
15:59:33  <Samu> the stripes are aligned, but the scolors doesn't really look good
15:59:37  <Samu> colors*
15:59:39  <andythenorth> screenshot?
15:59:53  <Alberth> what's the value of road_subtype if road_types has no road bit?
16:00:00  <andythenorth> meaningless
16:00:06  <andythenorth> it defaults to 0
16:00:41  <andythenorth> currently I wouldn’t bother trying to read it anywhere, I’d check the road bit first
16:00:51  <Alberth> if you redefine 0 as "no road" you don't need the road bit of road_types
16:00:58  <Alberth> and similarly for tram bit
16:00:59  <andythenorth> yes
16:01:51  <andythenorth> lots of places use it, I think it’s a refactoring goal rather than a prototype
16:02:04  * andythenorth should write a spec and plan
16:02:17  <Alberth> fair enough
16:03:02  <andythenorth> hmm Arctic Basic is as popular as cold sick apparently
16:03:14  <andythenorth> can’t win em all :(
16:03:55  <Samu>
16:04:07  <Samu> i still dont have the water sprite
16:04:26  <Samu> and i didn't align corners yet
16:04:46  <andythenorth> what’s the problem with greens? o_O
16:04:48  <Samu> but the NE edge vs NW edge... the colors
16:04:59  <Alberth> ugh, "it is not realistic -> not good"  :(
16:05:01  <Samu> the different greens
16:05:14  <andythenorth> it’s not lit correctly
16:05:20  <andythenorth> the greens are available in the palette
16:05:35  <andythenorth> don’t worry about that too much at that moment, as long as you have the right pieces
16:05:46  *** Snail [] has joined #openttd
16:05:54  <andythenorth> if I was doing this, I’d actually draw pink / red / yellow / blue sprites, to avoid looking too much at the appearance
16:06:06  <andythenorth> and instead focus on getting the right sprite in the right place :)
16:06:58  <Samu> speaking of corners
16:07:06  <andythenorth> Alberth: I can’t see past the antagonistic stuff about car industries :P
16:07:10  <Samu> I don't have a N corner sprite :(
16:07:42  <Samu> well I have many N corner sprites, but not one that aligns well given those 2 edges configurations
16:07:44  <andythenorth> I’m not nationalistic, but UK car industry is ~same size as France, bigger than Italy.  Provocative assertions, based on wrong facts :|
16:08:01  <andythenorth> Samu: the sprites you need likely don’t exist yet
16:08:19  <andythenorth> if you try and composite existing riverbank sprites you’ll get the effect in the screenshot :)
16:08:43  <Alberth> it's arctic -> greenland -> has no car industries -> wrong
16:09:09  <andythenorth> they’re factually correct, maybe I just remove ‘inspired by’ :P
16:09:15  <Alberth> while in my view, it's good to have something different than the ever coal / wood thingies
16:09:40  <andythenorth> indeed :)
16:10:21  <andythenorth> so if road / tram bits went away and instead subtype 0 was “TRAM_NONE” or similar
16:10:22  <andythenorth> inline bool IsTram() { return IsRoadTT() && HasBit(RoadVehicle::From(m_veh)->compatible_roadtypes, ROADTYPE_TRAM); }
16:10:23  *** NGC3982 is now known as NGC1
16:10:25  <andythenorth> would be simpler no?
16:11:30  <Alberth> it would, less duplication of state, so simpler to manage. however I can see the point of making it work first
16:11:33  <Eddi|zuHause> that doesn't make a lot of sense
16:12:23  <andythenorth> Eddi|zuHause: as it currently exists?
16:12:26  <andythenorth> or my proposal?
16:12:40  <Eddi|zuHause> the "TRAM_NONE" thing
16:13:00  <andythenorth> does it make sense to drop the road / tram bits?
16:13:15  <Eddi|zuHause> "compatible_roadtypes" should probably be replaced by something derived from the newgrf, like for railtypes
16:13:55  <andythenorth> I don’t understand that tbh
16:14:14  <andythenorth> newgrf can’t change the definitions of ROADTYPE_ROAD and ROADTYPE_TRAM
16:14:26  <andythenorth> that’s well out of scope
16:14:36  <Eddi|zuHause> yes, but they can add more, that are either compatible to ROAD, TRAM or neither
16:14:42  <andythenorth> no they can’t
16:14:50  <andythenorth> well, not the way I’m planning to do it
16:14:52  <Eddi|zuHause> but they should become able to
16:14:55  <andythenorth> that’s a whole other ball game
16:15:17  <Eddi|zuHause> then i don't understand what you're trying to achieve
16:15:30  <andythenorth> why add more types?
16:16:01  <Eddi|zuHause> narrow gauge trams, broad gauge trams, subways, trails, whatever
16:16:12  <andythenorth> yes but that’s not what ROADTYPE does
16:16:37  <Eddi|zuHause> but maybe that's what it should do?
16:16:46  <andythenorth> I don’t see anyone ever achieving that tbh
16:16:50  <andythenorth> nobody has wanted to so far
16:17:39  <andythenorth> seems better to just stick with ROADTYPE_ROAD and ROADTYPE_TRAM as they exist
16:18:14  <Eddi|zuHause> so then what's the difference between tram subtypes?
16:19:04  <Eddi|zuHause> and why bother adding tram subtypes if you can't make them incompatible?
16:19:07  * andythenorth wonders about ROADTYPE_SUBWAY now
16:19:47  <andythenorth> doesn’t need drawing
16:19:55  <andythenorth> nothing to patch in the drawing functions...
16:20:00  <Wolf01> I have that feeling like "I should offer my help"
16:20:25  <Eddi|zuHause> you probably should cast that subway thought aside very quickly
16:20:37  <Eddi|zuHause> "subway" should simply be a tram built underground
16:20:46  <andythenorth> if I leave RoadTypes untouched, then it’s plausible that $someone can come along and add more types in future
16:21:20  * andythenorth wonders if that can be done whilst still eliminating the 2 road/tram bits
16:21:25  <Eddi|zuHause> the point was that you don't think about what types to add, but the newgrf does
16:21:32  <sim-al2> I don't know if roads can hide vehicles somehow, but subway probably wouldn't work if you can't
16:21:49  <andythenorth> just don’t draw them :)
16:22:00  <sim-al2> Ok fair enough
16:22:03  <Eddi|zuHause> sim-al2: there is a "fake subway" grf
16:22:22  <Wolf01> I also want highways
16:22:36  <andythenorth> ‘want’ :P
16:22:47  <andythenorth> my 6 year old wants ‘faster roads that cost more'
16:22:49  <Eddi|zuHause> Wolf01: that's easy, just implement objects with state machines
16:23:01  <andythenorth> I explained that speed is set by vehicle not road :P
16:23:04  <andythenorth> he still wants them
16:23:12  <Eddi|zuHause> andythenorth: i'd call that a "highway" :p
16:23:22  <Wolf01> eddi: like I never tried
16:24:20  <andythenorth> what do I rename compatible_roadtypes to if it contains both RoadTypes (first 8 bits) and subtypes (next 8 bits)
16:24:28  <Eddi|zuHause> Wolf01: well, it's done in 3 easy steps: 1) implement state machines for airports. 2) extend state machines for articulated vehicles. 3) add state machines to road stations and objects
16:24:30  <sim-al2> A roadtype with concrete barriers or guardrails might look close enough
16:24:51  <Wolf01> "easy"
16:24:55  <andythenorth> hmm I don’t know how to make the code non-specific to tram / road
16:25:08  <andythenorth> Eddi|zuHause: all the tram code is specific to trams, how would newgrf redefine that?
16:25:20  <andythenorth> or add it’s own movement code for new roadtypes?
16:25:30  * andythenorth can’t see it
16:25:31  <Eddi|zuHause> andythenorth: with a property flag "this behaves like a tram"
16:25:40  <andythenorth> but that’s still tied to trams
16:25:51  <Eddi|zuHause> andythenorth: look at how maglev is treated differently for rails (acceleration model)
16:26:03  <andythenorth> yes, but how to add arbitrary types?
16:26:20  <Eddi|zuHause> andythenorth: just reserve the bits, let the newgrf fill them with meaning
16:26:51  <andythenorth> still has to resolve to road or tram though?
16:26:58  * andythenorth is confused
16:27:21  <Eddi|zuHause> yes. every newgrf-defined type will have a flag "behaves like tram" set or unset
16:27:34  <Alberth> think so, or you cannot have a road and a tram at a single tile
16:27:51  <Eddi|zuHause> so every "roadtype == ROADTYPE_TRAM" will become "hasroadtypetramflagset(roadtype)"
16:29:01  <andythenorth> that is more pleasing tbh
16:29:24  *** HerzogDeXtEr1 [] has joined #openttd
16:30:11  <andythenorth> the current implementation has the overhead of unused extensibility, whilst not delivering much that can be built on for subtypes :)
16:32:53  <frosch123> andythenorth: don't listen to eddi :)
16:33:10  <frosch123> you made a spec with separate roadtypes and tramtypes
16:33:29  <frosch123> don't start over :p
16:33:46  <andythenorth> I am not sure if I have understood Eddi|zuHause or not :)
16:34:02  <frosch123> nah, eddi is just adding bs
16:34:04  <andythenorth> either he has a completely different idea, or he’s just filling in the gaps on how to implement subtypes
16:34:18  <Eddi|zuHause> i likely have 3 different different ideas
16:34:21  <andythenorth> all this roadtype == foo stuff in current code is
unhelpful :P
16:34:23  <frosch123> i doubt he even followed the earlier discussion
16:34:28  <Wolf01> why 2 specs for the same thing?
16:34:44  *** HerzogDeXtEr [] has quit [Ping timeout: 480 seconds]
16:35:09  <Eddi|zuHause> but what i said about refactoring the == into a function call is independent from my ideas
16:35:13  <andythenorth> yes
16:35:14  *** Clockworker_ [] has quit [Read error: Connection reset by peer]
16:35:16  <andythenorth> that seemed useful
16:35:18  <andythenorth> anyway, I am stuck on GetTileTrackStatus_Road
16:35:37  *** Clockworker_ [] has joined #openttd
16:35:38  <andythenorth> I only have one parameter for sub_mode, and I don’t have the vehicle in scope in that function
16:35:49  <andythenorth> so I can’t get the subtype from the vehicle, unless I stuff it into sub_mode
16:36:02  <andythenorth> that means changing 11 callers, adding an ugly || to each
16:36:17  <Eddi|zuHause> add a parameter?
16:36:17  <andythenorth> or I change the meaning of compatible_roadtypes, and fix a few places that expect the old meaning
16:36:34  <andythenorth> adding a parameter means changing 13 tile functions, almost totally unrelated to roads
16:36:35  <Eddi|zuHause> i really don't know what that function is doing
16:37:12  <andythenorth> ^ this exposes that compatible_roadtypes is nearly useless for a subtype-based idea, and could be refactored away
16:38:01  <andythenorth> I was hoping I could get rid of RoadTypes entirely, and the associated road / tram bits, and rely on the subtype bits
16:38:07  * andythenorth can’t eat that elephant in one go :(
16:38:35  <andythenorth> not good topic for My First C++ Patch
16:39:16  <frosch123> andythenorth: i believe you want to replace RoadTypes with albert's RoadFoo
16:40:19  <andythenorth> probably :)
16:40:25  <andythenorth> but I just don’t understand :)
16:41:38  * andythenorth keeps the link handy
16:44:31  <Alberth> you want how many road_subtypes and how many tram_subtypes?
16:45:30  <Alberth> do you also still need the road and tram bits?
16:46:46  <andythenorth> the use of road and tram bits could be replaced by putting a subtype like 0xFF in to provide the same information
16:46:57  <andythenorth> and patching the functions that look at those bits

16:47:25  <andythenorth> I think that 3 or 4 road_subtypes and 3 or 4 tram_subtypes is enough for any game
16:47:32  <Alberth> yep, so the latter question is "no" :)
16:47:34  <andythenorth> experience suggests we’ll want to use 8 :P
16:47:41  <andythenorth> "no"
16:47:47  <andythenorth> :)
16:48:43  <Samu> crap :( why are the OpenGFX river files split into 5000 or so :(
16:48:46  <andythenorth> it’s easy to find 2 lots of 2 bits in the map currently
16:48:59  <andythenorth> finding more bits without splitting them looked hard when I tried
16:49:18  <andythenorth> and who needs more than 3 tramtypes in a game? :P
16:50:07  <Alberth> likely, every newgrf needs it own 3 tram types :p
16:50:20  <Samu> I'm getting a headache :( looking at sprites and having 30~ windows open
16:50:43  <andythenorth> if authors make types incompatible, that’s going to be hell routing through towns :D
16:51:28  <Eddi|zuHause> didn't road tiles already have 2x4 bits for the road/tram type reserved?
16:52:08  <Samu> why did you make the river sprites split into 105 files?
16:52:18  <Eddi|zuHause> iirc the problem was always road/rail crossings, which were too crammed
16:52:19  <Samu> makes it so much harder to follow
16:52:44  *** sla_ro|master [slamaster@] has joined #openttd
16:52:58  <andythenorth> problem was bridge ramps afaict
16:53:16  <andythenorth> I didn’t spend very long on it, I had enough bits to prototype with
16:53:17  <Eddi|zuHause> andythenorth: i always wanted a tram type that was faster, but cannot be combined with roads (in the same direction)
16:53:44  <andythenorth> m4 looks free, but I think level crossings spank it
16:53:50  <Eddi|zuHause> and road types that are faster, but cannot be used for town growth
16:54:07  <andythenorth> m6 has 2 blocks of 2, which I’m using for road / tram
16:54:17  <frosch123> Samu: you didn't decode it using grfcodec, did you :p
16:54:35  <andythenorth> we can release the current 2 roadtype bits
16:56:17  <Eddi|zuHause> m4 should also be free for level crossings, as far as i gather
16:56:31  <andythenorth> Eddi|zuHause: your ideas w.r.t town growth etc sound like newgrf props or cbs
16:56:43  <Eddi|zuHause> yes
16:56:51  <Eddi|zuHause> props should be fine
16:57:13  <andythenorth> doesn’t level crossing inherit rail, with 0-3 used?
16:57:45  <Eddi|zuHause> no, level crossings are road tiles with some special bits
16:58:03  <Eddi|zuHause> so "inherit" means "from road tiles"
16:58:43  <andythenorth> so m4 might be free
16:59:07  * andythenorth tests
17:02:58  <Eddi|zuHause> i think level crossings had a problem which did not allow having tram without road
17:03:13  <Eddi|zuHause> not sure if that was a map limitation or a graphical limitation
17:03:20  <andythenorth> graphical
17:03:23  <andythenorth> I tried to fix it :)
17:03:31  <andythenorth> PBS overlays spanked it
17:03:35  <andythenorth> also monorail :P
17:04:04  <andythenorth> 4 bits for tram subtype, 4 bits for road subtype
17:04:15  <Eddi|zuHause> that sounds fine
17:04:20  <andythenorth> that’s 15 types (assuming one is NONE or INVALID or so)
17:04:25  <andythenorth> way more than is needed
17:04:38  <andythenorth> said everyone who is wrong ever :P
17:05:01  <Eddi|zuHause> i really wouldn't put "none" in there
17:05:20  <Eddi|zuHause> even if that would free up a bit or two elsewhere
17:05:29  <andythenorth> you’d keep the separate road / tram bits?
17:05:41  <Eddi|zuHause> yes
17:06:12  <Alberth>
17:07:47  * andythenorth reads :)
17:07:52  <Samu> I am confused
17:08:14  <Alberth> close a few of the 30 windows?
17:08:28  <Samu> i closed several Pain windows
17:08:30  <Samu> Paint
17:08:36  <Eddi|zuHause> seeing how people already complain about 16 railtypes not being enough?
17:09:09  <Alberth> well, if you give them 256, it's still not enough
17:09:39  <Alberth> they just use bits instead of sequences of values :)
17:10:01  <Alberth> only 8 features available :p
17:10:11  <Samu> frosch123: where can i find the images with the spriteIDs numbered?
17:10:36  <Samu> like a big spreadsheet of images
17:11:09  * andythenorth must now read about enums again
17:11:32  *** Snail [] has quit [Quit: Snail]
17:11:36  <Alberth> you may want special functions for testing "invalid"
17:12:07  <andythenorth> first I have to take baby steps :)
17:12:28  <Alberth> yeah, just saying
17:12:54  <Samu> riverbank_temperate_ne.gimp.png riverbank_temperate_nw.gimp riverbank_temperate_se.gimp riverbank_temperate_sw.gimp
17:13:05  <Samu> .gimp.png
17:13:14  <Alberth> after you wrote too many  GetRoadType(rt) == ROAD_TYPE_INVALID  :)
17:13:19  <andythenorth> so given an instance of RoadFoo, I can now get RoadType or Subtype out?
17:13:50  <Alberth> that's the idea, you have function to query or set the road type
17:14:08  <Alberth> maybe not the roadtype bit, I don't remember exactly
17:14:10  <andythenorth> so vehicles and tiles now instantiate RoadFoo when I want to work with those
17:14:31  <andythenorth> ok
17:14:47  <Alberth> a single tramtype is a uint8 (in both my files iirc)
17:14:57  <andythenorth> yes, in my patch also
17:15:04  * andythenorth patches v->compatible_roadtypes to v->compatible_foos :P
17:15:11  <Alberth> so if you only want that, a uint8 will work
17:15:36  <Alberth> RoadTypes or RoadFoo is more about storing or transporting a combination, eg for a tile
17:15:41  <andythenorth> yup
17:15:55  <andythenorth> this saves me messing around shifting bits in and out of a uint32 or so?
17:16:27  <Alberth> it mostly saves you writing all the shifts, as the SB and GB functions handle it
17:16:32  <andythenorth> great
17:16:45  <Alberth> the compute will still do it :p
17:16:51  <Alberth> *computer
17:17:17  <Alberth> sorry to take away your exercise :p
17:18:05  <andythenorth> I’ll live with that
17:19:23  <andythenorth> I can replace current RoadTypes with this?  It has some magical template stuff under it
17:19:42  <andythenorth> obviously I’d patch all things that consume it
17:19:45  <Alberth> the BEGIN/END are missing
17:20:03  <Alberth> so I suspect it will break, but don't know where
17:20:43  <Alberth> I removed all extras
17:21:31  *** smoke_fumus [~smoke_fum@] has joined #openttd
17:21:34  <andythenorth> yes, compiler hates it :D
17:21:42  <Alberth> so it will break while compiling, instead of doing something fuzzy without telling
17:23:01  <Wolf01> mmmh, I get a bunch of errors in the road_type.h enums : expression must have a constant value
17:23:24  <andythenorth>       'ROADTYPES_ALL'; did you mean 'ROADTYPE_END'?
17:23:31  <andythenorth> road_func.h:72:21: error: use of undeclared identifier
17:23:32  <andythenorth>       'ROADTYPES_ALL'; did you mean 'ROADTYPE_END'?
17:24:02  <andythenorth> that’s an interesting function, gets the missing types
17:24:23  <andythenorth> used during construction iirc
17:25:20  <andythenorth> yup, used during removal of road or level crossing
17:25:37  <Alberth> could make a subtype "any valid"
17:25:46  <andythenorth> return (RoadTypes)(ROADTYPES_ALL ^ r);
17:25:48  <Alberth> but that's sort of complicated too
17:25:55  <andythenorth> ^ very elegant but there’s probably another way
17:26:20  <andythenorth> it comes to ‘does the tile have tram or road on it'
17:26:39  <Alberth> !HasRoadType(rt)     !HasTramType(rt)   ?
17:27:01  <andythenorth> pretty much
17:27:12  <andythenorth> it’s used to rebuild the tram or road on a tile when removing the other type
17:27:20  *** Arveen [] has quit [Read error: Connection reset by peer]
17:27:34  <andythenorth> all the construction code is fun
17:27:56  <Alberth> static inline bool HasTramType(rt) { return GetTramType(rt) != ROADTYPES_TRAM_INVALID; }
17:28:30  <argoneus> anyone here has experience writing libraries?
17:28:39  <argoneus> I just have a tiny offtopic question :<
17:28:43  <andythenorth> only UI libraries :P
17:29:05  <Alberth> is it possible to ask offtopic things here?  :p
17:29:05  <argoneus> I'm not sure if I should try and separate my classes into "internal" and "what the external user can use"
17:29:14  <argoneus> or just have them together
17:29:22  <argoneus> as the external ones call the internal ones anyway
17:29:31  <Eddi|zuHause> is it possible to ask metaquestions in here?
17:29:47  <andythenorth> I think you just did that, definitionally :D
17:29:59  <Eddi|zuHause> thats. the. joke.
17:30:03  <andythenorth> orl?
17:30:06  <Alberth> only of the type "can anyone help me?"
17:30:17  <andythenorth> argoneus: my experience is (1) provide public and private classes (2) people will read your source and abuse that
17:30:56  <andythenorth> it’s pretty common in python libraries to have do_foo() and _do_foo() or bar and _bar or so
17:31:17  <Eddi|zuHause> python doesn't really have "private"
17:31:27  <andythenorth> “by convention"
17:31:45  <andythenorth> anyone importing _foo had better know why
17:32:08  <Alberth> C++ and Java don't have private other than the compiler, at runtime you can do anything
17:32:22  <argoneus> well, it's more like
17:32:27  <argoneus> my internal code works with entities
17:32:32  <andythenorth> maybe private was the wrong term :)
17:32:35  <argoneus> and the user should be able to use entities as well
17:32:43  *** Compu [~Compu@2604:6000:120a:a003:3dc0:147a:954c:e006] has quit [Remote host closed the connection]
17:32:44  <argoneus> and I'm not sure if I should put the Entity class in the public or internal package
17:32:47  <argoneus> or folder, or whatever
17:33:06  *** Compu [~Compu@2604:6000:120a:a003:7088:d79e:b54f:6c15] has joined #openttd
17:33:21  <argoneus> or have two of them, and one of them just calls the other
17:33:21  <Alberth> so how can I have an entity?  only by Entity *   ?
17:33:28  <argoneus> yeah
17:33:31  <argoneus> and it has methods
17:33:37  <Eddi|zuHause> making them all public should be easier
17:33:57  <Eddi|zuHause> don't add layers of indirection just for having layers of indirection
17:33:58  <argoneus> so make it public and let the lib users figure out how to use it?
17:34:21  <Alberth> Entity e;   has great benefits in not leaking etc
17:34:23  <argoneus> without trying to hide things for no reason
17:34:23  <Eddi|zuHause> yes. just document it properly what the use conditions are
17:34:34  <argoneus> I see, thanks
17:34:38  *** sim-al2 is now known as Guest10234
17:34:39  *** sim-al2 [] has joined #openttd
17:35:13  <Eddi|zuHause> just make things private that you have a clear reason to be private. otherwise people will just try to get around your arbitrary limitations
17:35:45  <argoneus> right
17:35:45  <Alberth> don't make it more complicated than it has to be
17:36:10  <andythenorth> just declare major version change at v2 :)
17:36:17  <andythenorth> and break backwards compatibility
17:36:35  <andythenorth> whatever you got wrong, you can change, and get wrong in new ways
17:36:36  <argoneus> tfw you study software engineering but you never learn how to actually engineer programs
17:36:44  <argoneus> thanks uni
17:37:20  <Alberth> you can't learn that, really
17:37:30  <andythenorth> only by doing, over a long time
17:37:35  <andythenorth> and then you die
17:37:38  <Eddi|zuHause> you can only learn that by doing an actual project
17:37:43  <argoneus> I suppose that's true
17:37:44  <Alberth> it needs a bigger amount of code than you can handle in a course
17:37:49  <argoneus> even in a large project with many experienced people
17:37:52  <argoneus> they refactor all the time, right
17:37:57  <andythenorth> nope
17:38:00  <argoneus> o-oh
17:38:06  *** Guest10234 [] has quit [Ping timeout: 480 seconds]
17:38:19  <Eddi|zuHause> "usually" it's "we *should* refactor that, but time-constraints..."
17:38:22  <argoneus> well, actually
17:38:22  <Alberth> they likely *should* refactor a lot
17:38:28  <argoneus> from my experience at a company
17:38:29  *** Clockworker_ [] has quit [Read error: Connection reset by peer]
17:38:33  <argoneus> it's usually "we should change this one method"
17:38:35  <andythenorth> or “that works, and we don’t have sufficient tests, don’t touch it"
17:38:41  *** Clockworker_ [] has joined #openttd
17:38:43  <argoneus> "time to write up a report about why and how and have it reviewed"
17:38:52  <argoneus> "then two other engineers have to review the code where I change three lines"
17:38:58  <argoneus> "then we need to run all the tests again"
17:38:59  <argoneus> hnng
17:39:06  <andythenorth> yup
17:39:20  <Eddi|zuHause> sure way to build up loads of technical debt until it all falls apart
17:39:36  <andythenorth> that’s like positing world economy is going to fail due to debt
17:39:41  <Eddi|zuHause> working against a bureaucracy is hard
17:39:46  <andythenorth> which o/c many people are worried about
17:39:49  <andythenorth> also, Has OpenTTD 1.6.0 Been Official Released
17:39:51  <andythenorth> ?
17:39:54  <Eddi|zuHause> yes
17:40:07  <argoneus> that's kind of depressing
17:40:12  <Eddi|zuHause> see topic
17:40:21  <argoneus> it almost makes me want to work as a web developer at a startup
17:40:30  <argoneus> at least no hard bureaucracy there, just fun new tech
17:40:32  <argoneus> (or is it fun)
17:40:33  <Eddi|zuHause> that sounds unhealthy :p
17:40:44  <andythenorth> and that, ladies and gentlemen, is where the debt originates :D
17:41:13  <argoneus> well, what kind of software job do you think is the most fun?
17:41:26  <argoneus> fun meaning
17:41:34  <argoneus> you work with cool technologies and don't spend 10 years on the same project
17:41:39  <Eddi|zuHause> job is not supposed to be "fun". hobby is for "fun"
17:41:46  <andythenorth> Eddi|zuHause: scandalous :)
17:42:01  <argoneus> Eddi|zuHause: I'd kind of like to disagree
17:42:04  <Eddi|zuHause> job isn't supposed to be "miserable" either
17:42:10  <argoneus> traditionally people gave others jobs because they didn't want to do it themselves
17:42:21  <argoneus> but in programming it's more "we should split it" than "do my dirty work"
17:42:22  <argoneus> no?
17:42:33  <andythenorth>
17:42:38  <andythenorth> "My advice to young people is always this - find something you enjoy doing so much that you'd be willing to do it for nothing
 and you'll never work a day in your life."
17:43:09  <Eddi|zuHause> yeah. that's what i did, and i get paid like i never worked a day in my life
17:43:23  <argoneus> heh
17:44:49  <Samu> # sprites/png/terrain/rivercorner_Temperate_n.gimp.png - where are these files?
17:45:00  <Samu> north,east,south,west
17:45:09  <Samu> it's not in the folder it mentions
17:46:08  * andythenorth back to trying to make this patch compile :)
17:46:47  <Samu> i can't code without visualizing the end result :( i wouldn't even know if I am failing
17:47:06  <Samu> i'm stuck, can't draw the rivercorners
17:48:05  <Alberth> they don't have to look like proper corners
17:48:29  <Alberth> you only need to differentiate whether you have the right sprite at the screen
17:49:25  <Alberth> once the programming is done, a graphics artist can make proper sprites, and use your code to see how it looks
17:49:42  <Samu> poor guy
17:50:05  <Samu> it's probably gonna look bad
17:50:13  <Samu> i don't even know if it would look correct
17:50:18  <andythenorth> doesn’t matter yet
17:50:38  * andythenorth will try to avoid getting that job again though :)
17:51:50  <Samu> how would I know if I position the rivercorner sprites in the correct manner, without rivercorners:(
17:52:49  <Eddi|zuHause> so, i should be reinstalling my system from scratch...
17:53:02  <Alberth> you don't, that's why sprites have offsets
17:53:07  <Eddi|zuHause> just thinking about whether i should also do a clean home directory
17:53:52  <Samu> i better show you what I coded so far, because I'm not getting what you're telling me
17:53:58  <Alberth> that's pretty simple, just make a 2nd /home/eddi directory while installing
17:54:21  <Alberth> then afterwards move things from old home to new
17:54:28  <Eddi|zuHause> my current /home is a fairly small partition, need to clean things out anyway
17:54:53  <Eddi|zuHause> big things like wine prefixes are already elsewhere anyway
17:55:49  <Eddi|zuHause> which are also a mess crufted up over 10 years
17:57:23  <Samu>
17:58:43  <Samu> i've added lines 102 to 105
17:58:55  <Samu> and
17:59:23  <Samu> lines from 30 to 49 were modified
17:59:37  <andythenorth> Alberth: think I need to patch GetRoadTypes to look at different bits?
17:59:47  <andythenorth> L166 in road_map.h
17:59:51  <Samu> didn't start the corners yet
18:00:14  <Samu> i still don't quite get the offsets
18:01:01  <Samu> and still didn't finish the edges either
18:01:19  <Samu> but i dont know if I'm editing the correct things
18:02:26  <Samu> in short, i have no idea what I'm doing if I can't observe the results immediately ;(
18:12:09  <Samu> uhm any idea
18:12:36  <andythenorth> hmm HasTileRoadType already exists
18:12:53  <andythenorth> HasTramType and HasRoadType seem to overlap that
18:14:14  <Alberth> andythenorth:  road_map.h is about storing the numbers in the map array
18:14:19  <andythenorth> yes
18:14:53  <andythenorth> so that gets the types on the tile
18:15:43  <andythenorth> but it’s returning an instance of RoadTypes (I think)
18:15:43  <Alberth> Samu: either print the relevant numbers so you can reconstruct, or make graphics and paint those at the screen
18:15:57  <Eddi|zuHause> andythenorth: one is for all tiles, and one is specifically for road tiles?
18:16:01  <andythenorth> I have been googling to understand this foo = (enumtype) syntax
18:16:06  <andythenorth> but can’t find anything
18:16:14  <Eddi|zuHause> that's a typecast
18:16:20  <andythenorth> e.g. return (RoadTypes)GB(_me[t].m7, 6, 2)
18:16:21  <Alberth> yes, bits are one-to-one copied to the map in general (as much as possible)
18:16:41  <Eddi|zuHause> a typecast is "interpret this random stream of bits as a certain type"
18:16:43  <andythenorth> that gets me a RoadTypes instance masked by the pattern of those bits?
18:16:55  <Alberth> GN ()   returns an uint, and you need an enum type
18:17:33  <Alberth> (X)foo    says to the compiler, "I want you to consider foo as a thing of type X"
18:17:59  <Alberth> where I have to make sure the bits match
18:18:01  * andythenorth googles some more
18:18:19  <Samu>
18:18:47  <Alberth> return GN(...);    will fail with a type error "uint is not an enum type"
18:19:12  <Alberth> Samu: is it correct?
18:19:40  <Samu> I'm not sure
18:20:00  <Samu> SE, SW, NE, NW are correct
18:20:01  <Alberth> find out, would be my suggestion :)
18:20:04  <Samu> the others, i dont know
18:20:25  <Samu> SLAT, is also correct
18:20:30  <Samu> FLAT*
18:21:59  <frosch123> apparently all mainboards have on-board graphic these days
18:22:40  <andythenorth> aren’t they integrated with the Northbridge, or other outdated terms I don’t recall?
18:22:54  * andythenorth remembers some big hoo ha about this 10 years ago :)
18:24:28  <frosch123> what's the point of mainboards having on-board graphics, when they are targeted to support multi gpu?
18:24:34  *** Wormnest_ [] has joined #openttd
18:25:02  <Eddi|zuHause> you can multi the onboard gpu with another one
18:25:27  <frosch123> well, the on-board gpu is limited to 4kx2k@24hz :)
18:25:30  * andythenorth thought it pretty much came for free, due to way commodity chips are bought and sold
18:25:32  <frosch123> so, obviously no :)
18:25:50  <andythenorth> do you still get an onboard speaker? o_O
18:26:01  <andythenorth> it is years since I saw the inside of a computer, except laptops
18:26:14  <frosch123> no idea :)
18:26:19  <andythenorth> ‘beep’
18:26:32  <frosch123> whenever i look for pc hardware, mainboard is the most puzzling thing
18:26:40  <Eddi|zuHause> there's still a speaker port on most boards, sometimes there's also a speaker attached
18:27:27  <Eddi|zuHause> it's not like a piezo-element is the most expensive thing ever
18:28:07  <Eddi|zuHause> i mean, they put these in EVERYTHING
18:28:17  <Eddi|zuHause> like water heaters
18:28:21  <andythenorth> Alberth: 3 bits per tram and road in your RoadTypes enum? o_O
18:28:36  * andythenorth is adjusting the map stuff
18:28:38  <Alberth> someone told me 8 types was enough :p
18:28:50  <Alberth> you can easily have more :p
18:28:51  <Eddi|zuHause> it's ready->it beeps. you press a button->it beeps. you put the can in->it beeps
18:29:06  <andythenorth> I just need to pick the right number of bits out of m4 :)
18:29:17  <Eddi|zuHause> i think 4 bits is the most natural
18:29:21  <andythenorth> agreed
18:31:01  <Eddi|zuHause> great, i have 2-5 year old directories called things like "blah", "blah~", "blah~~", "blah~~~"
18:31:10  <Eddi|zuHause> which one of those do i want to keep?
18:31:15  <andythenorth> I have ~tidy and it contains ~tidy
18:31:20  <Alberth> rm -rf blah*
18:31:24  *** Wormnest [] has quit [Ping timeout: 480 seconds]
18:31:35  <Eddi|zuHause> do i ever remember why i made these backup copies?
18:31:48  <Alberth> unlikely, so nothing will be lost :p
18:31:49  <andythenorth> you’ve cloned your entire HD right? Before doing this?
18:31:51  <Eddi|zuHause> usually, when i rm those, 2 days later i remember why i needed them
18:32:03  <andythenorth> clone, put clone in cupboard, lay waste
18:32:07  <andythenorth> scorched earth
18:32:25  <Alberth> mv blah  delete_after_20160405
18:32:31  <Eddi|zuHause> andythenorth: in all likelyhood, all those ~~~ are the clones of some previous undertaking :p
18:34:01  <Eddi|zuHause> blah... i tried to move blah~* into blah, and it complained that there's already another set of blah~* in there :p
18:34:52  <Alberth>   updated for 4 bits
18:35:09  <Alberth> automagic backup generation is evil :p
18:35:27  <Alberth> if you want to revert, use a VCS
18:35:44  <andythenorth> Alberth: thanks :)
18:35:53  * andythenorth wonders
18:36:05  <andythenorth> can I cast a RoadTypes enum back to a bit pattern? o_O
18:36:11  <andythenorth> or do I just pick them out with GB
18:36:34  <Alberth> GB is the safer way
18:37:07  <Alberth> but RoadTypes enum is just the bit pattern, only the compiler differentiates between the types
18:37:09  <Eddi|zuHause> i should at some point make an alias for "move a to b/ and then symlink b/a to a"
18:37:37  <Alberth> why do you do that?
18:38:07  <Eddi|zuHause> for keeping track what i moved to which disk
18:38:41  <Eddi|zuHause> so ~ is a collection of symlinks to stuff that i moved away from ~ for being too large
18:38:56  <andythenorth> so ROADTYPES_INVALID_ROAD = all 4 bits set?
18:39:08  <Alberth> yes
18:39:35  <Alberth> 1+2+4+8==15==0xF
18:40:03  <Alberth> assuming you like starting with roadtype 0 :p
18:40:21  <Alberth> also openttd uses all 1 to express invalid, everywehere
18:41:03  <Eddi|zuHause> except where it represents other stuff, like OWNER_TOWN :p
18:41:32  <Alberth> you need exceptions to all rules :p
18:42:31  <Eddi|zuHause> now... should i attempt to find a DVD to burn, or should i try booting from usb stick?
18:44:05  <Samu> i don't understand what I have to do... the more I look, the less I knwo
18:46:56  <Eddi|zuHause> you find weird and strange things tucked away in directories you don't ever visit...
18:47:41  <Alberth> it's never a brilliant solution to a problem that you have :p
18:49:36  <Eddi|zuHause> also, loads of chained symlinks that point to disks that are not there anymore :p
18:52:37  <LordAro> guize
18:52:40  <LordAro> hi
18:52:50  <LordAro> you forgot the title game -
18:54:29  <Eddi|zuHause> i suppose nobody had the energy to run a competition
18:56:58  <Samu> why is the game computing the correct corner height for some river tiles and not the others? what am I missing? I don't follow how the code decides this
19:10:20  * andythenorth bbl
19:10:21  *** andythenorth [] has quit [Quit: andythenorth]
19:15:11  *** Myhorta [] has joined #openttd
19:16:57  <Eddi|zuHause> i'm probably back... never :p
19:17:36  *** Eddi|zuHause [] has quit []
19:32:15  *** Wili [~textual@] has joined #openttd
19:32:37  <Wili> Hi is it possible to change autorenew settings during game? (with specific savegame? - miltuplayer game)
19:33:07  <frosch123> autorenew settings are company specific
19:33:14  <frosch123> every company can set their own values
19:33:14  <Wili> I've changed it already in conf file of server
19:33:20  <Wili> oh really?
19:33:33  <frosch123> you need to change them in game
19:33:37  <frosch123> config file only affects new games
19:33:38  <Wili> I mean change old car for the same one
19:34:50  <Alberth> you need to change it in-game
19:35:00  *** glx [] has joined #openttd
19:35:04  *** mode/#openttd [+v glx] by ChanServ
19:35:45  <Wili> in the client? I will try it :)
19:36:10  <frosch123> changing it affects the company you have joined
19:36:42  <Wili> so I have enabled change odl vehicle (now I have some red one) so I will send them to the garage and they will be swaped?
19:39:01  <Wili> I am reading here that these settiings will affect save games and onle new games
19:39:34  <frosch123> you are probably in main menu
19:39:39  <Wili> correct
19:39:41  <frosch123> you need to join the game and the company
19:39:45  <Wili> I am
19:39:47  <frosch123> and then change them *in game*
19:39:50  <Wili> but idk where is the settings
19:39:57  <frosch123> in the toolbar
19:39:59  <Wili> AAAAH
19:40:00  <Wili> here
19:40:04  <Wili> thanks!
19:47:51  <Wili> Is it possible to upgrade normal trains to monorail?
19:48:04  <Alberth> nope
19:48:13  <Wili> th
19:48:14  <Wili> x
19:48:34  <Alberth> my strategy is to build new connections instead of simple/dumb replace
19:48:48  <Wili> understand
19:48:50  <Alberth> much more fun :)
19:49:16  <Alberth> ie build a faster network "on top" of the existing network
19:49:35  <Alberth> using the existing network as local transport
19:50:10  <Alberth> if you have cargo-dist switched on, prepare for chaos :p
19:50:19  <Wili> :D
19:51:46  <Alberth> another option is not to use the default train set, but get a newgrf instead, that doesn't force you into upgrading
19:52:24  <Alberth> but you need to start a new game for that
19:53:09  *** efess [] has quit [Ping timeout: 480 seconds]
20:16:36  *** drac_boy [] has joined #openttd
20:16:38  <drac_boy> hi
20:18:01  *** Hiddenfunstuff [] has quit [Quit:  HydraIRC -> <- Organize your IRC]
20:19:34  <drac_boy> anyone want trade -10C for maybe like 6C or better? :p
20:20:18  <frosch123> i just traded 30C for 15C
20:20:37  *** andythenorth [] has joined #openttd
20:24:49  <drac_boy> heh, weird weather for april here so far anyhow :-s
20:29:07  <Wili> whats "C"? :)
20:30:06  <frosch123> °C
20:31:03  *** Wormnest__ [] has joined #openttd
20:32:32  *** Wili [~textual@] has quit [Quit: Textual IRC Client:]
20:32:52  * drac_boy also wishes there was somewhere to find a decent photo of station trackworks too
20:35:03  *** Clockworker__ [] has joined #openttd
20:35:41  *** andythenorth [] has left #openttd []
20:37:56  *** Wormnest_ [] has quit [Ping timeout: 480 seconds]
20:40:27  *** frosch123 [] has quit [Quit: be yourself, except: if you have the opportunity to be a unicorn, then be a unicorn]
20:42:41  *** Clockworker_ [] has quit [Ping timeout: 480 seconds]
20:47:16  *** _johannes [] has quit [Ping timeout: 480 seconds]
20:51:24  *** Stimrol [~Stimrol@] has quit [Remote host closed the connection]
20:52:33  *** Stimrol [~Stimrol@] has joined #openttd
20:55:43  *** Alberth [~alberth@2001:981:c6c5:1:be5f:f4ff:feac:e11] has left #openttd []
20:58:10  *** Samu [] has quit [Quit: Page closed]
21:17:33  <drac_boy> going make some supper now :->
21:17:35  *** drac_boy [] has left #openttd []
21:19:45  *** sla_ro|master [slamaster@] has quit []
21:32:31  *** Biolunar [] has joined #openttd
21:45:18  *** efess [] has joined #openttd
21:48:26  *** Birko [] has joined #openttd
21:50:23  <Birko> Hi everyone, I have a station with bus and train under one name. How can I get location of rail station if the bus station is base station of whole station. Function AIBaseStation.GetLocation() is only for base station. Thanks
21:51:36  *** Samu [] has joined #openttd
21:51:51  <Samu> hello
21:55:13  *** gelignite [] has quit [Quit:]
22:06:03  *** Nathan1852 [] has quit [Ping timeout: 480 seconds]
22:12:10  *** sim-al2 is now known as Guest10253
22:12:11  *** sim-al2 [] has joined #openttd
22:14:49  <Wolf01> 'night
22:14:51  *** Wolf01 [] has quit [Quit: Once again the world is quick to bury me.]
22:15:31  *** Progman [] has quit [Remote host closed the connection]
22:15:41  *** Guest10253 [] has quit [Ping timeout: 480 seconds]
22:18:50  <Samu> poor supermod designed the sprites and now i don't know what to do with them
22:20:26  <Samu> only now I realised waterfall waves going down canal slopes
22:20:44  <Samu> rivers don't have this :8
22:22:24  <Samu> whoever designed canals should come back to help me
22:25:29  *** Wormnest__ [] has quit [Quit: Leaving]
22:33:31  <Samu> is there a bug with full animation?
22:33:36  <Samu> or is it just me
22:34:01  <Samu> when I move mouse cursor around, the tiles pause their animation momentaneously
22:34:24  <Samu> if i stop moving mouse cursor, the tiles start animating
22:40:51  <Samu> seems to happen only during scenario editor
22:54:36  *** Eddi|zuHause [] has joined #openttd
22:55:19  <Eddi|zuHause> so... *something* happened...
22:55:47  <Eddi|zuHause> and it got the kezboard lazout wrong...
23:05:40  <Eddi|zuHause> man... everzthing is different... it|s terrible
23:05:54  <Eddi|zuHause> and i don|t get whz the kezboard is wrong...
23:06:26  <Eddi|zuHause> it's better now...
23:23:24  *** Myhorta [] has quit [Ping timeout: 480 seconds]
23:33:08  *** FLHerne [] has quit [Quit: There's a real world out here!]

Powered by YARRSTE version: svn-trunk