diff options
author | Willem Jan Palenstijn | 2011-11-16 23:09:39 +0100 |
---|---|---|
committer | Willem Jan Palenstijn | 2011-11-16 23:27:48 +0100 |
commit | bcf440aa3fc3f2a87410da6cef36f8fec2d27393 (patch) | |
tree | 9a32aabaf9f6eb2831858b4ac93709d3a96c550d | |
parent | 402e44f97c60ed462cdc16d6713bb87848cd7c66 (diff) | |
download | scummvm-rg350-bcf440aa3fc3f2a87410da6cef36f8fec2d27393.tar.gz scummvm-rg350-bcf440aa3fc3f2a87410da6cef36f8fec2d27393.tar.bz2 scummvm-rg350-bcf440aa3fc3f2a87410da6cef36f8fec2d27393.zip |
DREAMWEB: Remove 'twodigitnum' entirely
-rw-r--r-- | engines/dreamweb/stubs.cpp | 37 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 2 |
2 files changed, 12 insertions, 27 deletions
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index 8c9521745f..f98e069d3a 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -1961,16 +1961,18 @@ void DreamGenContext::showtime() { return; Frame *charset = (Frame *)segRef(data.word(kCharset1)).ptr(0, 0); - uint8 mod1, mod10; - twodigitnum(data.byte(kSecondcount), 0, &mod10, &mod1); - showframe(charset, 282+5, 21, 91*3+10 + mod10, 0); - showframe(charset, 282+9, 21, 91*3+10 + mod1, 0); - twodigitnum(data.byte(kMinutecount), 0, &mod10, &mod1); - showframe(charset, 270+5, 21, 91*3 + mod10, 0); - showframe(charset, 270+11, 21, 91*3 + mod1, 0); - twodigitnum(data.byte(kHourcount), 0, &mod10, &mod1); - showframe(charset, 256+5, 21, 91*3 + mod10, 0); - showframe(charset, 256+11, 21, 91*3 + mod1, 0); + int seconds = data.byte(kSecondcount); + int minutes = data.byte(kMinutecount); + int hours = data.byte(kHourcount); + + showframe(charset, 282+5, 21, 91*3+10 + seconds / 10, 0); + showframe(charset, 282+9, 21, 91*3+10 + seconds % 10, 0); + + showframe(charset, 270+5, 21, 91*3 + minutes / 10, 0); + showframe(charset, 270+11, 21, 91*3 + minutes % 10, 0); + + showframe(charset, 256+5, 21, 91*3 + hours / 10, 0); + showframe(charset, 256+11, 21, 91*3 + hours % 10, 0); showframe(charset, 267+5, 21, 91*3+20, 0); } @@ -2039,21 +2041,6 @@ void DreamGenContext::loadroom() { getdimension(); } -void DreamGenContext::twodigitnum(uint8 num, uint8 baseChar, - uint8 *digit1, uint8 *digit2) { - *digit1 = baseChar + num/10; - *digit2 = baseChar + num%10; -} - -// Convert a number between 0 and 99 into its two digits, either -// ASCII (if cl/basechar == '0'), or raw (if cl/basechar == 0). -void DreamGenContext::twodigitnum() { - uint8 digit1, digit2; - twodigitnum(al, cl, &digit1, &digit2); - ah = digit1; - al = digit2; -} - void DreamGenContext::loadroomssample() { uint8 sample = data.byte(kRoomssample); diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index 09d93d05f8..3fa764f526 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -273,7 +273,5 @@ void putundermenu(); void textformonk(); void textforend(); - void twodigitnum(uint8 num, uint8 baseChar, uint8 *digit1, uint8 *digit2); - void twodigitnum(); void loadroomssample(); |