diff options
author | Rangi <remy.oukaour+rangi42@gmail.com> | 2022-02-21 08:58:22 -0500 |
---|---|---|
committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2022-02-21 08:58:22 -0500 |
commit | 2cc17f780a4b50ac3eebeb7e6865639926a611cd (patch) | |
tree | 1344aac52d6728cee0762f87a829eb180653b299 | |
parent | 418b73bc6d5c811bff464ee45a105b9c01248a89 (diff) |
Explain why make_frames works
-rw-r--r-- | tools/pokemon_animation.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/pokemon_animation.c b/tools/pokemon_animation.c index cb5766896..1d2d8c6cd 100644 --- a/tools/pokemon_animation.c +++ b/tools/pokemon_animation.c @@ -107,8 +107,7 @@ void make_frames(const uint8_t *tilemap, long tilemap_size, int width, struct Fr } bitmask->bitlength++; } - // I don't remember exactly why this works. - // I think it was that the bits are read backwards, but not indexed backwards. + // tile order ABCDEFGHIJKLMNOP... becomes db order %HGFEDCBA %PONMLKJI ... int last = bitmask->bitlength - 1; bitmask->data[last / 8] >>= (7 - (last % 8)); |