From 5e61c1280c15ab9969b94cd360cafd4a11b2dd30 Mon Sep 17 00:00:00 2001 From: Ash Wolf Date: Wed, 5 Jul 2023 19:04:06 +0100 Subject: matched T2.exe --- src/T2DLL/T2MetroRailway.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/T2DLL/T2MetroRailway.cpp') diff --git a/src/T2DLL/T2MetroRailway.cpp b/src/T2DLL/T2MetroRailway.cpp index 5653e83..560c58d 100644 --- a/src/T2DLL/T2MetroRailway.cpp +++ b/src/T2DLL/T2MetroRailway.cpp @@ -142,7 +142,7 @@ void T2MetroRailway::Init(T2Transport* inParent, CResFile* inResFile) { var1C += mStation; if (var1C < GetWorldDef()->GetWidth()) { - T2TowerMainView *theMainView = inDoc->GetTowerMainView(); + T2TowerMainView *theMainView = inDoc->GetMainView(); if (theMainView) { POINT p; RECT metroRect; @@ -155,12 +155,12 @@ void T2MetroRailway::Init(T2Transport* inParent, CResFile* inResFile) { p.y = metroRect.top; p.x = metroRect.left; - UT2Coordinate::ZoomOut(metroRect, inDoc->towerDoc_vf108()); + UT2Coordinate::ZoomOut(metroRect, inDoc->GetZoomLevel()); CRect visibleRect; theMainView->GetClientRect(&visibleRect); - visibleRect.OffsetRect(theMainView->m64); - visibleRect.right += UT2Coordinate::UnitHSize(inDoc->towerDoc_vf108()); + visibleRect.OffsetRect(theMainView->mScrollOffset); + visibleRect.right += UT2Coordinate::UnitHSize(inDoc->GetZoomLevel()); RECT intersection; if (IntersectRect(&intersection, &metroRect, &visibleRect)) { -- cgit v1.2.3