refactor: add why-comments to zone tiles, audio cache, socket buffer

- zone_manager: document tile-to-zone key encoding (tileX * 100 + tileY,
  safe because tileY < 64 < 100) and explain that ranges are empirically
  derived from the retail WoW map grid
- audio_engine: expand sample rate comment — miniaudio defaults to
  device rate causing pitch distortion if not set explicitly; name
  kMaxCachedSounds constant with memory budget explanation
- tcp_socket: add why-comment on 4 KB recv buffer sizing — covers
  typical 20-500 byte packets and worst-case ~2 KB UPDATE_OBJECT
This commit is contained in:
Kelsi 2026-03-30 14:52:51 -07:00
parent 8c7db3e6c8
commit d2a7d79f60
3 changed files with 20 additions and 5 deletions

View file

@ -296,7 +296,12 @@ void ZoneManager::initialize() {
};
zones[1657] = darnassus;
// Tile-to-zone mappings for Azeroth (Eastern Kingdoms)
// Tile-to-zone fallback mappings for Azeroth (Eastern Kingdoms).
// WoW's world is a grid of 64×64 ADT tiles per continent. We encode (tileX, tileY)
// into a single key as tileX * 100 + tileY (safe because tileY < 64 < 100).
// These ranges are empirically determined from the retail map layout and provide
// zone identification when AreaTable.dbc data is unavailable.
//
// Elwynn Forest tiles
for (int tx = 31; tx <= 34; tx++) {
for (int ty = 48; ty <= 51; ty++) {