#gemrb@irc.freenode.net logs for 21 Mar 2011 (GMT)

Archive Today Yesterday Tomorrow
GemRB homepage

[00:07:43] --> raevol has joined #GemRb
[00:22:04] <fuzzie_> ok, Attack action decoded, doesn't seem too crazy
[00:23:15] <pupnik> i once hacked little big adventure to continously scroll with the character
[00:23:28] <pupnik> one little instruction
[00:23:34] <fuzzie_> it always irritated me that it doesn't :P
[00:24:38] <pupnik> you decoding anhkeg attack?
[00:25:05] <fuzzie_> am decoding the standard attack function
[00:26:07] <fuzzie_> does things like making you move towards the target, battle cries, unusable/unreachable errors, range checks, autopausing
[00:27:03] <pupnik> cool
[00:27:44] <fuzzie_> i fit my written copy on 3 pieces of A4 :)
[00:29:53] <-- Bo_Thomsen has left IRC (Quit: Leaving.)
[00:40:33] <pupnik> does it help explain how attack is supposed to work?
[00:50:32] <-- Maighstir has left IRC (Quit: ~ Trillian Astra - www.trillian.im ~)
[00:53:05] <pupnik> hmm level drain is supposed to be only healable by restoration
[04:02:35] <-- tomprince has left IRC (Ping timeout: 252 seconds)
[04:52:34] <raevol> hello
[04:52:52] <Lingerance> hi
[05:48:45] <-- raevol has left IRC (Quit: Leaving.)
[07:37:56] --> lynxlynxlynx has joined #GemRb
[07:37:57] <-- lynxlynxlynx has left IRC (Changing host)
[07:37:57] --> lynxlynxlynx has joined #GemRb
[07:37:57] --- ChanServ gives channel operator status to lynxlynxlynx
[07:43:42] --> Bo_Thomsen has joined #GemRb
[08:14:39] --> edheldil_ has joined #GemRb
[08:17:46] --> adominguez has joined #GemRb
[08:20:11] <-- edheldil_ has left IRC (Ping timeout: 248 seconds)
[08:21:17] <-- Bo_Thomsen has left IRC (Quit: Leaving.)
[08:44:37] --> lubos has joined #GemRb
[09:05:56] <edheldil> Good morning!
[09:12:42] --> Demitar has joined #GemRb
[09:47:46] <-- |Cable| has left IRC (Remote host closed the connection)
[09:50:40] <fuzzie_> our attack stuff isn't really too different to original :)
[09:50:43] --- fuzzie_ is now known as fuzzie
[09:50:54] --- ChanServ gives channel operator status to fuzzie
[09:51:45] <wjp> that sounds like a good thing :-)
[10:03:13] <fuzzie> sure, it is good
[10:03:57] <wjp> hm, you found debugging symbols?
[10:04:36] <fuzzie> i did indeed
[10:05:25] <fuzzie> just function names
[10:05:29] <-- lynxlynxlynx has left IRC (Remote host closed the connection)
[10:05:50] <wjp> in which game?
[10:05:56] <fuzzie> bg2 :)
[10:06:07] <wjp> very useful :-)
[10:06:31] <fuzzie> well, i think everyone would appreciate pst rather a lot more
[10:07:14] <wjp> more random hardcoding in there I guess
[10:07:21] <-- adominguez has left IRC (Remote host closed the connection)
[10:07:27] <fuzzie> yes, and bg2 has already been quite well REed
[10:08:04] --> adominguez has joined #GemRb
[10:08:15] <edheldil> hmm, what do you mean 'found'? I would expect them to be known by Avenger for quite a long time :)
[10:08:30] <fuzzie> edheldil: they forgot to remove them from the Mac port :)
[10:08:38] <edheldil> ah
[10:08:41] <edheldil> handy
[10:08:52] <fuzzie> I did ask in here about it a few weeks ago, but didn't have time to look at the binary until yesterday evening.
[10:09:26] <edheldil> I vaguely remember you saying that they might be a possibility of them for some reason
[10:09:37] <wjp> hehe, that happens more often in ports :-)
[10:09:46] <fuzzie> yes, port teams don't really care so much :)
[10:10:07] <fuzzie> and I think powerpc CodeWarrior must embed function names in the executable segments by default, judging by the number of times I found this now
[10:10:19] <edheldil> have they left debug printfs as well?
[10:10:29] <fuzzie> there are some more asserts present
[10:10:57] <wjp> the Spanish translation of Ultima 7 (part 2) had debugging symbols in their _scripts_ :-)
[10:11:13] <fuzzie> for the scripts?
[10:11:19] <wjp> yes
[10:11:31] <wjp> (compiled bytecode scripts)
[10:11:33] <fuzzie> one of the Living Books games, I think Carmen Sandiego ThinkQuick, has similar, in a 'SYM' segment
[10:11:50] <edheldil> could the debug info be moved/converted to whatever bg2 is Avenger using?
[10:12:04] <fuzzie> edheldil: well, you can copy the names :-)
[10:12:52] <fuzzie> the functions are mostly compiled in the same order per-file (well, CodeWarrior outputs them backwards, but good enough), so you can use them to 'fill in the gaps' very easily
[10:12:52] <edheldil> that's not really helpful, au contraire :)
[10:13:16] <edheldil> (I meant 'copying the names')
[10:13:25] <fuzzie> Avenger really already filled in an awful lot of the exe
[10:13:57] <fuzzie> i have just been poking at objdump's disasm of the powerpc one though
[10:14:06] <fuzzie> i guess i should buy a full copy of IDA at some point
[10:14:25] <edheldil> it's terribly expensive, ain't it? :)
[10:17:40] <fuzzie> not as bad as some of the addons you can buy for it :)
[10:18:50] <fuzzie> although Google bought the company doing BinNavi, interestingly
[10:19:39] <fuzzie> anyway. function names nice, but not any kind of magic bullet :)
[10:20:05] <fuzzie> i think the structure work done already by everyone is more useful.
[10:39:12] <edheldil> I actually like trying to RE the pst's or Lionheart's sources ... but it's so time consuming I feel I am just wasting time :(
[10:39:59] <fuzzie> yes, it is hugely time-consuming
[10:40:05] <fuzzie> you have to be sure to look for something in particular
[10:44:31] <fuzzie> otherwise you spend your entire life just going 'ooh, what's this?' :)
[11:09:43] <fuzzie> i don't suppose anyone knows what crazy gemrb build would produce paths like /usr/games/lib64/plugins and /usr/share/games/gemrb?
[11:09:53] <fuzzie> just looking at the disaster which is the latest forum post
[11:10:10] <edheldil> debian/ubuntu packages, possibly?
[11:10:38] <edheldil> what's so crazy about it?
[11:10:53] <fuzzie> well, the whole idea of lib64 is horrible, to start with :P
[11:11:03] <Lingerance> So true
[11:11:09] <fuzzie> but i mean, one is under /usr/games/lib and one is under /usr/share/games, and afaik none of our builds produce that kind of thing
[11:11:34] <fuzzie> so i can't tell if their paths are broken or if they just didn't try a valid GameType
[11:11:58] <fuzzie> ah maybe it is gentoo build?
[11:13:25] <wjp> hm, not impossible, although putting gemrb plugins in a generic path like that sounds crazy
[11:14:26] <fuzzie> it looks like it got updated 7 days ago, too
[11:14:35] <fuzzie> including an ancient broken GemRB.cfg.sample
[11:15:22] <wjp> gentoo does -DLIB_DIR="$(games_get_libdir)"
[11:15:29] <fuzzie> those lovable distro folksen
[11:16:25] <fuzzie> i was expecting to find them using automake, honestly
[11:17:53] <fuzzie> but it seems tomprince fixed that
[11:27:24] <fuzzie> DrMcCoy: you have any symbol names for the later bioware engines?
[11:27:45] <fuzzie> am curious as to whether they share more code than just the hacked resource stuff
[11:28:00] <DrMcCoy> Symbol name? You mean like Aurora?
[11:28:08] <fuzzie> like function names :)
[11:28:59] <DrMcCoy> In the actual binaries? No
[11:29:19] <fuzzie> the older games all have a lot of helpful asserts lying around
[11:30:18] <DrMcCoy> Well, okay, some strings are in the binaries. I looked through them out of curiousity a while ago, but didn't do any serious collecting
[11:30:46] <fuzzie> http://ccdevnet.org/~fuzzie/bg2_symbols is Baldur's Gate 2 set, but an awful lot of it is going to be Infinity-specific, i guess - so much UI and sprite stuff
[11:39:39] <DrMcCoy> Well, a quick strings | grep "::" on NWN yields this: http://drmccoy.de/zeugs/SymbolsNWN.txt
[11:41:46] <fuzzie> i just realised i can just grab the linux binary from bioware's site
[11:42:02] <Lingerance> What?
[11:42:13] <Lingerance> Linux bins for IE games?
[11:43:30] <fuzzie> no, for NWN
[11:44:40] <fuzzie> a lot of the NWN stuff is very obviously based on the IE code
[11:44:49] <fuzzie> but i guess it's probably deviated too much for any code sharing to be useful
[11:48:06] <pupnik> * RST38h sighs: some people can really be replaced with small PERL scripts
[11:49:09] <fuzzie> ah, all is well, the mac porters left symbols in NWN as well
[11:50:27] <DrMcCoy> lol
[11:50:37] <fuzzie> they remembered to strip them from the main binaries, but the Dedicated Server one has them all
[11:55:31] <fuzzie> yes, i guess they changed too much. sad.
[12:02:28] <DrMcCoy> Ah, lots of real symbol names in KotOR mac too
[12:02:39] <fuzzie> :)
[12:02:50] <DrMcCoy> And IDA says my version doesn't include the ppc module, bleh :P
[12:03:19] <DrMcCoy> c++filt can demangle the symbols too, though
[12:04:30] <fuzzie> objdump can give you disasm with symbols
[12:05:25] <fuzzie> it sucks compared to IDA, but nice for hints :)
[12:06:32] <DrMcCoy> I don't yet feel like crawling through disasm though. There's still lots to do in eos that can be solved by trying out and guessing :P
[12:08:01] <fuzzie> sure, but maybe in 5 years :)
[12:09:55] <fuzzie> http://ccdevnet.org/~fuzzie/nwn_syms is what I pulled for comparison
[12:18:48] <wjp> whee :-)
[12:20:57] <DrMcCoy> :)
[12:23:40] <DrMcCoy> For further comparison, this is in KotOR: http://drmccoy.de/zeugs/SymbolsKotOR.txt :P
[12:24:20] <fuzzie> nice
[12:24:38] <fuzzie> especially since you have UI there too
[12:27:37] --> edheldil_ has joined #GemRb
[12:44:30] --> SiENcE has joined #GemRb
[13:00:33] <edheldil> maybe there are even Playstation 3 keys in it :-)))
[13:03:03] <fuzzie> :P
[13:03:10] <fuzzie> well, i mean, these are mostly for amusement value
[13:04:04] <fuzzie> neat to see, but boring to actually seriously consider, when you could be experimenting instead :)
[13:50:41] <edheldil> I was considering whether a useful info could be gleaned from the asserts in pst, as they contain filename and line, but probably not worth the effort
[14:00:56] <fuzzie> well, if someone is disasming something in particular, those kind of things are helpful for orientation as people come across them
[14:33:17] --> pupnik_ has joined #GemRb
[14:36:06] <-- pupnik has left IRC (Ping timeout: 240 seconds)
[15:03:33] <CIA-48> GemRB: 03fuzzie * r75f360fbebf1 10gemrb/gemrb/core/Scriptable/ActorBlock.cpp:
[15:03:33] <CIA-48> GemRB: don't check CanCast for spell casts unless depleting
[15:03:33] <CIA-48> GemRB: this is a temporary fix to make sure scripted casts don't fail,
[15:48:14] --> kettuz has joined #GemRb
[16:08:50] --> |Cable| has joined #GemRb
[16:42:50] --> Maighstir has joined #GemRb
[16:46:44] <-- lubos has left IRC (Quit: Leaving.)
[16:56:26] <fuzzie> oh, licensing :/
[16:58:49] <wjp> hm?
[16:59:09] <edheldil> ?
[16:59:11] <fuzzie> our snprintf.cpp isn't clearly licensed
[16:59:33] <fuzzie> lubos was asking about it a while ago, i'd forgotten
[17:03:31] <edheldil> seems to me clear enough :-/
[17:03:37] <fuzzie> yes, to me too
[17:04:04] --> pupnik has joined #GemRb
[17:04:14] <fuzzie> well, it seems to me clear enough given that it talks about the source code redistributions
[17:04:22] <fuzzie> the mere permission to use is not particularly useful
[17:05:11] <edheldil> otoh "used for any purpose"
[17:05:14] <fuzzie> yes
[17:05:23] <fuzzie> that isn't sufficient, due to lack of distribution notice
[17:05:38] <fuzzie> however, Debian are clearly distributing the file along with the samba source, i just downloaded a copy off their mirrors
[17:05:49] <fuzzie> so clearly no-one is *that* concerned about it
[17:06:30] <edheldil> tell lubos to point it to his Debian mentor ... maybe they will kick samba off :-)
[17:06:33] <fuzzie> we are lacking copyright headers on a few minor files though.
[17:07:24] <edheldil> worse, there's a can of worms called 'override' :(
[17:07:35] <fuzzie> well
[17:07:50] <fuzzie> i'm not quite sure what's copyrightable in there and what isn't
[17:09:03] <edheldil> I *hope* there are not files just lifted by Avenger (or whoever) from some other game :(
[17:09:40] <fuzzie> well, you have to actually have some creative expression in copyrighting
[17:09:51] <fuzzie> some files where flags got copied don't really qualify
[17:10:53] <fuzzie> but of course gemrb itself is, like all engine recreations, arguably a derivative work of the original in hundreds of different ways
[17:11:48] <wjp> the file itself isn't really the work we're claiming copyright on; it's the whole of gemrb
[17:12:01] <wjp> or, well, the parts we wrote, anyway :-)
[17:12:26] <edheldil> wjp: what file? snprintf.cpp?
[17:12:29] <wjp> putting headers on individual files is a bit over-the-top anyway probably, but I guess it helps to maintain the license info when copying parts
[17:12:42] <wjp> (referring to uncreative files)
[17:13:14] <edheldil> 2da don't provide for comments, do they?
[17:13:20] <fuzzie> ours do
[17:13:25] <edheldil> ah, ok
[17:13:49] <fuzzie> the copyrightability of game rule tables is something which differs per-country, i guess, making it a nightmare
[17:14:20] <edheldil> later
[17:14:49] <fuzzie> anyway, i really need to remember to ask Avenger about the worldmap stuff
[17:15:07] <-- edheldil_ has left IRC (Ping timeout: 248 seconds)
[17:26:43] --> Bo_Thomsen has joined #GemRb
[17:33:41] <-- SiENcE has left IRC (Quit: @all: cya)
[17:36:43] --> SiENcE has joined #GemRb
[17:43:15] <-- SiENcE has left IRC (Quit: @all: cya)
[18:22:20] <-- adominguez has left IRC (Quit: Saliendo)
[18:27:26] --> lynxlynxlynx has joined #GemRb
[18:27:26] --- ChanServ gives channel operator status to lynxlynxlynx
[18:59:39] <-- Maighstir has left #GemRb
[19:00:22] --> Maighstir has joined #GemRb
[19:12:06] <-- Demitar has left IRC (Quit: Burn the land and boil the sea, you can't take the sky from me!)
[19:25:52] <fuzzie> are the G3 forums flaky for everyone, or just me?
[19:32:28] <pupnik> reading or posting?
[19:32:37] <fuzzie> just loading the site
[19:32:55] <fuzzie> it looks like their dns is flaky
[19:32:58] <pupnik> fine here
[19:33:45] --> Avenger has joined #GemRb
[19:33:50] <Avenger> hi fuzzie
[19:33:56] <fuzzie> aha
[19:33:59] <fuzzie> hello :)
[19:34:20] <Avenger> i checked some of the bugs reported by mark, i didn't experience any crash or guiscript error
[19:34:33] <Avenger> maybe he got some old files?
[19:34:35] <fuzzie> did you see my BG2 function list?
[19:34:42] <Avenger> no, where?
[19:34:50] <fuzzie> i think he is probably using old gemrb, we already fixed some bugs
[19:35:00] <fuzzie> and, http://ccdevnet.org/~fuzzie/bg2_symbols
[19:35:07] <Avenger> the actors in the smithy really seem to have some schedule
[19:35:20] <Avenger> it might be that our scheduling is not like the original?
[19:35:43] <Avenger> i could enter the smithy, but it was empty. Advanced time, and the npcs appeared
[19:35:44] <fuzzie> yes, the original does scheduling a bit differently
[19:36:14] <Avenger> that function list would be much better with addresses :)
[19:36:24] <fuzzie> well it is from the powerpc version so that is not so useful :)
[19:36:38] <Avenger> ah
[19:36:41] <fuzzie> but i will fill them into IDA sometime
[19:37:05] <Avenger> it is still useful
[19:37:23] <Avenger> and it is the tob version
[19:37:26] <fuzzie> mostly the same 'groups' of functions are next to each other in the bgmain.exe, just in reverse order
[19:38:11] <fuzzie> oh, and there is a bug in the worldmap code now
[19:38:16] <fuzzie> it goes into infinite loops
[19:38:20] <Avenger> eep?
[19:38:26] <Avenger> who did that?
[19:39:19] <Avenger> but i used the worldmap just now, what are the conditions of the bug?
[19:39:32] <fuzzie> hovering over some areas
[19:40:23] <fuzzie> it worked before, so maybe it is worldmap expansion bug
[19:40:43] <fuzzie> it loads 'xl3000.2da'
[19:40:46] <Avenger> heh, the attacker list is still around?
[19:40:50] <fuzzie> and 'xnewarea.2da'
[19:40:57] <fuzzie> yes, lynx doesn't want me removing the attacker list until the release is split
[19:41:06] <fuzzie> once that is done, i replace everything
[19:41:12] <Avenger> ok
[19:41:25] <fuzzie> i wrote stuff like http://fuzzie.org/nfs/gemrb/func_movetoobject.txt for the relevant functions
[19:41:28] <Avenger> oh, ok, that bug happens only on upgrade
[19:41:42] <Avenger> xnewarea is used when upgrading soa to tob
[19:42:06] <Avenger> though i tested it once
[19:42:33] <Avenger> nice
[19:42:53] <fuzzie> it goes into an infinite loop, doing "Adding path to %d\n" for two areas repeatedly
[19:43:04] <fuzzie> i thought, you understand the world map expansion code better than i ever could
[19:43:18] <fuzzie> so i would ask if you had any idea, before trying to fix it myself
[19:44:30] <Avenger> no idea
[19:44:48] <Avenger> i thought this code is safe even if the links are corrupted somehow
[19:45:45] <pupnik> :)
[19:45:58] <fuzzie> well, ok, i will look at it :)
[19:46:03] <fuzzie> any luck with pst projectiles? or been busy?
[19:46:09] <Avenger> the area expansion code modifies the worldmap dynamically. I partially got that code from dltcep
[19:46:24] <Avenger> in dltcep it doesn't corrupt the worldmap if i add/remove an area or link
[19:46:31] <fuzzie> i think the InsertAreaLink is the problem
[19:46:49] <fuzzie> but it looks fine to me
[19:47:06] <Avenger> yes, that is a complicated stuff, to keep up consistency
[19:47:59] <Avenger> i'm busy with non gemrb stuff
[19:49:18] <Avenger> work is tiring me more than usual, we are testing a new system
[19:49:36] <Avenger> so i'm very busy in work hours, and tired after that
[19:49:42] <fuzzie> *nod*, that i can understand
[19:50:21] <Avenger> it is not like i did half a year ago, when played with IDA in my workplace ;)
[19:50:32] <fuzzie> hehe
[19:51:57] <Avenger> i will be busier than usual for a few months. At least until we finish the automated testing system, and kill the worst bugs that prevent proper testing
[19:52:15] <fuzzie> 'crunch time', i suppose
[19:53:22] <Avenger> creating test data on a system that still changes, got bugs that prevent a full lifecycle of the input data. And doing all test runs manually, on a system we just learned
[19:55:57] <Avenger> one of mark's bugs --> It is possible to equip with a bow and a shield, though I think, this is a feature
[19:56:03] <Avenger> hehe, no, that's a bug
[19:56:13] <fuzzie> well, i thought that was possible and we fixed it
[19:56:22] <Avenger> well, maybe he really uses 0.6.3
[19:56:22] <fuzzie> or, lynx did, probably
[19:56:30] <fuzzie> yes, i think maybe so
[19:57:22] <Avenger> so, what are the blockers for 0.6.4?
[19:57:52] <fuzzie> a bugfix to the script running at the end of ToB, and this worldmap thing, i think
[19:59:09] <Avenger> what's wrong with CanCast?
[19:59:30] <fuzzie> it does checks which are wrong for Force actions
[19:59:46] <fuzzie> again, i think i am just going to rewrite the spell action stuff
[19:59:49] <Avenger> hmm there is ForceSpell and ReallyforceSpell
[20:00:11] <Avenger> i thought ForceSpell would still check conditions, maybe i'm wrong
[20:00:14] <fuzzie> so this was just a temporary fix again, like it says in commit
[20:00:34] <fuzzie> i did check in original but only quickly :)
[20:00:36] <Avenger> maybe it is the SpellNoDec action, though
[20:01:01] <Avenger> there are so many, i'm sure most of the combinations are implemented :)
[20:01:04] <fuzzie> hmm, something ou might know better than me
[20:01:10] <Avenger> not really
[20:01:19] <Avenger> i might know it when i see it, but i forget it fast
[20:01:30] <Avenger> and i spent the last 2 months with pst projectiles ;)
[20:01:35] <Avenger> and maze
[20:01:41] <fuzzie> i mean, something else
[20:02:17] <fuzzie> do you know if CGameSprite::FeedBack does some kind of rate-limiting? it seems to get called on every tick, by actions, for stuff like those encumbrance checks
[20:02:26] <fuzzie> sorry, i should say, that is DisplayConstStr :)
[20:02:40] <fuzzie> it is not worth *looking*, i just couldn't see how it worked
[20:02:47] <Avenger> oh, hmm, i think there are some of those texts are limited, yes
[20:02:53] <Avenger> not all
[20:02:57] <fuzzie> i don't want to waste your time if you're tired from work :)
[20:03:04] <Avenger> i think i remember seeing some filter for repeated messages
[20:03:33] <fuzzie> ah
[20:03:43] <fuzzie> hehe, i wonder if that is how "You must gather your party" is limited
[20:03:59] <Avenger> that is not even a real displayconststr
[20:04:15] <Avenger> the strref is allocated in cInfGame
[20:04:29] <Avenger> it is weird
[20:06:22] <fuzzie> there's a CInfGame::FeedBack too, but different function
[20:06:38] <Avenger> there are two cstrref's directly allocated in the game object
[20:06:52] <Avenger> one of them is the youmustgather one
[20:07:00] <fuzzie> and i don't really want to go look because i will spend my whole life jumping around the exe :)
[20:08:39] <Avenger> hehe, yes, that's what i used to do
[20:08:57] <Avenger> stay focused or you get lost in the exe
[20:09:32] <Avenger> maybe in the weekend i will be fresh enough to jump into it again
[20:10:19] <fuzzie> well, if work is so draining, i hope you don't spend time unless you are fresh and it is fun!
[20:15:57] <fuzzie> i think one problem with the GUIScript is that AddAreaEntry is called with the correct indices, but then InsertAreaLink increments the index because it thinks the data already got inserted
[20:21:42] <fuzzie> so confusing
[20:22:56] <fuzzie> maybe the 'if (j<local) {' should be >= when adding them, then it would make sense
[20:34:26] <Avenger> addareaentry is called exactly once
[20:34:39] <Avenger> before adding the links
[20:34:43] <Avenger> so it cannot be wrong
[20:34:45] <fuzzie> yes
[20:34:48] <fuzzie> no, it is fine
[20:34:53] <fuzzie> but then the code later corrupts the links
[20:35:17] <Avenger> it is trying to keep them consistent, though
[20:35:18] <fuzzie> i think if i change j<local to j>=local it should work, but i didn't try it
[20:35:36] <Avenger> ?
[20:35:52] <fuzzie> it should do AddAreaLink for the local links, and InsertAreaLinks for the 'links to' links, and right now it does the opposite
[20:36:39] <fuzzie> well, i say 'should', i mean 'i have no clue but maybe this'
[20:36:58] <Avenger> maybe, when i tested it, i thought i debugged this, but it was a long time ago
[20:37:58] <fuzzie> it *looks* like it is the wrong way around, anyway, and also the other way around would stop it corrupting stuff :)
[20:38:05] <fuzzie> i suppose trying it is easiest way
[20:38:18] <fuzzie> when it crashes, i know i was wrong
[20:40:51] <fuzzie> well, if i change that, it doesn't freeze any more, but Trademeet to the Forest of Tethir is 52 hours, so that is not correct
[20:41:08] <Avenger> hehe
[20:41:20] <Avenger> i found only one tiny problem: memset(entry->LoadScreenResRef, 0, 8);
[20:41:29] <Avenger> i guess that 8 should be sizeof(ieResRef) or 9
[20:41:48] <Avenger> otherwise it may contain uninitialized memory
[20:42:02] <fuzzie> i guess the same for the EncounterAreaResRef below
[20:42:03] <Avenger> it won't cause any problem, just maybe some garbage
[20:42:28] <Avenger> yes, all memset
[20:42:42] <fuzzie> it prints "Walkpath size is: 4" on console
[20:42:44] <Avenger> the copy functions are fine
[20:43:00] <Avenger> hmm, 4 is not bad
[20:43:11] <fuzzie> it is for Trademeet vs Tethir
[20:43:31] <Avenger> hmm it shouldn't even change?
[20:43:57] <fuzzie> well, ar2000 (Trademeet) gets links modified by xl3000.2da
[20:44:07] <Avenger> we look for the minimum time sum, not the minimum node count, i hope ;)
[20:44:23] <fuzzie> so, it is corrupting links
[20:45:01] <Avenger> it is not necessarily bad
[20:45:08] <Avenger> if it is between trademeet and tethir
[20:45:21] <fuzzie> they are right next to each other :(
[20:45:32] <Avenger> do they have direct link?
[20:45:54] <Avenger> then it is totally corrupting them
[20:46:15] <Avenger> if they all have a link to BG, and now both got a link to the new area, it is plausible :)
[20:46:37] <Avenger> err, not bg, but Amn
[20:46:39] <Avenger> :)
[20:46:48] <Avenger> err, Athkathla
[20:46:56] <fuzzie> ok, InsertAreaLink checks AreaLinksIndex[k]>=idx
[20:47:32] <fuzzie> and inserts into area_links using idx
[20:47:41] <fuzzie> but, areaindex is the *area* index, not link index
[20:48:21] <Avenger> ?
[20:48:30] <Avenger> what areaindex
[20:48:42] <fuzzie> sorry, i mean idx
[20:48:54] <fuzzie> areaindex is what gets passed as first parameter of InsertAreaLink, from GUIScript function :)
[20:49:28] <fuzzie> so, this makes no sense to me at all
[20:49:41] <Avenger> ok, so idx is an area index, and AreaLinksIndex[0..3] fields are not area indices?
[20:49:48] <fuzzie> yes
[20:49:52] <fuzzie> they are indices into area_links
[20:50:00] <Avenger> hmm
[20:50:04] <fuzzie> and InsertAreLink does area_links.insert(area_links.begin()+idx,al); which makes *no sense* :)
[20:50:19] <Avenger> then this would be wrong too: area_links.insert(area_links.begin()+idx,al);
[20:50:20] <fuzzie> but it checks (pos==idx) later on, and pos *is* an index into area_entries
[20:50:30] <Avenger> because it is indexing area links
[20:50:35] <fuzzie> so it is both :)
[20:50:51] <Avenger> idx is intended as an area link index
[20:50:54] <Avenger> nothing else
[20:51:10] --> edheldil_ has joined #GemRb
[20:51:12] <fuzzie> i don't know how to *get* an area link index
[20:52:13] <Avenger> what is this WMPAreaEntry *oarea = wmap->GetArea(larea, areaindex);
[20:52:14] <fuzzie> i guess it is AreaLinksIndex[idx][linktodir]
[20:52:28] <fuzzie> that gets the area, and puts the area index (index into area_entries) into areaindex variable
[20:52:44] <Avenger> that is a real area index, not an area link index, yeah
[20:52:56] <Avenger> so, yes, there is a mismatch
[20:53:08] <fuzzie> i think it's easy to fix in InsertAreaLink
[20:54:04] <Avenger> try it
[20:54:10] <Avenger> if it crashes, then no :)
[20:54:27] <Avenger> it seems plausible, though
[20:55:19] <Avenger> i just ponder whether it should be AreaLinksIndex[idx][0]
[20:55:35] <fuzzie> i think not, because each direction has unique index+count
[20:56:03] <Avenger> uhm
[20:56:22] <fuzzie> but my fix didn't work
[20:57:01] <Avenger> max = area_entries.size();
[20:57:08] <Avenger> for(pos = 0; pos<max; pos++) {
[20:57:15] <Avenger> if ((pos==idx) && (k==dir)) {
[20:57:23] <Avenger> this means: idx is area index here :)
[20:57:26] <fuzzie> yes
[20:57:29] <fuzzie> i changed it to be 'areaidx'
[20:57:42] <fuzzie> and wrote 'idx = area_entries[areaidx]->AreaLinksIndex[dir];'
[20:57:47] <fuzzie> but, it doesn't work.
[20:58:01] <Avenger> what did you do to this: if(ae->AreaLinksIndex[k]>=idx) {
[20:58:17] <fuzzie> i changed it to '>'
[20:58:20] <Avenger> i totally messed this two up
[20:58:27] <fuzzie> but left alone
[20:58:38] <Avenger> but it is an area link index there
[20:58:45] <Avenger> and dont change the = :)
[20:58:49] <fuzzie> yes, i mean, i left it as 'idx' :)
[20:58:59] <Avenger> ah ok
[20:59:27] <Avenger> but the parameter for this method is idx too, you changed that to areaidx then?
[20:59:37] <fuzzie> yep
[21:00:05] <Avenger> lemme see the whole Insert thingie
[21:00:07] <fuzzie> http://fuzzie.org/nfs/gemrb/worldmap_fix_doesnt_work.txt
[21:00:40] <fuzzie> ok ignoret the OutAttack change :)
[21:01:51] <Avenger> this code is a total mess, i did this: unsigned int max = area_links.size(); for nothing...
[21:02:02] <fuzzie> oops
[21:02:23] <fuzzie> i guess that insert is off-by-one
[21:02:24] <Avenger> i see you removed it, so fine
[21:02:50] <Avenger> if idx is 0, where it would go
[21:02:58] <fuzzie> at the start
[21:03:08] <Avenger> then it is fine, no?
[21:03:17] <fuzzie> oh, i guess
[21:03:29] <-- kettuz has left IRC (Quit: Leaving)
[21:04:04] <Avenger> i'm not sure about the maximum value
[21:04:08] <Avenger> but i guess, it would work
[21:05:15] <Avenger> and i'm not sure about your swapping of if (j>=local) {
[21:05:20] <Avenger> what if you swap that back
[21:05:29] <fuzzie> i will try it
[21:05:44] <Avenger> lol, you are getting to code like i always do :P
[21:06:26] <fuzzie> sometimes code is just stupid :)
[21:06:43] <Avenger> as opposed to very stupid? :)
[21:07:34] <Avenger> i hope i made only two errors, and both are in InsertAreaLink
[21:08:46] <fuzzie> no, now it is broken in identical way
[21:10:35] <fuzzie> although we don't translate directions
[21:10:44] <fuzzie> still, shouldn't matter
[21:11:39] <fuzzie> um.
[21:11:54] <fuzzie> maybe the rest is my bug
[21:12:27] <Avenger> you modified something else?
[21:13:35] <fuzzie> no, i guess not
[21:13:48] <Avenger> how do you test this?
[21:14:05] <fuzzie> i open some original savegame from Trademeet, then use world map :P
[21:14:32] <Avenger> but that savegame should be already corrupted?
[21:14:53] <fuzzie> it is from original game
[21:14:57] <Avenger> ahh bg2?
[21:14:59] <fuzzie> yes
[21:15:01] <Avenger> i mean without tob
[21:15:05] <Avenger> ok that would work
[21:15:14] <fuzzie> well i don't know, maybe it is tob game and we are broken :P
[21:17:34] <fuzzie> i forgot how this code works, agai
[21:17:34] <fuzzie> n
[21:21:21] * fuzzie kicks CIA-48
[21:21:34] <Avenger> anyway, at least the stuff in InsertAreaLink should be fixed, that was definitely broken
[21:21:43] <fuzzie> yes, i pushed fixes for that, and the resrefs
[21:21:48] <fuzzie> just CIA isn't noticing :)
[21:21:51] <CIA-48> ow
[21:23:37] <fuzzie> hehe, Beholder also thinks mark is using 0.6.3 :)
[21:24:30] <CIA-48> GemRB: 03fuzzie * r5694362d0c05 10gemrb/gemrb/core/WorldMap.cpp: fix WorldMap::InsertAreaLink, hopefully
[21:25:06] <Avenger> well, that's the last compiled release
[21:25:17] <Avenger> i guess not everyone uses git :)
[21:25:23] <CIA-48> GemRB: 03fuzzie * r98cb837e0fc2 10gemrb/gemrb/plugins/GUIScript/GUIScript.cpp: null-terminate resrefs in AddNewArea
[21:26:39] <Avenger> see you later!
[21:26:42] <fuzzie> bye!
[21:26:43] <-- Avenger has left IRC (Quit: bye!)
[22:04:23] <-- Maighstir has left IRC (Quit: ~ Trillian Astra - www.trillian.im ~)
[23:01:47] <-- edheldil_ has left IRC (Ping timeout: 248 seconds)
[23:10:39] <-- lynxlynxlynx has left IRC (Remote host closed the connection)
[23:13:16] <pupnik> yall should have an openpandora to play with
[23:14:06] <-- Bo_Thomsen has left IRC (Quit: Leaving.)
[23:29:51] <fuzzie> hm, where is Lightkey recently?
[23:46:00] <pupnik> not seen in a while
[23:52:10] <fuzzie> ok, i worked out triggers
[23:58:05] <pupnik> thought they already worked :/