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

@@ -33,8 +33,31 @@ void CheckPosition(int x, int y, int z)
assert(x >= 0 && y >= 0 && z >= 0 && x < 16 && z < 16 && y < 128);
}
void LevelChunk::_init()
{
field_4 = 0;
m_bLoaded = false;
m_tileData = nullptr;
m_tileDataCnt = 0;
m_lightSky = nullptr;
m_lightSkyCnt = 0;
m_lightBlk = nullptr;
m_lightBlkCnt = 0;
m_chunkX = 0;
m_chunkZ = 0;
field_234 = 0;
m_bUnsaved = false;
field_236 = 0;
field_237 = 0;
field_238 = 0;
field_23C = 0;
m_pBlockData = nullptr;
}
LevelChunk::LevelChunk(Level* pLevel, int x, int z)
{
_init();
m_pLevel = pLevel;
m_chunkX = x;
m_chunkZ = z;
@@ -44,8 +67,14 @@ LevelChunk::LevelChunk(Level* pLevel, int x, int z)
LevelChunk::LevelChunk(Level* pLevel, TileID* pData, int x, int z)
{
_init();
m_pLevel = pLevel;
// The game will blow its brains out if this if statement is executed
// I have not the slightest idea as to why...
/*if (pData)
{*/
m_tileDataCnt = 0x4000;
field_4 = 0x8000;
m_tileData = new uint8_t[m_tileDataCnt];
@@ -60,6 +89,9 @@ LevelChunk::LevelChunk(Level* pLevel, TileID* pData, int x, int z)
m_lightBlk = new uint8_t[m_lightBlkCnt];
memset(m_lightBlk, 0, m_lightBlkCnt);
m_pBlockData = pData;
//}
m_pBlockData = pData;
m_chunkX = x;
m_chunkZ = z;
@@ -551,8 +583,9 @@ void LevelChunk::getEntities(Entity* pEntExclude, const AABB& aabb, std::vector<
for (int b = lowerBound; b <= upperBound; b++)
{
for (auto ent : m_entities[b])
for (auto it = m_entities[b].begin(); it != m_entities[b].end(); it++)
{
Entity* ent = *it;
if (ent == pEntExclude) continue;
if (!aabb.intersect(ent->m_hitbox)) continue;