Initial re-upload of spice2x-24-08-24
This commit is contained in:
69
games/scotto/io.cpp
Normal file
69
games/scotto/io.cpp
Normal file
@@ -0,0 +1,69 @@
|
||||
#include "io.h"
|
||||
|
||||
std::vector<Button> &games::scotto::get_buttons() {
|
||||
static std::vector<Button> buttons;
|
||||
|
||||
if (buttons.empty()) {
|
||||
buttons = GameAPI::Buttons::getButtons("Scotto");
|
||||
|
||||
GameAPI::Buttons::sortButtons(
|
||||
&buttons,
|
||||
"Service",
|
||||
"Test",
|
||||
"Coin Mech",
|
||||
"Start",
|
||||
"Up",
|
||||
"Down",
|
||||
"Cup 1",
|
||||
"Cup 2",
|
||||
"First Pad",
|
||||
"Pad A (Left Bottom)",
|
||||
"Pad B (Left Middle)",
|
||||
"Pad C (Left Top)",
|
||||
"Pad D (Right Top)",
|
||||
"Pad E (Right Middle)",
|
||||
"Pad F (Right Bottom)"
|
||||
);
|
||||
}
|
||||
|
||||
return buttons;
|
||||
}
|
||||
|
||||
std::vector<Light> &games::scotto::get_lights() {
|
||||
static std::vector<Light> lights;
|
||||
|
||||
if (lights.empty()) {
|
||||
lights = GameAPI::Lights::getLights("Scotto");
|
||||
|
||||
GameAPI::Lights::sortLights(
|
||||
&lights,
|
||||
"First Pad R",
|
||||
"First Pad G",
|
||||
"First Pad B",
|
||||
"Pad A R",
|
||||
"Pad A G",
|
||||
"Pad A B",
|
||||
"Pad B R",
|
||||
"Pad B G",
|
||||
"Pad B B",
|
||||
"Pad C R",
|
||||
"Pad C G",
|
||||
"Pad C B",
|
||||
"Pad D R",
|
||||
"Pad D G",
|
||||
"Pad D B",
|
||||
"Pad E R",
|
||||
"Pad E G",
|
||||
"Pad E B",
|
||||
"Pad F R",
|
||||
"Pad F G",
|
||||
"Pad F B",
|
||||
"Cup R",
|
||||
"Cup G",
|
||||
"Cup B",
|
||||
"Button"
|
||||
);
|
||||
}
|
||||
|
||||
return lights;
|
||||
}
|
||||
63
games/scotto/io.h
Normal file
63
games/scotto/io.h
Normal file
@@ -0,0 +1,63 @@
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include "cfg/api.h"
|
||||
|
||||
namespace games::scotto {
|
||||
|
||||
// all buttons in correct order
|
||||
namespace Buttons {
|
||||
enum {
|
||||
Service,
|
||||
Test,
|
||||
CoinMech,
|
||||
Start,
|
||||
Up,
|
||||
Down,
|
||||
Cup1,
|
||||
Cup2,
|
||||
FirstPad,
|
||||
PadA,
|
||||
PadB,
|
||||
PadC,
|
||||
PadD,
|
||||
PadE,
|
||||
PadF,
|
||||
};
|
||||
}
|
||||
|
||||
// all lights in correct order
|
||||
namespace Lights {
|
||||
enum {
|
||||
FIRST_PAD_R,
|
||||
FIRST_PAD_G,
|
||||
FIRST_PAD_B,
|
||||
PAD_A_R,
|
||||
PAD_A_G,
|
||||
PAD_A_B,
|
||||
PAD_B_R,
|
||||
PAD_B_G,
|
||||
PAD_B_B,
|
||||
PAD_C_R,
|
||||
PAD_C_G,
|
||||
PAD_C_B,
|
||||
PAD_D_R,
|
||||
PAD_D_G,
|
||||
PAD_D_B,
|
||||
PAD_E_R,
|
||||
PAD_E_G,
|
||||
PAD_E_B,
|
||||
PAD_F_R,
|
||||
PAD_F_G,
|
||||
PAD_F_B,
|
||||
CUP_R,
|
||||
CUP_G,
|
||||
CUP_B,
|
||||
BUTTON,
|
||||
};
|
||||
}
|
||||
|
||||
// getters
|
||||
std::vector<Button> &get_buttons();
|
||||
std::vector<Light> &get_lights();
|
||||
}
|
||||
23
games/scotto/scotto.cpp
Normal file
23
games/scotto/scotto.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
#include "scotto.h"
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#include "acio/icca/icca.h"
|
||||
#include "games/game.h"
|
||||
|
||||
namespace games::scotto {
|
||||
|
||||
ScottoGame::ScottoGame() : Game("Scotto") {
|
||||
}
|
||||
|
||||
void ScottoGame::attach() {
|
||||
Game::attach();
|
||||
|
||||
// scotto has a flipped numpad
|
||||
acio::ICCA_FLIP_ROWS = !acio::ICCA_FLIP_ROWS;
|
||||
}
|
||||
|
||||
void ScottoGame::detach() {
|
||||
Game::detach();
|
||||
}
|
||||
}
|
||||
13
games/scotto/scotto.h
Normal file
13
games/scotto/scotto.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include "games/game.h"
|
||||
|
||||
namespace games::scotto {
|
||||
|
||||
class ScottoGame : public games::Game {
|
||||
public:
|
||||
ScottoGame();
|
||||
virtual void attach() override;
|
||||
virtual void detach() override;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user