arx-convert
Version:
Converts various Arx Fatalis formats to JSON or YAML and back
52 lines (51 loc) • 1.69 kB
TypeScript
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;
position: ArxVector3;
numberOfPoints: number;
/**
* known as `rgb` in arx source code
*/
backgroundColor: ArxColor;
/**
* known as `farClip` in arx source code
*/
drawDistance: number;
/**
* A floating point number between 0 and 100.
*
* Spelled as `amb_max_vol` in arx source code
*/
ambienceMaxVolume: number;
height: number;
/**
* The filename of an amb file in `sfx/ambiance/` folder, for example "ambient_gob_jail_main", or "NONE" for no ambience.
*
* 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;
static isZone(zoneOrPath: ArxZone | ArxPath): zoneOrPath is ArxZone;
static setFlags(zoneOrPath: ArxZone | ArxPath): ArxZoneAndPathFlags;
}