mirror of
https://github.com/celisej567/mcpe.git
synced 2026-09-23 20:09:46 +03:00
C++03 Support & Partial Xbox 360 Support (#37)
* WIP C++03 + Xbox 360 Support * math.h & _USE_MATH_DEFINES on Level.hpp Updated Xenon vcxproj file for new file structure. * * Fix bad GUI scale setup. * * Gui: Use ratios instead of hardcoded sub-1 floating point values, to make the mechanism more clear. * Add Direct Connect Button and Screen (#30) * Add Direct Connect Button and Screen * Remove accidental extra build directories for wasm * Add DirectConnectScreen.cpp to the CMake * Use Hungarian coding style notation * * Fix errors caused by #30 * * Improve the Chat Screen * * Improve the DirectConnectScreen, among other things. * * Update the game title once again. * * Add build-wasm.bat. * * Add info about compiling for wasm * * Fix send to specific GUID actually broadcasting to everyone * * Add command manager. * * Add writeable configuration. * * Allow dynamic screen size change on windows * * Allow the same thing on the emscripten version. * WIP C++03 + Xbox 360 Support * Fixed a possible merging issue that broke RakNet? * Additional Xbox 360 compatability fixes --------- Co-authored-by: Brent Da Mage <BrentDaMage@users.noreply.github.com> Co-authored-by: iProgramInCpp <iprogramincpp@gmail.com> Co-authored-by: ts <124226059+uniformization@users.noreply.github.com>
This commit is contained in:
@@ -11,6 +11,15 @@
|
||||
|
||||
#include <cmath>
|
||||
|
||||
ControllerTurnInput::ControllerTurnInput()
|
||||
{
|
||||
field_8 = 2;
|
||||
m_stickNo = 2;
|
||||
field_10 = 0.0f;
|
||||
field_14 = 0.0f;
|
||||
field_18 = false;
|
||||
}
|
||||
|
||||
ITurnInput::Delta ControllerTurnInput::getTurnDelta()
|
||||
{
|
||||
bool isTouched = Controller::isTouched(m_stickNo);
|
||||
|
||||
@@ -13,13 +13,14 @@
|
||||
class ControllerTurnInput : public ITurnInput
|
||||
{
|
||||
public:
|
||||
ControllerTurnInput();
|
||||
ITurnInput::Delta getTurnDelta();
|
||||
|
||||
private:
|
||||
int field_8 = 2;
|
||||
int m_stickNo = 2;
|
||||
float field_10 = 0.0f;
|
||||
float field_14 = 0.0f;
|
||||
bool field_18 = false;
|
||||
int field_8;
|
||||
int m_stickNo;
|
||||
float field_10;
|
||||
float field_14;
|
||||
bool field_18;
|
||||
};
|
||||
|
||||
|
||||
@@ -13,17 +13,22 @@ class ITurnInput
|
||||
public:
|
||||
struct Delta
|
||||
{
|
||||
float x = 0.0f, y = 0.0f;
|
||||
Delta() {}
|
||||
float x, y;
|
||||
Delta() { x = 0.0f, y = 0.0f; }
|
||||
Delta(float x, float y) : x(x), y(y) {}
|
||||
};
|
||||
|
||||
protected:
|
||||
ITurnInput()
|
||||
{
|
||||
m_prevTime = -1.0f;
|
||||
}
|
||||
public:
|
||||
float getDeltaTime();
|
||||
virtual ~ITurnInput();
|
||||
virtual Delta getTurnDelta() = 0;
|
||||
|
||||
private:
|
||||
float m_prevTime = -1.0f;
|
||||
float m_prevTime;
|
||||
};
|
||||
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
********************************************************************/
|
||||
|
||||
#pragma once
|
||||
#if __cplusplus < 201103L
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#include <vector>
|
||||
#include <cstdint>
|
||||
|
||||
@@ -10,6 +10,12 @@
|
||||
|
||||
KeyboardInput::KeyboardInput(Options* pOpts)
|
||||
{
|
||||
m_horzInput = 0.0f;
|
||||
m_vertInput = 0.0f;
|
||||
field_C = false;
|
||||
m_bJumpButton = false;
|
||||
m_bSneakButton = false;
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
m_keys[i] = false;
|
||||
|
||||
|
||||
@@ -31,12 +31,12 @@ public:
|
||||
virtual void tick(/* Player* */);
|
||||
|
||||
public:
|
||||
float m_horzInput = 0.0f;
|
||||
float m_vertInput = 0.0f;
|
||||
bool field_C = false;
|
||||
bool m_bJumpButton = false;
|
||||
bool m_bSneakButton = false;
|
||||
float m_horzInput;
|
||||
float m_vertInput ;
|
||||
bool field_C;
|
||||
bool m_bJumpButton;
|
||||
bool m_bSneakButton;
|
||||
bool m_keys[10];
|
||||
Options* m_pOptions = nullptr;
|
||||
Options* m_pOptions;
|
||||
};
|
||||
|
||||
|
||||
@@ -12,12 +12,18 @@
|
||||
|
||||
struct MouseInput
|
||||
{
|
||||
int field_0 = 0;
|
||||
int field_4 = 0;
|
||||
int field_8 = 0;
|
||||
int field_C = 0;
|
||||
int field_0;
|
||||
int field_4;
|
||||
int field_8;
|
||||
int field_C;
|
||||
|
||||
MouseInput() {}
|
||||
MouseInput()
|
||||
{
|
||||
field_0 = 0;
|
||||
field_4 = 0;
|
||||
field_8 = 0;
|
||||
field_C = 0;
|
||||
}
|
||||
MouseInput(int x1, int x2, int x3, int x4)
|
||||
{
|
||||
field_0 = x1;
|
||||
|
||||
Reference in New Issue
Block a user