diff options
author | Ash Wolf <ninji@wuffs.org> | 2023-07-05 19:04:06 +0100 |
---|---|---|
committer | Ash Wolf <ninji@wuffs.org> | 2023-07-05 19:04:06 +0100 |
commit | 5e61c1280c15ab9969b94cd360cafd4a11b2dd30 (patch) | |
tree | 1fdb60d771c4351b5aa5dcf1a43376c0558625a4 /src/T2DLL/T2SantaClaus.cpp | |
parent | c2efba6907fab934a04959b9bb644cf7141cc955 (diff) | |
download | t2win-5e61c1280c15ab9969b94cd360cafd4a11b2dd30.tar.gz t2win-5e61c1280c15ab9969b94cd360cafd4a11b2dd30.zip |
matched T2.exe
Diffstat (limited to '')
-rw-r--r-- | src/T2DLL/T2SantaClaus.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/T2DLL/T2SantaClaus.cpp b/src/T2DLL/T2SantaClaus.cpp index 4aaa59d..37f34c3 100644 --- a/src/T2DLL/T2SantaClaus.cpp +++ b/src/T2DLL/T2SantaClaus.cpp @@ -55,7 +55,7 @@ T2SantaClaus::T2SantaClaus(T2TowerEvent* inTowerEvent, CResFile* inResFile, int } /*virtual*/ BOOL T2SantaClaus::Start(T2TowerDoc* inDoc) { - T2DateTime *theNow = inDoc->towerDoc_vf120(); + T2DateTime *theNow = inDoc->GetNow(); m48 = theNow ? (theNow->GetRawMinutes() - mBeginTime) : 0; m4C = -6; @@ -90,7 +90,7 @@ T2SantaClaus::T2SantaClaus(T2TowerEvent* inTowerEvent, CResFile* inResFile, int mSprite->ShowSprite(mSpriteID, true); mVisible = true; - mMainView = inDoc->GetTowerMainView(); + mMainView = inDoc->GetMainView(); if (mMainView) { mAttach = new T2SantaClausAttach(this, 0, true); mMainView->AddAttachment(mAttach, NULL, true); @@ -107,7 +107,7 @@ T2SantaClaus::T2SantaClaus(T2TowerEvent* inTowerEvent, CResFile* inResFile, int /*virtual*/ int T2SantaClaus::Exec(T2TowerDoc* inDoc) { if (!mMainView) - mMainView = inDoc->GetTowerMainView(); + mMainView = inDoc->GetMainView(); if (!mMainView) return 0; @@ -128,7 +128,7 @@ T2SantaClaus::T2SantaClaus(T2TowerEvent* inTowerEvent, CResFile* inResFile, int CRect intersect; mMainView->GetClientRect(viewArea); - viewArea.OffsetRect(mMainView->m64); + viewArea.OffsetRect(mMainView->mScrollOffset); spriteArea.SetRect(position.x, position.y, position.x + mSpriteHeight, position.y + mSpriteWidth); @@ -205,16 +205,16 @@ T2SantaClausAttach::T2SantaClausAttach(T2SantaClaus* inOwner, unsigned int inMes if (inMessage == WM_LBUTTONDOWN) { MSG *messagePtr = (MSG *) ioData; - int id = ((T2MainWindow *) AfxGetMainWnd())->mToolWindow->GetSel(); - CString *theIconName = ((T2MainWindow *) AfxGetMainWnd())->mToolWindow->GetIconName(id); - T2TemplatePlugin *theTemplatePlugin = ((T2MainWindow *) AfxGetMainWnd())->mToolWindow->GetIconPlugin(id); + int id = T2_MAIN_WINDOW->mToolWindow->GetSel(); + CString *theIconName = T2_MAIN_WINDOW->mToolWindow->GetIconName(id); + T2TemplatePlugin *theTemplatePlugin = T2_MAIN_WINDOW->mToolWindow->GetIconPlugin(id); CProgramPlugin *theIconProgramPlugin = theTemplatePlugin->GetPlugin(); - unsigned int theIconValiation = ((T2MainWindow *) AfxGetMainWnd())->mToolWindow->GetIconValiation(id); - DWORD theIconOption = ((T2MainWindow *) AfxGetMainWnd())->mToolWindow->GetIconOption(id); + unsigned int theIconValiation = T2_MAIN_WINDOW->mToolWindow->GetIconValiation(id); + DWORD theIconOption = T2_MAIN_WINDOW->mToolWindow->GetIconOption(id); - if (theIconOption == 0 && *theIconName == "ToolInfo") { + if (theIconOption == kToolOption0 && *theIconName == "ToolInfo") { CPoint pt(LOWORD(messagePtr->lParam), HIWORD(messagePtr->lParam)); - pt.Offset(GetCurrentT2TowerDoc()->GetTowerMainView()->m64); + pt.Offset(GetCurrentT2TowerDoc()->GetMainView()->mScrollOffset); if (mOwner) { CRect rect; |