Seeing as to how you guys are gonna take ages trying to program a full .p importer/extractor, I propose an alternative:
Colouring the vertices of the models in 3DS max
Animating in 3DS max (but not with skeleton animation)
I figured out early on that FF7's character animations were not skeletal, like Unreal Tournament or Half-Life, but are a simple translation/linking technique. Here's how it can be duplicated in 3DS MAX(with Cluod as an example):
-1 - Convert all the .p files you need for your character.
0 - Set up Cloud's body. You can do this by viewing a picture of Cloud and working on how the parts should be placed.
1 - Now that you have all the parts set up, start linking the parts together in this fashion:
-If you want to link the foot to it's leg to make a joint, click on the link button(it's the 4th button from the left on the standard buttons toolbar)
select the foot and drag the mouse till it's over the leg. Now you have a joint (this is actually achieved because the FF7 models are set up so that when they are linked, the links form joints). Here's a helpful list for the order in which you should link:
OBJECTS(IN ORDER):
//////////////////////////
UPPER_BODY:
//////////////////////////
- abdmn
- head
ARMS:
- right_upArm
- right_lrArm
- right_hand
- left_upArm
- left_lrArm
- left_hand
//////////////////////////
LOWER_BODY:
//////////////////////////
- hip
LEGS:
- upLeg
- lrLeg
- footBck
- footFrnt
Now you can start animating(I don't need to explain that). If you can't export the animation from 3DSMAX, you can copy the rotation,movement,scaling values of the animated limbs at each keyframe and copy them into your program. If this looks like a stupid way of solving the problem I have a max file which has the animation for anyone who is interested.