Back to Home / #openttd / 2015 / 02 / Prev Day | Next Day
#openttd IRC Logs for 2015-02-26

---Logopened Thu Feb 26 00:00:30 2015
00:05-!-DDR [] has joined #openttd
00:23-!-argoneus [] has quit [Ping timeout: 480 seconds]
00:46-!-Xrufuian [] has joined #openttd
00:56-!-Eddi|zuHause [] has quit []
00:56-!-Eddi|zuHause [] has joined #openttd
01:07-!-KouDy [~koudy@] has quit [Quit: leaving]
01:08-!-KouDy [~koudy@] has joined #openttd
01:21-!-smoke_fumus [~smoke_fum@] has joined #openttd
01:30-!-DDR [] has quit [Read error: Connection reset by peer]
01:30-!-DabuYu [DabuYu@] has quit []
01:42-!-Yotson [~Yotson@2001:980:6ac8:1:6cfb:6a00:b3ba:6bec] has joined #openttd
02:02-!-tokai|mdlx [] has joined #openttd
02:07-!-tokai [] has quit [Ping timeout: 480 seconds]
02:23-!-HerzogDeXtEr1 [] has quit [Quit: Leaving.]
02:25-!-argoneus [] has joined #openttd
03:02-!-Celestar [] has joined #openttd
03:14-!-Celestar [] has quit [Ping timeout: 480 seconds]
03:21-!-Belugas [] has quit [Ping timeout: 480 seconds]
03:25-!-Celestar [] has joined #openttd
03:25-!-Belugas [~belugas@] has joined #openttd
03:25-!-mode/#openttd [+o Belugas] by ChanServ
03:29-!-shadowalkerAFK is now known as shadowalker
05:01-!-gnu_jj [] has quit [Remote host closed the connection]
05:01-!-gnu_jj [] has joined #openttd
05:37-!-Quatroking [] has joined #openttd
05:47-!-Flygon_ [] has joined #openttd
05:54-!-Flygon [] has quit [Ping timeout: 480 seconds]
05:56<supermop>when articulated vehicles turn, does each segment rotate about its center, or some arbitrarily defined point?
05:57<Eddi|zuHause>except in older versions of openttd, where the rotation point was the center of a length 8 vehicle, even if it was shortened
05:58<Eddi|zuHause>note that the anchor point of the sprite is not its center
05:58<supermop>i have a tram with a rigid pivot segment in the middle rather than bellows and i wanted to make that its own short articulated segment
05:59<supermop>the front and rear car will swing wide away from it when turning so it seems to be a lost cause
05:59<Eddi|zuHause>turning is a bit weird, with the jumping and length scale changes
06:00<supermop>ugh yeah
06:01<supermop>at least trams turn quickly so you don't have to spend much time looking at it
06:02<supermop>didn't you make some complex turning code?
06:03<Eddi|zuHause>but that was optimized for the old turning behaviour, and i never had the chance (or mood) for updating. so it might not be optimal
06:12<supermop>i cant figure out how to handle this so i think i'll just put the whole joint onto both front and rear cars and let them overlap and look bad for now
06:31-!-Xarick [] has joined #openttd
06:32<Xarick>so i introduced a bug
06:33<__ln___>to whom?
06:34<Xarick>to myself
06:37<Xarick>does the game knows which version of openttd savegames were saved?
06:41<@planetmaker>Xarick, OpenTTD has savegame versions which are part of the savegame
06:42<@planetmaker>so it knows how to handle the savegames from different versions. However, if you modify OpenTTD source, introduce new or especially change old settings or alike, then you have to adjust the savegame load code accordingly
06:43<@planetmaker>Xarick, while OpenTTD itself does not care which exact version of *OpenTTD* was used for a savegame, it is still recorded. Open the ingame console and type 'gamelog' to see the history of your savegame
06:44<@planetmaker>and Xarick, are you samu? :)
06:44<Xarick>yes, i registered to the forum
06:44<Xarick>registered as Xarick
06:44<@planetmaker>ehm... the account samu is still there
06:45<Xarick>i was told it wasn't
06:45<Xarick>chillcore told me i can't get my old account
06:45<Xarick>to create a new
06:46<@planetmaker>ehm, how would chillcore know?
06:46<Xarick>i couldn't recover it, I've also tried
06:46-!-chillcore [~chillcore@] has joined #openttd
06:47<@planetmaker>speaking of the devil ;)
06:47<chillcore>someone called?
06:47<Xarick>i forgot my password -> The e-mail/username information submitted could not be found.
06:47<@planetmaker>not exactly. I just wondered how you know that samu cannot recover / regain his forum account ;)
06:47<chillcore>becuase the birdies told me ;)
06:47<@planetmaker>Xarick, did you try contacting oruge?
06:47<Xarick>re-send activation email -> The e-mail/username information submitted could not be found.
06:47<chillcore>no seriously though ...
06:48<Xarick>no answer
06:48<chillcore>he did but his ticket was closed, frosh asked orudge and then told here in chat ... IIRC
06:48<@planetmaker>I see
06:48<@planetmaker>ah well. just wondering
06:49<@planetmaker>and I dislike double accounts :)
06:49<chillcore>the reason it was closed (long ago) was "compromised account"
06:50<chillcore>then samu stayed a way a very long time ...
06:50<chillcore>I have no further details
06:50<chillcore>not that I am willing to share anyway ;)
06:50<chillcore>maybe orudge can merge the accounts I dunno if that is wise and not my call
06:52<@planetmaker>really? Mod forum history tells me that e-mail and password were changed by owen on samu's (repeated) request so that he cannot recover it himself
06:52<@planetmaker>Xarick, add to your forum signature "Formerly known as samu" (or something to that effect), please
06:52<@planetmaker>thus let's handle it like a normal nick change
06:53<chillcore>I can not find the old thread with samu's last post, I guess it got deleted
06:53<chillcore>for good reason ;)
06:53<chillcore>maybe orudge can fill you in planetmaker?
06:53<chillcore>^^^ my preference anyway
06:54<Xarick>i have a bad feeling about this
06:54<@planetmaker>fill me in what?
06:54<chillcore>about that thread and the reason for closing his old account ;)
06:55<@planetmaker>chillcore, I cited from the thread concerning 'samu' in the privat mod forum ;) That should know the reasons, no?
06:55<chillcore>most likely yes ... I have no access to it so I do not know what has been said there
06:56<@planetmaker>Xarick, anyway, your account was blocked on your own request; that's fine. But yes, please treat it as normal nick change
06:57<@planetmaker>thus indicate your previous identity. No need to feel bad about that, though
06:57<Xarick>i had to stop, i was slightly mad
06:57<Xarick>i remember part of it
06:58<@planetmaker>I remember, too. It's ok.
06:59<chillcore>k. xarick moving forwards ... ;)
07:00<chillcore>about your bugreport in FS#6235 ... yo may hevto handle loading old savegames in afterload.cpp
07:00<chillcore>you may have too* ... charger cable :P
07:02<Xarick>it's funny that the game still continues to function fine with that change, because that bit has no meaning as of now
07:02<Xarick>that bit change
07:04<@planetmaker>why should it break, if you forget to zero an unused bit?
07:04<Xarick>some industries have it as 1
07:05<Xarick>those from non-patched have it 0
07:05<Xarick>those from my patch have it either 0 or 1
07:08<Xarick>pre-patch: always 0, post patch: 0 or 1, loading pre-patch save game in a post patch version, hmmm this is gonna be tough
07:12<@planetmaker>you've to insert a rule in the saveload code which sets the bit appropriately
07:12<chillcore>have a browse through afterload.cpp ... should be pretty straightforward, from my uneducated guess concerning bitmagic that is.
07:15<chillcore>anyone knows the best way to allow entering negative signs in queryboxes?
07:16<chillcore>I could modifie the querybox code to have it inserted by togglebox. that would me to keep using CS_NUMERAL
07:17<chillcore>+ allow*
07:19<chillcore>otherwise I have to let people enter normal text strings and convert that, but that seems like not such a good idea
07:20<Xarick>what name do i use in irc?
07:21-!-Xarick is now known as Samu
07:21-!-shadowalker is now known as shadowalkerAFK
07:23<Eddi|zuHause>how could any of us possibly answer this question?
07:24<Samu>ok, samu
07:25<chillcore>it will confuse less people for sure, as you changed in the middle of the night. ;)
07:26*chillcore ponders doing sliders first and let the negative sign solution reveal itself when the time comes
07:26-!-Xrufuian [] has quit [Quit: Quit]
07:27<Eddi|zuHause>negative numbers are a trivial regexp, right?
07:28<Samu>savegame version 194
07:28<Samu>and newgrf version blabla no idea what that is, I'm not using any NewGRF
07:29<Eddi|zuHause>Samu: you need to bump savegame version by 1, and then handle the conversion in afterloadgame
07:29<chillcore>hmm never done that before eddi, thank you for the hint
07:30<Eddi|zuHause>note that savegame version bumps are a pain if not merged right away
07:31<Eddi|zuHause>chillcore: if you can't do input verification by regexp, you probably shouldn't do it at all :p
07:32-!-Supercheese is now known as Guest715
07:32-!-Supercheese [] has joined #openttd
07:32<Eddi|zuHause>this is a big problem, because the common protocols use "<length><data>", which cannot be verified in regexp
07:33<chillcore>I see ... I can make my params negative by making them so in the config
07:34<Samu>savegame version 195 here we go
07:34<Eddi|zuHause>this has nothing to do with your problem, btw :p
07:34<Samu>only because of 1 bit
07:35<Samu>which version are we at
07:36<chillcore>saveload/saveload.cpp tells you that samu ;)
07:36<Samu>i knwo, that's what i'm editing
07:37<chillcore>the number that is there is the current one ... that would be 194 then?
07:37<chillcore>you have to make it 195
07:37<Samu>but at the comment part, i put 195 27171
07:37-!-Guest715 [] has quit [Ping timeout: 480 seconds]
07:37<Eddi|zuHause>that is probably wrong
07:38<Eddi|zuHause>because you don't commit the change at 27171
07:38<Samu>oh, 27172
07:38<Eddi|zuHause>more like "195 this patch"
07:38<Samu>ah, oki, better comment
07:38<Eddi|zuHause>where "this" should be replaced with an actual name :p
07:39<@planetmaker>that FS entry is quite remarkably void of any context or purpose of that change
07:40<@planetmaker>and I cannot say that the last days have shed any light on that from what I remember from irc either
07:44<Samu>that bit 4 doesn't have any meaning as of now
07:44<Samu>so, pointless fix
07:44<Samu>but I hope to make use of it
07:45<Samu>as someone else would, probably, whoever comes first
07:45<@planetmaker>it's pointless to add that change without anything requiring it
07:47-!-sla_ro|master [slamaster@] has joined #openttd
07:58-!-andythenorth [] has joined #openttd
08:02<andythenorth>nobody has seen it
08:03<V453000>call se polis
08:07<Samu>i found this comment
08:07<Samu>In old version there seems to be a problem that water is owned by
08:07<Samu> * OWNER_NONE, not OWNER_WATER.. I can't replicate it for the current
08:07<Samu> * (4.3) version, so I just check when versions are older, and then
08:07<Samu> * walk through the whole map.. */
08:08<Eddi|zuHause>4.3 is really really ancient
08:08<Eddi|zuHause>like 10 years ago
08:08<Samu>there's still water with OWNER_NONE today
08:09<Samu>it depends on waterclass
08:09<Samu>*cough* canal
08:10<Eddi|zuHause>yes, canals are not naturally occuring water
08:10<Samu>ok, nothing to be worried about then
08:12-!-roidal [] has joined #openttd
08:16<chillcore>andy, <V453000> call se polis <- cat is overhere ... in bag with "free mobile internet" simcard ... sending it back to where it came from. :P
08:17<V453000>I mean meow
08:19<Eddi|zuHause>"polis" means "city"
08:23-!-supermop_ [] has joined #openttd
08:25<Eddi|zuHause>no soy marinero
08:26<__ln___>ya sabemos que eres tú
08:27<Eddi|zuHause>what does "ya" mean?
08:28<Eddi|zuHause>and "eres" is some weird tense?
08:28<Eddi|zuHause>like future/conditional?
08:30<__ln___>present 2nd singular :/
08:30-!-supermop [] has quit [Ping timeout: 480 seconds]
08:30<Eddi|zuHause>you sure?
08:31<Eddi|zuHause>maybe i'm mixing up with french
08:33-!-HerzogDeXtEr [] has joined #openttd
08:39<Samu>why can we buy 100% shares from AIs in multiplayer? :(
08:39<Samu>just bought an AI by mistake
08:39<chillcore>because server allows it samu, there is a setting for that IIRC
08:39<Eddi|zuHause>because the distinction is between AI and human company, not between single and multiplayer
08:40<chillcore>ah ok ...
08:40<Samu>rip Clueless Plus
08:43<chillcore>Yay this works ...
08:43<chillcore>case CS_NUMERAL: return (key == '-') || (key >= '0' && key <= '9');
08:44<Eddi|zuHause>chillcore: that probably allows - within the number
08:44-!-andythenorth [] has left #openttd []
08:44<chillcore>maybe let me check ;)
08:46<chillcore>it does eddi and everything after the sign gets cut ... leaving a positive nr if there was no leading sign
08:47-!-supermop [] has joined #openttd
08:47<chillcore>should that be considered a programmers prob?
08:48<chillcore>if the sign is leading then it is fine
08:48-!-supermop [] has left #openttd []
08:49<@planetmaker>case CS_NUMERAL: return (key == '-' && first_key || key >= '0' && key <= '9');
08:49<@planetmaker>something like that
08:50<@planetmaker>whatever first_key then is ;)
08:50<chillcore>testing ... thank you planetmaker
08:51<Eddi|zuHause>... or just convert to regexp :)
08:52<chillcore>first_key was not declared ... planetmaker
08:53<chillcore>how do I do that eddi?
08:53<Eddi|zuHause>you import a regexp library...
08:54<chillcore>moar stuffs yay ... searching ...
08:55<@planetmaker>chillcore, yes, that's not declared. It's something you would need define somehow :)
08:56<Eddi|zuHause>does C++11 have regexp builtin meanwhile?
09:01<Eddi|zuHause>if they called it that, yes
09:02<chillcore>let's see if simply adding "#include <regex.h>" gives me any errors
09:03<b_jonas>Eddi|zuHause: yes, and they're indeed called regex (not regexp)
09:03<chillcore>compiles fine ... now how to use it ...
09:04<b_jonas>(in identifiers that is)
09:04<b_jonas>chillcore: <regex.h> is the header for posix regexp functions, not the C++ regexes
09:04<b_jonas>the C++11 regex stuff is declared in the <regex> header
09:06<Eddi|zuHause>everything C++-specific is beyond my knowledge
09:07<chillcore>hmm, ok b_jonas. You're talking kinda a strange to me language but still I appreciate the help/hints ;)
09:08<Eddi|zuHause>with posix you're probably getting problems in windows/visual studio
09:10<chillcore>"include <regex>" gives errors
09:10<chillcore>/usr/lib/gcc/x86_64-linux-gnu/4.8/include/mm_malloc.h:42:24: error: ‘SAFEGUARD_DO_NOT_USE_THIS_METHOD’ was not declared in this scope
09:11<chillcore>I wonder what the message means :P
09:14<@planetmaker>chillcore, it means it uses a memory access function which is banned in OpenTTD code. see src/safeguards.h
09:16<V453000>how do bridges recolour? 8bit mask?
09:16<@planetmaker>there are special bridge recolour indices and sprites
09:16<Eddi|zuHause>same as all other recolours
09:17<@planetmaker>thus the same as CC or water. Just different indices into the palette
09:17<chillcore>so 'we' throw this error ... planetmaker
09:17<@planetmaker>chillcore, yes
09:17<V453000>well sure I get that
09:17<V453000>but which colours :D
09:17<V453000>the special brown one? the cream-ish
09:17<chillcore>planetmaker: I get the feeling this is going to be one of them fun fun ones that needs platform specific code ...
09:18<@planetmaker>chillcore, why? (and actually what?)
09:18<@planetmaker>ah, the negative input
09:18<@planetmaker>hm... not sure.
09:18<chillcore>validation of strings .. yes leading - sign
09:19<@planetmaker>I don't think it does. Platform-specific is only the way the keys are obtained. The rest should be independent
09:19<chillcore>it being in the text box is not the prob ... it is making it idiot proof ...
09:19<chillcore>ah ok
09:19-!-sla_ro|master [slamaster@] has quit []
09:19<@planetmaker>I might totally err. But... :)
09:20<chillcore>hmm is there a nicer term in the 'industry' for "idiot proof"
09:20<chillcore>should there be?
09:20<chillcore>questions questions :P
09:21<V453000>chillcore: user-friendly? :D
09:21<Eddi|zuHause>V453000: try the PALETTE_TO_STRUCT_* ones (in src/table/...)
09:21<V453000>I will just try to extract the colours from the original bridges
09:22<Eddi|zuHause>V453000: sprites 795..801
09:22<chillcore>that about covers it ... V43000 but now I will always remember that when I see user-friendly in any context :P
09:23<@planetmaker>V453000, nah, don't :)
09:23<V453000>795..801 seems empty for ogfx XD
09:23<Eddi|zuHause>they are recolour sprites, not real sprites
09:24<@planetmaker>recolour sprites are always empty images - as they're no images
09:24<@planetmaker>but colour translation tables so-to-speak
09:24<Eddi|zuHause>planetmaker: i think the question he's trying to ask is "which are the 'source' colours in this colour map"
09:24<V453000>so if I make the image in the right colours originally, it will work
09:25<V453000>hm so are the bridges just CC yellow, CC gray and CC cream or whatnot?
09:26<@planetmaker>V453000, that file ^ gives you the recolours. indexplace: colour mapped to
09:26<@planetmaker>thus you want to use the indexplace colour in your sprites
09:26<V453000>but which apply to bridges XD
09:26<Eddi|zuHause>i said so already: "PALETTE_TO_STRUCT_*"
09:27-!-Lord_Aro [] has joined #openttd
09:27-!-LordAro [] has quit [Read error: Connection reset by peer]
09:28<@planetmaker>V453000, the last three bridges use it... to brown/yellow/silver. But you know that. Others... check openttd source :)
09:28<V453000>it is like source...range : output..range
09:28<V453000>great :)
09:28<@planetmaker>for drawing you're only interested in source range
09:28<V453000>I know :)
09:28<Eddi|zuHause>you can probably copy this file into your base set
09:28<@planetmaker>good :)
09:28<@planetmaker>you actually probably even should :)
09:29<V453000>CONCRETE is the red bridge?
09:29<Eddi|zuHause>CONCRETE is grey
09:29<V453000>ok :D so red.
09:29<Eddi|zuHause>red is the steel bridge
09:29<V453000>... the one small bridge which is also the middle of suspension bridges
09:30<Eddi|zuHause>V453000: the default bridges you can look up in src/table/bridge_land.h
09:32<V453000>ok so when I have this source-colour 8bpp file, I apply it to the sprite as a MASK?
09:33<Eddi|zuHause>you make a 8bpp mask using the colours in the "source" range
09:33<Eddi|zuHause>openttd applies the mask automatically with the builtin data
09:35<V453000> this?
09:35<Samu>FOR_ALL_INDUSTRIES .. hmm question is there a FOR_ALL_INDUSTRY but for TILES?
09:35<Samu>all industry tiles
09:35<Eddi|zuHause>Samu: no
09:36<V453000>mask applied like this?
09:36<V453000>alternative_sprites (spriteset_train_SLUGfront, ZOOM_LEVEL_NORMAL, BIT_DEPTH_32BPP) {template_32bpp_x1_vehicle8_MASK(0x00,0,"gfx_32bpp/SLUG_0000.png","gfx_32bpp/SLUG_mask_8bpp.png")}
09:36<Eddi|zuHause>Samu: you need to go over the whole map and bail out if not an industry tile
09:36<Samu>so i scan all tiles, and when i find a industry tile, i set
09:36<Samu>ok i see
09:36<Samu>will it include under construction tiles as well?
09:37<Eddi|zuHause>Samu: "if (!industrytile) continue;" or somesuch
09:37<Eddi|zuHause>yes, this will include construction
09:38<@planetmaker>V453000, applied like any mask to 32bpp sprites. Without looking it up, that might be right what you write
09:38<Eddi|zuHause>V453000: i'll assume "yes", but i don't actually know the syntax
09:38<V453000>good :)
09:38<V453000>this is a mask applied to a NUTS vehicle
09:38<V453000>only difference is that the mask is in CC colours :)
09:38<@planetmaker>yes. The game doesn't care
09:38*V453000 NEITHER
09:40<V453000>why does zephyris have it as 1 colour though?
09:40<V453000>cuz fuck it? :D
09:41-!-tycoondemon2 [] has quit []
09:41-!-tycoondemon [] has joined #openttd
09:41-!-Lord_Aro is now known as LordAro
09:50<Eddi|zuHause>because he's too lazy to use more than 1 colour
09:50<Eddi|zuHause>may give poorer results
09:50<V453000>right, so cuz fuck it
09:51<@planetmaker>err... OpenGFX bridges for sure use more than one colour
09:51<V453000>sure I was looking at zbase
09:51<V453000>hence the shit I linked :P
09:52<@planetmaker>and for zBase... the value of the mask is convoluted with the brightness of the 32bpp sprite. So one colour seems to have sufficed for him
09:52<@planetmaker>more colours might give better results, though
09:52<Eddi|zuHause>zbase is occasionally critizised for its poor recolour results
09:53<V453000>NUTS has horrendous recolour results with multiple colours :P
09:58-!-shadowalkerAFK is now known as shadowalker
10:04-!-shadowalker is now known as shadowalkerAFK
10:04<Samu>question -
10:04<Samu>is that how it should look?
10:05<Samu>duh, it's to set to 0, not 1
10:06<Samu>no wait, it's to set from 0 to 1
10:07<Samu>in every case, for now
10:11<Samu>ok just tested, looks like this is it
10:14<Eddi|zuHause>could use a comment what you're actually trying to do
10:14<Samu>retain bit 4
10:15<Samu>convert to new version
10:15-!-sla_ro|master [slamaster@] has joined #openttd
10:15<Samu>i dunno
10:15<Eddi|zuHause>that is not it.
10:15<Samu>i am thinking in advance, arg
10:17<Samu>bit 4 was 0 in old version
10:17<Samu>now it's 1
10:17<Samu>not really, but
10:17<Samu>it would be 1 if that was loaded
10:17<Eddi|zuHause>i mean something like this:
10:17<Samu>as a new version
10:18<Samu>oh, ok, i have more space there
10:19<@planetmaker>hm, what was the issue with that patch, Eddi|zuHause ? sprites?
10:19<Eddi|zuHause>the drawing code
10:20<Eddi|zuHause>sprites exist, just need to be assembled
10:20-!-KWKdesign [] has quit [Ping timeout: 480 seconds]
10:21<Eddi|zuHause>there's also an unsolved question about how to handle loading old savegames, because trucks waiting in the middle of a crossing will just start up and run into the train ahead
10:22<Eddi|zuHause>also needs updating 6k-ish revisions :p
10:25<Samu>Upon loading an old save game, the old bit 4 information is not being converted to the new bit 4 information. It affects all Industries.
10:25<Samu>FIX IT
10:26<Samu>will that comment do?
10:27<Samu>correction, all industry tiles
10:27<Samu>tiles of type industry
10:27<Samu>whatever you deem correct
10:27<chillcore>there is the little detail missing about why you move it ...
10:27<chillcore>"something I dunno ..." will not do I think
10:28-!-supermop_ [] has quit [Ping timeout: 480 seconds]
10:29<Samu>because it was not supposed to alter bit 4?
10:30<Eddi|zuHause>hm, it's actually only like 500 revisions
10:30<Samu>the explanation is kinda pointless because it's not fixing anything
10:30-!-KWKdesign [] has joined #openttd
10:31<Samu>crap i suck at explaining
10:31<Eddi|zuHause>hm, m6 was moved from _m to _me. anything else i need to worry about?
10:31<@planetmaker>franky: yes. Don't stick with your explanation to the code lines. But explain on a higher level what problem exists, samu
10:32<Samu>on a higher level, that bit does nothing
10:32<Samu>but should it do something, in one day in the future, that bit is being misused "today", this fixes it
10:35<@planetmaker>how is it mis-used?
10:35<Samu>it's not "not used"
10:35<Samu>it's being forced to be 0
10:36<@planetmaker>obviously it is not being used. Anything not being used is zeroed
10:36<@planetmaker>For good reason
10:36<Samu>well then it is being used
10:36<Samu>how do I explain it
10:37<Eddi|zuHause>"used" is semantic. the bit is still "accessed"
10:37<Eddi|zuHause>there is no semantic to this bit, hence it's "unused"
10:38<Eddi|zuHause>as in "you are free to add semantic to this bit"
10:39<b_jonas>Eddi|zuHause: do you mean to say that it's always zero currently, but in future versions setting it to one could mean something, so it has to be zeroed now when writte to savefiles, right?
10:39<Eddi|zuHause>b_jonas: something like that
10:41<Samu>pre-patch: always 0, post patch: 0 or 1
10:42<Eddi|zuHause>Samu: that still has the problem of being totally void of semantics
10:42<Samu>loading pre-patch to post-patch: turn to 1, no matter what it was
10:43<chillcore>and what does the 1 mean then?
10:43<Samu>but it's better correct
10:44<Samu>i must dig my excel file
10:44<@planetmaker>if this conversation was a painting, it would resemble something from Dahli or Escher. Pretty sure
10:44<b_jonas>do you mean Dali?
10:45<@planetmaker>yes, sorry
10:45<Samu>i also wanna be sure i'm not mistaking something
10:45<Samu>i've got all my observations written down
10:45<Eddi|zuHause>surely it's Dalí
10:46<@planetmaker>ce ci n'est pas un Magritte
10:47<Samu>when that bit is sea, it's value is 1
10:48<Samu>build a canal, turns to 0
10:48<Samu>build industry on top of canal, turns to 1, then immediately to 0 -< pre-patch behaviour
10:48<Samu>build industry on top of canal, turns to 1, maintain that value, 1 < post-patch behaviour
10:49<Samu>then it's allways 1
10:49<@planetmaker>and when built on river?
10:49<Samu>or it's always 0
10:49<Samu>river is 1
10:49<@planetmaker>so what's the difference between river and canal?
10:49<Samu>turns to 1, then immediately to 0 - pre patch
10:50<Samu>turns to 1, then maintain value, 1 - post patch
10:50<Samu>currently when an industry is built, the owner is set to OWNER_NONE, that means bit 4 is equal to 1
10:51<Samu>then immediately after setting it to 1, that's what happens
10:52<Samu>river owner is also water, but when an industry is built there, it only retains the value of bit 4
10:52<Samu>which is
10:54<Samu>the value is 0 when a company is building canals, then places an oil rig in it, however, the game still changes the owner to NO_OWNER for the industry, right before transforming it to a tile of type industry, that's why converting it to 1 for now, is sufficient
10:55<Eddi|zuHause>that still does not answer the question: why?
10:56<Samu>because landscape grid also mentions the bit 4 of industry tile as being unused. It is being accessed, used, zero'ed, it just doesn't have any actual meaning for now. I can't explain better than this, sorry
10:57-!-KWKdesign [] has quit [Ping timeout: 480 seconds]
10:57<V453000>sure but purpose? :D
10:57<Samu>respect the grid
10:57<Samu>future usage for the bit?
10:59<Samu>ah I see, the fix is incomplete?
11:01<Samu>I don't understand what you want me to say
11:01<Samu>it will never be 0?
11:01<chillcore>you eat to no longer be hungry ... you sleep to no longer be tired
11:02<chillcore>you change bit order to ...
11:03<Samu>i think i understand what's missing, yeah this patch is still not complete
11:03-!-Alberth [~alberth@2001:981:c6c5:1:be5f:f4ff:feac:e11] has joined #openttd
11:03-!-mode/#openttd [+o Alberth] by ChanServ
11:03<chillcore>and once it is complete you willhave completed it for ... ?
11:04<chillcore>that is the question samu ... why?
11:04<chillcore>o/ Alberth
11:05<Samu>it needs to fix one more thing apparently, the OWNER_NONE for industry is ruining it
11:05<Samu>that's why the game was forcing it to be 0
11:07<Samu>i change bit order to preserve bit 4 before it turns into an industry tile
11:07<@Alberth>s/was/is/, right?
11:08<Samu>industry tile is not supposed to touch bit 4
11:08<Samu>but to leave it be
11:09<Samu>glx knew this already
11:09<Samu>somewhere in DoIndustryblabla, must find it
11:10<Eddi|zuHause><Samu> industry tile is not supposed to touch bit 4 <-- again, you're imposing a logic on it that neither is there, nor has any reason to be there
11:11<Samu>a bit is unused
11:11<Samu>is that bit unused or not?
11:12<@Alberth>yep, it means nobody cares about its value, and it may get a different meaning at any time
11:15<Samu>I wrote this in the bugspray According to both landscape and landscape grid documentation, I believe that bit location was free to be used and never touched for anything related to industry tiles. I discovered the issue when I was searching for free, unused bits. For me, it would be preferrible if that bit value was preserved, hence this patch.
11:17-!-Progman [] has joined #openttd
11:17<Samu>i thought it was being changed only once, but it's not, it's being changed in two places in the code, I found one of the places, but there's another... glx pointed out the other day
11:17<Samu>damn me
11:20<@Alberth>"unused" does not imply "untouched"
11:21<@Alberth>if you don't want it touched, there should be something defined for it
11:21-!-KWKdesign [] has joined #openttd
11:22<chillcore>DoCreateNewIndustry() is what glx mentioned as he told you that you were not yet aware of some things happening, samu
11:22<Samu>yes, yes exactly that
11:23-!-Celestar [] has quit [Quit: Leaving.]
11:24<Samu>Owner founder
11:24<Samu>this part
11:27<chillcore>founder is the one paying for it ... not the owner
11:28-!-glevans2 [] has quit [Ping timeout: 480 seconds]
11:30<Samu>looking for that misterious step which sets OWNER_NONE
11:30-!-glevans2 [] has joined #openttd
11:30-!-Celestar [] has joined #openttd
11:31<chillcore> * @param founder Founder of the industry; OWNER_NONE in case of random construction.
11:31<chillcore>please continue explaining ...
11:31<Samu>i say OWNER_NONE but it could be any of those that sets bit 4 to 1, there's more that fit the criteria
11:32<Samu>what I know is that the bit suddenly becomes 1 in a misterious way
11:35-!-roidal [] has quit [Quit: WeeChat 1.0.1]
11:36-!-roidal [] has joined #openttd
11:43<Samu>is this it? if (i->founder == old_owner) i->founder = (new_owner == INVALID_OWNER) ? OWNER_NONE : new_owner;
11:44<Samu>static void ChangeTileOwner_Industry(TileIndex tile, Owner old_owner, Owner new_owner)
11:52<Eddi|zuHause>Samu: probably not.
11:52<Eddi|zuHause>Samu: that changes stuff in the industry, not in the industrytile
11:56-!-TheMask96 [] has quit [Ping timeout: 480 seconds]
11:58<juzza1>what's the proper format for a patch sent to openttd flyspray? svn diff?
12:00<Eddi|zuHause>any diff will probably do
12:01-!-TheMask96 [] has joined #openttd
12:02-!-liq3 [] has quit []
12:04<@Alberth>any unified diff :)
12:05-!-oskari89 [] has joined #openttd
12:07<chillcore>properly validating negative nrs: while (str > first && str <= last && *str != '\0') RemoveNegativeSignsFromString();
12:07<chillcore>^^^ pseudocode
12:07<chillcore>that should do it right?
12:09<Eddi|zuHause>chillcore: i thought the idea was to make it so you can't actually enter the extra characters, not to remove them afterwards
12:09<chillcore>or would it be better prevent negative signs being anything other then the leading character
12:09<Eddi|zuHause>chillcore: also, this looks weird at best
12:10<chillcore>except for the 'first' part it is a copy of existing code
12:11<chillcore>StrValid and others
12:11<Eddi|zuHause>i suppose string handling in C(++) is always weird...
12:12<chillcore>hmm ... pondering on ...
12:14<@Alberth>don't understand that pseudo code, but I don't understand your goal either :)
12:14<chillcore>still silly us proggers we have to keep people from entering "-12-34"
12:14<chillcore>allowing entering a negative sign in querybox Alberth
12:15<chillcore> case CS_NUMERAL: return (key == '-') || (key >= '0' && key <= '9');
12:15<chillcore>this works
12:15<chillcore>but eg -"12-34" comes out as 12
12:15<chillcore>or -12
12:16<@Alberth>I'd expect so yeah :p
12:16<chillcore>to be clear ... -12-34 becomes -12 .... 1234-568 becomes 1234
12:16<chillcore>otherwise it works
12:17<chillcore>hi Terkhen
12:17<Eddi|zuHause>chillcore: i suppose you could add a parameter "position" to that function
12:17<chillcore>so I need to strip non leading signs or prevent them being entered
12:17<Eddi|zuHause>chillcore: then allow '-' only if position==0
12:18<chillcore>directly when entering a number ... k
12:19<chillcore>I've seen many examples of regex but non tackle this particular prob
12:19<chillcore>either they are not aware or ... I dunno
12:19<Eddi|zuHause>(that is basically what planetmaker meant when he said "first_key")
12:20<chillcore>then I can not add the sign alberth, I tried that, but I will try again to make sure
12:20<Eddi|zuHause>chillcore: you could replace this check with a regexp, but that means passing the whole resulting string, instead of the char being entered
12:20<@Alberth>adding some form of position seems easier to me
12:21<@Alberth>(no idea what the code is there at this time though)
12:21<chillcore>case CS_NUMERAL: return (key == '-') || (key >= '0' && key <= '9');
12:22<chillcore>after allowing the negative sign trunk does not have that part yet
12:22<Eddi|zuHause>chillcore: you could go up one level, and try to alter the check there
12:23<Eddi|zuHause>i.e. change where this function is used, instead of this function
12:23<chillcore>I was thinking about that but there the invalid chars are converted to '?'
12:23<Samu>i can't do this
12:24<chillcore>I admit I have some more digging to do
12:25<@Alberth>return (first_char && key == '-') || (key >= '0' && key <= '9')
12:25<Samu>how's an industry built?
12:25<Samu>there's so many ways :(
12:25<Eddi|zuHause>chillcore: i mean like where it says "IsValidChar(c, CS_NUMERAL)" you could replace it with "IsValidChar(c, position==0?CS_NUMERAL_MINUS:CS_NUMERAL)"
12:26<@Alberth>Samu: CmdBuildIndustry or so
12:27<chillcore>I understood Eddi, just not there yet, thank you for the hint
12:27<Samu>upon the act of actually making the tiles of an industry it defines all them as OWNER_NONE
12:28<Samu>where is this
12:28<Samu>ok searching
12:29<@Alberth>All user actions are a Cmd<something>
12:32<chillcore>hmm isValidChar is called from a different file or files ... yay
12:32<chillcore>cool that youtube links are properly readable here
12:32<NGC3982>Simcity 4, or 3?
12:37<@Alberth>:O even CS_HEXADECIMAL is used :)
12:37<chillcore>eddi: moehahaha "minister of OMFG"
12:38<chillcore>ye alberth, that would have been my next question "do I do the others too?"
12:38<chillcore>first let's see if I can make 1 work properly :P
12:39<@Alberth>the other ones are trivial after that :p
12:39-!-frosch123 [] has joined #openttd
12:40<frosch123>hai :)
12:42<chillcore>hmm IsValidChar is called from 10 times places the code
12:43-!-Celestar [] has quit [Quit: Leaving.]
12:46-!-Progman [] has quit [Remote host closed the connection]
12:48<@Alberth>hmm, see only 8 uses :)
12:50<chillcore>possible that it is two times in the same function twice
12:50<chillcore>ack-grep shows it to me 11 times of which one is the declaration
12:51-!-glx [] has joined #openttd
12:51-!-mode/#openttd [+v glx] by ChanServ
12:52-!-FLHerne_ [] has joined #openttd
12:52<@Alberth>I was omitting the function declaration and definition :)
12:58-!-Plaete [] has joined #openttd
13:00<@planetmaker>hi hi
13:15<NGC3982>My core2duo couldn't even handle simcity 4.
13:15<NGC3982>I hate everything.
13:16<Eddi|zuHause>use fewer mods, play smaller city?
13:17<@Alberth>1 tile is sufficient :)
13:18-!-smoke_fumus [~smoke_fum@] has quit [Quit: KVIrc 4.2.0 Equilibrium]
13:18<NGC3982>Eddi|zuHause: M..mods? There are mods? :)
13:18*NGC3982 installs Simcity 2000.
13:19<NGC3982>I zoomed in, and everything halted.
13:19<NGC3982>Although, i guess the core2duo is not the issue
13:19<NGC3982>It might be the absolute lack of graphics hardware.
13:19<Eddi|zuHause>there is a switch between software and hardware graphics
13:20<NGC3982>Should that help me, really?
13:20<Eddi|zuHause>well, if the hardware doesn't handle graphics, switching to software may improve things
13:20<@Alberth>alternatively, connect a monitor to it? :)
13:21<Eddi|zuHause>i used that switch mainly to avoid the hundreds of glitches, though
13:21<Eddi|zuHause>also, turn off traffic and stuff
13:22<Eddi|zuHause>i think SC2k did not age well
13:23<@Alberth>hmm, nobody bothered to document the industry chain window at the wiki
13:31-!-andythenorth [] has joined #openttd
13:32<chillcore>ST2: Can you send me a PM on tt-forums please, I found that zip I talked about yesterday but I can not find your profile ... forum does not allow searching for three letters only. ;)
13:32<ST2>haha, ok :)
13:33<Eddi|zuHause>that always trips me off...
13:36<Samu>found an obscure bug again
13:36<Samu>prospecting always fails if all canals are from a company
13:36-!-tokai|mdlx [] has quit [Quit: c('~' )o]
13:37<Samu>and canals owned by companies is the only water in the map
13:37<Samu>prospecting oil rig, of course
13:37<+glx>should work if it's your company
13:38-!-Plaete2 [] has joined #openttd
13:38<Samu>it doesn't, if i understand the code, it is attempting to build as OWNER_TOWN
13:38<frosch123>you don't own industries, so they are not allowed on your canals
13:38<frosch123>fire your manager
13:38<Samu>i can fund oil rigs on my canals, but not prospect
13:39<Samu>let me retry
13:39<+glx>prospection may fail
13:39-!-Plaete [] has quit [Ping timeout: 480 seconds]
13:39-!-argoneus [] has quit [Quit: leaving]
13:39-!-argoneus [] has joined #openttd
13:40<frosch123>nothing to worry about, it is suposed to work like that
13:40<Samu>funding on my canal works, prospecting when every water tile in the world is mine, doesn't
13:40<frosch123>prospecting has no owner, explizit positioning has
13:40-!-gelignite [] has joined #openttd
13:40<+glx>and prospecting costs money even when it fails
13:40<Samu>i wasted about £100,000,000
13:41<Samu>there's sufficient water
13:41<Samu>never spawned
13:41<+glx>but it's not unowned water
13:41<Samu>Backup<CompanyByte> cur_company(_current_company, OWNER_TOWN, FILE_LINE);
13:42<Samu>and a comment
13:42<Samu> /* Prospected industries are build as OWNER_TOWN to not e.g. be build on owned land of the founder */
13:42<+glx>yes it's like that on purpose
13:43<Samu>shortly after, the founding way
13:43-!-tokai [] has joined #openttd
13:43-!-mode/#openttd [+v tokai] by ChanServ
13:44<Samu>there's no back up
13:44<Samu> ret = CreateNewIndustryHelper(tile, it, flags, indspec, layout, random_var8f, random_initial_bits, _current_company, _current_company == OWNER_DEITY ? IACT_RANDOMCREATION : IACT_USERCREATION, &ind);
13:45<Samu>builds as deity?
13:45<+glx>no it builds as _current_company
13:46<Samu>if the company founds it, it's as_current_company?
13:46<Samu>if it's randomcreation it's as owner_deity?
13:46<Samu>seems to conform to my observations
13:46<+glx>_current_company is OWNER_TOWN for prospecting
13:47<Samu>yes, but this part of the code is after the else {
13:47<+glx>OWNER_DEITY is mainly for game scripts
13:47<Samu>line 1920
13:49<+glx>else part is for scenario
13:49<+glx>and manually funded industries
13:51<Samu>what i observe is, oil rigs don't randomly generate on the map on their own
13:51<Samu>all the water are canals with a company owner
13:51<+glx>that's why they can't appear
13:52<Samu>hmm is this from the first part or after the else part?
13:53<Samu>when the game decides on its own "oh let's build an industry", that's actually doing a prospect action?
13:54<+glx>well it's a DEITY action
13:54<+glx>prospection depends on settings
13:54<Samu>prospecting as deity?
13:57<chillcore>still one of my favorites ;)
14:01<+glx>ah no it's done as OWNER_NONE, it's in daily loop
14:04<@Alberth>chillcore: it makes me want to look up my deep purple cd :)
14:09<chillcore>go for it. ;)
14:11<chillcore>I'll be afk for a bit ;)
14:15<Samu>im tired
14:21-!-Belugas [] has quit [Read error: Connection reset by peer]
14:32-!-Wolf01 [] has joined #openttd
14:32<Wolf01>hi hi o/
14:36-!-Yotson [~Yotson@2001:980:6ac8:1:6cfb:6a00:b3ba:6bec] has quit [Ping timeout: 480 seconds]
14:44-!-Yotson [~Yotson@2001:980:6ac8:1:e112:c7dd:a41c:4f2e] has joined #openttd
14:46<Samu>sorry, can't figure this out
14:51<frosch123>some of the titlegames are weird
14:51<andythenorth>some of the weird games are titles
14:51*andythenorth is babbling
14:52<Samu>i really try, but i can't do this
14:52<Samu>wasted all this afternoon trying to fix this
14:53<chillcore>not wasted samu ... you learned new stuffs too
14:56<Samu>it's here, somewhere at this part CreateNewIndustryHelper
14:57<+glx>it's probably upper
15:00<frosch123>meh, binary decisions
15:01<frosch123>i cannot decide whether a titlegame with a train crash is a good or a bad thing
15:01<Samu>static CommandCost CreateNewIndustryHelper(TileIndex tile, IndustryType type, DoCommandFlag flags, const IndustrySpec *indspec, uint itspec_index, uint32 random_var8f, uint16 random_initial_bits, Owner founder, IndustryAvailabilityCallType creation_type, Industry **ip)
15:01<+glx>not a good thing I'd say frosch123
15:02<Samu>"Owner founder", but how...
15:02<Samu>gah help me out
15:03<Samu>before that tile becomes 0x80, it is either ground or water
15:04<Samu>just before setting it as an industry tile, i must have some code there to grab the bit 4 value
15:04<Eddi|zuHause>Samu: that is probably nowhere near the place where you think it is...
15:04<Samu>grab then restore
15:05<Samu>so as to keep it's original value
15:05<Samu>then where is it
15:05-!-Belugas [~belugas@] has joined #openttd
15:05-!-mode/#openttd [+o Belugas] by ChanServ
15:05<Eddi|zuHause>Samu: that function makes an industry, not an industrytile
15:05<frosch123>oh dear, the titlegames of this year are terrible
15:06<Samu>where is industry tile
15:06<Samu>sorry, i am quite tired
15:07<frosch123>usually i first narrow them down to those which are reasonable, excluding those which are broken, use signals incorrectly or similar...
15:07<frosch123>but this time this only leaves me with 3...
15:07<@planetmaker>maybe too short notice time
15:07<@planetmaker>it's a few less than last year
15:08-!-roidal [] has quit [Quit: WeeChat 1.0.1]
15:08<Eddi|zuHause>has anyone ever tried taking someone's submission, fixing some obvious errors, and resubmitting it?
15:10<chillcore>frosh: give peeps another week to work on it? while pointing out obvious disturbing factors?
15:10<chillcore>not sure how that will come across though ...
15:11<frosch123>chillcore: nah, the remaining 3 are fine
15:12<frosch123>it just was a very easy choice to decide
15:12<frosch123>was a lot harder the previous years
15:15-!-Plaete2 [] has quit [Quit: Nettalk6 -]
15:17<frosch123>chillcore: just to list some weirdnesses of this round: one game was directly at the map border so half of the screen was black; one game had lots of tracks without a single signal; one game had an intentional train crash (less fancy than last year though); many games have incorrect signalling (different signals are kind of ues to make the junctions colourful or so)
15:18<chillcore>yeah not really representative
15:21<Samu>ah i read albert answer
15:22-!-Biolunar_ [] has quit [Quit: Yo.]
15:24<Wolf01>andythenorth: lego mixels are a drug
15:24<Samu>bringing back my excel file
15:24<andythenorth>Wolf01: really? o_O
15:24<andythenorth>my kids had some
15:24<andythenorth>didn’t float my boat :)
15:26<Samu>nevermind, i'm too tired
15:26<Wolf01> look at this, I have the same ones, and I'm here doing sh**ty stuff instead of these masterpieces... need moar
15:28<Samu>I'm lost in my thoughts
15:28<NGC3982>I found Simcity 4 a bit boring.
15:28<NGC3982>What else should i try?
15:28<NGC3982>I want something that at least look like that.
15:28<Wolf01>lego mixels
15:30<Wolf01>I always wanted a city builder with ages, I don't ask one from monolithic civilizatios to space age, but roman-medieval-modern would be cool
15:31<Samu>warcraft 3
15:31<chillcore>NGC3982: not quite the same but stronghold is mucho fun ... the original one, not yet tried any of the later ones so.
15:32-!-Zuu [] has joined #openttd
15:33<Zuu>frosch123: I didn't look on your vote but came to the same conclusion as you :-)
15:33<frosch123>Zuu: so we are three :)
15:34<frosch123>michi_cc did as well :p
15:34<frosch123>must be some dev-illness or so :)
15:34<NGC3982>chillcore: I'll take a look :)
15:38<chillcore>see ya in a couple of days :P
15:41<@Alberth>andythenorth: should BB have a changelog or so?
15:41<@Alberth>or a features list?
15:41<frosch123>Changelog: Removed feature list
15:41<frosch123>Feature: No changelog
15:49<chillcore>how long has it been that the trunk titlegame was the stable one too?
15:49<andythenorth>Alberth: I dunno, I like a changelog
15:50<andythenorth>after writing it, I can just paste it into the forum post
15:52<frosch123>chillcore: 1.0 had the first competition
15:59-!-HerzogDeXtEr1 [] has joined #openttd
15:59<chillcore>frosch: Ah so before that it was that one all the time, I joined when it was 6.3 or something so did not really pay that much attention ... every year I have been telling myself to make a submission ... maybe next year I will.
16:00<frosch123>the nightly titlegame was the release titlegame from 0.3 to 0.7 or something
16:00<frosch123>maybe 0.4 instead of 0.3, no idea
16:00<frosch123>but it was actually modified slightly a few times
16:04<Eddi|zuHause>LordAro: i only know two of these songs
16:04<@planetmaker>chillcore, you can make such game every time. Even now. Then you have it ready next time
16:04-!-HerzogDeXtEr [] has quit [Ping timeout: 480 seconds]
16:04<@planetmaker>so there really is no need to make it "just in time"
16:05<@planetmaker>it can be even one of your normal games you like, if it otherwise meets the criteria
16:05<@planetmaker>depends on your playing style, obviously
16:05<chillcore>true planetmaker, prob is my "current" savegames are littered with newgrf
16:06<Eddi|zuHause>who seriously plays games without newgrfs?
16:06<@planetmaker>dunno. Sometimes maybe :)
16:06<@planetmaker>but yes, that usually is the culprit which makes this path not so much viable
16:07<Eddi|zuHause>i don't even remember playing an unpatched game
16:07-!-sla_ro|master [slamaster@] has quit []
16:07<Eddi|zuHause>since MiniIN
16:08<Eddi|zuHause>there was the elrails patch, then YAPP, then some other patchpacks, cargodist, yacd...
16:08<frosch123>minin existed after elrails
16:08<Eddi|zuHause>i even played a patched MiniIN with the bridge patch
16:08<frosch123>though it started before likely
16:09<Eddi|zuHause>i also played cargodest
16:10<Eddi|zuHause>at some point i modified a semi-clean trunk to load my YAPP game
16:10<Eddi|zuHause>that can now be opened with clean trunk
16:11-!-Zuu [] has quit [Quit: Leaving]
16:12-!-Progman [] has joined #openttd
16:16<Eddi|zuHause>even when my games where technically trunk-loadable, i had several patches applied. usually a daylength patch
16:16<chillcore>something like this I would like to submit ... someday maybe ...
16:16-!-Belugas [] has quit [Read error: Connection reset by peer]
16:17-!-Belugas [~belugas@] has joined #openttd
16:17-!-mode/#openttd [+o Belugas] by ChanServ
16:17<chillcore>but with added water, airport and other thingies
16:23-!-peter1138 [~petern@] has quit [Ping timeout: 480 seconds]
16:25<chillcore>hmm thinking some more about negative sign in the querybox
16:25<chillcore>just checking if it is the first char that is being entered will not do IMHO
16:25<frosch123>it's different to the other modes, since - can only be in front
16:25<frosch123>if you currently enter "5-3" it only takes the "5"
16:26<chillcore>yes but what if I enter the sign ... move cursor to front and do the same?
16:26<chillcore>it will think I enter the first again
16:26<frosch123>(you can enter it, by setting it to -3 via the inc/dec buttons, and then add a 5 via the input box)
16:27<chillcore>I figured it out how to enter it ... it is just that the behaviour is not very nice
16:27<chillcore>you can do -152-365 and get -152 as result
16:27<frosch123>two options: A. only allow entering the "-" at front, and do not allow inserting stuff in front
16:27<frosch123>B. make the "-" unselectable, and make the "-" key toggle the sign independent of where the cursor is
16:28<Eddi|zuHause>chillcore: that brings us back to regexp
16:28<chillcore>frosch: C. let them enter it and remove all negative signs that are not leading
16:29<Eddi|zuHause>when entering a character, make a copy of the current string, add the character, validate the new string with the regexp, and allow or discard the change
16:29<chillcore>that is a possibility too
16:30-!-andythenorth [] has quit [Quit: andythenorth]
16:30<Eddi|zuHause>you just have to replace each of the CS_blah with a regexp
16:31<Eddi|zuHause>which should be easy, once you've figured out how to use regexp :)
16:31<chillcore>"just" I already have barely a clue what I am doing now :P
16:32<frosch123>you can also visit eddi, and stay there until it is done :p
16:32<Eddi|zuHause>maybe that works, maybe not :)
16:33<chillcore>now there is an idea ...
16:33<michi_cc>Eddi|zuHause: What's the equivalent for "Mit Kanonen auf Spatzen schießen" again? :p
16:34<Eddi|zuHause>michi_cc: regexp is hardly a "cannon" ;)
16:34<Eddi|zuHause>i wanted to use regexp for something in the past, but i totally forgot what it was...
16:35<Eddi|zuHause>i mean regexp in C++
16:35<Eddi|zuHause>regexp are of course trivial in python :)
16:35<frosch123>maybe you wanted to emulate a turing machine in sed
16:36<frosch123>yeah, c++11 is trying hard to catch up with python and java :)
16:36<LordAro>maybe you should try to catch up with c++11 :p
16:36<LordAro>only 4 years old now ;)
16:36<frosch123>well, i am still baffled they added stochastical distributions to it
16:38<LordAro> also these others :)
16:38<frosch123>so, yeah c++11 tries hard to catch up with python, java, matlab and R :p
16:39<LordAro>c++ tried hard to catch up with *
16:40<chillcore>bah ... --123456789 gives 0
16:40<frosch123>LordAro: yeah, but why is the gamma distribution not derived from the weibull distribution?
16:40<Eddi|zuHause>[Montag, 27. September 2010] [15:59:08] <Eddi|zuHause> dihedral: what i discussed yesterday with frosch, inputting fixed point values from 4/16 to 128/16 by various means (e.g. 0.25, 125%, 9/8) in one editbox
16:40<Eddi|zuHause>[Montag, 27. September 2010] [16:00:09] <Eddi|zuHause> for setting the production multiplier
16:40<Eddi|zuHause>i don't think that ever got anywhere :p
16:41<LordAro>frosch123: probably is in implementation
16:41<frosch123>you "discussed" that bollocks with me? :p
16:41<chillcore>I looked at stackoverflow for about an hour and a half this afternoon
16:41<Eddi|zuHause>i have no memory of that :p
16:41<chillcore>seems lots of peeps don't even realise this happening
16:41<frosch123>LordAro: it's even only the 2-parameter weibull one, not the 3-parameter one
16:42<chillcore>they all figure out how to allow negative signs but don't consider it being entered again somewhere halfway
16:43<chillcore>there must be a more elegant solution
16:43<@Alberth>code the regex as a state machine, and let the matcher decide a match and the next state :p
16:44<frosch123>all computers are finite state machines :p
16:45<LordAro>frosch123: hmm, not in clang, it would seem
16:45<frosch123>i hide my turing machine in the garage, guarded by unicorns
16:45<@Alberth>yeah, the state space is a little bigger than the number of all atoms in the universe :p
16:45<LordAro>as far as i can tell, i can't read stl code
16:46<Samu>create new industry of random layout
16:46<Samu>static Industry *CreateNewIndustry(TileIndex tile, IndustryType type, IndustryAvailabilityCallType creation_type)
16:46<frosch123>LordAro: <- well, can you read that? :p
16:48<LordAro>frosch123: oh, it's well known that g[lib|cc] is much worse :p
16:48<Eddi|zuHause>Samu: again, you need industrytile, not industry...
16:48<LordAro>frosch123: i always like
16:49<Eddi|zuHause>frosch123: why can't i scroll on that page?
16:50<Samu>where is it?
16:51<frosch123>Eddi|zuHause: work for me
16:51<@Alberth>Eddi|zuHause: it needs its script to run
16:51<@Alberth>silly web sites :p
16:51<frosch123>LordAro: also nice :) but once you get to GNU Hello it is kind of fake :p
16:53<Samu>there are too many industrytile results
16:54<LordAro>frosch123: there's also and its counterpart
16:54<@Alberth>yep, we have a lot of industry tiles :)
16:55<chillcore>have look in industry.h samu ... maybe you find something in there to narrow it down?
16:55<chillcore>I dunno really
16:56<Eddi|zuHause>Samu: that's why we have map accessors neatly grouted into files
16:56<Eddi|zuHause>namely files that have "map" in their name
16:58-!-Alberth [~alberth@2001:981:c6c5:1:be5f:f4ff:feac:e11] has left #openttd []
16:59<Samu>industry map?
16:59<chillcore>that sound like a good idea ... also line 16 in that file ...
17:00<Samu>#include "water_map.h"
17:03<Samu>im not sure what to look for
17:03<Samu>i've been into these files, but can't figure out anything from them
17:09<Samu>I'm running in circles
17:09<Samu>like you use to say
17:09<chillcore>that is because you are too much focussing on 1 single detail
17:10<chillcore>that single bit that changes for some reason that is not even used
17:10<Samu>this? static inline void MakeIndustry(TileIndex t, IndustryID index, IndustryGfx gfx, uint8 random, WaterClass wc)
17:10<Samu>can't be that
17:11<Samu>SetTileType(t, MP_INDUSTRY);
17:11<Samu>_m[t].m1 &= 1<<4; // Make sure bit 4 is unaffected.
17:11<Samu>_m[t].m2 = index;
17:11<Samu>etc etcc, rest unchanged
17:11<Samu>it's not this
17:11<Samu>where you want me to look at
17:14<chillcore>I do not know samu because each time we ask you what exactly you want to do and why ... you evade the question ... and answer "I need to change that too"
17:15<chillcore>answer why and what first ... for yourself
17:15<Samu>i'm so confused
17:15<chillcore>just changing bit order for the sake of changing it is not valid
17:16<Samu>ok, it happens between step 1 and 2
17:17<chillcore>samu ... why do you care that "it" happens. what is it? why do you not want "it" to happen
17:17<chillcore>does it make a differnece if "it" happens or not
17:17<chillcore>that bit is unused
17:18<chillcore>as long as you can not answer that question it is very very hard for us to help you ...
17:18<Samu>from the beginning, again
17:19<Samu>there is a canal of company 1
17:19<Samu>means that bit 4 is currently 0, it's the 5th bit of owner
17:19<Samu>then when i place a oil rig
17:20<Samu>it turns to 1, the tile becomes industry, and that 1 appears there
17:20<Samu>xxxx are the bits used for constructing the industry
17:20<Samu>1 is appearing there out of something... where does it come from
17:21<Samu>that is the thing I'm looking at the code
17:21<chillcore>fine then stop dragging other stuffs into the mix untill you figure that out
17:22<Samu>i can't really find it, i've wasted this whole day
17:22<Samu>my brain is stuck
17:22<chillcore>If I knew I would have told by now you ...
17:23<chillcore>you now*
17:23<chillcore>damn can't type anymore :P
17:23<Samu>placing a oil rig is by the means of funding it over those canals, which are mine (company 1)
17:24<Samu>what I know that happens is that those 6 tiles are subtracted from the water maintenance counter
17:24-!-Progman [] has quit [Remote host closed the connection]
17:25<Samu>at the moment it's placed and starts construction, those 6 canal tiles are no longer mine
17:25-!-Pereba [~UserNick@] has joined #openttd
17:25-!-JacobD88 [] has joined #openttd
17:26<chillcore>ye because they belong to the industrie now
17:26<Samu>and that's where that 1xxxx comes up, I suppose, but not sure, that it is turning into OWNER_NONE first, then start construction, in a quick two-step
17:26<Samu>but I say OWNER_NONE and I could be wrong, it could be OWNER_WATER, or OWNER_DEITY
17:26<Samu>I am only making an assumtpion, I don't know for sure
17:27<chillcore>then look at the code and find out
17:27<Samu>i did try, but I couldn't find as of yet, how is that done
17:28<Samu>it's in industry_cmd.cpp I'm nearly sure
17:28<Samu>but then eddi tells me it's not there
17:28<Samu>that i am to look for industry tiles
17:28<chillcore>depends ... if I want to check what happens when borrowing money ... I start with "onclick money-button" and take it from there
17:29<Samu>the function is big, glx helped me out a bit, but I can't figure it inside out
17:29<Samu>i think that's what I am supposed to look at
17:29<chillcore>"placing a oil rig is by the means of funding" your words
17:29<chillcore>start there
17:29-!-frosch123 [] has quit [Quit: be yourself, except: if you have the opportunity to be a unicorn, then be a unicorn]
17:30<chillcore>so how do you fund as company?
17:30<chillcore>what button? what gui?
17:31<Samu>i start a single player game
17:31<Samu>press ctrl-alt-c
17:31<Samu>built a few canals on water, about 10x10 size
17:31<+glx>Samu: I already said bit 7 is set on industry tile then it's converted to station tile, it's just a leftover and has no importance as it's unused for station tiles
17:31<Samu>then fund oil rig
17:31<chillcore>ye ... go on
17:32<Samu>ctrl-alt-c for money grab
17:32<+glx>an unused bit can have any value
17:32<Samu>glx, that is for the station tile
17:32<chillcore>how do you fund the oil rig ... forget the money
17:32<Samu>i want for the industry tile, all industries, all of them, oil rig, coal mine, etc... all them are doing that, it's just that is' much easier to replicate it with canals
17:33<+glx>bit 7 is set when the industry is finished
17:34<Samu>i know, i want bit 4, not 7
17:34-!-peter1138 [] has joined #openttd
17:34-!-mode/#openttd [+o peter1138] by ChanServ
17:34<Samu>nnn"X" nnnn at m1
17:34<+glx>bit 4 is unused
17:34<Samu>that X there
17:34<Samu>it's being altered
17:35<Samu>it doesn't have a meaning but it's being altered
17:35<Eddi|zuHause>we've been trying to explain to you: you can only define "leave this unchanged" when you declare it as "used"
17:35<+glx>probably happens when the tile is cleared before becoming an industry tile
17:35<Eddi|zuHause>otherwise anybody can do whatever he wants with it. including writing to it
17:36<Samu>[22:35] <+glx> probably happens when the tile is cleared before becoming an industry tile
17:36-!-gelignite [] has quit [Quit:]
17:36<Samu>ok, must find when does it get cleared
17:36<Samu>where in the code
17:36<+glx>I already told you
17:37<Samu>yes but i'm a nab
17:37<Samu>ended up running around
17:37-!-chillcore [~chillcore@] has quit [Quit: Only mortals are affected by fame and power.]
17:37<+glx>it's in DoCreateNewIndustry
17:37-!-chillcore [~chillcore@] has joined #openttd
17:37<+glx>line 1759
17:41-!-Netsplit <-> quits: +tokai, KenjiE20, dfox, Extrems2, Samu, Sylf, @Belugas, jonty-comp, Quatroking, Martin89, (+14 more, use /NETSPLIT to show all of them)
17:42-!-Netsplit over, joins: Pereba, @Belugas, +tokai, glevans2, KWKdesign, Supercheese, Samu, Quatroking, Eddi|zuHause, Maarten (+14 more)
17:42-!-mode/#openttd [+v Belugas] by ChanServ
17:44<Samu>you nailed it
17:46<Samu>right before MakeIndustry, this is it
17:46<Samu>damn, you're smart
17:46-!-FLHerne_ [] has quit [Quit: There's a real world out here!]
17:53<Samu>thx glx, I will continue this tomorrow, to awake a new tomorrow with a fresh head.
17:53-!-JacobD88 [] has quit [Quit: JacobD88]
17:53<Samu>cyas all
17:53-!-oskari89 [] has quit []
17:54-!-Samu [] has quit [Quit: Page closed]
17:56<Eddi|zuHause>i really don't know how much longer i can tolerate this...
17:57<chillcore>it is hard to make him understand something yes
18:02<+glx>seems he doesn't read what is said :)
18:03<Wolf01>and he thinks loud :P
18:05<chillcore>I recognise myself somewhat when I was younger ... wanting to know all at once, skipping steps
18:05<chillcore>still I listened when peeps tried to expain something
18:10-!-Maarten1 [~irc@] has joined #openttd
18:12<ST2>well, now that the way was pointed to him, he'll be back tomorrow like a kid with a new toy :P
18:13<ST2>and the usual million questions xD
18:13<+glx>but I told him yesterday exactly the same thing
18:14<chillcore>^^^ I'd rather teach him how to fish ...
18:15<ST2>hehe xD
18:16<+glx>focus too much on details
18:16<+glx>when a larger vision gives the answer
18:16-!-Maarten [~irc@2605:e000:160b:8138:8151:896e:ab36:d9b9] has quit [Ping timeout: 480 seconds]
18:17-!-Wolf01 [] has quit [Quit: Once again the world is quick to bury me.]
18:17<+glx>everybody told him he looked at the wrong place and should check on upper level
18:21<ST2>but if samu gets any solution that he likes and not implemented in a "snap your fingers" time he gets mad... that worries me :(
18:31<chillcore>some more patience would do him good yes ...
18:31<chillcore>That zip any good to you ST2?
18:31<ST2>haven't looked at it yet
18:32<ST2>very busy with other stuff :S
18:32<ST2>but thanks :)
18:33<chillcore>np. It is all based on old revisions still, if you need some help bumping here and there just ask ;)
18:33<chillcore>but no rush ... got plenty to do too :P
18:42<chillcore>for those liking some heavy beats and ... twitch/Beatport live for 21 hours more
18:45-!-Eddi|zuHause [] has quit [Ping timeout: 480 seconds]
18:45-!-supermop [] has joined #openttd
18:52-!-shirish [~quassel@] has joined #openttd
19:27-!-Quatroking [] has quit [Read error: Connection reset by peer]
19:28-!-DorpsGek [] has quit [Remote host closed the connection]
19:28<chillcore>going to try and get some sleep.
19:29-!-DorpsGek [] has joined #openttd
19:29-!-mode/#openttd [+o DorpsGek] by ChanServ
19:29<chillcore>good night
19:29-!-chillcore [~chillcore@] has quit [Quit: Only mortals are affected by fame and power.]
19:58-!-Biolunar [] has joined #openttd
20:12-!-liq3 [] has joined #openttd
20:27-!-Pikkaphone [~yaaic@] has joined #openttd
20:36-!-Flygon [] has joined #openttd
20:38-!-shirish [] has quit [Remote host closed the connection]
20:41-!-Eddi|zuHause [] has joined #openttd
20:43-!-Flygon_ [] has quit [Ping timeout: 480 seconds]
20:52-!-Pikkaphone [~yaaic@] has quit [Read error: Connection reset by peer]
20:53-!-Pikkaphone [~yaaic@] has joined #openttd
21:01-!-Eddi|zuHause2 [] has joined #openttd
21:08-!-Eddi|zuHause [] has quit [Ping timeout: 480 seconds]
21:11-!-Eddi|zuHause2 is now known as Eddi|zuHause
21:46-!-Pikkaphone [~yaaic@] has quit [Read error: Connection reset by peer]
21:46-!-Pikkaphone [~yaaic@] has joined #openttd
21:54-!-Pikkaphone [~yaaic@] has quit [Read error: Connection reset by peer]
22:02-!-HerzogDeXtEr1 [] has quit [Quit: Leaving.]
22:03-!-Pikkaphone [~yaaic@] has joined #openttd
22:08<Pikkaphone>How's trams, supermop?
22:16<supermop>more rendered
22:16<supermop>more pllaying around to figure out how to produce consistent renders and then get sprites from
22:17<supermop>was out taking pictures of bluestone cobblestone this morning
22:19<supermop>hows your stuff coming?
22:19<supermop>more pineapples?
22:30-!-Biolunar_ [] has joined #openttd
22:32-!-DDR [] has joined #openttd
22:36-!-Pikkaphone [~yaaic@] has quit [Read error: Connection reset by peer]
22:37-!-glx [] has quit [Quit: Bye]
22:37-!-Biolunar [] has quit [Ping timeout: 480 seconds]
22:39<Sonny_Jim>Does moving mail around a town help it to grow quicker?
22:40<supermop>i think so
22:45-!-Pikkaphone [~yaaic@] has joined #openttd
22:45<Pikkaphone>pineapple houses are next I think. :)
22:46<Pikkaphone>going to try and get a blog post up this weekend
22:48<Pikkaphone>Sonny_Jim: having any well serviced stations in a town makes it grow. pax mail or freight, makes no difference. :)
22:50<Sonny_Jim>And they grow equally on all sides? What if one side is hemmed in by a station, does that stop it growing?
22:53<Pikkaphone>if it can't build a road across then obviously it can't keep going. But yes, barring any newgrf town set magic (and thanks for the idea!) they should grow evenly.
22:53<Pikkaphone>if it can't grow one way it'll grow another
22:59<Eddi|zuHause>Sonny_Jim: dead end roads reduce the town growth. try to have as many bridges across your rails as possible and remove dead ends
23:00<Eddi|zuHause>Pikkaphone: i'd leave affecting town growth to the game scripts
23:01<Pikkaphone>good job I'm not you, then. ;)
23:01<Eddi|zuHause>that would suck indeed. nothing would ever get done :p
23:01<Sonny_Jim>Cool, thanks
23:02<Eddi|zuHause>Sonny_Jim: note that this works better with the "better roads" layout. grids, while having overall better growth, will just rebuild the dead ends at all costs
23:03<Eddi|zuHause>and original is just terrible...
23:05<supermop>i wish the grids could be of arbitrary size
23:09<Eddi|zuHause>that's a trivial patch
23:13<supermop>a non square rectangle would be nice, and blocks that are 4 tiles deep instead of 2 or 3 would let me abuse 2x1 and 2x2 houses
23:14<supermop>I was thinking about trams yesterday while riding one downtown and over some shunting points -
23:14<supermop>i feel i have a completely different set of interest in this game than most people
23:17<supermop>i feel like i would love just planning the minutia of things like what tracks get junctions where, how to design platforms at a station, where to place layup shunts for trams or trains to turn around in,
23:18<supermop>i often build terminal stations with a yard just before, and timetable trains to enter at one platform, leave empty to go wait in the yard for a while, then go back to load up on passengers and start a new run
23:18<supermop>for no reason, other thaan for some reason i like scheduling them to do stuff like that
23:19<supermop>stuff that seems to be the textbook example of way too boring to be in a game
23:21<supermop>and i often find myself wondering if a station I am building should have an overpass for passengers or an underpass
23:27-!-Pereba [~UserNick@] has quit [Quit: ⠠⠛⠀⠞⠕⠀⠺⠺⠺⠲⠁⠙⠊⠊⠗⠉⠲⠉⠕⠍⠀⠞⠕⠀⠛⠑⠞⠀⠽⠗⠀⠝⠑⠺⠀⠠⠠⠊⠗⠉⠀⠠⠉⠇⠊⠢⠞⠖]
23:30<supermop>Pikkaphone: should i make spreadsheet for trams?
23:44-!-roidal [] has joined #openttd
---Logclosed Fri Feb 27 00:00:31 2015