2018-12-23 17:21:30 -05:00
|
|
|
#include <std_include.hpp>
|
|
|
|
#include "loader/module_loader.hpp"
|
2018-12-26 14:21:20 -05:00
|
|
|
#include "utils/hook.hpp"
|
|
|
|
#include "game/game.hpp"
|
2018-12-23 17:21:30 -05:00
|
|
|
|
|
|
|
class dw final : public module
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
dw()
|
|
|
|
{
|
2018-12-24 16:22:57 -05:00
|
|
|
// TODO Patch DW
|
2018-12-23 17:21:30 -05:00
|
|
|
}
|
2018-12-26 14:21:20 -05:00
|
|
|
|
|
|
|
void post_load() override
|
|
|
|
{
|
|
|
|
utils::hook(SELECT_VALUE(0x6F40A0, 0x6EE1C0, 0x611310), bd_logger_stub, HOOK_JUMP).install()->quick();
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
static void bd_logger_stub(int /*type*/, const char* const /*channelName*/, const char*, const char* const /*file*/,
|
|
|
|
const char* const function, const unsigned int /*line*/, const char* const msg, ...)
|
|
|
|
{
|
|
|
|
char buffer[2048];
|
|
|
|
|
|
|
|
va_list ap;
|
|
|
|
va_start(ap, msg);
|
|
|
|
|
|
|
|
vsnprintf_s(buffer, sizeof(buffer), _TRUNCATE, msg, ap);
|
|
|
|
printf("%s: %s\n", function, buffer);
|
|
|
|
|
|
|
|
va_end(ap);
|
|
|
|
}
|
2018-12-23 17:21:30 -05:00
|
|
|
};
|
|
|
|
|
2018-12-26 10:59:03 -05:00
|
|
|
REGISTER_MODULE(dw)
|