idz: Add LoadStockerResponse.myChara field

This commit is contained in:
BemaniWitch
2021-02-03 23:43:42 +00:00
committed by Tau
parent 1154414885
commit 7cd819b337
2 changed files with 14 additions and 1 deletions
+12 -1
View File
@@ -1,7 +1,7 @@
import { encodeBitmap } from "./_bitmap";
import { LoadStockerResponse } from "../response/loadStocker";
export function loadStocker(res: LoadStockerResponse) {
export function loadStocker1(res: LoadStockerResponse) {
const buf = Buffer.alloc(0x00a0);
buf.writeInt16LE(0x00a8, 0x0000);
@@ -10,3 +10,14 @@ export function loadStocker(res: LoadStockerResponse) {
return buf;
}
export function loadStocker2(res: LoadStockerResponse) {
const buf = Buffer.alloc(0x00a0);
buf.writeInt16LE(0x009d, 0x0000);
buf.writeUInt8(res.status, 0x0004);
encodeBitmap(res.backgrounds, 0x2c).copy(buf, 0x0005);
encodeBitmap(res.myChara, 0x98).copy(buf, 0x0031);
return buf;
}