#exult@irc.freenode.net logs for 29 Dec 2002 (GMT)

Archive Today Yesterday Tomorrow
Exult homepage

[00:03:01] --> Kirben has joined #exult
[00:03:02] --- ChanServ gives channel operator status to Kirben
[00:28:24] <Coren_> Kirben!!
[00:28:44] <Kirben> Hi
[01:29:02] <-- Fingolfin has left IRC ("night")
[01:35:28] <-- Dark-Star has left IRC (""sleep mode :-)"")
[03:40:46] --> Colourless has joined #Exult
[03:40:46] --- ChanServ gives channel operator status to Colourless
[03:43:55] <-- Colourless has left IRC (Client Quit)
[04:24:18] <-- matto has left IRC ("This feeling.. inside me. Finally found my life, I'm finally free. No longer torn in two.")
[05:26:00] --- DarkeZzz is now known as Darke
[06:39:33] --> ShadwChsr has joined #exult
[07:08:24] <ShadwChsr> think this code is too slow?
[07:08:30] <ShadwChsr> for (long i = 0; i < size; i++)
[07:08:30] <ShadwChsr> DataStream->get(buffer[i]);
[07:09:41] <Darke> Depends. If it's doing that 10 times a second for the entire execution time of your program, then yes there's ways to speed it up whilst probably obfusicating it more, but otherwise it looks fine. *grin*
[07:10:00] <ShadwChsr> using that to load data from binary files, PNG files in fact
[07:12:40] <Darke> Shouldn't really be a problem, though I would advise using a library for that sort of stuff. *earpoints to libpng, or the sdl image libs*
[07:13:43] <ShadwChsr> dont need libpng - just the function "D3DXCreateTextureFromFileInMemory" :)
[07:14:04] <ShadwChsr> Direct 3D Extensions does the PNG loading for me, just gotta pass it a pointer to the data in memory ;)
[07:15:13] <Darke> Whatever works.
[07:15:58] * Darke admits he still doesn't understand people's urge to use that ugly mfc/directx stuff though. *grin*
[07:16:14] <ShadwChsr> I put the entire renderer system into a DLL, that way I can swap in different things like new versions of Direct 3D, or DirectDraw, or SDL
[07:16:20] <ShadwChsr> DirectX is great, but MFC is nasty as heck
[07:17:18] <ShadwChsr> I guess your an SDL god? :)
[07:18:26] <Darke> Nope. I'm a "failed to get into directx windows coding becuse the libraries were crap compared to even the stuff I used in dos" person. *grin*
[07:19:44] <ShadwChsr> When was that? :)
[07:19:44] <ShadwChsr> 5? :)
[07:19:47] * Darke hasn't done much more then the token 'write a basic sdl program' work with sdl.
[07:19:51] <ShadwChsr> starting at about 7 it got pretty good, at 8 they overhauled it and its awesome now :)
[07:20:44] <Darke> Would have been around then. I was using the free Allegro libraries with DJGPP. Clean, easy to use though the docs weren't really up to scratch, though they shined compared to dx's at the time.
[07:22:45] <Darke> Yes, but what's the point of programming with it now? Back at v5 it was *the* toolkit to use. Now there's no point coding to one set of libraries, when you're trying to target your expensive game on as many platforms as possible, windows along with a console or two. There's no point locking yourself into a library set, when something like sdl, or opengl is supported on all the platforms where windows isn't.
[07:24:00] <ShadwChsr> well, thats just it though - SDL & openGL is only really mac/windows/linux
[07:24:23] <Darke> Don't mind me, I'm just a cynical rabbit who thinks all OSes suck and is waiting for something better to come along. *grin*
[07:24:24] <ShadwChsr> DirectX gets you xbox/windows, and I believe gamecube & ps2 are proprietary
[07:24:56] <ShadwChsr> thats why I'd rather have my renderer abstracted into a seperate library, so I can swap in whatever I feel like - makes the game code cleaner, less porting issues
[07:25:18] <ShadwChsr> just need to worry about silly things like windowing (1-2 classes), and a few file operations
[07:26:53] <Darke> What's to stop you from writing an underlying interface to sdl that translates the primitives to whatever platform you want to? It's how it was translated to the Dreamcast, and I'm sure there's a port to the PS2 at least. And it'll work with the Xbox, since it works ontop of directx.
[07:26:54] <ShadwChsr> these days though theres almost no point to porting :(
[07:27:18] <Darke> Why?
[07:27:31] <ShadwChsr> well running through SDL means that you're abstracted from the hardware by one more layer, usually means a performance hit or limitations
[07:27:40] <ShadwChsr> Because 99.9% of people run windows :P
[07:27:49] <ShadwChsr> and the 0.1% are linux people who dont pay money for software ;)
[07:28:02] <ShadwChsr> Well, thats exagerating a little, but still pretty close to the truth
[07:28:51] <Darke> And? You're optimising prematurely on purely a hypothesis. Write the code then find what is slowing down and optimise those to 'raw' platform dependant calls. It's supid to do otherwise. *grin*
[07:28:57] <ShadwChsr> that said, I'm still programming it so it *can* be ported
[07:29:56] <Darke> 99% of people run windows? You're automatically discounting the entire population of people which have consoles which is a *huge* market share. *grin*
[07:30:36] <ShadwChsr> True, except I'm not planning on doing a PS2 release of a free 2d rpg ;)
[07:31:19] <ShadwChsr> To a console gamer that would be like releasing "pong 128"
[07:31:20] <ShadwChsr> ;)
[07:32:59] <Darke> Why not? We were considering a DC release of exult at one point in time? What about PDA's? The fact we used SDL meant it was much easier for Artaxerxes to port it to the Zaraus. *grin* You'd be surprised what people play where.
[07:33:59] <Darke> IIRC I remember seeing a pack of half a dozen old arcade games on a cd for use with the playstation too. Pong/Asteroids/Gauntlet, etc. People play the weirdest things. *grin*
[07:34:24] <ShadwChsr> Well I dream of console releases, main problem is the dev kits, and licensing - sony/nintendo/microsoft take a cut of the software... i cant think of any "budget" console games ;)
[07:35:05] <ShadwChsr> but who knows, XBox live is probably the best bet, since it would be perfect for a MMORPG game (need that HDD for updates!)
[07:35:09] <ShadwChsr> Annnnyhow ;)
[07:35:55] <Darke> Yes, we kinda got distracted from a 'is this code ok' topic didn't we? *grin*
[07:36:14] <ShadwChsr> yep ;)
[07:36:23] <ShadwChsr> The good news is my system can now load textures ;)
[07:37:07] <ShadwChsr> Guess I should write the world render code now.. blah ;)
[07:37:22] <ShadwChsr> Ever get that whole pentagram sort order figured out?
[07:38:06] <Darke> I think Colourless did in the end. Don't know if he's implemented it yet or not.
[07:38:16] <ShadwChsr> drat where is he?? ;)
[07:38:35] <ShadwChsr> I swear that there is NO information sorting iso RPG style graphics anywhere
[07:38:53] <ShadwChsr> at most I find info on how to do the whole Ultima 1 thing of single tiles you "hop" over :P
[07:39:26] <ShadwChsr> I eventually gave up and wrote code that slices the source files into actual iso-tile-sized chunks into the resource files, but that doesn't help with player movement
[07:40:17] * Darke nods.
[07:40:47] <ShadwChsr> even bought some books and they were like "here's how to make civ1 graphics.." <grumble>
[07:41:03] <ShadwChsr> I doubt there is any computer game programming book actually written by a professional game programmer ;)
[07:41:09] <ShadwChsr> I've yet to see one ;)
[07:42:43] <Darke> Yes, most of the one's I've seen are completlely pathetic. *grin*
[07:46:45] <ShadwChsr> How do I make a 2D dynamic array? :)
[07:46:52] <ShadwChsr> tried long *somearray;
[07:47:03] <ShadwChsr> somearray = new long[10][10]; and it crabbed at me
[07:49:20] <Darke> What you want is a `long **somearrayl;` then you need to do `somearray = new long *[10];` then fill up each entry in the array. I think. Or you could just use something sane like an array of std::vectors. *grin*
[07:50:35] <ShadwChsr> nah need something simple and very fast, for the ground terrain of the map
[07:50:41] <ShadwChsr> which will always have a value
[07:51:02] <ShadwChsr> this compiled, no idea if its right...
[07:51:11] <ShadwChsr> long *Ground;
[07:51:17] <ShadwChsr> Ground = new long[Width,Height];
[07:51:18] <ShadwChsr> :)
[07:52:14] <Darke> Might work. *grin* I can't remeber really. It's been years since I've tried to create one of those.
[07:52:49] <ShadwChsr> how do I determine the size of it? :)
[07:53:02] <ShadwChsr> sizeof() returns the base type size, in this case 4 (32bit integer..)
[07:53:10] <Darke> There's no way. You need to store the width/height somewhere.
[07:53:17] <ShadwChsr> Probably faster anyhow
[07:53:27] <ShadwChsr> performance-wise
[07:55:38] <ShadwChsr> ZeroMemory(Terrain,sizeof(Terrain)*SizeX*SizeY); <- think that's safe? :)
[07:56:38] <Darke> Err... should work. *grin*
[07:57:10] <ShadwChsr> probably will be 1 byte off so that it crashes only when the moon is full :P
[07:58:08] <Darke> Nah. What will probably happen is you'll trip over an architecture/compiler/whatever that pads each array to a word/dword boundry or something and everything will be off. *grin*
[08:00:56] <ShadwChsr> ooo fun
[08:01:06] <ShadwChsr> but its so much faster than doing two for loops ;)
[08:08:27] <Darke> Maybe. Have you tested the perfomance of the system and determined that this is *the* bottleneck yet?
[08:08:49] <ShadwChsr> Who said I had a bottleneck? :)
[08:09:10] <ShadwChsr> It's running pretty good, I just like to optimize as much as possible as I write
[08:09:28] <ShadwChsr> and one of the classic bottlenecks is the tight loop :)
[08:10:05] <ShadwChsr> FStream->Read(char) works fine, but FStream->Read(char,size) which theoretically would be faster doesn't work, since it looks for delimiters (useless when reading binary data)
[08:10:36] <ShadwChsr> so I tossed it into a tight loop reading 1 char at a time instead, i just wondered if there was a better alternate function that reads multiple bytes of data properly
[08:10:38] <ShadwChsr> :)
[08:13:33] * Darke is of the opinion that doing something that 'seems to work' but might break in the future rather then something you know will work no matter what but is supposed to be slower, is silly unless you've *proved* that you're going to need said speed. *grin* But whatever floats your boat.
[08:14:39] <ShadwChsr> True, but I was tossing out the questions in case you knew of a faster method in which we were sure would be dependable ;)
[08:16:42] * Darke grins.
[08:18:37] <ShadwChsr> Im gonna hassle you some more and toss out another design question ;)
[08:19:09] <ShadwChsr> As opposed to having two variables in the "Game" class with the current screen position (where in the world it's showing)...
[08:19:52] <ShadwChsr> i was thinking of building a "Camera" class or a "View" class, one would always exist for the one centered on the player, but others could be created & swapped to as well, and the class could have effects
[08:20:04] <ShadwChsr> for things like earthquakes, camera movement, etc
[08:20:36] <ShadwChsr> Question is, what should it be called? :) and should I only have one, the screen, or should I have multiple ones, and swap between them? :)
[08:21:07] * Darke suspects Colourless is the person you'd want to ask about this. He's the one handling most of the graphics stuff in Pentagram and likely to know at least which one's more likely to be 'better'. *grin*
[08:22:21] <ShadwChsr> yeah I better not hassle you too much or you'll stop answering the difficult questions
[08:22:27] <ShadwChsr> :)
[08:22:45] <Darke> Not really. It's just a case that I really don't know how to answer it. *grin*
[08:45:42] <ShadwChsr> whats the faster type of floating point?
[08:46:01] <ShadwChsr> I know that processors are usually only optimized for one.... is it "double" or "single"(float)?
[08:47:35] <Darke> Can't honestly tell you. Your best bet would be to create a quick test harness to find out if you're that interested. *grin* I would assume 'float' though, since it's stored in a smaller variable which can be thrown into registers easier.
[08:48:05] <ShadwChsr> and its 32bit ;)
[08:50:19] <ShadwChsr> Start with doubles because they've got more precision. On x86 the FPU treats floats & doubles the same internally, so there is no speed difference (aside from the extra memory bandwidth for double loads/stores and larger cache footprint). If profiling suggests that memory bandwidth is a problem, consider switching to floats.
[08:50:25] <ShadwChsr> Single (32 bits): 1.712 s
[08:50:28] <ShadwChsr> Double (64 bits): 1.733 s
[08:50:37] <ShadwChsr> So the only difference is precision & memory usage ;-)
[08:51:23] <Darke> Looks like it. Probably just best choosing which is the best for you.
[09:38:15] <-- ShadwChsr has left IRC ()
[09:42:03] <-- Coren_ has left IRC (capek.freenode.net irc.freenode.net)
[09:42:03] <-- matto|wookin has left IRC (capek.freenode.net irc.freenode.net)
[09:42:17] --> Coren_ has joined #exult
[09:42:17] --> matto|wookin has joined #exult
[12:24:33] --> wjp has joined #exult
[12:24:33] --- ChanServ gives channel operator status to wjp
[12:24:35] <wjp> hi
[12:32:28] <wjp> Ground = new long[Width,Height]; ? :-)
[12:32:56] <wjp> tsk tsk :-)
[12:36:48] * Darke is pretty sure there's something very dubious about it, but as he says he doesn't use such silly things. *grin*
[12:37:38] <wjp> Width,Height == Height :-)
[12:38:04] * Darke suspected it was something like that.
[12:39:55] <wjp> anyway, it'll work, as long as you're not overly attached to the memory behind that array ;-)
[12:40:09] * Darke snickers.
[12:40:37] <Darke> Most brokenness will 'work' in C/C++. *grin*
[12:50:58] <Coren_> Ground = new long[Width,Height]; does not do what it looks like it does.
[12:51:25] * Darke nods. 'S what wjp said. *grin*
[12:54:08] * Darke wonders if he should disappear for #exult for a while, he seems to get more talking about coding done then actual coding. *grin* Might help even up the balance whilst not actually *doing* any more coding.
[12:55:29] <Coren_> I manage to do both. LoW now has wearables and weildables. :-)
[12:56:02] * Darke yays 'n stuff!
[12:56:32] <Coren_> I was tried of my Avatar being in uderwear. :-)
[13:01:41] * Darke snickers.
[13:02:32] <Coren_> wanna new executable? :-)
[13:03:03] <Coren_> ShadwChsr sounds like he's been properly assimilated in the Collective. *sigh*
[13:03:42] <Darke> Thanks, but no thanks. Don't even have any of the Underworlds.
[13:03:53] <Coren_> Tsk, tsk.
[13:05:51] <Coren_> You don't know what you're missing. (With the originals, with LoW you know exactly what you are missing: a pretty but unplayable implementation)
[13:08:32] * Darke snickers.
[13:16:32] <-- Kirben has left IRC (Read error: 104 (Connection reset by peer))
[13:23:58] --> Colourless has joined #Exult
[13:23:58] --- ChanServ gives channel operator status to Colourless
[13:24:22] <Colourless> *cough* *splutter*... Hi!
[13:24:44] <Darke> Hi!
[13:25:02] <wjp> hi
[13:25:09] <Darke> You're looking a bit... err... *squint* Well not unwell, but you're certainly coughing a lot.
[13:25:24] * wjp casts Vas In Mani on Colourless
[13:25:38] <Colourless> :-)
[13:25:49] * Colourless is in all reality perfectly fine
[13:27:22] <Colourless> from earlier: "On x86 the FPU treats floats & doubles the same internally, so there is no speed difference (aside from the extra memory bandwidth for double loads/stores and larger cache footprint)"
[13:27:59] <Colourless> this is not true entirely. floats are faster, if you set the FPU into single precision mode
[13:30:15] * Darke nods. Makes sense. Don't you normally use straight ints if you're looking for raw speed anyway?
[13:31:24] <Colourless> yes if possible
[13:32:21] <Colourless> if using excessive numbers of divisions it is possible for floating point to be faster than integer
[13:34:53] <Darke> Neat! Makes sense. *files info away*
[13:36:06] <Colourless> but, only in certain circumstances, and assuming certain coder optimizations. integer division is slow, and so is floating point too. However, you can do float*(1/float)
[13:36:44] <Colourless> a fmul can in some cases be faster than idiv
[13:51:18] * Darke noddles.
[13:51:21] <-- Colourless has left IRC (Read error: 104 (Connection reset by peer))
[13:51:41] * Darke makes a mental note *not* to nod so vigorously next time.
[13:52:29] <wjp> it kind of looks like freenode doesn't actually ping clients. I've seen connections get closed quite a lot right after somebody said something
[13:54:07] <Darke> I'd guess not. It often takes *ages* for nicks to drop.
[13:57:43] <Coren_> Wooohoo! Talking to Dupre now creates, modifies and hands the key to the Avatar.
[13:58:14] <Coren_> Now to implement keys. :-)
[14:01:30] <Darke> Yayfun!
[14:07:26] <wjp> hehe, "Thou art a brave @GS102" :-)
[14:07:37] * Coren_ chuckles.
[14:07:54] <Coren_> I didn't commit the key thing yet, Willem. Gimme 5 minutes to make the key actually work first. :-)
[14:08:07] <wjp> aww :-)
[14:08:36] <wjp> @GS102 is probably supposed to be man/woman?
[14:08:51] * wjp can't quite remember the literal conversations from the original :-)
[14:09:13] * Coren_ nods.
[14:09:33] <Coren_> I'm not sure why that substitution doesn't work; looks like there isn't 102 items on the stack or someting.
[14:23:07] <Coren_> There. Commited. This *should*, in fact, also make other keys work.
[14:25:28] <Coren_> Another point to remember about int vs float is that most CPUs can also do both simultaneousy; the optimal setup is when you interleave and schedule operations on both integers and floats.
[14:26:43] <Coren_> Hey, cool, Dupre's key working now means it is possible to leave the Castle without cheating with a map command. : -)
[14:33:42] <Coren_> Aha! Figured out why @GS102 doesn't get expanded.
[14:33:55] <Coren_> This is evil. I have to expand @things recursively.
[14:34:03] <wjp> yes, I just figured that out too :-)
[14:35:27] * Coren_ groans. This is stupid. They expand to a fixed @expansion.
[14:44:39] <Coren_> The key thing works for you, Willem?
[14:47:05] <Coren_> Hmph. Little help *that* was. I now properly expand @GS102, but it expands to nothing.
[14:49:25] <Coren_> I think I may have a boo-boo with @GS expansion anyways, Borne's password seems broken as well.
[14:57:42] * Coren_ boggles.
[14:58:00] <Coren_> Disassembling Dupre's babl code shows *no* stores to global 102
[14:58:32] <Coren_> @SS1 must be the culprit, then
[15:01:17] <Coren_> Hmph. That was it, @SS1 didn't expand to the right string. Perhaps I needn't have worried with recursive expansion after all. :-(
[15:02:11] * Coren_ checks with Borne
[15:24:11] <wjp> sorry, had my head stuck in a book :-)
[15:24:13] <wjp> back now
[15:24:58] <Coren_> Auuugh
[15:25:05] <Coren_> I don't get it.
[15:25:24] <Coren_> if I make @SS grab the value relative to the stack pointer, some conversations work and some break
[15:25:47] <Coren_> If I make @SS grab the value relative to the *frame* pointer, then those that didn't work do, and those that did break.
[15:26:11] <wjp> hm, very weird
[15:26:38] <wjp> the 'use' cursor is nice :-)
[15:26:48] * Coren_ smiles. Thanks.
[15:27:48] * wjp hmms.. it seems I've been teleported back to the castle almost immediately after getting down into the sewers
[15:28:02] <wjp> although it worked ok the second time I tried
[15:28:26] <Coren_> Bug with the direction you face when using a stair vs. momentum. I haven't found a clean solution for that.
[15:28:38] <Coren_> You just sometimes immediately hit the trigger back,
[15:28:54] <wjp> i.e., walk slowly when entering teleporters?
[15:29:04] * Coren_ nods. That's the workaround for now.
[15:29:24] <Coren_> Releasing the walk key/button as you teleport helps too.
[15:29:35] <wjp> "Psst! Ma'am!" ? :-)
[15:29:44] <wjp> Fissif seems to be having some trouble seeing in the dark :-)
[15:29:46] <Coren_> Yeah, that's related to that @SS bug
[15:30:40] <Coren_> Hey, does fissif give the watch back?
[15:30:44] <Coren_> In theory, he *should*
[15:30:44] <wjp> yes
[15:30:52] <Coren_> Goodie.
[15:31:11] <Coren_> I just *love* it when I implement feature x and that just makes feature y work as a side effect. :-)
[15:33:24] <Coren_> You shouldn't be able to put an object recusively inside itself anymore. :)
[15:33:28] <Coren_> Erp.
[15:33:35] <Coren_> Where did *that* come from?
[15:33:42] <Coren_> Yesterday. :-)
[15:36:07] * Coren_ struggles to understand x_clock() and fails.
[16:10:03] <Coren_> AAAAAAUGH!!! May the ghost of Babbage forever stuff TTL binary counters in DIPs with the pins twisted and sticking out in whoever programmed that string substitution code's breakfast cereal!
[16:10:26] <Coren_> @SS1 refers to BP+0!! They count from *1*
[16:10:39] * Darke laughs!
[16:13:28] * Coren_ grumbles about silly humans who number things starting with 1.
[16:13:46] * Darke seconds Coren_.
[16:15:36] <Coren_> cvs commit comment: Fix to @Sx substitution. Real Programmers number things from 0, not 1!
[16:17:52] <Coren_> Actually, I'm probablt not being fair, this was probably written to accomodate storyline writers who could not wrap their minds about such things as the zeroeth variable. :-)
[16:19:08] <wjp> lol
[16:19:23] * Darke nodnods. Same thing for u8/crusader's usecode too I think. *grin*
[16:19:38] <wjp> Darke: ?
[16:20:06] <Darke> wjp: Thinking scripting stuff, rather then opcode stuff. *grin*
[16:20:15] <wjp> ah :-)
[16:20:26] <Darke> wjp: Also thinking probably 90% asleep at the moment. Incoherence rules the day. *grin*
[16:20:39] <Coren_> Ah, good. Now the goblin tower passwords work.
[16:21:00] <wjp> Fissif has improved his night vision too ("Psst! Mister!")
[16:21:09] * Coren_ grins.
[16:22:18] * Coren_ implements gronk_door() so that goblins can /actually/ open the doors when given the passwords.
[16:23:39] <wjp> gronk? :-)
[16:24:02] <Coren_> gronk seems to be LGS's internal buzzword for 'do something generic with'
[16:25:57] <wjp> heh :-)
[16:26:00] * Darke seems to remember that from SS2 as well. Though he might be thinking of something else.
[16:26:09] <wjp> did you ever see U8's debugging symbols in u8.exe?
[16:26:32] <wjp> they had a 'Yamm' class, with functions named: flimFlam, scram, heyMan, damn, shazamm :-)
[16:26:49] * Coren_ chuckles.
[16:28:59] <Coren_> Actually, if I get trading working after that it *should* become possible to walk through 99% of the storyline.
[16:29:29] * Darke mumbles something about 'TonysBalls' too.
[16:29:49] <Darke> What were the other bizzare function names? *grin*
[16:30:00] * Darke thinks we should make a list sometime.
[16:52:40] <Coren_> Voila! Mobiles can now gronk doors. :-)
[16:53:14] <Coren_> This is the part of a project I like best; when enough infrastructure is in place that adding features is a simple matter and progresses quickly.
[16:53:45] <Coren_> wjp: 'map 14' has a nice password/door combo
[17:00:21] <Coren_> Talking about SS2; I was mildly insulted. :-) On their mailing list, one of 'em took credit for LoW's existence seeing how /they/ did all the hard work of understanding the engine. Of course, the fact that it wasn't until long after I had working code that I met Michael and he pointed me to his copy of uw-formats.txt
[17:00:43] <Coren_> ... didn't seem to be taken into account. :-)
[17:00:50] * Darke snerks.
[17:00:59] <Coren_> "Snerk"?
[17:01:08] <Darke> Wasn't it SS1 which had the idental engine?
[17:01:23] <Coren_> Actually, all of 'em have near-identical engines.
[17:01:27] <Darke> "The sound a smirk makes." *grin*
[17:01:48] * Darke is pretty sure SS2 had a thief engine, though SS1/UW1/UW2 were similar.
[17:01:55] <Coren_> I might be confused.
[17:02:29] <Coren_> I m ight mean SS1. Does the tsshp implement SS1 or SS2?
[17:02:36] <Darke> SS1
[17:02:37] <Coren_> Then it was indeed SS1 that I meant.
[17:03:17] <Coren_> At any rate, I tought it rather tacky that they would claim LoW's existence is thanks to them without checking first. :-)
[17:04:35] * Darke snickers.
[17:08:07] <wjp> Coren_: yup, password works :-)
[17:09:00] <wjp> hm, but it segfaulted when I gave the password to the guard upstairs
[17:14:08] <Coren_> Odd.
[17:14:11] <Coren_> Works here
[17:16:52] <wjp> also the guard upstairs has a non-goblin portrait
[17:17:24] <wjp> segfault was in:
[17:17:26] <Coren_> Yes, I have a number of NPCs who have the wrong portraits. Can't figure out how to get that info out of the data files yet.
[17:17:28] <wjp> 0x08055809 in gronk_door (c=@0xdebd4cc) at babl.cc:462
[17:17:28] <wjp> 462 if(e->type==320 || e->type==321)
[17:17:44] <wjp> (gdb) print e
[17:17:44] <wjp> $1 = (class Entity *) 0xff6d6d89
[17:18:30] <wjp> x = -25, y = 36
[17:19:10] <Coren_> It's trying to gronk a door outside the level, for some reason...
[17:19:37] <Coren_> Which goblin exactly? The one I see just asks for the password to not attack, they aren't opening doors.
[17:20:30] <wjp> I get the password from the captain, give it to the guard. He opens a door. I go up the stairs behind the door he opens. Pull lever, talk to guard on other side of door. Ask to see the prisoner
[17:20:40] <Coren_> Aha.
[17:20:48] * Coren_ tries
[17:22:20] <Coren_> He asks me the password, and just goes 'Okay, Go ahead' when I give it to him.
[17:23:09] <Coren_> babl: conversation 20 ready
[17:23:09] <Coren_> babl: portrait 19
[17:23:10] <Coren_> babl: unimplemented call: x_traps(10001, 43)
[17:23:10] <Coren_> babl: get_quest(3) = 0
[17:23:11] <Coren_> babl: get_quest(134) = 2
[17:23:11] <Coren_> babl: unimplemented call: x_traps(1, 43)
[17:23:12] <Coren_> babl: npc_goal = 7
[17:23:14] <Coren_> babl: write (7) to readonly global 'npc_goal'
[17:23:26] <Coren_> He's not even trying to gronk a door
[17:24:27] <Coren_> Could we have different versions of the babl code, somehow?
[17:24:30] <wjp> babl: conversation 20 ready
[17:24:30] <wjp> babl: portrait 19
[17:24:30] <wjp> babl: unimplemented call: x_traps(10001, 43)
[17:24:30] <wjp> babl: get_quest(3) = 0
[17:24:30] <wjp> babl: get_quest(134) = 8
[17:24:31] <wjp> Fatal signal: Segmentation Fault (SDL Parachute Deployed)
[17:24:59] <Coren_> 134 is the specific password, so it's normal it isn't the same as me
[17:25:12] <Coren_> This is soooo odd!
[17:25:13] <wjp> 'babl' sounds really funny to me, btw... 'babbel' is a form of a verb meaning something like 'chat' in dutch :-)
[17:25:41] <Coren_> 'babl' is the name of the interpreter. :-)
[17:26:19] <Coren_> 'babble' also means something near 'chat' in english.
[17:26:57] <wjp> hm, right, now that you mention it.. something like random rambling?
[17:27:11] <Darke> More specifically it means to spew random rubbish that goes on and on and on and on and on and on and... err.. whatever.
[17:27:19] * wjp nods
[17:27:20] <Coren_> ac80b0e91f464561388ec06d09ed6ae9 /home/marc/uw2/data/cnv.ark
[17:27:38] <Coren_> md5sum
[17:27:41] <wjp> same here
[17:28:22] * Coren_ boggles.
[17:29:50] <Coren_> I don't get it.
[17:30:00] * Darke puts Coren_'s eyes back in his head.
[17:30:03] <Coren_> Hit 'I' while your cursor is over the goblin that crashes you.
[17:30:13] * wjp blinks
[17:30:15] <Coren_> Tell me the number it gives you.
[17:30:22] <wjp> it works when I enable 'CHECK_CODE'
[17:30:38] <Coren_> AAAAAUGH! Heisenbug!
[17:30:49] <Darke> Someone's not zeroing a variable correctly? *grin*
[17:31:11] <wjp> entity 2616: type 74
[17:31:12] <Coren_> CHECK_CODE does not, in theory, touch anything.
[17:31:40] <Coren_> Yeah, 2616 is the same goblin as I.
[17:31:44] <Coren_> as me
[17:32:49] <Coren_> Try disabling CHECK_CODE again and doing a make clean?
[17:32:59] <wjp> already tried that earlier
[17:33:05] * Coren_ nods.
[17:35:14] * Coren_ is completely unable to reproduce that bug.
[17:35:47] <Coren_> What do you answer, exactly, to Borne and the first goblin before you talk to the second?
[17:36:04] <Coren_> I do: (borne) 2-2-1-1 then (guard) 3-password
[17:36:26] <wjp> me too
[17:36:42] <wjp> then go up stairs, pull lever
[17:37:01] <wjp> (guard) 2-3-password
[17:37:17] <wjp> ah, now it crashed with CHECK_CODE too
[17:37:53] <wjp> it was on offset 8d4, if I read the output correctly
[17:39:11] <Coren_> The same actions on my side never crash, CHECK_CODE or not, compiled with or without debugging, even after make clean.
[17:39:35] <wjp> does it take the same code path through the script?
[17:40:09] <Coren_> I don't know which code path it takes through yours. :-)
[17:40:10] * wjp browses through the output a bit
[17:40:59] <wjp> let's see... from "get_quest(134) = 6"...
[17:42:08] * wjp hmms
[17:42:22] <wjp> I'll list the branches I get
[17:42:27] <Coren_> Do you even get prompted for the password?
[17:42:31] <wjp> yes
[17:42:36] <wjp> it crashes after giving it
[17:42:42] <Coren_> Ok, then only trace from 'extern 3'
[17:43:26] <wjp> hm, don't see that
[17:43:47] <wjp> it crashes on an extern 28, and I see an extern 7, but no 3
[17:44:05] <Coren_> extern 3 is babl_ask(), i.e.: the prompting itself. :-)
[17:44:12] * wjp wonders how far up that is
[17:44:19] <Coren_> No worry.
[17:44:30] <Coren_> extern 28 is the gronk_door(), what is on your stack then?
[17:44:38] <wjp> 8d4: extern 28 [ 3 143 142 141 0 0 0 1 1 27 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 53 52 51 1016 ]
[17:45:15] <wjp> ah, there's extern 3
[17:45:35] <Coren_> Hm. This is correct; show me the lines before the extern 28 where it stores into 141 142 143?
[17:45:43] <Coren_> 8ba down
[17:46:49] * wjp points at query window
[17:46:53] * Coren_ nods.
[17:47:15] <Coren_> I don't get it-- the call is made correctly, the values put on the stack are correct.
[17:47:23] * Coren_ ponders.
[17:47:39] <Coren_> Can you put a breakpoint on gronk_door() and try again?
[17:47:44] * wjp nods
[17:47:45] <Coren_> (Skip the first call, obviously)
[17:48:48] <wjp> ok, there
[17:49:11] <Coren_> Ok, hang on a sec, I want to do the same so we can compare
[17:49:53] <Coren_> Shit, I forgot to notice the password. :-)
[17:51:05] * Coren_ restarts and talks to Borne again.
[17:51:35] <wjp> :-)
[17:52:29] <Coren_> There we go
[17:52:59] <Coren_> ok, after assignment x and y here are
[17:53:06] <Coren_> (gdb) p x
[17:53:06] <Coren_> $1 = 1
[17:53:06] <Coren_> (gdb) p y
[17:53:07] <Coren_> $2 = 1
[17:53:21] <wjp> x = 1 , y = 36
[17:53:28] <wjp> um, oops
[17:53:31] <wjp> that was one too far
[17:53:34] <Coren_> feep?
[17:53:40] <wjp> that was after the adjust_xy
[17:54:06] <Coren_> Ok; I have the same wrong values here.
[17:54:17] <Coren_> It's just happenstance that my end does't crash then...
[17:55:19] <Coren_> hmmm. What does p c.data[c.data[c.sp-(2)].v] look like on your end?
[17:55:35] <wjp> 0, vInt
[17:56:08] <Coren_> As far as I can tell, it's *really* trying to gronk a door completely outside the map.
[17:56:35] <Coren_> There is, of course, no door to be found there
[17:57:20] <Coren_> Hmmm. The coordinates (1,1) seem to have been used in lots of place as generic placeholders.
[17:57:52] <Coren_> Looks like it's the place where things that no longer exist but once used in previous revisions of the code live.
[17:58:48] <Coren_> So it's either special cased in UW2 or they rely on the tile existing and being empty always.
[18:01:15] <Coren_> wjp: try the commited version.
[18:02:48] <wjp> seems to work
[18:03:13] <Coren_> Yeah, I'm not sure why it tries to gronk_door(0, 1, 1) there anyways, that goblin isn't supposed to open any door.
[18:04:24] <Darke> Limitations of the scripting engine? Do most of the goblins open doors or something?
[18:05:06] <Coren_> Almost none do. Might be that it used to open one and no longer does; or might be that they reused the code from the one downstairs since it basically asks the same questions.
[18:05:41] <Darke> *nod* And just pointed it to the generic 'null' door, or something.
[18:05:45] <Coren_> I've special cased out (1,1) in gronk_door(). Those are never valid tile coordinates regardless of the map anyways.
[18:07:54] <Coren_> It seems obvious from many details that the babl code wasn't written by programmers.
[18:08:24] <Coren_> For instance, there is a lot of obvious cut-and-paste code that isn't really needed, and there are things done in 2-3 different ways.
[18:08:31] <Coren_> even though they are identical.
[18:09:40] <Coren_> Saying 'sir' and 'ma'am' is done at least 3 different ways. sometimes using sex(), sometimes using the play_sex global, sometimes using an intermediate conditionnal.
[18:09:59] <Coren_> Sometimes more than one way in the same conversation. :-)
[18:18:33] * Darke nods. It would seem that u8/crusader was a little more... ordered in their script-type construction. Most of it is relatively consistant.
[18:19:03] * Darke really however must sleep else he'll be suffering qwertyitis Real Soon Now(tm). *grin* Night!
[18:19:24] --- Darke is now known as DarkeZzz
[18:21:10] --> matto has joined #exult
[18:21:24] <Coren_> wjp: Hurry up already, I want to play U8 again soon. :-)
[18:41:48] <wjp> lol
[18:41:58] <wjp> you'll have to prod Colourless to finish the graphics part :-)
[18:42:10] <wjp> bbl, dinner
[18:42:11] <-- Coren_ has left IRC (Remote closed the connection)
[20:17:16] --> Fingolfin has joined #exult
[20:17:17] --- ChanServ gives channel operator status to Fingolfin
[20:20:25] <wjp> hi Fingolfin
[20:22:24] --> Coren_ has joined #exult
[21:20:10] <-- Fingolfin has left IRC ("42")
[21:22:41] --> Hellfried has joined #exult
[21:52:49] * Coren_ is back
[21:52:58] * Coren_ is away: foodness
[21:56:30] <-- matto has left IRC ("This feeling.. inside me. Finally found my life, I'm finally free. No longer torn in two.")
[22:01:16] <-- Hellfried has left IRC ("leaving")
[23:25:04] --> slacked has joined #exult
[23:58:35] <-- slacked has left IRC ("Client Exiting")