diff --git a/code/cgame/FxScheduler.cpp b/code/cgame/FxScheduler.cpp index 52df10c..85904c3 100644 --- a/code/cgame/FxScheduler.cpp +++ b/code/cgame/FxScheduler.cpp @@ -745,7 +745,7 @@ void CFxScheduler::PlayEffect( const char *file, int clientID ) if ( prim->mSpawnFlags & FX_EVEN_DISTRIBUTION ) { - factor = abs(prim->mSpawnDelay.GetMax() - prim->mSpawnDelay.GetMin()) / (float)count; + factor = abs((long)(prim->mSpawnDelay.GetMax() - prim->mSpawnDelay.GetMin())) / (float)count; } // Schedule the random number of bits @@ -1035,7 +1035,7 @@ void CFxScheduler::PlayEffect( int id, vec3_t origin, vec3_t axis[3], const int if ( prim->mSpawnFlags & FX_EVEN_DISTRIBUTION ) { - factor = abs(prim->mSpawnDelay.GetMax() - prim->mSpawnDelay.GetMin()) / (float)count; + factor = abs((long)(prim->mSpawnDelay.GetMax() - prim->mSpawnDelay.GetMin())) / (float)count; } // Schedule the random number of bits diff --git a/code/cgame/cg_credits.cpp b/code/cgame/cg_credits.cpp index 3c177ed..e595c21 100644 --- a/code/cgame/cg_credits.cpp +++ b/code/cgame/cg_credits.cpp @@ -586,7 +586,7 @@ qboolean CG_Credits_Draw( void ) int iYpos = SCREEN_HEIGHT + (CreditLine.iLine * iFontHeight); iYpos-= (int) (fPixelsPerSecond * fSecondsElapsed); - int iTextLinesThisItem = max(CreditLine.vstrText.size(),1); + int iTextLinesThisItem = max((int)CreditLine.vstrText.size(),1); if (iYpos + (iTextLinesThisItem * iFontHeight) < 0) { // scrolled off top of screen, so erase it... diff --git a/code/client/cl_cin.cpp b/code/client/cl_cin.cpp index 9396319..77a5156 100644 --- a/code/client/cl_cin.cpp +++ b/code/client/cl_cin.cpp @@ -1319,7 +1319,7 @@ e_status CIN_RunCinematic (int handle) } thisTime = Sys_Milliseconds()*com_timescale->value; - if (cinTable[currentHandle].shader && (abs(thisTime - cinTable[currentHandle].lastTime))>100) { + if (cinTable[currentHandle].shader && (abs((long)(thisTime - cinTable[currentHandle].lastTime)))>100) { cinTable[currentHandle].startTime += thisTime - cinTable[currentHandle].lastTime; } cinTable[currentHandle].tfps = ((((Sys_Milliseconds()*com_timescale->value) - cinTable[currentHandle].startTime)*cinTable[currentHandle].roqFPS)/1000); diff --git a/code/client/cl_input.cpp b/code/client/cl_input.cpp index 0197e35..76af8a0 100644 --- a/code/client/cl_input.cpp +++ b/code/client/cl_input.cpp @@ -559,10 +559,10 @@ usercmd_t CL_CreateCmd( void ) { // draw debug graphs of turning for mouse testing if ( cl_debugMove->integer ) { if ( cl_debugMove->integer == 1 ) { - SCR_DebugGraph( abs(cl.viewangles[YAW] - oldAngles[YAW]), 0 ); + SCR_DebugGraph( abs((long)(cl.viewangles[YAW] - oldAngles[YAW])), 0 ); } if ( cl_debugMove->integer == 2 ) { - SCR_DebugGraph( abs(cl.viewangles[PITCH] - oldAngles[PITCH]), 0 ); + SCR_DebugGraph( abs((long)(cl.viewangles[PITCH] - oldAngles[PITCH])), 0 ); } } diff --git a/code/ui/ui_main.cpp b/code/ui/ui_main.cpp index a63af70..1a51858 100644 --- a/code/ui/ui_main.cpp +++ b/code/ui/ui_main.cpp @@ -287,8 +287,8 @@ void Text_PaintWithCursor(float x, float y, float scale, vec4_t color, const cha // now print the cursor as well... // char sTemp[1024]; - int iCopyCount = min(strlen(text), cursorPos); - iCopyCount = min(iCopyCount,sizeof(sTemp)); + int iCopyCount = min((int)strlen(text), cursorPos); + iCopyCount = min(iCopyCount,(int)sizeof(sTemp)); // copy text into temp buffer for pixel measure... // diff --git a/code/ui/ui_shared.cpp b/code/ui/ui_shared.cpp index a18c9b6..23e486f 100644 --- a/code/ui/ui_shared.cpp +++ b/code/ui/ui_shared.cpp @@ -1587,10 +1587,10 @@ void Menu_TransitionItemByName(menuDef_t *menu, const char *p, rectDef_t rectFro item->window.offsetTime = time; memcpy(&item->window.rectClient, &rectFrom, sizeof(rectDef_t)); memcpy(&item->window.rectEffects, &rectTo, sizeof(rectDef_t)); - item->window.rectEffects2.x = abs(rectTo.x - rectFrom.x) / amt; - item->window.rectEffects2.y = abs(rectTo.y - rectFrom.y) / amt; - item->window.rectEffects2.w = abs(rectTo.w - rectFrom.w) / amt; - item->window.rectEffects2.h = abs(rectTo.h - rectFrom.h) / amt; + item->window.rectEffects2.x = abs((int)(rectTo.x - rectFrom.x)) / amt; + item->window.rectEffects2.y = abs((int)(rectTo.y - rectFrom.y)) / amt; + item->window.rectEffects2.w = abs((int)(rectTo.w - rectFrom.w)) / amt; + item->window.rectEffects2.h = abs((int)(rectTo.h - rectFrom.h)) / amt; Item_UpdatePosition(item); } }