Merge pull request #2 from ruscoe/master

Added minHealth property to prevent health bar becoming negative.
Added a small comment and some enters to the code from ruscoe!
Removed the player image, I now use spritesheets for all the entities.
Sprite's now change their direction based on their last movement, they can either face left or right!
Updated the entities spritesheet! The center is now on their bodies and not on their eyes. Looks a lot better when turning around.
Made a separate function for the direction change of a sprite!
It's now possible to define an offset for a sprite. This way you can render something above, below, left or right of it's original position.
Code refactoring. Making everything tidy!
Added documentation to the tooltip object. Also created a separate function for checking the longest string.
Fixed a small error on the tooltip longest line function. Didn't reference to the context variable.
Math.floor the final camera position so the position is always a rounded number. This prevents the pixel scaling from trying to enlarge half pixels and thus providing weird graphics.
Renamed events to type. That makes the code a whole lot clearer to understand. A type is also a string, not an object.
Updated the spritesheet to match the new bitwise autotiling.
Added some sort of bitwise autotiling! I adjusted it to my own needs, so I don't need to draw out 255 tiles.
Rooms now generate random tiles on the floor. And they always create a default tile type 10 wall.
Changing a tile to a wall will always place the default wall texture.
The default door sprite is now horizontal.
Cleaned up the MapDecorator object a bit. Also added documentation to describe how I handled the autotiling.
Removed another this = _this section. Pathfinding callback is now in a separate function, like it should be.