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

+25 -5
View File
@@ -2,6 +2,7 @@
#include "entity.h"
#include "anm2.h"
#include "entity_projectile.h"
#include "path_finder.h"
#include <deque>
#include <vector>
@@ -97,11 +98,23 @@ enum ChampionColor : int
CHAMPION_COUNT = 26
};
// Mask of Infamy's hit color, and Singe's ball variant.
constexpr ColorMod INFAMY_COLOR = {{1, 1, 1, 1}, {0, 0, 0, 0}, {64 / 255.0f, 64 / 255.0f, 128 / 255.0f}};
constexpr int SINGE_BALL = 1;
// How far apart a line check samples.
constexpr float LINE_STEP = 10;
// The Sucker's Bulb and Bloodfly variants.
constexpr int SUCKER_BULB = 5;
constexpr int SUCKER_BLOODFLY = 7;
// Construction (0043ef30) is the default, but for the circle angle it draws at random.
// How FireProjectiles shoots (Lua's ProjectileParams): the shots' variant, look, fall, homing and change, and the
// spread they leave in.
struct ProjectileParams
{
ProjectileHook motionHook = nullptr;
ColorMod color = COLOR_DEFAULT;
Vector fireDirectionLimit{};
Vector positionOffset{};
@@ -121,7 +134,6 @@ struct ProjectileParams
float homingStrength = 1;
float scale = 1;
float spread = 1;
float unknownA0 = 0;
float velocityMulti = 1;
int changeTimeout = 30;
int variant = 0;
@@ -277,7 +289,7 @@ struct Entity_NPC : Entity
void update_physics();
void apply_velocity(char isInterpolated);
void update_move_direction_anim();
void update_blood_guide_gibs(float* nullFrame);
void update_blood_guide_gibs(const NullFrame& guide);
void spawn_damage_numbers();
void update_damage_history();
void status_overlay_render(const Vector& offset);
@@ -303,8 +315,6 @@ struct Entity_NPC : Entity
static Entity_NPC* ThrowSpider(const Vector& position, Entity* spawner, Vector targetPos, bool isBig,
float yOffset);
void player_contact(Entity_Player& player);
void enemy_contact(Entity& other);
void PlayDeathEffects();
int death_burst_get();
void trigger_kill_item_effects();
@@ -344,7 +354,6 @@ struct Entity_NPC : Entity
void RenderSegmentLink(const Vector& offset, bool isShadow);
void CreateBling();
void CreateGoldParticles(uint32_t count);
void* shopkeeper_get_loot(void* outLoot, bool isShouldAdvance);
void* fireplace_get_loot(void* outLoot, bool isShouldAdvance);
void on_player_damaged();
static int FindTargetPit(const Vector& pos1, const Vector& pos2, uint32_t pitIndex);
@@ -356,6 +365,16 @@ struct Entity_NPC : Entity
extern bool g_isChampionRollSkipped;
// Room::CheckLine's modes: a 10 wide band for walkers, the line's own cells, and the band for shots (over pits).
// A threshold of 999 lets any grid path pass.
enum LineCheckMode : int
{
LINE_MODE_GROUND = 0,
LINE_MODE_CELL = 1,
LINE_MODE_PROJECTILE = 3
};
constexpr int LINE_CHECK_THRESHOLD = 999;
// Game's, Room's and PlayerManager's queries the enemies need, until those classes carry them.
Entity_Player* game_nearest_player(const Vector& position);
bool game_is_enemy_erased(Entity& entity);
@@ -365,4 +384,5 @@ Entity* game_nearest_target_player(const Vector& position, Entity* source, bool
void game_shake_screen(int timeout);
bool game_is_hard_mode();
uint32_t room_grid_collision_at(const Vector& position);
ColorMod champion_sprite_color_get(int championColor);
bool room_check_line(const Vector& start, const Vector& end, int mode, int gridPathThreshold);