aboutsummaryrefslogtreecommitdiff
path: root/tools/ghidra/FindAiScriptLoaderReferences.java
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-09-06 04:22:12 +0300
committerValentin Popov <valentin@popov.link>2026-09-06 04:22:12 +0300
commitaa51f3574d3d4d4e0fa59653eedd718fceb5d1bd (patch)
tree9a43f6a3f3c86767e4e2b7316051562d96789f06 /tools/ghidra/FindAiScriptLoaderReferences.java
parentda03e77f53bb33b2fe203ac45578289953a1b524 (diff)
downloadfparkan-aa51f3574d3d4d4e0fa59653eedd718fceb5d1bd.tar.xz
fparkan-aa51f3574d3d4d4e0fa59653eedd718fceb5d1bd.zip
chore: simplify project to engine docs and tests
Remove planning and acceptance scaffolding while retaining the native Vulkan mission preview, format readers, runtime algorithms, and ordinary Rust tests. Keep the book aligned with the runnable project and validate checked-in shaders without generated tool metadata.
Diffstat (limited to 'tools/ghidra/FindAiScriptLoaderReferences.java')
-rw-r--r--tools/ghidra/FindAiScriptLoaderReferences.java29
1 files changed, 0 insertions, 29 deletions
diff --git a/tools/ghidra/FindAiScriptLoaderReferences.java b/tools/ghidra/FindAiScriptLoaderReferences.java
deleted file mode 100644
index 5aae152..0000000
--- a/tools/ghidra/FindAiScriptLoaderReferences.java
+++ /dev/null
@@ -1,29 +0,0 @@
-// Locates callers that reference the stable AI script-loader literals.
-// Run through Ghidra headless analysis; the original PE is read only.
-import ghidra.app.script.GhidraScript;
-import ghidra.program.model.address.Address;
-import ghidra.program.model.listing.Function;
-import ghidra.program.model.mem.Memory;
-import ghidra.program.model.symbol.Reference;
-import ghidra.program.model.symbol.ReferenceManager;
-
-public class FindAiScriptLoaderReferences extends GhidraScript {
- private static final String[] NEEDLES = {".scr", "MISSIONS\\SCRIPTS\\"};
-
- @Override
- public void run() throws Exception {
- Memory memory = currentProgram.getMemory();
- ReferenceManager references = currentProgram.getReferenceManager();
- for (String needle : NEEDLES) {
- byte[] bytes = (needle + "\0").getBytes("US-ASCII");
- Address address = memory.findBytes(memory.getMinAddress(), memory.getMaxAddress(), bytes, null, true, monitor);
- println("===== " + needle + " =====");
- if (address == null) { println("missing"); continue; }
- println("literal=" + address);
- for (Reference reference : references.getReferencesTo(address)) {
- Function caller = currentProgram.getFunctionManager().getFunctionContaining(reference.getFromAddress());
- println("reference=" + reference.getFromAddress() + " caller=" + (caller == null ? "missing" : caller.getEntryPoint()));
- }
- }
- }
-}