Curation round 10: combat, pathfinding, death and game over, items and stats, room state, Continue, Lua callbacks

Seven agents took over tear and contact collision, NPC death with blood and gibs, champions, PathFinder, the Gaper's
kin, the player's death with the game over screen, item pedestals with collectible pickup, AddCollectible and
EvaluateItems, room state save and restore, GameState::read, pressure plates, fireplaces, entity lights, ambient
sounds, and one Lua callback enum with gated runners. Integration reconstructed Room::Update's loot preview and
Entity_NPC::UpdatePickupGhosts and replaced a leftover Sacred Orb stub that stopped every pedestal roll.
Under gdb: Gapers die with blood and gibs, a cleared room opens its doors, the treasure room's item is taken (banner,
costume, stats: a Magic Mushroom gives damage 3.5 -> 6.12 and a heart), death leads to the game over diary, and a saved
run is read back on the next boot with Continue offered. 3028 functions taken over.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shweetandClaude Opus 5.5 committed 2026-11-20 09:55:14 -05:00
1 parent 48933cd312
commit d8385e6c64
64 files changed
+8665 -3059

No files matched your search

+39
View File
@@ -0,0 +1,39 @@
#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();