mirror of
https://github.com/open-goal/jak-project
synced 2026-09-09 04:10:23 -04:00
Get started on collide-func and clean up log forms in decompiler (#713)
* wip * temp * temp2 * first part of log macros * more log macros * logtest * clean up * dont initialize game info because we are missing stuff
This commit is contained in:
@@ -106,6 +106,7 @@ u32 scan_for_symbol_table(const Ram& ram, u32 start_addr, u32 end_addr) {
|
||||
|
||||
struct SymbolMap {
|
||||
std::unordered_map<std::string, u32> name_to_addr;
|
||||
std::unordered_map<std::string, u32> name_to_value;
|
||||
std::unordered_map<u32, std::string> addr_to_name;
|
||||
};
|
||||
|
||||
@@ -133,6 +134,7 @@ SymbolMap build_symbol_map(const Ram& ram, u32 s7) {
|
||||
assert(map.name_to_addr.find(name) == map.name_to_addr.end());
|
||||
map.name_to_addr[name] = sym;
|
||||
map.addr_to_name[sym] = name;
|
||||
map.name_to_value[name] = ram.word(sym);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -357,7 +359,7 @@ void inspect_symbols(const Ram& ram,
|
||||
}
|
||||
}
|
||||
if (!found_type.empty()) {
|
||||
fmt::print(" {:30s} : {}\n", name, found_type);
|
||||
fmt::print(" [{:08x}] {:30s} : {}\n", symbols.name_to_value.at(name), name, found_type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user