From 1c26f7ddd5dcd36a903561d03343c405abe3a60f Mon Sep 17 00:00:00 2001 From: Christian Ohm Date: Thu, 28 Jan 2010 16:27:29 +0000 Subject: [PATCH] Fix a few graphical off-by-one errors. Put the bottom left menu one pixel to the right, so the distance to both bottom and left edge is 24 pixels. Move the menu buttons two pixels up, so it's in the middle. Put the radar into the middle of its border. Make the bright rectangle fill the complete selection. git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9548 4a71c877-e1ca-e34f-864e-861f7616d084 --- src/display3d.c | 2 +- src/hci.c | 14 +++++++------- src/hci.h | 2 +- src/radar.c | 10 +++++----- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/display3d.c b/src/display3d.c index 514a036cc..621383e3d 100644 --- a/src/display3d.c +++ b/src/display3d.c @@ -2726,7 +2726,7 @@ static void drawDragBox( void ) pie_SetDepthBufferStatus(DEPTH_CMP_ALWAYS_WRT_OFF); iV_Box(minX, minY, maxX, maxY, WZCOL_UNIT_SELECT_BORDER); - pie_UniTransBoxFill(minX + 1, minY + 1, maxX - 1, maxY - 1, WZCOL_UNIT_SELECT_BOX); + pie_UniTransBoxFill(minX + 1, minY, maxX, maxY - 1, WZCOL_UNIT_SELECT_BOX); pie_SetDepthBufferStatus(DEPTH_CMP_LEQ_WRT_ON); } } diff --git a/src/hci.c b/src/hci.c index 98fdc57f1..7740f79ae 100644 --- a/src/hci.c +++ b/src/hci.c @@ -108,13 +108,13 @@ typedef struct { } BUTOFFSET; BUTOFFSET ReticuleOffsets[NUMRETBUTS] = { // Reticule button form relative positions. - {48,49}, // RETBUT_CANCEL, - {53,17}, // RETBUT_FACTORY, - {87,35}, // RETBUT_RESEARCH, - {87,70}, // RETBUT_BUILD, - {53,88}, // RETBUT_DESIGN, - {19,70}, // RETBUT_INTELMAP, - {19,35}, // RETBUT_COMMAND, + {48,47}, // RETBUT_CANCEL, + {53,15}, // RETBUT_FACTORY, + {87,33}, // RETBUT_RESEARCH, + {87,68}, // RETBUT_BUILD, + {53,86}, // RETBUT_DESIGN, + {19,68}, // RETBUT_INTELMAP, + {19,33}, // RETBUT_COMMAND, }; BUTSTATE ReticuleEnabled[NUMRETBUTS] = { // Reticule button enable states. diff --git a/src/hci.h b/src/hci.h index 6a8257fe2..dd1e23d2b 100644 --- a/src/hci.h +++ b/src/hci.h @@ -115,7 +115,7 @@ extern "C" #define IDSTAT_ALLYEND 4900 // Reticule position. -#define RET_X 23 +#define RET_X 24 #define RET_Y (324+E_H) #define RET_FORMWIDTH 132 #define RET_FORMHEIGHT 132 diff --git a/src/radar.c b/src/radar.c index dfe619cc6..cb789b429 100644 --- a/src/radar.c +++ b/src/radar.c @@ -264,19 +264,19 @@ void drawRadar(void) DrawNorth(); } // draw the box at the dimensions of the map - iV_TransBoxFill(-radarWidth/2.0, - -radarHeight/2.0, + iV_TransBoxFill(-radarWidth/2.0 - 1, + -radarHeight/2.0 - 1, radarWidth/2.0, radarHeight/2.0); - pie_RenderRadar(-radarWidth/2.0, - -radarHeight/2.0, + pie_RenderRadar(-radarWidth/2.0 - 1, + -radarHeight/2.0 - 1, radarWidth, radarHeight); pie_MatBegin(); pie_TRANSLATE(-radarWidth/2 - 1, -radarHeight/2 - 1, 0); DrawRadarExtras(0, 0, pixSizeH, pixSizeV); pie_MatEnd(); - drawRadarBlips(-radarWidth/2.0, -radarHeight/2.0, pixSizeH, pixSizeV); + drawRadarBlips(-radarWidth/2.0 - 1, -radarHeight/2.0 - 1, pixSizeH, pixSizeV); pie_MatEnd(); }