From f867f40babe4b4769b0330cb35fae86c184c8ea2 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sat, 7 Feb 2009 00:07:55 +0000 Subject: [PATCH] - Fixed scrolling of the automap background on a rotated automap. SVN r1408 (trunk) --- docs/rh-log.txt | 3 +++ src/am_map.cpp | 11 +++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index bb9ae4a19..aa679c8d5 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,6 @@ +February 6, 2009 +- Fixed scrolling of the automap background on a rotating automap. + February 5, 2009 - Changed singleplayer allowrespawn to act like a co-op game when you change levels while dead by immediately respawning you before the switch diff --git a/src/am_map.cpp b/src/am_map.cpp index 0de79fc0d..45468ce96 100644 --- a/src/am_map.cpp +++ b/src/am_map.cpp @@ -593,10 +593,13 @@ void AM_changeWindowLoc () } int oldmx = m_x, oldmy = m_y; - fixed_t incx = m_paninc.x, incy = m_paninc.y; + fixed_t incx, incy, oincx, oincy; + + incx = m_paninc.x; + incy = m_paninc.y; - incx = Scale(m_paninc.x, SCREENWIDTH, 320); - incy = Scale(m_paninc.y, SCREENHEIGHT, 200); + oincx = incx = Scale(m_paninc.x, SCREENWIDTH, 320); + oincy = incy = Scale(m_paninc.y, SCREENHEIGHT, 200); if (am_rotate == 1 || (am_rotate == 2 && viewactive)) { AM_rotate(&incx, &incy, players[consoleplayer].camera->angle - ANG90); @@ -606,7 +609,7 @@ void AM_changeWindowLoc () m_y += incy; AM_ClipRotatedExtents (oldmx + m_w/2, oldmy + m_h/2); - AM_ScrollParchment (m_x - oldmx, oldmy - m_y); + AM_ScrollParchment (m_x != oldmx ? oincx : 0, m_y != oldmy ? -oincy : 0); }