Skip to content

Commit

Permalink
Add a button to dump only il2cpp_dump.json, skipping the sdk_ida
Browse files Browse the repository at this point in the history
…folder. (#1194)
  • Loading branch information
Synthlight authored Feb 26, 2025
1 parent bbe7765 commit 5f272b1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
16 changes: 11 additions & 5 deletions src/mods/tools/ObjectExplorer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,11 @@ void ObjectExplorer::on_draw_dev_ui() {
return;
}
if (ImGui::Button("Dump SDK")) {
std::thread t(&ObjectExplorer::generate_sdk, this);
std::thread t(&ObjectExplorer::generate_sdk, this, false);
t.detach();
}
if (ImGui::Button("Dump il2cpp json Only")) {
std::thread t(&ObjectExplorer::generate_sdk, this, true);
t.detach();
}

Expand Down Expand Up @@ -989,7 +993,7 @@ void ObjectExplorer::export_deserializer_chain(nlohmann::json& il2cpp_dump, sdk:
}
#endif

void ObjectExplorer::generate_sdk() {
void ObjectExplorer::generate_sdk(const bool justIl2CppJson) {
// enums
//auto ref = utility::scan(g_framework->get_module().as<HMODULE>(), "66 C7 40 18 01 01 48 89 05 ? ? ? ?");
//auto& l = *(std::map<uint64_t, REEnumData>*)(utility::calculate_absolute(*ref + 9));
Expand Down Expand Up @@ -2242,9 +2246,11 @@ void ObjectExplorer::generate_sdk() {

spdlog::info("Generating IDA SDK...");
m_sdk_dump_stage = SdkDumpStage::GENERATE_SDK;

genny::ida::transform(sdk);
sdk.generate("sdk_ida");

if (!justIl2CppJson) {
genny::ida::transform(sdk);
sdk.generate("sdk_ida");
}

// Free a couple gigabytes of no longer used memory
g_stypedb.clear();
Expand Down
2 changes: 1 addition & 1 deletion src/mods/tools/ObjectExplorer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class ObjectExplorer : public Tool {
std::string generate_full_name(sdk::RETypeDB* tdb, uint32_t i);
void export_deserializer_chain(nlohmann::json& il2cpp_dump, sdk::RETypeDB* tdb, REType* t, std::optional<std::string> real_name = std::nullopt);
#endif
void generate_sdk();
void generate_sdk(bool justIl2CppJson);
void report_sdk_dump_progress(float progress);

void handle_game_object(REGameObject* game_object);
Expand Down

0 comments on commit 5f272b1

Please sign in to comment.