Commit graph

696 commits

Author SHA1 Message Date
Kelsi
8d4d9b7169 Fix quest flow regressions, tooltip compare stats, and M2 alpha-key handling 2026-02-19 02:27:01 -08:00
Kelsi
512d60c9be Fix gossip quest flow and questgiver marker state 2026-02-19 02:04:56 -08:00
Kelsi
b3ea6d8e81 Refine bag UI layout and add shift-hover item compare 2026-02-19 01:50:50 -08:00
Kelsi
fc0ac6dd0f Fix combat facing updates and dead-on-spawn creature pose 2026-02-19 01:19:29 -08:00
Kelsi
8efc21115f Fix quest turn-in flow and WoW quest text placeholders 2026-02-19 01:12:14 -08:00
Kelsi
a37004db03 Remove temporary quest query diagnostics 2026-02-19 00:59:46 -08:00
Kelsi
4fcf869e34 Stabilize quest log details loading and turn-in item sync 2026-02-19 00:56:24 -08:00
Kelsi
334d4d3df6 Fix quest log titles and full-row selection behavior 2026-02-19 00:30:21 -08:00
Kelsi
cabf897683 Ignore zero-id forced quest removals to prevent spawn spam 2026-02-18 23:48:11 -08:00
Kelsi
79903cfdd4 Make loot parser tolerant of compact item layouts for quest drops 2026-02-18 23:46:11 -08:00
Kelsi
0c99e2ee95 Suppress remaining unknown Turtle opcodes with safe consume mappings 2026-02-18 23:42:28 -08:00
Kelsi
ddcd2b302e Map and handle additional Turtle combat/movement world opcodes 2026-02-18 23:38:34 -08:00
Kelsi
494a8b5acc Tie opcode handlers into movement, quest log, and world state caches 2026-02-18 23:30:38 -08:00
Kelsi
a1c16762af Handle remaining Turtle world opcodes with safe minimal parsers 2026-02-18 23:26:58 -08:00
Kelsi
e2b3c3c265 Remove leftover compressed update debug trace 2026-02-18 23:16:20 -08:00
Kelsi
4684db10af Reduce unhandled opcode spam and add missing Turtle opcode names 2026-02-18 23:14:01 -08:00
Kelsi
e9732dd9a6 Remove temporary WMO texture diagnostics 2026-02-18 23:10:11 -08:00
Kelsi
340a08f947 Fix WMO texture loading by always wiring asset manager 2026-02-18 23:08:43 -08:00
Kelsi
7f4cd41dfc Retry one-time WMO reload when textures resolve to white 2026-02-18 23:02:59 -08:00
Kelsi
4d2d9a7d6a Fix WMO texture state leakage and remove debug spam 2026-02-18 23:00:46 -08:00
Kelsi
a30525d7c9 Fix WMO visibility culling and renderer initialization guards 2026-02-18 22:41:05 -08:00
Kelsi
ff8ffc3bfb Fix transport/WMO diagnostics and terrain WMO dedup lifecycle 2026-02-18 22:36:34 -08:00
Kelsi
514b914068 Add shadow frustum culling to terrain and M2 depth passes
Both passes were rendering the entire loaded scene (17×17 tile radius)
into a shadow map that only covers 360×360 world units — submitting
10-50× more geometry than the shadow frustum can actually use.

- TerrainRenderer::renderShadow: skip chunks whose bounding sphere
  doesn't overlap the shadow frustum AABB in XY. Reduces terrain draw
  calls from O(all loaded chunks) to O(chunks within ~180 units).
- M2Renderer::renderShadow: skip instances whose world AABB doesn't
  overlap the shadow frustum in XY. Reduces M2 draw calls similarly.
- Both functions now take shadowCenter + halfExtent parameters.
2026-02-18 21:15:24 -08:00
Kelsi
c4d0a21713 Improve shadow performance: halve resolution, 9x fewer PCF taps, throttle depth pass
- SHADOW_MAP_SIZE 2048→1024: 4x fewer pixels rasterized in depth pass
- Replace 9-tap manual PCF loop with single hardware PCF tap in all 4 receiver
  shaders (terrain.frag, wmo_renderer, m2_renderer, character_renderer).
  GL_LINEAR + GL_COMPARE_REF_TO_TEXTURE already gives 2×2 bilinear PCF per
  tap for free, so quality is maintained while doing 9x fewer texture fetches.
- Throttle shadow depth pass to every 2 frames; OpenGL depth texture persists
  between frames so receivers always have a valid shadow map. 1-frame lag at
  60 fps is invisible.
