Skip to content

Commit 77eb33c

Browse files
committed
Replace more values
1 parent e76db9a commit 77eb33c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

GeneralsMD/Code/GameEngine/Source/GameClient/GlobalLanguage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ void GlobalLanguage::parseFontFileName( INI *ini, void * instance, void *store,
191191

192192
Int GlobalLanguage::adjustFontSize(Int theFontSize)
193193
{
194-
Real adjustFactor = TheGlobalData->m_xResolution/800.0f;
194+
Real adjustFactor = TheGlobalData->m_xResolution / (Real)DEFAULT_DISPLAY_WIDTH;
195195
adjustFactor = 1.0f + (adjustFactor-1.0f) * m_resolutionFontSizeAdjustment;
196196
if (adjustFactor<1.0f) adjustFactor = 1.0f;
197197
if (adjustFactor>2.0f) adjustFactor = 2.0f;

GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/GUI/GUICallbacks/W3DMainMenu.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ static void advancePosition(GameWindow *window, const Image *image, UnsignedInt
108108
}
109109
static Int Width = size.x + image->getImageWidth();
110110

111-
static Int x = -800;
111+
static Int x = -DEFAULT_DISPLAY_WIDTH;
112112
static Int y = pos.y - (image->getImageHeight()/2);
113113

114114
static UnsignedInt m_startTime = timeGetTime();

GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/GUI/Gadget/W3DHorizontalSlider.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ void W3DGadgetHorizontalSliderImageDraw( GameWindow *window,
150150

151151
SliderData *s = (SliderData *)window->winGetUserData();
152152

153-
Real xMulti = INT_TO_REAL(TheDisplay->getWidth()) / 800;
153+
Real xMulti = INT_TO_REAL(TheDisplay->getWidth()) / DEFAULT_DISPLAY_WIDTH;
154154

155155
// figure out how many boxes we draw for this slider
156156
Int numBoxes = 0;
@@ -229,8 +229,8 @@ void W3DGadgetHorizontalSliderImageDrawB( GameWindow *window,
229229

230230
SliderData *s = (SliderData *)window->winGetUserData();
231231

232-
Real xMulti = INT_TO_REAL(TheDisplay->getWidth()) / 800;
233-
Real yMulti = INT_TO_REAL(TheDisplay->getHeight())/ 600;
232+
Real xMulti = INT_TO_REAL(TheDisplay->getWidth()) / DEFAULT_DISPLAY_WIDTH;
233+
Real yMulti = INT_TO_REAL(TheDisplay->getHeight()) / DEFAULT_DISPLAY_HEIGHT;
234234
// get image offset
235235
xOffset = instData->m_imageOffset.x;
236236
yOffset = instData->m_imageOffset.y;

0 commit comments

Comments
 (0)