Skip to content

Commit

Permalink
Fixed centering of the automap so the origin is always in the center …
Browse files Browse the repository at this point in the history
…of the automap window. Fixed alignment of the mask texture so that it always stretches to fit the automap window dimensions.
  • Loading branch information
danij committed Jan 26, 2009
1 parent ca88c5e commit ca4ad39
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions doomsday/plugins/common/src/am_map.c
Expand Up @@ -3482,8 +3482,7 @@ void AM_Drawer(int viewplayer)
setupGLStateForMap();

DGL_MatrixMode(DGL_PROJECTION);
DGL_Translatef(FIXXTOSCREENX(SCREENWIDTH / 2),
FIXYTOSCREENY(SCREENHEIGHT / 2), 0);
DGL_Translatef(win->x + win->width / 2, win->y + win->height / 2, 0);
DGL_Rotatef(map->angle, 0, 0, 1);
DGL_Scalef(1, -1, 1);
DGL_Scalef(map->scaleMTOF, map->scaleMTOF, 1);
Expand All @@ -3503,10 +3502,8 @@ void AM_Drawer(int viewplayer)
DGL_LoadIdentity();

DGL_PushMatrix();
DGL_Scalef(1.f / FIXXTOSCREENX(SCREENWIDTH),
1.f / FIXYTOSCREENY(SCREENHEIGHT), 1);
DGL_Translatef(FIXXTOSCREENX(SCREENWIDTH / 2),
FIXYTOSCREENY(SCREENHEIGHT / 2), 0);
DGL_Scalef(1.f / win->width, 1.f / win->height, 1);
DGL_Translatef(win->width / 2, win->height / 2, 0);
DGL_Rotatef(-map->angle, 0, 0, 1);
DGL_Scalef(map->scaleMTOF, map->scaleMTOF, 1);
DGL_Translatef(-map->viewX , -map->viewY, 0);
Expand Down

0 comments on commit ca4ad39

Please sign in to comment.