Add platform-specific requestAnimationFrame, refactor redundant string accessor methods, and introduce BufferedImage and Color classes for emulator graphics rendering.

This commit is contained in:
2025-08-14 16:49:39 +02:00
parent c7552c2a95
commit 9f295b2fb9
16 changed files with 215 additions and 175 deletions

View File

@@ -23,11 +23,11 @@ class SetCommand : ShellCommand() {
MTMCToken.TokenType.BINARY
)
if (value == null) usageException()
val reg = Register.toInteger(register!!.stringValue())
val reg = Register.toInteger(register!!.stringValue)
if (reg >= 0) {
computer.setRegisterValue(reg, value!!.intValue())
} else {
throw IllegalArgumentException("Bad register: " + register.stringValue())
throw IllegalArgumentException("Bad register: " + register.stringValue)
}
} else {
val value = tokens.matchAndConsume(
@@ -42,7 +42,7 @@ class SetCommand : ShellCommand() {
} else {
computer.writeStringToMemory(
memLocation.intValue(),
value!!.stringValue().encodeToByteArray()
value!!.stringValue.encodeToByteArray()
)
}
}