Exception component

This commit is contained in:
Federico Cecchetto 2022-05-18 22:00:02 +02:00
parent 58c7ace277
commit 6da3aa162e
4 changed files with 16 additions and 12 deletions

View File

@ -84,9 +84,10 @@ namespace exception
void display_error_dialog()
{
std::string error_str = utils::string::va("Fatal error (0x%08X) at 0x%p.\n"
std::string error_str = utils::string::va("Fatal error (0x%08X) at 0x%p (0x%p).\n"
"A minidump has been written.\n\n",
exception_data.code, exception_data.address);
exception_data.code, exception_data.address,
reinterpret_cast<uint64_t>(exception_data.address) - game::base_address);
if (!system_check::is_valid())
{
@ -176,6 +177,7 @@ namespace exception
line("Clean game: "s + (system_check::is_valid() ? "Yes" : "No"));
line(utils::string::va("Exception: 0x%08X", exceptioninfo->ExceptionRecord->ExceptionCode));
line(utils::string::va("Address: 0x%llX", exceptioninfo->ExceptionRecord->ExceptionAddress));
line(utils::string::va("Base: 0x%llX", game::base_address));
#pragma warning(push)
#pragma warning(disable: 4996)
@ -258,4 +260,4 @@ namespace exception
};
}
//REGISTER_COMPONENT(exception::component)
REGISTER_COMPONENT(exception::component)

View File

@ -100,7 +100,6 @@ namespace scheduler
void r_end_frame_stub()
{
execute(pipeline::renderer);
//r_end_frame_hook.invoke<void>();
}
void server_frame_stub()
@ -109,10 +108,14 @@ namespace scheduler
execute(pipeline::server);
}
void main_frame_stub()
void* main_frame_stub()
{
main_frame_hook.invoke<void>();
execute(pipeline::main);
const auto _0 = gsl::finally([]()
{
execute(pipeline::main);
});
return main_frame_hook.invoke<void*>();
}
void hks_frame_stub()
@ -204,9 +207,8 @@ namespace scheduler
a.jmp(0x6A6310_b);
}), true);
//r_end_frame_hook.create(SELECT_VALUE(0x0, 0x6A6300_b), scheduler::r_end_frame_stub);
//g_run_frame_hook.create(SELECT_VALUE(0x0, 0x417940_b), scheduler::server_frame_stub);
//main_frame_hook.create(SELECT_VALUE(0x0, 0x0), scheduler::main_frame_stub);
main_frame_hook.create(SELECT_VALUE(0x0, 0x3438B0_b), scheduler::main_frame_stub);
//hks_frame_hook.create(SELECT_VALUE(0x0, 0x0), scheduler::hks_frame_stub); // no scripting for now
}

View File

@ -18,7 +18,7 @@ namespace demonware
this->register_task(12, &bdStorage::unk12);
this->map_publisher_resource("motd-.*\\.txt", DW_MOTD);
this->map_publisher_resource("ffotd-.*\\.ff", DW_FASTFILE);
// this->map_publisher_resource("ffotd-.*\\.ff", DW_FASTFILE);
this->map_publisher_resource("playlists(_.+)?\\.aggr", DW_PLAYLISTS);
}

View File

@ -101,7 +101,7 @@ namespace game
WEAK symbol<const char* (int, int, int)> Key_KeynumToString{0x0, 0x0};
WEAK symbol<unsigned int(int)> Live_SyncOnlineDataFlags{0x0, 0x0};
WEAK symbol<unsigned int(int)> Live_SyncOnlineDataFlags{0x0, 0x1A5C10};
WEAK symbol<Material* (const char* material)> Material_RegisterHandle{0x0, 0x692360};
@ -193,7 +193,7 @@ namespace game
WEAK symbol<void(char* path, int pathSize, Sys_Folder folder, const char* filename, const char* ext)>
Sys_BuildAbsPath{0x0, 0x0};
WEAK symbol<int()> Sys_Milliseconds{0x0, 0x0};
WEAK symbol<bool()> Sys_IsDatabaseReady2{0x0, 0x0};
WEAK symbol<bool()> Sys_IsDatabaseReady2{0x0, 0x4F79C0};
WEAK symbol<bool(int, void const*, const netadr_s*)> Sys_SendPacket{0x0, 0x0};
WEAK symbol<bool(const char* path)> Sys_FileExists{0x0, 0x0};