mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-08-20 09:57:10 +00:00
cleanup: flatten dead branches in common app and ui code
This commit is contained in:
parent
1fecbf297a
commit
f19563bbd7
File diff suppressed because it is too large
Load diff
|
|
@ -41,7 +41,7 @@ class MultiPlayerGameMode;
|
||||||
#include "../Minecraft.World/Util/C4JThread.h"
|
#include "../Minecraft.World/Util/C4JThread.h"
|
||||||
#include "Textures/ResourceLocation.h"
|
#include "Textures/ResourceLocation.h"
|
||||||
|
|
||||||
#ifdef linux
|
#if defined(linux)
|
||||||
#undef linux
|
#undef linux
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -340,15 +340,7 @@ public:
|
||||||
void delayTextureReload();
|
void delayTextureReload();
|
||||||
static int64_t currentTimeMillis();
|
static int64_t currentTimeMillis();
|
||||||
|
|
||||||
#if 0
|
|
||||||
static void inGameSignInCheckAllPrivilegesCallback(void* lpParam,
|
|
||||||
bool hasPrivileges,
|
|
||||||
int iPad);
|
|
||||||
static int InGame_SignInReturned(void* pParam, bool bContinue, int iPad,
|
|
||||||
int iController);
|
|
||||||
#else
|
|
||||||
static int InGame_SignInReturned(void* pParam, bool bContinue, int iPad);
|
static int InGame_SignInReturned(void* pParam, bool bContinue, int iPad);
|
||||||
#endif
|
|
||||||
// 4J-PB
|
// 4J-PB
|
||||||
Screen* getScreen();
|
Screen* getScreen();
|
||||||
|
|
||||||
|
|
@ -395,8 +387,4 @@ public:
|
||||||
unsigned int getCurrentTexturePackId();
|
unsigned int getCurrentTexturePackId();
|
||||||
ColourTable* getColourTable();
|
ColourTable* getColourTable();
|
||||||
|
|
||||||
#if 0
|
|
||||||
static int MustSignInReturnedPSN(void* pParam, int iPad,
|
|
||||||
C4JStorage::EMessageResult result);
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
#include "../Minecraft.World/Util/Pos.h"
|
#include "../Minecraft.World/Util/Pos.h"
|
||||||
#include "../Minecraft.World/Platform/System.h"
|
#include "../Minecraft.World/Platform/System.h"
|
||||||
#include "../Minecraft.World/Util/StringHelpers.h"
|
#include "../Minecraft.World/Util/StringHelpers.h"
|
||||||
#ifdef SPLIT_SAVES
|
#if defined(SPLIT_SAVES)
|
||||||
#include "../Minecraft.World/IO/Files/ConsoleSaveFileSplit.h"
|
#include "../Minecraft.World/IO/Files/ConsoleSaveFileSplit.h"
|
||||||
#endif
|
#endif
|
||||||
#include "../Minecraft.World/IO/Files/ConsoleSaveFileOriginal.h"
|
#include "../Minecraft.World/IO/Files/ConsoleSaveFileOriginal.h"
|
||||||
|
|
@ -59,7 +59,7 @@ int64_t MinecraftServer::setTimeOfDay = 0;
|
||||||
bool MinecraftServer::m_bPrimaryPlayerSignedOut = false;
|
bool MinecraftServer::m_bPrimaryPlayerSignedOut = false;
|
||||||
bool MinecraftServer::s_bServerHalted = false;
|
bool MinecraftServer::s_bServerHalted = false;
|
||||||
bool MinecraftServer::s_bSaveOnExitAnswered = false;
|
bool MinecraftServer::s_bSaveOnExitAnswered = false;
|
||||||
#ifdef _ACK_CHUNK_SEND_THROTTLING
|
#if defined(_ACK_CHUNK_SEND_THROTTLING)
|
||||||
bool MinecraftServer::s_hasSentEnoughPackets = false;
|
bool MinecraftServer::s_hasSentEnoughPackets = false;
|
||||||
int64_t MinecraftServer::s_tickStartTime = 0;
|
int64_t MinecraftServer::s_tickStartTime = 0;
|
||||||
std::vector<INetworkPlayer*> MinecraftServer::s_sentTo;
|
std::vector<INetworkPlayer*> MinecraftServer::s_sentTo;
|
||||||
|
|
@ -108,36 +108,6 @@ MinecraftServer::~MinecraftServer() {}
|
||||||
bool MinecraftServer::initServer(__int64 seed, NetworkGameInitData* initData,
|
bool MinecraftServer::initServer(__int64 seed, NetworkGameInitData* initData,
|
||||||
std::uint32_t initSettings, bool findSeed) {
|
std::uint32_t initSettings, bool findSeed) {
|
||||||
// 4J - removed
|
// 4J - removed
|
||||||
#if 0
|
|
||||||
commands = new ConsoleCommands(this);
|
|
||||||
|
|
||||||
Thread t = new Thread() {
|
|
||||||
public void run() {
|
|
||||||
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
|
|
||||||
String line = null;
|
|
||||||
try {
|
|
||||||
while (!stopped && running && (line = br.readLine()) != null) {
|
|
||||||
handleConsoleInput(line, MinecraftServer.this);
|
|
||||||
}
|
|
||||||
} catch (IOException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
t.setDaemon(true);
|
|
||||||
t.start();
|
|
||||||
|
|
||||||
|
|
||||||
LogConfigurator.initLogger();
|
|
||||||
logger.info("Starting minecraft server version " + VERSION);
|
|
||||||
|
|
||||||
if (Runtime.getRuntime().maxMemory() / 1024 / 1024 < 512) {
|
|
||||||
logger.warning("**** NOT ENOUGH RAM!");
|
|
||||||
logger.warning("To start the server with more ram, launch it as \"java -Xmx1024M -Xms1024M -jar minecraft_server.jar\"");
|
|
||||||
}
|
|
||||||
|
|
||||||
logger.info("Loading properties");
|
|
||||||
#endif
|
|
||||||
settings = new Settings(new File(L"server.properties"));
|
settings = new Settings(new File(L"server.properties"));
|
||||||
|
|
||||||
app.DebugPrintf("\n*** SERVER SETTINGS ***\n");
|
app.DebugPrintf("\n*** SERVER SETTINGS ***\n");
|
||||||
|
|
@ -184,44 +154,12 @@ bool MinecraftServer::initServer(__int64 seed, NetworkGameInitData* initData,
|
||||||
setFlightAllowed(true); // settings->getBoolean(L"allow-flight", false);
|
setFlightAllowed(true); // settings->getBoolean(L"allow-flight", false);
|
||||||
|
|
||||||
// 4J Stu - Enabling flight to stop it kicking us when we use it
|
// 4J Stu - Enabling flight to stop it kicking us when we use it
|
||||||
#ifdef _DEBUG_MENUS_ENABLED
|
#if defined(_DEBUG_MENUS_ENABLED)
|
||||||
setFlightAllowed(true);
|
setFlightAllowed(true);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 1
|
|
||||||
connection = new ServerConnection(this);
|
connection = new ServerConnection(this);
|
||||||
Socket::Initialise(connection); // 4J - added
|
Socket::Initialise(connection); // 4J - added
|
||||||
#else
|
|
||||||
// 4J - removed
|
|
||||||
InetAddress localAddress = null;
|
|
||||||
if (localIp.length() > 0) localAddress = InetAddress.getByName(localIp);
|
|
||||||
port = settings.getInt("server-port", DEFAULT_MINECRAFT_PORT);
|
|
||||||
|
|
||||||
logger.info("Starting Minecraft server on " +
|
|
||||||
(localIp.length() == 0 ? "*" : localIp) + ":" + port);
|
|
||||||
try {
|
|
||||||
connection = new ServerConnection(this, localAddress, port);
|
|
||||||
} catch (IOException e) {
|
|
||||||
logger.warning("**** FAILED TO BIND TO PORT!");
|
|
||||||
logger.log(Level.WARNING, "The exception was: " + e.toString());
|
|
||||||
logger.warning("Perhaps a server is already running on that port?");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!onlineMode) {
|
|
||||||
logger.warning("**** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!");
|
|
||||||
logger.warning(
|
|
||||||
"The server will make no attempt to authenticate usernames. "
|
|
||||||
"Beware.");
|
|
||||||
logger.warning(
|
|
||||||
"While this makes the game possible to play without internet "
|
|
||||||
"access, it also opens up the ability for hackers to connect with "
|
|
||||||
"any username they choose.");
|
|
||||||
logger.warning(
|
|
||||||
"To change this, set \"online-mode\" to \"true\" in the "
|
|
||||||
"server.settings file.");
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
setPlayers(new PlayerList(this));
|
setPlayers(new PlayerList(this));
|
||||||
|
|
||||||
// 4J-JEV: Need to wait for levelGenerationOptions to load.
|
// 4J-JEV: Need to wait for levelGenerationOptions to load.
|
||||||
|
|
@ -260,11 +198,7 @@ bool MinecraftServer::initServer(__int64 seed, NetworkGameInitData* initData,
|
||||||
mcprogress->progressStart(IDS_PROGRESS_INITIALISING_SERVER);
|
mcprogress->progressStart(IDS_PROGRESS_INITIALISING_SERVER);
|
||||||
|
|
||||||
if (findSeed) {
|
if (findSeed) {
|
||||||
#if 0
|
|
||||||
seed = BiomeSource::findSeed(pLevelType, &running);
|
|
||||||
#else
|
|
||||||
seed = BiomeSource::findSeed(pLevelType);
|
seed = BiomeSource::findSeed(pLevelType);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
setMaxBuildHeight(
|
setMaxBuildHeight(
|
||||||
|
|
@ -274,17 +208,6 @@ bool MinecraftServer::initServer(__int64 seed, NetworkGameInitData* initData,
|
||||||
Mth::clamp(getMaxBuildHeight(), 64, Level::maxBuildHeight));
|
Mth::clamp(getMaxBuildHeight(), 64, Level::maxBuildHeight));
|
||||||
// settings->setProperty(L"max-build-height", maxBuildHeight);
|
// settings->setProperty(L"max-build-height", maxBuildHeight);
|
||||||
|
|
||||||
#if 0
|
|
||||||
std::wstring levelSeedString = settings->getString(L"level-seed", L"");
|
|
||||||
int64_t levelSeed = (new Random())->nextLong();
|
|
||||||
if (levelSeedString.length() > 0)
|
|
||||||
{
|
|
||||||
long newSeed = _fromString<int64_t>(levelSeedString);
|
|
||||||
if (newSeed != 0) {
|
|
||||||
levelSeed = newSeed;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
// logger.info("Preparing level \"" + levelName + "\"");
|
// logger.info("Preparing level \"" + levelName + "\"");
|
||||||
m_bLoaded = loadLevel(new McRegionLevelStorageSource(File(L".")), levelName,
|
m_bLoaded = loadLevel(new McRegionLevelStorageSource(File(L".")), levelName,
|
||||||
seed, pLevelType, initData);
|
seed, pLevelType, initData);
|
||||||
|
|
@ -349,14 +272,6 @@ int MinecraftServer::runPostUpdate(void* lpParam) {
|
||||||
LeaveCriticalSection(&server->m_postProcessCS);
|
LeaveCriticalSection(&server->m_postProcessCS);
|
||||||
request.chunkSource->postProcess(request.chunkSource, request.x,
|
request.chunkSource->postProcess(request.chunkSource, request.x,
|
||||||
request.z);
|
request.z);
|
||||||
#if 0
|
|
||||||
#ifndef _CONTENT_PACKAGE
|
|
||||||
if ((server->m_postProcessRequests.size() % 10) == 0)
|
|
||||||
printf("processing request %00d\n",
|
|
||||||
server->m_postProcessRequests.size());
|
|
||||||
#endif
|
|
||||||
Sleep(1);
|
|
||||||
#endif
|
|
||||||
EnterCriticalSection(&server->m_postProcessCS);
|
EnterCriticalSection(&server->m_postProcessCS);
|
||||||
}
|
}
|
||||||
LeaveCriticalSection(&server->m_postProcessCS);
|
LeaveCriticalSection(&server->m_postProcessCS);
|
||||||
|
|
@ -443,7 +358,7 @@ bool MinecraftServer::loadLevel(LevelStorageSource* storageSource,
|
||||||
if (initData->saveData != NULL) {
|
if (initData->saveData != NULL) {
|
||||||
// We are loading a file from disk with the data passed in
|
// We are loading a file from disk with the data passed in
|
||||||
|
|
||||||
#ifdef SPLIT_SAVES
|
#if defined(SPLIT_SAVES)
|
||||||
ConsoleSaveFileOriginal oldFormatSave(
|
ConsoleSaveFileOriginal oldFormatSave(
|
||||||
initData->saveData->saveName, initData->saveData->data,
|
initData->saveData->saveName, initData->saveData->data,
|
||||||
initData->saveData->fileSize, false, initData->savePlatform);
|
initData->saveData->fileSize, false, initData->savePlatform);
|
||||||
|
|
@ -465,7 +380,7 @@ bool MinecraftServer::loadLevel(LevelStorageSource* storageSource,
|
||||||
new McRegionLevelStorage(pSave, File(L"."), name, true));
|
new McRegionLevelStorage(pSave, File(L"."), name, true));
|
||||||
} else {
|
} else {
|
||||||
// We are loading a save from the storage manager
|
// We are loading a save from the storage manager
|
||||||
#ifdef SPLIT_SAVES
|
#if defined(SPLIT_SAVES)
|
||||||
bool bLevelGenBaseSave = false;
|
bool bLevelGenBaseSave = false;
|
||||||
LevelGenerationOptions* levelGen = app.getLevelGenerationOptions();
|
LevelGenerationOptions* levelGen = app.getLevelGenerationOptions();
|
||||||
if (levelGen != NULL && levelGen->requiresBaseSave()) {
|
if (levelGen != NULL && levelGen->requiresBaseSave()) {
|
||||||
|
|
@ -586,11 +501,7 @@ bool MinecraftServer::loadLevel(LevelStorageSource* storageSource,
|
||||||
int64_t startTime = System::currentTimeMillis();
|
int64_t startTime = System::currentTimeMillis();
|
||||||
|
|
||||||
// 4J Stu - Added this to temporarily make starting games on vita faster
|
// 4J Stu - Added this to temporarily make starting games on vita faster
|
||||||
#if 0
|
|
||||||
int r = 48;
|
|
||||||
#else
|
|
||||||
int r = 196;
|
int r = 196;
|
||||||
#endif
|
|
||||||
|
|
||||||
// 4J JEV: load gameRules.
|
// 4J JEV: load gameRules.
|
||||||
ConsoleSavePath filepath(GAME_RULE_SAVENAME);
|
ConsoleSavePath filepath(GAME_RULE_SAVENAME);
|
||||||
|
|
@ -614,7 +525,7 @@ bool MinecraftServer::loadLevel(LevelStorageSource* storageSource,
|
||||||
}
|
}
|
||||||
|
|
||||||
int64_t lastTime = System::currentTimeMillis();
|
int64_t lastTime = System::currentTimeMillis();
|
||||||
#ifdef _LARGE_WORLDS
|
#if defined(_LARGE_WORLDS)
|
||||||
if (app.GetGameNewWorldSize() > levels[0]->getLevelData()->getXZSizeOld()) {
|
if (app.GetGameNewWorldSize() > levels[0]->getLevelData()->getXZSizeOld()) {
|
||||||
if (!app.GetGameNewWorldSizeUseMoat()) // check the moat settings to
|
if (!app.GetGameNewWorldSizeUseMoat()) // check the moat settings to
|
||||||
// see if we should be
|
// see if we should be
|
||||||
|
|
@ -639,30 +550,6 @@ bool MinecraftServer::loadLevel(LevelStorageSource* storageSource,
|
||||||
// storage->getSaveFile()->convertLevelChunks(level)
|
// storage->getSaveFile()->convertLevelChunks(level)
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
int64_t lastStorageTickTime = System::currentTimeMillis();
|
|
||||||
|
|
||||||
// Test code to enable full creation of levels at start up
|
|
||||||
int halfsidelen = ( i == 0 ) ? 27 : 9;
|
|
||||||
for( int x = -halfsidelen; x < halfsidelen; x++ )
|
|
||||||
{
|
|
||||||
for( int z = -halfsidelen; z < halfsidelen; z++ )
|
|
||||||
{
|
|
||||||
int total = halfsidelen * halfsidelen * 4;
|
|
||||||
int pos = z + halfsidelen + ( ( x + halfsidelen ) * 2 * halfsidelen );
|
|
||||||
mcprogress->progressStagePercentage((pos) * 100 / total);
|
|
||||||
level->cache->create(x,z, true); // 4J - added parameter to disable postprocessing here
|
|
||||||
|
|
||||||
if( System::currentTimeMillis() - lastStorageTickTime > 50 )
|
|
||||||
{
|
|
||||||
CompressedTileStorage::tick();
|
|
||||||
SparseLightStorage::tick();
|
|
||||||
SparseDataStorage::tick();
|
|
||||||
lastStorageTickTime = System::currentTimeMillis();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
int64_t lastStorageTickTime = System::currentTimeMillis();
|
int64_t lastStorageTickTime = System::currentTimeMillis();
|
||||||
Pos* spawnPos = level->getSharedSpawnPos();
|
Pos* spawnPos = level->getSharedSpawnPos();
|
||||||
|
|
||||||
|
|
@ -713,21 +600,8 @@ bool MinecraftServer::loadLevel(LevelStorageSource* storageSource,
|
||||||
// 4J - removed this as now doing the recheckGaps call when each
|
// 4J - removed this as now doing the recheckGaps call when each
|
||||||
// chunk is post-processed, so can happen on things outside of the
|
// chunk is post-processed, so can happen on things outside of the
|
||||||
// spawn area too
|
// spawn area too
|
||||||
#if 0
|
|
||||||
// 4J - added this code to propagate lighting properly in the spawn area before we go sharing it with the local client or across the network
|
|
||||||
for (int x = -r; x <= r && running; x += 16)
|
|
||||||
{
|
|
||||||
for (int z = -r; z <= r && running; z += 16)
|
|
||||||
{
|
|
||||||
PIXBeginNamedEvent(0,"Lighting gaps for %d %d",x,z);
|
|
||||||
level->getChunkAt(spawnPos->x + x, spawnPos->z + z)->recheckGaps(true);
|
|
||||||
PIXEndNamedEvent();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
delete spawnPos;
|
delete spawnPos;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// printf("Main thread complete at %dms\n",System::currentTimeMillis() -
|
// printf("Main thread complete at %dms\n",System::currentTimeMillis() -
|
||||||
|
|
@ -815,7 +689,7 @@ bool MinecraftServer::loadLevel(LevelStorageSource* storageSource,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _LARGE_WORLDS
|
#if defined(_LARGE_WORLDS)
|
||||||
void MinecraftServer::overwriteBordersForNewWorldSize(ServerLevel* level) {
|
void MinecraftServer::overwriteBordersForNewWorldSize(ServerLevel* level) {
|
||||||
// recreate the chunks round the border (2 chunks or 32 blocks deep),
|
// recreate the chunks round the border (2 chunks or 32 blocks deep),
|
||||||
// deleting any player data from them
|
// deleting any player data from them
|
||||||
|
|
@ -900,9 +774,7 @@ void MinecraftServer::saveAllChunks() {
|
||||||
for (unsigned int i = 0; i < levels.length; i++) {
|
for (unsigned int i = 0; i < levels.length; i++) {
|
||||||
// 4J Stu - Due to the way save mounting is handled on XboxOne, we can
|
// 4J Stu - Due to the way save mounting is handled on XboxOne, we can
|
||||||
// actually save after the player has signed out.
|
// actually save after the player has signed out.
|
||||||
#if 1
|
|
||||||
if (m_bPrimaryPlayerSignedOut) break;
|
if (m_bPrimaryPlayerSignedOut) break;
|
||||||
#endif
|
|
||||||
// 4J Stu - Save the levels in reverse order so we don't overwrite the
|
// 4J Stu - Save the levels in reverse order so we don't overwrite the
|
||||||
// level.dat with the data from the nethers leveldata. Fix for #7418 -
|
// level.dat with the data from the nethers leveldata. Fix for #7418 -
|
||||||
// Functional: Gameplay: Saving after sleeping in a bed will place
|
// Functional: Gameplay: Saving after sleeping in a bed will place
|
||||||
|
|
@ -925,7 +797,7 @@ void MinecraftServer::saveAllChunks() {
|
||||||
|
|
||||||
// 4J-JEV: Added
|
// 4J-JEV: Added
|
||||||
void MinecraftServer::saveGameRules() {
|
void MinecraftServer::saveGameRules() {
|
||||||
#ifndef _CONTENT_PACKAGE
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
if (app.DebugSettingsOn() &&
|
if (app.DebugSettingsOn() &&
|
||||||
app.GetGameSettingsDebugMask(ProfileManager.GetPrimaryPad()) &
|
app.GetGameSettingsDebugMask(ProfileManager.GetPrimaryPad()) &
|
||||||
(1L << eDebugSetting_DistributableSave)) {
|
(1L << eDebugSetting_DistributableSave)) {
|
||||||
|
|
@ -1005,11 +877,6 @@ bool MinecraftServer::IsSuspending() { return m_suspending; }
|
||||||
void MinecraftServer::stopServer(bool didInit) {
|
void MinecraftServer::stopServer(bool didInit) {
|
||||||
// 4J-PB - need to halt the rendering of the data, since we're about to
|
// 4J-PB - need to halt the rendering of the data, since we're about to
|
||||||
// remove it
|
// remove it
|
||||||
#if 0
|
|
||||||
if (ShutdownManager::ShouldRun(
|
|
||||||
ShutdownManager::eServerThread)) // This thread will take itself
|
|
||||||
// out if we are shutting down
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
Minecraft::GetInstance()->gameRenderer->DisableUpdateThread();
|
Minecraft::GetInstance()->gameRenderer->DisableUpdateThread();
|
||||||
}
|
}
|
||||||
|
|
@ -1023,18 +890,9 @@ void MinecraftServer::stopServer(bool didInit) {
|
||||||
|
|
||||||
// also need to check for a profile switch here - primary player signs out,
|
// also need to check for a profile switch here - primary player signs out,
|
||||||
// and another player signs in before dismissing the dash
|
// and another player signs in before dismissing the dash
|
||||||
#if 0
|
|
||||||
// On Durango check if the primary user is signed in OR mid-sign-out
|
|
||||||
if (ProfileManager.GetUser(0, true) != nullptr)
|
|
||||||
#else
|
|
||||||
if ((m_bPrimaryPlayerSignedOut == false) &&
|
if ((m_bPrimaryPlayerSignedOut == false) &&
|
||||||
ProfileManager.IsSignedIn(ProfileManager.GetPrimaryPad()))
|
ProfileManager.IsSignedIn(ProfileManager.GetPrimaryPad()))
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
#if 0 || 0
|
|
||||||
// Always save on exit! Except if saves are disabled.
|
|
||||||
if (!saveOnExitAnswered()) m_saveOnExit = true;
|
|
||||||
#endif
|
|
||||||
// if trial version or saving is disabled, then don't save anything.
|
// if trial version or saving is disabled, then don't save anything.
|
||||||
// Also don't save anything if we didn't actually get through the server
|
// Also don't save anything if we didn't actually get through the server
|
||||||
// initialisation.
|
// initialisation.
|
||||||
|
|
@ -1076,11 +934,6 @@ void MinecraftServer::stopServer(bool didInit) {
|
||||||
// ultimately delete the directory level storage & therefore the
|
// ultimately delete the directory level storage & therefore the
|
||||||
// ConsoleSaveSplit instance, which needs to be around until all the sub
|
// ConsoleSaveSplit instance, which needs to be around until all the sub
|
||||||
// files have completed saving.
|
// files have completed saving.
|
||||||
#if 0 || 0 || 0
|
|
||||||
while (StorageManager.GetSaveState() != C4JStorage::ESaveGame_Idle) {
|
|
||||||
Sleep(10);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// 4J-PB remove the server levels
|
// 4J-PB remove the server levels
|
||||||
unsigned int iServerLevelC = levels.length;
|
unsigned int iServerLevelC = levels.length;
|
||||||
|
|
@ -1091,13 +944,6 @@ void MinecraftServer::stopServer(bool didInit) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0 || 0
|
|
||||||
// Clear the update flags as it's possible they could be out of sync,
|
|
||||||
// causing a crash when starting a new world after the first new level ticks
|
|
||||||
// Fix for PS3 #1538 - [IN GAME] If the user 'Exit without saving' from
|
|
||||||
// inside the Nether or The End, the title can hang when loading back into
|
|
||||||
// the save.
|
|
||||||
#endif
|
|
||||||
|
|
||||||
delete connection;
|
delete connection;
|
||||||
connection = NULL;
|
connection = NULL;
|
||||||
|
|
@ -1332,61 +1178,6 @@ void MinecraftServer::run(int64_t seed, void* lpParameter) {
|
||||||
|
|
||||||
switch (eAction) {
|
switch (eAction) {
|
||||||
case eXuiServerAction_AutoSaveGame:
|
case eXuiServerAction_AutoSaveGame:
|
||||||
#if 0 || 0
|
|
||||||
{
|
|
||||||
PIXBeginNamedEvent(0, "Autosave");
|
|
||||||
|
|
||||||
// Get the frequency of the timer
|
|
||||||
LARGE_INTEGER qwTicksPerSec, qwTime, qwNewTime,
|
|
||||||
qwDeltaTime;
|
|
||||||
float fElapsedTime = 0.0f;
|
|
||||||
QueryPerformanceFrequency(&qwTicksPerSec);
|
|
||||||
float fSecsPerTick =
|
|
||||||
1.0f / (float)qwTicksPerSec.QuadPart;
|
|
||||||
|
|
||||||
// Save the start time
|
|
||||||
QueryPerformanceCounter(&qwTime);
|
|
||||||
|
|
||||||
if (players != NULL) {
|
|
||||||
players->saveAll(NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (unsigned int j = 0; j < levels.length; j++) {
|
|
||||||
if (s_bServerHalted) break;
|
|
||||||
// 4J Stu - Save the levels in reverse order so we
|
|
||||||
// don't overwrite the level.dat with the data from
|
|
||||||
// the nethers leveldata. Fix for #7418 -
|
|
||||||
// Functional: Gameplay: Saving after sleeping in a
|
|
||||||
// bed will place player at nighttime when
|
|
||||||
// restarting.
|
|
||||||
ServerLevel* level = levels[levels.length - 1 - j];
|
|
||||||
PIXBeginNamedEvent(0, "Saving level %d",
|
|
||||||
levels.length - 1 - j);
|
|
||||||
level->save(false, NULL, true);
|
|
||||||
PIXEndNamedEvent();
|
|
||||||
}
|
|
||||||
if (!s_bServerHalted) {
|
|
||||||
PIXBeginNamedEvent(0, "Saving game rules");
|
|
||||||
saveGameRules();
|
|
||||||
PIXEndNamedEvent();
|
|
||||||
|
|
||||||
PIXBeginNamedEvent(0, "Save to disc");
|
|
||||||
levels[0]->saveToDisc(
|
|
||||||
Minecraft::GetInstance()->progressRenderer,
|
|
||||||
true);
|
|
||||||
PIXEndNamedEvent();
|
|
||||||
}
|
|
||||||
PIXEndNamedEvent();
|
|
||||||
|
|
||||||
QueryPerformanceCounter(&qwNewTime);
|
|
||||||
qwDeltaTime.QuadPart =
|
|
||||||
qwNewTime.QuadPart - qwTime.QuadPart;
|
|
||||||
fElapsedTime = fSecsPerTick *
|
|
||||||
static_cast<float>(qwDeltaTime.QuadPart);
|
|
||||||
app.DebugPrintf("Autosave: Elapsed time %f\n",
|
|
||||||
fElapsedTime);
|
|
||||||
} break;
|
|
||||||
#endif
|
|
||||||
case eXuiServerAction_SaveGame:
|
case eXuiServerAction_SaveGame:
|
||||||
app.EnterSaveNotificationSection();
|
app.EnterSaveNotificationSection();
|
||||||
if (players != NULL) {
|
if (players != NULL) {
|
||||||
|
|
@ -1503,7 +1294,7 @@ void MinecraftServer::run(int64_t seed, void* lpParameter) {
|
||||||
->options->difficulty)));
|
->options->difficulty)));
|
||||||
break;
|
break;
|
||||||
case eXuiServerAction_ExportSchematic:
|
case eXuiServerAction_ExportSchematic:
|
||||||
#ifndef _CONTENT_PACKAGE
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
app.EnterSaveNotificationSection();
|
app.EnterSaveNotificationSection();
|
||||||
|
|
||||||
// players->broadcastAll(
|
// players->broadcastAll(
|
||||||
|
|
@ -1542,7 +1333,7 @@ void MinecraftServer::run(int64_t seed, void* lpParameter) {
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case eXuiServerAction_SetCameraLocation:
|
case eXuiServerAction_SetCameraLocation:
|
||||||
#ifndef _CONTENT_PACKAGE
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
{
|
{
|
||||||
DebugSetCameraPosition* pos =
|
DebugSetCameraPosition* pos =
|
||||||
(DebugSetCameraPosition*)param;
|
(DebugSetCameraPosition*)param;
|
||||||
|
|
@ -1585,29 +1376,6 @@ void MinecraftServer::run(int64_t seed, void* lpParameter) {
|
||||||
// Sleep(10);
|
// Sleep(10);
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
#if 0
|
|
||||||
} catch (Throwable t) {
|
|
||||||
t.printStackTrace();
|
|
||||||
logger.log(Level.SEVERE, "Unexpected exception", t);
|
|
||||||
while (running) {
|
|
||||||
handleConsoleInputs();
|
|
||||||
try {
|
|
||||||
Thread.sleep(10);
|
|
||||||
} catch (InterruptedException e1) {
|
|
||||||
e1.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} finally {
|
|
||||||
try {
|
|
||||||
stopServer();
|
|
||||||
stopped = true;
|
|
||||||
} catch (Throwable t) {
|
|
||||||
t.printStackTrace();
|
|
||||||
} finally {
|
|
||||||
System::exit(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// 4J Stu - Stop the server when the loops complete, as the finally would do
|
// 4J Stu - Stop the server when the loops complete, as the finally would do
|
||||||
stopServer(didInit);
|
stopServer(didInit);
|
||||||
|
|
@ -1708,22 +1476,6 @@ void MinecraftServer::tick() {
|
||||||
// nether, but Actually gets removed only when it returns
|
// nether, but Actually gets removed only when it returns
|
||||||
if ((players->getPlayerCount(level) > 0) ||
|
if ((players->getPlayerCount(level) > 0) ||
|
||||||
(level->hasEntitiesToRemove())) {
|
(level->hasEntitiesToRemove())) {
|
||||||
#if 0
|
|
||||||
// AP - the PlayerList->viewDistance initially starts out at 3
|
|
||||||
// to make starting a level speedy the problem with this is that
|
|
||||||
// spawned monsters are always generated on the edge of the
|
|
||||||
// known map which means they wont process (unless they are
|
|
||||||
// surrounded by 2 visible chunks). This means they wont
|
|
||||||
// checkDespawn so they are NEVER removed which results in
|
|
||||||
// monsters not spawning. This bit of hack will modify the view
|
|
||||||
// distance once the level is up and running.
|
|
||||||
int newViewDistance = 5;
|
|
||||||
level->getServer()->getPlayers()->setViewDistance(
|
|
||||||
newViewDistance);
|
|
||||||
level->getTracker()->updateMaxRange();
|
|
||||||
level->getChunkMap()->setRadius(
|
|
||||||
level->getServer()->getPlayers()->getViewDistance());
|
|
||||||
#endif
|
|
||||||
level->tickEntities();
|
level->tickEntities();
|
||||||
}
|
}
|
||||||
PIXEndNamedEvent();
|
PIXEndNamedEvent();
|
||||||
|
|
@ -1749,11 +1501,6 @@ void MinecraftServer::tick() {
|
||||||
PIXEndNamedEvent();
|
PIXEndNamedEvent();
|
||||||
|
|
||||||
// 4J - removed
|
// 4J - removed
|
||||||
#if 0
|
|
||||||
for (int i = 0; i < tickables.size(); i++) {
|
|
||||||
tickables.get(i)-tick();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// try { // 4J - removed try/catch
|
// try { // 4J - removed try/catch
|
||||||
handleConsoleInputs();
|
handleConsoleInputs();
|
||||||
|
|
@ -1824,7 +1571,7 @@ void MinecraftServer::setLevel(int dimension, ServerLevel* level) {
|
||||||
levels[0] = level;
|
levels[0] = level;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined _ACK_CHUNK_SEND_THROTTLING
|
#if defined(_ACK_CHUNK_SEND_THROTTLING)
|
||||||
bool MinecraftServer::chunkPacketManagement_CanSendTo(INetworkPlayer* player) {
|
bool MinecraftServer::chunkPacketManagement_CanSendTo(INetworkPlayer* player) {
|
||||||
if (s_hasSentEnoughPackets) return false;
|
if (s_hasSentEnoughPackets) return false;
|
||||||
if (player == NULL) return false;
|
if (player == NULL) return false;
|
||||||
|
|
@ -1835,11 +1582,7 @@ bool MinecraftServer::chunkPacketManagement_CanSendTo(INetworkPlayer* player) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0 || 0 || 0
|
|
||||||
return (player->GetOutstandingAckCount() < 3);
|
|
||||||
#else
|
|
||||||
return (player->GetOutstandingAckCount() < 2);
|
return (player->GetOutstandingAckCount() < 2);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MinecraftServer::chunkPacketManagement_DidSendTo(INetworkPlayer* player) {
|
void MinecraftServer::chunkPacketManagement_DidSendTo(INetworkPlayer* player) {
|
||||||
|
|
|
||||||
|
|
@ -22,10 +22,6 @@ class CommandDispatcher;
|
||||||
|
|
||||||
#define MINECRAFT_SERVER_SLOW_QUEUE_DELAY 250
|
#define MINECRAFT_SERVER_SLOW_QUEUE_DELAY 250
|
||||||
|
|
||||||
#if 0 || 0 || 0 || \
|
|
||||||
0 || 0
|
|
||||||
#define _ACK_CHUNK_SEND_THROTTLING
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef struct _LoadSaveDataThreadParam {
|
typedef struct _LoadSaveDataThreadParam {
|
||||||
void* data;
|
void* data;
|
||||||
|
|
@ -150,7 +146,7 @@ private:
|
||||||
void saveAllChunks();
|
void saveAllChunks();
|
||||||
void saveGameRules();
|
void saveGameRules();
|
||||||
void stopServer(bool didInit);
|
void stopServer(bool didInit);
|
||||||
#ifdef _LARGE_WORLDS
|
#if defined(_LARGE_WORLDS)
|
||||||
void overwriteBordersForNewWorldSize(ServerLevel* level);
|
void overwriteBordersForNewWorldSize(ServerLevel* level);
|
||||||
void overwriteHellBordersForNewWorldSize(ServerLevel* level,
|
void overwriteHellBordersForNewWorldSize(ServerLevel* level,
|
||||||
int oldHellSize);
|
int oldHellSize);
|
||||||
|
|
@ -280,7 +276,7 @@ private:
|
||||||
|
|
||||||
// 4J Added - A static that stores the QNet index of the player that is next
|
// 4J Added - A static that stores the QNet index of the player that is next
|
||||||
// allowed to send a packet in the slow queue
|
// allowed to send a packet in the slow queue
|
||||||
#ifdef _ACK_CHUNK_SEND_THROTTLING
|
#if defined(_ACK_CHUNK_SEND_THROTTLING)
|
||||||
static bool s_hasSentEnoughPackets;
|
static bool s_hasSentEnoughPackets;
|
||||||
static int64_t s_tickStartTime;
|
static int64_t s_tickStartTime;
|
||||||
static std::vector<INetworkPlayer*> s_sentTo;
|
static std::vector<INetworkPlayer*> s_sentTo;
|
||||||
|
|
@ -301,7 +297,7 @@ private:
|
||||||
public:
|
public:
|
||||||
static bool chunkPacketManagement_CanSendTo(INetworkPlayer* player);
|
static bool chunkPacketManagement_CanSendTo(INetworkPlayer* player);
|
||||||
static void chunkPacketManagement_DidSendTo(INetworkPlayer* player);
|
static void chunkPacketManagement_DidSendTo(INetworkPlayer* player);
|
||||||
#ifndef _ACK_CHUNK_SEND_THROTTLING
|
#if !defined(_ACK_CHUNK_SEND_THROTTLING)
|
||||||
static void cycleSlowQueueIndex();
|
static void cycleSlowQueueIndex();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,11 +9,7 @@
|
||||||
#define MAX_TYPE_SIZE 32
|
#define MAX_TYPE_SIZE 32
|
||||||
#define MAX_EXTENSION_TYPES 3
|
#define MAX_EXTENSION_TYPES 3
|
||||||
|
|
||||||
#if 0
|
|
||||||
#define MAX_LOCAL_PLAYERS 1
|
|
||||||
#else
|
|
||||||
#define MAX_LOCAL_PLAYERS 4
|
#define MAX_LOCAL_PLAYERS 4
|
||||||
#endif
|
|
||||||
|
|
||||||
// 4J Stu - Required for sentient reporting of whether the volume level has been
|
// 4J Stu - Required for sentient reporting of whether the volume level has been
|
||||||
// changed or not
|
// changed or not
|
||||||
|
|
@ -59,15 +55,6 @@ enum EGameHostOptionWorldSize {
|
||||||
e_worldSize_Large
|
e_worldSize_Large
|
||||||
};
|
};
|
||||||
|
|
||||||
#if 0
|
|
||||||
#define PROFILE_VERSION_1 1
|
|
||||||
#define PROFILE_VERSION_2 2
|
|
||||||
#define PROFILE_VERSION_3 3
|
|
||||||
#define PROFILE_VERSION_4 4
|
|
||||||
#define PROFILE_VERSION_5 6
|
|
||||||
#define PROFILE_VERSION_6 7
|
|
||||||
#define PROFILE_VERSION_7 8
|
|
||||||
#endif
|
|
||||||
#define PROFILE_VERSION_8 10
|
#define PROFILE_VERSION_8 10
|
||||||
#define PROFILE_VERSION_9 11
|
#define PROFILE_VERSION_9 11
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -72,9 +72,6 @@ enum eXuiAction {
|
||||||
eAppAction_TexturePackRequired, // when the user has joined from invite,
|
eAppAction_TexturePackRequired, // when the user has joined from invite,
|
||||||
// but doesn't have the texture pack
|
// but doesn't have the texture pack
|
||||||
|
|
||||||
#if 0
|
|
||||||
eAppAction_OptionsSaveNoSpace,
|
|
||||||
#endif
|
|
||||||
eAppAction_DebugText,
|
eAppAction_DebugText,
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
@ -630,153 +627,6 @@ enum eGameHostOption {
|
||||||
|
|
||||||
// 4J-PB - If any new DLC items are added to the TMSFiles, this array needs
|
// 4J-PB - If any new DLC items are added to the TMSFiles, this array needs
|
||||||
// updated
|
// updated
|
||||||
#if 0
|
|
||||||
enum _TMSFILES {
|
|
||||||
TMS_SP1 = 0,
|
|
||||||
TMS_SP2,
|
|
||||||
TMS_SP3,
|
|
||||||
TMS_SP4,
|
|
||||||
TMS_SP5,
|
|
||||||
TMS_SP6,
|
|
||||||
TMS_SPF,
|
|
||||||
TMS_SPB,
|
|
||||||
TMS_SPC,
|
|
||||||
TMS_SPZ,
|
|
||||||
TMS_SPM,
|
|
||||||
TMS_SPI,
|
|
||||||
TMS_SPG,
|
|
||||||
TMS_SPD1,
|
|
||||||
TMS_SPSW1,
|
|
||||||
|
|
||||||
TMS_THST,
|
|
||||||
TMS_THIR,
|
|
||||||
TMS_THGO,
|
|
||||||
TMS_THDI,
|
|
||||||
TMS_THAW,
|
|
||||||
|
|
||||||
TMS_GPAN,
|
|
||||||
TMS_GPCO,
|
|
||||||
TMS_GPEN,
|
|
||||||
TMS_GPFO,
|
|
||||||
TMS_GPTO,
|
|
||||||
TMS_GPBA,
|
|
||||||
TMS_GPFA,
|
|
||||||
TMS_GPME,
|
|
||||||
TMS_GPMF,
|
|
||||||
TMS_GPMM,
|
|
||||||
TMS_GPSE,
|
|
||||||
TMS_GPOr,
|
|
||||||
TMS_GPMi,
|
|
||||||
TMS_GPMB,
|
|
||||||
TMS_GPBr,
|
|
||||||
TMS_GPM1,
|
|
||||||
TMS_GPM2,
|
|
||||||
TMS_GPM3,
|
|
||||||
|
|
||||||
TMS_AH_0001,
|
|
||||||
TMS_AH_0002,
|
|
||||||
TMS_AH_0003,
|
|
||||||
TMS_AH_0004,
|
|
||||||
TMS_AH_0005,
|
|
||||||
TMS_AH_0006,
|
|
||||||
TMS_AH_0007,
|
|
||||||
TMS_AH_0008,
|
|
||||||
TMS_AH_0009,
|
|
||||||
TMS_AH_0010,
|
|
||||||
TMS_AH_0011,
|
|
||||||
TMS_AH_0012,
|
|
||||||
TMS_AH_0013,
|
|
||||||
|
|
||||||
TMS_AT_0001,
|
|
||||||
TMS_AT_0002,
|
|
||||||
TMS_AT_0003,
|
|
||||||
TMS_AT_0004,
|
|
||||||
TMS_AT_0005,
|
|
||||||
TMS_AT_0006,
|
|
||||||
TMS_AT_0007,
|
|
||||||
TMS_AT_0008,
|
|
||||||
TMS_AT_0009,
|
|
||||||
TMS_AT_0010,
|
|
||||||
TMS_AT_0011,
|
|
||||||
TMS_AT_0012,
|
|
||||||
TMS_AT_0013,
|
|
||||||
TMS_AT_0014,
|
|
||||||
TMS_AT_0015,
|
|
||||||
TMS_AT_0016,
|
|
||||||
TMS_AT_0017,
|
|
||||||
TMS_AT_0018,
|
|
||||||
TMS_AT_0019,
|
|
||||||
TMS_AT_0020,
|
|
||||||
TMS_AT_0021,
|
|
||||||
TMS_AT_0022,
|
|
||||||
TMS_AT_0023,
|
|
||||||
TMS_AT_0024,
|
|
||||||
TMS_AT_0025,
|
|
||||||
TMS_AT_0026,
|
|
||||||
|
|
||||||
TMS_AP_0001,
|
|
||||||
TMS_AP_0002,
|
|
||||||
TMS_AP_0003,
|
|
||||||
TMS_AP_0004,
|
|
||||||
TMS_AP_0005,
|
|
||||||
TMS_AP_0006,
|
|
||||||
TMS_AP_0007,
|
|
||||||
TMS_AP_0009,
|
|
||||||
TMS_AP_0010,
|
|
||||||
TMS_AP_0011,
|
|
||||||
TMS_AP_0012,
|
|
||||||
TMS_AP_0013,
|
|
||||||
TMS_AP_0014,
|
|
||||||
TMS_AP_0015,
|
|
||||||
TMS_AP_0016,
|
|
||||||
TMS_AP_0017,
|
|
||||||
TMS_AP_0018,
|
|
||||||
|
|
||||||
TMS_AP_0019,
|
|
||||||
TMS_AP_0020,
|
|
||||||
TMS_AP_0021,
|
|
||||||
TMS_AP_0022,
|
|
||||||
TMS_AP_0023,
|
|
||||||
TMS_AP_0024,
|
|
||||||
TMS_AP_0025,
|
|
||||||
TMS_AP_0026,
|
|
||||||
TMS_AP_0027,
|
|
||||||
TMS_AP_0028,
|
|
||||||
TMS_AP_0029,
|
|
||||||
TMS_AP_0030,
|
|
||||||
TMS_AP_0031,
|
|
||||||
TMS_AP_0032,
|
|
||||||
TMS_AP_0033,
|
|
||||||
|
|
||||||
TMS_AA_0001,
|
|
||||||
|
|
||||||
TMS_MPMA,
|
|
||||||
TMS_MPMA_DAT,
|
|
||||||
TMS_MPSR,
|
|
||||||
TMS_MPSR_DAT,
|
|
||||||
TMS_MPHA,
|
|
||||||
TMS_MPHA_DAT,
|
|
||||||
TMS_MPFE,
|
|
||||||
TMS_MPFE_DAT,
|
|
||||||
|
|
||||||
TMS_TP01,
|
|
||||||
TMS_TP01_DAT,
|
|
||||||
TMS_TP02,
|
|
||||||
TMS_TP02_DAT,
|
|
||||||
TMS_TP04,
|
|
||||||
TMS_TP04_DAT,
|
|
||||||
TMS_TP05,
|
|
||||||
TMS_TP05_DAT,
|
|
||||||
TMS_TP06,
|
|
||||||
TMS_TP06_DAT,
|
|
||||||
TMS_TP07,
|
|
||||||
TMS_TP07_DAT,
|
|
||||||
TMS_TP08,
|
|
||||||
TMS_TP08_DAT,
|
|
||||||
|
|
||||||
TMS_COUNT
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
enum EHTMLFontSize {
|
enum EHTMLFontSize {
|
||||||
eHTMLSize_Normal,
|
eHTMLSize_Normal,
|
||||||
|
|
@ -808,14 +658,7 @@ enum EControllerActions {
|
||||||
ACTION_MENU_OTHER_STICK_RIGHT,
|
ACTION_MENU_OTHER_STICK_RIGHT,
|
||||||
ACTION_MENU_PAUSEMENU,
|
ACTION_MENU_PAUSEMENU,
|
||||||
|
|
||||||
#if 0
|
|
||||||
ACTION_MENU_GTC_PAUSE,
|
|
||||||
ACTION_MENU_GTC_RESUME,
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
ACTION_MENU_TOUCHPAD_PRESS,
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ACTION_MENU_OK,
|
ACTION_MENU_OK,
|
||||||
ACTION_MENU_CANCEL,
|
ACTION_MENU_CANCEL,
|
||||||
|
|
|
||||||
|
|
@ -117,17 +117,10 @@ typedef struct {
|
||||||
};
|
};
|
||||||
} GAME_SETTINGS;
|
} GAME_SETTINGS;
|
||||||
|
|
||||||
#if 0
|
|
||||||
typedef struct {
|
|
||||||
WCHAR wchPlayerUID[64];
|
|
||||||
char pszLevelName[14];
|
|
||||||
} BANNEDLISTDATA, *PBANNEDLISTDATA;
|
|
||||||
#else
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
PlayerUID xuid;
|
PlayerUID xuid;
|
||||||
char pszLevelName[14];
|
char pszLevelName[14];
|
||||||
} BANNEDLISTDATA, *PBANNEDLISTDATA;
|
} BANNEDLISTDATA, *PBANNEDLISTDATA;
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef std::vector<PBANNEDLISTDATA> VBANNEDLIST;
|
typedef std::vector<PBANNEDLISTDATA> VBANNEDLIST;
|
||||||
|
|
||||||
|
|
@ -150,26 +143,12 @@ typedef struct {
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
eDLCContentType eDLCType;
|
eDLCContentType eDLCType;
|
||||||
#if 0 || 0 || 0
|
|
||||||
char chImageURL[256]; // SCE_NP_COMMERCE2_URL_LEN
|
|
||||||
#else
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
|
|
||||||
std::wstring wsProductId;
|
|
||||||
std::wstring wsDisplayName;
|
|
||||||
|
|
||||||
// add a store for the local DLC image
|
|
||||||
std::uint8_t* pbImageData;
|
|
||||||
unsigned int dwImageBytes;
|
|
||||||
#else
|
|
||||||
ULONGLONG ullOfferID_Full;
|
ULONGLONG ullOfferID_Full;
|
||||||
ULONGLONG ullOfferID_Trial;
|
ULONGLONG ullOfferID_Trial;
|
||||||
#endif
|
|
||||||
WCHAR wchBanner[MAX_BANNERNAME_SIZE];
|
WCHAR wchBanner[MAX_BANNERNAME_SIZE];
|
||||||
WCHAR wchDataFile[MAX_BANNERNAME_SIZE];
|
WCHAR wchDataFile[MAX_BANNERNAME_SIZE];
|
||||||
int iGender;
|
int iGender;
|
||||||
#endif
|
|
||||||
int iConfig;
|
int iConfig;
|
||||||
unsigned int uiSortIndex;
|
unsigned int uiSortIndex;
|
||||||
} DLC_INFO;
|
} DLC_INFO;
|
||||||
|
|
@ -196,12 +175,8 @@ typedef struct _TMSPPRequest {
|
||||||
C4JStorage::eGlobalStorage eStorageFacility;
|
C4JStorage::eGlobalStorage eStorageFacility;
|
||||||
C4JStorage::eTMS_FILETYPEVAL eFileTypeVal;
|
C4JStorage::eTMS_FILETYPEVAL eFileTypeVal;
|
||||||
// char szFilename[MAX_TMSFILENAME_SIZE];
|
// char szFilename[MAX_TMSFILENAME_SIZE];
|
||||||
#if 0
|
|
||||||
int (*CallbackFunc)(void*, int, int, void*, WCHAR*);
|
|
||||||
#else
|
|
||||||
int (*CallbackFunc)(void*, int, int, C4JStorage::PTMSPP_FILEDATA,
|
int (*CallbackFunc)(void*, int, int, C4JStorage::PTMSPP_FILEDATA,
|
||||||
LPCSTR szFilename);
|
LPCSTR szFilename);
|
||||||
#endif
|
|
||||||
WCHAR wchFilename[MAX_TMSFILENAME_SIZE];
|
WCHAR wchFilename[MAX_TMSFILENAME_SIZE];
|
||||||
|
|
||||||
void* lpCallbackParam;
|
void* lpCallbackParam;
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,7 @@
|
||||||
#include "../../Minecraft.Client/Textures/Packs/DLCTexturePack.h"
|
#include "../../Minecraft.Client/Textures/Packs/DLCTexturePack.h"
|
||||||
#include "../DLC/DLCAudioFile.h"
|
#include "../DLC/DLCAudioFile.h"
|
||||||
|
|
||||||
#if 0
|
#if defined(__linux__)
|
||||||
#include <audioout.h>
|
|
||||||
#endif
|
|
||||||
#ifdef __linux__
|
|
||||||
#define STB_VORBIS_HEADER_ONLY
|
#define STB_VORBIS_HEADER_ONLY
|
||||||
#include "stb_vorbis.c"
|
#include "stb_vorbis.c"
|
||||||
// Fixes strcasecmp in miniaudio
|
// Fixes strcasecmp in miniaudio
|
||||||
|
|
@ -35,7 +32,7 @@ int strcasecmp(const char* a, const char* b) {
|
||||||
#undef STB_VORBIS_HEADER_ONLY
|
#undef STB_VORBIS_HEADER_ONLY
|
||||||
#include "stb_vorbis.c"
|
#include "stb_vorbis.c"
|
||||||
#endif
|
#endif
|
||||||
#ifdef _WINDOWS64
|
#if defined(_WINDOWS64)
|
||||||
#include "../../Minecraft.Client/Platform/Windows64/Windows64_App.h"
|
#include "../../Minecraft.Client/Platform/Windows64/Windows64_App.h"
|
||||||
#include "../../Minecraft.Client/Platform/Windows64/Miles/include/imssapi.h"
|
#include "../../Minecraft.Client/Platform/Windows64/Miles/include/imssapi.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -81,56 +78,21 @@ const char* SoundEngine::m_szStreamFileA[eStream_Max] = {"calm1",
|
||||||
"strad",
|
"strad",
|
||||||
"ward",
|
"ward",
|
||||||
"where_are_we_now"};
|
"where_are_we_now"};
|
||||||
#ifdef __linux__
|
#if defined(__linux__)
|
||||||
char SoundEngine::m_szSoundPath[] = {"Sound/"};
|
char SoundEngine::m_szSoundPath[] = {"Sound/"};
|
||||||
char SoundEngine::m_szMusicPath[] = {"music/"};
|
char SoundEngine::m_szMusicPath[] = {"music/"};
|
||||||
char SoundEngine::m_szRedistName[] = {"redist64"};
|
char SoundEngine::m_szRedistName[] = {"redist64"};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _WINDOWS64
|
#if defined(_WINDOWS64)
|
||||||
char SoundEngine::m_szSoundPath[] = {"Durango\\Sound\\"};
|
char SoundEngine::m_szSoundPath[] = {"Durango\\Sound\\"};
|
||||||
char SoundEngine::m_szMusicPath[] = {"music\\"};
|
char SoundEngine::m_szMusicPath[] = {"music\\"};
|
||||||
char SoundEngine::m_szRedistName[] = {"redist64"};
|
char SoundEngine::m_szRedistName[] = {"redist64"};
|
||||||
#elif 0
|
|
||||||
char SoundEngine::m_szSoundPath[] = {"Sound\\"};
|
|
||||||
char SoundEngine::m_szMusicPath[] = {"music\\"};
|
|
||||||
char SoundEngine::m_szRedistName[] = {"redist64"};
|
|
||||||
#elif 0
|
|
||||||
|
|
||||||
#ifdef _CONTENT_PACKAGE
|
|
||||||
char SoundEngine::m_szSoundPath[] = {"Sound/"};
|
|
||||||
#elif defined _ART_BUILD
|
|
||||||
char SoundEngine::m_szSoundPath[] = {"Sound/"};
|
|
||||||
#else
|
|
||||||
// just use the host Durango folder for the sound. In the content package, we'll
|
|
||||||
// have moved this in the .gp4 file
|
|
||||||
char SoundEngine::m_szSoundPath[] = {"Durango/Sound/"};
|
|
||||||
#endif
|
|
||||||
char SoundEngine::m_szMusicPath[] = {"music/"};
|
|
||||||
char SoundEngine::m_szRedistName[] = {"redist64"};
|
|
||||||
#elif 0
|
|
||||||
char SoundEngine::m_szSoundPath[] = {"PSVita/Sound/"};
|
|
||||||
char SoundEngine::m_szMusicPath[] = {"music/"};
|
|
||||||
char SoundEngine::m_szRedistName[] = {"redist"};
|
|
||||||
#elif 0
|
|
||||||
// extern const char* getPS3HomePath();
|
|
||||||
char SoundEngine::m_szSoundPath[] = {"PS3/Sound/"};
|
|
||||||
char SoundEngine::m_szMusicPath[] = {"music/"};
|
|
||||||
char SoundEngine::m_szRedistName[] = {"redist"};
|
|
||||||
|
|
||||||
#define USE_SPURS
|
|
||||||
|
|
||||||
#ifdef USE_SPURS
|
|
||||||
#include <cell/spurs.h>
|
|
||||||
#else
|
|
||||||
#include <sys/spu_image.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
// END ASSETS
|
// END ASSETS
|
||||||
|
|
||||||
// Linux specific functions
|
// Linux specific functions
|
||||||
#ifdef __linux__
|
#if defined(__linux__)
|
||||||
std::wstring stws(const char* utf8) {
|
std::wstring stws(const char* utf8) {
|
||||||
size_t len = std::mbstowcs(nullptr, utf8, 0);
|
size_t len = std::mbstowcs(nullptr, utf8, 0);
|
||||||
if (len == static_cast<size_t>(-1)) return L"";
|
if (len == static_cast<size_t>(-1)) return L"";
|
||||||
|
|
@ -438,7 +400,7 @@ void SoundEngine::playStreaming(const wstring& name, float x, float y, float z,
|
||||||
m_iMusicDelay = random->nextInt(
|
m_iMusicDelay = random->nextInt(
|
||||||
20 * 60 * 3); // random->nextInt(20 * 60 * 10) + 20 * 60 * 10;
|
20 * 60 * 3); // random->nextInt(20 * 60 * 10) + 20 * 60 * 10;
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#if defined(_DEBUG)
|
||||||
m_iMusicDelay = 0;
|
m_iMusicDelay = 0;
|
||||||
#endif
|
#endif
|
||||||
Minecraft* pMinecraft = Minecraft::GetInstance();
|
Minecraft* pMinecraft = Minecraft::GetInstance();
|
||||||
|
|
@ -1044,21 +1006,13 @@ void SoundEngine::tick(shared_ptr<Mob>* players, float a) {
|
||||||
#else
|
#else
|
||||||
void SoundEngine::init(Options* pOptions) {
|
void SoundEngine::init(Options* pOptions) {
|
||||||
app.DebugPrintf("---SoundEngine::init\n");
|
app.DebugPrintf("---SoundEngine::init\n");
|
||||||
#ifdef __DISABLE_MILES__
|
#if defined(__DISABLE_MILES__)
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
#if 0
|
|
||||||
C4JThread::PushAffinityAllCores();
|
|
||||||
#endif
|
|
||||||
#if 0 || 0 || 0 || \
|
|
||||||
0
|
|
||||||
Register_RIB(BinkADec);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
char* redistpath;
|
char* redistpath;
|
||||||
|
|
||||||
#if (defined _WINDOWS64 || \
|
#if defined(_WINDOWS64)
|
||||||
0) // || 0 || 0 )
|
|
||||||
redistpath = AIL_set_redist_directory(m_szRedistName);
|
redistpath = AIL_set_redist_directory(m_szRedistName);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -1068,55 +1022,15 @@ void SoundEngine::init(Options* pOptions) {
|
||||||
int iNumberOfChannels = initAudioHardware(8);
|
int iNumberOfChannels = initAudioHardware(8);
|
||||||
|
|
||||||
// Create a driver to render our audio - 44khz, 16 bit,
|
// Create a driver to render our audio - 44khz, 16 bit,
|
||||||
#if 0
|
|
||||||
// On the Sony PS3, the driver is always opened in 48 kHz, 32-bit floating
|
|
||||||
// point. The only meaningful configurations are MSS_MC_STEREO,
|
|
||||||
// MSS_MC_51_DISCRETE, and MSS_MC_71_DISCRETE.
|
|
||||||
m_hDriver = AIL_open_digital_driver(48000, 16, iNumberOfChannels,
|
|
||||||
AIL_OPEN_DIGITAL_USE_SPU0);
|
|
||||||
#elif 0
|
|
||||||
|
|
||||||
// maximum of 16 samples
|
|
||||||
AIL_set_preference(DIG_MIXER_CHANNELS, 16);
|
|
||||||
|
|
||||||
m_hDriver = AIL_open_digital_driver(48000, 16, MSS_MC_STEREO, 0);
|
|
||||||
|
|
||||||
// AP - For some reason the submit thread defaults to a priority of zero
|
|
||||||
// (invalid). Make sure it has the highest priority to avoid audio breakup.
|
|
||||||
SceUID threadID;
|
|
||||||
AIL_platform_property(m_hDriver, PSP2_SUBMIT_THREAD, &threadID, 0, 0);
|
|
||||||
S32 g_DefaultCPU = sceKernelGetThreadCpuAffinityMask(threadID);
|
|
||||||
S32 Old = sceKernelChangeThreadPriority(threadID, 64);
|
|
||||||
|
|
||||||
// AP - register a callback when the mixer starts
|
|
||||||
AILMIXERCB temp = AIL_register_mix_callback(m_hDriver, MilesMixerCB);
|
|
||||||
|
|
||||||
InitializeCriticalSection(&SoundEngine_MixerMutex);
|
|
||||||
|
|
||||||
#elif 0
|
|
||||||
m_hDriver = AIL_open_digital_driver(48000, 16, 2, 0);
|
|
||||||
app.DebugPrintf("---SoundEngine::init - AIL_open_digital_driver\n");
|
|
||||||
|
|
||||||
#else
|
|
||||||
m_hDriver = AIL_open_digital_driver(44100, 16, MSS_MC_USE_SYSTEM_CONFIG, 0);
|
m_hDriver = AIL_open_digital_driver(44100, 16, MSS_MC_USE_SYSTEM_CONFIG, 0);
|
||||||
#endif
|
|
||||||
if (m_hDriver == 0) {
|
if (m_hDriver == 0) {
|
||||||
app.DebugPrintf("Couldn't open digital sound driver. (%s)\n",
|
app.DebugPrintf("Couldn't open digital sound driver. (%s)\n",
|
||||||
AIL_last_error());
|
AIL_last_error());
|
||||||
AIL_shutdown();
|
AIL_shutdown();
|
||||||
#if 0
|
|
||||||
C4JThread::PopAffinity();
|
|
||||||
#endif
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
app.DebugPrintf("---SoundEngine::init - driver opened\n");
|
app.DebugPrintf("---SoundEngine::init - driver opened\n");
|
||||||
|
|
||||||
#if 0
|
|
||||||
|
|
||||||
// set high falloff power for maximum spatial effect in software mode
|
|
||||||
AIL_set_speaker_configuration(m_hDriver, 0, 0, 4.0F);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
AIL_set_event_error_callback(ErrorCallback);
|
AIL_set_event_error_callback(ErrorCallback);
|
||||||
|
|
||||||
|
|
@ -1134,40 +1048,12 @@ void SoundEngine::init(Options* pOptions) {
|
||||||
app.DebugPrintf("Couldn't init event system (%s).\n", AIL_last_error());
|
app.DebugPrintf("Couldn't init event system (%s).\n", AIL_last_error());
|
||||||
AIL_close_digital_driver(m_hDriver);
|
AIL_close_digital_driver(m_hDriver);
|
||||||
AIL_shutdown();
|
AIL_shutdown();
|
||||||
#if 0
|
|
||||||
C4JThread::PopAffinity();
|
|
||||||
#endif
|
|
||||||
app.DebugPrintf(
|
app.DebugPrintf(
|
||||||
"---SoundEngine::init - AIL_startup_event_system failed\n");
|
"---SoundEngine::init - AIL_startup_event_system failed\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
char szBankName[255];
|
char szBankName[255];
|
||||||
#if 0
|
|
||||||
if (app.GetBootedFromDiscPatch()) {
|
|
||||||
char szTempSoundFilename[255];
|
|
||||||
sprintf(szTempSoundFilename, "%s%s", m_szSoundPath, "Minecraft.msscmp");
|
|
||||||
|
|
||||||
app.DebugPrintf(
|
|
||||||
"SoundEngine::playMusicUpdate - (booted from disc patch) looking "
|
|
||||||
"for %s\n",
|
|
||||||
szTempSoundFilename);
|
|
||||||
sprintf(szBankName, "%s/%s", app.GetBDUsrDirPath(szTempSoundFilename),
|
|
||||||
m_szSoundPath);
|
|
||||||
app.DebugPrintf(
|
|
||||||
"SoundEngine::playMusicUpdate - (booted from disc patch) music "
|
|
||||||
"path - %s\n",
|
|
||||||
szBankName);
|
|
||||||
} else {
|
|
||||||
sprintf(szBankName, "%s/%s", getUsrDirPath(), m_szSoundPath);
|
|
||||||
}
|
|
||||||
|
|
||||||
#elif 0
|
|
||||||
sprintf(szBankName, "%s/%s", getUsrDirPath(), m_szSoundPath);
|
|
||||||
#elif 0
|
|
||||||
sprintf(szBankName, "%s/%s", getUsrDirPath(), m_szSoundPath);
|
|
||||||
#else
|
|
||||||
strcpy((char*)szBankName, m_szSoundPath);
|
strcpy((char*)szBankName, m_szSoundPath);
|
||||||
#endif
|
|
||||||
|
|
||||||
strcat((char*)szBankName, "Minecraft.msscmp");
|
strcat((char*)szBankName, "Minecraft.msscmp");
|
||||||
|
|
||||||
|
|
@ -1179,9 +1065,6 @@ void SoundEngine::init(Options* pOptions) {
|
||||||
Error);
|
Error);
|
||||||
AIL_close_digital_driver(m_hDriver);
|
AIL_close_digital_driver(m_hDriver);
|
||||||
AIL_shutdown();
|
AIL_shutdown();
|
||||||
#if 0
|
|
||||||
C4JThread::PopAffinity();
|
|
||||||
#endif
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1208,45 +1091,12 @@ void SoundEngine::init(Options* pOptions) {
|
||||||
|
|
||||||
m_openStreamThread = NULL;
|
m_openStreamThread = NULL;
|
||||||
|
|
||||||
#if 0
|
|
||||||
C4JThread::PopAffinity();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
// AP - By default the mixer won't start up and nothing will process. Kick
|
|
||||||
// off a blank sample to force the mixer to start up.
|
|
||||||
HSAMPLE Sample = AIL_allocate_sample_handle(m_hDriver);
|
|
||||||
AIL_init_sample(Sample, DIG_F_STEREO_16);
|
|
||||||
static U64 silence = 0;
|
|
||||||
AIL_set_sample_address(Sample, &silence, sizeof(U64));
|
|
||||||
AIL_start_sample(Sample);
|
|
||||||
|
|
||||||
// wait for 1 mix...
|
|
||||||
AIL_release_sample_handle(Sample);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
// void SoundEngine::SetHandle(int32_t hAudio)
|
|
||||||
// {
|
|
||||||
// //m_hAudio=hAudio;
|
|
||||||
// }
|
|
||||||
#endif
|
|
||||||
// AP - moved to a separate function so it can be called from the mixer callback
|
// AP - moved to a separate function so it can be called from the mixer callback
|
||||||
// on Vita
|
// on Vita
|
||||||
void SoundEngine::updateMiles() {
|
void SoundEngine::updateMiles() {
|
||||||
#if 0
|
|
||||||
// CD - We must check for Background Music [BGM] at any point
|
|
||||||
// If it's playing disable our audio, otherwise enable
|
|
||||||
int NoBGMPlaying = sceAudioOutGetAdopt(SCE_AUDIO_OUT_PORT_TYPE_BGM);
|
|
||||||
updateSystemMusicPlaying(!NoBGMPlaying);
|
|
||||||
#elif 0
|
|
||||||
// is the system playing background music?
|
|
||||||
SceAudioOutPortState outPortState;
|
|
||||||
sceAudioOutGetPortState(m_hBGMAudio, &outPortState);
|
|
||||||
updateSystemMusicPlaying(outPortState.output ==
|
|
||||||
SCE_AUDIO_OUT_STATE_OUTPUT_UNKNOWN);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (m_validListenerCount == 1) {
|
if (m_validListenerCount == 1) {
|
||||||
for (int i = 0; i < MAX_LOCAL_PLAYERS; i++) {
|
for (int i = 0; i < MAX_LOCAL_PLAYERS; i++) {
|
||||||
|
|
@ -1471,7 +1321,7 @@ void SoundEngine::updateMiles() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// #define DISTORTION_TEST
|
// #define DISTORTION_TEST
|
||||||
#ifdef DISTORTION_TEST
|
#if defined(DISTORTION_TEST)
|
||||||
static float fVal = 0.0f;
|
static float fVal = 0.0f;
|
||||||
#endif
|
#endif
|
||||||
/////////////////////////////////////////////
|
/////////////////////////////////////////////
|
||||||
|
|
@ -1480,22 +1330,16 @@ static float fVal = 0.0f;
|
||||||
//
|
//
|
||||||
/////////////////////////////////////////////
|
/////////////////////////////////////////////
|
||||||
|
|
||||||
#if 0
|
|
||||||
static S32 running = AIL_ms_count();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void SoundEngine::tick(std::shared_ptr<Mob>* players, float a) {
|
void SoundEngine::tick(std::shared_ptr<Mob>* players, float a) {
|
||||||
#ifdef __DISABLE_MILES__
|
#if defined(__DISABLE_MILES__)
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 0
|
|
||||||
EnterCriticalSection(&SoundEngine_MixerMutex);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// update the listener positions
|
// update the listener positions
|
||||||
int listenerCount = 0;
|
int listenerCount = 0;
|
||||||
#ifdef DISTORTION_TEST
|
#if defined(DISTORTION_TEST)
|
||||||
float fX, fY, fZ;
|
float fX, fY, fZ;
|
||||||
#endif
|
#endif
|
||||||
if (players) {
|
if (players) {
|
||||||
|
|
@ -1541,15 +1385,7 @@ void SoundEngine::tick(std::shared_ptr<Mob>* players, float a) {
|
||||||
}
|
}
|
||||||
m_validListenerCount = listenerCount;
|
m_validListenerCount = listenerCount;
|
||||||
|
|
||||||
#if 0
|
|
||||||
// AP - Show that a change has occurred so we know to update the values at
|
|
||||||
// the next Mixer callback
|
|
||||||
SoundEngine_Change = true;
|
|
||||||
|
|
||||||
LeaveCriticalSection(&SoundEngine_MixerMutex);
|
|
||||||
#else
|
|
||||||
updateMiles();
|
updateMiles();
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
SoundEngine::SoundEngine() {
|
SoundEngine::SoundEngine() {
|
||||||
random = new Random();
|
random = new Random();
|
||||||
|
|
@ -1577,13 +1413,10 @@ SoundEngine::SoundEngine() {
|
||||||
memset(CurrentSoundsPlaying, 0, sizeof(int) * (eSoundType_MAX + eSFX_MAX));
|
memset(CurrentSoundsPlaying, 0, sizeof(int) * (eSoundType_MAX + eSFX_MAX));
|
||||||
memset(m_ListenerA, 0, sizeof(AUDIO_LISTENER) * XUSER_MAX_COUNT);
|
memset(m_ListenerA, 0, sizeof(AUDIO_LISTENER) * XUSER_MAX_COUNT);
|
||||||
|
|
||||||
#if 0
|
|
||||||
m_hBGMAudio = GetAudioBGMHandle();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SoundEngine::destroy() {}
|
void SoundEngine::destroy() {}
|
||||||
#ifdef _DEBUG
|
#if defined(_DEBUG)
|
||||||
void SoundEngine::GetSoundName(char* szSoundName, int iSound) {
|
void SoundEngine::GetSoundName(char* szSoundName, int iSound) {
|
||||||
strcpy((char*)szSoundName, "Minecraft/");
|
strcpy((char*)szSoundName, "Minecraft/");
|
||||||
std::wstring name = wchSoundNames[iSound];
|
std::wstring name = wchSoundNames[iSound];
|
||||||
|
|
@ -1620,7 +1453,7 @@ void SoundEngine::play(int iSound, float x, float y, float z, float volume,
|
||||||
// build the name
|
// build the name
|
||||||
strcpy((char*)szSoundName, "Minecraft/");
|
strcpy((char*)szSoundName, "Minecraft/");
|
||||||
|
|
||||||
#ifdef DISTORTION_TEST
|
#if defined(DISTORTION_TEST)
|
||||||
std::wstring name = wchSoundNames[eSoundType_MOB_ENDERDRAGON_GROWL];
|
std::wstring name = wchSoundNames[eSoundType_MOB_ENDERDRAGON_GROWL];
|
||||||
#else
|
#else
|
||||||
std::wstring name = wchSoundNames[iSound];
|
std::wstring name = wchSoundNames[iSound];
|
||||||
|
|
@ -1641,7 +1474,7 @@ void SoundEngine::play(int iSound, float x, float y, float z, float volume,
|
||||||
AudioInfo.bIs3D = true;
|
AudioInfo.bIs3D = true;
|
||||||
AudioInfo.bUseSoundsPitchVal = false;
|
AudioInfo.bUseSoundsPitchVal = false;
|
||||||
AudioInfo.iSound = iSound + eSFX_MAX;
|
AudioInfo.iSound = iSound + eSFX_MAX;
|
||||||
#ifdef _DEBUG
|
#if defined(_DEBUG)
|
||||||
strncpy(AudioInfo.chName, (char*)szSoundName, 64);
|
strncpy(AudioInfo.chName, (char*)szSoundName, 64);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -1701,7 +1534,7 @@ void SoundEngine::playUI(int iSound, float volume, float pitch) {
|
||||||
} else {
|
} else {
|
||||||
AudioInfo.iSound = iSound;
|
AudioInfo.iSound = iSound;
|
||||||
}
|
}
|
||||||
#ifdef _DEBUG
|
#if defined(_DEBUG)
|
||||||
strncpy(AudioInfo.chName, (char*)szSoundName, 64);
|
strncpy(AudioInfo.chName, (char*)szSoundName, 64);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -1745,7 +1578,7 @@ void SoundEngine::playStreaming(const std::wstring& name, float x, float y,
|
||||||
m_iMusicDelay = random->nextInt(
|
m_iMusicDelay = random->nextInt(
|
||||||
20 * 60 * 3); // random->nextInt(20 * 60 * 10) + 20 * 60 * 10;
|
20 * 60 * 3); // random->nextInt(20 * 60 * 10) + 20 * 60 * 10;
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#if defined(_DEBUG)
|
||||||
m_iMusicDelay = 0;
|
m_iMusicDelay = 0;
|
||||||
#endif
|
#endif
|
||||||
Minecraft* pMinecraft = Minecraft::GetInstance();
|
Minecraft* pMinecraft = Minecraft::GetInstance();
|
||||||
|
|
@ -1779,7 +1612,7 @@ void SoundEngine::playStreaming(const std::wstring& name, float x, float y,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int SoundEngine::OpenStreamThreadProc(void* lpParameter) {
|
int SoundEngine::OpenStreamThreadProc(void* lpParameter) {
|
||||||
#ifdef __DISABLE_MILES__
|
#if defined(__DISABLE_MILES__)
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
SoundEngine* soundEngine = (SoundEngine*)lpParameter;
|
SoundEngine* soundEngine = (SoundEngine*)lpParameter;
|
||||||
|
|
@ -1794,9 +1627,7 @@ int SoundEngine::OpenStreamThreadProc(void* lpParameter) {
|
||||||
/////////////////////////////////////////////
|
/////////////////////////////////////////////
|
||||||
void SoundEngine::playMusicTick() {
|
void SoundEngine::playMusicTick() {
|
||||||
// AP - vita will update the music during the mixer callback
|
// AP - vita will update the music during the mixer callback
|
||||||
#if 1
|
|
||||||
playMusicUpdate();
|
playMusicUpdate();
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// AP - moved to a separate function so it can be called from the mixer callback
|
// AP - moved to a separate function so it can be called from the mixer callback
|
||||||
|
|
@ -1822,29 +1653,7 @@ void SoundEngine::playMusicUpdate() {
|
||||||
if (m_musicID != -1) {
|
if (m_musicID != -1) {
|
||||||
// start playing it
|
// start playing it
|
||||||
|
|
||||||
#if (0 || 0 || 0)
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
// 4J-PB - Need to check if we are a patched BD build
|
|
||||||
if (app.GetBootedFromDiscPatch()) {
|
|
||||||
sprintf(m_szStreamName, "%s/%s",
|
|
||||||
app.GetBDUsrDirPath(m_szMusicPath), m_szMusicPath);
|
|
||||||
app.DebugPrintf(
|
|
||||||
"SoundEngine::playMusicUpdate - (booted from disc "
|
|
||||||
"patch) music path - %s",
|
|
||||||
m_szStreamName);
|
|
||||||
} else {
|
|
||||||
sprintf(m_szStreamName, "%s/%s", getUsrDirPath(),
|
|
||||||
m_szMusicPath);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
sprintf(m_szStreamName, "%s/%s", getUsrDirPath(),
|
|
||||||
m_szMusicPath);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#else
|
|
||||||
strcpy((char*)m_szStreamName, m_szMusicPath);
|
strcpy((char*)m_szStreamName, m_szMusicPath);
|
||||||
#endif
|
|
||||||
// are we using a mash-up pack?
|
// are we using a mash-up pack?
|
||||||
// if(pMinecraft && !pMinecraft->skins->isUsingDefaultSkin() &&
|
// if(pMinecraft && !pMinecraft->skins->isUsingDefaultSkin() &&
|
||||||
// pMinecraft->skins->getSelected()->hasAudio())
|
// pMinecraft->skins->getSelected()->hasAudio())
|
||||||
|
|
@ -1871,15 +1680,6 @@ void SoundEngine::playMusicUpdate() {
|
||||||
m_MusicType = eMusicType_Game;
|
m_MusicType = eMusicType_Game;
|
||||||
m_StreamingAudioInfo.bIs3D = false;
|
m_StreamingAudioInfo.bIs3D = false;
|
||||||
|
|
||||||
#if 0
|
|
||||||
std::wstring& wstrSoundName =
|
|
||||||
dlcAudioFile->GetSoundName(m_musicID);
|
|
||||||
std::wstring wstrFile =
|
|
||||||
L"TPACK:\\Data\\" + wstrSoundName + L".binka";
|
|
||||||
std::wstring mountedPath =
|
|
||||||
StorageManager.GetMountedPath(wstrFile);
|
|
||||||
wcstombs(m_szStreamName, mountedPath.c_str(), 255);
|
|
||||||
#else
|
|
||||||
std::wstring& wstrSoundName =
|
std::wstring& wstrSoundName =
|
||||||
dlcAudioFile->GetSoundName(m_musicID);
|
dlcAudioFile->GetSoundName(m_musicID);
|
||||||
char szName[255];
|
char szName[255];
|
||||||
|
|
@ -1890,7 +1690,6 @@ void SoundEngine::playMusicUpdate() {
|
||||||
std::string mountedPath =
|
std::string mountedPath =
|
||||||
StorageManager.GetMountedPath(strFile);
|
StorageManager.GetMountedPath(strFile);
|
||||||
strcpy(m_szStreamName, mountedPath.c_str());
|
strcpy(m_szStreamName, mountedPath.c_str());
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
SetIsPlayingStreamingGameMusic(false);
|
SetIsPlayingStreamingGameMusic(false);
|
||||||
SetIsPlayingStreamingCDMusic(true);
|
SetIsPlayingStreamingCDMusic(true);
|
||||||
|
|
@ -1908,53 +1707,6 @@ void SoundEngine::playMusicUpdate() {
|
||||||
} else {
|
} else {
|
||||||
// 4J-PB - if this is a PS3 disc patch, we have to check if
|
// 4J-PB - if this is a PS3 disc patch, we have to check if
|
||||||
// the music file is in the patch data
|
// the music file is in the patch data
|
||||||
#if 0
|
|
||||||
if (app.GetBootedFromDiscPatch() &&
|
|
||||||
(m_musicID < m_iStream_CD_1)) {
|
|
||||||
// rebuild the path for the music
|
|
||||||
strcpy((char*)m_szStreamName, m_szMusicPath);
|
|
||||||
strcat((char*)m_szStreamName, "music/");
|
|
||||||
strcat((char*)m_szStreamName,
|
|
||||||
m_szStreamFileA[m_musicID]);
|
|
||||||
strcat((char*)m_szStreamName, ".binka");
|
|
||||||
|
|
||||||
// check if this is in the patch data
|
|
||||||
sprintf(m_szStreamName, "%s/%s",
|
|
||||||
app.GetBDUsrDirPath(m_szStreamName),
|
|
||||||
m_szMusicPath);
|
|
||||||
strcat((char*)m_szStreamName, "music/");
|
|
||||||
strcat((char*)m_szStreamName,
|
|
||||||
m_szStreamFileA[m_musicID]);
|
|
||||||
strcat((char*)m_szStreamName, ".binka");
|
|
||||||
|
|
||||||
SetIsPlayingStreamingGameMusic(true);
|
|
||||||
SetIsPlayingStreamingCDMusic(false);
|
|
||||||
m_MusicType = eMusicType_Game;
|
|
||||||
m_StreamingAudioInfo.bIs3D = false;
|
|
||||||
} else if (m_musicID < m_iStream_CD_1) {
|
|
||||||
SetIsPlayingStreamingGameMusic(true);
|
|
||||||
SetIsPlayingStreamingCDMusic(false);
|
|
||||||
m_MusicType = eMusicType_Game;
|
|
||||||
m_StreamingAudioInfo.bIs3D = false;
|
|
||||||
// build the name
|
|
||||||
strcat((char*)m_szStreamName, "music/");
|
|
||||||
strcat((char*)m_szStreamName,
|
|
||||||
m_szStreamFileA[m_musicID]);
|
|
||||||
strcat((char*)m_szStreamName, ".binka");
|
|
||||||
}
|
|
||||||
|
|
||||||
else {
|
|
||||||
SetIsPlayingStreamingGameMusic(false);
|
|
||||||
SetIsPlayingStreamingCDMusic(true);
|
|
||||||
m_MusicType = eMusicType_CD;
|
|
||||||
m_StreamingAudioInfo.bIs3D = true;
|
|
||||||
// build the name
|
|
||||||
strcat((char*)m_szStreamName, "cds/");
|
|
||||||
strcat((char*)m_szStreamName,
|
|
||||||
m_szStreamFileA[m_musicID]);
|
|
||||||
strcat((char*)m_szStreamName, ".binka");
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
if (m_musicID < m_iStream_CD_1) {
|
if (m_musicID < m_iStream_CD_1) {
|
||||||
SetIsPlayingStreamingGameMusic(true);
|
SetIsPlayingStreamingGameMusic(true);
|
||||||
SetIsPlayingStreamingCDMusic(false);
|
SetIsPlayingStreamingCDMusic(false);
|
||||||
|
|
@ -1973,7 +1725,6 @@ void SoundEngine::playMusicUpdate() {
|
||||||
strcat((char*)m_szStreamName, m_szStreamFileA[m_musicID]);
|
strcat((char*)m_szStreamName, m_szStreamFileA[m_musicID]);
|
||||||
strcat((char*)m_szStreamName, ".binka");
|
strcat((char*)m_szStreamName, ".binka");
|
||||||
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// std::wstring name =
|
// std::wstring name =
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@ enum eMUSICFILES {
|
||||||
eStream_Overworld_hal4,
|
eStream_Overworld_hal4,
|
||||||
eStream_Overworld_nuance1,
|
eStream_Overworld_nuance1,
|
||||||
eStream_Overworld_nuance2,
|
eStream_Overworld_nuance2,
|
||||||
#if 1
|
|
||||||
// Add the new music tracks
|
// Add the new music tracks
|
||||||
eStream_Overworld_Creative1,
|
eStream_Overworld_Creative1,
|
||||||
eStream_Overworld_Creative2,
|
eStream_Overworld_Creative2,
|
||||||
|
|
@ -31,7 +30,6 @@ enum eMUSICFILES {
|
||||||
eStream_Overworld_Menu2,
|
eStream_Overworld_Menu2,
|
||||||
eStream_Overworld_Menu3,
|
eStream_Overworld_Menu3,
|
||||||
eStream_Overworld_Menu4,
|
eStream_Overworld_Menu4,
|
||||||
#endif
|
|
||||||
eStream_Overworld_piano1,
|
eStream_Overworld_piano1,
|
||||||
eStream_Overworld_piano2,
|
eStream_Overworld_piano2,
|
||||||
eStream_Overworld_piano3, // <-- make piano3 the last overworld one
|
eStream_Overworld_piano3, // <-- make piano3 the last overworld one
|
||||||
|
|
@ -80,7 +78,7 @@ typedef struct {
|
||||||
int iSound;
|
int iSound;
|
||||||
bool bIs3D;
|
bool bIs3D;
|
||||||
bool bUseSoundsPitchVal;
|
bool bUseSoundsPitchVal;
|
||||||
#ifdef _DEBUG
|
#if defined(_DEBUG)
|
||||||
char chName[64];
|
char chName[64];
|
||||||
#endif
|
#endif
|
||||||
} AUDIO_INFO;
|
} AUDIO_INFO;
|
||||||
|
|
@ -94,7 +92,7 @@ class SoundEngine : public ConsoleSoundEngine {
|
||||||
public:
|
public:
|
||||||
SoundEngine();
|
SoundEngine();
|
||||||
virtual void destroy();
|
virtual void destroy();
|
||||||
#ifdef _DEBUG
|
#if defined(_DEBUG)
|
||||||
void GetSoundName(char* szSoundName, int iSound);
|
void GetSoundName(char* szSoundName, int iSound);
|
||||||
#endif
|
#endif
|
||||||
virtual void play(int iSound, float x, float y, float z, float volume,
|
virtual void play(int iSound, float x, float y, float z, float volume,
|
||||||
|
|
@ -129,12 +127,8 @@ public:
|
||||||
private:
|
private:
|
||||||
float getMasterMusicVolume();
|
float getMasterMusicVolume();
|
||||||
// platform specific functions
|
// platform specific functions
|
||||||
#if 0
|
|
||||||
int initAudioHardware(int iMinSpeakers);
|
|
||||||
#else
|
|
||||||
int initAudioHardware(int iMinSpeakers) { return iMinSpeakers; }
|
int initAudioHardware(int iMinSpeakers) { return iMinSpeakers; }
|
||||||
#endif
|
#if defined(__linux__)
|
||||||
#ifdef __linux__
|
|
||||||
void updateMiniAudio();
|
void updateMiniAudio();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -177,7 +171,4 @@ private:
|
||||||
int m_iStream_CD_1;
|
int m_iStream_CD_1;
|
||||||
bool* m_bHeardTrackA;
|
bool* m_bHeardTrackA;
|
||||||
|
|
||||||
#if 0
|
|
||||||
int32_t m_hBGMAudio;
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
@ -85,10 +85,6 @@ const WCHAR* ConsoleSoundEngine::wchSoundNames[eSoundType_MAX] = {
|
||||||
L"ambient/weather/rain", // eSoundType_AMBIENT_WEATHER_RAIN,
|
L"ambient/weather/rain", // eSoundType_AMBIENT_WEATHER_RAIN,
|
||||||
L"ambient/weather/thunder", // eSoundType_AMBIENT_WEATHER_THUNDER,
|
L"ambient/weather/thunder", // eSoundType_AMBIENT_WEATHER_THUNDER,
|
||||||
L"ambient/cave/cave", // eSoundType_CAVE_CAVE, DON'T USE FOR XBOX 360!!!
|
L"ambient/cave/cave", // eSoundType_CAVE_CAVE, DON'T USE FOR XBOX 360!!!
|
||||||
#if 0
|
|
||||||
L"ambient/cave/cave2", // eSoundType_CAVE_CAVE2 - removed the two sounds
|
|
||||||
//that were at 192k in the first ambient cave event
|
|
||||||
#endif
|
|
||||||
L"portal/portal", // eSoundType_PORTAL_PORTAL,
|
L"portal/portal", // eSoundType_PORTAL_PORTAL,
|
||||||
// 4J-PB - added a couple that were still using std::wstring
|
// 4J-PB - added a couple that were still using std::wstring
|
||||||
L"portal/trigger", // eSoundType_PORTAL_TRIGGER
|
L"portal/trigger", // eSoundType_PORTAL_TRIGGER
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,6 @@ enum eAward
|
||||||
eAward_arrowKillCreeper,
|
eAward_arrowKillCreeper,
|
||||||
eAward_socialPost,
|
eAward_socialPost,
|
||||||
|
|
||||||
#if 1
|
|
||||||
// 4J Stu - Does not map to any Xbox achievements
|
// 4J Stu - Does not map to any Xbox achievements
|
||||||
eAward_snipeSkeleton,
|
eAward_snipeSkeleton,
|
||||||
eAward_diamonds,
|
eAward_diamonds,
|
||||||
|
|
@ -43,9 +42,8 @@ enum eAward
|
||||||
eAward_enchantments,
|
eAward_enchantments,
|
||||||
eAward_overkill,
|
eAward_overkill,
|
||||||
eAward_bookcase,
|
eAward_bookcase,
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _EXTENDED_ACHIEVEMENTS
|
#if defined(_EXTENDED_ACHIEVEMENTS)
|
||||||
eAward_adventuringTime,
|
eAward_adventuringTime,
|
||||||
eAward_repopulation,
|
eAward_repopulation,
|
||||||
//eAward_porkChop,
|
//eAward_porkChop,
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,10 @@
|
||||||
// Name: DebugSpewV()
|
// Name: DebugSpewV()
|
||||||
// Desc: Internal helper function
|
// Desc: Internal helper function
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
#ifndef _CONTENT_PACKAGE
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
static void DebugSpewV(const char* strFormat, va_list pArgList)
|
static void DebugSpewV(const char* strFormat, va_list pArgList)
|
||||||
{
|
{
|
||||||
#if 0 || 0 || 0 || defined(__linux__)
|
#if defined(__linux__)
|
||||||
assert(0);
|
assert(0);
|
||||||
#else
|
#else
|
||||||
char str[2048];
|
char str[2048];
|
||||||
|
|
@ -23,16 +23,12 @@ static void DebugSpewV(const char* strFormat, va_list pArgList)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
// Name: DebugSpew()
|
// Name: DebugPrintf()
|
||||||
// Desc: Prints formatted debug spew
|
// Desc: Prints formatted debug spew
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
#ifdef _Printf_format_string_ // VC++ 2008 and later support this annotation
|
|
||||||
void CDECL DebugSpew(_In_z_ _Printf_format_string_ const char* strFormat, ...)
|
|
||||||
#else
|
|
||||||
void CDECL DebugPrintf(const char* strFormat, ...)
|
void CDECL DebugPrintf(const char* strFormat, ...)
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
#ifndef _CONTENT_PACKAGE
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
va_list pArgList;
|
va_list pArgList;
|
||||||
va_start( pArgList, strFormat );
|
va_start( pArgList, strFormat );
|
||||||
DebugSpewV( strFormat, pArgList );
|
DebugSpewV( strFormat, pArgList );
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -5,21 +5,17 @@
|
||||||
// using namespace std;
|
// using namespace std;
|
||||||
|
|
||||||
#include "Audio/Consoles_SoundEngine.h"
|
#include "Audio/Consoles_SoundEngine.h"
|
||||||
#ifndef __linux__
|
#if !defined(__linux__)
|
||||||
#include <xuiapp.h>
|
#include <xuiapp.h>
|
||||||
#endif
|
#endif
|
||||||
#include "Tutorial/TutorialEnum.h"
|
#include "Tutorial/TutorialEnum.h"
|
||||||
|
|
||||||
#if 0
|
|
||||||
#include "XUI/XUI_Helper.h"
|
|
||||||
#include "XUI/XUI_HelpCredits.h"
|
|
||||||
#endif
|
|
||||||
#include "UI/UIStructs.h"
|
#include "UI/UIStructs.h"
|
||||||
|
|
||||||
#include "../Minecraft.World/Network/Packets/DisconnectPacket.h"
|
#include "../Minecraft.World/Network/Packets/DisconnectPacket.h"
|
||||||
#ifndef __linux__
|
#if !defined(__linux__)
|
||||||
#include <xsocialpost.h>
|
#include <xsocialpost.h>
|
||||||
#endif // __linux__
|
#endif
|
||||||
|
|
||||||
#include "../Minecraft.Client/Utils/StringTable.h"
|
#include "../Minecraft.Client/Utils/StringTable.h"
|
||||||
#include "DLC/DLCManager.h"
|
#include "DLC/DLCManager.h"
|
||||||
|
|
@ -61,9 +57,6 @@ class Merchant;
|
||||||
class CMinecraftAudio;
|
class CMinecraftAudio;
|
||||||
|
|
||||||
class CMinecraftApp
|
class CMinecraftApp
|
||||||
#if 0
|
|
||||||
: public CXuiModule
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
static int s_iHTMLFontSizesA[eHTMLSize_COUNT];
|
static int s_iHTMLFontSizesA[eHTMLSize_COUNT];
|
||||||
|
|
@ -100,7 +93,7 @@ public:
|
||||||
// stored at the same positions when we read them
|
// stored at the same positions when we read them
|
||||||
static const int GAME_SETTINGS_PROFILE_DATA_BYTES = 204;
|
static const int GAME_SETTINGS_PROFILE_DATA_BYTES = 204;
|
||||||
|
|
||||||
#ifdef _EXTENDED_ACHIEVEMENTS
|
#if defined(_EXTENDED_ACHIEVEMENTS)
|
||||||
/* 4J-JEV:
|
/* 4J-JEV:
|
||||||
* We need more space in the profile data because of the new achievements
|
* We need more space in the profile data because of the new achievements
|
||||||
* and statistics necessary for the new expanded achievement set.
|
* and statistics necessary for the new expanded achievement set.
|
||||||
|
|
@ -129,8 +122,8 @@ public:
|
||||||
void HandleButtonPresses();
|
void HandleButtonPresses();
|
||||||
bool IntroRunning() { return m_bIntroRunning; }
|
bool IntroRunning() { return m_bIntroRunning; }
|
||||||
void SetIntroRunning(bool bSet) { m_bIntroRunning = bSet; }
|
void SetIntroRunning(bool bSet) { m_bIntroRunning = bSet; }
|
||||||
#ifdef _CONTENT_PACKAGE
|
#if defined(_CONTENT_PACKAGE)
|
||||||
#ifndef _FINAL_BUILD
|
#if !defined(_FINAL_BUILD)
|
||||||
bool PartnernetPasswordRunning() { return m_bPartnernetPasswordRunning; }
|
bool PartnernetPasswordRunning() { return m_bPartnernetPasswordRunning; }
|
||||||
void SetPartnernetPasswordRunning(bool bSet) {
|
void SetPartnernetPasswordRunning(bool bSet) {
|
||||||
m_bPartnernetPasswordRunning = bSet;
|
m_bPartnernetPasswordRunning = bSet;
|
||||||
|
|
@ -276,9 +269,6 @@ public:
|
||||||
|
|
||||||
// debug -0 show safe area
|
// debug -0 show safe area
|
||||||
void ShowSafeArea(bool show) {
|
void ShowSafeArea(bool show) {
|
||||||
#if 0
|
|
||||||
CXuiSceneBase::ShowSafeArea(show);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
// 4J-PB - to capture the social post screenshot
|
// 4J-PB - to capture the social post screenshot
|
||||||
virtual void CaptureScreenshot(int iPad) {};
|
virtual void CaptureScreenshot(int iPad) {};
|
||||||
|
|
@ -290,38 +280,11 @@ public:
|
||||||
const unsigned short usVersion,
|
const unsigned short usVersion,
|
||||||
const int iPad);
|
const int iPad);
|
||||||
|
|
||||||
#if (0 || 0 || 0 || \
|
|
||||||
0)
|
|
||||||
std::wstring toStringOptionsStatus(
|
|
||||||
const C4JStorage::eOptionsCallback& eStatus);
|
|
||||||
static int DefaultOptionsCallback(void* pParam,
|
|
||||||
C4JStorage::PROFILESETTINGS* pSettings,
|
|
||||||
const int iPad);
|
|
||||||
int SetDefaultOptions(C4JStorage::PROFILESETTINGS* pSettings,
|
|
||||||
const int iPad, bool bWriteProfile = true);
|
|
||||||
#if 0
|
|
||||||
static int OptionsDataCallback(void* pParam, int iPad,
|
|
||||||
unsigned short usVersion,
|
|
||||||
C4JStorage::eOptionsCallback eStatus,
|
|
||||||
int iBlocksRequired);
|
|
||||||
int GetOptionsBlocksRequired(int iPad);
|
|
||||||
#else
|
|
||||||
static int OptionsDataCallback(void* pParam, int iPad,
|
|
||||||
unsigned short usVersion,
|
|
||||||
C4JStorage::eOptionsCallback eStatus);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
C4JStorage::eOptionsCallback GetOptionsCallbackStatus(int iPad);
|
|
||||||
|
|
||||||
void SetOptionsCallbackStatus(int iPad,
|
|
||||||
C4JStorage::eOptionsCallback eStatus);
|
|
||||||
#else
|
|
||||||
static int DefaultOptionsCallback(void* pParam,
|
static int DefaultOptionsCallback(void* pParam,
|
||||||
C_4JProfile::PROFILESETTINGS* pSettings,
|
C_4JProfile::PROFILESETTINGS* pSettings,
|
||||||
const int iPad);
|
const int iPad);
|
||||||
int SetDefaultOptions(C_4JProfile::PROFILESETTINGS* pSettings,
|
int SetDefaultOptions(C_4JProfile::PROFILESETTINGS* pSettings,
|
||||||
const int iPad);
|
const int iPad);
|
||||||
#endif
|
|
||||||
virtual void SetRichPresenceContext(int iPad, int contextId) = 0;
|
virtual void SetRichPresenceContext(int iPad, int contextId) = 0;
|
||||||
|
|
||||||
void SetGameSettings(int iPad, eGameSetting eVal, unsigned char ucVal);
|
void SetGameSettings(int iPad, eGameSetting eVal, unsigned char ucVal);
|
||||||
|
|
@ -408,18 +371,8 @@ public:
|
||||||
static void UpsellReturnedCallback(void* pParam, eUpsellType type,
|
static void UpsellReturnedCallback(void* pParam, eUpsellType type,
|
||||||
eUpsellResponse result, int iUserData);
|
eUpsellResponse result, int iUserData);
|
||||||
|
|
||||||
#if 0 || 0 || 0
|
|
||||||
static int NowDisplayFullVersionPurchase(void* pParam, bool bContinue,
|
|
||||||
int iPad);
|
|
||||||
static int MustSignInFullVersionPurchaseReturned(
|
|
||||||
void* pParam, int iPad, C4JStorage::EMessageResult result);
|
|
||||||
#endif
|
|
||||||
#if 0 || 0 || 0
|
|
||||||
static int MustSignInFullVersionPurchaseReturnedExitTrial(
|
|
||||||
void* pParam, int iPad, C4JStorage::EMessageResult result);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _DEBUG_MENUS_ENABLED
|
#if defined(_DEBUG_MENUS_ENABLED)
|
||||||
bool DebugSettingsOn() { return m_bDebugOptions; }
|
bool DebugSettingsOn() { return m_bDebugOptions; }
|
||||||
bool DebugArtToolsOn();
|
bool DebugArtToolsOn();
|
||||||
#else
|
#else
|
||||||
|
|
@ -486,9 +439,7 @@ public:
|
||||||
bool IsFileInTPD(int iConfig);
|
bool IsFileInTPD(int iConfig);
|
||||||
void GetTPD(int iConfig, std::uint8_t** ppbData, unsigned int* pByteCount);
|
void GetTPD(int iConfig, std::uint8_t** ppbData, unsigned int* pByteCount);
|
||||||
int GetTPDSize() { return m_MEM_TPD.size(); }
|
int GetTPDSize() { return m_MEM_TPD.size(); }
|
||||||
#if 1
|
|
||||||
int GetTPConfigVal(WCHAR* pwchDataFile);
|
int GetTPConfigVal(WCHAR* pwchDataFile);
|
||||||
#endif
|
|
||||||
|
|
||||||
bool DefaultCapeExists();
|
bool DefaultCapeExists();
|
||||||
// void InstallDefaultCape(); // attempt to install the default cape once
|
// void InstallDefaultCape(); // attempt to install the default cape once
|
||||||
|
|
@ -505,11 +456,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
PlayerUID m_xuidNotch;
|
PlayerUID m_xuidNotch;
|
||||||
#if 0
|
|
||||||
std::unordered_map<PlayerUID, std::uint8_t*, PlayerUID::Hash> m_GTS_Files;
|
|
||||||
#else
|
|
||||||
std::unordered_map<PlayerUID, std::uint8_t*> m_GTS_Files;
|
std::unordered_map<PlayerUID, std::uint8_t*> m_GTS_Files;
|
||||||
#endif
|
|
||||||
|
|
||||||
// for storing memory textures - player skin
|
// for storing memory textures - player skin
|
||||||
std::unordered_map<std::wstring, PMEMDATA> m_MEM_Files;
|
std::unordered_map<std::wstring, PMEMDATA> m_MEM_Files;
|
||||||
|
|
@ -535,10 +482,6 @@ public:
|
||||||
void InvalidateBannedList(int iPad);
|
void InvalidateBannedList(int iPad);
|
||||||
void SetUniqueMapName(char* pszUniqueMapName);
|
void SetUniqueMapName(char* pszUniqueMapName);
|
||||||
char* GetUniqueMapName(void);
|
char* GetUniqueMapName(void);
|
||||||
#if 0
|
|
||||||
void AddLevelToBannedLevelList(int iPad, PBANNEDLISTDATA pBannedListData,
|
|
||||||
bool bWriteToTMS);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
bool GetResourcesLoaded() { return m_bResourcesLoaded; }
|
bool GetResourcesLoaded() { return m_bResourcesLoaded; }
|
||||||
|
|
@ -590,8 +533,8 @@ private:
|
||||||
|
|
||||||
// bool m_bSplitScreenEnabled;
|
// bool m_bSplitScreenEnabled;
|
||||||
|
|
||||||
#ifdef _CONTENT_PACKAGE
|
#if defined(_CONTENT_PACKAGE)
|
||||||
#ifndef _FINAL_BUILD
|
#if !defined(_FINAL_BUILD)
|
||||||
bool m_bPartnernetPasswordRunning;
|
bool m_bPartnernetPasswordRunning;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -733,30 +676,12 @@ public:
|
||||||
MOJANG_DATA* GetMojangDataForXuid(PlayerUID xuid);
|
MOJANG_DATA* GetMojangDataForXuid(PlayerUID xuid);
|
||||||
static HRESULT RegisterConfigValues(WCHAR* pType, int iValue);
|
static HRESULT RegisterConfigValues(WCHAR* pType, int iValue);
|
||||||
|
|
||||||
#if 0 || 0 || 0
|
|
||||||
HRESULT RegisterDLCData(char* pchDLCName, unsigned int uiSortIndex,
|
|
||||||
char* pchImageURL);
|
|
||||||
bool GetDLCFullOfferIDForSkinID(const std::wstring& FirstSkin,
|
|
||||||
ULONGLONG* pullVal);
|
|
||||||
DLC_INFO* GetDLCInfoForTrialOfferID(ULONGLONG ullOfferID_Trial);
|
|
||||||
DLC_INFO* GetDLCInfoForFullOfferID(ULONGLONG ullOfferID_Full);
|
|
||||||
#elif 0
|
|
||||||
static HRESULT RegisterDLCData(eDLCContentType, WCHAR*, WCHAR*, WCHAR*,
|
|
||||||
WCHAR*, int, unsigned int);
|
|
||||||
// bool GetDLCFullOfferIDForSkinID(const std::wstring &FirstSkin,WCHAR
|
|
||||||
// *pwchProductId);
|
|
||||||
bool GetDLCFullOfferIDForSkinID(const std::wstring& FirstSkin,
|
|
||||||
std::wstring& wsProductId);
|
|
||||||
DLC_INFO* GetDLCInfoForFullOfferID(WCHAR* pwchProductId);
|
|
||||||
DLC_INFO* GetDLCInfoForProductName(WCHAR* pwchProductName);
|
|
||||||
#else
|
|
||||||
static HRESULT RegisterDLCData(WCHAR*, WCHAR*, int, uint64_t, uint64_t,
|
static HRESULT RegisterDLCData(WCHAR*, WCHAR*, int, uint64_t, uint64_t,
|
||||||
WCHAR*, unsigned int, int, WCHAR* pDataFile);
|
WCHAR*, unsigned int, int, WCHAR* pDataFile);
|
||||||
bool GetDLCFullOfferIDForSkinID(const std::wstring& FirstSkin,
|
bool GetDLCFullOfferIDForSkinID(const std::wstring& FirstSkin,
|
||||||
ULONGLONG* pullVal);
|
ULONGLONG* pullVal);
|
||||||
DLC_INFO* GetDLCInfoForTrialOfferID(ULONGLONG ullOfferID_Trial);
|
DLC_INFO* GetDLCInfoForTrialOfferID(ULONGLONG ullOfferID_Trial);
|
||||||
DLC_INFO* GetDLCInfoForFullOfferID(ULONGLONG ullOfferID_Full);
|
DLC_INFO* GetDLCInfoForFullOfferID(ULONGLONG ullOfferID_Full);
|
||||||
#endif
|
|
||||||
|
|
||||||
unsigned int GetDLCCreditsCount();
|
unsigned int GetDLCCreditsCount();
|
||||||
SCreditTextItemDef* GetDLCCredits(int iIndex);
|
SCreditTextItemDef* GetDLCCredits(int iIndex);
|
||||||
|
|
@ -781,26 +706,6 @@ public:
|
||||||
private:
|
private:
|
||||||
std::vector<SCreditTextItemDef*> vDLCCredits;
|
std::vector<SCreditTextItemDef*> vDLCCredits;
|
||||||
|
|
||||||
#if 0 || 0 || 0
|
|
||||||
static std::unordered_map<PlayerUID, MOJANG_DATA*, PlayerUID::Hash>
|
|
||||||
MojangData;
|
|
||||||
static std::unordered_map<int, char*>
|
|
||||||
DLCTextures_PackID; // for mash-up packs & texture packs
|
|
||||||
static std::unordered_map<std::string, DLC_INFO*> DLCInfo;
|
|
||||||
static std::unordered_map<std::wstring, ULONGLONG>
|
|
||||||
DLCInfo_SkinName; // skin name, full offer id
|
|
||||||
#elif 0
|
|
||||||
static std::unordered_map<PlayerUID, MOJANG_DATA*, PlayerUID::Hash>
|
|
||||||
MojangData;
|
|
||||||
static std::unordered_map<int, std::wstring>
|
|
||||||
DLCTextures_PackID; // for mash-up packs & texture packs
|
|
||||||
// static std::unordered_map<std::wstring,DLC_INFO * > DLCInfo_Trial; //
|
|
||||||
// full offerid, dlc_info
|
|
||||||
static std::unordered_map<std::wstring, DLC_INFO*>
|
|
||||||
DLCInfo_Full; // full offerid, dlc_info
|
|
||||||
static std::unordered_map<std::wstring, std::wstring>
|
|
||||||
DLCInfo_SkinName; // skin name, full offer id
|
|
||||||
#else
|
|
||||||
static std::unordered_map<PlayerUID, MOJANG_DATA*> MojangData;
|
static std::unordered_map<PlayerUID, MOJANG_DATA*> MojangData;
|
||||||
static std::unordered_map<int, ULONGLONG>
|
static std::unordered_map<int, ULONGLONG>
|
||||||
DLCTextures_PackID; // for mash-up packs & texture packs
|
DLCTextures_PackID; // for mash-up packs & texture packs
|
||||||
|
|
@ -810,7 +715,6 @@ private:
|
||||||
DLCInfo_Full; // full offerid, dlc_info
|
DLCInfo_Full; // full offerid, dlc_info
|
||||||
static std::unordered_map<std::wstring, ULONGLONG>
|
static std::unordered_map<std::wstring, ULONGLONG>
|
||||||
DLCInfo_SkinName; // skin name, full offer id
|
DLCInfo_SkinName; // skin name, full offer id
|
||||||
#endif
|
|
||||||
// bool m_bRead_TMS_XUIDS_XML; // track whether we have already read the
|
// bool m_bRead_TMS_XUIDS_XML; // track whether we have already read the
|
||||||
// TMS xuids.xml file bool m_bRead_TMS_DLCINFO_XML; // track whether
|
// TMS xuids.xml file bool m_bRead_TMS_DLCINFO_XML; // track whether
|
||||||
// we have already read the TMS DLC.xml file
|
// we have already read the TMS DLC.xml file
|
||||||
|
|
@ -869,7 +773,7 @@ private:
|
||||||
unsigned int m_uiGameHostSettings;
|
unsigned int m_uiGameHostSettings;
|
||||||
static unsigned char m_szPNG[8];
|
static unsigned char m_szPNG[8];
|
||||||
|
|
||||||
#ifdef _LARGE_WORLDS
|
#if defined(_LARGE_WORLDS)
|
||||||
unsigned int m_GameNewWorldSize;
|
unsigned int m_GameNewWorldSize;
|
||||||
bool m_bGameNewWorldSizeUseMoat;
|
bool m_bGameNewWorldSizeUseMoat;
|
||||||
unsigned int m_GameNewHellScale;
|
unsigned int m_GameNewHellScale;
|
||||||
|
|
@ -884,7 +788,7 @@ public:
|
||||||
unsigned int GetGameHostOption(unsigned int uiHostSettings,
|
unsigned int GetGameHostOption(unsigned int uiHostSettings,
|
||||||
eGameHostOption eVal);
|
eGameHostOption eVal);
|
||||||
|
|
||||||
#ifdef _LARGE_WORLDS
|
#if defined(_LARGE_WORLDS)
|
||||||
void SetGameNewWorldSize(unsigned int newSize, bool useMoat) {
|
void SetGameNewWorldSize(unsigned int newSize, bool useMoat) {
|
||||||
m_GameNewWorldSize = newSize;
|
m_GameNewWorldSize = newSize;
|
||||||
m_bGameNewWorldSizeUseMoat = useMoat;
|
m_bGameNewWorldSizeUseMoat = useMoat;
|
||||||
|
|
@ -962,39 +866,17 @@ public:
|
||||||
unsigned int AddTMSPPFileTypeRequest(eDLCContentType eType,
|
unsigned int AddTMSPPFileTypeRequest(eDLCContentType eType,
|
||||||
bool bPromote = false);
|
bool bPromote = false);
|
||||||
int GetDLCInfoTexturesOffersCount();
|
int GetDLCInfoTexturesOffersCount();
|
||||||
#if 0 || 0 || 0
|
|
||||||
DLC_INFO* GetDLCInfo(int iIndex);
|
|
||||||
DLC_INFO* GetDLCInfo(char*);
|
|
||||||
DLC_INFO* GetDLCInfoFromTPackID(int iTPID);
|
|
||||||
bool GetDLCNameForPackID(const int iPackID, char** ppchKeyID);
|
|
||||||
char* GetDLCInfoTextures(int iIndex);
|
|
||||||
int GetDLCInfoCount();
|
|
||||||
#else
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
static int TMSPPFileReturned(void* pParam, int iPad, int iUserData, void*,
|
|
||||||
WCHAR* wchFilename);
|
|
||||||
std::unordered_map<std::wstring, DLC_INFO*>* GetDLCInfo();
|
|
||||||
#else
|
|
||||||
static int TMSPPFileReturned(void* pParam, int iPad, int iUserData,
|
static int TMSPPFileReturned(void* pParam, int iPad, int iUserData,
|
||||||
C4JStorage::PTMSPP_FILEDATA pFileData,
|
C4JStorage::PTMSPP_FILEDATA pFileData,
|
||||||
LPCSTR szFilename);
|
LPCSTR szFilename);
|
||||||
#endif
|
|
||||||
DLC_INFO* GetDLCInfoTrialOffer(int iIndex);
|
DLC_INFO* GetDLCInfoTrialOffer(int iIndex);
|
||||||
DLC_INFO* GetDLCInfoFullOffer(int iIndex);
|
DLC_INFO* GetDLCInfoFullOffer(int iIndex);
|
||||||
|
|
||||||
int GetDLCInfoTrialOffersCount();
|
int GetDLCInfoTrialOffersCount();
|
||||||
int GetDLCInfoFullOffersCount();
|
int GetDLCInfoFullOffersCount();
|
||||||
#if 0
|
|
||||||
bool GetDLCFullOfferIDForPackID(const int iPackID,
|
|
||||||
std::wstring& wsProductId);
|
|
||||||
std::wstring GetDLCInfoTexturesFullOffer(int iIndex);
|
|
||||||
|
|
||||||
#else
|
|
||||||
bool GetDLCFullOfferIDForPackID(const int iPackID, ULONGLONG* pullVal);
|
bool GetDLCFullOfferIDForPackID(const int iPackID, ULONGLONG* pullVal);
|
||||||
ULONGLONG GetDLCInfoTexturesFullOffer(int iIndex);
|
ULONGLONG GetDLCInfoTexturesFullOffer(int iIndex);
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void SetCorruptSaveDeleted(bool bVal) { m_bCorruptSaveDeleted = bVal; }
|
void SetCorruptSaveDeleted(bool bVal) { m_bCorruptSaveDeleted = bVal; }
|
||||||
bool GetCorruptSaveDeleted(void) { return m_bCorruptSaveDeleted; }
|
bool GetCorruptSaveDeleted(void) { return m_bCorruptSaveDeleted; }
|
||||||
|
|
@ -1099,18 +981,7 @@ private:
|
||||||
|
|
||||||
bool m_bResetNether;
|
bool m_bResetNether;
|
||||||
std::uint32_t m_dwRequiredTexturePackID;
|
std::uint32_t m_dwRequiredTexturePackID;
|
||||||
#if 0
|
|
||||||
std::vector<std::uint8_t*> m_vTMSPPData;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if (0 || 0 || 0 || \
|
|
||||||
0)
|
|
||||||
C4JStorage::eOptionsCallback m_eOptionsStatusA[XUSER_MAX_COUNT];
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
int m_eOptionsBlocksRequiredA[XUSER_MAX_COUNT];
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// 4J-PB - language and locale functions
|
// 4J-PB - language and locale functions
|
||||||
public:
|
public:
|
||||||
|
|
@ -1133,28 +1004,12 @@ private:
|
||||||
bool bAddDataFolder, std::wstring mountPoint);
|
bool bAddDataFolder, std::wstring mountPoint);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
#if 0
|
#if defined(_WINDOWS64)
|
||||||
// bool m_bTransferSavesToXboxOne;
|
|
||||||
// unsigned int m_uiTransferSlotC;
|
|
||||||
|
|
||||||
#elif 0
|
|
||||||
|
|
||||||
#elif 0
|
|
||||||
|
|
||||||
#elif defined _WINDOWS64
|
|
||||||
// CMinecraftAudio audio;
|
// CMinecraftAudio audio;
|
||||||
#else // PS4
|
#else
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 0
|
|
||||||
public:
|
|
||||||
void SetReachedMainMenu();
|
|
||||||
bool HasReachedMainMenu();
|
|
||||||
|
|
||||||
private:
|
|
||||||
bool m_hasReachedMainMenu;
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// singleton
|
// singleton
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include "DLCManager.h"
|
#include "DLCManager.h"
|
||||||
#include "DLCAudioFile.h"
|
#include "DLCAudioFile.h"
|
||||||
#if 0 || defined _WINDOWS64
|
#if defined(_WINDOWS64)
|
||||||
#include "../../Minecraft.Client/Platform/Common/XML/ATGXmlParser.h"
|
#include "../../Minecraft.Client/Platform/Common/XML/ATGXmlParser.h"
|
||||||
#include "../../Minecraft.Client/Platform/Common/XML/xmlFilesCallback.h"
|
#include "../../Minecraft.Client/Platform/Common/XML/xmlFilesCallback.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -26,50 +26,6 @@ void DLCGameRulesHeader::addData(std::uint8_t* pbData,
|
||||||
m_pbData = pbData;
|
m_pbData = pbData;
|
||||||
m_dataBytes = dataBytes;
|
m_dataBytes = dataBytes;
|
||||||
|
|
||||||
#if 0
|
|
||||||
byteArray data(m_pbData, m_dataBytes);
|
|
||||||
ByteArrayInputStream bais(data);
|
|
||||||
DataInputStream dis(&bais);
|
|
||||||
|
|
||||||
// Init values.
|
|
||||||
int version_number;
|
|
||||||
byte compression_type;
|
|
||||||
std::wstring texturepackid;
|
|
||||||
|
|
||||||
// Read Datastream.
|
|
||||||
version_number = dis.readInt();
|
|
||||||
compression_type = dis.readByte();
|
|
||||||
m_defaultSaveName = dis.readUTF();
|
|
||||||
m_displayName = dis.readUTF();
|
|
||||||
texturepackid = dis.readUTF();
|
|
||||||
m_grfPath = dis.readUTF();
|
|
||||||
|
|
||||||
// Debug printout.
|
|
||||||
app.DebugPrintf (
|
|
||||||
"DLCGameRulesHeader::readHeader:\n"
|
|
||||||
"\tversion_number = '%d',\n"
|
|
||||||
"\tcompression_type = '%d',\n"
|
|
||||||
"\tdefault_savename = '%s',\n"
|
|
||||||
"\tdisplayname = '%s',\n"
|
|
||||||
"\ttexturepackid = '%s',\n"
|
|
||||||
"\tgrf_path = '%s',\n",
|
|
||||||
|
|
||||||
version_number, compression_type,
|
|
||||||
|
|
||||||
wstringtofilename(m_defaultSaveName),
|
|
||||||
wstringtofilename(m_displayName),
|
|
||||||
wstringtofilename(texturepackid),
|
|
||||||
wstringtofilename(m_grfPath)
|
|
||||||
);
|
|
||||||
|
|
||||||
// Texture Pack.
|
|
||||||
m_requiredTexturePackId = _fromString<long>(texturepackid);
|
|
||||||
m_bRequiresTexturePack = m_requiredTexturePackId > 0;
|
|
||||||
|
|
||||||
dis.close();
|
|
||||||
bais.close();
|
|
||||||
bais.reset();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::uint8_t* DLCGameRulesHeader::getData(std::uint32_t& dataBytes) {
|
std::uint8_t* DLCGameRulesHeader::getData(std::uint32_t& dataBytes) {
|
||||||
|
|
|
||||||
|
|
@ -75,17 +75,11 @@ void ReadDlcStruct(T* out, const std::uint8_t* data, unsigned int offset = 0) {
|
||||||
std::wstring getMountedDlcReadPath(const std::string& path) {
|
std::wstring getMountedDlcReadPath(const std::string& path) {
|
||||||
std::wstring readPath = convStringToWstring(path);
|
std::wstring readPath = convStringToWstring(path);
|
||||||
|
|
||||||
#ifdef _WINDOWS64
|
#if defined(_WINDOWS64)
|
||||||
const std::string mountedPath = StorageManager.GetMountedPath(path.c_str());
|
const std::string mountedPath = StorageManager.GetMountedPath(path.c_str());
|
||||||
if (!mountedPath.empty()) {
|
if (!mountedPath.empty()) {
|
||||||
readPath = convStringToWstring(mountedPath);
|
readPath = convStringToWstring(mountedPath);
|
||||||
}
|
}
|
||||||
#elif 0
|
|
||||||
const std::wstring mountedPath =
|
|
||||||
StorageManager.GetMountedPath(readPath.c_str());
|
|
||||||
if (!mountedPath.empty()) {
|
|
||||||
readPath = mountedPath;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return readPath;
|
return readPath;
|
||||||
|
|
@ -235,23 +229,6 @@ DLCPack* DLCManager::getPack(const std::wstring& name) {
|
||||||
return pack;
|
return pack;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
DLCPack* DLCManager::getPackFromProductID(const std::wstring& productID) {
|
|
||||||
DLCPack* pack = NULL;
|
|
||||||
// DWORD currentIndex = 0;
|
|
||||||
DLCPack* currentPack = NULL;
|
|
||||||
for (AUTO_VAR(it, m_packs.begin()); it != m_packs.end(); ++it) {
|
|
||||||
currentPack = *it;
|
|
||||||
std::wstring wsName = currentPack->getPurchaseOfferId();
|
|
||||||
|
|
||||||
if (wsName.compare(productID) == 0) {
|
|
||||||
pack = currentPack;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return pack;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
DLCPack* DLCManager::getPack(unsigned int index,
|
DLCPack* DLCManager::getPack(unsigned int index,
|
||||||
EDLCType type /*= e_DLCType_All*/) {
|
EDLCType type /*= e_DLCType_All*/) {
|
||||||
|
|
|
||||||
|
|
@ -77,9 +77,6 @@ public:
|
||||||
void LanguageChanged(void);
|
void LanguageChanged(void);
|
||||||
|
|
||||||
DLCPack* getPack(const std::wstring& name);
|
DLCPack* getPack(const std::wstring& name);
|
||||||
#if 0
|
|
||||||
DLCPack* DLCManager::getPackFromProductID(const std::wstring& productID);
|
|
||||||
#endif
|
|
||||||
DLCPack* getPack(unsigned int index, EDLCType type = e_DLCType_All);
|
DLCPack* getPack(unsigned int index, EDLCType type = e_DLCType_All);
|
||||||
unsigned int getPackIndex(DLCPack* pack, bool& found,
|
unsigned int getPackIndex(DLCPack* pack, bool& found,
|
||||||
EDLCType type = e_DLCType_All);
|
EDLCType type = e_DLCType_All);
|
||||||
|
|
|
||||||
|
|
@ -15,32 +15,7 @@ DLCPack::DLCPack(const std::wstring& name, std::uint32_t dwLicenseMask) {
|
||||||
m_dataPath = L"";
|
m_dataPath = L"";
|
||||||
m_packName = name;
|
m_packName = name;
|
||||||
m_dwLicenseMask = dwLicenseMask;
|
m_dwLicenseMask = dwLicenseMask;
|
||||||
#if 0
|
|
||||||
m_wsProductId = L"";
|
|
||||||
#else
|
|
||||||
m_ullFullOfferId = 0LL;
|
m_ullFullOfferId = 0LL;
|
||||||
#endif
|
|
||||||
m_isCorrupt = false;
|
|
||||||
m_packId = 0;
|
|
||||||
m_packVersion = 0;
|
|
||||||
m_parentPack = NULL;
|
|
||||||
m_dlcMountIndex = -1;
|
|
||||||
#if 0
|
|
||||||
m_dlcDeviceID = XCONTENTDEVICE_ANY;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// This pointer is for all the data used for this pack, so deleting it
|
|
||||||
// invalidates ALL of it's children.
|
|
||||||
m_data = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
DLCPack::DLCPack(const std::wstring& name, const std::wstring& productID,
|
|
||||||
std::uint32_t dwLicenseMask) {
|
|
||||||
m_dataPath = L"";
|
|
||||||
m_packName = name;
|
|
||||||
m_dwLicenseMask = dwLicenseMask;
|
|
||||||
m_wsProductId = productID;
|
|
||||||
m_isCorrupt = false;
|
m_isCorrupt = false;
|
||||||
m_packId = 0;
|
m_packId = 0;
|
||||||
m_packVersion = 0;
|
m_packVersion = 0;
|
||||||
|
|
@ -51,7 +26,7 @@ DLCPack::DLCPack(const std::wstring& name, const std::wstring& productID,
|
||||||
// invalidates ALL of it's children.
|
// invalidates ALL of it's children.
|
||||||
m_data = NULL;
|
m_data = NULL;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
DLCPack::~DLCPack() {
|
DLCPack::~DLCPack() {
|
||||||
for (AUTO_VAR(it, m_childPacks.begin()); it != m_childPacks.end(); ++it) {
|
for (AUTO_VAR(it, m_childPacks.begin()); it != m_childPacks.end(); ++it) {
|
||||||
|
|
@ -67,7 +42,7 @@ DLCPack::~DLCPack() {
|
||||||
// This pointer is for all the data used for this pack, so deleting it
|
// This pointer is for all the data used for this pack, so deleting it
|
||||||
// invalidates ALL of it's children.
|
// invalidates ALL of it's children.
|
||||||
if (m_data) {
|
if (m_data) {
|
||||||
#ifndef _CONTENT_PACKAGE
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
wprintf(L"Deleting data for DLC pack %ls\n", m_packName.c_str());
|
wprintf(L"Deleting data for DLC pack %ls\n", m_packName.c_str());
|
||||||
#endif
|
#endif
|
||||||
// For the same reason, don't delete data pointer for any child pack as
|
// For the same reason, don't delete data pointer for any child pack as
|
||||||
|
|
@ -95,7 +70,7 @@ XCONTENTDEVICEID DLCPack::GetDLCDeviceID() {
|
||||||
|
|
||||||
void DLCPack::addChildPack(DLCPack* childPack) {
|
void DLCPack::addChildPack(DLCPack* childPack) {
|
||||||
const std::uint32_t packId = childPack->GetPackId();
|
const std::uint32_t packId = childPack->GetPackId();
|
||||||
#ifndef _CONTENT_PACKAGE
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
if (packId < 0 || packId > 15) {
|
if (packId < 0 || packId > 15) {
|
||||||
__debugbreak();
|
__debugbreak();
|
||||||
}
|
}
|
||||||
|
|
@ -176,15 +151,11 @@ DLCFile* DLCPack::addFile(DLCManager::EDLCType type, const std::wstring& path) {
|
||||||
newFile = new DLCSkinFile(strippedPath);
|
newFile = new DLCSkinFile(strippedPath);
|
||||||
|
|
||||||
// check to see if we can get the full offer id using this skin name
|
// check to see if we can get the full offer id using this skin name
|
||||||
#if 0
|
|
||||||
app.GetDLCFullOfferIDForSkinID(strippedPath, m_wsProductId);
|
|
||||||
#else
|
|
||||||
ULONGLONG ullVal = 0LL;
|
ULONGLONG ullVal = 0LL;
|
||||||
|
|
||||||
if (app.GetDLCFullOfferIDForSkinID(strippedPath, &ullVal)) {
|
if (app.GetDLCFullOfferIDForSkinID(strippedPath, &ullVal)) {
|
||||||
m_ullFullOfferId = ullVal;
|
m_ullFullOfferId = ullVal;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
} break;
|
} break;
|
||||||
case DLCManager::e_DLCType_Cape: {
|
case DLCManager::e_DLCType_Cape: {
|
||||||
std::vector<std::wstring> splitPath = stringSplit(path, L'/');
|
std::vector<std::wstring> splitPath = stringSplit(path, L'/');
|
||||||
|
|
@ -318,7 +289,7 @@ unsigned int DLCPack::getFileIndexAt(DLCManager::EDLCType type,
|
||||||
const std::wstring& path, bool& found) {
|
const std::wstring& path, bool& found) {
|
||||||
if (type == DLCManager::e_DLCType_All) {
|
if (type == DLCManager::e_DLCType_All) {
|
||||||
app.DebugPrintf("Unimplemented\n");
|
app.DebugPrintf("Unimplemented\n");
|
||||||
#ifndef __CONTENT_PACKAGE
|
#if !defined(__CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
__debugbreak();
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -343,12 +314,12 @@ bool DLCPack::hasPurchasedFile(DLCManager::EDLCType type,
|
||||||
const std::wstring& path) {
|
const std::wstring& path) {
|
||||||
if (type == DLCManager::e_DLCType_All) {
|
if (type == DLCManager::e_DLCType_All) {
|
||||||
app.DebugPrintf("Unimplemented\n");
|
app.DebugPrintf("Unimplemented\n");
|
||||||
#ifndef _CONTENT_PACKAGE
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
__debugbreak();
|
||||||
#endif
|
#endif
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#ifndef _CONTENT_PACKAGE
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
if (app.GetGameSettingsDebugMask(ProfileManager.GetPrimaryPad()) &
|
if (app.GetGameSettingsDebugMask(ProfileManager.GetPrimaryPad()) &
|
||||||
(1L << eDebugSetting_UnlockAllDLC)) {
|
(1L << eDebugSetting_UnlockAllDLC)) {
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -19,11 +19,7 @@ private:
|
||||||
std::uint32_t m_dwLicenseMask;
|
std::uint32_t m_dwLicenseMask;
|
||||||
int m_dlcMountIndex;
|
int m_dlcMountIndex;
|
||||||
XCONTENTDEVICEID m_dlcDeviceID;
|
XCONTENTDEVICEID m_dlcDeviceID;
|
||||||
#if 0
|
|
||||||
std::wstring m_wsProductId;
|
|
||||||
#else
|
|
||||||
ULONGLONG m_ullFullOfferId;
|
ULONGLONG m_ullFullOfferId;
|
||||||
#endif
|
|
||||||
bool m_isCorrupt;
|
bool m_isCorrupt;
|
||||||
std::uint32_t m_packId;
|
std::uint32_t m_packId;
|
||||||
std::uint32_t m_packVersion;
|
std::uint32_t m_packVersion;
|
||||||
|
|
@ -33,10 +29,6 @@ private:
|
||||||
// deleting it invalidates ALL of it's children.
|
// deleting it invalidates ALL of it's children.
|
||||||
public:
|
public:
|
||||||
DLCPack(const std::wstring& name, std::uint32_t dwLicenseMask);
|
DLCPack(const std::wstring& name, std::uint32_t dwLicenseMask);
|
||||||
#if 0
|
|
||||||
DLCPack(const std::wstring& name, const std::wstring& productID,
|
|
||||||
std::uint32_t dwLicenseMask);
|
|
||||||
#endif
|
|
||||||
~DLCPack();
|
~DLCPack();
|
||||||
|
|
||||||
std::wstring getFullDataPath() { return m_dataPath; }
|
std::wstring getFullDataPath() { return m_dataPath; }
|
||||||
|
|
@ -76,11 +68,7 @@ public:
|
||||||
std::wstring getName() { return m_packName; }
|
std::wstring getName() { return m_packName; }
|
||||||
|
|
||||||
void UpdateLanguage();
|
void UpdateLanguage();
|
||||||
#if 0
|
|
||||||
std::wstring getPurchaseOfferId() { return m_wsProductId; }
|
|
||||||
#else
|
|
||||||
ULONGLONG getPurchaseOfferId() { return m_ullFullOfferId; }
|
ULONGLONG getPurchaseOfferId() { return m_ullFullOfferId; }
|
||||||
#endif
|
|
||||||
|
|
||||||
DLCFile* addFile(DLCManager::EDLCType type, const std::wstring& path);
|
DLCFile* addFile(DLCManager::EDLCType type, const std::wstring& path);
|
||||||
DLCFile* getFile(DLCManager::EDLCType type, unsigned int index);
|
DLCFile* getFile(DLCManager::EDLCType type, unsigned int index);
|
||||||
|
|
|
||||||
|
|
@ -107,14 +107,8 @@ void DLCSkinFile::addParameter(DLCManager::EDLCParameterType type,
|
||||||
SKIN_BOX* pSkinBox = new SKIN_BOX;
|
SKIN_BOX* pSkinBox = new SKIN_BOX;
|
||||||
ZeroMemory(pSkinBox, sizeof(SKIN_BOX));
|
ZeroMemory(pSkinBox, sizeof(SKIN_BOX));
|
||||||
|
|
||||||
#if 0
|
|
||||||
// 4J Stu - The Xbox version used swscanf_s which isn't available in
|
|
||||||
// GCC.
|
|
||||||
swscanf(value.c_str(), L"%10ls%f%f%f%f%f%f%f%f", wchBodyPart,
|
|
||||||
#else
|
|
||||||
swscanf_s(
|
swscanf_s(
|
||||||
value.c_str(), L"%9ls%f%f%f%f%f%f%f%f", wchBodyPart, 10,
|
value.c_str(), L"%9ls%f%f%f%f%f%f%f%f", wchBodyPart, 10,
|
||||||
#endif
|
|
||||||
&pSkinBox->fX, &pSkinBox->fY, &pSkinBox->fZ, &pSkinBox->fW,
|
&pSkinBox->fX, &pSkinBox->fY, &pSkinBox->fZ, &pSkinBox->fW,
|
||||||
&pSkinBox->fH, &pSkinBox->fD, &pSkinBox->fU, &pSkinBox->fV);
|
&pSkinBox->fH, &pSkinBox->fD, &pSkinBox->fU, &pSkinBox->fV);
|
||||||
|
|
||||||
|
|
@ -136,14 +130,8 @@ void DLCSkinFile::addParameter(DLCManager::EDLCParameterType type,
|
||||||
m_AdditionalBoxes.push_back(pSkinBox);
|
m_AdditionalBoxes.push_back(pSkinBox);
|
||||||
} break;
|
} break;
|
||||||
case DLCManager::e_DLCParamType_Anim: {
|
case DLCManager::e_DLCParamType_Anim: {
|
||||||
#if 0
|
|
||||||
// 4J Stu - The Xbox version used swscanf_s which isn't available in
|
|
||||||
// GCC.
|
|
||||||
swscanf(value.c_str(), L"%X", &m_uiAnimOverrideBitmask);
|
|
||||||
#else
|
|
||||||
swscanf_s(value.c_str(), L"%X", &m_uiAnimOverrideBitmask,
|
swscanf_s(value.c_str(), L"%X", &m_uiAnimOverrideBitmask,
|
||||||
sizeof(unsigned int));
|
sizeof(unsigned int));
|
||||||
#endif
|
|
||||||
DWORD skinId = app.getSkinIdFromPath(m_path);
|
DWORD skinId = app.getSkinIdFromPath(m_path);
|
||||||
app.SetAnimOverrideBitmask(skinId, m_uiAnimOverrideBitmask);
|
app.SetAnimOverrideBitmask(skinId, m_uiAnimOverrideBitmask);
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -434,7 +434,7 @@ bool GameRuleManager::readRuleFile(
|
||||||
|
|
||||||
default:
|
default:
|
||||||
app.DebugPrintf("De-compressing game rules.");
|
app.DebugPrintf("De-compressing game rules.");
|
||||||
#ifndef _CONTENT_PACKAGE
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
assert(compressionType == APPROPRIATE_COMPRESSION_TYPE);
|
assert(compressionType == APPROPRIATE_COMPRESSION_TYPE);
|
||||||
#endif
|
#endif
|
||||||
// 4J-JEV: DecompressLZXRLE uses the correct platform specific
|
// 4J-JEV: DecompressLZXRLE uses the correct platform specific
|
||||||
|
|
@ -627,46 +627,12 @@ void GameRuleManager::processSchematicsLighting(LevelChunk* levelChunk) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameRuleManager::loadDefaultGameRules() {
|
void GameRuleManager::loadDefaultGameRules() {
|
||||||
#if 0
|
|
||||||
#ifdef _TU_BUILD
|
|
||||||
std::wstring fileRoot = L"UPDATE:\\res\\GameRules\\Tutorial.pck";
|
|
||||||
#else
|
|
||||||
std::wstring fileRoot = L"GAME:\\res\\TitleUpdate\\GameRules\\Tutorial.pck";
|
|
||||||
#endif
|
|
||||||
File packedTutorialFile(fileRoot);
|
|
||||||
if (loadGameRulesPack(&packedTutorialFile)) {
|
|
||||||
m_levelGenerators.getLevelGenerators()->at(0)->setWorldName(
|
|
||||||
app.GetString(IDS_PLAY_TUTORIAL));
|
|
||||||
// m_levelGenerators.getLevelGenerators()->at(0)->setDefaultSaveName(L"Tutorial");
|
|
||||||
m_levelGenerators.getLevelGenerators()->at(0)->setDefaultSaveName(
|
|
||||||
app.GetString(IDS_TUTORIALSAVENAME));
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifndef _CONTENT_PACKAGE
|
#if !defined(__linux__)
|
||||||
// 4J Stu - Remove these just now
|
#if defined(_WINDOWS64)
|
||||||
// File testRulesPath(L"GAME:\\GameRules");
|
|
||||||
// std::vector<File *> *packFiles = testRulesPath.listFiles();
|
|
||||||
|
|
||||||
// for(AUTO_VAR(it,packFiles->begin()); it != packFiles->end(); ++it)
|
|
||||||
//{
|
|
||||||
// loadGameRulesPack(*it);
|
|
||||||
// }
|
|
||||||
// delete packFiles;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#else // 0
|
|
||||||
|
|
||||||
#ifndef __linux__
|
|
||||||
#ifdef _WINDOWS64
|
|
||||||
File packedTutorialFile(L"Windows64Media\\Tutorial\\Tutorial.pck");
|
File packedTutorialFile(L"Windows64Media\\Tutorial\\Tutorial.pck");
|
||||||
if (!packedTutorialFile.exists())
|
if (!packedTutorialFile.exists())
|
||||||
packedTutorialFile = File(L"Windows64\\Tutorial\\Tutorial.pck");
|
packedTutorialFile = File(L"Windows64\\Tutorial\\Tutorial.pck");
|
||||||
#elif 0
|
|
||||||
File packedTutorialFile(L"/app0/orbis/Tutorial/Tutorial.pck");
|
|
||||||
#elif 0
|
|
||||||
File packedTutorialFile(L"PSVita/Tutorial/Tutorial.pck");
|
|
||||||
#elif 0
|
|
||||||
File packedTutorialFile(L"PS3/Tutorial/Tutorial.pck");
|
|
||||||
#else
|
#else
|
||||||
File packedTutorialFile(L"Tutorial\\Tutorial.pck");
|
File packedTutorialFile(L"Tutorial\\Tutorial.pck");
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -677,7 +643,7 @@ void GameRuleManager::loadDefaultGameRules() {
|
||||||
m_levelGenerators.getLevelGenerators()->at(0)->setDefaultSaveName(
|
m_levelGenerators.getLevelGenerators()->at(0)->setDefaultSaveName(
|
||||||
app.GetString(IDS_TUTORIALSAVENAME));
|
app.GetString(IDS_TUTORIALSAVENAME));
|
||||||
}
|
}
|
||||||
#else // 4jcraft, TODO this is using old pre-TU19 logic for loading the tutorial, modify to use the above ifdefs
|
#else
|
||||||
std::wstring fpTutorial = L"Tutorial.pck";
|
std::wstring fpTutorial = L"Tutorial.pck";
|
||||||
if(app.getArchiveFileSize(fpTutorial) >= 0)
|
if(app.getArchiveFileSize(fpTutorial) >= 0)
|
||||||
{
|
{
|
||||||
|
|
@ -692,7 +658,6 @@ void GameRuleManager::loadDefaultGameRules() {
|
||||||
else delete pack;
|
else delete pack;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GameRuleManager::loadGameRulesPack(File* path) {
|
bool GameRuleManager::loadGameRulesPack(File* path) {
|
||||||
|
|
|
||||||
|
|
@ -157,7 +157,7 @@ GameRuleDefinition* LevelGenerationOptions::addChild(
|
||||||
rule = new StartFeature();
|
rule = new StartFeature();
|
||||||
m_features.push_back((StartFeature*)rule);
|
m_features.push_back((StartFeature*)rule);
|
||||||
} else {
|
} else {
|
||||||
#ifndef _CONTENT_PACKAGE
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
wprintf(
|
wprintf(
|
||||||
L"LevelGenerationOptions: Attempted to add invalid child rule - "
|
L"LevelGenerationOptions: Attempted to add invalid child rule - "
|
||||||
L"%d\n",
|
L"%d\n",
|
||||||
|
|
@ -357,7 +357,7 @@ ConsoleSchematicFile* LevelGenerationOptions::loadSchematicFile(
|
||||||
// If we have already loaded this, just return
|
// If we have already loaded this, just return
|
||||||
AUTO_VAR(it, m_schematics.find(filename));
|
AUTO_VAR(it, m_schematics.find(filename));
|
||||||
if (it != m_schematics.end()) {
|
if (it != m_schematics.end()) {
|
||||||
#ifndef _CONTENT_PACKAGE
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
wprintf(L"We have already loaded schematic file %ls\n",
|
wprintf(L"We have already loaded schematic file %ls\n",
|
||||||
filename.c_str());
|
filename.c_str());
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -468,17 +468,10 @@ void LevelGenerationOptions::loadBaseSaveData() {
|
||||||
mountIndex = m_parentDLCPack->GetDLCMountIndex();
|
mountIndex = m_parentDLCPack->GetDLCMountIndex();
|
||||||
|
|
||||||
if (mountIndex > -1) {
|
if (mountIndex > -1) {
|
||||||
#if 0
|
|
||||||
if (StorageManager.MountInstalledDLC(
|
|
||||||
ProfileManager.GetPrimaryPad(), mountIndex,
|
|
||||||
&LevelGenerationOptions::packMounted, this,
|
|
||||||
L"WPACK") != ERROR_IO_PENDING)
|
|
||||||
#else
|
|
||||||
if (StorageManager.MountInstalledDLC(
|
if (StorageManager.MountInstalledDLC(
|
||||||
ProfileManager.GetPrimaryPad(), mountIndex,
|
ProfileManager.GetPrimaryPad(), mountIndex,
|
||||||
&LevelGenerationOptions::packMounted, this,
|
&LevelGenerationOptions::packMounted, this,
|
||||||
"WPACK") != ERROR_IO_PENDING)
|
"WPACK") != ERROR_IO_PENDING)
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
// corrupt DLC
|
// corrupt DLC
|
||||||
setLoadedData();
|
setLoadedData();
|
||||||
|
|
@ -519,7 +512,7 @@ int LevelGenerationOptions::packMounted(LPVOID pParam, int iPad, DWORD dwErr,
|
||||||
dlcFile->getGrfPath(), true,
|
dlcFile->getGrfPath(), true,
|
||||||
L"WPACK:"));
|
L"WPACK:"));
|
||||||
if (grf.exists()) {
|
if (grf.exists()) {
|
||||||
#ifdef _UNICODE
|
#if defined(_UNICODE)
|
||||||
std::wstring path = grf.getPath();
|
std::wstring path = grf.getPath();
|
||||||
const WCHAR* pchFilename = path.c_str();
|
const WCHAR* pchFilename = path.c_str();
|
||||||
HANDLE fileHandle = CreateFile(
|
HANDLE fileHandle = CreateFile(
|
||||||
|
|
@ -577,7 +570,7 @@ int LevelGenerationOptions::packMounted(LPVOID pParam, int iPad, DWORD dwErr,
|
||||||
File save(app.getFilePath(lgo->m_parentDLCPack->GetPackID(),
|
File save(app.getFilePath(lgo->m_parentDLCPack->GetPackID(),
|
||||||
lgo->getBaseSavePath(), true, L"WPACK:"));
|
lgo->getBaseSavePath(), true, L"WPACK:"));
|
||||||
if (save.exists()) {
|
if (save.exists()) {
|
||||||
#ifdef _UNICODE
|
#if defined(_UNICODE)
|
||||||
std::wstring path = save.getPath();
|
std::wstring path = save.getPath();
|
||||||
const WCHAR* pchFilename = path.c_str();
|
const WCHAR* pchFilename = path.c_str();
|
||||||
HANDLE fileHandle = CreateFile(
|
HANDLE fileHandle = CreateFile(
|
||||||
|
|
@ -624,11 +617,7 @@ int LevelGenerationOptions::packMounted(LPVOID pParam, int iPad, DWORD dwErr,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if 0
|
|
||||||
DWORD result = StorageManager.UnmountInstalledDLC(L"WPACK");
|
|
||||||
#else
|
|
||||||
DWORD result = StorageManager.UnmountInstalledDLC("WPACK");
|
DWORD result = StorageManager.UnmountInstalledDLC("WPACK");
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
lgo->setLoadedData();
|
lgo->setLoadedData();
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,6 @@ bool LeaderboardManager::ReadStats_TopRank(LeaderboardReadListener *listener, in
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 1
|
|
||||||
void LeaderboardManager::printStats(ReadView &view)
|
void LeaderboardManager::printStats(ReadView &view)
|
||||||
{
|
{
|
||||||
app.DebugPrintf("[LeaderboardManager] Printing stats:\n"
|
app.DebugPrintf("[LeaderboardManager] Printing stats:\n"
|
||||||
|
|
@ -103,4 +102,3 @@ bool DebugReadListener::OnStatsReadComplete(LeaderboardManager::eStatsReturn suc
|
||||||
}
|
}
|
||||||
|
|
||||||
DebugReadListener *DebugReadListener::m_instance = new DebugReadListener();
|
DebugReadListener *DebugReadListener::m_instance = new DebugReadListener();
|
||||||
#endif
|
|
||||||
|
|
@ -133,10 +133,6 @@ public:
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
#if 0
|
|
||||||
typedef XSESSION_VIEW_PROPERTIES *ViewIn;
|
|
||||||
typedef PXUSER_STATS_READ_RESULTS ViewOut;
|
|
||||||
#else
|
|
||||||
static const int RECORD_SIZE = 40; //base32
|
static const int RECORD_SIZE = 40; //base32
|
||||||
|
|
||||||
typedef struct StatsData
|
typedef struct StatsData
|
||||||
|
|
@ -187,7 +183,6 @@ public:
|
||||||
|
|
||||||
typedef ReadView ViewOut;
|
typedef ReadView ViewOut;
|
||||||
typedef RegisterScore *ViewIn;
|
typedef RegisterScore *ViewIn;
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
@ -243,26 +238,18 @@ public:
|
||||||
virtual bool isIdle() = 0;
|
virtual bool isIdle() = 0;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
#if 1
|
|
||||||
static void printStats(ReadView &view);
|
static void printStats(ReadView &view);
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class LeaderboardReadListener
|
class LeaderboardReadListener
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
#if 0
|
|
||||||
virtual bool OnStatsReadComplete(bool success, int numResults, LeaderboardManager::ViewOut results) = 0;
|
|
||||||
#else
|
|
||||||
virtual bool OnStatsReadComplete(LeaderboardManager::eStatsReturn ret, int numResults, LeaderboardManager::ViewOut results) = 0;
|
virtual bool OnStatsReadComplete(LeaderboardManager::eStatsReturn ret, int numResults, LeaderboardManager::ViewOut results) = 0;
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#if 1
|
|
||||||
class DebugReadListener : public LeaderboardReadListener
|
class DebugReadListener : public LeaderboardReadListener
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual bool OnStatsReadComplete(LeaderboardManager::eStatsReturn ret, int numResults, LeaderboardManager::ViewOut results);
|
virtual bool OnStatsReadComplete(LeaderboardManager::eStatsReturn ret, int numResults, LeaderboardManager::ViewOut results);
|
||||||
static DebugReadListener *m_instance;
|
static DebugReadListener *m_instance;
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
|
|
|
||||||
|
|
@ -13,18 +13,7 @@
|
||||||
|
|
||||||
#include "../../../../Minecraft.World/Util/StringHelpers.h"
|
#include "../../../../Minecraft.World/Util/StringHelpers.h"
|
||||||
|
|
||||||
#if 0
|
|
||||||
#include "Orbis/OrbisExtras/ShutdownManager.h"
|
|
||||||
#include "Orbis/Orbis_App.h"
|
|
||||||
#elif 0
|
|
||||||
#include "PSVita/PSVitaExtras/ShutdownManager.h"
|
|
||||||
#include "PSVita/PSVita_App.h"
|
|
||||||
#elif 0
|
|
||||||
#include "PS3/PS3Extras/ShutdownManager.h"
|
|
||||||
#include "PS3/PS3_App.h"
|
|
||||||
#else
|
|
||||||
#error "SonyLeaderboardManager is included for a non-sony platform."
|
#error "SonyLeaderboardManager is included for a non-sony platform."
|
||||||
#endif
|
|
||||||
|
|
||||||
SonyLeaderboardManager::SonyLeaderboardManager() {
|
SonyLeaderboardManager::SonyLeaderboardManager() {
|
||||||
m_eStatsState = eStatsState_Idle;
|
m_eStatsState = eStatsState_Idle;
|
||||||
|
|
@ -194,66 +183,6 @@ HRESULT SonyLeaderboardManager::fillByIdsQuery(const SceNpId& myNpId,
|
||||||
switch (m_eFilterMode) {
|
switch (m_eFilterMode) {
|
||||||
case eFM_Friends: {
|
case eFM_Friends: {
|
||||||
// 4J-JEV: Implementation for Orbis & Vita as they a very similar.
|
// 4J-JEV: Implementation for Orbis & Vita as they a very similar.
|
||||||
#if (0) || (0)
|
|
||||||
|
|
||||||
sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::FriendsList>
|
|
||||||
s_friendList;
|
|
||||||
ret = getFriendsList(s_friendList);
|
|
||||||
|
|
||||||
if (ret != SCE_TOOLKIT_NP_SUCCESS) {
|
|
||||||
// Error handling
|
|
||||||
if (m_eStatsState != eStatsState_Canceled)
|
|
||||||
m_eStatsState = eStatsState_Failed;
|
|
||||||
app.DebugPrintf(
|
|
||||||
"[SonyLeaderboardManager] 'getFriendslist' fail, 0x%x.\n",
|
|
||||||
ret);
|
|
||||||
return false;
|
|
||||||
} else if (s_friendList.hasResult()) {
|
|
||||||
// 4J-JEV: Friends list doesn't include player, leave space for
|
|
||||||
// them.
|
|
||||||
len = s_friendList.get()->size() + 1;
|
|
||||||
|
|
||||||
npIds = new SceNpId[len];
|
|
||||||
|
|
||||||
int i = 0;
|
|
||||||
|
|
||||||
sce::Toolkit::NP::FriendsList::const_iterator itr;
|
|
||||||
for (itr = s_friendList.get()->begin();
|
|
||||||
itr != s_friendList.get()->end(); itr++) {
|
|
||||||
npIds[i] = itr->npid;
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
|
|
||||||
npIds[len - 1] =
|
|
||||||
myNpId; // 4J-JEV: Append player to end of query.
|
|
||||||
} else {
|
|
||||||
// 4J-JEV: Something terrible must have happend,
|
|
||||||
// 'getFriendslist' was supposed to be a synchronous operation.
|
|
||||||
__debugbreak();
|
|
||||||
|
|
||||||
// 4J-JEV: We can at least fall-back to just the players score.
|
|
||||||
len = 1;
|
|
||||||
npIds = new SceNpId[1];
|
|
||||||
|
|
||||||
npIds[0] = myNpId;
|
|
||||||
}
|
|
||||||
|
|
||||||
#elif (0)
|
|
||||||
// PS3
|
|
||||||
|
|
||||||
// 4J-JEV: Doesn't include the player (its just their friends).
|
|
||||||
ret = sceNpBasicGetFriendListEntryCount(&len);
|
|
||||||
len += 1;
|
|
||||||
|
|
||||||
npIds = new SceNpId[len];
|
|
||||||
|
|
||||||
for (uint32_t i = 0; i < len - 1; i++) {
|
|
||||||
ret = sceNpBasicGetFriendListEntry(i, npIds + i);
|
|
||||||
if (ret < 0) return ret;
|
|
||||||
}
|
|
||||||
npIds[len - 1] = myNpId; // 4J-JEV: Append player to end of query.
|
|
||||||
|
|
||||||
#endif
|
|
||||||
} break;
|
} break;
|
||||||
case eFM_MyScore: {
|
case eFM_MyScore: {
|
||||||
len = 1;
|
len = 1;
|
||||||
|
|
@ -295,9 +224,6 @@ bool SonyLeaderboardManager::getScoreByIds() {
|
||||||
ProfileManager.GetSceNpId(0, &myNpId);
|
ProfileManager.GetSceNpId(0, &myNpId);
|
||||||
|
|
||||||
ret = fillByIdsQuery(myNpId, npIds, num);
|
ret = fillByIdsQuery(myNpId, npIds, num);
|
||||||
#if 0
|
|
||||||
if (ret < 0) goto error2;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ptr = new SceNpScorePlayerRankData[num];
|
ptr = new SceNpScorePlayerRankData[num];
|
||||||
comments = new SceNpScoreComment[num];
|
comments = new SceNpScoreComment[num];
|
||||||
|
|
@ -316,9 +242,6 @@ bool SonyLeaderboardManager::getScoreByIds() {
|
||||||
int boardId = getBoardId(m_difficulty, m_statsType);
|
int boardId = getBoardId(m_difficulty, m_statsType);
|
||||||
|
|
||||||
// 4J-JEV: Orbis can only do with 100 ids max, so we use batches.
|
// 4J-JEV: Orbis can only do with 100 ids max, so we use batches.
|
||||||
#if 0
|
|
||||||
for (int batch = 0; batch < num; batch += 100) {
|
|
||||||
#endif
|
|
||||||
ret = createTransactionContext(m_titleContext);
|
ret = createTransactionContext(m_titleContext);
|
||||||
if (m_eStatsState == eStatsState_Canceled) {
|
if (m_eStatsState == eStatsState_Canceled) {
|
||||||
// Cancel operation has been called, abort.
|
// Cancel operation has been called, abort.
|
||||||
|
|
@ -352,29 +275,14 @@ bool SonyLeaderboardManager::getScoreByIds() {
|
||||||
m_requestId = ret;
|
m_requestId = ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
int tmpNum = std::min(num - batch, (unsigned int)100);
|
|
||||||
app.DebugPrintf(
|
|
||||||
"[SonyLeaderboardManager]\t Requesting ids %i-%i of %i.\n", batch,
|
|
||||||
batch + tmpNum, num);
|
|
||||||
#else
|
|
||||||
int tmpNum = num;
|
int tmpNum = num;
|
||||||
#endif
|
|
||||||
ret = sceNpScoreGetRankingByNpId(
|
ret = sceNpScoreGetRankingByNpId(
|
||||||
m_requestId,
|
m_requestId,
|
||||||
boardId, // BoardId
|
boardId, // BoardId
|
||||||
|
|
||||||
#if 0
|
|
||||||
batch + npIds, sizeof(SceNpId) * tmpNum, // IN: Player IDs
|
|
||||||
batch + ptr,
|
|
||||||
sizeof(SceNpScorePlayerRankData) * tmpNum, // OUT: Rank Data
|
|
||||||
batch + comments,
|
|
||||||
sizeof(SceNpScoreComment) * tmpNum, // OUT: Comments
|
|
||||||
#else
|
|
||||||
npIds, sizeof(SceNpId) * tmpNum, // IN: Player IDs
|
npIds, sizeof(SceNpId) * tmpNum, // IN: Player IDs
|
||||||
ptr, sizeof(SceNpScorePlayerRankData) * tmpNum, // OUT: Rank Data
|
ptr, sizeof(SceNpScorePlayerRankData) * tmpNum, // OUT: Rank Data
|
||||||
comments, sizeof(SceNpScoreComment) * tmpNum, // OUT: Comments
|
comments, sizeof(SceNpScoreComment) * tmpNum, // OUT: Comments
|
||||||
#endif
|
|
||||||
|
|
||||||
NULL, 0, // GameData. (unused)
|
NULL, 0, // GameData. (unused)
|
||||||
|
|
||||||
|
|
@ -407,9 +315,6 @@ bool SonyLeaderboardManager::getScoreByIds() {
|
||||||
destroyTransactionContext(m_requestId);
|
destroyTransactionContext(m_requestId);
|
||||||
m_requestId = 0;
|
m_requestId = 0;
|
||||||
|
|
||||||
#if 0
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
m_readCount = num;
|
m_readCount = num;
|
||||||
|
|
||||||
|
|
@ -640,9 +545,7 @@ bool SonyLeaderboardManager::setScore() {
|
||||||
|
|
||||||
&tmp, // OUT: current rank,
|
&tmp, // OUT: current rank,
|
||||||
|
|
||||||
#if 1
|
|
||||||
NULL, // compareDate
|
NULL, // compareDate
|
||||||
#endif
|
|
||||||
|
|
||||||
NULL // Reserved, specify null.
|
NULL // Reserved, specify null.
|
||||||
);
|
);
|
||||||
|
|
@ -1029,7 +932,7 @@ void SonyLeaderboardManager::fromSymbols(char* str) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SonyLeaderboardManager::test_string(std::string testing) {
|
bool SonyLeaderboardManager::test_string(std::string testing) {
|
||||||
#ifndef _CONTENT_PACKAGE
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
static SceNpScoreComment comment;
|
static SceNpScoreComment comment;
|
||||||
ZeroMemory(&comment, sizeof(SceNpScoreComment));
|
ZeroMemory(&comment, sizeof(SceNpScoreComment));
|
||||||
memcpy(&comment, testing.c_str(), SCE_NP_SCORE_COMMENT_MAXLEN);
|
memcpy(&comment, testing.c_str(), SCE_NP_SCORE_COMMENT_MAXLEN);
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,7 @@
|
||||||
|
|
||||||
#include "Common/Leaderboards/LeaderboardManager.h"
|
#include "Common/Leaderboards/LeaderboardManager.h"
|
||||||
|
|
||||||
#if 0
|
|
||||||
typedef CellRtcTick SonyRtcTick;
|
|
||||||
#else
|
|
||||||
typedef SceRtcTick SonyRtcTick;
|
typedef SceRtcTick SonyRtcTick;
|
||||||
#endif
|
|
||||||
|
|
||||||
class SonyLeaderboardManager : public LeaderboardManager {
|
class SonyLeaderboardManager : public LeaderboardManager {
|
||||||
protected:
|
protected:
|
||||||
|
|
@ -135,11 +131,6 @@ protected:
|
||||||
virtual HRESULT fillByIdsQuery(const SceNpId& myNpId, SceNpId*& npIds,
|
virtual HRESULT fillByIdsQuery(const SceNpId& myNpId, SceNpId*& npIds,
|
||||||
uint32_t& len);
|
uint32_t& len);
|
||||||
|
|
||||||
#if (0) || (0)
|
|
||||||
virtual HRESULT getFriendsList(
|
|
||||||
sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::FriendsList>&
|
|
||||||
friendsList) = 0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
virtual char* getComment(SceNpScoreComment* comment) = 0;
|
virtual char* getComment(SceNpScoreComment* comment) = 0;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -28,14 +28,9 @@
|
||||||
#include "../GameRules/ConsoleGameRules.h"
|
#include "../GameRules/ConsoleGameRules.h"
|
||||||
#include "GameNetworkManager.h"
|
#include "GameNetworkManager.h"
|
||||||
|
|
||||||
#if !(0)
|
|
||||||
#include "../UI/UI.h"
|
#include "../UI/UI.h"
|
||||||
#include "../UI/UIScene_PauseMenu.h"
|
#include "../UI/UIScene_PauseMenu.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
#include "../../Minecraft.World/Stats/DurangoStats.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Global instance
|
// Global instance
|
||||||
CGameNetworkManager g_NetworkManager;
|
CGameNetworkManager g_NetworkManager;
|
||||||
|
|
@ -72,32 +67,6 @@ void CGameNetworkManager::Terminate() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGameNetworkManager::DoWork() {
|
void CGameNetworkManager::DoWork() {
|
||||||
#if 0
|
|
||||||
// did we get any notifications from the game listener?
|
|
||||||
if (app.GetNotifications()->size() != 0) {
|
|
||||||
PNOTIFICATION pNotification = app.GetNotifications()->back();
|
|
||||||
|
|
||||||
switch (pNotification->dwNotification) {
|
|
||||||
case XN_LIVE_LINK_STATE_CHANGED: {
|
|
||||||
int iPrimaryPlayer = g_NetworkManager.GetPrimaryPad();
|
|
||||||
bool bConnected = (pNotification->uiParam != 0) ? true : false;
|
|
||||||
if ((g_NetworkManager.GetLockedProfile() != -1) &&
|
|
||||||
iPrimaryPlayer != -1 && bConnected == false &&
|
|
||||||
g_NetworkManager.IsInSession()) {
|
|
||||||
app.SetAction(iPrimaryPlayer,
|
|
||||||
eAppAction_EthernetDisconnected);
|
|
||||||
}
|
|
||||||
} break;
|
|
||||||
case XN_LIVE_INVITE_ACCEPTED:
|
|
||||||
s_pPlatformNetworkManager->Notify(pNotification->dwNotification,
|
|
||||||
pNotification->uiParam);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
app.GetNotifications()->pop_back();
|
|
||||||
delete pNotification;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
s_pPlatformNetworkManager->DoWork();
|
s_pPlatformNetworkManager->DoWork();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -141,9 +110,6 @@ bool CGameNetworkManager::_RunNetworkGame(void* lpParameter) {
|
||||||
|
|
||||||
bool CGameNetworkManager::StartNetworkGame(Minecraft* minecraft,
|
bool CGameNetworkManager::StartNetworkGame(Minecraft* minecraft,
|
||||||
void* lpParameter) {
|
void* lpParameter) {
|
||||||
#if 0
|
|
||||||
ProfileManager.SetDeferredSignoutEnabled(true);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int64_t seed = 0;
|
int64_t seed = 0;
|
||||||
if (lpParameter != NULL) {
|
if (lpParameter != NULL) {
|
||||||
|
|
@ -165,18 +131,7 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft* minecraft,
|
||||||
// Load the tutorial save data here
|
// Load the tutorial save data here
|
||||||
if (param->levelGen->requiresBaseSave() &&
|
if (param->levelGen->requiresBaseSave() &&
|
||||||
!param->levelGen->getBaseSavePath().empty()) {
|
!param->levelGen->getBaseSavePath().empty()) {
|
||||||
#if 0
|
#if defined(_WINDOWS64)
|
||||||
#ifdef _TU_BUILD
|
|
||||||
std::wstring fileRoot =
|
|
||||||
L"UPDATE:\\res\\GameRules\\" +
|
|
||||||
param->levelGen->getBaseSavePath();
|
|
||||||
#else
|
|
||||||
std::wstring fileRoot =
|
|
||||||
L"GAME:\\res\\TitleUpdate\\GameRules\\" +
|
|
||||||
param->levelGen->getBaseSavePath();
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
#ifdef _WINDOWS64
|
|
||||||
std::wstring fileRoot =
|
std::wstring fileRoot =
|
||||||
L"Windows64Media\\Tutorial\\" +
|
L"Windows64Media\\Tutorial\\" +
|
||||||
param->levelGen->getBaseSavePath();
|
param->levelGen->getBaseSavePath();
|
||||||
|
|
@ -184,26 +139,13 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft* minecraft,
|
||||||
if (!root.exists())
|
if (!root.exists())
|
||||||
fileRoot = L"Windows64\\Tutorial\\" +
|
fileRoot = L"Windows64\\Tutorial\\" +
|
||||||
param->levelGen->getBaseSavePath();
|
param->levelGen->getBaseSavePath();
|
||||||
#elif 0
|
|
||||||
std::wstring fileRoot =
|
|
||||||
L"/app0/orbis/Tutorial/" +
|
|
||||||
param->levelGen->getBaseSavePath();
|
|
||||||
#elif 0
|
|
||||||
std::wstring fileRoot =
|
|
||||||
L"PSVita/Tutorial/" +
|
|
||||||
param->levelGen->getBaseSavePath();
|
|
||||||
#elif 0
|
|
||||||
std::wstring fileRoot =
|
|
||||||
L"PS3/Tutorial/" +
|
|
||||||
param->levelGen->getBaseSavePath();
|
|
||||||
#else
|
#else
|
||||||
std::wstring fileRoot =
|
std::wstring fileRoot =
|
||||||
L"Tutorial\\" + param->levelGen->getBaseSavePath();
|
L"Tutorial\\" + param->levelGen->getBaseSavePath();
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
File grf(fileRoot);
|
File grf(fileRoot);
|
||||||
if (grf.exists()) {
|
if (grf.exists()) {
|
||||||
#ifdef _UNICODE
|
#if defined(_UNICODE)
|
||||||
std::wstring path = grf.getPath();
|
std::wstring path = grf.getPath();
|
||||||
const WCHAR* pchFilename = path.c_str();
|
const WCHAR* pchFilename = path.c_str();
|
||||||
HANDLE fileHandle = CreateFile(
|
HANDLE fileHandle = CreateFile(
|
||||||
|
|
@ -272,9 +214,6 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft* minecraft,
|
||||||
C4JThread* thread =
|
C4JThread* thread =
|
||||||
new C4JThread(&CGameNetworkManager::ServerThreadProc, lpParameter,
|
new C4JThread(&CGameNetworkManager::ServerThreadProc, lpParameter,
|
||||||
"Server", 256 * 1024);
|
"Server", 256 * 1024);
|
||||||
#if 0 || 0
|
|
||||||
thread->SetPriority(THREAD_PRIORITY_BELOW_NORMAL);
|
|
||||||
#endif //0
|
|
||||||
|
|
||||||
thread->SetProcessor(CPU_CORE_SERVER);
|
thread->SetProcessor(CPU_CORE_SERVER);
|
||||||
thread->Run();
|
thread->Run();
|
||||||
|
|
@ -292,7 +231,6 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft* minecraft,
|
||||||
Socket::Initialise(NULL);
|
Socket::Initialise(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 1
|
|
||||||
Minecraft* pMinecraft = Minecraft::GetInstance();
|
Minecraft* pMinecraft = Minecraft::GetInstance();
|
||||||
app.DebugPrintf("[NET] IsReadyToPlayOrIdle=%d IsInSession=%d\n",
|
app.DebugPrintf("[NET] IsReadyToPlayOrIdle=%d IsInSession=%d\n",
|
||||||
IsReadyToPlayOrIdle(), IsInSession());
|
IsReadyToPlayOrIdle(), IsInSession());
|
||||||
|
|
@ -313,7 +251,6 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft* minecraft,
|
||||||
if (changedMessage) {
|
if (changedMessage) {
|
||||||
pMinecraft->progressRenderer->progressStagePercentage(100);
|
pMinecraft->progressRenderer->progressStagePercentage(100);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
// If we aren't in session, then something bad must have happened - we
|
// If we aren't in session, then something bad must have happened - we
|
||||||
// aren't joining, creating or ready play
|
// aren't joining, creating or ready play
|
||||||
|
|
@ -518,19 +455,12 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft* minecraft,
|
||||||
!connection->isClosed(),
|
!connection->isClosed(),
|
||||||
ProfileManager.IsSignedIn(idx),
|
ProfileManager.IsSignedIn(idx),
|
||||||
!g_NetworkManager.IsLeavingGame());
|
!g_NetworkManager.IsLeavingGame());
|
||||||
#if 0 || 0
|
|
||||||
} while (IsInSession() && !connection->isStarted() &&
|
|
||||||
!connection->isClosed() &&
|
|
||||||
ProfileManager.IsSignedIn(idx) &&
|
|
||||||
!g_NetworkManager.IsLeavingGame());
|
|
||||||
#else
|
|
||||||
// TODO - This SHOULD be something just like the code above but
|
// TODO - This SHOULD be something just like the code above but
|
||||||
// temporarily changing here so that we don't have to depend on
|
// temporarily changing here so that we don't have to depend on
|
||||||
// the profilemanager behaviour
|
// the profilemanager behaviour
|
||||||
} while (IsInSession() && !connection->isStarted() &&
|
} while (IsInSession() && !connection->isStarted() &&
|
||||||
!connection->isClosed() &&
|
!connection->isClosed() &&
|
||||||
!g_NetworkManager.IsLeavingGame());
|
!g_NetworkManager.IsLeavingGame());
|
||||||
#endif
|
|
||||||
|
|
||||||
// 4J Stu - Fix for #11279 - CRASH: TCR 001: BAS Game Stability:
|
// 4J Stu - Fix for #11279 - CRASH: TCR 001: BAS Game Stability:
|
||||||
// Signing out of game will cause title to crash We need to break
|
// Signing out of game will cause title to crash We need to break
|
||||||
|
|
@ -619,12 +549,6 @@ INetworkPlayer* CGameNetworkManager::GetPlayerBySmallId(unsigned char smallId) {
|
||||||
return s_pPlatformNetworkManager->GetPlayerBySmallId(smallId);
|
return s_pPlatformNetworkManager->GetPlayerBySmallId(smallId);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
std::wstring CGameNetworkManager::GetDisplayNameByGamertag(
|
|
||||||
std::wstring gamertag) {
|
|
||||||
return s_pPlatformNetworkManager->GetDisplayNameByGamertag(gamertag);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
INetworkPlayer* CGameNetworkManager::GetHostPlayer() {
|
INetworkPlayer* CGameNetworkManager::GetHostPlayer() {
|
||||||
return s_pPlatformNetworkManager->GetHostPlayer();
|
return s_pPlatformNetworkManager->GetHostPlayer();
|
||||||
|
|
@ -763,9 +687,6 @@ CGameNetworkManager::eJoinGameResult CGameNetworkManager::JoinGame(
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGameNetworkManager::CancelJoinGame(void* lpParam) {
|
void CGameNetworkManager::CancelJoinGame(void* lpParam) {
|
||||||
#if 0
|
|
||||||
s_pPlatformNetworkManager->CancelJoinGame();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CGameNetworkManager::LeaveGame(bool bMigrateHost) {
|
bool CGameNetworkManager::LeaveGame(bool bMigrateHost) {
|
||||||
|
|
@ -779,18 +700,6 @@ int CGameNetworkManager::JoinFromInvite_SignInReturned(void* pParam,
|
||||||
INVITE_INFO* pInviteInfo = (INVITE_INFO*)pParam;
|
INVITE_INFO* pInviteInfo = (INVITE_INFO*)pParam;
|
||||||
|
|
||||||
if (bContinue == true) {
|
if (bContinue == true) {
|
||||||
#if 0
|
|
||||||
// Check if PSN is unavailable because of age restriction
|
|
||||||
int npAvailability = ProfileManager.getNPAvailability(iPad);
|
|
||||||
if (npAvailability == SCE_NP_ERROR_AGE_RESTRICTION) {
|
|
||||||
unsigned int uiIDA[1];
|
|
||||||
uiIDA[0] = IDS_OK;
|
|
||||||
ui.RequestErrorMessage(IDS_ONLINE_SERVICE_TITLE,
|
|
||||||
IDS_CONTENT_RESTRICTION, uiIDA, 1, iPad);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
app.DebugPrintf("JoinFromInvite_SignInReturned, iPad %d\n", iPad);
|
app.DebugPrintf("JoinFromInvite_SignInReturned, iPad %d\n", iPad);
|
||||||
// It's possible that the player has not signed in - they can back out
|
// It's possible that the player has not signed in - they can back out
|
||||||
|
|
@ -814,13 +723,6 @@ int CGameNetworkManager::JoinFromInvite_SignInReturned(void* pParam,
|
||||||
// Check if user-created content is allowed, as we cannot play
|
// Check if user-created content is allowed, as we cannot play
|
||||||
// multiplayer if it's not
|
// multiplayer if it's not
|
||||||
bool noUGC = false;
|
bool noUGC = false;
|
||||||
#if 0 || 0
|
|
||||||
ProfileManager.GetChatAndContentRestrictions(iPad, false, &noUGC,
|
|
||||||
NULL, NULL);
|
|
||||||
#elif 0
|
|
||||||
ProfileManager.GetChatAndContentRestrictions(iPad, false, NULL,
|
|
||||||
&noUGC, NULL);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (noUGC) {
|
if (noUGC) {
|
||||||
int messageText =
|
int messageText =
|
||||||
|
|
@ -838,15 +740,6 @@ int CGameNetworkManager::JoinFromInvite_SignInReturned(void* pParam,
|
||||||
uiIDA, 1,
|
uiIDA, 1,
|
||||||
ProfileManager.GetPrimaryPad());
|
ProfileManager.GetPrimaryPad());
|
||||||
} else {
|
} else {
|
||||||
#if 0 || 0
|
|
||||||
bool chatRestricted = false;
|
|
||||||
ProfileManager.GetChatAndContentRestrictions(
|
|
||||||
iPad, false, &chatRestricted, NULL, NULL);
|
|
||||||
if (chatRestricted) {
|
|
||||||
ProfileManager.DisplaySystemMessage(
|
|
||||||
0, ProfileManager.GetPrimaryPad());
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
ProfileManager.SetLockedProfile(iPad);
|
ProfileManager.SetLockedProfile(iPad);
|
||||||
ProfileManager.SetPrimaryPad(iPad);
|
ProfileManager.SetPrimaryPad(iPad);
|
||||||
|
|
||||||
|
|
@ -939,11 +832,6 @@ int CGameNetworkManager::RunNetworkGameThreadProc(void* lpParameter) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
// 4J-JEV: Wait for the loading/saving to finish.
|
|
||||||
while (StorageManager.GetSaveState() != C4JStorage::ESaveGame_Idle)
|
|
||||||
Sleep(10);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
Tile::ReleaseThreadStorage();
|
Tile::ReleaseThreadStorage();
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -1010,138 +898,12 @@ int CGameNetworkManager::ExitAndJoinFromInviteThreadProc(void* lpParam) {
|
||||||
|
|
||||||
// Xbox should always be online when receiving invites - on PS3 we need to
|
// Xbox should always be online when receiving invites - on PS3 we need to
|
||||||
// check & ask the user to sign in
|
// check & ask the user to sign in
|
||||||
#if !0 && !0
|
|
||||||
JoinFromInviteData* inviteData = (JoinFromInviteData*)lpParam;
|
JoinFromInviteData* inviteData = (JoinFromInviteData*)lpParam;
|
||||||
app.SetAction(inviteData->dwUserIndex, eAppAction_JoinFromInvite, lpParam);
|
app.SetAction(inviteData->dwUserIndex, eAppAction_JoinFromInvite, lpParam);
|
||||||
#else
|
|
||||||
if (ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad())) {
|
|
||||||
JoinFromInviteData* inviteData = (JoinFromInviteData*)lpParam;
|
|
||||||
app.SetAction(inviteData->dwUserIndex, eAppAction_JoinFromInvite,
|
|
||||||
lpParam);
|
|
||||||
} else {
|
|
||||||
unsigned int uiIDA[2];
|
|
||||||
uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT;
|
|
||||||
uiIDA[1] = IDS_PRO_NOTONLINE_DECLINE;
|
|
||||||
ui.RequestErrorMessage(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT,
|
|
||||||
uiIDA, 2, ProfileManager.GetPrimaryPad(),
|
|
||||||
&CGameNetworkManager::MustSignInReturned_0,
|
|
||||||
lpParam);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0 || 0 || 0
|
|
||||||
// This case happens when we have been returned from the game to the main menu
|
|
||||||
// after receiving an invite and are now trying to go back in to join the new
|
|
||||||
// game The pair of methods MustSignInReturned_0 & PSNSignInReturned_0 handle
|
|
||||||
// this
|
|
||||||
int CGameNetworkManager::MustSignInReturned_0(
|
|
||||||
void* pParam, int iPad, C4JStorage::EMessageResult result) {
|
|
||||||
if (result == C4JStorage::EMessage_ResultAccept) {
|
|
||||||
#if 0
|
|
||||||
SQRNetworkManager_PS3::AttemptPSNSignIn(
|
|
||||||
&CGameNetworkManager::PSNSignInReturned_0, pParam, true);
|
|
||||||
#elif 0
|
|
||||||
SQRNetworkManager_Vita::AttemptPSNSignIn(
|
|
||||||
&CGameNetworkManager::PSNSignInReturned_0, pParam, true);
|
|
||||||
#elif 0
|
|
||||||
SQRNetworkManager_Orbis::AttemptPSNSignIn(
|
|
||||||
&CGameNetworkManager::PSNSignInReturned_0, pParam, true);
|
|
||||||
#endif
|
|
||||||
} else {
|
|
||||||
app.SetAction(0, eAppAction_Idle);
|
|
||||||
ui.NavigateToHomeMenu();
|
|
||||||
ui.UpdatePlayerBasePositions();
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int CGameNetworkManager::PSNSignInReturned_0(void* pParam, bool bContinue,
|
|
||||||
int iPad) {
|
|
||||||
JoinFromInviteData* inviteData = (JoinFromInviteData*)pParam;
|
|
||||||
|
|
||||||
// If the invite data isn't set up yet (indicated by it being all zeroes,
|
|
||||||
// easiest detected via the net version), then try and get it again... this
|
|
||||||
// can happen if we got the invite whilst signed out
|
|
||||||
|
|
||||||
if (bContinue) {
|
|
||||||
if (inviteData->pInviteInfo->netVersion == 0) {
|
|
||||||
#if 0 || defined __VITA__
|
|
||||||
if (!SQRNetworkManager_PS3::UpdateInviteData(
|
|
||||||
(SQRNetworkManager::PresenceSyncInfo*)
|
|
||||||
inviteData->pInviteInfo)) {
|
|
||||||
bContinue = false;
|
|
||||||
}
|
|
||||||
#elif 0
|
|
||||||
// TODO: No Orbis equivalent (should there be?)
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (bContinue) {
|
|
||||||
app.SetAction(inviteData->dwUserIndex, eAppAction_JoinFromInvite,
|
|
||||||
pParam);
|
|
||||||
} else {
|
|
||||||
app.SetAction(inviteData->dwUserIndex, eAppAction_Idle);
|
|
||||||
ui.NavigateToHomeMenu();
|
|
||||||
ui.UpdatePlayerBasePositions();
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// This case happens when we were in the main menus when we got an invite, and
|
|
||||||
// weren't signed in... now can proceed with the normal flow of code for this
|
|
||||||
// situation The pair of methods MustSignInReturned_1 & PSNSignInReturned_1
|
|
||||||
// handle this
|
|
||||||
int CGameNetworkManager::MustSignInReturned_1(
|
|
||||||
void* pParam, int iPad, C4JStorage::EMessageResult result) {
|
|
||||||
if (result == C4JStorage::EMessage_ResultAccept) {
|
|
||||||
#if 0
|
|
||||||
SQRNetworkManager_PS3::AttemptPSNSignIn(
|
|
||||||
&CGameNetworkManager::PSNSignInReturned_1, pParam, true);
|
|
||||||
#elif 0
|
|
||||||
SQRNetworkManager_Vita::AttemptPSNSignIn(
|
|
||||||
&CGameNetworkManager::PSNSignInReturned_1, pParam, true);
|
|
||||||
#elif 0
|
|
||||||
SQRNetworkManager_Orbis::AttemptPSNSignIn(
|
|
||||||
&CGameNetworkManager::PSNSignInReturned_1, pParam, true);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int CGameNetworkManager::PSNSignInReturned_1(void* pParam, bool bContinue,
|
|
||||||
int iPad) {
|
|
||||||
INVITE_INFO* inviteInfo = (INVITE_INFO*)pParam;
|
|
||||||
|
|
||||||
// If the invite data isn't set up yet (indicated by it being all zeroes,
|
|
||||||
// easiest detected via the net version), then try and get it again... this
|
|
||||||
// can happen if we got the invite whilst signed out
|
|
||||||
|
|
||||||
if (bContinue) {
|
|
||||||
if (inviteInfo->netVersion == 0) {
|
|
||||||
#if 0 || defined __VITA__
|
|
||||||
if (!SQRNetworkManager_PS3::UpdateInviteData(
|
|
||||||
(SQRNetworkManager::PresenceSyncInfo*)inviteInfo)) {
|
|
||||||
bContinue = false;
|
|
||||||
}
|
|
||||||
#elif 0
|
|
||||||
// TODO: No Orbis equivalent (should there be?)
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (bContinue) {
|
|
||||||
g_NetworkManager.HandleInviteWhenInMenus(0, inviteInfo);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void CGameNetworkManager::_LeaveGame() {
|
void CGameNetworkManager::_LeaveGame() {
|
||||||
s_pPlatformNetworkManager->_LeaveGame(false, true);
|
s_pPlatformNetworkManager->_LeaveGame(false, true);
|
||||||
|
|
@ -1157,56 +919,10 @@ int CGameNetworkManager::ChangeSessionTypeThreadProc(void* lpParam) {
|
||||||
Minecraft* pMinecraft = Minecraft::GetInstance();
|
Minecraft* pMinecraft = Minecraft::GetInstance();
|
||||||
MinecraftServer* pServer = MinecraftServer::getInstance();
|
MinecraftServer* pServer = MinecraftServer::getInstance();
|
||||||
|
|
||||||
#if 0 || 0 || 0
|
|
||||||
unsigned int uiIDA[1];
|
|
||||||
uiIDA[0] = IDS_CONFIRM_OK;
|
|
||||||
if (g_NetworkManager.m_bLastDisconnectWasLostRoomOnly) {
|
|
||||||
if (g_NetworkManager.m_bSignedOutofPSN) {
|
|
||||||
C4JStorage::EMessageResult result = ui.RequestErrorMessage(
|
|
||||||
IDS_PROGRESS_CONVERTING_TO_OFFLINE_GAME, IDS_ERROR_PSN_SIGN_OUT,
|
|
||||||
uiIDA, 1, ProfileManager.GetPrimaryPad());
|
|
||||||
} else {
|
|
||||||
C4JStorage::EMessageResult result = ui.RequestErrorMessage(
|
|
||||||
IDS_ERROR_NETWORK_TITLE,
|
|
||||||
IDS_PROGRESS_CONVERTING_TO_OFFLINE_GAME, uiIDA, 1,
|
|
||||||
ProfileManager.GetPrimaryPad());
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
C4JStorage::EMessageResult result = ui.RequestErrorMessage(
|
|
||||||
IDS_CONNECTION_LOST,
|
|
||||||
g_NetworkManager.CorrectErrorIDS(IDS_CONNECTION_LOST_LIVE_NO_EXIT),
|
|
||||||
uiIDA, 1, ProfileManager.GetPrimaryPad());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Swap these two messages around as one is too long to display at 480
|
|
||||||
pMinecraft->progressRenderer->progressStartNoAbort(
|
|
||||||
IDS_PROGRESS_CONVERTING_TO_OFFLINE_GAME);
|
|
||||||
pMinecraft->progressRenderer->progressStage(
|
|
||||||
-1); // g_NetworkManager.CorrectErrorIDS(IDS_CONNECTION_LOST_LIVE_NO_EXIT)
|
|
||||||
// );
|
|
||||||
#elif 0
|
|
||||||
if (g_NetworkManager.m_bFullSessionMessageOnNextSessionChange) {
|
|
||||||
unsigned int uiIDA[1];
|
|
||||||
uiIDA[0] = IDS_CONFIRM_OK;
|
|
||||||
C4JStorage::EMessageResult result = ui.RequestErrorMessage(
|
|
||||||
IDS_PROGRESS_CONVERTING_TO_OFFLINE_GAME, IDS_IN_PARTY_SESSION_FULL,
|
|
||||||
uiIDA, 1, ProfileManager.GetPrimaryPad());
|
|
||||||
pMinecraft->progressRenderer->progressStartNoAbort(
|
|
||||||
IDS_PROGRESS_CONVERTING_TO_OFFLINE_GAME);
|
|
||||||
pMinecraft->progressRenderer->progressStage(-1);
|
|
||||||
} else {
|
|
||||||
pMinecraft->progressRenderer->progressStartNoAbort(
|
pMinecraft->progressRenderer->progressStartNoAbort(
|
||||||
g_NetworkManager.CorrectErrorIDS(IDS_CONNECTION_LOST_LIVE_NO_EXIT));
|
g_NetworkManager.CorrectErrorIDS(IDS_CONNECTION_LOST_LIVE_NO_EXIT));
|
||||||
pMinecraft->progressRenderer->progressStage(
|
pMinecraft->progressRenderer->progressStage(
|
||||||
IDS_PROGRESS_CONVERTING_TO_OFFLINE_GAME);
|
IDS_PROGRESS_CONVERTING_TO_OFFLINE_GAME);
|
||||||
}
|
|
||||||
|
|
||||||
#else
|
|
||||||
pMinecraft->progressRenderer->progressStartNoAbort(
|
|
||||||
g_NetworkManager.CorrectErrorIDS(IDS_CONNECTION_LOST_LIVE_NO_EXIT));
|
|
||||||
pMinecraft->progressRenderer->progressStage(
|
|
||||||
IDS_PROGRESS_CONVERTING_TO_OFFLINE_GAME);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
while (app.GetXuiServerAction(ProfileManager.GetPrimaryPad()) !=
|
while (app.GetXuiServerAction(ProfileManager.GetPrimaryPad()) !=
|
||||||
eXuiServerAction_Idle &&
|
eXuiServerAction_Idle &&
|
||||||
|
|
@ -1219,41 +935,13 @@ int CGameNetworkManager::ChangeSessionTypeThreadProc(void* lpParam) {
|
||||||
// wait for the server to be in a non-ticking state
|
// wait for the server to be in a non-ticking state
|
||||||
pServer->m_serverPausedEvent->WaitForSignal(INFINITE);
|
pServer->m_serverPausedEvent->WaitForSignal(INFINITE);
|
||||||
|
|
||||||
#if 0 || 0 || 0
|
|
||||||
// Swap these two messages around as one is too long to display at 480
|
|
||||||
pMinecraft->progressRenderer->progressStartNoAbort(
|
|
||||||
IDS_PROGRESS_CONVERTING_TO_OFFLINE_GAME);
|
|
||||||
pMinecraft->progressRenderer->progressStage(
|
|
||||||
-1); // g_NetworkManager.CorrectErrorIDS(IDS_CONNECTION_LOST_LIVE_NO_EXIT)
|
|
||||||
// );
|
|
||||||
#elif 0
|
|
||||||
if (g_NetworkManager.m_bFullSessionMessageOnNextSessionChange) {
|
|
||||||
pMinecraft->progressRenderer->progressStartNoAbort(
|
|
||||||
IDS_PROGRESS_CONVERTING_TO_OFFLINE_GAME);
|
|
||||||
pMinecraft->progressRenderer->progressStage(-1);
|
|
||||||
} else {
|
|
||||||
pMinecraft->progressRenderer->progressStartNoAbort(
|
pMinecraft->progressRenderer->progressStartNoAbort(
|
||||||
g_NetworkManager.CorrectErrorIDS(IDS_CONNECTION_LOST_LIVE_NO_EXIT));
|
g_NetworkManager.CorrectErrorIDS(IDS_CONNECTION_LOST_LIVE_NO_EXIT));
|
||||||
pMinecraft->progressRenderer->progressStage(
|
pMinecraft->progressRenderer->progressStage(
|
||||||
IDS_PROGRESS_CONVERTING_TO_OFFLINE_GAME);
|
IDS_PROGRESS_CONVERTING_TO_OFFLINE_GAME);
|
||||||
}
|
|
||||||
#else
|
|
||||||
pMinecraft->progressRenderer->progressStartNoAbort(
|
|
||||||
g_NetworkManager.CorrectErrorIDS(IDS_CONNECTION_LOST_LIVE_NO_EXIT));
|
|
||||||
pMinecraft->progressRenderer->progressStage(
|
|
||||||
IDS_PROGRESS_CONVERTING_TO_OFFLINE_GAME);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
pMinecraft->progressRenderer->progressStagePercentage(25);
|
pMinecraft->progressRenderer->progressStagePercentage(25);
|
||||||
|
|
||||||
#if 0
|
|
||||||
// wait for any players that were being added, to finish doing this. On XB1,
|
|
||||||
// if we don't do this then there's an async thread running doing this,
|
|
||||||
// which could then finish at any inappropriate time later
|
|
||||||
while (s_pPlatformNetworkManager->IsAddingPlayer()) {
|
|
||||||
Sleep(1);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Null the network player of all the server players that are local, to stop
|
// Null the network player of all the server players that are local, to stop
|
||||||
// them being removed from the server when removed from the session
|
// them being removed from the server when removed from the session
|
||||||
|
|
@ -1348,9 +1036,6 @@ int CGameNetworkManager::ChangeSessionTypeThreadProc(void* lpParam) {
|
||||||
DisconnectPacket::
|
DisconnectPacket::
|
||||||
eDisconnect_ConnectionCreationFailed)) {
|
eDisconnect_ConnectionCreationFailed)) {
|
||||||
pMinecraft->removeLocalPlayerIdx(index);
|
pMinecraft->removeLocalPlayerIdx(index);
|
||||||
#if 0
|
|
||||||
ProfileManager.RemoveGamepadFromGame(index);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1358,22 +1043,18 @@ int CGameNetworkManager::ChangeSessionTypeThreadProc(void* lpParam) {
|
||||||
|
|
||||||
pMinecraft->progressRenderer->progressStagePercentage(100);
|
pMinecraft->progressRenderer->progressStagePercentage(100);
|
||||||
|
|
||||||
#if 1
|
|
||||||
// Make sure that we have transitioned through any joining/creating stages
|
// Make sure that we have transitioned through any joining/creating stages
|
||||||
// so we're actually ready to set to play
|
// so we're actually ready to set to play
|
||||||
while (!s_pPlatformNetworkManager->IsReadyToPlayOrIdle()) {
|
while (!s_pPlatformNetworkManager->IsReadyToPlayOrIdle()) {
|
||||||
Sleep(10);
|
Sleep(10);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
s_pPlatformNetworkManager->_StartGame();
|
s_pPlatformNetworkManager->_StartGame();
|
||||||
|
|
||||||
#if 1
|
|
||||||
// Wait until the message box has been closed
|
// Wait until the message box has been closed
|
||||||
while (ui.IsSceneInStack(XUSER_INDEX_ANY, eUIScene_MessageBox)) {
|
while (ui.IsSceneInStack(XUSER_INDEX_ANY, eUIScene_MessageBox)) {
|
||||||
Sleep(10);
|
Sleep(10);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
// Start the game again
|
// Start the game again
|
||||||
app.SetGameStarted(true);
|
app.SetGameStarted(true);
|
||||||
|
|
@ -1400,24 +1081,6 @@ std::wstring CGameNetworkManager::GatherStats() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGameNetworkManager::renderQueueMeter() {
|
void CGameNetworkManager::renderQueueMeter() {
|
||||||
#if 0
|
|
||||||
int height = 720;
|
|
||||||
|
|
||||||
CGameNetworkManager::byteQueue[(CGameNetworkManager::messageQueuePos) &
|
|
||||||
(CGameNetworkManager::messageQueue_length -
|
|
||||||
1)] =
|
|
||||||
GetHostPlayer()->GetSendQueueSizeBytes(NULL, false);
|
|
||||||
CGameNetworkManager::messageQueue
|
|
||||||
[(CGameNetworkManager::messageQueuePos++) &
|
|
||||||
(CGameNetworkManager::messageQueue_length - 1)] =
|
|
||||||
GetHostPlayer()->GetSendQueueSizeMessages(NULL, false);
|
|
||||||
|
|
||||||
Minecraft* pMinecraft = Minecraft::GetInstance();
|
|
||||||
pMinecraft->gui->renderGraph(CGameNetworkManager::messageQueue_length,
|
|
||||||
CGameNetworkManager::messageQueuePos,
|
|
||||||
CGameNetworkManager::messageQueue, 10, 1000,
|
|
||||||
CGameNetworkManager::byteQueue, 100, 25000);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::wstring CGameNetworkManager::GatherRTTStats() {
|
std::wstring CGameNetworkManager::GatherRTTStats() {
|
||||||
|
|
@ -1469,10 +1132,6 @@ void CGameNetworkManager::StateChange_JoiningToIdle(
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGameNetworkManager::StateChange_AnyToStarting() {
|
void CGameNetworkManager::StateChange_AnyToStarting() {
|
||||||
#if 0 || 0 || 0
|
|
||||||
app.getRemoteStorage()->shutdown(); // shut the remote storage lib down and
|
|
||||||
// hopefully get our 7mb back
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!g_NetworkManager.IsHost()) {
|
if (!g_NetworkManager.IsHost()) {
|
||||||
LoadingInputParams* loadingParams = new LoadingInputParams();
|
LoadingInputParams* loadingParams = new LoadingInputParams();
|
||||||
|
|
@ -1634,22 +1293,6 @@ void CGameNetworkManager::PlayerJoining(INetworkPlayer* pNetworkPlayer) {
|
||||||
TelemetryManager->RecordPlayerSessionStart(
|
TelemetryManager->RecordPlayerSessionStart(
|
||||||
pNetworkPlayer->GetUserIndex());
|
pNetworkPlayer->GetUserIndex());
|
||||||
}
|
}
|
||||||
#if 0
|
|
||||||
else {
|
|
||||||
if (!pNetworkPlayer->IsHost()) {
|
|
||||||
for (int idx = 0; idx < XUSER_MAX_COUNT; ++idx) {
|
|
||||||
if (Minecraft::GetInstance()->localplayers[idx] != NULL) {
|
|
||||||
TelemetryManager->RecordLevelStart(
|
|
||||||
idx, eSen_FriendOrMatch_Playing_With_Invited_Friends,
|
|
||||||
eSen_CompeteOrCoop_Coop_and_Competitive,
|
|
||||||
Minecraft::GetInstance()->level->difficulty,
|
|
||||||
app.GetLocalPlayerCount(),
|
|
||||||
g_NetworkManager.GetOnlinePlayerCount());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGameNetworkManager::PlayerLeaving(INetworkPlayer* pNetworkPlayer) {
|
void CGameNetworkManager::PlayerLeaving(INetworkPlayer* pNetworkPlayer) {
|
||||||
|
|
@ -1660,20 +1303,6 @@ void CGameNetworkManager::PlayerLeaving(INetworkPlayer* pNetworkPlayer) {
|
||||||
TelemetryManager->RecordPlayerSessionExit(
|
TelemetryManager->RecordPlayerSessionExit(
|
||||||
pNetworkPlayer->GetUserIndex(), app.GetDisconnectReason());
|
pNetworkPlayer->GetUserIndex(), app.GetDisconnectReason());
|
||||||
}
|
}
|
||||||
#if 0
|
|
||||||
else {
|
|
||||||
for (int idx = 0; idx < XUSER_MAX_COUNT; ++idx) {
|
|
||||||
if (Minecraft::GetInstance()->localplayers[idx] != NULL) {
|
|
||||||
TelemetryManager->RecordLevelStart(
|
|
||||||
idx, eSen_FriendOrMatch_Playing_With_Invited_Friends,
|
|
||||||
eSen_CompeteOrCoop_Coop_and_Competitive,
|
|
||||||
Minecraft::GetInstance()->level->difficulty,
|
|
||||||
app.GetLocalPlayerCount(),
|
|
||||||
g_NetworkManager.GetOnlinePlayerCount());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGameNetworkManager::HostChanged() {
|
void CGameNetworkManager::HostChanged() {
|
||||||
|
|
@ -1714,54 +1343,19 @@ void CGameNetworkManager::GameInviteReceived(int userIndex,
|
||||||
bool bContentRestricted = false;
|
bool bContentRestricted = false;
|
||||||
bool pccAllowed = true;
|
bool pccAllowed = true;
|
||||||
bool pccFriendsAllowed = true;
|
bool pccFriendsAllowed = true;
|
||||||
#if 0 || 0
|
|
||||||
ProfileManager.GetChatAndContentRestrictions(userIndex, false, &noUGC,
|
|
||||||
&bContentRestricted, NULL);
|
|
||||||
#else
|
|
||||||
ProfileManager.AllowedPlayerCreatedContent(
|
ProfileManager.AllowedPlayerCreatedContent(
|
||||||
ProfileManager.GetPrimaryPad(), false, &pccAllowed, &pccFriendsAllowed);
|
ProfileManager.GetPrimaryPad(), false, &pccAllowed, &pccFriendsAllowed);
|
||||||
if (!pccAllowed && !pccFriendsAllowed) noUGC = true;
|
if (!pccAllowed && !pccFriendsAllowed) noUGC = true;
|
||||||
#endif
|
|
||||||
|
|
||||||
#if 0 || 0
|
|
||||||
if (joiningUsers > 1 && !RenderManager.IsHiDef() &&
|
|
||||||
userIndex != ProfileManager.GetPrimaryPad()) {
|
|
||||||
unsigned int uiIDA[1];
|
|
||||||
uiIDA[0] = IDS_CONFIRM_OK;
|
|
||||||
|
|
||||||
// 4J-PB - it's possible there is no primary pad here, when accepting an
|
|
||||||
// invite from the dashboard
|
|
||||||
ui.RequestErrorMessage(IDS_CONNECTION_FAILED,
|
|
||||||
IDS_CONNECTION_FAILED_NO_SD_SPLITSCREEN, uiIDA,
|
|
||||||
1, XUSER_INDEX_ANY);
|
|
||||||
} else
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (noUGC) {
|
if (noUGC) {
|
||||||
#if 0
|
|
||||||
// showing the system message for chat restriction here instead now, to
|
|
||||||
// fix FQA bug report
|
|
||||||
ProfileManager.DisplaySystemMessage(
|
|
||||||
SCE_MSG_DIALOG_SYSMSG_TYPE_TRC_PSN_CHAT_RESTRICTION,
|
|
||||||
ProfileManager.GetPrimaryPad());
|
|
||||||
#else
|
|
||||||
int messageText = IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_SINGLE_LOCAL;
|
int messageText = IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_SINGLE_LOCAL;
|
||||||
if (joiningUsers > 1)
|
if (joiningUsers > 1)
|
||||||
messageText = IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_ALL_LOCAL;
|
messageText = IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_ALL_LOCAL;
|
||||||
|
|
||||||
ui.RequestUGCMessageBox(IDS_CONNECTION_FAILED, messageText,
|
ui.RequestUGCMessageBox(IDS_CONNECTION_FAILED, messageText,
|
||||||
XUSER_INDEX_ANY);
|
XUSER_INDEX_ANY);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#if 0 || 0
|
|
||||||
else if (bContentRestricted) {
|
|
||||||
int messageText = IDS_CONTENT_RESTRICTION;
|
|
||||||
if (joiningUsers > 1) messageText = IDS_CONTENT_RESTRICTION_MULTIPLAYER;
|
|
||||||
|
|
||||||
ui.RequestContentRestrictedMessageBox(IDS_CONNECTION_FAILED,
|
|
||||||
messageText, XUSER_INDEX_ANY);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
else if (noPrivileges) {
|
else if (noPrivileges) {
|
||||||
unsigned int uiIDA[1];
|
unsigned int uiIDA[1];
|
||||||
uiIDA[0] = IDS_CONFIRM_OK;
|
uiIDA[0] = IDS_CONFIRM_OK;
|
||||||
|
|
@ -1776,42 +1370,8 @@ void CGameNetworkManager::GameInviteReceived(int userIndex,
|
||||||
IDS_NO_MULTIPLAYER_PRIVILEGE_JOIN_TEXT, uiIDA, 1,
|
IDS_NO_MULTIPLAYER_PRIVILEGE_JOIN_TEXT, uiIDA, 1,
|
||||||
XUSER_INDEX_ANY);
|
XUSER_INDEX_ANY);
|
||||||
} else {
|
} else {
|
||||||
#if 0 || 0
|
|
||||||
bool chatRestricted = false;
|
|
||||||
ProfileManager.GetChatAndContentRestrictions(
|
|
||||||
ProfileManager.GetPrimaryPad(), false, &chatRestricted, NULL, NULL);
|
|
||||||
if (chatRestricted) {
|
|
||||||
ProfileManager.DisplaySystemMessage(
|
|
||||||
SCE_MSG_DIALOG_SYSMSG_TYPE_TRC_PSN_CHAT_RESTRICTION,
|
|
||||||
ProfileManager.GetPrimaryPad());
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
if (!g_NetworkManager.IsInSession()) {
|
if (!g_NetworkManager.IsInSession()) {
|
||||||
#if 0 || 0
|
|
||||||
// PS3 is more complicated here - we need to make sure that the
|
|
||||||
// player is online. If they are then we can do the same as the
|
|
||||||
// xbox, if not we need to try and get them online and then, if they
|
|
||||||
// do sign in, go down the same path
|
|
||||||
|
|
||||||
// Determine why they're not "signed in live"
|
|
||||||
// MGH - On Vita we need to add a new message at some point for
|
|
||||||
// connecting when already signed in
|
|
||||||
if (ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad())) {
|
|
||||||
HandleInviteWhenInMenus(userIndex, pInviteInfo);
|
|
||||||
} else {
|
|
||||||
unsigned int uiIDA[2];
|
|
||||||
uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT;
|
|
||||||
uiIDA[1] = IDS_PRO_NOTONLINE_DECLINE;
|
|
||||||
ui.RequestErrorMessage(
|
|
||||||
IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 2,
|
|
||||||
ProfileManager.GetPrimaryPad(),
|
|
||||||
&CGameNetworkManager::MustSignInReturned_1,
|
|
||||||
(void*)pInviteInfo);
|
|
||||||
}
|
|
||||||
|
|
||||||
#else
|
|
||||||
HandleInviteWhenInMenus(userIndex, pInviteInfo);
|
HandleInviteWhenInMenus(userIndex, pInviteInfo);
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
app.DebugPrintf(
|
app.DebugPrintf(
|
||||||
"We are already in a multiplayer game...need to leave it\n");
|
"We are already in a multiplayer game...need to leave it\n");
|
||||||
|
|
@ -1823,10 +1383,6 @@ void CGameNetworkManager::GameInviteReceived(int userIndex,
|
||||||
// pInviteInfo;
|
// pInviteInfo;
|
||||||
|
|
||||||
// tell the app to process this
|
// tell the app to process this
|
||||||
#if 0
|
|
||||||
if (((CPlatformNetworkManagerSony*)s_pPlatformNetworkManager)
|
|
||||||
->checkValidInviteData(pInviteInfo))
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
app.ProcessInvite(userIndex, localUsersMask, pInviteInfo);
|
app.ProcessInvite(userIndex, localUsersMask, pInviteInfo);
|
||||||
}
|
}
|
||||||
|
|
@ -1840,12 +1396,6 @@ void CGameNetworkManager::HandleInviteWhenInMenus(
|
||||||
int userIndex, const INVITE_INFO* pInviteInfo) {
|
int userIndex, const INVITE_INFO* pInviteInfo) {
|
||||||
// We are in the root menus somewhere
|
// We are in the root menus somewhere
|
||||||
|
|
||||||
#if 0
|
|
||||||
while( waitHere )
|
|
||||||
{
|
|
||||||
Sleep(1);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// if this is the trial game, then we need the user to unlock the full game
|
// if this is the trial game, then we need the user to unlock the full game
|
||||||
if (!ProfileManager.IsFullVersion()) {
|
if (!ProfileManager.IsFullVersion()) {
|
||||||
|
|
@ -1854,9 +1404,7 @@ void CGameNetworkManager::HandleInviteWhenInMenus(
|
||||||
|
|
||||||
app.SetAction(userIndex, eAppAction_DashboardTrialJoinFromInvite);
|
app.SetAction(userIndex, eAppAction_DashboardTrialJoinFromInvite);
|
||||||
} else {
|
} else {
|
||||||
#if 1
|
|
||||||
ProfileManager.SetPrimaryPad(userIndex);
|
ProfileManager.SetPrimaryPad(userIndex);
|
||||||
#endif
|
|
||||||
|
|
||||||
// 4J Stu - If we accept an invite from the main menu before going to
|
// 4J Stu - If we accept an invite from the main menu before going to
|
||||||
// play game we need to load the DLC These checks are done within the
|
// play game we need to load the DLC These checks are done within the
|
||||||
|
|
@ -1870,12 +1418,7 @@ void CGameNetworkManager::HandleInviteWhenInMenus(
|
||||||
// as the main player might sign out in the sign-in ui
|
// as the main player might sign out in the sign-in ui
|
||||||
// ProfileManager.SetLockedProfile(-1);
|
// ProfileManager.SetLockedProfile(-1);
|
||||||
|
|
||||||
#if 0
|
|
||||||
if ((!app.IsLocalMultiplayerAvailable()) &&
|
|
||||||
InputManager.IsPadLocked(userIndex))
|
|
||||||
#else
|
|
||||||
if (!app.IsLocalMultiplayerAvailable())
|
if (!app.IsLocalMultiplayerAvailable())
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
bool noPrivileges =
|
bool noPrivileges =
|
||||||
!ProfileManager.AllowedToPlayMultiplayer(userIndex);
|
!ProfileManager.AllowedToPlayMultiplayer(userIndex);
|
||||||
|
|
@ -1917,12 +1460,6 @@ void CGameNetworkManager::HandleInviteWhenInMenus(
|
||||||
} else {
|
} else {
|
||||||
// the FromInvite will make the lib decide how many panes to display
|
// the FromInvite will make the lib decide how many panes to display
|
||||||
// based on connected pads/signed in players
|
// based on connected pads/signed in players
|
||||||
#if 0
|
|
||||||
ProfileManager.RequestSignInUI(
|
|
||||||
true, false, false, false, false,
|
|
||||||
&CGameNetworkManager::JoinFromInvite_SignInReturned,
|
|
||||||
(void*)pInviteInfo, userIndex);
|
|
||||||
#else
|
|
||||||
SignInInfo info;
|
SignInInfo info;
|
||||||
info.Func = &CGameNetworkManager::JoinFromInvite_SignInReturned;
|
info.Func = &CGameNetworkManager::JoinFromInvite_SignInReturned;
|
||||||
info.lpParam = (void*)pInviteInfo;
|
info.lpParam = (void*)pInviteInfo;
|
||||||
|
|
@ -1931,7 +1468,6 @@ void CGameNetworkManager::HandleInviteWhenInMenus(
|
||||||
ui.NavigateToScene(ProfileManager.GetPrimaryPad(),
|
ui.NavigateToScene(ProfileManager.GetPrimaryPad(),
|
||||||
eUIScene_QuadrantSignin, &info, eUILayer_Alert,
|
eUIScene_QuadrantSignin, &info, eUILayer_Alert,
|
||||||
eUIGroup_Fullscreen);
|
eUIGroup_Fullscreen);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1944,20 +1480,13 @@ void CGameNetworkManager::AddLocalPlayerFailed(int idx,
|
||||||
: DisconnectPacket::eDisconnect_ConnectionCreationFailed);
|
: DisconnectPacket::eDisconnect_ConnectionCreationFailed);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0 || 0 || 0
|
|
||||||
void CGameNetworkManager::HandleDisconnect(bool bLostRoomOnly, bool bPSNSignout)
|
|
||||||
#else
|
|
||||||
void CGameNetworkManager::HandleDisconnect(bool bLostRoomOnly)
|
void CGameNetworkManager::HandleDisconnect(bool bLostRoomOnly)
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
int iPrimaryPlayer = g_NetworkManager.GetPrimaryPad();
|
int iPrimaryPlayer = g_NetworkManager.GetPrimaryPad();
|
||||||
|
|
||||||
if ((g_NetworkManager.GetLockedProfile() != -1) && iPrimaryPlayer != -1 &&
|
if ((g_NetworkManager.GetLockedProfile() != -1) && iPrimaryPlayer != -1 &&
|
||||||
g_NetworkManager.IsInSession()) {
|
g_NetworkManager.IsInSession()) {
|
||||||
m_bLastDisconnectWasLostRoomOnly = bLostRoomOnly;
|
m_bLastDisconnectWasLostRoomOnly = bLostRoomOnly;
|
||||||
#if 0 || 0 || 0
|
|
||||||
m_bSignedOutofPSN = bPSNSignout;
|
|
||||||
#endif
|
|
||||||
app.SetAction(iPrimaryPlayer, eAppAction_EthernetDisconnected);
|
app.SetAction(iPrimaryPlayer, eAppAction_EthernetDisconnected);
|
||||||
} else {
|
} else {
|
||||||
m_bLastDisconnectWasLostRoomOnly = false;
|
m_bLastDisconnectWasLostRoomOnly = false;
|
||||||
|
|
@ -2040,9 +1569,7 @@ void CGameNetworkManager::ServerStoppedWait() {
|
||||||
if (C4JThread::isMainThread()) {
|
if (C4JThread::isMainThread()) {
|
||||||
int result = WAIT_TIMEOUT;
|
int result = WAIT_TIMEOUT;
|
||||||
do {
|
do {
|
||||||
#if 1
|
|
||||||
RenderManager.StartFrame();
|
RenderManager.StartFrame();
|
||||||
#endif
|
|
||||||
result = m_hServerStoppedEvent->WaitForSignal(20);
|
result = m_hServerStoppedEvent->WaitForSignal(20);
|
||||||
// Tick some simple things
|
// Tick some simple things
|
||||||
ProfileManager.Tick();
|
ProfileManager.Tick();
|
||||||
|
|
@ -2077,26 +1604,7 @@ int CGameNetworkManager::GetJoiningReadyPercentage() {
|
||||||
return s_pPlatformNetworkManager->GetJoiningReadyPercentage();
|
return s_pPlatformNetworkManager->GetJoiningReadyPercentage();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 1
|
|
||||||
void CGameNetworkManager::FakeLocalPlayerJoined() {
|
void CGameNetworkManager::FakeLocalPlayerJoined() {
|
||||||
s_pPlatformNetworkManager->FakeLocalPlayerJoined();
|
s_pPlatformNetworkManager->FakeLocalPlayerJoined();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
bool CGameNetworkManager::usingAdhocMode() {
|
|
||||||
return ((CPlatformNetworkManagerSony*)s_pPlatformNetworkManager)
|
|
||||||
->usingAdhocMode();
|
|
||||||
}
|
|
||||||
|
|
||||||
void CGameNetworkManager::setAdhocMode(bool bAdhoc) {
|
|
||||||
((CPlatformNetworkManagerSony*)s_pPlatformNetworkManager)
|
|
||||||
->setAdhocMode(bAdhoc);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CGameNetworkManager::startAdhocMatching() {
|
|
||||||
((CPlatformNetworkManagerSony*)s_pPlatformNetworkManager)
|
|
||||||
->startAdhocMatching();
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
// using namespace std;
|
// using namespace std;
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#ifndef __linux__
|
#if !defined(__linux__)
|
||||||
#include <qnet.h>
|
#include <qnet.h>
|
||||||
#endif
|
#endif
|
||||||
#include "../../Minecraft.World/Util/C4JThread.h"
|
#include "../../Minecraft.World/Util/C4JThread.h"
|
||||||
|
|
@ -122,15 +122,6 @@ public:
|
||||||
static int ServerThreadProc(void* lpParameter);
|
static int ServerThreadProc(void* lpParameter);
|
||||||
static int ExitAndJoinFromInviteThreadProc(void* lpParam);
|
static int ExitAndJoinFromInviteThreadProc(void* lpParam);
|
||||||
|
|
||||||
#if (0) || (0) || (0)
|
|
||||||
static int MustSignInReturned_0(void* pParam, int iPad,
|
|
||||||
C4JStorage::EMessageResult result);
|
|
||||||
static int PSNSignInReturned_0(void* pParam, bool bContinue, int iPad);
|
|
||||||
|
|
||||||
static int MustSignInReturned_1(void* pParam, int iPad,
|
|
||||||
C4JStorage::EMessageResult result);
|
|
||||||
static int PSNSignInReturned_1(void* pParam, bool bContinue, int iPad);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static void _LeaveGame();
|
static void _LeaveGame();
|
||||||
static int ChangeSessionTypeThreadProc(void* lpParam);
|
static int ChangeSessionTypeThreadProc(void* lpParam);
|
||||||
|
|
@ -154,11 +145,6 @@ public:
|
||||||
void ServerStoppedDestroy(); // Destroy signal
|
void ServerStoppedDestroy(); // Destroy signal
|
||||||
bool ServerStoppedValid(); // Is non-NULL
|
bool ServerStoppedValid(); // Is non-NULL
|
||||||
|
|
||||||
#if 0
|
|
||||||
static bool usingAdhocMode();
|
|
||||||
static void setAdhocMode(bool bAdhoc);
|
|
||||||
static void startAdhocMatching();
|
|
||||||
#endif
|
|
||||||
// Debug output
|
// Debug output
|
||||||
|
|
||||||
std::wstring GatherStats();
|
std::wstring GatherStats();
|
||||||
|
|
@ -192,11 +178,7 @@ private:
|
||||||
void GameInviteReceived(int userIndex, const INVITE_INFO* pInviteInfo);
|
void GameInviteReceived(int userIndex, const INVITE_INFO* pInviteInfo);
|
||||||
void HandleInviteWhenInMenus(int userIndex, const INVITE_INFO* pInviteInfo);
|
void HandleInviteWhenInMenus(int userIndex, const INVITE_INFO* pInviteInfo);
|
||||||
void AddLocalPlayerFailed(int idx, bool serverFull = false);
|
void AddLocalPlayerFailed(int idx, bool serverFull = false);
|
||||||
#if 0 || 0 || 0
|
|
||||||
void HandleDisconnect(bool bLostRoomOnly, bool bPSNSignOut);
|
|
||||||
#else
|
|
||||||
void HandleDisconnect(bool bLostRoomOnly);
|
void HandleDisconnect(bool bLostRoomOnly);
|
||||||
#endif
|
|
||||||
|
|
||||||
int GetPrimaryPad();
|
int GetPrimaryPad();
|
||||||
int GetLockedProfile();
|
int GetLockedProfile();
|
||||||
|
|
@ -208,12 +190,6 @@ private:
|
||||||
C4JThread::Event* m_hServerReadyEvent;
|
C4JThread::Event* m_hServerReadyEvent;
|
||||||
bool m_bInitialised;
|
bool m_bInitialised;
|
||||||
|
|
||||||
#if 0
|
|
||||||
public:
|
|
||||||
void SetFullSessionMessageOnNextSessionChange() {
|
|
||||||
m_bFullSessionMessageOnNextSessionChange = true;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
private:
|
private:
|
||||||
float m_lastPlayerEventTimeStart; // For telemetry
|
float m_lastPlayerEventTimeStart; // For telemetry
|
||||||
static CPlatformNetworkManager* s_pPlatformNetworkManager;
|
static CPlatformNetworkManager* s_pPlatformNetworkManager;
|
||||||
|
|
@ -221,20 +197,11 @@ private:
|
||||||
int GetJoiningReadyPercentage();
|
int GetJoiningReadyPercentage();
|
||||||
bool m_bLastDisconnectWasLostRoomOnly;
|
bool m_bLastDisconnectWasLostRoomOnly;
|
||||||
bool m_bFullSessionMessageOnNextSessionChange;
|
bool m_bFullSessionMessageOnNextSessionChange;
|
||||||
#if 0 || 0 || 0
|
|
||||||
bool m_bSignedOutofPSN;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
#if 1
|
|
||||||
void FakeLocalPlayerJoined(); // Temporary method whilst we don't have real
|
void FakeLocalPlayerJoined(); // Temporary method whilst we don't have real
|
||||||
// networking to make this happen
|
// networking to make this happen
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
extern CGameNetworkManager g_NetworkManager;
|
extern CGameNetworkManager g_NetworkManager;
|
||||||
|
|
||||||
#if 0
|
|
||||||
#undef __in
|
|
||||||
#define __out
|
|
||||||
#endif
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
// using namespace std;
|
// using namespace std;
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#ifndef __linux__
|
#if !defined(__linux__)
|
||||||
#include <qnet.h>
|
#include <qnet.h>
|
||||||
#endif // __linux__
|
#endif
|
||||||
#include "../../Minecraft.World/Util/C4JThread.h"
|
#include "../../Minecraft.World/Util/C4JThread.h"
|
||||||
#include "NetworkPlayerInterface.h"
|
#include "NetworkPlayerInterface.h"
|
||||||
#include "SessionInfo.h"
|
#include "SessionInfo.h"
|
||||||
|
|
@ -138,13 +138,8 @@ public:
|
||||||
void* pParam) = 0;
|
void* pParam) = 0;
|
||||||
virtual void ForceFriendsSessionRefresh() = 0;
|
virtual void ForceFriendsSessionRefresh() = 0;
|
||||||
|
|
||||||
#if 1
|
|
||||||
virtual void FakeLocalPlayerJoined() {
|
virtual void FakeLocalPlayerJoined() {
|
||||||
}; // Temporary method whilst we don't have real networking to make this
|
}; // Temporary method whilst we don't have real networking to make this
|
||||||
// happen
|
// happen
|
||||||
#endif
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
virtual std::wstring GetDisplayNameByGamertag(std::wstring gamertag) = 0;
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -193,9 +193,7 @@ public:
|
||||||
private:
|
private:
|
||||||
void NotifyPlayerJoined(IQNetPlayer* pQNetPlayer);
|
void NotifyPlayerJoined(IQNetPlayer* pQNetPlayer);
|
||||||
|
|
||||||
#if 1
|
|
||||||
void FakeLocalPlayerJoined() {
|
void FakeLocalPlayerJoined() {
|
||||||
NotifyPlayerJoined(m_pIQNet->GetLocalPlayerByUserIndex(0));
|
NotifyPlayerJoined(m_pIQNet->GetLocalPlayerByUserIndex(0));
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,66 +1,8 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#if 0 || 0
|
|
||||||
#include "Sony/SQRNetworkManager.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// A struct that we store in the QoS data when we are hosting the session. Max
|
// A struct that we store in the QoS data when we are hosting the session. Max
|
||||||
// size 1020 bytes.
|
// size 1020 bytes.
|
||||||
#if 0
|
|
||||||
typedef struct _GameSessionData {
|
|
||||||
unsigned short netVersion; // 2 bytes
|
|
||||||
char hostName[XUSER_NAME_SIZE]; // 16 bytes ( 16*1 )
|
|
||||||
GameSessionUID hostPlayerUID; // 8 bytes ( 8*1 ) on xbox, 24 bytes on PS3
|
|
||||||
GameSessionUID
|
|
||||||
players[MINECRAFT_NET_MAX_PLAYERS]; // 64 bytes ( 8*8 ) on xbox, 192 (
|
|
||||||
// 24*8) on PS3
|
|
||||||
char szPlayers[MINECRAFT_NET_MAX_PLAYERS]
|
|
||||||
[XUSER_NAME_SIZE]; // 128 bytes ( 8*16)
|
|
||||||
unsigned int m_uiGameHostSettings; // 4 bytes
|
|
||||||
unsigned int texturePackParentId; // 4 bytes
|
|
||||||
unsigned char subTexturePackId; // 1 byte
|
|
||||||
|
|
||||||
bool isJoinable; // 1 byte
|
|
||||||
|
|
||||||
_GameSessionData() {
|
|
||||||
netVersion = 0;
|
|
||||||
memset(hostName, 0, XUSER_NAME_SIZE);
|
|
||||||
memset(players, 0, MINECRAFT_NET_MAX_PLAYERS * sizeof(players[0]));
|
|
||||||
memset(szPlayers, 0, MINECRAFT_NET_MAX_PLAYERS * XUSER_NAME_SIZE);
|
|
||||||
isJoinable = true;
|
|
||||||
m_uiGameHostSettings = 0;
|
|
||||||
texturePackParentId = 0;
|
|
||||||
subTexturePackId = 0;
|
|
||||||
}
|
|
||||||
} GameSessionData;
|
|
||||||
#elif 0 || 0 || 0
|
|
||||||
typedef struct _GameSessionData {
|
|
||||||
unsigned short netVersion; // 2 bytes
|
|
||||||
GameSessionUID hostPlayerUID; // 8 bytes ( 8*1 ) on xbox, 24 bytes on PS3
|
|
||||||
GameSessionUID
|
|
||||||
players[MINECRAFT_NET_MAX_PLAYERS]; // 64 bytes ( 8*8 ) on xbox, 192 (
|
|
||||||
// 24*8) on PS3
|
|
||||||
unsigned int m_uiGameHostSettings; // 4 bytes
|
|
||||||
unsigned int texturePackParentId; // 4 bytes
|
|
||||||
unsigned char subTexturePackId; // 1 byte
|
|
||||||
|
|
||||||
bool isJoinable; // 1 byte
|
|
||||||
|
|
||||||
unsigned char playerCount; // 1 byte
|
|
||||||
bool isReadyToJoin; // 1 byte
|
|
||||||
|
|
||||||
_GameSessionData() {
|
|
||||||
netVersion = 0;
|
|
||||||
memset(players, 0, MINECRAFT_NET_MAX_PLAYERS * sizeof(players[0]));
|
|
||||||
isJoinable = true;
|
|
||||||
m_uiGameHostSettings = 0;
|
|
||||||
texturePackParentId = 0;
|
|
||||||
subTexturePackId = 0;
|
|
||||||
playerCount = 0;
|
|
||||||
isReadyToJoin = false;
|
|
||||||
}
|
|
||||||
} GameSessionData;
|
|
||||||
#else
|
|
||||||
typedef struct _GameSessionData {
|
typedef struct _GameSessionData {
|
||||||
unsigned short netVersion; // 2 bytes
|
unsigned short netVersion; // 2 bytes
|
||||||
unsigned int m_uiGameHostSettings; // 4 bytes
|
unsigned int m_uiGameHostSettings; // 4 bytes
|
||||||
|
|
@ -76,18 +18,10 @@ typedef struct _GameSessionData {
|
||||||
subTexturePackId = 0;
|
subTexturePackId = 0;
|
||||||
}
|
}
|
||||||
} GameSessionData;
|
} GameSessionData;
|
||||||
#endif
|
|
||||||
|
|
||||||
class FriendSessionInfo {
|
class FriendSessionInfo {
|
||||||
public:
|
public:
|
||||||
SessionID sessionId;
|
SessionID sessionId;
|
||||||
#if 0
|
|
||||||
XSESSION_SEARCHRESULT searchResult;
|
|
||||||
#elif 0 || 0 || 0
|
|
||||||
SQRNetworkManager::SessionSearchResult searchResult;
|
|
||||||
#elif 0
|
|
||||||
DQRNetworkManager::SessionSearchResult searchResult;
|
|
||||||
#endif
|
|
||||||
wchar_t* displayLabel;
|
wchar_t* displayLabel;
|
||||||
unsigned char displayLabelLength;
|
unsigned char displayLabelLength;
|
||||||
unsigned char displayLabelViewableStartIndex;
|
unsigned char displayLabelViewableStartIndex;
|
||||||
|
|
|
||||||
|
|
@ -8,11 +8,9 @@
|
||||||
|
|
||||||
#include "TelemetryManager.h"
|
#include "TelemetryManager.h"
|
||||||
|
|
||||||
#if !0 && !0
|
|
||||||
|
|
||||||
CTelemetryManager *TelemetryManager = new CTelemetryManager();
|
CTelemetryManager *TelemetryManager = new CTelemetryManager();
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
HRESULT CTelemetryManager::Init()
|
HRESULT CTelemetryManager::Init()
|
||||||
{
|
{
|
||||||
|
|
@ -286,13 +284,7 @@ int CTelemetryManager::GetMultiplayerInstanceID()
|
||||||
|
|
||||||
int CTelemetryManager::GenerateMultiplayerInstanceId()
|
int CTelemetryManager::GenerateMultiplayerInstanceId()
|
||||||
{
|
{
|
||||||
#if 0 || 0
|
|
||||||
FILETIME SystemTimeAsFileTime;
|
|
||||||
GetSystemTimeAsFileTime( &SystemTimeAsFileTime );
|
|
||||||
return static_cast<int>(SystemTimeAsFileTime.dwLowDateTime);
|
|
||||||
#else
|
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CTelemetryManager::SetMultiplayerInstanceId(int value)
|
void CTelemetryManager::SetMultiplayerInstanceId(int value)
|
||||||
|
|
|
||||||
|
|
@ -38,22 +38,6 @@ FullTutorial::FullTutorial(int iPad, bool isTrial /*= false*/)
|
||||||
e_Tutorial_Completion_Jump_To_Last_Task,
|
e_Tutorial_Completion_Jump_To_Last_Task,
|
||||||
eTelemetryTutorial_TrialStart));
|
eTelemetryTutorial_TrialStart));
|
||||||
} else {
|
} else {
|
||||||
#if 0
|
|
||||||
if (getCompleted(eTutorial_Telemetry_Halfway) &&
|
|
||||||
!isStateCompleted(e_Tutorial_State_Redstone_And_Piston)) {
|
|
||||||
addTask(e_Tutorial_State_Gameplay,
|
|
||||||
new ChoiceTask(this, IDS_TUTORIAL_NEW_FEATURES_CHOICE,
|
|
||||||
IDS_TUTORIAL_PROMPT_NEW_FEATURES_CHOICE,
|
|
||||||
true, ACTION_MENU_A, ACTION_MENU_B,
|
|
||||||
e_Tutorial_Completion_Jump_To_Last_Task,
|
|
||||||
eTelemetryTutorial_TrialStart));
|
|
||||||
}
|
|
||||||
|
|
||||||
addTask(e_Tutorial_State_Gameplay,
|
|
||||||
new InfoTask(this, IDS_TUTORIAL_TASK_OVERVIEW,
|
|
||||||
IDS_TUTORIAL_PROMPT_PRESS_A_TO_CONTINUE, true,
|
|
||||||
ACTION_MENU_A));
|
|
||||||
#else
|
|
||||||
if (getCompleted(eTutorial_Telemetry_Halfway)) {
|
if (getCompleted(eTutorial_Telemetry_Halfway)) {
|
||||||
addTask(e_Tutorial_State_Gameplay,
|
addTask(e_Tutorial_State_Gameplay,
|
||||||
new ChoiceTask(this, IDS_TUTORIAL_TASK_OVERVIEW,
|
new ChoiceTask(this, IDS_TUTORIAL_TASK_OVERVIEW,
|
||||||
|
|
@ -67,7 +51,6 @@ FullTutorial::FullTutorial(int iPad, bool isTrial /*= false*/)
|
||||||
IDS_TUTORIAL_PROMPT_PRESS_A_TO_CONTINUE, true,
|
IDS_TUTORIAL_PROMPT_PRESS_A_TO_CONTINUE, true,
|
||||||
ACTION_MENU_A));
|
ACTION_MENU_A));
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int lookMappings[] = {MINECRAFT_ACTION_LOOK_UP, MINECRAFT_ACTION_LOOK_DOWN,
|
int lookMappings[] = {MINECRAFT_ACTION_LOOK_UP, MINECRAFT_ACTION_LOOK_DOWN,
|
||||||
|
|
|
||||||
|
|
@ -378,9 +378,6 @@ Tutorial::Tutorial(int iPad, bool isFullTutorial /*= false*/) : m_iPad(iPad) {
|
||||||
|
|
||||||
m_CurrentState = e_Tutorial_State_Gameplay;
|
m_CurrentState = e_Tutorial_State_Gameplay;
|
||||||
m_hasStateChanged = false;
|
m_hasStateChanged = false;
|
||||||
#if 0
|
|
||||||
m_hTutorialScene = NULL;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
for (unsigned int i = 0; i < e_Tutorial_State_Max; ++i) {
|
for (unsigned int i = 0; i < e_Tutorial_State_Max; ++i) {
|
||||||
currentTask[i] = NULL;
|
currentTask[i] = NULL;
|
||||||
|
|
@ -1956,14 +1953,8 @@ Tutorial::~Tutorial() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Tutorial::debugResetPlayerSavedProgress(int iPad) {
|
void Tutorial::debugResetPlayerSavedProgress(int iPad) {
|
||||||
#if (0 || 0 || 0 || \
|
|
||||||
0)
|
|
||||||
GAME_SETTINGS* pGameSettings =
|
|
||||||
(GAME_SETTINGS*)StorageManager.GetGameDefinedProfileData(iPad);
|
|
||||||
#else
|
|
||||||
GAME_SETTINGS* pGameSettings =
|
GAME_SETTINGS* pGameSettings =
|
||||||
(GAME_SETTINGS*)ProfileManager.GetGameDefinedProfileData(iPad);
|
(GAME_SETTINGS*)ProfileManager.GetGameDefinedProfileData(iPad);
|
||||||
#endif
|
|
||||||
ZeroMemory(pGameSettings->ucTutorialCompletion,
|
ZeroMemory(pGameSettings->ucTutorialCompletion,
|
||||||
TUTORIAL_PROFILE_STORAGE_BYTES);
|
TUTORIAL_PROFILE_STORAGE_BYTES);
|
||||||
pGameSettings->uiSpecialTutorialBitmask = 0;
|
pGameSettings->uiSpecialTutorialBitmask = 0;
|
||||||
|
|
@ -1987,14 +1978,8 @@ void Tutorial::setCompleted(int completableId) {
|
||||||
if (completableIndex >= 0 &&
|
if (completableIndex >= 0 &&
|
||||||
completableIndex < TUTORIAL_PROFILE_STORAGE_BITS) {
|
completableIndex < TUTORIAL_PROFILE_STORAGE_BITS) {
|
||||||
// Set the bit for this position
|
// Set the bit for this position
|
||||||
#if (0 || 0 || 0 || \
|
|
||||||
0)
|
|
||||||
GAME_SETTINGS* pGameSettings =
|
|
||||||
(GAME_SETTINGS*)StorageManager.GetGameDefinedProfileData(m_iPad);
|
|
||||||
#else
|
|
||||||
GAME_SETTINGS* pGameSettings =
|
GAME_SETTINGS* pGameSettings =
|
||||||
(GAME_SETTINGS*)ProfileManager.GetGameDefinedProfileData(m_iPad);
|
(GAME_SETTINGS*)ProfileManager.GetGameDefinedProfileData(m_iPad);
|
||||||
#endif
|
|
||||||
int arrayIndex = completableIndex >> 3;
|
int arrayIndex = completableIndex >> 3;
|
||||||
int bitIndex = 7 - (completableIndex % 8);
|
int bitIndex = 7 - (completableIndex % 8);
|
||||||
pGameSettings->ucTutorialCompletion[arrayIndex] |= 1 << bitIndex;
|
pGameSettings->ucTutorialCompletion[arrayIndex] |= 1 << bitIndex;
|
||||||
|
|
@ -2022,14 +2007,8 @@ bool Tutorial::getCompleted(int completableId) {
|
||||||
completableIndex < TUTORIAL_PROFILE_STORAGE_BITS) {
|
completableIndex < TUTORIAL_PROFILE_STORAGE_BITS) {
|
||||||
// Read the bit for this position
|
// Read the bit for this position
|
||||||
// Retrieve the data pointer from the profile
|
// Retrieve the data pointer from the profile
|
||||||
#if (0 || 0 || 0 || \
|
|
||||||
0)
|
|
||||||
GAME_SETTINGS* pGameSettings =
|
|
||||||
(GAME_SETTINGS*)StorageManager.GetGameDefinedProfileData(m_iPad);
|
|
||||||
#else
|
|
||||||
GAME_SETTINGS* pGameSettings =
|
GAME_SETTINGS* pGameSettings =
|
||||||
(GAME_SETTINGS*)ProfileManager.GetGameDefinedProfileData(m_iPad);
|
(GAME_SETTINGS*)ProfileManager.GetGameDefinedProfileData(m_iPad);
|
||||||
#endif
|
|
||||||
int arrayIndex = completableIndex >> 3;
|
int arrayIndex = completableIndex >> 3;
|
||||||
int bitIndex = 7 - (completableIndex % 8);
|
int bitIndex = 7 - (completableIndex % 8);
|
||||||
return (pGameSettings->ucTutorialCompletion[arrayIndex] &
|
return (pGameSettings->ucTutorialCompletion[arrayIndex] &
|
||||||
|
|
@ -2147,37 +2126,12 @@ void Tutorial::tick() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!hasRequestedUI) {
|
if (!hasRequestedUI) {
|
||||||
#if 0
|
|
||||||
m_bSceneIsSplitscreen = app.GetLocalPlayerCount() > 1;
|
|
||||||
if (m_bSceneIsSplitscreen) {
|
|
||||||
app.NavigateToScene(m_iPad, eUIComponent_TutorialPopup, (void*)this,
|
|
||||||
false, false, &m_hTutorialScene);
|
|
||||||
} else {
|
|
||||||
app.NavigateToScene(m_iPad, eUIComponent_TutorialPopup, (void*)this,
|
|
||||||
false, false, &m_hTutorialScene);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
ui.SetTutorial(m_iPad, this);
|
ui.SetTutorial(m_iPad, this);
|
||||||
#endif
|
|
||||||
hasRequestedUI = true;
|
hasRequestedUI = true;
|
||||||
} else {
|
} else {
|
||||||
// if we've changed mode, we may need to change scene
|
// if we've changed mode, we may need to change scene
|
||||||
if (m_bSceneIsSplitscreen != (app.GetLocalPlayerCount() > 1)) {
|
if (m_bSceneIsSplitscreen != (app.GetLocalPlayerCount() > 1)) {
|
||||||
#if 0
|
|
||||||
app.TutorialSceneNavigateBack(m_iPad);
|
|
||||||
m_bSceneIsSplitscreen = app.GetLocalPlayerCount() > 1;
|
|
||||||
if (m_bSceneIsSplitscreen) {
|
|
||||||
app.NavigateToScene(m_iPad, eUIComponent_TutorialPopup,
|
|
||||||
(void*)this, false, false,
|
|
||||||
&m_hTutorialScene);
|
|
||||||
} else {
|
|
||||||
app.NavigateToScene(m_iPad, eUIComponent_TutorialPopup,
|
|
||||||
(void*)this, false, false,
|
|
||||||
&m_hTutorialScene);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
ui.SetTutorial(m_iPad, this);
|
ui.SetTutorial(m_iPad, this);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2979,22 +2933,15 @@ void Tutorial::addMessage(
|
||||||
new TutorialMessage(messageId, limitRepeats, numRepeats);
|
new TutorialMessage(messageId, limitRepeats, numRepeats);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
void Tutorial::changeTutorialState(eTutorial_State newState,
|
|
||||||
CXuiScene* scene /*= NULL*/)
|
|
||||||
#else
|
|
||||||
void Tutorial::changeTutorialState(eTutorial_State newState,
|
void Tutorial::changeTutorialState(eTutorial_State newState,
|
||||||
UIScene* scene /*= NULL*/)
|
UIScene* scene /*= NULL*/)
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
if (newState == m_CurrentState) {
|
if (newState == m_CurrentState) {
|
||||||
// If clearing the scene, make sure that the tutorial popup has its
|
// If clearing the scene, make sure that the tutorial popup has its
|
||||||
// reference to this scene removed
|
// reference to this scene removed
|
||||||
#if 1
|
|
||||||
if (scene == NULL) {
|
if (scene == NULL) {
|
||||||
ui.RemoveInteractSceneReference(m_iPad, m_UIScene);
|
ui.RemoveInteractSceneReference(m_iPad, m_UIScene);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
m_UIScene = scene;
|
m_UIScene = scene;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -3037,11 +2984,9 @@ void Tutorial::changeTutorialState(eTutorial_State newState,
|
||||||
|
|
||||||
// If clearing the scene, make sure that the tutorial popup has its
|
// If clearing the scene, make sure that the tutorial popup has its
|
||||||
// reference to this scene removed
|
// reference to this scene removed
|
||||||
#if 1
|
|
||||||
if (scene == NULL) {
|
if (scene == NULL) {
|
||||||
ui.RemoveInteractSceneReference(m_iPad, m_UIScene);
|
ui.RemoveInteractSceneReference(m_iPad, m_UIScene);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
m_UIScene = scene;
|
m_UIScene = scene;
|
||||||
|
|
||||||
if (m_CurrentState != newState) {
|
if (m_CurrentState != newState) {
|
||||||
|
|
|
||||||
|
|
@ -67,10 +67,6 @@ private:
|
||||||
static int m_iTutorialFreezeTimeValue;
|
static int m_iTutorialFreezeTimeValue;
|
||||||
eTutorial_State m_CurrentState;
|
eTutorial_State m_CurrentState;
|
||||||
bool m_hasStateChanged;
|
bool m_hasStateChanged;
|
||||||
#if 0
|
|
||||||
HXUIOBJ
|
|
||||||
m_hTutorialScene; // to store the popup scene (splitscreen or normal)
|
|
||||||
#endif
|
|
||||||
bool m_bSceneIsSplitscreen;
|
bool m_bSceneIsSplitscreen;
|
||||||
|
|
||||||
bool m_bHasTickedOnce;
|
bool m_bHasTickedOnce;
|
||||||
|
|
@ -113,11 +109,7 @@ private:
|
||||||
bool hasRequestedUI;
|
bool hasRequestedUI;
|
||||||
bool uiTempDisabled;
|
bool uiTempDisabled;
|
||||||
|
|
||||||
#if 0
|
|
||||||
CXuiScene* m_UIScene;
|
|
||||||
#else
|
|
||||||
UIScene* m_UIScene;
|
UIScene* m_UIScene;
|
||||||
#endif
|
|
||||||
|
|
||||||
int m_iPad;
|
int m_iPad;
|
||||||
|
|
||||||
|
|
@ -143,11 +135,7 @@ public:
|
||||||
void setCompleted(int completableId);
|
void setCompleted(int completableId);
|
||||||
bool getCompleted(int completableId);
|
bool getCompleted(int completableId);
|
||||||
|
|
||||||
#if 0
|
|
||||||
void changeTutorialState(eTutorial_State newState, CXuiScene* scene = NULL);
|
|
||||||
#else
|
|
||||||
void changeTutorialState(eTutorial_State newState, UIScene* scene = NULL);
|
void changeTutorialState(eTutorial_State newState, UIScene* scene = NULL);
|
||||||
#endif
|
|
||||||
bool isSelectedItemState();
|
bool isSelectedItemState();
|
||||||
|
|
||||||
bool setMessage(PopupMessageDetails* message);
|
bool setMessage(PopupMessageDetails* message);
|
||||||
|
|
@ -198,11 +186,7 @@ public:
|
||||||
std::vector<TutorialTask*>* getTasks();
|
std::vector<TutorialTask*>* getTasks();
|
||||||
unsigned int getCurrentTaskIndex();
|
unsigned int getCurrentTaskIndex();
|
||||||
|
|
||||||
#if 0
|
|
||||||
CXuiScene* getScene() { return m_UIScene; }
|
|
||||||
#else
|
|
||||||
UIScene* getScene() { return m_UIScene; }
|
UIScene* getScene() { return m_UIScene; }
|
||||||
#endif
|
|
||||||
eTutorial_State getCurrentState() { return m_CurrentState; }
|
eTutorial_State getCurrentState() { return m_CurrentState; }
|
||||||
|
|
||||||
// These are required so that we have a consistent mapping of the completion
|
// These are required so that we have a consistent mapping of the completion
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,15 @@
|
||||||
#include "../../Minecraft.World/Platform/stdafx.h"
|
#include "../../Minecraft.World/Platform/stdafx.h"
|
||||||
#include "../../Minecraft.World/Items/ItemInstance.h"
|
#include "../../Minecraft.World/Items/ItemInstance.h"
|
||||||
#if !(0) && !(0)
|
|
||||||
#include "../UI/UI.h"
|
#include "../UI/UI.h"
|
||||||
#endif
|
|
||||||
#include "Tutorial.h"
|
#include "Tutorial.h"
|
||||||
#include "XuiCraftingTask.h"
|
#include "XuiCraftingTask.h"
|
||||||
|
|
||||||
bool XuiCraftingTask::isCompleted() {
|
bool XuiCraftingTask::isCompleted() {
|
||||||
#if 1
|
|
||||||
// This doesn't seem to work
|
// This doesn't seem to work
|
||||||
// IUIScene_CraftingMenu *craftScene =
|
// IUIScene_CraftingMenu *craftScene =
|
||||||
// reinterpret_cast<IUIScene_CraftingMenu *>(tutorial->getScene());
|
// reinterpret_cast<IUIScene_CraftingMenu *>(tutorial->getScene());
|
||||||
#if 0
|
|
||||||
CXuiSceneCraftingPanel* craftScene =
|
|
||||||
(CXuiSceneCraftingPanel*)(tutorial->getScene());
|
|
||||||
#else
|
|
||||||
UIScene_CraftingMenu* craftScene =
|
UIScene_CraftingMenu* craftScene =
|
||||||
reinterpret_cast<UIScene_CraftingMenu*>(tutorial->getScene());
|
reinterpret_cast<UIScene_CraftingMenu*>(tutorial->getScene());
|
||||||
#endif
|
|
||||||
|
|
||||||
bool completed = false;
|
bool completed = false;
|
||||||
|
|
||||||
|
|
@ -36,7 +28,4 @@ bool XuiCraftingTask::isCompleted() {
|
||||||
}
|
}
|
||||||
|
|
||||||
return completed;
|
return completed;
|
||||||
#else
|
|
||||||
return true;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -57,9 +57,6 @@ public:
|
||||||
|
|
||||||
virtual void HandleDLCMountingComplete() = 0;
|
virtual void HandleDLCMountingComplete() = 0;
|
||||||
virtual void HandleDLCInstalled(int iPad) = 0;
|
virtual void HandleDLCInstalled(int iPad) = 0;
|
||||||
#if 0
|
|
||||||
virtual void HandleDLCLicenseChange() = 0;
|
|
||||||
#endif
|
|
||||||
virtual void HandleTMSDLCFileRetrieved(int iPad) = 0;
|
virtual void HandleTMSDLCFileRetrieved(int iPad) = 0;
|
||||||
virtual void HandleTMSBanFileRetrieved(int iPad) = 0;
|
virtual void HandleTMSBanFileRetrieved(int iPad) = 0;
|
||||||
virtual void HandleInventoryUpdated(int iPad) = 0;
|
virtual void HandleInventoryUpdated(int iPad) = 0;
|
||||||
|
|
|
||||||
|
|
@ -9,9 +9,6 @@
|
||||||
#include "../../Minecraft.Client/Player/MultiPlayerLocalPlayer.h"
|
#include "../../Minecraft.Client/Player/MultiPlayerLocalPlayer.h"
|
||||||
#include "../../Minecraft.Client/Minecraft.h"
|
#include "../../Minecraft.Client/Minecraft.h"
|
||||||
|
|
||||||
#if 0
|
|
||||||
#include <pad.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
IUIScene_AbstractContainerMenu::IUIScene_AbstractContainerMenu() {
|
IUIScene_AbstractContainerMenu::IUIScene_AbstractContainerMenu() {
|
||||||
m_menu = NULL;
|
m_menu = NULL;
|
||||||
|
|
@ -65,23 +62,18 @@ void IUIScene_AbstractContainerMenu::Initialize(
|
||||||
m_bNavigateBack = bNavigateBack;
|
m_bNavigateBack = bNavigateBack;
|
||||||
|
|
||||||
// Put the pointer over first item in use row to start with.
|
// Put the pointer over first item in use row to start with.
|
||||||
#ifdef TAP_DETECTION
|
#if defined(TAP_DETECTION)
|
||||||
m_eCurrSection = firstSection;
|
m_eCurrSection = firstSection;
|
||||||
m_eCurrTapState = eTapStateNoInput;
|
m_eCurrTapState = eTapStateNoInput;
|
||||||
m_iCurrSlotX = 0;
|
m_iCurrSlotX = 0;
|
||||||
m_iCurrSlotY = 0;
|
m_iCurrSlotY = 0;
|
||||||
#endif // TAP_DETECTION
|
#endif
|
||||||
//
|
//
|
||||||
// for(int i=0;i<XUSER_MAX_COUNT;i++)
|
// for(int i=0;i<XUSER_MAX_COUNT;i++)
|
||||||
// {
|
// {
|
||||||
// m_bFirstTouchStored[i]=false;
|
// m_bFirstTouchStored[i]=false;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
#if 0
|
|
||||||
for (int i = 0; i < XUSER_MAX_COUNT; i++) {
|
|
||||||
m_bFirstTouchStored[i] = false;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
PlatformInitialize(iPad, startIndex);
|
PlatformInitialize(iPad, startIndex);
|
||||||
}
|
}
|
||||||
|
|
@ -148,7 +140,7 @@ void IUIScene_AbstractContainerMenu::updateSlotPosition(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TAP_DETECTION
|
#if defined(TAP_DETECTION)
|
||||||
IUIScene_AbstractContainerMenu::ETapState
|
IUIScene_AbstractContainerMenu::ETapState
|
||||||
IUIScene_AbstractContainerMenu::GetTapInputType(float fInputX, float fInputY) {
|
IUIScene_AbstractContainerMenu::GetTapInputType(float fInputX, float fInputY) {
|
||||||
if ((fabs(fInputX) < 0.3f) && (fabs(fInputY) < 0.3f)) {
|
if ((fabs(fInputX) < 0.3f) && (fabs(fInputY) < 0.3f)) {
|
||||||
|
|
@ -165,7 +157,7 @@ IUIScene_AbstractContainerMenu::GetTapInputType(float fInputX, float fInputY) {
|
||||||
return eTapNone;
|
return eTapNone;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // TAP_DETECTION
|
#endif
|
||||||
|
|
||||||
void IUIScene_AbstractContainerMenu::SetToolTip(EToolTipButton eButton,
|
void IUIScene_AbstractContainerMenu::SetToolTip(EToolTipButton eButton,
|
||||||
EToolTipItem eItem) {
|
EToolTipItem eItem) {
|
||||||
|
|
@ -255,78 +247,6 @@ void IUIScene_AbstractContainerMenu::onMouseTick() {
|
||||||
((float)app.GetGameSettings(iPad, eGameSetting_Sensitivity_InMenu) /
|
((float)app.GetGameSettings(iPad, eGameSetting_Sensitivity_InMenu) /
|
||||||
100.0f); // apply the sensitivity
|
100.0f); // apply the sensitivity
|
||||||
|
|
||||||
#if 0
|
|
||||||
// should have sensitivity for the touchpad
|
|
||||||
//(float)app.GetGameSettings(iPad,eGameSetting_Sensitivity_TouchPadInMenu)/100.0f
|
|
||||||
|
|
||||||
// get the touchpad input and treat it as a map to the window
|
|
||||||
ScePadTouchData* pTouchPadData = InputManager.GetTouchPadData(iPad);
|
|
||||||
|
|
||||||
// make sure the touchpad button isn't down (it's the pausemenu)
|
|
||||||
|
|
||||||
if ((!InputManager.ButtonDown(iPad, ACTION_MENU_TOUCHPAD_PRESS)) &&
|
|
||||||
(pTouchPadData->touchNum > 0)) {
|
|
||||||
if (m_bFirstTouchStored[iPad] == false) {
|
|
||||||
m_oldvTouchPos.x = (float)pTouchPadData->touch[0].x;
|
|
||||||
m_oldvTouchPos.y = (float)pTouchPadData->touch[0].y;
|
|
||||||
m_oldvPointerPos.x = vPointerPos.x;
|
|
||||||
m_oldvPointerPos.y = vPointerPos.y;
|
|
||||||
m_bFirstTouchStored[iPad] = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// should take the average of multiple touch points
|
|
||||||
|
|
||||||
float fNewX = (((float)pTouchPadData->touch[0].x) - m_oldvTouchPos.x) *
|
|
||||||
m_fTouchPadMulX;
|
|
||||||
float fNewY = (((float)pTouchPadData->touch[0].y) - m_oldvTouchPos.y) *
|
|
||||||
m_fTouchPadMulY;
|
|
||||||
// relative positions - needs a deadzone
|
|
||||||
|
|
||||||
if (fNewX > m_fTouchPadDeadZoneX) {
|
|
||||||
vPointerPos.x = m_oldvPointerPos.x +
|
|
||||||
((fNewX - m_fTouchPadDeadZoneX) *
|
|
||||||
((float)app.GetGameSettings(
|
|
||||||
iPad, eGameSetting_Sensitivity_InMenu) /
|
|
||||||
100.0f));
|
|
||||||
} else if (fNewX < -m_fTouchPadDeadZoneX) {
|
|
||||||
vPointerPos.x = m_oldvPointerPos.x +
|
|
||||||
((fNewX + m_fTouchPadDeadZoneX) *
|
|
||||||
((float)app.GetGameSettings(
|
|
||||||
iPad, eGameSetting_Sensitivity_InMenu) /
|
|
||||||
100.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fNewY > m_fTouchPadDeadZoneY) {
|
|
||||||
vPointerPos.y = m_oldvPointerPos.y +
|
|
||||||
((fNewY - m_fTouchPadDeadZoneY) *
|
|
||||||
((float)app.GetGameSettings(
|
|
||||||
iPad, eGameSetting_Sensitivity_InMenu) /
|
|
||||||
100.0f));
|
|
||||||
} else if (fNewY < -m_fTouchPadDeadZoneY) {
|
|
||||||
vPointerPos.y = m_oldvPointerPos.y +
|
|
||||||
((fNewY + m_fTouchPadDeadZoneY) *
|
|
||||||
((float)app.GetGameSettings(
|
|
||||||
iPad, eGameSetting_Sensitivity_InMenu) /
|
|
||||||
100.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Clamp to pointer extents.
|
|
||||||
if (vPointerPos.x < m_fPointerMinX)
|
|
||||||
vPointerPos.x = m_fPointerMinX;
|
|
||||||
else if (vPointerPos.x > m_fPointerMaxX)
|
|
||||||
vPointerPos.x = m_fPointerMaxX;
|
|
||||||
if (vPointerPos.y < m_fPointerMinY)
|
|
||||||
vPointerPos.y = m_fPointerMinY;
|
|
||||||
else if (vPointerPos.y > m_fPointerMaxY)
|
|
||||||
vPointerPos.y = m_fPointerMaxY;
|
|
||||||
|
|
||||||
bStickInput = true;
|
|
||||||
m_eCurrTapState = eTapStateNoInput;
|
|
||||||
} else {
|
|
||||||
// reset the touch flag
|
|
||||||
m_bFirstTouchStored[iPad] = false;
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// If there is any input on sticks, move the pointer.
|
// If there is any input on sticks, move the pointer.
|
||||||
if ((fabs(fInputX) >= 0.01f) || (fabs(fInputY) >= 0.01f)) {
|
if ((fabs(fInputX) >= 0.01f) || (fabs(fInputY) >= 0.01f)) {
|
||||||
|
|
@ -337,7 +257,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() {
|
||||||
: (fInputY < 0.0f) ? -1.0f
|
: (fInputY < 0.0f) ? -1.0f
|
||||||
: 0.0f;
|
: 0.0f;
|
||||||
|
|
||||||
#ifdef TAP_DETECTION
|
#if defined(TAP_DETECTION)
|
||||||
// Check for potential tap input to jump slot.
|
// Check for potential tap input to jump slot.
|
||||||
ETapState eNewTapInput = GetTapInputType(fInputX, fInputY);
|
ETapState eNewTapInput = GetTapInputType(fInputX, fInputY);
|
||||||
|
|
||||||
|
|
@ -363,7 +283,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() {
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif // TAP_DETECTION
|
#endif
|
||||||
|
|
||||||
// Square it so we get more precision for small inputs.
|
// Square it so we get more precision for small inputs.
|
||||||
fInputX = fInputX * fInputX * fInputDirX * POINTER_SPEED_FACTOR;
|
fInputX = fInputX * fInputX * fInputDirX * POINTER_SPEED_FACTOR;
|
||||||
|
|
@ -380,7 +300,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() {
|
||||||
fInputScale = ((float)(m_iConsectiveInputTicks) /
|
fInputScale = ((float)(m_iConsectiveInputTicks) /
|
||||||
(float)(MAX_INPUT_TICKS_FOR_SCALING));
|
(float)(MAX_INPUT_TICKS_FOR_SCALING));
|
||||||
}
|
}
|
||||||
#ifdef TAP_DETECTION
|
#if defined(TAP_DETECTION)
|
||||||
else if (m_iConsectiveInputTicks < MAX_INPUT_TICKS_FOR_TAPPING) {
|
else if (m_iConsectiveInputTicks < MAX_INPUT_TICKS_FOR_TAPPING) {
|
||||||
++m_iConsectiveInputTicks;
|
++m_iConsectiveInputTicks;
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -396,7 +316,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() {
|
||||||
fInputX *= fInputScale;
|
fInputX *= fInputScale;
|
||||||
fInputY *= fInputScale;
|
fInputY *= fInputScale;
|
||||||
|
|
||||||
#ifdef USE_POINTER_ACCEL
|
#if defined(USE_POINTER_ACCEL)
|
||||||
m_fPointerAccelX += fInputX / 50.0f;
|
m_fPointerAccelX += fInputX / 50.0f;
|
||||||
m_fPointerAccelY += fInputY / 50.0f;
|
m_fPointerAccelY += fInputY / 50.0f;
|
||||||
|
|
||||||
|
|
@ -436,7 +356,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() {
|
||||||
bStickInput = true;
|
bStickInput = true;
|
||||||
} else {
|
} else {
|
||||||
m_iConsectiveInputTicks = 0;
|
m_iConsectiveInputTicks = 0;
|
||||||
#ifdef USE_POINTER_ACCEL
|
#if defined(USE_POINTER_ACCEL)
|
||||||
m_fPointerVelX = 0.0f;
|
m_fPointerVelX = 0.0f;
|
||||||
m_fPointerVelY = 0.0f;
|
m_fPointerVelY = 0.0f;
|
||||||
m_fPointerAccelX = 0.0f;
|
m_fPointerAccelX = 0.0f;
|
||||||
|
|
@ -444,9 +364,6 @@ void IUIScene_AbstractContainerMenu::onMouseTick() {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Determine which slot the pointer is currently over.
|
// Determine which slot the pointer is currently over.
|
||||||
ESceneSection eSectionUnderPointer = eSectionNone;
|
ESceneSection eSectionUnderPointer = eSectionNone;
|
||||||
|
|
@ -549,7 +466,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() {
|
||||||
|
|
||||||
bPointerIsOverSlot = true;
|
bPointerIsOverSlot = true;
|
||||||
|
|
||||||
#ifdef TAP_DETECTION
|
#if defined(TAP_DETECTION)
|
||||||
// Have we actually changed slot? If so, input cannot be
|
// Have we actually changed slot? If so, input cannot be
|
||||||
// a tap.
|
// a tap.
|
||||||
if ((eSectionUnderPointer != m_eCurrSection) ||
|
if ((eSectionUnderPointer != m_eCurrSection) ||
|
||||||
|
|
@ -562,7 +479,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() {
|
||||||
m_eCurrSection = eSectionUnderPointer;
|
m_eCurrSection = eSectionUnderPointer;
|
||||||
m_iCurrSlotX = iNewSlotX;
|
m_iCurrSlotX = iNewSlotX;
|
||||||
m_iCurrSlotY = iNewSlotY;
|
m_iCurrSlotY = iNewSlotY;
|
||||||
#endif // TAP_DETECTION
|
#endif
|
||||||
// No need to check any further slots, the pointer can only ever be over
|
// No need to check any further slots, the pointer can only ever be over
|
||||||
// one.
|
// one.
|
||||||
break;
|
break;
|
||||||
|
|
@ -578,7 +495,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() {
|
||||||
// If we are not over any slot, set focus elsewhere.
|
// If we are not over any slot, set focus elsewhere.
|
||||||
if (eSectionUnderPointer == eSectionNone) {
|
if (eSectionUnderPointer == eSectionNone) {
|
||||||
setFocusToPointer(getPad());
|
setFocusToPointer(getPad());
|
||||||
#ifdef TAP_DETECTION
|
#if defined(TAP_DETECTION)
|
||||||
// Input cannot be a tap.
|
// Input cannot be a tap.
|
||||||
m_eCurrTapState = eTapNone;
|
m_eCurrTapState = eTapNone;
|
||||||
|
|
||||||
|
|
@ -586,7 +503,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() {
|
||||||
m_eCurrSection = eSectionNone;
|
m_eCurrSection = eSectionNone;
|
||||||
m_iCurrSlotX = -1;
|
m_iCurrSlotX = -1;
|
||||||
m_iCurrSlotY = -1;
|
m_iCurrSlotY = -1;
|
||||||
#endif // TAP_DETECTION
|
#endif
|
||||||
} else {
|
} else {
|
||||||
if (!bStickInput) {
|
if (!bStickInput) {
|
||||||
// Did we get a tap input?
|
// Did we get a tap input?
|
||||||
|
|
@ -848,11 +765,6 @@ void IUIScene_AbstractContainerMenu::onMouseTick() {
|
||||||
buttonX = eToolTipPickUpHalf;
|
buttonX = eToolTipPickUpHalf;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
if (!InputManager.IsVitaTV()) {
|
|
||||||
buttonBack = eToolTipWhatIsThis;
|
|
||||||
} else
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
buttonRT = eToolTipWhatIsThis;
|
buttonRT = eToolTipWhatIsThis;
|
||||||
}
|
}
|
||||||
|
|
@ -1180,11 +1092,7 @@ bool IUIScene_AbstractContainerMenu::handleKeyDown(int iPad, int iAction,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
ui.AnimateKeyPress(iPad, iAction);
|
|
||||||
#else
|
|
||||||
ui.AnimateKeyPress(iPad, iAction, bRepeat, true, false);
|
ui.AnimateKeyPress(iPad, iAction, bRepeat, true, false);
|
||||||
#endif
|
|
||||||
|
|
||||||
int buttonNum = 0; // 0 = LeftMouse, 1 = RightMouse
|
int buttonNum = 0; // 0 = LeftMouse, 1 = RightMouse
|
||||||
BOOL quickKeyHeld = FALSE; // Represents shift key on PC
|
BOOL quickKeyHeld = FALSE; // Represents shift key on PC
|
||||||
|
|
@ -1196,15 +1104,12 @@ bool IUIScene_AbstractContainerMenu::handleKeyDown(int iPad, int iAction,
|
||||||
// if(pMinecraft->player->GetXboxPad()!=pInputData->UserIndex) return S_OK;
|
// if(pMinecraft->player->GetXboxPad()!=pInputData->UserIndex) return S_OK;
|
||||||
|
|
||||||
switch (iAction) {
|
switch (iAction) {
|
||||||
#ifdef _DEBUG_MENUS_ENABLED
|
#if defined(_DEBUG_MENUS_ENABLED)
|
||||||
case ACTION_MENU_OTHER_STICK_PRESS:
|
case ACTION_MENU_OTHER_STICK_PRESS:
|
||||||
itemEditorKeyPress = TRUE;
|
itemEditorKeyPress = TRUE;
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case ACTION_MENU_A:
|
case ACTION_MENU_A:
|
||||||
#if 0
|
|
||||||
case ACTION_MENU_TOUCHPAD_PRESS:
|
|
||||||
#endif
|
|
||||||
if (!bRepeat) {
|
if (!bRepeat) {
|
||||||
validKeyPress = true;
|
validKeyPress = true;
|
||||||
|
|
||||||
|
|
@ -1357,7 +1262,7 @@ bool IUIScene_AbstractContainerMenu::handleKeyDown(int iPad, int iAction,
|
||||||
}
|
}
|
||||||
bHandled = true;
|
bHandled = true;
|
||||||
}
|
}
|
||||||
#ifdef _DEBUG_MENUS_ENABLED
|
#if defined(_DEBUG_MENUS_ENABLED)
|
||||||
else if (itemEditorKeyPress == TRUE) {
|
else if (itemEditorKeyPress == TRUE) {
|
||||||
if (IsSectionSlotList(m_eCurrSection)) {
|
if (IsSectionSlotList(m_eCurrSection)) {
|
||||||
ItemEditorInput* initData = new ItemEditorInput();
|
ItemEditorInput* initData = new ItemEditorInput();
|
||||||
|
|
|
||||||
|
|
@ -164,20 +164,6 @@ protected:
|
||||||
int m_iCurrSlotX;
|
int m_iCurrSlotX;
|
||||||
int m_iCurrSlotY;
|
int m_iCurrSlotY;
|
||||||
|
|
||||||
#if 0
|
|
||||||
bool
|
|
||||||
m_bFirstTouchStored[XUSER_MAX_COUNT]; // monitor the first position of
|
|
||||||
// a touch, so we can use
|
|
||||||
// relative distances of movement
|
|
||||||
UIVec2D m_oldvPointerPos;
|
|
||||||
UIVec2D m_oldvTouchPos;
|
|
||||||
// store the multipliers to map the UI window to the touchpad window
|
|
||||||
float m_fTouchPadMulX;
|
|
||||||
float m_fTouchPadMulY;
|
|
||||||
float m_fTouchPadDeadZoneX; // usese the multipliers
|
|
||||||
float m_fTouchPadDeadZoneY;
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ENum indexes of the first section for this scene, and 1+the last section
|
// ENum indexes of the first section for this scene, and 1+the last section
|
||||||
ESceneSection m_eFirstSection, m_eMaxSection;
|
ESceneSection m_eFirstSection, m_eMaxSection;
|
||||||
|
|
@ -216,7 +202,7 @@ protected:
|
||||||
ETapState eTapDirection, int* piTargetX,
|
ETapState eTapDirection, int* piTargetX,
|
||||||
int* piTargetY, int xOffset = 0, int yOffset = 0);
|
int* piTargetY, int xOffset = 0, int yOffset = 0);
|
||||||
|
|
||||||
#ifdef TAP_DETECTION
|
#if defined(TAP_DETECTION)
|
||||||
ETapState GetTapInputType(float fInputX, float fInputY);
|
ETapState GetTapInputType(float fInputX, float fInputY);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -166,9 +166,6 @@ bool IUIScene_CraftingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) {
|
||||||
bHandled = true;
|
bHandled = true;
|
||||||
break;
|
break;
|
||||||
case ACTION_MENU_A:
|
case ACTION_MENU_A:
|
||||||
#if 0
|
|
||||||
case ACTION_MENU_TOUCHPAD_PRESS:
|
|
||||||
#endif
|
|
||||||
// Do some crafting!
|
// Do some crafting!
|
||||||
if (m_pPlayer && m_pPlayer->inventory) {
|
if (m_pPlayer && m_pPlayer->inventory) {
|
||||||
// RecipyList *recipes = ((Recipes
|
// RecipyList *recipes = ((Recipes
|
||||||
|
|
@ -463,9 +460,6 @@ bool IUIScene_CraftingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) {
|
||||||
(!RenderManager.IsHiDef() && !RenderManager.IsWidescreen())) {
|
(!RenderManager.IsHiDef() && !RenderManager.IsWidescreen())) {
|
||||||
bNoScrollSlots = true;
|
bNoScrollSlots = true;
|
||||||
}
|
}
|
||||||
#if 0
|
|
||||||
bNoScrollSlots = true;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// 4J Stu - We did used to swap the thumsticks based on Southpaw in this
|
// 4J Stu - We did used to swap the thumsticks based on Southpaw in this
|
||||||
// scene, but ONLY in this scene
|
// scene, but ONLY in this scene
|
||||||
|
|
@ -855,7 +849,7 @@ void IUIScene_CraftingMenu::CheckRecipesAvailable() {
|
||||||
iHSlotBrushControl++;
|
iHSlotBrushControl++;
|
||||||
} else {
|
} else {
|
||||||
app.DebugPrintf("Need more H slots - ");
|
app.DebugPrintf("Need more H slots - ");
|
||||||
#ifndef _CONTENT_PACKAGE
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
OutputDebugStringW(
|
OutputDebugStringW(
|
||||||
app.GetString(pTempItemInst->getDescriptionId()));
|
app.GetString(pTempItemInst->getDescriptionId()));
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -1016,9 +1010,6 @@ void IUIScene_CraftingMenu::UpdateVerticalSlots() {
|
||||||
(!RenderManager.IsHiDef() && !RenderManager.IsWidescreen())) {
|
(!RenderManager.IsHiDef() && !RenderManager.IsWidescreen())) {
|
||||||
bNoScrollSlots = true;
|
bNoScrollSlots = true;
|
||||||
}
|
}
|
||||||
#if 0
|
|
||||||
bNoScrollSlots = true;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
for (int i = 0; i < iSlots; i++) {
|
for (int i = 0; i < iSlots; i++) {
|
||||||
// 4J this check determines if the crafting scene has only one
|
// 4J this check determines if the crafting scene has only one
|
||||||
|
|
@ -1305,7 +1296,7 @@ void IUIScene_CraftingMenu::UpdateDescriptionText(bool bCanBeMade) {
|
||||||
setDescriptionText(wsText.c_str());
|
setDescriptionText(wsText.c_str());
|
||||||
} else {
|
} else {
|
||||||
/// Missing string!
|
/// Missing string!
|
||||||
#ifdef _DEBUG
|
#if defined(_DEBUG)
|
||||||
setDescriptionText(
|
setDescriptionText(
|
||||||
L"This is some placeholder description text about the "
|
L"This is some placeholder description text about the "
|
||||||
L"craftable item.");
|
L"craftable item.");
|
||||||
|
|
|
||||||
|
|
@ -211,43 +211,8 @@ void IUIScene_CreativeMenu::staticCtor() {
|
||||||
ITEM_AUX(Tile::woolCarpet_Id, 13) // Green
|
ITEM_AUX(Tile::woolCarpet_Id, 13) // Green
|
||||||
ITEM_AUX(Tile::woolCarpet_Id, 12) // Brown
|
ITEM_AUX(Tile::woolCarpet_Id, 12) // Brown
|
||||||
|
|
||||||
#if 0
|
|
||||||
ITEM_AUX(Tile::stained_glass_Id,14) // Red
|
|
||||||
ITEM_AUX(Tile::stained_glass_Id,1) // Orange
|
|
||||||
ITEM_AUX(Tile::stained_glass_Id,4) // Yellow
|
|
||||||
ITEM_AUX(Tile::stained_glass_Id,5) // Lime
|
|
||||||
ITEM_AUX(Tile::stained_glass_Id,3) // Light Blue
|
|
||||||
ITEM_AUX(Tile::stained_glass_Id,9) // Cyan
|
|
||||||
ITEM_AUX(Tile::stained_glass_Id,11) // Blue
|
|
||||||
ITEM_AUX(Tile::stained_glass_Id,10) // Purple
|
|
||||||
ITEM_AUX(Tile::stained_glass_Id,2) // Magenta
|
|
||||||
ITEM_AUX(Tile::stained_glass_Id,6) // Pink
|
|
||||||
ITEM_AUX(Tile::stained_glass_Id,0) // White
|
|
||||||
ITEM_AUX(Tile::stained_glass_Id,8) // Light Gray
|
|
||||||
ITEM_AUX(Tile::stained_glass_Id,7) // Gray
|
|
||||||
ITEM_AUX(Tile::stained_glass_Id,15) // Black
|
|
||||||
ITEM_AUX(Tile::stained_glass_Id,13) // Green
|
|
||||||
ITEM_AUX(Tile::stained_glass_Id,12) // Brown
|
|
||||||
|
|
||||||
ITEM_AUX(Tile::stained_glass_pane_Id,14) // Red
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
ITEM_AUX(Tile::stained_glass_pane_Id,1) // Orange
|
|
||||||
ITEM_AUX(Tile::stained_glass_pane_Id,4) // Yellow
|
|
||||||
ITEM_AUX(Tile::stained_glass_pane_Id,5) // Lime
|
|
||||||
ITEM_AUX(Tile::stained_glass_pane_Id,3) // Light Blue
|
|
||||||
ITEM_AUX(Tile::stained_glass_pane_Id,9) // Cyan
|
|
||||||
ITEM_AUX(Tile::stained_glass_pane_Id,11) // Blue
|
|
||||||
ITEM_AUX(Tile::stained_glass_pane_Id,10) // Purple
|
|
||||||
ITEM_AUX(Tile::stained_glass_pane_Id,2) // Magenta
|
|
||||||
ITEM_AUX(Tile::stained_glass_pane_Id,6) // Pink
|
|
||||||
ITEM_AUX(Tile::stained_glass_pane_Id,0) // White
|
|
||||||
ITEM_AUX(Tile::stained_glass_pane_Id,8) // Light Gray
|
|
||||||
ITEM_AUX(Tile::stained_glass_pane_Id,7) // Gray
|
|
||||||
ITEM_AUX(Tile::stained_glass_pane_Id,15) // Black
|
|
||||||
ITEM_AUX(Tile::stained_glass_pane_Id,13) // Green
|
|
||||||
ITEM_AUX(Tile::stained_glass_pane_Id,12) // Brown
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _CONTENT_PACKAGE
|
|
||||||
DEF(eCreativeInventory_ArtToolsDecorations)
|
DEF(eCreativeInventory_ArtToolsDecorations)
|
||||||
if (app.DebugSettingsOn()) {
|
if (app.DebugSettingsOn()) {
|
||||||
for (unsigned int i = 0; i < Painting::LAST_VALUE; ++i) {
|
for (unsigned int i = 0; i < Painting::LAST_VALUE; ++i) {
|
||||||
|
|
@ -427,7 +392,7 @@ void IUIScene_CreativeMenu::staticCtor() {
|
||||||
BuildFirework(list, FireworksItem::TYPE_STAR, DyePowderItem::YELLOW, 2,
|
BuildFirework(list, FireworksItem::TYPE_STAR, DyePowderItem::YELLOW, 2,
|
||||||
false, true, DyePowderItem::ORANGE);
|
false, true, DyePowderItem::ORANGE);
|
||||||
|
|
||||||
#ifndef _CONTENT_PACKAGE
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
DEF(eCreativeInventory_ArtToolsMisc)
|
DEF(eCreativeInventory_ArtToolsMisc)
|
||||||
if (app.DebugSettingsOn()) {
|
if (app.DebugSettingsOn()) {
|
||||||
ITEM_AUX(Item::spawnEgg_Id,
|
ITEM_AUX(Item::spawnEgg_Id,
|
||||||
|
|
@ -543,7 +508,7 @@ void IUIScene_CreativeMenu::staticCtor() {
|
||||||
new EnchantmentInstance(enchantment, enchantment->getMaxLevel())));
|
new EnchantmentInstance(enchantment, enchantment->getMaxLevel())));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef _CONTENT_PACKAGE
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
if (app.DebugSettingsOn()) {
|
if (app.DebugSettingsOn()) {
|
||||||
std::shared_ptr<ItemInstance> debugSword =
|
std::shared_ptr<ItemInstance> debugSword =
|
||||||
std::shared_ptr<ItemInstance>(
|
std::shared_ptr<ItemInstance>(
|
||||||
|
|
@ -826,7 +791,7 @@ void IUIScene_CreativeMenu::staticCtor() {
|
||||||
specs[eCreativeInventoryTab_BuildingBlocks] = new TabSpec(
|
specs[eCreativeInventoryTab_BuildingBlocks] = new TabSpec(
|
||||||
L"Structures", IDS_GROUPNAME_BUILDING_BLOCKS, 1, blocksGroup);
|
L"Structures", IDS_GROUPNAME_BUILDING_BLOCKS, 1, blocksGroup);
|
||||||
|
|
||||||
#ifndef _CONTENT_PACKAGE
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
ECreative_Inventory_Groups decorationsGroup[] = {
|
ECreative_Inventory_Groups decorationsGroup[] = {
|
||||||
eCreativeInventory_Decoration};
|
eCreativeInventory_Decoration};
|
||||||
ECreative_Inventory_Groups debugDecorationsGroup[] = {
|
ECreative_Inventory_Groups debugDecorationsGroup[] = {
|
||||||
|
|
@ -880,7 +845,7 @@ void IUIScene_CreativeMenu::staticCtor() {
|
||||||
// potionsGroup);
|
// potionsGroup);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
#ifndef _CONTENT_PACKAGE
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
ECreative_Inventory_Groups miscGroup[] = {eCreativeInventory_Misc};
|
ECreative_Inventory_Groups miscGroup[] = {eCreativeInventory_Misc};
|
||||||
ECreative_Inventory_Groups debugMiscGroup[] = {
|
ECreative_Inventory_Groups debugMiscGroup[] = {
|
||||||
eCreativeInventory_ArtToolsMisc};
|
eCreativeInventory_ArtToolsMisc};
|
||||||
|
|
@ -1057,7 +1022,7 @@ void IUIScene_CreativeMenu::TabSpec::populateMenu(AbstractContainerMenu* menu,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef _CONTENT_PACKAGE
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
if (app.DebugArtToolsOn()) {
|
if (app.DebugArtToolsOn()) {
|
||||||
if (m_debugGroupsCount > 0) {
|
if (m_debugGroupsCount > 0) {
|
||||||
startIndex = 0;
|
startIndex = 0;
|
||||||
|
|
@ -1104,7 +1069,7 @@ void IUIScene_CreativeMenu::TabSpec::populateMenu(AbstractContainerMenu* menu,
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int IUIScene_CreativeMenu::TabSpec::getPageCount() {
|
unsigned int IUIScene_CreativeMenu::TabSpec::getPageCount() {
|
||||||
#ifndef _CONTENT_PACKAGE
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
if (app.DebugArtToolsOn()) {
|
if (app.DebugArtToolsOn()) {
|
||||||
return (int)ceil((float)(m_staticItems + m_debugItems) /
|
return (int)ceil((float)(m_staticItems + m_debugItems) /
|
||||||
m_staticPerPage);
|
m_staticPerPage);
|
||||||
|
|
|
||||||
|
|
@ -95,12 +95,6 @@ void IUIScene_EnchantingMenu::handleOtherClicked(int iPad,
|
||||||
int buttonNum, bool quickKey) {
|
int buttonNum, bool quickKey) {
|
||||||
int index = -1;
|
int index = -1;
|
||||||
// Old xui code
|
// Old xui code
|
||||||
#if 0
|
|
||||||
HXUIOBJ hFocusObject = GetFocus(iPad);
|
|
||||||
if(hFocusObject == m_enchant1->m_hObj) index = 0;
|
|
||||||
else if(hFocusObject == m_enchant2->m_hObj) index = 1;
|
|
||||||
else if(hFocusObject == m_enchant3->m_hObj) index = 2;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
switch (eSection) {
|
switch (eSection) {
|
||||||
case eSectionEnchantButton1:
|
case eSectionEnchantButton1:
|
||||||
|
|
|
||||||
|
|
@ -14,12 +14,8 @@
|
||||||
|
|
||||||
int IUIScene_PauseMenu::ExitGameDialogReturned(
|
int IUIScene_PauseMenu::ExitGameDialogReturned(
|
||||||
void* pParam, int iPad, C4JStorage::EMessageResult result) {
|
void* pParam, int iPad, C4JStorage::EMessageResult result) {
|
||||||
#if 0
|
|
||||||
IUIScene_PauseMenu* pScene = (IUIScene_PauseMenu*)pParam;
|
|
||||||
#else
|
|
||||||
IUIScene_PauseMenu* pScene = dynamic_cast<IUIScene_PauseMenu*>(
|
IUIScene_PauseMenu* pScene = dynamic_cast<IUIScene_PauseMenu*>(
|
||||||
ui.GetSceneFromCallbackId((std::size_t)pParam));
|
ui.GetSceneFromCallbackId((std::size_t)pParam));
|
||||||
#endif
|
|
||||||
|
|
||||||
// Results switched for this dialog
|
// Results switched for this dialog
|
||||||
if (result == C4JStorage::EMessage_ResultDecline) {
|
if (result == C4JStorage::EMessage_ResultDecline) {
|
||||||
|
|
@ -31,12 +27,8 @@ int IUIScene_PauseMenu::ExitGameDialogReturned(
|
||||||
|
|
||||||
int IUIScene_PauseMenu::ExitGameSaveDialogReturned(
|
int IUIScene_PauseMenu::ExitGameSaveDialogReturned(
|
||||||
void* pParam, int iPad, C4JStorage::EMessageResult result) {
|
void* pParam, int iPad, C4JStorage::EMessageResult result) {
|
||||||
#if 0
|
|
||||||
IUIScene_PauseMenu* pScene = (IUIScene_PauseMenu*)pParam;
|
|
||||||
#else
|
|
||||||
IUIScene_PauseMenu* pScene = dynamic_cast<IUIScene_PauseMenu*>(
|
IUIScene_PauseMenu* pScene = dynamic_cast<IUIScene_PauseMenu*>(
|
||||||
ui.GetSceneFromCallbackId((std::size_t)pParam));
|
ui.GetSceneFromCallbackId((std::size_t)pParam));
|
||||||
#endif
|
|
||||||
|
|
||||||
// Exit with or without saving
|
// Exit with or without saving
|
||||||
// Decline means save in this dialog
|
// Decline means save in this dialog
|
||||||
|
|
@ -56,21 +48,6 @@ int IUIScene_PauseMenu::ExitGameSaveDialogReturned(
|
||||||
->getDLCInfoParentPack(); // tPack->getDLCPack();
|
->getDLCInfoParentPack(); // tPack->getDLCPack();
|
||||||
if (!pDLCPack->hasPurchasedFile(DLCManager::e_DLCType_Texture,
|
if (!pDLCPack->hasPurchasedFile(DLCManager::e_DLCType_Texture,
|
||||||
L"")) {
|
L"")) {
|
||||||
#if 0
|
|
||||||
// upsell
|
|
||||||
ULONGLONG ullOfferID_Full;
|
|
||||||
// get the dlc texture pack
|
|
||||||
DLCTexturePack* pDLCTexPack = (DLCTexturePack*)tPack;
|
|
||||||
|
|
||||||
app.GetDLCFullOfferIDForPackID(
|
|
||||||
pDLCTexPack->getDLCParentPackId(), &ullOfferID_Full);
|
|
||||||
|
|
||||||
// tell sentient about the upsell of the full version of the
|
|
||||||
// skin pack
|
|
||||||
TelemetryManager->RecordUpsellPresented(
|
|
||||||
iPad, eSet_UpsellID_Texture_DLC,
|
|
||||||
ullOfferID_Full & 0xFFFFFFFF);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
unsigned int uiIDA[2];
|
unsigned int uiIDA[2];
|
||||||
uiIDA[0] = IDS_CONFIRM_OK;
|
uiIDA[0] = IDS_CONFIRM_OK;
|
||||||
|
|
@ -105,9 +82,6 @@ int IUIScene_PauseMenu::ExitGameSaveDialogReturned(
|
||||||
&IUIScene_PauseMenu::ExitGameAndSaveReturned, pParam);
|
&IUIScene_PauseMenu::ExitGameAndSaveReturned, pParam);
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
#if 0 || 0
|
|
||||||
StorageManager.SetSaveDisabled(false);
|
|
||||||
#endif
|
|
||||||
MinecraftServer::getInstance()->setSaveOnExit(true);
|
MinecraftServer::getInstance()->setSaveOnExit(true);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -132,12 +106,8 @@ int IUIScene_PauseMenu::ExitGameSaveDialogReturned(
|
||||||
int IUIScene_PauseMenu::ExitGameAndSaveReturned(
|
int IUIScene_PauseMenu::ExitGameAndSaveReturned(
|
||||||
void* pParam, int iPad, C4JStorage::EMessageResult result) {
|
void* pParam, int iPad, C4JStorage::EMessageResult result) {
|
||||||
// 4J-PB - we won't come in here if we have a trial texture pack
|
// 4J-PB - we won't come in here if we have a trial texture pack
|
||||||
#if 0
|
|
||||||
IUIScene_PauseMenu* pScene = (IUIScene_PauseMenu*)pParam;
|
|
||||||
#else
|
|
||||||
IUIScene_PauseMenu* pScene = dynamic_cast<IUIScene_PauseMenu*>(
|
IUIScene_PauseMenu* pScene = dynamic_cast<IUIScene_PauseMenu*>(
|
||||||
ui.GetSceneFromCallbackId((std::size_t)pParam));
|
ui.GetSceneFromCallbackId((std::size_t)pParam));
|
||||||
#endif
|
|
||||||
|
|
||||||
// results switched for this dialog
|
// results switched for this dialog
|
||||||
if (result == C4JStorage::EMessage_ResultDecline) {
|
if (result == C4JStorage::EMessage_ResultDecline) {
|
||||||
|
|
@ -146,9 +116,6 @@ int IUIScene_PauseMenu::ExitGameAndSaveReturned(
|
||||||
// StorageManager.GetSaveUniqueNumber(&saveOrCheckpointId);
|
// StorageManager.GetSaveUniqueNumber(&saveOrCheckpointId);
|
||||||
// SentientManager.RecordLevelSaveOrCheckpoint(ProfileManager.GetPrimaryPad(),
|
// SentientManager.RecordLevelSaveOrCheckpoint(ProfileManager.GetPrimaryPad(),
|
||||||
// saveOrCheckpointId);
|
// saveOrCheckpointId);
|
||||||
#if 0 || 0
|
|
||||||
StorageManager.SetSaveDisabled(false);
|
|
||||||
#endif
|
|
||||||
if (pScene) pScene->SetIgnoreInput(true);
|
if (pScene) pScene->SetIgnoreInput(true);
|
||||||
MinecraftServer::getInstance()->setSaveOnExit(true);
|
MinecraftServer::getInstance()->setSaveOnExit(true);
|
||||||
// flag a app action of exit game
|
// flag a app action of exit game
|
||||||
|
|
@ -183,20 +150,11 @@ int IUIScene_PauseMenu::ExitGameAndSaveReturned(
|
||||||
|
|
||||||
int IUIScene_PauseMenu::ExitGameDeclineSaveReturned(
|
int IUIScene_PauseMenu::ExitGameDeclineSaveReturned(
|
||||||
void* pParam, int iPad, C4JStorage::EMessageResult result) {
|
void* pParam, int iPad, C4JStorage::EMessageResult result) {
|
||||||
#if 0
|
|
||||||
IUIScene_PauseMenu* pScene = (IUIScene_PauseMenu*)pParam;
|
|
||||||
#else
|
|
||||||
IUIScene_PauseMenu* pScene = dynamic_cast<IUIScene_PauseMenu*>(
|
IUIScene_PauseMenu* pScene = dynamic_cast<IUIScene_PauseMenu*>(
|
||||||
ui.GetSceneFromCallbackId((std::size_t)pParam));
|
ui.GetSceneFromCallbackId((std::size_t)pParam));
|
||||||
#endif
|
|
||||||
|
|
||||||
// results switched for this dialog
|
// results switched for this dialog
|
||||||
if (result == C4JStorage::EMessage_ResultDecline) {
|
if (result == C4JStorage::EMessage_ResultDecline) {
|
||||||
#if 0 || 0
|
|
||||||
// Don't do this here, as it will still try and save some things even
|
|
||||||
// though it shouldn't!
|
|
||||||
// StorageManager.SetSaveDisabled(false);
|
|
||||||
#endif
|
|
||||||
if (pScene) pScene->SetIgnoreInput(true);
|
if (pScene) pScene->SetIgnoreInput(true);
|
||||||
MinecraftServer::getInstance()->setSaveOnExit(false);
|
MinecraftServer::getInstance()->setSaveOnExit(false);
|
||||||
// flag a app action of exit game
|
// flag a app action of exit game
|
||||||
|
|
@ -231,139 +189,8 @@ int IUIScene_PauseMenu::ExitGameDeclineSaveReturned(
|
||||||
|
|
||||||
int IUIScene_PauseMenu::WarningTrialTexturePackReturned(
|
int IUIScene_PauseMenu::WarningTrialTexturePackReturned(
|
||||||
void* pParam, int iPad, C4JStorage::EMessageResult result) {
|
void* pParam, int iPad, C4JStorage::EMessageResult result) {
|
||||||
#if 0 || 0 || 0
|
|
||||||
if (result == C4JStorage::EMessage_ResultAccept) {
|
|
||||||
if (!ProfileManager.IsSignedInLive(iPad)) {
|
|
||||||
// you're not signed in to PSN!
|
|
||||||
|
|
||||||
} else {
|
|
||||||
// 4J-PB - need to check this user can access the store
|
|
||||||
bool bContentRestricted;
|
|
||||||
ProfileManager.GetChatAndContentRestrictions(
|
|
||||||
iPad, true, NULL, &bContentRestricted, NULL);
|
|
||||||
if (bContentRestricted) {
|
|
||||||
unsigned int uiIDA[1];
|
|
||||||
uiIDA[0] = IDS_CONFIRM_OK;
|
|
||||||
ui.RequestAlertMessage(IDS_ONLINE_SERVICE_TITLE,
|
|
||||||
IDS_CONTENT_RESTRICTION, uiIDA, 1, iPad);
|
|
||||||
} else {
|
|
||||||
// need to get info on the pack to see if the user has already
|
|
||||||
// downloaded it
|
|
||||||
TexturePack* tPack =
|
|
||||||
Minecraft::GetInstance()->skins->getSelected();
|
|
||||||
DLCTexturePack* pDLCTexPack = (DLCTexturePack*)tPack;
|
|
||||||
|
|
||||||
// retrieve the store name for the skin pack
|
|
||||||
DLCPack* pDLCPack =
|
|
||||||
pDLCTexPack
|
|
||||||
->getDLCInfoParentPack(); // tPack->getDLCPack();
|
|
||||||
const char* pchPackName =
|
|
||||||
wstringtofilename(pDLCPack->getName());
|
|
||||||
app.DebugPrintf("Texture Pack - %s\n", pchPackName);
|
|
||||||
SONYDLC* pSONYDLCInfo = app.GetSONYDLCInfo((char*)pchPackName);
|
|
||||||
|
|
||||||
if (pSONYDLCInfo != NULL) {
|
|
||||||
char chName[42];
|
|
||||||
char chSkuID[SCE_NP_COMMERCE2_SKU_ID_LEN];
|
|
||||||
|
|
||||||
memset(chSkuID, 0, SCE_NP_COMMERCE2_SKU_ID_LEN);
|
|
||||||
// find the info on the skin pack
|
|
||||||
// we have to retrieve the skuid from the store info, it
|
|
||||||
// can't be hardcoded since Sony may change it. So we assume
|
|
||||||
// the first sku for the product is the one we want
|
|
||||||
#if 0
|
|
||||||
sprintf(chName, "%s", pSONYDLCInfo->chDLCKeyname);
|
|
||||||
#else
|
|
||||||
sprintf(chName, "%s-%s", app.GetCommerceCategory(),
|
|
||||||
pSONYDLCInfo->chDLCKeyname);
|
|
||||||
#endif
|
|
||||||
app.GetDLCSkuIDFromProductList(chName, chSkuID);
|
|
||||||
// 4J-PB - need to check for an empty store
|
|
||||||
#if 0 || 0 || 0
|
|
||||||
if (app.CheckForEmptyStore(iPad) == false)
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
if (app.DLCAlreadyPurchased(chSkuID)) {
|
|
||||||
app.DownloadAlreadyPurchased(chSkuID);
|
|
||||||
} else {
|
|
||||||
app.Checkout(chSkuID);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif //
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
IUIScene_PauseMenu* pScene = (IUIScene_PauseMenu*)pParam;
|
|
||||||
|
|
||||||
if (result == C4JStorage::EMessage_ResultAccept) {
|
|
||||||
if (ProfileManager.IsSignedIn(iPad)) {
|
|
||||||
if (ProfileManager.IsSignedInLive(iPad)) {
|
|
||||||
TexturePack* tPack =
|
|
||||||
Minecraft::GetInstance()->skins->getSelected();
|
|
||||||
// get the dlc texture pack
|
|
||||||
DLCTexturePack* pDLCTexPack = (DLCTexturePack*)tPack;
|
|
||||||
|
|
||||||
DLCPack* pDLCPack = pDLCTexPack->getDLCInfoParentPack();
|
|
||||||
|
|
||||||
DLC_INFO* pDLCInfo = app.GetDLCInfoForProductName(
|
|
||||||
const_cast<wchar_t*>(pDLCPack->getName().c_str()));
|
|
||||||
|
|
||||||
StorageManager.InstallOffer(
|
|
||||||
1, const_cast<wchar_t*>(pDLCInfo->wsProductId.c_str()),
|
|
||||||
NULL, NULL);
|
|
||||||
|
|
||||||
// the license change coming in when the offer has been
|
|
||||||
// installed will cause this scene to refresh
|
|
||||||
} else {
|
|
||||||
// 4J-JEV: Fix for XB1: #165863 - XR-074: Compliance: With no
|
|
||||||
// active network connection user is unable to convert from
|
|
||||||
// Trial to Full texture pack and is not messaged why.
|
|
||||||
unsigned int uiIDA[1] = {IDS_CONFIRM_OK};
|
|
||||||
ui.RequestErrorMessage(IDS_PRO_NOTONLINE_TITLE,
|
|
||||||
IDS_PRO_NOTONLINE_TEXT, uiIDA, 1,
|
|
||||||
iPad);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
IUIScene_PauseMenu* pScene = (IUIScene_PauseMenu*)pParam;
|
|
||||||
|
|
||||||
// pScene->m_bIgnoreInput = false;
|
|
||||||
pScene->ShowScene(true);
|
|
||||||
if (result == C4JStorage::EMessage_ResultAccept) {
|
|
||||||
if (ProfileManager.IsSignedIn(iPad)) {
|
|
||||||
ULONGLONG ullIndexA[1];
|
|
||||||
|
|
||||||
TexturePack* tPack = Minecraft::GetInstance()->skins->getSelected();
|
|
||||||
// get the dlc texture pack
|
|
||||||
DLCTexturePack* pDLCTexPack = (DLCTexturePack*)tPack;
|
|
||||||
|
|
||||||
// Need to get the parent packs id, since this may be one of many
|
|
||||||
// child packs with their own ids
|
|
||||||
app.GetDLCFullOfferIDForPackID(pDLCTexPack->getDLCParentPackId(),
|
|
||||||
&ullIndexA[0]);
|
|
||||||
|
|
||||||
// need to allow downloads here, or the player would need to quit
|
|
||||||
// the game to let the download of a texture pack happen. This might
|
|
||||||
// affect the network traffic, since the download could take all the
|
|
||||||
// bandwidth...
|
|
||||||
XBackgroundDownloadSetMode(XBACKGROUND_DOWNLOAD_MODE_ALWAYS_ALLOW);
|
|
||||||
|
|
||||||
StorageManager.InstallOffer(1, ullIndexA, NULL, NULL);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
TelemetryManager->RecordUpsellResponded(
|
|
||||||
iPad, eSet_UpsellID_Texture_DLC,
|
|
||||||
(pScene->m_pDLCPack->getPurchaseOfferId() & 0xFFFFFFFF),
|
|
||||||
eSen_UpsellOutcome_Declined);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
@ -400,10 +227,6 @@ int IUIScene_PauseMenu::SaveWorldThreadProc(void* lpParameter) {
|
||||||
if (!MinecraftServer::serverHalted() && !app.GetChangingSessionType())
|
if (!MinecraftServer::serverHalted() && !app.GetChangingSessionType())
|
||||||
app.SetGameStarted(true);
|
app.SetGameStarted(true);
|
||||||
|
|
||||||
#if 0 || 0
|
|
||||||
if (app.GetGameHostOption(eGameHostOption_DisableSaving))
|
|
||||||
StorageManager.SetSaveDisabled(true);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT hr = S_OK;
|
HRESULT hr = S_OK;
|
||||||
|
|
@ -459,38 +282,12 @@ void IUIScene_PauseMenu::_ExitWorld(void* lpParameter) {
|
||||||
IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_SINGLE_LOCAL;
|
IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_SINGLE_LOCAL;
|
||||||
exitReasonTitleId = IDS_CONNECTION_FAILED;
|
exitReasonTitleId = IDS_CONNECTION_FAILED;
|
||||||
break;
|
break;
|
||||||
#if 0 || 0
|
|
||||||
case DisconnectPacket::
|
|
||||||
eDisconnect_ContentRestricted_AllLocal:
|
|
||||||
exitReasonStringId =
|
|
||||||
IDS_CONTENT_RESTRICTION_MULTIPLAYER;
|
|
||||||
exitReasonTitleId = IDS_CONNECTION_FAILED;
|
|
||||||
break;
|
|
||||||
case DisconnectPacket::
|
|
||||||
eDisconnect_ContentRestricted_Single_Local:
|
|
||||||
exitReasonStringId = IDS_CONTENT_RESTRICTION;
|
|
||||||
exitReasonTitleId = IDS_CONNECTION_FAILED;
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
#if 0
|
|
||||||
case DisconnectPacket::eDisconnect_NoUGC_Remote:
|
|
||||||
exitReasonStringId =
|
|
||||||
IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_REMOTE;
|
|
||||||
exitReasonTitleId = IDS_CONNECTION_FAILED;
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
case DisconnectPacket::eDisconnect_NoFlying:
|
case DisconnectPacket::eDisconnect_NoFlying:
|
||||||
exitReasonStringId = IDS_DISCONNECTED_FLYING;
|
exitReasonStringId = IDS_DISCONNECTED_FLYING;
|
||||||
break;
|
break;
|
||||||
case DisconnectPacket::eDisconnect_Quitting:
|
case DisconnectPacket::eDisconnect_Quitting:
|
||||||
exitReasonStringId = IDS_DISCONNECTED_SERVER_QUIT;
|
exitReasonStringId = IDS_DISCONNECTED_SERVER_QUIT;
|
||||||
break;
|
break;
|
||||||
#if 0
|
|
||||||
case DisconnectPacket::eDisconnect_NetworkError:
|
|
||||||
exitReasonStringId = IDS_ERROR_NETWORK_EXIT;
|
|
||||||
exitReasonTitleId = IDS_ERROR_NETWORK_TITLE;
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
case DisconnectPacket::eDisconnect_NoFriendsInGame:
|
case DisconnectPacket::eDisconnect_NoFriendsInGame:
|
||||||
exitReasonStringId =
|
exitReasonStringId =
|
||||||
IDS_DISCONNECTED_NO_FRIENDS_IN_GAME;
|
IDS_DISCONNECTED_NO_FRIENDS_IN_GAME;
|
||||||
|
|
@ -516,19 +313,7 @@ void IUIScene_PauseMenu::_ExitWorld(void* lpParameter) {
|
||||||
exitReasonStringId = IDS_DISCONNECTED_SERVER_FULL;
|
exitReasonStringId = IDS_DISCONNECTED_SERVER_FULL;
|
||||||
exitReasonTitleId = IDS_CANTJOIN_TITLE;
|
exitReasonTitleId = IDS_CANTJOIN_TITLE;
|
||||||
break;
|
break;
|
||||||
#if 0
|
|
||||||
case DisconnectPacket::eDisconnect_ExitedGame:
|
|
||||||
exitReasonTitleId = IDS_EXIT_GAME;
|
|
||||||
exitReasonStringId = IDS_DISCONNECTED_EXITED_GAME;
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if 0 || 0 || 0
|
|
||||||
case DisconnectPacket::eDisconnect_NATMismatch:
|
|
||||||
exitReasonStringId = IDS_DISCONNECTED_NAT_TYPE_MISMATCH;
|
|
||||||
exitReasonTitleId = IDS_CONNECTION_FAILED;
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
default:
|
default:
|
||||||
exitReasonStringId = IDS_CONNECTION_LOST_SERVER;
|
exitReasonStringId = IDS_CONNECTION_LOST_SERVER;
|
||||||
}
|
}
|
||||||
|
|
@ -598,33 +383,9 @@ void IUIScene_PauseMenu::_ExitWorld(void* lpParameter) {
|
||||||
IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_SINGLE_LOCAL;
|
IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_SINGLE_LOCAL;
|
||||||
exitReasonTitleId = IDS_CONNECTION_FAILED;
|
exitReasonTitleId = IDS_CONNECTION_FAILED;
|
||||||
break;
|
break;
|
||||||
#if 0 || 0
|
|
||||||
case DisconnectPacket::eDisconnect_ContentRestricted_AllLocal:
|
|
||||||
exitReasonStringId = IDS_CONTENT_RESTRICTION_MULTIPLAYER;
|
|
||||||
exitReasonTitleId = IDS_CONNECTION_FAILED;
|
|
||||||
break;
|
|
||||||
case DisconnectPacket::
|
|
||||||
eDisconnect_ContentRestricted_Single_Local:
|
|
||||||
exitReasonStringId = IDS_CONTENT_RESTRICTION;
|
|
||||||
exitReasonTitleId = IDS_CONNECTION_FAILED;
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
#if 0
|
|
||||||
case DisconnectPacket::eDisconnect_NoUGC_Remote:
|
|
||||||
exitReasonStringId =
|
|
||||||
IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_REMOTE;
|
|
||||||
exitReasonTitleId = IDS_CONNECTION_FAILED;
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
case DisconnectPacket::eDisconnect_Quitting:
|
case DisconnectPacket::eDisconnect_Quitting:
|
||||||
exitReasonStringId = IDS_DISCONNECTED_SERVER_QUIT;
|
exitReasonStringId = IDS_DISCONNECTED_SERVER_QUIT;
|
||||||
break;
|
break;
|
||||||
#if 0
|
|
||||||
case DisconnectPacket::eDisconnect_NetworkError:
|
|
||||||
exitReasonStringId = IDS_ERROR_NETWORK_EXIT;
|
|
||||||
exitReasonTitleId = IDS_ERROR_NETWORK_TITLE;
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
case DisconnectPacket::eDisconnect_NoMultiplayerPrivilegesJoin:
|
case DisconnectPacket::eDisconnect_NoMultiplayerPrivilegesJoin:
|
||||||
exitReasonStringId = IDS_NO_MULTIPLAYER_PRIVILEGE_JOIN_TEXT;
|
exitReasonStringId = IDS_NO_MULTIPLAYER_PRIVILEGE_JOIN_TEXT;
|
||||||
break;
|
break;
|
||||||
|
|
@ -640,12 +401,6 @@ void IUIScene_PauseMenu::_ExitWorld(void* lpParameter) {
|
||||||
exitReasonStringId = IDS_DISCONNECTED_SERVER_FULL;
|
exitReasonStringId = IDS_DISCONNECTED_SERVER_FULL;
|
||||||
exitReasonTitleId = IDS_CANTJOIN_TITLE;
|
exitReasonTitleId = IDS_CANTJOIN_TITLE;
|
||||||
break;
|
break;
|
||||||
#if 0 || 0 || 0
|
|
||||||
case DisconnectPacket::eDisconnect_NATMismatch:
|
|
||||||
exitReasonStringId = IDS_DISCONNECTED_NAT_TYPE_MISMATCH;
|
|
||||||
exitReasonTitleId = IDS_CONNECTION_FAILED;
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
default:
|
default:
|
||||||
exitReasonStringId = IDS_DISCONNECTED;
|
exitReasonStringId = IDS_DISCONNECTED;
|
||||||
}
|
}
|
||||||
|
|
@ -690,27 +445,14 @@ void IUIScene_PauseMenu::_ExitWorld(void* lpParameter) {
|
||||||
app.SetReallyChangingSessionType(false);
|
app.SetReallyChangingSessionType(false);
|
||||||
pMinecraft->exitingWorldRightNow = false;
|
pMinecraft->exitingWorldRightNow = false;
|
||||||
|
|
||||||
#if 0 || 0
|
|
||||||
// Make sure we don't think saving is disabled in the menus
|
|
||||||
StorageManager.SetSaveDisabled(false);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int IUIScene_PauseMenu::SaveGameDialogReturned(
|
int IUIScene_PauseMenu::SaveGameDialogReturned(
|
||||||
void* pParam, int iPad, C4JStorage::EMessageResult result) {
|
void* pParam, int iPad, C4JStorage::EMessageResult result) {
|
||||||
// results switched for this dialog
|
// results switched for this dialog
|
||||||
if (result == C4JStorage::EMessage_ResultDecline) {
|
if (result == C4JStorage::EMessage_ResultDecline) {
|
||||||
#if 0 || 0
|
|
||||||
unsigned int uiIDA[2];
|
|
||||||
uiIDA[0] = IDS_CONFIRM_CANCEL;
|
|
||||||
uiIDA[1] = IDS_CONFIRM_OK;
|
|
||||||
ui.RequestAlertMessage(
|
|
||||||
IDS_TITLE_ENABLE_AUTOSAVE, IDS_CONFIRM_ENABLE_AUTOSAVE, uiIDA, 2,
|
|
||||||
iPad, &IUIScene_PauseMenu::EnableAutosaveDialogReturned, pParam);
|
|
||||||
#else
|
|
||||||
// flag a app action of save game
|
// flag a app action of save game
|
||||||
app.SetAction(iPad, eAppAction_SaveGame);
|
app.SetAction(iPad, eAppAction_SaveGame);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -50,16 +50,8 @@ void IUIScene_StartGame::HandleDLCMountingComplete() {
|
||||||
|
|
||||||
for (unsigned int i = 0; i < app.GetDLCInfoTexturesOffersCount(); ++i) {
|
for (unsigned int i = 0; i < app.GetDLCInfoTexturesOffersCount(); ++i) {
|
||||||
bTexturePackAlreadyListed = false;
|
bTexturePackAlreadyListed = false;
|
||||||
#if 0 || 0 || 0
|
|
||||||
char* pchName = app.GetDLCInfoTextures(i);
|
|
||||||
pDLCInfo = app.GetDLCInfo(pchName);
|
|
||||||
#elif 0
|
|
||||||
pDLCInfo = app.GetDLCInfoForFullOfferID(
|
|
||||||
const_cast<wchar_t*>(app.GetDLCInfoTexturesFullOffer(i).c_str()));
|
|
||||||
#else
|
|
||||||
ULONGLONG ull = app.GetDLCInfoTexturesFullOffer(i);
|
ULONGLONG ull = app.GetDLCInfoTexturesFullOffer(i);
|
||||||
pDLCInfo = app.GetDLCInfoForFullOfferID(ull);
|
pDLCInfo = app.GetDLCInfoForFullOfferID(ull);
|
||||||
#endif
|
|
||||||
for (unsigned int i = 0; i < texturePacksCount; ++i) {
|
for (unsigned int i = 0; i < texturePacksCount; ++i) {
|
||||||
TexturePack* tp = pMinecraft->skins->getTexturePackByIndex(i);
|
TexturePack* tp = pMinecraft->skins->getTexturePackByIndex(i);
|
||||||
if (pDLCInfo->iConfig == tp->getDLCParentPackId()) {
|
if (pDLCInfo->iConfig == tp->getDLCParentPackId()) {
|
||||||
|
|
@ -257,32 +249,11 @@ int IUIScene_StartGame::UnlockTexturePackReturned(
|
||||||
|
|
||||||
if (result == C4JStorage::EMessage_ResultAccept) {
|
if (result == C4JStorage::EMessage_ResultAccept) {
|
||||||
if (ProfileManager.IsSignedIn(iPad)) {
|
if (ProfileManager.IsSignedIn(iPad)) {
|
||||||
#if 0 //|| 0
|
|
||||||
ULONGLONG ullIndexA[1];
|
|
||||||
DLC_INFO* pDLCInfo = app.GetDLCInfoForTrialOfferID(
|
|
||||||
pScene->m_pDLCPack->getPurchaseOfferId());
|
|
||||||
|
|
||||||
if (pDLCInfo != NULL) {
|
|
||||||
ullIndexA[0] = pDLCInfo->ullOfferID_Full;
|
|
||||||
} else {
|
|
||||||
ullIndexA[0] = pScene->m_pDLCPack->getPurchaseOfferId();
|
|
||||||
}
|
|
||||||
|
|
||||||
StorageManager.InstallOffer(1, ullIndexA, NULL, NULL);
|
|
||||||
#elif 0
|
|
||||||
// StorageManager.InstallOffer(1,StorageManager.GetOffer(iIndex).wszProductID,NULL,NULL);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// the license change coming in when the offer has been installed
|
// the license change coming in when the offer has been installed
|
||||||
// will cause this scene to refresh
|
// will cause this scene to refresh
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
#if 0
|
|
||||||
TelemetryManager->RecordUpsellResponded(
|
|
||||||
iPad, eSet_UpsellID_Texture_DLC,
|
|
||||||
(pScene->m_pDLCPack->getPurchaseOfferId() & 0xFFFFFFFF),
|
|
||||||
eSen_UpsellOutcome_Declined);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pScene->m_bIgnoreInput = false;
|
pScene->m_bIgnoreInput = false;
|
||||||
|
|
@ -294,64 +265,6 @@ int IUIScene_StartGame::TexturePackDialogReturned(
|
||||||
void* pParam, int iPad, C4JStorage::EMessageResult result) {
|
void* pParam, int iPad, C4JStorage::EMessageResult result) {
|
||||||
IUIScene_StartGame* pClass = (IUIScene_StartGame*)pParam;
|
IUIScene_StartGame* pClass = (IUIScene_StartGame*)pParam;
|
||||||
|
|
||||||
#if 0
|
|
||||||
// Exit with or without saving
|
|
||||||
// Decline means install full version of the texture pack in this dialog
|
|
||||||
if (result == C4JStorage::EMessage_ResultDecline ||
|
|
||||||
result == C4JStorage::EMessage_ResultAccept) {
|
|
||||||
// we need to enable background downloading for the DLC
|
|
||||||
XBackgroundDownloadSetMode(XBACKGROUND_DOWNLOAD_MODE_ALWAYS_ALLOW);
|
|
||||||
|
|
||||||
ULONGLONG ullOfferID_Full;
|
|
||||||
ULONGLONG ullIndexA[1];
|
|
||||||
CXuiCtrl4JList::LIST_ITEM_INFO ListItem;
|
|
||||||
// get the current index of the list, and then get the data
|
|
||||||
ListItem = pClass->m_pTexturePacksList->GetData(
|
|
||||||
pClass->m_currentTexturePackIndex);
|
|
||||||
app.GetDLCFullOfferIDForPackID(ListItem.iData, &ullOfferID_Full);
|
|
||||||
|
|
||||||
if (result == C4JStorage::EMessage_ResultAccept) // Full version
|
|
||||||
{
|
|
||||||
ullIndexA[0] = ullOfferID_Full;
|
|
||||||
StorageManager.InstallOffer(1, ullIndexA, NULL, NULL);
|
|
||||||
|
|
||||||
} else // trial version
|
|
||||||
{
|
|
||||||
// if there is no trial version, this is a Cancel
|
|
||||||
DLC_INFO* pDLCInfo = app.GetDLCInfoForFullOfferID(ullOfferID_Full);
|
|
||||||
if (pDLCInfo->ullOfferID_Trial != 0LL) {
|
|
||||||
ullIndexA[0] = pDLCInfo->ullOfferID_Trial;
|
|
||||||
StorageManager.InstallOffer(1, ullIndexA, NULL, NULL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#elif 0
|
|
||||||
// Get the product id from the texture pack id
|
|
||||||
if (result == C4JStorage::EMessage_ResultAccept) {
|
|
||||||
if (ProfileManager.IsSignedIn(iPad)) {
|
|
||||||
if (ProfileManager.IsSignedInLive(iPad)) {
|
|
||||||
std::wstring ProductId;
|
|
||||||
app.GetDLCFullOfferIDForPackID(
|
|
||||||
pClass->m_MoreOptionsParams.dwTexturePack, ProductId);
|
|
||||||
|
|
||||||
StorageManager.InstallOffer(
|
|
||||||
1, const_cast<wchar_t*>(ProductId.c_str()), NULL, NULL);
|
|
||||||
|
|
||||||
// the license change coming in when the offer has been
|
|
||||||
// installed will cause this scene to refresh
|
|
||||||
} else {
|
|
||||||
// 4J-JEV: Fix for XB1: #165863 - XR-074: Compliance: With no
|
|
||||||
// active network connection user is unable to convert from
|
|
||||||
// Trial to Full texture pack and is not messaged why.
|
|
||||||
unsigned int uiIDA[1] = {IDS_CONFIRM_OK};
|
|
||||||
ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE,
|
|
||||||
IDS_PRO_NOTONLINE_TEXT, uiIDA, 1,
|
|
||||||
iPad, NULL, NULL, app.GetStringTable());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
pClass->m_bIgnoreInput = false;
|
pClass->m_bIgnoreInput = false;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -53,9 +53,6 @@ bool IUIScene_TradingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) {
|
||||||
handled = true;
|
handled = true;
|
||||||
break;
|
break;
|
||||||
case ACTION_MENU_A:
|
case ACTION_MENU_A:
|
||||||
#if 0
|
|
||||||
case ACTION_MENU_TOUCHPAD_PRESS:
|
|
||||||
#endif
|
|
||||||
if (!m_activeOffers.empty()) {
|
if (!m_activeOffers.empty()) {
|
||||||
int selectedShopItem = (m_selectedSlot + m_offersStartIndex);
|
int selectedShopItem = (m_selectedSlot + m_offersStartIndex);
|
||||||
if (selectedShopItem < m_activeOffers.size()) {
|
if (selectedShopItem < m_activeOffers.size()) {
|
||||||
|
|
|
||||||
|
|
@ -38,9 +38,6 @@
|
||||||
#include "UIControl_SpaceIndicatorBar.h"
|
#include "UIControl_SpaceIndicatorBar.h"
|
||||||
#include "UIControl_BeaconEffectButton.h"
|
#include "UIControl_BeaconEffectButton.h"
|
||||||
|
|
||||||
#if 0
|
|
||||||
#include "UIControl_Touch.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "UIScene_HUD.h"
|
#include "UIScene_HUD.h"
|
||||||
#include "UIComponent_Panorama.h"
|
#include "UIComponent_Panorama.h"
|
||||||
|
|
@ -117,9 +114,6 @@
|
||||||
#include "UIScene_InGameInfoMenu.h"
|
#include "UIScene_InGameInfoMenu.h"
|
||||||
#include "UIScene_InGameHostOptionsMenu.h"
|
#include "UIScene_InGameHostOptionsMenu.h"
|
||||||
#include "UIScene_InGamePlayerOptionsMenu.h"
|
#include "UIScene_InGamePlayerOptionsMenu.h"
|
||||||
#if 0 || 0
|
|
||||||
#include "UIScene_InGameSaveManagementMenu.h"
|
|
||||||
#endif
|
|
||||||
#include "UIScene_TeleportMenu.h"
|
#include "UIScene_TeleportMenu.h"
|
||||||
#include "UIScene_EndPoem.h"
|
#include "UIScene_EndPoem.h"
|
||||||
#include "UIScene_EULA.h"
|
#include "UIScene_EULA.h"
|
||||||
|
|
|
||||||
|
|
@ -12,17 +12,7 @@ UIComponent_DebugUIMarketingGuide::UIComponent_DebugUIMarketingGuide(
|
||||||
IggyDataValue value[1];
|
IggyDataValue value[1];
|
||||||
value[0].type = IGGY_DATATYPE_number;
|
value[0].type = IGGY_DATATYPE_number;
|
||||||
value[0].number = (F64)0; // WIN64
|
value[0].number = (F64)0; // WIN64
|
||||||
#if 0
|
#if defined(_WINDOWS64) || defined(__linux__)
|
||||||
value[0].number = (F64)1;
|
|
||||||
#elif 0
|
|
||||||
value[0].number = (F64)2;
|
|
||||||
#elif 0
|
|
||||||
value[0].number = (F64)3;
|
|
||||||
#elif 0
|
|
||||||
value[0].number = (F64)4;
|
|
||||||
#elif 0
|
|
||||||
value[0].number = (F64)5;
|
|
||||||
#elif defined _WINDOWS64 || defined __linux__
|
|
||||||
value[0].number = (F64)0;
|
value[0].number = (F64)0;
|
||||||
#endif
|
#endif
|
||||||
IggyResult out = IggyPlayerCallMethodRS(getMovie(), &result,
|
IggyResult out = IggyPlayerCallMethodRS(getMovie(), &result,
|
||||||
|
|
|
||||||
|
|
@ -24,21 +24,7 @@ UIComponent_PressStartToPlay::UIComponent_PressStartToPlay(int iPad,
|
||||||
|
|
||||||
// 4J-JEV: This object is persistent, so this string needs to be able to
|
// 4J-JEV: This object is persistent, so this string needs to be able to
|
||||||
// handle language changes.
|
// handle language changes.
|
||||||
#if 0
|
|
||||||
m_labelPressStart.init((UIString)[] {
|
|
||||||
return replaceAll(app.GetString(IDS_PRESS_X_TO_JOIN),
|
|
||||||
L"{*CONTROLLER_VK_A*}",
|
|
||||||
app.GetVKReplacement(VK_PAD_A));
|
|
||||||
});
|
|
||||||
#elif 0
|
|
||||||
m_labelPressStart.init((UIString)[] {
|
|
||||||
return replaceAll(app.GetString(IDS_PRESS_START_TO_JOIN),
|
|
||||||
L"{*CONTROLLER_VK_START*}",
|
|
||||||
app.GetVKReplacement(VK_PAD_START));
|
|
||||||
});
|
|
||||||
#else
|
|
||||||
m_labelPressStart.init(IDS_PRESS_START_TO_JOIN);
|
m_labelPressStart.init(IDS_PRESS_START_TO_JOIN);
|
||||||
#endif
|
|
||||||
|
|
||||||
m_controlSaveIcon.setVisible(false);
|
m_controlSaveIcon.setVisible(false);
|
||||||
m_controlPressStartPanel.setVisible(false);
|
m_controlPressStartPanel.setVisible(false);
|
||||||
|
|
@ -148,13 +134,5 @@ void UIComponent_PressStartToPlay::showSaveIcon(bool show) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void UIComponent_PressStartToPlay::showPlayerDisplayName(bool show) {
|
void UIComponent_PressStartToPlay::showPlayerDisplayName(bool show) {
|
||||||
#if 0
|
|
||||||
if (show) {
|
|
||||||
m_playerDisplayName.setLabel(
|
|
||||||
ProfileManager.GetDisplayName(ProfileManager.GetPrimaryPad()));
|
|
||||||
}
|
|
||||||
m_playerDisplayName.setVisible(show);
|
|
||||||
#else
|
|
||||||
m_playerDisplayName.setVisible(false);
|
m_playerDisplayName.setVisible(false);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
@ -13,24 +13,7 @@ UIComponent_Tooltips::UIComponent_Tooltips(int iPad, void* initData,
|
||||||
// Setup all the Iggy references we need for this scene
|
// Setup all the Iggy references we need for this scene
|
||||||
initialiseMovie();
|
initialiseMovie();
|
||||||
|
|
||||||
#if 0
|
|
||||||
// initialise vita touch controls with ids
|
|
||||||
for (unsigned int i = 0; i < ETouchInput_Count; ++i) {
|
|
||||||
m_TouchController[i].init(i);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if 0 || 0 || 0
|
|
||||||
if (InputManager.IsCircleCrossSwapped()) {
|
|
||||||
IggyDataValue result;
|
|
||||||
IggyDataValue value[1];
|
|
||||||
value[0].type = IGGY_DATATYPE_boolean;
|
|
||||||
value[0].boolval = true;
|
|
||||||
IggyResult out = IggyPlayerCallMethodRS(getMovie(), &result,
|
|
||||||
IggyPlayerRootPath(getMovie()),
|
|
||||||
m_funcSetABSwap, 1, value);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::wstring UIComponent_Tooltips::getMoviePath() {
|
std::wstring UIComponent_Tooltips::getMoviePath() {
|
||||||
|
|
@ -59,7 +42,6 @@ F64 UIComponent_Tooltips::getSafeZoneHalfWidth() {
|
||||||
|
|
||||||
float safeWidth = 0.0f;
|
float safeWidth = 0.0f;
|
||||||
|
|
||||||
#if 1
|
|
||||||
// 85% safezone for tooltips in either SD mode
|
// 85% safezone for tooltips in either SD mode
|
||||||
if (!RenderManager.IsHiDef()) {
|
if (!RenderManager.IsHiDef()) {
|
||||||
// 85% safezone
|
// 85% safezone
|
||||||
|
|
@ -68,7 +50,6 @@ F64 UIComponent_Tooltips::getSafeZoneHalfWidth() {
|
||||||
// 90% safezone
|
// 90% safezone
|
||||||
safeWidth = width * (0.1f / 2);
|
safeWidth = width * (0.1f / 2);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
return safeWidth;
|
return safeWidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -331,105 +312,12 @@ void UIComponent_Tooltips::_Relayout() {
|
||||||
IggyPlayerRootPath(getMovie()),
|
IggyPlayerRootPath(getMovie()),
|
||||||
m_funcUpdateLayout, 0, NULL);
|
m_funcUpdateLayout, 0, NULL);
|
||||||
|
|
||||||
#if 0
|
|
||||||
// rebuild touchboxes
|
|
||||||
ui.TouchBoxRebuild(this);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
void UIComponent_Tooltips::handleTouchInput(unsigned int iPad, S32 x, S32 y,
|
|
||||||
int iId, bool bPressed,
|
|
||||||
bool bRepeat, bool bReleased) {
|
|
||||||
// app.DebugPrintf("ToolTip Touch ID = %i\n", iId);
|
|
||||||
bool handled = false;
|
|
||||||
|
|
||||||
// 4J - TomK no tooltips no touch!
|
|
||||||
if ((!ui.GetMenuDisplayed(ProfileManager.GetPrimaryPad())) &&
|
|
||||||
(app.GetGameSettings(ProfileManager.GetPrimaryPad(),
|
|
||||||
eGameSetting_Tooltips) == 0))
|
|
||||||
return;
|
|
||||||
|
|
||||||
// perform action on release
|
|
||||||
if (bReleased) {
|
|
||||||
switch (iId) {
|
|
||||||
case ETouchInput_Touch_A:
|
|
||||||
app.DebugPrintf("ToolTip Map Touch to _PSV_JOY_BUTTON_X\n",
|
|
||||||
iId);
|
|
||||||
if (InputManager.IsCircleCrossSwapped())
|
|
||||||
InputManager.MapTouchInput(iPad, _PSV_JOY_BUTTON_O);
|
|
||||||
else
|
|
||||||
InputManager.MapTouchInput(iPad, _PSV_JOY_BUTTON_X);
|
|
||||||
break;
|
|
||||||
case ETouchInput_Touch_B:
|
|
||||||
app.DebugPrintf("ToolTip Map Touch to _PSV_JOY_BUTTON_O\n",
|
|
||||||
iId);
|
|
||||||
if (InputManager.IsCircleCrossSwapped())
|
|
||||||
InputManager.MapTouchInput(iPad, _PSV_JOY_BUTTON_X);
|
|
||||||
else
|
|
||||||
InputManager.MapTouchInput(iPad, _PSV_JOY_BUTTON_O);
|
|
||||||
break;
|
|
||||||
case ETouchInput_Touch_X:
|
|
||||||
app.DebugPrintf("ToolTip Map Touch to _PSV_JOY_BUTTON_SQUARE\n",
|
|
||||||
iId);
|
|
||||||
InputManager.MapTouchInput(iPad, _PSV_JOY_BUTTON_SQUARE);
|
|
||||||
break;
|
|
||||||
case ETouchInput_Touch_Y:
|
|
||||||
app.DebugPrintf(
|
|
||||||
"ToolTip Map Touch to _PSV_JOY_BUTTON_TRIANGLE\n", iId);
|
|
||||||
InputManager.MapTouchInput(iPad, _PSV_JOY_BUTTON_TRIANGLE);
|
|
||||||
break;
|
|
||||||
case ETouchInput_Touch_LT:
|
|
||||||
/* not in use on vita */
|
|
||||||
app.DebugPrintf("ToolTip no action\n", iId);
|
|
||||||
break;
|
|
||||||
case ETouchInput_Touch_RightTrigger:
|
|
||||||
app.DebugPrintf("ToolTip no action\n", iId);
|
|
||||||
/* no action */
|
|
||||||
break;
|
|
||||||
case ETouchInput_Touch_LeftBumper:
|
|
||||||
app.DebugPrintf("ToolTip Map Touch to _PSV_JOY_BUTTON_L1\n",
|
|
||||||
iId);
|
|
||||||
InputManager.MapTouchInput(iPad, _PSV_JOY_BUTTON_L1);
|
|
||||||
break;
|
|
||||||
case ETouchInput_Touch_RightBumper:
|
|
||||||
app.DebugPrintf("ToolTip Map Touch to _PSV_JOY_BUTTON_R1\n",
|
|
||||||
iId);
|
|
||||||
InputManager.MapTouchInput(iPad, _PSV_JOY_BUTTON_R1);
|
|
||||||
break;
|
|
||||||
case ETouchInput_Touch_LeftStick:
|
|
||||||
app.DebugPrintf("ToolTip no action\n", iId);
|
|
||||||
/* no action */
|
|
||||||
break;
|
|
||||||
case ETouchInput_Touch_RightStick:
|
|
||||||
app.DebugPrintf(
|
|
||||||
"ToolTip Map Touch to _PSV_JOY_BUTTON_DPAD_DOWN\n", iId);
|
|
||||||
InputManager.MapTouchInput(iPad, _PSV_JOY_BUTTON_DPAD_DOWN);
|
|
||||||
break;
|
|
||||||
case ETouchInput_Touch_Select:
|
|
||||||
app.DebugPrintf("ToolTip Map Touch to _PSV_JOY_BUTTON_SELECT\n",
|
|
||||||
iId);
|
|
||||||
InputManager.MapTouchInput(iPad, _PSV_JOY_BUTTON_SELECT);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void UIComponent_Tooltips::handleReload() {
|
void UIComponent_Tooltips::handleReload() {
|
||||||
app.DebugPrintf("UIComponent_Tooltips::handleReload\n");
|
app.DebugPrintf("UIComponent_Tooltips::handleReload\n");
|
||||||
|
|
||||||
#if 0 || 0 || 0
|
|
||||||
if (InputManager.IsCircleCrossSwapped()) {
|
|
||||||
IggyDataValue result;
|
|
||||||
IggyDataValue value[1];
|
|
||||||
value[0].type = IGGY_DATATYPE_boolean;
|
|
||||||
value[0].boolval = true;
|
|
||||||
IggyResult out = IggyPlayerCallMethodRS(getMovie(), &result,
|
|
||||||
IggyPlayerRootPath(getMovie()),
|
|
||||||
m_funcSetABSwap, 1, value);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
for (unsigned int i = 0; i < eToolTipNumButtons; ++i) {
|
for (unsigned int i = 0; i < eToolTipNumButtons; ++i) {
|
||||||
_SetTooltip(i, m_tooltipValues[i].iString, m_tooltipValues[i].show,
|
_SetTooltip(i, m_tooltipValues[i].iString, m_tooltipValues[i].show,
|
||||||
|
|
|
||||||
|
|
@ -24,44 +24,8 @@ protected:
|
||||||
IggyName m_funcSetTooltip, m_funcSetOpacity, m_funcSetABSwap,
|
IggyName m_funcSetTooltip, m_funcSetOpacity, m_funcSetABSwap,
|
||||||
m_funcUpdateLayout;
|
m_funcUpdateLayout;
|
||||||
|
|
||||||
#if 0
|
|
||||||
enum ETouchInput {
|
|
||||||
ETouchInput_Touch_A,
|
|
||||||
ETouchInput_Touch_B,
|
|
||||||
ETouchInput_Touch_X,
|
|
||||||
ETouchInput_Touch_Y,
|
|
||||||
ETouchInput_Touch_LT,
|
|
||||||
ETouchInput_Touch_RightTrigger,
|
|
||||||
ETouchInput_Touch_LeftBumper,
|
|
||||||
ETouchInput_Touch_RightBumper,
|
|
||||||
ETouchInput_Touch_LeftStick,
|
|
||||||
ETouchInput_Touch_RightStick,
|
|
||||||
ETouchInput_Touch_Select,
|
|
||||||
|
|
||||||
ETouchInput_Count,
|
|
||||||
};
|
|
||||||
UIControl_Touch m_TouchController[ETouchInput_Count];
|
|
||||||
#endif
|
|
||||||
|
|
||||||
UI_BEGIN_MAP_ELEMENTS_AND_NAMES(UIScene)
|
UI_BEGIN_MAP_ELEMENTS_AND_NAMES(UIScene)
|
||||||
#if 0
|
|
||||||
UI_MAP_ELEMENT(m_TouchController[ETouchInput_Touch_A], "Touch_A")
|
|
||||||
UI_MAP_ELEMENT(m_TouchController[ETouchInput_Touch_B], "Touch_B")
|
|
||||||
UI_MAP_ELEMENT(m_TouchController[ETouchInput_Touch_X], "Touch_X")
|
|
||||||
UI_MAP_ELEMENT(m_TouchController[ETouchInput_Touch_Y], "Touch_Y")
|
|
||||||
UI_MAP_ELEMENT(m_TouchController[ETouchInput_Touch_LT], "Touch_LT")
|
|
||||||
UI_MAP_ELEMENT(m_TouchController[ETouchInput_Touch_RightTrigger],
|
|
||||||
"Touch_RightTrigger")
|
|
||||||
UI_MAP_ELEMENT(m_TouchController[ETouchInput_Touch_LeftBumper],
|
|
||||||
"Touch_LeftBumper")
|
|
||||||
UI_MAP_ELEMENT(m_TouchController[ETouchInput_Touch_RightBumper],
|
|
||||||
"Touch_RightBumper")
|
|
||||||
UI_MAP_ELEMENT(m_TouchController[ETouchInput_Touch_LeftStick],
|
|
||||||
"Touch_LeftStick")
|
|
||||||
UI_MAP_ELEMENT(m_TouchController[ETouchInput_Touch_RightStick],
|
|
||||||
"Touch_RightStick")
|
|
||||||
UI_MAP_ELEMENT(m_TouchController[ETouchInput_Touch_Select], "Touch_Select")
|
|
||||||
#endif
|
|
||||||
UI_MAP_NAME(m_funcSetTooltip, L"SetToolTip")
|
UI_MAP_NAME(m_funcSetTooltip, L"SetToolTip")
|
||||||
UI_MAP_NAME(m_funcSetOpacity, L"SetOpacity")
|
UI_MAP_NAME(m_funcSetOpacity, L"SetOpacity")
|
||||||
UI_MAP_NAME(m_funcSetABSwap, L"SetABSwap")
|
UI_MAP_NAME(m_funcSetABSwap, L"SetABSwap")
|
||||||
|
|
@ -118,8 +82,4 @@ private:
|
||||||
|
|
||||||
bool m_overrideSFX[XUSER_MAX_COUNT][ACTION_MAX_MENU];
|
bool m_overrideSFX[XUSER_MAX_COUNT][ACTION_MAX_MENU];
|
||||||
|
|
||||||
#if 0
|
|
||||||
virtual void handleTouchInput(unsigned int iPad, S32 x, S32 y, int iId,
|
|
||||||
bool bPressed, bool bRepeat, bool bReleased);
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
@ -343,54 +343,6 @@ std::wstring UIComponent_TutorialPopup::_SetIcon(int icon, int iAuxVal,
|
||||||
|
|
||||||
std::wstring UIComponent_TutorialPopup::_SetImage(std::wstring& desc) {
|
std::wstring UIComponent_TutorialPopup::_SetImage(std::wstring& desc) {
|
||||||
// 4J Stu - Unused
|
// 4J Stu - Unused
|
||||||
#if 0
|
|
||||||
bool imageShowAtStart = m_image.IsShown();
|
|
||||||
|
|
||||||
std::wstring openTag(L"{*IMAGE*}");
|
|
||||||
std::wstring closeTag(L"{*/IMAGE*}");
|
|
||||||
int imageTagStartPos = (int)desc.find(openTag);
|
|
||||||
int imageStartPos = imageTagStartPos + (int)openTag.length();
|
|
||||||
if( imageTagStartPos > 0 && imageStartPos < (int)desc.length() )
|
|
||||||
{
|
|
||||||
int imageEndPos = (int)desc.find( closeTag, imageStartPos );
|
|
||||||
|
|
||||||
if(imageEndPos > imageStartPos && imageEndPos < (int)desc.length() )
|
|
||||||
{
|
|
||||||
std::wstring id = desc.substr(imageStartPos, imageEndPos - imageStartPos);
|
|
||||||
m_image.SetImagePath( id.c_str() );
|
|
||||||
m_image.SetShow( true );
|
|
||||||
|
|
||||||
desc.replace(imageTagStartPos, imageEndPos - imageTagStartPos + closeTag.length(), L"");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// hide the icon slot
|
|
||||||
m_image.SetShow( false );
|
|
||||||
}
|
|
||||||
|
|
||||||
bool imageShowAtEnd = m_image.IsShown();
|
|
||||||
if(imageShowAtStart != imageShowAtEnd)
|
|
||||||
{
|
|
||||||
float fHeight, fWidth, fIconHeight, fDescHeight, fDescWidth;
|
|
||||||
m_image.GetBounds(&fWidth,&fIconHeight);
|
|
||||||
GetBounds(&fWidth,&fHeight);
|
|
||||||
|
|
||||||
|
|
||||||
// 4J Stu - For some reason when we resize the scene it resets the size of the HTML control
|
|
||||||
// We don't want that to happen, so get it's size before and set it back after
|
|
||||||
m_description.GetBounds(&fDescWidth,&fDescHeight);
|
|
||||||
if(imageShowAtEnd)
|
|
||||||
{
|
|
||||||
SetBounds(fWidth, fHeight + fIconHeight);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SetBounds(fWidth, fHeight - fIconHeight);
|
|
||||||
}
|
|
||||||
m_description.SetBounds(fDescWidth, fDescHeight);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
return desc;
|
return desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,19 +42,6 @@ bool UIControl::setupControl(UIScene* scene, IggyValuePath* parent,
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
void UIControl::UpdateControl() {
|
|
||||||
F64 fx, fy, fwidth, fheight;
|
|
||||||
IggyValueGetF64RS(getIggyValuePath(), m_nameXPos, NULL, &fx);
|
|
||||||
IggyValueGetF64RS(getIggyValuePath(), m_nameYPos, NULL, &fy);
|
|
||||||
IggyValueGetF64RS(getIggyValuePath(), m_nameWidth, NULL, &fwidth);
|
|
||||||
IggyValueGetF64RS(getIggyValuePath(), m_nameHeight, NULL, &fheight);
|
|
||||||
m_x = (S32)fx;
|
|
||||||
m_y = (S32)fy;
|
|
||||||
m_width = (S32)Math::round(fwidth);
|
|
||||||
m_height = (S32)Math::round(fheight);
|
|
||||||
}
|
|
||||||
#endif // 0
|
|
||||||
|
|
||||||
void UIControl::ReInit() {
|
void UIControl::ReInit() {
|
||||||
if (m_lastOpacity != 1.0f) {
|
if (m_lastOpacity != 1.0f) {
|
||||||
|
|
|
||||||
|
|
@ -59,11 +59,6 @@ public:
|
||||||
|
|
||||||
virtual bool setupControl(UIScene* scene, IggyValuePath* parent,
|
virtual bool setupControl(UIScene* scene, IggyValuePath* parent,
|
||||||
const std::string& controlName);
|
const std::string& controlName);
|
||||||
#if 0
|
|
||||||
void UpdateControl();
|
|
||||||
void setHidden(bool bHidden) { m_bHidden = bHidden; }
|
|
||||||
bool getHidden(void) { return m_bHidden; }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
IggyValuePath* getIggyValuePath();
|
IggyValuePath* getIggyValuePath();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,18 +36,6 @@ void UIControl_Button::init(UIString label, int id) {
|
||||||
IggyPlayerCallMethodRS(m_parentScene->getMovie(), &result,
|
IggyPlayerCallMethodRS(m_parentScene->getMovie(), &result,
|
||||||
getIggyValuePath(), m_initFunc, 2, value);
|
getIggyValuePath(), m_initFunc, 2, value);
|
||||||
|
|
||||||
#if 0
|
|
||||||
// 4J-PB - add this button to the vita touch box list
|
|
||||||
|
|
||||||
switch (m_parentScene->GetParentLayer()->m_iLayer) {
|
|
||||||
case eUILayer_Error:
|
|
||||||
case eUILayer_Fullscreen:
|
|
||||||
case eUILayer_Scene:
|
|
||||||
case eUILayer_HUD:
|
|
||||||
ui.TouchBoxAdd(this, m_parentScene);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UIControl_Button::ReInit() {
|
void UIControl_Button::ReInit() {
|
||||||
|
|
|
||||||
|
|
@ -35,17 +35,6 @@ void UIControl_ButtonList::init(int id) {
|
||||||
IggyPlayerCallMethodRS(m_parentScene->getMovie(), &result,
|
IggyPlayerCallMethodRS(m_parentScene->getMovie(), &result,
|
||||||
getIggyValuePath(), m_initFunc, 1, value);
|
getIggyValuePath(), m_initFunc, 1, value);
|
||||||
|
|
||||||
#if 0
|
|
||||||
// 4J-PB - add this buttonlist to the vita touch box list
|
|
||||||
|
|
||||||
switch (m_parentScene->GetParentLayer()->m_iLayer) {
|
|
||||||
case eUILayer_Fullscreen:
|
|
||||||
case eUILayer_Scene:
|
|
||||||
case eUILayer_HUD:
|
|
||||||
ui.TouchBoxAdd(this, m_parentScene);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UIControl_ButtonList::ReInit() {
|
void UIControl_ButtonList::ReInit() {
|
||||||
|
|
@ -162,43 +151,6 @@ void UIControl_ButtonList::setButtonLabel(int iButtonId,
|
||||||
m_funcSetButtonLabel, 2, value);
|
m_funcSetButtonLabel, 2, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
void UIControl_ButtonList::SetTouchFocus(S32 iX, S32 iY, bool bRepeat) {
|
|
||||||
IggyDataValue result;
|
|
||||||
IggyDataValue value[3];
|
|
||||||
|
|
||||||
value[0].type = IGGY_DATATYPE_number;
|
|
||||||
value[0].number = iX;
|
|
||||||
value[1].type = IGGY_DATATYPE_number;
|
|
||||||
value[1].number = iY;
|
|
||||||
value[2].type = IGGY_DATATYPE_boolean;
|
|
||||||
value[2].boolval = bRepeat;
|
|
||||||
|
|
||||||
IggyResult out = IggyPlayerCallMethodRS(m_parentScene->getMovie(), &result,
|
|
||||||
getIggyValuePath(),
|
|
||||||
m_funcSetTouchFocus, 3, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool UIControl_ButtonList::CanTouchTrigger(S32 iX, S32 iY) {
|
|
||||||
IggyDataValue result;
|
|
||||||
IggyDataValue value[2];
|
|
||||||
|
|
||||||
value[0].type = IGGY_DATATYPE_number;
|
|
||||||
value[0].number = iX;
|
|
||||||
value[1].type = IGGY_DATATYPE_number;
|
|
||||||
value[1].number = iY;
|
|
||||||
|
|
||||||
IggyResult out = IggyPlayerCallMethodRS(m_parentScene->getMovie(), &result,
|
|
||||||
getIggyValuePath(),
|
|
||||||
m_funcCanTouchTrigger, 2, value);
|
|
||||||
|
|
||||||
S32 bCanTouchTrigger = false;
|
|
||||||
if (result.type == IGGY_DATATYPE_boolean) {
|
|
||||||
bCanTouchTrigger = (bool)result.boolval;
|
|
||||||
}
|
|
||||||
return bCanTouchTrigger;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void UIControl_DynamicButtonList::tick() {
|
void UIControl_DynamicButtonList::tick() {
|
||||||
UIControl_ButtonList::tick();
|
UIControl_ButtonList::tick();
|
||||||
|
|
|
||||||
|
|
@ -39,10 +39,6 @@ public:
|
||||||
|
|
||||||
void setButtonLabel(int iButtonId, const std::wstring& label);
|
void setButtonLabel(int iButtonId, const std::wstring& label);
|
||||||
|
|
||||||
#if 0
|
|
||||||
void SetTouchFocus(S32 iX, S32 iY, bool bRepeat);
|
|
||||||
bool CanTouchTrigger(S32 iX, S32 iY);
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class UIControl_DynamicButtonList : public UIControl_ButtonList {
|
class UIControl_DynamicButtonList : public UIControl_ButtonList {
|
||||||
|
|
|
||||||
|
|
@ -44,17 +44,6 @@ void UIControl_CheckBox::init(UIString label, int id, bool checked) {
|
||||||
IggyPlayerCallMethodRS(m_parentScene->getMovie(), &result,
|
IggyPlayerCallMethodRS(m_parentScene->getMovie(), &result,
|
||||||
getIggyValuePath(), m_initFunc, 3, value);
|
getIggyValuePath(), m_initFunc, 3, value);
|
||||||
|
|
||||||
#if 0
|
|
||||||
// 4J-TomK - add checkbox to the vita touch box list
|
|
||||||
|
|
||||||
switch (m_parentScene->GetParentLayer()->m_iLayer) {
|
|
||||||
case eUILayer_Fullscreen:
|
|
||||||
case eUILayer_Scene:
|
|
||||||
case eUILayer_HUD:
|
|
||||||
ui.TouchBoxAdd(this, m_parentScene);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool UIControl_CheckBox::IsChecked() {
|
bool UIControl_CheckBox::IsChecked() {
|
||||||
|
|
|
||||||
|
|
@ -42,17 +42,6 @@ void UIControl_DynamicLabel::addText(const std::wstring& text,
|
||||||
void UIControl_DynamicLabel::ReInit() { UIControl_Base::ReInit(); }
|
void UIControl_DynamicLabel::ReInit() { UIControl_Base::ReInit(); }
|
||||||
|
|
||||||
void UIControl_DynamicLabel::SetupTouch() {
|
void UIControl_DynamicLabel::SetupTouch() {
|
||||||
#if 0
|
|
||||||
// 4J-TomK - add this dynamic label to the vita touch box list
|
|
||||||
|
|
||||||
switch (m_parentScene->GetParentLayer()->m_iLayer) {
|
|
||||||
case eUILayer_Fullscreen:
|
|
||||||
case eUILayer_Scene:
|
|
||||||
case eUILayer_HUD:
|
|
||||||
ui.TouchBoxAdd(this, m_parentScene);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UIControl_DynamicLabel::TouchScroll(S32 iY, bool bActive) {
|
void UIControl_DynamicLabel::TouchScroll(S32 iY, bool bActive) {
|
||||||
|
|
|
||||||
|
|
@ -48,17 +48,6 @@ void UIControl_HTMLLabel::setLabel(const std::string& label) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void UIControl_HTMLLabel::SetupTouch() {
|
void UIControl_HTMLLabel::SetupTouch() {
|
||||||
#if 0
|
|
||||||
// 4J-TomK - add this dynamic label to the vita touch box list
|
|
||||||
|
|
||||||
switch (m_parentScene->GetParentLayer()->m_iLayer) {
|
|
||||||
case eUILayer_Fullscreen:
|
|
||||||
case eUILayer_Scene:
|
|
||||||
case eUILayer_HUD:
|
|
||||||
ui.TouchBoxAdd(this, m_parentScene);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UIControl_HTMLLabel::TouchScroll(S32 iY, bool bActive) {
|
void UIControl_HTMLLabel::TouchScroll(S32 iY, bool bActive) {
|
||||||
|
|
|
||||||
|
|
@ -16,10 +16,6 @@ bool UIControl_LeaderboardList::setupControl(UIScene* scene,
|
||||||
m_funcResetLeaderboard = registerFastName(L"ResetLeaderboard");
|
m_funcResetLeaderboard = registerFastName(L"ResetLeaderboard");
|
||||||
m_funcSetupTitles = registerFastName(L"SetupTitles");
|
m_funcSetupTitles = registerFastName(L"SetupTitles");
|
||||||
m_funcSetColumnIcon = registerFastName(L"SetColumnIcon");
|
m_funcSetColumnIcon = registerFastName(L"SetColumnIcon");
|
||||||
#if 0
|
|
||||||
m_funcSetTouchFocus = registerFastName(L"SetTouchFocus");
|
|
||||||
m_bTouchInitialised = false;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
@ -91,18 +87,6 @@ void UIControl_LeaderboardList::initLeaderboard(int iFirstFocus,
|
||||||
getIggyValuePath(),
|
getIggyValuePath(),
|
||||||
m_funcInitLeaderboard, 3, value);
|
m_funcInitLeaderboard, 3, value);
|
||||||
|
|
||||||
#if 0
|
|
||||||
// 4J-PB - add this button to the vita touch box list
|
|
||||||
if (!m_bTouchInitialised) {
|
|
||||||
switch (m_parentScene->GetParentLayer()->m_iLayer) {
|
|
||||||
case eUILayer_Fullscreen:
|
|
||||||
case eUILayer_Scene:
|
|
||||||
ui.TouchBoxAdd(this, m_parentScene);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
m_bTouchInitialised = true;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UIControl_LeaderboardList::setColumnIcon(int iColumn, int iType) {
|
void UIControl_LeaderboardList::setColumnIcon(int iColumn, int iType) {
|
||||||
|
|
@ -232,20 +216,3 @@ void UIControl_LeaderboardList::addDataSet(
|
||||||
getIggyValuePath(), m_funcAddDataSet, 12, value);
|
getIggyValuePath(), m_funcAddDataSet, 12, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
void UIControl_LeaderboardList::SetTouchFocus(S32 iX, S32 iY, bool bRepeat) {
|
|
||||||
IggyDataValue result;
|
|
||||||
IggyDataValue value[3];
|
|
||||||
|
|
||||||
value[0].type = IGGY_DATATYPE_number;
|
|
||||||
value[0].number = iX;
|
|
||||||
value[1].type = IGGY_DATATYPE_number;
|
|
||||||
value[1].number = iY;
|
|
||||||
value[2].type = IGGY_DATATYPE_boolean;
|
|
||||||
value[2].boolval = bRepeat;
|
|
||||||
|
|
||||||
IggyResult out = IggyPlayerCallMethodRS(m_parentScene->getMovie(), &result,
|
|
||||||
getIggyValuePath(),
|
|
||||||
m_funcSetTouchFocus, 3, value);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,6 @@ private:
|
||||||
IggyName m_funcInitLeaderboard, m_funcAddDataSet;
|
IggyName m_funcInitLeaderboard, m_funcAddDataSet;
|
||||||
IggyName m_funcResetLeaderboard;
|
IggyName m_funcResetLeaderboard;
|
||||||
IggyName m_funcSetupTitles, m_funcSetColumnIcon;
|
IggyName m_funcSetupTitles, m_funcSetColumnIcon;
|
||||||
#if 0
|
|
||||||
IggyName m_funcSetTouchFocus;
|
|
||||||
bool m_bTouchInitialised;
|
|
||||||
#endif
|
|
||||||
public:
|
public:
|
||||||
enum ELeaderboardIcons {
|
enum ELeaderboardIcons {
|
||||||
e_ICON_TYPE_IGGY = 0,
|
e_ICON_TYPE_IGGY = 0,
|
||||||
|
|
@ -48,7 +44,4 @@ public:
|
||||||
const std::wstring& col4, const std::wstring& col5,
|
const std::wstring& col4, const std::wstring& col5,
|
||||||
const std::wstring& col6);
|
const std::wstring& col6);
|
||||||
|
|
||||||
#if 0
|
|
||||||
void SetTouchFocus(S32 iX, S32 iY, bool bRepeat);
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
@ -302,7 +302,7 @@ void UIControl_PlayerSkinPreview::render(EntityRenderer* renderer, double x,
|
||||||
glTranslatef((float)x, (float)y, (float)z);
|
glTranslatef((float)x, (float)y, (float)z);
|
||||||
|
|
||||||
// float bob = getBob(mob, a);
|
// float bob = getBob(mob, a);
|
||||||
#ifdef SKIN_PREVIEW_BOB_ANIM
|
#if defined(SKIN_PREVIEW_BOB_ANIM)
|
||||||
float bob = (m_bobTick + a) / 2;
|
float bob = (m_bobTick + a) / 2;
|
||||||
|
|
||||||
++m_bobTick;
|
++m_bobTick;
|
||||||
|
|
@ -326,13 +326,9 @@ void UIControl_PlayerSkinPreview::render(EntityRenderer* renderer, double x,
|
||||||
|
|
||||||
// 4J - TomK - pull up character a bit more to make sure extra geo around
|
// 4J - TomK - pull up character a bit more to make sure extra geo around
|
||||||
// feet doesn't cause rendering problems on PSVita
|
// feet doesn't cause rendering problems on PSVita
|
||||||
#if 0
|
|
||||||
glTranslatef(0, -24 * _scale - 1.0f / 16.0f, 0);
|
|
||||||
#else
|
|
||||||
glTranslatef(0, -24 * _scale - 0.125f / 16.0f, 0);
|
glTranslatef(0, -24 * _scale - 0.125f / 16.0f, 0);
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef SKIN_PREVIEW_WALKING_ANIM
|
#if defined(SKIN_PREVIEW_WALKING_ANIM)
|
||||||
m_walkAnimSpeedO = m_walkAnimSpeed;
|
m_walkAnimSpeedO = m_walkAnimSpeed;
|
||||||
m_walkAnimSpeed += (0.1f - m_walkAnimSpeed) * 0.4f;
|
m_walkAnimSpeed += (0.1f - m_walkAnimSpeed) * 0.4f;
|
||||||
m_walkAnimPos += m_walkAnimSpeed;
|
m_walkAnimPos += m_walkAnimSpeed;
|
||||||
|
|
|
||||||
|
|
@ -55,17 +55,6 @@ void UIControl_Slider::init(UIString label, int id, int min, int max,
|
||||||
IggyPlayerCallMethodRS(m_parentScene->getMovie(), &result,
|
IggyPlayerCallMethodRS(m_parentScene->getMovie(), &result,
|
||||||
getIggyValuePath(), m_initFunc, 5, value);
|
getIggyValuePath(), m_initFunc, 5, value);
|
||||||
|
|
||||||
#if 0
|
|
||||||
// 4J-TomK - add slider to the vita touch box list
|
|
||||||
|
|
||||||
switch (m_parentScene->GetParentLayer()->m_iLayer) {
|
|
||||||
case eUILayer_Fullscreen:
|
|
||||||
case eUILayer_Scene:
|
|
||||||
case eUILayer_HUD:
|
|
||||||
ui.TouchBoxAdd(this, m_parentScene);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UIControl_Slider::handleSliderMove(int newValue) {
|
void UIControl_Slider::handleSliderMove(int newValue) {
|
||||||
|
|
|
||||||
|
|
@ -39,17 +39,6 @@ void UIControl_TextInput::init(UIString label, int id) {
|
||||||
IggyPlayerCallMethodRS(m_parentScene->getMovie(), &result,
|
IggyPlayerCallMethodRS(m_parentScene->getMovie(), &result,
|
||||||
getIggyValuePath(), m_initFunc, 2, value);
|
getIggyValuePath(), m_initFunc, 2, value);
|
||||||
|
|
||||||
#if 0
|
|
||||||
// 4J-TomK - add this buttonlist to the vita touch box list
|
|
||||||
|
|
||||||
switch (m_parentScene->GetParentLayer()->m_iLayer) {
|
|
||||||
case eUILayer_Fullscreen:
|
|
||||||
case eUILayer_Scene:
|
|
||||||
case eUILayer_HUD:
|
|
||||||
ui.TouchBoxAdd(this, m_parentScene);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UIControl_TextInput::ReInit() {
|
void UIControl_TextInput::ReInit() {
|
||||||
|
|
|
||||||
|
|
@ -43,17 +43,6 @@ void UIControl_TexturePackList::init(const std::wstring& label, int id) {
|
||||||
IggyPlayerCallMethodRS(m_parentScene->getMovie(), &result,
|
IggyPlayerCallMethodRS(m_parentScene->getMovie(), &result,
|
||||||
getIggyValuePath(), m_initFunc, 2, value);
|
getIggyValuePath(), m_initFunc, 2, value);
|
||||||
|
|
||||||
#if 0
|
|
||||||
// 4J-TomK - add this texturepack list to the vita touch box list
|
|
||||||
|
|
||||||
switch (m_parentScene->GetParentLayer()->m_iLayer) {
|
|
||||||
case eUILayer_Fullscreen:
|
|
||||||
case eUILayer_Scene:
|
|
||||||
case eUILayer_HUD:
|
|
||||||
ui.TouchBoxAdd(this, m_parentScene);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UIControl_TexturePackList::addPack(int id,
|
void UIControl_TexturePackList::addPack(int id,
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -74,17 +74,6 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// 4J-PB - ui element type for PSVita touch control
|
// 4J-PB - ui element type for PSVita touch control
|
||||||
#if 0
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
UIControl* pControl;
|
|
||||||
S32 x1, y1, x2, y2;
|
|
||||||
} UIELEMENT;
|
|
||||||
// E3 - Fine for now, but we need to make this better!
|
|
||||||
std::vector<UIELEMENT*> m_TouchBoxes[eUIGroup_COUNT][eUILayer_COUNT]
|
|
||||||
[eUIScene_COUNT];
|
|
||||||
bool m_bTouchscreenPressed;
|
|
||||||
#endif
|
|
||||||
// 4J Stu - These should be in the order that they reference each other
|
// 4J Stu - These should be in the order that they reference each other
|
||||||
// (i.e. they can only reference one with a lower value in the enum)
|
// (i.e. they can only reference one with a lower value in the enum)
|
||||||
enum ELibraries {
|
enum ELibraries {
|
||||||
|
|
@ -100,10 +89,10 @@ private:
|
||||||
eLibrary_Tooltips,
|
eLibrary_Tooltips,
|
||||||
eLibrary_Default,
|
eLibrary_Default,
|
||||||
|
|
||||||
#if (defined(_WINDOWS64))
|
#if defined(_WINDOWS64)
|
||||||
// 4J Stu - Load the 720/480 skins so that we have something to fallback on
|
// 4J Stu - Load the 720/480 skins so that we have something to fallback on
|
||||||
// during development
|
// during development
|
||||||
#ifndef _FINAL_BUILD
|
#if !defined(_FINAL_BUILD)
|
||||||
eLibraryFallback_Platform,
|
eLibraryFallback_Platform,
|
||||||
eLibraryFallback_GraphicsDefault,
|
eLibraryFallback_GraphicsDefault,
|
||||||
eLibraryFallback_GraphicsHUD,
|
eLibraryFallback_GraphicsHUD,
|
||||||
|
|
@ -181,23 +170,6 @@ private:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
UIController();
|
UIController();
|
||||||
#if 0
|
|
||||||
void TouchBoxAdd(UIControl* pControl, UIScene* pUIScene);
|
|
||||||
bool TouchBoxHit(UIScene* pUIScene, S32 x, S32 y);
|
|
||||||
void TouchBoxesClear(UIScene* pUIScene);
|
|
||||||
void TouchBoxRebuild(UIScene* pUIScene);
|
|
||||||
|
|
||||||
void HandleTouchInput(unsigned int iPad, unsigned int key, bool bPressed,
|
|
||||||
bool bRepeat, bool bReleased);
|
|
||||||
void SendTouchInput(unsigned int iPad, unsigned int key, bool bPressed,
|
|
||||||
bool bRepeat, bool bReleased);
|
|
||||||
|
|
||||||
private:
|
|
||||||
void TouchBoxAdd(UIControl* pControl, EUIGroup eUIGroup, EUILayer eUILayer,
|
|
||||||
EUIScene eUIscene, UIControl* pMainPanelControl);
|
|
||||||
UIELEMENT* m_ActiveUIElement;
|
|
||||||
UIELEMENT* m_HighlightedUIElement;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
UIGroup* m_groups[eUIGroup_COUNT];
|
UIGroup* m_groups[eUIGroup_COUNT];
|
||||||
|
|
@ -383,9 +355,6 @@ public:
|
||||||
|
|
||||||
virtual void HandleDLCMountingComplete();
|
virtual void HandleDLCMountingComplete();
|
||||||
virtual void HandleDLCInstalled(int iPad);
|
virtual void HandleDLCInstalled(int iPad);
|
||||||
#if 0
|
|
||||||
virtual void HandleDLCLicenseChange();
|
|
||||||
#endif
|
|
||||||
virtual void HandleTMSDLCFileRetrieved(int iPad);
|
virtual void HandleTMSDLCFileRetrieved(int iPad);
|
||||||
virtual void HandleTMSBanFileRetrieved(int iPad);
|
virtual void HandleTMSBanFileRetrieved(int iPad);
|
||||||
virtual void HandleInventoryUpdated(int iPad);
|
virtual void HandleInventoryUpdated(int iPad);
|
||||||
|
|
|
||||||
|
|
@ -5,11 +5,9 @@
|
||||||
enum EUIGroup {
|
enum EUIGroup {
|
||||||
eUIGroup_Fullscreen,
|
eUIGroup_Fullscreen,
|
||||||
eUIGroup_Player1,
|
eUIGroup_Player1,
|
||||||
#if 1
|
|
||||||
eUIGroup_Player2,
|
eUIGroup_Player2,
|
||||||
eUIGroup_Player3,
|
eUIGroup_Player3,
|
||||||
eUIGroup_Player4,
|
eUIGroup_Player4,
|
||||||
#endif
|
|
||||||
|
|
||||||
eUIGroup_COUNT,
|
eUIGroup_COUNT,
|
||||||
|
|
||||||
|
|
@ -19,7 +17,7 @@ enum EUIGroup {
|
||||||
// Defines the layers in a UI group (lower numbers ticked first, rendered last
|
// Defines the layers in a UI group (lower numbers ticked first, rendered last
|
||||||
// (ie on top))
|
// (ie on top))
|
||||||
enum EUILayer {
|
enum EUILayer {
|
||||||
#ifndef _CONTENT_PACKAGE
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
eUILayer_Debug,
|
eUILayer_Debug,
|
||||||
#endif
|
#endif
|
||||||
eUILayer_Tooltips,
|
eUILayer_Tooltips,
|
||||||
|
|
@ -103,9 +101,6 @@ enum EUIScene {
|
||||||
eUIScene_HorseMenu,
|
eUIScene_HorseMenu,
|
||||||
eUIScene_FireworksMenu,
|
eUIScene_FireworksMenu,
|
||||||
|
|
||||||
#if 0
|
|
||||||
// eUIScene_TransferToXboxOne,
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ****************************************
|
// ****************************************
|
||||||
// ****************************************
|
// ****************************************
|
||||||
|
|
@ -116,7 +111,6 @@ enum EUIScene {
|
||||||
// CConsoleMinecraftApp::NavigateToScene There are quite a few so you need to
|
// CConsoleMinecraftApp::NavigateToScene There are quite a few so you need to
|
||||||
// check them all Also update UILayer::updateFocusState
|
// check them all Also update UILayer::updateFocusState
|
||||||
|
|
||||||
#if 1
|
|
||||||
// Anything non-xbox should be added here. The ordering of scenes above is
|
// Anything non-xbox should be added here. The ordering of scenes above is
|
||||||
// required for sentient reporting on xbox 360 to continue to be accurate
|
// required for sentient reporting on xbox 360 to continue to be accurate
|
||||||
eUIComponent_Panorama,
|
eUIComponent_Panorama,
|
||||||
|
|
@ -133,13 +127,12 @@ enum EUIScene {
|
||||||
eUIScene_EULA,
|
eUIScene_EULA,
|
||||||
eUIScene_InGameSaveManagementMenu,
|
eUIScene_InGameSaveManagementMenu,
|
||||||
eUIScene_LanguageSelector,
|
eUIScene_LanguageSelector,
|
||||||
#endif // ndef 0
|
|
||||||
|
|
||||||
#ifdef _DEBUG_MENUS_ENABLED
|
#if defined(_DEBUG_MENUS_ENABLED)
|
||||||
eUIScene_DebugOverlay,
|
eUIScene_DebugOverlay,
|
||||||
eUIScene_DebugItemEditor,
|
eUIScene_DebugItemEditor,
|
||||||
#endif
|
#endif
|
||||||
#ifndef _CONTENT_PACKAGE
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
eUIScene_DebugCreateSchematic,
|
eUIScene_DebugCreateSchematic,
|
||||||
eUIScene_DebugSetCamera,
|
eUIScene_DebugSetCamera,
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -232,10 +225,6 @@ enum EHowToPlayPage {
|
||||||
|
|
||||||
eHowToPlay_NetherPortal,
|
eHowToPlay_NetherPortal,
|
||||||
eHowToPlay_TheEnd,
|
eHowToPlay_TheEnd,
|
||||||
#if 0
|
|
||||||
eHowToPlay_SocialMedia,
|
|
||||||
eHowToPlay_BanList,
|
|
||||||
#endif
|
|
||||||
eHowToPlay_HostOptions,
|
eHowToPlay_HostOptions,
|
||||||
eHowToPlay_NumPages
|
eHowToPlay_NumPages
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -9,11 +9,7 @@ SFontData SFontData::Mojangles_7 = {
|
||||||
|
|
||||||
/* Font Name */ "Mojangles7",
|
/* Font Name */ "Mojangles7",
|
||||||
|
|
||||||
#if 0
|
|
||||||
/* filename */ L"/font/Mojangles_7.png",
|
|
||||||
#else
|
|
||||||
/* Filename */ L"/TitleUpdate/res/font/Mojangles_7.png",
|
/* Filename */ L"/TitleUpdate/res/font/Mojangles_7.png",
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Glyph count */ FONTSIZE,
|
/* Glyph count */ FONTSIZE,
|
||||||
/* Codepoints */ SFontData::Codepoints,
|
/* Codepoints */ SFontData::Codepoints,
|
||||||
|
|
@ -39,11 +35,7 @@ SFontData SFontData::Mojangles_11 = {
|
||||||
|
|
||||||
/* Font Name */ "Mojangles11",
|
/* Font Name */ "Mojangles11",
|
||||||
|
|
||||||
#if 0
|
|
||||||
/* filename */ L"/font/Mojangles_11.png",
|
|
||||||
#else
|
|
||||||
/* Filename */ L"/TitleUpdate/res/font/Mojangles_11.png",
|
/* Filename */ L"/TitleUpdate/res/font/Mojangles_11.png",
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Glyph count */ FONTSIZE,
|
/* Glyph count */ FONTSIZE,
|
||||||
/* Codepoints */ SFontData::Codepoints,
|
/* Codepoints */ SFontData::Codepoints,
|
||||||
|
|
@ -762,7 +754,7 @@ CFontData::CFontData(SFontData& sFontData, int* pbRawImage)
|
||||||
}
|
}
|
||||||
|
|
||||||
// DEBUG //
|
// DEBUG //
|
||||||
#ifndef _CONTENT_PACKAGE
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
for (int i = 0; i < sFontData.m_uiGlyphCount; i++) {
|
for (int i = 0; i < sFontData.m_uiGlyphCount; i++) {
|
||||||
int unicode = getUnicode(i), unicodeChar = 32, row, col;
|
int unicode = getUnicode(i), unicodeChar = 32, row, col;
|
||||||
if (32 < unicode && unicode < 127 && unicode != 0x0025) {
|
if (32 < unicode && unicode < 127 && unicode != 0x0025) {
|
||||||
|
|
|
||||||
|
|
@ -17,9 +17,6 @@ UIGroup::UIGroup(EUIGroup group, int iPad) {
|
||||||
|
|
||||||
for (unsigned int i = 0; i < eUILayer_COUNT; ++i) {
|
for (unsigned int i = 0; i < eUILayer_COUNT; ++i) {
|
||||||
m_layers[i] = new UILayer(this);
|
m_layers[i] = new UILayer(this);
|
||||||
#if 0
|
|
||||||
m_layers[i]->m_iLayer = (EUILayer)i;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_tooltips =
|
m_tooltips =
|
||||||
|
|
@ -188,18 +185,6 @@ bool UIGroup::HasFocus(int iPad) {
|
||||||
return hasFocus;
|
return hasFocus;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
UIScene* UIGroup::getCurrentScene() {
|
|
||||||
UIScene* pScene;
|
|
||||||
for (unsigned int i = 0; i < eUILayer_COUNT; ++i) {
|
|
||||||
pScene = m_layers[i]->getCurrentScene();
|
|
||||||
|
|
||||||
if (pScene != NULL) return pScene;
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// INPUT
|
// INPUT
|
||||||
void UIGroup::handleInput(int iPad, int key, bool repeat, bool pressed,
|
void UIGroup::handleInput(int iPad, int key, bool repeat, bool pressed,
|
||||||
|
|
@ -273,15 +258,6 @@ void UIGroup::HandleDLCInstalled() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
void UIGroup::HandleDLCLicenseChange() {
|
|
||||||
// Ignore this group if the player isn't signed in
|
|
||||||
if (m_iPad >= 0 && !ProfileManager.IsSignedIn(m_iPad)) return;
|
|
||||||
for (unsigned int i = 0; i < eUILayer_COUNT; ++i) {
|
|
||||||
m_layers[i]->HandleDLCLicenseChange();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void UIGroup::HandleMessage(EUIMessage message, void* data) {
|
void UIGroup::HandleMessage(EUIMessage message, void* data) {
|
||||||
// Ignore this group if the player isn't signed in
|
// Ignore this group if the player isn't signed in
|
||||||
|
|
@ -369,11 +345,7 @@ UIScene* UIGroup::FindScene(EUIScene sceneType) {
|
||||||
|
|
||||||
for (int i = 0; i < eUILayer_COUNT; i++) {
|
for (int i = 0; i < eUILayer_COUNT; i++) {
|
||||||
pScene = m_layers[i]->FindScene(sceneType);
|
pScene = m_layers[i]->FindScene(sceneType);
|
||||||
#if 0
|
|
||||||
if (pScene != NULL) return pScene;
|
|
||||||
#else
|
|
||||||
if (pScene != nullptr) return pScene;
|
if (pScene != nullptr) return pScene;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return pScene;
|
return pScene;
|
||||||
|
|
|
||||||
|
|
@ -37,9 +37,6 @@ private:
|
||||||
public:
|
public:
|
||||||
UIGroup(EUIGroup group, int iPad);
|
UIGroup(EUIGroup group, int iPad);
|
||||||
|
|
||||||
#if 0
|
|
||||||
EUIGroup GetGroup() { return m_group; }
|
|
||||||
#endif
|
|
||||||
UIComponent_Tooltips* getTooltips() { return m_tooltips; }
|
UIComponent_Tooltips* getTooltips() { return m_tooltips; }
|
||||||
UIComponent_TutorialPopup* getTutorialPopup() { return m_tutorialPopup; }
|
UIComponent_TutorialPopup* getTutorialPopup() { return m_tutorialPopup; }
|
||||||
UIScene_HUD* getHUD() { return m_hud; }
|
UIScene_HUD* getHUD() { return m_hud; }
|
||||||
|
|
@ -83,10 +80,6 @@ public:
|
||||||
void handleInput(int iPad, int key, bool repeat, bool pressed,
|
void handleInput(int iPad, int key, bool repeat, bool pressed,
|
||||||
bool released, bool& handled);
|
bool released, bool& handled);
|
||||||
|
|
||||||
#if 0
|
|
||||||
// Current active scene
|
|
||||||
UIScene* getCurrentScene();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// FOCUS
|
// FOCUS
|
||||||
bool getFocusState();
|
bool getFocusState();
|
||||||
|
|
@ -104,9 +97,6 @@ public:
|
||||||
|
|
||||||
virtual void HandleDLCMountingComplete();
|
virtual void HandleDLCMountingComplete();
|
||||||
virtual void HandleDLCInstalled();
|
virtual void HandleDLCInstalled();
|
||||||
#if 0
|
|
||||||
virtual void HandleDLCLicenseChange();
|
|
||||||
#endif
|
|
||||||
virtual void HandleMessage(EUIMessage message, void* data);
|
virtual void HandleMessage(EUIMessage message, void* data);
|
||||||
|
|
||||||
bool IsFullscreenGroup();
|
bool IsFullscreenGroup();
|
||||||
|
|
|
||||||
|
|
@ -173,7 +173,7 @@ bool UILayer::NavigateToScene(int iPad, EUIScene scene, void* initData) {
|
||||||
UIScene* newScene = NULL;
|
UIScene* newScene = NULL;
|
||||||
switch (scene) {
|
switch (scene) {
|
||||||
// Debug
|
// Debug
|
||||||
#ifdef _DEBUG_MENUS_ENABLED
|
#if defined(_DEBUG_MENUS_ENABLED)
|
||||||
case eUIScene_DebugOverlay:
|
case eUIScene_DebugOverlay:
|
||||||
newScene = new UIScene_DebugOverlay(iPad, initData, this);
|
newScene = new UIScene_DebugOverlay(iPad, initData, this);
|
||||||
break;
|
break;
|
||||||
|
|
@ -301,12 +301,6 @@ bool UILayer::NavigateToScene(int iPad, EUIScene scene, void* initData) {
|
||||||
newScene =
|
newScene =
|
||||||
new UIScene_InGamePlayerOptionsMenu(iPad, initData, this);
|
new UIScene_InGamePlayerOptionsMenu(iPad, initData, this);
|
||||||
break;
|
break;
|
||||||
#if 0 || 0
|
|
||||||
case eUIScene_InGameSaveManagementMenu:
|
|
||||||
newScene =
|
|
||||||
new UIScene_InGameSaveManagementMenu(iPad, initData, this);
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
case eUIScene_TeleportMenu:
|
case eUIScene_TeleportMenu:
|
||||||
newScene = new UIScene_TeleportMenu(iPad, initData, this);
|
newScene = new UIScene_TeleportMenu(iPad, initData, this);
|
||||||
break;
|
break;
|
||||||
|
|
@ -540,10 +534,6 @@ void UILayer::removeComponent(EUIScene scene) {
|
||||||
for (AUTO_VAR(compIt, m_components.begin());
|
for (AUTO_VAR(compIt, m_components.begin());
|
||||||
compIt != m_components.end();) {
|
compIt != m_components.end();) {
|
||||||
if ((*compIt)->getSceneType() == scene) {
|
if ((*compIt)->getSceneType() == scene) {
|
||||||
#if 0
|
|
||||||
// remove any touchboxes
|
|
||||||
ui.TouchBoxesClear((*compIt));
|
|
||||||
#endif
|
|
||||||
m_scenesToDelete.push_back((*compIt));
|
m_scenesToDelete.push_back((*compIt));
|
||||||
(*compIt)->handleDestroy(); // For anything that might
|
(*compIt)->handleDestroy(); // For anything that might
|
||||||
// require the pointer be valid
|
// require the pointer be valid
|
||||||
|
|
@ -557,10 +547,6 @@ void UILayer::removeComponent(EUIScene scene) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void UILayer::removeScene(UIScene* scene) {
|
void UILayer::removeScene(UIScene* scene) {
|
||||||
#if 0
|
|
||||||
// remove any touchboxes
|
|
||||||
ui.TouchBoxesClear(scene);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
AUTO_VAR(newEnd,
|
AUTO_VAR(newEnd,
|
||||||
std::remove(m_sceneStack.begin(), m_sceneStack.end(), scene));
|
std::remove(m_sceneStack.begin(), m_sceneStack.end(), scene));
|
||||||
|
|
@ -586,10 +572,6 @@ void UILayer::closeAllScenes() {
|
||||||
temp.insert(temp.end(), m_sceneStack.begin(), m_sceneStack.end());
|
temp.insert(temp.end(), m_sceneStack.begin(), m_sceneStack.end());
|
||||||
m_sceneStack.clear();
|
m_sceneStack.clear();
|
||||||
for (AUTO_VAR(it, temp.begin()); it != temp.end(); ++it) {
|
for (AUTO_VAR(it, temp.begin()); it != temp.end(); ++it) {
|
||||||
#if 0
|
|
||||||
// remove any touchboxes
|
|
||||||
ui.TouchBoxesClear(*it);
|
|
||||||
#endif
|
|
||||||
m_scenesToDelete.push_back(*it);
|
m_scenesToDelete.push_back(*it);
|
||||||
(*it)->handleDestroy(); // For anything that might require the pointer
|
(*it)->handleDestroy(); // For anything that might require the pointer
|
||||||
// be valid
|
// be valid
|
||||||
|
|
@ -645,9 +627,7 @@ bool UILayer::updateFocusState(bool allowedFocus /* = false */) {
|
||||||
// (and likely Vita), but I'm removing it on XboxOne so that we
|
// (and likely Vita), but I'm removing it on XboxOne so that we
|
||||||
// can avoid the scene creation time (which can be >0.5s) since
|
// can avoid the scene creation time (which can be >0.5s) since
|
||||||
// we have the memory to spare
|
// we have the memory to spare
|
||||||
#if 1
|
|
||||||
m_scenesToDestroy.push_back(scene);
|
m_scenesToDestroy.push_back(scene);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (scene->getSceneType() == eUIScene_SettingsOptionsMenu) {
|
if (scene->getSceneType() == eUIScene_SettingsOptionsMenu) {
|
||||||
|
|
@ -711,20 +691,6 @@ bool UILayer::updateFocusState(bool allowedFocus /* = false */) {
|
||||||
return m_hasFocus;
|
return m_hasFocus;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
UIScene* UILayer::getCurrentScene() {
|
|
||||||
// Note: reverse iterator, the last element is the top of the stack
|
|
||||||
for (AUTO_VAR(it, m_sceneStack.rbegin()); it != m_sceneStack.rend(); ++it) {
|
|
||||||
UIScene* scene = *it;
|
|
||||||
// 4J-PB - only used on Vita, so iPad 0 is fine
|
|
||||||
if (scene->hasFocus(0) && scene->canHandleInput()) {
|
|
||||||
return scene;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void UILayer::handleInput(int iPad, int key, bool repeat, bool pressed,
|
void UILayer::handleInput(int iPad, int key, bool repeat, bool pressed,
|
||||||
bool released, bool& handled) {
|
bool released, bool& handled) {
|
||||||
|
|
@ -767,14 +733,6 @@ void UILayer::HandleDLCInstalled() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
void UILayer::HandleDLCLicenseChange() {
|
|
||||||
for (AUTO_VAR(it, m_sceneStack.rbegin()); it != m_sceneStack.rend(); ++it) {
|
|
||||||
UIScene* topScene = *it;
|
|
||||||
topScene->HandleDLCLicenseChange();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void UILayer::HandleMessage(EUIMessage message, void* data) {
|
void UILayer::HandleMessage(EUIMessage message, void* data) {
|
||||||
for (AUTO_VAR(it, m_sceneStack.rbegin()); it != m_sceneStack.rend(); ++it) {
|
for (AUTO_VAR(it, m_sceneStack.rbegin()); it != m_sceneStack.rend(); ++it) {
|
||||||
|
|
|
||||||
|
|
@ -17,12 +17,7 @@ private:
|
||||||
std::vector<UIScene*>
|
std::vector<UIScene*>
|
||||||
m_scenesToDestroy; // A list of scenes where we want to dump the swf
|
m_scenesToDestroy; // A list of scenes where we want to dump the swf
|
||||||
|
|
||||||
#if 0
|
|
||||||
std::unordered_map<EUIScene, std::pair<int, bool>, std::hash<int>>
|
|
||||||
m_componentRefCount;
|
|
||||||
#else
|
|
||||||
std::unordered_map<EUIScene, std::pair<int, bool>> m_componentRefCount;
|
std::unordered_map<EUIScene, std::pair<int, bool>> m_componentRefCount;
|
||||||
#endif
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
bool m_hasFocus; // True if the layer "has focus", should be the only layer
|
bool m_hasFocus; // True if the layer "has focus", should be the only layer
|
||||||
|
|
@ -33,9 +28,6 @@ public:
|
||||||
bool m_bIgnoreAutosaveMenuDisplayed;
|
bool m_bIgnoreAutosaveMenuDisplayed;
|
||||||
bool m_bIgnorePlayerJoinMenuDisplayed;
|
bool m_bIgnorePlayerJoinMenuDisplayed;
|
||||||
|
|
||||||
#if 0
|
|
||||||
EUILayer m_iLayer;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
UIGroup* m_parentGroup;
|
UIGroup* m_parentGroup;
|
||||||
|
|
||||||
|
|
@ -76,10 +68,6 @@ public:
|
||||||
// INPUT
|
// INPUT
|
||||||
void handleInput(int iPad, int key, bool repeat, bool pressed,
|
void handleInput(int iPad, int key, bool repeat, bool pressed,
|
||||||
bool released, bool& handled);
|
bool released, bool& handled);
|
||||||
#if 0
|
|
||||||
// Current active scene
|
|
||||||
UIScene* getCurrentScene();
|
|
||||||
#endif
|
|
||||||
// FOCUS
|
// FOCUS
|
||||||
|
|
||||||
bool updateFocusState(bool allowedFocus = false);
|
bool updateFocusState(bool allowedFocus = false);
|
||||||
|
|
@ -90,9 +78,6 @@ public:
|
||||||
|
|
||||||
virtual void HandleDLCMountingComplete();
|
virtual void HandleDLCMountingComplete();
|
||||||
virtual void HandleDLCInstalled();
|
virtual void HandleDLCInstalled();
|
||||||
#if 0
|
|
||||||
virtual void HandleDLCLicenseChange();
|
|
||||||
#endif
|
|
||||||
virtual void HandleMessage(EUIMessage message, void* data);
|
virtual void HandleMessage(EUIMessage message, void* data);
|
||||||
|
|
||||||
void handleUnlockFullVersion();
|
void handleUnlockFullVersion();
|
||||||
|
|
|
||||||
|
|
@ -117,7 +117,6 @@ F64 UIScene::getSafeZoneHalfHeight() {
|
||||||
|
|
||||||
float safeHeight = 0.0f;
|
float safeHeight = 0.0f;
|
||||||
|
|
||||||
#if 1
|
|
||||||
if (!RenderManager.IsHiDef() && RenderManager.IsWidescreen()) {
|
if (!RenderManager.IsHiDef() && RenderManager.IsWidescreen()) {
|
||||||
// 90% safezone
|
// 90% safezone
|
||||||
safeHeight = height * (0.15f / 2);
|
safeHeight = height * (0.15f / 2);
|
||||||
|
|
@ -125,7 +124,6 @@ F64 UIScene::getSafeZoneHalfHeight() {
|
||||||
// 90% safezone
|
// 90% safezone
|
||||||
safeHeight = height * (0.1f / 2);
|
safeHeight = height * (0.1f / 2);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
return safeHeight;
|
return safeHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -133,7 +131,6 @@ F64 UIScene::getSafeZoneHalfWidth() {
|
||||||
float width = ui.getScreenWidth();
|
float width = ui.getScreenWidth();
|
||||||
|
|
||||||
float safeWidth = 0.0f;
|
float safeWidth = 0.0f;
|
||||||
#if 1
|
|
||||||
if (!RenderManager.IsHiDef() && RenderManager.IsWidescreen()) {
|
if (!RenderManager.IsHiDef() && RenderManager.IsWidescreen()) {
|
||||||
// 85% safezone
|
// 85% safezone
|
||||||
safeWidth = width * (0.15f / 2);
|
safeWidth = width * (0.15f / 2);
|
||||||
|
|
@ -141,7 +138,6 @@ F64 UIScene::getSafeZoneHalfWidth() {
|
||||||
// 90% safezone
|
// 90% safezone
|
||||||
safeWidth = width * (0.1f / 2);
|
safeWidth = width * (0.1f / 2);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
return safeWidth;
|
return safeWidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -223,23 +219,6 @@ void UIScene::initialiseMovie() {
|
||||||
m_bUpdateOpacity = true;
|
m_bUpdateOpacity = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
void UIScene::SetFocusToElement(int iID) {
|
|
||||||
IggyDataValue result;
|
|
||||||
IggyDataValue value[1];
|
|
||||||
|
|
||||||
value[0].type = IGGY_DATATYPE_number;
|
|
||||||
value[0].number = iID;
|
|
||||||
|
|
||||||
IggyResult out = IggyPlayerCallMethodRS(getMovie(), &result,
|
|
||||||
IggyPlayerRootPath(getMovie()),
|
|
||||||
m_funcSetFocus, 1, value);
|
|
||||||
|
|
||||||
// also trigger handle focus change (just in case if anything else in
|
|
||||||
// relation needs updating!)
|
|
||||||
_handleFocusChange(iID, 0);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
bool UIScene::mapElementsAndNames() {
|
bool UIScene::mapElementsAndNames() {
|
||||||
m_rootPath = IggyPlayerRootPath(swf);
|
m_rootPath = IggyPlayerRootPath(swf);
|
||||||
|
|
@ -262,18 +241,7 @@ void UIScene::loadMovie() {
|
||||||
// were being reloaded
|
// were being reloaded
|
||||||
std::wstring moviePath = getMoviePath();
|
std::wstring moviePath = getMoviePath();
|
||||||
|
|
||||||
#if 0
|
#if defined(_WINDOWS64)
|
||||||
if (RenderManager.IsWidescreen()) {
|
|
||||||
moviePath.append(L"720.swf");
|
|
||||||
m_loadedResolution = eSceneResolution_720;
|
|
||||||
} else {
|
|
||||||
moviePath.append(L"480.swf");
|
|
||||||
m_loadedResolution = eSceneResolution_480;
|
|
||||||
}
|
|
||||||
#elif 0
|
|
||||||
moviePath.append(L"Vita.swf");
|
|
||||||
m_loadedResolution = eSceneResolution_Vita;
|
|
||||||
#elif defined _WINDOWS64
|
|
||||||
if (ui.getScreenHeight() == 720) {
|
if (ui.getScreenHeight() == 720) {
|
||||||
moviePath.append(L"720.swf");
|
moviePath.append(L"720.swf");
|
||||||
m_loadedResolution = eSceneResolution_720;
|
m_loadedResolution = eSceneResolution_720;
|
||||||
|
|
@ -304,7 +272,7 @@ void UIScene::loadMovie() {
|
||||||
if (!app.hasArchiveFile(moviePath)) {
|
if (!app.hasArchiveFile(moviePath)) {
|
||||||
app.DebugPrintf("ERROR: Could not find any iggy movie for %ls!\n",
|
app.DebugPrintf("ERROR: Could not find any iggy movie for %ls!\n",
|
||||||
moviePath.c_str());
|
moviePath.c_str());
|
||||||
#ifndef _CONTENT_PACKAGE
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
__debugbreak();
|
||||||
#endif
|
#endif
|
||||||
app.FatalLoadError();
|
app.FatalLoadError();
|
||||||
|
|
@ -320,7 +288,7 @@ void UIScene::loadMovie() {
|
||||||
|
|
||||||
if (!swf) {
|
if (!swf) {
|
||||||
app.DebugPrintf("ERROR: Failed to load iggy scene!\n");
|
app.DebugPrintf("ERROR: Failed to load iggy scene!\n");
|
||||||
#ifndef _CONTENT_PACKAGE
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
__debugbreak();
|
||||||
#endif
|
#endif
|
||||||
app.FatalLoadError();
|
app.FatalLoadError();
|
||||||
|
|
@ -340,31 +308,6 @@ void UIScene::loadMovie() {
|
||||||
IggyPlayerSetUserdata(swf, this);
|
IggyPlayerSetUserdata(swf, this);
|
||||||
|
|
||||||
// #ifdef _DEBUG
|
// #ifdef _DEBUG
|
||||||
#if 0
|
|
||||||
IggyMemoryUseInfo memoryInfo;
|
|
||||||
rrbool res;
|
|
||||||
int iteration = 0;
|
|
||||||
int64_t totalStatic = 0;
|
|
||||||
int64_t totalDynamic = 0;
|
|
||||||
while(res = IggyDebugGetMemoryUseInfo ( swf ,
|
|
||||||
NULL ,
|
|
||||||
0 ,
|
|
||||||
0 ,
|
|
||||||
iteration ,
|
|
||||||
&memoryInfo ))
|
|
||||||
{
|
|
||||||
totalStatic += memoryInfo.static_allocation_bytes;
|
|
||||||
totalDynamic += memoryInfo.dynamic_allocation_bytes;
|
|
||||||
app.DebugPrintf(app.USER_SR, "%ls - %.*s static: %d ( %d ) dynamic: %d ( %d )\n", moviePath.c_str(), memoryInfo.subcategory_stringlen, memoryInfo.subcategory,
|
|
||||||
memoryInfo.static_allocation_bytes, memoryInfo.static_allocation_count, memoryInfo.dynamic_allocation_bytes, memoryInfo.dynamic_allocation_count);
|
|
||||||
++iteration;
|
|
||||||
//if(memoryInfo.static_allocation_bytes > 0) getDebugMemoryUseRecursive(moviePath, memoryInfo);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
app.DebugPrintf(app.USER_SR, "%ls - Total: %d, Expected: %d, Diff: %d\n", moviePath.c_str(), totalStatic + totalDynamic, afterTick - beforeLoad, (afterTick - beforeLoad) - (totalStatic + totalDynamic));
|
|
||||||
|
|
||||||
#endif
|
|
||||||
LeaveCriticalSection(&UIController::ms_reloadSkinCS);
|
LeaveCriticalSection(&UIController::ms_reloadSkinCS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -498,15 +441,6 @@ void UIScene::removeControl(UIControl_Base* control, bool centreScene) {
|
||||||
IggyPlayerRootPath(getMovie()),
|
IggyPlayerRootPath(getMovie()),
|
||||||
m_funcRemoveObject, 2, value);
|
m_funcRemoveObject, 2, value);
|
||||||
|
|
||||||
#if 0
|
|
||||||
// update the button positions since they may have changed
|
|
||||||
UpdateSceneControls();
|
|
||||||
|
|
||||||
// mark the button as removed
|
|
||||||
control->setHidden(true);
|
|
||||||
// remove it from the touchboxes
|
|
||||||
ui.TouchBoxRebuild(control->getParentScene());
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UIScene::slideLeft() {
|
void UIScene::slideLeft() {
|
||||||
|
|
@ -592,18 +526,9 @@ void UIScene::customDrawSlotControl(IggyCustomDrawCallbackRegion* region,
|
||||||
int list = m_parentLayer->m_parentGroup->getCommandBufferList();
|
int list = m_parentLayer->m_parentGroup->getCommandBufferList();
|
||||||
|
|
||||||
bool useCommandBuffers = false;
|
bool useCommandBuffers = false;
|
||||||
#if 0
|
|
||||||
useCommandBuffers = true;
|
|
||||||
|
|
||||||
// 4J Stu - Temporary until we fix the glint animation which
|
|
||||||
// needs updated if we are just replaying a command buffer
|
|
||||||
m_needsCacheRendered = true;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!useCommandBuffers || m_needsCacheRendered) {
|
if (!useCommandBuffers || m_needsCacheRendered) {
|
||||||
#if (!0) && (!0)
|
|
||||||
if (useCommandBuffers) RenderManager.CBuffStart(list, true);
|
if (useCommandBuffers) RenderManager.CBuffStart(list, true);
|
||||||
#endif
|
|
||||||
PIXBeginNamedEvent(0, "Draw uncached");
|
PIXBeginNamedEvent(0, "Draw uncached");
|
||||||
ui.setupCustomDrawMatrices(this, customDrawRegion);
|
ui.setupCustomDrawMatrices(this, customDrawRegion);
|
||||||
_customDrawSlotControl(customDrawRegion, iPad, item, fAlpha,
|
_customDrawSlotControl(customDrawRegion, iPad, item, fAlpha,
|
||||||
|
|
@ -627,15 +552,11 @@ void UIScene::customDrawSlotControl(IggyCustomDrawCallbackRegion* region,
|
||||||
delete drawData;
|
delete drawData;
|
||||||
}
|
}
|
||||||
PIXEndNamedEvent();
|
PIXEndNamedEvent();
|
||||||
#if 1
|
|
||||||
if (useCommandBuffers) RenderManager.CBuffEnd();
|
if (useCommandBuffers) RenderManager.CBuffEnd();
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
m_cachedSlotDraw.clear();
|
m_cachedSlotDraw.clear();
|
||||||
|
|
||||||
#if 1
|
|
||||||
if (useCommandBuffers) RenderManager.CBuffCall(list);
|
if (useCommandBuffers) RenderManager.CBuffCall(list);
|
||||||
#endif
|
|
||||||
|
|
||||||
// Finish GDraw and anything else that needs to be finalised
|
// Finish GDraw and anything else that needs to be finalised
|
||||||
ui.endCustomDraw(region);
|
ui.endCustomDraw(region);
|
||||||
|
|
@ -790,17 +711,12 @@ void UIScene::navigateBack() {
|
||||||
if (m_parentLayer == NULL) {
|
if (m_parentLayer == NULL) {
|
||||||
// app.DebugPrintf("A scene is trying to navigate back, but it's
|
// app.DebugPrintf("A scene is trying to navigate back, but it's
|
||||||
// parent layer is NULL!\n");
|
// parent layer is NULL!\n");
|
||||||
#ifndef _CONTENT_PACKAGE
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
// __debugbreak();
|
// __debugbreak();
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
// m_parentLayer->removeScene(this);
|
// m_parentLayer->removeScene(this);
|
||||||
|
|
||||||
#if 0
|
|
||||||
if (ui.GetTopScene(0))
|
|
||||||
InputManager.SetEnabledGtcButtons(
|
|
||||||
ui.GetTopScene(0)->getDefaultGtcButtons());
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -860,9 +776,6 @@ void UIScene::loseFocus() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void UIScene::handleGainFocus(bool navBack) {
|
void UIScene::handleGainFocus(bool navBack) {
|
||||||
#if 0
|
|
||||||
InputManager.SetEnabledGtcButtons(this->getDefaultGtcButtons());
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UIScene::updateTooltips() {
|
void UIScene::updateTooltips() {
|
||||||
|
|
@ -894,9 +807,6 @@ int UIScene::convertGameActionToIggyKeycode(int action) {
|
||||||
// TODO: This action to key mapping should probably use the control mapping
|
// TODO: This action to key mapping should probably use the control mapping
|
||||||
int keycode = -1;
|
int keycode = -1;
|
||||||
switch (action) {
|
switch (action) {
|
||||||
#if 0
|
|
||||||
case ACTION_MENU_TOUCHPAD_PRESS:
|
|
||||||
#endif
|
|
||||||
case ACTION_MENU_A:
|
case ACTION_MENU_A:
|
||||||
keycode = IGGY_KEYCODE_ENTER;
|
keycode = IGGY_KEYCODE_ENTER;
|
||||||
break;
|
break;
|
||||||
|
|
@ -931,11 +841,6 @@ int UIScene::convertGameActionToIggyKeycode(int action) {
|
||||||
keycode = IGGY_KEYCODE_PAGE_UP;
|
keycode = IGGY_KEYCODE_PAGE_UP;
|
||||||
break;
|
break;
|
||||||
case ACTION_MENU_PAGEDOWN:
|
case ACTION_MENU_PAGEDOWN:
|
||||||
#if 0
|
|
||||||
if (!InputManager.IsVitaTV()) {
|
|
||||||
keycode = IGGY_KEYCODE_F6;
|
|
||||||
} else
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
keycode = IGGY_KEYCODE_PAGE_DOWN;
|
keycode = IGGY_KEYCODE_PAGE_DOWN;
|
||||||
}
|
}
|
||||||
|
|
@ -989,7 +894,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
|
||||||
app.DebugPrintf(
|
app.DebugPrintf(
|
||||||
"Callback for handlePress did not have the correct number of "
|
"Callback for handlePress did not have the correct number of "
|
||||||
"arguments\n");
|
"arguments\n");
|
||||||
#ifndef _CONTENT_PACKAGE
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
__debugbreak();
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
|
|
@ -998,7 +903,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
|
||||||
call->arguments[1].type != IGGY_DATATYPE_number) {
|
call->arguments[1].type != IGGY_DATATYPE_number) {
|
||||||
app.DebugPrintf(
|
app.DebugPrintf(
|
||||||
"Arguments for handlePress were not of the correct type\n");
|
"Arguments for handlePress were not of the correct type\n");
|
||||||
#ifndef _CONTENT_PACKAGE
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
__debugbreak();
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
|
|
@ -1010,7 +915,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
|
||||||
app.DebugPrintf(
|
app.DebugPrintf(
|
||||||
"Callback for handleFocusChange did not have the correct "
|
"Callback for handleFocusChange did not have the correct "
|
||||||
"number of arguments\n");
|
"number of arguments\n");
|
||||||
#ifndef _CONTENT_PACKAGE
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
__debugbreak();
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
|
|
@ -1020,7 +925,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
|
||||||
app.DebugPrintf(
|
app.DebugPrintf(
|
||||||
"Arguments for handleFocusChange were not of the correct "
|
"Arguments for handleFocusChange were not of the correct "
|
||||||
"type\n");
|
"type\n");
|
||||||
#ifndef _CONTENT_PACKAGE
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
__debugbreak();
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
|
|
@ -1033,7 +938,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
|
||||||
app.DebugPrintf(
|
app.DebugPrintf(
|
||||||
"Callback for handleInitFocus did not have the correct number "
|
"Callback for handleInitFocus did not have the correct number "
|
||||||
"of arguments\n");
|
"of arguments\n");
|
||||||
#ifndef _CONTENT_PACKAGE
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
__debugbreak();
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
|
|
@ -1042,7 +947,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
|
||||||
call->arguments[1].type != IGGY_DATATYPE_number) {
|
call->arguments[1].type != IGGY_DATATYPE_number) {
|
||||||
app.DebugPrintf(
|
app.DebugPrintf(
|
||||||
"Arguments for handleInitFocus were not of the correct type\n");
|
"Arguments for handleInitFocus were not of the correct type\n");
|
||||||
#ifndef _CONTENT_PACKAGE
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
__debugbreak();
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
|
|
@ -1055,7 +960,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
|
||||||
app.DebugPrintf(
|
app.DebugPrintf(
|
||||||
"Callback for handleCheckboxToggled did not have the correct "
|
"Callback for handleCheckboxToggled did not have the correct "
|
||||||
"number of arguments\n");
|
"number of arguments\n");
|
||||||
#ifndef _CONTENT_PACKAGE
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
__debugbreak();
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
|
|
@ -1065,7 +970,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
|
||||||
app.DebugPrintf(
|
app.DebugPrintf(
|
||||||
"Arguments for handleCheckboxToggled were not of the correct "
|
"Arguments for handleCheckboxToggled were not of the correct "
|
||||||
"type\n");
|
"type\n");
|
||||||
#ifndef _CONTENT_PACKAGE
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
__debugbreak();
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
|
|
@ -1078,7 +983,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
|
||||||
app.DebugPrintf(
|
app.DebugPrintf(
|
||||||
"Callback for handleSliderMove did not have the correct number "
|
"Callback for handleSliderMove did not have the correct number "
|
||||||
"of arguments\n");
|
"of arguments\n");
|
||||||
#ifndef _CONTENT_PACKAGE
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
__debugbreak();
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
|
|
@ -1088,7 +993,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
|
||||||
app.DebugPrintf(
|
app.DebugPrintf(
|
||||||
"Arguments for handleSliderMove were not of the correct "
|
"Arguments for handleSliderMove were not of the correct "
|
||||||
"type\n");
|
"type\n");
|
||||||
#ifndef _CONTENT_PACKAGE
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
__debugbreak();
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
|
|
@ -1101,7 +1006,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
|
||||||
app.DebugPrintf(
|
app.DebugPrintf(
|
||||||
"Callback for handleAnimationEnd did not have the correct "
|
"Callback for handleAnimationEnd did not have the correct "
|
||||||
"number of arguments\n");
|
"number of arguments\n");
|
||||||
#ifndef _CONTENT_PACKAGE
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
__debugbreak();
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
|
|
@ -1114,7 +1019,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
|
||||||
app.DebugPrintf(
|
app.DebugPrintf(
|
||||||
"Callback for handleSelectionChanged did not have the correct "
|
"Callback for handleSelectionChanged did not have the correct "
|
||||||
"number of arguments\n");
|
"number of arguments\n");
|
||||||
#ifndef _CONTENT_PACKAGE
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
__debugbreak();
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
|
|
@ -1123,7 +1028,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
|
||||||
app.DebugPrintf(
|
app.DebugPrintf(
|
||||||
"Arguments for handleSelectionChanged were not of the correct "
|
"Arguments for handleSelectionChanged were not of the correct "
|
||||||
"type\n");
|
"type\n");
|
||||||
#ifndef _CONTENT_PACKAGE
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
__debugbreak();
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
|
|
@ -1139,7 +1044,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
|
||||||
app.DebugPrintf(
|
app.DebugPrintf(
|
||||||
"Callback for handleRequestMoreData did not have the "
|
"Callback for handleRequestMoreData did not have the "
|
||||||
"correct number of arguments\n");
|
"correct number of arguments\n");
|
||||||
#ifndef _CONTENT_PACKAGE
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
__debugbreak();
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
|
|
@ -1149,7 +1054,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
|
||||||
app.DebugPrintf(
|
app.DebugPrintf(
|
||||||
"Arguments for handleRequestMoreData were not of the "
|
"Arguments for handleRequestMoreData were not of the "
|
||||||
"correct type\n");
|
"correct type\n");
|
||||||
#ifndef _CONTENT_PACKAGE
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
__debugbreak();
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
|
|
@ -1213,15 +1118,6 @@ int UIScene::getControlFocus() { return m_iFocusControl; }
|
||||||
void UIScene::setBackScene(UIScene* scene) { m_backScene = scene; }
|
void UIScene::setBackScene(UIScene* scene) { m_backScene = scene; }
|
||||||
|
|
||||||
UIScene* UIScene::getBackScene() { return m_backScene; }
|
UIScene* UIScene::getBackScene() { return m_backScene; }
|
||||||
#if 0
|
|
||||||
void UIScene::UpdateSceneControls() {
|
|
||||||
AUTO_VAR(itEnd, GetControls()->end());
|
|
||||||
for (AUTO_VAR(it, GetControls()->begin()); it != itEnd; it++) {
|
|
||||||
UIControl* control = (UIControl*)*it;
|
|
||||||
control->UpdateControl();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void UIScene::HandleMessage(EUIMessage message, void* data) {}
|
void UIScene::HandleMessage(EUIMessage message, void* data) {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -112,13 +112,6 @@ public:
|
||||||
int getRenderWidth() { return m_renderWidth; }
|
int getRenderWidth() { return m_renderWidth; }
|
||||||
int getRenderHeight() { return m_renderHeight; }
|
int getRenderHeight() { return m_renderHeight; }
|
||||||
|
|
||||||
#if 0
|
|
||||||
UILayer* GetParentLayer() { return m_parentLayer; }
|
|
||||||
EUIGroup GetParentLayerGroup() {
|
|
||||||
return m_parentLayer->m_parentGroup->GetGroup();
|
|
||||||
}
|
|
||||||
std::vector<UIControl*>* GetControls() { return &m_controls; }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual F64 getSafeZoneHalfHeight();
|
virtual F64 getSafeZoneHalfHeight();
|
||||||
|
|
@ -148,10 +141,6 @@ public:
|
||||||
virtual void tick();
|
virtual void tick();
|
||||||
|
|
||||||
IggyName registerFastName(const std::wstring& name);
|
IggyName registerFastName(const std::wstring& name);
|
||||||
#if 0
|
|
||||||
void SetFocusToElement(int iID);
|
|
||||||
void UpdateSceneControls();
|
|
||||||
#endif
|
|
||||||
protected:
|
protected:
|
||||||
void addTimer(int id, int ms);
|
void addTimer(int id, int ms);
|
||||||
void killTimer(int id);
|
void killTimer(int id);
|
||||||
|
|
@ -273,9 +262,6 @@ public:
|
||||||
UIScene* getBackScene();
|
UIScene* getBackScene();
|
||||||
virtual void HandleDLCMountingComplete() {}
|
virtual void HandleDLCMountingComplete() {}
|
||||||
virtual void HandleDLCInstalled() {}
|
virtual void HandleDLCInstalled() {}
|
||||||
#if 0
|
|
||||||
virtual void HandleDLCLicenseChange() {}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
virtual void HandleMessage(EUIMessage message, void* data);
|
virtual void HandleMessage(EUIMessage message, void* data);
|
||||||
|
|
||||||
|
|
@ -292,9 +278,6 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
#if 0
|
|
||||||
virtual long long getDefaultGtcButtons() { return _360_GTC_BACK; }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
size_t GetCallbackUniqueId();
|
size_t GetCallbackUniqueId();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,6 @@ UIScene_AbstractContainerMenu::UIScene_AbstractContainerMenu(
|
||||||
// success or fail
|
// success or fail
|
||||||
ui.OverrideSFX(m_iPad, ACTION_MENU_A, true);
|
ui.OverrideSFX(m_iPad, ACTION_MENU_A, true);
|
||||||
ui.OverrideSFX(m_iPad, ACTION_MENU_OK, true);
|
ui.OverrideSFX(m_iPad, ACTION_MENU_OK, true);
|
||||||
#if 0
|
|
||||||
ui.OverrideSFX(m_iPad, ACTION_MENU_TOUCHPAD_PRESS, true);
|
|
||||||
#endif
|
|
||||||
ui.OverrideSFX(m_iPad, ACTION_MENU_X, true);
|
ui.OverrideSFX(m_iPad, ACTION_MENU_X, true);
|
||||||
ui.OverrideSFX(m_iPad, ACTION_MENU_Y, true);
|
ui.OverrideSFX(m_iPad, ACTION_MENU_Y, true);
|
||||||
ui.OverrideSFX(m_iPad, ACTION_MENU_LEFT_SCROLL, true);
|
ui.OverrideSFX(m_iPad, ACTION_MENU_LEFT_SCROLL, true);
|
||||||
|
|
@ -58,9 +55,6 @@ void UIScene_AbstractContainerMenu::handleDestroy() {
|
||||||
|
|
||||||
ui.OverrideSFX(m_iPad, ACTION_MENU_A, false);
|
ui.OverrideSFX(m_iPad, ACTION_MENU_A, false);
|
||||||
ui.OverrideSFX(m_iPad, ACTION_MENU_OK, false);
|
ui.OverrideSFX(m_iPad, ACTION_MENU_OK, false);
|
||||||
#if 0
|
|
||||||
ui.OverrideSFX(m_iPad, ACTION_MENU_TOUCHPAD_PRESS, false);
|
|
||||||
#endif
|
|
||||||
ui.OverrideSFX(m_iPad, ACTION_MENU_X, false);
|
ui.OverrideSFX(m_iPad, ACTION_MENU_X, false);
|
||||||
ui.OverrideSFX(m_iPad, ACTION_MENU_Y, false);
|
ui.OverrideSFX(m_iPad, ACTION_MENU_Y, false);
|
||||||
ui.OverrideSFX(m_iPad, ACTION_MENU_LEFT_SCROLL, false);
|
ui.OverrideSFX(m_iPad, ACTION_MENU_LEFT_SCROLL, false);
|
||||||
|
|
@ -113,21 +107,6 @@ void UIScene_AbstractContainerMenu::PlatformInitialize(int iPad,
|
||||||
m_fPanelMinY = fPanelY;
|
m_fPanelMinY = fPanelY;
|
||||||
m_fPanelMaxY = fPanelY + fPanelHeight;
|
m_fPanelMaxY = fPanelY + fPanelHeight;
|
||||||
|
|
||||||
#if 0
|
|
||||||
// we need to map the touchpad rectangle to the UI rectangle. While it works
|
|
||||||
// great for the creative menu, it is much too sensitive for the smaller
|
|
||||||
// menus.
|
|
||||||
// X coordinate of the touch point (0 to 1919)
|
|
||||||
// Y coordinate of the touch point (0 to 941: DUALSHOCK®4 wireless
|
|
||||||
// controllers and the CUH-ZCT1J/CAP-ZCT1J/CAP-ZCT1U controllers for the
|
|
||||||
// PlayStation®4 development tool, 0 to 753: JDX-1000x series controllers
|
|
||||||
// for the PlayStation®4 development tool,)
|
|
||||||
m_fTouchPadMulX = fPanelWidth / 1919.0f;
|
|
||||||
m_fTouchPadMulY = fPanelHeight / 941.0f;
|
|
||||||
m_fTouchPadDeadZoneX = 15.0f * m_fTouchPadMulX;
|
|
||||||
m_fTouchPadDeadZoneY = 15.0f * m_fTouchPadMulY;
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// 4J-PB - need to limit this in splitscreen
|
// 4J-PB - need to limit this in splitscreen
|
||||||
if (app.GetLocalPlayerCount() > 1) {
|
if (app.GetLocalPlayerCount() > 1) {
|
||||||
|
|
@ -172,7 +151,7 @@ void UIScene_AbstractContainerMenu::PlatformInitialize(int iPad,
|
||||||
IggyEventResult result;
|
IggyEventResult result;
|
||||||
IggyPlayerDispatchEventRS(getMovie(), &mouseEvent, &result);
|
IggyPlayerDispatchEventRS(getMovie(), &mouseEvent, &result);
|
||||||
|
|
||||||
#ifdef USE_POINTER_ACCEL
|
#if defined(USE_POINTER_ACCEL)
|
||||||
m_fPointerVelX = 0.0f;
|
m_fPointerVelX = 0.0f;
|
||||||
m_fPointerVelY = 0.0f;
|
m_fPointerVelY = 0.0f;
|
||||||
m_fPointerAccelX = 0.0f;
|
m_fPointerAccelX = 0.0f;
|
||||||
|
|
@ -193,10 +172,6 @@ void UIScene_AbstractContainerMenu::tick() {
|
||||||
IggyMakeEventMouseMove(&mouseEvent, x, y);
|
IggyMakeEventMouseMove(&mouseEvent, x, y);
|
||||||
|
|
||||||
// 4J Stu - This seems to be broken on Durango, so do it ourself
|
// 4J Stu - This seems to be broken on Durango, so do it ourself
|
||||||
#if 0
|
|
||||||
// mouseEvent.x = x;
|
|
||||||
// mouseEvent.y = y;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
IggyEventResult result;
|
IggyEventResult result;
|
||||||
IggyPlayerDispatchEventRS(getMovie(), &mouseEvent, &result);
|
IggyPlayerDispatchEventRS(getMovie(), &mouseEvent, &result);
|
||||||
|
|
|
||||||
|
|
@ -309,32 +309,10 @@ int UIScene_AnvilMenu::KeyboardCompleteCallback(void* lpParam, bool bRes) {
|
||||||
|
|
||||||
void UIScene_AnvilMenu::handleEditNamePressed() {
|
void UIScene_AnvilMenu::handleEditNamePressed() {
|
||||||
setIgnoreInput(true);
|
setIgnoreInput(true);
|
||||||
#if 0 || 0 || 0
|
|
||||||
int language = XGetLanguage();
|
|
||||||
switch (language) {
|
|
||||||
case XC_LANGUAGE_JAPANESE:
|
|
||||||
case XC_LANGUAGE_KOREAN:
|
|
||||||
case XC_LANGUAGE_TCHINESE:
|
|
||||||
InputManager.RequestKeyboard(
|
|
||||||
app.GetString(IDS_TITLE_RENAME), m_textInputAnvil.getLabel(),
|
|
||||||
m_iPad, 30, &UIScene_AnvilMenu::KeyboardCompleteCallback, this,
|
|
||||||
C_4JInput::EKeyboardMode_Default);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
// 4J Stu - Use a different keyboard for non-asian languages so we
|
|
||||||
// don't have prediction on
|
|
||||||
InputManager.RequestKeyboard(
|
|
||||||
app.GetString(IDS_TITLE_RENAME), m_textInputAnvil.getLabel(),
|
|
||||||
m_iPad, 30, &UIScene_AnvilMenu::KeyboardCompleteCallback, this,
|
|
||||||
C_4JInput::EKeyboardMode_Alphabet_Extended);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
InputManager.RequestKeyboard(app.GetString(IDS_TITLE_RENAME),
|
InputManager.RequestKeyboard(app.GetString(IDS_TITLE_RENAME),
|
||||||
m_textInputAnvil.getLabel(), m_iPad, 30,
|
m_textInputAnvil.getLabel(), m_iPad, 30,
|
||||||
&UIScene_AnvilMenu::KeyboardCompleteCallback,
|
&UIScene_AnvilMenu::KeyboardCompleteCallback,
|
||||||
this, C_4JInput::EKeyboardMode_Default);
|
this, C_4JInput::EKeyboardMode_Default);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UIScene_AnvilMenu::setEditNameValue(const std::wstring& name) {
|
void UIScene_AnvilMenu::setEditNameValue(const std::wstring& name) {
|
||||||
|
|
@ -379,14 +357,8 @@ void UIScene_AnvilMenu::showCross(bool show) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void UIScene_AnvilMenu::handleDestroy() {
|
void UIScene_AnvilMenu::handleDestroy() {
|
||||||
#if 0
|
|
||||||
app.DebugPrintf("missing InputManager.DestroyKeyboard on Vita !!!!!!\n");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// another player destroyed the anvil, so shut down the keyboard if it is
|
// another player destroyed the anvil, so shut down the keyboard if it is
|
||||||
// displayed
|
// displayed
|
||||||
#if (0 || 0 || 0)
|
|
||||||
InputManager.DestroyKeyboard();
|
|
||||||
#endif
|
|
||||||
UIScene_AbstractContainerMenu::handleDestroy();
|
UIScene_AbstractContainerMenu::handleDestroy();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,12 +28,6 @@ UIScene_ConnectingProgress::UIScene_ConnectingProgress(int iPad,
|
||||||
m_buttonConfirm.init(app.GetString(IDS_CONFIRM_OK), eControl_Confirm);
|
m_buttonConfirm.init(app.GetString(IDS_CONFIRM_OK), eControl_Confirm);
|
||||||
m_buttonConfirm.setVisible(false);
|
m_buttonConfirm.setVisible(false);
|
||||||
|
|
||||||
#if 0
|
|
||||||
if(app.GetLocalPlayerCount()>1)
|
|
||||||
{
|
|
||||||
app.AdjustSplitscreenScene(m_hObj,&m_OriginalPosition,m_iPad,false);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
m_showTooltips = param->showTooltips;
|
m_showTooltips = param->showTooltips;
|
||||||
m_runFailTimer = param->setFailTimer;
|
m_runFailTimer = param->setFailTimer;
|
||||||
|
|
@ -63,9 +57,6 @@ void UIScene_ConnectingProgress::tick() {
|
||||||
|
|
||||||
Minecraft* pMinecraft = Minecraft::GetInstance();
|
Minecraft* pMinecraft = Minecraft::GetInstance();
|
||||||
pMinecraft->removeLocalPlayerIdx(m_iPad);
|
pMinecraft->removeLocalPlayerIdx(m_iPad);
|
||||||
#if 0
|
|
||||||
ProfileManager.RemoveGamepadFromGame(m_iPad);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -107,9 +98,6 @@ void UIScene_ConnectingProgress::handleTimerComplete(int id) {
|
||||||
|
|
||||||
if (pMinecraft->m_connectionFailed[m_iPad] ||
|
if (pMinecraft->m_connectionFailed[m_iPad] ||
|
||||||
!g_NetworkManager.IsInSession()) {
|
!g_NetworkManager.IsInSession()) {
|
||||||
#if 0
|
|
||||||
app.RemoveBackScene(m_iPad);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int exitReasonStringId;
|
int exitReasonStringId;
|
||||||
switch (pMinecraft->m_connectionFailedReason[m_iPad]) {
|
switch (pMinecraft->m_connectionFailedReason[m_iPad]) {
|
||||||
|
|
@ -130,20 +118,6 @@ void UIScene_ConnectingProgress::handleTimerComplete(int id) {
|
||||||
exitReasonStringId =
|
exitReasonStringId =
|
||||||
IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_SINGLE_LOCAL;
|
IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_SINGLE_LOCAL;
|
||||||
break;
|
break;
|
||||||
#if 0 || 0
|
|
||||||
case DisconnectPacket::eDisconnect_ContentRestricted_AllLocal:
|
|
||||||
exitReasonStringId = IDS_CONTENT_RESTRICTION_MULTIPLAYER;
|
|
||||||
break;
|
|
||||||
case DisconnectPacket::eDisconnect_ContentRestricted_Single_Local:
|
|
||||||
exitReasonStringId = IDS_CONTENT_RESTRICTION;
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
#if 0
|
|
||||||
case DisconnectPacket::eDisconnect_NoUGC_Remote:
|
|
||||||
exitReasonStringId =
|
|
||||||
IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_REMOTE;
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
case DisconnectPacket::eDisconnect_NoFlying:
|
case DisconnectPacket::eDisconnect_NoFlying:
|
||||||
exitReasonStringId = IDS_DISCONNECTED_FLYING;
|
exitReasonStringId = IDS_DISCONNECTED_FLYING;
|
||||||
break;
|
break;
|
||||||
|
|
@ -156,11 +130,6 @@ void UIScene_ConnectingProgress::handleTimerComplete(int id) {
|
||||||
case DisconnectPacket::eDisconnect_OutdatedClient:
|
case DisconnectPacket::eDisconnect_OutdatedClient:
|
||||||
exitReasonStringId = IDS_DISCONNECTED_CLIENT_OLD;
|
exitReasonStringId = IDS_DISCONNECTED_CLIENT_OLD;
|
||||||
break;
|
break;
|
||||||
#if 0 || 0 || 0
|
|
||||||
case DisconnectPacket::eDisconnect_NATMismatch:
|
|
||||||
exitReasonStringId = IDS_DISCONNECTED_NAT_TYPE_MISMATCH;
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
default:
|
default:
|
||||||
exitReasonStringId = IDS_CONNECTION_LOST_SERVER;
|
exitReasonStringId = IDS_CONNECTION_LOST_SERVER;
|
||||||
break;
|
break;
|
||||||
|
|
@ -219,9 +188,6 @@ void UIScene_ConnectingProgress::handleInput(int iPad, int key, bool repeat,
|
||||||
// }
|
// }
|
||||||
// break;
|
// break;
|
||||||
case ACTION_MENU_OK:
|
case ACTION_MENU_OK:
|
||||||
#if 0
|
|
||||||
case ACTION_MENU_TOUCHPAD_PRESS:
|
|
||||||
#endif
|
|
||||||
if (pressed) {
|
if (pressed) {
|
||||||
sendInputToMovie(key, repeat, pressed, released);
|
sendInputToMovie(key, repeat, pressed, released);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,9 +44,6 @@ protected:
|
||||||
// TODO: This should be pure virtual in this class
|
// TODO: This should be pure virtual in this class
|
||||||
virtual std::wstring getMoviePath();
|
virtual std::wstring getMoviePath();
|
||||||
|
|
||||||
#if 0
|
|
||||||
virtual long long getDefaultGtcButtons() { return 0; }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// INPUT
|
// INPUT
|
||||||
|
|
|
||||||
|
|
@ -13,16 +13,8 @@ UIScene_ControlsMenu::UIScene_ControlsMenu(int iPad, void* initData,
|
||||||
IggyDataValue result;
|
IggyDataValue result;
|
||||||
IggyDataValue value[1];
|
IggyDataValue value[1];
|
||||||
value[0].type = IGGY_DATATYPE_number;
|
value[0].type = IGGY_DATATYPE_number;
|
||||||
#if 0 || defined(_WIN64)
|
#if defined(_WIN64)
|
||||||
value[0].number = (F64)0;
|
value[0].number = (F64)0;
|
||||||
#elif 0
|
|
||||||
value[0].number = (F64)1;
|
|
||||||
#elif 0
|
|
||||||
value[0].number = (F64)2;
|
|
||||||
#elif 0
|
|
||||||
value[0].number = (F64)3;
|
|
||||||
#elif 0
|
|
||||||
value[0].number = (F64)4;
|
|
||||||
#endif
|
#endif
|
||||||
IggyResult out = IggyPlayerCallMethodRS(getMovie(), &result,
|
IggyResult out = IggyPlayerCallMethodRS(getMovie(), &result,
|
||||||
IggyPlayerRootPath(getMovie()),
|
IggyPlayerRootPath(getMovie()),
|
||||||
|
|
@ -44,17 +36,11 @@ UIScene_ControlsMenu::UIScene_ControlsMenu(int iPad, void* initData,
|
||||||
!bNotInGame && Minecraft::GetInstance()->localplayers[m_iPad] &&
|
!bNotInGame && Minecraft::GetInstance()->localplayers[m_iPad] &&
|
||||||
Minecraft::GetInstance()->localplayers[m_iPad]->abilities.mayfly;
|
Minecraft::GetInstance()->localplayers[m_iPad]->abilities.mayfly;
|
||||||
|
|
||||||
#if 1
|
|
||||||
#if 0
|
|
||||||
// no buttons to initialise if we're running this on PS4 remote play
|
|
||||||
if (!InputManager.UsingRemoteVita())
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
m_buttonLayouts[0].init(L"1", eControl_Button0);
|
m_buttonLayouts[0].init(L"1", eControl_Button0);
|
||||||
m_buttonLayouts[1].init(L"2", eControl_Button1);
|
m_buttonLayouts[1].init(L"2", eControl_Button1);
|
||||||
m_buttonLayouts[2].init(L"3", eControl_Button2);
|
m_buttonLayouts[2].init(L"3", eControl_Button2);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
m_checkboxInvert.init(
|
m_checkboxInvert.init(
|
||||||
app.GetString(IDS_INVERT_LOOK), eControl_InvertLook,
|
app.GetString(IDS_INVERT_LOOK), eControl_InvertLook,
|
||||||
|
|
@ -69,24 +55,15 @@ UIScene_ControlsMenu::UIScene_ControlsMenu(int iPad, void* initData,
|
||||||
|
|
||||||
int iSelected = app.GetGameSettings(m_iPad, eGameSetting_ControlScheme);
|
int iSelected = app.GetGameSettings(m_iPad, eGameSetting_ControlScheme);
|
||||||
|
|
||||||
#if 1
|
|
||||||
LPWSTR layoutString = new wchar_t[128];
|
LPWSTR layoutString = new wchar_t[128];
|
||||||
swprintf(layoutString, 128, L"%ls : %ls", app.GetString(IDS_CURRENT_LAYOUT),
|
swprintf(layoutString, 128, L"%ls : %ls", app.GetString(IDS_CURRENT_LAYOUT),
|
||||||
app.GetString(m_iSchemeTextA[iSelected]));
|
app.GetString(m_iSchemeTextA[iSelected]));
|
||||||
#if 0
|
|
||||||
if (!InputManager.UsingRemoteVita())
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
m_labelCurrentLayout.init(layoutString);
|
m_labelCurrentLayout.init(layoutString);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
m_iCurrentNavigatedControlsLayout = iSelected;
|
m_iCurrentNavigatedControlsLayout = iSelected;
|
||||||
|
|
||||||
#if 0
|
|
||||||
// don't set controller layout if we're entering the PS4 remote play scene
|
|
||||||
if (!InputManager.UsingRemoteVita())
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
IggyDataValue result;
|
IggyDataValue result;
|
||||||
IggyDataValue value[1];
|
IggyDataValue value[1];
|
||||||
|
|
@ -97,13 +74,6 @@ UIScene_ControlsMenu::UIScene_ControlsMenu(int iPad, void* initData,
|
||||||
m_funcSetControllerLayout, 1, value);
|
m_funcSetControllerLayout, 1, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
// Set mapping to Vita mapping
|
|
||||||
if (InputManager.UsingRemoteVita()) m_iCurrentNavigatedControlsLayout = 3;
|
|
||||||
#elif 0
|
|
||||||
// Set mapping to Vita mapping
|
|
||||||
if (InputManager.IsVitaTV()) m_iCurrentNavigatedControlsLayout = 1;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
for (unsigned int i = 0; i < e_PadCOUNT; ++i) {
|
for (unsigned int i = 0; i < e_PadCOUNT; ++i) {
|
||||||
m_labelsPad[i].init(L"");
|
m_labelsPad[i].init(L"");
|
||||||
|
|
@ -115,16 +85,6 @@ UIScene_ControlsMenu::UIScene_ControlsMenu(int iPad, void* initData,
|
||||||
}
|
}
|
||||||
|
|
||||||
std::wstring UIScene_ControlsMenu::getMoviePath() {
|
std::wstring UIScene_ControlsMenu::getMoviePath() {
|
||||||
#if 0
|
|
||||||
if (InputManager.UsingRemoteVita()) {
|
|
||||||
return L"ControlsRemotePlay";
|
|
||||||
} else
|
|
||||||
#endif
|
|
||||||
#if 0
|
|
||||||
if (InputManager.IsVitaTV()) {
|
|
||||||
return L"ControlsTV";
|
|
||||||
} else
|
|
||||||
#endif
|
|
||||||
if (app.GetLocalPlayerCount() > 1) {
|
if (app.GetLocalPlayerCount() > 1) {
|
||||||
return L"ControlsSplit";
|
return L"ControlsSplit";
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -157,9 +117,6 @@ void UIScene_ControlsMenu::handleInput(int iPad, int key, bool repeat,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ACTION_MENU_OK:
|
case ACTION_MENU_OK:
|
||||||
#if 0
|
|
||||||
case ACTION_MENU_TOUCHPAD_PRESS:
|
|
||||||
#endif
|
|
||||||
if (pressed) {
|
if (pressed) {
|
||||||
// CD - Added for audio
|
// CD - Added for audio
|
||||||
ui.PlayUISFX(eSFX_Press);
|
ui.PlayUISFX(eSFX_Press);
|
||||||
|
|
@ -201,9 +158,6 @@ void UIScene_ControlsMenu::handlePress(F64 controlId, F64 childId) {
|
||||||
swprintf(layoutString, 128, L"%ls : %ls",
|
swprintf(layoutString, 128, L"%ls : %ls",
|
||||||
app.GetString(IDS_CURRENT_LAYOUT),
|
app.GetString(IDS_CURRENT_LAYOUT),
|
||||||
app.GetString(m_iSchemeTextA[control]));
|
app.GetString(m_iSchemeTextA[control]));
|
||||||
#if 0
|
|
||||||
if (!InputManager.UsingRemoteVita())
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
m_labelCurrentLayout.setLabel(layoutString);
|
m_labelCurrentLayout.setLabel(layoutString);
|
||||||
}
|
}
|
||||||
|
|
@ -268,11 +222,7 @@ void UIScene_ControlsMenu::PositionAllText(int iPad) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool layoutHasDpadFly;
|
bool layoutHasDpadFly;
|
||||||
#if 0
|
|
||||||
layoutHasDpadFly = m_iCurrentNavigatedControlsLayout == 1;
|
|
||||||
#else
|
|
||||||
layoutHasDpadFly = m_iCurrentNavigatedControlsLayout == 0;
|
layoutHasDpadFly = m_iCurrentNavigatedControlsLayout == 0;
|
||||||
#endif
|
|
||||||
|
|
||||||
// If we're in controls mode 1, and creative mode show the dpad for Creative
|
// If we're in controls mode 1, and creative mode show the dpad for Creative
|
||||||
// Mode
|
// Mode
|
||||||
|
|
@ -296,13 +246,7 @@ void UIScene_ControlsMenu::PositionText(int iPad, int iTextID,
|
||||||
if (uiVal & _360_JOY_BUTTON_Y)
|
if (uiVal & _360_JOY_BUTTON_Y)
|
||||||
PositionTextDirect(iPad, iTextID, e_PadY, true);
|
PositionTextDirect(iPad, iTextID, e_PadY, true);
|
||||||
if (uiVal & _360_JOY_BUTTON_BACK) {
|
if (uiVal & _360_JOY_BUTTON_BACK) {
|
||||||
#if 0
|
|
||||||
PositionTextDirect(
|
|
||||||
iPad, iTextID,
|
|
||||||
(InputManager.UsingRemoteVita() ? e_PadTouch : e_PadBack), true);
|
|
||||||
#else
|
|
||||||
PositionTextDirect(iPad, iTextID, e_PadBack, true);
|
PositionTextDirect(iPad, iTextID, e_PadBack, true);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
if (uiVal & _360_JOY_BUTTON_START)
|
if (uiVal & _360_JOY_BUTTON_START)
|
||||||
PositionTextDirect(iPad, iTextID, e_PadStart, true);
|
PositionTextDirect(iPad, iTextID, e_PadStart, true);
|
||||||
|
|
|
||||||
|
|
@ -51,10 +51,6 @@ private:
|
||||||
IggyName m_funcSetPlatform, m_funcSetControllerLayout;
|
IggyName m_funcSetPlatform, m_funcSetControllerLayout;
|
||||||
UI_BEGIN_MAP_ELEMENTS_AND_NAMES(UIScene)
|
UI_BEGIN_MAP_ELEMENTS_AND_NAMES(UIScene)
|
||||||
|
|
||||||
#if 1
|
|
||||||
#if 0
|
|
||||||
if (!InputManager.UsingRemoteVita())
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
UI_MAP_ELEMENT(m_labelCurrentLayout, "CurrentLayout")
|
UI_MAP_ELEMENT(m_labelCurrentLayout, "CurrentLayout")
|
||||||
|
|
||||||
|
|
@ -62,7 +58,6 @@ private:
|
||||||
UI_MAP_ELEMENT(m_buttonLayouts[1], "Button2")
|
UI_MAP_ELEMENT(m_buttonLayouts[1], "Button2")
|
||||||
UI_MAP_ELEMENT(m_buttonLayouts[2], "Button3")
|
UI_MAP_ELEMENT(m_buttonLayouts[2], "Button3")
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
UI_MAP_ELEMENT(m_labelsPad[e_PadBack], "LabelBack")
|
UI_MAP_ELEMENT(m_labelsPad[e_PadBack], "LabelBack")
|
||||||
UI_MAP_ELEMENT(m_labelsPad[e_PadLT], "LabelLT")
|
UI_MAP_ELEMENT(m_labelsPad[e_PadLT], "LabelLT")
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,6 @@
|
||||||
#include "../../Minecraft.World/Headers/net.minecraft.world.inventory.h"
|
#include "../../Minecraft.World/Headers/net.minecraft.world.inventory.h"
|
||||||
#include "UIScene_CraftingMenu.h"
|
#include "UIScene_CraftingMenu.h"
|
||||||
|
|
||||||
#if 0
|
|
||||||
#define GAME_CRAFTING_TOUCHUPDATE_TIMER_ID 0
|
|
||||||
#define GAME_CRAFTING_TOUCHUPDATE_TIMER_TIME 100
|
|
||||||
#endif
|
|
||||||
|
|
||||||
UIScene_CraftingMenu::UIScene_CraftingMenu(int iPad, void* _initData,
|
UIScene_CraftingMenu::UIScene_CraftingMenu(int iPad, void* _initData,
|
||||||
UILayer* parentLayer)
|
UILayer* parentLayer)
|
||||||
|
|
@ -121,7 +117,7 @@ UIScene_CraftingMenu::UIScene_CraftingMenu(int iPad, void* _initData,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _TO_BE_IMPLEMENTED
|
#if defined(_TO_BE_IMPLEMENTED)
|
||||||
XuiSetTimer(m_hObj, IGNORE_KEYPRESS_TIMERID, IGNORE_KEYPRESS_TIME);
|
XuiSetTimer(m_hObj, IGNORE_KEYPRESS_TIMERID, IGNORE_KEYPRESS_TIME);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -164,9 +160,6 @@ UIScene_CraftingMenu::UIScene_CraftingMenu(int iPad, void* _initData,
|
||||||
// success or fail
|
// success or fail
|
||||||
ui.OverrideSFX(m_iPad, ACTION_MENU_A, true);
|
ui.OverrideSFX(m_iPad, ACTION_MENU_A, true);
|
||||||
ui.OverrideSFX(m_iPad, ACTION_MENU_OK, true);
|
ui.OverrideSFX(m_iPad, ACTION_MENU_OK, true);
|
||||||
#if 0
|
|
||||||
ui.OverrideSFX(m_iPad, ACTION_MENU_TOUCHPAD_PRESS, true);
|
|
||||||
#endif
|
|
||||||
ui.OverrideSFX(m_iPad, ACTION_MENU_LEFT_SCROLL, true);
|
ui.OverrideSFX(m_iPad, ACTION_MENU_LEFT_SCROLL, true);
|
||||||
ui.OverrideSFX(m_iPad, ACTION_MENU_RIGHT_SCROLL, true);
|
ui.OverrideSFX(m_iPad, ACTION_MENU_RIGHT_SCROLL, true);
|
||||||
ui.OverrideSFX(m_iPad, ACTION_MENU_LEFT, true);
|
ui.OverrideSFX(m_iPad, ACTION_MENU_LEFT, true);
|
||||||
|
|
@ -178,13 +171,6 @@ UIScene_CraftingMenu::UIScene_CraftingMenu(int iPad, void* _initData,
|
||||||
// CheckRecipesAvailable
|
// CheckRecipesAvailable
|
||||||
UpdateTooltips();
|
UpdateTooltips();
|
||||||
|
|
||||||
#if 0
|
|
||||||
// initialise vita touch controls with ids
|
|
||||||
for (unsigned int i = 0; i < ETouchInput_Count; ++i) {
|
|
||||||
m_TouchInput[i].init(i);
|
|
||||||
}
|
|
||||||
ui.TouchBoxRebuild(this);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UIScene_CraftingMenu::handleDestroy() {
|
void UIScene_CraftingMenu::handleDestroy() {
|
||||||
|
|
@ -210,9 +196,6 @@ void UIScene_CraftingMenu::handleDestroy() {
|
||||||
|
|
||||||
ui.OverrideSFX(m_iPad, ACTION_MENU_A, false);
|
ui.OverrideSFX(m_iPad, ACTION_MENU_A, false);
|
||||||
ui.OverrideSFX(m_iPad, ACTION_MENU_OK, false);
|
ui.OverrideSFX(m_iPad, ACTION_MENU_OK, false);
|
||||||
#if 0
|
|
||||||
ui.OverrideSFX(m_iPad, ACTION_MENU_TOUCHPAD_PRESS, false);
|
|
||||||
#endif
|
|
||||||
ui.OverrideSFX(m_iPad, ACTION_MENU_LEFT_SCROLL, false);
|
ui.OverrideSFX(m_iPad, ACTION_MENU_LEFT_SCROLL, false);
|
||||||
ui.OverrideSFX(m_iPad, ACTION_MENU_RIGHT_SCROLL, false);
|
ui.OverrideSFX(m_iPad, ACTION_MENU_RIGHT_SCROLL, false);
|
||||||
ui.OverrideSFX(m_iPad, ACTION_MENU_LEFT, false);
|
ui.OverrideSFX(m_iPad, ACTION_MENU_LEFT, false);
|
||||||
|
|
@ -246,123 +229,6 @@ std::wstring UIScene_CraftingMenu::getMoviePath() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
UIControl* UIScene_CraftingMenu::GetMainPanel() { return &m_controlMainPanel; }
|
|
||||||
|
|
||||||
void UIScene_CraftingMenu::handleTouchInput(unsigned int iPad, S32 x, S32 y,
|
|
||||||
int iId, bool bPressed,
|
|
||||||
bool bRepeat, bool bReleased) {
|
|
||||||
// perform action on release
|
|
||||||
if (bPressed) {
|
|
||||||
if (iId == ETouchInput_CraftingHSlots) {
|
|
||||||
m_iCraftingSlotTouchStartY = y;
|
|
||||||
}
|
|
||||||
} else if (bRepeat) {
|
|
||||||
if (iId == ETouchInput_CraftingHSlots) {
|
|
||||||
if (y >= m_iCraftingSlotTouchStartY +
|
|
||||||
m_TouchInput[ETouchInput_CraftingHSlots]
|
|
||||||
.getHeight()) // scroll list down
|
|
||||||
{
|
|
||||||
if (iVSlotIndexA[1] ==
|
|
||||||
(CanBeMadeA[m_iCurrentSlotHIndex].iCount - 1)) {
|
|
||||||
iVSlotIndexA[1] = 0;
|
|
||||||
} else {
|
|
||||||
iVSlotIndexA[1]++;
|
|
||||||
}
|
|
||||||
ui.PlayUISFX(eSFX_Focus);
|
|
||||||
|
|
||||||
UpdateVerticalSlots();
|
|
||||||
UpdateHighlight();
|
|
||||||
|
|
||||||
m_iCraftingSlotTouchStartY = y;
|
|
||||||
} else if (y <= m_iCraftingSlotTouchStartY -
|
|
||||||
m_TouchInput[ETouchInput_CraftingHSlots]
|
|
||||||
.getHeight()) // scroll list up
|
|
||||||
{
|
|
||||||
if (iVSlotIndexA[1] == 0) {
|
|
||||||
iVSlotIndexA[1] =
|
|
||||||
CanBeMadeA[m_iCurrentSlotHIndex].iCount - 1;
|
|
||||||
} else {
|
|
||||||
iVSlotIndexA[1]--;
|
|
||||||
}
|
|
||||||
ui.PlayUISFX(eSFX_Focus);
|
|
||||||
|
|
||||||
UpdateVerticalSlots();
|
|
||||||
UpdateHighlight();
|
|
||||||
|
|
||||||
m_iCraftingSlotTouchStartY = y;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (bReleased) {
|
|
||||||
if (iId >= ETouchInput_TouchPanel_0 &&
|
|
||||||
iId <= ETouchInput_TouchPanel_6) // Touch Change Group
|
|
||||||
{
|
|
||||||
m_iGroupIndex = iId;
|
|
||||||
// turn on the new group
|
|
||||||
showTabHighlight(m_iGroupIndex, true);
|
|
||||||
|
|
||||||
m_iCurrentSlotHIndex = 0;
|
|
||||||
m_iCurrentSlotVIndex = 1;
|
|
||||||
CheckRecipesAvailable();
|
|
||||||
// reset the vertical slots
|
|
||||||
iVSlotIndexA[0] = CanBeMadeA[m_iCurrentSlotHIndex].iCount - 1;
|
|
||||||
iVSlotIndexA[1] = 0;
|
|
||||||
iVSlotIndexA[2] = 1;
|
|
||||||
ui.PlayUISFX(eSFX_Focus);
|
|
||||||
UpdateVerticalSlots();
|
|
||||||
UpdateHighlight();
|
|
||||||
setGroupText(GetGroupNameText(m_pGroupA[m_iGroupIndex]));
|
|
||||||
} else if (iId == ETouchInput_CraftingHSlots) // Touch Change Slot
|
|
||||||
{
|
|
||||||
int iMaxHSlots = 0;
|
|
||||||
if (m_iContainerType == RECIPE_TYPE_3x3) {
|
|
||||||
iMaxHSlots = m_iMaxHSlot3x3C;
|
|
||||||
} else {
|
|
||||||
iMaxHSlots = m_iMaxHSlot2x2C;
|
|
||||||
}
|
|
||||||
|
|
||||||
int iNewSlot =
|
|
||||||
(x - m_TouchInput[ETouchInput_CraftingHSlots].getXPos() -
|
|
||||||
m_controlMainPanel.getXPos()) /
|
|
||||||
m_TouchInput[ETouchInput_CraftingHSlots].getHeight();
|
|
||||||
|
|
||||||
int iOldHSlot = m_iCurrentSlotHIndex;
|
|
||||||
|
|
||||||
m_iCurrentSlotHIndex = iNewSlot;
|
|
||||||
if (m_iCurrentSlotHIndex >= m_iCraftablesMaxHSlotC)
|
|
||||||
m_iCurrentSlotHIndex = 0;
|
|
||||||
m_iCurrentSlotVIndex = 1;
|
|
||||||
// clear the indices
|
|
||||||
iVSlotIndexA[0] = CanBeMadeA[m_iCurrentSlotHIndex].iCount - 1;
|
|
||||||
iVSlotIndexA[1] = 0;
|
|
||||||
iVSlotIndexA[2] = 1;
|
|
||||||
|
|
||||||
UpdateVerticalSlots();
|
|
||||||
UpdateHighlight();
|
|
||||||
// re-enable the old hslot
|
|
||||||
if (CanBeMadeA[iOldHSlot].iCount > 0) {
|
|
||||||
setShowCraftHSlot(iOldHSlot, true);
|
|
||||||
}
|
|
||||||
ui.PlayUISFX(eSFX_Focus);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void UIScene_CraftingMenu::handleTouchBoxRebuild() {
|
|
||||||
addTimer(GAME_CRAFTING_TOUCHUPDATE_TIMER_ID,
|
|
||||||
GAME_CRAFTING_TOUCHUPDATE_TIMER_TIME);
|
|
||||||
}
|
|
||||||
|
|
||||||
void UIScene_CraftingMenu::handleTimerComplete(int id) {
|
|
||||||
if (id == GAME_CRAFTING_TOUCHUPDATE_TIMER_ID) {
|
|
||||||
// we cannot rebuild touch boxes in an iggy callback because it requires
|
|
||||||
// further iggy calls
|
|
||||||
GetMainPanel()->UpdateControl();
|
|
||||||
ui.TouchBoxRebuild(this);
|
|
||||||
killTimer(GAME_CRAFTING_TOUCHUPDATE_TIMER_ID);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void UIScene_CraftingMenu::handleReload() {
|
void UIScene_CraftingMenu::handleReload() {
|
||||||
m_slotListInventory.addSlots(
|
m_slotListInventory.addSlots(
|
||||||
|
|
|
||||||
|
|
@ -63,13 +63,6 @@ public:
|
||||||
|
|
||||||
virtual void customDraw(IggyCustomDrawCallbackRegion* region);
|
virtual void customDraw(IggyCustomDrawCallbackRegion* region);
|
||||||
|
|
||||||
#if 0
|
|
||||||
virtual void handleTouchInput(unsigned int iPad, S32 x, S32 y, int iId,
|
|
||||||
bool bPressed, bool bRepeat, bool bReleased);
|
|
||||||
virtual UIControl* GetMainPanel();
|
|
||||||
virtual void handleTouchBoxRebuild();
|
|
||||||
virtual void handleTimerComplete(int id);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
UIControl m_controlMainPanel;
|
UIControl m_controlMainPanel;
|
||||||
|
|
@ -88,22 +81,6 @@ protected:
|
||||||
IggyName m_funcMoveSelector, m_funcSelectVerticalItem, m_funcSetActiveTab;
|
IggyName m_funcMoveSelector, m_funcSelectVerticalItem, m_funcSetActiveTab;
|
||||||
IggyName m_funcShowPanelDisplay, m_funcShowIngredientSlot;
|
IggyName m_funcShowPanelDisplay, m_funcShowIngredientSlot;
|
||||||
|
|
||||||
#if 0
|
|
||||||
enum ETouchInput {
|
|
||||||
ETouchInput_TouchPanel_0,
|
|
||||||
ETouchInput_TouchPanel_1,
|
|
||||||
ETouchInput_TouchPanel_2,
|
|
||||||
ETouchInput_TouchPanel_3,
|
|
||||||
ETouchInput_TouchPanel_4,
|
|
||||||
ETouchInput_TouchPanel_5,
|
|
||||||
ETouchInput_TouchPanel_6,
|
|
||||||
ETouchInput_CraftingHSlots,
|
|
||||||
|
|
||||||
ETouchInput_Count,
|
|
||||||
};
|
|
||||||
UIControl_Touch m_TouchInput[ETouchInput_Count];
|
|
||||||
S32 m_iCraftingSlotTouchStartY;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
UI_BEGIN_MAP_ELEMENTS_AND_NAMES(UIScene)
|
UI_BEGIN_MAP_ELEMENTS_AND_NAMES(UIScene)
|
||||||
UI_MAP_ELEMENT(m_controlMainPanel, "MainPanel")
|
UI_MAP_ELEMENT(m_controlMainPanel, "MainPanel")
|
||||||
|
|
@ -158,17 +135,6 @@ protected:
|
||||||
UI_MAP_NAME(m_funcShowPanelDisplay, L"showPanelDisplay")
|
UI_MAP_NAME(m_funcShowPanelDisplay, L"showPanelDisplay")
|
||||||
UI_MAP_NAME(m_funcShowIngredientSlot, L"ShowIngredient")
|
UI_MAP_NAME(m_funcShowIngredientSlot, L"ShowIngredient")
|
||||||
|
|
||||||
#if 0
|
|
||||||
UI_MAP_ELEMENT(m_TouchInput[ETouchInput_TouchPanel_0], "TouchPanel_0")
|
|
||||||
UI_MAP_ELEMENT(m_TouchInput[ETouchInput_TouchPanel_1], "TouchPanel_1")
|
|
||||||
UI_MAP_ELEMENT(m_TouchInput[ETouchInput_TouchPanel_2], "TouchPanel_2")
|
|
||||||
UI_MAP_ELEMENT(m_TouchInput[ETouchInput_TouchPanel_3], "TouchPanel_3")
|
|
||||||
UI_MAP_ELEMENT(m_TouchInput[ETouchInput_TouchPanel_4], "TouchPanel_4")
|
|
||||||
UI_MAP_ELEMENT(m_TouchInput[ETouchInput_TouchPanel_5], "TouchPanel_5")
|
|
||||||
UI_MAP_ELEMENT(m_TouchInput[ETouchInput_TouchPanel_6], "TouchPanel_6")
|
|
||||||
UI_MAP_ELEMENT(m_TouchInput[ETouchInput_CraftingHSlots],
|
|
||||||
"TouchPanel_CraftingHSlots")
|
|
||||||
#endif
|
|
||||||
|
|
||||||
UI_END_MAP_CHILD_ELEMENTS()
|
UI_END_MAP_CHILD_ELEMENTS()
|
||||||
UI_END_MAP_ELEMENTS_AND_NAMES()
|
UI_END_MAP_ELEMENTS_AND_NAMES()
|
||||||
|
|
|
||||||
|
|
@ -12,10 +12,8 @@
|
||||||
#include "../../Minecraft.World/Level/Storage/LevelType.h"
|
#include "../../Minecraft.World/Level/Storage/LevelType.h"
|
||||||
#include "../../Minecraft.Client/Textures/Packs/DLCTexturePack.h"
|
#include "../../Minecraft.Client/Textures/Packs/DLCTexturePack.h"
|
||||||
|
|
||||||
#if 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _WINDOWS64
|
#if defined(_WINDOWS64)
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include "../../Minecraft.Client/Platform/Windows64/Resource.h"
|
#include "../../Minecraft.Client/Platform/Windows64/Resource.h"
|
||||||
|
|
@ -263,14 +261,8 @@ UIControl* UIScene_CreateWorldMenu::GetMainPanel() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void UIScene_CreateWorldMenu::handleDestroy() {
|
void UIScene_CreateWorldMenu::handleDestroy() {
|
||||||
#if 0
|
|
||||||
app.DebugPrintf("missing InputManager.DestroyKeyboard on Vita !!!!!!\n");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// shut down the keyboard if it is displayed
|
// shut down the keyboard if it is displayed
|
||||||
#if (0 || 0 || 0)
|
|
||||||
InputManager.DestroyKeyboard();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UIScene_CreateWorldMenu::tick() {
|
void UIScene_CreateWorldMenu::tick() {
|
||||||
|
|
@ -287,52 +279,8 @@ void UIScene_CreateWorldMenu::tick() {
|
||||||
m_bShowTexturePackDescription = false;
|
m_bShowTexturePackDescription = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
// check the status of the PSPlus common dialog
|
|
||||||
switch (sceNpCommerceDialogUpdateStatus()) {
|
|
||||||
case SCE_COMMON_DIALOG_STATUS_FINISHED: {
|
|
||||||
SceNpCommerceDialogResult Result;
|
|
||||||
sceNpCommerceDialogGetResult(&Result);
|
|
||||||
sceNpCommerceDialogTerminate();
|
|
||||||
|
|
||||||
if (Result.authorized) {
|
|
||||||
ProfileManager.PsPlusUpdate(ProfileManager.GetPrimaryPad(),
|
|
||||||
&Result);
|
|
||||||
// they just became a PSPlus member
|
|
||||||
checkStateAndStartGame();
|
|
||||||
} else {
|
|
||||||
// continue offline?
|
|
||||||
unsigned int uiIDA[1];
|
|
||||||
uiIDA[0] = IDS_PRO_NOTONLINE_DECLINE;
|
|
||||||
|
|
||||||
// Give the player a warning about the texture pack missing
|
|
||||||
ui.RequestAlertMessage(
|
|
||||||
IDS_PLAY_OFFLINE, IDS_NO_PLAYSTATIONPLUS, uiIDA, 1,
|
|
||||||
ProfileManager.GetPrimaryPad(),
|
|
||||||
&UIScene_CreateWorldMenu::ContinueOffline,
|
|
||||||
dynamic_cast<UIScene_CreateWorldMenu*>(this));
|
|
||||||
}
|
|
||||||
} break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
int UIScene_CreateWorldMenu::ContinueOffline(
|
|
||||||
void* pParam, int iPad, C4JStorage::EMessageResult result) {
|
|
||||||
UIScene_CreateWorldMenu* pClass = (UIScene_CreateWorldMenu*)pParam;
|
|
||||||
|
|
||||||
// results switched for this dialog
|
|
||||||
if (result == C4JStorage::EMessage_ResultAccept) {
|
|
||||||
pClass->m_MoreOptionsParams.bOnlineGame = false;
|
|
||||||
pClass->checkStateAndStartGame();
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void UIScene_CreateWorldMenu::handleInput(int iPad, int key, bool repeat,
|
void UIScene_CreateWorldMenu::handleInput(int iPad, int key, bool repeat,
|
||||||
bool pressed, bool released,
|
bool pressed, bool released,
|
||||||
|
|
@ -349,20 +297,8 @@ void UIScene_CreateWorldMenu::handleInput(int iPad, int key, bool repeat,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ACTION_MENU_OK:
|
case ACTION_MENU_OK:
|
||||||
#if 0
|
|
||||||
case ACTION_MENU_TOUCHPAD_PRESS:
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// 4J-JEV: Inform user why their game must be offline.
|
// 4J-JEV: Inform user why their game must be offline.
|
||||||
#if 0
|
|
||||||
if (pressed && controlHasFocus(m_checkboxOnline.getId()) &&
|
|
||||||
!m_checkboxOnline.IsEnabled()) {
|
|
||||||
unsigned int uiIDA[1] = {IDS_CONFIRM_OK};
|
|
||||||
ui.RequestErrorMessage(IDS_PRO_NOTONLINE_TITLE,
|
|
||||||
IDS_PRO_NOTONLINE_TEXT, uiIDA, 1,
|
|
||||||
iPad);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
case ACTION_MENU_UP:
|
case ACTION_MENU_UP:
|
||||||
case ACTION_MENU_DOWN:
|
case ACTION_MENU_DOWN:
|
||||||
|
|
@ -426,13 +362,6 @@ void UIScene_CreateWorldMenu::handlePress(F64 controlId, F64 childId) {
|
||||||
UpdateCurrentTexturePack((int)childId);
|
UpdateCurrentTexturePack((int)childId);
|
||||||
} break;
|
} break;
|
||||||
case eControl_NewWorld: {
|
case eControl_NewWorld: {
|
||||||
#if 0
|
|
||||||
if (m_MoreOptionsParams.bOnlineGame) {
|
|
||||||
m_bIgnoreInput = true;
|
|
||||||
ProfileManager.CheckMultiplayerPrivileges(
|
|
||||||
m_iPad, true, &checkPrivilegeCallback, this);
|
|
||||||
} else
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
StartSharedLaunchFlow();
|
StartSharedLaunchFlow();
|
||||||
}
|
}
|
||||||
|
|
@ -441,19 +370,6 @@ void UIScene_CreateWorldMenu::handlePress(F64 controlId, F64 childId) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
void UIScene_CreateWorldMenu::checkPrivilegeCallback(void* lpParam,
|
|
||||||
bool hasPrivilege,
|
|
||||||
int iPad) {
|
|
||||||
UIScene_CreateWorldMenu* pClass = (UIScene_CreateWorldMenu*)lpParam;
|
|
||||||
|
|
||||||
if (hasPrivilege) {
|
|
||||||
pClass->StartSharedLaunchFlow();
|
|
||||||
} else {
|
|
||||||
pClass->m_bIgnoreInput = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void UIScene_CreateWorldMenu::StartSharedLaunchFlow() {
|
void UIScene_CreateWorldMenu::StartSharedLaunchFlow() {
|
||||||
Minecraft* pMinecraft = Minecraft::GetInstance();
|
Minecraft* pMinecraft = Minecraft::GetInstance();
|
||||||
|
|
@ -547,26 +463,8 @@ void UIScene_CreateWorldMenu::StartSharedLaunchFlow() {
|
||||||
else */
|
else */
|
||||||
{
|
{
|
||||||
// upsell
|
// upsell
|
||||||
#if 0
|
|
||||||
DLC_INFO* pDLCInfo = app.GetDLCInfoForTrialOfferID(
|
|
||||||
m_pDLCPack->getPurchaseOfferId());
|
|
||||||
ULONGLONG ullOfferID_Full;
|
|
||||||
|
|
||||||
if (pDLCInfo != NULL) {
|
#if defined(_WINDOWS64)
|
||||||
ullOfferID_Full = pDLCInfo->ullOfferID_Full;
|
|
||||||
} else {
|
|
||||||
ullOfferID_Full =
|
|
||||||
pTexturePack->getDLCPack()->getPurchaseOfferId();
|
|
||||||
}
|
|
||||||
|
|
||||||
// tell sentient about the upsell of the full version of the
|
|
||||||
// texture pack
|
|
||||||
TelemetryManager->RecordUpsellPresented(
|
|
||||||
m_iPad, eSet_UpsellID_Texture_DLC,
|
|
||||||
ullOfferID_Full & 0xFFFFFFFF);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if 0 || defined(_WINDOWS64)
|
|
||||||
// trial pack warning
|
// trial pack warning
|
||||||
unsigned int uiIDA[1];
|
unsigned int uiIDA[1];
|
||||||
uiIDA[0] = IDS_CONFIRM_OK;
|
uiIDA[0] = IDS_CONFIRM_OK;
|
||||||
|
|
@ -574,29 +472,12 @@ void UIScene_CreateWorldMenu::StartSharedLaunchFlow() {
|
||||||
IDS_USING_TRIAL_TEXUREPACK_WARNING,
|
IDS_USING_TRIAL_TEXUREPACK_WARNING,
|
||||||
uiIDA, 1, m_iPad,
|
uiIDA, 1, m_iPad,
|
||||||
&TrialTexturePackWarningReturned, this);
|
&TrialTexturePackWarningReturned, this);
|
||||||
#elif 0 || 0 || 0
|
|
||||||
// trial pack warning
|
|
||||||
unsigned int uiIDA[2];
|
|
||||||
uiIDA[0] = IDS_CONFIRM_OK;
|
|
||||||
uiIDA[1] = IDS_CONFIRM_CANCEL;
|
|
||||||
ui.RequestAlertMessage(IDS_WARNING_DLC_TRIALTEXTUREPACK_TITLE,
|
|
||||||
IDS_USING_TRIAL_TEXUREPACK_WARNING,
|
|
||||||
uiIDA, 2, m_iPad,
|
|
||||||
&TrialTexturePackWarningReturned, this);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 0 || 0
|
|
||||||
StorageManager.SetSaveDisabled(true);
|
|
||||||
#endif
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if 0 || 0
|
|
||||||
app.SetGameHostOption(eGameHostOption_DisableSaving,
|
|
||||||
m_MoreOptionsParams.bDisableSaving ? 1 : 0);
|
|
||||||
StorageManager.SetSaveDisabled(m_MoreOptionsParams.bDisableSaving);
|
|
||||||
#endif
|
|
||||||
checkStateAndStartGame();
|
checkStateAndStartGame();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -617,15 +498,6 @@ void UIScene_CreateWorldMenu::handleSliderMove(F64 sliderId, F64 currentValue) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void UIScene_CreateWorldMenu::handleTimerComplete(int id) {
|
void UIScene_CreateWorldMenu::handleTimerComplete(int id) {
|
||||||
#if 0
|
|
||||||
// we cannot rebuild touch boxes in an iggy callback because it requires
|
|
||||||
// further iggy calls
|
|
||||||
if (m_bRebuildTouchBoxes) {
|
|
||||||
GetMainPanel()->UpdateControl();
|
|
||||||
ui.TouchBoxRebuild(this);
|
|
||||||
m_bRebuildTouchBoxes = false;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
switch (id) {
|
switch (id) {
|
||||||
case GAME_CREATE_ONLINE_TIMER_ID: {
|
case GAME_CREATE_ONLINE_TIMER_ID: {
|
||||||
|
|
@ -662,46 +534,6 @@ void UIScene_CreateWorldMenu::handleTimerComplete(int id) {
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
// 4J-PB - Only Xbox will not have trial DLC patched into the game
|
// 4J-PB - Only Xbox will not have trial DLC patched into the game
|
||||||
#if 0
|
|
||||||
case CHECKFORAVAILABLETEXTUREPACKS_TIMER_ID: {
|
|
||||||
// also check for any new texture packs info being available
|
|
||||||
// for each item in the mem list, check it's in the data list
|
|
||||||
|
|
||||||
CXuiCtrl4JList::LIST_ITEM_INFO ListInfo;
|
|
||||||
// for each iConfig, check if the data is available, and add it to
|
|
||||||
// the List, then remove it from the viConfig
|
|
||||||
for (int i = 0; i < m_iTexturePacksNotInstalled; i++) {
|
|
||||||
if (m_iConfigA[i] != -1) {
|
|
||||||
unsigned int dwBytes = 0;
|
|
||||||
std::uint8_t* pbData = NULL;
|
|
||||||
// app.DebugPrintf("Retrieving iConfig %d from
|
|
||||||
// TPD\n",m_iConfigA[i]);
|
|
||||||
|
|
||||||
app.GetTPD(m_iConfigA[i], &pbData, &dwBytes);
|
|
||||||
|
|
||||||
ZeroMemory(&ListInfo,
|
|
||||||
sizeof(CXuiCtrl4JList::LIST_ITEM_INFO));
|
|
||||||
if (dwBytes > 0 && pbData) {
|
|
||||||
unsigned int dwImageBytes = 0;
|
|
||||||
std::uint8_t* pbImageData = NULL;
|
|
||||||
|
|
||||||
app.GetFileFromTPD(eTPDFileType_Icon, pbData, dwBytes,
|
|
||||||
&pbImageData, &dwImageBytes);
|
|
||||||
ListInfo.fEnabled = TRUE;
|
|
||||||
ListInfo.iData = m_iConfigA[i];
|
|
||||||
HRESULT hr = XuiCreateTextureBrushFromMemory(
|
|
||||||
pbImageData, dwImageBytes, &ListInfo.hXuiBrush);
|
|
||||||
app.DebugPrintf("Adding texturepack %d from TPD\n",
|
|
||||||
m_iConfigA[i]);
|
|
||||||
|
|
||||||
m_pTexturePacksList->AddData(ListInfo);
|
|
||||||
|
|
||||||
m_iConfigA[i] = -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} break;
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -753,118 +585,14 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame() {
|
||||||
// If this is an online game but not all players are signed in to Live,
|
// If this is an online game but not all players are signed in to Live,
|
||||||
// stop!
|
// stop!
|
||||||
if (isOnlineGame && !isSignedInLive) {
|
if (isOnlineGame && !isSignedInLive) {
|
||||||
#if 0
|
|
||||||
assert(iPadNotSignedInLive != -1);
|
|
||||||
|
|
||||||
// Check if PSN is unavailable because of age restriction
|
|
||||||
int npAvailability =
|
|
||||||
ProfileManager.getNPAvailability(iPadNotSignedInLive);
|
|
||||||
if (npAvailability == SCE_NP_ERROR_AGE_RESTRICTION) {
|
|
||||||
m_bIgnoreInput = false;
|
|
||||||
// 4J Stu - This is a bit messy and is due to the library
|
|
||||||
// incorrectly returning false for IsSignedInLive if the
|
|
||||||
// npAvailability isn't SCE_OK
|
|
||||||
unsigned int uiIDA[1];
|
|
||||||
uiIDA[0] = IDS_OK;
|
|
||||||
ui.RequestErrorMessage(IDS_ONLINE_SERVICE_TITLE,
|
|
||||||
IDS_CONTENT_RESTRICTION, uiIDA, 1,
|
|
||||||
iPadNotSignedInLive);
|
|
||||||
} else {
|
|
||||||
m_bIgnoreInput = true;
|
|
||||||
unsigned int uiIDA[2];
|
|
||||||
uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT;
|
|
||||||
uiIDA[1] = IDS_CANCEL;
|
|
||||||
ui.RequestAlertMessage(
|
|
||||||
IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 2,
|
|
||||||
iPadNotSignedInLive,
|
|
||||||
&UIScene_CreateWorldMenu::MustSignInReturnedPSN, this);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
/* 4J-PB - Add this after release
|
|
||||||
#elif 0
|
|
||||||
m_bIgnoreInput=false;
|
|
||||||
// Determine why they're not "signed in live"
|
|
||||||
if
|
|
||||||
(ProfileManager.IsSignedInPSN(ProfileManager.GetPrimaryPad()))
|
|
||||||
{
|
|
||||||
// Signed in to PSN but not connected (no internet
|
|
||||||
access) UINT uiIDA[1]; uiIDA[0] = IDS_CONFIRM_OK;
|
|
||||||
ui.RequestErrorMessage(IDS_PRO_CURRENTLY_NOT_ONLINE_TITLE,
|
|
||||||
IDS_PRO_PSNOFFLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Not signed in to PSN
|
|
||||||
unsigned int uiIDA[1];
|
|
||||||
uiIDA[0] = IDS_CONFIRM_OK;
|
|
||||||
ui.RequestErrorMessage(IDS_PRO_NOTONLINE_TITLE,
|
|
||||||
IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad()); return;
|
|
||||||
}*/
|
|
||||||
#else
|
|
||||||
m_bIgnoreInput = false;
|
m_bIgnoreInput = false;
|
||||||
unsigned int uiIDA[1];
|
unsigned int uiIDA[1];
|
||||||
uiIDA[0] = IDS_CONFIRM_OK;
|
uiIDA[0] = IDS_CONFIRM_OK;
|
||||||
ui.RequestAlertMessage(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT,
|
ui.RequestAlertMessage(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT,
|
||||||
uiIDA, 1, ProfileManager.GetPrimaryPad());
|
uiIDA, 1, ProfileManager.GetPrimaryPad());
|
||||||
return;
|
return;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
|
|
||||||
bool bPlayStationPlus = true;
|
|
||||||
int iPadWithNoPlaystationPlus = 0;
|
|
||||||
if (isOnlineGame && isSignedInLive) {
|
|
||||||
for (unsigned int i = 0; i < XUSER_MAX_COUNT; ++i) {
|
|
||||||
if (ProfileManager.IsSignedIn(i) &&
|
|
||||||
(i == primaryPad || isLocalMultiplayerAvailable)) {
|
|
||||||
if (ProfileManager.HasPlayStationPlus(i) == false) {
|
|
||||||
bPlayStationPlus = false;
|
|
||||||
iPadWithNoPlaystationPlus = i;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (bPlayStationPlus == false) {
|
|
||||||
m_bIgnoreInput = false;
|
|
||||||
|
|
||||||
if (ProfileManager.RequestingPlaystationPlus(
|
|
||||||
iPadWithNoPlaystationPlus)) {
|
|
||||||
// MGH - added this so we don't try and upsell when we don't
|
|
||||||
// know if the player has PS Plus yet (if it can't connect to
|
|
||||||
// the PS Plus server).
|
|
||||||
UINT uiIDA[1];
|
|
||||||
uiIDA[0] = IDS_OK;
|
|
||||||
ui.RequestAlertMessage(
|
|
||||||
IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1,
|
|
||||||
ProfileManager.GetPrimaryPad(), NULL, NULL);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 4J-PB - we're not allowed to show the text Playstation Plus -
|
|
||||||
// have to call the upsell all the time! upsell psplus
|
|
||||||
std::int32_t iResult = sceNpCommerceDialogInitialize();
|
|
||||||
|
|
||||||
SceNpCommerceDialogParam param;
|
|
||||||
sceNpCommerceDialogParamInitialize(¶m);
|
|
||||||
param.mode = SCE_NP_COMMERCE_DIALOG_MODE_PLUS;
|
|
||||||
param.features = SCE_NP_PLUS_FEATURE_REALTIME_MULTIPLAY;
|
|
||||||
param.userId = ProfileManager.getUserID(iPadWithNoPlaystationPlus);
|
|
||||||
|
|
||||||
iResult = sceNpCommerceDialogOpen(¶m);
|
|
||||||
|
|
||||||
// unsigned int uiIDA[2];
|
|
||||||
// uiIDA[0]=IDS_PLAY_OFFLINE;
|
|
||||||
// uiIDA[1]=IDS_PLAYSTATIONPLUS_SIGNUP;
|
|
||||||
// ui.RequestMessageBox(
|
|
||||||
// IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_PLAYSTATIONPLUS,
|
|
||||||
// uiIDA,2,ProfileManager.GetPrimaryPad(),&UIScene_CreateWorldMenu::PSPlusReturned,this,
|
|
||||||
// app.GetStringTable(),NULL,0,false);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
unsigned int uiIDA[2];
|
unsigned int uiIDA[2];
|
||||||
if (m_bGameModeCreative == true ||
|
if (m_bGameModeCreative == true ||
|
||||||
|
|
@ -903,13 +631,6 @@ IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad()); return;
|
||||||
ProfileManager.AllowedPlayerCreatedContent(
|
ProfileManager.AllowedPlayerCreatedContent(
|
||||||
ProfileManager.GetPrimaryPad(), false, &pccAllowed,
|
ProfileManager.GetPrimaryPad(), false, &pccAllowed,
|
||||||
&pccFriendsAllowed);
|
&pccFriendsAllowed);
|
||||||
#if 0 || 0
|
|
||||||
if (isOnlineGame && isSignedInLive) {
|
|
||||||
ProfileManager.GetChatAndContentRestrictions(
|
|
||||||
ProfileManager.GetPrimaryPad(), false, NULL,
|
|
||||||
&bContentRestricted, NULL);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
noUGC = !pccAllowed && !pccFriendsAllowed;
|
noUGC = !pccAllowed && !pccFriendsAllowed;
|
||||||
|
|
||||||
|
|
@ -925,44 +646,6 @@ IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad()); return;
|
||||||
m_bIgnoreInput = false;
|
m_bIgnoreInput = false;
|
||||||
ui.RequestContentRestrictedMessageBox();
|
ui.RequestContentRestrictedMessageBox();
|
||||||
}
|
}
|
||||||
#if 0
|
|
||||||
else if (bPlayStationPlus == false) {
|
|
||||||
m_bIgnoreInput = false;
|
|
||||||
|
|
||||||
if (ProfileManager.RequestingPlaystationPlus(
|
|
||||||
iPadWithNoPlaystationPlus)) {
|
|
||||||
// MGH - added this so we don't try and upsell when we
|
|
||||||
// don't know if the player has PS Plus yet (if it can't
|
|
||||||
// connect to the PS Plus server).
|
|
||||||
UINT uiIDA[1];
|
|
||||||
uiIDA[0] = IDS_OK;
|
|
||||||
ui.RequestAlertMessage(
|
|
||||||
IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1,
|
|
||||||
ProfileManager.GetPrimaryPad(), NULL, NULL);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 4J-PB - we're not allowed to show the text Playstation Plus -
|
|
||||||
// have to call the upsell all the time! upsell psplus
|
|
||||||
std::int32_t iResult = sceNpCommerceDialogInitialize();
|
|
||||||
|
|
||||||
SceNpCommerceDialogParam param;
|
|
||||||
sceNpCommerceDialogParamInitialize(¶m);
|
|
||||||
param.mode = SCE_NP_COMMERCE_DIALOG_MODE_PLUS;
|
|
||||||
param.features = SCE_NP_PLUS_FEATURE_REALTIME_MULTIPLAY;
|
|
||||||
param.userId =
|
|
||||||
ProfileManager.getUserID(iPadWithNoPlaystationPlus);
|
|
||||||
|
|
||||||
iResult = sceNpCommerceDialogOpen(¶m);
|
|
||||||
// unsigned int uiIDA[2];
|
|
||||||
// uiIDA[0]=IDS_PLAY_OFFLINE;
|
|
||||||
// uiIDA[1]=IDS_PLAYSTATIONPLUS_SIGNUP;
|
|
||||||
// ui.RequestMessageBox(
|
|
||||||
// IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_PLAYSTATIONPLUS,
|
|
||||||
// uiIDA,2,ProfileManager.GetPrimaryPad(),&UIScene_CreateWorldMenu::PSPlusReturned,this,
|
|
||||||
// app.GetStringTable(),NULL,0,false);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
else {
|
else {
|
||||||
// ProfileManager.RequestSignInUI(false, false, false, true,
|
// ProfileManager.RequestSignInUI(false, false, false, true,
|
||||||
// false,&CScene_MultiGameCreate::StartGame_SignInReturned,
|
// false,&CScene_MultiGameCreate::StartGame_SignInReturned,
|
||||||
|
|
@ -984,61 +667,7 @@ IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad()); return;
|
||||||
m_bIgnoreInput = false;
|
m_bIgnoreInput = false;
|
||||||
ui.RequestContentRestrictedMessageBox();
|
ui.RequestContentRestrictedMessageBox();
|
||||||
}
|
}
|
||||||
#if 0
|
|
||||||
else if (isOnlineGame && isSignedInLive &&
|
|
||||||
(bPlayStationPlus == false)) {
|
|
||||||
m_bIgnoreInput = false;
|
|
||||||
if (ProfileManager.RequestingPlaystationPlus(
|
|
||||||
iPadWithNoPlaystationPlus)) {
|
|
||||||
// MGH - added this so we don't try and upsell when we
|
|
||||||
// don't know if the player has PS Plus yet (if it can't
|
|
||||||
// connect to the PS Plus server).
|
|
||||||
UINT uiIDA[1];
|
|
||||||
uiIDA[0] = IDS_OK;
|
|
||||||
ui.RequestAlertMessage(
|
|
||||||
IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1,
|
|
||||||
ProfileManager.GetPrimaryPad(), NULL, NULL);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
setVisible(true);
|
|
||||||
|
|
||||||
// 4J-PB - we're not allowed to show the text Playstation Plus -
|
|
||||||
// have to call the upsell all the time! upsell psplus
|
|
||||||
std::int32_t iResult = sceNpCommerceDialogInitialize();
|
|
||||||
|
|
||||||
SceNpCommerceDialogParam param;
|
|
||||||
sceNpCommerceDialogParamInitialize(¶m);
|
|
||||||
param.mode = SCE_NP_COMMERCE_DIALOG_MODE_PLUS;
|
|
||||||
param.features = SCE_NP_PLUS_FEATURE_REALTIME_MULTIPLAY;
|
|
||||||
param.userId =
|
|
||||||
ProfileManager.getUserID(iPadWithNoPlaystationPlus);
|
|
||||||
|
|
||||||
iResult = sceNpCommerceDialogOpen(¶m);
|
|
||||||
|
|
||||||
// unsigned int uiIDA[2];
|
|
||||||
// uiIDA[0]=IDS_PLAY_OFFLINE;
|
|
||||||
// uiIDA[1]=IDS_PLAYSTATIONPLUS_SIGNUP;
|
|
||||||
// ui.RequestMessageBox(
|
|
||||||
// IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_PLAYSTATIONPLUS,
|
|
||||||
// uiIDA,2,ProfileManager.GetPrimaryPad(),&UIScene_CreateWorldMenu::PSPlusReturned,this,
|
|
||||||
// app.GetStringTable(),NULL,0,false);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
else {
|
else {
|
||||||
#if 0 || 0
|
|
||||||
if (isOnlineGame) {
|
|
||||||
bool chatRestricted = false;
|
|
||||||
ProfileManager.GetChatAndContentRestrictions(
|
|
||||||
ProfileManager.GetPrimaryPad(), false, &chatRestricted,
|
|
||||||
NULL, NULL);
|
|
||||||
if (chatRestricted) {
|
|
||||||
ProfileManager.DisplaySystemMessage(
|
|
||||||
SCE_MSG_DIALOG_SYSMSG_TYPE_TRC_PSN_CHAT_RESTRICTION,
|
|
||||||
ProfileManager.GetPrimaryPad());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
CreateGame(this, 0);
|
CreateGame(this, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1059,14 +688,6 @@ void UIScene_CreateWorldMenu::CreateGame(UIScene_CreateWorldMenu* pClass,
|
||||||
bool isClientSide =
|
bool isClientSide =
|
||||||
ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad()) &&
|
ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad()) &&
|
||||||
pClass->m_MoreOptionsParams.bOnlineGame;
|
pClass->m_MoreOptionsParams.bOnlineGame;
|
||||||
#if 0
|
|
||||||
if (CGameNetworkManager::usingAdhocMode()) {
|
|
||||||
if (SQRNetworkManager_AdHoc_Vita::
|
|
||||||
GetAdhocStatus()) // &&
|
|
||||||
// pClass->m_MoreOptionsParams.bOnlineGame)
|
|
||||||
isClientSide = true;
|
|
||||||
}
|
|
||||||
#endif // 0
|
|
||||||
|
|
||||||
bool isPrivate = pClass->m_MoreOptionsParams.bInviteOnly ? true : false;
|
bool isPrivate = pClass->m_MoreOptionsParams.bInviteOnly ? true : false;
|
||||||
|
|
||||||
|
|
@ -1190,7 +811,7 @@ void UIScene_CreateWorldMenu::CreateGame(UIScene_CreateWorldMenu* pClass,
|
||||||
pClass->m_MoreOptionsParams.bDoDaylightCycle);
|
pClass->m_MoreOptionsParams.bDoDaylightCycle);
|
||||||
|
|
||||||
app.SetGameHostOption(eGameHostOption_WasntSaveOwner, false);
|
app.SetGameHostOption(eGameHostOption_WasntSaveOwner, false);
|
||||||
#ifdef _LARGE_WORLDS
|
#if defined(_LARGE_WORLDS)
|
||||||
app.SetGameHostOption(eGameHostOption_WorldSize,
|
app.SetGameHostOption(eGameHostOption_WorldSize,
|
||||||
pClass->m_MoreOptionsParams.worldSize +
|
pClass->m_MoreOptionsParams.worldSize +
|
||||||
1); // 0 is GAME_HOST_OPTION_WORLDSIZE_UNKNOWN
|
1); // 0 is GAME_HOST_OPTION_WORLDSIZE_UNKNOWN
|
||||||
|
|
@ -1205,7 +826,7 @@ void UIScene_CreateWorldMenu::CreateGame(UIScene_CreateWorldMenu* pClass,
|
||||||
|
|
||||||
param->settings = app.GetGameHostOption(eGameHostOption_All);
|
param->settings = app.GetGameHostOption(eGameHostOption_All);
|
||||||
|
|
||||||
#ifdef _LARGE_WORLDS
|
#if defined(_LARGE_WORLDS)
|
||||||
switch (pClass->m_MoreOptionsParams.worldSize) {
|
switch (pClass->m_MoreOptionsParams.worldSize) {
|
||||||
case 0:
|
case 0:
|
||||||
// Classic
|
// Classic
|
||||||
|
|
@ -1237,9 +858,7 @@ void UIScene_CreateWorldMenu::CreateGame(UIScene_CreateWorldMenu* pClass,
|
||||||
param->hellScale = HELL_LEVEL_MAX_SCALE;
|
param->hellScale = HELL_LEVEL_MAX_SCALE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 1
|
|
||||||
g_NetworkManager.FakeLocalPlayerJoined();
|
g_NetworkManager.FakeLocalPlayerJoined();
|
||||||
#endif
|
|
||||||
|
|
||||||
LoadingInputParams* loadingParams = new LoadingInputParams();
|
LoadingInputParams* loadingParams = new LoadingInputParams();
|
||||||
loadingParams->func = &CGameNetworkManager::RunNetworkGameThreadProc;
|
loadingParams->func = &CGameNetworkManager::RunNetworkGameThreadProc;
|
||||||
|
|
@ -1300,35 +919,6 @@ int UIScene_CreateWorldMenu::StartGame_SignInReturned(void* pParam,
|
||||||
// If this is an online game but not all players are signed in to
|
// If this is an online game but not all players are signed in to
|
||||||
// Live, stop!
|
// Live, stop!
|
||||||
if (isOnlineGame && !isSignedInLive) {
|
if (isOnlineGame && !isSignedInLive) {
|
||||||
#if 0
|
|
||||||
assert(iPadNotSignedInLive != -1);
|
|
||||||
|
|
||||||
// Check if PSN is unavailable because of age restriction
|
|
||||||
int npAvailability =
|
|
||||||
ProfileManager.getNPAvailability(iPadNotSignedInLive);
|
|
||||||
if (npAvailability == SCE_NP_ERROR_AGE_RESTRICTION) {
|
|
||||||
pClass->m_bIgnoreInput = false;
|
|
||||||
// 4J Stu - This is a bit messy and is due to the library
|
|
||||||
// incorrectly returning false for IsSignedInLive if the
|
|
||||||
// npAvailability isn't SCE_OK
|
|
||||||
unsigned int uiIDA[1];
|
|
||||||
uiIDA[0] = IDS_OK;
|
|
||||||
ui.RequestAlertMessage(IDS_ONLINE_SERVICE_TITLE,
|
|
||||||
IDS_CONTENT_RESTRICTION, uiIDA, 1,
|
|
||||||
iPadNotSignedInLive);
|
|
||||||
} else {
|
|
||||||
pClass->m_bIgnoreInput = true;
|
|
||||||
unsigned int uiIDA[2];
|
|
||||||
uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT;
|
|
||||||
uiIDA[1] = IDS_CANCEL;
|
|
||||||
ui.RequestAlertMessage(
|
|
||||||
IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA,
|
|
||||||
2, iPadNotSignedInLive,
|
|
||||||
&UIScene_CreateWorldMenu::MustSignInReturnedPSN,
|
|
||||||
pClass);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
#else
|
|
||||||
pClass->m_bIgnoreInput = false;
|
pClass->m_bIgnoreInput = false;
|
||||||
unsigned int uiIDA[1];
|
unsigned int uiIDA[1];
|
||||||
uiIDA[0] = IDS_CONFIRM_OK;
|
uiIDA[0] = IDS_CONFIRM_OK;
|
||||||
|
|
@ -1336,7 +926,6 @@ int UIScene_CreateWorldMenu::StartGame_SignInReturned(void* pParam,
|
||||||
IDS_PRO_NOTONLINE_TEXT, uiIDA, 1,
|
IDS_PRO_NOTONLINE_TEXT, uiIDA, 1,
|
||||||
ProfileManager.GetPrimaryPad());
|
ProfileManager.GetPrimaryPad());
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if user-created content is allowed, as we cannot play
|
// Check if user-created content is allowed, as we cannot play
|
||||||
|
|
@ -1431,22 +1020,6 @@ int UIScene_CreateWorldMenu::ConfirmCreateReturned(
|
||||||
IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_CREATE, uiIDA, 1,
|
IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_CREATE, uiIDA, 1,
|
||||||
ProfileManager.GetPrimaryPad());
|
ProfileManager.GetPrimaryPad());
|
||||||
} else {
|
} else {
|
||||||
#if 0 || 0
|
|
||||||
bool isOnlineGame = ProfileManager.IsSignedInLive(
|
|
||||||
ProfileManager.GetPrimaryPad()) &&
|
|
||||||
pClass->m_MoreOptionsParams.bOnlineGame;
|
|
||||||
if (isOnlineGame) {
|
|
||||||
bool chatRestricted = false;
|
|
||||||
ProfileManager.GetChatAndContentRestrictions(
|
|
||||||
ProfileManager.GetPrimaryPad(), false, &chatRestricted,
|
|
||||||
NULL, NULL);
|
|
||||||
if (chatRestricted) {
|
|
||||||
ProfileManager.DisplaySystemMessage(
|
|
||||||
SCE_MSG_DIALOG_SYSMSG_TYPE_TRC_PSN_CHAT_RESTRICTION,
|
|
||||||
ProfileManager.GetPrimaryPad());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
CreateGame(pClass, 0);
|
CreateGame(pClass, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1456,52 +1029,6 @@ int UIScene_CreateWorldMenu::ConfirmCreateReturned(
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
int UIScene_CreateWorldMenu::MustSignInReturnedPSN(
|
|
||||||
void* pParam, int iPad, C4JStorage::EMessageResult result) {
|
|
||||||
UIScene_CreateWorldMenu* pClass = (UIScene_CreateWorldMenu*)pParam;
|
|
||||||
pClass->m_bIgnoreInput = false;
|
|
||||||
|
|
||||||
if (result == C4JStorage::EMessage_ResultAccept) {
|
|
||||||
SQRNetworkManager_Orbis::AttemptPSNSignIn(
|
|
||||||
&UIScene_CreateWorldMenu::StartGame_SignInReturned, pClass, false,
|
|
||||||
iPad);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// int UIScene_CreateWorldMenu::PSPlusReturned(void *pParam,int
|
|
||||||
// iPad,C4JStorage::EMessageResult result)
|
|
||||||
// {
|
|
||||||
// std::int32_t iResult;
|
|
||||||
// UIScene_CreateWorldMenu *pClass = (UIScene_CreateWorldMenu *)pParam;
|
|
||||||
//
|
|
||||||
// // continue offline, or upsell PS Plus?
|
|
||||||
// if(result==C4JStorage::EMessage_ResultDecline)
|
|
||||||
// {
|
|
||||||
// // upsell psplus
|
|
||||||
// std::int32_t iResult=sceNpCommerceDialogInitialize();
|
|
||||||
//
|
|
||||||
// SceNpCommerceDialogParam param;
|
|
||||||
// sceNpCommerceDialogParamInitialize(¶m);
|
|
||||||
// param.mode=SCE_NP_COMMERCE_DIALOG_MODE_PLUS;
|
|
||||||
// param.features = SCE_NP_PLUS_FEATURE_REALTIME_MULTIPLAY;
|
|
||||||
// param.userId = ProfileManager.getUserID(pClass->m_iPad);
|
|
||||||
//
|
|
||||||
// iResult=sceNpCommerceDialogOpen(¶m);
|
|
||||||
// }
|
|
||||||
// else if(result==C4JStorage::EMessage_ResultAccept)
|
|
||||||
// {
|
|
||||||
// // continue offline
|
|
||||||
// pClass->m_MoreOptionsParams.bOnlineGame=false;
|
|
||||||
// pClass->checkStateAndStartGame();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// pClass->m_bIgnoreInput=false;
|
|
||||||
// return 0;
|
|
||||||
// }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void UIScene_CreateWorldMenu::handleTouchBoxRebuild() {
|
void UIScene_CreateWorldMenu::handleTouchBoxRebuild() {
|
||||||
m_bRebuildTouchBoxes = true;
|
m_bRebuildTouchBoxes = true;
|
||||||
|
|
|
||||||
|
|
@ -80,10 +80,6 @@ private:
|
||||||
void StartSharedLaunchFlow();
|
void StartSharedLaunchFlow();
|
||||||
bool IsLocalMultiplayerAvailable();
|
bool IsLocalMultiplayerAvailable();
|
||||||
|
|
||||||
#if 0
|
|
||||||
static void checkPrivilegeCallback(void* lpParam, bool hasPrivilege,
|
|
||||||
int iPad);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
static int KeyboardCompleteWorldNameCallback(void* lpParam,
|
static int KeyboardCompleteWorldNameCallback(void* lpParam,
|
||||||
|
|
@ -98,12 +94,6 @@ protected:
|
||||||
static int MustSignInReturnedPSN(void* pParam, int iPad,
|
static int MustSignInReturnedPSN(void* pParam, int iPad,
|
||||||
C4JStorage::EMessageResult result);
|
C4JStorage::EMessageResult result);
|
||||||
|
|
||||||
#if 0
|
|
||||||
// static int PSPlusReturned(void *pParam,int
|
|
||||||
// iPad,C4JStorage::EMessageResult result);
|
|
||||||
static int ContinueOffline(void* pParam, int iPad,
|
|
||||||
C4JStorage::EMessageResult result);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
virtual void checkStateAndStartGame();
|
virtual void checkStateAndStartGame();
|
||||||
};
|
};
|
||||||
|
|
@ -9,10 +9,6 @@
|
||||||
#include "../../Minecraft.World/Headers/net.minecraft.world.inventory.h"
|
#include "../../Minecraft.World/Headers/net.minecraft.world.inventory.h"
|
||||||
#include "../../Minecraft.World/Headers/net.minecraft.world.item.h"
|
#include "../../Minecraft.World/Headers/net.minecraft.world.item.h"
|
||||||
|
|
||||||
#if 0
|
|
||||||
#define GAME_CREATIVE_TOUCHUPDATE_TIMER_ID 0
|
|
||||||
#define GAME_CREATIVE_TOUCHUPDATE_TIMER_TIME 100
|
|
||||||
#endif
|
|
||||||
|
|
||||||
UIScene_CreativeMenu::UIScene_CreativeMenu(int iPad, void* _initData,
|
UIScene_CreativeMenu::UIScene_CreativeMenu(int iPad, void* _initData,
|
||||||
UILayer* parentLayer)
|
UILayer* parentLayer)
|
||||||
|
|
@ -59,12 +55,6 @@ UIScene_CreativeMenu::UIScene_CreativeMenu(int iPad, void* _initData,
|
||||||
m_curTab = eCreativeInventoryTab_COUNT;
|
m_curTab = eCreativeInventoryTab_COUNT;
|
||||||
switchTab(eCreativeInventoryTab_BuildingBlocks);
|
switchTab(eCreativeInventoryTab_BuildingBlocks);
|
||||||
|
|
||||||
#if 0
|
|
||||||
// initialise vita touch controls with ids
|
|
||||||
for (unsigned int i = 0; i < ETouchInput_Count; ++i) {
|
|
||||||
m_TouchInput[i].init(i);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::wstring UIScene_CreativeMenu::getMoviePath() {
|
std::wstring UIScene_CreativeMenu::getMoviePath() {
|
||||||
|
|
@ -75,61 +65,6 @@ std::wstring UIScene_CreativeMenu::getMoviePath() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
UIControl* UIScene_CreativeMenu::GetMainPanel() { return &m_controlMainPanel; }
|
|
||||||
|
|
||||||
void UIScene_CreativeMenu::handleTouchInput(unsigned int iPad, S32 x, S32 y,
|
|
||||||
int iId, bool bPressed,
|
|
||||||
bool bRepeat, bool bReleased) {
|
|
||||||
// perform action on release
|
|
||||||
if (bReleased) {
|
|
||||||
if (iId >= eCreativeInventoryTab_BuildingBlocks &&
|
|
||||||
iId <= eCreativeInventoryTab_Misc) {
|
|
||||||
switchTab((ECreativeInventoryTabs)iId);
|
|
||||||
ui.PlayUISFX(eSFX_Focus);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (bRepeat && iId == ETouchInput_TouchSlider &&
|
|
||||||
specs[m_curTab]->getPageCount() > 1) {
|
|
||||||
// calculate relative touch position on slider
|
|
||||||
float fPosition =
|
|
||||||
((float)y - (float)m_TouchInput[ETouchInput_TouchSlider].getYPos() -
|
|
||||||
m_controlMainPanel.getYPos()) /
|
|
||||||
(float)m_TouchInput[ETouchInput_TouchSlider].getHeight();
|
|
||||||
|
|
||||||
// clamp
|
|
||||||
if (fPosition > 1)
|
|
||||||
fPosition = 1.0f;
|
|
||||||
else if (fPosition < 0)
|
|
||||||
fPosition = 0.0f;
|
|
||||||
|
|
||||||
// calculate page position according to page count
|
|
||||||
int iCurrentPage =
|
|
||||||
Math::round(fPosition * (specs[m_curTab]->getPageCount() - 1));
|
|
||||||
|
|
||||||
// set tab page
|
|
||||||
m_tabPage[m_curTab] = iCurrentPage;
|
|
||||||
|
|
||||||
// update tab
|
|
||||||
switchTab(m_curTab);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void UIScene_CreativeMenu::handleTouchBoxRebuild() {
|
|
||||||
addTimer(GAME_CREATIVE_TOUCHUPDATE_TIMER_ID,
|
|
||||||
GAME_CREATIVE_TOUCHUPDATE_TIMER_TIME);
|
|
||||||
}
|
|
||||||
|
|
||||||
void UIScene_CreativeMenu::handleTimerComplete(int id) {
|
|
||||||
if (id == GAME_CREATIVE_TOUCHUPDATE_TIMER_ID) {
|
|
||||||
// we cannot rebuild touch boxes in an iggy callback because it requires
|
|
||||||
// further iggy calls
|
|
||||||
GetMainPanel()->UpdateControl();
|
|
||||||
ui.TouchBoxRebuild(this);
|
|
||||||
killTimer(GAME_CREATIVE_TOUCHUPDATE_TIMER_ID);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void UIScene_CreativeMenu::handleOtherClicked(int iPad, ESceneSection eSection,
|
void UIScene_CreativeMenu::handleOtherClicked(int iPad, ESceneSection eSection,
|
||||||
int buttonNum, bool quickKey) {
|
int buttonNum, bool quickKey) {
|
||||||
|
|
|
||||||
|
|
@ -28,12 +28,7 @@ protected:
|
||||||
ETouchInput_Count,
|
ETouchInput_Count,
|
||||||
};
|
};
|
||||||
|
|
||||||
#if 0
|
|
||||||
// 4J - TomK - this only needs to be a touch component on vita!
|
|
||||||
UIControl_Touch m_TouchInput[ETouchInput_Count];
|
|
||||||
#else
|
|
||||||
UIControl_Base m_TouchInput[ETouchInput_Count];
|
UIControl_Base m_TouchInput[ETouchInput_Count];
|
||||||
#endif
|
|
||||||
|
|
||||||
UI_BEGIN_MAP_ELEMENTS_AND_NAMES(UIScene_AbstractContainerMenu)
|
UI_BEGIN_MAP_ELEMENTS_AND_NAMES(UIScene_AbstractContainerMenu)
|
||||||
UI_BEGIN_MAP_CHILD_ELEMENTS(m_controlMainPanel)
|
UI_BEGIN_MAP_CHILD_ELEMENTS(m_controlMainPanel)
|
||||||
|
|
@ -77,13 +72,6 @@ public:
|
||||||
virtual void handleInput(int iPad, int key, bool repeat, bool pressed,
|
virtual void handleInput(int iPad, int key, bool repeat, bool pressed,
|
||||||
bool released, bool& handled);
|
bool released, bool& handled);
|
||||||
|
|
||||||
#if 0
|
|
||||||
virtual void handleTouchInput(unsigned int iPad, S32 x, S32 y, int iId,
|
|
||||||
bool bPressed, bool bRepeat, bool bReleased);
|
|
||||||
virtual UIControl* GetMainPanel();
|
|
||||||
virtual void handleTouchBoxRebuild();
|
|
||||||
virtual void handleTimerComplete(int id);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// IUIScene_CreativeMenu
|
// IUIScene_CreativeMenu
|
||||||
|
|
|
||||||
|
|
@ -85,40 +85,15 @@ SCreditTextItemDef UIScene_Credits::gs_aCreditDefs[MAX_CREDIT_STRINGS] = {
|
||||||
{L"Harry Gordon", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
{L"Harry Gordon", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
||||||
{L"Thomas Kronberg", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
{L"Thomas Kronberg", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
||||||
eSmallText},
|
eSmallText},
|
||||||
#if 0
|
|
||||||
{L"Ian le Bruce", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Andy West", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Gordon McLean", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
// 4J-PB - Aaron didn't want to be in the credits { L"Aaron Puzey",
|
|
||||||
// NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText
|
|
||||||
// },
|
|
||||||
{L"Chris Dawson", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
#endif
|
|
||||||
|
|
||||||
{L"%ls", IDS_CREDITS_ART, NO_TRANSLATED_STRING, eLargeText},
|
{L"%ls", IDS_CREDITS_ART, NO_TRANSLATED_STRING, eLargeText},
|
||||||
{L"David Keningale", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
{L"David Keningale", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
||||||
eSmallText},
|
eSmallText},
|
||||||
#if 0
|
|
||||||
{L"Pat McGovern", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
#endif
|
|
||||||
{L"Alan Redmond", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
{L"Alan Redmond", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
||||||
#if 0
|
|
||||||
{L"Julian Laing", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
|
|
||||||
{L"Caitlin Goodale", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Scott Sutherland", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
#endif
|
|
||||||
{L"Chris Reeves", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
{L"Chris Reeves", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
||||||
{L"Kate Wright", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
{L"Kate Wright", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
||||||
{L"Michael Hansen", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
{L"Michael Hansen", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
||||||
#if 0
|
|
||||||
{L"Kate Flavell", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
#endif
|
|
||||||
{L"Donald Robertson", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
{L"Donald Robertson", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
||||||
eSmallText},
|
eSmallText},
|
||||||
{L"Jamie Keddie", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
{L"Jamie Keddie", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
||||||
|
|
@ -130,9 +105,6 @@ SCreditTextItemDef UIScene_Credits::gs_aCreditDefs[MAX_CREDIT_STRINGS] = {
|
||||||
{L"%ls", IDS_CREDITS_QA, NO_TRANSLATED_STRING, eLargeText},
|
{L"%ls", IDS_CREDITS_QA, NO_TRANSLATED_STRING, eLargeText},
|
||||||
{L"Steven Gary Woodward", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
{L"Steven Gary Woodward", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
||||||
eSmallText},
|
eSmallText},
|
||||||
#if 0
|
|
||||||
{L"Richard Black", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
#endif
|
|
||||||
{L"George Vaughan", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
{L"George Vaughan", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
||||||
{L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
{L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
||||||
eSmallText}, // extra blank line
|
eSmallText}, // extra blank line
|
||||||
|
|
@ -142,546 +114,24 @@ SCreditTextItemDef UIScene_Credits::gs_aCreditDefs[MAX_CREDIT_STRINGS] = {
|
||||||
{L"Roni Percy", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
{L"Roni Percy", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
||||||
{L"Anne Clarke", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
{L"Anne Clarke", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
||||||
{L"Anthony Kent", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
{L"Anthony Kent", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
||||||
#if 0
|
#if defined(_WIN64)
|
||||||
// credits are in the XUI file
|
|
||||||
#elif 0
|
|
||||||
// font credits
|
|
||||||
{L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText}, // extra blank line
|
|
||||||
{L"%ls", IDS_DYNAFONT, NO_TRANSLATED_STRING, eLargeText},
|
|
||||||
|
|
||||||
#elif 0
|
|
||||||
// font credits
|
|
||||||
{L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText}, // extra blank line
|
|
||||||
{L"%ls", IDS_DYNAFONT, NO_TRANSLATED_STRING, eLargeText},
|
|
||||||
|
|
||||||
#elif 0
|
|
||||||
{L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText}, // extra blank line
|
|
||||||
{L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText}, // extra blank line
|
|
||||||
{L"Xbox LIVE Arcade Team", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eExtraLargeText},
|
|
||||||
{L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText}, // extra blank line
|
|
||||||
{L"%s", IDS_CREDITS_LEADPRODUCER, NO_TRANSLATED_STRING, eLargeText},
|
|
||||||
{L"Roger Carpenter", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"%s", IDS_CREDITS_PRODUCER, NO_TRANSLATED_STRING, eLargeText},
|
|
||||||
{L"Stuart Platt", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Riccardo Lenzi", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"%s", IDS_CREDITS_LEADTESTER, NO_TRANSLATED_STRING, eLargeText},
|
|
||||||
{L"Bill Brown (Insight Global)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Brandon McCurry (Insight Global)", NO_TRANSLATED_STRING,
|
|
||||||
NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Hakim Ronaque, Joe Dunavant", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Paul Loynd, Jeffery Stephens", NO_TRANSLATED_STRING,
|
|
||||||
NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Rial Lerum (Xtreme Consulting Group Inc)", NO_TRANSLATED_STRING,
|
|
||||||
NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"%s", IDS_CREDITS_DESIGNTEAM, NO_TRANSLATED_STRING, eLargeText},
|
|
||||||
{L"Craig Leigh", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"%s", IDS_CREDITS_DEVELOPMENTTEAM, NO_TRANSLATED_STRING, eLargeText},
|
|
||||||
{L"Scott Guest", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Jeff \"Dextor\" Blazier", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Yukie Yamaguchi", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Jason Hewitt", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"%s", IDS_CREDITS_RELEASEMANAGEMENT, NO_TRANSLATED_STRING, eLargeText},
|
|
||||||
{L"Isaac Aubrey", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Jordan Forbes", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Josh Mulanax", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Shogo Ishii (TekSystems)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Tyler Keenan (Xtreme Consulting Group Inc)", NO_TRANSLATED_STRING,
|
|
||||||
NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Joshua Bullard (TekSystems)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"GTO-E Compliance", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eLargeText},
|
|
||||||
{L"Dominic Gara", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"James Small", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
|
|
||||||
{L"%s", IDS_CREDITS_EXECPRODUCER, NO_TRANSLATED_STRING, eLargeText},
|
|
||||||
{L"Mark Coates", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Avi Ben-Menahem", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Earnest Yuen", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
|
|
||||||
{L"%s", IDS_CREDITS_XBLADIRECTOR, NO_TRANSLATED_STRING, eLargeText},
|
|
||||||
{L"Ted Woolsey", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"%s", IDS_CREDITS_BIZDEV, NO_TRANSLATED_STRING, eLargeText},
|
|
||||||
{L"Cherie Lutz", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Peter Zetterberg", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"%s", IDS_CREDITS_PORTFOLIODIRECTOR, NO_TRANSLATED_STRING, eLargeText},
|
|
||||||
{L"Chris Charla", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"%s", IDS_CREDITS_PRODUCTMANAGER, NO_TRANSLATED_STRING, eLargeText},
|
|
||||||
{L"Daniel McConnell", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"%s", IDS_CREDITS_MARKETING, NO_TRANSLATED_STRING, eLargeText},
|
|
||||||
{L"Brandon Wells", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Michael Wolf", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"John Dongelmans", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"%s", IDS_CREDITS_COMMUNITYMANAGER, NO_TRANSLATED_STRING, eLargeText},
|
|
||||||
{L"Alex Hebert", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"%s", IDS_CREDITS_REDMONDLOC, NO_TRANSLATED_STRING, eLargeText},
|
|
||||||
{L"Zeb Wedell", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Gabriella Mittiga (Pactera)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Scott Fielding (Global Studio Consulting)", NO_TRANSLATED_STRING,
|
|
||||||
NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Yong Zhao (Hisoft Envisage Inc)", NO_TRANSLATED_STRING,
|
|
||||||
NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Shogo Ishii (Insight Global)", NO_TRANSLATED_STRING,
|
|
||||||
NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"%s", IDS_CREDITS_EUROPELOC, NO_TRANSLATED_STRING, eLargeText},
|
|
||||||
{L"Gerard Dunne", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Ricardo Cordoba", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Magali Lucchini", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Malika Kherfi", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Lizzy Untermann", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Ian Walsh", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Alfonsina Mossello (Keywords International Ltd)", NO_TRANSLATED_STRING,
|
|
||||||
NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Marika Mauri (Keywords International Ltd)", NO_TRANSLATED_STRING,
|
|
||||||
NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Nobuhiro Izumisawa (Keywords International Ltd)", NO_TRANSLATED_STRING,
|
|
||||||
NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Sebastien Faucon (Keywords International Ltd)", NO_TRANSLATED_STRING,
|
|
||||||
NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Jose Manuel Martinez (Keywords International Ltd)", NO_TRANSLATED_STRING,
|
|
||||||
NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Montse Garcia (Keywords International Ltd)", NO_TRANSLATED_STRING,
|
|
||||||
NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"%s", IDS_CREDITS_ASIALOC, NO_TRANSLATED_STRING, eLargeText},
|
|
||||||
{L"Takashi Sasaki", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Changseon Ha", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Shinya Muto (Zip Global Corporation)", NO_TRANSLATED_STRING,
|
|
||||||
NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Hiroshi Hosoda (Zip Global Corporation)", NO_TRANSLATED_STRING,
|
|
||||||
NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Natsuko Kudo (Zip Global Corporation)", NO_TRANSLATED_STRING,
|
|
||||||
NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Yong-Hong Park (Zip Global Corporation)", NO_TRANSLATED_STRING,
|
|
||||||
NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Yuko Yoshida (Zip Global Corporation)", NO_TRANSLATED_STRING,
|
|
||||||
NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"%s", IDS_CREDITS_USERRESEARCH, NO_TRANSLATED_STRING, eLargeText},
|
|
||||||
{L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText}, // extra blank line
|
|
||||||
{L"User Research Lead", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eLargeText},
|
|
||||||
{L"Tim Nichols", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText}, // extra blank line
|
|
||||||
{L"User Research Engineer", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eLargeText},
|
|
||||||
{L"Michael Medlock", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Kristie Fisher", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText}, // extra blank line
|
|
||||||
{L"%s", IDS_CREDITS_MGSCENTRAL, NO_TRANSLATED_STRING, eLargeText},
|
|
||||||
{L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText}, // extra blank line
|
|
||||||
{L"Test Team Lead", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eLargeText},
|
|
||||||
{L"Dan Smith", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"%s", IDS_CREDITS_MILESTONEACCEPT, NO_TRANSLATED_STRING, eLargeText},
|
|
||||||
{L"Justin Davis (VMC)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Microsoft Studios Sentient Development Team", NO_TRANSLATED_STRING,
|
|
||||||
NO_TRANSLATED_STRING, eLargeText},
|
|
||||||
{L"Ellery Charlson", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Frank Klier", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Jason Ronald", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Cullen Waters", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Steve Jackson", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Barath Vasudevan", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Derek Mantey", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Henry Sterchi", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Scott Fintel", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Soren Hannibal Nielsen", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Meetali Goel (Aditi)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Uladzimir Sadouski (Volt)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"%s", IDS_CREDITS_SPECIALTHANKS, NO_TRANSLATED_STRING, eLargeText},
|
|
||||||
|
|
||||||
{L"Allan Murphy", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Allison Bokone", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Alvin Chen", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Arthur Yung", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Brian Tyler", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Daniel Taylor", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Dave Reed", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Duoc Nguyen", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Eric Voreis", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Evelyn Thomas", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Jeff Braunstein", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Jolynn Carpenter", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Justin Brown", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Kareem Choudhry", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Kevin Cogger", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Kevin La Chapelle", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Luc Rancourt", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Matt Bronder", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Michael Siebert", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Mike Harsh", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Mike Sterling", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Nick Rapp", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Orr Keshet", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Paul Hellyar", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Peter Giffin", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Richard Moe", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Scott Selfon", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Stephane St-Michel", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Steve Spiller", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Steven Trombetta", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Theo Michel", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Tina Lemire", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Tom Miller", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Travis St. Onge", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
|
|
||||||
{L"Brianna Witherspoon (Nytec Inc)", NO_TRANSLATED_STRING,
|
|
||||||
NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Jim Pekola (Xtreme Consulting Group Inc)", NO_TRANSLATED_STRING,
|
|
||||||
NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Greg Hjertager", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Masha Reutovski (Nytec Inc)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Chris Henry", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Matt Golz", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Chris Gaffney (Volt)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Jared Barnhill (Aditi)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Laura Hawkins", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"2nd Cavalry", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"GTO Bug Bash Team", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Oliver Miyashita", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Kevin Salcedo", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Nick Bodenham", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Chris Giggins", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Ben Board", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Peter Choi", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Andy Su (CompuCom Systems Inc.)", NO_TRANSLATED_STRING,
|
|
||||||
NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"David Boker ", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Josh Bliggenstorfer", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Paul Amer", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Louise Smith", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Karin Behland (Aquent LLC)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"John Bruno", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Phil Spencer", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"John Smith", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Christi Davisson", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Jacob Farley (Aditi)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Chad Stringer (Collabera)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Rick Rispoli (Collabera)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Test by Experis", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eExtraLargeText},
|
|
||||||
{L"%s", IDS_CREDITS_TESTMANAGER, NO_TRANSLATED_STRING, eLargeText},
|
|
||||||
{L"Matt Brown", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Gavin Kennedy", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"%s", IDS_CREDITS_SRTESTLEAD, NO_TRANSLATED_STRING, eLargeText},
|
|
||||||
{L"Lloyd Bell", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Tim Attuquayefio", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"%s", IDS_CREDITS_TESTLEAD, NO_TRANSLATED_STRING, eLargeText},
|
|
||||||
{L"Byron R. Monzon", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Marta Alombro", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"%s", IDS_CREDITS_SDET, NO_TRANSLATED_STRING, eLargeText},
|
|
||||||
{L"Valeriy Novytskyy", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"%s", IDS_CREDITS_PROJECT, NO_TRANSLATED_STRING, eLargeText},
|
|
||||||
{L"Allyson Burk", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"David Scott", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"John Shearer", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"%s", IDS_CREDITS_ADDITIONALSTE, NO_TRANSLATED_STRING, eLargeText},
|
|
||||||
{L"Chris Merritt", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Kimberlee Lyles", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Eric Ranz", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Russ Allen", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"%s", IDS_CREDITS_TESTASSOCIATES, NO_TRANSLATED_STRING, eLargeText},
|
|
||||||
{L"Michael Arvat", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Josh Breese", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"April Culberson", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Jason Fox", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Clayton K. Hopper", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Matthew Howells", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Alan Hume", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Jacob Martin", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Kevin Lourigan", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Tyler Lovemark", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"%s", IDS_CREDITS_RISE_LUGO, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Ryan Naegeli", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Isaac Price", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Masha Reutovski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Brad Shockey", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Jonathan Tote", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Marc Williams", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Gillian Williams", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Jeffrey Woito", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Tyler Young", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Jae Yslas", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Amanda Swalling", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Ben Dienes", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Chris Kent", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Dustin Lukas", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Emily Lovering", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Nick Fowler", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
// EVEN MORE CREDITS
|
|
||||||
{L"Test by Lionbridge", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eExtraLargeText},
|
|
||||||
{L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText}, // extra blank line
|
|
||||||
{L"%s", IDS_CREDITS_TESTMANAGER, NO_TRANSLATED_STRING, eLargeText},
|
|
||||||
{L"Blazej Zawadzki", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"%s", IDS_CREDITS_TESTLEAD, NO_TRANSLATED_STRING, eLargeText},
|
|
||||||
{L"Jakub Garwacki", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Kamil Lahti", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Mariusz Gelnicki", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Karol Falak", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Lukasz Watroba", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
|
|
||||||
{L"%s", IDS_CREDITS_PROJECT, NO_TRANSLATED_STRING, eLargeText},
|
|
||||||
{L"Artur Grochowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Grzegorz Kohorewicz", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Lukasz Derewonko", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Michal Celej", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
|
|
||||||
{L"Senior Test Engineers", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eLargeText},
|
|
||||||
{L"Jakub Rybacki", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Mateusz Szymanski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Arkadiusz Szczytowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Rafal Rawski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
|
|
||||||
{L"%s", IDS_CREDITS_TESTASSOCIATES, NO_TRANSLATED_STRING, eLargeText},
|
|
||||||
{L"Adrian Klepacki", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Aleksander Pietraszak", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
|
|
||||||
{L"Arkadiusz Kala", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Arkadiusz Sykula", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Bartlomiej Kmita", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Jakub Malinowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Jan Prejs", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Jedrzej Kucharek", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Kamil Dabrowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Maciej Urlo", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Maciej Wygoda", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Marcin Piasecki", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Marcin Piotrowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Marek Latacz", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Michal Biernat", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Michal Krupinski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Michal Warchal", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Michal Wascinski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Michal Zbrzezniak", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Milosz Maciejewicz", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Pawel Kumanowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Przemyslaw Malinowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Tomasz Dabrowicz", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Tomasz Trzebiatowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Wojciech Kujawa", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
|
|
||||||
{L"Blazej Kohorewicz", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Damian Mielnik", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Dariusz Nowakowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Dominik Rzeznicki", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Jacek Piotrowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Jakub Rybacki", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Jakub Wozniakowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Jaroslaw Radzio", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Kamil Kaczor", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Karolina Szymanska", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Konrad Mady", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Krzysztof Galazka", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Ludwik Miszta", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Lukasz Kwiatkowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Marcin Krzysiak", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Mateusz Szymanski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Michal Maslany", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Michal Nyszka", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Norbert Jankowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Piotr Daszewski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Radoslaw Kozlowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Tomasz Kalowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"%s", IDS_CREDITS_SPECIALTHANKS, NO_TRANSLATED_STRING, eLargeText},
|
|
||||||
{L"David Hickey", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Sean Kellogg", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Adam Keating", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Jerzy Tyminski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Paulina Sliwinska", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
|
|
||||||
{L"Test by Shield", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eExtraLargeText},
|
|
||||||
{L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText}, // extra blank line
|
|
||||||
{L"GTO Shared Service Test Manager", NO_TRANSLATED_STRING,
|
|
||||||
NO_TRANSLATED_STRING, eLargeText},
|
|
||||||
{L"Natahri Felton", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Shield Test Lead", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eLargeText},
|
|
||||||
{L"Matt Giddings", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Shield IT Support", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eLargeText},
|
|
||||||
{L"David Grant (Compucom Systems Inc)", NO_TRANSLATED_STRING,
|
|
||||||
NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Primary Team", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eLargeText},
|
|
||||||
{L"Alex Chen (CompuCom Systems Inc)", NO_TRANSLATED_STRING,
|
|
||||||
NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Alex Hunte (CompuCom Systems Inc)", NO_TRANSLATED_STRING,
|
|
||||||
NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Brian Boye (CompuCom Systems Inc)", NO_TRANSLATED_STRING,
|
|
||||||
NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Bridgette Cummins (CompuCom Systems Inc)", NO_TRANSLATED_STRING,
|
|
||||||
NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Chris Carleson (Volt)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Christopher Hermey (CompuCom Systems Inc)", NO_TRANSLATED_STRING,
|
|
||||||
NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"David Hendrickson (CompuCom Systems Inc)", NO_TRANSLATED_STRING,
|
|
||||||
NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Ioana Preda (CompuCom Systems Inc)", NO_TRANSLATED_STRING,
|
|
||||||
NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Jessica Jenkins (CompuCom Systems Inc)", NO_TRANSLATED_STRING,
|
|
||||||
NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Johnathan Ochs (CompuCom Systems Inc)", NO_TRANSLATED_STRING,
|
|
||||||
NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Michael Upham (CompuCom Systems Inc)", NO_TRANSLATED_STRING,
|
|
||||||
NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Nicholas Johansson (CompuCom Systems Inc)", NO_TRANSLATED_STRING,
|
|
||||||
NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Nicholas Starner (CompuCom Systems Inc)", NO_TRANSLATED_STRING,
|
|
||||||
NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
{L"Torr Vickers (Volt)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText},
|
|
||||||
{L"Victoria Bruder (CompuCom Systems Inc)", NO_TRANSLATED_STRING,
|
|
||||||
NO_TRANSLATED_STRING, eSmallText},
|
|
||||||
|
|
||||||
#elif defined(_WIN64)
|
|
||||||
#elif 0
|
|
||||||
// font credits
|
|
||||||
{L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText}, // extra blank line
|
|
||||||
{L"%ls", IDS_DYNAFONT, NO_TRANSLATED_STRING, eLargeText},
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 1
|
|
||||||
// Miles & Iggy credits
|
// Miles & Iggy credits
|
||||||
{L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
{L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
||||||
eSmallText}, // extra blank line
|
eSmallText}, // extra blank line
|
||||||
{L"", CREDIT_ICON, eCreditIcon_Iggy, eSmallText}, // extra blank line
|
{L"", CREDIT_ICON, eCreditIcon_Iggy, eSmallText}, // extra blank line
|
||||||
{L"Uses Iggy.", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
{L"Uses Iggy.", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
||||||
eSmallText}, // extra blank line
|
eSmallText}, // extra blank line
|
||||||
#if 0
|
|
||||||
{L"Copyright (C) 2009-2013 by RAD Game Tools, Inc.", NO_TRANSLATED_STRING,
|
|
||||||
NO_TRANSLATED_STRING, eSmallText}, // extra blank line
|
|
||||||
#else
|
|
||||||
{L"Copyright (C) 2009-2014 by RAD Game Tools, Inc.", NO_TRANSLATED_STRING,
|
{L"Copyright (C) 2009-2014 by RAD Game Tools, Inc.", NO_TRANSLATED_STRING,
|
||||||
NO_TRANSLATED_STRING, eSmallText}, // extra blank line
|
NO_TRANSLATED_STRING, eSmallText}, // extra blank line
|
||||||
#endif
|
|
||||||
{L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
{L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
||||||
eSmallText}, // extra blank line
|
eSmallText}, // extra blank line
|
||||||
{L"", CREDIT_ICON, eCreditIcon_Miles, eSmallText}, // extra blank line
|
{L"", CREDIT_ICON, eCreditIcon_Miles, eSmallText}, // extra blank line
|
||||||
{L"Uses Miles Sound System.", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
{L"Uses Miles Sound System.", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
||||||
eSmallText}, // extra blank line
|
eSmallText}, // extra blank line
|
||||||
#if 0
|
|
||||||
{L"Copyright (C) 1991-2013 by RAD Game Tools, Inc.", NO_TRANSLATED_STRING,
|
|
||||||
NO_TRANSLATED_STRING, eSmallText}, // extra blank line
|
|
||||||
#else
|
|
||||||
{L"Copyright (C) 1991-2014 by RAD Game Tools, Inc.", NO_TRANSLATED_STRING,
|
{L"Copyright (C) 1991-2014 by RAD Game Tools, Inc.", NO_TRANSLATED_STRING,
|
||||||
NO_TRANSLATED_STRING, eSmallText}, // extra blank line
|
NO_TRANSLATED_STRING, eSmallText}, // extra blank line
|
||||||
#endif
|
|
||||||
#if 0
|
|
||||||
{L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,
|
|
||||||
eSmallText}, // extra blank line
|
|
||||||
{L"", CREDIT_ICON, eCreditIcon_Dolby, eSmallText}, // extra blank line
|
|
||||||
{L"Dolby and the double-D symbol", NO_TRANSLATED_STRING,
|
|
||||||
NO_TRANSLATED_STRING, eSmallText}, // extra blank line
|
|
||||||
{L"are trademarks of Dolby Laboratories.", NO_TRANSLATED_STRING,
|
|
||||||
NO_TRANSLATED_STRING, eSmallText}, // extra blank line
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
UIScene_Credits::UIScene_Credits(int iPad, void* initData, UILayer* parentLayer)
|
UIScene_Credits::UIScene_Credits(int iPad, void* initData, UILayer* parentLayer)
|
||||||
|
|
@ -821,9 +271,6 @@ void UIScene_Credits::handleInput(int iPad, int key, bool repeat, bool pressed,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ACTION_MENU_OK:
|
case ACTION_MENU_OK:
|
||||||
#if 0
|
|
||||||
case ACTION_MENU_TOUCHPAD_PRESS:
|
|
||||||
#endif
|
|
||||||
case ACTION_MENU_UP:
|
case ACTION_MENU_UP:
|
||||||
case ACTION_MENU_DOWN:
|
case ACTION_MENU_DOWN:
|
||||||
sendInputToMovie(key, repeat, pressed, released);
|
sendInputToMovie(key, repeat, pressed, released);
|
||||||
|
|
|
||||||
|
|
@ -10,21 +10,9 @@
|
||||||
#define DYNAMODE_FONT_CREDITS_COUNT 2
|
#define DYNAMODE_FONT_CREDITS_COUNT 2
|
||||||
#define PS3_DOLBY_CREDIT 4
|
#define PS3_DOLBY_CREDIT 4
|
||||||
|
|
||||||
#if 0
|
#if defined(_WINDOWS64) || defined(__linux__)
|
||||||
#define MAX_CREDIT_STRINGS \
|
|
||||||
(PS3_CREDITS_COUNT + MILES_AND_IGGY_CREDITS_COUNT + \
|
|
||||||
DYNAMODE_FONT_CREDITS_COUNT + PS3_DOLBY_CREDIT)
|
|
||||||
#elif 0
|
|
||||||
#define MAX_CREDIT_STRINGS \
|
|
||||||
(PS4_CREDITS_COUNT + MILES_AND_IGGY_CREDITS_COUNT + \
|
|
||||||
DYNAMODE_FONT_CREDITS_COUNT)
|
|
||||||
#elif 0 || defined _WINDOWS64 || defined __linux__
|
|
||||||
#define MAX_CREDIT_STRINGS \
|
#define MAX_CREDIT_STRINGS \
|
||||||
(XBOXONE_CREDITS_COUNT + MILES_AND_IGGY_CREDITS_COUNT)
|
(XBOXONE_CREDITS_COUNT + MILES_AND_IGGY_CREDITS_COUNT)
|
||||||
#elif 0
|
|
||||||
#define MAX_CREDIT_STRINGS \
|
|
||||||
(PSVITA_CREDITS_COUNT + MILES_AND_IGGY_CREDITS_COUNT + \
|
|
||||||
DYNAMODE_FONT_CREDITS_COUNT)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class UIScene_Credits : public UIScene {
|
class UIScene_Credits : public UIScene {
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,5 @@
|
||||||
#include "../../Minecraft.World/Platform/stdafx.h"
|
#include "../../Minecraft.World/Platform/stdafx.h"
|
||||||
#include "UI.h"
|
#include "UI.h"
|
||||||
#if 0 || 0
|
|
||||||
#include "../Network/Sony/SonyCommerce.h"
|
|
||||||
#endif
|
|
||||||
#include "UIScene_DLCMainMenu.h"
|
#include "UIScene_DLCMainMenu.h"
|
||||||
|
|
||||||
#define PLAYER_ONLINE_TIMER_ID 0
|
#define PLAYER_ONLINE_TIMER_ID 0
|
||||||
|
|
@ -19,58 +16,23 @@ UIScene_DLCMainMenu::UIScene_DLCMainMenu(int iPad, void* initData,
|
||||||
m_labelOffers.init(IDS_DOWNLOADABLE_CONTENT_OFFERS);
|
m_labelOffers.init(IDS_DOWNLOADABLE_CONTENT_OFFERS);
|
||||||
m_buttonListOffers.init(eControl_OffersList);
|
m_buttonListOffers.init(eControl_OffersList);
|
||||||
|
|
||||||
#if 0 || 0
|
|
||||||
// load any local DLC images
|
|
||||||
app.LoadLocalDLCImages();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if 0 || 0 || 0
|
|
||||||
// show a timer on this menu
|
|
||||||
m_Timer.setVisible(true);
|
|
||||||
|
|
||||||
m_bCategoriesShown = false;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (m_loadedResolution == eSceneResolution_1080) {
|
if (m_loadedResolution == eSceneResolution_1080) {
|
||||||
m_labelXboxStore.init(L"");
|
m_labelXboxStore.init(L"");
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
m_Timer.setVisible(false);
|
|
||||||
|
|
||||||
m_buttonListOffers.addItem(IDS_DLC_MENU_SKINPACKS, e_DLC_SkinPack);
|
|
||||||
m_buttonListOffers.addItem(IDS_DLC_MENU_TEXTUREPACKS, e_DLC_TexturePacks);
|
|
||||||
m_buttonListOffers.addItem(IDS_DLC_MENU_MASHUPPACKS, e_DLC_MashupPacks);
|
|
||||||
|
|
||||||
app.AddDLCRequest(e_Marketplace_Content); // content is skin packs, texture
|
|
||||||
// packs and mash-up packs
|
|
||||||
// we also need to mount the local DLC so we can tell what's been purchased
|
|
||||||
app.StartInstallDLCProcess(iPad);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
TelemetryManager->RecordMenuShown(iPad, eUIScene_DLCMainMenu, 0);
|
TelemetryManager->RecordMenuShown(iPad, eUIScene_DLCMainMenu, 0);
|
||||||
|
|
||||||
#if 0 || 0
|
|
||||||
app.GetCommerce()->ShowPsStoreIcon();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if (0 || 0 || 0)
|
|
||||||
addTimer(PLAYER_ONLINE_TIMER_ID, PLAYER_ONLINE_TIMER_TIME);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
UIScene_DLCMainMenu::~UIScene_DLCMainMenu() {
|
UIScene_DLCMainMenu::~UIScene_DLCMainMenu() {
|
||||||
// Alert the app the we no longer want to be informed of ethernet
|
// Alert the app the we no longer want to be informed of ethernet
|
||||||
// connections
|
// connections
|
||||||
app.SetLiveLinkRequired(false);
|
app.SetLiveLinkRequired(false);
|
||||||
#if 0 || 0
|
|
||||||
app.FreeLocalDLCImages();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
// 4J-JEV: Have to switch back to user preferred languge now.
|
|
||||||
setLanguageOverride(true);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::wstring UIScene_DLCMainMenu::getMoviePath() { return L"DLCMainMenu"; }
|
std::wstring UIScene_DLCMainMenu::getMoviePath() { return L"DLCMainMenu"; }
|
||||||
|
|
@ -90,16 +52,10 @@ void UIScene_DLCMainMenu::handleInput(int iPad, int key, bool repeat,
|
||||||
switch (key) {
|
switch (key) {
|
||||||
case ACTION_MENU_CANCEL:
|
case ACTION_MENU_CANCEL:
|
||||||
if (pressed) {
|
if (pressed) {
|
||||||
#if 0 || 0
|
|
||||||
app.GetCommerce()->HidePsStoreIcon();
|
|
||||||
#endif
|
|
||||||
navigateBack();
|
navigateBack();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ACTION_MENU_OK:
|
case ACTION_MENU_OK:
|
||||||
#if 0
|
|
||||||
case ACTION_MENU_TOUCHPAD_PRESS:
|
|
||||||
#endif
|
|
||||||
sendInputToMovie(key, repeat, pressed, released);
|
sendInputToMovie(key, repeat, pressed, released);
|
||||||
break;
|
break;
|
||||||
case ACTION_MENU_UP:
|
case ACTION_MENU_UP:
|
||||||
|
|
@ -125,9 +81,7 @@ void UIScene_DLCMainMenu::handlePress(F64 controlId, F64 childId) {
|
||||||
|
|
||||||
// Xbox One will have requested the marketplace content - there is
|
// Xbox One will have requested the marketplace content - there is
|
||||||
// only that type
|
// only that type
|
||||||
#if 1
|
|
||||||
app.AddDLCRequest((eDLCMarketplaceType)iIndex, true);
|
app.AddDLCRequest((eDLCMarketplaceType)iIndex, true);
|
||||||
#endif
|
|
||||||
killTimer(PLAYER_ONLINE_TIMER_ID);
|
killTimer(PLAYER_ONLINE_TIMER_ID);
|
||||||
ui.NavigateToScene(m_iPad, eUIScene_DLCOffersMenu, param);
|
ui.NavigateToScene(m_iPad, eUIScene_DLCOffersMenu, param);
|
||||||
break;
|
break;
|
||||||
|
|
@ -136,37 +90,12 @@ void UIScene_DLCMainMenu::handlePress(F64 controlId, F64 childId) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void UIScene_DLCMainMenu::handleTimerComplete(int id) {
|
void UIScene_DLCMainMenu::handleTimerComplete(int id) {
|
||||||
#if (0 || 0 || 0)
|
|
||||||
switch (id) {
|
|
||||||
case PLAYER_ONLINE_TIMER_ID:
|
|
||||||
#ifndef _WINDOWS64
|
|
||||||
if (ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad()) ==
|
|
||||||
false) {
|
|
||||||
// check the player hasn't gone offline
|
|
||||||
// If they have, bring up the PSN warning and exit from the
|
|
||||||
// leaderboards
|
|
||||||
unsigned int uiIDA[1];
|
|
||||||
uiIDA[0] = IDS_OK;
|
|
||||||
C4JStorage::EMessageResult result = ui.RequestErrorMessage(
|
|
||||||
IDS_CONNECTION_LOST,
|
|
||||||
g_NetworkManager.CorrectErrorIDS(
|
|
||||||
IDS_CONNECTION_LOST_LIVE_NO_EXIT),
|
|
||||||
uiIDA, 1, ProfileManager.GetPrimaryPad(),
|
|
||||||
UIScene_DLCMainMenu::ExitDLCMainMenu, this);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int UIScene_DLCMainMenu::ExitDLCMainMenu(void* pParam, int iPad,
|
int UIScene_DLCMainMenu::ExitDLCMainMenu(void* pParam, int iPad,
|
||||||
C4JStorage::EMessageResult result) {
|
C4JStorage::EMessageResult result) {
|
||||||
UIScene_DLCMainMenu* pClass = (UIScene_DLCMainMenu*)pParam;
|
UIScene_DLCMainMenu* pClass = (UIScene_DLCMainMenu*)pParam;
|
||||||
|
|
||||||
#if 0 || 0
|
|
||||||
app.GetCommerce()->HidePsStoreIcon();
|
|
||||||
#endif
|
|
||||||
pClass->navigateBack();
|
pClass->navigateBack();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -179,55 +108,10 @@ void UIScene_DLCMainMenu::handleGainFocus(bool navBack) {
|
||||||
|
|
||||||
if (navBack) {
|
if (navBack) {
|
||||||
// add the timer back in
|
// add the timer back in
|
||||||
#if (0 || 0 || 0)
|
|
||||||
addTimer(PLAYER_ONLINE_TIMER_ID, PLAYER_ONLINE_TIMER_TIME);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void UIScene_DLCMainMenu::tick() {
|
void UIScene_DLCMainMenu::tick() {
|
||||||
UIScene::tick();
|
UIScene::tick();
|
||||||
|
|
||||||
#if 0 || 0 || 0
|
|
||||||
if ((m_bCategoriesShown == false) &&
|
|
||||||
(app.GetCommerceCategoriesRetrieved())) {
|
|
||||||
// disable the timer display on this menu
|
|
||||||
m_Timer.setVisible(false);
|
|
||||||
m_bCategoriesShown = true;
|
|
||||||
|
|
||||||
// add the categories to the list box
|
|
||||||
SonyCommerce::CategoryInfo* pCategories = app.GetCategoryInfo();
|
|
||||||
std::list<SonyCommerce::CategoryInfoSub>::iterator iter =
|
|
||||||
pCategories->subCategories.begin();
|
|
||||||
SonyCommerce::CategoryInfoSub category;
|
|
||||||
for (int i = 0; i < pCategories->countOfSubCategories; i++) {
|
|
||||||
// add a button in with the subcategory
|
|
||||||
category = (SonyCommerce::CategoryInfoSub)(*iter);
|
|
||||||
|
|
||||||
std::string teststring = category.categoryName;
|
|
||||||
m_buttonListOffers.addItem(teststring, i);
|
|
||||||
|
|
||||||
iter++;
|
|
||||||
}
|
|
||||||
|
|
||||||
// set the focus to the first thing in the categories if there are any
|
|
||||||
if (pCategories->countOfSubCategories > 0) {
|
|
||||||
m_buttonListOffers.setFocus(true);
|
|
||||||
} else {
|
|
||||||
#if 0 || 0 || 0
|
|
||||||
app.CheckForEmptyStore(ProfileManager.GetPrimaryPad());
|
|
||||||
#endif
|
|
||||||
// need to display text to say no downloadable content available yet
|
|
||||||
m_labelOffers.setLabel(app.GetString(IDS_NO_DLCCATEGORIES));
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
// 4J-JEV: TRC Requirement (R4055), need to display this system
|
|
||||||
// message.
|
|
||||||
ProfileManager.DisplaySystemMessage(
|
|
||||||
SCE_MSG_DIALOG_SYSMSG_TYPE_TRC_EMPTY_STORE,
|
|
||||||
ProfileManager.GetPrimaryPad());
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,9 +23,6 @@ private:
|
||||||
static int ExitDLCMainMenu(void* pParam, int iPad,
|
static int ExitDLCMainMenu(void* pParam, int iPad,
|
||||||
C4JStorage::EMessageResult result);
|
C4JStorage::EMessageResult result);
|
||||||
|
|
||||||
#if 0 || 0 || 0
|
|
||||||
bool m_bCategoriesShown;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
UIScene_DLCMainMenu(int iPad, void* initData, UILayer* parentLayer);
|
UIScene_DLCMainMenu(int iPad, void* initData, UILayer* parentLayer);
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,7 @@
|
||||||
#include "UI.h"
|
#include "UI.h"
|
||||||
#include "UIScene_DLCOffersMenu.h"
|
#include "UIScene_DLCOffersMenu.h"
|
||||||
#include "../../../../Minecraft.World/Util/StringHelpers.h"
|
#include "../../../../Minecraft.World/Util/StringHelpers.h"
|
||||||
#if 0 || 0 || 0
|
|
||||||
#include "Common/Network/Sony/SonyHttp.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
#include "PSVita/Network/SonyCommerce_Vita.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define PLAYER_ONLINE_TIMER_ID 0
|
#define PLAYER_ONLINE_TIMER_ID 0
|
||||||
#define PLAYER_ONLINE_TIMER_TIME 100
|
#define PLAYER_ONLINE_TIMER_TIME 100
|
||||||
|
|
@ -21,9 +15,6 @@ UIScene_DLCOffersMenu::UIScene_DLCOffersMenu(int iPad, void* initData,
|
||||||
m_iProductInfoIndex = param->iType;
|
m_iProductInfoIndex = param->iType;
|
||||||
m_iCurrentDLC = 0;
|
m_iCurrentDLC = 0;
|
||||||
m_iTotalDLC = 0;
|
m_iTotalDLC = 0;
|
||||||
#if 0 || 0 || 0
|
|
||||||
m_pvProductInfo = NULL;
|
|
||||||
#endif
|
|
||||||
m_bAddAllDLCButtons = true;
|
m_bAddAllDLCButtons = true;
|
||||||
|
|
||||||
// Setup all the Iggy references we need for this scene
|
// Setup all the Iggy references we need for this scene
|
||||||
|
|
@ -46,28 +37,9 @@ UIScene_DLCOffersMenu::UIScene_DLCOffersMenu(int iPad, void* initData,
|
||||||
m_labelXboxStore.init(L"");
|
m_labelXboxStore.init(L"");
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
m_pNoImageFor_DLC = NULL;
|
|
||||||
// If we don't yet have this DLC, we need to display a timer
|
|
||||||
m_bDLCRequiredIsRetrieved = false;
|
|
||||||
m_bIgnorePress = true;
|
|
||||||
m_bSelectionChanged = true;
|
|
||||||
// display a timer
|
|
||||||
m_Timer.setVisible(true);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
// sceNpCommerceShowPsStoreIcon(SCE_NP_COMMERCE_PS_STORE_ICON_CENTER);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if (0 || 0 || 0)
|
|
||||||
addTimer(PLAYER_ONLINE_TIMER_ID, PLAYER_ONLINE_TIMER_TIME);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
ui.TouchBoxRebuild(this);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
UIScene_DLCOffersMenu::~UIScene_DLCOffersMenu() {
|
UIScene_DLCOffersMenu::~UIScene_DLCOffersMenu() {
|
||||||
|
|
@ -77,37 +49,12 @@ UIScene_DLCOffersMenu::~UIScene_DLCOffersMenu() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void UIScene_DLCOffersMenu::handleTimerComplete(int id) {
|
void UIScene_DLCOffersMenu::handleTimerComplete(int id) {
|
||||||
#if (0 || 0 || 0)
|
|
||||||
switch (id) {
|
|
||||||
case PLAYER_ONLINE_TIMER_ID:
|
|
||||||
#ifndef _WINDOWS64
|
|
||||||
if (ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad()) ==
|
|
||||||
false) {
|
|
||||||
// check the player hasn't gone offline
|
|
||||||
// If they have, bring up the PSN warning and exit from the DLC
|
|
||||||
// menu
|
|
||||||
unsigned int uiIDA[1];
|
|
||||||
uiIDA[0] = IDS_OK;
|
|
||||||
C4JStorage::EMessageResult result = ui.RequestErrorMessage(
|
|
||||||
IDS_CONNECTION_LOST,
|
|
||||||
g_NetworkManager.CorrectErrorIDS(
|
|
||||||
IDS_CONNECTION_LOST_LIVE_NO_EXIT),
|
|
||||||
uiIDA, 1, ProfileManager.GetPrimaryPad(),
|
|
||||||
UIScene_DLCOffersMenu::ExitDLCOffersMenu, this);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int UIScene_DLCOffersMenu::ExitDLCOffersMenu(
|
int UIScene_DLCOffersMenu::ExitDLCOffersMenu(
|
||||||
void* pParam, int iPad, C4JStorage::EMessageResult result) {
|
void* pParam, int iPad, C4JStorage::EMessageResult result) {
|
||||||
UIScene_DLCOffersMenu* pClass = (UIScene_DLCOffersMenu*)pParam;
|
UIScene_DLCOffersMenu* pClass = (UIScene_DLCOffersMenu*)pParam;
|
||||||
|
|
||||||
#if 0 || 0
|
|
||||||
app.GetCommerce()->HidePsStoreIcon();
|
|
||||||
#endif
|
|
||||||
ui.NavigateToHomeMenu(); // iPad,eUIScene_MainMenu);
|
ui.NavigateToHomeMenu(); // iPad,eUIScene_MainMenu);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -142,9 +89,6 @@ void UIScene_DLCOffersMenu::handleInput(int iPad, int key, bool repeat,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ACTION_MENU_OK:
|
case ACTION_MENU_OK:
|
||||||
#if 0
|
|
||||||
case ACTION_MENU_TOUCHPAD_PRESS:
|
|
||||||
#endif
|
|
||||||
sendInputToMovie(key, repeat, pressed, released);
|
sendInputToMovie(key, repeat, pressed, released);
|
||||||
break;
|
break;
|
||||||
case ACTION_MENU_UP:
|
case ACTION_MENU_UP:
|
||||||
|
|
@ -175,7 +119,7 @@ void UIScene_DLCOffersMenu::handleInput(int iPad, int key, bool repeat,
|
||||||
|
|
||||||
case ACTION_MENU_LEFT:
|
case ACTION_MENU_LEFT:
|
||||||
/*
|
/*
|
||||||
#ifdef _DEBUG
|
#if defined(_DEBUG)
|
||||||
static int iTextC=0;
|
static int iTextC=0;
|
||||||
switch(iTextC)
|
switch(iTextC)
|
||||||
{
|
{
|
||||||
|
|
@ -233,52 +177,11 @@ AB"); break;
|
||||||
void UIScene_DLCOffersMenu::handlePress(F64 controlId, F64 childId) {
|
void UIScene_DLCOffersMenu::handlePress(F64 controlId, F64 childId) {
|
||||||
switch ((int)controlId) {
|
switch ((int)controlId) {
|
||||||
case eControl_OffersList: {
|
case eControl_OffersList: {
|
||||||
#if 0 || 0 || 0
|
|
||||||
// buy the DLC
|
|
||||||
|
|
||||||
std::vector<SonyCommerce::ProductInfo>::iterator it =
|
|
||||||
m_pvProductInfo->begin();
|
|
||||||
std::string teststring;
|
|
||||||
for (int i = 0; i < childId; i++) {
|
|
||||||
it++;
|
|
||||||
}
|
|
||||||
|
|
||||||
SonyCommerce::ProductInfo info = *it;
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
// is the item purchasable?
|
|
||||||
if (info.purchasabilityFlag == 1) {
|
|
||||||
// can be bought
|
|
||||||
app.Checkout(info.skuId);
|
|
||||||
} else {
|
|
||||||
if ((info.annotation &
|
|
||||||
(SCE_NP_COMMERCE2_SKU_ANN_PURCHASED_CANNOT_PURCHASE_AGAIN |
|
|
||||||
SCE_NP_COMMERCE2_SKU_ANN_PURCHASED_CAN_PURCHASE_AGAIN)) !=
|
|
||||||
0) {
|
|
||||||
app.DownloadAlreadyPurchased(info.skuId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#else // 0
|
|
||||||
// is the item purchasable?
|
|
||||||
if (info.purchasabilityFlag ==
|
|
||||||
SCE_TOOLKIT_NP_COMMERCE_NOT_PURCHASED) {
|
|
||||||
// can be bought
|
|
||||||
app.Checkout(info.skuId);
|
|
||||||
} else {
|
|
||||||
app.DownloadAlreadyPurchased(info.skuId);
|
|
||||||
}
|
|
||||||
#endif // 0
|
|
||||||
#elif 0
|
|
||||||
int iIndex = (int)childId;
|
|
||||||
StorageManager.InstallOffer(
|
|
||||||
1, StorageManager.GetOffer(iIndex).wszProductID, NULL, NULL);
|
|
||||||
#else
|
|
||||||
int iIndex = (int)childId;
|
int iIndex = (int)childId;
|
||||||
|
|
||||||
uint64_t ullIndexA[1];
|
uint64_t ullIndexA[1];
|
||||||
ullIndexA[0] = StorageManager.GetOffer(iIndex).qwOfferID;
|
ullIndexA[0] = StorageManager.GetOffer(iIndex).qwOfferID;
|
||||||
StorageManager.InstallOffer(1, ullIndexA, NULL, NULL);
|
StorageManager.InstallOffer(1, ullIndexA, NULL, NULL);
|
||||||
#endif
|
|
||||||
} break;
|
} break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -288,598 +191,14 @@ void UIScene_DLCOffersMenu::handleSelectionChanged(F64 selectedId) {}
|
||||||
void UIScene_DLCOffersMenu::handleFocusChange(F64 controlId, F64 childId) {
|
void UIScene_DLCOffersMenu::handleFocusChange(F64 controlId, F64 childId) {
|
||||||
app.DebugPrintf("UIScene_DLCOffersMenu::handleFocusChange\n");
|
app.DebugPrintf("UIScene_DLCOffersMenu::handleFocusChange\n");
|
||||||
|
|
||||||
#if 0
|
|
||||||
// set this here on Vita, in case we've came from a touch screen press.
|
|
||||||
// Fixes bug #5794
|
|
||||||
if ((int)controlId == eControl_OffersList) {
|
|
||||||
m_bProductInfoShown = false;
|
|
||||||
m_iCurrentDLC = (int)childId;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
m_bSelectionChanged = true; // to tell the tick to update the display
|
|
||||||
// 4J-PB can't call settexturename from a callback
|
|
||||||
/*if(m_buttonListOffers.hasFocus() && (childId>-1))
|
|
||||||
{
|
|
||||||
int iIndex = (int)childId;
|
|
||||||
MARKETPLACE_CONTENTOFFER_INFO xOffer =
|
|
||||||
StorageManager.GetOffer(iIndex); UpdateDisplay(xOffer);
|
|
||||||
}*/
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if 0 || 0
|
|
||||||
if (m_pvProductInfo) {
|
|
||||||
m_bIsSelected = true;
|
|
||||||
std::vector<SonyCommerce::ProductInfo>::iterator it =
|
|
||||||
m_pvProductInfo->begin();
|
|
||||||
std::string teststring;
|
|
||||||
for (int i = 0; i < childId; i++) {
|
|
||||||
it++;
|
|
||||||
}
|
|
||||||
|
|
||||||
SonyCommerce::ProductInfo info = *it;
|
|
||||||
if (info.purchasabilityFlag == SCE_TOOLKIT_NP_COMMERCE_NOT_PURCHASED) {
|
|
||||||
m_bHasPurchased = false;
|
|
||||||
} else {
|
|
||||||
m_bHasPurchased = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
updateTooltips();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UIScene_DLCOffersMenu::tick() {
|
void UIScene_DLCOffersMenu::tick() {
|
||||||
UIScene::tick();
|
UIScene::tick();
|
||||||
|
|
||||||
#if 0 || 0 || 0
|
|
||||||
|
|
||||||
if (m_bAddAllDLCButtons) {
|
|
||||||
// need to fill out all the dlc buttons
|
|
||||||
|
|
||||||
if ((m_bProductInfoShown == false) &&
|
|
||||||
app.GetCommerceProductListRetrieved() &&
|
|
||||||
app.GetCommerceProductListInfoRetrieved()) {
|
|
||||||
m_bAddAllDLCButtons = false;
|
|
||||||
// add the categories to the list box
|
|
||||||
if (m_pvProductInfo == NULL) {
|
|
||||||
m_pvProductInfo = app.GetProductList(m_iProductInfoIndex);
|
|
||||||
if (m_pvProductInfo == NULL) {
|
|
||||||
m_iTotalDLC = 0;
|
|
||||||
// need to display text to say no downloadable content
|
|
||||||
// available yet
|
|
||||||
m_labelOffers.setLabel(app.GetString(IDS_NO_DLCCATEGORIES));
|
|
||||||
|
|
||||||
m_bProductInfoShown = true;
|
|
||||||
return;
|
|
||||||
} else
|
|
||||||
m_iTotalDLC = m_pvProductInfo->size();
|
|
||||||
}
|
|
||||||
|
|
||||||
std::vector<SonyCommerce::ProductInfo>::iterator it =
|
|
||||||
m_pvProductInfo->begin();
|
|
||||||
std::string teststring;
|
|
||||||
bool bFirstItemSet = false;
|
|
||||||
for (int i = 0; i < m_iTotalDLC; i++) {
|
|
||||||
SonyCommerce::ProductInfo info = *it;
|
|
||||||
|
|
||||||
if (strncmp(info.productName, "Minecraft ", 10) == 0) {
|
|
||||||
teststring = &info.productName[10];
|
|
||||||
|
|
||||||
} else {
|
|
||||||
teststring = info.productName;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool bDLCIsAvailable = false;
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
// is the item purchasable?
|
|
||||||
if (info.purchasabilityFlag == 1) {
|
|
||||||
// can be bought
|
|
||||||
app.DebugPrintf("Adding DLC (%s) - not bought\n",
|
|
||||||
teststring.c_str());
|
|
||||||
m_buttonListOffers.addItem(teststring, false, i);
|
|
||||||
bDLCIsAvailable = true;
|
|
||||||
} else {
|
|
||||||
if ((info.annotation &
|
|
||||||
(SCE_NP_COMMERCE2_SKU_ANN_PURCHASED_CANNOT_PURCHASE_AGAIN |
|
|
||||||
SCE_NP_COMMERCE2_SKU_ANN_PURCHASED_CAN_PURCHASE_AGAIN)) !=
|
|
||||||
0) {
|
|
||||||
app.DebugPrintf("Adding DLC (%s) - bought\n",
|
|
||||||
teststring.c_str());
|
|
||||||
m_buttonListOffers.addItem(teststring, true, i);
|
|
||||||
bDLCIsAvailable = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#else // 0
|
|
||||||
// is the item purchasable?
|
|
||||||
if (info.purchasabilityFlag ==
|
|
||||||
SCE_TOOLKIT_NP_COMMERCE_NOT_PURCHASED) {
|
|
||||||
// can be bought
|
|
||||||
m_buttonListOffers.addItem(teststring, false, i);
|
|
||||||
bDLCIsAvailable = true;
|
|
||||||
} else {
|
|
||||||
m_buttonListOffers.addItem(teststring, true, i);
|
|
||||||
bDLCIsAvailable = true;
|
|
||||||
}
|
|
||||||
#endif // 0
|
|
||||||
|
|
||||||
// set the other details for the first item
|
|
||||||
if (bDLCIsAvailable && (bFirstItemSet == false)) {
|
|
||||||
bFirstItemSet = true;
|
|
||||||
|
|
||||||
// 4J-PB - info.longDescription isn't null terminated
|
|
||||||
char chLongDescription
|
|
||||||
[SCE_NP_COMMERCE2_PRODUCT_LONG_DESCRIPTION_LEN + 1];
|
|
||||||
memcpy(chLongDescription, info.longDescription,
|
|
||||||
SCE_NP_COMMERCE2_PRODUCT_LONG_DESCRIPTION_LEN);
|
|
||||||
chLongDescription
|
|
||||||
[SCE_NP_COMMERCE2_PRODUCT_LONG_DESCRIPTION_LEN] = 0;
|
|
||||||
m_labelHTMLSellText.setLabel(chLongDescription);
|
|
||||||
|
|
||||||
if (info.ui32Price == 0) {
|
|
||||||
m_labelPriceTag.setLabel(
|
|
||||||
app.GetString(IDS_DLC_PRICE_FREE));
|
|
||||||
} else {
|
|
||||||
teststring = info.price;
|
|
||||||
m_labelPriceTag.setLabel(teststring);
|
|
||||||
}
|
|
||||||
|
|
||||||
// get the image - if we haven't already
|
|
||||||
std::wstring textureName = filenametowstring(info.imageUrl);
|
|
||||||
|
|
||||||
if (hasRegisteredSubstitutionTexture(textureName) ==
|
|
||||||
false) {
|
|
||||||
PBYTE pbImageData;
|
|
||||||
int iImageDataBytes = 0;
|
|
||||||
bool bDeleteData;
|
|
||||||
#if 0
|
|
||||||
// check the local files first
|
|
||||||
SONYDLC* pSONYDLCInfo =
|
|
||||||
app.GetSONYDLCInfoFromKeyname(info.productId);
|
|
||||||
|
|
||||||
// does the DLC info have an image?
|
|
||||||
if (pSONYDLCInfo && pSONYDLCInfo->dwImageBytes != 0) {
|
|
||||||
pbImageData = pSONYDLCInfo->pbImageData;
|
|
||||||
iImageDataBytes = pSONYDLCInfo->dwImageBytes;
|
|
||||||
bDeleteData =
|
|
||||||
false; // we'll clean up the local LDC images
|
|
||||||
} else
|
|
||||||
#endif
|
|
||||||
if (info.imageUrl[0] != 0) {
|
|
||||||
SonyHttp::getDataFromURL(info.imageUrl,
|
|
||||||
(void**)&pbImageData,
|
|
||||||
&iImageDataBytes);
|
|
||||||
bDeleteData = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (iImageDataBytes != 0) {
|
|
||||||
// set the image
|
|
||||||
registerSubstitutionTexture(
|
|
||||||
textureName, pbImageData, iImageDataBytes,
|
|
||||||
bDeleteData);
|
|
||||||
m_bitmapIconOfferImage.setTextureName(textureName);
|
|
||||||
// 4J Stu - Don't delete this
|
|
||||||
// delete [] pbImageData;
|
|
||||||
} else {
|
|
||||||
m_bitmapIconOfferImage.setTextureName(L"");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
m_bitmapIconOfferImage.setTextureName(textureName);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
it++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (bFirstItemSet == false) {
|
|
||||||
// we were not able to add any items to the list
|
|
||||||
m_labelOffers.setLabel(app.GetString(IDS_NO_DLCCATEGORIES));
|
|
||||||
} else {
|
|
||||||
// set the focus to the first thing in the categories if there
|
|
||||||
// are any
|
|
||||||
if (m_pvProductInfo->size() > 0) {
|
|
||||||
m_buttonListOffers.setFocus(true);
|
|
||||||
} else {
|
|
||||||
// need to display text to say no downloadable content
|
|
||||||
// available yet
|
|
||||||
m_labelOffers.setLabel(app.GetString(IDS_NO_DLCCATEGORIES));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
m_Timer.setVisible(false);
|
|
||||||
m_bProductInfoShown = true;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
#if 0
|
|
||||||
// MGH - fixes bug 5768 on Vita - should be extended properly to work
|
|
||||||
// for other platforms
|
|
||||||
if ((SonyCommerce_Vita::getPurchasabilityUpdated()) &&
|
|
||||||
app.GetCommerceProductListRetrieved() &&
|
|
||||||
app.GetCommerceProductListInfoRetrieved() && m_iTotalDLC > 0) {
|
|
||||||
{
|
|
||||||
std::vector<SonyCommerce::ProductInfo>::iterator it =
|
|
||||||
m_pvProductInfo->begin();
|
|
||||||
for (int i = 0; i < m_iTotalDLC; i++) {
|
|
||||||
SonyCommerce::ProductInfo info = *it;
|
|
||||||
// is the item purchasable?
|
|
||||||
if (info.purchasabilityFlag ==
|
|
||||||
SCE_TOOLKIT_NP_COMMERCE_NOT_PURCHASED) {
|
|
||||||
// can be bought
|
|
||||||
m_buttonListOffers.showTick(i, false);
|
|
||||||
} else {
|
|
||||||
m_buttonListOffers.showTick(i, true);
|
|
||||||
}
|
|
||||||
it++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// just update the details based on what the current selection is /
|
|
||||||
// TomK-4J - don't proceed if total DLC is 0 (bug 4757)
|
|
||||||
if ((m_bProductInfoShown == false) &&
|
|
||||||
app.GetCommerceProductListRetrieved() &&
|
|
||||||
app.GetCommerceProductListInfoRetrieved() && m_iTotalDLC > 0) {
|
|
||||||
std::vector<SonyCommerce::ProductInfo>::iterator it =
|
|
||||||
m_pvProductInfo->begin();
|
|
||||||
std::string teststring;
|
|
||||||
for (int i = 0; i < m_iCurrentDLC; i++) {
|
|
||||||
it++;
|
|
||||||
}
|
|
||||||
|
|
||||||
SonyCommerce::ProductInfo info = *it;
|
|
||||||
|
|
||||||
// 4J-PB - info.longDescription isn't null terminated
|
|
||||||
char chLongDescription
|
|
||||||
[SCE_NP_COMMERCE2_PRODUCT_LONG_DESCRIPTION_LEN + 1];
|
|
||||||
memcpy(chLongDescription, info.longDescription,
|
|
||||||
SCE_NP_COMMERCE2_PRODUCT_LONG_DESCRIPTION_LEN);
|
|
||||||
chLongDescription[SCE_NP_COMMERCE2_PRODUCT_LONG_DESCRIPTION_LEN] =
|
|
||||||
0;
|
|
||||||
m_labelHTMLSellText.setLabel(chLongDescription);
|
|
||||||
|
|
||||||
if (info.ui32Price == 0) {
|
|
||||||
m_labelPriceTag.setLabel(app.GetString(IDS_DLC_PRICE_FREE));
|
|
||||||
} else {
|
|
||||||
teststring = info.price;
|
|
||||||
m_labelPriceTag.setLabel(teststring);
|
|
||||||
}
|
|
||||||
|
|
||||||
// get the image
|
|
||||||
|
|
||||||
// then retrieve from the web
|
|
||||||
std::wstring textureName = filenametowstring(info.imageUrl);
|
|
||||||
|
|
||||||
if (hasRegisteredSubstitutionTexture(textureName) == false) {
|
|
||||||
PBYTE pbImageData;
|
|
||||||
int iImageDataBytes = 0;
|
|
||||||
bool bDeleteData;
|
|
||||||
#if 0
|
|
||||||
// check the local files first
|
|
||||||
SONYDLC* pSONYDLCInfo =
|
|
||||||
app.GetSONYDLCInfoFromKeyname(info.productId);
|
|
||||||
|
|
||||||
// does the DLC info have an image?
|
|
||||||
if (pSONYDLCInfo->dwImageBytes != 0) {
|
|
||||||
pbImageData = pSONYDLCInfo->pbImageData;
|
|
||||||
iImageDataBytes = pSONYDLCInfo->dwImageBytes;
|
|
||||||
bDeleteData = false; // we'll clean up the local LDC images
|
|
||||||
} else
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
SonyHttp::getDataFromURL(
|
|
||||||
info.imageUrl, (void**)&pbImageData, &iImageDataBytes);
|
|
||||||
bDeleteData = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (iImageDataBytes != 0) {
|
|
||||||
// set the image
|
|
||||||
registerSubstitutionTexture(textureName, pbImageData,
|
|
||||||
iImageDataBytes, bDeleteData);
|
|
||||||
m_bitmapIconOfferImage.setTextureName(textureName);
|
|
||||||
|
|
||||||
// 4J Stu - Don't delete this
|
|
||||||
// delete [] pbImageData;
|
|
||||||
} else {
|
|
||||||
m_bitmapIconOfferImage.setTextureName(L"");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
m_bitmapIconOfferImage.setTextureName(textureName);
|
|
||||||
}
|
|
||||||
m_bProductInfoShown = true;
|
|
||||||
m_Timer.setVisible(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#elif 0
|
|
||||||
if (m_bAddAllDLCButtons) {
|
|
||||||
// Is the DLC we're looking for available?
|
|
||||||
if (!m_bDLCRequiredIsRetrieved) {
|
|
||||||
// DLCContentRetrieved is to see if the type of content has been
|
|
||||||
// retrieved - and on Durango there is only type 0 -
|
|
||||||
// XMARKETPLACE_OFFERING_TYPE_CONTENT
|
|
||||||
if (app.DLCContentRetrieved(e_Marketplace_Content)) {
|
|
||||||
m_bDLCRequiredIsRetrieved = true;
|
|
||||||
|
|
||||||
// Retrieve the info
|
|
||||||
GetDLCInfo(app.GetDLCOffersCount(), false);
|
|
||||||
m_bIgnorePress = false;
|
|
||||||
m_bAddAllDLCButtons = false;
|
|
||||||
|
|
||||||
// hide the timer
|
|
||||||
m_Timer.setVisible(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// have to wait until we have the offers
|
|
||||||
if (m_bSelectionChanged && m_bDLCRequiredIsRetrieved) {
|
|
||||||
// need to update text and icon
|
|
||||||
if (m_buttonListOffers.hasFocus() && (getControlChildFocus() > -1)) {
|
|
||||||
int iIndex = getControlChildFocus();
|
|
||||||
MARKETPLACE_CONTENTOFFER_INFO xOffer =
|
|
||||||
StorageManager.GetOffer(iIndex);
|
|
||||||
|
|
||||||
if (!ui.UsingBitmapFont()) // 4J-JEV: Replace characters we don't
|
|
||||||
// have.
|
|
||||||
{
|
|
||||||
for (int i = 0; xOffer.wszCurrencyPrice[i] != 0; i++) {
|
|
||||||
WCHAR* c = &xOffer.wszCurrencyPrice[i];
|
|
||||||
if (*c == L'\u20A9')
|
|
||||||
*c = L'\uFFE6'; // Korean Won.
|
|
||||||
else if (*c == L'\u00A5')
|
|
||||||
*c = L'\uFFE5'; // Japanese Yen.
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (UpdateDisplay(xOffer)) {
|
|
||||||
// image was available
|
|
||||||
m_bSelectionChanged = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// if(m_bBitmapOfferIconDisplayed==false)
|
|
||||||
// {
|
|
||||||
// // do we have it yet?
|
|
||||||
// if
|
|
||||||
// }
|
|
||||||
// retrieve the icons for the DLC
|
|
||||||
// if(m_vIconRetrieval.size()>0)
|
|
||||||
// {
|
|
||||||
// // for each icon, request it, and remove it from the list
|
|
||||||
// // the callback for the retrieval will update the display if
|
|
||||||
// needed
|
|
||||||
//
|
|
||||||
// AUTO_VAR(itEnd, m_vIconRetrieval.end());
|
|
||||||
// for (AUTO_VAR(it, m_vIconRetrieval.begin()); it != itEnd; it++)
|
|
||||||
// {
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
void UIScene_DLCOffersMenu::GetDLCInfo(int iOfferC, bool bUpdateOnly) {
|
|
||||||
MARKETPLACE_CONTENTOFFER_INFO xOffer;
|
|
||||||
int iCount = 0;
|
|
||||||
bool bNoDLCToDisplay = true;
|
|
||||||
unsigned int uiDLCCount = 0;
|
|
||||||
|
|
||||||
if (bUpdateOnly) // Just update the info on the current list
|
|
||||||
{
|
|
||||||
} else {
|
|
||||||
// clear out the list
|
|
||||||
m_buttonListOffers.clearList();
|
|
||||||
|
|
||||||
// need to reorder the DLC display according to dlc uiSortIndex
|
|
||||||
SORTINDEXSTRUCT* OrderA = new SORTINDEXSTRUCT[iOfferC];
|
|
||||||
|
|
||||||
for (int i = 0; i < iOfferC; i++) {
|
|
||||||
xOffer = StorageManager.GetOffer(i);
|
|
||||||
// Check that this is in the list of known DLC
|
|
||||||
DLC_INFO* pDLC = app.GetDLCInfoForFullOfferID(xOffer.wszProductID);
|
|
||||||
|
|
||||||
if (pDLC != NULL) {
|
|
||||||
OrderA[uiDLCCount].uiContentIndex = i;
|
|
||||||
OrderA[uiDLCCount++].uiSortIndex = pDLC->uiSortIndex;
|
|
||||||
} else {
|
|
||||||
app.DebugPrintf("Unknown offer - %ls\n", xOffer.wszOfferName);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
qsort(OrderA, uiDLCCount, sizeof(SORTINDEXSTRUCT), OrderSortFunction);
|
|
||||||
|
|
||||||
for (int i = 0; i < uiDLCCount; i++) {
|
|
||||||
xOffer = StorageManager.GetOffer(OrderA[i].uiContentIndex);
|
|
||||||
|
|
||||||
// Check that this is in the list of known DLC
|
|
||||||
DLC_INFO* pDLC = app.GetDLCInfoForFullOfferID(xOffer.wszProductID);
|
|
||||||
|
|
||||||
if (pDLC == NULL) {
|
|
||||||
// skip this one
|
|
||||||
app.DebugPrintf("Unknown offer - %ls\n", xOffer.wszOfferName);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pDLC->eDLCType == (eDLCContentType)m_iProductInfoIndex) {
|
|
||||||
std::wstring wstrTemp = xOffer.wszOfferName;
|
|
||||||
|
|
||||||
// 4J-PB - Rog requested we remove the Minecraft at the start of
|
|
||||||
// the name. It's required for the Bing search, but gets in the
|
|
||||||
// way here
|
|
||||||
app.DebugPrintf("Adding %ls at %d\n", wstrTemp.c_str(), i);
|
|
||||||
|
|
||||||
if (wcsncmp(L"Minecraft ", wstrTemp.c_str(), 10) == 0) {
|
|
||||||
app.DebugPrintf("Removing Minecraft from name\n");
|
|
||||||
WCHAR* pwchNewName = (WCHAR*)wstrTemp.c_str();
|
|
||||||
wstrTemp = &pwchNewName[10];
|
|
||||||
}
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
// 4J-PB - the hasPurchased comes from the local installed
|
|
||||||
// package info find the DLC in the installed packages
|
|
||||||
XCONTENT_DATA* pContentData =
|
|
||||||
StorageManager.GetInstalledDLC(xOffer.wszProductID);
|
|
||||||
|
|
||||||
if (pContentData != NULL) {
|
|
||||||
m_buttonListOffers.addItem(wstrTemp,
|
|
||||||
!pContentData->bTrialLicense,
|
|
||||||
OrderA[i].uiContentIndex);
|
|
||||||
} else {
|
|
||||||
m_buttonListOffers.addItem(wstrTemp, false,
|
|
||||||
OrderA[i].uiContentIndex);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
m_buttonListOffers.addItem(wstrTemp, xOffer.fUserHasPurchased,
|
|
||||||
OrderA[i].uiContentIndex);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// add the required image to the retrieval queue
|
|
||||||
m_vIconRetrieval.push_back(pDLC->wchBanner);
|
|
||||||
|
|
||||||
/** 4J JEV:
|
|
||||||
* We've filtered results out from the list, need to keep track
|
|
||||||
* of the 'actual' list index.
|
|
||||||
*/
|
|
||||||
iCount++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check if there is nothing to display, and display the default
|
|
||||||
// "nothing available at this time"
|
|
||||||
if (iCount > 0) {
|
|
||||||
bNoDLCToDisplay = false;
|
|
||||||
xOffer = StorageManager.GetOffer(OrderA[0].uiContentIndex);
|
|
||||||
// m_buttonListOffers.setCurrentSelection(0);
|
|
||||||
|
|
||||||
UpdateDisplay(xOffer);
|
|
||||||
}
|
|
||||||
delete OrderA;
|
|
||||||
}
|
|
||||||
|
|
||||||
// turn off the timer display
|
|
||||||
// m_Timer.SetShow(FALSE);
|
|
||||||
if (bNoDLCToDisplay) {
|
|
||||||
// set the default text
|
|
||||||
|
|
||||||
wchar_t formatting[40];
|
|
||||||
std::wstring wstrTemp = app.GetString(IDS_NO_DLCOFFERS);
|
|
||||||
// swprintf(formatting, 40, L"<font size=\"%d\">",
|
|
||||||
// m_bIsSD?12:14); wstrTemp = formatting + wstrTemp;
|
|
||||||
|
|
||||||
m_labelHTMLSellText.setLabel(wstrTemp);
|
|
||||||
m_labelPriceTag.setVisible(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int UIScene_DLCOffersMenu::OrderSortFunction(const void* a, const void* b) {
|
|
||||||
return ((SORTINDEXSTRUCT*)b)->uiSortIndex -
|
|
||||||
((SORTINDEXSTRUCT*)a)->uiSortIndex;
|
|
||||||
}
|
|
||||||
|
|
||||||
void UIScene_DLCOffersMenu::UpdateTooltips(
|
|
||||||
MARKETPLACE_CONTENTOFFER_INFO& xOffer) {
|
|
||||||
m_bHasPurchased = xOffer.fUserHasPurchased;
|
|
||||||
m_bIsSelected = true;
|
|
||||||
updateTooltips();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool UIScene_DLCOffersMenu::UpdateDisplay(
|
|
||||||
MARKETPLACE_CONTENTOFFER_INFO& xOffer) {
|
|
||||||
bool bImageAvailable = false;
|
|
||||||
#if 0
|
|
||||||
DLC_INFO* dlc = app.GetDLCInfoForFullOfferID(xOffer.wszProductID);
|
|
||||||
#else
|
|
||||||
DLC_INFO* dlc = app.GetDLCInfoForFullOfferID(xOffer.wszOfferName);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (dlc != NULL) {
|
|
||||||
WCHAR* cString = dlc->wchBanner;
|
|
||||||
|
|
||||||
// is the file in the local DLC images?
|
|
||||||
// is the file in the TMS XZP?
|
|
||||||
// int iIndex = app.GetLocalTMSFileIndex(cString, true);
|
|
||||||
|
|
||||||
if (dlc->dwImageBytes != 0) {
|
|
||||||
// app.LoadLocalTMSFile(cString);
|
|
||||||
|
|
||||||
// set the image - no delete
|
|
||||||
registerSubstitutionTexture(cString, dlc->pbImageData,
|
|
||||||
dlc->dwImageBytes, false);
|
|
||||||
m_bitmapIconOfferImage.setTextureName(cString);
|
|
||||||
bImageAvailable = true;
|
|
||||||
} else {
|
|
||||||
bool bPresent = app.IsFileInMemoryTextures(cString);
|
|
||||||
if (!bPresent) {
|
|
||||||
// Image has not come in yet
|
|
||||||
// Set the item monitored in the timer, so we can set the image
|
|
||||||
// when it comes in
|
|
||||||
m_pNoImageFor_DLC = dlc;
|
|
||||||
|
|
||||||
app.AddTMSPPFileTypeRequest(dlc->eDLCType, true);
|
|
||||||
bImageAvailable = false;
|
|
||||||
// m_bitmapIconOfferImage.setTextureName(L"");
|
|
||||||
} else {
|
|
||||||
if (hasRegisteredSubstitutionTexture(cString) == false) {
|
|
||||||
BYTE* pData = NULL;
|
|
||||||
DWORD dwSize = 0;
|
|
||||||
app.GetMemFileDetails(cString, &pData, &dwSize);
|
|
||||||
// set the image
|
|
||||||
#if 0
|
|
||||||
registerSubstitutionTexture(cString, pData, dwSize);
|
|
||||||
#else
|
|
||||||
registerSubstitutionTexture(cString, pData, dwSize, true);
|
|
||||||
#endif
|
|
||||||
m_bitmapIconOfferImage.setTextureName(cString);
|
|
||||||
} else {
|
|
||||||
m_bitmapIconOfferImage.setTextureName(cString);
|
|
||||||
}
|
|
||||||
bImageAvailable = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
m_labelHTMLSellText.setLabel(xOffer.wszSellText);
|
|
||||||
|
|
||||||
// set the price info
|
|
||||||
m_labelPriceTag.setVisible(true);
|
|
||||||
m_labelPriceTag.setLabel(xOffer.wszCurrencyPrice);
|
|
||||||
|
|
||||||
UpdateTooltips(xOffer);
|
|
||||||
} else {
|
|
||||||
wchar_t formatting[40];
|
|
||||||
std::wstring wstrTemp = app.GetString(IDS_NO_DLCOFFERS);
|
|
||||||
m_labelHTMLSellText.setLabel(wstrTemp.c_str());
|
|
||||||
m_labelPriceTag.setVisible(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
return bImageAvailable;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
void UIScene_DLCOffersMenu::HandleDLCLicenseChange() {
|
|
||||||
// flag an update of the display
|
|
||||||
int iOfferC = app.GetDLCOffersCount();
|
|
||||||
|
|
||||||
GetDLCInfo(iOfferC, false);
|
|
||||||
}
|
|
||||||
#endif // 0
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
void UIScene_DLCOffersMenu::HandleDLCInstalled() {
|
|
||||||
app.DebugPrintf(4, "UIScene_DLCOffersMenu::HandleDLCInstalled\n");
|
|
||||||
|
|
||||||
// m_buttonListOffers.clearList();
|
|
||||||
// m_bAddAllDLCButtons=true;
|
|
||||||
// m_bProductInfoShown=false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// void UIScene_DLCOffersMenu::HandleDLCMountingComplete()
|
|
||||||
// {
|
|
||||||
// app.DebugPrintf(4,"UIScene_SkinSelectMenu::HandleDLCMountingComplete\n");
|
|
||||||
//}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
||||||
|
|
@ -52,42 +52,13 @@ public:
|
||||||
virtual void handleSelectionChanged(F64 selectedId);
|
virtual void handleSelectionChanged(F64 selectedId);
|
||||||
virtual void handleFocusChange(F64 controlId, F64 childId);
|
virtual void handleFocusChange(F64 controlId, F64 childId);
|
||||||
virtual void handleTimerComplete(int id);
|
virtual void handleTimerComplete(int id);
|
||||||
#if 0
|
|
||||||
virtual void HandleDLCInstalled();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
virtual void HandleDLCLicenseChange();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
#if 0
|
|
||||||
void GetDLCInfo(int iOfferC, bool bUpdateOnly = false);
|
|
||||||
void UpdateTooltips(MARKETPLACE_CONTENTOFFER_INFO& xOffer);
|
|
||||||
bool UpdateDisplay(MARKETPLACE_CONTENTOFFER_INFO& xOffer);
|
|
||||||
|
|
||||||
static int OrderSortFunction(const void* a, const void* b);
|
|
||||||
|
|
||||||
bool m_bIgnorePress;
|
|
||||||
bool m_bDLCRequiredIsRetrieved;
|
|
||||||
DLC_INFO* m_pNoImageFor_DLC;
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
unsigned int uiContentIndex;
|
|
||||||
unsigned int uiSortIndex;
|
|
||||||
} SORTINDEXSTRUCT;
|
|
||||||
|
|
||||||
std::vector<std::wstring> m_vIconRetrieval;
|
|
||||||
bool m_bSelectionChanged;
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
bool m_bProductInfoShown;
|
bool m_bProductInfoShown;
|
||||||
int m_iProductInfoIndex;
|
int m_iProductInfoIndex;
|
||||||
int m_iCurrentDLC;
|
int m_iCurrentDLC;
|
||||||
int m_iTotalDLC;
|
int m_iTotalDLC;
|
||||||
bool m_bAddAllDLCButtons;
|
bool m_bAddAllDLCButtons;
|
||||||
#if 0 || 0 || 0
|
|
||||||
std::vector<SonyCommerce::ProductInfo>* m_pvProductInfo;
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
@ -63,9 +63,6 @@ void UIScene_DeathMenu::handleInput(int iPad, int key, bool repeat,
|
||||||
handled = true;
|
handled = true;
|
||||||
break;
|
break;
|
||||||
case ACTION_MENU_OK:
|
case ACTION_MENU_OK:
|
||||||
#if 0
|
|
||||||
case ACTION_MENU_TOUCHPAD_PRESS:
|
|
||||||
#endif
|
|
||||||
case ACTION_MENU_UP:
|
case ACTION_MENU_UP:
|
||||||
case ACTION_MENU_DOWN:
|
case ACTION_MENU_DOWN:
|
||||||
sendInputToMovie(key, repeat, pressed, released);
|
sendInputToMovie(key, repeat, pressed, released);
|
||||||
|
|
@ -79,9 +76,6 @@ void UIScene_DeathMenu::handlePress(F64 controlId, F64 childId) {
|
||||||
case eControl_Respawn:
|
case eControl_Respawn:
|
||||||
m_bIgnoreInput = true;
|
m_bIgnoreInput = true;
|
||||||
app.SetAction(m_iPad, eAppAction_Respawn);
|
app.SetAction(m_iPad, eAppAction_Respawn);
|
||||||
#if 0
|
|
||||||
// InputManager.SetEnabledGtcButtons(_360_GTC_MENU|_360_GTC_PAUSE|_360_GTC_VIEW);
|
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
case eControl_ExitGame: {
|
case eControl_ExitGame: {
|
||||||
Minecraft* pMinecraft = Minecraft::GetInstance();
|
Minecraft* pMinecraft = Minecraft::GetInstance();
|
||||||
|
|
@ -101,28 +95,6 @@ void UIScene_DeathMenu::handlePress(F64 controlId, F64 childId) {
|
||||||
TelemetryManager->RecordLevelExit(
|
TelemetryManager->RecordLevelExit(
|
||||||
m_iPad, eSen_LevelExitStatus_Failed);
|
m_iPad, eSen_LevelExitStatus_Failed);
|
||||||
|
|
||||||
#if 0 || 0
|
|
||||||
if (g_NetworkManager.IsHost() &&
|
|
||||||
StorageManager.GetSaveDisabled()) {
|
|
||||||
uiIDA[0] = IDS_CONFIRM_CANCEL;
|
|
||||||
uiIDA[1] = IDS_EXIT_GAME_SAVE;
|
|
||||||
uiIDA[2] = IDS_EXIT_GAME_NO_SAVE;
|
|
||||||
|
|
||||||
ui.RequestAlertMessage(
|
|
||||||
IDS_EXIT_GAME, IDS_CONFIRM_EXIT_GAME, uiIDA, 3,
|
|
||||||
m_iPad,
|
|
||||||
&IUIScene_PauseMenu::ExitGameSaveDialogReturned,
|
|
||||||
(LPVOID)GetCallbackUniqueId());
|
|
||||||
} else {
|
|
||||||
uiIDA[0] = IDS_CONFIRM_CANCEL;
|
|
||||||
uiIDA[1] = IDS_CONFIRM_OK;
|
|
||||||
ui.RequestAlertMessage(
|
|
||||||
IDS_EXIT_GAME, IDS_CONFIRM_EXIT_GAME, uiIDA, 2,
|
|
||||||
m_iPad, &IUIScene_PauseMenu::ExitGameDialogReturned,
|
|
||||||
(LPVOID)GetCallbackUniqueId());
|
|
||||||
}
|
|
||||||
|
|
||||||
#else
|
|
||||||
if (StorageManager.GetSaveDisabled()) {
|
if (StorageManager.GetSaveDisabled()) {
|
||||||
uiIDA[0] = IDS_CONFIRM_CANCEL;
|
uiIDA[0] = IDS_CONFIRM_CANCEL;
|
||||||
uiIDA[1] = IDS_CONFIRM_OK;
|
uiIDA[1] = IDS_CONFIRM_OK;
|
||||||
|
|
@ -153,7 +125,6 @@ void UIScene_DeathMenu::handlePress(F64 controlId, F64 childId) {
|
||||||
(LPVOID)GetCallbackUniqueId());
|
(LPVOID)GetCallbackUniqueId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
TelemetryManager->RecordLevelExit(
|
TelemetryManager->RecordLevelExit(
|
||||||
m_iPad, eSen_LevelExitStatus_Failed);
|
m_iPad, eSen_LevelExitStatus_Failed);
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,4 @@ public:
|
||||||
protected:
|
protected:
|
||||||
void handlePress(F64 controlId, F64 childId);
|
void handlePress(F64 controlId, F64 childId);
|
||||||
|
|
||||||
#if 0
|
|
||||||
virtual long long getDefaultGtcButtons() { return 0; }
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -13,33 +13,7 @@ UIScene_EULA::UIScene_EULA(int iPad, void* initData, UILayer* parentLayer)
|
||||||
|
|
||||||
m_buttonConfirm.init(app.GetString(IDS_TOOLTIPS_ACCEPT), eControl_Confirm);
|
m_buttonConfirm.init(app.GetString(IDS_TOOLTIPS_ACCEPT), eControl_Confirm);
|
||||||
|
|
||||||
#if 0 || 0 || 0
|
|
||||||
std::wstring EULA = app.GetString(IDS_EULA);
|
|
||||||
EULA.append(L"\r\n");
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
if (app.IsEuropeanSKU()) {
|
|
||||||
EULA.append(app.GetString(IDS_EULA_SCEE));
|
|
||||||
// if it's the BD build
|
|
||||||
if (StorageManager.GetBootTypeDisc()) {
|
|
||||||
EULA.append(app.GetString(IDS_EULA_SCEE_BD));
|
|
||||||
}
|
|
||||||
} else if (app.IsAmericanSKU()) {
|
|
||||||
EULA.append(app.GetString(IDS_EULA_SCEA));
|
|
||||||
}
|
|
||||||
#elif 0
|
|
||||||
if (app.IsEuropeanSKU()) {
|
|
||||||
EULA.append(app.GetString(IDS_EULA_SCEE));
|
|
||||||
// 4J-PB - we can't tell if it's a disc or digital version, so let's
|
|
||||||
// show this anyway
|
|
||||||
EULA.append(app.GetString(IDS_EULA_SCEE_BD));
|
|
||||||
} else if (app.IsAmericanSKU()) {
|
|
||||||
EULA.append(app.GetString(IDS_EULA_SCEA));
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
std::wstring EULA = L"";
|
std::wstring EULA = L"";
|
||||||
#endif
|
|
||||||
|
|
||||||
std::vector<std::wstring> paragraphs;
|
std::vector<std::wstring> paragraphs;
|
||||||
int lastIndex = 0;
|
int lastIndex = 0;
|
||||||
|
|
@ -69,9 +43,6 @@ UIScene_EULA::UIScene_EULA(int iPad, void* initData, UILayer* parentLayer)
|
||||||
|
|
||||||
// ui.setFontCachingCalculationBuffer(20000);
|
// ui.setFontCachingCalculationBuffer(20000);
|
||||||
|
|
||||||
#if 0
|
|
||||||
ui.TouchBoxRebuild(this);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
UIScene_EULA::~UIScene_EULA() {
|
UIScene_EULA::~UIScene_EULA() {
|
||||||
|
|
@ -89,18 +60,10 @@ void UIScene_EULA::handleInput(int iPad, int key, bool repeat, bool pressed,
|
||||||
bool released, bool& handled) {
|
bool released, bool& handled) {
|
||||||
if (m_bIgnoreInput) return;
|
if (m_bIgnoreInput) return;
|
||||||
|
|
||||||
#if 0
|
|
||||||
// ignore all players except player 0 - it's their profile that is currently
|
|
||||||
// being used
|
|
||||||
if (iPad != 0) return;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ui.AnimateKeyPress(m_iPad, key, repeat, pressed, released);
|
ui.AnimateKeyPress(m_iPad, key, repeat, pressed, released);
|
||||||
|
|
||||||
switch (key) {
|
switch (key) {
|
||||||
#if 0
|
|
||||||
case ACTION_MENU_TOUCHPAD_PRESS:
|
|
||||||
#endif
|
|
||||||
case ACTION_MENU_OK:
|
case ACTION_MENU_OK:
|
||||||
case ACTION_MENU_DOWN:
|
case ACTION_MENU_DOWN:
|
||||||
case ACTION_MENU_UP:
|
case ACTION_MENU_UP:
|
||||||
|
|
|
||||||
|
|
@ -24,9 +24,7 @@ public:
|
||||||
virtual EUIScene getSceneType() { return eUIScene_EULA; }
|
virtual EUIScene getSceneType() { return eUIScene_EULA; }
|
||||||
|
|
||||||
// Returns true if this scene has focus for the pad passed in
|
// Returns true if this scene has focus for the pad passed in
|
||||||
#if 1
|
|
||||||
virtual bool hasFocus(int iPad) { return bHasFocus; }
|
virtual bool hasFocus(int iPad) { return bHasFocus; }
|
||||||
#endif
|
|
||||||
virtual void updateTooltips();
|
virtual void updateTooltips();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
||||||
|
|
@ -17,20 +17,6 @@ UIScene_EndPoem::UIScene_EndPoem(int iPad, void* initData, UILayer* parentLayer)
|
||||||
|
|
||||||
// 4J Stu - Don't need these, the AS handles the scrolling and makes it look
|
// 4J Stu - Don't need these, the AS handles the scrolling and makes it look
|
||||||
// nice
|
// nice
|
||||||
#if 0
|
|
||||||
std::wstring halfScreenLineBreaks;
|
|
||||||
|
|
||||||
if(RenderManager.IsHiDef())
|
|
||||||
{
|
|
||||||
// HD - 17 line page
|
|
||||||
halfScreenLineBreaks = L"<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// 480 - 14 line page
|
|
||||||
halfScreenLineBreaks = L"<br /><br /><br /><br /><br /><br /><br /><br />";
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// wchar_t startTags[64];
|
// wchar_t startTags[64];
|
||||||
// swprintf(startTags,64,L"<font
|
// swprintf(startTags,64,L"<font
|
||||||
|
|
|
||||||
|
|
@ -70,13 +70,7 @@ UIScene_FullscreenProgress::UIScene_FullscreenProgress(int iPad, void* initData,
|
||||||
thread->Run();
|
thread->Run();
|
||||||
threadStarted = true;
|
threadStarted = true;
|
||||||
|
|
||||||
#if 0
|
|
||||||
ui.TouchBoxRebuild(this);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
ui.ShowPlayerDisplayname(false);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
UIScene_FullscreenProgress::~UIScene_FullscreenProgress() {
|
UIScene_FullscreenProgress::~UIScene_FullscreenProgress() {
|
||||||
|
|
@ -198,9 +192,6 @@ void UIScene_FullscreenProgress::tick() {
|
||||||
m_buttonConfirm.setVisible(true);
|
m_buttonConfirm.setVisible(true);
|
||||||
// 4J-TomK - rebuild touch after confirm button made visible
|
// 4J-TomK - rebuild touch after confirm button made visible
|
||||||
// again
|
// again
|
||||||
#if 0
|
|
||||||
ui.TouchBoxRebuild(this);
|
|
||||||
#endif
|
|
||||||
updateTooltips();
|
updateTooltips();
|
||||||
} else {
|
} else {
|
||||||
if (m_bWasCancelled) {
|
if (m_bWasCancelled) {
|
||||||
|
|
@ -287,9 +278,6 @@ void UIScene_FullscreenProgress::handleInput(int iPad, int key, bool repeat,
|
||||||
|
|
||||||
switch (key) {
|
switch (key) {
|
||||||
case ACTION_MENU_OK:
|
case ACTION_MENU_OK:
|
||||||
#if 0
|
|
||||||
case ACTION_MENU_TOUCHPAD_PRESS:
|
|
||||||
#endif
|
|
||||||
if (pressed) {
|
if (pressed) {
|
||||||
sendInputToMovie(key, repeat, pressed, released);
|
sendInputToMovie(key, repeat, pressed, released);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue