97int main(
int argc,
char* argv[])
99 irqSet(IRQ_VBLANK,
vblank);
100 consoleDebugInit(DebugDevice_NOCASH);
103 if (!fatInitDefault())
108 "FAT initialization failed!\nPlease ensure the data folder or sdcard.img is accessible depending "
109 "on your platform.");
117 if (argc > 0 && argv[0] !=
nullptr)
119 std::string execPath(argv[0]);
120 size_t lastSlash = execPath.find_last_of(
'/');
122 if (lastSlash != std::string::npos)
124 fatBasePath = execPath.substr(0, lastSlash + 1) +
"data/";
146 TIMER0_CR = TIMER_ENABLE | TIMER_DIV_1;
151 engine.setComputeEnabled(
true);
153 engine.setPollingEnabled(
true);
156 engine.registerSystem(&BattleSystem::getInstance());
157 engine.registerSystem(&CameraSystem::getInstance());
158 engine.registerSystem(&SaveSystem::getInstance());
159 engine.registerSystem(&TextSystem::getInstance());
160 engine.registerSystem(&UISystem::getInstance());
162 engine.registerManager(&MathManager::getInstance());
163 engine.registerManager(&IOManager::getInstance());
164 engine.registerManager(&TextManager::getInstance());
165 engine.registerManager(&UIManager::getInstance());
166 engine.registerManager(&AudioManager::getInstance());
183 const ae::q20_12_t dt = MathManager::getInstance().div(ae::q20_12_t{1}, ae::q20_12_t{60});
void logMessage(LogSeverity severity, std::string_view message, std::source_location location)
Logs a diagnostic message and halts only for fatal messages.
int main(int argc, char *argv[])
void ndsComputeCallback()
std::unique_ptr< BaseView > currentView
void ndsPollInputCallback()
void switchView(BaseView *newView, const char *viewName=nullptr)