CON access to getincangle(), and usage of myconnectindex for EVENT_GETMENUTILE and EVENT_GETLOADTILE. This lets us force menu options to certain values while the player is in the menu via setuserdef.

git-svn-id: https://svn.eduke32.com/eduke32@329 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2006-11-06 22:14:27 +00:00
parent 44d1866c5a
commit f80b65cfb3
5 changed files with 12 additions and 4 deletions

View file

@ -3210,7 +3210,7 @@ void drawbackground(void)
// when not rendering a game, fullscreen wipe
#define MENUTILE bpp==8?MENUSCREEN:LOADSCREEN
SetGameVarID(g_iReturnVarID,tilesizx[MENUTILE]==320&&tilesizy[MENUTILE]==200?MENUTILE:BIGHOLE, -1, -1);
OnEvent(EVENT_GETMENUTILE, -1, -1, -1);
OnEvent(EVENT_GETMENUTILE, -1, myconnectindex, -1);
if (GetGameVar("MENU_TILE", tilesizx[MENUTILE]==320&&tilesizy[MENUTILE]==200?0:1, -1, -1))
{
for(y=y1;y<y2;y+=tilesizy[GetGameVarID(g_iReturnVarID, -1, -1)])

View file

@ -444,6 +444,7 @@ char *keyw[] = {
"getcurraddress", // 297
"jump", // 298
"qstrlen", // 299
"getincangle", // 300
"<null>"
};
@ -3607,6 +3608,7 @@ char parsecommand(void)
case CON_GMAXAMMO:
case CON_DIST:
case CON_LDIST:
case CON_GETINCANGLE:
case CON_GETANGLE:
case CON_MULSCALE:
case CON_SETASPECT:
@ -3616,6 +3618,7 @@ char parsecommand(void)
case CON_DIST:
case CON_LDIST:
case CON_GETANGLE:
case CON_GETINCANGLE:
transvartype(GAMEVAR_FLAG_READONLY);
break;
default:
@ -3633,6 +3636,7 @@ char parsecommand(void)
case CON_DIST:
case CON_LDIST:
case CON_GETANGLE:
case CON_GETINCANGLE:
transvar();
break;
case CON_MULSCALE:

View file

@ -753,5 +753,6 @@ enum keywords {
CON_GETCURRADDRESS, // 297
CON_JUMP, // 298
CON_QSTRLEN, // 299
CON_GETINCANGLE, // 300
END
};

View file

@ -4582,6 +4582,7 @@ SKIPJIBS:
break;
}
case CON_GETINCANGLE:
case CON_GETANGLE:
{
long angvar, xvar, yvar;
@ -4591,7 +4592,9 @@ SKIPJIBS:
angvar = *insptr++;
xvar = *insptr++;
yvar = *insptr++;
ang = getangle(GetGameVarID(xvar, g_i, g_p),GetGameVarID(yvar, g_i, g_p));
if(tw==CON_GETANGLE)
ang = getangle(GetGameVarID(xvar, g_i, g_p),GetGameVarID(yvar, g_i, g_p));
else ang = getincangle(GetGameVarID(xvar, g_i, g_p),GetGameVarID(yvar, g_i, g_p));
SetGameVarID(angvar, ang, g_i, g_p);
break;

View file

@ -1391,7 +1391,7 @@ void dofrontscreens(char *statustext)
}
SetGameVarID(g_iReturnVarID,LOADSCREEN, -1, -1);
OnEvent(EVENT_GETLOADTILE, -1, -1, -1);
OnEvent(EVENT_GETLOADTILE, -1, myconnectindex, -1);
j = GetGameVarID(g_iReturnVarID, -1, -1);
rotatesprite(320<<15,200<<15,65536L,0,j > MAXTILES-1?j-MAXTILES:j,0,0,2+8+64,0,0,xdim-1,ydim-1);
if(j > MAXTILES-1)
@ -1432,7 +1432,7 @@ void dofrontscreens(char *statustext)
setgamepalette(&ps[myconnectindex], palette, 0); // JBF 20040308
}
SetGameVarID(g_iReturnVarID,LOADSCREEN, -1, -1);
OnEvent(EVENT_GETLOADTILE, -1, -1, -1);
OnEvent(EVENT_GETLOADTILE, -1, myconnectindex, -1);
j = GetGameVarID(g_iReturnVarID, -1, -1);
rotatesprite(320<<15,200<<15,65536L,0,j > MAXTILES-1?j-MAXTILES:j,0,0,2+8+64,0,0,xdim-1,ydim-1);
if(j > MAXTILES-1)