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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,7 +1,7 @@
#include "InputConstraint.h"
#include "platform/InputActions.h"
#include "platform/sdl2/Input.h"
#include "platform/input/InputActions.h"
#include "platform/input/input.h"
bool InputConstraint::isMappingConstrained(int iPad, int mapping) {
// 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
unsigned char layoutMapping = InputManager.GetJoypadMapVal(iPad);
unsigned char layoutMapping = PlatformInput.GetJoypadMapVal(iPad);
// 4J HEG - Replaced the equivalance test with bitwise AND, important in
// some mapping configurations (e.g. when comparing two action map values
// and one has extra buttons mapped)
return (InputManager.GetGameJoypadMaps(layoutMapping, m_inputMapping) &
InputManager.GetGameJoypadMaps(layoutMapping, mapping)) > 0;
return (PlatformInput.GetGameJoypadMaps(layoutMapping, m_inputMapping) &
PlatformInput.GetGameJoypadMaps(layoutMapping, mapping)) > 0;
}

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -7,8 +7,8 @@
#include <utility>
#include "platform/PlatformTypes.h"
#include "platform/InputActions.h"
#include "platform/sdl2/Input.h"
#include "platform/input/InputActions.h"
#include "platform/input/input.h"
#include "platform/sdl2/Profile.h"
#include "app/common/App_Defines.h"
#include "minecraft/GameEnums.h"
@ -353,7 +353,7 @@ void UIScene_CreateWorldMenu::handlePress(F64 controlId, F64 childId) {
switch ((int)controlId) {
case eControl_EditWorldName: {
m_bIgnoreInput = true;
InputManager.RequestKeyboard(
PlatformInput.RequestKeyboard(
app.GetString(IDS_CREATE_NEW_WORLD), m_editWorldName.getLabel(),
0, 25,
[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
if (bRes) {
std::wstring str =
convStringToWstring(InputManager.GetText());
convStringToWstring(PlatformInput.GetText());
if (!str.empty()) {
m_editWorldName.setLabel(str);
m_worldName = std::move(str);
@ -370,7 +370,7 @@ void UIScene_CreateWorldMenu::handlePress(F64 controlId, F64 childId) {
}
return 0;
},
C_4JInput::EKeyboardMode_Default);
IPlatformInput::EKeyboardMode_Default);
} break;
case eControl_GameModeToggle:
switch (m_iGameModeId) {
@ -623,7 +623,7 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame() {
// the sign-in UI again
int connectedControllers = 0;
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;
}
@ -990,7 +990,7 @@ int UIScene_CreateWorldMenu::ConfirmCreateReturned(
// the sign-in UI again
int connectedControllers = 0;
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;
}

View file

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

View file

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

View file

@ -4,8 +4,8 @@
#include <vector>
#include "platform/PlatformTypes.h"
#include "platform/InputActions.h"
#include "platform/sdl2/Input.h"
#include "platform/input/InputActions.h"
#include "platform/input/input.h"
#include "platform/sdl2/Profile.h"
#include "app/common/App_Defines.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
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()) {
app.StartInstallDLCProcess(i);
break;

View file

@ -1,6 +1,6 @@
#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/UIScene.h"
#include "app/linux/Iggy/include/iggy.h"

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -2,8 +2,8 @@
#include "UIScene_SaveMessage.h"
#include "platform/PlatformTypes.h"
#include "platform/InputActions.h"
#include "platform/sdl2/Input.h"
#include "platform/input/InputActions.h"
#include "platform/input/input.h"
#include "platform/sdl2/Profile.h"
#include "app/common/App_Defines.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
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()) {
app.StartInstallDLCProcess(i);
break;

View file

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

View file

@ -4,8 +4,8 @@
#include <memory>
#include "platform/InputActions.h"
#include "platform/sdl2/Input.h"
#include "platform/input/InputActions.h"
#include "platform/input/input.h"
#include "minecraft/GameEnums.h"
#include "app/common/BuildVer/BuildVer.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,
unsigned char ucAction) {
unsigned int uiVal = InputManager.GetGameJoypadMaps(
unsigned int uiVal = PlatformInput.GetGameJoypadMaps(
m_iCurrentNavigatedControlsLayout, ucAction);
if (uiVal & _360_JOY_BUTTON_A)

View file

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

View file

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

View file

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

View file

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

View file

@ -1,6 +1,6 @@
#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/UILayer.h"
#include "app/common/UI/UIScene.h"

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -4,8 +4,8 @@
#include <wchar.h>
#include "platform/PlatformTypes.h"
#include "platform/InputActions.h"
#include "platform/sdl2/Input.h"
#include "platform/input/InputActions.h"
#include "platform/input/input.h"
#include "platform/sdl2/Profile.h"
#include "app/common/UI/Controls/UIControl_BitmapIcon.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() {
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",
// i, ProfileManager.GetDisplayName(i).data());
@ -159,7 +159,7 @@ void UIScene_QuadrantSignin::updateState() {
m_lastRequestedAvatar = i;
}
}
} else if (InputManager.IsPadConnected(i)) {
} else if (PlatformInput.IsPadConnected(i)) {
// app.DebugPrintf("Index %d is not signed in\n", i);
setControllerState(i, eControllerStatus_PressToJoin);
@ -234,7 +234,7 @@ void UIScene_QuadrantSignin::_initQuadrants() {
}
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);
setControllerState(i, eControllerStatus_PressToJoin);

View file

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

View file

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

View file

@ -5,7 +5,7 @@
#include <utility>
#include "platform/PlatformTypes.h"
#include "platform/InputActions.h"
#include "platform/input/InputActions.h"
#include "platform/sdl2/Render.h"
#include "app/common/UI/All Platforms/UIEnums.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 "NetworkManager.h"
#include "platform/PlatformTypes.h"
#include "platform/InputActions.h"
#include "platform/sdl2/Input.h"
#include "platform/input/InputActions.h"
#include "platform/input/input.h"
#include "platform/sdl2/Profile.h"
#include "platform/sdl2/Render.h"
#include "platform/sdl2/Storage.h"
@ -112,302 +112,302 @@ void DefineActions(void) {
// 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);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_B,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_Y,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_CANCEL,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_CANCEL,
_360_JOY_BUTTON_B);
InputManager.SetGameJoypadMaps(
PlatformInput.SetGameJoypadMaps(
MAP_STYLE_0, ACTION_MENU_UP,
_360_JOY_BUTTON_DPAD_UP | _360_JOY_BUTTON_LSTICK_UP);
InputManager.SetGameJoypadMaps(
PlatformInput.SetGameJoypadMaps(
MAP_STYLE_0, ACTION_MENU_DOWN,
_360_JOY_BUTTON_DPAD_DOWN | _360_JOY_BUTTON_LSTICK_DOWN);
InputManager.SetGameJoypadMaps(
PlatformInput.SetGameJoypadMaps(
MAP_STYLE_0, ACTION_MENU_LEFT,
_360_JOY_BUTTON_DPAD_LEFT | _360_JOY_BUTTON_LSTICK_LEFT);
InputManager.SetGameJoypadMaps(
PlatformInput.SetGameJoypadMaps(
MAP_STYLE_0, ACTION_MENU_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_PAGEDOWN,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_PAGEDOWN,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_LEFT_SCROLL,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_LEFT_SCROLL,
_360_JOY_BUTTON_LB);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_PAUSEMENU,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_PAUSEMENU,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_OTHER_STICK_PRESS,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_OTHER_STICK_PRESS,
_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);
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);
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);
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);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_JUMP,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_JUMP,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_BACKWARD,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_BACKWARD,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_RIGHT,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_LOOK_RIGHT,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_LOOK_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_LOOK_DOWN,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_LOOK_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_ACTION,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_ACTION,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_LEFT_SCROLL,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_LEFT_SCROLL,
_360_JOY_BUTTON_LB);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_INVENTORY,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_INVENTORY,
_360_JOY_BUTTON_Y);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_PAUSEMENU,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_PAUSEMENU,
_360_JOY_BUTTON_START);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_DROP,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_DROP,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_CRAFTING,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_CRAFTING,
_360_JOY_BUTTON_X);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_0,
MINECRAFT_ACTION_RENDER_THIRD_PERSON,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_DPAD_LEFT,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_DPAD_UP,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_A,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_X,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_OK,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_OK,
_360_JOY_BUTTON_A);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_CANCEL,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_CANCEL,
_360_JOY_BUTTON_B);
InputManager.SetGameJoypadMaps(
PlatformInput.SetGameJoypadMaps(
MAP_STYLE_1, ACTION_MENU_UP,
_360_JOY_BUTTON_DPAD_UP | _360_JOY_BUTTON_LSTICK_UP);
InputManager.SetGameJoypadMaps(
PlatformInput.SetGameJoypadMaps(
MAP_STYLE_1, ACTION_MENU_DOWN,
_360_JOY_BUTTON_DPAD_DOWN | _360_JOY_BUTTON_LSTICK_DOWN);
InputManager.SetGameJoypadMaps(
PlatformInput.SetGameJoypadMaps(
MAP_STYLE_1, ACTION_MENU_LEFT,
_360_JOY_BUTTON_DPAD_LEFT | _360_JOY_BUTTON_LSTICK_LEFT);
InputManager.SetGameJoypadMaps(
PlatformInput.SetGameJoypadMaps(
MAP_STYLE_1, ACTION_MENU_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_PAGEDOWN,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_PAGEDOWN,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_LEFT_SCROLL,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_LEFT_SCROLL,
_360_JOY_BUTTON_LB);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_PAUSEMENU,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_PAUSEMENU,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_OTHER_STICK_PRESS,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_OTHER_STICK_PRESS,
_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);
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);
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);
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);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_JUMP,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_JUMP,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_BACKWARD,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_BACKWARD,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_RIGHT,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_LOOK_RIGHT,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_LOOK_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_LOOK_DOWN,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_LOOK_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_ACTION,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_ACTION,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_LEFT_SCROLL,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_LEFT_SCROLL,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_PAUSEMENU,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_PAUSEMENU,
_360_JOY_BUTTON_START);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_DROP,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_DROP,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_CRAFTING,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_CRAFTING,
_360_JOY_BUTTON_X);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_1,
MINECRAFT_ACTION_RENDER_THIRD_PERSON,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_DPAD_LEFT,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_DPAD_UP,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_A,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_X,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_OK,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_OK,
_360_JOY_BUTTON_A);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_CANCEL,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_CANCEL,
_360_JOY_BUTTON_B);
InputManager.SetGameJoypadMaps(
PlatformInput.SetGameJoypadMaps(
MAP_STYLE_2, ACTION_MENU_UP,
_360_JOY_BUTTON_DPAD_UP | _360_JOY_BUTTON_LSTICK_UP);
InputManager.SetGameJoypadMaps(
PlatformInput.SetGameJoypadMaps(
MAP_STYLE_2, ACTION_MENU_DOWN,
_360_JOY_BUTTON_DPAD_DOWN | _360_JOY_BUTTON_LSTICK_DOWN);
InputManager.SetGameJoypadMaps(
PlatformInput.SetGameJoypadMaps(
MAP_STYLE_2, ACTION_MENU_LEFT,
_360_JOY_BUTTON_DPAD_LEFT | _360_JOY_BUTTON_LSTICK_LEFT);
InputManager.SetGameJoypadMaps(
PlatformInput.SetGameJoypadMaps(
MAP_STYLE_2, ACTION_MENU_RIGHT,
_360_JOY_BUTTON_DPAD_RIGHT | _360_JOY_BUTTON_LSTICK_RIGHT);
InputManager.SetGameJoypadMaps(
PlatformInput.SetGameJoypadMaps(
MAP_STYLE_2, ACTION_MENU_PAGEUP,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_RIGHT_SCROLL,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_RIGHT_SCROLL,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_JUMP,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_JUMP,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_BACKWARD,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_BACKWARD,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_RIGHT,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_LOOK_RIGHT,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_LOOK_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_LOOK_DOWN,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_LOOK_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_ACTION,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_ACTION,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_LEFT_SCROLL,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_LEFT_SCROLL,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_PAUSEMENU,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_PAUSEMENU,
_360_JOY_BUTTON_START);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_DROP,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_DROP,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_CRAFTING,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_CRAFTING,
_360_JOY_BUTTON_X);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_2,
MINECRAFT_ACTION_RENDER_THIRD_PERSON,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_PAUSEMENU,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_PAUSEMENU,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_OTHER_STICK_PRESS,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_OTHER_STICK_PRESS,
_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);
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);
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);
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);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_DPAD_LEFT,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_DPAD_UP,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_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);
}
@ -474,12 +474,12 @@ int main(int argc, const char* argv[]) {
// Set the number of possible joypad layouts that the user can switch
// 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
DefineActions();
InputManager.SetJoypadMapVal(0, 0);
InputManager.SetKeyRepeatRate(0.3f, 0.2f);
PlatformInput.SetJoypadMapVal(0, 0);
PlatformInput.SetKeyRepeatRate(0.3f, 0.2f);
// Initialise the profile manager with the game Title ID, Offer ID, a
// 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);
}
app.UpdateTime();
InputManager.Tick();
PlatformInput.Tick();
ProfileManager.Tick();

