mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
Mapster32: use the rotatepoint code for both smooth and 90-degree sect. rotation.
git-svn-id: https://svn.eduke32.com/eduke32@2941 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
7807f35691
commit
6ed50e7170
1 changed files with 8 additions and 27 deletions
|
@ -3601,50 +3601,31 @@ void overheadeditor(void)
|
||||||
#endif
|
#endif
|
||||||
if (highlightsectorcnt > 0)
|
if (highlightsectorcnt > 0)
|
||||||
{
|
{
|
||||||
int32_t smoothRotation = !eitherSHIFT;
|
int32_t smoothRotation = eitherSHIFT;
|
||||||
|
|
||||||
get_sectors_center(highlightsector, highlightsectorcnt, &dax, &day);
|
get_sectors_center(highlightsector, highlightsectorcnt, &dax, &day);
|
||||||
|
|
||||||
if (smoothRotation)
|
if (!smoothRotation)
|
||||||
{
|
{
|
||||||
if (gridlock && grid > 0)
|
if (gridlock && grid > 0)
|
||||||
locktogrid(&dax, &day);
|
locktogrid(&dax, &day);
|
||||||
|
|
||||||
|
tsign *= 512;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i=0; i<highlightsectorcnt; i++)
|
for (i=0; i<highlightsectorcnt; i++)
|
||||||
{
|
{
|
||||||
for (WALLS_OF_SECTOR(highlightsector[i], j))
|
for (WALLS_OF_SECTOR(highlightsector[i], j))
|
||||||
{
|
rotatepoint(dax,day, wall[j].x,wall[j].y, tsign&2047, &wall[j].x,&wall[j].y);
|
||||||
if (smoothRotation)
|
|
||||||
{
|
|
||||||
x3 = wall[j].x;
|
|
||||||
y3 = wall[j].y;
|
|
||||||
wall[j].x = dax + tsign*(day-y3);
|
|
||||||
wall[j].y = day + tsign*(x3-dax);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
rotatepoint(dax,day, wall[j].x,wall[j].y, tsign&2047, &wall[j].x,&wall[j].y);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (j=headspritesect[highlightsector[i]]; j != -1; j=nextspritesect[j])
|
for (j=headspritesect[highlightsector[i]]; j != -1; j=nextspritesect[j])
|
||||||
{
|
{
|
||||||
if (smoothRotation)
|
rotatepoint(dax,day, sprite[j].x,sprite[j].y, tsign&2047, &sprite[j].x,&sprite[j].y);
|
||||||
{
|
sprite[j].ang = (sprite[j].ang+tsign)&2047;
|
||||||
x3 = sprite[j].x;
|
|
||||||
y3 = sprite[j].y;
|
|
||||||
sprite[j].x = dax + tsign*(day-y3);
|
|
||||||
sprite[j].y = day + tsign*(x3-dax);
|
|
||||||
sprite[j].ang = (sprite[j].ang+tsign*512)&2047;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
rotatepoint(dax,day, sprite[j].x,sprite[j].y, tsign&2047, &sprite[j].x,&sprite[j].y);
|
|
||||||
sprite[j].ang = (sprite[j].ang+tsign)&2047;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (smoothRotation)
|
if (!smoothRotation)
|
||||||
keystatus[0x33] = keystatus[0x34] = 0;
|
keystatus[0x33] = keystatus[0x34] = 0;
|
||||||
|
|
||||||
mouseb &= ~(16|32);
|
mouseb &= ~(16|32);
|
||||||
|
|
Loading…
Reference in a new issue