idz: Hoist userdb code

This commit is contained in:
Tau
2020-09-01 01:10:31 +00:00
committed by Tau
parent bf390f15e2
commit d3ca8f80b7
245 changed files with 88 additions and 86 deletions
+19
View File
@@ -0,0 +1,19 @@
import { bitmap } from "./_bitmap";
import { chara } from "./_chara";
import { CarSelector } from "../model/car";
import { SaveStockerRequest } from "../request/saveStocker";
import { AimeId } from "../../../model";
saveStocker.msgCode = 0x00a6;
saveStocker.msgLen = 0x00c0;
export function saveStocker(buf: Buffer): SaveStockerRequest {
return {
type: "save_stocker_req",
aimeId: buf.readUInt32LE(0x0004) as AimeId,
backgrounds: bitmap(buf.slice(0x0008, 0x002c)),
selectedCar: buf.readUInt16LE(0x009c) as CarSelector,
chara: chara(buf.slice(0x009e, 0x00b2)),
};
}