mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08: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++;
|
bitmask->bitlength++;
|
||||||
}
|
}
|
||||||
// I don't remember exactly why this works.
|
// tile order ABCDEFGHIJKLMNOP... becomes db order %HGFEDCBA %PONMLKJI ...
|
||||||
// I think it was that the bits are read backwards, but not indexed backwards.
|
|
||||||
int last = bitmask->bitlength - 1;
|
int last = bitmask->bitlength - 1;
|
||||||
bitmask->data[last / 8] >>= (7 - (last % 8));
|
bitmask->data[last / 8] >>= (7 - (last % 8));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user