Skip to content

Commit 0cf2b08

Browse files
committed
Initial commit
0 parents  commit 0cf2b08

File tree

18 files changed

+1029
-0
lines changed

18 files changed

+1029
-0
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.vs/
2+
Debug/
3+
Release/
4+
X64/
5+
mgs/3rdparty/zlib/zconf.h
6+
mgs/3rdparty/zlib/zlib.h
7+
mgs/3rdparty/zlib/zlib.lib

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
2+
# Rex
3+
4+
5+
Rex is a free open source tool designed to be used with the game Metal Gear Solid on the original Playstation. It allows the user to extract Dir and Dar archive files packaged with the game
6+
7+
### To Do
8+
- Add multithreaded extract
9+
- Add error handling
10+
- Create GUI variant
11+
- Clean up the code
12+
13+
## Usage
14+
15+
Currently only a CLI version of the application exists. The program is primitive and just takes the filename as the only required argument. An optional output directory can also be added. It is also possible to just drag the file you wish to extract on the executable.
16+
17+
```
18+
Rex.exe "path\to\stage.dir"
19+
```
20+
The above instruction will extract all files from stage.dir to the current directory.
21+
22+
```
23+
Rex.exe "path\to\res_mdl0.dar"
24+
```
25+
The same can be used for Qar, Dar or Slot files.
26+
27+
```
28+
Rex.exe "path\to\stg_tex1.dar" "path\to\output"
29+
```
30+
An optional output path can be added at the end, if it is not included then it will extract to the directory of the file being extracted.
31+
32+
## License
33+
[MIT](LICENSE.md)
34+
This project falls under the MIT license.

Rex.sln

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.30907.101
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Rex", "Rex.vcxproj", "{77E3F2BF-D6A0-4E75-AF00-32318AE9F776}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|x64 = Debug|x64
11+
Debug|x86 = Debug|x86
12+
Release|x64 = Release|x64
13+
Release|x86 = Release|x86
14+
EndGlobalSection
15+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
16+
{77E3F2BF-D6A0-4E75-AF00-32318AE9F776}.Debug|x64.ActiveCfg = Debug|x64
17+
{77E3F2BF-D6A0-4E75-AF00-32318AE9F776}.Debug|x64.Build.0 = Debug|x64
18+
{77E3F2BF-D6A0-4E75-AF00-32318AE9F776}.Debug|x86.ActiveCfg = Debug|Win32
19+
{77E3F2BF-D6A0-4E75-AF00-32318AE9F776}.Debug|x86.Build.0 = Debug|Win32
20+
{77E3F2BF-D6A0-4E75-AF00-32318AE9F776}.Release|x64.ActiveCfg = Release|x64
21+
{77E3F2BF-D6A0-4E75-AF00-32318AE9F776}.Release|x64.Build.0 = Release|x64
22+
{77E3F2BF-D6A0-4E75-AF00-32318AE9F776}.Release|x86.ActiveCfg = Release|Win32
23+
{77E3F2BF-D6A0-4E75-AF00-32318AE9F776}.Release|x86.Build.0 = Release|Win32
24+
EndGlobalSection
25+
GlobalSection(SolutionProperties) = preSolution
26+
HideSolutionNode = FALSE
27+
EndGlobalSection
28+
GlobalSection(ExtensibilityGlobals) = postSolution
29+
SolutionGuid = {F4E5F536-F811-4C8E-A1AA-776CECF68C1E}
30+
EndGlobalSection
31+
EndGlobal

Rex.vcxproj

Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|Win32">
5+
<Configuration>Debug</Configuration>
6+
<Platform>Win32</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Release|Win32">
9+
<Configuration>Release</Configuration>
10+
<Platform>Win32</Platform>
11+
</ProjectConfiguration>
12+
<ProjectConfiguration Include="Debug|x64">
13+
<Configuration>Debug</Configuration>
14+
<Platform>x64</Platform>
15+
</ProjectConfiguration>
16+
<ProjectConfiguration Include="Release|x64">
17+
<Configuration>Release</Configuration>
18+
<Platform>x64</Platform>
19+
</ProjectConfiguration>
20+
</ItemGroup>
21+
<PropertyGroup Label="Globals">
22+
<VCProjectVersion>16.0</VCProjectVersion>
23+
<Keyword>Win32Proj</Keyword>
24+
<ProjectGuid>{77e3f2bf-d6a0-4e75-af00-32318ae9f776}</ProjectGuid>
25+
<RootNamespace>Rex</RootNamespace>
26+
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
27+
</PropertyGroup>
28+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
29+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
30+
<ConfigurationType>Application</ConfigurationType>
31+
<UseDebugLibraries>true</UseDebugLibraries>
32+
<PlatformToolset>v142</PlatformToolset>
33+
<CharacterSet>Unicode</CharacterSet>
34+
</PropertyGroup>
35+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
36+
<ConfigurationType>Application</ConfigurationType>
37+
<UseDebugLibraries>false</UseDebugLibraries>
38+
<PlatformToolset>v142</PlatformToolset>
39+
<WholeProgramOptimization>true</WholeProgramOptimization>
40+
<CharacterSet>Unicode</CharacterSet>
41+
</PropertyGroup>
42+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
43+
<ConfigurationType>Application</ConfigurationType>
44+
<UseDebugLibraries>true</UseDebugLibraries>
45+
<PlatformToolset>v142</PlatformToolset>
46+
<CharacterSet>Unicode</CharacterSet>
47+
</PropertyGroup>
48+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
49+
<ConfigurationType>Application</ConfigurationType>
50+
<UseDebugLibraries>false</UseDebugLibraries>
51+
<PlatformToolset>v142</PlatformToolset>
52+
<WholeProgramOptimization>true</WholeProgramOptimization>
53+
<CharacterSet>Unicode</CharacterSet>
54+
</PropertyGroup>
55+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
56+
<ImportGroup Label="ExtensionSettings">
57+
</ImportGroup>
58+
<ImportGroup Label="Shared">
59+
</ImportGroup>
60+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
61+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
62+
</ImportGroup>
63+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
64+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
65+
</ImportGroup>
66+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
67+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
68+
</ImportGroup>
69+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
70+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
71+
</ImportGroup>
72+
<PropertyGroup Label="UserMacros" />
73+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
74+
<LinkIncremental>true</LinkIncremental>
75+
</PropertyGroup>
76+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
77+
<LinkIncremental>false</LinkIncremental>
78+
</PropertyGroup>
79+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
80+
<LinkIncremental>true</LinkIncremental>
81+
</PropertyGroup>
82+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
83+
<LinkIncremental>false</LinkIncremental>
84+
</PropertyGroup>
85+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
86+
<ClCompile>
87+
<WarningLevel>Level3</WarningLevel>
88+
<SDLCheck>true</SDLCheck>
89+
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
90+
<ConformanceMode>true</ConformanceMode>
91+
<LanguageStandard>stdcpp17</LanguageStandard>
92+
</ClCompile>
93+
<Link>
94+
<SubSystem>Console</SubSystem>
95+
<GenerateDebugInformation>true</GenerateDebugInformation>
96+
</Link>
97+
</ItemDefinitionGroup>
98+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
99+
<ClCompile>
100+
<WarningLevel>Level3</WarningLevel>
101+
<FunctionLevelLinking>true</FunctionLevelLinking>
102+
<IntrinsicFunctions>true</IntrinsicFunctions>
103+
<SDLCheck>true</SDLCheck>
104+
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
105+
<ConformanceMode>true</ConformanceMode>
106+
<LanguageStandard>stdcpp17</LanguageStandard>
107+
</ClCompile>
108+
<Link>
109+
<SubSystem>Console</SubSystem>
110+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
111+
<OptimizeReferences>true</OptimizeReferences>
112+
<GenerateDebugInformation>true</GenerateDebugInformation>
113+
</Link>
114+
</ItemDefinitionGroup>
115+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
116+
<ClCompile>
117+
<WarningLevel>Level3</WarningLevel>
118+
<SDLCheck>true</SDLCheck>
119+
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
120+
<ConformanceMode>true</ConformanceMode>
121+
<LanguageStandard>stdcpp17</LanguageStandard>
122+
</ClCompile>
123+
<Link>
124+
<SubSystem>Console</SubSystem>
125+
<GenerateDebugInformation>true</GenerateDebugInformation>
126+
</Link>
127+
</ItemDefinitionGroup>
128+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
129+
<ClCompile>
130+
<WarningLevel>Level3</WarningLevel>
131+
<FunctionLevelLinking>true</FunctionLevelLinking>
132+
<IntrinsicFunctions>true</IntrinsicFunctions>
133+
<SDLCheck>true</SDLCheck>
134+
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
135+
<ConformanceMode>true</ConformanceMode>
136+
<LanguageStandard>stdcpp17</LanguageStandard>
137+
</ClCompile>
138+
<Link>
139+
<SubSystem>Console</SubSystem>
140+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
141+
<OptimizeReferences>true</OptimizeReferences>
142+
<GenerateDebugInformation>true</GenerateDebugInformation>
143+
</Link>
144+
</ItemDefinitionGroup>
145+
<ItemGroup>
146+
<ClCompile Include="interface\cli.cpp" />
147+
<ClCompile Include="main.cpp" />
148+
<ClCompile Include="mgs\archive\dar\dar.cpp" />
149+
<ClCompile Include="mgs\archive\stage\stage.cpp" />
150+
<ClCompile Include="mgs\config\cnf\cnf.cpp" />
151+
</ItemGroup>
152+
<ItemGroup>
153+
<ClInclude Include="interface\cli.h" />
154+
<ClInclude Include="mgs\archive\dar\dar.h" />
155+
<ClInclude Include="mgs\archive\stage\stage.h" />
156+
<ClInclude Include="mgs\common\ext_table.h" />
157+
<ClInclude Include="mgs\common\fileutil.h" />
158+
<ClInclude Include="mgs\common\util.h" />
159+
<ClInclude Include="mgs\config\cnf\cnf.h" />
160+
</ItemGroup>
161+
<ItemGroup>
162+
<None Include="README.md" />
163+
</ItemGroup>
164+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
165+
<ImportGroup Label="ExtensionTargets">
166+
</ImportGroup>
167+
</Project>

Rex.vcxproj.filters

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup>
4+
<Filter Include="Source Files">
5+
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
6+
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
7+
</Filter>
8+
<Filter Include="Header Files">
9+
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
10+
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
11+
</Filter>
12+
<Filter Include="Resource Files">
13+
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
14+
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
15+
</Filter>
16+
</ItemGroup>
17+
<ItemGroup>
18+
<ClCompile Include="main.cpp">
19+
<Filter>Source Files</Filter>
20+
</ClCompile>
21+
<ClCompile Include="interface\cli.cpp">
22+
<Filter>Source Files</Filter>
23+
</ClCompile>
24+
<ClCompile Include="mgs\archive\stage\stage.cpp">
25+
<Filter>Source Files</Filter>
26+
</ClCompile>
27+
<ClCompile Include="mgs\config\cnf\cnf.cpp">
28+
<Filter>Source Files</Filter>
29+
</ClCompile>
30+
<ClCompile Include="mgs\archive\dar\dar.cpp">
31+
<Filter>Source Files</Filter>
32+
</ClCompile>
33+
</ItemGroup>
34+
<ItemGroup>
35+
<ClInclude Include="interface\cli.h">
36+
<Filter>Header Files</Filter>
37+
</ClInclude>
38+
<ClInclude Include="mgs\config\cnf\cnf.h">
39+
<Filter>Header Files</Filter>
40+
</ClInclude>
41+
<ClInclude Include="mgs\archive\stage\stage.h">
42+
<Filter>Header Files</Filter>
43+
</ClInclude>
44+
<ClInclude Include="mgs\common\fileutil.h">
45+
<Filter>Header Files</Filter>
46+
</ClInclude>
47+
<ClInclude Include="mgs\common\util.h">
48+
<Filter>Header Files</Filter>
49+
</ClInclude>
50+
<ClInclude Include="mgs\common\ext_table.h">
51+
<Filter>Header Files</Filter>
52+
</ClInclude>
53+
<ClInclude Include="mgs\archive\dar\dar.h">
54+
<Filter>Header Files</Filter>
55+
</ClInclude>
56+
</ItemGroup>
57+
<ItemGroup>
58+
<None Include="README.md" />
59+
</ItemGroup>
60+
</Project>

Rex.vcxproj.user

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<ShowAllFiles>true</ShowAllFiles>
5+
</PropertyGroup>
6+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
7+
<LocalDebuggerCommandArguments>STAGE.DIR</LocalDebuggerCommandArguments>
8+
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
9+
</PropertyGroup>
10+
</Project>

0 commit comments

Comments
 (0)