1
0
forked from 0ad/0ad
0ad/build
wraitii cdd75deafb XMB Improvements, parse JS into XMB, make strings more efficient.
XMB format is bumped to 4, invalidating all cached files. The
differences are:
 - element/attribute names are stored after the elements themselves, and
not before. This allows writing XMB data in one pass instead of two.
 - names themselves becomes offsets (instead of arbitrary integers),
making getting the string from the int name much more efficient.

XMBFile is renamed to XMBData to clarify that it does not, in fact,
refer to a file on disk.

XMBData::GetElementString is also changed to return a const char*, thus
not creating an std::string. A string_view version is added where
convenient.

The XML->XMB and JS->XMB conversion functions and the corresponding
storage are moved to `ps/XMB`, since that format doesn't particularly
relate to XML. CXeromyces becomes lighter and more focused as a result.
The XML->XMB conversion also benefits from the above streamlining.

Note that in a few cases, string_view gets printed to CLogger via
data(), which is generally not legal, but we know that the strings are
null-terminated here. Our libfmt (version 4) doesn't support
string_view, that would be v5.

Differential Revision: https://code.wildfiregames.com/D3909
This was SVN commit r25375.
2021-05-04 13:02:34 +00:00
..
android Actually remove trailing whitespace for non-header files as well. 2016-11-23 13:02:58 +00:00
arclint CI linting: fix issues with char being null for cppcheck. 2021-03-23 17:43:19 +00:00
bin Cleanup of NASM. It has been unused for ages (153357f640) and we still have legacy code lines in our premake scripts. We also carry an unused binary for Windows. 2017-01-30 09:19:59 +00:00
coverage Small updates to build scripts, refs #4419. 2016-12-27 09:49:41 +00:00
dehydra Detect and fix printf signedness errors. Fixes #1086, #1087. 2012-01-01 16:43:10 +00:00
errorlist # Rewrite of the game's simulation system 2010-01-09 19:20:14 +00:00
jenkins Update build/ dockerfiles & jenkinsfiles 2021-03-28 13:02:06 +00:00
premake XMB Improvements, parse JS into XMB, make strings more efficient. 2021-05-04 13:02:34 +00:00
resources Fix MacOs bundle for Python3 2020-11-28 10:23:06 +00:00
svn_revision Fix lineendings. 2019-07-12 17:40:40 +00:00
workspaces Use pkgconfig to find libpng 2021-03-03 16:11:41 +00:00