Author SHA1 Message Date
NaN 43fb49b3de rebase for the 4th time 2026-08-04 18:43:48 -04:00
NaN b67d9d2094 clean up 2026-08-04 01:56:00 -04:00
NaN 83a62db82a remove debug network code 2026-08-04 01:48:52 -04:00
NaN 42b9349755 Revert Wine changes pushed by accident 2026-08-04 01:39:16 -04:00
NaN aca9560079 ps4 support final 2026-08-04 01:31:55 -04:00
NaN d06e2e5eba ps4 support final 2026-08-04 01:31:46 -04:00
NaN ada85f871e fix ps4 crashing when creating single player game 2026-08-03 23:09:17 -04:00
NaN 05e8ed3c66 update nework refrence 2026-08-03 19:15:54 -04:00
NaN 930a104e50 feat: add PS4 networking support 2026-08-03 16:57:07 -04:00
1683 changed files with 15095 additions and 41633 deletions

No files matched your search

-114
View File
@@ -1,114 +0,0 @@
name: Build & Release Windows64
on:
workflow_dispatch:
inputs:
version:
description: 'Version tag for release (e.g. v1.0.0).'
required: true
default: ''
notes:
description: 'URL to notes for release.'
required: false
default: ''
jobs:
validate:
runs-on: windows-2022
steps:
- name: Validate version format
run: |
if (-not ("${{ inputs.version }}" -match '^v\d+\.\d+\.\d+[a-zA-Z0-9.-]*$')) {
Write-Error "Version '${{ inputs.version }}' doesn't match expected format (e.g. v1.0.0)"
exit 1
}
build:
needs: validate
strategy:
matrix:
configuration: [ContentPackage]
platform: [Windows64]
include:
- platform: Windows64
sdk_label: windows-2022 # str1k3r - can run on any runner
runs-on: [windows-2022, "${{ matrix.sdk_label }}"]
steps:
- name: Checkout Repository
uses: https://github.com/actions/checkout@v4
with:
fetch-depth: 1
clean: false
lfs: false
submodules: true
- name: Build Cafeberry
run: |
& "C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" MinecraftConsoles.sln `
/p:Configuration=${{ matrix.configuration }} `
/p:Platform=${{ matrix.platform }} `
/m
- name: Zip Build
run: |
7z a -r "LCEWindows64.zip" "./x64/${{ matrix.configuration }}/*" "-x!*.pdb" "-x!*.pch" "-x!*.ilk" "-x!*.lib" "-x!*.exp"
- name: Stage artifacts
run: |
New-Item -ItemType Directory -Force -Path staging
Copy-Item "LCE${{ matrix.platform }}.zip" staging/
Copy-Item "./x64/${{ matrix.configuration }}/Minecraft.Client.exe" staging/
- name: Upload artifacts
uses: https://github.com/christopherHX/gitea-upload-artifact@v4
with:
name: build-${{ matrix.platform }}
path: staging/*
compression-level: 0
release:
needs: build
runs-on: windows-2022
steps:
- name: Download all build artifacts
uses: https://github.com/christopherHX/gitea-download-artifact@v4
with:
path: downloaded
- name: Fetch release notes
id: notes
run: |
$notesSource = "${{ inputs.notes }}"
$fallback = "## Cafeberry`n`n### Whoever made this release forgot to put notes, sorry!"
if ($notesSource -match '^https?://') {
try {
$body = (Invoke-WebRequest -Uri $notesSource -UseBasicParsing).Content
if ([string]::IsNullOrWhiteSpace($body)) { $body = $fallback }
} catch {
$body = $fallback
}
} else {
$body = $fallback
}
$delimiter = "EOF_$([System.Guid]::NewGuid().ToString('N'))"
$content = "description<<$delimiter`n$body`n$delimiter`n"
$utf8NoBom = New-Object System.Text.UTF8Encoding($false)
[System.IO.File]::AppendAllText($env:GITHUB_OUTPUT, $content, $utf8NoBom)
- name: Publish Release
uses: akkuman/gitea-release-action@v1
with:
name: ${{ inputs.version }}
server_url: ${{ gitea.server_url }}
repository: ${{ gitea.repository }}
token: ${{ gitea.token }}
tag_name: ${{ inputs.version }}
prerelease: false
verbose: true
files: downloaded/**/*
body: ${{ steps.notes.outputs.description }}
+1 -2
View File
@@ -45,12 +45,11 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v6
uses: https://github.com/actions/checkout@v4
with:
fetch-depth: 1
clean: false
lfs: false
submodules: recursive
- name: Build Cafeberry
run: |
+1 -15
View File
@@ -6,24 +6,15 @@
/*Release*
/*ContentPackage*
# Minecraft.Server
/Minecraft.Server/x64
/Minecraft.Server/x64_*
/Minecraft.Server/*Debug
/Minecraft.Server/*Release*
/Minecraft.Server/*Server*
/Minecraft.Server/*ContentPackage*
# Minecraft.Client
/Minecraft.Client/x64
/Minecraft.Client/x64_*
/Minecraft.Client/*Debug
/Minecraft.Client/*Release*
/Minecraft.Client/*Server*
/Minecraft.Client/*ContentPackage*
/Minecraft.Client/Windows64/GameHDD
# Minecraft.World
# Minecraft.world
/Minecraft.World/x64
/Minecraft.World/x64_*
/Minecraft.World/*Debug
@@ -37,10 +28,6 @@
/Minecraft.Client/PS3/SPU_Tasks/*/Release
/Minecraft.Client/PS3/SPU_Tasks/*/ContentPackage
# Xbox 360 XZP & XURs
Minecraft.Client/XboxMedia/XZP
Minecraft.Client/Common/Media/XURs
# Misc
*.ppu.o
*.pkg
@@ -52,4 +39,3 @@ Minecraft.Client/Common/Media/XURs
*.opensdf
*.v11.suo
*.vcxproj.user
*.aps
-5
View File
@@ -1,5 +0,0 @@
[submodule "Minecraft.Client/Windows64/4JLibs"]
path = Minecraft.Client/Windows64/4JLibs
url = https://gitea.str1k3r.xyz/cafeberry/4JLibs.git
ignore = untracked
branch = main
+1 -1
View File
@@ -248,7 +248,7 @@ void AbstractTexturePack::loadDefaultUI()
//CXuiSceneBase::GetInstance()->SetVisualPrefix(L"TexturePack");
CXuiSceneBase::GetInstance()->SkinChanged(CXuiSceneBase::GetInstance()->m_hObj);
#else
ui.ReloadSkins();
ui.ReloadSkin();
#endif
}
+2 -4
View File
@@ -402,7 +402,6 @@ void Chunk::rebuild()
}
Tile *tile = Tile::tiles[tileId];
if (!tile) continue;
if (currentLayer == 0 && tile->isEntityTile())
{
shared_ptr<TileEntity> et = region->getTileEntity(x, y, z);
@@ -740,9 +739,9 @@ void Chunk::rebuild_SPU()
{
// 4J - get tile from those copied into our local array in earlier optimisation
unsigned char tileId = pOutData->getTile(x,y,z);
if (tileId > 0 && tileId != 0xff)
if (tileId > 0)
{
if (currentLayer == 0 && Tile::tiles[tileId] && Tile::tiles[tileId]->isEntityTile())
if (currentLayer == 0 && Tile::tiles[tileId]->isEntityTile())
{
shared_ptr<TileEntity> et = region.getTileEntity(x, y, z);
if (TileEntityRenderDispatcher::instance->hasRenderer(et))
@@ -755,7 +754,6 @@ void Chunk::rebuild_SPU()
{
Tile *tile = Tile::tiles[tileId];
if (!tile) continue;
int renderLayer = tile->getRenderLayer();
if (renderLayer != currentLayer)
+38 -33
View File
@@ -303,10 +303,6 @@ void ClientConnection::handleLogin(shared_ptr<LoginPacket> packet)
level->isClientSide = true;
minecraft->setLevel(level);
}
else
{
level = (MultiPlayerLevel *)dimensionLevel;
}
minecraft->player->setPlayerIndex( packet->m_playerIndex );
minecraft->player->setCustomSkin( app.GetPlayerSkinId(m_userIndex) );
@@ -780,7 +776,6 @@ void ClientConnection::handleAddPlayer(shared_ptr<AddPlayerPacket> packet)
player->yRotp = packet->yRot;
player->yHeadRot = packet->yHeadRot * 360 / 256.0f;
player->setXuid(packet->xuid);
player->setOnlineXuid(packet->OnlineXuid);
#ifdef _DURANGO
// On Durango request player display name from network manager
@@ -793,11 +788,11 @@ void ClientConnection::handleAddPlayer(shared_ptr<AddPlayerPacket> packet)
#if defined _WINDOWS64 || defined DISABLE_PSN || defined _DISABLE_XBLIVE
{
PlayerUID netXuid = packet->OnlineXuid;
PlayerUID pktXuid = player->getXuid();
const PlayerUID WIN64_XUID_BASE = (PlayerUID)0xe000d45248242f2e;
if (netXuid >= WIN64_XUID_BASE && netXuid < WIN64_XUID_BASE + MINECRAFT_NET_MAX_PLAYERS)
if (pktXuid >= WIN64_XUID_BASE && pktXuid < WIN64_XUID_BASE + MINECRAFT_NET_MAX_PLAYERS)
{
BYTE smallId = (BYTE)(netXuid - WIN64_XUID_BASE);
BYTE smallId = (BYTE)(pktXuid - WIN64_XUID_BASE);
INetworkPlayer *np = g_NetworkManager.GetPlayerBySmallId(smallId);
if (np != NULL)
{
@@ -959,6 +954,39 @@ void ClientConnection::handleMoveEntitySmall(shared_ptr<MoveEntityPacketSmall> p
void ClientConnection::handleRemoveEntity(shared_ptr<RemoveEntitiesPacket> packet)
{
#if defined _WINDOWS64 || defined DISABLE_PSN || defined _DISABLE_XBLIVE
if (!g_NetworkManager.IsHost())
{
for (int i = 0; i < packet->ids.length; i++)
{
shared_ptr<Entity> entity = getEntity(packet->ids[i]);
if (entity != NULL && entity->GetType() == eTYPE_PLAYER)
{
shared_ptr<Player> player = dynamic_pointer_cast<Player>(entity);
if (player != NULL)
{
PlayerUID xuid = player->getXuid();
INetworkPlayer *np = g_NetworkManager.GetPlayerByXuid(xuid);
if (np != NULL)
{
NetworkPlayerXbox *npx = (NetworkPlayerXbox *)np;
IQNetPlayer *qp = npx->GetQNetPlayer();
if (qp != NULL)
{
extern CPlatformNetworkManagerStub *g_pPlatformNetworkManager;
g_pPlatformNetworkManager->NotifyPlayerLeaving(qp);
qp->m_smallId = 0;
qp->m_isRemote = false;
qp->m_isHostPlayer = false;
qp->m_gamertag[0] = 0;
qp->SetCustomDataValue(0);
}
}
}
}
}
}
#endif
for (int i = 0; i < packet->ids.length; i++)
{
level->removeEntity(packet->ids[i]);
@@ -1040,7 +1068,6 @@ void ClientConnection::handleChunkVisibility(shared_ptr<ChunkVisibilityPacket> p
void ClientConnection::handleChunkTilesUpdate(shared_ptr<ChunkTilesUpdatePacket> packet)
{
// 4J - changed to encode level in packet
if (packet->levelIdx >= minecraft->levels.length) return;
MultiPlayerLevel *dimensionLevel = (MultiPlayerLevel *)minecraft->levels[packet->levelIdx];
if( dimensionLevel )
{
@@ -1110,7 +1137,6 @@ void ClientConnection::handleChunkTilesUpdate(shared_ptr<ChunkTilesUpdatePacket>
void ClientConnection::handleBlockRegionUpdate(shared_ptr<BlockRegionUpdatePacket> packet)
{
// 4J - changed to encode level in packet
if (packet->levelIdx >= minecraft->levels.length) return;
MultiPlayerLevel *dimensionLevel = (MultiPlayerLevel *)minecraft->levels[packet->levelIdx];
if( dimensionLevel )
{
@@ -1168,8 +1194,6 @@ void ClientConnection::handleTileUpdate(shared_ptr<TileUpdatePacket> packet)
destroyTilePacket = true;
}
// 4J - changed to encode level in packet
if (packet->levelIdx >= minecraft->levels.length) return;
MultiPlayerLevel *dimensionLevel = (MultiPlayerLevel *)minecraft->levels[packet->levelIdx];
if( dimensionLevel )
{
@@ -1809,7 +1833,6 @@ void ClientConnection::handleEntityActionAtPosition(shared_ptr<EntityActionAtPos
void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
{
app.DebugPrintf("ClientConnection::handlePreLogin ENTER (user %d)\n", m_userIndex);
// printf("Client: handlePreLogin\n");
#if 1
// 4J - Check that we can play with all the players already in the game who have Friends-Only UGC set
@@ -1825,17 +1848,13 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
app.SetGameHostOption(eGameHostOption_All,packet->m_serverSettings);
// 4J-PB - if we go straight in from the menus via an invite, we won't have the DLC info
//str1k3r - TMS only exists on Xbox 360 therefore, we only need this on Xbox 360.
#ifdef _XBOX
if(app.GetTMSGlobalFileListRead()==false)
{
app.SetTMSAction(ProfileManager.GetPrimaryPad(),eTMSAction_TMSPP_RetrieveFiles_RunPlayGame);
}
#endif
}
#ifdef _XBOX
#if !defined(_DISABLE_XBLIVE)
if(!g_NetworkManager.IsHost() && !app.GetGameHostOption(eGameHostOption_FriendsOfFriends))
{
if(m_userIndex == ProfileManager.GetPrimaryPad() )
@@ -1979,16 +1998,6 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
}
}
}
#else
// Offline/system-link games have no Xbox Live friend list, so grant all
// pre-login permissions (the Xbox Live-only checks above would otherwise
// fail and reject the client's own pre-login before Login is ever sent).
canPlay = TRUE;
canPlayLocal = TRUE;
isAtLeastOneFriend = TRUE;
isFriendsWithHost = TRUE;
cantPlayContentRestricted = FALSE;
#endif // _DISABLE_XBLIVE
#else
// TODO - handle this kind of things for non-360 platforms
canPlay = TRUE;
@@ -2278,7 +2287,6 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
}
BOOL allAllowed, friendsAllowed;
ProfileManager.AllowedPlayerCreatedContent(m_userIndex,true,&allAllowed,&friendsAllowed);
app.DebugPrintf("ClientConnection::handlePreLogin SENDING LoginPacket (user %d)\n", m_userIndex);
send( shared_ptr<LoginPacket>( new LoginPacket(minecraft->user->name, SharedConstants::NETWORK_PROTOCOL_VERSION, offlineXUID, onlineXUID, (allAllowed!=TRUE && friendsAllowed==TRUE),
packet->m_ugcPlayersVersion, app.GetPlayerSkinId(m_userIndex), app.GetPlayerCapeId(m_userIndex), ProfileManager.IsGuest( m_userIndex ))));
@@ -2329,7 +2337,6 @@ void ClientConnection::handleAddMob(shared_ptr<AddMobPacket> packet)
float xRot = packet->xRot * 360 / 256.0f;
shared_ptr<LivingEntity> mob = dynamic_pointer_cast<LivingEntity>(EntityIO::newById(packet->type, level));
if (mob == NULL) return;
mob->xp = packet->x;
mob->yp = packet->y;
mob->zp = packet->z;
@@ -3573,12 +3580,10 @@ void ClientConnection::handleCustomPayload(shared_ptr<CustomPayloadPacket> custo
}
#else
UIScene *scene = ui.GetTopScene(m_userIndex, eUILayer_Scene);
UIScene_TradingMenu *screen = dynamic_cast<UIScene_TradingMenu *>(scene);
if (screen != NULL)
trader = screen->getMerchant();
UIScene_TradingMenu *screen = (UIScene_TradingMenu *)scene;
trader = screen->getMerchant();
#endif
if (trader == NULL) return;
MerchantRecipeList *recipeList = MerchantRecipeList::createFromStream(&input);
trader->overrideOffers(recipeList);
}
+1 -2
View File
@@ -875,8 +875,7 @@ enum EControllerActions
MINECRAFT_ACTION_SPAWN_CREEPER,
MINECRAFT_ACTION_CHANGE_SKIN,
MINECRAFT_ACTION_FLY_TOGGLE,
MINECRAFT_ACTION_RENDER_DEBUG,
MINECRAFT_ACTION_RENDER_DEBUG_SCREEN
MINECRAFT_ACTION_RENDER_DEBUG
};
enum eMCLang
+52 -21
View File
@@ -24,11 +24,42 @@
//#define __DISABLE_MILES__ // MGH disabled for now as it crashes if we call sceNpMatching2Initialize
#endif
// take out Orbis until they are done
#if defined _XBOX
SoundEngine::SoundEngine() {}
void SoundEngine::init(Options *pOptions)
{
}
void SoundEngine::tick(shared_ptr<Mob> *players, float a)
{
}
void SoundEngine::destroy() {}
void SoundEngine::play(int iSound, float x, float y, float z, float volume, float pitch)
{
app.DebugPrintf("PlaySound - %d\n",iSound);
}
void SoundEngine::playStreaming(const wstring& name, float x, float y , float z, float volume, float pitch, bool bMusicDelay) {}
void SoundEngine::playUI(int iSound, float volume, float pitch) {}
void SoundEngine::updateMusicVolume(float fVal) {}
void SoundEngine::updateSoundEffectVolume(float fVal) {}
void SoundEngine::add(const wstring& name, File *file) {}
void SoundEngine::addMusic(const wstring& name, File *file) {}
void SoundEngine::addStreaming(const wstring& name, File *file) {}
char *SoundEngine::ConvertSoundPathToName(const wstring& name, bool bConvertSpaces) { return NULL; }
bool SoundEngine::isStreamingWavebankReady() { return true; }
void SoundEngine::playMusicTick() {};
#else
// str1k3r: previously ps4 needed the durango folder to load sound and so did windows this fixes that and makes them use there own folders.
#ifdef _WINDOWS64
char SoundEngine::m_szSoundPath[]={"Windows64Media\\Sound\\"};
char SoundEngine::m_szMusicPath[]={"music\\"};
char SoundEngine::m_szRedistName[]={"Windows64\\redist64"}; //str1k3r - moved this to the Windows64 dir so its out of plain view
char SoundEngine::m_szRedistName[]={"redist64"};
#elif defined _DURANGO
char SoundEngine::m_szSoundPath[]={"Sound\\"};
char SoundEngine::m_szMusicPath[]={"music\\"};
@@ -48,7 +79,7 @@ char SoundEngine::m_szMusicPath[]={"music/"};
char SoundEngine::m_szRedistName[]={"redist"};
#endif
/*#ifdef _CONTENT_PACKAGE // str1k3r - not needed use default paths instead.
/*#ifdef _CONTENT_PACKAGE // strk1k3r - not needed use default paths instead.
char SoundEngine::m_szSoundPath[]={"Sound/"};
#elif defined _ART_BUILD
char SoundEngine::m_szSoundPath[]={"Sound/"};
@@ -80,6 +111,7 @@ char *SoundEngine::m_szStreamFileA[eStream_Max]=
"hal4",
"nuance1",
"nuance2",
#ifndef _XBOX
// add the new music tracks
"creative1",
"creative2",
@@ -91,9 +123,11 @@ char *SoundEngine::m_szStreamFileA[eStream_Max]=
"menu2",
"menu3",
"menu4",
#endif
"piano1",
"piano2",
"piano3",
// Nether
"nether1",
"nether2",
@@ -274,7 +308,9 @@ void SoundEngine::init(Options *pOptions)
sprintf(szBankName,"%s/%s",getUsrDirPath(), m_szSoundPath );
}
#elif (defined __PSVITA__ || __ORBIS__)
#elif defined __PSVITA__
sprintf(szBankName,"%s/%s",getUsrDirPath(), m_szSoundPath );
#elif defined __ORBIS__
sprintf(szBankName,"%s/%s",getUsrDirPath(), m_szSoundPath );
#else
strcpy((char *)szBankName,m_szSoundPath);
@@ -755,9 +791,7 @@ void SoundEngine::play(int iSound, float x, float y, float z, float volume, floa
char *SoundName = (char *)ConvertSoundPathToName(name);
strcat((char *)szSoundName,SoundName);
#ifdef _DEBUG
app.DebugPrintf(6,"PlaySound - %d - %s - %s (%f %f %f, vol %f, pitch %f)\n",iSound, SoundName, szSoundName,x,y,z,volume,pitch);
#endif
// app.DebugPrintf(6,"PlaySound - %d - %s - %s (%f %f %f, vol %f, pitch %f)\n",iSound, SoundName, szSoundName,x,y,z,volume,pitch);
AUDIO_INFO AudioInfo;
AudioInfo.x=x;
@@ -812,11 +846,9 @@ void SoundEngine::playUI(int iSound, float volume, float pitch)
char *SoundName = (char *)ConvertSoundPathToName(name);
strcat((char *)szSoundName,SoundName);
// app.DebugPrintf("UI: Playing %s, volume %f, pitch %f\n",SoundName,volume,pitch);
#ifdef _DEBUG
app.DebugPrintf("UI: Playing %s, volume %f, pitch %f\n",SoundName,volume,pitch);
app.DebugPrintf("PlaySound - %d - %s\n",iSound, SoundName);
#endif
//app.DebugPrintf("PlaySound - %d - %s\n",iSound, SoundName);
AUDIO_INFO AudioInfo;
memset(&AudioInfo,0,sizeof(AUDIO_INFO));
@@ -1104,12 +1136,10 @@ int SoundEngine::OpenStreamThreadProc( void* lpParameter )
SoundEngine *soundEngine = (SoundEngine *)lpParameter;
soundEngine->m_hStream = AIL_open_stream(soundEngine->m_hDriver,soundEngine->m_szStreamName,0);
#ifdef _DEBUG
if(soundEngine->m_hStream==0)
{
app.DebugPrintf("SoundEngine::OpenStreamThreadProc - Could not open - %s\n",soundEngine->m_szStreamName);
}
#endif
return 0;
}
@@ -1130,17 +1160,13 @@ void SoundEngine::playMusicTick()
void SoundEngine::playMusicUpdate()
{
//return;
static float fMusicVol = 0.0f;
#ifndef _WINDOWS64 //str1k3r - if used on windows64 volume doesnt update
static bool firstCall = true;
static float fMusicVol = 0.0f;
if( firstCall )
{
fMusicVol = getMasterMusicVolume();
firstCall = false;
}
#else
fMusicVol = getMasterMusicVolume();
#endif
switch(m_StreamState)
{
@@ -1200,7 +1226,7 @@ void SoundEngine::playMusicUpdate()
m_MusicType=eMusicType_Game;
m_StreamingAudioInfo.bIs3D=false;
#if (defined _XBOX_ONE || _WINDOWS64)
#ifdef _XBOX_ONE
wstring &wstrSoundName=dlcAudioFile->GetSoundName(m_musicID);
wstring wstrFile=L"TPACK:\\Data\\" + wstrSoundName +L".binka";
std::wstring mountedPath = StorageManager.GetMountedPath(wstrFile);
@@ -1209,7 +1235,12 @@ void SoundEngine::playMusicUpdate()
wstring &wstrSoundName=dlcAudioFile->GetSoundName(m_musicID);
char szName[255];
wcstombs(szName,wstrSoundName.c_str(),255);
#if defined __PS3__ || defined __ORBIS__ || defined __PSVITA__
string strFile="TPACK:/Data/" + string(szName) + ".binka";
#else
string strFile="TPACK:\\Data\\" + string(szName) + ".binka";
#endif
std::string mountedPath = StorageManager.GetMountedPath(strFile);
strcpy(m_szStreamName,mountedPath.c_str());
#endif
@@ -1483,9 +1514,7 @@ void SoundEngine::playMusicUpdate()
}
// volume change required?
#ifndef _WINDOWS64
if(fMusicVol!=getMasterMusicVolume()) //str1k3r - if used on windows64 music doesnt update its volume
#endif
if(fMusicVol!=getMasterMusicVolume())
{
fMusicVol=getMasterMusicVolume();
HSAMPLE hSample = AIL_stream_sample_handle( m_hStream);
@@ -1627,6 +1656,8 @@ char *SoundEngine::ConvertSoundPathToName(const wstring& name, bool bConvertSpac
return buf;
}
#endif
F32 AILCALLBACK custom_falloff_function (HSAMPLE S,
F32 distance,
@@ -1,80 +0,0 @@
param(
[string]$ProjectDir,
[string]$Platform,
[string]$Configuration
)
if ($ProjectDir -match "Minecraft.World") {
$BaseDir = "$ProjectDir..\Minecraft.Client\"
} elseif ($ProjectDir -match "Minecraft.Client") {
$BaseDir = $ProjectDir
} else {
Write-Host "4JLibs: Unknown project directory: '$ProjectDir'"
exit 1
}
switch ($Platform) {
"x64" { $LibsDir = Join-Path $BaseDir "Windows64\4JLibs\"; $ExpectedCount = 4; $PlatformName = "Windows64" }
"Durango" { $LibsDir = Join-Path $BaseDir "Durango\4JLibs\"; $ExpectedCount = 4; $PlatformName = "Durango" }
"Xbox 360" { $LibsDir = Join-Path $BaseDir "Xbox\4JLibs\"; $ExpectedCount = 5; $PlatformName = "Xbox" }
"PS3" { $LibsDir = Join-Path $BaseDir "PS3\4JLibs\"; $ExpectedCount = 4; $PlatformName = "PS3" }
"Orbis" { $LibsDir = Join-Path $BaseDir "Orbis\4JLibs\"; $ExpectedCount = 4; $PlatformName = "Orbis" }
"PSVita" { $LibsDir = Join-Path $BaseDir "PSVita\4JLibs\"; $ExpectedCount = 4; $PlatformName = "PSVita" }
default { Write-Host "4JLibs: Unknown platform: '$Platform'"; exit 1 }
}
if ($Configuration -match "ContentPackage" -or $Configuration -match "Release") {
$BuildConfig = "Release"
} elseif ($Configuration -match "Debug") {
$BuildConfig = "Debug"
} else {
Write-Host "4JLibs: Configuration did not match any known patterns, defaulting to Debug"
$BuildConfig = "Debug"
}
if (-not (Test-Path $LibsDir)) {
Write-Host "4JLibs: $PlatformName 4JLibs directory not found"
exit 1
} elseif (-not (Test-Path "$LibsDir\Headers\$PlatformName")) {
Write-Host "4JLibs: $PlatformName 4JLibs Headers directory not found"
exit 1
} elseif (-not (Test-Path "$LibsDir\Headers")) {
Write-Host "4JLibs: Headers directory not found"
exit 1
}
$incPath = Join-Path $LibsDir "inc"
$libsPath = Join-Path $LibsDir "libs"
$incCount = (Get-ChildItem -Path $incPath -Filter "*.h" -ErrorAction SilentlyContinue).Count
if ($BuildConfig -eq "Release") {
$libCount = (Get-ChildItem -Path $libsPath -Filter "*_r.lib" -ErrorAction SilentlyContinue).Count
} else {
$libCount = (Get-ChildItem -Path $libsPath -Filter "*_d.lib" -ErrorAction SilentlyContinue).Count
}
if ($incCount -lt $ExpectedCount) {
Write-Host "4JLibs: Copying header files for $PlatformName"
xcopy "$LibsDir\Headers\$PlatformName\*" "$incPath" /E /I /Y
} else {
Write-Host "4JLibs: inc files already present, skipping copy."
}
if ($libCount -lt $ExpectedCount) {
Write-Host "4JLibs: Building 4JLibs for $PlatformName in $BuildConfig"
& "C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" `
(Join-Path $LibsDir "4JLibs.sln") `
/p:Configuration=$BuildConfig `
/p:Platform=$PlatformName `
/v:minimal `
/m
if ($LASTEXITCODE -ne 0) {
Write-Host "4JLibs: Build failed with exit code: $LASTEXITCODE"
exit $LASTEXITCODE
}
} else {
Write-Host "4JLibs: libs already present, skipping build."
}
@@ -1,109 +0,0 @@
param(
[string]$OutDir,
[string]$ProjectDir,
[string]$Configuration
)
Write-Host "PS3 Postbuild: script started. Output Directory: $OutDir, Project Directory: $ProjectDir"
$directories = @(
"PS3_GAME\USRDIR\music",
"PS3_GAME\USRDIR\DLC",
"PS3_GAME\USRDIR\Common\Media",
"PS3_GAME\USRDIR\Common\res",
"PS3_GAME\USRDIR\PS3\Tutorial",
"PS3_GAME\USRDIR\PS3\Sound"
)
foreach ($dir in $directories) {
New-Item -ItemType Directory -Path (Join-Path $OutDir $dir) -Force | Out-Null
}
$folderCopies = @(
@{ Source = "music"; Dest = "PS3_GAME\USRDIR\music" },
@{ Source = "Common\Media\Font";Dest = "PS3_GAME\USRDIR\Common\Media\Font" },
@{ Source = "Common\res"; Dest = "PS3_GAME\USRDIR\Common\res" },
@{ Source = "PS3Media\DLC"; Dest = "PS3_GAME\USRDIR\DLC" },
@{ Source = "PS3Media\Sound"; Dest = "PS3_GAME\USRDIR\PS3\Sound" },
#@{ Source = "PSVita\Tutorial"; Dest = "PS3_GAME\USRDIR\PS3\Tutorial" }, # str1k3r - softlocks game
@{ Source = Join-Path $PSScriptRoot "Contents\PS3\PS3_GAME\LICDIR"; Dest = "PS3_GAME\LICDIR" },
@{ Source = Join-Path $PSScriptRoot "Contents\PS3\PS3_GAME\TROPDIR"; Dest = "PS3_GAME\TROPDIR" }
)
foreach ($copy in $folderCopies) {
if ([System.IO.Path]::IsPathRooted($copy.Source)) {
$src = $copy.Source
} else {
$src = Join-Path $ProjectDir $copy.Source
}
$dst = Join-Path $OutDir $copy.Dest
if (Test-Path $src) {
xcopy /q /y /i /s /e /d "$src" "$dst" 2>$null
} else {
Write-Host "PS3 Postbuild: Folder not found, skipping: $src"
}
}
$fileCopies = @(
@{ Source = "PS3\PS3ProductCodes.bin"; Dest = "PS3_GAME\USRDIR\PS3\PS3ProductCodes.bin" },
@{ Source = "Common\Media\MediaPS3.arc"; Dest = "PS3_GAME\USRDIR\Common\Media\MediaPS3.arc" },
@{ Source = Join-Path $PSScriptRoot "Contents\PS3\PS3_DISC.SFB"; Dest = "PS3_DISC.SFB" },
@{ Source = Join-Path $PSScriptRoot "Contents\PS3\PS3_GAME\ICON0.PNG"; Dest = "PS3_GAME\ICON0.PNG" },
@{ Source = Join-Path $PSScriptRoot "Contents\PS3\PS3_GAME\PARAM.SFO"; Dest = "PS3_GAME\PARAM.SFO" },
@{ Source = Join-Path $PSScriptRoot "Contents\PS3\PS3_GAME\PIC1.PNG"; Dest = "PS3_GAME\PIC1.PNG" },
@{ Source = Join-Path $PSScriptRoot "Contents\PS3\PS3_GAME\PS3GAME.BG0"; Dest = "PS3_GAME\PS3GAME.BG0" },
@{ Source = Join-Path $PSScriptRoot "Contents\PS3\PS3_GAME\PS3GAME.BG1"; Dest = "PS3_GAME\PS3GAME.BG1" },
@{ Source = Join-Path $PSScriptRoot "Contents\PS3\PS3_GAME\PS3GAME.VR0"; Dest = "PS3_GAME\PS3GAME.VR0" },
@{ Source = Join-Path $PSScriptRoot "Contents\PS3\PS3_GAME\PS3LOGO.DAT"; Dest = "PS3_GAME\PS3GAME.DAT" },
@{ Source = Join-Path $PSScriptRoot "Contents\PS3\PS3_GAME\SND0.AT3"; Dest = "PS3_GAME\SND0.AT3" }
)
foreach ($copy in $fileCopies) {
$src = $copy.Source
$dst = Join-Path $OutDir $copy.Dest
if (Test-Path $src) {
Copy-Item -Path $src -Destination $dst -Force
} else {
Write-Host "PS3 Postbuild: File not found, skipping: $src"
}
}
if ($Configuration -match "ContentPackage") {
$builtFile = Join-Path $OutDir "Minecraft.Client.elf"
} else {
$builtFile = Join-Path $OutDir "Minecraft.Client.self"
}
$newName = "EBOOT.BIN"
$destDir = Join-Path $OutDir "PS3_GAME\USRDIR"
$destPath = Join-Path $destDir $newName
if (Test-Path $builtFile) {
New-Item -ItemType Directory -Path $destDir -Force | Out-Null
Copy-Item -Path $builtFile -Destination $destPath -Force
}
$deleteDirs = @(
"PS3_GAME\USRDIR\Common\Media\font\RU"
)
foreach ($dir in $deleteDirs) {
$path = Join-Path $OutDir $dir
if (Test-Path $path) {
Remove-Item $path -Recurse -Force -ErrorAction SilentlyContinue
}
}
$delDirs = @(
"PS3_GAME\USRDIR\Common\Media\font",
"PS3_GAME\USRDIR\Common\Media\font\*"
)
foreach ($dir in $delDirs) {
$path = Join-Path $OutDir $dir
if (Test-Path $path) {
Get-ChildItem -Path $path -Recurse -Include *.txt, *.abc, "Mojang Font_7.ttf", "Mojang Font_11.ttf", "MSYH.ttf" -File |
Remove-Item -Force -ErrorAction SilentlyContinue
}
}
@@ -1,84 +0,0 @@
param(
[string]$OutDir,
[string]$ProjectDir
)
Write-Host "Windows64 Postbuild: script started. Output Directory: $OutDir, Project Directory: $ProjectDir"
$directories = @(
"music",
"Common\Media",
"Windows64Media",
"Windows64\GameHDD",
"Windows64\redist64"
)
foreach ($dir in $directories) {
New-Item -ItemType Directory -Path (Join-Path $OutDir $dir) -Force | Out-Null
}
$folderCopies = @(
@{ Source = "music"; Dest = "music" },
@{ Source = "Common\res"; Dest = "Common\res" },
@{ Source = "Common\Media\Font"; Dest = "Common\Media\Font" },
@{ Source = "Windows64Media\DLC"; Dest = "Windows64Media\DLC" },
@{ Source = "Windows64Media\Sound"; Dest = "Windows64Media\Sound" },
#@{ Source = "PSVita\Tutorial"; Dest = "Windows64Media\Tutorial" }, # str1k3r - doesnt even work bru
@{ Source = "Windows64\Miles\lib\redist64"; Dest = "Windows64\redist64" }
)
foreach ($copy in $folderCopies) {
if ([System.IO.Path]::IsPathRooted($copy.Source)) {
$src = $copy.Source
} else {
$src = Join-Path $ProjectDir $copy.Source
}
$dst = Join-Path $OutDir $copy.Dest
if (Test-Path $src) {
xcopy /q /y /i /s /e /d "$src" "$dst" 2>$null
} else {
Write-Host "Windows64 Postbuild: Folder not found, skipping: $src"
}
}
$fileCopies = @(
@{ Source = Join-Path $ProjectDir "Windows64\4JLibs\4J_Input\Windows64\vendor\SDL\lib\x64\SDL3.dll"; Dest = "SDL3.dll" },
@{ Source = "Common\Media\MediaWindows64.arc"; Dest = "Common\Media\MediaWindows64.arc" },
@{ Source = Join-Path $PSScriptRoot "Contents\Windows64\mss64.dll"; Dest = "mss64.dll" },
@{ Source = "Windows64\Iggy\lib\redist64\iggy_w64.dll"; Dest = "iggy_w64.dll" }
)
foreach ($copy in $fileCopies) {
$src = $copy.Source
$dst = Join-Path $OutDir $copy.Dest
if (Test-Path $src) {
Copy-Item -Path $src -Destination $dst -Force
} else {
Write-Host "Windows64 Postbuild: File not found, skipping: $src"
}
}
$deleteDirs = @(
"Common\Media\font\RU" #str1k3r - russian font?
)
foreach ($dir in $deleteDirs) {
$path = Join-Path $OutDir $dir
if (Test-Path $path) {
Remove-Item $path -Recurse -Force -ErrorAction SilentlyContinue
}
}
$delDirs = @(
"Common\Media\font",
"Common\Media\font\*"
)
foreach ($dir in $delDirs) {
$path = Join-Path $OutDir $dir
if (Test-Path $path) {
Get-ChildItem -Path $path -Recurse -Include *.txt, *.abc, "Mojang Font_7.ttf", "Mojang Font_11.ttf", "DF-DotDotGothic16.ttf", "DFTT_R5.TTC", "candadite2.ttf" -File |
Remove-Item -Force -ErrorAction SilentlyContinue
}
}
+1 -13
View File
@@ -1,27 +1,15 @@
#include "stdafx.h"
#if defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD)
#include "../../Minecraft.Server/ServerLogManager.h"
#endif
//--------------------------------------------------------------------------------------
// Name: DebugSpewV()
// Desc: Internal helper function
//--------------------------------------------------------------------------------------
#ifndef _CONTENT_PACKAGE
static VOID DebugSpewV( const CHAR* strFormat, va_list pArgList )
static VOID DebugSpewV( const CHAR* strFormat, const va_list pArgList )
{
#if defined __PS3__ || defined __ORBIS__ || defined __PSVITA__
assert(0);
#else
#if defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD)
// Dedicated server routes legacy debug spew through ServerLogger to preserve CLI prompt handling.
if (ServerRuntime::ServerLogManager::ShouldForwardClientDebugLogs())
{
ServerRuntime::ServerLogManager::ForwardClientDebugSpewLogV(strFormat, pArgList);
return;
}
#endif
CHAR str[2048];
// Use the secure CRT to avoid buffer overruns. Specify a count of
// _TRUNCATE so that too long strings will be silently truncated
+57 -96
View File
@@ -30,9 +30,6 @@
#include "GameRules\ConsoleGameRules.h"
#include "GameRules\ConsoleSchematicFile.h"
#include "..\User.h"
#if defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD)
#include "..\..\Minecraft.Server\ServerLogManager.h"
#endif
#include "..\\EntityRenderDispatcher.h"
#include "..\TexturePackRepository.h"
#include "..\DLCTexturePack.h"
@@ -233,21 +230,12 @@ void CMinecraftApp::DebugPrintf(const char *szFormat, ...)
{
#ifndef _FINAL_BUILD
va_list ap;
va_start(ap, szFormat);
#if defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD)
// Dedicated server routes client debug spew through ServerLogger so CLI output stays prompt-safe.
if (ServerRuntime::ServerLogManager::ShouldForwardClientDebugLogs())
{
ServerRuntime::ServerLogManager::ForwardClientAppDebugLogV(szFormat, ap);
va_end(ap);
return;
}
#endif
char buf[1024];
vsnprintf(buf, sizeof(buf), szFormat, ap);
va_end(ap);
OutputDebugStringA(buf);
char buf[1024];
va_list ap;
va_start(ap, szFormat);
vsnprintf(buf, sizeof(buf), szFormat, ap);
va_end(ap);
OutputDebugStringA(buf);
#endif
}
@@ -255,22 +243,13 @@ void CMinecraftApp::DebugPrintf(const char *szFormat, ...)
void CMinecraftApp::DebugPrintf(int user, const char *szFormat, ...)
{
#ifndef _FINAL_BUILD
if(user == USER_NONE)
return;
va_list ap;
va_start(ap, szFormat);
#if defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD)
// Dedicated server routes client debug spew through ServerLogger so CLI output stays prompt-safe.
if (ServerRuntime::ServerLogManager::ShouldForwardClientDebugLogs())
{
ServerRuntime::ServerLogManager::ForwardClientUserDebugLogV(user, szFormat, ap);
va_end(ap);
return;
}
#endif
char buf[1024];
vsnprintf(buf, sizeof(buf), szFormat, ap);
va_end(ap);
if(user == USER_NONE)
return;
char buf[1024];
va_list ap;
va_start(ap, szFormat);
vsnprintf(buf, sizeof(buf), szFormat, ap);
va_end(ap);
#ifdef __PS3__
unsigned int writelen;
sys_tty_write(SYS_TTYP_USER1 + ( user - 1 ), buf, strlen(buf), &writelen );
@@ -785,11 +764,11 @@ void CMinecraftApp::InitGameSettings()
//SetDefaultGameSettings(i); - done on a callback from the profile manager
// 4J-PB - adding in for Windows & PS3 to set the defaults for the joypad
#if defined _WINDOWS64
#if defined _WINDOWS64// || defined __PSVITA__
C_4JProfile::PROFILESETTINGS *pProfileSettings=ProfileManager.GetDashboardProfileSettings(i);
// clear this for now - it will come from reading the system values
memset(pProfileSettings,0,sizeof(C_4JProfile::PROFILESETTINGS));
SetDefaultOptions(pProfileSettings,i);
ProfileManager.LoadSettings(GameSettingsA[i], sizeof(GAME_SETTINGS));
ApplyGameSettingsChanged(i);
#elif defined __PS3__ || defined __ORBIS__ || defined _DURANGO || defined __PSVITA__
C4JStorage::PROFILESETTINGS *pProfileSettings=StorageManager.GetDashboardProfileSettings(i);
// 4J-PB - don't cause an options write to happen here
@@ -2376,8 +2355,6 @@ void CMinecraftApp::CheckGameSettingsChanged(bool bOverride5MinuteTimer, int iPa
{
#if ( defined __PS3__ || defined __ORBIS__ || defined _DURANGO || defined __PSVITA__ )
StorageManager.WriteToProfile(i,true, bOverride5MinuteTimer);
#elif _WINDOWS64
ProfileManager.SaveSettings(GameSettingsA[i], sizeof(GAME_SETTINGS));
#else
ProfileManager.WriteToProfile(i,true, bOverride5MinuteTimer);
#endif
@@ -2391,8 +2368,6 @@ void CMinecraftApp::CheckGameSettingsChanged(bool bOverride5MinuteTimer, int iPa
{
#if ( defined __PS3__ || defined __ORBIS__ || defined _DURANGO || defined __PSVITA__)
StorageManager.WriteToProfile(iPad,true, bOverride5MinuteTimer);
#elif _WINDOWS64
ProfileManager.SaveSettings(GameSettingsA[iPad], sizeof(GAME_SETTINGS));
#else
ProfileManager.WriteToProfile(iPad,true, bOverride5MinuteTimer);
#endif
@@ -2411,7 +2386,7 @@ void CMinecraftApp::ClearGameSettingsChangedFlag(int iPad)
// Remove the debug settings in the content package build
//
////////////////////////////
#ifndef _DEBUG_MENUS_ENABLED
#ifdef _DEBUG_MENUS_ENABLED
unsigned int CMinecraftApp::GetGameSettingsDebugMask(int iPad,bool bOverridePlayer) //bOverridePlayer is to force the send for the server to get the read options
{
return 0;
@@ -2424,7 +2399,9 @@ void CMinecraftApp::SetGameSettingsDebugMask(int iPad, unsigned int uiVal)
void CMinecraftApp::ActionDebugMask(int iPad,bool bSetAllClear)
{
}
#else
unsigned int CMinecraftApp::GetGameSettingsDebugMask(int iPad,bool bOverridePlayer) //bOverridePlayer is to force the send for the server to get the read options
{
if(iPad==-1)
@@ -3695,7 +3672,7 @@ void CMinecraftApp::HandleXuiActions(void)
pDLCTexPack->m_pSoundBank->Destroy();
}
#endif
#if (defined _DURANGO || _WINDOWS64)
#ifdef _DURANGO
DWORD result = StorageManager.UnmountInstalledDLC(L"TPACK");
#else
DWORD result = StorageManager.UnmountInstalledDLC("TPACK");
@@ -3867,9 +3844,9 @@ void CMinecraftApp::HandleXuiActions(void)
case eAppAction_SetDefaultOptions:
SetAction(i,eAppAction_Idle);
#if ( defined __PS3__ || defined __ORBIS__ || defined _DURANGO || defined __PSVITA__)
SetDefaultOptions((C4JStorage::PROFILESETTINGS *)param,i);
SetDefaultOptions((C4JStorage::PROFILESETTINGS *)param,i);
#else
SetDefaultOptions((C_4JProfile::PROFILESETTINGS *)param,i);
SetDefaultOptions((C_4JProfile::PROFILESETTINGS *)param,i);
#endif
// if the profile data has been changed, then force a profile write
@@ -4060,8 +4037,8 @@ void CMinecraftApp::HandleXuiActions(void)
ui.SetTooltips(i, -1);
ui.ReloadSkins();
ui.StartReloadSkinsThread();
ui.ReloadSkin();
ui.StartReloadSkinThread();
ui.setCleanupOnReload();
#endif
@@ -4440,7 +4417,9 @@ int CMinecraftApp::EthernetDisconnectReturned(void *pParam,int iPad,const C4JSto
else
{
// 4J-PB - turn off the PSN store icon just in case this happened when we were in one of the DLC menus
#if defined __PSVITA__ || defined __ORBIS__
#ifdef __ORBIS__
sceNpCommerceHidePsStoreIcon();
#elif defined(__PSVITA__) && !defined(DISABLE_PSN)
app.GetCommerce()->HidePsStoreIcon();
#endif
app.SetAction(iPad,eAppAction_EthernetDisconnectedReturned_Menus);
@@ -4910,13 +4889,11 @@ void CMinecraftApp::SignInChangeCallback(LPVOID pParam,bool bPrimaryPlayerChange
// 4J Stu - On PS4 we can also cause to exit players if they are signed out here, but we shouldn't do that if
// we are going to switch to an offline game as it will likely crash due to incompatible parallel processes
bool switchToOffline = false;
#ifndef _DISABLE_XBLIVE
// If it's an online game, and the primary profile is no longer signed into LIVE then we act as if disconnected
if( !ProfileManager.IsSignedInLive( ProfileManager.GetLockedProfile() ) && !g_NetworkManager.IsLocalGame() )
{
switchToOffline = true;
}
#endif
//printf("Old: %x, New: %x, Changed: %x\n", m_ulLastSignInData, ulSignInData, changedPlayers);
for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i)
@@ -4981,7 +4958,6 @@ void CMinecraftApp::SignInChangeCallback(LPVOID pParam,bool bPrimaryPlayerChange
g_NetworkManager.HandleSignInChange();
}
#ifndef _DISABLE_XBLIVE
// Some menus require the player to be signed in to live, so if this callback happens and the primary player is
// no longer signed in then nav back
else if ( pApp->GetLiveLinkRequired() && !ProfileManager.IsSignedInLive( ProfileManager.GetLockedProfile() ) )
@@ -4993,7 +4969,6 @@ void CMinecraftApp::SignInChangeCallback(LPVOID pParam,bool bPrimaryPlayerChange
pApp->SetAction(iPrimaryPlayer,eAppAction_EthernetDisconnected);
}
}
#endif
#if ( defined __PS3__ || defined __ORBIS__ || defined _DURANGO || defined __PSVITA__ )
// 4J-JEV: Need to kick of loading of profile data for sub-sign in players.
@@ -5490,9 +5465,9 @@ void CMinecraftApp::HandleDLC(DLCPack *pack)
{
DWORD dwFilesProcessed = 0;
#ifndef _XBOX
#if defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__)
#if defined(__PS3__) || defined(__ORBIS__) || defined(_WINDOWS64) || defined (__PSVITA__)
std::vector<std::string> dlcFilenames;
#elif (defined _DURANGO || _WINDOWS64)
#elif defined _DURANGO
std::vector<std::wstring> dlcFilenames;
#endif
StorageManager.GetMountedDLCFileList("DLCDrive", dlcFilenames);
@@ -6352,31 +6327,27 @@ void CMinecraftApp::InitialiseTips()
UINT CMinecraftApp::GetNextTip()
{
static bool bShowSkinDLCTip=true;
//str1k3r - if uiStringID is IDS_TIPS_GAMETIP_0 then dont do this, fixes a bug with IDS_TIPS_GAMETIP_0 not showing on Windows64 if not high def
if(m_GameTipA[0].uiStringID != IDS_TIPS_GAMETIP_0)
// don't display the DLC tip in the trial game
if(ProfileManager.IsFullVersion() && app.GetNewDLCAvailable() && app.DisplayNewDLCTip())
{
// don't display the DLC tip in the trial game
if(ProfileManager.IsFullVersion() && app.GetNewDLCAvailable() && app.DisplayNewDLCTip())
return IDS_TIPS_GAMETIP_NEWDLC;
}
else
{
if(bShowSkinDLCTip && ProfileManager.IsFullVersion())
{
return IDS_TIPS_GAMETIP_NEWDLC;
}
else
{
if(bShowSkinDLCTip && ProfileManager.IsFullVersion())
bShowSkinDLCTip=false;
if( app.DLCInstallProcessCompleted() )
{
bShowSkinDLCTip=false;
if( app.DLCInstallProcessCompleted() )
{
if(app.m_dlcManager.getPackCount(DLCManager::e_DLCType_Skin)==0)
{
return IDS_TIPS_GAMETIP_SKINPACKS;
}
}
else
if(app.m_dlcManager.getPackCount(DLCManager::e_DLCType_Skin)==0)
{
return IDS_TIPS_GAMETIP_SKINPACKS;
}
}
else
{
return IDS_TIPS_GAMETIP_SKINPACKS;
}
}
}
@@ -6492,7 +6463,7 @@ wstring CMinecraftApp::FormatHTMLString(int iPad, const wstring &desc, int shado
text = replaceAll(text, L"{*CONTROLLER_ACTION_DPAD_DOWN*}", GetActionReplacement(iPad,MINECRAFT_ACTION_DPAD_DOWN ) );
text = replaceAll(text, L"{*CONTROLLER_ACTION_DPAD_RIGHT*}", GetActionReplacement(iPad,MINECRAFT_ACTION_DPAD_RIGHT ) );
text = replaceAll(text, L"{*CONTROLLER_ACTION_DPAD_LEFT*}", GetActionReplacement(iPad,MINECRAFT_ACTION_DPAD_LEFT ) );
#if !(defined __ORBIS__ || __PS3__)
#if defined _XBOX_ONE || defined __PSVITA__
text = replaceAll(text, L"{*CONTROLLER_VK_START*}", GetVKReplacement(VK_PAD_START ) );
text = replaceAll(text, L"{*CONTROLLER_VK_BACK*}", GetVKReplacement(VK_PAD_BACK ) );
#endif
@@ -6615,12 +6586,8 @@ wstring CMinecraftApp::GetActionReplacement(int iPad, unsigned char ucAction)
#ifdef __PS3__
int size = 30;
#elif defined _WIN64
int size = 30;
if(ui.getScreenWidth() >= 1920)
{
size = 45;
}
int size = 45;
if(ui.getScreenWidth() < 1920) size = 30;
#else
int size = 45;
#endif
@@ -6732,7 +6699,7 @@ wstring CMinecraftApp::GetVKReplacement(unsigned int uiVKey)
case VK_PAD_RTHUMB_DOWNLEFT :
replacement = L"ButtonRightStick";
break;
#if defined _XBOX_ONE || defined __PSVITA__ || defined _WINDOWS64
#if defined _XBOX_ONE || defined __PSVITA__
case VK_PAD_START:
replacement = L"ButtonStart";
break;
@@ -6748,12 +6715,8 @@ wstring CMinecraftApp::GetVKReplacement(unsigned int uiVKey)
#ifdef __PS3__
int size = 30;
#elif defined _WIN64
int size = 30;
if(ui.getScreenWidth() >= 1920)
{
size = 45;
}
int size = 45;
if(ui.getScreenWidth() < 1920) size = 30;
#else
int size = 45;
#endif
@@ -6783,12 +6746,8 @@ wstring CMinecraftApp::GetIconReplacement(unsigned int uiIcon)
#ifdef __PS3__
int size = 22;
#elif defined _WIN64
int size = 22;
if(ui.getScreenWidth() >= 1920)
{
size = 33;
}
int size = 33;
if(ui.getScreenWidth() < 1920) size = 22;
#else
int size = 33;
#endif
@@ -9780,6 +9739,7 @@ void CMinecraftApp::getLocale(vector<wstring> &vecWstrLocales)
locales.push_back(eMCLang_zhCN);
break;
#if defined __PS3__ || defined __ORBIS__ || defined __PSVITA__ || defined _DURANGO
case XC_LANGUAGE_DANISH:
locales.push_back(eMCLang_daDA);
locales.push_back(eMCLang_daDK);
@@ -9805,6 +9765,7 @@ void CMinecraftApp::getLocale(vector<wstring> &vecWstrLocales)
locales.push_back(eMCLang_enGR);
locales.push_back(eMCLang_enGB);
break;
#endif
}
#endif
@@ -10093,13 +10054,13 @@ enum ETitleUpdateTexturePacks
};
#ifdef _WINDOWS64
wstring titleUpdateTexturePackRoot = L"Windows64Media\\DLC\\";
wstring titleUpdateTexturePackRoot = L"Windows64\\DLC\\";
#elif defined(__ORBIS__)
wstring titleUpdateTexturePackRoot = L"app0/Orbis/DLC/";
wstring titleUpdateTexturePackRoot = L"/app0/orbis/CU/DLC/";
#elif defined(__PSVITA__)
wstring titleUpdateTexturePackRoot = L"PSVita/DLC/";
wstring titleUpdateTexturePackRoot = L"PSVita/CU/DLC/";
#elif defined(__PS3__)
wstring titleUpdateTexturePackRoot = L"PS3/DLC/";
wstring titleUpdateTexturePackRoot = L"PS3/CU/DLC/";
#else
wstring titleUpdateTexturePackRoot = L"CU\\DLC\\";
#endif
+9
View File
@@ -857,6 +857,15 @@ public:
static DWORD getSkinIdFromPath(const wstring &skin);
static wstring getSkinPathFromId(DWORD skinId);
virtual int LoadLocalTMSFile(WCHAR *wchTMSFile)=0;
virtual int LoadLocalTMSFile(WCHAR *wchTMSFile, eFileExtensionType eExt)=0;
virtual void FreeLocalTMSFiles(eTMSFileType eType)=0;
virtual int GetLocalTMSFileIndex(WCHAR *wchTMSFile,bool bFilenameIncludesExtension,eFileExtensionType eEXT)=0;
virtual bool GetTMSGlobalFileListRead() { return true;}
virtual bool GetTMSDLCInfoRead() { return true;}
virtual bool GetTMSXUIDsFileRead() { return true;}
bool GetBanListRead(int iPad) { return m_bRead_BannedListA[iPad];}
void SetBanListRead(int iPad,bool bVal) { m_bRead_BannedListA[iPad]=bVal;}
void ClearBanList(int iPad) { BannedListA[iPad].pBannedList=NULL;BannedListA[iPad].dwBytes=0;}
+10 -21
View File
@@ -344,14 +344,14 @@ bool DLCManager::readDLCDataFile(DWORD &dwFilesProcessed, const string &path, DL
}
else if (fromArchive) return false;
#if (defined _DURANGO || _WINDOWS64)
#ifdef _WINDOWS64
string finalPath = StorageManager.GetMountedPath(path.c_str());
if(finalPath.size() == 0) finalPath = path;
HANDLE file = CreateFile(finalPath.c_str(), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
#elif defined(_DURANGO)
wstring finalPath = StorageManager.GetMountedPath(wPath.c_str());
if(finalPath.size() == 0) finalPath = wPath;
#ifdef _DURANGO
HANDLE file = CreateFile(finalPath.c_str(), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
#else
HANDLE file = CreateFileW(finalPath.c_str(), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
#endif
#else
HANDLE file = CreateFile(path.c_str(), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
#endif
@@ -406,12 +406,6 @@ bool DLCManager::processDLCDataFile(DWORD &dwFilesProcessed, PBYTE pbData, DWORD
unsigned int uiVersion=*(unsigned int *)pbData;
uiCurrentByte+=sizeof(int);
if(uiVersion > CURRENT_DLC_VERSION_NUM)
{
if(pbData!=NULL) delete [] pbData;
app.DebugPrintf("DLC version of %d is newer than this build can read (%d)\n", uiVersion, CURRENT_DLC_VERSION_NUM);
return false;
}
if(uiVersion < CURRENT_DLC_VERSION_NUM)
{
if(pbData!=NULL) delete [] pbData;
@@ -557,14 +551,14 @@ DWORD DLCManager::retrievePackIDFromDLCDataFile(const string &path, DLCPack *pac
DWORD packId = 0;
wstring wPath = convStringToWstring(path);
#if (defined _DURANGO || _WINDOWS64)
#ifdef _WINDOWS64
string finalPath = StorageManager.GetMountedPath(path.c_str());
if(finalPath.size() == 0) finalPath = path;
HANDLE file = CreateFile(finalPath.c_str(), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
#elif defined(_DURANGO)
wstring finalPath = StorageManager.GetMountedPath(wPath.c_str());
if(finalPath.size() == 0) finalPath = wPath;
#ifdef _DURANGO
HANDLE file = CreateFile(finalPath.c_str(), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
#else
HANDLE file = CreateFileW(finalPath.c_str(), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
#endif
#else
HANDLE file = CreateFile(path.c_str(), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
#endif
@@ -619,11 +613,6 @@ DWORD DLCManager::retrievePackID(PBYTE pbData, DWORD dwLength, DLCPack *pack)
unsigned int uiVersion=*(unsigned int *)pbData;
uiCurrentByte+=sizeof(int);
if(uiVersion > CURRENT_DLC_VERSION_NUM)
{
app.DebugPrintf("DLC version of %d is newer than this build can read (%d)\n", uiVersion, CURRENT_DLC_VERSION_NUM);
return 0;
}
if(uiVersion < CURRENT_DLC_VERSION_NUM)
{
app.DebugPrintf("DLC version of %d is too old to be read\n", uiVersion);
@@ -464,7 +464,7 @@ void LevelGenerationOptions::loadBaseSaveData()
if(mountIndex > -1)
{
#if (defined _DURANGO || _WINDOWS64)
#ifdef _DURANGO
if(StorageManager.MountInstalledDLC(ProfileManager.GetPrimaryPad(),mountIndex,&LevelGenerationOptions::packMounted,this,L"WPACK")!=ERROR_IO_PENDING)
#else
if(StorageManager.MountInstalledDLC(ProfileManager.GetPrimaryPad(),mountIndex,&LevelGenerationOptions::packMounted,this,"WPACK")!=ERROR_IO_PENDING)
@@ -604,7 +604,7 @@ int LevelGenerationOptions::packMounted(LPVOID pParam,int iPad,DWORD dwErr,DWORD
}
}
#if (defined _DURANGO || _WINDOWS64)
#ifdef _DURANGO
DWORD result = StorageManager.UnmountInstalledDLC(L"WPACK");
#else
DWORD result = StorageManager.UnmountInstalledDLC("WPACK");
@@ -1,7 +1,7 @@
/*
base64.cpp and base64.h
Copyright (C) 2004-2008 René Nyffenegger
Copyright (C) 2004-2008 René Nyffenegger
This source code is provided 'as-is', without any express or implied
warranty. In no event will the author be held liable for any damages
@@ -21,7 +21,7 @@
3. This notice may not be removed or altered from any source distribution.
René Nyffenegger rene.nyffenegger@adp-gmbh.ch
René Nyffenegger rene.nyffenegger@adp-gmbh.ch
*/
@@ -41,7 +41,7 @@ static inline bool is_base64(unsigned char c) {
}
// 4J ADDED,
std::string base64_encode(const std::string& str)
std::string base64_encode(std::string str)
{
return base64_encode( reinterpret_cast<const unsigned char*>(str.c_str()), str.length() );
}
@@ -2,6 +2,6 @@
#include <string>
std::string base64_encode(const std::string& str);
std::string base64_encode(std::string str);
std::string base64_encode(unsigned char const* , unsigned int len);
std::string base64_decode(std::string const& s);
Loaded 100 of 1683 files, more files were not shown because too many files have changed in this diff. Show more