mirror of
https://github.com/simtactics/niotso.git
synced 2025-07-14 10:11:57 -04:00
Working skeleton parser and "renderer", though at the moment the body mesh does not map correctly on to the skeleton.
This commit is contained in:
parent
c3e5da64f3
commit
860f67d522
6 changed files with 296 additions and 91 deletions
|
@ -75,10 +75,10 @@ void ReadMotion(Animation_t& Animation, Motion_t& Motion){
|
|||
unsigned pos = VBFile.getpos();
|
||||
VBFile.seekto(Animation.RotationsOffset + 16*Motion.RotationsOffset);
|
||||
for(unsigned i=0; i<Motion.FrameCount; i++){
|
||||
Motion.Rotations[i].w = VBFile.readfloat();
|
||||
Motion.Rotations[i].x = VBFile.readfloat();
|
||||
Motion.Rotations[i].y = VBFile.readfloat();
|
||||
Motion.Rotations[i].z = VBFile.readfloat();
|
||||
Motion.Rotations[i].w = VBFile.readfloat();
|
||||
}
|
||||
VBFile.seekto(pos);
|
||||
}
|
||||
|
@ -96,24 +96,6 @@ void ReadMotion(Animation_t& Animation, Motion_t& Motion){
|
|||
}
|
||||
}
|
||||
|
||||
void ReadPropEntry(KeyValuePair_t& Entry){
|
||||
Entry.Key = VBFile.readstring();
|
||||
printf(" | | | | | Key: %s\n", Entry.Key);
|
||||
Entry.Value = VBFile.readstring();
|
||||
printf(" | | | | | Value: %s\n", Entry.Value);
|
||||
}
|
||||
|
||||
void ReadPropEntries(Prop_t& Prop){
|
||||
unsigned count = Prop.EntriesCount = VBFile.readint32();
|
||||
printf(" | | | | EntriesCount: %u\n", Prop.EntriesCount);
|
||||
Prop.Entries = (KeyValuePair_t*) malloc(count * sizeof(KeyValuePair_t));
|
||||
|
||||
for(unsigned i=0; i<count; i++){
|
||||
printf(" | | | | [Entry %u]\n", i+1);
|
||||
ReadPropEntry(Prop.Entries[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void ReadPropsList(PropsList_t& PropsList){
|
||||
unsigned count = PropsList.PropsCount = VBFile.readint32();
|
||||
printf(" | | | PropsCount: %u\n", count);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue