diff --git a/src/idz/encoder/loadTopTen.ts b/src/idz/encoder/loadTopTen.ts index d289418..50e5342 100644 --- a/src/idz/encoder/loadTopTen.ts +++ b/src/idz/encoder/loadTopTen.ts @@ -50,13 +50,13 @@ export function loadTopTen(res: LoadTopTenResponse): Buffer { buf.writeUInt8(row.field_0F ? 1 : 0, innerOff + 0x000f); // Boolean buf.writeUInt8(row.field_10, innerOff + 0x0010); iconv.encode(row.driverName, "shift_jis").copy(buf, innerOff + 0x0014); - iconv.encode(row.teamName, "shift_jis").copy(buf, innerOff + 0x0028); + iconv.encode(row.team.name, "shift_jis").copy(buf, innerOff + 0x0028); iconv.encode(row.shopName, "shift_jis").copy(buf, innerOff + 0x0048); - buf.writeUInt32LE(row.field_74, innerOff + 0x0074); - buf.writeUInt16LE(row.field_78, innerOff + 0x0078); + buf.writeUInt32LE(row.team.nameBg, innerOff + 0x0074); + buf.writeUInt16LE(row.team.nameFx, innerOff + 0x0078); buf.writeUInt8(row.field_7C, innerOff + 0x007c); buf.writeUInt8(row.field_7D, innerOff + 0x007d); - // 66 bytes of fucking nothing what + // 66 bytes of empty space at the end. Maybe a string used to live here? } } diff --git a/src/idz/handler/loadTopTen.ts b/src/idz/handler/loadTopTen.ts index b2d8f0e..7f546a6 100644 --- a/src/idz/handler/loadTopTen.ts +++ b/src/idz/handler/loadTopTen.ts @@ -33,10 +33,12 @@ export async function loadTopTen( field_0F: false, field_10: 0, driverName: srcItem.driverName, - teamName: process.env.TEAM_NAME || "", shopName: process.env.SHOP_NAME || "", - field_74: 0, - field_78: 0, + team: { + name: process.env.TEAM_NAME || "", + nameBg: 0, + nameFx: 0, + }, field_7C: 0, field_7D: 0, ta: srcItem.ta, diff --git a/src/idz/response/loadTopTen.ts b/src/idz/response/loadTopTen.ts index 9499b13..704da2c 100644 --- a/src/idz/response/loadTopTen.ts +++ b/src/idz/response/loadTopTen.ts @@ -7,10 +7,12 @@ export interface LoadTopTenResponseRow { field_0F: boolean; field_10: number; driverName: string; - teamName: string; shopName: string; - field_74: number; - field_78: number; + team: { + name: string; + nameBg: number; + nameFx: number; + }; field_7C: number; field_7D: number; ta: TimeAttackScore;