#include #include #include #include #include #include "content/views/view_disassembler.hpp" using namespace hex; using namespace hex::plugin::disasm; namespace hex::plugin::disasm { void drawDisassemblyVisualizer(pl::ptrn::Pattern &, pl::ptrn::IIterable &, bool, std::span arguments); } namespace { void registerViews() { ContentRegistry::Views::add(); } void registerPlVisualizers() { using ParamCount = pl::api::FunctionParameterCount; ContentRegistry::PatternLanguage::addVisualizer("disassembler", drawDisassemblyVisualizer, ParamCount::exactly(4)); } } IMHEX_PLUGIN_SETUP("Disassembler", "WerWolv", "Disassembler support") { hex::log::debug("Using romfs: '{}'", romfs::name()); for (auto &path : romfs::list("lang")) hex::ContentRegistry::Language::addLocalization(nlohmann::json::parse(romfs::get(path).string())); registerViews(); registerPlVisualizers(); }