More info on MAPS.BSA needed
Posted: Wed Oct 11, 2006 7:01 pm
I'm working on an online version of Daggerfall using my Daggerfall GL (DFGL) engine, and have come to a stop at the MAPS.BSA file. I've got the file formats information, but one part is unclear and is preventing me from moving forward with the project.
My engine can currently read and even precache the directories in the MAPS.BSA archive, but then I get to the data after the four-byte header at the top of the file. The information I have says that the first thing I encounter is a list of long values which are offset pointers to the location data. The thing is, at this point I don't know how many locations are contained in that region, so how do I know how many long values to read in?
I had thought about reading one long value, jumping to that offset and reading in the locational data, then jumping back to the start of the file plus four bytes for the header and an additional four bytes for every offset I have read, but after I get so many locations read, I'll jump into the first location instead of a four-byte long value. How would I determine the number of locations so I can read in that many pointers, and then how would I do the same for the dungeons? Thanks in advance.
My engine can currently read and even precache the directories in the MAPS.BSA archive, but then I get to the data after the four-byte header at the top of the file. The information I have says that the first thing I encounter is a list of long values which are offset pointers to the location data. The thing is, at this point I don't know how many locations are contained in that region, so how do I know how many long values to read in?
I had thought about reading one long value, jumping to that offset and reading in the locational data, then jumping back to the start of the file plus four bytes for the header and an additional four bytes for every offset I have read, but after I get so many locations read, I'll jump into the first location instead of a four-byte long value. How would I determine the number of locations so I can read in that many pointers, and then how would I do the same for the dungeons? Thanks in advance.