Initial re-upload of spice2x-24-08-24

This commit is contained in:
2024-08-28 11:10:34 -04:00
commit caa9e02285
1181 changed files with 380065 additions and 0 deletions

44
games/bbc/bbc.cpp Normal file
View File

@@ -0,0 +1,44 @@
#include "bbc.h"
#include "avs/game.h"
#include "games/shared/lcdhandle.h"
#include "hooks/devicehook.h"
#include "hooks/graphics/graphics.h"
#include "util/detour.h"
#include "util/logging.h"
#include "util/sigscan.h"
namespace games::bbc {
BBCGame::BBCGame() : Game("Bishi Bashi Channel") {
}
void BBCGame::attach() {
Game::attach();
devicehook_init();
devicehook_add(new games::shared::LCDHandle());
// window patch
if (GRAPHICS_WINDOWED) {
unsigned char pattern[] = {
0x48, 0x8D, 0x54, 0x24, 0x40, 0x41, 0x8D, 0x4E, 0x20, 0x41, 0x0F, 0xB6, 0xE8
};
unsigned char replace[] = {
0x48, 0x8D, 0x54, 0x24, 0x40, 0x41, 0x8D, 0x4E, 0x20, 0x31, 0xED, 0x90, 0x90
};
std::string mask = "XXXXXXXXXXXXX";
if (!replace_pattern(
avs::game::DLL_INSTANCE,
pattern,
mask.c_str(),
0,
0,
replace,
mask.c_str()))
log_warning("bbc", "windowed mode failed");
}
}
}