Here's an update of my little venture into nif parsing. Earlier parts were:
3. http://jsoftware.com/pipermail/programming/2014-February/035047.html 2. http://jsoftware.com/pipermail/programming/2014-February/035007.html 1. http://jsoftware.com/pipermail/programming/2014-February/034926.html Also, just for fun, here's my current music: http://www.youtube.com/watch?v=iWjRsd4kk9w Also, since the code is starting to get big, I've stashed it off in a gist: https://gist.github.com/rdm/9041044 When run, nif.ijs currently generates a variable named DATANIF which represents a game object (in this case it's the 3d geometry of a table). It's not particularly efficient yet, or anything, but it's good enough for me to move on (and I can make it radically more efficient by pasting more of the generated code back into the script). At this point, it illustrates several concepts: XML Parsing Binary file parsing Code generation I've a bit more ground work, to ensure basic data integrity (I want to be able to generate an exact copy of the file I read from the parsed data). Then I can move on to rendering (which represents the start of a user interface, gives me another view on the underlying data model and gives me another way of verifying the integrity of the system). Then I can get going on the really interesting stuff. And, yes, in a sense all I am doing so far is treading over ground that other people have already walked on. But that has important educational value, and I need a little infrastructure before I can move on to the next stages. Thanks, -- Raul ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
