The application module contains the central type to the Dadren engine the AppObj and its Ref type App.The App serves a few primary roles for the game author:
- Loading configuration and assets
- Running the main loop
- Calling user event handlers
Procs
proc getLogicalSize(app: App): Size {.raises: [], tags: [].}
proc newApp(settings: AppSettings): App {.raises: [Exception], tags: [TimeEffect, RootEffect].}
proc newApp(width, height: int; title: string; scale = 1.0'f64; vsync = true; accelerated = true): App {.raises: [Exception], tags: [TimeEffect, RootEffect].}
proc clear(app: App; r, g, b: uint8) {.raises: [], tags: [].}
proc run(app: App; first_scene: Scene) {.raises: [Exception], tags: [RootEffect, TimeEffect].}