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

@@ -12,6 +12,20 @@ float Cube::c = 180.0f / float(M_PI);
Cube::Cube(int a, int b)
{
m_posX = 0.0f;
m_posY = 0.0f;
m_posZ = 0.0f;
field_C = 0.0f;
field_10 = 0.0f;
field_14 = 0.0f;
field_18 = false;
field_19 = true;
field_1A = false;
m_bCompiled = false;
field_2C0 = 0;
m_buffer = 0;
m_brightness = 1.0f;
field_2B4 = a;
field_2B8 = b;
}

View File

@@ -30,23 +30,23 @@ public:
void setBrightness(float f);
public:
float m_posX = 0.0f;
float m_posY = 0.0f;
float m_posZ = 0.0f;
float field_C = 0.0f;
float field_10 = 0.0f;
float field_14 = 0.0f;
bool field_18 = false;
bool field_19 = true;
bool field_1A = false;
float m_posX;
float m_posY;
float m_posZ;
float field_C;
float field_10;
float field_14;
bool field_18;
bool field_19;
bool field_1A;
VertexPT m_verts[8];
PolygonQuad m_faces[6];
int field_2B4 = 0;
int field_2B8 = 0;
bool m_bCompiled = false;
int field_2C0 = 0;
GLuint m_buffer = 0;
float m_brightness = 1.0f;
int field_2B4;
int field_2B8;
bool m_bCompiled;
int field_2C0;
GLuint m_buffer;
float m_brightness;
static float c;
};

View File

@@ -17,6 +17,10 @@ HumanoidModel::HumanoidModel(float a, float b):
m_legL(0, 16),
m_legR(0, 16)
{
field_10BC = false;
field_10BD = false;
field_10BE = false;
m_head.addBox(-4, -8, -4, 8, 8, 8, a);
m_head.setPos(0, b, 0);
m_body.addBox(-4, 0, -2, 8, 12, 4);

View File

@@ -26,8 +26,8 @@ public:
public:
// @TODO: swap armL and armR.. Steve punches with the right hand.
Cube m_head, m_body, m_armL, m_armR, m_legL, m_legR;
bool field_10BC = false;
bool field_10BD = false;
bool field_10BE = false;
bool field_10BC;
bool field_10BD;
bool field_10BE;
};

View File

@@ -8,6 +8,12 @@
#include "Model.hpp"
Model::Model()
{
field_4 = 0.0f;
field_8 = false;
}
void Model::onGraphicsReset()
{

View File

@@ -15,6 +15,7 @@ class Mob;
class Model
{
public:
Model();
virtual void onGraphicsReset();
virtual void prepareMobModel(Mob*, float, float, float);
virtual void render(float, float, float, float, float, float);
@@ -23,6 +24,6 @@ public:
virtual void setBrightness(float);
public:
float field_4 = 0.0f;
bool field_8 = false;
float field_4;
bool field_8;
};

View File

@@ -8,8 +8,18 @@
#include "PolygonQuad.hpp"
void PolygonQuad::_init()
{
m_bFlipNormals = false;
#ifdef ENH_ENTITY_SHADING
m_color = 0xFFFFFF;
#endif
}
PolygonQuad::PolygonQuad(VertexPT* a, VertexPT* b, VertexPT* c, VertexPT* d)
{
_init();
m_verts[0] = *a;
m_verts[1] = *b;
m_verts[2] = *c;
@@ -18,6 +28,8 @@ PolygonQuad::PolygonQuad(VertexPT* a, VertexPT* b, VertexPT* c, VertexPT* d)
PolygonQuad::PolygonQuad(VertexPT* a, VertexPT* b, VertexPT* c, VertexPT* d, float u1, float v1, float u2, float v2)
{
_init();
m_verts[0] = *a;
m_verts[1] = *b;
m_verts[2] = *c;
@@ -31,6 +43,8 @@ PolygonQuad::PolygonQuad(VertexPT* a, VertexPT* b, VertexPT* c, VertexPT* d, flo
PolygonQuad::PolygonQuad(VertexPT* a, VertexPT* b, VertexPT* c, VertexPT* d, int u1i, int v1i, int u2i, int v2i)
{
_init();
constexpr float C_F1 = 0.0015625f, C_F2 = 0.003125f;
m_verts[0] = *a;
m_verts[1] = *b;

View File

@@ -15,8 +15,10 @@
class PolygonQuad
{
private:
void _init();
public:
PolygonQuad() {};
PolygonQuad() { _init(); }
PolygonQuad(VertexPT* a, VertexPT* b, VertexPT* c, VertexPT* d);
PolygonQuad(VertexPT* a, VertexPT* b, VertexPT* c, VertexPT* d, float u1, float v1, float u2, float v2);
PolygonQuad(VertexPT* a, VertexPT* b, VertexPT* c, VertexPT* d, int u1i, int v1i, int u2i, int v2i);
@@ -31,9 +33,9 @@ public:
private:
VertexPT m_verts[4];
bool m_bFlipNormals = false;
bool m_bFlipNormals;
#ifdef ENH_ENTITY_SHADING
int m_color = 0xFFFFFF;
int m_color;
#endif
};