-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathAtlasMain.cpp
47 lines (36 loc) · 939 Bytes
/
AtlasMain.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Atlas main
#include "stdafx.h"
#include <ctime>
#include <string>
#include <vector>
#include "AtlasCore.h"
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
clock_t StartTime, EndTime, ElapsedTime;
int argoff = 0;
Logger.SetLogStatus(false);
StartTime = clock();
printf("Atlas 1.11 by Klarth\n\n");
if(argc != 3 && argc != 5)
{
printf("Usage: %s [switches] ROM.ext Script.txt\n", argv[0]);
printf("Switches: -d filename or -d stdout (debugging)\n");
printf("Arguments in brackets are optional\n");
return 1;
}
if(strcmp("-d", argv[1]) == 0)
{
if(strcmp("stdout", argv[2]) == 0)
Atlas.SetDebugging(stdout);
else
Atlas.SetDebugging(fopen(argv[2], "w"));
argoff+=2;
}
if(!Atlas.Insert(argv[1+argoff], argv[2+argoff]))
printf("Insertion failed\n\n");
EndTime = clock();
ElapsedTime = EndTime - StartTime;
printf("Execution time: %u msecs\n", (unsigned int)ElapsedTime);
return 0;
}