Apply fixed pony compression patches

Fixes issues with more than 32 mane sprites
Courtesy Pony Town Team
This commit is contained in:
Pony Town Team
2019-09-10 00:29:24 +02:00
committed by Stubenhocker1399
parent c316f24ac6
commit 4671aa53f8
2 changed files with 35 additions and 27 deletions
+2 -2
View File
@@ -86,9 +86,9 @@ describe('compressPony', () => {
tests.forEach(test => it(`works for set: ${JSON.stringify(test)}`, () => {
const [set, colorBits, customOutlines] = test;
const buffer = bitWriter(write => writeSet(write, colorBits, customOutlines, set));
const buffer = bitWriter(write => writeSet(write, 5, colorBits, customOutlines, set));
// console.log(map(buffer, x => x).map(x => x.toString(2).padStart(8, '0')).join(' '));
const result = readSet(bitReader(buffer), colorBits, customOutlines);
const result = readSet(bitReader(buffer), 5, colorBits, customOutlines);
expect(result).eql(set);
}));
});