Curation round 7: Game::Start, level generation, Room, Camera, the Entity hierarchy, Entity_Player, the run frame

Six agents took over Game::Start, Level::SetNextStage, BossPool, save_game_state, level generation to the first room
(place_special_rooms, RoomDescriptor, load_room), Room, Camera, Entity/EntityList/EntityRef with a curated skeleton of
every Entity_* subclass, Entity_Player, Game::Render, Manager::Update's run branch, RoomTransition, ItemInfoHUD and
StatHUD. Integration wrote FirstTrinketOwner and room_shape_get_door_grid_index (checked against the decompile for
every shape and slot) and folded the duplicated constants. A run now generates its floor, loads the start room and
draws the HUD (under gdb); Isaac renders correctly when drawn, the room itself waits for Room::Render.
2479 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 05:33:11 -05:00
1 parent addd027977
commit b85591bdf4
146 files changed
+20124 -200863

No files matched your search

+2 -51
View File
@@ -3,8 +3,10 @@
#include "anm2.h"
#include "font.h"
#include "fx_layers.h"
#include "item_info_hud.h"
#include "kage_graphics.h"
#include "rich_text.h"
#include "stat_hud.h"
#include <array>
#include <cstdint>
#include <memory>
@@ -20,11 +22,6 @@ constexpr int PLAYER_HUD_TRINKET_COUNT = 2;
constexpr int PLAYER_HUD_POCKET_COUNT = 4;
constexpr int MESSAGE_STACK_COUNT = 6;
constexpr int HISTORY_PLAYER_COUNT = 2;
constexpr int STAT_PLAYER_COUNT = 2;
constexpr int STAT_TRACKER_COUNT = 10;
constexpr int STAT_TRACKER_FINE_COUNT = 6;
constexpr float STAT_THRESHOLD_FINE = 0.01f;
constexpr float STAT_THRESHOLD_COARSE = 0.1f;
constexpr float BOSS_BAR_HIDDEN = -1;
constexpr int FLASH_OFF = -1;
constexpr int ONLINE_HUD_OFFLINE = 3;
@@ -179,40 +176,8 @@ struct PlayerHUD
static std::shared_ptr<PlayerHUD> make_ref(HUD* owner, Entity_Player* shown);
};
// A stat the stats HUD shows: its value, the value before its last change, the change shown and for how long, and the
// smallest change worth showing.
struct StatTracker
{
float change = 0;
float previous = 0;
float threshold = STAT_THRESHOLD_FINE;
float value = 0;
int changeTimer = 0;
void set(float newValue, bool isAnimated);
};
// The stats one player shows.
struct StatHUDPlayer
{
std::array<StatTracker, STAT_TRACKER_COUNT> stats{};
Entity_Player* player = nullptr;
};
// The stats HUD (REPENTOGON's StatHUD) under the pickups: speed, tears, damage, range, shot speed, luck and the room
// chances, for up to two players.
struct StatHUD
{
ANM2 sprite;
std::array<StatHUDPlayer, STAT_PLAYER_COUNT> players{};
bool isDualityOwned = false;
void reset();
void Update();
void Render(Vector at);
void RecomputeStats(int playerId, uint32_t flags, bool isAnimated);
void update_player(Entity_Player* oldPlayer, Entity_Player* newPlayer);
};
// An item of the recent items list, with its icon.
struct HistoryHUDItem
@@ -241,20 +206,6 @@ struct HistoryHUD
void RecomputeAll(bool isImmediate);
};
// The panel describing the item the player stands next to: its charge icon, map icons and rich text.
struct ItemInfoHUD
{
ANM2 iconSprite;
ANM2 chargeIconSprite;
ANM2 mapIconsSprite;
RichText text;
KAGE::Graphics::ImagePtr itemImage;
float iconScale = 0;
int pickupIndex = -1;
void load_graphics();
void Update();
};
// The online HUD style option in effect, ONLINE_HUD_OFFLINE offline.
int online_hud_mode();