mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-16 01:11:44 +00:00
Restore previous behavior of "allsprites" iterator for CON_FOR and add "allspritesbystat" and "allspritesbysect"
git-svn-id: https://svn.eduke32.com/eduke32@6635 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
9c408fc26c
commit
d9a5b4aa13
3 changed files with 28 additions and 0 deletions
|
@ -1344,6 +1344,8 @@ const memberlabel_t PalDataLabels[]=
|
|||
const tokenmap_t iter_tokens [] =
|
||||
{
|
||||
{ "allsprites", ITER_ALLSPRITES },
|
||||
{ "allspritesbystat",ITER_ALLSPRITESBYSTAT },
|
||||
{ "allspritesbysect",ITER_ALLSPRITESBYSECT },
|
||||
{ "allsectors", ITER_ALLSECTORS },
|
||||
{ "allwalls", ITER_ALLWALLS },
|
||||
{ "activelights", ITER_ACTIVELIGHTS },
|
||||
|
|
|
@ -781,6 +781,8 @@ enum ProjectileLabel_t
|
|||
enum IterationTypes_t
|
||||
{
|
||||
ITER_ALLSPRITES,
|
||||
ITER_ALLSPRITESBYSTAT,
|
||||
ITER_ALLSPRITESBYSECT,
|
||||
ITER_ALLSECTORS,
|
||||
ITER_ALLWALLS,
|
||||
ITER_ACTIVELIGHTS,
|
||||
|
|
|
@ -5275,6 +5275,17 @@ finish_qsprintf:
|
|||
switch (iterType)
|
||||
{
|
||||
case ITER_ALLSPRITES:
|
||||
for (native_t jj=0; jj<MAXSPRITES; ++jj)
|
||||
{
|
||||
if (sprite[jj].statnum == MAXSTATUS)
|
||||
continue;
|
||||
|
||||
Gv_SetVarX(returnVar, jj);
|
||||
insptr = pNext;
|
||||
VM_Execute(0);
|
||||
}
|
||||
break;
|
||||
case ITER_ALLSPRITESBYSTAT:
|
||||
for (native_t statNum=0; statNum<MAXSTATUS; ++statNum)
|
||||
{
|
||||
for (native_t jj=headspritestat[statNum]; jj>=0;)
|
||||
|
@ -5287,6 +5298,19 @@ finish_qsprintf:
|
|||
}
|
||||
}
|
||||
break;
|
||||
case ITER_ALLSPRITESBYSECT:
|
||||
for (native_t sectNum=0; sectNum<numsectors; ++sectNum)
|
||||
{
|
||||
for (native_t jj=headspritesect[sectNum]; jj>=0;)
|
||||
{
|
||||
int const kk=nextspritesect[jj];
|
||||
Gv_SetVarX(returnVar, jj);
|
||||
insptr = pNext;
|
||||
VM_Execute(0);
|
||||
jj=kk;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ITER_ALLSECTORS:
|
||||
for (native_t jj=0; jj<numsectors; ++jj)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue