Add a hash mechanism to BaseMapSource.

This is needed to recognize what type of tiles a layer contains.
Client code has to fill in a map of hash => add_layer<T>() pointers.
As a layer is loaded, the correct add_layer<T>() is called based
on the hash saved with the layer itself.
This commit is contained in:
King_DuckZ 2015-06-07 03:57:18 +02:00
parent d21a567fb7
commit fd8a1cbabc
20 changed files with 1647 additions and 40 deletions

View file

@ -33,6 +33,7 @@ namespace dkh {
virtual int layersCount ( void ) const;
virtual const coords& tileSize ( void ) const;
virtual void chainedMaps ( std::vector<std::string>& parOut ) const;
virtual dk::HashType layerTypeHash ( int parIndex ) const;
private:
void parse_map_data ( std::istream& parSrc );