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:
Brent
2023-08-07 07:48:52 -05:00
committed by GitHub
parent 6c1a54e3f0
commit a0f71c7b27
179 changed files with 4969 additions and 918 deletions

View File

@@ -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);

View File

@@ -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;
};

View File

@@ -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;
};

View File

@@ -7,6 +7,9 @@
********************************************************************/
#pragma once
#if __cplusplus < 201103L
#include <stdint.h>
#endif
#include <vector>
#include <cstdint>

View File

@@ -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;

View File

@@ -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;
};

View File

@@ -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;