From 34bde6ca648fca46a5963f6e2589fc54d0157513 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=C3=A3o=20Magalh=C3=A3es?= <joamag@gmail.com>
Date: Sun, 3 Jul 2022 04:04:46 +0100
Subject: [PATCH] feat: small set of fixes

---
 examples/web/index.css | 2 +-
 examples/web/index.ts  | 4 ++--
 src/gb.rs              | 4 ++++
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/examples/web/index.css b/examples/web/index.css
index 31f6533f..4f046ba5 100644
--- a/examples/web/index.css
+++ b/examples/web/index.css
@@ -26,7 +26,7 @@ html {
 
 body {
     color: #ffffff;
-    font-family: "VT323", "Robot", "Open Sans", Arial, Helvetica, sans-serif;
+    font-family: "VT323", "Roboto", "Open Sans", Arial, Helvetica, sans-serif;
     margin: 0px 0px 0px 0px;
     padding: 12px 12px 52px 12px;
 }
diff --git a/examples/web/index.ts b/examples/web/index.ts
index c25f67d1..8d4d0a37 100644
--- a/examples/web/index.ts
+++ b/examples/web/index.ts
@@ -49,7 +49,7 @@ const KEYS: Record<string, number> = {
 };
 
 // @ts-ignore: ts(2580)
-const ROM_PATH = require("../../res/roms/ld_r_r.gb");
+const ROM_PATH = require("../../res/roms/tetris.gb");
 
 type State = {
     gameBoy: GameBoy;
@@ -180,7 +180,7 @@ const main = async () => {
                 await clearCanvas(undefined, {
                     // @ts-ignore: ts(2580)
                     image: require("./res/storm.png"),
-                    imageScale: 0.4
+                    imageScale: 0.2
                 });
 
                 await wasm();
diff --git a/src/gb.rs b/src/gb.rs
index 67bafdbc..a70e2cfe 100644
--- a/src/gb.rs
+++ b/src/gb.rs
@@ -40,6 +40,10 @@ impl GameBoy {
         GameBoy { cpu: cpu }
     }
 
+    pub fn pc(&self) -> u16 {
+        self.cpu.pc()
+    }
+
     pub fn clock(&mut self) -> u8 {
         let cycles = self.cpu_clock();
         self.ppu_clock(cycles);
-- 
GitLab