From 617557b08ea94e2b65a1697ddf0b79651204d92b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 1 Apr 2014 11:34:00 +1100 Subject: Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT define --- source/gameengine/Converter/BL_ArmatureObject.cpp | 2 +- source/gameengine/Converter/BL_BlenderDataConversion.cpp | 6 +++--- source/gameengine/Expressions/IfExpr.cpp | 4 ++-- source/gameengine/GamePlayer/ghost/GPG_Application.cpp | 12 ++++++------ source/gameengine/GamePlayer/ghost/GPG_ghost.cpp | 4 ++-- source/gameengine/Rasterizer/RAS_TexVert.cpp | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-) (limited to 'source/gameengine') diff --git a/source/gameengine/Converter/BL_ArmatureObject.cpp b/source/gameengine/Converter/BL_ArmatureObject.cpp index 34d706eff03..619797a8c69 100644 --- a/source/gameengine/Converter/BL_ArmatureObject.cpp +++ b/source/gameengine/Converter/BL_ArmatureObject.cpp @@ -114,7 +114,7 @@ void game_copy_pose(bPose **dst, bPose *src, int copy_constraint) ListBase listb; // copy all constraint for backward compatibility // BKE_copy_constraints NULLs listb, no need to make extern for this operation. - BKE_copy_constraints(&listb, &pchan->constraints, FALSE); + BKE_copy_constraints(&listb, &pchan->constraints, false); pchan->constraints= listb; } else { diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index e604b7bf81f..4b55d73178c 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -2010,7 +2010,7 @@ static KX_GameObject *gameobject_from_blenderobject( case OB_CURVE: { if (ob->curve_cache == NULL) { - BKE_displist_make_curveTypes(blenderscene, ob, FALSE); + BKE_displist_make_curveTypes(blenderscene, ob, false); } } #endif @@ -2128,7 +2128,7 @@ static void bl_ConvertBlenderObject_Single( MT_Matrix3x3 rotation; float rotmat[3][3]; - BKE_object_rot_to_mat3(blenderobject, rotmat, FALSE); + BKE_object_rot_to_mat3(blenderobject, rotmat, false); rotation.setValue3x3((float*)rotmat); MT_Vector3 scale(blenderobject->size); @@ -2142,7 +2142,7 @@ static void bl_ConvertBlenderObject_Single( ); float rotmatPrev[3][3]; - BKE_object_rot_to_mat3(blenderobject, rotmatPrev, FALSE); + BKE_object_rot_to_mat3(blenderobject, rotmatPrev, false); float eulxyz[3], eulxyzPrev[3]; mat3_to_eul(eulxyz, rotmat); diff --git a/source/gameengine/Expressions/IfExpr.cpp b/source/gameengine/Expressions/IfExpr.cpp index baf91e4a5c3..152ca8704ce 100644 --- a/source/gameengine/Expressions/IfExpr.cpp +++ b/source/gameengine/Expressions/IfExpr.cpp @@ -64,8 +64,8 @@ CIfExpr::~CIfExpr() /** * pre: - * ret: a new object containing the value of m_e1 if m_guard is a boolean TRUE - * a new object containing the value of m_e2 if m_guard is a boolean FALSE + * ret: a new object containing the value of m_e1 if m_guard is a boolean true + * a new object containing the value of m_e2 if m_guard is a boolean false * an new errorvalue if m_guard is not a boolean */ CValue* CIfExpr::Calculate() diff --git a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp index 1ce6650831e..b85d4b40ca8 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp +++ b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp @@ -187,7 +187,7 @@ static POINT scr_save_mouse_pos; static LRESULT CALLBACK screenSaverWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { - BOOL close = FALSE; + BOOL close = false; switch (uMsg) { case WM_MOUSEMOVE: @@ -199,7 +199,7 @@ static LRESULT CALLBACK screenSaverWindowProc(HWND hwnd, UINT uMsg, WPARAM wPara if (abs(dx) > SCR_SAVE_MOUSE_MOVE_THRESHOLD || abs(dy) > SCR_SAVE_MOUSE_MOVE_THRESHOLD) { - close = TRUE; + close = true; } scr_save_mouse_pos = pt; break; @@ -208,7 +208,7 @@ static LRESULT CALLBACK screenSaverWindowProc(HWND hwnd, UINT uMsg, WPARAM wPara case WM_MBUTTONDOWN: case WM_RBUTTONDOWN: case WM_KEYDOWN: - close = TRUE; + close = true; } if (close) PostMessage(hwnd,WM_CLOSE,0,0); @@ -218,11 +218,11 @@ static LRESULT CALLBACK screenSaverWindowProc(HWND hwnd, UINT uMsg, WPARAM wPara BOOL CALLBACK findGhostWindowHWNDProc(HWND hwnd, LPARAM lParam) { GHOST_IWindow *p = (GHOST_IWindow*) GetWindowLongPtr(hwnd, GWLP_USERDATA); - BOOL ret = TRUE; + BOOL ret = true; if (p == ghost_window_to_find) { found_ghost_window_hwnd = hwnd; - ret = FALSE; + ret = false; } return ret; } @@ -268,7 +268,7 @@ bool GPG_Application::startScreenSaverPreview( LONG_PTR exstyle = GetWindowLongPtr(ghost_hwnd, GWL_EXSTYLE); RECT adjrc = { 0, 0, windowWidth, windowHeight }; - AdjustWindowRectEx(&adjrc, style, FALSE, exstyle); + AdjustWindowRectEx(&adjrc, style, false, exstyle); style = (style & (~(WS_POPUP|WS_OVERLAPPEDWINDOW|WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_THICKFRAME|WS_MINIMIZEBOX|WS_MAXIMIZEBOX|WS_TILEDWINDOW ))) | WS_CHILD; SetWindowLongPtr(ghost_hwnd, GWL_STYLE, style); diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp index 44e02ee00c9..076b96601aa 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp +++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp @@ -149,13 +149,13 @@ static BOOL scr_saver_init(int argc, char **argv) { scr_saver_mode = SCREEN_SAVER_MODE_NONE; scr_saver_hwnd = NULL; - BOOL ret = FALSE; + BOOL ret = false; int len = ::strlen(argv[0]); if (len > 4 && !::stricmp(".scr", argv[0] + len - 4)) { scr_saver_mode = SCREEN_SAVER_MODE_CONFIGURATION; - ret = TRUE; + ret = true; if (argc >= 2) { if (argc >= 3) diff --git a/source/gameengine/Rasterizer/RAS_TexVert.cpp b/source/gameengine/Rasterizer/RAS_TexVert.cpp index aaaf70728fe..e6edc064200 100644 --- a/source/gameengine/Rasterizer/RAS_TexVert.cpp +++ b/source/gameengine/Rasterizer/RAS_TexVert.cpp @@ -120,7 +120,7 @@ void RAS_TexVert::SetTangent(const MT_Vector3& tangent) } -// compare two vertices, and return TRUE if both are almost identical (they can be shared) +// compare two vertices, and return true if both are almost identical (they can be shared) bool RAS_TexVert::closeTo(const RAS_TexVert* other) { const float eps = FLT_EPSILON; -- cgit v1.2.3