#include "cli/handlers/command_handlers.h" #include "cli/handlers/tools/resource_commands.h" #include "cli/handlers/tools/gui_commands.h" #include "cli/handlers/tools/emulator_commands.h" #include "cli/handlers/game/dungeon_commands.h" #include "cli/handlers/game/overworld_commands.h" #include "cli/handlers/game/message_commands.h" #include "cli/handlers/game/dialogue_commands.h" #include "cli/handlers/game/music_commands.h" #include "cli/handlers/graphics/hex_commands.h" #include "cli/handlers/graphics/palette_commands.h" #include "cli/handlers/graphics/sprite_commands.h" #include #include namespace yaze { namespace cli { namespace handlers { // Static command registry namespace { std::unordered_map g_command_registry; } std::vector> CreateCliCommandHandlers() { std::vector> handlers; // Graphics commands handlers.push_back(std::make_unique()); handlers.push_back(std::make_unique()); handlers.push_back(std::make_unique()); // Palette commands handlers.push_back(std::make_unique()); handlers.push_back(std::make_unique()); handlers.push_back(std::make_unique()); // Sprite commands handlers.push_back(std::make_unique()); handlers.push_back(std::make_unique()); handlers.push_back(std::make_unique()); // Music commands handlers.push_back(std::make_unique()); handlers.push_back(std::make_unique()); handlers.push_back(std::make_unique()); // Dialogue commands handlers.push_back(std::make_unique()); handlers.push_back(std::make_unique()); handlers.push_back(std::make_unique()); // Message commands handlers.push_back(std::make_unique()); handlers.push_back(std::make_unique()); handlers.push_back(std::make_unique()); return handlers; } #include "cli/handlers/agent/simple_chat_command.h" std::vector> CreateAgentCommandHandlers() { std::vector> handlers; // Add simple-chat command handler handlers.push_back(std::make_unique()); // Resource inspection tools handlers.push_back(std::make_unique()); handlers.push_back(std::make_unique()); // Dungeon inspection handlers.push_back(std::make_unique()); handlers.push_back(std::make_unique()); handlers.push_back(std::make_unique()); handlers.push_back(std::make_unique()); handlers.push_back(std::make_unique()); handlers.push_back(std::make_unique()); // Overworld inspection handlers.push_back(std::make_unique()); handlers.push_back(std::make_unique()); handlers.push_back(std::make_unique()); handlers.push_back(std::make_unique()); handlers.push_back(std::make_unique()); handlers.push_back(std::make_unique()); // GUI automation tools handlers.push_back(std::make_unique()); handlers.push_back(std::make_unique()); handlers.push_back(std::make_unique()); handlers.push_back(std::make_unique()); // Emulator & debugger commands handlers.push_back(std::make_unique()); handlers.push_back(std::make_unique()); handlers.push_back(std::make_unique()); handlers.push_back(std::make_unique()); handlers.push_back(std::make_unique()); handlers.push_back(std::make_unique()); handlers.push_back(std::make_unique()); handlers.push_back(std::make_unique()); handlers.push_back(std::make_unique()); handlers.push_back(std::make_unique()); handlers.push_back(std::make_unique()); handlers.push_back(std::make_unique()); return handlers; } std::vector> CreateAllCommandHandlers() { std::vector> handlers; // Add CLI handlers auto cli_handlers = CreateCliCommandHandlers(); for (auto& handler : cli_handlers) { handlers.push_back(std::move(handler)); } // Add agent handlers auto agent_handlers = CreateAgentCommandHandlers(); for (auto& handler : agent_handlers) { handlers.push_back(std::move(handler)); } return handlers; } resources::CommandHandler* GetCommandHandler(const std::string& name) { auto it = g_command_registry.find(name); if (it != g_command_registry.end()) { return it->second; } return nullptr; } } // namespace handlers } // namespace cli } // namespace yaze