aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2011-11-16 23:08:55 +0100
committerWillem Jan Palenstijn2011-11-16 23:27:48 +0100
commit402e44f97c60ed462cdc16d6713bb87848cd7c66 (patch)
tree2288240d882a827acdcf2f0ff118133ccb4030a9
parent80092965c7d00a17aec924d9fb380ab3c1187767 (diff)
downloadscummvm-rg350-402e44f97c60ed462cdc16d6713bb87848cd7c66.tar.gz
scummvm-rg350-402e44f97c60ed462cdc16d6713bb87848cd7c66.tar.bz2
scummvm-rg350-402e44f97c60ed462cdc16d6713bb87848cd7c66.zip
DREAMWEB: Convert 'loadroomssample'
-rw-r--r--engines/dreamweb/stubs.cpp25
1 files changed, 9 insertions, 16 deletions
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 2817465251..8c9521745f 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -2055,22 +2055,15 @@ void DreamGenContext::twodigitnum() {
}
void DreamGenContext::loadroomssample() {
- STACK_CHECK;
- al = data.byte(kRoomssample);
- _cmp(al, 255);
- if (flags.z())
- return /* (loadedalready) */;
- _cmp(al, data.byte(kCurrentsample));
- if (flags.z())
- return /* (loadedalready) */;
- data.byte(kCurrentsample) = al;
- al = data.byte(kCurrentsample);
- cl = '0';
- twodigitnum();
- di = 1896;
- _xchg(al, ah);
- cs.word(di+10) = ax;
- dx = di;
+ uint8 sample = data.byte(kRoomssample);
+
+ if (sample == 255 || data.byte(kCurrentsample) == sample)
+ return; // loaded already
+
+ data.byte(kCurrentsample) = sample;
+ cs.byte(kSamplename+10) = '0' + sample / 10;
+ cs.byte(kSamplename+11) = '0' + sample % 10;
+ dx = kSamplename;
loadsecondsample();
}