| 210 | } |
| 211 | |
| 212 | std::vector<std::vector<uint8_t>> Scene_Logo::LoadLogos() { |
| 213 | if (Player::player_config.show_startup_logos.Get() == ConfigEnum::StartupLogos::None) { |
| 214 | return {}; |
| 215 | } |
| 216 | |
| 217 | std::vector<std::vector<uint8_t>> logos; |
| 218 | |
| 219 | for (int i = 1; i < 100; ++i) { |
| 220 | auto is = FileFinder::OpenImage("Logo", "LOGO" + std::to_string(i)); |
| 221 | if (is) { |
| 222 | logos.push_back(Utils::ReadStream(is)); |
| 223 | } else { |
| 224 | break; |
| 225 | } |
| 226 | } |
| 227 | |
| 228 | #ifndef EMSCRIPTEN |
| 229 | if (logos.empty()) { |
| 230 | // Attempt reading Logos from RPG_RT.exe (not supported on Emscripten) |
| 231 | auto exeis = FileFinder::Game().OpenFile(EXE_NAME); |
| 232 | |
| 233 | if (exeis) { |
| 234 | std::unique_ptr<EXEReader> exe_reader = std::make_unique<EXEReader>(std::move(exeis)); |
| 235 | logos = exe_reader->GetLogos(); |
| 236 | } |
| 237 | } |
| 238 | #endif |
| 239 | |
| 240 | return logos; |
| 241 | } |
| 242 | |
| 243 | void Scene_Logo::OnIndexReady(FileRequestResult*) { |
| 244 | async_ready = true; |