UNPKG

arx-convert

Version:

Converts various Arx Fatalis formats to JSON or YAML and back

46 lines (45 loc) 1.35 kB
import { BinaryIO } from '../common/BinaryIO.js'; import { type ArxColor } from '../common/Color.js'; import type { ArxVector3 } from '../common/types.js'; import type { ArxPath, ArxZone } from './DLF.js'; /** * @see https://github.com/arx/ArxLibertatis/blob/1.2.1/src/ai/Paths.h#L65 * @see https://github.com/arx/ArxLibertatis/blob/ArxFatalis-1.21/Sources/Include/ARX_Paths.h#L128 */ export declare enum ArxZoneAndPathFlags { None = 0, SetAmbience = 2, SetBackgroundColor = 4, SetDrawDistance = 8 } /** * @see https://github.com/arx/ArxLibertatis/blob/1.2.1/src/scene/LevelFormat.h#L150 */ export type ArxZoneAndPathHeader = { name: string; flags: ArxZoneAndPathFlags; pos: ArxVector3; numberOfPoints: number; /** * known as `rgb` in arx source code */ backgroundColor: ArxColor; /** * known as `farClip` in arx source code */ drawDistance: number; /** * spelled as `ambianceMaxVolume` in arx source code */ ambienceMaxVolume: number; height: number; /** * spelled as `ambiance` in arx source code */ ambience: string; }; export declare class ZoneAndPathHeader { static readFrom(binary: BinaryIO<ArrayBufferLike>): ArxZoneAndPathHeader; static allocateFrom(zoneOrPath: ArxZone | ArxPath): ArrayBuffer; static sizeOf(): number; }