Commit graph

5 commits

Author SHA1 Message Date
Luan Santos
388b3ba2ea
feat(platform): add native Cocoa/AppKit windowing for macOS (#1559)
New Features:
- Native macOS app with Cocoa windowing, OpenGL view, improved input, clipboard and cursor handling.
- Platform-aware keyboard and shortcut behavior with clearer primary/meta/control semantics and normalized key combos.

Bug Fixes:
- Expanded detection for "connection refused" network errors.

Chores:
- macOS build/bundle and packaging improvements; new dependency overlay added; CI now runs macOS build when relevant.

Tests:
- AddressSanitizer support added for test builds.
2026-05-16 13:06:48 -03:00
Eduardo Dantas
2288d63b0a
feat: add otml alias resolution (#1634)
New Features:
• OTML variable/alias support for styles, including nested, node-scoped, and global aliases for consistent theming.

Documentation:
• Added a detailed guide and example demonstrating alias declarations, scoping, resolution order, literal handling, and best practices.

Bug Fixes:
• UI loading now ignores variable-only nodes and better handles literal color tokens and invalid or circular alias references.

Tests:
• Added tests covering alias resolution, scoping, error cases, and export behavior.
Changelog
• New changelog entry documenting OTML alias resolution and related note about an include path update.
2026-02-25 18:00:53 -03:00
SkullzOTS
ce858a21b7
fix: android (#1515) 2025-12-30 13:17:38 -03:00
Eduardo Dantas
67460c09bb
refactor: string encoding to use utf8cpp and add tests (#1443)
Update string encoding implementation to use utf8cpp

This change updates the string encoding implementation to use the utf8cpp library for improved robustness and consistency across platforms. It refactors the encoding functions in src/framework/stdext/string.cpp, adds comprehensive unit tests, updates build configurations to include utf8cpp, and documents the new encoding policy and behavior.

String encoding improvements

Refactored all string encoding functions in src/framework/stdext/string.cpp to use the utf8cpp library, providing strict UTF-8 validation, robust conversions between UTF-8, Latin-1, and UTF-16, and consistent error handling.

Added a new documentation file docs/string-encoding-policy.md detailing the updated encoding policy, error handling, dependencies, and testing strategy.

Testing enhancements

Added a new unit test suite in tests/stdext/string_encoding_test.cpp covering UTF-8 validation, conversions, roundtrip consistency, control character handling, and platform-specific UTF-16 conversions.

Updated the test build configuration to include the new test directory and sources.

Build system updates

Updated src/CMakeLists.txt to require and link the utf8cpp library for all platforms, ensuring proper integration.

Added utf8cpp as a dependency in vcpkg.json for package management.
2025-11-20 02:08:02 -03:00
Eduardo Dantas
294606e47c
perf: optimize spectator retrieval and add unit tests (gtest) (#1319)
Refactors the build system by introducing the static library otclient_core, separating core client code from platform-specific entry points. Centralizes compiler flags, precompiled headers, unity build, and sanitizer configuration to ensure consistent behavior across all platforms. Updates include paths and dependencies, ensuring that every platform links correctly against the new core target. Simplifies Discord RPC support by using a dedicated CMake option.

Modernizes C++ code by making type-checking methods const and adding new silent state-update methods to Creature, along with a const getter for retrieving the previous position. Updates Lua bindings to expose overloaded const and non-const methods, preventing ambiguity correctly.

Improves code hygiene in Map by reorganizing includes, adding a helper function to clean duplicated spectators, and optimizing spectator retrieval with memory reservations and more efficient data structures.

Adds Google Test support and introduces a CMake option to enable or disable building unit tests.
2025-11-14 23:48:34 -03:00