[ZoneBuilder] make startup prettier

This commit is contained in:
TheApadayo 2017-05-23 13:53:53 -04:00
parent e1a4605904
commit 5bbfdfed53

View File

@ -832,6 +832,7 @@ namespace Components
if (!Flags::HasFlag("stdout"))
{
Game::Sys_ShowConsole();
Utils::Hook::Call<void()>(0x43D140)(); // Com_EventLoop
}
Utils::Hook::Call<void(unsigned int)>(0x502580)(static_cast<unsigned int>(__rdtsc())); // Netchan_Init
Utils::Hook::Call<void()>(0x429080)(); // FS_InitFileSystem
@ -851,6 +852,11 @@ namespace Components
ZoneBuilder::Quit();
});
Command::Add("error", [](Command::Params*)
{
Game::Com_Error(0, "This is a test %s\n", "error");
});
// now load default assets and shaders
if (FastFiles::Exists("defaults") && FastFiles::Exists("shaders"))
{
@ -887,6 +893,16 @@ namespace Components
return 0;
}
Logger::Print(" --------------------------------------------------------------------------------\n");
Logger::Print(" IW4x ZoneBuilder (" VERSION ")\n");
Logger::Print(" Commands:\n");
Logger::Print("\t-buildzone [zone]: builds a zone from a csv located in zone_source\n");
Logger::Print("\t-buildall: builds all zones in zone_source\n");
Logger::Print("\t-verifyzone [zone]: loads and verifies the specified zone\n");
Logger::Print("\t-listassets [assettype]: lists all loaded assets of the specified type\n");
Logger::Print("\t-quit: quits the program\n");
Logger::Print(" --------------------------------------------------------------------------------\n");
// now run main loop until quit
while (true)
{
@ -928,14 +944,6 @@ namespace Components
if (!level) ExitProcess(1);
}
__declspec(naked) void ZoneBuilder::HandleErrorStub()
{
__asm
{
jmp ZoneBuilder::HandleError
}
}
ZoneBuilder::ZoneBuilder()
{
// ReSharper disable CppStaticAssertFailure