X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FSkeleton.cpp;h=2959e8157ab33281b0a96369c0fc8cdff5e67a15;hb=9248d1455aa434112b5ddd771fd69b8df02d44ee;hp=1facda9b1fcbc36cb6aaec5d35fe51743a2e4b00;hpb=2be40815197f266e99b054544bbb988b20d2289c;p=lugaru.git diff --git a/Source/Skeleton.cpp b/Source/Skeleton.cpp index 1facda9..2959e81 100644 --- a/Source/Skeleton.cpp +++ b/Source/Skeleton.cpp @@ -1008,17 +1008,24 @@ void Skeleton::FindRotationMuscle(int which, int animation) if(!isnormal(muscles[which].rotate3))muscles[which].rotate3=0; } -void Animation::Load(char *filename, int aheight, int aattack) +void Animation::Load(const char *filename, int aheight, int aattack) { static FILE *tfile; static int i,j; static XYZ startoffset,endoffset; static int howmany; + static const char *anim_prefix = ":Data:Animations:"; + + LOGFUNC; + int len = strlen(anim_prefix) + strlen(filename); + char *buf = new char[len + 1]; + snprintf(buf, len + 1, "%s%s", anim_prefix, filename); // Changing the filename into something the OS can understand - char *fixedFN = ConvertFileName(filename); + char *fixedFN = ConvertFileName(buf); + delete[] buf; LOG(std::string("Loading animation...") + fixedFN);