aboutsummaryrefslogtreecommitdiff
path: root/engines/cryo
diff options
context:
space:
mode:
Diffstat (limited to 'engines/cryo')
-rw-r--r--engines/cryo/cryolib.cpp2
-rw-r--r--engines/cryo/cryolib.h54
-rw-r--r--engines/cryo/sound.cpp4
-rw-r--r--engines/cryo/video.cpp6
4 files changed, 29 insertions, 37 deletions
diff --git a/engines/cryo/cryolib.cpp b/engines/cryo/cryolib.cpp
index 33fc6f08e5..dbc279f969 100644
--- a/engines/cryo/cryolib.cpp
+++ b/engines/cryo/cryolib.cpp
@@ -346,7 +346,7 @@ void CLSound_PrepareSample(sound_t *sound, int16 mode) {
sound->_locked = 0;
sound->_loopTimes = 0;
sound->_reversed = false;
- sound->ff_32 = 0;
+ sound->_unused32 = 0;
sound->_volume = 255;
}
diff --git a/engines/cryo/cryolib.h b/engines/cryo/cryolib.h
index 2f45e3a49e..051e06b703 100644
--- a/engines/cryo/cryolib.h
+++ b/engines/cryo/cryolib.h
@@ -34,7 +34,7 @@ class CryoEngine;
#define SW16(n) ( (((n) & 0xFF) << 8) | (((n) >> 8) & 0xFF) )
#define SW32(n) ( (((n) & 0xFF) << 24) | (((n) >> 24) & 0xFF) | (((n) & 0xFF00) << 8) | (((n) >> 8) & 0xFF00))
-#if 0
+#ifdef SCUMM_BIG_ENDIAN
//big-endian host
#define LE16(n) SW16(n)
#define LE32(n) SW32(n)
@@ -118,8 +118,8 @@ typedef struct HNMHeader HNMHeader;
#pragma pack(pop)
struct hnm_t {
- int _frameNum;
- int ff_4;
+ int _frameNum;
+ int _unused04;
Common::File *_file;
HNMHeader _header;
byte *tmpBuffer[2];
@@ -128,52 +128,44 @@ struct hnm_t {
byte *_oldFrameBuffer;
byte *_readBuffer;
byte *_dataPtr;
- color_t _palette[256];
-
- bool _canLoop;
- int16 ff_896;
- int16 _chunkId;
- int _totalRead;
+ color_t _palette[256];
+ bool _canLoop;
+ int16 _unused896;
+ int16 _chunkId;
+ int _totalRead;
};
typedef struct hnm_t hnm_t;
struct sound_t {
- char *sndHandle;
- int16 _headerLen;
+ char *_sndHandle;
+ int16 _headerLen;
int32 _headerOffset;
- int16 ff_A;
-
- char *_buffer;
- int ff_16;
- int16 _maxLength;
- float _rate;
- int16 _sampleSize;
- int _length;
- int16 _mode;
+ int16 _unused0A;
+
+ char *_buffer;
+ int _unused16;
+ int16 _maxLength;
+ float _rate;
+ int16 _sampleSize;
+ int _length;
+ int16 _mode;
volatile int16 _locked;
- int32 _loopStart;
- int16 _loopTimes;
+ int32 _loopStart;
+ int16 _loopTimes;
bool _reversed;
- int16 ff_32;
- int16 _volume;
+ int16 _unused32;
+ int16 _volume;
};
-typedef struct sound_t sound_t;
#define kCryoMaxChSounds 10
struct soundchannel_t {
- Audio::SoundHandle ch;
- int xx;
-
int16 _volumeLeft;
int16 _volumeRight;
int16 _numSounds;
sound_t *_sounds[kCryoMaxChSounds];
-
- int16 ff_536;
};
-typedef struct soundchannel_t soundchannel_t;
sound_t *CLSoundRaw_New(int16 length, float rate, int16 sampleSize, int16 mode);
void CLSoundRaw_Free(sound_t *sound);
diff --git a/engines/cryo/sound.cpp b/engines/cryo/sound.cpp
index 9e3a6ae695..2a262125fb 100644
--- a/engines/cryo/sound.cpp
+++ b/engines/cryo/sound.cpp
@@ -102,7 +102,7 @@ void *SoundGroup::getNextBuffer() {
sound_t *sound = _sounds[_soundIndex];
if (_forceWait)
while (sound->_locked) ;
- return sound->sndHandle + sound->_headerLen;
+ return sound->_sndHandle + sound->_headerLen;
}
// Original name: CLSoundGroup_AssignDatas
@@ -140,7 +140,7 @@ bool SoundGroup::setDatas(void *data, int length, bool isSigned) {
else if (sound->_locked)
return false;
- void *buffer = sound->sndHandle + sound->_headerLen;
+ void *buffer = sound->_sndHandle + sound->_headerLen;
sound->_buffer = (char *)buffer;
memcpy(buffer, data, length);
CLSound_SetLength(sound, length);
diff --git a/engines/cryo/video.cpp b/engines/cryo/video.cpp
index f76da76f60..104620466b 100644
--- a/engines/cryo/video.cpp
+++ b/engines/cryo/video.cpp
@@ -55,13 +55,13 @@ hnm_t *HnmPlayer::resetInternals() {
hnm_t *hnm = (hnm_t *)malloc(sizeof(*hnm));
hnm->_frameNum = 0;
- hnm->ff_4 = 0;
+ hnm->_unused04 = 0;
hnm->_file = nullptr;
hnm->tmpBuffer[0] = nullptr;
hnm->tmpBuffer[1] = nullptr;
hnm->finalBuffer = nullptr;
hnm->_readBuffer = nullptr;
- hnm->ff_896 = 0;
+ hnm->_unused896 = 0;
hnm->_totalRead = 0;
for (int i = 0; i < 256; i++) {
hnm->_palette[i].a = 0;
@@ -92,7 +92,7 @@ void HnmPlayer::resetInternalTimer() {
// Original name: CLHNM_Reset
void HnmPlayer::reset(hnm_t *hnm) {
hnm->_frameNum = 0;
- hnm->ff_4 = 0;
+ hnm->_unused04 = 0;
hnm->_totalRead = 0;
_soundStarted = false;
_pendingSounds = 0;