Curation round 2, wave B: ItemConfig, EntityConfig, mods, Manager and the KAGE platform on SDL3; boots to LuaEngine::Init
- item_config, entity_config and mod_manager take over their families as idiomatic classes (std containers, unique_ptr, bitset tear flags). Every big loader reads the imported JSON: entities2.xml gives 1349 entities. - manager.h/.cpp take over Manager (g_manager) and IsaacStartup. Members are the curated subsystems by value. - kage_graphics, kage_input and kage_sound take over KAGE's graphics (shaders, render targets, batches, PNG through stb_image), input (SDL3 keyboard, mouse, gamepads) and sound (SDL3 audio, wav and stb_vorbis ogg, pitch and volume). - source_tree.py: classes inside a namespace block in src/ headers count as taken over, and a still-generated class's vtable slot keeps its stub unless src/ defines that exact method. build/isaac opens the window, sets up GL 4.6, framebuffers and PulseAudio, logs the version, and stops at LuaEngine::Init. 522 functions taken over, boot path 156/615. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
346dc95e13
commit
28e2e48842
105 files changed
+7008
-31418
No files matched your search
+10
-8
@@ -1,5 +1,7 @@
|
||||
#include "anm2.h"
|
||||
#include "kage_graphics.h"
|
||||
#include "data.h"
|
||||
#include "manager.h"
|
||||
#include "log.h"
|
||||
#include <algorithm>
|
||||
#include <cctype>
|
||||
@@ -1257,7 +1259,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;
|
||||
}
|
||||
|
||||
@@ -1270,12 +1272,12 @@ void AnimationLayer::RenderFrame(const SpriteDraw& draw, int frameIndex, const A
|
||||
if (isChampion || isShimmering || !(flags & ANIM_RENDER_SHADER_KEPT))
|
||||
apply_sprite_shader_params(&color, 1, layer.spriteSheet.get(), nullptr);
|
||||
if (isChampion)
|
||||
((Shader*)g_currentShader)->set_uniform((uint8_t*)CHAMPION_COLOR_UNIFORM.data(), UNIFORM_COLOR_MOD,
|
||||
(void*)&animation.championColor, 0);
|
||||
layer.spriteSheet->FUN_00a128f0((uint32_t)(uintptr_t)&source, &dest, (float*)&tint);
|
||||
KAGE::Graphics::manager.currentShader->set_uniform(CHAMPION_COLOR_UNIFORM, KAGE::Graphics::UNIFORM_VEC4,
|
||||
&animation.championColor);
|
||||
layer.spriteSheet->Render(source, KAGE::Graphics::ColorQuad(dest, tint), tint);
|
||||
|
||||
std::copy(savedBlendMode.begin(), savedBlendMode.end(), g_graphicsManager_blendMode);
|
||||
shader_cache_find(0);
|
||||
KAGE::Graphics::manager.shader_default_set();
|
||||
}
|
||||
|
||||
// 00407690 Copies a sprite, sharing its file and spritesheets. The copy starts with no offset and no render flags.
|
||||
@@ -1347,7 +1349,7 @@ void ANM2::LoadGraphics()
|
||||
|
||||
ImageHandle loaded;
|
||||
Manager::LoadImage(&loaded, (uint8_t*)layer.spriteSheetPath.c_str());
|
||||
bool isValid = loaded.image && loaded.image->FUN_00a123b0() != 0;
|
||||
bool isValid = loaded.image && loaded.image->isLoaded;
|
||||
if (isValid) TextureCache::Add(loaded.image, loaded.refCount);
|
||||
|
||||
layer.spriteSheet = image_share(loaded, layer.spriteSheetPath, isValid);
|
||||
@@ -1371,8 +1373,8 @@ bool ANM2::ReplaceSpritesheet(int layerId, std::string_view path)
|
||||
// Where the original asks the file system for the swapped sheet, this looks under resources/.
|
||||
void ANM2::LoadDeliriumForm(ANM2& sprite, int type, int variant, bool isReloadAnm2)
|
||||
{
|
||||
EntityConfig_Entity* entity = isReloadAnm2 ? g_manager->_entityConfig.GetEntity(type, variant, 0) : nullptr;
|
||||
if (entity) sprite.Load(std_string_view(entity->anm2Path), GRAPHICS_DEFER);
|
||||
EntityConfig_Entity* entity = isReloadAnm2 ? g_manager->entityConfig.GetEntity(type, variant, 0) : nullptr;
|
||||
if (entity) sprite.Load(entity->anm2Path, GRAPHICS_DEFER);
|
||||
|
||||
for (int i = 0; i < (int)sprite.layerStates.size() && type != DELIRIUM_TYPE; i++)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user