From d4646c335a06fc91e45c690667ed109d14286af3 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Sun, 4 Dec 2011 10:01:37 +0100 Subject: DREAMWEB: Move 'readKey' from dreamgen --- engines/dreamweb/dreamgen.cpp | 18 ------------------ engines/dreamweb/stubs.cpp | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 18 deletions(-) (limited to 'engines') diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 9596090f86..26080eab41 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -11096,24 +11096,6 @@ _tmp1: multiGet(); } -void DreamGenContext::readKey() { - STACK_CHECK; - bx = data.word(kBufferout); - _cmp(bx, data.word(kBufferin)); - if (flags.z()) - goto nokey; - _inc(bx); - _and(bx, 15); - data.word(kBufferout) = bx; - di = offset_keybuffer; - _add(di, bx); - al = cs.byte(di); - data.byte(kCurrentkey) = al; - return; -nokey: - data.byte(kCurrentkey) = 0; -} - void DreamGenContext::getRidOfReels() { STACK_CHECK; _cmp(data.byte(kRoomloaded), 0); diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index f671bfdd22..92053ca5af 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -3056,6 +3056,23 @@ void DreamGenContext::atmospheres() { cancelCh0(); } +void DreamGenContext::readKey() { + STACK_CHECK; + bx = data.word(kBufferout); + _cmp(bx, data.word(kBufferin)); + if (flags.z()) + goto nokey; + _inc(bx); + _and(bx, 15); + data.word(kBufferout) = bx; + di = offset_keybuffer; + _add(di, bx); + al = cs.byte(di); + data.byte(kCurrentkey) = al; + return; +nokey: + data.byte(kCurrentkey) = 0; +} } /*namespace dreamgen */ -- cgit v1.2.3