mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-08-04 04:52:27 +00:00
remove a bunch of linux ifdefs
This commit is contained in:
parent
9e74005af7
commit
c4bbf6cf1f
|
|
@ -59,9 +59,6 @@
|
||||||
|
|
||||||
class AttributeInstance;
|
class AttributeInstance;
|
||||||
class MobEffectInstance;
|
class MobEffectInstance;
|
||||||
#ifndef __linux__
|
|
||||||
#include <qnet.h>
|
|
||||||
#endif // __linux__
|
|
||||||
|
|
||||||
TrackedEntity::TrackedEntity(std::shared_ptr<Entity> e, int range,
|
TrackedEntity::TrackedEntity(std::shared_ptr<Entity> e, int range,
|
||||||
int updateInterval, bool trackDelta) {
|
int updateInterval, bool trackDelta) {
|
||||||
|
|
|
||||||
|
|
@ -45,29 +45,17 @@ void ChunkStorageProfilerDecorator::tick() {
|
||||||
if (counter > 500) {
|
if (counter > 500) {
|
||||||
if (loadCount > 0) {
|
if (loadCount > 0) {
|
||||||
#if !defined(_CONTENT_PACKAGE)
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
#if defined(__linux__)
|
|
||||||
sprintf(buf, "Average load time: %f (%lld)",
|
sprintf(buf, "Average load time: %f (%lld)",
|
||||||
0.000001 * (double)timeSpentLoading / (double)loadCount,
|
0.000001 * (double)timeSpentLoading / (double)loadCount,
|
||||||
(long long)loadCount);
|
(long long)loadCount);
|
||||||
#else
|
|
||||||
sprintf(buf, "Average load time: %f (%I64d)",
|
|
||||||
0.000001 * (double)timeSpentLoading / (double)loadCount,
|
|
||||||
loadCount);
|
|
||||||
#endif
|
|
||||||
Log::info("%s", buf);
|
Log::info("%s", buf);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if (saveCount > 0) {
|
if (saveCount > 0) {
|
||||||
#if !defined(_CONTENT_PACKAGE)
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
#if defined(__linux__)
|
|
||||||
sprintf(buf, "Average save time: %f (%lld)",
|
sprintf(buf, "Average save time: %f (%lld)",
|
||||||
0.000001 * (double)timeSpentSaving / (double)loadCount,
|
0.000001 * (double)timeSpentSaving / (double)loadCount,
|
||||||
(long long)loadCount);
|
(long long)loadCount);
|
||||||
#else
|
|
||||||
sprintf(buf, "Average save time: %f (%I64d)",
|
|
||||||
0.000001 * (double)timeSpentSaving / (double)loadCount,
|
|
||||||
loadCount);
|
|
||||||
#endif
|
|
||||||
Log::info("%s", buf);
|
Log::info("%s", buf);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,6 @@
|
||||||
#include "minecraft/world/level/biome/Biome.h"
|
#include "minecraft/world/level/biome/Biome.h"
|
||||||
#include "minecraft/world/level/chunk/ChunkSource.h"
|
#include "minecraft/world/level/chunk/ChunkSource.h"
|
||||||
#include "platform/fs/fs.h"
|
#include "platform/fs/fs.h"
|
||||||
#if defined(__linux__)
|
|
||||||
#endif
|
|
||||||
#include "java/Random.h"
|
#include "java/Random.h"
|
||||||
#include "minecraft/world/entity/MobCategory.h"
|
#include "minecraft/world/entity/MobCategory.h"
|
||||||
#include "minecraft/world/level/Level.h"
|
#include "minecraft/world/level/Level.h"
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,6 @@
|
||||||
#include "minecraft/util/Log.h"
|
#include "minecraft/util/Log.h"
|
||||||
#include "minecraft/world/level/newbiome/layer/Layer.h"
|
#include "minecraft/world/level/newbiome/layer/Layer.h"
|
||||||
#include "platform/fs/fs.h"
|
#include "platform/fs/fs.h"
|
||||||
#if defined(__linux__)
|
|
||||||
#endif
|
|
||||||
#include "minecraft/world/level/biome/Biome.h"
|
#include "minecraft/world/level/biome/Biome.h"
|
||||||
|
|
||||||
BiomeOverrideLayer::BiomeOverrideLayer(int seedMixup) : Layer(seedMixup) {
|
BiomeOverrideLayer::BiomeOverrideLayer(int seedMixup) : Layer(seedMixup) {
|
||||||
|
|
|
||||||
|
|
@ -280,17 +280,8 @@ LevelData* DirectoryLevelStorage::prepareLevel() {
|
||||||
Log::info("Loading %d mappings\n", count);
|
Log::info("Loading %d mappings\n", count);
|
||||||
for (unsigned int i = 0; i < count; ++i) {
|
for (unsigned int i = 0; i < count; ++i) {
|
||||||
PlayerUID playerUid = dis.readPlayerUID();
|
PlayerUID playerUid = dis.readPlayerUID();
|
||||||
#if defined(_WINDOWS64) || defined(__linux__)
|
|
||||||
Log::info(" -- %llu\n",
|
Log::info(" -- %llu\n",
|
||||||
static_cast<unsigned long long>(playerUid));
|
static_cast<unsigned long long>(playerUid));
|
||||||
#else
|
|
||||||
#if defined(__linux__)
|
|
||||||
Log::info(" -- %llu\n",
|
|
||||||
static_cast<unsigned long long>(playerUid));
|
|
||||||
#else
|
|
||||||
Log::info(" -- %s\n", playerUid.toWString().c_str());
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
m_playerMappings[playerUid].readMappings(&dis);
|
m_playerMappings[playerUid].readMappings(&dis);
|
||||||
}
|
}
|
||||||
dis.readFully(m_usedMappings);
|
dis.readFully(m_usedMappings);
|
||||||
|
|
@ -641,16 +632,8 @@ void DirectoryLevelStorage::saveMapIdLookup() {
|
||||||
Log::info("Saving %zu mappings\n", m_playerMappings.size());
|
Log::info("Saving %zu mappings\n", m_playerMappings.size());
|
||||||
for (auto it = m_playerMappings.begin(); it != m_playerMappings.end();
|
for (auto it = m_playerMappings.begin(); it != m_playerMappings.end();
|
||||||
++it) {
|
++it) {
|
||||||
#if defined(_WINDOWS64) || defined(__linux__)
|
|
||||||
Log::info(" -- %llu\n",
|
Log::info(" -- %llu\n",
|
||||||
static_cast<unsigned long long>(it->first));
|
static_cast<unsigned long long>(it->first));
|
||||||
#else
|
|
||||||
#if defined(__linux__)
|
|
||||||
Log::info(" -- %d\n", it->first);
|
|
||||||
#else
|
|
||||||
Log::info(" -- %s\n", it->first.toWString().c_str());
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
dos.writePlayerUID(it->first);
|
dos.writePlayerUID(it->first);
|
||||||
it->second.writeMappings(&dos);
|
it->second.writeMappings(&dos);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2737,7 +2737,7 @@ int Tile::SoundType::getPlaceSound() const { return iPlaceSound; }
|
||||||
4J: These are necessary on the PS3.
|
4J: These are necessary on the PS3.
|
||||||
(and 4 and Vita).
|
(and 4 and Vita).
|
||||||
*/
|
*/
|
||||||
#if (0 || 0 || 0 || defined __linux__)
|
#if 1
|
||||||
const int Tile::stone_Id;
|
const int Tile::stone_Id;
|
||||||
const int Tile::grass_Id;
|
const int Tile::grass_Id;
|
||||||
const int Tile::dirt_Id;
|
const int Tile::dirt_Id;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue