summaryrefslogtreecommitdiff
path: root/src/video
diff options
context:
space:
mode:
authorskidd13 <skidd13@openttd.org>2007-11-19 18:38:10 +0000
committerskidd13 <skidd13@openttd.org>2007-11-19 18:38:10 +0000
commit8be526e4990ef8c7a742e6f3f67a42d0036750eb (patch)
tree7818a2f346fc9a85d84a2a844989ea1a90136b90 /src/video
parent006acff1834d37ba4b1553ba324c255a6cc2382e (diff)
downloadopenttd-8be526e4990ef8c7a742e6f3f67a42d0036750eb.tar.xz
(svn r11475) -Codechange: rename clamp and clampu to Clamp and ClampU to fit with the coding style
Diffstat (limited to 'src/video')
-rw-r--r--src/video/cocoa_v.mm2
-rw-r--r--src/video/sdl_v.cpp4
-rw-r--r--src/video/win32_v.cpp8
3 files changed, 7 insertions, 7 deletions
diff --git a/src/video/cocoa_v.mm b/src/video/cocoa_v.mm
index 0a23871dc..fd8a7cb90 100644
--- a/src/video/cocoa_v.mm
+++ b/src/video/cocoa_v.mm
@@ -1244,7 +1244,7 @@ static const char* QZ_SetVideoWindowed(uint width, uint height)
if (!isCustom) {
[ _cocoa_video_data.window setContentSize:contentRect.size ];
// Ensure frame height - title bar height >= view height
- contentRect.size.height = clamp(height, 0, [ _cocoa_video_data.window frame ].size.height - 22 /* 22 is the height of title bar of window*/);
+ contentRect.size.height = Clamp(height, 0, [ _cocoa_video_data.window frame ].size.height - 22 /* 22 is the height of title bar of window*/);
height = contentRect.size.height;
[ _cocoa_video_data.qdview setFrameSize:contentRect.size ];
}
diff --git a/src/video/sdl_v.cpp b/src/video/sdl_v.cpp
index 6c33e379b..aa1addc34 100644
--- a/src/video/sdl_v.cpp
+++ b/src/video/sdl_v.cpp
@@ -420,8 +420,8 @@ static int PollEvent()
break;
case SDL_VIDEORESIZE: {
- int w = clamp(ev.resize.w, 64, MAX_SCREEN_WIDTH);
- int h = clamp(ev.resize.h, 64, MAX_SCREEN_HEIGHT);
+ int w = Clamp(ev.resize.w, 64, MAX_SCREEN_WIDTH);
+ int h = Clamp(ev.resize.h, 64, MAX_SCREEN_HEIGHT);
ChangeResInGame(w, h);
break;
}
diff --git a/src/video/win32_v.cpp b/src/video/win32_v.cpp
index 2b6b01784..03728090c 100644
--- a/src/video/win32_v.cpp
+++ b/src/video/win32_v.cpp
@@ -545,8 +545,8 @@ static LRESULT CALLBACK WndProcGdi(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
w = r->right - r->left - (r2.right - r2.left);
h = r->bottom - r->top - (r2.bottom - r2.top);
- w = clamp(w, 64, MAX_SCREEN_WIDTH);
- h = clamp(h, 64, MAX_SCREEN_HEIGHT);
+ w = Clamp(w, 64, MAX_SCREEN_WIDTH);
+ h = Clamp(h, 64, MAX_SCREEN_HEIGHT);
SetRect(&r2, 0, 0, w, h);
AdjustWindowRect(&r2, GetWindowLong(hwnd, GWL_STYLE), FALSE);
@@ -677,8 +677,8 @@ static bool AllocateDibSection(int w, int h)
HDC dc;
int bpp = BlitterFactoryBase::GetCurrentBlitter()->GetScreenDepth();
- w = clamp(w, 64, MAX_SCREEN_WIDTH);
- h = clamp(h, 64, MAX_SCREEN_HEIGHT);
+ w = Clamp(w, 64, MAX_SCREEN_WIDTH);
+ h = Clamp(h, 64, MAX_SCREEN_HEIGHT);
if (bpp == 0) error("Can't use a blitter that blits 0 bpp for normal visuals");