chore: cleanup names
This commit is contained in:
1 parent
7b4821d329
commit
afbd3fef00
36 files changed
+202
-251
No files matched your search
@@ -170,7 +170,7 @@ void IUIScene_HUD::updateFrameTick()
|
||||
}
|
||||
SetOpacity(fVal);
|
||||
|
||||
bool bDisplayGui=app.GetGameStarted() && !ui.GetMenuDisplayed(iPad) && !(app.GetXuiAction(iPad)==eAppAction_AutosaveSaveGameCapturedThumbnail) && app.GetGameSettings(iPad,eGameSetting_DisplayHUD)!=0;
|
||||
bool bDisplayGui=app.GetGameStarted() && !ui.GetMenuDisplayed(iPad) && !(app.GetUIAction(iPad)==eAppAction_AutosaveSaveGameCapturedThumbnail) && app.GetGameSettings(iPad,eGameSetting_DisplayHUD)!=0;
|
||||
if(bDisplayGui && pMinecraft->localplayers[iPad] != NULL)
|
||||
{
|
||||
SetVisible(true);
|
||||
|
||||
@@ -354,11 +354,11 @@ int IUIScene_PauseMenu::SaveWorldThreadProc( LPVOID lpParameter )
|
||||
bool bAutosave=(bool)lpParameter;
|
||||
if(bAutosave)
|
||||
{
|
||||
app.SetXuiServerAction(ProfileManager.GetPrimaryPad(),eXuiServerAction_AutoSaveGame);
|
||||
app.SetUIServerAction(ProfileManager.GetPrimaryPad(),eUIServerAction_AutoSaveGame);
|
||||
}
|
||||
else
|
||||
{
|
||||
app.SetXuiServerAction(ProfileManager.GetPrimaryPad(),eXuiServerAction_SaveGame);
|
||||
app.SetUIServerAction(ProfileManager.GetPrimaryPad(),eUIServerAction_SaveGame);
|
||||
}
|
||||
|
||||
// Share AABB & Vec3 pools with default (main thread) - should be ok as long as we don't tick the main thread whilst this thread is running
|
||||
@@ -374,7 +374,7 @@ int IUIScene_PauseMenu::SaveWorldThreadProc( LPVOID lpParameter )
|
||||
{
|
||||
app.SetGameStarted(false);
|
||||
|
||||
while( app.GetXuiServerAction(ProfileManager.GetPrimaryPad() ) != eXuiServerAction_Idle && !MinecraftServer::serverHalted() )
|
||||
while( app.GetUIServerAction(ProfileManager.GetPrimaryPad() ) != eUIServerAction_Idle && !MinecraftServer::serverHalted() )
|
||||
{
|
||||
Sleep(10);
|
||||
}
|
||||
|
||||
@@ -184,17 +184,6 @@ UIController::UIController()
|
||||
InitializeCriticalSection(&m_Allocatorlock);
|
||||
#endif
|
||||
|
||||
// 4J Stu - This is a bit of a hack until we change the Minecraft initialisation to store the proper screen size for other platforms
|
||||
#if defined _DURANGO || defined __ORBIS__
|
||||
m_fScreenWidth = 1920.0f;
|
||||
m_fScreenHeight = 1080.0f;
|
||||
m_bScreenWidthSetup = true;
|
||||
#else
|
||||
m_fScreenWidth = 1280.0f;
|
||||
m_fScreenHeight = 720.0f;
|
||||
m_bScreenWidthSetup = false;
|
||||
#endif
|
||||
|
||||
for(unsigned int i = 0; i < eLibrary_Count; ++i)
|
||||
{
|
||||
m_iggyLibraries[i] = IGGY_INVALID_LIBRARY;
|
||||
@@ -257,6 +246,7 @@ void UIController::SetSystemUIShowing(LPVOID lpParam,bool bVal)
|
||||
// SETUP
|
||||
void UIController::preInit(S32 width, S32 height)
|
||||
{
|
||||
//str1k3r - 4J previously hardcoded this in UIController(), this is already set per platform so just use this :3
|
||||
m_fScreenWidth = width;
|
||||
m_fScreenHeight = height;
|
||||
m_bScreenWidthSetup = true;
|
||||
@@ -500,14 +490,14 @@ void UIController::tick()
|
||||
}
|
||||
|
||||
#ifdef _WINDOWS64
|
||||
GetControllerType();
|
||||
GetControllerSwf();
|
||||
#endif
|
||||
}
|
||||
|
||||
//str1k3r - PS3 & PS4 icons are broken in some spots, therefore they wont be included yet
|
||||
#ifdef _WINDOWS64
|
||||
//str1k3r - this is what actually does all the autoswitching
|
||||
void UIController::GetControllerType()
|
||||
void UIController::GetControllerSwf()
|
||||
{
|
||||
EControllerType ControllerType = InputManager.GetControllerType(0);
|
||||
wstring controlTooltipsPath = L"";
|
||||
@@ -521,7 +511,6 @@ void UIController::GetControllerType()
|
||||
case EControllerType_Xbox360:
|
||||
controlTooltipsPath = (ui.getScreenWidth() >= 1920) ? L"ControlTooltips\\HD\\XboxHDControls.swf" : L"ControlTooltips\\XboxControls.swf";
|
||||
break;
|
||||
case EControllerType_Default:
|
||||
case EControllerType_XboxOne:
|
||||
controlTooltipsPath = (ui.getScreenWidth() >= 1920) ? L"ControlTooltips\\HD\\DurangoHDControls.swf" : L"ControlTooltips\\DurangoControls.swf";
|
||||
break;
|
||||
@@ -539,6 +528,9 @@ void UIController::GetControllerType()
|
||||
controlTooltipsPath = (ui.getScreenWidth() >= 1920) ? L"ControlTooltips\\HD\\SwitchHDControls.swf" : L"ControlTooltips\\SwitchControls.swf";
|
||||
break;
|
||||
*/
|
||||
case EControllerType_Default: //str1k3r - this is going to get a custom swf soon
|
||||
controlTooltipsPath = (ui.getScreenWidth() >= 1920) ? L"ControlTooltips\\HD\\DurangoHDControls.swf" : L"ControlTooltips\\DurangoControls.swf";
|
||||
break;
|
||||
default:
|
||||
controlTooltipsPath = (ui.getScreenWidth() >= 1920) ? L"ControlTooltips\\HD\\Windows64HDControls.swf" : L"ControlTooltips\\Windows64Controls.swf";
|
||||
break;
|
||||
@@ -569,7 +561,6 @@ wstring UIController::GetTooltipSkinPath()
|
||||
{
|
||||
case EControllerType_Xbox360:
|
||||
return ui.getScreenWidth() >= 1920 ? L"ControlTooltips\\HD\\XboxHDControls.swf" : L"ControlTooltips\\XboxControls.swf";
|
||||
case EControllerType_Default:
|
||||
case EControllerType_XboxOne:
|
||||
return ui.getScreenWidth() >= 1920 ? L"ControlTooltips\\HD\\DurangoHDControls.swf" : L"ControlTooltips\\DurangoControls.swf";
|
||||
/*
|
||||
@@ -582,6 +573,8 @@ wstring UIController::GetTooltipSkinPath()
|
||||
case EControllerType_Switch:
|
||||
return ui.getScreenWidth() >= 1920 ? L"ControlTooltips\\HD\\SwitchHDControls.swf" : L"ControlTooltips\\SwitchControls.swf";
|
||||
*/
|
||||
case EControllerType_Default:
|
||||
return ui.getScreenWidth() >= 1920 ? L"ControlTooltips\\HD\\DurangoHDControls.swf" : L"ControlTooltips\\DurangoControls.swf";
|
||||
default:
|
||||
return ui.getScreenWidth() >= 1920 ? L"ControlTooltips\\HD\\Windows64HDControls.swf" : L"ControlTooltips\\Windows64Controls.swf";
|
||||
break;
|
||||
@@ -601,12 +594,12 @@ void UIController::loadSkins()
|
||||
#elif defined __PSVITA__
|
||||
platformSkinPath = L"skinVita.swf";
|
||||
#elif defined _WINDOWS64
|
||||
if(m_fScreenWidth >= 1920.0f)
|
||||
if(ui.getScreenWidth() >= 1920.0f)
|
||||
{
|
||||
tooltipsSkinPath = GetTooltipSkinPath();
|
||||
platformSkinPath = L"skinHDWin.swf";
|
||||
}
|
||||
else if (m_fScreenWidth >= 960.0f && m_fScreenWidth < 1280.0f) //str1k3r - we need to check this to make sure we dont load the vita skin on 720p
|
||||
else if (ui.getScreenWidth() >= 960.0f && ui.getScreenWidth() < 1280.0f) //str1k3r - we need to check this to make sure we dont load the vita skin on 720p
|
||||
{
|
||||
tooltipsSkinPath = GetTooltipSkinPath();
|
||||
platformSkinPath = L"skinWinVita.swf";
|
||||
@@ -639,7 +632,7 @@ void UIController::loadSkins()
|
||||
|
||||
// str1k3r - Fixes 720p/480p Crashes on Windows64, also allows this to be used on 1080p consoles instead of just Windows64
|
||||
// This also cleans up some 4J code and turns 3 if statements into 1.
|
||||
if (m_fScreenWidth >= 1920.0f)
|
||||
if (ui.getScreenWidth() >= 1920.0f)
|
||||
{
|
||||
m_iggyLibraries[eLibrary_Platform] = loadSkin(platformSkinPath, L"platformskinHD.swf");
|
||||
m_iggyLibraries[eLibrary_GraphicsDefault] = loadSkin(L"skinHDGraphics.swf", L"skinHDGraphics.swf");
|
||||
|
||||
@@ -204,7 +204,7 @@ public:
|
||||
virtual void tick();
|
||||
|
||||
private:
|
||||
void GetControllerType();
|
||||
void GetControllerSwf();
|
||||
wstring GetTooltipSkinPath();
|
||||
void loadSkins();
|
||||
IggyLibrary loadSkin(const wstring &skinPath, const wstring &skinName);
|
||||
@@ -236,6 +236,8 @@ public:
|
||||
// RENDERING
|
||||
float getScreenWidth() { return m_fScreenWidth; }
|
||||
float getScreenHeight() { return m_fScreenHeight; }
|
||||
void setScreenWidth(float w) { m_fScreenWidth = w; }
|
||||
void setScreenHeight(float h) { m_fScreenHeight = h; }
|
||||
|
||||
virtual void render() = 0;
|
||||
void getRenderDimensions(C4JRender::eViewportType viewport, S32 &width, S32 &height);
|
||||
|
||||
@@ -100,7 +100,7 @@ void UIScene_DebugCreateSchematic::handlePress(F64 controlId, F64 childId)
|
||||
else if(m_data->endZ < 0 && m_data->endZ%2 ==0)
|
||||
m_data->endZ+=1;
|
||||
|
||||
app.SetXuiServerAction(ProfileManager.GetPrimaryPad(), eXuiServerAction_ExportSchematic, (void *)m_data);
|
||||
app.SetUIServerAction(ProfileManager.GetPrimaryPad(), eUIServerAction_ExportSchematic, (void *)m_data);
|
||||
|
||||
navigateBack();
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ void UIScene_DebugOverlay::handlePress(F64 controlId, F64 childId)
|
||||
{
|
||||
app.DebugPrintf("UIScene_DebugOverlay::handlePress for itemsList: %f\n", childId);
|
||||
int id = childId;
|
||||
//app.SetXuiServerAction(m_iPad, eXuiServerAction_DropItem, (void *)m_itemIds[id]);
|
||||
//app.SetUIServerAction(m_iPad, eUIServerAction_DropItem, (void *)m_itemIds[id]);
|
||||
ClientConnection *conn = Minecraft::GetInstance()->getConnection(ProfileManager.GetPrimaryPad());
|
||||
conn->send( GiveItemCommand::preparePacket(dynamic_pointer_cast<Player>(Minecraft::GetInstance()->localplayers[ProfileManager.GetPrimaryPad()]), m_itemIds[id]) );
|
||||
}
|
||||
@@ -177,7 +177,7 @@ void UIScene_DebugOverlay::handlePress(F64 controlId, F64 childId)
|
||||
int id = childId;
|
||||
if(id<m_mobFactories.size())
|
||||
{
|
||||
app.SetXuiServerAction(ProfileManager.GetPrimaryPad(),eXuiServerAction_SpawnMob,(void *)m_mobFactories[id]);
|
||||
app.SetUIServerAction(ProfileManager.GetPrimaryPad(),eUIServerAction_SpawnMob,(void *)m_mobFactories[id]);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -204,13 +204,13 @@ void UIScene_DebugOverlay::handlePress(F64 controlId, F64 childId)
|
||||
break;
|
||||
case eControl_Rain:
|
||||
{
|
||||
//app.SetXuiServerAction(ProfileManager.GetPrimaryPad(),eXuiServerAction_ToggleRain);
|
||||
//app.SetUIServerAction(ProfileManager.GetPrimaryPad(),eUIServerAction_ToggleRain);
|
||||
ClientConnection *conn = Minecraft::GetInstance()->getConnection(ProfileManager.GetPrimaryPad());
|
||||
conn->send( ToggleDownfallCommand::preparePacket() );
|
||||
}
|
||||
break;
|
||||
case eControl_Thunder:
|
||||
app.SetXuiServerAction(ProfileManager.GetPrimaryPad(),eXuiServerAction_ToggleThunder);
|
||||
app.SetUIServerAction(ProfileManager.GetPrimaryPad(),eUIServerAction_ToggleThunder);
|
||||
break;
|
||||
case eControl_ResetTutorial:
|
||||
Tutorial::debugResetPlayerSavedProgress( ProfileManager.GetPrimaryPad() );
|
||||
|
||||
@@ -91,8 +91,8 @@ void UIScene_DebugSetCamera::handlePress(F64 controlId, F64 childId)
|
||||
switch((int)controlId)
|
||||
{
|
||||
case eControl_Teleport:
|
||||
app.SetXuiServerAction( ProfileManager.GetPrimaryPad(),
|
||||
eXuiServerAction_SetCameraLocation,
|
||||
app.SetUIServerAction( ProfileManager.GetPrimaryPad(),
|
||||
eUIServerAction_SetCameraLocation,
|
||||
(void *)currentPosition);
|
||||
break;
|
||||
case eControl_CamX:
|
||||
|
||||
@@ -161,7 +161,7 @@ UIScene_LoadOrJoinMenu::UIScene_LoadOrJoinMenu(int iPad, void *initData, UILayer
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__) || defined(_DURANGO)
|
||||
#if (defined __PS3__ || __ORBIS__ || __PSVITA__ || _DURANGO || _WINDOWS64)
|
||||
// Always clear the saves when we enter this menu
|
||||
StorageManager.ClearSavesInfo();
|
||||
#endif
|
||||
|
||||
@@ -94,7 +94,7 @@ UIScene_PauseMenu::UIScene_PauseMenu(int iPad, void *initData, UILayer *parentLa
|
||||
|
||||
if( g_NetworkManager.IsLocalGame() && g_NetworkManager.GetPlayerCount() == 1 )
|
||||
{
|
||||
app.SetXuiServerAction(ProfileManager.GetPrimaryPad(),eXuiServerAction_PauseServer,(void *)TRUE);
|
||||
app.SetUIServerAction(ProfileManager.GetPrimaryPad(),eUIServerAction_PauseServer,(void *)TRUE);
|
||||
}
|
||||
|
||||
TelemetryManager->RecordMenuShown(m_iPad, eUIScene_PauseMenu, 0);
|
||||
@@ -367,7 +367,7 @@ void UIScene_PauseMenu::handleInput(int iPad, int key, bool repeat, bool pressed
|
||||
|
||||
if( iPad == ProfileManager.GetPrimaryPad() && g_NetworkManager.IsLocalGame() )
|
||||
{
|
||||
app.SetXuiServerAction(ProfileManager.GetPrimaryPad(),eXuiServerAction_PauseServer,(void *)FALSE);
|
||||
app.SetUIServerAction(ProfileManager.GetPrimaryPad(),eUIServerAction_PauseServer,(void *)FALSE);
|
||||
}
|
||||
|
||||
ui.PlayUISFX(eSFX_Back);
|
||||
@@ -473,7 +473,7 @@ void UIScene_PauseMenu::handleInput(int iPad, int key, bool repeat, bool pressed
|
||||
bool bCanScreenshot = true;
|
||||
for(int j=0; j < XUSER_MAX_COUNT;++j)
|
||||
{
|
||||
if(app.GetXuiAction(j) == eAppAction_SocialPostScreenshot)
|
||||
if(app.GetUIAction(j) == eAppAction_SocialPostScreenshot)
|
||||
{
|
||||
bCanScreenshot = false;
|
||||
break;
|
||||
@@ -511,7 +511,7 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId)
|
||||
case BUTTON_PAUSE_RESUMEGAME:
|
||||
if( m_iPad == ProfileManager.GetPrimaryPad() && g_NetworkManager.IsLocalGame() )
|
||||
{
|
||||
app.SetXuiServerAction(ProfileManager.GetPrimaryPad(),eXuiServerAction_PauseServer,(void *)FALSE);
|
||||
app.SetUIServerAction(ProfileManager.GetPrimaryPad(),eUIServerAction_PauseServer,(void *)FALSE);
|
||||
}
|
||||
navigateBack();
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user