mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-25 17:21:17 +00:00
fixes
This commit is contained in:
parent
70b3ec2896
commit
ca23f95d30
@ -36,7 +36,7 @@ class MxDSFile : public MxDSSource {
|
|||||||
|
|
||||||
inline void SetFileName(const char* p_filename) { m_filename = p_filename; }
|
inline void SetFileName(const char* p_filename) { m_filename = p_filename; }
|
||||||
|
|
||||||
inline int CalcFileSize() { return GetFileSize(m_io.m_info.hmmio, NULL); }
|
inline MxS32 CalcFileSize() { return GetFileSize(m_io.m_info.hmmio, NULL); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MxLong ReadChunks();
|
MxLong ReadChunks();
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
#ifndef MXRAMSTREAMCONTROLLER_H
|
#ifndef MXRAMSTREAMCONTROLLER_H
|
||||||
#define MXRAMSTREAMCONTROLLER_H
|
#define MXRAMSTREAMCONTROLLER_H
|
||||||
|
|
||||||
#include "MxDSStreamingAction.h"
|
#include "mxdsstreamingaction.h"
|
||||||
#include "mxdsbuffer.h"
|
#include "mxdsbuffer.h"
|
||||||
#include "mxstreamcontroller.h"
|
#include "mxstreamcontroller.h"
|
||||||
|
|
||||||
@ -31,6 +31,7 @@ class MxRAMStreamController : public MxStreamController {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
MxDSBuffer m_buffer;
|
MxDSBuffer m_buffer;
|
||||||
|
|
||||||
MxResult DeserializeObject(MxDSStreamingAction& action);
|
MxResult DeserializeObject(MxDSStreamingAction& action);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -81,7 +81,7 @@ MxResult MxRAMStreamProvider::SetResourceToGet(MxStreamController* p_resource)
|
|||||||
if (m_pBufferOfFileSize != NULL &&
|
if (m_pBufferOfFileSize != NULL &&
|
||||||
m_pFile->Read((unsigned char*) m_pBufferOfFileSize, m_fileSize) == SUCCESS) {
|
m_pFile->Read((unsigned char*) m_pBufferOfFileSize, m_fileSize) == SUCCESS) {
|
||||||
m_lengthInDWords = m_pFile->GetLengthInDWords();
|
m_lengthInDWords = m_pFile->GetLengthInDWords();
|
||||||
m_bufferForDWords = new MxU32[m_lengthInDWords << 2];
|
m_bufferForDWords = new MxU32[m_lengthInDWords * sizeof(MxU32)];
|
||||||
|
|
||||||
if (m_bufferForDWords != NULL) {
|
if (m_bufferForDWords != NULL) {
|
||||||
memcpy(m_bufferForDWords, m_pFile->GetBuffer(), m_lengthInDWords);
|
memcpy(m_bufferForDWords, m_pFile->GetBuffer(), m_lengthInDWords);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user