NORECOIL 100%.so
NORECOIL 100%.so
#include <vector>
#include <sstream>
#include <iomanip>
#include <algorithm>
// Function to parse hex values and generate a C++ vector with the corresponding
values
std::vector<int> parseHexValues(const std::string& hexString) {
// Remove any whitespace from the hex string
std::string cleanedHexString;
cleanedHexString.reserve(hexString.size());
std::remove_copy_if(hexString.begin(), hexString.end(),
std::back_inserter(cleanedHexString), ::isspace);
return hexValues;
}
// Exported functions
extern "C" {
// Parse hex values and generate a C++ vector with the corresponding values
int* parseHexValues(const char* hexString, int& size) {
std::vector<int> values = parseHexValues(hexString);
size = values.size();
int* result = new int[size];
std::copy(values.begin(), values.end(), result);
return result;
}
int main() {
// Example usage: Parse hex values
const char* hexString1 =
"00,00,00,00,00,00,00,00,15,6e,00,00,00,00,00,00,00,40,01,00,00,00,00,00,29,dc,03,0
0,00,00,00,00,00,00,28,00,00,00,00,00";
const char* hexString2 =
"00,00,00,00,00,00,00,00,fd,20,02,00,00,00,00,00,00,24,06,00,00,00,00,00,00,fc,15,0
0,00,00,00,00,00,c0,bb,02,00,00,00,00";
int sizeX, sizeY;
int* smoothMouseXCurve = parseHexValues(hexString1, sizeX);
int* smoothMouseYCurve = parseHexValues(hexString2, sizeY);
return 0;
}