#exult@irc.freenode.net logs for 23 Oct 2012 (GMT)

Archive Today Yesterday Tomorrow
Exult homepage

[00:27:19] --> Kirben has joined #exult
[00:27:23] --- ChanServ gives channel operator status to Kirben
[03:43:54] <-- Kirben has left IRC ()
[07:48:19] --> Rottingbeef has joined #exult
[10:25:56] <Dominus> wjp, I was away last night, I'll try to bother you tonight :)
[11:10:43] --> Marzo has joined #exult
[11:43:54] <-- Marzo has left IRC (Ping timeout: 264 seconds)
[11:47:20] --> Marzo has joined #exult
[12:11:19] --> TheCycoONE has joined #exult
[12:21:06] <-- Marzo has left IRC (Ping timeout: 264 seconds)
[12:31:12] --> Marzo has joined #exult
[13:10:08] --> TheCycoTWO has joined #exult
[13:13:39] <-- TheCycoONE has left IRC (Ping timeout: 244 seconds)
[13:34:45] <Dominus> F***ing Paypal limited my account and wants all kind of stuff from me...
[13:35:30] <Dominus> after almost exact to the date 11 years...
[13:48:02] <Eviltar_> paypal are the worst to get into tangles with, some people have their funds frozen
[14:00:03] <-- RadoS has left IRC (Remote host closed the connection)
[14:07:44] --> RadoS has joined #exult
[16:21:09] <Dominus> website down https://sourceforge.net/blog/various-sourceforge-services-down/
[16:37:29] * Dominus eyes wjp...
[16:37:53] <sh4rm4> it's about time to switch to github...
[16:38:34] <Dominus> hmm, I have some more pseudo code for removing the old key value but I have no idea where to put that (in exult.cc? but where there?) so I can test it...
[16:38:35] <Dominus> http://pastebin.com/3GY8YjX9
[16:38:38] <sh4rm4> https://github.com/rofl0r/exult (still updating that git-mirror)
[17:25:44] <wjp> Dominus: did you mention there was more code to migrate older config entries somewhere?
[17:26:30] <wjp> but otherwise a dedicated function in exult.cc for config migration would probably be nice; and then just call that on startup
[17:40:03] <wjp> Dominus: I'm just cooling down from running atm, going to have dinner afterwards, and will look at this code then
[18:01:18] --> Malignant_Manor has joined #exult
[18:02:10] <Malignant_Manor> Like I said the other day, config->key_exists, doesn't work like for backwards compatibility.
[18:02:43] <Malignant_Manor> It only returned keys to values that were set.
[18:04:30] <wjp> ?
[18:04:58] <wjp> (I can't parse those two sentences)
[18:05:10] <Malignant_Manor> From my testing, config->key_exists
[18:07:06] <Malignant_Manor> will not be true unless you use config->set is used. I can't remember if config->value works.
[18:09:27] <wjp> value and key_exists use exactly the same logic internally
[18:09:37] <Malignant_Manor> Checking blame, Marzo added the function.
[18:11:45] <wjp> but I see no reason why key_exists wouldn't work in this way
[18:17:57] <Dominus> hey Malignant_Manor, hey wjp
[18:18:31] <Dominus> the way I propose to use that function will use config->set/value, so no problem there, really, right?
[18:18:50] <wjp> it looks fine to me, but I still don't understand Malignant_Manor's comments
[18:19:04] <Malignant_Manor> It doesn't work unless config->set is used first.
[18:19:09] <Malignant_Manor> Let me past code.
[18:19:13] <Malignant_Manor> paste
[18:19:50] * wjp fixes compilation with recent zlib
[18:19:58] * wjp tests key_exists
[18:20:16] * wjp is also annoyed at SF's svn being down :-)
[18:20:26] <Malignant_Manor> http://pastebin.com/BZhV0caW
[18:20:41] <wjp> anyway, key_exists works as expected for me
[18:20:44] <wjp> if (config->key_exists("config/gameplay/allow_double_right_move"))
[18:20:52] <wjp> triggers for me if I put it right after opening the config file
[18:21:04] <Malignant_Manor> Weird
[18:21:16] <Malignant_Manor> It doesn't work for me though.
[18:21:20] <wjp> how so?
[18:22:13] <Malignant_Manor> In that pastebin link, if I remove the config->set line or both lines before key->exists, it will not abort.
[18:22:28] <wjp> then you just don't have that key in your config file?
[18:23:23] <Malignant_Manor> It's in SERPROFILE%\Local Settings\Application Data/exult/exult.cfg
[18:24:11] <Malignant_Manor> Plus it would be added by the set line and not be needed after the first try if that was really the case.
[18:26:25] <wjp> are you sure this code snippet isn't just in the wrong place?
[18:26:28] <Malignant_Manor> Is Game_window initialized before the configuration file is completely read or something?
[18:26:30] <wjp> or there's a typo in the config file?
[18:27:49] <Dominus> my pseudo code works somewhat for me
[18:28:25] <Dominus> it detects the allow_double_right_move and writes the allow_right_move but doesn't keep the setting as I want it to
[18:29:02] <Dominus> I've put it before // Setup virtual directories in exult.cc around #598
[18:29:18] <Malignant_Manor> There doesn't seem to be a typo but it doesn't work in Game_window initialization.
[18:29:31] <wjp> Dominus: your set lines are wrong
[18:29:52] <wjp> the str's in there, particularly
[18:30:11] <Malignant_Manor> It's not a big deal anyway.
[18:32:46] <Dominus> what works for me is http://pastebin.com/8skWuL8t
[18:33:39] <Dominus> (the else if is not needed since the default is no anyway...)
[18:35:15] <Dominus> please tell me how hackish my attempt at writing this little right click option was... :)
[18:35:23] <wjp> don't forget the {}'s around the two indented lines in that if
[18:35:45] <Dominus> argh
[18:36:02] <Dominus> it was only one line before... so I forgot to add it when I added the second one :)
[18:36:12] <wjp> also kill the first set, since that will be superceded by the remove
[18:40:57] <Dominus> so, that is the whole patch I think http://pastebin.com/kSAFqhhZ
[18:46:49] <wjp> was the default value of allow_double_right_move indeed yes?
[18:47:11] <wjp> oh, wait, it's behind a key_exists; never mind
[18:48:10] <Dominus> but yes, double_right was really default to yes
[18:48:10] <wjp> hm, line 170 and on in that pastebin looks fishy
[18:48:23] <Dominus> I wasn't sure whether to make it default to double
[18:48:37] <wjp> what exactly is the point of that code?
[18:49:58] <wjp> this is the save_settings function, if I read this right. So I understand the first two lines, but the rest?
[18:50:14] <Dominus> huh, line 170 is removing the old gwin-set
[18:50:33] <wjp> I mean the entire new block added there
[18:51:26] <Dominus> passing the value of the cfg to right_pathfind
[18:51:41] <wjp> but right_pathfind is already set correctly at the start
[18:51:50] <wjp> or you wouldn't pass that to config->set
[18:52:02] <wjp> (and gwin->set_allow_right_pathfind, for that matter)
[18:54:01] <wjp> I think everything after config->set there can just be removed
[18:54:09] <Dominus> yes, seems so
[18:54:10] <Dominus> :)
[18:54:34] <-- Malignant_Manor has left IRC (Quit: ChatZilla 0.9.89 [Firefox 16.0.1/20121010144125])
[18:54:39] <Dominus> I copied a lot from the sample_rate stuff drom the audiogump and ended up with that
[18:54:50] <Dominus> it worked and I thought it was working because of that
[18:55:04] <wjp> also, num_pathfind_texts doesn't actually have to be in the class
[18:55:31] <wjp> i.e., remove it from GameplayOptions_gump.h, along with the pathfind_texts
[18:56:11] <wjp> and then at the top of GameplayOptions_gump.cc, remove the GameplayOptions_gump:: prefix from the two lines where you set them
[18:57:25] <wjp> static const char* const pathfind_texts[3] = { "no", "single", "double" };
[18:57:34] <wjp> static int num_pathfind_texts = 3;
[18:57:51] <Dominus> (and #include <sstream> can go too then)
[18:58:01] <wjp> there's then also no need for the block at line 139 in the pastebin
[18:58:13] <wjp> um, wait, those texts are different
[18:58:45] <wjp> ah, that's for the config entries. Never mind that last comment then
[18:59:23] <wjp> the new default is set to "no", by the way, while you said it previously was "double"
[19:00:18] <Dominus> hum, yes, I know. I was unsure on what to make the default but since the old was "double"...
[19:01:16] <Dominus> it should be double then
[19:01:55] <wjp> hm, there's a memleak with the pathfind_text array
[19:02:07] <wjp> oh, unless the GameplayTextToggle takes ownership
[19:02:35] <wjp> but looking at the rest I guess you're correct there :-)
[19:02:39] <wjp> so never mind that too :-)
[19:07:16] <wjp> dinner; bbl
[19:07:27] <Dominus> thanks so far
[19:13:17] <Dominus> ok, new patch according to your hints http://pastebin.com/JtuAGD4g
[19:14:02] <Dominus> default is now double and the transformation of the cfg will check whether double-click move was disabled and use that for the new function
[19:37:31] * Dominus is really worrying whether he has signs of alzheimers or so. It really seems that even when looking at the stuff after a day or two I need to newly wrap my mind around this stuff
[19:50:08] <wjp> two last minor points (one of them my mistake :-) ):
[19:50:15] <wjp> the config->value("config/gameplay/allow_right_pathfind", right_pathfind, right_pathfind); can also go
[19:50:27] <wjp> and static int num_pathfind_texts should've been static const int
[19:50:45] <wjp> then test a bit, and then I think it should be good
[19:52:32] <Dominus> yes :)
[19:54:46] <Dominus> wjp, can I bother you also for that autonotes patch? That one is not behaving as I expect and not toggling in game. at least not toggling off http://pastebin.com/75RBuZcD
[19:55:48] <wjp> IIRC, that's because read_auto_text is only called exactly once
[19:56:31] <wjp> it'll need some refactoring to make that respond to run-time changes
[19:57:11] <wjp> and is it clear _how_ it should respond to run-time changes? i.e., should it ignore flags changed while the option was off, or still keep track but don't display anything?
[19:57:54] <Dominus> hmm, good question. but I hink if you turn it off you don't want it to add autonotes at all
[19:58:53] <Dominus> also it's really most likely to be a setting people set *once* since you either want autonotes or you don't want at all
[20:00:58] <Dominus> also I kind of slapped the read autootes block *somewhere* in gamewin.cc where I think it might fit. no idea whether that was a good place or not
[20:02:09] <Dominus> (and thetoggle in misc options gump doesn't fit the others with yes/no but I wanted to get it working right before looking at the cosmetics. that cc is a bit of a mess anyway)
[20:07:31] <wjp> hrm
[20:07:43] <Dominus> ?
[20:07:59] <wjp> I'm not convinced yet about what the best way of handling such a toggle is
[20:08:56] <Dominus> well, recording the autonotes always and just not displaying when toggled would be great for support :)
[20:10:48] <Dominus> I'm not really sure which way to go either
[20:11:06] <wjp> is there a point in making the autonotes file configurable?
[20:12:01] <Dominus> I was mostly thinking of trying to get others to fill in good text for the notes and with a configurable file they would be able to quickly test
[20:12:38] <Dominus> if I place a request for help on the codex or so
[20:13:18] <wjp> hm, right
[20:14:07] <Dominus> it's not something people will often do. the cout is there for telling *me* I did it right when I wrote it
[20:22:10] <Dominus> the whole notebook gump also has a bug that will show the autonotes again and again when you open the notebook more often *and* continue to click where the earmark is normally when you have more notes on the next page. that bug is not my fault :)
[22:15:13] <-- TheCycoTWO has left IRC (Quit: And then there were n-1)
[22:42:08] --> Kirben has joined #exult
[22:42:08] --- ChanServ gives channel operator status to Kirben