(svn r11475) -Codechange: rename clamp and clampu to Clamp and ClampU to fit with the coding style

This commit is contained in:
skidd13
2007-11-19 18:38:10 +00:00
parent 9e385d2427
commit 98f66552be
39 changed files with 108 additions and 108 deletions

View File

@@ -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 ];
}

View File

@@ -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;
}

View File

@@ -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");