IRC logs for #openttd on OFTC at 2007-07-11
⏴ go to previous day
00:07:13 *** NW|Aerandir has joined #openttd
00:20:21 *** RamboRonny has joined #openttd
00:26:12 *** ThePizzaKing has joined #openttd
00:36:24 <CIA-1> OpenTTD: belugas * r10503 /trunk/src/newgrf_callbacks.h: -Codechange: Mark Callback CBID_INDUSTRY_FUND_MORE_TEXT (cb38) as implemented.
00:45:29 *** iPandaMojo has joined #openttd
00:48:51 *** iPandaMojo has left #openttd
01:01:45 *** NW|Aerandir has joined #openttd
01:17:45 *** Digitalfox has joined #openttd
01:46:09 <CIA-1> OpenTTD: belugas * r10504 /trunk/src/town_cmd.cpp: -Codechange: Shorten the test if no track bit has been found
01:47:15 <Eddi|zuHause> what exactly do track bits have to do with industries?
01:48:05 <Belugas> who said that r10504 had to do anything wint industries ? :D
01:48:17 <Eddi|zuHause> well, you said you do not touch any code that does not have to do with industries until you are finished :)
01:48:55 <Eddi|zuHause> my memory is good only with unimportant things :p
01:49:39 <Belugas> let's say i wanted to see if i could fix FS1018 easily. AS i followed the code, in debug, i found out that the test was not really usefull once there is no trackbit found...
01:50:51 *** iPandaMojo has joined #openttd
01:53:03 <Caemyr> then it can be called an optimisation
01:57:00 <Belugas> i wonder if some would call it optimization ;)
02:13:13 <CIA-1> OpenTTD: belugas * r10505 /trunk/src/town_cmd.cpp: -Fix(r10249)[FS#1016]: Town was still trying to gather information for tiles on which it could not build. aising the values to 2 will prevent further invasion of the water-at-the-edge :)
02:22:55 <Smoovious> does the oneway.grf include just the graphic overlay for the direction markers, or does it include roadbed too?
02:23:16 <Smoovious> (I ask cuz it doesn't seem to work with TTRS)
02:24:11 <Smoovious> invasion of the water-at-the-edge?
02:26:50 *** DeGhosty has joined #openttd
02:42:53 *** Eddi|zuHause has joined #openttd
02:46:33 *** NukeBuster has left #openttd
03:06:44 *** Ammller has joined #openttd
04:03:47 *** De_Ghosty has joined #openttd
04:45:42 *** Osai^zZz has joined #openttd
05:03:23 *** l_Blue_l has joined #openttd
05:08:47 <l_Blue_l> I was just wondering if anyone knows whats happened to Auto-replace? Where did the button go? Has it just been disabled until a better implermentation of it is complete (e.g designed to be used with Groups)?
05:09:50 *** Thomas[NL] has joined #openttd
05:49:55 *** Markkisen has joined #openttd
05:51:31 *** Rubidium_ has joined #openttd
05:51:35 *** ProfFrink has joined #openttd
05:52:59 *** Digitalfox has joined #openttd
05:53:34 *** KUDr_wrk has joined #openttd
05:56:48 *** egladil has joined #openttd
06:02:41 *** Born_Acorn has joined #openttd
06:02:50 *** Belugas has joined #openttd
06:02:50 *** ChanServ sets mode: +o Belugas
06:06:14 *** dihedral has joined #openttd
06:16:58 <dihedral> btw - you guys mention that lude was going to reverse engeneer
06:18:41 <dihedral> orudge i believe said yesterday that as long as nobody admits it...
06:18:52 <dihedral> marjacq had no proof
06:21:14 <peter1138> 1) it wouldn't be that hard for them to find it
06:21:23 <peter1138> 2) we can't stop random people changing the wiki
06:21:36 <dihedral> 08:16 <@peter1138> burp << cheers
06:23:20 <TinoDidriksen> Sure you can stop random people changing the wiki; just wouldn't really be a wiki any longer.
06:23:42 <peter1138> especially not Born_Acorn!
06:26:38 *** Frostregen_ has joined #openttd
06:29:08 <dihedral> there is an english part - a quote from guy herbert
06:32:18 *** Frostregen_ is now known as Frostregen
06:32:47 <peter1138> what is your point?
06:33:23 <dihedral> i quote "All Chris Sawyer's legal rights are reserved. I'd also ask you to note that such approaches involve by-passing copy protection, which is not just a violation of Chris's rights as an author but in several countries amounts to criminal conduct."
06:33:35 <dihedral> aint a thing they can do :-)
06:34:29 <peter1138> for some reason you seem to think this is all new to us
06:34:30 <dihedral> lude did the work in sweeden, where this was no "criminal conduct"
06:34:51 <dihedral> no - i am just sharing thoughts :-)
06:38:12 <dihedral> it's new to me - put it that way :-)
07:26:11 *** XeryusTC has joined #openttd
07:53:32 *** TinoM|Mobil has joined #openttd
07:54:35 *** Maedhros has joined #openttd
08:04:00 *** Rubidium_ is now known as Rubidium
08:08:06 *** Progman has joined #openttd
08:21:23 <CIA-1> OpenTTD: rubidium * r10506 /trunk/src/industry_cmd.cpp: -Fix: the (manual) building of banks was always rejected.
08:34:13 *** tokai|ni has joined #openttd
08:34:24 *** Vikthor has joined #openttd
08:35:27 <CIA-1> OpenTTD: rubidium * r10507 /trunk/src/table/road_land.h: -Fix [FS#1019]: apparantly we used the wrong sprites for some pieces of the tram catenary (even though TTDP did so too).
09:40:16 *** Nickman has joined #openttd
09:43:25 *** MarkSlap has joined #openttd
09:57:25 *** narthollis has joined #openttd
10:34:38 *** Ammller has joined #openttd
10:34:53 *** Ammller is now known as Ammler
10:50:07 <flex_> trunk does not compile on openbsd as there is no vswprintf, adding libutf8 as a dependency i made it compile...
11:10:44 *** NW|Aerandir has joined #openttd
12:37:38 *** Chris82 has joined #openttd
12:38:07 <Chris82> I am just working on an up to date version for the subsidiaries patch and I stumbled over a line I don't understand
12:38:27 <Chris82> this is supposed to be added in settings.cpp but I don't understand what for:
12:38:28 <Chris82> + #define SDT_VAR(base, var, type, flags, guiflags, def, min, max, interval, str, proc)\
12:38:28 <Chris82> + SDT_CONDVAR(base, var, type, 0, SL_MAX_VERSION, flags, guiflags, def, min, max, interval, str, proc)
12:38:57 <Chris82> also all the patch options are not COND which I think is pretty bad savegame compatibility wise
12:43:27 *** alexalex2 has joined #openttd
12:46:50 *** alexalex2 is now known as alex
12:53:12 *** NukeBuster has joined #openttd
13:01:54 <Maedhros> Chris82: that should already be in settings.cpp
13:03:17 *** skidd13 has joined #openttd
13:08:00 *** JazzyJaffa has joined #openttd
13:10:28 <JazzyJaffa> Hi all, is there anyone versed in the codebase that could answer a quick question?
13:13:06 <JazzyJaffa> I wish to set to 0 all Track directions in a TrackdirBits that are not compatible with a tile's slope. Is there a quick way? I could probably manage with CheckRailSlope, but I'd have to do it one at a time.
13:14:30 <SmatZ> there is a big magic around all of this stuff ^_^
13:14:41 <blathijs> There's probably an array somewhere, indexed by slope that has all possible TrackdirBits enabled
13:14:48 <blathijs> which you can & together
13:15:31 <JazzyJaffa> Thats what I was hoping, my bit mapipulation skills aren't exactly leet
13:17:58 *** TinoM|Mobil has joined #openttd
13:18:43 <skidd13> Do I have to mind something If I want to run doxygen to get the documentation?
13:18:48 <JazzyJaffa> Think I can cobble something together by copying from CheckRailSlope, Big Magic here we come
13:20:01 <glx> skidd13: there's a Doxyfile in trunk
13:21:18 <skidd13> I know, anything else than run doxygen? (I used doxygen the last time a few years ago)
13:22:49 <NukeBuster> Can someone point me to an example on how to use the debug function to show a value i want to monitor
13:22:52 <JazzyJaffa> skidd13: Just tried and a simple "doxygen" at the root of the trunk worked for me
13:26:02 <skidd13> NukeBuster: src/gfx.cpp line 563 (current trunk)
13:26:43 <NukeBuster> thanks... it's hard to find without doxygen...
13:43:20 <skidd13> Is there a function to mirror RoadBits? eg. NW -> SE
13:44:11 <blathijs> Not that I know of (though it would be useful, I guess)
13:47:21 <skidd13> I'm not so deep in bit magic. Is a double shift a solution?
13:48:43 <blathijs> I don't think bitshifting is round
13:48:55 <blathijs> ie, it will only shift in 0 at the right
13:49:05 <skidd13> I meant the first 2 bits up, the last two down.
13:58:26 *** Osai^zZz has joined #openttd
13:58:47 <Eddi|zuHause> you mean like (x&0x3)<<2+(x&0xC)>>2?
13:59:41 <Eddi|zuHause> better to use GB() i believe :)
14:00:05 <Eddi|zuHause> GB(x,0,2)<<2+GB(x,2,2)>>2
14:01:07 *** Osai^zZz is now known as Osai
14:01:48 <skidd13> Eddi|zuHause: yeah, that's what I was thinking of.
14:02:11 <Eddi|zuHause> spaces are irrelevant :)
14:02:25 <Eddi|zuHause> i am not trying to get a patch commited after all ;)
14:02:35 <SmatZ> Eddi|zuHause: beware of operator priority
14:03:10 <Eddi|zuHause> SmatZ: << should be a multiplying operator, or not?
14:03:24 <skidd13> To be secure: (RoadBits)((GB(r, 0, 2) << 2) + (GB(r, 2, 2) >> 2))
14:03:28 <SmatZ> << and >> have lower priority than +, -
14:03:41 <Eddi|zuHause> if you say so :)
14:04:09 <Belugas> Eddi|zuHause, i was just kidding :)
14:04:44 <Eddi|zuHause> i was not taking you seriously anyway :p
14:38:33 *** Brianetta has joined #openttd
14:45:56 *** ChanServ sets mode: +v Belugas
14:45:56 *** ChanServ sets mode: +v orudge
14:48:35 *** dihedral_ has joined #openttd
14:48:38 *** dihedral_ is now known as dihedral
15:01:06 *** NukeBuster has left #openttd
15:03:36 *** Chicago_R_A has joined #openttd
15:03:43 <CIA-1> OpenTTD: rubidium * r10508 /trunk/src/ (8 files in 2 dirs): -Codechange: allow customizable animation schemes for industries.
15:04:09 <Chicago_R_A> nice one, Rubidium
15:04:15 *** NukeBuster has joined #openttd
15:04:24 *** JazzyJaffa has joined #openttd
15:12:52 *** Digitalfox has joined #openttd
15:13:52 <Digitalfox> Every time i try to build a bank i have an assertion... Using windows build 10508 on temperate climate :\
15:14:13 <Digitalfox> This is on towns with more than 1200 of population
15:14:27 <Phazorx> openttd: /home/ottdcoop/svn-public/src/industry_cmd.cpp:125: const IndustryTileSpec* GetIndustryTileSpec(IndustryGfx): Assertion `gfx < INVALID_INDUSTRYTILE' failed.
15:14:47 <Maedhros> yeah, some of us are getting it too, but we have no idea why at the moment
15:15:31 <Digitalfox> Maedhros: ok, will wait for a solution :)
15:15:40 <Rubidium> always nice to have bugs that don't happen on half of the systems, as it reduces the amount of people that can debug and reduces the change it is fixed quickly :(
15:15:44 <Phazorx> there was soemthing about industry tile change recently
15:15:54 <Phazorx> bust strange - that game has 5 industries only
15:16:16 <Phazorx> !openttd commit 10495
15:16:18 <_42_> Commit by belugas :: r10495 /trunk/src/newgrf.cpp (2007-07-10 00:10:19 UTC)
15:16:20 <_42_> -Codechange: Add the Action 00 property handlers for Industries and Industry tiles
15:17:04 <Digitalfox> Rubidium: True.. Because yesterday with build 10502 i had assertions or the message of not being able to build banks on that spot.. But i cound't figure why some times i had assertions while in the others just the message box :\
15:18:24 <Digitalfox> I'm using TTRS 3.02A, but i don't know if it matters for the case :\
15:18:56 <Rubidium> it even happens in trunk without any grfs
15:19:15 <Rubidium> I heard (can reproduce it myself with several compilers)
15:20:26 <Digitalfox> I was abble to build a bank right now just by deactivating all newgrf... :\
15:24:55 <Chicago_R_A> Out of curiosity...
15:25:03 <Digitalfox> Rubidium: Just by deactivating TTRS 3.02A i no longer have assertions.. Even with all mu newgrf activated
15:25:07 <Chicago_R_A> If you re-activate TTRS 3.02A does it still work?
15:25:21 <Chicago_R_A> Or does it crash when you re-load it?
15:25:49 <Digitalfox> I think i just asnwer that question ;)
15:26:25 <Chicago_R_A> You stated that it works if you "deactivate" TTRS 3.02A... I was asking about what happens if you turn it back on AFTER building the bank
15:27:50 <Digitalfox> Chicago_R_A: I have an assertion :\
15:28:03 <Digitalfox> If i try to build another bank
15:28:23 <Chicago_R_A> Ok... but after you re-activated it, the first bank loaded properly?
15:29:36 <Digitalfox> Didn't ttrs 3.02 give new cargo to banks or changes its behavior?
15:30:10 <Rubidium> Digitalfox: it doesn't
15:34:19 <Digitalfox> Shouldn't ttrs3 replace original banks sprites?
15:35:01 <Eddi|zuHause> not without newindustries, i believe
15:36:04 <Chicago_R_A> Good to know :) I was always wondering about why the banks never looked like they do on Z's website.
15:38:47 <Maedhros> hah, it is ttrs3, after all
15:39:14 <Maedhros> it must be because parts of the newindustries support have been committed, but it isn't finished yet
15:44:56 <Chicago_R_A> What about banks relates to new industries in TTRS3? I thought it was just a sprite replacement.... obviously I'm wrong :)
15:45:51 <Chicago_R_A> ...perhaps I should go back and re-read Z's readme :(
15:46:07 <Maedhros> it was in ttrs2, but i think ttrs3 uses newindustries for the banks (i can't remember why though)
15:47:01 <Digitalfox> But Rubidium didn't you say that assertions also happened without any newgrf?
15:47:10 <Belugas> thinks so too... but for sure, ttrs3 introduces oil station (or something like that)
15:52:24 <Arie^> I (might) found a bug, i normally use 5.2 but just tested it in 5.3 rc2 and it was there too. I searched bug spray (don't have an account there) and didn't find the bug there. Now the bug:
15:52:44 <Arie^> When a road occupies a half square it's possible to buy the land without destroying the road. This is the case is you own the road yourself, it also works if I build a scenario in which a town owns a half road and play the scenario.
15:53:21 <Arie^> I know it's minor but it could affect (online) play
15:53:42 <Arie^> If an opponent builds the road and another person buys that road.
15:54:54 *** glx|away has joined #openttd
15:54:54 *** ChanServ sets mode: +v glx|away
15:59:21 <Maedhros> you can do all sorts of things like that with half roads, for some reason
16:01:01 <hylje> its working as intended
16:22:14 <XAVeRY> well, when I choose my language in the options menu
16:22:23 <XAVeRY> some characters appear as "?", what is not nice.
16:22:50 <SmatZ> the same happens for me :(
16:23:02 <SmatZ> but I am too lazy to solve that, so I use english...
16:23:09 <XAVeRY> any way to cure this problem?
16:23:16 <XAVeRY> fonts - can you say something more?
16:23:58 <hylje> no i havent stumbled upon it
16:24:25 <hylje> but youre missing glyphs
16:25:37 <Sacro> don't people read the READMAE
16:26:10 <hylje> its called README, so no
16:26:22 <hylje> but if it was named DONOTREAD..
16:26:53 <XAVeRY> just seemed too obvious to read the README of OpenTTD.
16:27:01 <Sacro> perhaps we should boot people who ask questions that are answered in the readme
16:28:05 <Belugas> hey... we are men. Men do not need README. They just try ;)
16:28:12 <Belugas> or so does my wife tells me :D
16:28:45 <XAVeRY> who said that I were a man?
16:29:10 <Sacro> daniel tends to be a mans name
16:29:31 <XAVeRY> people tend to put fake data in this "Real Name" thingy.
16:30:02 <peter1138> well whatever, read the readme and it'll tell you
16:30:10 <XAVeRY> yeah yeah, I know now.
16:37:44 <CIA-1> OpenTTD: peter1138 * r10509 /trunk/src/newgrf_station.cpp:
16:37:44 <CIA-1> OpenTTD: -Codechange: cache expensive newgrf station variables during
16:37:44 <CIA-1> OpenTTD: sprite lookups/callbacks.
16:43:17 <alex> i have 10 players on 4 different servers
16:43:23 <alex> and its only using 1% cpu
16:43:31 <alex> i love you openttd + linux
16:43:55 <izhirahider> alex, how about memory taken?
16:54:16 *** ChanServ sets mode: +o orudge
16:56:07 *** glx|away is now known as glx
16:58:32 *** Osai is now known as Osai^Kendo
17:01:57 *** |Jeroen| has joined #openttd
17:02:32 <CIA-1> OpenTTD: miham * r10510 /trunk/src/lang/ (13 files in 2 dirs): (log message trimmed)
17:02:32 <CIA-1> OpenTTD: -Update: WebTranslator2 update to 2007-07-11 19:01:42
17:02:32 <CIA-1> OpenTTD: brazilian_portuguese - 8 fixed by tucalipe (8)
17:02:32 <CIA-1> OpenTTD: bulgarian - 33 fixed by thetitan (33)
17:02:32 <CIA-1> OpenTTD: catalan - 6 fixed, 81 changed by arnaullv (87)
17:02:33 <CIA-1> OpenTTD: dutch - 6 fixed by habell (6)
17:02:35 <CIA-1> OpenTTD: french - 6 fixed by glx (6)
17:08:59 <izhirahider> prospecting new primary industries doesn't work with already created savegames :/
17:09:10 *** BobingAbout has joined #openttd
17:13:08 *** BobingAbout has left #openttd
17:14:54 <Maedhros> like most patches, the option is saved with the game, so you have to enable it again when loading old games
17:40:44 <alex> whats the option to turn on the advanced cargo placment thingy?
17:41:32 <alex> so that goods go into one train, rather than spread out to all of them
17:47:25 <SmatZ> maybe the Advanced loading algorithm?
17:48:12 *** skidd13 has joined #openttd
17:53:10 <Eddi|zuHause> do these two actually get along meanwhile?
18:08:04 <Eddi|zuHause> well, there used to be this problem of not allowing more than 1 train loading simultaneously
18:10:00 <Maedhros> ah yes. that's fixed anyway, since we have true fifo loading now
18:10:26 *** Sacro|Laptop has joined #openttd
18:17:35 <skidd13> new tile = TILE_ADD(tile, _roadblock_tileadd[0]): _roadblock_tileadd[0] = { 0, -1} //< The new tile is the NW neighbor of tile, isn't it?
18:26:41 <skidd13> Hmm, damn I can't get the problem of my patch then. :(
18:27:46 <skidd13> just a single part as example.
18:28:24 <Noldo> what do those numbers mean?
18:28:39 <Belugas> first = x, second = y
18:29:00 <Belugas> so no displacement on the x, one to the "left"
18:29:12 <Belugas> 0,0 = the tile you're at
18:29:24 <Noldo> and x is E-W and y is N-S direction?
18:30:41 <skidd13> Noldo: No x+ y+ = South x- x- = North AFAIK
18:32:03 <SmatZ> Belugas: is right ... all of you are right :)
18:34:31 <Belugas> what you're trying to do :)
18:35:07 <Eddi|zuHause> skidd13: i remember i once tweaked town growth locally by inverting some lookups by adding/removing some ^2
18:35:09 <Wolf01> skidd13, make towns build directly in the adjacent tile and then make the connection with the other road, so you have at least half a road
18:35:38 <Eddi|zuHause> but that might not be what you want
18:37:38 <skidd13> From the point of code I treat every road tile as crossing and crop the unneeded arms off.
18:38:44 <skidd13> But ingame it seems not to work correct. Even in this very early (and simple) state.
18:40:11 <skidd13> A 4-way crossing should end up in a 3-way if it's neighbor is an industry tile but I does not do this.
18:51:13 <skidd13> If someone get's a solution, please PM. Thanks. Cya
18:59:55 *** Digitalfox_Desktop has joined #openttd
19:08:26 <alex> how do you kick / ban someone?
19:09:24 <Wolf01> it should be in the clients list
19:14:47 <alex> rcon_password in console in the client?\
19:21:36 <Wolf01> you should set the rcon password in the server openttd.cfg and then from the client with rcon "pass" "command" you should be able to control the server
19:31:53 *** NW|Aerandir has joined #openttd
19:41:16 <alex> whats the command to bring up client id's?
19:44:20 *** SierraRomeo has joined #openttd
19:45:49 *** SierraRomeo is now known as Ricardo-fireball
19:48:17 <Ricardo-fireball> i have something on my heart, it comes from wiki field, is this good place to say such thing ?
19:49:32 <Belugas> but hard to judge without you saying it :D
19:52:03 <alex> can you change server settings while the server is up and running?
19:52:22 <alex> peter1138: whats command for station spread?
19:56:27 <alex> Relaying command: station_spread
19:56:27 <alex> ERROR: command or variable not found
20:01:04 <SmatZ> alex patch station_spread 10
20:04:44 <SpComb> perhaps a printed screenshot embedded in a cake, but not a screenshot. Also, it's not in PNG format :P
20:06:05 <SpComb> but did you have a party for r10000?
20:06:26 *** Chris82 has joined #openttd
20:06:36 <SpComb> was it r10000 counting from the origional r1, or r1 from the new repo? Did you make the r10000 commit from the part? :P
20:06:38 <Chris82> I was looking for an openttd icon graphic, can it be downloaded somewhere?
20:07:32 <SmatZ> Chris82: maybe SVG version is at wiki
20:07:54 <Chris82> I was browsing the wiki before but was not successful finding anything
20:09:27 <SmatZ> html/elrail.svg .. the only svg I found
20:12:27 <peter1138> SpComb: "original", and no, it was from current r1
20:12:36 <peter1138> and only for some .nl people
20:17:16 *** Ricardo-fireball has quit IRC
20:22:04 <CIA-1> OpenTTD: truelight * r10511 /extra/pngcodec/Makefile: -Fix: a very simple way to allow EXTENSION for pngcodec executable
20:30:02 *** Osai^Kendo is now known as Osai
20:33:35 <CIA-1> OpenTTD: truelight * r10512 /extra/pngcodec/ (minipng.cpp pngcodec.cpp): -Fix: use stdlib.h, not malloc.h
20:34:56 *** skidd13 has joined #openttd
20:38:32 *** skidd13 has joined #openttd
20:38:40 *** skidd13 has joined #openttd
20:39:31 <skidd13> I don't get some thread notices from the forum. Is there any WIP?
20:43:05 <Belugas> we are always on WIP :)
20:44:31 <skidd13> I noticed that there have been some posts after my last visit on a topic which I'm watching. But the forum didn't send me a mail.
20:45:13 <glx> I used to drag the "new post" icon in a tab but that doesn't work now
20:45:54 <Belugas> skidd13 : it happened to me too. don't know why
20:48:46 <skidd13> Maybe ECHELON eats our mails. :)
20:49:14 <Sacro> you know about ECHELON?
20:49:24 <Chris82> skidd13 do you use an ISP mail server?
20:49:42 <Chris82> I've noticed that ASSP only let the forum mails through after I whitelisted them
20:50:06 <skidd13> Chris82: No a freemailer.
20:50:21 <Chris82> oh well then they could be easily identified as spam
20:50:51 <skidd13> No, I switched off the sucking spam filter and let icedove do it.
20:53:32 <skidd13> Trunk is realy fast ATM. Have some huge optimisation been included in the recent 50 revs?
20:55:04 <Ailure> Not much of optimizations from what I seen
20:55:10 <Ailure> but there's been some code cleanup
20:55:19 <Ailure> not that I looked in the actual source though
20:56:43 <skidd13> I'd say ~20% faster than 100rev ago. Or maybe it's the compiler update.
20:58:52 <peter1138> 10509 might help a bit, but only with certain newgrf stations that are large
20:59:53 <peter1138> 10505 and 10504 might help a bit too
21:00:39 <peter1138> every little helps :)
21:03:25 <peter1138> possibly 10471 helps if you're on windows
21:03:45 <peter1138> why am i doing this? :p
21:04:49 <skidd13> It's enough peter... and I'm definitely not on Mr Gates spysystem...
21:19:40 <peter1138> SmatZ: good catch, i suspected something there, heh
21:20:09 <peter1138> wondering if the fix could have any negative side affect
21:24:15 *** ThomasNL has joined #openttd
21:28:07 <SmatZ> i did some tests and it behave ok
21:28:20 <SmatZ> anyway - if there will be any problem, somebody will report it
21:31:57 <CIA-1> OpenTTD: peter1138 * r10513 /trunk/src/vehicle.cpp: -Fix [FS#1022]: use vehicle subtile position to update cache, not tile, so that collision detection works on bridges and tunnels.
21:36:43 *** Thomas[NL] has joined #openttd
21:37:43 <peter1138> SmatZ, micro-optimisation: (x | y) or (x + y)? heh
21:38:22 *** glx|away has joined #openttd
21:38:22 *** ChanServ sets mode: +v glx|away
21:38:26 <peter1138> hmm, | is two instructions, + is one
21:38:54 <Rubidium> I'd say that an or is technically simpler (on chip) and might therefor be faster (no carrying of bits etc)
21:39:26 <Eddi|zuHause> why would | be two instructions?
21:40:17 <peter1138> in this case it puts the result in a different register from either original values
21:41:03 <SmatZ> it depends if it needs the new value
21:41:09 <SmatZ> or the compiler is a bit dumb
21:41:11 <peter1138> mov %esi,%eax then or %edi,%eax
21:41:29 <peter1138> lea (%esi,%edi,1),%eax
21:42:17 <peter1138> it's gcc, so of course the compiler is dumb :)
21:42:58 <SmatZ> well, the lea instruction made a good point
21:43:02 <Eddi|zuHause> what exactly does lea do?
21:43:35 <SmatZ> it was intended to compute address of some member of an array
21:43:43 <peter1138> "load effective address"
21:44:06 <SmatZ> like lea eax,[edx*8+ecx+123] ... it is very powerfull
21:44:13 <Eddi|zuHause> so it's basically a dirty hack ;)
21:44:58 <SmatZ> but it cannot work with memory operands ... add, or can
21:45:34 <SmatZ> and in a i386 architecture with rather few registers, loading operands into registers may slow down the program
21:45:52 <peter1138> this is basically an example of CISC
21:46:04 <peter1138> though probably my definition is wrong ;)
21:47:00 <Eddi|zuHause> yeah, you would probably not find such an instruction on a RISC architecture
21:49:16 <SmatZ> RISC processors may have the MADD instruction
21:49:46 <SmatZ> google : "Conversely, each floating-point execution unit in a typical RISC chip can perform a MADD."
21:51:40 <Eddi|zuHause> but we do not use floats here
21:52:43 <Eddi|zuHause> and floats have the special property of needing both additions (of exponents) and multiplication (of mantissas) at the same time
21:53:29 <Eddi|zuHause> hmz... i need bigger font... too far away from screen...
21:54:05 *** eQualizer has joined #openttd
21:58:20 *** alienjeff has joined #openttd
21:59:40 <SmatZ> just google indexed it :) sometimes google can find interesting things
21:59:59 <peter1138> removing a "& TOTAL_HASH_MASK" causes gcc to use lea instead of or in one place
22:00:40 <SmatZ> it is smart in one place
22:00:58 <SmatZ> TOTAL_HASH_MASK was useless anyway
22:01:46 <peter1138> i'm assuming "or %edx,%eax" is less cycles than "lea (%edx,%eax,1),%eax" though that is just guessing...
22:02:41 <alex> server has over 300 planes
22:02:41 <SmatZ> it would depend on the CPU maybe
22:03:04 <peter1138> it's hard trying to figure out what's going on with an optimised build, heh
22:03:14 <SmatZ> but lea should be better as it is evalued in earlier stage
22:03:36 <SmatZ> so it may go without blocking the alu
22:03:53 <SmatZ> I read this a long time ago
22:04:12 <SmatZ> maybe it is evaluated earlier, but takes more cycles ... or newer cpus use the same alu
22:04:24 <peter1138> alex: aircraft go from a to b in a straight line. it's hardly any work at all
22:04:57 <Eddi|zuHause> don't newer processors have 10 alus in parallel anyway?
22:05:16 *** Kittysune has joined #openttd
22:05:26 <peter1138> this will be a plain 386 build, i guess
22:05:52 <SmatZ> Eddi|zuHause: sure they do :)
22:06:27 *** alienjeff has left #openttd
22:06:39 <SmatZ> but if lea was so great, compiler would use 'lea eax,[eax+ebx]' instead of 'add eax,ebx',but it doesn't
22:08:05 <SmatZ> all add/or/... simple alu instructions are executed in one tick
22:08:17 *** Kittysune is now known as Ailure
22:09:36 <Eddi|zuHause> it all depends on how effectively you can balance the pipeline(s)
22:10:14 <Eddi|zuHause> with data dependencies and stuff
22:10:29 <SmatZ> so - for AMD64 - LEA takes 2 cycles, ADD takes one cycle
22:11:00 <SmatZ> yes it is true ... but CPUs are rather smart :)
22:11:05 <peter1138> i miss status register flags in C :(
22:11:35 <SmatZ> a month ago, I got a 20% speed increase just by using cmovcc instead of jcc
22:12:19 <SmatZ> detection of overflows is crazy without them
22:12:41 <Eddi|zuHause> if c was supposed to be so low level, why wasn't this added?
22:12:43 <peter1138> i guess "if (foo == 0)" can use it
22:13:17 <peter1138> C seems basically to have totally ignored overflows
22:15:09 <SmatZ> asm version if naive algorithm was 7 times faster than the one written in C
22:15:32 <SmatZ> just because of the 'adc' instructions to sum long numbers (>64 bits)
22:15:47 <ProfFrink> SmatZ: So why are you working opn openTTD? Come, join the PatchDevs!
22:17:32 *** eQualize1 has joined #openttd
22:17:32 <Eddi|zuHause> 2^2^24 is not exactly an every day number to multiply with :p
22:18:34 <SmatZ> ProfFrink: I have so few time, and programming in C is faster than in asm
22:18:41 <Eddi|zuHause> i also learned once how to use FFT for (polynomial) multiplication
22:19:32 <SmatZ> Eddi|zuHause: so true :)
22:24:16 <SmatZ> anyway - the 'mov eax,edx ; add eax,ebx ' may be faster because of better forwarding
22:43:42 <Eddi|zuHause> ENotAGamingChannel
22:49:08 *** Nickman has joined #openttd
22:58:11 <CIA-1> OpenTTD: rubidium * r10514 /trunk/src/ (4 files): -Codechange: add support for getting the nearest industry with a given type.
23:01:15 *** Eddi|zuHause2 has joined #openttd
23:10:37 <CIA-1> OpenTTD: rubidium * r10515 /trunk/src/ (3 files): -Codechange: allow getting some more data about the environment of an industry.
23:18:54 *** iPandaMojo has joined #openttd
23:21:07 <Smoovious> <Eddi|zuHause> ENotAGamingChannel <--- well, it is... sorta
23:27:28 *** glx|away is now known as glx
23:47:46 *** JazzyJaffa has joined #openttd
23:55:28 <Eddi|zuHause2> no, it is a development channel...
23:59:45 *** ThePizzaKing has joined #openttd
continue to next day ⏵