Skip to content

zAllocator, string usage optimizations, VDF file support for renderer resources#367

Merged
kirides merged 12 commits into
masterfrom
feat/smaller_opt
Jun 3, 2026
Merged

zAllocator, string usage optimizations, VDF file support for renderer resources#367
kirides merged 12 commits into
masterfrom
feat/smaller_opt

Conversation

@kirides

@kirides kirides commented Jun 3, 2026

Copy link
Copy Markdown
Owner
  • reduce std::string allocations by using std::string_view where possible
    • define zSTRING layout to skip calls to ToChar and instantly get to the actual string data and length
    • WoldConverter waterfall checks now use insensitive comparison and string_view
  • implement zFILE_VDFS support
    • a few Resources can now be loaded from .vdf/.mod files, making distributing them easier:
      • Normalmaps: _WORK\DATA\TEXTURES\REPLACEMENTS\TEXTURENAME_NORMAL.DDS
      • Specular/FX: _WORK\DATA\TEXTURES\REPLACEMENTS\TEXTURENAME_FX.DDS
      • Raindrops: _work\Data\Textures\GD3D11\Raindrops\cv0_vPositive_0000.dds through cv0_vPositive_0369.dds
      • Snowflakes: _work\Data\Textures\GD3D11\Raindrops\Snow_0000.DDS through Snow_0255.DDS
  • use Gothic Memory allocator for malloc/free
    • properly construct and free zSTRING as well as zFILE_VDFS
  • fix bug where default MaterialInfo was bound incorrectly. (even if it wasn't used)

I ran around in G1 and Chronicles of Myrtana, no memory leaks were observed, when doing nothing memory usage was constant and unchanged. Also game did not crash otherwise when changing maps or going large distances or just playing.

@kirides kirides changed the title zAllocator and more zAllocator, string usage optimizations, VDF file support for renderer resources Jun 3, 2026
@kirides kirides merged commit 8072a48 into master Jun 3, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant