mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-06-03 13:13:01 +00:00
Not to mention most commit messages are just things like "skjdfhaufhafalkfjdashf".
This commit is contained in:
parent
2f53275462
commit
8855266638
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
95864
Minecraft.Client/Platform/Emscripten/miniaudio.h
Normal file
95864
Minecraft.Client/Platform/Emscripten/miniaudio.h
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue