You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
SmokeAPI/src/store_mode/vstdlib/vstdlib.hpp

28 lines
899 B
C++

#include <store_mode/store.hpp>
namespace store::vstdlib {
struct CallbackData {
uintptr_t get_callback_intercept_address() {
return reinterpret_cast<uintptr_t*>(this)[store::config.vstdlib_callback_interceptor_address_offset];
}
uintptr_t get_callback_address() {
return reinterpret_cast<uintptr_t*>(this)[store::config.vstdlib_callback_address_offset];
}
};
struct CoroutineData {
CallbackData* get_callback_data() {
return reinterpret_cast<CallbackData**>(this)[store::config.vstdlib_callback_data_offset];
}
const char* get_callback_name() {
return reinterpret_cast<const char**>(this)[store::config.vstdlib_callback_name_offset];
}
};
typedef uint32_t HCoroutine;
DLL_EXPORT(HCoroutine) Coroutine_Create(void* callback_address, CoroutineData* data);
}