summaryrefslogtreecommitdiffstats
path: root/src/core/main.cpp
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2019-08-15 16:51:39 +0200
committereray orçunus <erayorcunus@gmail.com>2019-08-15 16:51:39 +0200
commit5bea16c7ccc617828d0aee2da23c8aa3f87375df (patch)
tree150df121717298a2735f418dcae366417b8404ec /src/core/main.cpp
parentMore peds (diff)
downloadre3-5bea16c7ccc617828d0aee2da23c8aa3f87375df.tar
re3-5bea16c7ccc617828d0aee2da23c8aa3f87375df.tar.gz
re3-5bea16c7ccc617828d0aee2da23c8aa3f87375df.tar.bz2
re3-5bea16c7ccc617828d0aee2da23c8aa3f87375df.tar.lz
re3-5bea16c7ccc617828d0aee2da23c8aa3f87375df.tar.xz
re3-5bea16c7ccc617828d0aee2da23c8aa3f87375df.tar.zst
re3-5bea16c7ccc617828d0aee2da23c8aa3f87375df.zip
Diffstat (limited to 'src/core/main.cpp')
-rw-r--r--src/core/main.cpp32
1 files changed, 31 insertions, 1 deletions
diff --git a/src/core/main.cpp b/src/core/main.cpp
index a4c4de7b..ac31b56e 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,25 @@ InitialiseGame(void)
CGame::Initialise("DATA\\GTA3.DAT");
}
+#ifndef MASTER
+void
+TheModelViewer(void)
+{
+ 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 +997,15 @@ AppEventHandler(RsEvent event, void *param)
return rsEVENTPROCESSED;
}
+#ifndef MASTER
+ case rsANIMVIEWER:
+ {
+ TheModelViewer();
+
+ return rsEVENTPROCESSED;
+ }
+#endif
+
default:
{
return rsEVENTNOTPROCESSED;