diff --git a/client/CBattleInterface.cpp b/client/CBattleInterface.cpp index 17929eab9..7c8ed80eb 100644 --- a/client/CBattleInterface.cpp +++ b/client/CBattleInterface.cpp @@ -227,6 +227,7 @@ void CSpellEffectAnim::endAnim() for(int b=0; banim; owner->battleEffects.erase(toDel[b]); } diff --git a/client/CCreatureAnimation.cpp b/client/CCreatureAnimation.cpp index 9ecddb147..fbdae2b13 100644 --- a/client/CCreatureAnimation.cpp +++ b/client/CCreatureAnimation.cpp @@ -36,7 +36,7 @@ void CCreatureAnimation::setType(int type) } } -CCreatureAnimation::CCreatureAnimation(std::string name) : RLEntries(NULL), internalFrame(0), once(false) +CCreatureAnimation::CCreatureAnimation(std::string name) : internalFrame(0), once(false) { FDef = spriteh->giveFile(name); //load main file @@ -91,7 +91,6 @@ CCreatureAnimation::CCreatureAnimation(std::string name) : RLEntries(NULL), inte curFrame = 0; type = -1; frames = totalEntries; - RLEntries = new int[fullHeight]; } int CCreatureAnimation::readNormalNr (int pos, int bytCon, unsigned char * str) const @@ -207,7 +206,7 @@ int CCreatureAnimation::nextFrame(SDL_Surface *dest, int x, int y, bool attacker { ftcp+=FullWidth * TopMargin; } - memcpy(RLEntries, FDef+BaseOffset, SpriteHeight*sizeof(int)); + int * RLEntries = (int*)(FDef+BaseOffset); BaseOffset += sizeof(int) * SpriteHeight; for (int i=0;i0) ftcp += LeftMargin; @@ -357,7 +354,7 @@ SDL_Surface * CDefHandler::getSprite (int SIndex, unsigned char * FDef, BMPPalet if (SegmentType==0xFF) { - for (int k=0;kpixels))[ftcp++]=FDef[BaseOffset+k]; if ((TotalRowLength+k)>=SpriteWidth) @@ -387,12 +384,11 @@ SDL_Surface * CDefHandler::getSprite (int SIndex, unsigned char * FDef, BMPPalet case 2: { - for (int i=0;i0) ftcp += LeftMargin; diff --git a/hch/CDefHandler.h b/hch/CDefHandler.h index 55f500c8b..68cc73aea 100644 --- a/hch/CDefHandler.h +++ b/hch/CDefHandler.h @@ -28,7 +28,7 @@ private: int totalEntries, DEFType, totalBlocks; bool allowRepaint; int length; - unsigned int * RWEntries; + //unsigned int * RWEntries; struct SEntry { std::string name;