Files
SatyandClaude Opus 5.5 7c7f474658 FrameXML: port XMLTree, FrameXML and LoadXML TUs
XMLTree.cpp (0x8145B0-0x814E40, XMLTree_GetRoot at 0x8BE770), FrameXML.cpp
(0x812530-0x8145A3) and LoadXML.cpp (0x814E40-0x816767, name guessed: no
__FILE__ string). LoadXML_AnimGroup and Create_SimpleMovieFrame stay
declared until their Frame classes exist.

XMLNode allocates from the CDataAllocator at 0xD3F718; CScriptRegion derives
from CScriptObject and CLayoutFrame (second vtable at +0x20); the attribute
array element is CXMLAttribute. Expat.h declares the expat API by hand until
expat is vendored.

Shared additions: Frame enums (FRAME_STRATA, ORIENTATION, SimpleAnim*,
ANCHORPOINT renamed FRAMEPOINT), Frame class vtable slots/constructors/
allocators and four shell classes, EGxBlend, MD5_CTX, one stpl.h instance.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-27 00:49:59 +02:00

70 lines
1.6 KiB
C++

#ifndef ENGINE_SOURCE_FRAMEXML_XMLTREE_H
#define ENGINE_SOURCE_FRAMEXML_XMLTREE_H
#include <cstddef>
#include <cstdint>
#include "Engine/Source/Base/CDataAllocator.h"
#include "Engine/Source/Base/RCString.h"
#include "Engine/Source/Storm/H/stpl.h"
class CXMLAttribute;
class XMLNode;
class XMLNodeData;
struct XMLTree;
struct POSITION {
/* 0000 */ uint32_t m_lineNumber;
/* 0004 */ uint32_t m_columnNumber;
};
class CXMLAttribute {
public:
/* 0000 */ RCString m_name;
/* 000C */ RCString m_value;
};
class XMLNodeData {
public:
virtual ~XMLNodeData();
virtual void Release();
};
class XMLNode {
public:
/* 0000 */ XMLNodeData* m_userData;
/* 0004 */ XMLNode* m_parent;
/* 0008 */ XMLNode* m_child;
/* 000C */ RCString m_name;
/* 0018 */ char* m_body;
/* 001C */ uint32_t m_bodyLen;
/* 0020 */ TSGrowableArray<CXMLAttribute> m_attributes;
/* 0030 */ uint32_t m_offset;
/* 0034 */ XMLNode* m_next;
static CDataAllocator s_allocator;
static void* operator new(size_t bytes) noexcept;
static void operator delete(void* ptr);
XMLNode(XMLNode* parent, const char* name);
~XMLNode();
void Detach();
const char* GetAttributeByName(const char* name);
XMLNode* GetChildByName(const char* name);
void Init(XMLNode* parent, const char* name);
void Recycle();
void SetAttribute(const char* name, const char* value);
};
struct XMLTree {
/* 0000 */ XMLNode* m_root;
/* 0004 */ XMLNode* m_current;
};
void XMLTree_Cleanup();
void XMLTree_Free(XMLTree* tree);
XMLNode* XMLTree_GetRoot(XMLTree* tree);
XMLTree* XMLTree_Load(const char* data, uint32_t size);
#endif