Merge pull request #31 from MindRapist/fix/locale-texture-loading-errors

Locale selection for RelWithDebInfo fix and dragon_rock/mobs textures
This commit is contained in:
d1str4ught
2025-11-21 22:43:37 +01:00
committed by GitHub
3 changed files with 28 additions and 3 deletions

View File

@@ -1,2 +1,25 @@
# m2dev-client-src # Client Source Repository
[![build](https://github.com/d1str4ught/m2dev-client-src/actions/workflows/main.yml/badge.svg)](https://github.com/d1str4ught/m2dev-client-src/actions/workflows/main.yml)
This repository contains the source code necessary to compile the game client executable.
## How to build
> cmake -S . -B build
>
> cmake --build build
---
## ✨ Key Source Code Fixes
The following fixes address critical issues related to locale compilation and texture loading, ensuring compatibility with new content and correct language output.
### 🖼️ Texture and Resource Loading Fix
* **Fix: Missing Texture Cache:** Resolved an issue in `UserInterface/UserInterface.cpp` by adding the necessary missing resource directory names (`"_texcache"`) within the `PackInitialize` function.
* **Impact:** This ensures that texture files for mobs and terrain for the new maps (Cape, Bay, Dawn, Thunder) are displayed.
### 🌐 Build Configuration Fix
* **Fix: Locale Build Typos:** Corrected a critical typo in `UserInterface/locale.cpp` where the `RelWithDebInfo` build configuration incorrectly referenced `tr (1253)`.
* **Impact:** The value was updated to **`gr (1253)`** to correctly reference the Greek locale option before game launch.

View File

@@ -266,7 +266,7 @@ struct SLOCALEDATA
{ LSS_EUROPE, "it", 1252, "1234abcd5678efgh" }, // GameForge (Italy) { LSS_EUROPE, "it", 1252, "1234abcd5678efgh" }, // GameForge (Italy)
{ LSS_EUROPE, "fr", 1252, "1234abcd5678efgh" }, // GameForge (France) { LSS_EUROPE, "fr", 1252, "1234abcd5678efgh" }, // GameForge (France)
{ LSS_EUROPE, "pt", 1252, "1234abcd5678efgh" }, // GameForge (Portugal) { LSS_EUROPE, "pt", 1252, "1234abcd5678efgh" }, // GameForge (Portugal)
{ LSS_EUROPE, "tr", 1253, "1234abcd5678efgh" }, // GameForge (Greece) { LSS_EUROPE, "gr", 1253, "1234abcd5678efgh" }, // GameForge (Greece)
{ LSS_EUROPE, "pl", 1250, "1234abcd5678efgh" }, // GameForge (Poland) { LSS_EUROPE, "pl", 1250, "1234abcd5678efgh" }, // GameForge (Poland)
{ LSS_EUROPE, "tr", 1254, "1234abcd5678efgh" }, // GameForge (Turkey) { LSS_EUROPE, "tr", 1254, "1234abcd5678efgh" }, // GameForge (Turkey)
{ LSS_EUROPE, "dk", 1252, "1234abcd5678efgh" }, // GameForge (Demmark) { LSS_EUROPE, "dk", 1252, "1234abcd5678efgh" }, // GameForge (Demmark)

View File

@@ -164,6 +164,8 @@ bool PackInitialize(const char * c_pszFolder)
"metin2_patch_w20_etc", "metin2_patch_w20_etc",
"metin2_patch_dragon_rock", "metin2_patch_dragon_rock",
"metin2_patch_dragon_rock_mobs", "metin2_patch_dragon_rock_mobs",
"metin2_patch_dragon_rock_texcache",
"metin2_patch_dragon_rock_mobs_texcache",
"metin2_patch_etc", "metin2_patch_etc",
"metin2_patch_xmas", "metin2_patch_xmas",
"metin2_patch_eu3", "metin2_patch_eu3",