diff options
Diffstat (limited to 'src/renderer.effekt')
-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 +} |