--- Log opened Sun Mar 13 00:00:13 2016 20160313 00:00:20< shadowm> Okay, so adding the WML lexer will actually be a lot of work. :p 20160313 00:00:49< shadowm> I need to install my own copy of pygments (MW uses a byte-compiled bundle) and tamper with that. 20160313 00:01:06-!- atarocch [~atarocch@151.64.78.59] has quit [Remote host closed the connection] 20160313 00:01:11< celticminstrel> Ah. 20160313 00:02:55-!- mjs-de [~mjs-de@x4db54175.dyn.telefonica.de] has quit [Remote host closed the connection] 20160313 00:03:27 * celticminstrel does wonder just what "byte-compiled" bundle means in this context - a directory of .pyc files, or something more exotic...? 20160313 00:03:30< shadowm> TIL Python can run zip files. 20160313 00:03:41< celticminstrel> Eh> 20160313 00:03:43< celticminstrel> ^? 20160313 00:03:46< shadowm> My mistake, it's not byte-compiled. 20160313 00:03:52< shadowm> It's just a zip file. 20160313 00:03:54< celticminstrel> Ah, just compressed. 20160313 00:04:06< shadowm> Python runs the zip file. 20160313 00:04:16< celticminstrel> So it's like a .egg or something? 20160313 00:04:34< shadowm> I don't know what that is. 20160313 00:04:39< shadowm> https://www.python.org/dev/peps/pep-0273/ 20160313 00:05:17< celticminstrel> Ah. 20160313 00:05:31< shadowm> MW has a script that grabs pygments as a zip files and adds a launcher /__main__.py file to it. 20160313 00:05:35< shadowm> *file 20160313 00:05:41< celticminstrel> .egg is some sort of package format used by Python's module system. Or at least it used to be. 20160313 00:06:07< shadowm> Then prepends the shebang to the resulting file. 20160313 00:06:41< shadowm> This is actually pretty clever, I wish I could get more into Python. :p 20160313 00:06:52< celticminstrel> When I downloaded Pygments I think it was as a .whl or something, so maybe .egg is outdated. 20160313 00:13:57< celticminstrel> Uh, why is my custom scenario suddenly missing from the list... 20160313 00:17:27-!- TC01 [~quassel@128.220.251.37] has quit [Ping timeout: 276 seconds] 20160313 00:19:01-!- clavi [~clavi@163.172.10.77] has quit [Quit: ZNC - 1.6.2 - http://znc.in] 20160313 00:20:15< shadowm> celticminstrel: Does pygments need to be configured in some way to use wesnoth.py or you just drop the file into the lexxers dir? 20160313 00:20:52< celticminstrel> I believe you can just drop the file into the lexers dir. 20160313 00:20:57-!- TC01 [~quassel@london.acm.jhu.edu] has joined #wesnoth-dev 20160313 00:20:59< celticminstrel> That's what the documentation implied as well. 20160313 00:21:16< celticminstrel> It's not however how I was testing it, as you might be able to tell from the if-block at the bottom of the flie. 20160313 00:21:20< celticminstrel> ^file 20160313 00:21:31< gfgtdf> celticminstrel: i want to add a lua interface for the unit_creator.add_unit() 20160313 00:21:37< gfgtdf> celticminstrel: but i have no idea on how to call it 20160313 00:21:54< gfgtdf> celticminstrel: i mean it does similar to put_unit 20160313 00:21:56< celticminstrel> gfgtdf: So yeah, it seems like variant was trying to delete a statically allocated object. 20160313 00:21:59< gfgtdf> celticminstrel: but is less 'raw' 20160313 00:22:14< celticminstrel> What is unit_creator.add_unit()? 20160313 00:22:51< gfgtdf> celticminstrel: thats the funcrtion that placed the units on teh map in [unit] 20160313 00:23:34< gfgtdf> celticminstrel: specially, it by default placed the unit near the leader, and also does teh 'recall a verteran unti instead if possible' 20160313 00:23:49< gfgtdf> celticminstrel: what i want to do it to move [unit] implementation to lua 20160313 00:27:59< celticminstrel> Why? 20160313 00:28:28< celticminstrel> I didn't actually know that [unit] checks the recall list first... is that even documented? 20160313 00:29:30< gfgtdf> celticminstrel: well its usualyl what people want: that [unit] in actionwml behave more or less exactly like [unit] in [side] 20160313 00:30:00< gfgtdf> celticminstrel: and [unit] is [side] is recall-or-recruit thats how for example leader carryover works. 20160313 00:30:15< gfgtdf> celticminstrel: basically the leaders [unit] tag does a recall-or-recruit 20160313 00:30:34< gfgtdf> celticminstrel: so it usually just recalls the leader from the previous scenario. 20160313 00:31:15< gfgtdf> celticminstrel: hmm but the more i think about it the less it makes sense to move [unit] to lua 20160313 00:31:20< gfgtdf> celticminstrel: maybe i'll leave it as it is 20160313 00:34:23-!- clavi [~clavi@163.172.10.77] has joined #wesnoth-dev 20160313 00:36:36< irker296> wesnoth: Ignacio R. Morelle glamdrol:master 834648ff8c9b / glamdrol/glamdrol.php: Fix warning storm with MW 1.26 https://github.com/wesnoth/glamdrol/commit/834648ff8c9b80093822c5156e04b9c4aab26899 20160313 00:38:03< shadowm> Le sigh. 20160313 00:41:18< shadowm> Well, just tossing the file in there didn't do it. 20160313 00:45:09< celticminstrel> Well, I was going by this: http://pygments.org/docs/lexerdevelopment/#adding-and-testing-a-new-lexer 20160313 00:45:14< shadowm> Looks like you need to add yourself in pygments/lexers/_mapping.py? 20160313 00:45:20< shadowm> (I'm reading the code.) 20160313 00:45:23< celticminstrel> But admittedly that doesn't have an example for adding a whole new module. 20160313 00:45:56< shadowm> "Lexer mapping definitions. This file is generated by itself." 20160313 00:46:08< celticminstrel> That's kind of interesting. 20160313 00:46:30< celticminstrel> It does look like that's the approach to use. 20160313 00:47:13-!- aeonchild [enchilado@defocus/yummy/enchilado] has quit [Ping timeout: 240 seconds] 20160313 00:48:03-!- aeonchild [~aeonchild@defocus/yummy/enchilado] has joined #wesnoth-dev 20160313 00:48:53< celticminstrel> Ah, I guess that's what the "make mapfiles" mentioned in the docs actually does. 20160313 00:49:29< celticminstrel> (I did already set up the __all__ variable as it said.) 20160313 00:52:45-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has joined #wesnoth-dev 20160313 00:57:40-!- ancestral [~ancestral@63.92.240.233] has joined #wesnoth-dev 20160313 01:01:52< shadowm> :I 20160313 01:04:23< shadowm> What the hell. 20160313 01:04:33< celticminstrel> ? 20160313 01:04:35< shadowm> So it works standalone: http://files.wesnoth.org/pygmentizetest.html 20160313 01:04:51< shadowm> But not with the wiki. 20160313 01:05:48< celticminstrel> Is that from dropping in the file and also rebuilding _mapping.py? 20160313 01:06:19< shadowm> Yes (except the file is in a separate location overridden with a PHP variable mentioned in the documentation). 20160313 01:06:39< shadowm> (It certainly can run the file, otherwise all highlighting for the page would be disabled.) 20160313 01:09:13 * celticminstrel checks MW docs, assumes you mean $wgPygmentizePath. 20160313 01:09:39< celticminstrel> I dunno, could there be caching somewhere? 20160313 01:11:05-!- ancestral [~ancestral@63.92.240.233] has quit [Quit: i go nstuf kthxbai] 20160313 01:11:50< shadowm> Toggling the exec bit off and on again suggests that's not the issue. 20160313 01:12:19< shadowm> Such a curious conundrum. 20160313 01:13:45< shadowm> Oh. 20160313 01:13:46< shadowm> OH. 20160313 01:14:05< shadowm> The MW extension maintains its own list of lexers too. 20160313 01:14:18< celticminstrel> Ahh. 20160313 01:14:35< celticminstrel> My file provides three lexers. 20160313 01:14:52< shadowm> Oh well, looks like I can just run a script shipped with the extension to update said list. 20160313 01:15:02< celticminstrel> Handy. 20160313 01:16:08< celticminstrel> Okay, I think I've finally solved the formula tests problem. 20160313 01:16:18< shadowm> Behold: https://wiki.wesnoth.org/User:Shadowmaster/HighlightTest 20160313 01:16:19-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [Ping timeout: 248 seconds] 20160313 01:16:25< celticminstrel> I'll see if this next build finally works. 20160313 01:16:26< shadowm> (Bottom of page.) 20160313 01:17:19< celticminstrel> I'm thinking I could maybe change the categorization of file-macros, but in any case... it looks nice overall. 20160313 01:17:34-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has quit [Ping timeout: 250 seconds] 20160313 01:17:41< celticminstrel> I thought I had a rule to colour "wmlscope" differently. 20160313 01:18:01 * celticminstrel checks page source. 20160313 01:18:09< celticminstrel> ...well, page DOM, but close enough.. 20160313 01:18:53< celticminstrel> Ah, yeah, it has class="cs" instead of class="c" like the rest of the comment. 20160313 01:19:25< shadowm> Yuck, the line numbers are inline with the line contents in the first example. 20160313 01:19:36< shadowm> That's a major issue when trying to copy code. 20160313 01:19:43< celticminstrel> Yeah, I see what you mean. 20160313 01:20:03< shadowm> Well, I suppose you people can do without the line labels option anyway. 20160313 01:20:18< shadowm> Are you maintaining wesnoth.py in a versioned repository somewhere? 20160313 01:20:29< celticminstrel> Yeah, that should be fine for 99% of uses. 20160313 01:20:38< celticminstrel> I am not currently maintaining wesnoth.py in a versioned repo. 20160313 01:21:22< celticminstrel> I can do so if you'd like me to. 20160313 01:21:23< shadowm> You might want to consider doing that so that updating it can be just a matter of doing git pull on the server. 20160313 01:21:30< celticminstrel> Alright. 20160313 01:21:40< shadowm> Instead of tracking down the URL each time. 20160313 01:22:02< shadowm> You should probably consider submitting it upstream too. 20160313 01:22:20< celticminstrel> Upstream meaning...? 20160313 01:22:25< shadowm> That'd allow me to get rid of the local edits at some point. 20160313 01:22:30< celticminstrel> To Pygments? 20160313 01:22:35< shadowm> Upstream = Pygments, yes. 20160313 01:22:49< celticminstrel> I could do so, I suppose. 20160313 01:36:26< celticminstrel> https://github.com/CelticMinstrel/wml-pygments 20160313 01:39:27 * celticminstrel considers announcing the addition of wiki-syntax-highlighting on the forums. 20160313 01:41:04< shadowm> That'd be great! 20160313 01:41:24< celticminstrel> Where should it go? News forum? 20160313 01:42:16< shadowm> Website I think, unless vultraz deems it front page news-worthy. 20160313 01:42:52< celticminstrel> Ah, that makes sense. 20160313 01:44:40< shadowm> Okay, just deployed the repository version. \o/ 20160313 01:45:25< celticminstrel> I don't think it was any different, but it's possible it was slightly. 20160313 01:45:54< shadowm> It's different enough in that pygments/lexers/wesnoth.py is now a symlink instead of a regular file. 20160313 01:46:19< celticminstrel> Wait what? 20160313 01:46:59< shadowm> It's now a symbolic link as opposed to a regular file. 20160313 01:47:04< celticminstrel> Yay! My formula PR finally passed all the tests! 20160313 01:47:59< shadowm> Filesystem objects can be regular files, directories, symbolic links, named pipes (FIFO), character devices, block devices, or (sometimes) sockets. 20160313 01:48:39< celticminstrel> My first impression of what you said was "a symbolic link to a URL whoa what" 20160313 01:49:01< shadowm> No, no, a symbolic link to the version in a local clone of the repository. 20160313 01:49:09< celticminstrel> Yeah, that makes more sense. 20160313 01:56:15< celticminstrel> https://forums.wesnoth.org/viewtopic.php?f=17&t=43922 20160313 02:03:08< celticminstrel> Should I pin it or just leave it as a normal post? 20160313 02:12:58-!- gfgtdf_ [~chatzilla@f054160176.adsl.alicedsl.de] has joined #wesnoth-dev 20160313 02:15:18-!- gfgtdf [~chatzilla@f054156061.adsl.alicedsl.de] has quit [Ping timeout: 268 seconds] 20160313 02:15:22-!- gfgtdf_ is now known as gfgtdf 20160313 02:16:36-!- prkc [~prkc@563BD958.dsl.pool.telekom.hu] has quit [Remote host closed the connection] 20160313 02:18:23< Aginor> celticminstrel: well done 20160313 02:20:17-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has joined #wesnoth-dev 20160313 02:31:57< celticminstrel> Aginor: ? 20160313 02:35:27-!- louis94 [~~louis94@91.178.240.41] has quit [Quit: Konversation terminated!] 20160313 03:07:18-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Quit: Konversation terminated!] 20160313 03:15:06< Aginor> celticminstrel: with getting those tests passing at last 20160313 03:15:11< celticminstrel> Ahh. 20160313 03:15:36< vultraz> Aginor: whoot whoot! 20160313 03:15:37< vultraz> :D 20160313 03:15:48< vultraz> Aginor: also no, no updates on that branch 20160313 03:16:08< celticminstrel> What're you wooting about? 20160313 03:16:35< vultraz> sdl1 is gone 20160313 03:16:43< celticminstrel> Ah right. 20160313 03:16:55< Aginor> vultraz: removing it was about as easy as I expected 20160313 03:17:11< Aginor> but in the process, we discovered that a couple of tests hadn't been ported over 20160313 03:17:17< Aginor> from sdl1 to sdl2 20160313 03:17:24< Aginor> we need to port those tests now 20160313 03:18:50< vultraz> celticminstrel: the icons used to have tooltips but for some reason that's broken 20160313 03:18:59< celticminstrel> Eh? Really? 20160313 03:19:03< vultraz> ya 20160313 03:19:04< celticminstrel> But it still works in prefs... 20160313 03:19:13< celticminstrel> I suppose those aren't dynamicaly set though. 20160313 03:19:15< vultraz> specifically, images with tooltips 20160313 03:19:19< celticminstrel> Oh. 20160313 03:21:07< celticminstrel> Is "{" followed by a space not considered a macro inclusion by the preprocessor? 20160313 03:21:57< vultraz> I think it is 20160313 03:22:08< vultraz> not sure 20160313 03:22:21< celticminstrel> One of the AI examples appears to assume it's not. 20160313 03:24:59< celticminstrel> Uh, now my formula tests failed again... 20160313 03:25:22< celticminstrel> Oh, it was just a Travis error. 20160313 03:26:47-!- ancestral [~ancestral@71-220-49-102.mpls.qwest.net] has joined #wesnoth-dev 20160313 03:28:39< vultraz> Aginor: are we going to drop SDL_GPU next? (I think you mentioned yesterday those codepaths are very outdated) 20160313 03:28:58< Aginor> I am not entirely sure it's a good idea 20160313 03:29:11< vultraz> oh? 20160313 03:29:29< Aginor> it's got outdated code in there, but some of it could also be useful 20160313 03:30:49< vultraz> true. but how close is it to what we want to do with OGL? And, if it's outdated, how much do we want to rely on it for example. Plus, there's always logs. 20160313 03:34:03< Aginor> logs? 20160313 03:34:08< Aginor> you mean old revisions? 20160313 03:34:36< Aginor> even if we go down that path it could probably do with a big dust-off 20160313 03:34:59< Aginor> but at this stage I haven't done too many things that diverge too much from what'll be in that code 20160313 03:35:05< vultraz> er, commit logs 20160313 03:37:25< Aginor> vultraz: I want to do more research before dropping the code 20160313 03:37:31< vultraz> ok 20160313 03:38:02< Aginor> I don't want to drop it only to decide that that I want it back in 3 months, and spend a week resolving conflicts when trying to back out the commit I dropped support in 20160313 03:39:17< vultraz> makes sense 20160313 03:40:23< irker296> wesnoth: Charles Dang wesnoth:master 5d9c6b13b13b / data/gui/default/window/preferences.cfg: tpreferences: allow composite slider labels to grow to fill space https://github.com/wesnoth/wesnoth/commit/5d9c6b13b13bde1446a0a518970f81f70a5998d3 20160313 03:42:13< vultraz> I can now get started on the flip() cleanup :) 20160313 03:42:47< Aginor> vultraz: if you decide to tackle that, please do so in a separate thread 20160313 03:42:55< vultraz> branch? 20160313 03:43:07< Aginor> and we'll need to have a discussion on approach and what we want the end result to be like 20160313 03:43:23< vultraz> indeed 20160313 03:43:26< Aginor> and the overall architecture that wesnoth should conform to eventually, and how this fits in with it 20160313 03:43:34< Aginor> s/thread/branch/ 20160313 03:43:59< vultraz> I don't really have an opinion on any of that, as long as we can eliminate flickering 20160313 03:44:00< Aginor> but I can't have that discussion now, we have dinner guests coming over in a bit over an hour, I need to go and start the cooking 20160313 03:44:09< vultraz> alright 20160313 03:44:12< vultraz> no rush 20160313 03:44:23< vultraz> reminds me, I need to go shopping for dinner... 20160313 03:44:28< Aginor> hmm 20160313 03:44:31< Aginor> that reminds me 20160313 03:44:37< Aginor> if you want to do something immediate 20160313 03:45:11< Aginor> find the code in gui2 that fills rectangles by drawing them line by line and see if they can be replaced with a call to FillRect instead now when we're in SDL2 20160313 03:45:34< vultraz> I was looking at that code just the other day, I think 20160313 03:45:50< Aginor> keep this in mind: https://wiki.libsdl.org/CategoryRender 20160313 03:46:06< Aginor> it's one of the alternatives to SDL_gpu 20160313 03:47:46< vultraz> src/gui/auxiliary/canvas.cpp:762 20160313 03:47:50< celticminstrel> ...didn't SDL1 have FillRect? 20160313 03:48:17< Aginor> celticminstrel: it did, but there seemsto have been an issue of some sort in GUI2 20160313 03:48:32< Aginor> so there's that horrible workaround 20160313 03:48:36< vultraz> basically, it calls draw_line which calls put_pixel 20160313 03:48:40< Aginor> not doing it would be good 20160313 03:48:53< Aginor> very good for performaqnce 20160313 03:49:25< vultraz> Aginor: what do you want me to keep in mind about that link? 20160313 03:49:42< Aginor> in general 20160313 03:50:03< Aginor> if you want to start poking the rendering path, read up on it and keep it in mind 20160313 03:52:50-!- gfgtdf [~chatzilla@f054160176.adsl.alicedsl.de] has quit [Quit: ChatZilla 0.9.92 [Firefox 45.0/20160303134406]] 20160313 03:56:15< vultraz> hmm 20160313 03:56:32< vultraz> we have a draw_rectangle() function in sdl/rect.cpp 20160313 03:57:03< vultraz> and draw_solid_tinted_rectangle() 20160313 03:57:13< vultraz> Aginor: should i use these? 20160313 04:00:17< vultraz> also, related: 20160313 04:00:23< vultraz> "@todo formulas are now recalculated every draw cycle which is a bit silly unless there has been a resize." 20160313 04:00:27< vultraz> whut 20160313 04:19:07< vultraz> blagh 20160313 04:19:19< vultraz> not sure why, it's just not drawing :| 20160313 04:32:15< vultraz> grrrrrrrr 20160313 05:00:38< vultraz> ok, got it partly working 20160313 05:06:07< vultraz> I think I'm not handling the colors properly 20160313 05:08:49 * vultraz pings celticminstrel 20160313 05:08:54< celticminstrel> Hi. 20160313 05:09:36< vultraz> what's the different between Uint32 and boost::uint32_t 20160313 05:09:50-!- ancestral [~ancestral@71-220-49-102.mpls.qwest.net] has quit [Quit: i go nstuf kthxbai] 20160313 05:09:57< celticminstrel> I doubt there is any difference. 20160313 05:10:03< celticminstrel> They are probably 100% identical. 20160313 05:10:23< celticminstrel> Synonyms for the same type. 20160313 05:10:31< vultraz> ah 20160313 05:10:48< celticminstrel> After all, those names are pretty specific. 20160313 05:12:20< celticminstrel> Even if they are slightly different types (eg, one is unsigned int and one is unsigned long), conversion between them is certainly lossless. 20160313 05:13:13< vultraz> ok, so I have a Uint32 variable that was filled in from an RGBA string.... 20160313 05:13:40< vultraz> I'm trying to figure out how best to pass the color values to any of the various draw functions we have 20160313 05:13:55< celticminstrel> How do the draw functions take the colour? 20160313 05:14:20< vultraz> the only one I've been able to get working is draw_solid_tinted_rectangle 20160313 05:14:24< vultraz> which takes three ints and a double 20160313 05:14:37< vultraz> I can get the ints by bitshifts but not the alpha 20160313 05:14:39< celticminstrel> That doesn't tell me anything really. 20160313 05:14:44< vultraz> er, the double 20160313 05:14:53< celticminstrel> The alpha should be obtainable by bitshifts too. 20160313 05:15:26< vultraz> I tried the standard "fill_color_ & 0x000000FF" but that produced a weird result 20160313 05:15:43< vultraz> maybe because that function does this: Uint8(alpha*255) to that variable 20160313 05:16:04< vultraz> basically, that function is a wrapper for fill_rect_alpha 20160313 05:16:08< celticminstrel> Okay, so, if you ignore the alpha (and just pass 1.0 or whatever), does it mostly work? 20160313 05:16:45< celticminstrel> (ie, working except for transparency) 20160313 05:16:53< vultraz> I'd like to call that, but it's needs a Unit8 value for alpha, separate from the Uint32 value for color. problem is, my color variable has all four 20160313 05:16:54< vultraz> celticminstrel: yes 20160313 05:17:38< celticminstrel> So basically it's taking the alpha as a double in the range [0.0,1.0] rather than as an integer in the range [0,256). 20160313 05:17:45< celticminstrel> Your clue is this: 20160313 05:17:50< celticminstrel> [Mar 13@12:15:44am] vultraz: maybe because that function does this: Uint8(alpha*255) to that variable 20160313 05:17:58< celticminstrel> Try doing the opposite before passing it in. 20160313 05:18:10< celticminstrel> "fill_color_ & 0xFF" is probably the correct alpha value. 20160313 05:18:18< celticminstrel> Just in the wrong format. 20160313 05:19:57< vultraz> divide it by 255? 20160313 05:20:16< celticminstrel> Well, not quite, because that would give 0. 20160313 05:20:21< celticminstrel> Try 255.0 instead. 20160313 05:21:00< vultraz> ahh, that works :D 20160313 05:21:05< celticminstrel> Maybe 256.0. I dunno. 20160313 05:21:13< vultraz> maybe I should make an overload that takes an int for alpha? 20160313 05:21:19< celticminstrel> Probably doesn't make much difference. 20160313 05:21:22< celticminstrel> You could indeed do that. 20160313 05:21:35< celticminstrel> It might cause some confusion though, I dunno. 20160313 05:22:17< vultraz> Aginor: ok, the test is conclusive: it is possible to do away with the line-draw method 20160313 05:23:50< vultraz> I should make a util function somewhere for these bitshifts 20160313 05:23:55< vultraz> since they're used so much 20160313 05:24:39< celticminstrel> Does SDL not have one builtin? 20160313 05:25:04< vultraz> no idea 20160313 05:25:18< vultraz> note to self: make int_to_color set alpha 20160313 05:25:56< celticminstrel> I kinda want to try making this example compile in master: https://wiki.wesnoth.org/WritingYourOwnAI 20160313 05:26:08< celticminstrel> It would require a lot of changes. 20160313 05:26:22< vultraz> what for? 20160313 05:26:37< celticminstrel> Partly in order that the page can be updated. 20160313 05:28:17< celticminstrel> Anyone want to do general code review on PR624 or PR618? (Or even both?) 20160313 05:28:46< vultraz> Not I 20160313 05:29:07< celticminstrel> vultraz: What about just the changelog entry? 20160313 05:29:15< vultraz> I can do that 20160313 05:29:46-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has quit [Ping timeout: 250 seconds] 20160313 05:29:53< celticminstrel> Ignore the drafts, the PR now actually includes the changelog directly. 20160313 05:31:14< vultraz> string interpolation syntax... is that like string.format in lua? 20160313 05:31:28< celticminstrel> Uh. In a way, yeah. 20160313 05:31:35< celticminstrel> Closer to $variable syntax in WML. 20160313 05:31:58< celticminstrel> It's the undocumented feature I used in the orb toggle button definition. 20160313 05:32:39< vultraz> ah 20160313 05:33:05< celticminstrel> Except I changed it to [] instead of {} so that you don't need <<>> to get it past the preprocessor. 20160313 05:33:14< vultraz> re the escape characters, are you supposed to literally use [(], etc? 20160313 05:33:19< celticminstrel> Yes. 20160313 05:33:47< vultraz> might put them in quotes, then 20160313 05:33:57< celticminstrel> Hmm, okay. 20160313 05:34:14< vultraz> "New range operator a~b". not exactly new, we've been using that for filename expansion for awhile 20160313 05:34:16-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has quit [Quit: Connection closed for inactivity] 20160313 05:34:27< celticminstrel> It's new to the formula engine though. :P 20160313 05:34:37< celticminstrel> But that was part of why I chose the tilde for it. 20160313 05:40:43-!- ancestral [~ancestral@71-220-49-102.mpls.qwest.net] has joined #wesnoth-dev 20160313 05:40:57< vultraz> Looks good to me 20160313 05:41:40< vultraz> What's this about function definitions? 20160313 05:42:09< celticminstrel> You can define functions in formulas. 20160313 05:42:18< celticminstrel> Previously this only worked in FormulaAI. 20160313 05:42:23< celticminstrel> Now it works in any formula. 20160313 05:43:45< celticminstrel> When you define a function in FormulaAI, the entire engine can see it (possibly only for one particular side, not sure). 20160313 05:44:01< celticminstrel> But when you define a function anywhere else, it's local to the formula it was defined in. 20160313 05:51:53< irker296> wesnoth: Charles Dang wesnoth:master a30a62787387 / src/gui/auxiliary/canvas.cpp: trectangle: fill entire rectangle at once instead of doing line-by-line drawing https://github.com/wesnoth/wesnoth/commit/a30a627873870ed71901990ed31a3749e2520779 20160313 05:51:57< vultraz> Aginor: ^ 20160313 05:56:34-!- celticminstrel is now known as celmin|sleep 20160313 05:59:08< vultraz> Aginor: do you think we should refactor out draw_line() altogether? 20160313 05:59:11< vultraz> https://wiki.libsdl.org/SDL_RenderDrawLine is a thing 20160313 05:59:24< vultraz> but again, I don't really understand the whole render business 20160313 06:32:33< ancestral> I see a problem with “Slow” 20160313 06:32:50< ancestral> If a unit has Slow, it’s ambiguous to what it means 20160313 06:33:08< ancestral> It could mean it has a trait 20160313 06:33:16< ancestral> Or it could mean it has a special attack 20160313 06:38:46< vultraz> ancestral: other day you were asking about the new unit preview style 20160313 06:38:55< vultraz> ancestral: look at Recruit or Create Unit in current master 20160313 06:39:11< ancestral> I see it 20160313 06:39:20< ancestral> I like what you’re trying to get it 20160313 06:39:43< ancestral> However, I do think we need some standards with describing units 20160313 06:40:25< ancestral> And I’m going to propose something that might be considered slightly controversial, but probably well-deserving 20160313 06:40:58< vultraz> I'm listening 20160313 06:41:04< ancestral> Attacks need to stop using dashes. 20160313 06:41:13< ancestral> A unit formerly described 5–2 looks like ‘3’ to a new user 20160313 06:41:37< vultraz> what do you mean? 20160313 06:42:24< ancestral> If I jumped in and started playing Wesnoth, and it says “claws 10-2” 20160313 06:42:33< ancestral> I’m going to guess it does 10 damage, with a -2 modifier 20160313 06:42:57< ancestral> It needs to be written like 10×2 20160313 06:43:12< fabi> ^ 20160313 06:43:15< ancestral> Yes, sometimes the attack fails 20160313 06:43:15< vultraz> what about 10/2? 20160313 06:43:17< ancestral> But it’s better 20160313 06:43:23< ancestral> vultraz: That equals 5 20160313 06:44:17< ancestral> “10 damage 2 times” makes a bit more sense described with a multiplication sign 20160313 06:44:31< vultraz> or 10 (2) 20160313 06:44:40< vultraz> with (2) a different color 20160313 06:45:24< ancestral> vultraz: I’m open to whatever is the easiest to understand 20160313 06:45:31< vultraz> I think (2) is better 20160313 06:45:35< vultraz> I'd rather not have the X 20160313 06:45:36< ancestral> I don’t want the cleverest, or the neatest looking 20160313 06:45:46< ancestral> I want the most intuitive 20160313 06:45:58< fabi> I think using the multiplicator sign is a good idea. 20160313 06:46:10< fabi> Although the math is only counting the max damage 20160313 06:46:24< ancestral> 10 (2) means less to me than 10 × 2 20160313 06:46:37< fabi> So the number of strokes might be set in parenthesis to make clear that they can fail 20160313 06:47:14< fabi> Why don't we introduce a new term. 20160313 06:47:21< fabi> DP 20160313 06:47:25< fabi> for damage points 20160313 06:47:37< fabi> ? 20160313 06:48:02< ancestral> Hmm maybe 20160313 06:48:04< fabi> Because the actual hitpoints also depend on the resistance 20160313 06:49:12< ancestral> Anyway, the % below the number in the unit window should help reinforce the number of attacks have a chance to hit 20160313 06:49:48< fabi> my problem was (or still is) to know which value commes first. 20160313 06:50:02< ancestral> My major criticism with the – right now is that it doesn’t mean minus. It really means “delimiter” 20160313 06:50:03< fabi> Do I 10 damage with 2 strikes or 2 damage with 10 strikes? 20160313 06:50:31< ancestral> (And yes, a delimiter can be anything. A bullet. A dot. A sword icon.) 20160313 06:51:20< fabi> 12(icon for the damage type)*2(icon for the weapon) 20160313 06:51:32< vultraz> what about just 20160313 06:51:55< vultraz> [sword icon] damage (strikes) 20160313 06:53:15< vultraz> or x 20160313 06:53:32< fabi> well, the icon for the weapon is not providing much game relevant information 20160313 06:53:51< fabi> I like to show it but if you only want to show one icon then it should be the one of the damage type. 20160313 06:53:51< ancestral> vultraz: In the unit description window, you already have a large icon 20160313 06:53:58< ancestral> Depicting the attack 20160313 06:54:16< ancestral> s/unit description window/attack enemy window 20160313 06:54:26< ancestral> dialog 20160313 06:55:14< ancestral> vultraz, fabi: I guess I would say this 20160313 06:55:49< ancestral> Simple and small fixes might be better, rather than try to redesign 5 different things 20160313 06:55:58< ancestral> Rahter, 1 small fix 20160313 06:56:01< ancestral> *rather 20160313 06:56:35< ancestral> A lot of what you are saying depends on how it’s presented 20160313 06:58:46< ancestral> From 10 years ago: http://r.wesnoth.org/t13070 20160313 06:59:33< ancestral> “Not a bad idea, but 1. is it really that unintuitive right now? and 2. does "x" mean "multiply" in all cultures?” x mens multiply in math. Mathematics is in all Internet-bound cultures. 20160313 06:59:44< ancestral> s/mens/means 20160313 07:06:23< ancestral> (There’s another discussion on this which goes nowhere fast and turns toxic at times, from 2009. It’s barely worth reading.) 20160313 07:06:47< fabi> about the color 20160313 07:07:20< fabi> wait, are we talking about the attack dialog? 20160313 07:07:31-!- Kwandulin [~Miranda@p200300760F7D736668184C72CBB87441.dip0.t-ipconnect.de] has joined #wesnoth-dev 20160313 07:07:41< ancestral> Really anywhere damage – strikes is represented 20160313 07:09:40< fabi> if we talk about he attack dialog then the color of the damage points need to be red if the attacked unit has a positive resistance to the type and green if the resistance is negative 20160313 07:09:58< fabi> same with the number of strokes red if modified to the worse 20160313 07:10:08< fabi> and green if modified to the better 20160313 07:10:35< ancestral> Right now, is the color just serving as a modifier purpose? Higher or lower due to time of day? 20160313 07:11:40< fabi> yes 20160313 07:24:23-!- boucman [~rosen@wesnoth/developer/boucman] has joined #wesnoth-dev 20160313 07:24:24-!- boucman [~rosen@wesnoth/developer/boucman] has quit [Read error: Connection reset by peer] 20160313 07:25:09-!- boucman [~rosen@wesnoth/developer/boucman] has joined #wesnoth-dev 20160313 07:57:59-!- ancestral [~ancestral@71-220-49-102.mpls.qwest.net] has quit [Quit: i go nstuf kthxbai] 20160313 08:03:50-!- ChipmunkV [~vova@d0017-2-88-172-31-68.fbx.proxad.net] has joined #wesnoth-dev 20160313 08:29:14< Aginor> vultraz: nicely done with tracking down https://github.com/wesnoth/wesnoth/commit/a30a627873870ed71901990ed31a3749e2520779 20160313 08:29:34< vultraz> ty ty 20160313 08:30:04< Aginor> looking at what's happening there now, there's probably scope for bringing the colour type across and making sure it's treated the same across the board 20160313 08:30:26< Aginor> there's already functions for red(), green(), etc to extract the different components 20160313 08:31:08< Aginor> also, why are you dividing the value for the alpha with 255.0? is the function expecting a float between 0 and 1? 20160313 08:31:27< vultraz> that function takes a double for alpha and then multiplies it by 255 20160313 08:31:37 * Aginor facepalms 20160313 08:31:55< Aginor> we should refactor all of the colour usage and make sure it's consistent 20160313 08:32:03< vultraz> I can convert it to take an int like the other arguments and use proper 0-255 range 20160313 08:32:14< Aginor> ideally the bitshifts should be defined as either macros or functions 20160313 08:32:30< vultraz> I agree 20160313 08:32:32< Aginor> and we define a colour-type that we use instead of just passing uint32_t around 20160313 08:32:39< Aginor> there's already functions around :) 20160313 08:32:49< Aginor> some are even in the display class 20160313 08:32:50< vultraz> I guess we can't use SDL_color? 20160313 08:32:55< Aginor> we can 20160313 08:34:09< Aginor> but I don't think it's what we want to do though 20160313 08:34:36< Aginor> although it depends on how the type is defined 20160313 08:34:49< Aginor> and to be consistent, we'd have to wrap it in a class 20160313 08:37:07< vultraz> I'm trying to figure out if SDL_FillRect handles alpha 20160313 08:37:24< vultraz> according to the sdl wiki.. " If the color value contains an alpha component then the destination is simply filled with that alpha information, no blending takes place." 20160313 08:37:51< vultraz> does that mean if it has alpha, it only changes transparency? 20160313 08:38:33-!- ShikadiLord [~ignacio@wesnoth/developer/shadowm] has joined #wesnoth-dev 20160313 08:38:54-!- shadowm [~ignacio@wesnoth/developer/shadowm] has quit [Ping timeout: 246 seconds] 20160313 08:39:03-!- boucman [~rosen@wesnoth/developer/boucman] has quit [Ping timeout: 246 seconds] 20160313 08:39:30-!- boucman [~rosen@wesnoth/developer/boucman] has joined #wesnoth-dev 20160313 08:41:26< vultraz> from what I can tell from our code, we currently do not pass alpha values to fill_rect (our SDL_FillRect wrapper) 20160313 08:43:28< vultraz> But I'm not sure if that's deliberate due to SDL_FillRect limitations, or just the Way We Did Things 20160313 08:43:43< vultraz> there are other places that assume Unit32 color values without alpha 20160313 08:43:49< vultraz> like int_to_color 20160313 08:44:12< vultraz> it performs the bitshifts and then returns an SDL_Color with alpha set to opacity 20160313 08:45:08< vultraz> so basically, our color handling is a weird mix of colors and colors + alpha 20160313 08:45:33< vultraz> Do you think we should standardize the latter everywhere? 20160313 08:48:21-!- Crendgrim [~crend@wesnoth/forum-moderator/crendgrim] has quit [Ping timeout: 276 seconds] 20160313 08:49:59< vultraz> ShikadiLord: what happens if you try to bitshift off the end of a section of bits? 20160313 08:50:09< irker296> wesnoth: Andreas Löf wesnoth:master 064944fce6f0 / RELEASE_NOTES changelog: Update release notes and changelog RE SDL 1.2 removal https://github.com/wesnoth/wesnoth/commit/064944fce6f0fc8ffd881439161e9e747d96a75e 20160313 08:50:42< Aginor> yes, we do\ 20160313 08:51:26< vultraz> er wait, what do we do 20160313 08:51:32< Aginor> we should use the same colour format everywhere, and we should ensure it's compatible with what's in our images as are loaded, and we should be conistent with it's use. It should always include the alpha component 20160313 08:52:21< Aginor> doing these changes without serious testing will most likely Break Things 20160313 08:52:26< vultraz> ah 20160313 08:52:29< vultraz> Break Things :( 20160313 08:53:17< vultraz> well depending on how SDL_FillRect handles alpha, i think there are a few optimizations that could be done right now 20160313 08:54:48< Aginor> I'm sure there is 20160313 08:55:12< Aginor> but that comment you found about recalculating the formulas every frame, that strikes me as more imnportant 20160313 08:56:19< vultraz> ah, yes 20160313 08:56:36< vultraz> yes, they are still recalculated/drawn every frame 20160313 08:57:01< irker296> wesnoth: Andreas Löf wesnoth:master 7bc5e021c0db / src/display.cpp: Fix TODO by removing workaround for a resolved SDL issue. https://github.com/wesnoth/wesnoth/commit/7bc5e021c0db640862c530673b4e65acf78ff6b9 20160313 08:57:03< irker296> wesnoth: Charles Dang wesnoth:master 40ffa6ba88e0 / src/display.cpp: Merge pull request #451 from aginor/todofix https://github.com/wesnoth/wesnoth/commit/40ffa6ba88e03c6813c8c0e729ea77e1ef7ae4b4 20160313 08:57:42< vultraz> which it certainly doesn't need to do 20160313 08:58:28< ShikadiLord> vultraz: Stuff on the other end gets zeroed out. 20160313 08:58:31< ShikadiLord> IIRC. 20160313 08:59:01< ShikadiLord> Do note that shifting by an amount larger than the target's size is UB. 20160313 09:00:16-!- ShikadiLord is now known as shadowm 20160313 09:02:01< Aginor> vultraz: is it every frame when the component is dirty? Or every frame regardless? 20160313 09:02:21< vultraz> I think the former 20160313 09:02:28< Aginor> then it's Bad 20160313 09:02:36< Aginor> wait 20160313 09:02:43< Aginor> former is not quite as bad 20160313 09:02:49< Aginor> not ideal, but not terrible 20160313 09:03:40< vultraz> let me test 20160313 09:04:13< fabi> https://github.com/wesnoth/wesnoth/blob/master/data/test/scenarios/prestart_settings.cfg#L91 20160313 09:04:30< fabi> ^ I assume that test succeeds. 20160313 09:04:34< fabi> But I don't get it. 20160313 09:04:40< vultraz> simply mousing over a widget is enough to redraw it 20160313 09:04:55< fabi> If I change the turn in a prestart event 20160313 09:05:01< fabi> then everything is fine 20160313 09:05:02< Aginor> hmm 20160313 09:05:16< fabi> but when the turn number is changed during a sides turn 20160313 09:05:34< fabi> then the rest of the event firing is skipped and I move to the new turn? 20160313 09:05:45< vultraz> there's a rectangle as the background of toggle panels. If you scroll a listbox with togglepanels, the rectangle gets redrawn every time it moves 20160313 09:06:11< vultraz> if you're doing nothing, nothing is redrawn 20160313 09:06:27< fabi> is that behaviour really intended? 20160313 09:06:43< vultraz> so basically any interaction triggers it 20160313 09:06:44< fabi> I guess the test was coded after the current behaviour and not like it should happen. 20160313 09:07:06< Aginor> vultraz: that needs more thinking about 20160313 09:07:32< Aginor> it depends on hardware vs software cursors what should be happened 20160313 09:11:22< Aginor> I think 20160313 09:11:34< Aginor> also, I think my grammar and spelling is deteriorating :/ 20160313 09:11:34< vultraz> I couldn't say 20160313 09:12:06< vultraz> is there anything else you'd like me to work on right now? 20160313 09:14:07< vultraz> apparently SDL_BlitSurface does not handle alpha 20160313 09:14:14< vultraz> er 20160313 09:14:18< vultraz> I mean SDL_FillRect 20160313 09:14:21< vultraz> you need SDL_BlitSurface to handle alpha 20160313 09:14:32< vultraz> words, where art thou! 20160313 09:16:07< Aginor> that's probably what we want though, we don't want blending to take place when we are trying to draw a opaque rectangle 20160313 09:20:09< Aginor> vultraz: fix the labels? fix storyscreen? check that a number of GUI2 dialogs are unrendering properly in the interim? 20160313 09:29:11-!- Kwandulin [~Miranda@p200300760F7D736668184C72CBB87441.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20160313 09:30:06< vultraz> Aginor: what do you mean with that last one 20160313 09:32:09< Aginor> vultraz: https://gna.org/bugs/?24515 is an example 20160313 09:32:49< Aginor> there's a fundamental issue in GUI2 that needs to be resolved, but in the interim we need to tell that dialog to undraw itself after all 20160313 09:33:06< Aginor> something we want to enable in dialogs covering titlescreen, but not gamescreen 20160313 09:38:23< vultraz> what is the fundamental issue? 20160313 09:41:50< Aginor> instead of relying on the window to undraw itself (which relies on the component taking a copy of the screen before it's positioned, rendering itself, then rendering the copy when it's removed) we want the overlayed component(s) to be notified that they need to redraw an area 20160313 09:41:55< irker296> wesnoth: Charles Dang wesnoth:master 8abb0cf3a596 / src/gui/dialogs/ (game_delete.cpp game_save.cpp mp_host_game_prompt.cpp): GUI2: set restore flag on a few more dialogs https://github.com/wesnoth/wesnoth/commit/8abb0cf3a596e016f97ce137af3c5b352178ff1c 20160313 09:42:27< vultraz> Fixes bug 20160313 09:42:45< Aginor> the reason this is wanted is because taking that copy becomes reasonably expensive when you do it from video ram to system ram and back 20160313 09:42:50-!- Appleman1234 [~Appleman1@KD106161139026.au-net.ne.jp] has quit [Ping timeout: 250 seconds] 20160313 09:43:04< Aginor> not to mention that it breaks horribly if the dialog changes position, like if there's a window resize 20160313 09:43:32< Aginor> thanks vultraz 20160313 09:45:05-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth-dev 20160313 09:45:36< vultraz> Game Delete and Game Save weren't really affected, bit I figured they shouldn't stick around 20160313 09:46:12< Aginor> fair enough 20160313 09:48:37-!- mjs-de [~mjs-de@x4db51de5.dyn.telefonica.de] has joined #wesnoth-dev 20160313 09:51:13< vultraz> ok, wow... 20160313 09:51:19< vultraz> tcanvas::blit handles gui2 window blurring 20160313 09:51:26< Aginor> yeah 20160313 09:51:32< Aginor> that's on the to-slay-list 20160313 09:51:51< Aginor> it also relies on that undrawing thing for some reason 20160313 09:52:13< vultraz> so basically, blurring happens...very very often on dialogs with blur p_p 20160313 09:52:13< Aginor> in the longer run that should just be solved with a shader 20160313 09:52:29< Aginor> only when they're redrawn 20160313 09:52:45< vultraz> well, no 20160313 09:53:04< vultraz> even mousing over a widget inside a blurred window (like in the titlescreen) causes the blurring to be reapplied. I think 20160313 09:53:35< vultraz> yes 20160313 09:53:46< Aginor> if you say so 20160313 09:53:57< Aginor> I looked at it a long time ago and might be misremembering 20160313 09:54:00< vultraz> so many Things To Do :( 20160313 09:54:46< Aginor> yes 20160313 09:54:57< Aginor> pick something, see it through, repeat :) 20160313 09:55:05< Aginor> maybe even make a todo-list 20160313 09:55:14< Aginor> step one though, fix bugs 20160313 09:55:49< Aginor> I've grabbed all reported rendering bugs and assigned to me, feel free to steal the one's that aren't marked as in progress :D 20160313 09:58:47< Aginor> also, labels need to be included in that behaviour too, in general 20160313 09:59:39< vultraz> what behavior? 20160313 10:01:06< Aginor> with regards to partial-redrawing over undrawing 20160313 10:01:16< Aginor> maybe I should go and write a spec 20160313 10:05:25< irker296> wesnoth: Charles Dang wesnoth:master 1fcf7ed99386 / src/storyscreen/render.cpp: Render titlebox over storyscreen background (bug #24510) https://github.com/wesnoth/wesnoth/commit/1fcf7ed99386457e68c4e5d3dd309aea5df8f540 20160313 10:05:28< vultraz> Aginor: ^ 20160313 10:08:25< zookeeper> vultraz, with so many things to do, what's one more? https://gna.org/bugs/index.php?24517 20160313 10:08:38< zookeeper> (i think it's the biggest issue with the editor, really) 20160313 10:09:18< vultraz> shadowm is (potentially) working on a gui2 filebrowser and would be the person to deal with that 20160313 10:09:48< vultraz> I'm not going to touch the gui1 one with a 100 foot pole 20160313 10:09:49< zookeeper> oh, cool. 20160313 10:16:07< irker296> wesnoth: Charles Dang wesnoth:master 5010f54e11db / src/gui/dialogs/wml_message.cpp: Fix [message][option] being black on hover (bug #24478) https://github.com/wesnoth/wesnoth/commit/5010f54e11db690d284c7d8d570e104c3b43c27f 20160313 10:16:09< vultraz> Aginor: ^ 20160313 10:27:33< vultraz> Aginor: that also seems to have fixed http://gna.org/bugs/?24513 20160313 10:31:12< vultraz> so that's 4 bugs off your list 20160313 10:39:45-!- Appleman1234 [~Appleman1@KD106161147064.au-net.ne.jp] has joined #wesnoth-dev 20160313 10:47:42-!- Kwandulin [~Miranda@p200300760F7D7366C84E18800E0FF167.dip0.t-ipconnect.de] has joined #wesnoth-dev 20160313 10:48:08-!- clavii [~clavi@163.172.10.77] has joined #wesnoth-dev 20160313 10:50:33-!- clavi [~clavi@163.172.10.77] has quit [Ping timeout: 276 seconds] 20160313 10:52:04-!- stikonas [~stikonas@wesnoth/translator/stikonas] has joined #wesnoth-dev 20160313 11:00:05-!- stikonas [~stikonas@wesnoth/translator/stikonas] has quit [Quit: AtomicIRC: The nuclear option.] 20160313 11:07:44-!- stikonas [~stikonas@wesnoth/translator/stikonas] has joined #wesnoth-dev 20160313 11:17:47< irker296> wesnoth: Charles Dang wesnoth:master 4435b255237b / src/ (7 files in 3 dirs): Remove calls to empty update_whole_screen() function https://github.com/wesnoth/wesnoth/commit/4435b255237bdd3f4aa13a7543eff2c6bd82f048 20160313 11:41:27 * zookeeper wishes there was a way to tell the terrain builder to automatically blit into one image all the images that the same rule places on a hex 20160313 11:41:40-!- stikonas_ [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20160313 11:42:01< vultraz> you're the only one who understands that code :P add such a thing 20160313 11:42:37< zookeeper> i'm considering it! i just doubt it can be done without large refactoring, something that i wouldn't do 20160313 11:42:58< vultraz> y u no like large refactor 20160313 11:44:30< vultraz> actually, I have my answer 20160313 11:44:33< vultraz> large compile times 20160313 11:44:54< vultraz> I'm having to revert something I was working on to make sure it wasn't introducing bugs... 20160313 11:45:14< vultraz> and it had video.hpp changes 20160313 11:45:16< vultraz> :( 20160313 11:45:20< vultraz> the pain 20160313 11:51:37< vultraz> *still building* 20160313 11:54:57-!- louis94 [~~louis94@91.178.240.1] has joined #wesnoth-dev 20160313 11:55:10< vultraz> ok, it's not me 20160313 11:58:48< zookeeper> i don't like large refactor because large refactor is tons of work and requires an understanding of not only what you're refactoring but only of everything it interacts with :p 20160313 11:59:07< zookeeper> s/only/also 20160313 12:00:14< zookeeper> although i might take back what i said about such a feature not being easy... it might be 20160313 12:02:55-!- stikonas [~stikonas@wesnoth/translator/stikonas] has quit [Remote host closed the connection] 20160313 12:03:28-!- stikonas_ is now known as stikonas 20160313 12:03:39< zookeeper> and that would be convenient, because it should greatly reduce the amount of images that are blitted for transitions and similar rules 20160313 12:04:05< zookeeper> one can do all that by just adding extra rules, but that's inconvenient because it gets so messy and verbose 20160313 12:09:50< zookeeper> ...and it's practically impossible to make it catch _all_ cases 20160313 12:25:20< vultraz> zookeeper: do you have a minute to test something for me? 20160313 12:25:56< zookeeper> depends on the actual time required :p 20160313 12:26:22< vultraz> very simple. connect to the addons server and see if the bottom of the progress bar that shows when you do so goes slightly over the bottom border of its containing box 20160313 12:27:26< vultraz> it could look like the bottom is slightly thinner than the other lines 20160313 12:27:31< zookeeper> it does. that is, the bottom of the progress bar doesn't have the thin border it should. 20160313 12:27:56< vultraz> ok, so it's not this change I'm working on 20160313 12:27:58< vultraz> thanks 20160313 12:28:06-!- louis94 [~~louis94@91.178.240.1] has quit [Ping timeout: 244 seconds] 20160313 12:35:10-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has joined #wesnoth-dev 20160313 12:38:55-!- prkc [~prkc@563BD958.dsl.pool.telekom.hu] has joined #wesnoth-dev 20160313 12:45:12< irker296> wesnoth: Charles Dang wesnoth:master c37e9c4a7f0f / src/ (6 files in 3 dirs): Removed display_format_alpha() function https://github.com/wesnoth/wesnoth/commit/c37e9c4a7f0f3eff49f568df3de874d7c7a4bdf5 20160313 12:45:31< vultraz> Aginor: ^ could you take a look at the commit message for that and give your opinion on how necessary create_optimized_surface is anymore? 20160313 12:46:52-!- Kwandulin [~Miranda@p200300760F7D7366C84E18800E0FF167.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20160313 12:56:31< vultraz> somehow the commit where I changed the rectangle rendering made the progress bar widget look bad 20160313 12:56:34< vultraz> blah 20160313 13:01:33< zookeeper> holy crap, pressing F5 in the editor _saves_ at least the current map D: 20160313 13:01:42< zookeeper> very nice if you're just experimenting with stuff 20160313 13:20:14< vultraz> grrrr 20160313 13:26:14< vultraz> dammit, why did this have to be problematic :( 20160313 13:31:43< vultraz> this is weird 20160313 13:34:19< zookeeper> https://github.com/wesnoth/wesnoth/blob/master/src/editor/controller/editor_controller.cpp#L732 <- evil, evil, evil. although if you simply remove that line, the unsaved maps will disappear on F5. 20160313 13:34:50< zookeeper> s/unsaved/all 20160313 13:34:54< vultraz> why is that evil? 20160313 13:35:22< zookeeper> because it saves the maps without ever asking you? 20160313 13:35:47< vultraz> and that's bad because... 20160313 13:36:19< vultraz> there isn't anything else to do 20160313 13:37:37< zookeeper> well think. you're messing with your nice little UMC map. oops, now it looks stupid. then you go for example tweak some of your terrain WML, press F5 to see how it looks. nope, still looks stupid, so you quit without saving. except the game has secretly overwritten your map with the stupid-looking one. 20160313 13:38:37< zookeeper> maybe you don't have it in version control so you don't notice it, or maybe it overwrote some of your uncommitted local changes which are now lost. 20160313 13:38:46< zookeeper> it's terrible 20160313 13:39:18< zookeeper> because unless you tell the editor "save", it should absolutely not touch your files 20160313 13:39:28-!- mattsc [~mattsc@wesnoth/developer/mattsc] has joined #wesnoth-dev 20160313 13:40:23-!- louis94 [~~louis94@91.178.240.1] has joined #wesnoth-dev 20160313 13:40:35< vultraz> well then implement a temp map save 20160313 13:42:19< zookeeper> i fail to see what your point might be 20160313 13:43:22< vultraz> you should implement a temp save system that saves a temp copy of the map in a location when you do F5, and deletes it when you actually save the map 20160313 13:43:28< vultraz> or exit the editor 20160313 13:43:44< zookeeper> ... 20160313 13:44:12< zookeeper> do you seriously think that by "your point" i was asking for what you mean by a temp map save? :p 20160313 13:44:39< vultraz> well what else do you want me to say :| 20160313 13:44:55< vultraz> I mean that right now, saving the map is the best thing we have 20160313 13:45:11< vultraz> unless you DON'T save the map and instead pop up a warning that it will discard all your changes 20160313 13:45:14< zookeeper> clearly i didn't want you to say anything 20160313 13:45:19< zookeeper> i was describing a bug 20160313 13:45:25< zookeeper> or a problem, if you insist 20160313 13:46:15< zookeeper> well, i guess i would have liked you (or anyone) to say "i'll go and fix it right away!", but i wasn't expecting it 20160313 13:46:17< vultraz> then why did you ask what my point was 20160313 13:47:29< zookeeper> because it didn't make sense for you to tell me to implement something like that, so i offered you the benefit of the doubt in the form of asking for your point :> 20160313 13:47:55< vultraz> ..oh 20160313 13:47:57< vultraz> I see 20160313 13:47:59< vultraz> apologies 20160313 13:48:07< vultraz> I was simply saying that would be the optimal solution 20160313 13:48:14< zookeeper> well, yes, it would be 20160313 13:48:48< zookeeper> (or so i assume; i don't know) 20160313 13:49:09< irker296> wesnoth: Charles Dang wesnoth:master c486e4b04043 / src/gui/auxiliary/canvas.cpp: trectangle: fix draw rects sometimes being inaccurate (fixup a30a62787387) https://github.com/wesnoth/wesnoth/commit/c486e4b0404315a0a4c19e545a0084de4d7dcf56 20160313 13:49:14< vultraz> can you confirm that fixes the addon connect bar ^ 20160313 13:49:26< vultraz> I'll put the map thing on my mental list of Things To Do 20160313 13:51:59< zookeeper> a perfectly acceptable alternate fix would be to just prompt the user for each unsaved map, and if they want to save then handle the map as now, and if they don't, then just revert to original (opened map) or make it disappear (new map) 20160313 13:52:04< zookeeper> dunno if it'd be any easier, though. 20160313 13:54:05-!- louis94 [~~louis94@91.178.240.1] has quit [Ping timeout: 248 seconds] 20160313 13:54:43< zookeeper> stashing is so inconvenient, have to remember which files i should let notepad++ reload and which not 20160313 13:55:07< vultraz> but if you unstash n++ will just reload them again 20160313 13:56:05< zookeeper> that's the reload i was referring to, actually 20160313 13:57:52-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has joined #wesnoth-dev 20160313 14:00:59< zookeeper> anyway, compiling takes time again so i'll test it when i can. 20160313 14:01:27< vultraz> ok 20160313 14:08:40-!- ancestral [~ancestral@71-220-49-102.mpls.qwest.net] has joined #wesnoth-dev 20160313 14:10:17-!- Kwandulin [~Miranda@2003:76:f7d:7366:ddea:66a6:65d4:ef07] has joined #wesnoth-dev 20160313 14:18:49-!- ancestral [~ancestral@71-220-49-102.mpls.qwest.net] has quit [Quit: i go nstuf kthxbai] 20160313 14:20:08-!- louis94 [~~louis94@91.178.240.1] has joined #wesnoth-dev 20160313 14:34:36-!- Nobun [~nobun@host62-49-dynamic.12-79-r.retail.telecomitalia.it] has joined #wesnoth-dev 20160313 14:34:59< Nobun> can you remind me the link where I should report a bug? 20160313 14:37:30< vultraz> https://gna.org/bugs/?func=additem&group=wesnoth 20160313 14:46:59< irker296> wesnoth: Charles Dang wesnoth:master e656751938c1 / src/ (7 files in 2 dirs): Refactor out display class from storyscreen functions https://github.com/wesnoth/wesnoth/commit/e656751938c107aa89f9f25e8576dcdb477d34fe 20160313 14:52:33< Nobun> thank, vultraz 20160313 14:53:40< zookeeper> vultraz, yes, seems to fix it 20160313 14:53:46< vultraz> ah, good 20160313 15:07:58< irker296> wesnoth: Charles Dang wesnoth:master 02993cbaeb96 / src/ (9 files in 4 dirs): Removed empty resize_lock struct and resize_monitor class https://github.com/wesnoth/wesnoth/commit/02993cbaeb965a2b79c45c09126dfe08d9f0dbd7 20160313 15:20:57-!- louis94 [~~louis94@91.178.240.1] has quit [Ping timeout: 276 seconds] 20160313 15:24:16-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has quit [Quit: Connection closed for inactivity] 20160313 15:29:59-!- louis94 [~~louis94@91.178.240.1] has joined #wesnoth-dev 20160313 15:30:13< zookeeper> ah, looks like i defeated the inefficiency of the beach waves rules 20160313 15:36:55< celmin|sleep> [Mar 13@04:51:33am] Aginor: we should use the same colour format everywhere, and we should ensure it's compatible with what's in our images as are loaded, and we should be conistent with it's use. It should always include the alpha component 20160313 15:36:56< celmin|sleep> I still think it makes more sense to separate colour components from alpha in user-facing places, though. (This is, in fact, what's done currently in at least most places.) 20160313 15:38:05< celmin|sleep> Re: the map saving thing - I don't quite get why the maps have to be closed in the first place. I might look into it later. Probably after at least one of my current PRs is dealt with. 20160313 15:38:20< vultraz> Aginor: ok, cleanup done for now 20160313 15:38:26< vultraz> Aginor: do comment if I've done anything wrong 20160313 15:41:11< celmin|sleep> Re: showing attacks using multiplication - I have no particular objections to this as long as you use × rather than x or * 20160313 15:42:45< celmin|sleep> (And using / is not good, because that could mean division.) 20160313 15:44:27< celmin|sleep> Someone in that thread said they'd read "7×3" as meaning "7 strikes of 3 damage", which also makes sense to me, but they seem to intend it as an argument against it, whereas I don't see any problem with reversing the order of the info so that "7-3" becomes "3×7". 20160313 15:45:28 * celmin|sleep has no problem with 7 (3) either, or that one that someone else suggested, 7 (×3) 20160313 15:54:35-!- travis-ci [~travis-ci@ec2-54-226-42-114.compute-1.amazonaws.com] has joined #wesnoth-dev 20160313 15:54:36< travis-ci> wesnoth/wesnoth#8868 (master - 02993cb : Charles Dang): The build has errored. 20160313 15:54:36< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/115679934 20160313 15:54:37-!- travis-ci [~travis-ci@ec2-54-226-42-114.compute-1.amazonaws.com] has left #wesnoth-dev [] 20160313 15:56:51< celmin|sleep> No-one ever answered me when I asked if I should pin the wiki syntax highlighting announcement. 20160313 15:57:08< vultraz> uhhh 20160313 15:57:12< vultraz> why not 20160313 15:57:20< Nobun> imho it is better leaving 7-3 instead of replacing it with 7x3 20160313 15:58:02< celmin|sleep> Are there many units where the number of strikes is less than the damage per strike? 20160313 15:58:11< celmin|sleep> vultraz: ? 20160313 15:58:29< vultraz> uh... 20160313 15:58:31< celmin|sleep> Are you saying it should be pinned? 20160313 15:58:33< vultraz> almost all of them? 20160313 15:58:35< vultraz> and yes 20160313 15:58:40< Nobun> elvish thunderer.. xD 18-1 20160313 15:58:45< Nobun> dwarvish * 20160313 15:58:55< Nobun> one hit of 18 damage 20160313 15:58:58< celmin|sleep> Oh whoops, I asked my question backwards. 20160313 15:59:04< Nobun> lol 20160313 15:59:08< celmin|sleep> But "almost all" is a good answer, considering that. 20160313 15:59:26< Nobun> then it is the non-default craig (or what the name is... I don't tremember) 20160313 15:59:27< celmin|sleep> I wanted to know if there are any where the damage per strike is less than the number of strikes. 20160313 15:59:49< Nobun> the monster with tentacles wich lost hits more it is damaged 20160313 16:00:01< celmin|sleep> Cuttlefish? 20160313 16:00:03< Nobun> yep 20160313 16:00:09< Nobun> sorry I didn't remember the name xD 20160313 16:00:29< Nobun> it was something like 3-7 20160313 16:01:17< Nobun> (when full healthy) 20160313 16:01:35-!- celmin|sleep is now known as celticminstrel 20160313 16:01:41< vultraz> celmin|sleep: do you know if it'd be possible to make the hex cursor an actual cursor 20160313 16:01:53< celticminstrel> Hex cursor? 20160313 16:01:59< celticminstrel> What hex cursor? 20160313 16:02:13< vultraz> in-game, on the map 20160313 16:02:16< vultraz> the yellow hex 20160313 16:02:20< vultraz> you use to select things 20160313 16:02:24< celticminstrel> No matter how you look at it, that's not a cursor. 20160313 16:03:40< zookeeper> i'm actually probably in favor of switching to 7×3 or similar. switching the order is madness at this point, but changing - to × shouldn't confuse any existing players. 20160313 16:04:01< celticminstrel> zookeeper: Opinion on 7 (×3)? 20160313 16:04:13< zookeeper> looks too weird to me 20160313 16:04:19< celticminstrel> I see. 20160313 16:05:31< zookeeper> vultraz, what's an "actual cursor"? 20160313 16:06:09< celticminstrel> zookeeper: Probably means a system sursor, as opposed to simply drawing an image in the window at the mouse location. 20160313 16:07:22< vultraz> yes 20160313 16:07:24< vultraz> that 20160313 16:09:11< zookeeper> then i have no idea what you actually mean. we have both the normal cursor and the hex cursor. "can we make the hex cursor a system cursor?" doesn't seem to make any sense 20160313 16:09:56< vultraz> instead of having the hex draw on the hex under the cursor, make the hex a cursor when the mouse is in the gamemap 20160313 16:10:33< celticminstrel> That doesn't make any sense. 20160313 16:10:38< zookeeper> ^ 20160313 16:10:41< celticminstrel> The hex outline is not a cursor in any sense. 20160313 16:11:16< celticminstrel> It's no different from how buttons brighten when you move the mouse over them - it merely shows you an area of the screen that is considered "active" in some sense. 20160313 16:11:36< zookeeper> it'd be terrible if the hex cursor (or whatever you want to call it) was the actual cursor 20160313 16:11:41< celticminstrel> If it was a cursor, it would no longer outline any particular hex. 20160313 16:11:47< zookeeper> because you'd have no visual feedback whatsoever about what hex the "cursor" is over 20160313 16:11:51< celticminstrel> Thus completely defeating its purpose. 20160313 16:12:00< celticminstrel> And zookeeper just said the exact same thing in a different way. :) 20160313 16:12:47< vultraz> .... ah 20160313 16:12:58< vultraz> and it'd not be possible to keep it...only on the hex grid? 20160313 16:13:08< celticminstrel> That's ... not how cursors work. 20160313 16:13:46< zookeeper> if you mean "what if we just didn't draw the normal cursor?" then please say so, because that's now what it sounds like 20160313 16:13:57< celticminstrel> You give the system an image and a hotspot, and it draws that image such that the hotspot is always at the current mouse location. 20160313 16:18:09< vultraz> I guess zookeeper is right 20160313 16:18:44< vultraz> I had the idea as a way to make sure the hex cursor was always under the regular cursor 20160313 16:18:49< vultraz> I guess i'll have to do it differently 20160313 16:19:19< celticminstrel> Um. 20160313 16:19:34< zookeeper> how could you possible get the regular cursor under the hex cursor currently? 20160313 16:19:39< zookeeper> possibly, even 20160313 16:19:46< celticminstrel> When is the hex outline not under the regular cursor? 20160313 16:19:53< Nobun> zookeeper: one of the reason why I would suggest to don't switch from 7-3 to 7x3 is that the - sign is not only the subraction symbol, but it is also the symbol used to separate two words that are related 20160313 16:20:10< Nobun> for example: you could write: middle-side 20160313 16:20:13< vultraz> celticminstrel: if you scroll the map but don't move the mouse 20160313 16:20:23< vultraz> the hex cursor position is updated on mouse move events 20160313 16:20:32< celticminstrel> vultraz: Then update the code to move the hex outline when the map is scrolled. 20160313 16:20:41< irker296> wesnoth: Charles Dang wesnoth:master 2ffa1ffa8518 / src/gui/widgets/unit_preview_pane.cpp: tunit_preview_pane: use unicode multip sign instead of em dash for attack/strike https://github.com/wesnoth/wesnoth/commit/2ffa1ffa851849da40013f23d9a428a19cd1f718 20160313 16:20:53< vultraz> ^ so you guys can see it in production 20160313 16:20:55< Nobun> so, imho, using the symbol - is more intuitive than the symbol x 20160313 16:20:56< celticminstrel> Nobun: I'm not sure what you mean by "middle-side", but the - definitely does have several different uses/ 20160313 16:20:57< vultraz> and decide if you like it 20160313 16:21:04< Nobun> since 7-3 is not the same thing as 3-7 20160313 16:21:21< vultraz> celticminstrel: yes, I should 20160313 16:21:32< celticminstrel> Nobun does have a point in that - is not something that is normally commutative. 20160313 16:21:38< zookeeper> Nobun, only if it's intuitive to assume that the - means a separator 20160313 16:21:45< Nobun> celticminstrel: I don't know english so well to explain a very good example... but you got the point I was trying to explain 20160313 16:22:03< celticminstrel> Whereas × normally is commutative. 20160313 16:22:24< celticminstrel> vultraz: Wait, it was em dash? 20160313 16:22:31< zookeeper> Nobun, i bet the #1 assumption is that a - between two values means a range. now, that doesn't make sense when you got 7-3 (it would if you had 3-7), but that probably just adds to the confusion. 20160313 16:22:35< vultraz> either em or en 20160313 16:22:37< vultraz> I think 20160313 16:22:52< celticminstrel> Em dash is 7—3 20160313 16:22:59< celticminstrel> En dash is used for ranges, normally. 20160313 16:23:03< celticminstrel> 7–3 is en dash. 20160313 16:23:06-!- gfgtdf [~chatzilla@f054160176.adsl.alicedsl.de] has joined #wesnoth-dev 20160313 16:23:12< vultraz> ok, en then 20160313 16:23:14< gfgtdf> i actually wouldnt ssume that * is commutative 20160313 16:23:16< celticminstrel> So probably en dash then, yeah. 20160313 16:23:23< gfgtdf> assume* 20160313 16:23:25< celticminstrel> gfgtdf: Why not? 20160313 16:23:46< celticminstrel> zookeeper: I do think that's more likely than someone thinking it means subtraction. 20160313 16:23:54< gfgtdf> there are alot cases in math here multiplcation is not commutative. matrices is the easiest example but there are more 20160313 16:24:07< Nobun> zookeeper: you are right... but I always read the '-' symbol, in this case, as a separator symbol 20160313 16:24:10< celticminstrel> True, but those aren't the cases that the average person knows of. 20160313 16:24:20< zookeeper> celticminstrel, oh yeah, subtraction is a possibility too. 7 damage, with a -3 modifier from somewhere 20160313 16:24:41< Nobun> you could use the comma, but the comma would be confused as a list of values, wich is not so intuitive 20160313 16:25:54< Nobun> however the global idea is that the screen info that shows informations about hits and damage does not show a computation, but show a shortage of two values: one rappresenting damage, and one rappresenting hits 20160313 16:26:10< Nobun> the x sign can add confusion, imho 20160313 16:27:22< zookeeper> i guess it can. although if you hit on all strikes, the damage _is_ 7 times 3 :p 20160313 16:28:22< Nobun> yep... but the chance of having 100% damage is different if you swap values :P 20160313 16:28:29< zookeeper> maybe 7 x 1d4-1 :> 20160313 16:28:37< celticminstrel> What. 20160313 16:29:01< celticminstrel> Oh, I see what you did. 20160313 16:29:28-!- gfgtdf [~chatzilla@f054160176.adsl.alicedsl.de] has quit [Quit: ChatZilla 0.9.92 [Firefox 44.0.2/20160210153822]] 20160313 16:29:36 * Nobun switches DE (from unity to kde)... 20160313 16:29:44-!- Nobun [~nobun@host62-49-dynamic.12-79-r.retail.telecomitalia.it] has quit [Quit: Salve a tutti] 20160313 16:33:28< vultraz> how come there doesn't seem to be a function to get the currently mouse-overed hex :| 20160313 16:33:38< vultraz> there's just a last_hex_ variable set on mouse motion 20160313 16:33:41< vultraz> blagghhs 20160313 16:33:59< celticminstrel> Are you sure there isn't one? 20160313 16:34:05< vultraz> I'm looking 20160313 16:34:16< celticminstrel> I think I recall the Lua API having a function for it, but can't remember what it was called. 20160313 16:35:26< vultraz> you might be thinking of get_displayed_unit 20160313 16:36:32< celticminstrel> Maybe 20160313 16:36:39< vultraz> blagh, this is more than can be done without significant refactor 20160313 16:36:51< celticminstrel> I don't see why. 20160313 16:36:58< celticminstrel> You just said there's a last_hex_ variable. 20160313 16:37:06< vultraz> only updated on mouse motion 20160313 16:37:13< vultraz> as far as I can tell 20160313 16:37:19< celticminstrel> Then just update it on map scroll, too? 20160313 16:38:07-!- Nobun [~nobun@host62-49-dynamic.12-79-r.retail.telecomitalia.it] has joined #wesnoth-dev 20160313 16:38:21< vultraz> it's in the mouse_handler_base class 20160313 16:38:31< celticminstrel> Ah. 20160313 16:38:49< vultraz> now you see 20160313 16:38:53< celticminstrel> So you probably want to move it to something like the display class. 20160313 16:38:57< celticminstrel> Thus... refactor. 20160313 16:39:05< celticminstrel> game_display class. 20160313 16:39:20< celticminstrel> Whatever the class is called that controls the theme UI and the game map. 20160313 16:39:36< vultraz> there;s game_display::draw_hex 20160313 16:39:40< vultraz> display::draw_hex 20160313 16:40:36< vultraz> display has mouseoverHex_ 20160313 16:40:43< vultraz> which is set in highlight_hex 20160313 16:40:46< celticminstrel> Maybe that's what you want. 20160313 16:40:58< vultraz> which is virtual 20160313 16:41:15< vultraz> AND there's game_display::highlight_hex 20160313 16:41:26< vultraz> which calls display::higlight_hex 20160313 16:41:29< vultraz> none of this makes sene 20160313 16:41:31< vultraz> sense 20160313 16:41:52< celticminstrel> Does game_display inherit from display? 20160313 16:42:18< vultraz> yes 20160313 16:42:20< celticminstrel> When you call a virtual function qualified by its containing class, you are making a non-virtual call. 20160313 16:43:13< celticminstrel> So when game_display::highlight_hex calls display::highlight_hex, it's directly calling the superclass version of the function. 20160313 16:43:33< celticminstrel> I think you can also do this in dot notation, like disp.display::highlight_hex, but I doubt that's done very often. 20160313 16:43:55< vultraz> I see 20160313 16:44:05< celticminstrel> (You might see it with arrow notation more frequently - this->display::highlight_hex) 20160313 16:44:11< vultraz> looks like lua's highlight_hex calls the game_display version... 20160313 16:44:31< vultraz> guess that's where you need to go to fix that message highlight thing... 20160313 16:44:54< vultraz> blah, I'll work on this some other time 20160313 16:44:59< vultraz> I've done enough 20160313 16:45:05< celticminstrel> The message highlight thing comes from Lua's hex highlighting API being too coarse-grained. 20160313 16:45:12< celticminstrel> Or something like that. 20160313 16:45:54< vultraz> it really does need to be fixed 20160313 16:46:08< celticminstrel> What was the expected behaviour exactly? 20160313 16:46:25< celticminstrel> Hex is outlined, but movement not shown? Or is there something else too? 20160313 16:51:53-!- travis-ci [~travis-ci@ec2-54-226-42-114.compute-1.amazonaws.com] has joined #wesnoth-dev 20160313 16:51:54< travis-ci> wesnoth/wesnoth#8869 (master - 2ffa1ff : Charles Dang): The build passed. 20160313 16:51:54< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/115688773 20160313 16:51:54-!- travis-ci [~travis-ci@ec2-54-226-42-114.compute-1.amazonaws.com] has left #wesnoth-dev [] 20160313 16:57:12< mattsc> celticminstrel: I’ve had a first quick look at PR 615. It’s rather impressive! Which is also the problem for me currently. 20160313 16:57:14< mattsc> If you want me to test out everything that’s new and changed, that’s going to take forever (in elapsed calendar time, because my schedule’s not exactly relaxed at the moment). 20160313 16:57:45< celticminstrel> Oh hi. 20160313 16:58:05< celticminstrel> I'm actually working on unit tests right now, mainly for config parsing and [modify_ai]. 20160313 16:58:14< mattsc> What I can do relatively quickly, I think, is check whether the Micro AIs still work and test maybe a few of the (for me) more releavant changes. 20160313 16:58:26< celticminstrel> I haven't gotten around to testing the Micro AIs, so that would be good. 20160313 16:59:40 * celticminstrel is curious which changes you refer to. 20160313 16:59:57< celticminstrel> Should also test that whole "simple aspects don't work with Lua" thing. 20160313 17:00:05< celticminstrel> I don't quite understand it. 20160313 17:00:23< celticminstrel> So I'm not quite sure how to test for it. 20160313 17:00:44< mattsc> None specifically yet. But I am sure that, as I work my way through, there’ll be some things where I’ll think “cool, I want to test that that really works”. or something. 20160313 17:00:51< celticminstrel> Ah. 20160313 17:01:26< mattsc> Yes, that (simple aspects plus Lua engine) is one that I expect I want to check out. 20160313 17:02:56< celticminstrel> I took a look at the Experimental AI page yesterday but couldn't find anything that needed fixing, by the way. 20160313 17:02:56< mattsc> Anyways, I am pretty much booked out with other (RL) stuff today, with a busy week ahead, but I’ll try to fit in a bit of testing here and there as I have time. 20160313 17:03:11< mattsc> Cool, thanks. 20160313 17:03:18< celticminstrel> I also applied syntax highlighting to some pages. 20160313 17:03:24-!- fendrin [~quassel@176.2.102.80] has joined #wesnoth-dev 20160313 17:03:43-!- fendrin [~quassel@176.2.102.80] has quit [Changing host] 20160313 17:03:43-!- fendrin [~quassel@wesnoth/developer/fendrin] has joined #wesnoth-dev 20160313 17:03:48< mattsc> Nice. I saw your post on that, but haven’t checked out how it looks yet. 20160313 17:04:13-!- fabi [~quassel@wesnoth/developer/fendrin] has quit [Read error: Connection reset by peer] 20160313 17:04:17< celticminstrel> It could probably use some style tweaks, but I think it looks pretty good. 20160313 17:04:42< mattsc> Anyways, if there’s something specific you want to check me, let me know. Otherwise I’ll just pick and choose as I see fit. 20160313 17:04:54< celticminstrel> If I think of something, I'll let you know/ 20160313 17:04:55< mattsc> *want me to check 20160313 17:05:19< mattsc> sounds good then 20160313 17:05:27< mattsc> I’ll be off again soon 20160313 17:06:21< mattsc> Signed off, I mean. I might not have to travel again until early April. ;) 20160313 17:12:57-!- mattsc [~mattsc@wesnoth/developer/mattsc] has quit [Quit: So long and thanks for all the fish.] 20160313 17:27:37-!- prkc [~prkc@563BD958.dsl.pool.telekom.hu] has quit [Remote host closed the connection] 20160313 17:39:58< Nobun> celticminstrel: can you show a link of a testing page using your highlighter? 20160313 17:40:10< Nobun> if you have a public one 20160313 17:40:30< celticminstrel> http://celmin.pwcsite.com/wesnoth/test.html 20160313 17:40:37< celticminstrel> You can also see it at work on the wiki now. 20160313 17:40:39< vultraz> [03:46:24] celticminstrel Hex is outlined, but movement not shown? <- yes 20160313 17:40:50< vultraz> and unit is brightened 20160313 17:40:54< celticminstrel> Start from Special:RecentChanges 20160313 17:41:18< celticminstrel> vultraz: Brightened means selected, as if you'd clicked it, right? 20160313 17:41:49< vultraz> yes 20160313 17:41:50< Nobun> I will check on wiki, than... the test page retursn error 404 20160313 17:41:55< vultraz> but no movement reach shown 20160313 17:42:06< celticminstrel> http://celmin.pwcsite.com/wesnoth/ 20160313 17:42:18< celticminstrel> The filename must be different. 20160313 17:42:33< celticminstrel> Oh yeah, I think it was test_syntax.html 20160313 17:42:56< celticminstrel> Wiki has different (probably overall better) colour scheme. 20160313 17:43:20< celticminstrel> But I think my colouring scheme better distinguishes all possible categories. 20160313 17:44:46< Nobun> some suggestions, celticminstrel: 20160313 17:45:13< Nobun> 1) blue color is used too much, it can be disturbing 20160313 17:45:26< Nobun> I suggest, for example, to mark tags with bold black 20160313 17:45:32< Nobun> instead of blue 20160313 17:45:47< Nobun> and leave the key assignment blue like you already did 20160313 17:46:56< celticminstrel> Suggestions related to my own colour scheme are less productive than ones related to the wiki's colour scheme... but thanks anyway... 20160313 17:49:18< Nobun> sorry then... the only contribute I could do is suggestions about colors, since I am a person who can figure the "problems" around the colors usage (since I feel bad when some kind of light is used or color combination is used) 20160313 17:49:51-!- ancestral [~ancestral@63.92.240.233] has joined #wesnoth-dev 20160313 17:51:05< Nobun> (for example I would never been able to stay in a discotheche with their "crazy color light" thing (don't know english name... their called "luci stroboscopiche" in italian) 20160313 17:51:24< shadowm> Strobe lights. 20160313 17:51:30< Nobun> thank, shadowm :) 20160313 17:55:00< Nobun> however, celticminstrel, if you are interested I will report you what colors I would suggest (but I have to think on it a bit) 20160313 17:55:11< Nobun> but don't want to trouble you :P 20160313 17:55:20-!- ancestral [~ancestral@63.92.240.233] has quit [Quit: i go nstuf kthxbai] 20160313 17:58:30< celticminstrel> Nobun: https://github.com/CelticMinstrel/wml-pygments 20160313 17:58:48< celticminstrel> Nobun: Click wesnoth.py; near the top is a list of all the categories that can be coloured. 20160313 17:59:07< celticminstrel> (Probably a bad way of doing it, but whatever.) 20160313 17:59:26< shadowm> Ugh, the alternative tag is messing up wiki.wesnoth.org/PreprocessorRef. 20160313 17:59:43< celticminstrel> Eh? 20160313 17:59:51< shadowm> Look at the last section. 20160313 17:59:59< shadowm> is synonym with . 20160313 18:00:28< shadowm> Everything goes south after the point "" comes up in the text. 20160313 18:00:46< celticminstrel> 20160313 18:01:14< shadowm> Yeah, but that means editing the page... 20160313 18:02:22< celticminstrel> And that's a problem? 20160313 18:02:27< shadowm> Meh. 20160313 18:02:46< shadowm> Yes, it's a problem because I rather doubt that's the only affected page. 20160313 18:02:50< celticminstrel> Ah. 20160313 18:02:51< Nobun> celticminstrel: I will fork the repo and I will take a look at it... trying to figure how it works :) 20160313 18:03:24< celticminstrel> Nobun: Keep in mind that the colours specifically listed there are not the colours used on the wiki. 20160313 18:03:32< shadowm> celticminstrel: How do I list pages in a specific category? 20160313 18:03:49< celticminstrel> So, while I don't mind accepting changes to them, it's more useful to propose changes to wesnoth/glamdrol 20160313 18:03:57< celticminstrel> shadowm: Simply link to the category. 20160313 18:04:23< shadowm> Let me rephrase: why can't I see the list of pages in the syntax highlight category linked at the bottom of the same aforementioned page? 20160313 18:05:01< shadowm> Do I really have to create the category page to make it work? Because that's stupid. 20160313 18:07:04< shadowm> "This category currently contains no pages or media." 20160313 18:07:09< shadowm> Well eff you too MediaWiki. 20160313 18:07:17< celticminstrel> I don't think it's necessary to create the page... 20160313 18:09:11< celticminstrel> Category lists may not be updated immediately if you add a new page to them. 20160313 18:09:51< shadowm> I suspect it's more like the fact that no _person_ added the page to the category. 20160313 18:10:07< celticminstrel> I dunno. 20160313 18:10:16< shadowm> (As opposed to the SyntaxHighlight extension doing it in some flimsy abstract way.) 20160313 18:10:30< shadowm> (The page was last edited _before_ the extension was installed, that's what I mean.) 20160313 18:10:45< celticminstrel> Yeah, maybe that's a factor. 20160313 18:11:13< celticminstrel> I tried action=purge on the category page, to no effect. 20160313 18:11:32< celticminstrel> Then I did it on the PreprocessorRef page, but it had already been fixed, so that doesn't really do anything. 20160313 18:12:10< shadowm> What's that do? 20160313 18:12:14< celticminstrel> If there's a way to completely clear any caches, that might cause the category to work (assuming there are, in fact, other pages with that kind of issue). 20160313 18:12:17-!- Nobun [~nobun@host62-49-dynamic.12-79-r.retail.telecomitalia.it] has quit [Quit: Salve a tutti] 20160313 18:12:34< celticminstrel> As I recall, action=purge forces MediaWiki to regenerate the page... something like that. 20160313 18:12:58< shadowm> Is that a cheat code of some sort or is that actually exposed in the UI? 20160313 18:13:03< celticminstrel> Can be useful when working with templates, for example. 20160313 18:13:41< celticminstrel> It's not exposed to the UI by default. Easiest way to get it is probably to click Edit at the top of the page, then change "edit" to "purge" in the resulting URL. 20160313 18:13:55< shadowm> Then why does it exist? 20160313 18:14:00< celticminstrel> I forget. 20160313 18:14:05< shadowm> I'm not a fan of secret query options. 20160313 18:14:21< celticminstrel> https://www.mediawiki.org/wiki/Manual:Purge 20160313 18:14:21< shadowm> (Yes, I am aware you're not a MW dev.) 20160313 18:14:38< celticminstrel> I think there are extensions that expose it in the UI. 20160313 18:14:41< shadowm> :| 20160313 18:14:50< celticminstrel> Maybe built-in options, even, I dunno. 20160313 18:15:28< celticminstrel> Ah, looks like purge has no effect on category pages. 20160313 18:15:50 * shadowm shakes hand and screams at the top of his lungs: "MEDIAWIKIIIIIIIIIIIIII!!!!" 20160313 18:16:31< shadowm> If they hid it to prevent abuse then it's as good as hanging a sign that reads "please don't DDoS us". 20160313 18:17:25< shadowm> "Anonymous users making purge requests via a query string will be presented with a confirmation form." -- Okay, then why is it hidden at all?? 20160313 18:18:08< celticminstrel> No idea. 20160313 18:18:41< shadowm> This software is full of absurdities ranging from the minor and petty like this, and the colossal like the fact that the release team can't make incremental upgrade patches in a consistent fashion. 20160313 18:18:48< celticminstrel> https://www.mediawiki.org/wiki/Manual:Cache 20160313 18:19:12< celticminstrel> Maybe you can force the category page to update by disabling and re-enabling caching. On the other hand, I don't know if that'll actually clear the cache. 20160313 18:20:05< celticminstrel> https://www.mediawiki.org/wiki/Manual:FAQ#How_do_I_purge_a_cached_page.3F 20160313 18:20:35< celticminstrel> That's the last of my ideas. 20160313 18:21:12< celticminstrel> One absurdity about MediaWiki is how you write ''italics'' and '''bold''. 20160313 18:21:32< shadowm> Here's another absurdity: I want to search for " Okay, so there are 310 occurrences of "source" it will show me, and one of them is the "<source" edit I just made. 20160313 18:28:13< shadowm> I couldn't find " Unless, of course, it comes up after the first "source" in any of the listed pages. 20160313 18:29:39< shadowm> (Yes, I did look up the code in charge of this: foreach ( array( 'source', 'syntaxhighlight' ) as $tag ) { $parser->setHook( $tag, array( 'SyntaxHighlight_GeSHi', 'parserHook' ) ); } 20160313 18:30:10< shadowm> I'm not going to change it because that means 1) nonstandard behavior; 2) potential issues when applying future upgrade patches. ) 20160313 18:36:56< shadowm> celticminstrel: Why is [event] highlighted differently here? https://wiki.wesnoth.org/SyntaxWML 20160313 18:37:10< shadowm> * https://wiki.wesnoth.org/SyntaxWML#Variable_Substitution 20160313 18:38:39< celticminstrel> Because I thought [event] tags are important enough to be coloured differently. (I did the same for animation tags and for [insert_tag].) 20160313 18:39:18< shadowm> Uh. 20160313 18:39:43< Ravana_> it should highlight $variables differently 20160313 18:39:47< celticminstrel> I guess highlighting them as a "function" was not the best choice though. 20160313 18:39:54< celticminstrel> Eh? It's supposed to. 20160313 18:39:58< shadowm> Not [lua]? 20160313 18:40:39< shadowm> [lua] and [event] are both special in the sense that they have superpowers that allow for manipulating the gamestate, IMO. 20160313 18:40:48< celticminstrel> Ravana_: The capacity for highlighting variables differently is there already, they just don't have a unique colour assigned right now. 20160313 18:41:02< celticminstrel> Actually, I changed the class on variables from sd to ... I think si. 20160313 18:41:54< celticminstrel> The other class I changed recently is macro file substitutions, which are now cpf 20160313 18:41:58< shadowm> 18:41:23 wesnoth@website:~/git/wml-pygments$ git pull 20160313 18:42:07< shadowm> Updating 512503a..cedd4b0 20160313 18:42:22< shadowm> I suspect you mean the "Some minor reshuffling of token choices" commit in the log. 20160313 18:42:30< celticminstrel> Yes. 20160313 18:43:02< celticminstrel> My choices work as long as you're only going to highlight WML. 20160313 18:43:37< shadowm> Well, there, I purged SyntaxWML so it uses the latest schema. 20160313 18:43:41< celticminstrel> But it's also important to ensure that I use token categories somewhat similarly to other languages. 20160313 18:44:03< celticminstrel> Ah, si already had assigned style, nice. 20160313 18:44:20< celticminstrel> I think si was in fact intended for string interpolations. 20160313 18:44:36< celticminstrel> But in the code it was called "String.Interpol", so I didn't immediately make the connection, I guess. 20160313 18:45:18-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has joined #wesnoth-dev 20160313 18:45:52< celticminstrel> I may change the category for [event] too. It should probably be bolded like the other tags, right? Unless you'd prefer to debold the other tags. 20160313 18:46:55< celticminstrel> Some people who don't understand wikilinks keep using external link syntax to link to internal pages... 20160313 18:47:33< shadowm> Emboldening [event] like the rest would be good, yes. 20160313 18:47:56< celticminstrel> I might actually define some new categories that are subsets of "Name.Tag". 20160313 18:48:25 * shadowm has found and fixed a fair share of external wiki links over the years too. 20160313 18:53:04-!- louis94 [~~louis94@91.178.240.1] has quit [Ping timeout: 260 seconds] 20160313 18:53:10< celticminstrel> Do you know where in MW the highlighting style classes are defined? 20160313 19:11:59< vultraz> celticminstrel: I might try updating the lua lib to 5.3.2 sometime soon 20160313 19:12:33< vultraz> there's a PR open for 5.3.1 but I never got around to readding the jailbreak stuff... so I might as well do it over for the newest version 20160313 19:13:13-!- fendrin [~quassel@wesnoth/developer/fendrin] has quit [Ping timeout: 240 seconds] 20160313 19:13:52< vultraz> just need to remember the proper way to go about it... 20160313 19:14:04-!- fabi [~quassel@wesnoth/developer/fendrin] has joined #wesnoth-dev 20160313 19:20:52-!- irker296 [~irker@uruz.ai0867.net] has quit [Quit: transmission timeout] 20160313 19:21:59< celticminstrel> vultraz: I think I mentioned this before, but I suggest adding unmodded Lua 5.3.whatever in one commit, then having one or more additional commits that reapply any mods or configuration settings. 20160313 19:22:23< vultraz> Probably a good idea 20160313 19:22:34< vultraz> Would be useful if there were a list of such relevant changes... 20160313 19:22:47< celticminstrel> For example, cherry-pick any older commits that modified files in the lua/ directory. 20160313 19:22:54< celticminstrel> vultraz: Try git log src/lua 20160313 19:23:32< celticminstrel> I dunno if there are older "update version" commits; if so, you can obviously ignore anything prior to that. 20160313 19:23:43< shadowm> Commit 471ef92f115eba9da9a77daf5051e206d857f9b3 . 20160313 19:24:35< vultraz> 9 commits in the directory since then 20160313 19:25:39< shadowm> What I did was to create a separate repository with the vanilla version of Lua we were using at the time, then commit the new version, take the diff between both commits, change file paths accordingly (.c vs .cpp) and apply that diff on ours. 20160313 19:26:26< celticminstrel> Like, a clone of the Lua repo at some specific tag? 20160313 19:26:27< shadowm> That makes the history more linear than what celmin is suggesting. 20160313 19:26:38< shadowm> There is a Git repository for Lua? 20160313 19:26:43< celticminstrel> I have no clue. 20160313 19:27:02< shadowm> I stated what I did in plain words, so there is no room for ambiguities. 20160313 19:27:17< celticminstrel> Oh, wait, I see, you're saying "take the diff between Lua 5.2.whatever and 5.3.whatever" and the apply that diff to the repo. 20160313 19:27:25< vultraz> there's this https://github.com/lua/lua 20160313 19:27:25< shadowm> Yes. 20160313 19:27:33< fabi> Why update to lua 5.3? 20160313 19:27:45< celticminstrel> fabi: Is there an argument against it? 20160313 19:27:49< fabi> no 20160313 19:27:55< fabi> there is just not much benefit 20160313 19:27:58-!- louis94 [~~louis94@91.178.240.1] has joined #wesnoth-dev 20160313 19:28:02< fabi> 5.2.4 is pretty stable 20160313 19:28:13< shadowm> vultraz wants to see bigger numbers. 20160313 19:28:15< fabi> and there is not much added in 5.3 20160313 19:28:33< fabi> 5.3 supports integer vs real 20160313 19:28:45< fabi> while 5.2 only knows about the more general number 20160313 19:28:53< celticminstrel> Wait, why? 20160313 19:29:04< celticminstrel> Isn't that a step backwards? 20160313 19:29:12< fabi> yeah 20160313 19:29:22< fabi> well, not all people are happy with that step 20160313 19:29:40< fabi> 5.1 -> 5.2 was the bigger step 20160313 19:30:29< fabi> Lua 5.3's type() function still only returns "number". 20160313 19:30:45< fabi> So it can't even be used for proper type checking... 20160313 19:30:47-!- ancestral [~ancestral@209.181.254.220] has joined #wesnoth-dev 20160313 19:30:49< celticminstrel> Ah, so it's an invisible change from the Lua side? 20160313 19:31:10< celticminstrel> Sort of like storing numbers as a tagged union of int/double? 20160313 19:32:31< celticminstrel> That's not so bad then, though I thought IEEE floats were already able to represent most integers exactly, so it might be a little pointless... 20160313 19:32:57< fabi> yeah 20160313 19:32:59< vultraz> t'is a huge patch 20160313 19:33:10< fabi> Most stuff 5.3 brought is not that useful for Wesnoth. 20160313 19:33:23< vultraz> I like big numbers 20160313 19:33:32< fabi> :-) 20160313 19:33:53< celticminstrel> What else is new in 5.3? 20160313 19:34:14< fabi> Main changes 20160313 19:34:14< fabi> integers (64-bit by default) 20160313 19:34:14< fabi> official support for 32-bit numbers 20160313 19:34:14< fabi> bitwise operators 20160313 19:34:14< fabi> basic utf-8 support 20160313 19:34:14< fabi> functions for packing and unpacking values 20160313 19:34:28< vultraz> ah, I only need the diff of src/ 20160313 19:34:40< fabi> basic utf-8 support might be a point 20160313 19:35:07< vultraz> now to figure out how to change all the file paths to .cpp 20160313 19:35:27< shadowm> sed somn 20160313 19:35:39< shadowm> *sed something something foobar.diff 20160313 19:35:45< celticminstrel> fabi: Does it add << and >> operators? 20160313 19:35:54< celticminstrel> Because, that would actually be a (minor) problem for Wesnoth. 20160313 19:36:08< vultraz> I actually have sed o_O 20160313 19:36:12< vultraz> I'm amazed 20160313 19:36:25< celticminstrel> vultraz: You have MinGW, right? It probably includes it. 20160313 19:36:26< shadowm> Dude, you are using mingw, what do you expect? 20160313 19:36:52< fabi> celticminstrel: I use the bit32 library for bitwise operators 20160313 19:36:56< shadowm> No self-respecting pseudo-POSIX environment would be complete without sed. 20160313 19:37:32< celticminstrel> fabi: Specifically, anyone trying to use a >> operator in inline (or macro-included) Lua code would find probably themselves with WML error when the rest of the code after the operator is taken as WML instead of Lua. 20160313 19:38:16< celticminstrel> Also, how do you even define the bitwise operators in this case? Python's bitwise operators behave weirdly, for example, because it's infinite precision. 20160313 19:38:30< vultraz> ok, so... probably something like: sed -r "src/*.c" "src/*.cpp" 532.patch 20160313 19:38:38< shadowm> No, vultraz. 20160313 19:38:54< shadowm> (Someone help him.) 20160313 19:38:55< vultraz> blah. *googles* 20160313 19:39:27< fabi> celticminstrel: It seems ">>" is not a inbuild operator in 5.3. Just tested it. 20160313 19:39:38< celticminstrel> fabi: Alright then. 20160313 19:39:50< celticminstrel> ...come to think of it, I think my REPL is also 5.3. 20160313 19:40:12< celticminstrel> Yup, 5.3.1 to be specific. 20160313 19:40:13< fabi> http://www.lua.org/manual/5.3/manual.html#8 A list of compatability issues between 5.3 and older 20160313 19:40:47< vultraz> or is it... the s// thing? 20160313 19:41:01< shadowm> vultraz: Actually, I just renamed the files in the repository for both versions. 20160313 19:42:38< fabi> celticminstrel: Sorry, the manual says that "<<" and ">>" are operators in Lua 5.3.x. "All bitwise operations convert its operands to integers (see §3.4.3), operate on all bits of those integers, and result in an integer." 20160313 19:43:01-!- ancestral [~ancestral@209.181.254.220] has quit [Ping timeout: 268 seconds] 20160313 19:44:52< celticminstrel> fabi: So does that mean they treat all integers as 64-bit two's complement? 20160313 19:46:14< fabi> Well, at cpu level they are for sure two's complement 20160313 19:46:56< fabi> Since lua tries to be fast as hell, I guess they don't have a different internal representation. 20160313 19:47:27< celticminstrel> The thing is that, with bitwise operators, you need to know the bit size. 20160313 19:47:44< vultraz> blagh, still not working 20160313 19:48:56< vultraz> "sed 's/.c/.cpp/g' 532.patch" just keeps printing the contents of the file to console for some reason 20160313 19:52:20< vultraz> celticminstrel: insight? 20160313 19:52:34< celticminstrel> Uh vultraz, sed changes the content of files, not their name. 20160313 19:52:45< vultraz> right 20160313 19:52:49< vultraz> I have a patch file 20160313 19:52:52< vultraz> referencing .c files 20160313 19:53:02< vultraz> I want to make it reference .cpp files so I can apply the patch to src/lua 20160313 19:53:09< celticminstrel> Ohh. 20160313 19:53:47< vultraz> I did "git diff 5.2.3 5.3.2 src > 532.patch" 20160313 19:54:45< vultraz> then I tried "sed 's/.c/.cpp/g' 532.patch" but nothing happens to the file :| 20160313 19:55:12< celticminstrel> Well, you want a backslash before the dots, but your actual problem is not using the -i flag. 20160313 19:55:17< celticminstrel> -i means "in-place". 20160313 19:55:27< vultraz> a backslash before the dots? 20160313 19:55:41< celticminstrel> Yes. 20160313 19:56:05< vultraz> sed -i 's/\.c/\.cpp/g/' 532.patch ? 20160313 19:56:08< celticminstrel> s/.c/.cpp/ will replace any character that is followed by a lowercase C with the string ".cpp". 20160313 19:56:22< celticminstrel> -i takes a parameter 20160313 19:56:43< vultraz> what is that parameter 20160313 19:56:52< celticminstrel> A backup extension. 20160313 19:57:02< vultraz> a what now? 20160313 19:57:29< celticminstrel> eg, -i "~" means that it'll move the file to 532.patch~, apply the changes, and save as 352.patch. If you do -i "" it won't save a backup. 20160313 19:57:31< fabi> I recommend to update from 5.2.3 to 5.2.4 20160313 19:57:51< fabi> and to avoid 5.3 for some time 20160313 19:58:03< vultraz> ahh, that works 20160313 19:58:34< celticminstrel> I dunno, the introduction of ints in 5.3 is looking like a bad idea again. 20160313 19:58:56< celticminstrel> "some computations (mainly those that involve some kind of overflow) can give different results" 20160313 19:59:05< vultraz> you'd guys rather I just did 5.2.4? 20160313 19:59:05< fabi> ye 20160313 19:59:05< fabi> s 20160313 19:59:12< celticminstrel> I suppose you should be avoiding those computations anyway, but... 20160313 19:59:28< fabi> 5.2.4 is stable 20160313 19:59:56< fabi> and not much different to current lua 20160313 20:00:05< fabi> current == the version already in wesnoth 20160313 20:00:17< celticminstrel> "The ipairs iterator now respects metamethods and its __ipairs metamethod has been deprecated" 20160313 20:00:19< celticminstrel> Wait what. 20160313 20:00:35< celticminstrel> We currently use the __ipairs metamethod for vconfigs, is that going to break? 20160313 20:00:52< fabi> Sounds like it could. 20160313 20:01:05-!- ancestral [~ancestral@63.92.240.233] has joined #wesnoth-dev 20160313 20:01:11< celticminstrel> Not until 5.4 probably, but still. 20160313 20:01:30< celticminstrel> "For good programming, use floats where you need floats and integers where you need integers" 20160313 20:01:42< fabi> :-) 20160313 20:01:45< celticminstrel> How is that better than not having to worry about whether it's an int or a float? 20160313 20:02:00< celticminstrel> Well, at least you don't need to worry for division, seemingly... 20160313 20:02:15< celticminstrel> So that's a plus. 20160313 20:03:18< celticminstrel> We didn't use continuation functions as far as I know, so that change doesn't affect us... 20160313 20:04:08< fabi> I have read a discussion in which the participants were much more pesimistic regarding compatibility issues between 5.2 and 5.3. 20160313 20:04:20< fabi> But I fail to dig it up again :-( 20160313 20:04:38< fabi> much more psimistic than the lua 5.3 reference manual 20160313 20:04:52< fabi> "psimistic" cool new word 20160313 20:05:02< celticminstrel> Why did they remove the hyperbolic trig functions? I mean, I never use them so I don't really care that much, but they're in the C library anyway, so as far as I know it costs nothing to leave them in. 20160313 20:05:09< celticminstrel> ^pessimistic 20160313 20:05:32-!- ancestral [~ancestral@63.92.240.233] has quit [Ping timeout: 250 seconds] 20160313 20:07:28< celticminstrel> Where can I find a changelog rather than an incompatibility list? 20160313 20:08:32< vultraz> gahh 20160313 20:08:38< celticminstrel> Oh, I remember why Python's ~ behaves weirdly. I think people using ~ often expect an unsigneed result rather than a signed result. 20160313 20:08:44< vultraz> git apply y u no apply 20160313 20:09:03< celticminstrel> ^unsigned 20160313 20:09:41< fabi> celticminstrel: http://www.lua.org/manual/5.3/readme.html#changes 20160313 20:11:50< celticminstrel> Not very detailed, but alright. 20160313 20:12:00-!- louis94 [~~louis94@91.178.240.1] has quit [Ping timeout: 268 seconds] 20160313 20:12:05< celticminstrel> What's this uservalue thing? 20160313 20:12:46< celticminstrel> Floor division? :| 20160313 20:12:54< celticminstrel> I think that's pointless. 20160313 20:12:57< fabi> objects that are held by the c++ host 20160313 20:13:11< celticminstrel> No I mean this: "userdata can have any Lua value as uservalue" 20160313 20:17:05< vultraz> GAHH 20160313 20:17:24< vultraz> git I just want you to apply the differences don't give me bs about hashes 20160313 20:19:00< fabi> celticminstrel: I guess that means that values of type "thread" can now be uservalues. 20160313 20:19:27< vultraz> why is such a trivial operation so complicated 20160313 20:19:57< fabi> vultraz: What are you doing? 20160313 20:21:26< vultraz> I was trying a simple bump to 5.2.4 20160313 20:21:38< vultraz> generated the diff, changed the reference paths, but it still says it can't apply 20160313 20:21:39< vultraz> blagh 20160313 20:22:08< celticminstrel> fabi: I don't understand what this uservalue thing is in the first place. 20160313 20:23:03< celticminstrel> Seems to be something used by the debug library... 20160313 20:23:34< vultraz> I'll deal with this later 20160313 20:23:48< vultraz> I have to say, I greatly admire anyone who managed to do this 20160313 20:23:58< celticminstrel> Hang on, why is ~ used for bitwise XOR? That feels weird. 20160313 20:24:27< fabi> You know about userdata but uservalue is new to you? 20160313 20:24:33< celticminstrel> Yeah. 20160313 20:27:54< fabi> I have not worked with userdata yet since my application is not using a host yet. 20160313 20:28:17< celticminstrel> The description of the add metamethod sounds slightly suspicious. 20160313 20:28:20< fabi> Meaning I just have lua files that are executed by the standalone lua interpreter. 20160313 20:28:36< celticminstrel> What actually happen when the left operand lacks a metamethod but the right operand does have one? 20160313 20:29:04< celticminstrel> Does it call rhs.__add(lhs, rhs), or rhs.__add(rhs, lhs)? 20160313 20:29:07< celticminstrel> ^happens 20160313 20:29:39< celticminstrel> I think both ways are wrong though. 20160313 20:30:18< celticminstrel> In the former case, the __add metamethod cannot assume that the first argument (self) is of the proper type. In the second case, commutativity is enforced. 20160313 20:30:40< celticminstrel> Although this only matters if the lhs is a number and the rhs is not, so maybe it works out... 20160313 20:31:13 * celticminstrel isn't sure if there's any case where n * something is different from something * n where n is a number; can't think of anything though. 20160313 20:32:50< fabi> operator overloading only works if both objects share the same method 20160313 20:33:42< celticminstrel> That's not right either. 20160313 20:33:51< fabi> No? 20160313 20:34:24< celticminstrel> Wait, by "same metamethod" do you mean "both have an __add" or "both have the same __add"? 20160313 20:34:40< fabi> both have the same __add 20160313 20:34:51< celticminstrel> Yeah, that's wrong. 20160313 20:35:38< celticminstrel> Things like "number * vector" or "vector * matrix" are valid operations between differing types. (And I think Lua does actually account for that, contrary to what you're saying.) 20160313 20:37:53< fabi> "To choose a metamethod, Lua does the following: (1) If the first value has a metatable with an __add field, Lua uses this value as the metamethod, independently of the second value; (2) otherwise, if the second value has a metatable with an __add field, Lua uses this value as the metamethod; (3) otherwise, Lua raises an error. " 20160313 20:38:09< celticminstrel> Right. 20160313 20:38:48< celticminstrel> But case 2 is a little vague on what happens. 20160313 20:40:31< celticminstrel> Python handles this by having a separate metamethod (__radd__) for that case. 20160313 20:47:00< celticminstrel> Incidentally, I'm pretty sure "vector * matrix" and "matrix * vector" should produce different results (assuming all dimensions are compatible). 20160313 20:48:02< celticminstrel> ...anyway, this is not very relevant to Wesnoth, sorry. >_> 20160313 20:48:38 * celticminstrel really wants to know exactly which metamethods ipairs() now honours, though. 20160313 20:49:33< celticminstrel> Maybe __index and __len? 20160313 20:52:46-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has quit [Ping timeout: 250 seconds] 20160313 20:53:25-!- daMark [5cd3e742@gateway/web/freenode/ip.92.211.231.66] has joined #wesnoth-dev 20160313 20:56:40< celticminstrel> The list of metamethods is missing at least three. 20160313 20:57:17< celticminstrel> __pairs, __tostring, __gc, __ipairs (now deprecated though, so maybe understandable) 20160313 21:28:57< vultraz> celticminstrel: shouldn't intf_select_hex call game_display::select_hex instead of highlight_hex 20160313 21:29:27< celticminstrel> I think there was some weird reason for doing it the way it's done, but I can't remember. I think that whole select hex API needs to be scrapped and remade for the second time. 20160313 21:31:55< celticminstrel> The formerly deprecated one is intf_highlight_hex, I believe. 20160313 21:32:20< vultraz> right now we have highlight hex and select hex in display, game display, and lua 20160313 21:32:37-!- daMark_ [5cd3e742@gateway/web/freenode/ip.92.211.231.66] has joined #wesnoth-dev 20160313 21:32:43< vultraz> highlight is basically 'hovered' 20160313 21:32:57< vultraz> select is 'clicked' 20160313 21:33:02-!- daMark_ [5cd3e742@gateway/web/freenode/ip.92.211.231.66] has left #wesnoth-dev [] 20160313 21:34:00-!- travis-ci [~travis-ci@ec2-54-226-42-114.compute-1.amazonaws.com] has joined #wesnoth-dev 20160313 21:34:01< travis-ci> gfgtdf/wesnoth-old#610 (side_name - bd13667 : gfgtdf): The build is still failing. 20160313 21:34:01< travis-ci> Build details : https://travis-ci.org/gfgtdf/wesnoth-old/builds/115730051 20160313 21:34:01-!- travis-ci [~travis-ci@ec2-54-226-42-114.compute-1.amazonaws.com] has left #wesnoth-dev [] 20160313 21:34:19< celticminstrel> Are you talking about in the C++ API? 20160313 21:34:29< vultraz> yes 20160313 21:34:32< celticminstrel> Okay. 20160313 21:34:43< vultraz> for message we'd want 'highlight' 20160313 21:34:46< celticminstrel> Give me a minute to bring up the Lua API docs on the wiki. 20160313 21:35:01-!- louis94 [~~louis94@91.178.240.1] has joined #wesnoth-dev 20160313 21:35:08-!- daMark [5cd3e742@gateway/web/freenode/ip.92.211.231.66] has quit [Ping timeout: 252 seconds] 20160313 21:35:12< vultraz> we call wesnoth.select_hex from the message impl 20160313 21:35:13< vultraz> but 20160313 21:35:22< vultraz> that calls highlight right now :| 20160313 21:36:41< celticminstrel> Am I wrong in thinking there's a wesnoth.highlight_hex... 20160313 21:37:05< vultraz> there is a wesnoth.highlight_hex 20160313 21:37:22< celticminstrel> I don't see it on the wiki, was it removed? 20160313 21:37:43< vultraz> it's in the c++... 20160313 21:37:56< celticminstrel> I know, that's not what I'm looking for though. 20160313 21:38:11< vultraz> wait a minute 20160313 21:38:14< vultraz> .... 20160313 21:38:19< celticminstrel> Found it. 20160313 21:38:24< vultraz> wesnoth.select_hex(speaker.x, speaker.y, true) 20160313 21:38:28< celticminstrel> It was removed in 2011. 20160313 21:38:34< vultraz> that third argument is whether to show movement reach :| 20160313 21:38:55< celticminstrel> Right, but I think if it was false, something else wrong happened. 20160313 21:39:02< vultraz> I just tested with false 20160313 21:39:02< celticminstrel> Try it? 20160313 21:39:05< vultraz> I don't see anything wrong 20160313 21:39:20< vultraz> the units get highlighted 20160313 21:39:30< celticminstrel> I'm pretty sure there was something... 20160313 21:39:31< vultraz> no hex cursor around them, but that's fine 20160313 21:39:32< vultraz> I think 20160313 21:39:38< celticminstrel> Ah, that's probably it. 20160313 21:39:53< celticminstrel> It's supposed to have the hex outline around the speaking unit, I'm pretty sure. 20160313 21:40:02< vultraz> let me see in 1.12 20160313 21:40:11< celticminstrel> There may have also been something related to whether or not the unit was selected once the message closed. 20160313 21:40:31< vultraz> in 1.12, the speaker gets the hex overlay around it but not the 'lightened' effect 20160313 21:40:53< celticminstrel> In other words, what we really want is, in fact, highlight_hex, right? 20160313 21:40:58< vultraz> with that third argument set to false, it gets the lighted effect, but no hex 20160313 21:42:09< celticminstrel> Here's an idea: undeprecate wesnoth.highlight_hex and have it call highlight_hex in the C++ API. 20160313 21:42:23< vultraz> it does 20160313 21:42:33< celticminstrel> Ah, you're right. 20160313 21:42:35< vultraz> it's not even deprecated. it's there and it works :| 20160313 21:42:43< celticminstrel> But it also calls select_hex. 20160313 21:42:53< celticminstrel> Wait, I'm looking at select_hex. 20160313 21:43:20< celticminstrel> wesnoth.highlight_hex doesn't call game_display::highlight_hex. 20160313 21:43:21< vultraz> shouldn't select_hex call select_hex not highlight_hex 20160313 21:43:24< celticminstrel> Oh wait, it does. 20160313 21:43:31< vultraz> Ok ok ok 20160313 21:43:35< vultraz> let's back up 20160313 21:43:44< celticminstrel> wesnoth.select_hex calls both, for whatever reason. 20160313 21:44:10< vultraz> no, it calls a different select_hex 20160313 21:44:33< vultraz> that's what gives you the hex cursor 20160313 21:44:37< celticminstrel> ? 20160313 21:44:47< vultraz> play_controller_.get_mouse_handler_base().select_hex( 20160313 21:44:55< celticminstrel> Yes. 20160313 21:45:00< vultraz> that's NOT game_display_->select_hex 20160313 21:45:18< celticminstrel> Wait, there's a game_display_->select_hex too? 20160313 21:45:19< celticminstrel> :| 20160313 21:45:24< vultraz> yes 20160313 21:45:26< vultraz> :) 20160313 21:45:28< celticminstrel> What's the difference between those? 20160313 21:45:33-!- prkc [~prkc@gateway/vpn/privateinternetaccess/prkc] has joined #wesnoth-dev 20160313 21:46:10< vultraz> game_display's select_hex calls disiplay::select_hex and game_display::display_unit_hex 20160313 21:46:24< celticminstrel> Okay, so similar to what wesnoth.highlight_hex does... 20160313 21:46:32< celticminstrel> What does display_unit _hex do? 20160313 21:47:04< vultraz> take a look yourself. I can't tell 20160313 21:47:16< vultraz> but the docs say 20160313 21:47:18< celticminstrel> Filename and line number? 20160313 21:47:20< vultraz> " * Change the unit to be displayed in the sidebar. 20160313 21:47:21< vultraz> * 20160313 21:47:23< vultraz> * This is used when selecting or highlighting is not wanted." 20160313 21:47:52< celticminstrel> Okay, so it's for the sidebar, I guess. 20160313 21:48:40< celticminstrel> What does mouse_handler_base::select_hex do? 20160313 21:49:02< celticminstrel> I guess it's calling that one in order to support the "fire_event?" parameter. 20160313 21:49:20-!- wedge010 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has joined #wesnoth-dev 20160313 21:49:23< vultraz> you mean mouse::handler 20160313 21:49:26< vultraz> er 20160313 21:49:29< vultraz> mouse_handler:: 20160313 21:49:31< celticminstrel> Maybe I do, I dunno. 20160313 21:49:47< vultraz> mouse_events.cpp:722 20160313 21:49:50< celticminstrel> I was just assuming that get_mouse_handler_base() would return a mouse_handler_base. 20160313 21:50:03< celticminstrel> Is that in src/ or a subdir? 20160313 21:50:20< vultraz> src 20160313 21:50:24-!- aeonchild [~aeonchild@defocus/yummy/enchilado] has quit [Ping timeout: 250 seconds] 20160313 21:50:45< celticminstrel> So it does a lot of stuff... 20160313 21:50:53 * celticminstrel guesses gui() is the game_display. 20160313 21:51:16< vultraz> yes 20160313 21:51:27< vultraz> descriptive, ain't it 20160313 21:51:49< vultraz> don't you just love our source code :) 20160313 21:52:12< celticminstrel> Sounds like this is literally the function called when you click on any hex. 20160313 21:53:48< celticminstrel> I'm thinking it's probably a big mistake for wesnoth.select_hex to call this. 20160313 21:54:12-!- wedge009 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has quit [Ping timeout: 276 seconds] 20160313 21:54:12< vultraz> but isn't select hex supposed to be like 'you clicked here' 20160313 21:54:12-!- wedge010 is now known as wedge009 20160313 21:54:23< celticminstrel> Hmm, maybe so, I guess. 20160313 21:54:48< celticminstrel> What happens if you change [message] to use highlight_hex instead of select_hex? (Which means dropping the boolean argumen.) 20160313 21:55:20< vultraz> 1.12 behavior, except movement range is shown 20160313 21:55:31< celticminstrel> Hmm. 20160313 21:55:33< vultraz> (that is, hex cursor, no 'lightened' effect) 20160313 21:55:43< celticminstrel> Well, wesnoth.highlight_hex is, in fact, deprecated. 20160313 21:56:06< vultraz> should it remain so? 20160313 21:56:22< celticminstrel> It has been deprecated since... 20160313 21:56:39< celticminstrel> ...commit 31c3fc7d 20160313 21:56:57< celticminstrel> ...which is in 1.9. 20160313 21:57:00< vultraz> P_P 20160313 21:57:08< celticminstrel> Soooo... I think it's safe to do anything we want with it. 20160313 21:57:22< celticminstrel> Such as removing the deprecated message and making it not highlight reach. 20160313 21:57:37-!- louis94 [~~louis94@91.178.240.1] has quit [Ping timeout: 252 seconds] 20160313 21:57:43< vultraz> I just added a third bool argument to it and I get 1.12 behavior exactly 20160313 21:58:02< celticminstrel> I personally don't think the third bool argument would be needed, but I guess it doesn't hurt. 20160313 21:58:03< vultraz> hex cursor, no lightened effect, no movement reach 20160313 21:58:13< Ravana_> is it intentional that #define doesn't have to start from the beginning of line (ignoring whitespace)? 20160313 21:58:28< celticminstrel> (ie, I think people wanting the movement reach should probably be using select_hex instead) 20160313 21:58:31< vultraz> celticminstrel: oh, right, since we have select_hex for that 20160313 21:58:32< vultraz> ok 20160313 21:58:45< celticminstrel> Ravana_: You mean you can have something like "attribute=key #define"? 20160313 21:59:01< Ravana_> the error I got was about # #define AE_ARCHAIC_WEAPON_VECTOR_NB DAMAGE NUMBER CHANCE 20160313 21:59:20-!- aeonchild [enchilado@defocus/yummy/enchilado] has joined #wesnoth-dev 20160313 21:59:22< celticminstrel> Eh? 20160313 21:59:40< Ravana_> Preprocessor error: #define is not allowed inside a #define/#enddef pair 20160313 22:00:12< celticminstrel> That line looks to me like it should be interpreted as a comment. 20160313 22:00:31< Ravana_> I thought so too 20160313 22:00:39< vultraz> hmmmmm 20160313 22:00:59-!- gfgtdf [~chatzilla@f054160176.adsl.alicedsl.de] has joined #wesnoth-dev 20160313 22:01:08< gfgtdf> you want to add a third bool argument to select_hex ot to highloight hex ? 20160313 22:01:18< vultraz> no 20160313 22:01:54< vultraz> no adding arguments 20160313 22:02:03< vultraz> just make wesnoth.highlight_hex not show move reach 20160313 22:03:30< vultraz> celticminstrel: alternative 20160313 22:03:32< gfgtdf> vultraz: hmm so aftet highlight_hex the previously selected hex is still selected ? 20160313 22:03:35< celticminstrel> He was talking about highlight_hex though. 20160313 22:03:44< celticminstrel> vultraz: What? 20160313 22:04:26< gfgtdf> vultraz: so does highlight hjex select the unit ? 20160313 22:04:28< vultraz> celticminstrel: if you remove the conditional on the third argument of wesnoth.select_hex for calling game_display::highlight_hex, we get even better behavior 20160313 22:04:35< vultraz> gfgtdf: no, just 'mouses over' 20160313 22:04:45< vultraz> celticminstrel: we get no movement reach, hex cursor, AND the 'lighted 20160313 22:04:47< vultraz> effect 20160313 22:04:58< celticminstrel> vultraz: Do we want the lighted effect? 20160313 22:05:02< celticminstrel> zookeeper: What do you think? 20160313 22:05:15< vultraz> oh great zookeeper, weigh in upon this matter 20160313 22:05:37< vultraz> zookeeper: do we want units to get that 'lighted' effect when they speak via [message]? 20160313 22:05:57< celticminstrel> The "lighted" effect is the effect applied to the selected unit. 20160313 22:06:05-!- gfgtdf [~chatzilla@f054160176.adsl.alicedsl.de] has quit [Read error: Connection reset by peer] 20160313 22:06:32< celticminstrel> Actually, I think that way might produce a bad side-effect. 20160313 22:06:55< celticminstrel> If you have a unit currently selected, and a message pops up, should that unit still be selected when you dismiss the message? I would think so. 20160313 22:07:09< vultraz> that's a good point 20160313 22:07:32< vultraz> in which case, we would have to undeprecate highlight_hex 20160313 22:07:54< vultraz> which we can do 20160313 22:08:00< vultraz> just want to hear what zookeeper says 20160313 22:08:45< vultraz> the whole damn interface should be refactored, though 20160313 22:13:11-!- travis-ci [~travis-ci@ec2-54-226-42-114.compute-1.amazonaws.com] has joined #wesnoth-dev 20160313 22:13:12< travis-ci> gfgtdf/wesnoth-old#611 (side_name - cdba576 : gfgtdf): The build is still failing. 20160313 22:13:12< travis-ci> Build details : https://travis-ci.org/gfgtdf/wesnoth-old/builds/115734809 20160313 22:13:12-!- travis-ci [~travis-ci@ec2-54-226-42-114.compute-1.amazonaws.com] has left #wesnoth-dev [] 20160313 22:16:21-!- boucman [~rosen@wesnoth/developer/boucman] has quit [Remote host closed the connection] 20160313 22:17:01< vultraz> or 20160313 22:17:02< vultraz> hm 20160313 22:17:28< vultraz> celticminstrel: could also wrap the call to mouse_handler::select_hex in wesnoth.select_hex in a conditional 20160313 22:17:33< vultraz> if(highlight) 20160313 22:17:49 * celticminstrel decides to test something out. 20160313 22:17:53< vultraz> I know that function takes a highlight parameter, but still.. 20160313 22:18:02< vultraz> that would allow us to keep one function 20160313 22:18:15< vultraz> er 20160313 22:18:17< vultraz> hm 20160313 22:18:23< celticminstrel> The "highlight" parameter there is whether to show reach, right? 20160313 22:18:23< vultraz> actually, maybe that wouldn't be best... 20160313 22:18:28< vultraz> yes, I think so... 20160313 22:18:34-!- Kwandulin [~Miranda@2003:76:f7d:7366:ddea:66a6:65d4:ef07] has quit [Read error: Connection reset by peer] 20160313 22:18:45< vultraz> I'm confused :| 20160313 22:19:08 * zookeeper says something wise after the current match ends... 20160313 22:20:10-!- TC01 [~quassel@london.acm.jhu.edu] has quit [Ping timeout: 252 seconds] 20160313 22:23:04-!- TC01 [~quassel@128.220.251.37] has joined #wesnoth-dev 20160313 22:25:58< celticminstrel> Okay, wesnoth.select_hex does not, in fact, simulate a click in the least. 20160313 22:26:27< vultraz> well that's a bug, then 20160313 22:27:01< celticminstrel> If there is a unit on the hex, then it behaves like deselecting any unit followed by clicking that unit. 20160313 22:27:12< celticminstrel> The "deselecting any unit" part is the difference here. 20160313 22:27:22< celticminstrel> In other words, it won't trigger an attack. 20160313 22:27:24-!- ChipmunkV [~vova@d0017-2-88-172-31-68.fbx.proxad.net] has quit [Quit: ChipmunkV] 20160313 22:27:38< celticminstrel> Which I don't consider to be a bad thing. 20160313 22:28:54< celticminstrel> If there is no unit on the hex, something weird happens. 20160313 22:29:02 * celticminstrel is currently assuming both booleans true. 20160313 22:29:09-!- louis94 [~~louis94@91.178.240.1] has joined #wesnoth-dev 20160313 22:32:56-!- esr [~esr@wesnoth/developer/esr] has quit [Quit: WeeChat 1.3] 20160313 22:33:00< celticminstrel> Changing second argument to false suppresses the select animation (in addition to the select event). 20160313 22:35:52< celticminstrel> With the first argument false, there is no outline, and if there's a unit, no move highlighting. 20160313 22:36:07< zookeeper> celticminstrel, didn't i at one point specifically complain about how [message] selects the speaker? 20160313 22:36:13< celticminstrel> With the first argument false and no unit, you do get move highlighting (same as when it's true). 20160313 22:36:21-!- esr [~esr@wesnoth/developer/esr] has joined #wesnoth-dev 20160313 22:36:46< celticminstrel> http://celmin.pwcsite.com/wesnoth/select_hex_empty.png 20160313 22:37:05< celticminstrel> zookeeper: I think I remember something like that, yeah. 20160313 22:37:09< vultraz> well that's bad 20160313 22:37:28< celticminstrel> So basically, select_hex only does anything useful when there is, in fact, a unit on the space, right? 20160313 22:37:41< celticminstrel> So why not rename it to select_unit? 20160313 22:37:41< vultraz> celticminstrel: ok, I'm going to commit my undeprecation of highlight_hex 20160313 22:37:43< vultraz> and yes 20160313 22:37:45< vultraz> I agree 20160313 22:38:00< zookeeper> in any case, i don't particularly like the lighting of speakers, although arguably a visual cue like that is good 20160313 22:38:04< celticminstrel> Then have select_hex be a stub that prints a deprecated message and forwards to select_unit. 20160313 22:38:15< celticminstrel> Also add select_unit to the unit metatable. 20160313 22:38:23< celticminstrel> (Probably under the name "select") 20160313 22:38:48< celticminstrel> Actually, I guess it's not in the metatable the way I implemented it... 20160313 22:38:52< celticminstrel> Maybe it should be. 20160313 22:38:55< celticminstrel> Eh, whatever. 20160313 22:39:27< celticminstrel> Oh, right, for that to work it'd have to be not in the metatable but rather in __index, and that isn't possible since __index is a function. 20160313 22:40:19< celticminstrel> If at some point we decide we do want speakers brightened, it can probably be done by calling [animate_unit]. 20160313 22:40:26-!- travis-ci [~travis-ci@ec2-54-235-17-198.compute-1.amazonaws.com] has joined #wesnoth-dev 20160313 22:40:27< travis-ci> gfgtdf/wesnoth-old#612 (side_name - 09168c0 : gfgtdf): The build is still failing. 20160313 22:40:27< travis-ci> Build details : https://travis-ci.org/gfgtdf/wesnoth-old/builds/115739244 20160313 22:40:27-!- travis-ci [~travis-ci@ec2-54-235-17-198.compute-1.amazonaws.com] has left #wesnoth-dev [] 20160313 22:41:14< celticminstrel> vultraz: Will you do the select_hex -> select_unit change too, or do you want to leave it to me? 20160313 22:41:21< vultraz> can you do it? 20160313 22:41:28< vultraz> since you'll probably want to change stuff 20160313 22:41:35 * celticminstrel sigh. 20160313 22:41:35< vultraz> and add a check for unit presence 20160313 22:41:37< celticminstrel> Yes I can do it. 20160313 22:41:43< celticminstrel> Ah, right, good point. 20160313 22:42:34-!- irker864 [~irker@uruz.ai0867.net] has joined #wesnoth-dev 20160313 22:42:34< irker864> wesnoth: Charles Dang wesnoth:master 497aee86abe7 / src/scripting/game_lua_kernel.cpp: Undeprecate wesnoth.highlight_hex() https://github.com/wesnoth/wesnoth/commit/497aee86abe73a9f4ee5333b6f6cb7eb7ed7d6be 20160313 22:42:35< irker864> wesnoth: Charles Dang wesnoth:master b512ad2143af / data/lua/wml/message.lua: Make [message] use wesnoth.highlight_hex() https://github.com/wesnoth/wesnoth/commit/b512ad2143af67c02d1dc2951de68543848c1423 20160313 22:42:46< celticminstrel> I guess I can do it on the AI branch and move it over later. 20160313 22:43:56< shadowm> vultraz: patch, not git apply. 20160313 22:44:12< shadowm> patch --merge -p < foo.diff 20160313 22:44:37< shadowm> For example: patch --merge -p1 < foo.diff will apply foo.diff stripping 1 path components. 20160313 22:44:55< celticminstrel> For all my complaining about Lua 5.3, I'm not particularly opposed to that upgrade, by the way. 20160313 22:44:57< shadowm> The exact number of path components you should strip depends on the patch's contents. 20160313 22:45:36< celticminstrel> But before merging you'll have to make sure that ipairs() still works on vconfigs. 20160313 22:45:42< shadowm> Also, good to know you admire me for something. 20160313 22:45:48< celticminstrel> Eh? 20160313 22:46:26< shadowm> 17:23:49 I have to say, I greatly admire anyone who managed to do this 20160313 22:46:43< celticminstrel> vultraz: Does game_display::highlight_hex set the value returned by selected_hex? 20160313 22:48:22-!- mjs-de [~mjs-de@x4db51de5.dyn.telefonica.de] has quit [Remote host closed the connection] 20160313 22:53:30< vultraz> celticminstrel: uhhhh... 20160313 22:53:43< vultraz> it's void 20160313 22:53:58< celticminstrel> selected_hex, not select_hex. Note the extra D. 20160313 22:54:15< celticminstrel> Oh right, extra ED. Whatever. 20160313 22:54:26< vultraz> uhhhhhhhhhh 20160313 22:54:33< vultraz> I'm sorry I'm not following 20160313 22:54:34< vultraz> bit busy here 20160313 22:55:00< celticminstrel> Eh, I'll check myself after I'm done with this, then. 20160313 23:01:10-!- travis-ci [~travis-ci@ec2-54-226-42-114.compute-1.amazonaws.com] has joined #wesnoth-dev 20160313 23:01:11< travis-ci> gfgtdf/wesnoth-old#613 (side_name - b3407ab : gfgtdf): The build was canceled. 20160313 23:01:11< travis-ci> Build details : https://travis-ci.org/gfgtdf/wesnoth-old/builds/115745429 20160313 23:01:11-!- travis-ci [~travis-ci@ec2-54-226-42-114.compute-1.amazonaws.com] has left #wesnoth-dev [] 20160313 23:08:38< celticminstrel> Okay, so here's what I'm doing. 20160313 23:09:00< celticminstrel> If you formerly passed false as the third argument to select_hex, then select_unit will behave identically. 20160313 23:09:14< celticminstrel> However, if you passed true, you'll also need to call highlight_hex to get the original effect. 20160313 23:09:20< celticminstrel> (When calling select_unit.) 20160313 23:09:37< celticminstrel> select_hex is a stub that automatically does this for you, for compatibility. 20160313 23:14:03< celticminstrel> Another way of saying this is that select_unit never outlines the hex. 20160313 23:19:59-!- gfgtdf [~chatzilla@f054160176.adsl.alicedsl.de] has joined #wesnoth-dev 20160313 23:20:05< gfgtdf> the new plan is to deprecate select_hex ? 20160313 23:20:39< celticminstrel> Yeah. 20160313 23:20:53< celticminstrel> And undeprecate highlight_hex. 20160313 23:21:00< celticminstrel> Though really it's more like renaming select_hex. 20160313 23:23:25-!- travis-ci [~travis-ci@ec2-54-226-42-114.compute-1.amazonaws.com] has joined #wesnoth-dev 20160313 23:23:26< travis-ci> gfgtdf/wesnoth-old#614 (side_name - 02cafe4 : gfgtdf): The build is still failing. 20160313 23:23:26< travis-ci> Build details : https://travis-ci.org/gfgtdf/wesnoth-old/builds/115745628 20160313 23:23:26-!- travis-ci [~travis-ci@ec2-54-226-42-114.compute-1.amazonaws.com] has left #wesnoth-dev [] 20160313 23:24:16-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has quit [Quit: Connection closed for inactivity] 20160313 23:28:02< gfgtdf> celticminstrel: hmm is there a reason for remaing it ? 20160313 23:28:17< celticminstrel> Because it doesn't do anything useful when there's no unit on the target space. 20160313 23:28:50< celticminstrel> Unless you consider this useful: http://celmin.pwcsite.com/wesnoth/select_hex_empty.png 20160313 23:29:37< celticminstrel> ... 20160313 23:29:59< celticminstrel> I think I broke wesnoth.get_unit at some point. 20160313 23:30:29 * celticminstrel hopes it's just on ai and not in master. 20160313 23:30:31< gfgtdf> hmm git gave me this error: "Unable to create '.../wesnoth/.git/index.lock': File exists." 20160313 23:30:44< celticminstrel> When that happens, normally I just try again. 20160313 23:30:58< celticminstrel> It generally means another program is accessing your working copy. 20160313 23:31:10< celticminstrel> If you know for a fact that that's not the case, it should be safe to delete the file. 20160313 23:31:33-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [Ping timeout: 240 seconds] 20160313 23:31:36-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has joined #wesnoth-dev 20160313 23:32:17< celticminstrel> Okay good, I only broke wesnoth.get_unit in the AI branch. 20160313 23:32:30< gfgtdf> celticminstrel: you did changes to wesnoth.get_unit() ? 20160313 23:32:50< celticminstrel> Awhile back I made it accept a string argument, the unit ID. 20160313 23:33:14< celticminstrel> More recently I changed it to use my new luaW_tolocation function. 20160313 23:33:39< celticminstrel> The latter is only on the AI branch, which is good, because I forgot that lua_isstring returns true when it's a number and as a result broke it. 20160313 23:37:49< gfgtdf> celticminstrel: i actualyl still dont know why we have the underlaying id unit thing 20160313 23:38:16< celticminstrel> Well, get_unit no longer accepts that, anyway. 20160313 23:38:18< gfgtdf> celticminstrel: is this just because integer lookups are faster than string lookups 20160313 23:38:38< celticminstrel> Is the underlying ID actually used for lookups in the unit_map? 20160313 23:38:39< gfgtdf> celticminstrel: y but wesnoth uses it internally 20160313 23:38:51< gfgtdf> celticminstrel: afaik this is its main use. 20160313 23:39:06< celticminstrel> I dunno what it's for. --- Log closed Mon Mar 14 00:00:31 2016