X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FSkeleton.cpp;h=34a5aa5574bfb140c0b7ac845a4d081eb89640bd;hb=41110fe74d2f239de59dac365078c7994709baba;hp=878bcbe13511cc6ec54d317c146abe447246c94a;hpb=de7834267e2ff8f28a2cb49647fc91e060686e93;p=lugaru.git diff --git a/Source/Skeleton.cpp b/Source/Skeleton.cpp index 878bcbe..34a5aa5 100644 --- a/Source/Skeleton.cpp +++ b/Source/Skeleton.cpp @@ -23,12 +23,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "Game.h" #include "Skeleton.h" #include "openal_wrapper.h" +#include "Animation.h" extern float multiplier; extern float gravity; extern Skeleton testskeleton; extern Terrain terrain; -extern OPENAL_SAMPLE *samp[100]; extern int channels[100]; extern Objects objects; extern int environment; @@ -40,8 +40,6 @@ extern XYZ envsound[30]; extern float envsoundvol[30]; extern int numenvsounds; extern float envsoundlife[30]; -extern int bonus; -extern float bonustime; extern int tutoriallevel; extern int whichjointstartarray[26]; @@ -1007,17 +1005,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);