* Updates the timer display and resets the palette * since it's bound to change on other screens. */
| 502 | * since it's bound to change on other screens. |
| 503 | */ |
| 504 | void GeoscapeState::init() |
| 505 | { |
| 506 | State::init(); |
| 507 | timeDisplay(); |
| 508 | |
| 509 | _globe->onMouseClick((ActionHandler)&GeoscapeState::globeClick); |
| 510 | _globe->onMouseOver(0); |
| 511 | _globe->rotateStop(); |
| 512 | _globe->setFocus(true); |
| 513 | _globe->draw(); |
| 514 | |
| 515 | // Pop up save screen if it's a new ironman game |
| 516 | if (_game->getSavedGame()->isIronman() && _game->getSavedGame()->getName().empty()) |
| 517 | { |
| 518 | popup(new ListSaveState(_game, OPT_GEOSCAPE)); |
| 519 | } |
| 520 | |
| 521 | // Set music if it's not already playing |
| 522 | if (_dogfights.empty() && !_dogfightStartTimer->isRunning()) |
| 523 | { |
| 524 | if (_game->getSavedGame()->getMonthsPassed() == -1) |
| 525 | { |
| 526 | _game->getResourcePack()->playMusic("GMGEO1"); |
| 527 | } |
| 528 | else |
| 529 | { |
| 530 | _game->getResourcePack()->playMusic("GMGEO", true); |
| 531 | } |
| 532 | } |
| 533 | _globe->unsetNewBaseHover(); |
| 534 | } |
| 535 | |
| 536 | /** |
| 537 | * Runs the game timer and handles popups. |
nothing calls this directly
no test coverage detected