sdk: get/set coin blocker (#918)

This commit is contained in:
bicarus
2026-09-22 21:42:34 -07:00
committed by GitHub
parent 197d76755b
commit 7aba7da3b6
2 changed files with 67 additions and 0 deletions
+24
View File
@@ -248,6 +248,27 @@ typedef SPICE_SDK_STATUS_CODE (__cdecl spice_sdk_insert_coin_func)(
uint8_t amount
);
// get_coin_blocker (v0.6 and up)
// gets the current shared coin blocker state
// insert_coin bypasses the blocker regardless of this state
//
// blocked: receives true when coins are blocked, false when allowed
typedef SPICE_SDK_STATUS_CODE (__cdecl spice_sdk_get_coin_blocker_func)(
bool *blocked
);
// set_coin_blocker (v0.6 and up)
// sets the shared coin blocker state used by normal coin input
// this is not a persistent override; the game can change the state again
// insert_coin bypasses the blocker regardless of this state
//
// blocked: true to block coins, false to allow them
typedef SPICE_SDK_STATUS_CODE (__cdecl spice_sdk_set_coin_blocker_func)(
bool blocked
);
typedef struct SPICE_SDK_MODULE_INFO {
uint32_t size; // initialize to sizeof(SPICE_SDK_MODULE_INFO)
uintptr_t base; // loaded address, not the preferred PE image base
@@ -383,6 +404,9 @@ typedef struct SPICE_SDK_V0 {
spice_sdk_hook_library_func *hook_library;
spice_sdk_get_coin_blocker_func *get_coin_blocker;
spice_sdk_set_coin_blocker_func *set_coin_blocker;
} SPICE_SDK_V0;
typedef void (__cdecl spice_sdk_destroy_callback_func)(