split out platform/input to its own folder

This commit is contained in:
Tropical 2026-04-07 12:12:42 -05:00
parent b88a89ae01
commit a3a21557f8
110 changed files with 716 additions and 722 deletions

View file

@ -2,7 +2,7 @@
#include "app/common/Game.h" #include "app/common/Game.h"
#include "platform/PlatformTypes.h" #include "platform/PlatformTypes.h"
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Profile.h" #include "platform/sdl2/Profile.h"
#include "platform/sdl2/Render.h" #include "platform/sdl2/Render.h"
#include "platform/sdl2/Storage.h" #include "platform/sdl2/Storage.h"
@ -74,7 +74,7 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
#include "platform/sdl2/Input.h" #include "platform/input/input.h"
#include "app/common/Audio/SoundEngine.h" #include "app/common/Audio/SoundEngine.h"
#include "app/common/Colours/ColourTable.h" #include "app/common/Colours/ColourTable.h"
#include "app/common/DLC/DLCPack.h" #include "app/common/DLC/DLCPack.h"
@ -258,7 +258,7 @@ bool Game::DebugArtToolsOn() {
#endif #endif
void Game::SetDebugSequence(const char* pchSeq) { void Game::SetDebugSequence(const char* pchSeq) {
InputManager.SetDebugSequence(pchSeq, [this]() -> int { PlatformInput.SetDebugSequence(pchSeq, [this]() -> int {
// printf("sequence matched\n"); // printf("sequence matched\n");
m_debugOptions.setDebugOptions(!m_debugOptions.settingsOn()); m_debugOptions.setDebugOptions(!m_debugOptions.settingsOn());
@ -624,7 +624,7 @@ float Game::getTrialTimer(void) {
bool Game::IsLocalMultiplayerAvailable() { bool Game::IsLocalMultiplayerAvailable() {
unsigned int connectedControllers = 0; unsigned int connectedControllers = 0;
for (unsigned int i = 0; i < XUSER_MAX_COUNT; ++i) { for (unsigned int i = 0; i < XUSER_MAX_COUNT; ++i) {
if (InputManager.IsPadConnected(i) || ProfileManager.IsSignedIn(i)) if (PlatformInput.IsPadConnected(i) || ProfileManager.IsSignedIn(i))
++connectedControllers; ++connectedControllers;
} }
@ -635,8 +635,8 @@ bool Game::IsLocalMultiplayerAvailable() {
// Found this in GameNetworkManager? // Found this in GameNetworkManager?
// #ifdef 0 // #ifdef 0
// iOtherConnectedControllers = // iOtherConnectedControllers =
// InputManager.GetConnectedGamepadCount(); // PlatformInput.GetConnectedGamepadCount();
// if((InputManager.IsPadConnected(userIndex) || // if((PlatformInput.IsPadConnected(userIndex) ||
// ProfileManager.IsSignedIn(userIndex))) // ProfileManager.IsSignedIn(userIndex)))
// { // {
// --iOtherConnectedControllers; // --iOtherConnectedControllers;
@ -644,7 +644,7 @@ bool Game::IsLocalMultiplayerAvailable() {
// #else // #else
// for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i) // for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i)
// { // {
// if( (i!=userIndex) && (InputManager.IsPadConnected(i) || // if( (i!=userIndex) && (PlatformInput.IsPadConnected(i) ||
// ProfileManager.IsSignedIn(i)) ) // ProfileManager.IsSignedIn(i)) )
// { // {
// iOtherConnectedControllers++; // iOtherConnectedControllers++;

View file

@ -20,7 +20,7 @@
#include "minecraft/server/level/ServerPlayer.h" #include "minecraft/server/level/ServerPlayer.h"
#include "minecraft/world/entity/player/Player.h" #include "minecraft/world/entity/player/Player.h"
#include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/tile/Tile.h"
#include "platform/sdl2/Input.h" #include "platform/input/input.h"
#include "platform/sdl2/Render.h" #include "platform/sdl2/Render.h"
#include "platform/sdl2/Storage.h" #include "platform/sdl2/Storage.h"
#include "app/common/Audio/SoundEngine.h" #include "app/common/Audio/SoundEngine.h"
@ -301,37 +301,37 @@ void GameSettingsManager::actionGameSettings(int iPad, eGameSetting eVal) {
case eGameSetting_ViewBob: case eGameSetting_ViewBob:
break; break;
case eGameSetting_ControlScheme: case eGameSetting_ControlScheme:
InputManager.SetJoypadMapVal( PlatformInput.SetJoypadMapVal(
iPad, (GameSettingsA[iPad]->usBitmaskValues & 0x30) >> 4); iPad, (GameSettingsA[iPad]->usBitmaskValues & 0x30) >> 4);
break; break;
case eGameSetting_ControlInvertLook: case eGameSetting_ControlInvertLook:
break; break;
case eGameSetting_ControlSouthPaw: case eGameSetting_ControlSouthPaw:
if (GameSettingsA[iPad]->usBitmaskValues & 0x80) { if (GameSettingsA[iPad]->usBitmaskValues & 0x80) {
InputManager.SetJoypadStickAxisMap(iPad, AXIS_MAP_LX, PlatformInput.SetJoypadStickAxisMap(iPad, AXIS_MAP_LX,
AXIS_MAP_RX); AXIS_MAP_RX);
InputManager.SetJoypadStickAxisMap(iPad, AXIS_MAP_LY, PlatformInput.SetJoypadStickAxisMap(iPad, AXIS_MAP_LY,
AXIS_MAP_RY); AXIS_MAP_RY);
InputManager.SetJoypadStickAxisMap(iPad, AXIS_MAP_RX, PlatformInput.SetJoypadStickAxisMap(iPad, AXIS_MAP_RX,
AXIS_MAP_LX); AXIS_MAP_LX);
InputManager.SetJoypadStickAxisMap(iPad, AXIS_MAP_RY, PlatformInput.SetJoypadStickAxisMap(iPad, AXIS_MAP_RY,
AXIS_MAP_LY); AXIS_MAP_LY);
InputManager.SetJoypadStickTriggerMap(iPad, TRIGGER_MAP_0, PlatformInput.SetJoypadStickTriggerMap(iPad, TRIGGER_MAP_0,
TRIGGER_MAP_1); TRIGGER_MAP_1);
InputManager.SetJoypadStickTriggerMap(iPad, TRIGGER_MAP_1, PlatformInput.SetJoypadStickTriggerMap(iPad, TRIGGER_MAP_1,
TRIGGER_MAP_0); TRIGGER_MAP_0);
} else { } else {
InputManager.SetJoypadStickAxisMap(iPad, AXIS_MAP_LX, PlatformInput.SetJoypadStickAxisMap(iPad, AXIS_MAP_LX,
AXIS_MAP_LX); AXIS_MAP_LX);
InputManager.SetJoypadStickAxisMap(iPad, AXIS_MAP_LY, PlatformInput.SetJoypadStickAxisMap(iPad, AXIS_MAP_LY,
AXIS_MAP_LY); AXIS_MAP_LY);
InputManager.SetJoypadStickAxisMap(iPad, AXIS_MAP_RX, PlatformInput.SetJoypadStickAxisMap(iPad, AXIS_MAP_RX,
AXIS_MAP_RX); AXIS_MAP_RX);
InputManager.SetJoypadStickAxisMap(iPad, AXIS_MAP_RY, PlatformInput.SetJoypadStickAxisMap(iPad, AXIS_MAP_RY,
AXIS_MAP_RY); AXIS_MAP_RY);
InputManager.SetJoypadStickTriggerMap(iPad, TRIGGER_MAP_0, PlatformInput.SetJoypadStickTriggerMap(iPad, TRIGGER_MAP_0,
TRIGGER_MAP_0); TRIGGER_MAP_0);
InputManager.SetJoypadStickTriggerMap(iPad, TRIGGER_MAP_1, PlatformInput.SetJoypadStickTriggerMap(iPad, TRIGGER_MAP_1,
TRIGGER_MAP_1); TRIGGER_MAP_1);
} }
break; break;

View file

@ -430,7 +430,7 @@ void Game::HandleXuiActions(void) {
// 4J-PB - cancel any possible std::string verifications // 4J-PB - cancel any possible std::string verifications
// queued with LIVE // queued with LIVE
// InputManager.CancelAllVerifyInProgress(); // PlatformInput.CancelAllVerifyInProgress();
// In a split screen, only the primary player actually // In a split screen, only the primary player actually
// quits the game, others just remove their players // quits the game, others just remove their players

View file

@ -16,8 +16,8 @@
#include "minecraft/client/Minecraft.h" #include "minecraft/client/Minecraft.h"
#include "minecraft/client/skins/TexturePack.h" #include "minecraft/client/skins/TexturePack.h"
#include "minecraft/client/skins/TexturePackRepository.h" #include "minecraft/client/skins/TexturePackRepository.h"
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Input.h" #include "platform/input/input.h"
#include "platform/sdl2/Render.h" #include "platform/sdl2/Render.h"
#include "platform/XboxStubs.h" #include "platform/XboxStubs.h"
#include "strings.h" #include "strings.h"
@ -348,8 +348,8 @@ std::wstring LocalizationManager::formatHTMLString(
std::wstring LocalizationManager::getActionReplacement( std::wstring LocalizationManager::getActionReplacement(
int iPad, unsigned char ucAction) { int iPad, unsigned char ucAction) {
unsigned int input = InputManager.GetGameJoypadMaps( unsigned int input = PlatformInput.GetGameJoypadMaps(
InputManager.GetJoypadMapVal(iPad), ucAction); PlatformInput.GetJoypadMapVal(iPad), ucAction);
std::wstring replacement = L""; std::wstring replacement = L"";

View file

@ -9,7 +9,7 @@
#include <thread> #include <thread>
#include <vector> #include <vector>
#include "platform/sdl2/Input.h" #include "platform/input/input.h"
#include "platform/sdl2/Profile.h" #include "platform/sdl2/Profile.h"
#include "platform/sdl2/Render.h" #include "platform/sdl2/Render.h"
#include "platform/sdl2/Storage.h" #include "platform/sdl2/Storage.h"
@ -1506,7 +1506,7 @@ void CGameNetworkManager::ServerStoppedWait() {
// Tick some simple things // Tick some simple things
ProfileManager.Tick(); ProfileManager.Tick();
StorageManager.Tick(); StorageManager.Tick();
InputManager.Tick(); PlatformInput.Tick();
RenderManager.Tick(); RenderManager.Tick();
ui.tick(); ui.tick();
ui.render(); ui.render();

View file

@ -17,7 +17,7 @@
#include "minecraft/world/entity/player/Player.h" #include "minecraft/world/entity/player/Player.h"
#include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/tile/Tile.h"
#include "minecraft/world/level/storage/ConsoleSaveFileIO/compression.h" #include "minecraft/world/level/storage/ConsoleSaveFileIO/compression.h"
#include "platform/sdl2/Input.h" #include "platform/input/input.h"
#include "platform/sdl2/Profile.h" #include "platform/sdl2/Profile.h"
#include "platform/sdl2/Storage.h" #include "platform/sdl2/Storage.h"
#include "app/common/Audio/SoundEngine.h" #include "app/common/Audio/SoundEngine.h"
@ -384,7 +384,7 @@ void NetworkController::notificationsCallback(void* pParam,
case XN_SYS_INPUTDEVICESCHANGED: case XN_SYS_INPUTDEVICESCHANGED:
if (app.GetGameStarted() && g_NetworkManager.IsInSession()) { if (app.GetGameStarted() && g_NetworkManager.IsInSession()) {
for (unsigned int i = 0; i < XUSER_MAX_COUNT; ++i) { for (unsigned int i = 0; i < XUSER_MAX_COUNT; ++i) {
if (!InputManager.IsPadConnected(i) && if (!PlatformInput.IsPadConnected(i) &&
Minecraft::GetInstance()->localplayers[i] != nullptr && Minecraft::GetInstance()->localplayers[i] != nullptr &&
!ui.IsPauseMenuDisplayed(i) && !ui.IsPauseMenuDisplayed(i) &&
!ui.IsSceneInStack(i, eUIScene_EndPoem)) { !ui.IsSceneInStack(i, eUIScene_EndPoem)) {

View file

@ -1,7 +1,7 @@
#include "InputConstraint.h" #include "InputConstraint.h"
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Input.h" #include "platform/input/input.h"
bool InputConstraint::isMappingConstrained(int iPad, int mapping) { bool InputConstraint::isMappingConstrained(int iPad, int mapping) {
// If it's a menu button, then we ignore all inputs // If it's a menu button, then we ignore all inputs
@ -10,11 +10,11 @@ bool InputConstraint::isMappingConstrained(int iPad, int mapping) {
} }
// Otherwise see if they map to the same actual button // Otherwise see if they map to the same actual button
unsigned char layoutMapping = InputManager.GetJoypadMapVal(iPad); unsigned char layoutMapping = PlatformInput.GetJoypadMapVal(iPad);
// 4J HEG - Replaced the equivalance test with bitwise AND, important in // 4J HEG - Replaced the equivalance test with bitwise AND, important in
// some mapping configurations (e.g. when comparing two action map values // some mapping configurations (e.g. when comparing two action map values
// and one has extra buttons mapped) // and one has extra buttons mapped)
return (InputManager.GetGameJoypadMaps(layoutMapping, m_inputMapping) & return (PlatformInput.GetGameJoypadMaps(layoutMapping, m_inputMapping) &
InputManager.GetGameJoypadMaps(layoutMapping, mapping)) > 0; PlatformInput.GetGameJoypadMaps(layoutMapping, mapping)) > 0;
} }

View file

@ -3,7 +3,7 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "app/common/GameRules/LevelRules/RuleDefinitions/LevelRuleset.h" #include "app/common/GameRules/LevelRules/RuleDefinitions/LevelRuleset.h"
#include "app/common/Tutorial/Constraints/AreaConstraint.h" #include "app/common/Tutorial/Constraints/AreaConstraint.h"
#include "app/common/Tutorial/Constraints/ChangeStateConstraint.h" #include "app/common/Tutorial/Constraints/ChangeStateConstraint.h"

View file

@ -3,7 +3,7 @@
#include <memory> #include <memory>
#include <vector> #include <vector>
#include "platform/sdl2/Input.h" #include "platform/input/input.h"
#include "app/common/Tutorial/Constraints/InputConstraint.h" #include "app/common/Tutorial/Constraints/InputConstraint.h"
#include "app/common/Tutorial/Tasks/TutorialTask.h" #include "app/common/Tutorial/Tasks/TutorialTask.h"
#include "app/common/Tutorial/Tutorial.h" #include "app/common/Tutorial/Tutorial.h"
@ -54,12 +54,12 @@ bool ChoiceTask::isCompleted() {
return false; return false;
if (!m_bConfirmMappingComplete && if (!m_bConfirmMappingComplete &&
InputManager.GetValue(pMinecraft->player->GetXboxPad(), PlatformInput.GetValue(pMinecraft->player->GetXboxPad(),
m_iConfirmMapping) > 0) { m_iConfirmMapping) > 0) {
m_bConfirmMappingComplete = true; m_bConfirmMappingComplete = true;
} }
if (!m_bCancelMappingComplete && if (!m_bCancelMappingComplete &&
InputManager.GetValue(pMinecraft->player->GetXboxPad(), PlatformInput.GetValue(pMinecraft->player->GetXboxPad(),
m_iCancelMapping) > 0) { m_iCancelMapping) > 0) {
m_bCancelMappingComplete = true; m_bCancelMappingComplete = true;
} }

View file

@ -6,7 +6,7 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
#include "platform/sdl2/Input.h" #include "platform/input/input.h"
#include "minecraft/GameEnums.h" #include "minecraft/GameEnums.h"
#include "app/common/Tutorial/Constraints/InputConstraint.h" #include "app/common/Tutorial/Constraints/InputConstraint.h"
#include "app/common/Tutorial/Tasks/TutorialTask.h" #include "app/common/Tutorial/Tasks/TutorialTask.h"
@ -81,7 +81,7 @@ bool ControllerTask::isCompleted() {
for (auto it = southpawCompletedMappings.begin(); for (auto it = southpawCompletedMappings.begin();
it != southpawCompletedMappings.end(); ++it) { it != southpawCompletedMappings.end(); ++it) {
if (!it->second) { if (!it->second) {
if (InputManager.GetValue(pMinecraft->player->GetXboxPad(), if (PlatformInput.GetValue(pMinecraft->player->GetXboxPad(),
it->first) > 0) { it->first) > 0) {
it->second = true; it->second = true;
m_uiCompletionMask |= 1 << iCurrent; m_uiCompletionMask |= 1 << iCurrent;
@ -95,7 +95,7 @@ bool ControllerTask::isCompleted() {
for (auto it = completedMappings.begin(); it != completedMappings.end(); for (auto it = completedMappings.begin(); it != completedMappings.end();
++it) { ++it) {
if (!it->second) { if (!it->second) {
if (InputManager.GetValue(pMinecraft->player->GetXboxPad(), if (PlatformInput.GetValue(pMinecraft->player->GetXboxPad(),
it->first) > 0) { it->first) > 0) {
it->second = true; it->second = true;
m_uiCompletionMask |= 1 << iCurrent; m_uiCompletionMask |= 1 << iCurrent;

View file

@ -5,7 +5,7 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
#include "platform/sdl2/Input.h" #include "platform/input/input.h"
#include "app/common/Tutorial/Constraints/InputConstraint.h" #include "app/common/Tutorial/Constraints/InputConstraint.h"
#include "app/common/Tutorial/Tasks/TutorialTask.h" #include "app/common/Tutorial/Tasks/TutorialTask.h"
#include "app/common/Tutorial/Tutorial.h" #include "app/common/Tutorial/Tutorial.h"
@ -63,7 +63,7 @@ bool InfoTask::isCompleted() {
++it) { ++it) {
bool current = (*it).second; bool current = (*it).second;
if (!current) { if (!current) {
if (InputManager.GetValue(pMinecraft->player->GetXboxPad(), if (PlatformInput.GetValue(pMinecraft->player->GetXboxPad(),
(*it).first) > 0) { (*it).first) > 0) {
(*it).second = true; (*it).second = true;
bAllComplete = true; bAllComplete = true;

View file

@ -6,7 +6,7 @@
#include <algorithm> #include <algorithm>
#include <compare> #include <compare>
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Profile.h" #include "platform/sdl2/Profile.h"
#include "minecraft/GameEnums.h" #include "minecraft/GameEnums.h"
#include "app/common/App_structs.h" #include "app/common/App_structs.h"

View file

@ -7,8 +7,8 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Input.h" #include "platform/input/input.h"
#include "platform/sdl2/Render.h" #include "platform/sdl2/Render.h"
#include "minecraft/GameEnums.h" #include "minecraft/GameEnums.h"
#include "app/common/Tutorial/Tutorial.h" #include "app/common/Tutorial/Tutorial.h"
@ -263,11 +263,11 @@ void IUIScene_AbstractContainerMenu::onMouseTick() {
bool bStickInput = false; bool bStickInput = false;
float fInputX = float fInputX =
InputManager.GetJoypadStick_LX(iPad, false) * PlatformInput.GetJoypadStick_LX(iPad, false) *
((float)app.GetGameSettings(iPad, eGameSetting_Sensitivity_InMenu) / ((float)app.GetGameSettings(iPad, eGameSetting_Sensitivity_InMenu) /
100.0f); // apply the sensitivity 100.0f); // apply the sensitivity
float fInputY = float fInputY =
InputManager.GetJoypadStick_LY(iPad, false) * PlatformInput.GetJoypadStick_LY(iPad, false) *
((float)app.GetGameSettings(iPad, eGameSetting_Sensitivity_InMenu) / ((float)app.GetGameSettings(iPad, eGameSetting_Sensitivity_InMenu) /
100.0f); // apply the sensitivity 100.0f); // apply the sensitivity

View file

@ -7,7 +7,7 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Profile.h" #include "platform/sdl2/Profile.h"
#include "platform/sdl2/Render.h" #include "platform/sdl2/Render.h"
#include "minecraft/GameEnums.h" #include "minecraft/GameEnums.h"

View file

@ -6,7 +6,7 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "app/common/UI/All Platforms/IUIScene_AbstractContainerMenu.h" #include "app/common/UI/All Platforms/IUIScene_AbstractContainerMenu.h"
#include "app/linux/LinuxGame.h" #include "app/linux/LinuxGame.h"
#include "app/linux/Linux_UIController.h" #include "app/linux/Linux_UIController.h"

View file

@ -4,7 +4,7 @@
#include <algorithm> #include <algorithm>
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "app/common/Tutorial/Tutorial.h" #include "app/common/Tutorial/Tutorial.h"
#include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/All Platforms/UIEnums.h"
#include "app/linux/LinuxGame.h" #include "app/linux/LinuxGame.h"

View file

@ -3,7 +3,7 @@
#include <string> #include <string>
#include "platform/PlatformTypes.h" #include "platform/PlatformTypes.h"
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Render.h" #include "platform/sdl2/Render.h"
#include "minecraft/GameEnums.h" #include "minecraft/GameEnums.h"
#include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/All Platforms/UIEnums.h"

View file

@ -3,8 +3,8 @@
#include <wchar.h> #include <wchar.h>
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Input.h" #include "platform/input/input.h"
#include "platform/sdl2/Profile.h" #include "platform/sdl2/Profile.h"
#include "minecraft/GameEnums.h" #include "minecraft/GameEnums.h"
#include "app/common/GameRules/LevelGeneration/ConsoleSchematicFile.h" #include "app/common/GameRules/LevelGeneration/ConsoleSchematicFile.h"
@ -130,12 +130,12 @@ void UIScene_DebugCreateSchematic::handlePress(F64 controlId, F64 childId) {
case eControl_EndY: case eControl_EndY:
case eControl_EndZ: case eControl_EndZ:
m_keyboardCallbackControl = (eControls)((int)controlId); m_keyboardCallbackControl = (eControls)((int)controlId);
InputManager.RequestKeyboard( PlatformInput.RequestKeyboard(
L"Enter something", L"", 0, 25, L"Enter something", L"", 0, 25,
[this](bool bRes) -> int { [this](bool bRes) -> int {
return handleKeyboardComplete(bRes); return handleKeyboardComplete(bRes);
}, },
C_4JInput::EKeyboardMode_Default); IPlatformInput::EKeyboardMode_Default);
break; break;
}; };
} }
@ -156,7 +156,7 @@ void UIScene_DebugCreateSchematic::handleCheckboxToggled(F64 controlId,
} }
int UIScene_DebugCreateSchematic::handleKeyboardComplete(bool bRes) { int UIScene_DebugCreateSchematic::handleKeyboardComplete(bool bRes) {
const char* text = InputManager.GetText(); const char* text = PlatformInput.GetText();
if (text[0] != '\0') { if (text[0] != '\0') {
std::wstring value = convStringToWstring(text); std::wstring value = convStringToWstring(text);
int iVal = 0; int iVal = 0;

View file

@ -1,6 +1,6 @@
#include "UIScene_DebugOptions.h" #include "UIScene_DebugOptions.h"
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "app/common/Console_Debug_enum.h" #include "app/common/Console_Debug_enum.h"
#include "app/common/UI/Controls/UIControl_CheckBox.h" #include "app/common/UI/Controls/UIControl_CheckBox.h"
#include "app/common/UI/UIScene.h" #include "app/common/UI/UIScene.h"

View file

@ -5,7 +5,7 @@
#include <memory> #include <memory>
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Profile.h" #include "platform/sdl2/Profile.h"
#include "minecraft/GameEnums.h" #include "minecraft/GameEnums.h"
#include "app/common/Tutorial/Tutorial.h" #include "app/common/Tutorial/Tutorial.h"

View file

@ -5,8 +5,8 @@
#include <memory> #include <memory>
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Input.h" #include "platform/input/input.h"
#include "platform/sdl2/Profile.h" #include "platform/sdl2/Profile.h"
#include "minecraft/GameEnums.h" #include "minecraft/GameEnums.h"
#include "app/common/UI/All Platforms/UIStructs.h" #include "app/common/UI/All Platforms/UIStructs.h"
@ -119,12 +119,12 @@ void UIScene_DebugSetCamera::handlePress(F64 controlId, F64 childId) {
case eControl_YRot: case eControl_YRot:
case eControl_Elevation: case eControl_Elevation:
m_keyboardCallbackControl = (eControls)((int)controlId); m_keyboardCallbackControl = (eControls)((int)controlId);
InputManager.RequestKeyboard( PlatformInput.RequestKeyboard(
L"Enter something", L"", 0, 25, L"Enter something", L"", 0, 25,
[this](bool bRes) -> int { [this](bool bRes) -> int {
return handleKeyboardComplete(bRes); return handleKeyboardComplete(bRes);
}, },
C_4JInput::EKeyboardMode_Default); IPlatformInput::EKeyboardMode_Default);
break; break;
}; };
} }
@ -139,7 +139,7 @@ void UIScene_DebugSetCamera::handleCheckboxToggled(F64 controlId,
} }
int UIScene_DebugSetCamera::handleKeyboardComplete(bool bRes) { int UIScene_DebugSetCamera::handleKeyboardComplete(bool bRes) {
const char* text = InputManager.GetText(); const char* text = PlatformInput.GetText();
if (text[0] != '\0') { if (text[0] != '\0') {
std::wstring value = convStringToWstring(text); std::wstring value = convStringToWstring(text);
double val = 0; double val = 0;

View file

@ -7,8 +7,8 @@
#include <utility> #include <utility>
#include "platform/PlatformTypes.h" #include "platform/PlatformTypes.h"
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Input.h" #include "platform/input/input.h"
#include "platform/sdl2/Profile.h" #include "platform/sdl2/Profile.h"
#include "app/common/App_Defines.h" #include "app/common/App_Defines.h"
#include "minecraft/GameEnums.h" #include "minecraft/GameEnums.h"
@ -353,7 +353,7 @@ void UIScene_CreateWorldMenu::handlePress(F64 controlId, F64 childId) {
switch ((int)controlId) { switch ((int)controlId) {
case eControl_EditWorldName: { case eControl_EditWorldName: {
m_bIgnoreInput = true; m_bIgnoreInput = true;
InputManager.RequestKeyboard( PlatformInput.RequestKeyboard(
app.GetString(IDS_CREATE_NEW_WORLD), m_editWorldName.getLabel(), app.GetString(IDS_CREATE_NEW_WORLD), m_editWorldName.getLabel(),
0, 25, 0, 25,
[this](bool bRes) -> int { [this](bool bRes) -> int {
@ -361,7 +361,7 @@ void UIScene_CreateWorldMenu::handlePress(F64 controlId, F64 childId) {
// 4J HEG - No reason to set value if keyboard was cancelled // 4J HEG - No reason to set value if keyboard was cancelled
if (bRes) { if (bRes) {
std::wstring str = std::wstring str =
convStringToWstring(InputManager.GetText()); convStringToWstring(PlatformInput.GetText());
if (!str.empty()) { if (!str.empty()) {
m_editWorldName.setLabel(str); m_editWorldName.setLabel(str);
m_worldName = std::move(str); m_worldName = std::move(str);
@ -370,7 +370,7 @@ void UIScene_CreateWorldMenu::handlePress(F64 controlId, F64 childId) {
} }
return 0; return 0;
}, },
C_4JInput::EKeyboardMode_Default); IPlatformInput::EKeyboardMode_Default);
} break; } break;
case eControl_GameModeToggle: case eControl_GameModeToggle:
switch (m_iGameModeId) { switch (m_iGameModeId) {
@ -623,7 +623,7 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame() {
// the sign-in UI again // the sign-in UI again
int connectedControllers = 0; int connectedControllers = 0;
for (unsigned int i = 0; i < XUSER_MAX_COUNT; ++i) { for (unsigned int i = 0; i < XUSER_MAX_COUNT; ++i) {
if (InputManager.IsPadConnected(i) || ProfileManager.IsSignedIn(i)) if (PlatformInput.IsPadConnected(i) || ProfileManager.IsSignedIn(i))
++connectedControllers; ++connectedControllers;
} }
@ -990,7 +990,7 @@ int UIScene_CreateWorldMenu::ConfirmCreateReturned(
// the sign-in UI again // the sign-in UI again
int connectedControllers = 0; int connectedControllers = 0;
for (unsigned int i = 0; i < XUSER_MAX_COUNT; ++i) { for (unsigned int i = 0; i < XUSER_MAX_COUNT; ++i) {
if (InputManager.IsPadConnected(i) || ProfileManager.IsSignedIn(i)) if (PlatformInput.IsPadConnected(i) || ProfileManager.IsSignedIn(i))
++connectedControllers; ++connectedControllers;
} }

View file

@ -1,7 +1,7 @@
#include "UIScene_DLCMainMenu.h" #include "UIScene_DLCMainMenu.h"
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "minecraft/GameEnums.h" #include "minecraft/GameEnums.h"
#include "app/common/UI/All Platforms/UIStructs.h" #include "app/common/UI/All Platforms/UIStructs.h"
#include "app/common/UI/Controls/UIControl_ButtonList.h" #include "app/common/UI/Controls/UIControl_ButtonList.h"

View file

@ -4,7 +4,7 @@
#include <stdint.h> #include <stdint.h>
#include "platform/PlatformTypes.h" #include "platform/PlatformTypes.h"
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Render.h" #include "platform/sdl2/Render.h"
#include "app/common/UI/All Platforms/UIStructs.h" #include "app/common/UI/All Platforms/UIStructs.h"
#include "app/common/UI/Controls/UIControl_DLCList.h" #include "app/common/UI/Controls/UIControl_DLCList.h"

View file

@ -4,8 +4,8 @@
#include <vector> #include <vector>
#include "platform/PlatformTypes.h" #include "platform/PlatformTypes.h"
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Input.h" #include "platform/input/input.h"
#include "platform/sdl2/Profile.h" #include "platform/sdl2/Profile.h"
#include "app/common/App_Defines.h" #include "app/common/App_Defines.h"
#include "minecraft/GameEnums.h" #include "minecraft/GameEnums.h"
@ -46,7 +46,7 @@ UIScene_EULA::UIScene_EULA(int iPad, void* initData, UILayer* parentLayer)
// 4J-PB - If we have a signed in user connected, let's get the DLC now // 4J-PB - If we have a signed in user connected, let's get the DLC now
for (unsigned int i = 0; i < XUSER_MAX_COUNT; ++i) { for (unsigned int i = 0; i < XUSER_MAX_COUNT; ++i) {
if ((InputManager.IsPadConnected(i) || ProfileManager.IsSignedIn(i))) { if ((PlatformInput.IsPadConnected(i) || ProfileManager.IsSignedIn(i))) {
if (!app.DLCInstallProcessCompleted() && !app.DLCInstallPending()) { if (!app.DLCInstallProcessCompleted() && !app.DLCInstallPending()) {
app.StartInstallDLCProcess(i); app.StartInstallDLCProcess(i);
break; break;

View file

@ -1,6 +1,6 @@
#include "UIScene_Intro.h" #include "UIScene_Intro.h"
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/All Platforms/UIEnums.h"
#include "app/common/UI/UIScene.h" #include "app/common/UI/UIScene.h"
#include "app/linux/Iggy/include/iggy.h" #include "app/linux/Iggy/include/iggy.h"

View file

@ -5,7 +5,7 @@
#include <stdint.h> #include <stdint.h>
#include "platform/PlatformTypes.h" #include "platform/PlatformTypes.h"
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Profile.h" #include "platform/sdl2/Profile.h"
#include "app/common/App_Defines.h" #include "app/common/App_Defines.h"
#include "minecraft/GameEnums.h" #include "minecraft/GameEnums.h"

View file

@ -4,8 +4,8 @@
#include <utility> #include <utility>
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Input.h" #include "platform/input/input.h"
#include "platform/sdl2/Profile.h" #include "platform/sdl2/Profile.h"
#include "platform/sdl2/Render.h" #include "platform/sdl2/Render.h"
#include "app/common/App_Defines.h" #include "app/common/App_Defines.h"
@ -547,21 +547,21 @@ void UIScene_LaunchMoreOptionsMenu::handlePress(F64 controlId, F64 childId) {
switch ((int)controlId) { switch ((int)controlId) {
case eControl_EditSeed: { case eControl_EditSeed: {
m_bIgnoreInput = true; m_bIgnoreInput = true;
InputManager.RequestKeyboard( PlatformInput.RequestKeyboard(
app.GetString(IDS_CREATE_NEW_WORLD_SEED), m_editSeed.getLabel(), app.GetString(IDS_CREATE_NEW_WORLD_SEED), m_editSeed.getLabel(),
0, 60, 0, 60,
[this](bool bRes) -> int { [this](bool bRes) -> int {
// 4J HEG - No reason to set value if keyboard was cancelled // 4J HEG - No reason to set value if keyboard was cancelled
if (bRes) { if (bRes) {
std::wstring str = std::wstring str =
convStringToWstring(InputManager.GetText()); convStringToWstring(PlatformInput.GetText());
m_editSeed.setLabel(str); m_editSeed.setLabel(str);
m_params->seed = std::move(str); m_params->seed = std::move(str);
} }
m_bIgnoreInput = false; m_bIgnoreInput = false;
return 0; return 0;
}, },
C_4JInput::EKeyboardMode_Default); IPlatformInput::EKeyboardMode_Default);
} break; } break;
} }
} }

View file

@ -8,7 +8,7 @@
#include <memory> #include <memory>
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Profile.h" #include "platform/sdl2/Profile.h"
#include "app/common/Console_Debug_enum.h" #include "app/common/Console_Debug_enum.h"
#include "app/common/Leaderboards/LeaderboardInterface.h" #include "app/common/Leaderboards/LeaderboardInterface.h"

View file

@ -5,7 +5,7 @@
#include <wchar.h> #include <wchar.h>
#include "platform/PlatformTypes.h" #include "platform/PlatformTypes.h"
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Profile.h" #include "platform/sdl2/Profile.h"
#include "platform/sdl2/Render.h" #include "platform/sdl2/Render.h"
#include "app/common/App_Defines.h" #include "app/common/App_Defines.h"

View file

@ -6,8 +6,8 @@
#include <compare> #include <compare>
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Input.h" #include "platform/input/input.h"
#include "platform/sdl2/Profile.h" #include "platform/sdl2/Profile.h"
#include "app/common/App_Defines.h" #include "app/common/App_Defines.h"
#include "minecraft/GameEnums.h" #include "minecraft/GameEnums.h"
@ -823,7 +823,7 @@ int UIScene_LoadOrJoinMenu::handleKeyboardCompleteWorldName(bool bRes) {
// 4J HEG - No reason to set value if keyboard was cancelled // 4J HEG - No reason to set value if keyboard was cancelled
m_bIgnoreInput = false; m_bIgnoreInput = false;
if (bRes) { if (bRes) {
const char* text = InputManager.GetText(); const char* text = PlatformInput.GetText();
// check the name is valid // check the name is valid
if (text[0] != '\0') { if (text[0] != '\0') {
} else { } else {
@ -1492,12 +1492,12 @@ int UIScene_LoadOrJoinMenu::SaveOptionsDialogReturned(
.UTF8SaveName, .UTF8SaveName,
strlen(pClass->m_saveDetails->UTF8SaveName) + 1); // plus null strlen(pClass->m_saveDetails->UTF8SaveName) + 1); // plus null
wchar_t* ptr = wSaveName; wchar_t* ptr = wSaveName;
InputManager.RequestKeyboard( PlatformInput.RequestKeyboard(
app.GetString(IDS_RENAME_WORLD_TITLE), wSaveName, 0, 25, app.GetString(IDS_RENAME_WORLD_TITLE), wSaveName, 0, 25,
[pClass](bool bRes) -> int { [pClass](bool bRes) -> int {
return pClass->handleKeyboardCompleteWorldName(bRes); return pClass->handleKeyboardCompleteWorldName(bRes);
}, },
C_4JInput::EKeyboardMode_Default); IPlatformInput::EKeyboardMode_Default);
} break; } break;
case C4JStorage::EMessage_ResultThirdOption: // delete - case C4JStorage::EMessage_ResultThirdOption: // delete -

View file

@ -7,7 +7,7 @@
#include <numbers> #include <numbers>
#include "platform/PlatformTypes.h" #include "platform/PlatformTypes.h"
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Profile.h" #include "platform/sdl2/Profile.h"
#include "platform/sdl2/Render.h" #include "platform/sdl2/Render.h"
#include "app/common/App_Defines.h" #include "app/common/App_Defines.h"

View file

@ -3,7 +3,7 @@
#include <vector> #include <vector>
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "app/common/App_Defines.h" #include "app/common/App_Defines.h"
#include "minecraft/GameEnums.h" #include "minecraft/GameEnums.h"
#include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_Button.h"

View file

@ -2,8 +2,8 @@
#include "UIScene_SaveMessage.h" #include "UIScene_SaveMessage.h"
#include "platform/PlatformTypes.h" #include "platform/PlatformTypes.h"
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Input.h" #include "platform/input/input.h"
#include "platform/sdl2/Profile.h" #include "platform/sdl2/Profile.h"
#include "app/common/App_Defines.h" #include "app/common/App_Defines.h"
#include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_Button.h"
@ -39,7 +39,7 @@ UIScene_SaveMessage::UIScene_SaveMessage(int iPad, void* initData,
// 4J-PB - If we have a signed in user connected, let's get the DLC now // 4J-PB - If we have a signed in user connected, let's get the DLC now
for (unsigned int i = 0; i < XUSER_MAX_COUNT; ++i) { for (unsigned int i = 0; i < XUSER_MAX_COUNT; ++i) {
if ((InputManager.IsPadConnected(i) || ProfileManager.IsSignedIn(i))) { if ((PlatformInput.IsPadConnected(i) || ProfileManager.IsSignedIn(i))) {
if (!app.DLCInstallProcessCompleted() && !app.DLCInstallPending()) { if (!app.DLCInstallProcessCompleted() && !app.DLCInstallPending()) {
app.StartInstallDLCProcess(i); app.StartInstallDLCProcess(i);
break; break;

View file

@ -1,7 +1,7 @@
#include "UIScene_TrialExitUpsell.h" #include "UIScene_TrialExitUpsell.h"
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Profile.h" #include "platform/sdl2/Profile.h"
#include "app/common/App_Defines.h" #include "app/common/App_Defines.h"
#include "app/common/UI/UIScene.h" #include "app/common/UI/UIScene.h"

View file

@ -4,8 +4,8 @@
#include <memory> #include <memory>
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Input.h" #include "platform/input/input.h"
#include "minecraft/GameEnums.h" #include "minecraft/GameEnums.h"
#include "app/common/BuildVer/BuildVer.h" #include "app/common/BuildVer/BuildVer.h"
#include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_Button.h"
@ -251,7 +251,7 @@ void UIScene_ControlsMenu::PositionAllText(int iPad) {
void UIScene_ControlsMenu::PositionText(int iPad, int iTextID, void UIScene_ControlsMenu::PositionText(int iPad, int iTextID,
unsigned char ucAction) { unsigned char ucAction) {
unsigned int uiVal = InputManager.GetGameJoypadMaps( unsigned int uiVal = PlatformInput.GetGameJoypadMaps(
m_iCurrentNavigatedControlsLayout, ucAction); m_iCurrentNavigatedControlsLayout, ucAction);
if (uiVal & _360_JOY_BUTTON_A) if (uiVal & _360_JOY_BUTTON_A)

View file

@ -4,7 +4,7 @@
#include <string.h> #include <string.h>
#include <wchar.h> #include <wchar.h>
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "app/common/UI/UILayer.h" #include "app/common/UI/UILayer.h"
#include "app/common/UI/UIScene.h" #include "app/common/UI/UIScene.h"
#include "app/linux/LinuxGame.h" #include "app/linux/LinuxGame.h"

View file

@ -1,7 +1,7 @@
#include "UIScene_HelpAndOptionsMenu.h" #include "UIScene_HelpAndOptionsMenu.h"
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Profile.h" #include "platform/sdl2/Profile.h"
#include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_Button.h"
#include "app/common/UI/UILayer.h" #include "app/common/UI/UILayer.h"

View file

@ -6,7 +6,7 @@
#include <vector> #include <vector>
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "minecraft/GameEnums.h" #include "minecraft/GameEnums.h"
#include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_Label.h"
#include "app/common/UI/UIScene.h" #include "app/common/UI/UIScene.h"

View file

@ -3,7 +3,7 @@
#include <stdint.h> #include <stdint.h>
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "app/common/UI/Controls/UIControl_ButtonList.h" #include "app/common/UI/Controls/UIControl_ButtonList.h"
#include "app/common/UI/UILayer.h" #include "app/common/UI/UILayer.h"
#include "app/common/UI/UIScene.h" #include "app/common/UI/UIScene.h"

View file

@ -1,6 +1,6 @@
#include "UIScene_LanguageSelector.h" #include "UIScene_LanguageSelector.h"
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "app/common/UI/Controls/UIControl_ButtonList.h" #include "app/common/UI/Controls/UIControl_ButtonList.h"
#include "app/common/UI/UILayer.h" #include "app/common/UI/UILayer.h"
#include "app/common/UI/UIScene.h" #include "app/common/UI/UIScene.h"

View file

@ -1,7 +1,7 @@
#include "UIScene_ReinstallMenu.h" #include "UIScene_ReinstallMenu.h"
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "app/common/UI/UILayer.h" #include "app/common/UI/UILayer.h"
#include "app/common/UI/UIScene.h" #include "app/common/UI/UIScene.h"
#include "app/linux/LinuxGame.h" #include "app/linux/LinuxGame.h"

View file

@ -3,7 +3,7 @@
#include <wchar.h> #include <wchar.h>
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "minecraft/GameEnums.h" #include "minecraft/GameEnums.h"
#include "app/common/UI/Controls/UIControl_Slider.h" #include "app/common/UI/Controls/UIControl_Slider.h"
#include "app/common/UI/UILayer.h" #include "app/common/UI/UILayer.h"

View file

@ -2,7 +2,7 @@
#include <wchar.h> #include <wchar.h>
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "minecraft/GameEnums.h" #include "minecraft/GameEnums.h"
#include "app/common/UI/Controls/UIControl_Slider.h" #include "app/common/UI/Controls/UIControl_Slider.h"
#include "app/common/UI/UILayer.h" #include "app/common/UI/UILayer.h"

View file

@ -2,7 +2,7 @@
#include <wchar.h> #include <wchar.h>
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Profile.h" #include "platform/sdl2/Profile.h"
#include "minecraft/GameEnums.h" #include "minecraft/GameEnums.h"
#include "app/common/Network/GameNetworkManager.h" #include "app/common/Network/GameNetworkManager.h"

View file

@ -1,7 +1,7 @@
#include "UIScene_SettingsMenu.h" #include "UIScene_SettingsMenu.h"
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Profile.h" #include "platform/sdl2/Profile.h"
#include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_Button.h"
#include "app/common/UI/UILayer.h" #include "app/common/UI/UILayer.h"

View file

@ -3,7 +3,7 @@
#include <wchar.h> #include <wchar.h>
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Profile.h" #include "platform/sdl2/Profile.h"
#include "platform/sdl2/Render.h" #include "platform/sdl2/Render.h"
#include "minecraft/GameEnums.h" #include "minecraft/GameEnums.h"

View file

@ -3,7 +3,7 @@
#include <wchar.h> #include <wchar.h>
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Profile.h" #include "platform/sdl2/Profile.h"
#include "minecraft/GameEnums.h" #include "minecraft/GameEnums.h"
#include "app/common/UI/Controls/UIControl_CheckBox.h" #include "app/common/UI/Controls/UIControl_CheckBox.h"

View file

@ -5,7 +5,7 @@
#include <vector> #include <vector>
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Profile.h" #include "platform/sdl2/Profile.h"
#include "platform/sdl2/Render.h" #include "platform/sdl2/Render.h"
#include "app/common/App_Defines.h" #include "app/common/App_Defines.h"

View file

@ -4,7 +4,7 @@
#include <cmath> #include <cmath>
#include <memory> #include <memory>
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "app/common/Tutorial/Tutorial.h" #include "app/common/Tutorial/Tutorial.h"
#include "app/common/Tutorial/TutorialMode.h" #include "app/common/Tutorial/TutorialMode.h"
#include "app/common/UI/All Platforms/UIStructs.h" #include "app/common/UI/All Platforms/UIStructs.h"

View file

@ -7,7 +7,7 @@
#include <memory> #include <memory>
#include <utility> #include <utility>
#include "platform/sdl2/Input.h" #include "platform/input/input.h"
#include "platform/sdl2/Profile.h" #include "platform/sdl2/Profile.h"
#include "app/common/Tutorial/Tutorial.h" #include "app/common/Tutorial/Tutorial.h"
#include "app/common/Tutorial/TutorialEnum.h" #include "app/common/Tutorial/TutorialEnum.h"
@ -316,20 +316,20 @@ UIControl* UIScene_AnvilMenu::getSection(ESceneSection eSection) {
void UIScene_AnvilMenu::handleEditNamePressed() { void UIScene_AnvilMenu::handleEditNamePressed() {
setIgnoreInput(true); setIgnoreInput(true);
InputManager.RequestKeyboard( PlatformInput.RequestKeyboard(
app.GetString(IDS_TITLE_RENAME), m_textInputAnvil.getLabel(), m_iPad, 30, app.GetString(IDS_TITLE_RENAME), m_textInputAnvil.getLabel(), m_iPad, 30,
[this](bool bRes) -> int { [this](bool bRes) -> int {
// 4J HEG - No reason to set value if keyboard was cancelled // 4J HEG - No reason to set value if keyboard was cancelled
setIgnoreInput(false); setIgnoreInput(false);
if (bRes) { if (bRes) {
std::wstring str = convStringToWstring(InputManager.GetText()); std::wstring str = convStringToWstring(PlatformInput.GetText());
setEditNameValue(str); setEditNameValue(str);
m_itemName = std::move(str); m_itemName = std::move(str);
updateItemName(); updateItemName();
} }
return 0; return 0;
}, },
C_4JInput::EKeyboardMode_Default); IPlatformInput::EKeyboardMode_Default);
} }
void UIScene_AnvilMenu::setEditNameValue(const std::wstring& name) { void UIScene_AnvilMenu::setEditNameValue(const std::wstring& name) {

View file

@ -2,7 +2,7 @@
#include <string> #include <string>
#include "platform/sdl2/Input.h" #include "platform/input/input.h"
#include "app/common/Tutorial/TutorialMode.h" #include "app/common/Tutorial/TutorialMode.h"
#include "app/common/UI/All Platforms/IUIScene_AnvilMenu.h" #include "app/common/UI/All Platforms/IUIScene_AnvilMenu.h"
#include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/All Platforms/UIEnums.h"

View file

@ -5,7 +5,7 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Profile.h" #include "platform/sdl2/Profile.h"
#include "app/common/Tutorial/Tutorial.h" #include "app/common/Tutorial/Tutorial.h"
#include "app/common/Tutorial/TutorialEnum.h" #include "app/common/Tutorial/TutorialEnum.h"

View file

@ -1,7 +1,7 @@
#include "UIScene_CraftingMenu.h" #include "UIScene_CraftingMenu.h"
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Profile.h" #include "platform/sdl2/Profile.h"
#include "app/common/Tutorial/Tutorial.h" #include "app/common/Tutorial/Tutorial.h"
#include "app/common/Tutorial/TutorialEnum.h" #include "app/common/Tutorial/TutorialEnum.h"

View file

@ -3,7 +3,7 @@
#include <memory> #include <memory>
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Profile.h" #include "platform/sdl2/Profile.h"
#include "platform/sdl2/Storage.h" #include "platform/sdl2/Storage.h"
#include "minecraft/GameEnums.h" #include "minecraft/GameEnums.h"

View file

@ -7,7 +7,7 @@
#include <memory> #include <memory>
#include "platform/PlatformTypes.h" #include "platform/PlatformTypes.h"
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Profile.h" #include "platform/sdl2/Profile.h"
#include "minecraft/GameEnums.h" #include "minecraft/GameEnums.h"
#include "app/common/Tutorial/Tutorial.h" #include "app/common/Tutorial/Tutorial.h"

View file

@ -3,7 +3,7 @@
#include <memory> #include <memory>
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "minecraft/GameEnums.h" #include "minecraft/GameEnums.h"
#include "app/common/Network/GameNetworkManager.h" #include "app/common/Network/GameNetworkManager.h"
#include "app/common/Network/NetworkPlayerInterface.h" #include "app/common/Network/NetworkPlayerInterface.h"

View file

@ -3,7 +3,7 @@
#include <memory> #include <memory>
#include "platform/PlatformTypes.h" #include "platform/PlatformTypes.h"
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Profile.h" #include "platform/sdl2/Profile.h"
#include "minecraft/GameEnums.h" #include "minecraft/GameEnums.h"
#include "app/common/Console_Debug_enum.h" #include "app/common/Console_Debug_enum.h"

View file

@ -3,7 +3,7 @@
#include <memory> #include <memory>
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "minecraft/GameEnums.h" #include "minecraft/GameEnums.h"
#include "app/common/Network/GameNetworkManager.h" #include "app/common/Network/GameNetworkManager.h"
#include "app/common/Network/NetworkPlayerInterface.h" #include "app/common/Network/NetworkPlayerInterface.h"

View file

@ -5,7 +5,7 @@
#include <memory> #include <memory>
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Profile.h" #include "platform/sdl2/Profile.h"
#include "minecraft/GameEnums.h" #include "minecraft/GameEnums.h"
#include "app/common/DLC/DLCManager.h" #include "app/common/DLC/DLCManager.h"

View file

@ -1,8 +1,8 @@
#include "UIScene_SignEntryMenu.h" #include "UIScene_SignEntryMenu.h"
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Input.h" #include "platform/input/input.h"
#include "app/common/UI/All Platforms/UIStructs.h" #include "app/common/UI/All Platforms/UIStructs.h"
#include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_Button.h"
#include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_Label.h"
@ -50,10 +50,10 @@ UIScene_SignEntryMenu::UIScene_SignEntryMenu(int iPad, void* _initData,
case XC_LANGUAGE_KOREAN: case XC_LANGUAGE_KOREAN:
case XC_LANGUAGE_RUSSIAN: case XC_LANGUAGE_RUSSIAN:
m_signRows[i].SetKeyboardType( m_signRows[i].SetKeyboardType(
C_4JInput::EKeyboardMode_Alphabet); IPlatformInput::EKeyboardMode_Alphabet);
break; break;
default: default:
m_signRows[i].SetKeyboardType(C_4JInput::EKeyboardMode_Full); m_signRows[i].SetKeyboardType(IPlatformInput::EKeyboardMode_Full);
break; break;
} }
@ -158,7 +158,7 @@ void UIScene_SignEntryMenu::handlePress(F64 controlId, F64 childId) {
case eControl_Line4: { case eControl_Line4: {
m_iEditingLine = (int)controlId; m_iEditingLine = (int)controlId;
m_bIgnoreInput = true; m_bIgnoreInput = true;
InputManager.RequestKeyboard( PlatformInput.RequestKeyboard(
app.GetString(IDS_SIGN_TITLE), app.GetString(IDS_SIGN_TITLE),
m_textInputLines[m_iEditingLine].getLabel(), m_iPad, 15, m_textInputLines[m_iEditingLine].getLabel(), m_iPad, 15,
[this](bool bRes) -> int { [this](bool bRes) -> int {
@ -166,13 +166,13 @@ void UIScene_SignEntryMenu::handlePress(F64 controlId, F64 childId) {
m_bIgnoreInput = false; m_bIgnoreInput = false;
if (bRes && m_iEditingLine >= 0 && m_iEditingLine < 4) { if (bRes && m_iEditingLine >= 0 && m_iEditingLine < 4) {
std::wstring str = std::wstring str =
convStringToWstring(InputManager.GetText()); convStringToWstring(PlatformInput.GetText());
if (str.size() > 15) str.resize(15); if (str.size() > 15) str.resize(15);
m_textInputLines[m_iEditingLine].setLabel(str); m_textInputLines[m_iEditingLine].setLabel(str);
} }
return 0; return 0;
}, },
C_4JInput::EKeyboardMode_Alphabet); IPlatformInput::EKeyboardMode_Alphabet);
} break; } break;
} }
} }

View file

@ -3,7 +3,7 @@
#include <memory> #include <memory>
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "app/common/Console_Debug_enum.h" #include "app/common/Console_Debug_enum.h"
#include "app/common/Network/GameNetworkManager.h" #include "app/common/Network/GameNetworkManager.h"
#include "app/common/Network/NetworkPlayerInterface.h" #include "app/common/Network/NetworkPlayerInterface.h"

View file

@ -1,7 +1,7 @@
#include "UIScene_ConnectingProgress.h" #include "UIScene_ConnectingProgress.h"
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Profile.h" #include "platform/sdl2/Profile.h"
#include "minecraft/GameEnums.h" #include "minecraft/GameEnums.h"
#include "app/common/Network/GameNetworkManager.h" #include "app/common/Network/GameNetworkManager.h"

View file

@ -5,7 +5,7 @@
#include <wchar.h> #include <wchar.h>
#include "platform/PlatformTypes.h" #include "platform/PlatformTypes.h"
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Profile.h" #include "platform/sdl2/Profile.h"
#include "minecraft/GameEnums.h" #include "minecraft/GameEnums.h"
#include "app/common/Network/GameNetworkManager.h" #include "app/common/Network/GameNetworkManager.h"

View file

@ -1,6 +1,6 @@
#include "UIScene_Keyboard.h" #include "UIScene_Keyboard.h"
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "app/common/App_Defines.h" #include "app/common/App_Defines.h"
#include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_Button.h"
#include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_Label.h"

View file

@ -2,7 +2,7 @@
#include "UIScene_MessageBox.h" #include "UIScene_MessageBox.h"
#include "platform/PlatformTypes.h" #include "platform/PlatformTypes.h"
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Profile.h" #include "platform/sdl2/Profile.h"
#include "app/common/UI/All Platforms/UIStructs.h" #include "app/common/UI/All Platforms/UIStructs.h"
#include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_Button.h"

View file

@ -4,8 +4,8 @@
#include <wchar.h> #include <wchar.h>
#include "platform/PlatformTypes.h" #include "platform/PlatformTypes.h"
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Input.h" #include "platform/input/input.h"
#include "platform/sdl2/Profile.h" #include "platform/sdl2/Profile.h"
#include "app/common/UI/Controls/UIControl_BitmapIcon.h" #include "app/common/UI/Controls/UIControl_BitmapIcon.h"
#include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_Label.h"
@ -137,7 +137,7 @@ int UIScene_QuadrantSignin::SignInReturned(void* pParam, bool bContinue,
void UIScene_QuadrantSignin::updateState() { void UIScene_QuadrantSignin::updateState() {
for (unsigned int i = 0; i < XUSER_MAX_COUNT; ++i) { for (unsigned int i = 0; i < XUSER_MAX_COUNT; ++i) {
if (ProfileManager.IsSignedIn(i) && InputManager.IsPadConnected(i)) { if (ProfileManager.IsSignedIn(i) && PlatformInput.IsPadConnected(i)) {
// app.DebugPrintf("Index %d is signed in, display name - '%s'\n", // app.DebugPrintf("Index %d is signed in, display name - '%s'\n",
// i, ProfileManager.GetDisplayName(i).data()); // i, ProfileManager.GetDisplayName(i).data());
@ -159,7 +159,7 @@ void UIScene_QuadrantSignin::updateState() {
m_lastRequestedAvatar = i; m_lastRequestedAvatar = i;
} }
} }
} else if (InputManager.IsPadConnected(i)) { } else if (PlatformInput.IsPadConnected(i)) {
// app.DebugPrintf("Index %d is not signed in\n", i); // app.DebugPrintf("Index %d is not signed in\n", i);
setControllerState(i, eControllerStatus_PressToJoin); setControllerState(i, eControllerStatus_PressToJoin);
@ -234,7 +234,7 @@ void UIScene_QuadrantSignin::_initQuadrants() {
} }
m_labelDisplayName[i].init(ProfileManager.GetDisplayName(i)); m_labelDisplayName[i].init(ProfileManager.GetDisplayName(i));
} else if (InputManager.IsPadConnected(i)) { } else if (PlatformInput.IsPadConnected(i)) {
app.DebugPrintf("Index %d is not signed in\n", i); app.DebugPrintf("Index %d is not signed in\n", i);
setControllerState(i, eControllerStatus_PressToJoin); setControllerState(i, eControllerStatus_PressToJoin);

View file

@ -10,7 +10,7 @@
#include <memory> #include <memory>
#include <utility> #include <utility>
#include "platform/sdl2/Input.h" #include "platform/input/input.h"
#include "platform/sdl2/Profile.h" #include "platform/sdl2/Profile.h"
#include "minecraft/GameEnums.h" #include "minecraft/GameEnums.h"
#include "app/common/Audio/SoundEngine.h" #include "app/common/Audio/SoundEngine.h"
@ -737,7 +737,7 @@ void UIController::tickInput() {
if (!m_bSystemUIShowing) { if (!m_bSystemUIShowing) {
#if defined(ENABLE_IGGY_PERFMON) #if defined(ENABLE_IGGY_PERFMON)
if (m_iggyPerfmonEnabled) { if (m_iggyPerfmonEnabled) {
if (InputManager.ButtonPressed(ProfileManager.GetPrimaryPad(), if (PlatformInput.ButtonPressed(ProfileManager.GetPrimaryPad(),
ACTION_MENU_STICK_PRESS)) ACTION_MENU_STICK_PRESS))
m_iggyPerfmonEnabled = !m_iggyPerfmonEnabled; m_iggyPerfmonEnabled = !m_iggyPerfmonEnabled;
} else } else
@ -765,9 +765,9 @@ void UIController::handleKeyPress(unsigned int iPad, unsigned int key) {
bool released = false; // Toggle bool released = false; // Toggle
bool repeat = false; bool repeat = false;
down = InputManager.ButtonDown(iPad, key); down = PlatformInput.ButtonDown(iPad, key);
pressed = InputManager.ButtonPressed(iPad, key); // Toggle pressed = PlatformInput.ButtonPressed(iPad, key); // Toggle
released = InputManager.ButtonReleased(iPad, key); // Toggle released = PlatformInput.ButtonReleased(iPad, key); // Toggle
if (pressed) app.DebugPrintf("Pressed %d\n", key); if (pressed) app.DebugPrintf("Pressed %d\n", key);
if (released) app.DebugPrintf("Released %d\n", key); if (released) app.DebugPrintf("Released %d\n", key);
@ -847,29 +847,29 @@ void UIController::renderScenes() {
IggyPerfmonPad pm_pad; IggyPerfmonPad pm_pad;
pm_pad.bits = 0; pm_pad.bits = 0;
pm_pad.field.dpad_up = InputManager.ButtonPressed( pm_pad.field.dpad_up = PlatformInput.ButtonPressed(
ProfileManager.GetPrimaryPad(), ACTION_MENU_UP); ProfileManager.GetPrimaryPad(), ACTION_MENU_UP);
pm_pad.field.dpad_down = InputManager.ButtonPressed( pm_pad.field.dpad_down = PlatformInput.ButtonPressed(
ProfileManager.GetPrimaryPad(), ACTION_MENU_DOWN); ProfileManager.GetPrimaryPad(), ACTION_MENU_DOWN);
pm_pad.field.dpad_left = InputManager.ButtonPressed( pm_pad.field.dpad_left = PlatformInput.ButtonPressed(
ProfileManager.GetPrimaryPad(), ACTION_MENU_LEFT); ProfileManager.GetPrimaryPad(), ACTION_MENU_LEFT);
pm_pad.field.dpad_right = InputManager.ButtonPressed( pm_pad.field.dpad_right = PlatformInput.ButtonPressed(
ProfileManager.GetPrimaryPad(), ACTION_MENU_RIGHT); ProfileManager.GetPrimaryPad(), ACTION_MENU_RIGHT);
pm_pad.field.button_up = InputManager.ButtonPressed( pm_pad.field.button_up = PlatformInput.ButtonPressed(
ProfileManager.GetPrimaryPad(), ACTION_MENU_Y); ProfileManager.GetPrimaryPad(), ACTION_MENU_Y);
pm_pad.field.button_down = InputManager.ButtonPressed( pm_pad.field.button_down = PlatformInput.ButtonPressed(
ProfileManager.GetPrimaryPad(), ACTION_MENU_A); ProfileManager.GetPrimaryPad(), ACTION_MENU_A);
pm_pad.field.button_left = InputManager.ButtonPressed( pm_pad.field.button_left = PlatformInput.ButtonPressed(
ProfileManager.GetPrimaryPad(), ACTION_MENU_X); ProfileManager.GetPrimaryPad(), ACTION_MENU_X);
pm_pad.field.button_right = InputManager.ButtonPressed( pm_pad.field.button_right = PlatformInput.ButtonPressed(
ProfileManager.GetPrimaryPad(), ACTION_MENU_B); ProfileManager.GetPrimaryPad(), ACTION_MENU_B);
pm_pad.field.shoulder_left_hi = InputManager.ButtonPressed( pm_pad.field.shoulder_left_hi = PlatformInput.ButtonPressed(
ProfileManager.GetPrimaryPad(), ACTION_MENU_LEFT_SCROLL); ProfileManager.GetPrimaryPad(), ACTION_MENU_LEFT_SCROLL);
pm_pad.field.shoulder_right_hi = InputManager.ButtonPressed( pm_pad.field.shoulder_right_hi = PlatformInput.ButtonPressed(
ProfileManager.GetPrimaryPad(), ACTION_MENU_RIGHT_SCROLL); ProfileManager.GetPrimaryPad(), ACTION_MENU_RIGHT_SCROLL);
pm_pad.field.trigger_left_low = InputManager.ButtonPressed( pm_pad.field.trigger_left_low = PlatformInput.ButtonPressed(
ProfileManager.GetPrimaryPad(), ACTION_MENU_PAGEUP); ProfileManager.GetPrimaryPad(), ACTION_MENU_PAGEUP);
pm_pad.field.trigger_right_low = InputManager.ButtonPressed( pm_pad.field.trigger_right_low = PlatformInput.ButtonPressed(
ProfileManager.GetPrimaryPad(), ACTION_MENU_PAGEDOWN); ProfileManager.GetPrimaryPad(), ACTION_MENU_PAGEDOWN);
// IggyPerfmonPadFromXInputStatePointer(pm_pad, &xi_pad); // IggyPerfmonPadFromXInputStatePointer(pm_pad, &xi_pad);
@ -1582,7 +1582,7 @@ void UIController::SetMenuDisplayed(int iPad, bool bVal) {
if (bVal) { if (bVal) {
if (iPad == XUSER_INDEX_ANY) { if (iPad == XUSER_INDEX_ANY) {
for (int i = 0; i < XUSER_MAX_COUNT; i++) { for (int i = 0; i < XUSER_MAX_COUNT; i++) {
InputManager.SetMenuDisplayed(i, true); PlatformInput.SetMenuDisplayed(i, true);
m_bMenuDisplayed[i] = true; m_bMenuDisplayed[i] = true;
// 4J Stu - Fix for #11018 - Functional: When the controller is // 4J Stu - Fix for #11018 - Functional: When the controller is
// unplugged during active gameplay and plugged back in at the // unplugged during active gameplay and plugged back in at the
@ -1590,7 +1590,7 @@ void UIController::SetMenuDisplayed(int iPad, bool bVal) {
m_bMenuToBeClosed[i] = false; m_bMenuToBeClosed[i] = false;
} }
} else { } else {
InputManager.SetMenuDisplayed(iPad, true); PlatformInput.SetMenuDisplayed(iPad, true);
m_bMenuDisplayed[iPad] = true; m_bMenuDisplayed[iPad] = true;
// 4J Stu - Fix for #11018 - Functional: When the controller is // 4J Stu - Fix for #11018 - Functional: When the controller is
// unplugged during active gameplay and plugged back in at the // unplugged during active gameplay and plugged back in at the
@ -1618,7 +1618,7 @@ void UIController::CheckMenuDisplayed() {
} else { } else {
m_bMenuToBeClosed[iPad] = false; m_bMenuToBeClosed[iPad] = false;
m_bMenuDisplayed[iPad] = false; m_bMenuDisplayed[iPad] = false;
InputManager.SetMenuDisplayed(iPad, false); PlatformInput.SetMenuDisplayed(iPad, false);
} }
} }
} }

View file

@ -21,7 +21,7 @@
#endif #endif
#include "platform/PlatformTypes.h" #include "platform/PlatformTypes.h"
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Render.h" #include "platform/sdl2/Render.h"
#include "platform/sdl2/Storage.h" #include "platform/sdl2/Storage.h"
#include "app/common/UI/All Platforms/IUIController.h" #include "app/common/UI/All Platforms/IUIController.h"

View file

@ -5,7 +5,7 @@
#include <utility> #include <utility>
#include "platform/PlatformTypes.h" #include "platform/PlatformTypes.h"
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Render.h" #include "platform/sdl2/Render.h"
#include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/All Platforms/UIEnums.h"
#include "app/common/UI/All Platforms/UIStructs.h" #include "app/common/UI/All Platforms/UIStructs.h"

View file

@ -54,8 +54,8 @@ static void sigsegv_handler(int sig) {
// #include "../Common/XUI/XUI_Scene_Container.h" // #include "../Common/XUI/XUI_Scene_Container.h"
// #include "NetworkManager.h" // #include "NetworkManager.h"
#include "platform/PlatformTypes.h" #include "platform/PlatformTypes.h"
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Input.h" #include "platform/input/input.h"
#include "platform/sdl2/Profile.h" #include "platform/sdl2/Profile.h"
#include "platform/sdl2/Render.h" #include "platform/sdl2/Render.h"
#include "platform/sdl2/Storage.h" #include "platform/sdl2/Storage.h"
@ -112,302 +112,302 @@ void DefineActions(void) {
// Split into Menu actions, and in-game actions // Split into Menu actions, and in-game actions
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_A, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_A,
_360_JOY_BUTTON_A); _360_JOY_BUTTON_A);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_B, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_B,
_360_JOY_BUTTON_B); _360_JOY_BUTTON_B);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_X, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_X,
_360_JOY_BUTTON_X); _360_JOY_BUTTON_X);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_Y, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_Y,
_360_JOY_BUTTON_Y); _360_JOY_BUTTON_Y);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_OK, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_OK,
_360_JOY_BUTTON_A); _360_JOY_BUTTON_A);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_CANCEL, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_CANCEL,
_360_JOY_BUTTON_B); _360_JOY_BUTTON_B);
InputManager.SetGameJoypadMaps( PlatformInput.SetGameJoypadMaps(
MAP_STYLE_0, ACTION_MENU_UP, MAP_STYLE_0, ACTION_MENU_UP,
_360_JOY_BUTTON_DPAD_UP | _360_JOY_BUTTON_LSTICK_UP); _360_JOY_BUTTON_DPAD_UP | _360_JOY_BUTTON_LSTICK_UP);
InputManager.SetGameJoypadMaps( PlatformInput.SetGameJoypadMaps(
MAP_STYLE_0, ACTION_MENU_DOWN, MAP_STYLE_0, ACTION_MENU_DOWN,
_360_JOY_BUTTON_DPAD_DOWN | _360_JOY_BUTTON_LSTICK_DOWN); _360_JOY_BUTTON_DPAD_DOWN | _360_JOY_BUTTON_LSTICK_DOWN);
InputManager.SetGameJoypadMaps( PlatformInput.SetGameJoypadMaps(
MAP_STYLE_0, ACTION_MENU_LEFT, MAP_STYLE_0, ACTION_MENU_LEFT,
_360_JOY_BUTTON_DPAD_LEFT | _360_JOY_BUTTON_LSTICK_LEFT); _360_JOY_BUTTON_DPAD_LEFT | _360_JOY_BUTTON_LSTICK_LEFT);
InputManager.SetGameJoypadMaps( PlatformInput.SetGameJoypadMaps(
MAP_STYLE_0, ACTION_MENU_RIGHT, MAP_STYLE_0, ACTION_MENU_RIGHT,
_360_JOY_BUTTON_DPAD_RIGHT | _360_JOY_BUTTON_LSTICK_RIGHT); _360_JOY_BUTTON_DPAD_RIGHT | _360_JOY_BUTTON_LSTICK_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_PAGEUP, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_PAGEUP,
_360_JOY_BUTTON_LT); _360_JOY_BUTTON_LT);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_PAGEDOWN, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_PAGEDOWN,
_360_JOY_BUTTON_RT); _360_JOY_BUTTON_RT);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_RIGHT_SCROLL, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_RIGHT_SCROLL,
_360_JOY_BUTTON_RB); _360_JOY_BUTTON_RB);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_LEFT_SCROLL, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_LEFT_SCROLL,
_360_JOY_BUTTON_LB); _360_JOY_BUTTON_LB);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_PAUSEMENU, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_PAUSEMENU,
_360_JOY_BUTTON_START); _360_JOY_BUTTON_START);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_STICK_PRESS, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_STICK_PRESS,
_360_JOY_BUTTON_LTHUMB); _360_JOY_BUTTON_LTHUMB);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_OTHER_STICK_PRESS, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_OTHER_STICK_PRESS,
_360_JOY_BUTTON_RTHUMB); _360_JOY_BUTTON_RTHUMB);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_OTHER_STICK_UP, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_OTHER_STICK_UP,
_360_JOY_BUTTON_RSTICK_UP); _360_JOY_BUTTON_RSTICK_UP);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_OTHER_STICK_DOWN, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_OTHER_STICK_DOWN,
_360_JOY_BUTTON_RSTICK_DOWN); _360_JOY_BUTTON_RSTICK_DOWN);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_OTHER_STICK_LEFT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_OTHER_STICK_LEFT,
_360_JOY_BUTTON_RSTICK_LEFT); _360_JOY_BUTTON_RSTICK_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_OTHER_STICK_RIGHT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_OTHER_STICK_RIGHT,
_360_JOY_BUTTON_RSTICK_RIGHT); _360_JOY_BUTTON_RSTICK_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_JUMP, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_JUMP,
_360_JOY_BUTTON_A); _360_JOY_BUTTON_A);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_FORWARD, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_FORWARD,
_360_JOY_BUTTON_LSTICK_UP); _360_JOY_BUTTON_LSTICK_UP);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_BACKWARD, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_BACKWARD,
_360_JOY_BUTTON_LSTICK_DOWN); _360_JOY_BUTTON_LSTICK_DOWN);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_LEFT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_LEFT,
_360_JOY_BUTTON_LSTICK_LEFT); _360_JOY_BUTTON_LSTICK_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_RIGHT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_RIGHT,
_360_JOY_BUTTON_LSTICK_RIGHT); _360_JOY_BUTTON_LSTICK_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_LOOK_LEFT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_LOOK_LEFT,
_360_JOY_BUTTON_RSTICK_LEFT); _360_JOY_BUTTON_RSTICK_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_LOOK_RIGHT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_LOOK_RIGHT,
_360_JOY_BUTTON_RSTICK_RIGHT); _360_JOY_BUTTON_RSTICK_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_LOOK_UP, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_LOOK_UP,
_360_JOY_BUTTON_RSTICK_UP); _360_JOY_BUTTON_RSTICK_UP);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_LOOK_DOWN, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_LOOK_DOWN,
_360_JOY_BUTTON_RSTICK_DOWN); _360_JOY_BUTTON_RSTICK_DOWN);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_USE, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_USE,
_360_JOY_BUTTON_LT); _360_JOY_BUTTON_LT);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_ACTION, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_ACTION,
_360_JOY_BUTTON_RT); _360_JOY_BUTTON_RT);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_RIGHT_SCROLL, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_RIGHT_SCROLL,
_360_JOY_BUTTON_RB); _360_JOY_BUTTON_RB);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_LEFT_SCROLL, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_LEFT_SCROLL,
_360_JOY_BUTTON_LB); _360_JOY_BUTTON_LB);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_INVENTORY, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_INVENTORY,
_360_JOY_BUTTON_Y); _360_JOY_BUTTON_Y);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_PAUSEMENU, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_PAUSEMENU,
_360_JOY_BUTTON_START); _360_JOY_BUTTON_START);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_DROP, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_DROP,
_360_JOY_BUTTON_B); _360_JOY_BUTTON_B);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_SNEAK_TOGGLE, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_SNEAK_TOGGLE,
_360_JOY_BUTTON_RTHUMB); _360_JOY_BUTTON_RTHUMB);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_CRAFTING, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_CRAFTING,
_360_JOY_BUTTON_X); _360_JOY_BUTTON_X);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0,
MINECRAFT_ACTION_RENDER_THIRD_PERSON, MINECRAFT_ACTION_RENDER_THIRD_PERSON,
_360_JOY_BUTTON_LTHUMB); _360_JOY_BUTTON_LTHUMB);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_GAME_INFO, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_GAME_INFO,
_360_JOY_BUTTON_BACK); _360_JOY_BUTTON_BACK);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_DPAD_LEFT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_DPAD_LEFT,
_360_JOY_BUTTON_DPAD_LEFT); _360_JOY_BUTTON_DPAD_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_DPAD_RIGHT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_DPAD_RIGHT,
_360_JOY_BUTTON_DPAD_RIGHT); _360_JOY_BUTTON_DPAD_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_DPAD_UP, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_DPAD_UP,
_360_JOY_BUTTON_DPAD_UP); _360_JOY_BUTTON_DPAD_UP);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_DPAD_DOWN, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_DPAD_DOWN,
_360_JOY_BUTTON_DPAD_DOWN); _360_JOY_BUTTON_DPAD_DOWN);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_A, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_A,
_360_JOY_BUTTON_A); _360_JOY_BUTTON_A);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_B, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_B,
_360_JOY_BUTTON_B); _360_JOY_BUTTON_B);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_X, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_X,
_360_JOY_BUTTON_X); _360_JOY_BUTTON_X);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_Y, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_Y,
_360_JOY_BUTTON_Y); _360_JOY_BUTTON_Y);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_OK, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_OK,
_360_JOY_BUTTON_A); _360_JOY_BUTTON_A);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_CANCEL, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_CANCEL,
_360_JOY_BUTTON_B); _360_JOY_BUTTON_B);
InputManager.SetGameJoypadMaps( PlatformInput.SetGameJoypadMaps(
MAP_STYLE_1, ACTION_MENU_UP, MAP_STYLE_1, ACTION_MENU_UP,
_360_JOY_BUTTON_DPAD_UP | _360_JOY_BUTTON_LSTICK_UP); _360_JOY_BUTTON_DPAD_UP | _360_JOY_BUTTON_LSTICK_UP);
InputManager.SetGameJoypadMaps( PlatformInput.SetGameJoypadMaps(
MAP_STYLE_1, ACTION_MENU_DOWN, MAP_STYLE_1, ACTION_MENU_DOWN,
_360_JOY_BUTTON_DPAD_DOWN | _360_JOY_BUTTON_LSTICK_DOWN); _360_JOY_BUTTON_DPAD_DOWN | _360_JOY_BUTTON_LSTICK_DOWN);
InputManager.SetGameJoypadMaps( PlatformInput.SetGameJoypadMaps(
MAP_STYLE_1, ACTION_MENU_LEFT, MAP_STYLE_1, ACTION_MENU_LEFT,
_360_JOY_BUTTON_DPAD_LEFT | _360_JOY_BUTTON_LSTICK_LEFT); _360_JOY_BUTTON_DPAD_LEFT | _360_JOY_BUTTON_LSTICK_LEFT);
InputManager.SetGameJoypadMaps( PlatformInput.SetGameJoypadMaps(
MAP_STYLE_1, ACTION_MENU_RIGHT, MAP_STYLE_1, ACTION_MENU_RIGHT,
_360_JOY_BUTTON_DPAD_RIGHT | _360_JOY_BUTTON_LSTICK_RIGHT); _360_JOY_BUTTON_DPAD_RIGHT | _360_JOY_BUTTON_LSTICK_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_PAGEUP, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_PAGEUP,
_360_JOY_BUTTON_LB); _360_JOY_BUTTON_LB);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_PAGEDOWN, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_PAGEDOWN,
_360_JOY_BUTTON_RT); _360_JOY_BUTTON_RT);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_RIGHT_SCROLL, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_RIGHT_SCROLL,
_360_JOY_BUTTON_RB); _360_JOY_BUTTON_RB);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_LEFT_SCROLL, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_LEFT_SCROLL,
_360_JOY_BUTTON_LB); _360_JOY_BUTTON_LB);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_PAUSEMENU, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_PAUSEMENU,
_360_JOY_BUTTON_START); _360_JOY_BUTTON_START);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_STICK_PRESS, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_STICK_PRESS,
_360_JOY_BUTTON_LTHUMB); _360_JOY_BUTTON_LTHUMB);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_OTHER_STICK_PRESS, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_OTHER_STICK_PRESS,
_360_JOY_BUTTON_RTHUMB); _360_JOY_BUTTON_RTHUMB);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_OTHER_STICK_UP, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_OTHER_STICK_UP,
_360_JOY_BUTTON_RSTICK_UP); _360_JOY_BUTTON_RSTICK_UP);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_OTHER_STICK_DOWN, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_OTHER_STICK_DOWN,
_360_JOY_BUTTON_RSTICK_DOWN); _360_JOY_BUTTON_RSTICK_DOWN);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_OTHER_STICK_LEFT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_OTHER_STICK_LEFT,
_360_JOY_BUTTON_RSTICK_LEFT); _360_JOY_BUTTON_RSTICK_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_OTHER_STICK_RIGHT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_OTHER_STICK_RIGHT,
_360_JOY_BUTTON_RSTICK_RIGHT); _360_JOY_BUTTON_RSTICK_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_JUMP, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_JUMP,
_360_JOY_BUTTON_RB); _360_JOY_BUTTON_RB);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_FORWARD, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_FORWARD,
_360_JOY_BUTTON_LSTICK_UP); _360_JOY_BUTTON_LSTICK_UP);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_BACKWARD, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_BACKWARD,
_360_JOY_BUTTON_LSTICK_DOWN); _360_JOY_BUTTON_LSTICK_DOWN);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_LEFT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_LEFT,
_360_JOY_BUTTON_LSTICK_LEFT); _360_JOY_BUTTON_LSTICK_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_RIGHT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_RIGHT,
_360_JOY_BUTTON_LSTICK_RIGHT); _360_JOY_BUTTON_LSTICK_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_LOOK_LEFT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_LOOK_LEFT,
_360_JOY_BUTTON_RSTICK_LEFT); _360_JOY_BUTTON_RSTICK_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_LOOK_RIGHT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_LOOK_RIGHT,
_360_JOY_BUTTON_RSTICK_RIGHT); _360_JOY_BUTTON_RSTICK_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_LOOK_UP, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_LOOK_UP,
_360_JOY_BUTTON_RSTICK_UP); _360_JOY_BUTTON_RSTICK_UP);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_LOOK_DOWN, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_LOOK_DOWN,
_360_JOY_BUTTON_RSTICK_DOWN); _360_JOY_BUTTON_RSTICK_DOWN);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_USE, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_USE,
_360_JOY_BUTTON_RT); _360_JOY_BUTTON_RT);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_ACTION, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_ACTION,
_360_JOY_BUTTON_LT); _360_JOY_BUTTON_LT);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_RIGHT_SCROLL, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_RIGHT_SCROLL,
_360_JOY_BUTTON_DPAD_RIGHT); _360_JOY_BUTTON_DPAD_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_LEFT_SCROLL, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_LEFT_SCROLL,
_360_JOY_BUTTON_DPAD_LEFT); _360_JOY_BUTTON_DPAD_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_INVENTORY, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_INVENTORY,
_360_JOY_BUTTON_Y); _360_JOY_BUTTON_Y);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_PAUSEMENU, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_PAUSEMENU,
_360_JOY_BUTTON_START); _360_JOY_BUTTON_START);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_DROP, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_DROP,
_360_JOY_BUTTON_B); _360_JOY_BUTTON_B);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_SNEAK_TOGGLE, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_SNEAK_TOGGLE,
_360_JOY_BUTTON_LTHUMB); _360_JOY_BUTTON_LTHUMB);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_CRAFTING, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_CRAFTING,
_360_JOY_BUTTON_X); _360_JOY_BUTTON_X);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1,
MINECRAFT_ACTION_RENDER_THIRD_PERSON, MINECRAFT_ACTION_RENDER_THIRD_PERSON,
_360_JOY_BUTTON_RTHUMB); _360_JOY_BUTTON_RTHUMB);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_GAME_INFO, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_GAME_INFO,
_360_JOY_BUTTON_BACK); _360_JOY_BUTTON_BACK);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_DPAD_LEFT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_DPAD_LEFT,
_360_JOY_BUTTON_DPAD_LEFT); _360_JOY_BUTTON_DPAD_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_DPAD_RIGHT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_DPAD_RIGHT,
_360_JOY_BUTTON_DPAD_RIGHT); _360_JOY_BUTTON_DPAD_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_DPAD_UP, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_DPAD_UP,
_360_JOY_BUTTON_DPAD_UP); _360_JOY_BUTTON_DPAD_UP);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_DPAD_DOWN, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_DPAD_DOWN,
_360_JOY_BUTTON_DPAD_DOWN); _360_JOY_BUTTON_DPAD_DOWN);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_A, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_A,
_360_JOY_BUTTON_A); _360_JOY_BUTTON_A);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_B, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_B,
_360_JOY_BUTTON_B); _360_JOY_BUTTON_B);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_X, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_X,
_360_JOY_BUTTON_X); _360_JOY_BUTTON_X);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_Y, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_Y,
_360_JOY_BUTTON_Y); _360_JOY_BUTTON_Y);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_OK, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_OK,
_360_JOY_BUTTON_A); _360_JOY_BUTTON_A);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_CANCEL, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_CANCEL,
_360_JOY_BUTTON_B); _360_JOY_BUTTON_B);
InputManager.SetGameJoypadMaps( PlatformInput.SetGameJoypadMaps(
MAP_STYLE_2, ACTION_MENU_UP, MAP_STYLE_2, ACTION_MENU_UP,
_360_JOY_BUTTON_DPAD_UP | _360_JOY_BUTTON_LSTICK_UP); _360_JOY_BUTTON_DPAD_UP | _360_JOY_BUTTON_LSTICK_UP);
InputManager.SetGameJoypadMaps( PlatformInput.SetGameJoypadMaps(
MAP_STYLE_2, ACTION_MENU_DOWN, MAP_STYLE_2, ACTION_MENU_DOWN,
_360_JOY_BUTTON_DPAD_DOWN | _360_JOY_BUTTON_LSTICK_DOWN); _360_JOY_BUTTON_DPAD_DOWN | _360_JOY_BUTTON_LSTICK_DOWN);
InputManager.SetGameJoypadMaps( PlatformInput.SetGameJoypadMaps(
MAP_STYLE_2, ACTION_MENU_LEFT, MAP_STYLE_2, ACTION_MENU_LEFT,
_360_JOY_BUTTON_DPAD_LEFT | _360_JOY_BUTTON_LSTICK_LEFT); _360_JOY_BUTTON_DPAD_LEFT | _360_JOY_BUTTON_LSTICK_LEFT);
InputManager.SetGameJoypadMaps( PlatformInput.SetGameJoypadMaps(
MAP_STYLE_2, ACTION_MENU_RIGHT, MAP_STYLE_2, ACTION_MENU_RIGHT,
_360_JOY_BUTTON_DPAD_RIGHT | _360_JOY_BUTTON_LSTICK_RIGHT); _360_JOY_BUTTON_DPAD_RIGHT | _360_JOY_BUTTON_LSTICK_RIGHT);
InputManager.SetGameJoypadMaps( PlatformInput.SetGameJoypadMaps(
MAP_STYLE_2, ACTION_MENU_PAGEUP, MAP_STYLE_2, ACTION_MENU_PAGEUP,
_360_JOY_BUTTON_DPAD_UP | _360_JOY_BUTTON_LB); _360_JOY_BUTTON_DPAD_UP | _360_JOY_BUTTON_LB);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_PAGEDOWN, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_PAGEDOWN,
_360_JOY_BUTTON_RT); _360_JOY_BUTTON_RT);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_RIGHT_SCROLL, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_RIGHT_SCROLL,
_360_JOY_BUTTON_RB); _360_JOY_BUTTON_RB);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_LEFT_SCROLL, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_LEFT_SCROLL,
_360_JOY_BUTTON_LB); _360_JOY_BUTTON_LB);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_JUMP, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_JUMP,
_360_JOY_BUTTON_LT); _360_JOY_BUTTON_LT);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_FORWARD, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_FORWARD,
_360_JOY_BUTTON_LSTICK_UP); _360_JOY_BUTTON_LSTICK_UP);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_BACKWARD, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_BACKWARD,
_360_JOY_BUTTON_LSTICK_DOWN); _360_JOY_BUTTON_LSTICK_DOWN);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_LEFT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_LEFT,
_360_JOY_BUTTON_LSTICK_LEFT); _360_JOY_BUTTON_LSTICK_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_RIGHT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_RIGHT,
_360_JOY_BUTTON_LSTICK_RIGHT); _360_JOY_BUTTON_LSTICK_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_LOOK_LEFT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_LOOK_LEFT,
_360_JOY_BUTTON_RSTICK_LEFT); _360_JOY_BUTTON_RSTICK_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_LOOK_RIGHT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_LOOK_RIGHT,
_360_JOY_BUTTON_RSTICK_RIGHT); _360_JOY_BUTTON_RSTICK_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_LOOK_UP, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_LOOK_UP,
_360_JOY_BUTTON_RSTICK_UP); _360_JOY_BUTTON_RSTICK_UP);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_LOOK_DOWN, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_LOOK_DOWN,
_360_JOY_BUTTON_RSTICK_DOWN); _360_JOY_BUTTON_RSTICK_DOWN);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_USE, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_USE,
_360_JOY_BUTTON_RT); _360_JOY_BUTTON_RT);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_ACTION, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_ACTION,
_360_JOY_BUTTON_A); _360_JOY_BUTTON_A);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_RIGHT_SCROLL, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_RIGHT_SCROLL,
_360_JOY_BUTTON_DPAD_RIGHT); _360_JOY_BUTTON_DPAD_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_LEFT_SCROLL, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_LEFT_SCROLL,
_360_JOY_BUTTON_DPAD_LEFT); _360_JOY_BUTTON_DPAD_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_INVENTORY, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_INVENTORY,
_360_JOY_BUTTON_Y); _360_JOY_BUTTON_Y);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_PAUSEMENU, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_PAUSEMENU,
_360_JOY_BUTTON_START); _360_JOY_BUTTON_START);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_DROP, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_DROP,
_360_JOY_BUTTON_B); _360_JOY_BUTTON_B);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_SNEAK_TOGGLE, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_SNEAK_TOGGLE,
_360_JOY_BUTTON_LB); _360_JOY_BUTTON_LB);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_CRAFTING, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_CRAFTING,
_360_JOY_BUTTON_X); _360_JOY_BUTTON_X);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2,
MINECRAFT_ACTION_RENDER_THIRD_PERSON, MINECRAFT_ACTION_RENDER_THIRD_PERSON,
_360_JOY_BUTTON_LTHUMB); _360_JOY_BUTTON_LTHUMB);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_GAME_INFO, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_GAME_INFO,
_360_JOY_BUTTON_BACK); _360_JOY_BUTTON_BACK);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_PAUSEMENU, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_PAUSEMENU,
_360_JOY_BUTTON_START); _360_JOY_BUTTON_START);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_STICK_PRESS, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_STICK_PRESS,
_360_JOY_BUTTON_LTHUMB); _360_JOY_BUTTON_LTHUMB);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_OTHER_STICK_PRESS, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_OTHER_STICK_PRESS,
_360_JOY_BUTTON_RTHUMB); _360_JOY_BUTTON_RTHUMB);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_OTHER_STICK_UP, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_OTHER_STICK_UP,
_360_JOY_BUTTON_RSTICK_UP); _360_JOY_BUTTON_RSTICK_UP);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_OTHER_STICK_DOWN, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_OTHER_STICK_DOWN,
_360_JOY_BUTTON_RSTICK_DOWN); _360_JOY_BUTTON_RSTICK_DOWN);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_OTHER_STICK_LEFT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_OTHER_STICK_LEFT,
_360_JOY_BUTTON_RSTICK_LEFT); _360_JOY_BUTTON_RSTICK_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_OTHER_STICK_RIGHT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_OTHER_STICK_RIGHT,
_360_JOY_BUTTON_RSTICK_RIGHT); _360_JOY_BUTTON_RSTICK_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_DPAD_LEFT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_DPAD_LEFT,
_360_JOY_BUTTON_DPAD_LEFT); _360_JOY_BUTTON_DPAD_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_DPAD_RIGHT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_DPAD_RIGHT,
_360_JOY_BUTTON_DPAD_RIGHT); _360_JOY_BUTTON_DPAD_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_DPAD_UP, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_DPAD_UP,
_360_JOY_BUTTON_DPAD_UP); _360_JOY_BUTTON_DPAD_UP);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_DPAD_DOWN, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_DPAD_DOWN,
_360_JOY_BUTTON_DPAD_DOWN); _360_JOY_BUTTON_DPAD_DOWN);
} }
@ -474,12 +474,12 @@ int main(int argc, const char* argv[]) {
// Set the number of possible joypad layouts that the user can switch // Set the number of possible joypad layouts that the user can switch
// between, and the number of actions // between, and the number of actions
InputManager.Initialise(1, 5, MINECRAFT_ACTION_MAX, ACTION_MAX_MENU); PlatformInput.Initialise(1, 5, MINECRAFT_ACTION_MAX, ACTION_MAX_MENU);
// Set the default joypad action mappings for Minecraft // Set the default joypad action mappings for Minecraft
DefineActions(); DefineActions();
InputManager.SetJoypadMapVal(0, 0); PlatformInput.SetJoypadMapVal(0, 0);
InputManager.SetKeyRepeatRate(0.3f, 0.2f); PlatformInput.SetKeyRepeatRate(0.3f, 0.2f);
// Initialise the profile manager with the game Title ID, Offer ID, a // Initialise the profile manager with the game Title ID, Offer ID, a
// profile version number, and the number of profile values and settings // profile version number, and the number of profile values and settings
@ -532,7 +532,7 @@ int main(int argc, const char* argv[]) {
ui.setScreenSize(fbw, fbh); ui.setScreenSize(fbw, fbh);
} }
app.UpdateTime(); app.UpdateTime();
InputManager.Tick(); PlatformInput.Tick();
ProfileManager.Tick(); ProfileManager.Tick();

