feat: Introduce Debugging and Testing Guide with enhanced startup options
- Added a new document, E5-debugging-guide.md, providing comprehensive strategies for debugging and testing the `yaze` application, including logging practices and testing frameworks. - Updated E2-development-guide.md to include a new section on debugging and testing, detailing quick debugging methods using command-line flags for specific editors and UI cards. - Enhanced the main application to support command-line flags for opening specific editors and cards on startup, improving the developer experience. - Refactored the Controller class to handle startup editor and card initialization based on command-line inputs.
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include "app/gui/icons.h"
|
||||
#include "app/gui/input.h"
|
||||
#include "imgui/imgui.h"
|
||||
#include "util/log.h"
|
||||
|
||||
namespace yaze::editor {
|
||||
|
||||
@@ -97,8 +98,6 @@ void DungeonEditorV2::Initialize(gfx::IRenderer* renderer, Rom* rom) {
|
||||
.visibility_flag = &show_palette_editor_,
|
||||
.priority = 70
|
||||
});
|
||||
|
||||
printf("[DungeonEditorV2] Registered 7 cards with EditorCardManager\n");
|
||||
}
|
||||
|
||||
void DungeonEditorV2::Initialize() {}
|
||||
@@ -214,7 +213,7 @@ absl::Status DungeonEditorV2::Save() {
|
||||
auto status = room.SaveObjects();
|
||||
if (!status.ok()) {
|
||||
// Log error but continue with other rooms
|
||||
std::printf("Failed to save room: %s\n", status.message().data());
|
||||
LOG_ERROR("DungeonEditorV2", "Failed to save room: %s", status.message().data());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user