mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-09-09 09:51:34 -07:00
Explain why make_frames works
This commit is contained in:
parent
418b73bc6d
commit
2cc17f780a
@ -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));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user