#include <set>#include "absl/debugging/symbolize.h"#include "absl/strings/ascii.h"#include "absl/strings/str_split.h"#include "absl/strings/strip.h"#include "app/application.h"#include "app/startup_flags.h"#include "app/controller.h"#include "cli/service/api/http_server.h"#include "core/features.h"#include "util/crash_handler.h"#include "util/flag.h"#include "util/log.h"#include "util/platform_paths.h"#include "yaze.h"Go to the source code of this file.
Namespaces | |
| namespace | yaze |
| namespace | yaze::emu |
| SNES Emulation and debugging tools. | |
| namespace | yaze::editor |
| Editors are the view controllers for the application. | |
| namespace | yaze::app |
| namespace | anonymous_namespace{main.cc} |
Macros | |
| #define | IMGUI_DEFINE_MATH_OPERATORS |
Functions | |
| DEFINE_FLAG (std::string, log_file, "", "Output log file path for debugging.") | |
| DEFINE_FLAG (std::string, rom_file, "", "ROM file to load on startup.") | |
| DEFINE_FLAG (bool, debug, false, "Enable debug logging and verbose output.") | |
| DEFINE_FLAG (std::string, log_level, "info", "Minimum log level: debug, info, warn, error, or fatal.") | |
| DEFINE_FLAG (bool, log_to_console, false, "Mirror logs to stderr even when writing to a file.") | |
| DEFINE_FLAG (std::string, log_categories, "", "Comma-separated list of log categories to enable or disable. " "Prefix with '-' to disable a category. " "Example: \"Room,DungeonEditor\" (allowlist) or \"-Input,-Graphics\" " "(blocklist).") | |
| DEFINE_FLAG (std::string, editor, "", "The editor to open on startup (e.g., Dungeon, Overworld, Assembly).") | |
| DEFINE_FLAG (std::string, open_panels, "", "Comma-separated list of panel IDs to open (e.g. 'dungeon.room_list,emulator.cpu_debugger')") | |
| DEFINE_FLAG (std::string, startup_welcome, "auto", "Welcome screen behavior at startup: auto, show, or hide.") | |
| DEFINE_FLAG (std::string, startup_dashboard, "auto", "Dashboard panel behavior at startup: auto, show, or hide.") | |
| DEFINE_FLAG (std::string, startup_sidebar, "auto", "Panel sidebar visibility at startup: auto, show, or hide.") | |
| DEFINE_FLAG (int, room, -1, "Open Dungeon Editor at specific room ID (0-295).") | |
| DEFINE_FLAG (int, map, -1, "Open Overworld Editor at specific map ID (0-159).") | |
| DEFINE_FLAG (bool, enable_api, false, "Enable the AI Agent API server.") | |
| DEFINE_FLAG (int, api_port, 8080, "Port for the AI Agent API server.") | |
| yaze::emu::Emulator * | yaze::app::GetGlobalEmulator () |
| yaze::editor::EditorManager * | yaze::app::GetGlobalEditorManager () |
| yaze::util::LogLevel | anonymous_namespace{main.cc}::ParseLogLevelFlag (const std::string &raw_level, bool debug_flag) |
| std::set< std::string > | anonymous_namespace{main.cc}::ParseLogCategories (const std::string &raw) |
| const char * | anonymous_namespace{main.cc}::LogLevelToString (yaze::util::LogLevel level) |
| std::vector< std::string > | anonymous_namespace{main.cc}::ParseCommaList (const std::string &raw) |
| void | TickFrame () |
| int | main (int argc, char **argv) |
| DEFINE_FLAG | ( | std::string | , |
| log_file | , | ||
| "" | , | ||
| "Output log file path for debugging." | ) |
| DEFINE_FLAG | ( | std::string | , |
| rom_file | , | ||
| "" | , | ||
| "ROM file to load on startup." | ) |
| DEFINE_FLAG | ( | bool | , |
| debug | , | ||
| false | , | ||
| "Enable debug logging and verbose output." | ) |
| DEFINE_FLAG | ( | std::string | , |
| log_level | , | ||
| "info" | , | ||
| "Minimum log level: | debug, | ||
| info | , | ||
| warn | , | ||
| error | , | ||
| or fatal." | ) |
| DEFINE_FLAG | ( | bool | , |
| log_to_console | , | ||
| false | , | ||
| "Mirror logs to stderr even when writing to a file." | ) |
| DEFINE_FLAG | ( | std::string | , |
| log_categories | , | ||
| "" | , | ||
| "Comma-separated list of log categories to enable or disable. " "Prefix with '-' to disable a category. " "Example: \" | Room, | ||
| DungeonEditor\" (allowlist) or \"- | Input, | ||
| -Graphics\" " "(blocklist)." | ) |
| DEFINE_FLAG | ( | std::string | , |
| editor | , | ||
| "" | , | ||
| "The editor to open on startup (e.g., Dungeon, Overworld, Assembly)." | ) |
| DEFINE_FLAG | ( | std::string | , |
| open_panels | , | ||
| "" | , | ||
| "Comma-separated list of panel IDs to open (e.g. 'dungeon.room_list,emulator.cpu_debugger')" | ) |
| DEFINE_FLAG | ( | std::string | , |
| startup_welcome | , | ||
| "auto" | , | ||
| "Welcome screen behavior at startup: | auto, | ||
| show | , | ||
| or hide." | ) |
| DEFINE_FLAG | ( | std::string | , |
| startup_dashboard | , | ||
| "auto" | , | ||
| "Dashboard panel behavior at startup: | auto, | ||
| show | , | ||
| or hide." | ) |
| DEFINE_FLAG | ( | std::string | , |
| startup_sidebar | , | ||
| "auto" | , | ||
| "Panel sidebar visibility at startup: | auto, | ||
| show | , | ||
| or hide." | ) |
| DEFINE_FLAG | ( | int | , |
| room | , | ||
| - | 1, | ||
| "Open Dungeon Editor at specific room ID (0-295)." | ) |
| DEFINE_FLAG | ( | int | , |
| map | , | ||
| - | 1, | ||
| "Open Overworld Editor at specific map ID (0-159)." | ) |
| DEFINE_FLAG | ( | bool | , |
| enable_api | , | ||
| false | , | ||
| "Enable the AI Agent API server." | ) |
| DEFINE_FLAG | ( | int | , |
| api_port | , | ||
| 8080 | , | ||
| "Port for the AI Agent API server." | ) |
| void TickFrame | ( | ) |
Definition at line 172 of file main.cc.
References yaze::Application::Instance(), and yaze::Application::Tick().
Referenced by main().

| int main | ( | int | argc, |
| char ** | argv ) |
Definition at line 176 of file main.cc.
References yaze::util::CrashHandler::CleanupOldLogs(), yaze::util::LogManager::configure(), yaze::core::FeatureFlags::get(), yaze::util::PlatformPaths::GetUserDocumentsSubdirectory(), yaze::util::global_flag_registry(), yaze::Application::Initialize(), yaze::util::CrashHandler::Initialize(), yaze::Application::Instance(), yaze::util::LogManager::instance(), yaze::core::FeatureFlags::Flags::kLogToConsole, LOG_ERROR, LOG_INFO, anonymous_namespace{main.cc}::LogLevelToString(), yaze::util::FlagParser::Parse(), anonymous_namespace{main.cc}::ParseCommaList(), anonymous_namespace{main.cc}::ParseLogCategories(), anonymous_namespace{main.cc}::ParseLogLevelFlag(), RETURN_IF_EXCEPTION, yaze::AppConfig::rom_file, yaze::Application::Shutdown(), yaze::StartupVisibilityFromString(), TickFrame(), yaze::util::YAZE_DEBUG, and YAZE_VERSION_STRING.