diff options
author | Ash Wolf <ninji@wuffs.org> | 2023-06-28 22:22:32 +0100 |
---|---|---|
committer | Ash Wolf <ninji@wuffs.org> | 2023-06-28 22:22:32 +0100 |
commit | c0c336500955a23e344651e5412c9d9d441ef4ee (patch) | |
tree | 790769c748db307cf3314f6e896e2f61c68561a2 /src/T2DLL/T2TrafficInfo.h | |
parent | 37e364b2c6cc7487a1c888d256a73e5337bb7189 (diff) | |
download | t2win-c0c336500955a23e344651e5412c9d9d441ef4ee.tar.gz t2win-c0c336500955a23e344651e5412c9d9d441ef4ee.zip |
first pass of T2DLL
Diffstat (limited to 'src/T2DLL/T2TrafficInfo.h')
-rw-r--r-- | src/T2DLL/T2TrafficInfo.h | 42 |
1 files changed, 26 insertions, 16 deletions
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; }; |