Files
@ r7596:afd285ff90bb
Branch filter:
Location: cpp/openttd-patchpack/source/src/zoom.hpp - annotation
r7596:afd285ff90bb
1.4 KiB
text/x-c++hdr
(svn r11123) -Update: WebTranslator2 update to 2007-09-17 12:45:29
afrikaans - 47 fixed, 52 changed by TrueTenacity (99)
brazilian_portuguese - 23 changed by fukumori (23)
bulgarian - 14 fixed by thetitan (14)
catalan - 3 changed by arnaullv (3)
croatian - 6 fixed, 12 changed by knovak (15), tperic (3)
danish - 20 fixed by ThomasA (20)
finnish - 20 fixed by habazi (20)
german - 10 fixed by Timwi (10)
hungarian - 1 fixed by miham (1)
italian - 1 fixed by lorenzodv (1)
japanese - 6 fixed by ickoonite (6)
norwegian_nynorsk - 6 fixed by pollux (6)
piglatin - 20 fixed by adammw (20)
russian - 20 fixed by Smoky555 (20)
slovak - 1 fixed by lengyel (1)
slovenian - 7 fixed by Necrolyte (7)
spanish - 1 changed by Cabu (1)
traditional_chinese - 21 fixed by xbddc (21)
afrikaans - 47 fixed, 52 changed by TrueTenacity (99)
brazilian_portuguese - 23 changed by fukumori (23)
bulgarian - 14 fixed by thetitan (14)
catalan - 3 changed by arnaullv (3)
croatian - 6 fixed, 12 changed by knovak (15), tperic (3)
danish - 20 fixed by ThomasA (20)
finnish - 20 fixed by habazi (20)
german - 10 fixed by Timwi (10)
hungarian - 1 fixed by miham (1)
italian - 1 fixed by lorenzodv (1)
japanese - 6 fixed by ickoonite (6)
norwegian_nynorsk - 6 fixed by pollux (6)
piglatin - 20 fixed by adammw (20)
russian - 20 fixed by Smoky555 (20)
slovak - 1 fixed by lengyel (1)
slovenian - 7 fixed by Necrolyte (7)
spanish - 1 changed by Cabu (1)
traditional_chinese - 21 fixed by xbddc (21)
r6624:8e8cb5121304 r6624:8e8cb5121304 r6624:8e8cb5121304 r6624:8e8cb5121304 r6624:8e8cb5121304 r6624:8e8cb5121304 r6624:8e8cb5121304 r6624:8e8cb5121304 r6624:8e8cb5121304 r6624:8e8cb5121304 r6624:8e8cb5121304 r6624:8e8cb5121304 r6653:8767c847638f r6624:8e8cb5121304 r6624:8e8cb5121304 r6624:8e8cb5121304 r6624:8e8cb5121304 r6624:8e8cb5121304 r6624:8e8cb5121304 r6624:8e8cb5121304 r6624:8e8cb5121304 r6624:8e8cb5121304 r6624:8e8cb5121304 r6624:8e8cb5121304 r6624:8e8cb5121304 r6626:a882a4aaa61c r6852:5b6b567a9e32 r6626:a882a4aaa61c r6626:a882a4aaa61c r6853:39397cc729b3 r6624:8e8cb5121304 r6624:8e8cb5121304 r6624:8e8cb5121304 r6624:8e8cb5121304 r6626:a882a4aaa61c r6626:a882a4aaa61c r6653:8767c847638f r6626:a882a4aaa61c r6833:49cfb0cbd58d r6626:a882a4aaa61c r6626:a882a4aaa61c r6626:a882a4aaa61c r6626:a882a4aaa61c r6653:8767c847638f r6626:a882a4aaa61c r6831:5a8208bdbe9b r6626:a882a4aaa61c r6626:a882a4aaa61c r6624:8e8cb5121304 | /* $Id$ */
/** @file zoom.hpp */
#ifndef ZOOM_HPP
#define ZOOM_HPP
enum ZoomLevel {
/* Our possible zoom-levels */
ZOOM_LVL_NORMAL = 0,
ZOOM_LVL_OUT_2X,
ZOOM_LVL_OUT_4X,
ZOOM_LVL_OUT_8X,
ZOOM_LVL_END,
/* Here we define in which zoom viewports are */
ZOOM_LVL_VIEWPORT = ZOOM_LVL_NORMAL,
ZOOM_LVL_NEWS = ZOOM_LVL_NORMAL,
ZOOM_LVL_INDUSTRY = ZOOM_LVL_OUT_2X,
ZOOM_LVL_TOWN = ZOOM_LVL_OUT_2X,
ZOOM_LVL_AIRCRAFT = ZOOM_LVL_NORMAL,
ZOOM_LVL_SHIP = ZOOM_LVL_NORMAL,
ZOOM_LVL_TRAIN = ZOOM_LVL_NORMAL,
ZOOM_LVL_ROADVEH = ZOOM_LVL_NORMAL,
ZOOM_LVL_WORLD_SCREENSHOT = ZOOM_LVL_NORMAL,
ZOOM_LVL_DETAIL = ZOOM_LVL_OUT_2X, ///< All zoomlevels below or equal to this, will result in details on the screen, like road-work, ...
ZOOM_LVL_MIN = ZOOM_LVL_NORMAL,
ZOOM_LVL_MAX = ZOOM_LVL_OUT_8X,
};
extern ZoomLevel _saved_scrollpos_zoom;
static inline int ScaleByZoom(int value, ZoomLevel zoom)
{
if (zoom == ZOOM_LVL_NORMAL) return value;
int izoom = (int)zoom - (int)ZOOM_LVL_NORMAL;
return (zoom > ZOOM_LVL_NORMAL) ? value << izoom : (value + (1 << -izoom) - 1) >> -izoom;
}
static inline int UnScaleByZoom(int value, ZoomLevel zoom)
{
if (zoom == ZOOM_LVL_NORMAL) return value;
int izoom = (int)zoom - (int)ZOOM_LVL_NORMAL;
return (zoom > ZOOM_LVL_NORMAL) ? (value + (1 << izoom) - 1) >> izoom : value << -izoom;
}
#endif /* ZOOM_HPP */
|