UNPKG

arx-convert

Version:

Converts various Arx Fatalis formats to JSON or YAML and back

24 lines (23 loc) 1.07 kB
import type { SetOptional, Simplify } from 'type-fest'; import { type ArxDlfHeader } from './DlfHeader.js'; import { type ArxFog } from './Fog.js'; import { type ArxInteractiveObject } from './InteactiveObject.js'; import { type ArxScene } from './Scene.js'; import { type ArxZoneAndPathHeader } from './ZoneAndPathHeader.js'; import { type ArxZoneAndPathPoint } from './ZoneAndPathPoint.js'; export type ArxZone = Simplify<SetOptional<Omit<ArxZoneAndPathHeader, 'numberOfPoints' | 'pos' | 'flags'>, 'backgroundColor' | 'ambience' | 'ambienceMaxVolume' | 'drawDistance'> & { points: ArxZoneAndPathPoint[]; }>; export type ArxPath = Pick<ArxZone, 'name' | 'points'>; export type ArxDLF = { header: Omit<ArxDlfHeader, 'numberOfInteractiveObjects' | 'numberOfFogs' | 'numberOfZonesAndPaths'>; scene: ArxScene; interactiveObjects: ArxInteractiveObject[]; fogs: ArxFog[]; paths: ArxPath[]; zones: ArxZone[]; }; export declare class DLF { static load(decompressedFile: ArrayBufferLike): ArxDLF; static save(json: ArxDLF): ArrayBuffer; }