No extraction! Gosh, what will we do? ..
Prey wrote:Oh, and i just finished writing up a function that gets correct meta sizes

(wooo). Seeing as reflexives are all in their 'pools' now instead of like in Halo2 where they could (normally) be found after the tags meta header; you can treat these meta sizes as header sizes, thus making the latter term obsolete.
http://www.homebrewgames.co.uk/xbox/hal ... s_list.txt
I think i'll explain now how i actually got these sizes, so to not keep anyone in the dark:
I first have a list of all the meta offsets from all the tags within a map, i also add to this list the offsets of the tagInfoIndexHeader, tagInfoIndex, classIndex and the Index. Once these are added i have the offsets for just about every object that is to be found in the virtual segment of the map, the only offsets i do not have are those of the reflexives.
I loop through my offset list, getting a basic size for each by subtracting from the offset of the object (another meta, or one of the four above) that comes after the current, with the offset of the current.
I now remove the four things i added earlier, they are no longer needed.
Now to loop through all the tagClasses in the map. Note that i also have another list (the 'classList'); this ones stores for us tagClasses with their sizes. I now loop through this list within the loop i just mentioned and try to find the index of the class i am currently on. If i dont find anything, i add the class to the list.
I then loop through the maps tags of the current class, and if a tags size is smaller than what we've currently got in the classList; i update the list with it.
I do this for all the maps and end up with a list of tagClasses that each contain the smallest size found for that particular class. Stage 1 complete.
Now we need to loop through the maps again. Each time, we add those four objects mentioned at the start to a new list of ours, loop through every tag and add its offset to the list too, and scan its meta for reflexives and add the translations taken from those.
Now scanning for reflexives can be quite a risky business, what if picks up something that isn't a reflexive? Well we do know of some limitations to hopefully stop this from happening:
Chunk Count - Checks if this is zero or higher.
Pointer - Subtracts the magic from it and makes sure the result is within the virtual segment of the map. The fact that we have to subtract the magic from the pointer in the first place, as well as the fact that the magic is always a negative number; means that the pointer must be a negative in the first place, so that by subtracting the magic we get a positive. This a good thing as it narrows down even further our entry level integers; a chunk count that is zero or higher followed by a negative, thanks bungie
Lucky for us that it is such a unique structure, i don't think we'll be picking up any strays

(hope not anyhow)
So we've lots of offsets now all jumbled up in our list, so obviously its time to sort them. Once done, we can find the sizes of each object quite simply; subtract from the object in front the offset of the current object. For the last object, we subtract from the offset that marks the eof of the virtual segment.
..and finally loop through our classList again and update any classes if a tag is found to have a smaller meta size than what is currently listed.
Once done for all maps, finish off with the code that'll output it all to a nice .txt file.
The Bad News
There are 2 possible things that could mess up this function:
1. Nested reflexives (reflexives inside reflexives) - This function never incorporates them into the equation. I may think of doing it later when i have time, but in all honesty; it will be quite hard - Mostly because the limitation of size becomess quite variable, and thus quite wrong
2. When the function actually scans for reflexives, in the beginning stages it is a fact that the meta sizes will be wrong (too big), and so reflexives that are found may not be part of that tags meta. Not to worry too much though, as at least two of the three outcomes are harmless:
- The reflexive is part of another tags meta - no worries then, we'll just get duplicate items in the list which will make no difference to the overall outcome.
- The reflexive is nested - Even better. having these will make the overall results much more accurate.
- It isnt a reflexive - Uh oh. Well nothing we can do about that. I mentioned earlier how bullet proof the reflex structure is, so we'll just have to hope it holds out

The Good News
The function maps out the position of every reflexive pointed to from the meta. So with a few extra lines of code, i can all this outputted into plugins for the release of H3Core
Christ, i didnt realize i wrote so much, its only like 200 lines of code >_>