#include "libvitaboy.hpp" static unsigned motionnumber = 0; void ReadAnimation(Animation_t& Animation){ printf("===== Animation =====\n"); Animation.Version = VBFile.readint32(); printf("Version: %u\n", Animation.Version); Animation.Name = VBFile.readstring2(); printf("Name: %s\n", Animation.Name); Animation.Duration = VBFile.readfloat(); printf("Duration: %g\n", Animation.Duration/1000); Animation.Distance = VBFile.readfloat(); printf("Distance: %g\n", Animation.Distance); Animation.IsMoving = VBFile.readint8(); printf("IsMoving: %u\n", Animation.IsMoving); Animation.TranslationsCount = VBFile.readint32(); printf("TranslationsCount: %u\n", Animation.TranslationsCount); Animation.TranslationsOffset = VBFile.getpos(); VBFile.seekto(Animation.TranslationsOffset + 12*Animation.TranslationsCount); Animation.RotationsCount = VBFile.readint32(); printf("RotationsCount: %u\n", Animation.RotationsCount); Animation.RotationsOffset = VBFile.getpos(); VBFile.seekto(Animation.RotationsOffset + 16*Animation.RotationsCount); Animation.MotionsCount = VBFile.readint32(); printf("MotionsCount: %u\n", Animation.MotionsCount); Animation.Motions = (Motion_t*) malloc(Animation.MotionsCount * sizeof(Motion_t)); for(unsigned i=0; i