Enable some additional standard related checks for cppcheck
Merge pull request #298 from hansjoachim/cppcheck

Enable some additional standard related checks for cppcheck
#131: Use an existing head animation definition file for all heroes
Merge pull request #132 from hansjoachim/fix_headless_heroes

#131: Use an existing head animation definition file for all heroes
Rewrite enemy group spawning for speed.

The algorithm up to now worked like this:
foreach enemy group:
   * create a list of valid locations.
   * pick a random number N to determine the number of enemies placed.
   Do N times:
      * pick a random index from the valid locations list.
      * place enemy there, update valid locations list.

The above algorithm made sure that once N was picked, the exact number
of enemies were placed, unless there was absolutely no further valid
location. However setting up a list of valid locations is a big deal.
(Consider frontier_plains for example. There are some enemygroups all
over the map, having a width*heights=50*100=~5000 entries in the valid
locations list.

The new approach looks like this:
foreach enemy group:
   * pick a random number N to determine the number of enemies placed.
   * pick an upper bound M on failed placement attempts
   Try N times (and upper bound of failures not reached):
      * pick a random location from the enemy group area to place enemy
      * either decrease N or M depending on success

The new presented algorithm doesn't require huge data structures
(low memory overhead on map loading) and is also faster (no init/maintenance
of said data structures)
However there is a theoretical possibility to have less enemies placed
than initially determined (N). As N is a random number,
the player will not notice. Also by having 3 tries on average per placement
of an enemy this only impacts when the enemy group area is nearly
unwalkable.

About performance:
This change improves map loading times.

1) I setup a debugging warp, which warps the player to the warp position
itself, so the player is stuck in an endless warping. The whole warp
cycle was measured and printed to stdout. This scenario is best as nearly
all resources are cached by the engine, so the algorithms draw the cpu time.
Frontier plains before ~ 400ms, after ~250ms

2) setup a warping cycle with 2 maps (frontier plains to frontier outpost
and back again). This removes some cache effects.

whole cycle (2 warps) before ~730 ms, after ~520 ms
CMakeLists: if no option given, compile as Debug build.
Mapformat: Remove hex format for layers.

Maploading times improve by roughly 10 percent.
remove obsolete functions for hex conversion.
Merge pull request #300 from stefanbeller/perf

Remove usage of hexadecimal numbers.
Fix Heal spell bug

The Heal spell wasn't working when the Physical stat was boosted.
This caused the spell to have the wrong value for max_hp, meaning HP would
be reduced to what it would be without the Physical stat boost.

There were two things wrong here:

1. When removing effects, it was possible that the next effect would be
skipped for 1 frame. This went unnoticed because it gets corrected on the
next frame.
2. Calculating primary stat bonuses needed to be moved before all other
stat calculations.
Merge remote-tracking branch 'upstream/master' into bugfixes
Merge pull request #301 from dorkster/bugfixes

Fix Heal spell bug
Merge branch 'master' of git://github.com/clintbellanger/flare-engine
Clean up and comment MapRenderer::push_enemy_group
remove class variables of MapRenderer, use them locally.
MapRenderer: move variables to local scope.
MapRenderer: move constructor details into init list.
Introduce Utils::loadSfx function, which includes errorhandling.
Use LabelInfo for MenuCharacter's unspent points label

This fixes justify/valign values being ignored.
`show_unspent` is now obsolete.
Use `unspent=hidden` if you want to hide the unspent points display.
Merge pull request #299 from stefanbeller/master

Rewrite enemy group spawning.