summaryrefslogtreecommitdiffstats
path: root/src/core/main.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2019-08-17 14:46:19 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2019-08-17 14:46:19 +0200
commit13233ccaed3fd7aad37c99326beee3ddfaf437f3 (patch)
tree82f5205ffe573d41060ec29646e821841f651837 /src/core/main.cpp
parentmore CCarCtrl (diff)
parentMerge pull request #193 from erorcun/erorcun (diff)
downloadre3-13233ccaed3fd7aad37c99326beee3ddfaf437f3.tar
re3-13233ccaed3fd7aad37c99326beee3ddfaf437f3.tar.gz
re3-13233ccaed3fd7aad37c99326beee3ddfaf437f3.tar.bz2
re3-13233ccaed3fd7aad37c99326beee3ddfaf437f3.tar.lz
re3-13233ccaed3fd7aad37c99326beee3ddfaf437f3.tar.xz
re3-13233ccaed3fd7aad37c99326beee3ddfaf437f3.tar.zst
re3-13233ccaed3fd7aad37c99326beee3ddfaf437f3.zip
Diffstat (limited to 'src/core/main.cpp')
-rw-r--r--src/core/main.cpp35
1 files changed, 34 insertions, 1 deletions
diff --git a/src/core/main.cpp b/src/core/main.cpp
index a4c4de7b..7d60291c 100644
--- a/src/core/main.cpp
+++ b/src/core/main.cpp
@@ -47,6 +47,7 @@
#include "Text.h"
#include "RpAnimBlend.h"
#include "Frontend.h"
+#include "AnimViewer.h"
#define DEFAULT_VIEWWINDOW (Tan(DEGTORAD(CDraw::GetFOV() * 0.5f)))
@@ -71,9 +72,10 @@ char version_name[64];
float FramesPerSecond = 30.0f;
bool gbPrintShite = false;
-bool gbModelViewer;
+bool &gbModelViewer = *(bool*)0x95CD93;
bool DoRWStuffStartOfFrame_Horizon(int16 TopRed, int16 TopGreen, int16 TopBlue, int16 BottomRed, int16 BottomGreen, int16 BottomBlue, int16 Alpha);
+bool DoRWStuffStartOfFrame(int16 TopRed, int16 TopGreen, int16 TopBlue, int16 BottomRed, int16 BottomGreen, int16 BottomBlue, int16 Alpha);
void DoRWStuffEndOfFrame(void);
void RenderScene(void);
@@ -104,6 +106,28 @@ InitialiseGame(void)
CGame::Initialise("DATA\\GTA3.DAT");
}
+#ifndef MASTER
+void
+TheModelViewer(void)
+{
+#ifdef ASPECT_RATIO_SCALE
+ CDraw::SetAspectRatio(CDraw::FindAspectRatio());
+#endif
+ CAnimViewer::Update();
+ CTimer::Update();
+ SetLightsWithTimeOfDayColour(Scene.world);
+ CRenderer::ConstructRenderList();
+ DoRWStuffStartOfFrame(CTimeCycle::GetSkyTopRed(), CTimeCycle::GetSkyTopGreen(), CTimeCycle::GetSkyTopBlue(),
+ CTimeCycle::GetSkyBottomRed(), CTimeCycle::GetSkyBottomGreen(), CTimeCycle::GetSkyBottomBlue(),
+ 255);
+
+ DefinedState();
+ CVisibilityPlugins::InitAlphaEntityList();
+ CAnimViewer::Render();
+ DoRWStuffEndOfFrame();
+}
+#endif
+
void
Idle(void *arg)
{
@@ -976,6 +1000,15 @@ AppEventHandler(RsEvent event, void *param)
return rsEVENTPROCESSED;
}
+#ifndef MASTER
+ case rsANIMVIEWER:
+ {
+ TheModelViewer();
+
+ return rsEVENTPROCESSED;
+ }
+#endif
+
default:
{
return rsEVENTNOTPROCESSED;