[CF-Devel] Parsing archetype file

Mark Wedel mwedel at scruz.net
Thu Feb 22 22:06:54 CST 2001


Bob Tanner wrote:
>
     
     
     >
     
      I just want to parse the archetype file and get the archetype array from it. I
     
     >
     
      happily read the code and saw I could use the first_arch_pass function.
     
     >
     
     
     >
     
      But it looks like that the animation stuff needs to be loaded first. Does the
     
     >
     
      bmaps need to be loaded before the aninmation stuff?
     
     
 There is a fairly specific order in which the things need to be loaded.

>
     
     
     >
     
      I'd like to make a standalone util to be able to dump the archetypes in
     
     >
     
      customized formats. Looking at the code, the approach to dumping archetype is
     
     >
     
      tied to DM mode and keystrokes.
     
     
 Unfortunately, the library is not all that independent of the rest of the code,
and there are some dependancies (depending on the needs, you could avoid this -
if you wrote your own standalone utility, you could just have things like
find_face or whatever just return some value, if you don't actually care about
the faces)

>
     
     
     >
     
      Is this the easiest way for doing object dumps?
     
     >
     
     
     >
     
      Add a function called bobs_dump_arch() and do things that way?
     
     
 Yeah - look at server/init.c and the dump_ functions there.  Thats probably the
easiest way to do it - add a new dump flag.  Now it requires that the server be
used to get that data, but that isn't a very big deal.

    
    


More information about the crossfire mailing list