mirror of
https://github.com/LCEMP/LCEMP.git
synced 2026-04-27 09:23:57 +00:00
add keyboard/mouse controls for menus and gameplay
wired up keyboard and mouse input for menu navigation, inventory cursor, crafting, and general UI interaction. added WASD movement, mouse look, left ctrl sprint, left shift sneak, and all the keybinds for gameplay. also fixed the sound engine crashing when it cant find a sound asset, and set up the x64 build with proper post-build steps for dlls and redist
This commit is contained in:
parent
adfd58807e
commit
7da64d57a8
|
|
@ -456,6 +456,9 @@ void SoundEngine::updateMiles()
|
|||
|
||||
if ( SoundInfo.Status != MILESEVENT_SOUND_STATUS_COMPLETE )
|
||||
{
|
||||
if (SoundInfo.Sample == NULL)
|
||||
continue;
|
||||
|
||||
// apply the master volume
|
||||
// watch for the 'special' volume levels
|
||||
bool isThunder = false;
|
||||
|
|
|
|||
|
|
@ -15,6 +15,9 @@
|
|||
|
||||
#ifdef _WINDOWS64
|
||||
#include "..\..\KeyboardMouseInput.h"
|
||||
#include "UI.h"
|
||||
|
||||
SavedInventoryCursorPos g_savedInventoryCursorPos = { 0.0f, 0.0f, false };
|
||||
#endif
|
||||
|
||||
IUIScene_AbstractContainerMenu::IUIScene_AbstractContainerMenu()
|
||||
|
|
@ -470,20 +473,26 @@ void IUIScene_AbstractContainerMenu::onMouseTick()
|
|||
#ifdef _WINDOWS64
|
||||
if (!g_KBMInput.IsMouseGrabbed())
|
||||
{
|
||||
int dx = g_KBMInput.GetMouseDeltaX();
|
||||
int dy = g_KBMInput.GetMouseDeltaY();
|
||||
if (dx != 0 || dy != 0)
|
||||
{
|
||||
float sensitivity = (float)app.GetGameSettings(iPad, eGameSetting_Sensitivity_InMenu) / 100.0f;
|
||||
float mouseScale = sensitivity * 1.0f;
|
||||
vPointerPos.x += (float)dx * mouseScale;
|
||||
vPointerPos.y += (float)dy * mouseScale;
|
||||
|
||||
if (vPointerPos.x < m_fPointerMinX) vPointerPos.x = m_fPointerMinX;
|
||||
else if (vPointerPos.x > m_fPointerMaxX) vPointerPos.x = m_fPointerMaxX;
|
||||
if (vPointerPos.y < m_fPointerMinY) vPointerPos.y = m_fPointerMinY;
|
||||
else if (vPointerPos.y > m_fPointerMaxY) vPointerPos.y = m_fPointerMaxY;
|
||||
int deltaX = g_KBMInput.GetMouseDeltaX();
|
||||
int deltaY = g_KBMInput.GetMouseDeltaY();
|
||||
|
||||
extern HWND g_hWnd;
|
||||
RECT rc;
|
||||
GetClientRect(g_hWnd, &rc);
|
||||
int winW = rc.right - rc.left;
|
||||
int winH = rc.bottom - rc.top;
|
||||
|
||||
if (winW > 0 && winH > 0)
|
||||
{
|
||||
float scaleX = (float)getMovieWidth() / (float)winW;
|
||||
float scaleY = (float)getMovieHeight() / (float)winH;
|
||||
|
||||
vPointerPos.x += (float)deltaX * scaleX;
|
||||
vPointerPos.y += (float)deltaY * scaleY;
|
||||
}
|
||||
|
||||
if (deltaX != 0 || deltaY != 0)
|
||||
{
|
||||
bStickInput = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -706,7 +715,11 @@ void IUIScene_AbstractContainerMenu::onMouseTick()
|
|||
|
||||
// If there is no stick input, and we are over a slot, then snap pointer to slot centre.
|
||||
// 4J - TomK - only if this particular component allows so!
|
||||
#ifdef _WINDOWS64
|
||||
if(g_KBMInput.IsMouseGrabbed() && CanHaveFocus(eSectionUnderPointer))
|
||||
#else
|
||||
if(CanHaveFocus(eSectionUnderPointer))
|
||||
#endif
|
||||
{
|
||||
vPointerPos.x = vSnapPos.x;
|
||||
vPointerPos.y = vSnapPos.y;
|
||||
|
|
@ -714,7 +727,8 @@ void IUIScene_AbstractContainerMenu::onMouseTick()
|
|||
}
|
||||
}
|
||||
|
||||
// Clamp to pointer extents.
|
||||
|
||||
// Clamp to pointer extents
|
||||
if ( vPointerPos.x < m_fPointerMinX ) vPointerPos.x = m_fPointerMinX;
|
||||
else if ( vPointerPos.x > m_fPointerMaxX ) vPointerPos.x = m_fPointerMaxX;
|
||||
if ( vPointerPos.y < m_fPointerMinY ) vPointerPos.y = m_fPointerMinY;
|
||||
|
|
@ -1236,8 +1250,15 @@ void IUIScene_AbstractContainerMenu::onMouseTick()
|
|||
|
||||
|
||||
// Offset back to image top left.
|
||||
vPointerPos.x -= m_fPointerImageOffsetX;
|
||||
vPointerPos.y -= m_fPointerImageOffsetY;
|
||||
#ifdef _WINDOWS64
|
||||
if (g_KBMInput.IsMouseGrabbed())
|
||||
{
|
||||
#endif
|
||||
vPointerPos.x -= m_fPointerImageOffsetX;
|
||||
vPointerPos.y -= m_fPointerImageOffsetY;
|
||||
#ifdef _WINDOWS64
|
||||
}
|
||||
#endif
|
||||
|
||||
// Update pointer position.
|
||||
// 4J-PB - do not allow sub pixel positions or we get broken lines in box edges
|
||||
|
|
|
|||
|
|
@ -1,5 +1,15 @@
|
|||
#pragma once
|
||||
|
||||
#ifdef _WINDOWS64
|
||||
struct SavedInventoryCursorPos
|
||||
{
|
||||
float x;
|
||||
float y;
|
||||
bool hasSavedPos;
|
||||
};
|
||||
extern SavedInventoryCursorPos g_savedInventoryCursorPos;
|
||||
#endif
|
||||
|
||||
// Uncomment to enable tap input detection to jump 1 slot. Doesn't work particularly well yet, and I feel the system does not need it.
|
||||
// Would probably be required if we decide to slow down the pointer movement.
|
||||
// 4J Stu - There was a request to be able to navigate the scenes with the dpad, so I have used much of the TAP_DETECTION
|
||||
|
|
@ -220,4 +230,6 @@ protected:
|
|||
|
||||
public:
|
||||
virtual int getPad() = 0;
|
||||
virtual int getMovieWidth() = 0;
|
||||
virtual int getMovieHeight() = 0;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
#include "..\..\..\Minecraft.World\net.minecraft.world.entity.boss.enderdragon.h"
|
||||
#ifdef _WINDOWS64
|
||||
#include "..\..\KeyboardMouseInput.h"
|
||||
#include "UIControl_Slider.h"
|
||||
#endif
|
||||
#include "..\..\EnderDragonRenderer.h"
|
||||
#include "..\..\MultiPlayerLocalPlayer.h"
|
||||
|
|
@ -689,6 +690,100 @@ void UIController::tickInput()
|
|||
else
|
||||
#endif
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
if (!g_KBMInput.IsMouseGrabbed())
|
||||
{
|
||||
UIScene *pScene = NULL;
|
||||
for (int grp = 0; grp < eUIGroup_COUNT && !pScene; ++grp)
|
||||
{
|
||||
pScene = m_groups[grp]->GetTopScene(eUILayer_Debug);
|
||||
if (!pScene) pScene = m_groups[grp]->GetTopScene(eUILayer_Tooltips);
|
||||
if (!pScene) pScene = m_groups[grp]->GetTopScene(eUILayer_Error);
|
||||
if (!pScene) pScene = m_groups[grp]->GetTopScene(eUILayer_Alert);
|
||||
if (!pScene) pScene = m_groups[grp]->GetTopScene(eUILayer_Popup);
|
||||
if (!pScene) pScene = m_groups[grp]->GetTopScene(eUILayer_Fullscreen);
|
||||
if (!pScene) pScene = m_groups[grp]->GetTopScene(eUILayer_Scene);
|
||||
}
|
||||
if (pScene && pScene->getMovie())
|
||||
{
|
||||
Iggy *movie = pScene->getMovie();
|
||||
F32 mouseX = (F32)g_KBMInput.GetMouseX();
|
||||
F32 mouseY = (F32)g_KBMInput.GetMouseY();
|
||||
|
||||
extern HWND g_hWnd;
|
||||
if (g_hWnd)
|
||||
{
|
||||
RECT rc;
|
||||
GetClientRect(g_hWnd, &rc);
|
||||
int winW = rc.right - rc.left;
|
||||
int winH = rc.bottom - rc.top;
|
||||
if (winW > 0 && winH > 0)
|
||||
{
|
||||
mouseX = mouseX * (m_fScreenWidth / (F32)winW);
|
||||
mouseY = mouseY * (m_fScreenHeight / (F32)winH);
|
||||
}
|
||||
}
|
||||
|
||||
IggyFocusHandle currentFocus = IGGY_FOCUS_NULL;
|
||||
IggyFocusableObject focusables[64];
|
||||
S32 numFocusables = 0;
|
||||
IggyPlayerGetFocusableObjects(movie, ¤tFocus, focusables, 64, &numFocusables);
|
||||
|
||||
IggyFocusHandle hitObject = IGGY_FOCUS_NULL;
|
||||
for (S32 i = 0; i < numFocusables; ++i)
|
||||
{
|
||||
if (mouseX >= focusables[i].x0 && mouseX <= focusables[i].x1 &&
|
||||
mouseY >= focusables[i].y0 && mouseY <= focusables[i].y1)
|
||||
{
|
||||
hitObject = focusables[i].object;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (hitObject != IGGY_FOCUS_NULL && hitObject != currentFocus)
|
||||
{
|
||||
IggyPlayerSetFocusRS(movie, hitObject, 0);
|
||||
}
|
||||
|
||||
if (g_KBMInput.IsMouseButtonDown(0) || g_KBMInput.IsMouseButtonPressed(0))
|
||||
{
|
||||
vector<UIControl *> *controls = pScene->GetControls();
|
||||
if (controls)
|
||||
{
|
||||
for (size_t i = 0; i < controls->size(); i++)
|
||||
{
|
||||
UIControl *ctrl = (*controls)[i];
|
||||
if (ctrl && ctrl->getControlType() == UIControl::eSlider && ctrl->getVisible())
|
||||
{
|
||||
S32 cx = ctrl->getXPos();
|
||||
S32 cy = ctrl->getYPos();
|
||||
S32 cw = ctrl->getWidth();
|
||||
S32 ch = ctrl->getHeight();
|
||||
|
||||
if (mouseX >= cx && mouseX <= cx + cw &&
|
||||
mouseY >= cy && mouseY <= cy + ch)
|
||||
{
|
||||
UIControl_Slider *pSlider = (UIControl_Slider *)ctrl;
|
||||
float fNewSliderPos = (mouseX - (float)cx) / (float)pSlider->GetRealWidth();
|
||||
if (fNewSliderPos < 0.0f) fNewSliderPos = 0.0f;
|
||||
if (fNewSliderPos > 1.0f) fNewSliderPos = 1.0f;
|
||||
pSlider->SetSliderTouchPos(fNewSliderPos);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int wheel = g_KBMInput.GetMouseWheel();
|
||||
if (wheel > 0)
|
||||
handleKeyPress(0, ACTION_MENU_UP);
|
||||
else if (wheel < 0)
|
||||
handleKeyPress(0, ACTION_MENU_DOWN);
|
||||
}
|
||||
#endif
|
||||
handleInput();
|
||||
++m_accumulatedTicks;
|
||||
}
|
||||
|
|
@ -3050,4 +3145,4 @@ void UIController::SendTouchInput(unsigned int iPad, unsigned int key, bool bPre
|
|||
}
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -109,6 +109,8 @@ public:
|
|||
#ifdef __PSVITA__
|
||||
UILayer *GetParentLayer() {return m_parentLayer;}
|
||||
EUIGroup GetParentLayerGroup() {return m_parentLayer->m_parentGroup->GetGroup();}
|
||||
#endif
|
||||
#if defined(__PSVITA__) || defined(_WINDOWS64)
|
||||
vector<UIControl *> *GetControls() {return &m_controls;}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,10 @@
|
|||
#include "UI.h"
|
||||
#include "UIScene_AbstractContainerMenu.h"
|
||||
|
||||
#ifdef _WINDOWS64
|
||||
#include "..\..\KeyboardMouseInput.h"
|
||||
#endif
|
||||
|
||||
#include "..\..\..\Minecraft.World\net.minecraft.world.inventory.h"
|
||||
#include "..\..\..\Minecraft.World\net.minecraft.world.item.h"
|
||||
#include "..\..\MultiplayerLocalPlayer.h"
|
||||
|
|
@ -35,6 +39,15 @@ UIScene_AbstractContainerMenu::~UIScene_AbstractContainerMenu()
|
|||
void UIScene_AbstractContainerMenu::handleDestroy()
|
||||
{
|
||||
app.DebugPrintf("UIScene_AbstractContainerMenu::handleDestroy\n");
|
||||
|
||||
#ifdef _WINDOWS64
|
||||
g_savedInventoryCursorPos.x = m_pointerPos.x;
|
||||
g_savedInventoryCursorPos.y = m_pointerPos.y;
|
||||
g_savedInventoryCursorPos.hasSavedPos = true;
|
||||
|
||||
while (ShowCursor(TRUE) < 0);
|
||||
#endif
|
||||
|
||||
Minecraft *pMinecraft = Minecraft::GetInstance();
|
||||
if( pMinecraft->localgameModes[m_iPad] != NULL )
|
||||
{
|
||||
|
|
@ -59,6 +72,7 @@ void UIScene_AbstractContainerMenu::handleDestroy()
|
|||
ui.OverrideSFX(m_iPad,ACTION_MENU_RIGHT,false);
|
||||
ui.OverrideSFX(m_iPad,ACTION_MENU_UP,false);
|
||||
ui.OverrideSFX(m_iPad,ACTION_MENU_DOWN,false);
|
||||
|
||||
}
|
||||
|
||||
void UIScene_AbstractContainerMenu::InitDataAssociations(int iPad, AbstractContainerMenu *menu, int startIndex)
|
||||
|
|
@ -67,6 +81,9 @@ void UIScene_AbstractContainerMenu::InitDataAssociations(int iPad, AbstractConta
|
|||
|
||||
void UIScene_AbstractContainerMenu::PlatformInitialize(int iPad, int startIndex)
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
while (ShowCursor(FALSE) >= 0);
|
||||
#endif
|
||||
|
||||
m_labelInventory.init( app.GetString(IDS_INVENTORY) );
|
||||
|
||||
|
|
@ -106,8 +123,8 @@ void UIScene_AbstractContainerMenu::PlatformInitialize(int iPad, int startIndex)
|
|||
#ifdef __ORBIS__
|
||||
// we need to map the touchpad rectangle to the UI rectangle. While it works great for the creative menu, it is much too sensitive for the smaller menus.
|
||||
//X coordinate of the touch point (0 to 1919)
|
||||
//Y coordinate of the touch point (0 to 941: DUALSHOCK®4 wireless controllers and the CUH-ZCT1J/CAP-ZCT1J/CAP-ZCT1U controllers for the PlayStation®4 development tool,
|
||||
//0 to 753: JDX-1000x series controllers for the PlayStation®4 development tool,)
|
||||
//Y coordinate of the touch point (0 to 941: DUALSHOCK<EFBFBD>4 wireless controllers and the CUH-ZCT1J/CAP-ZCT1J/CAP-ZCT1U controllers for the PlayStation<6F>4 development tool,
|
||||
//0 to 753: JDX-1000x series controllers for the PlayStation<EFBFBD>4 development tool,)
|
||||
m_fTouchPadMulX=fPanelWidth/1919.0f;
|
||||
m_fTouchPadMulY=fPanelHeight/941.0f;
|
||||
m_fTouchPadDeadZoneX=15.0f*m_fTouchPadMulX;
|
||||
|
|
@ -151,17 +168,39 @@ void UIScene_AbstractContainerMenu::PlatformInitialize(int iPad, int startIndex)
|
|||
//m_pointerControl->SetPosition( &vPointerPos );
|
||||
m_pointerPos = vPointerPos;
|
||||
|
||||
#ifdef _WINDOWS64
|
||||
if (g_savedInventoryCursorPos.hasSavedPos)
|
||||
{
|
||||
m_pointerPos.x = g_savedInventoryCursorPos.x;
|
||||
m_pointerPos.y = g_savedInventoryCursorPos.y;
|
||||
|
||||
if (m_pointerPos.x < m_fPointerMinX) m_pointerPos.x = m_fPointerMinX;
|
||||
if (m_pointerPos.x > m_fPointerMaxX) m_pointerPos.x = m_fPointerMaxX;
|
||||
if (m_pointerPos.y < m_fPointerMinY) m_pointerPos.y = m_fPointerMinY;
|
||||
if (m_pointerPos.y > m_fPointerMaxY) m_pointerPos.y = m_fPointerMaxY;
|
||||
}
|
||||
|
||||
extern HWND g_hWnd;
|
||||
RECT rc;
|
||||
GetClientRect(g_hWnd, &rc);
|
||||
POINT center;
|
||||
center.x = (rc.right - rc.left) / 2;
|
||||
center.y = (rc.bottom - rc.top) / 2;
|
||||
ClientToScreen(g_hWnd, ¢er);
|
||||
SetCursorPos(center.x, center.y);
|
||||
#endif
|
||||
|
||||
IggyEvent mouseEvent;
|
||||
S32 width, height;
|
||||
m_parentLayer->getRenderDimensions(width, height);
|
||||
S32 x = m_pointerPos.x*((float)width/m_movieWidth);
|
||||
S32 y = m_pointerPos.y*((float)height/m_movieHeight);
|
||||
S32 y = m_pointerPos.y*((float)height/m_movieHeight);
|
||||
IggyMakeEventMouseMove( &mouseEvent, x, y);
|
||||
|
||||
IggyEventResult result;
|
||||
IggyPlayerDispatchEventRS ( getMovie() , &mouseEvent , &result );
|
||||
|
||||
#ifdef USE_POINTER_ACCEL
|
||||
#ifdef USE_POINTER_ACCEL
|
||||
m_fPointerVelX = 0.0f;
|
||||
m_fPointerVelY = 0.0f;
|
||||
m_fPointerAccelX = 0.0f;
|
||||
|
|
@ -173,13 +212,19 @@ void UIScene_AbstractContainerMenu::tick()
|
|||
{
|
||||
UIScene::tick();
|
||||
|
||||
#ifdef _WINDOWS64
|
||||
SetCursor(NULL);
|
||||
#endif
|
||||
|
||||
onMouseTick();
|
||||
|
||||
IggyEvent mouseEvent;
|
||||
S32 width, height;
|
||||
m_parentLayer->getRenderDimensions(width, height);
|
||||
S32 x = m_pointerPos.x*((float)width/m_movieWidth);
|
||||
S32 y = m_pointerPos.y*((float)height/m_movieHeight);
|
||||
|
||||
S32 x = (S32)(m_pointerPos.x * ((float)width / m_movieWidth));
|
||||
S32 y = (S32)(m_pointerPos.y * ((float)height / m_movieHeight));
|
||||
|
||||
IggyMakeEventMouseMove( &mouseEvent, x, y);
|
||||
|
||||
// 4J Stu - This seems to be broken on Durango, so do it ourself
|
||||
|
|
@ -192,6 +237,7 @@ void UIScene_AbstractContainerMenu::tick()
|
|||
IggyPlayerDispatchEventRS ( getMovie() , &mouseEvent , &result );
|
||||
}
|
||||
|
||||
|
||||
void UIScene_AbstractContainerMenu::render(S32 width, S32 height, C4JRender::eViewportType viewpBort)
|
||||
{
|
||||
m_cacheSlotRenders = true;
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@ public:
|
|||
virtual void handleDestroy();
|
||||
|
||||
int getPad() { return m_iPad; }
|
||||
int getMovieWidth() { return m_movieWidth; }
|
||||
int getMovieHeight() { return m_movieHeight; }
|
||||
bool getIgnoreInput() { return m_bIgnoreInput; }
|
||||
void setIgnoreInput(bool bVal) { m_bIgnoreInput=bVal; }
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ Input::Input()
|
|||
wasJumping = false;
|
||||
jumping = false;
|
||||
sneaking = false;
|
||||
sprinting = false;
|
||||
|
||||
lReset = false;
|
||||
rReset = false;
|
||||
|
|
@ -93,11 +94,35 @@ void Input::tick(LocalPlayer *player)
|
|||
}
|
||||
|
||||
#ifdef _WINDOWS64
|
||||
if (iPad == 0 && g_KBMInput.IsMouseGrabbed() && pMinecraft->localgameModes[iPad]->isInputAllowed(MINECRAFT_ACTION_SNEAK_TOGGLE))
|
||||
if (iPad == 0 && g_KBMInput.IsMouseGrabbed())
|
||||
{
|
||||
// Left Shift = sneak (hold to crouch)
|
||||
if (pMinecraft->localgameModes[iPad]->isInputAllowed(MINECRAFT_ACTION_SNEAK_TOGGLE))
|
||||
{
|
||||
if (!player->abilities.flying)
|
||||
{
|
||||
sneaking = g_KBMInput.IsKeyDown(KeyboardMouseInput::KEY_SNEAK);
|
||||
}
|
||||
}
|
||||
|
||||
// Left Ctrl + forward = sprint (hold to sprint)
|
||||
if (!player->abilities.flying)
|
||||
{
|
||||
sneaking = g_KBMInput.IsKeyDown(KeyboardMouseInput::KEY_SNEAK);
|
||||
bool ctrlHeld = g_KBMInput.IsKeyDown(KeyboardMouseInput::KEY_SPRINT);
|
||||
bool movingForward = (kbYA > 0.0f);
|
||||
|
||||
if (ctrlHeld && movingForward)
|
||||
{
|
||||
sprinting = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
sprinting = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sprinting = false;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
@ -144,7 +169,7 @@ void Input::tick(LocalPlayer *player)
|
|||
if (iPad == 0 && g_KBMInput.IsMouseGrabbed())
|
||||
{
|
||||
float mouseSensitivity = ((float)app.GetGameSettings(iPad,eGameSetting_Sensitivity_InGame)) / 100.0f;
|
||||
float mouseLookScale = 1.0f;
|
||||
float mouseLookScale = 5.0f;
|
||||
float mx = g_KBMInput.GetLookX(mouseSensitivity * mouseLookScale);
|
||||
float my = g_KBMInput.GetLookY(mouseSensitivity * mouseLookScale);
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,8 @@ public:
|
|||
bool wasJumping;
|
||||
bool jumping;
|
||||
bool sneaking;
|
||||
|
||||
bool sprinting;
|
||||
|
||||
Input(); // 4J - added
|
||||
|
||||
virtual void tick(LocalPlayer *player);
|
||||
|
|
|
|||
|
|
@ -6,6 +6,9 @@ KeyboardMouseInput g_KBMInput;
|
|||
|
||||
extern HWND g_hWnd;
|
||||
|
||||
// Forward declaration
|
||||
static void ClipCursorToWindow(HWND hWnd);
|
||||
|
||||
// coded by notpies fr
|
||||
void KeyboardMouseInput::Init()
|
||||
{
|
||||
|
|
@ -40,10 +43,6 @@ void KeyboardMouseInput::Init()
|
|||
rid.hwndTarget = g_hWnd;
|
||||
RegisterRawInputDevices(&rid, 1, sizeof(rid));
|
||||
|
||||
if (g_hWnd)
|
||||
{
|
||||
while (ShowCursor(FALSE) >= 0) {}
|
||||
}
|
||||
}
|
||||
|
||||
void KeyboardMouseInput::ClearAllState()
|
||||
|
|
@ -226,6 +225,9 @@ void KeyboardMouseInput::SetMouseGrabbed(bool grabbed)
|
|||
m_mouseGrabbed = grabbed;
|
||||
if (grabbed && g_hWnd)
|
||||
{
|
||||
while (ShowCursor(FALSE) >= 0) {}
|
||||
ClipCursorToWindow(g_hWnd);
|
||||
|
||||
RECT rc;
|
||||
GetClientRect(g_hWnd, &rc);
|
||||
POINT center;
|
||||
|
|
@ -237,6 +239,11 @@ void KeyboardMouseInput::SetMouseGrabbed(bool grabbed)
|
|||
m_mouseDeltaAccumX = 0;
|
||||
m_mouseDeltaAccumY = 0;
|
||||
}
|
||||
else if (!grabbed && g_hWnd)
|
||||
{
|
||||
while (ShowCursor(TRUE) < 0) {}
|
||||
ClipCursor(NULL);
|
||||
}
|
||||
}
|
||||
|
||||
static void ClipCursorToWindow(HWND hWnd)
|
||||
|
|
@ -257,8 +264,16 @@ void KeyboardMouseInput::SetWindowFocused(bool focused)
|
|||
m_windowFocused = focused;
|
||||
if (focused)
|
||||
{
|
||||
while (ShowCursor(FALSE) >= 0) {}
|
||||
ClipCursorToWindow(g_hWnd);
|
||||
if (m_mouseGrabbed)
|
||||
{
|
||||
while (ShowCursor(FALSE) >= 0) {}
|
||||
ClipCursorToWindow(g_hWnd);
|
||||
}
|
||||
else
|
||||
{
|
||||
while (ShowCursor(TRUE) < 0) {}
|
||||
ClipCursor(NULL);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -18,9 +18,11 @@ public:
|
|||
static const int KEY_RIGHT = 'D';
|
||||
static const int KEY_JUMP = VK_SPACE;
|
||||
static const int KEY_SNEAK = VK_LSHIFT;
|
||||
static const int KEY_SPRINT = VK_LCONTROL;
|
||||
static const int KEY_INVENTORY = 'E';
|
||||
static const int KEY_DROP = 'Q';
|
||||
static const int KEY_CRAFTING = VK_TAB;
|
||||
static const int KEY_CRAFTING_ALT = 'R';
|
||||
static const int KEY_PAUSE = VK_ESCAPE;
|
||||
static const int KEY_THIRD_PERSON = VK_F5;
|
||||
static const int KEY_DEBUG_INFO = VK_F3;
|
||||
|
|
|
|||
|
|
@ -328,6 +328,12 @@ void LocalPlayer::aiStep()
|
|||
}
|
||||
}
|
||||
if (isSneaking()) sprintTriggerTime = 0;
|
||||
#ifdef _WINDOWS64
|
||||
if (input->sprinting && onGround && enoughFoodToSprint && !isUsingItem() && !hasEffect(MobEffect::blindness) && !isSneaking())
|
||||
{
|
||||
setSprinting(true);
|
||||
}
|
||||
#endif
|
||||
// 4J-PB - try not stopping sprint on collision
|
||||
//if (isSprinting() && (input->ya < runTreshold || horizontalCollision || !enoughFoodToSprint))
|
||||
if (isSprinting() && (input->ya < runTreshold || !enoughFoodToSprint))
|
||||
|
|
|
|||
|
|
@ -1311,6 +1311,17 @@ if not exist "$(TargetDir)\savedata" mkdir "$(TargetDir)\savedata"</Command>
|
|||
<DeploymentType>CopyToHardDrive</DeploymentType>
|
||||
<DeploymentFiles>$(RemoteRoot)=$(ImagePath);$(RemoteRoot)\res=Xbox\res;$(RemoteRoot)=Xbox\AvatarAwards;$(RemoteRoot)\Tutorial=Xbox\Tutorial\Tutorial;$(RemoteRoot)=Xbox\584111F70AAAAAAA;$(RemoteRoot)=Xbox\kinect\speech;$(RemoteRoot)=Xbox\XZP\TMSFiles.xzp</DeploymentFiles>
|
||||
</Deploy>
|
||||
<PostBuildEvent>
|
||||
<Command>copy /Y "$(TargetPath)" "$(ProjectDir)"
|
||||
copy /Y "$(ProjectDir)Windows64\Iggy\lib\redist64\iggy_w64.dll" "$(ProjectDir)"
|
||||
copy /Y "$(ProjectDir)Windows64\Miles\lib\redist64\mss64.dll" "$(ProjectDir)"
|
||||
copy /Y "$(ProjectDir)Windows64\Iggy\lib\redist64\iggy_w64.dll" "$(OutDir)"
|
||||
copy /Y "$(ProjectDir)Windows64\Miles\lib\redist64\mss64.dll" "$(OutDir)"
|
||||
xcopy /Y /I /E "$(ProjectDir)redist64" "$(OutDir)redist64\"
|
||||
if not exist "$(OutDir)Durango\Sound\" mkdir "$(OutDir)Durango\Sound\"
|
||||
copy /Y "$(ProjectDir)Durango\Sound\Minecraft.msscmp" "$(OutDir)Durango\Sound\"</Command>
|
||||
<Message>Copying exe and DLLs to Minecraft.Client and output folders</Message>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Durango'">
|
||||
<ClCompile>
|
||||
|
|
@ -1421,7 +1432,7 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
|
|||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
|
||||
<AdditionalDependencies>d3d11.lib;..\Minecraft.World\x64_Release\Minecraft.World.lib;XInput9_1_0.lib;Windows64\Iggy\lib\iggy_w64.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>d3d11.lib;..\Minecraft.World\x64_Release\Minecraft.World.lib;XInput9_1_0.lib;Windows64\Iggy\lib\iggy_w64.lib;..\Minecraft.Client\Windows64\Miles\Lib\mss64.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ShowProgress>NotSet</ShowProgress>
|
||||
<SuppressStartupBanner>false</SuppressStartupBanner>
|
||||
</Link>
|
||||
|
|
@ -1439,6 +1450,17 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
|
|||
<DeploymentType>CopyToHardDrive</DeploymentType>
|
||||
<DeploymentFiles>$(RemoteRoot)=$(ImagePath);$(RemoteRoot)\res=Xbox\res;$(RemoteRoot)=Xbox\AvatarAwards;$(RemoteRoot)\Tutorial=Xbox\Tutorial\Tutorial;$(RemoteRoot)=Xbox\584111F70AAAAAAA;$(RemoteRoot)=Xbox\kinect\speech;$(RemoteRoot)=Xbox\XZP\TMSFiles.xzp</DeploymentFiles>
|
||||
</Deploy>
|
||||
<PostBuildEvent>
|
||||
<Command>copy /Y "$(TargetPath)" "$(ProjectDir)"
|
||||
copy /Y "$(ProjectDir)Windows64\Iggy\lib\redist64\iggy_w64.dll" "$(ProjectDir)"
|
||||
copy /Y "$(ProjectDir)Windows64\Miles\lib\redist64\mss64.dll" "$(ProjectDir)"
|
||||
copy /Y "$(ProjectDir)Windows64\Iggy\lib\redist64\iggy_w64.dll" "$(OutDir)"
|
||||
copy /Y "$(ProjectDir)Windows64\Miles\lib\redist64\mss64.dll" "$(OutDir)"
|
||||
xcopy /Y /I /E "$(ProjectDir)redist64" "$(OutDir)redist64\"
|
||||
if not exist "$(OutDir)Durango\Sound\" mkdir "$(OutDir)Durango\Sound\"
|
||||
copy /Y "$(ProjectDir)Durango\Sound\Minecraft.msscmp" "$(OutDir)Durango\Sound\"</Command>
|
||||
<Message>Copying exe and DLLs to Minecraft.Client and output folders</Message>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|x64'">
|
||||
<ClCompile>
|
||||
|
|
@ -34081,6 +34103,7 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
|
|||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">true</ExcludedFromBuild>
|
||||
</Library>
|
||||
<Library Include="PSVita\4JLibs\libs\4J_Input.a">
|
||||
<ExcludedFromBuild Condition="'$(Platform)'=='x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|PSVita'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|PSVita'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|PSVita'">true</ExcludedFromBuild>
|
||||
|
|
@ -34125,6 +34148,7 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
|
|||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|Xbox 360'">true</ExcludedFromBuild>
|
||||
</Library>
|
||||
<Library Include="PSVita\4JLibs\libs\4J_Input_d.a">
|
||||
<ExcludedFromBuild Condition="'$(Platform)'=='x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|PSVita'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|PSVita'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|PSVita'">true</ExcludedFromBuild>
|
||||
|
|
@ -34169,6 +34193,7 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
|
|||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|Xbox 360'">true</ExcludedFromBuild>
|
||||
</Library>
|
||||
<Library Include="PSVita\4JLibs\libs\4J_Input_r.a">
|
||||
<ExcludedFromBuild Condition="'$(Platform)'=='x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|PSVita'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|PSVita'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|PSVita'">true</ExcludedFromBuild>
|
||||
|
|
@ -34213,6 +34238,7 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
|
|||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|Xbox 360'">true</ExcludedFromBuild>
|
||||
</Library>
|
||||
<Library Include="PSVita\4JLibs\libs\4J_Profile.a">
|
||||
<ExcludedFromBuild Condition="'$(Platform)'=='x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|PSVita'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|PSVita'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|PSVita'">true</ExcludedFromBuild>
|
||||
|
|
@ -34257,6 +34283,7 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
|
|||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|Xbox 360'">true</ExcludedFromBuild>
|
||||
</Library>
|
||||
<Library Include="PSVita\4JLibs\libs\4J_Profile_d.a">
|
||||
<ExcludedFromBuild Condition="'$(Platform)'=='x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|PSVita'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|PSVita'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|PSVita'">true</ExcludedFromBuild>
|
||||
|
|
@ -34301,6 +34328,7 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
|
|||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|Xbox 360'">true</ExcludedFromBuild>
|
||||
</Library>
|
||||
<Library Include="PSVita\4JLibs\libs\4J_Profile_r.a">
|
||||
<ExcludedFromBuild Condition="'$(Platform)'=='x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|PSVita'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|PSVita'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|PSVita'">true</ExcludedFromBuild>
|
||||
|
|
@ -34345,6 +34373,7 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
|
|||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|Xbox 360'">true</ExcludedFromBuild>
|
||||
</Library>
|
||||
<Library Include="PSVita\4JLibs\libs\4J_Render.a">
|
||||
<ExcludedFromBuild Condition="'$(Platform)'=='x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|PSVita'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|PSVita'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|PSVita'">true</ExcludedFromBuild>
|
||||
|
|
@ -34389,6 +34418,7 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
|
|||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|Xbox 360'">true</ExcludedFromBuild>
|
||||
</Library>
|
||||
<Library Include="PSVita\4JLibs\libs\4J_Render_d.a">
|
||||
<ExcludedFromBuild Condition="'$(Platform)'=='x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|PSVita'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|PSVita'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|PSVita'">true</ExcludedFromBuild>
|
||||
|
|
@ -34433,6 +34463,7 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
|
|||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|Xbox 360'">true</ExcludedFromBuild>
|
||||
</Library>
|
||||
<Library Include="PSVita\4JLibs\libs\4J_Render_r.a">
|
||||
<ExcludedFromBuild Condition="'$(Platform)'=='x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|PSVita'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|PSVita'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|PSVita'">true</ExcludedFromBuild>
|
||||
|
|
@ -34477,6 +34508,7 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
|
|||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|Xbox 360'">true</ExcludedFromBuild>
|
||||
</Library>
|
||||
<Library Include="PSVita\4JLibs\libs\4J_Storage.a">
|
||||
<ExcludedFromBuild Condition="'$(Platform)'=='x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|PSVita'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|PSVita'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|PSVita'">true</ExcludedFromBuild>
|
||||
|
|
@ -34521,6 +34553,7 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
|
|||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|Xbox 360'">true</ExcludedFromBuild>
|
||||
</Library>
|
||||
<Library Include="PSVita\4JLibs\libs\4J_Storage_d.a">
|
||||
<ExcludedFromBuild Condition="'$(Platform)'=='x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|PSVita'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|PSVita'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|PSVita'">true</ExcludedFromBuild>
|
||||
|
|
@ -34565,6 +34598,7 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
|
|||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|Xbox 360'">true</ExcludedFromBuild>
|
||||
</Library>
|
||||
<Library Include="PSVita\4JLibs\libs\4J_Storage_r.a">
|
||||
<ExcludedFromBuild Condition="'$(Platform)'=='x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|PSVita'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|PSVita'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|PSVita'">true</ExcludedFromBuild>
|
||||
|
|
@ -34609,14 +34643,21 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
|
|||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|Xbox 360'">true</ExcludedFromBuild>
|
||||
</Library>
|
||||
<Library Include="PSVita\4JLibs\libs\libSceNpToolkitUtils_rtti.a">
|
||||
<ExcludedFromBuild Condition="'$(Platform)'=='x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PSVita'">true</ExcludedFromBuild>
|
||||
</Library>
|
||||
<Library Include="PSVita\4JLibs\libs\libSceNpToolkitUtils_rtti_dbg.a" />
|
||||
<Library Include="PSVita\4JLibs\libs\libSceNpToolkitUtils_rtti_dbg.a">
|
||||
<ExcludedFromBuild Condition="'$(Platform)'=='x64'">true</ExcludedFromBuild>
|
||||
</Library>
|
||||
<Library Include="PSVita\4JLibs\libs\libSceNpToolkit_rtti.a">
|
||||
<ExcludedFromBuild Condition="'$(Platform)'=='x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|PSVita'">true</ExcludedFromBuild>
|
||||
</Library>
|
||||
<Library Include="PSVita\4JLibs\libs\libSceNpToolkit_rtti_dbg.a" />
|
||||
<Library Include="PSVita\4JLibs\libs\libSceNpToolkit_rtti_dbg.a">
|
||||
<ExcludedFromBuild Condition="'$(Platform)'=='x64'">true</ExcludedFromBuild>
|
||||
</Library>
|
||||
<Library Include="PSVita\Iggy\lib\libiggyperfmon_psp2.a">
|
||||
<ExcludedFromBuild Condition="'$(Platform)'=='x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|Durango'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|Durango'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|Durango'">true</ExcludedFromBuild>
|
||||
|
|
@ -34654,6 +34695,7 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
|
|||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|Xbox 360'">true</ExcludedFromBuild>
|
||||
</Library>
|
||||
<Library Include="PSVita\Iggy\lib\libiggy_psp2.a">
|
||||
<ExcludedFromBuild Condition="'$(Platform)'=='x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|Durango'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|Durango'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|Durango'">true</ExcludedFromBuild>
|
||||
|
|
@ -34690,10 +34732,18 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
|
|||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|Xbox 360'">true</ExcludedFromBuild>
|
||||
</Library>
|
||||
<Library Include="PSVita\Miles\lib\binkapsp2.a" />
|
||||
<Library Include="PSVita\Miles\lib\fltpsp2.a" />
|
||||
<Library Include="PSVita\Miles\lib\msspsp2.a" />
|
||||
<Library Include="PSVita\Miles\lib\msspsp2midi.a" />
|
||||
<Library Include="PSVita\Miles\lib\binkapsp2.a">
|
||||
<ExcludedFromBuild Condition="'$(Platform)'=='x64'">true</ExcludedFromBuild>
|
||||
</Library>
|
||||
<Library Include="PSVita\Miles\lib\fltpsp2.a">
|
||||
<ExcludedFromBuild Condition="'$(Platform)'=='x64'">true</ExcludedFromBuild>
|
||||
</Library>
|
||||
<Library Include="PSVita\Miles\lib\msspsp2.a">
|
||||
<ExcludedFromBuild Condition="'$(Platform)'=='x64'">true</ExcludedFromBuild>
|
||||
</Library>
|
||||
<Library Include="PSVita\Miles\lib\msspsp2midi.a">
|
||||
<ExcludedFromBuild Condition="'$(Platform)'=='x64'">true</ExcludedFromBuild>
|
||||
</Library>
|
||||
<Library Include="Windows64\4JLibs\libs\4J_Input.lib">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage|Durango'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='CONTENTPACKAGE_SYMBOLS|Durango'">true</ExcludedFromBuild>
|
||||
|
|
|
|||
|
|
@ -172,6 +172,7 @@ Minecraft::Minecraft(Component *mouseComponent, Canvas *parent, MinecraftApplet
|
|||
//lastTickTime = System::currentTimeMillis();
|
||||
recheckPlayerIn = 0;
|
||||
running = true;
|
||||
showFpsCounter = false;
|
||||
unoccupiedQuadrant = -1;
|
||||
|
||||
Stats::init();
|
||||
|
|
@ -1480,7 +1481,7 @@ void Minecraft::run_middle()
|
|||
if(g_KBMInput.IsKeyPressed(KeyboardMouseInput::KEY_DROP))
|
||||
localplayers[i]->ullButtonsPressed|=1LL<<MINECRAFT_ACTION_DROP;
|
||||
|
||||
if(g_KBMInput.IsKeyPressed(KeyboardMouseInput::KEY_CRAFTING))
|
||||
if(g_KBMInput.IsKeyPressed(KeyboardMouseInput::KEY_CRAFTING) || g_KBMInput.IsKeyPressed(KeyboardMouseInput::KEY_CRAFTING_ALT))
|
||||
localplayers[i]->ullButtonsPressed|=1LL<<MINECRAFT_ACTION_CRAFTING;
|
||||
|
||||
if(g_KBMInput.IsKeyPressed(KeyboardMouseInput::KEY_PAUSE))
|
||||
|
|
@ -1493,7 +1494,15 @@ void Minecraft::run_middle()
|
|||
localplayers[i]->ullButtonsPressed|=1LL<<MINECRAFT_ACTION_RENDER_THIRD_PERSON;
|
||||
|
||||
if(g_KBMInput.IsKeyPressed(KeyboardMouseInput::KEY_DEBUG_INFO))
|
||||
{
|
||||
localplayers[i]->ullButtonsPressed|=1LL<<MINECRAFT_ACTION_GAME_INFO;
|
||||
localplayers[i]->ullButtonsPressed|=1LL<<MINECRAFT_ACTION_RENDER_DEBUG;
|
||||
}
|
||||
|
||||
if(g_KBMInput.IsKeyPressed(VK_F4))
|
||||
{
|
||||
showFpsCounter = !showFpsCounter;
|
||||
}
|
||||
|
||||
int wheel = g_KBMInput.GetMouseWheel();
|
||||
if (wheel > 0)
|
||||
|
|
|
|||
|
|
@ -211,6 +211,7 @@ private:
|
|||
public:
|
||||
void destroy();
|
||||
volatile bool running;
|
||||
bool showFpsCounter;
|
||||
wstring fpsString;
|
||||
void run();
|
||||
// 4J-PB - split the run into 3 parts so we can run it from our xbox game loop
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ Global
|
|||
{F046C3CE-9749-4823-B32B-D9CC10B1A2C8}.ContentPackage|Windows64.Build.0 = ContentPackage|x64
|
||||
{F046C3CE-9749-4823-B32B-D9CC10B1A2C8}.ContentPackage|Xbox 360.ActiveCfg = ContentPackage|x64
|
||||
{F046C3CE-9749-4823-B32B-D9CC10B1A2C8}.Debug|Durango.ActiveCfg = Debug|x64
|
||||
{F046C3CE-9749-4823-B32B-D9CC10B1A2C8}.Debug|Durango.Build.0 = Debug|x64
|
||||
{F046C3CE-9749-4823-B32B-D9CC10B1A2C8}.Debug|ORBIS.ActiveCfg = Debug|x64
|
||||
{F046C3CE-9749-4823-B32B-D9CC10B1A2C8}.Debug|PS3.ActiveCfg = Debug|x64
|
||||
{F046C3CE-9749-4823-B32B-D9CC10B1A2C8}.Debug|PSVita.ActiveCfg = Debug|x64
|
||||
|
|
@ -75,6 +76,7 @@ Global
|
|||
{F046C3CE-9749-4823-B32B-D9CC10B1A2C8}.Debug|Windows64.Build.0 = Debug|x64
|
||||
{F046C3CE-9749-4823-B32B-D9CC10B1A2C8}.Debug|Xbox 360.ActiveCfg = Debug|x64
|
||||
{F046C3CE-9749-4823-B32B-D9CC10B1A2C8}.Release|Durango.ActiveCfg = Release|x64
|
||||
{F046C3CE-9749-4823-B32B-D9CC10B1A2C8}.Release|Durango.Build.0 = Release|x64
|
||||
{F046C3CE-9749-4823-B32B-D9CC10B1A2C8}.Release|ORBIS.ActiveCfg = Release|x64
|
||||
{F046C3CE-9749-4823-B32B-D9CC10B1A2C8}.Release|PS3.ActiveCfg = Release|x64
|
||||
{F046C3CE-9749-4823-B32B-D9CC10B1A2C8}.Release|PSVita.ActiveCfg = Release|x64
|
||||
|
|
@ -106,6 +108,7 @@ Global
|
|||
{1B9A8C38-DD48-448C-AA24-E1A35E0089A3}.ContentPackage|Windows64.ActiveCfg = ContentPackage|x64
|
||||
{1B9A8C38-DD48-448C-AA24-E1A35E0089A3}.ContentPackage|Xbox 360.ActiveCfg = ContentPackage|x64
|
||||
{1B9A8C38-DD48-448C-AA24-E1A35E0089A3}.Debug|Durango.ActiveCfg = Debug|x64
|
||||
{1B9A8C38-DD48-448C-AA24-E1A35E0089A3}.Debug|Durango.Build.0 = Debug|x64
|
||||
{1B9A8C38-DD48-448C-AA24-E1A35E0089A3}.Debug|ORBIS.ActiveCfg = Debug|x64
|
||||
{1B9A8C38-DD48-448C-AA24-E1A35E0089A3}.Debug|PS3.ActiveCfg = Debug|x64
|
||||
{1B9A8C38-DD48-448C-AA24-E1A35E0089A3}.Debug|PSVita.ActiveCfg = Debug|x64
|
||||
|
|
@ -113,6 +116,7 @@ Global
|
|||
{1B9A8C38-DD48-448C-AA24-E1A35E0089A3}.Debug|Windows64.Build.0 = Debug|x64
|
||||
{1B9A8C38-DD48-448C-AA24-E1A35E0089A3}.Debug|Xbox 360.ActiveCfg = Debug|x64
|
||||
{1B9A8C38-DD48-448C-AA24-E1A35E0089A3}.Release|Durango.ActiveCfg = Release|x64
|
||||
{1B9A8C38-DD48-448C-AA24-E1A35E0089A3}.Release|Durango.Build.0 = Release|x64
|
||||
{1B9A8C38-DD48-448C-AA24-E1A35E0089A3}.Release|ORBIS.ActiveCfg = Release|x64
|
||||
{1B9A8C38-DD48-448C-AA24-E1A35E0089A3}.Release|PS3.ActiveCfg = Release|x64
|
||||
{1B9A8C38-DD48-448C-AA24-E1A35E0089A3}.Release|PSVita.ActiveCfg = Release|x64
|
||||
|
|
|
|||
Loading…
Reference in a new issue