2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 05:47:42 +00:00

Add VISIGen utility

This commit is contained in:
Jack Andersen
2017-02-23 22:28:44 -10:00
parent 50fe6d34ab
commit ccbd19b9ea
21 changed files with 1578 additions and 15 deletions

View File

@@ -123,6 +123,9 @@ struct Application : boo::IApplicationCallback
}
static hecl::SystemChar CwdBuf[1024];
hecl::SystemString ExeDir;
#if _WIN32
int wmain(int argc, const boo::SystemChar** argv)
#else
@@ -132,6 +135,17 @@ int main(int argc, const boo::SystemChar** argv)
logvisor::RegisterStandardExceptions();
logvisor::RegisterConsoleLogger();
atSetExceptionHandler(AthenaExc);
if (hecl::SystemChar* cwd = hecl::Getcwd(CwdBuf, 1024))
{
if (argv[0][0] != _S('/') && argv[0][0] != _S('\\'))
ExeDir = hecl::SystemString(cwd) + _S('/');
hecl::SystemString Argv0(argv[0]);
hecl::SystemString::size_type lastIdx = Argv0.find_last_of(_S("/\\"));
if (lastIdx != hecl::SystemString::npos)
ExeDir.insert(ExeDir.end(), Argv0.begin(), Argv0.begin() + lastIdx);
}
urde::Application appCb;
int ret = boo::ApplicationRun(boo::IApplication::EPlatformType::Auto,
appCb, _S("urde"), _S("URDE"), argc, argv, false);