aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/cryo/clhnm.cpp4
-rw-r--r--engines/cryo/cryolib.cpp5
-rw-r--r--engines/cryo/cryolib.h2
-rw-r--r--engines/cryo/eden.cpp11
4 files changed, 6 insertions, 16 deletions
diff --git a/engines/cryo/clhnm.cpp b/engines/cryo/clhnm.cpp
index 877072e532..cde42eec46 100644
--- a/engines/cryo/clhnm.cpp
+++ b/engines/cryo/clhnm.cpp
@@ -633,10 +633,6 @@ void CLHNM_DeactivatePreloadBuffer() {
void CLHNM_Prepare2Read(hnm_t *hnm, int mode) {
}
-void CLHNM_SetPosIntoFile(hnm_t *hnm, int32 pos) {
- CLFile_SetPosition(*hnm->_file, 1, pos);
-}
-
void CLHNM_Desentrelace320(byte *frame_buffer, byte *final_buffer, uint16 height) {
unsigned int *input = (unsigned int *)frame_buffer;
unsigned int *line0 = (unsigned int *)final_buffer;
diff --git a/engines/cryo/cryolib.cpp b/engines/cryo/cryolib.cpp
index 2e3b822815..3b1967bfb9 100644
--- a/engines/cryo/cryolib.cpp
+++ b/engines/cryo/cryolib.cpp
@@ -362,11 +362,6 @@ void CLFile_MakeStruct(int a3, int a4, const char *name, filespec_t *fs) {
fs->create = 0;
}
-void CLFile_SetPosition(file_t &handle, int16 mode, int32 pos) {
- assert(mode == 1);
- handle.seek(pos, 0);
-}
-
void CLFile_Write(file_t &handle, void *buffer, int32 *size) {
assert(0);
}
diff --git a/engines/cryo/cryolib.h b/engines/cryo/cryolib.h
index 61afda0dca..94964e05de 100644
--- a/engines/cryo/cryolib.h
+++ b/engines/cryo/cryolib.h
@@ -215,7 +215,6 @@ void CLPalette_Send2Screen(struct color_t *palette, uint16 first, uint16 count);
void CLPalette_BeSystem();
void CLFile_MakeStruct(int a3, int a4, const char *name, filespec_t *fs);
-void CLFile_SetPosition(file_t &handle, int16 mode, int32 pos);
void CLFile_Write(file_t &handle, void *buffer, int32 *size);
void CLSound_PrepareSample(sound_t *sound, int16 mode);
@@ -293,7 +292,6 @@ void CLHNM_ReadHeader(hnm_t *hnm);
int16 CLHNM_GetVersion(hnm_t *hnm);
int CLHNM_GetFrameNum(hnm_t *hnm);
void CLHNM_Prepare2Read(hnm_t *hnm, int mode);
-void CLHNM_SetPosIntoFile(hnm_t *hnm, int32 pos);
void CLHNM_Desentrelace320(byte *frame_buffer, byte *final_buffer, uint16 height);
diff --git a/engines/cryo/eden.cpp b/engines/cryo/eden.cpp
index 9cadb07a12..45f186b297 100644
--- a/engines/cryo/eden.cpp
+++ b/engines/cryo/eden.cpp
@@ -4688,7 +4688,7 @@ void EdenGame::loadFile(uint16 num, void *buffer) {
int32 size = PLE32(&file->size);
int32 offs = PLE32(&file->offs);
debug("* Loading resource %d (%s) at 0x%X, %d bytes", num, file->name, offs, size);
- CLFile_SetPosition(h_bigfile, fsFromStart, offs);
+ h_bigfile.seek(offs, SEEK_SET);
h_bigfile.read(buffer, size);
}
@@ -4699,7 +4699,7 @@ void EdenGame::shnmfl(uint16 num) {
int size = PLE32(&file->size);
int offs = PLE32(&file->offs);
debug("* Loading movie %d (%s) at 0x%X, %d bytes", num, file->name, (uint)offs, size);
- CLHNM_SetPosIntoFile(_hnmContext, offs);
+ _hnmContext->_file->seek(offs, SEEK_SET);
}
int EdenGame::ssndfl(uint16 num) {
@@ -4717,7 +4717,8 @@ int EdenGame::ssndfl(uint16 num) {
voiceSamplesBuffer = malloc(size);
_soundAllocated = true;
}
- CLFile_SetPosition(h_bigfile, 1, offs);
+
+ h_bigfile.seek(offs, SEEK_SET);
//For PC loaded data is a VOC file, on Mac version this is a raw samples
if (_vm->getPlatform() == Common::kPlatformMacintosh)
h_bigfile.read(voiceSamplesBuffer, size);
@@ -4855,7 +4856,7 @@ void EdenGame::loadpartoffile(uint16 num, void *buffer, int32 pos, int32 len) {
pakfile_t *file = &bigfile_header->files[num];
int32 offs = PLE32(&file->offs);
debug("* Loading partial resource %d (%s) at 0x%X(+0x%X), %d bytes", num, file->name, offs, pos, len);
- CLFile_SetPosition(h_bigfile, 1, offs + pos);
+ h_bigfile.seek(offs + pos, SEEK_SET);
h_bigfile.read(buffer, len);
}
@@ -6491,7 +6492,7 @@ int EdenGame::loadmusicfile(int16 num) {
pakfile_t *file = &bigfile_header->files[num + 435];
int32 size = PLE32(&file->size);
int32 offs = PLE32(&file->offs);
- CLFile_SetPosition(h_bigfile, 1, offs);
+ h_bigfile.seek(offs, SEEK_SET);
int32 numread = size;
if (numread > 0x140000) //TODO: const
numread = 0x140000;