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
+13
-13
@@ -1,4 +1,6 @@
|
||||
#include "pause_screen.h"
|
||||
#include "entity_pickup.h"
|
||||
#include "entity_player.h"
|
||||
#include "game.h"
|
||||
#include "hud.h"
|
||||
#include "kage_input.h"
|
||||
@@ -6,6 +8,7 @@
|
||||
#include "manager.h"
|
||||
#include "menu_manager.h"
|
||||
#include "platform.h"
|
||||
#include "room.h"
|
||||
#include <algorithm>
|
||||
|
||||
constexpr const char* PAUSE_ANM2 = "gfx/ui/PauseScreen_small.anm2";
|
||||
@@ -52,7 +55,6 @@ constexpr float FADE_SPEED = 0.08f;
|
||||
constexpr int FADE_TARGET_MENU = 2;
|
||||
constexpr int KEYBOARD = 0;
|
||||
constexpr int COLLECTIBLE_GLITCHED_CROWN = 689;
|
||||
constexpr unsigned int ENTITY_PICKUP = 5;
|
||||
constexpr unsigned int PICKUP_COLLECTIBLE = 100;
|
||||
|
||||
// Whether an action holds on one device, as KAGE's input manager asks.
|
||||
@@ -78,7 +80,7 @@ static void layer_show(ANM2& sprite, std::string_view name, bool isVisible)
|
||||
}
|
||||
|
||||
// Plays a pause screen sound at its volume, unless the seeds swap it for a fart.
|
||||
static void sound_play(int sound)
|
||||
static void menu_sound_play(int sound)
|
||||
{
|
||||
SoundPlay play;
|
||||
play.volume = SOUND_VOLUME;
|
||||
@@ -203,8 +205,8 @@ void PauseScreen::Show()
|
||||
state = PAUSE_MENU;
|
||||
selectedElement = PAUSE_ITEM_RESUME;
|
||||
menuSprite.Play(ANIMATION_APPEAR, PLAY_FORCED);
|
||||
completionWidget.characterId = g_game->GetPlayer(playerIdx)->_playerType;
|
||||
sound_play(SOUND_PAPER_IN);
|
||||
completionWidget.characterId = g_game->GetPlayer(playerIdx)->playerType;
|
||||
menu_sound_play(SOUND_PAPER_IN);
|
||||
|
||||
layer_show(menuSprite, LAYER_INVITE, false);
|
||||
layer_show(menuSprite, LAYER_KICK, false);
|
||||
@@ -216,7 +218,7 @@ void PauseScreen::hide()
|
||||
{
|
||||
if (state == PAUSE_HIDDEN || menuSprite.GetAnimation() == ANIMATION_DISAPPEAR) return;
|
||||
|
||||
sound_play(SOUND_PAPER_OUT);
|
||||
menu_sound_play(SOUND_PAPER_OUT);
|
||||
menuSprite.Play(ANIMATION_DISAPPEAR);
|
||||
menuSprite.overlayAnimState.SetAnimationData(nullptr);
|
||||
}
|
||||
@@ -230,7 +232,7 @@ bool PauseScreen::is_pausing()
|
||||
// The paused player's controller. Netplay is offline, so it is always a local player's.
|
||||
int PauseScreen::controller_get()
|
||||
{
|
||||
return g_game->GetPlayer(playerIdx)->_controllerIndex;
|
||||
return g_game->GetPlayer(playerIdx)->controllerIndex;
|
||||
}
|
||||
|
||||
// 009b5d20 Steps the open page, opens the menu on pause (or back on the keyboard, while no emote menu is up), runs the
|
||||
@@ -334,7 +336,7 @@ void PauseScreen::selection_confirm(int controller)
|
||||
|
||||
menuSprite.overlayAnimState.SetAnimationData(nullptr);
|
||||
Entity_Player* player = g_game->GetPlayer(0);
|
||||
if (player->_dead && player->GetExtraLives() < 1)
|
||||
if (player->isDead && player->GetExtraLives() < 1)
|
||||
reconstruction_missing("Game::DeleteSaveState 00959130: GameState::Delete on Manager's game state");
|
||||
game_fade_out();
|
||||
break;
|
||||
@@ -349,15 +351,13 @@ void PauseScreen::selection_confirm(int controller)
|
||||
void PauseScreen::animation_update()
|
||||
{
|
||||
Game& game = *g_game;
|
||||
if (state == PAUSE_HIDDEN || (game.roomTransition._mode != 0 && game.roomTransition._bossIntroBossId != 0)) return;
|
||||
if (state == PAUSE_HIDDEN || (game.roomTransition.mode != 0 && game.roomTransition.bossIntroBossId != 0)) return;
|
||||
|
||||
if (game.playerManager.FirstCollectibleOwner(COLLECTIBLE_GLITCHED_CROWN, LAZARUS_SHARE_CHECK))
|
||||
{
|
||||
EntityList_EL& entities = reinterpret_cast<EntityList*>(game.room->_entityList)->_updateEL;
|
||||
for (uint32_t i = 0; i < entities._size; i++)
|
||||
for (Entity* entity : game.room->entityList.updateEL)
|
||||
{
|
||||
Entity* entity = entities._data[i];
|
||||
if (entity->_type == ENTITY_PICKUP && entity->_variant == PICKUP_COLLECTIBLE)
|
||||
if (entity->type == ENTITY_PICKUP && entity->variant == PICKUP_COLLECTIBLE)
|
||||
static_cast<Entity_Pickup*>(entity)->update_cycle_collectible(0);
|
||||
}
|
||||
}
|
||||
@@ -384,7 +384,7 @@ void PauseScreen::animation_update()
|
||||
void PauseScreen::Render()
|
||||
{
|
||||
Game& game = *g_game;
|
||||
if (game.roomTransition._mode != 0 && game.roomTransition._bossIntroBossId != 0) return;
|
||||
if (game.roomTransition.mode != 0 && game.roomTransition.bossIntroBossId != 0) return;
|
||||
|
||||
layer_show(menuSprite, LAYER_MENU_TITLE, false);
|
||||
layer_show(menuSprite, LAYER_SEED_PAPER, game.dailyChallenge._id == 0);
|
||||
|
||||
Reference in new issue
Block a user