2026-02-18 21:09:00 -08:00
Kelsi
7ab25c63c9 Optimize release builds: LTO, -O3, visibility, micro-perf fixes
- CMakeLists.txt: enable LTO for Release, add -O3 and -fvisibility=hidden
- scene: addMesh uses std::move, removeMesh takes const shared_ptr&
- entity: std::move entity into map instead of copy
- clouds: cosf/sinf instead of cos/sin (float math, avoids double promotion)
- game_screen: reserve trainer spell vector before push_back loop
- warden_module/emulator: replace std::endl (121 stream flushes) with '\n'
2026-02-18 20:10:47 -08:00
Kelsi
eacecddfb0 Fix real bugs found by clang-tidy
- game_handler.cpp: use-after-move on node.id after std::move(node)
  (save nodeId before the move)
- tcp_socket.cpp, world_socket.cpp: virtual call in destructor bypasses
  dispatch; use qualified TCPSocket::disconnect() / WorldSocket::disconnect()
  to make intent explicit
- wmo_renderer.cpp: float loop counters risk precision drift; replace with
  integer step counts and reconstruct float from index
- game_screen.cpp: (float + 0.5) cast to int is incorrect rounding;
  use std::lround instead
2026-02-18 20:02:12 -08:00
Kelsi
ba3d569e5f Update README: even expansion support, submodule clone instructions 2026-02-18 19:24:17 -08:00
Kelsi
37afbf8ba2 Convert imgui to git submodule (shallow) 2026-02-18 19:23:03 -08:00
Kelsi
5a2cb48b89 Fix NSIS shortcut backslash escaping in CPack config
CMake processes escape sequences twice: once reading CMakeLists.txt and
once loading the generated CPackConfig.cmake. Backslashes need four
levels of escaping (\\) to survive both passes and land as a single
backslash in the injected NSIS script.
2026-02-18 19:21:14 -08:00
Kelsi
1025e0cdfc Link ws2_32 to auth_probe and auth_login_probe on Windows 2026-02-18 19:12:16 -08:00
Kelsi
2e32312fb2 Fix Windows RC icon path and remove stray include in warden_module
Copy Wowee.ico into the build tree at configure time so llvm-rc can
resolve the relative assets\\wowee.ico path in wowee.rc. Also remove a
redundant #include <sys/mman.h> that was incorrectly placed inside a
function body.
2026-02-18 19:05:47 -08:00
Kelsi
9d44d672d2 Fix localtime_r in game_screen.cpp: use localtime_s on Windows 2026-02-18 18:50:27 -08:00
Kelsi
16cf641298 Fix std:🗜️ add missing #include <algorithm> for MinGW 2026-02-18 18:45:08 -08:00
Kelsi
c0c0210b66 Fix Windows build errors in warden and CharCreateResult
warden_emulator.cpp: guard unicorn include + entire implementation with
HAVE_UNICORN; provide stub implementations for platforms without Unicorn
(Windows ARM64 which has no unicorn MSYS2 package)

warden_module.cpp: include <windows.h> for VirtualAlloc/HMODULE/etc on
Windows; always include warden_emulator.hpp so unique_ptr destructor compiles
regardless of HAVE_UNICORN

world_packets.hpp + game_handler.cpp: rename CharCreateResult::ERROR to
CharCreateResult::CHAR_ERROR to avoid wingdi.h #define ERROR 0 collision
2026-02-18 18:39:07 -08:00
Kelsi
fbb0b76362 Fix two packaging bugs
logger.hpp: extend ERROR macro push/pop region to cover entire header so
LogLevel::ERROR inside template bodies compiles correctly on Windows

CMakeLists.txt: move tool install() rules next to each target definition
so they run after the targets exist (fixes macOS 'target does not exist')
2026-02-18 18:29:34 -08:00
Kelsi
f2c7e5826e Fix Linux apt install: separate optional libstormlib-dev to prevent abort 2026-02-18 18:20:39 -08:00
Kelsi
5b3b6df544 Add native installer packaging to CI for all platforms
Linux: DEB with /opt/wowee prefix and /usr/local/bin/wowee wrapper script
Windows x86-64: NSIS installer with DLL bundling and Start Menu shortcut
Windows ARM64: ZIP archive with bundled DLLs
macOS ARM64: .app bundle via dylibbundler + DMG via hdiutil

Assets are bundled into all packages (Original Music excluded). StormLib
is installed where available so asset_extract is included in packages.
2026-02-18 18:18:30 -08:00
Kelsi
456aa90eda Fix two more Windows/MinGW compile errors
- net_platform.hpp: guard ssize_t typedef with !__MINGW32__ since MinGW-w64
  already defines ssize_t as __int64 in corecrt.h
- logger.hpp: push/pop ERROR macro around LogLevel enum (same wingdi.h clash
  as world_packets.hpp)
2026-02-18 17:59:11 -08:00
Kelsi
254486d428 Fix apt cache path to only archive .deb files 2026-02-18 17:56:52 -08:00
Kelsi
1884534f82 Drop macOS x86-64 CI job (macos-13 runners deprecated) 2026-02-18 17:54:04 -08:00
Kelsi
f67a6f1692 Fix three Windows-specific compile errors
- logger.cpp: use localtime_s on Windows (reversed arg order vs localtime_r)
- process.hpp: drop constexpr on INVALID_PROCESS (INVALID_HANDLE_VALUE is a
  reinterpret_cast, not valid in constexpr context)
- world_packets.hpp: push/pop ERROR macro around CharCreateResult enum to avoid
  clash with wingdi.h #define ERROR 0
2026-02-18 17:52:28 -08:00
Kelsi
aba701aeda Define GLM_ENABLE_EXPERIMENTAL globally for GTX extension compatibility 2026-02-18 17:49:52 -08:00
Kelsi
bf9d3c7b2b Switch Windows MSYS2 builds to Ninja generator 2026-02-18 17:44:33 -08:00
Kelsi
880960dcc1 Add macOS and Windows ARM64 builds; fix memory_monitor for macOS
Add macOS matrix job (arm64/macos-15, x86-64/macos-13) using Homebrew.
Add Windows ARM64 job using windows-11-arm runner with MSYS2 CLANGARM64.
Fix memory_monitor.cpp: add __APPLE__ branch using sysctl hw.memsize/hw.usermem
instead of Linux-only sysinfo/proc.
2026-02-18 17:42:42 -08:00
Kelsi
85e28ccec9 Track missing extern headers (stb_image_write, nlohmann/json) 2026-02-18 17:39:09 -08:00
Kelsi
cb01821d89 Add Windows build support via MSYS2 and fix platform-specific code
Guard X11 display crash handler with __linux__, add Windows GlobalMemoryStatusEx
path in memory_monitor, guard warden cache paths with APPDATA on Windows, and
make pkg-config optional in CMakeLists with a find_library fallback. Add Windows
x86-64 CI job using MSYS2 MINGW64 to the build workflow.
2026-02-18 17:38:08 -08:00
Kelsi
02fd0166e9 Add GitHub Actions CI for x86-64 and ARM64 Linux 2026-02-18 17:32:46 -08:00
Kelsi
50f9651868 Fix quest log not showing server-side quests on login
SMSG_QUEST_QUERY_RESPONSE skipped only 18 uint32s before reading the
title string, but Classic layout has 40 fields before the title
(16 header + 8 reward items + 12 choice items + 4 POI fields).
Reading from the wrong position landed inside reward item data where
empty slots contain 0-bytes, so readString() returned "", overwriting
the "Quest #N" placeholder with an empty title — making quests
invisible in the UI even though they were in the quest log.

Fixes:
- Expansion-aware skip count: 40 for Classic/Turtle, 55 for WotLK
- Guard: only update title if parsed string is non-empty and printable
- Also scan quest log fields in VALUES update path (not just CREATE_OBJECT2),
  so quests are detected even when the server sends partial updates
2026-02-18 05:11:29 -08:00
Kelsi
dd3149e3c1 Fix quest system for Classic/Turtle: correct packet formats and log stride
- CMSG_QUESTGIVER_QUERY_QUEST: Classic override omits trailing unk1 byte
  (WotLK sends 13 bytes, Classic servers expect 12 — extra byte caused
  server to silently drop the packet, preventing quest details dialog)
- SMSG_QUESTGIVER_QUEST_DETAILS: Classic override skips informUnit GUID
  (WotLK prepends 8-byte informUnit before questId; Vanilla does not)
- Quest log UPDATE_OBJECT stride: use packetParsers_->questLogStride()
  (WotLK=5 fields/slot, Classic=3 fields/slot)
- handleQuestDetails: route through packetParsers_->parseQuestDetails()
- selectGossipQuest: route through packetParsers_->buildQueryQuestPacket()
2026-02-18 04:56:23 -08:00
Kelsi
2dffba63d8 Fix combat facing, tab-target filtering, and spirit healer resurrection
- Add Entity::setOrientation() to update facing without cancelling movement
- Force attacker and victim to face each other on SMSG_ATTACKSTART
- Fix orientation sign error in MonsterMove: use atan2(-dy, dx) throughout so
  NPCs don't glide backward; clamp FacingAngle moves that are >90° off travel vector
- Tab-target: skip dead units and non-hostiles at both build and advance time;
  stale entries (killed between presses) are skipped inline rather than cycling to them
- Spirit healer resurrection: detect same-map SMSG_NEW_WORLD with resurrectPending_
  and skip the full world reload/entity clear, preventing the fall-forever bug
2026-02-18 04:43:23 -08:00