summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2020-12-09 02:57:45 +0100
committererorcun <erorcunerorcun@hotmail.com.tr>2020-12-09 03:10:57 +0100
commite1044a79478a3e25bfc44e699eb1f419275e9a0f (patch)
treebcb5923ed9f2b64036ca567a67296a89e6b07670 /src/core
parentFix (diff)
downloadre3-e1044a79478a3e25bfc44e699eb1f419275e9a0f.tar
re3-e1044a79478a3e25bfc44e699eb1f419275e9a0f.tar.gz
re3-e1044a79478a3e25bfc44e699eb1f419275e9a0f.tar.bz2
re3-e1044a79478a3e25bfc44e699eb1f419275e9a0f.tar.lz
re3-e1044a79478a3e25bfc44e699eb1f419275e9a0f.tar.xz
re3-e1044a79478a3e25bfc44e699eb1f419275e9a0f.tar.zst
re3-e1044a79478a3e25bfc44e699eb1f419275e9a0f.zip
Diffstat (limited to '')
-rw-r--r--src/core/AnimViewer.cpp19
-rw-r--r--src/core/main.cpp26
2 files changed, 20 insertions, 25 deletions
diff --git a/src/core/AnimViewer.cpp b/src/core/AnimViewer.cpp
index b8354d93..a888d528 100644
--- a/src/core/AnimViewer.cpp
+++ b/src/core/AnimViewer.cpp
@@ -45,7 +45,7 @@ CEntity *CAnimViewer::pTarget = nil;
void
CAnimViewer::Render(void) {
if (pTarget) {
-// pTarget->GetPosition() = CVector(0.0f, 0.0f, 0.0f);
+// pTarget->GetPosition() = CVector(0.0f, 0.0f, 0.0f); // Only on Mobile
if (pTarget) {
#ifdef FIX_BUGS
#ifdef PED_SKIN
@@ -61,7 +61,9 @@ CAnimViewer::Render(void) {
void
CAnimViewer::Initialise(void) {
- LoadingScreen("Loading the ModelViewer", "", GetRandomSplashScreen());
+ // we need messages, messages needs hud, hud needs this
+ CHud::m_Wants_To_Draw_Hud = false;
+
animTxdSlot = CTxdStore::AddTxdSlot("generic");
CTxdStore::Create(animTxdSlot);
int hudSlot = CTxdStore::AddTxdSlot("hud");
@@ -75,9 +77,6 @@ CAnimViewer::Initialise(void) {
TheCamera.SetRwCamera(Scene.camera);
TheCamera.Cams[TheCamera.ActiveCam].Distance = 5.0f;
- gbModelViewer = true;
- CHud::m_Wants_To_Draw_Hud = false;
-
ThePaths.Init();
ThePaths.AllocatePathFindInfoMem(4500);
CCollision::Init();
@@ -113,7 +112,7 @@ CAnimViewer::Initialise(void) {
CTimeCycle::Initialise();
CCarCtrl::Init();
CPlayerPed *player = new CPlayerPed();
- player->SetPosition(0.0f, 0.0f, 0.0f);
+ player->SetPosition(0.0f, 0.0f, 0.0f); // This is 1000.f for all axes on Xbox, but 0.f on mobile?
CWorld::Players[0].m_pPed = player;
CDraw::SetFOV(120.0f);
CDraw::ms_fLODDistance = 500.0f;
@@ -222,8 +221,7 @@ CAnimViewer::Update(void)
{
static int modelId = 0;
static int animId = 0;
- // Please don't make this bool, static bool's are problematic on my side.
- static int reloadIFP = 0;
+ static bool reloadIFP = false;
AssocGroupId animGroup = ASSOCGRP_STD;
int nextModelId = modelId;
@@ -248,7 +246,7 @@ CAnimViewer::Update(void)
CAnimManager::Initialise();
CAnimManager::LoadAnimFiles();
- reloadIFP = 0;
+ reloadIFP = false;
}
} else {
animGroup = ASSOCGRP_STD;
@@ -302,6 +300,7 @@ CAnimViewer::Update(void)
pTarget->GetMatrix().GetPosition().z = 10.0f;
#else
pTarget->GetMatrix().GetPosition().z = 0.0f;
+
#endif
if (modelInfo->GetModelType() == MITYPE_PED) {
@@ -309,7 +308,7 @@ CAnimViewer::Update(void)
// Triangle in mobile
if (pad->GetSquareJustDown()) {
- reloadIFP = 1;
+ reloadIFP = true;
AsciiToUnicode("IFP reloaded", gUString);
CMessages::AddMessage(gUString, 1000, 0);
diff --git a/src/core/main.cpp b/src/core/main.cpp
index 54821979..cc20047f 100644
--- a/src/core/main.cpp
+++ b/src/core/main.cpp
@@ -616,8 +616,10 @@ LoadingScreen(const char *str1, const char *str2, const char *splashscreen)
AsciiToUnicode(str1, tmpstr);
CFont::PrintString(hpos, vpos, tmpstr);
vpos += 22*yscale;
- AsciiToUnicode(str2, tmpstr);
- CFont::PrintString(hpos, vpos, tmpstr);
+ if (str2) {
+ AsciiToUnicode(str2, tmpstr);
+ CFont::PrintString(hpos, vpos, tmpstr);
+ }
#endif
}
@@ -1513,15 +1515,6 @@ AppEventHandler(RsEvent event, void *param)
return rsEVENTPROCESSED;
}
-#ifndef MASTER
- case rsANIMVIEWER:
- {
- TheModelViewer();
-
- return rsEVENTPROCESSED;
- }
-#endif
-
default:
{
return rsEVENTNOTPROCESSED;
@@ -1536,8 +1529,11 @@ TheModelViewer(void)
#if (defined(GTA_PS2) || defined(GTA_XBOX))
//TODO
#else
+ // This is III Mobile code. III Xbox code run it like main function, which is impossible to implement on PC's state machine implementation.
+ // Also we want 2D things initialized in here to print animation ids etc., our additions for that marked with X
+
#ifdef ASPECT_RATIO_SCALE
- CDraw::SetAspectRatio(CDraw::FindAspectRatio());
+ CDraw::SetAspectRatio(CDraw::FindAspectRatio()); // X
#endif
CAnimViewer::Update();
CTimer::Update();
@@ -1547,12 +1543,12 @@ TheModelViewer(void)
CTimeCycle::GetSkyBottomRed(), CTimeCycle::GetSkyBottomGreen(), CTimeCycle::GetSkyBottomBlue(),
255);
- CSprite2d::InitPerFrame();
- CFont::InitPerFrame();
+ CSprite2d::InitPerFrame(); // X
+ CFont::InitPerFrame(); // X
DefinedState();
CVisibilityPlugins::InitAlphaEntityList();
CAnimViewer::Render();
- Render2dStuff();
+ Render2dStuff(); // X
DoRWStuffEndOfFrame();
#endif
}