Okay, thanks Cyb! I'll see if that checks out.
I'm testing some things in the vertex pool right now (Section 1-3) and it may have the following structure:
8 bytes per vertex:
YY ** ZZ ** XX ** AA AA, where:
YY: Magnitude of coordinate on the up & down axis on the screen plane
ZZ: Magnitude of coordinate on depth axis; toward or away from you with respect to the screen.
XX: Magnitude of coordinate on right & left axis on the screen plane
**: A directional reverser byte. If 00, the vertex is placed in one direction on the preceding axis, and if FF, the vertex gets placed on a coordinate the same "magnitude" but opposite direction on that axis.
AA AA: Two bytes that seem to form an index of some sort for the vertex. These two bytes show the progression pattern we noted a very long time ago: they go 00 00 for the first vertex, 01 00 for the second, all the way up to FF 00, then it progresses to 00 01, etc.
I may be describing these axes all wrong, and I'll post some pics later to illustrate. Also, the "origin" for each vertex in 3D space must be located with respect to a bone or something, so I'm wondering if the AA AA index somehow points to bone info.
Do vertex pools usually operate on this sort of system? Or does this setup look utterly wrong?
- - - - -
Freakin'Tastic UPDATE: I do believe the above scheme holds, based on the experiments I've conducted today. Here's some pics that result from manipulating the vertex info starting at offset 0x3250:
YY ** illustration:
This is extremely difficult to see, but look in the red circle. It appears that whatever vertex is controlled at this address has pushed the belt buckle up into Serge's chest. One can only make it out by virtue of polygon "clipping"...
ZZ ** illustration:
By reversing the ** byte from FF to 00 as well as changing the magnitude on the depth axis, I've succeeded in impaling Serge with his own belt buckle...
XX ** illustration:
First pic involves changing the magnitude on the right-left axis without altering the ** switch...
Next pic involves changing the magnitude on the right-left axis AND switching the ** byte, making the vertex go in the opposite direction on the right-left axis!
- - - -
ADDITIONAL UPDATE: I might as well just get all of Section 1-3 out of my system while I'm at it. Section 1-3 has 812 eight-byte "slots", and one vertex can fit in each "slot." Does that mean there are 812 unique vertices in Serge's model?
NO! Here's why I believe there aren't 812 unique vertices. Notice that each vertex "slot" has an index value AA AA following the coordinates in 3D space. In many cases the vertex pool exhibits a byte-progression pattern that affects each 8-byte "slot" as follows:
YY ** ZZ ** XX ** 00 00 - YY ** ZZ ** XX 01 00
YY ** ZZ ** XX ** 02 00 - YY ** ZZ ** XX 03 00
I shall term this pattern "8 byte mode" for future reference. But in many cases the data in Section 1-3 will enter "16 byte mode" using my terminology. That means two 8-byte "slots" are devoted to each vertex index like so:
YY ** ZZ ** XX ** 00 00 - YY ** ZZ ** XX 00 00
YY ** ZZ ** XX ** 01 00 - YY ** ZZ ** XX 01 00
Another reason why I believe one "slot" is devoted to each vertex in 8-byte mode versus two "slots" in 16-byte mode can be seen in the following picture. Only unaltered hex code is given along with the pictures; I've long since lost track of what new values I entered in. In the top-most pic, I modified values in two adjacent "slots" devoted to separate vertices on Serge's shoe. In the bottom-most pic, I modified values in two adjacent "slots" that appear to be devoted jointly to a single vertex on Serge's belt buckle...
http://img526.imageshack.us/img526/5585/structureevidenceaq6.gifNotice that when two adjacent slots that are in 8-byte mode are altered it affects two vertices, whereas two adjacent slots that are in 16-byte mode only affect one vertex when altered. Weird, huh?
I cannot explain why some vertices would need only one "slot" devoted to them, whereas others need two "slots." If this interpretation is accurate, however, it gives us the following structure for Section 1-3:
301 vertices in 0x28E8 ~ 0x324F (8-byte mode)
210 vertices in 0x3250 ~ 0x3F6F (16-byte mode)
5 vertices in 0x3F70 ~ 3F97 (8-byte mode)
43 vertices in 0x3F98 ~ 4247 (16-byte mode)
That adds up to 559 vertex indices. I'm not comfortable with that number to be honest, becaues Luminaire came up with a figure of 704 based on quad pointers in Section 1-2. I'm not finding pointers to the addresses that mark the boundaries between 8-byte mode and 16-byte mode vertices either (except the pointer from the belt buckle UV map to address 0x3250 in the vertex pool).
As far as the pointers from Section 1-2 to Section 1-3 go, I've found only a couple values that behave as pointers relative to the beginning of Section 1-3, address 0x28E8. We'll have to see what happens when we interpret the non-UV data in Section 1-2 as negative pointers relative to the end of Section 1-3, address 0x4247 (we can make it 0x4248 if that works instead). One quick way to check if this is possible is to take a look at the largest-magnitude negative and positive numbers in the non-UV data pointers. If the magnitudes are within the size range of Section 1-3, things will look up. Luminaire gave us that info awhile back, but I'll have to fish through this thread to find it again for testing.