diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index 0325663f4..11b334878 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -1644,7 +1644,7 @@ static void C_GetNextVarType(int32_t type) textptr++; /// now pointing at 'xxx' C_GetNextLabelName(); - initprintf("found xxx label of '%s'\n", label+(g_numLabels<<6)); + /*initprintf("found xxx label of '%s'\n", label+(g_numLabels<<6));*/ if (i == g_iSpriteVarID) lLabelID=C_GetLabelNameOffset(&actorH,strtolower(label+(g_numLabels<<6),Bstrlen(label+(g_numLabels<<6)))); diff --git a/polymer/eduke32/source/gameexec.c b/polymer/eduke32/source/gameexec.c index 9250dd2d0..3d1fe6f45 100644 --- a/polymer/eduke32/source/gameexec.c +++ b/polymer/eduke32/source/gameexec.c @@ -3909,62 +3909,78 @@ static int32_t X_DoExecute(void) case CON_IFVARVARAND: insptr++; - j=*insptr++; - X_DoConditional(Gv_GetVarX(j) & Gv_GetVarX(*(insptr))); + j=Gv_GetVarX(*insptr++); + l=Gv_GetVarX(*insptr++); + insptr--; + X_DoConditional(j & l); break; case CON_IFVARVAROR: insptr++; - j=*insptr++; - X_DoConditional(Gv_GetVarX(j) | Gv_GetVarX(*(insptr))); + j=Gv_GetVarX(*insptr++); + l=Gv_GetVarX(*insptr++); + insptr--; + X_DoConditional(j | l); break; case CON_IFVARVARXOR: insptr++; - j=*insptr++; - X_DoConditional(Gv_GetVarX(j) ^ Gv_GetVarX(*(insptr))); + j=Gv_GetVarX(*insptr++); + l=Gv_GetVarX(*insptr++); + insptr--; + X_DoConditional(j ^ l); break; case CON_IFVARVAREITHER: insptr++; - j=*insptr++; - X_DoConditional(Gv_GetVarX(j) || Gv_GetVarX(*(insptr))); + j=Gv_GetVarX(*insptr++); + l=Gv_GetVarX(*insptr++); + insptr--; + X_DoConditional(j || l); break; case CON_IFVARVARN: insptr++; - j=*insptr++; - X_DoConditional(Gv_GetVarX(j) != Gv_GetVarX(*(insptr))); + j=Gv_GetVarX(*insptr++); + l=Gv_GetVarX(*insptr++); + insptr--; + X_DoConditional(j != l); break; case CON_IFVARVARE: insptr++; - j=*insptr++; - X_DoConditional(Gv_GetVarX(j) == Gv_GetVarX(*(insptr))); + j=Gv_GetVarX(*insptr++); + l=Gv_GetVarX(*insptr++); + insptr--; + X_DoConditional(j == l); break; case CON_IFVARVARG: insptr++; - j=*insptr++; - X_DoConditional(Gv_GetVarX(j) > Gv_GetVarX(*(insptr))); + j=Gv_GetVarX(*insptr++); + l=Gv_GetVarX(*insptr++); + insptr--; + X_DoConditional(j > l); break; case CON_IFVARVARL: insptr++; - j=*insptr++; - X_DoConditional(Gv_GetVarX(j) < Gv_GetVarX(*(insptr))); + j=Gv_GetVarX(*insptr++); + l=Gv_GetVarX(*insptr++); + insptr--; + X_DoConditional(j < l); break; case CON_IFVARE: insptr++; - j=*insptr++; - X_DoConditional(Gv_GetVarX(j) == *insptr); + j=Gv_GetVarX(*insptr++); + X_DoConditional(j == *insptr); break; case CON_IFVARN: insptr++; - j=*insptr++; - X_DoConditional(Gv_GetVarX(j) != *insptr); + j=Gv_GetVarX(*insptr++); + X_DoConditional(j != *insptr); break; case CON_WHILEVARN: @@ -3988,7 +4004,8 @@ static int32_t X_DoExecute(void) { insptr=savedinsptr; i = Gv_GetVarX(*(insptr-1)); - j = (i != Gv_GetVarX(*insptr)); + j = (i != Gv_GetVarX(*insptr++)); + insptr--; X_DoConditional(j); } while (j); @@ -3997,38 +4014,38 @@ static int32_t X_DoExecute(void) case CON_IFVARAND: insptr++; - j=*insptr++; - X_DoConditional(Gv_GetVarX(j) & *insptr); + j=Gv_GetVarX(*insptr++); + X_DoConditional(j & *insptr); break; case CON_IFVAROR: insptr++; - j=*insptr++; - X_DoConditional(Gv_GetVarX(j) | *insptr); + j=Gv_GetVarX(*insptr++); + X_DoConditional(j | *insptr); break; case CON_IFVARXOR: insptr++; - j=*insptr++; - X_DoConditional(Gv_GetVarX(j) ^ *insptr); + j=Gv_GetVarX(*insptr++); + X_DoConditional(j ^ *insptr); break; case CON_IFVAREITHER: insptr++; - j=*insptr++; - X_DoConditional(Gv_GetVarX(j) || *insptr); + j=Gv_GetVarX(*insptr++); + X_DoConditional(j || *insptr); break; case CON_IFVARG: insptr++; - j=*insptr++; - X_DoConditional(Gv_GetVarX(j) > *insptr); + j=Gv_GetVarX(*insptr++); + X_DoConditional(j > *insptr); break; case CON_IFVARL: insptr++; - j=*insptr++; - X_DoConditional(Gv_GetVarX(j) < *insptr); + j=Gv_GetVarX(*insptr++); + X_DoConditional(j < *insptr); break; case CON_IFPHEALTHL: diff --git a/polymer/eduke32/source/gamevars.c b/polymer/eduke32/source/gamevars.c index cf664f6f8..15447b8be 100644 --- a/polymer/eduke32/source/gamevars.c +++ b/polymer/eduke32/source/gamevars.c @@ -576,7 +576,7 @@ int32_t __fastcall Gv_GetVar(int32_t id, int32_t iActor, int32_t iPlayer) { int32_t parm2 = 0; - OSD_Printf("%d %d %d\n",__LINE__,index,label); + /*OSD_Printf("%d %d %d\n",__LINE__,index,label);*/ if (ActorLabels[label].flags & LABEL_HASPARM2) parm2 = Gv_GetVar(*insptr++, iActor, iPlayer); @@ -784,7 +784,7 @@ int32_t __fastcall Gv_GetVarX(int32_t id) { int32_t parm2 = 0; - OSD_Printf("%d %d %d\n",__LINE__,index,label); + /*OSD_Printf("%d %d %d\n",__LINE__,index,label);*/ if (ActorLabels[label].flags & LABEL_HASPARM2) parm2 = Gv_GetVarX(*insptr++); if (index >= MAXSPRITES || index < 0)