forked from TeamTofuShop/segatools
This adds support for APMv3 I/O, menus and the launcher. * Added a apm3hook dll and I/O based on the usual layout. * Added C:\Mount\Apm to vfs. * Added the relevant .dlls to unityhook. * Added a hook for apmmount.dll that uses `CreateDosDevice` to mount decrypted data to the locations the launcher and games expect files to be. This will conflict with anything that is already at W:\ and X:\, but I do not have better solutions for this. * `launch.bat` is a bit more involved as it simulates the launcher loop. It can be broken by alt+f4ing or closing the launcher with "X". * An extra export was added, so rundll32 can be used to get rid of the dosdevices after the launcher was killed. * Since all the games do everything via `X:\lib\apm.dll`, no game hooks were needed in testing, therefore, `game.bat` files can be used as is. * Path hooks are applied correctly, so you can go correctly between games, launcher, sub system test mode and game test modes. A setup guide (some stuff specific to my server) can be found here: https://gmg.hopto.org:82/gmg/wiki/index.php/All.Net_P-ras_Multi_Menu Tested with the 2 APM sample apps, Blazblue, Puyo, Guilty Gear and some weird unity puzzle game whose name I forgot.   Reviewed-on: TeamTofuShop/segatools#73 Co-authored-by: kyoubate-haruka <46010460+kyoubate-haruka@users.noreply.github.com> Co-committed-by: kyoubate-haruka <46010460+kyoubate-haruka@users.noreply.github.com>
37 lines
1.2 KiB
C
37 lines
1.2 KiB
C
#include <windows.h>
|
|
|
|
#include <assert.h>
|
|
#include <stddef.h>
|
|
#include <stdio.h>
|
|
|
|
#include "apm3io/config.h"
|
|
|
|
const int BUTTON_DEFAULTS[] = {'Q','W','E','R','A','S','D','F'};
|
|
|
|
void apm3_io_config_load(
|
|
struct apm3_io_config *cfg,
|
|
const wchar_t *filename)
|
|
{
|
|
assert(cfg != NULL);
|
|
assert(filename != NULL);
|
|
|
|
cfg->vk_test = GetPrivateProfileIntW(L"io4", L"test", '1', filename);
|
|
cfg->vk_service = GetPrivateProfileIntW(L"io4", L"service", '2', filename);
|
|
cfg->vk_coin = GetPrivateProfileIntW(L"io4", L"coin", '3', filename);
|
|
|
|
cfg->vk_start = GetPrivateProfileIntW(L"io4", L"start", 'P', filename);
|
|
cfg->vk_home = GetPrivateProfileIntW(L"io4", L"home", 'O', filename);
|
|
|
|
cfg->vk_up = GetPrivateProfileIntW(L"io4", L"up", VK_UP, filename);
|
|
cfg->vk_right = GetPrivateProfileIntW(L"io4", L"right", VK_RIGHT, filename);
|
|
cfg->vk_down = GetPrivateProfileIntW(L"io4", L"down", VK_DOWN, filename);
|
|
cfg->vk_left = GetPrivateProfileIntW(L"io4", L"left", VK_LEFT, filename);
|
|
|
|
wchar_t tmp[16];
|
|
for (int i = 0; i < APM3_BUTTON_COUNT; i++) {
|
|
swprintf_s(tmp, 32, L"button%d", i + 1);
|
|
cfg->vk_buttons[i] = GetPrivateProfileIntW(L"io4", tmp, BUTTON_DEFAULTS[i], filename);
|
|
}
|
|
|
|
}
|