diff options
author | Can | 2024-12-19 12:48:33 +0100 |
---|---|---|
committer | Can | 2024-12-19 12:48:33 +0100 |
commit | 14a59dd1313e8ade8c108c52e3879b25f6e5b671 (patch) | |
tree | 44f270aca22db49a62ab977123819a69656c2462 | |
parent | 32c3cd70d157166d0ddf8c18833788f0c69533e3 (diff) |
feat: implement Renderer interface for Chip8 emulator
-rw-r--r-- | src/renderer.effekt | 18 |
1 files changed, 18 insertions, 0 deletions
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 +} |