Curation round 12: basement enemies, projectiles, tear flags, lighting and blend modes, actives, boss deaths, familiars, shops and secret rooms

This commit is contained in:
shweet committed 2026-11-20 14:25:15 -05:00
1 parent 698eeb74e9
commit f8ce24fc6c
146 files changed
+16389 -3104

No files matched your search

+78 -5
View File
@@ -4,23 +4,31 @@
#include "anm2.h"
#include <vector>
// Lua's TearFlags bits that the entity code reads (bit 100, a hit through cooldowns, has no Lua name).
// Lua's TearFlags bits the game reads. Bits 84 and 101 to 103 have no Lua name: It Hurts' creep on death, flags
// swapped in on an interval, a speed reset on an interval, and steering back toward the parent.
enum TearFlagBit : int
{
TEAR_SPECTRAL = 0,
TEAR_PIERCING = 1,
TEAR_HOMING = 2,
TEAR_SLOW = 3,
TEAR_POISON = 4,
TEAR_FREEZE = 5,
TEAR_SPLIT = 6,
TEAR_GROW = 7,
TEAR_BOOMERANG = 8,
TEAR_PERSISTENT = 9,
TEAR_WIGGLE = 10,
TEAR_MULLIGAN = 11,
TEAR_EXPLOSIVE = 12,
TEAR_CHARM = 13,
TEAR_CONFUSION = 14,
TEAR_HP_DROP = 15,
TEAR_ORBIT = 16,
TEAR_WAIT = 17,
TEAR_QUADSPLIT = 18,
TEAR_BOUNCE = 19,
TEAR_FEAR = 20,
TEAR_SHRINK = 21,
TEAR_BURN = 22,
TEAR_ATTRACTOR = 23,
@@ -32,6 +40,7 @@ enum TearFlagBit : int
TEAR_BUTT_BOMB = 29,
TEAR_SQUARE = 30,
TEAR_GLOW = 31,
TEAR_GISH = 32,
TEAR_MYSTERIOUS_LIQUID_CREEP = 33,
TEAR_SHIELDED = 34,
TEAR_GLITTER_BOMB = 35,
@@ -39,13 +48,21 @@ enum TearFlagBit : int
TEAR_STICKY = 37,
TEAR_CONTINUUM = 38,
TEAR_LIGHT_FROM_HEAVEN = 39,
TEAR_COIN_DROP = 40,
TEAR_BLACK_HP_DROP = 41,
TEAR_TRACTOR_BEAM = 42,
TEAR_GODS_FLESH_FLAG = 43,
TEAR_GREED_COIN = 44,
TEAR_CROSS_BOMB = 45,
TEAR_BIG_SPIRAL = 46,
TEAR_PERMANENT_CONFUSION = 47,
TEAR_BOOGER_FLAG = 48,
TEAR_EGG_FLAG = 49,
TEAR_ACID = 50,
TEAR_BONE_FLAG = 51,
TEAR_BELIAL_FLAG = 52,
TEAR_MIDAS = 53,
TEAR_NEEDLE_FLAG = 54,
TEAR_JACOBS = 55,
TEAR_HORN = 56,
TEAR_LASER = 57,
@@ -53,24 +70,52 @@ enum TearFlagBit : int
TEAR_ABSORB = 59,
TEAR_LASERSHOT = 60,
TEAR_HYDROBOUNCE = 61,
TEAR_BURSTSPLIT = 62,
TEAR_CREEP_TRAIL = 63,
TEAR_PUNCH = 64,
TEAR_ICE_FLAG = 65,
TEAR_MAGNETIZE = 66,
TEAR_BAIT = 67,
TEAR_OCCULT = 68,
TEAR_ORBIT_ADVANCED = 69,
TEAR_ROCK_FLAG = 70,
TEAR_TURN_HORIZONTAL = 71,
TEAR_BLOOD_BOMB = 72,
TEAR_ECOLI = 73,
TEAR_COIN_DROP_DEATH = 74,
TEAR_BRIMSTONE_BOMB = 75,
TEAR_RIFT = 76,
TEAR_SPORE_FLAG = 77,
TEAR_GHOST_BOMB = 78,
TEAR_CARD_DROP_DEATH = 79,
TEAR_RUNE_DROP_DEATH = 80,
TEAR_TELEPORT = 81,
TEAR_DECELERATE = 82,
TEAR_ACCELERATE = 83,
TEAR_BLOOD_CREEP = 84,
TEAR_THROUGH_COOLDOWN = 100,
TEAR_INTERVAL_FLAGS = 101,
TEAR_INTERVAL_SPEED = 102,
TEAR_PARENT_STEER = 103,
TEAR_BOUNCE_WALLSONLY = 104,
TEAR_NO_GRID_DAMAGE = 105,
TEAR_BACKSTAB = 106,
TEAR_FETUS_SWORD = 107,
TEAR_FETUS_BONE = 108,
TEAR_FETUS_KNIFE = 109,
TEAR_FETUS_TECHX = 110,
TEAR_FETUS_TECH = 111,
TEAR_FETUS_BRIMSTONE = 112,
TEAR_FETUS_BOMBER = 113,
TEAR_FETUS_FLAG = 114,
TEAR_REROLL_ROCK_WISP = 115,
TEAR_MOM_STOMP_WISP = 116,
TEAR_ENEMY_TO_WISP = 117,
TEAR_REROLL_ENEMY = 118,
TEAR_GIGA_BOMB = 119,
TEAR_EXTRA_GORE = 120,
TEAR_RAINBOW = 121,
TEAR_DETONATE = 122,
TEAR_CHAIN = 123,
TEAR_DARK_MATTER_FLAG = 124,
TEAR_GOLDEN_BOMB = 125,
@@ -141,17 +186,27 @@ enum TearDeath : uint32_t
TEAR_DEATH_WALL = 1 << 1,
TEAR_DEATH_FLOOR = 1 << 2,
TEAR_DEATH_ENTITY = 1 << 3,
TEAR_DEATH_SHRUNK = 1 << 4,
TEAR_DEATH_EXPLOSION = 1 << 5,
TEAR_DEATH_FORCED = 1 << 6
};
// What tears and projectiles share: the crawlspace sink, the hover over the floor and the poofs' volumes.
constexpr float CRAWLSPACE_HEIGHT_MAX = -5.1f;
constexpr float CRAWLSPACE_SINK_HEIGHT = -10;
constexpr float CRAWLSPACE_SINK_SPEED = 0.5f;
constexpr float HOVER_FLOOR_DISTANCE = 8.5f;
constexpr float HOVER_OFFSET_LIFT = -15;
constexpr float POOF_VOLUME_SMALL = 0.85f;
constexpr float POOF_VOLUME_TINY = 0.7f;
// Construction and destruction (00665ea0, 00665cf0) are the defaults.
// Field accessors (004177c0, 00431750, 00435e50, 00456440, 004aade0, 00557cd0, 0060ccb0, 0060ccc0, 0060ccd0,
// 0060cd00, 0085dd60, 0085dd70, 0085dd90) are the public fields.
// A player's tear (Lua's EntityTear): its height and fall, scale and damage, the tear flags that change how it flies
// and hits, the entity it sticks to, and the tears and lasers it links to.
// Only a plain tear is reconstructed yet: Update, Interpolate and HandleCollision stop at most tear flags and special
// variants.
// The flags of the common items fly and hit. The rest of the flags and the special variants stop the game in Update,
// Interpolate and ApplyTearFlagEffects until reconstructed.
struct Entity_Tear : Entity
{
ANM2 deadEyeANM2;
@@ -197,6 +252,7 @@ struct Entity_Tear : Entity
bool isCanTriggerStreakEnd = false;
bool isFireSoundMuted = false;
bool isFireSoundPending = false;
bool isGridTouched = false;
bool isHovering = false;
bool isMultidimensionalTouched = false;
bool isPrismTouched = false;
@@ -210,8 +266,9 @@ struct Entity_Tear : Entity
bool HandleCollision(Entity* collider, bool isLow) override;
Entity_Player* GetRootPlayer();
void apply_wiggle(float strength);
void update_wiggle();
void wiggle_apply(float strength);
void spiral_apply(float strength);
void big_spiral_apply(float strength);
void play_fire_sound();
float get_height_offset_y(float tearHeight);
void SetHeight(float tearHeight);
@@ -236,9 +293,25 @@ private:
float animation_update();
bool hold_update();
void wait_update();
void death_creep_spawn();
void death_update();
void quadsplit_fire();
void blood_stains_spawn();
void flight_update();
void square_turn();
void homing_update();
float size_flags_update();
void spectral_update();
void boomerang_pull();
void rotation_update(Entity_Player* player);
void floor_hit();
void grid_hit();
void bounce_hit();
void turn_horizontal_update(Vector previous);
void fall_update();
void split_fire(bool isRising);
void bone_shards_fire(bool isRising);
void child_setup(Entity_Tear& child, TearFlags flags, float alpha);
};
float worm_multiplier_get(Entity_Player* player, int flag);