idz: Hoist userdb code

This commit is contained in:
Tau
2020-09-01 01:10:31 +00:00
committed by da5669c09fdb0a288ba01e259a609d7779ac7fc9
parent 6dceb7c48a
commit f959993197
245 changed files with 88 additions and 86 deletions
+12
View File
@@ -0,0 +1,12 @@
import { encodeBitmap } 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);
encodeBitmap(res.backgrounds, 0x24).copy(buf, 0x0003);
return buf;
}