mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
Add 'P' hotkey to change palette in tile selector, and clean up the info at the bottom of the screen a bit
git-svn-id: https://svn.eduke32.com/eduke32@6864 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
07ec86c4af
commit
5b20947da6
1 changed files with 27 additions and 9 deletions
|
@ -2880,7 +2880,7 @@ static int32_t m32gettile(int32_t idInitialTile)
|
|||
{
|
||||
if (globalpal > 0)
|
||||
globalpal--;
|
||||
else globalpal = MAXPALOOKUPS - RESERVEDPALS;
|
||||
else globalpal = M32_MAXPALOOKUPS;
|
||||
|
||||
while (globalpal > 0 && (!palookup[globalpal] || palookup[globalpal] == palookup[0]))
|
||||
globalpal--;
|
||||
|
@ -2888,12 +2888,15 @@ static int32_t m32gettile(int32_t idInitialTile)
|
|||
|
||||
if (PRESSED_KEYSC(EQUAL))
|
||||
{
|
||||
if (globalpal < (MAXPALOOKUPS - RESERVEDPALS))
|
||||
if (globalpal < M32_MAXPALOOKUPS)
|
||||
{
|
||||
globalpal++;
|
||||
|
||||
while (globalpal < (MAXPALOOKUPS - RESERVEDPALS) && (!palookup[globalpal] || palookup[globalpal] == palookup[0]))
|
||||
while (globalpal < M32_MAXPALOOKUPS && (!palookup[globalpal] || palookup[globalpal] == palookup[0]))
|
||||
globalpal++;
|
||||
|
||||
if (globalpal == M32_MAXPALOOKUPS)
|
||||
globalpal = 0;
|
||||
}
|
||||
else globalpal = 0;
|
||||
}
|
||||
|
@ -2922,6 +2925,21 @@ static int32_t m32gettile(int32_t idInitialTile)
|
|||
tileNum = OnGotoTile(tileNum);
|
||||
}
|
||||
|
||||
// change palette
|
||||
if (PRESSED_KEYSC(P))
|
||||
{
|
||||
Bsprintf(tempbuf, "%s pal: ", Typestr[searchstat]);
|
||||
|
||||
int pal;
|
||||
|
||||
do
|
||||
{
|
||||
pal = getnumber256(tempbuf, globalpal, M32_MAXPALOOKUPS, 0+2+16);
|
||||
} while (pal != 0 && (palookup[pal] == palookup[0] || palookup[pal] == NULL));
|
||||
|
||||
globalpal = pal;
|
||||
}
|
||||
|
||||
// 'U' KEYPRESS : go straight to user defined art
|
||||
if (PRESSED_KEYSC(U))
|
||||
{
|
||||
|
@ -3486,19 +3504,19 @@ static void tilescreen_drawrest(int32_t iSelected, int32_t showmsg)
|
|||
renderDrawLine(0, i<<12, xdim<<12, i<<12, (ydim-i));
|
||||
|
||||
// Tile number on left.
|
||||
Bsprintf(szT, "%d, %d" , idTile, globalpal);
|
||||
Bsprintf(szT, "Tile: %d (p)al: %d" , idTile, globalpal);
|
||||
printext256(1, ydim-10, whitecol, -1, szT, 0);
|
||||
|
||||
// Tile name on right.
|
||||
printext256(xdim-(Bstrlen(names[idTile])<<3)-1,ydim-10,whitecol,-1,names[idTile],0);
|
||||
|
||||
// Tile dimensions.
|
||||
Bsprintf(szT,"%dx%d",tilesiz[idTile].x,tilesiz[idTile].y);
|
||||
printext256(xdim>>2,ydim-10,whitecol,-1,szT,0);
|
||||
Bsprintf(szT,"dim: %dx%d",tilesiz[idTile].x,tilesiz[idTile].y);
|
||||
printext256((xdim>>2)+(4<<3),ydim-10,whitecol,-1,szT,0);
|
||||
|
||||
// EditArt offset flags.
|
||||
Bsprintf(szT,"%d, %d", picanm[idTile].xofs, picanm[idTile].yofs);
|
||||
printext256((xdim>>2)+100,ydim-10,whitecol,-1,szT,0);
|
||||
Bsprintf(szT,"offs: %d, %d", picanm[idTile].xofs, picanm[idTile].yofs);
|
||||
printext256((xdim>>2)+(4<<3)+100,ydim-10,whitecol,-1,szT,0);
|
||||
|
||||
// EditArt animation flags.
|
||||
if (picanm[idTile].sf&PICANM_ANIMTYPE_MASK)
|
||||
|
@ -3507,7 +3525,7 @@ static void tilescreen_drawrest(int32_t iSelected, int32_t showmsg)
|
|||
int32_t ii = (picanm[idTile].sf&PICANM_ANIMTYPE_MASK)>>PICANM_ANIMTYPE_SHIFT;
|
||||
|
||||
Bsprintf(szT,"%s %d", anmtype[ii], picanm[idTile].num);
|
||||
printext256((xdim>>2)+100+14*8,ydim-10,whitecol,-1,szT,0);
|
||||
printext256((xdim>>2)+(4<<3)+100+14*8,ydim-10,whitecol,-1,szT,0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue