From 0d852659313dd2adcdae74956b6b6bfa4da71514 Mon Sep 17 00:00:00 2001 From: nmlgc Date: Fri, 11 Nov 2022 21:08:46 +0100 Subject: [PATCH] [Decompilation] [th03/th04/th05] Cutscenes: 3-digit number parsing Used for all ASCII number parameters to script functions, as well as for TH04's dialog script. Part of P0224, funded by Splashman and -Tom-. --- ReC98.inc | 1 - th03/cutscene/cutscene.cpp | 16 ++++ th03/math/str_val.hpp | 35 ++++++++ th03_mainl.asm | 164 +++++------------------------------- th04_main.asm | 3 + th04_maine.asm | 164 +++++------------------------------- th05_maine.asm | 168 ++++++------------------------------- 7 files changed, 124 insertions(+), 427 deletions(-) create mode 100644 th03/math/str_val.hpp diff --git a/ReC98.inc b/ReC98.inc index e776a1d0..b5670e2f 100644 --- a/ReC98.inc +++ b/ReC98.inc @@ -7,7 +7,6 @@ LDATA = @DataSize dPtrSize = (@DataSize + 1) * 2 ; ctype character classes -_IS_DIG = 02h _IS_CTL = 20h include libs/master.lib/func.inc diff --git a/th03/cutscene/cutscene.cpp b/th03/cutscene/cutscene.cpp index 755c794d..e2edabaa 100644 --- a/th03/cutscene/cutscene.cpp +++ b/th03/cutscene/cutscene.cpp @@ -11,6 +11,7 @@ #include "planar.h" #include "shiftjis.hpp" #include "master.hpp" +#include "th03/math/str_val.hpp" extern "C" { #include "th02/hardware/frmdelay.h" #if (GAME == 5) @@ -262,3 +263,18 @@ bool16 pascal near cutscene_script_load(const char* fn) box_bg_loop(box_bg_put_func); } #endif + +void pascal near script_number_param_read_first(int& ret) +{ + str_consume_up_to_3_digits(&ret, script_p, script_number_param_default); +} + +void pascal near script_number_param_read_second(int& ret) +{ + if(*script_p == ',') { + script_p++; + script_number_param_read_first(ret); + } else { + ret = script_number_param_default; + } +} diff --git a/th03/math/str_val.hpp b/th03/math/str_val.hpp new file mode 100644 index 00000000..72c9eae2 --- /dev/null +++ b/th03/math/str_val.hpp @@ -0,0 +1,35 @@ +// ZUN bloat: At 257 bytes of static data, [_ctype] might be a rather heavy +// dependency for three digit checks. It's also *technically* wrong, as the +// functions are affected by the current locale (see section 7.4.2 +// of the C standard), whereas the subsequent conversion is hardcoded as a +// single subtraction from an ASCII '0'. +#include + +// Code generation… PORTERS: Remove. +#if defined(__TURBOC__) && defined(__MSDOS__) + #undef _IS_DIG + static const unsigned char _IS_DIG = 2; +#endif + +// Reads up to 3 number digits from [p] and writes the resulting 3-digit number +// to [ret]. If [p] does not point to any digit, [default_value] is written to +// [ret] instead. +template inline void str_consume_up_to_3_digits( + int*& ret, T& p, const int& default_value +) { + unsigned char c0 = *(p++); + unsigned char c1 = *(p++); + unsigned char c2 = *(p++); + if(!isdigit(c0)) { + *ret = default_value; + p -= 3; + } else if(!isdigit(c1)) { + *ret = (c0 - '0'); + p -= 2; + } else if(!isdigit(c2)) { + *ret = (((c0 - '0') * 10) + c1 - '0'); + p -= 1; + } else { + *ret = (((c0 - '0') * 100) + ((c1 - '0') * 10) + (c2 - '0')); + } +} diff --git a/th03_mainl.asm b/th03_mainl.asm index f3073335..dfa51e3b 100644 --- a/th03_mainl.asm +++ b/th03_mainl.asm @@ -1206,132 +1206,14 @@ sub_9F8D endp @box_bg_allocate_and_snap$qv procdesc pascal near @box_bg_free$qv procdesc pascal near @box_bg_put$qv procdesc pascal near + @SCRIPT_NUMBER_PARAM_READ_FIRST$QMI procdesc pascal near \ + ret:dword + @SCRIPT_NUMBER_PARAM_READ_SECOND$QMI procdesc pascal near \ + ret:dword CUTSCENE_TEXT ends mainl_01_TEXT segment byte public 'CODE' use16 -; =============== S U B R O U T I N E ======================================= - -; Attributes: bp-based frame - -sub_A50A proc near - -var_2 = byte ptr -2 -var_1 = byte ptr -1 -arg_0 = dword ptr 4 - - enter 2, 0 - les bx, _script - mov cl, es:[bx] - inc word ptr _script - les bx, _script - mov al, es:[bx] - mov [bp+var_1], al - inc word ptr _script - les bx, _script - mov al, es:[bx] - mov [bp+var_2], al - inc word ptr _script - mov al, cl - mov ah, 0 - mov bx, ax - test (__ctype + 1)[bx], _IS_DIG - jnz short loc_A554 - les bx, [bp+arg_0] - mov ax, _script_number_param_default - mov es:[bx], ax - sub word ptr _script, 3 - leave - retn 4 -; --------------------------------------------------------------------------- - -loc_A554: - mov al, [bp+var_1] - mov ah, 0 - mov bx, ax - test (__ctype + 1)[bx], _IS_DIG - jnz short loc_A578 - mov al, cl - mov ah, 0 - add ax, 0FFD0h - les bx, [bp+arg_0] - mov es:[bx], ax - sub word ptr _script, 2 - leave - retn 4 -; --------------------------------------------------------------------------- - -loc_A578: - mov al, [bp+var_2] - mov ah, 0 - mov bx, ax - test (__ctype + 1)[bx], _IS_DIG - jnz short loc_A5A8 - mov al, cl - mov ah, 0 - add ax, 0FFD0h - imul ax, 0Ah - mov dl, [bp+var_1] - mov dh, 0 - add ax, dx - add ax, 0FFD0h - les bx, [bp+arg_0] - mov es:[bx], ax - dec word ptr _script - leave - retn 4 -; --------------------------------------------------------------------------- - -loc_A5A8: - mov al, cl - mov ah, 0 - add ax, 0FFD0h - imul ax, 64h - mov dl, [bp+var_1] - mov dh, 0 - add dx, 0FFD0h - imul dx, 0Ah - add ax, dx - mov dl, [bp+var_2] - mov dh, 0 - add ax, dx - add ax, 0FFD0h - les bx, [bp+arg_0] - mov es:[bx], ax - leave - retn 4 -sub_A50A endp - - -; =============== S U B R O U T I N E ======================================= - -; Attributes: bp-based frame - -sub_A5D3 proc near - -arg_0 = dword ptr 4 - - push bp - mov bp, sp - les bx, _script - cmp byte ptr es:[bx], ',' - jnz short loc_A5EF - inc word ptr _script - pushd [bp+arg_0] - call sub_A50A - pop bp - retn 4 -; --------------------------------------------------------------------------- - -loc_A5EF: - les bx, [bp+arg_0] - mov ax, _script_number_param_default - mov es:[bx], ax - pop bp - retn 4 -sub_A5D3 endp - - ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame @@ -1417,7 +1299,7 @@ loc_A695: push ss lea ax, [bp+var_2] push ax - call sub_A50A + call @script_number_param_read_first$qmi cmp _fast_forward, 0 jnz short loc_A6C8 call input_wait_for_change pascal, [bp+var_2] @@ -1442,7 +1324,7 @@ loc_A6E9: push ss lea ax, [bp+var_2] push ax - call sub_A50A + call @script_number_param_read_first$qmi mov al, byte ptr [bp+var_2] mov _text_col, al jmp loc_AC1E ; default @@ -1453,7 +1335,7 @@ loc_A700: push ss lea ax, [bp+var_2] push ax - call sub_A50A + call @script_number_param_read_first$qmi mov bx, [bp+var_2] cmp bx, 3 ja loc_AC1E ; default @@ -1499,7 +1381,7 @@ loc_A75E: push ss lea ax, [bp+var_2] push ax - call sub_A50A + call @script_number_param_read_first$qmi cmp [bp+arg_0], 'i' jnz short loc_A781 push [bp+var_2] @@ -1525,7 +1407,7 @@ loc_A7A2: push ss lea ax, [bp+var_2] push ax - call sub_A50A + call @script_number_param_read_first$qmi cmp _fast_forward, 0 jnz loc_AC1E ; default cmp [bp+arg_0], 'k' @@ -1553,11 +1435,11 @@ loc_A7E7: push ss lea ax, [bp+var_2] push ax - call sub_A50A + call @script_number_param_read_first$qmi push ss lea ax, [bp+var_4] push ax - call sub_A5D3 + call @script_number_param_read_second$qmi cmp _fast_forward, 0 jnz loc_AC1E ; default cmp [bp+arg_0], 'k' @@ -1581,7 +1463,7 @@ loc_A822: push ss lea ax, [bp+var_2] push ax - call sub_A50A + call @script_number_param_read_first$qmi mov ax, [bp+var_2] mov _text_interval, ax jmp loc_AC1E ; default @@ -1593,7 +1475,7 @@ loc_A843: push ss lea ax, [bp+var_2] push ax - call sub_A50A + call @script_number_param_read_first$qmi graph_showpage byte ptr [bp+var_2] jmp loc_AC1E ; default ; --------------------------------------------------------------------------- @@ -1603,7 +1485,7 @@ loc_A85F: push ss lea ax, [bp+var_2] push ax - call sub_A50A + call @script_number_param_read_first$qmi cmp _fast_forward, 0 jnz short loc_A87B push 1 @@ -1633,7 +1515,7 @@ loc_A8A7: push ss lea ax, [bp+var_2] push ax - call sub_A50A + call @script_number_param_read_first$qmi cmp [bp+arg_0], 'i' jnz short loc_A8CA push [bp+var_2] @@ -1653,7 +1535,7 @@ loc_A8D5: push ss lea ax, [bp+var_2] push ax - call sub_A50A + call @script_number_param_read_first$qmi mov ax, [bp+var_2] add ax, 200h push ax @@ -1668,7 +1550,7 @@ loc_A8F1: push ss lea ax, [bp+var_2] push ax - call sub_A50A + call @script_number_param_read_first$qmi mov [bp+var_4], 0 jmp short loc_A933 ; --------------------------------------------------------------------------- @@ -1707,7 +1589,7 @@ loc_A945: push ss lea ax, [bp+var_2] push ax - call sub_A50A + call @script_number_param_read_first$qmi graph_accesspage 1 push _cursor.x push _cursor.y @@ -1735,7 +1617,7 @@ loc_A997: push ss lea ax, [bp+var_2] push ax - call sub_A50A + call @script_number_param_read_first$qmi cmp _fast_forward, 0 jnz loc_AC1E ; default call input_wait_for_change pascal, 0 @@ -1843,7 +1725,7 @@ loc_AAA3: push ss lea ax, [bp+var_2] push ax - call sub_A50A + call @script_number_param_read_first$qmi graph_showpage 1 graph_accesspage 0 cmp [bp+var_2], 4 @@ -1863,12 +1745,12 @@ loc_AAF8: push ss lea ax, [bp+var_2] push ax - call sub_A50A + call @script_number_param_read_first$qmi mov _script_number_param_default, 1 push ss lea ax, [bp+var_4] push ax - call sub_A5D3 + call @script_number_param_read_second$qmi xor si, si jmp short loc_AB33 ; --------------------------------------------------------------------------- @@ -1974,7 +1856,7 @@ loc_ABFE: push ss ; jumptable 0000A67C case 101 lea ax, [bp+var_2] push ax - call sub_A50A + call @script_number_param_read_first$qmi call _snd_se_reset call snd_se_play pascal, [bp+var_2] call _snd_se_update diff --git a/th04_main.asm b/th04_main.asm index 2955af9b..b10beba2 100644 --- a/th04_main.asm +++ b/th04_main.asm @@ -2241,6 +2241,9 @@ include th04/main/dialog/box_fade_in.asm ; =============== S U B R O U T I N E ======================================= +; A version of str_parse_up_to_3_digits_and_advance(). +_IS_DIG = 02h + ; Attributes: bp-based frame sub_D0CA proc near diff --git a/th04_maine.asm b/th04_maine.asm index a044bbef..d15b09bd 100644 --- a/th04_maine.asm +++ b/th04_maine.asm @@ -343,132 +343,14 @@ _main endp @box_bg_allocate_and_snap$qv procdesc pascal near @box_bg_free$qv procdesc pascal near @box_bg_put$qv procdesc pascal near + @SCRIPT_NUMBER_PARAM_READ_FIRST$QMI procdesc pascal near \ + ret:dword + @SCRIPT_NUMBER_PARAM_READ_SECOND$QMI procdesc pascal near \ + ret:dword CUTSCENE_TEXT ends maine_01_TEXT segment byte public 'CODE' use16 -; =============== S U B R O U T I N E ======================================= - -; Attributes: bp-based frame - -sub_A64D proc near - -var_2 = byte ptr -2 -var_1 = byte ptr -1 -arg_0 = dword ptr 4 - - enter 2, 0 - mov bx, _script_p - mov cl, [bx] - inc _script_p - mov bx, _script_p - mov al, [bx] - mov [bp+var_1], al - inc _script_p - mov bx, _script_p - mov al, [bx] - mov [bp+var_2], al - inc _script_p - mov al, cl - mov ah, 0 - mov bx, ax - test (__ctype + 1)[bx], _IS_DIG - jnz short loc_A694 - les bx, [bp+arg_0] - mov ax, _script_number_param_default - mov es:[bx], ax - sub _script_p, 3 - leave - retn 4 -; --------------------------------------------------------------------------- - -loc_A694: - mov al, [bp+var_1] - mov ah, 0 - mov bx, ax - test (__ctype + 1)[bx], _IS_DIG - jnz short loc_A6B8 - mov al, cl - mov ah, 0 - add ax, 0FFD0h - les bx, [bp+arg_0] - mov es:[bx], ax - sub _script_p, 2 - leave - retn 4 -; --------------------------------------------------------------------------- - -loc_A6B8: - mov al, [bp+var_2] - mov ah, 0 - mov bx, ax - test (__ctype + 1)[bx], _IS_DIG - jnz short loc_A6E8 - mov al, cl - mov ah, 0 - add ax, 0FFD0h - imul ax, 0Ah - mov dl, [bp+var_1] - mov dh, 0 - add ax, dx - add ax, 0FFD0h - les bx, [bp+arg_0] - mov es:[bx], ax - dec _script_p - leave - retn 4 -; --------------------------------------------------------------------------- - -loc_A6E8: - mov al, cl - mov ah, 0 - add ax, 0FFD0h - imul ax, 64h - mov dl, [bp+var_1] - mov dh, 0 - add dx, 0FFD0h - imul dx, 0Ah - add ax, dx - mov dl, [bp+var_2] - mov dh, 0 - add ax, dx - add ax, 0FFD0h - les bx, [bp+arg_0] - mov es:[bx], ax - leave - retn 4 -sub_A64D endp - - -; =============== S U B R O U T I N E ======================================= - -; Attributes: bp-based frame - -sub_A713 proc near - -arg_0 = dword ptr 4 - - push bp - mov bp, sp - mov bx, _script_p - cmp byte ptr [bx], ',' - jnz short loc_A72E - inc _script_p - pushd [bp+arg_0] - call sub_A64D - pop bp - retn 4 -; --------------------------------------------------------------------------- - -loc_A72E: - les bx, [bp+arg_0] - mov ax, _script_number_param_default - mov es:[bx], ax - pop bp - retn 4 -sub_A713 endp - - ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame @@ -559,7 +441,7 @@ loc_A88F: push ss lea ax, [bp+var_2] push ax - call sub_A64D + call @script_number_param_read_first$qmi cmp _fast_forward, 0 jnz short loc_A8C4 call input_wait_for_change pascal, [bp+var_2] @@ -584,7 +466,7 @@ loc_A8E5: push ss lea ax, [bp+var_2] push ax - call sub_A64D + call @script_number_param_read_first$qmi mov al, byte ptr [bp+var_2] mov _text_col, al jmp loc_ADB5 ; default @@ -595,7 +477,7 @@ loc_A8FC: push ss lea ax, [bp+var_2] push ax - call sub_A64D + call @script_number_param_read_first$qmi mov ax, [bp+var_2] mov _graph_putsa_fx_func, ax jmp loc_ADB5 ; default @@ -620,7 +502,7 @@ loc_A931: push ss lea ax, [bp+var_2] push ax - call sub_A64D + call @script_number_param_read_first$qmi cmp [bp+arg_0], 'i' jnz short loc_A954 push [bp+var_2] @@ -647,7 +529,7 @@ loc_A978: push ss lea ax, [bp+var_2] push ax - call sub_A64D + call @script_number_param_read_first$qmi cmp _fast_forward, 0 jnz loc_ADB5 ; default push [bp+var_2] @@ -668,11 +550,11 @@ loc_A9AB: push ss lea ax, [bp+var_2] push ax - call sub_A64D + call @script_number_param_read_first$qmi push ss lea ax, [bp+var_4] push ax - call sub_A713 + call @script_number_param_read_second$qmi cmp _fast_forward, 0 jnz loc_ADB5 ; default push [bp+var_2] @@ -689,7 +571,7 @@ loc_A9D2: push ss lea ax, [bp+var_2] push ax - call sub_A64D + call @script_number_param_read_first$qmi mov ax, [bp+var_2] mov _text_interval, ax jmp loc_ADB5 ; default @@ -701,7 +583,7 @@ loc_A9F2: push ss lea ax, [bp+var_2] push ax - call sub_A64D + call @script_number_param_read_first$qmi graph_showpage byte ptr [bp+var_2] jmp loc_ADB5 ; default ; --------------------------------------------------------------------------- @@ -711,7 +593,7 @@ loc_AA0E: push ss lea ax, [bp+var_2] push ax - call sub_A64D + call @script_number_param_read_first$qmi cmp _fast_forward, 0 jnz short loc_AA2A push 1 @@ -741,7 +623,7 @@ loc_AA55: push ss lea ax, [bp+var_2] push ax - call sub_A64D + call @script_number_param_read_first$qmi cmp [bp+arg_0], 'i' jnz short loc_AA78 push [bp+var_2] @@ -761,7 +643,7 @@ loc_AA83: push ss lea ax, [bp+var_2] push ax - call sub_A64D + call @script_number_param_read_first$qmi mov ax, [bp+var_2] add ax, 200h push ax @@ -776,7 +658,7 @@ loc_AA9F: push ss lea ax, [bp+var_2] push ax - call sub_A64D + call @script_number_param_read_first$qmi mov [bp+var_4], 0 jmp short loc_AAE0 ; --------------------------------------------------------------------------- @@ -815,7 +697,7 @@ loc_AAF2: push ss lea ax, [bp+var_2] push ax - call sub_A64D + call @script_number_param_read_first$qmi graph_accesspage 1 push _cursor.x push _cursor.y @@ -833,7 +715,7 @@ loc_AB26: push ss lea ax, [bp+var_2] push ax - call sub_A64D + call @script_number_param_read_first$qmi cmp _fast_forward, 0 jnz loc_ADB5 ; default call input_wait_for_change pascal, [bp+var_2] @@ -942,7 +824,7 @@ loc_AC3F: push ss lea ax, [bp+var_2] push ax - call sub_A64D + call @script_number_param_read_first$qmi graph_showpage 1 graph_accesspage 0 cmp [bp+var_2], 4 @@ -962,12 +844,12 @@ loc_AC94: push ss lea ax, [bp+var_2] push ax - call sub_A64D + call @script_number_param_read_first$qmi mov _script_number_param_default, 1 push ss lea ax, [bp+var_4] push ax - call sub_A713 + call @script_number_param_read_second$qmi xor si, si jmp short loc_ACCF ; --------------------------------------------------------------------------- @@ -1079,7 +961,7 @@ loc_AD95: push ss ; jumptable 0000A876 case 101 lea ax, [bp+var_2] push ax - call sub_A64D + call @script_number_param_read_first$qmi call _snd_se_reset call snd_se_play pascal, [bp+var_2] call _snd_se_update diff --git a/th05_maine.asm b/th05_maine.asm index 2d38edf2..7edc7c92 100644 --- a/th05_maine.asm +++ b/th05_maine.asm @@ -305,134 +305,14 @@ _main endp fn:dword @PIC_PUT_BOTH_MASKED$QIIII procdesc pascal near \ left_and_top:dword, quarter:word, mask_id:word + @SCRIPT_NUMBER_PARAM_READ_FIRST$QMI procdesc pascal near \ + ret:dword + @SCRIPT_NUMBER_PARAM_READ_SECOND$QMI procdesc pascal near \ + ret:dword CUTSCENE_TEXT ends maine_01_TEXT segment byte public 'CODE' use16 -; =============== S U B R O U T I N E ======================================= - -; Attributes: bp-based frame - -sub_A738 proc near - -var_2 = byte ptr -2 -var_1 = byte ptr -1 -arg_0 = dword ptr 4 - - enter 2, 0 - mov bx, _script_p - mov cl, [bx] - inc _script_p - mov bx, _script_p - mov al, [bx] - mov [bp+var_1], al - inc _script_p - mov bx, _script_p - mov al, [bx] - mov [bp+var_2], al - inc _script_p - mov al, cl - mov ah, 0 - mov bx, ax - test (__ctype + 1)[bx], _IS_DIG - jnz short loc_A77F - les bx, [bp+arg_0] - mov ax, _script_number_param_default - mov es:[bx], ax - sub _script_p, 3 - leave - retn 4 -; --------------------------------------------------------------------------- - -loc_A77F: - mov al, [bp+var_1] - mov ah, 0 - mov bx, ax - test (__ctype + 1)[bx], _IS_DIG - jnz short loc_A7A3 - mov al, cl - mov ah, 0 - add ax, 0FFD0h - les bx, [bp+arg_0] - mov es:[bx], ax - sub _script_p, 2 - leave - retn 4 -; --------------------------------------------------------------------------- - -loc_A7A3: - mov al, [bp+var_2] - mov ah, 0 - mov bx, ax - test (__ctype + 1)[bx], _IS_DIG - jnz short loc_A7D3 - mov al, cl - mov ah, 0 - add ax, 0FFD0h - imul ax, 0Ah - mov dl, [bp+var_1] - mov dh, 0 - add ax, dx - add ax, 0FFD0h - les bx, [bp+arg_0] - mov es:[bx], ax - dec _script_p - leave - retn 4 -; --------------------------------------------------------------------------- - -loc_A7D3: - mov al, cl - mov ah, 0 - add ax, 0FFD0h - imul ax, 64h - mov dl, [bp+var_1] - mov dh, 0 - add dx, 0FFD0h - imul dx, 0Ah - add ax, dx - mov dl, [bp+var_2] - mov dh, 0 - add ax, dx - add ax, 0FFD0h - les bx, [bp+arg_0] - mov es:[bx], ax - leave - retn 4 -sub_A738 endp - - -; =============== S U B R O U T I N E ======================================= - -; Attributes: bp-based frame - -sub_A7FE proc near - -arg_0 = dword ptr 4 - - push bp - mov bp, sp - mov bx, _script_p - cmp byte ptr [bx], ',' - -loc_A808: - jnz short loc_A819 - inc _script_p - pushd [bp+arg_0] - call sub_A738 - pop bp - retn 4 -; --------------------------------------------------------------------------- - -loc_A819: - les bx, [bp+arg_0] - mov ax, _script_number_param_default - mov es:[bx], ax - pop bp - retn 4 -sub_A7FE endp - - ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame @@ -521,7 +401,7 @@ loc_AA0B: push ss lea ax, [bp+var_2] push ax - call sub_A738 + call @script_number_param_read_first$qmi cmp _fast_forward, 0 jnz short loc_AA3E call @box_wait_animate$qi pascal, [bp+var_2] @@ -558,7 +438,7 @@ loc_AA6A: push ss lea ax, [bp+var_2] push ax - call sub_A738 + call @script_number_param_read_first$qmi mov al, byte ptr [bp+var_2] mov _text_col, al jmp loc_AF8F ; default @@ -569,7 +449,7 @@ loc_AA9B: push ss lea ax, [bp+var_2] push ax - call sub_A738 + call @script_number_param_read_first$qmi mov ax, [bp+var_2] mov _graph_putsa_fx_func, ax jmp loc_AF8F ; default @@ -594,7 +474,7 @@ loc_AAD0: push ss lea ax, [bp+var_2] push ax - call sub_A738 + call @script_number_param_read_first$qmi cmp [bp+arg_0], 'i' jnz short loc_AAF3 push [bp+var_2] @@ -621,7 +501,7 @@ loc_AB17: push ss lea ax, [bp+var_2] push ax - call sub_A738 + call @script_number_param_read_first$qmi cmp _fast_forward, 0 jnz loc_AF8F ; default push [bp+var_2] @@ -642,11 +522,11 @@ loc_AB4A: push ss lea ax, [bp+var_2] push ax - call sub_A738 + call @script_number_param_read_first$qmi push ss lea ax, [bp+var_4] push ax - call sub_A7FE + call @script_number_param_read_second$qmi cmp _fast_forward, 0 jnz loc_AF8F ; default call snd_delay_until_measure pascal, [bp+var_2], [bp+var_4] @@ -661,7 +541,7 @@ loc_AB71: push ss lea ax, [bp+var_2] push ax - call sub_A738 + call @script_number_param_read_first$qmi mov ax, [bp+var_2] mov _text_interval, ax jmp loc_AF8F ; default @@ -673,7 +553,7 @@ loc_AB91: push ss lea ax, [bp+var_2] push ax - call sub_A738 + call @script_number_param_read_first$qmi mov dx, 164 ; Port 00A4h: Page display register mov al, byte ptr [bp+var_2] jmp loc_AA66 @@ -684,7 +564,7 @@ loc_ABAC: push ss lea ax, [bp+var_2] push ax - call sub_A738 + call @script_number_param_read_first$qmi cmp _fast_forward, 0 jnz short loc_ABC8 push 1 @@ -714,7 +594,7 @@ loc_ABF3: push ss lea ax, [bp+var_2] push ax - call sub_A738 + call @script_number_param_read_first$qmi cmp [bp+arg_0], 'i' jnz short loc_AC16 push [bp+var_2] @@ -734,7 +614,7 @@ loc_AC21: push ss lea ax, [bp+var_2] push ax - call sub_A738 + call @script_number_param_read_first$qmi mov ax, [bp+var_2] add ax, (KAJA_SONG_FADE shl 8) push ax @@ -746,7 +626,7 @@ loc_AC3D: push ss lea ax, [bp+var_2] push ax - call sub_A738 + call @script_number_param_read_first$qmi mov [bp+var_4], 0 jmp short loc_AC75 ; --------------------------------------------------------------------------- @@ -785,7 +665,7 @@ loc_AC87: push ss lea ax, [bp+var_2] push ax - call sub_A738 + call @script_number_param_read_first$qmi cmp _fast_forward, 0 jnz loc_AF8F ; default call @box_wait_animate$qi pascal, [bp+var_2] @@ -897,7 +777,7 @@ loc_AD9A: push ss lea ax, [bp+var_2] push ax - call sub_A738 + call @script_number_param_read_first$qmi push 1 call frame_delay graph_showpage 0 @@ -920,14 +800,14 @@ loc_AE07: push ss lea ax, [bp+var_2] push ax - call sub_A738 + call @script_number_param_read_first$qmi mov _script_number_param_default, 1 push ss loc_AE1A: lea ax, [bp+var_4] push ax - call sub_A7FE + call @script_number_param_read_second$qmi xor si, si jmp short loc_AE42 ; --------------------------------------------------------------------------- @@ -1024,7 +904,7 @@ loc_AF18: push ss ; jumptable 0000A9F2 case 101 lea ax, [bp+var_2] push ax - call sub_A738 + call @script_number_param_read_first$qmi call _snd_se_reset call snd_se_play pascal, [bp+var_2] call _snd_se_update @@ -1053,7 +933,7 @@ loc_AF18: push ss lea ax, [bp+var_2] push ax - call sub_A738 + call @script_number_param_read_first$qmi mov al, _colmap_count mov ah, 0 mov dl, byte ptr [bp+var_2] @@ -1235,7 +1115,7 @@ loc_B0E2: push ss lea ax, [bp+@@ch] push ax - call sub_A738 + call @script_number_param_read_first$qmi loc_B0F4: graph_showpage 0