diff options
| author | KiritoDv <kiritodev01@gmail.com> | 2024-02-18 16:23:12 -0600 |
|---|---|---|
| committer | KiritoDv <kiritodev01@gmail.com> | 2024-02-18 16:23:12 -0600 |
| commit | 510ffd4710b805a0240594a71f44520dc43206fc (patch) | |
| tree | e45712c0e55bfa82d23088709cdc2790c2cbb286 /src/factories/DisplayListOverrides.cpp | |
| parent | 752c6a2ac06106996c4182e651eaa695a9f211b8 (diff) | |
Removed unnecesary TranslateAddrs
Diffstat (limited to 'src/factories/DisplayListOverrides.cpp')
| -rw-r--r-- | src/factories/DisplayListOverrides.cpp | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/src/factories/DisplayListOverrides.cpp b/src/factories/DisplayListOverrides.cpp index 3af2f69..52a832d 100644 --- a/src/factories/DisplayListOverrides.cpp +++ b/src/factories/DisplayListOverrides.cpp @@ -46,8 +46,7 @@ void Quadrangle(const Gfx* gfx) { gfxd_puts(")"); } -int Vtx(uint32_t vtx, int32_t num) { - auto ptr = Decompressor::TranslateAddr(vtx); +int Vtx(uint32_t ptr, int32_t num) { auto dec = Companion::Instance->GetNodeByAddr(ptr); if(dec.has_value()){ @@ -62,38 +61,37 @@ int Vtx(uint32_t vtx, int32_t num) { return 0; } -int Texture(uint32_t timg, int32_t fmt, int32_t siz, int32_t width, int32_t height, int32_t pal) { - auto dec = Companion::Instance->GetNodeByAddr(timg); +int Texture(uint32_t ptr, int32_t fmt, int32_t siz, int32_t width, int32_t height, int32_t pal) { + auto dec = Companion::Instance->GetNodeByAddr(ptr); if(dec.has_value()){ auto node = std::get<1>(dec.value()); auto symbol = GetSafeNode<std::string>(node, "symbol"); - SPDLOG_INFO("Found Texture: 0x{:X} Symbol: {}", timg, symbol); + SPDLOG_INFO("Found Texture: 0x{:X} Symbol: {}", ptr, symbol); gfxd_puts(symbol.c_str()); return 1; } - SPDLOG_WARN("Could not find texture at 0x{:X}", timg); + SPDLOG_WARN("Could not find texture at 0x{:X}", ptr); return 0; } -int Palette(uint32_t tlut, int32_t idx, int32_t count) { - auto dec = Companion::Instance->GetNodeByAddr(tlut); +int Palette(uint32_t ptr, int32_t idx, int32_t count) { + auto dec = Companion::Instance->GetNodeByAddr(ptr); if(dec.has_value()){ auto node = std::get<1>(dec.value()); auto symbol = GetSafeNode<std::string>(node, "symbol"); - SPDLOG_INFO("Found TLUT: 0x{:X} Symbol: {}", tlut, symbol); + SPDLOG_INFO("Found TLUT: 0x{:X} Symbol: {}", ptr, symbol); gfxd_puts(symbol.c_str()); return 1; } - SPDLOG_WARN("Could not find tlut at 0x{:X}", tlut); + SPDLOG_WARN("Could not find tlut at 0x{:X}", ptr); return 0; } -int Light(uint32_t lightsn, int32_t count) { - auto ptr = Decompressor::TranslateAddr(lightsn); +int Light(uint32_t ptr, int32_t count) { auto dec = Companion::Instance->GetNodeByAddr(ptr); if(dec.has_value()){ @@ -108,8 +106,7 @@ int Light(uint32_t lightsn, int32_t count) { return 0; } -int DisplayList(uint32_t dl) { - auto ptr = Decompressor::TranslateAddr(dl); +int DisplayList(uint32_t ptr) { auto dec = Companion::Instance->GetNodeByAddr(ptr); if(dec.has_value()){ |
