Curation round 4: popups, Seeds/Random, Game, KeyConfigs, offline NetplayManager, Console, TextureCache, render passes

Six agents took over PopupButtons/PopupQueue/AchievementOverlay, Seeds with the global Random (now seeded from the
clock as in the original), Game (g_game exists from Manager::Init on), KeyConfigs, an offline NetplayManager, Console's
output and printing, TextureCache, the color-mod and sprite shader passes, mod shaders and reload_resource_paths. An
integration pass moved callers to the new APIs (0 errors, 0 warnings with -Wall -Wextra). build/isaac loads the 34
installed mods and stops at ScoreSheet::ScoreSheet in Game's constructor; with the remaining stubs skipped under gdb the
intro cutscene plays through and the main menu's frame loop runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shweetandClaude Opus 5.5 committed 2026-11-20 01:32:19 -05:00
1 parent ddf913f304
commit fd8b965350
110 files changed
+6500 -40129

No files matched your search

+9 -11
View File
@@ -1,8 +1,11 @@
#include "anm2.h"
#include "game.h"
#include "kage_graphics.h"
#include "data.h"
#include "manager.h"
#include "log.h"
#include "render_passes.h"
#include "texture_cache.h"
#include <algorithm>
#include <cctype>
#include <cmath>
@@ -561,12 +564,7 @@ void AnmCache::Preload(std::string_view path)
cacheFiles[key] = file;
}
for (const LayerData& layer : cacheFiles[key]->layers)
{
if (TextureCache::Has((uint8_t*)layer.spriteSheetPath.c_str())) continue;
KAGE::Graphics::ImagePtr image = Manager::LoadImage(layer.spriteSheetPath);
TextureCache::Add(image.get(), nullptr);
}
for (const LayerData& layer : cacheFiles[key]->layers) TextureCache::Preload(layer.spriteSheetPath);
}
// 0040e470 Drops every file no sprite holds.
@@ -1097,7 +1095,7 @@ DestinationQuad AnimationLayer::GetDestQuad(const AnimationFrame& frame, const L
bool isFlipY = animation.isFlipY != is_reflection_pass();
Vector layerScale = vector_make(frame.scale.x * layer.size.x, frame.scale.y * layer.size.y);
Vector spriteScale = animation.scale;
Vector shake = is_screen_shake_applied() && g_game ? g_game->_screenShakeOffset : Vector{};
Vector shake = is_screen_shake_applied() && g_game ? g_game->screenShakeOffset : Vector{};
float layerRotation = frame.rotation + layer.rotation;
float spriteRotation = animation.rotation;
float pivotX = frame.pivot.x;
@@ -1177,7 +1175,7 @@ static ColorMod layer_color_get(const AnimationFrame& frame, const LayerState& l
if (is_reflection_pass())
{
color._tint[3] *= HALF;
if (g_game) color._tint[3] *= g_game->_room->_waterAmount;
if (g_game) color._tint[3] *= g_game->room->_waterAmount;
}
return color;
}
@@ -1195,7 +1193,7 @@ static void procedural_item_turn(SourceQuad& source, const AnimationFrame& frame
rng._shift1 = PROCEDURAL_SHIFTS[0];
rng._shift2 = PROCEDURAL_SHIFTS[1];
rng._shift3 = PROCEDURAL_SHIFTS[2];
std::memcpy(&renderTarget, g_game->_proceduralItemManager._renderTarget, sizeof(renderTarget));
std::memcpy(&renderTarget, g_game->proceduralItemManager._renderTarget, sizeof(renderTarget));
if (layer.spriteSheet.get() == renderTarget)
center = vector_make(center.x + layer.cropOffset.x, center.y + layer.cropOffset.y);
@@ -1230,7 +1228,7 @@ void AnimationLayer::RenderFrame(const SpriteDraw& draw, int frameIndex, const A
if (isShimmering)
{
bool isGameTime = !(flags & ANIM_RENDER_IGNORE_GAME_TIME);
int frameCount = isGameTime ? g_game->_frameCount : (int)(g_manager->framecount / 2);
int frameCount = isGameTime ? g_game->frameCount : (int)(g_manager->framecount / 2);
color._colorize[3] = (float)(frameCount % SHIMMER_STEPS) / SHIMMER_STEPS;
}
@@ -1241,7 +1239,7 @@ void AnimationLayer::RenderFrame(const SpriteDraw& draw, int frameIndex, const A
tint._alpha = color._tint[3];
tint._unk = 0;
if (isChampion || isShimmering || !(flags & ANIM_RENDER_SHADER_KEPT))
apply_sprite_shader_params(&color, 1, layer.spriteSheet.get(), nullptr);
apply_sprite_shader_params(color, SPRITE_SHADER_COLOR_APPLY, *layer.spriteSheet);
if (isChampion)
KAGE::Graphics::manager.currentShader->set_uniform(CHAMPION_COLOR_UNIFORM, KAGE::Graphics::UNIFORM_VEC4,
&animation.championColor);