[00:26:59] <-- wjp has left IRC ("Zzzz...")
[03:46:11] --- DarkeZzz is now known as Darke
[11:27:20] --> wjp has joined #pentagram
[11:27:20] --- ChanServ gives channel operator status to wjp
[11:48:23] <wjp> any ideas on where to handle the data from typeflag.dat?
[12:00:27] <Darke> Umm... remind me again what that was? *grin*
[12:00:42] <wjp> it contains flags for types :-)
[12:00:52] <wjp> (a 'type' is what we call a 'shape')
[12:01:03] <wjp> the 'is_a_container' flag is in there, for instance
[12:01:05] * Darke suffers from haven't-had-a-chance-to-touch-pentagram-for-a-while-itis. *grin*
[12:01:13] <wjp> tsk tsk :-)
[12:02:38] * Darke grins.
[12:02:53] <Darke> Define 'handle' btw. Store? Load? Save?...
[12:03:01] <wjp> yes, yes and yes :-)
[12:05:09] <wjp> I think in 'old' I put it in a ShapeManager class
[12:05:44] <wjp> um, "yes, yes and no", come to think of it
[12:13:04] <Darke> Maybe in the shape manager, with the data stored as part of the shapes?
[12:13:40] <wjp> yeah, but you need to have a shape manager first, to do that :-)
[12:14:46] <wjp> I was also wondering how to make an Item refer to its Shape
[12:15:03] <wjp> just by shape#/frame#, or with some pointer/reference
[12:15:06] <wjp> ?
[12:15:22] <wjp> might become relevant once we start having multiple sources of shapes
[12:15:53] <wjp> hm, come to think of it, we already have multiple shape files (shapes, gumps, mouse, ..)
[12:16:36] <Darke> Hmm... is the typeinfo modifiable on an item basis, or is there only one typeinfo for all instances of an item.
[12:17:09] <wjp> this is the per-shape info, so all items with the same shape share this
[12:17:15] <wjp> other flags are stored in Item itself
[12:17:34] * Darke nods, he thought it was like that.
[12:19:30] <Darke> We'd either have to store a pointer and a numeric id, or just a numeric id to reference into the global shapes array. I'd favour the former, but you've got two items to update for every shape change and it makes each item larger.
[12:40:36] --> gej has joined #pentagram
[12:41:26] <wjp> hi
[12:42:15] <gej> hi
[12:54:44] <Darke> Hi.
[13:23:23] --- gej is now known as masus
[13:24:36] <-- masus has left #pentagram ("Program Sonlanıyor")
[14:12:30] * wjp notices Colourless is committing things
[14:13:30] <wjp> lots of things :-)
[14:13:35] --> Colourless has joined #Pentagram
[14:13:35] --- ChanServ gives channel operator status to Colourless
[14:13:40] <wjp> hi :-)
[14:14:01] <Colourless> hi
[14:14:03] <Colourless> enjoy the emails :-)
[14:14:25] * wjp was just reading the ChangeLog :-)
[14:16:14] <wjp> not a single merge conflict.. nice :-)
[14:16:50] <Colourless> :-)
[14:16:53] <Colourless> that woudl be a first
[14:17:02] <Colourless> but it's not going to compile without makefile changes though :-)
[14:17:11] <-- Kirben has left IRC (Read error: 54 (Connection reset by peer))
[14:17:39] <wjp> just needs some added .o files I hope?
[14:19:20] <wjp> lol... I need to approve one of the commit mails because it's too long :-)
[14:20:37] <-- Colourless has left IRC (Read error: 54 (Connection reset by peer))
[14:20:42] <wjp> 'if (sbuf.st_mode & _S_IFDIR)' doesn't seem to be working here
[14:20:44] <wjp> oh
[14:26:04] --> Colourless has joined #Pentagram
[14:26:07] --- ChanServ gives channel operator status to Colourless
[14:26:12] <wjp> wb
[14:26:15] <wjp> <wjp> 'if (sbuf.st_mode & _S_IFDIR)' doesn't seem to be working here
[14:26:20] <wjp> it's S_IFDIR here
[14:26:27] <Colourless> thx
[14:26:29] <Colourless> hmm, ok
[14:26:47] <Colourless> just put it back to how it was, and i'll just create a macro in my msvc_include header
[14:31:19] <wjp> k
[14:31:25] <wjp> no S_ISDIR macro I guess?
[14:31:42] <Colourless> no, i don't have one
[14:32:22] <Colourless> i do have S_IFDIR though
[14:32:34] <Colourless> it's under a section called
[14:32:35] <Colourless> /* Non-ANSI names for compatibility */
[14:32:38] <Colourless> #define S_IFDIR _S_IFDIR
[14:33:08] <wjp> #define S_ISDIR(mode) __S_ISTYPE((mode), __S_IFDIR)
[14:33:15] <wjp> #define __S_ISTYPE(mode, mask) (((mode) & __S_IFMT) == (mask))
[14:33:39] <wjp> #define __S_IFMT 0170000 /* These bits determine file type. */
[14:33:58] <Colourless> #define _S_IFMT 0170000 /* file type mask */
[14:35:11] <Colourless> i'll add those 2 macros to my header
[14:40:12] <wjp> how should we store which shape an item is? Do we need a reference to where the shape came from?
[14:40:24] <wjp> or just store a 'uint32 shape' in Item?
[14:40:41] <Colourless> IMO, just a uint32 shape
[14:40:45] <wjp> uint32 (or even just uint16) should be plenty for all shapes
[14:41:02] <Colourless> the original game stored them as uint16/sint16
[14:41:08] * wjp nods
[14:41:32] <wjp> I made it a uint32 in the Item class
[14:41:43] <wjp> not sure if it's actually necessary
[14:41:45] <Colourless> yeah
[14:41:55] <wjp> but it won't hurt (much :-) )
[14:42:19] <Colourless> now you were asking about typeinfo before
[14:42:22] <wjp> next question: where do we store the data from 'typeflag.dat'?
[14:42:25] <wjp> yes :-)
[14:42:45] <Colourless> somewhere separate from the shapes would be a good idea IMO
[14:43:07] <wjp> the 'old' ShapeManager class was a good place for it, but we don't really have one of those in 'new' yet
[14:43:07] <Colourless> the file is just a huge array
[14:43:29] * wjp nods
[14:43:42] <Colourless> Should just be in it's 'own' TypeFlag class or something
[14:44:39] <wjp> would probably contain a vector of ShapeInfo structs, then
[14:45:03] <Colourless> yes something like that
[14:45:22] <Colourless> one thing we need to think about though is the data is different for ultima 8 and cursader
[14:45:41] <Colourless> while we pretty much know all of the u8 typeflag info, we know almost none of the crusader info.
[14:45:49] <wjp> yes, that could be an issue
[14:46:14] <Colourless> and I really don't want that the ShapeInfo class to use virtual functions, i would like it all inlines
[14:46:23] * wjp nods
[14:46:31] <wjp> convert it to a common format? :-)
[14:46:42] <Colourless> so, I'm thinking we need to parse the data when loading it... into a common format :-)
[14:47:07] <wjp> although it could be a problem if one of them has a flag the other one doesn't
[14:47:26] <Colourless> set it to an appropriate default i would think
[14:47:44] <wjp> indeed
[14:48:35] <wjp> hm, I don't really want to make TypeFlag another singleton
[14:48:40] <wjp> we're starting to have too many of those
[14:49:07] <wjp> (or one of the direct members of Application)
[14:49:31] <Colourless> well, we 'could' do similar to what we did in Exult, and put the typeflag info in the shapes.flx object
[14:49:57] <wjp> (speaking of which, why is confont a member of Application?)
[14:50:03] <wjp> (leftover?)
[14:50:16] <Colourless> because i had nowhere else better to put it at the time
[14:50:26] <wjp> not every ShapeFlex would have typeflags, though
[14:50:56] <Colourless> yes, not everyone would, that why there would be a specific ShapeFlex class just for the (u8)shapes.flx file
[14:51:15] * wjp nods; that's reasonable
[14:51:52] <Colourless> or it could just be added into the ShapeFlex class, but only used when specifically loaded with a ShapeFlex::LoadTypeFlags(IDataSource *ds) or something
[14:53:50] <wjp> depends on if there are any other things that only the 'main' shapeflex would have
[14:53:55] <wjp> can't think of any right away, though
[14:54:10] <Colourless> no, that's the only one I can think of
[14:54:23] <Colourless> ah no, there is more
[14:54:28] <Colourless> combat stuff
[14:54:43] <wjp> do we actually know anything about that, btw?
[14:54:49] <Colourless> plus the gumps flex has it's own special stuff too, which we haven't decoded yet
[14:54:58] <Colourless> combat stuff was hard coded afaik
[14:55:26] <wjp> pity
[14:55:40] <Colourless> and there is the anim.dat stuff
[14:55:46] <Colourless> which is linked to shapenums
[14:55:54] <wjp> right
[14:56:06] <wjp> that's enough for a separate class then, I think
[14:56:40] * wjp tries to come up with a sensible name
[14:56:49] <Colourless> not sure how it works, but i'm pretty sure that WPNOVLAY.DAT probably is linked to the shapes too
[14:57:18] <wjp> wpnovlay.dat is kind of a sparse flex
[14:57:49] <wjp> it has entires 4-9,13-15,40,58-60
[14:57:51] <Colourless> my guess is it is used to workout how to put the weapons in the avatars shapes hands
[14:57:53] <wjp> s/entires/entries/
[14:57:58] <wjp> yes, that would be my guess too
[14:58:33] <wjp> could those be anim numbers?
[14:59:00] <wjp> yes, I'm pretty sure they are
[14:59:12] <Colourless> can't say i've looked at the structure, but it would make sense
[14:59:14] <wjp> they're all combat animations
[14:59:25] <wjp> (40 is an unknown anim)
[15:00:12] <wjp> the size of the file seems to depend on the length of the animation
[15:00:28] <wjp> 15 is only 480 bytes, and that's the 'standing' animation
[15:00:43] <wjp> the longest (4, 9120 bytes) is the 'recovering from falling down' anim
[15:03:46] <wjp> 'MainShapeFlex' ?
[15:03:58] <wjp> 'ItemShapeFlex' ?
[15:05:01] <Colourless> both seem ok to me... now where is Darke for his opinion...
[15:07:05] <wjp> I'll just go with MainShapeFlex
[15:07:21] <Colourless> 9120 is divisible by 480 if you didn't realize
[15:08:15] * wjp nods
[15:08:47] <wjp> there's probably a x8 in there somewhere for number of directions
[15:08:53] <Colourless> yeah i was thinkin that too
[15:09:00] <Colourless> 480x8 = 60 bytes
[15:09:05] <wjp> :-)
[15:09:09] <wjp> um.. :-)
[15:09:26] <Colourless> yes?
[15:10:00] <Colourless> avatar anim 4 has 19 frame
[15:10:06] <Colourless> 9120/480 = 19 :-)
[15:10:32] <wjp> how convenient :-)
[15:10:44] <wjp> so, 60 bytes.. still rather a lot
[15:10:57] <wjp> how many weapons are there?
[15:11:04] <Colourless> not 'that' many :-)
[15:11:24] <Colourless> i'm guessing there is 4 bytes per weapon
[15:11:32] <Colourless> one for shapenum, and one for the framenum to use
[15:11:33] <wjp> maybe 6? frame, x, y?
[15:11:54] <wjp> x,y could be in the frame directly, of course
[15:12:04] <wjp> (although it might require some duplicate frames)
[15:12:06] <Colourless> i'm guessing if we actually looked at data we could work it out :-)
[15:12:19] <wjp> nah :-)
[15:13:12] * wjp takes a peek anyway... looks like 4 byte blocks
[15:13:40] <Colourless> yes 4 bytes, with lost of 0 :-)
[15:13:42] <wjp> object 15 is only filled for 7x16 bytes. 0's after that
[15:14:11] <wjp> the 2nd uint16 appears to be some kind of flag field?
[15:14:47] <wjp> um, 8x16 bytes, btw, sorry
[15:14:50] <Colourless> hard to say
[15:16:52] <Colourless> shape 241 is a weapon, so lets see if it's in the array
[15:17:32] <Colourless> doesn't look like it
[15:21:19] <wjp> hm, are there 4 weapon-in-hand shapes? sword, axe, hammer, dagger?
[15:21:34] <wjp> or do things like a sabre, scimitar have their own shapes too?
[15:22:08] <Colourless> they share
[15:29:31] <Colourless> object 15 is filled for 8x16 bytes, on 7
[15:29:44] <Colourless> s/on/not/
[15:29:49] <wjp> <wjp> um, 8x16 bytes, btw, sorry
[15:29:56] <Colourless> didn't see that
[15:31:13] <Colourless> since there are 4 weapons with 8 dirs, each frame is 4 bytes
[15:31:54] * wjp nods
[15:32:02] <Colourless> or at least that is what it looks like, but what the data means i don't know
[15:32:10] * Darke 's opinion returns after playing Age of Kings with an assortment of creatures, then goes to find what is important to it. *grin*
[15:32:32] <wjp> there appears to be some periodicity every 32 bytes
[15:33:01] <Colourless> yes i noticed that too
[15:33:16] <Colourless> execpt for the last one which is different :-)
[15:36:30] <wjp> yes... on some fields the last one is quite different
[15:38:04] <Colourless> that would be the dagger though
[15:38:31] <Colourless> it might get entirely obstructed by the avatar when he's facing away from the screen, and the other weapons probably wont
[15:38:56] <wjp> interesting idea... that could be it, yes
[15:40:06] <wjp> apparently they also left room for other weapons
[15:40:21] <wjp> I wonder if they were planning to have separate graphics for the special/magic weapons
[15:41:06] <Colourless> it would make sense for magic foci to have anims when casting
[15:41:26] <Colourless> pretty much all of the sorcery foci are holdable
[15:41:29] <wjp> waving the key of the caretaker around? :-)
[15:41:33] <Colourless> yeah that too
[15:46:36] <Colourless> i think i'll be off now
[15:46:38] <Colourless> cya
[15:46:39] <-- Colourless has left IRC ("casts invisibility")
[16:57:17] --> Nadir has joined #pentagram
[17:16:26] <-- Nadir has left IRC ("I like core dumps")
[18:05:49] * Darke bleahs and needs to work on pentagram-stuff, or just needs to be awake-ish to talk pentagram-stuff, but must sleep now. *sigh* Night!
[18:06:03] --- Darke is now known as DarkeZzz
[18:07:00] <wjp> g'night :-)
[18:09:36] <-- wjp has left IRC ("brb")
[18:14:07] --> wjp has joined #pentagram
[18:14:07] --- ChanServ gives channel operator status to wjp
[19:40:04] <-- wjp has left IRC (Read error: 54 (Connection reset by peer))
[19:41:15] --> wjp has joined #pentagram
[19:41:15] --- ChanServ gives channel operator status to wjp
[23:35:46] <-- wjp has left IRC ("Zzzz...")
[23:37:38] --> Dark-Star has joined #pentagram