Back to Home / #openttd / 2007 / 07 / Prev Day | Next Day
#openttd IRC Logs for 2007-07-06

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