Permalink
Browse files

fixes #4690: abolish special pixelated look for non-rotating minimaps…

… whose size is divisible by 16
  • Loading branch information...
Forgon2100
Forgon2100 committed Dec 14, 2017
1 parent d3410d0 commit d8b75113658a44a3489738429879c7c1a0a272e8
Showing with 4 additions and 5 deletions.
  1. +2 −2 lib/ivis_opengl/pieblitfunc.cpp
  2. +1 −1 lib/ivis_opengl/pieblitfunc.h
  3. +1 −2 src/radar.cpp
@@ -529,9 +529,9 @@ bool pie_ShutdownRadar()
return true;
}
void pie_SetRadar(GLfloat x, GLfloat y, GLfloat width, GLfloat height, int twidth, int theight, bool filter)
void pie_SetRadar(GLfloat x, GLfloat y, GLfloat width, GLfloat height, int twidth, int theight)
{
radarGfx->makeTexture(twidth, theight, filter ? GL_LINEAR : GL_NEAREST);
radarGfx->makeTexture(twidth, theight, GL_LINEAR);
GLfloat texcoords[] = { 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f };
GLfloat vertices[] = { x, y, x + width, y, x, y + height, x + width, y + height };
radarGfx->buffers(4, vertices, texcoords);
@@ -144,7 +144,7 @@ bool pie_InitRadar();
bool pie_ShutdownRadar();
void pie_DownLoadRadar(UDWORD *buffer);
void pie_RenderRadar(const glm::mat4 &modelViewProjectionMatrix);
void pie_SetRadar(GLfloat x, GLfloat y, GLfloat width, GLfloat height, int twidth, int theight, bool filter);
void pie_SetRadar(GLfloat x, GLfloat y, GLfloat width, GLfloat height, int twidth, int theight);
enum SCREENTYPE
{
View
@@ -158,8 +158,7 @@ bool resizeRadar()
memset(radarBuffer, 0, radarBufferSize);
debug(LOG_WZ, "Setting radar zoom to %u", RadarZoom);
radarSize(RadarZoom);
pie_SetRadar(-radarWidth / 2.0 - 1, -radarHeight / 2.0 - 1, radarWidth, radarHeight,
radarTexWidth, radarTexHeight, rotateRadar || (RadarZoom % 16 != 0));
pie_SetRadar(-radarWidth / 2.0 - 1, -radarHeight / 2.0 - 1, radarWidth, radarHeight, radarTexWidth, radarTexHeight);
setViewingWindow();
return true;

0 comments on commit d8b7511

Please sign in to comment.