Curation round 16: Mom's Knife and the bone club, sin minibosses and death rewards, slots and beggars, NPC rendering and twelve bosses, alt path visuals, the Forgotten's flight and tainted HUDs, Sheol and the Cathedral to the credits, familiars and transformations

This commit is contained in:
shweet committed 2026-11-20 22:44:36 -05:00
1 parent 76c594f9a0
commit e9de039d0f
151 files changed
+14996 -5208

No files matched your search

+9
View File
@@ -7,6 +7,7 @@
#include "log.h"
#include "npc_ai.h"
#include "room.h"
#include <algorithm>
#include <array>
// The partitions a query bit looks in, in the order QueryRadius goes through them.
@@ -88,6 +89,14 @@ GridEntity* room_grid_entity_at(const Vector& position)
return gridIndex < 0 ? nullptr : g_game->room->GetGridEntity((uint32_t)gridIndex);
}
// 00812de0 Room::GetClampedGridIndex: the cell under a position, pulled onto the grid when off it.
int room_clamped_grid_index_get(Room& room, Vector position)
{
int column = std::max((int)((position.x - GRID_ORIGIN_X) / GRID_CELL_SIZE + 0.5f), 0);
int row = std::max((int)((position.y - GRID_ORIGIN_Y) / GRID_CELL_SIZE + 0.5f), 0);
return std::min(row, room.gridHeight - 1) * room.gridWidth + std::min(column, room.gridWidth - 1);
}
// Whether a cell takes a pickup: free of grid collision (or a pit, when allowed) and of trapdoors, stairs, pressure
// plates and teleporters.
static bool is_cell_free(Room& room, int gridIndex, const FreeSpotSearch& search)