summaryrefslogtreecommitdiffstats
path: root/src/skel/glfw
diff options
context:
space:
mode:
Diffstat (limited to 'src/skel/glfw')
-rw-r--r--src/skel/glfw/glfw.cpp67
1 files changed, 28 insertions, 39 deletions
diff --git a/src/skel/glfw/glfw.cpp b/src/skel/glfw/glfw.cpp
index a20c1cc6..c219e711 100644
--- a/src/skel/glfw/glfw.cpp
+++ b/src/skel/glfw/glfw.cpp
@@ -1259,17 +1259,11 @@ void resizeCB(GLFWwindow* window, int width, int height) {
* memory things don't work.
*/
/* redraw window */
-#ifndef MASTER
- if (RwInitialised && (gGameState == GS_PLAYING_GAME || gGameState == GS_ANIMVIEWER))
- {
- RsEventHandler((gGameState == GS_PLAYING_GAME ? rsIDLE : rsANIMVIEWER), (void *)TRUE);
- }
-#else
+
if (RwInitialised && gGameState == GS_PLAYING_GAME)
{
RsEventHandler(rsIDLE, (void *)TRUE);
}
-#endif
if (RwInitialised && height > 0 && width > 0) {
RwRect r;
@@ -1644,18 +1638,6 @@ main(int argc, char *argv[])
FrontEndMenuManager.DrawMemoryCardStartUpMenus();
}
#endif
-
- if (TurnOnAnimViewer)
- {
-#ifndef MASTER
- CAnimViewer::Initialise();
-#ifndef PS2_MENU
- FrontEndMenuManager.m_bGameNotLoaded = false;
-#endif
- gGameState = GS_ANIMVIEWER;
- TurnOnAnimViewer = false;
-#endif
- }
initkeymap();
@@ -1675,6 +1657,18 @@ main(int argc, char *argv[])
* Enter the message processing loop...
*/
+#ifndef MASTER
+ if (gbModelViewer) {
+ // This is TheModelViewer in LCS
+ LoadingScreen("Loading the ModelViewer", NULL, GetRandomSplashScreen());
+ CAnimViewer::Initialise();
+ CTimer::Update();
+#ifndef PS2_MENU
+ FrontEndMenuManager.m_bGameNotLoaded = false;
+#endif
+ }
+#endif
+
#ifdef PS2_MENU
if (TheMemoryCard.m_bWantToLoad)
LoadSplash(GetLevelSplashScreen(CGame::currLevel));
@@ -1689,7 +1683,13 @@ main(int argc, char *argv[])
#endif
{
glfwPollEvents();
- if( ForegroundApp )
+#ifndef MASTER
+ if (gbModelViewer) {
+ // This is TheModelViewerCore in LCS
+ TheModelViewer();
+ } else
+#endif
+ if ( ForegroundApp )
{
switch ( gGameState )
{
@@ -1893,18 +1893,6 @@ main(int argc, char *argv[])
}
break;
}
-#ifndef MASTER
- case GS_ANIMVIEWER:
- {
- float ms = (float)CTimer::GetCurrentTimeInCycles() / (float)CTimer::GetCyclesPerMillisecond();
- if (RwInitialised)
- {
- if (!FrontEndMenuManager.m_PrefsFrameLimiter || (1000.0f / (float)RsGlobal.maxFPS) < ms)
- RsEventHandler(rsANIMVIEWER, (void*)TRUE);
- }
- break;
- }
-#endif
}
}
else
@@ -1976,12 +1964,13 @@ main(int argc, char *argv[])
}
else
{
- if ( gGameState == GS_PLAYING_GAME )
- CGame::ShutDown();
#ifndef MASTER
- else if ( gGameState == GS_ANIMVIEWER )
+ if ( gbModelViewer )
CAnimViewer::Shutdown();
+ else
#endif
+ if ( gGameState == GS_PLAYING_GAME )
+ CGame::ShutDown();
CTimer::Stop();
@@ -2002,13 +1991,13 @@ main(int argc, char *argv[])
#endif
}
-
- if ( gGameState == GS_PLAYING_GAME )
- CGame::ShutDown();
#ifndef MASTER
- else if ( gGameState == GS_ANIMVIEWER )
+ if ( gbModelViewer )
CAnimViewer::Shutdown();
+ else
#endif
+ if ( gGameState == GS_PLAYING_GAME )
+ CGame::ShutDown();
DMAudio.Terminate();