mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-12 07:48:16 -05:00
ObjLoading: Add basis for Iwi loading
This commit is contained in:
24
src/ObjLoading/Image/IwiLoader.cpp
Normal file
24
src/ObjLoading/Image/IwiLoader.cpp
Normal file
@ -0,0 +1,24 @@
|
||||
#include "IwiLoader.h"
|
||||
|
||||
IwiLoader::IwiLoader(MemoryManager* memoryManager)
|
||||
{
|
||||
m_memory_manager = memoryManager;
|
||||
}
|
||||
|
||||
Texture* IwiLoader::LoadIwi(FileAPI::IFile* file)
|
||||
{
|
||||
struct
|
||||
{
|
||||
char tag[3];
|
||||
char version;
|
||||
} iwiHeaderMeta{};
|
||||
|
||||
if (file->Read(&iwiHeaderMeta, sizeof iwiHeaderMeta, 1) != 1)
|
||||
return nullptr;
|
||||
|
||||
printf("Read IWI with version %i\n", iwiHeaderMeta.version);
|
||||
|
||||
// TODO: Read iwi based on version
|
||||
|
||||
return nullptr;
|
||||
}
|
15
src/ObjLoading/Image/IwiLoader.h
Normal file
15
src/ObjLoading/Image/IwiLoader.h
Normal file
@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include "Utils/FileAPI.h"
|
||||
#include "Utils/MemoryManager.h"
|
||||
#include "Image/Texture.h"
|
||||
|
||||
class IwiLoader
|
||||
{
|
||||
MemoryManager* m_memory_manager;
|
||||
|
||||
public:
|
||||
explicit IwiLoader(MemoryManager* memoryManager);
|
||||
|
||||
Texture* LoadIwi(FileAPI::IFile* file);
|
||||
};
|
Reference in New Issue
Block a user