From 4a1e8f5d28f374275b99d7ed1efa1308b86c288c Mon Sep 17 00:00:00 2001 From: Tau Date: Sun, 28 Apr 2019 16:00:52 -0400 Subject: [PATCH] Rename chara fields back to offsets Label all or label none. --- src/idz/decoder/_chara.ts | 4 ++-- src/idz/encoder/_chara.ts | 4 ++-- src/idz/model/chara.ts | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/idz/decoder/_chara.ts b/src/idz/decoder/_chara.ts index 2ba3b7b..1c481ef 100644 --- a/src/idz/decoder/_chara.ts +++ b/src/idz/decoder/_chara.ts @@ -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), diff --git a/src/idz/encoder/_chara.ts b/src/idz/encoder/_chara.ts index 82f07db..81a8f52 100644 --- a/src/idz/encoder/_chara.ts +++ b/src/idz/encoder/_chara.ts @@ -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); diff --git a/src/idz/model/chara.ts b/src/idz/model/chara.ts index 9f8ceb0..54335f9 100644 --- a/src/idz/model/chara.ts +++ b/src/idz/model/chara.ts @@ -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;