0x0044400C
| 375 | |
| 376 | // 0x0044400C |
| 377 | bool loadAndStart(const fs::path& path) |
| 378 | { |
| 379 | // Set new rng seed based on current rng and current time |
| 380 | // TODO do we really need to use the current rng? seems unnecessary, keeping with vanilla logic for now |
| 381 | auto& gameState = getGameState(); |
| 382 | auto oldRng = gameState.rng; |
| 383 | |
| 384 | if (!load(path)) |
| 385 | { |
| 386 | return false; |
| 387 | } |
| 388 | |
| 389 | gameState.rng = Core::Prng(Platform::getTime() ^ oldRng.srand_0(), oldRng.srand_1()); |
| 390 | std::strncpy(gameState.scenarioFileName, path.u8string().c_str(), std::size(gameState.scenarioFileName) - 1); |
| 391 | start(); |
| 392 | } |
| 393 | |
| 394 | // this will prepare _commonFormatArgs array before drawing the StringIds::challenge_value |
| 395 | // after that for example it will draw this string: Achieve a performance index of 10.0% ("Engineer") |