Integrate touch related development. (#90)

* * Add BuildActionIntention crap

* * Set Client and World projects to use MP compilation

* asd

* * Use the new BuildActionIntention to break and place blocks.

* * Reverse engineer the IArea system.

* * Copy break logic from survival into creative conditionally

* * Reverse IBuildInput and MouseHandler
* Replace the new relative paths in the client project with $(MC_ROOT) again

* * Reverse Multitouch, MouseDevice

* * Reverse a bunch of auxiliary classes for input.

* * Use CustomInputHolder instead of holding inputs manually.

* * Reverse a whole BUNCH of things!

* * Add feedback textures to the gitignore.

* * D-pad now renders! Also loads of other work.

* * More Stuff

* * Finish touch control bug fixing.

* * Finalize work.

* * One last thing..

* * Add a "cramped" mode to the options screen and start menu.

* * Oh, forgot to do something
This commit is contained in:
iProgramInCpp
2023-11-02 00:49:11 +02:00
committed by GitHub
parent 98d6b4e5e8
commit 60b21356a1
87 changed files with 3439 additions and 916 deletions

View File

@@ -34,7 +34,7 @@ LocalPlayer::LocalPlayer(Minecraft* pMinecraft, Level* pLevel, User* pUser, int
field_C34 = 0.0f;
// multiplayer related -- end
field_C38 = 0;
m_pKeyboardInput = nullptr;
m_pMoveInput = nullptr;
m_pMinecraft = pMinecraft;
m_name = pUser->field_0;
@@ -45,17 +45,13 @@ LocalPlayer::LocalPlayer(Minecraft* pMinecraft, Level* pLevel, User* pUser, int
LocalPlayer::~LocalPlayer()
{
if (m_pKeyboardInput)
delete m_pKeyboardInput;
}
void LocalPlayer::aiStep()
{
m_pKeyboardInput->tick(/* this */);
if (m_pKeyboardInput->m_bSneakButton && field_A4 < 0.2f)
{
m_pMoveInput->tick(this);
if (m_pMoveInput->m_bSneakButton && field_A4 < 0.2f)
field_A4 = 0.2f;
}
Mob::aiStep();
Player::aiStep();
@@ -120,7 +116,7 @@ void LocalPlayer::respawn()
bool LocalPlayer::isSneaking()
{
return m_pKeyboardInput->m_bSneakButton;
return m_pMoveInput->m_bSneakButton;
}
int LocalPlayer::move(float x, float y, float z)
@@ -157,7 +153,7 @@ int LocalPlayer::move(float x, float y, float z)
if (m_nAutoJumpFrames > 0)
{
m_nAutoJumpFrames--;
m_pKeyboardInput->m_bJumpButton = true;
m_pMoveInput->m_bJumpButton = true;
}
float posX = m_pos.x;
@@ -235,10 +231,10 @@ void LocalPlayer::updateAi()
{
Player::updateAi();
field_B00 = m_pKeyboardInput->m_horzInput;
field_B04 = m_pKeyboardInput->m_vertInput;
field_B00 = m_pMoveInput->m_horzInput;
field_B04 = m_pMoveInput->m_vertInput;
field_B0C = m_pKeyboardInput->m_bJumpButton || m_nAutoJumpFrames > 0;
field_B0C = m_pMoveInput->m_bJumpButton || m_nAutoJumpFrames > 0;
}
bool LocalPlayer::isLocalPlayer()