Merge pull request #499 from reicast/skmp/gdtool

skmp/gdtool
This commit is contained in:
Stefanos Kornilios Mitsis Poiitidis 2014-06-19 01:19:15 +03:00
commit 4c67940eb5
5 changed files with 37 additions and 18 deletions

View File

@ -207,7 +207,7 @@ size_t core_fseek(core_file* fc, size_t offs, size_t origin) {
die("Invalid code path");
if (f->f)
fseek((FILE*)f, f->seek_ptr, SEEK_SET);
fseek(f->f, f->seek_ptr, SEEK_SET);
return 0;
}

View File

@ -66,6 +66,7 @@
<ItemGroup>
<ClCompile Include="..\core\deps\chdpsr\cdipsr.cpp" />
<ClCompile Include="..\core\deps\chdr\chdr.cpp" />
<ClCompile Include="..\core\deps\coreio\coreio.cpp" />
<ClCompile Include="..\core\deps\crypto\md5.cpp" />
<ClCompile Include="..\core\deps\crypto\sha1.cpp" />
<ClCompile Include="..\core\deps\libpng\png.c" />
@ -110,6 +111,7 @@
<ClInclude Include="..\core\deps\chdpsr\cdipsr.h" />
<ClInclude Include="..\core\deps\chdr\chd.h" />
<ClInclude Include="..\core\deps\chdr\coretypes.h" />
<ClInclude Include="..\core\deps\coreio\coreio.h" />
<ClInclude Include="..\core\deps\crypto\md5.h" />
<ClInclude Include="..\core\deps\crypto\sha1.h" />
<ClInclude Include="..\core\deps\libpng\config.h" />

View File

@ -115,6 +115,9 @@
<ClCompile Include="src\cdromfs.cpp">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\core\deps\coreio\coreio.cpp">
<Filter>deps\coreio</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\core\imgread\SCSIDEFS.H">
@ -195,6 +198,9 @@
<ClInclude Include="src\cdromfs_imp.h">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\core\deps\coreio\coreio.h">
<Filter>deps\coreio</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Filter Include="imgread">
@ -221,5 +227,8 @@
<Filter Include="deps\crypto">
<UniqueIdentifier>{a78ba9fb-70ba-4319-89e7-926abca0794c}</UniqueIdentifier>
</Filter>
<Filter Include="deps\coreio">
<UniqueIdentifier>{cac3d6da-3b7f-47ae-89be-59803c990f41}</UniqueIdentifier>
</Filter>
</ItemGroup>
</Project>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LocalDebuggerCommandArguments>c:\ika.chd</LocalDebuggerCommandArguments>
<LocalDebuggerCommandArguments>q:\ika.chd</LocalDebuggerCommandArguments>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
</Project>

View File

@ -181,6 +181,10 @@ void extract_data(FILE* w, bool first, Disc* d, int start_fad, int size) {
}
}
void hash_track() {
}
bool jsarray;
vector<string> cmds;
vector<string> files;
@ -204,6 +208,14 @@ void exec_cmd(FILE* w, bool first, Disc* d) {
case 'i':
extract_info(w, first, d);
break;
case 'h':
printf("hashes not supported yet");
break;
case 'f':
printf("fingerprint not supported yet");
break;
}
}
}
@ -238,27 +250,23 @@ void parse_args(int argc, char** argv) {
if (p[0][0] == '-')
{
i++;
auto cmd = string(p[0]);
switch(p[0][1]) {
case 'G':
case 'g':
if (cmd == "-get") {
cmds.push_back("g");
cmds.push_back(p[1]);
cmds.push_back(p[2]);
i+=2;
break;
case 'I':
case 'i':
} else if (cmd == "-info") {
cmds.push_back("i");
break;
default:
printf("Unknown option %c\n",*p[1]);
} else if (cmd == "-hash") {
cmds.push_back("h");
} else if (cmd == "-fingerprint") {
cmds.push_back("f");
} else {
printf("Unknown option %s\n", cmd.c_str());
}
}
else
files.push_back(p[0]);