Handle different resolutions
This commit is contained in:
parent
70d5e11719
commit
7d5aa32c79
4 changed files with 14 additions and 14 deletions
7
game.h
7
game.h
|
@ -306,9 +306,8 @@ static inline void LCR_gameDrawPixelXYSafe(unsigned int x, unsigned int y,
|
|||
|
||||
#define LCR_POPUP_STR_SIZE 16
|
||||
|
||||
|
||||
#define LCR_GUI_GAP \
|
||||
((LCR_EFFECTIVE_RESOLUTION_X + LCR_EFFECTIVE_RESOLUTION_Y) / 128)
|
||||
(1 + (LCR_EFFECTIVE_RESOLUTION_X + LCR_EFFECTIVE_RESOLUTION_Y) / 128)
|
||||
|
||||
struct
|
||||
{
|
||||
|
@ -1268,7 +1267,7 @@ void LCR_gameDraw3DView(void)
|
|||
str[2] = '0' + val % 10;
|
||||
str[3] = 0;
|
||||
|
||||
LCR_rendererDrawText(str,LCR_EFFECTIVE_RESOLUTION_X -
|
||||
LCR_rendererDrawText(str,LCR_EFFECTIVE_RESOLUTION_X - // speed (bot., right)
|
||||
LCR_rendererComputeTextWidth(str,2) - LCR_GUI_GAP,
|
||||
LCR_EFFECTIVE_RESOLUTION_Y - LCR_rendererComputeTextHeight(2) -
|
||||
LCR_GUI_GAP,0,2);
|
||||
|
@ -1277,7 +1276,7 @@ void LCR_gameDraw3DView(void)
|
|||
|
||||
if (LCR_game.state != LCR_GAME_STATE_RUN_FINISHED)
|
||||
LCR_rendererDrawText(str,LCR_GUI_GAP,LCR_EFFECTIVE_RESOLUTION_Y -
|
||||
LCR_rendererComputeTextHeight(2) - 3 * LCR_GUI_GAP,0,2);
|
||||
2 * (LCR_rendererComputeTextHeight(2) + LCR_GUI_GAP),0,2);
|
||||
else
|
||||
LCR_rendererDrawText(str,((LCR_EFFECTIVE_RESOLUTION_X -
|
||||
LCR_rendererComputeTextWidth(str,4)) / 2),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue