- Added a new setting for am_rotate: 2 will enable rotation only for the

overlay map while leaving the regular map unrotated.


SVN r100 (trunk)
This commit is contained in:
Randy Heit 2006-05-10 03:24:32 +00:00
parent 0bf87acb00
commit d1ba4a1b76
3 changed files with 23 additions and 15 deletions

View file

@ -1,4 +1,6 @@
May 9, 2006
- Added a new setting for am_rotate: 2 will enable rotation only for the
overlay map while leaving the regular map unrotated.
- Added a new setting for am_overlay: 2 will disable the normal automap and
show only the overlayed version.
- Fixed?: WallSpriteColumn apparently needs to set dc_texturefrac. At least

View file

@ -96,7 +96,7 @@ inline fixed_t MTOF(fixed_t x)
static int WeightingScale;
CVAR (Bool, am_rotate, false, CVAR_ARCHIVE);
CVAR (Int, am_rotate, 0, CVAR_ARCHIVE);
CVAR (Int, am_overlay, 0, CVAR_ARCHIVE);
CVAR (Bool, am_showsecrets, true, CVAR_ARCHIVE);
CVAR (Bool, am_showmonsters, true, CVAR_ARCHIVE);
@ -496,7 +496,7 @@ static void AM_ClipRotatedExtents ()
{
fixed_t rmin_x, rmin_y, rmax_x, rmax_y;
if (!am_rotate)
if (am_rotate == 1 || (am_rotate == 2 && viewactive))
{
rmin_x = min_x;
rmin_y = min_y;
@ -1068,7 +1068,7 @@ void AM_doFollowPlayer ()
// do the parallax parchment scrolling.
sx = (players[consoleplayer].camera->x - f_oldloc.x) >> FRACTOMAPBITS;
sy = (f_oldloc.y - players[consoleplayer].camera->y) >> FRACTOMAPBITS;
if (am_rotate)
if (am_rotate == 1 || (am_rotate == 2 && viewactive))
{
AM_rotate (&sx, &sy, players[consoleplayer].camera->angle - ANG90);
}
@ -1769,7 +1769,7 @@ void AM_drawGrid (int color)
ml.b.x = x;
ml.a.y = miny - exty;
ml.b.y = ml.a.y + minlen;
if (am_rotate)
if (am_rotate == 1 || (am_rotate == 2 && viewactive))
{
AM_rotatePoint (&ml.a.x, &ml.a.y);
AM_rotatePoint (&ml.b.x, &ml.b.y);
@ -1791,7 +1791,7 @@ void AM_drawGrid (int color)
ml.b.x = ml.a.x + minlen;
ml.a.y = y;
ml.b.y = y;
if (am_rotate)
if (am_rotate == 1 || (am_rotate == 2 && viewactive))
{
AM_rotatePoint (&ml.a.x, &ml.a.y);
AM_rotatePoint (&ml.b.x, &ml.b.y);
@ -1816,7 +1816,7 @@ void AM_drawWalls (bool allmap)
l.b.x = lines[i].v2->x >> FRACTOMAPBITS;
l.b.y = lines[i].v2->y >> FRACTOMAPBITS;
if (am_rotate)
if (am_rotate == 1 || (am_rotate == 2 && viewactive))
{
AM_rotatePoint (&l.a.x, &l.a.y);
AM_rotatePoint (&l.b.x, &l.b.y);
@ -1992,7 +1992,7 @@ void AM_drawPlayers ()
if (!multiplayer)
{
if (am_rotate)
if (am_rotate == 1 || (am_rotate == 2 && viewactive))
angle = ANG90;
else
angle = players[consoleplayer].camera->angle;
@ -2047,7 +2047,7 @@ void AM_drawPlayers ()
pt.y = p->mo->y >> FRACTOMAPBITS;
angle = p->mo->angle;
if (am_rotate)
if (am_rotate == 1 || (am_rotate == 2 && viewactive))
{
AM_rotatePoint (&pt.x, &pt.y);
angle -= players[consoleplayer].camera->angle - ANG90;
@ -2077,7 +2077,7 @@ void AM_drawThings (int _color)
p.y = t->y >> FRACTOMAPBITS;
angle = t->angle;
if (am_rotate)
if (am_rotate == 1 || (am_rotate == 2 && viewactive))
{
AM_rotatePoint (&p.x, &p.y);
angle += ANG90 - players[consoleplayer].camera->angle;
@ -2131,7 +2131,7 @@ void AM_drawMarks ()
pt.x = markpoints[i].x;
pt.y = markpoints[i].y;
if (am_rotate)
if (am_rotate == 1 || (am_rotate == 2 && viewactive))
AM_rotatePoint (&pt.x, &pt.y);
fx = CXMTOF(pt.x);

View file

@ -531,7 +531,7 @@ menu_t VideoMenu =
*=======================================*/
static void StartMapColorsMenu (void);
EXTERN_CVAR (Bool, am_rotate)
EXTERN_CVAR (Int, am_rotate)
EXTERN_CVAR (Int, am_overlay)
EXTERN_CVAR (Bool, am_usecustomcolors)
EXTERN_CVAR (Bool, am_showitems)
@ -553,17 +553,23 @@ static value_t SecretTypes[] = {
{ 2, "Always" },
};
static value_t OverlayTypes[] = {
static value_t RotateTypes[] = {
{ 0, "Off" },
{ 1, "On" },
{ 2, "Exclusively" }
{ 2, "On for overlay only" }
};
static value_t OverlayTypes[] = {
{ 0, "Off" },
{ 1, "Overlay+Normal" },
{ 2, "Overlay Only" }
};
static menuitem_t AutomapItems[] = {
{ discrete, "Map color set", {&am_usecustomcolors}, {2.0}, {0.0}, {0.0}, {MapColorTypes} },
{ more, "Set custom colors", {NULL}, {0.0}, {0.0}, {0.0}, {(value_t*)StartMapColorsMenu} },
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
{ discrete, "Rotate automap", {&am_rotate}, {2.0}, {0.0}, {0.0}, {OnOff} },
{ discrete, "Rotate automap", {&am_rotate}, {3.0}, {0.0}, {0.0}, {RotateTypes} },
{ discrete, "Overlay automap", {&am_overlay}, {3.0}, {0.0}, {0.0}, {OverlayTypes} },
{ redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} },
{ discrete, "Show item counts", {&am_showitems}, {2.0}, {0.0}, {0.0}, {OnOff} },
@ -572,7 +578,7 @@ static menuitem_t AutomapItems[] = {
{ discrete, "Show time elapsed", {&am_showtime}, {2.0}, {0.0}, {0.0}, {OnOff} },
{ discrete, "Show total time elapsed", {&am_showtotaltime}, {2.0}, {0.0}, {0.0}, {OnOff} },
{ discrete, "Show secrets on map", {&am_map_secrets}, {3.0}, {0.0}, {0.0}, {SecretTypes} },
{ discrete, "Draw automap background", {&am_drawmapback}, {2.0}, {0.0}, {0.0}, {OnOff} },
{ discrete, "Draw map background", {&am_drawmapback}, {2.0}, {0.0}, {0.0}, {OnOff} },
};
menu_t AutomapMenu =