#exult@irc.freenode.net logs for 7 May 2017 (GMT)

Archive Today Yesterday Tomorrow
Exult homepage

[01:10:43] <-- Dominus has left IRC (Ping timeout: 260 seconds)
[01:12:15] --> Dominus has joined #exult
[01:12:15] --- ChanServ gives channel operator status to Dominus
[03:12:12] <-- Rottingbeef has left IRC ()
[06:04:07] <-- Lightkey has left IRC (Ping timeout: 260 seconds)
[06:16:27] --> Lightkey has joined #exult
[15:10:56] --> Rottingbeef has joined #exult
[18:15:35] --> megaTherion has joined #exult
[18:15:43] <megaTherion> Hi
[21:11:15] <megaTherion> Someone from the pentagram proj available? (if ever ^^)
[21:21:01] <Lightkey> seems like everyone from #pentagram is here too
[21:22:02] <megaTherion> oh ok ^^
[21:25:03] <Lightkey> which would really just be the ops Dominus and wjp :-P
[21:44:50] <wjp> hi
[21:45:12] <wjp> megaTherion: what can I do for you?
[21:45:19] <megaTherion> hi wjp
[21:45:58] <megaTherion> well I've some questions about Pentagram and the Shapes regardin crusader, as I understood all progress and/or attempts regarding this have been ceased a long time ago
[21:48:49] <wjp> what would you like to know?
[21:50:18] <megaTherion> I think I understood the differences in the FLX formats and Shape between U8 and Crusader correctly, I've consulted the available documentation by the team and the shapeconv sourcecode - I compared the output of the converter with my own code. I get to the right frames and can also extract them - however I fail to properly decode the RLE data...
[21:50:54] <wjp> hm, I think we render crusader shapes properly
[21:50:55] <megaTherion> as far as I've seen shapeconv doesnt really convert the RLE data, it only adjust the Shape format properly and just copies the RLE data...
[21:51:39] <wjp> what's going wrong with your decoding?
[21:52:20] <Dominus> AFAIR in the old shapebrowsing days before properly doing pentagram, we rendered them properly
[21:52:43] <wjp> yes, we have screenshots
[21:52:45] <Dominus> Hi and good night - I'm off to bed ;)
[21:52:51] <megaTherion> night Dominus ^^
[21:55:35] <wjp> what does your decoded RLE look like?
[21:55:47] <wjp> (and have you tried rendering U8 shapes, or only crusader?)
[21:56:32] <megaTherion> wjp: well I only get distorted images so far, but also my asserts are telling me that things go wrong. Right now Im assuming that the RLE data is right after these `row offsets` which are 4b*height - I've checked in an hexeditor the offsets in shapes.flx, I think that seems to be correct.
[21:57:14] <megaTherion> but within the RLE data, is it correct that I've to add rowOffset[y] to it?
[21:57:20] <megaTherion> Nah I've only tried crusader ones so far
[22:00:09] <wjp> yes, that should point at the start of the row
[22:02:18] <wjp> just checked No Remorse, and pentagram does still render shapes properly
[22:02:31] <megaTherion> wjp: do you know which code in the Pentagram code base was doing it correctly, would ConvertShapeFrame::ReadCmpFrame in ConvertShape.cpp be a good start?
[22:03:42] <wjp> interesting, so that does look like it might be rewriting the rle data
[22:04:55] <wjp> although that function doesn't seem to be called for me here
[22:05:09] <megaTherion> I didnt entirely understand ReadCmpFrame, what's about with this `extra` and `special[c]`?
[22:05:17] <megaTherion> exacly ReadCmpFrame doesnt get called at all
[22:05:36] <megaTherion> it just adjust the header stuff due the 16bit -> 32bit transition
[22:05:58] <wjp> ah, I see now. You can ignore ReadCmpFrame
[22:06:23] <wjp> this is for the uninstalled version of U8, which had an extra level of compression in its shapes
[22:06:40] <wjp> (to reduce the number of floppy disks...)
[22:07:16] <wjp> so I _think_ it's directly passing the RLE data to our renderer
[22:07:33] <wjp> (which is in graphics/SoftRenderSurface.inl)
[22:10:29] <wjp> and documented in u8gfxfmp.txt
[22:11:30] <wjp> are you reading the rle/non-rle flag properly?
[22:21:25] <-- megaTherion has left IRC (*.net *.split)
[22:24:21] --> megaTherion has joined #exult
[22:24:25] <megaTherion> great, got disconnected
[22:25:56] <megaTherion> wjp: maybe you can repeat everything after "... passing the RLE data to our renderer" ^^
[22:27:53] <wjp> 00:08 <@wjp> (which is in graphics/SoftRenderSurface.inl)
[22:27:53] <wjp> 00:11 <@wjp> and documented in u8gfxfmp.txt
[22:27:53] <wjp> 00:12 <@wjp> are you reading the rle/non-rle flag properly?
[22:28:19] <megaTherion> ok thanks
[22:28:34] <megaTherion> well yes its the compression flag thingie which is 1 on RLE data?
[22:28:45] <megaTherion> <megaTherion> heh well ok, so far Im rendering nothing at all :P This is my 2nd day tinkering with it, for starters I only want to convert it to an image - TGA is fine, I simply used PBM
[22:28:45] <megaTherion> <megaTherion> wjp: is ShapeFrame::getPixelAtPoint the function which is doing it for your renderer, or is it somewhere else?
[22:28:51] <megaTherion> basically I've even tried this function...
[22:28:54] <megaTherion> no luck ^^
[22:30:11] <wjp> getPixelAtPoint is not ideal, but it should work
[22:31:01] <megaTherion> but something is wrong about the theory here, for example shape:9,frame:2 - I do assert(src < (data.rowData + buflen) and it fails :|
[22:31:29] <megaTherion> src = const uint8_t *src = data.rowData + data.rowOffsets[ypos]; - so its what you guys doing too, data.rowData is the rle_data here
[22:33:58] * wjp opens hex viewer
[22:34:41] <wjp> so
[22:37:07] <megaTherion> well buflen 1586 and suprisingly shapeconv is conforming it
[22:37:10] <megaTherion> so the length is correct
[22:39:24] <megaTherion> the particular offset ypos=61 is 1595, ok this cant be right
[22:43:24] <wjp> ok, that matches what I see
[22:43:37] <wjp> but I see framesize 2274 I think
[22:43:50] <megaTherion> wjp: oh wait, in ConvertShapeFrame::Read I've to do this absolute conversion: line_offsets[i] -= (height-i)*csf->bytes_line_offset;?
[22:45:00] <wjp> hrm, line_offset_absolute is false, so right
[22:45:58] <megaTherion> oh, ok Im lacking this... thats explaining why its wrong
[22:47:07] <wjp> right, that explains why the line offsets in the file go down sometimes
[22:48:26] <wjp> (and why the first one is 0x294 rather than 0)
[22:53:05] <megaTherion> wow
[22:53:09] <megaTherion> I think its working
[22:53:25] <wjp> great
[22:53:36] <megaTherion> damn lost attention for a minute and then searching for hours :(
[22:53:39] <megaTherion> but thanks a lot :)
[22:55:58] <megaTherion> wjp: btw. why didnt you guys continue with Crusader? :(
[22:58:26] <wjp> For me personally it's just not my kind of game
[22:59:05] <megaTherion> well thats ok ;)
[22:59:23] <wjp> Bed time for me too now
[22:59:33] <wjp> Good night, and good luck
[22:59:35] <megaTherion> good idea
[22:59:40] <megaTherion> cya, Ill stay around ^^
[23:00:01] <wjp> Keep me posted :-)
[23:28:59] <-- megaTherion has left #exult ("Leaving")