View file

@ -74,302 +74,302 @@ void DefineActions(void) {
// Split into Menu actions, and in-game actions // Split into Menu actions, and in-game actions
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_A, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_A,
_360_JOY_BUTTON_A); _360_JOY_BUTTON_A);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_B, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_B,
_360_JOY_BUTTON_B); _360_JOY_BUTTON_B);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_X, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_X,
_360_JOY_BUTTON_X); _360_JOY_BUTTON_X);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_Y, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_Y,
_360_JOY_BUTTON_Y); _360_JOY_BUTTON_Y);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_OK, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_OK,
_360_JOY_BUTTON_A); _360_JOY_BUTTON_A);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_CANCEL, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_CANCEL,
_360_JOY_BUTTON_B); _360_JOY_BUTTON_B);
InputManager.SetGameJoypadMaps( PlatformInput.SetGameJoypadMaps(
MAP_STYLE_0, ACTION_MENU_UP, MAP_STYLE_0, ACTION_MENU_UP,
_360_JOY_BUTTON_DPAD_UP | _360_JOY_BUTTON_LSTICK_UP); _360_JOY_BUTTON_DPAD_UP | _360_JOY_BUTTON_LSTICK_UP);
InputManager.SetGameJoypadMaps( PlatformInput.SetGameJoypadMaps(
MAP_STYLE_0, ACTION_MENU_DOWN, MAP_STYLE_0, ACTION_MENU_DOWN,
_360_JOY_BUTTON_DPAD_DOWN | _360_JOY_BUTTON_LSTICK_DOWN); _360_JOY_BUTTON_DPAD_DOWN | _360_JOY_BUTTON_LSTICK_DOWN);
InputManager.SetGameJoypadMaps( PlatformInput.SetGameJoypadMaps(
MAP_STYLE_0, ACTION_MENU_LEFT, MAP_STYLE_0, ACTION_MENU_LEFT,
_360_JOY_BUTTON_DPAD_LEFT | _360_JOY_BUTTON_LSTICK_LEFT); _360_JOY_BUTTON_DPAD_LEFT | _360_JOY_BUTTON_LSTICK_LEFT);
InputManager.SetGameJoypadMaps( PlatformInput.SetGameJoypadMaps(
MAP_STYLE_0, ACTION_MENU_RIGHT, MAP_STYLE_0, ACTION_MENU_RIGHT,
_360_JOY_BUTTON_DPAD_RIGHT | _360_JOY_BUTTON_LSTICK_RIGHT); _360_JOY_BUTTON_DPAD_RIGHT | _360_JOY_BUTTON_LSTICK_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_PAGEUP, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_PAGEUP,
_360_JOY_BUTTON_LT); _360_JOY_BUTTON_LT);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_PAGEDOWN, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_PAGEDOWN,
_360_JOY_BUTTON_RT); _360_JOY_BUTTON_RT);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_RIGHT_SCROLL, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_RIGHT_SCROLL,
_360_JOY_BUTTON_RB); _360_JOY_BUTTON_RB);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_LEFT_SCROLL, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_LEFT_SCROLL,
_360_JOY_BUTTON_LB); _360_JOY_BUTTON_LB);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_PAUSEMENU, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_PAUSEMENU,
_360_JOY_BUTTON_START); _360_JOY_BUTTON_START);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_STICK_PRESS, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_STICK_PRESS,
_360_JOY_BUTTON_LTHUMB); _360_JOY_BUTTON_LTHUMB);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_OTHER_STICK_PRESS, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_OTHER_STICK_PRESS,
_360_JOY_BUTTON_RTHUMB); _360_JOY_BUTTON_RTHUMB);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_OTHER_STICK_UP, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_OTHER_STICK_UP,
_360_JOY_BUTTON_RSTICK_UP); _360_JOY_BUTTON_RSTICK_UP);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_OTHER_STICK_DOWN, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_OTHER_STICK_DOWN,
_360_JOY_BUTTON_RSTICK_DOWN); _360_JOY_BUTTON_RSTICK_DOWN);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_OTHER_STICK_LEFT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_OTHER_STICK_LEFT,
_360_JOY_BUTTON_RSTICK_LEFT); _360_JOY_BUTTON_RSTICK_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_OTHER_STICK_RIGHT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_OTHER_STICK_RIGHT,
_360_JOY_BUTTON_RSTICK_RIGHT); _360_JOY_BUTTON_RSTICK_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_JUMP, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_JUMP,
_360_JOY_BUTTON_A); _360_JOY_BUTTON_A);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_FORWARD, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_FORWARD,
_360_JOY_BUTTON_LSTICK_UP); _360_JOY_BUTTON_LSTICK_UP);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_BACKWARD, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_BACKWARD,
_360_JOY_BUTTON_LSTICK_DOWN); _360_JOY_BUTTON_LSTICK_DOWN);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_LEFT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_LEFT,
_360_JOY_BUTTON_LSTICK_LEFT); _360_JOY_BUTTON_LSTICK_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_RIGHT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_RIGHT,
_360_JOY_BUTTON_LSTICK_RIGHT); _360_JOY_BUTTON_LSTICK_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_LOOK_LEFT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_LOOK_LEFT,
_360_JOY_BUTTON_RSTICK_LEFT); _360_JOY_BUTTON_RSTICK_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_LOOK_RIGHT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_LOOK_RIGHT,
_360_JOY_BUTTON_RSTICK_RIGHT); _360_JOY_BUTTON_RSTICK_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_LOOK_UP, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_LOOK_UP,
_360_JOY_BUTTON_RSTICK_UP); _360_JOY_BUTTON_RSTICK_UP);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_LOOK_DOWN, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_LOOK_DOWN,
_360_JOY_BUTTON_RSTICK_DOWN); _360_JOY_BUTTON_RSTICK_DOWN);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_USE, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_USE,
_360_JOY_BUTTON_LT); _360_JOY_BUTTON_LT);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_ACTION, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_ACTION,
_360_JOY_BUTTON_RT); _360_JOY_BUTTON_RT);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_RIGHT_SCROLL, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_RIGHT_SCROLL,
_360_JOY_BUTTON_RB); _360_JOY_BUTTON_RB);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_LEFT_SCROLL, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_LEFT_SCROLL,
_360_JOY_BUTTON_LB); _360_JOY_BUTTON_LB);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_INVENTORY, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_INVENTORY,
_360_JOY_BUTTON_Y); _360_JOY_BUTTON_Y);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_PAUSEMENU, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_PAUSEMENU,
_360_JOY_BUTTON_START); _360_JOY_BUTTON_START);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_DROP, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_DROP,
_360_JOY_BUTTON_B); _360_JOY_BUTTON_B);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_SNEAK_TOGGLE, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_SNEAK_TOGGLE,
_360_JOY_BUTTON_RTHUMB); _360_JOY_BUTTON_RTHUMB);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_CRAFTING, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_CRAFTING,
_360_JOY_BUTTON_X); _360_JOY_BUTTON_X);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0,
MINECRAFT_ACTION_RENDER_THIRD_PERSON, MINECRAFT_ACTION_RENDER_THIRD_PERSON,
_360_JOY_BUTTON_LTHUMB); _360_JOY_BUTTON_LTHUMB);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_GAME_INFO, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_GAME_INFO,
_360_JOY_BUTTON_BACK); _360_JOY_BUTTON_BACK);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_DPAD_LEFT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_DPAD_LEFT,
_360_JOY_BUTTON_DPAD_LEFT); _360_JOY_BUTTON_DPAD_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_DPAD_RIGHT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_DPAD_RIGHT,
_360_JOY_BUTTON_DPAD_RIGHT); _360_JOY_BUTTON_DPAD_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_DPAD_UP, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_DPAD_UP,
_360_JOY_BUTTON_DPAD_UP); _360_JOY_BUTTON_DPAD_UP);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_DPAD_DOWN, PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_DPAD_DOWN,
_360_JOY_BUTTON_DPAD_DOWN); _360_JOY_BUTTON_DPAD_DOWN);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_A, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_A,
_360_JOY_BUTTON_A); _360_JOY_BUTTON_A);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_B, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_B,
_360_JOY_BUTTON_B); _360_JOY_BUTTON_B);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_X, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_X,
_360_JOY_BUTTON_X); _360_JOY_BUTTON_X);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_Y, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_Y,
_360_JOY_BUTTON_Y); _360_JOY_BUTTON_Y);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_OK, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_OK,
_360_JOY_BUTTON_A); _360_JOY_BUTTON_A);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_CANCEL, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_CANCEL,
_360_JOY_BUTTON_B); _360_JOY_BUTTON_B);
InputManager.SetGameJoypadMaps( PlatformInput.SetGameJoypadMaps(
MAP_STYLE_1, ACTION_MENU_UP, MAP_STYLE_1, ACTION_MENU_UP,
_360_JOY_BUTTON_DPAD_UP | _360_JOY_BUTTON_LSTICK_UP); _360_JOY_BUTTON_DPAD_UP | _360_JOY_BUTTON_LSTICK_UP);
InputManager.SetGameJoypadMaps( PlatformInput.SetGameJoypadMaps(
MAP_STYLE_1, ACTION_MENU_DOWN, MAP_STYLE_1, ACTION_MENU_DOWN,
_360_JOY_BUTTON_DPAD_DOWN | _360_JOY_BUTTON_LSTICK_DOWN); _360_JOY_BUTTON_DPAD_DOWN | _360_JOY_BUTTON_LSTICK_DOWN);
InputManager.SetGameJoypadMaps( PlatformInput.SetGameJoypadMaps(
MAP_STYLE_1, ACTION_MENU_LEFT, MAP_STYLE_1, ACTION_MENU_LEFT,
_360_JOY_BUTTON_DPAD_LEFT | _360_JOY_BUTTON_LSTICK_LEFT); _360_JOY_BUTTON_DPAD_LEFT | _360_JOY_BUTTON_LSTICK_LEFT);
InputManager.SetGameJoypadMaps( PlatformInput.SetGameJoypadMaps(
MAP_STYLE_1, ACTION_MENU_RIGHT, MAP_STYLE_1, ACTION_MENU_RIGHT,
_360_JOY_BUTTON_DPAD_RIGHT | _360_JOY_BUTTON_LSTICK_RIGHT); _360_JOY_BUTTON_DPAD_RIGHT | _360_JOY_BUTTON_LSTICK_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_PAGEUP, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_PAGEUP,
_360_JOY_BUTTON_LB); _360_JOY_BUTTON_LB);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_PAGEDOWN, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_PAGEDOWN,
_360_JOY_BUTTON_RT); _360_JOY_BUTTON_RT);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_RIGHT_SCROLL, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_RIGHT_SCROLL,
_360_JOY_BUTTON_RB); _360_JOY_BUTTON_RB);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_LEFT_SCROLL, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_LEFT_SCROLL,
_360_JOY_BUTTON_LB); _360_JOY_BUTTON_LB);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_PAUSEMENU, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_PAUSEMENU,
_360_JOY_BUTTON_START); _360_JOY_BUTTON_START);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_STICK_PRESS, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_STICK_PRESS,
_360_JOY_BUTTON_LTHUMB); _360_JOY_BUTTON_LTHUMB);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_OTHER_STICK_PRESS, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_OTHER_STICK_PRESS,
_360_JOY_BUTTON_RTHUMB); _360_JOY_BUTTON_RTHUMB);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_OTHER_STICK_UP, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_OTHER_STICK_UP,
_360_JOY_BUTTON_RSTICK_UP); _360_JOY_BUTTON_RSTICK_UP);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_OTHER_STICK_DOWN, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_OTHER_STICK_DOWN,
_360_JOY_BUTTON_RSTICK_DOWN); _360_JOY_BUTTON_RSTICK_DOWN);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_OTHER_STICK_LEFT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_OTHER_STICK_LEFT,
_360_JOY_BUTTON_RSTICK_LEFT); _360_JOY_BUTTON_RSTICK_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_OTHER_STICK_RIGHT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_OTHER_STICK_RIGHT,
_360_JOY_BUTTON_RSTICK_RIGHT); _360_JOY_BUTTON_RSTICK_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_JUMP, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_JUMP,
_360_JOY_BUTTON_RB); _360_JOY_BUTTON_RB);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_FORWARD, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_FORWARD,
_360_JOY_BUTTON_LSTICK_UP); _360_JOY_BUTTON_LSTICK_UP);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_BACKWARD, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_BACKWARD,
_360_JOY_BUTTON_LSTICK_DOWN); _360_JOY_BUTTON_LSTICK_DOWN);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_LEFT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_LEFT,
_360_JOY_BUTTON_LSTICK_LEFT); _360_JOY_BUTTON_LSTICK_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_RIGHT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_RIGHT,
_360_JOY_BUTTON_LSTICK_RIGHT); _360_JOY_BUTTON_LSTICK_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_LOOK_LEFT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_LOOK_LEFT,
_360_JOY_BUTTON_RSTICK_LEFT); _360_JOY_BUTTON_RSTICK_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_LOOK_RIGHT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_LOOK_RIGHT,
_360_JOY_BUTTON_RSTICK_RIGHT); _360_JOY_BUTTON_RSTICK_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_LOOK_UP, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_LOOK_UP,
_360_JOY_BUTTON_RSTICK_UP); _360_JOY_BUTTON_RSTICK_UP);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_LOOK_DOWN, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_LOOK_DOWN,
_360_JOY_BUTTON_RSTICK_DOWN); _360_JOY_BUTTON_RSTICK_DOWN);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_USE, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_USE,
_360_JOY_BUTTON_RT); _360_JOY_BUTTON_RT);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_ACTION, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_ACTION,
_360_JOY_BUTTON_LT); _360_JOY_BUTTON_LT);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_RIGHT_SCROLL, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_RIGHT_SCROLL,
_360_JOY_BUTTON_DPAD_RIGHT); _360_JOY_BUTTON_DPAD_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_LEFT_SCROLL, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_LEFT_SCROLL,
_360_JOY_BUTTON_DPAD_LEFT); _360_JOY_BUTTON_DPAD_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_INVENTORY, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_INVENTORY,
_360_JOY_BUTTON_Y); _360_JOY_BUTTON_Y);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_PAUSEMENU, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_PAUSEMENU,
_360_JOY_BUTTON_START); _360_JOY_BUTTON_START);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_DROP, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_DROP,
_360_JOY_BUTTON_B); _360_JOY_BUTTON_B);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_SNEAK_TOGGLE, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_SNEAK_TOGGLE,
_360_JOY_BUTTON_LTHUMB); _360_JOY_BUTTON_LTHUMB);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_CRAFTING, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_CRAFTING,
_360_JOY_BUTTON_X); _360_JOY_BUTTON_X);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1,
MINECRAFT_ACTION_RENDER_THIRD_PERSON, MINECRAFT_ACTION_RENDER_THIRD_PERSON,
_360_JOY_BUTTON_RTHUMB); _360_JOY_BUTTON_RTHUMB);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_GAME_INFO, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_GAME_INFO,
_360_JOY_BUTTON_BACK); _360_JOY_BUTTON_BACK);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_DPAD_LEFT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_DPAD_LEFT,
_360_JOY_BUTTON_DPAD_LEFT); _360_JOY_BUTTON_DPAD_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_DPAD_RIGHT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_DPAD_RIGHT,
_360_JOY_BUTTON_DPAD_RIGHT); _360_JOY_BUTTON_DPAD_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_DPAD_UP, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_DPAD_UP,
_360_JOY_BUTTON_DPAD_UP); _360_JOY_BUTTON_DPAD_UP);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_DPAD_DOWN, PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_DPAD_DOWN,
_360_JOY_BUTTON_DPAD_DOWN); _360_JOY_BUTTON_DPAD_DOWN);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_A, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_A,
_360_JOY_BUTTON_A); _360_JOY_BUTTON_A);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_B, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_B,
_360_JOY_BUTTON_B); _360_JOY_BUTTON_B);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_X, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_X,
_360_JOY_BUTTON_X); _360_JOY_BUTTON_X);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_Y, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_Y,
_360_JOY_BUTTON_Y); _360_JOY_BUTTON_Y);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_OK, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_OK,
_360_JOY_BUTTON_A); _360_JOY_BUTTON_A);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_CANCEL, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_CANCEL,
_360_JOY_BUTTON_B); _360_JOY_BUTTON_B);
InputManager.SetGameJoypadMaps( PlatformInput.SetGameJoypadMaps(
MAP_STYLE_2, ACTION_MENU_UP, MAP_STYLE_2, ACTION_MENU_UP,
_360_JOY_BUTTON_DPAD_UP | _360_JOY_BUTTON_LSTICK_UP); _360_JOY_BUTTON_DPAD_UP | _360_JOY_BUTTON_LSTICK_UP);
InputManager.SetGameJoypadMaps( PlatformInput.SetGameJoypadMaps(
MAP_STYLE_2, ACTION_MENU_DOWN, MAP_STYLE_2, ACTION_MENU_DOWN,
_360_JOY_BUTTON_DPAD_DOWN | _360_JOY_BUTTON_LSTICK_DOWN); _360_JOY_BUTTON_DPAD_DOWN | _360_JOY_BUTTON_LSTICK_DOWN);
InputManager.SetGameJoypadMaps( PlatformInput.SetGameJoypadMaps(
MAP_STYLE_2, ACTION_MENU_LEFT, MAP_STYLE_2, ACTION_MENU_LEFT,
_360_JOY_BUTTON_DPAD_LEFT | _360_JOY_BUTTON_LSTICK_LEFT); _360_JOY_BUTTON_DPAD_LEFT | _360_JOY_BUTTON_LSTICK_LEFT);
InputManager.SetGameJoypadMaps( PlatformInput.SetGameJoypadMaps(
MAP_STYLE_2, ACTION_MENU_RIGHT, MAP_STYLE_2, ACTION_MENU_RIGHT,
_360_JOY_BUTTON_DPAD_RIGHT | _360_JOY_BUTTON_LSTICK_RIGHT); _360_JOY_BUTTON_DPAD_RIGHT | _360_JOY_BUTTON_LSTICK_RIGHT);
InputManager.SetGameJoypadMaps( PlatformInput.SetGameJoypadMaps(
MAP_STYLE_2, ACTION_MENU_PAGEUP, MAP_STYLE_2, ACTION_MENU_PAGEUP,
_360_JOY_BUTTON_DPAD_UP | _360_JOY_BUTTON_LB); _360_JOY_BUTTON_DPAD_UP | _360_JOY_BUTTON_LB);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_PAGEDOWN, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_PAGEDOWN,
_360_JOY_BUTTON_RT); _360_JOY_BUTTON_RT);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_RIGHT_SCROLL, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_RIGHT_SCROLL,
_360_JOY_BUTTON_RB); _360_JOY_BUTTON_RB);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_LEFT_SCROLL, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_LEFT_SCROLL,
_360_JOY_BUTTON_LB); _360_JOY_BUTTON_LB);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_JUMP, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_JUMP,
_360_JOY_BUTTON_LT); _360_JOY_BUTTON_LT);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_FORWARD, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_FORWARD,
_360_JOY_BUTTON_LSTICK_UP); _360_JOY_BUTTON_LSTICK_UP);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_BACKWARD, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_BACKWARD,
_360_JOY_BUTTON_LSTICK_DOWN); _360_JOY_BUTTON_LSTICK_DOWN);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_LEFT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_LEFT,
_360_JOY_BUTTON_LSTICK_LEFT); _360_JOY_BUTTON_LSTICK_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_RIGHT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_RIGHT,
_360_JOY_BUTTON_LSTICK_RIGHT); _360_JOY_BUTTON_LSTICK_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_LOOK_LEFT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_LOOK_LEFT,
_360_JOY_BUTTON_RSTICK_LEFT); _360_JOY_BUTTON_RSTICK_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_LOOK_RIGHT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_LOOK_RIGHT,
_360_JOY_BUTTON_RSTICK_RIGHT); _360_JOY_BUTTON_RSTICK_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_LOOK_UP, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_LOOK_UP,
_360_JOY_BUTTON_RSTICK_UP); _360_JOY_BUTTON_RSTICK_UP);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_LOOK_DOWN, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_LOOK_DOWN,
_360_JOY_BUTTON_RSTICK_DOWN); _360_JOY_BUTTON_RSTICK_DOWN);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_USE, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_USE,
_360_JOY_BUTTON_RT); _360_JOY_BUTTON_RT);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_ACTION, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_ACTION,
_360_JOY_BUTTON_A); _360_JOY_BUTTON_A);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_RIGHT_SCROLL, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_RIGHT_SCROLL,
_360_JOY_BUTTON_DPAD_RIGHT); _360_JOY_BUTTON_DPAD_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_LEFT_SCROLL, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_LEFT_SCROLL,
_360_JOY_BUTTON_DPAD_LEFT); _360_JOY_BUTTON_DPAD_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_INVENTORY, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_INVENTORY,
_360_JOY_BUTTON_Y); _360_JOY_BUTTON_Y);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_PAUSEMENU, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_PAUSEMENU,
_360_JOY_BUTTON_START); _360_JOY_BUTTON_START);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_DROP, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_DROP,
_360_JOY_BUTTON_B); _360_JOY_BUTTON_B);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_SNEAK_TOGGLE, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_SNEAK_TOGGLE,
_360_JOY_BUTTON_LB); _360_JOY_BUTTON_LB);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_CRAFTING, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_CRAFTING,
_360_JOY_BUTTON_X); _360_JOY_BUTTON_X);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2,
MINECRAFT_ACTION_RENDER_THIRD_PERSON, MINECRAFT_ACTION_RENDER_THIRD_PERSON,
_360_JOY_BUTTON_LTHUMB); _360_JOY_BUTTON_LTHUMB);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_GAME_INFO, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_GAME_INFO,
_360_JOY_BUTTON_BACK); _360_JOY_BUTTON_BACK);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_PAUSEMENU, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_PAUSEMENU,
_360_JOY_BUTTON_START); _360_JOY_BUTTON_START);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_STICK_PRESS, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_STICK_PRESS,
_360_JOY_BUTTON_LTHUMB); _360_JOY_BUTTON_LTHUMB);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_OTHER_STICK_PRESS, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_OTHER_STICK_PRESS,
_360_JOY_BUTTON_RTHUMB); _360_JOY_BUTTON_RTHUMB);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_OTHER_STICK_UP, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_OTHER_STICK_UP,
_360_JOY_BUTTON_RSTICK_UP); _360_JOY_BUTTON_RSTICK_UP);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_OTHER_STICK_DOWN, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_OTHER_STICK_DOWN,
_360_JOY_BUTTON_RSTICK_DOWN); _360_JOY_BUTTON_RSTICK_DOWN);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_OTHER_STICK_LEFT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_OTHER_STICK_LEFT,
_360_JOY_BUTTON_RSTICK_LEFT); _360_JOY_BUTTON_RSTICK_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_OTHER_STICK_RIGHT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_OTHER_STICK_RIGHT,
_360_JOY_BUTTON_RSTICK_RIGHT); _360_JOY_BUTTON_RSTICK_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_DPAD_LEFT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_DPAD_LEFT,
_360_JOY_BUTTON_DPAD_LEFT); _360_JOY_BUTTON_DPAD_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_DPAD_RIGHT, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_DPAD_RIGHT,
_360_JOY_BUTTON_DPAD_RIGHT); _360_JOY_BUTTON_DPAD_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_DPAD_UP, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_DPAD_UP,
_360_JOY_BUTTON_DPAD_UP); _360_JOY_BUTTON_DPAD_UP);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_DPAD_DOWN, PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_DPAD_DOWN,
_360_JOY_BUTTON_DPAD_DOWN); _360_JOY_BUTTON_DPAD_DOWN);
} }
@ -718,12 +718,12 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
// Set the number of possible joypad layouts that the user can switch // Set the number of possible joypad layouts that the user can switch
// between, and the number of actions // between, and the number of actions
InputManager.Initialise(1, 3, MINECRAFT_ACTION_MAX, ACTION_MAX_MENU); PlatformInput.Initialise(1, 3, MINECRAFT_ACTION_MAX, ACTION_MAX_MENU);
// Set the default joypad action mappings for Minecraft // Set the default joypad action mappings for Minecraft
DefineActions(); DefineActions();
InputManager.SetJoypadMapVal(0, 0); PlatformInput.SetJoypadMapVal(0, 0);
InputManager.SetKeyRepeatRate(0.3f, 0.2f); PlatformInput.SetKeyRepeatRate(0.3f, 0.2f);
// Initialise the profile manager with the game Title ID, Offer ID, a // Initialise the profile manager with the game Title ID, Offer ID, a
// profile version number, and the number of profile values and settings // profile version number, and the number of profile values and settings
@ -790,7 +790,7 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
// } // }
app.UpdateTime(); app.UpdateTime();
InputManager.Tick(); PlatformInput.Tick();
// ProfileManager.Tick(); // ProfileManager.Tick();

