Merge pull request #863 from erorcun/miami

AnimViewer done, comment cleanup
This commit is contained in:
erorcun 2020-12-03 13:06:55 +03:00 committed by GitHub
commit a37ce3ee9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 120 additions and 126 deletions

View File

@ -18,6 +18,7 @@
#include "World.h" #include "World.h"
#include "Renderer.h" #include "Renderer.h"
#include "AnimManager.h" #include "AnimManager.h"
#include "AnimBlendAssocGroup.h"
#include "AnimViewer.h" #include "AnimViewer.h"
#include "PlayerPed.h" #include "PlayerPed.h"
#include "Pools.h" #include "Pools.h"
@ -60,11 +61,14 @@ CAnimViewer::Render(void) {
void void
CAnimViewer::Initialise(void) { CAnimViewer::Initialise(void) {
LoadingScreen("Loading the ModelViewer", "", GetRandomSplashScreen());
animTxdSlot = CTxdStore::AddTxdSlot("generic"); // we need messages, messages needs hud, hud needs those
CTxdStore::Create(animTxdSlot);
int hudSlot = CTxdStore::AddTxdSlot("hud"); int hudSlot = CTxdStore::AddTxdSlot("hud");
CTxdStore::LoadTxd(hudSlot, "MODELS/HUD.TXD"); CTxdStore::LoadTxd(hudSlot, "MODELS/HUD.TXD");
CHud::m_Wants_To_Draw_Hud = false;
animTxdSlot = CTxdStore::AddTxdSlot("generic");
CTxdStore::Create(animTxdSlot);
int particleSlot = CTxdStore::AddTxdSlot("particle"); int particleSlot = CTxdStore::AddTxdSlot("particle");
CTxdStore::LoadTxd(particleSlot, "MODELS/PARTICLE.TXD"); CTxdStore::LoadTxd(particleSlot, "MODELS/PARTICLE.TXD");
CTxdStore::SetCurrentTxd(animTxdSlot); CTxdStore::SetCurrentTxd(animTxdSlot);
@ -73,10 +77,6 @@ CAnimViewer::Initialise(void) {
TheCamera.Init(); TheCamera.Init();
TheCamera.SetRwCamera(Scene.camera); TheCamera.SetRwCamera(Scene.camera);
TheCamera.Cams[TheCamera.ActiveCam].Distance = 5.0f; TheCamera.Cams[TheCamera.ActiveCam].Distance = 5.0f;
gbModelViewer = true;
CHud::m_Wants_To_Draw_Hud = false;
ThePaths.Init(); ThePaths.Init();
ThePaths.AllocatePathFindInfoMem(4500); ThePaths.AllocatePathFindInfoMem(4500);
CCollision::Init(); CCollision::Init();
@ -138,6 +138,25 @@ CAnimViewer::Initialise(void) {
} else { } else {
// TODO? maybe request some special models here so the thing doesn't crash // TODO? maybe request some special models here so the thing doesn't crash
} }
// From LCS. idk if needed
int vanBlock = CAnimManager::GetAnimationBlockIndex("van");
int bikesBlock = CAnimManager::GetAnimationBlockIndex("bikes");
int bikevBlock = CAnimManager::GetAnimationBlockIndex("bikev");
int bikehBlock = CAnimManager::GetAnimationBlockIndex("bikeh");
int bikedBlock = CAnimManager::GetAnimationBlockIndex("biked");
CStreaming::FlushRequestList();
CStreaming::RequestAnim(vanBlock, STREAMFLAGS_DEPENDENCY);
CStreaming::RequestAnim(bikesBlock, STREAMFLAGS_DEPENDENCY);
CStreaming::RequestAnim(bikevBlock, STREAMFLAGS_DEPENDENCY);
CStreaming::RequestAnim(bikehBlock, STREAMFLAGS_DEPENDENCY);
CStreaming::RequestAnim(bikedBlock, STREAMFLAGS_DEPENDENCY);
CStreaming::LoadAllRequestedModels(false);
CAnimManager::AddAnimBlockRef(vanBlock);
CAnimManager::AddAnimBlockRef(bikesBlock);
CAnimManager::AddAnimBlockRef(bikevBlock);
CAnimManager::AddAnimBlockRef(bikehBlock);
CAnimManager::AddAnimBlockRef(bikedBlock);
} }
int int
@ -215,8 +234,7 @@ CAnimViewer::Update(void)
{ {
static int modelId = 0; static int modelId = 0;
static int animId = 0; static int animId = 0;
// Please don't make this bool, static bool's are problematic on my side. static bool reloadIFP = false;
static int reloadIFP = 0;
AssocGroupId animGroup = ASSOCGRP_STD; AssocGroupId animGroup = ASSOCGRP_STD;
int nextModelId = modelId; int nextModelId = modelId;
@ -241,7 +259,7 @@ CAnimViewer::Update(void)
CAnimManager::Initialise(); CAnimManager::Initialise();
CAnimManager::LoadAnimFiles(); CAnimManager::LoadAnimFiles();
reloadIFP = 0; reloadIFP = false;
} }
} else { } else {
animGroup = ASSOCGRP_STD; animGroup = ASSOCGRP_STD;
@ -299,7 +317,7 @@ CAnimViewer::Update(void)
// Triangle in mobile // Triangle in mobile
if (pad->GetSquareJustDown()) { if (pad->GetSquareJustDown()) {
reloadIFP = 1; reloadIFP = true;
AsciiToUnicode("IFP reloaded", gUString); AsciiToUnicode("IFP reloaded", gUString);
CMessages::AddMessage(gUString, 1000, 0); CMessages::AddMessage(gUString, 1000, 0);
@ -316,7 +334,7 @@ CAnimViewer::Update(void)
} else if (pad->GetDPadUpJustDown()) { } else if (pad->GetDPadUpJustDown()) {
animId--; animId--;
if (animId < 0) { if (animId < 0) {
animId = NUM_ANIMS - 1; animId = NUM_STD_ANIMS - 1;
} }
PlayAnimation(pTarget->GetClump(), animGroup, (AnimationId)animId); PlayAnimation(pTarget->GetClump(), animGroup, (AnimationId)animId);
@ -325,7 +343,7 @@ CAnimViewer::Update(void)
CMessages::AddMessage(gUString, 1000, 0); CMessages::AddMessage(gUString, 1000, 0);
} else if (pad->GetDPadDownJustDown()) { } else if (pad->GetDPadDownJustDown()) {
animId = (animId == (NUM_ANIMS - 1) ? 0 : animId + 1); animId = (animId == (NUM_STD_ANIMS - 1) ? 0 : animId + 1);
PlayAnimation(pTarget->GetClump(), animGroup, (AnimationId)animId); PlayAnimation(pTarget->GetClump(), animGroup, (AnimationId)animId);
sprintf(gString, "Current anim: %d", animId); sprintf(gString, "Current anim: %d", animId);
@ -344,6 +362,11 @@ CAnimViewer::Update(void)
AsciiToUnicode("Ped Col model will be animated as long as you hold the button", gUString); AsciiToUnicode("Ped Col model will be animated as long as you hold the button", gUString);
CMessages::AddMessage(gUString, 100, 0); CMessages::AddMessage(gUString, 100, 0);
} }
// From LCS
if (CAnimManager::GetAnimAssocGroups()[animGroup].numAssociations <= animId)
animId = 0;
} else if (modelInfo->GetModelType() == MITYPE_VEHICLE) { } else if (modelInfo->GetModelType() == MITYPE_VEHICLE) {
if (pad->GetLeftShoulder1JustDown()) { if (pad->GetLeftShoulder1JustDown()) {

View File

@ -599,8 +599,10 @@ LoadingScreen(const char *str1, const char *str2, const char *splashscreen)
AsciiToUnicode(str1, tmpstr); AsciiToUnicode(str1, tmpstr);
CFont::PrintString(hpos, top, tmpstr); CFont::PrintString(hpos, top, tmpstr);
top += 22*yscale; top += 22*yscale;
AsciiToUnicode(str2, tmpstr); if (str2) {
CFont::PrintString(hpos, top, tmpstr); AsciiToUnicode(str2, tmpstr);
CFont::PrintString(hpos, top, tmpstr);
}
#endif #endif
} }
@ -1424,15 +1426,6 @@ AppEventHandler(RsEvent event, void *param)
return rsEVENTPROCESSED; return rsEVENTPROCESSED;
} }
#ifndef MASTER
case rsANIMVIEWER:
{
TheModelViewer();
return rsEVENTPROCESSED;
}
#endif
default: default:
{ {
return rsEVENTNOTPROCESSED; return rsEVENTNOTPROCESSED;
@ -1448,22 +1441,27 @@ TheModelViewer(void)
//TODO //TODO
#else #else
CDraw::CalculateAspectRatio(); // This is not original. Because;
// 1- We want 2D things to be initalized, whereas original AnimViewer doesn't use them. my additions marked with X
// 2- VC Mobile code run it like main function(as opposed to III and LCS), so it has it's own loop inside it, but our func. already called in a loop.
CDraw::CalculateAspectRatio(); // X
CAnimViewer::Update(); CAnimViewer::Update();
CTimer::Update();
SetLightsWithTimeOfDayColour(Scene.world); SetLightsWithTimeOfDayColour(Scene.world);
CRenderer::ConstructRenderList(); CRenderer::ConstructRenderList();
DoRWStuffStartOfFrame(CTimeCycle::GetSkyTopRed()*0.5f, CTimeCycle::GetSkyTopGreen()*0.5f, CTimeCycle::GetSkyTopBlue()*0.5f, DoRWStuffStartOfFrame(CTimeCycle::GetSkyTopRed()*0.5f, CTimeCycle::GetSkyTopGreen()*0.5f, CTimeCycle::GetSkyTopBlue()*0.5f,
CTimeCycle::GetSkyBottomRed(), CTimeCycle::GetSkyBottomGreen(), CTimeCycle::GetSkyBottomBlue(), CTimeCycle::GetSkyBottomRed(), CTimeCycle::GetSkyBottomGreen(), CTimeCycle::GetSkyBottomBlue(),
255); 255);
CSprite2d::InitPerFrame(); CSprite2d::SetRecipNearClip(); // X
CFont::InitPerFrame(); CSprite2d::InitPerFrame(); // X
CFont::InitPerFrame(); // X
DefinedState(); DefinedState();
CVisibilityPlugins::InitAlphaEntityList(); CVisibilityPlugins::InitAlphaEntityList();
CAnimViewer::Render(); CAnimViewer::Render();
Render2dStuff(); Render2dStuff(); // X
DoRWStuffEndOfFrame(); DoRWStuffEndOfFrame();
CTimer::Update();
#endif #endif
} }
#endif #endif

View File

@ -18,7 +18,7 @@
#include <float.h> #include <float.h>
#endif #endif
// --MIAMI: file done except TODOs // --MIAMI: file done
CCivilianPed::CCivilianPed(ePedType pedtype, uint32 mi) : CPed(pedtype) CCivilianPed::CCivilianPed(ePedType pedtype, uint32 mi) : CPed(pedtype)
{ {
@ -228,7 +228,7 @@ CCivilianPed::CivilianAI(void)
void void
CCivilianPed::ProcessControl(void) CCivilianPed::ProcessControl(void)
{ {
if (CharCreatedBy == TODO_CHAR) if (CharCreatedBy == UNK_CHAR)
return; return;
CPed::ProcessControl(); CPed::ProcessControl();

View File

@ -39,8 +39,7 @@
#include "CutsceneShadow.h" #include "CutsceneShadow.h"
#include "Clock.h" #include "Clock.h"
// --MIAMI: file done except TODOs // --MIAMI: file done
CPed *gapTempPedList[50]; CPed *gapTempPedList[50];
uint16 gnNumTempPedList; uint16 gnNumTempPedList;
@ -4559,7 +4558,7 @@ CPed::PedSetInCarCB(CAnimBlendAssociation *animAssoc, void *arg)
ped->bChangedSeat = true; ped->bChangedSeat = true;
} }
// --MIAMI: Done, but what is TODO_CHAR?? // --MIAMI: Done
bool bool
CPed::CanBeDeleted(void) CPed::CanBeDeleted(void)
{ {
@ -4571,7 +4570,7 @@ CPed::CanBeDeleted(void)
return true; return true;
case MISSION_CHAR: case MISSION_CHAR:
return false; return false;
case TODO_CHAR: case UNK_CHAR:
return false; return false;
default: default:
return true; return true;
@ -4587,7 +4586,7 @@ CPed::CanBeDeletedEvenInVehicle(void)
return true; return true;
case MISSION_CHAR: case MISSION_CHAR:
return false; return false;
case TODO_CHAR: case UNK_CHAR:
return false; return false;
default: default:
return true; return true;
@ -5522,7 +5521,7 @@ CPed::SetGetUp(void)
if (m_nWaitState == WAITSTATE_SUN_BATHE_IDLE) { if (m_nWaitState == WAITSTATE_SUN_BATHE_IDLE) {
m_headingRate = 0.0f; m_headingRate = 0.0f;
// TODO(Miami): Looks like that should've been another getup anim but R* forgot it. Visit here later // Seemingly they planned to use different getup anims for different conditions, but sadly in final game all getup anims(GETUP1, GETUP2, GETUP3) are same...
if (bFleeWhenStanding && m_threatEx) if (bFleeWhenStanding && m_threatEx)
animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_GETUP1, 1000.0f); animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_GETUP1, 1000.0f);
else else

View File

@ -254,7 +254,7 @@ enum eObjective : uint32 {
enum { enum {
RANDOM_CHAR = 1, RANDOM_CHAR = 1,
MISSION_CHAR, MISSION_CHAR,
TODO_CHAR, // TODO(Miami) UNK_CHAR,
}; };
enum PedLineUpPhase { enum PedLineUpPhase {
@ -1155,10 +1155,7 @@ void FinishTalkingOnMobileCB(CAnimBlendAssociation* assoc, void* arg);
void StartTalkingOnMobileCB(CAnimBlendAssociation* assoc, void* arg); void StartTalkingOnMobileCB(CAnimBlendAssociation* assoc, void* arg);
void PlayRandomAnimationsFromAnimBlock(CPed* ped, AssocGroupId animGroup, uint32 first, uint32 amount); void PlayRandomAnimationsFromAnimBlock(CPed* ped, AssocGroupId animGroup, uint32 first, uint32 amount);
// TODO(Miami): Change those when Ped struct is done VALIDATE_SIZE(CPed, 0x5F4);
#ifndef PED_SKIN
VALIDATE_SIZE(CPed, 0x53C);
#endif
bool IsPedPointerValid(CPed*); bool IsPedPointerValid(CPed*);
bool IsPedPointerValid_NotInWorld(CPed*); bool IsPedPointerValid_NotInWorld(CPed*);

View File

@ -26,7 +26,7 @@
#include "Glass.h" #include "Glass.h"
#include "SpecialFX.h" #include "SpecialFX.h"
//--MIAMI: file done except TODOs //--MIAMI: file done
uint16 nPlayerInComboMove; uint16 nPlayerInComboMove;
RpClump* flyingClumpTemp; RpClump* flyingClumpTemp;

View File

@ -292,6 +292,11 @@ COcclusion::ProcessBeforeRendering(void)
{ {
NumActiveOccluders = 0; NumActiveOccluders = 0;
#ifndef MASTER
if (gbModelViewer)
return;
#endif
if (CGame::currArea != AREA_MAIN_MAP) if (CGame::currArea != AREA_MAIN_MAP)
return; return;

View File

@ -87,9 +87,6 @@ enum eGameState
GS_FRONTEND, GS_FRONTEND,
GS_INIT_PLAYING_GAME, GS_INIT_PLAYING_GAME,
GS_PLAYING_GAME, GS_PLAYING_GAME,
#ifndef MASTER
GS_ANIMVIEWER,
#endif
}; };
extern RwUInt32 gGameState; extern RwUInt32 gGameState;

View File

@ -1259,17 +1259,11 @@ void resizeCB(GLFWwindow* window, int width, int height) {
* memory things don't work. * memory things don't work.
*/ */
/* redraw window */ /* 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) if (RwInitialised && gGameState == GS_PLAYING_GAME)
{ {
RsEventHandler(rsIDLE, (void *)TRUE); RsEventHandler(rsIDLE, (void *)TRUE);
} }
#endif
if (RwInitialised && height > 0 && width > 0) { if (RwInitialised && height > 0 && width > 0) {
RwRect r; RwRect r;
@ -1645,18 +1639,6 @@ main(int argc, char *argv[])
} }
#endif #endif
if (TurnOnAnimViewer)
{
#ifndef MASTER
CAnimViewer::Initialise();
#ifndef PS2_MENU
FrontEndMenuManager.m_bGameNotLoaded = false;
#endif
gGameState = GS_ANIMVIEWER;
TurnOnAnimViewer = false;
#endif
}
initkeymap(); initkeymap();
while ( TRUE ) while ( TRUE )
@ -1675,6 +1657,18 @@ main(int argc, char *argv[])
* Enter the message processing loop... * 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 #ifdef PS2_MENU
if (TheMemoryCard.m_bWantToLoad) if (TheMemoryCard.m_bWantToLoad)
LoadSplash(GetLevelSplashScreen(CGame::currLevel)); LoadSplash(GetLevelSplashScreen(CGame::currLevel));
@ -1689,7 +1683,13 @@ main(int argc, char *argv[])
#endif #endif
{ {
glfwPollEvents(); glfwPollEvents();
if( ForegroundApp ) #ifndef MASTER
if (gbModelViewer) {
// This is TheModelViewerCore in LCS
TheModelViewer();
} else
#endif
if ( ForegroundApp )
{ {
switch ( gGameState ) switch ( gGameState )
{ {
@ -1893,18 +1893,6 @@ main(int argc, char *argv[])
} }
break; 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 else
@ -1976,12 +1964,13 @@ main(int argc, char *argv[])
} }
else else
{ {
#ifndef MASTER
if ( gbModelViewer )
CAnimViewer::Shutdown();
else
#endif
if ( gGameState == GS_PLAYING_GAME ) if ( gGameState == GS_PLAYING_GAME )
CGame::ShutDown(); CGame::ShutDown();
#ifndef MASTER
else if ( gGameState == GS_ANIMVIEWER )
CAnimViewer::Shutdown();
#endif
CTimer::Stop(); CTimer::Stop();
@ -2002,13 +1991,13 @@ main(int argc, char *argv[])
#endif #endif
} }
#ifndef MASTER
if ( gbModelViewer )
CAnimViewer::Shutdown();
else
#endif
if ( gGameState == GS_PLAYING_GAME ) if ( gGameState == GS_PLAYING_GAME )
CGame::ShutDown(); CGame::ShutDown();
#ifndef MASTER
else if ( gGameState == GS_ANIMVIEWER )
CAnimViewer::Shutdown();
#endif
DMAudio.Terminate(); DMAudio.Terminate();

View File

@ -10,13 +10,12 @@
#include "skeleton.h" #include "skeleton.h"
#include "platform.h" #include "platform.h"
#include "main.h"
// --MIAMI: file done // --MIAMI: file done
static RwBool DefaultVideoMode = TRUE; static RwBool DefaultVideoMode = TRUE;
bool TurnOnAnimViewer = false;
RsGlobalType RsGlobal; RsGlobalType RsGlobal;
#ifdef _WIN32 #ifdef _WIN32
@ -161,7 +160,7 @@ rsPreInitCommandLine(RwChar *arg)
#ifndef MASTER #ifndef MASTER
if (!strcmp(arg, RWSTRING("-animviewer"))) if (!strcmp(arg, RWSTRING("-animviewer")))
{ {
TurnOnAnimViewer = TRUE; gbModelViewer = TRUE;
return TRUE; return TRUE;
} }

View File

@ -79,11 +79,8 @@ enum RsEvent
rsPADANALOGUERIGHTRESET, rsPADANALOGUERIGHTRESET,
rsPREINITCOMMANDLINE, rsPREINITCOMMANDLINE,
rsACTIVATE, rsACTIVATE,
rsANIMVIEWER,
}; };
extern bool TurnOnAnimViewer;
typedef enum RsEvent RsEvent; typedef enum RsEvent RsEvent;
typedef RsEventStatus (*RsInputEventHandler)(RsEvent event, void *param); typedef RsEventStatus (*RsInputEventHandler)(RsEvent event, void *param);

View File

@ -1008,17 +1008,11 @@ MainWndProc(HWND window, UINT message, WPARAM wParam, LPARAM lParam)
RECT rect; RECT rect;
/* redraw window */ /* 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) if (RwInitialised && gGameState == GS_PLAYING_GAME)
{ {
RsEventHandler(rsIDLE, (void *)TRUE); RsEventHandler(rsIDLE, (void *)TRUE);
} }
#endif
/* Manually resize window */ /* Manually resize window */
rect.left = rect.top = 0; rect.left = rect.top = 0;
@ -2173,17 +2167,17 @@ WinMain(HINSTANCE instance,
} }
#endif #endif
if (TurnOnAnimViewer)
{
#ifndef MASTER #ifndef MASTER
if (gbModelViewer) {
// This is TheModelViewer in LCS
LoadingScreen("Loading the ModelViewer", NULL, GetRandomSplashScreen());
CAnimViewer::Initialise(); CAnimViewer::Initialise();
CTimer::Update();
#ifndef PS2_MENU #ifndef PS2_MENU
FrontEndMenuManager.m_bGameNotLoaded = false; FrontEndMenuManager.m_bGameNotLoaded = false;
#endif
gGameState = GS_ANIMVIEWER;
TurnOnAnimViewer = false;
#endif #endif
} }
#endif
while ( TRUE ) while ( TRUE )
{ {
@ -2228,6 +2222,12 @@ WinMain(HINSTANCE instance,
DispatchMessage(&message); DispatchMessage(&message);
} }
} }
#ifndef MASTER
else if (gbModelViewer) {
// This is TheModelViewerCore in LCS
TheModelViewer();
}
#endif
else if( ForegroundApp ) else if( ForegroundApp )
{ {
switch ( gGameState ) switch ( gGameState )
@ -2447,18 +2447,6 @@ WinMain(HINSTANCE instance,
} }
break; 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 else
@ -2530,12 +2518,13 @@ WinMain(HINSTANCE instance,
} }
else else
{ {
#ifndef MASTER
if ( gbModelViewer )
CAnimViewer::Shutdown();
else
#endif
if ( gGameState == GS_PLAYING_GAME ) if ( gGameState == GS_PLAYING_GAME )
CGame::ShutDown(); CGame::ShutDown();
#ifndef MASTER
else if ( gGameState == GS_ANIMVIEWER )
CAnimViewer::Shutdown();
#endif
CTimer::Stop(); CTimer::Stop();
@ -2557,12 +2546,13 @@ WinMain(HINSTANCE instance,
} }
#ifndef MASTER
if ( gbModelViewer )
CAnimViewer::Shutdown();
else
#endif
if ( gGameState == GS_PLAYING_GAME ) if ( gGameState == GS_PLAYING_GAME )
CGame::ShutDown(); CGame::ShutDown();
#ifndef MASTER
else if ( gGameState == GS_ANIMVIEWER )
CAnimViewer::Shutdown();
#endif
DMAudio.Terminate(); DMAudio.Terminate();