Add WIDTH stub
This commit is contained in:
@@ -238,6 +238,18 @@ class BuiltinFunction
|
|||||||
throw new OutOfRange("ATTR", 1);
|
throw new OutOfRange("ATTR", 1);
|
||||||
p.console.attr = cast(otya.smilebasic.console.ConsoleAttribute)attr;
|
p.console.attr = cast(otya.smilebasic.console.ConsoleAttribute)attr;
|
||||||
}
|
}
|
||||||
|
static void WIDTH(PetitComputer p, int width)
|
||||||
|
{
|
||||||
|
if (width != 8 && width != 16)
|
||||||
|
{
|
||||||
|
throw new IllegalFunctionCall("WIDTH", 1);
|
||||||
|
}
|
||||||
|
p.console.width = width;
|
||||||
|
}
|
||||||
|
static int WIDTH(PetitComputer p)
|
||||||
|
{
|
||||||
|
return p.console.width;
|
||||||
|
}
|
||||||
static void VSYNC(PetitComputer p, DefaultValue!int time)
|
static void VSYNC(PetitComputer p, DefaultValue!int time)
|
||||||
{
|
{
|
||||||
time.setDefaultValue(1);
|
time.setDefaultValue(1);
|
||||||
|
|||||||
@@ -76,6 +76,7 @@ class Console
|
|||||||
GraphicPage GRPF;
|
GraphicPage GRPF;
|
||||||
PetitComputer petitcom;
|
PetitComputer petitcom;
|
||||||
bool[2] visibles = [true, true];
|
bool[2] visibles = [true, true];
|
||||||
|
int width;
|
||||||
bool visible()
|
bool visible()
|
||||||
{
|
{
|
||||||
return visibles[petitcom.displaynum];
|
return visibles[petitcom.displaynum];
|
||||||
@@ -118,6 +119,8 @@ class Console
|
|||||||
|
|
||||||
for(int i = 0; i < consoleColor.length; i++)
|
for(int i = 0; i < consoleColor.length; i++)
|
||||||
consoleColorGL[i] = petitcom.toGLColor(consoleColor[i]);
|
consoleColorGL[i] = petitcom.toGLColor(consoleColor[i]);
|
||||||
|
|
||||||
|
width = 8;
|
||||||
}
|
}
|
||||||
void createFontTable()
|
void createFontTable()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user