Reconstruct readable C++ and organize cohesive source subsystems

Administrative source import: native x86 compilation passed for 423 authored units. Source placement and submission states are migrated separately; this commit does not imply peer acceptance.

Previous head: 35d2a8cb36
Payload SHA256: 592f016d2730c5593bb653aa054c1e5f76a6df72c8f5a09e66f74876e2e33dee
This commit is contained in:
ragnarok-clanker 2026-10-25 07:42:41 +00:00
commit a47d20f8be
890 changed files with 11796 additions and 16664 deletions

View file

@ -0,0 +1,48 @@
#include "Contents/UserData/NormalItemSlots.h"
#include <json/value.h>
// OFFSET: 0x009A6C20
// FUNCTION: fn_13725
void NormalItemSlotWindow::Reset() {
this->x = 230;
this->y = 0;
this->width = 290;
this->height = 76;
this->show = 1;
}
// OFFSET: 0x009A6000
// FUNCTION: fn_13667
bool NormalItemSlotWindow::IsValid(int screenWidth, int screenHeight, bool active) const {
if (this->width != 290 || this->height < 43 || this->height > 175 || (this->height - 10) % 33 != 0 || (this->height == 175 && !active)) {
return false;
}
const int maxX = screenWidth - 290;
const int maxY = screenHeight - this->height;
return this->x >= 0 && this->x <= maxX && this->y >= 0 && this->y <= maxY;
}
// OFFSET: 0x005E75A0
// FUNCTION: fn_03935
void ExportNormalItemSlots(Json::Value& data, const NormalItemSlot* slots, const NormalItemSlotWindow& window, bool active) {
Json::Value values;
for (int index = 0; index < 9; ++index) {
Json::Value value;
value["ItemID"] = Json::UInt(slots[index].itemId);
value["SlotNum"] = index;
values.append(value);
}
Json::Value info;
info["SlotX"] = window.x;
info["SlotY"] = window.y;
info["SlotWidth"] = window.width;
info["SlotHeight"] = window.height;
info["SlotShow"] = window.show;
data["SlotInfo"] = info;
data["NormalItemSlot"] = values;
data["ItemSlotActive"] = active;
}