View file

@ -13,7 +13,7 @@
#include <ctime> #include <ctime>
#include <thread> #include <thread>
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Profile.h" #include "platform/sdl2/Profile.h"
#include "platform/sdl2/Render.h" #include "platform/sdl2/Render.h"
#include "platform/sdl2/Storage.h" #include "platform/sdl2/Storage.h"
@ -104,7 +104,7 @@
#if defined(ENABLE_JAVA_GUIS) #if defined(ENABLE_JAVA_GUIS)
#include "minecraft/client/gui/inventory/CreativeInventoryScreen.h" #include "minecraft/client/gui/inventory/CreativeInventoryScreen.h"
#endif #endif
#include "platform/sdl2/Input.h" #include "platform/input/input.h"
#include "app/common/Minecraft_Macros.h" #include "app/common/Minecraft_Macros.h"
#include "app/common/Colours/ColourTable.h" #include "app/common/Colours/ColourTable.h"
#include "app/common/ConsoleGameMode.h" #include "app/common/ConsoleGameMode.h"
@ -560,11 +560,11 @@ void Minecraft::setScreen(Screen* screen) {
#if defined(ENABLE_JAVA_GUIS) #if defined(ENABLE_JAVA_GUIS)
if (screen != nullptr && player != nullptr) { if (screen != nullptr && player != nullptr) {
if (player && player->GetXboxPad() != -1) { if (player && player->GetXboxPad() != -1) {
InputManager.SetMenuDisplayed(player->GetXboxPad(), true); PlatformInput.SetMenuDisplayed(player->GetXboxPad(), true);
} }
} else if (player != nullptr) { } else if (player != nullptr) {
if (player && player->GetXboxPad() != -1) { if (player && player->GetXboxPad() != -1) {
InputManager.SetMenuDisplayed(player->GetXboxPad(), false); PlatformInput.SetMenuDisplayed(player->GetXboxPad(), false);
} }
} }
#endif #endif
@ -634,11 +634,11 @@ void Minecraft::destroy() {
#if defined(ENABLE_JAVA_GUIS) #if defined(ENABLE_JAVA_GUIS)
if (screen != nullptr) { if (screen != nullptr) {
if (player && player->GetXboxPad() != -1) { if (player && player->GetXboxPad() != -1) {
InputManager.SetMenuDisplayed(player->GetXboxPad(), true); PlatformInput.SetMenuDisplayed(player->GetXboxPad(), true);
} }
} else { } else {
if (player && player->GetXboxPad() != -1) { if (player && player->GetXboxPad() != -1) {
InputManager.SetMenuDisplayed(player->GetXboxPad(), false); PlatformInput.SetMenuDisplayed(player->GetXboxPad(), false);
} }
} }
#endif #endif
@ -716,7 +716,7 @@ void Minecraft::updatePlayerViewportAssignments() {
for (int i = 0; i < XUSER_MAX_COUNT; i++) { for (int i = 0; i < XUSER_MAX_COUNT; i++) {
if (localplayers[i] != nullptr) { if (localplayers[i] != nullptr) {
// Primary player settings decide what the mode is // Primary player settings decide what the mode is
if (gameServices().getGameSettings(InputManager.GetPrimaryPad(), if (gameServices().getGameSettings(PlatformInput.GetPrimaryPad(),
eGameSetting_SplitScreenVertical)) { eGameSetting_SplitScreenVertical)) {
localplayers[i]->m_iScreenSection = localplayers[i]->m_iScreenSection =
C4JRender::VIEWPORT_TYPE_SPLIT_LEFT + found; C4JRender::VIEWPORT_TYPE_SPLIT_LEFT + found;
@ -983,7 +983,7 @@ void Minecraft::removeLocalPlayerIdx(int idx) {
} }
localplayers[idx] = nullptr; localplayers[idx] = nullptr;
if (idx == InputManager.GetPrimaryPad()) { if (idx == PlatformInput.GetPrimaryPad()) {
// We should never try to remove the Primary player in this way // We should never try to remove the Primary player in this way
assert(false); assert(false);
/* /*
@ -1014,9 +1014,9 @@ void Minecraft::createPrimaryLocalPlayer(int iPad) {
localplayers[iPad] = player; localplayers[iPad] = player;
// gameRenderer->itemInHandRenderer = localitemInHandRenderers[iPad]; // gameRenderer->itemInHandRenderer = localitemInHandRenderers[iPad];
// Give them the gamertag if they're signed in // Give them the gamertag if they're signed in
if (ProfileManager.IsSignedIn(InputManager.GetPrimaryPad())) { if (ProfileManager.IsSignedIn(PlatformInput.GetPrimaryPad())) {
user->name = convStringToWstring( user->name = convStringToWstring(
ProfileManager.GetGamertag(InputManager.GetPrimaryPad())); ProfileManager.GetGamertag(PlatformInput.GetPrimaryPad()));
} }
} }
@ -1076,17 +1076,17 @@ void Minecraft::run_middle() {
// player has a app action running , or has any crafting // player has a app action running , or has any crafting
// or containers open, don't autosave // or containers open, don't autosave
if (!StorageManager.GetSaveDisabled() && if (!StorageManager.GetSaveDisabled() &&
(gameServices().getXuiAction(InputManager.GetPrimaryPad()) == (gameServices().getXuiAction(PlatformInput.GetPrimaryPad()) ==
eAppAction_Idle)) { eAppAction_Idle)) {
if (!ui.IsPauseMenuDisplayed( if (!ui.IsPauseMenuDisplayed(
InputManager.GetPrimaryPad()) && PlatformInput.GetPrimaryPad()) &&
!ui.IsIgnoreAutosaveMenuDisplayed( !ui.IsIgnoreAutosaveMenuDisplayed(
InputManager.GetPrimaryPad())) { PlatformInput.GetPrimaryPad())) {
// check if the autotimer countdown has reached // check if the autotimer countdown has reached
// zero // zero
unsigned char ucAutosaveVal = unsigned char ucAutosaveVal =
gameServices().getGameSettings( gameServices().getGameSettings(
InputManager.GetPrimaryPad(), PlatformInput.GetPrimaryPad(),
eGameSetting_Autosave); eGameSetting_Autosave);
bool bTrialTexturepack = false; bool bTrialTexturepack = false;
if (!Minecraft::GetInstance() if (!Minecraft::GetInstance()
@ -1123,7 +1123,7 @@ void Minecraft::run_middle() {
Log::info("+++Autosave\n"); Log::info("+++Autosave\n");
Log::info("+++++++++++\n"); Log::info("+++++++++++\n");
gameServices().setAction( gameServices().setAction(
InputManager.GetPrimaryPad(), PlatformInput.GetPrimaryPad(),
eAppAction_AutosaveSaveGame); eAppAction_AutosaveSaveGame);
// gameServices().setAutosaveTimerTime(); // gameServices().setAutosaveTimerTime();
#if !defined(_CONTENT_PACKAGE) #if !defined(_CONTENT_PACKAGE)
@ -1219,7 +1219,7 @@ void Minecraft::run_middle() {
if (gameServices().isLocalMultiplayerAvailable()) { if (gameServices().isLocalMultiplayerAvailable()) {
for (int i = 0; i < XUSER_MAX_COUNT; i++) { for (int i = 0; i < XUSER_MAX_COUNT; i++) {
if ((localplayers[i] == nullptr) && if ((localplayers[i] == nullptr) &&
InputManager.IsPadConnected(i)) { PlatformInput.IsPadConnected(i)) {
if (!ui.PressStartPlaying(i)) { if (!ui.PressStartPlaying(i)) {
ui.ShowPressStart(i); ui.ShowPressStart(i);
} }
@ -1236,27 +1236,27 @@ void Minecraft::run_middle() {
for (int i = 0; i < XUSER_MAX_COUNT; i++) { for (int i = 0; i < XUSER_MAX_COUNT; i++) {
if (localplayers[i]) { if (localplayers[i]) {
// 4J-PB - add these to check for coming out of idle // 4J-PB - add these to check for coming out of idle
if (InputManager.ButtonPressed(i, if (PlatformInput.ButtonPressed(i,
MINECRAFT_ACTION_JUMP)) MINECRAFT_ACTION_JUMP))
localplayers[i]->ullButtonsPressed |= localplayers[i]->ullButtonsPressed |=
1LL << MINECRAFT_ACTION_JUMP; 1LL << MINECRAFT_ACTION_JUMP;
if (InputManager.ButtonPressed(i, MINECRAFT_ACTION_USE)) if (PlatformInput.ButtonPressed(i, MINECRAFT_ACTION_USE))
localplayers[i]->ullButtonsPressed |= localplayers[i]->ullButtonsPressed |=
1LL << MINECRAFT_ACTION_USE; 1LL << MINECRAFT_ACTION_USE;
if (InputManager.ButtonPressed( if (PlatformInput.ButtonPressed(
i, MINECRAFT_ACTION_INVENTORY)) i, MINECRAFT_ACTION_INVENTORY))
localplayers[i]->ullButtonsPressed |= localplayers[i]->ullButtonsPressed |=
1LL << MINECRAFT_ACTION_INVENTORY; 1LL << MINECRAFT_ACTION_INVENTORY;
if (InputManager.ButtonPressed(i, if (PlatformInput.ButtonPressed(i,
MINECRAFT_ACTION_ACTION)) MINECRAFT_ACTION_ACTION))
localplayers[i]->ullButtonsPressed |= localplayers[i]->ullButtonsPressed |=
1LL << MINECRAFT_ACTION_ACTION; 1LL << MINECRAFT_ACTION_ACTION;
if (InputManager.ButtonPressed( if (PlatformInput.ButtonPressed(
i, MINECRAFT_ACTION_CRAFTING)) i, MINECRAFT_ACTION_CRAFTING))
localplayers[i]->ullButtonsPressed |= localplayers[i]->ullButtonsPressed |=
1LL << MINECRAFT_ACTION_CRAFTING; 1LL << MINECRAFT_ACTION_CRAFTING;
if (InputManager.ButtonPressed( if (PlatformInput.ButtonPressed(
i, MINECRAFT_ACTION_PAUSEMENU)) { i, MINECRAFT_ACTION_PAUSEMENU)) {
localplayers[i]->ullButtonsPressed |= localplayers[i]->ullButtonsPressed |=
1LL << MINECRAFT_ACTION_PAUSEMENU; 1LL << MINECRAFT_ACTION_PAUSEMENU;
@ -1267,7 +1267,7 @@ void Minecraft::run_middle() {
pauseGame(); pauseGame();
#endif #endif
} }
if (InputManager.ButtonPressed(i, if (PlatformInput.ButtonPressed(i,
MINECRAFT_ACTION_DROP)) MINECRAFT_ACTION_DROP))
localplayers[i]->ullButtonsPressed |= localplayers[i]->ullButtonsPressed |=
1LL << MINECRAFT_ACTION_DROP; 1LL << MINECRAFT_ACTION_DROP;
@ -1275,21 +1275,21 @@ void Minecraft::run_middle() {
// 4J-PB - If we're flying, the sneak needs to be held // 4J-PB - If we're flying, the sneak needs to be held
// on to go down // on to go down
if (localplayers[i]->abilities.flying) { if (localplayers[i]->abilities.flying) {
if (InputManager.ButtonDown( if (PlatformInput.ButtonDown(
i, MINECRAFT_ACTION_SNEAK_TOGGLE)) i, MINECRAFT_ACTION_SNEAK_TOGGLE))
localplayers[i]->ullButtonsPressed |= localplayers[i]->ullButtonsPressed |=
1LL << MINECRAFT_ACTION_SNEAK_TOGGLE; 1LL << MINECRAFT_ACTION_SNEAK_TOGGLE;
} else { } else {
if (InputManager.ButtonPressed( if (PlatformInput.ButtonPressed(
i, MINECRAFT_ACTION_SNEAK_TOGGLE)) i, MINECRAFT_ACTION_SNEAK_TOGGLE))
localplayers[i]->ullButtonsPressed |= localplayers[i]->ullButtonsPressed |=
1LL << MINECRAFT_ACTION_SNEAK_TOGGLE; 1LL << MINECRAFT_ACTION_SNEAK_TOGGLE;
} }
if (InputManager.ButtonPressed( if (PlatformInput.ButtonPressed(
i, MINECRAFT_ACTION_RENDER_THIRD_PERSON)) i, MINECRAFT_ACTION_RENDER_THIRD_PERSON))
localplayers[i]->ullButtonsPressed |= localplayers[i]->ullButtonsPressed |=
1LL << MINECRAFT_ACTION_RENDER_THIRD_PERSON; 1LL << MINECRAFT_ACTION_RENDER_THIRD_PERSON;
if (InputManager.ButtonPressed( if (PlatformInput.ButtonPressed(
i, MINECRAFT_ACTION_GAME_INFO)) i, MINECRAFT_ACTION_GAME_INFO))
localplayers[i]->ullButtonsPressed |= localplayers[i]->ullButtonsPressed |=
1LL << MINECRAFT_ACTION_GAME_INFO; 1LL << MINECRAFT_ACTION_GAME_INFO;
@ -1299,19 +1299,19 @@ void Minecraft::run_middle() {
localplayers[i]->ullDpad_last = 0; localplayers[i]->ullDpad_last = 0;
localplayers[i]->ullDpad_this = 0; localplayers[i]->ullDpad_this = 0;
localplayers[i]->ullDpad_filtered = 0; localplayers[i]->ullDpad_filtered = 0;
if (InputManager.ButtonPressed( if (PlatformInput.ButtonPressed(
i, MINECRAFT_ACTION_DPAD_RIGHT)) i, MINECRAFT_ACTION_DPAD_RIGHT))
localplayers[i]->ullButtonsPressed |= localplayers[i]->ullButtonsPressed |=
1LL << MINECRAFT_ACTION_CHANGE_SKIN; 1LL << MINECRAFT_ACTION_CHANGE_SKIN;
if (InputManager.ButtonPressed( if (PlatformInput.ButtonPressed(
i, MINECRAFT_ACTION_DPAD_UP)) i, MINECRAFT_ACTION_DPAD_UP))
localplayers[i]->ullButtonsPressed |= localplayers[i]->ullButtonsPressed |=
1LL << MINECRAFT_ACTION_FLY_TOGGLE; 1LL << MINECRAFT_ACTION_FLY_TOGGLE;
if (InputManager.ButtonPressed( if (PlatformInput.ButtonPressed(
i, MINECRAFT_ACTION_DPAD_DOWN)) i, MINECRAFT_ACTION_DPAD_DOWN))
localplayers[i]->ullButtonsPressed |= localplayers[i]->ullButtonsPressed |=
1LL << MINECRAFT_ACTION_RENDER_DEBUG; 1LL << MINECRAFT_ACTION_RENDER_DEBUG;
if (InputManager.ButtonPressed( if (PlatformInput.ButtonPressed(
i, MINECRAFT_ACTION_DPAD_LEFT)) i, MINECRAFT_ACTION_DPAD_LEFT))
localplayers[i]->ullButtonsPressed |= localplayers[i]->ullButtonsPressed |=
1LL << MINECRAFT_ACTION_SPAWN_CREEPER; 1LL << MINECRAFT_ACTION_SPAWN_CREEPER;
@ -1328,25 +1328,25 @@ void Minecraft::run_middle() {
localplayers[i]->ullDpad_this = 0; localplayers[i]->ullDpad_this = 0;
int dirCount = 0; int dirCount = 0;
if (InputManager.ButtonDown( if (PlatformInput.ButtonDown(
i, MINECRAFT_ACTION_DPAD_LEFT)) { i, MINECRAFT_ACTION_DPAD_LEFT)) {
localplayers[i]->ullDpad_this |= localplayers[i]->ullDpad_this |=
1LL << MINECRAFT_ACTION_DPAD_LEFT; 1LL << MINECRAFT_ACTION_DPAD_LEFT;
dirCount++; dirCount++;
} }
if (InputManager.ButtonDown( if (PlatformInput.ButtonDown(
i, MINECRAFT_ACTION_DPAD_RIGHT)) { i, MINECRAFT_ACTION_DPAD_RIGHT)) {
localplayers[i]->ullDpad_this |= localplayers[i]->ullDpad_this |=
1LL << MINECRAFT_ACTION_DPAD_RIGHT; 1LL << MINECRAFT_ACTION_DPAD_RIGHT;
dirCount++; dirCount++;
} }
if (InputManager.ButtonDown( if (PlatformInput.ButtonDown(
i, MINECRAFT_ACTION_DPAD_UP)) { i, MINECRAFT_ACTION_DPAD_UP)) {
localplayers[i]->ullDpad_this |= localplayers[i]->ullDpad_this |=
1LL << MINECRAFT_ACTION_DPAD_UP; 1LL << MINECRAFT_ACTION_DPAD_UP;
dirCount++; dirCount++;
} }
if (InputManager.ButtonDown( if (PlatformInput.ButtonDown(
i, MINECRAFT_ACTION_DPAD_DOWN)) { i, MINECRAFT_ACTION_DPAD_DOWN)) {
localplayers[i]->ullDpad_this |= localplayers[i]->ullDpad_this |=
1LL << MINECRAFT_ACTION_DPAD_DOWN; 1LL << MINECRAFT_ACTION_DPAD_DOWN;
@ -1365,12 +1365,12 @@ void Minecraft::run_middle() {
} }
// for the opacity timer // for the opacity timer
if (InputManager.ButtonPressed( if (PlatformInput.ButtonPressed(
i, MINECRAFT_ACTION_LEFT_SCROLL) || i, MINECRAFT_ACTION_LEFT_SCROLL) ||
InputManager.ButtonPressed( PlatformInput.ButtonPressed(
i, MINECRAFT_ACTION_RIGHT_SCROLL)) i, MINECRAFT_ACTION_RIGHT_SCROLL))
// InputManager.ButtonPressed(i, MINECRAFT_ACTION_USE) // PlatformInput.ButtonPressed(i, MINECRAFT_ACTION_USE)
// || InputManager.ButtonPressed(i, // || PlatformInput.ButtonPressed(i,
// MINECRAFT_ACTION_ACTION)) // MINECRAFT_ACTION_ACTION))
{ {
gameServices().setOpacityTimer(i); gameServices().setOpacityTimer(i);
@ -1382,10 +1382,10 @@ void Minecraft::run_middle() {
// exist? They'll be wanting to join the game then // exist? They'll be wanting to join the game then
bool tryJoin = !pause && bool tryJoin = !pause &&
!ui.IsIgnorePlayerJoinMenuDisplayed( !ui.IsIgnorePlayerJoinMenuDisplayed(
InputManager.GetPrimaryPad()) && PlatformInput.GetPrimaryPad()) &&
g_NetworkManager.SessionHasSpace() && g_NetworkManager.SessionHasSpace() &&
RenderManager.IsHiDef() && RenderManager.IsHiDef() &&
InputManager.ButtonPressed(i); PlatformInput.ButtonPressed(i);
if (tryJoin) { if (tryJoin) {
if (!ui.PressStartPlaying(i)) { if (!ui.PressStartPlaying(i)) {
ui.ShowPressStart(i); ui.ShowPressStart(i);
@ -1393,7 +1393,7 @@ void Minecraft::run_middle() {
// did we just get input from a player who // did we just get input from a player who
// doesn't exist? They'll be wanting to join the // doesn't exist? They'll be wanting to join the
// game then // game then
if (InputManager.ButtonPressed( if (PlatformInput.ButtonPressed(
i, MINECRAFT_ACTION_PAUSEMENU)) { i, MINECRAFT_ACTION_PAUSEMENU)) {
// Let them join // Let them join
@ -1539,7 +1539,7 @@ void Minecraft::run_middle() {
// twice with the same time - let's tick the inputmanager // twice with the same time - let's tick the inputmanager
// again // again
if (i != 0) { if (i != 0) {
InputManager.Tick(); PlatformInput.Tick();
gameServices().handleButtonPresses(); gameServices().handleButtonPresses();
} }
@ -1559,13 +1559,13 @@ void Minecraft::run_middle() {
if (localplayers[idx] != nullptr) { if (localplayers[idx] != nullptr) {
// any input received? // any input received?
if ((localplayers[idx]->ullButtonsPressed != 0) || if ((localplayers[idx]->ullButtonsPressed != 0) ||
InputManager.GetJoypadStick_LX(idx, false) != PlatformInput.GetJoypadStick_LX(idx, false) !=
0.0f || 0.0f ||
InputManager.GetJoypadStick_LY(idx, false) != PlatformInput.GetJoypadStick_LY(idx, false) !=
0.0f || 0.0f ||
InputManager.GetJoypadStick_RX(idx, false) != PlatformInput.GetJoypadStick_RX(idx, false) !=
0.0f || 0.0f ||
InputManager.GetJoypadStick_RY(idx, false) != PlatformInput.GetJoypadStick_RY(idx, false) !=
0.0f) { 0.0f) {
localplayers[idx]->ResetInactiveTicks(); localplayers[idx]->ResetInactiveTicks();
} else { } else {
@ -1602,7 +1602,7 @@ void Minecraft::run_middle() {
ui.HandleGameTick(); ui.HandleGameTick();
setLocalPlayerIdx(InputManager.GetPrimaryPad()); setLocalPlayerIdx(PlatformInput.GetPrimaryPad());
// 4J - added - now do the equivalent of level::animateTick, // 4J - added - now do the equivalent of level::animateTick,
// but taking into account the positions of all our players // but taking into account the positions of all our players
@ -1648,7 +1648,7 @@ void Minecraft::run_middle() {
if (!noRender) { if (!noRender) {
bool bFirst = true; bool bFirst = true;
int iPrimaryPad = InputManager.GetPrimaryPad(); int iPrimaryPad = PlatformInput.GetPrimaryPad();
for (int i = 0; i < XUSER_MAX_COUNT; i++) { for (int i = 0; i < XUSER_MAX_COUNT; i++) {
if (setLocalPlayerIdx(i)) { if (setLocalPlayerIdx(i)) {
RenderManager.StateSetViewport( RenderManager.StateSetViewport(
@ -2082,14 +2082,14 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) {
int* piUse; int* piUse;
int* piAlt; int* piAlt;
unsigned int uiAction = InputManager.GetGameJoypadMaps( unsigned int uiAction = PlatformInput.GetGameJoypadMaps(
InputManager.GetJoypadMapVal(iPad), MINECRAFT_ACTION_ACTION); PlatformInput.GetJoypadMapVal(iPad), MINECRAFT_ACTION_ACTION);
unsigned int uiJump = InputManager.GetGameJoypadMaps( unsigned int uiJump = PlatformInput.GetGameJoypadMaps(
InputManager.GetJoypadMapVal(iPad), MINECRAFT_ACTION_JUMP); PlatformInput.GetJoypadMapVal(iPad), MINECRAFT_ACTION_JUMP);
unsigned int uiUse = InputManager.GetGameJoypadMaps( unsigned int uiUse = PlatformInput.GetGameJoypadMaps(
InputManager.GetJoypadMapVal(iPad), MINECRAFT_ACTION_USE); PlatformInput.GetJoypadMapVal(iPad), MINECRAFT_ACTION_USE);
unsigned int uiAlt = InputManager.GetGameJoypadMaps( unsigned int uiAlt = PlatformInput.GetGameJoypadMaps(
InputManager.GetJoypadMapVal(iPad), MINECRAFT_ACTION_SNEAK_TOGGLE); PlatformInput.GetJoypadMapVal(iPad), MINECRAFT_ACTION_SNEAK_TOGGLE);
// Also need to handle PS3 having swapped triggers/bumpers // Also need to handle PS3 having swapped triggers/bumpers
switch (uiAction) { switch (uiAction) {
@ -3228,9 +3228,9 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) {
int wheel = 0; int wheel = 0;
unsigned int leftTicks = unsigned int leftTicks =
InputManager.GetValue(iPad, MINECRAFT_ACTION_LEFT_SCROLL, true); PlatformInput.GetValue(iPad, MINECRAFT_ACTION_LEFT_SCROLL, true);
unsigned int rightTicks = unsigned int rightTicks =
InputManager.GetValue(iPad, MINECRAFT_ACTION_RIGHT_SCROLL, true); PlatformInput.GetValue(iPad, MINECRAFT_ACTION_RIGHT_SCROLL, true);
if (leftTicks > 0 && if (leftTicks > 0 &&
gameMode->isInputAllowed(MINECRAFT_ACTION_LEFT_SCROLL)) { gameMode->isInputAllowed(MINECRAFT_ACTION_LEFT_SCROLL)) {
wheel = (int)leftTicks; // positive = left wheel = (int)leftTicks; // positive = left
@ -3261,21 +3261,21 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) {
if (gameMode->isInputAllowed(MINECRAFT_ACTION_ACTION)) { if (gameMode->isInputAllowed(MINECRAFT_ACTION_ACTION)) {
if ((player->ullButtonsPressed & (1LL << MINECRAFT_ACTION_ACTION))) if ((player->ullButtonsPressed & (1LL << MINECRAFT_ACTION_ACTION)))
// if(InputManager.ButtonPressed(iPad, MINECRAFT_ACTION_ACTION) ) // if(PlatformInput.ButtonPressed(iPad, MINECRAFT_ACTION_ACTION) )
{ {
// printf("MINECRAFT_ACTION_ACTION ButtonPressed"); // printf("MINECRAFT_ACTION_ACTION ButtonPressed");
player->handleMouseClick(0); player->handleMouseClick(0);
player->lastClickTick[0] = ticks; player->lastClickTick[0] = ticks;
} }
if (InputManager.ButtonDown(iPad, MINECRAFT_ACTION_ACTION) && if (PlatformInput.ButtonDown(iPad, MINECRAFT_ACTION_ACTION) &&
ticks - player->lastClickTick[0] >= timer->ticksPerSecond / 4) { ticks - player->lastClickTick[0] >= timer->ticksPerSecond / 4) {
// printf("MINECRAFT_ACTION_ACTION ButtonDown"); // printf("MINECRAFT_ACTION_ACTION ButtonDown");
player->handleMouseClick(0); player->handleMouseClick(0);
player->lastClickTick[0] = ticks; player->lastClickTick[0] = ticks;
} }
if (InputManager.ButtonDown(iPad, MINECRAFT_ACTION_ACTION)) { if (PlatformInput.ButtonDown(iPad, MINECRAFT_ACTION_ACTION)) {
player->handleMouseDown(0, true); player->handleMouseDown(0, true);
} else { } else {
player->handleMouseDown(0, false); player->handleMouseDown(0, false);
@ -3287,7 +3287,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) {
// Java game does it, however we may find that the way we had it // Java game does it, however we may find that the way we had it
// previously is more fun to play. // previously is more fun to play.
/* /*
if ((InputManager.GetValue(iPad, MINECRAFT_ACTION_USE,true)>0) && if ((PlatformInput.GetValue(iPad, MINECRAFT_ACTION_USE,true)>0) &&
gameMode->isInputAllowed(MINECRAFT_ACTION_USE) ) gameMode->isInputAllowed(MINECRAFT_ACTION_USE) )
{ {
handleMouseClick(1); handleMouseClick(1);
@ -3295,14 +3295,14 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) {
} }
*/ */
if (player->isUsingItem()) { if (player->isUsingItem()) {
if (!InputManager.ButtonDown(iPad, MINECRAFT_ACTION_USE)) if (!PlatformInput.ButtonDown(iPad, MINECRAFT_ACTION_USE))
gameMode->releaseUsingItem(player); gameMode->releaseUsingItem(player);
} else if (gameMode->isInputAllowed(MINECRAFT_ACTION_USE)) { } else if (gameMode->isInputAllowed(MINECRAFT_ACTION_USE)) {
if (player->abilities.instabuild) { if (player->abilities.instabuild) {
// 4J - attempt to handle click in special creative mode fashion // 4J - attempt to handle click in special creative mode fashion
// if possible (used for placing blocks at regular intervals) // if possible (used for placing blocks at regular intervals)
bool didClick = player->creativeModeHandleMouseClick( bool didClick = player->creativeModeHandleMouseClick(
1, InputManager.ButtonDown(iPad, MINECRAFT_ACTION_USE)); 1, PlatformInput.ButtonDown(iPad, MINECRAFT_ACTION_USE));
// If this handler has put us in lastClick_oldRepeat mode then // If this handler has put us in lastClick_oldRepeat mode then
// it is because we aren't placing blocks - behave largely as // it is because we aren't placing blocks - behave largely as
// the code used to // the code used to
@ -3316,7 +3316,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) {
} else { } else {
// Otherwise just the original game code for handling // Otherwise just the original game code for handling
// autorepeat // autorepeat
if (InputManager.ButtonDown(iPad, if (PlatformInput.ButtonDown(iPad,
MINECRAFT_ACTION_USE) && MINECRAFT_ACTION_USE) &&
ticks - player->lastClickTick[1] >= ticks - player->lastClickTick[1] >=
timer->ticksPerSecond / 4) { timer->ticksPerSecond / 4) {
@ -3339,7 +3339,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) {
if (player->isRiding() || player->isSprinting() || if (player->isRiding() || player->isSprinting() ||
player->isSleeping()) player->isSleeping())
autoRepeat = false; autoRepeat = false;
if (InputManager.ButtonDown(iPad, MINECRAFT_ACTION_USE)) { if (PlatformInput.ButtonDown(iPad, MINECRAFT_ACTION_USE)) {
// If the player has just exited a bed, then delay the time // If the player has just exited a bed, then delay the time
// before a repeat key is allowed without releasing // before a repeat key is allowed without releasing
if (player->isSleeping()) if (player->isSleeping())
@ -3376,7 +3376,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) {
#if defined(_DEBUG_MENUS_ENABLED) #if defined(_DEBUG_MENUS_ENABLED)
if (gameServices().debugSettingsOn()) { if (gameServices().debugSettingsOn()) {
// 4J-PB - debugoverlay for primary player only // 4J-PB - debugoverlay for primary player only
if (iPad == InputManager.GetPrimaryPad()) { if (iPad == PlatformInput.GetPrimaryPad()) {
if ((player->ullButtonsPressed & if ((player->ullButtonsPressed &
(1LL << MINECRAFT_ACTION_RENDER_DEBUG))) { (1LL << MINECRAFT_ACTION_RENDER_DEBUG))) {
#if !defined(_CONTENT_PACKAGE) #if !defined(_CONTENT_PACKAGE)
@ -3498,7 +3498,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) {
bool selected = false; bool selected = false;
{ {
int hotbarSlot = InputManager.GetHotbarSlotPressed(iPad); int hotbarSlot = PlatformInput.GetHotbarSlotPressed(iPad);
if (hotbarSlot >= 0 && hotbarSlot <= 9) { if (hotbarSlot >= 0 && hotbarSlot <= 9) {
player->inventory->selected = hotbarSlot; player->inventory->selected = hotbarSlot;
selected = true; selected = true;
@ -3525,7 +3525,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) {
} }
} else { } else {
// 4J-PB // 4J-PB
// if (InputManager.GetValue(iPad, ACTION_MENU_CANCEL) > 0 && // if (PlatformInput.GetValue(iPad, ACTION_MENU_CANCEL) > 0 &&
// gameMode->isInputAllowed(ACTION_MENU_CANCEL)) { // gameMode->isInputAllowed(ACTION_MENU_CANCEL)) {
// setScreen(nullptr); // setScreen(nullptr);
// } // }
@ -3536,7 +3536,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) {
// if(!(ui.GetMenuDisplayed(iPad))) // if(!(ui.GetMenuDisplayed(iPad)))
// { // {
// wchar_t wchInput; // wchar_t wchInput;
// if(InputManager.InputDetected(iPad,&wchInput)) // if(PlatformInput.InputDetected(iPad,&wchInput))
// { // {
// printf("Input Detected!\n"); // printf("Input Detected!\n");
// //
@ -3839,7 +3839,7 @@ void Minecraft::setLevel(MultiPlayerLevel* level, int message /*=-1*/,
// If no player has been set, then this is the first level to be set // If no player has been set, then this is the first level to be set
// this game, so set up a primary player & initialise some other things // this game, so set up a primary player & initialise some other things
if (player == nullptr) { if (player == nullptr) {
int iPrimaryPlayer = InputManager.GetPrimaryPad(); int iPrimaryPlayer = PlatformInput.GetPrimaryPad();
player = gameMode->createPlayer(level); player = gameMode->createPlayer(level);
@ -4053,11 +4053,11 @@ void Minecraft::respawnPlayer(int iPad, int dimension, int newEntityId) {
cameraTargetPlayer = player; cameraTargetPlayer = player;
// 4J-PB - are we the primary player or a local player? // 4J-PB - are we the primary player or a local player?
if (iPad == InputManager.GetPrimaryPad()) { if (iPad == PlatformInput.GetPrimaryPad()) {
createPrimaryLocalPlayer(iPad); createPrimaryLocalPlayer(iPad);
// update the debugoptions // update the debugoptions
gameServices().setGameSettingsDebugMask(InputManager.GetPrimaryPad(), gameServices().setGameSettingsDebugMask(PlatformInput.GetPrimaryPad(),
gameServices().debugGetMask(-1, true)); gameServices().debugGetMask(-1, true));
} else { } else {
storeExtraLocalPlayer(iPad); storeExtraLocalPlayer(iPad);
@ -4498,7 +4498,7 @@ int Minecraft::InGame_SignInReturned(void* pParam, bool bContinue, int iPad) {
} }
} }
} else if (ProfileManager.IsSignedInLive( } else if (ProfileManager.IsSignedInLive(
InputManager.GetPrimaryPad()) && PlatformInput.GetPrimaryPad()) &&
!ProfileManager.AllowedToPlayMultiplayer(iPad)) { !ProfileManager.AllowedToPlayMultiplayer(iPad)) {
// 4J Stu - Don't allow converting to guests as we don't allow // 4J Stu - Don't allow converting to guests as we don't allow
// any guest sign-in while in the game Fix for #66516 - TCR // any guest sign-in while in the game Fix for #66516 - TCR

View file

@ -5,7 +5,7 @@
#include <algorithm> #include <algorithm>
#include "platform/PlatformTypes.h" #include "platform/PlatformTypes.h"
#include "platform/sdl2/Input.h" #include "platform/input/input.h"
#include "platform/sdl2/Render.h" #include "platform/sdl2/Render.h"
#include "Facing.h" #include "Facing.h"
#include "minecraft/GameEnums.h" #include "minecraft/GameEnums.h"
@ -335,7 +335,7 @@ void Gui::render(float a, bool mouseFree, int xMouse, int yMouse) {
// 4J - this is where to set the blend factor for gui things // 4J - this is where to set the blend factor for gui things
// use the primary player's settings // use the primary player's settings
unsigned char ucAlpha = gameServices().getGameSettings( unsigned char ucAlpha = gameServices().getGameSettings(
InputManager.GetPrimaryPad(), eGameSetting_InterfaceOpacity); PlatformInput.GetPrimaryPad(), eGameSetting_InterfaceOpacity);
// If the user has started to navigate their quickselect bar, ignore the // If the user has started to navigate their quickselect bar, ignore the
// alpha setting, and display at default value // alpha setting, and display at default value

View file

@ -8,7 +8,7 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "platform/sdl2/Input.h" #include "platform/input/input.h"
#include "Button.h" #include "Button.h"
#include "MessageScreen.h" #include "MessageScreen.h"
#include "minecraft/GameEnums.h" #include "minecraft/GameEnums.h"
@ -33,7 +33,7 @@ void PauseScreen::init() {
// 4jcraft: solves the issue of client-side only pausing in the java gui // 4jcraft: solves the issue of client-side only pausing in the java gui
if (g_NetworkManager.IsLocalGame() && if (g_NetworkManager.IsLocalGame() &&
g_NetworkManager.GetPlayerCount() == 1) g_NetworkManager.GetPlayerCount() == 1)
gameServices().setXuiServerAction(InputManager.GetPrimaryPad(), gameServices().setXuiServerAction(PlatformInput.GetPrimaryPad(),
eXuiServerAction_PauseServer, (void*)true); eXuiServerAction_PauseServer, (void*)true);
buttons.push_back(new Button(1, width / 2 - 100, height / 4 + 24 * 5 + yo, buttons.push_back(new Button(1, width / 2 - 100, height / 4 + 24 * 5 + yo,
I18n::get(L"menu.returnToMenu"))); I18n::get(L"menu.returnToMenu")));
@ -91,7 +91,7 @@ void PauseScreen::buttonClicked(Button* button) {
exitWorld(minecraft, true); exitWorld(minecraft, true);
} }
if (button->id == 4) { if (button->id == 4) {
gameServices().setXuiServerAction(InputManager.GetPrimaryPad(), gameServices().setXuiServerAction(PlatformInput.GetPrimaryPad(),
eXuiServerAction_PauseServer, (void*)false); eXuiServerAction_PauseServer, (void*)false);
minecraft->setScreen(nullptr); minecraft->setScreen(nullptr);
// minecraft->grabMouse(); // 4J - removed // minecraft->grabMouse(); // 4J - removed

View file

@ -1,8 +1,8 @@
#include "minecraft/IGameServices.h" #include "minecraft/IGameServices.h"
#include "Screen.h" #include "Screen.h"
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Input.h" #include "platform/input/input.h"
#include "platform/sdl2/Profile.h" #include "platform/sdl2/Profile.h"
#include "Button.h" #include "Button.h"
#include "minecraft/GameEnums.h" #include "minecraft/GameEnums.h"
@ -44,7 +44,7 @@ void Screen::keyPressed(wchar_t eventCharacter, int eventKey) {
// unpausing is done in all scenarios // unpausing is done in all scenarios
if (g_NetworkManager.IsLocalGame() && if (g_NetworkManager.IsLocalGame() &&
g_NetworkManager.GetPlayerCount() == 1) g_NetworkManager.GetPlayerCount() == 1)
gameServices().setXuiServerAction(InputManager.GetPrimaryPad(), gameServices().setXuiServerAction(PlatformInput.GetPrimaryPad(),
eXuiServerAction_PauseServer, (void*)false); eXuiServerAction_PauseServer, (void*)false);
} }
} }
@ -108,14 +108,14 @@ void Screen::updateEvents() {
minecraft->height); minecraft->height);
int screenWidth = ssc.getWidth(); int screenWidth = ssc.getWidth();
int screenHeight = ssc.getHeight(); int screenHeight = ssc.getHeight();
int xMouse = InputManager.GetMouseX() * screenWidth / fbw; int xMouse = PlatformInput.GetMouseX() * screenWidth / fbw;
int yMouse = InputManager.GetMouseY() * screenHeight / fbh - 1; int yMouse = PlatformInput.GetMouseY() * screenHeight / fbh - 1;
static bool prevLeftState = false; static bool prevLeftState = false;
static bool prevRightState = false; static bool prevRightState = false;
bool leftState = InputManager.ButtonDown(0, MINECRAFT_ACTION_ACTION); bool leftState = PlatformInput.ButtonDown(0, MINECRAFT_ACTION_ACTION);
bool rightState = InputManager.ButtonDown(0, MINECRAFT_ACTION_USE); bool rightState = PlatformInput.ButtonDown(0, MINECRAFT_ACTION_USE);
if (leftState && !prevLeftState) { if (leftState && !prevLeftState) {
mouseClicked(xMouse, yMouse, 0); mouseClicked(xMouse, yMouse, 0);

View file

@ -6,8 +6,8 @@
#include <algorithm> #include <algorithm>
#include <string> #include <string>
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Input.h" #include "platform/input/input.h"
#include "platform/sdl2/Render.h" #include "platform/sdl2/Render.h"
#include "AbstractContainerScreen.h" #include "AbstractContainerScreen.h"
#include "app/common/UI/All Platforms/IUIScene_CreativeMenu.h" #include "app/common/UI/All Platforms/IUIScene_CreativeMenu.h"
@ -255,11 +255,11 @@ void CreativeInventoryScreen::updateEvents() {
int scrollableRows = totalRows - ROWS; int scrollableRows = totalRows - ROWS;
if (scrollableRows > 0) { if (scrollableRows > 0) {
float step = 1.0f / (float)scrollableRows; float step = 1.0f / (float)scrollableRows;
if (InputManager.ButtonDown(0, MINECRAFT_ACTION_LEFT_SCROLL)) { if (PlatformInput.ButtonDown(0, MINECRAFT_ACTION_LEFT_SCROLL)) {
currentScroll -= step; currentScroll -= step;
currentScroll = std::max(0.0f, std::min(1.0f, currentScroll)); currentScroll = std::max(0.0f, std::min(1.0f, currentScroll));
container->scrollTo(currentScroll); container->scrollTo(currentScroll);
} else if (InputManager.ButtonDown(0, } else if (PlatformInput.ButtonDown(0,
MINECRAFT_ACTION_RIGHT_SCROLL)) { MINECRAFT_ACTION_RIGHT_SCROLL)) {
currentScroll += step; currentScroll += step;
currentScroll = std::max(0.0f, std::min(1.0f, currentScroll)); currentScroll = std::max(0.0f, std::min(1.0f, currentScroll));

View file

@ -13,7 +13,7 @@
#include <unordered_set> #include <unordered_set>
#include "platform/PlatformTypes.h" #include "platform/PlatformTypes.h"
#include "platform/sdl2/Input.h" #include "platform/input/input.h"
#include "platform/sdl2/Profile.h" #include "platform/sdl2/Profile.h"
#include "minecraft/GameEnums.h" #include "minecraft/GameEnums.h"
#include "app/common/App_structs.h" #include "app/common/App_structs.h"
@ -228,7 +228,7 @@ ClientConnection::ClientConnection(Minecraft* minecraft, Socket* socket,
this->minecraft = minecraft; this->minecraft = minecraft;
if (iUserIndex < 0) { if (iUserIndex < 0) {
m_userIndex = InputManager.GetPrimaryPad(); m_userIndex = PlatformInput.GetPrimaryPad();
} else { } else {
m_userIndex = iUserIndex; m_userIndex = iUserIndex;
} }
@ -290,7 +290,7 @@ void ClientConnection::handleLogin(std::shared_ptr<LoginPacket> packet) {
INetworkPlayer* networkPlayer = connection->getSocket()->getPlayer(); INetworkPlayer* networkPlayer = connection->getSocket()->getPlayer();
int iUserID = -1; int iUserID = -1;
if (m_userIndex == InputManager.GetPrimaryPad()) { if (m_userIndex == PlatformInput.GetPrimaryPad()) {
iUserID = m_userIndex; iUserID = m_userIndex;
} else { } else {
if (!networkPlayer->IsGuest() && networkPlayer->IsLocal()) { if (!networkPlayer->IsGuest() && networkPlayer->IsLocal()) {
@ -346,13 +346,13 @@ void ClientConnection::handleLogin(std::shared_ptr<LoginPacket> packet) {
gameServices().setBanListCheck(iUserID, false); gameServices().setBanListCheck(iUserID, false);
} }
if (m_userIndex == InputManager.GetPrimaryPad()) { if (m_userIndex == PlatformInput.GetPrimaryPad()) {
if (gameServices().getTutorialMode()) { if (gameServices().getTutorialMode()) {
minecraft->gameMode = new FullTutorialMode( minecraft->gameMode = new FullTutorialMode(
InputManager.GetPrimaryPad(), minecraft, this); PlatformInput.GetPrimaryPad(), minecraft, this);
} else { } else {
minecraft->gameMode = new ConsoleGameMode( minecraft->gameMode = new ConsoleGameMode(
InputManager.GetPrimaryPad(), minecraft, this); PlatformInput.GetPrimaryPad(), minecraft, this);
} }
Level* dimensionLevel = minecraft->getLevel(packet->dimension); Level* dimensionLevel = minecraft->getLevel(packet->dimension);
@ -387,7 +387,7 @@ void ClientConnection::handleLogin(std::shared_ptr<LoginPacket> packet) {
minecraft->player->setCustomSkin(gameServices().getPlayerSkinId(m_userIndex)); minecraft->player->setCustomSkin(gameServices().getPlayerSkinId(m_userIndex));
minecraft->player->setCustomCape(gameServices().getPlayerCapeId(m_userIndex)); minecraft->player->setCustomCape(gameServices().getPlayerCapeId(m_userIndex));
minecraft->createPrimaryLocalPlayer(InputManager.GetPrimaryPad()); minecraft->createPrimaryLocalPlayer(PlatformInput.GetPrimaryPad());
minecraft->player->dimension = packet->dimension; minecraft->player->dimension = packet->dimension;
minecraft->setScreen(new ReceivingLevelScreen(this)); minecraft->setScreen(new ReceivingLevelScreen(this));
@ -412,7 +412,7 @@ void ClientConnection::handleLogin(std::shared_ptr<LoginPacket> packet) {
displayPrivilegeChanges(minecraft->player, startingPrivileges); displayPrivilegeChanges(minecraft->player, startingPrivileges);
// update the debugoptions // update the debugoptions
gameServices().setGameSettingsDebugMask(InputManager.GetPrimaryPad(), gameServices().setGameSettingsDebugMask(PlatformInput.GetPrimaryPad(),
gameServices().debugGetMask(-1, true)); gameServices().debugGetMask(-1, true));
} else { } else {
// 4J-PB - this isn't the level we want // 4J-PB - this isn't the level we want
@ -1362,12 +1362,12 @@ void ClientConnection::onDisconnect(DisconnectPacket::eDisconnectReason reason,
if (g_NetworkManager.IsHost() && if (g_NetworkManager.IsHost() &&
(reason == DisconnectPacket::eDisconnect_TimeOut || (reason == DisconnectPacket::eDisconnect_TimeOut ||
reason == DisconnectPacket::eDisconnect_Overflow) && reason == DisconnectPacket::eDisconnect_Overflow) &&
m_userIndex == InputManager.GetPrimaryPad() && m_userIndex == PlatformInput.GetPrimaryPad() &&
!MinecraftServer::saveOnExitAnswered()) { !MinecraftServer::saveOnExitAnswered()) {
unsigned int uiIDA[1]; unsigned int uiIDA[1];
uiIDA[0] = IDS_CONFIRM_OK; uiIDA[0] = IDS_CONFIRM_OK;
ui.RequestErrorMessage(IDS_EXITING_GAME, IDS_GENERIC_ERROR, uiIDA, 1, ui.RequestErrorMessage(IDS_EXITING_GAME, IDS_GENERIC_ERROR, uiIDA, 1,
InputManager.GetPrimaryPad(), PlatformInput.GetPrimaryPad(),
&ClientConnection::HostDisconnectReturned, &ClientConnection::HostDisconnectReturned,
nullptr); nullptr);
} else { } else {
@ -1936,7 +1936,7 @@ void ClientConnection::handlePreLogin(std::shared_ptr<PreLoginPacket> packet) {
// 4J-PB - if we go straight in from the menus via an invite, we won't // 4J-PB - if we go straight in from the menus via an invite, we won't
// have the DLC info // have the DLC info
if (gameServices().getTMSGlobalFileListRead() == false) { if (gameServices().getTMSGlobalFileListRead() == false) {
gameServices().setTMSAction(InputManager.GetPrimaryPad(), gameServices().setTMSAction(PlatformInput.GetPrimaryPad(),
eTMSAction_TMSPP_RetrieveFiles_RunPlayGame); eTMSAction_TMSPP_RetrieveFiles_RunPlayGame);
} }
} }
@ -1951,7 +1951,7 @@ void ClientConnection::handlePreLogin(std::shared_ptr<PreLoginPacket> packet) {
cantPlayContentRestricted) { cantPlayContentRestricted) {
DisconnectPacket::eDisconnectReason reason = DisconnectPacket::eDisconnectReason reason =
DisconnectPacket::eDisconnect_NoUGC_Remote; DisconnectPacket::eDisconnect_NoUGC_Remote;
if (m_userIndex == InputManager.GetPrimaryPad()) { if (m_userIndex == PlatformInput.GetPrimaryPad()) {
if (!isFriendsWithHost) if (!isFriendsWithHost)
reason = DisconnectPacket::eDisconnect_NotFriendsWithHost; reason = DisconnectPacket::eDisconnect_NotFriendsWithHost;
else if (!isAtLeastOneFriend) else if (!isAtLeastOneFriend)
@ -1967,7 +1967,7 @@ void ClientConnection::handlePreLogin(std::shared_ptr<PreLoginPacket> packet) {
"privileges: %d\n", "privileges: %d\n",
reason); reason);
gameServices().setDisconnectReason(reason); gameServices().setDisconnectReason(reason);
gameServices().setAction(InputManager.GetPrimaryPad(), eAppAction_ExitWorld, gameServices().setAction(PlatformInput.GetPrimaryPad(), eAppAction_ExitWorld,
(void*)true); (void*)true);
} else { } else {
if (!isFriendsWithHost) if (!isFriendsWithHost)
@ -2014,7 +2014,7 @@ void ClientConnection::handlePreLogin(std::shared_ptr<PreLoginPacket> packet) {
// send this before the LoginPacket so that it gets handled first, as // send this before the LoginPacket so that it gets handled first, as
// once the LoginPacket is received on the client the game is close to // once the LoginPacket is received on the client the game is close to
// starting // starting
if (m_userIndex == InputManager.GetPrimaryPad()) { if (m_userIndex == PlatformInput.GetPrimaryPad()) {
Minecraft* pMinecraft = Minecraft::GetInstance(); Minecraft* pMinecraft = Minecraft::GetInstance();
if (pMinecraft->skins->selectTexturePackById( if (pMinecraft->skins->selectTexturePackById(
packet->m_texturePackId)) { packet->m_texturePackId)) {
@ -3009,11 +3009,11 @@ void ClientConnection::handleGameEvent(
Log::info("handleGameEvent packet for WIN_GAME - %d\n", Log::info("handleGameEvent packet for WIN_GAME - %d\n",
m_userIndex); m_userIndex);
// This just allows it to be shown // This just allows it to be shown
if (minecraft->localgameModes[InputManager.GetPrimaryPad()] != nullptr) if (minecraft->localgameModes[PlatformInput.GetPrimaryPad()] != nullptr)
minecraft->localgameModes[InputManager.GetPrimaryPad()] minecraft->localgameModes[PlatformInput.GetPrimaryPad()]
->getTutorial() ->getTutorial()
->showTutorialPopup(false); ->showTutorialPopup(false);
ui.NavigateToScene(InputManager.GetPrimaryPad(), eUIScene_EndPoem, ui.NavigateToScene(PlatformInput.GetPrimaryPad(), eUIScene_EndPoem,
nullptr, eUILayer_Scene, eUIGroup_Fullscreen); nullptr, eUILayer_Scene, eUIGroup_Fullscreen);
} else if (event == GameEventPacket::START_SAVING) { } else if (event == GameEventPacket::START_SAVING) {
if (!g_NetworkManager.IsHost()) { if (!g_NetworkManager.IsHost()) {
@ -3021,7 +3021,7 @@ void ClientConnection::handleGameEvent(
// back-to-back START/STOP packets leave the client stuck in the // back-to-back START/STOP packets leave the client stuck in the
// loading screen // loading screen
gameServices().setGameStarted(false); gameServices().setGameStarted(false);
gameServices().setAction(InputManager.GetPrimaryPad(), gameServices().setAction(PlatformInput.GetPrimaryPad(),
eAppAction_RemoteServerSave); eAppAction_RemoteServerSave);
} }
} else if (event == GameEventPacket::STOP_SAVING) { } else if (event == GameEventPacket::STOP_SAVING) {
@ -3456,7 +3456,7 @@ int ClientConnection::HostDisconnectReturned(
uiIDA[0] = IDS_CONFIRM_CANCEL; uiIDA[0] = IDS_CONFIRM_CANCEL;
uiIDA[1] = IDS_CONFIRM_OK; uiIDA[1] = IDS_CONFIRM_OK;
ui.RequestErrorMessage(IDS_TITLE_SAVE_GAME, IDS_CONFIRM_SAVE_GAME, ui.RequestErrorMessage(IDS_TITLE_SAVE_GAME, IDS_CONFIRM_SAVE_GAME,
uiIDA, 2, InputManager.GetPrimaryPad(), uiIDA, 2, PlatformInput.GetPrimaryPad(),
&ClientConnection::ExitGameAndSaveReturned, &ClientConnection::ExitGameAndSaveReturned,
nullptr); nullptr);
} else { } else {
@ -3475,7 +3475,7 @@ int ClientConnection::ExitGameAndSaveReturned(
// int32_t saveOrCheckpointId = 0; // int32_t saveOrCheckpointId = 0;
// bool validSave = // bool validSave =
// StorageManager.GetSaveUniqueNumber(&saveOrCheckpointId); // StorageManager.GetSaveUniqueNumber(&saveOrCheckpointId);
// SentientManager.RecordLevelSaveOrCheckpoint(InputManager.GetPrimaryPad(), // SentientManager.RecordLevelSaveOrCheckpoint(PlatformInput.GetPrimaryPad(),
// saveOrCheckpointId); // saveOrCheckpointId);
MinecraftServer::getInstance()->setSaveOnExit(true); MinecraftServer::getInstance()->setSaveOnExit(true);
} else { } else {

View file

@ -151,7 +151,7 @@ void MultiPlayerGameMode::startDestroyBlock(int x, int y, int z, int face) {
(Tile::tiles[t]->getDestroyProgress( (Tile::tiles[t]->getDestroyProgress(
minecraft->player, minecraft->player->level, x, y, z) >= 1 minecraft->player, minecraft->player->level, x, y, z) >= 1
// ||(gameServices().debugSettingsOn() && // ||(gameServices().debugSettingsOn() &&
// gameServices().debugGetMask(InputManager.GetPrimaryPad())&(1L<<eDebugSetting_InstantDestroy)) // gameServices().debugGetMask(PlatformInput.GetPrimaryPad())&(1L<<eDebugSetting_InstantDestroy))
)) { )) {
destroyBlock(x, y, z, face); destroyBlock(x, y, z, face);
} else { } else {

View file

@ -11,7 +11,7 @@
#include <utility> #include <utility>
#include "platform/PlatformTypes.h" #include "platform/PlatformTypes.h"
#include "platform/sdl2/Input.h" #include "platform/input/input.h"
#include "ClientConnection.h" #include "ClientConnection.h"
#include "app/common/Audio/SoundEngine.h" #include "app/common/Audio/SoundEngine.h"
#include "app/common/Console_Debug_enum.h" #include "app/common/Console_Debug_enum.h"
@ -123,7 +123,7 @@ void MultiPlayerLevel::tick() {
#if !defined(_FINAL_BUILD) #if !defined(_FINAL_BUILD)
bool freezeTime = bool freezeTime =
gameServices().debugSettingsOn() && gameServices().debugSettingsOn() &&
gameServices().debugGetMask(InputManager.GetPrimaryPad()) & gameServices().debugGetMask(PlatformInput.GetPrimaryPad()) &
(1L << eDebugSetting_FreezeTime); (1L << eDebugSetting_FreezeTime);
if (!freezeTime) if (!freezeTime)
#endif #endif

View file

@ -72,7 +72,7 @@ void MultiplayerLocalPlayer::tick() {
// 4J Added // 4J Added
// 4J-PB - changing this to a game host option ot hide gamertags // 4J-PB - changing this to a game host option ot hide gamertags
// bool bIsisPrimaryHost=g_NetworkManager.IsHost() && // bool bIsisPrimaryHost=g_NetworkManager.IsHost() &&
// (InputManager.GetPrimaryPad()==m_iPad); // (PlatformInput.GetPrimaryPad()==m_iPad);
/*if((gameServices().getGameSettings(m_iPad,eGameSetting_PlayerVisibleInMap)!=0) != /*if((gameServices().getGameSettings(m_iPad,eGameSetting_PlayerVisibleInMap)!=0) !=
m_bShownOnMaps) m_bShownOnMaps)

View file

@ -3,8 +3,8 @@
#include <cmath> #include <cmath>
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Input.h" #include "platform/input/input.h"
#include "LocalPlayer.h" #include "LocalPlayer.h"
#include "minecraft/GameEnums.h" #include "minecraft/GameEnums.h"
#include "app/linux/LinuxGame.h" #include "app/linux/LinuxGame.h"
@ -38,7 +38,7 @@ void Input::tick(LocalPlayer* player) {
MINECRAFT_ACTION_LEFT) || MINECRAFT_ACTION_LEFT) ||
pMinecraft->localgameModes[iPad]->isInputAllowed( pMinecraft->localgameModes[iPad]->isInputAllowed(
MINECRAFT_ACTION_RIGHT)) MINECRAFT_ACTION_RIGHT))
xa = -InputManager.GetJoypadStick_LX(iPad); xa = -PlatformInput.GetJoypadStick_LX(iPad);
else else
xa = 0.0f; xa = 0.0f;
@ -46,7 +46,7 @@ void Input::tick(LocalPlayer* player) {
MINECRAFT_ACTION_FORWARD) || MINECRAFT_ACTION_FORWARD) ||
pMinecraft->localgameModes[iPad]->isInputAllowed( pMinecraft->localgameModes[iPad]->isInputAllowed(
MINECRAFT_ACTION_BACKWARD)) MINECRAFT_ACTION_BACKWARD))
ya = InputManager.GetJoypadStick_LY(iPad); ya = PlatformInput.GetJoypadStick_LY(iPad);
else else
ya = 0.0f; ya = 0.0f;
@ -87,7 +87,7 @@ void Input::tick(LocalPlayer* player) {
MINECRAFT_ACTION_LOOK_LEFT) || MINECRAFT_ACTION_LOOK_LEFT) ||
pMinecraft->localgameModes[iPad]->isInputAllowed( pMinecraft->localgameModes[iPad]->isInputAllowed(
MINECRAFT_ACTION_LOOK_RIGHT)) MINECRAFT_ACTION_LOOK_RIGHT))
tx = InputManager.GetJoypadStick_RX(iPad) * tx = PlatformInput.GetJoypadStick_RX(iPad) *
(((float)gameServices().getGameSettings(iPad, (((float)gameServices().getGameSettings(iPad,
eGameSetting_Sensitivity_InGame)) / eGameSetting_Sensitivity_InGame)) /
100.0f); // apply sensitivity to look 100.0f); // apply sensitivity to look
@ -95,7 +95,7 @@ void Input::tick(LocalPlayer* player) {
MINECRAFT_ACTION_LOOK_UP) || MINECRAFT_ACTION_LOOK_UP) ||
pMinecraft->localgameModes[iPad]->isInputAllowed( pMinecraft->localgameModes[iPad]->isInputAllowed(
MINECRAFT_ACTION_LOOK_DOWN)) MINECRAFT_ACTION_LOOK_DOWN))
ty = InputManager.GetJoypadStick_RY(iPad) * ty = PlatformInput.GetJoypadStick_RY(iPad) *
(((float)gameServices().getGameSettings(iPad, (((float)gameServices().getGameSettings(iPad,
eGameSetting_Sensitivity_InGame)) / eGameSetting_Sensitivity_InGame)) /
100.0f); // apply sensitivity to look 100.0f); // apply sensitivity to look
@ -120,11 +120,11 @@ void Input::tick(LocalPlayer* player) {
// jumping = controller.isButtonPressed(0); // jumping = controller.isButtonPressed(0);
sprintKey = InputManager.GetValue(iPad, MINECRAFT_ACTION_SPRINT) && sprintKey = PlatformInput.GetValue(iPad, MINECRAFT_ACTION_SPRINT) &&
pMinecraft->localgameModes[iPad]->isInputAllowed( pMinecraft->localgameModes[iPad]->isInputAllowed(
MINECRAFT_ACTION_SPRINT); MINECRAFT_ACTION_SPRINT);
jumping = jumping =
InputManager.GetValue(iPad, MINECRAFT_ACTION_JUMP) && PlatformInput.GetValue(iPad, MINECRAFT_ACTION_JUMP) &&
pMinecraft->localgameModes[iPad]->isInputAllowed(MINECRAFT_ACTION_JUMP); pMinecraft->localgameModes[iPad]->isInputAllowed(MINECRAFT_ACTION_JUMP);
#ifndef _CONTENT_PACKAGE #ifndef _CONTENT_PACKAGE

View file

@ -28,8 +28,8 @@
#include "minecraft/world/item/Item.h" #include "minecraft/world/item/Item.h"
#include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/tile/Tile.h"
// 4J Stu - Added for tutorial callbacks // 4J Stu - Added for tutorial callbacks
#include "platform/InputActions.h" #include "platform/input/InputActions.h"
#include "platform/sdl2/Input.h" #include "platform/input/input.h"
#include "platform/sdl2/Profile.h" #include "platform/sdl2/Profile.h"
#include "platform/sdl2/Render.h" #include "platform/sdl2/Render.h"
#include "app/common/App_structs.h" #include "app/common/App_structs.h"
@ -381,7 +381,7 @@ void LocalPlayer::aiStep() {
// snap y rotation to nearest 90 degree axis aligned value // snap y rotation to nearest 90 degree axis aligned value
float yRotSnapped = floorf((yRot / 90.0f) + 0.5f) * 90.0f; float yRotSnapped = floorf((yRot / 90.0f) + 0.5f) * 90.0f;
if (InputManager.GetJoypadMapVal(m_iPad) == 0) { if (PlatformInput.GetJoypadMapVal(m_iPad) == 0) {
if (ullDpad_filtered & (1LL << MINECRAFT_ACTION_DPAD_RIGHT)) { if (ullDpad_filtered & (1LL << MINECRAFT_ACTION_DPAD_RIGHT)) {
xd = -0.15 * cos(yRotSnapped * std::numbers::pi / 180); xd = -0.15 * cos(yRotSnapped * std::numbers::pi / 180);
zd = -0.15 * sin(yRotSnapped * std::numbers::pi / 180); zd = -0.15 * sin(yRotSnapped * std::numbers::pi / 180);
@ -485,12 +485,12 @@ void LocalPlayer::aiStep() {
} }
// Check if the player is idle and the rich presence needs updated // Check if the player is idle and the rich presence needs updated
if (!m_bIsIdle && InputManager.GetIdleSeconds(m_iPad) > PLAYER_IDLE_TIME) { if (!m_bIsIdle && PlatformInput.GetIdleSeconds(m_iPad) > PLAYER_IDLE_TIME) {
ProfileManager.SetCurrentGameActivity(m_iPad, CONTEXT_PRESENCE_IDLE, ProfileManager.SetCurrentGameActivity(m_iPad, CONTEXT_PRESENCE_IDLE,
false); false);
m_bIsIdle = true; m_bIsIdle = true;
} else if (m_bIsIdle && } else if (m_bIsIdle &&
InputManager.GetIdleSeconds(m_iPad) < PLAYER_IDLE_TIME) { PlatformInput.GetIdleSeconds(m_iPad) < PLAYER_IDLE_TIME) {
// Are we offline or online, and how many players are there // Are we offline or online, and how many players are there
if (g_NetworkManager.GetPlayerCount() > 1) { if (g_NetworkManager.GetPlayerCount() > 1) {
// only do it for this player here - each player will run this code // only do it for this player here - each player will run this code

View file

@ -9,7 +9,7 @@
#include <numbers> #include <numbers>
#include "platform/PlatformTypes.h" #include "platform/PlatformTypes.h"
#include "platform/sdl2/Input.h" #include "platform/input/input.h"
#include "platform/sdl2/Render.h" #include "platform/sdl2/Render.h"
#include "BossMobGuiInfo.h" #include "BossMobGuiInfo.h"
#include "Chunk.h" #include "Chunk.h"
@ -274,7 +274,7 @@ void GameRenderer::tick(bool first) // 4J - add bFirst
1.0f / ((float)SharedConstants::TICKS_PER_SECOND * 4); 1.0f / ((float)SharedConstants::TICKS_PER_SECOND * 4);
} }
if (mc->player != mc->localplayers[InputManager.GetPrimaryPad()]) if (mc->player != mc->localplayers[PlatformInput.GetPrimaryPad()])
return; // 4J added for split screen - only do rest of processing for return; // 4J added for split screen - only do rest of processing for
// once per frame // once per frame
@ -1047,8 +1047,8 @@ void GameRenderer::render(float a, bool bFirst) {
ScreenSizeCalculator ssc(mc->options, mc->width, mc->height); ScreenSizeCalculator ssc(mc->options, mc->width, mc->height);
int screenWidth = ssc.getWidth(); int screenWidth = ssc.getWidth();
int screenHeight = ssc.getHeight(); int screenHeight = ssc.getHeight();
int xMouse = InputManager.GetMouseX() * screenWidth / mc->width; int xMouse = PlatformInput.GetMouseX() * screenWidth / mc->width;
int yMouse = InputManager.GetMouseY() * screenHeight / mc->height - 1; int yMouse = PlatformInput.GetMouseY() * screenHeight / mc->height - 1;
int maxFps = getFpsCap(mc->options->framerateLimit); int maxFps = getFpsCap(mc->options->framerateLimit);
@ -1242,7 +1242,7 @@ void GameRenderer::renderLevel(float a, int64_t until) {
// view whatever they have loaded in - we're sharing render data between // view whatever they have loaded in - we're sharing render data between
// players. // players.
bool updateChunks = bool updateChunks =
(mc->player == mc->localplayers[InputManager.GetPrimaryPad()]); (mc->player == mc->localplayers[PlatformInput.GetPrimaryPad()]);
// if (mc->cameraTargetPlayer == nullptr) // 4J - removed condition as we // if (mc->cameraTargetPlayer == nullptr) // 4J - removed condition as we
// want to update this is mc->player changes for different local players // want to update this is mc->player changes for different local players

View file

@ -16,7 +16,7 @@
#include <utility> #include <utility>
#include "platform/PlatformTypes.h" #include "platform/PlatformTypes.h"
#include "platform/sdl2/Input.h" #include "platform/input/input.h"
#include "platform/sdl2/Render.h" #include "platform/sdl2/Render.h"
#include "Chunk.h" #include "Chunk.h"
#include "GameRenderer.h" #include "GameRenderer.h"
@ -435,7 +435,7 @@ void LevelRenderer::setLevel(int playerIndex, MultiPlayerLevel* level) {
// tile entities in the world dissappear We should only do this when // tile entities in the world dissappear We should only do this when
// actually exiting the game, so only when the primary player sets there // actually exiting the game, so only when the primary player sets there
// level to nullptr // level to nullptr
if (playerIndex == InputManager.GetPrimaryPad()) { if (playerIndex == PlatformInput.GetPrimaryPad()) {
RenderManager.CBuffDeleteAll(); RenderManager.CBuffDeleteAll();
{ {
std::lock_guard<std::mutex> lock(m_csRenderableTileEntities); std::lock_guard<std::mutex> lock(m_csRenderableTileEntities);
@ -1164,7 +1164,7 @@ void LevelRenderer::renderClouds(float alpha) {
int playerIndex = mc->player->GetXboxPad(); int playerIndex = mc->player->GetXboxPad();
// if the primary player has clouds off, so do all players on this machine // if the primary player has clouds off, so do all players on this machine
if (gameServices().getGameSettings(InputManager.GetPrimaryPad(), if (gameServices().getGameSettings(PlatformInput.GetPrimaryPad(),
eGameSetting_Clouds) == 0) { eGameSetting_Clouds) == 0) {
return; return;
} }
@ -1178,7 +1178,7 @@ void LevelRenderer::renderClouds(float alpha) {
} }
if (gameServices().debugSettingsOn()) { if (gameServices().debugSettingsOn()) {
if (gameServices().debugGetMask(InputManager.GetPrimaryPad()) & if (gameServices().debugGetMask(PlatformInput.GetPrimaryPad()) &
(1L << eDebugSetting_FreezeTime)) { (1L << eDebugSetting_FreezeTime)) {
iTicks = m_freezeticks; iTicks = m_freezeticks;
} }
@ -1256,7 +1256,7 @@ void LevelRenderer::renderClouds(float alpha) {
glEnable(GL_CULL_FACE); glEnable(GL_CULL_FACE);
if (gameServices().debugSettingsOn()) { if (gameServices().debugSettingsOn()) {
if (!(gameServices().debugGetMask(InputManager.GetPrimaryPad()) & if (!(gameServices().debugGetMask(PlatformInput.GetPrimaryPad()) &
(1L << eDebugSetting_FreezeTime))) { (1L << eDebugSetting_FreezeTime))) {
m_freezeticks = iTicks; m_freezeticks = iTicks;
} }
@ -1442,7 +1442,7 @@ void LevelRenderer::renderAdvancedClouds(float alpha) {
int iTicks = ticks; int iTicks = ticks;
if (gameServices().debugSettingsOn()) { if (gameServices().debugSettingsOn()) {
if (gameServices().debugGetMask(InputManager.GetPrimaryPad()) & if (gameServices().debugGetMask(PlatformInput.GetPrimaryPad()) &
(1L << eDebugSetting_FreezeTime)) { (1L << eDebugSetting_FreezeTime)) {
iTicks = m_freezeticks; iTicks = m_freezeticks;
} }
@ -1689,7 +1689,7 @@ void LevelRenderer::renderAdvancedClouds(float alpha) {
glEnable(GL_CULL_FACE); glEnable(GL_CULL_FACE);
if (gameServices().debugSettingsOn()) { if (gameServices().debugSettingsOn()) {
if (!(gameServices().debugGetMask(InputManager.GetPrimaryPad()) & if (!(gameServices().debugGetMask(PlatformInput.GetPrimaryPad()) &
(1L << eDebugSetting_FreezeTime))) { (1L << eDebugSetting_FreezeTime))) {
m_freezeticks = iTicks; m_freezeticks = iTicks;
} }

View file

@ -7,7 +7,7 @@
#include <limits> #include <limits>
#include <vector> #include <vector>
#include "platform/sdl2/Input.h" #include "platform/input/input.h"
#include "platform/sdl2/Storage.h" #include "platform/sdl2/Storage.h"
#include "minecraft/GameEnums.h" #include "minecraft/GameEnums.h"
#include "app/common/Audio/SoundEngine.h" #include "app/common/Audio/SoundEngine.h"
@ -239,7 +239,7 @@ void DLCTexturePack::loadData() {
if (mountIndex > -1) { if (mountIndex > -1) {
if (StorageManager.MountInstalledDLC( if (StorageManager.MountInstalledDLC(
InputManager.GetPrimaryPad(), mountIndex, PlatformInput.GetPrimaryPad(), mountIndex,
[this](int pad, std::uint32_t err, std::uint32_t lic) { [this](int pad, std::uint32_t err, std::uint32_t lic) {
return onPackMounted(pad, err, lic); return onPackMounted(pad, err, lic);
}, },
@ -249,7 +249,7 @@ void DLCTexturePack::loadData() {
if (gameServices().getLevelGenerationOptions()) if (gameServices().getLevelGenerationOptions())
gameServices().getLevelGenerationOptions()->setLoadedData(); gameServices().getLevelGenerationOptions()->setLoadedData();
Log::info("Failed to mount texture pack DLC %d for pad %d\n", Log::info("Failed to mount texture pack DLC %d for pad %d\n",
mountIndex, InputManager.GetPrimaryPad()); mountIndex, PlatformInput.GetPrimaryPad());
} else { } else {
m_bLoadingData = true; m_bLoadingData = true;
Log::info("Attempted to mount DLC data for texture pack %d\n", Log::info("Attempted to mount DLC data for texture pack %d\n",
@ -259,7 +259,7 @@ void DLCTexturePack::loadData() {
m_bHasLoadedData = true; m_bHasLoadedData = true;
if (gameServices().getLevelGenerationOptions()) if (gameServices().getLevelGenerationOptions())
gameServices().getLevelGenerationOptions()->setLoadedData(); gameServices().getLevelGenerationOptions()->setLoadedData();
gameServices().setAction(InputManager.GetPrimaryPad(), gameServices().setAction(PlatformInput.GetPrimaryPad(),
eAppAction_ReloadTexturePack); eAppAction_ReloadTexturePack);
} }
} }
@ -404,7 +404,7 @@ int DLCTexturePack::onPackMounted(int iPad, std::uint32_t dwErr,
texturePack->m_bHasLoadedData = true; texturePack->m_bHasLoadedData = true;
if (gameServices().getLevelGenerationOptions()) if (gameServices().getLevelGenerationOptions())
gameServices().getLevelGenerationOptions()->setLoadedData(); gameServices().getLevelGenerationOptions()->setLoadedData();
gameServices().setAction(InputManager.GetPrimaryPad(), eAppAction_ReloadTexturePack); gameServices().setAction(PlatformInput.GetPrimaryPad(), eAppAction_ReloadTexturePack);
return 0; return 0;
} }

View file

@ -7,7 +7,7 @@
#include <algorithm> #include <algorithm>
#include <utility> #include <utility>
#include "platform/sdl2/Input.h" #include "platform/input/input.h"
#include "DLCTexturePack.h" #include "DLCTexturePack.h"
#include "DefaultTexturePack.h" #include "DefaultTexturePack.h"
#include "minecraft/GameEnums.h" #include "minecraft/GameEnums.h"
@ -151,7 +151,7 @@ bool TexturePackRepository::selectTexturePackById(std::uint32_t id) {
selectSkin(newPack); selectSkin(newPack);
if (newPack->hasData()) { if (newPack->hasData()) {
gameServices().setAction(InputManager.GetPrimaryPad(), gameServices().setAction(PlatformInput.GetPrimaryPad(),
eAppAction_ReloadTexturePack); eAppAction_ReloadTexturePack);
} else { } else {
newPack->loadData(); newPack->loadData();
@ -167,7 +167,7 @@ bool TexturePackRepository::selectTexturePackById(std::uint32_t id) {
"Failed to select texture pack %d as it is not in the list\n", id); "Failed to select texture pack %d as it is not in the list\n", id);
// Fail safely // Fail safely
if (selectSkin(DEFAULT_TEXTURE_PACK)) { if (selectSkin(DEFAULT_TEXTURE_PACK)) {
gameServices().setAction(InputManager.GetPrimaryPad(), gameServices().setAction(PlatformInput.GetPrimaryPad(),
eAppAction_ReloadTexturePack); eAppAction_ReloadTexturePack);
} }
} }

View file

@ -66,7 +66,7 @@
#if defined(SPLIT_SAVES) #if defined(SPLIT_SAVES)
#include "minecraft/world/level/storage/ConsoleSaveFileIO/ConsoleSaveFileSplit.h" #include "minecraft/world/level/storage/ConsoleSaveFileIO/ConsoleSaveFileSplit.h"
#endif #endif
#include "platform/sdl2/Input.h" #include "platform/input/input.h"
#include "platform/ShutdownManager.h" #include "platform/ShutdownManager.h"
#include "app/common/Console_Debug_enum.h" #include "app/common/Console_Debug_enum.h"
#include "app/common/GameRules/LevelGeneration/ConsoleSchematicFile.h" #include "app/common/GameRules/LevelGeneration/ConsoleSchematicFile.h"
@ -832,7 +832,7 @@ void MinecraftServer::saveAllChunks() {
void MinecraftServer::saveGameRules() { void MinecraftServer::saveGameRules() {
#if !defined(_CONTENT_PACKAGE) #if !defined(_CONTENT_PACKAGE)
if (gameServices().debugSettingsOn() && if (gameServices().debugSettingsOn() &&
gameServices().debugGetMask(InputManager.GetPrimaryPad()) & gameServices().debugGetMask(PlatformInput.GetPrimaryPad()) &
(1L << eDebugSetting_DistributableSave)) { (1L << eDebugSetting_DistributableSave)) {
// Do nothing // Do nothing
} else } else
@ -903,7 +903,7 @@ void MinecraftServer::stopServer(bool didInit) {
// also need to check for a profile switch here - primary player signs out, // also need to check for a profile switch here - primary player signs out,
// and another player signs in before dismissing the dash // and another player signs in before dismissing the dash
if ((m_bPrimaryPlayerSignedOut == false) && if ((m_bPrimaryPlayerSignedOut == false) &&
ProfileManager.IsSignedIn(InputManager.GetPrimaryPad())) { ProfileManager.IsSignedIn(PlatformInput.GetPrimaryPad())) {
// if trial version or saving is disabled, then don't save anything. // if trial version or saving is disabled, then don't save anything.
// Also don't save anything if we didn't actually get through the server // Also don't save anything if we didn't actually get through the server
// initialisation. // initialisation.

View file

@ -7,7 +7,7 @@
#include <algorithm> #include <algorithm>
#include <mutex> #include <mutex>
#include "platform/sdl2/Input.h" #include "platform/input/input.h"
#include "platform/sdl2/Storage.h" #include "platform/sdl2/Storage.h"
#include "EntityTracker.h" #include "EntityTracker.h"
#include "platform/ShutdownManager.h" #include "platform/ShutdownManager.h"
@ -326,7 +326,7 @@ void ServerLevel::tick() {
#if !defined(_FINAL_BUILD) #if !defined(_FINAL_BUILD)
bool freezeTime = bool freezeTime =
gameServices().debugSettingsOn() && gameServices().debugSettingsOn() &&
gameServices().debugGetMask(InputManager.GetPrimaryPad()) & gameServices().debugGetMask(PlatformInput.GetPrimaryPad()) &
(1L << eDebugSetting_FreezeTime); (1L << eDebugSetting_FreezeTime);
if (!freezeTime) if (!freezeTime)
#endif #endif

View file

@ -10,7 +10,7 @@
#include <cmath> #include <cmath>
#include <format> #include <format>
#include "platform/sdl2/Input.h" #include "platform/input/input.h"
#include "EntityTracker.h" #include "EntityTracker.h"
#include "app/common/Console_Debug_enum.h" #include "app/common/Console_Debug_enum.h"
#include "app/common/GameRules/LevelRules/Rules/GameRulesInstance.h" #include "app/common/GameRules/LevelRules/Rules/GameRulesInstance.h"
@ -585,7 +585,7 @@ void ServerPlayer::doChunkSendingTick(bool dontDelayChunks) {
void ServerPlayer::doTickB() { void ServerPlayer::doTickB() {
#if !defined(_CONTENT_PACKAGE) #if !defined(_CONTENT_PACKAGE)
// check if there's a debug dimension change requested // check if there's a debug dimension change requested
// if(gameServices().debugGetMask(InputManager.GetPrimaryPad())&(1L<<eDebugSetting_GoToNether)) // if(gameServices().debugGetMask(PlatformInput.GetPrimaryPad())&(1L<<eDebugSetting_GoToNether))
//{ //{
// if(level->dimension->id == 0 ) // if(level->dimension->id == 0 )
// { // {
@ -593,11 +593,11 @@ void ServerPlayer::doTickB() {
// portalTime=1; // portalTime=1;
// } // }
// unsigned int // unsigned int
// uiVal=gameServices().debugGetMask(InputManager.GetPrimaryPad()); // uiVal=gameServices().debugGetMask(PlatformInput.GetPrimaryPad());
// gameServices().setGameSettingsDebugMask(InputManager.GetPrimaryPad(),uiVal&~(1L<<eDebugSetting_GoToNether)); // gameServices().setGameSettingsDebugMask(PlatformInput.GetPrimaryPad(),uiVal&~(1L<<eDebugSetting_GoToNether));
//} //}
// else if // else if
// (gameServices().debugGetMask(InputManager.GetPrimaryPad())&(1L<<eDebugSetting_GoToEnd)) // (gameServices().debugGetMask(PlatformInput.GetPrimaryPad())&(1L<<eDebugSetting_GoToEnd))
// { // {
// if(level->dimension->id == 0 ) // if(level->dimension->id == 0 )
// { // {
@ -605,20 +605,20 @@ void ServerPlayer::doTickB() {
// std::dynamic_pointer_cast<ServerPlayer>( shared_from_this() ), 1 ); // std::dynamic_pointer_cast<ServerPlayer>( shared_from_this() ), 1 );
// } // }
// unsigned int // unsigned int
// uiVal=gameServices().debugGetMask(InputManager.GetPrimaryPad()); // uiVal=gameServices().debugGetMask(PlatformInput.GetPrimaryPad());
// gameServices().setGameSettingsDebugMask(InputManager.GetPrimaryPad(),uiVal&~(1L<<eDebugSetting_GoToEnd)); // gameServices().setGameSettingsDebugMask(PlatformInput.GetPrimaryPad(),uiVal&~(1L<<eDebugSetting_GoToEnd));
// } // }
// else // else
if (gameServices().debugGetMask(InputManager.GetPrimaryPad()) & if (gameServices().debugGetMask(PlatformInput.GetPrimaryPad()) &
(1L << eDebugSetting_GoToOverworld)) { (1L << eDebugSetting_GoToOverworld)) {
if (level->dimension->id != 0) { if (level->dimension->id != 0) {
isInsidePortal = true; isInsidePortal = true;
portalTime = 1; portalTime = 1;
} }
unsigned int uiVal = unsigned int uiVal =
gameServices().debugGetMask(InputManager.GetPrimaryPad()); gameServices().debugGetMask(PlatformInput.GetPrimaryPad());
gameServices().setGameSettingsDebugMask( gameServices().setGameSettingsDebugMask(
InputManager.GetPrimaryPad(), PlatformInput.GetPrimaryPad(),
uiVal & ~(1L << eDebugSetting_GoToOverworld)); uiVal & ~(1L << eDebugSetting_GoToOverworld));
} }
#endif #endif

View file

@ -6,7 +6,7 @@
#include <memory> #include <memory>
#include <vector> #include <vector>
#include "IPlatformInput.h" #include "platform/input/input.h"
#include "app/linux/LinuxGame.h" #include "app/linux/LinuxGame.h"
#include "util/StringHelpers.h" #include "util/StringHelpers.h"
#include "java/Random.h" #include "java/Random.h"

View file

@ -15,7 +15,7 @@
#include <optional> #include <optional>
#include "Explosion.h" #include "Explosion.h"
#include "IPlatformInput.h" #include "platform/input/input.h"
#include "LevelListener.h" #include "LevelListener.h"
#include "minecraft/GameEnums.h" #include "minecraft/GameEnums.h"
#include "app/common/Colours/ColourTable.h" #include "app/common/Colours/ColourTable.h"

View file

@ -6,7 +6,7 @@
#include <algorithm> #include <algorithm>
#include "IPlatformInput.h" #include "platform/input/input.h"
#include "app/common/Console_Debug_enum.h" #include "app/common/Console_Debug_enum.h"
#include "app/linux/LinuxGame.h" #include "app/linux/LinuxGame.h"
#include "java/Random.h" #include "java/Random.h"

View file

@ -10,7 +10,7 @@
#include <thread> #include <thread>
#include <utility> #include <utility>
#include "IPlatformInput.h" #include "platform/input/input.h"
#include "app/common/Console_Debug_enum.h" #include "app/common/Console_Debug_enum.h"
#include "app/linux/LinuxGame.h" #include "app/linux/LinuxGame.h"
#include "platform/C4JThread.h" #include "platform/C4JThread.h"

View file

@ -12,7 +12,7 @@
#include <unordered_map> #include <unordered_map>
#include <utility> #include <utility>
#include "IPlatformInput.h" #include "platform/input/input.h"
#include "app/common/Console_Debug_enum.h" #include "app/common/Console_Debug_enum.h"
#include "app/linux/LinuxGame.h" #include "app/linux/LinuxGame.h"
#include "util/Definitions.h" #include "util/Definitions.h"

View file

@ -6,7 +6,7 @@
#include <numbers> #include <numbers>
#include "HellDimension.h" #include "HellDimension.h"
#include "IPlatformInput.h" #include "platform/input/input.h"
#include "minecraft/GameEnums.h" #include "minecraft/GameEnums.h"
#include "app/common/Colours/ColourTable.h" #include "app/common/Colours/ColourTable.h"
#include "app/common/Console_Debug_enum.h" #include "app/common/Console_Debug_enum.h"

View file

@ -3,7 +3,7 @@
#include <cmath> #include <cmath>
#include "IPlatformInput.h" #include "platform/input/input.h"
#include "minecraft/GameEnums.h" #include "minecraft/GameEnums.h"
#include "app/common/Colours/ColourTable.h" #include "app/common/Colours/ColourTable.h"
#include "app/common/Console_Debug_enum.h" #include "app/common/Console_Debug_enum.h"

View file

@ -7,7 +7,7 @@
#include <vector> #include <vector>
#include "BiomeOverrideLayer.h" #include "BiomeOverrideLayer.h"
#include "IPlatformInput.h" #include "platform/input/input.h"
#include "app/common/Console_Debug_enum.h" #include "app/common/Console_Debug_enum.h"
#include "app/linux/LinuxGame.h" #include "app/linux/LinuxGame.h"
#include "minecraft/world/level/LevelType.h" #include "minecraft/world/level/LevelType.h"

View file

@ -12,7 +12,7 @@
#include <memory> #include <memory>
#include <utility> #include <utility>
#include "IPlatformInput.h" #include "platform/input/input.h"
#include "LevelData.h" #include "LevelData.h"
#include "app/common/Console_Debug_enum.h" #include "app/common/Console_Debug_enum.h"
#include "app/common/GameRules/GameRuleManager.h" #include "app/common/GameRules/GameRuleManager.h"

View file

@ -6,7 +6,6 @@
#include "TileEntity.h" #include "TileEntity.h"
#include "java/Class.h" #include "java/Class.h"
#include "minecraft/world/entity/player/Player.h" #include "minecraft/world/entity/player/Player.h"
#include "platform/IPlatformInput.h"
struct STRING_VERIFY_RESPONSE; struct STRING_VERIFY_RESPONSE;

Some files were not shown because too many files have changed in this diff Show more