1
0

Implement ATTR function

This commit is contained in:
otya128
2016-12-04 17:27:51 +09:00
parent 8907277290
commit 19a20f7c5a
3 changed files with 94 additions and 41 deletions

View File

@@ -231,6 +231,12 @@ class BuiltinFunction
p.console.consoleForeColor = cast(int)fore;
p.console.consoleBackColor = cast(int)back;
}
static void ATTR(PetitComputer p, int attr)
{
if (attr < 0 || attr > 15)
throw new OutOfRange("ATTR", 1);
p.console.attr = cast(otya.smilebasic.console.ConsoleAttribute)attr;
}
static void VSYNC(PetitComputer p, DefaultValue!int time)
{
time.setDefaultValue(1);