mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-07 10:48:43 +00:00
DREAMWEB: Move 'readKey' from dreamgen
This commit is contained in:
parent
98d3a6cc88
commit
d4646c335a
@ -98,6 +98,7 @@ p = parser(skip_binary_data = [
|
|||||||
'monitorfile22',
|
'monitorfile22',
|
||||||
'monitorfile23',
|
'monitorfile23',
|
||||||
'monitorfile24',
|
'monitorfile24',
|
||||||
|
'introtextfile',
|
||||||
])
|
])
|
||||||
p.strip_path = 3
|
p.strip_path = 3
|
||||||
context = p.parse('dreamweb/dreamweb.asm')
|
context = p.parse('dreamweb/dreamweb.asm')
|
||||||
@ -475,6 +476,7 @@ generator = cpp(context, "DreamGen", blacklist = [
|
|||||||
], skip_output = [
|
], skip_output = [
|
||||||
# These functions are processed but not output
|
# These functions are processed but not output
|
||||||
'dreamweb',
|
'dreamweb',
|
||||||
|
'readkey',
|
||||||
], skip_dispatch_call = True, skip_addr_constants = True,
|
], skip_dispatch_call = True, skip_addr_constants = True,
|
||||||
header_omit_blacklisted = True,
|
header_omit_blacklisted = True,
|
||||||
function_name_remapping = {
|
function_name_remapping = {
|
||||||
|
@ -11096,24 +11096,6 @@ _tmp1:
|
|||||||
multiGet();
|
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() {
|
void DreamGenContext::getRidOfReels() {
|
||||||
STACK_CHECK;
|
STACK_CHECK;
|
||||||
_cmp(data.byte(kRoomloaded), 0);
|
_cmp(data.byte(kRoomloaded), 0);
|
||||||
|
@ -3056,6 +3056,23 @@ void DreamGenContext::atmospheres() {
|
|||||||
cancelCh0();
|
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 */
|
} /*namespace dreamgen */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user