mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-04-26 06:23:37 +00:00
style: clang-format the entire project
This commit is contained in:
parent
0da697cbd4
commit
fac7d99e95
|
|
@ -8,19 +8,13 @@ AppGameServices::AppGameServices(Game& game, IMenuService& menus)
|
|||
|
||||
// -- Strings --
|
||||
|
||||
const char* AppGameServices::getString(int id) {
|
||||
return Game::GetString(id);
|
||||
}
|
||||
const char* AppGameServices::getString(int id) { return Game::GetString(id); }
|
||||
|
||||
// -- Debug settings --
|
||||
|
||||
bool AppGameServices::debugSettingsOn() {
|
||||
return game_.DebugSettingsOn();
|
||||
}
|
||||
bool AppGameServices::debugSettingsOn() { return game_.DebugSettingsOn(); }
|
||||
|
||||
bool AppGameServices::debugArtToolsOn() {
|
||||
return game_.DebugArtToolsOn();
|
||||
}
|
||||
bool AppGameServices::debugArtToolsOn() { return game_.DebugArtToolsOn(); }
|
||||
|
||||
unsigned int AppGameServices::debugGetMask(int iPad, bool overridePlayer) {
|
||||
return game_.GetGameSettingsDebugMask(iPad, overridePlayer);
|
||||
|
|
@ -34,9 +28,7 @@ bool AppGameServices::debugMobsDontTick() {
|
|||
return game_.GetMobsDontTickEnabled();
|
||||
}
|
||||
|
||||
bool AppGameServices::debugFreezePlayers() {
|
||||
return game_.GetFreezePlayers();
|
||||
}
|
||||
bool AppGameServices::debugFreezePlayers() { return game_.GetFreezePlayers(); }
|
||||
|
||||
// -- Game host options --
|
||||
|
||||
|
|
@ -93,9 +85,7 @@ unsigned char AppGameServices::getGameSettings(int setting) {
|
|||
|
||||
// -- App time --
|
||||
|
||||
float AppGameServices::getAppTime() {
|
||||
return game_.getAppTime();
|
||||
}
|
||||
float AppGameServices::getAppTime() { return game_.getAppTime(); }
|
||||
|
||||
// -- Game state --
|
||||
|
||||
|
|
@ -104,10 +94,14 @@ void AppGameServices::setGameStarted(bool val) { game_.SetGameStarted(val); }
|
|||
bool AppGameServices::getTutorialMode() { return game_.GetTutorialMode(); }
|
||||
void AppGameServices::setTutorialMode(bool val) { game_.SetTutorialMode(val); }
|
||||
bool AppGameServices::isAppPaused() { return game_.IsAppPaused(); }
|
||||
int AppGameServices::getLocalPlayerCount() { return game_.GetLocalPlayerCount(); }
|
||||
int AppGameServices::getLocalPlayerCount() {
|
||||
return game_.GetLocalPlayerCount();
|
||||
}
|
||||
bool AppGameServices::autosaveDue() { return game_.AutosaveDue(); }
|
||||
void AppGameServices::setAutosaveTimerTime() { game_.SetAutosaveTimerTime(); }
|
||||
int64_t AppGameServices::secondsToAutosave() { return game_.SecondsToAutosave(); }
|
||||
int64_t AppGameServices::secondsToAutosave() {
|
||||
return game_.SecondsToAutosave();
|
||||
}
|
||||
|
||||
void AppGameServices::setDisconnectReason(
|
||||
DisconnectPacket::eDisconnectReason reason) {
|
||||
|
|
@ -115,9 +109,13 @@ void AppGameServices::setDisconnectReason(
|
|||
}
|
||||
|
||||
void AppGameServices::lockSaveNotification() { game_.lockSaveNotification(); }
|
||||
void AppGameServices::unlockSaveNotification() { game_.unlockSaveNotification(); }
|
||||
void AppGameServices::unlockSaveNotification() {
|
||||
game_.unlockSaveNotification();
|
||||
}
|
||||
bool AppGameServices::getResetNether() { return game_.GetResetNether(); }
|
||||
bool AppGameServices::getUseDPadForDebug() { return game_.GetUseDPadForDebug(); }
|
||||
bool AppGameServices::getUseDPadForDebug() {
|
||||
return game_.GetUseDPadForDebug();
|
||||
}
|
||||
|
||||
bool AppGameServices::getWriteSavesToFolderEnabled() {
|
||||
return game_.GetWriteSavesToFolderEnabled();
|
||||
|
|
@ -127,9 +125,7 @@ bool AppGameServices::isLocalMultiplayerAvailable() {
|
|||
return game_.IsLocalMultiplayerAvailable();
|
||||
}
|
||||
|
||||
bool AppGameServices::dlcInstallPending() {
|
||||
return game_.DLCInstallPending();
|
||||
}
|
||||
bool AppGameServices::dlcInstallPending() { return game_.DLCInstallPending(); }
|
||||
|
||||
bool AppGameServices::dlcInstallProcessCompleted() {
|
||||
return game_.DLCInstallProcessCompleted();
|
||||
|
|
@ -198,9 +194,7 @@ void AppGameServices::setGlobalXuiAction(eXuiAction action) {
|
|||
game_.SetGlobalXuiAction(action);
|
||||
}
|
||||
|
||||
void AppGameServices::handleButtonPresses() {
|
||||
game_.HandleButtonPresses();
|
||||
}
|
||||
void AppGameServices::handleButtonPresses() { game_.HandleButtonPresses(); }
|
||||
|
||||
void AppGameServices::setTMSAction(int iPad, eTMSAction action) {
|
||||
game_.SetTMSAction(iPad, action);
|
||||
|
|
@ -254,8 +248,7 @@ void AppGameServices::setAnimOverrideBitmask(std::uint32_t dwSkinID,
|
|||
game_.SetAnimOverrideBitmask(dwSkinID, bitmask);
|
||||
}
|
||||
|
||||
unsigned int AppGameServices::getAnimOverrideBitmask(
|
||||
std::uint32_t dwSkinID) {
|
||||
unsigned int AppGameServices::getAnimOverrideBitmask(std::uint32_t dwSkinID) {
|
||||
return game_.GetAnimOverrideBitmask(dwSkinID);
|
||||
}
|
||||
|
||||
|
|
@ -267,9 +260,7 @@ std::string AppGameServices::getSkinPathFromId(std::uint32_t skinId) {
|
|||
return Game::getSkinPathFromId(skinId);
|
||||
}
|
||||
|
||||
bool AppGameServices::defaultCapeExists() {
|
||||
return game_.DefaultCapeExists();
|
||||
}
|
||||
bool AppGameServices::defaultCapeExists() { return game_.DefaultCapeExists(); }
|
||||
|
||||
bool AppGameServices::isXuidNotch(PlayerUID xuid) {
|
||||
return game_.isXuidNotch(xuid);
|
||||
|
|
@ -305,8 +296,7 @@ void AppGameServices::updatePlayerInfo(std::uint8_t networkSmallId,
|
|||
game_.UpdatePlayerInfo(networkSmallId, playerColourIndex, playerPrivileges);
|
||||
}
|
||||
|
||||
unsigned int AppGameServices::getPlayerPrivileges(
|
||||
std::uint8_t networkSmallId) {
|
||||
unsigned int AppGameServices::getPlayerPrivileges(std::uint8_t networkSmallId) {
|
||||
return game_.GetPlayerPrivileges(networkSmallId);
|
||||
}
|
||||
|
||||
|
|
@ -334,9 +324,7 @@ bool AppGameServices::getTerrainFeaturePosition(_eTerrainFeatureType type,
|
|||
return game_.GetTerrainFeaturePosition(type, pX, pZ);
|
||||
}
|
||||
|
||||
void AppGameServices::loadDefaultGameRules() {
|
||||
game_.loadDefaultGameRules();
|
||||
}
|
||||
void AppGameServices::loadDefaultGameRules() { game_.loadDefaultGameRules(); }
|
||||
|
||||
// -- Archive / resources --
|
||||
|
||||
|
|
@ -363,24 +351,21 @@ const char* AppGameServices::getGameRulesString(const std::string& key) {
|
|||
return game_.GetGameRulesString(key);
|
||||
}
|
||||
|
||||
unsigned int AppGameServices::createImageTextData(std::uint8_t* textMetadata,
|
||||
int64_t seed, bool hasSeed,
|
||||
unsigned int uiHostOptions,
|
||||
unsigned int uiTexturePackId) {
|
||||
return game_.CreateImageTextData(textMetadata, seed, hasSeed,
|
||||
uiHostOptions, uiTexturePackId);
|
||||
unsigned int AppGameServices::createImageTextData(
|
||||
std::uint8_t* textMetadata, int64_t seed, bool hasSeed,
|
||||
unsigned int uiHostOptions, unsigned int uiTexturePackId) {
|
||||
return game_.CreateImageTextData(textMetadata, seed, hasSeed, uiHostOptions,
|
||||
uiTexturePackId);
|
||||
}
|
||||
|
||||
std::string AppGameServices::getFilePath(std::uint32_t packId,
|
||||
std::string filename,
|
||||
bool bAddDataFolder,
|
||||
std::string mountPoint) {
|
||||
std::string filename,
|
||||
bool bAddDataFolder,
|
||||
std::string mountPoint) {
|
||||
return game_.getFilePath(packId, filename, bAddDataFolder, mountPoint);
|
||||
}
|
||||
|
||||
char* AppGameServices::getUniqueMapName() {
|
||||
return game_.GetUniqueMapName();
|
||||
}
|
||||
char* AppGameServices::getUniqueMapName() { return game_.GetUniqueMapName(); }
|
||||
|
||||
void AppGameServices::setUniqueMapName(char* name) {
|
||||
game_.SetUniqueMapName(name);
|
||||
|
|
@ -390,9 +375,7 @@ unsigned int AppGameServices::getOpacityTimer(int iPad) {
|
|||
return game_.GetOpacityTimer(iPad);
|
||||
}
|
||||
|
||||
void AppGameServices::setOpacityTimer(int iPad) {
|
||||
game_.SetOpacityTimer(iPad);
|
||||
}
|
||||
void AppGameServices::setOpacityTimer(int iPad) { game_.SetOpacityTimer(iPad); }
|
||||
|
||||
void AppGameServices::tickOpacityTimer(int iPad) {
|
||||
game_.TickOpacityTimer(iPad);
|
||||
|
|
@ -423,8 +406,8 @@ unsigned int AppGameServices::dlcCheckForCorrupt(bool showMessage) {
|
|||
return game_.m_dlcManager.checkForCorruptDLCAndAlert(showMessage);
|
||||
}
|
||||
bool AppGameServices::dlcReadDataFile(unsigned int& filesProcessed,
|
||||
const std::string& path,
|
||||
DLCPack* pack, bool fromArchive) {
|
||||
const std::string& path, DLCPack* pack,
|
||||
bool fromArchive) {
|
||||
return game_.m_dlcManager.readDLCDataFile(filesProcessed, path, pack,
|
||||
fromArchive);
|
||||
}
|
||||
|
|
@ -435,7 +418,7 @@ void AppGameServices::dlcRemovePack(DLCPack* pack) {
|
|||
// -- Game rules --
|
||||
|
||||
LevelGenerationOptions* AppGameServices::loadGameRules(std::uint8_t* data,
|
||||
unsigned int size) {
|
||||
unsigned int size) {
|
||||
return game_.m_gameRules.loadGameRules(data, size);
|
||||
}
|
||||
void AppGameServices::saveGameRules(std::uint8_t** data, unsigned int* size) {
|
||||
|
|
@ -444,7 +427,8 @@ void AppGameServices::saveGameRules(std::uint8_t** data, unsigned int* size) {
|
|||
void AppGameServices::unloadCurrentGameRules() {
|
||||
game_.m_gameRules.unloadCurrentGameRules();
|
||||
}
|
||||
void AppGameServices::setLevelGenerationOptions(LevelGenerationOptions* levelGen) {
|
||||
void AppGameServices::setLevelGenerationOptions(
|
||||
LevelGenerationOptions* levelGen) {
|
||||
game_.m_gameRules.setLevelGenerationOptions(levelGen);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,8 +22,7 @@ public:
|
|||
|
||||
// -- Game host options --
|
||||
unsigned int getGameHostOption(eGameHostOption option) override;
|
||||
void setGameHostOption(eGameHostOption option,
|
||||
unsigned int value) override;
|
||||
void setGameHostOption(eGameHostOption option, unsigned int value) override;
|
||||
|
||||
// -- Level generation --
|
||||
LevelGenerationOptions* getLevelGenerationOptions() override;
|
||||
|
|
@ -113,8 +112,7 @@ public:
|
|||
void setRichPresenceContext(int iPad, int contextId) override;
|
||||
void captureSaveThumbnail() override;
|
||||
void getSaveThumbnail(std::uint8_t** data, unsigned int* size) override;
|
||||
void readBannedList(int iPad, eTMSAction action,
|
||||
bool bCallback) override;
|
||||
void readBannedList(int iPad, eTMSAction action, bool bCallback) override;
|
||||
void updatePlayerInfo(std::uint8_t networkSmallId,
|
||||
int16_t playerColourIndex,
|
||||
unsigned int playerPrivileges) override;
|
||||
|
|
@ -139,13 +137,12 @@ public:
|
|||
int getHTMLColour(eMinecraftColour colour) override;
|
||||
std::string getEntityName(EntityTypeId type) override;
|
||||
const char* getGameRulesString(const std::string& key) override;
|
||||
unsigned int createImageTextData(std::uint8_t* textMetadata,
|
||||
int64_t seed, bool hasSeed,
|
||||
unsigned int uiHostOptions,
|
||||
unsigned int createImageTextData(std::uint8_t* textMetadata, int64_t seed,
|
||||
bool hasSeed, unsigned int uiHostOptions,
|
||||
unsigned int uiTexturePackId) override;
|
||||
std::string getFilePath(std::uint32_t packId, std::string filename,
|
||||
bool bAddDataFolder,
|
||||
std::string mountPoint) override;
|
||||
bool bAddDataFolder,
|
||||
std::string mountPoint) override;
|
||||
char* getUniqueMapName() override;
|
||||
void setUniqueMapName(char* name) override;
|
||||
unsigned int getOpacityTimer(int iPad) override;
|
||||
|
|
@ -160,14 +157,13 @@ public:
|
|||
DLCSkinFile* getDLCSkinFile(const std::string& name) override;
|
||||
bool dlcNeedsCorruptCheck() override;
|
||||
unsigned int dlcCheckForCorrupt(bool showMessage) override;
|
||||
bool dlcReadDataFile(unsigned int& filesProcessed,
|
||||
const std::string& path, DLCPack* pack,
|
||||
bool fromArchive) override;
|
||||
bool dlcReadDataFile(unsigned int& filesProcessed, const std::string& path,
|
||||
DLCPack* pack, bool fromArchive) override;
|
||||
void dlcRemovePack(DLCPack* pack) override;
|
||||
|
||||
// -- Game rules --
|
||||
LevelGenerationOptions* loadGameRules(std::uint8_t* data,
|
||||
unsigned int size) override;
|
||||
unsigned int size) override;
|
||||
void saveGameRules(std::uint8_t** data, unsigned int* size) override;
|
||||
void unloadCurrentGameRules() override;
|
||||
void setLevelGenerationOptions(LevelGenerationOptions* levelGen) override;
|
||||
|
|
|
|||
|
|
@ -2,16 +2,15 @@
|
|||
|
||||
#include <cstdint>
|
||||
|
||||
#include "platform/storage/storage.h"
|
||||
#include "minecraft/GameTypes.h"
|
||||
#include "platform/profile/ProfileConstants.h"
|
||||
#include "minecraft/GameEnums.h"
|
||||
#include "minecraft/GameTypes.h"
|
||||
#include "app/common/Tutorial/TutorialEnum.h"
|
||||
#include "app/common/UI/All Platforms/UIEnums.h"
|
||||
#include "platform/NetTypes.h"
|
||||
#include "minecraft/GameEnums.h"
|
||||
#include "minecraft/GameTypes.h"
|
||||
#include "minecraft/client/model/SkinBox.h"
|
||||
#include "platform/NetTypes.h"
|
||||
#include "platform/XboxStubs.h"
|
||||
#include "platform/profile/ProfileConstants.h"
|
||||
#include "platform/storage/storage.h"
|
||||
|
||||
typedef struct {
|
||||
char* wchFilename;
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@
|
|||
#include "minecraft/client/Minecraft.h"
|
||||
#include "minecraft/client/skins/TexturePack.h"
|
||||
#include "minecraft/client/skins/TexturePackRepository.h"
|
||||
#include "platform/fs/fs.h"
|
||||
#include "platform/PlatformTypes.h"
|
||||
#include "platform/fs/fs.h"
|
||||
|
||||
ArchiveManager::ArchiveManager()
|
||||
: m_mediaArchive(nullptr), m_dwRequiredTexturePackID(0) {}
|
||||
|
|
|
|||
|
|
@ -10,13 +10,9 @@
|
|||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "platform/PlatformTypes.h"
|
||||
#include "platform/PlatformTypes.h"
|
||||
#include "app/common/Audio/Consoles_SoundEngine.h"
|
||||
#include "app/linux/Iggy/include/rrCore.h"
|
||||
#include "app/linux/LinuxGame.h"
|
||||
#include "platform/C4JThread.h"
|
||||
#include "platform/fs/fs.h"
|
||||
#include "java/Random.h"
|
||||
#include "minecraft/client/Minecraft.h"
|
||||
#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h"
|
||||
|
|
@ -24,6 +20,9 @@
|
|||
#include "minecraft/util/Mth.h"
|
||||
#include "minecraft/world/entity/Mob.h"
|
||||
#include "minecraft/world/level/storage/LevelData.h"
|
||||
#include "platform/C4JThread.h"
|
||||
#include "platform/PlatformTypes.h"
|
||||
#include "platform/fs/fs.h"
|
||||
|
||||
#if defined(__linux__)
|
||||
#define STB_VORBIS_HEADER_ONLY
|
||||
|
|
@ -132,7 +131,8 @@ struct MiniAudioSound {
|
|||
bool active;
|
||||
};
|
||||
|
||||
SoundEngine::SoundEngine() : m_audio(std::make_unique<SoundEngineMiniAudio>()) {}
|
||||
SoundEngine::SoundEngine()
|
||||
: m_audio(std::make_unique<SoundEngineMiniAudio>()) {}
|
||||
SoundEngine::~SoundEngine() = default;
|
||||
std::vector<MiniAudioSound*> m_activeSounds;
|
||||
void SoundEngine::init(Options* pOptions) {
|
||||
|
|
@ -167,7 +167,8 @@ void SoundEngine::init(Options* pOptions) {
|
|||
m_audio->engineConfig = ma_engine_config_init();
|
||||
m_audio->engineConfig.listenerCount = MAX_LOCAL_PLAYERS;
|
||||
|
||||
if (ma_engine_init(&m_audio->engineConfig, &m_audio->engine) != MA_SUCCESS) {
|
||||
if (ma_engine_init(&m_audio->engineConfig, &m_audio->engine) !=
|
||||
MA_SUCCESS) {
|
||||
app.DebugPrintf("Failed to initialize miniaudio engine\n");
|
||||
return;
|
||||
}
|
||||
|
|
@ -192,9 +193,8 @@ void SoundEngine::play(int iSound, float x, float y, float z, float volume,
|
|||
if (szId[i] == '.') szId[i] = '/';
|
||||
|
||||
std::string base = PlatformFilesystem.getBasePath().string() + "/";
|
||||
const char* roots[] = {
|
||||
"Sound/Minecraft/", "app/common/Sound/Minecraft/",
|
||||
"app/common/res/TitleUpdate/res/Sound/Minecraft/"};
|
||||
const char* roots[] = {"Sound/Minecraft/", "app/common/Sound/Minecraft/",
|
||||
"app/common/res/TitleUpdate/res/Sound/Minecraft/"};
|
||||
char finalPath[512] = {0};
|
||||
bool found = false;
|
||||
|
||||
|
|
@ -237,8 +237,9 @@ void SoundEngine::play(int iSound, float x, float y, float z, float volume,
|
|||
s->info.pitch = pitch;
|
||||
s->info.bIs3D = true;
|
||||
|
||||
if (ma_sound_init_from_file(&m_audio->engine, finalPath, MA_SOUND_FLAG_ASYNC,
|
||||
nullptr, nullptr, &s->sound) == MA_SUCCESS) {
|
||||
if (ma_sound_init_from_file(&m_audio->engine, finalPath,
|
||||
MA_SOUND_FLAG_ASYNC, nullptr, nullptr,
|
||||
&s->sound) == MA_SUCCESS) {
|
||||
ma_sound_set_spatialization_enabled(&s->sound, MA_TRUE);
|
||||
ma_sound_set_min_distance(&s->sound, 2.0f);
|
||||
ma_sound_set_max_distance(&s->sound, 48.0f);
|
||||
|
|
@ -289,8 +290,9 @@ void SoundEngine::playUI(int iSound, float volume, float pitch) {
|
|||
s->info.pitch = pitch;
|
||||
s->info.bIs3D = false;
|
||||
|
||||
if (ma_sound_init_from_file(&m_audio->engine, finalPath, MA_SOUND_FLAG_ASYNC,
|
||||
nullptr, nullptr, &s->sound) == MA_SUCCESS) {
|
||||
if (ma_sound_init_from_file(&m_audio->engine, finalPath,
|
||||
MA_SOUND_FLAG_ASYNC, nullptr, nullptr,
|
||||
&s->sound) == MA_SUCCESS) {
|
||||
ma_sound_set_spatialization_enabled(&s->sound, MA_FALSE);
|
||||
ma_sound_set_volume(&s->sound, volume * m_MasterEffectsVolume);
|
||||
ma_sound_set_pitch(&s->sound, pitch);
|
||||
|
|
@ -432,7 +434,8 @@ int SoundEngine::OpenStreamThreadProc(void* lpParameter) {
|
|||
|
||||
ma_result result = ma_sound_init_from_file(
|
||||
&soundEngine->m_audio->engine, soundEngine->m_szStreamName,
|
||||
MA_SOUND_FLAG_STREAM, nullptr, nullptr, &soundEngine->m_audio->musicStream);
|
||||
MA_SOUND_FLAG_STREAM, nullptr, nullptr,
|
||||
&soundEngine->m_audio->musicStream);
|
||||
|
||||
if (result != MA_SUCCESS) {
|
||||
app.DebugPrintf(
|
||||
|
|
@ -442,7 +445,8 @@ int SoundEngine::OpenStreamThreadProc(void* lpParameter) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
ma_sound_set_spatialization_enabled(&soundEngine->m_audio->musicStream, MA_FALSE);
|
||||
ma_sound_set_spatialization_enabled(&soundEngine->m_audio->musicStream,
|
||||
MA_FALSE);
|
||||
ma_sound_set_looping(&soundEngine->m_audio->musicStream, MA_FALSE);
|
||||
|
||||
soundEngine->m_musicStreamActive = true;
|
||||
|
|
@ -460,27 +464,29 @@ void SoundEngine::playMusicTick() {
|
|||
return;
|
||||
}
|
||||
if (m_musicID != -1) {
|
||||
std::string base = PlatformFilesystem.getBasePath().string() + "/";
|
||||
std::string base =
|
||||
PlatformFilesystem.getBasePath().string() + "/";
|
||||
bool isCD = (m_musicID >= m_iStream_CD_1);
|
||||
const char* folder = isCD ? "cds/" : "music/";
|
||||
const char* track = m_szStreamFileA[m_musicID];
|
||||
bool found = false;
|
||||
m_szStreamName[0] = '\0';
|
||||
|
||||
const char* roots[] = {"app/common/music/",
|
||||
"music/", "./"};
|
||||
const char* roots[] = {"app/common/music/", "music/", "./"};
|
||||
|
||||
for (const char* r : roots) {
|
||||
for (const char* e : {".ogg", ".mp3", ".wav"}) {
|
||||
// try with folder prefix (music/ or cds/)
|
||||
snprintf(m_szStreamName, sizeof(m_szStreamName), "%s%s%s%s%s", base.c_str(), r, folder,
|
||||
track, e);
|
||||
snprintf(m_szStreamName, sizeof(m_szStreamName),
|
||||
"%s%s%s%s%s", base.c_str(), r, folder, track,
|
||||
e);
|
||||
if (PlatformFilesystem.exists(m_szStreamName)) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
// try without folder prefix
|
||||
snprintf(m_szStreamName, sizeof(m_szStreamName), "%s%s%s%s", base.c_str(), r, track, e);
|
||||
snprintf(m_szStreamName, sizeof(m_szStreamName),
|
||||
"%s%s%s%s", base.c_str(), r, track, e);
|
||||
if (PlatformFilesystem.exists(m_szStreamName)) {
|
||||
found = true;
|
||||
break;
|
||||
|
|
@ -526,7 +532,8 @@ void SoundEngine::playMusicTick() {
|
|||
m_StreamingAudioInfo.y, m_StreamingAudioInfo.z);
|
||||
}
|
||||
|
||||
ma_sound_set_pitch(&m_audio->musicStream, m_StreamingAudioInfo.pitch);
|
||||
ma_sound_set_pitch(&m_audio->musicStream,
|
||||
m_StreamingAudioInfo.pitch);
|
||||
ma_sound_set_volume(
|
||||
&m_audio->musicStream,
|
||||
m_StreamingAudioInfo.volume * getMasterMusicVolume());
|
||||
|
|
@ -683,7 +690,8 @@ void SoundEngine::updateMiniAudio() {
|
|||
m_ListenerA[i].vOrientFront.y,
|
||||
m_ListenerA[i].vOrientFront.z);
|
||||
|
||||
ma_engine_listener_set_world_up(&m_audio->engine, 0, 0.0f, 1.0f, 0.0f);
|
||||
ma_engine_listener_set_world_up(&m_audio->engine, 0, 0.0f, 1.0f,
|
||||
0.0f);
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@ class Random;
|
|||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "platform/PlatformTypes.h"
|
||||
#include "app/common/Audio/Consoles_SoundEngine.h"
|
||||
#include "app/linux/Iggy/include/rrCore.h"
|
||||
#include "minecraft/sounds/SoundTypes.h"
|
||||
#include "platform/PlatformTypes.h"
|
||||
|
||||
// Forward-declare the miniaudio backing state. The full struct lives in
|
||||
// SoundEngine.cpp where miniaudio.h is actually included. This keeps
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ const char* ConsoleSoundEngine::wchSoundNames[eSoundType_MAX] = {
|
|||
"mob/cat/meow", // eSoundType_MOB_CAT_MEOW
|
||||
// 4J-PB - correct the name of the event for hitting ocelots
|
||||
"mob/cat/hitt", // eSoundType_MOB_CAT_HITT
|
||||
// "mob.irongolem.throw", //
|
||||
// "mob.irongolem.throw", //
|
||||
// eSoundType_MOB_IRONGOLEM_THROW "mob.irongolem.hit",
|
||||
//// eSoundType_MOB_IRONGOLEM_HIT "mob.irongolem.death",
|
||||
//// eSoundType_MOB_IRONGOLEM_DEATH "mob.irongolem.walk",
|
||||
|
|
@ -205,11 +205,11 @@ const char* ConsoleSoundEngine::wchSoundNames[eSoundType_MAX] = {
|
|||
"mob/horse/jump", // eSoundType_MOB_HORSE_JUMP,
|
||||
|
||||
"mob/witch/idle", // eSoundType_MOB_WITCH_IDLE, <---
|
||||
// missing
|
||||
// missing
|
||||
"mob/witch/hurt", // eSoundType_MOB_WITCH_HURT, <---
|
||||
// missing
|
||||
// missing
|
||||
"mob/witch/death", // eSoundType_MOB_WITCH_DEATH, <---
|
||||
// missing
|
||||
// missing
|
||||
|
||||
"mob/slime/big", // eSoundType_MOB_SLIME_BIG,
|
||||
"mob/slime/small", // eSoundType_MOB_SLIME_SMALL,
|
||||
|
|
|
|||
|
|
@ -29,8 +29,8 @@ void BannedListManager::invalidate(int iPad) {
|
|||
}
|
||||
}
|
||||
|
||||
void BannedListManager::addLevel(int iPad, PlayerUID xuid,
|
||||
char* pszLevelName, bool bWriteToTMS) {
|
||||
void BannedListManager::addLevel(int iPad, PlayerUID xuid, char* pszLevelName,
|
||||
bool bWriteToTMS) {
|
||||
// we will have retrieved the banned level list from TMS, so add this one to
|
||||
// it and write it back to TMS
|
||||
|
||||
|
|
@ -64,8 +64,7 @@ void BannedListManager::addLevel(int iPad, PlayerUID xuid,
|
|||
// update telemetry too
|
||||
}
|
||||
|
||||
bool BannedListManager::isInList(int iPad, PlayerUID xuid,
|
||||
char* pszLevelName) {
|
||||
bool BannedListManager::isInList(int iPad, PlayerUID xuid, char* pszLevelName) {
|
||||
for (auto it = m_vBannedListA[iPad]->begin();
|
||||
it != m_vBannedListA[iPad]->end(); ++it) {
|
||||
PBANNEDLISTDATA pData = *it;
|
||||
|
|
@ -126,6 +125,4 @@ void BannedListManager::setUniqueMapName(char* pszUniqueMapName) {
|
|||
memcpy(m_pszUniqueMapName, pszUniqueMapName, 14);
|
||||
}
|
||||
|
||||
char* BannedListManager::getUniqueMapName() {
|
||||
return m_pszUniqueMapName;
|
||||
}
|
||||
char* BannedListManager::getUniqueMapName() { return m_pszUniqueMapName; }
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
#include "DLCColourTableFile.h"
|
||||
|
||||
#include "DLCManager.h"
|
||||
#include "minecraft/client/resources/Colours/ColourTable.h"
|
||||
#include "app/common/DLC/DLCFile.h"
|
||||
#include "app/linux/LinuxGame.h"
|
||||
#include "minecraft/client/Minecraft.h"
|
||||
#include "minecraft/client/resources/Colours/ColourTable.h"
|
||||
#include "minecraft/client/skins/TexturePack.h"
|
||||
#include "minecraft/client/skins/TexturePackRepository.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
#include <sstream>
|
||||
|
||||
#include "minecraft/Minecraft_Macros.h"
|
||||
#include "app/common/DLC/DLCManager.h"
|
||||
#include "minecraft/Minecraft_Macros.h"
|
||||
|
||||
DLCFile::DLCFile(DLCManager::EDLCType type, const std::string& path) {
|
||||
m_type = type;
|
||||
|
|
|
|||
|
|
@ -13,20 +13,19 @@
|
|||
#include <unordered_map>
|
||||
#include <utility>
|
||||
|
||||
#include "simdutf.h"
|
||||
|
||||
#include "platform/profile/profile.h"
|
||||
#include "platform/storage/storage.h"
|
||||
#include "DLCFile.h"
|
||||
#include "DLCPack.h"
|
||||
#include "app/common/GameRules/GameRuleManager.h"
|
||||
#include "app/linux/LinuxGame.h"
|
||||
#include "app/linux/Linux_UIController.h"
|
||||
#include "platform/fs/fs.h"
|
||||
#include "util/StringHelpers.h"
|
||||
#include "minecraft/client/Minecraft.h"
|
||||
#include "minecraft/client/skins/TexturePackRepository.h"
|
||||
#include "platform/fs/fs.h"
|
||||
#include "platform/profile/profile.h"
|
||||
#include "platform/storage/storage.h"
|
||||
#include "simdutf.h"
|
||||
#include "strings.h"
|
||||
#include "util/StringHelpers.h"
|
||||
|
||||
// 4jcraft, this is the size of wchar_t on disk
|
||||
// the DLC was created on windows, with wchar_t beeing 2 bytes and UTF-16
|
||||
|
|
@ -71,7 +70,8 @@ std::string getMountedDlcReadPath(const std::string& path) {
|
|||
std::string readPath = path;
|
||||
|
||||
#if defined(_WINDOWS64)
|
||||
const std::string mountedPath = PlatformStorage.GetMountedPath(path.c_str());
|
||||
const std::string mountedPath =
|
||||
PlatformStorage.GetMountedPath(path.c_str());
|
||||
if (!mountedPath.empty()) {
|
||||
readPath = mountedPath;
|
||||
}
|
||||
|
|
@ -240,7 +240,7 @@ unsigned int DLCManager::getPackIndex(DLCPack* pack, bool& found,
|
|||
if (pack == nullptr) {
|
||||
app.DebugPrintf(
|
||||
"DLCManager: Attempting to find the index for a nullptr pack\n");
|
||||
//assert(0);
|
||||
// assert(0);
|
||||
return foundIndex;
|
||||
}
|
||||
if (type != e_DLCType_All) {
|
||||
|
|
@ -401,10 +401,12 @@ bool DLCManager::processDLCDataFile(unsigned int& dwFilesProcessed,
|
|||
|
||||
// for details, read in the function below
|
||||
#define DLC_PARAM_WSTR(buf, off) \
|
||||
DLC_WSTRING((buf) + (off) + offsetof(IPlatformStorage::DLC_FILE_PARAM, wchData))
|
||||
DLC_WSTRING((buf) + (off) + \
|
||||
offsetof(IPlatformStorage::DLC_FILE_PARAM, wchData))
|
||||
|
||||
#define DLC_DETAIL_WSTR(buf, off) \
|
||||
DLC_WSTRING((buf) + (off) + offsetof(IPlatformStorage::DLC_FILE_DETAILS, wchFile))
|
||||
DLC_WSTRING((buf) + (off) + \
|
||||
offsetof(IPlatformStorage::DLC_FILE_DETAILS, wchFile))
|
||||
{
|
||||
std::unordered_map<int, DLCManager::EDLCParameterType> parameterMapping;
|
||||
unsigned int uiCurrentByte = 0;
|
||||
|
|
@ -462,7 +464,8 @@ bool DLCManager::processDLCDataFile(unsigned int& dwFilesProcessed,
|
|||
uiCurrentByte += DLC_PARAM_ADV(parBuf.dwWchCount);
|
||||
DLC_READ_PARAM(&parBuf, pbData, uiCurrentByte);
|
||||
}
|
||||
// ulCurrentByte+=ulParameterCount * sizeof(IPlatformStorage::DLC_FILE_PARAM);
|
||||
// ulCurrentByte+=ulParameterCount *
|
||||
// sizeof(IPlatformStorage::DLC_FILE_PARAM);
|
||||
|
||||
unsigned int uiFileCount;
|
||||
DLC_READ_UINT(&uiFileCount, pbData, uiCurrentByte);
|
||||
|
|
@ -477,7 +480,9 @@ bool DLCManager::processDLCDataFile(unsigned int& dwFilesProcessed,
|
|||
DLC_READ_DETAIL(&fileBuf, pbData, dwTemp);
|
||||
}
|
||||
std::uint8_t* pbTemp =
|
||||
&pbData[dwTemp]; //+ sizeof(IPlatformStorage::DLC_FILE_DETAILS)*ulFileCount;
|
||||
&pbData
|
||||
[dwTemp]; //+
|
||||
//sizeof(IPlatformStorage::DLC_FILE_DETAILS)*ulFileCount;
|
||||
DLC_READ_DETAIL(&fileBuf, pbData, uiCurrentByte);
|
||||
|
||||
for (unsigned int i = 0; i < uiFileCount; i++) {
|
||||
|
|
|
|||
|
|
@ -21,33 +21,58 @@ public:
|
|||
|
||||
static constexpr EDLCType e_DLCType_Skin = ::minecraft::dlc::e_DLCType_Skin;
|
||||
static constexpr EDLCType e_DLCType_Cape = ::minecraft::dlc::e_DLCType_Cape;
|
||||
static constexpr EDLCType e_DLCType_Texture = ::minecraft::dlc::e_DLCType_Texture;
|
||||
static constexpr EDLCType e_DLCType_UIData = ::minecraft::dlc::e_DLCType_UIData;
|
||||
static constexpr EDLCType e_DLCType_PackConfig = ::minecraft::dlc::e_DLCType_PackConfig;
|
||||
static constexpr EDLCType e_DLCType_TexturePack = ::minecraft::dlc::e_DLCType_TexturePack;
|
||||
static constexpr EDLCType e_DLCType_LocalisationData = ::minecraft::dlc::e_DLCType_LocalisationData;
|
||||
static constexpr EDLCType e_DLCType_GameRules = ::minecraft::dlc::e_DLCType_GameRules;
|
||||
static constexpr EDLCType e_DLCType_Audio = ::minecraft::dlc::e_DLCType_Audio;
|
||||
static constexpr EDLCType e_DLCType_ColourTable = ::minecraft::dlc::e_DLCType_ColourTable;
|
||||
static constexpr EDLCType e_DLCType_GameRulesHeader = ::minecraft::dlc::e_DLCType_GameRulesHeader;
|
||||
static constexpr EDLCType e_DLCType_Texture =
|
||||
::minecraft::dlc::e_DLCType_Texture;
|
||||
static constexpr EDLCType e_DLCType_UIData =
|
||||
::minecraft::dlc::e_DLCType_UIData;
|
||||
static constexpr EDLCType e_DLCType_PackConfig =
|
||||
::minecraft::dlc::e_DLCType_PackConfig;
|
||||
static constexpr EDLCType e_DLCType_TexturePack =
|
||||
::minecraft::dlc::e_DLCType_TexturePack;
|
||||
static constexpr EDLCType e_DLCType_LocalisationData =
|
||||
::minecraft::dlc::e_DLCType_LocalisationData;
|
||||
static constexpr EDLCType e_DLCType_GameRules =
|
||||
::minecraft::dlc::e_DLCType_GameRules;
|
||||
static constexpr EDLCType e_DLCType_Audio =
|
||||
::minecraft::dlc::e_DLCType_Audio;
|
||||
static constexpr EDLCType e_DLCType_ColourTable =
|
||||
::minecraft::dlc::e_DLCType_ColourTable;
|
||||
static constexpr EDLCType e_DLCType_GameRulesHeader =
|
||||
::minecraft::dlc::e_DLCType_GameRulesHeader;
|
||||
static constexpr EDLCType e_DLCType_Max = ::minecraft::dlc::e_DLCType_Max;
|
||||
static constexpr EDLCType e_DLCType_All = ::minecraft::dlc::e_DLCType_All;
|
||||
|
||||
static constexpr EDLCParameterType e_DLCParamType_Invalid = ::minecraft::dlc::e_DLCParamType_Invalid;
|
||||
static constexpr EDLCParameterType e_DLCParamType_DisplayName = ::minecraft::dlc::e_DLCParamType_DisplayName;
|
||||
static constexpr EDLCParameterType e_DLCParamType_ThemeName = ::minecraft::dlc::e_DLCParamType_ThemeName;
|
||||
static constexpr EDLCParameterType e_DLCParamType_Free = ::minecraft::dlc::e_DLCParamType_Free;
|
||||
static constexpr EDLCParameterType e_DLCParamType_Credit = ::minecraft::dlc::e_DLCParamType_Credit;
|
||||
static constexpr EDLCParameterType e_DLCParamType_Cape = ::minecraft::dlc::e_DLCParamType_Cape;
|
||||
static constexpr EDLCParameterType e_DLCParamType_Box = ::minecraft::dlc::e_DLCParamType_Box;
|
||||
static constexpr EDLCParameterType e_DLCParamType_Anim = ::minecraft::dlc::e_DLCParamType_Anim;
|
||||
static constexpr EDLCParameterType e_DLCParamType_PackId = ::minecraft::dlc::e_DLCParamType_PackId;
|
||||
static constexpr EDLCParameterType e_DLCParamType_NetherParticleColour = ::minecraft::dlc::e_DLCParamType_NetherParticleColour;
|
||||
static constexpr EDLCParameterType e_DLCParamType_EnchantmentTextColour = ::minecraft::dlc::e_DLCParamType_EnchantmentTextColour;
|
||||
static constexpr EDLCParameterType e_DLCParamType_EnchantmentTextFocusColour = ::minecraft::dlc::e_DLCParamType_EnchantmentTextFocusColour;
|
||||
static constexpr EDLCParameterType e_DLCParamType_DataPath = ::minecraft::dlc::e_DLCParamType_DataPath;
|
||||
static constexpr EDLCParameterType e_DLCParamType_PackVersion = ::minecraft::dlc::e_DLCParamType_PackVersion;
|
||||
static constexpr EDLCParameterType e_DLCParamType_Max = ::minecraft::dlc::e_DLCParamType_Max;
|
||||
static constexpr EDLCParameterType e_DLCParamType_Invalid =
|
||||
::minecraft::dlc::e_DLCParamType_Invalid;
|
||||
static constexpr EDLCParameterType e_DLCParamType_DisplayName =
|
||||
::minecraft::dlc::e_DLCParamType_DisplayName;
|
||||
static constexpr EDLCParameterType e_DLCParamType_ThemeName =
|
||||
::minecraft::dlc::e_DLCParamType_ThemeName;
|
||||
static constexpr EDLCParameterType e_DLCParamType_Free =
|
||||
::minecraft::dlc::e_DLCParamType_Free;
|
||||
static constexpr EDLCParameterType e_DLCParamType_Credit =
|
||||
::minecraft::dlc::e_DLCParamType_Credit;
|
||||
static constexpr EDLCParameterType e_DLCParamType_Cape =
|
||||
::minecraft::dlc::e_DLCParamType_Cape;
|
||||
static constexpr EDLCParameterType e_DLCParamType_Box =
|
||||
::minecraft::dlc::e_DLCParamType_Box;
|
||||
static constexpr EDLCParameterType e_DLCParamType_Anim =
|
||||
::minecraft::dlc::e_DLCParamType_Anim;
|
||||
static constexpr EDLCParameterType e_DLCParamType_PackId =
|
||||
::minecraft::dlc::e_DLCParamType_PackId;
|
||||
static constexpr EDLCParameterType e_DLCParamType_NetherParticleColour =
|
||||
::minecraft::dlc::e_DLCParamType_NetherParticleColour;
|
||||
static constexpr EDLCParameterType e_DLCParamType_EnchantmentTextColour =
|
||||
::minecraft::dlc::e_DLCParamType_EnchantmentTextColour;
|
||||
static constexpr EDLCParameterType
|
||||
e_DLCParamType_EnchantmentTextFocusColour =
|
||||
::minecraft::dlc::e_DLCParamType_EnchantmentTextFocusColour;
|
||||
static constexpr EDLCParameterType e_DLCParamType_DataPath =
|
||||
::minecraft::dlc::e_DLCParamType_DataPath;
|
||||
static constexpr EDLCParameterType e_DLCParamType_PackVersion =
|
||||
::minecraft::dlc::e_DLCParamType_PackVersion;
|
||||
static constexpr EDLCParameterType e_DLCParamType_Max =
|
||||
::minecraft::dlc::e_DLCParamType_Max;
|
||||
|
||||
const static char* wchTypeNamesA[e_DLCParamType_Max];
|
||||
|
||||
|
|
@ -85,7 +110,7 @@ public:
|
|||
EDLCType type = e_DLCType_All);
|
||||
DLCSkinFile* getSkinFile(
|
||||
const std::string& path); // Will hunt all packs of type skin to find
|
||||
// the right skinfile
|
||||
// the right skinfile
|
||||
|
||||
DLCPack* getPackContainingSkin(const std::string& path);
|
||||
unsigned int getPackIndexContainingSkin(const std::string& path,
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
#include <sstream>
|
||||
#include <utility>
|
||||
|
||||
#include "platform/profile/profile.h"
|
||||
#include "DLCAudioFile.h"
|
||||
#include "DLCCapeFile.h"
|
||||
#include "DLCColourTableFile.h"
|
||||
|
|
@ -15,12 +14,13 @@
|
|||
#include "DLCLocalisationFile.h"
|
||||
#include "DLCTextureFile.h"
|
||||
#include "DLCUIDataFile.h"
|
||||
#include "minecraft/Console_Debug_enum.h"
|
||||
#include "app/common/DLC/DLCFile.h"
|
||||
#include "app/common/DLC/DLCManager.h"
|
||||
#include "app/common/DLC/DLCSkinFile.h"
|
||||
#include "minecraft/locale/StringTable.h"
|
||||
#include "app/linux/LinuxGame.h"
|
||||
#include "minecraft/Console_Debug_enum.h"
|
||||
#include "minecraft/locale/StringTable.h"
|
||||
#include "platform/profile/profile.h"
|
||||
#include "util/StringHelpers.h"
|
||||
|
||||
DLCPack::DLCPack(const std::string& name, std::uint32_t dwLicenseMask) {
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@
|
|||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
#include "platform/PlatformTypes.h"
|
||||
#include "DLCManager.h"
|
||||
#include "app/common/DLC/DLCSkinFile.h"
|
||||
#include "platform/PlatformTypes.h"
|
||||
|
||||
class DLCFile;
|
||||
class DLCSkinFile;
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@
|
|||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
|
||||
#include "platform/renderer/renderer.h"
|
||||
#include "DLCManager.h"
|
||||
#include "app/common/DLC/DLCFile.h"
|
||||
#include "app/linux/LinuxGame.h"
|
||||
#include "minecraft/client/model/SkinBox.h"
|
||||
#include "platform/XboxStubs.h"
|
||||
#include "platform/renderer/renderer.h"
|
||||
|
||||
DLCSkinFile::DLCSkinFile(const std::string& path)
|
||||
: DLCFile(DLCManager::e_DLCType_Skin, path) {
|
||||
|
|
@ -56,8 +56,8 @@ void DLCSkinFile::addParameter(DLCManager::EDLCParameterType type,
|
|||
|
||||
int maximumChars = 55;
|
||||
|
||||
bool bIsSDMode =
|
||||
!PlatformRenderer.IsHiDef() && !PlatformRenderer.IsWidescreen();
|
||||
bool bIsSDMode = !PlatformRenderer.IsHiDef() &&
|
||||
!PlatformRenderer.IsWidescreen();
|
||||
|
||||
if (bIsSDMode) {
|
||||
maximumChars = 45;
|
||||
|
|
@ -111,8 +111,8 @@ void DLCSkinFile::addParameter(DLCManager::EDLCParameterType type,
|
|||
memset(pSkinBox, 0, sizeof(SKIN_BOX));
|
||||
|
||||
sscanf(value.c_str(), "%9s%f%f%f%f%f%f%f%f", wchBodyPart,
|
||||
&pSkinBox->fX, &pSkinBox->fY, &pSkinBox->fZ, &pSkinBox->fW,
|
||||
&pSkinBox->fH, &pSkinBox->fD, &pSkinBox->fU, &pSkinBox->fV);
|
||||
&pSkinBox->fX, &pSkinBox->fY, &pSkinBox->fZ, &pSkinBox->fW,
|
||||
&pSkinBox->fH, &pSkinBox->fD, &pSkinBox->fU, &pSkinBox->fV);
|
||||
|
||||
if (strcmp(wchBodyPart, "HEAD") == 0) {
|
||||
pSkinBox->ePart = eBodyPart_Head;
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
#include "DLCFile.h"
|
||||
#include "app/common/DLC/DLCManager.h"
|
||||
#include "minecraft/client/model/SkinBox.h"
|
||||
#include "minecraft/client/model/HumanoidModel.h"
|
||||
#include "minecraft/client/model/SkinBox.h"
|
||||
|
||||
class DLCSkinFile : public DLCFile {
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -1,20 +1,20 @@
|
|||
#include "app/common/DLCController.h"
|
||||
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/DLC/DLCPack.h"
|
||||
#include <cstring>
|
||||
#include <mutex>
|
||||
|
||||
#include "app/common/DLC/DLCManager.h"
|
||||
#include "app/common/DLC/DLCPack.h"
|
||||
#include "app/common/DLC/DLCSkinFile.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "app/linux/LinuxGame.h"
|
||||
#include "app/linux/Linux_UIController.h"
|
||||
#include "minecraft/client/Minecraft.h"
|
||||
#include "minecraft/client/skins/TexturePack.h"
|
||||
#include "minecraft/client/skins/TexturePackRepository.h"
|
||||
#include "platform/storage/storage.h"
|
||||
#include "platform/profile/profile.h"
|
||||
#include "platform/XboxStubs.h"
|
||||
|
||||
#include <cstring>
|
||||
#include <mutex>
|
||||
#include "platform/profile/profile.h"
|
||||
#include "platform/storage/storage.h"
|
||||
|
||||
DLCController::DLCController() {
|
||||
m_pDLCFileBuffer = nullptr;
|
||||
|
|
@ -75,10 +75,9 @@ bool DLCController::startInstallDLCProcess(int iPad) {
|
|||
"--- DLCController::startInstallDLCProcess - "
|
||||
"PlatformStorage.GetInstalledDLC\n");
|
||||
|
||||
PlatformStorage.GetInstalledDLC(
|
||||
iPad, [this](int iInstalledC, int pad) {
|
||||
return dlcInstalledCallback(iInstalledC, pad);
|
||||
});
|
||||
PlatformStorage.GetInstalledDLC(iPad, [this](int iInstalledC, int pad) {
|
||||
return dlcInstalledCallback(iInstalledC, pad);
|
||||
});
|
||||
return true;
|
||||
} else {
|
||||
app.DebugPrintf(
|
||||
|
|
@ -193,7 +192,7 @@ void DLCController::handleDLC(DLCPack* pack) {
|
|||
PlatformStorage.GetMountedDLCFileList("DLCDrive", dlcFilenames);
|
||||
for (int i = 0; i < dlcFilenames.size(); i++) {
|
||||
app.m_dlcManager.readDLCDataFile(dwFilesProcessed, dlcFilenames[i],
|
||||
pack);
|
||||
pack);
|
||||
}
|
||||
if (dwFilesProcessed == 0) app.m_dlcManager.removePack(pack);
|
||||
}
|
||||
|
|
@ -313,8 +312,7 @@ bool DLCController::getDLCFullOfferIDForPackID(const int iPackID,
|
|||
}
|
||||
}
|
||||
|
||||
DLC_INFO* DLCController::getDLCInfoForTrialOfferID(
|
||||
uint64_t ullOfferID_Trial) {
|
||||
DLC_INFO* DLCController::getDLCInfoForTrialOfferID(uint64_t ullOfferID_Trial) {
|
||||
if (DLCInfo_Trial.size() > 0) {
|
||||
auto it = DLCInfo_Trial.find(ullOfferID_Trial);
|
||||
if (it == DLCInfo_Trial.end()) {
|
||||
|
|
@ -436,12 +434,13 @@ bool DLCController::retrieveNextDLCContent() {
|
|||
app.DebugPrintf("RetrieveNextDLCContent - type = %d\n",
|
||||
pCurrent->dwType);
|
||||
#endif
|
||||
IPlatformStorage::EDLCStatus status = PlatformStorage.GetDLCOffers(
|
||||
PlatformProfile.GetPrimaryPad(),
|
||||
[this](int iOfferC, std::uint32_t dwType, int pad) {
|
||||
return dlcOffersReturned(iOfferC, dwType, pad);
|
||||
},
|
||||
pCurrent->dwType);
|
||||
IPlatformStorage::EDLCStatus status =
|
||||
PlatformStorage.GetDLCOffers(
|
||||
PlatformProfile.GetPrimaryPad(),
|
||||
[this](int iOfferC, std::uint32_t dwType, int pad) {
|
||||
return dlcOffersReturned(iOfferC, dwType, pad);
|
||||
},
|
||||
pCurrent->dwType);
|
||||
if (status == IPlatformStorage::EDLC_Pending) {
|
||||
pCurrent->eState = e_DLC_ContentState_Retrieving;
|
||||
} else {
|
||||
|
|
@ -669,9 +668,9 @@ unsigned int DLCController::addTMSPPFileTypeRequest(eDLCContentType eType,
|
|||
return 1;
|
||||
}
|
||||
|
||||
int DLCController::tmsPPFileReturned(void* pParam, int iPad, int iUserData,
|
||||
IPlatformStorage::PTMSPP_FILEDATA pFileData,
|
||||
const char* szFilename) {
|
||||
int DLCController::tmsPPFileReturned(
|
||||
void* pParam, int iPad, int iUserData,
|
||||
IPlatformStorage::PTMSPP_FILEDATA pFileData, const char* szFilename) {
|
||||
DLCController* pClass = (DLCController*)pParam;
|
||||
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@
|
|||
|
||||
#include "app/common/App_structs.h"
|
||||
#include "app/common/DLC/DLCManager.h"
|
||||
#include "platform/storage/storage.h"
|
||||
#include "platform/XboxStubs.h"
|
||||
#include "platform/storage/storage.h"
|
||||
|
||||
struct SCreditTextItemDef;
|
||||
|
||||
|
|
@ -36,9 +36,8 @@ public:
|
|||
int iPad);
|
||||
|
||||
// DLC info registration
|
||||
static int32_t registerDLCData(char*, char*, int, uint64_t, uint64_t,
|
||||
char*, unsigned int, int,
|
||||
char* pDataFile);
|
||||
static int32_t registerDLCData(char*, char*, int, uint64_t, uint64_t, char*,
|
||||
unsigned int, int, char* pDataFile);
|
||||
bool getDLCFullOfferIDForSkinID(const std::string& FirstSkin,
|
||||
uint64_t* pullVal);
|
||||
bool getDLCFullOfferIDForPackID(const int iPackID, uint64_t* pullVal);
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ DebugOptions::DebugOptions() {
|
|||
|
||||
#if defined(_DEBUG_MENUS_ENABLED)
|
||||
bool DebugOptions::debugArtToolsOn(unsigned int debugMask) {
|
||||
return settingsOn() &&
|
||||
(debugMask & (1L << eDebugSetting_ArtTools)) != 0;
|
||||
return settingsOn() && (debugMask & (1L << eDebugSetting_ArtTools)) != 0;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,34 +1,27 @@
|
|||
#include "minecraft/GameHostOptions.h"
|
||||
#include "app/common/Game.h"
|
||||
|
||||
#include "platform/PlatformTypes.h"
|
||||
#include "platform/profile/profile.h"
|
||||
#include "platform/renderer/renderer.h"
|
||||
#include "platform/storage/storage.h"
|
||||
#include "minecraft/GameTypes.h"
|
||||
#include "minecraft/GameEnums.h"
|
||||
#include "app/common/App_structs.h"
|
||||
#include "minecraft/Console_Debug_enum.h"
|
||||
#include "app/common/DLC/DLCManager.h"
|
||||
#include "app/common/DLC/DLCSkinFile.h"
|
||||
#include "app/common/GameRules/GameRuleManager.h"
|
||||
#include "app/common/Network/GameNetworkManager.h"
|
||||
#include "minecraft/network/platform/NetworkPlayerInterface.h"
|
||||
#include "app/common/Tutorial/Tutorial.h"
|
||||
#include "app/common/UI/All Platforms/UIEnums.h"
|
||||
#include "app/common/UI/All Platforms/UIStructs.h"
|
||||
#include "app/common/UI/Scenes/UIScene_FullscreenProgress.h"
|
||||
#include "app/linux/LinuxGame.h"
|
||||
#include "app/linux/Linux_UIController.h"
|
||||
#include "platform/NetTypes.h"
|
||||
#include "minecraft/client/model/SkinBox.h"
|
||||
#include "platform/XboxStubs.h"
|
||||
#include "java/Class.h"
|
||||
#include "java/File.h"
|
||||
#include "java/Random.h"
|
||||
#include "minecraft/Console_Debug_enum.h"
|
||||
#include "minecraft/GameEnums.h"
|
||||
#include "minecraft/GameHostOptions.h"
|
||||
#include "minecraft/GameTypes.h"
|
||||
#include "minecraft/client/Minecraft.h"
|
||||
#include "minecraft/client/Options.h"
|
||||
#include "minecraft/client/ProgressRenderer.h"
|
||||
#include "minecraft/client/model/SkinBox.h"
|
||||
#include "minecraft/client/model/geom/Model.h"
|
||||
#include "minecraft/client/multiplayer/ClientConnection.h"
|
||||
#include "minecraft/client/multiplayer/MultiPlayerGameMode.h"
|
||||
|
|
@ -39,6 +32,7 @@
|
|||
#include "minecraft/client/renderer/entity/EntityRenderer.h"
|
||||
#include "minecraft/client/skins/TexturePack.h"
|
||||
#include "minecraft/network/packet/DisconnectPacket.h"
|
||||
#include "minecraft/network/platform/NetworkPlayerInterface.h"
|
||||
#include "minecraft/server/MinecraftServer.h"
|
||||
#include "minecraft/stats/StatsCounter.h"
|
||||
#include "minecraft/world/Container.h"
|
||||
|
|
@ -47,6 +41,12 @@
|
|||
#include "minecraft/world/item/crafting/Recipy.h"
|
||||
#include "minecraft/world/level/tile/Tile.h"
|
||||
#include "minecraft/world/level/tile/entity/HopperTileEntity.h"
|
||||
#include "platform/NetTypes.h"
|
||||
#include "platform/PlatformTypes.h"
|
||||
#include "platform/XboxStubs.h"
|
||||
#include "platform/profile/profile.h"
|
||||
#include "platform/renderer/renderer.h"
|
||||
#include "platform/storage/storage.h"
|
||||
#include "strings.h"
|
||||
#if defined(_WINDOWS64)
|
||||
#include "app/windows/XML/ATGXmlParser.h"
|
||||
|
|
@ -71,24 +71,24 @@
|
|||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "platform/input/input.h"
|
||||
#include "app/common/Audio/SoundEngine.h"
|
||||
#include "minecraft/client/resources/Colours/ColourTable.h"
|
||||
#include "app/common/DLC/DLCPack.h"
|
||||
#include "minecraft/locale/StringTable.h"
|
||||
#include "app/common/UI/All Platforms/ArchiveFile.h"
|
||||
#include "app/common/UI/Scenes/In-Game Menu Screens/UIScene_PauseMenu.h"
|
||||
#include "minecraft/Minecraft_Macros.h"
|
||||
#include "util/Timer.h"
|
||||
#include "util/StringHelpers.h"
|
||||
#include "minecraft/world/level/storage/ConsoleSaveFileIO/compression.h"
|
||||
#include "minecraft/client/User.h"
|
||||
#include "minecraft/client/gui/Gui.h"
|
||||
#include "minecraft/client/renderer/entity/EntityRenderDispatcher.h"
|
||||
#include "minecraft/client/resources/Colours/ColourTable.h"
|
||||
#include "minecraft/client/skins/DLCTexturePack.h"
|
||||
#include "minecraft/client/skins/TexturePackRepository.h"
|
||||
#include "minecraft/locale/StringTable.h"
|
||||
#include "minecraft/server/PlayerList.h"
|
||||
#include "minecraft/server/level/ServerPlayer.h"
|
||||
#include "minecraft/world/level/storage/ConsoleSaveFileIO/compression.h"
|
||||
#include "platform/input/input.h"
|
||||
#include "util/StringHelpers.h"
|
||||
#include "util/Timer.h"
|
||||
|
||||
class BeaconTileEntity;
|
||||
class BrewingStandTileEntity;
|
||||
|
|
@ -189,31 +189,14 @@ void Game::SetAppPaused(bool val) { m_bIsAppPaused = val; }
|
|||
|
||||
// Load*Menu methods moved to MenuController
|
||||
|
||||
|
||||
//////////////////////////////////////////////
|
||||
// GAME SETTINGS
|
||||
//////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Skin/Cape/FavoriteSkin methods moved to SkinManager
|
||||
|
||||
// Mash-up pack worlds
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
///////////////////////////
|
||||
//
|
||||
// Remove the debug settings in the content package build
|
||||
|
|
@ -221,16 +204,10 @@ void Game::SetAppPaused(bool val) { m_bIsAppPaused = val; }
|
|||
////////////////////////////
|
||||
#if !defined(_DEBUG_MENUS_ENABLED)
|
||||
|
||||
|
||||
|
||||
#else
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
int Game::BannedLevelDialogReturned(
|
||||
void* pParam, int iPad, const IPlatformStorage::EMessageResult result) {
|
||||
Game* pApp = (Game*)pParam;
|
||||
|
|
@ -284,11 +261,8 @@ int Game::GetLocalPlayerCount(void) {
|
|||
return iPlayerC;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Installed DLC callback
|
||||
|
||||
|
||||
// 4J-JEV: For the sake of clarity in DLCMountedCallback.
|
||||
#if defined(_WINDOWS64)
|
||||
#define CONTENT_DATA_DISPLAY_NAME(a) (a.szDisplayName)
|
||||
|
|
@ -326,7 +300,6 @@ int Game::GetLocalPlayerCount(void) {
|
|||
// }
|
||||
// }
|
||||
|
||||
|
||||
// int Game::DLCReadCallback(void*
|
||||
// pParam,IPlatformStorage::DLC_FILE_DETAILS *pDLCData)
|
||||
// {
|
||||
|
|
@ -365,8 +338,9 @@ void Game::UpdateTime() {
|
|||
}
|
||||
|
||||
bool Game::isXuidDeadmau5(PlayerUID xuid) {
|
||||
auto it = DLCController::MojangData.find(xuid); // 4J Stu - The .at and [] accessors
|
||||
// insert elements if they don't exist
|
||||
auto it = DLCController::MojangData.find(
|
||||
xuid); // 4J Stu - The .at and [] accessors
|
||||
// insert elements if they don't exist
|
||||
if (it != DLCController::MojangData.end()) {
|
||||
MOJANG_DATA* pMojangData = DLCController::MojangData[xuid];
|
||||
if (pMojangData && pMojangData->eXuid == eXUID_Deadmau5) {
|
||||
|
|
@ -383,12 +357,6 @@ void Game::ExitGame() {}
|
|||
|
||||
// Invites
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// FatalLoadError
|
||||
|
|
@ -400,26 +368,16 @@ void Game::ExitGame() {}
|
|||
//////////////////////////////////////////////////////////////////////////
|
||||
void Game::FatalLoadError() {}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Game Host options
|
||||
|
||||
void Game::SetGameHostOption(eGameHostOption eVal,
|
||||
unsigned int uiVal) {
|
||||
void Game::SetGameHostOption(eGameHostOption eVal, unsigned int uiVal) {
|
||||
GameHostOptions::set(m_uiGameHostSettings, eVal, uiVal);
|
||||
}
|
||||
|
||||
|
||||
unsigned int Game::GetGameHostOption(eGameHostOption eVal) {
|
||||
return GameHostOptions::get(m_uiGameHostSettings, eVal);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void Game::processSchematics(LevelChunk* levelChunk) {
|
||||
m_gameRules.processSchematics(levelChunk);
|
||||
}
|
||||
|
|
@ -428,12 +386,9 @@ void Game::processSchematicsLighting(LevelChunk* levelChunk) {
|
|||
m_gameRules.processSchematicsLighting(levelChunk);
|
||||
}
|
||||
|
||||
void Game::loadDefaultGameRules() {
|
||||
m_gameRules.loadDefaultGameRules();
|
||||
}
|
||||
void Game::loadDefaultGameRules() { m_gameRules.loadDefaultGameRules(); }
|
||||
|
||||
void Game::setLevelGenerationOptions(
|
||||
LevelGenerationOptions* levelGen) {
|
||||
void Game::setLevelGenerationOptions(LevelGenerationOptions* levelGen) {
|
||||
m_gameRules.setLevelGenerationOptions(levelGen);
|
||||
}
|
||||
|
||||
|
|
@ -441,16 +396,8 @@ const char* Game::GetGameRulesString(const std::string& key) {
|
|||
return m_gameRules.GetGameRulesString(key);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// PNG_TAG_tEXt, FromBigEndian, GetImageTextData, CreateImageTextData moved to MenuController
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// PNG_TAG_tEXt, FromBigEndian, GetImageTextData, CreateImageTextData moved to
|
||||
// MenuController
|
||||
|
||||
std::string Game::getEntityName(eINSTANCEOF type) {
|
||||
switch (type) {
|
||||
|
|
@ -506,12 +453,8 @@ std::string Game::getEntityName(eINSTANCEOF type) {
|
|||
|
||||
// m_dwContentTypeA moved to DLCController
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int32_t Game::RegisterMojangData(char* pXuidName, PlayerUID xuid,
|
||||
char* pSkin, char* pCape) {
|
||||
int32_t Game::RegisterMojangData(char* pXuidName, PlayerUID xuid, char* pSkin,
|
||||
char* pCape) {
|
||||
int32_t hr = 0;
|
||||
eXUID eTempXuid = eXUID_Undefined;
|
||||
MOJANG_DATA* pMojangData = nullptr;
|
||||
|
|
@ -579,33 +522,12 @@ int32_t Game::RegisterConfigValues(char* pType, int iValue) {
|
|||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// DLC
|
||||
|
||||
|
||||
|
||||
|
||||
// AUTOSAVE
|
||||
void Game::SetAutosaveTimerTime(void) {
|
||||
int settingValue = GetGameSettings(PlatformProfile.GetPrimaryPad(), eGameSetting_Autosave);
|
||||
int settingValue =
|
||||
GetGameSettings(PlatformProfile.GetPrimaryPad(), eGameSetting_Autosave);
|
||||
m_saveManager.setAutosaveTimerTime(settingValue);
|
||||
}
|
||||
|
||||
|
|
@ -641,7 +563,8 @@ bool Game::IsLocalMultiplayerAvailable() {
|
|||
// #else
|
||||
// for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i)
|
||||
// {
|
||||
// if( (i!=userIndex) && (PlatformInput.IsPadConnected(i) ||
|
||||
// if( (i!=userIndex) && (PlatformInput.IsPadConnected(i)
|
||||
//||
|
||||
// PlatformProfile.IsSignedIn(i)) )
|
||||
// {
|
||||
// iOtherConnectedControllers++;
|
||||
|
|
@ -654,10 +577,8 @@ bool Game::IsLocalMultiplayerAvailable() {
|
|||
|
||||
// (moved to manager class)
|
||||
|
||||
std::string Game::getFilePath(std::uint32_t packId,
|
||||
std::string filename,
|
||||
bool bAddDataFolder,
|
||||
std::string mountPoint) {
|
||||
std::string Game::getFilePath(std::uint32_t packId, std::string filename,
|
||||
bool bAddDataFolder, std::string mountPoint) {
|
||||
std::string path =
|
||||
getRootPath(packId, true, bAddDataFolder, mountPoint) + filename;
|
||||
File f(path);
|
||||
|
|
@ -689,9 +610,8 @@ std::string titleUpdateTexturePackRoot = "Windows64\\DLC\\";
|
|||
std::string titleUpdateTexturePackRoot = "CU\\DLC\\";
|
||||
#endif
|
||||
|
||||
std::string Game::getRootPath(std::uint32_t packId,
|
||||
bool allowOverride, bool bAddDataFolder,
|
||||
std::string mountPoint) {
|
||||
std::string Game::getRootPath(std::uint32_t packId, bool allowOverride,
|
||||
bool bAddDataFolder, std::string mountPoint) {
|
||||
std::string path = mountPoint;
|
||||
if (allowOverride) {
|
||||
switch (packId) {
|
||||
|
|
|
|||
|
|
@ -3,38 +3,38 @@
|
|||
#include <cstdint>
|
||||
#include <mutex>
|
||||
|
||||
#include "util/Timer.h"
|
||||
#include "platform/profile/profile.h"
|
||||
#include "platform/storage/storage.h"
|
||||
#include "util/Timer.h"
|
||||
|
||||
// using namespace std;
|
||||
|
||||
#include "app/common/App_structs.h"
|
||||
#include "app/common/ArchiveManager.h"
|
||||
#include "app/common/Audio/Consoles_SoundEngine.h"
|
||||
#include "app/common/BannedListManager.h"
|
||||
#include "app/common/DebugOptions.h"
|
||||
#include "app/common/DLC/DLCManager.h"
|
||||
#include "app/common/DLCController.h"
|
||||
#include "app/common/DebugOptions.h"
|
||||
#include "app/common/GameRules/GameRuleManager.h"
|
||||
#include "app/common/GameSettingsManager.h"
|
||||
#include "app/common/IPlatformGame.h"
|
||||
#include "app/common/App_structs.h"
|
||||
#include "app/common/LocalizationManager.h"
|
||||
#include "app/common/MenuController.h"
|
||||
#include "app/common/NetworkController.h"
|
||||
#include "app/common/SaveManager.h"
|
||||
#include "app/common/SkinManager.h"
|
||||
#include "app/common/TerrainFeatureManager.h"
|
||||
#include "app/common/Audio/Consoles_SoundEngine.h"
|
||||
#include "app/common/DLC/DLCManager.h"
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "app/common/GameRules/GameRuleManager.h"
|
||||
#include "minecraft/locale/StringTable.h"
|
||||
#include "app/common/Tutorial/TutorialEnum.h"
|
||||
#include "app/common/UI/All Platforms/ArchiveFile.h"
|
||||
#include "app/common/UI/All Platforms/UIStructs.h"
|
||||
#include "platform/NetTypes.h"
|
||||
#include "minecraft/client/model/SkinBox.h"
|
||||
#include "platform/XboxStubs.h"
|
||||
#include "minecraft/locale/StringTable.h"
|
||||
#include "minecraft/network/packet/DisconnectPacket.h"
|
||||
#include "minecraft/world/entity/item/MinecartHopper.h"
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "platform/NetTypes.h"
|
||||
#include "platform/XboxStubs.h"
|
||||
|
||||
// JoinFromInviteData moved to NetworkController.h
|
||||
|
||||
|
|
@ -145,7 +145,8 @@ public:
|
|||
|
||||
bool IsAppPaused();
|
||||
void SetAppPaused(bool val);
|
||||
int displaySavingMessage(const IPlatformStorage::ESavingMessage eMsg, int iPad) {
|
||||
int displaySavingMessage(const IPlatformStorage::ESavingMessage eMsg,
|
||||
int iPad) {
|
||||
return m_gameSettingsManager.displaySavingMessage(eMsg, iPad);
|
||||
}
|
||||
bool GetGameStarted() { return m_bGameStarted; }
|
||||
|
|
@ -169,7 +170,8 @@ public:
|
|||
bool LoadEnchantingMenu(int iPad, std::shared_ptr<Inventory> inventory,
|
||||
int x, int y, int z, Level* level,
|
||||
const std::string& name) {
|
||||
return m_menuController.loadEnchantingMenu(iPad, inventory, x, y, z, level, name);
|
||||
return m_menuController.loadEnchantingMenu(iPad, inventory, x, y, z,
|
||||
level, name);
|
||||
}
|
||||
bool LoadFurnaceMenu(int iPad, std::shared_ptr<Inventory> inventory,
|
||||
std::shared_ptr<FurnaceTileEntity> furnace) {
|
||||
|
|
@ -178,7 +180,8 @@ public:
|
|||
bool LoadBrewingStandMenu(
|
||||
int iPad, std::shared_ptr<Inventory> inventory,
|
||||
std::shared_ptr<BrewingStandTileEntity> brewingStand) {
|
||||
return m_menuController.loadBrewingStandMenu(iPad, inventory, brewingStand);
|
||||
return m_menuController.loadBrewingStandMenu(iPad, inventory,
|
||||
brewingStand);
|
||||
}
|
||||
bool LoadContainerMenu(int iPad, std::shared_ptr<Container> inventory,
|
||||
std::shared_ptr<Container> container) {
|
||||
|
|
@ -204,12 +207,14 @@ public:
|
|||
}
|
||||
bool LoadRepairingMenu(int iPad, std::shared_ptr<Inventory> inventory,
|
||||
Level* level, int x, int y, int z) {
|
||||
return m_menuController.loadRepairingMenu(iPad, inventory, level, x, y, z);
|
||||
return m_menuController.loadRepairingMenu(iPad, inventory, level, x, y,
|
||||
z);
|
||||
}
|
||||
bool LoadTradingMenu(int iPad, std::shared_ptr<Inventory> inventory,
|
||||
std::shared_ptr<Merchant> trader, Level* level,
|
||||
const std::string& name) {
|
||||
return m_menuController.loadTradingMenu(iPad, inventory, trader, level, name);
|
||||
return m_menuController.loadTradingMenu(iPad, inventory, trader, level,
|
||||
name);
|
||||
}
|
||||
|
||||
bool LoadCommandBlockMenu(
|
||||
|
|
@ -227,7 +232,8 @@ public:
|
|||
bool LoadHorseMenu(int iPad, std::shared_ptr<Inventory> inventory,
|
||||
std::shared_ptr<Container> container,
|
||||
std::shared_ptr<EntityHorse> horse) {
|
||||
return m_menuController.loadHorseMenu(iPad, inventory, container, horse);
|
||||
return m_menuController.loadHorseMenu(iPad, inventory, container,
|
||||
horse);
|
||||
}
|
||||
bool LoadBeaconMenu(int iPad, std::shared_ptr<Inventory> inventory,
|
||||
std::shared_ptr<BeaconTileEntity> beacon) {
|
||||
|
|
@ -242,21 +248,31 @@ public:
|
|||
}
|
||||
|
||||
static const char* GetString(int iID);
|
||||
StringTable* getStringTable() const { return m_localizationManager.getStringTable(); }
|
||||
StringTable* getStringTable() const {
|
||||
return m_localizationManager.getStringTable();
|
||||
}
|
||||
|
||||
eGameMode GetGameMode() { return m_eGameMode; }
|
||||
void SetGameMode(eGameMode eMode) { m_eGameMode = eMode; }
|
||||
|
||||
eXuiAction GetGlobalXuiAction() { return m_menuController.getGlobalXuiAction(); }
|
||||
void SetGlobalXuiAction(eXuiAction action) { m_menuController.setGlobalXuiAction(action); }
|
||||
eXuiAction GetXuiAction(int iPad) { return m_menuController.getXuiAction(iPad); }
|
||||
eXuiAction GetGlobalXuiAction() {
|
||||
return m_menuController.getGlobalXuiAction();
|
||||
}
|
||||
void SetGlobalXuiAction(eXuiAction action) {
|
||||
m_menuController.setGlobalXuiAction(action);
|
||||
}
|
||||
eXuiAction GetXuiAction(int iPad) {
|
||||
return m_menuController.getXuiAction(iPad);
|
||||
}
|
||||
void SetAction(int iPad, eXuiAction action, void* param = nullptr) {
|
||||
m_menuController.setAction(iPad, action, param);
|
||||
}
|
||||
void SetTMSAction(int iPad, eTMSAction action) {
|
||||
m_menuController.setTMSAction(iPad, action);
|
||||
}
|
||||
eTMSAction GetTMSAction(int iPad) { return m_menuController.getTMSAction(iPad); }
|
||||
eTMSAction GetTMSAction(int iPad) {
|
||||
return m_menuController.getTMSAction(iPad);
|
||||
}
|
||||
eXuiServerAction GetXuiServerAction(int iPad) {
|
||||
return m_menuController.getXuiServerAction(iPad);
|
||||
}
|
||||
|
|
@ -281,10 +297,16 @@ public:
|
|||
m_networkController.setDisconnectReason(bVal);
|
||||
}
|
||||
|
||||
bool GetChangingSessionType() { return m_networkController.getChangingSessionType(); }
|
||||
void SetChangingSessionType(bool bVal) { m_networkController.setChangingSessionType(bVal); }
|
||||
bool GetChangingSessionType() {
|
||||
return m_networkController.getChangingSessionType();
|
||||
}
|
||||
void SetChangingSessionType(bool bVal) {
|
||||
m_networkController.setChangingSessionType(bVal);
|
||||
}
|
||||
|
||||
bool GetReallyChangingSessionType() { return m_networkController.getReallyChangingSessionType(); }
|
||||
bool GetReallyChangingSessionType() {
|
||||
return m_networkController.getReallyChangingSessionType();
|
||||
}
|
||||
void SetReallyChangingSessionType(bool bVal) {
|
||||
m_networkController.setReallyChangingSessionType(bVal);
|
||||
}
|
||||
|
|
@ -340,13 +362,15 @@ public:
|
|||
static int OldProfileVersionCallback(void* pParam, unsigned char* pucData,
|
||||
const unsigned short usVersion,
|
||||
const int iPad) {
|
||||
return GameSettingsManager::oldProfileVersionCallback(pParam, pucData, usVersion, iPad);
|
||||
return GameSettingsManager::oldProfileVersionCallback(pParam, pucData,
|
||||
usVersion, iPad);
|
||||
}
|
||||
|
||||
static int DefaultOptionsCallback(void* pParam,
|
||||
IPlatformProfile::PROFILESETTINGS* pSettings,
|
||||
const int iPad) {
|
||||
return GameSettingsManager::defaultOptionsCallback(pParam, pSettings, iPad);
|
||||
static int DefaultOptionsCallback(
|
||||
void* pParam, IPlatformProfile::PROFILESETTINGS* pSettings,
|
||||
const int iPad) {
|
||||
return GameSettingsManager::defaultOptionsCallback(pParam, pSettings,
|
||||
iPad);
|
||||
}
|
||||
int SetDefaultOptions(IPlatformProfile::PROFILESETTINGS* pSettings,
|
||||
const int iPad) {
|
||||
|
|
@ -376,7 +400,8 @@ public:
|
|||
m_skinManager.setPlayerCape(iPad, dwCapeId, GameSettingsA);
|
||||
}
|
||||
void SetPlayerFavoriteSkin(int iPad, int iIndex, unsigned int uiSkinID) {
|
||||
m_skinManager.setPlayerFavoriteSkin(iPad, iIndex, uiSkinID, GameSettingsA);
|
||||
m_skinManager.setPlayerFavoriteSkin(iPad, iIndex, uiSkinID,
|
||||
GameSettingsA);
|
||||
}
|
||||
unsigned int GetPlayerFavoriteSkin(int iPad, int iIndex) {
|
||||
return m_skinManager.getPlayerFavoriteSkin(iPad, iIndex, GameSettingsA);
|
||||
|
|
@ -427,9 +452,7 @@ public:
|
|||
void SetOpacityTimer(int iPad) {
|
||||
m_menuController.setOpacityTimer(iPad);
|
||||
} // 6 seconds
|
||||
void TickOpacityTimer(int iPad) {
|
||||
m_menuController.tickOpacityTimer(iPad);
|
||||
}
|
||||
void TickOpacityTimer(int iPad) { m_menuController.tickOpacityTimer(iPad); }
|
||||
|
||||
public:
|
||||
std::string GetPlayerSkinName(int iPad) {
|
||||
|
|
@ -449,7 +472,8 @@ public:
|
|||
}
|
||||
void CheckGameSettingsChanged(bool bOverride5MinuteTimer = false,
|
||||
int iPad = XUSER_INDEX_ANY) {
|
||||
m_gameSettingsManager.checkGameSettingsChanged(bOverride5MinuteTimer, iPad);
|
||||
m_gameSettingsManager.checkGameSettingsChanged(bOverride5MinuteTimer,
|
||||
iPad);
|
||||
}
|
||||
void ApplyGameSettingsChanged(int iPad) {
|
||||
m_gameSettingsManager.applyGameSettingsChanged(iPad);
|
||||
|
|
@ -462,7 +486,8 @@ public:
|
|||
}
|
||||
unsigned int GetGameSettingsDebugMask(int iPad = -1,
|
||||
bool bOverridePlayer = false) {
|
||||
return m_gameSettingsManager.getGameSettingsDebugMask(iPad, bOverridePlayer);
|
||||
return m_gameSettingsManager.getGameSettingsDebugMask(iPad,
|
||||
bOverridePlayer);
|
||||
}
|
||||
void SetGameSettingsDebugMask(int iPad, unsigned int uiVal) {
|
||||
m_gameSettingsManager.setGameSettingsDebugMask(iPad, uiVal);
|
||||
|
|
@ -485,13 +510,15 @@ public:
|
|||
static int SignoutExitWorldThreadProc(void* lpParameter) {
|
||||
return NetworkController::signoutExitWorldThreadProc(lpParameter);
|
||||
}
|
||||
static int PrimaryPlayerSignedOutReturned(void* pParam, int iPad,
|
||||
const IPlatformStorage::EMessageResult result) {
|
||||
return NetworkController::primaryPlayerSignedOutReturned(pParam, iPad, result);
|
||||
static int PrimaryPlayerSignedOutReturned(
|
||||
void* pParam, int iPad, const IPlatformStorage::EMessageResult result) {
|
||||
return NetworkController::primaryPlayerSignedOutReturned(pParam, iPad,
|
||||
result);
|
||||
}
|
||||
static int EthernetDisconnectReturned(void* pParam, int iPad,
|
||||
const IPlatformStorage::EMessageResult result) {
|
||||
return NetworkController::ethernetDisconnectReturned(pParam, iPad, result);
|
||||
static int EthernetDisconnectReturned(
|
||||
void* pParam, int iPad, const IPlatformStorage::EMessageResult result) {
|
||||
return NetworkController::ethernetDisconnectReturned(pParam, iPad,
|
||||
result);
|
||||
}
|
||||
static void ProfileReadErrorCallback(void* pParam) {
|
||||
NetworkController::profileReadErrorCallback(pParam);
|
||||
|
|
@ -504,15 +531,20 @@ public:
|
|||
static void NotificationsCallback(void* pParam,
|
||||
std::uint32_t dwNotification,
|
||||
unsigned int uiParam) {
|
||||
NetworkController::notificationsCallback(pParam, dwNotification, uiParam);
|
||||
NetworkController::notificationsCallback(pParam, dwNotification,
|
||||
uiParam);
|
||||
}
|
||||
|
||||
// for the ethernet being disconnected
|
||||
static void LiveLinkChangeCallback(void* pParam, bool bConnected) {
|
||||
NetworkController::liveLinkChangeCallback(pParam, bConnected);
|
||||
}
|
||||
bool GetLiveLinkRequired() { return m_networkController.getLiveLinkRequired(); }
|
||||
void SetLiveLinkRequired(bool required) { m_networkController.setLiveLinkRequired(required); }
|
||||
bool GetLiveLinkRequired() {
|
||||
return m_networkController.getLiveLinkRequired();
|
||||
}
|
||||
void SetLiveLinkRequired(bool required) {
|
||||
m_networkController.setLiveLinkRequired(required);
|
||||
}
|
||||
|
||||
#if defined(_DEBUG_MENUS_ENABLED)
|
||||
bool DebugSettingsOn() { return m_debugOptions.settingsOn(); }
|
||||
|
|
@ -523,11 +555,15 @@ public:
|
|||
#endif
|
||||
void SetDebugSequence(const char* pchSeq);
|
||||
// bool UploadFileToGlobalStorage(int iQuadrant,
|
||||
// IPlatformStorage::eGlobalStorage eStorageFacility, std::string *wsFile );
|
||||
// IPlatformStorage::eGlobalStorage eStorageFacility, std::string *wsFile );
|
||||
|
||||
// Installed DLC - delegated to DLCController
|
||||
bool StartInstallDLCProcess(int iPad) { return m_dlcController.startInstallDLCProcess(iPad); }
|
||||
int dlcInstalledCallback(int iOfferC, int iPad) { return m_dlcController.dlcInstalledCallback(iOfferC, iPad); }
|
||||
bool StartInstallDLCProcess(int iPad) {
|
||||
return m_dlcController.startInstallDLCProcess(iPad);
|
||||
}
|
||||
int dlcInstalledCallback(int iOfferC, int iPad) {
|
||||
return m_dlcController.dlcInstalledCallback(iOfferC, iPad);
|
||||
}
|
||||
void HandleDLCLicenseChange();
|
||||
int dlcMountedCallback(int iPad, std::uint32_t dwErr,
|
||||
std::uint32_t dwLicenceMask) {
|
||||
|
|
@ -536,11 +572,12 @@ public:
|
|||
void MountNextDLC(int iPad) { m_dlcController.mountNextDLC(iPad); }
|
||||
void HandleDLC(DLCPack* pack) { m_dlcController.handleDLC(pack); }
|
||||
bool DLCInstallPending() { return m_dlcController.dlcInstallPending(); }
|
||||
bool DLCInstallProcessCompleted() { return m_dlcController.dlcInstallProcessCompleted(); }
|
||||
bool DLCInstallProcessCompleted() {
|
||||
return m_dlcController.dlcInstallProcessCompleted();
|
||||
}
|
||||
void ClearDLCInstalled() { m_dlcController.clearDLCInstalled(); }
|
||||
static int MarketplaceCountsCallback(void* pParam,
|
||||
IPlatformStorage::DLC_TMS_DETAILS* details,
|
||||
int iPad) {
|
||||
static int MarketplaceCountsCallback(
|
||||
void* pParam, IPlatformStorage::DLC_TMS_DETAILS* details, int iPad) {
|
||||
return DLCController::marketplaceCountsCallback(pParam, details, iPad);
|
||||
}
|
||||
|
||||
|
|
@ -558,9 +595,7 @@ public:
|
|||
virtual void StoreLaunchData();
|
||||
virtual void ExitGame();
|
||||
|
||||
bool isXuidNotch(PlayerUID xuid) {
|
||||
return m_skinManager.isXuidNotch(xuid);
|
||||
}
|
||||
bool isXuidNotch(PlayerUID xuid) { return m_skinManager.isXuidNotch(xuid); }
|
||||
bool isXuidDeadmau5(PlayerUID xuid);
|
||||
|
||||
void AddMemoryTextureFile(const std::string& wName, std::uint8_t* pbData,
|
||||
|
|
@ -597,9 +632,7 @@ public:
|
|||
return m_archiveManager.getTPConfigVal(pwchDataFile);
|
||||
}
|
||||
|
||||
bool DefaultCapeExists() {
|
||||
return m_skinManager.defaultCapeExists();
|
||||
}
|
||||
bool DefaultCapeExists() { return m_skinManager.defaultCapeExists(); }
|
||||
// void InstallDefaultCape(); // attempt to install the default cape once
|
||||
// per game launch
|
||||
|
||||
|
|
@ -607,11 +640,14 @@ public:
|
|||
void ProcessInvite(std::uint32_t dwUserIndex,
|
||||
std::uint32_t dwLocalUsersMask,
|
||||
const INVITE_INFO* pInviteInfo) {
|
||||
m_networkController.processInvite(dwUserIndex, dwLocalUsersMask, pInviteInfo);
|
||||
m_networkController.processInvite(dwUserIndex, dwLocalUsersMask,
|
||||
pInviteInfo);
|
||||
}
|
||||
|
||||
// Add credits for DLC installed - delegated to DLCController
|
||||
void AddCreditText(const char* lpStr) { m_dlcController.addCreditText(lpStr); }
|
||||
void AddCreditText(const char* lpStr) {
|
||||
m_dlcController.addCreditText(lpStr);
|
||||
}
|
||||
|
||||
private:
|
||||
std::unordered_map<PlayerUID, std::uint8_t*> m_GTS_Files;
|
||||
|
|
@ -654,14 +690,16 @@ public:
|
|||
bool m_bTutorialMode;
|
||||
bool m_bIsAppPaused;
|
||||
|
||||
// m_bChangingSessionType and m_bReallyChangingSessionType moved to NetworkController
|
||||
// m_bChangingSessionType and m_bReallyChangingSessionType moved to
|
||||
// NetworkController
|
||||
|
||||
// trial, and trying to unlock full
|
||||
// version on an upsell
|
||||
|
||||
void loadMediaArchive() { m_archiveManager.loadMediaArchive(); }
|
||||
void loadStringTable() {
|
||||
m_localizationManager.loadStringTable(m_archiveManager.getMediaArchive());
|
||||
m_localizationManager.loadStringTable(
|
||||
m_archiveManager.getMediaArchive());
|
||||
}
|
||||
|
||||
public:
|
||||
|
|
@ -676,10 +714,10 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
static int BannedLevelDialogReturned(void* pParam, int iPad,
|
||||
const IPlatformStorage::EMessageResult);
|
||||
static int TexturePackDialogReturned(void* pParam, int iPad,
|
||||
IPlatformStorage::EMessageResult result) {
|
||||
static int BannedLevelDialogReturned(
|
||||
void* pParam, int iPad, const IPlatformStorage::EMessageResult);
|
||||
static int TexturePackDialogReturned(
|
||||
void* pParam, int iPad, IPlatformStorage::EMessageResult result) {
|
||||
return MenuController::texturePackDialogReturned(pParam, iPad, result);
|
||||
}
|
||||
|
||||
|
|
@ -703,7 +741,8 @@ private:
|
|||
eGameMode m_eGameMode; // single or multiplayer
|
||||
|
||||
// GameSettingsA reference alias into GameSettingsManager
|
||||
GAME_SETTINGS* (&GameSettingsA)[XUSER_MAX_COUNT] = m_gameSettingsManager.GameSettingsA;
|
||||
GAME_SETTINGS* (&GameSettingsA)[XUSER_MAX_COUNT] =
|
||||
m_gameSettingsManager.GameSettingsA;
|
||||
|
||||
// m_uiLastSignInData moved to NetworkController
|
||||
|
||||
|
|
@ -728,7 +767,6 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
|
||||
static int UnlockFullExitReturned(void* pParam, int iPad,
|
||||
IPlatformStorage::EMessageResult result) {
|
||||
return MenuController::unlockFullExitReturned(pParam, iPad, result);
|
||||
|
|
@ -737,8 +775,8 @@ private:
|
|||
IPlatformStorage::EMessageResult result) {
|
||||
return MenuController::unlockFullSaveReturned(pParam, iPad, result);
|
||||
}
|
||||
static int UnlockFullInviteReturned(void* pParam, int iPad,
|
||||
IPlatformStorage::EMessageResult result) {
|
||||
static int UnlockFullInviteReturned(
|
||||
void* pParam, int iPad, IPlatformStorage::EMessageResult result) {
|
||||
return MenuController::unlockFullInviteReturned(pParam, iPad, result);
|
||||
}
|
||||
static int TrialOverReturned(void* pParam, int iPad,
|
||||
|
|
@ -751,21 +789,25 @@ private:
|
|||
}
|
||||
static int ExitAndJoinFromInviteSaveDialogReturned(
|
||||
void* pParam, int iPad, IPlatformStorage::EMessageResult result) {
|
||||
return NetworkController::exitAndJoinFromInviteSaveDialogReturned(pParam, iPad, result);
|
||||
return NetworkController::exitAndJoinFromInviteSaveDialogReturned(
|
||||
pParam, iPad, result);
|
||||
}
|
||||
static int ExitAndJoinFromInviteAndSaveReturned(
|
||||
void* pParam, int iPad, IPlatformStorage::EMessageResult result) {
|
||||
return NetworkController::exitAndJoinFromInviteAndSaveReturned(pParam, iPad, result);
|
||||
return NetworkController::exitAndJoinFromInviteAndSaveReturned(
|
||||
pParam, iPad, result);
|
||||
}
|
||||
static int ExitAndJoinFromInviteDeclineSaveReturned(
|
||||
void* pParam, int iPad, IPlatformStorage::EMessageResult result) {
|
||||
return NetworkController::exitAndJoinFromInviteDeclineSaveReturned(pParam, iPad, result);
|
||||
return NetworkController::exitAndJoinFromInviteDeclineSaveReturned(
|
||||
pParam, iPad, result);
|
||||
}
|
||||
static int FatalErrorDialogReturned(void* pParam, int iPad,
|
||||
IPlatformStorage::EMessageResult result);
|
||||
static int FatalErrorDialogReturned(
|
||||
void* pParam, int iPad, IPlatformStorage::EMessageResult result);
|
||||
static int WarningTrialTexturePackReturned(
|
||||
void* pParam, int iPad, IPlatformStorage::EMessageResult result) {
|
||||
return NetworkController::warningTrialTexturePackReturned(pParam, iPad, result);
|
||||
return NetworkController::warningTrialTexturePackReturned(pParam, iPad,
|
||||
result);
|
||||
}
|
||||
|
||||
JoinFromInviteData& m_InviteData = m_networkController.m_InviteData;
|
||||
|
|
@ -794,7 +836,7 @@ public:
|
|||
return m_localizationManager.getHTMLFontSize(size);
|
||||
}
|
||||
std::string FormatHTMLString(int iPad, const std::string& desc,
|
||||
int shadowColour = 0xFFFFFFFF) {
|
||||
int shadowColour = 0xFFFFFFFF) {
|
||||
return m_localizationManager.formatHTMLString(iPad, desc, shadowColour);
|
||||
}
|
||||
std::string GetActionReplacement(int iPad, unsigned char ucAction) {
|
||||
|
|
@ -818,7 +860,8 @@ public:
|
|||
}
|
||||
static int ExitGameFromRemoteSaveDialogReturned(
|
||||
void* pParam, int iPad, IPlatformStorage::EMessageResult result) {
|
||||
return MenuController::exitGameFromRemoteSaveDialogReturned(pParam, iPad, result);
|
||||
return MenuController::exitGameFromRemoteSaveDialogReturned(
|
||||
pParam, iPad, result);
|
||||
}
|
||||
|
||||
// XML
|
||||
|
|
@ -840,10 +883,11 @@ public:
|
|||
MOJANG_DATA* GetMojangDataForXuid(PlayerUID xuid);
|
||||
static int32_t RegisterConfigValues(char* pType, int iValue);
|
||||
|
||||
static int32_t RegisterDLCData(char* a, char* b, int c, uint64_t d, uint64_t e,
|
||||
char* f, unsigned int g, int h,
|
||||
static int32_t RegisterDLCData(char* a, char* b, int c, uint64_t d,
|
||||
uint64_t e, char* f, unsigned int g, int h,
|
||||
char* pDataFile) {
|
||||
return DLCController::registerDLCData(a, b, c, d, e, f, g, h, pDataFile);
|
||||
return DLCController::registerDLCData(a, b, c, d, e, f, g, h,
|
||||
pDataFile);
|
||||
}
|
||||
bool GetDLCFullOfferIDForSkinID(const std::string& FirstSkin,
|
||||
uint64_t* pullVal) {
|
||||
|
|
@ -856,8 +900,12 @@ public:
|
|||
return m_dlcController.getDLCInfoForFullOfferID(ullOfferID_Full);
|
||||
}
|
||||
|
||||
unsigned int GetDLCCreditsCount() { return m_dlcController.getDLCCreditsCount(); }
|
||||
SCreditTextItemDef* GetDLCCredits(int iIndex) { return m_dlcController.getDLCCredits(iIndex); }
|
||||
unsigned int GetDLCCreditsCount() {
|
||||
return m_dlcController.getDLCCreditsCount();
|
||||
}
|
||||
SCreditTextItemDef* GetDLCCredits(int iIndex) {
|
||||
return m_dlcController.getDLCCredits(iIndex);
|
||||
}
|
||||
|
||||
// TMS
|
||||
void ReadDLCFileFromTMS(int iPad, eTMSAction action,
|
||||
|
|
@ -880,11 +928,11 @@ public:
|
|||
// Sign-in info moved to NetworkController
|
||||
|
||||
public:
|
||||
|
||||
// void OverrideFontRenderer(bool set, bool immediate = true);
|
||||
// void ToggleFontRenderer() {
|
||||
// OverrideFontRenderer(!m_bFontRendererOverridden,false); }
|
||||
BANNEDLIST (&BannedListA)[XUSER_MAX_COUNT] = m_bannedListManager.BannedListA;
|
||||
BANNEDLIST (&BannedListA)
|
||||
[XUSER_MAX_COUNT] = m_bannedListManager.BannedListA;
|
||||
|
||||
public:
|
||||
void SetBanListCheck(int iPad, bool bVal) {
|
||||
|
|
@ -902,7 +950,8 @@ public:
|
|||
// m_uiOpacityCountDown moved to MenuController
|
||||
// DLC flags moved to DLCController
|
||||
// Host options - m_uiGameHostSettings moved to GameSettingsManager
|
||||
unsigned int& m_uiGameHostSettings = m_gameSettingsManager.m_uiGameHostSettings;
|
||||
unsigned int& m_uiGameHostSettings =
|
||||
m_gameSettingsManager.m_uiGameHostSettings;
|
||||
|
||||
#if defined(_LARGE_WORLDS)
|
||||
unsigned int m_GameNewWorldSize;
|
||||
|
|
@ -945,13 +994,17 @@ public:
|
|||
// World seed from png image - delegated to MenuController
|
||||
void GetImageTextData(std::uint8_t* imageData, unsigned int imageBytes,
|
||||
unsigned char* seedText, unsigned int& uiHostOptions,
|
||||
bool& bHostOptionsRead, std::uint32_t& uiTexturePack) {
|
||||
m_menuController.getImageTextData(imageData, imageBytes, seedText, uiHostOptions, bHostOptionsRead, uiTexturePack);
|
||||
bool& bHostOptionsRead,
|
||||
std::uint32_t& uiTexturePack) {
|
||||
m_menuController.getImageTextData(imageData, imageBytes, seedText,
|
||||
uiHostOptions, bHostOptionsRead,
|
||||
uiTexturePack);
|
||||
}
|
||||
unsigned int CreateImageTextData(std::uint8_t* textMetadata, int64_t seed,
|
||||
bool hasSeed, unsigned int uiHostOptions,
|
||||
unsigned int uiTexturePackId) {
|
||||
return m_menuController.createImageTextData(textMetadata, seed, hasSeed, uiHostOptions, uiTexturePackId);
|
||||
return m_menuController.createImageTextData(
|
||||
textMetadata, seed, hasSeed, uiHostOptions, uiTexturePackId);
|
||||
}
|
||||
|
||||
// Game rules
|
||||
|
|
@ -979,7 +1032,8 @@ public:
|
|||
void UpdatePlayerInfo(std::uint8_t networkSmallId,
|
||||
int16_t playerColourIndex,
|
||||
unsigned int playerGamePrivileges) {
|
||||
m_networkController.updatePlayerInfo(networkSmallId, playerColourIndex, playerGamePrivileges);
|
||||
m_networkController.updatePlayerInfo(networkSmallId, playerColourIndex,
|
||||
playerGamePrivileges);
|
||||
}
|
||||
short GetPlayerColour(std::uint8_t networkSmallId) {
|
||||
return m_networkController.getPlayerColour(networkSmallId);
|
||||
|
|
@ -994,7 +1048,9 @@ public:
|
|||
bool bPromote = false) {
|
||||
return m_dlcController.addDLCRequest(eContentType, bPromote);
|
||||
}
|
||||
bool RetrieveNextDLCContent() { return m_dlcController.retrieveNextDLCContent(); }
|
||||
bool RetrieveNextDLCContent() {
|
||||
return m_dlcController.retrieveNextDLCContent();
|
||||
}
|
||||
bool CheckTMSDLCCanStop() { return m_dlcController.checkTMSDLCCanStop(); }
|
||||
int dlcOffersReturned(int iOfferC, std::uint32_t dwType, int iPad) {
|
||||
return m_dlcController.dlcOffersReturned(iOfferC, dwType, iPad);
|
||||
|
|
@ -1010,26 +1066,45 @@ public:
|
|||
return m_dlcController.dlcContentRetrieved(eType);
|
||||
}
|
||||
void TickDLCOffersRetrieved() { m_dlcController.tickDLCOffersRetrieved(); }
|
||||
void ClearAndResetDLCDownloadQueue() { m_dlcController.clearAndResetDLCDownloadQueue(); }
|
||||
bool RetrieveNextTMSPPContent() { return m_dlcController.retrieveNextTMSPPContent(); }
|
||||
void TickTMSPPFilesRetrieved() { m_dlcController.tickTMSPPFilesRetrieved(); }
|
||||
void ClearTMSPPFilesRetrieved() { m_dlcController.clearTMSPPFilesRetrieved(); }
|
||||
void ClearAndResetDLCDownloadQueue() {
|
||||
m_dlcController.clearAndResetDLCDownloadQueue();
|
||||
}
|
||||
bool RetrieveNextTMSPPContent() {
|
||||
return m_dlcController.retrieveNextTMSPPContent();
|
||||
}
|
||||
void TickTMSPPFilesRetrieved() {
|
||||
m_dlcController.tickTMSPPFilesRetrieved();
|
||||
}
|
||||
void ClearTMSPPFilesRetrieved() {
|
||||
m_dlcController.clearTMSPPFilesRetrieved();
|
||||
}
|
||||
unsigned int AddTMSPPFileTypeRequest(eDLCContentType eType,
|
||||
bool bPromote = false) {
|
||||
return m_dlcController.addTMSPPFileTypeRequest(eType, bPromote);
|
||||
}
|
||||
int GetDLCInfoTexturesOffersCount() { return m_dlcController.getDLCInfoTexturesOffersCount(); }
|
||||
int GetDLCInfoTexturesOffersCount() {
|
||||
return m_dlcController.getDLCInfoTexturesOffersCount();
|
||||
}
|
||||
|
||||
static int TMSPPFileReturned(void* pParam, int iPad, int iUserData,
|
||||
IPlatformStorage::PTMSPP_FILEDATA pFileData,
|
||||
const char* szFilename) {
|
||||
return DLCController::tmsPPFileReturned(pParam, iPad, iUserData, pFileData, szFilename);
|
||||
return DLCController::tmsPPFileReturned(pParam, iPad, iUserData,
|
||||
pFileData, szFilename);
|
||||
}
|
||||
DLC_INFO* GetDLCInfoTrialOffer(int iIndex) {
|
||||
return m_dlcController.getDLCInfoTrialOffer(iIndex);
|
||||
}
|
||||
DLC_INFO* GetDLCInfoFullOffer(int iIndex) {
|
||||
return m_dlcController.getDLCInfoFullOffer(iIndex);
|
||||
}
|
||||
DLC_INFO* GetDLCInfoTrialOffer(int iIndex) { return m_dlcController.getDLCInfoTrialOffer(iIndex); }
|
||||
DLC_INFO* GetDLCInfoFullOffer(int iIndex) { return m_dlcController.getDLCInfoFullOffer(iIndex); }
|
||||
|
||||
int GetDLCInfoTrialOffersCount() { return m_dlcController.getDLCInfoTrialOffersCount(); }
|
||||
int GetDLCInfoFullOffersCount() { return m_dlcController.getDLCInfoFullOffersCount(); }
|
||||
int GetDLCInfoTrialOffersCount() {
|
||||
return m_dlcController.getDLCInfoTrialOffersCount();
|
||||
}
|
||||
int GetDLCInfoFullOffersCount() {
|
||||
return m_dlcController.getDLCInfoFullOffersCount();
|
||||
}
|
||||
bool GetDLCFullOfferIDForPackID(const int iPackID, uint64_t* pullVal) {
|
||||
return m_dlcController.getDLCFullOfferIDForPackID(iPackID, pullVal);
|
||||
}
|
||||
|
|
@ -1046,8 +1121,10 @@ public:
|
|||
// Download status members moved to DLCController
|
||||
bool m_bCorruptSaveDeleted;
|
||||
|
||||
std::uint8_t*& m_pBannedListFileBuffer = m_bannedListManager.m_pBannedListFileBuffer;
|
||||
unsigned int& m_dwBannedListFileSize = m_bannedListManager.m_dwBannedListFileSize;
|
||||
std::uint8_t*& m_pBannedListFileBuffer =
|
||||
m_bannedListManager.m_pBannedListFileBuffer;
|
||||
unsigned int& m_dwBannedListFileSize =
|
||||
m_bannedListManager.m_dwBannedListFileSize;
|
||||
|
||||
public:
|
||||
unsigned int& m_dwDLCFileSize = m_dlcController.m_dwDLCFileSize;
|
||||
|
|
@ -1094,8 +1171,7 @@ public:
|
|||
int LoadLocalTMSFile(char* wchTMSFile,
|
||||
eFileExtensionType eExt) override = 0;
|
||||
void FreeLocalTMSFiles(eTMSFileType eType) override = 0;
|
||||
int GetLocalTMSFileIndex(char* wchTMSFile,
|
||||
bool bFilenameIncludesExtension,
|
||||
int GetLocalTMSFileIndex(char* wchTMSFile, bool bFilenameIncludesExtension,
|
||||
eFileExtensionType eEXT) override = 0;
|
||||
|
||||
virtual bool GetTMSGlobalFileListRead() { return true; }
|
||||
|
|
@ -1132,7 +1208,9 @@ private:
|
|||
|
||||
// 4J-PB - language and locale functions
|
||||
public:
|
||||
void LocaleAndLanguageInit() { m_localizationManager.localeAndLanguageInit(); }
|
||||
void LocaleAndLanguageInit() {
|
||||
m_localizationManager.localeAndLanguageInit();
|
||||
}
|
||||
void getLocale(std::vector<std::string>& vecWstrLocales) {
|
||||
m_localizationManager.getLocale(vecWstrLocales);
|
||||
}
|
||||
|
|
@ -1143,15 +1221,17 @@ public:
|
|||
return m_localizationManager.get_xcLang(pwchLocale);
|
||||
}
|
||||
|
||||
void SetTickTMSDLCFiles(bool bVal) { m_dlcController.setTickTMSDLCFiles(bVal); }
|
||||
void SetTickTMSDLCFiles(bool bVal) {
|
||||
m_dlcController.setTickTMSDLCFiles(bVal);
|
||||
}
|
||||
|
||||
std::string getFilePath(std::uint32_t packId, std::string filename,
|
||||
bool bAddDataFolder,
|
||||
std::string mountPoint = "TPACK:");
|
||||
bool bAddDataFolder,
|
||||
std::string mountPoint = "TPACK:");
|
||||
|
||||
private:
|
||||
std::string getRootPath(std::uint32_t packId, bool allowOverride,
|
||||
bool bAddDataFolder, std::string mountPoint);
|
||||
bool bAddDataFolder, std::string mountPoint);
|
||||
|
||||
public:
|
||||
#if defined(_WINDOWS64)
|
||||
|
|
@ -1161,6 +1241,5 @@ public:
|
|||
#endif
|
||||
};
|
||||
|
||||
|
||||
// singleton
|
||||
// extern CMinecraftApp app;
|
||||
|
|
@ -2,57 +2,88 @@
|
|||
|
||||
#include "app/common/Game.h"
|
||||
|
||||
bool GameMenuService::openInventory(int iPad, std::shared_ptr<LocalPlayer> player, bool navigateBack) {
|
||||
bool GameMenuService::openInventory(int iPad,
|
||||
std::shared_ptr<LocalPlayer> player,
|
||||
bool navigateBack) {
|
||||
return game_.LoadInventoryMenu(iPad, player, navigateBack);
|
||||
}
|
||||
bool GameMenuService::openCreative(int iPad, std::shared_ptr<LocalPlayer> player, bool navigateBack) {
|
||||
bool GameMenuService::openCreative(int iPad,
|
||||
std::shared_ptr<LocalPlayer> player,
|
||||
bool navigateBack) {
|
||||
return game_.LoadCreativeMenu(iPad, player, navigateBack);
|
||||
}
|
||||
bool GameMenuService::openCrafting2x2(int iPad, std::shared_ptr<LocalPlayer> player) {
|
||||
bool GameMenuService::openCrafting2x2(int iPad,
|
||||
std::shared_ptr<LocalPlayer> player) {
|
||||
return game_.LoadCrafting2x2Menu(iPad, player);
|
||||
}
|
||||
bool GameMenuService::openCrafting3x3(int iPad, std::shared_ptr<LocalPlayer> player, int x, int y, int z) {
|
||||
bool GameMenuService::openCrafting3x3(int iPad,
|
||||
std::shared_ptr<LocalPlayer> player,
|
||||
int x, int y, int z) {
|
||||
return game_.LoadCrafting3x3Menu(iPad, player, x, y, z);
|
||||
}
|
||||
bool GameMenuService::openEnchanting(int iPad, std::shared_ptr<Inventory> inventory, int x, int y, int z, Level* level, const std::string& name) {
|
||||
bool GameMenuService::openEnchanting(int iPad,
|
||||
std::shared_ptr<Inventory> inventory,
|
||||
int x, int y, int z, Level* level,
|
||||
const std::string& name) {
|
||||
return game_.LoadEnchantingMenu(iPad, inventory, x, y, z, level, name);
|
||||
}
|
||||
bool GameMenuService::openFurnace(int iPad, std::shared_ptr<Inventory> inventory, std::shared_ptr<FurnaceTileEntity> furnace) {
|
||||
bool GameMenuService::openFurnace(int iPad,
|
||||
std::shared_ptr<Inventory> inventory,
|
||||
std::shared_ptr<FurnaceTileEntity> furnace) {
|
||||
return game_.LoadFurnaceMenu(iPad, inventory, furnace);
|
||||
}
|
||||
bool GameMenuService::openBrewingStand(int iPad, std::shared_ptr<Inventory> inventory, std::shared_ptr<BrewingStandTileEntity> brewingStand) {
|
||||
bool GameMenuService::openBrewingStand(
|
||||
int iPad, std::shared_ptr<Inventory> inventory,
|
||||
std::shared_ptr<BrewingStandTileEntity> brewingStand) {
|
||||
return game_.LoadBrewingStandMenu(iPad, inventory, brewingStand);
|
||||
}
|
||||
bool GameMenuService::openContainer(int iPad, std::shared_ptr<Container> inventory, std::shared_ptr<Container> container) {
|
||||
bool GameMenuService::openContainer(int iPad,
|
||||
std::shared_ptr<Container> inventory,
|
||||
std::shared_ptr<Container> container) {
|
||||
return game_.LoadContainerMenu(iPad, inventory, container);
|
||||
}
|
||||
bool GameMenuService::openTrap(int iPad, std::shared_ptr<Container> inventory, std::shared_ptr<DispenserTileEntity> trap) {
|
||||
bool GameMenuService::openTrap(int iPad, std::shared_ptr<Container> inventory,
|
||||
std::shared_ptr<DispenserTileEntity> trap) {
|
||||
return game_.LoadTrapMenu(iPad, inventory, trap);
|
||||
}
|
||||
bool GameMenuService::openFireworks(int iPad, std::shared_ptr<LocalPlayer> player, int x, int y, int z) {
|
||||
bool GameMenuService::openFireworks(int iPad,
|
||||
std::shared_ptr<LocalPlayer> player, int x,
|
||||
int y, int z) {
|
||||
return game_.LoadFireworksMenu(iPad, player, x, y, z);
|
||||
}
|
||||
bool GameMenuService::openSign(int iPad, std::shared_ptr<SignTileEntity> sign) {
|
||||
return game_.LoadSignEntryMenu(iPad, sign);
|
||||
}
|
||||
bool GameMenuService::openRepairing(int iPad, std::shared_ptr<Inventory> inventory, Level* level, int x, int y, int z) {
|
||||
bool GameMenuService::openRepairing(int iPad,
|
||||
std::shared_ptr<Inventory> inventory,
|
||||
Level* level, int x, int y, int z) {
|
||||
return game_.LoadRepairingMenu(iPad, inventory, level, x, y, z);
|
||||
}
|
||||
bool GameMenuService::openTrading(int iPad, std::shared_ptr<Inventory> inventory, std::shared_ptr<Merchant> trader, Level* level, const std::string& name) {
|
||||
bool GameMenuService::openTrading(int iPad,
|
||||
std::shared_ptr<Inventory> inventory,
|
||||
std::shared_ptr<Merchant> trader,
|
||||
Level* level, const std::string& name) {
|
||||
return game_.LoadTradingMenu(iPad, inventory, trader, level, name);
|
||||
}
|
||||
bool GameMenuService::openCommandBlock(int iPad, std::shared_ptr<CommandBlockEntity> commandBlock) {
|
||||
bool GameMenuService::openCommandBlock(
|
||||
int iPad, std::shared_ptr<CommandBlockEntity> commandBlock) {
|
||||
return game_.LoadCommandBlockMenu(iPad, commandBlock);
|
||||
}
|
||||
bool GameMenuService::openHopper(int iPad, std::shared_ptr<Inventory> inventory, std::shared_ptr<HopperTileEntity> hopper) {
|
||||
bool GameMenuService::openHopper(int iPad, std::shared_ptr<Inventory> inventory,
|
||||
std::shared_ptr<HopperTileEntity> hopper) {
|
||||
return game_.LoadHopperMenu(iPad, inventory, hopper);
|
||||
}
|
||||
bool GameMenuService::openHopperMinecart(int iPad, std::shared_ptr<Inventory> inventory, std::shared_ptr<MinecartHopper> hopper) {
|
||||
bool GameMenuService::openHopperMinecart(
|
||||
int iPad, std::shared_ptr<Inventory> inventory,
|
||||
std::shared_ptr<MinecartHopper> hopper) {
|
||||
return game_.LoadHopperMenu(iPad, inventory, hopper);
|
||||
}
|
||||
bool GameMenuService::openHorse(int iPad, std::shared_ptr<Inventory> inventory, std::shared_ptr<Container> container, std::shared_ptr<EntityHorse> horse) {
|
||||
bool GameMenuService::openHorse(int iPad, std::shared_ptr<Inventory> inventory,
|
||||
std::shared_ptr<Container> container,
|
||||
std::shared_ptr<EntityHorse> horse) {
|
||||
return game_.LoadHorseMenu(iPad, inventory, container, horse);
|
||||
}
|
||||
bool GameMenuService::openBeacon(int iPad, std::shared_ptr<Inventory> inventory, std::shared_ptr<BeaconTileEntity> beacon) {
|
||||
bool GameMenuService::openBeacon(int iPad, std::shared_ptr<Inventory> inventory,
|
||||
std::shared_ptr<BeaconTileEntity> beacon) {
|
||||
return game_.LoadBeaconMenu(iPad, inventory, beacon);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,9 +40,8 @@ public:
|
|||
int iPad, std::shared_ptr<CommandBlockEntity> commandBlock) override;
|
||||
bool openHopper(int iPad, std::shared_ptr<Inventory> inventory,
|
||||
std::shared_ptr<HopperTileEntity> hopper) override;
|
||||
bool openHopperMinecart(
|
||||
int iPad, std::shared_ptr<Inventory> inventory,
|
||||
std::shared_ptr<MinecartHopper> hopper) override;
|
||||
bool openHopperMinecart(int iPad, std::shared_ptr<Inventory> inventory,
|
||||
std::shared_ptr<MinecartHopper> hopper) override;
|
||||
bool openHorse(int iPad, std::shared_ptr<Inventory> inventory,
|
||||
std::shared_ptr<Container> container,
|
||||
std::shared_ptr<EntityHorse> horse) override;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
#include "app/common/GameRules/LevelGeneration/BiomeOverride.h"
|
||||
#include "app/common/GameRules/LevelGeneration/ConsoleGenerateStructure.h"
|
||||
#include "app/common/GameRules/LevelGeneration/ConsoleGenerateStructureAction.h"
|
||||
#include "minecraft/world/level/GameRules/LevelGenerationOptions.h"
|
||||
#include "app/common/GameRules/LevelGeneration/StartFeature.h"
|
||||
#include "app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionGenerateBox.h"
|
||||
#include "app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceBlock.h"
|
||||
|
|
@ -16,10 +15,11 @@
|
|||
#include "app/common/GameRules/LevelRules/RuleDefinitions/CollectItemRuleDefinition.h"
|
||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/CompleteAllRuleDefinition.h"
|
||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/CompoundGameRuleDefinition.h"
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/LevelRuleset.h"
|
||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/NamedAreaRuleDefinition.h"
|
||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/UpdatePlayerRuleDefinition.h"
|
||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/UseTileRuleDefinition.h"
|
||||
#include "minecraft/world/level/GameRules/GameRule.h"
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
#include "minecraft/world/level/GameRules/GameRulesInstance.h"
|
||||
#include "minecraft/world/level/GameRules/LevelGenerationOptions.h"
|
||||
|
|
|
|||
|
|
@ -13,20 +13,20 @@
|
|||
#include "app/common/DLC/DLCManager.h"
|
||||
#include "app/common/DLC/DLCPack.h"
|
||||
#include "app/common/GameRules/LevelGeneration/ConsoleSchematicFile.h"
|
||||
#include "minecraft/world/level/GameRules/LevelGenerationOptions.h"
|
||||
#include "app/common/GameRules/LevelGeneration/LevelGenerators.h"
|
||||
#include "app/common/GameRules/LevelRules/LevelRules.h"
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/LevelRuleset.h"
|
||||
#include "minecraft/locale/StringTable.h"
|
||||
#include "app/linux/LinuxGame.h"
|
||||
#include "minecraft/world/level/storage/ConsoleSaveFileIO/compression.h"
|
||||
#include "java/File.h"
|
||||
#include "java/InputOutputStream/ByteArrayInputStream.h"
|
||||
#include "java/InputOutputStream/ByteArrayOutputStream.h"
|
||||
#include "java/InputOutputStream/DataInputStream.h"
|
||||
#include "java/InputOutputStream/DataOutputStream.h"
|
||||
#include "minecraft/locale/StringTable.h"
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
#include "minecraft/world/level/GameRules/LevelGenerationOptions.h"
|
||||
#include "minecraft/world/level/storage/ConsoleSaveFileIO/FileHeader.h"
|
||||
#include "minecraft/world/level/storage/ConsoleSaveFileIO/compression.h"
|
||||
#include "strings.h"
|
||||
|
||||
const char* GameRuleManager::wchTagNameA[] = {
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@
|
|||
#include <unordered_map>
|
||||
|
||||
#include "app/common/DLC/DLCGameRulesHeader.h"
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "app/common/GameRules/LevelGeneration/LevelGenerators.h"
|
||||
#include "app/common/GameRules/LevelRules/LevelRules.h"
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
|
||||
class LevelGenerationOptions;
|
||||
class RootGameRulesDefinition;
|
||||
|
|
|
|||
|
|
@ -4,16 +4,16 @@
|
|||
#include <cmath>
|
||||
|
||||
#include "ConsoleSchematicFile.h"
|
||||
#include "minecraft/world/level/GameRules/LevelGenerationOptions.h"
|
||||
#include "app/linux/LinuxGame.h"
|
||||
#include "java/InputOutputStream/DataOutputStream.h"
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
#include "app/linux/LinuxGame.h"
|
||||
#include "util/StringHelpers.h"
|
||||
#include "java/InputOutputStream/DataOutputStream.h"
|
||||
#include "minecraft/world/level/GameRules/LevelGenerationOptions.h"
|
||||
#include "minecraft/world/level/Level.h"
|
||||
#include "minecraft/world/level/chunk/LevelChunk.h"
|
||||
#include "minecraft/world/level/dimension/Dimension.h"
|
||||
#include "minecraft/world/phys/AABB.h"
|
||||
#include "util/StringHelpers.h"
|
||||
|
||||
ApplySchematicRuleDefinition::ApplySchematicRuleDefinition(
|
||||
LevelGenerationOptions* levelGenOptions) {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
#include "BiomeOverride.h"
|
||||
|
||||
#include "app/linux/LinuxGame.h"
|
||||
#include "java/InputOutputStream/DataOutputStream.h"
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
#include "app/linux/LinuxGame.h"
|
||||
#include "util/StringHelpers.h"
|
||||
#include "java/InputOutputStream/DataOutputStream.h"
|
||||
|
||||
BiomeOverride::BiomeOverride() {
|
||||
m_tile = 0;
|
||||
|
|
|
|||
|
|
@ -4,20 +4,20 @@
|
|||
|
||||
#include <algorithm>
|
||||
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "app/common/GameRules/LevelGeneration/ConsoleGenerateStructureAction.h"
|
||||
#include "app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionGenerateBox.h"
|
||||
#include "app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceBlock.h"
|
||||
#include "app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceContainer.h"
|
||||
#include "app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceSpawner.h"
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
#include "app/linux/LinuxGame.h"
|
||||
#include "util/StringHelpers.h"
|
||||
#include "java/InputOutputStream/DataOutputStream.h"
|
||||
#include "minecraft/Direction.h"
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
#include "minecraft/world/level/Level.h"
|
||||
#include "minecraft/world/level/dimension/Dimension.h"
|
||||
#include "minecraft/world/level/levelgen/structure/BoundingBox.h"
|
||||
#include "util/StringHelpers.h"
|
||||
|
||||
ConsoleGenerateStructure::ConsoleGenerateStructure() : StructurePiece(0) {
|
||||
m_x = m_y = m_z = 0;
|
||||
|
|
@ -77,8 +77,8 @@ void ConsoleGenerateStructure::writeAttributes(DataOutputStream* dos,
|
|||
dos->writeUTF(toWString(m_dimension));
|
||||
}
|
||||
|
||||
void ConsoleGenerateStructure::addAttribute(
|
||||
const std::string& attributeName, const std::string& attributeValue) {
|
||||
void ConsoleGenerateStructure::addAttribute(const std::string& attributeName,
|
||||
const std::string& attributeValue) {
|
||||
if (attributeName.compare("x") == 0) {
|
||||
int value = fromWString<int>(attributeValue);
|
||||
m_x = value;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@
|
|||
#include <vector>
|
||||
|
||||
#include "app/linux/LinuxGame.h"
|
||||
#include "minecraft/world/level/storage/ConsoleSaveFileIO/compression.h"
|
||||
#include "java/Class.h"
|
||||
#include "java/InputOutputStream/DataInputStream.h"
|
||||
#include "java/InputOutputStream/DataOutputStream.h"
|
||||
|
|
@ -21,6 +20,7 @@
|
|||
#include "minecraft/world/level/LightLayer.h"
|
||||
#include "minecraft/world/level/TilePos.h"
|
||||
#include "minecraft/world/level/chunk/LevelChunk.h"
|
||||
#include "minecraft/world/level/storage/ConsoleSaveFileIO/compression.h"
|
||||
#include "minecraft/world/level/tile/Tile.h"
|
||||
#include "minecraft/world/level/tile/entity/TileEntity.h"
|
||||
#include "minecraft/world/phys/AABB.h"
|
||||
|
|
@ -749,9 +749,9 @@ void ConsoleSchematicFile::generateSchematicFile(
|
|||
|
||||
bool mobCanBeSaved = false;
|
||||
if (bSaveMobs) {
|
||||
if (e->instanceof(eTYPE_MONSTER) ||
|
||||
e->instanceof(eTYPE_WATERANIMAL) ||
|
||||
e->instanceof(eTYPE_ANIMAL) || (e->GetType() == eTYPE_VILLAGER))
|
||||
if (e->instanceof (eTYPE_MONSTER) || e->instanceof
|
||||
(eTYPE_WATERANIMAL) || e->instanceof
|
||||
(eTYPE_ANIMAL) || (e->GetType() == eTYPE_VILLAGER))
|
||||
|
||||
// 4J-JEV: All these are derived from eTYPE_ANIMAL and true
|
||||
// implicitly.
|
||||
|
|
@ -765,8 +765,9 @@ void ConsoleSchematicFile::generateSchematicFile(
|
|||
// 4J-JEV: Changed to check for instances of minecarts and
|
||||
// hangingEntities instead of just eTYPE_PAINTING, eTYPE_ITEM_FRAME and
|
||||
// eTYPE_MINECART
|
||||
if (mobCanBeSaved || e->instanceof(eTYPE_MINECART) ||
|
||||
e->GetType() == eTYPE_BOAT || e->instanceof(eTYPE_HANGING_ENTITY)) {
|
||||
if (mobCanBeSaved || e->instanceof
|
||||
(eTYPE_MINECART) || e->GetType() == eTYPE_BOAT || e->instanceof
|
||||
(eTYPE_HANGING_ENTITY)) {
|
||||
CompoundTag* eTag = new CompoundTag();
|
||||
if (e->save(eTag)) {
|
||||
ListTag<DoubleTag>* pos =
|
||||
|
|
@ -776,7 +777,7 @@ void ConsoleSchematicFile::generateSchematicFile(
|
|||
pos->get(1)->data -= yStart;
|
||||
pos->get(2)->data -= zStart;
|
||||
|
||||
if (e->instanceof(eTYPE_HANGING_ENTITY)) {
|
||||
if (e->instanceof (eTYPE_HANGING_ENTITY)) {
|
||||
((IntTag*)eTag->get("TileX"))->data -= xStart;
|
||||
((IntTag*)eTag->get("TileY"))->data -= yStart;
|
||||
((IntTag*)eTag->get("TileZ"))->data -= zStart;
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@
|
|||
#include <vector>
|
||||
|
||||
#include "minecraft/XuiActionPayload.h"
|
||||
|
||||
#include "minecraft/world/level/storage/ConsoleSaveFileIO/compression.h"
|
||||
#include "minecraft/world/phys/Vec3.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
#include <unordered_set>
|
||||
#include <utility>
|
||||
|
||||
#include "minecraft/GameEnums.h"
|
||||
#include "app/common/DLC/DLCGameRulesHeader.h"
|
||||
#include "app/common/DLC/DLCManager.h"
|
||||
#include "app/common/DLC/DLCPack.h"
|
||||
|
|
@ -16,14 +15,15 @@
|
|||
#include "app/common/GameRules/LevelGeneration/ConsoleGenerateStructure.h"
|
||||
#include "app/common/GameRules/LevelGeneration/ConsoleSchematicFile.h"
|
||||
#include "app/common/GameRules/LevelGeneration/StartFeature.h"
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
#include "minecraft/locale/StringTable.h"
|
||||
#include "app/linux/LinuxGame.h"
|
||||
#include "java/File.h"
|
||||
#include "java/InputOutputStream/ByteArrayInputStream.h"
|
||||
#include "java/InputOutputStream/DataInputStream.h"
|
||||
#include "java/InputOutputStream/DataOutputStream.h"
|
||||
#include "minecraft/GameEnums.h"
|
||||
#include "minecraft/Pos.h"
|
||||
#include "minecraft/locale/StringTable.h"
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
#include "minecraft/world/level/Level.h"
|
||||
#include "minecraft/world/level/chunk/LevelChunk.h"
|
||||
#include "minecraft/world/level/dimension/Dimension.h"
|
||||
|
|
@ -440,8 +440,7 @@ ConsoleSchematicFile* LevelGenerationOptions::loadSchematicFile(
|
|||
auto it = m_schematics.find(filename);
|
||||
if (it != m_schematics.end()) {
|
||||
#if !defined(_CONTENT_PACKAGE)
|
||||
printf("We have already loaded schematic file %s\n",
|
||||
filename.c_str());
|
||||
printf("We have already loaded schematic file %s\n", filename.c_str());
|
||||
#endif
|
||||
it->second->incrementRefCount();
|
||||
return it->second;
|
||||
|
|
@ -470,8 +469,7 @@ ConsoleSchematicFile* LevelGenerationOptions::getSchematicFile(
|
|||
return schematic;
|
||||
}
|
||||
|
||||
void LevelGenerationOptions::releaseSchematicFile(
|
||||
const std::string& filename) {
|
||||
void LevelGenerationOptions::releaseSchematicFile(const std::string& filename) {
|
||||
// 4J Stu - We don't want to delete them when done, but probably want to
|
||||
// keep a set of active schematics for the current world
|
||||
// auto it = m_schematics.find(filename);
|
||||
|
|
@ -627,7 +625,8 @@ int LevelGenerationOptions::onPackMounted(int iPad, uint32_t dwErr,
|
|||
uint8_t* pbData = (uint8_t*)new uint8_t[dwFileSize];
|
||||
auto readResult = PlatformFilesystem.readFile(
|
||||
save.getPath(), pbData, dwFileSize);
|
||||
if (readResult.status != IPlatformFilesystem::ReadStatus::Ok) {
|
||||
if (readResult.status !=
|
||||
IPlatformFilesystem::ReadStatus::Ok) {
|
||||
app.FatalLoadError();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
#include "StartFeature.h"
|
||||
|
||||
#include "app/linux/LinuxGame.h"
|
||||
#include "java/InputOutputStream/DataOutputStream.h"
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
#include "app/linux/LinuxGame.h"
|
||||
#include "util/StringHelpers.h"
|
||||
#include "java/InputOutputStream/DataOutputStream.h"
|
||||
|
||||
StartFeature::StartFeature() {
|
||||
m_chunkX = 0;
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
#include "XboxStructureActionGenerateBox.h"
|
||||
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "app/common/GameRules/LevelGeneration/ConsoleGenerateStructureAction.h"
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
#include "app/linux/LinuxGame.h"
|
||||
#include "util/StringHelpers.h"
|
||||
#include "java/InputOutputStream/DataOutputStream.h"
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
#include "minecraft/world/level/levelgen/structure/StructurePiece.h"
|
||||
#include "util/StringHelpers.h"
|
||||
|
||||
XboxStructureActionGenerateBox::XboxStructureActionGenerateBox() {
|
||||
m_x0 = m_y0 = m_z0 = m_x1 = m_y1 = m_z1 = m_edgeTile = m_fillTile = 0;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
#pragma once
|
||||
#include <string>
|
||||
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "app/common/GameRules/LevelGeneration/ConsoleGenerateStructureAction.h"
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
|
||||
class StructurePiece;
|
||||
class Level;
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
#include "XboxStructureActionPlaceBlock.h"
|
||||
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "app/common/GameRules/LevelGeneration/ConsoleGenerateStructureAction.h"
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
#include "app/linux/LinuxGame.h"
|
||||
#include "util/StringHelpers.h"
|
||||
#include "java/InputOutputStream/DataOutputStream.h"
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
#include "minecraft/world/level/levelgen/structure/StructurePiece.h"
|
||||
#include "util/StringHelpers.h"
|
||||
|
||||
XboxStructureActionPlaceBlock::XboxStructureActionPlaceBlock() {
|
||||
m_x = m_y = m_z = m_tile = m_data = 0;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
#pragma once
|
||||
#include <string>
|
||||
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "app/common/GameRules/LevelGeneration/ConsoleGenerateStructureAction.h"
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
|
||||
class StructurePiece;
|
||||
class Level;
|
||||
|
|
|
|||
|
|
@ -4,17 +4,17 @@
|
|||
|
||||
#include <memory>
|
||||
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceBlock.h"
|
||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/AddItemRuleDefinition.h"
|
||||
#include "app/linux/LinuxGame.h"
|
||||
#include "util/StringHelpers.h"
|
||||
#include "minecraft/world/Container.h"
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "minecraft/world/level/Level.h"
|
||||
#include "minecraft/world/level/levelgen/structure/BoundingBox.h"
|
||||
#include "minecraft/world/level/levelgen/structure/StructurePiece.h"
|
||||
#include "minecraft/world/level/tile/Tile.h"
|
||||
#include "minecraft/world/level/tile/entity/TileEntity.h"
|
||||
#include "util/StringHelpers.h"
|
||||
|
||||
XboxStructureActionPlaceContainer::XboxStructureActionPlaceContainer() {
|
||||
m_tile = Tile::chest_Id;
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "XboxStructureActionPlaceBlock.h"
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
|
||||
class AddItemRuleDefinition;
|
||||
class StructurePiece;
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
#include <memory>
|
||||
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceBlock.h"
|
||||
#include "java/InputOutputStream/DataOutputStream.h"
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "minecraft/world/level/Level.h"
|
||||
#include "minecraft/world/level/levelgen/structure/BoundingBox.h"
|
||||
#include "minecraft/world/level/levelgen/structure/StructurePiece.h"
|
||||
|
|
@ -33,9 +33,8 @@ void XboxStructureActionPlaceSpawner::addAttribute(
|
|||
if (attributeName.compare("entity") == 0) {
|
||||
m_entityId = attributeValue;
|
||||
#ifndef _CONTENT_PACKAGE
|
||||
printf(
|
||||
"XboxStructureActionPlaceSpawner: Adding parameter entity=%s\n",
|
||||
m_entityId.c_str());
|
||||
printf("XboxStructureActionPlaceSpawner: Adding parameter entity=%s\n",
|
||||
m_entityId.c_str());
|
||||
#endif
|
||||
} else {
|
||||
XboxStructureActionPlaceBlock::addAttribute(attributeName,
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "XboxStructureActionPlaceBlock.h"
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
|
||||
class StructurePiece;
|
||||
class Level;
|
||||
|
|
|
|||
|
|
@ -3,10 +3,7 @@
|
|||
#include <algorithm>
|
||||
#include <vector>
|
||||
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
#include "app/linux/LinuxGame.h"
|
||||
#include "util/StringHelpers.h"
|
||||
#include "java/InputOutputStream/DataOutputStream.h"
|
||||
#include "minecraft/world/item/EnchantedBookItem.h"
|
||||
#include "minecraft/world/item/Item.h"
|
||||
|
|
@ -14,6 +11,9 @@
|
|||
#include "minecraft/world/item/enchantment/Enchantment.h"
|
||||
#include "minecraft/world/item/enchantment/EnchantmentCategory.h"
|
||||
#include "minecraft/world/item/enchantment/EnchantmentInstance.h"
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
#include "util/StringHelpers.h"
|
||||
|
||||
AddEnchantmentRuleDefinition::AddEnchantmentRuleDefinition() {
|
||||
m_enchantmentId = m_enchantmentLevel = 0;
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
|
||||
class ItemInstance;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@
|
|||
#include <algorithm>
|
||||
|
||||
#include "AddEnchantmentRuleDefinition.h"
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
#include "util/StringHelpers.h"
|
||||
#include "java/InputOutputStream/DataOutputStream.h"
|
||||
#include "minecraft/world/Container.h"
|
||||
#include "minecraft/world/entity/player/Inventory.h"
|
||||
#include "minecraft/world/item/Item.h"
|
||||
#include "minecraft/world/item/ItemInstance.h"
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
#include "util/StringHelpers.h"
|
||||
|
||||
AddItemRuleDefinition::AddItemRuleDefinition() {
|
||||
m_itemId = m_quantity = m_auxValue = m_dataTag = 0;
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
|
||||
class Container;
|
||||
class AddEnchantmentRuleDefinition;
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
#include "CollectItemRuleDefinition.h"
|
||||
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
#include "minecraft/world/level/GameRules/GameRule.h"
|
||||
#include "minecraft/world/level/GameRules/GameRulesInstance.h"
|
||||
#include "app/linux/LinuxGame.h"
|
||||
#include "util/StringHelpers.h"
|
||||
#include "java/InputOutputStream/DataOutputStream.h"
|
||||
#include "minecraft/network/Connection.h"
|
||||
#include "minecraft/network/packet/UpdateGameRuleProgressPacket.h"
|
||||
#include "minecraft/world/item/ItemInstance.h"
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "minecraft/world/level/GameRules/GameRule.h"
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
#include "minecraft/world/level/GameRules/GameRulesInstance.h"
|
||||
#include "util/StringHelpers.h"
|
||||
|
||||
CollectItemRuleDefinition::CollectItemRuleDefinition() {
|
||||
m_itemId = 0;
|
||||
|
|
@ -111,8 +111,7 @@ std::string CollectItemRuleDefinition::generateXml(
|
|||
"\" quantity=\"SET\" descriptionName=\"OPTIONAL\" "
|
||||
"promptName=\"OPTIONAL\"";
|
||||
if (item->getAuxValue() != 0)
|
||||
xml +=
|
||||
" auxValue=\"" + toWString<int>(item->getAuxValue()) + "\"";
|
||||
xml += " auxValue=\"" + toWString<int>(item->getAuxValue()) + "\"";
|
||||
if (item->get4JData() != 0)
|
||||
xml += " dataTag=\"" + toWString<int>(item->get4JData()) + "\"";
|
||||
xml += "/>\n";
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
#include "minecraft/world/level/GameRules/GameRulesInstance.h"
|
||||
|
||||
class Pos;
|
||||
|
|
|
|||
|
|
@ -5,12 +5,12 @@
|
|||
#include <utility>
|
||||
|
||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/CompoundGameRuleDefinition.h"
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
#include "minecraft/world/level/GameRules/GameRule.h"
|
||||
#include "app/linux/LinuxGame.h"
|
||||
#include "util/StringHelpers.h"
|
||||
#include "minecraft/network/Connection.h"
|
||||
#include "minecraft/network/packet/UpdateGameRuleProgressPacket.h"
|
||||
#include "minecraft/world/level/GameRules/GameRule.h"
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
#include "util/StringHelpers.h"
|
||||
|
||||
void CompleteAllRuleDefinition::getChildren(
|
||||
std::vector<GameRuleDefinition*>* children) {
|
||||
|
|
|
|||
|
|
@ -25,8 +25,8 @@ public:
|
|||
virtual bool onCollectItem(GameRule* rule,
|
||||
std::shared_ptr<ItemInstance> item);
|
||||
|
||||
static std::string generateDescriptionString(
|
||||
const std::string& description, void* data, int dataLength);
|
||||
static std::string generateDescriptionString(const std::string& description,
|
||||
void* data, int dataLength);
|
||||
|
||||
private:
|
||||
void updateStatus(GameRule* rule);
|
||||
|
|
|
|||
|
|
@ -7,13 +7,13 @@
|
|||
#include <unordered_map>
|
||||
#include <utility>
|
||||
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/CollectItemRuleDefinition.h"
|
||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/CompleteAllRuleDefinition.h"
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/UpdatePlayerRuleDefinition.h"
|
||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/UseTileRuleDefinition.h"
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "minecraft/world/level/GameRules/GameRule.h"
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
#include "minecraft/world/level/GameRules/GameRulesInstance.h"
|
||||
#include "util/StringHelpers.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
#include <vector>
|
||||
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
#include "minecraft/world/level/GameRules/GameRulesInstance.h"
|
||||
|
||||
class CompoundGameRuleDefinition : public GameRuleDefinition {
|
||||
|
|
|
|||
|
|
@ -8,14 +8,14 @@
|
|||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/CompleteAllRuleDefinition.h"
|
||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/LevelRuleset.h"
|
||||
#include "app/linux/LinuxGame.h"
|
||||
#include "java/InputOutputStream/DataOutputStream.h"
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "minecraft/world/level/GameRules/GameRule.h"
|
||||
#include "minecraft/world/level/GameRules/GameRulesInstance.h"
|
||||
#include "app/linux/LinuxGame.h"
|
||||
#include "util/StringHelpers.h"
|
||||
#include "java/InputOutputStream/DataOutputStream.h"
|
||||
|
||||
class Connection;
|
||||
|
||||
|
|
@ -66,7 +66,7 @@ GameRuleDefinition* GameRuleDefinition::addChild(
|
|||
ConsoleGameRules::EGameRuleType ruleType) {
|
||||
#ifndef _CONTENT_PACKAGE
|
||||
printf("GameRuleDefinition: Attempted to add invalid child rule - %d\n",
|
||||
ruleType);
|
||||
ruleType);
|
||||
#endif
|
||||
return nullptr;
|
||||
}
|
||||
|
|
@ -77,13 +77,13 @@ void GameRuleDefinition::addAttribute(const std::string& attributeName,
|
|||
m_descriptionId = attributeValue;
|
||||
#ifndef _CONTENT_PACKAGE
|
||||
printf("GameRuleDefinition: Adding parameter descriptionId=%s\n",
|
||||
m_descriptionId.c_str());
|
||||
m_descriptionId.c_str());
|
||||
#endif
|
||||
} else if (attributeName.compare("promptName") == 0) {
|
||||
m_promptId = attributeValue;
|
||||
#ifndef _CONTENT_PACKAGE
|
||||
printf("GameRuleDefinition: Adding parameter m_promptId=%s\n",
|
||||
m_promptId.c_str());
|
||||
m_promptId.c_str());
|
||||
#endif
|
||||
} else if (attributeName.compare("dataTag") == 0) {
|
||||
m_4JDataValue = fromWString<int>(attributeValue);
|
||||
|
|
@ -92,9 +92,8 @@ void GameRuleDefinition::addAttribute(const std::string& attributeName,
|
|||
m_4JDataValue);
|
||||
} else {
|
||||
#ifndef _CONTENT_PACKAGE
|
||||
printf(
|
||||
"GameRuleDefinition: Attempted to add invalid attribute: %s\n",
|
||||
attributeName.c_str());
|
||||
printf("GameRuleDefinition: Attempted to add invalid attribute: %s\n",
|
||||
attributeName.c_str());
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
#include "LevelRuleset.h"
|
||||
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/CompoundGameRuleDefinition.h"
|
||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/NamedAreaRuleDefinition.h"
|
||||
#include "minecraft/locale/StringTable.h"
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
|
||||
class AABB;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
#include <wchar.h>
|
||||
|
||||
#include "app/linux/LinuxGame.h"
|
||||
#include "java/InputOutputStream/DataOutputStream.h"
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
#include "app/linux/LinuxGame.h"
|
||||
#include "util/StringHelpers.h"
|
||||
#include "java/InputOutputStream/DataOutputStream.h"
|
||||
|
||||
NamedAreaRuleDefinition::NamedAreaRuleDefinition() {
|
||||
m_name = "";
|
||||
|
|
@ -41,7 +41,7 @@ void NamedAreaRuleDefinition::addAttribute(const std::string& attributeName,
|
|||
m_name = attributeValue;
|
||||
#ifndef _CONTENT_PACKAGE
|
||||
printf("NamedAreaRuleDefinition: Adding parameter name=%s\n",
|
||||
m_name.c_str());
|
||||
m_name.c_str());
|
||||
#endif
|
||||
} else if (attributeName.compare("x0") == 0) {
|
||||
m_area.x0 = fromWString<int>(attributeValue);
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
#include "minecraft/world/phys/AABB.h"
|
||||
|
||||
class NamedAreaRuleDefinition : public GameRuleDefinition {
|
||||
|
|
|
|||
|
|
@ -4,16 +4,16 @@
|
|||
|
||||
#include <memory>
|
||||
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/AddItemRuleDefinition.h"
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
#include "app/linux/LinuxGame.h"
|
||||
#include "util/StringHelpers.h"
|
||||
#include "java/InputOutputStream/DataOutputStream.h"
|
||||
#include "minecraft/Pos.h"
|
||||
#include "minecraft/world/entity/player/Inventory.h"
|
||||
#include "minecraft/world/entity/player/Player.h"
|
||||
#include "minecraft/world/food/FoodData.h"
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
#include "util/StringHelpers.h"
|
||||
|
||||
UpdatePlayerRuleDefinition::UpdatePlayerRuleDefinition() {
|
||||
m_bUpdateHealth = m_bUpdateFood = m_bUpdateYRot = false;
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
|
||||
class AddItemRuleDefinition;
|
||||
class Pos;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
#include "UseTileRuleDefinition.h"
|
||||
|
||||
#include "app/linux/LinuxGame.h"
|
||||
#include "java/InputOutputStream/DataOutputStream.h"
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
#include "app/linux/LinuxGame.h"
|
||||
#include "util/StringHelpers.h"
|
||||
#include "java/InputOutputStream/DataOutputStream.h"
|
||||
|
||||
UseTileRuleDefinition::UseTileRuleDefinition() {
|
||||
m_tileId = -1;
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "minecraft/Pos.h"
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
|
||||
class UseTileRuleDefinition : public GameRuleDefinition {
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@
|
|||
#include <unordered_map>
|
||||
#include <utility>
|
||||
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
#include "java/InputOutputStream/DataInputStream.h"
|
||||
#include "java/InputOutputStream/DataOutputStream.h"
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
|
||||
class Connection;
|
||||
class ItemInstance;
|
||||
|
|
@ -32,15 +32,14 @@ GameRule::ValueType GameRule::getParameter(const std::string& parameterName) {
|
|||
if (m_parameters.find(parameterName) == m_parameters.end()) {
|
||||
#ifndef _CONTENT_PACKAGE
|
||||
printf("WARNING: Parameter %s was not set before being fetched\n",
|
||||
parameterName.c_str());
|
||||
parameterName.c_str());
|
||||
assert(0);
|
||||
#endif
|
||||
}
|
||||
return m_parameters[parameterName];
|
||||
}
|
||||
|
||||
void GameRule::setParameter(const std::string& parameterName,
|
||||
ValueType value) {
|
||||
void GameRule::setParameter(const std::string& parameterName, ValueType value) {
|
||||
if (m_parameters.find(parameterName) == m_parameters.end()) {
|
||||
#ifndef _CONTENT_PACKAGE
|
||||
printf("Adding parameter %s to GameRule\n", parameterName.c_str());
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
#include <cstdint>
|
||||
|
||||
#include "app/common/App_structs.h"
|
||||
#include "platform/profile/profile.h"
|
||||
#include "platform/XboxStubs.h"
|
||||
#include "platform/profile/profile.h"
|
||||
|
||||
class GameSettingsManager {
|
||||
public:
|
||||
|
|
@ -14,9 +14,9 @@ public:
|
|||
static int oldProfileVersionCallback(void* pParam, unsigned char* pucData,
|
||||
const unsigned short usVersion,
|
||||
const int iPad);
|
||||
static int defaultOptionsCallback(void* pParam,
|
||||
IPlatformProfile::PROFILESETTINGS* pSettings,
|
||||
const int iPad);
|
||||
static int defaultOptionsCallback(
|
||||
void* pParam, IPlatformProfile::PROFILESETTINGS* pSettings,
|
||||
const int iPad);
|
||||
int setDefaultOptions(IPlatformProfile::PROFILESETTINGS* pSettings,
|
||||
const int iPad);
|
||||
|
||||
|
|
@ -64,7 +64,8 @@ public:
|
|||
static void setActionConfirmed(void* param);
|
||||
|
||||
// Saving message
|
||||
int displaySavingMessage(const IPlatformStorage::ESavingMessage eMsg, int iPad);
|
||||
int displaySavingMessage(const IPlatformStorage::ESavingMessage eMsg,
|
||||
int iPad);
|
||||
|
||||
// Game settings array - public, referenced by Game via alias
|
||||
GAME_SETTINGS* GameSettingsA[XUSER_MAX_COUNT];
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
#include "minecraft/GameTypes.h"
|
||||
#include "app/common/Audio/SoundEngine.h"
|
||||
#include "app/common/DLC/DLCManager.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/GameRules/GameRuleManager.h"
|
||||
#include "app/common/Network/GameNetworkManager.h"
|
||||
#include "minecraft/network/platform/NetworkPlayerInterface.h"
|
||||
#include "app/common/Tutorial/Tutorial.h"
|
||||
#include "app/common/UI/All Platforms/UIEnums.h"
|
||||
#include "app/common/UI/All Platforms/UIStructs.h"
|
||||
|
|
@ -11,6 +10,7 @@
|
|||
#include "app/linux/LinuxGame.h"
|
||||
#include "app/linux/Linux_UIController.h"
|
||||
#include "minecraft/GameEnums.h"
|
||||
#include "minecraft/GameTypes.h"
|
||||
#include "minecraft/client/Minecraft.h"
|
||||
#include "minecraft/client/Options.h"
|
||||
#include "minecraft/client/ProgressRenderer.h"
|
||||
|
|
@ -25,13 +25,13 @@
|
|||
#include "minecraft/client/skins/DLCTexturePack.h"
|
||||
#include "minecraft/client/skins/TexturePack.h"
|
||||
#include "minecraft/client/skins/TexturePackRepository.h"
|
||||
#include "minecraft/network/platform/NetworkPlayerInterface.h"
|
||||
#include "minecraft/server/MinecraftServer.h"
|
||||
#include "minecraft/stats/StatsCounter.h"
|
||||
#include "platform/PlatformTypes.h"
|
||||
#include "platform/profile/profile.h"
|
||||
#include "platform/storage/storage.h"
|
||||
#include "util/StringHelpers.h"
|
||||
#include "app/common/Audio/SoundEngine.h"
|
||||
|
||||
void Game::HandleXuiActions(void) {
|
||||
eXuiAction eAction;
|
||||
|
|
@ -215,8 +215,8 @@ void Game::HandleXuiActions(void) {
|
|||
|
||||
// app.CloseAllPlayersXuiScenes();
|
||||
// Hide the other players scenes
|
||||
ui.ShowOtherPlayersBaseScene(PlatformProfile.GetPrimaryPad(),
|
||||
false);
|
||||
ui.ShowOtherPlayersBaseScene(
|
||||
PlatformProfile.GetPrimaryPad(), false);
|
||||
|
||||
// This just allows it to be shown
|
||||
if (pMinecraft
|
||||
|
|
@ -1148,7 +1148,8 @@ void Game::HandleXuiActions(void) {
|
|||
} break;
|
||||
case eAppAction_SetDefaultOptions:
|
||||
SetAction(i, eAppAction_Idle);
|
||||
SetDefaultOptions((IPlatformProfile::PROFILESETTINGS*)param, i);
|
||||
SetDefaultOptions((IPlatformProfile::PROFILESETTINGS*)param,
|
||||
i);
|
||||
|
||||
// if the profile data has been changed, then force a
|
||||
// profile write It seems we're allowed to break the 5
|
||||
|
|
@ -1211,10 +1212,11 @@ void Game::HandleXuiActions(void) {
|
|||
case eAppAction_FailedToJoinNoPrivileges: {
|
||||
unsigned int uiIDA[1];
|
||||
uiIDA[0] = IDS_CONFIRM_OK;
|
||||
IPlatformStorage::EMessageResult result = ui.RequestErrorMessage(
|
||||
IDS_NO_MULTIPLAYER_PRIVILEGE_TITLE,
|
||||
IDS_NO_MULTIPLAYER_PRIVILEGE_JOIN_TEXT, uiIDA, 1,
|
||||
PlatformProfile.GetPrimaryPad());
|
||||
IPlatformStorage::EMessageResult result =
|
||||
ui.RequestErrorMessage(
|
||||
IDS_NO_MULTIPLAYER_PRIVILEGE_TITLE,
|
||||
IDS_NO_MULTIPLAYER_PRIVILEGE_JOIN_TEXT, uiIDA, 1,
|
||||
PlatformProfile.GetPrimaryPad());
|
||||
if (result != IPlatformStorage::EMessage_Busy)
|
||||
SetAction(i, eAppAction_Idle);
|
||||
} break;
|
||||
|
|
@ -1282,9 +1284,7 @@ void Game::HandleXuiActions(void) {
|
|||
} break;
|
||||
case eAppAction_DebugText:
|
||||
// launch the xui for text entry
|
||||
{
|
||||
SetAction(i, eAppAction_Idle);
|
||||
}
|
||||
{ SetAction(i, eAppAction_Idle); }
|
||||
break;
|
||||
|
||||
case eAppAction_ReloadTexturePack: {
|
||||
|
|
|
|||
|
|
@ -21,8 +21,7 @@ public:
|
|||
bool bCallback = false) = 0;
|
||||
|
||||
virtual int LoadLocalTMSFile(char* wchTMSFile) = 0;
|
||||
virtual int LoadLocalTMSFile(char* wchTMSFile,
|
||||
eFileExtensionType eExt) = 0;
|
||||
virtual int LoadLocalTMSFile(char* wchTMSFile, eFileExtensionType eExt) = 0;
|
||||
virtual void FreeLocalTMSFiles(eTMSFileType eType) = 0;
|
||||
virtual int GetLocalTMSFileIndex(char* wchTMSFile,
|
||||
bool bFilenameIncludesExtension,
|
||||
|
|
|
|||
|
|
@ -166,8 +166,7 @@ public:
|
|||
unsigned int readCount) = 0;
|
||||
virtual bool ReadStats_MyScore(LeaderboardReadListener* callback,
|
||||
int difficulty, EStatsType type,
|
||||
PlayerUID myUID,
|
||||
unsigned int readCount) = 0;
|
||||
PlayerUID myUID, unsigned int readCount) = 0;
|
||||
virtual bool ReadStats_TopRank(LeaderboardReadListener* callback,
|
||||
int difficulty, EStatsType type,
|
||||
unsigned int startIndex,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "platform/PlatformTypes.h"
|
||||
#include "LeaderboardManager.h"
|
||||
#include "platform/PlatformTypes.h"
|
||||
|
||||
// 4J-JEV: Simple interface for handling ReadStat failures.
|
||||
class LeaderboardInterface {
|
||||
|
|
@ -23,11 +23,12 @@ public:
|
|||
~LeaderboardInterface();
|
||||
|
||||
void ReadStats_Friends(LeaderboardReadListener* callback, int difficulty,
|
||||
IPlatformLeaderboard::EStatsType type, PlayerUID myUID,
|
||||
unsigned int startIndex, unsigned int readCount);
|
||||
void ReadStats_MyScore(LeaderboardReadListener* callback, int difficulty,
|
||||
IPlatformLeaderboard::EStatsType type, PlayerUID myUID,
|
||||
IPlatformLeaderboard::EStatsType type,
|
||||
PlayerUID myUID, unsigned int startIndex,
|
||||
unsigned int readCount);
|
||||
void ReadStats_MyScore(LeaderboardReadListener* callback, int difficulty,
|
||||
IPlatformLeaderboard::EStatsType type,
|
||||
PlayerUID myUID, unsigned int readCount);
|
||||
void ReadStats_TopRank(LeaderboardReadListener* callback, int difficulty,
|
||||
IPlatformLeaderboard::EStatsType type,
|
||||
unsigned int startIndex, unsigned int readCount);
|
||||
|
|
|
|||
|
|
@ -83,8 +83,7 @@ void LeaderboardManager::printStats(ReadView& view) {
|
|||
for (unsigned int i = 0; i < view.m_numQueries; i++) {
|
||||
ReadScore score = view.m_queries[i];
|
||||
|
||||
app.DebugPrintf("\tname='%s'\n",
|
||||
score.m_name.c_str());
|
||||
app.DebugPrintf("\tname='%s'\n", score.m_name.c_str());
|
||||
app.DebugPrintf("\trank='%i'\n", score.m_rank);
|
||||
|
||||
app.DebugPrintf("\tstatsData=[");
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ void StringTable::ProcessStringTableData(void) {
|
|||
|
||||
langSizeMap.push_back(
|
||||
std::vector<std::pair<std::string, int> >::value_type(langId,
|
||||
langSize));
|
||||
langSize));
|
||||
}
|
||||
|
||||
std::vector<std::string> locales;
|
||||
|
|
|
|||
|
|
@ -6,24 +6,23 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "minecraft/GameEnums.h"
|
||||
#include "app/common/App_structs.h"
|
||||
#include "minecraft/locale/StringTable.h"
|
||||
#include "minecraft/client/resources/Colours/ColourTable.h"
|
||||
#include "app/common/UI/All Platforms/ArchiveFile.h"
|
||||
#include "app/linux/LinuxGame.h"
|
||||
#include "java/Random.h"
|
||||
#include "minecraft/GameEnums.h"
|
||||
#include "minecraft/client/Minecraft.h"
|
||||
#include "minecraft/client/resources/Colours/ColourTable.h"
|
||||
#include "minecraft/client/skins/TexturePack.h"
|
||||
#include "minecraft/client/skins/TexturePackRepository.h"
|
||||
#include "minecraft/locale/StringTable.h"
|
||||
#include "platform/XboxStubs.h"
|
||||
#include "platform/input/input.h"
|
||||
#include "platform/renderer/renderer.h"
|
||||
#include "platform/XboxStubs.h"
|
||||
#include "strings.h"
|
||||
#include "util/StringHelpers.h"
|
||||
|
||||
int LocalizationManager::s_iHTMLFontSizesA[eHTMLSize_COUNT] = {
|
||||
20, 13, 20, 26};
|
||||
int LocalizationManager::s_iHTMLFontSizesA[eHTMLSize_COUNT] = {20, 13, 20, 26};
|
||||
|
||||
TIPSTRUCT LocalizationManager::m_GameTipA[MAX_TIPS_GAMETIP] = {
|
||||
{0, IDS_TIPS_GAMETIP_1}, {0, IDS_TIPS_GAMETIP_2},
|
||||
|
|
@ -77,8 +76,7 @@ void LocalizationManager::loadStringTable(ArchiveFile* mediaArchive) {
|
|||
}
|
||||
std::string localisationFile = "languages.loc";
|
||||
if (mediaArchive->hasFile(localisationFile)) {
|
||||
std::vector<uint8_t> locFile =
|
||||
mediaArchive->getFile(localisationFile);
|
||||
std::vector<uint8_t> locFile = mediaArchive->getFile(localisationFile);
|
||||
m_stringTable = new StringTable(locFile.data(), locFile.size());
|
||||
} else {
|
||||
m_stringTable = nullptr;
|
||||
|
|
@ -345,8 +343,8 @@ std::string LocalizationManager::formatHTMLString(
|
|||
return text;
|
||||
}
|
||||
|
||||
std::string LocalizationManager::getActionReplacement(
|
||||
int iPad, unsigned char ucAction) {
|
||||
std::string LocalizationManager::getActionReplacement(int iPad,
|
||||
unsigned char ucAction) {
|
||||
unsigned int input = PlatformInput.GetGameJoypadMaps(
|
||||
PlatformInput.GetJoypadMapVal(iPad), ucAction);
|
||||
|
||||
|
|
@ -505,8 +503,7 @@ std::string LocalizationManager::getIconReplacement(unsigned int uiIcon) {
|
|||
return result;
|
||||
}
|
||||
|
||||
void LocalizationManager::getLocale(
|
||||
std::vector<std::string>& vecWstrLocales) {
|
||||
void LocalizationManager::getLocale(std::vector<std::string>& vecWstrLocales) {
|
||||
std::vector<eMCLang> locales;
|
||||
|
||||
const unsigned int systemLanguage = XGetLanguage();
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
#include "minecraft/GameEnums.h"
|
||||
#include "app/common/App_structs.h"
|
||||
#include "minecraft/GameEnums.h"
|
||||
#include "platform/XboxStubs.h"
|
||||
|
||||
class ArchiveFile;
|
||||
|
|
@ -22,7 +22,7 @@ public:
|
|||
const char* getString(int iID) const;
|
||||
|
||||
std::string formatHTMLString(int iPad, const std::string& desc,
|
||||
int shadowColour = 0xFFFFFFFF);
|
||||
int shadowColour = 0xFFFFFFFF);
|
||||
std::string getActionReplacement(int iPad, unsigned char ucAction);
|
||||
std::string getVKReplacement(unsigned int uiVKey);
|
||||
std::string getIconReplacement(unsigned int uiIcon);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
#include "app/common/MenuController.h"
|
||||
|
||||
#include <chrono>
|
||||
#include <cstring>
|
||||
#include <sstream>
|
||||
#include <thread>
|
||||
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/UI/All Platforms/UIEnums.h"
|
||||
#include "app/common/UI/All Platforms/UIStructs.h"
|
||||
|
|
@ -8,24 +13,19 @@
|
|||
#include "app/linux/Linux_UIController.h"
|
||||
#include "minecraft/client/Minecraft.h"
|
||||
#include "minecraft/client/ProgressRenderer.h"
|
||||
#include "minecraft/client/renderer/GameRenderer.h"
|
||||
#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h"
|
||||
#include "minecraft/client/renderer/GameRenderer.h"
|
||||
#include "minecraft/server/MinecraftServer.h"
|
||||
#include "minecraft/world/Container.h"
|
||||
#include "minecraft/world/entity/item/MinecartHopper.h"
|
||||
#include "minecraft/world/entity/player/Player.h"
|
||||
#include "minecraft/world/item/crafting/Recipy.h"
|
||||
#include "minecraft/world/level/storage/ConsoleSaveFileIO/compression.h"
|
||||
#include "minecraft/world/level/tile/Tile.h"
|
||||
#include "minecraft/world/level/tile/entity/HopperTileEntity.h"
|
||||
#include "minecraft/world/level/storage/ConsoleSaveFileIO/compression.h"
|
||||
#include "platform/profile/profile.h"
|
||||
#include "platform/storage/storage.h"
|
||||
|
||||
#include <cstring>
|
||||
#include <sstream>
|
||||
#include <chrono>
|
||||
#include <thread>
|
||||
|
||||
unsigned char MenuController::m_szPNG[8] = {137, 80, 78, 71, 13, 10, 26, 10};
|
||||
|
||||
MenuController::MenuController() {
|
||||
|
|
@ -273,9 +273,9 @@ bool MenuController::loadContainerMenu(int iPad,
|
|||
return success;
|
||||
}
|
||||
|
||||
bool MenuController::loadTrapMenu(
|
||||
int iPad, std::shared_ptr<Container> inventory,
|
||||
std::shared_ptr<DispenserTileEntity> trap) {
|
||||
bool MenuController::loadTrapMenu(int iPad,
|
||||
std::shared_ptr<Container> inventory,
|
||||
std::shared_ptr<DispenserTileEntity> trap) {
|
||||
bool success = true;
|
||||
|
||||
TrapScreenInput* initData = new TrapScreenInput();
|
||||
|
|
@ -294,8 +294,8 @@ bool MenuController::loadTrapMenu(
|
|||
return success;
|
||||
}
|
||||
|
||||
bool MenuController::loadSignEntryMenu(
|
||||
int iPad, std::shared_ptr<SignTileEntity> sign) {
|
||||
bool MenuController::loadSignEntryMenu(int iPad,
|
||||
std::shared_ptr<SignTileEntity> sign) {
|
||||
bool success = true;
|
||||
|
||||
SignEntryScreenInput* initData = new SignEntryScreenInput();
|
||||
|
|
@ -352,9 +352,9 @@ bool MenuController::loadTradingMenu(int iPad,
|
|||
return success;
|
||||
}
|
||||
|
||||
bool MenuController::loadHopperMenu(
|
||||
int iPad, std::shared_ptr<Inventory> inventory,
|
||||
std::shared_ptr<HopperTileEntity> hopper) {
|
||||
bool MenuController::loadHopperMenu(int iPad,
|
||||
std::shared_ptr<Inventory> inventory,
|
||||
std::shared_ptr<HopperTileEntity> hopper) {
|
||||
bool success = true;
|
||||
|
||||
HopperScreenInput* initData = new HopperScreenInput();
|
||||
|
|
@ -371,9 +371,9 @@ bool MenuController::loadHopperMenu(
|
|||
return success;
|
||||
}
|
||||
|
||||
bool MenuController::loadHopperMenu(
|
||||
int iPad, std::shared_ptr<Inventory> inventory,
|
||||
std::shared_ptr<MinecartHopper> hopper) {
|
||||
bool MenuController::loadHopperMenu(int iPad,
|
||||
std::shared_ptr<Inventory> inventory,
|
||||
std::shared_ptr<MinecartHopper> hopper) {
|
||||
bool success = true;
|
||||
|
||||
HopperScreenInput* initData = new HopperScreenInput();
|
||||
|
|
@ -411,9 +411,9 @@ bool MenuController::loadHorseMenu(int iPad,
|
|||
return success;
|
||||
}
|
||||
|
||||
bool MenuController::loadBeaconMenu(
|
||||
int iPad, std::shared_ptr<Inventory> inventory,
|
||||
std::shared_ptr<BeaconTileEntity> beacon) {
|
||||
bool MenuController::loadBeaconMenu(int iPad,
|
||||
std::shared_ptr<Inventory> inventory,
|
||||
std::shared_ptr<BeaconTileEntity> beacon) {
|
||||
bool success = true;
|
||||
|
||||
BeaconScreenInput* initData = new BeaconScreenInput();
|
||||
|
|
@ -633,9 +633,10 @@ void MenuController::getImageTextData(std::uint8_t* imageData,
|
|||
return;
|
||||
}
|
||||
|
||||
unsigned int MenuController::createImageTextData(
|
||||
std::uint8_t* textMetadata, int64_t seed, bool hasSeed,
|
||||
unsigned int uiHostOptions, unsigned int uiTexturePackId) {
|
||||
unsigned int MenuController::createImageTextData(std::uint8_t* textMetadata,
|
||||
int64_t seed, bool hasSeed,
|
||||
unsigned int uiHostOptions,
|
||||
unsigned int uiTexturePackId) {
|
||||
int iTextMetadataBytes = 0;
|
||||
if (hasSeed) {
|
||||
strcpy((char*)textMetadata, "4J_SEED");
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
#include "app/common/App_structs.h"
|
||||
#include "minecraft/XuiActionPayload.h"
|
||||
#include "platform/storage/storage.h"
|
||||
#include "platform/XboxStubs.h"
|
||||
#include "platform/storage/storage.h"
|
||||
|
||||
class Player;
|
||||
class Inventory;
|
||||
|
|
@ -49,8 +49,8 @@ public:
|
|||
bool loadCrafting2x2Menu(int iPad, std::shared_ptr<LocalPlayer> player);
|
||||
bool loadCrafting3x3Menu(int iPad, std::shared_ptr<LocalPlayer> player,
|
||||
int x, int y, int z);
|
||||
bool loadFireworksMenu(int iPad, std::shared_ptr<LocalPlayer> player,
|
||||
int x, int y, int z);
|
||||
bool loadFireworksMenu(int iPad, std::shared_ptr<LocalPlayer> player, int x,
|
||||
int y, int z);
|
||||
bool loadSignEntryMenu(int iPad, std::shared_ptr<SignTileEntity> sign);
|
||||
bool loadRepairingMenu(int iPad, std::shared_ptr<Inventory> inventory,
|
||||
Level* level, int x, int y, int z);
|
||||
|
|
@ -97,18 +97,18 @@ public:
|
|||
eTMSAction getTMSAction(int iPad) { return m_eTMSAction[iPad]; }
|
||||
|
||||
// Dialog callbacks
|
||||
static int texturePackDialogReturned(void* pParam, int iPad,
|
||||
IPlatformStorage::EMessageResult result);
|
||||
static int fatalErrorDialogReturned(void* pParam, int iPad,
|
||||
IPlatformStorage::EMessageResult result);
|
||||
static int texturePackDialogReturned(
|
||||
void* pParam, int iPad, IPlatformStorage::EMessageResult result);
|
||||
static int fatalErrorDialogReturned(
|
||||
void* pParam, int iPad, IPlatformStorage::EMessageResult result);
|
||||
static int trialOverReturned(void* pParam, int iPad,
|
||||
IPlatformStorage::EMessageResult result);
|
||||
static int unlockFullExitReturned(void* pParam, int iPad,
|
||||
IPlatformStorage::EMessageResult result);
|
||||
static int unlockFullSaveReturned(void* pParam, int iPad,
|
||||
IPlatformStorage::EMessageResult result);
|
||||
static int unlockFullInviteReturned(void* pParam, int iPad,
|
||||
IPlatformStorage::EMessageResult result);
|
||||
static int unlockFullInviteReturned(
|
||||
void* pParam, int iPad, IPlatformStorage::EMessageResult result);
|
||||
|
||||
// Remote save
|
||||
static int remoteSaveThreadProc(void* lpParameter);
|
||||
|
|
|
|||
|
|
@ -9,27 +9,17 @@
|
|||
#include <thread>
|
||||
#include <vector>
|
||||
|
||||
#include "platform/input/input.h"
|
||||
#include "platform/profile/profile.h"
|
||||
#include "platform/renderer/renderer.h"
|
||||
#include "platform/storage/storage.h"
|
||||
#include "minecraft/GameEnums.h"
|
||||
#include "Socket.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/GameRules/GameRuleManager.h"
|
||||
#include "minecraft/world/level/GameRules/LevelGenerationOptions.h"
|
||||
#include "minecraft/network/platform/NetworkPlayerInterface.h"
|
||||
#include "app/common/Network/PlatformNetworkManagerStub.h"
|
||||
#include "app/common/UI/All Platforms/UIEnums.h"
|
||||
#include "app/common/UI/All Platforms/UIStructs.h"
|
||||
#include "app/common/UI/Scenes/In-Game Menu Screens/UIScene_PauseMenu.h"
|
||||
#include "app/linux/LinuxGame.h"
|
||||
#include "app/linux/Linux_UIController.h"
|
||||
#include "Socket.h"
|
||||
#include "platform/XboxStubs.h"
|
||||
#include "util/StringHelpers.h"
|
||||
#include "platform/fs/fs.h"
|
||||
#include "minecraft/world/level/storage/ConsoleSaveFileIO/compression.h"
|
||||
#include "java/File.h"
|
||||
#include "minecraft/GameEnums.h"
|
||||
#include "minecraft/client/Minecraft.h"
|
||||
#include "minecraft/client/ProgressRenderer.h"
|
||||
#include "minecraft/client/User.h"
|
||||
|
|
@ -42,16 +32,26 @@
|
|||
#include "minecraft/network/Connection.h"
|
||||
#include "minecraft/network/packet/DisconnectPacket.h"
|
||||
#include "minecraft/network/packet/PreLoginPacket.h"
|
||||
#include "minecraft/network/platform/NetworkPlayerInterface.h"
|
||||
#include "minecraft/server/MinecraftServer.h"
|
||||
#include "minecraft/server/PlayerList.h"
|
||||
#include "minecraft/server/level/ServerPlayer.h"
|
||||
#include "minecraft/server/network/PlayerConnection.h"
|
||||
#include "minecraft/world/entity/Entity.h"
|
||||
#include "minecraft/world/item/crafting/FireworksRecipe.h"
|
||||
#include "minecraft/world/level/GameRules/LevelGenerationOptions.h"
|
||||
#include "minecraft/world/level/Level.h"
|
||||
#include "minecraft/world/level/chunk/storage/OldChunkStorage.h"
|
||||
#include "minecraft/world/level/storage/ConsoleSaveFileIO/compression.h"
|
||||
#include "minecraft/world/level/tile/Tile.h"
|
||||
#include "platform/XboxStubs.h"
|
||||
#include "platform/fs/fs.h"
|
||||
#include "platform/input/input.h"
|
||||
#include "platform/profile/profile.h"
|
||||
#include "platform/renderer/renderer.h"
|
||||
#include "platform/storage/storage.h"
|
||||
#include "strings.h"
|
||||
#include "util/StringHelpers.h"
|
||||
|
||||
class FriendSessionInfo;
|
||||
class INVITE_INFO;
|
||||
|
|
@ -407,8 +407,8 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft* minecraft,
|
|||
// Open the socket on the server end to accept incoming data
|
||||
Socket::addIncomingSocket(socket);
|
||||
|
||||
connection->send(std::shared_ptr<PreLoginPacket>(new PreLoginPacket(
|
||||
PlatformProfile.GetGamertag(idx))));
|
||||
connection->send(std::shared_ptr<PreLoginPacket>(
|
||||
new PreLoginPacket(PlatformProfile.GetGamertag(idx))));
|
||||
|
||||
createdConnections.push_back(connection);
|
||||
|
||||
|
|
@ -626,8 +626,8 @@ void CGameNetworkManager::SetSessionsUpdatedCallback(
|
|||
void CGameNetworkManager::GetFullFriendSessionInfo(
|
||||
FriendSessionInfo* foundSession,
|
||||
std::function<void(bool success)> callback) {
|
||||
s_pPlatformNetworkManager->GetFullFriendSessionInfo(
|
||||
foundSession, std::move(callback));
|
||||
s_pPlatformNetworkManager->GetFullFriendSessionInfo(foundSession,
|
||||
std::move(callback));
|
||||
}
|
||||
|
||||
void CGameNetworkManager::ForceFriendsSessionRefresh() {
|
||||
|
|
@ -723,8 +723,9 @@ int CGameNetworkManager::JoinFromInvite_SignInReturned(void* pParam,
|
|||
Minecraft::GetInstance()->clearConnectionFailed();
|
||||
|
||||
// change the minecraft player name
|
||||
Minecraft::GetInstance()->user->name =
|
||||
PlatformProfile.GetGamertag(PlatformProfile.GetPrimaryPad());
|
||||
Minecraft::GetInstance()->user->name =
|
||||
PlatformProfile.GetGamertag(
|
||||
PlatformProfile.GetPrimaryPad());
|
||||
|
||||
bool success = g_NetworkManager.JoinGameFromInviteInfo(
|
||||
iPad, // dwUserIndex
|
||||
|
|
@ -824,7 +825,8 @@ int CGameNetworkManager::ServerThreadProc(void* lpParameter) {
|
|||
}
|
||||
}
|
||||
|
||||
C4JThread::setThreadName(static_cast<std::uint32_t>(-1), "Minecraft Server thread");
|
||||
C4JThread::setThreadName(static_cast<std::uint32_t>(-1),
|
||||
"Minecraft Server thread");
|
||||
Compression::UseDefaultThreadStorage();
|
||||
OldChunkStorage::UseDefaultThreadStorage();
|
||||
Entity::useSmallIds();
|
||||
|
|
@ -1247,7 +1249,7 @@ void CGameNetworkManager::PlayerJoining(INetworkPlayer* pNetworkPlayer) {
|
|||
void CGameNetworkManager::PlayerLeaving(INetworkPlayer* pNetworkPlayer) {
|
||||
if (pNetworkPlayer->IsLocal()) {
|
||||
PlatformProfile.SetCurrentGameActivity(pNetworkPlayer->GetUserIndex(),
|
||||
CONTEXT_PRESENCE_IDLE, false);
|
||||
CONTEXT_PRESENCE_IDLE, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1290,8 +1292,9 @@ void CGameNetworkManager::GameInviteReceived(int userIndex,
|
|||
bool bContentRestricted = false;
|
||||
bool pccAllowed = true;
|
||||
bool pccFriendsAllowed = true;
|
||||
PlatformProfile.AllowedPlayerCreatedContent(
|
||||
PlatformProfile.GetPrimaryPad(), false, &pccAllowed, &pccFriendsAllowed);
|
||||
PlatformProfile.AllowedPlayerCreatedContent(PlatformProfile.GetPrimaryPad(),
|
||||
false, &pccAllowed,
|
||||
&pccFriendsAllowed);
|
||||
if (!pccAllowed && !pccFriendsAllowed) noUGC = true;
|
||||
|
||||
if (noUGC) {
|
||||
|
|
@ -1307,7 +1310,8 @@ void CGameNetworkManager::GameInviteReceived(int userIndex,
|
|||
|
||||
// 4J-PB - it's possible there is no primary pad here, when accepting an
|
||||
// invite from the dashboard
|
||||
// PlatformStorage.RequestMessageBox( IDS_NO_MULTIPLAYER_PRIVILEGE_TITLE,
|
||||
// PlatformStorage.RequestMessageBox(
|
||||
// IDS_NO_MULTIPLAYER_PRIVILEGE_TITLE,
|
||||
// IDS_NO_MULTIPLAYER_PRIVILEGE_JOIN_TEXT,
|
||||
// uiIDA,1,PlatformProfile.GetPrimaryPad(),nullptr,nullptr,
|
||||
// app.GetStringTable());
|
||||
|
|
@ -1328,9 +1332,7 @@ void CGameNetworkManager::GameInviteReceived(int userIndex,
|
|||
// pInviteInfo;
|
||||
|
||||
// tell the app to process this
|
||||
{
|
||||
app.ProcessInvite(userIndex, localUsersMask, pInviteInfo);
|
||||
}
|
||||
{ app.ProcessInvite(userIndex, localUsersMask, pInviteInfo); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1385,8 +1387,9 @@ void CGameNetworkManager::HandleInviteWhenInMenus(
|
|||
g_NetworkManager.SetLocalGame(false);
|
||||
|
||||
// change the minecraft player name
|
||||
Minecraft::GetInstance()->user->name =
|
||||
PlatformProfile.GetGamertag(PlatformProfile.GetPrimaryPad());
|
||||
Minecraft::GetInstance()->user->name =
|
||||
PlatformProfile.GetGamertag(
|
||||
PlatformProfile.GetPrimaryPad());
|
||||
|
||||
bool success = g_NetworkManager.JoinGameFromInviteInfo(
|
||||
userIndex, localUsersMask, pInviteInfo);
|
||||
|
|
|
|||
|
|
@ -7,14 +7,14 @@
|
|||
#if !defined(__linux__)
|
||||
#include <qnet.h>
|
||||
#endif
|
||||
#include "platform/PlatformTypes.h"
|
||||
#include "PlatformNetworkManagerStub.h"
|
||||
#include "app/common/Network/IPlatformNetwork.h"
|
||||
#include "platform/NetTypes.h"
|
||||
#include "minecraft/network/INetworkService.h"
|
||||
#include "minecraft/network/platform/NetworkPlayerInterface.h"
|
||||
#include "PlatformNetworkManagerStub.h"
|
||||
#include "minecraft/network/platform/SessionInfo.h"
|
||||
#include "platform/C4JThread.h"
|
||||
#include "platform/NetTypes.h"
|
||||
#include "platform/PlatformTypes.h"
|
||||
|
||||
class ClientConnection;
|
||||
class Minecraft;
|
||||
|
|
@ -97,9 +97,8 @@ public:
|
|||
bool GetGameSessionInfo(int iPad, SessionID sessionId,
|
||||
FriendSessionInfo* foundSession);
|
||||
void SetSessionsUpdatedCallback(std::function<void()> callback);
|
||||
void GetFullFriendSessionInfo(
|
||||
FriendSessionInfo* foundSession,
|
||||
std::function<void(bool success)> callback);
|
||||
void GetFullFriendSessionInfo(FriendSessionInfo* foundSession,
|
||||
std::function<void(bool success)> callback);
|
||||
void ForceFriendsSessionRefresh();
|
||||
|
||||
// Session joining and leaving
|
||||
|
|
@ -167,8 +166,7 @@ public:
|
|||
private:
|
||||
void StateChange_AnyToHosting();
|
||||
void StateChange_AnyToJoining();
|
||||
void StateChange_JoiningToIdle(
|
||||
IPlatformNetwork::eJoinFailedReason reason);
|
||||
void StateChange_JoiningToIdle(IPlatformNetwork::eJoinFailedReason reason);
|
||||
void StateChange_AnyToStarting();
|
||||
void StateChange_AnyToEnding(bool bStateWasPlaying);
|
||||
void StateChange_AnyToIdle();
|
||||
|
|
|
|||
|
|
@ -51,8 +51,7 @@ public:
|
|||
virtual bool RemoveLocalPlayerByUserIndex(int userIndex) = 0;
|
||||
[[nodiscard]] virtual INetworkPlayer* GetLocalPlayerByUserIndex(
|
||||
int userIndex) = 0;
|
||||
[[nodiscard]] virtual INetworkPlayer* GetPlayerByIndex(
|
||||
int playerIndex) = 0;
|
||||
[[nodiscard]] virtual INetworkPlayer* GetPlayerByIndex(int playerIndex) = 0;
|
||||
[[nodiscard]] virtual INetworkPlayer* GetPlayerByXuid(PlayerUID xuid) = 0;
|
||||
[[nodiscard]] virtual INetworkPlayer* GetPlayerBySmallId(
|
||||
unsigned char smallId) = 0;
|
||||
|
|
@ -89,9 +88,8 @@ public:
|
|||
|
||||
// Callbacks
|
||||
virtual void RegisterPlayerChangedCallback(
|
||||
int iPad,
|
||||
std::function<void(INetworkPlayer* pPlayer, bool leaving)>
|
||||
callback) = 0;
|
||||
int iPad, std::function<void(INetworkPlayer* pPlayer, bool leaving)>
|
||||
callback) = 0;
|
||||
virtual void UnRegisterPlayerChangedCallback(int iPad) = 0;
|
||||
|
||||
virtual void HandleSignInChange() = 0;
|
||||
|
|
@ -112,7 +110,7 @@ public:
|
|||
// System flags
|
||||
virtual void SystemFlagSet(INetworkPlayer* pNetworkPlayer, int index) = 0;
|
||||
[[nodiscard]] virtual bool SystemFlagGet(INetworkPlayer* pNetworkPlayer,
|
||||
int index) = 0;
|
||||
int index) = 0;
|
||||
|
||||
// Stats
|
||||
[[nodiscard]] virtual std::string GatherStats() = 0;
|
||||
|
|
@ -128,8 +126,7 @@ public:
|
|||
int iPad, int localPlayers, bool partyOnly) = 0;
|
||||
[[nodiscard]] virtual bool GetGameSessionInfo(
|
||||
int iPad, SessionID sessionId, FriendSessionInfo* foundSession) = 0;
|
||||
virtual void SetSessionsUpdatedCallback(
|
||||
std::function<void()> callback) = 0;
|
||||
virtual void SetSessionsUpdatedCallback(std::function<void()> callback) = 0;
|
||||
virtual void GetFullFriendSessionInfo(
|
||||
FriendSessionInfo* foundSession,
|
||||
std::function<void(bool success)> callback) = 0;
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
#include <limits.h>
|
||||
|
||||
#include "platform/NetTypes.h"
|
||||
#include "java/System.h"
|
||||
#include "platform/NetTypes.h"
|
||||
|
||||
NetworkPlayerQNet::NetworkPlayerQNet(IQNetPlayer* qnetPlayer) {
|
||||
m_qnetPlayer = qnetPlayer;
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "platform/PlatformTypes.h"
|
||||
#include "minecraft/network/platform/NetworkPlayerInterface.h"
|
||||
#include "platform/PlatformTypes.h"
|
||||
|
||||
class IQNetPlayer;
|
||||
class Socket;
|
||||
|
|
|
|||
|
|
@ -5,11 +5,11 @@
|
|||
#if !defined(__linux__)
|
||||
#include <qnet.h>
|
||||
#endif
|
||||
#include "platform/NetTypes.h"
|
||||
#include "minecraft/client/model/SkinBox.h"
|
||||
#include "minecraft/network/platform/NetworkPlayerInterface.h"
|
||||
#include "minecraft/network/platform/SessionInfo.h"
|
||||
#include "platform/C4JThread.h"
|
||||
#include "platform/NetTypes.h"
|
||||
|
||||
class ClientConnection;
|
||||
class Minecraft;
|
||||
|
|
@ -87,9 +87,8 @@ public:
|
|||
virtual void ResetLeavingGame() = 0;
|
||||
|
||||
virtual void RegisterPlayerChangedCallback(
|
||||
int iPad,
|
||||
std::function<void(INetworkPlayer* pPlayer, bool leaving)>
|
||||
callback) = 0;
|
||||
int iPad, std::function<void(INetworkPlayer* pPlayer, bool leaving)>
|
||||
callback) = 0;
|
||||
virtual void UnRegisterPlayerChangedCallback(int iPad) = 0;
|
||||
|
||||
virtual void HandleSignInChange() = 0;
|
||||
|
|
@ -128,8 +127,7 @@ public:
|
|||
bool partyOnly) = 0;
|
||||
virtual bool GetGameSessionInfo(int iPad, SessionID sessionId,
|
||||
FriendSessionInfo* foundSession) = 0;
|
||||
virtual void SetSessionsUpdatedCallback(
|
||||
std::function<void()> callback) = 0;
|
||||
virtual void SetSessionsUpdatedCallback(std::function<void()> callback) = 0;
|
||||
virtual void GetFullFriendSessionInfo(
|
||||
FriendSessionInfo* foundSession,
|
||||
std::function<void(bool success)> callback) = 0;
|
||||
|
|
|
|||
|
|
@ -5,13 +5,13 @@
|
|||
|
||||
#include <compare>
|
||||
|
||||
#include "app/common/Network/GameNetworkManager.h"
|
||||
#include "minecraft/network/platform/NetworkPlayerInterface.h"
|
||||
#include "app/linux/LinuxGame.h"
|
||||
#include "platform/NetTypes.h"
|
||||
#include "NetworkPlayerQNet.h"
|
||||
#include "Socket.h"
|
||||
#include "app/common/Network/GameNetworkManager.h"
|
||||
#include "app/linux/LinuxGame.h"
|
||||
#include "minecraft/network/platform/NetworkPlayerInterface.h"
|
||||
#include "platform/C4JThread.h"
|
||||
#include "platform/NetTypes.h"
|
||||
|
||||
IPlatformNetworkStub* g_pPlatformNetworkManager;
|
||||
|
||||
|
|
@ -107,8 +107,8 @@ void IPlatformNetworkStub::NotifyPlayerJoined(IQNetPlayer* pQNetPlayer) {
|
|||
}
|
||||
}
|
||||
|
||||
bool IPlatformNetworkStub::Initialise(
|
||||
CGameNetworkManager* pGameNetworkManager, int flagIndexSize) {
|
||||
bool IPlatformNetworkStub::Initialise(CGameNetworkManager* pGameNetworkManager,
|
||||
int flagIndexSize) {
|
||||
m_pGameNetworkManager = pGameNetworkManager;
|
||||
m_flagIndexSize = flagIndexSize;
|
||||
g_pPlatformNetworkManager = this;
|
||||
|
|
@ -152,8 +152,7 @@ int IPlatformNetworkStub::GetJoiningReadyPercentage() { return 100; }
|
|||
|
||||
int IPlatformNetworkStub::CorrectErrorIDS(int IDS) { return IDS; }
|
||||
|
||||
bool IPlatformNetworkStub::isSystemPrimaryPlayer(
|
||||
IQNetPlayer* pQNetPlayer) {
|
||||
bool IPlatformNetworkStub::isSystemPrimaryPlayer(IQNetPlayer* pQNetPlayer) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -165,9 +164,7 @@ int IPlatformNetworkStub::GetPlayerCount() {
|
|||
return m_pIQNet->GetPlayerCount();
|
||||
}
|
||||
|
||||
bool IPlatformNetworkStub::ShouldMessageForFullSession() {
|
||||
return false;
|
||||
}
|
||||
bool IPlatformNetworkStub::ShouldMessageForFullSession() { return false; }
|
||||
|
||||
int IPlatformNetworkStub::GetOnlinePlayerCount() { return 1; }
|
||||
|
||||
|
|
@ -186,8 +183,7 @@ bool IPlatformNetworkStub::RemoveLocalPlayerByUserIndex(int userIndex) {
|
|||
|
||||
bool IPlatformNetworkStub::IsInStatsEnabledSession() { return true; }
|
||||
|
||||
bool IPlatformNetworkStub::SessionHasSpace(
|
||||
unsigned int spaceRequired /*= 1*/) {
|
||||
bool IPlatformNetworkStub::SessionHasSpace(unsigned int spaceRequired /*= 1*/) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -209,8 +205,7 @@ bool IPlatformNetworkStub::LeaveGame(bool bMigrateHost) {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool IPlatformNetworkStub::_LeaveGame(bool bMigrateHost,
|
||||
bool bLeaveRoom) {
|
||||
bool IPlatformNetworkStub::_LeaveGame(bool bMigrateHost, bool bLeaveRoom) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -242,8 +237,7 @@ void IPlatformNetworkStub::_HostGame(
|
|||
bool IPlatformNetworkStub::_StartGame() { return true; }
|
||||
|
||||
int IPlatformNetworkStub::JoinGame(FriendSessionInfo* searchResult,
|
||||
int localUsersMask,
|
||||
int primaryUserIndex) {
|
||||
int localUsersMask, int primaryUserIndex) {
|
||||
return CGameNetworkManager::JOINGAME_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
@ -319,8 +313,7 @@ void IPlatformNetworkStub::UpdateAndSetGameSessionData(
|
|||
// app.GetGameHostOption(eGameHostOption_All);
|
||||
}
|
||||
|
||||
int IPlatformNetworkStub::RemovePlayerOnSocketClosedThreadProc(
|
||||
void* lpParam) {
|
||||
int IPlatformNetworkStub::RemovePlayerOnSocketClosedThreadProc(void* lpParam) {
|
||||
INetworkPlayer* pNetworkPlayer = (INetworkPlayer*)lpParam;
|
||||
|
||||
Socket* socket = pNetworkPlayer->GetSocket();
|
||||
|
|
@ -338,13 +331,12 @@ int IPlatformNetworkStub::RemovePlayerOnSocketClosedThreadProc(
|
|||
return g_pPlatformNetworkManager->RemoveLocalPlayer(pNetworkPlayer);
|
||||
}
|
||||
|
||||
bool IPlatformNetworkStub::RemoveLocalPlayer(
|
||||
INetworkPlayer* pNetworkPlayer) {
|
||||
bool IPlatformNetworkStub::RemoveLocalPlayer(INetworkPlayer* pNetworkPlayer) {
|
||||
return true;
|
||||
}
|
||||
|
||||
IPlatformNetworkStub::PlayerFlags::PlayerFlags(
|
||||
INetworkPlayer* pNetworkPlayer, unsigned int count) {
|
||||
IPlatformNetworkStub::PlayerFlags::PlayerFlags(INetworkPlayer* pNetworkPlayer,
|
||||
unsigned int count) {
|
||||
// 4J Stu - Don't assert, just make it a multiple of 8! This count is
|
||||
// calculated from a load of separate values, and makes tweaking
|
||||
// world/render sizes a pain if we hit an assert here
|
||||
|
|
@ -359,8 +351,7 @@ IPlatformNetworkStub::PlayerFlags::~PlayerFlags() { delete[] flags; }
|
|||
|
||||
// Add a player to the per system flag storage - if we've already got a player
|
||||
// from that system, copy its flags over
|
||||
void IPlatformNetworkStub::SystemFlagAddPlayer(
|
||||
INetworkPlayer* pNetworkPlayer) {
|
||||
void IPlatformNetworkStub::SystemFlagAddPlayer(INetworkPlayer* pNetworkPlayer) {
|
||||
PlayerFlags* newPlayerFlags =
|
||||
new PlayerFlags(pNetworkPlayer, m_flagIndexSize);
|
||||
// If any of our existing players are on the same system, then copy over
|
||||
|
|
@ -399,7 +390,7 @@ void IPlatformNetworkStub::SystemFlagReset() {
|
|||
// Set a per system flag - this is done by setting the flag on every player that
|
||||
// shares that system
|
||||
void IPlatformNetworkStub::SystemFlagSet(INetworkPlayer* pNetworkPlayer,
|
||||
int index) {
|
||||
int index) {
|
||||
if ((index < 0) || (index >= m_flagIndexSize)) return;
|
||||
if (pNetworkPlayer == nullptr) return;
|
||||
|
||||
|
|
@ -414,7 +405,7 @@ void IPlatformNetworkStub::SystemFlagSet(INetworkPlayer* pNetworkPlayer,
|
|||
// player as anything else sent to that system should also have been duplicated
|
||||
// here
|
||||
bool IPlatformNetworkStub::SystemFlagGet(INetworkPlayer* pNetworkPlayer,
|
||||
int index) {
|
||||
int index) {
|
||||
if ((index < 0) || (index >= m_flagIndexSize)) return false;
|
||||
if (pNetworkPlayer == nullptr) {
|
||||
return false;
|
||||
|
|
@ -505,8 +496,7 @@ INetworkPlayer* IPlatformNetworkStub::addNetworkPlayer(
|
|||
return pNetworkPlayer;
|
||||
}
|
||||
|
||||
void IPlatformNetworkStub::removeNetworkPlayer(
|
||||
IQNetPlayer* pQNetPlayer) {
|
||||
void IPlatformNetworkStub::removeNetworkPlayer(IQNetPlayer* pQNetPlayer) {
|
||||
INetworkPlayer* pNetworkPlayer = getNetworkPlayer(pQNetPlayer);
|
||||
for (auto it = currentNetworkPlayers.begin();
|
||||
it != currentNetworkPlayers.end(); it++) {
|
||||
|
|
@ -523,8 +513,7 @@ INetworkPlayer* IPlatformNetworkStub::getNetworkPlayer(
|
|||
: nullptr;
|
||||
}
|
||||
|
||||
INetworkPlayer* IPlatformNetworkStub::GetLocalPlayerByUserIndex(
|
||||
int userIndex) {
|
||||
INetworkPlayer* IPlatformNetworkStub::GetLocalPlayerByUserIndex(int userIndex) {
|
||||
return getNetworkPlayer(m_pIQNet->GetLocalPlayerByUserIndex(userIndex));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "platform/PlatformTypes.h"
|
||||
#include "platform/NetTypes.h"
|
||||
#include "minecraft/client/model/SkinBox.h"
|
||||
#include "platform/XboxStubs.h"
|
||||
#include "minecraft/network/platform/NetworkPlayerInterface.h"
|
||||
#include "app/common/Network/IPlatformNetwork.h"
|
||||
#include "minecraft/client/model/SkinBox.h"
|
||||
#include "minecraft/network/platform/NetworkPlayerInterface.h"
|
||||
#include "minecraft/network/platform/SessionInfo.h"
|
||||
#include "platform/C4JThread.h"
|
||||
#include "platform/NetTypes.h"
|
||||
#include "platform/PlatformTypes.h"
|
||||
#include "platform/XboxStubs.h"
|
||||
|
||||
class C4JThread;
|
||||
class CGameNetworkManager;
|
||||
|
|
@ -67,8 +67,7 @@ public:
|
|||
|
||||
virtual void RegisterPlayerChangedCallback(
|
||||
int iPad,
|
||||
std::function<void(INetworkPlayer* pPlayer, bool leaving)>
|
||||
callback);
|
||||
std::function<void(INetworkPlayer* pPlayer, bool leaving)> callback);
|
||||
virtual void UnRegisterPlayerChangedCallback(int iPad);
|
||||
|
||||
virtual void HandleSignInChange();
|
||||
|
|
@ -184,8 +183,7 @@ public:
|
|||
bool partyOnly);
|
||||
virtual bool GetGameSessionInfo(int iPad, SessionID sessionId,
|
||||
FriendSessionInfo* foundSession);
|
||||
virtual void SetSessionsUpdatedCallback(
|
||||
std::function<void()> callback);
|
||||
virtual void SetSessionsUpdatedCallback(std::function<void()> callback);
|
||||
virtual void GetFullFriendSessionInfo(
|
||||
FriendSessionInfo* foundSession,
|
||||
std::function<void(bool success)> callback);
|
||||
|
|
|
|||
|
|
@ -7,11 +7,11 @@
|
|||
#include <vector>
|
||||
|
||||
// 4jcraft TODO
|
||||
#include "platform/ShutdownManager.h"
|
||||
#include "app/common/Network/GameNetworkManager.h"
|
||||
#include "minecraft/network/platform/NetworkPlayerInterface.h"
|
||||
#include "platform/NetTypes.h"
|
||||
#include "minecraft/server/network/ServerConnection.h"
|
||||
#include "platform/NetTypes.h"
|
||||
#include "platform/ShutdownManager.h"
|
||||
|
||||
class SocketAddress {};
|
||||
|
||||
|
|
|
|||
|
|
@ -11,10 +11,10 @@
|
|||
#include <queue>
|
||||
|
||||
#include "app/common/Network/GameNetworkManager.h"
|
||||
#include "minecraft/network/platform/NetworkPlayerInterface.h"
|
||||
#include "platform/C4JThread.h"
|
||||
#include "java/InputOutputStream/InputStream.h"
|
||||
#include "java/InputOutputStream/OutputStream.h"
|
||||
#include "minecraft/network/platform/NetworkPlayerInterface.h"
|
||||
#include "platform/C4JThread.h"
|
||||
|
||||
class INetworkPlayer;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@
|
|||
#include <cstdint>
|
||||
|
||||
#include "app/common/App_structs.h"
|
||||
#include "platform/NetTypes.h"
|
||||
#include "platform/storage/storage.h"
|
||||
#include "platform/XboxStubs.h"
|
||||
#include "minecraft/network/packet/DisconnectPacket.h"
|
||||
#include "platform/NetTypes.h"
|
||||
#include "platform/XboxStubs.h"
|
||||
#include "platform/storage/storage.h"
|
||||
|
||||
struct INVITE_INFO;
|
||||
|
||||
|
|
@ -32,10 +32,10 @@ public:
|
|||
unsigned int uiSignInData);
|
||||
static void clearSignInChangeUsersMask();
|
||||
static int signoutExitWorldThreadProc(void* lpParameter);
|
||||
static int primaryPlayerSignedOutReturned(void* pParam, int iPad,
|
||||
const IPlatformStorage::EMessageResult);
|
||||
static int ethernetDisconnectReturned(void* pParam, int iPad,
|
||||
const IPlatformStorage::EMessageResult);
|
||||
static int primaryPlayerSignedOutReturned(
|
||||
void* pParam, int iPad, const IPlatformStorage::EMessageResult);
|
||||
static int ethernetDisconnectReturned(
|
||||
void* pParam, int iPad, const IPlatformStorage::EMessageResult);
|
||||
static void profileReadErrorCallback(void* pParam);
|
||||
|
||||
// Notifications
|
||||
|
|
|
|||
|
|
@ -1,17 +1,16 @@
|
|||
#include "app/linux/LinuxGame.h"
|
||||
#include "app/common/SaveManager.h"
|
||||
|
||||
#include <chrono>
|
||||
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/Network/GameNetworkManager.h"
|
||||
#include "app/linux/LinuxGame.h"
|
||||
#include "minecraft/server/MinecraftServer.h"
|
||||
#include "platform/profile/profile.h"
|
||||
|
||||
void SaveManager::setAutosaveTimerTime(int settingValue) {
|
||||
m_uiAutosaveTimer =
|
||||
time_util::clock::now() +
|
||||
std::chrono::minutes(settingValue * 15);
|
||||
time_util::clock::now() + std::chrono::minutes(settingValue * 15);
|
||||
}
|
||||
|
||||
bool SaveManager::autosaveDue() const {
|
||||
|
|
|
|||
|
|
@ -1,21 +1,22 @@
|
|||
#include "app/common/SkinManager.h"
|
||||
|
||||
#include <wchar.h>
|
||||
|
||||
#include <mutex>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <wchar.h>
|
||||
|
||||
#include "app/common/App_structs.h"
|
||||
#include "app/common/DLC/DLCManager.h"
|
||||
#include "app/common/DLC/DLCPack.h"
|
||||
#include "app/common/DLC/DLCSkinFile.h"
|
||||
#include "minecraft/Minecraft_Macros.h"
|
||||
#include "app/linux/LinuxGame.h"
|
||||
#include "minecraft/Minecraft_Macros.h"
|
||||
#include "minecraft/client/Minecraft.h"
|
||||
#include "minecraft/client/model/geom/Model.h"
|
||||
#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h"
|
||||
#include "minecraft/client/renderer/entity/EntityRenderer.h"
|
||||
#include "minecraft/client/renderer/entity/EntityRenderDispatcher.h"
|
||||
#include "minecraft/client/renderer/entity/EntityRenderer.h"
|
||||
#include "minecraft/world/entity/player/Player.h"
|
||||
#include "platform/profile/profile.h"
|
||||
|
||||
|
|
@ -44,7 +45,7 @@ void SkinManager::setPlayerSkin(int iPad, std::uint32_t dwSkinId,
|
|||
}
|
||||
|
||||
std::string SkinManager::getPlayerSkinName(int iPad,
|
||||
GAME_SETTINGS** gameSettingsA) {
|
||||
GAME_SETTINGS** gameSettingsA) {
|
||||
return getSkinPathFromId(gameSettingsA[iPad]->dwSelectedSkin);
|
||||
}
|
||||
|
||||
|
|
@ -104,7 +105,7 @@ void SkinManager::setPlayerCape(int iPad, std::uint32_t dwCapeId,
|
|||
}
|
||||
|
||||
std::string SkinManager::getPlayerCapeName(int iPad,
|
||||
GAME_SETTINGS** gameSettingsA) {
|
||||
GAME_SETTINGS** gameSettingsA) {
|
||||
return Player::getCapePathFromId(gameSettingsA[iPad]->dwSelectedCape);
|
||||
}
|
||||
|
||||
|
|
@ -122,8 +123,8 @@ void SkinManager::setPlayerFavoriteSkin(int iPad, int iIndex,
|
|||
gameSettingsA[iPad]->bSettingsChanged = true;
|
||||
}
|
||||
|
||||
unsigned int SkinManager::getPlayerFavoriteSkin(
|
||||
int iPad, int iIndex, GAME_SETTINGS** gameSettingsA) {
|
||||
unsigned int SkinManager::getPlayerFavoriteSkin(int iPad, int iIndex,
|
||||
GAME_SETTINGS** gameSettingsA) {
|
||||
return gameSettingsA[iPad]->uiFavoriteSkinA[iIndex];
|
||||
}
|
||||
|
||||
|
|
@ -151,8 +152,7 @@ unsigned int SkinManager::getPlayerFavoriteSkinsCount(
|
|||
return uiCount;
|
||||
}
|
||||
|
||||
void SkinManager::validateFavoriteSkins(int iPad,
|
||||
GAME_SETTINGS** gameSettingsA,
|
||||
void SkinManager::validateFavoriteSkins(int iPad, GAME_SETTINGS** gameSettingsA,
|
||||
DLCManager& dlcManager) {
|
||||
unsigned int uiCount = getPlayerFavoriteSkinsCount(iPad, gameSettingsA);
|
||||
|
||||
|
|
@ -203,7 +203,7 @@ void SkinManager::addMemoryTextureFile(const std::string& wName,
|
|||
if (it != m_MEM_Files.end()) {
|
||||
#if !defined(_CONTENT_PACKAGE)
|
||||
printf("Incrementing the memory texture file count for %s\n",
|
||||
wName.c_str());
|
||||
wName.c_str());
|
||||
#endif
|
||||
pData = (*it).second;
|
||||
|
||||
|
|
@ -233,14 +233,14 @@ void SkinManager::removeMemoryTextureFile(const std::string& wName) {
|
|||
if (it != m_MEM_Files.end()) {
|
||||
#if !defined(_CONTENT_PACKAGE)
|
||||
printf("Decrementing the memory texture file count for %s\n",
|
||||
wName.c_str());
|
||||
wName.c_str());
|
||||
#endif
|
||||
PMEMDATA pData = (*it).second;
|
||||
--pData->ucRefCount;
|
||||
if (pData->ucRefCount <= 0) {
|
||||
#if !defined(_CONTENT_PACKAGE)
|
||||
printf("Erasing the memory texture file data for %s\n",
|
||||
wName.c_str());
|
||||
wName.c_str());
|
||||
#endif
|
||||
delete pData;
|
||||
m_MEM_Files.erase(wName);
|
||||
|
|
|
|||
|
|
@ -38,13 +38,13 @@ public:
|
|||
void setPlayerFavoriteSkin(int iPad, int iIndex, unsigned int uiSkinID,
|
||||
GAME_SETTINGS** gameSettingsA);
|
||||
unsigned int getPlayerFavoriteSkin(int iPad, int iIndex,
|
||||
GAME_SETTINGS** gameSettingsA);
|
||||
GAME_SETTINGS** gameSettingsA);
|
||||
unsigned char getPlayerFavoriteSkinsPos(int iPad,
|
||||
GAME_SETTINGS** gameSettingsA);
|
||||
GAME_SETTINGS** gameSettingsA);
|
||||
void setPlayerFavoriteSkinsPos(int iPad, int iPos,
|
||||
GAME_SETTINGS** gameSettingsA);
|
||||
unsigned int getPlayerFavoriteSkinsCount(int iPad,
|
||||
GAME_SETTINGS** gameSettingsA);
|
||||
GAME_SETTINGS** gameSettingsA);
|
||||
void validateFavoriteSkins(int iPad, GAME_SETTINGS** gameSettingsA,
|
||||
DLCManager& dlcManager);
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
#include <vector>
|
||||
|
||||
#include "minecraft/GameEnums.h"
|
||||
#include "app/common/App_structs.h"
|
||||
#include "minecraft/GameEnums.h"
|
||||
|
||||
class TerrainFeatureManager {
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
#include <memory>
|
||||
|
||||
#include "minecraft/network/platform/NetworkPlayerInterface.h"
|
||||
#include "app/common/Tutorial/Constraints/TutorialConstraint.h"
|
||||
#include "app/common/Tutorial/Tutorial.h"
|
||||
#include "app/common/Tutorial/TutorialEnum.h"
|
||||
|
|
@ -10,6 +9,7 @@
|
|||
#include "minecraft/client/multiplayer/ClientConnection.h"
|
||||
#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h"
|
||||
#include "minecraft/network/packet/PlayerInfoPacket.h"
|
||||
#include "minecraft/network/platform/NetworkPlayerInterface.h"
|
||||
#include "minecraft/world/entity/player/Abilities.h"
|
||||
#include "minecraft/world/entity/player/Player.h"
|
||||
#include "minecraft/world/level/LevelSettings.h"
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
#include <cstddef>
|
||||
|
||||
#include "app/common/Tutorial/TutorialEnum.h"
|
||||
#include "TutorialConstraint.h"
|
||||
#include "app/common/Tutorial/TutorialEnum.h"
|
||||
#include "minecraft/world/phys/AABB.h"
|
||||
|
||||
class AABB;
|
||||
|
|
|
|||
|
|
@ -290,8 +290,7 @@ FullTutorial::FullTutorial(int iPad, bool isTrial /*= false*/)
|
|||
IDS_TUTORIAL_TASK_CREATE_TORCH));
|
||||
|
||||
if (app.getGameRuleDefinitions() != nullptr) {
|
||||
AABB* area =
|
||||
app.getGameRuleDefinitions()->getNamedArea("tutorialArea");
|
||||
AABB* area = app.getGameRuleDefinitions()->getNamedArea("tutorialArea");
|
||||
if (area != nullptr) {
|
||||
std::vector<TutorialConstraint*>* areaConstraints =
|
||||
new std::vector<TutorialConstraint*>();
|
||||
|
|
@ -506,8 +505,7 @@ FullTutorial::FullTutorial(int iPad, bool isTrial /*= false*/)
|
|||
*
|
||||
*/
|
||||
if (app.getGameRuleDefinitions() != nullptr) {
|
||||
AABB* area =
|
||||
app.getGameRuleDefinitions()->getNamedArea("minecartArea");
|
||||
AABB* area = app.getGameRuleDefinitions()->getNamedArea("minecartArea");
|
||||
if (area != nullptr) {
|
||||
addHint(e_Tutorial_State_Gameplay,
|
||||
new AreaHint(e_Tutorial_Hint_Always_On, this,
|
||||
|
|
@ -680,8 +678,7 @@ FullTutorial::FullTutorial(int iPad, bool isTrial /*= false*/)
|
|||
*
|
||||
*/
|
||||
if (app.getGameRuleDefinitions() != nullptr) {
|
||||
AABB* area =
|
||||
app.getGameRuleDefinitions()->getNamedArea("creativeArea");
|
||||
AABB* area = app.getGameRuleDefinitions()->getNamedArea("creativeArea");
|
||||
if (area != nullptr) {
|
||||
eTutorial_State creativeStates[] = {e_Tutorial_State_Gameplay};
|
||||
AddGlobalConstraint(new ChangeStateConstraint(
|
||||
|
|
@ -1195,8 +1192,7 @@ FullTutorial::FullTutorial(int iPad, bool isTrial /*= false*/)
|
|||
*
|
||||
*/
|
||||
if (app.getGameRuleDefinitions() != nullptr) {
|
||||
AABB* area =
|
||||
app.getGameRuleDefinitions()->getNamedArea("breedingArea");
|
||||
AABB* area = app.getGameRuleDefinitions()->getNamedArea("breedingArea");
|
||||
if (area != nullptr) {
|
||||
eTutorial_State breedingStates[] = {e_Tutorial_State_Gameplay};
|
||||
AddGlobalConstraint(new ChangeStateConstraint(
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
#include "app/common/Tutorial/TutorialEnum.h"
|
||||
#include "Tutorial.h"
|
||||
#include "app/common/Tutorial/TutorialEnum.h"
|
||||
|
||||
#define FULL_TUTORIAL_PROGRESS_2_X_2_Crafting 1
|
||||
#define FULL_TUTORIAL_PROGRESS_3_X_3_Crafting 2
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "app/common/Tutorial/TutorialEnum.h"
|
||||
#include "TutorialHint.h"
|
||||
#include "app/common/Tutorial/TutorialEnum.h"
|
||||
#include "minecraft/world/phys/AABB.h"
|
||||
|
||||
class AABB;
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ int DiggerItemHint::attack(std::shared_ptr<ItemInstance> item,
|
|||
if (itemFound) {
|
||||
// It's also possible that we could hit TileEntities (eg falling
|
||||
// sand) so don't want to give this hint then
|
||||
if (entity->instanceof(eTYPE_MOB)) {
|
||||
if (entity->instanceof (eTYPE_MOB)) {
|
||||
return IDS_TUTORIAL_HINT_ATTACK_WITH_TOOL;
|
||||
} else {
|
||||
return -1;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "app/common/Tutorial/TutorialEnum.h"
|
||||
#include "TutorialHint.h"
|
||||
#include "app/common/Tutorial/TutorialEnum.h"
|
||||
|
||||
class DiggerItem;
|
||||
class Level;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
#pragma once
|
||||
// using namespace std;
|
||||
|
||||
#include "app/common/Tutorial/TutorialEnum.h"
|
||||
#include "TutorialHint.h"
|
||||
#include "app/common/Tutorial/TutorialEnum.h"
|
||||
#include "java/Class.h"
|
||||
|
||||
class ItemInstance;
|
||||
|
|
@ -17,7 +17,7 @@ public:
|
|||
LookAtEntityHint(eTutorial_Hint id, Tutorial* tutorial, int descriptionId,
|
||||
int titleId, eINSTANCEOF type);
|
||||
// TODO: 4jcraft added, this was not implemented
|
||||
~LookAtEntityHint() {};
|
||||
~LookAtEntityHint(){};
|
||||
|
||||
virtual bool onLookAtEntity(eINSTANCEOF type);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
#pragma once
|
||||
// using namespace std;
|
||||
|
||||
#include "app/common/Tutorial/TutorialEnum.h"
|
||||
#include "TutorialHint.h"
|
||||
#include "app/common/Tutorial/TutorialEnum.h"
|
||||
|
||||
class ItemInstance;
|
||||
class Tutorial;
|
||||
|
|
@ -20,7 +20,7 @@ public:
|
|||
unsigned int tilesLength, int iconOverride = -1,
|
||||
int iData = -1, int iDataOverride = -1);
|
||||
// TODO: 4jcraft, added, destructor was never implemented
|
||||
~LookAtTileHint() {};
|
||||
~LookAtTileHint(){};
|
||||
|
||||
virtual bool onLookAt(int id, int iData = 0);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
#pragma once
|
||||
// using namespace std;
|
||||
|
||||
#include "app/common/Tutorial/TutorialEnum.h"
|
||||
#include "TutorialHint.h"
|
||||
#include "app/common/Tutorial/TutorialEnum.h"
|
||||
|
||||
class ItemInstance;
|
||||
class Tutorial;
|
||||
|
|
@ -16,7 +16,7 @@ public:
|
|||
TakeItemHint(eTutorial_Hint id, Tutorial* tutorial, int items[],
|
||||
unsigned int itemsLength);
|
||||
// TODO: 4jcraft, added, it was never implemented
|
||||
virtual ~TakeItemHint() {};
|
||||
virtual ~TakeItemHint(){};
|
||||
|
||||
virtual bool onTake(std::shared_ptr<ItemInstance> item);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
#include <format>
|
||||
#include <vector>
|
||||
|
||||
#include "app/common/Tutorial/TutorialEnum.h"
|
||||
#include "TutorialTask.h"
|
||||
#include "app/common/Tutorial/TutorialEnum.h"
|
||||
|
||||
class Tutorial;
|
||||
class TutorialConstraint;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "platform/input/input.h"
|
||||
#include "app/common/Tutorial/Constraints/InputConstraint.h"
|
||||
#include "app/common/Tutorial/Tasks/TutorialTask.h"
|
||||
#include "app/common/Tutorial/Tutorial.h"
|
||||
|
|
@ -12,6 +11,7 @@
|
|||
#include "minecraft/client/Minecraft.h"
|
||||
#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h"
|
||||
#include "minecraft/world/level/material/Material.h"
|
||||
#include "platform/input/input.h"
|
||||
|
||||
ChoiceTask::ChoiceTask(
|
||||
Tutorial* tutorial, int descriptionId, int promptId /*= -1*/,
|
||||
|
|
@ -55,12 +55,12 @@ bool ChoiceTask::isCompleted() {
|
|||
|
||||
if (!m_bConfirmMappingComplete &&
|
||||
PlatformInput.GetValue(pMinecraft->player->GetXboxPad(),
|
||||
m_iConfirmMapping) > 0) {
|
||||
m_iConfirmMapping) > 0) {
|
||||
m_bConfirmMappingComplete = true;
|
||||
}
|
||||
if (!m_bCancelMappingComplete &&
|
||||
PlatformInput.GetValue(pMinecraft->player->GetXboxPad(),
|
||||
m_iCancelMapping) > 0) {
|
||||
m_iCancelMapping) > 0) {
|
||||
m_bCancelMappingComplete = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
#pragma once
|
||||
// using namespace std;
|
||||
|
||||
#include "app/common/Tutorial/TutorialEnum.h"
|
||||
#include "TutorialTask.h"
|
||||
#include "app/common/Tutorial/TutorialEnum.h"
|
||||
|
||||
class Tutorial;
|
||||
|
||||
|
|
|
|||
|
|
@ -6,13 +6,13 @@
|
|||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "platform/input/input.h"
|
||||
#include "minecraft/GameEnums.h"
|
||||
#include "app/common/Tutorial/Constraints/InputConstraint.h"
|
||||
#include "app/common/Tutorial/Tasks/TutorialTask.h"
|
||||
#include "app/linux/LinuxGame.h"
|
||||
#include "minecraft/GameEnums.h"
|
||||
#include "minecraft/client/Minecraft.h"
|
||||
#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h"
|
||||
#include "platform/input/input.h"
|
||||
|
||||
class Tutorial;
|
||||
|
||||
|
|
@ -82,7 +82,7 @@ bool ControllerTask::isCompleted() {
|
|||
it != southpawCompletedMappings.end(); ++it) {
|
||||
if (!it->second) {
|
||||
if (PlatformInput.GetValue(pMinecraft->player->GetXboxPad(),
|
||||
it->first) > 0) {
|
||||
it->first) > 0) {
|
||||
it->second = true;
|
||||
m_uiCompletionMask |= 1 << iCurrent;
|
||||
} else {
|
||||
|
|
@ -96,7 +96,7 @@ bool ControllerTask::isCompleted() {
|
|||
++it) {
|
||||
if (!it->second) {
|
||||
if (PlatformInput.GetValue(pMinecraft->player->GetXboxPad(),
|
||||
it->first) > 0) {
|
||||
it->first) > 0) {
|
||||
it->second = true;
|
||||
m_uiCompletionMask |= 1 << iCurrent;
|
||||
} else {
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue