diff options
-rw-r--r-- | SConstruct | 2 | ||||
-rw-r--r-- | core/error_macros.h | 402 | ||||
-rw-r--r-- | core/math/rect2.h | 13 | ||||
-rw-r--r-- | doc/classes/EditorSceneImporterAssimp.xml | 4 | ||||
-rw-r--r-- | editor/plugins/canvas_item_editor_plugin.cpp | 1 | ||||
-rw-r--r-- | methods.py | 61 | ||||
-rw-r--r-- | modules/SCsub | 23 | ||||
-rw-r--r-- | modules/mono/csharp_script.cpp | 3 | ||||
-rw-r--r-- | modules/theora/video_stream_theora.cpp | 6 | ||||
-rw-r--r-- | modules/webm/video_stream_webm.cpp | 15 | ||||
-rw-r--r-- | platform/windows/detect.py | 7 | ||||
-rw-r--r-- | scene/gui/line_edit.cpp | 33 | ||||
-rw-r--r-- | scene/gui/line_edit.h | 1 | ||||
-rw-r--r-- | scene/gui/split_container.cpp | 6 | ||||
-rw-r--r-- | servers/audio_server.cpp | 8 | ||||
-rw-r--r-- | servers/audio_server.h | 3 | ||||
-rw-r--r-- | servers/visual/visual_server_canvas.cpp | 2 |
17 files changed, 260 insertions, 330 deletions
diff --git a/SConstruct b/SConstruct index 7578a7c385..6af363090b 100644 --- a/SConstruct +++ b/SConstruct @@ -78,7 +78,6 @@ env_base.__class__.add_module_version_string = methods.add_module_version_string env_base.__class__.add_source_files = methods.add_source_files env_base.__class__.use_windows_spawn_fix = methods.use_windows_spawn_fix -env_base.__class__.split_lib = methods.split_lib env_base.__class__.add_shared_library = methods.add_shared_library env_base.__class__.add_library = methods.add_library @@ -130,7 +129,6 @@ opts.Add(BoolVariable('dev', "If yes, alias for verbose=yes warnings=extra werro opts.Add('extra_suffix', "Custom extra suffix added to the base filename of all generated binary files", '') opts.Add(BoolVariable('vsproj', "Generate a Visual Studio solution", False)) opts.Add(EnumVariable('macports_clang', "Build using Clang from MacPorts", 'no', ('no', '5.0', 'devel'))) -opts.Add(BoolVariable('split_libmodules', "Split intermediate libmodules.a in smaller chunks to prevent exceeding linker command line size (forced to True when using MinGW)", False)) opts.Add(BoolVariable('disable_3d', "Disable 3D nodes for a smaller executable", False)) opts.Add(BoolVariable('disable_advanced_gui', "Disable advanced GUI nodes and behaviors", False)) opts.Add(BoolVariable('no_editor_splash', "Don't use the custom splash screen for the editor", False)) diff --git a/core/error_macros.h b/core/error_macros.h index 80ceede043..4a3ea28957 100644 --- a/core/error_macros.h +++ b/core/error_macros.h @@ -108,8 +108,6 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li * running application to fail or crash. * Always try to return processable data, so the engine can keep running well. * Use the _MSG versions to print a meaningful message to help with debugging. - * - * Note: See https://stackoverflow.com/questions/257418/do-while-0-what-is-it-good-for */ // Index out of bounds error macros. @@ -124,25 +122,23 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li * Ensures an integer index `m_index` is less than `m_size` and greater than or equal to 0. * If not, the current function returns. */ -#define ERR_FAIL_INDEX(m_index, m_size) \ - do { \ - if (unlikely((m_index) < 0 || (m_index) >= (m_size))) { \ - _err_print_index_error(FUNCTION_STR, __FILE__, __LINE__, m_index, m_size, _STR(m_index), _STR(m_size)); \ - return; \ - } \ - } while (0) +#define ERR_FAIL_INDEX(m_index, m_size) \ + if (unlikely((m_index) < 0 || (m_index) >= (m_size))) { \ + _err_print_index_error(FUNCTION_STR, __FILE__, __LINE__, m_index, m_size, _STR(m_index), _STR(m_size)); \ + return; \ + } else \ + ((void)0) /** * Ensures an integer index `m_index` is less than `m_size` and greater than or equal to 0. * If not, prints `m_msg` and the current function returns. */ -#define ERR_FAIL_INDEX_MSG(m_index, m_size, m_msg) \ - do { \ - if (unlikely((m_index) < 0 || (m_index) >= (m_size))) { \ - _err_print_index_error(FUNCTION_STR, __FILE__, __LINE__, m_index, m_size, _STR(m_index), _STR(m_size), DEBUG_STR(m_msg)); \ - return; \ - } \ - } while (0) +#define ERR_FAIL_INDEX_MSG(m_index, m_size, m_msg) \ + if (unlikely((m_index) < 0 || (m_index) >= (m_size))) { \ + _err_print_index_error(FUNCTION_STR, __FILE__, __LINE__, m_index, m_size, _STR(m_index), _STR(m_size), DEBUG_STR(m_msg)); \ + return; \ + } else \ + ((void)0) /** * Try using `ERR_FAIL_INDEX_V_MSG`. @@ -151,25 +147,23 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li * Ensures an integer index `m_index` is less than `m_size` and greater than or equal to 0. * If not, the current function returns `m_retval`. */ -#define ERR_FAIL_INDEX_V(m_index, m_size, m_retval) \ - do { \ - if (unlikely((m_index) < 0 || (m_index) >= (m_size))) { \ - _err_print_index_error(FUNCTION_STR, __FILE__, __LINE__, m_index, m_size, _STR(m_index), _STR(m_size)); \ - return m_retval; \ - } \ - } while (0) +#define ERR_FAIL_INDEX_V(m_index, m_size, m_retval) \ + if (unlikely((m_index) < 0 || (m_index) >= (m_size))) { \ + _err_print_index_error(FUNCTION_STR, __FILE__, __LINE__, m_index, m_size, _STR(m_index), _STR(m_size)); \ + return m_retval; \ + } else \ + ((void)0) /** * Ensures an integer index `m_index` is less than `m_size` and greater than or equal to 0. * If not, prints `m_msg` and the current function returns `m_retval`. */ -#define ERR_FAIL_INDEX_V_MSG(m_index, m_size, m_retval, m_msg) \ - do { \ - if (unlikely((m_index) < 0 || (m_index) >= (m_size))) { \ - _err_print_index_error(FUNCTION_STR, __FILE__, __LINE__, m_index, m_size, _STR(m_index), _STR(m_size), DEBUG_STR(m_msg)); \ - return m_retval; \ - } \ - } while (0) +#define ERR_FAIL_INDEX_V_MSG(m_index, m_size, m_retval, m_msg) \ + if (unlikely((m_index) < 0 || (m_index) >= (m_size))) { \ + _err_print_index_error(FUNCTION_STR, __FILE__, __LINE__, m_index, m_size, _STR(m_index), _STR(m_size), DEBUG_STR(m_msg)); \ + return m_retval; \ + } else \ + ((void)0) /** * Try using `ERR_FAIL_INDEX_MSG` or `ERR_FAIL_INDEX_V_MSG`. @@ -179,13 +173,12 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li * Ensures an integer index `m_index` is less than `m_size` and greater than or equal to 0. * If not, the application crashes. */ -#define CRASH_BAD_INDEX(m_index, m_size) \ - do { \ - if (unlikely((m_index) < 0 || (m_index) >= (m_size))) { \ - _err_print_index_error(FUNCTION_STR, __FILE__, __LINE__, m_index, m_size, _STR(m_index), _STR(m_size), "", true); \ - GENERATE_TRAP(); \ - } \ - } while (0) +#define CRASH_BAD_INDEX(m_index, m_size) \ + if (unlikely((m_index) < 0 || (m_index) >= (m_size))) { \ + _err_print_index_error(FUNCTION_STR, __FILE__, __LINE__, m_index, m_size, _STR(m_index), _STR(m_size), "", true); \ + GENERATE_TRAP(); \ + } else \ + ((void)0) /** * Try using `ERR_FAIL_INDEX_MSG` or `ERR_FAIL_INDEX_V_MSG`. @@ -194,13 +187,12 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li * Ensures an integer index `m_index` is less than `m_size` and greater than or equal to 0. * If not, prints `m_msg` and the application crashes. */ -#define CRASH_BAD_INDEX_MSG(m_index, m_size, m_msg) \ - do { \ - if (unlikely((m_index) < 0 || (m_index) >= (m_size))) { \ - _err_print_index_error(FUNCTION_STR, __FILE__, __LINE__, m_index, m_size, _STR(m_index), _STR(m_size), DEBUG_STR(m_msg), true); \ - GENERATE_TRAP(); \ - } \ - } while (0) +#define CRASH_BAD_INDEX_MSG(m_index, m_size, m_msg) \ + if (unlikely((m_index) < 0 || (m_index) >= (m_size))) { \ + _err_print_index_error(FUNCTION_STR, __FILE__, __LINE__, m_index, m_size, _STR(m_index), _STR(m_size), DEBUG_STR(m_msg), true); \ + GENERATE_TRAP(); \ + } else \ + ((void)0) // Unsigned integer index out of bounds error macros. @@ -211,25 +203,23 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li * Ensures an unsigned integer index `m_index` is less than `m_size`. * If not, the current function returns. */ -#define ERR_FAIL_UNSIGNED_INDEX(m_index, m_size) \ - do { \ - if (unlikely((m_index) >= (m_size))) { \ - _err_print_index_error(FUNCTION_STR, __FILE__, __LINE__, m_index, m_size, _STR(m_index), _STR(m_size)); \ - return; \ - } \ - } while (0) +#define ERR_FAIL_UNSIGNED_INDEX(m_index, m_size) \ + if (unlikely((m_index) >= (m_size))) { \ + _err_print_index_error(FUNCTION_STR, __FILE__, __LINE__, m_index, m_size, _STR(m_index), _STR(m_size)); \ + return; \ + } else \ + ((void)0) /** * Ensures an unsigned integer index `m_index` is less than `m_size`. * If not, prints `m_msg` and the current function returns. */ -#define ERR_FAIL_UNSIGNED_INDEX_MSG(m_index, m_size, m_msg) \ - do { \ - if (unlikely((m_index) >= (m_size))) { \ - _err_print_index_error(FUNCTION_STR, __FILE__, __LINE__, m_index, m_size, _STR(m_index), _STR(m_size), DEBUG_STR(m_msg)); \ - return; \ - } \ - } while (0) +#define ERR_FAIL_UNSIGNED_INDEX_MSG(m_index, m_size, m_msg) \ + if (unlikely((m_index) >= (m_size))) { \ + _err_print_index_error(FUNCTION_STR, __FILE__, __LINE__, m_index, m_size, _STR(m_index), _STR(m_size), DEBUG_STR(m_msg)); \ + return; \ + } else \ + ((void)0) /** * Try using `ERR_FAIL_UNSIGNED_INDEX_V_MSG`. @@ -238,25 +228,23 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li * Ensures an unsigned integer index `m_index` is less than `m_size`. * If not, the current function returns `m_retval`. */ -#define ERR_FAIL_UNSIGNED_INDEX_V(m_index, m_size, m_retval) \ - do { \ - if (unlikely((m_index) >= (m_size))) { \ - _err_print_index_error(FUNCTION_STR, __FILE__, __LINE__, m_index, m_size, _STR(m_index), _STR(m_size)); \ - return m_retval; \ - } \ - } while (0) +#define ERR_FAIL_UNSIGNED_INDEX_V(m_index, m_size, m_retval) \ + if (unlikely((m_index) >= (m_size))) { \ + _err_print_index_error(FUNCTION_STR, __FILE__, __LINE__, m_index, m_size, _STR(m_index), _STR(m_size)); \ + return m_retval; \ + } else \ + ((void)0) /** * Ensures an unsigned integer index `m_index` is less than `m_size`. * If not, prints `m_msg` and the current function returns `m_retval`. */ -#define ERR_FAIL_UNSIGNED_INDEX_V_MSG(m_index, m_size, m_retval, m_msg) \ - do { \ - if (unlikely((m_index) >= (m_size))) { \ - _err_print_index_error(FUNCTION_STR, __FILE__, __LINE__, m_index, m_size, _STR(m_index), _STR(m_size), DEBUG_STR(m_msg)); \ - return m_retval; \ - } \ - } while (0) +#define ERR_FAIL_UNSIGNED_INDEX_V_MSG(m_index, m_size, m_retval, m_msg) \ + if (unlikely((m_index) >= (m_size))) { \ + _err_print_index_error(FUNCTION_STR, __FILE__, __LINE__, m_index, m_size, _STR(m_index), _STR(m_size), DEBUG_STR(m_msg)); \ + return m_retval; \ + } else \ + ((void)0) /** * Try using `ERR_FAIL_UNSIGNED_INDEX_MSG` or `ERR_FAIL_UNSIGNED_INDEX_V_MSG`. @@ -266,13 +254,12 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li * Ensures an unsigned integer index `m_index` is less than `m_size`. * If not, the application crashes. */ -#define CRASH_BAD_UNSIGNED_INDEX(m_index, m_size) \ - do { \ - if (unlikely((m_index) >= (m_size))) { \ - _err_print_index_error(FUNCTION_STR, __FILE__, __LINE__, m_index, m_size, _STR(m_index), _STR(m_size), "", true); \ - GENERATE_TRAP(); \ - } \ - } while (0) +#define CRASH_BAD_UNSIGNED_INDEX(m_index, m_size) \ + if (unlikely((m_index) >= (m_size))) { \ + _err_print_index_error(FUNCTION_STR, __FILE__, __LINE__, m_index, m_size, _STR(m_index), _STR(m_size), "", true); \ + GENERATE_TRAP(); \ + } else \ + ((void)0) /** * Try using `ERR_FAIL_UNSIGNED_INDEX_MSG` or `ERR_FAIL_UNSIGNED_INDEX_V_MSG`. @@ -281,13 +268,12 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li * Ensures an unsigned integer index `m_index` is less than `m_size`. * If not, prints `m_msg` and the application crashes. */ -#define CRASH_BAD_UNSIGNED_INDEX_MSG(m_index, m_size, m_msg) \ - do { \ - if (unlikely((m_index) >= (m_size))) { \ - _err_print_index_error(FUNCTION_STR, __FILE__, __LINE__, m_index, m_size, _STR(m_index), _STR(m_size), DEBUG_STR(m_msg), true); \ - GENERATE_TRAP(); \ - } \ - } while (0) +#define CRASH_BAD_UNSIGNED_INDEX_MSG(m_index, m_size, m_msg) \ + if (unlikely((m_index) >= (m_size))) { \ + _err_print_index_error(FUNCTION_STR, __FILE__, __LINE__, m_index, m_size, _STR(m_index), _STR(m_size), DEBUG_STR(m_msg), true); \ + GENERATE_TRAP(); \ + } else \ + ((void)0) // Null reference error macros. @@ -298,25 +284,23 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li * Ensures a pointer `m_param` is not null. * If it is null, the current function returns. */ -#define ERR_FAIL_NULL(m_param) \ - do { \ - if (unlikely(!m_param)) { \ - _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Parameter \"" _STR(m_param) "\" is null."); \ - return; \ - } \ - } while (0) +#define ERR_FAIL_NULL(m_param) \ + if (unlikely(!m_param)) { \ + _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Parameter \"" _STR(m_param) "\" is null."); \ + return; \ + } else \ + ((void)0) /** * Ensures a pointer `m_param` is not null. * If it is null, prints `m_msg` and the current function returns. */ -#define ERR_FAIL_NULL_MSG(m_param, m_msg) \ - do { \ - if (unlikely(!m_param)) { \ - _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Parameter \"" _STR(m_param) "\" is null.", DEBUG_STR(m_msg)); \ - return; \ - } \ - } while (0) +#define ERR_FAIL_NULL_MSG(m_param, m_msg) \ + if (unlikely(!m_param)) { \ + _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Parameter \"" _STR(m_param) "\" is null.", DEBUG_STR(m_msg)); \ + return; \ + } else \ + ((void)0) /** * Try using `ERR_FAIL_NULL_V_MSG`. @@ -325,25 +309,23 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li * Ensures a pointer `m_param` is not null. * If it is null, the current function returns `m_retval`. */ -#define ERR_FAIL_NULL_V(m_param, m_retval) \ - do { \ - if (unlikely(!m_param)) { \ - _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Parameter \"" _STR(m_param) "\" is null."); \ - return m_retval; \ - } \ - } while (0) +#define ERR_FAIL_NULL_V(m_param, m_retval) \ + if (unlikely(!m_param)) { \ + _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Parameter \"" _STR(m_param) "\" is null."); \ + return m_retval; \ + } else \ + ((void)0) /** * Ensures a pointer `m_param` is not null. * If it is null, prints `m_msg` and the current function returns `m_retval`. */ -#define ERR_FAIL_NULL_V_MSG(m_param, m_retval, m_msg) \ - do { \ - if (unlikely(!m_param)) { \ - _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Parameter \"" _STR(m_param) "\" is null.", DEBUG_STR(m_msg)); \ - return m_retval; \ - } \ - } while (0) +#define ERR_FAIL_NULL_V_MSG(m_param, m_retval, m_msg) \ + if (unlikely(!m_param)) { \ + _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Parameter \"" _STR(m_param) "\" is null.", DEBUG_STR(m_msg)); \ + return m_retval; \ + } else \ + ((void)0) /** * Try using `ERR_FAIL_COND_MSG`. @@ -354,13 +336,12 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li * Ensures `m_cond` is false. * If `m_cond` is true, the current function returns. */ -#define ERR_FAIL_COND(m_cond) \ - do { \ - if (unlikely(m_cond)) { \ - _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Condition \"" _STR(m_cond) "\" is true."); \ - return; \ - } \ - } while (0) +#define ERR_FAIL_COND(m_cond) \ + if (unlikely(m_cond)) { \ + _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Condition \"" _STR(m_cond) "\" is true."); \ + return; \ + } else \ + ((void)0) /** * Ensures `m_cond` is false. @@ -369,13 +350,12 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li * If checking for null use ERR_FAIL_NULL_MSG instead. * If checking index bounds use ERR_FAIL_INDEX_MSG instead. */ -#define ERR_FAIL_COND_MSG(m_cond, m_msg) \ - do { \ - if (unlikely(m_cond)) { \ - _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Condition \"" _STR(m_cond) "\" is true.", DEBUG_STR(m_msg)); \ - return; \ - } \ - } while (0) +#define ERR_FAIL_COND_MSG(m_cond, m_msg) \ + if (unlikely(m_cond)) { \ + _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Condition \"" _STR(m_cond) "\" is true.", DEBUG_STR(m_msg)); \ + return; \ + } else \ + ((void)0) /** * Try using `ERR_FAIL_COND_V_MSG`. @@ -386,13 +366,12 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li * Ensures `m_cond` is false. * If `m_cond` is true, the current function returns `m_retval`. */ -#define ERR_FAIL_COND_V(m_cond, m_retval) \ - do { \ - if (unlikely(m_cond)) { \ - _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Condition \"" _STR(m_cond) "\" is true. returned: " _STR(m_retval)); \ - return m_retval; \ - } \ - } while (0) +#define ERR_FAIL_COND_V(m_cond, m_retval) \ + if (unlikely(m_cond)) { \ + _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Condition \"" _STR(m_cond) "\" is true. returned: " _STR(m_retval)); \ + return m_retval; \ + } else \ + ((void)0) /** * Ensures `m_cond` is false. @@ -401,13 +380,12 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li * If checking for null use ERR_FAIL_NULL_V_MSG instead. * If checking index bounds use ERR_FAIL_INDEX_V_MSG instead. */ -#define ERR_FAIL_COND_V_MSG(m_cond, m_retval, m_msg) \ - do { \ - if (unlikely(m_cond)) { \ - _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Condition \"" _STR(m_cond) "\" is true. returned: " _STR(m_retval), DEBUG_STR(m_msg)); \ - return m_retval; \ - } \ - } while (0) +#define ERR_FAIL_COND_V_MSG(m_cond, m_retval, m_msg) \ + if (unlikely(m_cond)) { \ + _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Condition \"" _STR(m_cond) "\" is true. returned: " _STR(m_retval), DEBUG_STR(m_msg)); \ + return m_retval; \ + } else \ + ((void)0) /** * Try using `ERR_CONTINUE_MSG`. @@ -416,25 +394,23 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li * Ensures `m_cond` is false. * If `m_cond` is true, the current loop continues. */ -#define ERR_CONTINUE(m_cond) \ - do { \ - if (unlikely(m_cond)) { \ - _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Condition \"" _STR(m_cond) "\" is true. Continuing."); \ - continue; \ - } \ - } while (0) +#define ERR_CONTINUE(m_cond) \ + if (unlikely(m_cond)) { \ + _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Condition \"" _STR(m_cond) "\" is true. Continuing."); \ + continue; \ + } else \ + ((void)0) /** * Ensures `m_cond` is false. * If `m_cond` is true, prints `m_msg` and the current loop continues. */ -#define ERR_CONTINUE_MSG(m_cond, m_msg) \ - do { \ - if (unlikely(m_cond)) { \ - _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Condition \"" _STR(m_cond) "\" is true. Continuing.", DEBUG_STR(m_msg)); \ - continue; \ - } \ - } while (0) +#define ERR_CONTINUE_MSG(m_cond, m_msg) \ + if (unlikely(m_cond)) { \ + _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Condition \"" _STR(m_cond) "\" is true. Continuing.", DEBUG_STR(m_msg)); \ + continue; \ + } else \ + ((void)0) /** * Try using `ERR_BREAK_MSG`. @@ -443,25 +419,23 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li * Ensures `m_cond` is false. * If `m_cond` is true, the current loop breaks. */ -#define ERR_BREAK(m_cond) \ - do { \ - if (unlikely(m_cond)) { \ - _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Condition \"" _STR(m_cond) "\" is true. Breaking."); \ - break; \ - } \ - } while (0) +#define ERR_BREAK(m_cond) \ + if (unlikely(m_cond)) { \ + _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Condition \"" _STR(m_cond) "\" is true. Breaking."); \ + break; \ + } else \ + ((void)0) /** * Ensures `m_cond` is false. * If `m_cond` is true, prints `m_msg` and the current loop breaks. */ -#define ERR_BREAK_MSG(m_cond, m_msg) \ - do { \ - if (unlikely(m_cond)) { \ - _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Condition \"" _STR(m_cond) "\" is true. Breaking.", DEBUG_STR(m_msg)); \ - break; \ - } \ - } while (0) +#define ERR_BREAK_MSG(m_cond, m_msg) \ + if (unlikely(m_cond)) { \ + _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Condition \"" _STR(m_cond) "\" is true. Breaking.", DEBUG_STR(m_msg)); \ + break; \ + } else \ + ((void)0) /** * Try using `ERR_FAIL_COND_MSG` or `ERR_FAIL_COND_V_MSG`. @@ -471,13 +445,12 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li * Ensures `m_cond` is false. * If `m_cond` is true, the application crashes. */ -#define CRASH_COND(m_cond) \ - do { \ - if (unlikely(m_cond)) { \ - _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "FATAL: Condition \"" _STR(m_cond) "\" is true."); \ - GENERATE_TRAP(); \ - } \ - } while (0) +#define CRASH_COND(m_cond) \ + if (unlikely(m_cond)) { \ + _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "FATAL: Condition \"" _STR(m_cond) "\" is true."); \ + GENERATE_TRAP(); \ + } else \ + ((void)0) /** * Try using `ERR_FAIL_COND_MSG` or `ERR_FAIL_COND_V_MSG`. @@ -486,13 +459,12 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li * Ensures `m_cond` is false. * If `m_cond` is true, prints `m_msg` and the application crashes. */ -#define CRASH_COND_MSG(m_cond, m_msg) \ - do { \ - if (unlikely(m_cond)) { \ - _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "FATAL: Condition \"" _STR(m_cond) "\" is true.", DEBUG_STR(m_msg)); \ - GENERATE_TRAP(); \ - } \ - } while (0) +#define CRASH_COND_MSG(m_cond, m_msg) \ + if (unlikely(m_cond)) { \ + _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "FATAL: Condition \"" _STR(m_cond) "\" is true.", DEBUG_STR(m_msg)); \ + GENERATE_TRAP(); \ + } else \ + ((void)0) // Generic error macros. @@ -504,10 +476,11 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li * The current function returns. */ #define ERR_FAIL() \ - do { \ + if (1) { \ _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Method/Function Failed."); \ return; \ - } while (0) + } else \ + ((void)0) /** * Try using `ERR_FAIL_COND_MSG`. @@ -516,10 +489,11 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li * Prints `m_msg`, and the current function returns. */ #define ERR_FAIL_MSG(m_msg) \ - do { \ + if (1) { \ _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Method/Function Failed.", DEBUG_STR(m_msg)); \ return; \ - } while (0) + } else \ + ((void)0) /** * Try using `ERR_FAIL_COND_V_MSG` or `ERR_FAIL_V_MSG`. @@ -529,10 +503,11 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li * The current function returns `m_retval`. */ #define ERR_FAIL_V(m_retval) \ - do { \ + if (1) { \ _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Method/Function Failed, returning: " __STR(m_value)); \ return m_retval; \ - } while (0) + } else \ + ((void)0) /** * Try using `ERR_FAIL_COND_V_MSG`. @@ -541,10 +516,11 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li * Prints `m_msg`, and the current function returns `m_retval`. */ #define ERR_FAIL_V_MSG(m_retval, m_msg) \ - do { \ + if (1) { \ _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "Method/Function Failed, returning: " __STR(m_value), DEBUG_STR(m_msg)); \ return m_retval; \ - } while (0) + } else \ + ((void)0) /** * Try using `ERR_FAIL_COND_MSG`, `ERR_FAIL_COND_V_MSG`, `ERR_CONTINUE_MSG` or ERR_BREAK_MSG. @@ -553,22 +529,21 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li * * Prints `m_msg`. */ -#define ERR_PRINT(m_msg) \ - do { \ - _err_print_error(FUNCTION_STR, __FILE__, __LINE__, DEBUG_STR(m_msg)); \ - } while (0) +#define ERR_PRINT(m_msg) \ + _err_print_error(FUNCTION_STR, __FILE__, __LINE__, DEBUG_STR(m_msg)) /** * Prints `m_msg` once during the application lifetime. */ #define ERR_PRINT_ONCE(m_msg) \ - do { \ + if (1) { \ static bool first_print = true; \ if (first_print) { \ _err_print_error(FUNCTION_STR, __FILE__, __LINE__, DEBUG_STR(m_msg)); \ first_print = false; \ } \ - } while (0) + } else \ + ((void)0) // Print warning message macros. @@ -577,10 +552,8 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li * * If warning about deprecated usage, use `WARN_DEPRECATED` or `WARN_DEPRECATED_MSG` instead. */ -#define WARN_PRINT(m_msg) \ - do { \ - _err_print_error(FUNCTION_STR, __FILE__, __LINE__, DEBUG_STR(m_msg), ERR_HANDLER_WARNING); \ - } while (0) +#define WARN_PRINT(m_msg) \ + _err_print_error(FUNCTION_STR, __FILE__, __LINE__, DEBUG_STR(m_msg), ERR_HANDLER_WARNING) /** * Prints `m_msg` once during the application lifetime. @@ -588,13 +561,14 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li * If warning about deprecated usage, use `WARN_DEPRECATED` or `WARN_DEPRECATED_MSG` instead. */ #define WARN_PRINT_ONCE(m_msg) \ - do { \ + if (1) { \ static bool first_print = true; \ if (first_print) { \ _err_print_error(FUNCTION_STR, __FILE__, __LINE__, DEBUG_STR(m_msg), ERR_HANDLER_WARNING); \ first_print = false; \ } \ - } while (0) + } else \ + ((void)0) // Print deprecated warning message macros. @@ -602,25 +576,27 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li * Warns that the current function is deprecated. */ #define WARN_DEPRECATED \ - do { \ + if (1) { \ static volatile bool warning_shown = false; \ if (!warning_shown) { \ _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "This method has been deprecated and will be removed in the future.", ERR_HANDLER_WARNING); \ warning_shown = true; \ } \ - } while (0) + } else \ + ((void)0) /** * Warns that the current function is deprecated and prints `m_msg`. */ #define WARN_DEPRECATED_MSG(m_msg) \ - do { \ + if (1) { \ static volatile bool warning_shown = false; \ if (!warning_shown) { \ _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "This method has been deprecated and will be removed in the future.", DEBUG_STR(m_msg), ERR_HANDLER_WARNING); \ warning_shown = true; \ } \ - } while (0) + } else \ + ((void)0) /** * Do not use. @@ -629,10 +605,11 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li * The application crashes. */ #define CRASH_NOW() \ - do { \ + if (1) { \ _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "FATAL: Method/Function Failed."); \ GENERATE_TRAP(); \ - } while (0) + } else \ + ((void)0) /** * Only use if the application should never reach this point. @@ -640,9 +617,10 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li * Prints `m_msg`, and then the application crashes. */ #define CRASH_NOW_MSG(m_msg) \ - do { \ + if (1) { \ _err_print_error(FUNCTION_STR, __FILE__, __LINE__, "FATAL: Method/Function Failed.", DEBUG_STR(m_msg)); \ GENERATE_TRAP(); \ - } while (0) + } else \ + ((void)0) #endif diff --git a/core/math/rect2.h b/core/math/rect2.h index 9017377770..0d2e7eb6e5 100644 --- a/core/math/rect2.h +++ b/core/math/rect2.h @@ -60,6 +60,19 @@ struct Rect2 { return true; } + inline bool intersects_touch(const Rect2 &p_rect) const { + if (position.x > (p_rect.position.x + p_rect.size.width)) + return false; + if ((position.x + size.width) < p_rect.position.x) + return false; + if (position.y > (p_rect.position.y + p_rect.size.height)) + return false; + if ((position.y + size.height) < p_rect.position.y) + return false; + + return true; + } + inline real_t distance_to(const Vector2 &p_point) const { real_t dist = 0.0; diff --git a/doc/classes/EditorSceneImporterAssimp.xml b/doc/classes/EditorSceneImporterAssimp.xml index ede3c75b09..c72d4ee25a 100644 --- a/doc/classes/EditorSceneImporterAssimp.xml +++ b/doc/classes/EditorSceneImporterAssimp.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="EditorSceneImporterAssimp" inherits="EditorSceneImporter" version="4.0"> <brief_description> - Multi-format 3D asset importer based on [url=http://assimp.org/]Assimp[/url]. + FBX 3D asset importer based on [url=http://assimp.org/]Assimp[/url]. </brief_description> <description> - This is a multi-format 3D asset importer based on [url=http://assimp.org/]Assimp[/url]. See [url=https://assimp-docs.readthedocs.io/en/latest/about/intoduction.html#installation]this page[/url] for a full list of supported formats. + This is an FBX 3D asset importer based on [url=http://assimp.org/]Assimp[/url]. It currently has many known limitations and works best with static meshes. Most animated meshes won't import correctly. If exporting a FBX scene from Autodesk Maya, use these FBX export settings: [codeblock] - Smoothing Groups diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 1d8f3a2bbd..a0e5b1c6ea 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -4967,6 +4967,7 @@ void CanvasItemEditor::_focus_selection(int p_op) { zoom = scale_x < scale_y ? scale_x : scale_y; zoom *= 0.90; viewport->update(); + _update_zoom_label(); call_deferred("_popup_callback", VIEW_CENTER_TO_SELECTION); } } diff --git a/methods.py b/methods.py index 39981406c7..a1d101af18 100644 --- a/methods.py +++ b/methods.py @@ -257,67 +257,6 @@ def use_windows_spawn_fix(self, platform=None): self['SPAWN'] = mySpawn -def split_lib(self, libname, src_list = None, env_lib = None): - env = self - - num = 0 - cur_base = "" - max_src = 64 - list = [] - lib_list = [] - - if src_list is None: - src_list = getattr(env, libname + "_sources") - - if type(env_lib) == type(None): - env_lib = env - - for f in src_list: - fname = "" - if type(f) == type(""): - fname = env.File(f).path - else: - fname = env.File(f)[0].path - fname = fname.replace("\\", "/") - base = "/".join(fname.split("/")[:2]) - if base != cur_base and len(list) > max_src: - if num > 0: - lib = env_lib.add_library(libname + str(num), list) - lib_list.append(lib) - list = [] - num = num + 1 - cur_base = base - list.append(f) - - lib = env_lib.add_library(libname + str(num), list) - lib_list.append(lib) - - lib_base = [] - env_lib.add_source_files(lib_base, "*.cpp") - lib = env_lib.add_library(libname, lib_base) - lib_list.insert(0, lib) - - env.Prepend(LIBS=lib_list) - - # When we split modules into arbitrary chunks, we end up with linking issues - # due to symbol dependencies split over several libs, which may not be linked - # in the required order. We use --start-group and --end-group to tell the - # linker that those archives should be searched repeatedly to resolve all - # undefined references. - # As SCons doesn't give us much control over how inserting libs in LIBS - # impacts the linker call, we need to hack our way into the linking commands - # LINKCOM and SHLINKCOM to set those flags. - - if '-Wl,--start-group' in env['LINKCOM'] and '-Wl,--start-group' in env['SHLINKCOM']: - # Already added by a previous call, skip. - return - - env['LINKCOM'] = str(env['LINKCOM']).replace('$_LIBFLAGS', - '-Wl,--start-group $_LIBFLAGS -Wl,--end-group') - env['SHLINKCOM'] = str(env['LINKCOM']).replace('$_LIBFLAGS', - '-Wl,--start-group $_LIBFLAGS -Wl,--end-group') - - def save_active_platforms(apnames, ap): for x in ap: diff --git a/modules/SCsub b/modules/SCsub index 75483fd637..5b39b18334 100644 --- a/modules/SCsub +++ b/modules/SCsub @@ -8,17 +8,26 @@ env_modules = env.Clone() Export('env_modules') +# Header with MODULE_*_ENABLED defines. env.CommandNoCache("modules_enabled.gen.h", Value(env.module_list), modules_builders.generate_modules_enabled) -env.modules_sources = [] -env_modules.add_source_files(env.modules_sources, "register_module_types.gen.cpp") - +# libmodule_<name>.a for each active module. for module in env.module_list: + env.modules_sources = [] SConscript(module + "/SCsub") -if env['split_libmodules']: - env.split_lib("modules", env_lib = env_modules) -else: - lib = env_modules.add_library("modules", env.modules_sources) + # Some modules are not linked automatically but can be enabled optionally + # on iOS, so we handle those specially. + if env["platform"] == "iphone" and module in ["arkit", "camera"]: + continue + lib = env_modules.add_library("module_%s" % module, env.modules_sources) env.Prepend(LIBS=[lib]) + +# libmodules.a with only register_module_types. +# Must be last so that all libmodule_<name>.a libraries are on the right side +# in the linker command. +env.modules_sources = [] +env_modules.add_source_files(env.modules_sources, "register_module_types.gen.cpp") +lib = env_modules.add_library("modules", env.modules_sources) +env.Prepend(LIBS=[lib]) diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp index 752fc9e2cc..2847f3b414 100644 --- a/modules/mono/csharp_script.cpp +++ b/modules/mono/csharp_script.cpp @@ -1721,8 +1721,7 @@ bool CSharpInstance::has_method(const StringName &p_method) const { Variant CSharpInstance::call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) { - if (!script.is_valid()) - ERR_FAIL_V(Variant()); + ERR_FAIL_COND_V(!script.is_valid(), Variant()); GD_MONO_SCOPE_THREAD_ATTACH; diff --git a/modules/theora/video_stream_theora.cpp b/modules/theora/video_stream_theora.cpp index cf1fc3f175..00c7e87568 100644 --- a/modules/theora/video_stream_theora.cpp +++ b/modules/theora/video_stream_theora.cpp @@ -363,8 +363,10 @@ void VideoStreamPlaybackTheora::set_file(const String &p_file) { }; float VideoStreamPlaybackTheora::get_time() const { - - return time - AudioServer::get_singleton()->get_output_latency() - delay_compensation; //-((get_total())/(float)vi.rate); + // FIXME: AudioServer output latency was fixed in af9bb0e, previously it used to + // systematically return 0. Now that it gives a proper latency, it broke this + // code where the delay compensation likely never really worked. + return time - /* AudioServer::get_singleton()->get_output_latency() - */ delay_compensation; }; Ref<Texture> VideoStreamPlaybackTheora::get_texture() const { diff --git a/modules/webm/video_stream_webm.cpp b/modules/webm/video_stream_webm.cpp index 41f9e67672..2763d30bb5 100644 --- a/modules/webm/video_stream_webm.cpp +++ b/modules/webm/video_stream_webm.cpp @@ -393,17 +393,22 @@ int VideoStreamPlaybackWebm::get_mix_rate() const { inline bool VideoStreamPlaybackWebm::has_enough_video_frames() const { if (video_frames_pos > 0) { - - const double audio_delay = AudioServer::get_singleton()->get_output_latency(); + // FIXME: AudioServer output latency was fixed in af9bb0e, previously it used to + // systematically return 0. Now that it gives a proper latency, it broke this + // code where the delay compensation likely never really worked. + //const double audio_delay = AudioServer::get_singleton()->get_output_latency(); const double video_time = video_frames[video_frames_pos - 1]->time; - return video_time >= time + audio_delay + delay_compensation; + return video_time >= time + /* audio_delay + */ delay_compensation; } return false; } bool VideoStreamPlaybackWebm::should_process(WebMFrame &video_frame) { - const double audio_delay = AudioServer::get_singleton()->get_output_latency(); - return video_frame.time >= time + audio_delay + delay_compensation; + // FIXME: AudioServer output latency was fixed in af9bb0e, previously it used to + // systematically return 0. Now that it gives a proper latency, it broke this + // code where the delay compensation likely never really worked. + //const double audio_delay = AudioServer::get_singleton()->get_output_latency(); + return video_frame.time >= time + /* audio_delay + */ delay_compensation; } void VideoStreamPlaybackWebm::delete_pointers() { diff --git a/platform/windows/detect.py b/platform/windows/detect.py index 500736bd3f..72c3f60d99 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -293,12 +293,7 @@ def configure_mingw(env): ## Compiler configuration - if (os.name == "nt"): - # Force splitting libmodules.a in multiple chunks to work around - # issues reaching the linker command line size limit, which also - # seem to induce huge slowdown for 'ar' (GH-30892). - env['split_libmodules'] = True - else: + if os.name != "nt": env["PROGSUFFIX"] = env["PROGSUFFIX"] + ".exe" # for linux cross-compilation if (env["bits"] == "default"): diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index 7afc3b0d00..7cc47d351e 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -240,15 +240,7 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) { deselect(); text = text.substr(cursor_pos, text.length() - cursor_pos); - - Ref<Font> font = get_font("font"); - - cached_width = 0; - if (font != NULL) { - for (int i = 0; i < text.length(); i++) - cached_width += font->get_char_size(text[i]).width; - } - + update_cached_width(); set_cursor_position(0); _text_changed(); } @@ -1358,18 +1350,10 @@ void LineEdit::set_window_pos(int p_pos) { void LineEdit::append_at_cursor(String p_text) { if ((max_length <= 0) || (text.length() + p_text.length() <= max_length)) { - - Ref<Font> font = get_font("font"); - if (font != NULL) { - for (int i = 0; i < p_text.length(); i++) - cached_width += font->get_char_size(p_text[i]).width; - } else { - cached_width = 0; - } - String pre = text.substr(0, cursor_pos); String post = text.substr(cursor_pos, text.length() - cursor_pos); text = pre + p_text + post; + update_cached_width(); set_cursor_position(cursor_pos + p_text.length()); } else { emit_signal("text_change_rejected"); @@ -1499,6 +1483,7 @@ bool LineEdit::is_editable() const { void LineEdit::set_secret(bool p_secret) { pass = p_secret; + update_cached_width(); update(); } @@ -1514,6 +1499,7 @@ void LineEdit::set_secret_character(const String &p_string) { ERR_FAIL_COND_MSG(p_string.length() != 1, "Secret character must be exactly one character long (" + itos(p_string.length()) + " characters given)."); secret_character = p_string; + update_cached_width(); update(); } @@ -1685,6 +1671,17 @@ void LineEdit::_emit_text_change() { text_changed_dirty = false; } +void LineEdit::update_cached_width() { + Ref<Font> font = get_font("font"); + cached_width = 0; + if (font != NULL) { + String text = get_text(); + for (int i = 0; i < text.length(); i++) { + cached_width += font->get_char_size(pass ? secret_character[0] : text[i]).width; + } + } +} + void LineEdit::update_placeholder_width() { if ((max_length <= 0) || (placeholder_translated.length() <= max_length)) { Ref<Font> font = get_font("font"); diff --git a/scene/gui/line_edit.h b/scene/gui/line_edit.h index cf597d11b6..037238d682 100644 --- a/scene/gui/line_edit.h +++ b/scene/gui/line_edit.h @@ -132,6 +132,7 @@ private: void _emit_text_change(); bool expand_to_text_length; + void update_cached_width(); void update_placeholder_width(); bool caret_blink_enabled; diff --git a/scene/gui/split_container.cpp b/scene/gui/split_container.cpp index bb5260b15e..079907db07 100644 --- a/scene/gui/split_container.cpp +++ b/scene/gui/split_container.cpp @@ -266,7 +266,7 @@ void SplitContainer::_gui_input(const Ref<InputEvent> &p_event) { Control::CursorShape SplitContainer::get_cursor_shape(const Point2 &p_pos) const { if (dragging) - return (vertical ? CURSOR_VSIZE : CURSOR_HSIZE); + return (vertical ? CURSOR_VSPLIT : CURSOR_HSPLIT); if (!collapsed && _getch(0) && _getch(1) && dragger_visibility == DRAGGER_VISIBLE) { @@ -275,11 +275,11 @@ Control::CursorShape SplitContainer::get_cursor_shape(const Point2 &p_pos) const if (vertical) { if (p_pos.y > middle_sep && p_pos.y < middle_sep + sep) - return CURSOR_VSIZE; + return CURSOR_VSPLIT; } else { if (p_pos.x > middle_sep && p_pos.x < middle_sep + sep) - return CURSOR_HSIZE; + return CURSOR_HSPLIT; } } diff --git a/servers/audio_server.cpp b/servers/audio_server.cpp index 1c84e97196..2a5a5040b6 100644 --- a/servers/audio_server.cpp +++ b/servers/audio_server.cpp @@ -29,6 +29,7 @@ /*************************************************************************/ #include "audio_server.h" + #include "core/io/resource_loader.h" #include "core/os/file_access.h" #include "core/os/os.h" @@ -36,14 +37,11 @@ #include "scene/resources/audio_stream_sample.h" #include "servers/audio/audio_driver_dummy.h" #include "servers/audio/effects/audio_effect_compressor.h" -#ifdef TOOLS_ENABLED +#ifdef TOOLS_ENABLED #define MARK_EDITED set_edited(true); - #else - #define MARK_EDITED - #endif AudioDriver *AudioDriver::singleton = NULL; @@ -1405,8 +1403,6 @@ AudioServer::AudioServer() { mix_frames = 0; channel_count = 0; to_mix = 0; - output_latency = 0; - output_latency_ticks = 0; #ifdef DEBUG_ENABLED prof_time = 0; #endif diff --git a/servers/audio_server.h b/servers/audio_server.h index 815200c811..eff66d4008 100644 --- a/servers/audio_server.h +++ b/servers/audio_server.h @@ -240,9 +240,6 @@ private: Mutex *audio_data_lock; - float output_latency; - uint64_t output_latency_ticks; - void init_channels_and_buffers(); void _mix_step(); diff --git a/servers/visual/visual_server_canvas.cpp b/servers/visual/visual_server_canvas.cpp index e07e188ec6..c90e061eb7 100644 --- a/servers/visual/visual_server_canvas.cpp +++ b/servers/visual/visual_server_canvas.cpp @@ -168,7 +168,7 @@ void VisualServerCanvas::_render_canvas_item(Item *p_canvas_item, const Transfor VisualServerRaster::redraw_request(); } - if ((!ci->commands.empty() && p_clip_rect.intersects(global_rect)) || ci->vp_render || ci->copy_back_buffer) { + if ((!ci->commands.empty() && p_clip_rect.intersects_touch(global_rect)) || ci->vp_render || ci->copy_back_buffer) { //something to draw? ci->final_transform = xform; ci->final_modulate = Color(modulate.r * ci->self_modulate.r, modulate.g * ci->self_modulate.g, modulate.b * ci->self_modulate.b, modulate.a * ci->self_modulate.a); |