diff --git a/polymer/eduke32/source/m32common.c b/polymer/eduke32/source/m32common.c index f12421484..6f8550179 100644 --- a/polymer/eduke32/source/m32common.c +++ b/polymer/eduke32/source/m32common.c @@ -730,7 +730,7 @@ static int32_t csc_s, csc_i; // 1: corrupt, 0: OK static int32_t check_spritelist_consistency() { - int32_t s, i, ournumsprites=0; + int32_t ournumsprites=0; static uint8_t havesprite[MAXSPRITES>>3]; csc_s = csc_i = -1; @@ -738,7 +738,7 @@ static int32_t check_spritelist_consistency() if (Numsprites < 0 || Numsprites > MAXSPRITES) return 1; - for (i=0; i>3); - for (s=0; s=0; i=nextspritesect[i]) @@ -789,7 +790,7 @@ static int32_t check_spritelist_consistency() } csc_s = -1; - for (i=0; i=0; i=nextspritestat[i]) @@ -827,7 +829,7 @@ static int32_t check_spritelist_consistency() } csc_s = -1; - for (i=0; i= MAXSECTORS) goto badindex; - for (jj=headspritesect[parm2]; jj>=0 && !vm.flags; jj=nextspritesect[jj]) + for (int jj=headspritesect[parm2]; jj>=0 && !vm.flags; jj=nextspritesect[jj]) { Gv_SetVarX(var, jj); vm.g_i = jj; @@ -1381,7 +1381,7 @@ skip_check: case ITER_WALLSOFSECTOR: if (parm2 < 0 || parm2 >= MAXSECTORS) goto badindex; - for (jj=sector[parm2].wallptr, endwall=jj+sector[parm2].wallnum-1; + for (int jj=sector[parm2].wallptr, endwall=jj+sector[parm2].wallnum-1; jj<=endwall && !vm.flags; jj++) { Gv_SetVarX(var, jj); @@ -1392,18 +1392,20 @@ skip_check: case ITER_LOOPOFWALL: if (parm2 < 0 || parm2 >= numwalls) goto badindex; - jj = parm2; - do { - Gv_SetVarX(var, jj); - insptr = beg; - VM_Execute(1); - jj = wall[jj].point2; + int jj = parm2; + do + { + Gv_SetVarX(var, jj); + insptr = beg; + VM_Execute(1); + jj = wall[jj].point2; + } + while (jj != parm2 && !vm.flags); } - while (jj != parm2 && !vm.flags); break; case ITER_RANGE: - for (jj=0; jj