Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds a TORQUE_TOOLS_EXT cmake flag/preprocessor #1312

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Engine/source/console/consoleFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@
dstp += toLen;
scanp += len + fromLen;
}
return ret;

Check warning on line 722 in Engine/source/console/consoleFunctions.cpp

View workflow job for this annotation

GitHub Actions / Windows Latest MSVC

unreachable code [D:\a\Torque3D\Torque3D\build\Engine\source\Torque3D.vcxproj]
}

//-----------------------------------------------------------------------------
Expand Down Expand Up @@ -1059,7 +1059,7 @@

//----------------------------------------------------------------

DefineEngineFunction(ColorFloatToInt, ColorI, (LinearColorF color), ,

Check warning on line 1062 in Engine/source/console/consoleFunctions.cpp

View workflow job for this annotation

GitHub Actions / MacOSX Latest Clang

'fnColorFloatToInt' has C-linkage specified, but returns user-defined type 'EngineTypeTraits<ColorI>::ReturnValueType' (aka 'ColorI') which is incompatible with C [-Wreturn-type-c-linkage]

Check warning on line 1062 in Engine/source/console/consoleFunctions.cpp

View workflow job for this annotation

GitHub Actions / MacOSX Latest Clang

'fnColorFloatToInt' has C-linkage specified, but returns user-defined type 'EngineTypeTraits<ColorI>::ReturnValueType' (aka 'ColorI') which is incompatible with C [-Wreturn-type-c-linkage]
"Convert from a float color to an integer color (0.0 - 1.0 to 0 to 255).\n"
"@param color Float color value to be converted in the form \"R G B A\", where R is red, G is green, B is blue, and A is alpha.\n"
"@return Converted color value (0 - 255)\n\n"
Expand All @@ -1071,7 +1071,7 @@
return color.toColorI();
}

DefineEngineFunction(ColorIntToFloat, LinearColorF, (ColorI color), ,

Check warning on line 1074 in Engine/source/console/consoleFunctions.cpp

View workflow job for this annotation

GitHub Actions / MacOSX Latest Clang

'fnColorIntToFloat' has C-linkage specified, but returns user-defined type 'EngineTypeTraits<LinearColorF>::ReturnValueType' (aka 'LinearColorF') which is incompatible with C [-Wreturn-type-c-linkage]

Check warning on line 1074 in Engine/source/console/consoleFunctions.cpp

View workflow job for this annotation

GitHub Actions / MacOSX Latest Clang

'fnColorIntToFloat' has C-linkage specified, but returns user-defined type 'EngineTypeTraits<LinearColorF>::ReturnValueType' (aka 'LinearColorF') which is incompatible with C [-Wreturn-type-c-linkage]
"Convert from a integer color to an float color (0 to 255 to 0.0 - 1.0).\n"
"@param color Integer color value to be converted in the form \"R G B A\", where R is red, G is green, B is blue, and A is alpha.\n"
"@return Converted color value (0.0 - 1.0)\n\n"
Expand Down Expand Up @@ -1109,7 +1109,7 @@
return Con::getReturnBuffer(s);
}

DefineEngineFunction(ColorHEXToRGB, ColorI, (const char* hex), ,

Check warning on line 1112 in Engine/source/console/consoleFunctions.cpp

View workflow job for this annotation

GitHub Actions / MacOSX Latest Clang

'fnColorHEXToRGB' has C-linkage specified, but returns user-defined type 'EngineTypeTraits<ColorI>::ReturnValueType' (aka 'ColorI') which is incompatible with C [-Wreturn-type-c-linkage]

Check warning on line 1112 in Engine/source/console/consoleFunctions.cpp

View workflow job for this annotation

GitHub Actions / MacOSX Latest Clang

'fnColorHEXToRGB' has C-linkage specified, but returns user-defined type 'EngineTypeTraits<ColorI>::ReturnValueType' (aka 'ColorI') which is incompatible with C [-Wreturn-type-c-linkage]
"Convert from a hex color value to an integer RGB (red, green, blue) color (00 - FF to 0 to 255).\n"
"@param hex Hex color value (#000000 - #FFFFFF) to be converted to an RGB (red, green, blue) value.\n"
"@return Integer color value to be converted in the form \"R G B A\", where R is red, G is green, B is blue, and A is alpha. Alpha isn't handled/converted so only pay attention to the RGB value\n\n"
Expand All @@ -1123,7 +1123,7 @@
return color;
}

