mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 19:20:46 +00:00
Fix issue with editor not allowing wall and floor aligned sprites to be resized in 2d mode without textured view mode enabled
git-svn-id: https://svn.eduke32.com/eduke32@7289 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
89df4950d4
commit
650672717d
1 changed files with 38 additions and 41 deletions
|
@ -7575,56 +7575,53 @@ static void Keys2d(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (graphicsmode)
|
for (k=0; k<2; k++) // panning/repeat
|
||||||
{
|
{
|
||||||
for (k=0; k<2; k++) // panning/repeat
|
if (k==0)
|
||||||
|
j = (keystatus[KEYSC_gLEFT]<<1)|keystatus[KEYSC_gRIGHT]; // 4 & 6 (keypad 2D)
|
||||||
|
else
|
||||||
|
j = (keystatus[KEYSC_gUP]<<1)|keystatus[KEYSC_gDOWN]; // 2 & 8 (keypad 2D)
|
||||||
|
|
||||||
|
if (j)
|
||||||
{
|
{
|
||||||
if (k==0)
|
smooshy = keystatus[KEYSC_gKP5];
|
||||||
j = (keystatus[KEYSC_gLEFT]<<1)|keystatus[KEYSC_gRIGHT]; // 4 & 6 (keypad 2D)
|
|
||||||
else
|
|
||||||
j = (keystatus[KEYSC_gUP]<<1)|keystatus[KEYSC_gDOWN]; // 2 & 8 (keypad 2D)
|
|
||||||
|
|
||||||
if (j)
|
if (repeatcnt[k] == 0 || repeatcnt[k] > 32)
|
||||||
{
|
{
|
||||||
smooshy = keystatus[KEYSC_gKP5];
|
changedir = 1-(j&2);
|
||||||
|
|
||||||
if (repeatcnt[k] == 0 || repeatcnt[k] > 32)
|
if ((ppointhighlight&0xc000) == 16384 && (sprite[cursprite].cstat & 48))
|
||||||
{
|
{
|
||||||
changedir = 1-(j&2);
|
uint8_t *repeat = (k==0) ? &sprite[cursprite].xrepeat : &sprite[cursprite].yrepeat;
|
||||||
|
*repeat = max<uint8_t>(4, changechar(*repeat, changedir, smooshy, 1));
|
||||||
if ((ppointhighlight&0xc000) == 16384 && (sprite[cursprite].cstat & 48))
|
silentmessage("Sprite %d repeat: %d, %d", cursprite,
|
||||||
{
|
TrackerCast(sprite[cursprite].xrepeat),
|
||||||
uint8_t *repeat = (k==0) ? &sprite[cursprite].xrepeat : &sprite[cursprite].yrepeat;
|
TrackerCast(sprite[cursprite].yrepeat));
|
||||||
*repeat = max<uint8_t>(4, changechar(*repeat, changedir, smooshy, 1));
|
|
||||||
silentmessage("Sprite %d repeat: %d, %d", cursprite,
|
|
||||||
TrackerCast(sprite[cursprite].xrepeat),
|
|
||||||
TrackerCast(sprite[cursprite].yrepeat));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
i = tcursectornum;
|
|
||||||
|
|
||||||
if (i >= 0)
|
|
||||||
#ifdef YAX_ENABLE
|
|
||||||
if (k==1 || yax_getbunch(i, YAX_FLOOR) < 0)
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
uint8_t *panning = (k==0) ? §or[i].floorxpanning : §or[i].floorypanning;
|
|
||||||
*panning = changechar(*panning, changedir, smooshy, 0);
|
|
||||||
silentmessage("Sector %d floor panning: %d, %d", searchsector,
|
|
||||||
TrackerCast(sector[i].floorxpanning),
|
|
||||||
TrackerCast(sector[i].floorypanning));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
asksave = 1;
|
|
||||||
repeatcnt[k] = max(1, repeatcnt[k]-2);
|
|
||||||
}
|
}
|
||||||
repeatcnt[k] += synctics;
|
else if (graphicsmode)
|
||||||
|
{
|
||||||
|
i = tcursectornum;
|
||||||
|
|
||||||
|
if (i >= 0)
|
||||||
|
#ifdef YAX_ENABLE
|
||||||
|
if (k==1 || yax_getbunch(i, YAX_FLOOR) < 0)
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
uint8_t *panning = (k==0) ? §or[i].floorxpanning : §or[i].floorypanning;
|
||||||
|
*panning = changechar(*panning, changedir, smooshy, 0);
|
||||||
|
silentmessage("Sector %d floor panning: %d, %d", searchsector,
|
||||||
|
TrackerCast(sector[i].floorxpanning),
|
||||||
|
TrackerCast(sector[i].floorypanning));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
asksave = 1;
|
||||||
|
repeatcnt[k] = max(1, repeatcnt[k]-2);
|
||||||
}
|
}
|
||||||
else
|
repeatcnt[k] += synctics;
|
||||||
repeatcnt[k] = 0;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
repeatcnt[k] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PRESSED_KEYSC(R)) // R (relative alignment, rotation)
|
if (PRESSED_KEYSC(R)) // R (relative alignment, rotation)
|
||||||
|
|
Loading…
Reference in a new issue