mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-07-19 14:30:37 +00:00
feat: add image loading to T4 (#890)
This commit is contained in:
@@ -134,7 +134,7 @@ using `Linker`):
|
||||
| XModel | ✅ | ❌ | Model data can be exported to `XMODEL_EXPORT/XMODEL_BIN`, `OBJ`, `GLB/GLTF`. |
|
||||
| Material | ❌ | ❌ | |
|
||||
| MaterialTechniqueSet | ❌ | ❌ | |
|
||||
| GfxImage | ✅ | ❌ | A few special image encodings are not yet supported. |
|
||||
| GfxImage | ✅ | ✅ | A few special image encodings are not yet supported. |
|
||||
| snd_alias_list_t | ❌ | ❌ | |
|
||||
| SndDriverGlobals | ❌ | ❌ | |
|
||||
| LoadedSound | ✅ | ❌ | |
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
#include "Asset/GlobalAssetPoolsLoader.h"
|
||||
#include "Game/T4/AssetMarkerT4.h"
|
||||
#include "Game/T4/Font/FontLoaderT4.h"
|
||||
#include "Game/T4/Image/ImageLoaderEmbeddedT4.h"
|
||||
#include "Game/T4/Image/ImageLoaderExternalT4.h"
|
||||
#include "Game/T4/T4.h"
|
||||
#include "Game/T4/Weapon/AccuracyGraphLoaderT4.h"
|
||||
#include "Game/T4/XAnim/XAnimLoaderT4.h"
|
||||
@@ -94,6 +96,8 @@ namespace
|
||||
auto& memory = zone.Memory();
|
||||
|
||||
collection.AddAssetCreator(xanim::CreateLoaderT4(memory, searchPath, zone));
|
||||
collection.AddAssetCreator(image::CreateLoaderEmbeddedT4(memory, searchPath));
|
||||
collection.AddAssetCreator(image::CreateLoaderExternalT4(memory, searchPath));
|
||||
collection.AddAssetCreator(font::CreateLoaderT4(memory, searchPath));
|
||||
collection.AddAssetCreator(localize::CreateLoaderT4(memory, searchPath, zone));
|
||||
collection.AddAssetCreator(map_ents::CreateLoaderT4(memory, searchPath));
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#options GAME (IW3, IW4, IW5, T5, T6)
|
||||
#options GAME (IW3, IW4, IW5, T4, T5, T6)
|
||||
|
||||
#filename "Game/" + GAME + "/Image/ImageLoaderEmbedded" + GAME + ".cpp"
|
||||
|
||||
@@ -8,13 +8,15 @@
|
||||
#define FEATURE_IW4
|
||||
#elif GAME == "IW5"
|
||||
#define FEATURE_IW5
|
||||
#elif GAME == "T4"
|
||||
#define FEATURE_T4
|
||||
#elif GAME == "T5"
|
||||
#define FEATURE_T5
|
||||
#elif GAME == "T6"
|
||||
#define FEATURE_T6
|
||||
#endif
|
||||
|
||||
#if defined(FEATURE_IW3)
|
||||
#if defined(FEATURE_IW3) || defined(FEATURE_T4)
|
||||
#define IWI_NS iwi6
|
||||
#define FLAG_CUBE IMG_FLAG_CUBEMAP
|
||||
#define FLAG_3D IMG_FLAG_VOLMAP
|
||||
@@ -136,7 +138,7 @@ namespace
|
||||
if (texture->GetTextureType() == TextureType::T_3D)
|
||||
loadDef->flags |= IWI_NS::FLAG_3D;
|
||||
|
||||
#if defined(FEATURE_IW3)
|
||||
#if defined(FEATURE_IW3) || defined(FEATURE_T4)
|
||||
loadDef->dimensions[0] = image->width;
|
||||
loadDef->dimensions[1] = image->height;
|
||||
loadDef->dimensions[2] = image->depth;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#options GAME (IW3, IW4, IW5, T5, T6)
|
||||
#options GAME (IW3, IW4, IW5, T4, T5, T6)
|
||||
|
||||
#filename "Game/" + GAME + "/Image/ImageLoaderEmbedded" + GAME + ".h"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#options GAME (IW3, IW4, IW5, T5, T6)
|
||||
#options GAME (IW3, IW4, IW5, T4, T5, T6)
|
||||
|
||||
#filename "Game/" + GAME + "/Image/ImageLoaderExternal" + GAME + ".cpp"
|
||||
|
||||
@@ -8,13 +8,15 @@
|
||||
#define FEATURE_IW4
|
||||
#elif GAME == "IW5"
|
||||
#define FEATURE_IW5
|
||||
#elif GAME == "T4"
|
||||
#define FEATURE_T4
|
||||
#elif GAME == "T5"
|
||||
#define FEATURE_T5
|
||||
#elif GAME == "T6"
|
||||
#define FEATURE_T6
|
||||
#endif
|
||||
|
||||
#if defined(FEATURE_IW3)
|
||||
#if defined(FEATURE_IW3) || defined(FEATURE_T4)
|
||||
#define IWI_VERSION IWI_6
|
||||
#elif defined(FEATURE_IW4) || defined(FEATURE_IW5)
|
||||
#define IWI_VERSION IWI_8
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#options GAME (IW3, IW4, IW5, T5, T6)
|
||||
#options GAME (IW3, IW4, IW5, T4, T5, T6)
|
||||
|
||||
#filename "Game/" + GAME + "/Image/ImageLoaderExternal" + GAME + ".h"
|
||||
|
||||
|
||||
@@ -10,10 +10,6 @@
|
||||
#define FEATURE_IW3
|
||||
#define DX9
|
||||
#define IWI6
|
||||
#elif GAME == "T4"
|
||||
#define FEATURE_T4
|
||||
#define DX9
|
||||
#define IWI6
|
||||
#elif GAME == "IW4"
|
||||
#define FEATURE_IW4
|
||||
#define DX9
|
||||
@@ -22,6 +18,10 @@
|
||||
#define FEATURE_IW5
|
||||
#define DX9
|
||||
#define IWI8
|
||||
#elif GAME == "T4"
|
||||
#define FEATURE_T4
|
||||
#define DX9
|
||||
#define IWI6
|
||||
#elif GAME == "T5"
|
||||
#define FEATURE_T5
|
||||
#define DX9
|
||||
|
||||
@@ -8,10 +8,6 @@
|
||||
#define FEATURE_IW3
|
||||
#define DX9
|
||||
#define IWI6
|
||||
#elif GAME == "T4"
|
||||
#define FEATURE_T4
|
||||
#define DX9
|
||||
#define IWI6
|
||||
#elif GAME == "IW4"
|
||||
#define FEATURE_IW4
|
||||
#define DX9
|
||||
@@ -20,6 +16,10 @@
|
||||
#define FEATURE_IW5
|
||||
#define DX9
|
||||
#define IWI8
|
||||
#elif GAME == "T4"
|
||||
#define FEATURE_T4
|
||||
#define DX9
|
||||
#define IWI6
|
||||
#elif GAME == "T5"
|
||||
#define FEATURE_T5
|
||||
#define DX9
|
||||
|
||||
Reference in New Issue
Block a user