| 1 | // Aseprite Document Library |
| 2 | // Copyright (c) 2019 Igara Studio S.A. |
| 3 | // |
| 4 | // This file is released under the terms of the MIT license. |
| 5 | // Read LICENSE.txt for more information. |
| 6 | |
| 7 | #ifndef DOC_TILESET_HASH_TABLE_H_INCLUDED |
| 8 | #define DOC_TILESET_HASH_TABLE_H_INCLUDED |
| 9 | #pragma once |
| 10 | |
| 11 | #include "doc/image.h" |
| 12 | #include "doc/image_ref.h" |
| 13 | #include "doc/images_map.h" |
| 14 | #include "doc/primitives.h" |
| 15 | #include "doc/tile.h" |
| 16 | |
| 17 | #include <unordered_map> |
| 18 | |
| 19 | namespace doc { |
| 20 | |
| 21 | // A hash table used to match Image pixels data <-> tileset index |
| 22 | typedef std::unordered_map<ImageRef, |
| 23 | tile_index, |
| 24 | details::image_hash, |
| 25 | details::image_eq> TilesetHashTable; |
| 26 | |
| 27 | } // namespace doc |
| 28 | |
| 29 | #endif |
| 30 | |