Vendored Dependencies
OpenWarcraft compiles its own Lua and XML parser from checked-in sources, matching Quake 3's code/jpeg-6/ pattern. No pkg-config, system liblua5.4-dev, or libxml2-dev is required.
Lua 5.4 (vendor/lua/)
- Source:
vendor/lua/src/— a verbatim copy of Lua 5.4.8 (vendor/lua/LICENSE,vendor/lua/README). - Built as a static archive
build/lib/liblua.afrom the unity rule in the top-levelMakefile(searchLUA_LIB). - Only the VM library is compiled; the interpreter/compiler drivers
lua.candluac.care excluded. - Variables defined in the top-level
Makefile: LUA_DIR/LUA_SRCS/LUA_OBJ/LUA_LIB/LUA_CFLAGS(-Ivendor/lua/src).- Only the WoW UI links it:
games/world-of-warcraft/game.mksetsLUA_LIBS := -lluaand lists$(LUA_LIB)as a prerequisite oflibmenu-wow,test-wow-menu, andtest-wow-hud-xml. - To upgrade: replace the files under
vendor/lua/src/(andREADME/LICENSE); the Makefile wildcard picks up the new set automatically.
XML parser (common/tinyxml.h)
- A self-contained, header-only DOM parser with a libxml2-compatible subset of the API. It replaced
libxml2for the WoW FrameXML parser (stb_wowxml.h,ui_xml.c), the SC2 layout parser (stb_sc2layout.h), and the SC2 map/catalog parser (sc2_map.c). - API surface provided:
xmlDocPtr/xmlNodePtr/xmlAttrPtr,xmlReadMemory,xmlParseMemory,xmlDocGetRootElement,xmlGetProp,xmlNodeGetContent,xmlNodeListGetString,xmlStrcasecmp,XML_ELEMENT_NODE,XML_PARSE_*,BAD_CAST. - Nodes keep libxml2's linked-list layout (
children/nextfor siblings,properties/nextfor attributes, an attribute's value stored as a text node underattr->children), so the migrated call sites kept their original traversal loops. - All strings/nodes come from a per-document chunked arena (linked list of blocks, never
realloc'd in place) so tree pointers stay valid across growth;xmlFreeDocfrees the arena andxmlFreeis a no-op. - Parsing is lenient (equivalent to
XML_PARSE_RECOVER): comments, processing instructions, and DOCTYPE are skipped; CDATA becomes text; the five standard entities and numeric character references are decoded. - Because it is header-only with
staticfunctions, the include guard prevents redefinition inside unity builds; every consumer compiles with-Wno-unused-function.
PKWARE DCL decoder (vendor/blast/)
- Verbatim
contrib/blast/blast.candblast.hfrom zlib tagv1.3.1: https://github.com/madler/zlib/tree/v1.3.1/contrib/blast - Mark Adler's blast 1.3; its permissive license is retained in
blast.h. - Built as a separate translation unit into
libshared, avoiding unity-build symbol collisions. The standalone MPQ compatibility binary and WoW tests usingCOMMON_GAME_SRCScompile it directly. common/mpq.cuses bounded output callbacks to decode MPQ method byte0x08. This supports retail archive listfiles and patch campaign data needed by the parity catalog.make test-mpq-compressionchecks the upstream reference stream, truncated input, and output bounds. This adds method-byte decoding, not a claim that every legacyMPQ_FILE_IMPLODElayout is supported.
GL Shader (vendor/gl_shader/)
- GL Shader 1.0.0, extracted from Open Realm and shared with Corepunch Orion UI.
- Standalone C99 descriptors, profile generation, compilation and cached typed uniforms; MIT license retained.
- Unity-included once by
renderer/r_shader.c; update both repositories' complete vendor directory together. - See shared shaders and the module contract.
make test-gl-shaderexercises the shared contract; renderer model/shadow tests exercise integration.