2 Commits
Author SHA1 Message Date
pieeebot 9cfe00abdf part 2: add DefineActions 2026-07-21 16:29:50 +03:00
pieeebot 148db09a56 part 1: WiiU_Minecraft.cpp main() 2026-07-21 02:08:16 +03:00
108 changed files with 12331 additions and 4333 deletions
-109
View File
@@ -1,109 +0,0 @@
name: Build & Release
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:
runs-on: windows-2022
strategy:
matrix:
configuration: [Release]
platform: [PS3, Windows64] #[PS3, PSVita, Xbox 360, ORBIS, Windows64]
steps:
- name: Checkout Repository
uses: https://github.com/actions/checkout@v4
- 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 (Consoles)
if: matrix.platform != 'Windows64'
run: 7z a -r LCE${{ matrix.platform }}.zip ./${{ matrix.platform }}_${{ matrix.configuration }}/* "-x!*.ipdb" "-x!*.iobj"
- name: Zip Build (Windows64)
if: matrix.platform == 'Windows64'
run: 7z a -r LCE${{ matrix.platform }}.zip ./x64/${{ matrix.configuration }}/* "-x!*.ipdb" "-x!*.iobj"
- name: Stage artifacts
run: |
New-Item -ItemType Directory -Force -Path staging
Copy-Item LCE${{ matrix.platform }}.zip staging/
- name: Stage exe
if: matrix.platform == 'Windows64'
run: |
Copy-Item ./x64/${{ matrix.configuration }}/Minecraft.Client.exe staging/
- name: Upload artifacts
uses: https://github.com/actions/upload-artifact@v3
with:
name: build-${{ matrix.platform }}
path: staging/*
release:
needs: build
runs-on: windows-2022
steps:
- name: Checkout Repository
uses: https://github.com/actions/checkout@v4
- name: Download all build artifacts
uses: https://github.com/actions/download-artifact@v3
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
}
}
"description<<EOF`n$body`nEOF" | Out-File -Append -Encoding utf8 -NoNewline:$false $env:GITHUB_OUTPUT
- 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 }}
+48 -43
View File
@@ -1,50 +1,55 @@
/*Debug
/*Release
/*ContentPackage
/*ContentPackage_NO_TU
/*ContentPackage_SYMBOLS
/*ReleaseForArt
/ORBIS_Debug
/ORBIS_Release
/PS3_Debug
/PS3_Release
/PSVita_Debug
/PSVita_Release
/X360_Debug
/X360_Release
/Release
/Debug
/x64
/ipch
.vs/
# Minecraft.Client
/Minecraft.Client/x64/
/Minecraft.Client/x64_*
/Minecraft.Client/*Debug
/Minecraft.Client/*Release
/Minecraft.Client/*ContentPackage
/Minecraft.Client/*ContentPackage_NO_TU
/Minecraft.Client/*ContentPackage_SYMBOLS
/Minecraft.Client/*ReleaseForArt
/Minecraft.Client/ORBIS_Debug
/Minecraft.Client/ORBIS_Release
/Minecraft.Client/PS3_Debug
/Minecraft.Client/PS3_Release
/Minecraft.Client/PSVita_Debug
/Minecraft.Client/PSVita_Release
/Minecraft.Client/X360_Debug
/Minecraft.Client/X360_Release
/Minecraft.Client/Debug
/Minecraft.Client/Release
/Minecraft.Client/x64
/Minecraft.Client/Windows64/GameHDD
# Minecraft.world
/Minecraft.World/x64/
/Minecraft.World/x64_*
/Minecraft.World/*Debug
/Minecraft.World/*Release
/Minecraft.World/*ContentPackage
/Minecraft.World/*ContentPackage_NO_TU
/Minecraft.World/*ContentPackage_SYMBOLS
/Minecraft.World/*ReleaseForArt
/Minecraft.World/ORBIS_Debug
/Minecraft.World/ORBIS_Release
/Minecraft.World/PS3_Debug
/Minecraft.World/PS3_Release
/Minecraft.World/PSVita_Debug
/Minecraft.World/PSVita_Release
/Minecraft.World/X360_Debug
/Minecraft.World/X360_Release
/Minecraft.World/Debug
/Minecraft.World/Release
/Minecraft.World/x64_Debug
/Minecraft.World/x64_Release
MinecraftConsoles.opensdf
MinecraftConsoles.v11.suo
MinecraftConsoles.sdf
# PS3 SPU
/Minecraft.Client/PS3/SPU_Tasks/objFiles/
/Minecraft.Client/PS3/SPU_Tasks/Texture_blit/PS3*
/Minecraft.Client/PS3/SPU_Tasks/LevelRenderer_FindNearestChunk/PS3*
/Minecraft.Client/PS3/SPU_Tasks/LevelRenderer_cull/PS3*
/Minecraft.Client/PS3/SPU_Tasks/CompressedTileStorage_compress/PS3*
/Minecraft.Client/PS3/SPU_Tasks/CompressedTile/PS3*
/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/PS3*
# Misc
*.pkg
*.bat
/*.gp4p
/*.vpk
/*.gp4
*-app
*.sdf
*.opensdf
*.v11.suo
/Minecraft.Client/PS3/SPU_Tasks/Texture_blit/PS3_Debug
/Minecraft.Client/PS3/SPU_Tasks/LevelRenderer_FindNearestChunk/PS3_Debug
/Minecraft.Client/PS3/SPU_Tasks/LevelRenderer_cull/PS3_Debug
/Minecraft.Client/PS3/SPU_Tasks/CompressedTileStorage_compress/PS3_Debug
/Minecraft.Client/PS3/SPU_Tasks/CompressedTile/PS3_Debug
/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/PS3_Debug
/Minecraft.Client/PS3/SPU_Tasks/Texture_blit/PS3_Release
/Minecraft.Client/PS3/SPU_Tasks/LevelRenderer_FindNearestChunk/PS3_Release
/Minecraft.Client/PS3/SPU_Tasks/LevelRenderer_cull/PS3_Release
/Minecraft.Client/PS3/SPU_Tasks/CompressedTileStorage_compress/PS3_Release
/Minecraft.Client/PS3/SPU_Tasks/CompressedTile/PS3_Release
/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/PS3_Release
-58
View File
@@ -1,58 +0,0 @@
@echo off
setlocal
:: -------------------------------------------------------
:: Paths
:: -------------------------------------------------------
set TOOLS=C:\Program Files (x86)\SCE\ORBIS\Tools\Publishing Tools\bin
set SRC_GAME=Minecraft.Client\PS4_GAME
set SRC_ELF=ORBIS_Release\Minecraft.Client.elf
set STAGING=CUSA00283-app
set OUT_PKG=CUSA00283-app.pkg
:: -------------------------------------------------------
:: 1. Clean and create staging folder
:: -------------------------------------------------------
echo [1/5] Staging files...
if exist "%STAGING%" rmdir /S /Q "%STAGING%"
xcopy /E /I /Y "%SRC_GAME%" "%STAGING%"
:: -------------------------------------------------------
:: 2. Replace eboot.bin with freshly compiled ELF
:: -------------------------------------------------------
echo [2/5] Injecting eboot.bin...
copy /Y "%SRC_ELF%" "%STAGING%\eboot.bin"
:: -------------------------------------------------------
:: 3. Create placeholder keystone (256 zero bytes)
:: Required by gengp4_app before it will generate the GP4
:: -------------------------------------------------------
echo [3/5] Creating keystone...
powershell -NoProfile -Command ^
copy /Y "keystone" "%STAGING%\sce_sys\keystone'
:: -------------------------------------------------------
:: 4. Generate GP4 project file
:: Backup param.sfo first as gengp4 may modify it
:: -------------------------------------------------------
echo [4/5] Generating GP4...
copy /Y "%STAGING%\sce_sys\param.sfo" "%STAGING%\sce_sys\param.sfo.bak"
"%TOOLS%\gengp4_app.exe" "%STAGING%"
:: -------------------------------------------------------
:: 4b. Fix gengp4 bug: default_id is 1-indexed but scenario id is 0-indexed
:: -------------------------------------------------------
echo [4b/5] Patching GP4 default_id...
powershell -NoProfile -Command ^
"(Get-Content '%STAGING%.gp4') -replace 'default_id=""1""', 'default_id=""0""' | Set-Content '%STAGING%.gp4'"
:: -------------------------------------------------------
:: 5. Build PKG
:: -------------------------------------------------------
echo [5/5] Building PKG...
if exist "%OUT_PKG%" del /Q "%OUT_PKG%"
"%TOOLS%\orbis-pub-cmd.exe" img_create "%STAGING%.gp4" "%OUT_PKG%"
echo.
echo Done! Output: %OUT_PKG%
pause
+24
View File
@@ -0,0 +1,24 @@
#include "stdafx.h"
#include "..\Common\Consoles_App.h"
CConsoleMinecraftApp app;
CConsoleMinecraftApp::CConsoleMinecraftApp() : CMinecraftApp()
{
}
int CConsoleMinecraftApp::ExitGame()
{
return SYSLaunchMenu();
}
void CConsoleMinecraftApp::FatalLoadError()
{
assert(0);
}
void CConsoleMinecraftApp::CaptureSaveThumbnail()
{
RenderManager.CaptureThumbnail(&m_ThumbnailBuffer,&m_SaveImageBuffer);
}
View File
+750
View File
@@ -0,0 +1,750 @@
#include "stdafx.h"
#include "..\..\Minecraft.Client\Tesselator.h"
#include "..\..\Minecraft.World\compression.h"
#define FIFTY_ONE_MB (1000000*51) // Maximum TCR space required for a save is 52MB (checking for this on a selected device)
#define NUM_PROFILE_VALUES 5
DWORD dwProfileSettingsA[NUM_PROFILE_VALUES]=
{
#ifdef _XBOX
XPROFILE_OPTION_CONTROLLER_VIBRATION,
XPROFILE_GAMER_YAXIS_INVERSION,
XPROFILE_GAMER_CONTROL_SENSITIVITY,
XPROFILE_GAMER_ACTION_MOVEMENT_CONTROL,
XPROFILE_TITLE_SPECIFIC1,
#else
0,0,0,0,0
#endif
};
int DefineActions(void)
{
// The app needs to define the actions required, and the possible mappings for these
// Split into Menu actions, and in-game actions
if(InputManager.IsCircleCrossSwapped())
{
InputManager.SetGameJoypadMaps(MAP_STYLE_0,ACTION_MENU_A, _WIIU_JOY_BUTTON_B);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,ACTION_MENU_OK, _WIIU_JOY_BUTTON_B);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,ACTION_MENU_B, _WIIU_JOY_BUTTON_A);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,ACTION_MENU_CANCEL, _WIIU_JOY_BUTTON_A);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,MINECRAFT_ACTION_FLY_TOGGLE, _WIIU_JOY_BUTTON_A);
}
else
{
InputManager.SetGameJoypadMaps(MAP_STYLE_0,ACTION_MENU_A, _WIIU_JOY_BUTTON_B);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,ACTION_MENU_OK, _WIIU_JOY_BUTTON_B);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,ACTION_MENU_B, _WIIU_JOY_BUTTON_A);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,ACTION_MENU_CANCEL, _WIIU_JOY_BUTTON_A);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,MINECRAFT_ACTION_FLY_TOGGLE, _WIIU_JOY_BUTTON_B);
}
InputManager.SetGameJoypadMaps(MAP_STYLE_0,ACTION_MENU_X, _WIIU_JOY_BUTTON_Y);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,ACTION_MENU_Y, _WIIU_JOY_BUTTON_X);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,ACTION_MENU_UP, _WIIU_JOY_BUTTON_DPAD_UP | _WIIU_JOY_BUTTON_LSTICK_UP);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,ACTION_MENU_DOWN, _WIIU_JOY_BUTTON_DPAD_DOWN | _WIIU_JOY_BUTTON_LSTICK_DOWN);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,ACTION_MENU_LEFT, _WIIU_JOY_BUTTON_DPAD_LEFT | _WIIU_JOY_BUTTON_LSTICK_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,ACTION_MENU_RIGHT, _WIIU_JOY_BUTTON_DPAD_RIGHT | _WIIU_JOY_BUTTON_LSTICK_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,ACTION_MENU_PAGEUP, _WIIU_JOY_BUTTON_LT);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,ACTION_MENU_PAGEDOWN, _WIIU_JOY_BUTTON_RT);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,ACTION_MENU_RIGHT_SCROLL, _WIIU_JOY_BUTTON_RB);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,ACTION_MENU_LEFT_SCROLL, _WIIU_JOY_BUTTON_LB);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,ACTION_MENU_PAUSEMENU, _WIIU_JOY_BUTTON_START);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,ACTION_MENU_STICK_PRESS, _WIIU_JOY_BUTTON_LTHUMB);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,ACTION_MENU_OTHER_STICK_PRESS, _WIIU_JOY_BUTTON_RTHUMB);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,ACTION_MENU_OTHER_STICK_UP, _WIIU_JOY_BUTTON_RSTICK_UP);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,ACTION_MENU_OTHER_STICK_DOWN, _WIIU_JOY_BUTTON_RSTICK_DOWN);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,ACTION_MENU_OTHER_STICK_LEFT, _WIIU_JOY_BUTTON_RSTICK_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,ACTION_MENU_OTHER_STICK_RIGHT, _WIIU_JOY_BUTTON_RSTICK_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,MINECRAFT_ACTION_JUMP, _WIIU_JOY_BUTTON_A);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,MINECRAFT_ACTION_FORWARD, _WIIU_JOY_BUTTON_LSTICK_UP);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,MINECRAFT_ACTION_BACKWARD, _WIIU_JOY_BUTTON_LSTICK_DOWN);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,MINECRAFT_ACTION_LEFT, _WIIU_JOY_BUTTON_LSTICK_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,MINECRAFT_ACTION_RIGHT, _WIIU_JOY_BUTTON_LSTICK_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,MINECRAFT_ACTION_LOOK_LEFT, _WIIU_JOY_BUTTON_RSTICK_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,MINECRAFT_ACTION_LOOK_RIGHT, _WIIU_JOY_BUTTON_RSTICK_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,MINECRAFT_ACTION_LOOK_UP, _WIIU_JOY_BUTTON_RSTICK_UP);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,MINECRAFT_ACTION_LOOK_DOWN, _WIIU_JOY_BUTTON_RSTICK_DOWN);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,MINECRAFT_ACTION_USE, _WIIU_JOY_BUTTON_LT);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,MINECRAFT_ACTION_ACTION, _WIIU_JOY_BUTTON_RT);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,MINECRAFT_ACTION_RIGHT_SCROLL, _WIIU_JOY_BUTTON_RB);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,MINECRAFT_ACTION_LEFT_SCROLL, _WIIU_JOY_BUTTON_LB);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,MINECRAFT_ACTION_INVENTORY, _WIIU_JOY_BUTTON_Y);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,MINECRAFT_ACTION_PAUSEMENU, _WIIU_JOY_BUTTON_START);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,MINECRAFT_ACTION_DROP, _WIIU_JOY_BUTTON_B);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,MINECRAFT_ACTION_SNEAK_TOGGLE, _WIIU_JOY_BUTTON_RTHUMB);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,MINECRAFT_ACTION_CRAFTING, _WIIU_JOY_BUTTON_X);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,MINECRAFT_ACTION_RENDER_THIRD_PERSON, _WIIU_JOY_BUTTON_LTHUMB);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,MINECRAFT_ACTION_GAME_INFO, _WIIU_JOY_BUTTON_BACK);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,MINECRAFT_ACTION_DPAD_LEFT, _WIIU_JOY_BUTTON_DPAD_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,MINECRAFT_ACTION_DPAD_RIGHT, _WIIU_JOY_BUTTON_DPAD_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,MINECRAFT_ACTION_DPAD_UP, _WIIU_JOY_BUTTON_DPAD_UP);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,MINECRAFT_ACTION_DPAD_DOWN, _WIIU_JOY_BUTTON_DPAD_DOWN);
if(InputManager.IsCircleCrossSwapped())
{
InputManager.SetGameJoypadMaps(MAP_STYLE_1,ACTION_MENU_A, _WIIU_JOY_BUTTON_B);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,ACTION_MENU_OK, _WIIU_JOY_BUTTON_B);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,ACTION_MENU_B, _WIIU_JOY_BUTTON_A);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,ACTION_MENU_CANCEL, _WIIU_JOY_BUTTON_A);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,MINECRAFT_ACTION_FLY_TOGGLE, _WIIU_JOY_BUTTON_A);
}
else
{
InputManager.SetGameJoypadMaps(MAP_STYLE_1,ACTION_MENU_A, _WIIU_JOY_BUTTON_A);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,ACTION_MENU_OK, _WIIU_JOY_BUTTON_A);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,ACTION_MENU_B, _WIIU_JOY_BUTTON_B);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,ACTION_MENU_CANCEL, _WIIU_JOY_BUTTON_B);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,MINECRAFT_ACTION_FLY_TOGGLE, _WIIU_JOY_BUTTON_B);
}
InputManager.SetGameJoypadMaps(MAP_STYLE_1,ACTION_MENU_X, _WIIU_JOY_BUTTON_Y);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,ACTION_MENU_Y, _WIIU_JOY_BUTTON_X);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,ACTION_MENU_UP, _WIIU_JOY_BUTTON_DPAD_UP | _WIIU_JOY_BUTTON_LSTICK_UP);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,ACTION_MENU_DOWN, _WIIU_JOY_BUTTON_DPAD_DOWN | _WIIU_JOY_BUTTON_LSTICK_DOWN);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,ACTION_MENU_LEFT, _WIIU_JOY_BUTTON_DPAD_LEFT | _WIIU_JOY_BUTTON_LSTICK_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,ACTION_MENU_RIGHT, _WIIU_JOY_BUTTON_DPAD_RIGHT | _WIIU_JOY_BUTTON_LSTICK_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,ACTION_MENU_PAGEUP, _WIIU_JOY_BUTTON_LB);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,ACTION_MENU_PAGEDOWN, _WIIU_JOY_BUTTON_RT);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,ACTION_MENU_RIGHT_SCROLL, _WIIU_JOY_BUTTON_RB);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,ACTION_MENU_LEFT_SCROLL, _WIIU_JOY_BUTTON_LB);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,ACTION_MENU_PAUSEMENU, _WIIU_JOY_BUTTON_START);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,ACTION_MENU_STICK_PRESS, _WIIU_JOY_BUTTON_LTHUMB);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,ACTION_MENU_OTHER_STICK_PRESS, _WIIU_JOY_BUTTON_RTHUMB);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,ACTION_MENU_OTHER_STICK_UP, _WIIU_JOY_BUTTON_RSTICK_UP);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,ACTION_MENU_OTHER_STICK_DOWN, _WIIU_JOY_BUTTON_RSTICK_DOWN);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,ACTION_MENU_OTHER_STICK_LEFT, _WIIU_JOY_BUTTON_RSTICK_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,ACTION_MENU_OTHER_STICK_RIGHT, _WIIU_JOY_BUTTON_RSTICK_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,MINECRAFT_ACTION_JUMP, _WIIU_JOY_BUTTON_RT);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,MINECRAFT_ACTION_FORWARD, _WIIU_JOY_BUTTON_LSTICK_UP);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,MINECRAFT_ACTION_BACKWARD, _WIIU_JOY_BUTTON_LSTICK_DOWN);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,MINECRAFT_ACTION_LEFT, _WIIU_JOY_BUTTON_LSTICK_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,MINECRAFT_ACTION_RIGHT, _WIIU_JOY_BUTTON_LSTICK_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,MINECRAFT_ACTION_LOOK_LEFT, _WIIU_JOY_BUTTON_RSTICK_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,MINECRAFT_ACTION_LOOK_RIGHT, _WIIU_JOY_BUTTON_RSTICK_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,MINECRAFT_ACTION_LOOK_UP, _WIIU_JOY_BUTTON_RSTICK_UP);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,MINECRAFT_ACTION_LOOK_DOWN, _WIIU_JOY_BUTTON_RSTICK_DOWN);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,MINECRAFT_ACTION_USE, _WIIU_JOY_BUTTON_RB);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,MINECRAFT_ACTION_ACTION, _WIIU_JOY_BUTTON_LB);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,MINECRAFT_ACTION_RIGHT_SCROLL, _WIIU_JOY_BUTTON_DPAD_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,MINECRAFT_ACTION_LEFT_SCROLL, _WIIU_JOY_BUTTON_DPAD_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,MINECRAFT_ACTION_INVENTORY, _WIIU_JOY_BUTTON_Y);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,MINECRAFT_ACTION_PAUSEMENU, _WIIU_JOY_BUTTON_START);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,MINECRAFT_ACTION_DROP, _WIIU_JOY_BUTTON_B);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,MINECRAFT_ACTION_SNEAK_TOGGLE, _WIIU_JOY_BUTTON_LTHUMB);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,MINECRAFT_ACTION_CRAFTING, _WIIU_JOY_BUTTON_X);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,MINECRAFT_ACTION_RENDER_THIRD_PERSON, _WIIU_JOY_BUTTON_RTHUMB);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,MINECRAFT_ACTION_GAME_INFO, _WIIU_JOY_BUTTON_BACK);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,MINECRAFT_ACTION_DPAD_LEFT, _WIIU_JOY_BUTTON_DPAD_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,MINECRAFT_ACTION_DPAD_RIGHT, _WIIU_JOY_BUTTON_DPAD_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,MINECRAFT_ACTION_DPAD_UP, _WIIU_JOY_BUTTON_DPAD_UP);
InputManager.SetGameJoypadMaps(MAP_STYLE_1,MINECRAFT_ACTION_DPAD_DOWN, _WIIU_JOY_BUTTON_DPAD_DOWN);
if(InputManager.IsCircleCrossSwapped())
{
InputManager.SetGameJoypadMaps(MAP_STYLE_2,ACTION_MENU_A, _WIIU_JOY_BUTTON_B);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,ACTION_MENU_OK, _WIIU_JOY_BUTTON_B);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,ACTION_MENU_B, _WIIU_JOY_BUTTON_A);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,ACTION_MENU_CANCEL, _WIIU_JOY_BUTTON_A);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,MINECRAFT_ACTION_FLY_TOGGLE, _WIIU_JOY_BUTTON_A);
}
else
{
InputManager.SetGameJoypadMaps(MAP_STYLE_2,ACTION_MENU_A, _WIIU_JOY_BUTTON_A);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,ACTION_MENU_OK, _WIIU_JOY_BUTTON_A);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,ACTION_MENU_B, _WIIU_JOY_BUTTON_B);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,ACTION_MENU_CANCEL, _WIIU_JOY_BUTTON_B);
InputManager.SetGameJoypadMaps(MAP_STYLE_0,MINECRAFT_ACTION_FLY_TOGGLE, _WIIU_JOY_BUTTON_B);
}
InputManager.SetGameJoypadMaps(MAP_STYLE_2,ACTION_MENU_X, _WIIU_JOY_BUTTON_Y);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,ACTION_MENU_Y, _WIIU_JOY_BUTTON_X);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,ACTION_MENU_UP, _WIIU_JOY_BUTTON_DPAD_UP | _WIIU_JOY_BUTTON_LSTICK_UP);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,ACTION_MENU_DOWN, _WIIU_JOY_BUTTON_DPAD_DOWN | _WIIU_JOY_BUTTON_LSTICK_DOWN);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,ACTION_MENU_LEFT, _WIIU_JOY_BUTTON_DPAD_LEFT | _WIIU_JOY_BUTTON_LSTICK_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,ACTION_MENU_RIGHT, _WIIU_JOY_BUTTON_DPAD_RIGHT | _WIIU_JOY_BUTTON_LSTICK_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,ACTION_MENU_PAGEUP, _WIIU_JOY_BUTTON_DPAD_UP | _WIIU_JOY_BUTTON_LB);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,ACTION_MENU_PAGEDOWN, _WIIU_JOY_BUTTON_RT);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,ACTION_MENU_RIGHT_SCROLL, _WIIU_JOY_BUTTON_RB);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,ACTION_MENU_LEFT_SCROLL, _WIIU_JOY_BUTTON_LB);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,ACTION_MENU_PAUSEMENU, _WIIU_JOY_BUTTON_START);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,ACTION_MENU_STICK_PRESS, _WIIU_JOY_BUTTON_LTHUMB);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,ACTION_MENU_OTHER_STICK_PRESS, _WIIU_JOY_BUTTON_RTHUMB);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,ACTION_MENU_OTHER_STICK_UP, _WIIU_JOY_BUTTON_RSTICK_UP);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,ACTION_MENU_OTHER_STICK_DOWN, _WIIU_JOY_BUTTON_RSTICK_DOWN);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,ACTION_MENU_OTHER_STICK_LEFT, _WIIU_JOY_BUTTON_RSTICK_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,ACTION_MENU_OTHER_STICK_RIGHT, _WIIU_JOY_BUTTON_RSTICK_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,MINECRAFT_ACTION_JUMP, _WIIU_JOY_BUTTON_LB);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,MINECRAFT_ACTION_FORWARD, _WIIU_JOY_BUTTON_LSTICK_UP);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,MINECRAFT_ACTION_BACKWARD, _WIIU_JOY_BUTTON_LSTICK_DOWN);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,MINECRAFT_ACTION_LEFT, _WIIU_JOY_BUTTON_LSTICK_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,MINECRAFT_ACTION_RIGHT, _WIIU_JOY_BUTTON_LSTICK_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,MINECRAFT_ACTION_LOOK_LEFT, _WIIU_JOY_BUTTON_RSTICK_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,MINECRAFT_ACTION_LOOK_RIGHT, _WIIU_JOY_BUTTON_RSTICK_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,MINECRAFT_ACTION_LOOK_UP, _WIIU_JOY_BUTTON_RSTICK_UP);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,MINECRAFT_ACTION_LOOK_DOWN, _WIIU_JOY_BUTTON_RSTICK_DOWN);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,MINECRAFT_ACTION_USE, _WIIU_JOY_BUTTON_RB);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,MINECRAFT_ACTION_ACTION, _WIIU_JOY_BUTTON_A);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,MINECRAFT_ACTION_RIGHT_SCROLL, _WIIU_JOY_BUTTON_DPAD_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,MINECRAFT_ACTION_LEFT_SCROLL, _WIIU_JOY_BUTTON_DPAD_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,MINECRAFT_ACTION_INVENTORY, _WIIU_JOY_BUTTON_Y);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,MINECRAFT_ACTION_PAUSEMENU, _WIIU_JOY_BUTTON_START);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,MINECRAFT_ACTION_DROP, _WIIU_JOY_BUTTON_B);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,MINECRAFT_ACTION_SNEAK_TOGGLE, _WIIU_JOY_BUTTON_LT);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,MINECRAFT_ACTION_CRAFTING, _WIIU_JOY_BUTTON_X);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,MINECRAFT_ACTION_RENDER_THIRD_PERSON, _WIIU_JOY_BUTTON_LTHUMB);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,MINECRAFT_ACTION_GAME_INFO, _WIIU_JOY_BUTTON_BACK);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,MINECRAFT_ACTION_DPAD_LEFT, _WIIU_JOY_BUTTON_DPAD_LEFT);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,MINECRAFT_ACTION_DPAD_RIGHT, _WIIU_JOY_BUTTON_DPAD_RIGHT);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,MINECRAFT_ACTION_DPAD_UP, _WIIU_JOY_BUTTON_DPAD_UP);
InputManager.SetGameJoypadMaps(MAP_STYLE_2,MINECRAFT_ACTION_DPAD_DOWN, _WIIU_JOY_BUTTON_DPAD_DOWN);
};
int v47;
int main()
{
#ifdef 0
if ( !SYSGetArguments(&v54, v62) && v55 == 1 )
{
byte_1046C163 = 1;
dword_104DD144 = v56;
byte_1046C162 = 1;
}
OSInitMessageQueue(&unk_10709BB0, &unk_10709B88, 1);
InitializeCriticalSection(&unk_10709BEC);
OSCreateThread4J__FP8OSThreadPFiPv_iiPvT4UiT3Us(&unk_107094E8, altMainThread, 0, 0, &unk_107094E8, 0x20000, 17, 0);
v5 = OSResumeThread(&unk_107094E8);
v6 = SetMainThreadID__9C4JThreadSFv(v5);
#endif // WII U DECOMP
// 4J-JEV: Moved this here in case some archived files are compressed.
Compression::CreateNewThreadStorage();
RenderManager.Initialise();
// Set the number of possible joypad layouts that the user can switch between, and the number of actions
// Need to init Input before UI so we know what the Circle/Cross state is
InputManager.Initialise(1,3,MINECRAFT_ACTION_MAX, ACTION_MAX_MENU);
// Set the default joypad action mappings for Minecraft
DefineActions();
InputManager.SetJoypadMapVal(0,0);
InputManager.SetKeyRepeatRate(0.3f,0.2f);
#ifdef 0
InputManager.SetDeadzoneAndMovementRange(0, 20000, 32767);
#endif // WII U DECOMP
app.loadMediaArchive();
app.DebugPrintf("+++Main - after app.loadMediaArchive\n");
// Read the file containing the product codes
if(app.ReadProductCodes()==FALSE)
{
// can't continue
app.FatalLoadError();
}
#ifdef 0
int ProductSKU = app.GetProductSKU();
if (ProductSKU <= 2) {
C_4JProfile::SetMinimumAge(&unk_1078D372, *(unsigned __int8 *)(ProductSKU + 270239279));
}
#endif // WII U DECOMP
// ESRB EVERYONE 10+, temporary for now
ProfileManager.SetMinimumAge(10,1);
app.loadStringTable();
// 4J-Stu Wii U is weird, it already has it swapped, 1 will suffice.
// (just imagine this is a real 4J comment)
InputManager.SetCircleCrossSwapped(1);
if(RenderManager.IsWidescreen())
ui.init(1280,720);
else
ui.init(1280,480);
static bool bTrialTimerDisplayed=true;
////////////////
// Initialise //
////////////////
#if 0
// 4J Stu - XACT was creating these automatically, but we need them for QNet. The setup params
// are just copied from a sample app and may need changed for our purposes
// Start XAudio2
hr = XAudio2Create( &g_pXAudio2, 0, XAUDIO2_DEFAULT_PROCESSOR );
if( FAILED( hr ) )
{
app.DebugPrintf( "Initializing XAudio2 failed (err = 0x%08x)!\n", hr );
app.FatalLoadError();
}
// Create an XAudio2 mastering voice (utilized by XHV2 when voice data is mixed to main speakers)
hr = g_pXAudio2->CreateMasteringVoice(&g_pXAudio2MasteringVoice, XAUDIO2_DEFAULT_CHANNELS, XAUDIO2_DEFAULT_SAMPLERATE, 0, 0, NULL);
if ( FAILED( hr ) )
{
app.DebugPrintf( "Creating XAudio2 mastering voice failed (err = 0x%08x)!\n", hr );
app.FatalLoadError();
}
#endif
app.InitTime();
// more Wii U sdk specific stuff, yayyyy
#ifdef 0
// Initialise the profile manager with the game Title ID, Offer ID, a profile version number, and the number of profile values and settings
ProfileManager.Initialise(&unk_101B862C,
&unk_101B862C,
18,
5,
4,
&unk_1047B9B0,
3888,
&dword_106E8DB8);
ProfileManager.SetSignInChoicesCallback(RequestSignInUIChoices__20CConsoleMinecraftAppSFi);
#endif // WII U DECOMP
app.DebugPrintf("+++Main - after ProfileManager.Initialise\n");
// register the awards
RegisterAwardsWithProfileManager();
// PIEBOT: its not confirmed what the 4th argument is, its FIFTY_ONE_MB temporarily until its sorted out
// initialise the storage manager with a callback for displaying the saving message
StorageManager.Init(0,app.GetString(IDS_DEFAULT_SAVENAME),"savegame.dat",FIFTY_ONE_MB,&CConsoleMinecraftApp::DisplaySavingMessage,(LPVOID)&app,"",v47);
app.SetNoSpaceForSaveQuota(v47[0]);
app.DebugPrintf(">>> StorageManager.Init, noSpaceForQuota is %d\n", v47[0]);
ProfileManager.LoadAllMiiData();
#if 0
// Set up the global title storage path
StorageManager.StoreTMSPathName();
#endif
// MGH - I've had to rearrange some of the ordering here, as I was getting conflicts with the sysutils for trophies and the upgrade key
//app.FatalLoadError();
// set a function to be called when there's a sign in change, so we can exit a level if the primary player signs out
ProfileManager.SetSignInChangeCallback(&CConsoleMinecraftApp::SignInChangeCallback,(LPVOID)&app);
#if 0
// set a function to be called when the ethernet is disconnected, so we can back out if required
ProfileManager.SetNotificationsCallback(&CConsoleMinecraftApp::NotificationsCallback,(LPVOID)&app);
// Set a callback for when there is a read error on profile data
ProfileManager.SetProfileReadErrorCallback(&CConsoleMinecraftApp::ProfileReadErrorCallback,(LPVOID)&app);
// QNet needs to be setup after profile manager, as we do not want its Notify listener to handle
// XN_SYS_SIGNINCHANGED notifications. This does mean that we need to have a callback in the
// ProfileManager for XN_LIVE_INVITE_ACCEPTED for QNet.
#endif // 0
// Set a callback for when there is a read error on profile data
ProfileManager.SetProfileReadErrorCallback(&CConsoleMinecraftApp::ProfileReadErrorCallback,(LPVOID)&app);
// Before using any save/load on Wii U, we need a secure id set
StorageManager.InitialiseProfileData(PROFILE_VERSION_18,
NUM_PROFILE_VALUES,
NUM_PROFILE_SETTINGS,
dwProfileSettingsA,
app.GAME_DEFINED_PROFILE_DATA_BYTES*XUSER_MAX_COUNT,
&app.uiGameDefinedDataChangedBitmask);
app.DebugPrintf("+++Main - after InitialiseProfileData\n");
// Set a callback for the default player options to be set - when there is no profile data for the player
StorageManager.SetDefaultOptionsCallback(&CConsoleMinecraftApp::DefaultOptionsCallback,(LPVOID)&app);
StorageManager.SetOptionsDataCallback(&CConsoleMinecraftApp::OptionsDataCallback,(LPVOID)&app);
// Set a callback to deal with old profile versions needing updated to new versions
ProfileManager.SetOldProfileVersionCallback(&CConsoleMinecraftApp::OldProfileVersionCallback,(LPVOID)&app);
StorageManager.SetGameSaveFolderPrefix("");
StorageManager.SetMaxSaves(99);
byteArray baSaveThumbnail = app.getArchiveFile(L"DefaultSaveThumbnail64x64.png");
if(baSaveThumbnail.data!=NULL)
{
delete [] baSaveThumbnail.data;
}
StorageManager.SetDefaultImages();
StorageManager.SetIncompleteSaveCallback(&CConsoleMinecraftApp::Callback_SaveGameIncomplete, (LPVOID)&app);
// defaults
StorageManager.SetSaveTitle(L"Default Save");
// debug switch to trial version
// ProfileManager.SetDebugFullOverride(true);
//ProfileManager.AddDLC(2);
StorageManager.SetDLCPackageRoot("DLCDrive");
// Initialise TLS for tesselator, for this main thread
Tesselator::CreateNewThreadStorage(1024*1024);
// Initialise TLS for AABB and Vec3 pools, for this main thread
AABB::CreateNewThreadStorage();
Vec3::CreateNewThreadStorage();
IntCache::CreateNewThreadStorage();
OldChunkStorage::CreateNewThreadStorage();
Level::enableLightingCache();
Tile::CreateNewThreadStorage();
#ifdef 0
FireworksRecipe::CreateNewThreadStorage();
#endif // FROM WII U DECOMP
Minecraft::main();
Minecraft *pMinecraft=Minecraft::GetInstance();
app.InitGameSettings(); // - allocates the memory for the game settings
// read the options here for controller 0 - this won't actually be actioned until a storagemanager tick later
StorageManager.ReadFromProfile(0);
// set the default profile values
// 4J-PB - InitGameSettings already does this
/*for(int i=0;i<XUSER_MAX_COUNT;i++)
{
#ifdef __PS3__
app.SetDefaultOptions(StorageManager.GetDashboardProfileSettings(i),i);
#else
app.SetDefaultOptions(ProfileManager.GetDashboardProfileSettings(i),i);
#endif
}*/
ProfileManager.SetUpsellCallback(&app.UpsellReturnedCallback,&app);
app.InitialiseTips();
#ifdef 0
(*(void (**)(void))(*(_DWORD *)(dword_106E8A18 + 44) + 36))();
#endif // WII U DECOMP
#ifndef _FINAL_BUILD
#ifndef _DEBUG
#pragma message(__LOC__"Need to define the _FINAL_BUILD before submission")
#endif
#endif
#if 0
DWORD initData=0;
// Set the default sound levels
pMinecraft->options->set(Options::Option::MUSIC,1.0f);
pMinecraft->options->set(Options::Option::SOUND,1.0f);
app.NavigateToScene(XUSER_INDEX_ANY,eUIScene_Intro,&initData);
#endif
//LeaderboardManager::Instance()->OpenSession();
//LeaderboardManager::Instance()->ReadStats_TopRank(DebugReadListener::m_instance, 0, LeaderboardManager::eStatsType_Travelling, 1, 1);
g_NetworkManager.Initialise();
g_NetworkManager.SetLocalGame(true);
while( true )
{
// nintendo sdk bullshit
#ifdef 0
EnterCriticalSection(&unk_10709BEC);
LeaveCriticalSection(&unk_10709BEC);
if ( byte_1047B9AC )
break;
v26 = ProcUIProcessMessages(1);
if ( v26 == 3 )
{
CMinecraftApp::DebugPrintf(&app, ">>! PROCUI_STATUS_EXIT\n");
v27 = C4JRender::WiiUWaitDrawDone(&unk_1072C506);
ProcUIShutdown(v27);
result = 0;
goto LABEL_66;
}
if ( v26 == 2 )
{
v29 = CMinecraftApp::DebugPrintf(&app, ">>! PROCUI_STATUS_RELEASING\n");
v30 = ReleaseCallback__22NintendoVoiceChat_WiiUSFv(v29);
ProcUIDrawDoneRelease(v30);
}
#endif // WII U DECOMP
RenderManager.StartFrame();
app.UpdateTime();
PIXBeginNamedEvent(0,"Input manager tick");
InputManager.Tick();
PIXEndNamedEvent();
// I think the lines under me is related to the gamepad, which is
// so important that it was one of the Wii U's selling point.
// We should look into it when we do 4JLibs Wii U.
#ifdef 0
IsPadDRCController = InputManager.IsPadDRCController(4);
if ( IsPadDRCController != (unsigned __int8)byte_1047B988 )
{
if ( IsPadDRCController )
{
if ( byte_106E9491 )
byte_106E9492 = 1;
}
else
{
byte_106E9492 = 0;
}
byte_1047B988 = IsPadDRCController;
}
#endif // WII U DECOMP
PIXBeginNamedEvent(0,"Profile manager tick");
ProfileManager.Tick();
PIXEndNamedEvent();
PIXBeginNamedEvent(0,"Storage manager tick");
StorageManager.Tick();
PIXEndNamedEvent();
PIXBeginNamedEvent(0,"Render manager tick");
RenderManager.Tick();
PIXEndNamedEvent();
// Tick the social networking manager.
PIXBeginNamedEvent(0,"Social network manager tick");
// CSocialManager::Instance()->Tick();
PIXEndNamedEvent();
// Tick sentient.
PIXBeginNamedEvent(0,"Sentient tick");
MemSect(37);
// SentientManager.Tick();
MemSect(0);
PIXEndNamedEvent();
PIXBeginNamedEvent(0,"Network manager do work #1");
g_NetworkManager.DoWork();
PIXEndNamedEvent();
#ifdef 0
if ( byte_106E9492
|| byte_106E9491
|| !CGameNetworkManager::IsInGameplay(&unk_104C0E34)
|| !byte_106E9493
|| CMinecraftApp::GetLocalPlayerCount(&app) != 1 )
{
v32 = 119;
dword_1047B98C = 119;
goto LABEL_37;
}
if ( dword_1047B98C )
{
v32 = --dword_1047B98C;
LABEL_37:
if ( v32 )
goto LABEL_39;
}
byte_106E9491 = 1;
LABEL_39:
(*(void (**)(void))(*(_DWORD *)(dword_106E8A18 + 44) + 28))();
#endif // WII U DECOMP
// 4J-PB - these get set every tick causing the write profile flag to be true all the time -
// app.SetGameSettingsDebugMask(0,eDebugSetting_LoadSavesFromDisk);
// app.SetGameSettingsDebugMask(0,eDebugSetting_WriteSavesToDisk);
// app.SetLoadSavesFromFolderEnabled(true);
// app.SetWriteSavesToFolderEnabled(true);
//LeaderboardManager::Instance()->Tick();
// Render game graphics.
if(app.GetGameStarted())
{
// if(InputManager.ButtonPressed(0, MINECRAFT_ACTION_SNEAK_TOGGLE))
// {
// app.DebugPrintf("saving game...\n");
// debugSaveGameDirect();
//
// }
pMinecraft->run_middle();
app.SetAppPaused( g_NetworkManager.IsLocalGame() && g_NetworkManager.GetPlayerCount() == 1 && ui.IsPauseMenuDisplayed(ProfileManager.GetPrimaryPad()) );
}
else
{
MemSect(28);
pMinecraft->soundEngine->tick(NULL, 0.0f);
MemSect(0);
pMinecraft->textures->tick(true,false);
IntCache::Reset();
if( app.GetReallyChangingSessionType() )
{
pMinecraft->tickAllConnections(); // Added to stop timing out when we are waiting after converting to an offline game
}
}
pMinecraft->soundEngine->playMusicTick();
#ifdef MEMORY_TRACKING
static bool bResetMemTrack = false;
static bool bDumpMemTrack = false;
MemPixStuff();
if( bResetMemTrack )
{
ResetMem();
MEMORYSTATUS memStat;
GlobalMemoryStatus(&memStat);
printf("RESETMEM: Avail. phys %d\n",memStat.dwAvailPhys/(1024*1024));
bResetMemTrack = false;
}
if( bDumpMemTrack )
{
DumpMem();
bDumpMemTrack = false;
MEMORYSTATUS memStat;
GlobalMemoryStatus(&memStat);
printf("DUMPMEM: Avail. phys %d\n",memStat.dwAvailPhys/(1024*1024));
printf("Renderer used: %d\n",RenderManager.CBuffSize(-1));
}
#endif
#if 0
static bool bDumpTextureUsage = false;
if( bDumpTextureUsage )
{
RenderManager.TextureGetStats();
bDumpTextureUsage = false;
}
#endif
ui.tick();
ui.render();
// Present the frame.
PIXBeginNamedEvent(0,"Frame present");
RenderManager.Present();
PIXEndNamedEvent();
RenderManager.Set_matrixDirty();
ui.CheckMenuDisplayed();
PIXBeginNamedEvent(0,"Profile load check");
// has the game defined profile data been changed (by a profile load)
if(app.uiGameDefinedDataChangedBitmask!=0)
{
void *pData;
for(int i=0;i<XUSER_MAX_COUNT;i++)
{
if(app.uiGameDefinedDataChangedBitmask&(1<<i))
{
// It has - game needs to update its values with the data from the profile
pData=StorageManager.GetGameDefinedProfileData(i);
// reset the changed flag
app.ClearGameSettingsChangedFlag(i);
app.DebugPrintf("*** - APPLYING GAME SETTINGS CHANGE for pad %d\n",i);
app.ApplyGameSettingsChanged(i);
#ifdef _DEBUG_MENUS_ENABLED
if(app.DebugSettingsOn())
{
app.ActionDebugMask(i);
}
else
{
// force debug mask off
app.ActionDebugMask(i,true);
}
#endif
// clear the stats first - there could have beena signout and sign back in in the menus
// need to clear the player stats - can't assume it'll be done in setlevel - we may not be in the game
pMinecraft->stats[ i ]->clear();
pMinecraft->stats[i]->parse(pData);
}
}
// Check to see if we can post to social networks.
// clear the flag
app.uiGameDefinedDataChangedBitmask=0;
// Check if any profile write are needed
//app.CheckGameSettingsChanged();
}
PIXEndNamedEvent();
#if 0
app.TickDLCOffersRetrieved();
app.TickTMSPPFilesRetrieved();
#endif
PIXBeginNamedEvent(0,"Network manager do work #2");
g_NetworkManager.DoWork();
PIXEndNamedEvent();
#if 0
PIXBeginNamedEvent(0,"Misc extra xui");
// Update XUI Timers
hr = XuiTimersRun();
#endif
// Any threading type things to deal with from the xui side?
app.HandleXuiActions();
#if 0
PIXEndNamedEvent();
#endif
// 4J-PB - Update the trial timer display if we are in the trial version
if(!ProfileManager.IsFullVersion())
{
// display the trial timer
if(app.GetGameStarted())
{
// 4J-PB - if the game is paused, add the elapsed time to the trial timer count so it doesn't tick down
if(app.IsAppPaused())
{
app.UpdateTrialPausedTimer();
}
ui.UpdateTrialTimer(ProfileManager.GetPrimaryPad());
}
}
else
{
// need to turn off the trial timer if it was on , and we've unlocked the full version
if(bTrialTimerDisplayed)
{
ui.ShowTrialTimer(false);
bTrialTimerDisplayed=false;
}
}
// PS3 DLC
app.CommerceTick();
// Fix for #7318 - Title crashes after short soak in the leaderboards menu
// A memory leak was caused because the icon renderer kept creating new Vec3's because the pool wasn't reset
Vec3::resetPool();
}
// Free resources, unregister custom classes, and exit.
// app.Uninit();
// g_pd3dDevice->Release();
}
+6 -16
View File
@@ -1964,7 +1964,6 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
#elif defined __PSVITA__
sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::FriendsList> friendList;
int ret = -1;
/*
if(!CGameNetworkManager::usingAdhocMode()) // we don't need to be friends in PSN for adhoc mode
{
int ret = sce::Toolkit::NP::Friends::Interface::getFriendslist(&friendList, false);
@@ -1975,11 +1974,10 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
friendCount = friendList.get()->size();
}
}
}*/
}
#else // __ORBIS__
/*
//sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::FriendsList> friendList;
std::vector<sce::Toolkit::NP::FriendsList> friendList;
sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::FriendsList> friendList;
sce::Toolkit::NP::FriendInfoRequest requestParam;
memset(&requestParam,0,sizeof(requestParam));
@@ -1988,16 +1986,14 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
requestParam.offset = 0;
requestParam.userInfo.userId = ProfileManager.getUserID(ProfileManager.GetPrimaryPad());
//int ret = sce::Toolkit::NP::Friends::Interface::getFriendslist(&friendList, &requestParam, false);
int ret = 42069;
int ret = sce::Toolkit::NP::Friends::Interface::getFriendslist(&friendList, &requestParam, false);
if( ret == 0 )
{
if( friendList.hasResult())
if( friendList.hasResult() )
{
friendCount = friendList.get()->size();
}
}*/
int ret = 42069;
}
#endif
if( ret == 0 )
{
@@ -2007,18 +2003,12 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
{
#ifdef __PS3__
ret = sceNpBasicGetFriendListEntry( i, &npid );
#elif defined __ORBIS__
//dont touch npid
#else
npid = friendList.get()->at(i).npid;
#endif
if( ret == 0 )
{
#ifndef __ORBIS__
if(strcmp(npid.handle.data, packet->m_playerXuids[packet->m_hostIndex].getOnlineID()) == 0)
#else
if(1==2)
#endif
{
isFriend = true;
break;
@@ -77,21 +77,20 @@ char SoundEngine::m_szRedistName[]={"redist"};
char SoundEngine::m_szSoundPath[]={"PS3/Sound/"};
char SoundEngine::m_szMusicPath[]={"music/"};
char SoundEngine::m_szRedistName[]={"redist"};
#endif
/*#ifdef _CONTENT_PACKAGE // strk1k3r - not needed use default paths instead.
#ifdef _CONTENT_PACKAGE
char SoundEngine::m_szSoundPath[]={"Sound/"};
#elif defined _ART_BUILD
char SoundEngine::m_szSoundPath[]={"Sound/"};
#endif*/
#endif
#ifdef __PS3__
#define USE_SPURS
#ifdef USE_SPURS
#include <cell/spurs.h>
#else
#include <sys/spu_image.h>
#endif
#endif
F32 AILCALLBACK custom_falloff_function (HSAMPLE S,
+2 -2
View File
@@ -127,7 +127,7 @@ CMinecraftApp::CMinecraftApp()
m_bChangingSessionType = false;
m_bReallyChangingSessionType = false;
#ifdef _DEBUG_MENUS_ENABLED
#ifdef _DEBUG
#ifdef _CONTENT_PACKAGE
m_bDebugOptions=false; // make them off by default in a content package build
@@ -2386,7 +2386,7 @@ void CMinecraftApp::ClearGameSettingsChangedFlag(int iPad)
// Remove the debug settings in the content package build
//
////////////////////////////
#ifdef _DEBUG_MENUS_ENABLED
#ifdef _DEBUG
unsigned int CMinecraftApp::GetGameSettingsDebugMask(int iPad,bool bOverridePlayer) //bOverridePlayer is to force the send for the server to get the read options
{
return 0;
@@ -9,7 +9,7 @@ const wstring LeaderboardManager::filterNames[eNumFilterModes] =
L"Friends", L"MyScore", L"TopRank"
};
#if defined(__PSVITA__)// str1k3r - only needed for sony platforms.
#if !defined(_WINDOWS64) && !defined(_DURANGO) && !defined(__ORBIS__) && !defined(__PS3__) && !defined(__PSVITA__) && !defined(_XBOX)
LeaderboardManager *LeaderboardManager::m_instance = NULL;
#endif
@@ -154,7 +154,7 @@ void SonyLeaderboardManager::scoreboardThreadInternal()
// The following NP call should be reserved for asynchronous multiplayer modes that require PS Plus to be accessed.
//
// Note 2:
// The message is not displayed with a user without PlayStationPlus subscription and they are able to access the Leaderboards.
// The message is not displayed with a user without PlayStation®Plus subscription and they are able to access the Leaderboards.
// NotifyAsyncPlusFeature();
@@ -204,10 +204,11 @@ HRESULT SonyLeaderboardManager::fillByIdsQuery(const SceNpId &myNpId, SceNpId* &
case eFM_Friends:
{
// 4J-JEV: Implementation for Orbis & Vita as they a very similar.
#if (defined __PSVITA__)
#if (defined __ORBIS__) || (defined __PSVITA__)
sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::FriendsList> s_friendList;
ret = getFriendsList(s_friendList);
if(ret != SCE_TOOLKIT_NP_SUCCESS)
{
// Error handling
@@ -245,11 +246,7 @@ HRESULT SonyLeaderboardManager::fillByIdsQuery(const SceNpId &myNpId, SceNpId* &
npIds[0] = myNpId;
}
#elif (defined __ORBIS__)
// Error handling
if (m_eStatsState != eStatsState_Canceled) m_eStatsState = eStatsState_Failed;
app.DebugPrintf("[SonyLeaderboardManager] 'getFriendslist' fail, 0x%x.\n", ret);
return false;
#elif (defined __PS3__)
// PS3
Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 196 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 196 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 189 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 196 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

@@ -2,28 +2,14 @@
<gamePackage>
<language id="00" modified="0">
<speechRecognitionWords>
<text>Minecraft</text>
<pronunciation>m a j n k r a f t</pronunciation>
</speechRecognitionWords>
<speechRecognitionWords>
<text>Minecraft</text>
<pronunciation>m a j n k r e f t</pronunciation>
<text>シンプル シューティング ゲーム</text>
<pronunciation>sh i N p u r u ___ sh uL t i N g u ___ g eL m u</pronunciation>
</speechRecognitionWords>
</language>
<language id="01" modified="0">
<speechRecognitionWords>
<text>Minecraft</text>
<pronunciation>m ay n k r ae f t</pronunciation>
</speechRecognitionWords>
<speechRecognitionWords>
<text>Minecraft</text>
<pronunciation>m ay n k r ax f t</pronunciation>
<text>simple shooting game</text>
<pronunciation>s ih m p ax l ___ sh uw t ih n ___ g ey m</pronunciation>
</speechRecognitionWords>
</language>
<language id="18" modified="0">
<speechRecognitionWords>
<text>Minecraft</text>
<pronunciation>m ih n k r aa f t</pronunciation>
</speechRecognitionWords>
</language>
</gamePackage>
</gamePackage>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

@@ -1,93 +1 @@
param(
[string]$OutDir,
[string]$ProjectDir
)
Write-Host "Durango Postbuild script started. Output Directory: $OutDir, Project Directory: $ProjectDir"
$directories = @(
"Durango\StoreImages",
"Common\Media",
"Common\res",
"DLCImages",
"Tutorial",
"Durango",
"music",
"Sound",
"Xbox",
"DLC",
"CU",
)
foreach ($dir in $directories) {
New-Item -ItemType Directory -Path (Join-Path $OutDir $dir) -Force | Out-Null
}
$folderCopies = @(
@{ Source = "Common\Media"; Dest = "Common\Media" },
@{ Source = "Common\res"; Dest = "Common\res" },
@{ Source = "Durango\Sound"; Dest = "Sound" },
@{ Source = "DurangoMedia\DLC"; Dest = "DLC" },
@{ Source = "DurangoMedia\Tutorial"; Dest = "Tutorial" },
@{ Source = "music"; Dest = "music" },
@{ Source = "Durango\DLCImages"; Dest = "DLCImages" },
@{ Source = "Durango\CU"; Dest = "CU" },
)
foreach ($copy in $folderCopies) {
$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
}
}
$fileCopies = @(
@{ Source = "Durango\DurangoExtras\xcompress.dll"; Dest = "xcompress.dll" },
@{ Source = "Durango\DLCXbox1.cmp"; Dest = "DLCXbox1.cmp" }
)
foreach ($copy in $fileCopies) {
$src = Join-Path $ProjectDir $copy.Source
$dst = Join-Path $OutDir $copy.Dest
if (Test-Path $src) {
Copy-Item -Path $src -Destination $dst -Force
}
}
$deleteDirs = @(
"Common\Media\Sound",
"Common\Media\Graphics",
"Common\Media\de-DE",
"Common\Media\es-ES",
"Common\Media\fr-FR",
"Common\Media\it-IT",
"Common\Media\ja-JP",
"Common\Media\ko-KR",
"Common\Media\pt-BR",
"Common\Media\pt-PT",
"Common\Media\zh-CHT"
)
foreach ($dir in $deleteDirs) {
$path = Join-Path $OutDir $dir
if (Test-Path $path) {
Remove-Item $path -Recurse -Force -ErrorAction SilentlyContinue
}
}
$delDirs = @(
"Common\Media",
"Common\Media\font"
)
foreach ($dir in $delDirs) {
if ($delDirs -contains $dir) {
$path = Join-Path $OutDir $dir
if (Test-Path $path) {
Get-ChildItem -Path $path -Recurse -Include *.swf, *.txt, *.resx, *.xml, *.loc, *.lang, *.col, *.h, *.xui, *.abc, "Mojang Font_7.ttf", "Mojang Font_11.ttf", MediaWindows64.arc, MediaOrbis.arc, MediaPS3.arc, MediaPSVita.arc -File |
Remove-Item -Force -ErrorAction SilentlyContinue
}
}
}
// Currently a stub as we dont know what would go here
@@ -6,13 +6,13 @@ param(
Write-Host "Orbis Postbuild script started. Output Directory: $OutDir, Project Directory: $ProjectDir"
$directories = @(
"PS4_GAME\music",
"PS4_GAME\Orbis",
"PS4_GAME\Common",
"PS4_GAME\Common\Media",
"PS4_GAME\Common\Tutorial",
"PS4_GAME\Common\res",
"PS4_GAME\Orbis\Sound"
"music",
"Orbis",
"Common",
"Common\Media",
"Common\Tutorial",
"Common\res",
"Sound"
)
foreach ($dir in $directories) {
@@ -27,7 +27,7 @@ $folderCopies = @(
@{ Source = "PS3\Sound"; Dest = "PS4_GAME\Sound" },
@{ Source = "Common\Postbuilds\Contents\Orbis\sce_module"; Dest = "PS4_GAME\sce_module" },
@{ Source = "Common\Postbuilds\Contents\Orbis\sce_gls"; Dest = "PS4_GAME\sce_gls" },
@{ Source = "Common\Postbuilds\Contents\Orbis\sce_sys"; Dest = "PS4_GAME\sce_sys" }
@{ Source = "Common\Postbuilds\Contents\Orbis\sce_sys"; Dest = "PS4_GAME\sce_sys" },
)
foreach ($copy in $folderCopies) {
@@ -41,7 +41,7 @@ foreach ($copy in $folderCopies) {
$fileCopies = @(
@{ Source = "Orbis\PS4ProductCodes.bin"; Dest = "PS4_GAME\Orbis\PS4ProductCodes.bin" },
@{ Source = "Orbis\session_image.jpg"; Dest = "PS4_GAME\Orbis\session_image.jpg" }
@{ Source = "Orbis\session_image.jpg"; Dest = "PS4_GAME\Orbis\session_image.jpg" },
)
foreach ($copy in $fileCopies) {
@@ -6,12 +6,12 @@ param(
Write-Host "PSVita Postbuild script started. Output Directory: $OutDir, Project Directory: $ProjectDir"
$directories = @(
"PSVITA_GAME\music",
"PSVITA_GAME\PSVita",
"PSVITA_GAME\Common",
"PSVITA_GAME\Common\Media",
"PSVITA_GAME\Common\res",
"PSVITA_GAME\Sound"
"music",
"PSVita",
"Common",
"Common\Media",
"Common\res",
"Sound"
)
foreach ($dir in $directories) {
@@ -22,17 +22,13 @@ $folderCopies = @(
@{ Source = "music"; Dest = "PSVITA_GAME\music" },
@{ Source = "Common\Media"; Dest = "PSVITA_GAME\Common\Media" },
@{ Source = "Common\res"; Dest = "PSVITA_GAME\Common\res" },
@{ Source = "PSVita\Sound"; Dest = "PSVITA_GAME\PSVita\Sound" },
@{ Source = "$env:SCE_PSP2_SDK_DIR\target\sce_module"; Dest = "PSVITA_GAME\sce_module" },
@{ Source = "PSVita\Sound"; Dest = "PSVITA_GAME\Sound" },
@{ Source = "Common\Postbuilds\Contents\PSVita\sce_module"; Dest = "PSVITA_GAME\sce_module" },
@{ Source = "Common\Postbuilds\Contents\PSVita\sce_sys"; Dest = "PSVITA_GAME\sce_sys" }
)
foreach ($copy in $folderCopies) {
if ([System.IO.Path]::IsPathRooted($copy.Source)) {
$src = $copy.Source
} else {
$src = Join-Path $ProjectDir $copy.Source
}
$src = Join-Path $ProjectDir $copy.Source
$dst = Join-Path $OutDir $copy.Dest
if (Test-Path $src) {
@@ -43,7 +39,7 @@ foreach ($copy in $folderCopies) {
$fileCopies = @(
@{ Source = "PSVita\PSVitaProductCodes.bin"; Dest = "PSVITA_GAME\PSVita\PSVitaProductCodes.bin" },
@{ Source = "PSVita\session_image.png"; Dest = "PSVITA_GAME\PSVita\session_image.png" },
@{ Source = "Common\Postbuilds\Contents\PSVita\icon.png"; Dest = "PSVITA_GAME\icon.png" }
@{ Source = "Common\Postbuilds\Contents\PSVita\icon.png"; Dest = "PSVITA_GAME\icon.png" },
)
foreach ($copy in $fileCopies) {
@@ -10,6 +10,7 @@
#include "..\..\TexturePack.h"
#include "..\..\DLCTexturePack.h"
#include "..\..\..\Minecraft.World\StringHelpers.h"
#ifndef _XBOX
#include "UI.h"
#endif
@@ -2,6 +2,7 @@
#include "UI.h"
#include "UIComponent_PressStartToPlay.h"
#include "..\..\..\Minecraft.World\StringHelpers.h"
UIComponent_PressStartToPlay::UIComponent_PressStartToPlay(int iPad, void *initData, UILayer *parentLayer) : UIScene(iPad, parentLayer)
{
// Setup all the Iggy references we need for this scene
@@ -23,7 +23,7 @@ UIScene_HelpAndOptionsMenu::UIScene_HelpAndOptionsMenu(int iPad, void *initData,
// We don't have a reinstall content, so remove the button
removeControl( &m_buttons[BUTTON_HAO_REINSTALL], false );
#ifdef _FINAL_BUILD
#ifndef _DEBUG
removeControl( &m_buttons[BUTTON_HAO_DEBUG], false);
#else
if(!app.DebugSettingsOn()) removeControl( &m_buttons[BUTTON_HAO_DEBUG], false);
@@ -121,7 +121,7 @@ void UIScene_HelpAndOptionsMenu::updateComponents()
void UIScene_HelpAndOptionsMenu::handleReload()
{
#ifdef _FINAL_BUILD
#ifndef _DEBUG
removeControl( &m_buttons[BUTTON_HAO_DEBUG], false);
#else
if(!app.DebugSettingsOn()) removeControl( &m_buttons[BUTTON_HAO_DEBUG], false);
@@ -61,7 +61,7 @@ UIScene_InGamePlayerOptionsMenu::UIScene_InGamePlayerOptionsMenu(int iPad, void
if(m_editingSelf)
{
#if (defined(_CONTENT_PACKAGE) || defined(_FINAL_BUILD) && !defined(_DEBUG_MENUS_ENABLED))
#ifndef _DEBUG // (defined(_CONTENT_PACKAGE) || defined(_FINAL_BUILD) && !defined(_DEBUG_MENUS_ENABLED))
removeControl( &m_checkboxes[eControl_Op], true );
#else
m_checkboxes[eControl_Op].init(L"DEBUG: Creative",eControl_Op,Player::getPlayerGamePrivilege(m_playerPrivileges,Player::ePlayerGamePrivilege_CreativeMode));
@@ -254,7 +254,7 @@ void UIScene_InGamePlayerOptionsMenu::handleReload()
if(m_editingSelf)
{
#if (defined(_CONTENT_PACKAGE) || defined(_FINAL_BUILD) && !defined(_DEBUG_MENUS_ENABLED))
#ifndef _DEBUG // (defined(_CONTENT_PACKAGE) || defined(_FINAL_BUILD) && !defined(_DEBUG_MENUS_ENABLED))
removeControl( &m_checkboxes[eControl_Op], true );
#endif
File diff suppressed because it is too large Load Diff
@@ -726,6 +726,9 @@
<Filter Include="net\minecraft\client\resources">
<UniqueIdentifier>{889a84db-3009-4a7c-8234-4bf93d412690}</UniqueIdentifier>
</Filter>
<Filter Include="Cafe">
<UniqueIdentifier>{0956a505-3070-4d85-b25b-8731cee48587}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<None Include="ReadMe.txt" />
@@ -3775,6 +3778,12 @@
<ClInclude Include="PSVita\OldSdk.h">
<Filter>PSVita</Filter>
</ClInclude>
<ClInclude Include="Cafe\WiiU_App.h">
<Filter>Cafe</Filter>
</ClInclude>
<ClInclude Include="Cafe\WiiU_Minecraft.h">
<Filter>Cafe</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="stdafx.cpp">
@@ -5919,6 +5928,12 @@
<ClCompile Include="PSVita\OldSdk.cpp">
<Filter>PSVita</Filter>
</ClCompile>
<ClCompile Include="Cafe\WiiU_App.cpp">
<Filter>Cafe</Filter>
</ClCompile>
<ClCompile Include="Cafe\WiiU_Minecraft.cpp">
<Filter>Cafe</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Library Include="Xbox\4JLibs\libs\4J_Render_d.lib">
@@ -12,13 +12,9 @@
// Singleton
OrbisNPToolkit NPToolkit;
#ifndef __ORBIS__ // sce::Toolkit::NP::Utilities::Future is not implemented in SDK 1.70
sce::Toolkit::NP::Utilities::Future< sce::Toolkit::NP::NpSessionInformation > OrbisNPToolkit::sm_createJoinFuture;
#endif
sce::Toolkit::NP::NpSessionInformation OrbisNPToolkit::m_currentSessionInfo;
#ifndef __ORBIS__
sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::MessageAttachment> OrbisNPToolkit::m_messageData;
#endif
void OrbisNPToolkit::presenceCallback( const sce::Toolkit::NP::Event& event )
@@ -134,53 +130,29 @@ void OrbisNPToolkit::sessionsCallback( const sce::Toolkit::NP::Event& event)
{
case sce::Toolkit::NP::Event::npSessionCreateResult: ///< An event generated when the %Np session creation process has been completed.
app.DebugPrintf("npSessionCreateResult");
#ifdef __ORBIS__
// sce::Toolkit::NP::Utilities::Future is not implemented in SDK 1.70 -
// no way to retrieve the NpSessionInformation payload; m_currentSessionInfo stays zeroed.
if(event.returnCode >= 0)
{
app.DebugPrintf("Session Created Successfully\n");
}
else
{
app.DebugPrintf("Session Creation Failed 0x%x\n",event.returnCode);
}
#else
if(sm_createJoinFuture.hasResult())
if(sm_createJoinFuture.hasResult())
{
app.DebugPrintf("Session Created Successfully\n");
m_currentSessionInfo = *sm_createJoinFuture.get();
}
else
}
else
{
app.DebugPrintf("Session Creation Failed 0x%x\n",sm_createJoinFuture.getError());
}
sm_createJoinFuture.reset();
#endif
break;
case sce::Toolkit::NP::Event::npSessionJoinResult: ///< An event generated when the join %Np session process has been completed.
app.DebugPrintf("npSessionJoinResult");
#ifdef __ORBIS__
if(event.returnCode >= 0)
{
app.DebugPrintf("Session joined successfully\n");
}
else
{
app.DebugPrintf("Session join Failed 0x%x\n",event.returnCode);
}
#else
if(sm_createJoinFuture.hasResult())
if(sm_createJoinFuture.hasResult())
{
app.DebugPrintf("Session joined successfully\n");
m_currentSessionInfo = *sm_createJoinFuture.get();
}
else
}
else
{
app.DebugPrintf("Session join Failed 0x%x\n",sm_createJoinFuture.getError());
}
sm_createJoinFuture.reset();
#endif
break;
case sce::Toolkit::NP::Event::npSessionError: ///< An event generated when there was error performing the current %Np session process.
app.DebugPrintf("npSessionError");
@@ -235,12 +207,6 @@ void OrbisNPToolkit::gameCustomDataCallback( const sce::Toolkit::NP::Event& even
break;
case sce::Toolkit::NP::Event::gameCustomDataGameDataResult:
app.DebugPrintf("gameCustomDataGameDataResult");
#ifdef __ORBIS__
// sce::Toolkit::NP::Utilities::Future is not implemented in SDK 1.70 -
// the MessageAttachment payload can't be retrieved, so invite data is unavailable.
app.DebugPrintf("gameCustomDataGameDataResult stubbed (no Future in SDK 1.70), returnCode 0x%08x\n", event.returnCode);
ORBIS_STUBBED;
#else
if(m_messageData.hasResult())
{
SQRNetworkManager_Orbis::GetInviteDataAndProcess(m_messageData.get());
@@ -263,7 +229,6 @@ void OrbisNPToolkit::gameCustomDataCallback( const sce::Toolkit::NP::Event& even
break;
}
}
#endif
break;
case sce::Toolkit::NP::Event::gameCustomDataMessageResult:
app.DebugPrintf("gameCustomDataMessageResult");
@@ -385,20 +350,6 @@ void OrbisNPToolkit::init()
}
// Get network status and inform library
#ifdef __ORBIS__
// sce::Toolkit::NP::Utilities::Future is not implemented in SDK 1.70 -
// query the net state directly instead of going through NetInfo::getNetInfo
int32_t netState = SCE_NET_CTL_STATE_DISCONNECTED;
if (sceNetCtlGetState(&netState) == SCE_OK)
{
ProfileManager.SetNetworkStatus(netState == SCE_NET_CTL_STATE_IPOBTAINED);
}
else
{
// Error means we're disconnected
ProfileManager.SetNetworkStatus(false);
}
#else
sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::NetStateBasic> netStateFuture = sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::NetStateBasic>();
sce::Toolkit::NP::NetInfo::Interface::getNetInfo(&netStateFuture);
@@ -418,7 +369,6 @@ void OrbisNPToolkit::init()
// Error message means we're disconnected
ProfileManager.SetNetworkStatus(false);
}
#endif
// // Register Client ID for Auth
// ret = sce::Toolkit::NP::Interface::registerClientId(CLIENT_ID_FOR_SAMPLE);
@@ -459,13 +409,7 @@ void OrbisNPToolkit::createNPSession()
char test[3] = {'R','K','B'};
createSessionRequest.sessionData= test;
createSessionRequest.sessionDataSize = 3;
#ifdef __ORBIS__
// Sessions::Interface::create requires a Future out-param that SDK 1.70 doesn't implement
app.DebugPrintf("createNPSession stubbed (no Future in SDK 1.70)\n");
ORBIS_STUBBED;
#else
ret = sce::Toolkit::NP::Sessions::Interface::create(&createSessionRequest,&sm_createJoinFuture);
#endif
}
@@ -503,18 +447,12 @@ void OrbisNPToolkit::getMessageData(SceNpGameCustomDataEventParam* paramData)
req.itemId = paramData->itemId;
req.userInfo.userId = userId;
#ifdef __ORBIS__
// GameCustomData::Interface::getGameData requires a Future out-param that SDK 1.70 doesn't implement
app.DebugPrintf("getMessageData stubbed (no Future in SDK 1.70)\n");
ORBIS_STUBBED;
#else
ret = sce::Toolkit::NP::GameCustomData::Interface::getGameData(&req, &m_messageData);
if( ret < 0 ) {
//Error handling
} else {
//Error handling
}
#endif
//
@@ -809,9 +809,7 @@ int SQRNetworkManager_Orbis::BasicEventThreadProc( void *lpParameter )
int SQRNetworkManager_Orbis::GetFriendsThreadProc( void* lpParameter )
{
SQRNetworkManager_Orbis *manager = (SQRNetworkManager_Orbis *)lpParameter;
#ifndef __ORBIS__
sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::FriendsList> friendList;
#endif
int ret = 0;
manager->m_aFriendSearchResults.clear();
@@ -830,13 +828,13 @@ int SQRNetworkManager_Orbis::GetFriendsThreadProc( void* lpParameter )
requestParam.userInfo.userId = ProfileManager.getUserID(ProfileManager.GetPrimaryPad());
bool async = false;
#ifndef __ORBIS__
ret = sce::Toolkit::NP::Friends::Interface::getFriendslist(&friendList, &requestParam, async);
if(ret != SCE_OK)
{
app.DebugPrintf("getFriendslist failed! 0x%08x\n", ret);
return 0;
}
if (friendList.hasResult())
{
sce::Toolkit::NP::FriendsList::const_iterator iter ;
@@ -853,11 +851,12 @@ int SQRNetworkManager_Orbis::GetFriendsThreadProc( void* lpParameter )
sce::Toolkit::NP::PresenceRequest presenceRequest;
sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::PresenceInfo> presenceInfo;
int presenceInfo;
memset(&presenceRequest,0,sizeof(presenceRequest));
strncpy(presenceRequest.onlineId.data,iter->npid.handle.data, strlen(iter->npid.handle.data));
presenceRequest.presenceType = SCE_TOOLKIT_NP_PRESENCE_TYPE_INCONTEXT_INFO;
presenceRequest.userInfo.userId = ProfileManager.getUserID(ProfileManager.GetPrimaryPad());;
ret = sce::Toolkit::NP::Presence::Interface::getPresence(&presenceRequest,&presenceInfo,false);
if( ret < 0 )
{
@@ -904,10 +903,6 @@ int SQRNetworkManager_Orbis::GetFriendsThreadProc( void* lpParameter )
app.DebugPrintf("Check sign-in status\n");
}
#else
app.DebugPrintf( "Friend list is disabled on this build -UbEr\n");
#endif
return 0;
}
@@ -44,11 +44,9 @@ bool SonyCommerce_Orbis::m_bLicenseChecked=false; // Check the trial/
#ifndef __ORBIS__ // sce::Toolkit::NP::Utilities::Future is not implemented in SDK 1.70
sce::Toolkit::NP::Utilities::Future<std::vector<sce::Toolkit::NP::ProductInfo> > g_productList;
sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::CategoryInfo> g_categoryInfo;
sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::ProductInfoDetailed> g_detailedProductInfo;
#endif
SonyCommerce_Orbis::ProductInfoDetailed s_trialUpgradeProductInfoDetailed;
@@ -182,15 +180,8 @@ int SonyCommerce_Orbis::getProductList(std::vector<ProductInfo>* productList, ch
params.serviceLabel = 0;
app.DebugPrintf("Getting Product List ...\n");
#ifdef __ORBIS__
// Commerce::Interface::getProductList requires a Future out-param that SDK 1.70 doesn't implement -
// report failure so the commerce flow errors out and runs the callback
app.DebugPrintf("getProductList stubbed (no Future in SDK 1.70)\n");
ORBIS_STUBBED;
ret = -1;
#else
ret = sce::Toolkit::NP::Commerce::Interface::getProductList(&g_productList, params, true);
if (ret < 0)
if (ret < 0)
{
app.DebugPrintf("CommerceInterface::getProductList() error. ret = 0x%x\n", ret);
return ret;
@@ -201,8 +192,7 @@ int SonyCommerce_Orbis::getProductList(std::vector<ProductInfo>* productList, ch
// result has returned immediately (don't think this should happen, but was handled in the samples
copyProductList(productList, g_productList.get());
m_event = e_event_commerceGotProductList;
}
#endif
}
return ret;
}
@@ -251,27 +241,19 @@ int SonyCommerce_Orbis::getCategoryInfo(CategoryInfo *pInfo, char *categoryId)
app.DebugPrintf("Getting Category Information...\n");
#ifdef __ORBIS__
// Commerce::Interface::getCategoryInfo requires a Future out-param that SDK 1.70 doesn't implement -
// report failure so the commerce flow errors out and runs the callback
app.DebugPrintf("getCategoryInfo stubbed (no Future in SDK 1.70)\n");
ORBIS_STUBBED;
ret = -1;
#else
ret = sce::Toolkit::NP::Commerce::Interface::getCategoryInfo(&g_categoryInfo, params, true);
if (ret < 0)
if (ret < 0)
{
// error
app.DebugPrintf("Commerce::Interface::getCategoryInfo error: 0x%x\n", ret);
return ret;
}
else if (g_categoryInfo.hasResult())
else if (g_categoryInfo.hasResult())
{
// result has returned immediately (don't think this should happen, but was handled in the samples
copyCategoryInfo(pInfo, g_categoryInfo.get());
m_event = e_event_commerceGotCategoryInfo;
}
#endif
return ret;
}
@@ -307,28 +289,20 @@ int SonyCommerce_Orbis::getDetailedProductInfo(ProductInfoDetailed *pInfo, const
strcpy(params.productId, productId);
app.DebugPrintf("Getting Detailed Product Information ... \n");
#ifdef __ORBIS__
// Commerce::Interface::getDetailedProductInfo requires a Future out-param that SDK 1.70 doesn't implement -
// report failure so the commerce flow errors out and runs the callback
app.DebugPrintf("getDetailedProductInfo stubbed (no Future in SDK 1.70)\n");
ORBIS_STUBBED;
ret = -1;
#else
app.DebugPrintf("Getting Detailed Product Information ... \n");
ret = sce::Toolkit::NP::Commerce::Interface::getDetailedProductInfo(&g_detailedProductInfo, params, true);
if (ret < 0)
if (ret < 0)
{
app.DebugPrintf("CommerceInterface::getDetailedProductInfo() error. ret = 0x%x\n", ret);
return ret;
}
if (g_detailedProductInfo.hasResult())
if (g_detailedProductInfo.hasResult())
{
// result has returned immediately (don't think this should happen, but was handled in the samples
copyDetailedProductInfo(pInfo, g_detailedProductInfo.get());
m_event = e_event_commerceGotDetailedProductInfo;
}
#endif
return ret;
}
@@ -365,27 +339,19 @@ int SonyCommerce_Orbis::addDetailedProductInfo(ProductInfo *pInfo, const char *p
strcpy(params.productId, productId);
app.DebugPrintf("Getting Detailed Product Information ... \n");
#ifdef __ORBIS__
// Commerce::Interface::getDetailedProductInfo requires a Future out-param that SDK 1.70 doesn't implement -
// report failure so the commerce flow errors out and runs the callback
app.DebugPrintf("addDetailedProductInfo stubbed (no Future in SDK 1.70)\n");
ORBIS_STUBBED;
ret = -1;
#else
app.DebugPrintf("Getting Detailed Product Information ... \n");
ret = sce::Toolkit::NP::Commerce::Interface::getDetailedProductInfo(&g_detailedProductInfo, params, true);
if (ret < 0)
if (ret < 0)
{
app.DebugPrintf("CommerceInterface::addDetailedProductInfo() error. ret = 0x%x\n", ret);
}
if (g_detailedProductInfo.hasResult())
if (g_detailedProductInfo.hasResult())
{
// result has returned immediately (don't think this should happen, but was handled in the samples
copyAddDetailedProductInfo(pInfo, g_detailedProductInfo.get());
m_event = e_event_commerceAddedDetailedProductInfo;
}
#endif
return ret;
}
@@ -634,7 +600,7 @@ int SonyCommerce_Orbis::createSession()
//
// sce::Toolkit::NP::Commerce::Interface::CreateSession
//
// This function is provided to maintain compatibility with the PlayStationVita and PlayStation3 platforms. Because commerce on the PlayStation4 is not session based, SCE_TOOLKIT_NP_SUCCESS is always returned.
// This function is provided to maintain compatibility with the PlayStation®Vita and PlayStation®3 platforms. Because commerce on the PlayStation®4 is not session based, SCE_TOOLKIT_NP_SUCCESS is always returned.
int ret = sce::Toolkit::NP::Commerce::Interface::createSession();
@@ -690,12 +656,7 @@ void SonyCommerce_Orbis::commerce2Handler( const sce::Toolkit::NP::Event& event)
}
case sce::Toolkit::NP::Event::UserEvent::commerceGotCategoryInfo:
{
#ifdef __ORBIS__
// Future payload unavailable in SDK 1.70 - the request is stubbed so this shouldn't fire
app.DebugPrintf("commerceGotCategoryInfo stubbed (no Future in SDK 1.70)\n");
#else
copyCategoryInfo(m_pCategoryInfo, g_categoryInfo.get());
#endif
m_pCategoryInfo = NULL;
m_event = e_event_commerceGotCategoryInfo;
break;
@@ -703,12 +664,7 @@ void SonyCommerce_Orbis::commerce2Handler( const sce::Toolkit::NP::Event& event)
case sce::Toolkit::NP::Event::UserEvent::commerceGotProductList:
{
#ifdef __ORBIS__
// Future payload unavailable in SDK 1.70 - the request is stubbed so this shouldn't fire
app.DebugPrintf("commerceGotProductList stubbed (no Future in SDK 1.70)\n");
#else
copyProductList(m_pProductInfoList, g_productList.get());
#endif
m_pProductInfoDetailed = NULL;
m_event = e_event_commerceGotProductList;
break;
@@ -716,12 +672,6 @@ void SonyCommerce_Orbis::commerce2Handler( const sce::Toolkit::NP::Event& event)
case sce::Toolkit::NP::Event::UserEvent::commerceGotDetailedProductInfo:
{
#ifdef __ORBIS__
// Future payload unavailable in SDK 1.70 - the request is stubbed so this shouldn't fire
app.DebugPrintf("commerceGotDetailedProductInfo stubbed (no Future in SDK 1.70)\n");
m_pProductInfoDetailed = NULL;
m_pProductInfo = NULL;
#else
if(m_pProductInfoDetailed)
{
copyDetailedProductInfo(m_pProductInfoDetailed, g_detailedProductInfo.get());
@@ -732,7 +682,6 @@ void SonyCommerce_Orbis::commerce2Handler( const sce::Toolkit::NP::Event& event)
copyAddDetailedProductInfo(m_pProductInfo, g_detailedProductInfo.get());
m_pProductInfo = NULL;
}
#endif
m_event = e_event_commerceGotDetailedProductInfo;
break;
}
@@ -1196,8 +1145,8 @@ void SonyCommerce_Orbis::CreateSession( CallbackFunc cb, LPVOID lpParam )
setCallback(cb,lpParam);
// We don't need to create a session on PS4, from the Sony docs -
// This function is provided to maintain compatibility with the PlayStationVita and PlayStation3
// platforms. Because commerce on the PlayStation4 is not session based, SCE_TOOLKIT_NP_SUCCESS is always returned.
// This function is provided to maintain compatibility with the PlayStation®Vita and PlayStation®3
// platforms. Because commerce on the PlayStation®4 is not session based, SCE_TOOLKIT_NP_SUCCESS is always returned.
@@ -35,23 +35,14 @@ int g_loadedPCMVoiceDataSizes[4];
int g_loadedPCMVoiceDataPos[4];
char* g_loadedPCMVoiceData[4];
static bool CreatePort(uint32_t *portId, const SceVoicePortParam *pArg)
{
C4JThread::PushAffinityAllCores();
*portId = SCE_VOICE_INVALID_PORT_ID;
int err = sceVoiceCreatePort(portId, pArg);
//assert(err == SCE_OK);
//assert(*portId != VOICE_INVALID_PORT_ID);
C4JThread::PopAffinity();
if (err != SCE_OK || *portId == SCE_VOICE_INVALID_PORT_ID)
{
return false;
}
return true;
static void CreatePort(uint32_t *portId, const SceVoicePortParam *pArg)
{
C4JThread::PushAffinityAllCores(); // PS4 only
int err = sceVoiceCreatePort( portId, pArg );
assert(err == SCE_OK);
assert(*portId != SCE_VOICE_INVALID_PORT_ID);
C4JThread::PopAffinity(); // PS4 only
}
static void DeletePort(uint32_t& port)
@@ -131,12 +122,7 @@ void SonyVoiceChat_Orbis::init()
portArgs.volume = 1.0f;
portArgs.voice.bitrate = VOICE_ENCODED_FORMAT;
#endif
//CreatePort( &m_voiceOutPort, &portArgs );
if (!CreatePort(&m_voiceOutPort, &portArgs))
{
return;
}
CreatePort( &m_voiceOutPort, &portArgs );
start();
m_bInitialised = true;
@@ -8,6 +8,7 @@
static const int sc_maxVoiceDataSize = 2048;
class VoicePacket
{
static const int MAX_LOCAL_PLAYER_COUNT = 4;
@@ -85,10 +86,10 @@ public:
SceUserServiceUserId m_localUserID;
public:
SQRLocalVoiceDevice()
: m_localUserID(SCE_USER_SERVICE_USER_ID_INVALID)
, m_headsetPort(SCE_VOICE_INVALID_PORT_ID)
SQRLocalVoiceDevice()
: m_headsetPort(SCE_VOICE_INVALID_PORT_ID)
, m_microphonePort(SCE_VOICE_INVALID_PORT_ID)
, m_localUserID(SCE_USER_SERVICE_USER_ID_INVALID)
{
for(int i=0;i<4;i++)
m_localConnections[i] = 0;
@@ -1675,69 +1675,9 @@ Can also be used for low-level lighting.</value>
<data name="IDS_DESC_SKULL">
<value>Mob Heads can be placed as a decoration, or worn as a mask in the helmet slot.</value>
</data>
</data>
<data name="IDS_DESC_COMMAND_BLOCK">
<value>Used to execute commands.</value>
</data>
<data name="IDS_DESC_BEACON">
<value>Projects a beam of light into the sky and can provide Status Effects to nearby players.</value>
</data>
<data name="IDS_DESC_CHEST_TRAP">
<value>Stores blocks and items inside. Place two chest side by side to create a larger chest with double capacity. The trapped chest also creates a Redstone charge when opened.</value>
</data>
<data name="IDS_DESC_WEIGHTED_PLATE_LIGHT">
<value>Provides a Redstone charge. The charge will be stronger if more items are on the plate.</value>
</data>
<data name="IDS_DESC_WEIGHTED_PLATE_HEAVY">
<value>Provides a Redstone charge. The charge will be stronger if more items are on the plate. Requires more weight than the light plate.</value>
</data>
<data name="IDS_DESC_REDSTONE_BLOCK">
<value>Used as a redstone power source. Can be crafted back into Redstone.</value>
</data>
<data name="IDS_DESC_HOPPER">
<value>Used to catch items or to transfer items into and out of containers.</value>
</data>
<data name="IDS_DESC_ACTIVATOR_RAIL">
<value>A type of rail that can enable or disable Minecarts with Hoppers and trigger Minecarts with TNT.</value>
</data>
<data name="IDS_DESC_DROPPER">
<value>Used to hold and drop items, or push items into another container, when given a Redstone charge.</value>
</data>
<data name="IDS_DESC_STAINED_CLAY">
<value>Colorful blocks crafted by dyeing Hardened clay.</value>
</data>
<data name="IDS_DESC_HAY">
<value>Can be fed to Horses, Donkeys or Mules to heal up to 10 Hearts. Speeds up the growth of foals.</value>
</data>
<data name="IDS_DESC_HARDENED_CLAY">
<value>Created by smelting Clay in a furnace.</value>
</data>
<data name="IDS_DESC_STAINED_GLASS">
<value>Crafted from glass and a dye.</value>
</data>
<data name="IDS_DESC_STAINED_GLASS_PANE">
<value>Crafted from Stained Glass</value>
</data>
<data name="IDS_DESC_COAL_BLOCK">
<value>A compact way of storing Coal. Can be used as fuel in a Furnace.</value>
</data>
<data name="IDS_SQUID">
<data name="IDS_SQUID">
<value>Squid</value>
</data>
@@ -2955,13 +2895,9 @@ Can also be used for low-level lighting.</value>
<data name="IDS_TILE_JUNGLE_PLANKS">
<value>Jungle Wood Planks</value>
</data>
</data>
<data name="IDS_TILE_PLANKS">
<value>Wood Planks (any type)</value>
</data>
<data name="IDS_TILE_SAPLING">
<data name="IDS_TILE_SAPLING">
<value>Sapling</value>
</data>
@@ -5752,41 +5688,9 @@ Can also be used for low-level lighting.</value>
<data name="IDS_TOOLTIPS_CLEARSLOTS">
<value>Clear All Slots</value>
</data>
</data>
<data name="IDS_TOOLTIPS_MOUNT">
<value>Mount</value>
</data>
<data name="IDS_TOOLTIPS_DISMOUNT">
<value>Dismount</value>
</data>
<data name="IDS_TOOLTIPS_SADDLEBAGS">
<value>Attach Chest</value>
</data>
<data name="IDS_TOOLTIPS_FIREWORK_LAUNCH">
<value>Launch</value>
</data>
<data name="IDS_TOOLTIPS_LEASH">
<value>Leash</value>
</data>
<data name="IDS_TOOLTIPS_UNLEASH">
<value>Release</value>
</data>
<data name="IDS_TOOLTIPS_ATTACH">
<value>Attach</value>
</data>
<data name="IDS_TOOLTIPS_NAME">
<value>Name</value>
</data>
<data name="IDS_CONFIRM_OK">
<data name="IDS_CONFIRM_OK">
<value>OK</value>
</data>
@@ -5796,13 +5700,9 @@ Can also be used for low-level lighting.</value>
<data name="IDS_DOWNLOADABLECONTENT">
<value>Minecraft Store</value>
</data>
</data>
<data name="IDS_CONFIRM_LEAVE_VIA_INVITE">
<value>Are you sure you want to leave your current game and join the new one? Any unsaved progress will be lost.</value>
</data>
<data name="IDS_EXIT_GAME">
<data name="IDS_EXIT_GAME">
<value>Exit Game</value>
</data>
@@ -5832,17 +5732,9 @@ Can also be used for low-level lighting.</value>
<data name="IDS_CORRUPT_OR_DAMAGED_SAVE_TEXT">
<value>This save is corrupt or damaged. Would you like to delete it?</value>
</data>
</data>
<data name="IDS_CORRUPT_OPTIONS_RETRY">
<value>Str1k3r: Placeholder</value>
</data>
<data name="IDS_CORRUPT_OPTIONS_DELETE">
<value>Str1k3r: Placeholder</value>
</data>
<data name="IDS_CONFIRM_EXIT_GAME_CONFIRM_DISCONNECT_SAVE">
<data name="IDS_CONFIRM_EXIT_GAME_CONFIRM_DISCONNECT_SAVE">
<value>Are you sure you want to exit to the main menu and disconnect all players from the game? Any unsaved progress will be lost.</value>
</data>
@@ -5852,13 +5744,9 @@ Can also be used for low-level lighting.</value>
<data name="IDS_EXIT_GAME_NO_SAVE">
<value>Exit without saving</value>
</data>
</data>
<data name="IDS_CONFIRM_EXIT_GAME">
<value>Are you sure you want to exit to the main menu? Any unsaved progress will be lost.</value>
</data>
<data name="IDS_CONFIRM_EXIT_GAME_PROGRESS_LOST">
<data name="IDS_CONFIRM_EXIT_GAME_PROGRESS_LOST">
<value>Are you sure you want to exit to the main menu? Your progress will be lost!</value>
</data>
@@ -6615,13 +6503,9 @@ Would you like to install the mash-up pack or texture pack now?</value>
<data name="IDS_GAMEMODE_CREATIVE">
<value>Game Mode: Creative</value>
</data>
</data>
<data name="IDS_GAMEMODE_ADVENTURE">
<value>Game Mode: Adventure</value>
</data>
<data name="IDS_SURVIVAL">
<data name="IDS_SURVIVAL">
<value>Survival</value>
</data>
@@ -6633,10 +6517,6 @@ Would you like to install the mash-up pack or texture pack now?</value>
<value>Adventure</value>
</data>
<data name="IDS_ADVENTURE">
<value>Adventure</value>
</data>
<data name="IDS_CREATED_IN_SURVIVAL">
<value>Created in Survival Mode</value>
</data>
@@ -6675,13 +6555,9 @@ Would you like to install the mash-up pack or texture pack now?</value>
<data name="IDS_LEVELTYPE_SUPERFLAT">
<value>Superflat</value>
</data>
</data>
<data name="IDS_GAMEOPTION_SEED">
<value>Enter a seed to generate the same terrain again. Leave blank for a random world.</value>
</data>
<data name="IDS_GAMEOPTION_ONLINE">
<data name="IDS_GAMEOPTION_ONLINE">
<value>When enabled, the game will be an online game.</value>
</data>
@@ -6699,29 +6575,13 @@ Would you like to install the mash-up pack or texture pack now?</value>
<data name="IDS_GAMEOPTION_TRUST">
<value>When disabled, players joining the game cannot build or mine until authorised.</value>
</data>
</data>
<data name="IDS_INCREASE_WORLD_SIZE">
<value>Increase World Size</value>
</data>
<data name="IDS_INCREASE_WORLD_SIZE_OVERWRITE_EDGES">
<value>Overwrite World Edges</value>
</data>
<data name="IDS_GAMEOPTION_FIRE_SPREADS">
<data name="IDS_GAMEOPTION_FIRE_SPREADS">
<value>When enabled, fire may spread to nearby flammable blocks.</value>
</data>
</data>
<data name="IDS_GAMEOPTION_INCREASE_WORLD_SIZE">
<value>Select a larger world size to increase the amount of the world that you can explore. Larger worlds cannot be made smaller again.</value>
</data>
<data name="IDS_GAMEOPTION_INCREASE_WORLD_SIZE_OVERWRITE_EDGES">
<value>When enabled, the outer 32 tiles around the world edge will be overwritten by newly generated tiles to make the world size increase seamless. When disabled, the world size increase will leave all original tiles intact.</value>
</data>
<data name="IDS_GAMEOPTION_TNT_EXPLODES">
<data name="IDS_GAMEOPTION_TNT_EXPLODES">
<value>When enabled, TNT will explode when activated.</value>
</data>
@@ -7250,13 +7110,9 @@ Would you like to install the mash-up pack or texture pack now?</value>
<data name="IDS_MAX_CHICKENS_BRED">
<value>This animal can't enter Love Mode. The maximum number of breeding Chickens has been reached.</value>
</data>
</data>
<data name="IDS_MAX_HORSES_BRED">
<value>This animal can't enter Love Mode. The maximum number of breeding horses has been reached.</value>
</data>
<data name="IDS_MAX_MUSHROOMCOWS_BRED">
<data name="IDS_MAX_MUSHROOMCOWS_BRED">
<value>This animal can't enter Love Mode. The maximum number of breeding Mooshrooms has been reached.</value>
</data>
@@ -7306,11 +7162,7 @@ Would you like to install the mash-up pack or texture pack now?</value>
<data name="IDS_CREDITS">
<value>Credits</value>
</data>
<data name="IDS_LANGUAGE_SELECTOR">
<value>Languages</value>
</data>
</data>
<data name="IDS_REINSTALL_CONTENT">
<value>Reinstall Content</value>
@@ -7714,25 +7566,9 @@ Would you like to install the mash-up pack or texture pack now?</value>
<data name="IDS_POTION_POISON">
<value>Poison</value>
</data>
</data>
<data name="IDS_POTION_WITHER">
<value>Wither</value>
</data>
<data name="IDS_POTION_HEALTHBOOST">
<value>Health Boost</value>
</data>
<data name="IDS_POTION_ABSORPTION">
<value>Absorption</value>
</data>
<data name="IDS_POTION_SATURATION">
<value>Saturation</value>
</data>
<data name="IDS_POTION_MOVESPEED_POSTFIX">
<data name="IDS_POTION_MOVESPEED_POSTFIX">
<value>of Swiftness</value>
</data>
@@ -7806,25 +7642,9 @@ Would you like to install the mash-up pack or texture pack now?</value>
<data name="IDS_POTION_POISON_POSTFIX">
<value>of Poison</value>
</data>
</data>
<data name="IDS_POTION_WITHER_POSTFIX">
<value>of Decay</value>
</data>
<data name="IDS_POTION_HEALTHBOOST_POSTFIX">
<value>of Health Boost</value>
</data>
<data name="IDS_POTION_ABSORPTION_POSTFIX">
<value>of Absorption</value>
</data>
<data name="IDS_POTION_SATURATION_POSTFIX">
<value>of Saturation</value>
</data>
<data name="IDS_POTION_POTENCY_0">
<data name="IDS_POTION_POTENCY_0">
<value/>
</data>
@@ -8017,10 +7837,6 @@ Would you like to install the mash-up pack or texture pack now?</value>
<value>Reduces health of the affected players, animals and monsters over time.</value>
</data>
<data name="IDS_POTION_EFFECTS_WHENDRANK">
<value>When Applied:</value>
</data>
<data name="IDS_ATTRIBUTE_NAME_HORSE_JUMPSTRENGTH">
<value>Horse Jump Strength</value>
</data>
@@ -1,88 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<data name="IDS_LANG_SYSTEM">
<value>System Language</value>
</data>
<data name="IDS_LANG_ENGLISH">
<value>English</value>
</data>
<data name="IDS_LANG_GERMAN">
<value>German</value>
</data>
<data name="IDS_LANG_SPANISH">
<value>Spanish</value>
</data>
<data name="IDS_LANG_SPANISH_SPAIN">
<value>Spanish (Spain)</value>
</data>
<data name="IDS_LANG_SPANISH_LATIN_AMERICA">
<value>Spanish (Latin America)</value>
</data>
<data name="IDS_LANG_FRENCH">
<value>French</value>
</data>
<data name="IDS_LANG_ITALIAN">
<value>Italian</value>
</data>
<data name="IDS_LANG_PORTUGUESE">
<value>Portuguese</value>
</data>
<data name="IDS_LANG_PORTUGUESE_PORTUGAL">
<value>Portuguese (Portugal)</value>
</data>
<data name="IDS_LANG_PORTUGUESE_BRAZIL">
<value>Portuguese (Brazil)</value>
</data>
<data name="IDS_LANG_JAPANESE">
<value>Japanese</value>
</data>
<data name="IDS_LANG_KOREAN">
<value>Korean</value>
</data>
<data name="IDS_LANG_CHINESE_TRADITIONAL">
<value>Chinese (Traditional)</value>
</data>
<data name="IDS_LANG_CHINESE_SIMPLIFIED">
<value>Chinese (Simplified)</value>
</data>
<data name="IDS_LANG_DANISH">
<value>Danish</value>
</data>
<data name="IDS_LANG_FINISH">
<value>Finnish</value>
</data>
<data name="IDS_LANG_DUTCH">
<value>Dutch</value>
</data>
<data name="IDS_LANG_POLISH">
<value>Polish</value>
</data>
<data name="IDS_LANG_RUSSIAN">
<value>Russian</value>
</data>
<data name="IDS_LANG_SWEDISH">
<value>Swedish</value>
</data>
<data name="IDS_LANG_NORWEGIAN">
<value>Norwegian</value>
</data>
<data name="IDS_LANG_GREEK">
<value>Greek</value>
</data>
<data name="IDS_LANG_TURKISH">
<value>Turkish</value>
</data>
</root>
@@ -270,10 +270,6 @@ If you try to save while using the trial version, you will be given the option t
<value>Download Failed. Please try again later.</value>
</data>
<data name="IDS_SAVE_TRANSFER_WRONG_VERSION">
<value>The saved file in the download area has a version number that Minecraft: PlayStation®4 Edition does not yet support.</value>
</data>
<data name="IDS_DISCONNECTED_NAT_TYPE_MISMATCH">
<value>Failed to join the game due to a restrictive NAT type. Please check your network settings.</value>
</data>
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -1,33 +1,110 @@
#pragma once
#include "Common\Leaderboards\SonyLeaderboardManager.h"
#include "Common\Leaderboards\LeaderboardManager.h"
#include "..\..\Common\Leaderboards\LeaderboardManager.h"
#include "..\..\..\Minecraft.World\x64headers\extraX64.h"
#include "PS3\Passphrase\ps3__np_conf.h"
class PS3LeaderboardManager : public SonyLeaderboardManager
using namespace std;
class PS3LeaderboardManager : public LeaderboardManager
{
protected:
enum EStatsState
{
eStatsState_Idle,
eStatsState_Getting,
eStatsState_Failed,
eStatsState_Ready,
eStatsState_Canceled,
//eStatsState_Writing,
eStatsState_Max
};
public:
PS3LeaderboardManager();
virtual ~PS3LeaderboardManager();
protected:
private:
unsigned short m_openSessions;
virtual HRESULT initialiseScoreUtility();
C4JThread *m_threadScoreboard;
bool m_running;
virtual bool scoreUtilityAlreadyInitialised(HRESULT hr);
int32_t m_titleContext;
int m_transactionCtx;
virtual HRESULT createTitleContext(const SceNpId &npId);
//SceNpId m_myNpId;
virtual HRESULT destroyTitleContext(int titleContext);
static int scoreboardThreadEntry(LPVOID lpParam);
void scoreboardThreadInternal();
virtual HRESULT createTransactionContext(int titleContext);
bool getScoreByIds();
bool getScoreByRange();
virtual HRESULT abortTransactionContext(int transactionContext);
bool setScore();
queue<RegisterScore> m_views;
virtual HRESULT destroyTransactionContext(int transactionContext);
CRITICAL_SECTION m_csViewsLock;
virtual HRESULT getFriendsList(const SceNpId &myNpId, SceNpId* &npIds, uint32_t &len);
EStatsState m_eStatsState; //State of the stats read
// EFilterMode m_eFilterMode;
virtual char * getComment(SceNpScoreComment *comment);
ReadScore *m_scores;
unsigned int m_maxRank;
//SceNpScoreRankData *m_stats;
public:
virtual void Tick();
//Open a session
virtual bool OpenSession();
//Close a session
virtual void CloseSession();
//Delete a session
virtual void DeleteSession();
//Write the given stats
//This is called synchronously and will not free any memory allocated for views when it is done
virtual bool WriteStats(unsigned int viewCount, ViewIn views);
virtual bool ReadStats_Friends(LeaderboardReadListener *listener, int difficulty, EStatsType type, PlayerUID myUID, unsigned int startIndex, unsigned int readCount);
virtual bool ReadStats_MyScore(LeaderboardReadListener *listener, int difficulty, EStatsType type, PlayerUID myUID, unsigned int readCount);
virtual bool ReadStats_TopRank(LeaderboardReadListener *listener, int difficulty, EStatsType type, unsigned int startIndex, unsigned int readCount);
//Perform a flush of the stats
virtual void FlushStats();
//Cancel the current operation
virtual void CancelOperation();
//Is the leaderboard manager idle.
virtual bool isIdle();
private:
int getBoardId(int difficulty, EStatsType);
//LeaderboardManager::ReadScore *filterJustScorers(unsigned int &num, LeaderboardManager::ReadScore *friendsData);
SceNpScorePlayerRankData *addPadding(unsigned int num, SceNpScoreRankData *rankData);
void convertToOutput(unsigned int &num, ReadScore *out, SceNpScorePlayerRankData *rankData, SceNpScoreComment *comm);
void toBinary(void *out, SceNpScoreComment *in);
void fromBinary(SceNpScoreComment **out, void *in);
void toBase32(SceNpScoreComment *out, void *in);
void fromBase32(void *out, SceNpScoreComment *in);
void toSymbols(char *);
void fromSymbols(char *);
bool test_string(string);
void initReadScoreStruct(ReadScore &out, SceNpScoreRankData &);
void fillReadScoreStruct(ReadScore &out, SceNpScoreComment &comment);
static bool SortByRank(const ReadScore &lhs, const ReadScore &rhs);
};
@@ -55,10 +55,7 @@ HRESULT PSVitaLeaderboardManager::destroyTransactionContext(int transactionConte
HRESULT PSVitaLeaderboardManager::getFriendsList(sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::FriendsList> &friendsList)
{
// Stubbed: the vendored libSceNpToolkit_rtti.a only exports getFriendslist() for
// Future<vector<Friend>>, but this SDK's headers declare FriendsList as vector<NpUser>,
// so the real call is an undefined symbol at link time. Fail gracefully until the lib is updated.
return -1;
return sce::Toolkit::NP::Friends::Interface::getFriendslist(&friendsList, false);
}
char *PSVitaLeaderboardManager::getComment(SceNpScoreComment *comment)

Some files were not shown because too many files have changed in this diff Show More