Curation round 7: Game::Start, level generation, Room, Camera, the Entity hierarchy, Entity_Player, the run frame
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>
This commit is contained in:
1 parent
addd027977
commit
b85591bdf4
146 files changed
+20124
-200863
No files matched your search
+19
-11
@@ -1,6 +1,14 @@
|
||||
#include "lua_engine.h"
|
||||
#include "classes.h"
|
||||
#include "data.h"
|
||||
#include "entity_bomb.h"
|
||||
#include "entity_familiar.h"
|
||||
#include "entity_knife.h"
|
||||
#include "entity_npc.h"
|
||||
#include "entity_pickup.h"
|
||||
#include "entity_player.h"
|
||||
#include "entity_projectile.h"
|
||||
#include "entity_tear.h"
|
||||
#include "game.h"
|
||||
#include "manager.h"
|
||||
#include "platform.h"
|
||||
@@ -406,56 +414,56 @@ int LuaEngine::Isaac_GetItemIdByName(std::string_view name)
|
||||
// 00862250 Runs MC_PRE_BOMB_COLLISION, filtered by the bomb's variant.
|
||||
LuaResult LuaEngine::PreBombCollision(Entity_Bomb* bomb, Entity* collider, bool isLow)
|
||||
{
|
||||
CallbackRun run = {"PreBombCollision", MC_PRE_BOMB_COLLISION, (int)bomb->_variant};
|
||||
CallbackRun run = {"PreBombCollision", MC_PRE_BOMB_COLLISION, (int)bomb->variant};
|
||||
return collision_run(*this, run, {bomb, LUA_CLASS_BOMB}, collider, isLow);
|
||||
}
|
||||
|
||||
// 008610d0 Runs MC_PRE_FAMILIAR_COLLISION, filtered by the familiar's variant.
|
||||
LuaResult LuaEngine::PreFamiliarCollision(Entity_Familiar* familiar, Entity* collider, bool isLow)
|
||||
{
|
||||
CallbackRun run = {"PreFamiliarCollision", MC_PRE_FAMILIAR_COLLISION, (int)familiar->_variant};
|
||||
CallbackRun run = {"PreFamiliarCollision", MC_PRE_FAMILIAR_COLLISION, (int)familiar->variant};
|
||||
return collision_run(*this, run, {familiar, LUA_CLASS_FAMILIAR}, collider, isLow);
|
||||
}
|
||||
|
||||
// 00861c40 Runs MC_PRE_KNIFE_COLLISION, filtered by the knife's subtype.
|
||||
LuaResult LuaEngine::PreKnifeCollision(Entity_Knife* knife, Entity* collider, bool isLow)
|
||||
{
|
||||
CallbackRun run = {"PreKnifeCollision", MC_PRE_KNIFE_COLLISION, (int)knife->_subtype};
|
||||
CallbackRun run = {"PreKnifeCollision", MC_PRE_KNIFE_COLLISION, (int)knife->subtype};
|
||||
return collision_run(*this, run, {knife, LUA_CLASS_KNIFE}, collider, isLow);
|
||||
}
|
||||
|
||||
// 00860d70 Runs MC_PRE_NPC_COLLISION, filtered by the NPC's type.
|
||||
LuaResult LuaEngine::PreNPCCollision(Entity_NPC* npc, Entity* collider, bool isLow)
|
||||
{
|
||||
CallbackRun run = {"PreNPCCollision", MC_PRE_NPC_COLLISION, (int)npc->_type};
|
||||
CallbackRun run = {"PreNPCCollision", MC_PRE_NPC_COLLISION, (int)npc->type};
|
||||
return collision_run(*this, run, {npc, LUA_CLASS_NPC}, collider, isLow);
|
||||
}
|
||||
|
||||
// 008631b0 Runs MC_PRE_PICKUP_COLLISION, filtered by the pickup's variant.
|
||||
LuaResult LuaEngine::PrePickupCollision(Entity_Pickup* pickup, Entity* collider, bool isLow)
|
||||
{
|
||||
CallbackRun run = {"PrePickupCollision", MC_PRE_PICKUP_COLLISION, (int)pickup->_variant};
|
||||
CallbackRun run = {"PrePickupCollision", MC_PRE_PICKUP_COLLISION, (int)pickup->variant};
|
||||
return collision_run(*this, run, {pickup, LUA_CLASS_PICKUP}, collider, isLow);
|
||||
}
|
||||
|
||||
// 00864300 Runs MC_PRE_PLAYER_COLLISION, filtered by the player's variant.
|
||||
LuaResult LuaEngine::PrePlayerCollide(Entity_Player* player, Entity* collider, bool isLow)
|
||||
{
|
||||
CallbackRun run = {"PrePlayerCollision", MC_PRE_PLAYER_COLLISION, (int)player->_variant};
|
||||
CallbackRun run = {"PrePlayerCollision", MC_PRE_PLAYER_COLLISION, (int)player->variant};
|
||||
return collision_run(*this, run, {player, LUA_CLASS_PLAYER}, collider, isLow);
|
||||
}
|
||||
|
||||
// 00862760 Runs MC_PRE_PROJECTILE_COLLISION, filtered by the projectile's variant.
|
||||
LuaResult LuaEngine::PreProjectileCollision(Entity_Projectile* projectile, Entity* collider, bool isLow)
|
||||
{
|
||||
CallbackRun run = {"PreProjectileCollision", MC_PRE_PROJECTILE_COLLISION, (int)projectile->_variant};
|
||||
CallbackRun run = {"PreProjectileCollision", MC_PRE_PROJECTILE_COLLISION, (int)projectile->variant};
|
||||
return collision_run(*this, run, {projectile, LUA_CLASS_PROJECTILE}, collider, isLow);
|
||||
}
|
||||
|
||||
// 00862d70 Runs MC_PRE_TEAR_COLLISION, filtered by the tear's variant.
|
||||
LuaResult LuaEngine::PreTearCollision(Entity_Tear* tear, Entity* collider, bool isLow)
|
||||
{
|
||||
CallbackRun run = {"PreTearCollision", MC_PRE_TEAR_COLLISION, (int)tear->_variant};
|
||||
CallbackRun run = {"PreTearCollision", MC_PRE_TEAR_COLLISION, (int)tear->variant};
|
||||
return collision_run(*this, run, {tear, LUA_CLASS_TEAR}, collider, isLow);
|
||||
}
|
||||
|
||||
@@ -482,7 +490,7 @@ int LuaEngine::GetPillEffect(int pillEffect, int pillColor)
|
||||
// 00866140 Runs MC_POST_ENTITY_KILL, filtered by the entity's type.
|
||||
void LuaEngine::PostEntityKill(Entity* entity)
|
||||
{
|
||||
callback_notify(*this, {"PostEntityKill", MC_POST_ENTITY_KILL, (int)entity->_type},
|
||||
callback_notify(*this, {"PostEntityKill", MC_POST_ENTITY_KILL, (int)entity->type},
|
||||
LuaObject{entity, LUA_CLASS_ENTITY});
|
||||
}
|
||||
|
||||
@@ -495,14 +503,14 @@ void LuaEngine::PostGameStart(bool isContinued)
|
||||
// 00861890 Runs MC_POST_KNIFE_INIT, filtered by the knife's subtype.
|
||||
void LuaEngine::PostKnifeInit(Entity_Knife* knife)
|
||||
{
|
||||
callback_notify(*this, {"PostKnifeInit", MC_POST_KNIFE_INIT, (int)knife->_subtype},
|
||||
callback_notify(*this, {"PostKnifeInit", MC_POST_KNIFE_INIT, (int)knife->subtype},
|
||||
LuaObject{knife, LUA_CLASS_KNIFE});
|
||||
}
|
||||
|
||||
// 00864050 Runs MC_POST_PLAYER_INIT, filtered by the player's variant.
|
||||
void LuaEngine::PostPlayerInit(Entity_Player* player)
|
||||
{
|
||||
callback_notify(*this, {"PostPlayerInit", MC_POST_PLAYER_INIT, (int)player->_variant},
|
||||
callback_notify(*this, {"PostPlayerInit", MC_POST_PLAYER_INIT, (int)player->variant},
|
||||
LuaObject{player, LUA_CLASS_PLAYER});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user