mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 19:29:09 +00:00
Convert custom HeadSpin integer types to standard types from stdint.h
This commit is contained in:
@ -126,7 +126,7 @@ bool plNetShareFileGrabber::FileToStream(const char* path, hsStream* stream)
|
||||
if (fileStream.Open(filePath.c_str()))
|
||||
{
|
||||
char* buffer = new char[BUFFER_SIZE];
|
||||
UInt32 streamSize = fileStream.GetSizeLeft();
|
||||
uint32_t streamSize = fileStream.GetSizeLeft();
|
||||
while (streamSize > (BUFFER_SIZE))
|
||||
{
|
||||
fileStream.Read(BUFFER_SIZE, buffer);
|
||||
|
@ -55,9 +55,9 @@ public:
|
||||
char* fFilename;
|
||||
plMD5Checksum fSum;
|
||||
plMD5Checksum fLocalSum;
|
||||
UInt32 fSize;
|
||||
UInt32 fCompressedSize;
|
||||
UInt32 fFlags;
|
||||
uint32_t fSize;
|
||||
uint32_t fCompressedSize;
|
||||
uint32_t fFlags;
|
||||
};
|
||||
|
||||
plManifest::plManifest(LogFunc log) :
|
||||
@ -175,8 +175,8 @@ void plManifest::DownloadUpdates(ProgressFunc progress, plFileGrabber* grabber)
|
||||
if (localStream.Open(file->fFilename, "wb"))
|
||||
{
|
||||
char dataBuf[1024];
|
||||
UInt32 sizeLeft = serverStream.GetSizeLeft();
|
||||
while (UInt32 amtRead = serverStream.Read( (sizeof(dataBuf) > sizeLeft) ? sizeLeft : sizeof(dataBuf), dataBuf))
|
||||
uint32_t sizeLeft = serverStream.GetSizeLeft();
|
||||
while (uint32_t amtRead = serverStream.Read( (sizeof(dataBuf) > sizeLeft) ? sizeLeft : sizeof(dataBuf), dataBuf))
|
||||
{
|
||||
progress(file->fFilename, amtRead);
|
||||
|
||||
@ -228,7 +228,7 @@ void plManifest::IWriteCache()
|
||||
|
||||
bool openedFile = false;
|
||||
|
||||
UInt32 numFiles = 0;
|
||||
uint32_t numFiles = 0;
|
||||
for (int i = 0; i < fFiles.size(); i++)
|
||||
{
|
||||
plManifestFile* file = fFiles[i];
|
||||
@ -278,8 +278,8 @@ void plManifest::IReadCache(ProgressFunc progress)
|
||||
|
||||
if (s)
|
||||
{
|
||||
UInt32 numCached = s->ReadSwap32();
|
||||
UInt32 cacheFileVersion = s->ReadSwap32();
|
||||
uint32_t numCached = s->ReadSwap32();
|
||||
uint32_t cacheFileVersion = s->ReadSwap32();
|
||||
|
||||
if (cacheFileVersion != kCacheFileVersion)
|
||||
{
|
||||
@ -294,7 +294,7 @@ void plManifest::IReadCache(ProgressFunc progress)
|
||||
{
|
||||
char* name = s->ReadSafeString();
|
||||
|
||||
UInt8 checksumBuf[MD5_DIGEST_LENGTH];
|
||||
uint8_t checksumBuf[MD5_DIGEST_LENGTH];
|
||||
s->Read(sizeof(checksumBuf), checksumBuf);
|
||||
plMD5Checksum checksum;
|
||||
checksum.SetValue(checksumBuf);
|
||||
@ -349,7 +349,7 @@ bool plManifest::IDecompressSound(plManifestFile* file)
|
||||
plAudioFileReader* reader = plAudioFileReader::CreateReader(file->fFilename, plAudioCore::kAll, plAudioFileReader::kStreamNative);
|
||||
if (!reader)
|
||||
return false;
|
||||
UInt32 size = reader->GetDataSize();
|
||||
uint32_t size = reader->GetDataSize();
|
||||
delete reader;
|
||||
|
||||
if (hsCheckBits(file->fFlags, kSndFlagCacheSplit))
|
||||
|
@ -61,8 +61,8 @@ protected:
|
||||
typedef std::vector<plManifestFile*> FileVec;
|
||||
FileVec fFiles;
|
||||
|
||||
UInt32 fDownloadFiles;
|
||||
UInt32 fDownloadBytes;
|
||||
uint32_t fDownloadFiles;
|
||||
uint32_t fDownloadBytes;
|
||||
|
||||
bool fDirtySums;
|
||||
|
||||
@ -86,8 +86,8 @@ public:
|
||||
void DownloadUpdates(ProgressFunc progress, plFileGrabber* grabber);
|
||||
|
||||
int NumFiles() { return fFiles.size(); }
|
||||
UInt32 NumDownloadFiles() { return fDownloadFiles; }
|
||||
UInt32 DownloadSize() { return fDownloadBytes; }
|
||||
uint32_t NumDownloadFiles() { return fDownloadFiles; }
|
||||
uint32_t DownloadSize() { return fDownloadBytes; }
|
||||
};
|
||||
|
||||
#endif // plManifest_h_inc
|
@ -360,7 +360,7 @@ void plPlasmaUpdate::IUpdateServer()
|
||||
// Get the manifests
|
||||
//
|
||||
bool gotManifests = IGetManifests(serverRoot, external);
|
||||
UInt32 dlSize = 0;
|
||||
uint32_t dlSize = 0;
|
||||
|
||||
fProgressType = kValidating;
|
||||
|
||||
@ -368,7 +368,7 @@ void plPlasmaUpdate::IUpdateServer()
|
||||
{
|
||||
int i;
|
||||
|
||||
UInt32 numFiles = 0;
|
||||
uint32_t numFiles = 0;
|
||||
for (i = 0; i < fManifests.size(); i++)
|
||||
numFiles += fManifests[i]->NumFiles();
|
||||
|
||||
@ -413,7 +413,7 @@ void plPlasmaUpdate::IDownloadUpdates()
|
||||
|
||||
int i;
|
||||
|
||||
UInt32 dlSize = 0;
|
||||
uint32_t dlSize = 0;
|
||||
for (i = 0; i < fManifests.size(); i++)
|
||||
dlSize += fManifests[i]->DownloadSize();
|
||||
|
||||
|
Reference in New Issue
Block a user