mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-12 22:51:11 +00:00
CRYO: Remove two setPos functions
This commit is contained in:
parent
91de8658f5
commit
bd9cabd2c9
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user