idz: Label additional team info in topTen response

This commit is contained in:
Tau
2019-11-30 13:31:07 -05:00
parent afa02c0fc7
commit c37b2074f0
3 changed files with 14 additions and 10 deletions

View File

@@ -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?
}
}

View File

@@ -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,

View File

@@ -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;