m32script fixes and additions

git-svn-id: https://svn.eduke32.com/eduke32@1579 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2010-01-04 14:38:29 +00:00
parent 3bc78ac5d4
commit 102b702fc0
5 changed files with 35 additions and 1 deletions

View file

@ -247,7 +247,7 @@ onevent EVENT_ENTER3DMODE
state setas
endevent
defstate cmp_by_lotag
defstate cmp_by_lotag // comparator subroutine for sorting
set RETURN sprite[SV2].lotag
sub RETURN sprite[SV1].lotag
ends
@ -496,3 +496,24 @@ defstate replacestuff
// ife sprite[i].picnum AMMO set sprite[i].picnum BATTERYAMMO
ifactor parm[0] cactor parm[1]
ends
defstate convlights // convert (0,0,0) lights to (255,255,255)-ones
for i allsprites ifactor 1 ifge .lotag 49 ifle .lotag 50 ife .xvel 0 ife .yvel 0 ife .zvel 0
{ set .xvel 255 set .yvel 255 set .zvel 255 }
ends
defstate resetallws // reset all sprites and walls to default repeat/panning
for i allsprites
{
set .xrepeat 64
set .yrepeat 64
}
for i allwalls
{
set wall[i].cstat 0
set wall[i].xpanning 0
set wall[i].ypanning 0
set wall[i].yrepeat 8
fixrepeats i
}
ends

Binary file not shown.

View file

@ -341,6 +341,7 @@ const char *keyw[] =
"prevspritesect",
"nextspritesect",
"sectorofwall",
"fixrepeats",
"addlogvar",
"addlog",
@ -2833,6 +2834,9 @@ repeatcase:
C_GetNextVar();
return 0;
case CON_FIXREPEATS:
C_GetNextVar();
return 0;
// *** stuff
case CON_ADDLOGVAR:

View file

@ -419,6 +419,7 @@ enum ScriptKeywords_t
CON_PREVSPRITESECT,
CON_NEXTSPRITESECT,
CON_SECTOROFWALL,
CON_FIXREPEATS,
// stuff
CON_ADDLOGVAR,

View file

@ -1937,6 +1937,14 @@ badindex:
}
continue;
case CON_FIXREPEATS:
insptr++;
{
extern void fixrepeats(int16_t i);
fixrepeats(Gv_GetVarX(*insptr++));
}
continue;
// *** stuff
case CON_GETTIMEDATE:
insptr++;