mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
Mapster32: include .blend in sprite display/edit/search (Shift+TAB/F8/Alt+F8).
git-svn-id: https://svn.eduke32.com/eduke32@4349 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
597400e0f3
commit
7a7fb71169
2 changed files with 39 additions and 30 deletions
|
@ -10271,9 +10271,10 @@ void showspritedata(int16_t spritenum, int16_t small)
|
||||||
DOPRINT(48, "Flags (hex): %x", TrackerCast(spr->cstat));
|
DOPRINT(48, "Flags (hex): %x", TrackerCast(spr->cstat));
|
||||||
DOPRINT(56, "Shade: %d", TrackerCast(spr->shade));
|
DOPRINT(56, "Shade: %d", TrackerCast(spr->shade));
|
||||||
DOPRINT(64, "Pal: %d", TrackerCast(spr->pal));
|
DOPRINT(64, "Pal: %d", TrackerCast(spr->pal));
|
||||||
DOPRINT(72, "(X,Y)repeat: %d, %d", TrackerCast(spr->xrepeat), TrackerCast(spr->yrepeat));
|
DOPRINT(72, "Blend: %d", TrackerCast(spr->blend));
|
||||||
DOPRINT(80, "(X,Y)offset: %d, %d", TrackerCast(spr->xoffset), TrackerCast(spr->yoffset));
|
DOPRINT(80, "(X,Y)repeat: %d, %d", TrackerCast(spr->xrepeat), TrackerCast(spr->yrepeat));
|
||||||
DOPRINT(88, "Tile number: %d", TrackerCast(spr->picnum));
|
DOPRINT(88, "(X,Y)offset: %d, %d", TrackerCast(spr->xoffset), TrackerCast(spr->yoffset));
|
||||||
|
DOPRINT(96, "Tile number: %d", TrackerCast(spr->picnum));
|
||||||
|
|
||||||
col++;
|
col++;
|
||||||
|
|
||||||
|
|
|
@ -7466,12 +7466,14 @@ static void DoSpriteSearch(int32_t dir) // <0: backwards, >=0: forwards
|
||||||
gs_cursprite &= (MAXSPRITES-1);
|
gs_cursprite &= (MAXSPRITES-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sprite[gs_cursprite].statnum == MAXSTATUS) continue;
|
if (sprite[gs_cursprite].statnum == MAXSTATUS)
|
||||||
|
continue;
|
||||||
|
|
||||||
for (i=0; i<3; i++)
|
for (i=0; i<3; i++)
|
||||||
for (j=0; i==1 ? j<6 : j<7; j++)
|
for (j=0; j<7; j++)
|
||||||
{
|
{
|
||||||
if (!gs_spriteTagInterested[i][j]) continue;
|
if (!gs_spriteTagInterested[i][j])
|
||||||
|
continue;
|
||||||
|
|
||||||
if (i==0)
|
if (i==0)
|
||||||
{
|
{
|
||||||
|
@ -7492,23 +7494,24 @@ static void DoSpriteSearch(int32_t dir) // <0: backwards, >=0: forwards
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
k = sprite[gs_cursprite].cstat;
|
k = sprite[gs_cursprite].cstat;
|
||||||
k &= gs_spriteTagValue[1][0];
|
k &= gs_spriteTagValue[1][j];
|
||||||
break;
|
break;
|
||||||
case 1: k = sprite[gs_cursprite].shade; break;
|
case 1: k = sprite[gs_cursprite].shade; break;
|
||||||
case 2: k = sprite[gs_cursprite].pal; break;
|
case 2: k = sprite[gs_cursprite].pal; break;
|
||||||
case 3:
|
case 3: k = sprite[gs_cursprite].blend; break;
|
||||||
k = gs_spriteTagValue[1][3];
|
case 4:
|
||||||
|
k = gs_spriteTagValue[1][j];
|
||||||
if (k != sprite[gs_cursprite].xrepeat &&
|
if (k != sprite[gs_cursprite].xrepeat &&
|
||||||
k != sprite[gs_cursprite].yrepeat)
|
k != sprite[gs_cursprite].yrepeat)
|
||||||
goto NEXTSPRITE;
|
goto NEXTSPRITE;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 5:
|
||||||
k = gs_spriteTagValue[1][4];
|
k = gs_spriteTagValue[1][j];
|
||||||
if (k != sprite[gs_cursprite].xoffset &&
|
if (k != sprite[gs_cursprite].xoffset &&
|
||||||
k != sprite[gs_cursprite].yoffset)
|
k != sprite[gs_cursprite].yoffset)
|
||||||
goto NEXTSPRITE;
|
goto NEXTSPRITE;
|
||||||
break;
|
break;
|
||||||
case 5: k = sprite[gs_cursprite].picnum; break;
|
case 6: k = sprite[gs_cursprite].picnum; break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (i==2)
|
else if (i==2)
|
||||||
|
@ -7525,7 +7528,8 @@ static void DoSpriteSearch(int32_t dir) // <0: backwards, >=0: forwards
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (k != gs_spriteTagValue[i][j]) goto NEXTSPRITE;
|
if (k != gs_spriteTagValue[i][j])
|
||||||
|
goto NEXTSPRITE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// found matching sprite
|
// found matching sprite
|
||||||
|
@ -12579,7 +12583,7 @@ static void EditSpriteData(int16_t spritenum)
|
||||||
med_printcurline(xpos, ypos, row, 0);
|
med_printcurline(xpos, ypos, row, 0);
|
||||||
col = 1;
|
col = 1;
|
||||||
xpos = 208;
|
xpos = 208;
|
||||||
rowmax = 5;
|
rowmax = 6;
|
||||||
med_dispwidth = 24;
|
med_dispwidth = 24;
|
||||||
med_disptext[med_dispwidth] = 0;
|
med_disptext[med_dispwidth] = 0;
|
||||||
if (row > rowmax) row = rowmax;
|
if (row > rowmax) row = rowmax;
|
||||||
|
@ -12596,7 +12600,7 @@ static void EditSpriteData(int16_t spritenum)
|
||||||
med_printcurline(xpos, ypos, row, 0);
|
med_printcurline(xpos, ypos, row, 0);
|
||||||
col = 1;
|
col = 1;
|
||||||
xpos = 208;
|
xpos = 208;
|
||||||
rowmax = 5;
|
rowmax = 6;
|
||||||
med_dispwidth = 24;
|
med_dispwidth = 24;
|
||||||
med_disptext[med_dispwidth] = 0;
|
med_disptext[med_dispwidth] = 0;
|
||||||
if (row > rowmax) row = rowmax;
|
if (row > rowmax) row = rowmax;
|
||||||
|
@ -12674,6 +12678,10 @@ static void EditSpriteData(int16_t spritenum)
|
||||||
sizeof(sprite[spritenum].pal), M32_MAXPALOOKUPS, 0);
|
sizeof(sprite[spritenum].pal), M32_MAXPALOOKUPS, 0);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
|
handlemed(0, "Blend", "Blend", &sprite[spritenum].blend,
|
||||||
|
sizeof(sprite[spritenum].blend), MAXBLENDTABS, 0);
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
{
|
{
|
||||||
Bsprintf_nowarn_return(i, med_disptext,"(X,Y)repeat: %d, %d",
|
Bsprintf_nowarn_return(i, med_disptext,"(X,Y)repeat: %d, %d",
|
||||||
TrackerCast(sprite[spritenum].xrepeat),TrackerCast(sprite[spritenum].yrepeat));
|
TrackerCast(sprite[spritenum].xrepeat),TrackerCast(sprite[spritenum].yrepeat));
|
||||||
|
@ -12689,7 +12697,7 @@ static void EditSpriteData(int16_t spritenum)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 5:
|
||||||
{
|
{
|
||||||
Bsprintf_nowarn_return(i, med_disptext,"(X,Y)offset: %d, %d",
|
Bsprintf_nowarn_return(i, med_disptext,"(X,Y)offset: %d, %d",
|
||||||
TrackerCast(sprite[spritenum].xoffset),TrackerCast(sprite[spritenum].yoffset));
|
TrackerCast(sprite[spritenum].xoffset),TrackerCast(sprite[spritenum].yoffset));
|
||||||
|
@ -12705,7 +12713,7 @@ static void EditSpriteData(int16_t spritenum)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 6:
|
||||||
handlemed(0, "Tile number", "Tile number", &sprite[spritenum].picnum,
|
handlemed(0, "Tile number", "Tile number", &sprite[spritenum].picnum,
|
||||||
sizeof(sprite[spritenum].picnum), MAXTILES-1, 0+2);
|
sizeof(sprite[spritenum].picnum), MAXTILES-1, 0+2);
|
||||||
break;
|
break;
|
||||||
|
@ -12773,7 +12781,7 @@ static void GenericSpriteSearch(void)
|
||||||
char edittext[80];
|
char edittext[80];
|
||||||
static int32_t col=0, row=0;
|
static int32_t col=0, row=0;
|
||||||
int32_t i, j, k;
|
int32_t i, j, k;
|
||||||
int32_t rowmax[3]= {6,5,6}, dispwidth[3] = {24,24,28};
|
int32_t rowmax[3]= {6,6,6}, dispwidth[3] = {24,24,28};
|
||||||
int32_t xpos[3] = {8,200,400}, ypos = ydim-STATUS2DSIZ+48;
|
int32_t xpos[3] = {8,200,400}, ypos = ydim-STATUS2DSIZ+48;
|
||||||
|
|
||||||
static const char *labels[7][3] =
|
static const char *labels[7][3] =
|
||||||
|
@ -12781,10 +12789,10 @@ static void GenericSpriteSearch(void)
|
||||||
{"X-coordinate", "Flags (hex)", "Angle (2048 degrees)"},
|
{"X-coordinate", "Flags (hex)", "Angle (2048 degrees)"},
|
||||||
{"Y-coordinate", "Shade", "X-Velocity"},
|
{"Y-coordinate", "Shade", "X-Velocity"},
|
||||||
{"Z-coordinate", "Pal", "Y-Velocity"},
|
{"Z-coordinate", "Pal", "Y-Velocity"},
|
||||||
{"Sectnum", "(X/Y)repeat", "Z-Velocity"},
|
{"Sectnum", "Blend", "Z-Velocity"},
|
||||||
{"Statnum", "(X/Y)offset", "Owner"},
|
{"Statnum", "(X/Y)repeat", "Owner"},
|
||||||
{"Hitag", "Tile number", "Clipdist"},
|
{"Hitag", "(X/Y)offset", "Clipdist"},
|
||||||
{"Lotag", "", "Extra"}
|
{"Lotag", "Tile number", "Extra"}
|
||||||
};
|
};
|
||||||
|
|
||||||
static int32_t maxval[7][3] =
|
static int32_t maxval[7][3] =
|
||||||
|
@ -12792,10 +12800,10 @@ static void GenericSpriteSearch(void)
|
||||||
{ BXY_MAX , 65535 , 2048 },
|
{ BXY_MAX , 65535 , 2048 },
|
||||||
{ BXY_MAX , 128 , 65535 },
|
{ BXY_MAX , 128 , 65535 },
|
||||||
{ BZ_MAX , M32_MAXPALOOKUPS, 65535 },
|
{ BZ_MAX , M32_MAXPALOOKUPS, 65535 },
|
||||||
{ MAXSECTORS-1, 128 , 65535 },
|
{ MAXSECTORS-1, MAXBLENDTABS-1, 65535 },
|
||||||
{ MAXSTATUS-1 , 128 , MAXSPRITES-1 },
|
{ MAXSTATUS-1 , 128 , MAXSPRITES-1 },
|
||||||
{ BTAG_MAX , MAXTILES-1 , 256 },
|
{ BTAG_MAX , 128 , 256 },
|
||||||
{ BTAG_MAX , 0 , BTAG_MAX }
|
{ BTAG_MAX , MAXTILES-1 , BTAG_MAX }
|
||||||
};
|
};
|
||||||
|
|
||||||
static char sign[7][3] =
|
static char sign[7][3] =
|
||||||
|
@ -12804,9 +12812,9 @@ static void GenericSpriteSearch(void)
|
||||||
{1, 1, 1},
|
{1, 1, 1},
|
||||||
{1, 0, 1},
|
{1, 0, 1},
|
||||||
{0, 0, 1},
|
{0, 0, 1},
|
||||||
{0, 1, 0},
|
{0, 0, 0},
|
||||||
{0+4, 0+2, 0},
|
{0+4, 1, 0},
|
||||||
{0+4, 0, 1}
|
{0+4, 0+2, 1}
|
||||||
};
|
};
|
||||||
|
|
||||||
clearmidstatbar16();
|
clearmidstatbar16();
|
||||||
|
@ -12888,7 +12896,7 @@ static void GenericSpriteSearch(void)
|
||||||
gs_spriteTagValue[col][row] = i;
|
gs_spriteTagValue[col][row] = i;
|
||||||
gs_spriteTagInterested[col][row] = 1;
|
gs_spriteTagInterested[col][row] = 1;
|
||||||
|
|
||||||
if (col == 1 && row == 5) // picnum
|
if (col == 1 && row == 6) // picnum
|
||||||
{
|
{
|
||||||
printext16(xpos[1], ypos-2*8, editorcolors[14], editorcolors[0], TWENTYFIVE_BLANKS, 0);
|
printext16(xpos[1], ypos-2*8, editorcolors[14], editorcolors[0], TWENTYFIVE_BLANKS, 0);
|
||||||
if (names[i][0])
|
if (names[i][0])
|
||||||
|
@ -12899,7 +12907,7 @@ static void GenericSpriteSearch(void)
|
||||||
{
|
{
|
||||||
gs_spriteTagInterested[col][row] = 0;
|
gs_spriteTagInterested[col][row] = 0;
|
||||||
|
|
||||||
if (col == 1 && row == 5) // picnum
|
if (col == 1 && row == 6) // picnum
|
||||||
printext16(xpos[1], ypos-2*8, editorcolors[14], editorcolors[0], TWENTYFIVE_BLANKS, 0);
|
printext16(xpos[1], ypos-2*8, editorcolors[14], editorcolors[0], TWENTYFIVE_BLANKS, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue