|
14 | 14 | #define MTL_EXPORT_API XR_IMPORT
|
15 | 15 | #endif
|
16 | 16 |
|
17 |
| -constexpr u16 GAMEMTL_CURRENT_VERSION = 0x0001; |
18 |
| - |
19 | 17 | constexpr u32 GAMEMTLS_CHUNK_VERSION = 0x1000;
|
20 | 18 | constexpr u32 GAMEMTLS_CHUNK_AUTOINC = 0x1001;
|
21 | 19 | constexpr u32 GAMEMTLS_CHUNK_MTLS = 0x1002;
|
@@ -46,6 +44,22 @@ constexpr u32 GAMEMTL_NONE_IDX = u16(-1);
|
46 | 44 |
|
47 | 45 | constexpr pcstr GAMEMTL_FILENAME = "gamemtl.xr";
|
48 | 46 |
|
| 47 | +enum EGameMtlVersion : u16 |
| 48 | +{ |
| 49 | + // The big issue is that GSC had version 1 in SOC, |
| 50 | + // then they introduced a significant change in CS, |
| 51 | + // but didn't changed the version number... |
| 52 | + // In fact, they NEVER have changed the number |
| 53 | + // since the system was introduced in 2002. |
| 54 | + // So, we introduce helper values: |
| 55 | + GAMEMTL_VERSION_SOC = u16(-1), |
| 56 | + |
| 57 | + GAMEMTL_VERSION_UNKNOWN = 0, |
| 58 | + |
| 59 | + // Real version numbers in GAMEMTL_FILENAME: |
| 60 | + GAMEMTL_CURRENT_VERSION = 1, // SOC/CS/COP |
| 61 | +}; |
| 62 | + |
49 | 63 | // fwd. decl.
|
50 | 64 | class IReader;
|
51 | 65 | class IWriter;
|
@@ -233,6 +247,7 @@ class MTL_EXPORT_API CGameMtlLibrary
|
233 | 247 | GameMtlPairVec material_pairs_rt;
|
234 | 248 |
|
235 | 249 | u32 m_file_age{};
|
| 250 | + EGameMtlVersion m_version{}; |
236 | 251 |
|
237 | 252 | public:
|
238 | 253 | CGameMtlLibrary();
|
|
0 commit comments