Fix current project
This commit is contained in:
@@ -2223,7 +2223,7 @@ class BuiltinFunction
|
||||
}
|
||||
if(projectname == "")
|
||||
{
|
||||
projectname = p.currentProject;
|
||||
projectname = p.project.currentProject;
|
||||
}
|
||||
if(resname == "TXT")
|
||||
{
|
||||
@@ -2256,7 +2256,7 @@ class BuiltinFunction
|
||||
}
|
||||
if(projectname == "")
|
||||
{
|
||||
projectname = p.currentProject;
|
||||
projectname = p.project.currentProject;
|
||||
}
|
||||
if(resname == "" || resname.indexOf("PRG") == 0)
|
||||
{
|
||||
@@ -2294,20 +2294,20 @@ class BuiltinFunction
|
||||
{
|
||||
throw new IllegalFunctionCall("PROJECT");
|
||||
}
|
||||
p.currentProject = name;
|
||||
p.project.currentProject = name;
|
||||
return;
|
||||
}
|
||||
throw new CantUseInProgram("PROJECT");
|
||||
}
|
||||
static void PROJECT(PetitComputer p, out Array!wchar name)
|
||||
{
|
||||
name = new Array!wchar(cast(wchar[])p.currentProject.dup);
|
||||
name = new Array!wchar(cast(wchar[])p.project.currentProject.dup);
|
||||
}
|
||||
//FILES TYPE$
|
||||
//((TXT|DAT):)?\w+/?
|
||||
static void FILES(PetitComputer p)
|
||||
{
|
||||
FILES(p, Value(cast(wchar[])p.currentProject));
|
||||
FILES(p, Value(cast(wchar[])p.project.currentProject));
|
||||
}
|
||||
static void FILES(PetitComputer p, Value nameOrArray)
|
||||
{
|
||||
@@ -2340,7 +2340,7 @@ class BuiltinFunction
|
||||
}
|
||||
else if (nameOrArray.type == ValueType.StringArray)
|
||||
{
|
||||
FILES(p, p.currentProject, nameOrArray);
|
||||
FILES(p, p.project.currentProject, nameOrArray);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -296,10 +296,8 @@ class PetitComputer
|
||||
}
|
||||
int[2] bgpage;
|
||||
Projects project;
|
||||
wstring currentProject;
|
||||
void init()
|
||||
{
|
||||
currentProject = "";
|
||||
project = new Projects(".");
|
||||
// DerelictGL.load();
|
||||
if(!exists(resourcePath))
|
||||
@@ -1035,7 +1033,7 @@ class PetitComputer
|
||||
}
|
||||
void printPrompt()
|
||||
{
|
||||
if(currentProject.length) console.print("[", currentProject, "]");
|
||||
if(project.currentProject.length) console.print("[", project.currentProject, "]");
|
||||
console.print("OK\n");
|
||||
}
|
||||
Console console;
|
||||
|
||||
@@ -17,6 +17,7 @@ enum DialogResult
|
||||
|
||||
class Projects
|
||||
{
|
||||
wstring currentProject;
|
||||
wstring rootPath;
|
||||
wstring projectPath;
|
||||
string projectPathU8;
|
||||
|
||||
Reference in New Issue
Block a user