[gamecode] Don't check v6p progs for Ruamoko progs

It doesn't end well. For now, the Ruamoko check is just a stub, but I do
plan on doing similar checks.
This commit is contained in:
Bill Currie 2022-01-21 20:31:49 +09:00
parent 79bd4dd724
commit 9199a0ee54
3 changed files with 11 additions and 1 deletions

View file

@ -264,6 +264,7 @@ int PR_RunPostLoadFuncs (progs_t *pr);
\todo should this be elsewhere?
*/
int PR_Check_Opcodes (progs_t *pr);
int PR_Check_v6p_Opcodes (progs_t *pr);
void PR_BoundsCheckSize (progs_t *pr, pr_ptr_t addr, unsigned size);
void PR_BoundsCheck (progs_t *pr, int addr, etype_t type);

View file

@ -61,3 +61,12 @@ PR_Opcode (pr_ushort_t opcode)
opcode &= OP_MASK;
return &pr_opcodes[opcode];
}
int
PR_Check_Opcodes (progs_t *pr)
{
if (pr->progs->version < PROG_VERSION) {
return PR_Check_v6p_Opcodes (pr);
}
return 1;
}

View file

@ -1591,7 +1591,7 @@ error:
}
int
PR_Check_Opcodes (progs_t *pr)
PR_Check_v6p_Opcodes (progs_t *pr)
{
const v6p_opcode_t *op;
dstatement_t *st;