Config
Log for #openttd on 6th July 2007:
Times are UTC Toggle Colours
00:00:36  *** Sacro|Laptop [~Ben@adsl-87-102-43-21.karoo.KCOM.COM] has quit [Quit: Leaving]
00:02:03  *** Sacro|Laptop [~Ben@adsl-87-102-43-21.karoo.KCOM.COM] has joined #openttd
00:03:29  <Sionide> why do you ask NukeBuster ?
00:08:13  <NukeBuster> i am trying to rediff a patch from before that...
00:08:27  <NukeBuster> from 7236 to be precise
00:25:17  *** XeryusTC [~irc@cc480157-b.sneek1.fr.home.nl] has quit [Quit: Solong, and thanks for all the fish.]
00:26:50  *** Gekko [~brendan@58.168.99.207] has joined #openttd
01:02:20  *** scrooge [~balli@dsl-149-96-155.hive.is] has quit [Quit: Konversation terminated!]
01:02:21  *** lolman [~lolman@cpc3-leds2-0-0-cust55.leed.cable.ntl.com] has quit [Read error: Connection reset by peer]
01:04:01  *** KritiK [Maxim@ppp83-237-102-76.pppoe.mtu-net.ru] has quit [Quit: Leaving]
01:06:31  *** Gekko [~brendan@58.168.99.207] has quit [Remote host closed the connection]
01:31:25  *** Eddi|zuHause2 [~johekr@p54B748B9.dip0.t-ipconnect.de] has joined #openttd
01:34:30  *** NukeBuster [~opera@a62-251-21-79.adsl.xs4all.nl] has quit [Read error: Connection reset by peer]
01:34:37  *** NukeBuster [~opera@a62-251-21-79.adsl.xs4all.nl] has joined #openttd
01:35:26  <NukeBuster> anyone still awake?
01:35:37  <Frostregen> yes
01:35:57  *** glx [glx@bny93-6-82-245-156-124.fbx.proxad.net] has quit [Quit: bye]
01:35:58  <Sacro|Laptop> no
01:36:10  <NukeBuster> What does it mean when a number is followed by an U for example 15U
01:36:19  <NukeBuster> -                       int t = max(1, dist - 4);
01:36:19  <NukeBuster> +                       int t = max(1U, dist - 4);
01:36:29  <Frostregen> unsigned
01:36:41  *** TPK [~jeff@211.28.160.16] has joined #openttd
01:36:43  *** ThePizzaKing [~jeff@c211-28-160-16.eburwd2.vic.optusnet.com.au] has quit [Read error: Connection reset by peer]
01:37:01  <NukeBuster> int t = max((uint)1, dist - 4);
01:37:06  <NukeBuster> so would be the same?
01:37:14  *** TPK is now known as ThePizzaKing
01:37:48  <Frostregen> should be
01:37:53  *** Eddi|zuHause [~johekr@p54B778AC.dip.t-dialin.net] has quit [Ping timeout: 480 seconds]
01:38:10  <NukeBuster> ok thank you for clearing that up
01:38:31  <Frostregen> maybe the size is different
01:42:33  <NukeBuster> is it possible to have an unsigned enum?
01:44:56  <Frostregen> enum?
01:45:04  <Frostregen> what do you want to do?
01:45:25  <NukeBuster> i seem to have 3 constants which are stored in an enum
01:47:45  <Frostregen> and?
01:47:47  <NukeBuster> now they used to be used with max()
01:47:49  <NukeBuster> http://paste.openttd.org/151
01:48:51  <NukeBuster> but max() now only accepts uints.. as i can see in the changes from 8054:8055
01:49:58  <Frostregen> casting to uint does not work?
01:50:04  <Frostregen> or int
01:50:31  *** lolman [~lolman@cpc3-leds2-0-0-cust55.leed.cable.ntl.com] has joined #openttd
01:50:33  <NukeBuster> http://paste.openttd.org/152
01:50:41  <NukeBuster> hmm...
01:53:26  <NukeBuster> well... typecasting to int worked :D
01:53:31  <NukeBuster> it compiles flawlessly
01:53:40  <NukeBuster> thank you very much!
01:53:59  <Frostregen> np
01:54:07  <NukeBuster> now i can continue svn upping :P
01:54:12  <Frostregen> i don't get why they changed everything to enum's anyway
02:00:56  *** Digitalfox [~Digitalfo@bl7-180-89.dsl.telepac.pt] has quit [Quit: Bye]
02:05:47  *** Digitalfox [~chatzilla@bl7-180-89.dsl.telepac.pt] has joined #openttd
02:09:50  *** smoovi [~smoovi@dslb-088-073-072-089.pools.arcor-ip.net] has quit [Quit: #idlerpg]
02:17:06  <Frostregen> in case you need to convert an int back to an enum: enumName(8) should do the trick
02:19:51  <NukeBuster> ah thank you, but that wasn't needed to get the result :)
02:20:07  <Frostregen> ok ;)
02:20:13  <NukeBuster> i'm now at r9900
02:22:34  <Smoovious> peter1138: ping
02:38:03  *** Digitalfox [~chatzilla@bl7-180-89.dsl.telepac.pt] has quit [Quit: ChatZilla 0.9.78.1 [Firefox 2.0.0.3/2007030919]]
02:45:08  <Sacro|Laptop> Smoovious: its 3:45 am
02:46:47  <Smoovious> and?
02:48:22  <NukeBuster> 4.45 here :P
03:03:48  *** Nigel [~nigel@202.154.148.243] has joined #openttd
03:06:32  *** Nigel_ [~nigel@202.154.148.243] has quit [Ping timeout: 480 seconds]
03:12:27  <Belugas> 11:13h and i've got enough of fighting sleep... i surrender
03:12:35  <Belugas> *pouff*
03:12:39  <Belugas> rrrr
03:12:40  <Belugas> zzzzzzz
03:12:42  <Belugas> .....
03:13:21  <Smoovious> o/
03:14:03  <NukeBuster> gehe....
03:19:20  <NukeBuster> hmm... it's on #openttd.notice before i see my flyspray entry
03:19:29  <NukeBuster> in my browser...
03:20:14  *** Cablekid [~Cablekid@cpe-70-92-102-143.bak.res.rr.com] has joined #openttd
03:20:19  <Smoovious> IRC is more efficient... much less decoding and rendering involved
03:21:06  <Cablekid> Hello
03:21:37  <Smoovious> ye/
03:21:39  <Smoovious> yes?
03:22:26  <Cablekid> Just saying hi, I'm interested in your coop concept
03:23:00  <Cablekid> It seems like a neat idea all the stuff you guys do in the server
03:23:30  <Smoovious> ok
03:33:03  <_Ben_> any dev's around, or anybody who has a clue as to their intensions in respect to the 32bpp + zoom stuff?
03:33:46  <NukeBuster> well i'm out... g'night
03:34:09  *** NukeBuster [~opera@a62-251-21-79.adsl.xs4all.nl] has left #openttd []
03:40:40  *** _Ben_ [~Ben@91.84.106.114] has quit [Read error: Connection reset by peer]
03:42:03  *** Ammler [~Ammler@adsl-84-227-160-31.adslplus.ch] has quit [Ping timeout: 480 seconds]
03:46:09  *** Cablekid [~Cablekid@cpe-70-92-102-143.bak.res.rr.com] has quit []
04:34:26  *** Frostregen_ [~sucks@dslb-084-058-148-131.pools.arcor-ip.net] has joined #openttd
04:39:56  *** Frostregen [~sucks@dslb-084-058-174-143.pools.arcor-ip.net] has quit [Ping timeout: 480 seconds]
04:40:05  *** Frostregen_ is now known as Frostregen
05:16:56  *** HMage [Queneex@hmage.dialup.corbina.ru] has joined #openttd
05:46:45  *** ThePizzaKing [~jeff@211.28.160.16] has quit [Ping timeout: 480 seconds]
05:55:39  *** ThePizzaKing [~jeff@c211-28-160-16.eburwd2.vic.optusnet.com.au] has joined #openttd
06:07:03  *** Osai^zZz [~Osai@pD9EB668C.dip.t-dialin.net] has joined #openttd
06:34:09  *** Osai^zZz [~Osai@pD9EB668C.dip.t-dialin.net] has quit [Quit: Osai^zZz]
06:40:25  *** elmex [~elmex@e180066245.adsl.alicedsl.de] has joined #openttd
07:01:30  *** TinoM|Mobil [~tino@i5387CBAC.versanet.de] has joined #openttd
07:04:07  *** Chris82 [~chris@p579E1E89.dip.t-dialin.net] has joined #openttd
07:06:04  *** elmex [~elmex@e180066245.adsl.alicedsl.de] has quit [Remote host closed the connection]
07:23:57  *** setrodox [setrodox@85-125-222-161.dynamic.xdsl-line.inode.at] has joined #openttd
07:24:24  <CIA-1> OpenTTD: rubidium * r10451 /trunk/src/ (8 files in 3 dirs): -Add: support for "prospecting" raw industries, i.e. you pay an amount of money and then it might (with a given chance) build a raw industry somewhere on the map.
07:25:50  *** Nigel_ [~nigel@202.154.148.243] has joined #openttd
07:28:11  *** elmex [~elmex@e180066245.adsl.alicedsl.de] has joined #openttd
07:28:47  *** Nigel [~nigel@202.154.148.243] has quit [Ping timeout: 480 seconds]
07:29:24  <CIA-1> OpenTTD: rubidium * r10452 /trunk/src/lang/ (35 files): -Update: remove the string that has been removed in r10451 from all other translations.
07:45:41  *** Purno [~Purno@5357D37C.cable.casema.nl] has joined #openttd
07:51:28  *** Purno_ [~Purno@5357D37C.cable.casema.nl] has joined #openttd
07:51:28  *** Purno [~Purno@5357D37C.cable.casema.nl] has quit [Read error: Connection reset by peer]
07:52:23  *** Netsplit charon.oftc.net <-> reticulum.oftc.net quits: Purno_, mikk36, Prof_Frink, blathijs_, Eddi|zuHause2, raimar3
07:53:48  *** Netsplit over, joins: mikk36
07:56:07  *** Eddi|zuHause2 [~johekr@p54B748B9.dip0.t-ipconnect.de] has joined #openttd
07:57:23  *** blathijs [~matthijs@katherina.student.utwente.nl] has joined #openttd
07:57:45  *** Prof_Frink [~proffrink@5acb49ee.bb.sky.com] has joined #openttd
07:59:25  *** Purno [~Purno@5357D37C.cable.casema.nl] has joined #openttd
08:00:08  *** XeryusTC [~irc@cc480157-b.sneek1.fr.home.nl] has joined #openttd
08:05:04  *** Maedhros [~jc@i-195-137-43-74.freedom2surf.net] has joined #openttd
08:09:10  *** raimar3 [~hawk@p5489DDEB.dip.t-dialin.net] has joined #openttd
08:10:13  *** Ammler [~Ammler@adsl-84-227-160-31.adslplus.ch] has joined #openttd
08:32:03  *** tokai|ni [~tokai@p54B81BC3.dip0.t-ipconnect.de] has quit [Ping timeout: 480 seconds]
08:32:20  <CIA-1> OpenTTD: peter1138 * r10453 /trunk/src/saveload.cpp: -Codechange: Allow save/load of empty (unallocated) strings
08:33:18  *** TinoM|Mobil [~tino@i5387CBAC.versanet.de] has quit [Remote host closed the connection]
08:34:00  *** tokai|ni [~tokai@p54B81CAB.dip0.t-ipconnect.de] has joined #openttd
08:37:22  <Chris82> hi
08:37:24  <Chris82> any dev here?
08:37:43  <Chris82> when I compile OpenTTD in debug mode can I somehow print out (on screen) the calculated values for the stuff I do
08:37:54  <Chris82> i.e. printf the costs etc. and how they are internally calculated
08:38:07  <Noldo> feel free to
08:39:56  <Maedhros> you can use printf, or DEBUG(misc, 0, ...)
08:40:10  <Chris82> thx
08:40:33  <Chris82> I am just trying to figure out how the game calculates the values for the patch I programmed yesterday
08:40:50  <Chris82> because there's no way I can explain the result, it's something totally different than what I intend to calculate
08:48:35  *** TinoM [~Tino@i5387CBAC.versanet.de] has joined #openttd
08:51:51  *** BamBam [~bambam@p5B04645C.dip.t-dialin.net] has joined #openttd
09:03:44  <Eddi|zuHause2> Chris82: did you try to change the "towncost" to "cost" a few lines above?
09:04:12  <Eddi|zuHause2> (you would have caught that if you made "towncost" local to the if block)
09:05:42  <Chris82> I figured the problem already
09:06:01  <Chris82> the whole thing doesn't work properly when I return cost.AddCost(blah)
09:06:13  <Chris82> I have to do first: 	cost.AddCost(_price.purchase_land * 10);
09:06:18  <Eddi|zuHause2> Chris82: and also we concluded that you should not modify purchase land at all, but instead modify clear land
09:06:19  <Chris82> and then my if check for the patch
09:06:22  <Chris82> and then just return cost;
09:06:29  <Chris82> I already made it work now
09:06:45  <Chris82> there's only one problem left, it doesn't increase costs when building on farm tiles
09:07:07  <Chris82> Eddi: Good conlusion :)
09:07:56  <Chris82> then I could save me the hassle of adding an if check to rail_cmd and the other corresponding files
09:09:33  <stillunknown> Is a this-> usefull when using a static member of a class?
09:10:27  <stillunknown> It seems a bit odd to me, since it's doing nothing with "this".
09:10:45  *** BamBam [~bambam@p5B04645C.dip.t-dialin.net] has left #openttd []
09:10:52  <stillunknown> Ah, unavailable, that sais enough ;-)
09:12:33  <Chris82> Eddi: the problem that the whole calculation didn't work was that I just wrote "Town *t" instead of "const Town *t"
09:12:56  *** kaan [~Klaus@82.192.152.195] has joined #openttd
09:13:03  <kaan> hi all
09:15:12  <Chris82> hi
09:17:19  <Eddi|zuHause2> Chris82: why would that matter?
09:23:08  <Chris82> I don't know but it was calculated properly afterwards
09:23:20  *** Brianetta [~brian@82-39-52-234.cable.ubr03.benw.blueyonder.co.uk] has joined #openttd
09:23:21  <Chris82> uhm a return is like a break, right?
09:23:48  <Eddi|zuHause2> no, break exits the loop, return exits the function
09:35:54  *** smoovi [~smoovi@dslb-088-073-072-089.pools.arcor-ip.net] has joined #openttd
09:41:00  *** lion12 [~lolin12@pD95EFAFE.dip.t-dialin.net] has joined #openttd
09:46:22  *** elmex [~elmex@e180066245.adsl.alicedsl.de] has quit [Remote host closed the connection]
09:50:54  <lion12> is there already a possibility to leave the station construction dialog to stay open when building a station?
09:51:02  <lion12> maybe with 'hold some key' and click action?
09:52:04  <Eddi|zuHause2> if you use newgrf stations, the window will stay open
09:52:55  <lion12> hm, what about bus stops?
09:53:32  <lion12> i really think its laborious to build irregular shaped stations or several bus stops in a town and have to reopen die build dialog again and again
09:54:02  <lion12> yes, newgrf stations is ok - i see
09:54:28  <peter1138> yay for inconsistent behaviour :o
09:54:43  <peter1138> (and that bit's my fault, even, heh)
09:54:44  <hylje> are you going to fix it?
09:54:47  <Eddi|zuHause2> let's add a switch :)
09:55:00  <peter1138> i've not had any bug reports about it ;)
09:55:21  <Eddi|zuHause2> let's spam bugs.openttd.org until it is fixed :)
09:56:31  <lion12> hm, a possible feature request then?
09:56:45  <Maedhros> hmm. is it possible to find out if you're drawing a purchase window sprite with action 2?
09:57:03  <lion12> like shift+click in the windows start menu - yes, I know shift+click is the cost estimation
09:57:52  <peter1138> Maedhros: that's what the 'purchase list' cargo type is for
09:58:07  <Eddi|zuHause2> honestly, i would prefer a patch setting over another ctrl+click hack...
09:58:13  <Maedhros> peter1138: yeah, but since you can't draw transparent sprites in it (apparently) i need a new layout as well
09:58:42  <peter1138> yes
10:00:36  <kaan> peter1138: you closed the autoslopes topic saying that the patch woudnt go in trunk. Is this true for derived patches as well?
10:00:47  <Maedhros> aah, ok. suddently it all makes sense :)
10:01:45  <Maedhros> (unlike my spelling, tragically)
10:02:13  <Eddi|zuHause2> kaan: the patch will not go to trunk, but the feature very probably will
10:02:25  <Eddi|zuHause2> but it should be done properly...
10:02:34  <kaan> that wasnt my question ;)
10:03:07  <Eddi|zuHause2> kaan: there was some discussion about storing the slope in the tile
10:03:38  *** lolman [~lolman@cpc3-leds2-0-0-cust55.leed.cable.ntl.com] has quit [Read error: Connection reset by peer]
10:03:55  <kaan> Eddi|zuHause2: nice idea, but it was not what i wanted to know :P
10:04:36  <peter1138> kaan: no
10:04:37  <peter1138> well
10:04:51  <Eddi|zuHause2> what i mean is that it should probably be written from scratch, with some more fundamental changes
10:04:56  <peter1138> "a patch that does the same thing" would not be rejected
10:05:16  *** Osai^zZz [~Osai@pD9EB668C.dip.t-dialin.net] has joined #openttd
10:05:55  <kaan> so if i take ev's patch and refactor the hell out of it then it would be considered?
10:08:12  <stillunknown> You might as well rewrite it, probably makes for a cleaner patch.
10:09:29  <kaan> I know, but im planning to use ev's patch as a starting point to learn what changes are needed to make the functionallity desired
10:13:20  <stillunknown> Anyone know what this means: virtual void Tick() = 0;
10:13:25  <stillunknown> especially the = 0
10:13:42  <Eddi|zuHause2> i'd guess "abstract" :)
10:14:02  <Maedhros> i think the = 0 means it must be defined by every child class
10:17:09  <peter1138> makes it 'pure'
10:17:44  <peter1138> or abstract in some other dialects ;)
10:19:19  <Noldo> stillunknown: is it in vehicle?
10:20:04  *** Osai^zZz is now known as Osai
10:21:53  <stillunknown> Noldo: yes
10:22:43  <Noldo> good
10:23:31  <stillunknown> At least i know why it shouldn't be in my local copy.
10:25:00  <peter1138> 75]: 554 <195.112.37.172" target="_blank">195.112.37.172>: Helo command rejected: Access denied; from=<hnwwumddvf@yahoo.com> to=<kevin@pickupandjarvis.co.uk> proto=SMTP helo=<195.112.37.172" target="_blank">195.112.37.172>
10:25:04  <peter1138> [A[A[A[A[A[AA[A[A
10:25:06  <peter1138> errr
10:25:07  <peter1138> stupid mouse
10:25:16  <peter1138> -	virtual void Tick() = 0;
10:25:16  <peter1138> +	virtual void Tick();
10:25:23  <kaan> blame the mouse ;)
10:25:29  <peter1138> if you're referring to that... why? :p
10:25:31  *** Vikthor [~Vikthor@snat1.spoje.net] has joined #openttd
10:27:03  <stillunknown> peter1138: I didn't explicitly made the change, but it is needed, since in my case Train's, roadvehicles and ships share one tick function.
10:27:44  <peter1138> not a great advantage that, seeing as it's only 5 lines.
10:28:13  <Eddi|zuHause2> why share a Tick() function?
10:28:13  <peter1138> also your Vehicle::IsFront() would be better split up
10:28:53  <peter1138> Train::IsFront() { return HASBIT(this->subtype, Train_Front); }
10:29:06  <peter1138> RoadVehicle::IsFront() { return this->subtype == RVST_FRONT; }
10:29:07  <peter1138> etc
10:29:20  <peter1138> saves on some tests
10:29:23  <Eddi|zuHause2> the advantage of virtual functions is that it automatically calls the function of the actual vehicle, not the one of the "Vehicle" class
10:30:12  <Eddi|zuHause2> as you never should instantiate a "Vehicle", but always a "Train", "Ship", etc. v->Tick() should automatically call the correct function
10:30:53  <Biff> Vehicle is probably a abstract class which cannot be instanciated?
10:31:01  <stillunknown> Are you sure about that Eddi?
10:31:16  <peter1138> stillunknown: well, that's how it already works...
10:31:31  <stillunknown> I will make the changes.
10:31:48  <Eddi|zuHause2> Vehicle* v = new Train(); v->Tick(); //calls Tick() of Train class
10:32:00  <Eddi|zuHause2> Vehicle* v = new Ship(); v->Tick(); //calls Tick() of Ship class
10:32:17  <Eddi|zuHause2> that's how virtual functions work
10:32:40  <stillunknown> What i meant are they late binding or resolved at compile time?
10:32:54  <Eddi|zuHause2> virtual functions are resolved at runtime
10:33:57  <stillunknown> Not always.
10:34:31  <Eddi|zuHause2> well, there are special cases when the compiler can determine that it is only one possible call
10:34:52  *** raimar3 [~hawk@p5489DDEB.dip.t-dialin.net] has quit [Ping timeout: 480 seconds]
10:35:44  *** Brianetta [~brian@82-39-52-234.cable.ubr03.benw.blueyonder.co.uk] has quit [Quit: Tschüß]
10:35:48  <Eddi|zuHause2> if (whatever) v = new Train() else v = new Ship(); v->Tick(); // compiler cannot resolve, virtual function is resolved at runtime
10:36:28  <stillunknown> But once inside the Train class a this pointer should automaticly resolve to Train i assume.
10:36:44  <Eddi|zuHause2> no
10:36:59  <Eddi|zuHause2> "this" within a class could also resolve to a subclass
10:37:28  <stillunknown> So inside the Train this could resolve to RoadVehicle?
10:37:32  <stillunknown> for example
10:37:51  <Eddi|zuHause2> only if RoadVehicle inherits from Train
10:38:24  *** Progman [~progman@p57A1DC88.dip.t-dialin.net] has joined #openttd
10:43:59  *** raimar3 [~hawk@p5489D5C7.dip.t-dialin.net] has joined #openttd
10:46:11  <Noldo> some quick c++ tutorial might be a good thing
10:48:20  <stillunknown> I misread what Eddi said, i do know how virtual functions resolve.
10:49:25  <Chris82> Eddit: The idea of modyfing CmdLandscapeClear instead of CmdPurchaseLand doesn't work so easily
10:49:39  <Chris82> because I can't use cost.GetCost() anymore to get the previous costs added
10:55:07  <Eddi|zuHause2> Chris82: why would there be a "previous" cost?
10:55:20  <Eddi|zuHause2> clearing land should be the first item that creates a cost
10:55:58  *** Gekkko` [~Gekkko@CPE-58-168-99-207.nsw.bigpond.net.au] has joined #openttd
10:56:15  <Chris82> but when I modify the clear land and build a railway it only adds the costs for clearing the land nothing else
10:56:36  *** lion12 [~lolin12@pD95EFAFE.dip.t-dialin.net] has quit [Quit: ChatZilla 0.9.78.1 [Firefox 2.0.0.4/2007051502]]
10:56:48  <Eddi|zuHause2> so?
10:57:01  <Eddi|zuHause2> that's what you intend to modify, i thought?
10:59:07  <Chris82> yeah but it should still add the cost of the railway too of course
10:59:21  <Chris82> only the land should be more expensive when it's close to a town
10:59:40  <Chris82> that's why I modified the PurchaseLandArea thingy at first
10:59:40  <Eddi|zuHause2> return _tile_type_procs[GetTileType(tile)]->clear_tile_proc(tile, flags); <- that's the current result of a "clear land" command
10:59:44  <Eddi|zuHause2> just modify it
11:00:09  <Eddi|zuHause2> landscape.cpp:373
11:01:31  <Chris82>  I don't really understand that line, so it's hard for me to modify it
11:03:02  <Eddi|zuHause2> it calls the "clear_tile_proc" of the current tile, and returns the cost for that (e.g. it calls a different function for "house" as for "bare land")
11:03:08  *** Tlustoch [~last_evol@vetrnik.koleje.cuni.cz] has joined #openttd
11:03:15  <stillunknown> Every type of tile has a list of functions to certain tasks.
11:03:30  <Tlustoch> Hello.
11:03:30  <stillunknown> clear_tile is one of them
11:03:44  <Eddi|zuHause2> it's a C-version of a virtual function call :)
11:03:56  <stillunknown> Was about to say that.
11:03:56  <Tlustoch> Do you ever do something else than play/improve code?
11:04:19  <Eddi|zuHause2> no.
11:04:23  <Eddi|zuHause2> :p
11:05:23  <Eddi|zuHause2> Chris82: "_tile_type_procs" is the "dispatch table" of the tiles, "_tile_type_procs[GetTileType(tile)]" selects the functions belonging to the current tile type (like above, e.g. "house" or "bare land")
11:05:29  <Chris82> I think the problem simply is that building a railway doesn't call ClearLand but PurchaseLand on the tile
11:05:50  <Eddi|zuHause2> not in the original code
11:06:12  <Eddi|zuHause2> and PurchaseLand also calls ClearLand
11:06:30  <Eddi|zuHause2> just your patch was already flawed to begin with...
11:07:10  <Eddi|zuHause2> let's take your code snippet from yesterday: http://paste.openttd.org/150
11:07:37  <Eddi|zuHause2> in line 27, there is the call to clear land
11:07:58  <Chris82> yep
11:08:08  <Eddi|zuHause2> but the result should be assigned to "cost", not to "towncost", as towncost is not used afterwards
11:08:29  <Chris82> it's used in the if (_patches.town_construction_cost) { part
11:08:53  <Eddi|zuHause2> no, it's only overwritten, not used
11:09:13  <Chris82> oh ic
11:09:32  <stillunknown> This smells like a rewrite.
11:10:03  <Chris82> I rewrite it the third time already anyway :p
11:10:40  <Eddi|zuHause2> just refactor that "if (_patches.town_construction_cost)" block to the clear land function
11:11:18  <Chris82> I've done so already
11:11:50  <Eddi|zuHause2> make that function:
11:11:52  <Eddi|zuHause2> cost = tile_type_procs[GetTileType(tile)]->clear_tile_proc(tile, flags);
11:12:13  <Eddi|zuHause2> if (_patches.town_construction_cost) cost.AddCost(complex calculation)
11:12:15  <Eddi|zuHause2> return cost;
11:13:08  <Eddi|zuHause2> you can shape that even more functional, and just throw everything in the return statement :)
11:14:08  <Eddi|zuHause2> return tile_type_procs[GetTileType(tile)]->clear_tile_proc(tile, flags).AddCost(_patches.town_construction_cost?(complex calculation):0);
11:14:08  <Eddi|zuHause2> :p
11:15:24  <Chris82> oh my that's no what I would call readable code :D
11:15:31  <Chris82> ok let me try
11:15:50  <Eddi|zuHause2> (or maybe use MultiplyCost())
11:16:06  <Eddi|zuHause2> it's functional programming :
11:16:06  <Eddi|zuHause2> :)
11:16:31  <Eddi|zuHause2> it's an art :)
11:16:37  <Noldo> :P
11:16:40  <stillunknown> In functions that are not called often (aka not every tick), it's not so bad not to use inline if statements or a few intermediate variables.
11:16:46  <Noldo> recursion is your friend
11:17:30  <Noldo> stillunknown: compiler might optimize it away anyway
11:18:03  <Eddi|zuHause2> btw. if you use MultiplyCost, use :1, not :0 at the end :)
11:19:04  <stillunknown> I thought functional programming was just abstract programming in the sense of being proto code?
11:21:03  <Eddi|zuHause2> you probably thought wrong :)
11:21:32  <Chris82> functional programming is using Haskell, ewwww =D
11:21:44  <Chris82> or APL 2000 which is even more ewwwww
11:21:51  <Noldo> lisp
11:21:53  <Eddi|zuHause2> you can write functional programs in imperative (especially OO) languages
11:21:55  <Chris82> I really prefer Java or C++ oo style :D
11:22:09  <Eddi|zuHause2> and you can write imperative programs in functional languages
11:22:23  <Chris82> that's too high for me :p
11:22:57  <Eddi|zuHause2> but really, that .AddCost() and .MultiplyCost() is already very close to functional programming
11:26:34  <Eddi|zuHause2> Chris82: http://paste.openttd.org/153
11:26:39  <Chris82> 	return _tile_type_procs[GetTileType(tile)]->clear_tile_proc(tile, flags).AddCost(_patches.town_construction_cost ? ((cost.GetCost() * (t->population)) / 300 * (30000 / (distance + 15)) / 1000):0);
11:26:48  <Chris82> what should I do with the cost.GetCost() in this line?
11:26:57  <Chris82> I mean there is no cost in LandscapeClear
11:28:02  <Chris82> MultiplyCost is an existing function?
11:28:09  <Eddi|zuHause2> yes
11:28:19  <Eddi|zuHause2> like AddCost
11:30:46  <Eddi|zuHause2> there might be a +1 missing to restore the previous behaviour
11:30:57  <Chris82> ok I have something that compiles now, just 2 lines instead of the ~25 there were before
11:31:04  <Chris82> let's see what happens now :D
11:31:25  <Eddi|zuHause2> and i think i missed a (
11:31:51  <Chris82> dunno I didn't copy paste it
11:32:02  <Eddi|zuHause2> better like that :p
11:32:24  <Eddi|zuHause2> my snippets usually just make for medicore pseudocode :)
11:32:57  <Chris82> well your code has the same "error" that mine had :(
11:33:05  <Chris82> cost for building railway anywhere are 224
11:33:19  <Chris82> I have no idea where that number is coming from
11:33:41  <Chris82> with the first version of the patch I had everything was working except that increased costs on farm tiles weren't added
11:34:20  <Eddi|zuHause2> can i have the patch?
11:34:33  <Chris82> http://paste.openttd.org/154
11:34:46  <Chris82> or you mean a .diff for the complete thing?
11:34:52  <Eddi|zuHause2> yes
11:34:57  <Chris82> k hold on
11:36:29  <Eddi|zuHause2> i still don't know what that "const" is doing there
11:36:53  <Chris82> well anywhere else where the Town *t pointer is used a const is in front of it
11:36:56  <Chris82> in trunk code I mean
11:36:59  <Chris82> so I added it too
11:38:46  <peter1138> strange function :)
11:39:09  *** Sacro^ [~Ben@adsl-87-102-45-199.karoo.KCOM.COM] has joined #openttd
11:41:14  <peter1138> http://paste.openttd.org/155
11:41:47  <Eddi|zuHause2> yeah, that was my first suggestion also :)
11:42:32  <Chris82> Eddi: http://openttd.sandra-bullock.co.uk/public/dev/diff/towncost/r10453-towncost.diff
11:43:06  <Chris82> I'll try that peter thx :)
11:43:28  *** MarkSlap [~hestporr@h51n6c1o1114.bredband.skanova.com] has quit [Remote host closed the connection]
11:44:02  <Eddi|zuHause2> Chris82: don't use tabs in english.txt
11:44:14  <peter1138> might need "cost = cost.MultiplyCost(...)" actually
11:46:38  *** Sacro|Laptop [~Ben@adsl-87-102-43-21.karoo.KCOM.COM] has quit [Ping timeout: 480 seconds]
11:46:53  <Maedhros> MultiplyCost returns *this, so i think you'll be ok without it
11:47:09  <peter1138> ok
11:47:50  <Eddi|zuHause2> yeah, that's how i understood the description also
11:49:08  <peter1138> i didn't check it ;)
11:50:08  <Gekkko`> Who is listening to girly hardcore techno?
11:50:42  <Chris82> you?
11:50:58  <Chris82> peter1138: You are the dev god *g* works perfectly!
11:50:58  <Gekkko`> no...
11:51:14  * Eddi|zuHause2 is listening to Butterfly Boucher - A Walk Outside (3:53)
11:51:24  <Eddi|zuHause2> but that is nowhere near techno :p
11:51:42  <Chris82> I listen to Chemical Brothers or Chicane sometimes, but that's not girly :p
11:53:19  <Maedhros> mmm, the new Chemical Brothers album is really good
11:53:46  <Chris82> I only have Exit Planet Dust and Push the Button they're quite old
11:54:34  <Chris82> hmmm this whole advanced town handling patch was pretty flawed, 90% too many code lines, buggy and misleading name :D
11:54:38  <Chris82> this new thing is much better :D
11:54:55  <Maedhros> and people wonder why we don't immediately accept the patches we get presented with ;)
11:54:56  <Chris82> I'll try to make it a modifyable multiplier not just a fixed bool
11:55:22  <Eddi|zuHause2> did you get it to actually modify anything?
11:55:23  <Chris82> hehe well that's totally fine with me :D I have created ChrisIN to test all the sluggish stuff :D
11:55:50  <Chris82> Eddi: Yep I used cost = cost.MultiplyCost(t->population / 300 * (30000 / (distance + 15)) / 1000);
11:55:54  <Chris82> I just try it without cost =
11:57:16  <Chris82> has the same result
11:57:23  <Chris82> but, grrr lol still the same bug with farm tiles
11:57:29  <Chris82> cost on a farm tile is 224 no matter what
11:58:08  <Chris82> hmmm I think the cost = is required let me rechek
11:59:07  *** Gekkko` [~Gekkko@CPE-58-168-99-207.nsw.bigpond.net.au] has quit [Quit: http://bbqsrc.org - Now less gay.]
11:59:15  <Eddi|zuHause2> two things
11:59:23  <Eddi|zuHause2> add a +1 in the MultiplyCost
11:59:31  <Eddi|zuHause2> so costs for long distances is not 0
11:59:57  <Eddi|zuHause2> and the other thing, it should be nonlinear with distance (more like distance^2)
12:02:23  <Eddi|zuHause2> currently, the cost for towns < 300 people is always 0
12:03:55  <Eddi|zuHause2> it works here without cost =
12:05:46  *** Chris1982 [~chris@p579E1E89.dip.t-dialin.net] has joined #openttd
12:06:00  <Chris1982> hmmm Avira Antivir Rootkit Detection just caused my first BSOD lol
12:06:13  *** Chris82 [~chris@p579E1E89.dip.t-dialin.net] has quit [Ping timeout: 480 seconds]
12:06:18  *** Chris1982 is now known as Chris82
12:06:30  <Eddi|zuHause2> and it works for farm tiles here also
12:06:38  <Chris82> with cost = ?
12:07:03  <Eddi|zuHause2> no, without cost
12:07:10  <Chris82> hmmm
12:07:22  <Eddi|zuHause2> in case you missed:
12:07:24  <Eddi|zuHause2> [2007-07-06 13:59] <Eddi|zuHause2> two things
12:07:25  <Eddi|zuHause2> [2007-07-06 13:59] <Eddi|zuHause2> add a +1 in the MultiplyCost
12:07:25  <Eddi|zuHause2> [2007-07-06 13:59] <Eddi|zuHause2> so costs for long distances is not 0
12:07:25  <Eddi|zuHause2> [2007-07-06 13:59] <Eddi|zuHause2> and the other thing, it should be nonlinear with distance (more like distance^2)
12:07:25  <Eddi|zuHause2> [2007-07-06 14:02] <Eddi|zuHause2> currently, the cost for towns < 300 people is always 0
12:07:26  <Eddi|zuHause2> [2007-07-06 14:03] <Eddi|zuHause2> it works here without cost =
12:08:05  <Chris82> but with cost = 0 shouldn't there still be the normal price without the patch be added to cost?
12:08:21  <Eddi|zuHause2> no, you multiply with 0
12:08:32  <hylje> divide by zero
12:08:35  <Chris82> the cost in this case here was supposed to be an additional cost, that's why I had it named towncost
12:08:46  <Eddi|zuHause2> yes, that's why you need the  +1
12:08:48  <Chris82> I doubt it's divide by zero
12:08:56  <Chris82> but 0, something
12:09:00  <peter1138> multiply by zero :)
12:09:09  <Chris82> ok I'll add it
12:09:33  <Chris82> why can't Vista restore my seesion like Word when it crashes *g* :D
12:09:39  <Chris82> session*
12:10:52  <Chris82> 		cost.MultiplyCost((t->population / 300 * (30000 / (distance + 15)) / 1000)+1);
12:10:55  <Chris82> like this Eddi?
12:12:16  <Eddi|zuHause2> yes
12:12:24  <Chris82> does Linux restore my session when the OS crashes?
12:12:29  <Eddi|zuHause2> + does not need () though :)
12:12:40  <Chris82> it needs it or I get CommandCost int conversion error
12:12:48  <Eddi|zuHause2> Chris82: usually linux expects to not crash
12:12:57  <Chris82> tell that the uni boxes lol
12:13:17  <Eddi|zuHause2> Chris82: you can set KDE to restore the last session that quit normally, or a previously stored session
12:13:32  <Eddi|zuHause2> (e.g. you can certainly set a cronjob to store the session every 10 minutes)
12:14:07  <Chris82> it's just like when Word or Excel crashes nothing is lost, it just restores my session and documents, but when Vista crashes (just happened the first time) it just opens a new session after boot
12:14:14  <Chris82> instead of restoring the session like from standby
12:14:27  <Chris82> I mean it has everything cached anyway, so why not just reload it
12:16:19  <Eddi|zuHause2> i think there is a little more to that :p
12:17:05  <Chris82> ok great the patch works now
12:17:25  <Chris82> it seems like construction cost is essentially doubled with the current formular with a ~800 people city
12:18:51  *** Thomas[NL] [~thomas@vdburgt.xs4all.nl] has joined #openttd
12:19:13  <Chris82> instead of making it bool I could also make it Normal, High, Realistic, Insane :D
12:19:18  <Eddi|zuHause2> sure, because 800/300=2 :p
12:20:02  <Eddi|zuHause2> but still, it should be distance^2
12:20:13  <Biff> Chris82: crash, wtf?
12:20:22  <Chris82> yeah distance will always be 1 otherwise
12:20:31  <Chris82> or in most cases
12:21:34  <Biff> should scenarioes come with openttd?
12:21:38  <Biff> linux version
12:21:49  <Eddi|zuHause2> Biff: there used to be a scenario packagee
12:21:53  <Eddi|zuHause2> -e
12:21:59  <Biff> ah
12:22:08  <Chris82> 30000 / (distance + 15)) / 1000 < I will replace that by 20000 / distance^2
12:22:18  <Chris82> that'll make it extremely expensive to build in town center
12:22:27  <Chris82> and much lower outside the center
12:22:32  <Chris82> or maybe 10k instead of 20k
12:22:34  <Eddi|zuHause2> well "^" is not the correct operator in C
12:22:39  <Eddi|zuHause2> and you should leave a +1
12:22:43  <Eddi|zuHause2> for divide by 0 :p
12:22:54  <Chris82> yeah sure it was just an excerpt from what I'll change
12:22:59  <Chris82> ^2 ? is not correct?
12:23:06  <Chris82> but we use it always at uni in C
12:23:08  <Eddi|zuHause2> ^ is exclusive or
12:23:18  <Chris82> whut
12:23:33  <Eddi|zuHause2> pow is probably **
12:23:38  <Eddi|zuHause2> or something
12:23:52  <Maedhros> i don't think there is a pow operator in C(++)
12:24:09  <Eddi|zuHause2> well, distance*distance should work anyway  :p
12:24:16  <Chris82> but when I do c = 2^2 in C c will be 4
12:24:24  <Chris82> or did I get something wrong?!?
12:24:34  <Maedhros> i'd have expected that to be 0
12:24:43  <Chris82> int c before of course :p
12:24:48  <Biff> Chris82: did you use ^ in c?
12:25:06  <Eddi|zuHause2> like i said previously, ^ is XOR
12:25:10  <Chris82> all the time, all our "examples" and tutorials in our lectures are with ^
12:25:17  <Biff> you must use pow()
12:25:44  <Biff> Chris82: that cannot be correct, because that does not do what you expect in c
12:25:56  <stillunknown> Chris82: 2^2 = 0
12:26:16  <Chris82> hmmmm but we tried one program that was like int c = 2^2; printf(+ c);
12:26:18  <Biff> if you xor a number with itself you get 0, thats how you often reset registers in assembly
12:26:19  <Chris82> and that worked
12:26:33  <Chris82> yeah sure I agree with that, I know what XOR does
12:26:43  <Caemyr> http://www.youtube.com/watch?v=e6kRD0_qTbc :)))
12:27:02  <Chris82> how will I use pow() ?
12:27:09  <Chris82> when I want distance^2 mathematically
12:27:19  <Eddi|zuHause2> pow(distance,2)
12:27:33  <Biff> note that pow uses floats
12:27:34  <Maedhros> hmm, pow apparently operates on doubles, so you should probably just use (distance * distance)
12:27:34  <Eddi|zuHause2> or distance*distance :)
12:27:52  <Chris82> no with spaces
12:27:55  <Chris82> OTTD coding style :p
12:28:12  <Biff> alot of programming languages have ** for pow,
12:28:14  <Chris82> I've been told that operators like * got to have spaces around them
12:28:18  <Biff> i think c++ maybe has that
12:28:36  <Eddi|zuHause2> i'd disagree with the spaces, but i do not have to decide :)
12:28:42  <Noldo> Chris82: style thing, but yes it looks nicer
12:29:03  <Chris82> I know both works :) but I think with spaces it's a lot more readable
12:29:06  <Eddi|zuHause2> usually i use * without and + with spaces
12:29:18  <Chris82> not for such a simple formular but for complicated stuff it definitely is
12:29:33  <Noldo> Chris82: are you taking ^2 of the manhattan distace?
12:29:44  <Chris82> yeah why?
12:29:55  <Eddi|zuHause2> it's closer to the mathematical notation where you leave out the * entirely
12:30:14  <Chris82> can't you leave out the * in c too when using () ?
12:30:20  <Noldo> why not use the euclidian distance then becayse the ^2 will get rid of the sqrt anyway and there will be none of the usual problems
12:30:23  <Eddi|zuHause2> Chris82: there's also a function that gives the square of the euclidean distance, that could be easier :)
12:30:47  <Chris82> oh is it defined in code already as well?
12:30:49  <Noldo> and there's a function for it too, how awfully nice
12:30:52  <Chris82> that would make it simpler of course
12:30:58  <Chris82> :D
12:31:17  <Eddi|zuHause2> yeah, it's right next to the manhattan distance function :)
12:31:50  <Chris82> DistanceSquare?
12:32:09  <Eddi|zuHause2> yeah, if it says that :)
12:32:40  <Eddi|zuHause2> i'm awfully bad with names
12:33:37  <Eddi|zuHause2> btw: might be a flaw, or intentional, but clearing your own stations is also more expensive :)
12:34:09  <Eddi|zuHause2> (also true for rails :))
12:34:19  <Chris82> well producing pollution and garbage near a town usually is more expensive than doing it somewhere in the landscape :D
12:34:50  <Noldo> owner check maybe?
12:34:51  <Eddi|zuHause2> well, but cost of clearing rail is negative :)
12:35:02  <Noldo> :D
12:35:06  <Chris82> well just realistic
12:35:18  <Chris82> I mean in real life DBB surely doesn't make profit on clearing rail lines
12:35:28  <Chris82> that's why they usually don't and just leave them there rotting away :D
12:35:58  <Chris82> I'll check how the new formular works, it's simpliefied now
12:35:59  <Eddi|zuHause2> what i mean, you get more money out of clearing rail tiles near towns than rail tiles in the void
12:36:05  <Chris82> 		cost.MultiplyCost((t->population / 300) * (15000 / distance)+1);
12:36:16  <Chris82> oh ok that's not intended
12:36:33  <Eddi|zuHause2> add a +1 to the distance
12:36:41  <Eddi|zuHause2> if you want to clear the town center
12:38:17  <Chris82> 		cost.MultiplyCost(((t->population / 300) + 1) * (15000 / distance + 1));
12:38:37  <Eddi|zuHause2> that looks totally wrong
12:38:45  <Chris82> hmmm
12:39:04  <Eddi|zuHause2> (t->population / 300) * (15000 / (distance + 1)) + 1
12:39:07  <Chris82> I have population / 300 which can become 0 so I add 1
12:39:14  <Eddi|zuHause2> and some of the () are redundant
12:39:38  <Chris82> yes but you need brackets otherwise CommandCost does not define int error blah blah
12:39:44  <Eddi|zuHause2> so what? in towns < 300 people, costs are not modified
12:39:59  <Chris82> hmmm ok
12:40:21  <Chris82> 		cost.MultiplyCost((t->population / 300) * (15000 / distance + 1) + 1);
12:40:33  <Eddi|zuHause2> no
12:40:49  <Eddi|zuHause2> that was the one bracket that was not optional :p
12:41:02  <Eddi|zuHause2> you need to prevent that distance is 0
12:41:07  <Eddi|zuHause2> so you need (distance+1)
12:41:19  <Chris82> oops true
12:41:27  <stillunknown> Maybe ottd needs a new demolition tool, the "fund a town nuke".
12:41:35  <Chris82> lol
12:41:46  <hylje> "fund a terrorist nuke"
12:42:02  <hylje> if caught, bankrupt is imminent
12:42:05  <Chris82> or add a new nuke producing industry and uranium mines
12:42:11  <hylje> newcargo
12:42:14  <Chris82> and then you can use the nukes to eliminated your opponents
12:42:15  <hylje> newind
12:42:17  <hylje> D:
12:42:30  <Chris82> :p lol
12:42:31  <Eddi|zuHause2> "we have invented a new device (nuclear bomb), would you like to test it for one year exclusively?"
12:42:37  <stillunknown> And a train that destroys unfriendly trains.
12:42:50  <Chris82> actually if you read the Wiki, OpenTTD is supposed to be a game for all ages without a war theme ;)
12:43:08  <Chris82> and I like it that way
12:43:09  <Eddi|zuHause2> do not believe stuff on the wiki :p
12:43:16  <Chris82> if I want to nuke my enemy I play Supreme Commander :D
12:43:36  <Maedhros> that bit's fairly safe to believe in :p
12:44:40  <Chris82> oh my the new formula is too much :D
12:44:50  <Chris82> 66k to build 4 tiles from the center
12:44:57  <Chris82> realistic but a little much for the beginning of the game *g*
12:45:18  <Chris82> is there any rule as to how many sqm one tile is?
12:45:21  <hylje> well
12:45:30  <Eddi|zuHause2> then tweak the constant (15000)
12:45:44  <hylje> you should make it not have much effect with lil towns
12:45:54  <Eddi|zuHause2> Chris82: for houses something like 50x50
12:45:59  <Chris82> maybe increase the 300 to 600 or a lil more
12:46:12  <hylje> and with expensive land make selling reserved land PROFIT!! able
12:46:14  <hylje> :>
12:46:17  <Chris82> 50x50 =O thats 2500 sqm
12:46:32  <Chris82> that would be only 26 EUR for one sqm then
12:46:35  <Chris82> that's super cheap
12:46:39  <Noldo> :)
12:46:43  <hylje> ottd's not to scale
12:46:45  <Chris82> the sqm at Potsdamer Platz in Berlin costs like 3000 EUR
12:47:01  <Eddi|zuHause2> well, but berlin has like 4 Mio inhabitants :)
12:47:09  <Chris82> well but Berlin is also a little bigger than 300 people yeah :D
12:48:02  <Eddi|zuHause2> maybe it could be sqrt(population)?
12:48:51  <Eddi|zuHause2> it does not matter a lot if the city has 30000 or 35000 inhabitants
12:49:06  <Chris82> the price range is too high with the current formular I think
12:49:20  <Chris82> it's <300 far away from a city and >200k in a 1k city
12:49:44  <Eddi|zuHause2> yes, you should tweak the constant for the distance
12:50:07  <Eddi|zuHause2> previously it was 30/(distance+15)
12:50:17  <Eddi|zuHause2> now you have 15000/distance^2
12:50:22  <Chris82> it was 30000
12:50:26  *** NukeBuster [~opera@a62-251-21-79.adsl.xs4all.nl] has joined #openttd
12:50:32  <Chris82> or did I misread it
12:50:37  <Eddi|zuHause2> no, it was 30000/1000 (to avoud rounding mistakes)
12:50:44  <Chris82> a true
12:51:08  *** dihedral [~nathanael@joshua.dihedral.de] has joined #openttd
12:51:12  <dihedral> hello
12:51:36  <Eddi|zuHause2> i'm not sure if that has any effect though
12:51:41  <Chris82> nice I just paid 2,8 billion for demolishing a house in a 100k city in 2113 :D
12:51:57  <hylje> ow
12:52:06  <Chris82> hi dihedral
12:52:37  <Eddi|zuHause2> btw, i believe we paid something between 120EUR and 170EUR per m^2 here
12:53:10  <Chris82> sounds like a reasonable price
12:53:18  <Eddi|zuHause2> and keep in mind that this includes costs for building infra structure (roads, water, etc.)
12:53:28  <Eddi|zuHause2> which is not needed for rail
12:53:46  <Chris82> I pay 10 EUR / month / sqm for my appartment
12:54:09  <Chris82> but I live in a very good place in Berlin, like a few meters from Bus and Subway and Shopping Malls :D
12:54:12  <Eddi|zuHause2> well, that is with a building on it :p
12:54:38  <Chris82> yeah but it's a lot, you can have appartments for 2 EUR / sqm in Berlin as well, in Neukölln for example
12:54:49  <Chris82> did you know that Neukölln (part of Berlin) is the 3rd biggest turkish city :D
12:54:58  <Eddi|zuHause2> yes :)
12:55:15  <Eddi|zuHause2> the biggest turkish town outside of turkey :)
12:55:20  <Chris82> yeah
12:55:28  <Chris82> I think like 400k
12:55:45  <Chris82> that's even bigger than Graz where I am from, it only has ~250k
12:55:52  *** Sacro [~Ben@adsl-83-100-158-158.karoo.KCOM.COM] has joined #openttd
12:56:03  <Chris82> is Berlin the biggest city in Germany actually?
12:56:07  <Eddi|zuHause2> well, 250k austrians vs. 400k turks :p
12:56:22  <Eddi|zuHause2> yes, i think so
12:56:58  <Eddi|zuHause2> at high times it had over 6M inhabitants (around the 1920's)
12:57:17  <Eddi|zuHause2> which was like 10% of the entire german population
12:57:31  <Chris82> wow really, I didn't know it shrinked that much
12:57:42  <Chris82> I made it 		cost.MultiplyCost((t->population / 400) * (5000 / (distance + 1)) + 1);
12:57:47  <Chris82> now, with good results :)
12:58:17  <Chris82> ok two bug though:
12:58:29  <Chris82> 1) the one you mentioned before, demolishing rail gives you more money than you even paid for it
12:58:43  <Chris82> 2) building on a dirty (brown) tile is super cheap
12:59:06  <Eddi|zuHause2> ad 2), you already paid for that previously
12:59:29  <Eddi|zuHause2> ad 1), try clearing previously purchased land
13:00:58  <NukeBuster> well... how long before that did you place the rails?
13:01:11  <Eddi|zuHause2> NukeBuster: does not matter
13:01:35  <Eddi|zuHause2> NukeBuster: note that he is not talking about trunk
13:01:36  <Chris82> when I build a rail and I pay let's say 10k, and immediately demolish it afterwards I get like 30k+
13:01:47  <Chris82> that's definitely not the intended behaviour
13:02:01  <NukeBuster> it's about the advanced town handeling... right?
13:02:09  <Chris82> and yes not trunk but a new increase building costs near towns patch
13:02:16  <Chris82> yep
13:02:42  *** Sacro^ [~Ben@adsl-87-102-45-199.karoo.KCOM.COM] has quit [Ping timeout: 480 seconds]
13:02:53  <Chris82> there are 0 lines from the original patch left though, what I am experimenting with now is the result of a lot of help from Eddi and peter :) and totally new code
13:03:07  <Eddi|zuHause2> so you shold check the owner before clearing the area
13:03:08  <NukeBuster> nice...
13:03:39  <Chris82> it will be in the next ChrisIN, but first it has to be bug free
13:04:01  <Chris82> Eddi: Where's the command for selling railway (or road etc.) actually?
13:06:47  <Maedhros> ClearLand again ;)
13:06:49  <Eddi|zuHause2> it goes through that same function
13:07:33  <Eddi|zuHause2> that's what "_tile_type_procs[GetTileType(tile)]->clear_tile_proc(tile, flags)" does
13:08:13  <Eddi|zuHause2> if GetTileType(tile) returns "rail tile"
13:08:42  *** Sacro [~Ben@adsl-83-100-158-158.karoo.KCOM.COM] has quit [Remote host closed the connection]
13:08:56  <Eddi|zuHause2> just check the owner of "tile" before, and if it is _current_player, then do not modify the cost
13:09:56  <Eddi|zuHause2> clearing water near towns must cost a fortune :)
13:11:14  <Maedhros> you'd have to check the type of each tile though as the ownership isn't necessarily stored in the same place
13:11:57  <stillunknown> How about: Bribe fails -> everything in the town area (belong to you) explodes.
13:12:21  <Eddi|zuHause2> there's no generic "check owner" function, or a member of _tile_type_procs?
13:12:57  <Chris82> stillunknown: No war themes *g* :D
13:13:36  <Chris82> Eddi: Clearing water right next to a town costs 39 million :D
13:13:42  <Chris82> I would consider that a bug ;)
13:13:51  <Chris82> that's a little too much
13:14:49  <Chris82> can I make something like if (tile is water && _patches.towncost) { other formular }
13:14:52  <Eddi|zuHause2> well, you could make a similar exception :)
13:15:36  <Chris82> hmmm but I actually have no idea how I can identify a water tile in code
13:16:27  <Eddi|zuHause2> IsTileType(tile, water)?
13:16:46  <Eddi|zuHause2> btw, look at tile.h:76
13:17:01  <Eddi|zuHause2> there's the requirements for calling GetTileOwner
13:17:11  <Chris82> IsTileType(t, MP_WATER))
13:17:13  <Chris82> this?
13:17:37  <Eddi|zuHause2> something like that...
13:17:41  <Chris82> I don't know what the MP stands for but it's in front of RAIL and stuff too
13:18:04  <Eddi|zuHause2> grep MP_ src/*.h ;)
13:18:41  <Chris82> lol I doubt grep will do anything on Windows
13:18:45  <Eddi|zuHause2> probably something to do with "map"
13:19:25  <Eddi|zuHause2> Chris82: you can put grep.exe (from mingw) into windows\command
13:19:35  *** ThePizzaKing [~jeff@c211-28-160-16.eburwd2.vic.optusnet.com.au] has quit [Ping timeout: 480 seconds]
13:19:36  <Eddi|zuHause2> or into another directory in path
13:19:36  <Chris82> ok so I need one exception if (IsTileType(t, MP_WATER)) { statement }
13:20:20  <Eddi|zuHause2> you need a temporary variable
13:20:33  <Eddi|zuHause2> you need to check the tile type before calling the clear_tile_proc
13:21:02  <Eddi|zuHause2> and use that info afterwards
13:23:25  <Chris82> hmmmm is it bad to use floats as variables?
13:23:33  <Eddi|zuHause2> yes
13:23:41  <Chris82> otherwise I could just multiply the price by 0.1 if the tile is water or something like that
13:24:10  <Chris82> oh I can divide it too actually then int is no problem :)
13:24:13  <Eddi|zuHause2> because it possibly desyncs in multiplayer
13:25:30  <Chris82> when I do
13:25:30  <Chris82> 	uint modifywp = 1;
13:25:30  <Chris82> 	if IsTileType(t, MP_WATER) modifywp = something;
13:25:45  <Chris82> the modifywp is overwritten if the if is true right?
13:25:53  <Eddi|zuHause2> yes
13:26:08  <Eddi|zuHause2> but i'd rather do:
13:26:18  <Eddi|zuHause2> TileType type = GetTileType(t);
13:26:27  <Eddi|zuHause2> call clear_land_proc
13:26:29  <Chris82> I intended to do this here then:
13:26:29  <Chris82> 		cost.MultiplyCost(((t->population / 400) * (5000 / (distance + 1)) + 1) / modifywp);
13:26:34  <Eddi|zuHause2> if(patch)
13:26:43  <Eddi|zuHause2> switch(type)
13:26:46  <Eddi|zuHause2> stuff...
13:26:57  <Chris82> oh hmmm I am not so good with switch stuff
13:27:09  <Chris82> we just learn that in our Java course
13:27:23  <Eddi|zuHause2> case statements are cool :)
13:27:32  <Eddi|zuHause2> saves you a lot of if nesting
13:27:48  <Chris82> but does it help app performance too?
13:27:52  <Chris82> or is it just nice code
13:28:12  <Eddi|zuHause2> the compiler should handle that stuff anywaay
13:28:20  <Eddi|zuHause2> it is just much more readable
13:28:36  <Eddi|zuHause2> and you do not have to repeat the variable name every time
13:28:43  <Eddi|zuHause2> so:
13:28:49  <Eddi|zuHause2> switch(type)
13:29:04  <Eddi|zuHause2> case MP_WATER: do stuff; break
13:29:10  <Eddi|zuHause2> default: do other stuff
13:29:52  <Eddi|zuHause2> later add other cases for rail and purchased land
13:30:31  *** glx [glx@bny93-6-82-245-156-124.fbx.proxad.net] has joined #openttd
13:30:34  *** mode/#openttd [+v glx] by ChanServ
13:32:19  <Chris82> http://paste.openttd.org/156
13:32:20  <Chris82> like this?
13:32:46  <Eddi|zuHause2> probably missing {}
13:33:00  <Eddi|zuHause2> and break is necessary
13:33:12  <Chris82> a true otherwise it executes everything
13:33:15  <Eddi|zuHause2> otherwise it falls through to the next case
13:33:47  <Eddi|zuHause2> and i'm not sure about the syntax, but the : after case is probably wrong
13:34:33  <Eddi|zuHause2> and it will never work with "IsTileType"
13:34:36  <Chris82> switch(IsTileType) < function calling missing argument list
13:34:43  <Eddi|zuHause2> because that is a function, not a variable
13:34:44  <Chris82> call*
13:34:50  <Chris82> yeah
13:35:09  <Eddi|zuHause2> TileType type = GetTileType(t); <- do that at the beginning of the function
13:35:17  <glx> switch(GetTileType(tile))
13:35:24  <Eddi|zuHause2> before the CommandCost statement
13:35:47  <Eddi|zuHause2> and then switch(type)
13:35:53  <glx> yes better :)
13:36:22  <Eddi|zuHause2> checking the type after clearing does not do much good :p
13:36:41  <Chris82> hmmm the t is an undeclared identifier
13:36:54  <Eddi|zuHause2> must be "tile", of course
13:37:03  <glx> use your brain ;)
13:37:09  <Eddi|zuHause2> never just copy-paste my lines :)
13:37:20  <Eddi|zuHause2> i thought we established that already :p
13:38:09  <Chris82> :p
13:38:39  *** Peakki [antti@cs181000195.pp.htv.fi] has joined #openttd
13:38:44  <Chris82> hmmm it tells me my breaks and the default are illegal
13:38:55  <Eddi|zuHause2> yes, because you miss { after switch
13:39:04  <Chris82> http://paste.openttd.org/158
13:39:08  <Chris82> ahhh
13:40:02  <Eddi|zuHause2> (and the matching } at the end)
13:40:25  <stillunknown> Chris82: You mentioned university at some point, doing computer science or something else?
13:41:12  <Chris82> no computer science
13:41:35  <Chris82> but I am not so much into programming, I am more into building hardware, designing networks, energy effiency and such stuff
13:41:40  <Chris82> and I am only in the 2nd semester :p
13:41:50  <Eddi|zuHause2> Chris82: btw, add the /100 before the +1, the +1 must be unmodified, because it represents the original cost
13:42:10  <Chris82> true :)
13:42:18  <Chris82> the switch works great just tested it already :)
13:42:26  <Chris82> water has a more reasonable price now
13:42:35  <stillunknown> Chris82: I recommend you read a book about C++ if you haven't done so already.
13:42:59  <Eddi|zuHause2> i recommend you to learn programming, not C++ :)
13:43:10  <Chris82> I haven't we only did Haskell and Java so far and very very little C
13:43:18  <Eddi|zuHause2> it's the concepts that matter, not the languages
13:43:19  <Chris82> I will do a C++ course next semester probably
13:43:48  <Chris82> well the stupid thing is we only do Hello World stuff which is totally stupid and trivial
13:43:57  <Chris82> playing around with OpenTTD is much better for learning I think
13:44:16  <Eddi|zuHause2> you can do a lot of fun stuff with haskell :)
13:44:22  <CIA-1> OpenTTD: glx * r10454 /trunk/src/lang/unfinished/ (afrikaans.txt greek.txt latvian.txt): -Fix r10452: forgot unfinished langs
13:44:30  <Chris82> well I hate Haskell because on every computer it behaves differently
13:44:31  <stillunknown> But learning "insert random language" won't make you understand C++.
13:44:46  <Chris82> the code we got in our lectures didn't work on most uni computers and sometimes only on my desktop
13:45:15  <Chris82> I agree with you stillunknown, but learning Java helps understanding the main concepts of programming
13:45:20  <Eddi|zuHause2> http://www.willamette.edu/~fruehr/haskell/evolution.html <- understand the concepts behind these programs :)
13:45:32  <Chris82> and to be honest with the stuff I do there is not so much difference between c and java syntax
13:45:46  <stillunknown> Java makes me shiver, i'd rather learn python or something like that.
13:45:58  <stillunknown> Not that i'll learn python anytime soon.
13:46:35  <Chris82> Eddi: hehe the fac thing is stolen from me :D lmao
13:46:40  <Chris82> that was exactly my solution
13:46:59  <Eddi|zuHause2> they are all fac things :p
13:47:15  <stillunknown> Am i strange for starting with C and C++?
13:47:21  <Chris82> the second solution looks like APL
13:47:29  <Chris82> no you aren't
13:47:35  <hylje> apl: AntiPython Language
13:47:40  <Chris82> but at university you don't start with object oriented programming
13:47:55  <stillunknown> Then start with C ;-)
13:48:02  <stillunknown> I did.
13:48:19  <Chris82> my dad has written a program in APL for 2D modelling rivers and water flow and such stuff
13:48:36  <Eddi|zuHause2> i started programming with DBase when i was around 10
13:48:37  <Chris82> when I look at the code I can't read one single line, absolutely nothing is even commented lol
13:48:43  <Eddi|zuHause2> and later had pascal at school
13:48:58  <Eddi|zuHause2> at university we started with haskell, and then sather-k
13:49:04  <stillunknown> Once you've had your share of memory leaks, double free corruptions, segmentation faults, you can move on to C++ ;-)
13:49:29  <Eddi|zuHause2> then we had "programming practice" where we had the choice between C++ and java
13:49:34  <Chris82> lol I don't believe that with the stuff we make at uni I will ever be able to produce a mem leak
13:49:50  <Chris82> Java replaced C++ in the 2nd semester here
13:49:54  <Eddi|zuHause2> and C is a really bad language
13:49:59  <Chris82> I'll do C++ later
13:50:13  <Chris82> C is very good for drivers I think
13:50:17  <Chris82> from what I've learnt at least
13:50:29  <stillunknown> C is low level language, but you can mess it up badly.
13:50:32  <Chris82> it's a "close to hardware" programming language
13:50:53  <Chris82> even better is Assembler of course :D we do some MIPS right now
13:51:09  <Eddi|zuHause2> yeah, we had that also
13:51:22  <Eddi|zuHause2> VHDL is fun :)
13:51:29  <stillunknown> I find C more usefull than ASM, but i never learned ASM.
13:51:46  <Eddi|zuHause2> did i mention that i loathe C(++)?
13:52:39  <Chris82> can you say loathe in German?
13:52:48  <Chris82> I dunno that word
13:52:53  <Eddi|zuHause2> ~ verabscheuen
13:53:07  <Chris82> ahh
13:53:17  <Eddi|zuHause2> "loathe and despise", commonly used term :)
13:53:19  <Chris82> dislike
13:53:33  <stillunknown> What low'ish level language besides C and C++ do you know?
13:53:36  <Chris82> hmmm this increase costs patch is not AI compatible
13:53:37  <stillunknown> excluding ASM
13:53:44  <Chris82> they'll be out of funds before they have a single running line :D
13:53:48  <Eddi|zuHause2> lambda calculus :p
13:54:01  <Chris82> hoare calc even better
13:54:20  <stillunknown> Programming language i mean.
13:54:30  <Eddi|zuHause2> lambda calculus is a programming language :)
13:54:41  <Eddi|zuHause2> it's the mother of all functional languages
13:55:03  <Eddi|zuHause2> and the only language we completely specified in our programming languages lecture
13:55:35  <stillunknown> I don't do CS, so i my calculus is a little bit different.
13:56:14  *** elmex [~elmex@e180066245.adsl.alicedsl.de] has joined #openttd
13:56:53  <stillunknown> About two years i was confronted with a world were C program were common.
13:57:04  <stillunknown> Knowing nothing, that made sense to learn.
13:57:13  <Eddi|zuHause2> http://en.wikipedia.org/wiki/Lambda_calculus
13:57:43  <Maedhros> aargh, i'm an idiot
13:57:48  <Maedhros> i spend all this time wondering why it didn't work, only to realise that (var & 4) does not give you the first 4 bits...
13:58:03  <Eddi|zuHause2> haha :)
13:58:40  <peter1138> :D
13:59:13  <stillunknown> var & 15 will
13:59:16  <Belugas> GB(x, 0,3)!!!
13:59:40  <stillunknown> GB(x, 0, 4) i thought
13:59:40  <glx> ...,4)
13:59:54  <Maedhros> but since this is nfo, 0F will do :)
13:59:54  <Eddi|zuHause2> stillunknown: btw, i once coded a machine-code program for a mini-processor i specified in VHDL :)
14:01:04  <Chris82> 			case MP_RAILWAY, MP_STREET:
14:01:06  <Chris82> does that work?
14:01:16  <Chris82> or how do I make the same case for two tile types?
14:01:20  <Chris82> || ?
14:01:21  <Eddi|zuHause2> it had like for operations, something about z:=x+y, z:=2x-y and so on
14:01:22  <Maedhros> no, but case MP_RAILWAY: case MP_STREET does
14:01:29  <Eddi|zuHause2> Chris82: case 1: case 2:
14:01:30  <Belugas> glx 4, you're right...
14:01:33  <Belugas> sorry
14:01:34  <Chris82> ah :)
14:01:47  <Eddi|zuHause2> because the empty case falls through :)
14:02:36  <Eddi|zuHause2> Chris82: but don't forget purchased land
14:03:12  <Chris82> hmm but I can't put that in the switch, purchase land is no tile type
14:03:15  <Maedhros> which is MP_UNMOVABLE && IsOwnedLand(tile) (or something close anyway)
14:03:22  <Chris82> oh
14:04:00  <Eddi|zuHause2> well, for other umovables it should have already failed anyway
14:04:18  <Eddi|zuHause2> so the IsOwnedLand is probably unnecessary
14:04:44  <Maedhros> that's a good point though, are you checking CmdFailed after doing the initial clearing?
14:05:29  <Eddi|zuHause2> what's the semantics for .MultiplyCost() on a failed CommandCost?
14:05:55  <Chris82> I think the CmdFailed check is done by the function in rail_cmd etc.
14:05:56  <Eddi|zuHause2> i would expect that to stay failed
14:06:05  <Chris82> it does
14:06:09  <Chris82> haven't found an exception yet
14:06:12  <Eddi|zuHause2> so checking is not necessary
14:06:49  <Chris82> yeah CmdLandscapeClear does not do a CmdFailed check because the function calling it does it already
14:06:53  <Chris82> that's how I understand it
14:07:25  <Eddi|zuHause2> yes, the CmdFailed should just be passed through
14:07:45  <Maedhros> good thing it's now a separate variable, eh ;)
14:08:06  <Eddi|zuHause2> yes, the class is nice :)
14:08:54  <Chris82> I think I have all needed exceptions now... testing
14:10:01  <Chris82> railway bought for 18k and sold for 6k :) this works as intended now
14:10:32  <Eddi|zuHause2> but if you change behaviour for roads, how do you handle town roads?
14:11:32  <Chris82> well not owned stuff doesn't give me profit anyway
14:11:41  <Chris82> demolishing town owned road costs 15k
14:11:46  <Chris82> my own road costs 5k
14:11:54  <Chris82> that's still an error tho since it should give me money
14:11:57  <Eddi|zuHause2> no, but town roads should cost more to demolish
14:12:01  <Chris82> they do
14:12:07  <Chris82> 3 times as much
14:12:14  <Eddi|zuHause2> your roads should not give you money
14:12:25  <Chris82> oh ok I thought it's like with rail
14:12:29  <Chris82> then it works fine :)
14:12:59  <Chris82> cool seems to be working nicely now
14:13:26  <Eddi|zuHause2> removing of stations and depots?
14:14:02  <Eddi|zuHause2> have new diff?
14:14:23  *** MarkMc [~hestporr@h212n1fls301o1036.telia.com] has joined #openttd
14:14:55  <Chris82> removing a depot costs about 3 times less than building it
14:15:01  <Chris82> but removing a station costs more than building it
14:15:12  <Chris82> but I like that because a town doesn't like it when you kill their bus station
14:16:44  <Chris82> http://openttd.sandra-bullock.co.uk/public/Dev/diff/towncost/r10453-towncost.diff
14:18:46  <Chris82> ahhh demolishing houses is still pretty darn exp :D
14:18:58  <Chris82> hmmm but maybe I even leave it that way
14:19:21  <Chris82> I mean people who want this patch are probably into realsim and it's very unrealistic that you can demolish a house for a bus station
14:20:13  <peter1138> yeah
14:21:20  <Chris82> and with stations on roads demolishing a house shouldn't be required anyway
14:22:01  <Chris82> Eddi: If you can't find any remaining bugs either I'll post the patch on the forums :)
14:22:04  <Eddi|zuHause2> btw, can it be that the production of passengers has increased massively since the original game?
14:22:22  <Eddi|zuHause2> let me compile first :)
14:22:34  <Chris82> hehe take your time
14:23:41  <peter1138> Eddi|zuHause2: cos there are some problem ;)
14:23:48  <peter1138> +s
14:24:01  <MUcht> <Eddi|zuHause2> well, 250k austrians vs. 400k turks :p <- there are not 250k austrians in berlin ;-)
14:24:17  <Eddi|zuHause2> MUcht: it was about graz :)
14:24:22  <MUcht> oh ;-)
14:24:39  <MUcht> in berlin, there are some 8k austrians
14:24:59  <MUcht> Chris82: you are from graz?
14:25:03  <Chris82> yeah
14:25:09  <MUcht> interesting, I'm studying there
14:25:20  <Chris82> oh nice :) they have a good technical university
14:25:24  <Chris82> my brother studies there
14:25:30  <Chris82> I study at the FU Berlin
14:25:31  <MUcht> yes indeed
14:25:39  <MUcht> I'm currently at the FU Berlin
14:25:43  <MUcht> (Erasmus) ;-)
14:25:52  <Chris82> hehe :) which studies?
14:26:04  <MUcht> betriebswirtschaft, doctoral
14:26:14  <Chris82> hmmmmm demolishing one piece of road in 2318 in an 80k city costs 3 trillion with the patch :D
14:26:18  <Chris82> compared to 324 million normally
14:26:49  <Chris82> oh hmmm I think the BWL campus is somewhere else than the CS faculty
14:26:56  <Chris82> the FU is pretty spread out
14:27:04  <MUcht> I was on both
14:27:11  <MUcht> CS is Takustraße
14:27:19  <MUcht> BWL is in the Garystraße
14:27:25  <Chris82> yep Arnimallee is my bus station :D
14:27:49  <MUcht> they have a nice Hörsaal in the Arnimallee ;-)
14:28:00  <MUcht> you are in which semester?
14:28:07  <Chris82> yeah the CS building is the newest of the FU and also the Konrad Zuse Zentrum is right next to it
14:28:18  <Chris82> the 2nd, I studied 4 semesters law before
14:28:37  <Chris82> which will be my "Nebenfach" for computer science
14:31:43  <MUcht> I attended ALP3 last semester
14:31:58  <MUcht> so thats for you next semester
14:32:04  <MUcht> pretty good course that is
14:32:20  <Chris82> oh then I could have even met you already without noticing it :D
14:32:28  <Chris82> I took TI III in the 1st semester already
14:32:42  <Chris82> ALP and TI is nice, but the Mafi lectures suck
14:32:46  <Chris82> *ggg* http://openttd.sandra-bullock.co.uk/public/Images/Garnton%20Transport,%2021st%20Feb%202319.png
14:33:11  <Chris82> I don't even know what number that is
14:33:12  <MUcht> I tried to attend ALP2 this semester, but this female professor was aweful so I quit that
14:33:29  <MUcht> lol cool numbers
14:33:29  <Chris82> oh she is abroad now, a tutor is doing that lecture now
14:33:29  <stillunknown> ALP=?
14:33:37  <MUcht> algorithms and programming
14:33:37  <Chris82> Algorithms and Programming
14:33:41  <MUcht> faster
14:33:46  <Chris82> nah I was :p
14:33:48  <Chris82> ping latency :D
14:34:05  <Chris82> ALP 2 is the thing I speak about when I say Java course :p
14:34:16  <stillunknown> I had that subject too, should have been longer, more extensive.
14:34:24  <stillunknown> Barely got a chance to touch C++.
14:34:43  <MUcht> I'm coding my thesis-things in Java, alp3 helped me quite sometimes last semester
14:34:54  <Chris82> http://openttd.sandra-bullock.co.uk/public/Images/Garnton%20Transport,%2021st%20Feb%202319.png < this screenshot clearly shows that Inflation needs some redesign
14:34:56  <MUcht> so I tried to attend ALP2 this semester, but this professor was just too bad
14:35:08  <Chris82> she did ALP 1 too (Haskell)
14:35:12  <stillunknown> How bad?
14:35:17  <Chris82> nobody liked her, but my Tutor is really great
14:35:33  <MUcht> very bad ;-)
14:35:38  <Chris82> uhm, Condoleza Rize bad?
14:35:45  <MUcht> heh
14:35:50  <Chris82> depends if you're democratic or republican
14:35:56  <Chris82> but if you're democratic then CR bad :D
14:36:02  <Chris82> otherwise Hillary Clinton bad
14:36:34  <Chris82> are you from Graz originally MUcht ?
14:36:36  <stillunknown> MUcht: so ALP2 is not a required subject?
14:36:38  <Eddi|zuHause2> as long as it is not Angela Merkel bad :p
14:36:45  <Chris82> it is required for my bachelor
14:36:47  <MUcht> Chris82: no, from Salzburg
14:36:55  <MUcht> stillunknown: it is required if you study informatics
14:37:11  <stillunknown> MUcht: Hoping for a better teacher next year?
14:37:11  <Chris82> yep also for teacher students
14:37:28  <Chris82> there will be no new one, this bad woman is the "boss" of our faculty :D
14:37:29  <MUcht> stillunknown: no I return to Austria and finish my doctoral thesis
14:38:09  <Chris82> I will be in Graz from 23rd to 30th July so maybe we can meet at Don Camillo or somewhere :D hehe
14:38:10  <MUcht> I was curious right at the first time I saw this professor; female and pretty old is somehow contradictive to the topic she wants to teach
14:38:14  <MUcht> and I was right about that ;-)
14:38:24  <Chris82> hehe yeah
14:38:34  <MUcht> Don Camillo? where's that? oO
14:38:40  <Chris82> you don't know that :o
14:38:45  <Chris82> one of the top cafes near the Hauptplatz
14:38:48  <MUcht> oh
14:38:52  <MUcht> no place for students
14:39:16  <Chris82> when you go down the road near the H&M from the Hauptplatz you will come to Don Camillo after a few hundread meters
14:39:23  <Chris82> oh I don't know the student places so well
14:39:38  <Chris82> I am not in Graz that often and I usually only visit one of the many Japanese restaurants :D
14:39:43  <Chris82> Yamamoto is great for example
14:39:51  <MUcht> I don't like Sushi too much
14:39:53  *** Osai is now known as Osai^Kendo
14:40:02  <MUcht> I like the turkish food here in Berlin ;-)
14:40:04  <Chris82> you have to try their Udon, the best noodles ever
14:40:11  <MUcht> Dürüm mit scharf ;-)
14:40:18  <Chris82> you'll forget about Italian Spagetthi once you've eaten them
14:40:27  <MUcht> good tip
14:40:33  <Chris82> haha :D
14:40:51  <Chris82> there's a Döner shop 200 meters from my appartment
14:41:02  <Chris82> really not good for my bank balance ;)
14:41:05  <MUcht> where do you live here?
14:41:14  <Chris82> 5 minutes from the Schloßstraße
14:41:15  <MUcht> nah döner is really cheap...
14:41:17  <MUcht> ah
14:41:18  <Chris82> really close to the university
14:41:22  <MUcht> I live at Lichterfelde West
14:41:26  <MUcht> even closer ;-)
14:41:32  <Chris82> hehe :p
14:42:00  <Eddi|zuHause2> hm... i am kinda used to the diagonal crossings, can we have them in trunk?
14:42:23  <glx> maybe one day :)
14:42:27  <MUcht> that was a great feature
14:42:32  <Chris82> found any bugs Eddi?
14:42:55  <MUcht> hmm I'm used to 32bit graphics, can we have them in trunk?
14:42:57  <Eddi|zuHause2> nothing obvious
14:43:20  *** Digitalfox [~Digitalfo@bl7-180-89.dsl.telepac.pt] has joined #openttd
14:43:54  <stillunknown> MUcht: Is that a joke?
14:44:19  <Chris82> well 32-bit support is in trunk
14:44:20  <MUcht> hmm... I just thought I could give it a try
14:44:32  <MUcht> but not the graphics ;-)
14:44:43  <Chris82> well there are none yet I believe
14:44:46  <peter1138> first somebody needs to draw a (mostly) complete set
14:44:47  <Chris82> only menu graphics and such stuff
14:44:54  <peter1138> or even half a set
14:46:05  <Eddi|zuHause2> what do these symbols in TTRS3 mean when making buildings transparent?
14:46:18  <Chris82> hotel for tourism ECS
14:46:18  <MUcht> hm I thought I saw menu graphics already a while ago
14:46:21  <Chris82> something like that
14:46:37  <Chris82> yeah I think there is a 32bpp branch with 32bit menus
14:47:04  <MUcht> nah 32bit graphics are not that important to me in general, I like the retro-dos-feeling a lot
14:47:13  <Eddi|zuHause2> the 32bpp branch is closed
14:47:18  <Digitalfox> Chris82: You are talking about the old branch, witch is now obsolete and deleted
14:47:24  <Chris82> ah ic
14:47:31  <Chris82> I agree to that MUcht :)
14:47:40  <MUcht> most important feature imho is pax destinations
14:47:41  <Digitalfox> Loading of menus is supported in trunk i believe
14:47:53  <Chris82> I am fine with a 32bit menu and icons and stuff, but the train and landscape graphics are just fine!
14:48:04  <Chris82> perfect game for any onboard graphics gamers
14:48:10  <Digitalfox> Well, it's a matter of choise
14:48:43  <Digitalfox> If there is an option of ON or OFF i don't see a problem :)
14:48:51  <peter1138> hhmm
14:48:57  *** dihedral [~nathanael@joshua.dihedral.de] has quit [Quit: leaving]
14:49:53  <Digitalfox> I mean if people can use the old 8bit graphics, fine, but theres also people who want to see a fresh look on TTD ( Openttd )
14:50:12  <Digitalfox> And i belive 32bit is the way to go
14:50:38  <peter1138> 32bpp!
14:50:42  <peter1138> we have 32bpp
14:50:45  <peter1138> we have 8bpp
14:50:50  <peter1138> we have opengl :>
14:50:57  <peter1138> (ok, so it's still 32bpp, heh)
14:51:24  <Digitalfox> ops yeah ;)
14:51:29  <Chris82> OpenGL support sucks on Vista and will be even worse in future Windows versions, I hope that doesn't become standard *g*
14:51:49  <Digitalfox> my bad peter1138, bpp is the way to go lol
14:51:49  <Chris82> well actually the drivers suck but that's due to the DM of Vista
14:52:07  <Prof_Frink> I hope it does become standard, for precisely the same reasons ;)
14:52:27  <peter1138> Chris82, http://fuzzle.org/o/opengl9.png
14:53:07  <Chris82> hmmm is that screenie 32bpp OTTD?
14:53:25  <peter1138> it's 32bpp opengl OTTD
14:53:41  <Chris82> hmmm but 8bpp graphics? I don't see a difference to my OTTD start menu
14:53:55  <peter1138> exactly
14:54:26  <Chris82> is there a way I can start my game with OpenGL so I can see if it actually works on Vista or if graphics are sluggish then
14:54:28  <Eddi|zuHause2> using a different renderer does not mean you have to use different graphics :)
14:54:42  <peter1138> no, the patch is "secret" at the moment
14:54:52  <Chris82> hehe ok :)
14:54:58  <hylje> super secret
14:55:07  <peter1138> well, you can find it easily :p
14:55:14  *** colle_ is now known as colle
14:55:30  <hylje> how much cpu is normally used for rendering?
14:55:36  <Thomas[NL]> cough http://fuzzle.org/o/opengl14.diff ?
14:56:15  <peter1138> yeah
14:56:16  <peter1138> well
14:56:26  <peter1138> i can't remember which is best version
14:56:35  <peter1138> as i started experimenting with multitexture support
14:59:14  <peter1138> for me it is faster than 32bpp when zoomed in, but slows down when zoomed out
15:00:23  <MUcht> fully zooming out at 8bpp is slow enough for me
15:00:35  <peter1138> it's slower, heh
15:00:41  * Chris82 grabbing the secret diff :D
15:01:09  <peter1138> there's also a threading bug, heh
15:01:20  <peter1138> so don't generate a map with industries, heh
15:03:22  <MUcht> sounds like boring cargo games that style
15:04:41  <Eddi|zuHause2> well, generate a map without the diff :)
15:05:06  <Eddi|zuHause2> (or without the renderer activated)
15:07:52  <peter1138> MUcht: you can load games with them
15:07:57  <peter1138> it's just generation
15:08:01  <peter1138> Eddi|zuHause2: yeah
15:12:04  *** Peakki [antti@cs181000195.pp.htv.fi] has quit [Remote host closed the connection]
15:13:41  <Chris82> 3>..\src\blitter\opengl.cpp(14) : fatal error C1083: Cannot open include file: 'SDL.h': No such file or directory
15:13:43  <Chris82> hmmm
15:13:55  <glx> you need sdl
15:14:02  <Chris82> there's only sdl_s and sdl_v.h
15:14:09  <Chris82> can I use one of them or are these other files?
15:14:23  <glx> SDL.h is one of the sdl files
15:15:21  <Chris82> can I download SDL.h somewhere?
15:15:31  <glx> sdl.org
15:15:52  <glx> wrong adress
15:16:01  <Chris82> I already thought so ;) hehe
15:16:14  <glx> libsdl.org
15:16:31  *** Peakki [antti@cs181000195.pp.htv.fi] has joined #openttd
15:16:55  <peter1138> ahh
15:17:02  <peter1138> yes, sorry, it's dependent on sdl
15:17:15  <peter1138> well, not "sorry", i didn't release it :p
15:17:29  <Chris82> hehe :p I just need SDL.h or other stuff too from the source download?
15:17:53  <glx> for windows only headers are needed, and the dll when running
15:18:52  *** yorick [~yorick@s55924da0.adsl.wanadoo.nl] has joined #openttd
15:24:33  <Chris82> hmmm these include files from libsdl.org are not Visual Studio compatible it seems
15:24:41  <Chris82> I get loads of errors
15:25:43  *** setrodox [setrodox@85-125-222-161.dynamic.xdsl-line.inode.at] has quit [Quit: Hapiness ;D]
15:26:57  <Chris82> ahh no the problem is something else
15:26:57  <Chris82> 2>C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\GL/gl.h(1152) : error C2144: syntax error : 'void' should be preceded by ';'
15:27:09  <Chris82> this file is probably not the exptected one
15:29:36  <peter1138> eh
15:29:38  <peter1138> +h
15:29:46  <peter1138> well it works on linux, and i've only tested it there :p
15:30:59  <Chris82> yeah all the includes from GL are from the Platform SDK and those files are definitely different from the ones you're using on Linux
15:32:17  <peter1138> "I just noticed in a very late game (around 2250) that the running costs for street vehicles have risen to about 350K(EUR) a year therefore preventing most vehicles to actually write black numbers. "
15:32:29  <peter1138> yeah, vehicles really do "write black numbers" :o
15:32:34  <hylje> ;o
15:34:35  <stillunknown> peter1138: Did you have any other comments about my patch?
15:34:54  <stillunknown> Besides the this-> and IsFront() stuff.
15:35:33  <peter1138> yeah... it's too big :p
15:35:35  <peter1138> but you knew that
15:35:56  <peter1138> also there are bugs you know about
15:36:35  <stillunknown> One that i know, the reversing at the end of no rail.
15:36:48  <stillunknown> So where is the s in that?
15:38:40  <stillunknown> peter1138: Since i don't know of multiple remaining bugs.
15:39:01  <Chris82> even when I have the correct header files it won't compile with VC
15:39:14  <Chris82> VC doesn't like OpenGL it seems, who would have though that ;)
15:41:27  <peter1138> stillunknown: you only update the cached "mass on slope" for old games, not all
15:43:07  <stillunknown> I should add that stuff to savegames.
15:43:15  <stillunknown> Good of you to remind me.
15:43:32  <peter1138> it doesn't need saving. it's a cache
15:43:53  <stillunknown> What is the appropriate place for doing this kind of stuff?
15:44:07  <peter1138> in AfterLoadVehicles() probably
15:44:35  <peter1138> you really need to split some of this stuff off
15:44:50  <peter1138> there's so many changes you can't really tell the impact of them
15:48:00  <stillunknown> peter1138: The small pieces at a time is only practical for an ottd developer.
15:48:47  <stillunknown> I could split it up into a few pieces, but more than a few would have a lot of overhead.
15:54:15  <Eddi|zuHause2> err... is "((VehicleRail*)v)->cached_total_length" a meaningful value?
15:54:33  *** TinoM [~Tino@i5387CBAC.versanet.de] has quit [Quit: Verlassend]
15:55:25  <stillunknown> Eddi|zuHause2: It should be, if that casting of yours works.
15:56:22  <stillunknown> Only for the first engine.
15:56:26  *** yorick [~yorick@s55924da0.adsl.wanadoo.nl] has quit [Quit:  HydraIRC -> http://www.hydrairc.com <- Like it?  Visit #hydrairc on EFNet]
15:57:24  <peter1138> mmm, casts
15:58:11  <Eddi|zuHause2> well, it probably doesn't :)
15:59:20  <peter1138> i don't see that anyway :o
15:59:47  *** Mucht_ [~Mucht@p57A0F1AB.dip.t-dialin.net] has joined #openttd
16:00:05  <Eddi|zuHause2> not with the current inheritance relation :)
16:00:19  <Eddi|zuHause2> (which is, non-existent :p)
16:02:18  <stillunknown> peter1138: What's the maximum patch size that is likely to accepted?
16:03:32  *** MUcht [~Mucht@p57A0F317.dip.t-dialin.net] has quit [Ping timeout: 480 seconds]
16:07:39  *** BobingAbout [~BobingAbo@adsl-83-100-203-68.karoo.KCOM.COM] has joined #openttd
16:08:28  *** BobingAbout [~BobingAbo@adsl-83-100-203-68.karoo.KCOM.COM] has left #openttd []
16:08:58  *** helb [~helb@84.244.90.159] has quit [Remote host closed the connection]
16:09:52  *** helb [~helb@84.244.90.159] has joined #openttd
16:12:08  <peter1138> there's no max size
16:12:21  <peter1138> context is the key
16:12:28  <peter1138> like i committed a 70KB patch last night ;p
16:14:41  <stillunknown> I can roughly imagine three parts, one is the change to class based movement code.
16:14:49  <stillunknown> The second is the train code.
16:15:01  <stillunknown> The third the train acceleration function.
16:15:27  <peter1138> right
16:15:47  <peter1138> another is the changes to slopes/map array
16:15:58  <peter1138> another is the cached "mass on slope" changes
16:16:12  <peter1138> and probably more if i looked over it again
16:16:28  <stillunknown> The slopes stuff would be before the train stuff.
16:18:01  <peter1138> splitting those bits off would give you a chance to profile them on their on
16:22:02  <stillunknown> Let's assume that within a few days i get the remainder of the issues solved, is there anyone willing to do code checking on a reasonable timeframe (having to wait a week each time is not preferable)?
16:22:40  *** Chris82 [~chris@p579E1E89.dip.t-dialin.net] has quit [Quit: squash]
16:24:48  <Eddi|zuHause2> hey, i managed to update my "trains stop in the middle of the station" patch to trunk :)
16:24:51  <Eddi|zuHause2> http://users.informatik.uni-halle.de/~krause/middle_stop.diff
16:26:39  <Eddi|zuHause2> (tiny error, updated)
16:28:14  <Maedhros> why did you remove !IsCompatibleTrainStationTile(tile + TileOffsByDiagDir(DirToDiagDir(v->direction)), tile) ?
16:28:36  <Eddi|zuHause2> because that is the check for end-of-platform
16:28:51  <Eddi|zuHause2> which i replaced
16:33:57  <Eddi|zuHause2> you could probably collapse the other if statement into the train_should_stop variable, but i wanted to avoid changing the indentation :)
16:40:36  *** Nickman [~nn@d54C1C327.access.telenet.be] has joined #openttd
16:41:19  <Eddi|zuHause2> wtf? subsidy messages use wrong plural forms...
16:45:00  *** Wolf01 [~wolf01@host240-236-dynamic.9-87-r.retail.telecomitalia.it] has joined #openttd
16:45:16  <Wolf01> hello
16:46:26  <Noldo> hello
16:48:05  <Maedhros> hmm, bugger: http://devs.openttd.org/~maedhros/bounding-box.png
16:48:41  <Belugas> oops :)
16:58:23  <Phazorx> is there a page/file soermwhere explaining params for infra_landscape.grf?
16:59:37  <Eddi|zuHause2> Phazorx: tt-forums?
16:59:48  <Phazorx> Eddi|zuHause2: searching
17:00:01  <Phazorx> many refrences to grf file itself and quarrels about stolen trees
17:00:12  <Phazorx> but no .nfo or readme :(
17:00:23  <Thomas[NL]> decode the grf?
17:00:24  <Belugas> maybe there is no params
17:00:39  <Belugas> -is+are
17:00:43  <Phazorx> Belugas: well i put some number there accidently and noticed change
17:00:55  <Phazorx> but emperical search is time consuming
17:01:02  <Belugas> good hint
17:01:04  <Phazorx> i kinda hoped there is soemthing more or less official
17:01:12  <Belugas> thus, go decoding :)
17:01:17  <Phazorx> and i dont know how to decode
17:02:16  <Belugas> grfcodec -d -p 2 <name_of_grf>
17:02:21  <Belugas> -d = decode
17:02:30  <Belugas> -p 2 = windows pallette
17:02:50  <Belugas> http://wiki.ttdpatch.net/tiki-index.php?page=GRFActionsDetailed
17:02:55  <Belugas> to find out what it does
17:03:20  <Belugas> http://www.ttdpatch.net/grfcodec/
17:03:29  <Belugas> to have a full exoplanation about grfcoded
17:03:52  <Phazorx> thanks
17:03:56  <Phazorx> that's a lot of reading :)
17:04:07  <Belugas> http://coffee.in_a_mug.net for the nerves
17:04:15  <Belugas> well...
17:04:28  <Belugas> it's that or continue seraching for params explanations :)
17:04:28  <Eddi|zuHause2> "link does not work" :p
17:04:41  <Belugas> too bad :)
17:04:57  <Belugas> i've drank the mug already!
17:08:10  *** glx|away [glx@bny93-6-82-245-156-124.fbx.proxad.net] has joined #openttd
17:08:13  *** mode/#openttd [+v glx|away] by ChanServ
17:08:27  *** Ammler [~Ammler@adsl-84-227-160-31.adslplus.ch] has quit [Read error: Connection reset by peer]
17:08:50  *** Chicago_R_A [~anonymous@c-76-16-92-179.hsd1.il.comcast.net] has joined #openttd
17:09:26  *** glx is now known as Guest547
17:09:26  *** glx|away is now known as glx
17:11:01  *** Ammler [~Ammler@adsl-84-227-87-218.adslplus.ch] has joined #openttd
17:11:17  *** Vikthor [~Vikthor@snat1.spoje.net] has quit [Quit: Leaving.]
17:13:43  *** Guest547 [glx@bny93-6-82-245-156-124.fbx.proxad.net] has quit [Ping timeout: 480 seconds]
17:23:21  *** UnderBuilder [~usuario@168.226.106.70] has joined #openttd
17:24:56  <UnderBuilder> a question: works 'Forbid trains and ships to make 90 deg turns' option with yapf?
17:25:01  <hylje> yes
17:25:11  <orudge> Hmm, just wondering, the OpenTTD project on SourceForge has Darkvater, Rubidium and Ludde as project admins. Yet, as far as I'm aware, Rubidium is the only one who is still an active OpenTTD developer?
17:25:44  <Belugas> exact, orudge
17:26:03  <orudge> Perhaps this should be altered at some point? ¬
17:26:10  <Belugas> although Darvater might eventually come back
17:26:18  <orudge> Oh, really?
17:26:20  <Belugas> for Ludde, yes, definitively
17:26:29  <Belugas> well...
17:26:47  <Belugas> it is a really vague possibility
17:26:49  <orudge> or is that just speculation?
17:26:50  <orudge> Ah, right
17:26:51  <Belugas> it might not
17:26:55  <orudge> Fair eonugh
17:26:57  <orudge> enough
17:27:12  <Belugas> but i kindae remember he said "MAYBE" in one or 2 years
17:27:16  <Belugas> so...
17:27:26  <Belugas> just in case, i would keep him "alive"
17:30:40  <orudge> Mmh
17:30:54  <orudge> well, my suggestion would be to demote him to a normal developer, and promote someone else as admin (do we have a "leader" as such?)
17:31:50  <Wolf01> maybe monday evening i'll start the pocket pc port!
17:32:10  <stillunknown> Peter is apparently code leader, on the contact page.
17:32:23  <Eddi|zuHause2> lead coder :)
17:32:51  <stillunknown> Peter Nelson (peter1138)
17:32:51  <stillunknown> Email: peter@openttd.org
17:32:51  <stillunknown> Code Leader
17:33:09  <Eddi|zuHause2> who wrote that? :p
17:33:25  <peter1138> not me
17:33:28  <stillunknown> Matthijs Kooijman (blathijs)
17:33:28  <stillunknown> Email: matthijs@openttd.org
17:33:28  <stillunknown> Pathfinder finder and general coding
17:33:59  <Eddi|zuHause2> that was the old new pathfinder :)
17:34:09  <Belugas> stillunknown, it is not the same.
17:34:24  <peter1138> wibblewoo
17:34:25  <Belugas> anyway, Code Leader is purely honorific
17:34:34  * Belugas runs away laughing :D
17:34:58  <peter1138> like the pied piper. he lead...
17:35:47  <Eddi|zuHause2> http://de.wikipedia.org/wiki/Rattenfänger_von_Hameln <- that guy?
17:36:16  <peter1138> yeah
17:42:48  *** User [~User@p54827856.dip.t-dialin.net] has joined #openttd
17:43:15  *** User [~User@p54827856.dip.t-dialin.net] has quit []
17:54:37  <peter1138> was it something i said? :o
17:56:42  <Prof_Frink> Yes.
17:56:51  <peter1138> oh, ok
18:03:26  <CIA-1> OpenTTD: miham * r10455 /trunk/src/lang/ (14 files): (log message trimmed)
18:03:26  <CIA-1> OpenTTD: -Update: WebTranslator2 update to 2007-07-06 20:02:29
18:03:26  <CIA-1> OpenTTD: brazilian_portuguese - 4 fixed by tucalipe (4)
18:03:26  <CIA-1> OpenTTD: dutch - 4 fixed by habell (4)
18:03:26  <CIA-1> OpenTTD: estonian - 3 fixed by t2t2 (3)
18:03:27  <CIA-1> OpenTTD: french - 4 fixed by glx (4)
18:03:27  <CIA-1> OpenTTD: galician - 32 fixed by Condex (32)
18:06:02  *** KritiK [Maxim@ppp85-140-207-223.pppoe.mtu-net.ru] has joined #openttd
18:21:36  *** ThomasNL [~thomas@vdburgt.xs4all.nl] has joined #openttd
18:21:36  *** Thomas[NL] [~thomas@vdburgt.xs4all.nl] has quit [Read error: Connection reset by peer]
18:26:41  *** ThomasNL is now known as Thomas[NL]
18:27:25  *** Chris82 [~chris@p579E1E89.dip.t-dialin.net] has joined #openttd
18:27:30  <Chris82> hi guys :)
18:27:47  <peter1138> hi
18:28:05  <Chris82> I have a really weird error message when I combine the town cost patch and the diagonal clearing patch in landscape.cpp
18:28:06  <Chris82> 2>d:\Microsoft Visual Studio 8\VC\include\sal.h(226) : error C2144: syntax error : 'int' should be preceded by ';'
18:28:06  <Chris82> 2>d:\Microsoft Visual Studio 8\VC\include\sal.h(226) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
18:28:20  <Chris82> I have no idea what sal.h has to do with this file
18:28:34  <Chris82> when I only add one of the two patches it compiles fine
18:29:33  <Chris82> http://paste.openttd.org/159 the problem lies burried somewhere here :D
18:29:42  <Chris82> couldn't find the reason myself yet
18:29:53  *** Osai^Kendo [~Osai@pD9EB668C.dip.t-dialin.net] has quit [Quit: Osai^Kendo]
18:30:04  <peter1138> #
18:30:04  <peter1138> -                     if (sprite_base == SPR_SLOPES_BASE - 15) sprite_base = SPR_FOUNDATION_BASE;
18:30:07  <peter1138> #
18:30:08  <peter1138> nice change :p
18:30:10  <peter1138> +                     if (sprite_base  == SPR_SLOPES_BASE - 15) sprite_base = SPR_FOUNDATION_BASE;
18:30:20  <peter1138> #
18:30:21  <peter1138> -/* $Id$ */
18:30:21  <peter1138> #
18:30:21  <peter1138> +s/* $Id$ */
18:30:23  <peter1138> ? :o
18:31:12  <Chris82> yeah I've fixed that already
18:31:21  <Chris82> I haven't even touched that line dunno how it got in the patch file
18:31:33  <Chris82> but that is not causing this weird error
18:32:30  <Chris82> the diagonal clearing calls the CmdLandscapeClear function where the other patch resides and there must be some really obscure conflict
18:35:19  <Eddi|zuHause2> that's one of the worst problems with c header files, because of the textual inclusion you get errors in the totally wrong places
18:35:57  <Chris82> I don't even know why sal.h is required, one of the openttd header files must include a standard library which itself requires sal.h
18:36:06  <Chris82> because when searching the OTTD source I can't find any reference to it
18:36:18  <Chris82> but the project search doesn't look in standard libraries of course
18:36:35  <Eddi|zuHause2> there is nothing wrong in sal.h
18:37:03  <Eddi|zuHause2> but something before the inclusion of sal.h has some syntax error (like the superfluous s up there)
18:37:05  <Chris82> well that is a library from VC I haven't touched it I would assume there's nothing wrong with it
18:37:40  <Chris82> extern "C" { < this is line 226 of sal.h
18:38:03  <Eddi|zuHause2> do not even look there
18:38:46  <Eddi|zuHause2> look for some more stray changes like that s
18:39:00  <Eddi|zuHause2> in the complete diff, not only that file
18:39:24  <Chris82> that s?
18:39:36  <Eddi|zuHause2> <peter1138> +s/* $Id$ */
18:40:10  <peter1138> smells of a botched ctrl-s :)
18:40:18  <Chris82> oh weird
18:40:43  <Chris82> lol peter saved my life once again :p
18:40:56  <Chris82> that s is totally senseless at the beginning of the file of course :D
18:41:10  <Chris82> no idea how it got there but thanks for seeing it
18:41:13  <Eddi|zuHause2> hm... i suddenly get a lot of "train is lost" messages...
18:41:37  <Chris82> I'll be back later, reserver a squash court at 9 pm :)
18:41:41  <Chris82> reserved*
18:41:48  *** Chris82 is now known as Chris|Squash
18:51:01  <Thomas[NL]> I can't open the zip containing the US-road set :(
18:52:14  <Eddi|zuHause2> incomplete transmission?
18:52:47  *** skidd13 [~skidd13@p548A5B7A.dip.t-dialin.net] has joined #openttd
18:53:10  <peter1138> it must be that new encrypted grf format ;)
18:53:20  <Thomas[NL]> http://paste.openttd.org/160
18:53:40  <Thomas[NL]> using fileroller on ubuntu
18:55:18  <Eddi|zuHause2> what does "head <zipfile>" say?
18:56:38  <Thomas[NL]> noting :/ it outputs a space it seems
18:58:16  <Eddi|zuHause2> can you wget the file from the server?
18:58:54  <Thomas[NL]> yes, same error
18:59:42  <Eddi|zuHause2> might be file corruption on the server then, what is the link?
18:59:49  <Thomas[NL]> http://www.as-st.com/ttd/newusa/files/usroadsw.zip
19:00:10  <Thomas[NL]> Dos = -w same error
19:01:07  <Eddi|zuHause2> the file is only 4 Byte here
19:01:47  <Thomas[NL]> same here
19:02:04  *** thgergo [~th_gergo@dsl51B60E46.pool.t-online.hu] has joined #openttd
19:02:13  <Eddi|zuHause2> write a mail to the creator
19:02:59  <Thomas[NL]> will do
19:08:06  *** NukeBuster [~opera@a62-251-21-79.adsl.xs4all.nl] has left #openttd []
19:08:20  *** skidd13 [~skidd13@p548A5B7A.dip.t-dialin.net] has left #openttd []
19:11:40  <Tlustoch> Is it possible to prevent trains from going to depots?
19:11:48  *** NukeBuster [~opera@a62-251-21-79.adsl.xs4all.nl] has joined #openttd
19:11:54  <hylje> yes, by removing the entries to them
19:12:08  *** thgergo [~th_gergo@dsl51B60E46.pool.t-online.hu] has quit [Ping timeout: 480 seconds]
19:12:13  <hylje> you might also want to remove breakups and servicing
19:12:39  <Prof_Frink> and setting 'disable servicing when breakdowns set to none'
19:12:42  <Eddi|zuHause2> Tlustoch: there is a setting "disable servicing if breakdowns are off"
19:12:59  <Tlustoch> in ttdpatch there's just option for it
19:13:07  <Tlustoch> ok I see it now
19:13:24  <Prof_Frink> Tlustoch: Technically there isn't
19:13:39  *** helb [~helb@84.244.90.159] has quit [Remote host closed the connection]
19:14:08  <Prof_Frink> Just setting them to only go to a depot after ~32,000 days
19:14:18  <hylje> :o
19:14:28  *** helb [~helb@84.244.90.159] has joined #openttd
19:15:07  <Eddi|zuHause2> that's not even 100 years :)
19:15:50  *** thgergo [~th_gergo@dsl51B60E46.pool.t-online.hu] has joined #openttd
19:33:29  *** HMage [Queneex@hmage.dialup.corbina.ru] has quit [Read error: Connection reset by peer]
19:35:00  <Tlustoch> Is it possible to build when the game is paused?
19:35:35  <Maedhros> yes, but only as a cheat (press ctrl+alt+c to get the cheat menu)
19:36:50  <Tlustoch> hmm
19:36:57  <Tlustoch> When the game ends?
19:37:23  <Belugas> why is it a cheat, though?  Georges complained a lot about that one.  what If it was only valid for single user?
19:37:39  <Tlustoch> I am playing some large map and I don't have enough time to build all stuff.
19:37:50  <peter1138> cos it gives you an advantage over the ai
19:38:15  <Tlustoch> You play with AI?? I never play with AI.
19:38:56  <Maedhros> i'd quite like to see it as an option rather than a cheat, i have to say
19:39:37  <Belugas> me too!
19:39:45  <Noldo> agreed
19:40:09  <Belugas> but peter1138 has a point though
19:40:26  <hylje> its not like the AI is disadvantaged enough
19:40:28  <Belugas> mmh...
19:40:44  <Belugas> can a game be run withoutn AIs?  can't remember
19:40:47  <hylje> yes
19:40:48  *** silent [~pwr@86.121.234.64] has joined #openttd
19:41:36  <Tlustoch> Please can someone send me a save of advanced game?
19:41:37  <Belugas> oh... than i guess it could be conceivable to allow it as an option only on no AI and not MP game
19:42:58  *** Sacro [~ben@adsl-87-102-80-216.karoo.KCOM.COM] has joined #openttd
19:43:14  <Smoovious> peter1138... updated my FS#532 chat patch with your suggestion (instead of using <time.h>)... seems to work well now... would you mind looking it over for more critique when you get a chance?
19:44:07  <peter1138> Belugas: yeah, but is it being marked as a cheat really a problem?
19:46:30  <Belugas> I think it's rather the idea of using a cheat more than anything else
19:47:07  <Belugas> to be honest, i do not really care.  I use it a lot, but i don't "play" at all, just doing some tests
19:47:19  <Chicago_R_A> You don't play at all?
19:47:21  <Chicago_R_A> That's kinda sad
19:47:22  <Noldo> there is no high score lists anymore?
19:47:31  <Belugas> Chicago_R_A, i don't have time to play
19:47:44  <Belugas> i merely have time to dev
19:48:09  <Chicago_R_A> Much appreciated - just too bad that you don't have the time to enjoy it.
19:48:19  <Belugas> and i don't relax by playing ottd, ther are always have stuff on my todo list that adds up...
19:48:26  <Belugas> i'd rather play guitar to realx :D
19:48:47  <Belugas> i will enjoy it once everything i want to do will be completed :D
19:48:52  <Noldo> This week I've cleaned to relax
19:51:10  <Tlustoch> Hey guys. Send me some save from your game.
19:51:15  <Tlustoch> I want to learn something new.
19:51:50  *** Vikthor [~Vikthor@snat1.spoje.net] has joined #openttd
19:52:15  <Belugas> learn C++!
19:52:49  <Tlustoch> I already know that.
19:53:07  <Belugas> than learn OTTD and patch!!
19:53:57  <Wolf01> -Add: support for "prospecting" raw industries, i.e. you pay an amount of money and then it might (with a given chance) build a raw industry somewhere on the map.
19:53:58  <Wolf01> cool, but i don't like the "somewhere", and if i undersood well, it is a random industry :/
19:56:21  <Maedhros> "somewhere" is the whole point of the feature, and i'd have expected it to (maybe) build the industry you specified
19:57:45  <Eddi|zuHause2> fixed industry, random place, and chance to fail?
19:58:34  *** silent [~pwr@86.121.234.64] has quit [Quit: Client exiting]
20:00:30  <Maedhros> but several times cheaper than directly building it
20:01:21  <Eddi|zuHause2> Tlustoch: you would not have much fun with my savegame, it only loads with a very customised version of miniin
20:01:37  <Eddi|zuHause2> but i have a few screenshots
20:01:49  <Wolf01> i would have liked more something like you tell the prospectors the tile, the kind and they ask "do you want to try to build an industry here with xx% of chance?"
20:06:27  <Belugas> the point is to duplicate a feature of TTDPatch, in order to get one step closer to newindustries
20:07:09  <Belugas> so... maybe it is not what the users want, but it is what the specs are all about :)
20:07:33  *** Me [~chatzilla@vau75-6-82-230-164-90.fbx.proxad.net] has joined #openttd
20:07:49  <Belugas> but it is not a random choice of industry.  You prospect for THAT type of industry
20:08:31  <Belugas> just that a prospection is not at the CHOSEN spot, but as in real life, somewhere on the map where it CAN be found
20:08:32  <Wolf01> but in a random place on the 2048*2048 map
20:08:37  <Belugas> yes
20:09:00  <Belugas> although TTPP is limited to 256*256...
20:09:05  <Belugas> TTDP
20:10:17  <Wolf01> which is a double loss of money, i like more to try 10 times to build in a place and be sure that an industry will be built in that place instead of try 100 times and be sure that the industry will be built in the other side of the map
20:11:05  <Maedhros> hmm. it would be nice if you got a news message about the new industry if the prospecting was successful
20:11:24  <Belugas> it's not the case?
20:11:36  <Maedhros> Wolf01: you can still use the old method
20:11:44  <Maedhros> Belugas: doesn't seem to be
20:11:53  <Wolf01> and i'll use it
20:13:48  <Belugas> mmh... got to check it
20:13:55  <Belugas> but not now, as i'm still at work :P)
20:18:14  *** Haos [Caemyr@82-43-152-123.cable.ubr03.nmal.blueyonder.co.uk] has joined #openttd
20:20:15  <UnderBuilder> lol @ http://www.tt-forums.net/viewtopic.php?p=605220#605220
20:22:04  *** Peakki [antti@cs181000195.pp.htv.fi] has quit [Quit: Lähdössä]
20:22:08  <Wolf01> why not make ottd bootable, you put the memory stick with ottd and chose "boot from usb" as first option :)
20:22:26  <valhallasw> TTDOS :D
20:22:38  <valhallasw> well
20:22:53  <valhallasw> small linux distro, something lighter than xf86 and you're done?
20:23:04  <valhallasw> yes, yes, it's xorg. so what :p
20:23:10  <peter1138> UnderBuilder: he appears to be confusing a "memory stick" with a computer...
20:23:12  <Wolf01> uCLinux with only OTTD :D
20:24:11  *** Caemyr [Caemyr@82-43-152-123.cable.ubr03.nmal.blueyonder.co.uk] has quit [Ping timeout: 480 seconds]
20:24:42  *** Haos is now known as Caemyr
20:24:42  <Prof_Frink> valhallasw: I think SDL can output to fbdev
20:25:42  <Prof_Frink> No need for X at all
20:26:02  <valhallasw> Prof_Frink: hm, possible
20:26:14  <valhallasw> SDL can output to a text console too, but that would be kinda evil
20:26:29  <peter1138> svgalib
20:27:05  <hylje> :o
20:28:24  <Maedhros> news message when prospecting works: http://devs.openttd.org/~maedhros/prospecting_news.diff :)
20:29:37  <Chris|Squash> Tlustoch, when you disable breakdowns there is a patch option not to go to depots then
20:29:54  <Chris|Squash> oh lol I should scroll down when I come back :D
20:29:56  <Chris|Squash> that was long ago
20:29:58  <Chris|Squash> hi btw
20:30:06  <Belugas> Maedhros, you're DA man
20:30:14  <Belugas> although....
20:30:17  *** Chris|Squash is now known as Chris|Zzz
20:30:17  <Belugas> i wonder...
20:30:38  <Smoovious> Chris... updated the chat patch on FS#532
20:30:38  <Belugas> why is it not using the random creation handler...
20:31:27  <Chris|Zzz> can you send me the link in a query so I don't forgot to update it tomorrow
20:31:43  <Smoovious> okee
20:31:43  <Chris|Zzz> I will also add 1 or 2 more patches and then release a new build tomorrow
20:31:46  <Chris|Zzz> thx
20:36:46  <CIA-1> OpenTTD: belugas * r10456 /trunk/src/newgrf.cpp: -Codechange: Enable loading newgrf strings for Industries
20:40:46  *** Sacro [~ben@adsl-87-102-80-216.karoo.KCOM.COM] has quit [Remote host closed the connection]
20:41:12  <CIA-1> OpenTTD: belugas * r10457 /trunk/src/newgrf.cpp:
20:41:12  <CIA-1> OpenTTD: -Codechange: Load the newly read definitions of Industries and Industry tiles.
20:41:12  <CIA-1> OpenTTD: No, this is not the final commit for newindustries (far from it), just another step.
20:43:50  <peter1138> aww
20:43:55  <peter1138> you should say it *is*
20:44:01  <peter1138> just to confused them :)
20:44:04  <peter1138> -d
20:44:36  <Belugas> lol
20:44:49  <Eddi|zuHause2> i bet the final commit will once again look really unspectacular like "Add support for feature AB"
20:45:10  <Belugas> good idea, Eddi|zuHause2 :)
20:45:41  <Eddi|zuHause2> trams slipped through like that :p
20:45:43  <peter1138> -Fix (r1): minor industry changes
20:46:05  <Belugas> rofl :DD
20:46:41  <hylje> or just something arbitrary and misleading
20:46:46  <hylje> and pointless
20:46:57  <hylje> fix (r04983): Bjarnism
20:47:00  *** setrodox [setrodox@83-65-236-175.dynamic.xdsl-line.inode.at] has joined #openttd
20:48:31  *** Sacro [Ben@adsl-87-102-80-216.karoo.KCOM.COM] has joined #openttd
20:49:21  *** elmex [~elmex@e180066245.adsl.alicedsl.de] has quit [Remote host closed the connection]
20:49:26  *** elmex [~elmex@e180066245.adsl.alicedsl.de] has joined #openttd
20:53:31  *** Me [~chatzilla@vau75-6-82-230-164-90.fbx.proxad.net] has quit [Quit: ChatZilla 0.9.78.1 [Firefox 2.0.0.4/2007051502]]
20:58:06  <Eddi|zuHause2> there is definitely something dodgy with YAPF... i get lots of "train is lost" messages which get fixed after a while (probably when almost all segments got cached) and they reappear if i change track layout
20:58:34  <Eddi|zuHause2> only seems to happen with diesel engines
20:58:44  <Eddi|zuHause2> that cross different railtypes
20:58:50  *** lolman [~John@cpc3-leds2-0-0-cust55.leed.cable.ntl.com] has joined #openttd
21:09:06  *** UnderBuilder [~usuario@168.226.106.70] has quit [Quit: using sirc version 2.211+KSIRC/1.3.12]
21:12:49  *** Osai^Kendo [~Osai@pD9EB506A.dip.t-dialin.net] has joined #openttd
21:12:52  <Phazorx> hmm.. who was the one fixing so primary industries can close now?
21:13:27  <Phazorx> cause apaprently they clsoe even if their production is taken
21:15:54  *** lolman [~John@cpc3-leds2-0-0-cust55.leed.cable.ntl.com] has quit [Read error: Connection reset by peer]
21:18:10  *** Nickman is now known as Nickman^Away
21:24:58  *** Osai^Kendo is now known as Osai
21:37:05  *** Zr40 [~Zr40@zr40.xs4all.nl] has joined #openttd
22:03:04  *** Thomas[NL] [~thomas@vdburgt.xs4all.nl] has quit [Remote host closed the connection]
22:03:30  *** lolman [~John@cpc3-leds2-0-0-cust55.leed.cable.ntl.com] has joined #openttd
22:12:19  <Sacro> http://www.sounerd.com.br/index.php?option=com_content&task=view&id=240&Itemid=43 <- roffle
22:13:08  *** Purno [~Purno@5357D37C.cable.casema.nl] has quit [Read error: Connection reset by peer]
22:15:24  <CIA-1> OpenTTD: peter1138 * r10458 /trunk/src/ (sound/win32_s.h video/win32_v.h): -Fix (r10444): restore original descriptions for win32 drivers
22:20:12  *** Zr40 [~Zr40@zr40.xs4all.nl] has quit [Quit: Leaving]
22:33:28  <CIA-1> OpenTTD: rubidium * r10459 /trunk/src/ (industry.h industry_cmd.cpp industry_gui.cpp): -Codechange: add helper functions to determine whether an industry is a primary industry and how much it costs to build such an industry.
22:38:27  *** Chicago_R_A [~anonymous@c-76-16-92-179.hsd1.il.comcast.net] has quit [Ping timeout: 480 seconds]
22:41:58  <Wolf01> 'night
22:42:03  *** Wolf01 [~wolf01@host240-236-dynamic.9-87-r.retail.telecomitalia.it] has quit [Quit: Once again the world is quick to bury me.]
22:56:24  *** Progman [~progman@p57A1DC88.dip.t-dialin.net] has quit [Remote host closed the connection]
22:56:38  *** smoovi [~smoovi@dslb-088-073-072-089.pools.arcor-ip.net] has quit [Quit: #idlerpg]
22:59:14  <kaan> night all :)
22:59:16  *** kaan [~Klaus@82.192.152.195] has left #openttd []
23:06:32  *** Vikthor [~Vikthor@snat1.spoje.net] has quit [Quit: Leaving.]
23:13:19  *** Maedhros [~jc@i-195-137-43-74.freedom2surf.net] has quit [Quit: good night]
23:14:16  *** setrodox [setrodox@83-65-236-175.dynamic.xdsl-line.inode.at] has quit [Quit: Hapiness ;D]
23:21:48  *** Nickman^Away [~nn@d54C1C327.access.telenet.be] has quit [Quit: ( www.nnscript.de :: NoNameScript 4.02 :: www.XLhost.de )]
23:24:57  <Sacro> does OpenTTD use STL anywhere?
23:27:28  *** elmex [~elmex@e180066245.adsl.alicedsl.de] has quit [Remote host closed the connection]
23:30:02  <Smoovious> STL?
23:30:17  <Sacro> yes :p
23:30:30  <Sacro> don't make me scroll back up and read what it stands for :p
23:30:44  <Sacro> http://en.wikipedia.org/wiki/Standard_Template_Library
23:32:31  <Smoovious> ahh
23:32:38  <Eddi|zuHause2> Sacro: i am pretty sure i have seen discussions about List and Vector stuff
23:33:05  <Sacro> Eddi|zuHause2: yes... i think YAPF uses it
23:33:11  <Sacro> its mentioning templates and suchlike
23:33:30  <Sacro> foo->bar is the same as (*foo).bar
23:33:33  *** Tlustoch [~last_evol@vetrnik.koleje.cuni.cz] has quit [Quit: Leaving]
23:33:35  <Sacro> that makes more sense..
23:34:02  <Eddi|zuHause2> yapf makes really heavy use of templates, but probably also the pools
23:35:45  <Sacro> ah yes... the pools
23:40:25  *** Mucht_ [~Mucht@p57A0F1AB.dip.t-dialin.net] has quit [Quit: Konversation terminated!]
23:46:09  <Sacro> ack
23:46:18  <Sacro> what is the difference between a pointer and a reference ><
23:48:37  *** ThePizzaKing [~jeff@c211-28-160-16.eburwd2.vic.optusnet.com.au] has joined #openttd
23:48:48  <Eddi|zuHause2> you cannot modify references
23:48:58  <Sacro> are you sure?
23:49:03  <Eddi|zuHause2> but you can do pointer arithmetics
23:49:12  * Sacro is confused
23:49:24  <Eddi|zuHause2> you can only the variable the reference refers to
23:49:32  <Eddi|zuHause2> not the reference itself
23:49:33  <Sacro> :\
23:49:41  <Sacro> [00:49] <<Eddi|zuHause2>> you can only the variable the reference refers to <- buh...
23:49:52  <Sacro> that sentance has a word too many, or not enough
23:50:10  <Eddi|zuHause2> modify
23:50:23  <Sacro> ooh
23:50:47  <Sacro> hence it only uses &foo to pass its address
23:52:25  * Sacro is kind of getting it
23:53:26  <Sacro> hmm, so with references you'd do swap(int &foo, int &bar){ int temp = foo; foo = bar; bar = temp; }
23:55:31  <Eddi|zuHause2> call by reference is potentially dangerous
23:55:43  <Sacro> but with pointers you'd do swap(int* const pfoo, int* const pbar){ int temp = *pfoo; *pfoo= *pbar; *pbar = temp; }
23:55:49  <Sacro> why is it?
23:56:06  <Eddi|zuHause2> imagine foo(&a,&b) {a=3;b=4}
23:56:18  <Sacro> yeah?
23:56:21  <Eddi|zuHause2> and now call foo(x,x)
23:56:41  <Sacro> hmmm
23:56:44  <Sacro> that could be messy
23:56:46  <Eddi|zuHause2> now you don't know if x is 3 or 4
23:57:13  <Sacro> surely it'd be 4...
23:57:20  <Sacro> cos its the 2nd one
23:57:55  <Eddi|zuHause2> not necessesarily, C has quite some ability to change order of expressions
23:58:38  <Sacro> ah... true
23:58:42  <Sacro> i think i prefer asm
23:58:44  <Eddi|zuHause2> usually not over ";" but you can construct stuff where it is possible
23:58:53  <Sacro> i know where i am with asm :(
23:58:59  <Sacro> m68k stuff, anyway
23:59:33  *** Osai is now known as Osai^zZz

Powered by YARRSTE version: svn-trunk