Files
isaac-port/src/entity_slot.h
T
shweetandClaude Opus 5.5 48933cd312 Curation round 9: floors and walls, room transitions, collision, the first enemies, saving, damage, pickups
Seven agents took over the backdrop's floor and wall rendering, room transitions (StartRoomTransition, on_leave,
room_enter), grid collision with tear hits and decal baking, Entity_NPC's core with the AI dispatch and the first
enemies (flies, Gaper, Pooter, Clotty, Horf, Dip, Spider), the run's save, player damage, PlayerManager::Update,
ShowName, pickups, slots and the common effects. Integration added LuaEngine::PostNewLevel/PostNewRoom, one shared
lua_callback_check (4 copies merged) and the enemy type range the original checks.
Under gdb a run draws its rooms with floors and walls, walks between rooms, fights Gapers with contact damage and the
damage flash, and collects pickups. Next: tears hitting enemies, pathfinding, item pedestals, death.
2891 functions taken over.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 08:24:38 -05:00

36 lines
1.1 KiB
C++

#pragma once
#include "entity.h"
// Construction and destruction (0065d130) are the defaults.
// A slot machine, beggar or other paying machine (Lua's EntitySlot), which pays out a prize: its state, the prize it
// shows and the save data its donations count into.
struct Entity_Slot : Entity
{
ANM2 prizeAnm2;
PersistentGameData* persistentData = nullptr;
int donationValue = 0;
int prizeCollectible = 0;
int prizeType = 0;
int state = 0;
uint32_t triggerTimer = 0;
int16_t shellGameAnimationIndex = 0;
int16_t timeout = 0;
int16_t unkShort1 = 0;
uint16_t touch = 0;
bool isUnknown418 = false;
bool isUnknown544 = false;
void Init(int type, int variant, int subType, uint32_t initSeed) override;
void Update() override;
void Render(const Vector& offset) override;
bool TakeDamage(float damage, uint64_t damageFlags, const EntityRef& source, int damageCountdown) override;
bool HandleCollision(Entity* collider, bool isLow) override;
void spawn_break_drops();
void SetPrizeType(int prizeType);
private:
void counter_show(int count);
};