Skip to content
Snippets Groups Projects
Commit 13b718f5 authored by echicken's avatar echicken
Browse files

Avoid using Graphic for files that didn't have cols and rows in the SAUCE.

Graphic's default height means we'll only see the bottom 24 rows of longer
drawrings.
parent baf2b3cb
No related branches found
No related tags found
No related merge requests found
...@@ -84,8 +84,11 @@ var speedMap = [ ...@@ -84,8 +84,11 @@ var speedMap = [
function draw(file, cols, rows) function draw(file, cols, rows)
{ {
if(rows > console.screen_rows && cols <= console.screen_columns) if ((typeof rows == 'undefined' || typeof cols == 'undefined') ||
(rows > console.screen_rows && cols <= console.screen_columns)
) {
return console.printfile(file, (state.pausing ? P_NONE : P_NOPAUSE) |P_CPM_EOF); return console.printfile(file, (state.pausing ? P_NONE : P_NOPAUSE) |P_CPM_EOF);
}
// Use graphic when the entire image fits on the screen // Use graphic when the entire image fits on the screen
var graphic = new Graphic(cols, rows); var graphic = new Graphic(cols, rows);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment