Curation round 9: floors and walls, room transitions, collision, the first enemies, saving, damage, pickups
Seven agents took over the backdrop's floor and wall rendering, room transitions (StartRoomTransition, on_leave, room_enter), grid collision with tear hits and decal baking, Entity_NPC's core with the AI dispatch and the first enemies (flies, Gaper, Pooter, Clotty, Horf, Dip, Spider), the run's save, player damage, PlayerManager::Update, ShowName, pickups, slots and the common effects. Integration added LuaEngine::PostNewLevel/PostNewRoom, one shared lua_callback_check (4 copies merged) and the enemy type range the original checks. Under gdb a run draws its rooms with floors and walls, walks between rooms, fights Gapers with contact damage and the damage flash, and collects pickups. Next: tears hitting enemies, pathfinding, item pedestals, death. 2891 functions taken over. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
69a354f843
commit
48933cd312
59 files changed
+13387
-6056
No files matched your search
+4
-69
@@ -407,9 +407,9 @@ void Game::ResetState()
|
||||
|
||||
for (BackwardsStageDesc& backwards : backwardsStages)
|
||||
{
|
||||
backwards._isXL = false;
|
||||
backwards._bossRoomsCount = 0;
|
||||
backwards._treasureRoomsCount = 0;
|
||||
backwards.isXL = false;
|
||||
backwards.bossRooms.clear();
|
||||
backwards.treasureRooms.clear();
|
||||
}
|
||||
|
||||
deathCertificateExitTimer = 0;
|
||||
@@ -425,7 +425,7 @@ void Game::ResetState()
|
||||
isRestoringGlowingHourglassState = false;
|
||||
currentGlowingHourglassSlot = -1;
|
||||
rewindsThisFloor = 0;
|
||||
for (GlowingHourglassState& state : glowingHourglassStates) state._isUsable = false;
|
||||
for (GlowingHourglassState& state : glowingHourglassStates) state.isUsable = false;
|
||||
isPocketItemRewindSaved = false;
|
||||
reviveMachineUses = 0;
|
||||
reviveMachineCoinsLeft = REVIVE_MACHINE_COINS;
|
||||
@@ -537,66 +537,6 @@ void Game::Fadein(float speed, FadeIcon icon, KColor color)
|
||||
for (Entity_Player* player : playerManager.playerList) player->isControlsEnabled = false;
|
||||
}
|
||||
|
||||
// 006f9000 Copies the run into a game state to save: its rules and seeds, the counters and histories of the run, the
|
||||
// item and boss pools, the TMTRAINER seeds, the floor (after leaving the room), the players, the Ascent's saved
|
||||
// stages, the nightmare stage bar, the ambush wave, the score and the versus rules.
|
||||
// The saved flags are the first 53 of the run's state flags.
|
||||
void Game::store_game_state(GameState& state)
|
||||
{
|
||||
state.Clear();
|
||||
state.seeds = seedEffects;
|
||||
state.playerManagerSeed = playerManager.rng._seed;
|
||||
state.fortuneSeed = fortuneRNG._seed;
|
||||
state.challenge = (int)challenge;
|
||||
state.isRerun = isRerun;
|
||||
state.isConsoleUsedThisRun = isConsoleUsedThisRun;
|
||||
state.difficulty = difficulty;
|
||||
state.gameStateFlags = std::bitset<SAVED_GAME_STATE_FLAG_COUNT>(gameStateFlags);
|
||||
|
||||
state.lastDevilRoomStage = lastDevilRoomStage;
|
||||
state.treasureRoomsVisited = treasureRoomsVisited;
|
||||
state.planetariumsVisited = planetariumsVisited;
|
||||
state.stagesWithoutHeartsPicked = stagesWithoutHeartsPicked;
|
||||
state.stagesWithoutDamage = stagesWithoutDamage;
|
||||
state.devilRoomDeals = devilRoomDeals;
|
||||
state.shopVisits = shopVisits;
|
||||
state.donationModGreed = donationModGreed;
|
||||
state.donationModAngel = donationModAngel;
|
||||
state.reviveMachineCoinsLeft = reviveMachineCoinsLeft;
|
||||
state.reviveMachineUses = reviveMachineUses;
|
||||
state.bossRushParTime = bossRushParTime;
|
||||
state.blueWombParTime = blueWombParTime;
|
||||
state.frameCount = frameCount;
|
||||
state.timeCounter = timeCounter;
|
||||
state.stageNameNumeral = stageNameNumeral;
|
||||
state.victoryLap = victoryLap;
|
||||
state.lastLevelWithoutHalfHp = lastLevelWithoutHalfHp;
|
||||
state.lastLevelWithDamage = lastLevelWithDamage;
|
||||
state.encounteredBosses = encounteredBosses;
|
||||
state.pixelationTimer = pixelationTimer;
|
||||
state.pixelationDuration = pixelationDuration;
|
||||
state.magicSkinUses = magicSkinUses;
|
||||
state.erasedEntities = erasedEntities;
|
||||
itemPool.StoreGameState(state.itemPool);
|
||||
bossPool.store_game_state(state.bossPool);
|
||||
if (!proceduralItemManager.proceduralItems.empty())
|
||||
reconstruction_missing("Game::store_game_state 006f9000: the TMTRAINER items' seeds (ProceduralItem +0x8)");
|
||||
|
||||
reconstruction_missing("Game::store_game_state 006f9000: Room::on_leave 007efa50");
|
||||
Level::store_game_state(state);
|
||||
playerManager.store_game_state(&state);
|
||||
|
||||
state.isAscent = ascentTimer > 0;
|
||||
state.backwardsStages = backwardsStages;
|
||||
state.deathCertificateExitTimer = deathCertificateExitTimer;
|
||||
state.nightmareStageIcons = g_manager->nightmareScene.stageIcons;
|
||||
state.isAmbushActive = ambush._isActive;
|
||||
state.ambushWave = ambush._currentWave > 0 ? ambush._currentWave - 1 : ambush._currentWave;
|
||||
scoreSheet.store_state(state.scoreSheet);
|
||||
reconstruction_missing("Game::store_game_state 006f9000: the versus rules (DeathmatchTypeBase slot 1 and its "
|
||||
"StoreGameState)");
|
||||
}
|
||||
|
||||
// 009b5cb0 Closes the pause screen for a new run on Resume, with its paper's animation stopped, the options listed
|
||||
// again, My Stuff closed and the quit prompt reset.
|
||||
// The original also stops the full-size paper and resets fields of it, which pause_screen.h leaves out.
|
||||
@@ -615,11 +555,6 @@ void Game::Exit(bool)
|
||||
reconstruction_missing("Game::Exit 006fa0c0");
|
||||
}
|
||||
|
||||
void Game::save_rewind_state(int)
|
||||
{
|
||||
reconstruction_missing("Game::save_rewind_state 00705ee0");
|
||||
}
|
||||
|
||||
constexpr const char* BLOOM_SHADER = "Bloom";
|
||||
constexpr const char* COLOR_MOD_SHADER = "ColorMod";
|
||||
constexpr const char* COLOR_OFFSET_SHADER = "ColorOffset";
|
||||
|
||||
Reference in new issue
Block a user