Remove sl_retFar2

In System39.exe `%0` drops stack frames for label calls (Rance4 v2
relies on this behavior), so it's the same as `UD 1`.
This commit is contained in:
kichikuou
2023-02-10 20:56:53 +09:00
parent 8087d11b2b
commit 47e7f5542e
3 changed files with 1 additions and 28 deletions
+1 -1
View File
@@ -55,7 +55,7 @@ void commandUD() {
case 0:
sl_reinit(); break;
case 1:
sl_retFar2(); break;
sl_retFar(); break;
default:
WARNING("UnKnown UD command %d", mode);
}
-26
View File
@@ -269,32 +269,6 @@ void sl_retFar(void) {
int *tmp = sl_pop();
int page, index;
while (*tmp != STACK_FARJMP) {
if (*tmp == STACK_NEARJMP) {
WARNING("Stack buffer is illegal");
} else if (*tmp == STACK_TXXSTATE) {
popState(tmp);
} else if (*tmp == STACK_VARIABLE) {
popVars(tmp);
} else {
SYSERROR("Stack buffer is illegal");
}
free(tmp);
tmp = sl_pop();
}
page = *(tmp + 2);
index = *(tmp + 3);
free(tmp);
sl_jmpFar2(page, index);
pageCallCnt--;
}
/* UD 1 */
void sl_retFar2(void) {
int *tmp = sl_pop();
int page, index;
while (*tmp != STACK_FARJMP) {
if (*tmp == STACK_NEARJMP) {
labelCallCnt--;
-1
View File
@@ -68,7 +68,6 @@ void sl_retNear(void);
void sl_callFar(int page);
void sl_callFar2(int page, int address);
void sl_retFar(void);
void sl_retFar2(void);
void sl_clearStack(bool restore);
void sl_dropLabelCalls(int cnt);
void sl_dropPageCalls(int cnt);