### Configure and Install Opus pkg-config Module Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/opus/CMakeLists.txt Sets up variables and configures the opus.pc file for pkg-config, then installs it. Enables dependency management for other projects. ```cmake set(prefix ${CMAKE_INSTALL_PREFIX}) set(exec_prefix ${CMAKE_INSTALL_PREFIX}) set(libdir ${CMAKE_INSTALL_FULL_LIBDIR}) set(includedir ${CMAKE_INSTALL_FULL_INCLUDEDIR}) set(VERSION ${PACKAGE_VERSION}) if(HAVE_LIBM) set(LIBM "-lm") endif() configure_file(opus.pc.in opus.pc) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/opus.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) ``` -------------------------------- ### Install Opus Target and Headers Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/opus/CMakeLists.txt Installs the Opus library target (static, shared, or framework) and public headers to the specified installation directories. ```cmake install(TARGETS opus EXPORT OpusTargets ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} FRAMEWORK DESTINATION ${CMAKE_INSTALL_PREFIX} PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/opus) ``` -------------------------------- ### Install Opus CMake Configuration Module Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/opus/CMakeLists.txt Installs CMake configuration files (OpusConfig.cmake, OpusConfigVersion.cmake) for easy integration into other CMake projects. Uses helper functions for configuration. ```cmake set(CPACK_GENERATOR TGZ) include(CPack) set(CMAKE_INSTALL_PACKAGEDIR ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}) install(EXPORT OpusTargets NAMESPACE Opus:: DESTINATION ${CMAKE_INSTALL_PACKAGEDIR}) include(CMakePackageConfigHelpers) set(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_INCLUDEDIR}) configure_package_config_file(${PROJECT_SOURCE_DIR}/cmake/OpusConfig.cmake.in OpusConfig.cmake INSTALL_DESTINATION ${CMAKE_INSTALL_PACKAGEDIR} PATH_VARS INCLUDE_INSTALL_DIR INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}) write_basic_package_version_file(OpusConfigVersion.cmake VERSION ${PROJECT_VERSION} COMPATIBILITY SameMajorVersion) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/OpusConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/OpusConfigVersion.cmake DESTINATION ${CMAKE_INSTALL_PACKAGEDIR}) ``` -------------------------------- ### Configure Opus Include Directories Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/opus/CMakeLists.txt Sets include directories for the Opus library, distinguishing between build, install, and private paths. ```cmake target_include_directories( opus PUBLIC $ $ $ PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} celt silk) ``` -------------------------------- ### RwIm3DGetTransformPipeline Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/dumps_libGTASA_32and64/dump 2.1 (32).txt Gets the current immediate mode 3D transformation pipeline. Used for rendering 3D geometry. ```APIDOC ## RwIm3DGetTransformPipeline() ### Description Gets the current immediate mode 3D transformation pipeline. Used for rendering 3D geometry. ### Method Call ``` -------------------------------- ### Set Opus Target Properties for macOS Framework Build Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/opus/CMakeLists.txt Configures properties for building Opus as a macOS framework. Includes versioning, identifier, and installation path settings. ```cmake set_target_properties(opus PROPERTIES FRAMEWORK TRUE FRAMEWORK_VERSION ${PROJECT_VERSION} MACOSX_FRAMEWORK_IDENTIFIER org.xiph.opus MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${PROJECT_VERSION} MACOSX_FRAMEWORK_BUNDLE_VERSION ${PROJECT_VERSION} XCODE_ATTRIBUTE_INSTALL_PATH "@rpath" OUTPUT_NAME Opus) ``` -------------------------------- ### _rwFrameListStreamGetSize Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/dumps_libGTASA_32and64/dump 2.1 (32).txt Gets the size of a frame list for streaming. Used for serializing hierarchical scene data. ```APIDOC ## _rwFrameListStreamGetSize(rwFrameList const*) ### Description Gets the size of a frame list for streaming. Used for serializing hierarchical scene data. ### Method Call ### Parameters * **frameList** (rwFrameList const*) - Required - The frame list. ``` -------------------------------- ### OS_BillingConnectionStatus Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/dumps_libGTASA_32and64/dump 2.1 (32).txt Gets the connection status of the OS billing service. Used to check if billing services are available. ```APIDOC ## OS_BillingConnectionStatus() ### Description Gets the connection status of the OS billing service. Used to check if billing services are available. ### Method Call ``` -------------------------------- ### Get and Message Opus Library Version Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/opus/CMakeLists.txt Retrieves the Opus library version and prints it in debug messages. ```cmake get_library_version(OPUS_LIBRARY_VERSION OPUS_LIBRARY_VERSION_MAJOR) message(DEBUG "Opus library version: ${OPUS_LIBRARY_VERSION}") ``` -------------------------------- ### Set Minimum CMake Version Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/CMakeLists.txt Specifies the minimum version of CMake required for this project. Ensure your CMake installation meets this requirement. ```cmake cmake_minimum_required(VERSION 3.12) ``` -------------------------------- ### RtDictSchemaGetCurrentDict Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/dumps_libGTASA_32and64/dump 2.1 (32).txt Gets the current dictionary from a schema. Used for accessing dictionary data. ```APIDOC ## RtDictSchemaGetCurrentDict(RtDictSchema*) ### Description Gets the current dictionary from a schema. Used for accessing dictionary data. ### Method Call ### Parameters * **schema** (RtDictSchema*) - Required - The dictionary schema. ``` -------------------------------- ### GetCurrentProjectionMatrix Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/dumps_libGTASA_32and64/dump 2.1 (32).txt Retrieves the current projection matrix. Used for camera and rendering setup. ```APIDOC ## GetCurrentProjectionMatrix() ### Description Retrieves the current projection matrix. Used for camera and rendering setup. ### Method Call ``` -------------------------------- ### RpMatFXMaterialSetupEnvMap Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/dumps_libGTASA_32and64/dump 2.1 (32).txt Sets up environment mapping for a material. Used for creating reflective surfaces. ```APIDOC ## RpMatFXMaterialSetupEnvMap(RpMaterial*, RwTexture*, RwFrame*, int, float) ### Description Sets up environment mapping for a material. Used for creating reflective surfaces. ### Method Call ### Parameters * **material** (RpMaterial*) - Required - The material to configure. * **envTexture** (RwTexture*) - Required - The environment texture. * **frame** (RwFrame*) - Required - The frame to use for mapping. * **envMapType** (int) - Required - The type of environment map. * **scale** (float) - Required - The scale factor for the environment map. ``` -------------------------------- ### Build Opus Demo Executable Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/opus/CMakeLists.txt Builds the main 'opus_demo' executable. Includes necessary directories for headers and links against the Opus library and required libraries. ```cmake add_executable(opus_demo ${opus_demo_sources}) target_include_directories(opus_demo PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) target_include_directories(opus_demo PRIVATE silk) # debug.h target_include_directories(opus_demo PRIVATE celt) # arch.h target_link_libraries(opus_demo PRIVATE opus ${OPUS_REQUIRED_LIBRARIES}) target_compile_definitions(opus_demo PRIVATE OPUS_BUILD) ``` -------------------------------- ### RtAnimAnimationGetNumNodes Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/dumps_libGTASA_32and64/dump 2.1 (32).txt Gets the number of nodes in an animation. Used for querying animation data. ```APIDOC ## RtAnimAnimationGetNumNodes(RtAnimAnimation const*) ### Description Gets the number of nodes in an animation. Used for querying animation data. ### Method Call ### Parameters * **animation** (RtAnimAnimation const*) - Required - The animation structure. ``` -------------------------------- ### Project Information Messages Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/samp/CMakeLists.txt Prints build information, including author and current ABI, to the build output console. ```cmake message(WARNING "-------------------------------------------------") message(WARNING "") message(WARNING "Author: github.com/kuzia15") message(WARNING "Current: libsamp.so [${ANDROID_ABI}]") message(WARNING "") message(WARNING "-------------------------------------------------") ``` -------------------------------- ### WarHttp_EnsureInitialized Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/dumps_libGTASA_32and64/dump 2.1 (32).txt Ensures that the HTTP client library is initialized. This must be called before making any HTTP requests. ```APIDOC ## WarHttp_EnsureInitialized() ### Description Ensures that the HTTP client library is initialized. This must be called before making any HTTP requests. ### Method Call ``` -------------------------------- ### RsGetPresetViewDescription Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/dumps_libGTASA_32and64/dump 2.1 (32).txt Retrieves a preset view description. Used for configuring camera views. ```APIDOC ## RsGetPresetViewDescription() ### Description Retrieves a preset view description. Used for configuring camera views. ### Method Call ``` -------------------------------- ### Configure Fixed-Point Build Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/opus/CMakeLists.txt Enables fixed-point arithmetic for the SILK module by adding specific sources, include directories, and compile definitions. ```cmake if(OPUS_FIXED_POINT) add_sources_group(opus silk ${silk_sources_fixed}) target_include_directories(opus PRIVATE silk/fixed) target_compile_definitions(opus PRIVATE FIXED_POINT=1) else() add_sources_group(opus silk ${silk_sources_float}) target_include_directories(opus PRIVATE silk/float) endif() ``` -------------------------------- ### Build Opus Custom Demo Executable Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/opus/CMakeLists.txt Builds the 'opus_custom_demo' executable if OPUS_CUSTOM_MODES is enabled. Links against the Opus library and sets the OPUS_BUILD definition. ```cmake add_executable(opus_custom_demo ${opus_custom_demo_sources}) target_include_directories(opus_custom_demo PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) target_link_libraries(opus_custom_demo PRIVATE opus) target_compile_definitions(opus_custom_demo PRIVATE OPUS_BUILD) ``` -------------------------------- ### Add Shared Library and Link Dependencies Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/samp/CMakeLists.txt Creates a shared library named 'samp' using the collected source files and links it with various system and third-party libraries. ```cmake add_library(samp SHARED ${SOURCES}) target_link_libraries(samp log EGL GLESv3 opus shadowhook::shadowhook ${CMAKE_CURRENT_SOURCE_DIR}/vendor/bass/libs/${ANDROID_ABI}/libbass.so) ``` -------------------------------- ### Configure NEON Intrinsics with Runtime Detection Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/opus/CMakeLists.txt Enables NEON intrinsics with runtime capability detection for ARM processors. Requires runtime detection to be enabled. ```cmake if(COMPILER_SUPPORT_NEON) if(OPUS_MAY_HAVE_NEON) if(RUNTIME_CPU_CAPABILITY_DETECTION) message(STATUS "OPUS_MAY_HAVE_NEON enabling runtime detection") target_compile_definitions(opus PRIVATE OPUS_HAVE_RTCD) add_sources_group(opus celt ${celt_sources_arm_rtcd}) add_sources_group(opus silk ${silk_sources_arm_rtcd}) else() message(ERROR "Runtime cpu capability detection needed for MAY_HAVE_NEON") endif() endif() endif() ``` -------------------------------- ### _rpMaterialListInitialize Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/dumps_libGTASA_32and64/dump 2.1 (32).txt Initializes an RpMaterialList structure. This is a foundational step before using material lists. ```APIDOC ## _rpMaterialListInitialize(RpMaterialList*) ### Description Initializes an RpMaterialList structure. This is a foundational step before using material lists. ### Method Call ### Parameters * **materialList** (RpMaterialList*) - Required - The material list to initialize. ``` -------------------------------- ### CreateTxdImageForVideoCard Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/dumps_libGTASA_32and64/dump 2.1 (32).txt Creates a TXD image suitable for the video card. Used for texture asset preparation. ```APIDOC ## CreateTxdImageForVideoCard() ### Description Creates a TXD image suitable for the video card. Used for texture asset preparation. ### Method Call ``` -------------------------------- ### Set C++ Standard and Define ABI-Specific Macros Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/samp/CMakeLists.txt Configures the C++ standard to C++20 and defines preprocessor macros based on the Android ABI for architecture-specific compilation. ```cmake cmake_minimum_required(VERSION 3.12) project(samp) set(CMAKE_CXX_STANDARD 20) if(${ANDROID_ABI} STREQUAL "armeabi-v7a") add_definitions(-DVER_x32=true) elseif(${ANDROID_ABI} STREQUAL "arm64-v8a") add_definitions(-DVER_x32=false) endif() ``` -------------------------------- ### Fast Math Compile Options Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/opus/CMakeLists.txt Applies fast math compiler options for MSVC (/fp:fast) or other compilers (-ffast-math) if OPUS_FAST_MATH is enabled. ```cmake if(OPUS_FAST_MATH) if(MSVC) target_compile_options(opus PRIVATE /fp:fast) else() target_compile_options(opus PRIVATE -ffast-math) endif() endif() ``` -------------------------------- ### Build Opus Compare Executable Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/opus/CMakeLists.txt Builds the 'opus_compare' executable. Links against the Opus library and required libraries. Includes a specific MSVC warning option. ```cmake add_executable(opus_compare ${opus_compare_sources}) target_include_directories(opus_compare PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) target_link_libraries(opus_compare PRIVATE opus ${OPUS_REQUIRED_LIBRARIES}) if(MSVC) # move cosmetic warning to level 4 for opus_compare target_compile_options(opus_compare PRIVATE /w44244) endif() ``` -------------------------------- ### Configure Runtime CPU Capability Detection (x86) Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/opus/CMakeLists.txt Enables runtime CPU capability detection for x86 intrinsics (SSE, SSE2, SSE4.1, AVX) if supported and enabled. It also configures CPU info detection methods. ```cmake if(NOT OPUS_DISABLE_INTRINSICS) if(((OPUS_X86_MAY_HAVE_SSE AND NOT OPUS_X86_PRESUME_SSE) OR (OPUS_X86_MAY_HAVE_SSE2 AND NOT OPUS_X86_PRESUME_SSE2) OR (OPUS_X86_MAY_HAVE_SSE4_1 AND NOT OPUS_X86_PRESUME_SSE4_1) OR (OPUS_X86_MAY_HAVE_AVX AND NOT OPUS_X86_PRESUME_AVX)) AND RUNTIME_CPU_CAPABILITY_DETECTION) target_compile_definitions(opus PRIVATE OPUS_HAVE_RTCD) if(NOT MSVC) if(CPU_INFO_BY_ASM_SUPPORTED) target_compile_definitions(opus PRIVATE CPU_INFO_BY_ASM) elseif(CPU_INFO_BY_C_SUPPORTED) target_compile_definitions(opus PRIVATE CPU_INFO_BY_C) else() message(ERROR "Runtime cpu capability detection is enabled while CPU_INFO is not supported") endif() endif() add_sources_group(opus celt ${celt_sources_x86_rtcd}) add_sources_group(opus silk ${silk_sources_x86_rtcd}) endif() ``` -------------------------------- ### Configure Opus Padding Test Executable Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/opus/CMakeLists.txt Defines the 'test_opus_padding' executable, sets its include directories, links it against the opus library, and adds a CTest to run this executable. ```cmake add_executable(test_opus_padding ${test_opus_padding_sources}) target_include_directories(test_opus_padding PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) target_link_libraries(test_opus_padding PRIVATE opus) add_test(NAME test_opus_padding COMMAND ${CMAKE_COMMAND} -DTEST_EXECUTABLE=$ -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME} -P "${PROJECT_SOURCE_DIR}/cmake/RunTest.cmake") ``` -------------------------------- ### Configure Opus API Test Executable Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/opus/CMakeLists.txt Defines the 'test_opus_api' executable, sets its include directories and compile definitions, links it against the opus library, and configures compile definitions, including disabling float API if fixed point is enabled. It then adds a CTest to run this executable. ```cmake add_executable(test_opus_api ${test_opus_api_sources}) target_include_directories(test_opus_api PRIVATE ${CMAKE_CURRENT_BINARY_DIR} celt) target_link_libraries(test_opus_api PRIVATE opus) target_compile_definitions(test_opus_api PRIVATE OPUS_BUILD) if(OPUS_FIXED_POINT) target_compile_definitions(test_opus_api PRIVATE DISABLE_FLOAT_API) endif() add_test(NAME test_opus_api COMMAND ${CMAKE_COMMAND} -DTEST_EXECUTABLE=$ -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME} -P "${PROJECT_SOURCE_DIR}/cmake/RunTest.cmake") ``` -------------------------------- ### Add Include Directories Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/samp/CMakeLists.txt Specifies the directories that the compiler should search for header files during the build process. ```cmake include_directories( ${CMAKE_CURRENT_LIST_DIR} ${CMAKE_CURRENT_LIST_DIR}/util/ ${CMAKE_CURRENT_LIST_DIR}/vendor/armhook ${CMAKE_CURRENT_LIST_DIR}/vendor/imgui ${CMAKE_CURRENT_LIST_DIR}/vendor/ ${CMAKE_CURRENT_LIST_DIR}/game/RW/ ${CMAKE_CURRENT_LIST_DIR}/game/Core/ ${CMAKE_CURRENT_LIST_DIR}/game_sa/ ) ``` -------------------------------- ### RQ_Command_rqSelectTexture Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/dumps_libGTASA_32and64/dump 2.1 (32).txt Command to select a texture. Used for activating a texture for rendering. ```APIDOC ## RQ_Command_rqSelectTexture(char*&) ### Description Command to select a texture. Used for activating a texture for rendering. ### Method Call ### Parameters * **textureName** (char*&) - Required - The name of the texture to select. ``` -------------------------------- ### RpAtomicSetDefaultPipeline Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/dumps_libGTASA_32and64/dump 2.1 (32).txt Sets the default rendering pipeline for an atomic. Used to define how an atomic is rendered. ```APIDOC ## RpAtomicSetDefaultPipeline(RxPipeline*) ### Description Sets the default rendering pipeline for an atomic. Used to define how an atomic is rendered. ### Method Call ### Parameters * **pipeline** (RxPipeline*) - Required - The rendering pipeline to set. ``` -------------------------------- ### LIB_GameServiceSaveToCloud Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/dumps_libGTASA_32and64/dump 2.1 (32).txt Saves game service data to the cloud. Used for cloud saving functionality. ```APIDOC ## LIB_GameServiceSaveToCloud(unsigned char const*, unsigned int) ### Description Saves game service data to the cloud. Used for cloud saving functionality. ### Method Call ### Parameters * **data** (unsigned char const*) - Required - The data to save. * **size** (unsigned int) - Required - The size of the data. ``` -------------------------------- ### RpUVAnimParamKeyFrameApply Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/dumps_libGTASA_32and64/dump 2.1 (32).txt Applies UV animation parameters. Used to update texture coordinates based on animation. ```APIDOC ## RpUVAnimParamKeyFrameApply(void*, void*) ### Description Applies UV animation parameters. Used to update texture coordinates based on animation. ### Method Call ### Parameters * **uvAnim** (void*) - Required - The UV animation data. * **object** (void*) - Required - The object to apply the animation to. ``` -------------------------------- ### Enable Stack Protector Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/opus/CMakeLists.txt Configures the build to use stack protection mechanisms. This option is enabled if stack protection is supported by the build environment. ```cmake set(OPUS_STACK_PROTECTOR_HELP_STR "use stack protection.") cmake_dependent_option(OPUS_STACK_PROTECTOR ${OPUS_STACK_PROTECTOR_HELP_STR} ON "STACK_PROTECTOR_SUPPORTED" OFF) add_feature_info(OPUS_STACK_PROTECTOR OPUS_STACK_PROTECTOR ${OPUS_STACK_PROTECTOR_HELP_STR}) ``` -------------------------------- ### Conditional SSE/SSE2 Options Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/opus/CMakeLists.txt Defines options to conditionally enable SSE and SSE2 support based on CPU capabilities and disabling intrinsics. ```cmake cmake_dependent_option(OPUS_X86_PRESUME_SSE ${OPUS_X86_PRESUME_SSE_HELP_STR} OFF "OPUS_X86_MAY_HAVE_SSE; NOT OPUS_DISABLE_INTRINSICS" OFF) cmake_dependent_option(OPUS_X86_PRESUME_SSE2 ${OPUS_X86_PRESUME_SSE2_HELP_STR} OFF "OPUS_X86_MAY_HAVE_SSE2; NOT OPUS_DISABLE_INTRINSICS" OFF) ``` -------------------------------- ### Set Package Properties for Git Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/opus/CMakeLists.txt Configures properties for the Git package, specifying its type, description, URL, and purpose. ```cmake set_package_properties(Git PROPERTIES TYPE REQUIRED DESCRIPTION "fast, scalable, distributed revision control system" URL "https://git-scm.com/" PURPOSE "required to set up package version") ``` -------------------------------- ### _rwMatrixSetOptimizations Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/dumps_libGTASA_32and64/dump 2.1 (32).txt Sets matrix transformation optimizations. This can affect rendering performance. ```APIDOC ## _rwMatrixSetOptimizations(int) ### Description Sets matrix transformation optimizations. This can affect rendering performance. ### Method Call ### Parameters * **optimizationLevel** (int) - Required - The level of optimization to apply. ``` -------------------------------- ### Assume SSE2 Support for x64 Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/opus/CMakeLists.txt Assumes the target CPU has SSE2 support, overriding runtime detection. This option is available for x64 targets if SSE2 support is generally possible and intrinsics are not disabled. ```cmake cmake_dependent_option(OPUS_X86_PRESUME_SSE2 ${OPUS_X86_PRESUME_SSE2_HELP_STR} ON "OPUS_X86_MAY_HAVE_SSE2; NOT OPUS_DISABLE_INTRINSICS" OFF) ``` -------------------------------- ### Assume SSE1 Support for x64 Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/opus/CMakeLists.txt Assumes the target CPU has SSE1 support, overriding runtime detection. This option is available for x64 targets if SSE1 support is generally possible and intrinsics are not disabled. ```cmake # PRESUME depends on MAY HAVE, but PRESUME will override runtime detection set(OPUS_X86_PRESUME_SSE_HELP_STR "assume target CPU has SSE1 support (override runtime check).") set(OPUS_X86_PRESUME_SSE2_HELP_STR "assume target CPU has SSE2 support (override runtime check).") if(OPUS_CPU_X64) # Assume x86_64 has up to SSE2 support cmake_dependent_option(OPUS_X86_PRESUME_SSE ${OPUS_X86_PRESUME_SSE_HELP_STR} ON "OPUS_X86_MAY_HAVE_SSE; NOT OPUS_DISABLE_INTRINSICS" OFF) ``` -------------------------------- ### Enable Fast Math Optimizations Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/opus/CMakeLists.txt Enables fast math optimizations for Opus. Use of this option is discouraged as the code is not well-tested with this build configuration. ```cmake set(OPUS_FAST_MATH_HELP_STR "enable fast math (unsupported and discouraged use, as code is not well tested with this build option).") cmake_dependent_option(OPUS_FAST_MATH ${OPUS_FAST_MATH_HELP_STR} ON "OPUS_FLOAT_APPROX; OPUS_FAST_MATH; FAST_MATH_SUPPORTED" OFF) add_feature_info(OPUS_FAST_MATH OPUS_FAST_MATH ${OPUS_FAST_MATH_HELP_STR}) ``` -------------------------------- ### Runtime SSE4.1 Support Check for x86/x64 Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/opus/CMakeLists.txt Configures a runtime check for SSE4.1 instruction set support on x86 and x64 architectures. This is enabled if SSE4.1 is supported and intrinsics are not disabled. ```cmake set(OPUS_X86_MAY_HAVE_SSE4_1_HELP_STR "does runtime check for SSE4.1 support.") cmake_dependent_option(OPUS_X86_MAY_HAVE_SSE4_1 ${OPUS_X86_MAY_HAVE_SSE4_1_HELP_STR} ON "SSE4_1_SUPPORTED; NOT OPUS_DISABLE_INTRINSICS" OFF) add_feature_info(OPUS_X86_MAY_HAVE_SSE4_1 OPUS_X86_MAY_HAVE_SSE4_1 ${OPUS_X86_MAY_HAVE_SSE4_1_HELP_STR}) ``` -------------------------------- ### Compile Definitions for ARM NEON Intrinsics Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/opus/CMakeLists.txt Defines compiler flags to enable ARM NEON intrinsics for optimized audio processing. Use when targeting ARM architectures with NEON support. ```cmake target_compile_definitions(opus PRIVATE OPUS_ARM_MAY_HAVE_NEON OPUS_ARM_MAY_HAVE_NEON_INTR) ``` -------------------------------- ### Configure Opus Decode Test Executable Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/opus/CMakeLists.txt Defines the 'test_opus_decode' executable, sets its include directories, links it against the opus library, and configures compile definitions, including disabling float API if fixed point is enabled. It then adds a CTest to run this executable. ```cmake target_compile_definitions(test_opus_decode PRIVATE DISABLE_FLOAT_API) endif() add_test(NAME test_opus_decode COMMAND ${CMAKE_COMMAND} -DTEST_EXECUTABLE=$ -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME} -P "${PROJECT_SOURCE_DIR}/cmake/RunTest.cmake") ``` -------------------------------- ### Enable Fortify Source Protection (Non-MSVC) Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/opus/CMakeLists.txt Adds protection against buffer overflows using the Fortify Source feature. This option is available and configured for non-MSVC compilers if Fortify Source is supported. ```cmake if(NOT MSVC) set(OPUS_FORTIFY_SOURCE_HELP_STR "add protection against buffer overflows.") cmake_dependent_option(OPUS_FORTIFY_SOURCE ${OPUS_FORTIFY_SOURCE_HELP_STR} ON "FORTIFY_SOURCE_SUPPORTED" OFF) add_feature_info(OPUS_FORTIFY_SOURCE OPUS_FORTIFY_SOURCE ${OPUS_FORTIFY_SOURCE_HELP_STR}) endif() ``` -------------------------------- ### Configure Opus Encode Test Executable Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/opus/CMakeLists.txt Defines the 'test_opus_encode' executable, sets its include directories and compile definitions, links it against the opus library, and adds a CTest to run this executable. ```cmake add_executable(test_opus_encode ${test_opus_encode_sources}) target_include_directories(test_opus_encode PRIVATE ${CMAKE_CURRENT_BINARY_DIR} celt) target_link_libraries(test_opus_encode PRIVATE opus) target_compile_definitions(test_opus_encode PRIVATE OPUS_BUILD) add_test(NAME test_opus_encode COMMAND ${CMAKE_COMMAND} -DTEST_EXECUTABLE=$ -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME} -P "${PROJECT_SOURCE_DIR}/cmake/RunTest.cmake") ``` -------------------------------- ### Add SSP Library for MINGW Security Features Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/opus/CMakeLists.txt Appends the 'ssp' library to the required libraries for MINGW builds when security features like Fortify Source or Stack Protector are enabled. ```cmake if(MINGW AND (OPUS_FORTIFY_SOURCE OR OPUS_STACK_PROTECTOR)) # ssp lib is needed for security features for MINGW list(APPEND OPUS_REQUIRED_LIBRARIES ssp) endif() ``` -------------------------------- ### Runtime SSE1 Support Check for x86/x64 Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/opus/CMakeLists.txt Configures a runtime check for SSE1 instruction set support on x86 and x64 architectures. This is enabled if SSE1 is supported and intrinsics are not disabled. ```cmake if(OPUS_CPU_X86 OR OPUS_CPU_X64) set(OPUS_X86_MAY_HAVE_SSE_HELP_STR "does runtime check for SSE1 support.") cmake_dependent_option(OPUS_X86_MAY_HAVE_SSE ${OPUS_X86_MAY_HAVE_SSE_HELP_STR} ON "SSE1_SUPPORTED; NOT OPUS_DISABLE_INTRINSICS" OFF) add_feature_info(OPUS_X86_MAY_HAVE_SSE OPUS_X86_MAY_HAVE_SSE ${OPUS_X86_MAY_HAVE_SSE_HELP_STR}) ``` -------------------------------- ### _rwOpenGLRasterRenderFast Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/dumps_libGTASA_32and64/dump 2.1 (32).txt Renders a raster using OpenGL in a fast manner. Optimized for quick raster display. ```APIDOC ## _rwOpenGLRasterRenderFast(void*, void*, int) ### Description Renders a raster using OpenGL in a fast manner. Optimized for quick raster display. ### Method Call ### Parameters * **raster** (void*) - Required - The raster to render. * **target** (void*) - Required - The target surface. * **flags** (int) - Required - Rendering flags. ``` -------------------------------- ### Runtime AVX Support Check for x86/x64 Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/opus/CMakeLists.txt Configures a runtime check for AVX instruction set support on x86 and x64 architectures. This is enabled if AVX is supported and intrinsics are not disabled. ```cmake set(OPUS_X86_MAY_HAVE_AVX_HELP_STR "does runtime check for AVX support.") cmake_dependent_option(OPUS_X86_MAY_HAVE_AVX ${OPUS_X86_MAY_HAVE_AVX_HELP_STR} ON "AVX_SUPPORTED; NOT OPUS_DISABLE_INTRINSICS" OFF) add_feature_info(OPUS_X86_MAY_HAVE_AVX OPUS_X86_MAY_HAVE_AVX ${OPUS_X86_MAY_HAVE_AVX_HELP_STR}) ``` -------------------------------- ### RwIm3DSetTransformPipeline Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/dumps_libGTASA_32and64/dump 2.1 (32).txt Sets the immediate mode 3D transformation pipeline. Used for configuring 3D geometry rendering. ```APIDOC ## RwIm3DSetTransformPipeline(RxPipeline*) ### Description Sets the immediate mode 3D transformation pipeline. Used for configuring 3D geometry rendering. ### Method Call ### Parameters * **pipeline** (RxPipeline*) - Required - The transformation pipeline to set. ``` -------------------------------- ### Runtime SSE2 Support Check for x86/x64 Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/opus/CMakeLists.txt Configures a runtime check for SSE2 instruction set support on x86 and x64 architectures. This is enabled if SSE2 is supported and intrinsics are not disabled. ```cmake set(OPUS_X86_MAY_HAVE_SSE2_HELP_STR "does runtime check for SSE2 support.") cmake_dependent_option(OPUS_X86_MAY_HAVE_SSE2 ${OPUS_X86_MAY_HAVE_SSE2_HELP_STR} ON "SSE2_SUPPORTED; NOT OPUS_DISABLE_INTRINSICS" OFF) add_feature_info(OPUS_X86_MAY_HAVE_SSE2 OPUS_X86_MAY_HAVE_SSE2 ${OPUS_X86_MAY_HAVE_SSE2_HELP_STR}) ``` -------------------------------- ### Stack Protector Compile Options Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/opus/CMakeLists.txt Applies stack protector compiler options for MSVC (/GS) or other compilers (-fstack-protector-strong) if OPUS_STACK_PROTECTOR is enabled. ```cmake if(OPUS_STACK_PROTECTOR) if(MSVC) target_compile_options(opus PRIVATE /GS) else() target_compile_options(opus PRIVATE -fstack-protector-strong) endif() endif() ``` -------------------------------- ### _rpMeshHeaderForAllMeshes Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/dumps_libGTASA_32and64/dump 2.1 (32).txt Iterates over all meshes within an RpMeshHeader, applying a callback function to each. Useful for mesh processing and manipulation. ```APIDOC ## _rpMeshHeaderForAllMeshes(RpMeshHeader*, RpMesh* (*)(RpMesh*, RpMeshHeader*, void*), void*) ### Description Iterates over all meshes within an RpMeshHeader, applying a callback function to each. Useful for mesh processing and manipulation. ### Method Call ### Parameters * **meshHeader** (RpMeshHeader*) - Required - The mesh header containing the meshes. * **callback** (RpMesh* (*)(RpMesh*, RpMeshHeader*, void*)) - Required - The function to call for each mesh. * **userData** (void*) - Optional - User-defined data to pass to the callback. ``` -------------------------------- ### JPegCompressScreenToBuffer Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/dumps_libGTASA_32and64/dump 2.1 (32).txt Compresses the current screen content to a JPEG buffer. Used for capturing screenshots. ```APIDOC ## JPegCompressScreenToBuffer(RwCamera*, char**, unsigned int*) ### Description Compresses the current screen content to a JPEG buffer. Used for capturing screenshots. ### Method Call ### Parameters * **camera** (RwCamera*) - Required - The camera to capture from. * **buffer** (char**) - Required - Pointer to the buffer that will hold the JPEG data. * **size** (unsigned int*) - Required - Pointer to store the size of the JPEG data. ``` -------------------------------- ### _rpSkinGeometryNativeSize Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/dumps_libGTASA_32and64/dump 2.1 (32).txt Calculates the size of skinned geometry data for streaming. Used for determining storage requirements. ```APIDOC ## _rpSkinGeometryNativeSize(RpGeometry const*) ### Description Calculates the size of skinned geometry data for streaming. Used for determining storage requirements. ### Method Call ### Parameters * **geometry** (RpGeometry const*) - Required - The geometry structure. ``` -------------------------------- ### Configure SSE4.1 Intrinsics Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/opus/CMakeLists.txt Adds SSE4.1 intrinsics for CELT and SILK, defines OPUS_X86_MAY_HAVE_SSE4_1 if supported, and sets compile flags for non-MSVC compilers. Includes conditional sources for fixed-point builds. ```cmake if(SSE4_1_SUPPORTED) if(OPUS_X86_MAY_HAVE_SSE4_1) add_sources_group(opus celt ${celt_sources_sse4_1}) add_sources_group(opus silk ${silk_sources_sse4_1}) target_compile_definitions(opus PRIVATE OPUS_X86_MAY_HAVE_SSE4_1) if(NOT MSVC) set_source_files_properties(${celt_sources_sse4_1} ${silk_sources_sse4_1} PROPERTIES COMPILE_FLAGS -msse4.1) endif() if(OPUS_FIXED_POINT) add_sources_group(opus silk ${silk_sources_fixed_sse4_1}) if(NOT MSVC) set_source_files_properties(${silk_sources_fixed_sse4_1} PROPERTIES COMPILE_FLAGS -msse4.1) endif() endif() endif() if(OPUS_X86_PRESUME_SSE4_1) target_compile_definitions(opus PRIVATE OPUS_X86_PRESUME_SSE4_1) if(NOT MSVC) target_compile_options(opus PRIVATE -msse4.1) endif() endif() endif() ``` -------------------------------- ### Find Shadowhook Package Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/CMakeLists.txt Finds and loads the Shadowhook package, which is required for the project. The 'REQUIRED' argument ensures that the build fails if the package is not found. ```cmake find_package(shadowhook REQUIRED CONFIG) ``` -------------------------------- ### _rwOpenGLRenderStateClose Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/dumps_libGTASA_32and64/dump 2.1 (32).txt Closes the OpenGL rendering state. Should be called when OpenGL rendering is finished. ```APIDOC ## _rwOpenGLRenderStateClose() ### Description Closes the OpenGL rendering state. Should be called when OpenGL rendering is finished. ### Method Call ``` -------------------------------- ### _rwPalQuantResolvePalette Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/dumps_libGTASA_32and64/dump 2.1 (32).txt Resolves a palette for quantization. Used in color palette management for images. ```APIDOC ## _rwPalQuantResolvePalette(RwRGBA*, int, rwPalQuant*) ### Description Resolves a palette for quantization. Used in color palette management for images. ### Method Call ### Parameters * **palette** (RwRGBA*) - Required - The palette to resolve. * **numEntries** (int) - Required - The number of entries in the palette. * **quantizer** (rwPalQuant*) - Required - The palette quantizer. ``` -------------------------------- ### Configure Hidden Visibility (Non-Windows) Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/opus/CMakeLists.txt Sets the C visibility preset to 'hidden' for the opus target if hidden visibility is supported and not on Windows. ```cmake elseif(HIDDEN_VISIBILITY_SUPPORTED) set_target_properties(opus PROPERTIES C_VISIBILITY_PRESET hidden) ``` -------------------------------- ### Build Opus Decode Test Executable Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/opus/CMakeLists.txt Builds the 'test_opus_decode' executable for testing Opus decoding functionality. Links against the Opus library and sets the OPUS_BUILD definition. ```cmake add_executable(test_opus_decode ${test_opus_decode_sources}) target_include_directories(test_opus_decode PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) target_link_libraries(test_opus_decode PRIVATE opus) target_compile_definitions(test_opus_decode PRIVATE OPUS_BUILD) ``` -------------------------------- ### _rpSkinGeometryNativeRead Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/dumps_libGTASA_32and64/dump 2.1 (32).txt Reads skinned geometry data from a stream. Used for loading models with skeletal animations. ```APIDOC ## _rpSkinGeometryNativeRead(RwStream*, RpGeometry*) ### Description Reads skinned geometry data from a stream. Used for loading models with skeletal animations. ### Method Call ### Parameters * **stream** (RwStream*) - Required - The stream to read from. * **geometry** (RpGeometry*) - Required - The geometry structure to populate. ``` -------------------------------- ### RpUVAnimParamKeyFrameBlend Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/dumps_libGTASA_32and64/dump 2.1 (32).txt Blends UV animation keyframes. Used for smooth transitions in texture animations. ```APIDOC ## RpUVAnimParamKeyFrameBlend(void*, void*, void*, float) ### Description Blends UV animation keyframes. Used for smooth transitions in texture animations. ### Method Call ### Parameters * **out** (void*) - Required - The output blended keyframe. * **key1** (void*) - Required - The first keyframe. * **key2** (void*) - Required - The second keyframe. * **time** (float) - Required - The blending time. ``` -------------------------------- ### RwImageRegisterImageFormat Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/dumps_libGTASA_32and64/dump 2.1 (32).txt Registers a new image format for loading and saving. Extends the supported image file types. ```APIDOC ## RwImageRegisterImageFormat(char const*, RwImage* (*)(char const*), RwImage* (*)(RwImage*, char const*)) ### Description Registers a new image format for loading and saving. Extends the supported image file types. ### Method Call ### Parameters * **extension** (char const*) - Required - The file extension for the image format. * **readFunc** (RwImage* (*)(char const*)) - Required - The function to read the image. * **writeFunc** (RwImage* (*)(RwImage*, char const*)) - Required - The function to write the image. ``` -------------------------------- ### Stack Allocation Compile Definitions Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/opus/CMakeLists.txt Sets compile definitions for stack allocation based on available options (VAR_ARRAYS, USE_ALLOCA, NONTHREADSAFE_PSEUDOSTACK). Errors if none are met. ```cmake if(OPUS_VAR_ARRAYS) target_compile_definitions(opus PRIVATE VAR_ARRAYS) elseif(OPUS_USE_ALLOCA) target_compile_definitions(opus PRIVATE USE_ALLOCA) elseif(OPUS_NONTHREADSAFE_PSEUDOSTACK) target_compile_definitions(opus PRIVATE NONTHREADSAFE_PSEUDOSTACK) else() message(ERROR "Need to set a define for stack allocation") endif() ``` -------------------------------- ### RQ_Command_rqTargetScissor Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/dumps_libGTASA_32and64/dump 2.1 (32).txt Command to set the scissor target. Used for defining rendering scissor regions. ```APIDOC ## RQ_Command_rqTargetScissor(char*&) ### Description Command to set the scissor target. Used for defining rendering scissor regions. ### Method Call ### Parameters * **scissorTarget** (char*&) - Required - The scissor target identifier. ``` -------------------------------- ### Conditional Compile Definition for Fortify Source Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/opus/CMakeLists.txt Enables _FORTIFY_SOURCE=2 for non-debug builds if OPUS_FORTIFY_SOURCE is set and not on MSVC. ```cmake if(OPUS_FORTIFY_SOURCE AND NOT MSVC) target_compile_definitions(opus PRIVATE $<$>:_FORTIFY_SOURCE=2>) endif() ``` -------------------------------- ### Define Opus Public Headers Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/opus/CMakeLists.txt Lists the public header files for the Opus library. ```cmake set(Opus_PUBLIC_HEADER ${CMAKE_CURRENT_SOURCE_DIR}/include/opus.h ${CMAKE_CURRENT_SOURCE_DIR}/include/opus_defines.h ${CMAKE_CURRENT_SOURCE_DIR}/include/opus_multistream.h ${CMAKE_CURRENT_SOURCE_DIR}/include/opus_projection.h ${CMAKE_CURRENT_SOURCE_DIR}/include/opus_types.h) ``` -------------------------------- ### Include Directories Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/CMakeLists.txt Adds include directories for the project. This allows header files to be found during compilation. The Opus library's include directory is added relative to the current list file. ```cmake include_directories( ${CMAKE_CURRENT_LIST_DIR}/opus/include ) ``` -------------------------------- ### Add Subdirectories Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/CMakeLists.txt Adds the 'opus' and 'samp' subdirectories to the build. CMake will process the CMakeLists.txt files within these directories. ```cmake add_subdirectory(opus) add_subdirectory(samp) ``` -------------------------------- ### RpHAnimKeyFrameStreamWrite Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/dumps_libGTASA_32and64/dump 2.1 (32).txt Writes an animation keyframe to a stream. Used for saving animation data. ```APIDOC ## RpHAnimKeyFrameStreamWrite(RtAnimAnimation const*, RwStream*) ### Description Writes an animation keyframe to a stream. Used for saving animation data. ### Method Call ### Parameters * **animation** (RtAnimAnimation const*) - Required - The animation containing the keyframes. * **stream** (RwStream*) - Required - The stream to write to. ``` -------------------------------- ### Configure SSE2 Intrinsics Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/opus/CMakeLists.txt Adds SSE2 intrinsics for CELT and defines OPUS_X86_MAY_HAVE_SSE2 if supported. Sets compile flags for non-MSVC compilers. ```cmake if(SSE2_SUPPORTED) if(OPUS_X86_MAY_HAVE_SSE2) add_sources_group(opus celt ${celt_sources_sse2}) target_compile_definitions(opus PRIVATE OPUS_X86_MAY_HAVE_SSE2) if(NOT MSVC) set_source_files_properties(${celt_sources_sse2} PROPERTIES COMPILE_FLAGS -msse2) endif() endif() if(OPUS_X86_PRESUME_SSE2) target_compile_definitions(opus PRIVATE OPUS_X86_PRESUME_SSE2) if(NOT MSVC) target_compile_options(opus PRIVATE -msse2) endif() endif() endif() ``` -------------------------------- ### Configure Shared Library Export (Windows) Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/opus/CMakeLists.txt Defines DLL_EXPORT for the opus target when building a shared library on Windows. ```cmake if(WIN32) target_compile_definitions(opus PRIVATE DLL_EXPORT) ``` -------------------------------- ### Enable Non-Threadsafe Pseudostack Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/opus/CMakeLists.txt Configures a non-threadsafe pseudostack when neither Variable Length Arrays nor `alloca` are supported. This is a fallback memory allocation strategy. ```cmake set(OPUS_NONTHREADSAFE_PSEUDOSTACK_HELP_STR "use a non threadsafe pseudostack when neither variable length arrays or alloca is supported.") cmake_dependent_option(OPUS_NONTHREADSAFE_PSEUDOSTACK ${OPUS_NONTHREADSAFE_PSEUDOSTACK_HELP_STR} ON "NOT OPUS_VAR_ARRAYS; NOT OPUS_USE_ALLOCA" OFF) add_feature_info(OPUS_NONTHREADSAFE_PSEUDOSTACK OPUS_NONTHREADSAFE_PSEUDOSTACK ${OPUS_NONTHREADSAFE_PSEUDOSTACK_HELP_STR}) ``` -------------------------------- ### RpUVAnimKeyFrameStreamRead Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/dumps_libGTASA_32and64/dump 2.1 (32).txt Reads UV animation keyframes from a stream. Used for loading texture animation data. ```APIDOC ## RpUVAnimKeyFrameStreamRead(RwStream*, RtAnimAnimation*) ### Description Reads UV animation keyframes from a stream. Used for loading texture animation data. ### Method Call ### Parameters * **stream** (RwStream*) - Required - The stream to read from. * **animation** (RtAnimAnimation*) - Required - The animation structure to populate. ``` -------------------------------- ### Conditional SSE4.1 Option Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/opus/CMakeLists.txt Defines an option to conditionally enable SSE4.1 support, overriding runtime checks. ```cmake set(OPUS_X86_PRESUME_SSE4_1_HELP_STR "assume target CPU has SSE4.1 support (override runtime check).") cmake_dependent_option(OPUS_X86_PRESUME_SSE4_1 ${OPUS_X86_PRESUME_SSE4_1_HELP_STR} OFF "OPUS_X86_MAY_HAVE_SSE4_1; NOT OPUS_DISABLE_INTRINSICS" OFF) ``` -------------------------------- ### OS_BillingRestorePurchases Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/dumps_libGTASA_32and64/dump 2.1 (32).txt Restores purchases for the OS billing service. Used to re-enable previously purchased items. ```APIDOC ## OS_BillingRestorePurchases() ### Description Restores purchases for the OS billing service. Used to re-enable previously purchased items. ### Method Call ``` -------------------------------- ### Configure SSE1 Intrinsics Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/opus/CMakeLists.txt Adds SSE1 intrinsics for CELT and defines OPUS_X86_MAY_HAVE_SSE if supported. Sets compile flags for non-MSVC compilers. ```cmake if(SSE1_SUPPORTED) if(OPUS_X86_MAY_HAVE_SSE) add_sources_group(opus celt ${celt_sources_sse}) target_compile_definitions(opus PRIVATE OPUS_X86_MAY_HAVE_SSE) if(NOT MSVC) set_source_files_properties(${celt_sources_sse} PROPERTIES COMPILE_FLAGS -msse) endif() endif() if(OPUS_X86_PRESUME_SSE) target_compile_definitions(opus PRIVATE OPUS_X86_PRESUME_SSE) if(NOT MSVC) target_compile_options(opus PRIVATE -msse) endif() endif() endif() ``` -------------------------------- ### _rwRasterSetFromImage4444 Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/dumps_libGTASA_32and64/dump 2.1 (32).txt Sets a 4444 pixel format raster from an RwImage. Used for converting image data to raster data. ```APIDOC ## _rwRasterSetFromImage4444(unsigned char*, int, RwImage*) ### Description Sets a 4444 pixel format raster from an RwImage. Used for converting image data to raster data. ### Method Call ### Parameters * **rasterData** (unsigned char*) - Required - The buffer to store the raster data. * **width** (int) - Required - The width of the image. * **image** (RwImage*) - Required - The image structure to read from. ``` -------------------------------- ### WarGamepad_GetGamepadType Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/dumps_libGTASA_32and64/dump 2.1 (32).txt Determines the type of a specified gamepad. This can be used to identify different gamepad models or configurations. ```APIDOC ## WarGamepad_GetGamepadType(int) ### Description Determines the type of a specified gamepad. This can be used to identify different gamepad models or configurations. ### Method Call ### Parameters * **gamepadIndex** (int) - Required - The index of the gamepad. ``` -------------------------------- ### Compile Definitions for Presumed ARM NEON Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/opus/CMakeLists.txt Defines compiler flags to assume ARM NEON is available, useful for build systems where runtime checks are not feasible. Use with caution. ```cmake target_compile_definitions(opus PRIVATE OPUS_ARM_PRESUME_NEON OPUS_ARM_PRESUME_NEON_INTR) ``` -------------------------------- ### Enable alloca for Stack Arrays Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/app/src/main/cpp/opus/CMakeLists.txt Configures the use of `alloca` for stack arrays, particularly on non-C99 compilers. This is enabled if `alloca` is supported and other conflicting options are not set. ```cmake set(OPUS_USE_ALLOCA_HELP_STR "use alloca for stack arrays (on non-C99 compilers).") cmake_dependent_option(OPUS_USE_ALLOCA ${OPUS_USE_ALLOCA_HELP_STR} ON "USE_ALLOCA_SUPPORTED; NOT OPUS_VAR_ARRAYS; NOT OPUS_NONTHREADSAFE_PSEUDOSTACK" OFF) add_feature_info(OPUS_USE_ALLOCA OPUS_USE_ALLOCA ${OPUS_USE_ALLOCA_HELP_STR}) ``` -------------------------------- ### _rwOpenGLSetRasterContext Source: https://github.com/kuzia15/sa-mp-2.10/blob/main/dumps_libGTASA_32and64/dump 2.1 (32).txt Sets the raster context for OpenGL rendering. Manages the active raster for drawing operations. ```APIDOC ## _rwOpenGLSetRasterContext(void*, void*, int) ### Description Sets the raster context for OpenGL rendering. Manages the active raster for drawing operations. ### Method Call ### Parameters * **raster** (void*) - Required - The raster to set as context. * **context** (void*) - Required - The rendering context. * **flags** (int) - Required - Context flags. ```