Curation round 8: the first room plays: Isaac walks and shoots tears
Eight agents took over Room::Init's pieces, RailManager, Room::Render/render_lighting/Update, the GridEntity hierarchy (walls, doors, rocks, pits, poop ...), Game::Update and interpolate_update, the run's save, update_ingame_input, Game::Spawn with the entity factory and grid collision, the player's movement and tears through Weapon/Weapon_Tears, PlayerManager's positions, the camera focus, MinimapConfig, PlayerHUD, mod shader rendering, Entity_Tear and Entity_Effect. Integration wrote Level::get_secret_exit_kind, shared the secret-exit enum (four copies merged) and fixed the generator's vtable-stub check (word boundary and namespace, not a substring). Under gdb a run reaches the first room: doors, HUD with hearts and minimap, WASD movement with acceleration, arrow-key tears that fly and splash. Floor and walls (Backdrop::RenderFloor/RenderWalls) and room transitions are next. The official build/isaac reaches the start room and stops at Entity_NPC::Redirect. 2770 functions taken over. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b85591bdf4
commit
69a354f843
140 files changed
+23561
-20206
No files matched your search
@@ -5,6 +5,7 @@
|
||||
#include "fx_layers.h"
|
||||
#include "item_info_hud.h"
|
||||
#include "kage_graphics.h"
|
||||
#include "player_hud.h"
|
||||
#include "rich_text.h"
|
||||
#include "stat_hud.h"
|
||||
#include <array>
|
||||
@@ -14,28 +15,11 @@
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
constexpr int PLAYER_HUD_COUNT = 8;
|
||||
constexpr int MAIN_PLAYER_HUD_COUNT = 4;
|
||||
constexpr int PLAYER_HUD_HEART_COUNT = 24;
|
||||
constexpr int PLAYER_HUD_ACTIVE_COUNT = 4;
|
||||
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 float BOSS_BAR_HIDDEN = -1;
|
||||
constexpr int FLASH_OFF = -1;
|
||||
constexpr int ONLINE_HUD_OFFLINE = 3;
|
||||
constexpr float PLAYER_HUD_BOUNDS_FAR = 1e7f;
|
||||
|
||||
// REPENTOGON's HUD layouts of a player, and the spot an online player's status takes.
|
||||
enum PlayerHudLayout : int
|
||||
{
|
||||
HUD_LAYOUT_NORMAL,
|
||||
HUD_LAYOUT_JACOB_ESAU,
|
||||
HUD_LAYOUT_COMPACT,
|
||||
HUD_LAYOUT_JACOB_ESAU_COMPACT,
|
||||
HUD_LAYOUT_NET_STATUS
|
||||
};
|
||||
|
||||
// How much of the HUD a refresh request redraws. A full request is never downgraded by a lighter one.
|
||||
enum HudRefresh : int
|
||||
@@ -89,96 +73,6 @@ struct HUD_Message
|
||||
static void render_text_image(Font& textFont, std::u16string_view line, Vector at, KColor textColor);
|
||||
};
|
||||
|
||||
// REPENTOGON's PlayerHUDHeart: the animations a heart slot shows and how.
|
||||
struct PlayerHUDHeart
|
||||
{
|
||||
const char* spriteAnim = "";
|
||||
const char* spriteOverlayAnim = "";
|
||||
int8_t flashType = 0;
|
||||
bool isEternalHeartVisible = false;
|
||||
bool isFadeHeart = false;
|
||||
bool isGoldenHeartVisible = false;
|
||||
bool isVisible = false;
|
||||
};
|
||||
|
||||
// REPENTOGON's PlayerHUDActiveItem: the item an active slot shows, its book overlay and its charge bar flash.
|
||||
struct PlayerHUDActiveItem
|
||||
{
|
||||
KAGE::Graphics::ImagePtr bookImage;
|
||||
KAGE::Graphics::ImagePtr itemImage;
|
||||
int bookItemId = 0;
|
||||
int chargeBarFlash = 0;
|
||||
int id = 0;
|
||||
};
|
||||
|
||||
// REPENTOGON's PlayerHUDTrinket: the trinket a slot shows.
|
||||
struct PlayerHUDTrinket
|
||||
{
|
||||
KAGE::Graphics::ImagePtr image;
|
||||
int id = 0;
|
||||
int slot = 0;
|
||||
};
|
||||
|
||||
// A card, pill or pocket active slot: its sprite and what it shows.
|
||||
struct PlayerHUDPocketItem
|
||||
{
|
||||
ANM2 sprite;
|
||||
int id = 0;
|
||||
int kind = 0;
|
||||
};
|
||||
|
||||
// A crafting bag pickup icon.
|
||||
struct PlayerHUDIcon
|
||||
{
|
||||
KAGE::Graphics::ImagePtr image;
|
||||
int id = 0;
|
||||
};
|
||||
|
||||
// Construction (006efc70) and destruction (006efde0) are the defaults.
|
||||
// One player's corner of the HUD (REPENTOGON's PlayerHUD): hearts, actives, trinkets, pockets and the crafting bag, and
|
||||
// the box the drawn parts covered this frame.
|
||||
struct PlayerHUD
|
||||
{
|
||||
std::array<PlayerHUDHeart, PLAYER_HUD_HEART_COUNT> hearts{};
|
||||
std::array<PlayerHUDActiveItem, PLAYER_HUD_ACTIVE_COUNT> activeItems{};
|
||||
std::array<PlayerHUDTrinket, PLAYER_HUD_TRINKET_COUNT> trinkets{};
|
||||
std::array<PlayerHUDPocketItem, PLAYER_HUD_POCKET_COUNT> pocketItems{};
|
||||
std::vector<PlayerHUDIcon> craftingIcons;
|
||||
KAGE::Graphics::ImagePtr craftingBagImage;
|
||||
KAGE::Graphics::ImagePtr craftingResultImage;
|
||||
KAGE::Graphics::ImagePtr deathmatchHealthBarImage;
|
||||
Vector boundsMax = vector_make(-PLAYER_HUD_BOUNDS_FAR, -PLAYER_HUD_BOUNDS_FAR);
|
||||
Vector boundsMin = vector_make(PLAYER_HUD_BOUNDS_FAR, PLAYER_HUD_BOUNDS_FAR);
|
||||
Entity_Player* player = nullptr;
|
||||
HUD* hud = nullptr;
|
||||
float dropHoldFade = 0;
|
||||
int16_t lastHeartFlash = 0;
|
||||
int16_t playerHudIndex = 0;
|
||||
int8_t goldHeartFlashCountdown = 0;
|
||||
int8_t redHeartFlashCountdown = 0;
|
||||
int8_t soulHeartFlashCountdown = 0;
|
||||
bool isCraftingItemDirty = false;
|
||||
bool isDirty = false;
|
||||
|
||||
void reset();
|
||||
void bounds_reset();
|
||||
void Update();
|
||||
void UpdateHearts(PlayerHUDHeart& heart, int heartIndex);
|
||||
void set_active_charge_frame(int collectibleId);
|
||||
void RenderHearts(Vector& outExtent, ANM2& sprite, PlayerHudLayout layout, float heartScale, Vector at);
|
||||
void RenderActiveItem(int activeSlot, Vector at, PlayerHudLayout layout, float itemScale, float alpha);
|
||||
void RenderTrinket(int trinketSlot, Vector at, float trinketScale, bool isSmall);
|
||||
void RenderPocketItems(Vector at, PlayerHudLayout layout, float alpha, float pocketScale);
|
||||
void render_inventory(Vector at, float inventoryScale);
|
||||
void RenderCraftingTable(Vector at, float tableScale);
|
||||
void RenderSpellQueue(Vector at, float queueScale);
|
||||
Vector render_deathmatch_health_bar(Vector at);
|
||||
static std::shared_ptr<PlayerHUD> make_ref(HUD* owner, Entity_Player* shown);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
// An item of the recent items list, with its icon.
|
||||
struct HistoryHUDItem
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user