-
Notifications
You must be signed in to change notification settings - Fork 5
window.um
Marek Maskarinec edited this page Sep 14, 2022
·
1 revision
variables:
w and h: the dimensions of the window
fpsLimit: the fpsLimit
fn setup*(title: str = "tophat game", width: int = 400, height: int32 = 400) {
Sets up the engine and opens a window.
fn cycle*(cam: rect.Rect): bool {
Cycle needs to be called every cycle. Pass the currently used camera, which i used to calculate tophat's scaling. It returns true, if the window is still running.
fn beginScissorRect*(r: rect.Rect) {
Disable rendering outside of rect r
fn endScissor*() {
Stops cropping