CON_CANSEESPR, whitespace

git-svn-id: https://svn.eduke32.com/eduke32@106 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2006-04-24 05:42:29 +00:00
parent b6f86cc379
commit 2fa4b89f17
4 changed files with 29 additions and 7 deletions

View file

@ -434,6 +434,7 @@ char *keyw[] = {
"getinput", // 287
"save", // 288
"cansee", // 289
"canseespr", // 290
"<null>"
};
@ -3881,6 +3882,11 @@ char parsecommand(void)
transvar();
break;
case CON_CANSEESPR:
transmultvars(2);
transvartype(GAMEVAR_FLAG_READONLY);
break;
case CON_ROTATEPOINT:
case CON_NEARTAG:
transmultvars(5);

View file

@ -714,5 +714,6 @@ enum keywords {
CON_GETINPUT, // 287
CON_SAVE, // 288
CON_CANSEE, // 289
CON_CANSEESPR, // 290
END
};

View file

@ -4067,6 +4067,21 @@ SKIPJIBS:
break;
}
case CON_CANSEESPR:
{
long var1, var2, rvar;
insptr++;
var1 = GetGameVarID(*insptr++,g_i,g_p);
var2 = GetGameVarID(*insptr++,g_i,g_p);
rvar = *insptr++;
SetGameVarID(rvar, cansee(sprite[var1].x,sprite[var1].y,sprite[var1].z,sprite[var1].sectnum,
sprite[var2].x,sprite[var2].y,sprite[var2].z,sprite[var2].sectnum), g_i, g_p);
break;
}
case CON_OPERATERESPAWNS:
case CON_OPERATEMASTERSWITCHES:
case CON_CHECKACTIVATORMOTION:
@ -5322,7 +5337,7 @@ SKIPJIBS:
var4 = GetGameVarID(*insptr++, g_i, g_p);
Bsprintf(fta_quotes[122],tempbuf,var1,var2,var3,var4);
FTA(122,&ps[g_p]);
} else {
} else {
OSD_Printf("%s %d null quote %d\n",__FILE__,__LINE__,*insptr);
insptr += 5;
}
@ -6536,7 +6551,7 @@ good:
insptr++;
if(fta_quotes[*insptr] != NULL)
FTA(*insptr++,&ps[g_p]);
else {
else {
OSD_Printf("%s %d null quote %d\n",__FILE__,__LINE__,*insptr);
insptr++;
}
@ -6546,7 +6561,7 @@ good:
insptr++;
if(fta_quotes[*insptr] != NULL)
adduserquote(fta_quotes[*insptr++]);
else {
else {
OSD_Printf("%s %d null quote %d\n",__FILE__,__LINE__,*insptr);
insptr++;
}

View file

@ -299,7 +299,7 @@ int loadplayer(signed char spot)
if(kdfread((char *)fta_quotes[i],MAXQUOTELEN,1,fil) != 1) goto corrupt;
if(kdfread(&i,sizeof(long),1,fil) != 1) goto corrupt;
}
}
if (kdfread(&redefined_quote_count,sizeof(redefined_quote_count),1,fil) != 1) goto corrupt;
@ -311,7 +311,7 @@ int loadplayer(signed char spot)
redefined_quotes[i] = Bcalloc(MAXQUOTELEN,sizeof(char));
if(kdfread((char *)redefined_quotes[i],MAXQUOTELEN,1,fil) != 1) goto corrupt;
}
}
ReadGameVars(fil);
@ -662,7 +662,7 @@ int saveplayer(signed char spot)
for(i=0;i<NUMOFFIRSTTIMEACTIVE;i++)
{
if(fta_quotes[i] != NULL)
if(fta_quotes[i] != NULL)
{
dfwrite(&i,sizeof(long),1,fil);
dfwrite(fta_quotes[i],MAXQUOTELEN, 1, fil);
@ -673,7 +673,7 @@ int saveplayer(signed char spot)
dfwrite(&redefined_quote_count,sizeof(redefined_quote_count),1,fil);
for(i=0;i<redefined_quote_count;i++)
{
if(redefined_quotes[i] != NULL)
if(redefined_quotes[i] != NULL)
dfwrite(redefined_quotes[i],MAXQUOTELEN, 1, fil);
}