#pentagram@irc.freenode.net logs for 6 Mar 2004 (GMT)

Archive Today Yesterday Tomorrow
Pentagram homepage

[02:27:03] <-- Fingolfin has left IRC ("42")
[05:29:22] --> Beans has joined #pentagram
[05:29:31] <Beans> Spoon? But what does it mean?
[05:29:45] --> Ayler has joined #pentagram
[05:29:56] <Ayler> you and youre satanic spoons...
[05:30:10] <Ayler> see im on topic!
[05:31:06] <-- Beans has left #pentagram ()
[05:36:17] <-- Ayler has left #pentagram ()
[13:56:11] <-- Kirben has left IRC (Read error: 60 (Operation timed out))
[14:44:30] * wjp wonders how to implement weapon overlay drawing
[14:44:36] --> Colourless has joined #Pentagram
[14:44:36] --- ChanServ gives channel operator status to Colourless
[14:44:44] <wjp> ah, just the person I was looking for :-)
[14:44:46] <wjp> hi
[14:44:59] <Colourless> hi
[14:45:11] <wjp> I've been looking at weapon overlays
[14:45:18] <Colourless> did someone else just enter too :-)
[14:45:56] <wjp> uh, no, why?
[14:46:25] <Colourless> "ah, just the person I was looking for" rarely means good things :-)
[14:46:46] <Colourless> usually means work :-)
[14:46:54] <wjp> you would be right, yes :-)
[14:46:55] <Colourless> and in this case that appears true :-)
[14:47:13] <wjp> the 'work' being that the rendering system probably needs a bit of a change
[14:47:22] <Colourless> yes
[14:47:24] <wjp> weapon overlays seem to be very much 2d
[14:47:50] <Colourless> the correct way would probably to draw the weapon at the same time as the avatar shape
[14:47:53] <wjp> yes
[14:48:08] <wjp> at a 2d offset specified in wpnovlay.dat
[14:48:12] <Colourless> yeah
[14:48:33] <wjp> not sure if anything specifies if it should be drawn before or after the avatar
[14:48:36] <Colourless> does the wpnovlay data work per frame in shape 1 or something else
[14:48:54] <Colourless> assumption would be drawn after
[14:49:05] <wjp> if it's not specified, I would guess after too, yes
[14:49:13] <wjp> it's keyed to the current animation of the avatar
[14:49:31] <Colourless> interesting... and that makes it a bit more difficult
[14:49:44] <wjp> wpnovlay.dat is indexed by a (curanim, overlay_type, direction, animframe) tuple
[14:50:08] <wjp> (overlay_type is the mace/sword/axe/dagger thing)
[14:50:30] <wjp> I made a couple of notes in u8wpnovlay.txt last night
[14:50:41] <wjp> and just committed some code for reading wpnovlay.dat
[14:51:04] <Colourless> don't you love 4d arrays :-)
[14:51:43] <wjp> well, no ;-)
[14:53:10] <wjp> should probably move the animframe field from the animator process to Actor
[15:36:09] --> Cless has joined #Pentagram
[15:36:30] <-- Colourless has left IRC (Nick collision from services.)
[15:36:40] --- Cless is now known as Colourless
[15:36:42] --- ChanServ gives channel operator status to Colourless
[15:39:19] <wjp> the easy way would probably be some kind of call from the renderer to MainActor if drawing shape 1
[15:42:28] <Colourless> if drawing shape 1 on objid 1
[15:43:06] <wjp> hm, yeah
[15:43:58] <Colourless> only a 2 line addition is required in the ItemSorter
[15:44:36] <wjp> if (objid==1 && shape==1) mainactor->drawWepaon(surface); ?
[15:45:04] <wjp> or (surface,x,y)
[15:45:20] <Colourless> something like that
[15:47:30] <Colourless> hmmmm
[15:48:10] <Colourless> would need to be around line 951
[15:48:17] <Colourless> note all the various methods used to paint
[15:48:35] <Colourless> mirroring might cause a problem
[15:48:53] <wjp> is avatar ever painted mirrored?
[15:49:27] <Colourless> i have no idea
[15:50:08] <wjp> sounds like it might be better do have itemsorter do the actual drawing, and just have MainActor tell the sorter which shape/frame to draw
[15:50:46] <Colourless> yeah a 'secondary' shape/frame set
[15:50:54] <Colourless> (perhaps)
[15:52:08] <Colourless> ItemSorter::Trace also would need updating
[15:52:19] * wjp nods
[16:01:06] <wjp> ok, added a member variable to Actor for the current animation frame
[16:03:35] <wjp> (savegames broken again, yay :-) )
[16:05:09] <Colourless> you fiend!
[16:07:26] <wjp> to actually get the right shape to draw we need some kind of WeaponInfo
[16:14:03] <Colourless> these is the right way, and the wrong way to store that info... right way: in some sort of database file.... wrong way: a hard coded array
[16:16:27] <wjp> u8 uses the wrong way :-)
[16:16:49] <Colourless> :-)
[16:22:45] <wjp> I guess I'll make a small .cfg file for them
[16:22:58] <wjp> we can convert it to .ini later
[17:03:36] <wjp> for (iter = weaponkeys.begin(); iter != overlaykeys.end(); ++iter) <-- spot the error :-)
[17:03:53] <Colourless> :-)
[17:04:12] <Colourless> <wjp> perhaps?
[17:05:59] <wjp> I'm the error? Well, that's one way of interpreting it, I guess :-)
[17:06:13] <Colourless> :-)
[17:06:32] <Colourless> you see, i can't really tell you the actual coding error as i don't know what it's supposed to be
[17:06:51] <Colourless> perhaps weaponkeys is the error, perhaps overlaykeys is the error
[17:07:20] <Colourless> :-)
[17:07:48] <wjp> anyway, with that bug fixed, the WeaponInfo is now being loaded
[17:13:09] <wjp> committed
[17:13:25] <wjp> now I guess I'll add a function to MainActor to get the 'current' weapon overlay info
[17:13:48] <Colourless> cool... oh wait it still means i need to finish my console changes before i can even compile pentagram again :-)
[17:14:04] <wjp> check out another copy of pentagram? :-)
[17:14:27] * wjp has about three checked out copies of Exult, for example :-)
[17:14:35] <Colourless> that is the wrong solultion :-)
[17:14:43] <Colourless> you see, i should finish my changes :-)
[17:14:49] <wjp> you have a point :-)
[17:19:04] <wjp> what exactly were you changing in the console, btw?
[17:19:19] <Colourless> moving stuff from ConsoleGump to Console itself
[17:19:54] <Colourless> nothing functionally different
[17:20:07] <Colourless> also was going to add argc argv to commands
[17:38:45] <wjp> wow, it works :-)
[17:39:24] <wjp> (hacked it into the ItemSorter)
[17:39:32] <wjp> wanted to see if I got the numbers right :-)
[17:39:35] <Colourless> amazing
[17:40:59] <wjp> we have to draw the weapon at si->sxbot + xoff, si->xybot + yoff, as you would expect
[18:25:51] <wjp> bbl, dinner
[18:26:12] <Colourless> k
[18:51:11] <wjp> back
[18:51:25] <Colourless> wb
[18:56:51] <Colourless> wjp, i'm pretty sure but after playing NWN for a bit, doesn't seem like there are any more Inventory problems :-)
[18:56:59] <wjp> yay :-)
[19:53:08] <Colourless> any of you who would possibly want Ultima 8 under Pentagram as if wasn't patched.... YOU ALL SUCK!
[19:53:11] <Colourless> :-)
[20:25:53] <-- Colourless has left IRC ("casts invisibility")
[23:05:41] <wjp> btw, the original ignores the weapon when you click on it
[23:05:50] <wjp> so I guess we don't need to modify ItemSorter::trace
[23:18:34] --> Kirben has joined #pentagram
[23:18:34] --- ChanServ gives channel operator status to Kirben
[23:18:43] <wjp> hi Kirben
[23:18:54] <Kirben> Hi
[23:19:18] <wjp> I added a file to the pentagram data directory, btw. (u8weapons.cfg)
[23:19:33] <wjp> I added it to the install target in Makefile.mingw
[23:21:12] <Kirben> ok
[23:58:40] --> Fingolfin has joined #pentagram
[23:58:40] --- ChanServ gives channel operator status to Fingolfin