| 78 | |
| 79 | |
| 80 | void ModuleWindow::OnGameLoaded() |
| 81 | { |
| 82 | Freeze(); |
| 83 | |
| 84 | m_modules->DeleteAllItems(); |
| 85 | |
| 86 | const auto module_count = RPLLoader_GetModuleCount(); |
| 87 | const auto module_list = RPLLoader_GetModuleList(); |
| 88 | for (int i = 0; i < module_count; i++) |
| 89 | { |
| 90 | const auto module = module_list[i]; |
| 91 | if (module) |
| 92 | { |
| 93 | wxListItem item; |
| 94 | item.SetId(i); |
| 95 | item.SetText(module->moduleName2.c_str()); |
| 96 | |
| 97 | const auto index = m_modules->InsertItem(item); |
| 98 | m_modules->SetItem(index, ColumnAddress, wxString::Format("%08x", module->regionMappingBase_text.GetMPTR())); |
| 99 | m_modules->SetItem(index, ColumnSize, wxString::Format("%x", module->regionSize_text)); |
| 100 | } |
| 101 | } |
| 102 | |
| 103 | sint32 patch_count = 0; |
| 104 | for (auto& gfx_pack : GraphicPack2::GetGraphicPacks()) |
| 105 | { |
| 106 | for (auto& patch_group : gfx_pack->GetPatchGroups()) |
| 107 | { |
| 108 | if (patch_group->isApplied()) |
| 109 | { |
| 110 | wxListItem item; |
| 111 | item.SetId(module_count + patch_count); |
| 112 | item.SetText(std::string(patch_group->getName())); |
| 113 | |
| 114 | const auto index = m_modules->InsertItem(item); |
| 115 | m_modules->SetItem(index, ColumnAddress, wxString::Format("%08x", patch_group->getCodeCaveBase())); |
| 116 | m_modules->SetItem(index, ColumnSize, wxString::Format("%x", patch_group->getCodeCaveSize())); |
| 117 | patch_count++; |
| 118 | } |
| 119 | } |
| 120 | } |
| 121 | |
| 122 | Thaw(); |
| 123 | } |
| 124 | |
| 125 | |
| 126 | void ModuleWindow::OnLeftDClick(wxMouseEvent& event) |
nothing calls this directly
no test coverage detected