Files
djhackersdev_minime/src/idz/encoder/loadStocker.ts
T
2019-11-06 17:28:29 -05:00

13 lines
335 B
TypeScript

import { bitmap } from "./_bitmap";
import { LoadStockerResponse } from "../response/loadStocker";
export function loadStocker(res: LoadStockerResponse) {
const buf = Buffer.alloc(0x00a0);
buf.writeInt16LE(0x00a8, 0x0000);
buf.writeUInt8(res.status, 0x0002);
bitmap(res.backgrounds, 0x24).copy(buf, 0x0003);
return buf;
}