Rename chara fields back to offsets

Label all or label none.
This commit is contained in:
Tau
2019-04-28 16:00:52 -04:00
parent e47922b5a0
commit 4a1e8f5d28
3 changed files with 6 additions and 6 deletions

View File

@@ -4,8 +4,8 @@ import { Chara } from "../model/chara";
export function chara(buf: Buffer): Chara {
return {
gender: buf.readUInt16LE(0x00) === 0 ? "male" : "female",
clothing: buf.readUInt16LE(0x02),
mouth: buf.readUInt16LE(0x04),
field_02: buf.readUInt16LE(0x02),
field_04: buf.readUInt16LE(0x04),
field_06: buf.readUInt16LE(0x06),
field_08: buf.readUInt16LE(0x08),
field_0A: buf.readUInt16LE(0x0a),

View File

@@ -4,8 +4,8 @@ export function chara(chara: Chara): Buffer {
const buf = Buffer.alloc(0x0014);
buf.writeUInt8(chara.gender === "male" ? 0 : 1, 0x00);
buf.writeUInt16LE(chara.clothing, 0x02);
buf.writeUInt16LE(chara.mouth, 0x04);
buf.writeUInt16LE(chara.field_02, 0x02);
buf.writeUInt16LE(chara.field_04, 0x04);
buf.writeUInt16LE(chara.field_06, 0x06);
buf.writeUInt16LE(chara.field_08, 0x08);
buf.writeUInt16LE(chara.field_0A, 0x0a);

View File

@@ -2,8 +2,8 @@ import { BackgroundCode, TitleCode } from "./base";
export interface Chara {
gender: "male" | "female";
clothing: number;
mouth: number;
field_02: number;
field_04: number;
field_06: number;
field_08: number;
field_0A: number;