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