Skip to content

Commit

Permalink
Changed TileLayer data to be allocated in chunks (#1635)
Browse files Browse the repository at this point in the history
Now TileLayer data is allocated on-demand in 16x16 chunks.

In preparation of issue #260.
  • Loading branch information
ketanhwr authored and bjorn committed Jul 4, 2017
1 parent c3fce87 commit fb8c380
Show file tree
Hide file tree
Showing 5 changed files with 321 additions and 152 deletions.
3 changes: 3 additions & 0 deletions src/libtiled/tiled.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ enum Alignment {
BottomRight
};

const int CHUNK_SIZE = 16;
const int CHUNK_MASK = CHUNK_SIZE - 1;

static const char TILES_MIMETYPE[] = "application/vnd.tile.list";
static const char FRAMES_MIMETYPE[] = "application/vnd.frame.list";
static const char LAYERS_MIMETYPE[] = "application/vnd.layer.list";
Expand Down
Loading

0 comments on commit fb8c380

Please sign in to comment.