From 14a59dd1313e8ade8c108c52e3879b25f6e5b671 Mon Sep 17 00:00:00 2001 From: Can Date: Thu, 19 Dec 2024 12:48:33 +0100 Subject: feat: implement Renderer interface for Chip8 emulator --- src/renderer.effekt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/renderer.effekt (limited to 'src/renderer.effekt') diff --git a/src/renderer.effekt b/src/renderer.effekt new file mode 100644 index 0000000..7a78321 --- /dev/null +++ b/src/renderer.effekt @@ -0,0 +1,18 @@ +module src/renderer + +/* +The Renderer for the Chip8 emulator. +To support multiple backends, we define a Renderer interface. +Every backend must implement this interface. +*/ + +import bytearray +effect start(rom: ByteArray): Unit + +interface Renderer { + def init(): Unit / start + def clear(): Unit + def draw(x: Int, y: Int): Unit + def update(): Unit + def log(msg: String): Unit +} -- cgit v1.2.3