mirror of
https://github.com/simtactics/mysimulation.git
synced 2025-03-15 14:51:21 +00:00
Placing the _build folder in .hgignore so I don't have to rebuild and reupload the binaries.
Also fixed a bug in .anim parsing in vbparse.
This commit is contained in:
parent
aa9ef65d64
commit
008363ce8f
2 changed files with 27 additions and 8 deletions
|
@ -96,6 +96,24 @@ 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);
|
||||
|
@ -103,12 +121,7 @@ void ReadPropsList(PropsList_t& PropsList){
|
|||
|
||||
for(unsigned i=0; i<count; i++){
|
||||
printf(" | | | [Prop %u]\n", i+1);
|
||||
PropsList.Props[i].Property = VBFile.readint32();
|
||||
printf(" | | | | Property: %u\n", PropsList.Props[i].Property);
|
||||
PropsList.Props[i].Key = VBFile.readstring();
|
||||
printf(" | | | | Key: %s\n", PropsList.Props[i].Key);
|
||||
PropsList.Props[i].Value = VBFile.readstring();
|
||||
printf(" | | | | Value: %s\n", PropsList.Props[i].Value);
|
||||
ReadPropEntries(PropsList.Props[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -84,12 +84,16 @@ struct Rotation_t {
|
|||
float w, x, y, z;
|
||||
};
|
||||
|
||||
struct Prop_t {
|
||||
uint32_t Property;
|
||||
struct KeyValuePair_t {
|
||||
char * Key;
|
||||
char * Value;
|
||||
};
|
||||
|
||||
struct Prop_t {
|
||||
uint32_t EntriesCount;
|
||||
KeyValuePair_t * Entries;
|
||||
};
|
||||
|
||||
struct PropsList_t {
|
||||
uint32_t PropsCount;
|
||||
Prop_t * Props;
|
||||
|
@ -142,6 +146,8 @@ struct Animation_t {
|
|||
Motion_t * Motions;
|
||||
};
|
||||
|
||||
void ReadPropEntry(KeyValuePair_t& Entry);
|
||||
void ReadPropEntries(Prop_t& Prop);
|
||||
void ReadAnimation(Animation_t& Animation);
|
||||
void ReadMotion(Animation_t& Animation, Motion_t& Motion);
|
||||
void ReadPropsList(PropsList_t& PropsList);
|
||||
|
|
Loading…
Add table
Reference in a new issue