mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-11-29 10:48:56 -08:00
## Link to GitHub Issue or related Pull Request, if one exists #0 ## Description of change _Just imitation of the existing implementations of CCJ, MFG or QKS._ - Add BI2X hook and lighting support. - Align Unity launch argument handling and cursor visibility with other Unity games in spice2x using `unity_utils::force_show_cursor` and `unity_utils::set_args`. - Add `-bcargs` command-line option to pass custom arguments directly to the Unity player. - Upgrade I/O initialization to `devicehook_init_trampoline()` and ensure the raw log directory is created recursively. ## Testing - Verified build on GitHub Actions with no compiler warnings. - Tested with the CI compiled executable. - HID lighting worked fine on aic_pico and iidx_pico. - Display arguments such as `-w`, `-windowborder` and `-windowsize` are correctly passed. _(However, once the game launches, it reinitializes the window and switches to fullscreen before the checking phase begins. To maintain these arguments, an additional hook is required. I resolved this issue using a BepInEx plugin.)_
79 lines
1.8 KiB
C++
79 lines
1.8 KiB
C++
#include "io.h"
|
|
|
|
std::vector<Button> &games::bc::get_buttons() {
|
|
static std::vector<Button> buttons;
|
|
|
|
if (buttons.empty()) {
|
|
buttons = GameAPI::Buttons::getButtons("Busou Shinki: Armored Princess Battle Conductor");
|
|
|
|
GameAPI::Buttons::sortButtons(
|
|
&buttons,
|
|
"Service",
|
|
"Test",
|
|
"Up",
|
|
"Down",
|
|
"Left",
|
|
"Right",
|
|
"Joystick Button",
|
|
"Trigger 1",
|
|
"Trigger 2",
|
|
"Button 1",
|
|
"Button 2",
|
|
"Button 3",
|
|
"Button 4"
|
|
);
|
|
}
|
|
|
|
return buttons;
|
|
}
|
|
|
|
std::string games::bc::get_buttons_help() {
|
|
// keep to max 100 characters wide
|
|
return "";
|
|
}
|
|
|
|
std::vector<Analog> &games::bc::get_analogs() {
|
|
static std::vector<Analog> analogs;
|
|
|
|
if (analogs.empty()) {
|
|
analogs = GameAPI::Analogs::getAnalogs("Busou Shinki: Armored Princess Battle Conductor");
|
|
|
|
using GameAPI::Analogs::AnalogType;
|
|
|
|
GameAPI::Analogs::sortAnalogsWithType(&analogs, {
|
|
{ "Stick X", AnalogType::LinearCentered },
|
|
{ "Stick Y", AnalogType::LinearCentered }
|
|
});
|
|
}
|
|
|
|
return analogs;
|
|
}
|
|
|
|
std::vector<Light> &games::bc::get_lights() {
|
|
static std::vector<Light> lights;
|
|
|
|
if (lights.empty()) {
|
|
lights = GameAPI::Lights::getLights("Busou Shinki: Armored Princess Battle Conductor");
|
|
|
|
GameAPI::Lights::sortLights(
|
|
&lights,
|
|
"Title Panel R",
|
|
"Title Panel G",
|
|
"Title Panel B",
|
|
"Side Panel R",
|
|
"Side Panel G",
|
|
"Side Panel B",
|
|
"Card Reader R",
|
|
"Card Reader G",
|
|
"Card Reader B",
|
|
"Joystick R",
|
|
"Joystick G",
|
|
"Joystick B",
|
|
"Button",
|
|
"IR LED"
|
|
);
|
|
}
|
|
|
|
return lights;
|
|
}
|