Divooka Reference

Case Hosting

3 nodes

On this page 3

Capture Case

Function

Draws one of the case's screens with no display, and gives back the picture.

Signature
CaptureCase -> Pixel Image
    crimeCase: CrimeProject
    screen: Case Screen
    width: Integer
    height: Integer
PixelImage CaptureCase(
    CrimeProject crimeCase,
    CaseScreen screen = CaseScreen.Menu,
    int width = 1280,
    int height = 800)

Parameters

nametypedefaultdescription
crimeCaseCrimeProject—A case, from CaseAuthoring.OpenCase.
screenCase ScreenMenuWhich screen to draw.
widthInteger1280Surface width in pixels.
heightInteger800Surface height in pixels.

Returns

resultPixel Image

Remarks

Settled before it is read: the host is pumped until nothing is animating, so the frame is the screen at rest rather than a frame caught part-way into a fade. The splash is the exception and is held mid-card on purpose, because a splash at rest is a splash that has already finished.

Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Case Hosting
Package
Crime Engine

Capture Case To File

Function

Draws one of the case's screens and writes it to a file.

Signature
CaptureCaseToFile -> Text
    crimeCase: CrimeProject
    imagePath: Text
    screen: Case Screen
    width: Integer
    height: Integer
string CaptureCaseToFile(
    CrimeProject crimeCase,
    string imagePath,
    CaseScreen screen = CaseScreen.Menu,
    int width = 1280,
    int height = 800)

Parameters

nametypedefaultdescription
crimeCaseCrimeProject—A case, from CaseAuthoring.OpenCase.
imagePathText—Where to write the PNG.
screenCase ScreenMenuWhich screen to draw.
widthInteger1280Surface width in pixels.
heightInteger800Surface height in pixels.

Returns

resultText
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Case Hosting
Package
Crime Engine

Play Case

Function

Opens a case in a window and plays it, returning when the window closes.

Signature
PlayCase
    crimeCase: CrimeProject
    openAt: Case Screen
    fullScreen: Truth
    width: Integer
    height: Integer
void PlayCase(
    CrimeProject crimeCase,
    CaseScreen openAt = CaseScreen.Menu,
    bool fullScreen = false,
    int width = 1280,
    int height = 800)

Parameters

nametypedefaultdescription
crimeCaseCrimeProject—A case, from CaseAuthoring.OpenCase.
openAtCase ScreenMenuWhich screen to open on.
fullScreenTruthFalseWhether to open full screen.
widthInteger1280Window width, which a full-screen host replaces immediately.
heightInteger800Window height.

Remarks

Blocks for as long as somebody is playing, which is what a window is. A graph that wants a picture rather than a session wants CaseHosting.CaptureCase.

Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Case Hosting
Package
Crime Engine