1// Aseprite Document Library
2// Copyright (c) 2020 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_UTIL_H_INCLUDED
8#define DOC_UTIL_H_INCLUDED
9#pragma once
10
11#include "doc/tile.h"
12
13namespace doc {
14 class Image;
15 class Tileset;
16
17 // Function used to migrate an old tileset format (from internal
18 // v1.3-alpha3) which doesn't have an empty tile in the zero index
19 // (notile).
20 void fix_old_tileset(
21 Tileset* tileset);
22
23 // Function used to migrate an old tilemap format (from internal
24 // v1.3-alpha3) which used a tileset without an empty tile in the
25 // zero index (notile).
26 void fix_old_tilemap(
27 Image* image,
28 const Tileset* tileset,
29 const tile_t tileIDMask,
30 const tile_t tileFlagsMask);
31
32} // namespace doc
33
34#endif
35