From bd3909e0c497a2e5caefd9e741ab771d82790c62 Mon Sep 17 00:00:00 2001 From: Igor Novikov Date: Mon, 1 Jan 2018 22:20:29 +0500 Subject: [PATCH] WIP of xrAI and xrSE_Factory. Use an external load mechanism for STextureParams. --- src/utils/xrAI/compiler_load.cpp | 13 +------------ src/utils/xrAI/xrAI.vcxproj | 2 ++ src/utils/xrAI/xrAI.vcxproj.filters | 6 ++++++ 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/utils/xrAI/compiler_load.cpp b/src/utils/xrAI/compiler_load.cpp index 75e6b743c8a..355444ede6d 100644 --- a/src/utils/xrAI/compiler_load.cpp +++ b/src/utils/xrAI/compiler_load.cpp @@ -144,19 +144,8 @@ void xrLoad(LPCSTR name, bool draft_mode) IReader* THM = FS.r_open("$game_textures$", N); R_ASSERT2(THM, N); - // version - u32 version = 0; - R_ASSERT(THM->r_chunk(THM_CHUNK_VERSION, &version)); // analyze thumbnail information - R_ASSERT(THM->find_chunk(THM_CHUNK_TEXTUREPARAM)); - THM->r(&BT.THM.fmt, sizeof(STextureParams::ETFormat)); - BT.THM.flags.assign(THM->r_u32()); - BT.THM.border_color = THM->r_u32(); - BT.THM.fade_color = THM->r_u32(); - BT.THM.fade_amount = THM->r_u32(); - BT.THM.mip_filter = THM->r_u32(); - BT.THM.width = THM->r_u32(); - BT.THM.height = THM->r_u32(); + BT.THM.Load(*THM); BOOL bLOD = FALSE; if (N[0] == 'l' && N[1] == 'o' && N[2] == 'd' && N[3] == '\\') bLOD = TRUE; diff --git a/src/utils/xrAI/xrAI.vcxproj b/src/utils/xrAI/xrAI.vcxproj index 4d2f3eace3e..21f76f17578 100644 --- a/src/utils/xrAI/xrAI.vcxproj +++ b/src/utils/xrAI/xrAI.vcxproj @@ -154,6 +154,7 @@ + @@ -191,6 +192,7 @@ + diff --git a/src/utils/xrAI/xrAI.vcxproj.filters b/src/utils/xrAI/xrAI.vcxproj.filters index a59f6bcb669..af1bdaefd43 100644 --- a/src/utils/xrAI/xrAI.vcxproj.filters +++ b/src/utils/xrAI/xrAI.vcxproj.filters @@ -156,6 +156,9 @@ ALife\guid_generator + + Compiler + @@ -332,6 +335,9 @@ Resources + + Compiler +