View file

@ -74,302 +74,302 @@ void DefineActions(void) {
// 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);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_B,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_Y,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_CANCEL,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_CANCEL,
_360_JOY_BUTTON_B);
InputManager.SetGameJoypadMaps(
PlatformInput.SetGameJoypadMaps(
MAP_STYLE_0, ACTION_MENU_UP,
_360_JOY_BUTTON_DPAD_UP | _360_JOY_BUTTON_LSTICK_UP);
InputManager.SetGameJoypadMaps(
PlatformInput.SetGameJoypadMaps(
MAP_STYLE_0, ACTION_MENU_DOWN,
_360_JOY_BUTTON_DPAD_DOWN | _360_JOY_BUTTON_LSTICK_DOWN);
InputManager.SetGameJoypadMaps(
PlatformInput.SetGameJoypadMaps(
MAP_STYLE_0, ACTION_MENU_LEFT,
_360_JOY_BUTTON_DPAD_LEFT | _360_JOY_BUTTON_LSTICK_LEFT);
InputManager.SetGameJoypadMaps(
PlatformInput.SetGameJoypadMaps(
MAP_STYLE_0, ACTION_MENU_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_PAGEDOWN,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_PAGEDOWN,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_LEFT_SCROLL,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_LEFT_SCROLL,
_360_JOY_BUTTON_LB);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_PAUSEMENU,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_PAUSEMENU,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_OTHER_STICK_PRESS,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_OTHER_STICK_PRESS,
_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);
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);
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);
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);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_JUMP,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_JUMP,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_BACKWARD,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_BACKWARD,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_RIGHT,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_LOOK_RIGHT,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_LOOK_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_LOOK_DOWN,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_LOOK_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_ACTION,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_ACTION,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_LEFT_SCROLL,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_LEFT_SCROLL,
_360_JOY_BUTTON_LB);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_INVENTORY,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_INVENTORY,
_360_JOY_BUTTON_Y);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_PAUSEMENU,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_PAUSEMENU,
_360_JOY_BUTTON_START);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_DROP,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_DROP,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_CRAFTING,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_CRAFTING,
_360_JOY_BUTTON_X);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_0,
MINECRAFT_ACTION_RENDER_THIRD_PERSON,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_DPAD_LEFT,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_DPAD_UP,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_A,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_X,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_OK,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_OK,
_360_JOY_BUTTON_A);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_CANCEL,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_CANCEL,
_360_JOY_BUTTON_B);
InputManager.SetGameJoypadMaps(
PlatformInput.SetGameJoypadMaps(
MAP_STYLE_1, ACTION_MENU_UP,
_360_JOY_BUTTON_DPAD_UP | _360_JOY_BUTTON_LSTICK_UP);
InputManager.SetGameJoypadMaps(
PlatformInput.SetGameJoypadMaps(
MAP_STYLE_1, ACTION_MENU_DOWN,
_360_JOY_BUTTON_DPAD_DOWN | _360_JOY_BUTTON_LSTICK_DOWN);
InputManager.SetGameJoypadMaps(
PlatformInput.SetGameJoypadMaps(
MAP_STYLE_1, ACTION_MENU_LEFT,
_360_JOY_BUTTON_DPAD_LEFT | _360_JOY_BUTTON_LSTICK_LEFT);
InputManager.SetGameJoypadMaps(
PlatformInput.SetGameJoypadMaps(
MAP_STYLE_1, ACTION_MENU_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_PAGEDOWN,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_PAGEDOWN,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_LEFT_SCROLL,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_LEFT_SCROLL,
_360_JOY_BUTTON_LB);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_PAUSEMENU,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_PAUSEMENU,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_OTHER_STICK_PRESS,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_OTHER_STICK_PRESS,
_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);
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);
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);
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);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_JUMP,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_JUMP,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_BACKWARD,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_BACKWARD,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_RIGHT,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_LOOK_RIGHT,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_LOOK_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_LOOK_DOWN,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_LOOK_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_ACTION,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_ACTION,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_LEFT_SCROLL,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_LEFT_SCROLL,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_PAUSEMENU,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_PAUSEMENU,
_360_JOY_BUTTON_START);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_DROP,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_DROP,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_CRAFTING,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_CRAFTING,
_360_JOY_BUTTON_X);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_1,
MINECRAFT_ACTION_RENDER_THIRD_PERSON,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_DPAD_LEFT,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_DPAD_UP,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_A,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_X,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_OK,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_OK,
_360_JOY_BUTTON_A);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_CANCEL,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_CANCEL,
_360_JOY_BUTTON_B);
InputManager.SetGameJoypadMaps(
PlatformInput.SetGameJoypadMaps(
MAP_STYLE_2, ACTION_MENU_UP,
_360_JOY_BUTTON_DPAD_UP | _360_JOY_BUTTON_LSTICK_UP);
InputManager.SetGameJoypadMaps(
PlatformInput.SetGameJoypadMaps(
MAP_STYLE_2, ACTION_MENU_DOWN,
_360_JOY_BUTTON_DPAD_DOWN | _360_JOY_BUTTON_LSTICK_DOWN);
InputManager.SetGameJoypadMaps(
PlatformInput.SetGameJoypadMaps(
MAP_STYLE_2, ACTION_MENU_LEFT,
_360_JOY_BUTTON_DPAD_LEFT | _360_JOY_BUTTON_LSTICK_LEFT);
InputManager.SetGameJoypadMaps(
PlatformInput.SetGameJoypadMaps(
MAP_STYLE_2, ACTION_MENU_RIGHT,
_360_JOY_BUTTON_DPAD_RIGHT | _360_JOY_BUTTON_LSTICK_RIGHT);
InputManager.SetGameJoypadMaps(
PlatformInput.SetGameJoypadMaps(
MAP_STYLE_2, ACTION_MENU_PAGEUP,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_RIGHT_SCROLL,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_RIGHT_SCROLL,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_JUMP,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_JUMP,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_BACKWARD,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_BACKWARD,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_RIGHT,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_LOOK_RIGHT,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_LOOK_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_LOOK_DOWN,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_LOOK_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_ACTION,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_ACTION,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_LEFT_SCROLL,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_LEFT_SCROLL,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_PAUSEMENU,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_PAUSEMENU,
_360_JOY_BUTTON_START);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_DROP,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_DROP,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_CRAFTING,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_CRAFTING,
_360_JOY_BUTTON_X);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_2,
MINECRAFT_ACTION_RENDER_THIRD_PERSON,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_PAUSEMENU,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_PAUSEMENU,
_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_OTHER_STICK_PRESS,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_OTHER_STICK_PRESS,
_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);
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);
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);
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);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_DPAD_LEFT,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_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);
InputManager.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_DPAD_UP,
PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_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);
}
@ -718,12 +718,12 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
// Set the number of possible joypad layouts that the user can switch
// 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
DefineActions();
InputManager.SetJoypadMapVal(0, 0);
InputManager.SetKeyRepeatRate(0.3f, 0.2f);
PlatformInput.SetJoypadMapVal(0, 0);
PlatformInput.SetKeyRepeatRate(0.3f, 0.2f);
// Initialise the profile manager with the game Title ID, Offer ID, a
// profile version number, and the number of profile values and settings
@ -790,7 +790,7 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
// }
app.UpdateTime();
InputManager.Tick();
PlatformInput.Tick();
// ProfileManager.Tick();

