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
+15
-14
@@ -1,9 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "anm2.h"
|
||||
#include "boss_pool.h"
|
||||
#include "challenge_params.h"
|
||||
#include "console.h"
|
||||
#include "deathmatch_manager.h"
|
||||
#include "game_state.h"
|
||||
#include "generic_prompt.h"
|
||||
#include "hud.h"
|
||||
#include "item_pool.h"
|
||||
@@ -19,6 +21,7 @@
|
||||
#include "procedural_item_manager.h"
|
||||
#include "revive_player_menu.h"
|
||||
#include "room_config.h"
|
||||
#include "room_transition.h"
|
||||
#include "score_sheet.h"
|
||||
#include "seeds.h"
|
||||
#include <array>
|
||||
@@ -28,7 +31,6 @@
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
constexpr int BACKWARDS_STAGE_COUNT = 7;
|
||||
constexpr int GLOWING_HOURGLASS_SLOTS = 2;
|
||||
constexpr int GIANTBOOK_ENTRY_COUNT = 48;
|
||||
constexpr int BOSS_OVERLAY_COUNT = 5;
|
||||
@@ -53,10 +55,13 @@ enum Difficulty : uint32_t
|
||||
// The run's state flags (Lua's GameStateFlag) the curated code reads, by bit.
|
||||
enum GameStateFlag : int
|
||||
{
|
||||
GAME_STATE_DEVILROOM_VISITED = 6,
|
||||
GAME_STATE_HEAVEN_PATH = 19,
|
||||
GAME_STATE_BOSSRUSH_DONE = 33,
|
||||
GAME_STATE_BOSSRUSH_DOOR_SPAWNED = 38,
|
||||
GAME_STATE_BLUEWOMB_DOOR_SPAWNED = 39,
|
||||
GAME_STATE_BLUEWOMB_DONE = 40,
|
||||
GAME_STATE_SECRET_PATH = 44,
|
||||
GAME_STATE_BACKWARDS_PATH = 48
|
||||
};
|
||||
|
||||
@@ -122,19 +127,11 @@ struct EntitySpawn
|
||||
uint32_t seed = 0;
|
||||
};
|
||||
|
||||
// A boss by type and variant, as the run's encountered list holds it.
|
||||
struct BossId
|
||||
// Whether a fade in shows the loading icon.
|
||||
enum FadeIcon
|
||||
{
|
||||
int type = 0;
|
||||
int variant = 0;
|
||||
};
|
||||
|
||||
// An enemy the Eraser removed for the rest of the run.
|
||||
struct ErasedEnemy
|
||||
{
|
||||
int type = 0;
|
||||
int subtype = 0;
|
||||
int variant = 0;
|
||||
FADE_ICON_HIDE,
|
||||
FADE_ICON_SHOW
|
||||
};
|
||||
|
||||
// The run (g_game): the floor and its rooms (Level, the front of the class), the configs and pools a run
|
||||
@@ -155,7 +152,7 @@ public:
|
||||
Console console;
|
||||
std::unique_ptr<EntityFactory> entityFactory = std::make_unique<EntityFactory>();
|
||||
PreloadManager preloadManager;
|
||||
BossPool bossPool{};
|
||||
BossPool bossPool;
|
||||
PlayerManager playerManager{};
|
||||
Ambush ambush{};
|
||||
DeathmatchManager deathmatchManager{};
|
||||
@@ -281,6 +278,9 @@ public:
|
||||
void level_reset();
|
||||
void create_render_surfaces();
|
||||
|
||||
void Start(int playerType, uint32_t startChallenge, const Seeds& seeds, Difficulty startDifficulty);
|
||||
void Fadein(float speed, FadeIcon icon, KColor color);
|
||||
void store_game_state(GameState& state);
|
||||
static void Exit(bool isSaving);
|
||||
void Update();
|
||||
void Render();
|
||||
@@ -294,3 +294,4 @@ public:
|
||||
};
|
||||
|
||||
void coop_awards_load(std::array<CoopAward, COOP_AWARD_COUNT>& awards);
|
||||
void pause_screen_reset(PauseScreen& pauseScreen);
|
||||
Reference in new issue
Block a user