mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-10-11 12:23:50 -07:00
Dance around early support (#897)
## Link to GitHub Issue or related Pull Request, if one exists N/A ## Description of change This PR add initial supports for running Dance aRound in window mode, with keyboard, cardio supports. ## Testing - Tested game play under Windows 10 using Kinect V1 with my visionpose compatible layer (https://github.com/Avimitin/dance-around-anygear) https://github.com/user-attachments/assets/4b821dcf-751d-4953-b626-4a9491569183 - Tested full game play, user profile saving with Asphyxia Assisted by AI. --------- Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
@@ -337,6 +337,18 @@ typedef SPICE_SDK_STATUS_CODE (__cdecl spice_sdk_register_d3d9_func)(
|
||||
void *userdata
|
||||
);
|
||||
|
||||
// hook_library (v0.5 and up)
|
||||
//
|
||||
// maps an exact LoadLibrary name to a module that the plugin has already loaded
|
||||
//
|
||||
// library_name: exact ANSI library name or path used by the target
|
||||
// module: module handle returned by LoadLibrary; keep it loaded until shutdown
|
||||
|
||||
typedef SPICE_SDK_STATUS_CODE (__cdecl spice_sdk_hook_library_func)(
|
||||
const char *library_name,
|
||||
void *module
|
||||
);
|
||||
|
||||
typedef struct SPICE_SDK_V0 {
|
||||
uint32_t size;
|
||||
|
||||
@@ -369,6 +381,8 @@ typedef struct SPICE_SDK_V0 {
|
||||
|
||||
spice_sdk_register_d3d9_func *register_d3d9;
|
||||
|
||||
spice_sdk_hook_library_func *hook_library;
|
||||
|
||||
} SPICE_SDK_V0;
|
||||
|
||||
typedef void (__cdecl spice_sdk_destroy_callback_func)(
|
||||
|
||||
@@ -1899,6 +1899,57 @@ typedef enum SPICE_SDK_POLARIS_CHORD_LIGHTS {
|
||||
PC_Light_Button12_B,
|
||||
} SPICE_SDK_POLARIS_CHORD_LIGHTS;
|
||||
|
||||
// DANCE aROUND
|
||||
|
||||
typedef enum SPICE_SDK_DANCE_AROUND_BUTTONS {
|
||||
UDN_Button_Service,
|
||||
UDN_Button_Test,
|
||||
UDN_Button_CoinMech,
|
||||
UDN_Button_Start,
|
||||
UDN_Button_Up,
|
||||
UDN_Button_Down,
|
||||
UDN_Button_Left,
|
||||
UDN_Button_Right,
|
||||
} SPICE_SDK_DANCE_AROUND_BUTTONS;
|
||||
|
||||
typedef enum SPICE_SDK_DANCE_AROUND_LIGHTS {
|
||||
UDN_Light_CardReaderR,
|
||||
UDN_Light_CardReaderG,
|
||||
UDN_Light_CardReaderB,
|
||||
UDN_Light_Start,
|
||||
UDN_Light_Up,
|
||||
UDN_Light_Down,
|
||||
UDN_Light_Left,
|
||||
UDN_Light_Right,
|
||||
UDN_Light_TitleR,
|
||||
UDN_Light_TitleG,
|
||||
UDN_Light_TitleB,
|
||||
UDN_Light_PillarRightTopR,
|
||||
UDN_Light_PillarRightTopG,
|
||||
UDN_Light_PillarRightTopB,
|
||||
UDN_Light_PillarRightBottomR,
|
||||
UDN_Light_PillarRightBottomG,
|
||||
UDN_Light_PillarRightBottomB,
|
||||
UDN_Light_StageLeftR,
|
||||
UDN_Light_StageLeftG,
|
||||
UDN_Light_StageLeftB,
|
||||
UDN_Light_CabinetLeftR,
|
||||
UDN_Light_CabinetLeftG,
|
||||
UDN_Light_CabinetLeftB,
|
||||
UDN_Light_PillarLeftTopR,
|
||||
UDN_Light_PillarLeftTopG,
|
||||
UDN_Light_PillarLeftTopB,
|
||||
UDN_Light_PillarLeftBottomR,
|
||||
UDN_Light_PillarLeftBottomG,
|
||||
UDN_Light_PillarLeftBottomB,
|
||||
UDN_Light_StageRightR,
|
||||
UDN_Light_StageRightG,
|
||||
UDN_Light_StageRightB,
|
||||
UDN_Light_CabinetRightR,
|
||||
UDN_Light_CabinetRightG,
|
||||
UDN_Light_CabinetRightB,
|
||||
} SPICE_SDK_DANCE_AROUND_LIGHTS;
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "d3d9.h"
|
||||
#include "avs/game.h"
|
||||
#include "games/io.h"
|
||||
#include "hooks/libraryhook.h"
|
||||
#include "launcher/launcher.h"
|
||||
#include "misc/eamuse.h"
|
||||
#include "overlay/notifications.h"
|
||||
@@ -38,6 +39,7 @@ static spice_sdk_insert_coin_func sdk_insert_coin;
|
||||
static spice_sdk_get_module_info_func sdk_get_module_info;
|
||||
static spice_sdk_get_plugin_directory_func sdk_get_plugin_directory;
|
||||
static spice_sdk_register_d3d9_func sdk_register_d3d9;
|
||||
static spice_sdk_hook_library_func sdk_hook_library;
|
||||
|
||||
// DLLs
|
||||
static int sdk_modules_count = 0;
|
||||
@@ -204,6 +206,11 @@ sdk_init(
|
||||
}
|
||||
// end of 0.4
|
||||
|
||||
if (v0->size >= RTL_SIZEOF_THROUGH_FIELD(SPICE_SDK_V0, hook_library)) {
|
||||
v0->hook_library = sdk_hook_library;
|
||||
}
|
||||
// end of 0.5
|
||||
|
||||
// any newer minor iterations will need to check the size
|
||||
|
||||
{
|
||||
@@ -698,6 +705,30 @@ sdk_add_toast(
|
||||
return SPICE_SDK_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
SPICE_SDK_STATUS_CODE
|
||||
__cdecl
|
||||
sdk_hook_library(
|
||||
const char *library_name,
|
||||
void *module
|
||||
)
|
||||
{
|
||||
std::shared_lock lock(sdk_global_mutex);
|
||||
if (sdk_shutting_down || !sdk_initialized) {
|
||||
return SPICE_SDK_STATUS_TOO_LATE;
|
||||
}
|
||||
|
||||
if (!library_name || !library_name[0]) {
|
||||
return SPICE_SDK_STATUS_INVALID_ARGUMENT_1;
|
||||
}
|
||||
if (!module) {
|
||||
return SPICE_SDK_STATUS_INVALID_ARGUMENT_2;
|
||||
}
|
||||
|
||||
libraryhook_hook_library(library_name, static_cast<HMODULE>(module));
|
||||
// launcher::signal::attach enables library hooks before SDK entry points run.
|
||||
return SPICE_SDK_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
SPICE_SDK_STATUS_CODE
|
||||
__cdecl
|
||||
sdk_insert_coin(
|
||||
|
||||
Reference in New Issue
Block a user