import { GamelistDB, WpcEmuApi } from 'wpc-emu'; import { IEmulator } from '../game/iemulator'; import { Vertex2D } from '../math/vertex2d'; import { EmulatorState } from './emulator-state'; /** * Provides an interface to WPC-EMU */ export declare class Emulator implements IEmulator { readonly emulatorState: EmulatorState; private readonly emulatorMessageQueue; private readonly dmdSize; private paused; private emulator?; constructor(); loadGame(gameEntry: GamelistDB.GameEntry, romContent: Uint8Array): Promise; isInitialized(): boolean; getVersion(): string; setPaused(paused: boolean): void; getPaused(): boolean; registerAudioConsumer(callbackFunction: (audioCallback: WpcEmuApi.AudioMessage) => void): void; emuSimulateCycle(advanceByMs: number): number; getSwitchInput(switchNr: number): number; /** * * @param lampNr WPC-Numbering (11..88) */ getLampState(lampNr: number): number; getSolenoidState(SolenoidNr: number): number; getGIState(giNr: number): number; /** * Update Switch State * @param switchNr which switch number (11..88) to modifiy * @param optionalEnableSwitch if this parameter is missing, the switch will be toggled, else set to the defined state */ setSwitchInput(switchNr: number, optionalEnableSwitch?: boolean): boolean; setCabinetInput(value: number): void; setFliptronicsInput(value: string, optionalEnableSwitch?: boolean): void; getDmdDimensions(): Vertex2D; /** * returns the content of the DMD display, 1 byte per pixel * values range from 0 (dark) to 3 (bright) - this means the Uint8Array needs to be postprocessed */ getDmdFrame(): Uint8Array; getDipSwitchByte(): number; setDipSwitchByte(dipSwitch: number): void; }