IRC logs for #openttd on OFTC at 2007-11-04
⏴ go to previous day
00:02:25 *** Greyscale has joined #openttd
00:03:26 *** XeryusTC has joined #openttd
00:09:16 <CIA-1> OpenTTD: belugas * r11374 /trunk/src/ (37 files in 2 dirs):
00:09:16 <CIA-1> OpenTTD: -Codechange: Give meaning to the magical number that specifies the color of the text in a DrawString call.
00:09:16 <CIA-1> OpenTTD: Patch heavily based on BiBB's work (FS#1383)
00:12:39 <TrueBrain> BigBB: nice work on the textcolor stuff :)
00:13:43 <Belugas> and we all know that BigBB has a lot more stuff to come in trunk ;)
00:13:57 <Wolf01> TrueBrain what happened to the fast-gui tracker?
00:14:17 <TrueBrain> Wolf01: it went to Work In Progress, as in no way it is a real patch
00:14:30 <TrueBrain> lol, the patch was too big for it to hit the maillist :)
00:14:39 <TrueBrain> BigBB: I don't want to know how you found all places ;)
00:14:45 *** Greyscale has joined #openttd
00:15:11 <Wolf01> oh hello ludde, my only god :D
00:15:13 <BigBB> A good searching program can help a lot :D
00:15:38 <TrueBrain> BigBB: still... changing every single entry with the right value...
00:15:44 <TrueBrain> so, you have my respect :)
00:17:20 <Wolf01> oh noes BiBB!!! is fake!
00:20:42 *** michi_cc_ is now known as michi_cc
00:21:34 *** michi_cc has joined #openttd
00:21:34 *** ChanServ sets mode: +v michi_cc
00:29:34 <Belugas> sleep[ well all, i'm going to bed too
00:32:55 *** Diabolic1Angel has joined #openttd
00:36:52 <Rubidium> anybody here familiar with the ECS Machinery vector in TTDP? Especially whether vehicles on the "parking" change colour over time.
00:39:54 *** Diabolic-Angel has quit IRC
00:48:31 <fjb> Why can waypoints not span multiple lines?
01:16:07 *** Hendikins has joined #openttd
01:16:47 <Sacro> fjb: because of the way they where implemented
01:16:57 <Sacro> i think it was ludde that did them in the first releases
01:17:28 <fjb> They are not very usefull that way.
01:17:28 *** cybermag1 has joined #openttd
01:29:00 *** Diabolic1Angel is now known as Diabolic-Angel
01:29:55 <Bjarni> <fjb> They are not very usefull that way. <-- we know but nobody wanted to start over once we realised this issue
01:31:23 *** Eddi|zuHause2 has joined #openttd
01:32:25 <Sacro> Bjarni: we should complain to the guy who coded it ;)
01:32:57 <Bjarni> he didn't want to start over either
02:02:53 *** Greyscale has joined #openttd
02:07:44 *** Greyscale has joined #openttd
02:19:47 *** Rexxars has joined #openttd
02:23:21 *** Greyscale has joined #openttd
02:31:57 <Smoovious> could we at least get waypoints in our company color? the text part? :)
02:33:40 *** Greyscale has joined #openttd
02:45:59 *** Greyscale has joined #openttd
04:39:27 *** nairan_wokr has joined #openttd
05:42:13 *** Nitehawk has joined #openttd
06:34:07 *** Hendikins has joined #openttd
06:50:10 *** Gonozal_VIII has joined #openttd
06:57:18 *** Alltaken has joined #openttd
06:58:58 *** Frostregen has joined #openttd
07:11:28 *** Maarten has joined #openttd
07:33:01 *** Maarten has joined #openttd
07:49:36 *** Maarten has joined #openttd
07:51:48 *** LordAzamath has joined #openttd
08:00:10 *** Maarten has joined #openttd
08:00:22 <Wolf01> [08:59:48] <Llama01> Wolf01: I like to think that i haven't had the misfortune to meet you.
08:00:22 <Wolf01> my bot don't like me :''''(
09:08:48 *** Brianetta has joined #openttd
09:45:21 *** Alberth has joined #openttd
10:40:11 *** Vikthor has joined #openttd
10:51:11 *** stillunknown has joined #openttd
10:59:29 *** michi_cc has joined #openttd
10:59:29 *** ChanServ sets mode: +v michi_cc
11:02:52 *** michi_cc has joined #openttd
11:02:52 *** ChanServ sets mode: +v michi_cc
11:19:24 *** DJ_Mirage has joined #openttd
11:26:58 *** Farden123 has joined #openttd
11:28:51 <CIA-1> OpenTTD: rubidium * r11375 /trunk/src/newgrf_industrytiles.cpp: -Fix [FS#1397]: the industry recolour map was always applied when recolouring was turned on, instead of only applying it when the colour translation is '0'.
11:29:13 *** LordAzamath has joined #openttd
11:33:10 <huma> i'm setting up visual studio to compile openttd on windows
11:33:54 *** Farden123 is now known as Farden
11:34:07 <huma> yea, i looked at the wiki article, it's much easier on linux :)
11:34:59 <Eddi|zuHause2> i would never use visual studio to compile anything on linux :p
11:35:04 <huma> anyway, i need photoshop, so i'm on windows box now
11:36:09 <Eddi|zuHause2> anyway, it is probably easier to use mingw
11:37:26 <huma> i'll just use the wiki article
11:40:37 <huma> TrueBrain, how's your webtt doing? :)
11:42:49 *** HerzogDeXtE1 has joined #openttd
11:44:03 <huma> must be busy implementing arctic tiles :)
11:49:09 <huma> "silence! i kill you!" :)
11:49:31 <huma> have you seen achmed the dead terrorist? :)
11:49:45 *** lolman is now known as John
11:49:59 *** John is now known as lolman
11:50:26 <huma> no youtube links allowed, so.. you'll have to find on your own :)
12:03:21 <TrueBrain> someone was looking for you yesterday :)
12:04:22 <SmatZ> too much work, I got a job... so I do school or job, or I am with my girlfried
12:04:29 <SmatZ> all free time is spent on work...
12:04:50 <SmatZ> I noticed there is a comment at one bugreport :)
12:05:07 <huma> SmatZ, someone was looking for you yesterday
12:05:23 <SmatZ> TrueBrain: huma who was lloking for me yesterday?
12:05:58 *** thgergo has joined #openttd
12:06:04 <TrueBrain> SmatZ: no, skidd13 :)
12:09:20 <SmatZ> I see, he is doing some nice optimizations
12:09:40 <SmatZ> TrueBrain: nice, you summoned me... with a little delay
12:10:59 <SmatZ> I think "IsTransparentByOption()" would be the best, but it is too long
12:11:10 <TrueBrain> SmatZ: the current name for sure is wrong :)
12:11:16 *** Dephenom has joined #openttd
12:11:20 <TrueBrain> but Belugas told me he is working on it, so check back with him :)
12:11:41 <SmatZ> you are the one who speaks English :)
12:14:03 <TrueBrain> you speak english too :p
12:14:15 <TrueBrain> IsTransparentOptionSet is btw in my opinion btw
12:14:16 *** Greyscale has joined #openttd
12:17:21 <SmatZ> yes, I had IsTransparentOptionSet() in mind, too
12:17:39 <SmatZ> but it is even longer than IsTransparentByOption()
12:23:19 <Rubidium> what about "just" IsTransparent?
12:24:46 <Rubidium> it returns a bool doesn't it?
12:25:31 <Rubidium> and do you really care whether the function uses an array of booleans or a bitset internally?
12:26:20 *** Greyscale has joined #openttd
12:26:39 <Wolf01> ok, IsTransparent seem to be the best suggestion
12:26:50 <TrueBrain> Rubidium: IsTransparent suggest that you test if that object is transparent... you want to know if the option to make the thing transparent is set
12:27:11 <Rubidium> ShouldBeTransparent then?
12:29:41 *** Greyscale has joined #openttd
12:39:12 <huma> i vote for IsTransparentOptionSet
12:40:48 <SmatZ> what about IsSetTransparent / IsSetInvisible?
12:41:25 <SmatZ> IsSetTransparent = 1, if given bit is set, IsSetInvisible = 1 if IsSetTransparent = 1 and given bit in _invisible_opt is set...
12:43:25 <Wolf01> currently there is only the invisibility option for trees
12:44:27 <Wolf01> i tried to add it for houses, but there are some problems with newhouses, seem that when the houses are invisible the game can't cache them
12:46:11 <huma> it's based on what i heard, not seen, so there's probably a better solution
12:46:37 <Wolf01> do you think that ctrl-clicking on the transparent widget to make it transparent is a good solution?
12:46:47 <Wolf01> *transparent-invisible
12:48:05 <SmatZ> and if there is any design problem, let me please know
12:49:31 <huma> IsInvisible is the best choice here, but i need to see the logic
12:50:48 <SmatZ> IsInvisible doesn't say (by its name) that it is invisible because of option, it could be understood that it is invisible because, say, of some bit in the newgrf etc.
12:52:53 <Wolf01> SmatZ, could you fix the ToggleTransparency function in main_gui.cpp by adding the enums instead of use those magic numbers?
12:53:05 <Wolf01> if you want i already have the patch
12:55:29 <Wolf01> if you want to give a look at it, maybe you can find a better way
13:06:24 <Belugas> SmatZ, i choose IsTransparentOptionSet
13:06:30 <Belugas> seems to be the vest option for me
13:06:33 *** thgerg1 has joined #openttd
13:10:29 <TrueBrain> hi and bye Belugas :)
13:11:36 <SmatZ> Belugas: ok, I will do it that way
13:17:17 *** XeryusTC has joined #openttd
13:25:15 <Belugas> hello -- SmatZ, don't bother for the transparnecy, it is almost done and about to be commited --and bye TrueBrain/Smatz :D
13:28:12 *** Nite_Owl has joined #openttd
13:29:11 *** Hendikins has joined #openttd
13:43:58 *** LeviathNL has joined #openttd
13:44:43 *** bubersson has joined #openttd
13:54:32 *** skidd13 has joined #openttd
13:56:25 <skidd13> Ahh the profiler is online :D
13:57:41 <skidd13> SmatZ: you did some profiling runs with OpenTTD, did you?
13:57:55 <SmatZ> skidd13: yes, I did a lot :)
13:58:01 <SmatZ> but I do not archive them
14:00:25 <SmatZ> skidd13: actually, I do profiling only on amd64 platform
14:00:30 <SmatZ> hope it won't be a problem
14:01:38 <huma> SmatZ, you need to do some profiling on webtt
14:02:50 <skidd13> SmatZ: no problem... It would be nice to get a little documentation how and what do you profiled, so it can be reproduced on other systems ;)
14:02:57 <huma> oh yes, you've been away
14:03:06 <huma> it's a web based openttd
14:03:29 <SmatZ> huma: nice, where can I play it?
14:05:28 <TrueBrain> that is what he means
14:07:08 <TrueBrain> click the image and scroll for crying out loud
14:07:44 <SmatZ> TrueBrain: nice :) it really works!
14:08:13 <TrueBrain> lol, it crashed again :p
14:09:42 <huma> so have you found what causes the crash?
14:09:53 <TrueBrain> so something deep-core
14:12:20 <SmatZ> TrueBrain: sometimes I get white tiles
14:17:30 <TrueBrain> SmatZ: sometimes an AJAX times out
14:17:39 *** HerzogDeXtE1 is now known as HerzogDeXtEr
14:17:45 <TrueBrain> oh well, shutting down
14:20:25 <TrueBrain> more things to smoothen the process will be introduced over time
14:24:08 <huma> eh.. Cannot open include file: 'table/strings.h'
14:24:21 <SmatZ> TrueBrain: flyspray won't be used anymore?
14:24:34 <TrueBrain> SmatZ: if the maillist works, it will be removed for patches, yes
14:24:42 <TrueBrain> but, the first question is if the maillist makes it better :)
14:25:07 <huma> TrueBrain, where's table/strings.h from?
14:25:15 <TrueBrain> huma: auto-generated, first compile strgen
14:33:21 <huma> LINK : fatal error LNK1104: cannot open file '..\objs\win32\debug\ottdres.res'
14:34:58 <SmatZ> TrueBrain: I did subscribe for the maillist, but I didn't receive any confirmation email - is it possible that it was lost somewhere, in some spam filters?
14:35:03 <SmatZ> or it just has some delay
14:35:14 <TrueBrain> SmatZ: good question :) Let me check..
14:36:32 <LeviathNL> I received my confirmation mail.
14:37:35 <SmatZ> LeviathNL: after how long time?
14:40:26 <huma> project build doesn't make ottdres.res for some reason
14:42:59 <TrueBrain> grey-listing is such a nice thing :)
14:44:25 *** Diabolic-Angel has joined #openttd
14:49:53 <TrueBrain> so then now I wonder who will have the first patch sent in ;) Hehe :)
14:49:55 <TrueBrain> first, shopping time!
14:56:01 <TrueBrain> BigBB: SVN archive is canceled, yes
14:58:35 <TrueBrain> skidd13: looks very good
14:58:39 <TrueBrain> I Say, put it in the real article :)
14:59:26 <TrueBrain> "private and protected members are preceded by "m_"" <- that is even new to me ;)
15:00:13 <TrueBrain> the coding style became much bigger since last time I checked it :)
15:00:54 <TrueBrain> anyway, it was time to do some shopping I said :) Bbl :)
15:03:08 <Sacro> Error 1 error LNK2001: unresolved external symbol "unsigned int _openttd_newgrf_version" (?_openttd_newgrf_version@@3IA) newgrf.obj
15:08:06 <BigBB> Sacro, do you compile with MSVC ?
15:08:37 <BigBB> yave you add a new .cpp or .h file ?
15:10:26 <BigBB> have your MSVC a new installation (configured right) ?
15:11:42 <BigBB> hmm (I don't like MSVC, therefore I use now Linux/make)
15:13:14 <BigBB> mom, I think you must add a #include "abc.h" , but not sure. try or wait till someone else have an idea :)
15:17:35 <BigBB> Sacro, I think you haven't edit corewin_express.vsprops have a look in it
15:19:20 <Sacro> however the vcproj doesn't
15:19:41 <huma> it's for pro as well, as it turns out
15:23:06 <BigBB> "unresolved external symbol" is ever a missing lib IIRC
15:26:10 <Eddi|zuHause2> but if it is clearly an openttd symbol, it is rather a missing file in the to-be-linked list
15:28:57 <huma> hmm, my build didn't set the rev number. it says: norev0000
15:31:16 <huma> many hdr's look artificial
15:31:37 <huma> yes, 11376, just checked out
15:33:23 <skidd13> huma: That's why I asked. I was unsure. The plants in the front look real, but I'm usure about the mounbians
15:33:46 <skidd13> :%s /mounbians/mountains/
15:40:47 <huma> on windows, ~/.openttd corresponds to %userprofile%/application data/openttd, but it writes to my documents
15:49:20 *** Wezz6400 has joined #openttd
15:52:35 <TrueBrain> huma: the more logical place for Windows users
15:55:53 <skidd13> Sacro: Mix of modified photo and render
15:55:54 <huma> it's the official guideline for application data
15:56:30 <TrueBrain> huma: what? Are there guidelines for Windows?
15:56:46 <huma> better tell me, where the rev number is generated which appeares in the window title?
15:56:47 <glx> even MS don't do that for its games
16:00:04 <glx> projects\determineversion.vbs
16:01:24 <huma> it's a new system, i just instaleld vs and svn today :)
16:01:51 <huma> i just set path quickly in console
16:02:46 <glx> easier to install than mingw/msys
16:03:08 <TrueBrain> console... easy..? :)
16:03:48 <huma> cause that's what i read on openttd.org :)
16:04:17 <TrueBrain> don't believe everything you read ;)
16:04:41 <TrueBrain> once again, I am in a phase of being bored
16:05:15 <huma> i generally believe that people have good intentions. openttd folks have a higher probability :)
16:08:08 <Noldo_> TrueBrain: has the patch mailing list been active?
16:08:16 <TrueBrain> Noldo_: active as in: it works, yes
16:08:22 <TrueBrain> active as in: someone posted already: no
16:08:55 *** Noldo_ is now known as Noldo
16:09:01 <huma> TrueBrain, hey, bored? didn't you buy pizza? :)
16:09:58 <huma> that reminds me, i have it in the fridge! :)
16:10:27 <TrueBrain> lucky for me, I have better food than that
16:14:13 <Noldo> I wonder if I can do the replace thing in commandcost patch with a regexp
16:14:24 <Sacro> I knew him, Horatio: a fellow of infinate jest, of most excellent fancy...
16:16:51 <TrueBrain> Noldo: dunno, would be nice ;)
16:18:37 *** lolman is now known as John
16:18:45 *** John is now known as lolman
16:46:24 *** trainlord has joined #openttd
16:56:32 *** Wezz6400 has joined #openttd
17:06:08 *** Greyscale has joined #openttd
17:08:49 *** Desolator has joined #openttd
17:10:44 <Desolator> ahh, good, the type of person looking for
17:10:56 <Desolator> can you recommend me some c/C++ book?
17:11:21 <TrueBrain> Desolator: sorry, never had one
17:11:43 <orudge> I learned C from a book called "Teach Yourself C Programming In 21 Days", many years ago now
17:11:48 <orudge> twas an oldish book, mid-90s
17:12:23 <Desolator> yeah I have it, though it jumps from basic stuff to advanced stuff quite a bit too quickly
17:13:44 <Desolator> although I'm quite familiar with the syntax (I've been using PHP for quite a while and it's based on C), the strict typing system and all that stuff is a bit too complex for learning in 21 days
17:14:28 <Desolator> hmm, mingw is behaving strange
17:15:03 <Desolator> I'm trying to compile r11355-ChrisIN again since I delete the files by mistake, and now I get loads of errors on command_queue.cpp
17:16:01 <Desolator> virtually all the functions in there appear to be redefined (ain't that strange? O.o)
17:17:46 <Desolator> what could it be? :P
17:18:16 <glx> Desolator: probably patch did the usual "readding at end of file"
17:19:15 *** |Bastiaan| has joined #openttd
17:20:42 <Desolator> glx: yeah, I was right, TortoisePatch added the contents 4 times in the file, I fixed it by hand (O.o)
17:20:59 <huma> that's why i prefer console
17:21:12 <glx> huma: same happen with console
17:21:49 <Desolator> oh dead, ALL patched files are corrupted this way...dard
17:22:33 * Desolator yanks the directory and gets a fresh copy
17:22:37 <glx> Desolator: only "new" files
17:24:27 *** Greyscale has joined #openttd
17:26:16 *** |Jeroen| has joined #openttd
17:27:50 <Desolator> btw, why did ludde quit when 0.3.3 was released?
17:28:45 <Eddi|zuHause2> he probably got bored and wanted to do something new
17:28:58 <Desolator> like selling utorrent?
17:29:46 <Eddi|zuHause2> i don't think that was his initial intention ;)
17:30:13 <huma> he's a utorrent dev now?
17:30:42 <Desolator> huh? he made utorrent
17:30:47 <glx> no he's working on something else now
17:31:13 <Desolator> then he sold it to Bittorrent Inc (in 2006 if I'm right) and is now in the support team there
17:31:45 <huma> i suppose he wrote a fair amount of openttd codebase
17:31:49 <Desolator> (it's a pretty neat tool, every'd love a cross-platform version)
17:31:57 <orudge> huma: he wrote all of it, back at the start
17:33:14 <Desolator> there's a lot of difference from ttd in C (the REAL ottd r1, not the r975 or so that's in this repository) to the coming openttd 0.6
17:33:49 <Desolator> anyway, what's left for OTTD to surpass TTDP fully??
17:34:12 <huma> maybe he didn't like growing c++ influence and left? :)
17:34:43 <Desolator> trunk wasn't converted to c++ 'till after 0.5 AFAIK
17:35:49 <Desolator> the only things left from TTDP that I can think of are PBS & restrictive signalling
17:37:01 <skidd13> Desolator: custom bridgeheads, tracks over tunel entrence, etc. There's still a huge gap.
17:37:54 <Desolator> alright, going to take a bath, see ya all
17:38:39 *** Wezz6400 has joined #openttd
17:40:07 *** Born_Acorn has joined #openttd
17:40:38 *** |Bastiaan| has joined #openttd
17:41:06 <TrueBrain> skidd13: does KillFirstBit2x64 work on signed integers too? I mean... it looks to me it should be unsigned..
17:43:04 <skidd13> I thought over that too. I'm not 100% sure. It works on COUNTBITS right too. But it would be nice if someone could check that.
17:44:06 <CIA-1> OpenTTD: truelight * r11377 /trunk/src/macros.h: -Codechange: some more strictness in macros.h (skidd13)
17:45:00 <TrueBrain> it is only used in one instance
17:45:37 <skidd13> Then wtf is it placed in macros.h?
17:45:56 <TrueBrain> because most likely it was ment to be more general some day
17:45:59 <TrueBrain> I wonder about the naming
17:46:29 <skidd13> name comes from _ffb_64[(x)] <--
17:46:47 <skidd13> or better _ffb_64[(x) + 64] <--
17:46:55 <TrueBrain> your function doesn't do the same
17:47:31 <skidd13> My function does that what the comments described. Kill the frist bit ;)
17:49:07 <TrueBrain> * This function returns a value where the first bit (from LSB)
17:49:07 <TrueBrain> - * is cleared. This function checks, similar to FindFirstBit2x64,
17:49:07 <TrueBrain> - * the bits at 0x3F3F.
17:49:09 <TrueBrain> that is what it did
17:59:36 *** DaleStan has joined #openttd
18:01:45 *** Greyscale has joined #openttd
18:02:18 <skidd13> Trubrain then add | 0x3FFFC0C0 to the calculation and it'll be the same
18:03:30 <skidd13> If the bits of 0x3F3F are checked we only have to assure that all other bits are valid ;)
18:04:27 <TrueBrain> skidd13: I think it is more useful if someone would check where this funciton is used
18:04:32 <TrueBrain> and figure out what it wants, exactly
18:04:45 <TrueBrain> oh, YAPF uses it too
18:04:48 <TrueBrain> lol, missed that :p
18:05:02 <skidd13> Then it sould really be optimised!
18:05:15 <TrueBrain> maybe KUDr can help
18:05:32 <DorpsGek> skidd13: KUDr was last seen in #openttd 1 week, 4 days, 3 hours, 41 minutes, and 5 seconds ago: <KUDr> good
18:06:06 <TrueBrain> bool is_choice = (KillFirstBit2x64(tf.m_new_td_bits) != 0);
18:06:11 <TrueBrain> it really looks weird to me
18:06:32 <TrueBrain> knowing it always leaves bit 6 and 7 and 14 and 15 intact...
18:06:34 <skidd13> the != 0 is not needed
18:06:57 <TrueBrain> skidd13: we do that by code-style
18:07:04 <TrueBrain> assuming 0 is something in a boolean, is silly
18:07:24 <TrueBrain> this explicit tells what the meaning was
18:07:27 <skidd13> I know a few placed where this is not used :D
18:07:36 <TrueBrain> and we try to put them there when we find them :)
18:07:45 <TrueBrain> same as this: if (*c != '\0')
18:07:50 <TrueBrain> also not needed, but more clear
18:07:54 * skidd13 points silently to mersenne
18:08:40 *** |Jeroen| has joined #openttd
18:09:45 <skidd13> to the stuff I try to optimise in maacros.h
18:10:46 <TrueBrain> skidd13: I really wonder why it only kills bits in that mask
18:11:40 <TrueBrain> skidd13: the comment-change is now wrong ;)
18:12:00 <skidd13> yup. Was to lazy to fix that diff.
18:12:03 <TrueBrain> oh, and skidd13, int -> uint compiled fine :)
18:12:30 <TrueBrain> (killing bits in a negative value gives... weird results ;) )
18:13:07 <skidd13> TrueBrain: It might even change from -0 to +0 :D
18:13:33 <TrueBrain> -0 in two's complement? :p
18:13:44 <Desolator> can anyone tell me what's the diff from uint8_t & unsigned?
18:14:05 <skidd13> Or am I wrong. Memory lessons have been a while ago ;)
18:14:52 <TrueBrain> skidd13: -1 = 0xFF, -2 = 0xFE :)
18:16:32 <TrueBrain> so killbit makes it more negative :p
18:17:17 <Eddi|zuHause2> funnier if you kill the MSB ;)
18:18:01 <skidd13> TrueBrain: don't you forgot the &= ?
18:18:03 <TrueBrain> nah, that is not weird :)
18:18:12 <TrueBrain> skidd13: what do you mean?
18:18:44 <skidd13> value &= (int)(value - 1) | 0x3FFFC0C0; <- It removes bits and does not change the value itself!
18:19:04 <TrueBrain> now that is a nice contradiction
18:19:08 <TrueBrain> it removes bits, but does not change the value..
18:19:27 <skidd13> :%s /itself/directly/
18:19:41 <TrueBrain> still don't follow..
18:21:08 <skidd13> a = 01010111; b = a - 1; // b = 01010110 a &= b // a = 01010110
18:21:26 <TrueBrain> so, -1 -> killbit: -2
18:21:35 <TrueBrain> while: 2 -> killbit -> 0
18:21:45 <TrueBrain> killing bits in signed operations is a bit silly
18:21:48 <TrueBrain> that was my point :)
18:22:12 <TrueBrain> (for sure it does kill the bit correctly, but the result is fuzzy)
18:22:19 *** Ammller has joined #openttd
18:25:43 <TrueBrain> skidd13: ah, found why it doens't want to filter bits 6 and 7
18:25:48 <TrueBrain> it means: wormhole or depot
18:26:01 <TrueBrain> so, indeed, with your | in it, the patch is correct
18:27:10 <skidd13> Stephen Hawking says: wormholes are implausible!
18:28:07 <TrueBrain> then we are our time way ahead
18:28:40 <skidd13> OpenTTD is VR so everything should be possible :D
18:29:02 <skidd13> except it is not implemented
18:29:06 <CIA-1> OpenTTD: truelight * r11378 /trunk/src/macros.h: -Codechange: optimize KillFirstBit2x64 (skidd13)
18:29:27 <TrueBrain> nice work skidd13 :)
18:29:42 <TrueBrain> doh, forgot the uint..
18:31:24 *** ChanServ sets mode: +v tokai
18:33:26 <CIA-1> OpenTTD: truelight * r11379 /trunk/src/macros.h: -Fix r11378: KillFirstBit2x64 accepts and returns unsigned variables, not signed, so enforce that a bit
18:34:17 <skidd13> Obiwan strikes again :D
18:43:52 *** Wezz6400 has joined #openttd
19:02:39 *** dihedral has joined #openttd
19:17:32 *** HerzogDeXtEr has joined #openttd
19:32:04 *** Uatec-Home has joined #openttd
19:32:19 <valhallasw> so does <insert female name>
19:58:10 *** cybermage has joined #openttd
19:58:33 <cybermage> is anywhere central banlist ?
19:59:15 <cybermage> I just banned 2 IP's because they came to server, joined a company and deleted all stations and tracks
19:59:28 *** ProfFrink has joined #openttd
20:00:28 <hylje> one should have passwords
20:02:54 <TrueBrain> but no, we don't have a central banlist
20:03:13 *** ProfFrink is now known as Prof_Frink
20:04:53 <cybermage> just fyi watch 213.98.80.75 and 88.73.240.144
20:10:01 *** Farden123 has joined #openttd
20:16:54 *** Farden123 is now known as Farden
20:36:02 <cybermage> Is it possible to ban IP range ?
20:41:42 <cybermage> and is it possible to put money to player ?
20:46:56 <TrueBrain> no and no, not direct
20:47:22 <cybermage> bad guys are connecting to my server and deleting stations, airports
20:52:15 *** Tlustoch has joined #openttd
20:53:52 <Maarten> cybermage: Do you have a linksys router?
20:54:17 <cybermage> I can manage iptables
20:54:20 <Maarten> (or a linux server with iptables on them)
20:54:31 <cybermage> I think I will do it
20:54:46 <Maarten> iptables -I FORWARD -d 66.58.0.0/16 -j DROP
20:55:13 <cybermage> I am not crazy enough to run openttd on firewall :)
20:55:29 <Maarten> that will effectively ban the 66.58.*.* range - it will just forward it to infinity :P
20:55:37 <TrueBrain> cybermage: OpenTTD is safe enough ;)
20:56:00 <cybermage> TrueBrain: I don't trust you ;)
20:56:13 <TrueBrain> cybermage: feel free to check yourself :)
20:56:17 <cybermage> TrueBrain: unless it is build with PIE and PAX
20:56:18 <TrueBrain> but I can't blame you :)
20:56:31 <cybermage> and checked for buffer overflows
20:56:40 <TrueBrain> buffer overflows are checked pretty regular
20:56:44 <TrueBrain> valgrind is run over the binary
20:56:46 *** Progman has joined #openttd
20:57:19 <Prof_Frink> 'lo Bob, you have pie?
21:03:53 *** ProfFrink has joined #openttd
21:05:41 *** ProfFrink is now known as Prof_Frink
21:05:55 *** Dark_Link^ has joined #openttd
21:10:10 *** Vikthor has joined #openttd
21:14:32 *** |Bastiaan| has joined #openttd
21:20:15 *** Born_Acorn has joined #openttd
21:24:36 *** Greyscale has joined #openttd
21:37:36 <Ammller> Hi, someone ever played with MB's newcargo.grf?
21:38:03 <Ammller> we have a problem with accepting Livestock at the food plant
21:53:48 *** skidd13 has joined #openttd
21:55:14 *** KritiK_ has joined #openttd
21:57:03 *** egladil has joined #openttd
21:57:49 <TrueBrain> skidd13: after a long look at KillBits blabla, I found out that the function is REALLY weird
21:58:42 <TrueBrain> as the function also makes of any 16+bit, a 16bit
21:58:44 <skidd13> But IMO the most wired is its name
21:59:23 <skidd13> If we fix the name the rest will be ok then ;)
21:59:54 <TrueBrain> did you check FindFirstBit2x64 :p
21:59:57 <TrueBrain> it has a nice +8....
22:00:34 <skidd13> yeah. I'm thinking about that too
22:00:43 <TrueBrain> and _ffb is just a lookup table :p
22:01:17 <TrueBrain> extern const byte _ffb_64[128];
22:05:16 <skidd13> What about KillFirstPathInfoBit() ?
22:06:34 <Rubidium> skidd13: it's working on track bits
22:07:41 <Rubidium> uhmm.. not track bits, trackdirbits ;)
22:08:08 <TrueBrain> we really need KUDr, to ask what is going on :)
22:09:01 <Rubidium> _ffb_64 is used just to get/remove a TrackDirBit
22:09:23 <TrueBrain> Rubidium: then why is it done on bits 0..7 AND on bit 8..15?
22:10:03 <Rubidium> it's done on bits 0..5 and 8..13
22:10:18 <TrueBrain> yeahyeah, but you got what I mean
22:10:21 <TrueBrain> where does that << 8 come from?
22:10:22 <Rubidium> just as the trackdirbits
22:10:30 *** Greyscale has joined #openttd
22:10:49 <TrueBrain> when does trackdirbits use 16bit?
22:10:51 <Rubidium> TrueBrain: read the comments in trackdir(bits)
22:11:07 <TrueBrain> hmm, I was reading TrackBits
22:11:45 <TrueBrain> ah, Rubidium, now I understand
22:11:49 <Rubidium> TrueBrain: not confusing, it's very clearly named
22:11:55 <TrueBrain> but so there is nothing wrong with killing bit 6 and 7 too, as they should always be 0
22:12:06 <TrueBrain> Rubidium: yes, it is, but TrackBits and TrackDirBits are a very minor difference
22:13:06 <Rubidium> maybe rename 2x64 with TrackDirBits and have those as input and output type
22:13:08 <TrueBrain> so, if I read this all correct, we can just name it KillFirstBit
22:13:21 <TrueBrain> as bit 6 and 7 should always be 0
22:13:34 <skidd13> Then we don'T need the 0x... stuff
22:18:03 <TrueBrain> Rubidium: can you confirm that I am correct, about bit 6 and 7 in TrackDirBits?
22:18:52 <Rubidium> I'm not 100% sure at the moment; the TrackDirs for 6 and 7 are used
22:19:09 <TrueBrain> (or better: where? :))
22:19:43 <TrueBrain> which isn't important for YAPF, right?
22:19:47 <TrueBrain> so should be masked out?
22:21:33 <Rubidium> it's not used for TrackDirBits it seems
22:21:40 <Rubidium> so yes, it can be masked out
22:21:55 <Rubidium> but instead of using 0x3F3F, you can use the enum constant
22:22:08 <TrueBrain> Rubidium: I ment, not in KillBits
22:22:09 <CIA-1> OpenTTD: glx * r11380 /trunk/src/newgrf.cpp: -Revert (r11191, r11196): it worked, but broke cargo loading
22:22:13 <TrueBrain> but in when yapf assigns the value
22:22:40 <Rubidium> masking out isn't necessary as it should never been set in the first place
22:22:50 <TrueBrain> that was what I was asking ;)
22:22:59 <TrueBrain> so, KillBits can just do what he says, kill the LSB bit
22:23:20 <TrueBrain> TrackdirBits dst_td_bits = (TrackdirBits)(dest_ts & TRACKDIR_BIT_MASK); <- YAPF already takes perfectly care of it
22:23:26 <Rubidium> removes 64 or so bytes from the binary ;)
22:23:34 <TrueBrain> anyway, that also means we could remove KILL_FIRST_BIT macro
22:23:50 <Ammller> glx: your commit has nothing to do with the image I just posted, has it?
22:24:15 <CIA-1> OpenTTD: glx * r11381 /trunk/src/ (newgrf.cpp newgrf_config.h): -Fix [FS#1227]: redo the fix in a less breaking way
22:24:41 <Ammller> the station does not accept Livestock
22:24:56 <TrueBrain> brr, many times KILL_FIRST_BIT used...
22:25:22 <Ammller> hmm, then I try with new trunk...
22:25:53 <glx> btw nothing?.grf still works :)
22:26:16 <Ammller> does it still nothing?
22:26:30 <glx> but now I can have forests from ECS accepting Vehicles even I change grf order
22:27:28 <Ammller> nope,the problem is still there
22:29:11 <TrueBrain> one can debate if a table-lookup is faster than an AND and a SUB, but I think optimizations take care of it
22:29:29 <TrueBrain> and what should be templates about it?
22:29:40 <TrueBrain> you want to avoid the casts
22:29:42 <Rubidium> so you can remove the casts
22:29:55 <TrueBrain> not that it really matters
22:30:01 <TrueBrain> it just makes it hard to compare it to 0
22:30:10 <Rubidium> then you don't compare to 0
22:30:17 <Rubidium> but TRACKDIRBITS_NONE or something like that
22:30:25 <TrueBrain> that takes a bit longer :p
22:30:44 <skidd13> looks nice and templates a cool :D
22:30:44 <Ammller> glx, this bug is still there with 11381
22:30:47 <Rubidium> makes it clearer though
22:30:56 <Rubidium> Ammller: does it work in TTDP?
22:30:58 <TrueBrain> Rubidium: you are correct
22:31:14 <Ammller> Rubidium: I guess so, this set is quite old
22:31:33 <TrueBrain> btw, skidd13, I think COUNTBITS should be renamed to CountBits
22:31:36 <TrueBrain> it no longer is a macro
22:32:11 <skidd13> TrueBrain: Yup I just wanted to say something like this ;)
22:32:21 <TrueBrain> so you do that, then I take care of KillFirstBit :)
22:37:45 <TrueBrain> stupid compiler, 0 is allowed :p
22:38:50 <TrueBrain> even a value of an other enum..
22:40:00 <Ammller> Rubidium: now I know, it works with patch
22:40:59 <Rubidium> you tested the exact same set of grfs in the same order?
22:41:43 <skidd13> TrueBrain: check the patch-maillist
22:42:59 <TrueBrain> I only have savegames that are broken somehow :p
22:43:02 <Rubidium> TrueBrain: clear, ain't it?
22:43:03 <TrueBrain> I can't even find a working on :)
22:43:04 <Ammller> someone else in the german forum did also point to it and MB said, that it might be a bug
22:43:09 <glx> Ammller: in the first screenshot you can see the FPP is not finished
22:43:28 <Ammller> ah ok, but thats not the problem
22:43:39 <glx> just wait a little and I think the missing accepted cargo will appear
22:43:58 <Ammller> and why is Grain and fish aready there?
22:44:31 <glx> LV acceptance may be related to a callback
22:44:32 <Rubidium> Ammller: furthermore the stations are different
22:45:00 <Rubidium> + if (bits == 0 || KillFirstBit(bits) == TRACK_BIT_NONE) return false;
22:45:08 <Rubidium> the other 0 could be changed too
22:46:31 <Rubidium> in pathfind bits could be made TrackDirBits (out of scope of patch though)
22:46:49 <TrueBrain> I agree, with both statements :)
22:46:51 <Rubidium> + for (TrackdirBits rtds = tf.m_new_td_bits; rtds != TRACKDIR_BIT_NONE; rtds = (TrackdirBits)KillFirstBit(rtds)) {
22:46:59 <skidd13> if (bits == 0 || KillFirstBit(bits) == TRACK_BIT_NONE) I'd replace with if (bits == 0 || CountBits(bits) == 1)
22:47:28 <Rubidium> CountBits(bits) <= 1 ?
22:47:46 <CIA-1> OpenTTD: truelight * r11382 /trunk/src/ (6 files): -Codechange: renamed COUNTBITS to CountBits, as it is no longer a macro (skidd13)
22:48:18 <Rubidium> TrueBrain: another similar case where you could remove an unnecessary cast in yapf_common.hpp (previous one in yapf_base.hpp)
22:50:18 <Rubidium> Ammller: have you tried it in OTTD with a similar station as in TTDP?
22:50:50 <Rubidium> as it looks like only a few tiles accept livestock and those aren't covered enough by your station in OTTD.
22:50:52 <skidd13> src/yapf/yapf_road.cpp you can replace with CountBits(bits) <= 1 too
22:51:39 <TrueBrain> skidd13: it isn't faster
22:51:43 <TrueBrain> but okay, more clear :)
22:51:47 <Ammller> Rubidium: I have surrounded now the Plant, still not accepting it
22:52:20 <Ammller> also tried rv and airport
22:52:22 <TrueBrain> skidd13: but the same goes for:
22:52:23 <TrueBrain> bool is_choice = (KillFirstBit2x64(m_orgTrackdirs) != 0);
22:52:27 <Osai> there is also another bug... transported fish doesn't produce any food, you only receive some money
22:52:58 <TrueBrain> in fact, for most KillFirstBit
22:53:01 <skidd13> TrueBrain: CountBits is more intuitive IMO
22:53:14 <TrueBrain> Rubidium: what do you think.. replace KillFirstBit(value) != 0 (enum) with CountBits(value) <= 1?
22:53:26 <Ammller> hmm, newcargo is one of first NewIndustries GRF
22:53:26 <glx> Osai: related to Ammller problem?
22:53:50 <Osai> it occurred in the same game
22:53:52 <TrueBrain> euh, for != it is of course > 1 ;)
22:55:00 <skidd13> TrueBrain: for != I'd use KillBits cause Countbits iterates for every bit and Killbits only for one ;)
22:55:22 <TrueBrain> so, only for == 0, it is :)
22:55:28 <huma> oh, TrueBrain is still up and running :)
22:55:28 <Ammller> Osai: I made a new game on a unpatched trunk to be sure
22:56:04 <Rubidium> TrueBrain: if you care about counting the bits, then you should always use KillBits and not CountBits
22:56:21 <TrueBrain> Rubidium: don't follow
22:56:28 <Rubidium> you could make a function HasZeroOrOneBitsSet though ;)
22:56:49 <TrueBrain> hmm, CountBits is always slower
22:57:06 <TrueBrain> so, indeed, bad idea to replace KillFirstBit with CountBits
22:57:10 <Rubidium> skidd13: that's just == 0
22:57:40 <skidd13> Rubidium: Just noticed after pressing return ;)
22:57:50 *** ThePizzaKing has joined #openttd
22:58:14 <TrueBrain> bits &= 0xBF; <- BF?!
22:59:29 <Rubidium> don't know why bit 7 is tested though
22:59:33 <TrueBrain> Rubidium: so in pathfinder.c, it can't be replaced with TrackDirBits, it uses some custom bit :)
23:00:37 <TrueBrain> so, really something for an other patch ;)
23:00:41 <TrueBrain> temp.patch is okay?
23:00:47 <Rubidium> GTTS never returns with the 7th and 15th bit set
23:01:20 <Rubidium> so the BF could become 3F
23:06:21 <Ammller> hmm, how to build a boje for fishing, like in Patch with crtl?
23:06:30 *** Vikthor has joined #openttd
23:06:51 <CIA-1> OpenTTD: truelight * r11383 /trunk/src/ (10 files in 2 dirs): -Codechange: fixed all the mess around KillFirstBit (tnx to Rubidium and skidd13)
23:07:10 <TrueBrain> so, now FindFirstBit? :p
23:07:34 <skidd13> TrueBrain: That's a bit more tricky to optimise ;)
23:07:49 <TrueBrain> we can at least start by removing the 2x64 version :)
23:07:56 <TrueBrain> as we just said that was unneeded ;)
23:08:27 <TrueBrain> hmm, no, we can't, as FIND_FIRST_BIT needs a 64bit value
23:12:42 <Ammller> yeah, I fear, its not possible
23:12:57 <Ammller> this set is just not playable with OTTD
23:13:22 <Ammller> hmm, didn't test it enough
23:13:37 <Ammller> I will remove it from our pack then...
23:14:03 *** Osai is now known as Osai^zZz
23:14:45 <Eddi|zuHause2> build fishing grounds with ctrl? that sounds like a bad feature
23:14:53 <glx> Ammller: anyway there's probably a bug in industrytiles loading
23:14:56 <Ammller> not the fishing ground
23:15:05 <TrueBrain> you guys are bad :)
23:15:25 <TrueBrain> well, nobody left here for me to talk about macros.h I guess :p Night all :)
23:16:10 <Ammller> Eddi|zuHause2: did you ever play with newcargo and OTTD?
23:16:46 <Eddi|zuHause2> Ammller: you specifically mean the newgarco.grf? no.
23:26:11 <MrBrrr> Has the behavior of the "Go To Depot" order been changed? (in trunk)
23:38:38 *** DaleStan has joined #openttd
23:42:51 *** Diabolic-Angel has quit IRC
23:46:49 *** Diabolic-Angel has joined #openttd
continue to next day ⏵