diff options
Diffstat (limited to 'src/Canvas')
-rw-r--r-- | src/Canvas/DrawContextInterface.php | 11 | ||||
-rw-r--r-- | src/Canvas/TerminalCanvas.php | 11 |
2 files changed, 12 insertions, 10 deletions
diff --git a/src/Canvas/DrawContextInterface.php b/src/Canvas/DrawContextInterface.php index 1666d92..8505ef5 100644 --- a/src/Canvas/DrawContextInterface.php +++ b/src/Canvas/DrawContextInterface.php @@ -1,18 +1,19 @@ <?php + namespace GameBoy\Canvas; /** * Interface to draw the GameBoy output - * GameBoy screen size: 160 x 144 + * GameBoy screen size: 160 x 144. */ interface DrawContextInterface { /** - * Draw image on canvas + * Draw image on canvas. * - * @param Array $canvasBuffer Each pixel => 4 items on array (RGBA) - * @param int $left - * @param int $top + * @param array $canvasBuffer Each pixel => 4 items on array (RGBA) + * @param int $left + * @param int $top */ public function draw($canvasBuffer, $left, $top); } diff --git a/src/Canvas/TerminalCanvas.php b/src/Canvas/TerminalCanvas.php index 12b772f..ce5b3aa 100644 --- a/src/Canvas/TerminalCanvas.php +++ b/src/Canvas/TerminalCanvas.php @@ -1,4 +1,5 @@ <?php + namespace GameBoy\Canvas; use Drawille\Canvas; @@ -17,11 +18,11 @@ class TerminalCanvas implements DrawContextInterface } /** - * Draw image on canvas using braille font + * Draw image on canvas using braille font. * - * @param Object $canvasBuffer $data = Each pixel = 4 items on array (RGBA) - * @param int $left - * @param int $top + * @param object $canvasBuffer $data = Each pixel = 4 items on array (RGBA) + * @param int $left + * @param int $top */ public function draw($canvasBuffer, $left, $top) { @@ -47,7 +48,7 @@ class TerminalCanvas implements DrawContextInterface $this->currentSecond = time(); $this->framesInSecond = 1; } else { - $this->framesInSecond++; + ++$this->framesInSecond; } echo "\e[H\e[2J"; |