mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-04-24 13:23:37 +00:00
Fix Linux build warnings
This commit is contained in:
parent
44ade1f2b2
commit
0249bfd2bf
|
|
@ -1845,6 +1845,8 @@ void Minecraft::run_middle()
|
|||
// capture the save thumbnail
|
||||
app.CaptureSaveThumbnail();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -4907,4 +4909,3 @@ int Minecraft::MustSignInReturnedPSN(void *pParam, int iPad, C4JStorage::EMessag
|
|||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -1202,6 +1202,8 @@ void MinecraftServer::run(__int64 seed, void *lpParameter)
|
|||
|
||||
switch(eAction)
|
||||
{
|
||||
case eXuiServerAction_Idle:
|
||||
break;
|
||||
case eXuiServerAction_AutoSaveGame:
|
||||
#if defined(_XBOX_ONE) || defined(__ORBIS__)
|
||||
{
|
||||
|
|
@ -1380,6 +1382,8 @@ void MinecraftServer::run(__int64 seed, void *lpParameter)
|
|||
}
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
app.SetXuiServerAction(i,eXuiServerAction_Idle);
|
||||
|
|
|
|||
|
|
@ -3083,6 +3083,8 @@ void ClientConnection::displayPrivilegeChanges(std::shared_ptr<MultiplayerLocalP
|
|||
if(privOn) message = app.GetString(IDS_PRIV_ATTACK_PLAYER_TOGGLE_ON);
|
||||
else message = app.GetString(IDS_PRIV_ATTACK_PLAYER_TOGGLE_OFF);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
}
|
||||
switch(priv)
|
||||
|
|
@ -3091,6 +3093,8 @@ void ClientConnection::displayPrivilegeChanges(std::shared_ptr<MultiplayerLocalP
|
|||
if(privOn) message = app.GetString(IDS_PRIV_MODERATOR_TOGGLE_ON);
|
||||
else message = app.GetString(IDS_PRIV_MODERATOR_TOGGLE_OFF);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
if(app.GetGameHostOption(eGameHostOption_CheatsEnabled) != 0)
|
||||
{
|
||||
|
|
@ -3128,6 +3132,8 @@ void ClientConnection::displayPrivilegeChanges(std::shared_ptr<MultiplayerLocalP
|
|||
if(privOn) message = app.GetString(IDS_PRIV_CAN_TELEPORT_TOGGLE_ON);
|
||||
else message = app.GetString(IDS_PRIV_CAN_TELEPORT_TOGGLE_OFF);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
}
|
||||
if(!message.empty()) minecraft->gui->addMessage(message,userIndex);
|
||||
|
|
|
|||
|
|
@ -178,6 +178,8 @@ void DLCAudioFile::addParameter(EAudioType type, EAudioParameterType ptype, cons
|
|||
m_parameters[type].push_back(value);
|
||||
//m_parameters[(int)type] = value;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -237,6 +237,8 @@ DLCFile *DLCPack::addFile(DLCManager::EDLCType type, const std::wstring &path)
|
|||
case DLCManager::e_DLCType_GameRulesHeader:
|
||||
newFile = new DLCGameRulesHeader(path);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
|
||||
if( newFile != NULL )
|
||||
|
|
|
|||
|
|
@ -70,6 +70,8 @@ void DLCSkinFile::addParameter(DLCManager::EDLCParameterType type, const std::ws
|
|||
case XC_LANGUAGE_KOREAN:
|
||||
maximumChars = 35;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
std::wstring creditValue = value;
|
||||
while (creditValue.length() > maximumChars)
|
||||
|
|
@ -155,10 +157,14 @@ void DLCSkinFile::addParameter(DLCManager::EDLCParameterType type, const std::ws
|
|||
}
|
||||
break;
|
||||
case DLCManager::e_DLCParamType_Anim:
|
||||
// 4J Stu - The Xbox version used swscanf_s which isn't available in GCC.
|
||||
swscanf(value.c_str(), L"%X", &m_uiAnimOverrideBitmask);
|
||||
std::uint32_t skinId = app.getSkinIdFromPath(m_path);
|
||||
app.SetAnimOverrideBitmask(skinId, m_uiAnimOverrideBitmask);
|
||||
{
|
||||
// 4J Stu - The Xbox version used swscanf_s which isn't available in GCC.
|
||||
swscanf(value.c_str(), L"%X", &m_uiAnimOverrideBitmask);
|
||||
std::uint32_t skinId = app.getSkinIdFromPath(m_path);
|
||||
app.SetAnimOverrideBitmask(skinId, m_uiAnimOverrideBitmask);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,6 +32,8 @@ void DLCTextureFile::addParameter(DLCManager::EDLCParameterType type, const std:
|
|||
m_animString = value;
|
||||
m_bIsAnim = true;
|
||||
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -164,6 +164,8 @@ bool ConsoleGenerateStructure::postProcess(Level *level, Random *random, Boundin
|
|||
pPlaceSpawner->placeSpawnerInLevel(this,level,chunkBB);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -178,4 +180,4 @@ bool ConsoleGenerateStructure::checkIntersects(int x0, int y0, int z0, int x1, i
|
|||
int ConsoleGenerateStructure::getMinY()
|
||||
{
|
||||
return getBoundingBox()->y0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -128,6 +128,8 @@ void ChoiceTask::sendTelemetry()
|
|||
firstPlay = !tutorial->getCompleted( eTutorial_Telemetry_Halfway );
|
||||
tutorial->setCompleted( eTutorial_Telemetry_Halfway );
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
|
||||
TelemetryManager->RecordEnemyKilledOrOvercome(pMinecraft->player->GetXboxPad(), 0, 0, 0, 0, 0, 0, m_eTelemetryEvent);
|
||||
|
|
|
|||
|
|
@ -131,6 +131,8 @@ void InfoTask::sendTelemetry()
|
|||
firstPlay = !tutorial->getCompleted( eTutorial_Telemetry_Complete );
|
||||
tutorial->setCompleted( eTutorial_Telemetry_Complete );
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
TelemetryManager->RecordEnemyKilledOrOvercome(pMinecraft->player->GetXboxPad(), 0, 0, 0, 0, 0, 0, m_eTelemetryEvent);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -123,6 +123,8 @@ int TutorialHint::tick()
|
|||
case e_Hint_SwimUp:
|
||||
if( Minecraft::GetInstance()->localplayers[m_tutorial->getPad()]->isUnderLiquid(Material::water) ) returnVal = m_descriptionId;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return returnVal;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -374,6 +374,8 @@ void IUIScene_AbstractContainerMenu::onMouseTick()
|
|||
case eTapNone:
|
||||
/// Nothing to do, input is not a tap.
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
#endif // TAP_DETECTION
|
||||
|
||||
|
|
@ -632,6 +634,8 @@ void IUIScene_AbstractContainerMenu::onMouseTick()
|
|||
iDesiredSlotX = m_iCurrSlotX;
|
||||
iDesiredSlotY = m_iCurrSlotY;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
int iNumRows;
|
||||
|
|
|
|||
|
|
@ -176,6 +176,8 @@ void IUIScene_AnvilMenu::handleOtherClicked(int iPad, ESceneSection eSection, in
|
|||
case eSectionAnvilName:
|
||||
handleEditNamePressed();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -188,7 +190,9 @@ bool IUIScene_AnvilMenu::IsSectionSlotList( ESceneSection eSection )
|
|||
case eSectionAnvilItem1:
|
||||
case eSectionAnvilItem2:
|
||||
case eSectionAnvilResult:
|
||||
return true;
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -955,6 +955,8 @@ bool IUIScene_CreativeMenu::IsSectionSlotList( ESceneSection eSection )
|
|||
case eSectionInventoryCreativeUsing:
|
||||
case eSectionInventoryCreativeSelector:
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
@ -966,6 +968,8 @@ bool IUIScene_CreativeMenu::CanHaveFocus( ESceneSection eSection )
|
|||
case eSectionInventoryCreativeUsing:
|
||||
case eSectionInventoryCreativeSelector:
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -138,6 +138,8 @@ void IUIScene_EnchantingMenu::handleOtherClicked(int iPad, ESceneSection eSectio
|
|||
case eSectionEnchantButton3:
|
||||
index = 2;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
Minecraft *pMinecraft = Minecraft::GetInstance();
|
||||
if (index >= 0 && m_menu->clickMenuButton(std::dynamic_pointer_cast<Player>(pMinecraft->localplayers[iPad]), index))
|
||||
|
|
@ -175,6 +177,8 @@ bool IUIScene_EnchantingMenu::IsSectionSlotList( ESceneSection eSection )
|
|||
case eSectionEnchantUsing:
|
||||
case eSectionEnchantSlot:
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -106,6 +106,8 @@ void UIComponent_Chat::render(S32 width, S32 height, C4JRender::eViewportType vi
|
|||
xPos = (S32)(ui.getScreenWidth() / 2);
|
||||
yPos = (S32)(ui.getScreenHeight() / 2);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
ui.setupRenderPosition(xPos, yPos);
|
||||
|
||||
|
|
@ -134,6 +136,8 @@ void UIComponent_Chat::render(S32 width, S32 height, C4JRender::eViewportType vi
|
|||
case C4JRender::VIEWPORT_TYPE_QUADRANT_BOTTOM_RIGHT:
|
||||
tileYStart = (S32)(m_movieHeight / 2);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
IggyPlayerSetDisplaySize( getMovie(), m_movieWidth, m_movieHeight );
|
||||
|
|
@ -154,4 +158,4 @@ void UIComponent_Chat::render(S32 width, S32 height, C4JRender::eViewportType vi
|
|||
{
|
||||
UIScene::render(width, height, viewport);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,6 +52,8 @@ void UIComponent_MenuBackground::render(S32 width, S32 height, C4JRender::eViewp
|
|||
xPos = (S32)(ui.getScreenWidth() / 2);
|
||||
yPos = (S32)(ui.getScreenHeight() / 2);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
ui.setupRenderPosition(xPos, yPos);
|
||||
|
||||
|
|
@ -80,6 +82,8 @@ void UIComponent_MenuBackground::render(S32 width, S32 height, C4JRender::eViewp
|
|||
case C4JRender::VIEWPORT_TYPE_QUADRANT_BOTTOM_RIGHT:
|
||||
tileYStart = (S32)(m_movieHeight / 2);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
IggyPlayerSetDisplaySize( getMovie(), m_movieWidth, m_movieHeight );
|
||||
|
|
@ -100,4 +104,4 @@ void UIComponent_MenuBackground::render(S32 width, S32 height, C4JRender::eViewp
|
|||
{
|
||||
UIScene::render(width, height, viewport);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,6 +90,8 @@ void UIComponent_Panorama::render(S32 width, S32 height, C4JRender::eViewportTyp
|
|||
case C4JRender::VIEWPORT_TYPE_SPLIT_RIGHT:
|
||||
xPos = (S32)(ui.getScreenWidth() / 2);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
ui.setupRenderPosition(xPos, yPos);
|
||||
|
||||
|
|
|
|||
|
|
@ -204,6 +204,8 @@ void UIComponent_Tooltips::render(S32 width, S32 height, C4JRender::eViewportTyp
|
|||
xPos = (S32)(ui.getScreenWidth() / 2);
|
||||
yPos = (S32)(ui.getScreenHeight() / 2);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
ui.setupRenderPosition(xPos, yPos);
|
||||
|
||||
|
|
@ -232,6 +234,8 @@ void UIComponent_Tooltips::render(S32 width, S32 height, C4JRender::eViewportTyp
|
|||
case C4JRender::VIEWPORT_TYPE_QUADRANT_BOTTOM_RIGHT:
|
||||
tileYStart = (S32)(m_movieHeight / 2);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
IggyPlayerSetDisplaySize( getMovie(), m_movieWidth, m_movieHeight );
|
||||
|
|
|
|||
|
|
@ -496,6 +496,8 @@ void UIComponent_TutorialPopup::render(S32 width, S32 height, C4JRender::eViewpo
|
|||
xPos = (S32)(ui.getScreenWidth() / 2);
|
||||
yPos = (S32)(ui.getScreenHeight() / 2);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
//Adjust for safezone
|
||||
switch( viewport )
|
||||
|
|
@ -507,6 +509,8 @@ void UIComponent_TutorialPopup::render(S32 width, S32 height, C4JRender::eViewpo
|
|||
case C4JRender::VIEWPORT_TYPE_QUADRANT_TOP_RIGHT:
|
||||
yPos += getSafeZoneHalfHeight();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
switch( viewport )
|
||||
{
|
||||
|
|
@ -517,6 +521,8 @@ void UIComponent_TutorialPopup::render(S32 width, S32 height, C4JRender::eViewpo
|
|||
case C4JRender::VIEWPORT_TYPE_QUADRANT_BOTTOM_RIGHT:
|
||||
xPos -= getSafeZoneHalfWidth();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
ui.setupRenderPosition(xPos, yPos);
|
||||
|
||||
|
|
|
|||
|
|
@ -523,12 +523,12 @@ IggyLibrary UIController::loadSkin(const std::wstring &skinPath, const std::wstr
|
|||
rrbool res;
|
||||
int iteration = 0;
|
||||
__int64 totalStatic = 0;
|
||||
while(res = IggyDebugGetMemoryUseInfo ( NULL ,
|
||||
while((res = IggyDebugGetMemoryUseInfo ( NULL ,
|
||||
lib ,
|
||||
"" ,
|
||||
0 ,
|
||||
iteration ,
|
||||
&memoryInfo ))
|
||||
&memoryInfo )))
|
||||
{
|
||||
totalStatic += memoryInfo.static_allocation_bytes;
|
||||
app.DebugPrintf(app.USER_SR, "%ls - %.*s, static: %dB, dynamic: %dB\n", skinPath.c_str(), memoryInfo.subcategory_stringlen, memoryInfo.subcategory, memoryInfo.static_allocation_bytes, memoryInfo.dynamic_allocation_bytes);
|
||||
|
|
|
|||
|
|
@ -404,6 +404,8 @@ bool UILayer::NavigateToScene(int iPad, EUIScene scene, void *initData)
|
|||
case eUIScene_Timer:
|
||||
newScene = new UIScene_Timer(iPad, initData, this);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
|
||||
if(newScene == NULL)
|
||||
|
|
@ -553,6 +555,8 @@ UIScene *UILayer::addComponent(int iPad, EUIScene scene, void *initData)
|
|||
newScene = new UIComponent_MenuBackground(iPad, initData, this);
|
||||
m_componentRefCount[scene] = std::pair<int,bool>(1,true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
|
||||
if(newScene == NULL) return NULL;
|
||||
|
|
@ -728,6 +732,8 @@ bool UILayer::updateFocusState(bool allowedFocus /* = false */)
|
|||
case eUIScene_EndPoem:
|
||||
m_bIgnoreAutosaveMenuDisplayed = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
switch(sceneType)
|
||||
|
|
@ -738,6 +744,8 @@ bool UILayer::updateFocusState(bool allowedFocus /* = false */)
|
|||
case eUIScene_LeaderboardsMenu:
|
||||
m_bIgnorePlayerJoinMenuDisplayed = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
m_hasFocus = layerFocusSet;
|
||||
|
|
@ -867,4 +875,4 @@ UIScene *UILayer::FindScene(EUIScene sceneType)
|
|||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -391,12 +391,12 @@ void UIScene::getDebugMemoryUseRecursive(const std::wstring &moviePath, IggyMemo
|
|||
rrbool res;
|
||||
IggyMemoryUseInfo internalMemoryInfo;
|
||||
int internalIteration = 0;
|
||||
while(res = IggyDebugGetMemoryUseInfo ( swf ,
|
||||
while((res = IggyDebugGetMemoryUseInfo ( swf ,
|
||||
0 ,
|
||||
memoryInfo.subcategory ,
|
||||
memoryInfo.subcategory_stringlen ,
|
||||
internalIteration ,
|
||||
&internalMemoryInfo ))
|
||||
&internalMemoryInfo )))
|
||||
{
|
||||
app.DebugPrintf(app.USER_SR, "%ls - %.*s static: %d ( %d ) dynamic: %d ( %d )\n", moviePath.c_str(), internalMemoryInfo.subcategory_stringlen, internalMemoryInfo.subcategory,
|
||||
internalMemoryInfo.static_allocation_bytes, internalMemoryInfo.static_allocation_count, internalMemoryInfo.dynamic_allocation_bytes, internalMemoryInfo.dynamic_allocation_count);
|
||||
|
|
@ -414,12 +414,12 @@ void UIScene::PrintTotalMemoryUsage(__int64 &totalStatic, __int64 &totalDynamic)
|
|||
int iteration = 0;
|
||||
__int64 sceneStatic = 0;
|
||||
__int64 sceneDynamic = 0;
|
||||
while(res = IggyDebugGetMemoryUseInfo ( swf ,
|
||||
while((res = IggyDebugGetMemoryUseInfo ( swf ,
|
||||
0 ,
|
||||
"" ,
|
||||
0 ,
|
||||
iteration ,
|
||||
&memoryInfo ))
|
||||
&memoryInfo )))
|
||||
{
|
||||
sceneStatic += memoryInfo.static_allocation_bytes;
|
||||
sceneDynamic += memoryInfo.dynamic_allocation_bytes;
|
||||
|
|
|
|||
|
|
@ -150,6 +150,8 @@ int UIScene_DebugSetCamera::KeyboardCompleteCallback(void *lpParam,bool bRes)
|
|||
pClass->m_textInputElevation.setLabel(value);
|
||||
pClass->currentPosition->m_elev = val;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -339,6 +339,8 @@ void UIScene_FullscreenProgress::handlePress(F64 controlId, F64 childId)
|
|||
ui.NavigateToHomeMenu();
|
||||
ui.UpdatePlayerBasePositions();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -598,6 +598,8 @@ void UIScene_HUD::render(S32 width, S32 height, C4JRender::eViewportType viewpor
|
|||
xPos = (S32)(ui.getScreenWidth() / 2);
|
||||
yPos = (S32)(ui.getScreenHeight() / 2);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
ui.setupRenderPosition(xPos, yPos);
|
||||
|
||||
|
|
@ -626,6 +628,8 @@ void UIScene_HUD::render(S32 width, S32 height, C4JRender::eViewportType viewpor
|
|||
case C4JRender::VIEWPORT_TYPE_QUADRANT_BOTTOM_RIGHT:
|
||||
tileYStart = (S32)(m_movieHeight / 2);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
IggyPlayerSetDisplaySize( getMovie(), m_movieWidth, m_movieHeight );
|
||||
|
|
@ -711,6 +715,8 @@ void UIScene_HUD::repositionHud()
|
|||
case C4JRender::VIEWPORT_TYPE_SPLIT_BOTTOM:
|
||||
width = (S32)(ui.getScreenWidth());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
app.DebugPrintf(app.USER_SR, "Reposition HUD with dims %d, %d\n", width, height );
|
||||
|
|
|
|||
|
|
@ -194,9 +194,14 @@ void UIScene_InventoryMenu::setSectionSelectedSlot(ESceneSection eSection, int x
|
|||
case eSectionInventoryUsing:
|
||||
slotList = &m_slotListHotbar;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
slotList->setHighlightSlot(index);
|
||||
if (slotList != NULL)
|
||||
{
|
||||
slotList->setHighlightSlot(index);
|
||||
}
|
||||
}
|
||||
|
||||
UIControl *UIScene_InventoryMenu::getSection(ESceneSection eSection)
|
||||
|
|
@ -213,6 +218,8 @@ UIControl *UIScene_InventoryMenu::getSection(ESceneSection eSection)
|
|||
case eSectionInventoryUsing:
|
||||
control = &m_slotListHotbar;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return control;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -522,6 +522,8 @@ void UIScene_JoinMenu::JoinGame(UIScene_JoinMenu* pClass)
|
|||
case CGameNetworkManager::JOINGAME_FAIL_SERVER_FULL:
|
||||
exitReasonStringId = IDS_DISCONNECTED_SERVER_FULL;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if( exitReasonStringId == -1 )
|
||||
|
|
|
|||
|
|
@ -303,6 +303,8 @@ void UIScene_LaunchMoreOptionsMenu::handleCheckboxToggled(F64 controlId, bool se
|
|||
case eLaunchCheckbox_DisableSaving:
|
||||
m_params->bDisableSaving = selected;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -419,6 +419,8 @@ void UIScene_MainMenu::RunAction(int iPad)
|
|||
Windows::Xbox::ApplicationModel::Help::Show(user);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -500,6 +502,8 @@ int UIScene_MainMenu::MustSignInReturned(void *pParam, int iPad, C4JStorage::EMe
|
|||
#ifdef _DURANGO
|
||||
case eAction_RunXboxHelp: ProfileManager.RequestSignInUI(false, false, true, false, true, &UIScene_MainMenu::XboxHelp_SignInReturned, pClass, iPad ); break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -411,6 +411,8 @@ void UIScene_SkinSelectMenu::handleInput(int iPad, int key, bool repeat, bool pr
|
|||
case eSkinNavigation_Skin:
|
||||
m_currentNavigation = eSkinNavigation_Pack;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
sendInputToMovie(key, repeat, pressed, released);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1421,11 +1421,12 @@ static int set_render_state(GDrawRenderState *r, S32 vformat, const int **ovvars
|
|||
|
||||
if (fvars[VAR_cmul] >= 0)
|
||||
glUniform4f(fvars[VAR_cmul], r->color[0], r->color[1], r->color[2], r->color[3]);
|
||||
if (fvars[VAR_cadd] >= 0)
|
||||
if (fvars[VAR_cadd] >= 0) {
|
||||
if (r->cxf_add)
|
||||
glUniform4f(fvars[VAR_cadd], r->cxf_add[0]/255.0f, r->cxf_add[1]/255.0f, r->cxf_add[2]/255.0f, r->cxf_add[3]/255.0f);
|
||||
else
|
||||
glUniform4f(fvars[VAR_cadd], 0,0,0,0);
|
||||
}
|
||||
if (fvars[VAR_focal] >= 0)
|
||||
glUniform4fv(fvars[VAR_focal], 1, r->focal_point);
|
||||
|
||||
|
|
@ -2425,4 +2426,3 @@ void gdraw_GLx_(DestroyContext)(void)
|
|||
opengl_check();
|
||||
free_gdraw();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -316,6 +316,8 @@ void MultiplayerLocalPlayer::ride(std::shared_ptr<Entity> e)
|
|||
case eTYPE_PIG:
|
||||
eventType = eTelemetryInGame_Ride_Pig;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
}
|
||||
TelemetryManager->RecordEnemyKilledOrOvercome(GetXboxPad(), 0, y, 0, 0, 0, 0, eventType);
|
||||
|
|
|
|||
|
|
@ -490,11 +490,11 @@ void ItemRenderer::renderAndDecorateItem(Font *font, Textures *textures, const s
|
|||
if((fScaleX!=1.0f) ||(fScaleY!=1.0f))
|
||||
{
|
||||
// 4J Stu - Scales were multiples of 20, making 16 to not overlap in xui scenes
|
||||
blitGlint(x * 431278612 + y * 32178161, x - 2, y - 2, 16 * fScaleX, 16 * fScaleY);
|
||||
blitGlint(x * 431278612.0f + y * 32178161.0f, x - 2, y - 2, 16 * fScaleX, 16 * fScaleY);
|
||||
}
|
||||
else
|
||||
{
|
||||
blitGlint(x * 431278612 + y * 32178161, x - 2, y - 2, 20, 20);
|
||||
blitGlint(x * 431278612.0f + y * 32178161.0f, x - 2, y - 2, 20, 20);
|
||||
}
|
||||
glColor4f(1.0f, 1.0f, 1.0f, 1); // 4J added
|
||||
if( !isConstantBlended ) glDisable(GL_BLEND);
|
||||
|
|
|
|||
|
|
@ -406,7 +406,7 @@ void LevelRenderer::allChanged(int playerIndex)
|
|||
// If this CS is entered before DisableUpdateThread is called then (on 360 at least) we can get a
|
||||
// deadlock when starting a game in splitscreen.
|
||||
//EnterCriticalSection(&m_csDirtyChunks);
|
||||
if( level == NULL )
|
||||
if( level[playerIndex] == NULL )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -473,7 +473,7 @@ void LevelRenderer::allChanged(int playerIndex)
|
|||
}
|
||||
nonStackDirtyChunksAdded();
|
||||
|
||||
if (level != NULL)
|
||||
if (level[playerIndex] != NULL)
|
||||
{
|
||||
std::shared_ptr<Entity> player = mc->cameraTargetPlayer;
|
||||
if (player != NULL)
|
||||
|
|
|
|||
|
|
@ -30,6 +30,9 @@ ModelPart * HumanoidModel::AddOrRetrievePart(SKIN_BOX *pBox)
|
|||
case eBodyPart_Leg1:
|
||||
pAttachTo=leg1;
|
||||
break;
|
||||
case eBodyPart_Unknown:
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// first check this box doesn't already exist
|
||||
|
|
|
|||
|
|
@ -92,7 +92,8 @@ void MobSpawnerTileEntity::tick()
|
|||
std::shared_ptr<Mob> entity = std::dynamic_pointer_cast<Mob> (EntityIO::newEntity(entityId, level));
|
||||
if (entity == NULL) return;
|
||||
|
||||
std::vector<std::shared_ptr<Entity> > *vecNearby = level->getEntitiesOfClass(typeid(*entity), AABB::newTemp(x, y, z, x + 1, y + 1, z + 1)->grow(8, 4, 8));
|
||||
Mob *entityPtr = entity.get();
|
||||
std::vector<std::shared_ptr<Entity> > *vecNearby = level->getEntitiesOfClass(typeid(*entityPtr), AABB::newTemp(x, y, z, x + 1, y + 1, z + 1)->grow(8, 4, 8));
|
||||
int nearBy = (int)vecNearby->size(); //4J - IB, TODO, Mob contains no getClass
|
||||
delete vecNearby;
|
||||
|
||||
|
|
@ -230,4 +231,4 @@ std::shared_ptr<TileEntity> MobSpawnerTileEntity::clone()
|
|||
result->entityId = entityId;
|
||||
result->spawnDelay = spawnDelay;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -401,7 +401,8 @@ void Animal::resetLove() {
|
|||
bool Animal::canMate(std::shared_ptr<Animal> partner)
|
||||
{
|
||||
if (partner == shared_from_this()) return false;
|
||||
if (typeid(*partner) != typeid(*this)) return false;
|
||||
Animal *partnerPtr = partner.get();
|
||||
if (partnerPtr == NULL || typeid(*partnerPtr) != typeid(*this)) return false;
|
||||
return isInLove() && partner->isInLove();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -932,6 +932,8 @@ void EnderDragon::findNewTarget()
|
|||
#endif
|
||||
m_actionTicks = 0;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
|
||||
newTarget = false;
|
||||
|
|
@ -1347,6 +1349,8 @@ bool EnderDragon::setSynchedAction(EEnderdragonAction action, bool force /*= fal
|
|||
case e_EnderdragonAction_LandingApproach:
|
||||
validTransition = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
break;
|
||||
case e_EnderdragonAction_StrafePlayer:
|
||||
|
|
@ -1356,6 +1360,8 @@ bool EnderDragon::setSynchedAction(EEnderdragonAction action, bool force /*= fal
|
|||
case e_EnderdragonAction_LandingApproach:
|
||||
validTransition = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
break;
|
||||
case e_EnderdragonAction_LandingApproach:
|
||||
|
|
@ -1364,6 +1370,8 @@ bool EnderDragon::setSynchedAction(EEnderdragonAction action, bool force /*= fal
|
|||
case e_EnderdragonAction_Landing:
|
||||
validTransition = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
break;
|
||||
case e_EnderdragonAction_Landing:
|
||||
|
|
@ -1373,6 +1381,8 @@ bool EnderDragon::setSynchedAction(EEnderdragonAction action, bool force /*= fal
|
|||
case e_EnderdragonAction_Sitting_Scanning:
|
||||
validTransition = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
break;
|
||||
case e_EnderdragonAction_Takeoff:
|
||||
|
|
@ -1381,6 +1391,8 @@ bool EnderDragon::setSynchedAction(EEnderdragonAction action, bool force /*= fal
|
|||
case e_EnderdragonAction_HoldingPattern:
|
||||
validTransition = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
break;
|
||||
case e_EnderdragonAction_Sitting_Flaming:
|
||||
|
|
@ -1391,6 +1403,8 @@ bool EnderDragon::setSynchedAction(EEnderdragonAction action, bool force /*= fal
|
|||
case e_EnderdragonAction_Takeoff:
|
||||
validTransition = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
break;
|
||||
case e_EnderdragonAction_Sitting_Scanning:
|
||||
|
|
@ -1401,6 +1415,8 @@ bool EnderDragon::setSynchedAction(EEnderdragonAction action, bool force /*= fal
|
|||
case e_EnderdragonAction_Takeoff:
|
||||
validTransition = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
break;
|
||||
case e_EnderdragonAction_Sitting_Attacking:
|
||||
|
|
@ -1411,8 +1427,12 @@ bool EnderDragon::setSynchedAction(EEnderdragonAction action, bool force /*= fal
|
|||
case e_EnderdragonAction_Takeoff:
|
||||
validTransition = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
|
||||
if( force || validTransition )
|
||||
|
|
|
|||
|
|
@ -86,8 +86,6 @@ CustomLevelSource::~CustomLevelSource()
|
|||
delete mineShaftFeature;
|
||||
delete canyonFeature;
|
||||
|
||||
this->level = level;
|
||||
|
||||
delete random;
|
||||
delete perlinNoise3;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1643,7 +1643,11 @@ void LevelChunk::getEntitiesOfClass(const std::type_info& ec, AABB *bb, std::vec
|
|||
else if ( ec == typeid(Mob) ) { if( std::dynamic_pointer_cast<Mob>(e) != NULL ) isAssignableFrom = true; }
|
||||
else if ( ec == typeid(Monster) ) { if( std::dynamic_pointer_cast<Monster>(e) != NULL ) isAssignableFrom = true; }
|
||||
else if ( ec == typeid(Zombie) ) { if( std::dynamic_pointer_cast<Zombie>(e) != NULL ) isAssignableFrom = true; }
|
||||
else if(e != NULL && ec == typeid(*(e.get())) ) isAssignableFrom = true;
|
||||
else
|
||||
{
|
||||
Entity *entityPtr = e.get();
|
||||
if(entityPtr != NULL && ec == typeid(*entityPtr)) isAssignableFrom = true;
|
||||
}
|
||||
if (isAssignableFrom && e->bb->intersects(bb)) es.push_back(e);
|
||||
// 4J - note needs to be equivalent to baseClass.isAssignableFrom(e.getClass())
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,8 +69,6 @@ RandomLevelSource::~RandomLevelSource()
|
|||
delete scatteredFeature;
|
||||
delete canyonFeature;
|
||||
|
||||
this->level = level;
|
||||
|
||||
delete random;;
|
||||
delete lperlinNoise1;
|
||||
delete lperlinNoise2;
|
||||
|
|
|
|||
|
|
@ -334,34 +334,15 @@ close("disconnect.genericReason", "Internal exception: " + e.toString());
|
|||
}*/
|
||||
|
||||
|
||||
void Connection::close(DisconnectPacket::eDisconnectReason reason, ...)
|
||||
void Connection::close(DisconnectPacket::eDisconnectReason reason)
|
||||
{
|
||||
fprintf(stderr, "[CONN] close called with reason=%d on connection=%p\n", reason, (void*)this);
|
||||
if (!running) return;
|
||||
fprintf(stderr, "[CONN] close proceeding (was running) on connection=%p\n", (void*)this);
|
||||
disconnected = true;
|
||||
|
||||
va_list input;
|
||||
va_start( input, reason );
|
||||
|
||||
disconnectReason = reason;//va_arg( input, const std::wstring );
|
||||
|
||||
std::vector<void *> objs = std::vector<void *>();
|
||||
void *i = NULL;
|
||||
while (i != NULL)
|
||||
{
|
||||
i = va_arg( input, void* );
|
||||
objs.push_back(i);
|
||||
}
|
||||
|
||||
if( objs.size() )
|
||||
{
|
||||
disconnectReasonObjects = &objs[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
disconnectReasonObjects = NULL;
|
||||
}
|
||||
disconnectReason = reason;
|
||||
disconnectReasonObjects = NULL;
|
||||
|
||||
// int count = 0, sum = 0, i = first;
|
||||
// va_list marker;
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ private:
|
|||
}*/
|
||||
|
||||
public:
|
||||
void close(DisconnectPacket::eDisconnectReason reason, ...);
|
||||
void close(DisconnectPacket::eDisconnectReason reason);
|
||||
|
||||
void tick();
|
||||
|
||||
|
|
|
|||
|
|
@ -769,7 +769,7 @@ void Player::setCustomCape(std::uint32_t capeId)
|
|||
if(pMojangData)
|
||||
{
|
||||
// Cape
|
||||
if(pMojangData->wchCape)
|
||||
if(pMojangData->wchCape[0] != 0)
|
||||
{
|
||||
this->customTextureUrl2= pMojangData->wchCape;
|
||||
}
|
||||
|
|
@ -884,7 +884,7 @@ void Player::prepareCustomTextures()
|
|||
if(pMojangData)
|
||||
{
|
||||
// Skin
|
||||
if(pMojangData->wchSkin)
|
||||
if(pMojangData->wchSkin[0] != 0)
|
||||
{
|
||||
this->customTextureUrl= pMojangData->wchSkin;
|
||||
}
|
||||
|
|
@ -2275,6 +2275,8 @@ void Player::killed(std::shared_ptr<Mob> mob)
|
|||
case eTYPE_ENDERDRAGON:
|
||||
awardStat(GenericStats::killsEnderdragon(), GenericStats::param_noArgs());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if( mob->GetType() == eTYPE_COW )
|
||||
|
|
@ -2644,6 +2646,8 @@ void Player::setPlayerGamePrivilege(unsigned int &uiGamePrivileges, EPlayerGameP
|
|||
Player::setPlayerGamePrivilege(uiGamePrivileges,ePlayerGamePrivilege_CanToggleClassicHunger,0);
|
||||
Player::setPlayerGamePrivilege(uiGamePrivileges,ePlayerGamePrivilege_CanTeleport,0);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
// off
|
||||
uiGamePrivileges&=~(1<<privilege);
|
||||
|
|
@ -2670,6 +2674,8 @@ bool Player::isAllowedToUse(Tile *tile)
|
|||
case Tile::trapdoor_Id:
|
||||
allowed = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2688,6 +2694,8 @@ bool Player::isAllowedToUse(Tile *tile)
|
|||
case Tile::enderChest_Id:
|
||||
allowed = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2760,6 +2768,8 @@ bool Player::isAllowedToUse(std::shared_ptr<ItemInstance> item)
|
|||
case Item::sword_wood_Id:
|
||||
allowed = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2850,6 +2860,8 @@ bool Player::isAllowedToHurtEntity(std::shared_ptr<Entity> target)
|
|||
|
||||
allowed = false;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
}
|
||||
return allowed;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
#include "../Headers/net.minecraft.stats.h"
|
||||
#include "../Headers/net.minecraft.world.item.h"
|
||||
#include "../Headers/net.minecraft.world.level.tile.h"
|
||||
#include <limits>
|
||||
#include "Achievement.h"
|
||||
#include "Achievements.h"
|
||||
|
||||
|
|
@ -10,8 +11,8 @@ const int Achievements::ACHIEVEMENT_OFFSET = 0x500000;
|
|||
|
||||
// maximum position of achievements (min and max)
|
||||
|
||||
int Achievements::xMin = 4294967295; // 4J Stu Was 4294967296 which is 1 larger than maxint. Hopefully no side effects
|
||||
int Achievements::yMin = 4294967295; // 4J Stu Was 4294967296 which is 1 larger than maxint. Hopefully no side effects
|
||||
int Achievements::xMin = std::numeric_limits<int>::max();
|
||||
int Achievements::yMin = std::numeric_limits<int>::max();
|
||||
int Achievements::xMax = 0;
|
||||
int Achievements::yMax = 0;
|
||||
|
||||
|
|
@ -182,4 +183,3 @@ void Achievements::staticCtor()
|
|||
void Achievements::init()
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
#include "../Platform/stdafx.h"
|
||||
#include <utility>
|
||||
#include "../Util/NumberFormatters.h"
|
||||
#include "StatFormatter.h"
|
||||
#include "Stats.h"
|
||||
|
|
@ -44,7 +45,7 @@ Stat *Stat::postConstruct()
|
|||
#ifdef __PS3__
|
||||
Stats::statsById->emplace(id1 );// assert(0); // MGH - TODO - FIX - find out where this move function comes from
|
||||
#else
|
||||
Stats::statsById->emplace( move(id1) );
|
||||
Stats::statsById->emplace(std::move(id1));
|
||||
#endif // __PS3__
|
||||
|
||||
return this;
|
||||
|
|
|
|||
Loading…
Reference in a new issue