mirror of
https://github.com/isledecomp/isle.git
synced 2025-12-12 17:03:26 +00:00
Use macros for Seek modes
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
#include <assert.h>
|
||||
|
||||
// GLOBAL: LEGO1 0x101020e8
|
||||
void (*g_omniUserMessage)(const char*, int) = NULL;
|
||||
void (*g_omniUserMessage)(const char*, MxS32) = NULL;
|
||||
|
||||
// FUNCTION: LEGO1 0x100b6e10
|
||||
MxBool GetRectIntersection(
|
||||
@@ -166,7 +166,7 @@ MxDSObject* CreateStreamObject(MxDSFile* p_file, MxS16 p_ofs)
|
||||
MxU8* buf;
|
||||
_MMCKINFO tmpChunk;
|
||||
|
||||
if (p_file->Seek(((MxLong*) p_file->GetBuffer())[p_ofs], 0)) {
|
||||
if (p_file->Seek(((MxLong*) p_file->GetBuffer())[p_ofs], SEEK_SET)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -245,7 +245,7 @@ void MxDiskStreamProvider::PerformWork()
|
||||
buffer = streamingAction->GetUnknowna0();
|
||||
|
||||
if (m_pFile->GetPosition() == streamingAction->GetBufferOffset() ||
|
||||
m_pFile->Seek(streamingAction->GetBufferOffset(), 0) == 0) {
|
||||
m_pFile->Seek(streamingAction->GetBufferOffset(), SEEK_SET) == 0) {
|
||||
buffer->SetUnknown14(m_pFile->GetPosition());
|
||||
|
||||
if (m_pFile->ReadToBuffer(buffer) == SUCCESS) {
|
||||
|
||||
@@ -41,7 +41,7 @@ MxResult MxDSFile::Open(MxULong p_uStyle)
|
||||
Close();
|
||||
}
|
||||
else {
|
||||
Seek(0, 0);
|
||||
Seek(0, SEEK_SET);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user