H3 vcmi

I am attaching the patch for fixing #64 and #27.
#48 was fixed - I cannot reproduce it anymore.
#69 is valid. The issue is that the pulsing glowing (selecting or hovering a stack in the battle) is starting from a transparent color (and it continues to a visible yellow/blue), but it should start from a visible value (let’s say with transparency set at half). As far as I investigated I found that

aCountMod = (animCount & 0x20) ? ((animCount & 0x1e)>>1)<<4 : 0x0f - ((animCount & 0x1e)>>1)<<4;

from CCreatureAnimation::nextFrameT is responsible but is a puzzle for me what this values mean. Can somebody point me to the right direction with this bug?
I have also started to work on #37
Fix_64_27.zip (1.72 KB)

A few comments about your patch:

  1. the name of the new argument of playMouseHoveredAnimation (isHovered) should sound setAsHovered (since that’s what actually this it does),
  2. I think you should use struct instead of pair as type of lastMouseHoveredStackAnimation. Furthermore, storing CStacks as IDs is deprecated (you should use pointers to CStack instead).

Besides these two minor issues your code looks well :).

Actually CCreatureAnimation is an old, ugly code that should be replaced by Ivan’s CCreatureAnim. I think you should leave #69 for now.