Enhance CLI command structure and add new functionalities
- Refactored existing CLI commands to follow a more structured naming convention, improving clarity and usability. - Introduced new commands for dungeon and graphics handling, including `dungeon export`, `gfx export-sheet`, and `gfx import-sheet`, with placeholder implementations. - Added palette export and import commands, enhancing the CLI's capabilities for managing graphical assets. - Updated usage examples and help text to reflect the new command structure and improve user guidance. - Incremented version number in TUI components to reflect the latest changes.
This commit is contained in:
21
src/cli/handlers/dungeon.cc
Normal file
21
src/cli/handlers/dungeon.cc
Normal file
@@ -0,0 +1,21 @@
|
||||
#include "cli/z3ed.h"
|
||||
#include "app/zelda3/dungeon/dungeon_editor_system.h"
|
||||
|
||||
namespace yaze {
|
||||
namespace cli {
|
||||
|
||||
absl::Status DungeonExport::Run(const std::vector<std::string>& arg_vec) {
|
||||
if (arg_vec.size() < 1) {
|
||||
return absl::InvalidArgumentError("Usage: dungeon export <room_id>");
|
||||
}
|
||||
|
||||
int room_id = std::stoi(arg_vec[0]);
|
||||
|
||||
// TODO: Implement dungeon export logic
|
||||
std::cout << "Dungeon export for room " << room_id << " not yet implemented." << std::endl;
|
||||
|
||||
return absl::OkStatus();
|
||||
}
|
||||
|
||||
} // namespace cli
|
||||
} // namespace yaze
|
||||
29
src/cli/handlers/gfx.cc
Normal file
29
src/cli/handlers/gfx.cc
Normal file
@@ -0,0 +1,29 @@
|
||||
#include "cli/z3ed.h"
|
||||
|
||||
namespace yaze {
|
||||
namespace cli {
|
||||
|
||||
absl::Status GfxExport::Run(const std::vector<std::string>& arg_vec) {
|
||||
if (arg_vec.size() < 2) {
|
||||
return absl::InvalidArgumentError("Usage: gfx export-sheet <sheet_id> --to <file>");
|
||||
}
|
||||
|
||||
// TODO: Implement gfx export logic
|
||||
std::cout << "Gfx export not yet implemented." << std::endl;
|
||||
|
||||
return absl::OkStatus();
|
||||
}
|
||||
|
||||
absl::Status GfxImport::Run(const std::vector<std::string>& arg_vec) {
|
||||
if (arg_vec.size() < 2) {
|
||||
return absl::InvalidArgumentError("Usage: gfx import-sheet <sheet_id> --from <file>");
|
||||
}
|
||||
|
||||
// TODO: Implement gfx import logic
|
||||
std::cout << "Gfx import not yet implemented." << std::endl;
|
||||
|
||||
return absl::OkStatus();
|
||||
}
|
||||
|
||||
} // namespace cli
|
||||
} // namespace yaze
|
||||
29
src/cli/handlers/palette.cc
Normal file
29
src/cli/handlers/palette.cc
Normal file
@@ -0,0 +1,29 @@
|
||||
#include "cli/z3ed.h"
|
||||
|
||||
namespace yaze {
|
||||
namespace cli {
|
||||
|
||||
absl::Status PaletteExport::Run(const std::vector<std::string>& arg_vec) {
|
||||
if (arg_vec.size() < 2) {
|
||||
return absl::InvalidArgumentError("Usage: palette export --group <group> --id <id> --format <format>");
|
||||
}
|
||||
|
||||
// TODO: Implement palette export logic
|
||||
std::cout << "Palette export not yet implemented." << std::endl;
|
||||
|
||||
return absl::OkStatus();
|
||||
}
|
||||
|
||||
absl::Status PaletteImport::Run(const std::vector<std::string>& arg_vec) {
|
||||
if (arg_vec.size() < 2) {
|
||||
return absl::InvalidArgumentError("Usage: palette import --group <group> --id <id> --from <file>");
|
||||
}
|
||||
|
||||
// TODO: Implement palette import logic
|
||||
std::cout << "Palette import not yet implemented." << std::endl;
|
||||
|
||||
return absl::OkStatus();
|
||||
}
|
||||
|
||||
} // namespace cli
|
||||
} // namespace yaze
|
||||
Reference in New Issue
Block a user