typedef int_thiscall _getXPosvoid;typedef int_thiscall _getYPosvoid;typedef bool_thiscall _isObjectTypeDWORD int;typedef DWORD _thiscall _getObjectManagerDWORD;typedef int_stdcall _sq_SetCurrentPosDWO
The code provided defines several function typedefs and function pointers for specific functions at specific memory addresses.
The first typedefs and function pointers are for functions related to getting the X and Y positions of an object, checking if an object is of a certain type, and getting the object manager. These function pointers are casted to the appropriate typedefs and assigned the memory addresses of the respective functions.
The next typedef and function pointer is for a function that sets the current position of an object. This function pointer is casted to the appropriate typedef and assigned the memory address of the function.
The final typedefs and function pointers are for functions related to getting collision objects and the number of collision objects in the object manager. These function pointers are casted to the appropriate typedefs and assigned the memory addresses of the respective functions.
The my_setItemPosCMD function is a custom function that takes a pointer to pthis as a parameter. This function first gets the object manager from pthis using the getObjectManager function pointer. It then iterates over each collision object in the object manager and checks if the collision object is of type 289 using the isObjectType function pointer. If it is, the sq_SetCurrentPos function pointer is used to set the current position of the collision object to the X and Y positions of pthis. Finally, the function returns true
原文地址: https://www.cveoy.top/t/topic/iGTD 著作权归作者所有。请勿转载和采集!