Added a new CON command: setgamepalette <pal>

git-svn-id: https://svn.eduke32.com/eduke32@980 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hnt_ts 2008-08-16 11:20:08 +00:00
parent 2f14763197
commit 36d1cbd995
3 changed files with 20 additions and 1 deletions

View file

@ -467,6 +467,7 @@ const char *keyw[] =
"cmenu", // 331
"gettimedate", // 332
"activatecheat", // 333
"setgamepalette", // 334
"<null>"
};
@ -3499,6 +3500,7 @@ static int parsecommand(void)
case CON_STARTTRACKVAR:
case CON_CLEARMAPSTATE:
case CON_ACTIVATECHEAT:
case CON_SETGAMEPALETTE:
transvar();
return 0;

View file

@ -844,4 +844,5 @@ enum keywords
CON_CMENU, // 331
CON_GETTIMEDATE, // 332
CON_ACTIVATECHEAT, // 333
CON_SETGAMEPALETTE, // 334
};

View file

@ -7535,6 +7535,22 @@ static int parse(void)
osdcmd_cheatsinfo_stat.cheatnum = j;
break;
case CON_SETGAMEPALETTE:
insptr++;
j=GetGameVarID(*(insptr++), g_i, g_p);
switch(j)
{
default:
case 0:setgamepalette(g_player[g_p].ps,palette ,0);break;
case 1:setgamepalette(g_player[g_p].ps,waterpal ,0);break;
case 2:setgamepalette(g_player[g_p].ps,slimepal ,0);break;
case 3:setgamepalette(g_player[g_p].ps,drealms ,0);break;
case 4:setgamepalette(g_player[g_p].ps,titlepal ,0);break;
case 5:setgamepalette(g_player[g_p].ps,endingpal,0);break;
case 6:setgamepalette(g_player[g_p].ps,animpal ,0);break;
}
break;
case CON_GETTEXTURECEILING:
insptr++;
SetGameVarID(g_iTextureID, sector[g_sp->sectnum].ceilingpicnum, g_i, g_p);