#nuvie@irc.freenode.net logs for 6 Jul 2012 (GMT)

Archive Today Yesterday Tomorrow
Nuvie homepage

[00:03:59] --> Kirben has joined #nuvie
[00:23:29] <CIA-68> nuvie: 03malignantmanor * r1387 10/nuvie/trunk/ (3 files in 3 dirs):
[00:23:29] <CIA-68> nuvie: * Fix pathfinding typo that counted moving on the y axis as being diagonal
[00:23:29] <CIA-68> nuvie: * Remove stray and test roof tiles from the map
[00:41:35] <CIA-68> nuvie: 03Kirben * r1388 10/nuvie/trunk/tools/ (FMTownsU6/Makefile.common unpack_conv.cpp): Fix compilation of tools.
[01:42:10] <-- Malignant_Manor has left IRC (Quit: ChatZilla [Firefox 13.0.1/20120614114901])
[01:56:53] <CIA-68> nuvie: 03Kirben * r1389 10/nuvie/trunk/ (3 files in 3 dirs): Fix compilation of tools.
[02:11:07] --> Dominus1 has joined #nuvie
[02:11:07] <-- Dominus has left IRC (Read error: Connection reset by peer)
[02:32:18] --> Malignant_Manor has joined #nuvie
[02:34:00] <Malignant_Manor> SugarCube: I plan to take care the million initialized variable warnings. This already causes a crash on start for gdb.
[02:34:18] <Malignant_Manor> Is this something you fixed?
[02:34:46] <Malignant_Manor> I don't want my changes conflicting with yours.
[03:37:48] <SugarCube> I fixed many. Feel free to commit whatever. I just fixed what was necessary to prevent MSVC from crashing (which was quite a few.)
[03:37:56] <SugarCube> Don't worry about conflicts.
[03:39:02] <Malignant_Manor> It didn't crash when built with gcc in Windows, but when I ran it in gdb it sure did
[03:39:38] <SugarCube> Just wanted to talk to Eric a bit before committing.
[03:40:08] <Malignant_Manor> Is there a potential problem?
[03:40:59] <SugarCube> Nah, just mussing up a tiny bit of the main code with some MSVC-specific #ifs
[03:41:28] <Malignant_Manor> It probably doesn't matter unless it is a lot.
[03:41:53] <Malignant_Manor> Could the code be rewritten to not need it?
[03:43:03] <SugarCube> Sure; already is. I'll commit soon enough. Wanted to work a little more on lighting fixes.
[03:53:39] <Malignant_Manor> I'm working on a few Exult issues and have to test combat to make sure that changing || to && like it should be doesn't cause issues.
[03:54:44] <Malignant_Manor> Nice message at both instances - FIXME: "!rand()" ?? This !rand()%3 doesn't do what it appears to do, but simply changing it into !(rand()%3) breaks combat by making opponents far less aggressive
[05:31:08] --> Darrenor64 has joined #nuvie
[05:45:25] <-- Darrenor64 has left IRC (Ping timeout: 248 seconds)
[05:46:38] <CIA-68> nuvie: 03smatthews * r1390 10/nuvie/trunk/ (22 files in 7 dirs): (log message trimmed)
[05:46:38] <CIA-68> nuvie: * Added Visual Studio 11 (2012) solution and project files
[05:46:38] <CIA-68> nuvie: * Fixed several uninitialized variable crashes
[05:46:38] <CIA-68> nuvie: * Fixed several STL variable scoping crashes in MSVC regarding using an out-of-scope std::string
[05:46:38] <CIA-68> nuvie: * Fixed several implicit cast disambiguation compilation errors (MSVC)
[05:46:39] <CIA-68> nuvie: * Fixed STL array compilation errors (MSVC)
[05:46:39] <CIA-68> nuvie: * Changed named variadic macro arguments to __VA_ARGS__ for compatibility with MSVC (should retain compatibility with gcc)
[05:46:54] <SugarCube> Held off on the lighting changes while I make sure it's just right. Gotta snooze now. Night!
[05:47:05] <Malignant_Manor> Night
[05:47:09] <SugarCube> (99% certain I didn't break any gcc compatibility; was careful about that. if I did, sorry! :)
[05:47:14] <Malignant_Manor> just got done with exult testing
[05:47:31] <Malignant_Manor> and fixed a few things
[05:47:45] <SugarCube> Cool. Never did commit Exult3D :)
[05:47:59] <Malignant_Manor> I emailed you about it
[05:48:05] <Malignant_Manor> but you were busy
[05:48:31] <SugarCube> Yeah... Still got the source code and 3D models. Maybe I'll make a fork some day.
[05:48:38] <Malignant_Manor> Marzo changed things with OpenGL so it is no longer patchable without more OpenGL knowledge
[05:49:27] <Malignant_Manor> The changes made it work better
[05:50:09] <Malignant_Manor> I was hoping it would make Exult3D playable without skipping the menu and some other problems
[05:52:25] <Malignant_Manor> 6061 is the revision that made the OpenGL changes
[05:56:22] <SugarCube> I might have time to play with it later :) I'd like to improve Nuvie a bit more first, though I've been busy lately. OK, really gotta snooze. Night!
[05:56:42] <Malignant_Manor> Goodnight
[05:56:47] <SugarCube> (U7 with Titan's Quest style graphics/smoothness would be neat.)
[05:58:20] <Malignant_Manor> For logs, Exult3D mouse pointer only worked properly at 320x240 x2 (if I remember correctly)
[06:20:31] <CIA-68> nuvie: 03Kirben * r1391 10/nuvie/trunk/ (8 files in 3 dirs): Add all tools to mingw build, and make sure tools are compiled as static under mingw.
[06:53:57] <-- Malignant_Manor has left IRC (Quit: ChatZilla [Firefox 13.0.1/20120614114901])
[07:22:32] <CIA-68> nuvie: 03malignantmanor * r1392 10/nuvie/trunk/ (16 files in 2 dirs): views directory: initialize member variables in the constructor
[09:15:07] --- Dominus1 is now known as Dominus
[12:14:37] --> Yuv422 has joined #nuvie
[12:20:57] <Yuv422> hmm cppcheck doesn't like this
[12:21:04] <Yuv422> const std::string &get_string(const char *defaultvalue="") {
[12:21:04] <Yuv422> std::string s;
[12:21:05] <Yuv422> config.value(key, s, defaultvalue);
[12:21:05] <Yuv422> return s;
[12:21:28] <wjp> what does it say?
[12:21:42] <Yuv422> returning reference to autovariable
[12:21:49] <wjp> oh, missed the &
[12:21:54] <wjp> yes, that's bad
[12:22:45] <wjp> (it's returning a reference to a variable that's destructed when the function returns)
[12:22:46] <Yuv422> yeah that stack reference could be blown away at any time
[12:23:15] <wjp> huh, in pentagram code?
[12:23:34] <wjp> ah, pre-ini-pentagram
[12:23:39] <Yuv422> hehe
[12:24:14] <Yuv422> I think Sam just put it in
[12:24:20] <Yuv422> to nuvie recently
[12:24:42] <Yuv422> as part of getting it to compile under msvc
[12:24:56] <wjp> that function is never actually used, is it?
[12:25:36] <wjp> and, yes, it's a recent change
[12:25:41] <Yuv422> yeah doesn't look like it
[12:25:57] <wjp> ConverseGump.h, get_token_string_at_pos has the same issue
[12:26:32] <wjp> and strip_whitespace_after_break
[12:27:22] <wjp> is smatthews SugarCube?
[12:27:27] <Yuv422> yeah
[12:29:30] <wjp> hm, I wonder what "Fixed several STL variable scoping crashes in MSVC regarding using an out-of-scope std::string" means in that commit
[12:30:12] <Yuv422> yeah because it looks like the fix is also a use of an out of scope string
[12:30:16] <wjp> yes :-)
[12:30:59] <wjp> hrm, too much stuff in that commit :-(
[12:34:51] <wjp> I don't see why returning a std::string in those three instances would cause a problem in any of the places where they're called
[12:36:03] <wjp> in theory the returned temporaries could be used in weird ways, but everything seems ok
[12:38:27] <Yuv422> wouldn't a copy be taken when the returned value is assigned to a variable?
[12:38:37] <Yuv422> which would be straight away?
[12:38:47] <wjp> yes
[12:39:10] <wjp> it could go wrong if you did something like const char* txt = get_string(blah).c_str();
[12:39:26] <wjp> but I don't see any things like that
[12:42:09] --> Darrenor64 has joined #nuvie
[12:44:02] <wjp> (and just to be clear, constructions like that are simply broken of course :-) )
[12:46:42] <Yuv422> yeah that looks like a pretty nasty line of code
[12:46:45] <-- Darrenor64 has left IRC (Ping timeout: 248 seconds)
[13:05:27] <CIA-68> nuvie: 03efry * r1393 10/nuvie/trunk/ (6 files in 2 dirs): * Removed return references to local variables that were introduced in r1390.
[13:15:10] <Yuv422> time for bed
[13:15:12] <Yuv422> cya
[13:15:13] <-- Yuv422 has left IRC (Quit: Yuv422)
[13:17:07] <CIA-68> nuvie: 03wjpalenstijn * r1394 10/nuvie/trunk/ (6 files in 2 dirs): Remove unnecessary const keywords
[14:05:10] <-- Kirben has left IRC ()
[14:39:19] --> Malignant_Manor has joined #nuvie
[14:39:48] <Malignant_Manor> wjp: How do you initialize something like ActorError
[14:40:04] <Malignant_Manor> typedef struct {
[14:40:06] <Malignant_Manor> ActorErrorCode err;
[14:40:07] <Malignant_Manor> Obj *blocking_obj;
[14:40:09] <Malignant_Manor> Actor *blocking_actor;
[14:40:11] <Malignant_Manor> } ActorError;
[14:42:15] <wjp> typedef struct? eew
[14:42:55] <wjp> but ActorError e = { err, obj, actor };
[14:43:09] <Malignant_Manor> I'm trying to go through a hundred or so more files to fix the uninitialized erors list
[14:43:34] <wjp> or go with a constructor
[14:44:20] <Malignant_Manor> Do you want to fix it to where you like the code?
[14:44:34] <Malignant_Manor> Actor.h
[14:45:26] <wjp> ah, it's a member of Actor? Just set the individual fields in the Actor constructor, or add an ActorError constructor, then
[14:47:35] <Malignant_Manor> You're talking to someone without some basic programming knowledge
[14:52:37] <wjp> then it's probably best to submit a bug report with the specific error you're seeing, since it could require a closer look to see where and when these things need to be (re)initialized
[14:53:10] <Malignant_Manor> Okay, I'll just leave a list of stuff that is missing.
[14:53:35] <Malignant_Manor> I'm sure there will be more like this.
[18:54:27] <CIA-68> nuvie: 03malignantmanor * r1395 10/nuvie/trunk/ (31 files in 2 dirs): * nuvie and actors directories: initialize member variables in the constructor
[18:55:20] <-- Malignant_Manor has left IRC (Quit: ChatZilla [Firefox 13.0.1/20120614114901])
[19:47:26] <wjp> SugarCube: are you around?
[20:04:46] <-- SHODAN has left IRC (Remote host closed the connection)
[20:06:42] --> SHODAN has joined #nuvie
[21:17:53] <CIA-68> nuvie: 03malignantmanor * r1396 10/nuvie/trunk/ (16 files in 9 dirs):
[21:17:54] <CIA-68> nuvie: * GUI, pathfinder, save, screen, sound, and usecode directories: initialize
[21:17:54] <CIA-68> nuvie: member variables in the constructor
[21:34:58] --> Yuv422 has joined #nuvie
[21:56:02] --> Darrenor64 has joined #nuvie
[22:22:25] <-- Yuv422 has left IRC (Quit: Yuv422)
[23:10:50] --> Kirben has joined #nuvie