UNPKG

xcom2charpool

Version:

Library for reading, manipulating, and managing XCOM 2 character pool binary files, supporting both browser and Node.js environments.

26 lines (25 loc) 764 B
export interface Writer { position: number; /** * Writes a 32-bit unsigned integer at the current position. */ uint32(value: number): Writer; /** * Writes a 32-bit signed integer at the current position. */ int32(value: number): Writer; /** * Writes a byte at the current position. */ byte(value: number): Writer; /** * Writes padding (4 zero bytes) at the current position. */ padding(): Writer; /** * Writes a string with a length prefix and null-termination. * Automatically detects the encoding based on the characters used. * Uses some sort of ANSI for ASCII strings and UTF-16LE for strings with non-ASCII characters. */ string(value: string): Writer; }