Add undo-redo

This commit is contained in:
dylan
2023-05-06 11:35:02 -07:00
parent 9685568f90
commit 3ad23f3a91
4 changed files with 86 additions and 17 deletions

View File

@ -5,10 +5,10 @@ import {
} from "./window.ts";
import { font } from "./font.ts";
// import { keyDown, keyPressed, keyReleased } from "./keyboard.ts";
import { addToContext } from "./runcode.ts";
import { addToContext, runCode } from "./runcode.ts";
import { resetRepl } from "./repl.ts";
import { COLOR } from "./colors.ts";
import { getSheet } from "./sheet.ts";
import { getSheet, getCodeSheet } from "./sheet.ts";
export const drawSprite = (x: number, y: number, spr: number) => {
const {sheet_type, value: sprites} = getSheet(2);
@ -43,6 +43,9 @@ const faux = {
// key_down: keyDown,
// key_pressed: keyPressed,
// key_released: keyReleased,
code: (n: number) => {
return runCode(getCodeSheet(n));
},
log: console.log,
JSON: JSON,
};