From ba304feb54cc42914e8fa1958f7a4ccd01c95ac2 Mon Sep 17 00:00:00 2001 From: Jonas Kulla Date: Wed, 9 Oct 2013 11:52:39 +0200 Subject: [PATCH] Minor code move Move animation based state data together and add comments --- src/tilemap.cpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/tilemap.cpp b/src/tilemap.cpp index 700e998..3a41ae3 100644 --- a/src/tilemap.cpp +++ b/src/tilemap.cpp @@ -179,6 +179,18 @@ static const Position positions[] = static elementsN(positions); +/* Autotile animation */ +static const uint8_t atAnimation[16*4] = +{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 +}; + +static elementsN(atAnimation); + +/* Flash tiles pulsing opacity */ static const uint8_t flashAlpha[] = { /* Fade in */ @@ -1220,16 +1232,6 @@ Tilemap::~Tilemap() dispose(); } -static const uchar atAnimation[16*4] = -{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 -}; - -static elementsN(atAnimation); - void Tilemap::update() { if (!p->tilemapReady)