mirror of
https://git.code.sf.net/p/quake/quakeforge-old
synced 2024-11-22 11:51:17 +00:00
Yanster's evil hack for Mega2k support. It IS an evil hack. But it's
also workable until we get progs with 32 bit limits standardized and implemented in our tree. If someone feels psychotic please work on that.
This commit is contained in:
parent
c57298ed75
commit
9d3ffb99f8
1 changed files with 14 additions and 0 deletions
|
@ -418,9 +418,23 @@ void PR_ExecuteProgram (func_t fnum)
|
|||
|
||||
while (1)
|
||||
{
|
||||
int ofsa, ofsb, ofsc;
|
||||
|
||||
s++; // next statement
|
||||
|
||||
st = &pr_statements[s];
|
||||
|
||||
// FIXME: offsets bigger than 32767 result in negative indexes into
|
||||
// pr_globals[]. This is a hack to make the 15 bit limit
|
||||
// temporarily 16 bit in this one case. It should go away
|
||||
// when 32 bit limits are implemented in a new progs.dat
|
||||
// version. (Fix by Yanster)
|
||||
|
||||
if (st->a & 0x8000) ofsa = (int)st->a + 0xFFFF; else ofsa = st->a;
|
||||
if (st->b & 0x8000) ofsb = (int)st->b + 0xFFFF; else ofsb = st->b;
|
||||
if (st->c & 0x8000) ofsc = (int)st->c + 0xFFFF; else ofsc = st->c;
|
||||
// End of Evil Hack
|
||||
|
||||
a = (eval_t *)&pr_globals[st->a];
|
||||
b = (eval_t *)&pr_globals[st->b];
|
||||
c = (eval_t *)&pr_globals[st->c];
|
||||
|
|
Loading…
Reference in a new issue