#pragma once #include "anm2.h" #include "classes.h" // Whether the game over screen is up. Show is the only writer of a shown state. enum GameOverState : int { GAME_OVER_HIDDEN, GAME_OVER_SHOWN = 2 }; // How a run ends (Game::End's ending id). The others are the endings' cutscenes. enum GameEnding : int { ENDING_DEATH = 1, ENDING_LAST = 14 }; // Copies and destruction are the defaults. // Online only, left out: the lobby's item strip (008ebfb0) and the vote the screen starts online. // The game over screen (Rebirth's DeathScreen): the diary page of the run lost, with the player's portrait and name, // the floor, what killed it, the items it took and the run's seed. // moddedEnemy is the modded entity whose death portrait the mod draws, kept from the last death that had one. struct GameOver { ANM2 sprite; EntityConfig_Entity* moddedEnemy = nullptr; GameOverState state = GAME_OVER_HIDDEN; bool isStopSoundsPending = false; void Show(); void Update(); void Render(); }; void game_end(GameEnding ending); void game_save_delete(); void persistent_game_data_set_writable();