| 178 | } |
| 179 | |
| 180 | int main(const int argc, char **argv) { |
| 181 | Abyss::Common::Log::info("Starting up..."); |
| 182 | |
| 183 | try { |
| 184 | auto &engine = Abyss::AbyssEngine::getInstance(); |
| 185 | |
| 186 | if (!engine.processCommandLineArguments(argc, argv)) |
| 187 | return 0; |
| 188 | |
| 189 | engine.setWindowTitle("OpenDiablo II"); |
| 190 | |
| 191 | engine.initializeFiles(); |
| 192 | loadPalettes(); |
| 193 | loadFonts(); |
| 194 | loadDataTables(); |
| 195 | loadButtonDefs(); |
| 196 | |
| 197 | engine.addCursorImage("Default", OD2::Common::ResourcePaths::MousePointers::CursorDefault, |
| 198 | OD2::Common::PaletteManager::getInstance().getPalette("Static")); |
| 199 | engine.setCursorImage("Default"); |
| 200 | engine.getMouseState().setVisible(true); |
| 201 | engine.setScene(std::make_unique<OD2::Scenes::MainMenu::MainMenu>()); |
| 202 | |
| 203 | Abyss::Common::Log::info("Startup complete"); |
| 204 | //engine.setMasterVolumeLevel(0.0f); |
| 205 | |
| 206 | engine.run(); |
| 207 | } catch (const std::exception &exception) { |
| 208 | Abyss::Common::Log::error("{}", exception.what()); |
| 209 | // SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Abyss Engine", exception.what(), nullptr); |
| 210 | return 1; |
| 211 | } catch (...) { |
| 212 | Abyss::Common::Log::error("Unknown exception"); |
| 213 | // SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Abyss Engine", "Unknown exception", nullptr); |
| 214 | return 2; |
| 215 | } |
| 216 | |
| 217 | return 0; |
| 218 | } |
nothing calls this directly
no test coverage detected