Fix Windows build errors in warden and CharCreateResult

warden_emulator.cpp: guard unicorn include + entire implementation with
HAVE_UNICORN; provide stub implementations for platforms without Unicorn
(Windows ARM64 which has no unicorn MSYS2 package)

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

world_packets.hpp + game_handler.cpp: rename CharCreateResult::ERROR to
CharCreateResult::CHAR_ERROR to avoid wingdi.h #define ERROR 0 collision
This commit is contained in:
Kelsi 2026-02-18 18:39:07 -08:00
parent fbb0b76362
commit c0c0210b66
4 changed files with 40 additions and 6 deletions

View file

@ -187,7 +187,7 @@ enum class CharCreateResult : uint8_t {
// CHAR_CREATE error codes
IN_PROGRESS = 0x2E, // CHAR_CREATE_IN_PROGRESS
ERROR = 0x30, // CHAR_CREATE_ERROR
CHAR_ERROR = 0x30, // CHAR_CREATE_ERROR
FAILED = 0x31, // CHAR_CREATE_FAILED
NAME_IN_USE = 0x32, // CHAR_CREATE_NAME_IN_USE
DISABLED = 0x33, // CHAR_CREATE_DISABLED