From c0c336500955a23e344651e5412c9d9d441ef4ee Mon Sep 17 00:00:00 2001 From: Ash Wolf Date: Wed, 28 Jun 2023 22:22:32 +0100 Subject: first pass of T2DLL --- src/T2DLL/T2TrafficInfo.h | 42 ++++++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 16 deletions(-) (limited to 'src/T2DLL/T2TrafficInfo.h') diff --git a/src/T2DLL/T2TrafficInfo.h b/src/T2DLL/T2TrafficInfo.h index 751f56d..422a709 100644 --- a/src/T2DLL/T2TrafficInfo.h +++ b/src/T2DLL/T2TrafficInfo.h @@ -1,24 +1,34 @@ #pragma once #include "common.h" -class T2TrafficInfo { +struct T2TrafficUnit { + int x0; + unsigned int x4; + short range; +}; + +class AFX_EXT_CLASS T2TrafficInfo { public: - T2TrafficInfo(RECT, unsigned int, unsigned int, unsigned int, unsigned int); + T2TrafficInfo(RECT inArea, unsigned int inA, unsigned int inB, unsigned int inC, unsigned int inUnitSize); virtual ~T2TrafficInfo(); - void Pass(POINT, POINT, short); - void HourChanged(T2TowerDoc*); -protected: - unsigned int CalcRange(unsigned int) const; - void CalcUnitArea(unsigned int, RECT&) const; -public: - short GetRange(POINT) const; + void Pass(POINT inPt1, POINT inPt2, short inCost); + void HourChanged(T2TowerDoc* inDoc); + short GetRange(POINT inPt) const; + void Read(T2Archive& inArchive); + void Write(T2Archive& inArchive) const; + protected: - T2TrafficUnit* GetUnit(POINT) const; - int CalcUnitIndex(POINT) const; -public: - void Read(T2Archive&); - void Write(T2Archive&) const; + unsigned int CalcRange(unsigned int inValue) const; + void CalcUnitArea(unsigned int inIndex, RECT& outRect) const; + T2TrafficUnit* GetUnit(POINT inPt) const; + int CalcUnitIndex(POINT inPt) const; - T2TrafficInfo(const T2TrafficInfo&) {} - T2TrafficInfo& operator=(const T2TrafficInfo&) {} + unsigned int mUnitSize; + unsigned int m8; + unsigned int mC; + unsigned int m10; + RECT mArea; + unsigned int mHeight; + unsigned int mWidth; + T2TrafficUnit *mUnitData; }; -- cgit v1.2.3