chore(testing): add unit tests and update core render/network pipelines

- add new tests:
  - test_blp_loader.cpp
  - test_dbc_loader.cpp
  - test_entity.cpp
  - test_frustum.cpp
  - test_m2_structs.cpp
  - test_opcode_table.cpp
  - test_packet.cpp
  - test_srp.cpp
  - CMakeLists.txt
- add docs and progress tracking:
  - TESTING.md
  - perf_baseline.md
- update project config/build:
  - .gitignore
  - CMakeLists.txt
  - test.sh
- core engine updates:
  - application.cpp
  - game_handler.cpp
  - world_socket.cpp
  - adt_loader.cpp
  - asset_manager.cpp
  - m2_renderer.cpp
  - post_process_pipeline.cpp
  - renderer.cpp
  - terrain_manager.cpp
  - game_screen.cpp
- add profiler header:
  - profiler.hpp
This commit is contained in:
Paul 2026-04-03 09:41:34 +03:00
parent a2814ab082
commit 2cb47bf126
25 changed files with 2042 additions and 96 deletions

View file

@ -1,5 +1,6 @@
#include "pipeline/adt_loader.hpp"
#include "core/logger.hpp"
#include "core/profiler.hpp"
#include <cstring>
#include <cmath>
#include <algorithm>
@ -28,6 +29,7 @@ float HeightMap::getHeight(int x, int y) const {
// ADTLoader implementation
ADTTerrain ADTLoader::load(const std::vector<uint8_t>& adtData) {
ZoneScopedN("ADTLoader::load");
ADTTerrain terrain;
if (adtData.empty()) {

View file

@ -1,6 +1,7 @@
#include "pipeline/asset_manager.hpp"
#include "core/logger.hpp"
#include "core/memory_monitor.hpp"
#include "core/profiler.hpp"
#include <algorithm>
#include <cstdlib>
#include <filesystem>
@ -166,6 +167,7 @@ void AssetManager::setBaseFallbackPath(const std::string& basePath) {
}
BLPImage AssetManager::loadTexture(const std::string& path) {
ZoneScopedN("AssetManager::loadTexture");
if (!initialized) {
LOG_ERROR("AssetManager not initialized");
return BLPImage();
@ -265,6 +267,7 @@ void AssetManager::setExpansionDataPath(const std::string& path) {
}
std::shared_ptr<DBCFile> AssetManager::loadDBC(const std::string& name) {
ZoneScopedN("AssetManager::loadDBC");
if (!initialized) {
LOG_ERROR("AssetManager not initialized");
return nullptr;