diff options
author | Willem Jan Palenstijn | 2011-11-16 23:08:55 +0100 |
---|---|---|
committer | Willem Jan Palenstijn | 2011-11-16 23:27:48 +0100 |
commit | 402e44f97c60ed462cdc16d6713bb87848cd7c66 (patch) | |
tree | 2288240d882a827acdcf2f0ff118133ccb4030a9 /engines/dreamweb | |
parent | 80092965c7d00a17aec924d9fb380ab3c1187767 (diff) | |
download | scummvm-rg350-402e44f97c60ed462cdc16d6713bb87848cd7c66.tar.gz scummvm-rg350-402e44f97c60ed462cdc16d6713bb87848cd7c66.tar.bz2 scummvm-rg350-402e44f97c60ed462cdc16d6713bb87848cd7c66.zip |
DREAMWEB: Convert 'loadroomssample'
Diffstat (limited to 'engines/dreamweb')
-rw-r--r-- | engines/dreamweb/stubs.cpp | 25 |
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(); } |