This commit is contained in:
parent
41c0d171c0
commit
2b41566727
@ -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 '%s: %s> ' string
|
||||
@ -441,7 +458,12 @@ namespace Components
|
||||
if (Loader::PerformingUnitTests()) return;
|
||||
|
||||
// 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();
|
||||
Utils::Hook::Nop(0x60BB58, 11);
|
||||
|
@ -46,6 +46,9 @@ namespace Components
|
||||
static void Create();
|
||||
static void Destroy();
|
||||
|
||||
static void StdOutPrint(const char* message);
|
||||
static void StdOutError(const char* format, ...);
|
||||
|
||||
static void ConsoleRunner();
|
||||
};
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ namespace Components
|
||||
{
|
||||
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()
|
||||
|
Loading…
Reference in New Issue
Block a user