import type { CvarRegistry } from '@quake2ts/engine'; import { CvarFlags, type RandomGeneratorState } from '@quake2ts/shared'; import type { RandomGenerator as RandomGeneratorType } from '@quake2ts/shared'; import type { CallbackRegistry, EntitySystem, EntitySystemSnapshot } from '../entities/index.js'; import { type PlayerInventory, type SerializedPlayerInventory } from '../inventory/index.js'; import type { LevelClock, LevelFrameState } from '../level.js'; export declare const SAVE_FORMAT_VERSION = 2; export interface CvarSaveEntry { readonly name: string; readonly value: string; readonly flags: CvarFlags; } export interface GameSaveFile { readonly version: number; readonly timestamp: number; readonly map: string; readonly difficulty: number; readonly playtimeSeconds: number; readonly gameState: Record; readonly level: LevelFrameState; readonly rng: RandomGeneratorState; readonly entities: EntitySystemSnapshot; readonly cvars: readonly CvarSaveEntry[]; readonly configstrings: readonly string[]; readonly player?: SerializedPlayerInventory; readonly checksum?: number; } export interface SaveCreationOptions { readonly map: string; readonly difficulty: number; readonly playtimeSeconds: number; readonly levelState: LevelFrameState; readonly entitySystem: EntitySystem; readonly rngState: RandomGeneratorState; readonly configstrings?: readonly string[]; readonly cvars?: CvarRegistry; readonly gameState?: Record; readonly timestamp?: number; readonly player?: PlayerInventory; } export interface SaveApplyTargets { readonly levelClock: LevelClock; readonly entitySystem: EntitySystem; readonly rng: RandomGeneratorType; readonly cvars?: CvarRegistry; readonly player?: PlayerInventory; readonly callbackRegistry?: CallbackRegistry; } export interface ParseSaveOptions { readonly allowNewerVersion?: boolean; } export declare function calculateSaveChecksum(save: Omit): number; export declare function createSaveFile(options: SaveCreationOptions): GameSaveFile; export declare function parseSaveFile(serialized: unknown, options?: ParseSaveOptions): GameSaveFile; export declare function applySaveFile(save: GameSaveFile, targets: SaveApplyTargets): void; //# sourceMappingURL=save.d.ts.map