diff options
Diffstat (limited to 'boot.php')
-rw-r--r-- | boot.php | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -2,13 +2,15 @@ require_once __DIR__.'/vendor/autoload.php'; +use GameBoy\Canvas\TerminalCanvas; use GameBoy\Core; use GameBoy\Keyboard; use GameBoy\Settings; $rom = base64_decode(file_get_contents('pokemon.rom')); -$core = new Core($rom); +$canvas = new TerminalCanvas(); +$core = new Core($rom, $canvas); $keyboard = new Keyboard($core); $core->start(); @@ -22,8 +24,8 @@ if ($core->stopEmulator & 2 == 2) { $keyboard->check(); } } else if (($core->stopEmulator & 2) == 0) { - echo "The GameBoy core is already running." . PHP_EOL; + echo 'The GameBoy core is already running.' . PHP_EOL; } else { - echo "GameBoy core cannot run while it has not been initialized." . PHP_EOL; + echo 'GameBoy core cannot run while it has not been initialized.' . PHP_EOL; }
\ No newline at end of file |