mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-06-03 05:32:58 +00:00
fix: remove all linux-specific hacks for iggy
breaks title sequence, some menu rendering. need to do root-cause analysis to find out why
This commit is contained in:
parent
3ffb6413e2
commit
2d0450e578
|
|
@ -1704,7 +1704,7 @@ void Minecraft::run_middle()
|
|||
timer->advanceTime();
|
||||
}
|
||||
|
||||
__int64 beforeTickTime = System::nanoTime();
|
||||
//__int64 beforeTickTime = System::nanoTime();
|
||||
for (int i = 0; i < timer->ticks; i++)
|
||||
{
|
||||
bool bLastTimerTick = ( i == ( timer->ticks - 1 ) );
|
||||
|
|
@ -1790,7 +1790,7 @@ void Minecraft::run_middle()
|
|||
// CompressedTileStorage::tick(); // 4J added
|
||||
// SparseDataStorage::tick(); // 4J added
|
||||
}
|
||||
__int64 tickDuraction = System::nanoTime() - beforeTickTime;
|
||||
//__int64 tickDuraction = System::nanoTime() - beforeTickTime;
|
||||
MemSect(31);
|
||||
checkGlError(L"Pre render");
|
||||
MemSect(0);
|
||||
|
|
@ -1822,6 +1822,7 @@ void Minecraft::run_middle()
|
|||
int iPrimaryPad=ProfileManager.GetPrimaryPad();
|
||||
for( int i = 0; i < XUSER_MAX_COUNT; i++ )
|
||||
{
|
||||
|
||||
if( setLocalPlayerIdx(i) )
|
||||
{
|
||||
PIXBeginNamedEvent(0,"Game render player idx %d",i);
|
||||
|
|
@ -1849,16 +1850,19 @@ void Minecraft::run_middle()
|
|||
}
|
||||
}
|
||||
}
|
||||
#ifdef __linux__
|
||||
// On Linux, Iggy Flash UI is not available. If no players were rendered
|
||||
// (menu / title-screen state), call GameRenderer directly so mc->screen draws.
|
||||
if (bFirst)
|
||||
{
|
||||
localPlayerIdx = 0;
|
||||
RenderManager.StateSetViewport(C4JRender::VIEWPORT_TYPE_FULLSCREEN);
|
||||
gameRenderer->render(timer->a, true);
|
||||
}
|
||||
#endif
|
||||
|
||||
// #ifdef __linux__
|
||||
// // On Linux, Iggy Flash UI is not available. If no players were rendered
|
||||
// // (menu / title-screen state), call GameRenderer directly so mc->screen draws.
|
||||
// if (bFirst)
|
||||
// {
|
||||
// localPlayerIdx = 0;
|
||||
// RenderManager.StateSetViewport(C4JRender::VIEWPORT_TYPE_FULLSCREEN);
|
||||
// gameRenderer->render(timer->a, true);
|
||||
// }
|
||||
// #endif
|
||||
|
||||
|
||||
// If there's an unoccupied quadrant, then clear that to black
|
||||
if( unoccupiedQuadrant > -1 )
|
||||
{
|
||||
|
|
@ -1895,9 +1899,10 @@ void Minecraft::run_middle()
|
|||
Sleep(10);
|
||||
}
|
||||
*/
|
||||
|
||||
if (options->renderDebug)
|
||||
{
|
||||
|
||||
//renderFpsMeter(tickDuraction);
|
||||
|
||||
#if DEBUG_RENDER_SHOWS_PACKETS
|
||||
// To show data for only one packet type
|
||||
|
|
@ -1987,6 +1992,7 @@ void Minecraft::run_middle()
|
|||
LeaveCriticalSection(&m_setLevelCS);
|
||||
}
|
||||
|
||||
|
||||
void Minecraft::run_end()
|
||||
{
|
||||
destroy();
|
||||
|
|
|
|||
|
|
@ -2,19 +2,12 @@
|
|||
#include "UI.h"
|
||||
#include "UIScene_Intro.h"
|
||||
|
||||
#ifdef __linux__
|
||||
static int s_introTickCount = 0;
|
||||
#endif
|
||||
|
||||
UIScene_Intro::UIScene_Intro(int iPad, void *initData, UILayer *parentLayer) : UIScene(iPad, parentLayer)
|
||||
{
|
||||
// Setup all the Iggy references we need for this scene
|
||||
initialiseMovie();
|
||||
m_bIgnoreNavigate = false;
|
||||
m_bAnimationEnded = false;
|
||||
#ifdef __linux__
|
||||
s_introTickCount = 0;
|
||||
#endif
|
||||
|
||||
bool bSkipESRB = false;
|
||||
#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
|
||||
|
|
@ -36,8 +29,6 @@ UIScene_Intro::UIScene_Intro(int iPad, void *initData, UILayer *parentLayer) : U
|
|||
int platformIdx = 4;
|
||||
#elif defined(__PSVITA__)
|
||||
int platformIdx = 5;
|
||||
#elif defined(__linux__)
|
||||
int platformIdx = 0;
|
||||
#endif
|
||||
|
||||
IggyDataValue result;
|
||||
|
|
@ -172,22 +163,3 @@ void UIScene_Intro::handleGainFocus(bool navBack)
|
|||
ui.NavigateToScene(0,eUIScene_MainMenu);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __linux__
|
||||
void UIScene_Intro::tick()
|
||||
{
|
||||
// Call base tick first (processes Iggy ticking)
|
||||
UIScene::tick();
|
||||
|
||||
// Auto-skip the intro after 60 ticks (~2 seconds at 30fps)
|
||||
// since we have no SWF renderer to play the intro animation
|
||||
s_introTickCount++;
|
||||
// if(s_introTickCount == 60 && !m_bIgnoreNavigate)
|
||||
// {
|
||||
// fprintf(stderr, "[Linux] Auto-skipping intro -> MainMenu after %d ticks\n", s_introTickCount);
|
||||
// m_bIgnoreNavigate = true;
|
||||
// // Skip straight to MainMenu, bypassing SaveMessage (no SWF interaction possible)
|
||||
// ui.NavigateToScene(0, eUIScene_MainMenu);
|
||||
// }
|
||||
}
|
||||
#endif
|
||||
|
|
@ -45,10 +45,6 @@ public:
|
|||
virtual void handleAnimationEnd();
|
||||
virtual void handleGainFocus(bool navBack);
|
||||
|
||||
#ifdef __linux__
|
||||
virtual void tick();
|
||||
#endif
|
||||
|
||||
#ifdef __PSVITA__
|
||||
virtual void handleTouchInput(unsigned int iPad, S32 x, S32 y, int iId, bool bPressed, bool bRepeat, bool bReleased);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1802,20 +1802,6 @@ void UIScene_MainMenu::tick()
|
|||
{
|
||||
UIScene::tick();
|
||||
|
||||
#ifdef __linux__
|
||||
{
|
||||
// static int s_mainMenuTickCount = 0;
|
||||
// s_mainMenuTickCount++;
|
||||
// if(s_mainMenuTickCount % 60 == 1) { fprintf(stderr, "[MM] tick %d\n", s_mainMenuTickCount); fflush(stderr); }
|
||||
// if(s_mainMenuTickCount == 90) // ~3 seconds at 30fps
|
||||
// {
|
||||
// fprintf(stderr, "[Linux] Auto-starting trial world from MainMenu after %d ticks\n", s_mainMenuTickCount);
|
||||
// LoadTrial();
|
||||
// return;
|
||||
// }
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(__PS3__) || defined (__ORBIS__) || defined(__PSVITA__)
|
||||
if(m_bLaunchFullVersionPurchase)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue