mirror of
https://github.com/isledecomp/isle.git
synced 2024-11-28 02:25:57 -05:00
Rename Start/StopTimer to Pause/Resume (#1007)
* Rename Start/StopTimer to Pause/Resume * Fix
This commit is contained in:
parent
9bc5c26bcc
commit
be4c351d7d
7 changed files with 48 additions and 48 deletions
|
@ -162,7 +162,7 @@ void IsleApp::Close()
|
||||||
Lego()->RemoveWorld(ds.GetAtomId(), ds.GetObjectId());
|
Lego()->RemoveWorld(ds.GetAtomId(), ds.GetObjectId());
|
||||||
Lego()->DeleteObject(ds);
|
Lego()->DeleteObject(ds);
|
||||||
TransitionManager()->SetWaitIndicator(NULL);
|
TransitionManager()->SetWaitIndicator(NULL);
|
||||||
Lego()->StopTimer();
|
Lego()->Resume();
|
||||||
|
|
||||||
while (Streamer()->Close(NULL) == SUCCESS) {
|
while (Streamer()->Close(NULL) == SUCCESS) {
|
||||||
}
|
}
|
||||||
|
@ -318,7 +318,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
|
||||||
g_reqEnableRMDevice = FALSE;
|
g_reqEnableRMDevice = FALSE;
|
||||||
VideoManager()->EnableRMDevice();
|
VideoManager()->EnableRMDevice();
|
||||||
g_rmDisabled = FALSE;
|
g_rmDisabled = FALSE;
|
||||||
Lego()->StopTimer();
|
Lego()->Resume();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_closed) {
|
if (g_closed) {
|
||||||
|
@ -468,7 +468,7 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
}
|
}
|
||||||
else if (!valid) {
|
else if (!valid) {
|
||||||
g_rmDisabled = TRUE;
|
g_rmDisabled = TRUE;
|
||||||
Lego()->StartTimer();
|
Lego()->Pause();
|
||||||
VideoManager()->DisableRMDevice();
|
VideoManager()->DisableRMDevice();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -832,7 +832,7 @@ inline void IsleApp::Tick(BOOL sleepIfNotNextFrame)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_frameDelta + g_lastFrameTime < currentTime) {
|
if (m_frameDelta + g_lastFrameTime < currentTime) {
|
||||||
if (!Lego()->IsTimerRunning()) {
|
if (!Lego()->IsPaused()) {
|
||||||
TickleManager()->Tickle();
|
TickleManager()->Tickle();
|
||||||
}
|
}
|
||||||
g_lastFrameTime = currentTime;
|
g_lastFrameTime = currentTime;
|
||||||
|
|
|
@ -75,33 +75,33 @@ class LegoOmni : public MxOmni {
|
||||||
};
|
};
|
||||||
|
|
||||||
LegoOmni();
|
LegoOmni();
|
||||||
~LegoOmni() override; // vtable+00
|
~LegoOmni() override;
|
||||||
|
|
||||||
MxLong Notify(MxParam& p_param) override; // vtable+04
|
MxLong Notify(MxParam& p_param) override; // vtable+0x04
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10058aa0
|
// FUNCTION: LEGO1 0x10058aa0
|
||||||
inline const char* ClassName() const override // vtable+0c
|
inline const char* ClassName() const override // vtable+0x0c
|
||||||
{
|
{
|
||||||
// STRING: LEGO1 0x100f671c
|
// STRING: LEGO1 0x100f671c
|
||||||
return "LegoOmni";
|
return "LegoOmni";
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10058ab0
|
// FUNCTION: LEGO1 0x10058ab0
|
||||||
inline MxBool IsA(const char* p_name) const override // vtable+10
|
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
||||||
{
|
{
|
||||||
return !strcmp(p_name, LegoOmni::ClassName()) || MxOmni::IsA(p_name);
|
return !strcmp(p_name, LegoOmni::ClassName()) || MxOmni::IsA(p_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Init() override; // vtable+14
|
void Init() override; // vtable+0x14
|
||||||
MxResult Create(MxOmniCreateParam& p_param) override; // vtable+18
|
MxResult Create(MxOmniCreateParam& p_param) override; // vtable+0x18
|
||||||
void Destroy() override; // vtable+1c
|
void Destroy() override; // vtable+0x1c
|
||||||
MxResult Start(MxDSAction* p_dsAction) override; // vtable+20
|
MxResult Start(MxDSAction* p_dsAction) override; // vtable+0x20
|
||||||
void DeleteObject(MxDSAction& p_dsAction) override; // vtable+24
|
void DeleteObject(MxDSAction& p_dsAction) override; // vtable+0x24
|
||||||
MxBool DoesEntityExist(MxDSAction& p_dsAction) override; // vtable+28
|
MxBool DoesEntityExist(MxDSAction& p_dsAction) override; // vtable+0x28
|
||||||
MxEntity* AddToWorld(const char* p_id, MxS32 p_entityId, MxPresenter* p_presenter) override; // vtable+30
|
MxEntity* AddToWorld(const char* p_id, MxS32 p_entityId, MxPresenter* p_presenter) override; // vtable+0x30
|
||||||
void NotifyCurrentEntity(const MxNotificationParam& p_param) override; // vtable+34
|
void NotifyCurrentEntity(const MxNotificationParam& p_param) override; // vtable+0x34
|
||||||
void StartTimer() override; // vtable+38
|
void Pause() override; // vtable+0x38
|
||||||
void StopTimer() override; // vtable+3c
|
void Resume() override; // vtable+0x3c
|
||||||
|
|
||||||
LegoWorld* FindWorld(const MxAtomId& p_atom, MxS32 p_entityid);
|
LegoWorld* FindWorld(const MxAtomId& p_atom, MxS32 p_entityid);
|
||||||
LegoROI* FindROI(const char* p_name);
|
LegoROI* FindROI(const char* p_name);
|
||||||
|
|
|
@ -607,11 +607,11 @@ MxLong LegoNavController::Notify(MxParam& p_param)
|
||||||
|
|
||||||
switch (((LegoEventNotificationParam&) p_param).GetKey()) {
|
switch (((LegoEventNotificationParam&) p_param).GetKey()) {
|
||||||
case VK_PAUSE:
|
case VK_PAUSE:
|
||||||
if (Lego()->IsTimerRunning()) {
|
if (Lego()->IsPaused()) {
|
||||||
Lego()->StopTimer();
|
Lego()->Resume();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Lego()->StartTimer();
|
Lego()->Pause();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case VK_ESCAPE: {
|
case VK_ESCAPE: {
|
||||||
|
|
|
@ -370,7 +370,7 @@ MxBool LegoInputManager::ProcessOneEvent(LegoEventNotificationParam& p_param)
|
||||||
MxBool processRoi;
|
MxBool processRoi;
|
||||||
|
|
||||||
if (p_param.GetType() == c_notificationKeyPress) {
|
if (p_param.GetType() == c_notificationKeyPress) {
|
||||||
if (!Lego()->IsTimerRunning() || p_param.GetKey() == VK_PAUSE) {
|
if (!Lego()->IsPaused() || p_param.GetKey() == VK_PAUSE) {
|
||||||
if (p_param.GetKey() == VK_SHIFT) {
|
if (p_param.GetKey() == VK_SHIFT) {
|
||||||
if (m_unk0x195) {
|
if (m_unk0x195) {
|
||||||
m_unk0x80 = FALSE;
|
m_unk0x80 = FALSE;
|
||||||
|
@ -396,7 +396,7 @@ MxBool LegoInputManager::ProcessOneEvent(LegoEventNotificationParam& p_param)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (!Lego()->IsTimerRunning()) {
|
if (!Lego()->IsPaused()) {
|
||||||
processRoi = TRUE;
|
processRoi = TRUE;
|
||||||
|
|
||||||
if (m_unk0x335 != 0) {
|
if (m_unk0x335 != 0) {
|
||||||
|
|
|
@ -579,15 +579,15 @@ MxLong LegoOmni::Notify(MxParam& p_param)
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1005b640
|
// FUNCTION: LEGO1 0x1005b640
|
||||||
void LegoOmni::StartTimer()
|
void LegoOmni::Pause()
|
||||||
{
|
{
|
||||||
MxOmni::StartTimer();
|
MxOmni::Pause();
|
||||||
SetAppCursor(e_cursorNo);
|
SetAppCursor(e_cursorNo);
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1005b650
|
// FUNCTION: LEGO1 0x1005b650
|
||||||
void LegoOmni::StopTimer()
|
void LegoOmni::Resume()
|
||||||
{
|
{
|
||||||
MxOmni::StopTimer();
|
MxOmni::Resume();
|
||||||
SetAppCursor(e_cursorArrow);
|
SetAppCursor(e_cursorArrow);
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,21 +39,21 @@ class MxOmni : public MxCore {
|
||||||
MxOmni();
|
MxOmni();
|
||||||
~MxOmni() override;
|
~MxOmni() override;
|
||||||
|
|
||||||
MxLong Notify(MxParam& p_param) override; // vtable+04
|
MxLong Notify(MxParam& p_param) override; // vtable+0x04
|
||||||
virtual void Init(); // vtable+14
|
virtual void Init(); // vtable+0x14
|
||||||
virtual MxResult Create(MxOmniCreateParam& p_param); // vtable+18
|
virtual MxResult Create(MxOmniCreateParam& p_param); // vtable+0x18
|
||||||
virtual void Destroy(); // vtable+1c
|
virtual void Destroy(); // vtable+0x1c
|
||||||
virtual MxResult Start(MxDSAction* p_dsAction); // vtable+20
|
virtual MxResult Start(MxDSAction* p_dsAction); // vtable+0x20
|
||||||
virtual void DeleteObject(MxDSAction& p_dsAction); // vtable+24
|
virtual void DeleteObject(MxDSAction& p_dsAction); // vtable+0x24
|
||||||
virtual MxBool DoesEntityExist(MxDSAction& p_dsAction); // vtable+28
|
virtual MxBool DoesEntityExist(MxDSAction& p_dsAction); // vtable+0x28
|
||||||
virtual MxResult CreatePresenter(MxStreamController* p_controller, MxDSAction& p_action); // vtable+2c
|
virtual MxResult CreatePresenter(MxStreamController* p_controller, MxDSAction& p_action); // vtable+0x2c
|
||||||
virtual MxEntity* AddToWorld(const char*, MxS32, MxPresenter*); // vtable+30
|
virtual MxEntity* AddToWorld(const char*, MxS32, MxPresenter*); // vtable+0x30
|
||||||
virtual void NotifyCurrentEntity(const MxNotificationParam& p_param); // vtable+34
|
virtual void NotifyCurrentEntity(const MxNotificationParam& p_param); // vtable+0x34
|
||||||
virtual void StartTimer(); // vtable+38
|
virtual void Pause(); // vtable+0x38
|
||||||
virtual void StopTimer(); // vtable+3c
|
virtual void Resume(); // vtable+0x3c
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10058a90
|
// FUNCTION: LEGO1 0x10058a90
|
||||||
virtual MxBool IsTimerRunning() { return m_timerRunning; } // vtable+40
|
virtual MxBool IsPaused() { return m_paused; } // vtable+0x40
|
||||||
|
|
||||||
static void SetInstance(MxOmni* p_instance);
|
static void SetInstance(MxOmni* p_instance);
|
||||||
static MxBool ActionSourceEquals(MxDSAction* p_action, const char* p_name);
|
static MxBool ActionSourceEquals(MxDSAction* p_action, const char* p_name);
|
||||||
|
@ -115,7 +115,7 @@ class MxOmni : public MxCore {
|
||||||
MxStreamer* m_streamer; // 0x40
|
MxStreamer* m_streamer; // 0x40
|
||||||
MxAtomSet* m_atomSet; // 0x44
|
MxAtomSet* m_atomSet; // 0x44
|
||||||
MxCriticalSection m_criticalSection; // 0x48
|
MxCriticalSection m_criticalSection; // 0x48
|
||||||
MxBool m_timerRunning; // 0x64
|
MxBool m_paused; // 0x64
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MXOMNI_H
|
#endif // MXOMNI_H
|
||||||
|
|
|
@ -68,7 +68,7 @@ void MxOmni::Init()
|
||||||
m_timer = NULL;
|
m_timer = NULL;
|
||||||
m_streamer = NULL;
|
m_streamer = NULL;
|
||||||
m_atomSet = NULL;
|
m_atomSet = NULL;
|
||||||
m_timerRunning = FALSE;
|
m_paused = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100af0b0
|
// FUNCTION: LEGO1 0x100af0b0
|
||||||
|
@ -409,21 +409,21 @@ MxBool MxOmni::DoesEntityExist(MxDSAction& p_dsAction)
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100b09d0
|
// FUNCTION: LEGO1 0x100b09d0
|
||||||
void MxOmni::StartTimer()
|
void MxOmni::Pause()
|
||||||
{
|
{
|
||||||
if (m_timerRunning == FALSE && m_timer != NULL && m_soundManager != NULL) {
|
if (m_paused == FALSE && m_timer != NULL && m_soundManager != NULL) {
|
||||||
m_timer->Start();
|
m_timer->Start();
|
||||||
m_soundManager->Pause();
|
m_soundManager->Pause();
|
||||||
m_timerRunning = TRUE;
|
m_paused = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100b0a00
|
// FUNCTION: LEGO1 0x100b0a00
|
||||||
void MxOmni::StopTimer()
|
void MxOmni::Resume()
|
||||||
{
|
{
|
||||||
if (m_timerRunning != FALSE && m_timer != NULL && m_soundManager != NULL) {
|
if (m_paused != FALSE && m_timer != NULL && m_soundManager != NULL) {
|
||||||
m_timer->Stop();
|
m_timer->Stop();
|
||||||
m_soundManager->Resume();
|
m_soundManager->Resume();
|
||||||
m_timerRunning = FALSE;
|
m_paused = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue