2026-02-02 12:24:50 -08:00
cmake_minimum_required(VERSION 3.15)
2026-03-20 11:12:07 -07:00
project(wowee VERSION 1.0.0 LANGUAGES C CXX)
2026-02-11 15:24:05 -08:00
include(GNUInstallDirs)
2026-02-02 12:24:50 -08:00
2026-02-07 11:43:37 -08:00
set(CMAKE_CXX_STANDARD 20)
2026-02-02 12:24:50 -08:00
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
2026-02-25 09:46:27 -08:00
# Explicitly tag optimized configs so runtime defaults can enforce low-noise logging.
add_compile_definitions(
$<$<CONFIG:Release>:WOWEE_RELEASE_LOGGING>
$<$<CONFIG:RelWithDebInfo>:WOWEE_RELEASE_LOGGING>
$<$<CONFIG:MinSizeRel>:WOWEE_RELEASE_LOGGING>
)
2026-02-02 12:24:50 -08:00
# Output directories
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
2026-03-09 04:24:24 -07:00
if(WIN32)
# Needed for Vulkan Win32 external memory/semaphore handle types used by FSR3 interop.
add_compile_definitions(VK_USE_PLATFORM_WIN32_KHR)
endif()
2026-02-02 12:24:50 -08:00
# Options
option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
2026-04-03 09:41:34 +03:00
option(WOWEE_BUILD_TESTS "Build tests" ON)
2026-02-23 16:30:49 +01:00
option(WOWEE_ENABLE_ASAN "Enable AddressSanitizer (Debug builds)" OFF)
2026-04-03 09:41:34 +03:00
option(WOWEE_ENABLE_TRACY "Enable Tracy profiler instrumentation" OFF)
2026-03-08 19:33:07 -07:00
option(WOWEE_ENABLE_AMD_FSR2 "Enable AMD FidelityFX FSR2 backend when SDK is present" ON)
2026-03-08 22:47:46 -07:00
option(WOWEE_ENABLE_AMD_FSR3_FRAMEGEN "Enable AMD FidelityFX SDK FSR3 frame generation interface probe when SDK is present" ON)
2026-03-09 04:24:24 -07:00
option(WOWEE_BUILD_AMD_FSR3_RUNTIME "Build native AMD FidelityFX VK runtime (Path A) from extern/FidelityFX-SDK/Kits" ON)
2026-03-08 19:33:07 -07:00
# AMD FidelityFX FSR2 SDK detection (drop-in under extern/FidelityFX-FSR2)
set(WOWEE_AMD_FSR2_DIR ${CMAKE_SOURCE_DIR}/extern/FidelityFX-FSR2)
set(WOWEE_AMD_FSR2_HEADER ${WOWEE_AMD_FSR2_DIR}/src/ffx-fsr2-api/ffx_fsr2.h)
2026-03-08 19:56:52 -07:00
set(WOWEE_AMD_FSR2_VK_PERM_HEADER ${WOWEE_AMD_FSR2_DIR}/src/ffx-fsr2-api/vk/shaders/ffx_fsr2_accumulate_pass_permutations.h)
2026-03-08 21:45:25 -07:00
set(WOWEE_AMD_FSR2_VK_VENDOR_DIR ${CMAKE_SOURCE_DIR}/third_party/fsr2_vk_permutations)
# Upstream SDK checkouts may not ship generated Vulkan permutation headers.
# If we have a vendored snapshot, copy it into the SDK tree before detection.
if(WOWEE_ENABLE_AMD_FSR2 AND EXISTS ${WOWEE_AMD_FSR2_HEADER} AND NOT EXISTS ${WOWEE_AMD_FSR2_VK_PERM_HEADER} AND EXISTS ${WOWEE_AMD_FSR2_VK_VENDOR_DIR})
file(GLOB WOWEE_AMD_FSR2_VK_VENDOR_HEADERS "${WOWEE_AMD_FSR2_VK_VENDOR_DIR}/ffx_fsr2_*pass*.h")
list(LENGTH WOWEE_AMD_FSR2_VK_VENDOR_HEADERS WOWEE_AMD_FSR2_VK_VENDOR_COUNT)
if(WOWEE_AMD_FSR2_VK_VENDOR_COUNT GREATER 0)
file(MAKE_DIRECTORY ${WOWEE_AMD_FSR2_DIR}/src/ffx-fsr2-api/vk/shaders)
file(COPY ${WOWEE_AMD_FSR2_VK_VENDOR_HEADERS} DESTINATION ${WOWEE_AMD_FSR2_DIR}/src/ffx-fsr2-api/vk/shaders)
message(STATUS "AMD FSR2: bootstrapped ${WOWEE_AMD_FSR2_VK_VENDOR_COUNT} vendored Vulkan permutation headers")
endif()
endif()
2026-03-08 19:56:52 -07:00
if(WOWEE_ENABLE_AMD_FSR2 AND EXISTS ${WOWEE_AMD_FSR2_HEADER} AND EXISTS ${WOWEE_AMD_FSR2_VK_PERM_HEADER})
2026-03-08 19:33:07 -07:00
message(STATUS "AMD FSR2 SDK detected at ${WOWEE_AMD_FSR2_DIR}")
add_compile_definitions(WOWEE_HAS_AMD_FSR2=1)
2026-03-08 19:56:52 -07:00
add_compile_definitions(FFX_GCC=1)
# AMD FSR2 Vulkan backend sources (official SDK implementation)
set(WOWEE_AMD_FSR2_SOURCES
${WOWEE_AMD_FSR2_DIR}/src/ffx-fsr2-api/ffx_assert.cpp
${WOWEE_AMD_FSR2_DIR}/src/ffx-fsr2-api/ffx_fsr2.cpp
${WOWEE_AMD_FSR2_DIR}/src/ffx-fsr2-api/vk/ffx_fsr2_vk.cpp
${WOWEE_AMD_FSR2_DIR}/src/ffx-fsr2-api/vk/shaders/ffx_fsr2_shaders_vk.cpp
)
add_library(wowee_fsr2_amd_vk STATIC ${WOWEE_AMD_FSR2_SOURCES})
set_target_properties(wowee_fsr2_amd_vk PROPERTIES
CXX_STANDARD 17
CXX_STANDARD_REQUIRED ON
)
target_include_directories(wowee_fsr2_amd_vk PUBLIC
2026-03-08 19:33:07 -07:00
${WOWEE_AMD_FSR2_DIR}/src
${WOWEE_AMD_FSR2_DIR}/src/ffx-fsr2-api
${WOWEE_AMD_FSR2_DIR}/src/ffx-fsr2-api/vk
2026-03-08 19:56:52 -07:00
${WOWEE_AMD_FSR2_DIR}/src/ffx-fsr2-api/vk/shaders
2026-03-08 19:33:07 -07:00
)
2026-03-08 19:56:52 -07:00
set(WOWEE_FFX_COMPAT_HEADER ${CMAKE_SOURCE_DIR}/include/third_party/ffx_fsr2_compat.h)
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
target_compile_options(wowee_fsr2_amd_vk PRIVATE
"-include${WOWEE_FFX_COMPAT_HEADER}"
)
elseif(MSVC)
target_compile_options(wowee_fsr2_amd_vk PRIVATE
"/FI${WOWEE_FFX_COMPAT_HEADER}"
)
endif()
target_link_libraries(wowee_fsr2_amd_vk PUBLIC Vulkan::Vulkan)
2026-03-08 19:33:07 -07:00
else()
add_compile_definitions(WOWEE_HAS_AMD_FSR2=0)
if(WOWEE_ENABLE_AMD_FSR2)
2026-03-08 19:56:52 -07:00
if(NOT EXISTS ${WOWEE_AMD_FSR2_HEADER})
message(WARNING "AMD FSR2 SDK not found at ${WOWEE_AMD_FSR2_DIR}; using internal fallback implementation.")
elseif(NOT EXISTS ${WOWEE_AMD_FSR2_VK_PERM_HEADER})
message(WARNING "AMD FSR2 SDK found, but generated Vulkan permutation headers are missing (e.g. ${WOWEE_AMD_FSR2_VK_PERM_HEADER}); using internal fallback implementation.")
endif()
2026-03-08 19:33:07 -07:00
endif()
endif()
2026-02-02 12:24:50 -08:00
2026-03-08 22:47:46 -07:00
# AMD FidelityFX SDK (FSR3 frame generation interfaces) detection under extern/FidelityFX-SDK
2026-03-09 01:09:37 -07:00
set(WOWEE_AMD_FFX_SDK_KITS_DIR ${CMAKE_SOURCE_DIR}/extern/FidelityFX-SDK/Kits/FidelityFX)
set(WOWEE_AMD_FFX_SDK_KITS_FG_HEADER ${WOWEE_AMD_FFX_SDK_KITS_DIR}/framegeneration/include/ffx_framegeneration.h)
2026-03-08 22:47:46 -07:00
2026-03-09 04:24:24 -07:00
set(WOWEE_AMD_FFX_SDK_KITS_READY FALSE)
if(EXISTS ${WOWEE_AMD_FFX_SDK_KITS_DIR}/upscalers/fsr3/include/ffx_fsr3upscaler.h
AND EXISTS ${WOWEE_AMD_FFX_SDK_KITS_DIR}/framegeneration/fsr3/include/ffx_frameinterpolation.h
AND EXISTS ${WOWEE_AMD_FFX_SDK_KITS_DIR}/framegeneration/fsr3/include/ffx_opticalflow.h
AND EXISTS ${WOWEE_AMD_FFX_SDK_KITS_DIR}/backend/vk/ffx_vk.h)
set(WOWEE_AMD_FFX_SDK_KITS_READY TRUE)
endif()
2026-03-09 05:00:51 -07:00
if(WOWEE_ENABLE_AMD_FSR3_FRAMEGEN AND WOWEE_AMD_FFX_SDK_KITS_READY)
message(STATUS "AMD FidelityFX-SDK framegen headers detected at ${WOWEE_AMD_FFX_SDK_KITS_DIR} (Kits layout)")
add_compile_definitions(WOWEE_AMD_FFX_SDK_KITS=1)
2026-03-08 22:47:46 -07:00
add_compile_definitions(WOWEE_HAS_AMD_FSR3_FRAMEGEN=1)
add_library(wowee_fsr3_framegen_amd_vk_probe STATIC
src/rendering/amd_fsr3_framegen_probe.cpp
)
set_target_properties(wowee_fsr3_framegen_amd_vk_probe PROPERTIES
CXX_STANDARD 17
CXX_STANDARD_REQUIRED ON
)
2026-03-09 05:00:51 -07:00
target_include_directories(wowee_fsr3_framegen_amd_vk_probe PUBLIC
Add FSR3 Generic API path and harden runtime diagnostics
- AmdFsr3Runtime now probes both the legacy ffxFsr3* API and the newer
generic ffxCreateContext/ffxDispatch API; selects whichever the loaded
runtime library exports (GenericApi takes priority fallback)
- Generic API path implements full upscale + frame-generation context
creation, configure, dispatch, and destroy lifecycle
- dlopen error captured and surfaced in lastError_ on Linux so runtime
initialization failures are actionable
- FSR3 runtime init failure log now includes path kind, error string,
and loaded library path for easier debugging
- tools/generate_ffx_sdk_vk_permutations.sh added: auto-bootstraps
missing VK permutation headers; DXC auto-downloaded on Linux/Windows
MSYS2; macOS reads from PATH (CI installs via brew dxc)
- CMakeLists: add upscalers/include to probe include dirs, invoke
permutation script before SDK build, scope FFX pragma/ODR warning
suppressions to affected TUs, add runtime-copy dependency on wowee
- UI labels updated from "FSR2" → "FSR3" in settings, tuning panel,
performance HUD, and combo boxes
- CI macOS job now installs dxc via Homebrew for permutation codegen
2026-03-09 12:51:59 -07:00
${WOWEE_AMD_FFX_SDK_KITS_DIR}/upscalers/include
2026-03-09 05:00:51 -07:00
${WOWEE_AMD_FFX_SDK_KITS_DIR}/upscalers/fsr3/include
${WOWEE_AMD_FFX_SDK_KITS_DIR}/framegeneration/fsr3/include
${WOWEE_AMD_FFX_SDK_KITS_DIR}/framegeneration/include
${WOWEE_AMD_FFX_SDK_KITS_DIR}/backend/vk
${WOWEE_AMD_FFX_SDK_KITS_DIR}/api/internal
${WOWEE_AMD_FFX_SDK_KITS_DIR}/api/include
)
2026-03-08 22:47:46 -07:00
target_link_libraries(wowee_fsr3_framegen_amd_vk_probe PUBLIC Vulkan::Vulkan)
2026-03-09 00:36:53 -07:00
2026-03-09 05:00:51 -07:00
if(WOWEE_BUILD_AMD_FSR3_RUNTIME)
2026-03-09 04:24:24 -07:00
message(STATUS "AMD FSR3 Path A runtime target enabled: build with target 'wowee_fsr3_official_runtime_copy'")
set(WOWEE_AMD_FSR3_RUNTIME_BUILD_DIR ${CMAKE_BINARY_DIR}/ffx_sdk_runtime_build)
if(WIN32)
set(WOWEE_AMD_FSR3_RUNTIME_NAME amd_fidelityfx_vk.dll)
if(CMAKE_CONFIGURATION_TYPES)
set(WOWEE_AMD_FSR3_RUNTIME_SRC ${WOWEE_AMD_FSR3_RUNTIME_BUILD_DIR}/$<CONFIG>/amd_fidelityfx_vk.dll)
else()
set(WOWEE_AMD_FSR3_RUNTIME_SRC ${WOWEE_AMD_FSR3_RUNTIME_BUILD_DIR}/amd_fidelityfx_vk.dll)
endif()
elseif(APPLE)
set(WOWEE_AMD_FSR3_RUNTIME_NAME libamd_fidelityfx_vk.dylib)
if(CMAKE_CONFIGURATION_TYPES)
set(WOWEE_AMD_FSR3_RUNTIME_SRC ${WOWEE_AMD_FSR3_RUNTIME_BUILD_DIR}/$<CONFIG>/libamd_fidelityfx_vk.dylib)
else()
set(WOWEE_AMD_FSR3_RUNTIME_SRC ${WOWEE_AMD_FSR3_RUNTIME_BUILD_DIR}/libamd_fidelityfx_vk.dylib)
endif()
else()
set(WOWEE_AMD_FSR3_RUNTIME_NAME libamd_fidelityfx_vk.so)
set(WOWEE_AMD_FSR3_RUNTIME_SRC ${WOWEE_AMD_FSR3_RUNTIME_BUILD_DIR}/libamd_fidelityfx_vk.so)
endif()
if(CMAKE_BUILD_TYPE)
set(WOWEE_AMD_FSR3_RUNTIME_BUILD_TYPE ${CMAKE_BUILD_TYPE})
else()
set(WOWEE_AMD_FSR3_RUNTIME_BUILD_TYPE Release)
endif()
2026-03-09 13:11:03 -07:00
# Locate bash at configure time so the build-time COMMAND works on Windows
# (cmake custom commands run via cmd.exe on Windows, so bare 'bash' is not found).
find_program(BASH_EXECUTABLE bash
HINTS
/usr/bin
/bin
"${MSYS2_PATH}/usr/bin"
"$ENV{MSYS2_PATH}/usr/bin"
"C:/msys64/usr/bin"
"D:/msys64/usr/bin"
2026-03-09 04:24:24 -07:00
)
2026-03-09 13:11:03 -07:00
if(BASH_EXECUTABLE)
add_custom_target(wowee_fsr3_official_runtime_build
COMMAND ${CMAKE_COMMAND}
-S ${WOWEE_AMD_FFX_SDK_KITS_DIR}
-B ${WOWEE_AMD_FSR3_RUNTIME_BUILD_DIR}
-DCMAKE_BUILD_TYPE=${WOWEE_AMD_FSR3_RUNTIME_BUILD_TYPE}
-DFFX_BUILD_VK=ON
-DFFX_BUILD_FRAMEGENERATION=ON
-DFFX_BUILD_UPSCALER=ON
COMMAND ${BASH_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tools/generate_ffx_sdk_vk_permutations.sh
${CMAKE_SOURCE_DIR}/extern/FidelityFX-SDK
COMMAND ${CMAKE_COMMAND}
--build ${WOWEE_AMD_FSR3_RUNTIME_BUILD_DIR}
--config $<CONFIG>
--parallel
COMMENT "Building native AMD FSR3 runtime (Path A) from FidelityFX-SDK Kits"
VERBATIM
)
else()
message(STATUS "bash not found; VK permutation headers will not be auto-generated")
add_custom_target(wowee_fsr3_official_runtime_build
COMMAND ${CMAKE_COMMAND}
-S ${WOWEE_AMD_FFX_SDK_KITS_DIR}
-B ${WOWEE_AMD_FSR3_RUNTIME_BUILD_DIR}
-DCMAKE_BUILD_TYPE=${WOWEE_AMD_FSR3_RUNTIME_BUILD_TYPE}
-DFFX_BUILD_VK=ON
-DFFX_BUILD_FRAMEGENERATION=ON
-DFFX_BUILD_UPSCALER=ON
COMMAND ${CMAKE_COMMAND}
--build ${WOWEE_AMD_FSR3_RUNTIME_BUILD_DIR}
--config $<CONFIG>
--parallel
COMMENT "Building native AMD FSR3 runtime (Path A) from FidelityFX-SDK Kits (no permutation bootstrap)"
VERBATIM
)
endif()
2026-03-09 04:24:24 -07:00
add_custom_target(wowee_fsr3_official_runtime_copy
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${WOWEE_AMD_FSR3_RUNTIME_SRC}
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${WOWEE_AMD_FSR3_RUNTIME_NAME}
DEPENDS wowee_fsr3_official_runtime_build
COMMENT "Copying native AMD FSR3 runtime to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}"
VERBATIM
)
endif()
2026-03-09 02:42:07 -07:00
2026-03-08 22:47:46 -07:00
else()
add_compile_definitions(WOWEE_HAS_AMD_FSR3_FRAMEGEN=0)
2026-03-09 04:24:24 -07:00
add_compile_definitions(WOWEE_AMD_FFX_SDK_KITS=0)
2026-03-08 22:47:46 -07:00
if(WOWEE_ENABLE_AMD_FSR3_FRAMEGEN)
2026-03-09 01:09:37 -07:00
if(EXISTS ${WOWEE_AMD_FFX_SDK_KITS_FG_HEADER})
2026-03-09 05:00:51 -07:00
message(STATUS "FidelityFX-SDK Kits layout detected at ${WOWEE_AMD_FFX_SDK_KITS_DIR}, but required FSR3 headers are incomplete. FSR3 framegen interface probe disabled.")
2026-03-09 01:09:37 -07:00
else()
2026-03-09 05:00:51 -07:00
message(WARNING "AMD FidelityFX-SDK Kits headers not found at ${WOWEE_AMD_FFX_SDK_KITS_DIR}; FSR3 framegen interface probe disabled.")
2026-03-09 01:09:37 -07:00
endif()
2026-03-08 22:47:46 -07:00
endif()
endif()
2026-02-20 03:02:31 -08:00
# Opcode registry generation/validation
find_package(Python3 COMPONENTS Interpreter QUIET)
if(Python3_Interpreter_FOUND)
add_custom_target(opcodes-generate
COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tools/gen_opcode_registry.py
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMENT "Generating opcode registry include fragments"
)
add_custom_target(opcodes-validate
COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tools/validate_opcode_maps.py --root ${CMAKE_SOURCE_DIR}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
DEPENDS opcodes-generate
COMMENT "Validating canonical opcode registry and expansion maps"
)
endif()
2026-02-02 12:24:50 -08:00
# Find required packages
find_package(SDL2 REQUIRED)
2026-02-23 18:47:42 -08:00
find_package(Vulkan QUIET)
if(NOT Vulkan_FOUND)
feat: add multi-platform Docker build system for Linux, macOS, and Windows
Replace the single Ubuntu-based container build with a dedicated
Dockerfile, build script, and launcher for each target platform.
Infrastructure:
- Add .dockerignore to minimize Docker build context
- Add container/builder-linux.Dockerfile (Ubuntu 24.04, GCC, native build)
- Add container/builder-macos.Dockerfile (multi-stage: SDK fetcher + osxcross/Clang 18)
- Add container/builder-windows.Dockerfile (LLVM-MinGW 20240619, vcpkg)
- Add container/macos/sdk-fetcher.py (auto-fetch macOS SDK from Apple catalog)
- Add container/macos/osxcross-toolchain.cmake (auto-detecting CMake toolchain)
- Add container/macos/triplets/arm64-osx-cross.cmake
- Add container/macos/triplets/x64-osx-cross.cmake
- Remove container/builder-ubuntu.Dockerfile (replaced by per-platform Dockerfiles)
- Remove container/build-in-container.sh and container/build-wowee.sh (replaced)
Build scripts (run inside containers):
- Add container/build-linux.sh (tar copy, FidelityFX clone, cmake/ninja)
- Add container/build-macos.sh (arch detection, vcpkg triplet, cross-compile)
- Add container/build-windows.sh (Vulkan import lib via dlltool, cross-compile)
Launcher scripts (run on host):
- Add container/run-linux.sh, run-macos.sh, run-windows.sh (bash)
- Add container/run-linux.ps1, run-macos.ps1, run-windows.ps1 (PowerShell)
Documentation:
- Add container/README.md (quick start, options, file structure, troubleshooting)
- Add container/FLOW.md (comprehensive build flow for each platform)
CMake changes:
- Add macOS cross-compile support (VulkanHeaders, -undefined dynamic_lookup)
- Add LLVM-MinGW/Windows cross-compile support
- Detect osxcross toolchain and vcpkg triplets
Other:
- Update vcpkg.json with ffmpeg feature flags
- Update resources/wowee.rc version string
2026-03-30 20:17:41 +03:00
# For Windows cross-compilation the host pkg-config finds the Linux libvulkan-dev
# and injects /usr/include as an INTERFACE_INCLUDE_DIRECTORY, which causes
# MinGW clang to pull in glibc headers (bits/libc-header-start.h) instead of
# the MinGW sysroot headers. Skip the host pkg-config path entirely and instead
# locate Vulkan via vcpkg-installed vulkan-headers or the MinGW toolchain.
if(CMAKE_CROSSCOMPILING AND WIN32)
# The cross-compile build script generates a Vulkan import library
# (libvulkan-1.a) in ${CMAKE_BINARY_DIR}/vulkan-import from the headers.
set(_VULKAN_IMPORT_DIR "${CMAKE_BINARY_DIR}/vulkan-import")
find_package(VulkanHeaders CONFIG QUIET)
if(VulkanHeaders_FOUND)
if(NOT TARGET Vulkan::Vulkan)
add_library(Vulkan::Vulkan INTERFACE IMPORTED)
endif()
# Vulkan::Headers is provided by vcpkg's vulkan-headers port and carries
# the correct MinGW include path — no Linux system headers involved.
set_property(TARGET Vulkan::Vulkan APPEND PROPERTY
INTERFACE_LINK_LIBRARIES Vulkan::Headers)
# Link against the Vulkan loader import library (vulkan-1.dll).
if(EXISTS "${_VULKAN_IMPORT_DIR}/libvulkan-1.a")
2026-02-23 18:47:42 -08:00
set_property(TARGET Vulkan::Vulkan APPEND PROPERTY
feat: add multi-platform Docker build system for Linux, macOS, and Windows
Replace the single Ubuntu-based container build with a dedicated
Dockerfile, build script, and launcher for each target platform.
Infrastructure:
- Add .dockerignore to minimize Docker build context
- Add container/builder-linux.Dockerfile (Ubuntu 24.04, GCC, native build)
- Add container/builder-macos.Dockerfile (multi-stage: SDK fetcher + osxcross/Clang 18)
- Add container/builder-windows.Dockerfile (LLVM-MinGW 20240619, vcpkg)
- Add container/macos/sdk-fetcher.py (auto-fetch macOS SDK from Apple catalog)
- Add container/macos/osxcross-toolchain.cmake (auto-detecting CMake toolchain)
- Add container/macos/triplets/arm64-osx-cross.cmake
- Add container/macos/triplets/x64-osx-cross.cmake
- Remove container/builder-ubuntu.Dockerfile (replaced by per-platform Dockerfiles)
- Remove container/build-in-container.sh and container/build-wowee.sh (replaced)
Build scripts (run inside containers):
- Add container/build-linux.sh (tar copy, FidelityFX clone, cmake/ninja)
- Add container/build-macos.sh (arch detection, vcpkg triplet, cross-compile)
- Add container/build-windows.sh (Vulkan import lib via dlltool, cross-compile)
Launcher scripts (run on host):
- Add container/run-linux.sh, run-macos.sh, run-windows.sh (bash)
- Add container/run-linux.ps1, run-macos.ps1, run-windows.ps1 (PowerShell)
Documentation:
- Add container/README.md (quick start, options, file structure, troubleshooting)
- Add container/FLOW.md (comprehensive build flow for each platform)
CMake changes:
- Add macOS cross-compile support (VulkanHeaders, -undefined dynamic_lookup)
- Add LLVM-MinGW/Windows cross-compile support
- Detect osxcross toolchain and vcpkg triplets
Other:
- Update vcpkg.json with ffmpeg feature flags
- Update resources/wowee.rc version string
2026-03-30 20:17:41 +03:00
INTERFACE_LINK_DIRECTORIES "${_VULKAN_IMPORT_DIR}")
2026-02-23 18:47:42 -08:00
set_property(TARGET Vulkan::Vulkan APPEND PROPERTY
feat: add multi-platform Docker build system for Linux, macOS, and Windows
Replace the single Ubuntu-based container build with a dedicated
Dockerfile, build script, and launcher for each target platform.
Infrastructure:
- Add .dockerignore to minimize Docker build context
- Add container/builder-linux.Dockerfile (Ubuntu 24.04, GCC, native build)
- Add container/builder-macos.Dockerfile (multi-stage: SDK fetcher + osxcross/Clang 18)
- Add container/builder-windows.Dockerfile (LLVM-MinGW 20240619, vcpkg)
- Add container/macos/sdk-fetcher.py (auto-fetch macOS SDK from Apple catalog)
- Add container/macos/osxcross-toolchain.cmake (auto-detecting CMake toolchain)
- Add container/macos/triplets/arm64-osx-cross.cmake
- Add container/macos/triplets/x64-osx-cross.cmake
- Remove container/builder-ubuntu.Dockerfile (replaced by per-platform Dockerfiles)
- Remove container/build-in-container.sh and container/build-wowee.sh (replaced)
Build scripts (run inside containers):
- Add container/build-linux.sh (tar copy, FidelityFX clone, cmake/ninja)
- Add container/build-macos.sh (arch detection, vcpkg triplet, cross-compile)
- Add container/build-windows.sh (Vulkan import lib via dlltool, cross-compile)
Launcher scripts (run on host):
- Add container/run-linux.sh, run-macos.sh, run-windows.sh (bash)
- Add container/run-linux.ps1, run-macos.ps1, run-windows.ps1 (PowerShell)
Documentation:
- Add container/README.md (quick start, options, file structure, troubleshooting)
- Add container/FLOW.md (comprehensive build flow for each platform)
CMake changes:
- Add macOS cross-compile support (VulkanHeaders, -undefined dynamic_lookup)
- Add LLVM-MinGW/Windows cross-compile support
- Detect osxcross toolchain and vcpkg triplets
Other:
- Update vcpkg.json with ffmpeg feature flags
- Update resources/wowee.rc version string
2026-03-30 20:17:41 +03:00
INTERFACE_LINK_LIBRARIES vulkan-1)
endif()
set(Vulkan_FOUND TRUE)
message(STATUS "Found Vulkan headers for Windows cross-compile via vcpkg VulkanHeaders")
else()
# Last-resort: check the LLVM-MinGW toolchain sysroot directly.
find_path(_VULKAN_MINGW_INCLUDE NAMES vulkan/vulkan.h
PATHS /opt/llvm-mingw/x86_64-w64-mingw32/include NO_DEFAULT_PATH)
if(_VULKAN_MINGW_INCLUDE)
if(NOT TARGET Vulkan::Vulkan)
add_library(Vulkan::Vulkan INTERFACE IMPORTED)
endif()
set_target_properties(Vulkan::Vulkan PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${_VULKAN_MINGW_INCLUDE}")
# Link against the Vulkan loader import library (vulkan-1.dll).
if(EXISTS "${_VULKAN_IMPORT_DIR}/libvulkan-1.a")
set_property(TARGET Vulkan::Vulkan APPEND PROPERTY
INTERFACE_LINK_DIRECTORIES "${_VULKAN_IMPORT_DIR}")
set_property(TARGET Vulkan::Vulkan APPEND PROPERTY
INTERFACE_LINK_LIBRARIES vulkan-1)
endif()
set(Vulkan_FOUND TRUE)
message(STATUS "Found Vulkan headers in LLVM-MinGW sysroot: ${_VULKAN_MINGW_INCLUDE}")
endif()
endif()
elseif(CMAKE_CROSSCOMPILING AND CMAKE_SYSTEM_NAME STREQUAL "Darwin")
# macOS cross-compilation: use vcpkg-installed vulkan-headers.
# The host pkg-config would find Linux libvulkan-dev headers which the
# macOS cross-compiler cannot use (different sysroot).
find_package(VulkanHeaders CONFIG QUIET)
if(VulkanHeaders_FOUND)
if(NOT TARGET Vulkan::Vulkan)
add_library(Vulkan::Vulkan INTERFACE IMPORTED)
2026-02-23 18:47:42 -08:00
endif()
feat: add multi-platform Docker build system for Linux, macOS, and Windows
Replace the single Ubuntu-based container build with a dedicated
Dockerfile, build script, and launcher for each target platform.
Infrastructure:
- Add .dockerignore to minimize Docker build context
- Add container/builder-linux.Dockerfile (Ubuntu 24.04, GCC, native build)
- Add container/builder-macos.Dockerfile (multi-stage: SDK fetcher + osxcross/Clang 18)
- Add container/builder-windows.Dockerfile (LLVM-MinGW 20240619, vcpkg)
- Add container/macos/sdk-fetcher.py (auto-fetch macOS SDK from Apple catalog)
- Add container/macos/osxcross-toolchain.cmake (auto-detecting CMake toolchain)
- Add container/macos/triplets/arm64-osx-cross.cmake
- Add container/macos/triplets/x64-osx-cross.cmake
- Remove container/builder-ubuntu.Dockerfile (replaced by per-platform Dockerfiles)
- Remove container/build-in-container.sh and container/build-wowee.sh (replaced)
Build scripts (run inside containers):
- Add container/build-linux.sh (tar copy, FidelityFX clone, cmake/ninja)
- Add container/build-macos.sh (arch detection, vcpkg triplet, cross-compile)
- Add container/build-windows.sh (Vulkan import lib via dlltool, cross-compile)
Launcher scripts (run on host):
- Add container/run-linux.sh, run-macos.sh, run-windows.sh (bash)
- Add container/run-linux.ps1, run-macos.ps1, run-windows.ps1 (PowerShell)
Documentation:
- Add container/README.md (quick start, options, file structure, troubleshooting)
- Add container/FLOW.md (comprehensive build flow for each platform)
CMake changes:
- Add macOS cross-compile support (VulkanHeaders, -undefined dynamic_lookup)
- Add LLVM-MinGW/Windows cross-compile support
- Detect osxcross toolchain and vcpkg triplets
Other:
- Update vcpkg.json with ffmpeg feature flags
- Update resources/wowee.rc version string
2026-03-30 20:17:41 +03:00
set_property(TARGET Vulkan::Vulkan APPEND PROPERTY
INTERFACE_LINK_LIBRARIES Vulkan::Headers)
2026-02-23 18:47:42 -08:00
set(Vulkan_FOUND TRUE)
feat: add multi-platform Docker build system for Linux, macOS, and Windows
Replace the single Ubuntu-based container build with a dedicated
Dockerfile, build script, and launcher for each target platform.
Infrastructure:
- Add .dockerignore to minimize Docker build context
- Add container/builder-linux.Dockerfile (Ubuntu 24.04, GCC, native build)
- Add container/builder-macos.Dockerfile (multi-stage: SDK fetcher + osxcross/Clang 18)
- Add container/builder-windows.Dockerfile (LLVM-MinGW 20240619, vcpkg)
- Add container/macos/sdk-fetcher.py (auto-fetch macOS SDK from Apple catalog)
- Add container/macos/osxcross-toolchain.cmake (auto-detecting CMake toolchain)
- Add container/macos/triplets/arm64-osx-cross.cmake
- Add container/macos/triplets/x64-osx-cross.cmake
- Remove container/builder-ubuntu.Dockerfile (replaced by per-platform Dockerfiles)
- Remove container/build-in-container.sh and container/build-wowee.sh (replaced)
Build scripts (run inside containers):
- Add container/build-linux.sh (tar copy, FidelityFX clone, cmake/ninja)
- Add container/build-macos.sh (arch detection, vcpkg triplet, cross-compile)
- Add container/build-windows.sh (Vulkan import lib via dlltool, cross-compile)
Launcher scripts (run on host):
- Add container/run-linux.sh, run-macos.sh, run-windows.sh (bash)
- Add container/run-linux.ps1, run-macos.ps1, run-windows.ps1 (PowerShell)
Documentation:
- Add container/README.md (quick start, options, file structure, troubleshooting)
- Add container/FLOW.md (comprehensive build flow for each platform)
CMake changes:
- Add macOS cross-compile support (VulkanHeaders, -undefined dynamic_lookup)
- Add LLVM-MinGW/Windows cross-compile support
- Detect osxcross toolchain and vcpkg triplets
Other:
- Update vcpkg.json with ffmpeg feature flags
- Update resources/wowee.rc version string
2026-03-30 20:17:41 +03:00
message(STATUS "Found Vulkan headers for macOS cross-compile via vcpkg VulkanHeaders")
endif()
else()
# Fallback: some distros / CMake versions need pkg-config to locate Vulkan.
find_package(PkgConfig QUIET)
if(PkgConfig_FOUND)
pkg_check_modules(VULKAN_PKG vulkan)
if(VULKAN_PKG_FOUND)
add_library(Vulkan::Vulkan INTERFACE IMPORTED)
set_target_properties(Vulkan::Vulkan PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${VULKAN_PKG_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${VULKAN_PKG_LIBRARIES}"
)
if(VULKAN_PKG_LIBRARY_DIRS)
set_property(TARGET Vulkan::Vulkan APPEND PROPERTY
INTERFACE_LINK_DIRECTORIES "${VULKAN_PKG_LIBRARY_DIRS}")
endif()
set(Vulkan_FOUND TRUE)
message(STATUS "Found Vulkan via pkg-config: ${VULKAN_PKG_LIBRARIES}")
endif()
2026-02-23 18:47:42 -08:00
endif()
endif()
if(NOT Vulkan_FOUND)
message(FATAL_ERROR "Could not find Vulkan. Install libvulkan-dev (Linux), vulkan-loader (macOS), or the Vulkan SDK (Windows).")
endif()
endif()
feat: add multi-platform Docker build system for Linux, macOS, and Windows
Replace the single Ubuntu-based container build with a dedicated
Dockerfile, build script, and launcher for each target platform.
Infrastructure:
- Add .dockerignore to minimize Docker build context
- Add container/builder-linux.Dockerfile (Ubuntu 24.04, GCC, native build)
- Add container/builder-macos.Dockerfile (multi-stage: SDK fetcher + osxcross/Clang 18)
- Add container/builder-windows.Dockerfile (LLVM-MinGW 20240619, vcpkg)
- Add container/macos/sdk-fetcher.py (auto-fetch macOS SDK from Apple catalog)
- Add container/macos/osxcross-toolchain.cmake (auto-detecting CMake toolchain)
- Add container/macos/triplets/arm64-osx-cross.cmake
- Add container/macos/triplets/x64-osx-cross.cmake
- Remove container/builder-ubuntu.Dockerfile (replaced by per-platform Dockerfiles)
- Remove container/build-in-container.sh and container/build-wowee.sh (replaced)
Build scripts (run inside containers):
- Add container/build-linux.sh (tar copy, FidelityFX clone, cmake/ninja)
- Add container/build-macos.sh (arch detection, vcpkg triplet, cross-compile)
- Add container/build-windows.sh (Vulkan import lib via dlltool, cross-compile)
Launcher scripts (run on host):
- Add container/run-linux.sh, run-macos.sh, run-windows.sh (bash)
- Add container/run-linux.ps1, run-macos.ps1, run-windows.ps1 (PowerShell)
Documentation:
- Add container/README.md (quick start, options, file structure, troubleshooting)
- Add container/FLOW.md (comprehensive build flow for each platform)
CMake changes:
- Add macOS cross-compile support (VulkanHeaders, -undefined dynamic_lookup)
- Add LLVM-MinGW/Windows cross-compile support
- Detect osxcross toolchain and vcpkg triplets
Other:
- Update vcpkg.json with ffmpeg feature flags
- Update resources/wowee.rc version string
2026-03-30 20:17:41 +03:00
# macOS cross-compilation: the Vulkan loader (MoltenVK) is not available at link
# time. Allow unresolved Vulkan symbols — they are resolved at runtime.
if(CMAKE_CROSSCOMPILING AND CMAKE_SYSTEM_NAME STREQUAL "Darwin")
2026-03-30 13:40:40 -07:00
set(WOWEE_MACOS_CROSS_COMPILE TRUE)
feat: add multi-platform Docker build system for Linux, macOS, and Windows
Replace the single Ubuntu-based container build with a dedicated
Dockerfile, build script, and launcher for each target platform.
Infrastructure:
- Add .dockerignore to minimize Docker build context
- Add container/builder-linux.Dockerfile (Ubuntu 24.04, GCC, native build)
- Add container/builder-macos.Dockerfile (multi-stage: SDK fetcher + osxcross/Clang 18)
- Add container/builder-windows.Dockerfile (LLVM-MinGW 20240619, vcpkg)
- Add container/macos/sdk-fetcher.py (auto-fetch macOS SDK from Apple catalog)
- Add container/macos/osxcross-toolchain.cmake (auto-detecting CMake toolchain)
- Add container/macos/triplets/arm64-osx-cross.cmake
- Add container/macos/triplets/x64-osx-cross.cmake
- Remove container/builder-ubuntu.Dockerfile (replaced by per-platform Dockerfiles)
- Remove container/build-in-container.sh and container/build-wowee.sh (replaced)
Build scripts (run inside containers):
- Add container/build-linux.sh (tar copy, FidelityFX clone, cmake/ninja)
- Add container/build-macos.sh (arch detection, vcpkg triplet, cross-compile)
- Add container/build-windows.sh (Vulkan import lib via dlltool, cross-compile)
Launcher scripts (run on host):
- Add container/run-linux.sh, run-macos.sh, run-windows.sh (bash)
- Add container/run-linux.ps1, run-macos.ps1, run-windows.ps1 (PowerShell)
Documentation:
- Add container/README.md (quick start, options, file structure, troubleshooting)
- Add container/FLOW.md (comprehensive build flow for each platform)
CMake changes:
- Add macOS cross-compile support (VulkanHeaders, -undefined dynamic_lookup)
- Add LLVM-MinGW/Windows cross-compile support
- Detect osxcross toolchain and vcpkg triplets
Other:
- Update vcpkg.json with ffmpeg feature flags
- Update resources/wowee.rc version string
2026-03-30 20:17:41 +03:00
endif()
2026-02-02 12:24:50 -08:00
find_package(OpenSSL REQUIRED)
find_package(Threads REQUIRED)
2026-02-05 21:03:27 -08:00
find_package(ZLIB REQUIRED)
2026-02-18 17:38:08 -08:00
if(WIN32)
find_package(PkgConfig QUIET)
else()
find_package(PkgConfig REQUIRED)
endif()
if(PkgConfig_FOUND)
2026-02-23 16:30:49 +01:00
pkg_check_modules(FFMPEG libavformat libavcodec libswscale libavutil)
2026-02-18 17:38:08 -08:00
else()
# Fallback for MSVC/vcpkg — find FFmpeg libraries manually
find_path(FFMPEG_INCLUDE_DIRS libavformat/avformat.h)
find_library(AVFORMAT_LIB NAMES avformat)
find_library(AVCODEC_LIB NAMES avcodec)
find_library(AVUTIL_LIB NAMES avutil)
find_library(SWSCALE_LIB NAMES swscale)
set(FFMPEG_LIBRARIES ${AVFORMAT_LIB} ${AVCODEC_LIB} ${AVUTIL_LIB} ${SWSCALE_LIB})
2026-02-23 16:30:49 +01:00
endif()
if(FFMPEG_INCLUDE_DIRS AND AVFORMAT_LIB)
set(HAVE_FFMPEG TRUE)
message(STATUS "Found FFmpeg: ${AVFORMAT_LIB}")
elseif(FFMPEG_FOUND)
set(HAVE_FFMPEG TRUE)
else()
set(HAVE_FFMPEG FALSE)
message(WARNING "FFmpeg not found — video_player will be disabled. Install via vcpkg: ffmpeg:x64-windows")
2026-02-18 17:38:08 -08:00
endif()
2026-02-02 12:24:50 -08:00
2026-02-12 03:01:36 -08:00
# Unicorn Engine (x86 emulator for cross-platform Warden module execution)
find_library(UNICORN_LIBRARY NAMES unicorn)
find_path(UNICORN_INCLUDE_DIR unicorn/unicorn.h)
if(NOT UNICORN_LIBRARY OR NOT UNICORN_INCLUDE_DIR)
message(WARNING "Unicorn Engine not found. Install with: sudo apt-get install libunicorn-dev")
message(WARNING "Warden emulation will be disabled")
set(HAVE_UNICORN FALSE)
else()
message(STATUS "Found Unicorn Engine: ${UNICORN_LIBRARY}")
set(HAVE_UNICORN TRUE)
endif()
2026-02-02 12:24:50 -08:00
# GLM (header-only math library)
find_package(glm QUIET)
if(NOT glm_FOUND)
message(STATUS "GLM not found, will use system includes or download")
endif()
2026-02-18 17:49:52 -08:00
# GLM GTX extensions (quaternion, norm, etc.) require this flag on newer GLM versions
2026-02-21 19:41:21 -08:00
add_compile_definitions(GLM_ENABLE_EXPERIMENTAL GLM_FORCE_DEPTH_ZERO_TO_ONE)
2026-02-23 16:30:49 +01:00
if(WIN32)
add_compile_definitions(NOMINMAX _CRT_SECURE_NO_WARNINGS)
endif()
2026-02-21 19:41:21 -08:00
# SPIR-V shader compilation via glslc
find_program(GLSLC glslc HINTS ${Vulkan_GLSLC_EXECUTABLE} "$ENV{VULKAN_SDK}/bin")
if(GLSLC)
message(STATUS "Found glslc: ${GLSLC}")
else()
message(WARNING "glslc not found. Install the Vulkan SDK or vulkan-tools package.")
message(WARNING "Shaders will not be compiled to SPIR-V.")
endif()
# Function to compile GLSL shaders to SPIR-V
function(compile_shaders TARGET_NAME)
set(SHADER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/assets/shaders)
set(SPV_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/assets/shaders)
file(MAKE_DIRECTORY ${SPV_DIR})
file(GLOB GLSL_SOURCES "${SHADER_DIR}/*.glsl")
set(SPV_OUTPUTS)
foreach(GLSL_FILE ${GLSL_SOURCES})
get_filename_component(FILE_NAME ${GLSL_FILE} NAME)
# e.g. skybox.vert.glsl -> skybox.vert.spv
string(REGEX REPLACE "\\.glsl$" ".spv" SPV_NAME ${FILE_NAME})
set(SPV_FILE ${SPV_DIR}/${SPV_NAME})
# Determine shader stage from filename
if(FILE_NAME MATCHES "\\.vert\\.glsl$")
set(SHADER_STAGE vertex)
elseif(FILE_NAME MATCHES "\\.frag\\.glsl$")
set(SHADER_STAGE fragment)
elseif(FILE_NAME MATCHES "\\.comp\\.glsl$")
set(SHADER_STAGE compute)
elseif(FILE_NAME MATCHES "\\.geom\\.glsl$")
set(SHADER_STAGE geometry)
else()
message(WARNING "Cannot determine shader stage for: ${FILE_NAME}")
continue()
endif()
add_custom_command(
OUTPUT ${SPV_FILE}
COMMAND ${GLSLC} -fshader-stage=${SHADER_STAGE} -O ${GLSL_FILE} -o ${SPV_FILE}
DEPENDS ${GLSL_FILE}
COMMENT "Compiling SPIR-V: ${FILE_NAME} -> ${SPV_NAME}"
VERBATIM
)
list(APPEND SPV_OUTPUTS ${SPV_FILE})
endforeach()
add_custom_target(${TARGET_NAME}_shaders ALL DEPENDS ${SPV_OUTPUTS})
add_dependencies(${TARGET_NAME} ${TARGET_NAME}_shaders)
endfunction()
2026-02-02 12:24:50 -08:00
2026-02-12 20:32:14 -08:00
# StormLib for MPQ extraction tool (not needed for main executable)
2026-02-02 12:24:50 -08:00
find_library(STORMLIB_LIBRARY NAMES StormLib stormlib storm)
find_path(STORMLIB_INCLUDE_DIR StormLib.h PATH_SUFFIXES StormLib)
2026-02-21 19:41:21 -08:00
# Include ImGui as a static library (Vulkan backend)
2026-02-02 12:24:50 -08:00
set(IMGUI_DIR ${CMAKE_CURRENT_SOURCE_DIR}/extern/imgui)
if(EXISTS ${IMGUI_DIR})
add_library(imgui STATIC
${IMGUI_DIR}/imgui.cpp
${IMGUI_DIR}/imgui_draw.cpp
${IMGUI_DIR}/imgui_tables.cpp
${IMGUI_DIR}/imgui_widgets.cpp
${IMGUI_DIR}/imgui_demo.cpp
${IMGUI_DIR}/backends/imgui_impl_sdl2.cpp
2026-02-21 19:41:21 -08:00
${IMGUI_DIR}/backends/imgui_impl_vulkan.cpp
2026-02-02 12:24:50 -08:00
)
target_include_directories(imgui PUBLIC
${IMGUI_DIR}
${IMGUI_DIR}/backends
)
2026-02-21 19:41:21 -08:00
target_link_libraries(imgui PUBLIC SDL2::SDL2 Vulkan::Vulkan ${CMAKE_DL_LIBS})
2026-02-02 12:24:50 -08:00
else()
message(WARNING "ImGui not found in extern/imgui. Clone it with:")
message(WARNING " git clone https://github.com/ocornut/imgui.git extern/imgui")
endif()
2026-02-21 19:41:21 -08:00
# vk-bootstrap (Vulkan device/instance setup)
set(VK_BOOTSTRAP_DIR ${CMAKE_CURRENT_SOURCE_DIR}/extern/vk-bootstrap)
if(EXISTS ${VK_BOOTSTRAP_DIR})
add_library(vk-bootstrap STATIC
${VK_BOOTSTRAP_DIR}/src/VkBootstrap.cpp
)
target_include_directories(vk-bootstrap PUBLIC ${VK_BOOTSTRAP_DIR}/src)
target_link_libraries(vk-bootstrap PUBLIC Vulkan::Vulkan)
else()
message(FATAL_ERROR "vk-bootstrap not found in extern/vk-bootstrap")
endif()
2026-02-02 12:24:50 -08:00
# Source files
set(WOWEE_SOURCES
# Core
src/core/application.cpp
2026-03-31 22:01:55 +03:00
src/core/entity_spawner.cpp
2026-04-05 19:30:44 +03:00
src/core/entity_spawner_player.cpp
src/core/entity_spawner_processing.cpp
2026-04-01 13:31:48 +03:00
src/core/appearance_composer.cpp
2026-04-01 20:06:26 +03:00
src/core/world_loader.cpp
refactor(core): decompose Application::setupUICallbacks() into 7 domain handlers
Extract ~1,700 lines / 60+ inline [this]-capturing lambdas from the monolithic
Application::setupUICallbacks() into 7 focused callback handler classes following
the ToastManager/ChatPanel::setupCallbacks() pattern already in the codebase.
New handlers (include/core/ + src/core/):
- NPCInteractionCallbackHandler NPC greeting/farewell/vendor/aggro voice
- AudioCallbackHandler Music, positional sound, level-up, achievement, LFG
- EntitySpawnCallbackHandler Creature/player/GO spawn, despawn, move, state
- AnimationCallbackHandler Death, respawn, combat, emotes, charge, sprint, vehicle
- TransportCallbackHandler Mount, taxi, transport spawn/move
- WorldEntryCallbackHandler World entry, unstuck, hearthstone, bind point
- UIScreenCallbackHandler Auth, realm selection, char selection/creation/deletion
application.cpp: 4,462 → 2,791 lines (−1,671)
setupUICallbacks: ~1,700 → ~50 lines (thin orchestrator)
Deduplication:
resolveSoundEntryPath() — was 3× copy-paste of SoundEntries.dbc lookup
resolveNpcVoiceType() — was 4× copy-paste of display-ID→voice detection
precacheNearbyTiles() — was 3× copy-paste of 17×17 tile loop
4 helper lambdas — promoted to private methods on WorldEntryCallbackHandler
State migration out of Application:
charge* (6 vars) → AnimationCallbackHandler
hearth*/worldEntry*/taxi* → WorldEntryCallbackHandler
pendingCreatedCharacterName_ → UIScreenCallbackHandler
Bug fixes:
- Duplicate `namespace core {` in application.hpp caused wowee::std pollution
- AppState forward decl in ui_screen_callback_handler.hpp was at wrong scope
- world_loader.cpp accessed moved member vars directly via friend; now uses handler API
2026-04-05 16:48:17 +03:00
src/core/npc_interaction_callback_handler.cpp
src/core/audio_callback_handler.cpp
src/core/entity_spawn_callback_handler.cpp
src/core/animation_callback_handler.cpp
src/core/transport_callback_handler.cpp
src/core/world_entry_callback_handler.cpp
src/core/ui_screen_callback_handler.cpp
2026-02-02 12:24:50 -08:00
src/core/window.cpp
src/core/input.cpp
src/core/logger.cpp
2026-02-08 23:15:26 -08:00
src/core/memory_monitor.cpp
2026-02-02 12:24:50 -08:00
refactor: extract spline math, consolidate packet parsing, decompose TransportManager
Extract CatmullRomSpline (include/math/spline.hpp, src/math/spline.cpp) as a
standalone, immutable, thread-safe spline module with O(log n) binary segment
search and fused position+tangent evaluation — replacing the duplicated O(n)
evalTimedCatmullRom/orientationFromTangent pair in TransportManager.
Consolidate 7 copies of spline packet parsing into shared functions in
game/spline_packet.{hpp,cpp}: parseMonsterMoveSplineBody (WotLK/TBC),
parseMonsterMoveSplineBodyVanilla, parseClassicMoveUpdateSpline,
parseWotlkMoveUpdateSpline, and decodePackedDelta. Named SplineFlag constants
replace magic hex literals throughout.
Extract TransportPathRepository (game/transport_path_repository.{hpp,cpp}) from
TransportManager — owns path data, DBC loading, and path inference. Paths stored
as PathEntry wrapping CatmullRomSpline + metadata (zOnly, fromDBC, worldCoords).
TransportManager reduced from ~1200 to ~500 lines, focused on transport lifecycle
and server sync.
Signed-off-by: Pavel Okhlopkov <pavel.okhlopkov@flant.com>
2026-04-11 08:30:28 +03:00
# Math
src/math/spline.cpp
2026-02-02 12:24:50 -08:00
# Network
src/network/socket.cpp
src/network/packet.cpp
src/network/tcp_socket.cpp
src/network/world_socket.cpp
# Auth
src/auth/auth_handler.cpp
src/auth/auth_opcodes.cpp
src/auth/auth_packets.cpp
2026-02-13 00:22:01 -08:00
src/auth/pin_auth.cpp
2026-02-13 01:32:15 -08:00
src/auth/integrity.cpp
2026-02-02 12:24:50 -08:00
src/auth/srp.cpp
src/auth/big_num.cpp
src/auth/crypto.cpp
src/auth/rc4.cpp
2026-02-13 16:53:28 -08:00
src/auth/vanilla_crypt.cpp
2026-02-02 12:24:50 -08:00
# Game
2026-02-12 22:56:36 -08:00
src/game/expansion_profile.cpp
src/game/opcode_table.cpp
src/game/update_field_table.cpp
2026-02-02 12:24:50 -08:00
src/game/game_handler.cpp
2026-04-05 19:30:44 +03:00
src/game/game_handler_packets.cpp
src/game/game_handler_callbacks.cpp
refactor(game): split GameHandler into domain handlers
Extract domain-specific logic from the monolithic GameHandler into
dedicated handler classes, each owning its own opcode registration,
state, and packet parsing:
- CombatHandler: combat, XP, kill, PvP, loot roll (~26 methods)
- SpellHandler: spells, auras, pet stable, talent (~3+ methods)
- SocialHandler: friends, guild, groups, BG, RAF, PvP AFK (~14+ methods)
- ChatHandler: chat messages, channels, GM tickets, server messages,
defense/area-trigger messages (~7+ methods)
- InventoryHandler: items, trade, loot, mail, vendor, equipment sets,
read item (~3+ methods)
- QuestHandler: gossip, quests, completed quest response (~5+ methods)
- MovementHandler: movement, follow, transport (~2 methods)
- WardenHandler: Warden anti-cheat module
Each handler registers its own dispatch table entries via
registerOpcodes(DispatchTable&), called from
GameHandler::registerOpcodeHandlers(). GameHandler retains core
orchestration: auth/session handshake, update-object parsing,
opcode routing, and cross-handler coordination.
game_handler.cpp reduced from ~10,188 to ~9,432 lines.
Also add a POST_BUILD CMake step to symlink Data/ next to the
executable so expansion profiles and opcode tables are found at
runtime when running from build/bin/.
2026-03-28 09:42:37 +03:00
src/game/chat_handler.cpp
src/game/movement_handler.cpp
src/game/combat_handler.cpp
src/game/spell_handler.cpp
src/game/inventory_handler.cpp
src/game/social_handler.cpp
src/game/quest_handler.cpp
refactor(game): extract EntityController from GameHandler (step 1.3)
Moves entity lifecycle, name/creature/game-object caches, transport GUID
tracking, and the entire update-object pipeline out of GameHandler into a
new EntityController class (friend-class pattern, same as CombatHandler
et al.).
What moved:
- applyUpdateObjectBlock() — 1,520-line core of all entity creation,
field updates, and movement application
- processOutOfRangeObjects() / finalizeUpdateObjectBatch()
- handleUpdateObject() / handleCompressedUpdateObject() / handleDestroyObject()
- handleNameQueryResponse() / handleCreatureQueryResponse()
- handleGameObjectQueryResponse() / handleGameObjectPageText()
- handlePageTextQueryResponse()
- enqueueUpdateObjectWork() / processPendingUpdateObjectWork()
- playerNameCache, playerClassRaceCache_, pendingNameQueries
- creatureInfoCache, pendingCreatureQueries
- gameObjectInfoCache_, pendingGameObjectQueries_
- transportGuids_, serverUpdatedTransportGuids_
- EntityManager (accessed by other handlers via getEntityManager())
8 opcodes re-registered by EntityController::registerOpcodes():
SMSG_UPDATE_OBJECT, SMSG_COMPRESSED_UPDATE_OBJECT, SMSG_DESTROY_OBJECT,
SMSG_NAME_QUERY_RESPONSE, SMSG_CREATURE_QUERY_RESPONSE,
SMSG_GAMEOBJECT_QUERY_RESPONSE, SMSG_GAMEOBJECT_PAGETEXT,
SMSG_PAGE_TEXT_QUERY_RESPONSE
Other handler files (combat, movement, social, spell, inventory, quest,
chat) updated to access EntityManager via getEntityManager() and the
name cache via getPlayerNameCache() — no logic changes.
Also included:
- .clang-tidy: add modernize-use-nodiscard,
modernize-use-designated-initializers; set -std=c++20 in ExtraArgs
- test.sh: prepend clang's own resource include dir before GCC's to
silence xmmintrin.h / ia32intrin.h conflicts during clang-tidy runs
Line counts:
entity_controller.hpp 147 lines (new)
entity_controller.cpp 2172 lines (new)
game_handler.cpp 8095 lines (was 10143, −2048)
Build: 0 errors, 0 warnings.
2026-03-29 08:21:27 +03:00
src/game/entity_controller.cpp
refactor(game): split GameHandler into domain handlers
Extract domain-specific logic from the monolithic GameHandler into
dedicated handler classes, each owning its own opcode registration,
state, and packet parsing:
- CombatHandler: combat, XP, kill, PvP, loot roll (~26 methods)
- SpellHandler: spells, auras, pet stable, talent (~3+ methods)
- SocialHandler: friends, guild, groups, BG, RAF, PvP AFK (~14+ methods)
- ChatHandler: chat messages, channels, GM tickets, server messages,
defense/area-trigger messages (~7+ methods)
- InventoryHandler: items, trade, loot, mail, vendor, equipment sets,
read item (~3+ methods)
- QuestHandler: gossip, quests, completed quest response (~5+ methods)
- MovementHandler: movement, follow, transport (~2 methods)
- WardenHandler: Warden anti-cheat module
Each handler registers its own dispatch table entries via
registerOpcodes(DispatchTable&), called from
GameHandler::registerOpcodeHandlers(). GameHandler retains core
orchestration: auth/session handshake, update-object parsing,
opcode routing, and cross-handler coordination.
game_handler.cpp reduced from ~10,188 to ~9,432 lines.
Also add a POST_BUILD CMake step to symlink Data/ next to the
executable so expansion profiles and opcode tables are found at
runtime when running from build/bin/.
2026-03-28 09:42:37 +03:00
src/game/warden_handler.cpp
2026-02-12 02:09:15 -08:00
src/game/warden_crypto.cpp
2026-02-12 02:43:20 -08:00
src/game/warden_module.cpp
2026-02-12 03:01:36 -08:00
src/game/warden_emulator.cpp
2026-02-14 02:00:15 -08:00
src/game/warden_memory.cpp
2026-02-10 21:29:10 -08:00
src/game/transport_manager.cpp
refactor: extract spline math, consolidate packet parsing, decompose TransportManager
Extract CatmullRomSpline (include/math/spline.hpp, src/math/spline.cpp) as a
standalone, immutable, thread-safe spline module with O(log n) binary segment
search and fused position+tangent evaluation — replacing the duplicated O(n)
evalTimedCatmullRom/orientationFromTangent pair in TransportManager.
Consolidate 7 copies of spline packet parsing into shared functions in
game/spline_packet.{hpp,cpp}: parseMonsterMoveSplineBody (WotLK/TBC),
parseMonsterMoveSplineBodyVanilla, parseClassicMoveUpdateSpline,
parseWotlkMoveUpdateSpline, and decodePackedDelta. Named SplineFlag constants
replace magic hex literals throughout.
Extract TransportPathRepository (game/transport_path_repository.{hpp,cpp}) from
TransportManager — owns path data, DBC loading, and path inference. Paths stored
as PathEntry wrapping CatmullRomSpline + metadata (zOnly, fromDBC, worldCoords).
TransportManager reduced from ~1200 to ~500 lines, focused on transport lifecycle
and server sync.
Signed-off-by: Pavel Okhlopkov <pavel.okhlopkov@flant.com>
2026-04-11 08:30:28 +03:00
src/game/transport_path_repository.cpp
2026-04-11 09:50:38 +03:00
src/game/transport_clock_sync.cpp
src/game/transport_animator.cpp
2026-02-02 12:24:50 -08:00
src/game/world.cpp
src/game/player.cpp
src/game/entity.cpp
src/game/opcodes.cpp
src/game/world_packets.cpp
2026-04-05 19:30:44 +03:00
src/game/world_packets_social.cpp
src/game/world_packets_entity.cpp
src/game/world_packets_world.cpp
src/game/world_packets_economy.cpp
refactor: extract spline math, consolidate packet parsing, decompose TransportManager
Extract CatmullRomSpline (include/math/spline.hpp, src/math/spline.cpp) as a
standalone, immutable, thread-safe spline module with O(log n) binary segment
search and fused position+tangent evaluation — replacing the duplicated O(n)
evalTimedCatmullRom/orientationFromTangent pair in TransportManager.
Consolidate 7 copies of spline packet parsing into shared functions in
game/spline_packet.{hpp,cpp}: parseMonsterMoveSplineBody (WotLK/TBC),
parseMonsterMoveSplineBodyVanilla, parseClassicMoveUpdateSpline,
parseWotlkMoveUpdateSpline, and decodePackedDelta. Named SplineFlag constants
replace magic hex literals throughout.
Extract TransportPathRepository (game/transport_path_repository.{hpp,cpp}) from
TransportManager — owns path data, DBC loading, and path inference. Paths stored
as PathEntry wrapping CatmullRomSpline + metadata (zOnly, fromDBC, worldCoords).
TransportManager reduced from ~1200 to ~500 lines, focused on transport lifecycle
and server sync.
Signed-off-by: Pavel Okhlopkov <pavel.okhlopkov@flant.com>
2026-04-11 08:30:28 +03:00
src/game/spline_packet.cpp
2026-02-12 22:56:36 -08:00
src/game/packet_parsers_tbc.cpp
src/game/packet_parsers_classic.cpp
2026-02-02 12:24:50 -08:00
src/game/character.cpp
src/game/zone_manager.cpp
src/game/inventory.cpp
# Audio
2026-02-09 00:40:50 -08:00
src/audio/audio_engine.cpp
2026-04-01 20:38:37 +03:00
src/audio/audio_coordinator.cpp
2026-02-02 12:24:50 -08:00
src/audio/music_manager.cpp
2026-02-03 14:55:32 -08:00
src/audio/footstep_manager.cpp
2026-02-03 19:49:56 -08:00
src/audio/activity_sound_manager.cpp
2026-02-09 01:04:53 -08:00
src/audio/mount_sound_manager.cpp
2026-02-09 01:29:44 -08:00
src/audio/npc_voice_manager.cpp
2026-02-09 14:50:14 -08:00
src/audio/ambient_sound_manager.cpp
2026-02-09 16:30:47 -08:00
src/audio/ui_sound_manager.cpp
2026-02-09 16:38:50 -08:00
src/audio/combat_sound_manager.cpp
Add comprehensive spell sound manager with 35+ magic sounds
Implemented complete spell casting audio system with all magic schools:
Magic schools supported:
- Fire: Precast (Low/Medium/High), Cast, Fireball impacts
- Frost: Precast (Low/Medium/High), Cast, Blizzard impacts
- Holy: Precast (Low/Medium/High), Cast, Holy impacts (4 levels)
- Nature: Precast (Low/Medium/High), Cast
- Shadow: Precast (Low/Medium/High), Cast
- Arcane: Precast, Arcane Missile impacts
- Physical: Non-magical abilities
Spell phases:
- Precast: Channeling/preparation sounds (before cast)
- Cast: Spell release sounds (when spell fires)
- Impact: Spell hit sounds (when spell hits target)
Power levels:
- Low: Weak spells, low level abilities
- Medium: Standard power spells
- High: Powerful high-level spells
Sound coverage (35+ sounds):
- 16 precast sounds (Fire/Frost/Holy/Nature/Shadow × Low/Med/High + Arcane)
- 5 cast sounds (one per school)
- 16 impact sounds (Fireball ×3, Blizzard ×6, Holy ×4, Arcane Missile ×3)
Technical details:
- Loads 35+ sound files from Sound\Spells directory
- Simple API: playPrecast(school, power), playCast(school), playImpact(school, power)
- Convenience methods: playFireball(), playFrostbolt(), playHeal(), etc.
- Random variation selection for impacts
- Volume at 0.75 with global scale control
- Ready for integration with spell casting system
Usage examples:
```cpp
// Full spell sequence
spellSoundManager->playPrecast(MagicSchool::FIRE, SpellPower::HIGH);
// ... cast time ...
spellSoundManager->playCast(MagicSchool::FIRE);
// ... projectile travel ...
spellSoundManager->playImpact(MagicSchool::FIRE, SpellPower::HIGH);
// Convenience methods
spellSoundManager->playFireball();
spellSoundManager->playHeal();
```
This adds essential magic feedback for spell casting gameplay!
2026-02-09 16:45:30 -08:00
src/audio/spell_sound_manager.cpp
2026-02-09 16:50:37 -08:00
src/audio/movement_sound_manager.cpp
2026-02-02 12:24:50 -08:00
# Pipeline (asset loaders)
src/pipeline/blp_loader.cpp
src/pipeline/dbc_loader.cpp
src/pipeline/asset_manager.cpp
2026-02-12 20:32:14 -08:00
src/pipeline/asset_manifest.cpp
src/pipeline/loose_file_reader.cpp
2026-02-02 12:24:50 -08:00
src/pipeline/m2_loader.cpp
src/pipeline/wmo_loader.cpp
src/pipeline/adt_loader.cpp
2026-02-26 17:56:11 -08:00
src/pipeline/wdt_loader.cpp
2026-05-05 09:56:24 -07:00
src/pipeline/wowee_terrain_loader.cpp
2026-05-05 10:24:46 -07:00
src/pipeline/wowee_model.cpp
2026-05-06 10:32:17 -07:00
src/pipeline/wowee_model_fromm2.cpp
2026-05-05 10:28:24 -07:00
src/pipeline/wowee_building.cpp
2026-05-05 15:23:58 -07:00
src/pipeline/wowee_collision.cpp
2026-05-05 10:01:05 -07:00
src/pipeline/custom_zone_discovery.cpp
2026-02-12 22:56:36 -08:00
src/pipeline/dbc_layout.cpp
2026-02-15 04:18:34 -08:00
2026-02-02 12:24:50 -08:00
src/pipeline/terrain_mesh.cpp
2026-02-21 19:41:21 -08:00
# Rendering (Vulkan infrastructure)
src/rendering/vk_context.cpp
src/rendering/vk_utils.cpp
src/rendering/vk_shader.cpp
src/rendering/vk_texture.cpp
src/rendering/vk_buffer.cpp
src/rendering/vk_pipeline.cpp
src/rendering/vk_render_target.cpp
2026-02-02 12:24:50 -08:00
# Rendering
src/rendering/renderer.cpp
2026-03-08 23:13:08 -07:00
src/rendering/amd_fsr3_runtime.cpp
2026-02-02 12:24:50 -08:00
src/rendering/camera.cpp
src/rendering/camera_controller.cpp
src/rendering/material.cpp
src/rendering/terrain_renderer.cpp
src/rendering/terrain_manager.cpp
src/rendering/frustum.cpp
src/rendering/performance_hud.cpp
src/rendering/water_renderer.cpp
src/rendering/skybox.cpp
src/rendering/celestial.cpp
src/rendering/starfield.cpp
src/rendering/clouds.cpp
src/rendering/lens_flare.cpp
src/rendering/weather.cpp
src/rendering/lightning.cpp
2026-02-10 13:44:22 -08:00
src/rendering/lighting_manager.cpp
Implement WoW-accurate DBC-driven sky system with lore-faithful celestial bodies
Add SkySystem coordinator that follows WoW's actual architecture where skyboxes
are authoritative and procedural elements serve as fallbacks. Integrate lighting
system across all renderers (terrain, WMO, M2, character) with unified parameters.
Sky System:
- SkySystem coordinator manages skybox, celestial bodies, stars, clouds, lens flare
- Skybox is authoritative (baked stars from M2 models, procedural fallback only)
- skyboxHasStars flag gates procedural star rendering (prevents double-star bug)
Celestial Bodies (Lore-Accurate):
- Two moons: White Lady (30-day cycle, pale white) + Blue Child (27-day cycle, pale blue)
- Deterministic moon phases from server gameTime (not deltaTime toys)
- Sun positioning driven by LightingManager directionalDir (DBC-sourced)
- Camera-locked sky dome (translation ignored, rotation applied)
Lighting Integration:
- Apply LightingManager params to WMO, M2, character renderers
- Unified lighting: directional light, diffuse color, ambient color, fog
- Star occlusion by cloud density (70% weight) and fog density (30% weight)
Documentation:
- Add comprehensive SKY_SYSTEM.md technical guide
- Update MEMORY.md with sky system architecture and anti-patterns
- Update README.md with WoW-accurate descriptions
Critical design decisions:
- NO latitude-based star rotation (Azeroth not modeled as spherical planet)
- NO always-on procedural stars (skybox authority prevents zone identity loss)
- NO universal dual-moon setup (map-specific celestial configurations)
2026-02-10 14:36:17 -08:00
src/rendering/sky_system.cpp
2026-02-02 12:24:50 -08:00
src/rendering/character_renderer.cpp
2026-02-05 14:55:42 -08:00
src/rendering/character_preview.cpp
2026-02-02 12:24:50 -08:00
src/rendering/wmo_renderer.cpp
src/rendering/m2_renderer.cpp
2026-04-05 19:30:44 +03:00
src/rendering/m2_renderer_render.cpp
src/rendering/m2_renderer_particles.cpp
src/rendering/m2_renderer_instance.cpp
2026-03-24 19:55:24 +03:00
src/rendering/m2_model_classifier.cpp
feat(rendering): GPU architecture + visual quality fixes
M2 GPU instancing
- M2InstanceGPU SSBO (96 B/entry, double-buffered, 16384 max)
- Group opaque instances by (modelId, LOD); single vkCmdDrawIndexed per group
- boneBase field indexes into mega bone SSBO via gl_InstanceIndex
Indirect terrain drawing
- 24 MB mega index buffer (6M uint32) + 64 MB mega vertex buffer
- CPU builds VkDrawIndexedIndirectCommand per visible chunk
- Single VB/IB bind per frame; shadow pass reuses mega buffers
- Replaced vkCmdDrawIndexedIndirect with direct vkCmdDrawIndexed to fix
host-mapped buffer race condition that caused terrain flickering
GPU frustum culling (compute shader)
- m2_cull.comp.glsl: 64-thread workgroups, sphere-vs-6-planes + distance cull
- CullInstanceGPU SSBO input, uint visibility[] output, double-buffered
- dispatchCullCompute() runs before main pass via render graph node
Consolidated bone matrix SSBOs
- 16 MB double-buffered mega bone SSBO (2048 instances × 128 bones)
- Eliminated per-instance descriptor sets; one megaBoneSet_ per frame
- prepareRender() packs bone matrices consecutively into current frame slot
Render graph / frame graph
- RenderGraph: RGResource handles, RGPass nodes, Kahn topological sort
- Automatic VkImageMemoryBarrier/VkBufferMemoryBarrier between passes
- Passes: minimap_composite, worldmap_composite, preview_composite,
shadow_pass, reflection_pass, compute_cull
- beginFrame() uses buildFrameGraph() + renderGraph_->execute(cmd)
Pipeline derivatives
- PipelineBuilder::setFlags/setBasePipeline for VK_PIPELINE_CREATE_DERIVATIVE_BIT
- M2 opaque = base; alphaTest/alpha/additive are derivatives
- Applied to terrain (wireframe) and WMO (alpha-test) renderers
Rendering bug fixes:
- fix(shadow): compute lightSpaceMatrix before updatePerFrameUBO to eliminate
one-frame lag that caused shadow trails and flicker on moving objects
- fix(shadow): scale depth bias with shadowDistance_ instead of hardcoded 0.8f
to prevent acne at close range and gaps at far range
- fix(visibility): WMO group distance threshold 500u → 1200u to match terrain
view distance; buildings were disappearing on the horizon
- fix(precision): camera near plane 0.05 → 0.5 (ratio 600K:1 → 60K:1),
eliminating Z-fighting and improving frustum plane extraction stability
- fix(streaming): terrain load radius 4 → 6 tiles (~2133u → ~3200u) to exceed
M2 render distance (2800u) and eliminate pop-in when camera turns;
unload radius 7 → 9; spawn radius 3 → 4
- fix(visibility): ground-detail M2 distance multiplier 0.75 → 0.9 to reduce
early pop of grass and debris
2026-04-04 13:43:16 +03:00
src/rendering/render_graph.cpp
feat(rendering): add HiZ occlusion culling & fix WMO interior shadows
Implement GPU-driven Hierarchical-Z occlusion culling for M2 doodads
using a depth pyramid built from the previous frame's depth buffer.
The cull shader projects bounding spheres via prevViewProj (temporal
reprojection) and samples the HiZ pyramid to reject hidden objects
before the main render pass.
Key implementation details:
- Separate early compute submission (beginSingleTimeCommands + fence
wait) eliminates 2-frame visibility staleness
- Conservative safeguards prevent false culls: screen-edge guard,
full VP row-vector AABB projection (Cauchy-Schwarz), 50% sphere
inflation, depth bias, mip+1, min screen size threshold, camera
motion dampening (auto-disable on fast rotations), and per-instance
previouslyVisible flag tracking
- Graceful fallback to frustum-only culling if HiZ init fails
Fix dark WMO interiors by gating shadow map sampling on isInterior==0
in the WMO fragment shader. Interior groups (flag 0x2000) now rely
solely on pre-baked MOCV vertex-color lighting + MOHD ambient color.
Disable interiorDarken globally (was incorrectly darkening outdoor M2s
when camera was inside a WMO). Use isInsideInteriorWMO() instead of
isInsideWMO() for correct indoor detection.
New files:
- hiz_system.hpp/cpp: pyramid image management, compute pipeline,
descriptors, mip-chain build dispatch, resize handling
- hiz_build.comp.glsl: MAX-depth 2x2 reduction compute shader
- m2_cull_hiz.comp.glsl: frustum + HiZ occlusion cull compute shader
- test_indoor_shadows.cpp: 14 unit tests for shadow/interior contracts
Modified:
- CullUniformsGPU expanded 128->272 bytes (HiZ params, viewProj,
prevViewProj)
- Depth buffer images gain VK_IMAGE_USAGE_SAMPLED_BIT for HiZ reads
- wmo.frag.glsl: interior branch before unlit, shadow skip for 0x2000
- Render graph: hiz_build + compute_cull disabled (run in early compute)
- .gitignore: ignore compiled .spv binaries
- MEGA_BONE_MAX_INSTANCES: 2048 -> 4096
Signed-off-by: Pavel Okhlopkov <pavel.okhlopkov@flant.com>
2026-04-06 16:40:59 +03:00
src/rendering/hiz_system.cpp
2026-02-09 23:41:38 -08:00
src/rendering/quest_marker_renderer.cpp
2026-02-02 12:24:50 -08:00
src/rendering/minimap.cpp
refactor: decompose world map into modular component architecture
Break the monolithic 1360-line world_map.cpp into 16 focused modules
under src/rendering/world_map/:
Architecture:
- world_map_facade: public API composing all components (PIMPL)
- world_map_types: Vulkan-free domain types (Zone, ViewLevel, etc.)
- data_repository: DBC zone loading, ZMP pixel map, POI/overlay storage
- coordinate_projection: UV projection, zone/continent lookups
- composite_renderer: Vulkan tile pipeline + off-screen compositing
- exploration_state: server mask + local exploration tracking
- view_state_machine: COSMIC→WORLD→CONTINENT→ZONE navigation
- input_handler: keyboard/mouse input → InputAction mapping
- overlay_renderer: layer-based ImGui overlay system (OCP)
- map_resolver: cross-map navigation (Outland, Northrend, etc.)
- zone_metadata: level ranges and faction data
Overlay layers (each an IOverlayLayer):
- player_marker, party_dot, taxi_node, poi_marker, quest_poi,
corpse_marker, zone_highlight, coordinate_display, subzone_tooltip
Fixes:
- Player marker no longer bleeds across continents (only shown when
player is in a zone belonging to the displayed continent)
- Zone hover uses DBC-projected AABB rectangles (restored from
original working behavior)
- Exploration overlay rendering for zone view subzones
Tests:
- 6 new test files covering coordinate projection, exploration state,
map resolver, view state machine, zone metadata, and integration
Signed-off-by: Pavel Okhlopkov <pavel.okhlopkov@flant.com>
2026-04-12 09:52:51 +03:00
src/rendering/world_map/coordinate_projection.cpp
src/rendering/world_map/map_resolver.cpp
src/rendering/world_map/exploration_state.cpp
src/rendering/world_map/zone_metadata.cpp
src/rendering/world_map/data_repository.cpp
src/rendering/world_map/view_state_machine.cpp
src/rendering/world_map/composite_renderer.cpp
src/rendering/world_map/overlay_renderer.cpp
src/rendering/world_map/input_handler.cpp
src/rendering/world_map/world_map_facade.cpp
src/rendering/world_map/layers/player_marker_layer.cpp
src/rendering/world_map/layers/party_dot_layer.cpp
src/rendering/world_map/layers/taxi_node_layer.cpp
src/rendering/world_map/layers/poi_marker_layer.cpp
src/rendering/world_map/layers/quest_poi_layer.cpp
src/rendering/world_map/layers/corpse_marker_layer.cpp
src/rendering/world_map/layers/zone_highlight_layer.cpp
src/rendering/world_map/layers/coordinate_display.cpp
src/rendering/world_map/layers/subzone_tooltip_layer.cpp
2026-02-02 12:24:50 -08:00
src/rendering/swim_effects.cpp
2026-02-09 01:24:17 -08:00
src/rendering/mount_dust.cpp
2026-02-19 20:36:25 -08:00
src/rendering/levelup_effect.cpp
2026-02-19 21:13:13 -08:00
src/rendering/charge_effect.cpp
2026-04-02 00:21:21 +03:00
src/rendering/spell_visual_system.cpp
src/rendering/post_process_pipeline.cpp
2026-04-05 19:30:44 +03:00
src/rendering/overlay_system.cpp
chore(renderer): extract AnimationController and remove audio pass-throughs
Extract ~1,500 lines of character animation state from Renderer into a dedicated
AnimationController class, and complete the AudioCoordinator migration by removing
all 10 audio pass-through getters from Renderer.
AnimationController:
- New: include/rendering/animation_controller.hpp (182 lines)
- New: src/rendering/animation_controller.cpp (1,703 lines)
- Moves: locomotion state machine (50+ members), mount animation (40+ members),
emote system, footstep triggering, surface detection, melee combat animations
- Renderer holds std::unique_ptr<AnimationController> and delegates completely
- AnimationController accesses audio via renderer_->getAudioCoordinator()
Audio caller migration:
- Migrate ~60 external callers from renderer->getXManager() to AudioCoordinator
directly, grouped by access pattern:
- UIServices: settings_panel, game_screen, toast_manager, chat_panel,
combat_ui, window_manager
- GameServices: game_handler, spell_handler, inventory_handler, quest_handler,
social_handler, combat_handler
- Application singleton: application.cpp, auth_screen.cpp, lua_engine.cpp
- Remove 10 pass-through getter definitions from renderer.cpp
- Remove 10 pass-through getter declarations from renderer.hpp
- Remove individual audio manager forward declarations from renderer.hpp
- Redirect 69 internal renderer.cpp audio calls to audioCoordinator_ directly
- game_handler.cpp: withSoundManager template uses services_.audioCoordinator;
MFP changed from &Renderer::getUiSoundManager to &AudioCoordinator::getUiSoundManager
- GameServices struct: add AudioCoordinator* audioCoordinator member
- settings_panel: applyAudioVolumes(Renderer*) -> applyAudioVolumes(AudioCoordinator*)
2026-04-02 13:06:31 +03:00
src/rendering/animation_controller.cpp
2026-04-05 12:27:35 +03:00
src/rendering/animation/animation_ids.cpp
src/rendering/animation/emote_registry.cpp
src/rendering/animation/footstep_driver.cpp
src/rendering/animation/sfx_state_driver.cpp
src/rendering/animation/anim_capability_probe.cpp
src/rendering/animation/locomotion_fsm.cpp
src/rendering/animation/combat_fsm.cpp
src/rendering/animation/activity_fsm.cpp
src/rendering/animation/mount_fsm.cpp
src/rendering/animation/character_animator.cpp # Renamed from player_animator.cpp; npc_animator.cpp removed
src/rendering/animation/animation_manager.cpp
2026-02-03 13:33:31 -08:00
src/rendering/loading_screen.cpp
2026-02-02 12:24:50 -08:00
# UI
src/ui/ui_manager.cpp
src/ui/auth_screen.cpp
src/ui/realm_screen.cpp
2026-02-05 14:13:48 -08:00
src/ui/character_create_screen.cpp
2026-02-02 12:24:50 -08:00
src/ui/character_screen.cpp
src/ui/game_screen.cpp
2026-04-05 19:30:44 +03:00
src/ui/game_screen_frames.cpp
src/ui/game_screen_hud.cpp
src/ui/game_screen_minimap.cpp
2026-03-31 08:53:14 +03:00
src/ui/chat_panel.cpp
refactor(chat): decompose into modular architecture, add GM commands, fix protocol
- Extract ChatPanel monolith into 15+ focused modules under ui/chat/
(ChatInput, ChatTabManager, ChatTabCompleter, ChatMarkupParser,
ChatMarkupRenderer, ChatCommandRegistry, ChatBubbleManager,
ChatSettings, MacroEvaluator, GameStateAdapter, InputModifierAdapter)
- Split 2700-line chat_panel_commands.cpp into 11 command modules
- Add GM command handling: 190-command data table, dot-prefix interception,
tab-completion, /gmhelp with category filter
- Fix ChatType enum to match WoW wire protocol (SAY=0x01 not 0x00);
values 0x00-0x1B shared across Vanilla/TBC/WotLK
- Fix BG_SYSTEM_* values from 82-84 (UB in bitmask shifts) to 0x24-0x26
- Fix infinite Enter key loop after teleport (disable TOGGLE_CHAT repeat,
add 2-frame input cooldown)
- Add tests: chat_markup_parser, chat_tab_completer, gm_commands,
macro_evaluator
Signed-off-by: Pavel Okhlopkov <pavel.okhlopkov@flant.com>
2026-04-12 14:59:56 +03:00
src/ui/chat/chat_settings.cpp
src/ui/chat/chat_input.cpp
2026-04-12 15:46:03 +03:00
src/ui/chat/chat_utils.cpp
refactor(chat): decompose into modular architecture, add GM commands, fix protocol
- Extract ChatPanel monolith into 15+ focused modules under ui/chat/
(ChatInput, ChatTabManager, ChatTabCompleter, ChatMarkupParser,
ChatMarkupRenderer, ChatCommandRegistry, ChatBubbleManager,
ChatSettings, MacroEvaluator, GameStateAdapter, InputModifierAdapter)
- Split 2700-line chat_panel_commands.cpp into 11 command modules
- Add GM command handling: 190-command data table, dot-prefix interception,
tab-completion, /gmhelp with category filter
- Fix ChatType enum to match WoW wire protocol (SAY=0x01 not 0x00);
values 0x00-0x1B shared across Vanilla/TBC/WotLK
- Fix BG_SYSTEM_* values from 82-84 (UB in bitmask shifts) to 0x24-0x26
- Fix infinite Enter key loop after teleport (disable TOGGLE_CHAT repeat,
add 2-frame input cooldown)
- Add tests: chat_markup_parser, chat_tab_completer, gm_commands,
macro_evaluator
Signed-off-by: Pavel Okhlopkov <pavel.okhlopkov@flant.com>
2026-04-12 14:59:56 +03:00
src/ui/chat/chat_tab_manager.cpp
src/ui/chat/chat_bubble_manager.cpp
src/ui/chat/chat_markup_parser.cpp
src/ui/chat/chat_markup_renderer.cpp
2026-04-12 15:46:03 +03:00
src/ui/chat/item_tooltip_renderer.cpp
refactor(chat): decompose into modular architecture, add GM commands, fix protocol
- Extract ChatPanel monolith into 15+ focused modules under ui/chat/
(ChatInput, ChatTabManager, ChatTabCompleter, ChatMarkupParser,
ChatMarkupRenderer, ChatCommandRegistry, ChatBubbleManager,
ChatSettings, MacroEvaluator, GameStateAdapter, InputModifierAdapter)
- Split 2700-line chat_panel_commands.cpp into 11 command modules
- Add GM command handling: 190-command data table, dot-prefix interception,
tab-completion, /gmhelp with category filter
- Fix ChatType enum to match WoW wire protocol (SAY=0x01 not 0x00);
values 0x00-0x1B shared across Vanilla/TBC/WotLK
- Fix BG_SYSTEM_* values from 82-84 (UB in bitmask shifts) to 0x24-0x26
- Fix infinite Enter key loop after teleport (disable TOGGLE_CHAT repeat,
add 2-frame input cooldown)
- Add tests: chat_markup_parser, chat_tab_completer, gm_commands,
macro_evaluator
Signed-off-by: Pavel Okhlopkov <pavel.okhlopkov@flant.com>
2026-04-12 14:59:56 +03:00
src/ui/chat/chat_command_registry.cpp
src/ui/chat/chat_tab_completer.cpp
src/ui/chat/macro_evaluator.cpp
2026-04-12 15:46:03 +03:00
src/ui/chat/macro_eval_convenience.cpp
refactor(chat): decompose into modular architecture, add GM commands, fix protocol
- Extract ChatPanel monolith into 15+ focused modules under ui/chat/
(ChatInput, ChatTabManager, ChatTabCompleter, ChatMarkupParser,
ChatMarkupRenderer, ChatCommandRegistry, ChatBubbleManager,
ChatSettings, MacroEvaluator, GameStateAdapter, InputModifierAdapter)
- Split 2700-line chat_panel_commands.cpp into 11 command modules
- Add GM command handling: 190-command data table, dot-prefix interception,
tab-completion, /gmhelp with category filter
- Fix ChatType enum to match WoW wire protocol (SAY=0x01 not 0x00);
values 0x00-0x1B shared across Vanilla/TBC/WotLK
- Fix BG_SYSTEM_* values from 82-84 (UB in bitmask shifts) to 0x24-0x26
- Fix infinite Enter key loop after teleport (disable TOGGLE_CHAT repeat,
add 2-frame input cooldown)
- Add tests: chat_markup_parser, chat_tab_completer, gm_commands,
macro_evaluator
Signed-off-by: Pavel Okhlopkov <pavel.okhlopkov@flant.com>
2026-04-12 14:59:56 +03:00
src/ui/chat/game_state_adapter.cpp
src/ui/chat/input_modifier_adapter.cpp
src/ui/chat/commands/system_commands.cpp
src/ui/chat/commands/social_commands.cpp
src/ui/chat/commands/channel_commands.cpp
src/ui/chat/commands/combat_commands.cpp
src/ui/chat/commands/group_commands.cpp
src/ui/chat/commands/guild_commands.cpp
src/ui/chat/commands/target_commands.cpp
src/ui/chat/commands/emote_commands.cpp
src/ui/chat/commands/misc_commands.cpp
src/ui/chat/commands/help_commands.cpp
src/ui/chat/commands/gm_commands.cpp
2026-03-31 09:18:17 +03:00
src/ui/toast_manager.cpp
2026-03-31 10:07:58 +03:00
src/ui/dialog_manager.cpp
src/ui/settings_panel.cpp
2026-03-31 19:49:52 +03:00
src/ui/combat_ui.cpp
src/ui/social_panel.cpp
src/ui/action_bar_panel.cpp
src/ui/window_manager.cpp
2026-02-02 12:24:50 -08:00
src/ui/inventory_screen.cpp
2026-02-06 13:47:03 -08:00
src/ui/quest_log_screen.cpp
2026-02-04 11:31:08 -08:00
src/ui/spellbook_screen.cpp
2026-02-06 16:04:25 -08:00
src/ui/talent_screen.cpp
2026-03-11 06:26:57 -07:00
src/ui/keybinding_manager.cpp
2026-02-02 12:24:50 -08:00
2026-03-20 11:12:07 -07:00
# Addons
src/addons/addon_manager.cpp
src/addons/lua_engine.cpp
`chore(lua): refactor addon Lua engine API + progress docs`
- Refactor Lua addon integration:
- Update CMakeLists.txt for addon build paths
- Enhance addons API headers and Lua engine interface
- Add new Lua API addon modules (`lua_api_helpers`, `lua_api_registrations`, `lua_services`, `lua_action_api`, `lua_inventory_api`, `lua_quest_api`, `lua_social_api`, `lua_spell_api`, `lua_system_api`, `lua_unit_api`)
- Update implementation in addon_manager.cpp, lua_engine.cpp, application.cpp, game_handler.cpp
2026-04-03 07:31:06 +03:00
src/addons/lua_unit_api.cpp
src/addons/lua_spell_api.cpp
src/addons/lua_inventory_api.cpp
src/addons/lua_quest_api.cpp
src/addons/lua_social_api.cpp
src/addons/lua_system_api.cpp
src/addons/lua_action_api.cpp
2026-03-20 11:12:07 -07:00
src/addons/toc_parser.cpp
2026-02-02 12:24:50 -08:00
# Main
src/main.cpp
)
set(WOWEE_HEADERS
include/core/application.hpp
include/core/window.hpp
include/core/input.hpp
include/core/logger.hpp
include/network/socket.hpp
include/network/packet.hpp
include/network/tcp_socket.hpp
2026-02-03 22:24:17 -08:00
include/network/world_socket.hpp
include/network/net_platform.hpp
include/platform/process.hpp
2026-02-02 12:24:50 -08:00
include/auth/auth_handler.hpp
include/auth/auth_opcodes.hpp
include/auth/auth_packets.hpp
include/auth/srp.hpp
include/auth/big_num.hpp
include/auth/crypto.hpp
include/game/game_handler.hpp
include/game/world.hpp
include/game/player.hpp
include/game/entity.hpp
include/game/opcodes.hpp
include/game/zone_manager.hpp
include/game/inventory.hpp
Add gameplay systems: combat, spells, groups, loot, vendors, and UI
Implement ~70 new protocol opcodes across 5 phases while maintaining
full 3.3.5a private server compatibility:
- Phase 1: Server-aware targeting (CMSG_SET_SELECTION), player/creature
name queries, CMSG_SET_ACTIVE_MOVER after login
- Phase 2: Auto-attack, melee/spell damage parsing, health/mana/power
tracking from UPDATE_OBJECT fields, floating combat text
- Phase 3: Spell casting, action bar (12 slots, keys 1-=), cast bar,
cooldown tracking, aura/buff system with cancellation
- Phase 4: Group invite/accept/decline/leave, party frames UI,
/invite chat command
- Phase 5: Loot window, NPC gossip dialog, vendor buy/sell interface
Also: disable debug HUD/panels by default, gate 3D rendering to
IN_GAME state only, fix window resize not updating UI positions.
2026-02-04 10:30:52 -08:00
include/game/spell_defines.hpp
include/game/group_defines.hpp
include/game/world_packets.hpp
include/game/character.hpp
2026-02-02 12:24:50 -08:00
2026-02-09 00:40:50 -08:00
include/audio/audio_engine.hpp
2026-02-02 12:24:50 -08:00
include/audio/music_manager.hpp
2026-02-03 14:55:32 -08:00
include/audio/footstep_manager.hpp
2026-02-03 19:49:56 -08:00
include/audio/activity_sound_manager.hpp
2026-02-09 01:04:53 -08:00
include/audio/mount_sound_manager.hpp
Implement comprehensive audio control panel with tabbed settings interface
Adds complete audio volume controls for all 11 audio systems with master volume. Reorganizes settings window into Video, Audio, and Gameplay tabs for better UX.
Audio Features:
- Master volume control affecting all audio systems
- Individual volume sliders for: Music, Ambient, UI, Combat, Spell, Movement, Footsteps, NPC Voices, Mounts, Activity sounds
- Real-time volume adjustment with master volume multiplier
- Restore defaults button per tab
Technical Changes:
- Added getVolumeScale() getters to all audio managers
- Integrated all 10 audio managers into renderer (UI, Combat, Spell, Movement added)
- Expanded game_screen.hpp with 11 pending volume variables
- Reorganized settings window using ImGui tab bars (Video/Audio/Gameplay)
- Audio settings uses scrollable child window for 11 volume controls
- Settings window expanded to 520x720px to accommodate comprehensive controls
2026-02-09 17:07:22 -08:00
include/audio/npc_voice_manager.hpp
include/audio/ambient_sound_manager.hpp
include/audio/ui_sound_manager.hpp
include/audio/combat_sound_manager.hpp
include/audio/spell_sound_manager.hpp
include/audio/movement_sound_manager.hpp
2026-02-02 12:24:50 -08:00
include/pipeline/blp_loader.hpp
2026-02-12 20:32:14 -08:00
include/pipeline/asset_manifest.hpp
include/pipeline/loose_file_reader.hpp
2026-02-02 12:24:50 -08:00
include/pipeline/m2_loader.hpp
include/pipeline/wmo_loader.hpp
include/pipeline/adt_loader.hpp
2026-02-26 17:56:11 -08:00
include/pipeline/wdt_loader.hpp
2026-02-02 12:24:50 -08:00
include/pipeline/dbc_loader.hpp
include/pipeline/terrain_mesh.hpp
2026-02-21 19:41:21 -08:00
include/rendering/vk_context.hpp
include/rendering/vk_utils.hpp
include/rendering/vk_shader.hpp
include/rendering/vk_texture.hpp
include/rendering/vk_buffer.hpp
include/rendering/vk_pipeline.hpp
include/rendering/vk_render_target.hpp
2026-02-02 12:24:50 -08:00
include/rendering/renderer.hpp
include/rendering/camera.hpp
include/rendering/camera_controller.hpp
include/rendering/material.hpp
include/rendering/terrain_renderer.hpp
include/rendering/terrain_manager.hpp
include/rendering/frustum.hpp
include/rendering/performance_hud.hpp
include/rendering/water_renderer.hpp
include/rendering/skybox.hpp
include/rendering/celestial.hpp
include/rendering/starfield.hpp
include/rendering/clouds.hpp
include/rendering/lens_flare.hpp
include/rendering/weather.hpp
include/rendering/lightning.hpp
include/rendering/swim_effects.hpp
2026-02-04 22:27:45 -08:00
include/rendering/world_map.hpp
refactor: decompose world map into modular component architecture
Break the monolithic 1360-line world_map.cpp into 16 focused modules
under src/rendering/world_map/:
Architecture:
- world_map_facade: public API composing all components (PIMPL)
- world_map_types: Vulkan-free domain types (Zone, ViewLevel, etc.)
- data_repository: DBC zone loading, ZMP pixel map, POI/overlay storage
- coordinate_projection: UV projection, zone/continent lookups
- composite_renderer: Vulkan tile pipeline + off-screen compositing
- exploration_state: server mask + local exploration tracking
- view_state_machine: COSMIC→WORLD→CONTINENT→ZONE navigation
- input_handler: keyboard/mouse input → InputAction mapping
- overlay_renderer: layer-based ImGui overlay system (OCP)
- map_resolver: cross-map navigation (Outland, Northrend, etc.)
- zone_metadata: level ranges and faction data
Overlay layers (each an IOverlayLayer):
- player_marker, party_dot, taxi_node, poi_marker, quest_poi,
corpse_marker, zone_highlight, coordinate_display, subzone_tooltip
Fixes:
- Player marker no longer bleeds across continents (only shown when
player is in a zone belonging to the displayed continent)
- Zone hover uses DBC-projected AABB rectangles (restored from
original working behavior)
- Exploration overlay rendering for zone view subzones
Tests:
- 6 new test files covering coordinate projection, exploration state,
map resolver, view state machine, zone metadata, and integration
Signed-off-by: Pavel Okhlopkov <pavel.okhlopkov@flant.com>
2026-04-12 09:52:51 +03:00
include/rendering/world_map/world_map_types.hpp
include/rendering/world_map/coordinate_projection.hpp
include/rendering/world_map/map_resolver.hpp
include/rendering/world_map/exploration_state.hpp
include/rendering/world_map/zone_metadata.hpp
include/rendering/world_map/data_repository.hpp
include/rendering/world_map/view_state_machine.hpp
include/rendering/world_map/composite_renderer.hpp
include/rendering/world_map/overlay_renderer.hpp
include/rendering/world_map/input_handler.hpp
include/rendering/world_map/world_map_facade.hpp
include/rendering/world_map/layers/player_marker_layer.hpp
include/rendering/world_map/layers/party_dot_layer.hpp
include/rendering/world_map/layers/taxi_node_layer.hpp
include/rendering/world_map/layers/poi_marker_layer.hpp
include/rendering/world_map/layers/quest_poi_layer.hpp
include/rendering/world_map/layers/corpse_marker_layer.hpp
include/rendering/world_map/layers/zone_highlight_layer.hpp
include/rendering/world_map/layers/coordinate_display.hpp
include/rendering/world_map/layers/subzone_tooltip_layer.hpp
2026-02-02 12:24:50 -08:00
include/rendering/character_renderer.hpp
2026-02-05 14:55:42 -08:00
include/rendering/character_preview.hpp
2026-02-02 12:24:50 -08:00
include/rendering/wmo_renderer.hpp
2026-02-03 13:33:31 -08:00
include/rendering/loading_screen.hpp
2026-02-02 12:24:50 -08:00
include/ui/ui_manager.hpp
include/ui/auth_screen.hpp
include/ui/realm_screen.hpp
2026-02-05 14:13:48 -08:00
include/ui/character_create_screen.hpp
2026-02-02 12:24:50 -08:00
include/ui/character_screen.hpp
include/ui/game_screen.hpp
include/ui/inventory_screen.hpp
2026-02-04 11:31:08 -08:00
include/ui/spellbook_screen.hpp
2026-02-06 16:04:25 -08:00
include/ui/talent_screen.hpp
2026-03-11 06:26:57 -07:00
include/ui/keybinding_manager.hpp
2026-02-02 12:24:50 -08:00
)
2026-02-11 15:24:05 -08:00
set(WOWEE_PLATFORM_SOURCES)
if(WIN32)
feat: add multi-platform Docker build system for Linux, macOS, and Windows
Replace the single Ubuntu-based container build with a dedicated
Dockerfile, build script, and launcher for each target platform.
Infrastructure:
- Add .dockerignore to minimize Docker build context
- Add container/builder-linux.Dockerfile (Ubuntu 24.04, GCC, native build)
- Add container/builder-macos.Dockerfile (multi-stage: SDK fetcher + osxcross/Clang 18)
- Add container/builder-windows.Dockerfile (LLVM-MinGW 20240619, vcpkg)
- Add container/macos/sdk-fetcher.py (auto-fetch macOS SDK from Apple catalog)
- Add container/macos/osxcross-toolchain.cmake (auto-detecting CMake toolchain)
- Add container/macos/triplets/arm64-osx-cross.cmake
- Add container/macos/triplets/x64-osx-cross.cmake
- Remove container/builder-ubuntu.Dockerfile (replaced by per-platform Dockerfiles)
- Remove container/build-in-container.sh and container/build-wowee.sh (replaced)
Build scripts (run inside containers):
- Add container/build-linux.sh (tar copy, FidelityFX clone, cmake/ninja)
- Add container/build-macos.sh (arch detection, vcpkg triplet, cross-compile)
- Add container/build-windows.sh (Vulkan import lib via dlltool, cross-compile)
Launcher scripts (run on host):
- Add container/run-linux.sh, run-macos.sh, run-windows.sh (bash)
- Add container/run-linux.ps1, run-macos.ps1, run-windows.ps1 (PowerShell)
Documentation:
- Add container/README.md (quick start, options, file structure, troubleshooting)
- Add container/FLOW.md (comprehensive build flow for each platform)
CMake changes:
- Add macOS cross-compile support (VulkanHeaders, -undefined dynamic_lookup)
- Add LLVM-MinGW/Windows cross-compile support
- Detect osxcross toolchain and vcpkg triplets
Other:
- Update vcpkg.json with ffmpeg feature flags
- Update resources/wowee.rc version string
2026-03-30 20:17:41 +03:00
# Copy icon into build tree so windres can find it via the relative path
# in wowee.rc ("assets\\wowee.ico"). Tell the RC compiler to also search
# the build directory — GNU windres uses cwd (already the build dir) but
# llvm-windres resolves relative to the .rc file, so it needs the hint.
2026-02-18 19:05:47 -08:00
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/assets/Wowee.ico
${CMAKE_CURRENT_BINARY_DIR}/assets/wowee.ico
COPYONLY
)
feat: add multi-platform Docker build system for Linux, macOS, and Windows
Replace the single Ubuntu-based container build with a dedicated
Dockerfile, build script, and launcher for each target platform.
Infrastructure:
- Add .dockerignore to minimize Docker build context
- Add container/builder-linux.Dockerfile (Ubuntu 24.04, GCC, native build)
- Add container/builder-macos.Dockerfile (multi-stage: SDK fetcher + osxcross/Clang 18)
- Add container/builder-windows.Dockerfile (LLVM-MinGW 20240619, vcpkg)
- Add container/macos/sdk-fetcher.py (auto-fetch macOS SDK from Apple catalog)
- Add container/macos/osxcross-toolchain.cmake (auto-detecting CMake toolchain)
- Add container/macos/triplets/arm64-osx-cross.cmake
- Add container/macos/triplets/x64-osx-cross.cmake
- Remove container/builder-ubuntu.Dockerfile (replaced by per-platform Dockerfiles)
- Remove container/build-in-container.sh and container/build-wowee.sh (replaced)
Build scripts (run inside containers):
- Add container/build-linux.sh (tar copy, FidelityFX clone, cmake/ninja)
- Add container/build-macos.sh (arch detection, vcpkg triplet, cross-compile)
- Add container/build-windows.sh (Vulkan import lib via dlltool, cross-compile)
Launcher scripts (run on host):
- Add container/run-linux.sh, run-macos.sh, run-windows.sh (bash)
- Add container/run-linux.ps1, run-macos.ps1, run-windows.ps1 (PowerShell)
Documentation:
- Add container/README.md (quick start, options, file structure, troubleshooting)
- Add container/FLOW.md (comprehensive build flow for each platform)
CMake changes:
- Add macOS cross-compile support (VulkanHeaders, -undefined dynamic_lookup)
- Add LLVM-MinGW/Windows cross-compile support
- Detect osxcross toolchain and vcpkg triplets
Other:
- Update vcpkg.json with ffmpeg feature flags
- Update resources/wowee.rc version string
2026-03-30 20:17:41 +03:00
set(CMAKE_RC_FLAGS "${CMAKE_RC_FLAGS} -I ${CMAKE_CURRENT_BINARY_DIR} -I ${CMAKE_CURRENT_SOURCE_DIR}")
2026-02-11 15:24:05 -08:00
list(APPEND WOWEE_PLATFORM_SOURCES resources/wowee.rc)
endif()
2026-03-20 11:12:07 -07:00
# ---- Lua 5.1.5 (vendored, static library) ----
set(LUA_DIR ${CMAKE_CURRENT_SOURCE_DIR}/extern/lua-5.1.5/src)
set(LUA_SOURCES
${LUA_DIR}/lapi.c ${LUA_DIR}/lcode.c ${LUA_DIR}/ldebug.c
${LUA_DIR}/ldo.c ${LUA_DIR}/ldump.c ${LUA_DIR}/lfunc.c
${LUA_DIR}/lgc.c ${LUA_DIR}/llex.c ${LUA_DIR}/lmem.c
${LUA_DIR}/lobject.c ${LUA_DIR}/lopcodes.c ${LUA_DIR}/lparser.c
${LUA_DIR}/lstate.c ${LUA_DIR}/lstring.c ${LUA_DIR}/ltable.c
${LUA_DIR}/ltm.c ${LUA_DIR}/lundump.c ${LUA_DIR}/lvm.c
${LUA_DIR}/lzio.c ${LUA_DIR}/lauxlib.c ${LUA_DIR}/lbaselib.c
${LUA_DIR}/ldblib.c ${LUA_DIR}/liolib.c ${LUA_DIR}/lmathlib.c
${LUA_DIR}/loslib.c ${LUA_DIR}/ltablib.c ${LUA_DIR}/lstrlib.c
${LUA_DIR}/linit.c
)
add_library(lua51 STATIC ${LUA_SOURCES})
set_target_properties(lua51 PROPERTIES LINKER_LANGUAGE C C_STANDARD 99 POSITION_INDEPENDENT_CODE ON)
target_include_directories(lua51 PUBLIC ${LUA_DIR})
if(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang")
target_compile_options(lua51 PRIVATE -w)
endif()
2026-02-02 12:24:50 -08:00
# Create executable
2026-02-11 15:24:05 -08:00
add_executable(wowee ${WOWEE_SOURCES} ${WOWEE_HEADERS} ${WOWEE_PLATFORM_SOURCES})
2026-04-03 09:41:34 +03:00
# Tracy profiler — zero overhead when WOWEE_ENABLE_TRACY is OFF
if(WOWEE_ENABLE_TRACY)
target_sources(wowee PRIVATE ${CMAKE_SOURCE_DIR}/extern/tracy/public/TracyClient.cpp)
target_compile_definitions(wowee PRIVATE TRACY_ENABLE)
target_include_directories(wowee SYSTEM PRIVATE ${CMAKE_SOURCE_DIR}/extern/tracy/public)
message(STATUS "Tracy profiler: ENABLED")
endif()
2026-02-20 03:02:31 -08:00
if(TARGET opcodes-generate)
add_dependencies(wowee opcodes-generate)
endif()
2026-03-30 13:40:40 -07:00
# macOS cross-compilation: MoltenVK is not available at link time.
# Allow unresolved Vulkan symbols — resolved at runtime. Scoped to wowee only.
if(WOWEE_MACOS_CROSS_COMPILE)
target_link_options(wowee PRIVATE "-undefined" "dynamic_lookup")
endif()
2026-02-02 12:24:50 -08:00
Add FSR3 Generic API path and harden runtime diagnostics
- AmdFsr3Runtime now probes both the legacy ffxFsr3* API and the newer
generic ffxCreateContext/ffxDispatch API; selects whichever the loaded
runtime library exports (GenericApi takes priority fallback)
- Generic API path implements full upscale + frame-generation context
creation, configure, dispatch, and destroy lifecycle
- dlopen error captured and surfaced in lastError_ on Linux so runtime
initialization failures are actionable
- FSR3 runtime init failure log now includes path kind, error string,
and loaded library path for easier debugging
- tools/generate_ffx_sdk_vk_permutations.sh added: auto-bootstraps
missing VK permutation headers; DXC auto-downloaded on Linux/Windows
MSYS2; macOS reads from PATH (CI installs via brew dxc)
- CMakeLists: add upscalers/include to probe include dirs, invoke
permutation script before SDK build, scope FFX pragma/ODR warning
suppressions to affected TUs, add runtime-copy dependency on wowee
- UI labels updated from "FSR2" → "FSR3" in settings, tuning panel,
performance HUD, and combo boxes
- CI macOS job now installs dxc via Homebrew for permutation codegen
2026-03-09 12:51:59 -07:00
# FidelityFX-SDK headers can trigger compiler-specific pragma/unused-static noise
# when included through the runtime bridge; keep suppression scoped to that TU.
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
set_source_files_properties(src/rendering/amd_fsr3_runtime.cpp PROPERTIES
COMPILE_OPTIONS "-Wno-unknown-pragmas;-Wno-unused-variable"
)
endif()
2026-02-21 19:41:21 -08:00
# Compile GLSL shaders to SPIR-V
if(GLSLC)
compile_shaders(wowee)
endif()
2026-02-02 12:24:50 -08:00
# Include directories
target_include_directories(wowee PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}/src
2026-02-23 19:20:55 -08:00
)
# Vendored headers as SYSTEM to suppress third-party warnings
target_include_directories(wowee SYSTEM PRIVATE
2026-02-03 13:33:31 -08:00
${CMAKE_CURRENT_SOURCE_DIR}/extern
2026-02-21 19:41:21 -08:00
${CMAKE_CURRENT_SOURCE_DIR}/extern/vk-bootstrap/src
2026-02-02 12:24:50 -08:00
)
2026-02-23 16:30:49 +01:00
if(HAVE_FFMPEG)
target_include_directories(wowee PRIVATE ${FFMPEG_INCLUDE_DIRS})
endif()
2026-02-02 12:24:50 -08:00
# Link libraries
target_link_libraries(wowee PRIVATE
SDL2::SDL2
2026-02-21 19:41:21 -08:00
Vulkan::Vulkan
2026-02-02 12:24:50 -08:00
OpenSSL::SSL
OpenSSL::Crypto
Threads::Threads
2026-02-05 21:03:27 -08:00
ZLIB::ZLIB
2026-03-20 11:12:07 -07:00
lua51
2026-02-09 00:40:50 -08:00
${CMAKE_DL_LIBS}
2026-02-02 12:24:50 -08:00
)
2026-02-23 16:30:49 +01:00
if(HAVE_FFMPEG)
target_compile_definitions(wowee PRIVATE HAVE_FFMPEG)
target_link_libraries(wowee PRIVATE ${FFMPEG_LIBRARIES})
if(FFMPEG_LIBRARY_DIRS)
target_link_directories(wowee PRIVATE ${FFMPEG_LIBRARY_DIRS})
endif()
2026-02-05 15:34:29 -08:00
endif()
2026-02-03 22:24:17 -08:00
# Platform-specific libraries
2026-02-07 17:59:40 -08:00
if(UNIX AND NOT APPLE)
target_link_libraries(wowee PRIVATE X11)
endif()
2026-02-03 22:24:17 -08:00
if(WIN32)
target_link_libraries(wowee PRIVATE ws2_32)
# SDL2main provides WinMain entry point on Windows
if(TARGET SDL2::SDL2main)
target_link_libraries(wowee PRIVATE SDL2::SDL2main)
endif()
endif()
2026-02-02 12:24:50 -08:00
# Link ImGui if available
if(TARGET imgui)
target_link_libraries(wowee PRIVATE imgui)
endif()
2026-02-21 19:41:21 -08:00
# Link vk-bootstrap
if(TARGET vk-bootstrap)
target_link_libraries(wowee PRIVATE vk-bootstrap)
endif()
2026-03-08 19:56:52 -07:00
if(TARGET wowee_fsr2_amd_vk)
target_link_libraries(wowee PRIVATE wowee_fsr2_amd_vk)
endif()
2026-03-08 22:47:46 -07:00
if(TARGET wowee_fsr3_framegen_amd_vk_probe)
target_link_libraries(wowee PRIVATE wowee_fsr3_framegen_amd_vk_probe)
endif()
Add FSR3 Generic API path and harden runtime diagnostics
- AmdFsr3Runtime now probes both the legacy ffxFsr3* API and the newer
generic ffxCreateContext/ffxDispatch API; selects whichever the loaded
runtime library exports (GenericApi takes priority fallback)
- Generic API path implements full upscale + frame-generation context
creation, configure, dispatch, and destroy lifecycle
- dlopen error captured and surfaced in lastError_ on Linux so runtime
initialization failures are actionable
- FSR3 runtime init failure log now includes path kind, error string,
and loaded library path for easier debugging
- tools/generate_ffx_sdk_vk_permutations.sh added: auto-bootstraps
missing VK permutation headers; DXC auto-downloaded on Linux/Windows
MSYS2; macOS reads from PATH (CI installs via brew dxc)
- CMakeLists: add upscalers/include to probe include dirs, invoke
permutation script before SDK build, scope FFX pragma/ODR warning
suppressions to affected TUs, add runtime-copy dependency on wowee
- UI labels updated from "FSR2" → "FSR3" in settings, tuning panel,
performance HUD, and combo boxes
- CI macOS job now installs dxc via Homebrew for permutation codegen
2026-03-09 12:51:59 -07:00
if(TARGET wowee_fsr3_official_runtime_copy)
2026-03-09 13:23:39 -07:00
# FSR3 Path A runtime is an opt-in artifact; build explicitly with:
# cmake --build build --target wowee_fsr3_official_runtime_copy
# Do NOT add as a hard dependency of wowee — it would break arm64 and Windows CI
# (no DXC available on arm64; bash context issues on MSYS2 Windows).
Add FSR3 Generic API path and harden runtime diagnostics
- AmdFsr3Runtime now probes both the legacy ffxFsr3* API and the newer
generic ffxCreateContext/ffxDispatch API; selects whichever the loaded
runtime library exports (GenericApi takes priority fallback)
- Generic API path implements full upscale + frame-generation context
creation, configure, dispatch, and destroy lifecycle
- dlopen error captured and surfaced in lastError_ on Linux so runtime
initialization failures are actionable
- FSR3 runtime init failure log now includes path kind, error string,
and loaded library path for easier debugging
- tools/generate_ffx_sdk_vk_permutations.sh added: auto-bootstraps
missing VK permutation headers; DXC auto-downloaded on Linux/Windows
MSYS2; macOS reads from PATH (CI installs via brew dxc)
- CMakeLists: add upscalers/include to probe include dirs, invoke
permutation script before SDK build, scope FFX pragma/ODR warning
suppressions to affected TUs, add runtime-copy dependency on wowee
- UI labels updated from "FSR2" → "FSR3" in settings, tuning panel,
performance HUD, and combo boxes
- CI macOS job now installs dxc via Homebrew for permutation codegen
2026-03-09 12:51:59 -07:00
endif()
2026-03-08 19:56:52 -07:00
2026-02-12 03:01:36 -08:00
# Link Unicorn if available
if(HAVE_UNICORN)
target_link_libraries(wowee PRIVATE ${UNICORN_LIBRARY})
target_include_directories(wowee PRIVATE ${UNICORN_INCLUDE_DIR})
target_compile_definitions(wowee PRIVATE HAVE_UNICORN)
endif()
2026-02-02 12:24:50 -08:00
# Link GLM if found
if(TARGET glm::glm)
target_link_libraries(wowee PRIVATE glm::glm)
elseif(glm_FOUND)
target_include_directories(wowee PRIVATE ${GLM_INCLUDE_DIRS})
endif()
# Compiler warnings
if(MSVC)
target_compile_options(wowee PRIVATE /W4)
else()
2026-02-23 19:20:55 -08:00
target_compile_options(wowee PRIVATE -Wall -Wextra -Wpedantic -Wno-missing-field-initializers)
Add FSR3 Generic API path and harden runtime diagnostics
- AmdFsr3Runtime now probes both the legacy ffxFsr3* API and the newer
generic ffxCreateContext/ffxDispatch API; selects whichever the loaded
runtime library exports (GenericApi takes priority fallback)
- Generic API path implements full upscale + frame-generation context
creation, configure, dispatch, and destroy lifecycle
- dlopen error captured and surfaced in lastError_ on Linux so runtime
initialization failures are actionable
- FSR3 runtime init failure log now includes path kind, error string,
and loaded library path for easier debugging
- tools/generate_ffx_sdk_vk_permutations.sh added: auto-bootstraps
missing VK permutation headers; DXC auto-downloaded on Linux/Windows
MSYS2; macOS reads from PATH (CI installs via brew dxc)
- CMakeLists: add upscalers/include to probe include dirs, invoke
permutation script before SDK build, scope FFX pragma/ODR warning
suppressions to affected TUs, add runtime-copy dependency on wowee
- UI labels updated from "FSR2" → "FSR3" in settings, tuning panel,
performance HUD, and combo boxes
- CI macOS job now installs dxc via Homebrew for permutation codegen
2026-03-09 12:51:59 -07:00
# GCC LTO emits -Wodr for FFX enum-name mismatches across SDK generations.
# We intentionally keep FSR2+FSR3 integrations in separate TUs and suppress
# this linker-time diagnostic to avoid CI noise.
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
target_compile_options(wowee PRIVATE -Wno-odr)
target_link_options(wowee PRIVATE -Wno-odr)
endif()
2026-02-02 12:24:50 -08:00
endif()
2026-02-23 16:30:49 +01:00
# Debug build flags
if(MSVC)
# /ZI — Edit-and-Continue debug info (works with hot-reload in VS 2022)
# /RTC1 — stack-frame and uninitialised-variable runtime checks (Debug only)
# /sdl — additional SDL security checks
# /Od — disable optimisation so stepping matches source lines exactly
target_compile_options(wowee PRIVATE
$<$<CONFIG:Debug>:/ZI /RTC1 /sdl /Od>
)
# Ensure the linker emits a .pdb alongside the .exe for every config
target_link_options(wowee PRIVATE
$<$<CONFIG:Debug>:/DEBUG:FULL>
$<$<CONFIG:RelWithDebInfo>:/DEBUG:FASTLINK>
)
else()
# -g3 — maximum DWARF debug info (includes macro definitions)
# -Og — optimise for debugging (better than -O0, keeps most frames)
# -fno-omit-frame-pointer — preserve frame pointers so stack traces are clean
2026-04-03 20:19:33 -07:00
# Frame pointers in all configs (negligible perf cost, critical for crash backtraces)
2026-02-23 16:30:49 +01:00
target_compile_options(wowee PRIVATE
2026-04-03 20:19:33 -07:00
-fno-omit-frame-pointer
$<$<CONFIG:Debug>:-g3 -Og>
$<$<CONFIG:RelWithDebInfo>:-g>
2026-02-23 16:30:49 +01:00
)
endif()
2026-04-03 09:41:34 +03:00
# ── Unit tests (Catch2) ──────────────────────────────────────
if(WOWEE_BUILD_TESTS)
enable_testing()
add_subdirectory(tests)
endif()
2026-02-23 16:30:49 +01:00
# AddressSanitizer — catch buffer overflows, use-after-free, etc.
# Enable with: cmake ... -DWOWEE_ENABLE_ASAN=ON -DCMAKE_BUILD_TYPE=Debug
if(WOWEE_ENABLE_ASAN)
if(MSVC)
target_compile_options(wowee PRIVATE /fsanitize=address)
# ASAN on MSVC requires the dynamic CRT (/MD or /MDd)
target_compile_options(wowee PRIVATE
$<$<CONFIG:Debug>:/MDd>
$<$<CONFIG:Release>:/MD>
)
else()
2026-04-03 09:41:34 +03:00
target_compile_options(wowee PRIVATE -fsanitize=address,undefined -fno-omit-frame-pointer)
target_link_options(wowee PRIVATE -fsanitize=address,undefined)
2026-02-23 16:30:49 +01:00
endif()
2026-04-03 09:41:34 +03:00
message(STATUS "AddressSanitizer + UBSan: ENABLED")
2026-02-23 16:30:49 +01:00
endif()
2026-02-18 20:10:47 -08:00
# Release build optimizations
include(CheckIPOSupported)
check_ipo_supported(RESULT _ipo_supported OUTPUT _ipo_error)
if(_ipo_supported)
set_property(TARGET wowee PROPERTY INTERPROCEDURAL_OPTIMIZATION_RELEASE TRUE)
endif()
if(NOT MSVC)
# -O3: more aggressive inlining and auto-vectorization vs CMake's default -O2
target_compile_options(wowee PRIVATE $<$<CONFIG:Release>:-O3>)
# -fvisibility=hidden: keeps all symbols internal by default, shrinks binary
# and gives the linker and optimizer more freedom to dead-strip and inline
target_compile_options(wowee PRIVATE $<$<CONFIG:Release>:-fvisibility=hidden -fvisibility-inlines-hidden>)
endif()
2026-02-23 16:30:49 +01:00
# Copy assets next to the executable (runs every build, not just configure).
# Uses $<TARGET_FILE_DIR:wowee> so MSVC multi-config generators place assets
# in bin/Debug/ or bin/Release/ alongside the exe, not the common bin/ parent.
add_custom_command(TARGET wowee POST_BUILD
2026-02-22 02:59:24 -08:00
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_CURRENT_SOURCE_DIR}/assets
2026-02-23 16:30:49 +01:00
$<TARGET_FILE_DIR:wowee>/assets
COMMENT "Syncing assets to $<TARGET_FILE_DIR:wowee>/assets"
2026-02-22 02:59:24 -08:00
)
2026-02-23 16:30:49 +01:00
refactor(game): split GameHandler into domain handlers
Extract domain-specific logic from the monolithic GameHandler into
dedicated handler classes, each owning its own opcode registration,
state, and packet parsing:
- CombatHandler: combat, XP, kill, PvP, loot roll (~26 methods)
- SpellHandler: spells, auras, pet stable, talent (~3+ methods)
- SocialHandler: friends, guild, groups, BG, RAF, PvP AFK (~14+ methods)
- ChatHandler: chat messages, channels, GM tickets, server messages,
defense/area-trigger messages (~7+ methods)
- InventoryHandler: items, trade, loot, mail, vendor, equipment sets,
read item (~3+ methods)
- QuestHandler: gossip, quests, completed quest response (~5+ methods)
- MovementHandler: movement, follow, transport (~2 methods)
- WardenHandler: Warden anti-cheat module
Each handler registers its own dispatch table entries via
registerOpcodes(DispatchTable&), called from
GameHandler::registerOpcodeHandlers(). GameHandler retains core
orchestration: auth/session handshake, update-object parsing,
opcode routing, and cross-handler coordination.
game_handler.cpp reduced from ~10,188 to ~9,432 lines.
Also add a POST_BUILD CMake step to symlink Data/ next to the
executable so expansion profiles and opcode tables are found at
runtime when running from build/bin/.
2026-03-28 09:42:37 +03:00
# Symlink Data/ next to the executable so expansion profiles, opcode tables,
# and other runtime data files are found when running from the build directory.
if(NOT WIN32)
add_custom_command(TARGET wowee POST_BUILD
COMMAND ${CMAKE_COMMAND} -E create_symlink
${CMAKE_CURRENT_SOURCE_DIR}/Data
$<TARGET_FILE_DIR:wowee>/Data
COMMENT "Symlinking Data to $<TARGET_FILE_DIR:wowee>/Data"
)
endif()
2026-02-23 16:30:49 +01:00
# On Windows, SDL 2.28+ uses LoadLibraryExW with LOAD_LIBRARY_SEARCH_DEFAULT_DIRS
# which does NOT include System32. Copy vulkan-1.dll into the output directory so
# SDL_Vulkan_LoadLibrary can locate it without needing a full system PATH search.
if(WIN32)
2026-02-23 18:32:47 -08:00
find_file(VULKAN_DLL vulkan-1.dll
PATHS "$ENV{SystemRoot}/System32" "$ENV{VULKAN_SDK}/Bin"
NO_DEFAULT_PATH)
if(VULKAN_DLL)
add_custom_command(TARGET wowee POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${VULKAN_DLL}" "$<TARGET_FILE_DIR:wowee>/vulkan-1.dll"
COMMENT "Copying vulkan-1.dll to output directory"
)
else()
message(STATUS " vulkan-1.dll not found — skipping copy (MSYS2 provides it via PATH)")
endif()
2026-02-23 16:30:49 +01:00
endif()
2026-02-02 12:24:50 -08:00
# Install targets
install(TARGETS wowee
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
2026-02-18 18:29:34 -08:00
# Note: tool install rules are placed next to each target definition below.
2026-02-18 18:18:30 -08:00
# Install built-in assets (exclude proprietary music)
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/assets
DESTINATION bin
PATTERN "Original Music" EXCLUDE)
# On Windows, install any DLLs that were bundled into the build output dir
# (populated by the CI workflow's DLL-bundling step before cpack runs)
if(WIN32)
install(DIRECTORY "${CMAKE_BINARY_DIR}/bin/"
DESTINATION bin
FILES_MATCHING PATTERN "*.dll")
endif()
2026-02-11 15:24:05 -08:00
# Linux desktop integration (launcher + icon)
if(UNIX AND NOT APPLE)
set(WOWEE_LINUX_ICON_PATH "${CMAKE_INSTALL_FULL_DATAROOTDIR}/icons/hicolor/256x256/apps/wowee.png")
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/resources/wowee.desktop.in
${CMAKE_CURRENT_BINARY_DIR}/wowee.desktop
@ONLY
)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/wowee.desktop
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/assets/Wowee.png
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/256x256/apps
RENAME wowee.png)
endif()
2026-02-12 20:32:14 -08:00
# ---- Tool: asset_extract (MPQ → loose files) ----
if(STORMLIB_LIBRARY AND STORMLIB_INCLUDE_DIR)
add_executable(asset_extract
tools/asset_extract/main.cpp
tools/asset_extract/extractor.cpp
tools/asset_extract/path_mapper.cpp
tools/asset_extract/manifest_writer.cpp
2026-05-06 10:23:32 -07:00
tools/asset_extract/open_format_emitter.cpp
2026-02-13 00:10:01 -08:00
src/pipeline/dbc_loader.cpp
2026-05-06 10:23:32 -07:00
src/pipeline/blp_loader.cpp
2026-05-06 10:32:17 -07:00
src/pipeline/m2_loader.cpp
src/pipeline/wmo_loader.cpp
2026-05-06 10:36:14 -07:00
src/pipeline/adt_loader.cpp
2026-05-06 10:32:17 -07:00
src/pipeline/wowee_model.cpp
src/pipeline/wowee_building.cpp
2026-05-06 10:36:14 -07:00
src/pipeline/wowee_collision.cpp
2026-02-13 00:10:01 -08:00
src/core/logger.cpp
2026-02-12 20:32:14 -08:00
)
target_include_directories(asset_extract PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}/tools/asset_extract
${STORMLIB_INCLUDE_DIR}
)
2026-05-06 02:30:04 -07:00
target_include_directories(asset_extract SYSTEM PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/extern
)
2026-02-12 20:32:14 -08:00
target_link_libraries(asset_extract PRIVATE
${STORMLIB_LIBRARY}
ZLIB::ZLIB
Threads::Threads
)
2026-02-23 14:09:51 +01:00
if(WIN32)
2026-02-23 18:32:47 -08:00
find_library(WININET_LIB wininet)
find_library(BZ2_LIB bz2)
if(WININET_LIB)
target_link_libraries(asset_extract PRIVATE ${WININET_LIB})
endif()
if(BZ2_LIB)
target_link_libraries(asset_extract PRIVATE ${BZ2_LIB})
endif()
2026-02-23 14:09:51 +01:00
endif()
2026-02-12 20:32:14 -08:00
set_target_properties(asset_extract PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
)
2026-02-18 18:29:34 -08:00
install(TARGETS asset_extract RUNTIME DESTINATION bin)
2026-02-12 20:32:14 -08:00
message(STATUS " asset_extract tool: ENABLED")
else()
message(STATUS " asset_extract tool: DISABLED (requires StormLib)")
endif()
2026-02-13 00:10:01 -08:00
# ---- Tool: dbc_to_csv (DBC → CSV text) ----
add_executable(dbc_to_csv
tools/dbc_to_csv/main.cpp
src/pipeline/dbc_loader.cpp
src/core/logger.cpp
)
target_include_directories(dbc_to_csv PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/include
2026-05-05 15:12:19 -07:00
${CMAKE_CURRENT_SOURCE_DIR}/extern
2026-02-13 00:10:01 -08:00
)
target_link_libraries(dbc_to_csv PRIVATE Threads::Threads)
set_target_properties(dbc_to_csv PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
)
2026-02-18 18:29:34 -08:00
install(TARGETS dbc_to_csv RUNTIME DESTINATION bin)
2026-02-13 00:10:01 -08:00
2026-02-13 00:55:36 -08:00
# ---- Tool: auth_probe (LOGON_CHALLENGE probe) ----
add_executable(auth_probe
tools/auth_probe/main.cpp
src/auth/auth_packets.cpp
src/auth/auth_opcodes.cpp
src/auth/crypto.cpp
src/network/packet.cpp
src/network/socket.cpp
src/network/tcp_socket.cpp
src/core/logger.cpp
)
target_include_directories(auth_probe PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/include
)
2026-02-18 19:12:16 -08:00
target_link_libraries(auth_probe PRIVATE Threads::Threads OpenSSL::Crypto
$<$<BOOL:${WIN32}>:ws2_32>)
2026-02-13 00:55:36 -08:00
set_target_properties(auth_probe PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
)
2026-02-18 18:29:34 -08:00
install(TARGETS auth_probe RUNTIME DESTINATION bin)
2026-02-13 00:55:36 -08:00
2026-02-13 01:32:15 -08:00
# ---- Tool: auth_login_probe (challenge + proof probe) ----
add_executable(auth_login_probe
tools/auth_login_probe/main.cpp
src/auth/auth_packets.cpp
src/auth/auth_opcodes.cpp
src/auth/crypto.cpp
src/auth/integrity.cpp
src/auth/big_num.cpp
src/auth/srp.cpp
src/network/packet.cpp
src/network/socket.cpp
src/network/tcp_socket.cpp
src/core/logger.cpp
)
target_include_directories(auth_login_probe PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/include
)
2026-02-18 19:12:16 -08:00
target_link_libraries(auth_login_probe PRIVATE Threads::Threads OpenSSL::Crypto
$<$<BOOL:${WIN32}>:ws2_32>)
2026-02-13 01:32:15 -08:00
set_target_properties(auth_login_probe PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
)
2026-02-18 18:29:34 -08:00
install(TARGETS auth_login_probe RUNTIME DESTINATION bin)
2026-02-13 01:32:15 -08:00
2026-02-12 20:32:14 -08:00
# ---- Tool: blp_convert (BLP ↔ PNG) ----
add_executable(blp_convert
tools/blp_convert/main.cpp
src/pipeline/blp_loader.cpp
src/core/logger.cpp
)
target_include_directories(blp_convert PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}/extern
)
target_link_libraries(blp_convert PRIVATE Threads::Threads)
set_target_properties(blp_convert PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
)
2026-02-18 18:29:34 -08:00
install(TARGETS blp_convert RUNTIME DESTINATION bin)
2026-02-12 20:32:14 -08:00
feat(editor): add standalone world editor (rough/WIP)
Standalone wowee_editor tool for creating custom WoW zones.
This is a rough initial implementation — many features work but
M2/WMO rendering still has issues (frame sync, texture layout
transitions) and needs further polish.
Terrain:
- Create new blank terrain with 10 biome types (Grassland, Forest,
Jungle, Desert, Barrens, Snow, Swamp, Rocky, Beach, Volcanic)
- Load existing ADT tiles from extracted game data
- Sculpt brushes: Raise, Lower, Smooth, Flatten, Level
- Chunk edge stitching prevents seams between tiles
- Undo/redo (100-deep stack, Ctrl+Z/Ctrl+Shift+Z)
- Save to WoW ADT/WDT format
Texture Painting:
- Paint/Erase/Replace Base modes
- Full tileset texture browser (1285 textures from manifest)
- Per-zone directory filtering and search
- Alpha map editing with 4-layer limit (auto-replaces weakest)
Object Placement:
- M2 and WMO model placement with full manifest browser (11k M2s, 2k WMOs)
- M2Renderer + WMORenderer integrated (loads .skin files for WotLK)
- Ghost preview follows cursor before placing
- Ctrl+click selection, right-click context menu
- Transform gizmo (Move/Rotate/Scale with axis constraints)
- Position/rotation/scale editing in properties panel
NPC/Monster System:
- 631 creature presets scanned from manifest, categorized
(Critters, Beasts, Humanoids, Undead, Demons, etc.)
- Stats editor: level, health, mana, damage, armor, faction
- Behavior: Stationary, Patrol, Wander, Scripted
- Aggro/leash radius, respawn time, flags (hostile/vendor/etc.)
- Save creature spawns to JSON
Water:
- Place water at configurable height per chunk
- Liquid types: Water, Ocean, Magma, Slime
- Rendered as translucent colored quads
- Saved in ADT MH2O format
Infrastructure:
- Free-fly camera (WASD/QE, right-drag look, scroll speed)
- 5-mode toolbar: Sculpt | Paint | Objects | Water | NPCs
- Asset browser indexes full manifest on startup
- Editor water/marker shaders (pos+color vertex format)
- forceNoCull added to M2Renderer for editor use
- AssetManifest::getEntries() and AssetManager::getManifest() exposed
Known issues:
- M2/WMO rendering may not display on first placement (frame index
sync between update/render was misaligned — now fixed but untested
end-to-end)
- Validation layer errors on shutdown (resource cleanup ordering)
- Object placement on steep terrain can miss raycast
- No undo for texture painting or object placement yet
2026-05-05 03:47:03 -07:00
# ---- Tool: wowee_editor (Standalone World Editor) ----
add_executable(wowee_editor
tools/editor/main.cpp
refactor(editor): extract gen-audio-* handlers into cli_gen_audio.cpp
main.cpp had grown past 28k lines, with each new procedural-
generation command adding 100-200 lines to the inline if/else
dispatch chain. This commit starts breaking that up by moving
the four audio-related handlers (--gen-audio-tone, -noise,
-sweep, --gen-zone-audio-pack) into their own translation unit.
Pattern established here for future family extractions:
- Family lives in cli_<family>.{hpp,cpp}
- Single dispatch entry point: bool handle<Family>(int& i, int argc,
char** argv, int& outRc) — true if matched (writes outRc), false
to fall through.
- main.cpp's argv loop calls each family's dispatcher first and
returns its outRc on match, before the legacy in-line chain.
Side-benefit: consolidated the duplicated 25-line WAV header
writer + 5ms attack/release envelope into shared helpers
(writeWavMono16, applyEdgeEnvelope) at the top of the new file.
main.cpp drops from 28,943 → 28,329 lines (-614). Audio family
is fully self-contained (~440 lines), behavior unchanged
(verified by re-running tone/noise/sweep + zone-audio-pack).
2026-05-08 16:19:30 -07:00
tools/editor/cli_gen_audio.cpp
2026-05-08 16:46:14 -07:00
tools/editor/cli_zone_packs.cpp
2026-05-08 17:12:10 -07:00
tools/editor/cli_audits.cpp
2026-05-08 17:36:10 -07:00
tools/editor/cli_readmes.cpp
2026-05-08 18:24:01 -07:00
tools/editor/cli_zone_inventory.cpp
2026-05-08 18:47:06 -07:00
tools/editor/cli_project_inventory.cpp
refactor(editor): extract printUsage into cli_help.cpp
Pulls the 597-line block of printf calls that emits the --help
text out of main.cpp into its own translation unit. printUsage
is the longest single function in main.cpp by far and was pure
boilerplate (no logic, just a flat list of help lines).
Function moved verbatim to wowee::editor::cli::printUsage; all
6 in-tree callers (--list-commands, --info-cli-stats,
--info-cli-categories, --info-cli-help, --validate-cli-help,
and the bare --help/-h handler) updated to the namespaced name.
The CLI-meta commands continue to capture printUsage's stdout
the same way, so behavior is identical (verified by re-running
--validate-cli-help, --info-cli-stats, --list-commands).
main.cpp drops 26,650 → 26,286 lines (-364 net; -597 from the
removal, +233 from the include and namespace-prefixing the
six call sites... wait, no, +6). Actually main.cpp net delta
matches the body extraction.
2026-05-08 20:12:15 -07:00
tools/editor/cli_help.cpp
2026-05-08 20:59:02 -07:00
tools/editor/cli_gen_texture.cpp
refactor(editor): extract 12 composite mesh primitives into cli_gen_mesh.cpp
Moves the recently-added composite-prop mesh handlers (rock,
pillar, bridge, tower, house, fountain, statue, altar, portal,
archway, barrel, chest) into their own translation unit. These
12 handlers were the most contiguous block of similar-shaped
mesh code in main.cpp.
Other mesh handlers (--gen-mesh dispatcher, fence, tree, grid,
stairs, disc, tube, capsule, arch, pyramid, from-heightmap,
textured) still live in main.cpp and may be migrated in
subsequent batches.
main.cpp drops 24,270 → 22,681 lines (-1,589). Behavior
verified by re-running rock/chest/archway/fountain.
2026-05-08 22:19:41 -07:00
tools/editor/cli_gen_mesh.cpp
2026-05-09 00:04:27 -07:00
tools/editor/cli_mesh_io.cpp
2026-05-09 00:36:51 -07:00
tools/editor/cli_mesh_edit.cpp
2026-05-09 01:18:09 -07:00
tools/editor/cli_wom_info.cpp
2026-05-09 01:57:37 -07:00
tools/editor/cli_format_validate.cpp
2026-05-09 02:25:05 -07:00
tools/editor/cli_convert.cpp
2026-05-09 02:48:58 -07:00
tools/editor/cli_format_info.cpp
2026-05-09 03:12:09 -07:00
tools/editor/cli_pack.cpp
2026-05-09 03:33:40 -07:00
tools/editor/cli_content_info.cpp
2026-05-09 03:52:44 -07:00
tools/editor/cli_zone_info.cpp
2026-05-09 04:14:32 -07:00
tools/editor/cli_data_tree.cpp
2026-05-09 04:35:08 -07:00
tools/editor/cli_diff.cpp
2026-05-09 05:05:22 -07:00
tools/editor/cli_spawn_audit.cpp
2026-05-09 05:19:04 -07:00
tools/editor/cli_items.cpp
2026-05-09 05:32:27 -07:00
tools/editor/cli_extract_info.cpp
2026-05-09 05:45:00 -07:00
tools/editor/cli_export.cpp
2026-05-09 05:57:25 -07:00
tools/editor/cli_bake.cpp
2026-05-09 06:13:41 -07:00
tools/editor/cli_migrate.cpp
2026-05-09 06:25:04 -07:00
tools/editor/cli_convert_single.cpp
refactor(editor): extract interop --validate-* into cli_validate_interop.cpp
Moves the four structural validators for INTEROP file formats
(--validate-stl, --validate-png, --validate-blp, --validate-jsondbc)
out of main.cpp into a new cli_validate_interop.{hpp,cpp} module.
These check files coming in/out of wowee from third-party tools,
distinct from cli_format_validate.cpp which validates the native
open formats (WOM, WOB, WOC, WHM).
main.cpp shrinks by 524 lines (10,644 to 10,121). Each validator
preserves its --json output mode for machine-readable reports.
2026-05-09 06:36:02 -07:00
tools/editor/cli_validate_interop.cpp
2026-05-09 06:46:02 -07:00
tools/editor/cli_glb_inspect.cpp
feat(editor): add standalone world editor (rough/WIP)
Standalone wowee_editor tool for creating custom WoW zones.
This is a rough initial implementation — many features work but
M2/WMO rendering still has issues (frame sync, texture layout
transitions) and needs further polish.
Terrain:
- Create new blank terrain with 10 biome types (Grassland, Forest,
Jungle, Desert, Barrens, Snow, Swamp, Rocky, Beach, Volcanic)
- Load existing ADT tiles from extracted game data
- Sculpt brushes: Raise, Lower, Smooth, Flatten, Level
- Chunk edge stitching prevents seams between tiles
- Undo/redo (100-deep stack, Ctrl+Z/Ctrl+Shift+Z)
- Save to WoW ADT/WDT format
Texture Painting:
- Paint/Erase/Replace Base modes
- Full tileset texture browser (1285 textures from manifest)
- Per-zone directory filtering and search
- Alpha map editing with 4-layer limit (auto-replaces weakest)
Object Placement:
- M2 and WMO model placement with full manifest browser (11k M2s, 2k WMOs)
- M2Renderer + WMORenderer integrated (loads .skin files for WotLK)
- Ghost preview follows cursor before placing
- Ctrl+click selection, right-click context menu
- Transform gizmo (Move/Rotate/Scale with axis constraints)
- Position/rotation/scale editing in properties panel
NPC/Monster System:
- 631 creature presets scanned from manifest, categorized
(Critters, Beasts, Humanoids, Undead, Demons, etc.)
- Stats editor: level, health, mana, damage, armor, faction
- Behavior: Stationary, Patrol, Wander, Scripted
- Aggro/leash radius, respawn time, flags (hostile/vendor/etc.)
- Save creature spawns to JSON
Water:
- Place water at configurable height per chunk
- Liquid types: Water, Ocean, Magma, Slime
- Rendered as translucent colored quads
- Saved in ADT MH2O format
Infrastructure:
- Free-fly camera (WASD/QE, right-drag look, scroll speed)
- 5-mode toolbar: Sculpt | Paint | Objects | Water | NPCs
- Asset browser indexes full manifest on startup
- Editor water/marker shaders (pos+color vertex format)
- forceNoCull added to M2Renderer for editor use
- AssetManifest::getEntries() and AssetManager::getManifest() exposed
Known issues:
- M2/WMO rendering may not display on first placement (frame index
sync between update/render was misaligned — now fixed but untested
end-to-end)
- Validation layer errors on shutdown (resource cleanup ordering)
- Object placement on steep terrain can miss raycast
- No undo for texture painting or object placement yet
2026-05-05 03:47:03 -07:00
tools/editor/editor_app.cpp
tools/editor/editor_camera.cpp
tools/editor/editor_viewport.cpp
tools/editor/editor_ui.cpp
tools/editor/editor_brush.cpp
tools/editor/editor_history.cpp
tools/editor/terrain_editor.cpp
tools/editor/texture_painter.cpp
tools/editor/object_placer.cpp
tools/editor/npc_spawner.cpp
tools/editor/npc_presets.cpp
feat(editor): SQL spawn export for AzerothCore/TrinityCore
Private server integration: export creature spawns, patrol waypoints,
and quest definitions as ready-to-import SQL for AzerothCore/TrinityCore.
- creature_template: name, level, health, mana, damage, armor, faction,
npcflag (questgiver/vendor/flightmaster/innkeeper), displayId, scale
- creature: spawn position, orientation, respawn time, wander distance,
movement type (stationary/wander/patrol)
- creature_addon + waypoint_data: patrol path waypoints with delays
- quest_template: title, description, completion text, level, XP, money
- All use ON DUPLICATE KEY UPDATE for safe re-imports
- Auto-exported as spawns.sql alongside other assets on zone save
- File > Export Server SQL menu item for standalone export
- Map ID from zone metadata panel used in spawn table
2026-05-05 16:06:34 -07:00
tools/editor/sql_exporter.cpp
2026-05-05 16:31:13 -07:00
tools/editor/server_module_gen.cpp
feat(editor): quest editor with objectives, rewards, and quest chains
- New Quest mode (key 6) with full quest creation panel:
- Title, description, required level
- Quest giver / turn-in NPC ID linkage
- Up to 4 objectives: Kill, Collect, Talk, Explore, Escort, Use Object
- Rewards: XP and gold
- Quest chain support via nextQuestId linking
- Quest list showing all created quests with level and objective count
- Save quests to JSON (included in Export Zone package)
- Foundation for campaign system: create quest chains across NPCs,
link objectives to placed creatures, build storylines
2026-05-05 06:10:14 -07:00
tools/editor/quest_editor.cpp
feat(editor): add standalone world editor (rough/WIP)
Standalone wowee_editor tool for creating custom WoW zones.
This is a rough initial implementation — many features work but
M2/WMO rendering still has issues (frame sync, texture layout
transitions) and needs further polish.
Terrain:
- Create new blank terrain with 10 biome types (Grassland, Forest,
Jungle, Desert, Barrens, Snow, Swamp, Rocky, Beach, Volcanic)
- Load existing ADT tiles from extracted game data
- Sculpt brushes: Raise, Lower, Smooth, Flatten, Level
- Chunk edge stitching prevents seams between tiles
- Undo/redo (100-deep stack, Ctrl+Z/Ctrl+Shift+Z)
- Save to WoW ADT/WDT format
Texture Painting:
- Paint/Erase/Replace Base modes
- Full tileset texture browser (1285 textures from manifest)
- Per-zone directory filtering and search
- Alpha map editing with 4-layer limit (auto-replaces weakest)
Object Placement:
- M2 and WMO model placement with full manifest browser (11k M2s, 2k WMOs)
- M2Renderer + WMORenderer integrated (loads .skin files for WotLK)
- Ghost preview follows cursor before placing
- Ctrl+click selection, right-click context menu
- Transform gizmo (Move/Rotate/Scale with axis constraints)
- Position/rotation/scale editing in properties panel
NPC/Monster System:
- 631 creature presets scanned from manifest, categorized
(Critters, Beasts, Humanoids, Undead, Demons, etc.)
- Stats editor: level, health, mana, damage, armor, faction
- Behavior: Stationary, Patrol, Wander, Scripted
- Aggro/leash radius, respawn time, flags (hostile/vendor/etc.)
- Save creature spawns to JSON
Water:
- Place water at configurable height per chunk
- Liquid types: Water, Ocean, Magma, Slime
- Rendered as translucent colored quads
- Saved in ADT MH2O format
Infrastructure:
- Free-fly camera (WASD/QE, right-drag look, scroll speed)
- 5-mode toolbar: Sculpt | Paint | Objects | Water | NPCs
- Asset browser indexes full manifest on startup
- Editor water/marker shaders (pos+color vertex format)
- forceNoCull added to M2Renderer for editor use
- AssetManifest::getEntries() and AssetManager::getManifest() exposed
Known issues:
- M2/WMO rendering may not display on first placement (frame index
sync between update/render was misaligned — now fixed but untested
end-to-end)
- Validation layer errors on shutdown (resource cleanup ordering)
- Object placement on steep terrain can miss raycast
- No undo for texture painting or object placement yet
2026-05-05 03:47:03 -07:00
tools/editor/transform_gizmo.cpp
2026-05-05 05:06:41 -07:00
tools/editor/zone_manifest.cpp
2026-05-05 09:27:00 -07:00
tools/editor/content_pack.cpp
2026-05-05 09:32:13 -07:00
tools/editor/wowee_terrain.cpp
2026-05-05 09:36:44 -07:00
tools/editor/editor_project.cpp
2026-05-05 10:17:03 -07:00
tools/editor/texture_exporter.cpp
2026-05-05 10:21:14 -07:00
tools/editor/dbc_exporter.cpp
feat(editor): add standalone world editor (rough/WIP)
Standalone wowee_editor tool for creating custom WoW zones.
This is a rough initial implementation — many features work but
M2/WMO rendering still has issues (frame sync, texture layout
transitions) and needs further polish.
Terrain:
- Create new blank terrain with 10 biome types (Grassland, Forest,
Jungle, Desert, Barrens, Snow, Swamp, Rocky, Beach, Volcanic)
- Load existing ADT tiles from extracted game data
- Sculpt brushes: Raise, Lower, Smooth, Flatten, Level
- Chunk edge stitching prevents seams between tiles
- Undo/redo (100-deep stack, Ctrl+Z/Ctrl+Shift+Z)
- Save to WoW ADT/WDT format
Texture Painting:
- Paint/Erase/Replace Base modes
- Full tileset texture browser (1285 textures from manifest)
- Per-zone directory filtering and search
- Alpha map editing with 4-layer limit (auto-replaces weakest)
Object Placement:
- M2 and WMO model placement with full manifest browser (11k M2s, 2k WMOs)
- M2Renderer + WMORenderer integrated (loads .skin files for WotLK)
- Ghost preview follows cursor before placing
- Ctrl+click selection, right-click context menu
- Transform gizmo (Move/Rotate/Scale with axis constraints)
- Position/rotation/scale editing in properties panel
NPC/Monster System:
- 631 creature presets scanned from manifest, categorized
(Critters, Beasts, Humanoids, Undead, Demons, etc.)
- Stats editor: level, health, mana, damage, armor, faction
- Behavior: Stationary, Patrol, Wander, Scripted
- Aggro/leash radius, respawn time, flags (hostile/vendor/etc.)
- Save creature spawns to JSON
Water:
- Place water at configurable height per chunk
- Liquid types: Water, Ocean, Magma, Slime
- Rendered as translucent colored quads
- Saved in ADT MH2O format
Infrastructure:
- Free-fly camera (WASD/QE, right-drag look, scroll speed)
- 5-mode toolbar: Sculpt | Paint | Objects | Water | NPCs
- Asset browser indexes full manifest on startup
- Editor water/marker shaders (pos+color vertex format)
- forceNoCull added to M2Renderer for editor use
- AssetManifest::getEntries() and AssetManager::getManifest() exposed
Known issues:
- M2/WMO rendering may not display on first placement (frame index
sync between update/render was misaligned — now fixed but untested
end-to-end)
- Validation layer errors on shutdown (resource cleanup ordering)
- Object placement on steep terrain can miss raycast
- No undo for texture painting or object placement yet
2026-05-05 03:47:03 -07:00
tools/editor/asset_browser.cpp
tools/editor/editor_water.cpp
tools/editor/editor_markers.cpp
tools/editor/adt_writer.cpp
# Pipeline (asset loading)
src/pipeline/blp_loader.cpp
src/pipeline/dbc_loader.cpp
src/pipeline/dbc_layout.cpp
src/pipeline/asset_manager.cpp
src/pipeline/asset_manifest.cpp
src/pipeline/loose_file_reader.cpp
src/pipeline/m2_loader.cpp
src/pipeline/wmo_loader.cpp
src/pipeline/adt_loader.cpp
src/pipeline/wdt_loader.cpp
2026-05-05 09:56:24 -07:00
src/pipeline/wowee_terrain_loader.cpp
2026-05-05 10:24:46 -07:00
src/pipeline/wowee_model.cpp
2026-05-06 10:32:17 -07:00
src/pipeline/wowee_model_fromm2.cpp
2026-05-05 10:28:24 -07:00
src/pipeline/wowee_building.cpp
2026-05-05 15:23:58 -07:00
src/pipeline/wowee_collision.cpp
2026-05-05 10:04:45 -07:00
src/pipeline/custom_zone_discovery.cpp
feat(editor): add standalone world editor (rough/WIP)
Standalone wowee_editor tool for creating custom WoW zones.
This is a rough initial implementation — many features work but
M2/WMO rendering still has issues (frame sync, texture layout
transitions) and needs further polish.
Terrain:
- Create new blank terrain with 10 biome types (Grassland, Forest,
Jungle, Desert, Barrens, Snow, Swamp, Rocky, Beach, Volcanic)
- Load existing ADT tiles from extracted game data
- Sculpt brushes: Raise, Lower, Smooth, Flatten, Level
- Chunk edge stitching prevents seams between tiles
- Undo/redo (100-deep stack, Ctrl+Z/Ctrl+Shift+Z)
- Save to WoW ADT/WDT format
Texture Painting:
- Paint/Erase/Replace Base modes
- Full tileset texture browser (1285 textures from manifest)
- Per-zone directory filtering and search
- Alpha map editing with 4-layer limit (auto-replaces weakest)
Object Placement:
- M2 and WMO model placement with full manifest browser (11k M2s, 2k WMOs)
- M2Renderer + WMORenderer integrated (loads .skin files for WotLK)
- Ghost preview follows cursor before placing
- Ctrl+click selection, right-click context menu
- Transform gizmo (Move/Rotate/Scale with axis constraints)
- Position/rotation/scale editing in properties panel
NPC/Monster System:
- 631 creature presets scanned from manifest, categorized
(Critters, Beasts, Humanoids, Undead, Demons, etc.)
- Stats editor: level, health, mana, damage, armor, faction
- Behavior: Stationary, Patrol, Wander, Scripted
- Aggro/leash radius, respawn time, flags (hostile/vendor/etc.)
- Save creature spawns to JSON
Water:
- Place water at configurable height per chunk
- Liquid types: Water, Ocean, Magma, Slime
- Rendered as translucent colored quads
- Saved in ADT MH2O format
Infrastructure:
- Free-fly camera (WASD/QE, right-drag look, scroll speed)
- 5-mode toolbar: Sculpt | Paint | Objects | Water | NPCs
- Asset browser indexes full manifest on startup
- Editor water/marker shaders (pos+color vertex format)
- forceNoCull added to M2Renderer for editor use
- AssetManifest::getEntries() and AssetManager::getManifest() exposed
Known issues:
- M2/WMO rendering may not display on first placement (frame index
sync between update/render was misaligned — now fixed but untested
end-to-end)
- Validation layer errors on shutdown (resource cleanup ordering)
- Object placement on steep terrain can miss raycast
- No undo for texture painting or object placement yet
2026-05-05 03:47:03 -07:00
src/pipeline/terrain_mesh.cpp
# Rendering core
src/rendering/vk_context.cpp
src/rendering/vk_utils.cpp
src/rendering/vk_shader.cpp
src/rendering/vk_texture.cpp
src/rendering/vk_buffer.cpp
src/rendering/vk_pipeline.cpp
src/rendering/camera.cpp
src/rendering/terrain_renderer.cpp
src/rendering/m2_renderer.cpp
src/rendering/m2_renderer_instance.cpp
src/rendering/m2_renderer_particles.cpp
src/rendering/m2_renderer_render.cpp
src/rendering/m2_model_classifier.cpp
src/rendering/wmo_renderer.cpp
src/rendering/frustum.cpp
# Core
src/core/window.cpp
src/core/logger.cpp
src/core/memory_monitor.cpp
# stb_image (needed by AssetManager for PNG overrides)
tools/editor/stb_image_impl.cpp
)
target_include_directories(wowee_editor PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}/src
${CMAKE_CURRENT_SOURCE_DIR}/tools/editor
)
target_include_directories(wowee_editor SYSTEM PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/extern
${CMAKE_CURRENT_SOURCE_DIR}/extern/vk-bootstrap/src
)
target_link_libraries(wowee_editor PRIVATE
SDL2::SDL2
Vulkan::Vulkan
Threads::Threads
ZLIB::ZLIB
${CMAKE_DL_LIBS}
imgui
vk-bootstrap
)
if(TARGET glm::glm)
target_link_libraries(wowee_editor PRIVATE glm::glm)
elseif(glm_FOUND)
target_include_directories(wowee_editor PRIVATE ${GLM_INCLUDE_DIRS})
endif()
if(UNIX AND NOT APPLE)
find_package(X11 QUIET)
if(X11_FOUND)
target_link_libraries(wowee_editor PRIVATE X11)
endif()
endif()
if(WIN32)
target_link_libraries(wowee_editor PRIVATE ws2_32)
if(TARGET SDL2::SDL2main)
target_link_libraries(wowee_editor PRIVATE SDL2::SDL2main)
endif()
endif()
if(NOT MSVC)
target_compile_options(wowee_editor PRIVATE -Wall -Wextra -Wpedantic -Wno-missing-field-initializers)
endif()
if(GLSLC)
add_dependencies(wowee_editor wowee_shaders)
endif()
set_target_properties(wowee_editor PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
)
install(TARGETS wowee_editor RUNTIME DESTINATION bin)
message(STATUS " wowee_editor tool: ENABLED")
2026-02-02 12:24:50 -08:00
# Print configuration summary
message(STATUS "")
message(STATUS "Wowee Configuration:")
message(STATUS " C++ Standard: ${CMAKE_CXX_STANDARD}")
message(STATUS " Build Type: ${CMAKE_BUILD_TYPE}")
message(STATUS " SDL2: ${SDL2_VERSION}")
message(STATUS " OpenSSL: ${OPENSSL_VERSION}")
message(STATUS " ImGui: ${IMGUI_DIR}")
2026-02-23 16:30:49 +01:00
message(STATUS " ASAN: ${WOWEE_ENABLE_ASAN}")
2026-02-02 12:24:50 -08:00
message(STATUS "")
2026-02-18 18:18:30 -08:00
# ---- CPack packaging ----
set(CPACK_PACKAGE_NAME "wowee")
set(CPACK_PACKAGE_VERSION "${PROJECT_VERSION}")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "World of Warcraft client emulator")
set(CPACK_PACKAGE_VENDOR "Wowee")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "Wowee")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
if(WIN32)
set(CPACK_GENERATOR "NSIS")
set(CPACK_NSIS_DISPLAY_NAME "Wowee")
set(CPACK_NSIS_PACKAGE_NAME "Wowee")
set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64")
set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
# Run wowee from bin/ so that ./assets/ resolves correctly.
# SetOutPath sets the shortcut's working directory in NSIS.
set(CPACK_NSIS_CREATE_ICONS_EXTRA
2026-02-18 19:21:14 -08:00
"SetOutPath '$INSTDIR\\\\bin'\nCreateShortCut '$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Wowee.lnk' '$INSTDIR\\\\bin\\\\wowee.exe'")
2026-02-18 18:18:30 -08:00
set(CPACK_NSIS_DELETE_ICONS_EXTRA
2026-02-18 19:21:14 -08:00
"Delete '$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Wowee.lnk'")
2026-02-18 18:18:30 -08:00
elseif(APPLE)
set(CPACK_GENERATOR "DragNDrop")
else()
# Linux — generate postinst/prerm wrapper scripts
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/packaging)
# postinst: write a wrapper script at /usr/local/bin/wowee that cd's to
# the install dir so ./assets/ resolves correctly.
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/packaging/postinst
[[#!/bin/sh
cat > /usr/local/bin/wowee << 'WOWEE_WRAPPER'
#!/bin/sh
cd /opt/wowee/bin
exec ./wowee "$@"
WOWEE_WRAPPER
chmod +x /usr/local/bin/wowee
]])
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/packaging/prerm
"#!/bin/sh\nrm -f /usr/local/bin/wowee\n")
file(CHMOD
${CMAKE_CURRENT_BINARY_DIR}/packaging/postinst
${CMAKE_CURRENT_BINARY_DIR}/packaging/prerm
PERMISSIONS
OWNER_EXECUTE OWNER_WRITE OWNER_READ
GROUP_EXECUTE GROUP_READ
WORLD_EXECUTE WORLD_READ)
set(CPACK_GENERATOR "DEB")
set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/wowee")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Wowee")
set(CPACK_DEBIAN_PACKAGE_SECTION "games")
set(CPACK_DEBIAN_PACKAGE_DEPENDS
2026-02-21 19:41:21 -08:00
"libsdl2-2.0-0, libvulkan1, libssl3, zlib1g")
2026-02-18 18:18:30 -08:00
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
"${CMAKE_CURRENT_BINARY_DIR}/packaging/postinst;${CMAKE_CURRENT_BINARY_DIR}/packaging/prerm")
if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64")
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|ARM64")
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "arm64")
endif()
endif()
include(CPack)