mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-06-09 23:22:50 +00:00
refactor: decouple minecraft/ from app/ via IGameServices virtual interface
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
#include "minecraft/GameServices.h"
|
||||
#include "minecraft/util/DebugSettings.h"
|
||||
#include "minecraft/GameHostOptions.h"
|
||||
#include "minecraft/IGameServices.h"
|
||||
#include "minecraft/util/Log.h"
|
||||
#include "minecraft/world/level/storage/ConsoleSaveFileIO/ConsoleSaveFileSplit.h"
|
||||
|
||||
@@ -18,7 +16,7 @@
|
||||
#include <utility>
|
||||
|
||||
#include "platform/PlatformTypes.h"
|
||||
#include "app/common/App_enums.h"
|
||||
#include "minecraft/GameEnums.h"
|
||||
#include "app/common/BuildVer/BuildVer.h"
|
||||
#include "app/common/GameRules/LevelGeneration/LevelGenerationOptions.h"
|
||||
#include "app/linux/LinuxGame.h"
|
||||
@@ -371,7 +369,7 @@ ConsoleSaveFileSplit::ConsoleSaveFileSplit(
|
||||
|
||||
// Load a save from the game rules
|
||||
bool bLevelGenBaseSave = false;
|
||||
LevelGenerationOptions* levelGen = GameServices::getLevelGenerationOptions();
|
||||
LevelGenerationOptions* levelGen = gameServices().getLevelGenerationOptions();
|
||||
if (pvSaveData == nullptr && levelGen != nullptr &&
|
||||
levelGen->requiresBaseSave()) {
|
||||
pvSaveData = levelGen->getBaseSaveData(fileSize);
|
||||
@@ -1367,9 +1365,9 @@ void ConsoleSaveFileSplit::Flush(bool autosave, bool updateThumbnail) {
|
||||
hasSeed = true;
|
||||
}
|
||||
|
||||
int iTextMetadataBytes = GameServices::createImageTextData(
|
||||
int iTextMetadataBytes = gameServices().createImageTextData(
|
||||
bTextMetadata, seed, hasSeed,
|
||||
GameHostOptions::get(eGameHostOption_All),
|
||||
gameServices().getGameHostOption(eGameHostOption_All),
|
||||
Minecraft::GetInstance()->getCurrentTexturePackId());
|
||||
|
||||
// set the icon and save image
|
||||
@@ -1388,8 +1386,8 @@ void ConsoleSaveFileSplit::Flush(bool autosave, bool updateThumbnail) {
|
||||
return SaveSaveDataCallback(this, bRes);
|
||||
});
|
||||
#if !defined(_CONTENT_PACKAGE)
|
||||
if (DebugSettings::isOn()) {
|
||||
if (GameServices::getWriteSavesToFolderEnabled()) {
|
||||
if (gameServices().debugSettingsOn()) {
|
||||
if (gameServices().getWriteSavesToFolderEnabled()) {
|
||||
DebugFlushToFile(compData, compLength + 8);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user