DefineEngineFunction(ColorHSBToRGB, ColorI, (Point3I hsb), ,

Check warning on line 1126 in Engine/source/console/consoleFunctions.cpp

View workflow job for this annotation

GitHub Actions / MacOSX Latest Clang

'fnColorHSBToRGB' has C-linkage specified, but returns user-defined type 'EngineTypeTraits<ColorI>::ReturnValueType' (aka 'ColorI') which is incompatible with C [-Wreturn-type-c-linkage]

Check warning on line 1126 in Engine/source/console/consoleFunctions.cpp

View workflow job for this annotation

GitHub Actions / MacOSX Latest Clang

'fnColorHSBToRGB' has C-linkage specified, but returns user-defined type 'EngineTypeTraits<ColorI>::ReturnValueType' (aka 'ColorI') which is incompatible with C [-Wreturn-type-c-linkage]
"Convert from a HSB (hue, saturation, brightness) to an integer RGB (red, green, blue) color. HSB is also know as HSL or HSV as well, with the last letter standing for lightness or value.\n"
"@param hsb HSB (hue, saturation, brightness) value to be converted.\n"
"@return Integer color value to be converted in the form \"R G B A\", where R is red, G is green, B is blue, and A is alpha. Alpha isn't handled/converted so only pay attention to the RGB value\n\n"
Expand Down Expand Up @@ -2251,7 +2251,7 @@

//-----------------------------------------------------------------------------

DefineEngineFunction( generateUUID, Torque::UUID, (),,

Check warning on line 2254 in Engine/source/console/consoleFunctions.cpp

View workflow job for this annotation

GitHub Actions / MacOSX Latest Clang

'fngenerateUUID' has C-linkage specified, but returns user-defined type 'EngineTypeTraits<Torque::UUID>::ReturnValueType' (aka 'Torque::UUID') which is incompatible with C [-Wreturn-type-c-linkage]
"Generate a new universally unique identifier (UUID).\n\n"
"@return A newly generated UUID.\n\n"
"@ingroup Utilities" )
Expand Down Expand Up @@ -2803,7 +2803,7 @@
return returnBuffer;
}

#ifdef TORQUE_TOOLS
#ifdef TORQUE_TOOLS_EXT_COMMANDS
DefineEngineFunction(systemCommand, S32, (const char* commandLineAction, const char* callBackFunction), (""), "")
{
if (commandLineAction && commandLineAction[0] != '\0')
Expand All @@ -2819,7 +2819,9 @@

return -1;
}
#endif

#ifdef TORQUE_TOOLS
const char* getDocsLink(const char* filename, U32 lineNumber)
{
Vector<String> fileStringSplit;
Expand Down
3 changes: 3 additions & 0 deletions Tools/CMake/modules/tools.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ if(TORQUE_TOOLS)
source_group(TREE "${CMAKE_SOURCE_DIR}/Engine/source/environment/editors/" PREFIX "Modules/TOOLS/environment" FILES ${TORQUE_TOOLS_SOURCES2})
source_group(TREE "${CMAKE_SOURCE_DIR}/Engine/source/forest/editor/" PREFIX "Modules/TOOLS/forest" FILES ${TORQUE_TOOLS_SOURCES3})
endif(TORQUE_TOOLS)
if(TORQUE_TOOLS_EXT_COMMANDS)
set(TORQUE_COMPILE_DEFINITIONS ${TORQUE_COMPILE_DEFINITIONS} TORQUE_TOOLS_EXT_COMMANDS)
endif(TORQUE_TOOLS_EXT_COMMANDS)
1 change: 1 addition & 0 deletions Tools/CMake/torque_configs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ advanced_option(TORQUE_DEBUG_NET "debug network" OFF)
advanced_option(TORQUE_DEBUG_NET_MOVES "debug network moves" OFF)
advanced_option(TORQUE_ENABLE_ASSERTS "enables or disable asserts" OFF)
advanced_option(TORQUE_TOOLS "Enable or disable the tools" ON)
advanced_option(TORQUE_TOOLS_EXT_COMMANDS "Enable or disable some extended functionality like shell commands or free write access" OFF)
advanced_option(TORQUE_ENABLE_PROFILER "Enable or disable the profiler" OFF)
advanced_option(TORQUE_SHOW_LEGACY_FILE_FIELDS "If on, shows legacy direct file path fields in the inspector." OFF)

Expand Down
Loading