Implement PRGSLOT
This commit is contained in:
@@ -226,6 +226,7 @@ class Compiler
|
||||
addSystemVariable("RESULT", new Result());
|
||||
addSystemVariable("HARDWARE", new Hardware());
|
||||
addSystemVariable("MILLISEC", new MilliSecond());
|
||||
addSystemVariable("PRGSLOT", new ProgramSlot());
|
||||
}
|
||||
void addSystemVariable(wstring name, SystemVariable var)
|
||||
{
|
||||
|
||||
@@ -518,7 +518,7 @@ class Program
|
||||
{
|
||||
Slot[] slot;
|
||||
bool PRGEDITused;
|
||||
int currentSlot;
|
||||
int currentSlot = -1/*PRGSLOT default value*/;
|
||||
int slotSize = 4;
|
||||
this()
|
||||
{
|
||||
|
||||
@@ -131,3 +131,11 @@ class MilliSecond : SystemVariable
|
||||
return Value(cast(int)SDL_GetTicks());
|
||||
}
|
||||
}
|
||||
class ProgramSlot : SystemVariable
|
||||
{
|
||||
@property
|
||||
override Value value()
|
||||
{
|
||||
return Value(vm.petitcomputer.program.currentSlot);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user