View file

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

View file

@ -5,7 +5,7 @@
#include <algorithm>
#include "platform/PlatformTypes.h"
#include "platform/sdl2/Input.h"
#include "platform/input/input.h"
#include "platform/sdl2/Render.h"
#include "Facing.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
// use the primary player's settings
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
// alpha setting, and display at default value

View file

@ -8,7 +8,7 @@
#include <string>
#include <vector>
#include "platform/sdl2/Input.h"
#include "platform/input/input.h"
#include "Button.h"
#include "MessageScreen.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
if (g_NetworkManager.IsLocalGame() &&
g_NetworkManager.GetPlayerCount() == 1)
gameServices().setXuiServerAction(InputManager.GetPrimaryPad(),
gameServices().setXuiServerAction(PlatformInput.GetPrimaryPad(),
eXuiServerAction_PauseServer, (void*)true);
buttons.push_back(new Button(1, width / 2 - 100, height / 4 + 24 * 5 + yo,
I18n::get(L"menu.returnToMenu")));
@ -91,7 +91,7 @@ void PauseScreen::buttonClicked(Button* button) {
exitWorld(minecraft, true);
}
if (button->id == 4) {
gameServices().setXuiServerAction(InputManager.GetPrimaryPad(),
gameServices().setXuiServerAction(PlatformInput.GetPrimaryPad(),
eXuiServerAction_PauseServer, (void*)false);
minecraft->setScreen(nullptr);
// minecraft->grabMouse(); // 4J - removed

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -28,8 +28,8 @@
#include "minecraft/world/item/Item.h"
#include "minecraft/world/level/tile/Tile.h"
// 4J Stu - Added for tutorial callbacks
#include "platform/InputActions.h"
#include "platform/sdl2/Input.h"
#include "platform/input/InputActions.h"
#include "platform/input/input.h"
#include "platform/sdl2/Profile.h"
#include "platform/sdl2/Render.h"
#include "app/common/App_structs.h"
@ -381,7 +381,7 @@ void LocalPlayer::aiStep() {
// snap y rotation to nearest 90 degree axis aligned value
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)) {
xd = -0.15 * cos(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
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,
false);
m_bIsIdle = true;
} 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
if (g_NetworkManager.GetPlayerCount() > 1) {
// only do it for this player here - each player will run this code

View file

@ -9,7 +9,7 @@
#include <numbers>
#include "platform/PlatformTypes.h"
#include "platform/sdl2/Input.h"
#include "platform/input/input.h"
#include "platform/sdl2/Render.h"
#include "BossMobGuiInfo.h"
#include "Chunk.h"
@ -274,7 +274,7 @@ void GameRenderer::tick(bool first) // 4J - add bFirst
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
// once per frame
@ -1047,8 +1047,8 @@ void GameRenderer::render(float a, bool bFirst) {
ScreenSizeCalculator ssc(mc->options, mc->width, mc->height);
int screenWidth = ssc.getWidth();
int screenHeight = ssc.getHeight();
int xMouse = InputManager.GetMouseX() * screenWidth / mc->width;
int yMouse = InputManager.GetMouseY() * screenHeight / mc->height - 1;
int xMouse = PlatformInput.GetMouseX() * screenWidth / mc->width;
int yMouse = PlatformInput.GetMouseY() * screenHeight / mc->height - 1;
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
// players.
bool updateChunks =
(mc->player == mc->localplayers[InputManager.GetPrimaryPad()]);
(mc->player == mc->localplayers[PlatformInput.GetPrimaryPad()]);
// if (mc->cameraTargetPlayer == nullptr) // 4J - removed condition as we
// want to update this is mc->player changes for different local players

View file

@ -16,7 +16,7 @@
#include <utility>
#include "platform/PlatformTypes.h"
#include "platform/sdl2/Input.h"
#include "platform/input/input.h"
#include "platform/sdl2/Render.h"
#include "Chunk.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
// actually exiting the game, so only when the primary player sets there
// level to nullptr
if (playerIndex == InputManager.GetPrimaryPad()) {
if (playerIndex == PlatformInput.GetPrimaryPad()) {
RenderManager.CBuffDeleteAll();
{
std::lock_guard<std::mutex> lock(m_csRenderableTileEntities);
@ -1164,7 +1164,7 @@ void LevelRenderer::renderClouds(float alpha) {
int playerIndex = mc->player->GetXboxPad();
// 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) {
return;
}
@ -1178,7 +1178,7 @@ void LevelRenderer::renderClouds(float alpha) {
}
if (gameServices().debugSettingsOn()) {
if (gameServices().debugGetMask(InputManager.GetPrimaryPad()) &
if (gameServices().debugGetMask(PlatformInput.GetPrimaryPad()) &
(1L << eDebugSetting_FreezeTime)) {
iTicks = m_freezeticks;
}
@ -1256,7 +1256,7 @@ void LevelRenderer::renderClouds(float alpha) {
glEnable(GL_CULL_FACE);
if (gameServices().debugSettingsOn()) {
if (!(gameServices().debugGetMask(InputManager.GetPrimaryPad()) &
if (!(gameServices().debugGetMask(PlatformInput.GetPrimaryPad()) &
(1L << eDebugSetting_FreezeTime))) {
m_freezeticks = iTicks;
}
@ -1442,7 +1442,7 @@ void LevelRenderer::renderAdvancedClouds(float alpha) {
int iTicks = ticks;
if (gameServices().debugSettingsOn()) {
if (gameServices().debugGetMask(InputManager.GetPrimaryPad()) &
if (gameServices().debugGetMask(PlatformInput.GetPrimaryPad()) &
(1L << eDebugSetting_FreezeTime)) {
iTicks = m_freezeticks;
}
@ -1689,7 +1689,7 @@ void LevelRenderer::renderAdvancedClouds(float alpha) {
glEnable(GL_CULL_FACE);
if (gameServices().debugSettingsOn()) {
if (!(gameServices().debugGetMask(InputManager.GetPrimaryPad()) &
if (!(gameServices().debugGetMask(PlatformInput.GetPrimaryPad()) &
(1L << eDebugSetting_FreezeTime))) {
m_freezeticks = iTicks;
}

View file

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

View file

@ -7,7 +7,7 @@
#include <algorithm>
#include <utility>
#include "platform/sdl2/Input.h"
#include "platform/input/input.h"
#include "DLCTexturePack.h"
#include "DefaultTexturePack.h"
#include "minecraft/GameEnums.h"
@ -151,7 +151,7 @@ bool TexturePackRepository::selectTexturePackById(std::uint32_t id) {
selectSkin(newPack);
if (newPack->hasData()) {
gameServices().setAction(InputManager.GetPrimaryPad(),
gameServices().setAction(PlatformInput.GetPrimaryPad(),
eAppAction_ReloadTexturePack);
} else {
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);
// Fail safely
if (selectSkin(DEFAULT_TEXTURE_PACK)) {
gameServices().setAction(InputManager.GetPrimaryPad(),
gameServices().setAction(PlatformInput.GetPrimaryPad(),
eAppAction_ReloadTexturePack);
}
}

View file

@ -66,7 +66,7 @@
#if defined(SPLIT_SAVES)
#include "minecraft/world/level/storage/ConsoleSaveFileIO/ConsoleSaveFileSplit.h"
#endif
#include "platform/sdl2/Input.h"
#include "platform/input/input.h"
#include "platform/ShutdownManager.h"
#include "app/common/Console_Debug_enum.h"
#include "app/common/GameRules/LevelGeneration/ConsoleSchematicFile.h"
@ -832,7 +832,7 @@ void MinecraftServer::saveAllChunks() {
void MinecraftServer::saveGameRules() {
#if !defined(_CONTENT_PACKAGE)
if (gameServices().debugSettingsOn() &&
gameServices().debugGetMask(InputManager.GetPrimaryPad()) &
gameServices().debugGetMask(PlatformInput.GetPrimaryPad()) &
(1L << eDebugSetting_DistributableSave)) {
// Do nothing
} else
@ -903,7 +903,7 @@ void MinecraftServer::stopServer(bool didInit) {
// also need to check for a profile switch here - primary player signs out,
// and another player signs in before dismissing the dash
if ((m_bPrimaryPlayerSignedOut == false) &&
ProfileManager.IsSignedIn(InputManager.GetPrimaryPad())) {
ProfileManager.IsSignedIn(PlatformInput.GetPrimaryPad())) {
// 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
// initialisation.

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

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