MCPcopy Create free account
hub / github.com/axhlzy/Il2CppHookScripts / allocVector

Function allocVector

Il2cppHook/_Ufunc.js:8141–8149  ·  view source on GitHub ↗
(x = 0, y = 0, z = 0, w)

Source from the content-addressed store, hash-verified

8139const alloc = (size = 1) => allocP(size * p_size);
8140exports.alloc = alloc;
8141function allocVector(x = 0, y = 0, z = 0, w) {
8142 let argsLength = arguments.length;
8143 argsLength = argsLength == 0 ? 3 : argsLength;
8144 let temp_vector = alloc(argsLength + 1);
8145 for (let index = 0; index < argsLength; ++index)
8146 temp_vector.add(Process.pointerSize * index).writeFloat(arguments[index] == undefined ? 0 : arguments[index]);
8147 temp_vector.add(Process.pointerSize * argsLength).writeInt(0);
8148 return temp_vector;
8149}
8150exports.allocVector = allocVector;
8151globalThis.allocCStr = allocCStr;
8152globalThis.allocUStr = allocUStr;

Callers 3

showEventDataFunction · 0.70
get_positionMethod · 0.70
newMethod · 0.70

Calls 1

allocFunction · 0.70

Tested by

no test coverage detected