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>
1220 lines
41 KiB
C++
1220 lines
41 KiB
C++
#pragma once
|
|
|
|
#include "entity.h"
|
|
#include "item_config.h"
|
|
#include "kage_graphics.h"
|
|
#include "online_emotes.h"
|
|
#include "temporary_effects.h"
|
|
#include <array>
|
|
#include <cstdint>
|
|
#include <deque>
|
|
#include <map>
|
|
#include <memory>
|
|
#include <optional>
|
|
#include <string>
|
|
#include <string_view>
|
|
#include <vector>
|
|
|
|
constexpr int ACTIVE_SLOT_COUNT = 4;
|
|
constexpr int BAG_OF_CRAFTING_SIZE = 8;
|
|
constexpr int CHARGE_BAR_COUNT = 7;
|
|
constexpr int COLLECTIBLE_VANILLA_COUNT = 733;
|
|
constexpr int COOP_BABY_BUFF_COUNT = 8;
|
|
constexpr int COSTUME_LAYER_COUNT = 15;
|
|
constexpr int HUD_HEART_FLASH_FRAMES = 4;
|
|
constexpr int INVENTORY_SIZE = 16;
|
|
constexpr int POCKET_SLOT_COUNT = 4;
|
|
constexpr int POOP_SPELL_QUEUE_SIZE = 6;
|
|
constexpr int TRINKET_SLOT_COUNT = 2;
|
|
constexpr int WEAPON_SLOT_COUNT = 5;
|
|
constexpr uint32_t QUEUED_GOLDEN = 0x2;
|
|
constexpr uint32_t TRINKET_GOLDEN_FLAG = 0x8000;
|
|
constexpr uint32_t TRINKET_ID_MASK = 0x7fff;
|
|
constexpr uint8_t WILD_CARD_NONE = 0xff;
|
|
|
|
// The characters, by their ids in players.xml (Lua's PlayerType).
|
|
enum PlayerType : int
|
|
{
|
|
PLAYER_ISAAC,
|
|
PLAYER_MAGDALENE,
|
|
PLAYER_CAIN,
|
|
PLAYER_JUDAS,
|
|
PLAYER_BLUEBABY,
|
|
PLAYER_EVE,
|
|
PLAYER_SAMSON,
|
|
PLAYER_AZAZEL,
|
|
PLAYER_LAZARUS,
|
|
PLAYER_EDEN,
|
|
PLAYER_THELOST,
|
|
PLAYER_LAZARUS2,
|
|
PLAYER_BLACKJUDAS,
|
|
PLAYER_LILITH,
|
|
PLAYER_KEEPER,
|
|
PLAYER_APOLLYON,
|
|
PLAYER_THEFORGOTTEN,
|
|
PLAYER_THESOUL,
|
|
PLAYER_BETHANY,
|
|
PLAYER_JACOB,
|
|
PLAYER_ESAU,
|
|
PLAYER_ISAAC_B,
|
|
PLAYER_MAGDALENE_B,
|
|
PLAYER_CAIN_B,
|
|
PLAYER_JUDAS_B,
|
|
PLAYER_BLUEBABY_B,
|
|
PLAYER_EVE_B,
|
|
PLAYER_SAMSON_B,
|
|
PLAYER_AZAZEL_B,
|
|
PLAYER_LAZARUS_B,
|
|
PLAYER_EDEN_B,
|
|
PLAYER_THELOST_B,
|
|
PLAYER_LILITH_B,
|
|
PLAYER_KEEPER_B,
|
|
PLAYER_APOLLYON_B,
|
|
PLAYER_THEFORGOTTEN_B,
|
|
PLAYER_BETHANY_B,
|
|
PLAYER_JACOB_B,
|
|
PLAYER_LAZARUS2_B,
|
|
PLAYER_JACOB2_B,
|
|
PLAYER_THESOUL_B
|
|
};
|
|
|
|
// What an Entity_Player is: a character, a co-op baby, or an extra player kept out of the room.
|
|
enum PlayerVariant : int
|
|
{
|
|
PLAYER_VARIANT_PLAYER,
|
|
PLAYER_VARIANT_COOP_BABY,
|
|
PLAYER_VARIANT_EXTRA
|
|
};
|
|
|
|
// The co-op baby skins Init and the frame tell apart (Lua's BabySubType).
|
|
enum BabySubType : int
|
|
{
|
|
BABY_BLOAT = 2,
|
|
BABY_YBAB = 7,
|
|
BABY_GLITCH = 25,
|
|
BABY_MAGNET = 26,
|
|
BABY_APOLLYON = 56,
|
|
BABY_BASIC = 71
|
|
};
|
|
|
|
// How a character's health is counted (REPENTOGON's HealthType).
|
|
enum HealthType : int
|
|
{
|
|
HEALTH_DEFAULT,
|
|
HEALTH_SOUL,
|
|
HEALTH_NO_HEALTH,
|
|
HEALTH_COIN,
|
|
HEALTH_BONE
|
|
};
|
|
|
|
// The kinds of heart ClampHeartsToLimit tops up, by their heart pickup subtype.
|
|
enum HeartKind : int
|
|
{
|
|
HEART_RED = 1,
|
|
HEART_SOUL = 3,
|
|
HEART_BLACK = 6,
|
|
HEART_GOLDEN = 7,
|
|
HEART_BONE = 11,
|
|
HEART_ROTTEN = 12
|
|
};
|
|
|
|
// Whether a pocket slot holds a pill, a card or an active item.
|
|
enum PocketItemType : int
|
|
{
|
|
POCKET_PILL,
|
|
POCKET_CARD,
|
|
POCKET_ACTIVE
|
|
};
|
|
|
|
// The four directions a player moves, looks and shoots in, or none.
|
|
enum Direction : int
|
|
{
|
|
DIRECTION_NONE = -1,
|
|
DIRECTION_LEFT,
|
|
DIRECTION_UP,
|
|
DIRECTION_RIGHT,
|
|
DIRECTION_DOWN
|
|
};
|
|
|
|
// The layers of the player's sprite, in the order its .anm2 lists them: the glow, the body, the head and the top
|
|
// layers costumes can cover.
|
|
enum PlayerSpriteLayer : int
|
|
{
|
|
PLAYER_LAYER_GLOW,
|
|
PLAYER_LAYER_BODY,
|
|
PLAYER_LAYER_BODY0,
|
|
PLAYER_LAYER_BODY1,
|
|
PLAYER_LAYER_HEAD,
|
|
PLAYER_LAYER_HEAD0,
|
|
PLAYER_LAYER_HEAD1,
|
|
PLAYER_LAYER_HEAD2,
|
|
PLAYER_LAYER_HEAD3,
|
|
PLAYER_LAYER_HEAD4,
|
|
PLAYER_LAYER_HEAD5,
|
|
PLAYER_LAYER_TOP0,
|
|
PLAYER_LAYER_EXTRA,
|
|
PLAYER_LAYER_GHOST,
|
|
PLAYER_LAYER_BACK
|
|
};
|
|
|
|
// Whether an item check counts what lends the player an item (trinkets, wisps, characters) or only what it owns.
|
|
enum ItemCheck
|
|
{
|
|
ITEM_CHECK_MODIFIED,
|
|
ITEM_CHECK_OWNED
|
|
};
|
|
|
|
// Whether a render pass draws the player itself or one of its after-images.
|
|
enum RenderPass
|
|
{
|
|
RENDER_PASS_AFTER_IMAGE,
|
|
RENDER_PASS_MAIN
|
|
};
|
|
|
|
// The items, trinkets and null items the player's code names (Lua's CollectibleType, TrinketType, NullItemID).
|
|
enum PlayerItemId : int
|
|
{
|
|
COLLECTIBLE_SAD_ONION = 1,
|
|
COLLECTIBLE_SPOON_BENDER = 3,
|
|
COLLECTIBLE_SKATOLE = 9,
|
|
COLLECTIBLE_COMPASS = 21,
|
|
COLLECTIBLE_TELEPORT = 44,
|
|
COLLECTIBLE_LUCKY_FOOT = 46,
|
|
COLLECTIBLE_TREASURE_MAP = 54,
|
|
COLLECTIBLE_BOOK_OF_SHADOWS = 58,
|
|
COLLECTIBLE_BOOK_OF_BELIAL_PASSIVE = 59,
|
|
COLLECTIBLE_RELIC = 98,
|
|
COLLECTIBLE_D6 = 105,
|
|
COLLECTIBLE_WAFER = 108,
|
|
COLLECTIBLE_MONEY_EQUALS_POWER = 109,
|
|
COLLECTIBLE_GUARDIAN_ANGEL = 112,
|
|
COLLECTIBLE_DEMON_BABY = 113,
|
|
COLLECTIBLE_DEAD_BIRD = 117,
|
|
COLLECTIBLE_BRIMSTONE = 118,
|
|
COLLECTIBLE_WHORE_OF_BABYLON = 122,
|
|
COLLECTIBLE_RAZOR_BLADE = 126,
|
|
COLLECTIBLE_MOMS_PURSE = 139,
|
|
COLLECTIBLE_NOTCHED_AXE = 147,
|
|
COLLECTIBLE_MUTANT_SPIDER = 153,
|
|
COLLECTIBLE_BLOODY_LUST = 157,
|
|
COLLECTIBLE_HOLY_WATER = 178,
|
|
COLLECTIBLE_SACRED_HEART = 182,
|
|
COLLECTIBLE_3_DOLLAR_BILL = 191,
|
|
COLLECTIBLE_ANEMIC = 214,
|
|
COLLECTIBLE_CRICKETS_BODY = 224,
|
|
COLLECTIBLE_BALL_OF_TAR = 231,
|
|
COLLECTIBLE_KEY_PIECE_1 = 238,
|
|
COLLECTIBLE_KEY_PIECE_2 = 239,
|
|
COLLECTIBLE_BLUE_MAP = 246,
|
|
COLLECTIBLE_FIRE_MIND = 257,
|
|
COLLECTIBLE_MISSING_NO = 258,
|
|
COLLECTIBLE_LEECH = 270,
|
|
COLLECTIBLE_LIL_BRIMSTONE = 275,
|
|
COLLECTIBLE_DARK_BUM = 278,
|
|
COLLECTIBLE_BUTTER_BEAN = 294,
|
|
COLLECTIBLE_TAURUS = 299,
|
|
COLLECTIBLE_SCORPIO = 305,
|
|
COLLECTIBLE_HOLY_MANTLE = 313,
|
|
COLLECTIBLE_CURSED_EYE = 316,
|
|
COLLECTIBLE_UNDEFINED = 324,
|
|
COLLECTIBLE_POLAROID = 327,
|
|
COLLECTIBLE_NEGATIVE = 328,
|
|
COLLECTIBLE_SOY_MILK = 330,
|
|
COLLECTIBLE_MIND = 333,
|
|
COLLECTIBLE_WOODEN_NICKEL = 349,
|
|
COLLECTIBLE_INCUBUS = 360,
|
|
COLLECTIBLE_SWORN_PROTECTOR = 363,
|
|
COLLECTIBLE_SERAPHIM = 390,
|
|
COLLECTIBLE_ZODIAC = 392,
|
|
COLLECTIBLE_CAMBION_CONCEPTION = 412,
|
|
COLLECTIBLE_IMMACULATE_CONCEPTION = 413,
|
|
COLLECTIBLE_CROWN_OF_LIGHT = 415,
|
|
COLLECTIBLE_SUCCUBUS = 417,
|
|
COLLECTIBLE_GLOWING_HOUR_GLASS = 422,
|
|
COLLECTIBLE_MOMS_BOX = 439,
|
|
COLLECTIBLE_KIDNEY_STONE = 440,
|
|
COLLECTIBLE_DARK_PRINCES_CROWN = 442,
|
|
COLLECTIBLE_BELLY_BUTTON = 458,
|
|
COLLECTIBLE_WAIT_WHAT = 484,
|
|
COLLECTIBLE_METRONOME = 488,
|
|
COLLECTIBLE_DEEP_POCKETS = 416,
|
|
COLLECTIBLE_GREEDS_GULLET = 501,
|
|
COLLECTIBLE_SCHOOLBAG = 534,
|
|
COLLECTIBLE_DREAM_CATCHER = 566,
|
|
COLLECTIBLE_PLAYDOUGH_COOKIE = 570,
|
|
COLLECTIBLE_RED_KEY = 580,
|
|
COLLECTIBLE_BOOK_OF_VIRTUES = 584,
|
|
COLLECTIBLE_ALABASTER_BOX = 585,
|
|
COLLECTIBLE_SOL = 588,
|
|
COLLECTIBLE_LUNA = 589,
|
|
COLLECTIBLE_URANUS = 596,
|
|
COLLECTIBLE_BIRTHRIGHT = 619,
|
|
COLLECTIBLE_ERASER = 638,
|
|
COLLECTIBLE_VASCULITIS = 657,
|
|
COLLECTIBLE_STRAW_MAN = 667,
|
|
COLLECTIBLE_REDEMPTION = 673,
|
|
COLLECTIBLE_EMPTY_HEART = 676,
|
|
COLLECTIBLE_LIL_ABADDON = 679,
|
|
COLLECTIBLE_HEARTBREAK = 694,
|
|
COLLECTIBLE_BLOODY_GUST = 695,
|
|
COLLECTIBLE_SALVATION = 696,
|
|
COLLECTIBLE_TWISTED_PAIR = 698,
|
|
|
|
COLLECTIBLE_MY_LITTLE_UNICORN = 77,
|
|
COLLECTIBLE_GAMEKID = 93,
|
|
COLLECTIBLE_GUILLOTINE = 206,
|
|
COLLECTIBLE_UNICORN_STUMP = 298,
|
|
COLLECTIBLE_SCISSORS = 325,
|
|
COLLECTIBLE_MY_SHADOW = 433,
|
|
COLLECTIBLE_CAMO_UNDIES = 497,
|
|
COLLECTIBLE_MARS = 593,
|
|
COLLECTIBLE_JUPITER = 594,
|
|
COLLECTIBLE_MEGA_MUSH = 625,
|
|
COLLECTIBLE_MONTEZUMAS_REVENGE = 680,
|
|
COLLECTIBLE_DECAP_ATTACK = 729,
|
|
TRINKET_PAPER_CLIP = 19,
|
|
TRINKET_MYSTERIOUS_PAPER = 21,
|
|
TRINKET_MISSING_POSTER = 23,
|
|
TRINKET_BUTT_PENNY = 24,
|
|
TRINKET_CHILDS_HEART = 34,
|
|
TRINKET_CURSED_SKULL = 43,
|
|
TRINKET_MISSING_PAGE = 48,
|
|
TRINKET_MAGGYS_FAITH = 55,
|
|
TRINKET_CAINS_EYE = 59,
|
|
TRINKET_RAINBOW_WORM = 64,
|
|
TRINKET_ERROR = 75,
|
|
TRINKET_FADED_POLAROID = 69,
|
|
TRINKET_LIL_LARVA = 86,
|
|
TRINKET_USED_DIAPER = 93,
|
|
TRINKET_STORE_KEY = 83,
|
|
TRINKET_TONSIL = 97,
|
|
TRINKET_DUCT_TAPE = 109,
|
|
TRINKET_STEM_CELL = 119,
|
|
TRINKET_WOODEN_CROSS = 121,
|
|
TRINKET_BUTTER = 122,
|
|
TRINKET_BETHS_FAITH = 142,
|
|
TRINKET_MOTHERS_KISS = 156,
|
|
TRINKET_LUCKY_SACK = 160,
|
|
TRINKET_HOLLOW_HEART = 168,
|
|
TRINKET_FOUND_SOUL = 180,
|
|
|
|
NULLITEM_BLINDFOLD = 14,
|
|
NULLITEM_BLANKFACE = 15,
|
|
NULLITEM_CHRISTMAS = 16,
|
|
NULLITEM_SPIN_TO_WIN = 50,
|
|
NULLITEM_INTRUDER = 55,
|
|
NULLITEM_REVERSE_CHARIOT = 63,
|
|
NULLITEM_REVERSE_SUN = 66,
|
|
NULLITEM_LUNA = 74,
|
|
NULLITEM_SPIRIT_SHACKLES_DISABLED = 102,
|
|
NULLITEM_FORGOTTEN_BOMB = 106,
|
|
NULLITEM_JACOBS_CURSE = 109,
|
|
NULLITEM_LOST_CURSE = 112,
|
|
NULLITEM_SOUL_FORGOTTEN = 120,
|
|
NULLITEM_SOUL_JACOB = 121,
|
|
NULLITEM_JUDAS_BIRTHRIGHT_STAGE = 129,
|
|
|
|
PILLEFFECT_TELEPILLS = 19
|
|
};
|
|
|
|
// The unlocks the player's code checks or grants (Lua's Achievement).
|
|
enum PlayerAchievement : int
|
|
{
|
|
ACHIEVEMENT_MAGDALENE = 1,
|
|
ACHIEVEMENT_CAIN = 2,
|
|
ACHIEVEMENT_ISAAC_HOLDS_THE_D6 = 29,
|
|
ACHIEVEMENT_LAZARUS = 80,
|
|
ACHIEVEMENT_KEEPER_HOLDS_A_PENNY = 191,
|
|
ACHIEVEMENT_KEEPER_HOLDS_WOODEN_NICKEL = 236,
|
|
ACHIEVEMENT_KEEPER_HOLDS_STORE_KEY = 237,
|
|
ACHIEVEMENT_CAIN_HOLDS_PAPERCLIP = 245,
|
|
ACHIEVEMENT_EVE_HOLDS_RAZOR_BLADE = 248,
|
|
ACHIEVEMENT_LOST_HOLDS_HOLY_MANTLE = 250,
|
|
ACHIEVEMENT_LAZARUS_HOLDS_ANEMIA = 331,
|
|
ACHIEVEMENT_MAGDALENE_HOLDS_A_PILL = 332,
|
|
ACHIEVEMENT_SAMSON_HOLDS_CHILDS_HEART = 334,
|
|
ACHIEVEMENT_GOLDEN_RAZOR = 583
|
|
};
|
|
|
|
// The challenges the player's code tells apart (Lua's Challenge).
|
|
enum PlayerChallenge : int
|
|
{
|
|
CHALLENGE_HAVE_A_HEART = 25,
|
|
CHALLENGE_GUARDIAN = 30,
|
|
CHALLENGE_BACKASSWARDS = 31,
|
|
CHALLENGE_BLOODY_MARY = 37,
|
|
CHALLENGE_BAPTISM_BY_FIRE = 38,
|
|
CHALLENGE_PICA_RUN = 41,
|
|
CHALLENGE_HOT_POTATO = 42,
|
|
CHALLENGE_CANTRIPPED = 43,
|
|
CHALLENGE_RED_REDEMPTION = 44
|
|
};
|
|
|
|
// One active item slot: the item, its charges and the data it keeps between uses.
|
|
struct ActiveItemDesc
|
|
{
|
|
int batteryCharge = 0;
|
|
int charge = 0;
|
|
int item = 0;
|
|
int partialCharge = 0;
|
|
int subCharge = 0;
|
|
int timeRechargeCooldown = 0;
|
|
int unknown = 0;
|
|
int varData = 0;
|
|
};
|
|
|
|
// A card, pill or pocket active in a pocket slot.
|
|
struct PocketItem
|
|
{
|
|
int id = 0;
|
|
PocketItemType type = POCKET_CARD;
|
|
};
|
|
|
|
// The item a player holds over its head, picked up and not yet added.
|
|
struct QueueItemData
|
|
{
|
|
ItemConfig_Item* item = nullptr;
|
|
int charge = 0;
|
|
uint32_t flags = 0;
|
|
int varData = 0;
|
|
};
|
|
|
|
// Which costume sprite draws a layer of the player's sprite, or -1 for the player's own.
|
|
struct PlayerCostumeMap
|
|
{
|
|
int index = -1;
|
|
int layerId = -1;
|
|
int priority = 0;
|
|
bool isBodyLayer = false;
|
|
};
|
|
|
|
// A costume worn by the player: the item's sprite and how it draws over the player.
|
|
struct CostumeSpriteDesc
|
|
{
|
|
ANM2 sprite;
|
|
ItemConfig_Item* item = nullptr;
|
|
int defaultSkinColor = -1;
|
|
int playerType = 0;
|
|
int priority = 0;
|
|
int skinColor = -1;
|
|
bool isFlying = false;
|
|
bool isHasOverlay = false;
|
|
bool isHasSkinAlt = false;
|
|
bool isItemAnimPlay = false;
|
|
bool isItemStateOnly = false;
|
|
bool isOverwriteColor = false;
|
|
};
|
|
|
|
// The copies of a trinket smelted into the player, plain and golden.
|
|
struct SmeltedTrinket
|
|
{
|
|
short count = 0;
|
|
short goldenCount = 0;
|
|
};
|
|
|
|
// One item picked up, as the history keeps it for the HUD and Tainted Isaac's inventory.
|
|
struct HistoryItem
|
|
{
|
|
int time = 0;
|
|
bool isTrinket = false;
|
|
int id = 0;
|
|
int levelStage = 0;
|
|
int stageType = 0;
|
|
int roomType = 0;
|
|
int itemPoolType = 0;
|
|
};
|
|
|
|
// The items a player picked up, in pickup order.
|
|
struct History
|
|
{
|
|
std::vector<HistoryItem> historyItems;
|
|
Entity_Player* player = nullptr;
|
|
bool isLocked = false;
|
|
|
|
void AddHistoryItem(const HistoryItem& item);
|
|
bool RemoveHistoryItemByIndex(int index);
|
|
void merge(History& other);
|
|
void remove_index_refs(int index);
|
|
};
|
|
|
|
// Coins, keys, bombs and charges, as Curse of the Mist keeps them aside.
|
|
struct ConsumableData
|
|
{
|
|
int bloodCharges = 0;
|
|
int bombs = 0;
|
|
int coins = 0;
|
|
int gigaBombs = 0;
|
|
int keys = 0;
|
|
int poopMana = 0;
|
|
int soulCharges = 0;
|
|
bool isGoldenBomb = false;
|
|
bool isGoldenKey = false;
|
|
};
|
|
|
|
// The enemy Friendly Ball caught, to throw back out as a friend.
|
|
struct EntityDesc
|
|
{
|
|
float health = 0;
|
|
float maxHealth = 0;
|
|
uint32_t subtype = 0;
|
|
uint32_t type = 0;
|
|
uint32_t variant = 0;
|
|
int championId = -1;
|
|
bool isPlayerControlled = false;
|
|
};
|
|
|
|
RNG rng_make(uint32_t seed, uint32_t shiftIndex);
|
|
bool is_run_unlocked(int achievement);
|
|
int scale_for_hard_difficulty(int value);
|
|
std::string costume_path_apply_skin_color(const std::string& path, int skinColor, int playerType,
|
|
bool* isSkinColorFound, bool* isCharacterFound);
|
|
void sound_play(int sound);
|
|
|
|
// Destruction (00754ed0, 00754d60) unlinks the twin and frees a sub player the room does not hold.
|
|
// Field getters (00417820, 00423950, 004253b0, 00428b10, 0042a310, 0042a320, 004316d0, 004316e0, 004316f0, 00436170,
|
|
// 00436180, 004361a0, 004361b0, 004361c0, 00499dd0, 004e4860, 005b1700, 005b1710, 005b1740, 005b1750, 005b1760,
|
|
// 005b1770, 005cd740, 005cd7d0, 0060d050, 0060d080, 0065cf20, 0065cf30, 0065cf40, 0065cf50, 00665c10, 006b84a0,
|
|
// 006dad10, 006dad20, 006dad30, 006dad60, 006dad70, 006dae00, 006dae10, 00753930, 007539f0, 00753c20, 00753c30,
|
|
// 007e92a0, 0083ab80, 00841ca0, 0085e220, 0085e230, 0085e240, 0085e250, 0085e270, 0085e290, 0085e2c0, 0085e2d0,
|
|
// 0085e2e0, 0085e2f0) are the public fields.
|
|
// A player (Lua's EntityPlayer): a character, a co-op baby or an extra player, with its health, consumables, items,
|
|
// costumes, stats and the sprites it draws over its own.
|
|
struct Entity_Player : Entity
|
|
{
|
|
public:
|
|
ANM2 bloodGushSprite;
|
|
ANM2 bodySprite;
|
|
ANM2 crownOfLightSprite;
|
|
ANM2 darkPrincesCrownSprite;
|
|
ANM2 heldSprite;
|
|
ANM2 statusEffectSprite;
|
|
std::array<ANM2, CHARGE_BAR_COUNT> chargeBarSprites;
|
|
std::vector<CostumeSpriteDesc> costumeSpriteDescs;
|
|
std::array<PlayerCostumeMap, COSTUME_LAYER_COUNT> playerCostumeMap{};
|
|
KAGE::Graphics::ImagePtr shadowImage;
|
|
OnlineEmotes emotes;
|
|
std::string headAnim;
|
|
std::string name;
|
|
std::string queuedExtraAnimation;
|
|
ColorMod colorOverride = COLOR_DEFAULT;
|
|
ColorMod footprintColor1 = COLOR_DEFAULT;
|
|
ColorMod footprintColor2 = COLOR_DEFAULT;
|
|
Vector bodyScale{};
|
|
Vector headScale{};
|
|
Vector playerSpriteScale{};
|
|
int blinkTime = 0;
|
|
int bodyColor = 0;
|
|
int headColor = 0;
|
|
int headDirectionTime = 0;
|
|
bool isPlayingExtraAnimation = false;
|
|
bool isPlayingItemAnimation = false;
|
|
|
|
int blackHearts = 0;
|
|
int boneHearts = 0;
|
|
int boneHeartsMask = 0;
|
|
int brokenHearts = 0;
|
|
int effectiveBloodCharge = 0;
|
|
int effectiveSoulCharge = 0;
|
|
int eternalHearts = 0;
|
|
int goldenHearts = 0;
|
|
int jarHearts = 0;
|
|
int maxHearts = 0;
|
|
int redHearts = 0;
|
|
int rottenHearts = 0;
|
|
int soulHearts = 0;
|
|
short greedsGulletHearts = 0;
|
|
short greedsGulletOverflow = 0;
|
|
short greedsGulletRedHearts = 0;
|
|
bool isUpdatingGreedsGullet = false;
|
|
|
|
ConsumableData consumablesBackup;
|
|
int jarFlies = 0;
|
|
int numBlueFlies = 0;
|
|
int numBlueSpiders = 0;
|
|
int numBombs = 0;
|
|
int numCoins = 0;
|
|
int numGigaBombs = 0;
|
|
int numKeys = 0;
|
|
int poopMana = 0;
|
|
uint32_t urnSouls = 0;
|
|
bool hasGoldenBomb = false;
|
|
bool hasGoldenKey = false;
|
|
|
|
TearFlags tearFlags;
|
|
ColorMod laserColor = COLOR_DEFAULT;
|
|
ColorMod tearColor = COLOR_DEFAULT;
|
|
float d8DamageModifier = 1;
|
|
float d8FireDelayModifier = 1;
|
|
float d8RangeModifier = 1;
|
|
float d8SpeedModifier = 1;
|
|
float damage = 3.5f;
|
|
float edenDamage = 0;
|
|
float edenFireDelay = 0;
|
|
float edenLuck = 0;
|
|
float edenShotSpeed = 0;
|
|
float edenSpeed = 0;
|
|
float edenTearRange = 0;
|
|
float luck = 0;
|
|
float maxFireDelay = 10;
|
|
float meleeDamage = 3.5f;
|
|
float moveSpeed = 1;
|
|
float rockBottomDamage = 0;
|
|
float rockBottomLuck = 0;
|
|
float rockBottomMaxFireDelay = 0;
|
|
float rockBottomMoveSpeed = 0;
|
|
float rockBottomShotSpeed = 0;
|
|
float rockBottomTearRange = 0;
|
|
float shotSpeed = 1;
|
|
float taurusSpeedBonus = 0;
|
|
float tearFallingAcceleration = 0;
|
|
float tearFallingSpeed = 0;
|
|
float tearHeight = 0;
|
|
float tearRange = 0;
|
|
uint32_t cacheFlags = 0;
|
|
int damageModifier = 0;
|
|
int donateLuck = 0;
|
|
int fireDelayModifier = 0;
|
|
int firedTearCount = 0;
|
|
int luckModifier = 0;
|
|
int shotSpeedModifier = 0;
|
|
int speedModifier = 0;
|
|
int tearRangeModifier = 0;
|
|
int8_t tearDisplacement = 1;
|
|
bool canFly = false;
|
|
|
|
TemporaryEffects temporaryEffects;
|
|
History history;
|
|
std::array<int, INVENTORY_SIZE> inventory{};
|
|
std::vector<int> collectibleCounts;
|
|
std::vector<uint8_t> extraCollectibleCounts;
|
|
std::vector<uint8_t> extraTrinketCounts;
|
|
std::vector<int> greedResetCollectibles;
|
|
std::vector<int> itemCards;
|
|
std::vector<int> levelEffectItems;
|
|
std::vector<int> pillEffectUses;
|
|
std::vector<int> voidedCollectibles;
|
|
std::vector<int> voidedPassives;
|
|
std::vector<SmeltedTrinket> smeltedTrinkets;
|
|
std::vector<RNG> cardRNGs;
|
|
std::vector<RNG> collectibleRNGs;
|
|
std::vector<RNG> pillRNGs;
|
|
std::vector<RNG> trinketRNGs;
|
|
std::vector<EntitySaveState> movingBoxContents;
|
|
std::map<int, int> itemWispsList;
|
|
std::map<int, int> proceduralItems;
|
|
std::map<int, int> roomTemporaryCollectibles;
|
|
std::array<int, PLAYER_FORM_SLOTS> playerForms{};
|
|
std::array<uint32_t, TRINKET_SLOT_COUNT> trinkets{};
|
|
uint32_t grantedCollectibleFlags = 0;
|
|
uint32_t playerFormsRewarded = 0;
|
|
int grantedCollectibleCountdown = 0;
|
|
int metronomeCollectibleId = 0;
|
|
int modelingClayEffect = 0;
|
|
int threeDollarBillItem = 0;
|
|
|
|
std::array<ActiveItemDesc, ACTIVE_SLOT_COUNT> activeItems{};
|
|
std::array<PocketItem, POCKET_SLOT_COUNT> curseMistPocketItems{};
|
|
std::array<PocketItem, POCKET_SLOT_COUNT> ghostPocketItems{};
|
|
std::array<PocketItem, POCKET_SLOT_COUNT> pocketItems{};
|
|
std::array<uint32_t, TRINKET_SLOT_COUNT> curseMistTrinkets{};
|
|
std::array<uint32_t, TRINKET_SLOT_COUNT> ghostTrinkets{};
|
|
std::array<char, BAG_OF_CRAFTING_SIZE> bagOfCraftingContent{};
|
|
std::array<char, POOP_SPELL_QUEUE_SIZE> poopSpellQueue{};
|
|
QueueItemData queuedItem;
|
|
int bagOfCraftingHoldFrames = 0;
|
|
int extensionCordIndex = -1;
|
|
int itemHoldCooldown = 0;
|
|
int itemState = 0;
|
|
int itemStateCooldown = 0;
|
|
int wildCardItem = 0;
|
|
int wildCardVarData = 0;
|
|
uint8_t wildCardItemType = WILD_CARD_NONE;
|
|
bool isHeldItemVisible = false;
|
|
|
|
std::array<IsaacRepentancePlus::Weapon*, WEAPON_SLOT_COUNT> weapons{};
|
|
Vector aimDirection{};
|
|
Vector lastDirection{};
|
|
Vector lastVelocity{};
|
|
Vector moveToTarget{};
|
|
Vector movementVector{};
|
|
Vector recentMovementVector{};
|
|
Vector tearsOffset{};
|
|
float bodyAngle = 0;
|
|
float heightVelocity = 0;
|
|
int actionHoldDrop = 0;
|
|
int bombPlaceDelay = 0;
|
|
int controllerIndex = -1;
|
|
int controlsCooldown = 0;
|
|
int fireBlockCooldown = 0;
|
|
int glowingHourglassIndex = -1;
|
|
int lastActionTriggers = 0;
|
|
int playerIndex = -1;
|
|
int slipperyTimer = 0;
|
|
int tractorBeam = 0;
|
|
Direction fireDirection = DIRECTION_NONE;
|
|
Direction headDirection = DIRECTION_DOWN;
|
|
Direction moveDirection = DIRECTION_NONE;
|
|
bool areOpposingShootDirectionsPressed = false;
|
|
bool canShoot = true;
|
|
bool isControlsEnabled = true;
|
|
|
|
EntityRef lastDamageSource;
|
|
uint64_t lastDamageFlags = 0;
|
|
int damageCooldown = 0;
|
|
int flashCountdown = 0;
|
|
int lastDamageSourceVariant = 0;
|
|
int lastDamageSpawnerType = 0;
|
|
int lastDamageSpawnerVariant = 0;
|
|
int roomDamageTaken = 0;
|
|
int totalDamageTaken = 0;
|
|
uint8_t holyMantleStacks = 0;
|
|
uint8_t holyMantleState = 0;
|
|
bool isHurtPending = false;
|
|
|
|
std::shared_ptr<PlayerHUD> playerHUD;
|
|
std::vector<Entity*> contactHitList;
|
|
std::vector<Entity*> darkArtsHitList;
|
|
std::vector<Entity_Familiar*> curseMistFamiliars;
|
|
std::vector<int> pendingWisps;
|
|
std::deque<int> echoChamberItems;
|
|
EntityDesc friendBallEnemy;
|
|
EntityPtr astralProjectionBody;
|
|
EntityPtr babyFamiliar;
|
|
EntityPtr breathOfLifeEffect;
|
|
EntityPtr darkEsau;
|
|
EntityPtr salvationEffect;
|
|
EntityPtr tetheredEffect;
|
|
EntityPtr twinPlayer;
|
|
Entity_Player* backupPlayer = nullptr;
|
|
Entity_Player* replacedPlayer = nullptr;
|
|
Entity_Player* subPlayer = nullptr;
|
|
Entity* darkArtsLastSnare = nullptr;
|
|
Entity* heldEntity = nullptr;
|
|
Entity* montezumaLaser = nullptr;
|
|
Entity_Effect* markedTarget = nullptr;
|
|
Entity_Familiar* forgottenBody = nullptr;
|
|
Entity_Laser* megaBlastLaser = nullptr;
|
|
Vector forgottenBodyPos{};
|
|
Vector minecartOffset{};
|
|
Vector suplexLandPos{};
|
|
Vector suplexTargetPos{};
|
|
int babySkin = -1;
|
|
int forgottenBodyRoomIdx = 0;
|
|
int heldEntityCollisionClass = 0;
|
|
int heldEntityGridCollisionClass = 0;
|
|
int playerType = PLAYER_ISAAC;
|
|
int suplexAimCountdown = 0;
|
|
int suplexState = 0;
|
|
bool hasBabyRoomShield = false;
|
|
bool hasCurseMistEffect = false;
|
|
bool isCoopGhost = false;
|
|
bool isGlitchBaby = false;
|
|
bool isHeldEntityVisible = false;
|
|
|
|
std::array<int, COOP_BABY_BUFF_COUNT> coopBabyBuffTimers{};
|
|
float darkArtsDamage = 0;
|
|
float delayedSfxVolume = 0;
|
|
float forgottenBHeight = 0;
|
|
float forgottenBHeightVelocity = 0;
|
|
float ibsCharge = 0;
|
|
float jellyBellyBounceTimer = 0;
|
|
float jupiterCharge = 0;
|
|
uint32_t conceptionFamiliarFlags = 0;
|
|
uint32_t deadEyeCharges = 0;
|
|
uint32_t deadEyeMisses = 0;
|
|
uint32_t imExcitedSpeedupCountdown = 0;
|
|
uint32_t maggyHealthDrainCooldown = 0;
|
|
uint32_t mawOfTheVoidChargeTimer = 0;
|
|
uint32_t montezumaChargeTimer = 0;
|
|
uint32_t revelationChargeTimer = 0;
|
|
uint32_t vampireCharmKills = 0;
|
|
int bladderCharge = 0;
|
|
int bleedOutHealth = 0;
|
|
int cambionConceptionState = 0;
|
|
int cursedPennyPending = 0;
|
|
int curseMistRedHearts = 0;
|
|
int delayedSfxDelay = 0;
|
|
int delayedSfxFrameDelay = 0;
|
|
int delayedSfxId = 0;
|
|
int ductTapeMode = 0;
|
|
int epiphoraCharge = 0;
|
|
int eveSumptoriumCharge = 0;
|
|
int forgottenSwapFormCooldown = 0;
|
|
int gnawedLeafTimer = 0;
|
|
int hallowedGroundCountdown = 0;
|
|
int immaculateConceptionState = 0;
|
|
int keepersSackBonus = 0;
|
|
int maggySwingCooldown = 0;
|
|
int marsCooldown = 0;
|
|
int marsDashCooldown = 90;
|
|
int marsDashDirection = -1;
|
|
int marsLastTapDirection = 0;
|
|
int marsTapFrames = 0;
|
|
int maxBladderCharge = 0;
|
|
int maxPeeBurstCooldown = 0;
|
|
int megaBlastDuration = 0;
|
|
int monkeyPawCounter = 0;
|
|
int nextUrethraBlockFrame = 0;
|
|
int paperClipTimer = 0;
|
|
int peeBurstCooldown = 0;
|
|
int planCKillCountdown = 0;
|
|
int poisonDamageFrames = 0;
|
|
int ponyCharge = 0;
|
|
int potatoPeelerBandageCounter = 0;
|
|
int potatoPeelerCounter = 0;
|
|
int purityState = 0;
|
|
int rUaWizardTimer = 0;
|
|
int redStewBonusDuration = 0;
|
|
int reverseChariotMoveCooldown = 0;
|
|
int reverseEmpressMaxHearts = 0;
|
|
int reverseSunBoneHearts = 0;
|
|
int samsonBerserkCharge = 0;
|
|
int strengthMaxHearts = 0;
|
|
short bloodLustCounter = 0;
|
|
short brittleBonesUpgrades = 0;
|
|
short damageMultiplierStacks = 0;
|
|
short deadCatLives = 0;
|
|
short lastDamageMultiplierStacks = 0;
|
|
short numLeprosy = 0;
|
|
short tonsilCount = 0;
|
|
short tonsilCounter = 0;
|
|
bool isBrokenRemotePending = false;
|
|
bool isDarkArtsBlastPending = false;
|
|
bool isLevelStartPending = false;
|
|
bool isMarsDashReady = true;
|
|
bool isPostLevelInitFinished = false;
|
|
bool isUrethraBlocked = false;
|
|
// Set while EvaluateItems spawns the players Found Soul and Strawman give, who start without pickups.
|
|
static inline bool isSpawningHelperPlayers = false;
|
|
|
|
Entity_Player();
|
|
~Entity_Player() override;
|
|
|
|
// The start of a run and of a floor.
|
|
void Init(int type, int variant, int subType, uint32_t initSeed) override;
|
|
void InitPreLevelInitStats();
|
|
void InitPostLevelInitStats();
|
|
void level_start(bool isForced);
|
|
void SetControllerIndex(int index, bool isIncludePlayerOwned);
|
|
void UpdateCanShoot();
|
|
void update_player_skin();
|
|
void UpdateCostumes();
|
|
void RemoveCostume(ItemConfig_Item* item);
|
|
void ClearCostumes();
|
|
Entity_Player* GetMainTwin();
|
|
Entity_Player* GetMainPlayer();
|
|
Entity_Player* twin_get() { return twinPlayer ? twinPlayer->ToPlayer() : nullptr; }
|
|
|
|
// Items.
|
|
bool HasCollectible(int type, ItemCheck check = ITEM_CHECK_MODIFIED);
|
|
bool HasTrinket(uint32_t type, ItemCheck check = ITEM_CHECK_MODIFIED);
|
|
int GetCollectibleNum(int collectibleId, ItemCheck check = ITEM_CHECK_MODIFIED);
|
|
int GetTrinketMultiplier(uint32_t type);
|
|
bool IsInnateCollectible(int collectibleId);
|
|
void apply_innate_collectibles();
|
|
int GetActiveItemSlot(int id);
|
|
int get_seeded_variant();
|
|
int g_fuel_count();
|
|
void EvaluateItems();
|
|
void AddCacheFlags(uint32_t flags);
|
|
RNG& GetCollectibleRNG(int id);
|
|
RNG& GetTrinketRNG(int id);
|
|
static int GetBombVariant() { return 0; }
|
|
|
|
// Health and consumables.
|
|
HealthType GetHealthType();
|
|
int GetHeartLimit(bool isKeeperBypass);
|
|
int GetEffectiveMaxHearts();
|
|
int GetGreedsGulletHearts();
|
|
void AddMaxHearts(int amount, bool isIgnoreKeeper);
|
|
void AddHearts(int hearts, bool isUnknown, bool isUnknown2);
|
|
void AddSoulHearts(int amount, bool isUnknown);
|
|
void AddBlackHearts(int amount);
|
|
void AddBrokenHearts(int amount);
|
|
void AddCoins(int amount);
|
|
void AddBombs(int amount);
|
|
void AddKeys(int amount);
|
|
void ConsumableCountChanged(int bitflags);
|
|
void SyncConsumables(Entity_Player* target, uint32_t mask);
|
|
void UpdateBlackHeartMask();
|
|
void UpdateHeartDependentEffects();
|
|
void ClampGoldenHearts(bool isSkipBreak);
|
|
void ClampHeartsToLimit(HeartKind kind, int amount);
|
|
void update_bone_hearts();
|
|
void update_greeds_gullet();
|
|
bool is_dead_bird_kept();
|
|
|
|
// The frame.
|
|
void Update() override;
|
|
void Render(const Vector& offset) override;
|
|
bool RenderShadowLayer(const Vector& offset) override;
|
|
void render_pass(const Vector& offset, RenderPass pass);
|
|
void RenderGlow(const Vector& position);
|
|
void RenderBody(const Vector& position);
|
|
void RenderHead(const Vector& position);
|
|
void RenderTop(const Vector& position);
|
|
void update_body_animations();
|
|
Vector GetMovementJoystick();
|
|
Vector GetShootingJoystick();
|
|
Vector GetFlyingOffset();
|
|
bool IsFullSpriteRendering();
|
|
bool IsExtraAnimationFinished();
|
|
bool IsHeadless();
|
|
bool IsHoldingItem();
|
|
bool IsHologram();
|
|
bool IsInvisible();
|
|
Vector GetBodyMoveDirection();
|
|
|
|
void ClearReferences() override;
|
|
bool CanShutDoors() override;
|
|
bool IsValidTarget(Entity* other) override;
|
|
void ResetColor() override;
|
|
|
|
// Not reconstructed yet: each stops the game with reconstruction_missing when reached.
|
|
bool TakeDamage(float damage, uint64_t damageFlags, const EntityRef& source, int damageCountdown) override;
|
|
bool TryThrow(const EntityRef& source, const Vector& velocity, float height) override;
|
|
bool HandleCollision(Entity* collider, bool isLow) override;
|
|
void AddCollectible(int type, int charge, bool isFirstTime, int activeSlot, int varData);
|
|
void AddActiveCharge(int charge, int slot, bool isFlashHud, bool isOvercharge, bool isForce);
|
|
void RemoveCollectible(int type, bool isIgnoreModifiers, int activeSlot, bool isRemoveFromForm);
|
|
Entity_Familiar* AddWisp(int collectible, Vector position, bool isAdjustOrbitLayer, bool isDontUpdate);
|
|
void StoreGameState(GameStatePlayer* state, bool isSaveTemporaryFamiliars);
|
|
void PlayCollectibleAnim(int collectible, bool isCheckBodyLayers, std::string_view animation, int frame);
|
|
void PlayExtraAnimation(std::string_view animation, bool isUnknown);
|
|
void UseActiveItem(int item, uint32_t useFlags, int slot);
|
|
void trigger_collectible_effect_removed(ItemConfig_Item* item, int count);
|
|
|
|
private:
|
|
void stats_reset();
|
|
void tear_stats_reset();
|
|
void sprites_load();
|
|
void links_reset();
|
|
void eden_stats_roll(RNG& rng);
|
|
std::optional<bool> collectible_lent(int collectibleType, ItemConfig_Item& item);
|
|
std::optional<int> trinket_lent(uint32_t id, int multiplier);
|
|
int trinket_bonus(uint32_t id, int multiplier);
|
|
int extra_collectible_count(int collectibleId);
|
|
int conception_count(int collectibleId);
|
|
bool is_granted(int collectibleId);
|
|
Entity_Player* health_owner();
|
|
void red_hearts_add(int hearts, bool isUnknown2);
|
|
int soul_hearts_absorb(int amount);
|
|
void soul_hearts_add(int amount, bool isUnknown);
|
|
void black_hearts_add(int amount);
|
|
void hud_heart_flash();
|
|
void starting_collectible_add(int id);
|
|
void starting_trinket_add(int id);
|
|
void companions_init();
|
|
void jacobs_curse_add();
|
|
void start_position_set();
|
|
void level_items_apply(bool isForced);
|
|
void floor_maps_apply();
|
|
void floor_items_recharge();
|
|
void stem_cell_heal();
|
|
void backasswards_penalty();
|
|
void floor_rngs_reseed();
|
|
void wooden_cross_mantles_add();
|
|
void player_color_reassign(int index);
|
|
void costume_map_reset(int priority);
|
|
Vector walk_direction_update(Vector input);
|
|
void walk_velocity_update(Vector walkInput);
|
|
bool walking_items_has();
|
|
void walk_animation_update();
|
|
void head_animation_update();
|
|
void render_back(const Vector& position);
|
|
ANM2& layer_sprite(int layer);
|
|
int layer_id(int layer);
|
|
static bool is_body_layer(int layer);
|
|
bool is_evaluation_plain();
|
|
|
|
public:
|
|
int GetBatteryCharge(int slot);
|
|
void SetMinDamageCooldown(int cooldown);
|
|
int GetActiveItem(int slot);
|
|
bool AreControlsEnabled();
|
|
bool IsItemQueueEmpty();
|
|
void StopExtraAnimation();
|
|
bool HasWeaponType(int weaponType);
|
|
void moms_bracelet_grab();
|
|
void UseRedKey();
|
|
void use_card_hagalaz(RNG* rng);
|
|
int reroll_collectibles_on_damage(RNG* rng, bool isIncludeActives);
|
|
Entity_Familiar* AddItemWisp(int collectibleId, Vector position, bool isAdjustOrbitLayer);
|
|
void trigger_book_of_belial_passive(int activeId, int charges);
|
|
void TriggerBookOfVirtues(int collectibleId, int charge);
|
|
void console_spawn(int* spawnSpec, bool isAddWisp);
|
|
void update_mini_mush_costume();
|
|
void ResetDamageCooldown();
|
|
Vector SpriteScale();
|
|
bool IsP2Appearing();
|
|
ColorMod get_laser_color_copy();
|
|
uint32_t get_grid_collision_at(Vector position);
|
|
bool HasFullHearts();
|
|
void set_last_damage(uint64_t damageFlags, const EntityRef& source);
|
|
void SetSoulCharge(int amount);
|
|
void SetBloodCharge(int amount);
|
|
PocketItem& GetPocketItem(int slot);
|
|
void EnableWeaponType(int weaponType, bool isSet);
|
|
void QueueExtraAnimation(std::string_view animName);
|
|
RNG& GetPillRNG(int pillEffect);
|
|
RNG& GetCardRNG(int cardId);
|
|
uint32_t IsSubPlayer();
|
|
void release_weapons_and_effects(bool isRemoveEntities);
|
|
uint32_t InvalidateCoPlayerItems();
|
|
void cycle_spectate_target();
|
|
void trigger_max_hearts_removed(int removed);
|
|
void AddEternalHearts(int amount);
|
|
void RemoveBlackHeart(int soulHeartIndex);
|
|
bool IsBlackHeart(int heart);
|
|
void AddJarHearts(int amount);
|
|
void AddGoldenKey();
|
|
void RemoveGoldenKey();
|
|
void restore_curse_mist_backup(int* backup);
|
|
Entity* AddBlueFlies(int amount, Vector pos, Entity* target);
|
|
void RemoveBlueFly();
|
|
void AddLeprosy();
|
|
Entity* AddBoneOrbital(Vector position);
|
|
Entity* AddSwarmFlyOrbital(Vector position);
|
|
bool TryUseKey();
|
|
void AddCostume(ItemConfig_Item* item, bool isItemStateOnly);
|
|
void AddNullCostume(int costumeid);
|
|
bool IsNullItemCostumeVisible(int nullItemID, int playerSpriteLayerID);
|
|
void ClearQueueItem();
|
|
bool FlushQueueItem();
|
|
void IncrementPlayerFormCounter(int ePlayerForm, int num);
|
|
void AddPlayerFormCostume(int playerForm);
|
|
void SetItemState(int collectibleId);
|
|
void render_charge_bars(Vector renderPos);
|
|
int GetCollectibleCount();
|
|
void RespawnFamiliars();
|
|
void GetNPCTarget();
|
|
bool VoidHasCollectible(int id);
|
|
bool HasGoldenTrinket(uint32_t trinketId);
|
|
bool TryHoldTrinket(int trinketId);
|
|
int GetMaxTrinkets();
|
|
Entity_Pickup* DropTrinket(Vector position, bool isReplaceTick);
|
|
void AddTrinket(int type, bool isFirstTime);
|
|
bool TryRemoveTrinket(uint32_t id);
|
|
bool TryRemoveSmeltedTrinket(uint32_t id);
|
|
bool replace_trinket();
|
|
void SetFullHearts();
|
|
Entity* GetFocusEntity();
|
|
int GetWeaponModifiers();
|
|
void update_shooting();
|
|
TearFlags GetBombFlags(bool isRollChances);
|
|
TearFlags check_bomb_tearflags(const TearFlags& tearFlags);
|
|
void update_bomb_input();
|
|
void trigger_fire_item_effects(Vector direction, bool isShotFired);
|
|
const char* GetDeathAnimName();
|
|
Entity* GetActiveWeaponEntity();
|
|
uint32_t CanTurnHead();
|
|
float FireDelay();
|
|
void RemoveCollectibleByHistoryIndex(int index, bool isRemoved);
|
|
void TriggerCollectibleRemoved(int collectibleId);
|
|
void ClearTemporaryEffects();
|
|
int GetTotalActiveCharge(int slot);
|
|
int GetCollectibleMaxCharge(int collectibleId, int varData);
|
|
int GetActiveMaxCharge(int slot);
|
|
void SetActiveCharge(int charge, int slot);
|
|
void SetActiveVarData(int vardata, int slot);
|
|
void ControlActiveItem(int slot);
|
|
bool HasTimedItem();
|
|
void update_effects();
|
|
void update_ladder();
|
|
void trigger_npc_death(Entity* npc);
|
|
Entity_Bomb* FireBomb(Vector pos, Vector vel, Entity* source);
|
|
bool TriggerDeath(bool isCheckOnly);
|
|
void Revive();
|
|
void ReviveFromTrinket(uint32_t trinketId);
|
|
void remove_twin();
|
|
void AddPocketItem(int id, uint32_t pocketItemType);
|
|
void AddCard(int card);
|
|
void AddPill(int pillColor);
|
|
int GetCard(int slot);
|
|
int GetPill(int slot);
|
|
void SetCard(int slot, int card);
|
|
void SetPill(int slot, int pillColor);
|
|
void pocket_use_input();
|
|
void pockets_rotate();
|
|
void SwapActiveItems();
|
|
void RemovePocketItem(int slot);
|
|
void DropPocketItem(int slot, Vector pos);
|
|
void spawn_low_health_blood_splat();
|
|
void ShootCandle(Vector direction);
|
|
int GetTrinket(uint32_t slot);
|
|
void room_exit(bool isKeepHolyMantle);
|
|
void room_enter();
|
|
void TriggerNewRoom_TemporaryEffects();
|
|
void TriggerRoomClear();
|
|
bool HasPlayerForm(int playerForm);
|
|
bool CanAddCollectible(int collectibleId);
|
|
void AnimatePickup(ANM2* sprite, bool isHideShadow, std::string_view animName);
|
|
void AnimateCollectible(int collectibleId, std::string_view animName, std::string_view spriteAnimName);
|
|
void AnimateTrinket(int trinketId, std::string_view animName, std::string_view spriteAnimName);
|
|
void AnimateCard(int cardId, std::string_view animName);
|
|
void AnimatePill(int pillColor, std::string_view animName);
|
|
void AnimateTrapdoor();
|
|
void AnimateLightTravel();
|
|
void AnimatePitfallIn(bool isIgnoreEffect);
|
|
void AnimatePitfallOut();
|
|
void AnimateAppear();
|
|
void AnimateTeleport(bool isUp);
|
|
void AnimateHappy();
|
|
void AnimateSad();
|
|
void AddPrettyFly();
|
|
void PlayExtraAnimation(std::string_view animName);
|
|
void active_used_post(int slot, bool unk, int chargeBeforeUse);
|
|
void DischargeActiveItem(uint32_t slot, bool isUnknown);
|
|
void TryRemoveTrinketCostume(int trinketId);
|
|
void TryRemoveNullCostume(int nullItemId);
|
|
uint32_t GetMaxPocketItems();
|
|
void stop_costume_item_anims();
|
|
void ClearCollectibleAnim(int collectible);
|
|
bool IsCollectibleAnimFinished(int collectible, std::string_view animName);
|
|
void TriggerTrinketAdded(uint32_t trinketId, bool isFirstTime);
|
|
void TriggerTrinketRemoved(uint32_t trinketId);
|
|
void RestoreGameState(GameStatePlayer* saveState);
|
|
bool try_trigger_astral_projection();
|
|
void spawn_dark_esau(void* gameStatePlayer);
|
|
void DonateLuck(int luck);
|
|
void UseCard(int cardType, uint32_t useFlag);
|
|
void update_footprints();
|
|
void SetFootprintColor(KColor color, bool isUnknown);
|
|
bool is_footstep_triggered(int foot);
|
|
void update_pitfall();
|
|
void TryDecreaseGlowingHourglassUses(int unk1, bool isUnknown2);
|
|
bool GetMouseAimTarget(Vector& outTarget, bool isSkipNetCursor);
|
|
void update_baby_skin_effects();
|
|
void coop_baby_death_effect();
|
|
void InitBabySkin();
|
|
Entity_Laser* FireDelayedBrimstone(float angle, Entity* parent);
|
|
bool CanPickupItem();
|
|
bool IsHeldItemVisible();
|
|
void AddBlueSpider(Vector position);
|
|
Entity_Familiar* ThrowBlueSpider(Vector position, Vector target);
|
|
void RemoveBlueSpider();
|
|
int GetExtraLives();
|
|
uint32_t GetGlitchBabySubType();
|
|
bool HasInvincibility(uint64_t damageFlags, const EntityRef& source);
|
|
bool HasPoisonImmunity();
|
|
bool CanCrushRocks();
|
|
bool CanPickRedHearts();
|
|
bool CanPickSoulHearts();
|
|
bool CanPickBlackHearts();
|
|
void RemoveSkinCostume();
|
|
void ResetItemState();
|
|
void SetShootingCooldown(int cooldown);
|
|
bool NeedsCharge(int slot);
|
|
bool FullCharge(int slot, bool isForce, bool isOvercharge);
|
|
void add_random_stat_up(RNG* rng);
|
|
void preload_item_sounds();
|
|
bool CanUsePill(int pillEffect);
|
|
void UsePill(int pillEffect, int pillColor, uint32_t useFlags);
|
|
void AddDeadEyeCharge();
|
|
void ClearDeadEyeCharge();
|
|
int GetZodiacEffect();
|
|
void update_purity_glow();
|
|
void trigger_immaculate_conception(bool isCambion);
|
|
void AddImmaculateConceptionCounter(int amount);
|
|
void dash_impact();
|
|
void spawn_locusts();
|
|
Entity_Laser* SpawnMawOfVoid(int timeout);
|
|
void AddGoldenBomb();
|
|
void RemoveGoldenBomb();
|
|
void AddDollarBillEffect();
|
|
int GetCambionPregnancyLevel();
|
|
Entity* ShootRedCandle(Vector dir);
|
|
Entity* ShootBlueCandle(Vector dir);
|
|
void DoZitEffect(Vector direction);
|
|
void apply_victory_lap_penalty(uint32_t laps);
|
|
float get_voice_pitch();
|
|
void AddJarFlies(int amount);
|
|
bool IsPosInSpotLight(Vector position);
|
|
void AddGoldenHearts(int amount, bool retBool);
|
|
bool CanPickGoldenHearts();
|
|
void BreakGoldenHearts(int count);
|
|
void AddBoneHearts(int amount);
|
|
bool CanPickBoneHearts();
|
|
bool IsBoneHeart(int heart);
|
|
bool TryPreventDeath();
|
|
void apply_coop_baby_spawn_bonus();
|
|
bool WillPlayerRevive();
|
|
float GetGreedDonationBreakChance();
|
|
float GetGreedDonationJamChance(PersistentGameData& data);
|
|
void hallowed_ground_add(int count);
|
|
void resolve_tainted_soul();
|
|
void init_forgotten_twin();
|
|
Entity* spawn_forgotten_body();
|
|
bool SwapForgottenForm(bool isForce, bool isNoEffects);
|
|
bool CanRerollCollectible(int id, bool isUnknown);
|
|
void ChangePlayerType(int playerType, bool isUnknown);
|
|
void player_type_change_prepare(int newPlayerType);
|
|
bool IsLocalPlayer();
|
|
void GetGlyphOfBalanceDrop(int* variant, int* subtype);
|
|
Vector GetEnterPosition();
|
|
Entity_Familiar* AddMinisaac(Vector position, bool isPlayAnim);
|
|
uint32_t play_hurt_effects();
|
|
Entity_Player* InitTwin(int playerType);
|
|
bool TryHoldEntity(Entity* entity);
|
|
Entity* ThrowHeldEntity(Vector Velocity);
|
|
void AddFriendlyDip(int subtype, Vector position);
|
|
void ThrowFriendlyDip(int subtype, Vector position, Vector target);
|
|
void AddSoulCharge(int count);
|
|
int GetEffectiveSoulCharge();
|
|
void apply_soul_charge_to_actives(int oldSoulCharge);
|
|
void AddBloodCharge(int amount);
|
|
int GetEffectiveBloodCharge();
|
|
void blood_charge_changed(int oldBloodCharge);
|
|
void AddRottenHearts(int amount, bool isUnknown);
|
|
bool CanPickRottenHearts();
|
|
void UpdateBookOfVirtues(bool isAdded);
|
|
void trigger_vampire_charm_kill();
|
|
void AddUrnSouls(uint32_t amount);
|
|
void AddGigaBombs(int amount);
|
|
bool try_end_astral_projection();
|
|
void fire_saturnus_tears();
|
|
int GetMaxInventorySize();
|
|
bool CanAddCollectibleToInventory(int id);
|
|
void SetPocketActiveItem(int collectible, int slot, bool keepInPools);
|
|
void get_salvation_scale();
|
|
void update_suplex();
|
|
uint32_t bag_of_crafting_collect(Entity_Pickup* pickup);
|
|
static int GetMaxPoopMana();
|
|
void AddPoopMana(int amount);
|
|
void poop_spell_roll();
|
|
void UsePoopSpell(uint32_t spell);
|
|
void RecomputeWispCollectibles(Entity_Familiar* wisp);
|
|
void trigger_cracked_orb(Vector effectPos);
|
|
uint32_t AddItemCard(uint32_t itemID);
|
|
void spawn_lil_clot_familiars();
|
|
void creep_contact_add(int flags, int count);
|
|
bool spawn_ghost_corpse();
|
|
void AddCurseMistEffect();
|
|
void RemoveCurseMistEffect();
|
|
void AttachMinecart(Entity_NPC* minecart);
|
|
void add_samson_berserk_charge(int amount);
|
|
void RevivePlayerGhost();
|
|
void MorphToCoopGhost();
|
|
void reset_body_sprite();
|
|
static uint32_t* CalculateBagOfCraftingOutput(uint32_t* output, const char* bagContent, bool isUnused);
|
|
void SpawnClot(Vector pos, bool isUnknown);
|
|
bool TryForgottenThrow(Vector dir);
|
|
void ResetPlayer();
|
|
void remove_wooden_cross_mantles();
|
|
bool HasInstantDeathCurse();
|
|
void TriggerEchoChamber(uint32_t pocketItemType, int cardOrPillColor);
|
|
bool is_evil_charm_immune(EntityRef source);
|
|
void add_random_drug_item_effect();
|
|
void AddRandomMomItemEffect();
|
|
void ModelingClay_roll(RNG* rng);
|
|
void twins_duplicate_familiars(int count);
|
|
const std::string& GetName();
|
|
void TriggerRoomExit();
|
|
int GetActiveSubCharge(int slot);
|
|
int GetPoopSpell(int position);
|
|
bool HasFullHeartsAndSoulHearts();
|
|
void AddControlsCooldown(int amount);
|
|
uint64_t GetLastDamageFlags();
|
|
void CheckPoopSpellQueue(Vector position);
|
|
};
|