Not to mention most commit messages are just things like "skjdfhaufhafalkfjdashf".

This commit is contained in:
Mohamed Ashraf 2026-03-25 09:51:43 +04:00
parent 2f53275462
commit 8855266638
4 changed files with 95884 additions and 6 deletions

View file

@ -10,6 +10,11 @@
#include "../../Minecraft.World/Blocks/Tile.h"
#include "../../Minecraft.World/Level/WaterLevelChunk.h"
#if defined(__EMSCRIPTEN__)
// eh... I should've enabled wasm64
#define InterlockedCompareExchangeRelease InterlockedCompareExchangeRelease64
#endif
MultiPlayerChunkCache::MultiPlayerChunkCache(Level* level) {
XZSIZE = level->dimension->getXZSize(); // 4J Added
XZOFFSET = XZSIZE / 2; // 4J Added
@ -295,4 +300,4 @@ void MultiPlayerChunkCache::dataReceived(int x, int z) {
if ((iz < 0) || (iz >= XZSIZE)) return;
int idx = ix * XZSIZE + iz;
hasData[idx] = true;
}
}

View file

@ -3,7 +3,11 @@ class Mob;
class Options;
using namespace std;
#include "../../Minecraft.World/Util/SoundTypes.h"
#ifndef __EMSCRIPTEN__
#include "./miniaudio.h"
#else
#include "../../Emscripten/miniaudio.h"
#endif
constexpr float SFX_3D_MIN_DISTANCE = 1.0f;
constexpr float SFX_3D_MAX_DISTANCE = 16.0f;
constexpr float SFX_3D_ROLLOFF = 0.5f;

File diff suppressed because it is too large Load diff

View file

@ -1,14 +1,16 @@
#include "../Platform/stdafx.h"
#if defined(_WIN32)
#include <xhash>
#else
#include <openssl/md5.h>
#include <iostream>
#include <iomanip>
#include <sstream>
#if defined(_WIN32)
#include <xhash>
#elif defined (__EMSCRIPTEN__)
// no.
#else
#include <openssl/md5.h>
#include <openssl/evp.h>
#endif // _WIN32
#include "Hasher.h"
#include <openssl/evp.h>
Hasher::Hasher(std::wstring& salt) { this->salt = salt; }
@ -29,6 +31,9 @@ std::wstring Hasher::getHash(std::wstring& name) {
//{
// throw new RuntimeException(e);
//}
#elif defined(__EMSCRIPTEN__)
std::wstring s = std::wstring(salt).append(name);
return s;
#else
// adapted from a SSL example
std::wstring combined = salt + name;