aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorThanasis Antoniou2019-07-29 15:09:42 +0300
committerThanasis Antoniou2019-07-29 15:09:42 +0300
commitb939168b6129bc59811846ce522015e546fe14e4 (patch)
tree21ebd1de949408c55ba36a4f7e2fb09c38685386 /engines
parentc8a23cc401ecef6deac468766aba185bf8633db7 (diff)
downloadscummvm-rg350-b939168b6129bc59811846ce522015e546fe14e4.tar.gz
scummvm-rg350-b939168b6129bc59811846ce522015e546fe14e4.tar.bz2
scummvm-rg350-b939168b6129bc59811846ce522015e546fe14e4.zip
BLADERUNNER: Fix compile for AmigaOS
Diffstat (limited to 'engines')
-rw-r--r--engines/bladerunner/ambient_sounds.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/engines/bladerunner/ambient_sounds.cpp b/engines/bladerunner/ambient_sounds.cpp
index 4825a70278..6d2169eaf1 100644
--- a/engines/bladerunner/ambient_sounds.cpp
+++ b/engines/bladerunner/ambient_sounds.cpp
@@ -57,19 +57,19 @@ AmbientSounds::~AmbientSounds() {
delete[] _loopingSounds;
}
-static inline void sort(int &a, int &b) {
- if (a > b) {
- int t = a;
- a = b;
- b = t;
+static inline void sort(int32 *a, int32 *b) {
+ if (*a > *b) {
+ int32 t = *a;
+ *a = *b;
+ *b = t;
}
}
-static inline void sort(uint &a, uint &b) {
- if (a > b) {
- uint t = a;
- a = b;
- b = t;
+static inline void sort(uint32 *a, uint32 *b) {
+ if (*a > *b) {
+ uint32 t = *a;
+ *a = *b;
+ *b = t;
}
}
@@ -83,11 +83,11 @@ void AmbientSounds::addSound(
#if BLADERUNNER_ORIGINAL_BUGS
#else
- sort(timeMin, timeMax);
+ sort(&timeMin, &timeMax);
#endif // BLADERUNNER_ORIGINAL_BUGS
- sort(volumeMin, volumeMax);
- sort(panStartMin, panStartMax);
- sort(panEndMin, panEndMax);
+ sort(&volumeMin, &volumeMax);
+ sort(&panStartMin, &panStartMax);
+ sort(&panEndMin, &panEndMax);
addSoundByName(
_vm->_gameInfo->getSfxTrack(sfxId),
@@ -116,11 +116,11 @@ void AmbientSounds::removeAllNonLoopingSounds(bool stopPlaying) {
void AmbientSounds::addSpeech(int actorId, int sentenceId, uint32 timeMin, uint32 timeMax, int volumeMin, int volumeMax, int panStartMin, int panStartMax, int panEndMin, int panEndMax, int priority, int unk) {
#if BLADERUNNER_ORIGINAL_BUGS
#else
- sort(timeMin, timeMax);
+ sort(&timeMin, &timeMax);
#endif // BLADERUNNER_ORIGINAL_BUGS
- sort(volumeMin, volumeMax);
- sort(panStartMin, panStartMax);
- sort(panEndMin, panEndMax);
+ sort(&volumeMin, &volumeMax);
+ sort(&panStartMin, &panStartMax);
+ sort(&panEndMin, &panEndMax);
Common::String name = Common::String::format( "%02d-%04d%s.AUD", actorId, sentenceId, _vm->_languageCode.c_str());
addSoundByName(name,
@@ -333,10 +333,10 @@ void AmbientSounds::addSoundByName(
#if BLADERUNNER_ORIGINAL_BUGS
#else
- sort(timeMin, timeMax);
- sort(volumeMin, volumeMax);
- sort(panStartMin, panStartMax);
- sort(panEndMin, panEndMax);
+ sort(&timeMin, &timeMax);
+ sort(&volumeMin, &volumeMax);
+ sort(&panStartMin, &panStartMax);
+ sort(&panEndMin, &panEndMax);
#endif // BLADERUNNER_ORIGINAL_BUGS
track.isActive = true;
@@ -442,7 +442,7 @@ void AmbientSounds::load(SaveFileReadStream &f) {
track.nextPlayTimeStart = now;
#if BLADERUNNER_ORIGINAL_BUGS
#else
- sort(track.timeMin, track.timeMax);
+ sort(&(track.timeMin), &(track.timeMax));
#endif // BLADERUNNER_ORIGINAL_BUGS
track.nextPlayTimeDiff = _vm->_rnd.getRandomNumberRng(track.timeMin, track.timeMax);
track.volumeMin = f.readInt();
@@ -454,9 +454,9 @@ void AmbientSounds::load(SaveFileReadStream &f) {
track.panEndMax = f.readInt();
#if BLADERUNNER_ORIGINAL_BUGS
#else
- sort(track.volumeMin, track.volumeMax);
- sort(track.panStartMin, track.panStartMax);
- sort(track.panEndMin, track.panEndMax);
+ sort(&(track.volumeMin), &(track.volumeMax));
+ sort(&(track.panStartMin), &(track.panStartMax));
+ sort(&(track.panEndMin), &(track.panEndMax));
#endif // BLADERUNNER_ORIGINAL_BUGS
track.priority = f.readInt();
f.skip(4); // field_45