[gamecode] Add "return pointer" mode to with instruction

This loads the current return pointer into the specified register. No
offset is used (should make that an error, but for now any offset is
simply ignored). This is part of the fix for getting obj_msg_sendv to
work with return values.
This commit is contained in:
Bill Currie 2022-02-05 18:42:54 +09:00
parent 208cba85eb
commit 078f36a871

View file

@ -1989,6 +1989,10 @@ pr_with (progs_t *pr, const dstatement_t *st)
// reset
pr->pr_bases = (pr_uivec4_t) {};
return;
case 11:
// return pointer
*base = pr->pr_return - pr->pr_globals;
return;
}
PR_RunError (pr, "Invalid with index: %u", st->a);
}