Drop dependency on old-style xex2 headers
This commit is contained in:
@@ -78,6 +78,18 @@ bool XexModule::GetOptHeader(const xex2_header* header, xe_xex2_header_keys key,
|
||||
return false;
|
||||
}
|
||||
|
||||
bool XexModule::GetOptHeader(xe_xex2_header_keys key, void** out_ptr) const {
|
||||
return XexModule::GetOptHeader(xex_header_, key, out_ptr);
|
||||
}
|
||||
|
||||
uint32_t XexModule::GetProcAddress(uint16_t ordinal) const {
|
||||
return xe_xex2_lookup_export(xex_, ordinal);
|
||||
}
|
||||
|
||||
uint32_t XexModule::GetProcAddress(const char* name) const {
|
||||
return xe_xex2_lookup_export(xex_, name);
|
||||
}
|
||||
|
||||
bool XexModule::ApplyPatch(XexModule* module) {
|
||||
auto header = reinterpret_cast<const xex2_header*>(module->xex_header());
|
||||
if (!(header->module_flags &
|
||||
|
||||
@@ -40,6 +40,10 @@ class XexModule : public xe::cpu::Module {
|
||||
// not a pointer!
|
||||
static bool GetOptHeader(const xex2_header* header, xe_xex2_header_keys key,
|
||||
void** out_ptr);
|
||||
bool GetOptHeader(xe_xex2_header_keys key, void** out_ptr) const;
|
||||
|
||||
uint32_t GetProcAddress(uint16_t ordinal) const;
|
||||
uint32_t GetProcAddress(const char* name) const;
|
||||
|
||||
bool ApplyPatch(XexModule* module);
|
||||
bool Load(const std::string& name, const std::string& path,
|
||||
|
||||
Reference in New Issue
Block a user