Revert "Project modernization (#630)"
This code was not tested and breaks in Release builds, reverting to restore
functionality of the nightly. All in-game menus do not work and generating
a world crashes.
This reverts commit a9be52c41a.
This commit is contained in:
@@ -102,7 +102,7 @@ void UILayer::render(S32 width, S32 height, C4JRender::eViewportType viewport)
|
||||
bool UILayer::IsSceneInStack(EUIScene scene)
|
||||
{
|
||||
bool inStack = false;
|
||||
for(size_t i = (int)m_sceneStack.size() - 1;i >= 0; --i)
|
||||
for(int i = m_sceneStack.size() - 1;i >= 0; --i)
|
||||
{
|
||||
if(m_sceneStack[i]->getSceneType() == scene)
|
||||
{
|
||||
@@ -118,7 +118,7 @@ bool UILayer::HasFocus(int iPad)
|
||||
bool hasFocus = false;
|
||||
if(m_hasFocus)
|
||||
{
|
||||
for(size_t i = (int)m_sceneStack.size() - 1;i >= 0; --i)
|
||||
for(int i = m_sceneStack.size() - 1;i >= 0; --i)
|
||||
{
|
||||
if(m_sceneStack[i]->stealsFocus() )
|
||||
{
|
||||
@@ -146,7 +146,7 @@ bool UILayer::hidesLowerScenes()
|
||||
}
|
||||
if(!hidesScenes && !m_sceneStack.empty())
|
||||
{
|
||||
for(size_t i = (int)m_sceneStack.size() - 1;i >= 0; --i)
|
||||
for(int i = m_sceneStack.size() - 1;i >= 0; --i)
|
||||
{
|
||||
if(m_sceneStack[i]->hidesLowerScenes())
|
||||
{
|
||||
@@ -197,7 +197,7 @@ bool UILayer::GetMenuDisplayed()
|
||||
|
||||
bool UILayer::NavigateToScene(int iPad, EUIScene scene, void *initData)
|
||||
{
|
||||
UIScene *newScene = nullptr;
|
||||
UIScene *newScene = NULL;
|
||||
switch(scene)
|
||||
{
|
||||
// Debug
|
||||
@@ -424,7 +424,7 @@ bool UILayer::NavigateToScene(int iPad, EUIScene scene, void *initData)
|
||||
break;
|
||||
};
|
||||
|
||||
if(newScene == nullptr)
|
||||
if(newScene == NULL)
|
||||
{
|
||||
app.DebugPrintf("WARNING: Scene %d was not created. Add it to UILayer::NavigateToScene\n", scene);
|
||||
return false;
|
||||
@@ -451,7 +451,7 @@ bool UILayer::NavigateBack(int iPad, EUIScene eScene)
|
||||
bool navigated = false;
|
||||
if(eScene < eUIScene_COUNT)
|
||||
{
|
||||
UIScene *scene = nullptr;
|
||||
UIScene *scene = NULL;
|
||||
do
|
||||
{
|
||||
scene = m_sceneStack.back();
|
||||
@@ -523,9 +523,9 @@ UIScene *UILayer::addComponent(int iPad, EUIScene scene, void *initData)
|
||||
return itComp;
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
return NULL;
|
||||
}
|
||||
UIScene *newScene = nullptr;
|
||||
UIScene *newScene = NULL;
|
||||
|
||||
switch(scene)
|
||||
{
|
||||
@@ -573,7 +573,7 @@ UIScene *UILayer::addComponent(int iPad, EUIScene scene, void *initData)
|
||||
break;
|
||||
};
|
||||
|
||||
if(newScene == nullptr) return nullptr;
|
||||
if(newScene == NULL) return NULL;
|
||||
|
||||
m_components.push_back(newScene);
|
||||
|
||||
@@ -661,12 +661,12 @@ void UILayer::closeAllScenes()
|
||||
}
|
||||
}
|
||||
|
||||
// Get top scene on stack (or nullptr if stack is empty)
|
||||
// Get top scene on stack (or NULL if stack is empty)
|
||||
UIScene *UILayer::GetTopScene()
|
||||
{
|
||||
if(m_sceneStack.size() == 0)
|
||||
{
|
||||
return nullptr;
|
||||
return NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -789,7 +789,7 @@ UIScene *UILayer::getCurrentScene()
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -894,10 +894,10 @@ void UILayer::PrintTotalMemoryUsage(int64_t &totalStatic, int64_t &totalDynamic)
|
||||
totalDynamic += layerDynamic;
|
||||
}
|
||||
|
||||
// Returns the first scene of given type if it exists, nullptr otherwise
|
||||
// Returns the first scene of given type if it exists, NULL otherwise
|
||||
UIScene *UILayer::FindScene(EUIScene sceneType)
|
||||
{
|
||||
for (size_t i = 0; i < m_sceneStack.size(); i++)
|
||||
for (int i = 0; i < m_sceneStack.size(); i++)
|
||||
{
|
||||
if (m_sceneStack[i]->getSceneType() == sceneType)
|
||||
{
|
||||
@@ -905,5 +905,5 @@ UIScene *UILayer::FindScene(EUIScene sceneType)
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
return NULL;
|
||||
}
|
||||
Reference in New Issue
Block a user