IRC logs for #openttd on OFTC at 2016-05-16
⏴ go to previous day
00:07:37 *** FLHerne has joined #openttd
00:16:19 *** supermop has joined #openttd
00:21:35 <Samu> there are 3 types of GS's
00:22:16 <Samu> the (none) GS, the configured GS but not started, the configured GS but started
00:23:04 <Samu> then there's the GS of the current game, and the GS of the save
01:31:42 <Samu> couldn't come to any conclusion
03:16:54 *** Cybertinus has joined #openttd
03:35:30 *** Kurimus_ has joined #openttd
05:20:06 *** sim-al2 is now known as Guest987
05:20:06 *** [1]sim-al2 has joined #openttd
05:20:06 *** [1]sim-al2 is now known as sim-al2
06:06:10 *** ToneKnee_ has joined #openttd
06:43:01 *** Supercheese has joined #openttd
08:08:08 *** sim-al2 has joined #openttd
08:29:36 *** Progman has joined #openttd
09:27:25 *** Kurimus_ has joined #openttd
10:16:25 *** Myhorta has joined #openttd
10:59:27 *** Wormnest has joined #openttd
11:44:42 *** Cybertinus has joined #openttd
11:52:50 *** frosch123 has joined #openttd
12:21:56 *** Hiddenfunstuff has joined #openttd
12:27:25 <argoneus> good morning train friends
12:45:58 <Samu> english question: widest refers to the largest width, ??? refers to the largest height. What is the word?
13:27:21 <Samu> 'void DrawSprite(SpriteID,PaletteID,int,int,const SubSprite *,ZoomLevel)': cannot convert argument 5 from 'int' to 'const SubSprite *' openttd D:\OpenTTD\trunk\src\ai\ai_gui.cpp 131
13:28:26 <Samu> it works somewhere else, but not here... t.t
13:29:45 <Samu> if (text == STR_AI_CONFIG_RANDOM_AI) DrawSprite(SPR_AICONFIG_RANDOM, PAL_NONE, r.left + WD_MATRIX_LEFT, r.left + WD_MATRIX_LEFT + GetSpriteSize(SPR_AICONFIG_RANDOM).width, y + rai_y_offset);
13:36:24 <peter1138> It tells you what's wrong.
13:36:58 *** Myhorta has joined #openttd
13:37:47 *** Alberth has joined #openttd
13:37:47 *** ChanServ sets mode: +o Alberth
13:40:44 <Samu> it does not like the value of y
13:42:18 <peter1138> It does not say that.
13:49:56 *** marlinc has joined #openttd
13:50:15 <marlinc> Hey, is there a reason why the download speed of a map is limited to about 5-6 mbit/s?
13:50:27 <marlinc> Or is it some technical limit?
13:51:17 <Eddi|zuHause> that should be your network's limit somewhere on the way
13:54:18 <marlinc> Well, that's 1000 Mbit as its setting next to mne
13:59:27 <Samu> i made some research about this a few weeks ago, let me find it
14:00:24 <peter1138> Samu, line 77 is the same line you pasted above.
14:00:53 <Samu> :( i don't know what to do there
14:00:53 <marlinc> Could it be related to CPU usage?
14:00:55 <peter1138> What part of "'void DrawSprite(SpriteID,PaletteID,int,int,const SubSprite *,ZoomLevel)': cannot convert argument 5 from 'int' to 'const SubSprite *'" means "it does not like the value of y" to you?
14:01:01 <marlinc> Its at about 36% at the moment with two players
14:01:48 <Eddi|zuHause> marlinc: could be CPU, or disk speed, or spam software, or whatever
14:02:15 <marlinc> Well its not the disk.. its sitting on my ZFS array..
14:02:39 <peter1138> Bah, wish this cloud would psis off
14:06:08 <Samu> it compresses the map on the fly when sending it to another client
14:06:52 <marlinc> Thanks Samu, I'll take a look :)
14:07:39 <Samu> oh, and the map size used for that sample was 4096x4096 :p
14:08:18 <peter1138> Samu, the error is telling you the arguments you have supplied are wrong, and it tells you what it is expecting.
14:14:28 *** Quatroking has joined #openttd
14:32:35 *** Supercheese has joined #openttd
15:03:48 *** tokai|noir has joined #openttd
15:03:48 *** ChanServ sets mode: +v tokai|noir
15:12:38 *** sim-al2 has joined #openttd
15:30:54 *** MonkeyDrone has joined #openttd
15:52:45 *** supermop has joined #openttd
16:20:43 <supermop> hows it going Alberth ?
16:21:47 <supermop> got a kgs account yet?
16:26:49 <Alberth> too busy, as always, when having a day off :p
16:42:18 <supermop> i ended up using 6 hours of my sunday on a 'fun' thing that was really just work related
16:49:53 <Alberth> clearly, work poses sufficient good challenges :p
16:51:00 <supermop> the problem with working in a field like mine,is that you can never really stop thinking about it, but you can't charge clients for all that 'work' you did laying in bed at night
16:53:49 <Alberth> ah, I have that too, but don't get paid overtime either :p
16:55:55 <Samu> but i wanted to draw the randomai sprite instead
17:09:10 <Samu> i hate it that I did the same on the other function and it works there, and on this one, it doesn't...
17:09:57 <Alberth> "doesn't work" gives no clues what it actually does
17:10:08 <Alberth> the compiler produced an error, right?
17:10:30 <Alberth> so the logical course of action would be to solve that error, or not?
17:12:08 <Samu> y isn't accepted, I took y away, and ray_y_offset isn't accepted either
17:12:53 <michi_cc> Samu: Why should it, an integer isn't a SubSprite struct.
17:13:19 <Samu> yes, that , no idea what's a SubSprite struct
17:13:35 <Samu> i did very much the same on the config window, and it accepted y
17:13:48 <michi_cc> But I'm quite sure DrawSprite wants x and y, and not two x values. Looking up the function definition of DrawSprite (it has comments) should help.
17:13:49 <Samu> on the ai list window it doesn't want it
17:14:02 <michi_cc> Samu: You didn't, no matterwhat you think.
17:16:37 <michi_cc> Maybe random cargo-cult programming is inferior to trying to understand it first.
17:17:15 *** rahtgaz has joined #openttd
17:19:09 <Samu> DrawSprite isn't needing the right most side
17:20:17 <Samu> only DrawString needs that
17:20:35 <Samu> let's see now, it seems to compile
17:22:57 <Samu> yes yes it works! thx michi_cc
17:25:59 <Alberth> no, just very stubborn in believing what you're doing is effective
17:26:23 <Alberth> ^ about "i'm dumb" comment
17:28:38 <Samu> it's strange, I worked with DrawSprite just a few days before
17:28:54 <Samu> i was supposed to know how to use it
17:29:39 <peter1138> you should've read the error message
17:29:45 <peter1138> it had all the info you needed
17:51:57 <Samu> just a few hours ago, had to fix part of the code I've already worked before. It was calculating the width of sprites to determine the highest one. That's not what I've thought I've done.
17:52:24 <Samu> now it really is calculating the height
17:53:42 <Samu> how I end up messing things up like that...
17:54:02 <Samu> and my english sometimes is horrid
17:55:46 *** Eddi|zuHause2 has joined #openttd
17:59:59 *** Wormnest_ has joined #openttd
18:32:21 *** HerzogDeXtEr1 has joined #openttd
18:53:43 *** Eddi|zuHause2 is now known as Eddi|zuHause
19:15:42 *** WegeClausen has joined #openttd
19:15:59 <WegeClausen> hi im running in a problem sometimes
19:16:26 <WegeClausen> Q ehat if i want to drop the fright and only load the station products
19:16:52 <WegeClausen> so the products i unloaded arend reloded
19:18:28 <Alberth> staying at the station, or accepted by industries?
19:18:50 <WegeClausen> Example train comes in and drops water foodl but then loads the same and the station goods and goes for plan
19:19:45 <WegeClausen> i kmow its best to go for 2 trains
19:20:21 <WegeClausen> but it reloads them
19:20:50 <Alberth> yes, you load either nothing or everything
19:21:14 <Alberth> unless you use cargo-dist, and provide other means to transport the unloaded cargo
19:21:16 <WegeClausen> no fruit is at the station it rights to a second station with corn then dets on to foodfactory with waterwell
19:21:37 <WegeClausen> ok i will get me 2 trains
19:22:02 <Alberth> or perhaps 2 stations?
19:22:33 <Alberth> force unloading unloads everything, you cannot force unload a single cargo
19:23:09 <Alberth> in general you should not need force unload at all
19:23:23 <Alberth> it exists mostly for fixing problems
19:33:03 *** WegeClausen has left #openttd
19:36:40 *** rahtgaz has joined #openttd
19:44:14 <Samu> how do I retrieve the width value of this text? const char *text = (*it).second->GetName();
19:45:25 <Alberth> afaik there is a function to get the width of a char * text
19:46:16 <Alberth> getting the width of a StringID uses it too
19:48:44 *** mescalito has joined #openttd
20:21:12 *** andythenorth has joined #openttd
20:37:21 *** Wormnest__ has joined #openttd
20:42:13 * andythenorth needs an offsider
20:42:56 <andythenorth> played any more antelope game?
20:45:26 <Samu> SetDParamStr(0, (*it).second->GetName()); uint text_width = GetStringBoundingBox(STR_JUST_RAW_STRING).width;
20:45:45 <Samu> this works, but is there a better way?
20:47:17 * andythenorth wants ropeway transport
20:47:39 <Samu> i still don't fully understand pointers
20:48:18 <supermop> not yet, got sidetracked with tram cascading micromanagement and walked away from it
20:48:31 <supermop> andythenorth: i've drawn belt sprites
20:49:34 <andythenorth> ‘tram cascading micromanagement’ :D
20:49:47 <andythenorth> how did you manage that? o_O
20:50:10 <Alberth> secret firs parameter :)
20:53:33 <supermop> didn't manage, thats why i walked away. ended up with 6 trams that were superceded in every way in the city that became center of my network
20:53:52 <Samu> what if the AI name is translated?
20:54:11 <supermop> but they still had lots of life left, but the only place that made sense to use them was 100+ tiles away
20:55:12 <supermop> no non-absurd way to send trams to somewhere that far away, so thought about sending them to the outskirts of their current city
20:55:23 <supermop> andythenorth: 2cc set.
20:55:24 <Samu> if (static_cast<AIInfo *>((*it).second)->UseAsRandomAI()) DrawSprite(SPR_AICONFIG_RANDOM, PAL_NONE, r.left + WD_MATRIX_LEFT, y + rai_y_offset);
20:55:37 <andythenorth> I would have scrapped them :)
20:55:40 <Samu> i'm not sure what's static_cast, just that I had to use it
20:56:31 <supermop> but sending them to the other side of town involved sending them across a 4 track mainline with an antelope once every 10 days in each direction
20:56:43 <supermop> and these were 20kmh trams
20:56:56 <supermop> Eddi|zuHause suggested i play frogger with the trams
20:57:50 <Alberth> Samu: euhm, a static cast to test non-nullness?
20:58:24 <Alberth> oh, to use UseAsRandomAI()
20:58:25 <supermop> then we got distracted on irc and i haven't had a chance to revisit
20:59:26 <Alberth> still, static_cast is generally very wrong
21:00:15 <Samu> I copy pasted from somewhere further down in that function
21:00:36 <Samu> and addapted it to UseAsRandomAI()
21:05:07 <andythenorth> road vehicles are lame
21:05:47 <Alberth> samu: basically, static_cast means "shut up compiler, just take my word for it, I hereby declare it's a 'AIInfo *'"
21:06:20 <Alberth> ie a very big sledge hammer to prevent the compiler from checking things
21:07:11 <Alberth> so duh, it compiles, as you told the compiler to stop complaining
21:09:00 <andythenorth> so….WaterTypes...?
21:09:06 * andythenorth has been thinking
21:09:40 *** Progman has joined #openttd
21:11:04 <Samu> Class 'ScriptInfo' has no member 'UseAsRandomAI'
21:11:07 <supermop> we already have that
21:11:25 <supermop> but if you give me a log flume i'll be ecstatic
21:13:04 <Alberth> but that doesn't make a ScriptInfo* the same as a AIInfo*
21:19:18 <andythenorth> one of the (several) dumb things about ships is lack of variety in routing
21:19:29 <andythenorth> planes have helicopters / planes
21:19:37 <andythenorth> RVs have tram / road vehicle
21:19:45 <andythenorth> trains have 3 or 4 types by default
21:19:59 <andythenorth> ships, one type, blah
21:21:16 <Samu> I can't ask UseAsRandomAI to ScriptInfo t.t
21:21:57 <Samu> but the *it dude does have a 'use_as_random' for AIs, not for GSs though
21:22:25 <Samu> i don't know how it was even working for GSs
21:24:08 <andythenorth> that would be better as ‘one way unit cargo transport’
21:24:20 <andythenorth> or whatever we called it last time it was discussed :P
21:24:30 <andythenorth> pipelines, cableways, log flumes etc
21:26:04 <andythenorth> but for water I’m thinking a split of sea vs. canal/river
21:26:36 * andythenorth wonders what the gameplay implications would be
21:27:10 <Samu> andythenorth, i remember working with rivers and canals before
21:27:57 <Samu> not graphics, just the mechanics
21:28:49 <Samu> should be in the forums yet, sec, let me find
21:29:15 <Alberth> :o pipelines @ water?
21:30:32 <Samu> heh, revisiting the stuff I did last year
21:31:48 <Samu> i think I gave up when i was working on the code to allow bridges over locks
21:32:06 <Samu> couldn't draw the bridge ramp
21:32:23 <Samu> then i could, but the vehicles under the bridge were overlaping
21:33:08 <Samu> i had a very ambitious goal though
21:37:54 <Samu> Alberth the original code is then wrong?
21:39:04 <Samu> it treats GSs and AIs like they're alike
21:40:23 <Alberth> they are quite alike, both execute squirrel code
21:41:03 <Alberth> I didn't write AI or GS stuff, so I don't know how they are different
21:41:10 <Samu> if (this->selected == i - 1) selected_info = static_cast<AIInfo *>((*it).second);
21:41:23 <Samu> that's in there, sec, let me get a link
21:43:35 <Samu> i see most of the names there still mention AI, even though some of them are refering both AI and GS
22:10:21 *** Hiddenfunstuff has quit IRC
22:24:52 *** rahtgaz has joined #openttd
22:40:45 <glx> I guess ai_gui.cpp:143 could use ScriptInfo as the used info are from the common part
23:16:59 *** Wormnest_ has joined #openttd
continue to next day ⏵