Add basic Linux build support
This commit is contained in:
7
.gitignore
vendored
7
.gitignore
vendored
@ -1,8 +1,9 @@
|
|||||||
# idea
|
# idea
|
||||||
.idea/
|
.idea/
|
||||||
cmake-build-debug/
|
cmake-build-*/
|
||||||
cmake-build-release/
|
|
||||||
cmake-build-minsizerel/
|
# build
|
||||||
|
build/
|
||||||
|
|
||||||
# vs
|
# vs
|
||||||
.vs/
|
.vs/
|
||||||
|
|||||||
@ -43,10 +43,10 @@ namespace PKG
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
float_t BinaryReader::ReadSingle()
|
float BinaryReader::ReadSingle()
|
||||||
{
|
{
|
||||||
float_t result = 0;
|
float result = 0;
|
||||||
m_File.read(reinterpret_cast<char*>(&result), sizeof(float_t));
|
m_File.read(reinterpret_cast<char*>(&result), sizeof(float));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -25,7 +25,7 @@ namespace PKG
|
|||||||
|
|
||||||
int32_t ReadInt32();
|
int32_t ReadInt32();
|
||||||
uint32_t ReadUInt32();
|
uint32_t ReadUInt32();
|
||||||
float_t ReadSingle();
|
float ReadSingle();
|
||||||
char ReadChar();
|
char ReadChar();
|
||||||
std::string ReadString(uint32_t length);
|
std::string ReadString(uint32_t length);
|
||||||
std::string ReadNString(int32_t maxLength = -1);
|
std::string ReadNString(int32_t maxLength = -1);
|
||||||
|
|||||||
@ -51,7 +51,7 @@ namespace PKG
|
|||||||
|
|
||||||
TexMipMap mipmap;
|
TexMipMap mipmap;
|
||||||
|
|
||||||
switch (container.ImageContainerVersion)
|
switch (container.imageContainerVersion)
|
||||||
{
|
{
|
||||||
case ImageContainerVersion::VERSION1:
|
case ImageContainerVersion::VERSION1:
|
||||||
mipmap = ReadMipMapV1(reader); break;
|
mipmap = ReadMipMapV1(reader); break;
|
||||||
@ -114,11 +114,11 @@ namespace PKG
|
|||||||
|
|
||||||
int version = std::stoi(container.Magic.substr(4, 4));
|
int version = std::stoi(container.Magic.substr(4, 4));
|
||||||
|
|
||||||
container.ImageContainerVersion = (ImageContainerVersion)version;
|
container.imageContainerVersion = (ImageContainerVersion)version;
|
||||||
|
|
||||||
if (container.ImageContainerVersion == ImageContainerVersion::VERSION4 && container.ImageFormat != FreeImageFormat::FIF_MP4)
|
if (container.imageContainerVersion == ImageContainerVersion::VERSION4 && container.ImageFormat != FreeImageFormat::FIF_MP4)
|
||||||
{
|
{
|
||||||
container.ImageContainerVersion = ImageContainerVersion::VERSION3;
|
container.imageContainerVersion = ImageContainerVersion::VERSION3;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < imageCount; i++)
|
for (int i = 0; i < imageCount; i++)
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
#define CORE_H
|
#define CORE_H
|
||||||
|
|
||||||
#ifdef PKG_SHARED
|
#ifdef PKG_SHARED
|
||||||
|
#ifdef __WIN32__
|
||||||
#ifdef PKG_BUILD_DLL
|
#ifdef PKG_BUILD_DLL
|
||||||
#define PKG_API __declspec(dllexport)
|
#define PKG_API __declspec(dllexport)
|
||||||
#else
|
#else
|
||||||
@ -14,6 +15,9 @@
|
|||||||
#else
|
#else
|
||||||
#define PKG_API
|
#define PKG_API
|
||||||
#endif
|
#endif
|
||||||
|
#else
|
||||||
|
#define PKG_API
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif //CORE_H
|
#endif //CORE_H
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,8 @@ namespace PKG
|
|||||||
public:
|
public:
|
||||||
std::string Magic;
|
std::string Magic;
|
||||||
FreeImageFormat ImageFormat{};
|
FreeImageFormat ImageFormat{};
|
||||||
ImageContainerVersion ImageContainerVersion;
|
// name conflict
|
||||||
|
ImageContainerVersion imageContainerVersion;
|
||||||
|
|
||||||
std::vector<TexImage> Images;
|
std::vector<TexImage> Images;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user