Initial rodecomp source snapshot

This commit is contained in:
ragnarok-clanker 2026-10-24 00:35:19 +00:00
commit d456e8f64a
916 changed files with 156023 additions and 0 deletions

View file

@ -0,0 +1,42 @@
#include "Contents/SkillLevelConfig.h"
#include <cstdint>
// OFFSET: 0x005E6A10
// FUNCTION: fn_03930
void LoadUseSkillLevels(Json::Value& data, int* levels) {
Json::Value values = data["UseSkillInfo"];
if (!values.isNull()) {
for (auto it = values.begin(); it != values.end(); ++it) {
Json::Value& value = *it;
if (value.isObject()) {
int id = value.get("SKID", 0).asInt();
int level = value.get("SKLv", 0).asInt();
if (static_cast<std::uint32_t>(id) - 1 <= 0x1F3D) {
levels[id] = level;
}
}
}
}
}
// OFFSET: 0x005E63B0
// FUNCTION: fn_03928
void LoadHomunculusSkillLevels(Json::Value& data, int* levels) {
Json::Value values = data["HomunSkillInfo"];
if (!values.isNull()) {
for (auto it = values.begin(); it != values.end(); ++it) {
Json::Value& value = *it;
if (value.isObject()) {
int id = value.get("HomunSKID", 0).asInt();
int level = value.get("HomunSKLv", 0).asInt();
// Original subtracts in 32 bits, then signed-compares against -1;
// there is no upper bound check on the caller's storage.
std::uint32_t index = static_cast<std::uint32_t>(id) - 8000;
if (static_cast<std::int32_t>(index) > -1) {
levels[index] = level;
}
}
}
}
}