2V2-e.5a: restore 40250 min-max helpers for camera update
This commit is contained in:
@@ -142,40 +142,40 @@ auto IsGlobalFileName(const char *) -> bool
|
||||
return mt_platform_stub_return<bool>();
|
||||
}
|
||||
|
||||
auto MIN(int, int) -> int
|
||||
auto MIN(int a, int b) -> int
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
return mt_platform_stub_return<int>();
|
||||
return a < b ? a : b;
|
||||
}
|
||||
|
||||
auto MAX(int, int) -> int
|
||||
auto MAX(int a, int b) -> int
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
return mt_platform_stub_return<int>();
|
||||
return a > b ? a : b;
|
||||
}
|
||||
|
||||
auto MINMAX(int, int, int) -> int
|
||||
auto MINMAX(int min, int value, int max) -> int
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
return mt_platform_stub_return<int>();
|
||||
if (max < min)
|
||||
return MAX(min, value);
|
||||
int tv;
|
||||
tv = (min > value ? min : value);
|
||||
return (max < tv) ? max : tv;
|
||||
}
|
||||
|
||||
auto fMIN(float, float) -> float
|
||||
auto fMIN(float a, float b) -> float
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
return mt_platform_stub_return<float>();
|
||||
return a < b ? a : b;
|
||||
}
|
||||
|
||||
auto fMAX(float, float) -> float
|
||||
auto fMAX(float a, float b) -> float
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
return mt_platform_stub_return<float>();
|
||||
return a > b ? a : b;
|
||||
}
|
||||
|
||||
auto fMINMAX(float, float, float) -> float
|
||||
auto fMINMAX(float min, float value, float max) -> float
|
||||
{
|
||||
MT_PLATFORM_STUB();
|
||||
return mt_platform_stub_return<float>();
|
||||
float tv;
|
||||
tv = (min > value ? min : value);
|
||||
return (max < tv) ? max : tv;
|
||||
}
|
||||
|
||||
auto MyCreateDirectory(const char *) -> void
|
||||
|
||||
@@ -155,6 +155,9 @@ add_dependencies(port_logic port_header_gate)
|
||||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../platform ${CMAKE_CURRENT_BINARY_DIR}/../platform)
|
||||
|
||||
if(BUILD_TESTING AND CMAKE_SYSTEM_NAME STREQUAL CMAKE_HOST_SYSTEM_NAME)
|
||||
add_executable(port_utils_test ${CMAKE_CURRENT_SOURCE_DIR}/../../tests/port_utils_test.cpp)
|
||||
target_link_libraries(port_utils_test PRIVATE port_platform)
|
||||
add_test(NAME port.utils COMMAND $<TARGET_FILE:port_utils_test>)
|
||||
add_executable(port_common_test ${CMAKE_CURRENT_SOURCE_DIR}/../../tests/port_common_test.cpp)
|
||||
target_link_libraries(port_common_test PRIVATE port_logic)
|
||||
add_test(NAME port.common COMMAND $<TARGET_FILE:port_common_test>)
|
||||
|
||||
Reference in New Issue
Block a user