This commit is contained in:
momo5502 2016-03-10 21:15:58 +01:00
parent 41c0d171c0
commit 2b41566727
3 changed files with 27 additions and 2 deletions

View File

@ -412,6 +412,23 @@ namespace Components
} }
} }
void Console::StdOutPrint(const char* message)
{
printf("%s", message);
}
void Console::StdOutError(const char* format, ...)
{
char buffer[0x1000] = { 0 };
va_list ap;
va_start(ap, format);
vsprintf_s(buffer, format, ap);
va_end(ap);
perror(buffer);
}
Console::Console() Console::Console()
{ {
// Console '%s: %s> ' string // Console '%s: %s> ' string
@ -441,7 +458,12 @@ namespace Components
if (Loader::PerformingUnitTests()) return; if (Loader::PerformingUnitTests()) return;
// External console // External console
if (Flags::HasFlag("console") || ZoneBuilder::IsEnabled()) // ZoneBuilder uses the game's console, until the native one is adapted. if (Flags::HasFlag("stdout"))
{
Utils::Hook(0x4B2080, Console::StdOutPrint, HOOK_JUMP).Install()->Quick();
Utils::Hook(0x43D570, Console::StdOutError, HOOK_JUMP).Install()->Quick();
}
else if (Flags::HasFlag("console") || ZoneBuilder::IsEnabled()) // ZoneBuilder uses the game's console, until the native one is adapted.
{ {
FreeConsole(); FreeConsole();
Utils::Hook::Nop(0x60BB58, 11); Utils::Hook::Nop(0x60BB58, 11);

View File

@ -46,6 +46,9 @@ namespace Components
static void Create(); static void Create();
static void Destroy(); static void Destroy();
static void StdOutPrint(const char* message);
static void StdOutError(const char* format, ...);
static void ConsoleRunner(); static void ConsoleRunner();
}; };
} }

View File

@ -35,7 +35,7 @@ namespace Components
{ {
AssetHandler::OnFind(Game::XAssetType::ASSET_TYPE_SOUND, MusicalTalent::ModifyAliases); AssetHandler::OnFind(Game::XAssetType::ASSET_TYPE_SOUND, MusicalTalent::ModifyAliases);
MusicalTalent::Replace("music_mainmenu_mp", "hz_dc_burning_intropeak_LR_1.mp3"); MusicalTalent::Replace("music_mainmenu_mp", "hz_t_menumusic.mp3");
} }
MusicalTalent::~MusicalTalent() MusicalTalent::~MusicalTalent()