Removed lcint types.

This commit is contained in:
Leonardo Zide 2017-12-02 12:22:04 -08:00
parent c612397b9d
commit 636e013455
33 changed files with 353 additions and 363 deletions

View file

@ -189,7 +189,7 @@ bool lcCamera::ParseLDrawLine(QTextStream& Stream)
bool lcCamera::FileLoad(lcFile& file)
{
lcuint8 version, ch;
quint8 version, ch;
version = file.ReadU8();
@ -201,10 +201,10 @@ bool lcCamera::FileLoad(lcFile& file)
if (file.ReadU8() != 1)
return false;
lcuint16 time;
quint16 time;
float param[4];
lcuint8 type;
lcuint32 n;
quint8 type;
quint32 n;
file.ReadU32(&n, 1);
while (n--)
@ -274,7 +274,7 @@ bool lcCamera::FileLoad(lcFile& file)
while (ch--)
{
lcuint8 step;
quint8 step;
double eye[3], target[3], up[3];
float f[3];
@ -314,13 +314,13 @@ bool lcCamera::FileLoad(lcFile& file)
}
else
{
lcint32 n;
qint32 n;
if (version < 6)
{
lcuint16 time;
quint16 time;
float param[4];
lcuint8 type;
quint8 type;
n = file.ReadS32();
while (n--)
@ -367,8 +367,8 @@ bool lcCamera::FileLoad(lcFile& file)
if ((version > 1) && (version < 4))
{
lcuint32 show;
lcint32 user;
quint32 show;
qint32 user;
file.ReadU32(&show, 1);
// if (version > 2)

View file

@ -72,7 +72,7 @@ public:
return (mState & LC_CAMERA_SELECTION_MASK) != 0;
}
virtual bool IsSelected(lcuint32 Section) const override
virtual bool IsSelected(quint32 Section) const override
{
switch (Section)
{
@ -99,7 +99,7 @@ public:
mState &= ~(LC_CAMERA_SELECTION_MASK | LC_CAMERA_FOCUS_MASK);
}
virtual void SetSelected(lcuint32 Section, bool Selected) override
virtual void SetSelected(quint32 Section, bool Selected) override
{
switch (Section)
{
@ -131,7 +131,7 @@ public:
return (mState & LC_CAMERA_FOCUS_MASK) != 0;
}
virtual bool IsFocused(lcuint32 Section) const override
virtual bool IsFocused(quint32 Section) const override
{
switch (Section)
{
@ -150,7 +150,7 @@ public:
return false;
}
virtual void SetFocused(lcuint32 Section, bool Focus) override
virtual void SetFocused(quint32 Section, bool Focus) override
{
switch (Section)
{
@ -177,7 +177,7 @@ public:
}
}
virtual lcuint32 GetFocusSection() const override
virtual quint32 GetFocusSection() const override
{
if (mState & LC_CAMERA_POSITION_FOCUSED)
return LC_CAMERA_SECTION_POSITION;
@ -191,12 +191,12 @@ public:
return ~0;
}
virtual lcuint32 GetAllowedTransforms() const override
virtual quint32 GetAllowedTransforms() const override
{
return LC_OBJECT_TRANSFORM_MOVE_X | LC_OBJECT_TRANSFORM_MOVE_Y | LC_OBJECT_TRANSFORM_MOVE_Z;
}
virtual lcVector3 GetSectionPosition(lcuint32 Section) const override
virtual lcVector3 GetSectionPosition(quint32 Section) const override
{
switch (Section)
{
@ -301,6 +301,6 @@ protected:
void Initialize();
lcuint32 mState;
quint32 mState;
};

View file

@ -14,7 +14,7 @@ lcGroup::~lcGroup()
void lcGroup::FileLoad(lcFile* File)
{
lcint32 GroupIndex;
qint32 GroupIndex;
char Name[LC_MAX_GROUP_NAME + 1];
File->ReadU8();

View file

@ -7,7 +7,7 @@ static void CopyFromQImage(const QImage& Src, Image& Dest)
bool Alpha = Src.hasAlphaChannel();
Dest.Allocate(Src.width(), Src.height(), Alpha ? LC_PIXEL_FORMAT_R8G8B8A8 : LC_PIXEL_FORMAT_R8G8B8);
lcuint8* Bytes = (lcuint8*)Dest.mData;
quint8* Bytes = (quint8*)Dest.mData;
for (int y = 0; y < Dest.mHeight; y++)
{

View file

@ -26,10 +26,10 @@ public:
bool mDrawEdgeLines;
float mLineWidth;
bool mDrawGridStuds;
lcuint32 mGridStudColor;
quint32 mGridStudColor;
bool mDrawGridLines;
int mGridLineSpacing;
lcuint32 mGridLineColor;
quint32 mGridLineColor;
bool mFixedAxes;
};

View file

@ -321,7 +321,7 @@ bool lcLoadColorFile(lcFile& File)
}
// Check if the new color is valid.
if (Color.Code == (lcuint32)-1 || Color.Value[0] == FLT_MAX)
if (Color.Code == (quint32)-1 || Color.Value[0] == FLT_MAX)
continue;
if (Color.Edge[0] == FLT_MAX)
@ -402,7 +402,7 @@ void lcLoadDefaultColors()
lcLoadColorFile(MemSettings);
}
int lcGetColorIndex(lcuint32 ColorCode)
int lcGetColorIndex(quint32 ColorCode)
{
for (int ColorIdx = 0; ColorIdx < gColorList.GetSize(); ColorIdx++)
if (gColorList[ColorIdx].Code == ColorCode)

View file

@ -8,7 +8,7 @@
struct lcColor
{
lcuint32 Code;
quint32 Code;
bool Translucent;
lcVector4 Value;
lcVector4 Edge;
@ -51,22 +51,22 @@ extern int gDefaultColor;
void lcLoadDefaultColors();
bool lcLoadColorFile(lcFile& File);
int lcGetColorIndex(lcuint32 ColorCode);
int lcGetColorIndex(quint32 ColorCode);
int lcGetBrickLinkColor(int ColorIndex);
inline lcuint32 lcGetColorCodeFromExtendedColor(int Color)
inline quint32 lcGetColorCodeFromExtendedColor(int Color)
{
const int ConverstionTable[] = { 4, 12, 2, 10, 1, 9, 14, 15, 8, 0, 6, 13, 13, 334, 36, 44, 34, 42, 33, 41, 46, 47, 7, 382, 6, 13, 11, 383 };
return ConverstionTable[Color];
}
inline lcuint32 lcGetColorCodeFromOriginalColor(int Color)
inline quint32 lcGetColorCodeFromOriginalColor(int Color)
{
const int ConverstionTable[] = { 0, 2, 4, 9, 7, 6, 22, 8, 10, 11, 14, 16, 18, 9, 21, 20, 22, 8, 10, 11 };
return lcGetColorCodeFromExtendedColor(ConverstionTable[Color]);
}
inline lcuint32 lcGetColorCode(int ColorIndex)
inline quint32 lcGetColorCode(int ColorIndex)
{
return gColorList[ColorIndex].Code;
}

View file

@ -4,8 +4,8 @@
#include <string.h>
#include "lc_math.h"
#define LC_FOURCC(ch0, ch1, ch2, ch3) (lcuint32)((lcuint32)(lcuint8)(ch0) | ((lcuint32)(lcuint8)(ch1) << 8) | \
((lcuint32)(lcuint8)(ch2) << 16) | ((lcuint32)(lcuint8)(ch3) << 24 ))
#define LC_FOURCC(ch0, ch1, ch2, ch3) (quint32)((quint32)(quint8)(ch0) | ((quint32)(quint8)(ch1) << 8) | \
((quint32)(quint8)(ch2) << 16) | ((quint32)(quint8)(ch3) << 24 ))
class lcFile
{
@ -33,98 +33,98 @@ public:
virtual size_t ReadBuffer(void* Buffer, size_t Bytes) = 0;
virtual size_t WriteBuffer(const void* Buffer, size_t Bytes) = 0;
lcuint8 ReadU8()
quint8 ReadU8()
{
lcuint8 Value;
quint8 Value;
Read8(&Value, 1);
return Value;
}
size_t ReadU8(lcuint8* Buffer, size_t Count)
size_t ReadU8(quint8* Buffer, size_t Count)
{
return Read8(Buffer, Count);
}
lcint8 ReadS8()
qint8 ReadS8()
{
lcint8 Value;
qint8 Value;
Read8(&Value, 1);
return Value;
}
size_t ReadS8(lcint8* Buffer, size_t Count)
size_t ReadS8(qint8* Buffer, size_t Count)
{
return Read8(Buffer, Count);
}
lcuint16 ReadU16()
quint16 ReadU16()
{
lcuint16 Value;
quint16 Value;
Read16(&Value, 1);
return Value;
}
size_t ReadU16(lcuint16* Buffer, size_t Count)
size_t ReadU16(quint16* Buffer, size_t Count)
{
return Read16(Buffer, Count);
}
lcint16 ReadS16()
qint16 ReadS16()
{
lcint16 Value;
qint16 Value;
Read16(&Value, 1);
return Value;
}
size_t ReadS16(lcint16* Buffer, size_t Count)
size_t ReadS16(qint16* Buffer, size_t Count)
{
return Read16(Buffer, Count);
}
lcuint32 ReadU32()
quint32 ReadU32()
{
lcuint32 Value;
quint32 Value;
Read32(&Value, 1);
return Value;
}
size_t ReadU32(lcuint32* Buffer, size_t Count)
size_t ReadU32(quint32* Buffer, size_t Count)
{
return Read32(Buffer, Count);
}
lcint32 ReadS32()
qint32 ReadS32()
{
lcint32 Value;
qint32 Value;
Read32(&Value, 1);
return Value;
}
size_t ReadS32(lcint32* Buffer, size_t Count)
size_t ReadS32(qint32* Buffer, size_t Count)
{
return Read32(Buffer, Count);
}
lcuint64 ReadU64()
quint64 ReadU64()
{
lcuint64 Value;
quint64 Value;
Read64(&Value, 1);
return Value;
}
size_t ReadU64(lcuint64* Buffer, size_t Count)
size_t ReadU64(quint64* Buffer, size_t Count)
{
return Read64(Buffer, Count);
}
lcint64 ReadS64()
qint64 ReadS64()
{
lcint64 Value;
qint64 Value;
Read64(&Value, 1);
return Value;
}
size_t ReadS64(lcint64* Buffer, size_t Count)
size_t ReadS64(qint64* Buffer, size_t Count)
{
return Read64(Buffer, Count);
}
@ -162,7 +162,7 @@ public:
QString ReadQString()
{
uint32_t Size = ReadU32();
quint32 Size = ReadU32();
char* Buffer = new char[Size];
ReadBuffer(Buffer, Size);
QString String = QString::fromUtf8(Buffer, Size);
@ -170,82 +170,82 @@ public:
return String;
}
void WriteU8(const lcuint8& Value)
void WriteU8(const quint8& Value)
{
Write8(&Value, 1);
}
size_t WriteU8(const lcuint8* Buffer, size_t Count)
size_t WriteU8(const quint8* Buffer, size_t Count)
{
return Write8(Buffer, Count);
}
void WriteS8(const lcint8& Value)
void WriteS8(const qint8& Value)
{
Write8(&Value, 1);
}
size_t WriteS8(const lcint8* Buffer, size_t Count)
size_t WriteS8(const qint8* Buffer, size_t Count)
{
return Write8(Buffer, Count);
}
void WriteU16(const lcuint16& Value)
void WriteU16(const quint16& Value)
{
Write16(&Value, 1);
}
size_t WriteU16(const lcuint16* Buffer, size_t Count)
size_t WriteU16(const quint16* Buffer, size_t Count)
{
return Write16(Buffer, Count);
}
void WriteS16(const lcint16& Value)
void WriteS16(const qint16& Value)
{
Write16(&Value, 1);
}
size_t WriteS16(const lcint16* Buffer, size_t Count)
size_t WriteS16(const qint16* Buffer, size_t Count)
{
return Write16(Buffer, Count);
}
void WriteU32(const lcuint32& Value)
void WriteU32(const quint32& Value)
{
Write32(&Value, 1);
}
size_t WriteU32(const lcuint32* Buffer, size_t Count)
size_t WriteU32(const quint32* Buffer, size_t Count)
{
return Write32(Buffer, Count);
}
void WriteS32(const lcint32& Value)
void WriteS32(const qint32& Value)
{
Write32(&Value, 1);
}
size_t WriteS32(const lcint32* Buffer, size_t Count)
size_t WriteS32(const qint32* Buffer, size_t Count)
{
return Write32(Buffer, Count);
}
void WriteU64(const lcuint64& Value)
void WriteU64(const quint64& Value)
{
Write64(&Value, 1);
}
size_t WriteU64(const lcuint64* Buffer, size_t Count)
size_t WriteU64(const quint64* Buffer, size_t Count)
{
return Write64(Buffer, Count);
}
void WriteS64(const lcint64& Value)
void WriteS64(const qint64& Value)
{
Write64(&Value, 1);
}
size_t WriteS64(const lcint64* Buffer, size_t Count)
size_t WriteS64(const qint64* Buffer, size_t Count)
{
return Write64(Buffer, Count);
}
@ -295,8 +295,8 @@ protected:
NumRead = ReadBuffer(Buffer, Count * 2) / 2;
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
lcuint8 Temp[2];
lcuint8* Bytes = (lcuint8*)Buffer;
quint8 Temp[2];
quint8* Bytes = (quint8*)Buffer;
for (size_t Idx = 0; Idx < NumRead; Idx++)
{
@ -318,8 +318,8 @@ protected:
NumRead = ReadBuffer(Buffer, Count * 4) / 4;
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
lcuint8 Temp[4];
lcuint8* Bytes = (lcuint8*)Buffer;
quint8 Temp[4];
quint8* Bytes = (quint8*)Buffer;
for (size_t Idx = 0; Idx < NumRead; Idx++)
{
@ -345,8 +345,8 @@ protected:
NumRead = ReadBuffer(Buffer, Count * 8) / 8;
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
lcuint8 Temp[8];
lcuint8* Bytes = (lcuint8*)Buffer;
quint8 Temp[8];
quint8* Bytes = (quint8*)Buffer;
for (size_t Idx = 0; Idx < NumRead; Idx++)
{
@ -382,8 +382,8 @@ protected:
{
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
size_t BytesWritten = 0;
lcuint8 Temp[2];
lcuint8* Bytes = (lcuint8*)Buffer;
quint8 Temp[2];
quint8* Bytes = (quint8*)Buffer;
for (size_t Idx = 0; Idx < Count; Idx++)
{
@ -403,8 +403,8 @@ protected:
{
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
size_t BytesWritten = 0;
lcuint8 Temp[4];
lcuint8* Bytes = (lcuint8*)Buffer;
quint8 Temp[4];
quint8* Bytes = (quint8*)Buffer;
for (size_t Idx = 0; Idx < Count; Idx++)
{
@ -426,8 +426,8 @@ protected:
{
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
size_t BytesWritten = 0;
lcuint8 Temp[8];
lcuint8* Bytes = (lcuint8*)Buffer;
quint8 Temp[8];
quint8* Bytes = (quint8*)Buffer;
for (size_t Idx = 0; Idx < Count; Idx++)
{

View file

@ -21,17 +21,7 @@
// Old defines and declarations.
#define LC_MAXPATH 1024
#define LC_POINTER_TO_INT(p) ((lcint32) (quintptr) (p))
typedef qint8 lcint8;
typedef quint8 lcuint8;
typedef qint16 lcint16;
typedef quint16 lcuint16;
typedef qint32 lcint32;
typedef quint32 lcuint32;
typedef qint64 lcint64;
typedef quint64 lcuint64;
typedef quintptr lcuintptr;
#define LC_POINTER_TO_INT(p) ((qint32) (quintptr) (p))
#ifdef Q_OS_WIN
char* strcasestr(const char *s, const char *find);

View file

@ -761,9 +761,9 @@ void lcPiecesLibrary::ReadDirectoryDescriptions(const QFileInfoList (&FileLists)
IndexFile.WriteU8(Info->mFolderType);
#if (QT_VERSION >= QT_VERSION_CHECK(4, 7, 0))
uint64_t FileTime = FileLists[Info->mFolderType][Info->mFolderIndex].lastModified().toMSecsSinceEpoch();
quint64 FileTime = FileLists[Info->mFolderType][Info->mFolderIndex].lastModified().toMSecsSinceEpoch();
#else
uint64_t FileTime = FileLists[Info->mFolderType][Info->mFolderIndex].lastModified().toTime_t();
quint64 FileTime = FileLists[Info->mFolderType][Info->mFolderIndex].lastModified().toTime_t();
#endif
IndexFile.WriteU64(FileTime);
@ -888,7 +888,7 @@ bool lcPiecesLibrary::WriteArchiveCacheFile(const QString& FileName, lcMemFile&
const size_t BufferSize = 16384;
char WriteBuffer[BufferSize];
z_stream Stream;
lcuint32 Crc32 = 0;
quint32 Crc32 = 0;
CacheFile.Seek(0, SEEK_SET);
@ -1293,7 +1293,7 @@ lcMesh* lcPiecesLibrary::CreateMesh(PieceInfo* Info, lcLibraryMeshData& MeshData
NumTexturedVertices += MeshData.mTexturedVertices[MeshDataIdx].GetSize();
}
lcuint16 NumSections[LC_NUM_MESH_LODS];
quint16 NumSections[LC_NUM_MESH_LODS];
int NumIndices = 0;
lcArray<lcMergeSection> MergeSections[LC_NUM_MESH_LODS];
@ -1416,11 +1416,11 @@ lcMesh* lcPiecesLibrary::CreateMesh(PieceInfo* Info, lcLibraryMeshData& MeshData
{
DstSection.IndexOffset = NumIndices * 2;
lcuint16* Index = (lcuint16*)Mesh->mIndexData + NumIndices;
quint16* Index = (quint16*)Mesh->mIndexData + NumIndices;
if (MergeSection.Shared)
{
lcuint16 BaseVertex = DstSection.Texture ? BaseTexturedVertices[LC_MESHDATA_SHARED] : BaseVertices[LC_MESHDATA_SHARED];
quint16 BaseVertex = DstSection.Texture ? BaseTexturedVertices[LC_MESHDATA_SHARED] : BaseVertices[LC_MESHDATA_SHARED];
lcLibraryMeshSection* SrcSection = MergeSection.Shared;
for (int IndexIdx = 0; IndexIdx < SrcSection->mIndices.GetSize(); IndexIdx++)
@ -1431,7 +1431,7 @@ lcMesh* lcPiecesLibrary::CreateMesh(PieceInfo* Info, lcLibraryMeshData& MeshData
if (MergeSection.Lod)
{
lcuint16 BaseVertex = DstSection.Texture ? BaseTexturedVertices[LodIdx] : BaseVertices[LodIdx];
quint16 BaseVertex = DstSection.Texture ? BaseTexturedVertices[LodIdx] : BaseVertices[LodIdx];
lcLibraryMeshSection* SrcSection = MergeSection.Lod;
for (int IndexIdx = 0; IndexIdx < SrcSection->mIndices.GetSize(); IndexIdx++)
@ -1444,11 +1444,11 @@ lcMesh* lcPiecesLibrary::CreateMesh(PieceInfo* Info, lcLibraryMeshData& MeshData
{
DstSection.IndexOffset = NumIndices * 4;
lcuint32* Index = (lcuint32*)Mesh->mIndexData + NumIndices;
quint32* Index = (quint32*)Mesh->mIndexData + NumIndices;
if (MergeSection.Shared)
{
lcuint32 BaseVertex = DstSection.Texture ? BaseTexturedVertices[LC_MESHDATA_SHARED] : BaseVertices[LC_MESHDATA_SHARED];
quint32 BaseVertex = DstSection.Texture ? BaseTexturedVertices[LC_MESHDATA_SHARED] : BaseVertices[LC_MESHDATA_SHARED];
lcLibraryMeshSection* SrcSection = MergeSection.Shared;
for (int IndexIdx = 0; IndexIdx < SrcSection->mIndices.GetSize(); IndexIdx++)
@ -1459,7 +1459,7 @@ lcMesh* lcPiecesLibrary::CreateMesh(PieceInfo* Info, lcLibraryMeshData& MeshData
if (MergeSection.Lod)
{
lcuint32 BaseVertex = DstSection.Texture ? BaseTexturedVertices[LodIdx] : BaseVertices[LodIdx];
quint32 BaseVertex = DstSection.Texture ? BaseTexturedVertices[LodIdx] : BaseVertices[LodIdx];
lcLibraryMeshSection* SrcSection = MergeSection.Lod;
for (int IndexIdx = 0; IndexIdx < SrcSection->mIndices.GetSize(); IndexIdx++)
@ -1511,7 +1511,7 @@ lcMesh* lcPiecesLibrary::CreateMesh(PieceInfo* Info, lcLibraryMeshData& MeshData
{
DstSection.IndexOffset = NumIndices * 2;
lcuint16* Index = (lcuint16*)Mesh->mIndexData + NumIndices;
quint16* Index = (quint16*)Mesh->mIndexData + NumIndices;
for (int IndexIdx = 0; IndexIdx < DstSection.NumIndices; IndexIdx++)
*Index++ = SrcSection->mIndices[IndexIdx];
@ -1520,7 +1520,7 @@ lcMesh* lcPiecesLibrary::CreateMesh(PieceInfo* Info, lcLibraryMeshData& MeshData
{
DstSection.IndexOffset = NumIndices * 4;
lcuint32* Index = (lcuint32*)Mesh->mIndexData + NumIndices;
quint32* Index = (quint32*)Mesh->mIndexData + NumIndices;
for (int IndexIdx = 0; IndexIdx < DstSection.NumIndices; IndexIdx++)
*Index++ = SrcSection->mIndices[IndexIdx];
@ -1770,7 +1770,7 @@ bool lcPiecesLibrary::LoadPrimitive(lcLibraryPrimitive* Primitive)
return true;
}
bool lcPiecesLibrary::ReadMeshData(lcFile& File, const lcMatrix44& CurrentTransform, lcuint32 CurrentColorCode, bool InvertWinding, lcArray<lcLibraryTextureMap>& TextureStack, lcLibraryMeshData& MeshData, lcMeshDataType MeshDataType, bool Optimize, Project* CurrentProject, bool SearchProjectFolder)
bool lcPiecesLibrary::ReadMeshData(lcFile& File, const lcMatrix44& CurrentTransform, quint32 CurrentColorCode, bool InvertWinding, lcArray<lcLibraryTextureMap>& TextureStack, lcLibraryMeshData& MeshData, lcMeshDataType MeshDataType, bool Optimize, Project* CurrentProject, bool SearchProjectFolder)
{
char Buffer[1024];
char* Line;
@ -1782,7 +1782,7 @@ bool lcPiecesLibrary::ReadMeshData(lcFile& File, const lcMatrix44& CurrentTransf
if (mCancelLoading)
return false;
lcuint32 ColorCode, ColorCodeHex;
quint32 ColorCode, ColorCodeHex;
bool LastToken = false;
int LineType;
@ -2208,7 +2208,7 @@ void lcLibraryMeshData::TestQuad(int* QuadIndices, const lcVector3* Vertices)
}
}
lcLibraryMeshSection* lcLibraryMeshData::AddSection(lcMeshDataType MeshDataType, lcMeshPrimitiveType PrimitiveType, lcuint32 ColorCode, lcTexture* Texture)
lcLibraryMeshSection* lcLibraryMeshData::AddSection(lcMeshDataType MeshDataType, lcMeshPrimitiveType PrimitiveType, quint32 ColorCode, lcTexture* Texture)
{
lcArray<lcLibraryMeshSection*>& Sections = mSections[MeshDataType];
lcLibraryMeshSection* Section;
@ -2238,7 +2238,7 @@ void lcLibraryMeshData::AddVertices(lcMeshDataType MeshDataType, int VertexCount
*VertexBuffer = &Vertices[CurrentSize];
}
lcuint32 lcLibraryMeshData::AddVertex(lcMeshDataType MeshDataType, const lcVector3& Position, bool Optimize)
quint32 lcLibraryMeshData::AddVertex(lcMeshDataType MeshDataType, const lcVector3& Position, bool Optimize)
{
lcArray<lcLibraryMeshVertex>& VertexArray = mVertices[MeshDataType];
@ -2263,7 +2263,7 @@ lcuint32 lcLibraryMeshData::AddVertex(lcMeshDataType MeshDataType, const lcVecto
const float DistanceEpsilon = 0.05f;
lcuint32 lcLibraryMeshData::AddVertex(lcMeshDataType MeshDataType, const lcVector3& Position, const lcVector3& Normal, bool Optimize)
quint32 lcLibraryMeshData::AddVertex(lcMeshDataType MeshDataType, const lcVector3& Position, const lcVector3& Normal, bool Optimize)
{
lcArray<lcLibraryMeshVertex>& VertexArray = mVertices[MeshDataType];
@ -2300,7 +2300,7 @@ lcuint32 lcLibraryMeshData::AddVertex(lcMeshDataType MeshDataType, const lcVecto
return VertexArray.GetSize() - 1;
}
lcuint32 lcLibraryMeshData::AddTexturedVertex(lcMeshDataType MeshDataType, const lcVector3& Position, const lcVector2& TexCoord, bool Optimize)
quint32 lcLibraryMeshData::AddTexturedVertex(lcMeshDataType MeshDataType, const lcVector3& Position, const lcVector2& TexCoord, bool Optimize)
{
lcArray<lcLibraryMeshVertexTextured>& VertexArray = mTexturedVertices[MeshDataType];
@ -2324,7 +2324,7 @@ lcuint32 lcLibraryMeshData::AddTexturedVertex(lcMeshDataType MeshDataType, const
return VertexArray.GetSize() - 1;
}
lcuint32 lcLibraryMeshData::AddTexturedVertex(lcMeshDataType MeshDataType, const lcVector3& Position, const lcVector3& Normal, const lcVector2& TexCoord, bool Optimize)
quint32 lcLibraryMeshData::AddTexturedVertex(lcMeshDataType MeshDataType, const lcVector3& Position, const lcVector3& Normal, const lcVector2& TexCoord, bool Optimize)
{
lcArray<lcLibraryMeshVertexTextured>& VertexArray = mTexturedVertices[MeshDataType];
@ -2361,10 +2361,10 @@ lcuint32 lcLibraryMeshData::AddTexturedVertex(lcMeshDataType MeshDataType, const
return VertexArray.GetSize() - 1;
}
void lcLibraryMeshData::AddIndices(lcMeshDataType MeshDataType, lcMeshPrimitiveType PrimitiveType, lcuint32 ColorCode, int IndexCount, lcuint32** IndexBuffer)
void lcLibraryMeshData::AddIndices(lcMeshDataType MeshDataType, lcMeshPrimitiveType PrimitiveType, quint32 ColorCode, int IndexCount, quint32** IndexBuffer)
{
lcLibraryMeshSection* Section = AddSection(MeshDataType, PrimitiveType, ColorCode, nullptr);
lcArray<lcuint32>& Indices = Section->mIndices;
lcArray<quint32>& Indices = Section->mIndices;
int CurrentSize = Indices.GetSize();
Indices.SetSize(CurrentSize + IndexCount);
@ -2372,7 +2372,7 @@ void lcLibraryMeshData::AddIndices(lcMeshDataType MeshDataType, lcMeshPrimitiveT
*IndexBuffer = &Indices[CurrentSize];
}
void lcLibraryMeshData::AddLine(lcMeshDataType MeshDataType, int LineType, lcuint32 ColorCode, bool WindingCCW, const lcVector3* Vertices, bool Optimize)
void lcLibraryMeshData::AddLine(lcMeshDataType MeshDataType, int LineType, quint32 ColorCode, bool WindingCCW, const lcVector3* Vertices, bool Optimize)
{
lcMeshPrimitiveType PrimitiveTypes[4] = { LC_MESH_LINES, LC_MESH_TRIANGLES, LC_MESH_TRIANGLES, LC_MESH_CONDITIONAL_LINES };
lcMeshPrimitiveType PrimitiveType = PrimitiveTypes[LineType - 2];
@ -2463,7 +2463,7 @@ void lcLibraryMeshData::AddLine(lcMeshDataType MeshDataType, int LineType, lcuin
}
}
void lcLibraryMeshData::AddTexturedLine(lcMeshDataType MeshDataType, int LineType, lcuint32 ColorCode, bool WindingCCW, const lcLibraryTextureMap& Map, const lcVector3* Vertices, bool Optimize)
void lcLibraryMeshData::AddTexturedLine(lcMeshDataType MeshDataType, int LineType, quint32 ColorCode, bool WindingCCW, const lcLibraryTextureMap& Map, const lcVector3* Vertices, bool Optimize)
{
lcMeshPrimitiveType PrimitiveType = (LineType == 2) ? LC_MESH_TEXTURED_LINES : LC_MESH_TEXTURED_TRIANGLES;
lcLibraryMeshSection* Section = AddSection(MeshDataType, PrimitiveType, ColorCode, Map.Texture);
@ -2545,7 +2545,7 @@ void lcLibraryMeshData::AddTexturedLine(lcMeshDataType MeshDataType, int LineTyp
}
}
void lcLibraryMeshData::AddMeshData(const lcLibraryMeshData& Data, const lcMatrix44& Transform, lcuint32 CurrentColorCode, bool InvertWinding, bool InvertNormals, lcLibraryTextureMap* TextureMap, lcMeshDataType OverrideDestIndex)
void lcLibraryMeshData::AddMeshData(const lcLibraryMeshData& Data, const lcMatrix44& Transform, quint32 CurrentColorCode, bool InvertWinding, bool InvertNormals, lcLibraryTextureMap* TextureMap, lcMeshDataType OverrideDestIndex)
{
for (int MeshDataIdx = 0; MeshDataIdx < LC_NUM_MESHDATA_TYPES; MeshDataIdx++)
{
@ -2555,7 +2555,7 @@ void lcLibraryMeshData::AddMeshData(const lcLibraryMeshData& Data, const lcMatri
lcArray<lcLibraryMeshVertexTextured>& TexturedVertices = mTexturedVertices[DestIndex];
int VertexCount = DataVertices.GetSize();
lcArray<lcuint32> IndexRemap(VertexCount);
lcArray<quint32> IndexRemap(VertexCount);
if (!TextureMap)
{
@ -2607,7 +2607,7 @@ void lcLibraryMeshData::AddMeshData(const lcLibraryMeshData& Data, const lcMatri
const lcArray<lcLibraryMeshVertexTextured>& DataTexturedVertices = Data.mTexturedVertices[MeshDataIdx];
int TexturedVertexCount = DataTexturedVertices.GetSize();
lcArray<lcuint32> TexturedIndexRemap(TexturedVertexCount);
lcArray<quint32> TexturedIndexRemap(TexturedVertexCount);
if (TexturedVertexCount)
{
@ -2640,7 +2640,7 @@ void lcLibraryMeshData::AddMeshData(const lcLibraryMeshData& Data, const lcMatri
{
lcLibraryMeshSection* SrcSection = DataSections[SrcSectionIdx];
lcLibraryMeshSection* DstSection = nullptr;
lcuint32 ColorCode = SrcSection->mColor == 16 ? CurrentColorCode : SrcSection->mColor;
quint32 ColorCode = SrcSection->mColor == 16 ? CurrentColorCode : SrcSection->mColor;
lcTexture* Texture;
if (SrcSection->mTexture)
@ -2708,7 +2708,7 @@ void lcLibraryMeshData::AddMeshData(const lcLibraryMeshData& Data, const lcMatri
}
}
void lcLibraryMeshData::AddMeshDataNoDuplicateCheck(const lcLibraryMeshData& Data, const lcMatrix44& Transform, lcuint32 CurrentColorCode, bool InvertWinding, bool InvertNormals, lcLibraryTextureMap* TextureMap, lcMeshDataType OverrideDestIndex)
void lcLibraryMeshData::AddMeshDataNoDuplicateCheck(const lcLibraryMeshData& Data, const lcMatrix44& Transform, quint32 CurrentColorCode, bool InvertWinding, bool InvertNormals, lcLibraryTextureMap* TextureMap, lcMeshDataType OverrideDestIndex)
{
for (int MeshDataIdx = 0; MeshDataIdx < LC_NUM_MESHDATA_TYPES; MeshDataIdx++)
{
@ -2716,7 +2716,7 @@ void lcLibraryMeshData::AddMeshDataNoDuplicateCheck(const lcLibraryMeshData& Dat
const lcArray<lcLibraryMeshVertex>& DataVertices = Data.mVertices[MeshDataIdx];
lcArray<lcLibraryMeshVertex>& Vertices = mVertices[DestIndex];
lcArray<lcLibraryMeshVertexTextured>& TexturedVertices = mTexturedVertices[DestIndex];
lcuint32 BaseIndex;
quint32 BaseIndex;
if (!TextureMap)
{
@ -2763,7 +2763,7 @@ void lcLibraryMeshData::AddMeshDataNoDuplicateCheck(const lcLibraryMeshData& Dat
const lcArray<lcLibraryMeshVertexTextured>& DataTexturedVertices = Data.mTexturedVertices[MeshDataIdx];
int TexturedVertexCount = DataTexturedVertices.GetSize();
lcuint32 BaseTexturedIndex = TexturedVertices.GetSize();
quint32 BaseTexturedIndex = TexturedVertices.GetSize();
if (TexturedVertexCount)
{
@ -2789,7 +2789,7 @@ void lcLibraryMeshData::AddMeshDataNoDuplicateCheck(const lcLibraryMeshData& Dat
{
lcLibraryMeshSection* SrcSection = DataSections[SrcSectionIdx];
lcLibraryMeshSection* DstSection = nullptr;
lcuint32 ColorCode = SrcSection->mColor == 16 ? CurrentColorCode : SrcSection->mColor;
quint32 ColorCode = SrcSection->mColor == 16 ? CurrentColorCode : SrcSection->mColor;
lcTexture* Texture;
if (SrcSection->mTexture)

View file

@ -40,7 +40,7 @@ struct lcLibraryMeshVertexTextured
class lcLibraryMeshSection
{
public:
lcLibraryMeshSection(lcMeshPrimitiveType PrimitiveType, lcuint32 Color, lcTexture* Texture)
lcLibraryMeshSection(lcMeshPrimitiveType PrimitiveType, quint32 Color, lcTexture* Texture)
: mIndices(1024, 1024)
{
mPrimitiveType = PrimitiveType;
@ -53,9 +53,9 @@ public:
}
lcMeshPrimitiveType mPrimitiveType;
lcuint32 mColor;
quint32 mColor;
lcTexture* mTexture;
lcArray<lcuint32> mIndices;
lcArray<quint32> mIndices;
};
struct lcLibraryTextureMap
@ -105,17 +105,17 @@ public:
return true;
}
lcLibraryMeshSection* AddSection(lcMeshDataType MeshDataType, lcMeshPrimitiveType PrimitiveType, lcuint32 ColorCode, lcTexture* Texture);
lcuint32 AddVertex(lcMeshDataType MeshDataType, const lcVector3& Position, bool Optimize);
lcuint32 AddVertex(lcMeshDataType MeshDataType, const lcVector3& Position, const lcVector3& Normal, bool Optimize);
lcuint32 AddTexturedVertex(lcMeshDataType MeshDataType, const lcVector3& Position, const lcVector2& TexCoord, bool Optimize);
lcuint32 AddTexturedVertex(lcMeshDataType MeshDataType, const lcVector3& Position, const lcVector3& Normal, const lcVector2& TexCoord, bool Optimize);
lcLibraryMeshSection* AddSection(lcMeshDataType MeshDataType, lcMeshPrimitiveType PrimitiveType, quint32 ColorCode, lcTexture* Texture);
quint32 AddVertex(lcMeshDataType MeshDataType, const lcVector3& Position, bool Optimize);
quint32 AddVertex(lcMeshDataType MeshDataType, const lcVector3& Position, const lcVector3& Normal, bool Optimize);
quint32 AddTexturedVertex(lcMeshDataType MeshDataType, const lcVector3& Position, const lcVector2& TexCoord, bool Optimize);
quint32 AddTexturedVertex(lcMeshDataType MeshDataType, const lcVector3& Position, const lcVector3& Normal, const lcVector2& TexCoord, bool Optimize);
void AddVertices(lcMeshDataType MeshDataType, int VertexCount, int* BaseVertex, lcLibraryMeshVertex** VertexBuffer);
void AddIndices(lcMeshDataType MeshDataType, lcMeshPrimitiveType PrimitiveType, lcuint32 ColorCode, int IndexCount, lcuint32** IndexBuffer);
void AddLine(lcMeshDataType MeshDataType, int LineType, lcuint32 ColorCode, bool WindingCCW, const lcVector3* Vertices, bool Optimize);
void AddTexturedLine(lcMeshDataType MeshDataType, int LineType, lcuint32 ColorCode, bool WindingCCW, const lcLibraryTextureMap& Map, const lcVector3* Vertices, bool Optimize);
void AddMeshData(const lcLibraryMeshData& Data, const lcMatrix44& Transform, lcuint32 CurrentColorCode, bool InvertWinding, bool InvertNormals, lcLibraryTextureMap* TextureMap, lcMeshDataType OverrideDestIndex);
void AddMeshDataNoDuplicateCheck(const lcLibraryMeshData& Data, const lcMatrix44& Transform, lcuint32 CurrentColorCode, bool InvertWinding, bool InvertNormals, lcLibraryTextureMap* TextureMap, lcMeshDataType OverrideDestIndex);
void AddIndices(lcMeshDataType MeshDataType, lcMeshPrimitiveType PrimitiveType, quint32 ColorCode, int IndexCount, quint32** IndexBuffer);
void AddLine(lcMeshDataType MeshDataType, int LineType, quint32 ColorCode, bool WindingCCW, const lcVector3* Vertices, bool Optimize);
void AddTexturedLine(lcMeshDataType MeshDataType, int LineType, quint32 ColorCode, bool WindingCCW, const lcLibraryTextureMap& Map, const lcVector3* Vertices, bool Optimize);
void AddMeshData(const lcLibraryMeshData& Data, const lcMatrix44& Transform, quint32 CurrentColorCode, bool InvertWinding, bool InvertNormals, lcLibraryTextureMap* TextureMap, lcMeshDataType OverrideDestIndex);
void AddMeshDataNoDuplicateCheck(const lcLibraryMeshData& Data, const lcMatrix44& Transform, quint32 CurrentColorCode, bool InvertWinding, bool InvertNormals, lcLibraryTextureMap* TextureMap, lcMeshDataType OverrideDestIndex);
void TestQuad(int* QuadIndices, const lcVector3* Vertices);
void ResequenceQuad(int* QuadIndices, int a, int b, int c, int d);
@ -127,7 +127,7 @@ public:
class lcLibraryPrimitive
{
public:
lcLibraryPrimitive(const char* Name, lcZipFileType ZipFileType,lcuint32 ZipFileIndex, bool Stud, bool SubFile)
lcLibraryPrimitive(const char* Name, lcZipFileType ZipFileType,quint32 ZipFileIndex, bool Stud, bool SubFile)
{
strncpy(mName, Name, sizeof(mName));
mName[sizeof(mName) - 1] = 0;
@ -139,7 +139,7 @@ public:
mSubFile = SubFile;
}
void SetZipFile(lcZipFileType ZipFileType,lcuint32 ZipFileIndex)
void SetZipFile(lcZipFileType ZipFileType,quint32 ZipFileIndex)
{
mZipFileType = ZipFileType;
mZipFileIndex = ZipFileIndex;
@ -147,7 +147,7 @@ public:
char mName[LC_MAXPATH];
lcZipFileType mZipFileType;
lcuint32 mZipFileIndex;
quint32 mZipFileIndex;
lcPrimitiveState mState;
bool mStud;
bool mSubFile;
@ -197,7 +197,7 @@ public:
mNumOfficialPieces = mPieces.size();
}
bool ReadMeshData(lcFile& File, const lcMatrix44& CurrentTransform, lcuint32 CurrentColorCode, bool InvertWinding, lcArray<lcLibraryTextureMap>& TextureStack, lcLibraryMeshData& MeshData, lcMeshDataType MeshDataType, bool Optimize, Project* CurrentProject, bool SearchProjectFolder);
bool ReadMeshData(lcFile& File, const lcMatrix44& CurrentTransform, quint32 CurrentColorCode, bool InvertWinding, lcArray<lcLibraryTextureMap>& TextureStack, lcLibraryMeshData& MeshData, lcMeshDataType MeshDataType, bool Optimize, Project* CurrentProject, bool SearchProjectFolder);
lcMesh* CreateMesh(PieceInfo* Info, lcLibraryMeshData& MeshData);
void ReleaseBuffers(lcContext* Context);
void UpdateBuffers(lcContext* Context);

View file

@ -9,11 +9,11 @@
#define LC_2PI (static_cast<float>(2 * M_PI))
#define LC_RGB(r,g,b) LC_RGBA(r,g,b,255)
#define LC_RGBA(r,g,b,a) ((lcuint32)(((lcuint8) (r) | ((lcuint16) (g) << 8)) | (((lcuint32) (lcuint8) (b)) << 16) | (((lcuint32) (lcuint8) (a)) << 24)))
#define LC_RGBA_RED(rgba) ((lcuint8)(((rgba) >> 0) & 0xff))
#define LC_RGBA_GREEN(rgba) ((lcuint8)(((rgba) >> 8) & 0xff))
#define LC_RGBA_BLUE(rgba) ((lcuint8)(((rgba) >> 16) & 0xff))
#define LC_RGBA_ALPHA(rgba) ((lcuint8)(((rgba) >> 24) & 0xff))
#define LC_RGBA(r,g,b,a) ((quint32)(((quint8) (r) | ((quint16) (g) << 8)) | (((quint32) (quint8) (b)) << 16) | (((quint32) (quint8) (a)) << 24)))
#define LC_RGBA_RED(rgba) ((quint8)(((rgba) >> 0) & 0xff))
#define LC_RGBA_GREEN(rgba) ((quint8)(((rgba) >> 8) & 0xff))
#define LC_RGBA_BLUE(rgba) ((quint8)(((rgba) >> 16) & 0xff))
#define LC_RGBA_ALPHA(rgba) ((quint8)(((rgba) >> 24) & 0xff))
#define LC_FLOATRGB(f) LC_RGB(f[0]*255, f[1]*255, f[2]*255)
template<typename T>
@ -576,21 +576,21 @@ inline lcVector3 lcVector3LDrawToLeoCAD(const lcVector3& Vector)
return lcVector3(Vector[0], Vector[2], -Vector[1]);
}
inline lcVector3 lcVector3FromColor(lcuint32 Color)
inline lcVector3 lcVector3FromColor(quint32 Color)
{
lcVector3 v(LC_RGBA_RED(Color), LC_RGBA_GREEN(Color), LC_RGBA_BLUE(Color));
v /= 255.0f;
return v;
}
inline lcVector4 lcVector4FromColor(lcuint32 Color)
inline lcVector4 lcVector4FromColor(quint32 Color)
{
lcVector4 v(LC_RGBA_RED(Color), LC_RGBA_GREEN(Color), LC_RGBA_BLUE(Color), LC_RGBA_ALPHA(Color));
v /= 255.0f;
return v;
}
inline lcuint32 lcColorFromVector3(const lcVector3& Color)
inline quint32 lcColorFromVector3(const lcVector3& Color)
{
return LC_RGB(Color[0] * 255, Color[1] * 255, Color[2] * 255);
}

View file

@ -36,7 +36,7 @@ lcMesh::~lcMesh()
delete[] mLods[LodIdx].Sections;
}
void lcMesh::Create(lcuint16 NumSections[LC_NUM_MESH_LODS], int NumVertices, int NumTexturedVertices, int NumIndices)
void lcMesh::Create(quint16 NumSections[LC_NUM_MESH_LODS], int NumVertices, int NumTexturedVertices, int NumIndices)
{
for (int LodIdx = 0; LodIdx < LC_NUM_MESH_LODS; LodIdx++)
{
@ -66,7 +66,7 @@ void lcMesh::Create(lcuint16 NumSections[LC_NUM_MESH_LODS], int NumVertices, int
void lcMesh::CreateBox()
{
lcuint16 NumSections[LC_NUM_MESH_LODS];
quint16 NumSections[LC_NUM_MESH_LODS];
memset(NumSections, 0, sizeof(NumSections));
NumSections[LC_MESH_LOD_HIGH] = 2;
@ -79,7 +79,7 @@ void lcMesh::CreateBox()
mBoundingBox.Max = Max;
lcVertex* Verts = (lcVertex*)mVertexData;
lcuint16* Indices = (lcuint16*)mIndexData;
quint16* Indices = (quint16*)mIndexData;
Verts[0].Position = lcVector3(Min[0], Min[1], Min[2]);
Verts[0].Normal = lcPackNormal(lcVector3(0.0f, 0.0f, -1.0f));
@ -369,8 +369,8 @@ bool lcMesh::FileLoad(lcMemFile& File)
mBoundingBox.Max = File.ReadVector3();
mRadius = File.ReadFloat();
lcuint32 NumVertices, NumTexturedVertices, NumIndices;
lcuint16 NumLods, NumSections[LC_NUM_MESH_LODS];
quint32 NumVertices, NumTexturedVertices, NumIndices;
quint16 NumLods, NumSections[LC_NUM_MESH_LODS];
if (!File.ReadU32(&NumVertices, 1) || !File.ReadU32(&NumTexturedVertices, 1) || !File.ReadU32(&NumIndices, 1))
return false;
@ -386,8 +386,8 @@ bool lcMesh::FileLoad(lcMemFile& File)
{
lcMeshSection& Section = mLods[LodIdx].Sections[SectionIdx];
lcuint32 ColorCode, IndexOffset;
lcuint16 PrimtiveType, Length;
quint32 ColorCode, IndexOffset;
quint16 PrimtiveType, Length;
if (!File.ReadU32(&ColorCode, 1) || !File.ReadU32(&IndexOffset, 1) || !File.ReadU32(&NumIndices, 1) || !File.ReadU16(&PrimtiveType, 1))
return false;
@ -419,9 +419,9 @@ bool lcMesh::FileLoad(lcMemFile& File)
File.ReadBuffer(mVertexData, mNumVertices * sizeof(lcVertex) + mNumTexturedVertices * sizeof(lcVertexTextured));
if (mIndexType == GL_UNSIGNED_SHORT)
File.ReadU16((lcuint16*)mIndexData, mIndexDataSize / 2);
File.ReadU16((quint16*)mIndexData, mIndexDataSize / 2);
else
File.ReadU32((lcuint32*)mIndexData, mIndexDataSize / 4);
File.ReadU32((quint32*)mIndexData, mIndexDataSize / 4);
return true;
}
@ -456,7 +456,7 @@ bool lcMesh::FileSave(lcMemFile& File)
if (Section.Texture)
{
lcuint16 Length = (lcuint16)strlen(Section.Texture->mName);
quint16 Length = (quint16)strlen(Section.Texture->mName);
File.WriteU16(Length);
File.WriteBuffer(Section.Texture->mName, Length);
}
@ -467,9 +467,9 @@ bool lcMesh::FileSave(lcMemFile& File)
File.WriteBuffer(mVertexData, mNumVertices * sizeof(lcVertex) + mNumTexturedVertices * sizeof(lcVertexTextured));
if (mIndexType == GL_UNSIGNED_SHORT)
File.WriteU16((lcuint16*)mIndexData, mIndexDataSize / 2);
File.WriteU16((quint16*)mIndexData, mIndexDataSize / 2);
else
File.WriteU32((lcuint32*)mIndexData, mIndexDataSize / 4);
File.WriteU32((quint32*)mIndexData, mIndexDataSize / 4);
return true;
}

View file

@ -56,7 +56,7 @@ public:
lcMesh();
~lcMesh();
void Create(lcuint16 NumSections[LC_NUM_MESH_LODS], int NumVertices, int NumTexturedVertices, int NumIndices);
void Create(quint16 NumSections[LC_NUM_MESH_LODS], int NumVertices, int NumTexturedVertices, int NumIndices);
void CreateBox();
bool FileLoad(lcMemFile& File);

View file

@ -668,12 +668,12 @@ void lcModel::LoadLDraw(QIODevice& Device, Project* Project)
bool lcModel::LoadBinary(lcFile* file)
{
lcint32 i, count;
qint32 i, count;
char id[32];
lcuint32 rgb;
quint32 rgb;
float fv = 0.4f;
lcuint8 ch;
lcuint16 sh;
quint8 ch;
quint16 sh;
file->Seek(0, SEEK_SET);
file->ReadBuffer(id, 32);
@ -728,7 +728,7 @@ bool lcModel::LoadBinary(lcFile* file)
{
char name[LC_PIECE_NAME_LEN];
lcVector3 pos, rot;
lcuint8 color, step, group;
quint8 color, step, group;
file->ReadFloats(pos, 3);
file->ReadFloats(rot, 3);
@ -2606,7 +2606,7 @@ void lcModel::ScaleSelectedPieces(const float Scale, bool Update, bool Checkpoin
return;
lcPiece* Piece = (lcPiece*)Focus;
lcuint32 Section = Piece->GetFocusSection();
quint32 Section = Piece->GetFocusSection();
if (Section >= LC_PIECE_SECTION_CONTROL_POINT_1 && Section <= LC_PIECE_SECTION_CONTROL_POINT_8)
{
@ -3213,7 +3213,7 @@ void lcModel::GetSelectionInformation(int* Flags, lcArray<lcObject*>& Selection,
{
*Flags |= LC_SEL_CAN_ADD_CONTROL_POINT;
lcuint32 Section = Piece->GetFocusSection();
quint32 Section = Piece->GetFocusSection();
if (Section >= LC_PIECE_SECTION_CONTROL_POINT_1 && Section <= LC_PIECE_SECTION_CONTROL_POINT_8 && Piece->GetControlPoints().GetSize() > 2)
*Flags |= LC_SEL_CAN_REMOVE_CONTROL_POINT;
@ -3348,7 +3348,7 @@ void lcModel::FocusOrDeselectObject(const lcObjectSection& ObjectSection)
{
lcObject* FocusObject = GetFocusObject();
lcObject* Object = ObjectSection.Object;
lcuint32 Section = ObjectSection.Section;
quint32 Section = ObjectSection.Section;
if (Object)
{
@ -3389,7 +3389,7 @@ void lcModel::FocusOrDeselectObject(const lcObjectSection& ObjectSection)
gMainWindow->UpdateAllViews();
}
void lcModel::ClearSelectionAndSetFocus(lcObject* Object, lcuint32 Section, bool EnableSelectionMode)
void lcModel::ClearSelectionAndSetFocus(lcObject* Object, quint32 Section, bool EnableSelectionMode)
{
ClearSelection(false);
@ -3418,7 +3418,7 @@ void lcModel::ClearSelectionAndSetFocus(const lcObjectSection& ObjectSection, bo
ClearSelectionAndSetFocus(ObjectSection.Object, ObjectSection.Section, EnableSelectionMode);
}
void lcModel::SetSelectionAndFocus(const lcArray<lcObject*>& Selection, lcObject* Focus, lcuint32 Section, bool EnableSelectionMode)
void lcModel::SetSelectionAndFocus(const lcArray<lcObject*>& Selection, lcObject* Focus, quint32 Section, bool EnableSelectionMode)
{
ClearSelection(false);

View file

@ -258,9 +258,9 @@ public:
void FocusOrDeselectObject(const lcObjectSection& ObjectSection);
void ClearSelection(bool UpdateInterface);
void ClearSelectionAndSetFocus(lcObject* Object, lcuint32 Section, bool EnableSelectionMode);
void ClearSelectionAndSetFocus(lcObject* Object, quint32 Section, bool EnableSelectionMode);
void ClearSelectionAndSetFocus(const lcObjectSection& ObjectSection, bool EnableSelectionMode);
void SetSelectionAndFocus(const lcArray<lcObject*>& Selection, lcObject* Focus, lcuint32 Section, bool EnableSelectionMode);
void SetSelectionAndFocus(const lcArray<lcObject*>& Selection, lcObject* Focus, quint32 Section, bool EnableSelectionMode);
void AddToSelection(const lcArray<lcObject*>& Objects, bool EnableSelectionMode, bool UpdateInterface);
void RemoveFromSelection(const lcArray<lcObject*>& Objects);
void RemoveFromSelection(const lcObjectSection& ObjectSection);

View file

@ -143,7 +143,7 @@ void lcScene::DrawRenderMeshes(lcContext* Context, int PrimitiveTypes, bool Enab
if (Mesh->mIndexType == GL_UNSIGNED_SHORT)
{
lcuint16* Indices = (lcuint16*)((char*)Mesh->mIndexData + Section->IndexOffset);
quint16* Indices = (quint16*)((char*)Mesh->mIndexData + Section->IndexOffset);
for (int i = 0; i < Section->NumIndices; i += 4)
{
@ -153,12 +153,12 @@ void lcScene::DrawRenderMeshes(lcContext* Context, int PrimitiveTypes, bool Enab
lcVector3 p4 = lcMul31(VertexBuffer[Indices[i + 3]].Position, WorldViewProjectionMatrix);
if (((p1.y - p2.y) * (p3.x - p1.x) + (p2.x - p1.x) * (p3.y - p1.y)) * ((p1.y - p2.y) * (p4.x - p1.x) + (p2.x - p1.x) * (p4.y - p1.y)) >= 0)
Context->DrawIndexedPrimitives(GL_LINES, 2, Mesh->mIndexType, IndexBufferOffset + Section->IndexOffset + i * sizeof(lcuint16));
Context->DrawIndexedPrimitives(GL_LINES, 2, Mesh->mIndexType, IndexBufferOffset + Section->IndexOffset + i * sizeof(quint16));
}
}
else
{
lcuint32* Indices = (lcuint32*)((char*)Mesh->mIndexData + Section->IndexOffset);
quint32* Indices = (quint32*)((char*)Mesh->mIndexData + Section->IndexOffset);
for (int i = 0; i < Section->NumIndices; i += 4)
{
@ -168,7 +168,7 @@ void lcScene::DrawRenderMeshes(lcContext* Context, int PrimitiveTypes, bool Enab
lcVector3 p4 = lcMul31(VertexBuffer[Indices[i + 3]].Position, WorldViewProjectionMatrix);
if (((p1.y - p2.y) * (p3.x - p1.x) + (p2.x - p1.x) * (p3.y - p1.y)) * ((p1.y - p2.y) * (p4.x - p1.x) + (p2.x - p1.x) * (p4.y - p1.y)) >= 0)
Context->DrawIndexedPrimitives(GL_LINES, 2, Mesh->mIndexType, IndexBufferOffset + Section->IndexOffset + i * sizeof(lcuint32));
Context->DrawIndexedPrimitives(GL_LINES, 2, Mesh->mIndexType, IndexBufferOffset + Section->IndexOffset + i * sizeof(quint32));
}
}

View file

@ -427,7 +427,7 @@ void lcSynthInfo::AddFlexibleAxleParts(lcMemFile& File, lcLibraryMeshData& MeshD
int BaseVertex;
lcLibraryMeshVertex* VertexBuffer;
lcuint32* IndexBuffer;
quint32* IndexBuffer;
MeshData.AddVertices(LC_MESHDATA_SHARED, 16 * (Sections.GetSize() - 1), &BaseVertex, &VertexBuffer);
MeshData.AddIndices(LC_MESHDATA_SHARED, LC_MESH_LINES, 24, 2 * 12 * (Sections.GetSize() - 2), &IndexBuffer);
@ -506,7 +506,7 @@ void lcSynthInfo::AddStringBraidedParts(lcMemFile& File, lcLibraryMeshData& Mesh
int BaseVertex;
lcLibraryMeshVertex* VertexBuffer;
lcuint32* IndexBuffer;
quint32* IndexBuffer;
MeshData.AddVertices(LC_MESHDATA_SHARED, NumBraids * ((Sections.GetSize() - 2) * NumSegments + 1), &BaseVertex, &VertexBuffer);
MeshData.AddIndices(LC_MESHDATA_SHARED, LC_MESH_LINES, 24, NumBraids * (Sections.GetSize() - 2) * NumSegments * 2, &IndexBuffer);

View file

@ -47,7 +47,7 @@ void lcTexture::CreateGridTexture()
{
const int NumLevels = 9;
Image GridImages[NumLevels];
lcuint8* Previous = nullptr;
quint8* Previous = nullptr;
for (int ImageLevel = 0; ImageLevel < NumLevels; ImageLevel++)
{
@ -63,24 +63,24 @@ void lcTexture::CreateGridTexture()
{
for (int x = 0; x < GridSize - 1; x++)
{
lcuint8 a = Previous[x * 2 + y * 2 * PreviousGridSize] > 64 ? 255 : 0;
lcuint8 b = Previous[x * 2 + 1 + y * 2 * PreviousGridSize] > 64 ? 255 : 0;
lcuint8 c = Previous[x * 2 + (y * 2 + 1) * PreviousGridSize] > 64 ? 255 : 0;
lcuint8 d = Previous[x * 2 + 1 + (y * 2 + 1) * PreviousGridSize] > 64 ? 255 : 0;
quint8 a = Previous[x * 2 + y * 2 * PreviousGridSize] > 64 ? 255 : 0;
quint8 b = Previous[x * 2 + 1 + y * 2 * PreviousGridSize] > 64 ? 255 : 0;
quint8 c = Previous[x * 2 + (y * 2 + 1) * PreviousGridSize] > 64 ? 255 : 0;
quint8 d = Previous[x * 2 + 1 + (y * 2 + 1) * PreviousGridSize] > 64 ? 255 : 0;
GridImage.mData[x + y * GridSize] = (a + b + c + d) / 4;
}
int x = GridSize - 1;
lcuint8 a = Previous[x * 2 + y * 2 * PreviousGridSize];
lcuint8 c = Previous[x * 2 + (y * 2 + 1) * PreviousGridSize];
quint8 a = Previous[x * 2 + y * 2 * PreviousGridSize];
quint8 c = Previous[x * 2 + (y * 2 + 1) * PreviousGridSize];
GridImage.mData[x + y * GridSize] = (a + c) / 2;
}
int y = GridSize - 1;
for (int x = 0; x < GridSize - 1; x++)
{
lcuint8 a = Previous[x * 2 + y * 2 * PreviousGridSize];
lcuint8 b = Previous[x * 2 + 1 + y * 2 * PreviousGridSize];
quint8 a = Previous[x * 2 + y * 2 * PreviousGridSize];
quint8 b = Previous[x * 2 + 1 + y * 2 * PreviousGridSize];
GridImage.mData[x + y * GridSize] = (a + b) / 2;
}
@ -91,11 +91,11 @@ void lcTexture::CreateGridTexture()
{
const float Radius1 = (80 >> ImageLevel) * (80 >> ImageLevel);
const float Radius2 = (72 >> ImageLevel) * (72 >> ImageLevel);
lcuint8* TempBuffer = new lcuint8[GridSize * GridSize];
quint8* TempBuffer = new quint8[GridSize * GridSize];
for (int y = 0; y < GridSize; y++)
{
lcuint8* Pixel = TempBuffer + y * GridSize;
quint8* Pixel = TempBuffer + y * GridSize;
memset(Pixel, 0, GridSize);
const float y2 = (y - GridSize / 2) * (y - GridSize / 2);
@ -127,24 +127,24 @@ void lcTexture::CreateGridTexture()
{
for (int x = 0; x < GridSize - 1; x++)
{
lcuint8 a = TempBuffer[x + y * GridSize];
lcuint8 b = TempBuffer[x + 1 + y * GridSize];
lcuint8 c = TempBuffer[x + (y + 1) * GridSize];
lcuint8 d = TempBuffer[x + 1 + (y + 1) * GridSize];
quint8 a = TempBuffer[x + y * GridSize];
quint8 b = TempBuffer[x + 1 + y * GridSize];
quint8 c = TempBuffer[x + (y + 1) * GridSize];
quint8 d = TempBuffer[x + 1 + (y + 1) * GridSize];
GridImage.mData[x + y * GridSize] = (a + b + c + d) / 4;
}
int x = GridSize - 1;
lcuint8 a = TempBuffer[x + y * GridSize];
lcuint8 c = TempBuffer[x + (y + 1) * GridSize];
quint8 a = TempBuffer[x + y * GridSize];
quint8 c = TempBuffer[x + (y + 1) * GridSize];
GridImage.mData[x + y * GridSize] = (a + c) / 2;
}
int y = GridSize - 1;
for (int x = 0; x < GridSize - 1; x++)
{
lcuint8 a = TempBuffer[x + y * GridSize];
lcuint8 b = TempBuffer[x + 1 + y * GridSize];
quint8 a = TempBuffer[x + y * GridSize];
quint8 b = TempBuffer[x + 1 + y * GridSize];
GridImage.mData[x + y * GridSize] = (a + b) / 2;
}

View file

@ -71,11 +71,11 @@ bool lcZipFile::OpenWrite(const QString& FileName)
return true;
}
lcuint64 lcZipFile::SearchCentralDir()
quint64 lcZipFile::SearchCentralDir()
{
lcuint64 SizeFile, MaxBack, BackRead, PosFound;
quint64 SizeFile, MaxBack, BackRead, PosFound;
const int CommentBufferSize = 1024;
lcuint8 buf[CommentBufferSize + 4];
quint8 buf[CommentBufferSize + 4];
SizeFile = mFile->GetLength();
MaxBack = lcMin(SizeFile, 0xffffULL);
@ -84,7 +84,7 @@ lcuint64 lcZipFile::SearchCentralDir()
while (BackRead < MaxBack)
{
lcuint64 ReadPos, ReadSize;
quint64 ReadPos, ReadSize;
if (BackRead + CommentBufferSize > MaxBack)
BackRead = MaxBack;
@ -114,11 +114,11 @@ lcuint64 lcZipFile::SearchCentralDir()
return PosFound;
}
lcuint64 lcZipFile::SearchCentralDir64()
quint64 lcZipFile::SearchCentralDir64()
{
lcuint64 SizeFile, MaxBack, BackRead, PosFound;
quint64 SizeFile, MaxBack, BackRead, PosFound;
const int CommentBufferSize = 1024;
lcuint8 buf[CommentBufferSize + 4];
quint8 buf[CommentBufferSize + 4];
SizeFile = mFile->GetLength();
MaxBack = lcMin(SizeFile, 0xffffULL);
@ -127,7 +127,7 @@ lcuint64 lcZipFile::SearchCentralDir64()
while (BackRead < MaxBack)
{
lcuint64 ReadPos, ReadSize;
quint64 ReadPos, ReadSize;
if (BackRead + CommentBufferSize > MaxBack)
BackRead = MaxBack;
@ -159,8 +159,8 @@ lcuint64 lcZipFile::SearchCentralDir64()
mFile->Seek((long)PosFound, SEEK_SET);
lcuint32 Number;
lcuint64 RelativeOffset;
quint32 Number;
quint64 RelativeOffset;
// Signature.
if (mFile->ReadU32(&Number, 1) != 1)
@ -197,11 +197,11 @@ lcuint64 lcZipFile::SearchCentralDir64()
return RelativeOffset;
}
bool lcZipFile::CheckFileCoherencyHeader(int FileIndex, lcuint32* SizeVar, lcuint64* OffsetLocalExtraField, lcuint32* SizeLocalExtraField)
bool lcZipFile::CheckFileCoherencyHeader(int FileIndex, quint32* SizeVar, quint64* OffsetLocalExtraField, quint32* SizeLocalExtraField)
{
lcuint16 Number16, Flags;
lcuint32 Number32, Magic;
lcuint16 SizeFilename, SizeExtraField;
quint16 Number16, Flags;
quint32 Number32, Magic;
quint16 SizeFilename, SizeExtraField;
const lcZipFileInfo& FileInfo = mFiles[FileIndex];
*SizeVar = 0;
@ -255,13 +255,13 @@ bool lcZipFile::CheckFileCoherencyHeader(int FileIndex, lcuint32* SizeVar, lcuin
bool lcZipFile::Open()
{
lcuint64 NumberEntriesCD, CentralPos;
quint64 NumberEntriesCD, CentralPos;
CentralPos = SearchCentralDir64();
if (CentralPos)
{
lcuint32 NumberDisk, NumberDiskWithCD;
quint32 NumberDisk, NumberDiskWithCD;
mZip64 = true;
@ -299,9 +299,9 @@ bool lcZipFile::Open()
}
else
{
lcuint16 NumberDisk, NumberDiskWithCD;
lcuint16 Number16;
lcuint32 Number32;
quint16 NumberDisk, NumberDiskWithCD;
quint16 Number16;
quint32 Number32;
CentralPos = SearchCentralDir();
if (CentralPos == 0)
@ -359,14 +359,14 @@ bool lcZipFile::Open()
bool lcZipFile::ReadCentralDir()
{
lcuint64 PosInCentralDir = mCentralDirOffset;
quint64 PosInCentralDir = mCentralDirOffset;
mFile->Seek((long)(PosInCentralDir + mBytesBeforeZipFile), SEEK_SET);
mFiles.AllocGrow((int)mNumEntries);
for (lcuint64 FileNum = 0; FileNum < mNumEntries; FileNum++)
for (quint64 FileNum = 0; FileNum < mNumEntries; FileNum++)
{
lcuint32 Magic, Number32;
quint32 Magic, Number32;
lcZipFileInfo& FileInfo = mFiles.Add();
long Seek = 0;
@ -391,14 +391,14 @@ bool lcZipFile::ReadCentralDir()
if (mFile->ReadU32(&FileInfo.dosDate, 1) != 1)
return false;
lcuint32 Date = FileInfo.dosDate >> 16;
FileInfo.tmu_date.tm_mday = (lcuint32)(Date & 0x1f);
FileInfo.tmu_date.tm_mon = (lcuint32)((((Date) & 0x1E0) / 0x20) - 1);
FileInfo.tmu_date.tm_year = (lcuint32)(((Date & 0x0FE00) / 0x0200) + 1980);
quint32 Date = FileInfo.dosDate >> 16;
FileInfo.tmu_date.tm_mday = (quint32)(Date & 0x1f);
FileInfo.tmu_date.tm_mon = (quint32)((((Date) & 0x1E0) / 0x20) - 1);
FileInfo.tmu_date.tm_year = (quint32)(((Date & 0x0FE00) / 0x0200) + 1980);
FileInfo.tmu_date.tm_hour = (lcuint32)((FileInfo.dosDate & 0xF800) / 0x800);
FileInfo.tmu_date.tm_min = (lcuint32)((FileInfo.dosDate & 0x7E0) / 0x20);
FileInfo.tmu_date.tm_sec = (lcuint32)(2*(FileInfo.dosDate & 0x1f));
FileInfo.tmu_date.tm_hour = (quint32)((FileInfo.dosDate & 0xF800) / 0x800);
FileInfo.tmu_date.tm_min = (quint32)((FileInfo.dosDate & 0x7E0) / 0x20);
FileInfo.tmu_date.tm_sec = (quint32)(2*(FileInfo.dosDate & 0x1f));
if (mFile->ReadU32(&FileInfo.crc, 1) != 1)
return false;
@ -436,7 +436,7 @@ bool lcZipFile::ReadCentralDir()
Seek += FileInfo.size_filename;
lcuint32 SizeRead;
quint32 SizeRead;
if (FileInfo.size_filename < sizeof(FileInfo.file_name) - 1)
{
*(FileInfo.file_name + FileInfo.size_filename) = '\0';
@ -483,7 +483,7 @@ bool lcZipFile::ReadCentralDir()
if (FileInfo.size_file_extra != 0)
{
lcuint32 acc = 0;
quint32 acc = 0;
// since lSeek now points to after the extra field we need to move back
Seek -= FileInfo.size_file_extra;
@ -496,7 +496,7 @@ bool lcZipFile::ReadCentralDir()
while (acc < FileInfo.size_file_extra)
{
lcuint16 HeaderId, DataSize;
quint16 HeaderId, DataSize;
if (mFile->ReadU16(&HeaderId, 1) != 1)
return false;
@ -507,26 +507,26 @@ bool lcZipFile::ReadCentralDir()
// ZIP64 extra fields.
if (HeaderId == 0x0001)
{
if (FileInfo.uncompressed_size == (lcuint64)(unsigned long)-1)
if (FileInfo.uncompressed_size == (quint64)(unsigned long)-1)
{
if (mFile->ReadU64(&FileInfo.uncompressed_size, 1) != 1)
return false;
}
if (FileInfo.compressed_size == (lcuint64)(unsigned long)-1)
if (FileInfo.compressed_size == (quint64)(unsigned long)-1)
{
if (mFile->ReadU64(&FileInfo.compressed_size, 1) != 1)
return false;
}
if (FileInfo.offset_curfile == (lcuint64)-1)
if (FileInfo.offset_curfile == (quint64)-1)
{
// Relative Header offset.
if (mFile->ReadU64(&FileInfo.offset_curfile, 1) != 1)
return false;
}
if (FileInfo.disk_num_start == (lcuint16)-1)
if (FileInfo.disk_num_start == (quint16)-1)
{
// Disk Start Number.
if (mFile->ReadU32(&Number32, 1) != 1)
@ -577,7 +577,7 @@ bool lcZipFile::ReadCentralDir()
return true;
}
bool lcZipFile::ExtractFile(const char* FileName, lcMemFile& File, lcuint32 MaxLength)
bool lcZipFile::ExtractFile(const char* FileName, lcMemFile& File, quint32 MaxLength)
{
for (int FileIdx = 0; FileIdx < mFiles.GetSize(); FileIdx++)
{
@ -590,13 +590,13 @@ bool lcZipFile::ExtractFile(const char* FileName, lcMemFile& File, lcuint32 MaxL
return false;
}
bool lcZipFile::ExtractFile(int FileIndex, lcMemFile& File, lcuint32 MaxLength)
bool lcZipFile::ExtractFile(int FileIndex, lcMemFile& File, quint32 MaxLength)
{
QMutexLocker Lock(&mMutex);
lcuint32 SizeVar;
lcuint64 OffsetLocalExtraField;
lcuint32 SizeLocalExtraField;
quint32 SizeVar;
quint64 OffsetLocalExtraField;
quint32 SizeLocalExtraField;
const lcZipFileInfo& FileInfo = mFiles[FileIndex];
if (!CheckFileCoherencyHeader(FileIndex, &SizeVar, &OffsetLocalExtraField, &SizeLocalExtraField))
@ -605,10 +605,10 @@ bool lcZipFile::ExtractFile(int FileIndex, lcMemFile& File, lcuint32 MaxLength)
const int BufferSize = 16384;
char ReadBuffer[BufferSize];
z_stream Stream;
lcuint32 Crc32;
lcuint64 PosInZipfile;
lcuint64 RestReadCompressed;
lcuint64 RestReadUncompressed;
quint32 Crc32;
quint64 PosInZipfile;
quint64 RestReadCompressed;
quint64 RestReadUncompressed;
Crc32 = 0;
Stream.total_out = 0;
@ -632,23 +632,23 @@ bool lcZipFile::ExtractFile(int FileIndex, lcMemFile& File, lcuint32 MaxLength)
Stream.avail_in = (uInt)0;
lcuint32 Length = lcMin((lcuint32)FileInfo.uncompressed_size, MaxLength);
quint32 Length = lcMin((quint32)FileInfo.uncompressed_size, MaxLength);
File.SetLength(Length);
File.Seek(0, SEEK_SET);
Stream.next_out = (Bytef*)File.mBuffer;
Stream.avail_out = Length;
lcuint32 Read = 0;
quint32 Read = 0;
while (Stream.avail_out > 0)
{
if ((Stream.avail_in == 0) && (RestReadCompressed > 0))
{
lcuint32 ReadThis = BufferSize;
quint32 ReadThis = BufferSize;
if (RestReadCompressed < ReadThis)
ReadThis = (lcuint32)RestReadCompressed;
ReadThis = (quint32)RestReadCompressed;
if (ReadThis == 0)
return false;
@ -667,7 +667,7 @@ bool lcZipFile::ExtractFile(int FileIndex, lcMemFile& File, lcuint32 MaxLength)
if (FileInfo.compression_method == 0)
{
lcuint32 DoCopy, i;
quint32 DoCopy, i;
if ((Stream.avail_in == 0) && (RestReadCompressed == 0))
return (Read == 0) ? false : true;
@ -691,9 +691,9 @@ bool lcZipFile::ExtractFile(int FileIndex, lcMemFile& File, lcuint32 MaxLength)
}
else
{
lcuint64 TotalOutBefore, TotalOutAfter;
quint64 TotalOutBefore, TotalOutAfter;
const Bytef *bufBefore;
lcuint64 OutThis;
quint64 OutThis;
int flush = Z_SYNC_FLUSH;
TotalOutBefore = Stream.total_out;

View file

@ -11,34 +11,34 @@ class lcFile;
// Date/time info.
struct tm_unz
{
lcuint32 tm_sec; // seconds after the minute - [0,59]
lcuint32 tm_min; // minutes after the hour - [0,59]
lcuint32 tm_hour; // hours since midnight - [0,23]
lcuint32 tm_mday; // day of the month - [1,31]
lcuint32 tm_mon; // months since January - [0,11]
lcuint32 tm_year; // years - [1980..2044]
quint32 tm_sec; // seconds after the minute - [0,59]
quint32 tm_min; // minutes after the hour - [0,59]
quint32 tm_hour; // hours since midnight - [0,23]
quint32 tm_mday; // day of the month - [1,31]
quint32 tm_mon; // months since January - [0,11]
quint32 tm_year; // years - [1980..2044]
};
// Information about a file in the zipfile.
struct lcZipFileInfo
{
lcuint16 version; // version made by 2 bytes
lcuint16 version_needed; // version needed to extract 2 bytes
lcuint16 flag; // general purpose bit flag 2 bytes
lcuint16 compression_method; // compression method 2 bytes
lcuint32 dosDate; // last mod file date in Dos fmt 4 bytes
lcuint32 crc; // crc-32 4 bytes
lcuint64 compressed_size; // compressed size 8 bytes
lcuint64 uncompressed_size; // uncompressed size 8 bytes
lcuint16 size_filename; // filename length 2 bytes
lcuint16 size_file_extra; // extra field length 2 bytes
lcuint16 size_file_comment; // file comment length 2 bytes
quint16 version; // version made by 2 bytes
quint16 version_needed; // version needed to extract 2 bytes
quint16 flag; // general purpose bit flag 2 bytes
quint16 compression_method; // compression method 2 bytes
quint32 dosDate; // last mod file date in Dos fmt 4 bytes
quint32 crc; // crc-32 4 bytes
quint64 compressed_size; // compressed size 8 bytes
quint64 uncompressed_size; // uncompressed size 8 bytes
quint16 size_filename; // filename length 2 bytes
quint16 size_file_extra; // extra field length 2 bytes
quint16 size_file_comment; // file comment length 2 bytes
lcuint16 disk_num_start; // disk number start 2 bytes
lcuint16 internal_fa; // internal file attributes 2 bytes
lcuint32 external_fa; // external file attributes 4 bytes
quint16 disk_num_start; // disk number start 2 bytes
quint16 internal_fa; // internal file attributes 2 bytes
quint32 external_fa; // external file attributes 4 bytes
lcuint64 offset_curfile; // relative offset of local header 8 bytes
quint64 offset_curfile; // relative offset of local header 8 bytes
char file_name[256];
tm_unz tmu_date;
@ -56,27 +56,27 @@ public:
bool OpenRead(lcFile* File);
bool OpenWrite(const QString& FileName);
bool ExtractFile(int FileIndex, lcMemFile& File, lcuint32 MaxLength = 0xffffffff);
bool ExtractFile(const char* FileName, lcMemFile& File, lcuint32 MaxLength = 0xffffffff);
bool ExtractFile(int FileIndex, lcMemFile& File, quint32 MaxLength = 0xffffffff);
bool ExtractFile(const char* FileName, lcMemFile& File, quint32 MaxLength = 0xffffffff);
lcArray<lcZipFileInfo> mFiles;
protected:
bool Open();
bool ReadCentralDir();
lcuint64 SearchCentralDir();
lcuint64 SearchCentralDir64();
bool CheckFileCoherencyHeader(int FileIndex, lcuint32* SizeVar, lcuint64* OffsetLocalExtraField, lcuint32* SizeLocalExtraField);
quint64 SearchCentralDir();
quint64 SearchCentralDir64();
bool CheckFileCoherencyHeader(int FileIndex, quint32* SizeVar, quint64* OffsetLocalExtraField, quint32* SizeLocalExtraField);
QMutex mMutex;
lcFile* mFile;
bool mModified;
bool mZip64;
lcuint64 mNumEntries;
lcuint64 mCentralDirSize;
lcuint64 mCentralDirOffset;
lcuint64 mBytesBeforeZipFile;
lcuint64 mCentralPos;
quint64 mNumEntries;
quint64 mCentralDirSize;
quint64 mCentralDirOffset;
quint64 mBytesBeforeZipFile;
quint64 mCentralPos;
};

View file

@ -439,10 +439,10 @@ void lcLight::DrawPointLight(lcContext* Context) const
const int NumVertices = (Slices - 1) * Slices + 2;
const float Radius = LC_LIGHT_SPHERE_RADIUS;
lcVector3 Vertices[NumVertices];
lcuint16 Indices[NumIndices];
quint16 Indices[NumIndices];
lcVector3* Vertex = Vertices;
lcuint16* Index = Indices;
quint16* Index = Indices;
*Vertex++ = lcVector3(0, 0, Radius);

View file

@ -48,7 +48,7 @@ public:
return (mState & LC_LIGHT_SELECTION_MASK) != 0;
}
virtual bool IsSelected(lcuint32 Section) const override
virtual bool IsSelected(quint32 Section) const override
{
switch (Section)
{
@ -76,7 +76,7 @@ public:
mState &= ~(LC_LIGHT_SELECTION_MASK | LC_LIGHT_FOCUS_MASK);
}
virtual void SetSelected(lcuint32 Section, bool Selected) override
virtual void SetSelected(quint32 Section, bool Selected) override
{
switch (Section)
{
@ -104,7 +104,7 @@ public:
return (mState & LC_LIGHT_FOCUS_MASK) != 0;
}
virtual bool IsFocused(lcuint32 Section) const override
virtual bool IsFocused(quint32 Section) const override
{
switch (Section)
{
@ -119,7 +119,7 @@ public:
return false;
}
virtual void SetFocused(lcuint32 Section, bool Focused) override
virtual void SetFocused(quint32 Section, bool Focused) override
{
switch (Section)
{
@ -142,7 +142,7 @@ public:
}
}
virtual lcuint32 GetFocusSection() const override
virtual quint32 GetFocusSection() const override
{
if (mState & LC_LIGHT_POSITION_FOCUSED)
return LC_LIGHT_SECTION_POSITION;
@ -153,12 +153,12 @@ public:
return ~0;
}
virtual lcuint32 GetAllowedTransforms() const override
virtual quint32 GetAllowedTransforms() const override
{
return LC_OBJECT_TRANSFORM_MOVE_X | LC_OBJECT_TRANSFORM_MOVE_Y | LC_OBJECT_TRANSFORM_MOVE_Z;
}
virtual lcVector3 GetSectionPosition(lcuint32 Section) const override
virtual lcVector3 GetSectionPosition(quint32 Section) const override
{
switch (Section)
{
@ -220,7 +220,7 @@ protected:
void DrawPointLight(lcContext* Context) const;
void DrawSpotLight(lcContext* Context) const;
lcuint32 mState;
quint32 mState;
char m_strName[81];
};

View file

@ -3,7 +3,7 @@
#include "lc_math.h"
#include "lc_array.h"
typedef lcuint32 lcStep;
typedef quint32 lcStep;
#define LC_STEP_MAX 0xffffffff
enum lcObjectType
@ -23,7 +23,7 @@ struct lcObjectKey
struct lcObjectSection
{
lcObject* Object;
lcuint32 Section;
quint32 Section;
};
struct lcObjectRayTest
@ -82,16 +82,16 @@ public:
}
virtual bool IsSelected() const = 0;
virtual bool IsSelected(lcuint32 Section) const = 0;
virtual bool IsSelected(quint32 Section) const = 0;
virtual void SetSelected(bool Selected) = 0;
virtual void SetSelected(lcuint32 Section, bool Selected) = 0;
virtual void SetSelected(quint32 Section, bool Selected) = 0;
virtual bool IsFocused() const = 0;
virtual bool IsFocused(lcuint32 Section) const = 0;
virtual void SetFocused(lcuint32 Section, bool Focused) = 0;
virtual lcuint32 GetFocusSection() const = 0;
virtual bool IsFocused(quint32 Section) const = 0;
virtual void SetFocused(quint32 Section, bool Focused) = 0;
virtual quint32 GetFocusSection() const = 0;
virtual lcuint32 GetAllowedTransforms() const = 0;
virtual lcVector3 GetSectionPosition(lcuint32 Section) const = 0;
virtual quint32 GetAllowedTransforms() const = 0;
virtual lcVector3 GetSectionPosition(quint32 Section) const = 0;
virtual void RayTest(lcObjectRayTest& ObjectRayTest) const = 0;
virtual void BoxTest(lcObjectBoxTest& ObjectBoxTest) const = 0;
virtual void DrawInterface(lcContext* Context) const = 0;

View file

@ -174,7 +174,7 @@ bool lcPiece::ParseLDrawLine(QTextStream& Stream)
bool lcPiece::FileLoad(lcFile& file)
{
lcuint8 version, ch;
quint8 version, ch;
version = file.ReadU8();
@ -186,10 +186,10 @@ bool lcPiece::FileLoad(lcFile& file)
if (file.ReadU8() != 1)
return false;
lcuint16 time;
quint16 time;
float param[4];
lcuint8 type;
lcuint32 n;
quint8 type;
quint32 n;
file.ReadU32(&n, 1);
while (n--)
@ -215,12 +215,12 @@ bool lcPiece::FileLoad(lcFile& file)
if (version < 9)
{
lcuint16 time;
lcuint8 type;
quint16 time;
quint8 type;
if (version > 5)
{
lcuint32 keys;
quint32 keys;
float param[4];
file.ReadU32(&keys, 1);
@ -268,14 +268,14 @@ bool lcPiece::FileLoad(lcFile& file)
ModelWorld = lcMul(lcMatrix44RotationZ(Rotation[2] * LC_DTOR), lcMul(lcMatrix44RotationY(Rotation[1] * LC_DTOR), lcMul(lcMatrix44RotationX(Rotation[0] * LC_DTOR), ModelWorld)));
}
lcuint8 b;
quint8 b;
file.ReadU8(&b, 1);
time = b;
ChangeKey(mPositionKeys, ModelWorld.GetTranslation(), 1, true);
ChangeKey(mRotationKeys, lcMatrix33(ModelWorld), time, true);
lcint32 bl;
qint32 bl;
file.ReadS32(&bl, 1);
}
}
@ -311,7 +311,7 @@ bool lcPiece::FileLoad(lcFile& file)
// 11 (0.77)
if (version < 11)
{
lcuint8 Color;
quint8 Color;
file.ReadU8(&Color, 1);
@ -324,7 +324,7 @@ bool lcPiece::FileLoad(lcFile& file)
file.ReadU32(&mColorCode, 1);
mColorIndex = lcGetColorIndex(mColorCode);
lcuint8 Step;
quint8 Step;
file.ReadU8(&Step, 1);
mStepShow = Step;
if (version > 1)
@ -342,7 +342,7 @@ bool lcPiece::FileLoad(lcFile& file)
if (version > 7)
{
lcuint8 Hidden;
quint8 Hidden;
file.ReadU8(&Hidden, 1);
if (Hidden & 1)
mState |= LC_PIECE_HIDDEN;
@ -351,7 +351,7 @@ bool lcPiece::FileLoad(lcFile& file)
}
else
{
lcint32 hide;
qint32 hide;
file.ReadS32(&hide, 1);
if (hide != 0)
mState |= LC_PIECE_HIDDEN;
@ -359,7 +359,7 @@ bool lcPiece::FileLoad(lcFile& file)
}
// 7 (0.64)
lcint32 i = -1;
qint32 i = -1;
if (version > 6)
file.ReadS32(&i, 1);
mGroup = (lcGroup*)(quintptr)i;
@ -677,7 +677,7 @@ void lcPiece::SubModelAddRenderMeshes(lcScene& Scene, const lcMatrix44& WorldMat
void lcPiece::Move(lcStep Step, bool AddKey, const lcVector3& Distance)
{
lcuint32 Section = GetFocusSection();
quint32 Section = GetFocusSection();
if (Section == LC_PIECE_SECTION_POSITION || Section == LC_PIECE_SECTION_INVALID)
{
@ -705,7 +705,7 @@ void lcPiece::Move(lcStep Step, bool AddKey, const lcVector3& Distance)
void lcPiece::Rotate(lcStep Step, bool AddKey, const lcMatrix33& RotationMatrix, const lcVector3& Center, const lcMatrix33& RotationFrame)
{
lcuint32 Section = GetFocusSection();
quint32 Section = GetFocusSection();
if (Section == LC_PIECE_SECTION_POSITION || Section == LC_PIECE_SECTION_INVALID)
{
@ -767,9 +767,9 @@ void lcPiece::RotatePivotPoint(const lcMatrix33& RotationMatrix)
mState |= LC_PIECE_PIVOT_POINT_VALID;
}
lcuint32 lcPiece::GetAllowedTransforms() const
quint32 lcPiece::GetAllowedTransforms() const
{
lcuint32 Section = GetFocusSection();
quint32 Section = GetFocusSection();
if (Section == LC_PIECE_SECTION_POSITION || Section == LC_PIECE_SECTION_INVALID)
return LC_OBJECT_TRANSFORM_MOVE_X | LC_OBJECT_TRANSFORM_MOVE_Y | LC_OBJECT_TRANSFORM_MOVE_Z | LC_OBJECT_TRANSFORM_ROTATE_X | LC_OBJECT_TRANSFORM_ROTATE_Y | LC_OBJECT_TRANSFORM_ROTATE_Z;

View file

@ -63,7 +63,7 @@ public:
return (mState & LC_PIECE_SELECTION_MASK) != 0;
}
virtual bool IsSelected(lcuint32 Section) const override
virtual bool IsSelected(quint32 Section) const override
{
Q_UNUSED(Section);
@ -78,7 +78,7 @@ public:
mState &= ~(LC_PIECE_SELECTION_MASK | LC_PIECE_FOCUS_MASK);
}
virtual void SetSelected(lcuint32 Section, bool Selected) override
virtual void SetSelected(quint32 Section, bool Selected) override
{
switch (Section)
{
@ -152,7 +152,7 @@ public:
return (mState & LC_PIECE_FOCUS_MASK) != 0;
}
virtual bool IsFocused(lcuint32 Section) const override
virtual bool IsFocused(quint32 Section) const override
{
switch (Section)
{
@ -187,7 +187,7 @@ public:
return false;
}
virtual void SetFocused(lcuint32 Section, bool Focused) override
virtual void SetFocused(quint32 Section, bool Focused) override
{
switch (Section)
{
@ -256,7 +256,7 @@ public:
}
}
virtual lcuint32 GetFocusSection() const override
virtual quint32 GetFocusSection() const override
{
if (mState & LC_PIECE_POSITION_FOCUSED)
return LC_PIECE_SECTION_POSITION;
@ -288,9 +288,9 @@ public:
return LC_PIECE_SECTION_INVALID;
}
virtual lcuint32 GetAllowedTransforms() const override;
virtual quint32 GetAllowedTransforms() const override;
virtual lcVector3 GetSectionPosition(lcuint32 Section) const override
virtual lcVector3 GetSectionPosition(quint32 Section) const override
{
switch (Section)
{
@ -456,7 +456,7 @@ public:
mStepHide = mStepShow + 1;
}
void SetColorCode(lcuint32 ColorCode)
void SetColorCode(quint32 ColorCode)
{
mColorCode = ColorCode;
mColorIndex = lcGetColorIndex(ColorCode);
@ -480,7 +480,7 @@ public:
lcVector3 GetRotationCenter() const
{
lcuint32 Section = GetFocusSection();
quint32 Section = GetFocusSection();
if (Section == LC_PIECE_SECTION_POSITION || Section == LC_PIECE_SECTION_INVALID)
{
@ -505,7 +505,7 @@ public:
lcMatrix33 GetRelativeRotation() const
{
lcuint32 Section = GetFocusSection();
quint32 Section = GetFocusSection();
if (Section == LC_PIECE_SECTION_POSITION || Section == LC_PIECE_SECTION_INVALID)
{
@ -537,7 +537,7 @@ public:
PieceInfo* mPieceInfo;
int mColorIndex;
lcuint32 mColorCode;
quint32 mColorCode;
lcMatrix44 mModelWorld;
lcMatrix44 mPivotMatrix;
@ -566,7 +566,7 @@ protected:
lcStep mStepShow;
lcStep mStepHide;
lcuint32 mState;
quint32 mState;
lcArray<lcPieceControlPoint> mControlPoints;
lcMesh* mMesh;
};

View file

@ -153,7 +153,7 @@ public:
char m_strDescription[128];
int mZipFileType;
int mZipFileIndex;
lcuint32 mFlags;
quint32 mFlags;
lcPieceInfoState mState;
int mFolderType;
int mFolderIndex;

View file

@ -657,7 +657,7 @@ void Project::Export3DStudio(const QString& FileName)
File.WriteU16(0x0030); // CHK_INT_PERCENTAGE
File.WriteU32(8);
File.WriteS16((lcuint8)floor(100.0 * 0.25 + 0.5));
File.WriteS16((quint8)floor(100.0 * 0.25 + 0.5));
File.WriteU16(0xA041); // CHK_MAT_SHIN2PCT
File.WriteU32(14);
@ -665,7 +665,7 @@ void Project::Export3DStudio(const QString& FileName)
File.WriteU16(0x0030); // CHK_INT_PERCENTAGE
File.WriteU32(8);
File.WriteS16((lcuint8)floor(100.0 * 0.05 + 0.5));
File.WriteS16((quint8)floor(100.0 * 0.05 + 0.5));
File.WriteU16(0xA050); // CHK_MAT_TRANSPARENCY
File.WriteU32(14);
@ -673,7 +673,7 @@ void Project::Export3DStudio(const QString& FileName)
File.WriteU16(0x0030); // CHK_INT_PERCENTAGE
File.WriteU32(8);
File.WriteS16((lcuint8)floor(100.0 * (1.0f - Color->Value[3]) + 0.5));
File.WriteS16((quint8)floor(100.0 * (1.0f - Color->Value[3]) + 0.5));
File.WriteU16(0xA052); // CHK_MAT_XPFALL
File.WriteU32(14);
@ -681,7 +681,7 @@ void Project::Export3DStudio(const QString& FileName)
File.WriteU16(0x0030); // CHK_INT_PERCENTAGE
File.WriteU32(8);
File.WriteS16((lcuint8)floor(100.0 * 0.0 + 0.5));
File.WriteS16((quint8)floor(100.0 * 0.0 + 0.5));
File.WriteU16(0xA053); // CHK_MAT_REFBLUR
File.WriteU32(14);
@ -689,7 +689,7 @@ void Project::Export3DStudio(const QString& FileName)
File.WriteU16(0x0030); // CHK_INT_PERCENTAGE
File.WriteU32(8);
File.WriteS16((lcuint8)floor(100.0 * 0.2 + 0.5));
File.WriteS16((quint8)floor(100.0 * 0.2 + 0.5));
File.WriteU16(0xA100); // CHK_MAT_SHADING
File.WriteU32(8);
@ -702,7 +702,7 @@ void Project::Export3DStudio(const QString& FileName)
File.WriteU16(0x0030); // CHK_INT_PERCENTAGE
File.WriteU32(8);
File.WriteS16((lcuint8)floor(100.0 * 0.0 + 0.5));
File.WriteS16((quint8)floor(100.0 * 0.0 + 0.5));
File.WriteU16(0xA081); // CHK_MAT_TWO_SIDE
File.WriteU32(6);
@ -780,7 +780,7 @@ void Project::Export3DStudio(const QString& FileName)
File.WriteU16(0x1100); // CHK_BIT_MAP
QByteArray BackgroundImage = Properties.mBackgroundImage.toLatin1();
File.WriteU32(6 + 1 + (lcuint32)strlen(BackgroundImage.constData()));
File.WriteU32(6 + 1 + (quint32)strlen(BackgroundImage.constData()));
File.WriteBuffer(BackgroundImage.constData(), strlen(BackgroundImage.constData()) + 1);
File.WriteU16(0x1300); // CHK_V_GRADIENT
@ -911,7 +911,7 @@ void Project::Export3DStudio(const QString& FileName)
if (Section->PrimitiveType != LC_MESH_TRIANGLES && Section->PrimitiveType != LC_MESH_TEXTURED_TRIANGLES)
continue;
lcuint16* Indices = (lcuint16*)Mesh->mIndexData + Section->IndexOffset / sizeof(lcuint16);
quint16* Indices = (quint16*)Mesh->mIndexData + Section->IndexOffset / sizeof(quint16);
for (int IndexIdx = 0; IndexIdx < Section->NumIndices; IndexIdx += 3)
{
@ -2212,7 +2212,7 @@ void Project::ExportWavefront(const QString& FileName)
return;
}
lcuint32 vert = 1;
quint32 vert = 1;
OBJFile.WriteLine("# Model exported from LeoCAD\n");

View file

@ -715,22 +715,22 @@ void View::OnDraw()
if (!mRenderImage.isNull())
{
lcuint8* Buffer = (lcuint8*)malloc(mWidth * mHeight * 4);
quint8* Buffer = (quint8*)malloc(mWidth * mHeight * 4);
uchar* ImageBuffer = mRenderImage.bits();
glFinish();
glReadPixels(0, 0, CurrentTileWidth, CurrentTileHeight, GL_RGBA, GL_UNSIGNED_BYTE, Buffer);
lcuint32 TileY = 0;
quint32 TileY = 0;
if (CurrentTileRow != TotalTileRows - 1)
TileY = (TotalTileRows - CurrentTileRow - 1) * mHeight - (mHeight - mRenderImage.height() % mHeight);
lcuint32 TileStart = ((CurrentTileColumn * mWidth) + (TileY * mRenderImage.width())) * 4;
quint32 TileStart = ((CurrentTileColumn * mWidth) + (TileY * mRenderImage.width())) * 4;
for (int y = 0; y < CurrentTileHeight; y++)
{
lcuint8* src = Buffer + (CurrentTileHeight - y - 1) * CurrentTileWidth * 4;
lcuint8* dst = ImageBuffer + TileStart + y * mRenderImage.width() * 4;
quint8* src = Buffer + (CurrentTileHeight - y - 1) * CurrentTileWidth * 4;
quint8* dst = ImageBuffer + TileStart + y * mRenderImage.width() * 4;
for (int x = 0; x < CurrentTileWidth; x++)
{
@ -803,7 +803,7 @@ void View::DrawSelectMoveOverlay()
mContext->SetVertexFormatPosition(3);
lcObject* Focus = mModel->GetFocusObject();
lcuint32 AllowedTransforms = Focus ? Focus->GetAllowedTransforms() : LC_OBJECT_TRANSFORM_MOVE_X | LC_OBJECT_TRANSFORM_MOVE_Y | LC_OBJECT_TRANSFORM_MOVE_Z | LC_OBJECT_TRANSFORM_ROTATE_X | LC_OBJECT_TRANSFORM_ROTATE_Y | LC_OBJECT_TRANSFORM_ROTATE_Z;
quint32 AllowedTransforms = Focus ? Focus->GetAllowedTransforms() : LC_OBJECT_TRANSFORM_MOVE_X | LC_OBJECT_TRANSFORM_MOVE_Y | LC_OBJECT_TRANSFORM_MOVE_Z | LC_OBJECT_TRANSFORM_ROTATE_X | LC_OBJECT_TRANSFORM_ROTATE_Y | LC_OBJECT_TRANSFORM_ROTATE_Z;
if (mTrackButton == LC_TRACKBUTTON_NONE || (mTrackTool >= LC_TRACKTOOL_MOVE_X && mTrackTool <= LC_TRACKTOOL_MOVE_XYZ))
{
@ -902,7 +902,7 @@ void View::DrawSelectMoveOverlay()
if (Focus && Focus->IsPiece())
{
lcPiece* Piece = (lcPiece*)Focus;
lcuint32 Section = Piece->GetFocusSection();
quint32 Section = Piece->GetFocusSection();
if (Section >= LC_PIECE_SECTION_CONTROL_POINT_1 && Section <= LC_PIECE_SECTION_CONTROL_POINT_8 && Piece->mPieceInfo->GetSynthInfo() && Piece->mPieceInfo->GetSynthInfo()->IsCurve())
{
@ -1884,13 +1884,13 @@ void View::UpdateTrackTool()
if (Focus && Focus->IsPiece())
{
lcPiece* Piece = (lcPiece*)Focus;
lcuint32 Section = Piece->GetFocusSection();
quint32 Section = Piece->GetFocusSection();
if (Section >= LC_PIECE_SECTION_CONTROL_POINT_1 && Section <= LC_PIECE_SECTION_CONTROL_POINT_8)
ControlPointIndex = Section - LC_PIECE_SECTION_CONTROL_POINT_1;
}
lcuint32 AllowedTransforms = Focus ? Focus->GetAllowedTransforms() : LC_OBJECT_TRANSFORM_MOVE_X | LC_OBJECT_TRANSFORM_MOVE_Y | LC_OBJECT_TRANSFORM_MOVE_Z | LC_OBJECT_TRANSFORM_ROTATE_X | LC_OBJECT_TRANSFORM_ROTATE_Y | LC_OBJECT_TRANSFORM_ROTATE_Z;
quint32 AllowedTransforms = Focus ? Focus->GetAllowedTransforms() : LC_OBJECT_TRANSFORM_MOVE_X | LC_OBJECT_TRANSFORM_MOVE_Y | LC_OBJECT_TRANSFORM_MOVE_Z | LC_OBJECT_TRANSFORM_ROTATE_X | LC_OBJECT_TRANSFORM_ROTATE_Y | LC_OBJECT_TRANSFORM_ROTATE_Z;
for (int AxisIndex = 0; AxisIndex < 3; AxisIndex++)
{
@ -2250,7 +2250,7 @@ void View::UpdateTrackTool()
}
}
bool View::IsTrackToolAllowed(lcTrackTool TrackTool, lcuint32 AllowedTransforms) const
bool View::IsTrackToolAllowed(lcTrackTool TrackTool, quint32 AllowedTransforms) const
{
switch (TrackTool)
{
@ -2825,7 +2825,7 @@ void View::OnMouseMove()
if (Focus && Focus->IsPiece())
{
lcPiece* Piece = (lcPiece*)Focus;
lcuint32 Section = Piece->GetFocusSection();
quint32 Section = Piece->GetFocusSection();
if (Section >= LC_PIECE_SECTION_CONTROL_POINT_1 && Section <= LC_PIECE_SECTION_CONTROL_POINT_8)
{

View file

@ -146,7 +146,7 @@ protected:
void DrawViewport();
void UpdateTrackTool();
bool IsTrackToolAllowed(lcTrackTool TrackTool, lcuint32 AllowedTransforms) const;
bool IsTrackToolAllowed(lcTrackTool TrackTool, quint32 AllowedTransforms) const;
lcTool GetCurrentTool() const;
lcTrackTool GetOverrideTrackTool(Qt::MouseButton Button) const;
float GetOverlayScale() const;

View file

@ -171,7 +171,7 @@ void lcQPreferencesDialog::colorClicked()
{
QObject *button = sender();
QString title;
lcuint32 *color = nullptr;
quint32 *color = nullptr;
QColorDialog::ColorDialogOptions dialogOptions;
if (button == ui->gridStudColor)

View file

@ -435,7 +435,7 @@ QWidget *lcQPropertiesTree::createEditor(QWidget *parent, QTreeWidgetItem *item)
case PropertyInt:
{
QLineEdit *editor = new QLineEdit(parent);
lcuint32 value = item->data(0, PropertyValueRole).toUInt();
quint32 value = item->data(0, PropertyValueRole).toUInt();
editor->setValidator(new QIntValidator());
editor->setText(QString::number(value));

View file

@ -167,11 +167,11 @@ void lcRenderDialog::Update()
struct lcSharedMemoryHeader
{
uint32_t Version;
uint32_t Width;
uint32_t Height;
uint32_t PixelsWritten;
uint32_t PixelsRead;
quint32 Version;
quint32 Width;
quint32 Height;
quint32 PixelsWritten;
quint32 PixelsRead;
};
lcSharedMemoryHeader* Header = (lcSharedMemoryHeader*)Buffer;
@ -183,7 +183,7 @@ void lcRenderDialog::Update()
// if (width != expected) ...
QImage Image(Width, Height, QImage::Format_ARGB32);
uint8_t* Pixels = (uint8_t*)(Header + 1);
quint8* Pixels = (quint8*)(Header + 1);
for (int y = 0; y < Height; y++)
{