(svn r27134) -Codechange: Simplify GUI scaling by adding UnScaleGUI() and ScaleGUITrad().

This commit is contained in:
frosch
2015-02-01 20:54:24 +00:00
parent 3bc7ee3ab7
commit a8080b6256
25 changed files with 176 additions and 141 deletions

View File

@@ -1532,10 +1532,10 @@ void UpdateCursorSize()
CursorVars *cv = &_cursor;
const Sprite *p = GetSprite(GB(cv->sprite, 0, SPRITE_WIDTH), ST_NORMAL);
cv->size.y = UnScaleByZoom(p->height, ZOOM_LVL_GUI);
cv->size.x = UnScaleByZoom(p->width, ZOOM_LVL_GUI);
cv->offs.x = UnScaleByZoom(p->x_offs, ZOOM_LVL_GUI);
cv->offs.y = UnScaleByZoom(p->y_offs, ZOOM_LVL_GUI);
cv->size.y = UnScaleGUI(p->height);
cv->size.x = UnScaleGUI(p->width);
cv->offs.x = UnScaleGUI(p->x_offs);
cv->offs.y = UnScaleGUI(p->y_offs);
cv->dirty = true;
}