mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 15:57:03 -05:00
refactor: Rework features that use external libraries into optional plugins (#1470)
This commit is contained in:
25
plugins/visualizers/source/plugin_visualizers.cpp
Normal file
25
plugins/visualizers/source/plugin_visualizers.cpp
Normal file
@@ -0,0 +1,25 @@
|
||||
#include <hex/plugin.hpp>
|
||||
|
||||
#include <hex/api/content_registry.hpp>
|
||||
#include <hex/helpers/logger.hpp>
|
||||
|
||||
#include <romfs/romfs.hpp>
|
||||
|
||||
namespace hex::plugin::visualizers {
|
||||
|
||||
void registerPatternLanguageVisualizers();
|
||||
void registerPatternLanguageInlineVisualizers();
|
||||
|
||||
}
|
||||
|
||||
using namespace hex;
|
||||
using namespace hex::plugin::visualizers;
|
||||
|
||||
IMHEX_PLUGIN_SETUP("Visualizers", "WerWolv", "Visualizers for the Pattern Language") {
|
||||
hex::log::debug("Using romfs: '{}'", romfs::name());
|
||||
for (auto &path : romfs::list("lang"))
|
||||
hex::ContentRegistry::Language::addLocalization(nlohmann::json::parse(romfs::get(path).string()));
|
||||
|
||||
registerPatternLanguageVisualizers();
|
||||
registerPatternLanguageInlineVisualizers();
|
||||
}
|
||||
Reference in New Issue
Block a user