2015-06-03 19:51:42 +09:00
|
|
|
import std.stdio;
|
2015-06-07 14:06:00 +09:00
|
|
|
import std.utf;
|
|
|
|
|
import std.conv;
|
|
|
|
|
import std.file;
|
2015-06-03 20:59:47 +09:00
|
|
|
import otya.smilebasic.parser;
|
2015-06-07 16:38:53 +09:00
|
|
|
import otya.smilebasic.error;
|
2015-07-06 23:09:15 +09:00
|
|
|
import otya.smilebasic.petitcomputer;
|
2016-09-02 22:04:28 +09:00
|
|
|
import std.getopt;
|
|
|
|
|
|
2015-06-03 19:51:42 +09:00
|
|
|
int main(string[] argv)
|
|
|
|
|
{
|
2016-09-02 22:04:28 +09:00
|
|
|
bool nodirectmode;
|
|
|
|
|
string inputfile;
|
2016-12-05 22:44:25 +09:00
|
|
|
bool antialiasing;
|
|
|
|
|
auto helpInformation = getopt(argv, "no-direct-mode", &nodirectmode, "file", &inputfile, "anti-aliasing", "Enable antialiasing.", &antialiasing);
|
2016-12-03 21:17:52 +09:00
|
|
|
if (helpInformation.helpWanted)
|
|
|
|
|
{
|
|
|
|
|
defaultGetoptPrinter("Some information about the program.",
|
|
|
|
|
helpInformation.options);
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
2015-08-23 14:44:01 +09:00
|
|
|
//try
|
2015-07-07 22:21:01 +09:00
|
|
|
{
|
|
|
|
|
auto pc = new PetitComputer();
|
2016-12-05 22:44:25 +09:00
|
|
|
pc.run(nodirectmode, inputfile, antialiasing);
|
2015-07-07 22:21:01 +09:00
|
|
|
}
|
2015-08-23 14:44:01 +09:00
|
|
|
/*(Throwable t)
|
2015-07-07 22:21:01 +09:00
|
|
|
{
|
|
|
|
|
writeln(std.windows.charset.toMBSz(t.to!string).to!string);
|
|
|
|
|
readln();
|
2015-08-23 14:44:01 +09:00
|
|
|
}*/
|
2015-06-03 19:51:42 +09:00
|
|
|
return 0;
|
|
|
|
|
}
|