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
@@ -1,6 +1,7 @@
|
||||
#include "classes.h"
|
||||
#include "data.h"
|
||||
#include "log.h"
|
||||
#include "manager.h"
|
||||
#include "options_config.h"
|
||||
#include <SDL3/SDL_filesystem.h>
|
||||
#include <SDL3/SDL_iostream.h>
|
||||
@@ -253,15 +254,15 @@ void OptionsConfig::Load(std::string_view path)
|
||||
if (!map) return Save();
|
||||
|
||||
KeyValueMap& values = *map;
|
||||
g_manager->validate_language(keyvalue_map_read_int(values, "Language", 0));
|
||||
g_manager->validate_language();
|
||||
SetMusicVolume(keyvalue_map_read_float(values, "MusicVolume", musicVolume));
|
||||
if (!is_keyvalue_map_true(values, "MusicEnabled", true)) g_manager->_musicManager._isEnabled = false;
|
||||
if (!is_keyvalue_map_true(values, "MusicEnabled", true)) g_manager->musicManager._isEnabled = false;
|
||||
|
||||
options_visit(*this, [&](const char* key, auto& value) { option_read(values, key, value); });
|
||||
option_read(values, "Brightness", brightness);
|
||||
option_read(values, "Contrast", contrast);
|
||||
isAscentVoiceover = keyvalue_map_read_int(values, "AscentVoiceOver", 1) != 0;
|
||||
g_manager->_sfxManager.ClearVolumeModifier();
|
||||
g_manager->sfxManager.ClearVolumeModifier();
|
||||
|
||||
onlinePlayerVolume = std::clamp(onlinePlayerVolume, 0, ONLINE_LEVEL_MAX);
|
||||
onlinePlayerOpacity = std::clamp(onlinePlayerOpacity, 0, ONLINE_LEVEL_MAX);
|
||||
@@ -281,9 +282,9 @@ void OptionsConfig::Save()
|
||||
{
|
||||
std::string text = "[Options]\r\n";
|
||||
|
||||
line_write(text, "Language", g_manager->_stringTable._language);
|
||||
line_write(text, "Language", g_manager->stringTable.language);
|
||||
line_write(text, "MusicVolume", musicVolume);
|
||||
line_write(text, "MusicEnabled", g_manager->_musicManager._isEnabled);
|
||||
line_write(text, "MusicEnabled", g_manager->musicManager._isEnabled);
|
||||
options_visit(*this, [&](const char* key, auto value) { line_write(text, key, value); });
|
||||
text += "\r\n";
|
||||
if (SDL_SaveFile(optionsIniFilePath.c_str(), text.data(), text.size())) return;
|
||||
@@ -295,7 +296,7 @@ void OptionsConfig::Save()
|
||||
// 00925c00 Sets the music volume, turning music off at 0, and moves the playing channel straight to it.
|
||||
void OptionsConfig::SetMusicVolume(float volume)
|
||||
{
|
||||
MusicManager& music = g_manager->_musicManager;
|
||||
MusicManager& music = g_manager->musicManager;
|
||||
MusicChannel& channel = music._channels[music._currentChannel];
|
||||
|
||||
musicVolume = volume;
|
||||
|
||||
Reference in new issue
Block a user